From 9629e847eac13094fab89205c6af4f09630de5dc Mon Sep 17 00:00:00 2001 From: "dev.uche" Date: Fri, 12 Dec 2025 05:56:00 +0100 Subject: [PATCH 01/93] feat: create DisputeResolution contract with automated resolution logic - Add automated dispute resolution based on timestamps - Implement check-in/check-out recording system - Add evidence submission with IPFS hash support - Create voting mechanism for complex disputes - Support multiple resolution types (Automated, PendingVote, Manual) - Add moderator and voter authorization system --- .../contracts/DisputeResolution.sol | 630 ++++++++++++++++++ 1 file changed, 630 insertions(+) create mode 100644 smartcontracts/contracts/DisputeResolution.sol diff --git a/smartcontracts/contracts/DisputeResolution.sol b/smartcontracts/contracts/DisputeResolution.sol new file mode 100644 index 0000000..06c0a6b --- /dev/null +++ b/smartcontracts/contracts/DisputeResolution.sol @@ -0,0 +1,630 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.20; + +import "@openzeppelin/contracts/access/Ownable.sol"; +import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; +import "@openzeppelin/contracts/security/Pausable.sol"; +import "./PaymentEscrow.sol"; +import "./interfaces/IParkingSpot.sol"; + +/** + * @title DisputeResolution + * @dev Automated dispute resolution system with evidence-based refund logic and voting mechanism + * @notice Handles dispute filing, evidence submission, automated decisions based on timestamps, + * and voting for complex disputes requiring human judgment + */ +contract DisputeResolution is Ownable, ReentrancyGuard, Pausable { + PaymentEscrow public paymentEscrow; + IParkingSpot public parkingSpot; + + // Dispute resolution types + enum ResolutionType { + Automated, // Resolved automatically based on evidence + PendingVote, // Requires voting + Manual // Requires admin resolution + } + + // Evidence types + enum EvidenceType { + CheckInTimestamp, + CheckOutTimestamp, + Image, + Video, + Document, + LocationData, + Other + } + + // Dispute details structure + struct DisputeDetails { + uint256 disputeId; + uint256 escrowId; + uint256 bookingId; + address filedBy; + address opposingParty; + string reason; + bytes primaryEvidenceHash; // IPFS hash + uint256 filedAt; + ResolutionType resolutionType; + bool isResolved; + address resolvedBy; + uint256 resolvedAt; + bool refundApproved; + uint256 refundPercentage; // 0-100, for partial refunds + } + + // Evidence structure + struct Evidence { + uint256 evidenceId; + uint256 disputeId; + address submittedBy; + EvidenceType evidenceType; + bytes evidenceHash; // IPFS hash + uint256 timestamp; + string description; + } + + // Check-in/check-out timestamp structure + struct CheckInData { + uint256 bookingId; + uint256 checkInTime; + uint256 checkOutTime; + bool checkedIn; + bool checkedOut; + address verifiedBy; // Spot owner or automated system + } + + // Voting structure for complex disputes + struct Vote { + address voter; + bool supportsRefund; + uint256 weight; + uint256 timestamp; + string justification; + } + + // State mappings + mapping(uint256 => DisputeDetails) public disputes; + mapping(uint256 => Evidence[]) public disputeEvidence; + mapping(uint256 => CheckInData) public checkInRecords; + mapping(uint256 => Vote[]) public disputeVotes; + mapping(address => bool) public moderators; + mapping(address => bool) public authorizedVoters; // For voting mechanism + mapping(uint256 => uint256) public escrowToDispute; + + uint256 public disputeCounter; + uint256 public evidenceCounter; + + // Configuration + uint256 public maxResolutionTime = 7 days; + uint256 public autoRefundThreshold = 80; // 80% of votes needed for auto-resolution + uint256 public minVotesForResolution = 3; + uint256 public lateCheckInThreshold = 30 minutes; // 30 minutes late = auto refund + uint256 public noShowThreshold = 1 hours; // 1 hour no-show = auto refund + + // Events + event DisputeFiled( + uint256 indexed disputeId, + uint256 indexed escrowId, + uint256 indexed bookingId, + address filedBy, + address opposingParty, + string reason, + ResolutionType resolutionType + ); + + event EvidenceSubmitted( + uint256 indexed evidenceId, + uint256 indexed disputeId, + address submittedBy, + EvidenceType evidenceType, + bytes evidenceHash + ); + + event CheckInRecorded( + uint256 indexed bookingId, + uint256 checkInTime, + address verifiedBy + ); + + event CheckOutRecorded( + uint256 indexed bookingId, + uint256 checkOutTime, + address verifiedBy + ); + + event AutomatedResolution( + uint256 indexed disputeId, + bool refundApproved, + uint256 refundPercentage, + string reason + ); + + event VoteSubmitted( + uint256 indexed disputeId, + address indexed voter, + bool supportsRefund, + uint256 weight + ); + + event DisputeResolved( + uint256 indexed disputeId, + address resolvedBy, + bool refundApproved, + uint256 refundPercentage, + ResolutionType resolutionType + ); + + event ModeratorAdded(address indexed moderator); + event ModeratorRemoved(address indexed moderator); + event VoterAuthorized(address indexed voter); + event VoterRevoked(address indexed voter); + + modifier onlyModerator() { + require(moderators[msg.sender] || msg.sender == owner(), "Not authorized moderator"); + _; + } + + modifier onlyAuthorizedVoter() { + require(authorizedVoters[msg.sender] || msg.sender == owner(), "Not authorized voter"); + _; + } + + constructor(address _paymentEscrow, address _parkingSpot) Ownable(msg.sender) { + require(_paymentEscrow != address(0), "Invalid PaymentEscrow address"); + require(_parkingSpot != address(0), "Invalid ParkingSpot address"); + paymentEscrow = PaymentEscrow(_paymentEscrow); + parkingSpot = IParkingSpot(_parkingSpot); + } + + /** + * @dev Set PaymentEscrow contract address + */ + function setPaymentEscrow(address _paymentEscrow) external onlyOwner { + require(_paymentEscrow != address(0), "Invalid address"); + paymentEscrow = PaymentEscrow(_paymentEscrow); + } + + /** + * @dev Set ParkingSpot contract address + */ + function setParkingSpot(address _parkingSpot) external onlyOwner { + require(_parkingSpot != address(0), "Invalid address"); + parkingSpot = IParkingSpot(_parkingSpot); + } + + /** + * @dev Add a moderator + */ + function addModerator(address _moderator) external onlyOwner { + require(_moderator != address(0), "Invalid address"); + moderators[_moderator] = true; + emit ModeratorAdded(_moderator); + } + + /** + * @dev Remove a moderator + */ + function removeModerator(address _moderator) external onlyOwner { + moderators[_moderator] = false; + emit ModeratorRemoved(_moderator); + } + + /** + * @dev Authorize a voter for the voting mechanism + */ + function authorizeVoter(address _voter) external onlyOwner { + require(_voter != address(0), "Invalid address"); + authorizedVoters[_voter] = true; + emit VoterAuthorized(_voter); + } + + /** + * @dev Revoke voter authorization + */ + function revokeVoter(address _voter) external onlyOwner { + authorizedVoters[_voter] = false; + emit VoterRevoked(_voter); + } + + /** + * @dev Record check-in for a booking + */ + function recordCheckIn(uint256 bookingId, uint256 checkInTime) external nonReentrant { + IParkingSpot.Spot memory spot = parkingSpot.getSpot(parkingSpot.getBooking(bookingId).spotId); + require( + msg.sender == spot.owner || moderators[msg.sender], + "Not authorized to record check-in" + ); + require(checkInRecords[bookingId].checkInTime == 0, "Check-in already recorded"); + + checkInRecords[bookingId] = CheckInData({ + bookingId: bookingId, + checkInTime: checkInTime, + checkOutTime: 0, + checkedIn: true, + checkedOut: false, + verifiedBy: msg.sender + }); + + emit CheckInRecorded(bookingId, checkInTime, msg.sender); + } + + /** + * @dev Record check-out for a booking + */ + function recordCheckOut(uint256 bookingId, uint256 checkOutTime) external nonReentrant { + IParkingSpot.Spot memory spot = parkingSpot.getSpot(parkingSpot.getBooking(bookingId).spotId); + require( + msg.sender == spot.owner || moderators[msg.sender], + "Not authorized to record check-out" + ); + require(checkInRecords[bookingId].checkedIn, "Check-in not recorded"); + require(!checkInRecords[bookingId].checkedOut, "Check-out already recorded"); + + checkInRecords[bookingId].checkOutTime = checkOutTime; + checkInRecords[bookingId].checkedOut = true; + + emit CheckOutRecorded(bookingId, checkOutTime, msg.sender); + } + + /** + * @dev File a dispute with initial evidence + */ + function fileDispute( + uint256 escrowId, + uint256 bookingId, + string memory reason, + bytes memory evidenceHash, + EvidenceType evidenceType + ) external nonReentrant whenNotPaused returns (uint256) { + PaymentEscrow.Escrow memory escrow = paymentEscrow.getEscrow(escrowId); + require(escrow.escrowId != 0, "Escrow does not exist"); + require( + msg.sender == escrow.payer || msg.sender == escrow.payee, + "Only parties can file dispute" + ); + require(escrow.disputeStatus == PaymentEscrow.DisputeStatus.None, "Dispute already exists"); + require(escrow.status == PaymentEscrow.EscrowStatus.Pending, "Escrow not in pending status"); + + // File dispute in PaymentEscrow first + paymentEscrow.fileDispute(escrowId, reason, evidenceHash); + PaymentEscrow.Dispute memory escrowDispute = paymentEscrow.getDispute( + paymentEscrow.disputeCounter() + ); + + disputeCounter++; + address opposingParty = msg.sender == escrow.payer ? escrow.payee : escrow.payer; + + disputes[disputeCounter] = DisputeDetails({ + disputeId: disputeCounter, + escrowId: escrowId, + bookingId: bookingId, + filedBy: msg.sender, + opposingParty: opposingParty, + reason: reason, + primaryEvidenceHash: evidenceHash, + filedAt: block.timestamp, + resolutionType: ResolutionType.Automated, + isResolved: false, + resolvedBy: address(0), + resolvedAt: 0, + refundApproved: false, + refundPercentage: 0 + }); + + escrowToDispute[escrowId] = disputeCounter; + + // Add initial evidence + evidenceCounter++; + disputeEvidence[disputeCounter].push(Evidence({ + evidenceId: evidenceCounter, + disputeId: disputeCounter, + submittedBy: msg.sender, + evidenceType: evidenceType, + evidenceHash: evidenceHash, + timestamp: block.timestamp, + description: reason + })); + + emit DisputeFiled( + disputeCounter, + escrowId, + bookingId, + msg.sender, + opposingParty, + reason, + ResolutionType.Automated + ); + + // Try automated resolution + _attemptAutomatedResolution(disputeCounter); + + return disputeCounter; + } + + /** + * @dev Submit additional evidence to an existing dispute + */ + function submitEvidence( + uint256 disputeId, + EvidenceType evidenceType, + bytes memory evidenceHash, + string memory description + ) external nonReentrant whenNotPaused { + DisputeDetails storage dispute = disputes[disputeId]; + require(dispute.disputeId != 0, "Dispute does not exist"); + require( + msg.sender == dispute.filedBy || msg.sender == dispute.opposingParty, + "Not authorized to submit evidence" + ); + require(!dispute.isResolved, "Dispute already resolved"); + + evidenceCounter++; + disputeEvidence[disputeId].push(Evidence({ + evidenceId: evidenceCounter, + disputeId: disputeId, + submittedBy: msg.sender, + evidenceType: evidenceType, + evidenceHash: evidenceHash, + timestamp: block.timestamp, + description: description + })); + + emit EvidenceSubmitted(evidenceCounter, disputeId, msg.sender, evidenceType, evidenceHash); + + // Re-attempt automated resolution with new evidence + if (dispute.resolutionType == ResolutionType.Automated && !dispute.isResolved) { + _attemptAutomatedResolution(disputeId); + } + } + + /** + * @dev Attempt automated resolution based on evidence and timestamps + */ + function _attemptAutomatedResolution(uint256 disputeId) internal { + DisputeDetails storage dispute = disputes[disputeId]; + if (dispute.isResolved) return; + + PaymentEscrow.Escrow memory escrow = paymentEscrow.getEscrow(dispute.escrowId); + IParkingSpot.Booking memory booking = parkingSpot.getBooking(dispute.bookingId); + CheckInData memory checkIn = checkInRecords[dispute.bookingId]; + + // Check for no-show scenario + if (!checkIn.checkedIn && block.timestamp > booking.startTime + noShowThreshold) { + _resolveDispute(disputeId, true, 100, ResolutionType.Automated, "No-show detected"); + return; + } + + // Check for late check-in + if (checkIn.checkedIn && checkIn.checkInTime > booking.startTime + lateCheckInThreshold) { + uint256 lateMinutes = (checkIn.checkInTime - booking.startTime) / 60; + uint256 refundPercent = (lateMinutes * 100) / 60; // 1% per minute late, capped at 50% + if (refundPercent > 50) refundPercent = 50; + _resolveDispute(disputeId, true, refundPercent, ResolutionType.Automated, "Late check-in"); + return; + } + + // Check for early check-out (partial refund) + if (checkIn.checkedOut && checkIn.checkOutTime < booking.endTime - 1 hours) { + uint256 unusedMinutes = (booking.endTime - checkIn.checkOutTime) / 60; + uint256 totalMinutes = (booking.endTime - booking.startTime) / 60; + uint256 refundPercent = (unusedMinutes * 100) / totalMinutes; + if (refundPercent > 30) refundPercent = 30; // Max 30% refund for early check-out + _resolveDispute(disputeId, true, refundPercent, ResolutionType.Automated, "Early check-out"); + return; + } + + // If no automated resolution can be determined, escalate to voting or manual + if (block.timestamp > dispute.filedAt + maxResolutionTime / 2) { + dispute.resolutionType = ResolutionType.PendingVote; + } + } + + /** + * @dev Submit a vote on a dispute (for voting mechanism) + */ + function submitVote( + uint256 disputeId, + bool supportsRefund, + uint256 refundPercentage, + string memory justification + ) external nonReentrant onlyAuthorizedVoter whenNotPaused { + DisputeDetails storage dispute = disputes[disputeId]; + require(dispute.disputeId != 0, "Dispute does not exist"); + require(dispute.resolutionType == ResolutionType.PendingVote, "Dispute not in voting phase"); + require(!dispute.isResolved, "Dispute already resolved"); + + // Check if voter already voted + for (uint256 i = 0; i < disputeVotes[disputeId].length; i++) { + require( + disputeVotes[disputeId][i].voter != msg.sender, + "Already voted" + ); + } + + disputeVotes[disputeId].push(Vote({ + voter: msg.sender, + supportsRefund: supportsRefund, + weight: 1, // Equal weight for now, can be extended with token-based voting + timestamp: block.timestamp, + justification: justification + })); + + emit VoteSubmitted(disputeId, msg.sender, supportsRefund, 1); + + // Check if we have enough votes to resolve + _checkVotingResolution(disputeId); + } + + /** + * @dev Check if voting results are sufficient to resolve dispute + */ + function _checkVotingResolution(uint256 disputeId) internal { + DisputeDetails storage dispute = disputes[disputeId]; + Vote[] memory votes = disputeVotes[disputeId]; + + if (votes.length < minVotesForResolution) return; + + uint256 totalWeight = 0; + uint256 refundWeight = 0; + + for (uint256 i = 0; i < votes.length; i++) { + totalWeight += votes[i].weight; + if (votes[i].supportsRefund) { + refundWeight += votes[i].weight; + } + } + + uint256 refundPercentage = (refundWeight * 100) / totalWeight; + + if (refundPercentage >= autoRefundThreshold) { + // Calculate average refund percentage from votes + uint256 totalRefundPercent = 0; + uint256 refundVoteCount = 0; + for (uint256 i = 0; i < votes.length; i++) { + if (votes[i].supportsRefund) { + totalRefundPercent += 100; // Assuming full refund votes, can be extended + refundVoteCount++; + } + } + uint256 avgRefundPercent = refundVoteCount > 0 ? totalRefundPercent / refundVoteCount : 0; + _resolveDispute(disputeId, true, avgRefundPercent, ResolutionType.PendingVote, "Voting resolution"); + } else if (refundPercentage < (100 - autoRefundThreshold)) { + _resolveDispute(disputeId, false, 0, ResolutionType.PendingVote, "Voting resolution"); + } + } + + /** + * @dev Resolve dispute manually (moderator/admin only) + */ + function resolveDisputeManually( + uint256 disputeId, + bool refundApproved, + uint256 refundPercentage + ) external onlyModerator nonReentrant whenNotPaused { + DisputeDetails storage dispute = disputes[disputeId]; + require(dispute.disputeId != 0, "Dispute does not exist"); + require(!dispute.isResolved, "Dispute already resolved"); + require(refundPercentage <= 100, "Invalid refund percentage"); + + _resolveDispute(disputeId, refundApproved, refundPercentage, ResolutionType.Manual, "Manual resolution"); + } + + /** + * @dev Internal function to resolve a dispute + */ + function _resolveDispute( + uint256 disputeId, + bool refundApproved, + uint256 refundPercentage, + ResolutionType resolutionType, + string memory reason + ) internal { + DisputeDetails storage dispute = disputes[disputeId]; + PaymentEscrow.Escrow memory escrow = paymentEscrow.getEscrow(dispute.escrowId); + + dispute.isResolved = true; + dispute.resolvedBy = msg.sender; + dispute.resolvedAt = block.timestamp; + dispute.refundApproved = refundApproved; + dispute.refundPercentage = refundPercentage; + dispute.resolutionType = resolutionType; + + if (refundApproved) { + if (refundPercentage == 100) { + // Full refund via PaymentEscrow + paymentEscrow.resolveDispute( + paymentEscrow.getDisputeByEscrowId(dispute.escrowId).disputeId, + true, + 0, + 0 + ); + } else if (refundPercentage > 0) { + // Partial refund + uint256 refundAmount = (escrow.amount * refundPercentage) / 100; + uint256 releaseAmount = escrow.amount - refundAmount; + paymentEscrow.resolveDispute( + paymentEscrow.getDisputeByEscrowId(dispute.escrowId).disputeId, + true, + refundAmount, + releaseAmount + ); + } + } else { + // No refund - release to payee + paymentEscrow.resolveDispute( + paymentEscrow.getDisputeByEscrowId(dispute.escrowId).disputeId, + false, + 0, + 0 + ); + } + + emit DisputeResolved(disputeId, msg.sender, refundApproved, refundPercentage, resolutionType); + + if (resolutionType == ResolutionType.Automated) { + emit AutomatedResolution(disputeId, refundApproved, refundPercentage, reason); + } + } + + /** + * @dev Get dispute details + */ + function getDispute(uint256 disputeId) external view returns (DisputeDetails memory) { + return disputes[disputeId]; + } + + /** + * @dev Get all evidence for a dispute + */ + function getDisputeEvidence(uint256 disputeId) external view returns (Evidence[] memory) { + return disputeEvidence[disputeId]; + } + + /** + * @dev Get check-in data for a booking + */ + function getCheckInData(uint256 bookingId) external view returns (CheckInData memory) { + return checkInRecords[bookingId]; + } + + /** + * @dev Get votes for a dispute + */ + function getDisputeVotes(uint256 disputeId) external view returns (Vote[] memory) { + return disputeVotes[disputeId]; + } + + /** + * @dev Get dispute ID by escrow ID + */ + function getDisputeByEscrowId(uint256 escrowId) external view returns (DisputeDetails memory) { + return disputes[escrowToDispute[escrowId]]; + } + + /** + * @dev Update configuration parameters + */ + function updateConfiguration( + uint256 _maxResolutionTime, + uint256 _autoRefundThreshold, + uint256 _minVotesForResolution, + uint256 _lateCheckInThreshold, + uint256 _noShowThreshold + ) external onlyOwner { + maxResolutionTime = _maxResolutionTime; + autoRefundThreshold = _autoRefundThreshold; + minVotesForResolution = _minVotesForResolution; + lateCheckInThreshold = _lateCheckInThreshold; + noShowThreshold = _noShowThreshold; + } + + function pause() external onlyOwner { + _pause(); + } + + function unpause() external onlyOwner { + _unpause(); + } +} From 052447b0e1e8a9228fb5e599a299158bd3f635f7 Mon Sep 17 00:00:00 2001 From: "dev.uche" Date: Fri, 12 Dec 2025 05:56:49 +0100 Subject: [PATCH 02/93] fix: add helper methods and fix DisputeResolution integration - Add getDisputeByEscrowId helper to PaymentEscrow - Update IParkingSpot interface with missing Booking fields - Fix DisputeResolution to properly access escrow dispute mappings - Make escrowToDispute mapping public for external contract access --- smartcontracts/contracts/DisputeResolution.sol | 14 ++++++++------ smartcontracts/contracts/PaymentEscrow.sol | 9 +++++++++ .../contracts/interfaces/IParkingSpot.sol | 2 ++ 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/smartcontracts/contracts/DisputeResolution.sol b/smartcontracts/contracts/DisputeResolution.sol index 06c0a6b..ba3f180 100644 --- a/smartcontracts/contracts/DisputeResolution.sol +++ b/smartcontracts/contracts/DisputeResolution.sol @@ -289,9 +289,8 @@ contract DisputeResolution is Ownable, ReentrancyGuard, Pausable { // File dispute in PaymentEscrow first paymentEscrow.fileDispute(escrowId, reason, evidenceHash); - PaymentEscrow.Dispute memory escrowDispute = paymentEscrow.getDispute( - paymentEscrow.disputeCounter() - ); + // Get the dispute ID from escrow mapping + uint256 escrowDisputeId = paymentEscrow.escrowToDispute(escrowId); disputeCounter++; address opposingParty = msg.sender == escrow.payer ? escrow.payee : escrow.payer; @@ -531,11 +530,14 @@ contract DisputeResolution is Ownable, ReentrancyGuard, Pausable { dispute.refundPercentage = refundPercentage; dispute.resolutionType = resolutionType; + // Get the PaymentEscrow dispute ID + uint256 escrowDisputeId = paymentEscrow.escrowToDispute(dispute.escrowId); + if (refundApproved) { if (refundPercentage == 100) { // Full refund via PaymentEscrow paymentEscrow.resolveDispute( - paymentEscrow.getDisputeByEscrowId(dispute.escrowId).disputeId, + escrowDisputeId, true, 0, 0 @@ -545,7 +547,7 @@ contract DisputeResolution is Ownable, ReentrancyGuard, Pausable { uint256 refundAmount = (escrow.amount * refundPercentage) / 100; uint256 releaseAmount = escrow.amount - refundAmount; paymentEscrow.resolveDispute( - paymentEscrow.getDisputeByEscrowId(dispute.escrowId).disputeId, + escrowDisputeId, true, refundAmount, releaseAmount @@ -554,7 +556,7 @@ contract DisputeResolution is Ownable, ReentrancyGuard, Pausable { } else { // No refund - release to payee paymentEscrow.resolveDispute( - paymentEscrow.getDisputeByEscrowId(dispute.escrowId).disputeId, + escrowDisputeId, false, 0, 0 diff --git a/smartcontracts/contracts/PaymentEscrow.sol b/smartcontracts/contracts/PaymentEscrow.sol index ba4c9cf..95efa24 100644 --- a/smartcontracts/contracts/PaymentEscrow.sol +++ b/smartcontracts/contracts/PaymentEscrow.sol @@ -521,6 +521,15 @@ contract PaymentEscrow is Ownable, ReentrancyGuard { return payeeEscrows[payee]; } + /** + * @dev Get dispute by escrow ID + */ + function getDisputeByEscrowId(uint256 escrowId) external view returns (Dispute memory) { + uint256 disputeId = escrowToDispute[escrowId]; + require(disputeId != 0, "No dispute found for escrow"); + return disputes[disputeId]; + } + /** * @dev Update default expiration period (owner only) */ diff --git a/smartcontracts/contracts/interfaces/IParkingSpot.sol b/smartcontracts/contracts/interfaces/IParkingSpot.sol index eab9cb5..b16117f 100644 --- a/smartcontracts/contracts/interfaces/IParkingSpot.sol +++ b/smartcontracts/contracts/interfaces/IParkingSpot.sol @@ -21,8 +21,10 @@ interface IParkingSpot { address user; uint256 startTime; uint256 endTime; + uint256 totalPrice; bool isActive; bool isCancelled; + bool isCompleted; } function getSpot(uint256 spotId) external view returns (Spot memory); From 8100a6673a19bb917336c6202e110697d71bbc26 Mon Sep 17 00:00:00 2001 From: "dev.uche" Date: Fri, 12 Dec 2025 05:57:22 +0100 Subject: [PATCH 03/93] feat: add check-in/check-out timestamp tracking to ParkingSpot - Add checkInTime and checkOutTime fields to Booking struct - Implement recordCheckIn and recordCheckOut functions - Add events for check-in/check-out recording - Enable both user and spot owner to record check-in/out --- smartcontracts/contracts/ParkingSpot.sol | 56 ++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/smartcontracts/contracts/ParkingSpot.sol b/smartcontracts/contracts/ParkingSpot.sol index 217e4a9..506bc22 100644 --- a/smartcontracts/contracts/ParkingSpot.sol +++ b/smartcontracts/contracts/ParkingSpot.sol @@ -58,6 +58,8 @@ contract ParkingSpot is Ownable, ReentrancyGuard { uint256 startTime; // Slot 3 uint256 endTime; // Slot 4 uint256 totalPrice; // Slot 5 + uint256 checkInTime; // Slot 6 + uint256 checkOutTime; // Slot 7 bool isActive; // Packed with user in Slot 2 bool isCancelled; // Packed with user in Slot 2 bool isCompleted; // Packed with user in Slot 2 @@ -109,6 +111,18 @@ contract ParkingSpot is Ownable, ReentrancyGuard { address indexed previousOwner, address indexed newOwner ); + event CheckInRecorded( + uint256 indexed bookingId, + uint256 indexed spotId, + address indexed user, + uint256 checkInTime + ); + event CheckOutRecorded( + uint256 indexed bookingId, + uint256 indexed spotId, + address indexed user, + uint256 checkOutTime + ); constructor() Ownable(msg.sender) {} @@ -223,6 +237,8 @@ contract ParkingSpot is Ownable, ReentrancyGuard { startTime: startTime, endTime: endTime, totalPrice: totalPrice, + checkInTime: 0, + checkOutTime: 0, isActive: true, isCancelled: false, isCompleted: false @@ -412,5 +428,45 @@ contract ParkingSpot is Ownable, ReentrancyGuard { function getRenterBookings(address renter) external view returns (uint256[] memory) { return userBookings[renter]; } + + /** + * @notice Record check-in for a booking (can be called by owner or user) + * @param bookingId The booking ID + */ + function recordCheckIn(uint256 bookingId) external nonReentrant { + Booking storage booking = bookings[bookingId]; + if (booking.bookingId == 0) { + revert SpotDoesNotExist(); + } + require( + msg.sender == booking.user || msg.sender == spots[booking.spotId].owner, + "Not authorized to record check-in" + ); + require(booking.checkInTime == 0, "Check-in already recorded"); + require(!booking.isCancelled, "Cannot check in to cancelled booking"); + + booking.checkInTime = block.timestamp; + emit CheckInRecorded(bookingId, booking.spotId, booking.user, block.timestamp); + } + + /** + * @notice Record check-out for a booking (can be called by owner or user) + * @param bookingId The booking ID + */ + function recordCheckOut(uint256 bookingId) external nonReentrant { + Booking storage booking = bookings[bookingId]; + if (booking.bookingId == 0) { + revert SpotDoesNotExist(); + } + require( + msg.sender == booking.user || msg.sender == spots[booking.spotId].owner, + "Not authorized to record check-out" + ); + require(booking.checkInTime > 0, "Check-in not recorded"); + require(booking.checkOutTime == 0, "Check-out already recorded"); + + booking.checkOutTime = block.timestamp; + emit CheckOutRecorded(bookingId, booking.spotId, booking.user, block.timestamp); + } } From 2ea23dda2470d7af60891759ff1238eac59de405 Mon Sep 17 00:00:00 2001 From: "dev.uche" Date: Fri, 12 Dec 2025 05:57:47 +0100 Subject: [PATCH 04/93] feat: add evidence submission utilities and IPFS integration - Create dispute configuration file with thresholds and settings - Implement evidence handler utilities for frontend - Add IPFS upload and validation functions - Support multiple evidence types (image, video, document, timestamps) - Add evidence validation and metadata preparation helpers --- frontend/lib/utils/evidenceHandler.ts | 159 ++++++++++++++++++++++++ smartcontracts/config/dispute-config.js | 41 ++++++ 2 files changed, 200 insertions(+) create mode 100644 frontend/lib/utils/evidenceHandler.ts create mode 100644 smartcontracts/config/dispute-config.js diff --git a/frontend/lib/utils/evidenceHandler.ts b/frontend/lib/utils/evidenceHandler.ts new file mode 100644 index 0000000..c5d1e23 --- /dev/null +++ b/frontend/lib/utils/evidenceHandler.ts @@ -0,0 +1,159 @@ +/** + * Evidence Handler Utilities + * Utilities for handling dispute evidence submission, IPFS uploads, and validation + */ + +export enum EvidenceType { + CheckInTimestamp = 0, + CheckOutTimestamp = 1, + Image = 2, + Video = 3, + Document = 4, + LocationData = 5, + Other = 6 +} + +export interface EvidenceMetadata { + type: EvidenceType; + hash: string; // IPFS hash + description: string; + timestamp: number; + fileUrl?: string; +} + +export interface DisputeEvidence { + evidenceId: number; + disputeId: number; + submittedBy: string; + evidenceType: EvidenceType; + evidenceHash: string; + timestamp: number; + description: string; +} + +/** + * Convert file to IPFS hash + * This is a placeholder - actual implementation would upload to IPFS + */ +export async function uploadEvidenceToIPFS( + file: File | Blob, + type: EvidenceType +): Promise { + // TODO: Implement actual IPFS upload + // For now, return a mock hash + const formData = new FormData(); + formData.append('file', file); + + try { + // Example using Pinata or other IPFS service + const response = await fetch('/api/ipfs/upload', { + method: 'POST', + body: formData + }); + + if (!response.ok) { + throw new Error('Failed to upload to IPFS'); + } + + const data = await response.json(); + return data.hash; + } catch (error) { + console.error('IPFS upload error:', error); + throw error; + } +} + +/** + * Convert IPFS hash to bytes32 format for smart contract + */ +export function ipfsHashToBytes(hash: string): string { + // Convert IPFS hash (typically base58) to bytes + // This is a simplified version - actual implementation may vary + return '0x' + Buffer.from(hash).toString('hex').slice(0, 64); +} + +/** + * Get IPFS gateway URL from hash + */ +export function getIPFSGatewayURL(hash: string): string { + const gateway = process.env.NEXT_PUBLIC_IPFS_GATEWAY || 'https://ipfs.io/ipfs/'; + return `${gateway}${hash}`; +} + +/** + * Validate evidence before submission + */ +export function validateEvidence( + type: EvidenceType, + file?: File | Blob, + description?: string +): { valid: boolean; error?: string } { + if (!description || description.trim().length === 0) { + return { valid: false, error: 'Evidence description is required' }; + } + + if (type === EvidenceType.Image || type === EvidenceType.Video || type === EvidenceType.Document) { + if (!file) { + return { valid: false, error: 'File is required for this evidence type' }; + } + + // Validate file size (max 10MB) + const maxSize = 10 * 1024 * 1024; + if (file.size > maxSize) { + return { valid: false, error: 'File size exceeds 10MB limit' }; + } + + // Validate image types + if (type === EvidenceType.Image && file.type.startsWith('image/')) { + const allowedTypes = ['image/jpeg', 'image/png', 'image/webp', 'image/gif']; + if (!allowedTypes.includes(file.type)) { + return { valid: false, error: 'Invalid image format. Allowed: JPEG, PNG, WebP, GIF' }; + } + } + + // Validate video types + if (type === EvidenceType.Video && file.type.startsWith('video/')) { + const allowedTypes = ['video/mp4', 'video/webm', 'video/quicktime']; + if (!allowedTypes.includes(file.type)) { + return { valid: false, error: 'Invalid video format. Allowed: MP4, WebM, QuickTime' }; + } + } + } + + return { valid: true }; +} + +/** + * Prepare evidence metadata for submission + */ +export function prepareEvidenceMetadata( + type: EvidenceType, + hash: string, + description: string, + fileUrl?: string +): EvidenceMetadata { + return { + type, + hash, + description, + timestamp: Math.floor(Date.now() / 1000), + fileUrl + }; +} + +/** + * Format evidence type for display + */ +export function formatEvidenceType(type: EvidenceType): string { + const types = { + [EvidenceType.CheckInTimestamp]: 'Check-in Timestamp', + [EvidenceType.CheckOutTimestamp]: 'Check-out Timestamp', + [EvidenceType.Image]: 'Image', + [EvidenceType.Video]: 'Video', + [EvidenceType.Document]: 'Document', + [EvidenceType.LocationData]: 'Location Data', + [EvidenceType.Other]: 'Other' + }; + return types[type] || 'Unknown'; +} + diff --git a/smartcontracts/config/dispute-config.js b/smartcontracts/config/dispute-config.js new file mode 100644 index 0000000..5b85806 --- /dev/null +++ b/smartcontracts/config/dispute-config.js @@ -0,0 +1,41 @@ +/** + * Dispute Resolution Configuration + * Configuration parameters for the dispute resolution system + */ + +module.exports = { + // Time thresholds (in seconds) + maxResolutionTime: 7 * 24 * 60 * 60, // 7 days + lateCheckInThreshold: 30 * 60, // 30 minutes + noShowThreshold: 60 * 60, // 1 hour + + // Voting thresholds + autoRefundThreshold: 80, // 80% of votes needed + minVotesForResolution: 3, // Minimum votes to resolve + + // Refund percentages (0-100) + maxLateCheckInRefund: 50, // Maximum 50% refund for late check-in + maxEarlyCheckOutRefund: 30, // Maximum 30% refund for early check-out + + // Evidence types + evidenceTypes: { + CHECK_IN_TIMESTAMP: 0, + CHECK_OUT_TIMESTAMP: 1, + IMAGE: 2, + VIDEO: 3, + DOCUMENT: 4, + LOCATION_DATA: 5, + OTHER: 6 + }, + + // IPFS configuration + ipfs: { + gateway: "https://ipfs.io/ipfs/", + pinata: { + // These should be set via environment variables + apiKey: process.env.PINATA_API_KEY || "", + secretKey: process.env.PINATA_SECRET_KEY || "" + } + } +}; + From 1c08d3a63dfe106cbdfb3c4fd2550d95e97b163e Mon Sep 17 00:00:00 2001 From: "dev.uche" Date: Fri, 12 Dec 2025 05:58:31 +0100 Subject: [PATCH 05/93] feat: add frontend contract interfaces and hooks for dispute resolution - Create DisputeResolution contract ABI and types - Implement useDisputeResolution hook for dispute operations - Add hooks for reading dispute details, evidence, check-in data, and votes - Support multiple chain configurations (Alfajores and Celo mainnet) --- frontend/lib/contracts/disputeResolution.ts | 85 ++++++++ frontend/lib/hooks/useDisputeResolution.ts | 229 ++++++++++++++++++++ 2 files changed, 314 insertions(+) create mode 100644 frontend/lib/contracts/disputeResolution.ts create mode 100644 frontend/lib/hooks/useDisputeResolution.ts diff --git a/frontend/lib/contracts/disputeResolution.ts b/frontend/lib/contracts/disputeResolution.ts new file mode 100644 index 0000000..bc0ca24 --- /dev/null +++ b/frontend/lib/contracts/disputeResolution.ts @@ -0,0 +1,85 @@ +/** + * DisputeResolution Contract Interface + * ABI and utilities for interacting with the DisputeResolution smart contract + */ + +export const DISPUTE_RESOLUTION_ABI = [ + // Events + "event DisputeFiled(uint256 indexed disputeId, uint256 indexed escrowId, uint256 indexed bookingId, address filedBy, address opposingParty, string reason, uint8 resolutionType)", + "event EvidenceSubmitted(uint256 indexed evidenceId, uint256 indexed disputeId, address submittedBy, uint8 evidenceType, bytes evidenceHash)", + "event CheckInRecorded(uint256 indexed bookingId, uint256 checkInTime, address verifiedBy)", + "event CheckOutRecorded(uint256 indexed bookingId, uint256 checkOutTime, address verifiedBy)", + "event AutomatedResolution(uint256 indexed disputeId, bool refundApproved, uint256 refundPercentage, string reason)", + "event VoteSubmitted(uint256 indexed disputeId, address indexed voter, bool supportsRefund, uint256 weight)", + "event DisputeResolved(uint256 indexed disputeId, address resolvedBy, bool refundApproved, uint256 refundPercentage, uint8 resolutionType)", + + // Functions + "function fileDispute(uint256 escrowId, uint256 bookingId, string memory reason, bytes memory evidenceHash, uint8 evidenceType) external returns (uint256)", + "function submitEvidence(uint256 disputeId, uint8 evidenceType, bytes memory evidenceHash, string memory description) external", + "function recordCheckIn(uint256 bookingId, uint256 checkInTime) external", + "function recordCheckOut(uint256 bookingId, uint256 checkOutTime) external", + "function submitVote(uint256 disputeId, bool supportsRefund, uint256 refundPercentage, string memory justification) external", + "function resolveDisputeManually(uint256 disputeId, bool refundApproved, uint256 refundPercentage) external", + "function getDispute(uint256 disputeId) external view returns (tuple(uint256 disputeId, uint256 escrowId, uint256 bookingId, address filedBy, address opposingParty, string reason, bytes primaryEvidenceHash, uint256 filedAt, uint8 resolutionType, bool isResolved, address resolvedBy, uint256 resolvedAt, bool refundApproved, uint256 refundPercentage))", + "function getDisputeEvidence(uint256 disputeId) external view returns (tuple(uint256 evidenceId, uint256 disputeId, address submittedBy, uint8 evidenceType, bytes evidenceHash, uint256 timestamp, string description)[])", + "function getCheckInData(uint256 bookingId) external view returns (tuple(uint256 bookingId, uint256 checkInTime, uint256 checkOutTime, bool checkedIn, bool checkedOut, address verifiedBy))", + "function getDisputeVotes(uint256 disputeId) external view returns (tuple(address voter, bool supportsRefund, uint256 weight, uint256 timestamp, string justification)[])", + "function getDisputeByEscrowId(uint256 escrowId) external view returns (tuple(uint256 disputeId, uint256 escrowId, uint256 bookingId, address filedBy, address opposingParty, string reason, bytes primaryEvidenceHash, uint256 filedAt, uint8 resolutionType, bool isResolved, address resolvedBy, uint256 resolvedAt, bool refundApproved, uint256 refundPercentage))" +] as const; + +// Contract addresses (set these after deployment) +export const DISPUTE_RESOLUTION_ADDRESSES = { + alfajores: process.env.NEXT_PUBLIC_DISPUTE_RESOLUTION_ADDRESS_ALFAJORES || "", + celo: process.env.NEXT_PUBLIC_DISPUTE_RESOLUTION_ADDRESS_CELO || "" +}; + +export enum ResolutionType { + Automated = 0, + PendingVote = 1, + Manual = 2 +} + +export interface DisputeDetails { + disputeId: bigint; + escrowId: bigint; + bookingId: bigint; + filedBy: string; + opposingParty: string; + reason: string; + primaryEvidenceHash: string; + filedAt: bigint; + resolutionType: ResolutionType; + isResolved: boolean; + resolvedBy: string; + resolvedAt: bigint; + refundApproved: boolean; + refundPercentage: bigint; +} + +export interface Evidence { + evidenceId: bigint; + disputeId: bigint; + submittedBy: string; + evidenceType: number; + evidenceHash: string; + timestamp: bigint; + description: string; +} + +export interface CheckInData { + bookingId: bigint; + checkInTime: bigint; + checkOutTime: bigint; + checkedIn: boolean; + checkedOut: boolean; + verifiedBy: string; +} + +export interface Vote { + voter: string; + supportsRefund: boolean; + weight: bigint; + timestamp: bigint; + justification: string; +} + diff --git a/frontend/lib/hooks/useDisputeResolution.ts b/frontend/lib/hooks/useDisputeResolution.ts new file mode 100644 index 0000000..f4f8b61 --- /dev/null +++ b/frontend/lib/hooks/useDisputeResolution.ts @@ -0,0 +1,229 @@ +/** + * useDisputeResolution Hook + * React hook for interacting with the DisputeResolution smart contract + */ + +import { useAccount, useWriteContract, useReadContract, useWaitForTransactionReceipt } from 'wagmi'; +import { DISPUTE_RESOLUTION_ABI, DISPUTE_RESOLUTION_ADDRESSES, type DisputeDetails, type Evidence, type CheckInData, type Vote, ResolutionType } from '@/lib/contracts/disputeResolution'; +import { parseEther, formatEther } from 'viem'; +import { useChainId } from 'wagmi'; + +export function useDisputeResolution() { + const { address } = useAccount(); + const chainId = useChainId(); + const { writeContract, data: hash, isPending, error } = useWriteContract(); + + // Get contract address based on chain + const contractAddress = chainId === 44787 + ? DISPUTE_RESOLUTION_ADDRESSES.alfajores as `0x${string}` + : DISPUTE_RESOLUTION_ADDRESSES.celo as `0x${string}`; + + /** + * File a new dispute + */ + const fileDispute = async ( + escrowId: bigint, + bookingId: bigint, + reason: string, + evidenceHash: `0x${string}`, + evidenceType: number + ) => { + return writeContract({ + address: contractAddress, + abi: DISPUTE_RESOLUTION_ABI, + functionName: 'fileDispute', + args: [escrowId, bookingId, reason, evidenceHash, evidenceType] + }); + }; + + /** + * Submit additional evidence to a dispute + */ + const submitEvidence = async ( + disputeId: bigint, + evidenceType: number, + evidenceHash: `0x${string}`, + description: string + ) => { + return writeContract({ + address: contractAddress, + abi: DISPUTE_RESOLUTION_ABI, + functionName: 'submitEvidence', + args: [disputeId, evidenceType, evidenceHash, description] + }); + }; + + /** + * Record check-in for a booking + */ + const recordCheckIn = async (bookingId: bigint, checkInTime: bigint = BigInt(Math.floor(Date.now() / 1000))) => { + return writeContract({ + address: contractAddress, + abi: DISPUTE_RESOLUTION_ABI, + functionName: 'recordCheckIn', + args: [bookingId, checkInTime] + }); + }; + + /** + * Record check-out for a booking + */ + const recordCheckOut = async (bookingId: bigint, checkOutTime: bigint = BigInt(Math.floor(Date.now() / 1000))) => { + return writeContract({ + address: contractAddress, + abi: DISPUTE_RESOLUTION_ABI, + functionName: 'recordCheckOut', + args: [bookingId, checkOutTime] + }); + }; + + /** + * Submit a vote on a dispute (authorized voters only) + */ + const submitVote = async ( + disputeId: bigint, + supportsRefund: boolean, + refundPercentage: bigint, + justification: string + ) => { + return writeContract({ + address: contractAddress, + abi: DISPUTE_RESOLUTION_ABI, + functionName: 'submitVote', + args: [disputeId, supportsRefund, refundPercentage, justification] + }); + }; + + /** + * Resolve dispute manually (moderator only) + */ + const resolveDisputeManually = async ( + disputeId: bigint, + refundApproved: boolean, + refundPercentage: bigint + ) => { + return writeContract({ + address: contractAddress, + abi: DISPUTE_RESOLUTION_ABI, + functionName: 'resolveDisputeManually', + args: [disputeId, refundApproved, refundPercentage] + }); + }; + + return { + fileDispute, + submitEvidence, + recordCheckIn, + recordCheckOut, + submitVote, + resolveDisputeManually, + hash, + isPending, + error + }; +} + +/** + * Hook to read dispute details + */ +export function useDisputeDetails(disputeId: bigint | undefined) { + const chainId = useChainId(); + const contractAddress = chainId === 44787 + ? DISPUTE_RESOLUTION_ADDRESSES.alfajores as `0x${string}` + : DISPUTE_RESOLUTION_ADDRESSES.celo as `0x${string}`; + + const { data, isLoading, error } = useReadContract({ + address: contractAddress, + abi: DISPUTE_RESOLUTION_ABI, + functionName: 'getDispute', + args: disputeId ? [disputeId] : undefined, + query: { + enabled: !!disputeId + } + }); + + return { + dispute: data as DisputeDetails | undefined, + isLoading, + error + }; +} + +/** + * Hook to read dispute evidence + */ +export function useDisputeEvidence(disputeId: bigint | undefined) { + const chainId = useChainId(); + const contractAddress = chainId === 44787 + ? DISPUTE_RESOLUTION_ADDRESSES.alfajores as `0x${string}` + : DISPUTE_RESOLUTION_ADDRESSES.celo as `0x${string}`; + + const { data, isLoading, error } = useReadContract({ + address: contractAddress, + abi: DISPUTE_RESOLUTION_ABI, + functionName: 'getDisputeEvidence', + args: disputeId ? [disputeId] : undefined, + query: { + enabled: !!disputeId + } + }); + + return { + evidence: data as Evidence[] | undefined, + isLoading, + error + }; +} + +/** + * Hook to read check-in data + */ +export function useCheckInData(bookingId: bigint | undefined) { + const chainId = useChainId(); + const contractAddress = chainId === 44787 + ? DISPUTE_RESOLUTION_ADDRESSES.alfajores as `0x${string}` + : DISPUTE_RESOLUTION_ADDRESSES.celo as `0x${string}`; + + const { data, isLoading, error } = useReadContract({ + address: contractAddress, + abi: DISPUTE_RESOLUTION_ABI, + functionName: 'getCheckInData', + args: bookingId ? [bookingId] : undefined, + query: { + enabled: !!bookingId + } + }); + + return { + checkInData: data as CheckInData | undefined, + isLoading, + error + }; +} + +/** + * Hook to read dispute votes + */ +export function useDisputeVotes(disputeId: bigint | undefined) { + const chainId = useChainId(); + const contractAddress = chainId === 44787 + ? DISPUTE_RESOLUTION_ADDRESSES.alfajores as `0x${string}` + : DISPUTE_RESOLUTION_ADDRESSES.celo as `0x${string}`; + + const { data, isLoading, error } = useReadContract({ + address: contractAddress, + abi: DISPUTE_RESOLUTION_ABI, + functionName: 'getDisputeVotes', + args: disputeId ? [disputeId] : undefined, + query: { + enabled: !!disputeId + } + }); + + return { + votes: data as Vote[] | undefined, + isLoading, + error + }; +} + From 9531aa404f870b2d2f6a66a5435cf91a66f5bd8a Mon Sep 17 00:00:00 2001 From: "dev.uche" Date: Fri, 12 Dec 2025 05:59:15 +0100 Subject: [PATCH 06/93] feat: create dispute filing form and dispute card components - Implement FileDisputeForm with evidence upload support - Add DisputeCard component for displaying dispute information - Support multiple evidence types and file uploads - Integrate IPFS evidence upload functionality - Add form validation and error handling --- frontend/components/disputes/DisputeCard.tsx | 86 ++++++++ .../components/disputes/FileDisputeForm.tsx | 200 ++++++++++++++++++ 2 files changed, 286 insertions(+) create mode 100644 frontend/components/disputes/DisputeCard.tsx create mode 100644 frontend/components/disputes/FileDisputeForm.tsx diff --git a/frontend/components/disputes/DisputeCard.tsx b/frontend/components/disputes/DisputeCard.tsx new file mode 100644 index 0000000..25f1f15 --- /dev/null +++ b/frontend/components/disputes/DisputeCard.tsx @@ -0,0 +1,86 @@ +'use client'; + +import { DisputeDetails, ResolutionType } from '@/lib/contracts/disputeResolution'; +import { formatEvidenceType } from '@/lib/utils/evidenceHandler'; +import { formatDistanceToNow } from 'date-fns'; + +interface DisputeCardProps { + dispute: DisputeDetails; + onClick?: () => void; +} + +export default function DisputeCard({ dispute, onClick }: DisputeCardProps) { + const formatResolutionType = (type: ResolutionType) => { + switch (type) { + case ResolutionType.Automated: + return 'Automated'; + case ResolutionType.PendingVote: + return 'Pending Vote'; + case ResolutionType.Manual: + return 'Manual Review'; + default: + return 'Unknown'; + } + }; + + const getStatusColor = () => { + if (dispute.isResolved) { + return dispute.refundApproved ? 'bg-green-100 text-green-800' : 'bg-gray-100 text-gray-800'; + } + return 'bg-yellow-100 text-yellow-800'; + }; + + const getStatusText = () => { + if (dispute.isResolved) { + return dispute.refundApproved + ? `Resolved - ${Number(dispute.refundPercentage)}% Refund Approved` + : 'Resolved - Refund Denied'; + } + return formatResolutionType(dispute.resolutionType); + }; + + return ( +
+
+
+

Dispute #{dispute.disputeId.toString()}

+

+ Booking #{dispute.bookingId.toString()} • Escrow #{dispute.escrowId.toString()} +

+
+ + {getStatusText()} + +
+ +
+

{dispute.reason}

+
+ +
+
+

+ Filed by: {dispute.filedBy.slice(0, 6)}...{dispute.filedBy.slice(-4)} +

+

+ Filed {formatDistanceToNow(new Date(Number(dispute.filedAt) * 1000), { addSuffix: true })} +

+
+ {dispute.isResolved && dispute.resolvedAt > 0n && ( +
+

Resolved

+

+ {formatDistanceToNow(new Date(Number(dispute.resolvedAt) * 1000), { addSuffix: true })} +

+
+ )} +
+
+ ); +} + diff --git a/frontend/components/disputes/FileDisputeForm.tsx b/frontend/components/disputes/FileDisputeForm.tsx new file mode 100644 index 0000000..53f19a0 --- /dev/null +++ b/frontend/components/disputes/FileDisputeForm.tsx @@ -0,0 +1,200 @@ +'use client'; + +import { useState } from 'react'; +import { useAccount } from 'wagmi'; +import { useDisputeResolution } from '@/lib/hooks/useDisputeResolution'; +import { EvidenceType, uploadEvidenceToIPFS, ipfsHashToBytes, validateEvidence, formatEvidenceType } from '@/lib/utils/evidenceHandler'; +import { useWaitForTransactionReceipt } from 'wagmi'; + +interface FileDisputeFormProps { + escrowId: bigint; + bookingId: bigint; + onSuccess?: (disputeId: bigint) => void; + onCancel?: () => void; +} + +export default function FileDisputeForm({ escrowId, bookingId, onSuccess, onCancel }: FileDisputeFormProps) { + const { address } = useAccount(); + const { fileDispute, hash, isPending } = useDisputeResolution(); + const [reason, setReason] = useState(''); + const [evidenceType, setEvidenceType] = useState(EvidenceType.Other); + const [evidenceFile, setEvidenceFile] = useState(null); + const [evidenceDescription, setEvidenceDescription] = useState(''); + const [uploading, setUploading] = useState(false); + const [error, setError] = useState(null); + + const { isLoading: isConfirming, isSuccess } = useWaitForTransactionReceipt({ + hash, + }); + + const handleFileChange = (e: React.ChangeEvent) => { + if (e.target.files && e.target.files[0]) { + const file = e.target.files[0]; + const validation = validateEvidence(evidenceType, file, evidenceDescription); + if (!validation.valid) { + setError(validation.error || 'Invalid evidence'); + return; + } + setEvidenceFile(file); + setError(null); + } + }; + + const handleSubmit = async (e: React.FormEvent) => { + e.preventDefault(); + setError(null); + + if (!address) { + setError('Please connect your wallet'); + return; + } + + if (!reason.trim()) { + setError('Please provide a reason for the dispute'); + return; + } + + try { + let evidenceHash: `0x${string}` = '0x0000000000000000000000000000000000000000000000000000000000000000' as `0x${string}`; + + // Upload evidence if file provided + if (evidenceFile) { + setUploading(true); + const ipfsHash = await uploadEvidenceToIPFS(evidenceFile, evidenceType); + evidenceHash = ipfsHashToBytes(ipfsHash) as `0x${string}`; + setUploading(false); + } else if (evidenceType === EvidenceType.CheckInTimestamp || evidenceType === EvidenceType.CheckOutTimestamp) { + // For timestamp evidence, use current timestamp + evidenceHash = '0x' + BigInt(Math.floor(Date.now() / 1000)).toString(16).padStart(64, '0') as `0x${string}`; + } + + await fileDispute(escrowId, bookingId, reason, evidenceHash, evidenceType); + } catch (err: any) { + setError(err.message || 'Failed to file dispute'); + setUploading(false); + } + }; + + if (isSuccess) { + return ( +
+

Dispute Filed Successfully

+

Your dispute has been filed and is being reviewed.

+ {onSuccess && } +
+ ); + } + + return ( +
+

File a Dispute

+ + {error && ( +
+

{error}

+
+ )} + +
+ + + `:(0,n.dy)` + + Type or + + + Paste + + address + + + `}async focusInput(){this.instructionElementRef.value&&(this.instructionHidden=!0,await this.toggleInstructionFocus(!1),this.instructionElementRef.value.style.pointerEvents="none",this.inputElementRef.value?.focus(),this.inputElementRef.value&&(this.inputElementRef.value.selectionStart=this.inputElementRef.value.selectionEnd=this.inputElementRef.value.value.length))}async focusInstruction(){this.instructionElementRef.value&&(this.instructionHidden=!1,await this.toggleInstructionFocus(!0),this.instructionElementRef.value.style.pointerEvents="auto",this.inputElementRef.value?.blur())}async toggleInstructionFocus(e){this.instructionElementRef.value&&await this.instructionElementRef.value.animate([{opacity:e?0:1},{opacity:e?1:0}],{duration:100,easing:"ease",fill:"forwards"}).finished}onBoxClick(){this.value||this.instructionHidden||this.focusInput()}onBlur(){this.value||!this.instructionHidden||this.pasting||this.focusInstruction()}checkHidden(){this.instructionHidden&&this.focusInput()}async onPasteClick(){this.pasting=!0;let e=await navigator.clipboard.readText();o.S.setReceiverAddress(e),this.focusInput()}onInputChange(e){let t=e.target;this.pasting=!1,this.value=e.target?.value,t.value&&!this.instructionHidden&&this.focusInput(),o.S.setLoading(!0),this.onDebouncedSearch(t.value)}setReceiverAddress(e){o.S.setReceiverAddress(e),o.S.setReceiverProfileName(void 0),o.S.setReceiverProfileImageUrl(void 0),o.S.setLoading(!1)}};v.styles=b,y([(0,r.Cb)()],v.prototype,"value",void 0),y([(0,r.Cb)({type:Boolean})],v.prototype,"readOnly",void 0),y([(0,r.SB)()],v.prototype,"instructionHidden",void 0),y([(0,r.SB)()],v.prototype,"pasting",void 0),v=y([(0,g.Mo)("w3m-input-address")],v);var x=i(26898);i(29041),i(2427),i(97241);let k=(0,g.iv)` + :host { + width: 100%; + height: 100px; + border-radius: ${({borderRadius:e})=>e["5"]}; + border: 1px solid ${({tokens:e})=>e.theme.foregroundPrimary}; + background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; + transition: background-color ${({durations:e})=>e.lg} + ${({easings:e})=>e["ease-out-power-1"]}; + will-change: background-color; + transition: all ${({easings:e})=>e["ease-out-power-1"]} + ${({durations:e})=>e.lg}; + } + + :host(:hover) { + background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; + } + + wui-flex { + width: 100%; + height: fit-content; + } + + wui-button { + width: 100%; + display: flex; + justify-content: flex-end; + } + + wui-input-amount { + mask-image: linear-gradient( + 270deg, + transparent 0px, + transparent 8px, + black 24px, + black 25px, + black 32px, + black 100% + ); + } + + .totalValue { + width: 100%; + } +`;var $=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let S=class extends n.oi{constructor(){super(...arguments),this.readOnly=!1,this.isInsufficientBalance=!1}render(){let e=this.readOnly||!this.token;return(0,n.dy)` + + + ${this.buttonTemplate()} + + ${this.bottomTemplate()} + `}buttonTemplate(){return this.token?(0,n.dy)` + `:(0,n.dy)`Select token`}handleSelectButtonClick(){this.readOnly||a.RouterController.push("WalletSendSelectToken")}sendValueTemplate(){if(!this.readOnly&&this.token&&this.sendTokenAmount){let e=this.token.price*this.sendTokenAmount;return(0,n.dy)`${e?`$${x.C.formatNumberToLocalString(e,2)}`:"Incorrect value"}`}return null}maxAmountTemplate(){return this.token?(0,n.dy)` + ${g.Hg.roundNumber(Number(this.token.quantity.numeric),6,5)} + `:null}actionTemplate(){return this.token?(0,n.dy)`Max`:null}bottomTemplate(){return this.readOnly?null:(0,n.dy)` + ${this.sendValueTemplate()} + + ${this.maxAmountTemplate()} ${this.actionTemplate()} + + `}onInputChange(e){o.S.setTokenAmount(e.detail)}onMaxClick(){if(this.token){let e=x.C.bigNumber(this.token.quantity.numeric);o.S.setTokenAmount(Number(e.toFixed(20)))}}};S.styles=k,$([(0,r.Cb)({type:Object})],S.prototype,"token",void 0),$([(0,r.Cb)({type:Boolean})],S.prototype,"readOnly",void 0),$([(0,r.Cb)({type:Number})],S.prototype,"sendTokenAmount",void 0),$([(0,r.Cb)({type:Boolean})],S.prototype,"isInsufficientBalance",void 0),S=$([(0,g.Mo)("w3m-input-token")],S);let C=(0,g.iv)` + :host { + display: block; + } + + wui-flex { + position: relative; + } + + wui-icon-box { + width: 32px; + height: 32px; + border-radius: ${({borderRadius:e})=>e["10"]} !important; + border: 4px solid ${({tokens:e})=>e.theme.backgroundPrimary}; + background: ${({tokens:e})=>e.theme.foregroundPrimary}; + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + z-index: 3; + } + + wui-button { + --local-border-radius: ${({borderRadius:e})=>e["4"]} !important; + } + + .inputContainer { + height: fit-content; + } +`;var R=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let T={INSUFFICIENT_FUNDS:"Insufficient Funds",INCORRECT_VALUE:"Incorrect Value",INVALID_ADDRESS:"Invalid Address",ADD_ADDRESS:"Add Address",ADD_AMOUNT:"Add Amount",SELECT_TOKEN:"Select Token",PREVIEW_SEND:"Preview Send"},A=class extends n.oi{constructor(){super(),this.unsubscribe=[],this.isTryingToChooseDifferentWallet=!1,this.token=o.S.state.token,this.sendTokenAmount=o.S.state.sendTokenAmount,this.receiverAddress=o.S.state.receiverAddress,this.receiverProfileName=o.S.state.receiverProfileName,this.loading=o.S.state.loading,this.params=a.RouterController.state.data?.send,this.caipAddress=s.R.getAccountData()?.caipAddress,this.message=T.PREVIEW_SEND,this.disconnecting=!1,this.token&&!this.params&&(this.fetchBalances(),this.fetchNetworkPrice());let e=s.R.subscribeKey("activeCaipAddress",t=>{!t&&this.isTryingToChooseDifferentWallet&&(this.isTryingToChooseDifferentWallet=!1,l.I.open({view:"Connect",data:{redirectView:"WalletSend"}}).catch(()=>null),e())});this.unsubscribe.push(s.R.subscribeAccountStateProp("caipAddress",e=>{this.caipAddress=e}),o.S.subscribe(e=>{this.token=e.token,this.sendTokenAmount=e.sendTokenAmount,this.receiverAddress=e.receiverAddress,this.receiverProfileName=e.receiverProfileName,this.loading=e.loading}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}async firstUpdated(){await this.handleSendParameters()}render(){this.getMessage();let e=!!this.params;return(0,n.dy)` + + + + + + ${this.buttonTemplate()} + `}async fetchBalances(){await o.S.fetchTokenBalance(),o.S.fetchNetworkBalance()}async fetchNetworkPrice(){await c.nY.getNetworkTokenPrice()}onButtonClick(){a.RouterController.push("WalletSendPreview",{send:this.params})}onFundWalletClick(){a.RouterController.push("FundWallet",{redirectView:"WalletSend"})}async onConnectDifferentWalletClick(){try{this.isTryingToChooseDifferentWallet=!0,this.disconnecting=!0,await u.ConnectionController.disconnect()}finally{this.disconnecting=!1}}getMessage(){this.message=T.PREVIEW_SEND,this.receiverAddress&&!d.j.isAddress(this.receiverAddress,s.R.state.activeChain)&&(this.message=T.INVALID_ADDRESS),this.receiverAddress||(this.message=T.ADD_ADDRESS),this.sendTokenAmount&&this.token&&this.sendTokenAmount>Number(this.token.quantity.numeric)&&(this.message=T.INSUFFICIENT_FUNDS),this.sendTokenAmount||(this.message=T.ADD_AMOUNT),this.sendTokenAmount&&this.token?.price&&!(this.sendTokenAmount*this.token.price)&&(this.message=T.INCORRECT_VALUE),this.token||(this.message=T.SELECT_TOKEN)}buttonTemplate(){let e=!this.message.startsWith(T.PREVIEW_SEND),t=this.message===T.INSUFFICIENT_FUNDS,i=!!this.params;return t&&!i?(0,n.dy)` + + + Fund Wallet + + + + + + Connect a different wallet + + + `:(0,n.dy)` + + ${this.message} + + `}async handleSendParameters(){if(this.loading=!0,!this.params){this.loading=!1;return}let e=Number(this.params.amount);if(isNaN(e)){h.SnackController.showError("Invalid amount"),this.loading=!1;return}let{namespace:t,chainId:i,assetAddress:n}=this.params;if(!p.bq.SEND_PARAMS_SUPPORTED_CHAINS.includes(t)){h.SnackController.showError(`Chain "${t}" is not supported for send parameters`),this.loading=!1;return}let r=s.R.getCaipNetworkById(i,t);if(!r){h.SnackController.showError(`Network with id "${i}" not found`),this.loading=!1;return}try{let{balance:t,name:i,symbol:a,decimals:s}=await f.Q.fetchERC20Balance({caipAddress:this.caipAddress,assetAddress:n,caipNetwork:r});if(!i||!a||!s||!t){h.SnackController.showError("Token not found");return}o.S.setToken({name:i,symbol:a,chainId:r.id.toString(),address:`${r.chainNamespace}:${r.id}:${n}`,value:0,price:0,quantity:{decimals:s.toString(),numeric:t.toString()},iconUrl:m.f.getTokenImage(a)??""}),o.S.setTokenAmount(e),o.S.setReceiverAddress(this.params.to)}catch(e){console.error("Failed to load token information:",e),h.SnackController.showError("Failed to load token information")}finally{this.loading=!1}}};A.styles=C,R([(0,r.SB)()],A.prototype,"token",void 0),R([(0,r.SB)()],A.prototype,"sendTokenAmount",void 0),R([(0,r.SB)()],A.prototype,"receiverAddress",void 0),R([(0,r.SB)()],A.prototype,"receiverProfileName",void 0),R([(0,r.SB)()],A.prototype,"loading",void 0),R([(0,r.SB)()],A.prototype,"params",void 0),R([(0,r.SB)()],A.prototype,"caipAddress",void 0),R([(0,r.SB)()],A.prototype,"message",void 0),R([(0,r.SB)()],A.prototype,"disconnecting",void 0),A=R([(0,g.Mo)("w3m-wallet-send-view")],A),i(34018),i(29844);let E=(0,g.iv)` + .contentContainer { + height: 440px; + overflow: scroll; + scrollbar-width: none; + } + + .contentContainer::-webkit-scrollbar { + display: none; + } + + wui-icon-box { + width: 40px; + height: 40px; + border-radius: ${({borderRadius:e})=>e["3"]}; + } +`;var P=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let N=class extends n.oi{constructor(){super(),this.unsubscribe=[],this.tokenBalances=o.S.state.tokenBalances,this.search="",this.onDebouncedSearch=d.j.debounce(e=>{this.search=e}),this.fetchBalancesAndNetworkPrice(),this.unsubscribe.push(o.S.subscribe(e=>{this.tokenBalances=e.tokenBalances}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return(0,n.dy)` + + ${this.templateSearchInput()} ${this.templateTokens()} + + `}async fetchBalancesAndNetworkPrice(){this.tokenBalances&&this.tokenBalances?.length!==0||(await this.fetchBalances(),await this.fetchNetworkPrice())}async fetchBalances(){await o.S.fetchTokenBalance(),o.S.fetchNetworkBalance()}async fetchNetworkPrice(){await c.nY.getNetworkTokenPrice()}templateSearchInput(){return(0,n.dy)` + + + + `}templateTokens(){return this.tokens=this.tokenBalances?.filter(e=>e.chainId===s.R.state.activeCaipNetwork?.caipNetworkId),this.search?this.filteredTokens=this.tokenBalances?.filter(e=>e.name.toLowerCase().includes(this.search.toLowerCase())):this.filteredTokens=this.tokens,(0,n.dy)` + + + Your tokens + + + ${this.filteredTokens&&this.filteredTokens.length>0?this.filteredTokens.map(e=>(0,n.dy)``):(0,n.dy)` + + + + No tokens found + + + Your tokens will appear here + + + Buy + `} + + + `}onBuyClick(){a.RouterController.push("OnRampProviders")}onInputChange(e){this.onDebouncedSearch(e.detail)}handleTokenClick(e){o.S.setToken(e),o.S.setTokenAmount(void 0),a.RouterController.goBack()}};N.styles=E,P([(0,r.SB)()],N.prototype,"tokenBalances",void 0),P([(0,r.SB)()],N.prototype,"tokens",void 0),P([(0,r.SB)()],N.prototype,"filteredTokens",void 0),P([(0,r.SB)()],N.prototype,"search",void 0),N=P([(0,g.Mo)("w3m-wallet-send-select-token-view")],N);var I=i(2665),D=i(64895),B=i(36943),z=i(77870);i(35300),i(68865),i(71762),i(69834);var O=i(10820),j=i(18322);i(19820);var V=i(30955);let U=(0,V.iv)` + :host { + height: 32px; + display: flex; + align-items: center; + gap: ${({spacing:e})=>e[1]}; + border-radius: ${({borderRadius:e})=>e[32]}; + background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; + padding: ${({spacing:e})=>e[1]}; + padding-left: ${({spacing:e})=>e[2]}; + } + + wui-avatar, + wui-image { + width: 24px; + height: 24px; + border-radius: ${({borderRadius:e})=>e[16]}; + } + + wui-icon { + border-radius: ${({borderRadius:e})=>e[16]}; + } +`;var W=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let _=class extends n.oi{constructor(){super(...arguments),this.text=""}render(){return(0,n.dy)`${this.text} + ${this.imageTemplate()}`}imageTemplate(){return this.address?(0,n.dy)``:this.imageSrc?(0,n.dy)``:(0,n.dy)``}};_.styles=[O.ET,O.ZM,U],W([(0,r.Cb)({type:String})],_.prototype,"text",void 0),W([(0,r.Cb)({type:String})],_.prototype,"address",void 0),W([(0,r.Cb)({type:String})],_.prototype,"imageSrc",void 0),_=W([(0,j.M)("wui-preview-item")],_);var F=i(83479);let M=(0,V.iv)` + :host { + display: flex; + padding: ${({spacing:e})=>e[4]} ${({spacing:e})=>e[3]}; + width: 100%; + background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; + border-radius: ${({borderRadius:e})=>e[4]}; + } + + wui-image { + width: 20px; + height: 20px; + border-radius: ${({borderRadius:e})=>e[16]}; + } + + wui-icon { + width: 20px; + height: 20px; + } +`;var H=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let L=class extends n.oi{constructor(){super(...arguments),this.imageSrc=void 0,this.textTitle="",this.textValue=void 0}render(){return(0,n.dy)` + + ${this.textTitle} + ${this.templateContent()} + + `}templateContent(){return this.imageSrc?(0,n.dy)``:this.textValue?(0,n.dy)` ${this.textValue} `:(0,n.dy)``}};L.styles=[O.ET,O.ZM,M],H([(0,r.Cb)()],L.prototype,"imageSrc",void 0),H([(0,r.Cb)()],L.prototype,"textTitle",void 0),H([(0,r.Cb)()],L.prototype,"textValue",void 0),L=H([(0,j.M)("wui-list-content")],L);let q=(0,g.iv)` + :host { + display: flex; + width: auto; + flex-direction: column; + gap: ${({spacing:e})=>e["1"]}; + border-radius: ${({borderRadius:e})=>e["5"]}; + background: ${({tokens:e})=>e.theme.foregroundPrimary}; + padding: ${({spacing:e})=>e["3"]} ${({spacing:e})=>e["2"]} + ${({spacing:e})=>e["2"]} ${({spacing:e})=>e["2"]}; + } + + wui-list-content { + width: -webkit-fill-available !important; + } + + wui-text { + padding: 0 ${({spacing:e})=>e["2"]}; + } + + wui-flex { + margin-top: ${({spacing:e})=>e["2"]}; + } + + .network { + cursor: pointer; + transition: background-color ${({durations:e})=>e.lg} + ${({easings:e})=>e["ease-out-power-1"]}; + will-change: background-color; + } + + .network:focus-visible { + border: 1px solid ${({tokens:e})=>e.core.textAccentPrimary}; + background-color: ${({tokens:e})=>e.core.glass010}; + -webkit-box-shadow: 0px 0px 0px 4px ${({tokens:e})=>e.core.foregroundAccent010}; + -moz-box-shadow: 0px 0px 0px 4px ${({tokens:e})=>e.core.foregroundAccent010}; + box-shadow: 0px 0px 0px 4px ${({tokens:e})=>e.core.foregroundAccent010}; + } + + .network:hover { + background-color: ${({tokens:e})=>e.core.glass010}; + } + + .network:active { + background-color: ${({tokens:e})=>e.core.glass010}; + } +`;var Y=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let K=class extends n.oi{constructor(){super(...arguments),this.params=a.RouterController.state.data?.send}render(){return(0,n.dy)` Details + + + + ${this.networkTemplate()} + `}networkTemplate(){return this.caipNetwork?.name?(0,n.dy)` this.onNetworkClick(this.caipNetwork)} + class="network" + textTitle="Network" + imageSrc=${(0,F.o)(m.f.getNetworkImage(this.caipNetwork))} + >`:null}onNetworkClick(e){e&&!this.params&&a.RouterController.push("Networks",{network:e})}};K.styles=q,Y([(0,r.Cb)()],K.prototype,"receiverAddress",void 0),Y([(0,r.Cb)({type:Object})],K.prototype,"caipNetwork",void 0),Y([(0,r.SB)()],K.prototype,"params",void 0),K=Y([(0,g.Mo)("w3m-wallet-send-details")],K);let Z=(0,g.iv)` + wui-avatar, + wui-image { + display: ruby; + width: 32px; + height: 32px; + border-radius: ${({borderRadius:e})=>e["20"]}; + } + + .sendButton { + width: 70%; + --local-width: 100% !important; + --local-border-radius: ${({borderRadius:e})=>e["4"]} !important; + } + + .cancelButton { + width: 30%; + --local-width: 100% !important; + --local-border-radius: ${({borderRadius:e})=>e["4"]} !important; + } +`;var J=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let Q=class extends n.oi{constructor(){super(),this.unsubscribe=[],this.token=o.S.state.token,this.sendTokenAmount=o.S.state.sendTokenAmount,this.receiverAddress=o.S.state.receiverAddress,this.receiverProfileName=o.S.state.receiverProfileName,this.receiverProfileImageUrl=o.S.state.receiverProfileImageUrl,this.caipNetwork=s.R.state.activeCaipNetwork,this.loading=o.S.state.loading,this.params=a.RouterController.state.data?.send,this.unsubscribe.push(o.S.subscribe(e=>{this.token=e.token,this.sendTokenAmount=e.sendTokenAmount,this.receiverAddress=e.receiverAddress,this.receiverProfileName=e.receiverProfileName,this.receiverProfileImageUrl=e.receiverProfileImageUrl,this.loading=e.loading}),s.R.subscribeKey("activeCaipNetwork",e=>this.caipNetwork=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return(0,n.dy)` + + + + Send + ${this.sendValueTemplate()} + + + + + + + + To + + + + + + + + Review transaction carefully + + + + Cancel + + + Send + + + `}sendValueTemplate(){if(!this.params&&this.token&&this.sendTokenAmount){let e=this.token.price*this.sendTokenAmount;return(0,n.dy)`$${e.toFixed(2)}`}return null}async onSendClick(){if(!this.sendTokenAmount||!this.receiverAddress){h.SnackController.showError("Please enter a valid amount and receiver address");return}try{await o.S.sendToken(),this.params?a.RouterController.reset("WalletSendConfirmed"):(h.SnackController.showSuccess("Transaction started"),a.RouterController.replace("Account"))}catch(i){let e="Failed to send transaction. Please try again.",t=i instanceof B.g&&i.originalName===I.jD.PROVIDER_RPC_ERROR_NAME.USER_REJECTED_REQUEST;(s.R.state.activeChain===D.b.CHAIN.SOLANA||t)&&i instanceof Error&&(e=i.message),z.X.sendEvent({type:"track",event:t?"SEND_REJECTED":"SEND_ERROR",properties:o.S.getSdkEventProperties(i)}),h.SnackController.showError(e)}}onCancelClick(){a.RouterController.goBack()}};Q.styles=Z,J([(0,r.SB)()],Q.prototype,"token",void 0),J([(0,r.SB)()],Q.prototype,"sendTokenAmount",void 0),J([(0,r.SB)()],Q.prototype,"receiverAddress",void 0),J([(0,r.SB)()],Q.prototype,"receiverProfileName",void 0),J([(0,r.SB)()],Q.prototype,"receiverProfileImageUrl",void 0),J([(0,r.SB)()],Q.prototype,"caipNetwork",void 0),J([(0,r.SB)()],Q.prototype,"loading",void 0),J([(0,r.SB)()],Q.prototype,"params",void 0),Q=J([(0,g.Mo)("w3m-wallet-send-preview-view")],Q);let X=(0,g.iv)` + .icon-box { + width: 64px; + height: 64px; + border-radius: 16px; + background-color: ${({spacing:e})=>e[16]}; + border: 8px solid ${({tokens:e})=>e.theme.borderPrimary}; + border-radius: ${({borderRadius:e})=>e.round}; + } +`,G=class extends n.oi{constructor(){super(),this.unsubscribe=[],this.unsubscribe.push()}render(){return(0,n.dy)` + + + + + + You successfully sent asset + + + Close + + + `}onCloseClick(){l.I.close()}};G.styles=X,G=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a}([(0,g.Mo)("w3m-send-confirmed-view")],G)},29041:(e,t,i)=>{var n=i(37207),r=i(90670),o=i(96644),a=i(30955),s=i(10820),l=i(6349),c=i(18322);let u=(0,a.iv)` + :host { + position: relative; + display: inline-block; + } + + :host([data-error='true']) > input { + color: ${({tokens:e})=>e.core.textError}; + } + + :host([data-error='false']) > input { + color: ${({tokens:e})=>e.theme.textSecondary}; + } + + input { + background: transparent; + height: auto; + box-sizing: border-box; + color: ${({tokens:e})=>e.theme.textPrimary}; + font-feature-settings: 'case' on; + font-size: ${({textSize:e})=>e.h4}; + caret-color: ${({tokens:e})=>e.core.backgroundAccentPrimary}; + line-height: ${({typography:e})=>e["h4-regular-mono"].lineHeight}; + letter-spacing: ${({typography:e})=>e["h4-regular-mono"].letterSpacing}; + -webkit-appearance: none; + -moz-appearance: textfield; + padding: 0px; + font-family: ${({fontFamily:e})=>e.mono}; + } + + :host([data-width-variant='auto']) input { + width: 100%; + } + + :host([data-width-variant='fit']) input { + width: 1ch; + } + + .wui-input-amount-fit-mirror { + position: absolute; + visibility: hidden; + white-space: pre; + font-size: var(--local-font-size); + line-height: 130%; + letter-spacing: -1.28px; + font-family: ${({fontFamily:e})=>e.mono}; + } + + .wui-input-amount-fit-width { + display: inline-block; + position: relative; + } + + input::-webkit-outer-spin-button, + input::-webkit-inner-spin-button { + -webkit-appearance: none; + margin: 0; + } + + input::placeholder { + color: ${({tokens:e})=>e.theme.textSecondary}; + } +`;var d=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let h=class extends n.oi{constructor(){super(...arguments),this.inputElementRef=(0,o.V)(),this.disabled=!1,this.value="",this.placeholder="0",this.widthVariant="auto",this.maxDecimals=void 0,this.maxIntegers=void 0,this.fontSize="h4",this.error=!1}firstUpdated(){this.resizeInput()}updated(){this.style.setProperty("--local-font-size",a.gR.textSize[this.fontSize]),this.resizeInput()}render(){return(this.dataset.widthVariant=this.widthVariant,this.dataset.error=String(this.error),this.inputElementRef?.value&&this.value&&(this.inputElementRef.value.value=this.value),"auto"===this.widthVariant)?this.inputTemplate():(0,n.dy)` +
+ + ${this.inputTemplate()} +
+ `}inputTemplate(){return(0,n.dy)``}dispatchInputChangeEvent(){this.inputElementRef.value&&(this.inputElementRef.value.value=l.H.maskInput({value:this.inputElementRef.value.value,decimals:this.maxDecimals,integers:this.maxIntegers}),this.dispatchEvent(new CustomEvent("inputChange",{detail:this.inputElementRef.value.value,bubbles:!0,composed:!0})),this.resizeInput())}resizeInput(){if("fit"===this.widthVariant){let e=this.inputElementRef.value;if(e){let t=e.previousElementSibling;t&&(t.textContent=e.value||"0",e.style.width=`${t.offsetWidth}px`)}}}};h.styles=[s.ET,s.ZM,u],d([(0,r.Cb)({type:Boolean})],h.prototype,"disabled",void 0),d([(0,r.Cb)({type:String})],h.prototype,"value",void 0),d([(0,r.Cb)({type:String})],h.prototype,"placeholder",void 0),d([(0,r.Cb)({type:String})],h.prototype,"widthVariant",void 0),d([(0,r.Cb)({type:Number})],h.prototype,"maxDecimals",void 0),d([(0,r.Cb)({type:Number})],h.prototype,"maxIntegers",void 0),d([(0,r.Cb)({type:String})],h.prototype,"fontSize",void 0),d([(0,r.Cb)({type:Boolean})],h.prototype,"error",void 0),h=d([(0,c.M)("wui-input-amount")],h)},97241:(e,t,i)=>{var n=i(37207),r=i(90670);i(35300),i(68865),i(88414),i(71762),i(69834);var o=i(10820),a=i(18322),s=i(30955);let l=(0,s.iv)` + button { + display: block; + display: flex; + align-items: center; + padding: ${({spacing:e})=>e[1]}; + transition: background-color ${({durations:e})=>e.lg} + ${({easings:e})=>e["ease-out-power-2"]}; + will-change: background-color; + background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; + border-radius: ${({borderRadius:e})=>e[32]}; + } + + wui-image { + border-radius: ${({borderRadius:e})=>e[32]}; + } + + wui-text { + padding-left: ${({spacing:e})=>e[1]}; + padding-right: ${({spacing:e})=>e[1]}; + } + + .left-icon-container { + width: 24px; + height: 24px; + justify-content: center; + align-items: center; + } + + .left-image-container { + position: relative; + justify-content: center; + align-items: center; + } + + .chain-image { + position: absolute; + border: 1px solid ${({tokens:e})=>e.theme.foregroundPrimary}; + } + + /* -- Sizes --------------------------------------------------- */ + button[data-size='lg'] { + height: 32px; + } + + button[data-size='md'] { + height: 28px; + } + + button[data-size='sm'] { + height: 24px; + } + + button[data-size='lg'] .token-image { + width: 24px; + height: 24px; + } + + button[data-size='md'] .token-image { + width: 20px; + height: 20px; + } + + button[data-size='sm'] .token-image { + width: 16px; + height: 16px; + } + + button[data-size='lg'] .left-icon-container { + width: 24px; + height: 24px; + } + + button[data-size='md'] .left-icon-container { + width: 20px; + height: 20px; + } + + button[data-size='sm'] .left-icon-container { + width: 16px; + height: 16px; + } + + button[data-size='lg'] .chain-image { + width: 12px; + height: 12px; + bottom: 2px; + right: -4px; + } + + button[data-size='md'] .chain-image { + width: 10px; + height: 10px; + bottom: 2px; + right: -4px; + } + + button[data-size='sm'] .chain-image { + width: 8px; + height: 8px; + bottom: 2px; + right: -3px; + } + + /* -- Focus states --------------------------------------------------- */ + button:focus-visible:enabled { + background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; + box-shadow: 0 0 0 4px ${({tokens:e})=>e.core.foregroundAccent040}; + } + + /* -- Hover & Active states ----------------------------------------------------------- */ + @media (hover: hover) { + button:hover:enabled, + button:active:enabled { + background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; + } + } + + /* -- Disabled states --------------------------------------------------- */ + button:disabled { + background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; + opacity: 0.5; + } +`;var c=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let u={lg:"lg-regular",md:"lg-regular",sm:"md-regular"},d={lg:"lg",md:"md",sm:"sm"},h=class extends n.oi{constructor(){super(...arguments),this.size="md",this.disabled=!1,this.text="",this.loading=!1}render(){return this.loading?(0,n.dy)` + + + `:(0,n.dy)` + + `}imageTemplate(){if(this.imageSrc&&this.chainImageSrc)return(0,n.dy)` + + + `;if(this.imageSrc)return(0,n.dy)``;let e=d[this.size];return(0,n.dy)` + + `}textTemplate(){let e=u[this.size];return(0,n.dy)`${this.text}`}};h.styles=[o.ET,o.ZM,l],c([(0,r.Cb)()],h.prototype,"size",void 0),c([(0,r.Cb)()],h.prototype,"imageSrc",void 0),c([(0,r.Cb)()],h.prototype,"chainImageSrc",void 0),c([(0,r.Cb)({type:Boolean})],h.prototype,"disabled",void 0),c([(0,r.Cb)()],h.prototype,"text",void 0),c([(0,r.Cb)({type:Boolean})],h.prototype,"loading",void 0),h=c([(0,a.M)("wui-token-button")],h)}}; \ No newline at end of file diff --git a/frontend/.next/server/chunks/6809.js b/frontend/.next/server/chunks/6809.js new file mode 100644 index 0000000..4abc48c --- /dev/null +++ b/frontend/.next/server/chunks/6809.js @@ -0,0 +1 @@ +"use strict";exports.id=6809,exports.ids=[6809],exports.modules={6809:(t,e,r)=>{r.d(e,{secp256k1:()=>tA});var n=r(43275),i=r(69966);class o extends i.kb{constructor(t,e){super(),this.finished=!1,this.destroyed=!1,(0,i.z3)(t);let r=(0,i.O0)(e);if(this.iHash=t.create(),"function"!=typeof this.iHash.update)throw Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let n=this.blockLen,o=new Uint8Array(n);o.set(r.length>n?t.create().update(r).digest():r);for(let t=0;tnew o(t,e).update(r).digest();l.create=(t,e)=>new o(t,e);let f=BigInt(0),s=BigInt(1);function a(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&"Uint8Array"===t.constructor.name}function u(t){if(!a(t))throw Error("Uint8Array expected")}function d(t,e){if("boolean"!=typeof e)throw Error(t+" boolean expected, got "+e)}function h(t){let e=t.toString(16);return 1&e.length?"0"+e:e}function c(t){if("string"!=typeof t)throw Error("hex string expected, got "+typeof t);return""===t?f:BigInt("0x"+t)}let g="function"==typeof Uint8Array.from([]).toHex&&"function"==typeof Uint8Array.fromHex,p=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function y(t){if(u(t),g)return t.toHex();let e="";for(let r=0;r=m._0&&t<=m._9?t-m._0:t>=m.A&&t<=m.F?t-(m.A-10):t>=m.a&&t<=m.f?t-(m.a-10):void 0}function E(t){if("string"!=typeof t)throw Error("hex string expected, got "+typeof t);if(g)return Uint8Array.fromHex(t);let e=t.length,r=e/2;if(e%2)throw Error("hex string expected, got unpadded hex of length "+e);let n=new Uint8Array(r);for(let e=0,i=0;e"bigint"==typeof t&&f<=t;function I(t,e,r){return O(t)&&O(e)&&O(r)&&e<=t&&t(s<new Uint8Array(t),H=t=>Uint8Array.from(t),z={bigint:t=>"bigint"==typeof t,function:t=>"function"==typeof t,boolean:t=>"boolean"==typeof t,string:t=>"string"==typeof t,stringOrUint8Array:t=>"string"==typeof t||a(t),isSafeInteger:t=>Number.isSafeInteger(t),array:t=>Array.isArray(t),field:(t,e)=>e.Fp.isValid(t),hash:t=>"function"==typeof t&&Number.isSafeInteger(t.outputLen)};function U(t,e,r={}){let n=(e,r,n)=>{let i=z[r];if("function"!=typeof i)throw Error("invalid validator function");let o=t[e];if((!n||void 0!==o)&&!i(o,t))throw Error("param "+String(e)+" is invalid. Expected "+r+", got "+o)};for(let[t,r]of Object.entries(e))n(t,r,!1);for(let[t,e]of Object.entries(r))n(t,e,!0);return t}function P(t){let e=new WeakMap;return(r,...n)=>{let i=e.get(r);if(void 0!==i)return i;let o=t(r,...n);return e.set(r,o),o}}let Z=BigInt(0),F=BigInt(1),L=BigInt(2),C=BigInt(3),k=BigInt(4),T=BigInt(5),V=BigInt(8);function _(t,e){let r=t%e;return r>=Z?r:e+r}function j(t,e,r){let n=t;for(;e-- >Z;)n*=n,n%=r;return n}function D(t,e){if(t===Z)throw Error("invert: expected non-zero number");if(e<=Z)throw Error("invert: expected positive modulus, got "+e);let r=_(t,e),n=e,i=Z,o=F,l=F,f=Z;for(;r!==Z;){let t=n/r,e=n%r,s=i-l*t,a=o-f*t;n=r,r=e,i=l,o=f,l=s,f=a}if(n!==F)throw Error("invert: does not exist");return _(i,e)}function K(t,e){let r=(t.ORDER+F)/k,n=t.pow(e,r);if(!t.eql(t.sqr(n),e))throw Error("Cannot find square root");return n}function Y(t,e){let r=(t.ORDER-T)/V,n=t.mul(e,L),i=t.pow(n,r),o=t.mul(e,i),l=t.mul(t.mul(o,L),i),f=t.mul(o,t.sub(l,t.ONE));if(!t.eql(t.sqr(f),e))throw Error("Cannot find square root");return f}let M=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function W(t,e,r=!1){let n=Array(e.length).fill(r?t.ZERO:void 0),i=e.reduce((e,r,i)=>t.is0(r)?e:(n[i]=e,t.mul(e,r)),t.ONE),o=t.inv(i);return e.reduceRight((e,r,i)=>t.is0(r)?e:(n[i]=t.mul(e,n[i]),t.mul(e,r)),o),n}function G(t,e){let r=(t.ORDER-F)/L,n=t.pow(e,r),i=t.eql(n,t.ONE),o=t.eql(n,t.ZERO),l=t.eql(n,t.neg(t.ONE));if(!i&&!o&&!l)throw Error("invalid Legendre symbol result");return i?1:o?0:-1}function $(t,e){void 0!==e&&(0,i.k8)(e);let r=void 0!==e?e:t.toString(2).length;return{nBitLength:r,nByteLength:Math.ceil(r/8)}}function J(t,e,r=!1,n={}){let i;if(t<=Z)throw Error("invalid field: expected ORDER > 0, got "+t);let{nBitLength:o,nByteLength:l}=$(t,e);if(l>2048)throw Error("invalid field: expected ORDER of <= 2048 bytes");let f=Object.freeze({ORDER:t,isLE:r,BITS:o,BYTES:l,MASK:q(o),ZERO:Z,ONE:F,create:e=>_(e,t),isValid:e=>{if("bigint"!=typeof e)throw Error("invalid field element: expected bigint, got "+typeof e);return Z<=e&&et===Z,isOdd:t=>(t&F)===F,neg:e=>_(-e,t),eql:(t,e)=>t===e,sqr:e=>_(e*e,t),add:(e,r)=>_(e+r,t),sub:(e,r)=>_(e-r,t),mul:(e,r)=>_(e*r,t),pow:(t,e)=>(function(t,e,r){if(rZ;)r&F&&(n=t.mul(n,i)),i=t.sqr(i),r>>=F;return n})(f,t,e),div:(e,r)=>_(e*D(r,t),t),sqrN:t=>t*t,addN:(t,e)=>t+e,subN:(t,e)=>t-e,mulN:(t,e)=>t*e,inv:e=>D(e,t),sqrt:n.sqrt||(e=>(!i&&(i=t%k===C?K:t%V===T?Y:function(t){if(t1e3)throw Error("Cannot find square root: probably non-prime P");if(1===r)return K;let o=i.pow(n,e),l=(e+F)/L;return function(t,n){if(t.is0(n))return n;if(1!==G(t,n))throw Error("Cannot find square root");let i=r,f=t.mul(t.ONE,o),s=t.pow(n,e),a=t.pow(n,l);for(;!t.eql(s,t.ONE);){if(t.is0(s))return t.ZERO;let e=1,r=t.sqr(s);for(;!t.eql(r,t.ONE);)if(e++,r=t.sqr(r),e===i)throw Error("Cannot find square root");let n=F<r?x(t,l):B(t,l),fromBytes:t=>{if(t.length!==l)throw Error("Field.fromBytes: expected "+l+" bytes, got "+t.length);return r?v(t):b(t)},invertBatch:t=>W(f,t),cmov:(t,e,r)=>r?e:t});return Object.freeze(f)}function Q(t){if("bigint"!=typeof t)throw Error("field order must be bigint");return Math.ceil(t.toString(2).length/8)}function X(t){let e=Q(t);return e+Math.ceil(e/2)}let tt=BigInt(0),te=BigInt(1);function tr(t,e){let r=e.negate();return t?r:e}function tn(t,e){if(!Number.isSafeInteger(t)||t<=0||t>e)throw Error("invalid window size, expected [1.."+e+"], got W="+t)}function ti(t,e){tn(t,e);let r=Math.ceil(e/t)+1,n=2**(t-1),i=2**t;return{windows:r,windowSize:n,mask:q(t),maxNumber:i,shiftBy:BigInt(t)}}function to(t,e,r){let{windowSize:n,mask:i,maxNumber:o,shiftBy:l}=r,f=Number(t&i),s=t>>l;f>n&&(f-=o,s+=te);let a=e*n,u=a+Math.abs(f)-1;return{nextN:s,offset:u,isZero:0===f,isNeg:f<0,isNegF:e%2!=0,offsetF:a}}let tl=new WeakMap,tf=new WeakMap;function ts(t){return tf.get(t)||1}function ta(t){return U(t.Fp,M.reduce((t,e)=>(t[e]="function",t),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"})),U(t,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...$(t.n,t.nBitLength),...t,p:t.Fp.ORDER})}function tu(t){void 0!==t.lowS&&d("lowS",t.lowS),void 0!==t.prehash&&d("prehash",t.prehash)}class td extends Error{constructor(t=""){super(t)}}let th={Err:td,_tlv:{encode:(t,e)=>{let{Err:r}=th;if(t<0||t>256)throw new r("tlv.encode: wrong tag");if(1&e.length)throw new r("tlv.encode: unpadded data");let n=e.length/2,i=h(n);if(i.length/2&128)throw new r("tlv.encode: long form length too big");let o=n>127?h(i.length/2|128):"";return h(t)+o+i+e},decode(t,e){let{Err:r}=th,n=0;if(t<0||t>256)throw new r("tlv.encode: wrong tag");if(e.length<2||e[n++]!==t)throw new r("tlv.decode: wrong tlv");let i=e[n++],o=0;if(128&i){let t=127&i;if(!t)throw new r("tlv.decode(long): indefinite length not supported");if(t>4)throw new r("tlv.decode(long): byte length is too big");let l=e.subarray(n,n+t);if(l.length!==t)throw new r("tlv.decode: length bytes not complete");if(0===l[0])throw new r("tlv.decode(long): zero leftmost byte");for(let t of l)o=o<<8|t;if(n+=t,o<128)throw new r("tlv.decode(long): not minimal encoding")}else o=i;let l=e.subarray(n,n+o);if(l.length!==o)throw new r("tlv.decode: wrong value length");return{v:l,l:e.subarray(n+o)}}},_int:{encode(t){let{Err:e}=th;if(t(t+e/tv)/e,tx=J(tm,void 0,void 0,{sqrt:function(t){let e=BigInt(3),r=BigInt(6),n=BigInt(11),i=BigInt(22),o=BigInt(23),l=BigInt(44),f=BigInt(88),s=t*t*t%tm,a=s*s*t%tm,u=j(a,e,tm)*a%tm,d=j(u,e,tm)*a%tm,h=j(d,tv,tm)*s%tm,c=j(h,n,tm)*h%tm,g=j(c,i,tm)*c%tm,p=j(g,l,tm)*g%tm,y=j(p,f,tm)*p%tm,m=j(y,l,tm)*g%tm,w=j(m,e,tm)*a%tm,E=j(w,o,tm)*c%tm,b=j(E,r,tm)*s%tm,v=j(b,tv,tm);if(!tx.eql(tx.sqr(v),t))throw Error("Cannot find square root");return v}}),tA=function(t,e){let r=e=>(function(t){let e=function(t){let e=ta(t);return U(e,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...e})}(t),{Fp:r,n:n,nByteLength:i,nBitLength:o}=e,l=r.BYTES+1,u=2*r.BYTES+1;function h(t){return _(t,n)}let{ProjectivePoint:c,normPrivateKeyToScalar:g,weierstrassEquation:p,isWithinCurveOrder:m}=function(t){var e;let r=function(t){let e=ta(t);U(e,{a:"field",b:"field"},{allowInfinityPoint:"boolean",allowedPrivateKeyLengths:"array",clearCofactor:"function",fromBytes:"function",isTorsionFree:"function",toBytes:"function",wrapPrivateKey:"boolean"});let{endo:r,Fp:n,a:i}=e;if(r){if(!n.eql(i,n.ZERO))throw Error("invalid endo: CURVE.a must be 0");if("object"!=typeof r||"bigint"!=typeof r.beta||"function"!=typeof r.splitScalar)throw Error('invalid endo: expected "beta": bigint and "splitScalar": function')}return Object.freeze({...e})}(t),{Fp:n}=r,i=J(r.n,r.nBitLength),o=r.toBytes||((t,e,r)=>{let i=e.toAffine();return S(Uint8Array.from([4]),n.toBytes(i.x),n.toBytes(i.y))}),l=r.fromBytes||(t=>{let e=t.subarray(1);return{x:n.fromBytes(e.subarray(0,n.BYTES)),y:n.fromBytes(e.subarray(n.BYTES,2*n.BYTES))}});function u(t){let{a:e,b:i}=r,o=n.sqr(t),l=n.mul(o,t);return n.add(n.add(l,n.mul(t,e)),i)}function h(t,e){let r=n.sqr(e),i=u(t);return n.eql(r,i)}if(!h(r.Gx,r.Gy))throw Error("bad curve params: generator point");let c=n.mul(n.pow(r.a,tp),ty),g=n.mul(n.sqr(r.b),BigInt(27));if(n.is0(n.add(c,g)))throw Error("bad curve params: a or b");function p(t){let e;let{allowedPrivateKeyLengths:n,nByteLength:i,wrapPrivateKey:o,n:l}=r;if(n&&"bigint"!=typeof t){if(a(t)&&(t=y(t)),"string"!=typeof t||!n.includes(t.length))throw Error("invalid private key");t=t.padStart(2*i,"0")}try{e="bigint"==typeof t?t:b(A("private key",t,i))}catch(e){throw Error("invalid private key, expected hex or "+i+" bytes, got "+typeof t)}return o&&(e=_(e,l)),R("private key",e,tg,l),e}function m(t){if(!(t instanceof v))throw Error("ProjectivePoint expected")}let w=P((t,e)=>{let{px:r,py:i,pz:o}=t;if(n.eql(o,n.ONE))return{x:r,y:i};let l=t.is0();null==e&&(e=l?n.ONE:n.inv(o));let f=n.mul(r,e),s=n.mul(i,e),a=n.mul(o,e);if(l)return{x:n.ZERO,y:n.ZERO};if(!n.eql(a,n.ONE))throw Error("invZ was invalid");return{x:f,y:s}}),E=P(t=>{if(t.is0()){if(r.allowInfinityPoint&&!n.is0(t.py))return;throw Error("bad point: ZERO")}let{x:e,y:i}=t.toAffine();if(!n.isValid(e)||!n.isValid(i))throw Error("bad point: x or y not FE");if(!h(e,i))throw Error("bad point: equation left != right");if(!t.isTorsionFree())throw Error("bad point: not in prime-order subgroup");return!0});class v{constructor(t,e,r){if(null==t||!n.isValid(t))throw Error("x required");if(null==e||!n.isValid(e)||n.is0(e))throw Error("y required");if(null==r||!n.isValid(r))throw Error("z required");this.px=t,this.py=e,this.pz=r,Object.freeze(this)}static fromAffine(t){let{x:e,y:r}=t||{};if(!t||!n.isValid(e)||!n.isValid(r))throw Error("invalid affine point");if(t instanceof v)throw Error("projective point not allowed");let i=t=>n.eql(t,n.ZERO);return i(e)&&i(r)?v.ZERO:new v(e,r,n.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(t){let e=W(n,t.map(t=>t.pz));return t.map((t,r)=>t.toAffine(e[r])).map(v.fromAffine)}static fromHex(t){let e=v.fromAffine(l(A("pointHex",t)));return e.assertValidity(),e}static fromPrivateKey(t){return v.BASE.multiply(p(t))}static msm(t,e){return function(t,e,r,n){(function(t,e){if(!Array.isArray(t))throw Error("array expected");t.forEach((t,r)=>{if(!(t instanceof e))throw Error("invalid point at index "+r)})})(r,t),function(t,e){if(!Array.isArray(t))throw Error("array of scalars expected");t.forEach((t,r)=>{if(!e.isValid(t))throw Error("invalid scalar at index "+r)})}(n,e);let i=r.length,o=n.length;if(i!==o)throw Error("arrays of points and scalars must have equal length");let l=t.ZERO,a=function(t){let e;for(e=0;t>f;t>>=s,e+=1);return e}(BigInt(i)),u=1;a>12?u=a-3:a>4?u=a-2:a>0&&(u=2);let d=q(u),h=Array(Number(d)+1).fill(l),c=Math.floor((e.BITS-1)/u)*u,g=l;for(let t=c;t>=0;t-=u){h.fill(l);for(let e=0;e>BigInt(t)&d);h[i]=h[i].add(r[e])}let e=l;for(let t=h.length-1,r=l;t>0;t--)r=r.add(h[t]),e=e.add(r);if(g=g.add(e),0!==t)for(let t=0;ttc||a>tc;)f&tg&&(u=u.add(h)),a&tg&&(d=d.add(h)),h=h.double(),f>>=tg,a>>=tg;return l&&(u=u.negate()),s&&(d=d.negate()),d=new v(n.mul(d.px,e.beta),d.py,d.pz),u.add(d)}multiply(t){let e,i;let{endo:o,n:l}=r;if(R("scalar",t,tg,l),o){let{k1neg:r,k1:l,k2neg:f,k2:s}=o.splitScalar(t),{p:a,f:u}=this.wNAF(l),{p:d,f:h}=this.wNAF(s);a=O.constTimeNegate(r,a),d=O.constTimeNegate(f,d),d=new v(n.mul(d.px,o.beta),d.py,d.pz),e=a.add(d),i=u.add(h)}else{let{p:r,f:n}=this.wNAF(t);e=r,i=n}return v.normalizeZ([e,i])[0]}multiplyAndAddUnsafe(t,e,r){let n=v.BASE,i=(t,e)=>e!==tc&&e!==tg&&t.equals(n)?t.multiply(e):t.multiplyUnsafe(e),o=i(this,e).add(i(t,r));return o.is0()?void 0:o}toAffine(t){return w(this,t)}isTorsionFree(){let{h:t,isTorsionFree:e}=r;if(t===tg)return!0;if(e)return e(v,this);throw Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){let{h:t,clearCofactor:e}=r;return t===tg?this:e?e(v,this):this.multiplyUnsafe(r.h)}toRawBytes(t=!0){return d("isCompressed",t),this.assertValidity(),o(v,this,t)}toHex(t=!0){return d("isCompressed",t),y(this.toRawBytes(t))}}v.BASE=new v(r.Gx,r.Gy,n.ONE),v.ZERO=new v(n.ZERO,n.ONE,n.ZERO);let{endo:B,nBitLength:x}=r,O=(e=B?Math.ceil(x/2):x,{constTimeNegate:tr,hasPrecomputes:t=>1!==ts(t),unsafeLadder(t,e,r=v.ZERO){let n=t;for(;e>tt;)e&te&&(r=r.add(n)),n=n.double(),e>>=te;return r},precomputeWindow(t,r){let{windows:n,windowSize:i}=ti(r,e),o=[],l=t,f=l;for(let t=0;tb(t.slice(e,r));class O{constructor(t,e,r){R("r",t,tg,n),R("s",e,tg,n),this.r=t,this.s=e,null!=r&&(this.recovery=r),Object.freeze(this)}static fromCompact(t){return new O(w(t=A("compactSignature",t,2*i),0,i),w(t,i,2*i))}static fromDER(t){let{r:e,s:r}=th.toSig(A("DER",t));return new O(e,r)}assertValidity(){}addRecoveryBit(t){return new O(this.r,this.s,t)}recoverPublicKey(t){let{r:i,s:o,recovery:l}=this,f=L(A("msgHash",t));if(null==l||![0,1,2,3].includes(l))throw Error("recovery id invalid");let s=2===l||3===l?i+e.n:i;if(s>=r.ORDER)throw Error("recovery id 2 or 3 invalid");let a=(1&l)==0?"02":"03",u=c.fromHex(a+y(B(s,r.BYTES))),d=D(s,n),g=h(-f*d),p=h(o*d),m=c.BASE.multiplyAndAddUnsafe(u,g,p);if(!m)throw Error("point at infinify");return m.assertValidity(),m}hasHighS(){return this.s>n>>tg}normalizeS(){return this.hasHighS()?new O(this.r,h(-this.s),this.recovery):this}toDERRawBytes(){return E(this.toDERHex())}toDERHex(){return th.hexFromSig(this)}toCompactRawBytes(){return E(this.toCompactHex())}toCompactHex(){return y(B(this.r,i))+y(B(this.s,i))}}function z(t){if("bigint"==typeof t)return!1;if(t instanceof c)return!0;let n=A("key",t).length,o=r.BYTES,l=o+1;if(!e.allowedPrivateKeyLengths&&i!==l)return n===l||n===2*o+1}let Z=e.bits2int||function(t){if(t.length>8192)throw Error("input is too large");let e=b(t),r=8*t.length-o;return r>0?e>>BigInt(r):e},L=e.bits2int_modN||function(t){return h(Z(t))},C=q(o);function k(t){return R("num < 2^"+o,t,tc,C),B(t,i)}let T={lowS:e.lowS,prehash:!1},V={lowS:e.lowS,prehash:!1};return c.BASE._setWindowSize(8),{CURVE:e,getPublicKey:function(t,e=!0){return c.fromPrivateKey(t).toRawBytes(e)},getSharedSecret:function(t,e,r=!0){if(!0===z(t))throw Error("first arg must be private key");if(!1===z(e))throw Error("second arg must be public key");return c.fromHex(e).multiply(g(t)).toRawBytes(r)},sign:function(t,i,o=T){let{seed:l,k2sig:f}=function(t,i,o=T){if(["recovered","canonical"].some(t=>t in o))throw Error("sign() legacy options not supported");let{hash:l,randomBytes:f}=e,{lowS:s,prehash:a,extraEntropy:u}=o;null==s&&(s=!0),t=A("msgHash",t),tu(o),a&&(t=A("prehashed msgHash",l(t)));let d=L(t),p=g(i),y=[k(p),k(d)];if(null!=u&&!1!==u){let t=!0===u?f(r.BYTES):u;y.push(A("extraEntropy",t))}return{seed:S(...y),k2sig:function(t){let e=Z(t);if(!m(e))return;let r=D(e,n),i=c.BASE.multiply(e).toAffine(),o=h(i.x);if(o===tc)return;let l=h(r*h(d+o*p));if(l===tc)return;let f=(i.x===o?0:2)|Number(i.y&tg),a=l;if(s&&l>n>>tg)a=l>n>>tg?h(-l):l,f^=1;return new O(o,a,f)}}}(t,i,o);return(function(t,e,r){if("number"!=typeof t||t<2)throw Error("hashLen must be a number");if("number"!=typeof e||e<2)throw Error("qByteLen must be a number");if("function"!=typeof r)throw Error("hmacFn must be a function");let n=N(t),i=N(t),o=0,l=()=>{n.fill(1),i.fill(0),o=0},f=(...t)=>r(i,n,...t),s=(t=N(0))=>{i=f(H([0]),t),n=f(),0!==t.length&&(i=f(H([1]),t),n=f())},a=()=>{if(o++>=1e3)throw Error("drbg: tried 1000 values");let t=0,r=[];for(;t{let r;for(l(),s(t);!(r=e(a()));)s();return l(),r}})(e.hash.outputLen,e.nByteLength,e.hmac)(l,f)},verify:function(t,r,i,o=V){let l,f;r=A("msgHash",r),i=A("publicKey",i);let{lowS:s,prehash:u,format:d}=o;if(tu(o),"strict"in o)throw Error("options.strict was renamed to lowS");if(void 0!==d&&"compact"!==d&&"der"!==d)throw Error("format must be compact or der");let g="string"==typeof t||a(t),p=!g&&!d&&"object"==typeof t&&null!==t&&"bigint"==typeof t.r&&"bigint"==typeof t.s;if(!g&&!p)throw Error("invalid signature, expected Uint8Array, hex string or Signature instance");try{if(p&&(f=new O(t.r,t.s)),g){try{"compact"!==d&&(f=O.fromDER(t))}catch(t){if(!(t instanceof th.Err))throw t}f||"der"===d||(f=O.fromCompact(t))}l=c.fromHex(i)}catch(t){return!1}if(!f||s&&f.hasHighS())return!1;u&&(r=e.hash(r));let{r:y,s:m}=f,w=L(r),E=D(m,n),b=h(w*E),v=h(y*E),B=c.BASE.multiplyAndAddUnsafe(l,b,v)?.toAffine();return!!B&&h(B.x)===y},ProjectivePoint:c,Signature:O,utils:{isValidPrivateKey(t){try{return g(t),!0}catch(t){return!1}},normPrivateKeyToScalar:g,randomPrivateKey:()=>{let t=X(e.n);return function(t,e,r=!1){let n=t.length,i=Q(e),o=X(e);if(n<16||n1024)throw Error("expected "+o+"-1024 bytes of input, got "+n);let l=_(r?v(t):b(t),e-F)+F;return r?x(l,i):B(l,i)}(e.randomBytes(t),e.n)},precompute:(t=8,e=c.BASE)=>(e._setWindowSize(t),e.multiply(BigInt(3)),e)}}})({...t,hash:e,hmac:(t,...r)=>l(e,t,(0,i.eV)(...r)),randomBytes:i.O6});return{...r(e),create:r}}({a:tE,b:BigInt(7),Fp:tx,n:tw,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:t=>{let e=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-tb*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),n=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),i=BigInt("0x100000000000000000000000000000000"),o=tB(e*t,tw),l=tB(-r*t,tw),f=_(t-o*e-l*n,tw),s=_(-o*r-l*e,tw),a=f>i,u=s>i;if(a&&(f=tw-f),u&&(s=tw-s),f>i||s>i)throw Error("splitScalar: Endomorphism failed, k="+t);return{k1neg:a,k1:f,k2neg:u,k2:s}}}},n.JQ)}}; \ No newline at end of file diff --git a/frontend/.next/server/chunks/6832.js b/frontend/.next/server/chunks/6832.js new file mode 100644 index 0000000..2644259 --- /dev/null +++ b/frontend/.next/server/chunks/6832.js @@ -0,0 +1,14 @@ +"use strict";exports.id=6832,exports.ids=[6832],exports.modules={6832:(t,e,r)=>{r.r(e),r.d(e,{PhPaperPlaneRight:()=>d}),r(31325);var a=r(70460),l=r(75466),i=r(66005),o=r(28405),s=r(43961),p=Object.defineProperty,h=Object.getOwnPropertyDescriptor,n=(t,e,r,a)=>{for(var l,i=a>1?void 0:a?h(e,r):e,o=t.length-1;o>=0;o--)(l=t[o])&&(i=(a?l(e,r,i):l(i))||i);return a&&i&&p(e,r,i),i};let d=class extends l.oi{constructor(){super(...arguments),this.size="1em",this.weight="regular",this.color="currentColor",this.mirrored=!1}render(){var t;return(0,a.dy)` + ${d.weightsMap.get(null!=(t=this.weight)?t:"regular")} + `}};d.weightsMap=new Map([["thin",(0,a.YP)``],["light",(0,a.YP)``],["regular",(0,a.YP)``],["bold",(0,a.YP)``],["fill",(0,a.YP)``],["duotone",(0,a.YP)``]]),d.styles=(0,s.iv)` + :host { + display: contents; + } + `,n([(0,o.C)({type:String,reflect:!0})],d.prototype,"size",2),n([(0,o.C)({type:String,reflect:!0})],d.prototype,"weight",2),n([(0,o.C)({type:String,reflect:!0})],d.prototype,"color",2),n([(0,o.C)({type:Boolean,reflect:!0})],d.prototype,"mirrored",2),d=n([(0,i.M)("ph-paper-plane-right")],d)}}; \ No newline at end of file diff --git a/frontend/.next/server/chunks/7047.js b/frontend/.next/server/chunks/7047.js new file mode 100644 index 0000000..f3bd5ac --- /dev/null +++ b/frontend/.next/server/chunks/7047.js @@ -0,0 +1,14 @@ +"use strict";exports.id=7047,exports.ids=[7047],exports.modules={27047:(a,t,e)=>{e.r(t),e.d(t,{PhVault:()=>v}),e(31325);var r=e(70460),H=e(75466),o=e(66005),i=e(28405),h=e(43961),s=Object.defineProperty,p=Object.getOwnPropertyDescriptor,l=(a,t,e,r)=>{for(var H,o=r>1?void 0:r?p(t,e):t,i=a.length-1;i>=0;i--)(H=a[i])&&(o=(r?H(t,e,o):H(o))||o);return r&&o&&s(t,e,o),o};let v=class extends H.oi{constructor(){super(...arguments),this.size="1em",this.weight="regular",this.color="currentColor",this.mirrored=!1}render(){var a;return(0,r.dy)` + ${v.weightsMap.get(null!=(a=this.weight)?a:"regular")} + `}};v.weightsMap=new Map([["thin",(0,r.YP)``],["light",(0,r.YP)``],["regular",(0,r.YP)``],["bold",(0,r.YP)``],["fill",(0,r.YP)``],["duotone",(0,r.YP)``]]),v.styles=(0,h.iv)` + :host { + display: contents; + } + `,l([(0,i.C)({type:String,reflect:!0})],v.prototype,"size",2),l([(0,i.C)({type:String,reflect:!0})],v.prototype,"weight",2),l([(0,i.C)({type:String,reflect:!0})],v.prototype,"color",2),l([(0,i.C)({type:Boolean,reflect:!0})],v.prototype,"mirrored",2),v=l([(0,o.M)("ph-vault")],v)}}; \ No newline at end of file diff --git a/frontend/.next/server/chunks/7134.js b/frontend/.next/server/chunks/7134.js new file mode 100644 index 0000000..7fa7099 --- /dev/null +++ b/frontend/.next/server/chunks/7134.js @@ -0,0 +1,14 @@ +"use strict";exports.id=7134,exports.ids=[7134],exports.modules={7134:(t,a,e)=>{e.r(a),e.d(a,{PhCreditCard:()=>V}),e(31325);var r=e(70460),h=e(75466),i=e(66005),o=e(28405),H=e(43961),s=Object.defineProperty,p=Object.getOwnPropertyDescriptor,l=(t,a,e,r)=>{for(var h,i=r>1?void 0:r?p(a,e):a,o=t.length-1;o>=0;o--)(h=t[o])&&(i=(r?h(a,e,i):h(i))||i);return r&&i&&s(a,e,i),i};let V=class extends h.oi{constructor(){super(...arguments),this.size="1em",this.weight="regular",this.color="currentColor",this.mirrored=!1}render(){var t;return(0,r.dy)` + ${V.weightsMap.get(null!=(t=this.weight)?t:"regular")} + `}};V.weightsMap=new Map([["thin",(0,r.YP)``],["light",(0,r.YP)``],["regular",(0,r.YP)``],["bold",(0,r.YP)``],["fill",(0,r.YP)``],["duotone",(0,r.YP)``]]),V.styles=(0,H.iv)` + :host { + display: contents; + } + `,l([(0,o.C)({type:String,reflect:!0})],V.prototype,"size",2),l([(0,o.C)({type:String,reflect:!0})],V.prototype,"weight",2),l([(0,o.C)({type:String,reflect:!0})],V.prototype,"color",2),l([(0,o.C)({type:Boolean,reflect:!0})],V.prototype,"mirrored",2),V=l([(0,i.M)("ph-credit-card")],V)}}; \ No newline at end of file diff --git a/frontend/.next/server/chunks/7237.js b/frontend/.next/server/chunks/7237.js new file mode 100644 index 0000000..f1b753e --- /dev/null +++ b/frontend/.next/server/chunks/7237.js @@ -0,0 +1,14 @@ +"use strict";exports.id=7237,exports.ids=[7237],exports.modules={77237:(t,e,r)=>{r.r(e),r.d(e,{PhArrowDown:()=>n}),r(31325);var l=r(70460),o=r(75466),a=r(66005),i=r(28405),s=r(43961),h=Object.defineProperty,p=Object.getOwnPropertyDescriptor,d=(t,e,r,l)=>{for(var o,a=l>1?void 0:l?p(e,r):e,i=t.length-1;i>=0;i--)(o=t[i])&&(a=(l?o(e,r,a):o(a))||a);return l&&a&&h(e,r,a),a};let n=class extends o.oi{constructor(){super(...arguments),this.size="1em",this.weight="regular",this.color="currentColor",this.mirrored=!1}render(){var t;return(0,l.dy)` + ${n.weightsMap.get(null!=(t=this.weight)?t:"regular")} + `}};n.weightsMap=new Map([["thin",(0,l.YP)``],["light",(0,l.YP)``],["regular",(0,l.YP)``],["bold",(0,l.YP)``],["fill",(0,l.YP)``],["duotone",(0,l.YP)``]]),n.styles=(0,s.iv)` + :host { + display: contents; + } + `,d([(0,i.C)({type:String,reflect:!0})],n.prototype,"size",2),d([(0,i.C)({type:String,reflect:!0})],n.prototype,"weight",2),d([(0,i.C)({type:String,reflect:!0})],n.prototype,"color",2),d([(0,i.C)({type:Boolean,reflect:!0})],n.prototype,"mirrored",2),n=d([(0,a.M)("ph-arrow-down")],n)}}; \ No newline at end of file diff --git a/frontend/.next/server/chunks/7252.js b/frontend/.next/server/chunks/7252.js new file mode 100644 index 0000000..e58efc0 --- /dev/null +++ b/frontend/.next/server/chunks/7252.js @@ -0,0 +1 @@ +"use strict";exports.id=7252,exports.ids=[7252],exports.modules={65442:(e,t,r)=>{var s=r(17577),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},n=s.useState,u=s.useEffect,a=s.useLayoutEffect,o=s.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!i(e,r)}catch(e){return!0}}var h="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var r=t(),s=n({inst:{value:r,getSnapshot:t}}),i=s[0].inst,h=s[1];return a(function(){i.value=r,i.getSnapshot=t,c(i)&&h({inst:i})},[e,r,t]),u(function(){return c(i)&&h({inst:i}),e(function(){c(i)&&h({inst:i})})},[e]),o(r),r};t.useSyncExternalStore=void 0!==s.useSyncExternalStore?s.useSyncExternalStore:h},79251:(e,t,r)=>{var s=r(17577),i=r(94095),n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},u=i.useSyncExternalStore,a=s.useRef,o=s.useEffect,c=s.useMemo,h=s.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,r,s,i){var l=a(null);if(null===l.current){var d={hasValue:!1,value:null};l.current=d}else d=l.current;var f=u(e,(l=c(function(){function e(e){if(!o){if(o=!0,u=e,e=s(e),void 0!==i&&d.hasValue){var t=d.value;if(i(t,e))return a=t}return a=e}if(t=a,n(u,e))return t;var r=s(e);return void 0!==i&&i(t,r)?(u=e,t):(u=e,a=r)}var u,a,o=!1,c=void 0===r?null:r;return[function(){return e(t())},null===c?void 0:function(){return e(c())}]},[t,r,s,i]))[0],l[1]);return o(function(){d.hasValue=!0,d.value=f},[f]),h(f),f}},94095:(e,t,r)=>{e.exports=r(65442)},21508:(e,t,r)=>{e.exports=r(79251)},13184:(e,t,r)=>{r.d(t,{OP:()=>a,if:()=>i,kq:()=>n});var s=r(3341);function i(e,t){return(0,s.Q$)(e,t)}function n(e){return JSON.stringify(e,(e,t)=>!function(e){if(!u(e))return!1;let t=e.constructor;if(void 0===t)return!0;let r=t.prototype;return!!(u(r)&&r.hasOwnProperty("isPrototypeOf"))}(t)?"bigint"==typeof t?t.toString():t:Object.keys(t).sort().reduce((e,r)=>(e[r]=t[r],e),{}))}function u(e){return"[object Object]"===Object.prototype.toString.call(e)}function a(e){let{_defaulted:t,behavior:r,gcTime:s,initialData:i,initialDataUpdatedAt:n,maxPages:u,meta:a,networkMode:o,queryFn:c,queryHash:h,queryKey:l,queryKeyHashFn:d,retry:f,retryDelay:p,structuralSharing:y,getPreviousPageParam:v,getNextPageParam:b,initialPageParam:R,_optimisticResults:m,enabled:g,notifyOnChangeProps:Q,placeholderData:S,refetchInterval:O,refetchIntervalInBackground:I,refetchOnMount:x,refetchOnReconnect:C,refetchOnWindowFocus:E,retryOnMount:w,select:T,staleTime:P,suspense:k,throwOnError:F,config:j,connector:D,query:N,...U}=e;return U}},95224:(e,t,r)=>{function s(e){return e.state.chainId}r.d(t,{x:()=>u});var i=r(17577),n=r(2487);function u(e={}){let t=(0,n.Z)(e);return(0,i.useSyncExternalStore)(e=>(function(e,t){let{onChange:r}=t;return e.subscribe(e=>e.chainId,r)})(t,{onChange:e}),()=>s(t),()=>s(t))}},2487:(e,t,r)=>{r.d(t,{Z:()=>c});var s=r(17577),i=r(94243),n=r(27663);let u=()=>"wagmi@3.1.0";class a extends n.G{constructor(){super(...arguments),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WagmiError"})}get docsBaseUrl(){return"https://wagmi.sh/react"}get version(){return u()}}class o extends a{constructor(){super("`useConfig` must be used within `WagmiProvider`.",{docsPath:"/api/WagmiProvider"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WagmiProviderNotFoundError"})}}function c(e={}){let t=e.config??(0,s.useContext)(i.V);if(!t)throw new o;return t}},37090:(e,t,r)=>{r.d(t,{R:()=>h});var s=r(7666),i=r(58254),n=r(2487),u=r(28233),a=r(17577),o=r(21508);let c=e=>"object"==typeof e&&!Array.isArray(e);function h(e={}){let t=(0,n.Z)(e);return function(e,t,r=t,s=u.v){let i=(0,a.useRef)([]),n=(0,o.useSyncExternalStoreWithSelector)(e,t,r,e=>e,(e,t)=>{if(c(e)&&c(t)&&i.current.length){for(let r of i.current)if(!s(e[r],t[r]))return!1;return!0}return s(e,t)});return(0,a.useMemo)(()=>{if(c(n)){let e={...n},t={};for(let[r,s]of Object.entries(e))t={...t,[r]:{configurable:!1,enumerable:!0,get:()=>(i.current.includes(r)||i.current.push(r),s)}};return Object.defineProperties(e,t),e}return n},[n])}(e=>(0,s.Y)(t,{onChange:e}),()=>(0,i.B)(t))}},37597:(e,t,r)=>{r.d(t,{aM:()=>T});var s=r(81943),i=r(12113),n=r(96143),u=r(64351),a=r(32244),o=r(3341),c=r(56245),h=class extends u.l{constructor(e,t){super(),this.options=t,this.#e=e,this.#t=null,this.#r=(0,a.O)(),this.bindMethods(),this.setOptions(t)}#e;#s=void 0;#i=void 0;#n=void 0;#u;#a;#r;#t;#o;#c;#h;#l;#d;#f;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#s.addObserver(this),l(this.#s,this.options)?this.#y():this.updateResult(),this.#v())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return d(this.#s,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return d(this.#s,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#R(),this.#s.removeObserver(this)}setOptions(e){let t=this.options,r=this.#s;if(this.options=this.#e.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof(0,o.Nc)(this.options.enabled,this.#s))throw Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#m(),this.#s.setOptions(this.options),t._defaulted&&!(0,o.VS)(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#s,observer:this});let s=this.hasListeners();s&&f(this.#s,r,this.options,t)&&this.#y(),this.updateResult(),s&&(this.#s!==r||(0,o.Nc)(this.options.enabled,this.#s)!==(0,o.Nc)(t.enabled,this.#s)||(0,o.KC)(this.options.staleTime,this.#s)!==(0,o.KC)(t.staleTime,this.#s))&&this.#g();let i=this.#Q();s&&(this.#s!==r||(0,o.Nc)(this.options.enabled,this.#s)!==(0,o.Nc)(t.enabled,this.#s)||i!==this.#f)&&this.#S(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),r=this.createResult(t,e);return(0,o.VS)(this.getCurrentResult(),r)||(this.#n=r,this.#a=this.options,this.#u=this.#s.state),r}getCurrentResult(){return this.#n}trackResult(e,t){return new Proxy(e,{get:(e,r)=>(this.trackProp(r),t?.(r),"promise"!==r||(this.trackProp("data"),this.options.experimental_prefetchInRender||"pending"!==this.#r.status||this.#r.reject(Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(e,r))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#s}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),r=this.#e.getQueryCache().build(this.#e,t);return r.fetch().then(()=>this.createResult(r,t))}fetch(e){return this.#y({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#n))}#y(e){this.#m();let t=this.#s.fetch(this.options,e);return e?.throwOnError||(t=t.catch(o.ZT)),t}#g(){this.#b();let e=(0,o.KC)(this.options.staleTime,this.#s);if(o.sk||this.#n.isStale||!(0,o.PN)(e))return;let t=(0,o.Kp)(this.#n.dataUpdatedAt,e);this.#l=c.mr.setTimeout(()=>{this.#n.isStale||this.updateResult()},t+1)}#Q(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#s):this.options.refetchInterval)??!1}#S(e){this.#R(),this.#f=e,!o.sk&&!1!==(0,o.Nc)(this.options.enabled,this.#s)&&(0,o.PN)(this.#f)&&0!==this.#f&&(this.#d=c.mr.setInterval(()=>{(this.options.refetchIntervalInBackground||s.j.isFocused())&&this.#y()},this.#f))}#v(){this.#g(),this.#S(this.#Q())}#b(){this.#l&&(c.mr.clearTimeout(this.#l),this.#l=void 0)}#R(){this.#d&&(c.mr.clearInterval(this.#d),this.#d=void 0)}createResult(e,t){let r;let s=this.#s,i=this.options,u=this.#n,c=this.#u,h=this.#a,d=e!==s?e.state:this.#i,{state:y}=e,v={...y},b=!1;if(t._optimisticResults){let r=this.hasListeners(),u=!r&&l(e,t),a=r&&f(e,s,t,i);(u||a)&&(v={...v,...(0,n.z)(y.data,e.options)}),"isRestoring"===t._optimisticResults&&(v.fetchStatus="idle")}let{error:R,errorUpdatedAt:m,status:g}=v;r=v.data;let Q=!1;if(void 0!==t.placeholderData&&void 0===r&&"pending"===g){let e;u?.isPlaceholderData&&t.placeholderData===h?.placeholderData?(e=u.data,Q=!0):e="function"==typeof t.placeholderData?t.placeholderData(this.#h?.state.data,this.#h):t.placeholderData,void 0!==e&&(g="success",r=(0,o.oE)(u?.data,e,t),b=!0)}if(t.select&&void 0!==r&&!Q){if(u&&r===c?.data&&t.select===this.#o)r=this.#c;else try{this.#o=t.select,r=t.select(r),r=(0,o.oE)(u?.data,r,t),this.#c=r,this.#t=null}catch(e){this.#t=e}}this.#t&&(R=this.#t,r=this.#c,m=Date.now(),g="error");let S="fetching"===v.fetchStatus,O="pending"===g,I="error"===g,x=O&&S,C=void 0!==r,E={status:g,fetchStatus:v.fetchStatus,isPending:O,isSuccess:"success"===g,isError:I,isInitialLoading:x,isLoading:x,data:r,dataUpdatedAt:v.dataUpdatedAt,error:R,errorUpdatedAt:m,failureCount:v.fetchFailureCount,failureReason:v.fetchFailureReason,errorUpdateCount:v.errorUpdateCount,isFetched:v.dataUpdateCount>0||v.errorUpdateCount>0,isFetchedAfterMount:v.dataUpdateCount>d.dataUpdateCount||v.errorUpdateCount>d.errorUpdateCount,isFetching:S,isRefetching:S&&!O,isLoadingError:I&&!C,isPaused:"paused"===v.fetchStatus,isPlaceholderData:b,isRefetchError:I&&C,isStale:p(e,t),refetch:this.refetch,promise:this.#r,isEnabled:!1!==(0,o.Nc)(t.enabled,e)};if(this.options.experimental_prefetchInRender){let t=e=>{"error"===E.status?e.reject(E.error):void 0!==E.data&&e.resolve(E.data)},r=()=>{t(this.#r=E.promise=(0,a.O)())},i=this.#r;switch(i.status){case"pending":e.queryHash===s.queryHash&&t(i);break;case"fulfilled":("error"===E.status||E.data!==i.value)&&r();break;case"rejected":("error"!==E.status||E.error!==i.reason)&&r()}}return E}updateResult(){let e=this.#n,t=this.createResult(this.#s,this.options);this.#u=this.#s.state,this.#a=this.options,void 0!==this.#u.data&&(this.#h=this.#s),(0,o.VS)(t,e)||(this.#n=t,this.#O({listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,r="function"==typeof t?t():t;if("all"===r||!r&&!this.#p.size)return!0;let s=new Set(r??this.#p);return this.options.throwOnError&&s.add("error"),Object.keys(this.#n).some(t=>this.#n[t]!==e[t]&&s.has(t))})()}))}#m(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#s)return;let t=this.#s;this.#s=e,this.#i=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#v()}#O(e){i.Vr.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#n)}),this.#e.getQueryCache().notify({query:this.#s,type:"observerResultsUpdated"})})}};function l(e,t){return!1!==(0,o.Nc)(t.enabled,e)&&void 0===e.state.data&&!("error"===e.state.status&&!1===t.retryOnMount)||void 0!==e.state.data&&d(e,t,t.refetchOnMount)}function d(e,t,r){if(!1!==(0,o.Nc)(t.enabled,e)&&"static"!==(0,o.KC)(t.staleTime,e)){let s="function"==typeof r?r(e):r;return"always"===s||!1!==s&&p(e,t)}return!1}function f(e,t,r,s){return(e!==t||!1===(0,o.Nc)(s.enabled,e))&&(!r.suspense||"error"!==e.state.status)&&p(e,r)}function p(e,t){return!1!==(0,o.Nc)(t.enabled,e)&&e.isStaleByTime((0,o.KC)(t.staleTime,e))}var y=r(17577),v=r(44976);r(10326);var b=y.createContext(function(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}()),R=()=>y.useContext(b),m=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&!t.isReset()&&(e.retryOnMount=!1)},g=e=>{y.useEffect(()=>{e.clearReset()},[e])},Q=({result:e,errorResetBoundary:t,throwOnError:r,query:s,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&s&&(i&&void 0===e.data||(0,o.L3)(r,[e.error,s])),S=y.createContext(!1),O=()=>y.useContext(S);S.Provider;var I=e=>{if(e.suspense){let t=e=>"static"===e?e:Math.max(e??1e3,1e3),r=e.staleTime;e.staleTime="function"==typeof r?(...e)=>t(r(...e)):t(r),"number"==typeof e.gcTime&&(e.gcTime=Math.max(e.gcTime,1e3))}},x=(e,t)=>e.isLoading&&e.isFetching&&!t,C=(e,t)=>e?.suspense&&t.isPending,E=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()}),w=r(13184);function T(e){let t=function(e,t,r){let s=O(),n=R(),u=(0,v.NL)(r),a=u.defaultQueryOptions(e);u.getDefaultOptions().queries?._experimental_beforeQuery?.(a),a._optimisticResults=s?"isRestoring":"optimistic",I(a),m(a,n),g(n);let c=!u.getQueryCache().get(a.queryHash),[h]=y.useState(()=>new t(u,a)),l=h.getOptimisticResult(a),d=!s&&!1!==e.subscribed;if(y.useSyncExternalStore(y.useCallback(e=>{let t=d?h.subscribe(i.Vr.batchCalls(e)):o.ZT;return h.updateResult(),t},[h,d]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),y.useEffect(()=>{h.setOptions(a)},[a,h]),C(a,l))throw E(a,h,n);if(Q({result:l,errorResetBoundary:n,throwOnError:a.throwOnError,query:u.getQueryCache().get(a.queryHash),suspense:a.suspense}))throw l.error;if(u.getDefaultOptions().queries?._experimental_afterQuery?.(a,l),a.experimental_prefetchInRender&&!o.sk&&x(l,s)){let e=c?E(a,h,n):u.getQueryCache().get(a.queryHash)?.promise;e?.catch(o.ZT).finally(()=>{h.updateResult()})}return a.notifyOnChangeProps?l:h.trackResult(l)}({...e,queryKeyHashFn:w.kq},h,void 0);return t.queryKey=e.queryKey,t}}}; \ No newline at end of file diff --git a/frontend/.next/server/chunks/7311.js b/frontend/.next/server/chunks/7311.js new file mode 100644 index 0000000..a432203 --- /dev/null +++ b/frontend/.next/server/chunks/7311.js @@ -0,0 +1 @@ +"use strict";exports.id=7311,exports.ids=[7311],exports.modules={87311:(t,e,n)=>{n.d(e,{Z:()=>b});var a={};function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){if(e.length1?"s":"")+" required, but only "+e.length+" present")}function i(t){o(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"===r(t)&&"[object Date]"===e?new Date(t.getTime()):"number"==typeof t||"[object Number]"===e?new Date(t):(("string"==typeof t||"[object String]"===e)&&"undefined"!=typeof console&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(Error().stack)),new Date(NaN))}function u(t,e){o(2,arguments);var n=i(t),a=i(e),r=n.getTime()-a.getTime();return r<0?-1:r>0?1:r}var s={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},d={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function l(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}var m={date:l({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:l({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:l({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},h={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function f(t){return function(e,n){var a;if("formatting"===(null!=n&&n.context?String(n.context):"standalone")&&t.formattingValues){var r=t.defaultFormattingWidth||t.defaultWidth,o=null!=n&&n.width?String(n.width):r;a=t.formattingValues[o]||t.formattingValues[r]}else{var i=t.defaultWidth,u=null!=n&&n.width?String(n.width):t.defaultWidth;a=t.values[u]||t.values[i]}return a[t.argumentCallback?t.argumentCallback(e):e]}}function c(t){return function(e){var n,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=a.width,o=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],i=e.match(o);if(!i)return null;var u=i[0],s=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],d=Array.isArray(s)?function(t,e){for(var n=0;n0?"in "+a:a+" ago":a},formatLong:m,formatRelative:function(t,e,n,a){return h[t]},localize:{ordinalNumber:function(t,e){var n=Number(t),a=n%100;if(a>20||a<10)switch(a%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:f({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:f({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:f({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:f({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:f({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:function(t){return function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=e.match(t.matchPattern);if(!a)return null;var r=a[0],o=e.match(t.parsePattern);if(!o)return null;var i=t.valueCallback?t.valueCallback(o[0]):o[0];return{value:i=n.valueCallback?n.valueCallback(i):i,rest:e.slice(r.length)}}}({matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}}),era:c({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:c({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:c({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:c({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:c({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function v(t,e){if(null==t)throw TypeError("assign requires that input parameter not be null or undefined");for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}function y(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}function b(t,e){return o(1,arguments),function(t,e,n){o(2,arguments);var r,d,l,m,h,f=null!==(r=null!==(d=null==n?void 0:n.locale)&&void 0!==d?d:a.locale)&&void 0!==r?r:g;if(!f.formatDistance)throw RangeError("locale must contain formatDistance property");var c=u(t,e);if(isNaN(c))throw RangeError("Invalid time value");var b=v(v({},n),{addSuffix:!!(null==n?void 0:n.addSuffix),comparison:c});c>0?(l=i(e),m=i(t)):(l=i(t),m=i(e));var p=function(t,e,n){o(2,arguments);var a,r=function(t,e){return o(2,arguments),i(t).getTime()-i(e).getTime()}(t,e)/1e3;return((a=null==n?void 0:n.roundingMethod)?s[a]:s.trunc)(r)}(m,l),w=Math.round((p-(y(m)-y(l))/1e3)/60);if(w<2){if(null!=n&&n.includeSeconds){if(p<5)return f.formatDistance("lessThanXSeconds",5,b);if(p<10)return f.formatDistance("lessThanXSeconds",10,b);if(p<20)return f.formatDistance("lessThanXSeconds",20,b);if(p<40)return f.formatDistance("halfAMinute",0,b);else if(p<60)return f.formatDistance("lessThanXMinutes",1,b);else return f.formatDistance("xMinutes",1,b)}return 0===w?f.formatDistance("lessThanXMinutes",1,b):f.formatDistance("xMinutes",w,b)}if(w<45)return f.formatDistance("xMinutes",w,b);if(w<90)return f.formatDistance("aboutXHours",1,b);if(w<1440)return f.formatDistance("aboutXHours",Math.round(w/60),b);if(w<2520)return f.formatDistance("xDays",1,b);if(w<43200)return f.formatDistance("xDays",Math.round(w/1440),b);if(w<86400)return h=Math.round(w/43200),f.formatDistance("aboutXMonths",h,b);if((h=function(t,e){o(2,arguments);var n,a=i(t),r=i(e),s=u(a,r),d=Math.abs(function(t,e){o(2,arguments);var n=i(t),a=i(e);return 12*(n.getFullYear()-a.getFullYear())+(n.getMonth()-a.getMonth())}(a,r));if(d<1)n=0;else{1===a.getMonth()&&a.getDate()>27&&a.setDate(30),a.setMonth(a.getMonth()-s*d);var l=u(a,r)===-s;(function(t){o(1,arguments);var e=i(t);return(function(t){o(1,arguments);var e=i(t);return e.setHours(23,59,59,999),e})(e).getTime()===(function(t){o(1,arguments);var e=i(t),n=e.getMonth();return e.setFullYear(e.getFullYear(),n+1,0),e.setHours(23,59,59,999),e})(e).getTime()})(i(t))&&1===d&&1===u(t,r)&&(l=!1),n=s*(d-Number(l))}return 0===n?0:n}(m,l))<12)return f.formatDistance("xMonths",Math.round(w/43200),b);var M=h%12,D=Math.floor(h/12);return M<3?f.formatDistance("aboutXYears",D,b):M<9?f.formatDistance("overXYears",D,b):f.formatDistance("almostXYears",D+1,b)}(t,Date.now(),e)}}}; \ No newline at end of file diff --git a/frontend/.next/server/chunks/7369.js b/frontend/.next/server/chunks/7369.js new file mode 100644 index 0000000..cd00e29 --- /dev/null +++ b/frontend/.next/server/chunks/7369.js @@ -0,0 +1,14 @@ +"use strict";exports.id=7369,exports.ids=[7369],exports.modules={27369:(t,e,r)=>{r.r(e),r.d(e,{PhDotsThree:()=>n}),r(31325);var a=r(70460),o=r(75466),i=r(66005),s=r(28405),h=r(43961),p=Object.defineProperty,l=Object.getOwnPropertyDescriptor,d=(t,e,r,a)=>{for(var o,i=a>1?void 0:a?l(e,r):e,s=t.length-1;s>=0;s--)(o=t[s])&&(i=(a?o(e,r,i):o(i))||i);return a&&i&&p(e,r,i),i};let n=class extends o.oi{constructor(){super(...arguments),this.size="1em",this.weight="regular",this.color="currentColor",this.mirrored=!1}render(){var t;return(0,a.dy)` + ${n.weightsMap.get(null!=(t=this.weight)?t:"regular")} + `}};n.weightsMap=new Map([["thin",(0,a.YP)``],["light",(0,a.YP)``],["regular",(0,a.YP)``],["bold",(0,a.YP)``],["fill",(0,a.YP)``],["duotone",(0,a.YP)``]]),n.styles=(0,h.iv)` + :host { + display: contents; + } + `,d([(0,s.C)({type:String,reflect:!0})],n.prototype,"size",2),d([(0,s.C)({type:String,reflect:!0})],n.prototype,"weight",2),d([(0,s.C)({type:String,reflect:!0})],n.prototype,"color",2),d([(0,s.C)({type:Boolean,reflect:!0})],n.prototype,"mirrored",2),n=d([(0,i.M)("ph-dots-three")],n)}}; \ No newline at end of file diff --git a/frontend/.next/server/chunks/7424.js b/frontend/.next/server/chunks/7424.js new file mode 100644 index 0000000..00400f4 --- /dev/null +++ b/frontend/.next/server/chunks/7424.js @@ -0,0 +1,14 @@ +"use strict";exports.id=7424,exports.ids=[7424],exports.modules={27424:(t,e,r)=>{r.r(e),r.d(e,{PhArrowUpRight:()=>g}),r(31325);var o=r(70460),i=r(75466),a=r(66005),s=r(28405),p=r(43961),h=Object.defineProperty,l=Object.getOwnPropertyDescriptor,d=(t,e,r,o)=>{for(var i,a=o>1?void 0:o?l(e,r):e,s=t.length-1;s>=0;s--)(i=t[s])&&(a=(o?i(e,r,a):i(a))||a);return o&&a&&h(e,r,a),a};let g=class extends i.oi{constructor(){super(...arguments),this.size="1em",this.weight="regular",this.color="currentColor",this.mirrored=!1}render(){var t;return(0,o.dy)` + ${g.weightsMap.get(null!=(t=this.weight)?t:"regular")} + `}};g.weightsMap=new Map([["thin",(0,o.YP)``],["light",(0,o.YP)``],["regular",(0,o.YP)``],["bold",(0,o.YP)``],["fill",(0,o.YP)``],["duotone",(0,o.YP)``]]),g.styles=(0,p.iv)` + :host { + display: contents; + } + `,d([(0,s.C)({type:String,reflect:!0})],g.prototype,"size",2),d([(0,s.C)({type:String,reflect:!0})],g.prototype,"weight",2),d([(0,s.C)({type:String,reflect:!0})],g.prototype,"color",2),d([(0,s.C)({type:Boolean,reflect:!0})],g.prototype,"mirrored",2),g=d([(0,a.M)("ph-arrow-up-right")],g)}}; \ No newline at end of file diff --git a/frontend/.next/server/chunks/7581.js b/frontend/.next/server/chunks/7581.js new file mode 100644 index 0000000..1021411 --- /dev/null +++ b/frontend/.next/server/chunks/7581.js @@ -0,0 +1,357 @@ +"use strict";exports.id=7581,exports.ids=[7581],exports.modules={17581:(t,e,i)=>{i.r(e),i.d(e,{W3mDepositFromExchangeSelectAssetView:()=>R,W3mDepositFromExchangeView:()=>I});var n=i(37207),o=i(90670),a=i(83479),r=i(42772),s=i(46213),u=i(14212),l=i(98673),c=i(61741),d=i(71263),p=i(67668);i(35300),i(68865),i(71762);var h=i(10820),m=i(18322),g=i(30955);let y=(0,g.iv)` + button { + border: none; + border-radius: ${({borderRadius:t})=>t["20"]}; + display: flex; + flex-direction: row; + align-items: center; + padding: ${({spacing:t})=>t[1]}; + transition: + background-color ${({durations:t})=>t.lg} + ${({easings:t})=>t["ease-out-power-2"]}, + box-shadow ${({durations:t})=>t.lg} + ${({easings:t})=>t["ease-out-power-2"]}; + will-change: background-color, box-shadow; + } + + /* -- Variants --------------------------------------------------------------- */ + button[data-type='accent'] { + background-color: ${({tokens:t})=>t.core.backgroundAccentPrimary}; + color: ${({tokens:t})=>t.theme.textPrimary}; + } + + button[data-type='neutral'] { + background-color: ${({tokens:t})=>t.theme.foregroundSecondary}; + color: ${({tokens:t})=>t.theme.textPrimary}; + } + + /* -- Sizes --------------------------------------------------------------- */ + button[data-size='sm'] { + height: 24px; + } + + button[data-size='md'] { + height: 28px; + } + + button[data-size='lg'] { + height: 32px; + } + + button[data-size='sm'] > wui-image, + button[data-size='sm'] > wui-icon { + width: 16px; + height: 16px; + } + + button[data-size='md'] > wui-image, + button[data-size='md'] > wui-icon { + width: 20px; + height: 20px; + } + + button[data-size='lg'] > wui-image, + button[data-size='lg'] > wui-icon { + width: 24px; + height: 24px; + } + + wui-text { + padding-left: ${({spacing:t})=>t[1]}; + padding-right: ${({spacing:t})=>t[1]}; + } + + wui-image { + border-radius: ${({borderRadius:t})=>t[3]}; + overflow: hidden; + user-drag: none; + user-select: none; + -moz-user-select: none; + -webkit-user-drag: none; + -webkit-user-select: none; + -ms-user-select: none; + } + + /* -- States --------------------------------------------------------------- */ + @media (hover: hover) and (pointer: fine) { + button[data-type='accent']:not(:disabled):hover { + background-color: ${({tokens:t})=>t.core.foregroundAccent060}; + } + + button[data-type='neutral']:not(:disabled):hover { + background-color: ${({tokens:t})=>t.theme.foregroundTertiary}; + } + } + + button[data-type='accent']:not(:disabled):focus-visible, + button[data-type='accent']:not(:disabled):active { + box-shadow: 0 0 0 4px ${({tokens:t})=>t.core.foregroundAccent020}; + } + + button[data-type='neutral']:not(:disabled):focus-visible, + button[data-type='neutral']:not(:disabled):active { + box-shadow: 0 0 0 4px ${({tokens:t})=>t.core.foregroundAccent020}; + } + + button:disabled { + opacity: 0.5; + } +`;var w=function(t,e,i,n){var o,a=arguments.length,r=a<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(r=(a<3?o(r):a>3?o(e,i,r):o(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};let f={sm:"sm-regular",md:"md-regular",lg:"lg-regular"},x=class extends n.oi{constructor(){super(...arguments),this.type="accent",this.size="md",this.imageSrc="",this.disabled=!1,this.leftIcon=void 0,this.rightIcon=void 0,this.text=""}render(){return(0,n.dy)` + + `}};x.styles=[h.ET,h.ZM,y],w([(0,o.Cb)()],x.prototype,"type",void 0),w([(0,o.Cb)()],x.prototype,"size",void 0),w([(0,o.Cb)()],x.prototype,"imageSrc",void 0),w([(0,o.Cb)({type:Boolean})],x.prototype,"disabled",void 0),w([(0,o.Cb)()],x.prototype,"leftIcon",void 0),w([(0,o.Cb)()],x.prototype,"rightIcon",void 0),w([(0,o.Cb)()],x.prototype,"text",void 0),x=w([(0,m.M)("wui-chip-button")],x),i(64559),i(1640),i(17035),i(35606),i(18537),i(44680),i(3966),i(29041),i(2427);var b=function(t,e,i,n){var o,a=arguments.length,r=a<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(r=(a<3?o(r):a>3?o(e,i,r):o(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};let v=class extends n.oi{constructor(){super(...arguments),this.maxDecimals=void 0,this.maxIntegers=void 0}render(){return(0,n.dy)` + + + USD + + `}};b([(0,o.Cb)({type:Number})],v.prototype,"amount",void 0),b([(0,o.Cb)({type:Number})],v.prototype,"maxDecimals",void 0),b([(0,o.Cb)({type:Number})],v.prototype,"maxIntegers",void 0),v=b([(0,p.Mo)("w3m-fund-input")],v);let $=(0,p.iv)` + .amount-input-container { + border-radius: ${({borderRadius:t})=>t["6"]}; + border-top-right-radius: 0; + border-top-left-radius: 0; + background-color: ${({tokens:t})=>t.theme.foregroundPrimary}; + padding: ${({spacing:t})=>t[1]}; + } + + .container { + border-radius: 30px; + } +`;var k=function(t,e,i,n){var o,a=arguments.length,r=a<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(r=(a<3?o(r):a>3?o(e,i,r):o(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};let C=[10,50,100],I=class extends n.oi{constructor(){super(),this.unsubscribe=[],this.network=r.R.state.activeCaipNetwork,this.exchanges=s.u.state.exchanges,this.isLoading=s.u.state.isLoading,this.amount=s.u.state.amount,this.tokenAmount=s.u.state.tokenAmount,this.priceLoading=s.u.state.priceLoading,this.isPaymentInProgress=s.u.state.isPaymentInProgress,this.currentPayment=s.u.state.currentPayment,this.paymentId=s.u.state.paymentId,this.paymentAsset=s.u.state.paymentAsset,this.unsubscribe.push(r.R.subscribeKey("activeCaipNetwork",t=>{this.network=t,this.setDefaultPaymentAsset()}),s.u.subscribe(t=>{this.exchanges=t.exchanges,this.isLoading=t.isLoading,this.amount=t.amount,this.tokenAmount=t.tokenAmount,this.priceLoading=t.priceLoading,this.paymentId=t.paymentId,this.isPaymentInProgress=t.isPaymentInProgress,this.currentPayment=t.currentPayment,this.paymentAsset=t.paymentAsset,t.isPaymentInProgress&&t.currentPayment?.exchangeId&&t.currentPayment?.sessionId&&t.paymentId&&this.handlePaymentInProgress()}))}disconnectedCallback(){this.unsubscribe.forEach(t=>t()),s.u.state.isPaymentInProgress||s.u.reset()}async firstUpdated(){await this.getPaymentAssets(),this.paymentAsset||await this.setDefaultPaymentAsset(),s.u.setAmount(C[0]),await s.u.fetchExchanges()}render(){return(0,n.dy)` + + ${this.amountInputTemplate()} ${this.exchangesTemplate()} + + `}exchangesLoadingTemplate(){return Array.from({length:2}).map(()=>(0,n.dy)``)}_exchangesTemplate(){return this.exchanges.length>0?this.exchanges.map(t=>(0,n.dy)`this.onExchangeClick(t)} + chevron + variant="image" + imageSrc=${t.imageUrl} + ?loading=${this.isLoading} + > + + Deposit from ${t.name} + + `):(0,n.dy)` + + No exchanges support this asset on this network + + `}exchangesTemplate(){return(0,n.dy)` + ${this.isLoading?this.exchangesLoadingTemplate():this._exchangesTemplate()} + `}amountInputTemplate(){return(0,n.dy)` + + + Asset + u.RouterController.push("PayWithExchangeSelectAsset")} + size="lg" + .chainImageSrc=${(0,a.o)(l.f.getNetworkImage(this.network))} + > + + + + + + ${this.tokenAmountTemplate()} + + + ${C.map(t=>(0,n.dy)`s.u.setAmount(t)} + type="neutral" + size="lg" + text=${`$${t}`} + >`)} + + + `}tokenAmountTemplate(){return this.priceLoading?(0,n.dy)``:(0,n.dy)` + + ${this.tokenAmount.toFixed(4)} ${this.paymentAsset?.metadata.symbol} + + `}async onExchangeClick(t){if(!this.amount){c.SnackController.showError("Please enter an amount");return}await s.u.handlePayWithExchange(t.id)}handlePaymentInProgress(){let t=r.R.state.activeChain,{redirectView:e="Account"}=u.RouterController.state.data??{};this.isPaymentInProgress&&this.currentPayment?.exchangeId&&this.currentPayment?.sessionId&&this.paymentId&&(s.u.waitUntilComplete({exchangeId:this.currentPayment.exchangeId,sessionId:this.currentPayment.sessionId,paymentId:this.paymentId}).then(e=>{"SUCCESS"===e.status?(c.SnackController.showSuccess("Deposit completed"),s.u.reset(),t&&(r.R.fetchTokenBalance(),d.ConnectionController.updateBalance(t)),u.RouterController.replace("Transactions")):"FAILED"===e.status&&c.SnackController.showError("Deposit failed")}),c.SnackController.showLoading("Deposit in progress..."),u.RouterController.replace(e))}onAmountChange({detail:t}){s.u.setAmount(t?Number(t):null)}async getPaymentAssets(){this.network&&await s.u.getAssetsForNetwork(this.network.caipNetworkId)}async setDefaultPaymentAsset(){if(this.network){let t=await s.u.getAssetsForNetwork(this.network.caipNetworkId);t[0]&&s.u.setPaymentAsset(t[0])}}};I.styles=$,k([(0,o.SB)()],I.prototype,"network",void 0),k([(0,o.SB)()],I.prototype,"exchanges",void 0),k([(0,o.SB)()],I.prototype,"isLoading",void 0),k([(0,o.SB)()],I.prototype,"amount",void 0),k([(0,o.SB)()],I.prototype,"tokenAmount",void 0),k([(0,o.SB)()],I.prototype,"priceLoading",void 0),k([(0,o.SB)()],I.prototype,"isPaymentInProgress",void 0),k([(0,o.SB)()],I.prototype,"currentPayment",void 0),k([(0,o.SB)()],I.prototype,"paymentId",void 0),k([(0,o.SB)()],I.prototype,"paymentAsset",void 0),I=k([(0,p.Mo)("w3m-deposit-from-exchange-view")],I);var P=i(34862);i(98855),i(4030),i(34018),i(29844),i(80825);let S=(0,p.iv)` + .contentContainer { + height: 440px; + overflow: scroll; + scrollbar-width: none; + } + + .contentContainer::-webkit-scrollbar { + display: none; + } + + wui-icon-box { + width: 40px; + height: 40px; + border-radius: ${({borderRadius:t})=>t["3"]}; + } +`;var A=function(t,e,i,n){var o,a=arguments.length,r=a<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(r=(a<3?o(r):a>3?o(e,i,r):o(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};let R=class extends n.oi{constructor(){super(),this.unsubscribe=[],this.assets=s.u.state.assets,this.search="",this.onDebouncedSearch=P.j.debounce(t=>{this.search=t}),this.unsubscribe.push(s.u.subscribe(t=>{this.assets=t.assets}))}disconnectedCallback(){this.unsubscribe.forEach(t=>t())}render(){return(0,n.dy)` + + ${this.templateSearchInput()} ${this.templateTokens()} + + `}templateSearchInput(){return(0,n.dy)` + + + + `}templateTokens(){let t=this.assets.filter(t=>t.metadata.name.toLowerCase().includes(this.search.toLowerCase())),e=t.length>0;return(0,n.dy)` + + + Available tokens + + + ${e?t.map(t=>(0,n.dy)` + ${t.metadata.name} + ${t.metadata.symbol} + `):(0,n.dy)` + + + + No tokens found + + + Buy + `} + + + `}onBuyClick(){u.RouterController.push("OnRampProviders")}onInputChange(t){this.onDebouncedSearch(t.detail)}handleTokenClick(t){s.u.setPaymentAsset(t),u.RouterController.goBack()}};R.styles=S,A([(0,o.SB)()],R.prototype,"assets",void 0),A([(0,o.SB)()],R.prototype,"search",void 0),R=A([(0,p.Mo)("w3m-deposit-from-exchange-select-asset-view")],R)},17035:(t,e,i)=>{i(68865)},29041:(t,e,i)=>{var n=i(37207),o=i(90670),a=i(96644),r=i(30955),s=i(10820),u=i(6349),l=i(18322);let c=(0,r.iv)` + :host { + position: relative; + display: inline-block; + } + + :host([data-error='true']) > input { + color: ${({tokens:t})=>t.core.textError}; + } + + :host([data-error='false']) > input { + color: ${({tokens:t})=>t.theme.textSecondary}; + } + + input { + background: transparent; + height: auto; + box-sizing: border-box; + color: ${({tokens:t})=>t.theme.textPrimary}; + font-feature-settings: 'case' on; + font-size: ${({textSize:t})=>t.h4}; + caret-color: ${({tokens:t})=>t.core.backgroundAccentPrimary}; + line-height: ${({typography:t})=>t["h4-regular-mono"].lineHeight}; + letter-spacing: ${({typography:t})=>t["h4-regular-mono"].letterSpacing}; + -webkit-appearance: none; + -moz-appearance: textfield; + padding: 0px; + font-family: ${({fontFamily:t})=>t.mono}; + } + + :host([data-width-variant='auto']) input { + width: 100%; + } + + :host([data-width-variant='fit']) input { + width: 1ch; + } + + .wui-input-amount-fit-mirror { + position: absolute; + visibility: hidden; + white-space: pre; + font-size: var(--local-font-size); + line-height: 130%; + letter-spacing: -1.28px; + font-family: ${({fontFamily:t})=>t.mono}; + } + + .wui-input-amount-fit-width { + display: inline-block; + position: relative; + } + + input::-webkit-outer-spin-button, + input::-webkit-inner-spin-button { + -webkit-appearance: none; + margin: 0; + } + + input::placeholder { + color: ${({tokens:t})=>t.theme.textSecondary}; + } +`;var d=function(t,e,i,n){var o,a=arguments.length,r=a<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(r=(a<3?o(r):a>3?o(e,i,r):o(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};let p=class extends n.oi{constructor(){super(...arguments),this.inputElementRef=(0,a.V)(),this.disabled=!1,this.value="",this.placeholder="0",this.widthVariant="auto",this.maxDecimals=void 0,this.maxIntegers=void 0,this.fontSize="h4",this.error=!1}firstUpdated(){this.resizeInput()}updated(){this.style.setProperty("--local-font-size",r.gR.textSize[this.fontSize]),this.resizeInput()}render(){return(this.dataset.widthVariant=this.widthVariant,this.dataset.error=String(this.error),this.inputElementRef?.value&&this.value&&(this.inputElementRef.value.value=this.value),"auto"===this.widthVariant)?this.inputTemplate():(0,n.dy)` +
+ + ${this.inputTemplate()} +
+ `}inputTemplate(){return(0,n.dy)``}dispatchInputChangeEvent(){this.inputElementRef.value&&(this.inputElementRef.value.value=u.H.maskInput({value:this.inputElementRef.value.value,decimals:this.maxDecimals,integers:this.maxIntegers}),this.dispatchEvent(new CustomEvent("inputChange",{detail:this.inputElementRef.value.value,bubbles:!0,composed:!0})),this.resizeInput())}resizeInput(){if("fit"===this.widthVariant){let t=this.inputElementRef.value;if(t){let e=t.previousElementSibling;e&&(e.textContent=t.value||"0",t.style.width=`${e.offsetWidth}px`)}}}};p.styles=[s.ET,s.ZM,c],d([(0,o.Cb)({type:Boolean})],p.prototype,"disabled",void 0),d([(0,o.Cb)({type:String})],p.prototype,"value",void 0),d([(0,o.Cb)({type:String})],p.prototype,"placeholder",void 0),d([(0,o.Cb)({type:String})],p.prototype,"widthVariant",void 0),d([(0,o.Cb)({type:Number})],p.prototype,"maxDecimals",void 0),d([(0,o.Cb)({type:Number})],p.prototype,"maxIntegers",void 0),d([(0,o.Cb)({type:String})],p.prototype,"fontSize",void 0),d([(0,o.Cb)({type:Boolean})],p.prototype,"error",void 0),p=d([(0,l.M)("wui-input-amount")],p)}}; \ No newline at end of file diff --git a/frontend/.next/server/chunks/7656.js b/frontend/.next/server/chunks/7656.js new file mode 100644 index 0000000..d2c2f4a --- /dev/null +++ b/frontend/.next/server/chunks/7656.js @@ -0,0 +1,131 @@ +"use strict";exports.id=7656,exports.ids=[7656],exports.modules={7656:(e,t,i)=>{i.r(t),i.d(t,{W3mWalletReceiveView:()=>$});var r=i(37207),o=i(90670),n=i(83479),a=i(42772),s=i(61741),c=i(98673),l=i(71106),d=i(52180),u=i(14212),w=i(34862),p=i(67668);i(35300),i(68865),i(71762),i(69834);var h=i(10820),m=i(18322),f=i(30955);let g=(0,f.iv)` + button { + width: 100%; + display: flex; + align-items: center; + justify-content: space-between; + gap: ${({spacing:e})=>e[4]}; + background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; + border-radius: ${({borderRadius:e})=>e[3]}; + border: none; + padding: ${({spacing:e})=>e[3]}; + transition: background-color ${({durations:e})=>e.lg} + ${({easings:e})=>e["ease-out-power-2"]}; + will-change: background-color; + } + + /* -- Hover & Active states ----------------------------------------------------------- */ + button:hover:enabled, + button:active:enabled { + background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; + } + + wui-text { + flex: 1; + color: ${({tokens:e})=>e.theme.textSecondary}; + } + + wui-flex { + width: auto; + display: flex; + align-items: center; + gap: ${({spacing:e})=>e["01"]}; + } + + wui-icon { + color: ${({tokens:e})=>e.theme.iconDefault}; + } + + .network-icon { + position: relative; + width: 20px; + height: 20px; + border-radius: ${({borderRadius:e})=>e[4]}; + overflow: hidden; + margin-left: -8px; + } + + .network-icon:first-child { + margin-left: 0px; + } + + .network-icon:after { + position: absolute; + inset: 0; + content: ''; + display: block; + height: 100%; + width: 100%; + border-radius: ${({borderRadius:e})=>e[4]}; + box-shadow: inset 0 0 0 1px ${({tokens:e})=>e.core.glass010}; + } +`;var b=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let k=class extends r.oi{constructor(){super(...arguments),this.networkImages=[""],this.text=""}render(){return(0,r.dy)` + + `}networksTemplate(){let e=this.networkImages.slice(0,5);return(0,r.dy)` + ${e?.map(e=>r.dy` `)} + `}};k.styles=[h.ET,h.ZM,g],b([(0,o.Cb)({type:Array})],k.prototype,"networkImages",void 0),b([(0,o.Cb)()],k.prototype,"text",void 0),k=b([(0,m.M)("wui-compatible-network")],k),i(64559),i(96304),i(44680);var y=i(73372);let v=(0,p.iv)` + wui-compatible-network { + margin-top: ${({spacing:e})=>e["4"]}; + width: 100%; + } + + wui-qr-code { + width: unset !important; + height: unset !important; + } + + wui-icon { + align-items: normal; + } +`;var x=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let $=class extends r.oi{constructor(){super(),this.unsubscribe=[],this.address=a.R.getAccountData()?.address,this.profileName=a.R.getAccountData()?.profileName,this.network=a.R.state.activeCaipNetwork,this.unsubscribe.push(a.R.subscribeChainProp("accountState",e=>{e?(this.address=e.address,this.profileName=e.profileName):s.SnackController.showError("Account not found")}),a.R.subscribeKey("activeCaipNetwork",e=>{e?.id&&(this.network=e)}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){if(!this.address)throw Error("w3m-wallet-receive-view: No account provided");let e=c.f.getNetworkImage(this.network);return(0,r.dy)` + + + + + Copy your address or scan this QR code + + + + Copy address + + + ${this.networkTemplate()} + `}networkTemplate(){let e=a.R.getAllRequestedCaipNetworks(),t=a.R.checkIfSmartAccountEnabled(),i=a.R.state.activeCaipNetwork,o=e.filter(e=>e?.chainNamespace===i?.chainNamespace);if((0,d.r9)(i?.chainNamespace)===y.y_.ACCOUNT_TYPES.SMART_ACCOUNT&&t)return i?(0,r.dy)``:null;let n=(o?.filter(e=>e?.assets?.imageId)?.slice(0,5)).map(c.f.getNetworkImage).filter(Boolean);return(0,r.dy)``}onReceiveClick(){u.RouterController.push("WalletCompatibleNetworks")}onCopyClick(){try{this.address&&(w.j.copyToClopboard(this.address),s.SnackController.showSuccess("Address copied"))}catch{s.SnackController.showError("Failed to copy")}}};$.styles=v,x([(0,o.SB)()],$.prototype,"address",void 0),x([(0,o.SB)()],$.prototype,"profileName",void 0),x([(0,o.SB)()],$.prototype,"network",void 0),$=x([(0,p.Mo)("w3m-wallet-receive-view")],$)}}; \ No newline at end of file diff --git a/frontend/.next/server/chunks/7819.js b/frontend/.next/server/chunks/7819.js new file mode 100644 index 0000000..8ff0fb2 --- /dev/null +++ b/frontend/.next/server/chunks/7819.js @@ -0,0 +1,14 @@ +"use strict";exports.id=7819,exports.ids=[7819],exports.modules={87819:(t,a,e)=>{e.r(a),e.d(a,{PhArrowsDownUp:()=>d}),e(31325);var r=e(70460),l=e(75466),o=e(66005),i=e(28405),s=e(43961),p=Object.defineProperty,h=Object.getOwnPropertyDescriptor,V=(t,a,e,r)=>{for(var l,o=r>1?void 0:r?h(a,e):a,i=t.length-1;i>=0;i--)(l=t[i])&&(o=(r?l(a,e,o):l(o))||o);return r&&o&&p(a,e,o),o};let d=class extends l.oi{constructor(){super(...arguments),this.size="1em",this.weight="regular",this.color="currentColor",this.mirrored=!1}render(){var t;return(0,r.dy)` + ${d.weightsMap.get(null!=(t=this.weight)?t:"regular")} + `}};d.weightsMap=new Map([["thin",(0,r.YP)``],["light",(0,r.YP)``],["regular",(0,r.YP)``],["bold",(0,r.YP)``],["fill",(0,r.YP)``],["duotone",(0,r.YP)``]]),d.styles=(0,s.iv)` + :host { + display: contents; + } + `,V([(0,i.C)({type:String,reflect:!0})],d.prototype,"size",2),V([(0,i.C)({type:String,reflect:!0})],d.prototype,"weight",2),V([(0,i.C)({type:String,reflect:!0})],d.prototype,"color",2),V([(0,i.C)({type:Boolean,reflect:!0})],d.prototype,"mirrored",2),d=V([(0,o.M)("ph-arrows-down-up")],d)}}; \ No newline at end of file diff --git a/frontend/.next/server/chunks/7885.js b/frontend/.next/server/chunks/7885.js new file mode 100644 index 0000000..9e6d490 --- /dev/null +++ b/frontend/.next/server/chunks/7885.js @@ -0,0 +1 @@ +"use strict";exports.id=7885,exports.ids=[7885],exports.modules={97885:(e,t,r)=>{r.d(t,{ZP:()=>N});var n,i=r(17577),o=Object.defineProperty,l=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable,h=(e,t,r)=>t in e?o(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,u=(e,t)=>{for(var r in t||(t={}))s.call(t,r)&&h(e,r,t[r]);if(l)for(var r of l(t))a.call(t,r)&&h(e,r,t[r]);return e},c=(e,t)=>{var r={};for(var n in e)s.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&l)for(var n of l(e))0>t.indexOf(n)&&a.call(e,n)&&(r[n]=e[n]);return r};(e=>{let t=class{constructor(e,r,n,o){if(this.version=e,this.errorCorrectionLevel=r,this.modules=[],this.isFunction=[],et.MAX_VERSION)throw RangeError("Version value out of range");if(o<-1||o>7)throw RangeError("Mask value out of range");this.size=4*e+17;let l=[];for(let e=0;e7)throw RangeError("Invalid value");for(u=o;;u++){let r=8*t.getNumDataCodewords(u,n),i=l.getTotalBits(e,u);if(i<=r){c=i;break}if(u>=s)throw RangeError("Data too long")}for(let e of[t.Ecc.MEDIUM,t.Ecc.QUARTILE,t.Ecc.HIGH])h&&c<=8*t.getNumDataCodewords(u,e)&&(n=e);let d=[];for(let t of e)for(let e of(r(t.mode.modeBits,4,d),r(t.numChars,t.mode.numCharCountBits(u),d),t.getData()))d.push(e);i(d.length==c);let f=8*t.getNumDataCodewords(u,n);i(d.length<=f),r(0,Math.min(4,f-d.length),d),r(0,(8-d.length%8)%8,d),i(d.length%8==0);for(let e=236;d.lengthm[t>>>3]|=e<<7-(7&t)),new t(u,n,m,a)}getModule(e,t){return 0<=e&&e>>9)*1335;let o=(t<<10|r)^21522;i(o>>>15==0);for(let e=0;e<=5;e++)this.setFunctionModule(8,e,n(o,e));this.setFunctionModule(8,7,n(o,6)),this.setFunctionModule(8,8,n(o,7)),this.setFunctionModule(7,8,n(o,8));for(let e=9;e<15;e++)this.setFunctionModule(14-e,8,n(o,e));for(let e=0;e<8;e++)this.setFunctionModule(this.size-1-e,8,n(o,e));for(let e=8;e<15;e++)this.setFunctionModule(8,this.size-15+e,n(o,e));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let t=0;t<12;t++)e=e<<1^(e>>>11)*7973;let t=this.version<<12|e;i(t>>>18==0);for(let e=0;e<18;e++){let r=n(t,e),i=this.size-11+e%3,o=Math.floor(e/3);this.setFunctionModule(i,o,r),this.setFunctionModule(o,i,r)}}drawFinderPattern(e,t){for(let r=-4;r<=4;r++)for(let n=-4;n<=4;n++){let i=Math.max(Math.abs(n),Math.abs(r)),o=e+n,l=t+r;0<=o&&o{(e!=h-l||r>=a)&&d.push(t[e])});return i(d.length==s),d}drawCodewords(e){if(e.length!=Math.floor(t.getNumRawDataModules(this.version)/8))throw RangeError("Invalid argument");let r=0;for(let t=this.size-1;t>=1;t-=2){6==t&&(t=5);for(let i=0;i>>3],7-(7&r)),r++)}}i(r==8*e.length)}applyMask(e){if(e<0||e>7)throw RangeError("Mask value out of range");for(let t=0;t5&&e++:(this.finderPenaltyAddHistory(i,o),n||(e+=this.finderPenaltyCountPatterns(o)*t.PENALTY_N3),n=this.modules[r][l],i=1);e+=this.finderPenaltyTerminateAndCount(n,i,o)*t.PENALTY_N3}for(let r=0;r5&&e++:(this.finderPenaltyAddHistory(i,o),n||(e+=this.finderPenaltyCountPatterns(o)*t.PENALTY_N3),n=this.modules[l][r],i=1);e+=this.finderPenaltyTerminateAndCount(n,i,o)*t.PENALTY_N3}for(let r=0;re+(t?1:0),r);let n=this.size*this.size,o=Math.ceil(Math.abs(20*r-10*n)/n)-1;return i(0<=o&&o<=9),i(0<=(e+=o*t.PENALTY_N4)&&e<=2568888),e}getAlignmentPatternPositions(){if(1==this.version)return[];{let e=Math.floor(this.version/7)+2,t=32==this.version?26:2*Math.ceil((4*this.version+4)/(2*e-2)),r=[6];for(let n=this.size-7;r.lengtht.MAX_VERSION)throw RangeError("Version number out of range");let r=(16*e+128)*e+64;if(e>=2){let t=Math.floor(e/7)+2;r-=(25*t-10)*t-55,e>=7&&(r-=36)}return i(208<=r&&r<=29648),r}static getNumDataCodewords(e,r){return Math.floor(t.getNumRawDataModules(e)/8)-t.ECC_CODEWORDS_PER_BLOCK[r.ordinal][e]*t.NUM_ERROR_CORRECTION_BLOCKS[r.ordinal][e]}static reedSolomonComputeDivisor(e){if(e<1||e>255)throw RangeError("Degree out of range");let r=[];for(let t=0;t0);for(let i of e){let e=i^n.shift();n.push(0),r.forEach((r,i)=>n[i]^=t.reedSolomonMultiply(r,e))}return n}static reedSolomonMultiply(e,t){if(e>>>8!=0||t>>>8!=0)throw RangeError("Byte out of range");let r=0;for(let n=7;n>=0;n--)r=r<<1^(r>>>7)*285^(t>>>n&1)*e;return i(r>>>8==0),r}finderPenaltyCountPatterns(e){let t=e[1];i(t<=3*this.size);let r=t>0&&e[2]==t&&e[3]==3*t&&e[4]==t&&e[5]==t;return(r&&e[0]>=4*t&&e[6]>=t?1:0)+(r&&e[6]>=4*t&&e[0]>=t?1:0)}finderPenaltyTerminateAndCount(e,t,r){return e&&(this.finderPenaltyAddHistory(t,r),t=0),t+=this.size,this.finderPenaltyAddHistory(t,r),this.finderPenaltyCountPatterns(r)}finderPenaltyAddHistory(e,t){0==t[0]&&(e+=this.size),t.pop(),t.unshift(e)}};function r(e,t,r){if(t<0||t>31||e>>>t!=0)throw RangeError("Value out of range");for(let n=t-1;n>=0;n--)r.push(e>>>n&1)}function n(e,t){return(e>>>t&1)!=0}function i(e){if(!e)throw Error("Assertion error")}t.MIN_VERSION=1,t.MAX_VERSION=40,t.PENALTY_N1=3,t.PENALTY_N2=3,t.PENALTY_N3=40,t.PENALTY_N4=10,t.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],t.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=t;let o=class{constructor(e,t,r){if(this.mode=e,this.numChars=t,this.bitData=r,t<0)throw RangeError("Invalid argument");this.bitData=r.slice()}static makeBytes(e){let t=[];for(let n of e)r(n,8,t);return new o(o.Mode.BYTE,e.length,t)}static makeNumeric(e){if(!o.isNumeric(e))throw RangeError("String contains non-numeric characters");let t=[];for(let n=0;n=1<{(e=>{let t=class{constructor(e,t){this.ordinal=e,this.formatBits=t}};t.LOW=new t(0,1),t.MEDIUM=new t(1,0),t.QUARTILE=new t(2,3),t.HIGH=new t(3,2),e.Ecc=t})(e.QrCode||(e.QrCode={}))})(n||(n={})),(e=>{(e=>{let t=class{constructor(e,t){this.modeBits=e,this.numBitsCharCount=t}numCharCountBits(e){return this.numBitsCharCount[Math.floor((e+7)/17)]}};t.NUMERIC=new t(1,[10,12,14]),t.ALPHANUMERIC=new t(2,[9,11,13]),t.BYTE=new t(4,[8,16,16]),t.KANJI=new t(8,[8,10,12]),t.ECI=new t(7,[0,0,0]),e.Mode=t})(e.QrSegment||(e.QrSegment={}))})(n||(n={}));var d=n,f={L:d.QrCode.Ecc.LOW,M:d.QrCode.Ecc.MEDIUM,Q:d.QrCode.Ecc.QUARTILE,H:d.QrCode.Ecc.HIGH},m="#FFFFFF",g="#000000";function E(e,t=0){let r=[];return e.forEach(function(e,n){let i=null;e.forEach(function(o,l){if(!o&&null!==i){r.push(`M${i+t} ${n+t}h${l-i}v1H${i+t}z`),i=null;return}if(l===e.length-1){if(!o)return;null===i?r.push(`M${l+t},${n+t} h1v1H${l+t}z`):r.push(`M${i+t},${n+t} h${l+1-i}v1H${i+t}z`);return}o&&null===i&&(i=l)})}),r.join("")}function M(e,t){return e.slice().map((e,r)=>r=t.y+t.h?e:e.map((e,r)=>(r=t.x+t.w)&&e))}function C(e,t,r,n){if(null==n)return null;let i=e.length+2*(r?4:0),o=Math.floor(.1*t),l=i/t,s=(n.width||o)*l,a=(n.height||o)*l,h=null==n.x?e.length/2-s/2:n.x*l,u=null==n.y?e.length/2-a/2:n.y*l,c=null;if(n.excavate){let e=Math.floor(h),t=Math.floor(u);c={x:e,y:t,w:Math.ceil(s+h-e),h:Math.ceil(a+u-t)}}return{x:h,y:u,h:a,w:s,excavation:c}}var R=function(){try{new Path2D().addPath(new Path2D)}catch(e){return!1}return!0}();function w(e){let{value:t,size:r=128,level:n="L",bgColor:o=m,fgColor:l=g,includeMargin:s=!1,style:a,imageSettings:h}=e,w=c(e,["value","size","level","bgColor","fgColor","includeMargin","style","imageSettings"]),A=null==h?void 0:h.src,N=i.useRef(null),p=i.useRef(null),[P,y]=i.useState(!1);i.useEffect(()=>{if(null!=N.current){let e=N.current,i=e.getContext("2d");if(!i)return;let a=d.QrCode.encodeText(t,f[n]).getModules(),u=s?4:0,c=a.length+2*u,m=C(a,r,s,h),g=p.current,w=null!=m&&null!==g&&g.complete&&0!==g.naturalHeight&&0!==g.naturalWidth;w&&null!=m.excavation&&(a=M(a,m.excavation));let A=window.devicePixelRatio||1;e.height=e.width=r*A;let P=r/c*A;i.scale(P,P),i.fillStyle=o,i.fillRect(0,0,c,c),i.fillStyle=l,R?i.fill(new Path2D(E(a,u))):a.forEach(function(e,t){e.forEach(function(e,r){e&&i.fillRect(r+u,t+u,1,1)})}),w&&i.drawImage(g,m.x+u,m.y+u,m.w,m.h)}}),i.useEffect(()=>{y(!1)},[A]);let v=u({height:r,width:r},a),I=null;return null!=A&&(I=i.createElement("img",{src:A,key:A,style:{display:"none"},onLoad:()=>{y(!0)},ref:p})),i.createElement(i.Fragment,null,i.createElement("canvas",u({style:v,height:r,width:r,ref:N},w)),I)}function A(e){let{value:t,size:r=128,level:n="L",bgColor:o=m,fgColor:l=g,includeMargin:s=!1,imageSettings:a}=e,h=c(e,["value","size","level","bgColor","fgColor","includeMargin","imageSettings"]),R=d.QrCode.encodeText(t,f[n]).getModules(),w=s?4:0,A=R.length+2*w,N=C(R,r,s,a),p=null;null!=a&&null!=N&&(null!=N.excavation&&(R=M(R,N.excavation)),p=i.createElement("image",{xlinkHref:a.src,height:N.h,width:N.w,x:N.x+w,y:N.y+w,preserveAspectRatio:"none"}));let P=E(R,w);return i.createElement("svg",u({height:r,width:r,viewBox:`0 0 ${A} ${A}`},h),i.createElement("path",{fill:o,d:`M0,0 h${A}v${A}H0z`,shapeRendering:"crispEdges"}),i.createElement("path",{fill:l,d:P,shapeRendering:"crispEdges"}),p)}var N=e=>{let{renderAs:t}=e,r=c(e,["renderAs"]);return"svg"===t?i.createElement(A,u({},r)):i.createElement(w,u({},r))}}}; \ No newline at end of file diff --git a/frontend/.next/server/chunks/8049.js b/frontend/.next/server/chunks/8049.js new file mode 100644 index 0000000..f1446e8 --- /dev/null +++ b/frontend/.next/server/chunks/8049.js @@ -0,0 +1,14 @@ +"use strict";exports.id=8049,exports.ids=[8049],exports.modules={68049:(t,e,r)=>{r.r(e),r.d(e,{PhCaretUp:()=>n}),r(31325);var l=r(70460),o=r(75466),i=r(66005),a=r(28405),s=r(43961),p=Object.defineProperty,h=Object.getOwnPropertyDescriptor,d=(t,e,r,l)=>{for(var o,i=l>1?void 0:l?h(e,r):e,a=t.length-1;a>=0;a--)(o=t[a])&&(i=(l?o(e,r,i):o(i))||i);return l&&i&&p(e,r,i),i};let n=class extends o.oi{constructor(){super(...arguments),this.size="1em",this.weight="regular",this.color="currentColor",this.mirrored=!1}render(){var t;return(0,l.dy)` + ${n.weightsMap.get(null!=(t=this.weight)?t:"regular")} + `}};n.weightsMap=new Map([["thin",(0,l.YP)``],["light",(0,l.YP)``],["regular",(0,l.YP)``],["bold",(0,l.YP)``],["fill",(0,l.YP)``],["duotone",(0,l.YP)``]]),n.styles=(0,s.iv)` + :host { + display: contents; + } + `,d([(0,a.C)({type:String,reflect:!0})],n.prototype,"size",2),d([(0,a.C)({type:String,reflect:!0})],n.prototype,"weight",2),d([(0,a.C)({type:String,reflect:!0})],n.prototype,"color",2),d([(0,a.C)({type:Boolean,reflect:!0})],n.prototype,"mirrored",2),n=d([(0,i.M)("ph-caret-up")],n)}}; \ No newline at end of file diff --git a/frontend/.next/server/chunks/8082.js b/frontend/.next/server/chunks/8082.js new file mode 100644 index 0000000..5ddcce7 --- /dev/null +++ b/frontend/.next/server/chunks/8082.js @@ -0,0 +1,14 @@ +"use strict";exports.id=8082,exports.ids=[8082],exports.modules={68082:(a,t,e)=>{e.r(t),e.d(t,{PhTrash:()=>l}),e(31325);var r=e(70460),h=e(75466),V=e(66005),H=e(28405),o=e(43961),i=Object.defineProperty,s=Object.getOwnPropertyDescriptor,p=(a,t,e,r)=>{for(var h,V=r>1?void 0:r?s(t,e):t,H=a.length-1;H>=0;H--)(h=a[H])&&(V=(r?h(t,e,V):h(V))||V);return r&&V&&i(t,e,V),V};let l=class extends h.oi{constructor(){super(...arguments),this.size="1em",this.weight="regular",this.color="currentColor",this.mirrored=!1}render(){var a;return(0,r.dy)` + ${l.weightsMap.get(null!=(a=this.weight)?a:"regular")} + `}};l.weightsMap=new Map([["thin",(0,r.YP)``],["light",(0,r.YP)``],["regular",(0,r.YP)``],["bold",(0,r.YP)``],["fill",(0,r.YP)``],["duotone",(0,r.YP)``]]),l.styles=(0,o.iv)` + :host { + display: contents; + } + `,p([(0,H.C)({type:String,reflect:!0})],l.prototype,"size",2),p([(0,H.C)({type:String,reflect:!0})],l.prototype,"weight",2),p([(0,H.C)({type:String,reflect:!0})],l.prototype,"color",2),p([(0,H.C)({type:Boolean,reflect:!0})],l.prototype,"mirrored",2),l=p([(0,V.M)("ph-trash")],l)}}; \ No newline at end of file diff --git a/frontend/.next/server/chunks/8201.js b/frontend/.next/server/chunks/8201.js new file mode 100644 index 0000000..5b54e82 --- /dev/null +++ b/frontend/.next/server/chunks/8201.js @@ -0,0 +1,422 @@ +"use strict";exports.id=8201,exports.ids=[8201],exports.modules={8201:(e,t,r)=>{r.r(t),r.d(t,{W3mBuyInProgressView:()=>W,W3mOnRampProvidersView:()=>P,W3mOnrampFiatSelectView:()=>m,W3mOnrampTokensView:()=>B,W3mOnrampWidget:()=>N,W3mWhatIsABuyView:()=>M});var i=r(37207),o=r(90670),n=r(83479),s=r(80843),a=r(58488),c=r(3865),l=r(30288),u=r(20833),d=r(67668);r(64559),r(35606),r(44680),r(57751);let p=(0,d.iv)` + :host > wui-grid { + max-height: 360px; + overflow: auto; + } + + wui-flex { + transition: opacity ${({easings:e})=>e["ease-out-power-1"]} + ${({durations:e})=>e.md}; + will-change: opacity; + } + + wui-grid::-webkit-scrollbar { + display: none; + } + + wui-flex.disabled { + opacity: 0.3; + pointer-events: none; + user-select: none; + } +`;var h=function(e,t,r,i){var o,n=arguments.length,s=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s);return n>3&&s&&Object.defineProperty(t,r,s),s};let m=class extends i.oi{constructor(){super(),this.unsubscribe=[],this.selectedCurrency=s.ph.state.paymentCurrency,this.currencies=s.ph.state.paymentCurrencies,this.currencyImages=a.W.state.currencyImages,this.checked=c.M.state.isLegalCheckboxChecked,this.unsubscribe.push(s.ph.subscribe(e=>{this.selectedCurrency=e.paymentCurrency,this.currencies=e.paymentCurrencies}),a.W.subscribeKey("currencyImages",e=>this.currencyImages=e),c.M.subscribeKey("isLegalCheckboxChecked",e=>{this.checked=e}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){let{termsConditionsUrl:e,privacyPolicyUrl:t}=l.OptionsController.state,r=l.OptionsController.state.features?.legalCheckbox,o=!!(e||t)&&!!r&&!this.checked;return(0,i.dy)` + + + ${this.currenciesTemplate(o)} + + `}currenciesTemplate(e=!1){return this.currencies.map(t=>(0,i.dy)` + this.selectCurrency(t)} + variant="image" + tabIdx=${(0,n.o)(e?-1:void 0)} + > + ${t.id} + + `)}selectCurrency(e){e&&(s.ph.setPaymentCurrency(e),u.I.close())}};m.styles=p,h([(0,o.SB)()],m.prototype,"selectedCurrency",void 0),h([(0,o.SB)()],m.prototype,"currencies",void 0),h([(0,o.SB)()],m.prototype,"currencyImages",void 0),h([(0,o.SB)()],m.prototype,"checked",void 0),m=h([(0,d.Mo)("w3m-onramp-fiat-select-view")],m);var y=r(42772),w=r(14212),b=r(34862),f=r(77870),g=r(52180),v=r(73372),x=r(98673);r(98855),r(17035),r(1159),r(76806);let C=(0,d.iv)` + button { + padding: ${({spacing:e})=>e["3"]}; + border-radius: ${({borderRadius:e})=>e["4"]}; + border: none; + outline: none; + background-color: ${({tokens:e})=>e.core.glass010}; + width: 100%; + display: flex; + align-items: center; + justify-content: flex-start; + gap: ${({spacing:e})=>e["3"]}; + transition: background-color ${({easings:e})=>e["ease-out-power-1"]} + ${({durations:e})=>e.md}; + will-change: background-color; + cursor: pointer; + } + + button:hover { + background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; + } + + .provider-image { + width: ${({spacing:e})=>e["10"]}; + min-width: ${({spacing:e})=>e["10"]}; + height: ${({spacing:e})=>e["10"]}; + border-radius: calc( + ${({borderRadius:e})=>e["4"]} - calc(${({spacing:e})=>e["3"]} / 2) + ); + position: relative; + overflow: hidden; + } + + .network-icon { + width: ${({spacing:e})=>e["3"]}; + height: ${({spacing:e})=>e["3"]}; + border-radius: calc(${({spacing:e})=>e["3"]} / 2); + overflow: hidden; + box-shadow: + 0 0 0 3px ${({tokens:e})=>e.theme.foregroundPrimary}, + 0 0 0 3px ${({tokens:e})=>e.theme.backgroundPrimary}; + transition: box-shadow ${({easings:e})=>e["ease-out-power-1"]} + ${({durations:e})=>e.md}; + will-change: box-shadow; + } + + button:hover .network-icon { + box-shadow: + 0 0 0 3px ${({tokens:e})=>e.core.glass010}, + 0 0 0 3px ${({tokens:e})=>e.theme.backgroundPrimary}; + } +`;var $=function(e,t,r,i){var o,n=arguments.length,s=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s);return n>3&&s&&Object.defineProperty(t,r,s),s};let k=class extends i.oi{constructor(){super(...arguments),this.disabled=!1,this.color="inherit",this.label="",this.feeRange="",this.loading=!1,this.onClick=null}render(){return(0,i.dy)` + + `}networksTemplate(){let e=y.R.getAllRequestedCaipNetworks(),t=e?.filter(e=>e?.assets?.imageId)?.slice(0,5);return(0,i.dy)` + + ${t?.map(e=>i.dy` + + + + `)} + + `}};k.styles=[C],$([(0,o.Cb)({type:Boolean})],k.prototype,"disabled",void 0),$([(0,o.Cb)()],k.prototype,"color",void 0),$([(0,o.Cb)()],k.prototype,"name",void 0),$([(0,o.Cb)()],k.prototype,"label",void 0),$([(0,o.Cb)()],k.prototype,"feeRange",void 0),$([(0,o.Cb)({type:Boolean})],k.prototype,"loading",void 0),$([(0,o.Cb)()],k.prototype,"onClick",void 0),k=$([(0,d.Mo)("w3m-onramp-provider-item")],k),r(16150);var R=function(e,t,r,i){var o,n=arguments.length,s=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s);return n>3&&s&&Object.defineProperty(t,r,s),s};let P=class extends i.oi{constructor(){super(),this.unsubscribe=[],this.providers=s.ph.state.providers,this.unsubscribe.push(s.ph.subscribeKey("providers",e=>{this.providers=e}))}render(){return(0,i.dy)` + + ${this.onRampProvidersTemplate()} + + `}onRampProvidersTemplate(){return this.providers.filter(e=>e.supportedChains.includes(y.R.state.activeChain??"eip155")).map(e=>(0,i.dy)` + {this.onClickProvider(e)}} + ?disabled=${!e.url} + data-testid=${`onramp-provider-${e.name}`} + > + `)}onClickProvider(e){s.ph.setSelectedProvider(e),w.RouterController.push("BuyInProgress"),b.j.openHref(s.ph.state.selectedProvider?.url||e.url,"popupWindow","width=600,height=800,scrollbars=yes"),f.X.sendEvent({type:"track",event:"SELECT_BUY_PROVIDER",properties:{provider:e.name,isSmartAccount:(0,g.r9)(y.R.state.activeChain)===v.y_.ACCOUNT_TYPES.SMART_ACCOUNT}})}};R([(0,o.SB)()],P.prototype,"providers",void 0),P=R([(0,d.Mo)("w3m-onramp-providers-view")],P),r(10200);let I=(0,d.iv)` + :host > wui-grid { + max-height: 360px; + overflow: auto; + } + + wui-flex { + transition: opacity ${({easings:e})=>e["ease-out-power-1"]} + ${({durations:e})=>e.md}; + will-change: opacity; + } + + wui-grid::-webkit-scrollbar { + display: none; + } + + wui-flex.disabled { + opacity: 0.3; + pointer-events: none; + user-select: none; + } +`;var O=function(e,t,r,i){var o,n=arguments.length,s=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s);return n>3&&s&&Object.defineProperty(t,r,s),s};let B=class extends i.oi{constructor(){super(),this.unsubscribe=[],this.selectedCurrency=s.ph.state.purchaseCurrencies,this.tokens=s.ph.state.purchaseCurrencies,this.tokenImages=a.W.state.tokenImages,this.checked=c.M.state.isLegalCheckboxChecked,this.unsubscribe.push(s.ph.subscribe(e=>{this.selectedCurrency=e.purchaseCurrencies,this.tokens=e.purchaseCurrencies}),a.W.subscribeKey("tokenImages",e=>this.tokenImages=e),c.M.subscribeKey("isLegalCheckboxChecked",e=>{this.checked=e}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){let{termsConditionsUrl:e,privacyPolicyUrl:t}=l.OptionsController.state,r=l.OptionsController.state.features?.legalCheckbox,o=!!(e||t)&&!!r&&!this.checked;return(0,i.dy)` + + + ${this.currenciesTemplate(o)} + + `}currenciesTemplate(e=!1){return this.tokens.map(t=>(0,i.dy)` + this.selectToken(t)} + variant="image" + tabIdx=${(0,n.o)(e?-1:void 0)} + > + + ${t.name} + ${t.symbol} + + + `)}selectToken(e){e&&(s.ph.setPurchaseCurrency(e),u.I.close())}};B.styles=I,O([(0,o.SB)()],B.prototype,"selectedCurrency",void 0),O([(0,o.SB)()],B.prototype,"tokens",void 0),O([(0,o.SB)()],B.prototype,"tokenImages",void 0),O([(0,o.SB)()],B.prototype,"checked",void 0),B=O([(0,d.Mo)("w3m-onramp-token-select-view")],B);var S=r(71263),A=r(71106),j=r(61741);r(3966),r(4030),r(2427),r(92383);let T=(0,d.iv)` + @keyframes shake { + 0% { + transform: translateX(0); + } + 25% { + transform: translateX(3px); + } + 50% { + transform: translateX(-3px); + } + 75% { + transform: translateX(3px); + } + 100% { + transform: translateX(0); + } + } + + wui-flex:first-child:not(:only-child) { + position: relative; + } + + wui-loading-thumbnail { + position: absolute; + } + + wui-visual { + border-radius: calc( + ${({borderRadius:e})=>e["1"]} * 9 - ${({borderRadius:e})=>e["3"]} + ); + position: relative; + overflow: hidden; + } + + wui-icon-box { + position: absolute; + right: calc(${({spacing:e})=>e["1"]} * -1); + bottom: calc(${({spacing:e})=>e["1"]} * -1); + opacity: 0; + transform: scale(0.5); + transition: + opacity ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]}, + transform ${({durations:e})=>e.lg} + ${({easings:e})=>e["ease-out-power-2"]}; + will-change: opacity, transform; + } + + wui-text[align='center'] { + width: 100%; + padding: 0px ${({spacing:e})=>e["4"]}; + } + + [data-error='true'] wui-icon-box { + opacity: 1; + transform: scale(1); + } + + [data-error='true'] > wui-flex:first-child { + animation: shake 250ms ${({easings:e})=>e["ease-out-power-2"]} both; + } + + [data-retry='false'] wui-link { + display: none; + } + + [data-retry='true'] wui-link { + display: block; + opacity: 1; + } + + wui-link { + padding: ${({spacing:e})=>e["01"]} ${({spacing:e})=>e["2"]}; + } +`;var D=function(e,t,r,i){var o,n=arguments.length,s=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s);return n>3&&s&&Object.defineProperty(t,r,s),s};let W=class extends i.oi{constructor(){super(),this.unsubscribe=[],this.selectedOnRampProvider=s.ph.state.selectedProvider,this.uri=S.ConnectionController.state.wcUri,this.ready=!1,this.showRetry=!1,this.buffering=!1,this.error=!1,this.isMobile=!1,this.onRetry=void 0,this.unsubscribe.push(s.ph.subscribeKey("selectedProvider",e=>{this.selectedOnRampProvider=e}))}disconnectedCallback(){this.intervalId&&clearInterval(this.intervalId)}render(){let e="Continue in external window";this.error?e="Buy failed":this.selectedOnRampProvider&&(e=`Buy in ${this.selectedOnRampProvider?.label}`);let t=this.error?"Buy can be declined from your side or due to and error on the provider app":`We’ll notify you once your Buy is processed`;return(0,i.dy)` + + + + + + ${this.error?null:this.loaderTemplate()} + + + + + + + ${e} + + ${t} + + + ${this.error?this.tryAgainTemplate():null} + + + + + + Copy link + + + `}onTryAgain(){this.selectedOnRampProvider&&(this.error=!1,b.j.openHref(this.selectedOnRampProvider.url,"popupWindow","width=600,height=800,scrollbars=yes"))}tryAgainTemplate(){return this.selectedOnRampProvider?.url?(0,i.dy)` + + Try again + `:null}loaderTemplate(){let e=A.ThemeController.state.themeVariables["--w3m-border-radius-master"],t=e?parseInt(e.replace("px",""),10):4;return(0,i.dy)``}onCopyUri(){if(!this.selectedOnRampProvider?.url){j.SnackController.showError("No link found"),w.RouterController.goBack();return}try{b.j.copyToClopboard(this.selectedOnRampProvider.url),j.SnackController.showSuccess("Link copied")}catch{j.SnackController.showError("Failed to copy")}}};W.styles=T,D([(0,o.SB)()],W.prototype,"intervalId",void 0),D([(0,o.SB)()],W.prototype,"selectedOnRampProvider",void 0),D([(0,o.SB)()],W.prototype,"uri",void 0),D([(0,o.SB)()],W.prototype,"ready",void 0),D([(0,o.SB)()],W.prototype,"showRetry",void 0),D([(0,o.SB)()],W.prototype,"buffering",void 0),D([(0,o.SB)()],W.prototype,"error",void 0),D([(0,o.Cb)({type:Boolean})],W.prototype,"isMobile",void 0),D([(0,o.Cb)()],W.prototype,"onRetry",void 0),W=D([(0,d.Mo)("w3m-buy-in-progress-view")],W);let M=class extends i.oi{render(){return(0,i.dy)` + + + + + Quickly and easily buy digital assets! + + + Simply select your preferred onramp provider and add digital assets to your account + using your credit card or bank transfer + + + + + Buy + + + `}};M=function(e,t,r,i){var o,n=arguments.length,s=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s);return n>3&&s&&Object.defineProperty(t,r,s),s}([(0,d.Mo)("w3m-what-is-a-buy-view")],M),r(34018);let L=(0,d.iv)` + :host { + width: 100%; + } + + wui-loading-spinner { + position: absolute; + top: 50%; + right: 20px; + transform: translateY(-50%); + } + + .currency-container { + position: absolute; + top: 50%; + transform: translateY(-50%); + right: ${({spacing:e})=>e["2"]}; + height: 40px; + padding: ${({spacing:e})=>e["2"]} ${({spacing:e})=>e["2"]} + ${({spacing:e})=>e["2"]} ${({spacing:e})=>e["2"]}; + min-width: 95px; + border-radius: ${({borderRadius:e})=>e.round}; + border: 1px solid ${({tokens:e})=>e.theme.foregroundPrimary}; + background: ${({tokens:e})=>e.theme.foregroundPrimary}; + cursor: pointer; + } + + .currency-container > wui-image { + height: 24px; + width: 24px; + border-radius: 50%; + } +`;var z=function(e,t,r,i){var o,n=arguments.length,s=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s);return n>3&&s&&Object.defineProperty(t,r,s),s};let E=class extends i.oi{constructor(){super(),this.unsubscribe=[],this.type="Token",this.value=0,this.currencies=[],this.selectedCurrency=this.currencies?.[0],this.currencyImages=a.W.state.currencyImages,this.tokenImages=a.W.state.tokenImages,this.unsubscribe.push(s.ph.subscribeKey("purchaseCurrency",e=>{e&&"Fiat"!==this.type&&(this.selectedCurrency=this.formatPurchaseCurrency(e))}),s.ph.subscribeKey("paymentCurrency",e=>{e&&"Token"!==this.type&&(this.selectedCurrency=this.formatPaymentCurrency(e))}),s.ph.subscribe(e=>{"Fiat"===this.type?this.currencies=e.purchaseCurrencies.map(this.formatPurchaseCurrency):this.currencies=e.paymentCurrencies.map(this.formatPaymentCurrency)}),a.W.subscribe(e=>{this.currencyImages={...e.currencyImages},this.tokenImages={...e.tokenImages}}))}firstUpdated(){s.ph.getAvailableCurrencies()}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){let e=this.selectedCurrency?.symbol||"",t=this.currencyImages[e]||this.tokenImages[e];return(0,i.dy)` + ${this.selectedCurrency?(0,i.dy)` u.I.open({view:`OnRamp${this.type}Select`})} + > + + ${this.selectedCurrency.symbol} + `:(0,i.dy)``} + `}formatPaymentCurrency(e){return{name:e.id,symbol:e.id}}formatPurchaseCurrency(e){return{name:e.name,symbol:e.symbol}}};E.styles=L,z([(0,o.Cb)({type:String})],E.prototype,"type",void 0),z([(0,o.Cb)({type:Number})],E.prototype,"value",void 0),z([(0,o.SB)()],E.prototype,"currencies",void 0),z([(0,o.SB)()],E.prototype,"selectedCurrency",void 0),z([(0,o.SB)()],E.prototype,"currencyImages",void 0),z([(0,o.SB)()],E.prototype,"tokenImages",void 0),E=z([(0,d.Mo)("w3m-onramp-input")],E);let K=(0,d.iv)` + :host > wui-flex { + width: 100%; + max-width: 360px; + } + + :host > wui-flex > wui-flex { + border-radius: ${({borderRadius:e})=>e["8"]}; + width: 100%; + } + + .amounts-container { + width: 100%; + } +`;var U=function(e,t,r,i){var o,n=arguments.length,s=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s);return n>3&&s&&Object.defineProperty(t,r,s),s};let q={USD:"$",EUR:"€",GBP:"\xa3"},V=[100,250,500,1e3],N=class extends i.oi{constructor(){super(),this.unsubscribe=[],this.disabled=!1,this.caipAddress=y.R.state.activeCaipAddress,this.loading=u.I.state.loading,this.paymentCurrency=s.ph.state.paymentCurrency,this.paymentAmount=s.ph.state.paymentAmount,this.purchaseAmount=s.ph.state.purchaseAmount,this.quoteLoading=s.ph.state.quotesLoading,this.unsubscribe.push(y.R.subscribeKey("activeCaipAddress",e=>this.caipAddress=e),u.I.subscribeKey("loading",e=>{this.loading=e}),s.ph.subscribe(e=>{this.paymentCurrency=e.paymentCurrency,this.paymentAmount=e.paymentAmount,this.purchaseAmount=e.purchaseAmount,this.quoteLoading=e.quotesLoading}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return(0,i.dy)` + + + + + + ${V.map(e=>(0,i.dy)`this.selectPresetAmount(e)} + >${`${q[this.paymentCurrency?.id||"USD"]} ${e}`}`)} + + ${this.templateButton()} + + + `}templateButton(){return this.caipAddress?(0,i.dy)` + Get quotes + `:(0,i.dy)` + Connect wallet + `}getQuotes(){this.loading||u.I.open({view:"OnRampProviders"})}openModal(){u.I.open({view:"Connect"})}async onPaymentAmountChange(e){s.ph.setPaymentAmount(Number(e.detail)),await s.ph.getQuote()}async selectPresetAmount(e){s.ph.setPaymentAmount(e),await s.ph.getQuote()}};N.styles=K,U([(0,o.Cb)({type:Boolean})],N.prototype,"disabled",void 0),U([(0,o.SB)()],N.prototype,"caipAddress",void 0),U([(0,o.SB)()],N.prototype,"loading",void 0),U([(0,o.SB)()],N.prototype,"paymentCurrency",void 0),U([(0,o.SB)()],N.prototype,"paymentAmount",void 0),U([(0,o.SB)()],N.prototype,"purchaseAmount",void 0),U([(0,o.SB)()],N.prototype,"quoteLoading",void 0),N=U([(0,d.Mo)("w3m-onramp-widget")],N)},17035:(e,t,r)=>{r(68865)}}; \ No newline at end of file diff --git a/frontend/.next/server/chunks/8281.js b/frontend/.next/server/chunks/8281.js new file mode 100644 index 0000000..dbaacff --- /dev/null +++ b/frontend/.next/server/chunks/8281.js @@ -0,0 +1 @@ +"use strict";exports.id=8281,exports.ids=[8281],exports.modules={80486:(t,e,r)=>{r.d(e,{CH:()=>e9});var n=r(1633),i=r(23791);let a={};function s(t,e){let r=!1;return e<0&&(r=!0,e*=-1),new u(a,`${r?"":"u"}int${e}`,t,{signed:r,width:e})}function o(t,e){return new u(a,`bytes${e||""}`,t,{size:e})}let l=Symbol.for("_ethers_typed");class u{type;value;#t;_typedSymbol;constructor(t,e,r,s){null==s&&(s=null),(0,n.NK)(a,t,"Typed"),(0,i.h)(this,{_typedSymbol:l,type:e,value:r}),this.#t=s,this.format()}format(){if("array"===this.type||"dynamicArray"===this.type)throw Error("");return"tuple"===this.type?`tuple(${this.value.map(t=>t.format()).join(",")})`:this.type}defaultValue(){return 0}minValue(){return 0}maxValue(){return 0}isBigInt(){return!!this.type.match(/^u?int[0-9]+$/)}isData(){return this.type.startsWith("bytes")}isString(){return"string"===this.type}get tupleName(){if("tuple"!==this.type)throw TypeError("not a tuple");return this.#t}get arrayLength(){if("array"!==this.type)throw TypeError("not an array");return!0===this.#t?-1:!1===this.#t?this.value.length:null}static from(t,e){return new u(a,t,e)}static uint8(t){return s(t,8)}static uint16(t){return s(t,16)}static uint24(t){return s(t,24)}static uint32(t){return s(t,32)}static uint40(t){return s(t,40)}static uint48(t){return s(t,48)}static uint56(t){return s(t,56)}static uint64(t){return s(t,64)}static uint72(t){return s(t,72)}static uint80(t){return s(t,80)}static uint88(t){return s(t,88)}static uint96(t){return s(t,96)}static uint104(t){return s(t,104)}static uint112(t){return s(t,112)}static uint120(t){return s(t,120)}static uint128(t){return s(t,128)}static uint136(t){return s(t,136)}static uint144(t){return s(t,144)}static uint152(t){return s(t,152)}static uint160(t){return s(t,160)}static uint168(t){return s(t,168)}static uint176(t){return s(t,176)}static uint184(t){return s(t,184)}static uint192(t){return s(t,192)}static uint200(t){return s(t,200)}static uint208(t){return s(t,208)}static uint216(t){return s(t,216)}static uint224(t){return s(t,224)}static uint232(t){return s(t,232)}static uint240(t){return s(t,240)}static uint248(t){return s(t,248)}static uint256(t){return s(t,256)}static uint(t){return s(t,256)}static int8(t){return s(t,-8)}static int16(t){return s(t,-16)}static int24(t){return s(t,-24)}static int32(t){return s(t,-32)}static int40(t){return s(t,-40)}static int48(t){return s(t,-48)}static int56(t){return s(t,-56)}static int64(t){return s(t,-64)}static int72(t){return s(t,-72)}static int80(t){return s(t,-80)}static int88(t){return s(t,-88)}static int96(t){return s(t,-96)}static int104(t){return s(t,-104)}static int112(t){return s(t,-112)}static int120(t){return s(t,-120)}static int128(t){return s(t,-128)}static int136(t){return s(t,-136)}static int144(t){return s(t,-144)}static int152(t){return s(t,-152)}static int160(t){return s(t,-160)}static int168(t){return s(t,-168)}static int176(t){return s(t,-176)}static int184(t){return s(t,-184)}static int192(t){return s(t,-192)}static int200(t){return s(t,-200)}static int208(t){return s(t,-208)}static int216(t){return s(t,-216)}static int224(t){return s(t,-224)}static int232(t){return s(t,-232)}static int240(t){return s(t,-240)}static int248(t){return s(t,-248)}static int256(t){return s(t,-256)}static int(t){return s(t,-256)}static bytes1(t){return o(t,1)}static bytes2(t){return o(t,2)}static bytes3(t){return o(t,3)}static bytes4(t){return o(t,4)}static bytes5(t){return o(t,5)}static bytes6(t){return o(t,6)}static bytes7(t){return o(t,7)}static bytes8(t){return o(t,8)}static bytes9(t){return o(t,9)}static bytes10(t){return o(t,10)}static bytes11(t){return o(t,11)}static bytes12(t){return o(t,12)}static bytes13(t){return o(t,13)}static bytes14(t){return o(t,14)}static bytes15(t){return o(t,15)}static bytes16(t){return o(t,16)}static bytes17(t){return o(t,17)}static bytes18(t){return o(t,18)}static bytes19(t){return o(t,19)}static bytes20(t){return o(t,20)}static bytes21(t){return o(t,21)}static bytes22(t){return o(t,22)}static bytes23(t){return o(t,23)}static bytes24(t){return o(t,24)}static bytes25(t){return o(t,25)}static bytes26(t){return o(t,26)}static bytes27(t){return o(t,27)}static bytes28(t){return o(t,28)}static bytes29(t){return o(t,29)}static bytes30(t){return o(t,30)}static bytes31(t){return o(t,31)}static bytes32(t){return o(t,32)}static address(t){return new u(a,"address",t)}static bool(t){return new u(a,"bool",!!t)}static bytes(t){return new u(a,"bytes",t)}static string(t){return new u(a,"string",t)}static array(t,e){throw Error("not implemented yet")}static tuple(t,e){throw Error("not implemented yet")}static overrides(t){return new u(a,"overrides",Object.assign({},t))}static isTyped(t){return t&&"object"==typeof t&&"_typedSymbol"in t&&t._typedSymbol===l}static dereference(t,e){if(u.isTyped(t)){if(t.type!==e)throw Error(`invalid type: expecetd ${e}, got ${t.type}`);return t.value}return t}}function c(t){if(!Number.isSafeInteger(t)||t<0)throw Error(`Wrong positive integer: ${t}`)}function h(t,...e){if(!(t instanceof Uint8Array))throw Error("Expected Uint8Array");if(e.length>0&&!e.includes(t.length))throw Error(`Expected Uint8Array of length ${e}, not of length=${t.length}`)}function f(t,e=!0){if(t.destroyed)throw Error("Hash instance has been destroyed");if(e&&t.finished)throw Error("Hash#digest() has already been called")}let d=BigInt(4294967296-1),p=BigInt(32),g=(t,e,r)=>t<>>32-r,m=(t,e,r)=>e<>>32-r,y=(t,e,r)=>e<>>64-r,b=(t,e,r)=>t<>>64-r,w=t=>t instanceof Uint8Array,v=t=>new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4));if(68!==new Uint8Array(new Uint32Array([287454020]).buffer)[0])throw Error("Non little-endian hardware is not supported");function E(t){if("string"==typeof t&&(t=function(t){if("string"!=typeof t)throw Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}(t)),!w(t))throw Error(`expected Uint8Array, got ${typeof t}`);return t}class N{clone(){return this._cloneInto()}}let[T,x,O]=[[],[],[]],k=BigInt(0),A=BigInt(1),R=BigInt(2),P=BigInt(7),I=BigInt(256),U=BigInt(113);for(let t=0,e=A,r=1,n=0;t<24;t++){[r,n]=[n,(2*r+3*n)%5],T.push(2*(5*n+r)),x.push((t+1)*(t+2)/2%64);let i=k;for(let t=0;t<7;t++)(e=(e<>P)*U)%I)&R&&(i^=A<<(A<>p&d)}:{h:0|Number(t>>p&d),l:0|Number(t&d)}}(t[i],e);[r[i],n[i]]=[a,s]}return[r,n]}(O,!0),S=(t,e,r)=>r>32?y(t,e,r):g(t,e,r),F=(t,e,r)=>r>32?b(t,e,r):m(t,e,r);class L extends N{constructor(t,e,r,n=!1,i=24){if(super(),this.blockLen=t,this.suffix=e,this.outputLen=r,this.enableXOF=n,this.rounds=i,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,c(r),0>=this.blockLen||this.blockLen>=200)throw Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=v(this.state)}keccak(){(function(t,e=24){let r=new Uint32Array(10);for(let n=24-e;n<24;n++){for(let e=0;e<10;e++)r[e]=t[e]^t[e+10]^t[e+20]^t[e+30]^t[e+40];for(let e=0;e<10;e+=2){let n=(e+8)%10,i=(e+2)%10,a=r[i],s=r[i+1],o=S(a,s,1)^r[n],l=F(a,s,1)^r[n+1];for(let r=0;r<50;r+=10)t[e+r]^=o,t[e+r+1]^=l}let e=t[2],i=t[3];for(let r=0;r<24;r++){let n=x[r],a=S(e,i,n),s=F(e,i,n),o=T[r];e=t[o],i=t[o+1],t[o]=a,t[o+1]=s}for(let e=0;e<50;e+=10){for(let n=0;n<10;n++)r[n]=t[e+n];for(let n=0;n<10;n++)t[e+n]^=~r[(n+2)%10]&r[(n+4)%10]}t[0]^=_[n],t[1]^=C[n]}r.fill(0)})(this.state32,this.rounds),this.posOut=0,this.pos=0}update(t){f(this);let{blockLen:e,state:r}=this,n=(t=E(t)).length;for(let i=0;i=r&&this.keccak();let a=Math.min(r-this.posOut,i-n);t.set(e.subarray(this.posOut,this.posOut+a),n),this.posOut+=a,n+=a}return t}xofInto(t){if(!this.enableXOF)throw Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return c(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(function(t,e){h(t);let r=e.outputLen;if(t.lengtht().update(E(e)).digest(),r=t();return e.outputLen=r.outputLen,e.blockLen=r.blockLen,e.create=()=>t(),e}(()=>new L(136,1,32));var j=r(69349);let D=!1,$=function(t){return B(t)},M=$;function V(t){let e=(0,j.Pw)(t,"data");return(0,j.Dv)(M(e))}V._=$,V.lock=function(){D=!0},V.register=function(t){if(D)throw TypeError("keccak256 is locked");M=t},Object.freeze(V);var z=r(34251);function G(t){return V((0,z.Y0)(t))}var H=r(71112);let q=new Uint8Array(32),J=["then"],K={},W=new WeakMap;function Z(t){return W.get(t)}function Y(t,e){let r=Error(`deferred error during ABI decoding triggered accessing ${t}`);throw r.error=e,r}class X extends Array{#e;constructor(...t){var e,r;let n=t[0],i=t[1],a=(t[2]||[]).slice(),s=!0;n!==K&&(i=t,a=[],s=!1),super(i.length),i.forEach((t,e)=>{this[e]=t});let o=a.reduce((t,e)=>("string"==typeof e&&t.set(e,(t.get(e)||0)+1),t),new Map);if(e=Object.freeze(i.map((t,e)=>{let r=a[e];return null!=r&&1===o.get(r)?r:null})),W.set(this,e),this.#e=[],null==this.#e&&this.#e,!s)return;Object.freeze(this);let l=new Proxy(this,{get:(t,e,r)=>{if("string"==typeof e){if(e.match(/^[0-9]+$/)){let r=(0,H.Dx)(e,"%index");if(r<0||r>=this.length)throw RangeError("out of result range");let n=t[r];return n instanceof Error&&Y(`index ${r}`,n),n}if(J.indexOf(e)>=0)return Reflect.get(t,e,r);let n=t[e];if(n instanceof Function)return function(...e){return n.apply(this===r?t:this,e)};if(!(e in t))return t.getValue.apply(this===r?t:this,[e])}return Reflect.get(t,e,r)}});return r=Z(this),W.set(l,r),l}toArray(t){let e=[];return this.forEach((r,n)=>{r instanceof Error&&Y(`index ${n}`,r),t&&r instanceof X&&(r=r.toArray(t)),e.push(r)}),e}toObject(t){let e=Z(this);return e.reduce((r,i,a)=>((0,n.hu)(null!=i,`value at index ${a} unnamed`,"UNSUPPORTED_OPERATION",{operation:"toObject()"}),function t(e,r,n){return e.indexOf(null)>=0?r.map((e,r)=>e instanceof X?t(Z(e),e,n):e):e.reduce((e,i,a)=>{let s=r.getValue(i);return i in e||(n&&s instanceof X&&(s=t(Z(s),s,n)),e[i]=s),e},{})}(e,this,t)),{})}slice(t,e){null==t&&(t=0),t<0&&(t+=this.length)<0&&(t=0),null==e&&(e=this.length),e<0&&(e+=this.length)<0&&(e=0),e>this.length&&(e=this.length);let r=Z(this),n=[],i=[];for(let a=t;a{this.#r[t]=Q(e)}}}class tr{allowLoose;#r;#a;#s;#o;#l;constructor(t,e,r){(0,i.h)(this,{allowLoose:!!e}),this.#r=(0,j.h_)(t),this.#s=0,this.#o=null,this.#l=null!=r?r:1024,this.#a=0}get data(){return(0,j.Dv)(this.#r)}get dataLength(){return this.#r.length}get consumed(){return this.#a}get bytes(){return new Uint8Array(this.#r)}#u(t){if(this.#o)return this.#o.#u(t);this.#s+=t,(0,n.hu)(this.#l<1||this.#s<=this.#l*this.dataLength,`compressed ABI data exceeds inflation ratio of ${this.#l} ( see: https://github.com/ethers-io/ethers.js/issues/4537 )`,"BUFFER_OVERRUN",{buffer:(0,j.h_)(this.#r),offset:this.#a,length:t,info:{bytesRead:this.#s,dataLength:this.dataLength}})}#c(t,e,r){let i=32*Math.ceil(e/32);return this.#a+i>this.#r.length&&(this.allowLoose&&r&&this.#a+e<=this.#r.length?i=e:(0,n.hu)(!1,"data out-of-bounds","BUFFER_OVERRUN",{buffer:(0,j.h_)(this.#r),length:this.#r.length,offset:this.#a+i})),this.#r.slice(this.#a,this.#a+i)}subReader(t){let e=new tr(this.#r.slice(this.#a+t),this.allowLoose,this.#l);return e.#o=this,e}readBytes(t,e){let r=this.#c(0,t,!!e);return this.#u(t),this.#a+=r.length,r.slice(0,t)}readValue(){return(0,H.Gh)(this.readBytes(32))}readIndex(){return(0,H.He)(this.readBytes(32))}}let tn=BigInt(0),ti=BigInt(36);function ta(t){let e=(t=t.toLowerCase()).substring(2).split(""),r=new Uint8Array(40);for(let t=0;t<40;t++)r[t]=e[t].charCodeAt(0);let n=(0,j.Pw)(V(r));for(let t=0;t<40;t+=2)n[t>>1]>>4>=8&&(e[t]=e[t].toUpperCase()),(15&n[t>>1])>=8&&(e[t+1]=e[t+1].toUpperCase());return"0x"+e.join("")}let ts={};for(let t=0;t<10;t++)ts[String(t)]=String(t);for(let t=0;t<26;t++)ts[String.fromCharCode(65+t)]=String(10+t);let to=function(){let t={};for(let e=0;e<36;e++)t["0123456789abcdefghijklmnopqrstuvwxyz"[e]]=BigInt(e);return t}();function tl(t){if((0,n.en)("string"==typeof t,"invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/)){t.startsWith("0x")||(t="0x"+t);let e=ta(t);return(0,n.en)(!t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)||e===t,"bad address checksum","address",t),e}if(t.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){(0,n.en)(t.substring(2,4)===function(t){let e=(t=(t=t.toUpperCase()).substring(4)+t.substring(0,2)+"00").split("").map(t=>ts[t]).join("");for(;e.length>=15;){let t=e.substring(0,15);e=parseInt(t,10)%97+e.substring(t.length)}let r=String(98-parseInt(e,10)%97);for(;r.length<2;)r="0"+r;return r}(t),"bad icap checksum","address",t);let e=(function(t){t=t.toLowerCase();let e=tn;for(let r=0;r{let i=e.localName;return(0,n.hu)(i,"cannot encode object for signature with missing names","INVALID_ARGUMENT",{argument:"values",info:{coder:e},value:r}),(0,n.hu)(!t[i],"cannot encode object for signature with duplicate names","INVALID_ARGUMENT",{argument:"values",info:{coder:e},value:r}),t[i]=!0,r[i]})}else(0,n.en)(!1,"invalid tuple value","tuple",r);(0,n.en)(e.length===i.length,"types/value length mismatch","tuple",r);let a=new te,s=new te,o=[];return e.forEach((t,e)=>{let r=i[e];if(t.dynamic){let e=s.length;t.encode(s,r);let n=a.writeUpdatableValue();o.push(t=>{n(t+e)})}else t.encode(a,r)}),o.forEach(t=>{t(a.length)}),t.appendWriter(a)+t.appendWriter(s)}function tf(t,e){let r=[],i=[],a=t.subReader(0);return e.forEach(e=>{let s=null;if(e.dynamic){let r=t.readIndex(),i=a.subReader(r);try{s=e.decode(i)}catch(t){if((0,n.VZ)(t,"BUFFER_OVERRUN"))throw t;(s=t).baseType=e.name,s.name=e.localName,s.type=e.type}}else try{s=e.decode(t)}catch(t){if((0,n.VZ)(t,"BUFFER_OVERRUN"))throw t;(s=t).baseType=e.name,s.name=e.localName,s.type=e.type}if(void 0==s)throw Error("investigate");r.push(s),i.push(e.localName||null)}),X.fromItems(r,i)}class td extends tt{coder;length;constructor(t,e,r){super("array",t.type+"["+(e>=0?e:"")+"]",r,-1===e||t.dynamic),(0,i.h)(this,{coder:t,length:e})}defaultValue(){let t=this.coder.defaultValue(),e=[];for(let r=0;rt||r<-(t+tE))&&this._throwError("value out-of-bounds",e),r=(0,H.$j)(r,256)}else(r(0,H.sS)(n,8*this.size))&&this._throwError("value out-of-bounds",e);return t.writeValue(r)}decode(t){let e=(0,H.sS)(t.readValue(),8*this.size);return this.signed&&(e=(0,H._Y)(e,8*this.size)),e}}class tx extends tg{constructor(t){super("string",t)}defaultValue(){return""}encode(t,e){return super.encode(t,(0,z.Y0)(u.dereference(e,"string")))}decode(t){return(0,z.ZN)(super.decode(t))}}class tO extends tt{coders;constructor(t,e){let r=!1,n=[];t.forEach(t=>{t.dynamic&&(r=!0),n.push(t.type)}),super("tuple","tuple("+n.join(",")+")",e,r),(0,i.h)(this,{coders:Object.freeze(t.slice())})}defaultValue(){let t=[];this.coders.forEach(e=>{t.push(e.defaultValue())});let e=this.coders.reduce((t,e)=>{let r=e.localName;return r&&(t[r]||(t[r]=0),t[r]++),t},{});return this.coders.forEach((r,n)=>{let i=r.localName;i&&1===e[i]&&("length"===i&&(i="_length"),null==t[i]&&(t[i]=t[n]))}),Object.freeze(t)}encode(t,e){let r=u.dereference(e,"tuple");return th(t,this.coders,r)}decode(t){return tf(t,this.coders)}}function tk(t){let e=new Set;return t.forEach(t=>e.add(t)),Object.freeze(e)}let tA=tk("external public payable override".split(" ")),tR="constant external internal payable private public pure view override",tP=tk(tR.split(" ")),tI="constructor error event fallback function receive struct",tU=tk(tI.split(" ")),t_="calldata memory storage payable indexed",tC=tk(t_.split(" ")),tS=tk([tI,t_,"tuple returns",tR].join(" ").split(" ")),tF={"(":"OPEN_PAREN",")":"CLOSE_PAREN","[":"OPEN_BRACKET","]":"CLOSE_BRACKET",",":"COMMA","@":"AT"},tL=RegExp("^(\\s*)"),tB=RegExp("^([0-9]+)"),tj=RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)"),tD=RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)$"),t$=RegExp("^(address|bool|bytes([0-9]*)|string|u?int([0-9]*))$");class tM{#a;#h;get offset(){return this.#a}get length(){return this.#h.length-this.#a}constructor(t){this.#a=0,this.#h=t.slice()}clone(){return new tM(this.#h)}reset(){this.#a=0}#f(t=0,e=0){return new tM(this.#h.slice(t,e).map(e=>Object.freeze(Object.assign({},e,{match:e.match-t,linkBack:e.linkBack-t,linkNext:e.linkNext-t}))))}popKeyword(t){let e=this.peek();if("KEYWORD"!==e.type||!t.has(e.text))throw Error(`expected keyword ${e.text}`);return this.pop().text}popType(t){if(this.peek().type!==t){let e=this.peek();throw Error(`expected ${t}; got ${e.type} ${JSON.stringify(e.text)}`)}return this.pop().text}popParen(){let t=this.peek();if("OPEN_PAREN"!==t.type)throw Error("bad start");let e=this.#f(this.#a+1,t.match+1);return this.#a=t.match+1,e}popParams(){let t=this.peek();if("OPEN_PAREN"!==t.type)throw Error("bad start");let e=[];for(;this.#a=this.#h.length)throw Error("out-of-bounds");return this.#h[this.#a]}peekKeyword(t){let e=this.peekType("KEYWORD");return null!=e&&t.has(e)?e:null}peekType(t){if(0===this.length)return null;let e=this.peek();return e.type===t?e.text:null}pop(){let t=this.peek();return this.#a++,t}toString(){let t=[];for(let e=this.#a;e`}}function tV(t){let e=[],r=e=>{let r=a0&&"NUMBER"===e[e.length-1].type){let r=e.pop().text;t=r+t,e[e.length-1].value=(0,H.Dx)(r)}if(0===e.length||"BRACKET"!==e[e.length-1].type)throw Error("missing opening bracket");e[e.length-1].text+=t}continue}if(o=s.match(tj)){if(l.text=o[1],a+=l.text.length,tS.has(l.text)){l.type="KEYWORD";continue}if(l.text.match(t$)){l.type="TYPE";continue}l.type="ID";continue}if(o=s.match(tB)){l.text=o[1],l.type="NUMBER",a+=l.text.length;continue}throw Error(`unexpected token ${JSON.stringify(s[0])} at position ${a}`)}return new tM(e.map(t=>Object.freeze(t)))}function tz(t,e){let r=[];for(let n in e.keys())t.has(n)&&r.push(n);if(r.length>1)throw Error(`conflicting types: ${r.join(", ")}`)}function tG(t,e){if(e.peekKeyword(tU)){let r=e.pop().text;if(r!==t)throw Error(`expected ${t}, got ${r}`)}return e.popType("ID")}function tH(t,e){let r=new Set;for(;;){let n=t.peekType("KEYWORD");if(null==n||e&&!e.has(n))break;if(t.pop(),r.has(n))throw Error(`duplicate keywords: ${JSON.stringify(n)}`);r.add(n)}return Object.freeze(r)}function tq(t){let e=tH(t,tP);return(tz(e,tk("constant payable nonpayable".split(" "))),tz(e,tk("pure view payable nonpayable".split(" "))),e.has("view"))?"view":e.has("pure")?"pure":e.has("payable")?"payable":e.has("nonpayable")?"nonpayable":e.has("constant")?"view":"nonpayable"}function tJ(t,e){return t.popParams().map(t=>t9.from(t,e))}function tK(t){if(t.peekType("AT")){if(t.pop(),t.peekType("NUMBER"))return(0,H.yT)(t.pop().text);throw Error("invalid gas")}return null}function tW(t){if(t.length)throw Error(`unexpected tokens at offset ${t.offset}: ${t.toString()}`)}let tZ=new RegExp(/^(.*)\[([0-9]*)\]$/);function tY(t){let e=t.match(t$);if((0,n.en)(e,"invalid type","type",t),"uint"===t)return"uint256";if("int"===t)return"int256";if(e[2]){let r=parseInt(e[2]);(0,n.en)(0!==r&&r<=32,"invalid bytes length","type",t)}else if(e[3]){let r=parseInt(e[3]);(0,n.en)(0!==r&&r<=256&&r%8==0,"invalid numeric width","type",t)}return t}let tX={},tQ=Symbol.for("_ethers_internal"),t0="_ParamTypeInternal",t1="_ErrorInternal",t2="_EventInternal",t4="_ConstructorInternal",t3="_FallbackInternal",t8="_FunctionInternal",t6="_StructInternal";class t9{name;type;baseType;indexed;components;arrayLength;arrayChildren;constructor(t,e,r,a,s,o,l,u){if((0,n.NK)(t,tX,"ParamType"),Object.defineProperty(this,tQ,{value:t0}),o&&(o=Object.freeze(o.slice())),"array"===a){if(null==l||null==u)throw Error("")}else if(null!=l||null!=u)throw Error("");if("tuple"===a){if(null==o)throw Error("")}else if(null!=o)throw Error("");(0,i.h)(this,{name:e,type:r,baseType:a,indexed:s,components:o,arrayLength:l,arrayChildren:u})}format(t){if(null==t&&(t="sighash"),"json"===t){let e=this.name||"";if(this.isArray()){let t=JSON.parse(this.arrayChildren.format("json"));return t.name=e,t.type+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`,JSON.stringify(t)}let r={type:"tuple"===this.baseType?"tuple":this.type,name:e};return"boolean"==typeof this.indexed&&(r.indexed=this.indexed),this.isTuple()&&(r.components=this.components.map(e=>JSON.parse(e.format(t)))),JSON.stringify(r)}let e="";return this.isArray()?e+=this.arrayChildren.format(t)+`[${this.arrayLength<0?"":String(this.arrayLength)}]`:this.isTuple()?e+="("+this.components.map(e=>e.format(t)).join("full"===t?", ":",")+")":e+=this.type,"sighash"!==t&&(!0===this.indexed&&(e+=" indexed"),"full"===t&&this.name&&(e+=" "+this.name)),e}isArray(){return"array"===this.baseType}isTuple(){return"tuple"===this.baseType}isIndexable(){return null!=this.indexed}walk(t,e){if(this.isArray()){if(!Array.isArray(t))throw Error("invalid array value");if(-1!==this.arrayLength&&t.length!==this.arrayLength)throw Error("array is wrong length");let r=this;return t.map(t=>r.arrayChildren.walk(t,e))}if(this.isTuple()){if(!Array.isArray(t))throw Error("invalid tuple value");if(t.length!==this.components.length)throw Error("array is wrong length");let r=this;return t.map((t,n)=>r.components[n].walk(t,e))}return e(this.type,t)}#d(t,e,r,n){if(this.isArray()){if(!Array.isArray(e))throw Error("invalid array value");if(-1!==this.arrayLength&&e.length!==this.arrayLength)throw Error("array is wrong length");let i=this.arrayChildren,a=e.slice();a.forEach((e,n)=>{i.#d(t,e,r,t=>{a[n]=t})}),n(a);return}if(this.isTuple()){let i;let a=this.components;if(Array.isArray(e))i=e.slice();else{if(null==e||"object"!=typeof e)throw Error("invalid tuple value");i=a.map(t=>{if(!t.name)throw Error("cannot use object value with unnamed components");if(!(t.name in e))throw Error(`missing value for component ${t.name}`);return e[t.name]})}if(i.length!==this.components.length)throw Error("array is wrong length");i.forEach((e,n)=>{a[n].#d(t,e,r,t=>{i[n]=t})}),n(i);return}let i=r(this.type,e);i.then?t.push(async function(){n(await i)}()):n(i)}async walkAsync(t,e){let r=[],n=[t];return this.#d(r,t,e,t=>{n[0]=t}),r.length&&await Promise.all(r),n[0]}static from(t,e){if(t9.isParamType(t))return t;if("string"==typeof t)try{return t9.from(tV(t),e)}catch(e){(0,n.en)(!1,"invalid param type","obj",t)}else if(t instanceof tM){let r="",n="",i=null;tH(t,tk(["tuple"])).has("tuple")||t.peekType("OPEN_PAREN")?(n="tuple",i=t.popParams().map(t=>t9.from(t)),r=`tuple(${i.map(t=>t.format()).join(",")})`):n=r=tY(t.popType("TYPE"));let a=null,s=null;for(;t.length&&t.peekType("BRACKET");){let e=t.pop();a=new t9(tX,"",r,n,null,i,s,a),s=e.value,r+=e.text,n="array",i=null}let o=null;if(tH(t,tC).has("indexed")){if(!e)throw Error("");o=!0}let l=t.peekType("ID")?t.pop().text:"";if(t.length)throw Error("leftover tokens");return new t9(tX,l,r,n,o,i,s,a)}let r=t.name;(0,n.en)(!r||"string"==typeof r&&r.match(tD),"invalid name","obj.name",r);let i=t.indexed;null!=i&&((0,n.en)(e,"parameter cannot be indexed","obj.indexed",t.indexed),i=!!i);let a=t.type,s=a.match(tZ);if(s){let e=parseInt(s[2]||"-1"),n=t9.from({type:s[1],components:t.components});return new t9(tX,r||"",a,"array",i,null,e,n)}if("tuple"===a||a.startsWith("tuple(")||a.startsWith("(")){let e=null!=t.components?t.components.map(t=>t9.from(t)):null;return new t9(tX,r||"",a,"tuple",i,e,null,null)}return new t9(tX,r||"",a=tY(t.type),a,i,null,null,null)}static isParamType(t){return t&&t[tQ]===t0}}class t5{type;inputs;constructor(t,e,r){(0,n.NK)(t,tX,"Fragment"),r=Object.freeze(r.slice()),(0,i.h)(this,{type:e,inputs:r})}static from(t){if("string"==typeof t){try{t5.from(JSON.parse(t))}catch(t){}return t5.from(tV(t))}if(t instanceof tM)switch(t.peekKeyword(tU)){case"constructor":return en.from(t);case"error":return ee.from(t);case"event":return er.from(t);case"fallback":case"receive":return ei.from(t);case"function":return ea.from(t);case"struct":return es.from(t)}else if("object"==typeof t){switch(t.type){case"constructor":return en.from(t);case"error":return ee.from(t);case"event":return er.from(t);case"fallback":case"receive":return ei.from(t);case"function":return ea.from(t);case"struct":return es.from(t)}(0,n.hu)(!1,`unsupported type: ${t.type}`,"UNSUPPORTED_OPERATION",{operation:"Fragment.from"})}(0,n.en)(!1,"unsupported frgament object","obj",t)}static isConstructor(t){return en.isFragment(t)}static isError(t){return ee.isFragment(t)}static isEvent(t){return er.isFragment(t)}static isFunction(t){return ea.isFragment(t)}static isStruct(t){return es.isFragment(t)}}class t7 extends t5{name;constructor(t,e,r,a){super(t,e,a),(0,n.en)("string"==typeof r&&r.match(tD),"invalid identifier","name",r),a=Object.freeze(a.slice()),(0,i.h)(this,{name:r})}}function et(t,e){return"("+e.map(e=>e.format(t)).join("full"===t?", ":",")+")"}class ee extends t7{constructor(t,e,r){super(t,"error",e,r),Object.defineProperty(this,tQ,{value:t1})}get selector(){return G(this.format("sighash")).substring(0,10)}format(t){if(null==t&&(t="sighash"),"json"===t)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(e=>JSON.parse(e.format(t)))});let e=[];return"sighash"!==t&&e.push("error"),e.push(this.name+et(t,this.inputs)),e.join(" ")}static from(t){if(ee.isFragment(t))return t;if("string"==typeof t)return ee.from(tV(t));if(t instanceof tM){let e=tG("error",t),r=tJ(t);return tW(t),new ee(tX,e,r)}return new ee(tX,t.name,t.inputs?t.inputs.map(t9.from):[])}static isFragment(t){return t&&t[tQ]===t1}}class er extends t7{anonymous;constructor(t,e,r,n){super(t,"event",e,r),Object.defineProperty(this,tQ,{value:t2}),(0,i.h)(this,{anonymous:n})}get topicHash(){return G(this.format("sighash"))}format(t){if(null==t&&(t="sighash"),"json"===t)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(e=>JSON.parse(e.format(t)))});let e=[];return"sighash"!==t&&e.push("event"),e.push(this.name+et(t,this.inputs)),"sighash"!==t&&this.anonymous&&e.push("anonymous"),e.join(" ")}static getTopicHash(t,e){return new er(tX,t,e=(e||[]).map(t=>t9.from(t)),!1).topicHash}static from(t){if(er.isFragment(t))return t;if("string"==typeof t)try{return er.from(tV(t))}catch(e){(0,n.en)(!1,"invalid event fragment","obj",t)}else if(t instanceof tM){let e=tG("event",t),r=tJ(t,!0),n=!!tH(t,tk(["anonymous"])).has("anonymous");return tW(t),new er(tX,e,r,n)}return new er(tX,t.name,t.inputs?t.inputs.map(t=>t9.from(t,!0)):[],!!t.anonymous)}static isFragment(t){return t&&t[tQ]===t2}}class en extends t5{payable;gas;constructor(t,e,r,n,a){super(t,e,r),Object.defineProperty(this,tQ,{value:t4}),(0,i.h)(this,{payable:n,gas:a})}format(t){if((0,n.hu)(null!=t&&"sighash"!==t,"cannot format a constructor for sighash","UNSUPPORTED_OPERATION",{operation:"format(sighash)"}),"json"===t)return JSON.stringify({type:"constructor",stateMutability:this.payable?"payable":"undefined",payable:this.payable,gas:null!=this.gas?this.gas:void 0,inputs:this.inputs.map(e=>JSON.parse(e.format(t)))});let e=[`constructor${et(t,this.inputs)}`];return this.payable&&e.push("payable"),null!=this.gas&&e.push(`@${this.gas.toString()}`),e.join(" ")}static from(t){if(en.isFragment(t))return t;if("string"==typeof t)try{return en.from(tV(t))}catch(e){(0,n.en)(!1,"invalid constuctor fragment","obj",t)}else if(t instanceof tM){tH(t,tk(["constructor"]));let e=tJ(t),r=!!tH(t,tA).has("payable"),n=tK(t);return tW(t),new en(tX,"constructor",e,r,n)}return new en(tX,"constructor",t.inputs?t.inputs.map(t9.from):[],!!t.payable,null!=t.gas?t.gas:null)}static isFragment(t){return t&&t[tQ]===t4}}class ei extends t5{payable;constructor(t,e,r){super(t,"fallback",e),Object.defineProperty(this,tQ,{value:t3}),(0,i.h)(this,{payable:r})}format(t){let e=0===this.inputs.length?"receive":"fallback";return"json"===t?JSON.stringify({type:e,stateMutability:this.payable?"payable":"nonpayable"}):`${e}()${this.payable?" payable":""}`}static from(t){if(ei.isFragment(t))return t;if("string"==typeof t)try{return ei.from(tV(t))}catch(e){(0,n.en)(!1,"invalid fallback fragment","obj",t)}else if(t instanceof tM){let e=t.toString(),r=t.peekKeyword(tk(["fallback","receive"]));if((0,n.en)(r,"type must be fallback or receive","obj",e),"receive"===t.popKeyword(tk(["fallback","receive"]))){let e=tJ(t);return(0,n.en)(0===e.length,"receive cannot have arguments","obj.inputs",e),tH(t,tk(["payable"])),tW(t),new ei(tX,[],!0)}let i=tJ(t);i.length?(0,n.en)(1===i.length&&"bytes"===i[0].type,"invalid fallback inputs","obj.inputs",i.map(t=>t.format("minimal")).join(", ")):i=[t9.from("bytes")];let a=tq(t);if((0,n.en)("nonpayable"===a||"payable"===a,"fallback cannot be constants","obj.stateMutability",a),tH(t,tk(["returns"])).has("returns")){let e=tJ(t);(0,n.en)(1===e.length&&"bytes"===e[0].type,"invalid fallback outputs","obj.outputs",e.map(t=>t.format("minimal")).join(", "))}return tW(t),new ei(tX,i,"payable"===a)}return"receive"===t.type?new ei(tX,[],!0):"fallback"===t.type?new ei(tX,[t9.from("bytes")],"payable"===t.stateMutability):void(0,n.en)(!1,"invalid fallback description","obj",t)}static isFragment(t){return t&&t[tQ]===t3}}class ea extends t7{constant;outputs;stateMutability;payable;gas;constructor(t,e,r,n,a,s){super(t,"function",e,n),Object.defineProperty(this,tQ,{value:t8}),a=Object.freeze(a.slice()),(0,i.h)(this,{constant:"view"===r||"pure"===r,gas:s,outputs:a,payable:"payable"===r,stateMutability:r})}get selector(){return G(this.format("sighash")).substring(0,10)}format(t){if(null==t&&(t="sighash"),"json"===t)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:null!=this.gas?this.gas:void 0,inputs:this.inputs.map(e=>JSON.parse(e.format(t))),outputs:this.outputs.map(e=>JSON.parse(e.format(t)))});let e=[];return"sighash"!==t&&e.push("function"),e.push(this.name+et(t,this.inputs)),"sighash"!==t&&("nonpayable"!==this.stateMutability&&e.push(this.stateMutability),this.outputs&&this.outputs.length&&(e.push("returns"),e.push(et(t,this.outputs))),null!=this.gas&&e.push(`@${this.gas.toString()}`)),e.join(" ")}static getSelector(t,e){return new ea(tX,t,"view",e=(e||[]).map(t=>t9.from(t)),[],null).selector}static from(t){if(ea.isFragment(t))return t;if("string"==typeof t)try{return ea.from(tV(t))}catch(e){(0,n.en)(!1,"invalid function fragment","obj",t)}else if(t instanceof tM){let e=tG("function",t),r=tJ(t),n=tq(t),i=[];tH(t,tk(["returns"])).has("returns")&&(i=tJ(t));let a=tK(t);return tW(t),new ea(tX,e,n,r,i,a)}let e=t.stateMutability;return null!=e||(e="payable","boolean"==typeof t.constant?(e="view",t.constant||(e="payable","boolean"!=typeof t.payable||t.payable||(e="nonpayable"))):"boolean"!=typeof t.payable||t.payable||(e="nonpayable")),new ea(tX,t.name,e,t.inputs?t.inputs.map(t9.from):[],t.outputs?t.outputs.map(t9.from):[],null!=t.gas?t.gas:null)}static isFragment(t){return t&&t[tQ]===t8}}class es extends t7{constructor(t,e,r){super(t,"struct",e,r),Object.defineProperty(this,tQ,{value:t6})}format(){throw Error("@TODO")}static from(t){if("string"==typeof t)try{return es.from(tV(t))}catch(e){(0,n.en)(!1,"invalid struct fragment","obj",t)}else if(t instanceof tM){let e=tG("struct",t),r=tJ(t);return tW(t),new es(tX,e,r)}return new es(tX,t.name,t.inputs?t.inputs.map(t9.from):[])}static isFragment(t){return t&&t[tQ]===t6}}let eo=new Map;eo.set(0,"GENERIC_PANIC"),eo.set(1,"ASSERT_FALSE"),eo.set(17,"OVERFLOW"),eo.set(18,"DIVIDE_BY_ZERO"),eo.set(33,"ENUM_RANGE_ERROR"),eo.set(34,"BAD_STORAGE_DATA"),eo.set(49,"STACK_UNDERFLOW"),eo.set(50,"ARRAY_RANGE_ERROR"),eo.set(65,"OUT_OF_MEMORY"),eo.set(81,"UNINITIALIZED_FUNCTION_CALL");let el=new RegExp(/^bytes([0-9]*)$/),eu=new RegExp(/^(u?int)([0-9]*)$/),ec=null,eh=1024;class ef{#p(t){if(t.isArray())return new td(this.#p(t.arrayChildren),t.arrayLength,t.name);if(t.isTuple())return new tO(t.components.map(t=>this.#p(t)),t.name);switch(t.baseType){case"address":return new tu(t.name);case"bool":return new tp(t.name);case"string":return new tx(t.name);case"bytes":return new tm(t.name);case"":return new tw(t.name)}let e=t.type.match(eu);if(e){let r=parseInt(e[2]||"256");return(0,n.en)(0!==r&&r<=256&&r%8==0,"invalid "+e[1]+" bit length","param",t),new tT(r/8,"int"===e[1],t.name)}if(e=t.type.match(el)){let r=parseInt(e[1]);return(0,n.en)(0!==r&&r<=32,"invalid bytes length","param",t),new ty(r,t.name)}(0,n.en)(!1,"invalid type","type",t.type)}getDefaultValue(t){return new tO(t.map(t=>this.#p(t9.from(t))),"_").defaultValue()}encode(t,e){(0,n.fG)(e.length,t.length,"types/values length mismatch");let r=new tO(t.map(t=>this.#p(t9.from(t))),"_"),i=new te;return r.encode(i,e),i.data}decode(t,e,r){return new tO(t.map(t=>this.#p(t9.from(t))),"_").decode(new tr(e,r,eh))}static _setDefaultMaxInflation(t){(0,n.en)("number"==typeof t&&Number.isInteger(t),"invalid defaultMaxInflation factor","value",t),eh=t}static defaultAbiCoder(){return null==ec&&(ec=new ef),ec}static getBuiltinCallException(t,e,r){return function(t,e,r,i){let a="missing revert data",s=null,o=null;if(r){a="execution reverted";let t=(0,j.Pw)(r);if(r=(0,j.Dv)(r),0===t.length)a+=" (no data present; likely require(false) occurred",s="require(false)";else if(t.length%32!=4)a+=" (could not decode reason; invalid data length)";else if("0x08c379a0"===(0,j.Dv)(t.slice(0,4)))try{s=i.decode(["string"],t.slice(4))[0],o={signature:"Error(string)",name:"Error",args:[s]},a+=`: ${JSON.stringify(s)}`}catch(t){a+=" (could not decode reason; invalid string data)"}else if("0x4e487b71"===(0,j.Dv)(t.slice(0,4)))try{let e=Number(i.decode(["uint256"],t.slice(4))[0]);o={signature:"Panic(uint256)",name:"Panic",args:[e]},s=`Panic due to ${eo.get(e)||"UNKNOWN"}(${e})`,a+=`: ${s}`}catch(t){a+=" (could not decode panic code)"}else a+=" (unknown custom error)"}let l={to:e.to?tl(e.to):null,data:e.data||"0x"};return e.from&&(l.from=tl(e.from)),(0,n.wf)(a,"CALL_EXCEPTION",{action:t,data:r,reason:s,transaction:l,invocation:null,revert:o})}(t,e,r,ef.defaultAbiCoder())}}class ed{fragment;name;signature;topic;args;constructor(t,e,r){let n=t.name,a=t.format();(0,i.h)(this,{fragment:t,name:n,signature:a,topic:e,args:r})}}class ep{fragment;name;args;signature;selector;value;constructor(t,e,r,n){let a=t.name,s=t.format();(0,i.h)(this,{fragment:t,name:a,args:r,signature:s,selector:e,value:n})}}class eg{fragment;name;args;signature;selector;constructor(t,e,r){let n=t.name,a=t.format();(0,i.h)(this,{fragment:t,name:n,args:r,signature:a,selector:e})}}class em{hash;_isIndexed;static isIndexed(t){return!!(t&&t._isIndexed)}constructor(t){(0,i.h)(this,{hash:t,_isIndexed:!0})}}let ey={0:"generic panic",1:"assert(false)",17:"arithmetic overflow",18:"division or modulo by zero",33:"enum overflow",34:"invalid encoded storage byte array accessed",49:"out-of-bounds array access; popping on an empty array",50:"out-of-bounds access of an array or bytesN",65:"out of memory",81:"uninitialized function"},eb={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:t=>`reverted with reason string ${JSON.stringify(t)}`},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"],reason:t=>{let e="unknown panic code";return t>=0&&t<=255&&ey[t.toString()]&&(e=ey[t.toString()]),`reverted with panic code 0x${t.toString(16)} (${e})`}}};class ew{fragments;deploy;fallback;receive;#g;#m;#y;#b;constructor(t){let e=[];e="string"==typeof t?JSON.parse(t):t,this.#y=new Map,this.#g=new Map,this.#m=new Map;let r=[];for(let t of e)try{r.push(t5.from(t))}catch(e){console.log(`[Warning] Invalid Fragment ${JSON.stringify(t)}:`,e.message)}(0,i.h)(this,{fragments:Object.freeze(r)});let a=null,s=!1;this.#b=this.getAbiCoder(),this.fragments.forEach((t,e)=>{let r;switch(t.type){case"constructor":if(this.deploy){console.log("duplicate definition - constructor");return}(0,i.h)(this,{deploy:t});return;case"fallback":0===t.inputs.length?s=!0:((0,n.en)(!a||t.payable!==a.payable,"conflicting fallback fragments",`fragments[${e}]`,t),s=(a=t).payable);return;case"function":r=this.#y;break;case"event":r=this.#m;break;case"error":r=this.#g;break;default:return}let o=t.format();r.has(o)||r.set(o,t)}),this.deploy||(0,i.h)(this,{deploy:en.from("constructor()")}),(0,i.h)(this,{fallback:a,receive:s})}format(t){let e=t?"minimal":"full";return this.fragments.map(t=>t.format(e))}formatJson(){return JSON.stringify(this.fragments.map(t=>t.format("json")).map(t=>JSON.parse(t)))}getAbiCoder(){return ef.defaultAbiCoder()}#w(t,e,r){if((0,j.A7)(t)){let e=t.toLowerCase();for(let t of this.#y.values())if(e===t.selector)return t;return null}if(-1===t.indexOf("(")){let i=[];for(let[e,r]of this.#y)e.split("(")[0]===t&&i.push(r);if(e){let t=e.length>0?e[e.length-1]:null,r=e.length,n=!0;u.isTyped(t)&&"overrides"===t.type&&(n=!1,r--);for(let t=i.length-1;t>=0;t--){let e=i[t].inputs.length;e===r||n&&e===r-1||i.splice(t,1)}for(let t=i.length-1;t>=0;t--){let r=i[t].inputs;for(let n=0;n=r.length){if("overrides"===e[n].type)continue;i.splice(t,1);break}if(e[n].type!==r[n].baseType){i.splice(t,1);break}}}}if(1===i.length&&e&&e.length!==i[0].inputs.length){let t=e[e.length-1];(null==t||Array.isArray(t)||"object"!=typeof t)&&i.splice(0,1)}if(0===i.length)return null;if(i.length>1&&r){let e=i.map(t=>JSON.stringify(t.format())).join(", ");(0,n.en)(!1,`ambiguous function description (i.e. matches ${e})`,"key",t)}return i[0]}return this.#y.get(ea.from(t).format())||null}getFunctionName(t){let e=this.#w(t,null,!1);return(0,n.en)(e,"no matching function","key",t),e.name}hasFunction(t){return!!this.#w(t,null,!1)}getFunction(t,e){return this.#w(t,e||null,!0)}forEachFunction(t){let e=Array.from(this.#y.keys());e.sort((t,e)=>t.localeCompare(e));for(let r=0;r=0;t--)i[t].inputs.length=0;t--){let r=i[t].inputs;for(let n=0;n1&&r){let e=i.map(t=>JSON.stringify(t.format())).join(", ");(0,n.en)(!1,`ambiguous event description (i.e. matches ${e})`,"key",t)}return i[0]}return this.#m.get(er.from(t).format())||null}getEventName(t){let e=this.#v(t,null,!1);return(0,n.en)(e,"no matching event","key",t),e.name}hasEvent(t){return!!this.#v(t,null,!1)}getEvent(t,e){return this.#v(t,e||null,!0)}forEachEvent(t){let e=Array.from(this.#m.keys());e.sort((t,e)=>t.localeCompare(e));for(let r=0;r1){let r=e.map(t=>JSON.stringify(t.format())).join(", ");(0,n.en)(!1,`ambiguous error description (i.e. ${r})`,"name",t)}return e[0]}return"Error(string)"===(t=ee.from(t).format())?ee.from("error Error(string)"):"Panic(uint256)"===t?ee.from("error Panic(uint256)"):this.#g.get(t)||null}forEachError(t){let e=Array.from(this.#g.keys());e.sort((t,e)=>t.localeCompare(e));for(let r=0;r"string"===t.type?G(e):"bytes"===t.type?V((0,j.Dv)(e)):("bool"===t.type&&"boolean"==typeof e?e=e?"0x01":"0x00":t.type.match(/^u?int/)?e=(0,H.m9)(e):t.type.match(/^bytes/)?e=(0,j.SK)(e,32):"address"===t.type&&this.#b.encode(["address"],[e]),(0,j.U3)((0,j.Dv)(e),32));for(e.forEach((e,a)=>{let s=t.inputs[a];if(!s.indexed){(0,n.en)(null==e,"cannot filter non-indexed parameters; must be null","contract."+s.name,e);return}null==e?r.push(null):"array"===s.baseType||"tuple"===s.baseType?(0,n.en)(!1,"filtering with tuples or arrays not supported","contract."+s.name,e):Array.isArray(e)?r.push(e.map(t=>i(s,t))):r.push(i(s,e))});r.length&&null===r[r.length-1];)r.pop();return r}encodeEventLog(t,e){if("string"==typeof t){let e=this.getEvent(t);(0,n.en)(e,"unknown event","eventFragment",t),t=e}let r=[],i=[],a=[];return t.anonymous||r.push(t.topicHash),(0,n.en)(e.length===t.inputs.length,"event arguments/values mismatch","values",e),t.inputs.forEach((t,n)=>{let s=e[n];if(t.indexed){if("string"===t.type)r.push(G(s));else if("bytes"===t.type)r.push(V(s));else if("tuple"===t.baseType||"array"===t.baseType)throw Error("not implemented");else r.push(this.#b.encode([t.type],[s]))}else i.push(t),a.push(s)}),{data:this.#b.encode(i,a),topics:r}}decodeEventLog(t,e,r){if("string"==typeof t){let e=this.getEvent(t);(0,n.en)(e,"unknown event","eventFragment",t),t=e}if(null!=r&&!t.anonymous){let e=t.topicHash;(0,n.en)((0,j.A7)(r[0],32)&&r[0].toLowerCase()===e,"fragment/topic mismatch","topics[0]",r[0]),r=r.slice(1)}let i=[],a=[],s=[];t.inputs.forEach((t,e)=>{t.indexed?"string"===t.type||"bytes"===t.type||"tuple"===t.baseType||"array"===t.baseType?(i.push(t9.from({type:"bytes32",name:t.name})),s.push(!0)):(i.push(t),s.push(!1)):(a.push(t),s.push(!1))});let o=null!=r?this.#b.decode(i,(0,j.zo)(r)):null,l=this.#b.decode(a,e,!0),u=[],c=[],h=0,f=0;return t.inputs.forEach((t,e)=>{let r=null;if(t.indexed){if(null==o)r=new em(null);else if(s[e])r=new em(o[f++]);else try{r=o[f++]}catch(t){r=t}}else try{r=l[h++]}catch(t){r=t}u.push(r),c.push(t.name||null)}),X.fromItems(u,c)}parseTransaction(t){let e=(0,j.Pw)(t.data,"tx.data"),r=(0,H.yT)(null!=t.value?t.value:0,"tx.value"),n=this.getFunction((0,j.Dv)(e.slice(0,4)));if(!n)return null;let i=this.#b.decode(n.inputs,e.slice(4));return new ep(n,n.selector,i,r)}parseCallResult(t){throw Error("@TODO")}parseLog(t){let e=this.getEvent(t.topics[0]);return!e||e.anonymous?null:new ed(e,e.topicHash,this.decodeEventLog(e,t.data,t.topics))}parseError(t){let e=(0,j.Dv)(t),r=this.getError((0,j.QB)(e,0,4));if(!r)return null;let n=this.#b.decode(r.inputs,(0,j.QB)(e,4));return new eg(r,r.selector,n)}static from(t){return t instanceof ew?t:new ew("string"==typeof t?JSON.parse(t):"function"==typeof t.formatJson?t.formatJson():"function"==typeof t.format?t.format("json"):t)}}function ev(t){return t&&"function"==typeof t.getAddress}async function eE(t,e){let r=await e;return(null==r||"0x0000000000000000000000000000000000000000"===r)&&((0,n.hu)("string"!=typeof t,"unconfigured name","UNCONFIGURED_NAME",{value:t}),(0,n.en)(!1,"invalid AddressLike value; did not resolve to a value address","target",t)),tl(r)}function eN(t,e){return"string"==typeof t?t.match(/^0x[0-9a-f]{40}$/i)?tl(t):((0,n.hu)(null!=e,"ENS resolution requires a provider","UNSUPPORTED_OPERATION",{operation:"resolveName"}),eE(t,e.resolveName(t))):ev(t)?eE(t,t.getAddress()):t&&"function"==typeof t.then?eE(t,t):void(0,n.en)(!1,"unsupported addressable value","target",t)}function eT(t,e){return{address:tl(t),storageKeys:e.map((t,e)=>((0,n.en)((0,j.A7)(t,32),"invalid slot",`storageKeys[${e}]`,t),t.toLowerCase()))}}let ex=BigInt(0);function eO(t){return null==t?null:t.toString()}Symbol.iterator;class ek{provider;transactionHash;blockHash;blockNumber;removed;address;data;topics;index;transactionIndex;constructor(t,e){this.provider=e;let r=Object.freeze(t.topics.slice());(0,i.h)(this,{transactionHash:t.transactionHash,blockHash:t.blockHash,blockNumber:t.blockNumber,removed:t.removed,address:t.address,data:t.data,topics:r,index:t.index,transactionIndex:t.transactionIndex})}toJSON(){let{address:t,blockHash:e,blockNumber:r,data:n,index:i,removed:a,topics:s,transactionHash:o,transactionIndex:l}=this;return{_type:"log",address:t,blockHash:e,blockNumber:r,data:n,index:i,removed:a,topics:s,transactionHash:o,transactionIndex:l}}async getBlock(){let t=await this.provider.getBlock(this.blockHash);return(0,n.hu)(!!t,"failed to find transaction","UNKNOWN_ERROR",{}),t}async getTransaction(){let t=await this.provider.getTransaction(this.transactionHash);return(0,n.hu)(!!t,"failed to find transaction","UNKNOWN_ERROR",{}),t}async getTransactionReceipt(){let t=await this.provider.getTransactionReceipt(this.transactionHash);return(0,n.hu)(!!t,"failed to find transaction receipt","UNKNOWN_ERROR",{}),t}removedEvent(){return{orphan:"drop-log",log:{transactionHash:this.transactionHash,blockHash:this.blockHash,blockNumber:this.blockNumber,address:this.address,data:this.data,topics:Object.freeze(this.topics.slice()),index:this.index}}}}class eA{provider;to;from;contractAddress;hash;index;blockHash;blockNumber;logsBloom;gasUsed;blobGasUsed;cumulativeGasUsed;gasPrice;blobGasPrice;type;status;root;#E;constructor(t,e){this.#E=Object.freeze(t.logs.map(t=>new ek(t,e)));let r=ex;null!=t.effectiveGasPrice?r=t.effectiveGasPrice:null!=t.gasPrice&&(r=t.gasPrice),(0,i.h)(this,{provider:e,to:t.to,from:t.from,contractAddress:t.contractAddress,hash:t.hash,index:t.index,blockHash:t.blockHash,blockNumber:t.blockNumber,logsBloom:t.logsBloom,gasUsed:t.gasUsed,cumulativeGasUsed:t.cumulativeGasUsed,blobGasUsed:t.blobGasUsed,gasPrice:r,blobGasPrice:t.blobGasPrice,type:t.type,status:t.status,root:t.root})}get logs(){return this.#E}toJSON(){let{to:t,from:e,contractAddress:r,hash:n,index:i,blockHash:a,blockNumber:s,logsBloom:o,logs:l,status:u,root:c}=this;return{_type:"TransactionReceipt",blockHash:a,blockNumber:s,contractAddress:r,cumulativeGasUsed:eO(this.cumulativeGasUsed),from:e,gasPrice:eO(this.gasPrice),blobGasUsed:eO(this.blobGasUsed),blobGasPrice:eO(this.blobGasPrice),gasUsed:eO(this.gasUsed),hash:n,index:i,logs:l,logsBloom:o,root:c,status:u,to:t}}get length(){return this.logs.length}[Symbol.iterator](){let t=0;return{next:()=>t{if(l)return null;let{blockNumber:t,nonce:e}=await (0,i.m)({blockNumber:this.provider.getBlockNumber(),nonce:this.provider.getTransactionCount(this.from)});if(e{if(null==t||0!==t.status)return t;(0,n.hu)(!1,"transaction execution reverted","CALL_EXCEPTION",{action:"sendTransaction",data:null,reason:null,invocation:null,revert:null,transaction:{to:t.to,from:t.from,data:""},receipt:t})},h=await this.provider.getTransactionReceipt(this.hash);if(0===r)return c(h);if(h){if(1===r||await h.confirmations()>=r)return c(h)}else if(await u(),0===r)return null;let f=new Promise((t,e)=>{let i=[],o=()=>{i.forEach(t=>t())};if(i.push(()=>{l=!0}),a>0){let t=setTimeout(()=>{o(),e((0,n.wf)("wait for transaction timeout","TIMEOUT"))},a);i.push(()=>{clearTimeout(t)})}let h=async n=>{if(await n.confirmations()>=r){o();try{t(c(n))}catch(t){e(t)}}};if(i.push(()=>{this.provider.off(this.hash,h)}),this.provider.on(this.hash,h),s>=0){let t=async()=>{try{await u()}catch(t){if((0,n.VZ)(t,"TRANSACTION_REPLACED")){o(),e(t);return}}l||this.provider.once("block",t)};i.push(()=>{this.provider.off("block",t)}),this.provider.once("block",t)}});return await f}isMined(){return null!=this.blockHash}isLegacy(){return 0===this.type}isBerlin(){return 1===this.type}isLondon(){return 2===this.type}isCancun(){return 3===this.type}removedEvent(){return(0,n.hu)(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),eI(this)}reorderedEvent(t){return(0,n.hu)(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),(0,n.hu)(!t||t.isMined(),"unmined 'other' transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),eP(this,t)}replaceableTransaction(t){(0,n.en)(Number.isInteger(t)&&t>=0,"invalid startBlock","startBlock",t);let e=new eR(this,this.provider);return e.#N=t,e}}function eP(t,e){return{orphan:"reorder-transaction",tx:t,other:e}}function eI(t){return{orphan:"drop-transaction",tx:t}}class eU{filter;emitter;#T;constructor(t,e,r){this.#T=e,(0,i.h)(this,{emitter:t,filter:r})}async removeListener(){null!=this.#T&&await this.emitter.off(this.filter,this.#T)}}class e_ extends ek{interface;fragment;args;constructor(t,e,r){super(t,t.provider);let n=e.decodeEventLog(r,t.data,t.topics);(0,i.h)(this,{args:n,fragment:r,interface:e})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}class eC extends ek{error;constructor(t,e){super(t,t.provider),(0,i.h)(this,{error:e})}}class eS extends eA{#x;constructor(t,e,r){super(r,e),this.#x=t}get logs(){return super.logs.map(t=>{let e=t.topics.length?this.#x.getEvent(t.topics[0]):null;if(e)try{return new e_(t,this.#x,e)}catch(e){return new eC(t,e)}return t})}}class eF extends eR{#x;constructor(t,e,r){super(r,e),this.#x=t}async wait(t,e){let r=await super.wait(t,e);return null==r?null:new eS(this.#x,this.provider,r)}}class eL extends eU{log;constructor(t,e,r,n){super(t,e,r),(0,i.h)(this,{log:n})}async getBlock(){return await this.log.getBlock()}async getTransaction(){return await this.log.getTransaction()}async getTransactionReceipt(){return await this.log.getTransactionReceipt()}}class eB extends eL{constructor(t,e,r,n,a){super(t,e,r,new e_(a,t.interface,n));let s=t.interface.decodeEventLog(n,this.log.data,this.log.topics);(0,i.h)(this,{args:s,fragment:n})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}let ej=BigInt(0);function eD(t){return t&&"function"==typeof t.call}function e$(t){return t&&"function"==typeof t.estimateGas}function eM(t){return t&&"function"==typeof t.resolveName}function eV(t){return t&&"function"==typeof t.sendTransaction}function ez(t){if(null!=t){if(eM(t))return t;if(t.provider)return t.provider}}class eG{#O;fragment;constructor(t,e,r){if((0,i.h)(this,{fragment:e}),e.inputs.lengthnull==r[e]?null:t.walkAsync(r[e],(t,e)=>"address"===t?Array.isArray(e)?Promise.all(e.map(t=>eN(t,a))):eN(e,a):e)));return t.interface.encodeFilterTopics(e,n)}()}getTopicFilter(){return this.#O}}function eH(t,e){return null==t?null:"function"==typeof t[e]?t:t.provider&&"function"==typeof t.provider[e]?t.provider:null}function eq(t){return null==t?null:t.provider||null}async function eJ(t,e){let r=u.dereference(t,"overrides");(0,n.en)("object"==typeof r,"invalid overrides parameter","overrides",t);let i=function(t){let e={};for(let r of(t.to&&(e.to=t.to),t.from&&(e.from=t.from),t.data&&(e.data=(0,j.Dv)(t.data)),"chainId,gasLimit,gasPrice,maxFeePerBlobGas,maxFeePerGas,maxPriorityFeePerGas,value".split(/,/)))r in t&&null!=t[r]&&(e[r]=(0,H.yT)(t[r],`request.${r}`));for(let r of"type,nonce".split(/,/))r in t&&null!=t[r]&&(e[r]=(0,H.Dx)(t[r],`request.${r}`));return t.accessList&&(e.accessList=function(t){if(Array.isArray(t))return t.map((e,r)=>Array.isArray(e)?((0,n.en)(2===e.length,"invalid slot set",`value[${r}]`,e),eT(e[0],e[1])):((0,n.en)(null!=e&&"object"==typeof e,"invalid address-slot set","value",t),eT(e.address,e.storageKeys)));(0,n.en)(null!=t&&"object"==typeof t,"invalid access list","value",t);let e=Object.keys(t).map(e=>{let r=t[e].reduce((t,e)=>(t[e]=!0,t),{});return eT(e,Object.keys(r).sort())});return e.sort((t,e)=>t.address.localeCompare(e.address)),e}(t.accessList)),t.authorizationList&&(e.authorizationList=t.authorizationList.slice()),"blockTag"in t&&(e.blockTag=t.blockTag),"enableCcipRead"in t&&(e.enableCcipRead=!!t.enableCcipRead),"customData"in t&&(e.customData=t.customData),"blobVersionedHashes"in t&&t.blobVersionedHashes&&(e.blobVersionedHashes=t.blobVersionedHashes.slice()),"kzg"in t&&(e.kzg=t.kzg),"blobWrapperVersion"in t&&(e.blobWrapperVersion=t.blobWrapperVersion),"blobs"in t&&t.blobs&&(e.blobs=t.blobs.map(t=>(0,j.Zq)(t)?(0,j.Dv)(t):Object.assign({},t))),e}(r);return(0,n.en)(null==i.to||(e||[]).indexOf("to")>=0,"cannot override to","overrides.to",i.to),(0,n.en)(null==i.data||(e||[]).indexOf("data")>=0,"cannot override data","overrides.data",i.data),i.from&&(i.from=i.from),i}async function eK(t,e,r){let n=eH(t,"resolveName"),i=eM(n)?n:null;return await Promise.all(e.map((t,e)=>t.walkAsync(r[e],(t,e)=>(e=u.dereference(e,t),"address"===t)?eN(e,i):e)))}let eW=Symbol.for("_ethersInternal_contract"),eZ=new WeakMap;function eY(t){return eZ.get(t[eW])}async function eX(t,e){let r;let i=null;if(Array.isArray(e)){let i=function(e){if((0,j.A7)(e,32))return e;let r=t.interface.getEvent(e);return(0,n.en)(r,"unknown fragment","name",e),r.topicHash};r=e.map(t=>null==t?null:Array.isArray(t)?t.map(i):i(t))}else"*"===e?r=[null]:"string"==typeof e?(0,j.A7)(e,32)?r=[e]:(i=t.interface.getEvent(e),(0,n.en)(i,"unknown fragment","event",e),r=[i.topicHash]):e&&"object"==typeof e&&"getTopicFilter"in e&&"function"==typeof e.getTopicFilter&&e.fragment?r=await e.getTopicFilter():"fragment"in e?r=[(i=e.fragment).topicHash]:(0,n.en)(!1,"unknown event name","event",e);return{fragment:i,tag:(r=r.map(t=>{if(null==t)return null;if(Array.isArray(t)){let e=Array.from(new Set(t.map(t=>t.toLowerCase())).values());return 1===e.length?e[0]:(e.sort(),e)}return t.toLowerCase()})).map(t=>null==t?"null":Array.isArray(t)?t.join("|"):t).join("&"),topics:r}}async function eQ(t,e){let{subs:r}=eY(t);return r.get((await eX(t,e)).tag)||null}async function e0(t,e,r){let i=eq(t.runner);(0,n.hu)(i,"contract runner does not support subscribing","UNSUPPORTED_OPERATION",{operation:e});let{fragment:a,tag:s,topics:o}=await eX(t,r),{addr:l,subs:u}=eY(t),c=u.get(s);if(!c){let e={address:l||t,topics:o},n=e=>{let n=a;if(null==n)try{n=t.interface.getEvent(e.topics[0])}catch(t){}if(n){let i=n,s=a?t.interface.decodeEventLog(a,e.data,e.topics):[];e4(t,r,s,n=>new eB(t,n,r,i,e))}else e4(t,r,[],n=>new eL(t,n,r,e))},h=[];c={tag:s,listeners:[],start:()=>{h.length||h.push(i.on(e,n))},stop:async()=>{if(0==h.length)return;let t=h;h=[],await Promise.all(t),i.off(e,n)}},u.set(s,c)}return c}let e1=Promise.resolve();async function e2(t,e,r,n){await e1;let i=await eQ(t,e);if(!i)return!1;let a=i.listeners.length;return i.listeners=i.listeners.filter(({listener:e,once:i})=>{let a=Array.from(r);n&&a.push(n(i?null:e));try{e.call(t,...a)}catch(t){}return!i}),0===i.listeners.length&&(i.stop(),eY(t).subs.delete(i.tag)),a>0}async function e4(t,e,r,n){try{await e1}catch(t){}let i=e2(t,e,r,n);return e1=i,await i}let e3=["then"];class e8{target;interface;runner;filters;[eW];fallback;constructor(t,e,r,a){var s;let o;(0,n.en)("string"==typeof t||ev(t),"invalid value for Contract target","target",t),null==r&&(r=null);let l=ew.from(e);(0,i.h)(this,{target:t,runner:r,interface:l}),Object.defineProperty(this,eW,{value:{}});let u=null,c=null;if(a){let t=eq(r);c=new eF(this.interface,t,a)}let h=new Map;if("string"==typeof t){if((0,j.A7)(t))u=t,o=Promise.resolve(t);else{let e=eH(r,"resolveName");if(!eM(e))throw(0,n.wf)("contract runner does not support name resolution","UNSUPPORTED_OPERATION",{operation:"resolveName"});o=e.resolveName(t).then(e=>{if(null==e)throw(0,n.wf)("an ENS name used for a contract target must be correctly configured","UNCONFIGURED_NAME",{value:t});return eY(this).addr=e,e})}}else o=t.getAddress().then(t=>{if(null==t)throw Error("TODO");return eY(this).addr=t,t});s={addrPromise:o,addr:u,deployTx:c,subs:h},eZ.set(this[eW],s);let f=new Proxy({},{get:(t,e,r)=>{if("symbol"==typeof e||e3.indexOf(e)>=0)return Reflect.get(t,e,r);try{return this.getEvent(e)}catch(t){if(!(0,n.VZ)(t,"INVALID_ARGUMENT")||"key"!==t.argument)throw t}},has:(t,e)=>e3.indexOf(e)>=0?Reflect.has(t,e):Reflect.has(t,e)||this.interface.hasEvent(String(e))});return(0,i.h)(this,{filters:f}),(0,i.h)(this,{fallback:l.receive||l.fallback?function(t){let e=async function(e){let r=await eJ(e,["data"]);r.to=await t.getAddress(),r.from&&(r.from=await eN(r.from,ez(t.runner)));let i=t.interface,a=(0,H.yT)(r.value||ej,"overrides.value")===ej,s="0x"===(r.data||"0x");!i.fallback||i.fallback.payable||!i.receive||s||a||(0,n.en)(!1,"cannot send data to receive or send value to non-payable fallback","overrides",e),(0,n.en)(i.fallback||s,"cannot send data to receive-only contract","overrides.data",r.data);let o=i.receive||i.fallback&&i.fallback.payable;return(0,n.en)(o||a,"cannot send value to non-payable fallback","overrides.value",r.value),(0,n.en)(i.fallback||s,"cannot send data to receive-only contract","overrides.data",r.data),r},r=async function(r){let i=eH(t.runner,"call");(0,n.hu)(eD(i),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});let a=await e(r);try{return await i.call(a)}catch(e){if((0,n.Hl)(e)&&e.data)throw t.interface.makeError(e.data,a);throw e}},a=async function(r){let i=t.runner;(0,n.hu)(eV(i),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});let a=await i.sendTransaction(await e(r)),s=eq(t.runner);return new eF(t.interface,s,a)},s=async function(r){let i=eH(t.runner,"estimateGas");return(0,n.hu)(e$(i),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await i.estimateGas(await e(r))},o=async t=>await a(t);return(0,i.h)(o,{_contract:t,estimateGas:s,populateTransaction:e,send:a,staticCall:r}),o}(this):null}),new Proxy(this,{get:(t,e,r)=>{if("symbol"==typeof e||e in t||e3.indexOf(e)>=0)return Reflect.get(t,e,r);try{return t.getFunction(e)}catch(t){if(!(0,n.VZ)(t,"INVALID_ARGUMENT")||"key"!==t.argument)throw t}},has:(t,e)=>"symbol"==typeof e||e in t||e3.indexOf(e)>=0?Reflect.has(t,e):t.interface.hasFunction(e)})}connect(t){return new e8(this.target,this.interface,t)}attach(t){return new e8(t,this.interface,this.runner)}async getAddress(){return await eY(this).addrPromise}async getDeployedCode(){let t=eq(this.runner);(0,n.hu)(t,"runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"getDeployedCode"});let e=await t.getCode(await this.getAddress());return"0x"===e?null:e}async waitForDeployment(){let t=this.deploymentTransaction();if(t)return await t.wait(),this;if(null!=await this.getDeployedCode())return this;let e=eq(this.runner);return(0,n.hu)(null!=e,"contract runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"waitForDeployment"}),new Promise((t,r)=>{let n=async()=>{try{let r=await this.getDeployedCode();if(null!=r)return t(this);e.once("block",n)}catch(t){r(t)}};n()})}deploymentTransaction(){return eY(this).deployTx}getFunction(t){return"string"!=typeof t&&(t=t.format()),function(t,e){let r=function(...r){let i=t.interface.getFunction(e,r);return(0,n.hu)(i,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e,args:r}}),i},a=async function(...e){let n=r(...e),a={};if(n.inputs.length+1===e.length&&(a=await eJ(e.pop())).from&&(a.from=await eN(a.from,ez(t.runner))),n.inputs.length!==e.length)throw Error("internal error: fragment inputs doesn't match arguments; should not happen");let s=await eK(t.runner,n.inputs,e);return Object.assign({},a,await (0,i.m)({to:t.getAddress(),data:t.interface.encodeFunctionData(n,s)}))},s=async function(...t){let e=await u(...t);return 1===e.length?e[0]:e},o=async function(...e){let r=t.runner;(0,n.hu)(eV(r),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});let i=await r.sendTransaction(await a(...e)),s=eq(t.runner);return new eF(t.interface,s,i)},l=async function(...e){let r=eH(t.runner,"estimateGas");return(0,n.hu)(e$(r),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await r.estimateGas(await a(...e))},u=async function(...e){let i=eH(t.runner,"call");(0,n.hu)(eD(i),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});let s=await a(...e),o="0x";try{o=await i.call(s)}catch(e){if((0,n.Hl)(e)&&e.data)throw t.interface.makeError(e.data,s);throw e}let l=r(...e);return t.interface.decodeFunctionResult(l,o)},c=async(...t)=>r(...t).constant?await s(...t):await o(...t);return(0,i.h)(c,{name:t.interface.getFunctionName(e),_contract:t,_key:e,getFragment:r,estimateGas:l,populateTransaction:a,send:o,staticCall:s,staticCallResult:u}),Object.defineProperty(c,"fragment",{configurable:!1,enumerable:!0,get:()=>{let r=t.interface.getFunction(e);return(0,n.hu)(r,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e}}),r}}),c}(this,t)}getEvent(t){return"string"!=typeof t&&(t=t.format()),function(t,e){let r=function(...r){let i=t.interface.getEvent(e,r);return(0,n.hu)(i,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e,args:r}}),i},a=function(...e){return new eG(t,r(...e),e)};return(0,i.h)(a,{name:t.interface.getEventName(e),_contract:t,_key:e,getFragment:r}),Object.defineProperty(a,"fragment",{configurable:!1,enumerable:!0,get:()=>{let r=t.interface.getEvent(e);return(0,n.hu)(r,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e}}),r}}),a}(this,t)}async queryTransaction(t){throw Error("@TODO")}async queryFilter(t,e,r){null==e&&(e=0),null==r&&(r="latest");let{addr:i,addrPromise:a}=eY(this),s=i||await a,{fragment:o,topics:l}=await eX(this,t),u={address:s,topics:l,fromBlock:e,toBlock:r},c=eq(this.runner);return(0,n.hu)(c,"contract runner does not have a provider","UNSUPPORTED_OPERATION",{operation:"queryFilter"}),(await c.getLogs(u)).map(t=>{let e=o;if(null==e)try{e=this.interface.getEvent(t.topics[0])}catch(t){}if(e)try{return new e_(t,this.interface,e)}catch(e){return new eC(t,e)}return new ek(t,c)})}async on(t,e){let r=await e0(this,"on",t);return r.listeners.push({listener:e,once:!1}),r.start(),this}async once(t,e){let r=await e0(this,"once",t);return r.listeners.push({listener:e,once:!0}),r.start(),this}async emit(t,...e){return await e4(this,t,e,null)}async listenerCount(t){if(t){let e=await eQ(this,t);return e?e.listeners.length:0}let{subs:e}=eY(this),r=0;for(let{listeners:t}of e.values())r+=t.length;return r}async listeners(t){if(t){let e=await eQ(this,t);return e?e.listeners.map(({listener:t})=>t):[]}let{subs:e}=eY(this),r=[];for(let{listeners:t}of e.values())r=r.concat(t.map(({listener:t})=>t));return r}async off(t,e){let r=await eQ(this,t);if(!r)return this;if(e){let t=r.listeners.map(({listener:t})=>t).indexOf(e);t>=0&&r.listeners.splice(t,1)}return(null==e||0===r.listeners.length)&&(r.stop(),eY(this).subs.delete(r.tag)),this}async removeAllListeners(t){if(t){let e=await eQ(this,t);if(!e)return this;e.stop(),eY(this).subs.delete(e.tag)}else{let{subs:t}=eY(this);for(let{tag:e,stop:r}of t.values())r(),t.delete(e)}return this}async addListener(t,e){return await this.on(t,e)}async removeListener(t,e){return await this.off(t,e)}static buildClass(t){class e extends e8{constructor(e,r=null){super(e,t,r)}}return e}static from(t,e,r){return null==r&&(r=null),new this(t,e,r)}}function e6(){return e8}class e9 extends e6(){}},69349:(t,e,r)=>{r.d(e,{A7:()=>o,Dv:()=>c,Pw:()=>a,QB:()=>f,SK:()=>g,U3:()=>p,Zq:()=>l,h_:()=>s,zo:()=>h});var n=r(1633);function i(t,e,r){if(t instanceof Uint8Array)return r?new Uint8Array(t):t;if("string"==typeof t&&t.length%2==0&&t.match(/^0x[0-9a-f]*$/i)){let e=new Uint8Array((t.length-2)/2),r=2;for(let n=0;n>4]+u[15&n]}return r}function h(t){return"0x"+t.map(t=>c(t).substring(2)).join("")}function f(t,e,r){let i=a(t);return null!=r&&r>i.length&&(0,n.hu)(!1,"cannot slice beyond data bounds","BUFFER_OVERRUN",{buffer:i,length:i.length,offset:r}),c(i.slice(null==e?0:e,null==r?i.length:r))}function d(t,e,r){let i=a(t);(0,n.hu)(e>=i.length,"padding exceeds data length","BUFFER_OVERRUN",{buffer:new Uint8Array(i),length:e,offset:e+1});let s=new Uint8Array(e);return s.fill(0),r?s.set(i,e-i.length):s.set(i,0),c(s)}function p(t,e){return d(t,e,!0)}function g(t,e){return d(t,e,!1)}},1633:(t,e,r)=>{r.d(e,{hu:()=>l,en:()=>u,fG:()=>c,fA:()=>f,NK:()=>d,Hl:()=>s,VZ:()=>a,wf:()=>o});var n=r(23791);function i(t,e){if(null==t)return"null";if(null==e&&(e=new Set),"object"==typeof t){if(e.has(t))return"[Circular]";e.add(t)}if(Array.isArray(t))return"[ "+t.map(t=>i(t,e)).join(", ")+" ]";if(t instanceof Uint8Array){let e="0123456789abcdef",r="0x";for(let n=0;n>4]+e[15&t[n]];return r}if("object"==typeof t&&"function"==typeof t.toJSON)return i(t.toJSON(),e);switch(typeof t){case"boolean":case"number":case"symbol":return t.toString();case"bigint":return BigInt(t).toString();case"string":return JSON.stringify(t);case"object":{let r=Object.keys(t);return r.sort(),"{ "+r.map(r=>`${i(r,e)}: ${i(t[r],e)}`).join(", ")+" }"}}return"[ COULD NOT SERIALIZE ]"}function a(t,e){return t&&t.code===e}function s(t){return a(t,"CALL_EXCEPTION")}function o(t,e,r){let a,s=t;{let n=[];if(r){if("message"in r||"code"in r||"name"in r)throw Error(`value will overwrite populated values: ${i(r)}`);for(let t in r){if("shortMessage"===t)continue;let e=r[t];n.push(t+"="+i(e))}}n.push(`code=${e}`),n.push("version=6.16.0"),n.length&&(t+=" ("+n.join(", ")+")")}switch(e){case"INVALID_ARGUMENT":a=TypeError(t);break;case"NUMERIC_FAULT":case"BUFFER_OVERRUN":a=RangeError(t);break;default:a=Error(t)}return(0,n.h)(a,{code:e}),r&&Object.assign(a,r),null==a.shortMessage&&(0,n.h)(a,{shortMessage:s}),a}function l(t,e,r,n){if(!t)throw o(e,r,n)}function u(t,e,r,n){l(t,e,"INVALID_ARGUMENT",{argument:r,value:n})}function c(t,e,r){null==r&&(r=""),r&&(r=": "+r),l(t>=e,"missing argument"+r,"MISSING_ARGUMENT",{count:t,expectedCount:e}),l(t<=e,"too many arguments"+r,"UNEXPECTED_ARGUMENT",{count:t,expectedCount:e})}let h=["NFD","NFC","NFKD","NFKC"].reduce((t,e)=>{try{if("test"!=="test".normalize(e))throw Error("bad");if("NFD"===e){let t=String.fromCharCode(233).normalize("NFD"),e=String.fromCharCode(101,769);if(t!==e)throw Error("broken")}t.push(e)}catch(t){}return t},[]);function f(t){l(h.indexOf(t)>=0,"platform missing String.prototype.normalize","UNSUPPORTED_OPERATION",{operation:"String.prototype.normalize",info:{form:t}})}function d(t,e,r){if(null==r&&(r=""),t!==e){let t=r,e="new";r&&(t+=".",e+=" "+r),l(!1,`private constructor; use ${t}from* methods`,"UNSUPPORTED_OPERATION",{operation:e})}}},71112:(t,e,r)=>{r.d(e,{$j:()=>o,Dx:()=>d,Gh:()=>f,He:()=>p,_Y:()=>s,m9:()=>g,ot:()=>m,sS:()=>l,yT:()=>u});var n=r(1633);let i=BigInt(0),a=BigInt(1);function s(t,e){let r=c(t,"value"),s=BigInt(d(e,"width"));return((0,n.hu)(r>>s===i,"overflow","NUMERIC_FAULT",{operation:"fromTwos",fault:"overflow",value:t}),r>>s-a)?-((~r&(a<=-9007199254740991&&t<=9007199254740991,"overflow",e||"value",t),BigInt(t);case"string":try{if(""===t)throw Error("empty string");if("-"===t[0]&&"-"!==t[1])return-BigInt(t.substring(1));return BigInt(t)}catch(r){(0,n.en)(!1,`invalid BigNumberish string: ${r.message}`,e||"value",t)}}(0,n.en)(!1,"invalid BigNumberish value",e||"value",t)}function c(t,e){let r=u(t,e);return(0,n.hu)(r>=i,"unsigned value cannot be negative","NUMERIC_FAULT",{fault:"overflow",operation:"getUint",value:t}),r}let h="0123456789abcdef";function f(t){if(t instanceof Uint8Array){let e="0x0";for(let r of t)e+=h[r>>4]+h[15&r];return BigInt(e)}return u(t)}function d(t,e){switch(typeof t){case"bigint":return(0,n.en)(t>=-9007199254740991&&t<=9007199254740991,"overflow",e||"value",t),Number(t);case"number":return(0,n.en)(Number.isInteger(t),"underflow",e||"value",t),(0,n.en)(t>=-9007199254740991&&t<=9007199254740991,"overflow",e||"value",t),t;case"string":try{if(""===t)throw Error("empty string");return d(BigInt(t),e)}catch(r){(0,n.en)(!1,`invalid numeric string: ${r.message}`,e||"value",t)}}(0,n.en)(!1,"invalid numeric value",e||"value",t)}function p(t){return d(f(t))}function g(t,e){let r=c(t,"value"),a=r.toString(16);if(null==e)a.length%2&&(a="0"+a);else{let s=d(e,"width");if(0===s&&r===i)return"0x";for((0,n.hu)(2*s>=a.length,`value exceeds width (${s} bytes)`,"NUMERIC_FAULT",{operation:"toBeHex",fault:"overflow",value:t});a.length<2*s;)a="0"+a}return"0x"+a}function m(t,e){let r=c(t,"value");if(r===i)return new Uint8Array(null!=e?d(e,"width"):0);let a=r.toString(16);if(a.length%2&&(a="0"+a),null!=e){let r=d(e,"width");for(;a.length<2*r;)a="00"+a;(0,n.hu)(2*r===a.length,`value exceeds width (${r} bytes)`,"NUMERIC_FAULT",{operation:"toBeArray",fault:"overflow",value:t})}let s=new Uint8Array(a.length/2);for(let t=0;t{async function n(t){let e=Object.keys(t);return(await Promise.all(e.map(e=>Promise.resolve(t[e])))).reduce((t,r,n)=>(t[e[n]]=r,t),{})}function i(t,e,r){for(let n in e){let i=e[n],a=r?r[n]:null;a&&function(t,e,r){let n=e.split("|").map(t=>t.trim());for(let r=0;ri,m:()=>n})},45320:(t,e,r)=>{r.d(e,{dF:()=>y});var n=r(1633),i=r(69349),a=r(71112),s=r(23791);let o=BigInt(-1),l=BigInt(0),u=BigInt(1),c=BigInt(5),h={},f="0000";for(;f.length<80;)f+=f;function d(t){let e=f;for(;e.length=-e&&tl?(0,a._Y)((0,a.sS)(t,i),i):-(0,a._Y)((0,a.sS)(-t,i),i)}else{let e=u<=0&&tnull==a[t]?r:((0,n.en)(typeof a[t]===e,"invalid fixed format ("+t+" not "+e+")","format."+t,a[t]),a[t]);e=s("signed","boolean",e),r=s("width","number",r),i=s("decimals","number",i)}(0,n.en)(r%8==0,"invalid FixedNumber width (not byte aligned)","format.width",r),(0,n.en)(i<=80,"invalid FixedNumber decimals (too large)","format.decimals",i);let a=(e?"":"u")+"fixed"+String(r)+"x"+String(i);return{signed:e,width:r,decimals:i,name:a}}class m{format;#k;#A;#R;_value;constructor(t,e,r){(0,n.NK)(t,h,"FixedNumber"),this.#A=e,this.#k=r;let i=function(t,e){let r="";t0?r*=d(n):n<0&&(e*=d(-n)),er?1:0}eq(t){return 0===this.cmp(t)}lt(t){return 0>this.cmp(t)}lte(t){return 0>=this.cmp(t)}gt(t){return this.cmp(t)>0}gte(t){return this.cmp(t)>=0}floor(){let t=this.#A;return this.#Al&&(t+=this.#R-u),t=this.#A/this.#R*this.#R,this.#I(t,"ceiling")}round(t){if(null==t&&(t=0),t>=this.decimals)return this;let e=this.decimals-t,r=c*d(e-1),n=this.value+r,i=d(e);return p(n=n/i*i,this.#k,"round"),new m(h,n,this.#k)}isZero(){return this.#A===l}isNegative(){return this.#A0){let e=d(u);(0,n.hu)(o%e===l,"value loses precision for format","NUMERIC_FAULT",{operation:"fromValue",fault:"underflow",value:t}),o/=e}else u<0&&(o*=d(-u));return p(o,s,"fromValue"),new m(h,o,s)}static fromString(t,e){let r=t.match(/^(-?)([0-9]*)\.?([0-9]*)$/);(0,n.en)(r&&r[2].length+r[3].length>0,"invalid FixedNumber string value","value",t);let i=g(e),a=r[2]||"0",s=r[3]||"";for(;s.length{r.d(e,{Y0:()=>o,ZN:()=>l});var n=r(69349),i=r(1633);function a(t,e,r,n,i){if("BAD_PREFIX"===t||"UNEXPECTED_CONTINUE"===t){let t=0;for(let n=e+1;n>6==2;n++)t++;return t}return"OVERRUN"===t?r.length-e-1:0}let s=Object.freeze({error:function(t,e,r,n,a){(0,i.en)(!1,`invalid codepoint at offset ${e}; ${t}`,"bytes",r)},ignore:a,replace:function(t,e,r,n,s){return"OVERLONG"===t?((0,i.en)("number"==typeof s,"invalid bad code point for replacement","badCodepoint",s),n.push(s),0):(n.push(65533),a(t,e,r,n,s))}});function o(t,e){(0,i.en)("string"==typeof t,"invalid string value","str",t),null!=e&&((0,i.fA)(e),t=t.normalize(e));let r=[];for(let e=0;e>6|192),r.push(63&n|128);else if((64512&n)==55296){e++;let a=t.charCodeAt(e);(0,i.en)(e>18|240),r.push(s>>12&63|128),r.push(s>>6&63|128),r.push(63&s|128)}else r.push(n>>12|224),r.push(n>>6&63|128),r.push(63&n|128)}return new Uint8Array(r)}function l(t,e){return(function(t,e){null==e&&(e=s.error);let r=(0,n.Pw)(t,"bytes"),i=[],a=0;for(;a>7==0){i.push(t);continue}let n=null,s=null;if((224&t)==192)n=1,s=127;else if((240&t)==224)n=2,s=2047;else if((248&t)==240)n=3,s=65535;else{(192&t)==128?a+=e("UNEXPECTED_CONTINUE",a-1,r,i):a+=e("BAD_PREFIX",a-1,r,i);continue}if(a-1+n>=r.length){a+=e("OVERRUN",a-1,r,i);continue}let o=t&(1<<8-n-1)-1;for(let t=0;t1114111){a+=e("OUT_OF_RANGE",a-1-n,r,i,o);continue}if(o>=55296&&o<=57343){a+=e("UTF16_SURROGATE",a-1-n,r,i,o);continue}if(o<=s){a+=e("OVERLONG",a-1-n,r,i,o);continue}i.push(o)}}return i})(t,e).map(t=>t<=65535?String.fromCharCode(t):String.fromCharCode(((t-=65536)>>10&1023)+55296,(1023&t)+56320)).join("")}},18482:(t,e,r)=>{r.d(e,{$:()=>l});var n=r(99766),i=r(69947),a=r(65217),s=r(60158),o=r(99303);async function l(t,e){async function r(e){if(e.endsWith(o.ny.slice(2))){let r=(0,i.f)((0,n.p5)(e,-64,-32)),s=(0,n.p5)(e,0,-64).slice(2).match(/.{1,64}/g),l=await Promise.all(s.map(e=>o.rC.slice(2)!==e?t.request({method:"eth_getTransactionReceipt",params:[`0x${e}`]},{dedupe:!0}):void 0)),u=l.some(t=>null===t)?100:l.every(t=>t?.status==="0x1")?200:l.every(t=>t?.status==="0x0")?500:600;return{atomic:!1,chainId:(0,a.ly)(r),receipts:l.filter(Boolean),status:u,version:"2.0.0"}}return t.request({method:"wallet_getCallsStatus",params:[e]})}let{atomic:l=!1,chainId:u,receipts:c,version:h="2.0.0",...f}=await r(e.id),[d,p]=(()=>{let t=f.status;return t>=100&&t<200?["pending",t]:t>=200&&t<300?["success",t]:t>=300&&t<700?["failure",t]:"CONFIRMED"===t?["success",200]:"PENDING"===t?["pending",100]:[void 0,t]})();return{...f,atomic:l,chainId:u?(0,a.ly)(u):void 0,receipts:c?.map(t=>({...t,blockNumber:a.y_(t.blockNumber),gasUsed:a.y_(t.gasUsed),status:s.ew[t.status]}))??[],statusCode:p,status:d,version:h}}},18017:(t,e,r)=>{r.d(e,{x:()=>u});var n=r(92406),i=r(60627),a=r(90049),s=r(63994),o=r(52588),l=r(86579);async function u(t,e){let{account:r=t.account,chainId:u,nonce:c}=e;if(!r)throw new i.o({docsPath:"/docs/eip7702/prepareAuthorization"});let h=(0,n.T)(r),f=(()=>{if(e.executor)return"self"===e.executor?e.executor:(0,n.T)(e.executor)})(),d={address:e.contractAddress??e.address,chainId:u,nonce:c};return void 0===d.chainId&&(d.chainId=t.chain?.id??await (0,s.s)(t,o.L,"getChainId")({})),void 0===d.nonce&&(d.nonce=await (0,s.s)(t,l.K,"getTransactionCount")({address:h.address,blockTag:"pending"}),("self"===f||f?.address&&(0,a.E)(f.address,h.address))&&(d.nonce+=1)),d}},99303:(t,e,r)=>{r.d(e,{ny:()=>f,rC:()=>d,s_:()=>p});var n=r(92406),i=r(89728),a=r(75275),s=r(42068),o=r(59075),l=r(65217),u=r(75247),c=r(54183),h=r(82386);let f="0x5792579257925792579257925792579257925792579257925792579257925792",d=(0,u.eC)(0,{size:32});async function p(t,e){let{account:r=t.account,capabilities:p,chain:g=t.chain,experimental_fallback:m,experimental_fallbackDelay:y=32,forceAtomic:b=!1,id:w,version:v="2.0.0"}=e,E=r?(0,n.T)(r):null,N=e.calls.map(t=>{let e=t.abi?(0,s.R)({abi:t.abi,functionName:t.functionName,args:t.args}):t.data;return{data:t.dataSuffix&&e?(0,o.zo)([e,t.dataSuffix]):e,to:t.to,value:t.value?(0,u.eC)(t.value):void 0}});try{let e=await t.request({method:"wallet_sendCalls",params:[{atomicRequired:b,calls:N,capabilities:p,chainId:(0,u.eC)(g.id),from:E?.address,id:w,version:v}]},{retryCount:0});if("string"==typeof e)return{id:e};return e}catch(r){if(m&&("MethodNotFoundRpcError"===r.name||"MethodNotSupportedRpcError"===r.name||"UnknownRpcError"===r.name||r.details.toLowerCase().includes("does not exist / is not available")||r.details.toLowerCase().includes("missing or invalid. request()")||r.details.toLowerCase().includes("did not match any variant of untagged enum")||r.details.toLowerCase().includes("account upgraded to unsupported contract")||r.details.toLowerCase().includes("eip-7702 not supported")||r.details.toLowerCase().includes("unsupported wc_ method")||r.details.toLowerCase().includes("feature toggled misconfigured")||r.details.toLowerCase().includes("jsonrpcengine: response has no error or result for request"))){if(p&&Object.values(p).some(t=>!t.optional)){let t="non-optional `capabilities` are not supported on fallback to `eth_sendTransaction`.";throw new a.vl(new i.G(t,{details:t}))}if(b&&N.length>1){let t="`forceAtomic` is not supported on fallback to `eth_sendTransaction`.";throw new a.r0(new i.G(t,{details:t}))}let e=[];for(let r of N){let n=(0,h.T)(t,{account:E,chain:g,data:r.data,to:r.to,value:r.value?(0,l.y_)(r.value):void 0});e.push(n),y>0&&await new Promise(t=>setTimeout(t,y))}let r=await Promise.allSettled(e);if(r.every(t=>"rejected"===t.status))throw r[0].reason;let n=r.map(t=>"fulfilled"===t.status?t.value:d);return{id:(0,o.zo)([...n,(0,u.eC)(g.id,{size:32}),f])}}throw(0,c.$)(r,{...e,account:E,chain:e.chain})}}},85944:(t,e,r)=>{r.d(e,{l:()=>f});var n=r(89728);class i extends n.G{constructor(t){super(`Call bundle failed with status: ${t.statusCode}`,{name:"BundleFailedError"}),Object.defineProperty(this,"result",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.result=t}}var a=r(63994),s=r(50100),o=r(96832),l=r(79406),u=r(5448),c=r(96838),h=r(18482);async function f(t,e){let r;let{id:n,pollingInterval:f=t.pollingInterval,status:p=({statusCode:t})=>200===t||t>=300,retryCount:g=4,retryDelay:m=({count:t})=>200*~~(1<{let s=(0,o.$)(async()=>{let o=t=>{clearTimeout(r),s(),t(),T()};try{let r=await (0,u.J)(async()=>{let e=await (0,a.s)(t,h.$,"getCallsStatus")({id:n});if(b&&"failure"===e.status)throw new i(e);return e},{retryCount:g,delay:m});if(!p(r))return;o(()=>e.resolve(r))}catch(t){o(()=>e.reject(t))}},{interval:f,emitOnBegin:!0});return s});return r=y?setTimeout(()=>{T(),clearTimeout(r),N(new d({id:n}))},y):void 0,await v}class d extends n.G{constructor({id:t}){super(`Timed out while waiting for call bundle with id "${t}" to be confirmed.`,{name:"WaitForCallsStatusTimeoutError"})}}},8250:(t,e,r)=>{r.d(e,{t:()=>o});var n=r(2423);function i(t,e={}){let r=function(t,e={}){try{return t.getClient(e)}catch{return}}(t,e);return r?.extend(n.I)}var a=r(21508),s=r(2487);function o(t={}){let e=(0,s.Z)(t);return(0,a.useSyncExternalStoreWithSelector)(t=>(function(t,e){let{onChange:r}=e;return t.subscribe(()=>i(t),r,{equalityFn:(t,e)=>t?.uid===e?.uid})})(e,{onChange:t}),()=>i(e,t),()=>i(e,t),t=>t,(t,e)=>t?.uid===e?.uid)}},96361:(t,e,r)=>{r.d(e,{p:()=>ti});var n=r(44976),i=r(91496),a=r(52588),s=r(75247);async function o(t,{chain:e}){let{id:r,name:n,nativeCurrency:i,rpcUrls:a,blockExplorers:o}=e;await t.request({method:"wallet_addEthereumChain",params:[{chainId:(0,s.eC)(r),chainName:n,nativeCurrency:i,rpcUrls:a.default.http,blockExplorerUrls:o?Object.values(o).map(({url:t})=>t):void 0}]},{dedupe:!0,retryCount:0})}var l=r(20472),u=r(82386),c=r(48489);async function h(t){return t.account?.type==="local"?[t.account.address]:(await t.request({method:"eth_accounts"},{dedupe:!0})).map(t=>(0,c.x)(t))}var f=r(18482),d=r(92406);async function p(t,e={}){let{account:r=t.account,chainId:n}=e,i=r?(0,d.T)(r):void 0,a=n?[i?.address,[(0,s.eC)(n)]]:[i?.address],o=await t.request({method:"wallet_getCapabilities",params:a}),l={};for(let[t,e]of Object.entries(o))for(let[r,n]of(l[Number(t)]={},Object.entries(e)))"addSubAccount"===r&&(r="unstable_addSubAccount"),l[Number(t)][r]=n;return"number"==typeof n?l[n]:l}async function g(t){return await t.request({method:"wallet_getPermissions"},{dedupe:!0})}var m=r(18017),y=r(80840);async function b(t){return(await t.request({method:"eth_requestAccounts"},{dedupe:!0,retryCount:0})).map(t=>(0,c.K)(t))}async function w(t,e){return t.request({method:"wallet_requestPermissions",params:[e]},{retryCount:0})}var v=r(99303),E=r(85944);async function N(t,e){let{chain:r=t.chain}=e,n=e.timeout??Math.max((r?.blockTime??0)*3,5e3),i=await (0,v.s_)(t,e);return await (0,E.l)(t,{...e,id:i.id,timeout:n})}var T=r(21634),x=r(56537),O=r(60627),k=r(89728),A=r(22412),R=r(73564),P=r(73774),I=r(54183),U=r(57663),_=r(23924),C=r(63994),S=r(87722),F=r(12127),L=r(42818);let B=new S.k(128);async function j(t,e){let{account:r=t.account,chain:n=t.chain,accessList:i,authorizationList:s,blobs:o,data:l,gas:u,gasPrice:c,maxFeePerBlobGas:h,maxFeePerGas:f,maxPriorityFeePerGas:p,nonce:g,pollingInterval:m,throwOnReceiptRevert:b,type:w,value:v,...E}=e,N=e.timeout??Math.max((n?.blockTime??0)*3,5e3);if(void 0===r)throw new O.o({docsPath:"/docs/actions/wallet/sendTransactionSync"});let T=r?(0,d.T)(r):null;try{(0,F.F)(e);let r=await (async()=>e.to?e.to:null!==e.to&&s&&s.length>0?await (0,R.z)({authorization:s[0]}).catch(()=>{throw new k.G("`to` is required. Could not infer from `authorizationList`.")}):void 0)();if(T?.type==="json-rpc"||null===T){let e;null!==n&&(e=await (0,C.s)(t,a.L,"getChainId")({}),(0,P.q)({currentChainId:e,chain:n}));let d=t.chain?.formatters?.transactionRequest?.format,y=(d||_.tG)({...(0,U.K)(E,{format:d}),accessList:i,account:T,authorizationList:s,blobs:o,chainId:e,data:l,gas:u,gasPrice:c,maxFeePerBlobGas:h,maxFeePerGas:f,maxPriorityFeePerGas:p,nonce:g,to:r,type:w,value:v},"sendTransaction"),x=B.get(t.uid),O=x?"wallet_sendTransaction":"eth_sendTransaction",k=await (async()=>{try{return await t.request({method:O,params:[y]},{retryCount:0})}catch(e){if(!1===x)throw e;if("InvalidInputRpcError"===e.name||"InvalidParamsRpcError"===e.name||"MethodNotFoundRpcError"===e.name||"MethodNotSupportedRpcError"===e.name)return await t.request({method:"wallet_sendTransaction",params:[y]},{retryCount:0}).then(e=>(B.set(t.uid,!0),e)).catch(r=>{if("MethodNotFoundRpcError"===r.name||"MethodNotSupportedRpcError"===r.name)throw B.set(t.uid,!1),e;throw r});throw e}})(),R=await (0,C.s)(t,L.e,"waitForTransactionReceipt")({checkReplacement:!1,hash:k,pollingInterval:m,timeout:N});if(b&&"reverted"===R.status)throw new A.A3({receipt:R});return R}if(T?.type==="local"){let e=await (0,C.s)(t,y.ZE,"prepareTransactionRequest")({account:T,accessList:i,authorizationList:s,blobs:o,chain:n,data:l,gas:u,gasPrice:c,maxFeePerBlobGas:h,maxFeePerGas:f,maxPriorityFeePerGas:p,nonce:g,nonceManager:T.nonceManager,parameters:[...y.QZ,"sidecars"],type:w,value:v,...E,to:r}),a=n?.serializers?.transaction,d=await T.signTransaction(e,{serializer:a});return await (0,C.s)(t,x.s,"sendRawTransactionSync")({serializedTransaction:d,throwOnReceiptRevert:b})}if(T?.type==="smart")throw new O.Y({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"});throw new O.Y({docsPath:"/docs/actions/wallet/sendTransactionSync",type:T?.type})}catch(t){if(t instanceof O.Y)throw t;throw(0,I.$)(t,{...e,account:T,chain:e.chain||void 0})}}async function D(t,e){let{id:r}=e;await t.request({method:"wallet_showCallsStatus",params:[r]})}async function $(t,e){let{account:r=t.account}=e;if(!r)throw new O.o({docsPath:"/docs/eip7702/signAuthorization"});let n=(0,d.T)(r);if(!n.signAuthorization)throw new O.Y({docsPath:"/docs/eip7702/signAuthorization",metaMessages:["The `signAuthorization` Action does not support JSON-RPC Accounts."],type:n.type});let i=await (0,m.x)(t,e);return n.signAuthorization(i)}var M=r(17375);async function V(t,e){let{account:r=t.account,chain:n=t.chain,...i}=e;if(!r)throw new O.o({docsPath:"/docs/actions/wallet/signTransaction"});let o=(0,d.T)(r);(0,F.F)({account:o,...e});let l=await (0,C.s)(t,a.L,"getChainId")({});null!==n&&(0,P.q)({currentChainId:l,chain:n});let u=n?.formatters||t.chain?.formatters,c=u?.transactionRequest?.format||_.tG;return o.signTransaction?o.signTransaction({...i,chainId:l},{serializer:t.chain?.serializers?.transaction}):await t.request({method:"eth_signTransaction",params:[{...c({...i,account:o},"signTransaction"),chainId:(0,s.eC)(l),from:o.address}]},{retryCount:0})}var z=r(71600);async function G(t,e){let{account:r=t.account,domain:n,message:i,primaryType:a}=e;if(!r)throw new O.o({docsPath:"/docs/actions/wallet/signTypedData"});let s=(0,d.T)(r),o={EIP712Domain:(0,z.cj)({domain:n}),...e.types};if((0,z.iC)({domain:n,message:i,primaryType:a,types:o}),s.signTypedData)return s.signTypedData({domain:n,message:i,primaryType:a,types:o});let l=(0,z.H6)({domain:n,message:i,primaryType:a,types:o});return t.request({method:"eth_signTypedData_v4",params:[s.address,l]},{retryCount:0})}async function H(t,{id:e}){await t.request({method:"wallet_switchEthereumChain",params:[{chainId:(0,s.eC)(e)}]},{retryCount:0})}async function q(t,e){return await t.request({method:"wallet_watchAsset",params:e},{retryCount:0})}var J=r(8738);async function K(t,e){return J.n.internal(t,j,"sendTransactionSync",e)}function W(t){return{addChain:e=>o(t,e),deployContract:e=>(function(t,e){let{abi:r,args:n,bytecode:i,...a}=e,s=(0,l.w)({abi:r,args:n,bytecode:i});return(0,u.T)(t,{...a,...a.authorizationList?{to:null}:{},data:s})})(t,e),fillTransaction:e=>(0,i.b)(t,e),getAddresses:()=>h(t),getCallsStatus:e=>(0,f.$)(t,e),getCapabilities:e=>p(t,e),getChainId:()=>(0,a.L)(t),getPermissions:()=>g(t),prepareAuthorization:e=>(0,m.x)(t,e),prepareTransactionRequest:e=>(0,y.ZE)(t,e),requestAddresses:()=>b(t),requestPermissions:e=>w(t,e),sendCalls:e=>(0,v.s_)(t,e),sendCallsSync:e=>N(t,e),sendRawTransaction:e=>(0,T.p)(t,e),sendRawTransactionSync:e=>(0,x.s)(t,e),sendTransaction:e=>(0,u.T)(t,e),sendTransactionSync:e=>j(t,e),showCallsStatus:e=>D(t,e),signAuthorization:e=>$(t,e),signMessage:e=>(0,M.l)(t,e),signTransaction:e=>V(t,e),signTypedData:e=>G(t,e),switchChain:e=>H(t,e),waitForCallsStatus:e=>(0,E.l)(t,e),watchAsset:e=>q(t,e),writeContract:e=>(0,J.n)(t,e),writeContractSync:e=>K(t,e)}}var Z=r(54979);async function Y(t,e={}){return(await (0,Z.e)(t,e)).extend(W)}var X=r(13184),Q=r(17577),tt=r(37597),te=r(95224),tr=r(2487),tn=r(37090);function ti(t={}){let{query:e={},...r}=t,i=(0,tr.Z)(r);(0,n.NL)();let{address:a,connector:s,status:o}=(0,tn.R)({config:i}),l=(0,te.x)({config:i}),u=t.connector??s,{queryKey:c,...h}=function(t,e={}){return{gcTime:0,async queryFn({queryKey:r}){let{connector:n}=e,{connectorUid:i,scopeKey:a,...s}=r[1];return Y(t,{...s,connector:n})},queryKey:function(t={}){let{connector:e,...r}=t;return["walletClient",{...(0,X.OP)(r),connectorUid:e?.uid}]}(e)}}(i,{...t,chainId:t.chainId??l,connector:t.connector??s}),f=!!(("connected"===o||"reconnecting"===o&&u?.getProvider)&&(e.enabled??!0));return(0,Q.useRef)(a),(0,tt.aM)({...e,...h,queryKey:c,enabled:f,staleTime:Number.POSITIVE_INFINITY})}}}; \ No newline at end of file diff --git a/frontend/.next/server/chunks/8608.js b/frontend/.next/server/chunks/8608.js new file mode 100644 index 0000000..c305be9 --- /dev/null +++ b/frontend/.next/server/chunks/8608.js @@ -0,0 +1,14 @@ +"use strict";exports.id=8608,exports.ids=[8608],exports.modules={98608:(t,e,r)=>{r.r(e),r.d(e,{PhClock:()=>n}),r(31325);var a=r(70460),o=r(75466),i=r(66005),s=r(28405),h=r(43961),p=Object.defineProperty,l=Object.getOwnPropertyDescriptor,d=(t,e,r,a)=>{for(var o,i=a>1?void 0:a?l(e,r):e,s=t.length-1;s>=0;s--)(o=t[s])&&(i=(a?o(e,r,i):o(i))||i);return a&&i&&p(e,r,i),i};let n=class extends o.oi{constructor(){super(...arguments),this.size="1em",this.weight="regular",this.color="currentColor",this.mirrored=!1}render(){var t;return(0,a.dy)` + ${n.weightsMap.get(null!=(t=this.weight)?t:"regular")} + `}};n.weightsMap=new Map([["thin",(0,a.YP)``],["light",(0,a.YP)``],["regular",(0,a.YP)``],["bold",(0,a.YP)``],["fill",(0,a.YP)``],["duotone",(0,a.YP)``]]),n.styles=(0,h.iv)` + :host { + display: contents; + } + `,d([(0,s.C)({type:String,reflect:!0})],n.prototype,"size",2),d([(0,s.C)({type:String,reflect:!0})],n.prototype,"weight",2),d([(0,s.C)({type:String,reflect:!0})],n.prototype,"color",2),d([(0,s.C)({type:Boolean,reflect:!0})],n.prototype,"mirrored",2),n=d([(0,i.M)("ph-clock")],n)}}; \ No newline at end of file diff --git a/frontend/.next/server/chunks/8641.js b/frontend/.next/server/chunks/8641.js new file mode 100644 index 0000000..1fb448d --- /dev/null +++ b/frontend/.next/server/chunks/8641.js @@ -0,0 +1,14 @@ +"use strict";exports.id=8641,exports.ids=[8641],exports.modules={68641:(a,t,e)=>{e.r(t),e.d(t,{PhArrowsClockwise:()=>n}),e(31325);var r=e(70460),h=e(75466),o=e(66005),i=e(28405),s=e(43961),l=Object.defineProperty,p=Object.getOwnPropertyDescriptor,d=(a,t,e,r)=>{for(var h,o=r>1?void 0:r?p(t,e):t,i=a.length-1;i>=0;i--)(h=a[i])&&(o=(r?h(t,e,o):h(o))||o);return r&&o&&l(t,e,o),o};let n=class extends h.oi{constructor(){super(...arguments),this.size="1em",this.weight="regular",this.color="currentColor",this.mirrored=!1}render(){var a;return(0,r.dy)` + ${n.weightsMap.get(null!=(a=this.weight)?a:"regular")} + `}};n.weightsMap=new Map([["thin",(0,r.YP)``],["light",(0,r.YP)``],["regular",(0,r.YP)``],["bold",(0,r.YP)``],["fill",(0,r.YP)``],["duotone",(0,r.YP)``]]),n.styles=(0,s.iv)` + :host { + display: contents; + } + `,d([(0,i.C)({type:String,reflect:!0})],n.prototype,"size",2),d([(0,i.C)({type:String,reflect:!0})],n.prototype,"weight",2),d([(0,i.C)({type:String,reflect:!0})],n.prototype,"color",2),d([(0,i.C)({type:Boolean,reflect:!0})],n.prototype,"mirrored",2),n=d([(0,o.M)("ph-arrows-clockwise")],n)}}; \ No newline at end of file diff --git a/frontend/.next/server/chunks/891.js b/frontend/.next/server/chunks/891.js new file mode 100644 index 0000000..058125e --- /dev/null +++ b/frontend/.next/server/chunks/891.js @@ -0,0 +1 @@ +"use strict";exports.id=891,exports.ids=[891],exports.modules={8851:(e,t,i)=>{i.d(t,{v:()=>r});var l=i(30326),n=i(2423);function r(e){let{key:t="public",name:i="Public Client"}=e;return(0,l.e)({...e,key:t,name:i,type:"publicClient"}).extend(n.I)}},80891:(e,t,i)=>{i.d(t,{createPublicClient:()=>l.v,defineChain:()=>r.a,http:()=>n.d});var l=i(8851),n=i(89259),r=i(2806)}}; \ No newline at end of file diff --git a/frontend/.next/server/chunks/8921.js b/frontend/.next/server/chunks/8921.js new file mode 100644 index 0000000..9ddd138 --- /dev/null +++ b/frontend/.next/server/chunks/8921.js @@ -0,0 +1,14 @@ +"use strict";exports.id=8921,exports.ids=[8921],exports.modules={58921:(t,e,r)=>{r.r(e),r.d(e,{PhArrowClockwise:()=>d}),r(31325);var a=r(70460),o=r(75466),i=r(66005),s=r(28405),h=r(43961),l=Object.defineProperty,p=Object.getOwnPropertyDescriptor,c=(t,e,r,a)=>{for(var o,i=a>1?void 0:a?p(e,r):e,s=t.length-1;s>=0;s--)(o=t[s])&&(i=(a?o(e,r,i):o(i))||i);return a&&i&&l(e,r,i),i};let d=class extends o.oi{constructor(){super(...arguments),this.size="1em",this.weight="regular",this.color="currentColor",this.mirrored=!1}render(){var t;return(0,a.dy)` + ${d.weightsMap.get(null!=(t=this.weight)?t:"regular")} + `}};d.weightsMap=new Map([["thin",(0,a.YP)``],["light",(0,a.YP)``],["regular",(0,a.YP)``],["bold",(0,a.YP)``],["fill",(0,a.YP)``],["duotone",(0,a.YP)``]]),d.styles=(0,h.iv)` + :host { + display: contents; + } + `,c([(0,s.C)({type:String,reflect:!0})],d.prototype,"size",2),c([(0,s.C)({type:String,reflect:!0})],d.prototype,"weight",2),c([(0,s.C)({type:String,reflect:!0})],d.prototype,"color",2),c([(0,s.C)({type:Boolean,reflect:!0})],d.prototype,"mirrored",2),d=c([(0,i.M)("ph-arrow-clockwise")],d)}}; \ No newline at end of file diff --git a/frontend/.next/server/chunks/8955.js b/frontend/.next/server/chunks/8955.js new file mode 100644 index 0000000..993127a --- /dev/null +++ b/frontend/.next/server/chunks/8955.js @@ -0,0 +1,3 @@ +"use strict";exports.id=8955,exports.ids=[8955],exports.modules={43961:(t,e,i)=>{i.d(e,{ec:()=>d,i1:()=>u,iv:()=>a});let s=globalThis,r=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,l=Symbol(),n=new WeakMap;class o{constructor(t,e,i){if(this._$cssResult$=!0,i!==l)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(r&&void 0===t){let i=void 0!==e&&1===e.length;i&&(t=n.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&n.set(e,t))}return t}toString(){return this.cssText}}let h=t=>new o("string"==typeof t?t:t+"",void 0,l),a=(t,...e)=>new o(1===t.length?t[0]:e.reduce((e,i,s)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[s+1],t[0]),t,l),d=(t,e)=>{if(r)t.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(let i of e){let e=document.createElement("style"),r=s.litNonce;void 0!==r&&e.setAttribute("nonce",r),e.textContent=i.cssText,t.appendChild(e)}},u=r?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(let i of t.cssRules)e+=i.cssText;return h(e)})(t):t},66005:(t,e,i)=>{i.d(e,{M:()=>s});let s=t=>(e,i)=>{void 0!==i?i.addInitializer(()=>{customElements.define(t,e)}):customElements.define(t,e)}},28405:(t,e,i)=>{i.d(e,{C:()=>_});var s=i(31325),r=Object.defineProperty,l=Object.defineProperties,n=Object.getOwnPropertyDescriptors,o=Object.getOwnPropertySymbols,h=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable,d=(t,e,i)=>e in t?r(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,u=(t,e)=>{for(var i in e||(e={}))h.call(e,i)&&d(t,i,e[i]);if(o)for(var i of o(e))a.call(e,i)&&d(t,i,e[i]);return t},c=(t,e)=>l(t,n(e));let p={attribute:!0,type:String,converter:s.Ts,reflect:!1,hasChanged:s.Qu},$=(t=p,e,i)=>{let{kind:s,metadata:r}=i,l=globalThis.litPropertyMetadata.get(r);if(void 0===l&&globalThis.litPropertyMetadata.set(r,l=new Map),l.set(i.name,t),"accessor"===s){let{name:s}=i;return{set(i){let r=e.get.call(this);e.set.call(this,i),this.requestUpdate(s,r,t)},init(e){return void 0!==e&&this.P(s,void 0,t),e}}}if("setter"===s){let{name:s}=i;return function(i){let r=this[s];e.call(this,i),this.requestUpdate(s,r,t)}}throw Error("Unsupported decorator location: "+s)};function _(t){return(e,i)=>"object"==typeof i?$(t,e,i):((t,e,i)=>{let s=e.hasOwnProperty(i);return e.constructor.createProperty(i,s?c(u({},t),{wrapped:!0}):t),s?Object.getOwnPropertyDescriptor(e,i):void 0})(t,e,i)}},31325:(t,e,i)=>{i.d(e,{Qu:()=>f,Ts:()=>v,fl:()=>y});var s,r=i(43961);let{is:l,defineProperty:n,getOwnPropertyDescriptor:o,getOwnPropertyNames:h,getOwnPropertySymbols:a,getPrototypeOf:d}=Object,u=globalThis,c=u.trustedTypes,p=c?c.emptyScript:"",$=u.reactiveElementPolyfillSupport,_=(t,e)=>t,v={toAttribute(t,e){switch(e){case Boolean:t=t?p:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},f=(t,e)=>!l(t,e),A={attribute:!0,type:String,converter:v,reflect:!1,hasChanged:f};null!=Symbol.metadata||(Symbol.metadata=Symbol("metadata")),null!=u.litPropertyMetadata||(u.litPropertyMetadata=new WeakMap);class y extends HTMLElement{static addInitializer(t){var e;this._$Ei(),(null!=(e=this.l)?e:this.l=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=A){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){let i=Symbol(),s=this.getPropertyDescriptor(t,i,e);void 0!==s&&n(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){var s;let{get:r,set:l}=null!=(s=o(this.prototype,t))?s:{get(){return this[e]},set(t){this[e]=t}};return{get(){return null==r?void 0:r.call(this)},set(e){let s=null==r?void 0:r.call(this);l.call(this,e),this.requestUpdate(t,s,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){var e;return null!=(e=this.elementProperties.get(t))?e:A}static _$Ei(){if(this.hasOwnProperty(_("elementProperties")))return;let t=d(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(_("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(_("properties"))){let t=this.properties;for(let e of[...h(t),...a(t)])this.createProperty(e,t[e])}let t=this[Symbol.metadata];if(null!==t){let e=litPropertyMetadata.get(t);if(void 0!==e)for(let[t,i]of e)this.elementProperties.set(t,i)}for(let[t,e]of(this._$Eh=new Map,this.elementProperties)){let i=this._$Eu(t,e);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t))for(let i of new Set(t.flat(1/0).reverse()))e.unshift((0,r.i1)(i));else void 0!==t&&e.push((0,r.i1)(t));return e}static _$Eu(t,e){let i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),null==(t=this.constructor.l)||t.forEach(t=>t(this))}addController(t){var e,i;(null!=(e=this._$EO)?e:this._$EO=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&(null==(i=t.hostConnected)||i.call(t))}removeController(t){var e;null==(e=this._$EO)||e.delete(t)}_$E_(){let t=new Map;for(let e of this.constructor.elementProperties.keys())this.hasOwnProperty(e)&&(t.set(e,this[e]),delete this[e]);t.size>0&&(this._$Ep=t)}createRenderRoot(){var t;let e=null!=(t=this.shadowRoot)?t:this.attachShadow(this.constructor.shadowRootOptions);return(0,r.ec)(e,this.constructor.elementStyles),e}connectedCallback(){var t;null!=this.renderRoot||(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null==(t=this._$EO)||t.forEach(t=>{var e;return null==(e=t.hostConnected)?void 0:e.call(t)})}enableUpdating(t){}disconnectedCallback(){var t;null==(t=this._$EO)||t.forEach(t=>{var e;return null==(e=t.hostDisconnected)?void 0:e.call(t)})}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EC(t,e){var i;let s=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,s);if(void 0!==r&&!0===s.reflect){let l=((null==(i=s.converter)?void 0:i.toAttribute)!==void 0?s.converter:v).toAttribute(e,s.type);this._$Em=t,null==l?this.removeAttribute(r):this.setAttribute(r,l),this._$Em=null}}_$AK(t,e){var i;let s=this.constructor,r=s._$Eh.get(t);if(void 0!==r&&this._$Em!==r){let t=s.getPropertyOptions(r),l="function"==typeof t.converter?{fromAttribute:t.converter}:(null==(i=t.converter)?void 0:i.fromAttribute)!==void 0?t.converter:v;this._$Em=r,this[r]=l.fromAttribute(e,t.type),this._$Em=null}}requestUpdate(t,e,i){var s;if(void 0!==t){if(null!=i||(i=this.constructor.getPropertyOptions(t)),!(null!=(s=i.hasChanged)?s:f)(this[t],e))return;this.P(t,e,i)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(t,e,i){var s;this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$Em!==t&&(null!=(s=this._$Ej)?s:this._$Ej=new Set).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}let t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(null!=this.renderRoot||(this.renderRoot=this.createRenderRoot()),this._$Ep){for(let[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}let t=this.constructor.elementProperties;if(t.size>0)for(let[e,i]of t)!0!==i.wrapped||this._$AL.has(e)||void 0===this[e]||this.P(e,this[e],i)}let e=!1,i=this._$AL;try{(e=this.shouldUpdate(i))?(this.willUpdate(i),null==(t=this._$EO)||t.forEach(t=>{var e;return null==(e=t.hostUpdate)?void 0:e.call(t)}),this.update(i)):this._$EU()}catch(t){throw e=!1,this._$EU(),t}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;null==(e=this._$EO)||e.forEach(t=>{var e;return null==(e=t.hostUpdated)?void 0:e.call(t)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&(this._$Ej=this._$Ej.forEach(t=>this._$EC(t,this[t]))),this._$EU()}updated(t){}firstUpdated(t){}}y.elementStyles=[],y.shadowRootOptions={mode:"open"},y[_("elementProperties")]=new Map,y[_("finalized")]=new Map,null==$||$({ReactiveElement:y}),(null!=(s=u.reactiveElementVersions)?s:u.reactiveElementVersions=[]).push("2.0.4")},75466:(t,e,i)=>{i.d(e,{oi:()=>o});var s,r,l=i(31325),n=i(70460);class o extends l.fl{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t;let e=super.createRenderRoot();return null!=(t=this.renderOptions).renderBefore||(t.renderBefore=e.firstChild),e}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=(0,n.sY)(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null==(t=this._$Do)||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null==(t=this._$Do)||t.setConnected(!1)}render(){return n.Jb}}o._$litElement$=!0,o.finalized=!0,null==(s=globalThis.litElementHydrateSupport)||s.call(globalThis,{LitElement:o});let h=globalThis.litElementPolyfillSupport;null==h||h({LitElement:o}),(null!=(r=globalThis.litElementVersions)?r:globalThis.litElementVersions=[]).push("4.0.6")},70460:(t,e,i)=>{var s;i.d(e,{Jb:()=>C,YP:()=>P,dy:()=>w,sY:()=>V});let r=globalThis,l=r.trustedTypes,n=l?l.createPolicy("lit-html",{createHTML:t=>t}):void 0,o="$lit$",h=`lit$${Math.random().toFixed(9).slice(2)}$`,a="?"+h,d=`<${a}>`,u=document,c=()=>u.createComment(""),p=t=>null===t||"object"!=typeof t&&"function"!=typeof t,$=Array.isArray,_=t=>$(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]),v=`[ +\f\r]`,f=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,A=/-->/g,y=/>/g,m=RegExp(`>|${v}(?:([^\\s"'>=/]+)(${v}*=${v}*(?:[^ +\f\r"'\`<>=]|("|')|))|$)`,"g"),g=/'/g,b=/"/g,E=/^(?:script|style|textarea|title)$/i,S=t=>(e,...i)=>({_$litType$:t,strings:e,values:i}),w=S(1),P=S(2),C=Symbol.for("lit-noChange"),U=Symbol.for("lit-nothing"),x=new WeakMap,O=u.createTreeWalker(u,129);function T(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==n?n.createHTML(e):e}let H=(t,e)=>{let i=t.length-1,s=[],r,l=2===e?"":"",n=f;for(let e=0;e"===u[0]?(n=null!=r?r:f,c=-1):void 0===u[1]?c=-2:(c=n.lastIndex-u[2].length,a=u[1],n=void 0===u[3]?m:'"'===u[3]?b:g):n===b||n===g?n=m:n===A||n===y?n=f:(n=m,r=void 0);let $=n===m&&t[e+1].startsWith("/>")?" ":"";l+=n===f?i+d:c>=0?(s.push(a),i.slice(0,c)+o+i.slice(c)+h+$):i+h+(-2===c?e:$)}return[T(t,l+(t[i]||"")+(2===e?"":"")),s]};class M{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let r=0,n=0,d=t.length-1,u=this.parts,[p,$]=H(t,e);if(this.el=M.createElement(p,i),O.currentNode=this.el.content,2===e){let t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(s=O.nextNode())&&u.length0){s.textContent=l?l.emptyScript:"";for(let i=0;i2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=U}_$AI(t,e=this,i,s){let r=this.strings,l=!1;if(void 0===r)(l=!p(t=N(this,t,e,0))||t!==this._$AH&&t!==C)&&(this._$AH=t);else{let s,n;let o=t;for(t=r[0],s=0;s{var s,r;let l=null!=(s=null==i?void 0:i.renderBefore)?s:e,n=l._$litPart$;if(void 0===n){let t=null!=(r=null==i?void 0:i.renderBefore)?r:null;l._$litPart$=n=new j(e.insertBefore(c(),t),t,void 0,null!=i?i:{})}return n._$AI(t),n}}}; \ No newline at end of file diff --git a/frontend/.next/server/chunks/9276.js b/frontend/.next/server/chunks/9276.js new file mode 100644 index 0000000..d931e46 --- /dev/null +++ b/frontend/.next/server/chunks/9276.js @@ -0,0 +1,2 @@ +exports.id=9276,exports.ids=[9276],exports.modules={48839:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{bootstrap:function(){return s},error:function(){return c},event:function(){return g},info:function(){return p},prefixes:function(){return a},ready:function(){return d},trace:function(){return f},wait:function(){return u},warn:function(){return l},warnOnce:function(){return v}});let n=r(91354),a={wait:(0,n.white)((0,n.bold)("○")),error:(0,n.red)((0,n.bold)("⨯")),warn:(0,n.yellow)((0,n.bold)("⚠")),ready:"▲",info:(0,n.white)((0,n.bold)(" ")),event:(0,n.green)((0,n.bold)("✓")),trace:(0,n.magenta)((0,n.bold)("\xbb"))},o={log:"log",warn:"warn",error:"error"};function i(e,...t){(""===t[0]||void 0===t[0])&&1===t.length&&t.shift();let r=e in o?o[e]:"log",n=a[e];0===t.length?console[r](""):console[r](" "+n,...t)}function s(...e){console.log(" ",...e)}function u(...e){i("wait",...e)}function c(...e){i("error",...e)}function l(...e){i("warn",...e)}function d(...e){i("ready",...e)}function p(...e){i("info",...e)}function g(...e){i("event",...e)}function f(...e){i("trace",...e)}let _=new Set;function v(...e){_.has(e[0])||(_.add(e.join(" ")),l(...e))}},44789:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{DynamicServerError:function(){return n},isDynamicServerError:function(){return a}});let r="DYNAMIC_SERVER_USAGE";class n extends Error{constructor(e){super("Dynamic server usage: "+e),this.description=e,this.digest=r}}function a(e){return"object"==typeof e&&null!==e&&"digest"in e&&"string"==typeof e.digest&&e.digest===r}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},24618:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{StaticGenBailoutError:function(){return n},isStaticGenBailoutError:function(){return a}});let r="NEXT_STATIC_GEN_BAILOUT";class n extends Error{constructor(...e){super(...e),this.code=r}}function a(e){return"object"==typeof e&&null!==e&&"code"in e&&e.code===r}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},27482:e=>{(()=>{"use strict";var t={491:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ContextAPI=void 0;let n=r(223),a=r(172),o=r(930),i="context",s=new n.NoopContextManager;class u{constructor(){}static getInstance(){return this._instance||(this._instance=new u),this._instance}setGlobalContextManager(e){return(0,a.registerGlobal)(i,e,o.DiagAPI.instance())}active(){return this._getContextManager().active()}with(e,t,r,...n){return this._getContextManager().with(e,t,r,...n)}bind(e,t){return this._getContextManager().bind(e,t)}_getContextManager(){return(0,a.getGlobal)(i)||s}disable(){this._getContextManager().disable(),(0,a.unregisterGlobal)(i,o.DiagAPI.instance())}}t.ContextAPI=u},930:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DiagAPI=void 0;let n=r(56),a=r(912),o=r(957),i=r(172);class s{constructor(){function e(e){return function(...t){let r=(0,i.getGlobal)("diag");if(r)return r[e](...t)}}let t=this;t.setLogger=(e,r={logLevel:o.DiagLogLevel.INFO})=>{var n,s,u;if(e===t){let e=Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return t.error(null!==(n=e.stack)&&void 0!==n?n:e.message),!1}"number"==typeof r&&(r={logLevel:r});let c=(0,i.getGlobal)("diag"),l=(0,a.createLogLevelDiagLogger)(null!==(s=r.logLevel)&&void 0!==s?s:o.DiagLogLevel.INFO,e);if(c&&!r.suppressOverrideMessage){let e=null!==(u=Error().stack)&&void 0!==u?u:"";c.warn(`Current logger will be overwritten from ${e}`),l.warn(`Current logger will overwrite one already registered from ${e}`)}return(0,i.registerGlobal)("diag",l,t,!0)},t.disable=()=>{(0,i.unregisterGlobal)("diag",t)},t.createComponentLogger=e=>new n.DiagComponentLogger(e),t.verbose=e("verbose"),t.debug=e("debug"),t.info=e("info"),t.warn=e("warn"),t.error=e("error")}static instance(){return this._instance||(this._instance=new s),this._instance}}t.DiagAPI=s},653:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MetricsAPI=void 0;let n=r(660),a=r(172),o=r(930),i="metrics";class s{constructor(){}static getInstance(){return this._instance||(this._instance=new s),this._instance}setGlobalMeterProvider(e){return(0,a.registerGlobal)(i,e,o.DiagAPI.instance())}getMeterProvider(){return(0,a.getGlobal)(i)||n.NOOP_METER_PROVIDER}getMeter(e,t,r){return this.getMeterProvider().getMeter(e,t,r)}disable(){(0,a.unregisterGlobal)(i,o.DiagAPI.instance())}}t.MetricsAPI=s},181:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PropagationAPI=void 0;let n=r(172),a=r(874),o=r(194),i=r(277),s=r(369),u=r(930),c="propagation",l=new a.NoopTextMapPropagator;class d{constructor(){this.createBaggage=s.createBaggage,this.getBaggage=i.getBaggage,this.getActiveBaggage=i.getActiveBaggage,this.setBaggage=i.setBaggage,this.deleteBaggage=i.deleteBaggage}static getInstance(){return this._instance||(this._instance=new d),this._instance}setGlobalPropagator(e){return(0,n.registerGlobal)(c,e,u.DiagAPI.instance())}inject(e,t,r=o.defaultTextMapSetter){return this._getGlobalPropagator().inject(e,t,r)}extract(e,t,r=o.defaultTextMapGetter){return this._getGlobalPropagator().extract(e,t,r)}fields(){return this._getGlobalPropagator().fields()}disable(){(0,n.unregisterGlobal)(c,u.DiagAPI.instance())}_getGlobalPropagator(){return(0,n.getGlobal)(c)||l}}t.PropagationAPI=d},997:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TraceAPI=void 0;let n=r(172),a=r(846),o=r(139),i=r(607),s=r(930),u="trace";class c{constructor(){this._proxyTracerProvider=new a.ProxyTracerProvider,this.wrapSpanContext=o.wrapSpanContext,this.isSpanContextValid=o.isSpanContextValid,this.deleteSpan=i.deleteSpan,this.getSpan=i.getSpan,this.getActiveSpan=i.getActiveSpan,this.getSpanContext=i.getSpanContext,this.setSpan=i.setSpan,this.setSpanContext=i.setSpanContext}static getInstance(){return this._instance||(this._instance=new c),this._instance}setGlobalTracerProvider(e){let t=(0,n.registerGlobal)(u,this._proxyTracerProvider,s.DiagAPI.instance());return t&&this._proxyTracerProvider.setDelegate(e),t}getTracerProvider(){return(0,n.getGlobal)(u)||this._proxyTracerProvider}getTracer(e,t){return this.getTracerProvider().getTracer(e,t)}disable(){(0,n.unregisterGlobal)(u,s.DiagAPI.instance()),this._proxyTracerProvider=new a.ProxyTracerProvider}}t.TraceAPI=c},277:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.deleteBaggage=t.setBaggage=t.getActiveBaggage=t.getBaggage=void 0;let n=r(491),a=(0,r(780).createContextKey)("OpenTelemetry Baggage Key");function o(e){return e.getValue(a)||void 0}t.getBaggage=o,t.getActiveBaggage=function(){return o(n.ContextAPI.getInstance().active())},t.setBaggage=function(e,t){return e.setValue(a,t)},t.deleteBaggage=function(e){return e.deleteValue(a)}},993:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BaggageImpl=void 0;class r{constructor(e){this._entries=e?new Map(e):new Map}getEntry(e){let t=this._entries.get(e);if(t)return Object.assign({},t)}getAllEntries(){return Array.from(this._entries.entries()).map(([e,t])=>[e,t])}setEntry(e,t){let n=new r(this._entries);return n._entries.set(e,t),n}removeEntry(e){let t=new r(this._entries);return t._entries.delete(e),t}removeEntries(...e){let t=new r(this._entries);for(let r of e)t._entries.delete(r);return t}clear(){return new r}}t.BaggageImpl=r},830:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.baggageEntryMetadataSymbol=void 0,t.baggageEntryMetadataSymbol=Symbol("BaggageEntryMetadata")},369:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.baggageEntryMetadataFromString=t.createBaggage=void 0;let n=r(930),a=r(993),o=r(830),i=n.DiagAPI.instance();t.createBaggage=function(e={}){return new a.BaggageImpl(new Map(Object.entries(e)))},t.baggageEntryMetadataFromString=function(e){return"string"!=typeof e&&(i.error(`Cannot create baggage metadata from unknown type: ${typeof e}`),e=""),{__TYPE__:o.baggageEntryMetadataSymbol,toString:()=>e}}},67:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.context=void 0;let n=r(491);t.context=n.ContextAPI.getInstance()},223:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NoopContextManager=void 0;let n=r(780);class a{active(){return n.ROOT_CONTEXT}with(e,t,r,...n){return t.call(r,...n)}bind(e,t){return t}enable(){return this}disable(){return this}}t.NoopContextManager=a},780:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ROOT_CONTEXT=t.createContextKey=void 0,t.createContextKey=function(e){return Symbol.for(e)};class r{constructor(e){let t=this;t._currentContext=e?new Map(e):new Map,t.getValue=e=>t._currentContext.get(e),t.setValue=(e,n)=>{let a=new r(t._currentContext);return a._currentContext.set(e,n),a},t.deleteValue=e=>{let n=new r(t._currentContext);return n._currentContext.delete(e),n}}}t.ROOT_CONTEXT=new r},506:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.diag=void 0;let n=r(930);t.diag=n.DiagAPI.instance()},56:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DiagComponentLogger=void 0;let n=r(172);class a{constructor(e){this._namespace=e.namespace||"DiagComponentLogger"}debug(...e){return o("debug",this._namespace,e)}error(...e){return o("error",this._namespace,e)}info(...e){return o("info",this._namespace,e)}warn(...e){return o("warn",this._namespace,e)}verbose(...e){return o("verbose",this._namespace,e)}}function o(e,t,r){let a=(0,n.getGlobal)("diag");if(a)return r.unshift(t),a[e](...r)}t.DiagComponentLogger=a},972:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DiagConsoleLogger=void 0;let r=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}];class n{constructor(){for(let e=0;e{Object.defineProperty(t,"__esModule",{value:!0}),t.createLogLevelDiagLogger=void 0;let n=r(957);t.createLogLevelDiagLogger=function(e,t){function r(r,n){let a=t[r];return"function"==typeof a&&e>=n?a.bind(t):function(){}}return en.DiagLogLevel.ALL&&(e=n.DiagLogLevel.ALL),t=t||{},{error:r("error",n.DiagLogLevel.ERROR),warn:r("warn",n.DiagLogLevel.WARN),info:r("info",n.DiagLogLevel.INFO),debug:r("debug",n.DiagLogLevel.DEBUG),verbose:r("verbose",n.DiagLogLevel.VERBOSE)}}},957:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DiagLogLevel=void 0,function(e){e[e.NONE=0]="NONE",e[e.ERROR=30]="ERROR",e[e.WARN=50]="WARN",e[e.INFO=60]="INFO",e[e.DEBUG=70]="DEBUG",e[e.VERBOSE=80]="VERBOSE",e[e.ALL=9999]="ALL"}(t.DiagLogLevel||(t.DiagLogLevel={}))},172:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.unregisterGlobal=t.getGlobal=t.registerGlobal=void 0;let n=r(200),a=r(521),o=r(130),i=a.VERSION.split(".")[0],s=Symbol.for(`opentelemetry.js.api.${i}`),u=n._globalThis;t.registerGlobal=function(e,t,r,n=!1){var o;let i=u[s]=null!==(o=u[s])&&void 0!==o?o:{version:a.VERSION};if(!n&&i[e]){let t=Error(`@opentelemetry/api: Attempted duplicate registration of API: ${e}`);return r.error(t.stack||t.message),!1}if(i.version!==a.VERSION){let t=Error(`@opentelemetry/api: Registration of version v${i.version} for ${e} does not match previously registered API v${a.VERSION}`);return r.error(t.stack||t.message),!1}return i[e]=t,r.debug(`@opentelemetry/api: Registered a global for ${e} v${a.VERSION}.`),!0},t.getGlobal=function(e){var t,r;let n=null===(t=u[s])||void 0===t?void 0:t.version;if(n&&(0,o.isCompatible)(n))return null===(r=u[s])||void 0===r?void 0:r[e]},t.unregisterGlobal=function(e,t){t.debug(`@opentelemetry/api: Unregistering a global for ${e} v${a.VERSION}.`);let r=u[s];r&&delete r[e]}},130:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isCompatible=t._makeCompatibilityCheck=void 0;let n=r(521),a=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function o(e){let t=new Set([e]),r=new Set,n=e.match(a);if(!n)return()=>!1;let o={major:+n[1],minor:+n[2],patch:+n[3],prerelease:n[4]};if(null!=o.prerelease)return function(t){return t===e};function i(e){return r.add(e),!1}return function(e){if(t.has(e))return!0;if(r.has(e))return!1;let n=e.match(a);if(!n)return i(e);let s={major:+n[1],minor:+n[2],patch:+n[3],prerelease:n[4]};return null!=s.prerelease||o.major!==s.major?i(e):0===o.major?o.minor===s.minor&&o.patch<=s.patch?(t.add(e),!0):i(e):o.minor<=s.minor?(t.add(e),!0):i(e)}}t._makeCompatibilityCheck=o,t.isCompatible=o(n.VERSION)},886:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.metrics=void 0;let n=r(653);t.metrics=n.MetricsAPI.getInstance()},901:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ValueType=void 0,function(e){e[e.INT=0]="INT",e[e.DOUBLE=1]="DOUBLE"}(t.ValueType||(t.ValueType={}))},102:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createNoopMeter=t.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC=t.NOOP_OBSERVABLE_GAUGE_METRIC=t.NOOP_OBSERVABLE_COUNTER_METRIC=t.NOOP_UP_DOWN_COUNTER_METRIC=t.NOOP_HISTOGRAM_METRIC=t.NOOP_COUNTER_METRIC=t.NOOP_METER=t.NoopObservableUpDownCounterMetric=t.NoopObservableGaugeMetric=t.NoopObservableCounterMetric=t.NoopObservableMetric=t.NoopHistogramMetric=t.NoopUpDownCounterMetric=t.NoopCounterMetric=t.NoopMetric=t.NoopMeter=void 0;class r{constructor(){}createHistogram(e,r){return t.NOOP_HISTOGRAM_METRIC}createCounter(e,r){return t.NOOP_COUNTER_METRIC}createUpDownCounter(e,r){return t.NOOP_UP_DOWN_COUNTER_METRIC}createObservableGauge(e,r){return t.NOOP_OBSERVABLE_GAUGE_METRIC}createObservableCounter(e,r){return t.NOOP_OBSERVABLE_COUNTER_METRIC}createObservableUpDownCounter(e,r){return t.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC}addBatchObservableCallback(e,t){}removeBatchObservableCallback(e){}}t.NoopMeter=r;class n{}t.NoopMetric=n;class a extends n{add(e,t){}}t.NoopCounterMetric=a;class o extends n{add(e,t){}}t.NoopUpDownCounterMetric=o;class i extends n{record(e,t){}}t.NoopHistogramMetric=i;class s{addCallback(e){}removeCallback(e){}}t.NoopObservableMetric=s;class u extends s{}t.NoopObservableCounterMetric=u;class c extends s{}t.NoopObservableGaugeMetric=c;class l extends s{}t.NoopObservableUpDownCounterMetric=l,t.NOOP_METER=new r,t.NOOP_COUNTER_METRIC=new a,t.NOOP_HISTOGRAM_METRIC=new i,t.NOOP_UP_DOWN_COUNTER_METRIC=new o,t.NOOP_OBSERVABLE_COUNTER_METRIC=new u,t.NOOP_OBSERVABLE_GAUGE_METRIC=new c,t.NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC=new l,t.createNoopMeter=function(){return t.NOOP_METER}},660:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NOOP_METER_PROVIDER=t.NoopMeterProvider=void 0;let n=r(102);class a{getMeter(e,t,r){return n.NOOP_METER}}t.NoopMeterProvider=a,t.NOOP_METER_PROVIDER=new a},200:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),a(r(46),t)},651:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t._globalThis=void 0,t._globalThis="object"==typeof globalThis?globalThis:global},46:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),a=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),a(r(651),t)},939:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.propagation=void 0;let n=r(181);t.propagation=n.PropagationAPI.getInstance()},874:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NoopTextMapPropagator=void 0;class r{inject(e,t){}extract(e,t){return e}fields(){return[]}}t.NoopTextMapPropagator=r},194:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.defaultTextMapSetter=t.defaultTextMapGetter=void 0,t.defaultTextMapGetter={get(e,t){if(null!=e)return e[t]},keys:e=>null==e?[]:Object.keys(e)},t.defaultTextMapSetter={set(e,t,r){null!=e&&(e[t]=r)}}},845:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.trace=void 0;let n=r(997);t.trace=n.TraceAPI.getInstance()},403:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NonRecordingSpan=void 0;let n=r(476);class a{constructor(e=n.INVALID_SPAN_CONTEXT){this._spanContext=e}spanContext(){return this._spanContext}setAttribute(e,t){return this}setAttributes(e){return this}addEvent(e,t){return this}setStatus(e){return this}updateName(e){return this}end(e){}isRecording(){return!1}recordException(e,t){}}t.NonRecordingSpan=a},614:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NoopTracer=void 0;let n=r(491),a=r(607),o=r(403),i=r(139),s=n.ContextAPI.getInstance();class u{startSpan(e,t,r=s.active()){if(null==t?void 0:t.root)return new o.NonRecordingSpan;let n=r&&(0,a.getSpanContext)(r);return"object"==typeof n&&"string"==typeof n.spanId&&"string"==typeof n.traceId&&"number"==typeof n.traceFlags&&(0,i.isSpanContextValid)(n)?new o.NonRecordingSpan(n):new o.NonRecordingSpan}startActiveSpan(e,t,r,n){let o,i,u;if(arguments.length<2)return;2==arguments.length?u=t:3==arguments.length?(o=t,u=r):(o=t,i=r,u=n);let c=null!=i?i:s.active(),l=this.startSpan(e,o,c),d=(0,a.setSpan)(c,l);return s.with(d,u,void 0,l)}}t.NoopTracer=u},124:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NoopTracerProvider=void 0;let n=r(614);class a{getTracer(e,t,r){return new n.NoopTracer}}t.NoopTracerProvider=a},125:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ProxyTracer=void 0;let n=new(r(614)).NoopTracer;class a{constructor(e,t,r,n){this._provider=e,this.name=t,this.version=r,this.options=n}startSpan(e,t,r){return this._getTracer().startSpan(e,t,r)}startActiveSpan(e,t,r,n){let a=this._getTracer();return Reflect.apply(a.startActiveSpan,a,arguments)}_getTracer(){if(this._delegate)return this._delegate;let e=this._provider.getDelegateTracer(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):n}}t.ProxyTracer=a},846:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ProxyTracerProvider=void 0;let n=r(125),a=new(r(124)).NoopTracerProvider;class o{getTracer(e,t,r){var a;return null!==(a=this.getDelegateTracer(e,t,r))&&void 0!==a?a:new n.ProxyTracer(this,e,t,r)}getDelegate(){var e;return null!==(e=this._delegate)&&void 0!==e?e:a}setDelegate(e){this._delegate=e}getDelegateTracer(e,t,r){var n;return null===(n=this._delegate)||void 0===n?void 0:n.getTracer(e,t,r)}}t.ProxyTracerProvider=o},996:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SamplingDecision=void 0,function(e){e[e.NOT_RECORD=0]="NOT_RECORD",e[e.RECORD=1]="RECORD",e[e.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"}(t.SamplingDecision||(t.SamplingDecision={}))},607:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getSpanContext=t.setSpanContext=t.deleteSpan=t.setSpan=t.getActiveSpan=t.getSpan=void 0;let n=r(780),a=r(403),o=r(491),i=(0,n.createContextKey)("OpenTelemetry Context Key SPAN");function s(e){return e.getValue(i)||void 0}function u(e,t){return e.setValue(i,t)}t.getSpan=s,t.getActiveSpan=function(){return s(o.ContextAPI.getInstance().active())},t.setSpan=u,t.deleteSpan=function(e){return e.deleteValue(i)},t.setSpanContext=function(e,t){return u(e,new a.NonRecordingSpan(t))},t.getSpanContext=function(e){var t;return null===(t=s(e))||void 0===t?void 0:t.spanContext()}},325:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TraceStateImpl=void 0;let n=r(564);class a{constructor(e){this._internalState=new Map,e&&this._parse(e)}set(e,t){let r=this._clone();return r._internalState.has(e)&&r._internalState.delete(e),r._internalState.set(e,t),r}unset(e){let t=this._clone();return t._internalState.delete(e),t}get(e){return this._internalState.get(e)}serialize(){return this._keys().reduce((e,t)=>(e.push(t+"="+this.get(t)),e),[]).join(",")}_parse(e){!(e.length>512)&&(this._internalState=e.split(",").reverse().reduce((e,t)=>{let r=t.trim(),a=r.indexOf("=");if(-1!==a){let o=r.slice(0,a),i=r.slice(a+1,t.length);(0,n.validateKey)(o)&&(0,n.validateValue)(i)&&e.set(o,i)}return e},new Map),this._internalState.size>32&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,32))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let e=new a;return e._internalState=new Map(this._internalState),e}}t.TraceStateImpl=a},564:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validateValue=t.validateKey=void 0;let r="[_0-9a-z-*/]",n=`[a-z]${r}{0,255}`,a=`[a-z0-9]${r}{0,240}@[a-z]${r}{0,13}`,o=RegExp(`^(?:${n}|${a})$`),i=/^[ -~]{0,255}[!-~]$/,s=/,|=/;t.validateKey=function(e){return o.test(e)},t.validateValue=function(e){return i.test(e)&&!s.test(e)}},98:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.createTraceState=void 0;let n=r(325);t.createTraceState=function(e){return new n.TraceStateImpl(e)}},476:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.INVALID_SPAN_CONTEXT=t.INVALID_TRACEID=t.INVALID_SPANID=void 0;let n=r(475);t.INVALID_SPANID="0000000000000000",t.INVALID_TRACEID="00000000000000000000000000000000",t.INVALID_SPAN_CONTEXT={traceId:t.INVALID_TRACEID,spanId:t.INVALID_SPANID,traceFlags:n.TraceFlags.NONE}},357:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SpanKind=void 0,function(e){e[e.INTERNAL=0]="INTERNAL",e[e.SERVER=1]="SERVER",e[e.CLIENT=2]="CLIENT",e[e.PRODUCER=3]="PRODUCER",e[e.CONSUMER=4]="CONSUMER"}(t.SpanKind||(t.SpanKind={}))},139:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.wrapSpanContext=t.isSpanContextValid=t.isValidSpanId=t.isValidTraceId=void 0;let n=r(476),a=r(403),o=/^([0-9a-f]{32})$/i,i=/^[0-9a-f]{16}$/i;function s(e){return o.test(e)&&e!==n.INVALID_TRACEID}function u(e){return i.test(e)&&e!==n.INVALID_SPANID}t.isValidTraceId=s,t.isValidSpanId=u,t.isSpanContextValid=function(e){return s(e.traceId)&&u(e.spanId)},t.wrapSpanContext=function(e){return new a.NonRecordingSpan(e)}},847:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SpanStatusCode=void 0,function(e){e[e.UNSET=0]="UNSET",e[e.OK=1]="OK",e[e.ERROR=2]="ERROR"}(t.SpanStatusCode||(t.SpanStatusCode={}))},475:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TraceFlags=void 0,function(e){e[e.NONE=0]="NONE",e[e.SAMPLED=1]="SAMPLED"}(t.TraceFlags||(t.TraceFlags={}))},521:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.VERSION=void 0,t.VERSION="1.6.0"}},r={};function n(e){var a=r[e];if(void 0!==a)return a.exports;var o=r[e]={exports:{}},i=!0;try{t[e].call(o.exports,o,o.exports,n),i=!1}finally{i&&delete r[e]}return o.exports}n.ab=__dirname+"/";var a={};(()=>{Object.defineProperty(a,"__esModule",{value:!0}),a.trace=a.propagation=a.metrics=a.diag=a.context=a.INVALID_SPAN_CONTEXT=a.INVALID_TRACEID=a.INVALID_SPANID=a.isValidSpanId=a.isValidTraceId=a.isSpanContextValid=a.createTraceState=a.TraceFlags=a.SpanStatusCode=a.SpanKind=a.SamplingDecision=a.ProxyTracerProvider=a.ProxyTracer=a.defaultTextMapSetter=a.defaultTextMapGetter=a.ValueType=a.createNoopMeter=a.DiagLogLevel=a.DiagConsoleLogger=a.ROOT_CONTEXT=a.createContextKey=a.baggageEntryMetadataFromString=void 0;var e=n(369);Object.defineProperty(a,"baggageEntryMetadataFromString",{enumerable:!0,get:function(){return e.baggageEntryMetadataFromString}});var t=n(780);Object.defineProperty(a,"createContextKey",{enumerable:!0,get:function(){return t.createContextKey}}),Object.defineProperty(a,"ROOT_CONTEXT",{enumerable:!0,get:function(){return t.ROOT_CONTEXT}});var r=n(972);Object.defineProperty(a,"DiagConsoleLogger",{enumerable:!0,get:function(){return r.DiagConsoleLogger}});var o=n(957);Object.defineProperty(a,"DiagLogLevel",{enumerable:!0,get:function(){return o.DiagLogLevel}});var i=n(102);Object.defineProperty(a,"createNoopMeter",{enumerable:!0,get:function(){return i.createNoopMeter}});var s=n(901);Object.defineProperty(a,"ValueType",{enumerable:!0,get:function(){return s.ValueType}});var u=n(194);Object.defineProperty(a,"defaultTextMapGetter",{enumerable:!0,get:function(){return u.defaultTextMapGetter}}),Object.defineProperty(a,"defaultTextMapSetter",{enumerable:!0,get:function(){return u.defaultTextMapSetter}});var c=n(125);Object.defineProperty(a,"ProxyTracer",{enumerable:!0,get:function(){return c.ProxyTracer}});var l=n(846);Object.defineProperty(a,"ProxyTracerProvider",{enumerable:!0,get:function(){return l.ProxyTracerProvider}});var d=n(996);Object.defineProperty(a,"SamplingDecision",{enumerable:!0,get:function(){return d.SamplingDecision}});var p=n(357);Object.defineProperty(a,"SpanKind",{enumerable:!0,get:function(){return p.SpanKind}});var g=n(847);Object.defineProperty(a,"SpanStatusCode",{enumerable:!0,get:function(){return g.SpanStatusCode}});var f=n(475);Object.defineProperty(a,"TraceFlags",{enumerable:!0,get:function(){return f.TraceFlags}});var _=n(98);Object.defineProperty(a,"createTraceState",{enumerable:!0,get:function(){return _.createTraceState}});var v=n(139);Object.defineProperty(a,"isSpanContextValid",{enumerable:!0,get:function(){return v.isSpanContextValid}}),Object.defineProperty(a,"isValidTraceId",{enumerable:!0,get:function(){return v.isValidTraceId}}),Object.defineProperty(a,"isValidSpanId",{enumerable:!0,get:function(){return v.isValidSpanId}});var b=n(476);Object.defineProperty(a,"INVALID_SPANID",{enumerable:!0,get:function(){return b.INVALID_SPANID}}),Object.defineProperty(a,"INVALID_TRACEID",{enumerable:!0,get:function(){return b.INVALID_TRACEID}}),Object.defineProperty(a,"INVALID_SPAN_CONTEXT",{enumerable:!0,get:function(){return b.INVALID_SPAN_CONTEXT}});let h=n(67);Object.defineProperty(a,"context",{enumerable:!0,get:function(){return h.context}});let S=n(506);Object.defineProperty(a,"diag",{enumerable:!0,get:function(){return S.diag}});let m=n(886);Object.defineProperty(a,"metrics",{enumerable:!0,get:function(){return m.metrics}});let E=n(939);Object.defineProperty(a,"propagation",{enumerable:!0,get:function(){return E.propagation}});let y=n(845);Object.defineProperty(a,"trace",{enumerable:!0,get:function(){return y.trace}}),a.default={context:h.context,diag:S.diag,metrics:m.metrics,propagation:E.propagation,trace:y.trace}})(),e.exports=a})()},11943:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{ACTION_SUFFIX:function(){return u},APP_DIR_ALIAS:function(){return N},CACHE_ONE_YEAR:function(){return m},DOT_NEXT_ALIAS:function(){return P},ESLINT_DEFAULT_DIRS:function(){return X},GSP_NO_RETURNED_VALUE:function(){return B},GSSP_COMPONENT_MEMBER_ERROR:function(){return H},GSSP_NO_RETURNED_VALUE:function(){return U},INSTRUMENTATION_HOOK_FILENAME:function(){return O},MIDDLEWARE_FILENAME:function(){return E},MIDDLEWARE_LOCATION_REGEXP:function(){return y},NEXT_BODY_SUFFIX:function(){return d},NEXT_CACHE_IMPLICIT_TAG_ID:function(){return S},NEXT_CACHE_REVALIDATED_TAGS_HEADER:function(){return f},NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER:function(){return _},NEXT_CACHE_SOFT_TAGS_HEADER:function(){return g},NEXT_CACHE_SOFT_TAG_MAX_LENGTH:function(){return h},NEXT_CACHE_TAGS_HEADER:function(){return p},NEXT_CACHE_TAG_MAX_ITEMS:function(){return v},NEXT_CACHE_TAG_MAX_LENGTH:function(){return b},NEXT_DATA_SUFFIX:function(){return c},NEXT_INTERCEPTION_MARKER_PREFIX:function(){return n},NEXT_META_SUFFIX:function(){return l},NEXT_QUERY_PARAM_PREFIX:function(){return r},NON_STANDARD_NODE_ENV:function(){return $},PAGES_DIR_ALIAS:function(){return R},PRERENDER_REVALIDATE_HEADER:function(){return a},PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER:function(){return o},PUBLIC_DIR_MIDDLEWARE_CONFLICT:function(){return w},ROOT_DIR_ALIAS:function(){return T},RSC_ACTION_CLIENT_WRAPPER_ALIAS:function(){return M},RSC_ACTION_ENCRYPTION_ALIAS:function(){return I},RSC_ACTION_PROXY_ALIAS:function(){return A},RSC_ACTION_VALIDATE_ALIAS:function(){return C},RSC_MOD_REF_PROXY_ALIAS:function(){return x},RSC_PREFETCH_SUFFIX:function(){return i},RSC_SUFFIX:function(){return s},SERVER_PROPS_EXPORT_ERROR:function(){return V},SERVER_PROPS_GET_INIT_PROPS_CONFLICT:function(){return L},SERVER_PROPS_SSG_CONFLICT:function(){return j},SERVER_RUNTIME:function(){return K},SSG_FALLBACK_EXPORT_ERROR:function(){return k},SSG_GET_INITIAL_PROPS_CONFLICT:function(){return D},STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR:function(){return G},UNSTABLE_REVALIDATE_RENAME_ERROR:function(){return F},WEBPACK_LAYERS:function(){return Y},WEBPACK_RESOURCE_QUERIES:function(){return q}});let r="nxtP",n="nxtI",a="x-prerender-revalidate",o="x-prerender-revalidate-if-generated",i=".prefetch.rsc",s=".rsc",u=".action",c=".json",l=".meta",d=".body",p="x-next-cache-tags",g="x-next-cache-soft-tags",f="x-next-revalidated-tags",_="x-next-revalidate-tag-token",v=128,b=256,h=1024,S="_N_T_",m=31536e3,E="middleware",y=`(?:src/)?${E}`,O="instrumentation",R="private-next-pages",P="private-dot-next",T="private-next-root-dir",N="private-next-app-dir",x="next/dist/build/webpack/loaders/next-flight-loader/module-proxy",C="private-next-rsc-action-validate",A="private-next-rsc-server-reference",I="private-next-rsc-action-encryption",M="private-next-rsc-action-client-wrapper",w="You can not have a '_next' folder inside of your public folder. This conflicts with the internal '/_next' route. https://nextjs.org/docs/messages/public-next-folder-conflict",D="You can not use getInitialProps with getStaticProps. To use SSG, please remove your getInitialProps",L="You can not use getInitialProps with getServerSideProps. Please remove getInitialProps.",j="You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps",G="can not have getInitialProps/getServerSideProps, https://nextjs.org/docs/messages/404-get-initial-props",V="pages with `getServerSideProps` can not be exported. See more info here: https://nextjs.org/docs/messages/gssp-export",B="Your `getStaticProps` function did not return an object. Did you forget to add a `return`?",U="Your `getServerSideProps` function did not return an object. Did you forget to add a `return`?",F="The `unstable_revalidate` property is available for general use.\nPlease use `revalidate` instead.",H="can not be attached to a page's component and must be exported from the page. See more info here: https://nextjs.org/docs/messages/gssp-component-member",$='You are using a non-standard "NODE_ENV" value in your environment. This creates inconsistencies in the project and is strongly advised against. Read more: https://nextjs.org/docs/messages/non-standard-node-env',k="Pages with `fallback` enabled in `getStaticPaths` can not be exported. See more info here: https://nextjs.org/docs/messages/ssg-fallback-true-export",X=["app","pages","components","lib","src"],K={edge:"edge",experimentalEdge:"experimental-edge",nodejs:"nodejs"},W={shared:"shared",reactServerComponents:"rsc",serverSideRendering:"ssr",actionBrowser:"action-browser",api:"api",middleware:"middleware",instrument:"instrument",edgeAsset:"edge-asset",appPagesBrowser:"app-pages-browser",appMetadataRoute:"app-metadata-route",appRouteHandler:"app-route-handler"},Y={...W,GROUP:{serverOnly:[W.reactServerComponents,W.actionBrowser,W.appMetadataRoute,W.appRouteHandler,W.instrument],clientOnly:[W.serverSideRendering,W.appPagesBrowser],nonClientServerTarget:[W.middleware,W.api],app:[W.reactServerComponents,W.actionBrowser,W.appMetadataRoute,W.appRouteHandler,W.serverSideRendering,W.appPagesBrowser,W.shared,W.instrument]}},q={edgeSSREntry:"__next_edge_ssr_entry__",metadata:"__next_metadata__",metadataRoute:"__next_metadata_route__",metadataImageMeta:"__next_metadata_image_meta__"}},91354:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{bgBlack:function(){return T},bgBlue:function(){return A},bgCyan:function(){return M},bgGreen:function(){return x},bgMagenta:function(){return I},bgRed:function(){return N},bgWhite:function(){return w},bgYellow:function(){return C},black:function(){return v},blue:function(){return m},bold:function(){return c},cyan:function(){return O},dim:function(){return l},gray:function(){return P},green:function(){return h},hidden:function(){return f},inverse:function(){return g},italic:function(){return d},magenta:function(){return E},purple:function(){return y},red:function(){return b},reset:function(){return u},strikethrough:function(){return _},underline:function(){return p},white:function(){return R},yellow:function(){return S}});let{env:n,stdout:a}=(null==(r=globalThis)?void 0:r.process)??{},o=n&&!n.NO_COLOR&&(n.FORCE_COLOR||(null==a?void 0:a.isTTY)&&!n.CI&&"dumb"!==n.TERM),i=(e,t,r,n)=>{let a=e.substring(0,n)+r,o=e.substring(n+t.length),s=o.indexOf(t);return~s?a+i(o,t,r,s):a+o},s=(e,t,r=e)=>o?n=>{let a=""+n,o=a.indexOf(t,e.length);return~o?e+i(a,t,r,o)+t:e+a+t}:String,u=o?e=>`\x1b[0m${e}\x1b[0m`:String,c=s("\x1b[1m","\x1b[22m","\x1b[22m\x1b[1m"),l=s("\x1b[2m","\x1b[22m","\x1b[22m\x1b[2m"),d=s("\x1b[3m","\x1b[23m"),p=s("\x1b[4m","\x1b[24m"),g=s("\x1b[7m","\x1b[27m"),f=s("\x1b[8m","\x1b[28m"),_=s("\x1b[9m","\x1b[29m"),v=s("\x1b[30m","\x1b[39m"),b=s("\x1b[31m","\x1b[39m"),h=s("\x1b[32m","\x1b[39m"),S=s("\x1b[33m","\x1b[39m"),m=s("\x1b[34m","\x1b[39m"),E=s("\x1b[35m","\x1b[39m"),y=s("\x1b[38;2;173;127;168m","\x1b[39m"),O=s("\x1b[36m","\x1b[39m"),R=s("\x1b[37m","\x1b[39m"),P=s("\x1b[90m","\x1b[39m"),T=s("\x1b[40m","\x1b[49m"),N=s("\x1b[41m","\x1b[49m"),x=s("\x1b[42m","\x1b[49m"),C=s("\x1b[43m","\x1b[49m"),A=s("\x1b[44m","\x1b[49m"),I=s("\x1b[45m","\x1b[49m"),M=s("\x1b[46m","\x1b[49m"),w=s("\x1b[47m","\x1b[49m")},38834:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{getPathname:function(){return n},isFullStringUrl:function(){return a},parseUrl:function(){return o}});let r="http://n";function n(e){return new URL(e,r).pathname}function a(e){return/https?:\/\//.test(e)}function o(e){let t;try{t=new URL(e,r)}catch{}return t}},6278:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{Postpone:function(){return d},createPostponedAbortSignal:function(){return b},createPrerenderState:function(){return u},formatDynamicAPIAccesses:function(){return _},markCurrentScopeAsDynamic:function(){return c},trackDynamicDataAccessed:function(){return l},trackDynamicFetch:function(){return p},usedDynamicAPIs:function(){return f}});let n=function(e){return e&&e.__esModule?e:{default:e}}(r(71159)),a=r(44789),o=r(24618),i=r(38834),s="function"==typeof n.default.unstable_postpone;function u(e){return{isDebugSkeleton:e,dynamicAccesses:[]}}function c(e,t){let r=(0,i.getPathname)(e.urlPathname);if(!e.isUnstableCacheCallback){if(e.dynamicShouldError)throw new o.StaticGenBailoutError(`Route ${r} with \`dynamic = "error"\` couldn't be rendered statically because it used \`${t}\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`);if(e.prerenderState)g(e.prerenderState,t,r);else if(e.revalidate=0,e.isStaticGeneration){let n=new a.DynamicServerError(`Route ${r} couldn't be rendered statically because it used ${t}. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`);throw e.dynamicUsageDescription=t,e.dynamicUsageStack=n.stack,n}}}function l(e,t){let r=(0,i.getPathname)(e.urlPathname);if(e.isUnstableCacheCallback)throw Error(`Route ${r} used "${t}" inside a function cached with "unstable_cache(...)". Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use "${t}" outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`);if(e.dynamicShouldError)throw new o.StaticGenBailoutError(`Route ${r} with \`dynamic = "error"\` couldn't be rendered statically because it used \`${t}\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`);if(e.prerenderState)g(e.prerenderState,t,r);else if(e.revalidate=0,e.isStaticGeneration){let n=new a.DynamicServerError(`Route ${r} couldn't be rendered statically because it used \`${t}\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`);throw e.dynamicUsageDescription=t,e.dynamicUsageStack=n.stack,n}}function d({reason:e,prerenderState:t,pathname:r}){g(t,e,r)}function p(e,t){e.prerenderState&&g(e.prerenderState,t,e.urlPathname)}function g(e,t,r){v();let a=`Route ${r} needs to bail out of prerendering at this point because it used ${t}. React throws this special object to indicate where. It should not be caught by your own try/catch. Learn more: https://nextjs.org/docs/messages/ppr-caught-error`;e.dynamicAccesses.push({stack:e.isDebugSkeleton?Error().stack:void 0,expression:t}),n.default.unstable_postpone(a)}function f(e){return e.dynamicAccesses.length>0}function _(e){return e.dynamicAccesses.filter(e=>"string"==typeof e.stack&&e.stack.length>0).map(({expression:e,stack:t})=>(t=t.split("\n").slice(4).filter(e=>!(e.includes("node_modules/next/")||e.includes(" ()")||e.includes(" (node:"))).join("\n"),`Dynamic API Usage Debug - ${e}: +${t}`))}function v(){if(!s)throw Error("Invariant: React.unstable_postpone is not defined. This suggests the wrong version of React was loaded. This is a bug in Next.js")}function b(e){v();let t=new AbortController;try{n.default.unstable_postpone(e)}catch(e){t.abort(e)}return t.signal}},88716:(e,t)=>{"use strict";var r;Object.defineProperty(t,"x",{enumerable:!0,get:function(){return r}}),function(e){e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE"}(r||(r={}))},23191:(e,t,r)=>{"use strict";e.exports=r(20399)},71159:(e,t,r)=>{"use strict";e.exports=r(23191).vendored["react-rsc"].React},14300:(e,t)=>{"use strict";function r(e){if(!e.body)return[e,e];let[t,r]=e.body.tee(),n=new Response(t,{status:e.status,statusText:e.statusText,headers:e.headers});Object.defineProperty(n,"url",{value:e.url});let a=new Response(r,{status:e.status,statusText:e.statusText,headers:e.headers});return Object.defineProperty(a,"url",{value:e.url}),[n,a]}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"cloneResponse",{enumerable:!0,get:function(){return r}})},99585:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createDedupeFetch",{enumerable:!0,get:function(){return i}});let n=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=o(void 0);if(r&&r.has(e))return r.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=a?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(n,i,s):n[i]=e[i]}return n.default=e,r&&r.set(e,n),n}(r(71159)),a=r(14300);function o(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(o=function(e){return e?r:t})(e)}function i(e){let t=n.cache(e=>[]);return function(r,n){let o,i;if(n&&n.signal)return e(r,n);if("string"!=typeof r||n){let t="string"==typeof r||r instanceof URL?new Request(r,n):r;if("GET"!==t.method&&"HEAD"!==t.method||t.keepalive)return e(r,n);i=JSON.stringify([t.method,Array.from(t.headers.entries()),t.mode,t.redirect,t.credentials,t.referrer,t.referrerPolicy,t.integrity]),o=t.url}else i='["GET",[],null,"follow",null,null,null,null]',o=r;let s=t(o);for(let e=0,t=s.length;e{let t=s[e][2];if(!t)throw Error("No cached response");let[r,n]=(0,a.cloneResponse)(t);return s[e][2]=n,r})}let u=new AbortController,c=e(r,{...n,signal:u.signal}),l=[i,c,null];return s.push(l),c.then(e=>{let[t,r]=(0,a.cloneResponse)(e);return l[2]=r,t})}}},60670:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{addImplicitTags:function(){return f},patchFetch:function(){return v},validateRevalidate:function(){return d},validateTags:function(){return p}});let n=r(71376),a=r(64994),o=r(11943),i=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=l(void 0);if(r&&r.has(e))return r.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var i=a?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}(r(48839)),s=r(6278),u=r(99585),c=r(14300);function l(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(l=function(e){return e?r:t})(e)}function d(e,t){try{let r;if(!1===e)r=e;else if("number"==typeof e&&!isNaN(e)&&e>-1)r=e;else if(void 0!==e)throw Error(`Invalid revalidate value "${e}" on "${t}", must be a non-negative number or "false"`);return r}catch(e){if(e instanceof Error&&e.message.includes("Invalid revalidate"))throw e;return}}function p(e,t){let r=[],n=[];for(let a=0;ao.NEXT_CACHE_TAG_MAX_LENGTH?n.push({tag:i,reason:`exceeded max length of ${o.NEXT_CACHE_TAG_MAX_LENGTH}`}):r.push(i),r.length>o.NEXT_CACHE_TAG_MAX_ITEMS){console.warn(`Warning: exceeded max tag count for ${t}, dropped tags:`,e.slice(a).join(", "));break}}if(n.length>0)for(let{tag:e,reason:r}of(console.warn(`Warning: invalid tags passed to ${t}: `),n))console.log(`tag: "${e}" ${r}`);return r}let g=e=>{let t=["/layout"];if(e.startsWith("/")){let r=e.split("/");for(let e=1;e{var g,v;let b;try{(b=new URL(u instanceof Request?u.url:u)).username="",b.password=""}catch{b=void 0}let h=(null==b?void 0:b.href)??"",S=Date.now(),m=(null==l?void 0:null==(g=l.method)?void 0:g.toUpperCase())||"GET",E=(null==l?void 0:null==(v=l.next)?void 0:v.internal)===!0,y="1"===process.env.NEXT_OTEL_FETCH_DISABLED;return(0,a.getTracer)().trace(E?n.NextNodeServerSpan.internalFetch:n.AppRenderSpan.fetch,{hideSpan:y,kind:a.SpanKind.CLIENT,spanName:["fetch",m,h].filter(Boolean).join(" "),attributes:{"http.url":h,"http.method":m,"net.peer.name":null==b?void 0:b.hostname,"net.peer.port":(null==b?void 0:b.port)||void 0}},async()=>{var n;let a,g,v;if(E)return e(u,l);let b=r.getStore();if(!b||b.isDraftMode)return e(u,l);let m=u&&"object"==typeof u&&"string"==typeof u.method,y=e=>(null==l?void 0:l[e])||(m?u[e]:null),O=e=>{var t,r,n;return void 0!==(null==l?void 0:null==(t=l.next)?void 0:t[e])?null==l?void 0:null==(r=l.next)?void 0:r[e]:m?null==(n=u.next)?void 0:n[e]:void 0},R=O("revalidate"),P=p(O("tags")||[],`fetch ${u.toString()}`);if(Array.isArray(P))for(let e of(b.tags||(b.tags=[]),P))b.tags.includes(e)||b.tags.push(e);let T=f(b),N=b.fetchCache,x=!!b.isUnstableNoStore,C=y("cache"),A="";"string"==typeof C&&void 0!==R&&(m&&"default"===C||i.warn(`fetch for ${h} on ${b.urlPathname} specified "cache: ${C}" and "revalidate: ${R}", only one should be specified.`),C=void 0),"force-cache"===C?R=!1:("no-cache"===C||"no-store"===C||"force-no-store"===N||"only-no-store"===N)&&(R=0),("no-cache"===C||"no-store"===C)&&(A=`cache: ${C}`),v=d(R,b.urlPathname);let I=y("headers"),M="function"==typeof(null==I?void 0:I.get)?I:new Headers(I||{}),w=M.get("authorization")||M.get("cookie"),D=!["get","head"].includes((null==(n=y("method"))?void 0:n.toLowerCase())||"get"),L=(w||D)&&0===b.revalidate;switch(N){case"force-no-store":A="fetchCache = force-no-store";break;case"only-no-store":if("force-cache"===C||void 0!==v&&(!1===v||v>0))throw Error(`cache: 'force-cache' used on fetch for ${h} with 'export const fetchCache = 'only-no-store'`);A="fetchCache = only-no-store";break;case"only-cache":if("no-store"===C)throw Error(`cache: 'no-store' used on fetch for ${h} with 'export const fetchCache = 'only-cache'`);break;case"force-cache":(void 0===R||0===R)&&(A="fetchCache = force-cache",v=!1)}void 0===v?"default-cache"===N?(v=!1,A="fetchCache = default-cache"):L?(v=0,A="auto no cache"):"default-no-store"===N?(v=0,A="fetchCache = default-no-store"):x?(v=0,A="noStore call"):(A="auto cache",v="boolean"!=typeof b.revalidate&&void 0!==b.revalidate&&b.revalidate):A||(A=`revalidate: ${v}`),b.forceStatic&&0===v||L||void 0!==b.revalidate&&("number"!=typeof v||!1!==b.revalidate&&("number"!=typeof b.revalidate||!(v0||!1===v;if(b.incrementalCache&&j)try{a=await b.incrementalCache.fetchCacheKey(h,m?u:l)}catch(e){console.error("Failed to generate cache key for",u)}let G=b.nextFetchId??1;b.nextFetchId=G+1;let V="number"!=typeof v?o.CACHE_ONE_YEAR:v,B=async(t,r)=>{let n=["cache","credentials","headers","integrity","keepalive","method","mode","redirect","referrer","referrerPolicy","window","duplex",...t?[]:["signal"]];if(m){let e=u,t={body:e._ogBody||e.body};for(let r of n)t[r]=e[r];u=new Request(e.url,t)}else if(l){let{_ogBody:e,body:r,signal:n,...a}=l;l={...a,body:e||r,signal:t?void 0:n}}let o={...l,next:{...null==l?void 0:l.next,fetchType:"origin",fetchIdx:G}};return e(u,o).then(async e=>{if(t||_(b,{start:S,url:h,cacheReason:r||A,cacheStatus:0===v||r?"skip":"miss",status:e.status,method:o.method||"GET"}),200===e.status&&b.incrementalCache&&a&&j){let t=Buffer.from(await e.arrayBuffer());try{await b.incrementalCache.set(a,{kind:"FETCH",data:{headers:Object.fromEntries(e.headers.entries()),body:t.toString("base64"),status:e.status,url:e.url},revalidate:V},{fetchCache:!0,revalidate:v,fetchUrl:h,fetchIdx:G,tags:P})}catch(e){console.warn("Failed to set fetch cache",u,e)}let r=new Response(t,{headers:new Headers(e.headers),status:e.status});return Object.defineProperty(r,"url",{value:e.url}),r}return e})},U=()=>Promise.resolve(),F=!1;if(a&&b.incrementalCache){U=await b.incrementalCache.lock(a);let e=b.isOnDemandRevalidate?null:await b.incrementalCache.get(a,{kindHint:"fetch",revalidate:v,fetchUrl:h,fetchIdx:G,tags:P,softTags:T});if(e?await U():g="cache-control: no-cache (hard refresh)",(null==e?void 0:e.value)&&"FETCH"===e.value.kind){if(b.isRevalidate&&e.isStale)F=!0;else{if(e.isStale&&(b.pendingRevalidates??={},!b.pendingRevalidates[a])){let e=B(!0).then(async e=>({body:await e.arrayBuffer(),headers:e.headers,status:e.status,statusText:e.statusText})).finally(()=>{b.pendingRevalidates??={},delete b.pendingRevalidates[a||""]});e.catch(console.error),b.pendingRevalidates[a]=e}let t=e.value.data;_(b,{start:S,url:h,cacheReason:A,cacheStatus:"hit",status:t.status||200,method:(null==l?void 0:l.method)||"GET"});let r=new Response(Buffer.from(t.body,"base64"),{headers:t.headers,status:t.status});return Object.defineProperty(r,"url",{value:e.value.data.url}),r}}}if(b.isStaticGeneration&&l&&"object"==typeof l){let{cache:e}=l;if(!b.forceStatic&&"no-store"===e){let e=`no-store fetch ${u}${b.urlPathname?` ${b.urlPathname}`:""}`;(0,s.trackDynamicFetch)(b,e),b.revalidate=0;let r=new t(e);throw b.dynamicUsageErr=r,b.dynamicUsageDescription=e,r}let r="next"in l,{next:n={}}=l;if("number"==typeof n.revalidate&&(void 0===b.revalidate||"number"==typeof b.revalidate&&n.revalidate{let t=e[0];return{body:await t.arrayBuffer(),headers:t.headers,status:t.status,statusText:t.statusText}}).finally(()=>{if(a){var e;(null==(e=b.pendingRevalidates)?void 0:e[a])&&delete b.pendingRevalidates[a]}})).catch(()=>{}),b.pendingRevalidates[a]=e,t.then(e=>e[1])}})};return u.__nextPatched=!0,u.__nextGetStaticStore=()=>r,u._nextOriginalFetch=e,u}(r,e)}},71376:(e,t)=>{"use strict";var r,n,a,o,i,s,u,c,l,d,p,g;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{AppRenderSpan:function(){return u},AppRouteRouteHandlersSpan:function(){return d},BaseServerSpan:function(){return r},LoadComponentsSpan:function(){return n},LogSpanAllowList:function(){return _},MiddlewareSpan:function(){return g},NextNodeServerSpan:function(){return o},NextServerSpan:function(){return a},NextVanillaSpanAllowlist:function(){return f},NodeSpan:function(){return l},RenderSpan:function(){return s},ResolveMetadataSpan:function(){return p},RouterSpan:function(){return c},StartServerSpan:function(){return i}}),function(e){e.handleRequest="BaseServer.handleRequest",e.run="BaseServer.run",e.pipe="BaseServer.pipe",e.getStaticHTML="BaseServer.getStaticHTML",e.render="BaseServer.render",e.renderToResponseWithComponents="BaseServer.renderToResponseWithComponents",e.renderToResponse="BaseServer.renderToResponse",e.renderToHTML="BaseServer.renderToHTML",e.renderError="BaseServer.renderError",e.renderErrorToResponse="BaseServer.renderErrorToResponse",e.renderErrorToHTML="BaseServer.renderErrorToHTML",e.render404="BaseServer.render404"}(r||(r={})),function(e){e.loadDefaultErrorComponents="LoadComponents.loadDefaultErrorComponents",e.loadComponents="LoadComponents.loadComponents"}(n||(n={})),function(e){e.getRequestHandler="NextServer.getRequestHandler",e.getServer="NextServer.getServer",e.getServerRequestHandler="NextServer.getServerRequestHandler",e.createServer="createServer.createServer"}(a||(a={})),function(e){e.compression="NextNodeServer.compression",e.getBuildId="NextNodeServer.getBuildId",e.createComponentTree="NextNodeServer.createComponentTree",e.clientComponentLoading="NextNodeServer.clientComponentLoading",e.getLayoutOrPageModule="NextNodeServer.getLayoutOrPageModule",e.generateStaticRoutes="NextNodeServer.generateStaticRoutes",e.generateFsStaticRoutes="NextNodeServer.generateFsStaticRoutes",e.generatePublicRoutes="NextNodeServer.generatePublicRoutes",e.generateImageRoutes="NextNodeServer.generateImageRoutes.route",e.sendRenderResult="NextNodeServer.sendRenderResult",e.proxyRequest="NextNodeServer.proxyRequest",e.runApi="NextNodeServer.runApi",e.render="NextNodeServer.render",e.renderHTML="NextNodeServer.renderHTML",e.imageOptimizer="NextNodeServer.imageOptimizer",e.getPagePath="NextNodeServer.getPagePath",e.getRoutesManifest="NextNodeServer.getRoutesManifest",e.findPageComponents="NextNodeServer.findPageComponents",e.getFontManifest="NextNodeServer.getFontManifest",e.getServerComponentManifest="NextNodeServer.getServerComponentManifest",e.getRequestHandler="NextNodeServer.getRequestHandler",e.renderToHTML="NextNodeServer.renderToHTML",e.renderError="NextNodeServer.renderError",e.renderErrorToHTML="NextNodeServer.renderErrorToHTML",e.render404="NextNodeServer.render404",e.startResponse="NextNodeServer.startResponse",e.route="route",e.onProxyReq="onProxyReq",e.apiResolver="apiResolver",e.internalFetch="internalFetch"}(o||(o={})),(i||(i={})).startServer="startServer.startServer",function(e){e.getServerSideProps="Render.getServerSideProps",e.getStaticProps="Render.getStaticProps",e.renderToString="Render.renderToString",e.renderDocument="Render.renderDocument",e.createBodyResult="Render.createBodyResult"}(s||(s={})),function(e){e.renderToString="AppRender.renderToString",e.renderToReadableStream="AppRender.renderToReadableStream",e.getBodyResult="AppRender.getBodyResult",e.fetch="AppRender.fetch"}(u||(u={})),(c||(c={})).executeRoute="Router.executeRoute",(l||(l={})).runHandler="Node.runHandler",(d||(d={})).runHandler="AppRouteRouteHandlers.runHandler",function(e){e.generateMetadata="ResolveMetadata.generateMetadata",e.generateViewport="ResolveMetadata.generateViewport"}(p||(p={})),(g||(g={})).execute="Middleware.execute";let f=["Middleware.execute","BaseServer.handleRequest","Render.getServerSideProps","Render.getStaticProps","AppRender.fetch","AppRender.getBodyResult","Render.renderDocument","Node.runHandler","AppRouteRouteHandlers.runHandler","ResolveMetadata.generateMetadata","ResolveMetadata.generateViewport","NextNodeServer.createComponentTree","NextNodeServer.findPageComponents","NextNodeServer.getLayoutOrPageModule","NextNodeServer.startResponse","NextNodeServer.clientComponentLoading"],_=["NextNodeServer.findPageComponents","NextNodeServer.createComponentTree","NextNodeServer.clientComponentLoading"]},64994:(e,t,r)=>{"use strict";let n;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{SpanKind:function(){return c},SpanStatusCode:function(){return u},getTracer:function(){return h}});let a=r(71376);try{n=r(27482)}catch(e){n=r(27482)}let{context:o,propagation:i,trace:s,SpanStatusCode:u,SpanKind:c,ROOT_CONTEXT:l}=n,d=e=>null!==e&&"object"==typeof e&&"function"==typeof e.then,p=(e,t)=>{(null==t?void 0:t.bubble)===!0?e.setAttribute("next.bubble",!0):(t&&e.recordException(t),e.setStatus({code:u.ERROR,message:null==t?void 0:t.message})),e.end()},g=new Map,f=n.createContextKey("next.rootSpanId"),_=0,v=()=>_++;class b{getTracerInstance(){return s.getTracer("next.js","0.0.1")}getContext(){return o}getActiveScopeSpan(){return s.getSpan(null==o?void 0:o.active())}withPropagatedContext(e,t,r){let n=o.active();if(s.getSpanContext(n))return t();let a=i.extract(n,e,r);return o.with(a,t)}trace(...e){var t;let[r,n,i]=e,{fn:u,options:c}="function"==typeof n?{fn:n,options:{}}:{fn:i,options:{...n}},_=c.spanName??r;if(!a.NextVanillaSpanAllowlist.includes(r)&&"1"!==process.env.NEXT_OTEL_VERBOSE||c.hideSpan)return u();let b=this.getSpanContext((null==c?void 0:c.parentSpan)??this.getActiveScopeSpan()),h=!1;b?(null==(t=s.getSpanContext(b))?void 0:t.isRemote)&&(h=!0):(b=(null==o?void 0:o.active())??l,h=!0);let S=v();return c.attributes={"next.span_name":_,"next.span_type":r,...c.attributes},o.with(b.setValue(f,S),()=>this.getTracerInstance().startActiveSpan(_,c,e=>{let t="performance"in globalThis?globalThis.performance.now():void 0,n=()=>{g.delete(S),t&&process.env.NEXT_OTEL_PERFORMANCE_PREFIX&&a.LogSpanAllowList.includes(r||"")&&performance.measure(`${process.env.NEXT_OTEL_PERFORMANCE_PREFIX}:next-${(r.split(".").pop()||"").replace(/[A-Z]/g,e=>"-"+e.toLowerCase())}`,{start:t,end:performance.now()})};h&&g.set(S,new Map(Object.entries(c.attributes??{})));try{if(u.length>1)return u(e,t=>p(e,t));let t=u(e);if(d(t))return t.then(t=>(e.end(),t)).catch(t=>{throw p(e,t),t}).finally(n);return e.end(),n(),t}catch(t){throw p(e,t),n(),t}}))}wrap(...e){let t=this,[r,n,i]=3===e.length?e:[e[0],{},e[1]];return a.NextVanillaSpanAllowlist.includes(r)||"1"===process.env.NEXT_OTEL_VERBOSE?function(){let e=n;"function"==typeof e&&"function"==typeof i&&(e=e.apply(this,arguments));let a=arguments.length-1,s=arguments[a];if("function"!=typeof s)return t.trace(r,e,()=>i.apply(this,arguments));{let n=t.getContext().bind(o.active(),s);return t.trace(r,e,(e,t)=>(arguments[a]=function(e){return null==t||t(e),n.apply(this,arguments)},i.apply(this,arguments)))}}:i}startSpan(...e){let[t,r]=e,n=this.getSpanContext((null==r?void 0:r.parentSpan)??this.getActiveScopeSpan());return this.getTracerInstance().startSpan(t,r,n)}getSpanContext(e){return e?s.setSpan(o.active(),e):void 0}getRootSpanAttributes(){let e=o.active().getValue(f);return g.get(e)}}let h=(()=>{let e=new b;return()=>e})()},38238:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ReflectAdapter",{enumerable:!0,get:function(){return r}});class r{static get(e,t,r){let n=Reflect.get(e,t,r);return"function"==typeof n?n.bind(e):n}static set(e,t,r,n){return Reflect.set(e,t,r,n)}static has(e,t){return Reflect.has(e,t)}static deleteProperty(e,t){return Reflect.deleteProperty(e,t)}}}}; \ No newline at end of file diff --git a/frontend/.next/server/chunks/9311.js b/frontend/.next/server/chunks/9311.js new file mode 100644 index 0000000..906cc1c --- /dev/null +++ b/frontend/.next/server/chunks/9311.js @@ -0,0 +1,12 @@ +"use strict";exports.id=9311,exports.ids=[9311],exports.modules={59311:(e,t,n)=>{let r,a;n.d(t,{createBaseAccountSDK:()=>oU});let i=JSON.parse('{"u2":"@base-org/account","i8":"2.4.0"}'),s="https://rpc.wallet.coinbase.com",o=i.u2,c=i.i8;function u(e,t){let n;try{n=e()}catch(e){return}return{getItem:e=>{var r;let a=e=>null===e?null:JSON.parse(e,null==t?void 0:t.reviver),i=null!=(r=n.getItem(e))?r:null;return i instanceof Promise?i.then(a):a(i)},setItem:(e,r)=>n.setItem(e,JSON.stringify(r,null==t?void 0:t.replacer)),removeItem:e=>n.removeItem(e)}}let l=e=>t=>{try{let n=e(t);if(n instanceof Promise)return n;return{then:e=>l(e)(n),catch(e){return this}}}catch(e){return{then(e){return this},catch:t=>l(t)(e)}}},d=e=>{let t;let n=new Set,r=(e,r)=>{let a="function"==typeof e?e(t):e;if(!Object.is(a,t)){let e=t;t=(null!=r?r:"object"!=typeof a||null===a)?a:Object.assign({},t,a),n.forEach(n=>n(t,e))}},a=()=>t,i={setState:r,getState:a,getInitialState:()=>s,subscribe:e=>(n.add(e),()=>n.delete(e))},s=t=e(r,a,i);return i},f=e=>e?d(e):d,p=()=>({chains:[]}),m=()=>({keys:{}}),h=()=>({account:{}}),y=()=>({subAccount:void 0}),b=()=>({subAccountConfig:{}}),g=()=>({spendPermissions:[]}),v=()=>({config:{version:c}}),w=f((r=(...e)=>({...p(...e),...m(...e),...h(...e),...y(...e),...g(...e),...v(...e),...b(...e)}),a={name:"base-acc-sdk.store",storage:u(()=>localStorage),partialize:e=>({chains:e.chains,keys:e.keys,account:e.account,subAccount:e.subAccount,spendPermissions:e.spendPermissions,config:e.config})},(e,t,n)=>{let i,s={storage:u(()=>localStorage),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...a},o=!1,c=new Set,d=new Set,f=s.storage;if(!f)return r((...t)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),e(...t)},t,n);let p=()=>{let e=s.partialize({...t()});return f.setItem(s.name,{state:e,version:s.version})},m=n.setState;n.setState=(e,t)=>{m(e,t),p()};let h=r((...t)=>{e(...t),p()},t,n);n.getInitialState=()=>h;let y=()=>{var n,r;if(!f)return;o=!1,c.forEach(e=>{var n;return e(null!=(n=t())?n:h)});let a=(null==(r=s.onRehydrateStorage)?void 0:r.call(s,null!=(n=t())?n:h))||void 0;return l(f.getItem.bind(f))(s.name).then(e=>{if(e){if("number"!=typeof e.version||e.version===s.version)return[!1,e.state];if(s.migrate){let t=s.migrate(e.state,e.version);return t instanceof Promise?t.then(e=>[!0,e]):[!0,t]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}return[!1,void 0]}).then(n=>{var r;let[a,o]=n;if(e(i=s.merge(o,null!=(r=t())?r:h),!0),a)return p()}).then(()=>{null==a||a(i,void 0),i=t(),o=!0,d.forEach(e=>e(i))}).catch(e=>{null==a||a(void 0,e)})};return n.persist={setOptions:e=>{s={...s,...e},e.storage&&(f=e.storage)},clearStorage:()=>{null==f||f.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>y(),hasHydrated:()=>o,onHydrate:e=>(c.add(e),()=>{c.delete(e)}),onFinishHydration:e=>(d.add(e),()=>{d.delete(e)})},s.skipHydration||y(),i||h})),x={get:()=>w.getState().spendPermissions,set:e=>{w.setState({spendPermissions:e})},clear:()=>{w.setState({spendPermissions:[]})}},k={get:()=>w.getState().config,set:e=>{w.setState(t=>({config:{...t.config,...e}}))}},E={...w,subAccounts:{get:()=>w.getState().subAccount,set:e=>{w.setState(t=>({subAccount:t.subAccount?{...t.subAccount,...e}:{address:e.address,...e}}))},clear:()=>{w.setState({subAccount:void 0})}},subAccountsConfig:{get:()=>w.getState().subAccountConfig,set:e=>{w.setState(t=>({subAccountConfig:{...t.subAccountConfig,...e}}))},clear:()=>{w.setState({subAccountConfig:{}})}},spendPermissions:x,account:{get:()=>w.getState().account,set:e=>{w.setState(t=>({account:{...t.account,...e}}))},clear:()=>{w.setState({account:{}})}},chains:{get:()=>w.getState().chains,set:e=>{w.setState({chains:e})},clear:()=>{w.setState({chains:[]})}},keys:{get:e=>w.getState().keys[e],set:(e,t)=>{w.setState(n=>({keys:{...n.keys,[e]:t}}))},clear:()=>{w.setState({keys:{}})}},config:k},A=()=>new Promise((e,t)=>{if("undefined"==typeof window){t(Error("Telemetry is not supported in non-browser environments"));return}if(window.ClientAnalytics)return e();try{let t=document.createElement("script");t.textContent='!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.ClientAnalytics=t():e.ClientAnalytics=t()}(this,(function(){return(()=>{var e={792:e=>{var t={utf8:{stringToBytes:function(e){return t.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(t.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],n=0;n{var t,n;t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n={rotl:function(e,t){return e<>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&n.rotl(e,8)|4278255360&n.rotl(e,24);for(var t=0;t0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],n=0,r=0;n>>5]|=e[n]<<24-r%32;return t},wordsToBytes:function(e){for(var t=[],n=0;n<32*e.length;n+=8)t.push(e[n>>>5]>>>24-n%32&255);return t},bytesToHex:function(e){for(var t=[],n=0;n>>4).toString(16)),t.push((15&e[n]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],n=0;n>>6*(3-a)&63)):n.push("=");return n.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\\/]/gi,"");for(var n=[],r=0,i=0;r>>6-2*i);return n}},e.exports=n},335:e=>{function t(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}e.exports=function(e){return null!=e&&(t(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&t(e.slice(0,0))}(e)||!!e._isBuffer)}},762:(e,t,n)=>{var r,i,a,o,s;r=n(562),i=n(792).utf8,a=n(335),o=n(792).bin,(s=function(e,t){e.constructor==String?e=t&&"binary"===t.encoding?o.stringToBytes(e):i.stringToBytes(e):a(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||e.constructor===Uint8Array||(e=e.toString());for(var n=r.bytesToWords(e),c=8*e.length,u=1732584193,l=-271733879,d=-1732584194,p=271733878,m=0;m>>24)|4278255360&(n[m]<<24|n[m]>>>8);n[c>>>5]|=128<>>9<<4)]=c;var f=s._ff,v=s._gg,g=s._hh,b=s._ii;for(m=0;m>>0,l=l+w>>>0,d=d+y>>>0,p=p+T>>>0}return r.endian([u,l,d,p])})._ff=function(e,t,n,r,i,a,o){var s=e+(t&n|~t&r)+(i>>>0)+o;return(s<>>32-a)+t},s._gg=function(e,t,n,r,i,a,o){var s=e+(t&r|n&~r)+(i>>>0)+o;return(s<>>32-a)+t},s._hh=function(e,t,n,r,i,a,o){var s=e+(t^n^r)+(i>>>0)+o;return(s<>>32-a)+t},s._ii=function(e,t,n,r,i,a,o){var s=e+(n^(t|~r))+(i>>>0)+o;return(s<>>32-a)+t},s._blocksize=16,s._digestsize=16,e.exports=function(e,t){if(null==e)throw new Error("Illegal argument "+e);var n=r.wordsToBytes(s(e,t));return t&&t.asBytes?n:t&&t.asString?o.bytesToString(n):r.bytesToHex(n)}},2:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Perfume:()=>ze,incrementUjNavigation:()=>Le,markStep:()=>Re,markStepOnce:()=>qe});var r,i,a={isResourceTiming:!1,isElementTiming:!1,maxTime:3e4,reportOptions:{},enableNavigationTracking:!0},o=window,s=o.console,c=o.navigator,u=o.performance,l=function(){return c.deviceMemory},d=function(){return c.hardwareConcurrency},p="mark.",m=function(){return u&&!!u.getEntriesByType&&!!u.now&&!!u.mark},f="4g",v=!1,g={},b={value:0},h={value:{beacon:0,css:0,fetch:0,img:0,other:0,script:0,total:0,xmlhttprequest:0}},w={value:0},y={value:0},T={},k={isHidden:!1,didChange:!1},_=function(){k.isHidden=!1,document.hidden&&(k.isHidden=document.hidden,k.didChange=!0)},S=function(e,t){try{var n=new PerformanceObserver((function(e){t(e.getEntries())}));return n.observe({type:e,buffered:!0}),n}catch(e){s.warn("Perfume.js:",e)}return null},E=function(){return!!(d()&&d()<=4)||!!(l()&&l()<=4)},x=function(e,t){switch(e){case"slow-2g":case"2g":case"3g":return!0;default:return E()||t}},O=function(e){return parseFloat(e.toFixed(4))},j=function(e){return"number"!=typeof e?null:O(e/Math.pow(1024,2))},N=function(e,t,n,r,i){var s,u=function(){a.analyticsTracker&&(k.isHidden&&!["CLS","INP"].includes(e)||a.analyticsTracker({attribution:r,metricName:e,data:t,navigatorInformation:c?{deviceMemory:l()||0,hardwareConcurrency:d()||0,serviceWorkerStatus:"serviceWorker"in c?c.serviceWorker.controller?"controlled":"supported":"unsupported",isLowEndDevice:E(),isLowEndExperience:x(f,v)}:{},rating:n,navigationType:i}))};["CLS","INP"].includes(e)?u():(s=u,"requestIdleCallback"in o?o.requestIdleCallback(s,{timeout:3e3}):s())},I=function(e){e.forEach((function(e){if(!("self"!==e.name||e.startTime0&&(w.value+=t,y.value+=t)}}))};!function(e){e.instant="instant",e.quick="quick",e.moderate="moderate",e.slow="slow",e.unavoidable="unavoidable"}(r||(r={}));var P,M,B,C,D,A=((i={})[r.instant]={vitalsThresholds:[100,200],maxOutlierThreshold:1e4},i[r.quick]={vitalsThresholds:[200,500],maxOutlierThreshold:1e4},i[r.moderate]={vitalsThresholds:[500,1e3],maxOutlierThreshold:1e4},i[r.slow]={vitalsThresholds:[1e3,2e3],maxOutlierThreshold:1e4},i[r.unavoidable]={vitalsThresholds:[2e3,5e3],maxOutlierThreshold:2e4},i),L={RT:[100,200],TBT:[200,600],NTBT:[200,600]},U=function(e,t){return L[e]?t<=L[e][0]?"good":t<=L[e][1]?"needsImprovement":"poor":null},R=function(e,t,n){Object.keys(t).forEach((function(e){"number"==typeof t[e]&&(t[e]=O(t[e]))})),N(e,t,null,n||{})},q=function(e){var t=e.attribution,n=e.name,r=e.rating,i=e.value,o=e.navigationType;"FCP"===n&&(b.value=i),["FCP","LCP"].includes(n)&&!T[0]&&(T[0]=S("longtask",I)),"FID"===n&&setTimeout((function(){k.didChange||(q({attribution:t,name:"TBT",rating:U("TBT",w.value),value:w.value,navigationType:o}),R("dataConsumption",h.value))}),1e4);var s=O(i);s<=a.maxTime&&s>=0&&N(n,s,r,t,o)},F=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},z=function(e){if("loading"===document.readyState)return"loading";var t=F();if(t){if(e(t||100)-1)return n||i;if(n=n?i+">"+n:i,r.id)break;e=r.parentNode}}catch(e){}return n},Q=-1,W=function(){return Q},H=function(e){addEventListener("pageshow",(function(t){t.persisted&&(Q=t.timeStamp,e(t))}),!0)},V=function(){var e=F();return e&&e.activationStart||0},J=function(e,t){var n=F(),r="navigate";return W()>=0?r="back-forward-cache":n&&(r=document.prerendering||V()>0?"prerender":document.wasDiscarded?"restore":n.type.replace(/_/g,"-")),{name:e,value:void 0===t?-1:t,rating:"good",delta:0,entries:[],id:"v3-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},X=function(e,t,n){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var r=new PerformanceObserver((function(e){Promise.resolve().then((function(){t(e.getEntries())}))}));return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch(e){}},G=function(e,t){var n=function n(r){"pagehide"!==r.type&&"hidden"!==document.visibilityState||(e(r),t&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)},Z=function(e,t,n,r){var i,a;return function(o){t.value>=0&&(o||r)&&((a=t.value-(i||0))||void 0===i)&&(i=t.value,t.delta=a,t.rating=function(e,t){return e>t[1]?"poor":e>t[0]?"needs-improvement":"good"}(t.value,n),e(t))}},Y=function(e){requestAnimationFrame((function(){return requestAnimationFrame((function(){return e()}))}))},ee=function(e){document.prerendering?addEventListener("prerenderingchange",(function(){return e()}),!0):e()},te=-1,ne=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},re=function(e){"hidden"===document.visibilityState&&te>-1&&(te="visibilitychange"===e.type?e.timeStamp:0,ae())},ie=function(){addEventListener("visibilitychange",re,!0),addEventListener("prerenderingchange",re,!0)},ae=function(){removeEventListener("visibilitychange",re,!0),removeEventListener("prerenderingchange",re,!0)},oe=function(){return te<0&&(te=ne(),ie(),H((function(){setTimeout((function(){te=ne(),ie()}),0)}))),{get firstHiddenTime(){return te}}},se=function(e,t){t=t||{},ee((function(){var n,r=[1800,3e3],i=oe(),a=J("FCP"),o=X("paint",(function(e){e.forEach((function(e){"first-contentful-paint"===e.name&&(o.disconnect(),e.startTime=0&&M1e12?new Date:performance.now())-e.timeStamp;"pointerdown"==e.type?function(e,t){var n=function(){le(e,t),i()},r=function(){i()},i=function(){removeEventListener("pointerup",n,ce),removeEventListener("pointercancel",r,ce)};addEventListener("pointerup",n,ce),addEventListener("pointercancel",r,ce)}(t,e):le(t,e)}},me=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach((function(t){return e(t,pe,ce)}))},fe=0,ve=1/0,ge=0,be=function(e){e.forEach((function(e){e.interactionId&&(ve=Math.min(ve,e.interactionId),ge=Math.max(ge,e.interactionId),fe=ge?(ge-ve)/7+1:0)}))},he=function(){return D?fe:performance.interactionCount||0},we=0,ye=function(){return he()-we},Te=[],ke={},_e=function(e){var t=Te[Te.length-1],n=ke[e.interactionId];if(n||Te.length<10||e.duration>t.latency){if(n)n.entries.push(e),n.latency=Math.max(n.latency,e.duration);else{var r={id:e.interactionId,latency:e.duration,entries:[e]};ke[r.id]=r,Te.push(r)}Te.sort((function(e,t){return t.latency-e.latency})),Te.splice(10).forEach((function(e){delete ke[e.id]}))}},Se={},Ee=function e(t){document.prerendering?ee((function(){return e(t)})):"complete"!==document.readyState?addEventListener("load",(function(){return e(t)}),!0):setTimeout(t,0)},xe=function(e,t){t=t||{};var n=[800,1800],r=J("TTFB"),i=Z(e,r,n,t.reportAllChanges);Ee((function(){var a=F();if(a){var o=a.responseStart;if(o<=0||o>performance.now())return;r.value=Math.max(o-V(),0),r.entries=[a],i(!0),H((function(){r=J("TTFB",0),(i=Z(e,r,n,t.reportAllChanges))(!0)}))}}))},Oe=function(e){e.forEach((function(e){e.identifier&&q({attribution:{identifier:e.identifier},name:"ET",rating:null,value:e.startTime})}))},je=function(e){e.forEach((function(e){if(a.isResourceTiming&&R("resourceTiming",e),e.decodedBodySize&&e.initiatorType){var t=e.decodedBodySize/1e3;h.value[e.initiatorType]+=t,h.value.total+=t}}))},Ne=function(){!function(e,t){xe((function(e){!function(e){if(e.entries.length){var t=e.entries[0],n=t.activationStart||0,r=Math.max(t.domainLookupStart-n,0),i=Math.max(t.connectStart-n,0),a=Math.max(t.requestStart-n,0);e.attribution={waitingTime:r,dnsTime:i-r,connectionTime:a-i,requestTime:e.value-a,navigationEntry:t}}else e.attribution={waitingTime:0,dnsTime:0,connectionTime:0,requestTime:0}}(e),function(e){e.value>0&&q(e)}(e)}),t)}(0,a.reportOptions.ttfb),function(e,t){!function(e,t){t=t||{},ee((function(){var e,n=[.1,.25],r=J("CLS"),i=-1,a=0,o=[],s=function(e){i>-1&&function(e){!function(e){if(e.entries.length){var t=e.entries.reduce((function(e,t){return e&&e.value>t.value?e:t}));if(t&&t.sources&&t.sources.length){var n=(r=t.sources).find((function(e){return e.node&&1===e.node.nodeType}))||r[0];if(n)return void(e.attribution={largestShiftTarget:$(n.node),largestShiftTime:t.startTime,largestShiftValue:t.value,largestShiftSource:n,largestShiftEntry:t,loadState:z(t.startTime)})}}var r;e.attribution={}}(e),function(e){q(e)}(e)}(e)},c=function(t){t.forEach((function(t){if(!t.hadRecentInput){var n=o[0],i=o[o.length-1];a&&t.startTime-i.startTime<1e3&&t.startTime-n.startTime<5e3?(a+=t.value,o.push(t)):(a=t.value,o=[t]),a>r.value&&(r.value=a,r.entries=o,e())}}))},u=X("layout-shift",c);u&&(e=Z(s,r,n,t.reportAllChanges),se((function(t){i=t.value,r.value<0&&(r.value=0,e())})),G((function(){c(u.takeRecords()),e(!0)})),H((function(){a=0,i=-1,r=J("CLS",0),e=Z(s,r,n,t.reportAllChanges),Y((function(){return e()}))})))}))}(0,t)}(0,a.reportOptions.cls),function(e,t){se((function(e){!function(e){if(e.entries.length){var t=F(),n=e.entries[e.entries.length-1];if(t){var r=t.activationStart||0,i=Math.max(0,t.responseStart-r);return void(e.attribution={timeToFirstByte:i,firstByteToFCP:e.value-i,loadState:z(e.entries[0].startTime),navigationEntry:t,fcpEntry:n})}}e.attribution={timeToFirstByte:0,firstByteToFCP:e.value,loadState:z(W())}}(e),function(e){q(e)}(e)}),t)}(0,a.reportOptions.fcp),function(e,t){!function(e,t){t=t||{},ee((function(){var n,r=[100,300],i=oe(),a=J("FID"),o=function(e){e.startTime0&&(i.value=0,i.entries=[]),r(!0)})),H((function(){Te=[],we=he(),i=J("INP"),r=Z(e,i,n,t.reportAllChanges)})))}))}((function(t){!function(e){if(e.entries.length){var t=e.entries.sort((function(e,t){return t.duration-e.duration||t.processingEnd-t.processingStart-(e.processingEnd-e.processingStart)}))[0];e.attribution={eventTarget:$(t.target),eventType:t.name,eventTime:t.startTime,eventEntry:t,loadState:z(t.startTime)}}else e.attribution={}}(t),e(t)}),t)}((function(e){return q(e)}),a.reportOptions.inp),a.isResourceTiming&&S("resource",je),a.isElementTiming&&S("element",Oe)},Ie=function(e){var t="usageDetails"in e?e.usageDetails:{};R("storageEstimate",{quota:j(e.quota),usage:j(e.usage),caches:j(t.caches),indexedDB:j(t.indexedDB),serviceWorker:j(t.serviceWorkerRegistrations)})},Pe={finalMarkToStepsMap:{},startMarkToStepsMap:{},active:{},navigationSteps:{}},Me=function(e){delete Pe.active[e]},Be=function(){return Pe.navigationSteps},Ce=function(e){var t;return null!==(t=Be()[e])&&void 0!==t?t:{}},De=function(e,t,n){var r="step."+e,i=u.getEntriesByName(p+t).length>0;if(u.getEntriesByName(p+n).length>0&&a.steps){var o=A[a.steps[e].threshold],s=o.maxOutlierThreshold,c=o.vitalsThresholds;if(i){var l=u.measure(r,p+t,p+n),d=l.duration;if(d<=s){var m=function(e,t){return e<=t[0]?"good":e<=t[1]?"needsImprovement":"poor"}(d,c);d>=0&&(N("userJourneyStep",d,m,{stepName:e},void 0),u.measure("step.".concat(e,"_vitals_").concat(m),{start:l.startTime+l.duration,end:l.startTime+l.duration,detail:{type:"stepVital",duration:d}}))}}}},Ae=function(){var e=Be(),t=Pe.startMarkToStepsMap,n=Object.keys(e).length;if(0===n)return{};var r={},i=n-1,a=Ce(i);if(Object.keys(a).forEach((function(e){var n,i=null!==(n=t[e])&&void 0!==n?n:[];Object.keys(i).forEach((function(e){r[e]=!0}))})),n>1){var o=Ce(i-1);Object.keys(o).forEach((function(e){var n,i=null!==(n=t[e])&&void 0!==n?n:[];Object.keys(i).forEach((function(e){r[e]=!0}))}))}return r},Le=function(){var e,t=Object.keys(Pe.navigationSteps).length;Pe.navigationSteps[t]={};var n=Ae();null===(e=a.onMarkStep)||void 0===e||e.call(a,"",Object.keys(n))},Ue=function(e){var t,n,r,i,o,s,c;if(Pe.finalMarkToStepsMap[e]){!function(e){var t=Pe.navigationSteps,n=Pe.finalMarkToStepsMap,r=Object.keys(t).length;if(0!==r){var i=r-1,a=Ce(i);if(a&&n[e]){var o=n[e];o&&Object.keys(o).forEach((function(e){if(a[e]){var n=Ce(i)||{};n[e]=!1,t[i]=n}if(r>1){var o=i-1,s=Ce(o);s[e]&&(s[e]=!1,t[o]=s)}}))}}}(e);var u=Pe.finalMarkToStepsMap[e];Object.keys(u).forEach((function(t){var n=u[t];n.forEach(Me),Promise.all(n.map((function(n){return function(e,t,n,r){return new(n||(n=Promise))((function(e,t){function i(e){try{o(r.next(e))}catch(e){t(e)}}function a(e){try{o(r.throw(e))}catch(e){t(e)}}function o(t){var r;t.done?e(t.value):(r=t.value,r instanceof n?r:new n((function(e){e(r)}))).then(i,a)}o((r=r.apply(undefined,[])).next())}))}(0,0,void 0,(function(){return function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0?o:1)-1)||[])[r]=!0,i[s]=c,function(e){var t,n=null!==(t=Pe.startMarkToStepsMap[e])&&void 0!==t?t:[];Object.keys(n).forEach((function(e){Pe.active[e]||(Pe.active[e]=!0)}))}(e);if(a.enableNavigationTracking){var l=Ae();null===(t=a.onMarkStep)||void 0===t||t.call(a,e,Object.keys(l))}else null===(n=a.onMarkStep)||void 0===n||n.call(a,e,Object.keys(Pe.active))},Re=function(e){u.mark(p+e),Ue(e)},qe=function(e){0===u.getEntriesByName(p+e).length&&(u.mark(p+e),Ue(e))},Fe=0,ze=function(){function e(e){if(void 0===e&&(e={}),this.v="9.0.0-rc.3",a.analyticsTracker=e.analyticsTracker,a.isResourceTiming=!!e.resourceTiming,a.isElementTiming=!!e.elementTiming,a.maxTime=e.maxMeasureTime||a.maxTime,a.reportOptions=e.reportOptions||a.reportOptions,a.steps=e.steps,a.onMarkStep=e.onMarkStep,a.enableNavigationTracking=e.enableNavigationTracking,m()){"PerformanceObserver"in o&&Ne(),void 0!==document.hidden&&document.addEventListener("visibilitychange",_);var t=function(){if(!m())return{};var e=u.getEntriesByType("navigation")[0];if(!e)return{};var t=e.responseStart,n=e.responseEnd;return{fetchTime:n-e.fetchStart,workerTime:e.workerStart>0?n-e.workerStart:0,totalTime:n-e.requestStart,downloadTime:n-t,timeToFirstByte:t-e.requestStart,headerSize:e.transferSize-e.encodedBodySize||0,dnsLookupTime:e.domainLookupEnd-e.domainLookupStart,redirectTime:e.redirectEnd-e.redirectStart}}();R("navigationTiming",t),t.redirectTime&&q({attribution:{},name:"RT",rating:U("RT",t.redirectTime),value:t.redirectTime}),R("networkInformation",function(){if("connection"in c){var e=c.connection;return"object"!=typeof e?{}:(f=e.effectiveType,v=!!e.saveData,{downlink:e.downlink,effectiveType:e.effectiveType,rtt:e.rtt,saveData:!!e.saveData})}return{}}()),c&&c.storage&&"function"==typeof c.storage.estimate&&c.storage.estimate().then(Ie),a.steps&&a.steps&&(Pe.startMarkToStepsMap={},Pe.finalMarkToStepsMap={},Pe.active={},Pe.navigationSteps={},Object.entries(a.steps).forEach((function(e){var t,n,r=e[0],i=e[1].marks,a=i[0],o=i[1],s=null!==(n=Pe.startMarkToStepsMap[a])&&void 0!==n?n:{};if(s[r]=!0,Pe.startMarkToStepsMap[a]=s,Pe.finalMarkToStepsMap[o]){var c=Pe.finalMarkToStepsMap[o][a]||[];c.push(r),Pe.finalMarkToStepsMap[o][a]=c}else Pe.finalMarkToStepsMap[o]=((t={})[a]=[r],t)})))}}return e.prototype.start=function(e){m()&&!g[e]&&(g[e]=!0,u.mark("mark_".concat(e,"_start")))},e.prototype.end=function(e,t,n){if(void 0===t&&(t={}),void 0===n&&(n=!0),m()&&g[e]){u.mark("mark_".concat(e,"_end")),delete g[e];var r=function(e){u.measure(e,"mark_".concat(e,"_start"),"mark_".concat(e,"_end"));var t=u.getEntriesByName(e).pop();return t&&"measure"===t.entryType?t.duration:-1}(e);n&&R(e,O(r),t)}},e.prototype.endPaint=function(e,t){var n=this;setTimeout((function(){n.end(e,t)}))},e.prototype.clear=function(e){delete g[e],u.clearMarks&&(u.clearMarks("mark_".concat(e,"_start")),u.clearMarks("mark_".concat(e,"_end")))},e.prototype.markNTBT=function(){var e=this;this.start("ntbt"),y.value=0,clearTimeout(Fe),Fe=setTimeout((function(){e.end("ntbt",{},!1),q({attribution:{},name:"NTBT",rating:U("NTBT",y.value),value:y.value}),y.value=0}),2e3)},e}()},426:(e,t)=>{"use strict";Symbol.for("react.element"),Symbol.for("react.portal"),Symbol.for("react.fragment"),Symbol.for("react.strict_mode"),Symbol.for("react.profiler"),Symbol.for("react.provider"),Symbol.for("react.context"),Symbol.for("react.forward_ref"),Symbol.for("react.suspense"),Symbol.for("react.memo"),Symbol.for("react.lazy"),Symbol.iterator;var n={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},r=Object.assign,i={};function a(e,t,r){this.props=e,this.context=t,this.refs=i,this.updater=r||n}function o(){}function s(e,t,r){this.props=e,this.context=t,this.refs=i,this.updater=r||n}a.prototype.isReactComponent={},a.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},a.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},o.prototype=a.prototype;var c=s.prototype=new o;c.constructor=s,r(c,a.prototype),c.isPureReactComponent=!0;Array.isArray,Object.prototype.hasOwnProperty;var u={current:null};t.useCallback=function(e,t){return u.current.useCallback(e,t)},t.useEffect=function(e,t){return u.current.useEffect(e,t)},t.useRef=function(e){return u.current.useRef(e)}},784:(e,t,n)=>{"use strict";e.exports=n(426)},353:function(e,t,n){var r;!function(i,a){"use strict";var o="function",s="undefined",c="object",u="string",l="major",d="model",p="name",m="type",f="vendor",v="version",g="architecture",b="console",h="mobile",w="tablet",y="smarttv",T="wearable",k="embedded",_="Amazon",S="Apple",E="ASUS",x="BlackBerry",O="Browser",j="Chrome",N="Firefox",I="Google",P="Huawei",M="LG",B="Microsoft",C="Motorola",D="Opera",A="Samsung",L="Sharp",U="Sony",R="Xiaomi",q="Zebra",F="Facebook",z="Chromium OS",K="Mac OS",$=function(e){for(var t={},n=0;n0?2===s.length?typeof s[1]==o?this[s[0]]=s[1].call(this,l):this[s[0]]=s[1]:3===s.length?typeof s[1]!==o||s[1].exec&&s[1].test?this[s[0]]=l?l.replace(s[1],s[2]):a:this[s[0]]=l?s[1].call(this,l,s[2]):a:4===s.length&&(this[s[0]]=l?s[3].call(this,l.replace(s[1],s[2])):a):this[s]=l||a;d+=2}},J=function(e,t){for(var n in t)if(typeof t[n]===c&&t[n].length>0){for(var r=0;r2&&(e[d]="iPad",e[m]=w),e},this.getEngine=function(){var e={};return e[p]=a,e[v]=a,V.call(e,r,y.engine),e},this.getOS=function(){var e={};return e[p]=a,e[v]=a,V.call(e,r,y.os),T&&!e[p]&&b&&"Unknown"!=b.platform&&(e[p]=b.platform.replace(/chrome os/i,z).replace(/macos/i,K)),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return r},this.setUA=function(e){return r=typeof e===u&&e.length>350?H(e,350):e,this},this.setUA(r),this};Z.VERSION="1.0.35",Z.BROWSER=$([p,v,l]),Z.CPU=$([g]),Z.DEVICE=$([d,f,m,b,h,y,w,T,k]),Z.ENGINE=Z.OS=$([p,v]),typeof t!==s?(e.exports&&(t=e.exports=Z),t.UAParser=Z):n.amdO?(r=function(){return Z}.call(t,n,t,e))===a||(e.exports=r):typeof i!==s&&(i.UAParser=Z);var Y=typeof i!==s&&(i.jQuery||i.Zepto);if(Y&&!Y.ua){var ee=new Z;Y.ua=ee.getResult(),Y.ua.get=function(){return ee.getUA()},Y.ua.set=function(e){ee.setUA(e);var t=ee.getResult();for(var n in t)Y.ua[n]=t[n]}}}("object"==typeof window?window:this)}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var a=t[r]={exports:{}};return e[r].call(a.exports,a,a.exports,n),a.exports}n.amdO={},n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{ActionType:()=>f,AmplitudePlatformName:()=>g,AnalyticsEventImportance:()=>l,AnalyticsQueries:()=>e,AuthStatus:()=>b,ComponentType:()=>m,IThresholdTier:()=>Jt,MetricType:()=>d,PlatformName:()=>v,SessionActions:()=>h,SessionAutomatedEvents:()=>w,SessionRank:()=>y,SubjectType:()=>p,UserTypeCommerce:()=>c,UserTypeInsto:()=>i,UserTypeRetail:()=>t,UserTypeRetailBusinessBanking:()=>s,UserTypeRetailEmployeeInternal:()=>a,UserTypeRetailEmployeePersonal:()=>o,UserTypeWallet:()=>u,automatedEvents:()=>xn,automatedMappingConfig:()=>In,clearMarkEntry:()=>Vn,clearPerformanceMarkEntries:()=>Xn,config:()=>A,createEventConfig:()=>On,createNewSpan:()=>Ln,createNewTrace:()=>Un,device:()=>W,endPerfMark:()=>Jn,exposeExperiment:()=>wn,flushQueue:()=>or,generateUUID:()=>V,getAnalyticsHeaders:()=>sr,getReferrerData:()=>le,getTracingHeaders:()=>An,getTracingId:()=>Dn,getUrlHostname:()=>pe,getUrlParams:()=>me,getUrlPathname:()=>fe,getUserContext:()=>ar,identify:()=>Tn,identifyFlow:()=>xe,identity:()=>H,identityFlow:()=>Se,incrementUjNavigation:()=>an,init:()=>yn,initNextJsTrackPageview:()=>_n,initTrackPageview:()=>kn,isEventKeyFormatValid:()=>we,isSessionEnded:()=>pt,location:()=>re,logEvent:()=>$t,logMetric:()=>Ht,logPageView:()=>on,logTrace:()=>Rn,markNTBT:()=>tn,markStep:()=>nn,markStepOnce:()=>rn,onVisibilityChange:()=>ln,optIn:()=>En,optOut:()=>Sn,perfMark:()=>Wn,persistentData:()=>oe,postMessage:()=>K,recordSessionDuration:()=>pn,removeFromIdentifyFlow:()=>Ee,savePersistentData:()=>st,sendScheduledEvents:()=>Bt,setBreadcrumbs:()=>ie,setConfig:()=>U,setLocation:()=>ae,setPagePath:()=>ve,setPageview:()=>Kt,setPersistentData:()=>se,setSessionStart:()=>dt,setTime:()=>Ue,startPerfMark:()=>Hn,timeStone:()=>Le,useEventLogger:()=>Yn,useLogEventOnMount:()=>tr,usePerformanceMarks:()=>rr});let e=function(e){return e.fbclid="fbclid",e.gclid="gclid",e.msclkid="msclkid",e.ptclid="ptclid",e.ttclid="ttclid",e.utm_source="utm_source",e.utm_medium="utm_medium",e.utm_campaign="utm_campaign",e.utm_term="utm_term",e.utm_content="utm_content",e}({});const t=0,i=1,a=2,o=3,s=4,c=5,u=6;let l=function(e){return e.low="low",e.high="high",e}({}),d=function(e){return e.count="count",e.rate="rate",e.gauge="gauge",e.distribution="distribution",e.histogram="histogram",e}({}),p=function(e){return e.commerce_merchant="commerce_merchant",e.device="device",e.edp_fingerprint_id="edp_fingerprint_id",e.nft_user="nft_user",e.user="user",e.wallet_user="wallet_user",e.uuid="user_uuid",e}({}),m=function(e){return e.unknown="unknown",e.banner="banner",e.button="button",e.card="card",e.chart="chart",e.content_script="content_script",e.dropdown="dropdown",e.link="link",e.page="page",e.modal="modal",e.table="table",e.search_bar="search_bar",e.service_worker="service_worker",e.text="text",e.text_input="text_input",e.tray="tray",e.checkbox="checkbox",e.icon="icon",e}({}),f=function(e){return e.unknown="unknown",e.blur="blur",e.click="click",e.change="change",e.dismiss="dismiss",e.focus="focus",e.hover="hover",e.select="select",e.measurement="measurement",e.move="move",e.process="process",e.render="render",e.scroll="scroll",e.view="view",e.search="search",e.keyPress="keyPress",e}({}),v=function(e){return e.unknown="unknown",e.web="web",e.android="android",e.ios="ios",e.mobile_web="mobile_web",e.tablet_web="tablet_web",e.server="server",e.windows="windows",e.macos="macos",e.extension="extension",e}({}),g=function(e){return e.web="Web",e.ios="iOS",e.android="Android",e}({}),b=function(e){return e[e.notLoggedIn=0]="notLoggedIn",e[e.loggedIn=1]="loggedIn",e}({}),h=function(e){return e.ac="ac",e.af="af",e.ah="ah",e.al="al",e.am="am",e.ar="ar",e.as="as",e}({}),w=function(e){return e.pv="pv",e}({}),y=function(e){return e.xs="xs",e.s="s",e.m="m",e.l="l",e.xl="xl",e.xxl="xxl",e}({});const T="https://analytics-service-dev.cbhq.net",k=3e5,_=5e3,S="analytics-db",E="experiment-exposure-db",x="Analytics SDK:",O=Object.values(e),j="pageview",N="session_duration",I={navigationTiming:{eventName:"perf_navigation_timing"},redirectTime:{eventName:"perf_redirect_time"},RT:{eventName:"perf_redirect_time"},TTFB:{eventName:"perf_time_to_first_byte"},networkInformation:{eventName:"perf_network_information"},storageEstimate:{eventName:"perf_storage_estimate"},FCP:{eventName:"perf_first_contentful_paint"},FID:{eventName:"perf_first_input_delay"},LCP:{eventName:"perf_largest_contentful_paint"},CLS:{eventName:"perf_cumulative_layout_shift"},TBT:{eventName:"perf_total_blocking_time"},NTBT:{eventName:"perf_navigation_total_blocking_time"},INP:{eventName:"perf_interact_to_next_paint"},ET:{eventName:"perf_element_timing"},userJourneyStep:{eventName:"perf_user_journey_step"}},P="1",M="web";function B(){return B=Object.assign?Object.assign.bind():function(e){for(var t=1;t{console.error(x,e,t)},platform:v.unknown,projectName:"",ricTimeoutScheduleEvent:1e3,ricTimeoutSetDevice:500,showDebugLogging:!1,trackUserId:!1,version:null,apiEndpoint:T},D(T),{steps:{}}),L=[].reduce(((e,t)=>n=>e(t(n))),(e=>{if(!e.isProd)return e.isInternalApplication?(e.apiEndpoint="https://analytics-service-internal-dev.cbhq.net",B({},e,D(e.apiEndpoint))):e;const t=(e=>e.apiEndpoint?C.test(e.apiEndpoint)?e.apiEndpoint:`https://${e.apiEndpoint}`:e.isInternalApplication?"https://analytics-service-internal.cbhq.net":"https://as.coinbase.com")(e);return B({},e,{apiEndpoint:t},D(t))})),U=e=>{const{batchEventsThreshold:t,batchMetricsThreshold:n,batchTracesThreshold:r}=e,i=[t,n,r];for(const e of i)if((e||0)>30){console.warn("You are setting the threshhold for the batch limit to be greater than 30. This may cause request overload.");break}Object.assign(A,L(e))},R=[v.web,v.mobile_web,v.tablet_web];function q(){return"android"===A.platform}function F(){return"ios"===A.platform}function z(){return R.includes(A.platform)}function K(e){if(z()&&navigator&&"serviceWorker"in navigator&&navigator.serviceWorker.controller)try{navigator.serviceWorker.controller.postMessage(e)}catch(e){e instanceof Error&&A.onError(e)}}var $=n(353),Q=n.n($);const W={amplitudeOSName:null,amplitudeOSVersion:null,amplitudeDeviceModel:null,amplitudePlatform:null,browserName:null,browserMajor:null,osName:null,userAgent:null,width:null,height:null},H={countryCode:null,deviceId:null,device_os:null,isOptOut:!1,languageCode:null,locale:null,jwt:null,session_lcc_id:null,userAgent:null,userId:null},V=e=>e?(e^16*Math.random()>>e/4).toString(16):"10000000-1000-4000-8000-100000000000".replace(/[018]/g,V),J=()=>A.isAlwaysAuthed||!!H.userId,X=()=>{const e={};return H.countryCode&&(e.country_code=H.countryCode),e},G=()=>{const{platform:e}=A;if(e===v.web)switch(!0){case window.matchMedia("(max-width: 560px)").matches:return v.mobile_web;case window.matchMedia("(max-width: 1024px, min-width: 561px)").matches:return v.tablet_web}return e},Z=()=>{var e,t,n,r,i;z()?("requestIdleCallback"in window?window.requestIdleCallback(ne,{timeout:A.ricTimeoutSetDevice}):ne(),W.amplitudePlatform=g.web,W.userAgent=(null==(e=window)||null==(e=e.navigator)?void 0:e.userAgent)||null,ee({height:null!=(t=null==(n=window)?void 0:n.innerHeight)?t:null,width:null!=(r=null==(i=window)?void 0:i.innerWidth)?r:null})):F()?(W.amplitudePlatform=g.ios,W.userAgent=H.userAgent,W.userAgent&&ne()):q()&&(W.userAgent=H.userAgent,W.amplitudePlatform=g.android,W.userAgent&&ne())},Y=e=>{Object.assign(H,e),z()&&K({identity:{isAuthed:!!H.userId,locale:H.locale||null}})},ee=e=>{W.height=e.height,W.width=e.width},te=()=>{U({platform:G()}),z()&&K({config:{platform:A.platform}})},ne=()=>{var e;performance.mark&&performance.mark("ua_parser_start");const t=new(Q())(null!=(e=W.userAgent)?e:"").getResult();W.browserName=t.browser.name||null,W.browserMajor=t.browser.major||null,W.osName=t.os.name||null,W.amplitudeOSName=W.browserName,W.amplitudeOSVersion=W.browserMajor,W.amplitudeDeviceModel=W.osName,K({device:{browserName:W.browserName,osName:W.osName}}),performance.mark&&(performance.mark("ua_parser_end"),performance.measure("ua_parser","ua_parser_start","ua_parser_end"))},re={breadcrumbs:[],initialUAAData:{},pageKey:"",pageKeyRegex:{},pagePath:"",prevPageKey:"",prevPagePath:""};function ie(e){Object.assign(re,{breadcrumbs:e})}function ae(e){Object.assign(re,e)}const oe={eventId:0,sequenceNumber:0,sessionId:0,lastEventTime:0,sessionStart:0,sessionUUID:null,userId:null,ac:0,af:0,ah:0,al:0,am:0,ar:0,as:0,pv:0};function se(e){Object.assign(oe,e)}function ce(){var e,t;return null!=(e=null==(t=document)?void 0:t.referrer)?e:""}function ue(){return ue=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const e=ce();if(!e)return{};const t=new URL(e);return t.hostname===pe()?{}:{referrer:e,referring_domain:t.hostname}},de=()=>{const e=new URLSearchParams(me()),t={};return O.forEach((n=>{e.has(n)&&(t[n]=(e.get(n)||"").toLowerCase())})),t},pe=()=>{var e;return(null==(e=window)||null==(e=e.location)?void 0:e.hostname)||""},me=()=>{var e;return(null==(e=window)||null==(e=e.location)?void 0:e.search)||""},fe=()=>{var e;return(null==(e=window)||null==(e=e.location)?void 0:e.pathname)||""},ve=()=>{const e=A.overrideWindowLocation?re.pagePath:fe()+me();e&&e!==re.pagePath&&(e!==re.pagePath&&ge(),re.pagePath=e,re.pageKeyRegex&&Object.keys(re.pageKeyRegex).some((e=>{if(re.pageKeyRegex[e].test(re.pagePath))return re.pageKey=e,!0})))},ge=()=>{if(z()){const e=ce();if(!re.prevPagePath&&e){const t=new URL(e);if(t.hostname===pe())return void(re.prevPagePath=t.pathname)}}re.prevPagePath=re.pagePath,re.prevPageKey=re.pageKey},be=e=>{z()&&Object.assign(e,z()?(Object.keys(re.initialUAAData).length>0||(new URLSearchParams(me()),re.initialUAAData=ue({},(()=>{const e={};return O.forEach((t=>{oe[t]&&(e[t]=oe[t])})),e})(),de(),le())),re.initialUAAData):re.initialUAAData)},he=/^[a-zd]+(_[a-zd]+)*$/;function we(e){return he.test(e)}function ye(){return ye=Object.assign?Object.assign.bind():function(e){for(var t=1;t{ke.includes(e)&&delete Se[e]}))}function xe(e){var t;const n=Object.entries(e).reduce(((e,t)=>{const[n,r]=t;return!Te.includes(n)&&ke.includes(n)?we(n)?ye({},e,{[n]:r}):(A.onError(new Error("IdentityFlow property names must have snake case format"),{[n]:r}),e):e}),{});null!=(t=n.ujs)&&t.length&&(n.ujs=n.ujs.map((e=>`${_e}${e}`))),Object.assign(Se,n)}function Oe(){return A.platform!==v.unknown||(A.onError(new Error("SDK platform not initialized")),!1)}const je={eventsQueue:[],eventsScheduled:!1,metricsQueue:[],metricsScheduled:!1,tracesQueue:[],tracesScheduled:!1};function Ne(e){Object.assign(je,e)}const Ie={ac:0,af:0,ah:0,al:0,am:0,ar:0,as:0,pv:0,sqs:0},Pe={ac:20,af:5,ah:1,al:1,am:0,ar:10,as:20},Me={pv:25},Be={xs:0,s:1,m:1,l:2,xl:2,xxl:2},Ce=e=>e<15?y.xs:e<60?y.s:e<240?y.m:e<960?y.l:e<3840?y.xl:y.xxl,De=e=>{Object.assign(Ie,e)};function Ae(){return(new Date).getTime()}const Le={timeStart:Ae(),timeOnPagePath:0,timeOnPageKey:0,prevTimeOnPagePath:0,prevTimeOnPageKey:0,sessionDuration:0,sessionEnd:0,sessionStart:0,prevSessionDuration:0};function Ue(e){Object.assign(Le,e)}const Re=(e,t)=>t.some((t=>e instanceof t));let qe,Fe;const ze=new WeakMap,Ke=new WeakMap,$e=new WeakMap,Qe=new WeakMap,We=new WeakMap;let He={get(e,t,n){if(e instanceof IDBTransaction){if("done"===t)return Ke.get(e);if("objectStoreNames"===t)return e.objectStoreNames||$e.get(e);if("store"===t)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return Je(e[t])},set:(e,t,n)=>(e[t]=n,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function Ve(e){return"function"==typeof e?(t=e)!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(Fe||(Fe=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(t)?function(...e){return t.apply(Xe(this),e),Je(ze.get(this))}:function(...e){return Je(t.apply(Xe(this),e))}:function(e,...n){const r=t.call(Xe(this),e,...n);return $e.set(r,e.sort?e.sort():[e]),Je(r)}:(e instanceof IDBTransaction&&function(e){if(Ke.has(e))return;const t=new Promise(((t,n)=>{const r=()=>{e.removeEventListener("complete",i),e.removeEventListener("error",a),e.removeEventListener("abort",a)},i=()=>{t(),r()},a=()=>{n(e.error||new DOMException("AbortError","AbortError")),r()};e.addEventListener("complete",i),e.addEventListener("error",a),e.addEventListener("abort",a)}));Ke.set(e,t)}(e),Re(e,qe||(qe=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(e,He):e);var t}function Je(e){if(e instanceof IDBRequest)return function(e){const t=new Promise(((t,n)=>{const r=()=>{e.removeEventListener("success",i),e.removeEventListener("error",a)},i=()=>{t(Je(e.result)),r()},a=()=>{n(e.error),r()};e.addEventListener("success",i),e.addEventListener("error",a)}));return t.then((t=>{t instanceof IDBCursor&&ze.set(t,e)})).catch((()=>{})),We.set(t,e),t}(e);if(Qe.has(e))return Qe.get(e);const t=Ve(e);return t!==e&&(Qe.set(e,t),We.set(t,e)),t}const Xe=e=>We.get(e),Ge=["get","getKey","getAll","getAllKeys","count"],Ze=["put","add","delete","clear"],Ye=new Map;function et(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!=typeof t)return;if(Ye.get(t))return Ye.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,i=Ze.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!i&&!Ge.includes(n))return;const a=async function(e,...t){const a=this.transaction(e,i?"readwrite":"readonly");let o=a.store;return r&&(o=o.index(t.shift())),(await Promise.all([o[n](...t),i&&a.done]))[0]};return Ye.set(t,a),a}var tt;tt=He,He={...tt,get:(e,t,n)=>et(e,t)||tt.get(e,t,n),has:(e,t)=>!!et(e,t)||tt.has(e,t)};const nt={isReady:!1,idbKeyval:null};function rt(e){Object.assign(nt,e)}const it={},at=async e=>{if(!nt.idbKeyval)return Promise.resolve(null);try{return await nt.idbKeyval.get(e)}catch(e){return A.onError(new Error("IndexedDB:Get:InternalError")),Promise.resolve(null)}},ot=async(e,t)=>{if(nt.idbKeyval)try{await nt.idbKeyval.set(e,t)}catch(e){A.onError(new Error("IndexedDB:Set:InternalError"))}},st=()=>{"server"!==A.platform&&(se({sessionStart:Le.sessionStart,ac:Ie.ac,af:Ie.af,ah:Ie.ah,al:Ie.al,am:Ie.am,ar:Ie.ar,as:Ie.as,pv:Ie.pv}),H.userId&&se({userId:H.userId}),ot(S,oe))},ct="rgb(5,177,105)",ut=e=>{const{metricName:t,data:n}=e,r=e.importance||l.low;if(!A.showDebugLogging||!console)return;const i=`%c ${x}`,a=`color:${ct};font-size:11px;`,o=`Importance: ${r}`;console.group(i,a,t,o),n.forEach((e=>{e.event_type?console.log(e.event_type,e):console.log(e)})),console.groupEnd()},lt=e=>{const{metricName:t,data:n}=e,r=e.importance||l.low;if(!A.showDebugLogging||!console)return;const i=`color:${ct};font-size:11px;`,a=`%c ${x}`,o=`Importance: ${r}`;console.log(a,i,t,n,o)},dt=()=>{const e=Ae();oe.sessionId&&oe.lastEventTime&&oe.sessionUUID&&!pt(e)||(oe.sessionId=e,oe.sessionUUID=V(),Ue({sessionStart:e}),lt({metricName:"Started new session:",data:{persistentData:oe,timeStone:Le}})),oe.lastEventTime=e},pt=e=>e-oe.lastEventTime>18e5;function mt(){return mt=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var t;(e=>{switch(e.action){case f.click:Ie.ac+=1;break;case f.focus:Ie.af+=1;break;case f.hover:Ie.ah+=1;break;case f.move:Ie.am+=1;break;case f.scroll:Ie.al+=1;break;case f.search:Ie.ar+=1;break;case f.select:Ie.as+=1}})(t=e),t.event_type!==j?t.event_type===N&&((e=>{if(!e.session_rank)return;const t=e.session_rank;Object.values(h).forEach((e=>{Ie.sqs+=Ie[e]*Pe[e]})),Object.values(w).forEach((e=>{Ie.sqs+=Ie[e]*Me[e]})),Ie.sqs*=Be[t]})(t),Object.assign(t,Ie),De({ac:0,af:0,ah:0,al:0,am:0,ar:0,as:0,pv:0,sqs:0})):Ie.pv+=1;const n=e.event_type;delete e.event_type;const r=e.deviceId?e.deviceId:null,i=e.timestamp;return delete e.timestamp,se({eventId:oe.eventId+1}),se({sequenceNumber:oe.sequenceNumber+1}),dt(),st(),{device_id:H.deviceId||r||null,user_id:H.userId,timestamp:i,event_id:oe.eventId,session_id:oe.sessionId||-1,event_type:n,version_name:A.version||null,platform:W.amplitudePlatform,os_name:W.amplitudeOSName,os_version:W.amplitudeOSVersion,device_model:W.amplitudeDeviceModel,language:H.languageCode,event_properties:mt({},e,{session_uuid:oe.sessionUUID,height:W.height,width:W.width}),user_properties:X(),uuid:V(),library:{name:"@cbhq/client-analytics",version:"10.6.0"},sequence_number:oe.sequenceNumber,user_agent:W.userAgent||H.userAgent}},vt=e=>e.map((e=>ft(e)));function gt(){return gt=Object.assign?Object.assign.bind():function(e){for(var t=1;te.map((e=>(e=>{const t=e.tags||{},n=gt({authed:J()?"true":"false",platform:A.platform},t,{project_name:A.projectName,version_name:A.version||null});return{metric_name:e.metricName,page_path:e.pagePath||null,value:e.value,tags:n,type:e.metricType}})(e))),ht=e=>0!==je.metricsQueue.length&&(je.metricsQueue.length>=A.batchMetricsThreshold||(je.metricsScheduled||(je.metricsScheduled=!0,setTimeout((()=>{je.metricsScheduled=!1,e(bt(je.metricsQueue)),je.metricsQueue=[]}),A.batchMetricsPeriod)),!1)),wt=e=>0!==je.tracesQueue.length&&(je.tracesQueue.length>=A.batchTracesThreshold||(je.tracesScheduled||(je.tracesScheduled=!0,setTimeout((()=>{je.tracesScheduled=!1,e(je.tracesQueue),je.tracesQueue=[]}),A.batchTracesPeriod)),!1)),yt=e=>{var t;z()&&null!=(t=window)&&t.requestIdleCallback?window.requestIdleCallback(e,{timeout:A.ricTimeoutScheduleEvent}):(q()||F())&&A.interactionManager?A.interactionManager.runAfterInteractions(e):e()};function Tt(){return Tt=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{data:t,importance:n,isJSON:r,onError:i,url:a}=e,o=r?"application/json":kt,s=n||l.low,c=r?JSON.stringify(t):new URLSearchParams(t).toString();function u(){const e=new XMLHttpRequest;e.open("POST",a,!0),Object.keys(A.headers||{}).forEach((t=>{e.setRequestHeader(t,A.headers[t])})),e.setRequestHeader("Content-Type",kt),H.jwt&&e.setRequestHeader("authorization",`Bearer ${H.jwt}`),e.send(c)}if(!z()||r||!("sendBeacon"in navigator)||s!==l.low||A.headers&&0!==Object.keys(A.headers).length)if(z()&&!r)u();else{const e=Tt({},A.headers,{"Content-Type":o});H.jwt&&(e.Authorization=`Bearer ${H.jwt}`),fetch(a,{method:"POST",mode:"no-cors",headers:e,body:c}).catch((e=>{i(e,{context:"AnalyticsSDKApiError"})}))}else{const e=new Blob([c],{type:kt});try{navigator.sendBeacon.bind(navigator)(a,e)||u()}catch(e){console.error(e),u()}}};var St=n(762),Et=n.n(St);const xt=(e,t,n)=>{const r=e||"";return Et()("2"+r+t+n)};function Ot(){return Ot=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var n;e&&je.eventsQueue.push(e),nt.isReady&&(!A.trackUserId||H.userId?(t===l.high||(n=Mt,0!==je.eventsQueue.length&&(je.eventsQueue.length>=A.batchEventsThreshold||(je.eventsScheduled||(je.eventsScheduled=!0,setTimeout((()=>{je.eventsScheduled=!1,n(vt(je.eventsQueue)),je.eventsQueue=[]}),A.batchEventsPeriod)),0))))&&Bt():je.eventsQueue.length>10&&(A.trackUserId=!1,A.onError(new Error("userId not set in Logged-in"))))},Mt=(e,t=l.low)=>{if(H.isOptOut||0===e.length)return;let n;try{n=JSON.stringify(e)}catch(t){const r=e.map((e=>e.event_type)).join(", "),[i,a]=(e=>{try{const n=[];for(const r of e){const e=Ot({},r);r.event_properties&&(e.event_properties=Ot({},e.event_properties,{currentTarget:null,target:null,relatedTarget:null,_dispatchInstances:null,_targetInst:null,view:(t=r.event_properties.view,["string","number","boolean"].includes(typeof t)?r.event_properties.view:null)})),n.push(e)}return[!0,JSON.stringify(n)]}catch(e){return[!1,""]}var t})(e);if(!i)return void A.onError(new jt(t instanceof Error?t.message:"unknown"),{listEventType:r});n=a,A.onError(new Nt("Found DOM element reference"),{listEventType:r,stringifiedEventData:n})}const r=Ae().toString(),i=It({},{e:n,v:"2",upload_time:r},{client:A.amplitudeApiKey,checksum:xt(A.amplitudeApiKey,n,r)});_t({url:A.eventsEndpoint,data:i,importance:t,onError:A.onError}),ut({metricName:"Batch Events",data:e,importance:t})},Bt=()=>{Mt(vt(je.eventsQueue)),Ne({eventsQueue:[]})};function Ct(){return Ct=Object.assign?Object.assign.bind():function(e){for(var t=1;tDt.includes(e)?e:f.unknown,Ut=e=>At.includes(e)?e:m.unknown,Rt=(e,t,n)=>{const r={auth:J()?b.loggedIn:b.notLoggedIn,action:Lt(e),component_type:Ut(t),logging_id:n,platform:A.platform,project_name:A.projectName};return"number"==typeof H.userTypeEnum&&(r.user_type_enum=H.userTypeEnum),r},qt=e=>{const t=Ae();if(!e)return A.onError(new Error("missing logData")),Ct({},Rt(f.unknown,m.unknown),{locale:H.locale,session_lcc_id:H.session_lcc_id,timestamp:t,time_start:Le.timeStart});const n=Ct({},e,Rt(e.action,e.componentType,e.loggingId),{locale:H.locale,session_lcc_id:H.session_lcc_id,timestamp:t,time_start:Le.timeStart});return delete n.componentType,delete n.loggingId,n},Ft={blacklistRegex:[],isEnabled:!1};function zt(){return{page_key:re.pageKey,page_path:re.pagePath,prev_page_key:re.prevPageKey,prev_page_path:re.prevPagePath}}function Kt(e){Object.assign(Ft,e)}function $t(e,t,n=l.low){if(H.isOptOut)return;if(!Oe())return;const r=qt(t);!function(e){Ft.isEnabled&&(ve(),Object.assign(e,zt()))}(r),be(r),function(e){Object.keys(Se).length>0&&Object.assign(e,Se)}(r),r.has_double_fired=!1,r.event_type=e,n===l.high?Pt(r,n):yt((()=>{Pt(r)}))}function Qt(e,t=!1){t?_t({url:A.metricsEndPoint,data:{metrics:e},isJSON:!0,onError:A.onError}):yt((()=>{_t({url:A.metricsEndPoint,data:{metrics:e},isJSON:!0,onError:A.onError})})),ut({metricName:"Batch Metrics",data:e})}function Wt(){return Wt=Object.assign?Object.assign.bind():function(e){for(var t=1;t{null!=A&&A.onMarkStep&&A.onMarkStep(e,t),xe({ujs:t})};let Yt;const en={Perfume:()=>{},markStep:e=>{},markStepOnce:e=>{},incrementUjNavigation:()=>{}},tn=()=>{z()&&Yt&&Yt.markNTBT&&Yt.markNTBT()},nn=e=>{z()&&Yt&&en.markStep&&en.markStep(e)},rn=e=>{z()&&Yt&&en.markStepOnce&&en.markStepOnce(e)},an=()=>{z()&&Yt&&en.incrementUjNavigation&&en.incrementUjNavigation()};function on(e={callMarkNTBT:!0}){"unknown"!==A.platform&&(Ft.blacklistRegex.some((e=>e.test(fe())))||($t(j,{action:f.render,componentType:m.page}),e.callMarkNTBT&&tn()))}let sn=!1,cn=!1;const un=e=>{sn=!e.persisted},ln=(e,t="hidden",n=!1)=>{cn||(addEventListener("pagehide",un),addEventListener("beforeunload",(()=>{})),cn=!0),addEventListener("visibilitychange",(({timeStamp:n})=>{document.visibilityState===t&&e({timeStamp:n,isUnloading:sn})}),{capture:!0,once:n})},dn=36e3;function pn(){const e=pt(Ae());if(e&&(O.forEach((e=>{oe[e]&&delete oe[e]})),st()),!oe.lastEventTime||!Le.sessionStart||!e)return;const t=Math.round((oe.lastEventTime-Le.sessionStart)/1e3);if(t<1||t>dn)return;const n=Ce(t);$t(N,{action:f.measurement,componentType:m.page,session_duration:t,session_end:oe.lastEventTime,session_start:Le.sessionStart,session_rank:n})}function mn(){return mn=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const e=fn.shift();e&&e()},bn=()=>{const e=vn.shift();e&&e()};let hn={};function wn(e){const t=function(e){return{test_name:e.testName,group_name:e.group,subject_id:e.subjectId,exposed_at:Ae(),subject_type:e.subjectType,platform:A.platform}}(e);hn[e.testName]=hn[e.testName]||0,hn[e.testName]+k>Ae()?lt({metricName:`Event: exposeExperiment ${e.testName} not sent`,data:t}):(hn[e.testName]=Ae(),ot(E,hn),lt({metricName:`Event: exposeExperiment ${e.testName} sent`,data:t}),_t({url:A.exposureEndpoint,data:[t],onError:(t,n)=>{hn[e.testName]=0,ot(E,hn),A.onError(t,n)},isJSON:!0,importance:l.high}))}const yn=e=>{var t,r,i;U(e),z()&&(H.languageCode=(null==(t=navigator)?void 0:t.languages[0])||(null==(r=navigator)?void 0:r.language)||""),te(),(()=>{var e;if(z()&&null!=(e=window)&&e.indexedDB){const e=function(e,t,{blocked:n,upgrade:r,blocking:i,terminated:a}={}){const o=indexedDB.open(e,t),s=Je(o);return r&&o.addEventListener("upgradeneeded",(e=>{r(Je(o.result),e.oldVersion,e.newVersion,Je(o.transaction),e)})),n&&o.addEventListener("blocked",(e=>n(e.oldVersion,e.newVersion,e))),s.then((e=>{a&&e.addEventListener("close",(()=>a())),i&&e.addEventListener("versionchange",(e=>i(e.oldVersion,e.newVersion,e)))})).catch((()=>{})),s}("keyval-store",1,{upgrade(e){e.createObjectStore("keyval")}});rt({idbKeyval:{get:async t=>(await e).get("keyval",t),set:async(t,n)=>(await e).put("keyval",n,t),delete:async t=>(await e).delete("keyval",t),keys:async()=>(await e).getAllKeys("keyval")}})}else rt({idbKeyval:{get:async e=>new Promise((t=>{t(it[e])})),set:async(e,t)=>new Promise((n=>{it[e]=t,n(e)})),delete:async e=>new Promise((()=>{delete it[e]})),keys:async()=>new Promise((e=>{e(Object.keys(it))}))}})})(),lt({metricName:"Initialized Analytics:",data:{deviceId:H.deviceId}}),fn.push((()=>{Pt()})),(async()=>{const e=await at(S);rt({isReady:!0}),gn(),e&&(bn(),se({eventId:e.eventId||oe.eventId,sequenceNumber:e.sequenceNumber||oe.sequenceNumber,sessionId:e.sessionId||oe.sessionId,lastEventTime:e.lastEventTime||oe.lastEventTime,sessionUUID:e.sessionUUID||oe.sessionUUID}),function(e){se(mn({},function(e){const t={};return O.forEach((n=>{e[n]&&(t[n]=e[n])})),t}(e),de()))}(e),Ue({sessionStart:e.sessionStart||oe.sessionStart}),De({ac:e.ac||Ie.ac,af:e.af||Ie.af,ah:e.ah||Ie.ah,al:e.al||Ie.al,am:e.am||Ie.am,ar:e.ar||Ie.ar,as:e.as||Ie.as,pv:e.pv||Ie.pv}),A.trackUserId&&Y({userId:e.userId||H.userId}),pn(),lt({metricName:"Initialized Analytics IndexedDB:",data:e}))})(),async function(){at(E).then((e=>{hn=null!=e?e:{}})).catch((e=>{e instanceof Error&&A.onError(e)}))}(),Z(),z()&&(ln((()=>{se({lastEventTime:Ae()}),st(),Bt()}),"hidden"),ln((()=>{pn()}),"visible")),z()&&(i=()=>{var e,t,n,r;te(),ee({width:null!=(e=null==(t=window)?void 0:t.innerWidth)?e:null,height:null!=(n=null==(r=window)?void 0:r.innerHeight)?n:null})},addEventListener("resize",(()=>{requestAnimationFrame((()=>{i()}))}))),(()=>{if(z())try{const e=n(2);en.markStep=e.markStep,en.markStepOnce=e.markStepOnce,en.incrementUjNavigation=e.incrementUjNavigation,Yt=new e.Perfume({analyticsTracker:e=>{const{data:t,attribution:n,metricName:r,navigatorInformation:i,rating:a}=e,o=I[r],s=(null==n?void 0:n.category)||null;if(!o&&!s)return;const c=(null==i?void 0:i.deviceMemory)||0,u=(null==i?void 0:i.hardwareConcurrency)||0,l=(null==i?void 0:i.isLowEndDevice)||!1,p=(null==i?void 0:i.isLowEndExperience)||!1,v=(null==i?void 0:i.serviceWorkerStatus)||"unsupported",g=Vt({deviceMemory:c,hardwareConcurrency:u,isLowEndDevice:l,isLowEndExperience:p,serviceWorkerStatus:v},Gt),b={is_low_end_device:l,is_low_end_experience:p,page_key:re.pageKey||"",save_data:t.saveData||!1,service_worker:v,is_perf_metric:!0};if("navigationTiming"===r)t&&"number"==typeof t.redirectTime&&Ht({metricName:I.redirectTime.eventName,metricType:d.histogram,tags:b,value:t.redirectTime||0});else if("TTFB"===r)$t(o.eventName,Vt({action:f.measurement,componentType:m.page,duration:t||null,vitalsScore:a||null},g)),Ht({metricName:I.TTFB.eventName,metricType:d.histogram,tags:Vt({},b),value:t}),a&&Ht({metricName:`perf_web_vitals_ttfb_${a}`,metricType:d.count,tags:b,value:1});else if("networkInformation"===r)null!=t&&t.effectiveType&&(Gt=t,$t(o.eventName,{action:f.measurement,componentType:m.page,networkInformationDownlink:t.downlink,networkInformationEffectiveType:t.effectiveType,networkInformationRtt:t.rtt,networkInformationSaveData:t.saveData,navigatorDeviceMemory:c,navigatorHardwareConcurrency:u}));else if("storageEstimate"===r)$t(o.eventName,Vt({action:f.measurement,componentType:m.page},t,g)),Ht({metricName:"perf_storage_estimate_caches",metricType:d.histogram,tags:b,value:t.caches}),Ht({metricName:"perf_storage_estimate_indexed_db",metricType:d.histogram,tags:b,value:t.indexedDB});else if("CLS"===r)$t(o.eventName,Vt({action:f.measurement,componentType:m.page,score:100*t||null,vitalsScore:a||null},g)),a&&Ht({metricName:`perf_web_vitals_cls_${a}`,metricType:d.count,tags:b,value:1});else if("FID"===r){const e=(null==n?void 0:n.performanceEntry)||null,r=parseInt((null==e?void 0:e.processingStart)||"");$t(o.eventName,Vt({action:f.measurement,componentType:m.page,duration:t||null,processingStart:null!=e&&e.processingStart?r:null,startTime:null!=e&&e.startTime?parseInt(e.startTime):null,vitalsScore:a||null},g)),a&&Ht({metricName:`perf_web_vitals_fidVitals_${a}`,metricType:d.count,tags:b,value:1})}else"userJourneyStep"===r?($t("perf_user_journey_step",Vt({action:f.measurement,componentType:m.page,duration:t||null,rating:null!=a?a:null,step_name:(null==n?void 0:n.stepName)||""},g)),Ht({metricName:`user_journey_step.${A.projectName}.${A.platform}.${(null==n?void 0:n.stepName)||""}_vitals_${a}`,metricType:d.count,tags:b,value:1}),Ht({metricName:`user_journey_step.${A.projectName}.${A.platform}.${(null==n?void 0:n.stepName)||""}`,metricType:d.distribution,tags:b,value:t||null})):I[r]&&t&&($t(o.eventName,Vt({action:f.measurement,componentType:m.page,duration:t||null,vitalsScore:a||null},g)),a&&(Ht({metricName:`perf_web_vitals_${Xt(r)}_${a}`,metricType:d.count,tags:b,value:1}),"LCP"===r&&Ht({metricName:`perf_web_vitals_${Xt(r)}`,metricType:d.distribution,tags:b,value:t})))},maxMeasureTime:3e4,steps:A.steps,onMarkStep:Zt})}catch(e){e instanceof Error&&A.onError(e)}})()},Tn=e=>{Y(e),e.userAgent&&Z(),lt({metricName:"Identify:",data:{countryCode:H.countryCode,deviceId:H.deviceId,userId:H.userId}})},kn=({blacklistRegex:e,pageKeyRegex:t,browserHistory:n})=>{Kt({blacklistRegex:e||[],isEnabled:!0}),ae({pageKeyRegex:t}),on({callMarkNTBT:!1}),n.listen((()=>{on()}))},_n=({blacklistRegex:e,pageKeyRegex:t,nextJsRouter:n})=>{Kt({blacklistRegex:e||[],isEnabled:!0}),ae({pageKeyRegex:t}),on({callMarkNTBT:!1}),n.events.on("routeChangeComplete",(()=>{on()}))},Sn=()=>{Y({isOptOut:!0}),ot(S,{})},En=()=>{Y({isOptOut:!1})},xn={Button:{label:"cb_button",uuid:"e921a074-40e6-4371-8700-134d5cd633e6",componentType:m.button}};function On(e,t,n){return{componentName:e,actions:t,data:n}}function jn(){return jn=Object.assign?Object.assign.bind():function(e){for(var t=1;tNn(xn.Button,f.click,e),[f.hover]:e=>Nn(xn.Button,f.hover,e)}}};function Pn(e,t=!1){t?_t({url:A.tracesEndpoint,data:{traces:e},isJSON:!0,onError:A.onError}):yt((()=>{_t({url:A.tracesEndpoint,data:{traces:e},isJSON:!0,onError:A.onError})})),ut({metricName:"Batch Traces",data:e})}function Mn(){return Mn=Object.assign?Object.assign.bind():function(e){for(var t=1;t0}(e)&&(t&&function(e,t){e.forEach((e=>function(e,t){const n=Mn({},e.meta,t.meta),r={start:t.start?Cn(t.start):e.start,duration:t.duration?Cn(t.duration):e.duration};Object.assign(e,t,Mn({meta:n},r))}(e,t)))}(e,t),je.tracesQueue.push(e),wt(Pn)&&(Pn(je.tracesQueue),je.tracesQueue=[]))}function qn(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}function Fn(){return Fn=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(Qn,[n].map(qn));Qn=r}function Jn(e,t){if(!zn())return;const n=$n(e,"start",t);Qn[n]&&(Wn(e,"end",t),Vn(e,t))}function Xn(){zn()&&(performance.clearMarks(),Qn={})}var Gn=n(784);function Zn(){return Zn=Object.assign?Object.assign.bind():function(e){for(var t=1;t{r.current=t}),[t]),(0,Gn.useCallback)((t=>{$t(e,Zn({},r.current,t),n)}),[e,n])}function er(){return er=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const r=er({},t,{action:f.render});$t(e,r,n)}),[])}function nr(){return nr=Object.assign?Object.assign.bind():function(e){for(var t=1;tHn(e,t)),[e,t]),markEndPerf:(0,Gn.useCallback)((n=>Jn(e,nr({},t,n))),[e,t])}};function ir(){return ir=Object.assign?Object.assign.bind():function(e){for(var t=1;t{return null!=(n=t[1])&&""!==n?ir({},e,{[t[0]]:t[1]}):e;var n}),{})}async function or(){return new Promise((e=>{Mt(vt(je.eventsQueue)),Qt(bt(je.metricsQueue),!0),Pn(je.tracesQueue,!0),Ne({eventsQueue:[],metricsQueue:[],tracesQueue:[]}),e()}))}function sr(){return{"X-CB-Device-ID":H.deviceId||"unknown","X-CB-Is-Logged-In":H.userId?"true":"false","X-CB-Pagekey":re.pageKey||"unknown","X-CB-UJS":(e=Se.ujs,void 0===e||0===e.length?"":e.join(",")),"X-CB-Platform":A.platform||"unknown","X-CB-Project-Name":A.projectName||"unknown","X-CB-Session-UUID":oe.sessionUUID||"unknown","X-CB-Version-Name":A.version?String(A.version):"unknown"};var e}})(),r})()}));',t.type="text/javascript",document.head.appendChild(t),S(),document.head.removeChild(t),e()}catch{console.error("Failed to execute inlined telemetry script"),t()}}),S=()=>{if("undefined"!=typeof window){let e=E.config.get().deviceId??crypto?.randomUUID()??"";if(window.ClientAnalytics){let{init:t,identify:n,PlatformName:r}=window.ClientAnalytics;t({isProd:!0,amplitudeApiKey:"c66737ad47ec354ced777935b0af822e",platform:r.web,projectName:"base_account_sdk",showDebugLogging:!1,version:"1.0.0",apiEndpoint:"https://cca-lite.coinbase.com"}),n({deviceId:e}),E.config.set({deviceId:e})}}},C=[{inputs:[],stateMutability:"nonpayable",type:"constructor"},{inputs:[{name:"owner",type:"bytes"}],name:"AlreadyOwner",type:"error"},{inputs:[],name:"Initialized",type:"error"},{inputs:[{name:"owner",type:"bytes"}],name:"InvalidEthereumAddressOwner",type:"error"},{inputs:[{name:"key",type:"uint256"}],name:"InvalidNonceKey",type:"error"},{inputs:[{name:"owner",type:"bytes"}],name:"InvalidOwnerBytesLength",type:"error"},{inputs:[],name:"LastOwner",type:"error"},{inputs:[{name:"index",type:"uint256"}],name:"NoOwnerAtIndex",type:"error"},{inputs:[{name:"ownersRemaining",type:"uint256"}],name:"NotLastOwner",type:"error"},{inputs:[{name:"selector",type:"bytes4"}],name:"SelectorNotAllowed",type:"error"},{inputs:[],name:"Unauthorized",type:"error"},{inputs:[],name:"UnauthorizedCallContext",type:"error"},{inputs:[],name:"UpgradeFailed",type:"error"},{inputs:[{name:"index",type:"uint256"},{name:"expectedOwner",type:"bytes"},{name:"actualOwner",type:"bytes"}],name:"WrongOwnerAtIndex",type:"error"},{anonymous:!1,inputs:[{indexed:!0,name:"index",type:"uint256"},{indexed:!1,name:"owner",type:"bytes"}],name:"AddOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"index",type:"uint256"},{indexed:!1,name:"owner",type:"bytes"}],name:"RemoveOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"implementation",type:"address"}],name:"Upgraded",type:"event"},{stateMutability:"payable",type:"fallback"},{inputs:[],name:"REPLAYABLE_NONCE_KEY",outputs:[{name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"owner",type:"address"}],name:"addOwnerAddress",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"x",type:"bytes32"},{name:"y",type:"bytes32"}],name:"addOwnerPublicKey",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"functionSelector",type:"bytes4"}],name:"canSkipChainIdValidation",outputs:[{name:"",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[],name:"domainSeparator",outputs:[{name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"eip712Domain",outputs:[{name:"fields",type:"bytes1"},{name:"name",type:"string"},{name:"version",type:"string"},{name:"chainId",type:"uint256"},{name:"verifyingContract",type:"address"},{name:"salt",type:"bytes32"},{name:"extensions",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"entryPoint",outputs:[{name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{name:"target",type:"address"},{name:"value",type:"uint256"},{name:"data",type:"bytes"}],name:"execute",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{components:[{name:"target",type:"address"},{name:"value",type:"uint256"},{name:"data",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"executeBatch",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{name:"calls",type:"bytes[]"}],name:"executeWithoutChainIdValidation",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{components:[{name:"sender",type:"address"},{name:"nonce",type:"uint256"},{name:"initCode",type:"bytes"},{name:"callData",type:"bytes"},{name:"callGasLimit",type:"uint256"},{name:"verificationGasLimit",type:"uint256"},{name:"preVerificationGas",type:"uint256"},{name:"maxFeePerGas",type:"uint256"},{name:"maxPriorityFeePerGas",type:"uint256"},{name:"paymasterAndData",type:"bytes"},{name:"signature",type:"bytes"}],name:"userOp",type:"tuple"}],name:"getUserOpHashWithoutChainId",outputs:[{name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"implementation",outputs:[{name:"$",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{name:"owners",type:"bytes[]"}],name:"initialize",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{name:"account",type:"address"}],name:"isOwnerAddress",outputs:[{name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{name:"account",type:"bytes"}],name:"isOwnerBytes",outputs:[{name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{name:"x",type:"bytes32"},{name:"y",type:"bytes32"}],name:"isOwnerPublicKey",outputs:[{name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{name:"hash",type:"bytes32"},{name:"signature",type:"bytes"}],name:"isValidSignature",outputs:[{name:"result",type:"bytes4"}],stateMutability:"view",type:"function"},{inputs:[],name:"nextOwnerIndex",outputs:[{name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"index",type:"uint256"}],name:"ownerAtIndex",outputs:[{name:"",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[],name:"ownerCount",outputs:[{name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"proxiableUUID",outputs:[{name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{name:"index",type:"uint256"},{name:"owner",type:"bytes"}],name:"removeLastOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"index",type:"uint256"},{name:"owner",type:"bytes"}],name:"removeOwnerAtIndex",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"removedOwnersCount",outputs:[{name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"hash",type:"bytes32"}],name:"replaySafeHash",outputs:[{name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{name:"newImplementation",type:"address"},{name:"data",type:"bytes"}],name:"upgradeToAndCall",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{components:[{name:"sender",type:"address"},{name:"nonce",type:"uint256"},{name:"initCode",type:"bytes"},{name:"callData",type:"bytes"},{name:"callGasLimit",type:"uint256"},{name:"verificationGasLimit",type:"uint256"},{name:"preVerificationGas",type:"uint256"},{name:"maxFeePerGas",type:"uint256"},{name:"maxPriorityFeePerGas",type:"uint256"},{name:"paymasterAndData",type:"bytes"},{name:"signature",type:"bytes"}],name:"userOp",type:"tuple"},{name:"userOpHash",type:"bytes32"},{name:"missingAccountFunds",type:"uint256"}],name:"validateUserOp",outputs:[{name:"validationData",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{stateMutability:"payable",type:"receive"}],P=[{inputs:[{name:"implementation_",type:"address"}],stateMutability:"payable",type:"constructor"},{inputs:[],name:"OwnerRequired",type:"error"},{inputs:[{name:"owners",type:"bytes[]"},{name:"nonce",type:"uint256"}],name:"createAccount",outputs:[{name:"account",type:"address"}],stateMutability:"payable",type:"function"},{inputs:[{name:"owners",type:"bytes[]"},{name:"nonce",type:"uint256"}],name:"getAddress",outputs:[{name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"implementation",outputs:[{name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"initCodeHash",outputs:[{name:"",type:"bytes32"}],stateMutability:"view",type:"function"}],O={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901,unsupportedChain:4902}},I={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."},4902:{standard:"EIP-3085",message:"Unrecognized chain ID."}},T="Unspecified error message.";function B(e,t=T){if(e&&Number.isInteger(e)){let t=e.toString();if(_(I,t))return I[t].message;if(e>=-32099&&e<=-32e3)return"Unspecified server error."}return t}function U(e){return e&&"object"==typeof e&&!Array.isArray(e)?Object.assign({},e):e}function _(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function j(e,t){return"object"==typeof e&&null!==e&&t in e&&"string"==typeof e[t]}let N={rpc:{parse:e=>R(O.rpc.parse,e),invalidRequest:e=>R(O.rpc.invalidRequest,e),invalidParams:e=>R(O.rpc.invalidParams,e),methodNotFound:e=>R(O.rpc.methodNotFound,e),internal:e=>R(O.rpc.internal,e),server:e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw Error("Ethereum RPC Server errors must provide single object argument.");let{code:t}=e;if(!Number.isInteger(t)||t>-32005||t<-32099)throw Error('"code" must be an integer such that: -32099 <= code <= -32005');return R(t,e)},invalidInput:e=>R(O.rpc.invalidInput,e),resourceNotFound:e=>R(O.rpc.resourceNotFound,e),resourceUnavailable:e=>R(O.rpc.resourceUnavailable,e),transactionRejected:e=>R(O.rpc.transactionRejected,e),methodNotSupported:e=>R(O.rpc.methodNotSupported,e),limitExceeded:e=>R(O.rpc.limitExceeded,e)},provider:{userRejectedRequest:e=>D(O.provider.userRejectedRequest,e),unauthorized:e=>D(O.provider.unauthorized,e),unsupportedMethod:e=>D(O.provider.unsupportedMethod,e),disconnected:e=>D(O.provider.disconnected,e),chainDisconnected:e=>D(O.provider.chainDisconnected,e),unsupportedChain:e=>D(O.provider.unsupportedChain,e),custom:e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw Error("Ethereum Provider custom errors must provide single object argument.");let{code:t,message:n,data:r}=e;if(!n||"string"!=typeof n)throw Error('"message" must be a nonempty string');return new L(t,n,r)}}};function R(e,t){let[n,r]=F(t);return new M(e,n||B(e),r)}function D(e,t){let[n,r]=F(t);return new L(e,n||B(e),r)}function F(e){if(e){if("string"==typeof e)return[e];if("object"==typeof e&&!Array.isArray(e)){let{message:t,data:n}=e;if(t&&"string"!=typeof t)throw Error("Must specify string message.");return[t||void 0,n]}}return[]}class M extends Error{code;data;constructor(e,t,n){if(!Number.isInteger(e))throw Error('"code" must be an integer.');if(!t||"string"!=typeof t)throw Error('"message" must be a nonempty string.');super(t),this.code=e,void 0!==n&&(this.data=n)}}class L extends M{constructor(e,t,n){if(!function(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}(e))throw Error('"code" must be an integer such that: 1000 <= code <= 4999');super(e,t,n)}}function G(e){return"object"==typeof e&&null!==e&&"code"in e&&"data"in e&&-32090===e.code&&"object"==typeof e.data&&null!==e.data&&"type"in e.data&&"INSUFFICIENT_FUNDS"===e.data.type}function q(e){return"object"==typeof e&&null!==e&&"details"in e}function H(e,t,n){if(null==e)throw t??N.rpc.invalidParams({message:n??"value must be present",data:e})}function z(e,t){if(!Array.isArray(e))throw N.rpc.invalidParams({message:t??"value must be an array",data:e})}let K=`Base Account SDK requires the Cross-Origin-Opener-Policy header to not be set to 'same-origin'. This is to ensure that the SDK can communicate with the Base Account app. + +Please see https://docs.base.org/smart-wallet/quickstart#cross-origin-opener-policy for more information.`,{checkCrossOriginOpenerPolicy:V,getCrossOriginOpenerPolicy:Z}=(()=>{let e;return{getCrossOriginOpenerPolicy:()=>void 0===e?"undefined":e,checkCrossOriginOpenerPolicy:async()=>{if("undefined"==typeof window){e="non-browser-env";return}try{let t=`${window.location.origin}${window.location.pathname}`,n=await fetch(t,{method:"HEAD"});if(!n.ok)throw Error(`HTTP error! status: ${n.status}`);e=n.headers.get("Cross-Origin-Opener-Policy")??"null","same-origin"===e&&console.error(K)}catch(t){console.error("Error checking Cross-Origin-Opener-Policy:",t.message),e="error"}}}})();function W(e){if("function"!=typeof e)throw Error("toAccount is not a function")}var J=n(81646),Y=n(42068),Q=n(75247);function X(e,t,n){"undefined"!=typeof window&&window.ClientAnalytics&&window.ClientAnalytics?.logEvent(e,{...t,sdkVersion:c,sdkName:o,appName:E.config.get().metadata?.appName??"",appOrigin:window.location.origin},n)}(function(e){e.unknown="unknown",e.banner="banner",e.button="button",e.card="card",e.chart="chart",e.content_script="content_script",e.dropdown="dropdown",e.link="link",e.page="page",e.modal="modal",e.table="table",e.search_bar="search_bar",e.service_worker="service_worker",e.text="text",e.text_input="text_input",e.tray="tray",e.checkbox="checkbox",e.icon="icon"})(eo||(eo={})),function(e){e.unknown="unknown",e.blur="blur",e.click="click",e.change="change",e.dismiss="dismiss",e.focus="focus",e.hover="hover",e.select="select",e.measurement="measurement",e.move="move",e.process="process",e.render="render",e.scroll="scroll",e.view="view",e.search="search",e.keyPress="keyPress",e.error="error"}(ec||(ec={})),function(e){e.low="low",e.high="high"}(eu||(eu={}));let $=()=>{X("communicator.popup_setup.started",{action:ec.unknown,componentType:eo.unknown},eu.high)},ee=()=>{X("communicator.popup_setup.completed",{action:ec.unknown,componentType:eo.unknown},eu.high)},et=()=>{X("communicator.popup_unload.received",{action:ec.unknown,componentType:eo.unknown},eu.high)},en=({dialogContext:e})=>{X(`dialog.${e}.shown`,{action:ec.render,componentType:eo.modal,dialogContext:e},eu.high)},er=({dialogContext:e})=>{X(`dialog.${e}.dismissed`,{action:ec.dismiss,componentType:eo.modal,dialogContext:e},eu.high)},ea=({dialogContext:e,dialogAction:t})=>{X(`dialog.${e}.action_clicked`,{action:ec.click,componentType:eo.button,dialogContext:e,dialogAction:t},eu.high)},ei=` +@font-face { + font-family: "BaseSans-Regular"; + src: url("data:font/woff2;charset=utf-8;base64,d09GMgABAAAAAJigAA8AAAACCywAAJg8AAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP0ZGVE0cGoIuG4L7BhzCdAZgAJIGEQgKg+k0gv4NC4p0AAE2AiQDlWQEIAWGfgeublsIz5EGVeP2TiXfSAJ0G0LBr7Zlqf6pcAA3dwBbquuITJr6o7y2YrpNHoSyAwBKe/rZ//////+/IlmMMf8PuQcEUUitMtva1oSQhGamQkxJxpSLWVScqgQ1RW16VovNJTZ2uagkVSeuNje11QubnvZpYVB7yUGi4thNqJYBdoegR2V9jiA4dEhCOgf3Va7muEqhcRKz0dDNOVV47+hxPO9qkzFCUg5glpCZxKbOGFxehX5nYwGEBZOQwyRFIY5oljSrLwkSIj35dugPRJKk8G3GwUgw06hpknM0qqcUdO/UkzLvviWielabhCp59zPCaOnnqLtK3qXfP4Jz+vAum7Q0/NuZGXK9lUJKTpCEJ7ENfKrSzrLJy8uqLLgUD5sssqscpk8OS7HhGv36H+Ct59wJukpOmwpgFOqL6vCNd0ISNjq/nA5E/OXNVV0dR7EKTAKiB1ZvW+tSlyr7EWdJ3qxDtA8codE8WQY4xkT9EJF26FGP+iQKnwv66klyovCkLwlr8Lxu3nv/5/MNMUKMiAhhDtdkGsM0RAwRI8QYaRhCUNgOUAO4Bi0u3DhL0aZoKaLFsXHublwTFwWef9oP2rlv3sxftRCxRCOKSDVvItZINGlFPFkmbqay38SW9hmQLI2pME5qCPQ47vfu8GC3f2SvxM2MUAmZO8ThjH049p2ZcUbGnTPWOHudo8vMLNEQRUvt3y9qA6U5Uu9ZONvHHhBR/BdN1Kcsoz6KD7j59iAmJA4eESNxvpq3Y6fp1ru163hU2GRzm8rmg0BhMJKgMIaf9nO3qg2ztI6m8ncflWgaGnQInYUqlufvbIecf9zg3KdoiqIpiqLnHzctBAhpSGNI+CSBCoxSmdVel2WMzJgqpdvlRLu9sTnXnnhOLGfKTLCJOTM9UWa8ezmfeyz//739L9vet2xVfdv8v/dtfXvfXldd46q+pW+rqhpVVXVV1biGGqPGGGOMMSIiRkSEOCIiIiIiIiKOIyJEHBHHETH/+Nz8/5kozOTkkPZ9M9uZRYC0pVwIQS5XK0nOJvA8lOVX3YrZypBnvvvmw25iURRFUTRNURRFURRFURRFURRF0TRNUzRN0TRN0/zRttoUsFC40OU9euRGFjGNjc8DAIWhNhWIqEFFnL7nFu2CjlFaJxxJRqf6Ung+Jvp73GVuoRtcHv8zeSKBU33dLOlWLJ0kBS4NEvIIaJvcM3ZuaDO0PkAHB26nUXSKoiiKorCiM7PySCWqIBxaeL2g/EBoVNGFPYv0QhLD6BUFa7FVDM8hh4gg8ggWk0GkW3K9iQBYnQnPTdjg3A60rt4SpU4u7oiFDsrYvgxqdHDejpIzYZgbzk8QuuLh/8fU3Bf+KRCpqkoCWRYOgAZ6Z5rQmDGR2/bhWlmYKohLc8ntExu5JXwnk4LxI3Dc4OHi4/9eZ9m+b3l93mMfUbzJKYRFQ1QlXco0TebrSbL0JXsjyd5bw4HXPtI6YPvIcDe3DiFVQLb3iLxBgC4dNk2KLk2ZpkxREncp6io8fL/sm+2zzdT+IY9D0m6/Y4Tb+s6iqZrfMxvuf9tUfXJvk9JjSEMeYnYhCoOwOIYhfWJUUa2kkNlJpML5EP/eVKu0P5sQZjyxnCmOds/xprjWpqAZcY3TaO585D3x+jeeuj+aGBIYUWAPxDGOwjgjW4Pf//+GJyFLEJQZZ5xG63XOmMhaQ53VznlFa3y22daGl256F+cXhBeFxoYXXhZfePD8O32lcfRutrIm2gQ7oUjxl7L8lWnl5GWsjrVZocNaAAtYi4twUQmBxeWB71Q+jf0X4QkWtlmSCs9F9QVYKjgMPC1YEQfHiQ1IA75IGACGQSXDpvfmW2GhW4TDy9KXWhTKEVQViiAk0uAR7iVCIrxEwlP9Tf+zRMPFdQxv5oIEg///pmZK8yodlcqgE4BywtDq/vc9azWnlY7kGdlbOg4NZKEs8O+WPP07CTSbOoxcSiiOX6QEN+t/J+H/fye5TqG9dlWtqrVWRESMyIsRI0bEWhVH3///6xjuE3wV5isP2bQlhMJa/PCAB7e9XrJlnx4vRqoCxJEeHtsI0x9/s5owdGxp17TXIikE8RSCxh6y+31+b1Pbj1sa9nZsapXA6RS3w2leokH/w4wAP/6mRgHw09uiJICffvQeEZQY/BH8E+WJYYuQkGD11BMhJcNy5oJw5Yrlxg3hzh3LQxgiXDhWhAjEGGOw5BSISJFYUWIQsWKx4oxHJEjAmiARoaHBmqgMMc8ClDkxSGKjw2RK5iCZm1JsyrIcyYqswGZl9iDZmxNoTuYrkm/pRNNFvZHyqUC0gupnpCx1EFOHqhHBggLBgJnAPGAJFElsNCDYJGVStElG0cRmItSr1aA7AqYxnAnd7KY4NcTHPZpvggwLTE5jQFCdzRz7ZK4J0n+yOBxfPLubEYQhClMafQx9v+JB6UbImj03AQYbTS6OWrJUJhSP0p/2es1yt0Omr7Egj5366fr4ua6v3dbt9Ruc/3R947/ZvnkHjg3y7lUgoL2UBP/MNpUuiyQu8YoquufZv6iCKqyOV+sY2sKGZqwbj8bn9uvFkxPI5wJN4YqTdR3cr39S/T4cB2JUjhcpltUvgRzIldzOJ3mQJ8XXdymUZumXYxErv47qa0tRnWmroa07s59NsWk3Q2f+HEC/bJfPh/PLFdHXxHmv5nfeueJkzg3Zs+zvMTCTf967JdTaNjTKjk5xsRvd5QGPed4r3vZnH/nrwvoTeZY4lfsvixW3mtfjU+A83xeuevacM9d5qon6fOTg/79PrhPLMWMcwa3bv3J36RZlxnBgAJ2KMoyFYTREKn+ZKsvGlEcUkroTk15wKDTCoMoIwHgRFQNDXIa8HgfEacoFAzxuOQ7CC3jkglmPV3om8ky0iIPACWPlXBxA16FBIDBeeJaRPVKUYhqoHSvO1VEgVUajSwqlmlIalK25HF6e7le5QsHuVNO9EEUGvScieDTMCFZkT4wSprN3PWQynglxJhmiQBMhZVkvQGCuhy3sGznDAIAvIckysxSNLSamjH8rL/iQ6kCmCWULlOP5La5Cs7pTIL3W4dKITAHf4EO4q5DGYsYTJxAmKicRJgvAnGZ4X3BH3jdqsaKPhrAlcd9II/pGQ57oVzQUSmFQLm+lopVwjzel0YxGq1ZiNdKcpfuGqsZq1tfw2zUtj7I82jLYr2C4PWYaWZ7sU0shbvISKvr5PPYncRCxIBcTsIcjEmiZi+j6+xZjUG3QSJJkOZ0oBjriBHZXeDFRTOILE8ls/Z1QmBmC1XFrmI7FjqdMACayJ1Eg7HQJdDV0dWgN4VgRHHE5ABPlwkwJvi3SNGU/lasiDqPyamkvpWzzBjsBryYXJNXRm2tksf66FHEGdBmprXMO/1yFsdTx4ATRRPEkkcqIE5HnoBB2PKcIq8ZzlSN8HCKVJBHWJzP1NxSViSkoDNOJZpubo9BJtAXOIPRT0X9kVclq8tUZa+iMJY1nT2BPZE5i7yWMRBxEHkXREryFuA1pTeFkz16JKs2eU2cambRkOYZ51DBJkZdkdOBO1AQu0xoxEcLlwSSBqtBzWJOQp2j/YPUah4IrAyPcIIRHuRyjYm79IrehQq6t9gjOo6A5WAlDn6G/Slwapo9gn6z1M9KX/NyrefcT219m/6T9N1+VuBqwus3JnHV46zL3MhVy1okYqZS3Xcm8i7xvbUEzwFWV2XeQ5F6iBJcLUUfaS0gcx2wRFtPjKKVzUzgM0nCXr5JMDXgZL8jbNiPYm2wRUCU4+QQoQ91iwHod68TgjVRIY/cPoxKynq70EPJKDlY+WP8/iJENKyo2DdZO0RFCRWl8qYaUyVu2HuXo8nyFlO7UrXuhigi9UUMhCoNpZKOmo7sejsnhitMeFwkw4jbF6eKNCUQeE6I3hF/ZyCJFXdBcy2HclbkniyIr5XDCacLlCrDJrYNzhmcQdHmIRFtGVnnvci45/f5axEx9ZsTly7CRjYpavpZsBLBW4871xpXwuoQwsnGRf67JdGbERWSYIk+XT4QhBZrEundut/S4Oy7OUn2eBVcfMACKZwtZ7vfPkikU8liT8fgJ5pPMqQKnI5sNt3bV9WYXwYCRCmnsJx3RJ0l+6/QvNvRMxawtzC4Ve/pNF9wma6m7xmLp3uXhEaPZS1FUrC1TzWgWUWglgRYfAJF3xGHMqRcDDrmxOBMSnoPnyRB33z8pwsi4oobUmtOoPmfI6dsqlqf6FaTnHQrVMCiFey0ybwY8BcJphGVwiQEUb5+AImiIJCpVoEz+stnFThmZ5E4N86YgEtlZrpMAyaHS6KGQgEAbv7A3kKrhuJCjbuekZkO95mq0dxThTHgj4YjVXu1K1PWIIag9EYMgwH0ZijiLLKJU4NcXx1Mn0CaKJlGNAIcDCHic5Z4StDNOHDZbv7+bRDOSrhiJiqUFgdtxi51Q7pTJTgfRP3jnYS57EIs1CW8ysRQSOk7m7p9jnJzgFFd83PHxxGcIp4ThMwUXE6dU7Um6wBbQywdbvtjyw5Y/tgKwFYjFERNm1a5XNt/KwddMfBXgEfF6P19vBIZYb/EKsmGvtlsHs+XFXT+ugvmLV07hpJyoQKWFFlnspNPOvvt2rlm7l9m0J0S8iAXrI96AQ2JiYmJiYmLiEdmal3VYUVKSJGl/JWzgCM7bBzojlGUlYKF0vU265E+2EO5klB3PUFBWMSOTWolpoaFoor5MkPQ+o6HQ6Cn1jcK8p1zf/YRhp1TgHVfurATSOreWKNSiPbLa8byeBD23wXWgdW5KdhHedfE2EVhUMJNDKaHcdLor9Imh3DvtcFL4Y17E00B5ZStaY9uaXDZpgKZvEZQWWXJKPeq0IL6r24RivS9KJYVHJYSovb2ndPFvOUyxNC5yeXqLW8iJswKBh0zx3z52tby6PyMqltMpj0zteLz4NqK7DmHRrSN3WD3G46yxswltmY2NwFA2nSDKgZ0E5DEBoia2rObDAAy4OTgcRC0G2k3EcdVx6veK9H6BhqHA7y3odv5qPTAUKppb7vWymulmK8NNz9UZ5jiQJkwI7CAgGWfJEzgo9yDmmkgT4PNBHqF2vDigI4wa1Xv17/28Vbquyn7/PLcDQ2HYy7B08iq8MdA4eUgQlpf5zvZaqBf15lCE0M6cNvZpEiAZ2F45nOBqF+dUbKHUUI6ne4MAYbiTVO3lqVfKb1ayIi5FXpcDlGlyjhzkw/MZmPmoh5QQiZDYcpOgDpXi/1NnChbIDPU5wLQ8scKEcyYn50pPz42BgbtUaTxkyOAjWzZfOXL4yZXLX74iAWabrb8yZQYwMxtoo40GOeywwYlIhCGZk0WGZllWGJNV+Z4i1dkqNtuzgyY7s0tSbuYmbe7mgcmlLKUppSoVfU2oCabWxNIxlKGMMiujZsip3MpVVPmVr7gKa5aSKq1SpTW/Fiir8qowv6qqihnd6DqwsPbVo8IQKQ1qjbIrwYlZoLkRJG+6WZugMZshWKeMxCutGYpJve3Mw28xpYiLzi/bdEFwn1ZxmiUMnnpvH8aVtrQW0e6ZDVGIx3ato8cXg9yY3yVwTMWfoZlZasK15xoRJu19atJdVE3aaQooW7py90yx2b0cRnPzQLBQ9HYIGRn2cTuDUU7mqC7QMta7GWFHwDrFdMaTcOwsxz9wFp3hDa95kR4xMURdxCne5kuXVot3fK/AUBFTYyTNwCHho0m3WELrjocfdeK8R76XC8sKb0xtLZNbrPCKR+W4yRFYr8cdWSVxbPijn5fJ7dmOHZjFHoTyqEnGo/iRX/s9m7fejl9nco980fKEe9ZO25rQGIkA8mLmLDUilOb3hTSBN5ZhC0Ppw8fWDJvl6bLWs0om0vNerrzWNo7vz22ZHyX5BJRxLb61CbxsxLC/f5mvCpm9CxpgTGm0mMU2ZFnhZmZoe6P4i3wiNZ1xall2cbaXQ86Jfv1ui0W+Kk5xF7+1CfzDjUdlRyiYgjb1nopTbRc0MOZlydBSGxnHwAhJUwDznPM7XDt5mXHPiztGft91q4ufPGYV8ntnHuOxMKEus9qnCt4NAkC+2EOcjJKkrO8V9zTVQBEfQC4jeS/RQnV12bAEfNhtdUrQOHvFgfxCMpQbaavfRzKKxDFTDhQebuPIyrNyoFCxIqVGLXIygcMhw8uTcy82JZhpiA9XPjuXa+2v0tRpHrJVh8XK5SMI2G7k5DKT7ct2NPJACAlHBetq03f4yQjYWor/KH89NyFNy6aAZfcCPXd/KIF6JBZmc5T156XLzGXJ6MrrokXOWYTZ8OxwfvkjfV6609pkows0w3++aaoWq81hGOyO+h91VBj9Q4+GbwdWiL4yGuSCYyG/BJvVEvDPNPPUi95/VtmyVu0ZmtjUTqqtrR1eiucax2SM5Dze5puIrOflYNPzPKDLhEOv3R+QCE6s+kYtThtQN9QWNv4pwg7GeX2ZlZuQjUN0+tJo0EhUQYT74ymt1oWww35CO+AP+pL6ZgkTZ3Wao8595eNLZjMLXf7QO+Lga81u4TXJUfseAUH/HUsQlPWkQjsn53QV0IokfPU5gcVDN5ey+5t/vund2zM6bridM6h2XdYc2rWHOxatInPllyuGRjh9IZYZl58tA2aPqPK1Vr4jdOa288nZZpQ7JVr4H9lus4hh34OJSGzsgMM+54OzceTY8RNo+nDGutrGPteGPgeE/1zbksih71QDck2qru1lzrsO3fCRj3u9a7IvUWQeivblx00HrgguaQaOhFNG90eTaTPiE1hZsmZF3DoqkHkvm96X74dPYlNQzL1amVzbtptuuJlbeG4gNT2/YNDl+QW7XZ5fkHRZPkP5+kcReN5h0kWyvX/e6p5gc8+NRL07spHCH+2Qx+WzOq7LbDniVvfiXkpoeJQHO8Z8SBxht2BXAhj2Jzm3n1Im7V6xn69XYgk4QIRv5rxFPj8O0co68Vyf//bCf8Fdw3aZ8cS8HAX5tR4zee2G0yXLKziJFiw3a1ETRLImUkmXNb/o1KSR2LTx660Fb7pEx70N2SQQlMaVbODmgGOQwr/lRE1Naqc4ZRbi6VjvlJin37FoOqdevRtc19fpT1/qnqn9a7tHFY9UqzpDo4lLkicwxZgdbr9cQCcL1RYpOzfhViLum2j+Hnr7rNbUcezQpcv7btFZt8+vKrMfwG8XH9DENOGzsdKbtETTVWkl6BjpCUxSzIwsRFY+FBM7HQcNJx2XKLdBHj1eA2j9GG2sFk4fnkLQJKZdoRCW0eXQY6bw6Be3zWpH2S6bfVUHeKfKLuRdIdxWSx49aXgT8KHhi8rvIQzms9Wgl3JkmrVAPwXDALqp6NfGsA66abA76rEfTJLcIyD2OFRj6qpzORp7s0x9OhT37VXoWOfVutBNcpUfkaoEq8FVJ1bjYKkZTRvzQ4rFHwcVj707OBPwdhdXInSbuJNg2oJsG3U7kO2ibo9sh5H7jLb0UDpluIKgmT4x+uSJAOBQmWiNQQRgp2FnNM+socVkyhyrmnpmqXIthgZ8WW3FNxaLAtcGHLOJ0KEdPfjPSVqMTgKwC5BtUnQpWD2btmzZtGnRIsWirkXLJP2yfHL8AkYsiAL6FAAAACwAgAmAGgBkAAAQFAQAwAwgCOAAAJDmvbEQSgEE221AWyelstEKZQgqgS17Ej9CG6DoT/ltRouXPH2bsuOGbsfK9G09wEGh4y1CwT5bvHuo4CIDCMJTw/imZd1CkGbc0X+fJB8VfwstEHU8nbbw/prowT8+QDElmOTENPMhPIH9OQwAY8EO+eTC1Th7grqzUhB/I1P+/I3cdwFOBijV1cHNzpc6XwlnuwudrXY2QLDwulnjduhXzAMbOs1tlEOFU1xSlYtN8eoOA+w8CNgeIvGjEgKjpnY+hnqUGC5KXJEuF23bJdl3IFBvylAZLiNltIyViTJZpsq0zCt1ZKeNV9uDOlFOm+lumh2D4PCme846TPbB1MXXp3yFqIH4JP8RF11Bj434iCvhEOiRndy7bVvxImrlRTeGPuoGbPiNuBXvhXvfwIzyVM/q0ZzssNlH5Vcqb+SwNJ2pDLqSJ5+Hc/lXeG4XoQ7qsBXatFHt2dGdHRtzHAKuLkEVuXdjU/sV4SF9YE4eRKDEp+LMDkVJ4f1PoJ05MGcPtuP3oN9kGHGc2FGjN9Wg2Mhtt2HbxjUPPOE2DFtBYFdh27IrOa97qTg45+w4N67GmJ2NPCR+O0x/mXMr0ZNELM3b1MpG1Fl31zhRqA4lMITwfGI9ewFaNvwzZrtnHbH8exZX+Lvw9NW3LWYvzO2H9S5cCgamDlK9FTIzok2VzzHx/kQbCYZI0Mr3sN4rIdGlYuJTlb8ScvMb59MEnj7zfC6chza9q1d/Hvky/H30h3/umz/OpVwXd+FEPVKVRRliMamNSkN9LpaDbA2WRweqpS6Yy9p0D8ORZ/l/4NsJ40YQ8nSWzTI8aDIqSy659mEfsseNVcQrJJwGjBxsL0R3XUw1ejDUQYu83qwQRIIkDC4y0IGUaE8HhEIkhYM8EQRFTlPBbx+BWhn+tSyXCpUNlx+gquaWmKKCHh7suwwjoEiFYNYLUCDaN7J7C6vmUgFUnIqg4gvR349ExWJcCTbVyzSJJCiVWFoiU3CsDfPyxG/ho23WoejWZMFlH14J+MbuKdOgjMrPh+CrCtNwxfZkUXRnqkyp2wzVszCYMSfzZIud10vRzY1qXpiOvBgHn3NT64jZwVZ5kySmxqOgbzXvdVjvs+9D9aFHrHYun+nXgMm0OvpteB/2jJaVtkzUmKTw870LUPiqSwL0d1/xEAke1Q06jlw3zEYA61w2Ir3G7KQ4JYNugXpEpR2YwArLWQ/wYz8s5CkFI0leRyjairkhOrLH821NEizyjCVWLXXTMg2rPGqNh631pFTjSgMyiWUb0jqr1vurjf5sk4bNHrbHjn2ec8CaY5ac8miK4nxWFz3setysXvs7f/SrxQBdieVDKnqGnjwUOgNpC8+faj7452LYUnbKOQkPjtCu12aD/tW0ZkvOIz0TYz3ObsDK3HBpPoS7iNmi/ri4taWB5TyzXussUmqZYFm1Qqg7anpwGCzUZj0dZcruDQ4JVsGlAEy51TgJQcmj4Ofqr1kE3xzWDpkbLmGoIy7VNk0myZJqQmmhTFRBGL95ptCU7lRXEUePHfRUmJs4Q80q8dJEPGFZc3viyQyl2U7JUVJVoLS4YbPfiAMDeQiEnz1VkZEpI47g7AB5bFN4xoH3Q6JY7VTT5eIiCW0dUXXC1EAa6HOapEqqIaXVsgXLEW0lMNgEhg7WZSLepw1qXp+/G112mm4fEqbzM6q7qtPVtLfH5YrWMLdA8wJ1VJ/Gl8RJNaM0VbbIuCxTbilV1KKHEOizScXw5VxEECO1Ahq9DlxEjwwnI9hKFQQNMSa7l1xGKMryIZn1IsSRazKku35uq48KArOpuFsizFNpYXXzQpJ19VSjyiQUzYTwZk4j6VWW9YnPGhl9QjBXj12TgQ/C0i5j2iqz6Ni9YiLUoFvGVPHmZc8ygVeJvpRtBDhCQdSjgp0H5cMgPI2v5kSIhBUek11XqFDo4mFsOUigHZHDdfWsbj1mjHds0eTdhqHqvA90JAyFA2h4IdOtFuXCdGjBnBzrhytcHpxG7EPsDGq6ajZKOMgLPwvseVivwsGprWFci0EgWSNXm2D4KZPRGsxfO/qiYWLnUrWQj+1EeAb9l9Yh3vF7Jaoo60gWWsO8XVO1ZWWLqxyKmimiCkSUjt0qKmsk6MeTa+M6LvPikN21Tbur9GYGjxhqRfZ4dPHzoNRF22K37yMi2L5ybdg8LCFAgy9qGrCVgV/d+RouxrozXm+C/kTDSfpKEDRy8rpYeEC1Dnr1KgPZeDLVrjsQ+f3TtIJ0wszCrDYpJu2atbhuyr/+88fyAGJhnCK8tnBpMIkmAxw8tCQ6QWZBlEUhfygkuxi3Nj0NMv5uf8my9FrKiujULNoLEkkpuACFOsdLy0VHmPmwVjJKVMg0hWxXy60qzvgT93/zDASBgCVgtcBgG1jZnHjySL/3ZzfjYxEpJJKwKZn9XSrqMalXd3QKM0aady60NbvEV2VaqBXKCmUFs55Fe0yGh78QlMvhliIGqsuC7PVcFiqeN5opodCSHG31djSKAfni6uKLWywMFItABqchMUzVGFio2Ad6cAjHfTh5OFu4nGSv05+FeRAtSJKBLFOW0opy+kOt2rTr0Kmr6j79rh69+vTn0dO7jWE8JjCJipbnT3+3cBKLackdy7FKrLu7NmNrrataPMh4ZHZiF0/tox256Ts/+Om6v2XyN1yIm5lHWMXOVXkgyicgFJE1YkhIycjN5y0qqCqmEhyR59AWsBQrFavW5hmoA7BDyAHQmX8EzQTjmWFhZWPn4OTiHvYhpgXhhYRFRMXEJSSlpKuMfFk5eQVFJThCj97hJjQKHB1bFDunKhGNT/69RdwlJKiy7icdSERzFqFwoQizItXka1Jy8xoU1fCoRsQ0MqZRUY2OSilRvDqypmQ1bJnSkpGtdkf1i9+6QjcFS9xD0R/06q+o/i3+7w+pS3cvudth65kq91eN1shK0tQs2jPnQajzio9fYFhs3ikFDxTqI4XytRoCkEFMCCzwMwg13CKih/oycDtOgcMxcEzqwb7JaAND0R2sT1PQwgq6gtxl+/IrNLbI8cknFDopKXsILgtvOG+kcfl6LTk2Ja54rWjUqFGpRuUse0rggAr1ehnLRfDMVn0jzkfeD1Th1KJBU9fyyPD1QR8rt+xqJWtzNmh0+iOv4xqK+DDjI/nYJz6tG6f45iR2VWOPV4dxjjruZOTNDbd878dJk1Va2Q25vMYvWOUXKcLTZBWdXWnaWTMZq6t6bLhmsAS339Wo7Z2130MJPb/l3W2TtpN2bwrIHst6ab2cp0kYBRuLZbmBiIjKYDfEMONMyJPUpmBqKLVuhjALsagei2WJpZZZbkW1UmWV1dZYa70NNtpks6222W6HndU+xAGH4giOOeGUM84676LLrsZ13PSdH/w0IclskQdW+RAQqhLqUjJyVa+qfoOGjaZxHlSr1XWda8sYbnSg6FBYRYzWGooyIKVmtInOiCOGHwlngtXMLKxs7BycXNzLRflkKSPitEqURLUIzygCOj1XQragBIvj9frEeBDeD1rDdH4QxAJlV0ENCCP2lpf7BdQf3yys/2ZT8q6dcGL1B8J9l/kA8jK0xzG+YrPE61KZS74wXRyoAtQCGgBNgJZgA70hommwpiGahgKGaRqBGIkYY8tYW8ZpGm/LBE0TbZlkx2SKKXZEfaVVS8xNbfZN1fAQoJ1lhoNGPz/jyItzvCQve8WrXjvjdaBkAQAAgAZ0CNo3LDZLuqXe7RLE8hErrFqpaZXV1lj77lJFStNk6lG2UOtsWb+LDdhok822Vtvs2G6HndUu+/bM73VgnzfsTwccdGj4MOCIpqOOOe6Ek07FGWouibMW581Fl111PW5U3Ixb5jvf+8GPfrpdh8KMRVL3EEUb/uD6es39batbEeYRVrFzzbshyAObeZ2PX0BQKCLfy2P6JeyUslemwzHYL58LlIqmNOl4mLY79XsMmmGjxvOkVtMneU6jBeUle614rNr8GiXSRnViwzUzoxlXzQe+6hDyMPB4HUsdLX7koMeOgv8HQ1SZYHNmFlY2dg5OLu5hH8Jd0MZCwjmiu2hGDHEJSanhNGYZzWXl5BUUleAIPXqrPmD9BgwaMlw1HYxCn7Gly93bunW1PtWkTPOBSYdeyGO+4Js/Y8Vcgdc3g0zMAxp/aaFuK8bjtm8J2Yl8vBZKtUgmS/XXpuSHmc4Sh3Qy6tLThb8JIzBnwLC0yxn7xJ1qvy89S0echGytnerg/JiPTcSUpqGwbuNxRkzdcGygjsGu7nFMfL/DENmeLkHp1fynBiH0ynteEoxFXT9I+Vr+B5anb3EBJlGoBIZn0nV3zUtD9IatheS/H5dgdFZWEGyiMvAXCjawqQm1N73m4sVrqbPOevVinyb2eZsb09bZkZlzoutt361x6dOnz4rCezI8zIQNHxzY3u1t6nh48qaDvxdMIP8vJ6J3rUFd4aW3U6uSiOXsZFZ4Nhuac7DT6hMtx/L9LnxCcKmZgcSuLeU8q+JBSq0l8u8kfro7GwBYuk05Y6HhN7TPOsF5nAFRc2sLiWIfOTpRNJsQdqYmwRmnG4HUEUvkLmgnjF2NdbtsygZEX2AmglWeVUQBR+CSuS0PvJUeVIJa90Ku8pkJmHzUUMrG4M17auJ2czdRWGMLxcCLBJIICx5dcMChQ8N7rXTnRvwVj4dewe7Esnx+gWtUFdQfLuxjoT6r5keqifKmEJrFY0N16Aomg6XLMaD9PBy1IhGP8cmxxE6kFKMT8U90oFSHPoXPrMhaI2684f4UD6/jqfNWgiZS6lSfUdS2t0dnH7XBDTWVci2LmYQIIqiABtkywWquj6Hu0VlRv6Yu44ghDjR8Fu841TSWaBg5fmUC3iDEQoxUUoe49WfKcYxkChEYhz5xhw6zwoL7GTHSKVRV3zZtMOUq79yxmfNhOAszMrOsFo/7XR/rNa+thcgfPexJnnnquozk2OZKmdas5POZW/UdvA6oMoaNlrXMad0vW/LWcl2vkC9Sb8ZfCsYRd/mxLUp4qQICWjPJSqkk9Whi3pADZ5Rad3S7OWSTUZuLM39Tzg3dVOBBZDGHPkhuoVdQOZyi5vRKO+a1gFK7X0RQTFbxqiQ7onb0A86RzqgPVUhwrcvyk4wBISNOfIK2bKn4KC9475hNcCxRU4tRxSp+5fzwiBlEtjuxqDn8nN9hP+9MdHtV0zKBn2v7YbL5JvaafwUtKcnIitUrwtoFbrXZE2KnN9Itxs8W9/Uc07Z2/MDjfutJH5kve9dCZYXLXoyegoRZ5nZtVnIpZ7tZwhjjbnE3V2wwPQhyDhwIgTtmBEXlxRnTnDR0yB56ft1jdaYtg34ykR4qjo4FqCNMmjkUJbFiL1Q1dK+PZJSKFpSDx7p4WkhYjLq5S0uKU4ncgXZcEgLETSTAcVEzVXU3hjAolG6dNu0Ol0+65WKwinN7trbxHLdxNEnQeCDpK6eycMoLpT1QTb1patlVYlyRP+WKnbli9nOuuvYcRWIvulGSsZaT1BWPhGYYvgw+myFRcv1KfKSBAhmLk8llXmKeR4d9YIGo2jaIxkw18YrAD0GzvcbK5CHpSCYlqlhmUL7l2VySneUSBHI9PCuTospHSSLtKXer+hiKJOohWaacxc1TfwkksrENmoHAzS1mt+u4ICa+hwJW3XRVXp4h0zKcagHxR10Z38irUa6Br8uZhCdMvqZUGcu9vyEw7n30XQ3DWT73UJsRLMrClf06BSU6xDWYdFOhH8MA3d41bQziQ5Ep04pQtpehdhAd8Y6BTP85SNLDv6Y6/IwjJ15jK4XQ1ODsGRucRNsLmeXdUBQPVC3Hr2MpVXgNiobDPpOkitgn3lwaLkAx0zke6ofyp5INMlU8IGpKfOHtQmhkaruTMC7gcWfpQQwgdGOmSI2rSYAMkdmcDPzCojyQUkhxZH8QXuzxXk/FrUEvtC7PMqahRBKXZIAjPLGiC1K+srkjJY/9SwXdbiw8EccNzYR3ZM64ccyP9WVy6JTCVXycajLWzzMdODwSC3tk/LhBmzWqjZnnsQ1bQvyPvKfZ0ON5UqvDZpjJuW12mUSf61q5CnkspBdpWypdrJYEjKwK3X7ZanYjAaIo4L1UmEgqLv5P8k3GKDkjQ0Fe0jbGbDcvGqs1EEKTB9eTvkT/ZsnpiZ4Izp5YEfh8sjSXotXrE6d2GBF7tbp+e8Vp9wmXzJ4fIy9qk5Cc2NrNM3n7dIGLOrZYs1pnoK6rDLquD6NltTMrqR00iRjsVR6xZ0zyhB6wEYboNuNfXOhESlibm02RZQ+wyyY641qIpyaBMCwMBgIQyKoljZFogNeXyoAcOFIVtbu77mZyjK7kqltvHlx4FpBZ3ikDm60Cphpu6EMf26Ps+N/SYVfpy2DkmEwJx9vttsCQXqk0kk31RX+AC0vY9soc8Dsgp05VC9MzAQfa4SyCeyEeQIDOkCHyL2ZOYQCiQq0kP5iB6xDabQ9c/ZjAW+raaBa06pTAvKyPcU6iEZ+jR2ol+fmQatsfh7BmjO0xXCxYX6CD5F4yH9Dye8RFsEsCPWgvBS92iUd7Q84vm1sSGH1okwRxlPC4pUNJD2bZwEwzwd4dkbhMJaYYIbD9W2EyMxnp8BTZGMq1z7Pbi9bgYF2XaEJjvyYhFKWBxRHZuXSEmZxemyKm2f4sAyStAyKQr67qXutE11TfDvZJq+OzTk3UrQ8rWcLqWQCcIhU21QWXEtazl18N5p7IzkQZNQdSgL2BQELveSwRlOVBvxsHI0bmKPlioCYAiDDxA0jNiKxR43ZYLBEI51wqIiXK5JnevaxKOc5DtEaWbWeWkd7tRX3iSGzMinwUCUZX9+NvfnHgzotYrvykZQjMkbvFEKaiDorBLBhPa429dkDk8sqGTas9e+2IfCgJYe1gjko47PQXI6kmT13UNTv+9cFXiyEC6Y/k9fGZ8y++YYigsbSDkkVtyraImbyL2f0C9tdg71A/jOA/5K6/Z7XVw1bNlKIdcyLKaFZLtnsScr2jm6r8Epa4VgSOvK/tBsCUex7TFGXzDXazqFWbduPoHZM8xvMm/rjllPiRtMYzv1M4mbRyr1Vdk87EjrGkCmq571UZ50RWA+a3RZU0HrXaZSNLsQm5BDF3b9WKVerXfWKRXx7HswZfuIqYDWJ5qw0vLEkPrsthb5DxajQuXeOL2NPEmqQKpfyQSyTDgHcXUw4zvkW+3D6T4CCpPRJIZCOStZ3ze8lrfW+Hb5E8mRbD3FHEfPExn9GNHW1PXlj3/qSvpOk5iL/hgdMbpBYK1hE4VNzUm/qZ3wJw1xqMEVJxxGc4XtIhIfWOX8QQlfBWK7uKXyh7L7nPKxVbzpXsGn1DYW9neWF3Dk4d3aGeowbag+tWTOxtdK9qLY9dCZzjKbIgmNpUhJGRgZRv345AUnFQ03xBWkhD47i+Iu2LbmbhYeVFsTmvm8bi8EQSRoCvt/rxAt9qhrAYYVExcXlJBSlpf7areSI2HKJCUEFAY5P4EdoAA8tbTXHLodtEHDHgs7OA0AaExFMpbLQA9PQELkQS3mSeiji9GrOjRqC9L6BN6fhJ6/FABJu3RmC4DhmEAEK4RmGY3iTaYhabsUWcfjxnpWixSUcdx8rnL+AE9OAfH8yJFoJtNNNmtu7i+vBQipl3S0ZQj3SeYJI/eGyWYqatKtJVpaGCQy6r3MumX1COw1ktFr33B9TELSqLiigpmhIzZ07PnzdJtoIAfuhi1Q3XBqRJquJ0u7R8FOJJZOiIOsMoeksZGIc1cpNhMmpRRvTfnZzcPKq8xtHaAEAEuAAyQQkm7RQ21rLpYOlVc9I8Qb4MrINSAEGiDSCoU1orrVAHQSowYofxI7QBFE+KNhwtMt30BGrHFfqOqekJRsBBoeMRUod9Nnr3UMFRBhCEp4bxJKduUXHPWM1znxpeWnRLQzvqeDqNsPlrogf/+GBLSYFgkhOtWIfY2LWewyEL/EE1M9GicHnubCKIl6k5FcoyQNCZPjjcebPzsXDDRgLfc2VGwCABYoUboD/UkyLfch+z2e3mXjNZUx8l2T7Cal6k9vkVMtO6miH95X9GXFgZ/9oECBUZpHFmJCMbD56jQsqIPk5tpPZdtT8SZayFKCax0UL2SzKb+qUa2OqJUCLUCC1CjzAishC5iGJEKaIcsQSxClEN7gOPgKfAC4gGRBOSdw0kRVD/9qsAUfg94hBiCAsl7SW9N+mcToMKPiutrqb7xgsqqCH/OmYwHm1CZ5hDlO7sUOjr9YiOamWroe/T+jZ2VudCP6tLoV/WS3pVV3dNb4f+FPQXuqGbuqVPd2tfg/5N6N+H/lPov4b+x27vjkkFPDBmAMZswwHGQsNrBIyBY/gIgbHZjJmqqZnJ0wDjqGma+XMWjItgXAHjOhi3wLgLxgMwHoPxDIyXYLwB4715fJ6F8RUYX4XxbRg/hPFzGL+F8WcY/5ydi20E9+4DAAgIMBCgMMEMDDgIkKBAgwELDvyFi5AgQ4EKDRZYYbv9OhxwwoALbnjuve8E8RVwQinokIVH+EX/GBqjIyKiKKlp6RllyVWsVLlshcrVatahzwgqukVr7nscj+KfeBZvoj06hDMyjmyeL6vPiKlRyZrt0dgRo6NUY6A21ldi6LF+pIxd48A4NtLGWQk5Fa3ZPBgPx49OUhfNbuje/sDg0PDI6FduTgobn5icmp6ZnZtfWFxaXlld27IVbWhHHR3oRANdu/dMaz5/J+ffAuaMVqYXD504d+XmylErV69dv/Gsc3PxpZeffeHl1+btd+T6R6bmlhdfy9d+/LP8z+//ktvvEGD3TGxdP4lPsEl6UpiUJvVJdzKeLEIbU5dL7aeMmIpzWdVN2/XTnWlj2p6eTAfT4fRx+jr9nJrRH9rrB4KhcCTa1ByLJ5KpdCabyxeKpXKlWmtpbWuvd3Q2urp7evu6kozh3Ye/LGaIz1vOilb9atDvNLe10XY1xv4OdaTjnGyis13octe62a4We5CqmhVIc9XrnLnbMFatCzmxF3eI00YfVulA4nCWyxB/tyeWvbPabsuretVtnpu6Xxu8GZIKlFFQBf26zV0yMxMc3EHylA49G6K93h5o9vRwFhZIvYiyWYMDmDcM2zxcCUuT9kuqzk2Hw34HhwvOKf0K7Q1SNv0mh0u7eq9qEz5ZzRFh1SV66tkJxamGU489rswd2Jv49DfWCzDRAKyZRW8W6MBu27KbkH/7qaezYDMbBYK3AUttq/OwdWmYGoIaE3hgnIHoMAPGm+m1AFiRZqHweA8SHqFzjNdUlQhWSKmIwZ6ZB5YMr0c6dNspeEgQMdsNsFU1VHcDZTGHHJUx/5A+2TeAQXokjRHS0ezFzJnHAiZ69Q1f9o16MJvFz9h3Q2qi9bYivfmSA5oicO8C9w2oRHd2HpyNMsp2mzCh01OepYCrSul1am2HRpbnHhMF7oWXhafrBv1vXV1EXUgYdzyVz1C3NEBtt108GDTzgH5uqLA4Ka0l37TY2DrNNqPTz+mcvmFow+L32Dl6EYPJplvnqy7KT1XtOoy3CUtr2LJU33oH6eAZ2uRCVmClFwztmy/22GLQF+u39Zu9wcWJfFNp6KaCCDMojpVb291NCEOxTNt87m3P1P1p33gqgG0WD08jYnGChImoo7PrJBaDHDV5pPjWI/LvR6AfK66OZrCs8dQBqLzJfDXbx90Izo3GVMKgAJdgL1a1YqtqLEk36gAobM0X9wyrYmbbME1VaVV/Gt/bBGDmgTX60BP0BJKgBETtly34FrsFVW5x7HmGYKl/30YEGIA1yGBCQ40kMtpotkKEklBQkIoSo5c449hTGc/BBIkcTZTMmc4Unspt4K3GNiFq/ULuoCZqzY7ROuENvXc+WKE93bA61kRiZ6QJ91P0yXA/02PybzFUhKclpt7et82LAAAAAAAAAIIgCEB8NsTlJ51/HEK8INJLgIGGCyEXQ0UjmUE6k3yzzFNpmTXW2awWSVkD6YZwd1Mjva+Ne1GDU2aWfuvHSKPhjM94s+JtPxPoZYBo4yWa5Lqbvunwv05dDCAhlLjGPZ4JiyHTELQsdRAF04CZEJl+yHXoZzDT9eqJiDhw4ZWC/UirmNXZbs9N8hLZ8Hvqz4WIRBsnEfEH6qnnmVpi2oPalC2CJAUBUyBh2KmReMTsUf38xVCjRYiipKalZ5QlV7FS5ZZYpVqN7fao16BJi9NaETUNrV+cJtWvh12MdOH7/dbrvYmE3Qk03AcCTHjSDWysiTW4klQfVuVU3nqkJzDRzOBUSiGWmkM5YtIblVLiZ576vR6c8Tp0BqTINN8BnVmC/6Bst4YSaQ+IpLvmjkf+8cwb7TpCdxPkeFh8REhRoEabfgawEHGYUB4BgUmKZliOh4BDwSIgo2GC0ow+UZ9fIBSJJVInZ5lcoVSpNVqd3mA0mS1Wm4urm7vdw9Ph5e3j6+fl2wwwUzAiRtLsm6x5NL/Wvw1to5EhBen1IFkK0raCtDaQJgYk2SD1FWwVnuBJDI9HlkIwMezSti6IH49kPx71NTmkIP1O9npQAX6DURbPVoHlUmZMwZjWV8WjG6XUpJ9PynqVLnbV/i+yzG5QNzXSDIVZMRZQmqOdHCvlFuMtU0Vsk63s1NrLQZ1fuDiihY+TzglwywMDPfLYCC98NCpeGWBspifL+EqeCRxCSmvydL1gR3byuSPYWhqzzfPEL4Y/YE+VaC4t8MbFauyiFUp/2WYiYjIe/PRn8DuSd0yfgmf92688ROH3iENIaliQdLOJO510Qkfmwy+b9ytlefRL59XjYINDDW2jnbQHin8atR84BBwFTgCngXPAReAKcB24RaTwYuTCYRqvauAX2AfDAlL8nno8/dJzwc9RbUn0JD3UXSez6bVqF8jvjI9zQf598eMeP93BsuNeI8lfu9ZtAbsQ9/YOjQYZvlrL/UaO8gOlvr64cFCNDQ0KAG1YfBgO9Py/EegDQ/9Z2Bs8DA3zDQV7MO8L/A1cJHgbFllIgc/h/6wDHEUF4f3B76goAtt/AIGFBhIuNIiIQoOJZPwQYv+/GXALItNm9HmcdnCzxA8EUHHBCkxeRz2CoCSETzuBmWI50/t+F95POAQ4IsPZDvrbVZDdBNidnz342BPoQ9+hbLj8GYD896WANCAdA6TKUmyBZb5Xo1adQ/7zSrvOcERM7CKLV4IyNCFRRBlNdDHGlMKUpjKrsi5bsycH0piWnM2V3MkfeZZ3+VqUCqmkHDAgOYpjg0757IAIMAWoqdymisKBmlp7cB4KMnUNAjK1BQcy9UksyNRvcKCm+XzYCwdmP6w9/OJI6VG2+5JjrLj02Ivj2uPNJ2Q2+bbzY7XV2WtO3iuUbCBJdSzBgsxyFQ5k1nMWHpNv29nm4xj5lJ19GbnPzjFPcE1zrgPyXTvXNUPvIPyWv8p/7dxzlQvBg5p7qT5xm3iEkk/ZefbhMvnz1LwHgY133LK/t/A78x1HhumHEDb6EkSG+BbwEZ/ic3xJfv0X558BpB/3a/JTnDlZkMosyYqsSXVqsicNaUlr7uSfvElH8VRa9uVYLuVVfqLryeEVUhGV/JmHogId6h6Y0MAIDY2OuLiTEhmRHVoc5aH10RxZl44FNXQ2FkM34n7ceRIH8Sr0Y3wJ/RwdoSJDL4RCJYCFyqIQByqoxz8GfYwxxwoUaJxxBwOWQEIJJwYCyaSRQTb5FFNONfU000YXfYwwAQ0689xhjXts85g9DnjFWz7yhQ98pkOQlDp0SUhikhBM5yUrBSlKRerSlr6MZS4roYSWs9wPUWeChVf0lNKUoaWqjObV1CjKVPVo4H9HnhCt7xCYyCq0sSM5QgMXFRFULN+1PEdWK59mHE6ur6IXLocz61V2RzFc2Kyqe1fCFWrV083Dje1qZliEO7vVzrQMD/arm2UVntCrn20dXhzWMMemqI+aqCskISif0xm9FHKFh7GQJyJ2Fp11BnQHYiCJnuklHMIpfYYpZkdO1MbUWFhYgYlFsTLmxLwojB0xP7ZFWVlpAvlGURhiffCABRwQAStgDewLG1jhFrJwCdfoBgRACGyiB5BG77CLXtEn+oZjFpyFZKFZWHiHRziHV7iHZ/wSDXEwbCMzpkdq/BDFUVJYio4lsSyWR2UsiH3xY9TFT7EutkdNbI0thWpmjAl5jA1FREZUREdMxEZEDI8RMTJGxegIjpAIjbAIj/rYHwfi59RMLdRKbdROHdRJXdRNPUiP/CgIc1ab9uiAytm2Ylvp2fZsR9F+RelQ7GHtqY7dpM+i/+vTALtHg9TPHrD7dMvu0gVt04Io2Zt+y1cuVam6muo01Fqn/YRva7ce/e6g4TN1/xNx1px5C7alEGmcBBOoTaSVQm8qg2m+Y5QmXYZM2XLMkKvALLOVMduo1k677LbHXgcddsRRv2txyhnnPPV8oKIKSsoqmr284PNH48l0Nr9+/Ub5UNaycvMam5pbKK2LOEGqpmU7rucHYRQnaZYXXT+M07ys236cV8dD3AKIMKGMexEpSpIMHJ5AJJEpVBqXxxcIRWKJVCZXKFVqjbZsGRA1SG1SBnFJK/8ZIRLG9quuuq6sgCRi2VRkvVQs0i8bOZ1NGn4WHst23C4pef99+U9YWzt7B0cnZxc0BovDE4gkMoVKozOYLDaHy+MLhGKJVCZXKP1hCBQGRyBRaAwWhycQSWQKlUZn8NWR737645+hT1ZeUVKlRp3D5aFZXvQFQpFYIpXJFUqVqtxodbYrtcZtinZQs9Nb0jF50MasQB0EtEgTduekMlQs5fNDMh5B00WBIsYmOCEJTRiCpfFCCB4hziyZzTjGIAOoDsFy4IVCCJZ9/3eyItXfSOtsd88LDJ4NuzRjSLiHRSGH2ZhQ9rH1B4qQHRc++hsujEKcBEk5iiVxmHMUs2ybuaRUawLjEdKCCp80Cs+tM7epNCcSpCH04ymOOGKyTmcivzvaY5ZtM5eUsiM+9CMNR4zYC0S4RRuXsOKmua7CjSl5IzvEAYIzjztZPkOkoCxcK4NXpqFkNpY944MMtiYkT2DpvX7vNNZ8DDSagopWKlNjcAjhBjpMOilfGIQxUJYbpo0PjSvkRcx/DJdTSmKQpdA8hAvc+JSU4YJjY0GwYd14CDJchDgaepnyEaN5nbyxl5SFntxBGd9s39pQYWKo6aQ356ZxssVYwjHcZAy0Pisu/AwWIkqCZN4pwC33sRR1CDF5vNdyZEyx1gh79DzmIvZ+c+1xSMCxeGsIO5T+Yyuw85UbL2mWQ0HBGtH4hSFP6u6nY5ph38vKkwRVCxWXuChbMyoRxhE23sU+HRs7GQtRXS5/hdDfvZ6xIuWiUo1mZz1CsPkNkxXspcuDR1FJos+PkY+MnV7ZZ+PK0rA0O2Vvs2MszX1T3+xgXnOf1DXbm9/aO42oTXUy++2S+clsiqu0fQ76dQ74aVxgYHR+3lJn55CV/gvra9R/JU4pqhcpmK8X52Ro4QqpOSpjngXwPRjHZbI3v2EpxGipCewZ+TIMBce0HYZhZO/qXobssdyrflf3WONAULlU7v57h7Rz0kDBf24D1ZGxEmjK99wHHe+CryRr0WjG3X8E9dx0q89rJdece+7R1PdwxCYJo7X80qt77pFNNKIiW59rXntzV0c58ZiqxuO56Z0fd3XE3g194WErkbM2vralVHMt0690nqvBiWUxgG1NYfMtvNfffNQhbWUv3Llf4YyZs2bPsV+acAgfZiLDiK69R9GIZfP4CVs4Jlwz3P27yS1qz4Hyti3vr91h+w73VN3O+uy/gd/eBvXHR8Wu2+24sG1BKsoK0lzGp5VUa2sKsHuvjWXz9EN+KZJo1JbqGU2l6Km5ErHTNszylW7lV8ZNwx3Mcuv6lkMLtjuSgxduEWf1CrkOIc3FdyGG8pSlHBVRK2pNu1EBFUKp5c4l7VZ+akeTOiulYiph4yZwqeBRphyFpFIsJweAwwvw8eqikh+dOnuo8BP/2QkV9EC53qfzQMCMBkjqR35kkiAYVMJBI909PL2Y3j6+fnSGTu8G39ipSsNmzdt36sqT/wnL+6bxp11QV6IeQb3qaovGNdWPMROmzJi7xoIlQ+pa9CLqTdJHSF8GRbFHe8sqyO/TzhphQPBYQi6Gisr/hMZTi6M2iU6iGO7pIBRJIUmMBAoTqbinE288tSgqWonc8w0viYbWrMUY5UhcP2rCTCHBuYhH6qVsmdggAUY10sD+3QYKFmCtjqtUObgFwqkbDj+OZ7ebdrYP/k6mnC622X82fuAn2hc2PqFsJXiC9Us5cuNTfhixxpfvMqwsf/QiAT1ryAd1CQJM4rY4wVYgatLeTVFC1PuEI7eEeA7Jn9iPhDV54RKz32EvB4T0xD4qHFlnRWlqYiXVpNLW5EqulNLVFBQhJQOL90fpK67GlbLiS1XjK6EmlLoSUZRmAcRId3MfJqUPAON4YMMU1Nh+L6sIYKzaL0JWXe4EbRo0VjLUtBxDp8+s7Fb4w3Wo9k2wFLDx9S4uaIHJqZX/E8CUj5QRBOgEl4OFdAcDNLAc6FB/RIAp/otB9poZwptj6yR4yjyc//fe9Erjn5AkprT61rA6XGfq4YHpq5Kezb35tGGtJfzLpCBqEBKkHjIN+QbjhNnChGDiMAgMAZOGKcKUYZowY1g4LB6WBaPAemBU2DTsFlwUjoBLwy/BveBZ8Cp4F3wYPg6fgi/CjxGMCA7RAyFBiCMgCHmEOQKD8EMsnA88//78abhJalXqrkyyDFmmWJ7/gOkP7ew6/ecUAOXNwUAjwyViwJDEaH9xF+njM3dE2ENImrnaeh6iCklZHw3yFQZgfDBBmBhMAga7NCvBNGYUDUshqEcshHfCB+BjcCoRhNsSrI4JNUqt3FqMTIpMljzPAflDLv9nUsyp7rV5s+hmTv2nxm/hSdIJ7sTyxOLk2onxydUT5ROZf5dqZpdeu+9frL3o335hhRRcQP755ZNLztlnETQ+p38de3twePD6IF8HsMeFomocJzsGisj+vf2N/bX9+f25fdr+5H7vftE+YT92X+xp8t6/vXd71/bge5AncU88Abj1Dv6bpZOh1NYCEFPLDDCB/PxAqp9IbdunC999z9He6R+6hVxgnIeuLBsOg6zQG4A/Qja2u9jLBfccUHPNvMP61rSmjb3rXZv4jM/a1Dd9rzeHBlq3rSlMZSfTmM6uZjGrPSxqUXtZwlL2tro17bcfQeRAgE12fqSAoUqNjxQkWPXqBaOZFuKrb40DwAUAuHAKw4dfAkFCkogRd5MEiDQwCCTSpGVSpCiLEmXZNGjKZcxYvnDhCkSLVyhFlnIUFI169GhCRdVs2rSWvQVJKAC4ioIHrRAQ2kiT1u6SSzqgeOmUJcukQlWoOnWZN2DYojHjVlBNWbNo0cYeQ5K7AG6M4ME9zFhs4sVrCz8B28SJewgC4hF58h4zZ24HBsYTWH52dwGC3fI9WOyReQbfd9FFv7Db+5ew+Lew+Hd+5We/+M3+AZHfwZKv/O8A+T3e86nv+9znfu6L/cr8LXvM+iSQf8AP0w3kP/CfnCJ6WybA/++vAkz+3UcVyJ8OsyMYv1i4EgIEmr+vFtTj34WEeY6wLP4qFtNpZy6Ceo178DxExvMDKbmxziKH6LgxYj++AVkDd5JgqYNonl6SSbQmS5ZCZ8opA4Zj6A/+Usv9YIOtdqq1yx677fWjn9Spt9/P38HxhfGgXx3SqMlvjjridzcEPVLR+RdQCHKEWkSG01ZcoZ6UrbZH3bBrr6Di3bNti5fH4UsOYB+adH6Fexggwv3CuikzbERkVQkICsMNSZPuppSm+tBcqvlg2nZW4b3bRUGuMDvzU57FKq1QYaVlB+ls1SG6C3ccoP8yYJP3GZNoeRkbRSLNSUyiIgeZdEWBehsYp8BYGba6DDj2ewB7AZqwmt/mDAEGyacLoSEGja50GmAEKkC7SqiJ94eg5FgKOAKUsEIAHWIxYElnwgZpHrPw5mJkN59cddZcybgSRqRBCWbOEh8OWQsAE+iVymLsFldeV0L5WDC4AJmcB9S4J+UqoBduVfMuTlOc3GUmWd/jGFY0564i8uOG5hlftgDwCnNA8BZBsYhOswIQwhWF6dt8OALaYSwedKH7ODOW3cHE8IN+0E6nfF5xJfRNCE86capKMYhKsFEI3cRbBu1TKtGVrpDcceKfMJ4EBDz5VqvSlNEcgZU0Q/md2J4sBIi/OSuuRUiEeZqejHxEAabquj14d3ZCXWknVh0SBfQc/xJD0hMm2uUpMNfQBydaWoaaHrVoDJbLlPFWXvjkc7Wd1IPvAEfG1c6s2uRxV7mVjbzAxfU9vsjzwRrwV4A4Ot6873uQJcEILvfYBkDN+l7hnSLW07szHQYINAavQA2BE1DXZWI4ZMDEyGwTRAMEqQrbklKBrgoKYWB6uoCLINAYvGpq/iE+YwdBIFJdkjXpKXfNDBgEKQMZU1XrTI2YfBygIN8IzbjIvsebn2DGicziVGOSaoi8GrtJMe+yyMZ2o7DL+KUcvIXcM19CRxAT7YoNTQcEp9IrYLaD4pIR67lELxDHGlifUAER6tFtYs+phQwZ31TKbsO5SUUKVNEzySPu8Ch337aiQvNaYi1NJyDZUuPrgfjlZQjCJmOGA5ExiFi2XaniIpKhFn0eKA2ZKaOQRsVESFodpNZvmaIjP/01266JYZx/nxRjtcNKScAA8dhU8O5sdV1oa0JED/fhukPe+8t2nE5TYphEQy/WtFe19cAymvH7FXcWTt1nD4Z3Wkg3/QyoF8rSfWKmnXm6mtilee+apxT3tJYb5vn83NP23KeE6wEDbClbr6+rQuFl1AYWuPd6V8az0Mp4iEZVF0oTI9j3yijllD6kLBDKAqGMhDK2QpVBylR27vdVnLQ9KnCWe7y6msGEF3g02EWCoUYLa7RoIYFWK6ro0bZylTBCssCuwzRv6jurXd3gCvVe7NVR5nZ/Lyw0nKGxxH14F2exhmiFrkkHVRkWdh+ADs4Ca9yiUWBouV+pjZyFceDFlLRVkhcXqoXrtf9rfW998zlFsA1DST4M+snX29OUFjnYtcjD+7ZPz+31tioL3AUhPioWfFFUVXg558jr6/5aQbUejIEJO1A+d9wt5eWFVG4e+mE0QDA/P4gLzprIoA54jwWvFztN6hKJLtzs4jtsnFBLFzc05DUJ9Jf/y4xFyBBQaR/VXvanlgkl+FCUeekryLdbnJ0uIK1GOJO8EFDycBF9v1AFUJJ9xVku500rusFrT9AyZqyT6iyTbJFviRInXD2LxoOVeLDOtjj2/xFPHjKvv+AVh1IE6kHjulPayttxNgonYXwu6ra52QsOW367pzsodNYEOForJl1ozRglsFtLoDj7L+O2a+V2SW6d8z8tpbrkDVUcylydDrHHOWPa6liftrZ3glbgH4KEaWUWx89jCRG6JWyxCNbMn1jqLiphMZB2RZg0rISoOFQeuE3essXR3IKgEEl4sdzicHQ/A+vah1u6PFbooidTGW6QsoTy6qC9gyqKHJ1FQllTDPE1zN3KT3syUUa0AmD5UBI0LFbCmWJjIB1/tnyFqtAVXILLnW4FnBvhVbyCuZZW5xG967u1PyxX+LevfHthAe0/Na+0zUHAdL8epNilHrYtEHGSk72IkY2yc5y8Diut3tucMg5WY1xG5NR2mx1xQLNfzrlxr8YBmnLS0UzxMpycfF36/ZzGHJRrkIh45UpqeiAmv0eCBEL1GisPGiXB1TzU4QaMwe92I1EHZfmKrNiQJudkugYXzp+GFwU1rHOtBCIFfCqOjp0TQtGahAmIk5i0TplTUC1MX2o59XUkzhWensTqnvuWe9IKZx2KI55yDuQYhRDp6wyKeF/QByer1ebuEMoMw3iRLKV+dqKkctIejQctap+V1FC6Q4NheBhbZnapibToTUHwCCxSybqDu5za9CzoNlu7RnBnMXei4JwVZ0QTFKfWkYwnYzHiCQ9HzpiGQi9Yzs40RoWNHQWgtt4aQJkJ02oDVO5gmLBTmSPCLMjfUYUi6B6VMduod9gIywWtXAL6RIoyf3sgBvqTNj1eFtDC43sf/hoZc3KjhdNGtDQ6eVcwlSgfRyvgzcQGhSqBawnm6Mm5tKAxV8geHMvqNtuEXC3MAlbzKQMwkNVCuRiijnWqJNap45HQx5LUrq+HKQIGmWJZMLjOtQIZmtjI+wiDQrEKFqfcH9GANAl3TRNwb0vL70oz+w61y+M/mp+7qWlqieSrGTNIVdCCRI2zdTVw3OPyaJR7A3N8LUQZvtE0aPuk+0m+qaQ3EvmXCm7ogk1C1lljIKOsMMM0HmSjUdHdf3CsstIBtziejYltarbw8ajuS6Jik6xWxHj6XLYegYSkRn32bAuOtEV5SCvhzfDrNSrIMLQU52qGhABmgGGRwwp6+G34m68OvUhV9L2v/0HTb1Zu5BR9ZEoj3/O6708zMs0flqpMclIxEE7xB0f5ZUq1ZWyPmKCQMZhBxgpTLYeE/PinUCa/JnHXrqYYCHBelC0hCqPNtR5eYEAvj1XUGuHqXTPuGXpNuMBJ0EEes8ZJx5OZjtYx2chAuzwrSqH/Rs9LXElbfXf+2opglvwHzE1P/wJh6qd9fTYyuAbef20xw61zfs99S3u7Fb8U6pa56FXLLumMBZOqUBztxx0eq8cwJZDRuGwXk6pByv3EvctSeiNee/TA6W7aN+8gR4S6J84LAgo/kyaIxEs4+4ophRL+Pwwk7uPQp5wcPVcCh6Mr7MEAX5hi+yBg8otaHjsFBIgn9YnlBtjFqEj4LbV9dWtVK14vgbWp6cJvhWWRk6I81oWWxNxUJvkYsfVvhkiWnMJi0jgdcNLnu0DMQh9/Bpx56OCEDQaCgdCpWb//xFlsKuluyldPj1r9t3+r/NuRk4ym7Mi9f3jNu7ZbXPc+R41mW8+ctfQWJ6UUnUvMLQp/F1f0nRuqEG36cfnvWPMixWtYkeWVV/JR/f8fnNl4CYsWtzarHpSEGKldP443V0NjOM2JMAkanKIfczMQOGURiuDt1iPhX0j1fxx737DP8PIAD8hpwYEG8/fUlAvt7wMgsbU4Bg46jcskoIEZmKSZJZkIqdeT4Hnpn4/Dv6hBP0wHUZIG/SSvsE/RBthg7vZwoYkcDhdf4mw9LovKTCagCBOeqGH6E0iLkcTeo1bA4jN4VRMg7JqWFn/QupgY/AAW2TOmcw2A3wlhDANfkEGZCakZ0vSQzneKuNO8TlGCT+f0OGL7uleP8ia+10EUFQK1kHZcURuaBZfEu8FBDEEa9DE/1RD4pUksRnek0V/xHvZxcjKAkA55QDFICoSdkXjSg4j/9ybe4MMw2oTR+h29wF/f+jcNCzstcBouomHJOv6nkP6n8fTa9M9JRDp6wJ+Pfp8OrUV1Yi5+h9JRhf3e4vuR/ro9kyYCTC4SNaAEEkpiR3EgOoADIRpRiL1gEpMk6F1Ny+GV0tlNqtkwtcrgHVvZuYyQP121Bp7CKyU8fbY8lodukc+RSIl8BWBt7wL8rEC01uAsl2Qje96JRAWfDIsgp6PQoMKL204CU5ISXjVkuIAGlXJ2mwNfZvNESeLshKPE5NNTS/3ZIh9IcLwQ7sLaqgdUk+ERxiyPBNOUlnBklrJZC/63WcRcPBGFuc66xM0MQ2PrQUqW3xDB9cQuN7ivwdUY89bf9mMq1mcwPQDfKU6vCNN6xGpZIXM1+ZADMClVZfIT54NkbgerD3r1keGXYYVVy1Q/IqYR8dWdKWKf4UjNhJ3iYxJ0fyFCduRmBp4DbIlu3UkLcEAMALiU0wF/KlVPgXu/BDI8sMTeRRJiD9tY2gZr/RuyubYhYUIpl87wUhBkCk0HXiTP+HBHieZ5Yk4IP/BZxtj+RPMHRdGPLXXWaDYSUxJ4MD7Ej0ST+d6zyRS5WQBRA3ObPkYmGz041CS8OXEEvpGqgDohwIBKjgr7JsK0nsemHRQj6VOskHPEy8iLFuLLJomavW8JdHmKo0x5xGtZGWqJy7IlhDqRNBU+Xi+F4nyjagJXFoddRj16yNj9Oy/L7rGG+ecPjA0ZGETn+SKgshQ7V0246IgZetQ7PGb2zBLCgMQcdAElMSX5lbeGTnzJSQKbT3JNK+8Tpv/9wpCA+HICNr9KHEUfTiZt9CsAaEl4fBtJQzKlF+OGQjMTQqeD4MQ2ygYd2eCGAasoPpexzoKgXIpJpG4ClCAKNQI23hMLOPgmkaB3SivgF5AFKqJ6LRBEjTfhUJENX/2S+wFT0Y14VrNn9t3cxFJVmDMx33knNwIqM97hvhiC/nN5fHjLk6ZHBk9RuvU47LPloMGLP9ikja5/04UKEWXi3PkxVZM1R4/DHdMI8h4AAi5BPoRdBxvx4IcUcIk6CIjc4cVsRY62PkroGG5KuwNAxXTIJpCLqTPUEgdcORx1ew4W8vrQVo8fvAr5NN2/Y5FNuOsBB63WBotLqKShinMJbJGmp8jqJ6Rc+RLSoo7M3JCymzXFXux9gSm6FapRfcbY0wdeKMX5aYhMWYjnJVIezYlVVtMC8YZ3A4QsQ77Tz8QbUFADDQBArPXNvFJI9o0cS4xGd6BbV6UM1rr6bzw3Ptspzdh8sCSrxRwpfIeUSNntozq8ZxBmPdkRVZ6cI1KcTfC9pBz2pKGTj5vOiz827EhwfP4iPzeiZDX+2Cdmks5X7fM2JLd8nbgShuoujeX9Rv8l8Waodi4GM2+fTTMr7HREX+KkRCklv41dTpIWpyUHKtmSAdHDNEmKJadKknxpl8iZga1Oki770+LMVK3uM+6geBWZYMLn2PvfD+ZV8KR9xFqw7e342fQ4jy9992OonFNxh5djiymPhXCfOms9OISUtpCpPe1R7iFGQiNhitQwksIOgDmaZYrzAvNShO8Y31KEBE7PS1zzrCLxdEDRCeYdn5q8zx02yKQ9OiDD9U0oYT9GgXMHthQMQfnv7+JWGtUimMiz5eRiz8kdp6MFq3sKT88HTr3oyPLjLkciLxuehPm7nGlN9iDtXWNL46FkTPU9uuHtGIjqe4mUCWq9cngqdw1JfXhEQg2fljC9GmwleeiCbKq3bpVcBOdXMHzEfjIEH/NNTFhsqmfP99g6O83G/5RmI4U+0xe4gg1vMzQk/slp0AdpUz88PfYHZHU8HETHR2GKDV7SpMHRSZTwRS+Nu9cTO5LL1xrrt7Aa02OhTmifbM8FOI7CUzyP3qIOqWM+YKuRKZ6o4AguQmPjPe4N0sAHmagmQtXIdC4EKozQbfNCDMARQ+J+8sSzHQj8G5KWIPsd6zPu7Ci23OuGUNr3EnNtleF0AI6C/kACzEZTFgmyf5VcF73JQhJaYSdheeaLFGJqkSkhBCW0fo+jdi3z30UaFBMGStvMW4HTT5OQsWtHMBKjO9lNSvquTX6YJhIlKwsrbrPFXYlQPuOuPC699mSUljyqwrlQNLnAZzqOuFMce95rhSwoUYQKKCfl5i2cjHFXw2gIng56kgNCsT/8S/Qqei2cKPo8fkHY+lxGGn02PfOtVxyFlCkfLZl9q8gPpFRDNVRANxCcqUOiKm56mBtFhIJrbEwajuL4AlwfgPq+Og9TrRHvYbyIFzDXMvSk8r468F86rbl8dbiwWsLOfb18Wtwb3S+q3soLQTPKUcizoPjSVE+uF/NW9o79QWk8KN8u2VLz1KhciCZ7U48QYWjqY2Pl4PwYhagGk7z/rIX1Ao7t88el3Xrad3PfmdJaXo71n9HMqOjj3bBV560dHppOD6VuQk3SdmbiXYRESIR8mYYYT8RoGPJkTLkmiF5w4fRqvsC2vIjORQR8qdei27yoWOSqUmvF2Oo0KkqxWSdF5PykQLFv9Ro3R3lWb3Mc02WUZpdwgALXuD5k757oK9ZhSFGl7FnG+xJWmaaa0kSfVlpwka9cnOLR0+4K8goTOEqAENi55IAAv1gurQ9/YT99BpRpvkBPBBks58t8sHw4ON6cBVUHmoh1JhGjLpK0iX3ioZ6ySJt7d1nbae2SoOVtC3XYCYssL9ZDSJlcD1+NrHKnJxUnEDqJnWXUvPJ4KHFWwUD+lcI7ECApRbUnStANoSbvEZWmIzPOC4HgUcWzrCrX1tRPAPdmoQLQqmKwIWLQIvu8wJIjc3aeOGaeel5Lt5BbfDxF7J2cqgxgF5SSBpS+0KBSTfF7kwsrRGWOfEgVElWQZuEw2x/twehokNrhb4wxnmNiIuwZt6Jo60bbIsiSfGldKCu0K7iPyoWOtArE/pxz9CyOCkTiQjtTqC223x8lXNZHKUbIsorGibLFmfCmYXFyZcrDsz0qItomoK+yLXdo15hzhEauTMjybjuf20dvopwMJObw+pPTapzTxwsCiuusVXoZwSjs19WuCXhWNDdN72FTFw+eg8kR+O+Y08kHgd52cpY3li+W901elrebiiXCVbe8/ZiWt52flsivuiU97OcrUN07Vqasu2zFyvrwqZJlA/CucFk8tcpX8adOCbL+kSpk3f2lEBUy6tRSTle453C5l8dlOyJd0V8xUUaVdLmdI9Dl5jqZwhzBLq+VHCnnSlfSQNxp7Nf6J6EAvaKUf6+u9grsTMt0Wlw4agFipWqlVm1HF/JYWCsPy3B746Xgs1GCEG+8gu5S/PhNZmXdtZWK6yqdYAlwdPkvKAR7FZne3H9v7s9W+JV23bn1g/nxErr89MLnZeryBzsYHZnLLaPxuwC16INVBghGoUTMZAcza3OtgiIgcwDR+OgIPwhADvRwgh+/5/1jeygkVoPVldogNTUdwdbH5sYCQ0uE8uvtEAvZD42qxMUFmjY73HinqqI5q7FcIKMsbH2Gpn6QWy1nJlpnmTdRRpZ76NuJFZU+5E7J9yeU8NqhkhXediXcbHsD02DRQMVS7tSN7QQ1sqFsVm2hr/ra3RGe7sSxlPxMXT0oFmsaknOVL3zHIkLTa7YAX5OFy0u324kSc9O3dc3lyCXLk7BaWdyiLey5ggx7yL25o99XtqZR7XUeChfD1gFR1du1PucsU7Ep4I92Rj7+d1lH3iWUBjLBL5mE83gfqwoOfuEGHiL5SnRTj+hmH5yMhZO9eK6UniRSH7q0W51UdGMIm3spyBoO8Xqoh11UPiizgCKtTazeG1wtbfBTeJD7VORDsAevVQYoKypulqKogKQiHiZ4IahuBEGHrab+HM5gCScGuhtv0F+hGBg4T8MuMsr/QiE/GAhE1JqqDK/QrsOtprsxi+6XAMxnHS06XUGWCZgRP+INmgCW9xvaDBUHhvuOABapBjhRdFozTUw+kRkTY4tMw8yyg/kmRsG/fzK8//tJ08nfTrBFxXNbXxZzHszXdrk7J0B8NLoczTqayW0Hk5EKy3mEbaJoADQ96B/F4vEyj64VQxuqoMG/yQa60PuHQk3rwu4pQe68NzMineXqnj8c52smUfr5NxYkapevdDVKzqwY8GbJBhiaouXirnX+d7DAWSdsvGLvjQ2F1GO4snHCRov+nLOjHV2D/OIQoOWwfZpx7SKNoaNtEmysTTK2Vri4thcUuba5uLu1FRXKgj4my5tEjMpLRaiEC7XTGNic7dvE0Fr+EgQ2kKIXmHRaMpDOhhqZmmfalj9Y6B6Ym88KJzYWm0pKnJcJmlxl41b3QhD8Gdmdnaeb6T4EAjHoij/R1a8pK/heyMXAUGMLVzdLC2/Pa6q62DG719BiYhJ1ho4N3+2YqV5+/6n6Tgcd8PpRjCOZGHnYbkRq6VUtROWnqqpnzHXujZHPeG1ddUaNEoW8Zvi9TZI1h+1dnwlW4mfOg7cVOeQhctZ0FmmIlAPCRVJEElgoN08EBMzT7eggiYVykOiWZkHNcv8hAaUUqN0xLd6IEm94PGV3NBVnSIkzUmdQ3Sjxo0n/XR45sKZO8vg7nKOQrBXrJtM0wOwPgh9Qk/MJ0T3egWlJ2JDym1x5+4ILIv8tz/95e0sPFqXm7RXs62qhLfAa0nwbuEG2IPfObbwRi6wPioquTArBZ0fFpfeEhBOCvX1T4/ywxcFCfgcSVP5Hc3d+bvZu3bdB3BDN6SDfzJx65g6+a1EOpc6YSBEeDD7QGvtw2AKfTwG+kHWWbZfB52JO+Th8YjUl+WZJcyo+K0r0+kNWxioN09lSwRaYvFmLU/jcR46Nm+f4QBwkfNgyLtV2FLkWbS+X85t2SD/XtiNoEeXuWXKbnfGj+wXsAC6KuJ6E205bFxV6OBNT00ZIqm6Mja9pTCLUtYG7SJV0+NZs1yP4dgEIgHwRftafUkiJRyJ9YQmVEU0nT/fwozoxgfrZ1yMIlVgYMhZe2JbSL/zs8wypKTUA20wipjeSsIENKekxNwoSaYXJ0VH5ybT8RHD+NSl82CIuFdUvyO32+jbn4XTjNlYhJvhwOqbWXdPkrm6C2oybLJQjXz4WiHdjbMr5FzvT8EuldpEPE/y9X//B7P7pDCJfDC8Oa3unDi0OgbSKjeMz7h+ZL46O8GFCON3frtBRC9vzkiBqIu+bFhvgXxbO77d/dkLoYGnh98G46floY4fv3cZWKhrutjt8DSe/O6H+ZWvgYtjuauKlseE0jaePLyZ2VLPYTueTbhnsxcYYzOISsgyv2flacsrhcKMca9eejd9ThMCN0Vi8faLRBMyHEuZobhM/1pDh8LKx8zemNvc4qH8cC0rudF6Ub7i9W+djFE2NOyceQq4j3MioCQxJqYkl3KwBAhASSU9ylPQy0s/1ht8wZP9xixQYAswkzOqnid43e5ZwdjXp6K/lZc7p8PQbgVhSJL5x1C8Knx62SAzDRQElPuiS8RTV9n4dToA2yxJWdjrzrNK7Q7n8z73Nj7guP6uMPXqal9/wvvEy+a3GQTCP2tvCSOHwHxz3OqlcazEymtmRph/z9H3zHyfbZ8qS2vk8K5zdRe8aQ869fqwfzZ5kl8+Wx4IrX6BlLLgpeih/Q32oAG2WDV/5y41t2F9vLpEf19Y+5r38rDLuaD+vYO54h7NnfKI86fbohat14vaO413HXWfsLu4u7p0AiwDC8z+VZhQD92jeYTjvqkW4Sym4sSwZbr93VtVLCvMxNPuqF/nxIkx9SBFsH47aS30yIkQAY72vIRICn/fZKrn5wfCjPqk+oBQOrWQPm74dKlC3RUWZ0lYr2PHTdJxAfR3RE3p6HZCL4vsF8Uflh3zKPfzKh+XxRyqefqkLP3YJv17MdVgBI64NYemR2KD0uLBqoDbo7oz1cSFzndeUIurxAtN0dnx5GRv+Fh0vUA+1LWGXHmdlWd3jcOZ6T9VX5YTj/Tyx/byE4/IyCu4XKP0nd3P+Db336IUlPFTE5wZjGnfLffYKRizWPaDWFRgJkSLSov380yPDSSAZ8p/8c+jUU0QUNTQlrTnOE5PmXwBtl7bkS9IIddHOchwUfD/EfM9rclf37vuUkmgX53jPLGirrD5PpkyggZm9PMGCKvEJsMw9nx2a/TgHHkJYLw7i8dm1Hul50t3VuztsvevD4zcIvJQgkT6IqszKiJbOvpR4QAKBAsyklzzRszK8lFlrPuysFA96dk/AgeTFx9R1nhfbBbj+XToYZXHhh3vw/3zW++Mha5giMk4RfD9yTi/66dWLdOt9B7UvOgLWX5WiRpDctJOvA42GkMozjrjK9a6/gLn8bxdItNc956VFjgGXolRONKoJeH80/hCsMqu6s6rCYZuURQLi50m/TvnaT6HDkOrVjgJ73dhoU5KUM1s/FzWXmIAQ30RHAetlgbIPU9OL+7MjR5F1TGsSNFLOgmLx28gK7+RMamrDO36QSOFOuQ5WIP4dDgpOiIJNwEzalEQouPS7B22zKTz7JKTxm5rdt1xd1b+SRR5Y1ExWDtwg+5cUXj0G+1Psax79dyFuhb5BGUO3GlsG6eTgkkCI5yZigGsLcpAt1otPaxL/PsvPCmx3vugME1M8XRHsskO/iwpV0cuYnN2zrNK7DFwgnyQUjj7DL72qepV/46gGeZm5ZHCIvKpf+EC+kHHkfaYrd1F9YVxsZy54iaE2Uh85eHqieWr7pJVka382fseAb8QeNV0jLXmkgtegZ8gjdvg/hxKKO9gmJwUXZMl8dVRcbAzPyEXDtxWHb2Xm9s2WVYgFaofySLAhAm2qbL0aaMu9HfcCw3CZ4fjMIv9AUAs2AbfKrv0H+8Ce2Eaxsi7aXHfyxjgx7JKPS2KL0EEUjP989Ok//pOmacQMEgAv7st0hIJ1pZ03tsJB1kYqqHWzc2G9v3kThw8ihoVkZ2JiNwPxIVlhwRn5PmG0u2cAad6Qw4vKD0fv4evLKtsre0XLHl5U9Wbn9S+on2ngIho6wSqS9qxZ/hGsBRs0pDSGGkrgfcxcXtbX3vQZcEN+/9krUnZX2DrbyssjydpI30/HlydfsE6sMzs9/3nvSPdBFbRw+XLGoCveMsbxqi9vnpAlZ54cxkQJZ17+YRhksqKcXO2p9MZ5oSWhv42/E6T5ZAfagBFk/cO7TewmJiomPwIfnR+F2cTef/MWRAgbg6d8SDSc7wz6kTARAE+eeWxxItVIzm9qPWBIuso1XhUYcp6geNkAoZjTkNP//gHwzwGv/H8QWN92hSP/hQMDYkefZq8bzE2MIrrHh2RE2JQw7sjO7yA8oq+HAutH1zzgql3IB9e8oN49gGhi7uJuibQwc6Q7mplLWTm5WVxpmzA1XTHQcafD6DpuRstV/kQbGCQCVo77aCxEWin0xNxlPmDSxHTV4bYyd6M7piaTT5RaUQ8qWs24g1+yCnbNxgfNJ0IRlGjtm8i1u6F+NbPHRPaymQ3GXlCwTUyktXcChHowMn9/Yvgbfv+JEZ9smBc7DVFPffNiDaS6Vr7DO7DGu+LWERhbzmY77gLfs7ab0Kb3dzv46iKnstPGgsVHgs6mjwIsVRCXGRKkxHJ2wrMBygnED5WaOrvsdeP2ySOhuR3B4LRIbwW0xDV1BV99Q2FzEZOEAWMbfv2rBCd9eDkVPGkICMjN9E1G+SbnZgYEZufedGtozsAUFgUGlhS6JjY3uSaWFAUGFBYSvSgNN90gLkmdgyedg0mJHYMnHYPgo7wKSSVHJfNtXPOnK7YwDdunic3vMpVzlEnK8mDwgLJL4R7xt16VQIk4ftQr0bSk2LTuFe9qaepjnyQTLV3sKu2mrW0mhdXx9i5yFYcbSlkQ3UpezI72v2qXbKJfqplzD3exMvFGJ8rGSDc7S7traZpJBejO0w2gJbYTZe9mozauR7tY24Y7pV4g7cCvxzra2kc6pF1wYIcURbeZOZQFyl+gtYIR83MR/CpszM9ON7/2Lpo+Z1s7Z4emJ+BdJSkt0L50zJvW1kNMaq9kSzPUHW+ZLcjg16/NU0df95c+pkCzetSKu4Pzqj/n1QS36eZ3QEiPKEB3zTsV5zH2S5guAFU01NJWM7vSXcPpW5OYlFqaFKNjlcy2yVRUzWV5W27/ipWbh558OrcFW6Q8UDwIhPfBm1/JNsv2ZT/dAqBmK9DFPbXkB0Ln6bZ0IMuw1J3z1GkujrMQPn2Ka85Pqdl6UFd/f7sWPXz1dfcf8BesPTe20NWysxARMOKk4WcWBTIUyGv6DrEFiX84K/pBPAjwoGcoVhQAK9H5OzKafHNk+C/P92ay0jl9N1c9fVdXAz0XV300HxA7tDikL4YmDZFQNJTwKkQDppfCDtbHyZYoP00dMzMNbXtzlvBhPvJkFTm9vfqmG64o2rOKIFJaDMqOjW9AMfq6eJboSfG0PEO0qbaWtYGpy01zAzMdvLmRuoatXu2YYNp4YQa5lYzLTFcSMeOd6I9OnskDfERS+yn94xRsJNqrt3hgWFAmLoRU7Be4KSoHk9dqi7F3NGWLRiha1rq5xRup1QOxtZMn3J8PT3N9vP8csNhlAeZHlwHzIyQ/Y2Hk4EYcFG+zFQfc34RHRNoxtfcTq24AvRXZpYXyisVFucXFivJOhVovnIOTZ1i9Z5iTA7APkOuTa36JaEQMzD1lgl9/mkXbvcp+xatv+P6RN4kYkZeKgM51tcZyXQ/MJGXODZsJpov+CWXZ588Jc6OvbcMQX+aqREuLQPthvYHO+ifW57w+u1Vk4shpSqLgd/Jb+TyH/SFxPJlEnhs5tBbdKEBbK5wHnf440dRZ5/UA466wP0fY4TrPfAjKPQg7CcZw7H4jf5wKKX+NMRvZ7pEPdxgeFVdFVbFuPW3+kQrpyBgUDVEyuySPCspiNZSOCrS6fslMUsnikhwqkMxqKBUVYCXx8qVQP9TRMVtmMBGHMRfpAwMTfj4UG9YVGzEUE9F1DKy+SEn/b8Xg5cm+bWD8di/y8muSxeyjbDwdP/ZmjhbxcSFcVjarWiqaSHZMW2MeKUMSOTZlXlVJqbbR8kJ7KI9N0kkVVUVX1c86u/gpMWZIcrZJxnc29xJoNKKjnGtje0I+jjtIM2v6GTLkEPNvZPAZ10xvdma8HzbYorZW6cVy4DYHjpICnf06AbpAT0yxgjCW+fI77rhO88/f/3XK33bK5/LeuHbmfqMahtp7U+S36J7QkZWR0OQ2kexvc87Nf5ulW9Hg67K1RdmmpKDuevpUcoo1XR9Q+gJ9PZbsEfRp4UXnxrlo7AbY8GUfRpLdgj4vbptWJetA9vdaZYt5BwUJx2WDrgVygkzxTtbioy7ZckjGRKfK3P08wnFidA0J+1/4dcrffkpyRR0vjLkUqpHKkJlWKYo0p7/FWXqnT9Vct/Rkzo5UR0w6JFN2+OPnmyfBP+a6pJSKzPibGSkxhc0BiTF4TwwhJpSc093YvDKRZEEnRnVoYJc+3q3DReW5SiDj4eTxXH+L+nTfXqXAZMo9U07Zd/Vcgpi4ymc1LnM+5dONsYgRqhGkNNvZtcs+p5P2pZAjv/aSBQR+7fKFPb52Id+cu0iz5C+YtrXLZZ+q6KmwsrOHYsK6YsKHYsO7vlt87f+6nHO31T4Ta5C2e+2FRhcCTIwDL+PPGrMECTtHBwRjEj4dlb+jTiV3OUqjkKrWI87hJU/y8Uc1SB7mHzoH0qk6hQ9kCv6OduRsxV4MQCoFrsdoG2Zxx1QURUQ15QomdBtb4Z0c0xracY5vJRJb8iOJdg67EZX42OXDUnblQFI8TlaidwXQFD0doQxUAyM2792VMy0mkmbBLmjzwKFWaaTXLmcpacjGq5240aS2xh8150rTuzE+DDBEh+q/OhoAqf2en/GjMj/h215Rhi1ZFQt3JlamCbpJx93SddKylN5RuX6pi9lBOpqm21y2dOP2qZTum4lc6nJ13eRKXv70am319HLSvUpiKkmbfAebwEyVxHyfM1ttPy2CCo3L8K1tt6ugA7nsX+/qsQrbWuXf2u/5HO5tfpy/aSIRQ4tDbb3RKJSmBsom2tpGQ8u6/c0dg6zOYXzR/AcF5cORDJ9r11f1a+EKFz5c1EbXbXo9rTVn+E5NiJz1wqGV6mNf9xpafGWhHpQzdCfmTwow2VIpUlLwyD5KoWoEk82TopjFJmRfFDIDB7Dt4miLPm6CleOSE1LBZdA9KOey7ychjftHKcdACl2F5fRmTrQ+rU9eXlwIbnmFpguztstbLFvgWKlA1F8jd9X4jp5SLCnIqCqT5hlafweB9FW6t5IhuS3BxtzEzM7MncKQjFQJ7a4+R3mupLpSyOed36gFvC8kMzwwJcUz3I139npz86O2YZf2r8j8yOlWjlr/16dmy3RUnC+pykPAWvpIBJ+y5Cwt5X7H/kL364TdfxfaT6nvp+Y5KZnfiv52Ue3RHgj50VK1K5P59fmszpvT5s+fPv9hzTH668dYW/ZWvIfYza+Mq3z0mGGLnmjEV5LF1FiPNXv0Uch8Hbh8ButAnM8gznNEZL808HCt5ErYTKguqE4g7jVL678ifT8r9Y3Hk9x+SrGiuNj3i14EMsKkr9J9DYygdFslcrWM6Fx83W65omuIp6QyLmyz4nDhAuaeP3veovH0RTfa7AvNDPI2QGGrkHBicDc23b0i+42QAJ70hmYFeevouS1CX4NzsntBaxf1/vU8EndOKUTLYS6jfbUV6bd88bHki/HEN+THxHZmCybF1ZVmYSt/PVYpwfnbNSuvc8SSC7ldNWyxwfqudKjh8l3vx3MRgzqM5fwVq7X4noz6/FvjrDsX8ekXKGcrvscgxfDyVaVchPnluMrboGn/g90Dv+lwv7gZz1x+7DcTFTzjty+P7WeoFr5od0mxvKxoiXNjfJU73eLKGcpZ2lm6u7S7lDeUx0Xma8flu0/vglr/ysLKgs0CnkKedy/Ik5nFGCNMKdOGgwAD4rmMpUmXLAd6HcqyC54OPB8ZcJ3gUcS+G7dYtfhJiL0S+d6oeG8oORRLzMYA5qTcD0Q6/7ht2MUDRSm1nG7wpzc0C+ebWeb+cxOMda1wT45jP4QWOSW4Y1oNCA4vkw+Z5dfaLsFnqdFmcOa7P6/qruVV8BTi3k7Etg5WbU3DVPNJ57BQJZ4cY6UCzV+kmssEsWZOB9AIvCucsEdlelJrjGOGkrwkt+PQD13jOkHg0dqJ0igR43iyr4ADcSGD+Ggz/4fMH3R0ocl+a7y3rB0xWOnWgz96OQc+Xmx32hom3TvX7uyUruSvJfmkhR6yExaXTU1yFvsdOLXcI5LHOLHwxMdq3jaGK/v+2mH9YN5l2MurjMPZYG61VUiL//7dff8W8IdI/an2XDlQntgjFd68zohvNCnaOmDZ324YPgB4E7uK5VTkv91YuBnkeX3DxcvTWaCWYkrkugwqM6EUOwV2TfwmXB+6TWXQShO3pb+82xr7nqV5vr/ffortXX12tUrWrqxlfN+0n1o9aiiw4G+MBeNpqt3m/Sk7k6mlwkOshRuyueO9+n/bkNaeH/1SFzU6DucBeamg/HD84eR16v1gHS+Ehtfd4JSX3FdeIi8zFw8OZ6zrFz6QKzwzMkDeClXxQGh4boXcTMiXscJVN57ipoKY+E5wiMvBCQfpVdhjLRGh1NplEKrAUSJVzV5Zu1ck41uAs0rThxR/E3YYdFNcUZYL929ulexJwRHOzmRIUo2UqcxwJbcxq4a/mr9MhsQlX/mJyHKarFcUk35D4q224lVZlSHDBHNrVAupDGIRxOQEqTMlYBWJg0QXxKzhUeUpVgZ/nezzJgfSQgYJnMN63Pao/1hqoQ/17rfdsaAOdz6BucY5tttbF/CN/Gn8xfZp648taVBFipufZo2BK0ME4xNEMiKaFWQSEjdLRZlCPPS92aWI9kOjeSVyyV26I//USYrIMs684oBIkUxzPIT6safgBNFSZF1WdALuWxE+FBPedSyX3WOUX2g/xTY2LpftPhVKgSn7V8/Azb6QzGCMuj76O+Irp3QAY5CLPLwl2as0YI0f/bndIHMu98Wgbuj4HTYocOc1PejFGjMfJF/otgue+alB56qZ/Md0auCeGtYbZpmot2qo+hyLbFlBADfAXBmmKJAB8F256qmzl5RR7XC8dIaScHT/IsBlIqNjL6tPhZIgsHrLO5+6j3cYvMdH+ppN4vFDv8vbkezpu3fgP32cJf923IhsJv5snCxzGnA4HZDyw/wbAKJlpBThBFZqZU8I2LHp1dkvzlQAgTz3wgiu0RW0NtAE91GxuvLb7o3GU+UzCOJ6+YuHtf0XEKM4pTmgGyga8/tlZ1vjeIQqGhYCMFFHhY+pOjkTfCOdDg6kJJUh73jxRTTI+6piitsUNIOdhwVrFdriv7+xOX4LsLx2sHUAVuYFqB0jUTw/nIuMN5IbAQv2e0FsAfDb3oKJbwGNAzY7J1f7ClOdTR3K3OW5Fncpfhnr5pk0Ow1HegZt57ri9Mm+eoYndg8ptSOGBgThV2IgSTZ1qakRS7Ifzv3UUJIl9d5XQwPCi4J/peMcAeO2FuiHX01WmmFKASEqIv9GqnBXXCiSww4dtjPhFYzz9Pxgbwm/6lZ7JdbLqNon+FpzGrZHOUB4WOEiOENNmEhlv0I+A6IBPgHemjc7TXL8p5+iwJKTHJXVR5eymF8xWT7ozsTqxMX5wcAEECExhjGsUYFLIZqjRX41X15wDv5Ns/a5AI8eiAa1zeDPDY08xnUE+QdSPjQf0g7Jl+YrBbYPSD4zPi8uaCQ0mKkBGBV7paXNpKV6eaakzqSkAVI51gkRVSPA36ZFSWO0Giucl6cyrLdSwU0tfBJwRTMD5rmSOM6Lqzl/GMOxdpdVnCAgADxYAmQLgq2wvVcjQOcxMHqmQAesc4zewiKXVlfSOot2ABHkmNvXFsepR9YwbCaQLvInoOI4qz9fILpn315X19zR3czc3uOaro3BXgubeA+ZqkbOT/bTfsoGyWXd6Tmj/aD12DXLzC5ZtsFrd+lP282qNH5cx4qh0lV0VCkjWXQpRNs4vaErhTQ5+KA4083D2NzFzdjUzd3MGLApC53WhGklwSXXn4OK44aR/AiUU5CFiMh3C2/T4I7ckoLuvCBzK+8jEUtRxyCbiOH82mwL5+s6Wi7W1yzcbDR13a1YK9NszENRFvoGqGtqqiD5OKUqVQDf1YWGO0aVgEyoTxCpQ7lx7JV0obFc+ZyZq7uZsYuHqZFkG5s7uoFOs5xSqkmpUsWYrg08U6KJtHvBCi/vulIH6+MUSxssPJIP6pmL1tzU045ycr6uC/XbusxM6thgmF+DpqRv0Ew+OFCa7WqL47oeRCaRZ4dNBYgVM8WsA53XYhW3kSkNfmzIbTTTG0PJ1el1z3kGmXcbelCimxG33dOU+N6FaKXBpdcPgmaaKMGQPC3/MEuMvpAoasjRNTu11szC0wi5vVYgucP5b7QsqiCOHBIkfO4qWfBi1msyVdjBKDV19o6ec1jqTWsLmueTfeWy1MlnRQUOWtmnGS069AgvqfVuKWNAREFcZ4i0rPMGJ/n/b6OAyqtd+bwPvU3NXwdVKkIVic46YqI6MkqkRyplX4eaG9/UXyI9VXuCZYOyxYZl3sjKvx4udB0RnpEPrex3c/PCyY+2/3CwFy4zFPp+He3lwlDAyUl1V3lB+UD5zS8LP3enaT/3F+BZoV2hJ59FIlIi/ILT4sJEwBBg9me6aF7PZFmv2M2VbBgghYRVBiOQN8VyWtJKbs3XiD8gr+euk9Zh0+HpEf7exOAwFAWNDCOGeGNIwXgkUIEI3/vmVkPd5oMzH/cvDBys9E3dzS2DB9jw4n+U/ojjweKHqv/jxAVjxd9XJYgLEc4uJZ8VEFeS2E+yTtqXABE0CclsVD5X1zLNyHK0Er+ynzFa7ixgz0VLQmkJd4fPH0Dn9s5d6BO/sDe/LzF6fhNchUEr+aJm5yP5Kqsi+ebmeCMV+SLn5yL5qoREmjucHN54ptf9jXMINdXyIcAzZez582ucnT/6koiHHk4OerR5A3RX6odTrVK4UBMnkbqI3hDPa4sKFhFx1ZyEpOJlTXqFjASZtURsrkqhkHvxVf80dow+78U0MzDXVVU7aCIxDQi63+sPE1nECoXV0DE3V4cMI5pXEYI2sDU3rq/UgyVF/WE1jcpfba9IHIgND7kuHH+jSLslTLimnM3qD3Jyz0d7sm3dmpCz99HA9bHPNNYqR9rYyHgnVWuyHQIHhEilvSI5pZvA0ZiX6u8gRXrm6/CenU7y1Z9WNhRIzqBdYFp4zrWoV5pyY9LFxTukQhfqekrd6SEDwTtMDD4MOF/qoOwwc6AgWi13P4FDeYeoSKF5D4iRsEcmrhIJTyoKMf9tAy1JO+lpsNKsGgKn1mVbuBBX4trgpqGILbHJdalCMjQ+fbgjiwbL1WxWrn3KSY6OKF8eELcO3W+34Y/TmtB0aUjp9QOGwm2nX2DZvwqRFBpg/dOOYckNgdbDYY3kcLXXoRUTrueAIyK5N2LMw/n+8vrCKGYm5WlGQrYVg4cGQ6pktzmPpFHMw/L0Jjy4MZUZl8eZoRLm61v6Yfh4sFXMdah5pkoUU4GvYnr8DzChc7oHqjqTVc4N5HNKavi2QJ3LuCnmibXLuKeM4g3t6IKRsArL00dJWz9XwgDYTU5DTVdqUz05xNPUDO7YFuXTaBDHlqHKyepe8PanZiRNd0bU/tnV+9thII/EPyuYmoKyPWtVT1Z68Q/yqai7v7s3OW58GHqZUFXxsaqSsLA4t83HdeccH/t2IGR8EBinSCYmjg9CLm/zsJ87y8t1/cTiHKG68mN1BeEydHw4Ma63F+QgJ6Djg8mJAamEOA8o6Q3ArrwhQScGEwm9fbg/MRHp0CmgPiqwfqJK/ggnx3XTPPuTE8aHJCaAiIkAYhIyMbSU/HITNVi0oG6WtBASKijJD6D9o4Tk3hwjMTnWBt15wMZ57So71w31OsCtordZua5eDxl3Jc+FPLW7bz82eWhU4kFyOSUhvpQCCHhY6GoDg6r00boL2c6EuiCDsJ20DQGh1WVewcsvajKRZxANrn497xgkW6bP0vtUrw4AFX3oLUenh5kucYt27j1DD9Z1iAHhWk1+eZdb8MIKn9BGGm4n0IBQl+1cd2GUPqiqNgCYZdeUFhclJjbUiLPc5iS3VD47yLx11edY6MamKsynqAz40yQGhwmE/t7uXittWJKm/EVypsfp/aPitHWapHtWERKBGWSbW+xuRsjjzdSchOEgWQxSiMlzjDxwg1Cpd5K6/CgicSyhqTsnt6knIa6uJzenrhuowKCHw4m5DcTwwpbueYl1qoXJxOKbi5WTIgua2hfO3ixL48mFxdxnWfGfS/pdsmu+xdtacza4ZdYcx9pXH90z2YT/gAXkKgkFuUHSC7/9VESI7zyQIwIW0+V5B30wvwJYTJ8A4Xk4QDjx02HVYdknPpoU8r+W/9qRUjTgixhaGgL/iN+Om7tQrz7IQE0dV5BqHODen4qVfUMuWzEfPaWPtIubpJWvrSluXrlfqYuutzXM2gBb6OjUjrNNVHVRdUKl4a1DkkcS/+dvhjVut6xqThou1xOBPbGxUUZIFjCHObp7oJm2LDgpcJsBqAvU2karKS9L5Lwd5/raR6s5UFzrkZX/2OM8wZ2g/B+vhyzjNuaH5fO/j4zhN8PXKbw4dPEoDxjd+67tfUEM0leOdhBHD+dQeREkHq8fP0Qc76xoRyRbkdAimYfT/1o2KG11FCraGqWuTecKdDFQxbEkiZgnf1VlJN/8fJtAP7ytXXp4BGXhrf3E994dHT6fycOrbESb38K0WOvKL6jYiwg0xy2s4jp+5mbqa9/2KuJVpgaNo6He+rp41k5QLxi9gS04mvqmyGNmpNaZNpLGRSHjMlPQYMqbFGC/V0XYvLcwz1eWjO1VQS24dzCzL18ouu+enY6emaOHqdnoKmFjONUqIFjh+3rOj3akEib2spxqO5jPak2pShPEDfo3XLWpsHiAHzAe8O9VITYhFqYfYLMXEbD6Bzt0h+25iOgLW/gINIgVCXugLS1dW1yt2DW70boadXXl4Bypa1FNS3/KNJcWE2f3HIWYdhy05jk9Q+3U0+M/72AX946CQrc2Vzf3tsKC+ZhgCqLIFzVPtGl+jq+JN3Kuge/UzM5b1t96J4METW191UZVLX3NAk2tn5r2yQGO18Jr8wZKqChbK6s4Ktue/N7B76rZqtuMPdVXUCXDMrI8st1l/LhTqZIKlbcB1yE2pYK14glDrEiFwNgM1LMbFaLL2BxiKSreV1ZzPdtQS1VOWIPaGzZ/FayxptQ3cRXyY5NX34zfL8wLkgtUaP9wXGJ3b39vYmLvMOS7J0AvuX+TPJidmDygZ3fHJce9oFRg+cpddD8yAv0aZObETwKJDi/nHZb85g7UdHQyxj6SrmXr/jEbMHNmGjyC2bsrtegU4OwmD4DvjHTposMBop8+wwHlAeiCY5lULAACEmCUCrJptHTbAHLvP/FrMb4uKu/Lzqrsf1/aLV7abap4WLnWnW+vFRdmnibtwBYg0zAOtPVwDjaV/C5Q8f/04vJ7+tiSgd/yj92VztsSi+hxBZUBygfiwZzTjA113U0twm/PngwLV/y1ide3sQ7QU1NxveTBO52/6VxnIbHs3QB16GUdtPC7TFD5dU8txcsW8s7c0/mtuYoVfMyV8eaN/41HfIJe+PG/t/ybd9xX317kYptdU4zvUg1n8V7DPmFRwuObH+0TUBbJ71c0Y6IPsqYFztAoyK5ZYiRFCqflc+24WyvOUvwlBrO6X8uRrMEmhmGsSku8lYuTJfFbEFT5bFoKDVgyfarLbt+4aL2i8s2rRNr7c0o2gda+NhG4c9pV1/SueHTPDH+Q9vp3Q33BrS04iX8313D4voMr+OcrzUvhUjj6d3KZWz5I4vyzBlm3PaTZg3rwPljxvhml7jleSgX6zgIaj9WKWUVMzGc/KxH3sWJWrOSlbJOqot+bJDE7J1eHRgcnV7vwYVl+aTZpW9n2Svsv2j+UkxsadY9JBjJ5Vvrehf6WEJPXIRc6smwF+ALsvigHR1c7SgzuFLXJJG0rE2+1aRUvyy/NdM/hoe2d3G0u2Di7268GkZVfTfZS0VuQ9BVXgQrIuVdLt2Epcsd4om6x3Gk1PYWSSuB4bsSuYnkV+QIfWWQOlXTx9nQuHDd75KyT53nS2lhL2tNuCeEryPJc/YMBe+cgNad5UfeYpG1ljWUZXpS3eTXpR8xFKbel+4Q2fDm86v70la9yGHtMb72j5VyT1sSmK2UlHhEhYDv1t52WyGH0/TV9mkHnS8u4iIY2vlnIF662yo8dfC+H7ilKywWzbL1bI5XDHQhIpAUp8IygA7Gj/iD2SRlEb3IyK5gIjBc9dSpvbb/0TVqBTUw8ZhVzE6MtpHPhB0FnoZ/KXScncCko0JFiUNjUM5CFAfmQ9k/j0YaPd6INPo52tEuPf8Z2rvEu/jlTXnzuZ7P22wyyX0XJuR8/MRd8prmOb+f5KMbT010mNDBG0hvLiHBnf8ML+95WkIasUHB4QiDtTd2XmOJ72MSn1XbjSBMk4dHgI63RD29aEF9azRTWUFhiFSl+fdnRolYaPNCsiXdrS9BRm2/MbywIEvQbU+OrsFBS0E6INJFGEh0seJLKlIlnpfuqYkWswSKCySzx6IpHRgbNeOTs3FCrFLvWOYtl3G2ImAvnhGKfdRRGROaCBD0tUGJi7qV5xjlg4bVdksTeauW3ReZ+mgOoXkSIVGjjErFfslRkzkcqPbU+EBGXoKNEYGnIPKNKZnlsDuK8Mo5E5njEuUsuYrL15YgisBUSvAsblMUeq6Eo+JsClQMYgp85pEdl3NUXFDykTmUya0fa9zetKpOeQDbqkHKVb1pTUum/6Vg9nWNi9Juqld80MaRx9dSNdctvileOZO2cV/5N/xV2gjby9nW3iljvbtdwrX0mPVUuiBBxyHm+PxuvVVexIIQAUXcI5qfrbTUKdhKIknKtVsEaJUFAnYrcGVDwTwuw/IOwEhmkHypVihiVeqbpwYEBlI1pdIiVAij8T/cfkkPBe2U0XnT45T8B+Lok93LB367IUcu3+zhY1FhBCKPxar9uP8OAhXK4fuCVmjaTqjF7JJitNAtqbr9jO/lnwzxL2aWRNeDeVKT3bbvbIMZvcnXy6y35wcAkaBk0iTpDNtGfcmcLf7UCFpMsJYiDO7I+4DUzx9uOZmbNE6YmDL6JKzHZB4i0qXkKISzMp5g/5qQJbN2aGRwELO/2ZCZl4+DSan9yiXLXTczd3C0Bc7Wls8u50jVmbg6YWdKisS4gckwxd72+HitnNwulrnEz02y8hHPQVQVmXVgju35Xc1WJCNHcFZ+fg/fCW17Jtsj2Zv+cO7ARl+uVa3mJaEL0zz0cNwgQdz0FUP8Ssa/7sJ1Lie3rf+q02ggbJ/5thFylhdRUh2/pJj0ThX5Pa7xJPakm1Xm1YHAWsHLehyQ4kbVbv5KAXAAbV9U20ADMoMULRRVNB6oz2hrVbfn5IWl2wgZwhEmutXN0b4zzPGHqFXOHbaLRBNKnSSM/XlP3msVzZeUQZeUiFWU7PtCgOAtCsusIMZnVQXvJf9MBD8ih5Mf7ZZOrZNGW63bmZOey/r5qcmljCyli2dHIxFrP0dTc0lhByv6hULdDXr1sSN8KG1tCj4SsYFqm1fUDl661lOaikkksIaXUWyCcCC6t/eXIjIzF5eMibwR/2GFUg/dT+1LQd6WpRV65onOlZ8rWDVI+3zjw/9fmqa9f95c9pkCyelSK+zaMTaGjLc4ZPd+n4JMsRAj+AMoAfa5r8MRAV9uJezH3Ta7F3FFnRW6Kns3Erz03ttTVsrMUETDe0NURBD7OwHggoP933QbKebjVF4MK/4sJ+6Iq8ekKAzCHwnfab5SNnfe15LmK2EulSJlr9NQTbvhK++kTSOW19Q4CPhduk6cZsqbIkwxBjDNMRpLDKVpeU5+2BGd3+AJjwtyVHSDmBtIxDCqGxAJy3pmsLDKZxxLpBoX/pgI31YEpphXiTUeSwlsdT/q6KTtOeuZQ6UAhYyn2Yn5Rlak8tj5BwOfMfjAHnd3YZJLTCQo2LkQUAVy2XIaTjTwB+6HYs6h7jggSpIq5wwGebZpsFBXNay8udCFQWlwIxYcnoAjt72t/LYXr25TvXIYhH5Q7Q0z3M7i5I7rvyeIcem3UVvk5oX6Nqk+KxF1YM3SpzqtZC/XNqb2cGgfNVAFcJqh6qwUU1pe2Mg0hyzyyT381sti+2elEQxiEQdhGhHU6l/Xfwq+9uF9mT1wXziV60omCgv2sF3hBXpmknKOc+Sau+bOiLVx9Q+q692NBApWHVnvSyTQPlTyhUB35WLezOxFEu6lndtuHgoaUDBQwcL+d3sHHv3q9SoihO0MeDn9/dnz6ZJaBG4wpLD4xqi4qSYQNhMX9hLgKts//hhESouqjCCkET1F7bELY9WKbGhO0SY3NWcs9Y7TxnqV5xF+b7ljfbhux0Tr3CnT+7AIMUw6hKcU/Et13PPouqt8rCX3U8v8xWj3E5pBA8V/b6J1wKE13t1NiK38VEbNBktvY571aNpvRERsB9uXHeSHofjG8NKwdkUpGP9VEAivHwspGC76/HbaGJSjY5/i/S5loiqnUTvUCXKn178zu7WfQq5MUM/3y/YwqdeWQFsbDuX1kCXRJfoOdsp3TR0xNSbfKYVPXtmd5/NADmnCBLq6pRT+gdmVrea37r0q4Au0I9QcRPTCvdl5COrWqOm0yITF9srpqrpSQi126g/W+s8TpHctRSR9PTEgbV7kr3sucX12eXwbctRU6+y8PeSpBleV6rXJxtpdHu7ig0uPXkQta3t7FGaWZcsVf/qlCwBWeS0UKT+ViL50XvOGl5768v6mokTrkqAjUh3alBGQioOODiYm9/b29iTqS2lP1SJbaKvBfU1PHVNuFTgwmE7p7u/uToZLJCBkG6ddLoYZ2drPd1ZmkF4s4jQJfVSm4TARkYigxgZxr4l1YARevCji4O6EEZOKfQo8Mn4zwIkAvCUnzyXYpxg0B1FvdQTlOLwh/6XsK4mEYOthDQQmoyWfskuWTFloCXNubxCzAL5SeTwcsWC6LCx0MrbR017h8b/r53i69DTZq8pPHu3oyROSRF+/oj2zWPP4fRuWdYP797K3HmnoRXnbIsaL8++62AjDXNR/uL4tjgphWWW/3/yx61zNC+d7jV742tH14KZk3jGqz4O2G0LlTUlqU1Hq6Wq9v2wvt5Qx5bebwkJ5v5g4dp/7GWP8KbDN1H6DsfyV0vZw+zdhi9OsrDH2aoYALS4iytjB2nby2MLeM58YjaQaSzCSWJaGd11imEJY+yrJ8aGcbSwWz1GuS/sTSi1m2QSzzIcsaRzvdFtDdK32bvNv0nXttn1J9N4uo6UXUj+6LPktZJ1nwCkRCO7qWO4RmPLans1jHBO7rpZSVduq1VHWUb38b6dvUFI8NSnTVtQ9Q3NsI3Ev0SUoX98R9OGRqxv9Cq41rV1jaYjitfCPakbQpJKONsl5TVGgcqRHTS0naO7KIqt5E06elTqm83sHb/JpoLV0P0LZKJY1+kjuSok9KH4GyO566W/077CV1g6IhxIjhZsi4HZ69raYtBuR/Zd2c5KJwHUlUHUm95hu1WozadKLaxoiU79Yjua3ewzxwQgVu85kKnni29Oz3mGI6xOUgqn7rObKXXlQexgD4bQaztEVNypPq4BaIIgdjapZLXU3eWzdssPd/dyuligP0uvOSbx7aCrA8VzROQkUX4iZ0J2X0vDOHKvY7wE5UXeVaDZWhUweVV3ptR7ft3FwUD7EVPB4V31VNr97z+CDvQ+B6lrImhbeF2FAWj4vt2lMa0NMe5WJzvW7Jqobm3eetEqqOPGekLapzNeve5JA0RpeDB/UHt/uUG5R3VZSUHvTvpChLKw1Xv02JfgNYlRLkZSqKkqasAGBQ2pRXdImGJUXw16NuVa0jp8b7M93qceR+qlQU7Bb+BE9BpgLckXr1M/BpP7jlLyC3gh9t/d8Rthv+ImQ/yOWmwZyWI9TYbjIit0peGmti2NVl/GxQRxclvqkBUwHlrqdJrSJ7wJhvQf+BAHsA8DM+VtZbZG5ey5D79DmvKB8VjBlyhmHUjzn6J95elryqYFgs5h4eIDQPJY8xNrC2Udwydc7uJvEUY5hhw1HcGEBRBziPfuSmyfeRYxQO2j02j2A/p11baPpPqf239P7G0un0a4RBa7WZa6O89daoddeIgz5GrEYjth/ErdOZv5NyWy9ia/iC+6vYdohZD1n9ynaOVb42ql+KuWUR8y3djCef76XOCRTbJ8lzMf0ErlfDAdNHdsOeFSmhYWa/pg9sWOx1y04BK2xfBgUpvbx1tK7kG5fZ7Fkv5iti6D/PIiulzu0rV7KcMZZ6DjGfdyJNirT9mFsHXFxb5LRfsJ6zrMfq+yP9luw+gFsgb9pLniKok8SlR833vp6Wxn1qwn1BY2X9A9/eUQRM/SVDOGuPwmq6RU3vBdbaufc0m5vq3gGBKlCgRz1vTN/ucWj4wnc9hMc+rOYMxeOoYgWvbGWWaZfVDlk8y08KjYQFdnG9L5RGm2Yew6xRNuwgZgwirD7po8xaZ8vIS4yFtV72yOVq7zPnYjEf/v8IM0xeNyraQhXJrn3qLYVcAOkS8dbQaravN3jZu8dQ0KqqjRS2Sk5FUcuHWi3d5qif9bR9XBSl9h2Hzc2Uiz5J7+eSp6MTqFZksYXymFVYKdXsKxeUxd2u/zrGtoP2UBttv9hmHzTNulen0Wb1zZ6tvKYa1BVJJ5d4f2rs13Sl6K3px/rWBlq3gC/LdYS79U9g3oN/gUC9bR0eUCAI2AgAc8ULAbCYmDcfVAFfiDl8E+ge39GI+aF7AodPwSYpawjMUNF80Lt68gVxbpBWt7t6B595GKR3A+KSgSdYOTxFFfMMrVKexYbnBRxiO5zjklFrIMB85c8TBOVvnsIxhwhTt7h2FjYxSWTyojIpZxjnIXIhhW3oCbt9B1LefcM/DAU5BWWDLj4dFS/KXAwWGoThHdLC6GQxUN7mCZHxRWRAWk46KBErrVTOIStnGcHjUx+lADnYnOeJFbOfJTkqIZBnmbmgKq0iLZsGzmypFOaONJQyOV+daXLDHlpZs02FeGuhmq6khWsrlL54JGIFz4wZ8qLgrwB47wtfyeS4EYIp6w0zNVEfLuvMTA4GbCdHGhTmKzHDd6AiW1Tcmw3samYlXGNbmYmOymaQww8mXWXO3G4YTXk8T8l5ObKcjehz4ZZBgJWlZ9mZKcsdFeR9aEi5pLd7sveY9uTWDEIXk8EkTVaNLP8Fs0ronlOBX1iDH7zMVKD8fNMmYRZK1tufwr9DhxIGDJbcz75hsYNu7kMeUe2JSiv+/rzJXrURYIl7zKrCESssD49FTniUbthsn48+aLfdT845o57BNKukuuA7Z513WauLLnnK6LorrtovzRur3XLDTemee2mxTBmmy5bFZKscM82QK0+BfIWKPFNslhKzzTVHo23KlJpnvhdeafoIDWMd1+tfnYKdg7MfQ+XmQfhoDBaHJxBJfPwCHX1xKSQsIiomLiEpJS0jK9fVbaigqKSsoqpGVtfQ1CrK/lhEj6JPP2GgvQ0bET56xozHlnaZNGXajFlz5u/T98dfr7zOgSMnWvKOG8G1z3xeMLz58IXlx1+AQEGCmypEKBx8h94UJlyESFGie+y5XXueOrBjvxtixIoTjyBBIimizE0pUqkRrZ+IJANZZjVlyZazGZevgAzfN4lyFSpVqVajVp16DYSPDYJHZOxz77wRoxakmUXWbbE27c24hVaHTl269ejVp9+AQUOGjRg1ZtyESVRTaKbNlNstdLfNmjNvgRbd9w0rVq1Zt+Guezbdt2XbAw898phucl+VwvfMd1Wr8p9WxWq1K1CqrPc++OgTHeVkk5uPQbfH6zM5AFGSFVXTjfCmmJb99R8YhPRu3sXNw4vGYCnohQTiEX38AoISCX/JRsXEJSSlpGn5CQneLcONCp6QNpyQcNx6PABEmGRT1GYeFTugbZeKJS+WEaoDSnZurSFod3O9wWgyW+jupdKkv0qT6DiDcWkWK1GqjJozJcYXJc2Ha900DlHE+3Njxk2YRDWFZtqMW+g+f7qfc/yci0+Wxt4RBFjS2yQYvVHba6TtmT0MT2CGWmu3B7h0NxsJz34tgTeuVhfa2bGiBWe1qnCerixYGhQz8mJLLC9hSVheaf1fDjm+gYbx2iDhhmoVXko7ufdBBCEHX1lJ/+vVtUB5J7dudxqtPkEi61uevxXMuU8WbhBVwVXehdvSCy0Cb5PYreziuXWQS7yf5m4/cp5fvasw5/sGE5t15IuAI7+gAZi/EfAAIjUE4TLExzTWuhvfYhNW8JQtHyfRxZqRN0y8Vn1QMPDn4uuJS3keO3mSxJ5Fj/IlkGcjz+vPbnrv/v0ijUJMTV16Knhr1CgH34hRFbyHlPp/vfp+BJbUycg65iY/8HOWR4tdwz/qrUcSyDFBPJZWAnM8bgZXRrvm8b+rIpB80XGyg5cqHr+b89HXp06+lcsrq905U9So/fZaojghbITFohKSPezfZ5ZnpNAzJGS0KVdYmI3oNc42pt3+IhDFwnAKQUpnke7xghOjpMHPSoxUEgQlViMkGb5xPJBAtEADR978daOC3UPz+0iZ3Y/lb/Zo5uXsl3c7X6Sqw5PNxfESfnOX/w9FRMGlYliAEIygGE6hEpIWocKGAcQmqMHQIzkAQTE8NICnAgAhGEExnPJ0vQo9hQWlT/tAygC9GYcR/YxsqppEj6QAEIIRFMMp1HsxlTEpNHHPrSkN0TsLump727KmLMWwCkWClG+VOoVcyR3XhyU7HKVJZb2h0vqYQg2IflGwiBjLaSorzh+reFQqdTMsCZsAQjCGE5KxSzoadcLA4pEms9omODzkxLDR2MCJGFggBCMohkvpGeJ4HMsMOB5t5D5wQwMbXTrxd83uiEZ/M+J45t4iSDp6M/QmyGgRWjHyjyAcDr+24qsVHF8uAS/f2sLld2UOfYA7DNjChs1d32q+6yvoGzwbPYBQL05R3KXh23B5Bv2+p6bHFC43+P84NW4xncptt3AzzpuvXgxmSltF/7O4mo+wKtKeRhWj6TUUZ+z10CDBLZrIfpmZ5dV85JSjJ8XtrbLKjfAsXYA2P6dpVSlbwGbajXkuWjhyuFo4TrNKxVsiv7q0LbsIV/68zaUw71X59WXD5jnGZ9/PIGNaHjWNLEsDQC4XjFFIFgwCJB3T3t527K03IHYWlrvsV6U3c3HwLqfxS3JoOBFCM1GUp0bjZnGUIfGARIkqkS8OkzYRZrInSqUjcSzadAtfvW5T8KozAYu2LVH+0IXgc/FDcZc8IAgdAkHeUIKLGlBOpeSbmRiW+qc9coGyIpCZZVkSOyCCstC0wWqVbY0pFfUYVD3f7wTQHgAHpsBBAEBZBODgEQhlQ9M02rp3srA5pxUvYzSOoIlKTVvxlCFQdXmtrIU6M23TVHXnxpybFR2q0n0oGtxUtrZLDQrx9VX8xWL2MQ1TqQ/dLnEbObO+tMox40BUNWblCpOi7bKmbV0AFHbZirNFCzOtBwGZTd32dTB53RcxFFjyCLV2PEsIu915+ZmaNkSyxlHXLzOkKfTNxHHI38JVhtawdFurteI9E7eSVO9nK4gSUgx3msEz1qCOpAhB0ZjbF6w5z7RVvThX0nYhtKQon2eZu1hmrcOB8RrPzrLotXhZc9RU2dTMaVVWSycJnKNhUUqOPNeC2PX6ployg2P53yvWtdRW18JNkgT08wtzVXM2OBXqyg9VnhwPGOw07JshDKrapPfl/JZ9U1UQv8muyogzfjq3zcXfBk5dUaandemo1Lpu+gfxRS0quGhm0MTixgxyGUTXdZZIb8fSeJ5iIbyL6xxlDU1z1Ondoq5WK/TiBmGFViZDOT9TXHjq9J/1n/df9F/2X2XX2eLqMYT6Bda7m7tPU7tesjePu86yzG/3v77fxWK6k+sviyhq2vJhA9bGk3/X5eN/AAAA") + format("woff2"); + font-weight: normal; + font-style: normal; + font-display: swap; +} +`,es="BaseSans-Regular";var eo,ec,eu,el,ed,ef,ep,em,eh,ey,eb,eg,ev,ew={},ex=[],ek=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,eE=Array.isArray;function eA(e,t){for(var n in t)e[n]=t[n];return e}function eS(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function eC(e,t,n){var r,a,i,s={};for(i in t)"key"==i?r=t[i]:"ref"==i?a=t[i]:s[i]=t[i];if(arguments.length>2&&(s.children=arguments.length>3?el.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(i in e.defaultProps)void 0===s[i]&&(s[i]=e.defaultProps[i]);return eP(e,s,r,a,null)}function eP(e,t,n,r,a){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==a?++ef:a,__i:-1,__u:0};return null==a&&null!=ed.vnode&&ed.vnode(i),i}function eO(e){return e.children}function eI(e,t){this.props=e,this.context=t}function eT(e,t){if(null==t)return e.__?eT(e.__,e.__i+1):null;for(var n;tt&&ep.sort(ey));eU.__r=0}function e_(e,t,n,r,a,i,s,o,c,u,l){var d,f,p,m,h,y=r&&r.__k||ex,b=t.length;for(n.__d=c,function(e,t,n){var r,a,i,s,o,c=t.length,u=n.length,l=u,d=0;for(e.__k=[],r=0;r0?eP(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):a).__=e,a.__b=e.__b+1,i=null,-1!==(o=a.__i=function(e,t,n,r){var a=e.key,i=e.type,s=n-1,o=n+1,c=t[n];if(null===c||c&&a==c.key&&i===c.type&&0==(131072&c.__u))return n;if(r>(null!=c&&0==(131072&c.__u)?1:0))for(;s>=0||o=0){if((c=t[s])&&0==(131072&c.__u)&&a==c.key&&i===c.type)return s;s--}if(os?d--:d++,a.__u|=65536))):a=e.__k[r]=null;if(l)for(r=0;rez("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:ez("path",{d:"M0 2.014C0 1.58105 0 1.36457 0.0815779 1.19805C0.159686 1.03861 0.288611 0.909686 0.448049 0.831578C0.61457 0.75 0.831047 0.75 1.264 0.75H14.736C15.169 0.75 15.3854 0.75 15.552 0.831578C15.7114 0.909686 15.8403 1.03861 15.9184 1.19805C16 1.36457 16 1.58105 16 2.014V15.486C16 15.919 16 16.1354 15.9184 16.302C15.8403 16.4614 15.7114 16.5903 15.552 16.6684C15.3854 16.75 15.169 16.75 14.736 16.75H1.264C0.831047 16.75 0.61457 16.75 0.448049 16.6684C0.288611 16.5903 0.159686 16.4614 0.0815779 16.302C0 16.1354 0 15.919 0 15.486V2.014Z",fill:"blue"===e?"#0000FF":"#FFF"})});var eW,eJ,eY,eQ,eX=0,e$=[],e0=ed,e1=e0.__b,e2=e0.__r,e3=e0.diffed,e6=e0.__c,e5=e0.unmount,e4=e0.__;function e7(e,t){e0.__h&&e0.__h(eJ,e,eX||t),eX=0;var n=eJ.__H||(eJ.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function e8(e){return eX=1,function(e,t,n){var r=e7(eW++,2);if(r.t=e,!r.__c&&(r.__=[ti(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=eJ,!eJ.u)){var a=function(e,t,n){if(!r.__c.__H)return!0;var a=r.__c.__H.__.filter(function(e){return!!e.__c});if(a.every(function(e){return!e.__N}))return!i||i.call(this,e,t,n);var s=!1;return a.forEach(function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(s=!0)}}),!(!s&&r.__c.props===e)&&(!i||i.call(this,e,t,n))};eJ.u=!0;var i=eJ.shouldComponentUpdate,s=eJ.componentWillUpdate;eJ.componentWillUpdate=function(e,t,n){if(this.__e){var r=i;i=void 0,a(e,t,n),i=r}s&&s.call(this,e,t,n)},eJ.shouldComponentUpdate=a}return r.__N||r.__}(ti,e)}function e9(e,t){var n=e7(eW++,3);!e0.__s&&ta(n.__H,t)&&(n.__=e,n.i=t,eJ.__H.__h.push(n))}function te(){for(var e;e=e$.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(tn),e.__H.__h.forEach(tr),e.__H.__h=[]}catch(t){e.__H.__h=[],e0.__e(t,e.__v)}}e0.__b=function(e){eJ=null,e1&&e1(e)},e0.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),e4&&e4(e,t)},e0.__r=function(e){e2&&e2(e),eW=0;var t=(eJ=e.__c).__H;t&&(eY===eJ?(t.__h=[],eJ.__h=[],t.__.forEach(function(e){e.__N&&(e.__=e.__N),e.i=e.__N=void 0})):(t.__h.forEach(tn),t.__h.forEach(tr),t.__h=[],eW=0)),eY=eJ},e0.diffed=function(e){e3&&e3(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==e$.push(t)&&eQ===e0.requestAnimationFrame||((eQ=e0.requestAnimationFrame)||function(e){var t,n=function(){clearTimeout(r),tt&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);tt&&(t=requestAnimationFrame(n))})(te)),t.__H.__.forEach(function(e){e.i&&(e.__H=e.i),e.i=void 0})),eY=eJ=null},e0.__c=function(e,t){t.some(function(e){try{e.__h.forEach(tn),e.__h=e.__h.filter(function(e){return!e.__||tr(e)})}catch(n){t.some(function(e){e.__h&&(e.__h=[])}),t=[],e0.__e(n,e.__v)}}),e6&&e6(e,t)},e0.unmount=function(e){e5&&e5(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(e){try{tn(e)}catch(e){t=e}}),n.__H=void 0,t&&e0.__e(t,n.__v))};var tt="function"==typeof requestAnimationFrame;function tn(e){var t=eJ,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),eJ=t}function tr(e){var t=eJ;e.__c=e.__(),eJ=t}function ta(e,t){return!e||e.length!==t.length||t.some(function(t,n){return t!==e[n]})}function ti(e,t){return"function"==typeof t?t(e):t}function ts(){return window.innerWidth<=600&&window.innerHeight>window.innerWidth}let to=()=>{let[e,t]=e8(!1);return(e9(()=>{let e=()=>{t(ts())};return e(),window.addEventListener("resize",e),window.addEventListener("orientationchange",e),()=>{window.removeEventListener("resize",e),window.removeEventListener("orientationchange",e)}},[]),e)?ez("div",{class:"-base-acc-sdk-dialog-handle-bar"}):null};class tc{items=new Map;nextItemKey=0;root=null;constructor(){}attach(e){this.root=document.createElement("div"),this.root.className="-base-acc-sdk-dialog-root",e.appendChild(this.root),this.render()}presentItem(e){let t=this.nextItemKey++;this.items.set(t,e),this.render()}clear(){this.items.clear(),this.root&&eG(null,this.root)}render(){this.root&&eG(ez("div",{children:ez(tu,{children:Array.from(this.items.entries()).map(([e,t])=>eC(tl,{...t,key:e,handleClose:()=>{this.clear(),t.onClose?.()}}))})}),this.root)}}let tu=e=>{let[t,n]=e8(0),[r,a]=e8(!1),[i,s]=e8(0);return ez("div",{class:eK("-base-acc-sdk-dialog-container"),children:[ez("style",{children:'.-base-acc-sdk-css-reset{-webkit-font-smoothing:antialiased;pointer-events:auto !important}.-base-acc-sdk-css-reset .-base-acc-sdk-dialog-container{position:fixed;top:0;left:0;width:100%;height:100%;z-index:2147483647}.-base-acc-sdk-css-reset .-base-acc-sdk-dialog-container *{user-select:none;box-sizing:border-box}.-base-acc-sdk-css-reset .-base-acc-sdk-dialog-backdrop{position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.5);display:flex;align-items:center;justify-content:center;padding:20px}@media(max-width: 600px)and (orientation: portrait){.-base-acc-sdk-css-reset .-base-acc-sdk-dialog-backdrop{align-items:flex-end;justify-content:stretch;padding:0}}.-base-acc-sdk-css-reset .-base-acc-sdk-dialog{position:relative;z-index:2147483648}@media(max-width: 600px)and (orientation: portrait){.-base-acc-sdk-css-reset .-base-acc-sdk-dialog{width:100%}}.-base-acc-sdk-css-reset .-base-acc-sdk-dialog-instance{background:#fff;border-radius:12px;box-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 10px 10px -5px rgba(0,0,0,.04);width:380px;max-height:90vh;overflow:hidden;transform:scale(0.95);opacity:0;transition:all .2s ease-in-out}@media(max-width: 600px)and (orientation: portrait){.-base-acc-sdk-css-reset .-base-acc-sdk-dialog-instance{touch-action:pan-y;user-select:none}}.-base-acc-sdk-css-reset .-base-acc-sdk-dialog-instance-hidden{transform:scale(0.9);opacity:0}@media(max-width: 600px)and (orientation: portrait){.-base-acc-sdk-css-reset .-base-acc-sdk-dialog-instance-hidden{transform:translateY(100%)}}.-base-acc-sdk-css-reset .-base-acc-sdk-dialog-instance:not(.-base-acc-sdk-dialog-instance-hidden){transform:scale(1);opacity:1}@media(max-width: 600px)and (orientation: portrait){.-base-acc-sdk-css-reset .-base-acc-sdk-dialog-instance:not(.-base-acc-sdk-dialog-instance-hidden){transform:translateY(0)}}@media(max-width: 600px)and (orientation: portrait){.-base-acc-sdk-css-reset .-base-acc-sdk-dialog-instance{width:100%;max-width:100%;border-radius:20px 20px 0 0;box-shadow:0 -10px 25px rgba(0,0,0,.15);max-height:80vh;transform:translateY(0)}.-base-acc-sdk-css-reset .-base-acc-sdk-dialog-instance-hidden{transform:translateY(100%);opacity:1}.-base-acc-sdk-css-reset .-base-acc-sdk-dialog-instance:not(.-base-acc-sdk-dialog-instance-hidden){transform:translateY(0);opacity:1}}.-base-acc-sdk-css-reset .-base-acc-sdk-dialog-instance-header{display:flex;align-items:center;justify-content:space-between;padding:16px 20px 0 20px}@media(max-width: 600px)and (orientation: portrait){.-base-acc-sdk-css-reset .-base-acc-sdk-dialog-instance-header{padding:16px 20px 12px 20px}}.-base-acc-sdk-css-reset .-base-acc-sdk-dialog-instance-header-icon-and-title{display:flex;align-items:center;gap:8px}.-base-acc-sdk-css-reset .-base-acc-sdk-dialog-instance-header-icon-and-title-title{font-family:"BaseSans-Regular",sans-serif;font-size:14px;font-weight:400;color:#5b616e}.-base-acc-sdk-css-reset .-base-acc-sdk-dialog-instance-header-cblogo{width:32px;height:32px}.-base-acc-sdk-css-reset .-base-acc-sdk-dialog-instance-header-close{display:flex;align-items:center;justify-content:center;width:32px;height:32px;cursor:pointer;border-radius:6px;transition:background-color .2s}.-base-acc-sdk-css-reset .-base-acc-sdk-dialog-instance-header-close:hover{background-color:#f5f7f8}.-base-acc-sdk-css-reset .-base-acc-sdk-dialog-instance-header-close-icon{width:14px;height:14px}@media(max-width: 600px)and (orientation: portrait){.-base-acc-sdk-css-reset .-base-acc-sdk-dialog-instance-header-close-icon{display:none}}.-base-acc-sdk-css-reset .-base-acc-sdk-dialog-instance-content{padding:20px 20px 16px 20px;font-family:"BaseSans-Regular",sans-serif}@media(max-width: 600px)and (orientation: portrait){.-base-acc-sdk-css-reset .-base-acc-sdk-dialog-instance-content{padding:8px 20px 12px 20px}}.-base-acc-sdk-css-reset .-base-acc-sdk-dialog-instance-content-title{font-size:20px;font-weight:600;line-height:28px;color:#0a0b0d;margin-bottom:10px}.-base-acc-sdk-css-reset .-base-acc-sdk-dialog-instance-content-message{font-size:16px;font-weight:400;line-height:24px;color:#5b616e;margin-bottom:0}.-base-acc-sdk-css-reset .-base-acc-sdk-dialog-instance-actions{display:flex;padding:16px 20px 20px 20px;flex-direction:column}@media(max-width: 600px)and (orientation: portrait){.-base-acc-sdk-css-reset .-base-acc-sdk-dialog-instance-actions{padding:16px 20px calc(20px + env(safe-area-inset-bottom)) 20px;gap:6px}}.-base-acc-sdk-css-reset .-base-acc-sdk-dialog-instance-button{font-family:"BaseSans-Regular",sans-serif;font-size:16px;font-weight:500;line-height:24px;border:none;border-radius:12px;padding:16px 24px;cursor:pointer;transition:all .2s ease-in-out;width:100%;margin:4px 0}.-base-acc-sdk-css-reset .-base-acc-sdk-dialog-instance-button:disabled{opacity:.5;cursor:not-allowed}.-base-acc-sdk-css-reset .-base-acc-sdk-dialog-instance-button-primary{background-color:#0a0b0d;color:#fff}.-base-acc-sdk-css-reset .-base-acc-sdk-dialog-instance-button-primary:hover:not(:disabled){background-color:#1c1e20}.-base-acc-sdk-css-reset .-base-acc-sdk-dialog-instance-button-primary:active:not(:disabled){background-color:#2a2d31}.-base-acc-sdk-css-reset .-base-acc-sdk-dialog-instance-button-secondary{background-color:#eef0f3;color:#0a0b0d}.-base-acc-sdk-css-reset .-base-acc-sdk-dialog-instance-button-secondary:hover:not(:disabled){background-color:#e1e4e8}.-base-acc-sdk-css-reset .-base-acc-sdk-dialog-instance-button-secondary:active:not(:disabled){background-color:#d4d8dd}.-base-acc-sdk-css-reset .-base-acc-sdk-dialog-handle-bar{position:absolute;top:-16px;left:50%;transform:translateX(-50%);width:64px;height:4px;background-color:#d1d5db;border-radius:2px;opacity:0;animation:handleBarFadeIn .2s ease-in-out .2s forwards}@keyframes handleBarFadeIn{from{opacity:0}to{opacity:1}}'}),ez("div",{class:"-base-acc-sdk-dialog-backdrop",onTouchStart:e=>{ts()&&(s(e.touches[0].clientY),a(!0))},onTouchMove:e=>{if(!r)return;let t=e.touches[0].clientY-i;t>0&&(n(t),e.preventDefault())},onTouchEnd:()=>{if(r){if(a(!1),t>100){let e=document.querySelector(".-base-acc-sdk-dialog-instance-header-close");e&&e.click()}else n(0)}},children:ez("div",{class:"-base-acc-sdk-dialog",style:{transform:`translateY(${t}px)`,transition:r?"none":"transform 0.2s ease-out"},children:[ez(to,{}),e.children]})})]})},tl=({title:e,message:t,actionItems:n,handleClose:r})=>{let[a,i]=e8(!0),[s,o]=e8(!0),[c,u]=e8(null);e9(()=>{let e=window.setTimeout(()=>{i(!1)},1);return()=>{window.clearTimeout(e)}},[]),e9(()=>{(async()=>{let e=E.account.get().accounts?.[0];e&&u(await eV(e)),o(!1)})()},[]);let l=function(e,t){var n=e7(eW++,7);return ta(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}(()=>c?`Signed in as ${c}`:"Base Account",[c]);return ez("div",{class:eK("-base-acc-sdk-dialog-instance",a&&"-base-acc-sdk-dialog-instance-hidden"),children:[ez("div",{class:"-base-acc-sdk-dialog-instance-header",children:[ez("div",{class:"-base-acc-sdk-dialog-instance-header-icon-and-title",children:[ez(eZ,{fill:"blue"}),!s&&ez("div",{class:"-base-acc-sdk-dialog-instance-header-icon-and-title-title",children:l})]}),ez("div",{class:"-base-acc-sdk-dialog-instance-header-close",onClick:r,children:ez("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEzIDFMMSAxM20wLTEyTDEzIDEzIiBzdHJva2U9IiM5Q0EzQUYiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+PC9zdmc+",class:"-base-acc-sdk-dialog-instance-header-close-icon"})})]}),ez("div",{class:"-base-acc-sdk-dialog-instance-content",children:[ez("div",{class:"-base-acc-sdk-dialog-instance-content-title",children:e}),ez("div",{class:"-base-acc-sdk-dialog-instance-content-message",children:t})]}),n&&n.length>0&&ez("div",{class:"-base-acc-sdk-dialog-instance-actions",children:n.map((e,t)=>ez("button",{class:eK("-base-acc-sdk-dialog-instance-button","primary"===e.variant&&"-base-acc-sdk-dialog-instance-button-primary","secondary"===e.variant&&"-base-acc-sdk-dialog-instance-button-secondary"),onClick:e.onClick,children:e.text},t))})]})},td=null;function tf(){if(!td){let e=document.createElement("div");e.className="-base-acc-sdk-css-reset",document.body.appendChild(e),(td=new tc).attach(e)}return function(){if(document.head.querySelector(`style[base-sdk-font="${es}"]`))return;let e=document.createElement("style");e.setAttribute("base-sdk-font",es),e.textContent=ei,document.head.appendChild(e)}(),td}class tp{metadata;preference;url;popup=null;listeners=new Map;constructor({url:e="https://keys.coinbase.com/connect",metadata:t,preference:n}){this.url=new URL(e),this.metadata=t,this.preference=n}postMessage=async e=>{(await this.waitForPopupLoaded()).postMessage(e,this.url.origin)};postRequestAndWaitForResponse=async e=>{let t=this.onMessage(({requestId:t})=>t===e.id);return this.postMessage(e),await t};onMessage=async e=>new Promise((t,n)=>{let r=n=>{if(n.origin!==this.url.origin)return;let a=n.data;e(a)&&(t(a),window.removeEventListener("message",r),this.listeners.delete(r))};window.addEventListener("message",r),this.listeners.set(r,{reject:n})});disconnect=()=>{(function(e){e&&!e.closed&&e.close()})(this.popup),this.popup=null,this.listeners.forEach(({reject:e},t)=>{e(N.provider.userRejectedRequest("Request rejected")),window.removeEventListener("message",t)}),this.listeners.clear()};waitForPopupLoaded=async()=>this.popup&&!this.popup.closed?(this.popup.focus(),this.popup):($(),this.popup=await function(e){let t=(window.innerWidth-420)/2+window.screenX,n=(window.innerHeight-700)/2+window.screenY;function r(){let r=`wallet_${crypto.randomUUID()}`,a=window.open(e,r,`width=420, height=700, left=${t}, top=${n}`);return(a?.focus(),a)?a:null}(function(e){for(let[t,n]of Object.entries({sdkName:o,sdkVersion:c,origin:window.location.origin,coop:Z()}))e.searchParams.has(t)||e.searchParams.append(t,n.toString())})(e);let a=r();return a?Promise.resolve(a):function(e){let t=E.config.get().metadata?.appName??"App",n=tf();return new Promise((r,a)=>{en({dialogContext:"popup_blocked"}),n.presentItem({title:"{app} wants to continue in Base Account".replace("{app}",t),message:"This action requires your permission to open a new window.",onClose:()=>{ea({dialogContext:"popup_blocked",dialogAction:"cancel"}),a(N.rpc.internal("Popup window was blocked"))},actionItems:[{text:"Try again",variant:"primary",onClick:()=>{ea({dialogContext:"popup_blocked",dialogAction:"confirm"});let t=e();t?r(t):a(N.rpc.internal("Popup window was blocked")),n.clear()}},{text:"Cancel",variant:"secondary",onClick:()=>{ea({dialogContext:"popup_blocked",dialogAction:"cancel"}),a(N.rpc.internal("Popup window was blocked")),n.clear()}}]})})}(r)}(this.url),this.onMessage(({event:e})=>"PopupUnload"===e).then(()=>{this.disconnect(),et()}).catch(()=>{}),this.onMessage(({event:e})=>"PopupLoaded"===e).then(e=>{this.postMessage({requestId:e.id,data:{version:c,sdkName:o,metadata:this.metadata,preference:this.preference,location:window.location.toString()}})}).then(()=>{if(!this.popup)throw N.rpc.internal();return ee(),this.popup}))}var tm=n(23260);class th extends tm.v{}let ty=({method:e,correlationId:t})=>{X("provider.request.started",{action:ec.unknown,componentType:eo.unknown,method:e,signerType:"base-account",correlationId:t},eu.high)},tb=({method:e,correlationId:t,errorMessage:n})=>{X("provider.request.error",{action:ec.error,componentType:eo.unknown,method:e,signerType:"base-account",correlationId:t,errorMessage:n},eu.high)},tg=({method:e,correlationId:t})=>{X("provider.request.responded",{action:ec.unknown,componentType:eo.unknown,method:e,signerType:"base-account",correlationId:t},eu.high)},tv=e=>"message"in e&&"string"==typeof e.message?e.message:"",tw=e=>e;function tx(e){return Math.floor(e)}let tk=/^[0-9]*$/,tE=/^[a-f0-9]*$/;function tA(e){return tw(`0x${BigInt(e).toString(16)}`)}function tS(e){return e.startsWith("0x")||e.startsWith("0X")?e.slice(2):e}function tC(e,t=!1){if("string"==typeof e){let n=tS(e).toLowerCase();if(tE.test(n))return tw(t?`0x${n}`:n)}throw N.rpc.invalidParams(`"${String(e)}" is not a hexadecimal string`)}var tP=n(65217),tO=n(90049);let tI=({method:e,correlationId:t})=>{let n=E.subAccountsConfig.get();X("scw_signer.handshake.started",{action:ec.unknown,componentType:eo.unknown,method:e,correlationId:t,subAccountCreation:n?.creation,subAccountDefaultAccount:n?.defaultAccount,subAccountFunding:n?.funding},eu.high)},tT=({method:e,correlationId:t,errorMessage:n})=>{let r=E.subAccountsConfig.get();X("scw_signer.handshake.error",{action:ec.error,componentType:eo.unknown,method:e,correlationId:t,errorMessage:n,subAccountCreation:r?.creation,subAccountDefaultAccount:r?.defaultAccount,subAccountFunding:r?.funding},eu.high)},tB=({method:e,correlationId:t})=>{let n=E.subAccountsConfig.get();X("scw_signer.handshake.completed",{action:ec.unknown,componentType:eo.unknown,method:e,correlationId:t,subAccountCreation:n?.creation,subAccountDefaultAccount:n?.defaultAccount,subAccountFunding:n?.funding},eu.high)},tU=({method:e,correlationId:t})=>{let n=E.subAccountsConfig.get();X("scw_signer.request.started",{action:ec.unknown,componentType:eo.unknown,method:e,correlationId:t,subAccountCreation:n?.creation,subAccountDefaultAccount:n?.defaultAccount,subAccountFunding:n?.funding},eu.high)},t_=({method:e,correlationId:t,errorMessage:n})=>{let r=E.subAccountsConfig.get();X("scw_signer.request.error",{action:ec.error,componentType:eo.unknown,method:e,correlationId:t,errorMessage:n,subAccountCreation:r?.creation,subAccountDefaultAccount:r?.defaultAccount,subAccountFunding:r?.funding},eu.high)},tj=({method:e,correlationId:t})=>{let n=E.subAccountsConfig.get();X("scw_signer.request.completed",{action:ec.unknown,componentType:eo.unknown,method:e,correlationId:t,subAccountCreation:n?.creation,subAccountDefaultAccount:n?.defaultAccount,subAccountFunding:n?.funding},eu.high)},tN=({method:e,correlationId:t})=>{let n=E.subAccountsConfig.get();X("scw_sub_account.request.started",{action:ec.unknown,componentType:eo.unknown,method:e,correlationId:t,subAccountCreation:n?.creation,subAccountDefaultAccount:n?.defaultAccount,subAccountFunding:n?.funding},eu.high)},tR=({method:e,correlationId:t})=>{let n=E.subAccountsConfig.get();X("scw_sub_account.request.completed",{action:ec.unknown,componentType:eo.unknown,method:e,correlationId:t,subAccountCreation:n?.creation,subAccountDefaultAccount:n?.defaultAccount,subAccountFunding:n?.funding},eu.high)},tD=({method:e,correlationId:t,errorMessage:n})=>{let r=E.subAccountsConfig.get();X("scw_sub_account.request.error",{action:ec.error,componentType:eo.unknown,method:e,correlationId:t,errorMessage:n,subAccountCreation:r?.creation,subAccountDefaultAccount:r?.defaultAccount,subAccountFunding:r?.funding},eu.high)},tF=({method:e,correlationId:t})=>{let n=E.subAccountsConfig.get();X("scw_sub_account.add_owner.started",{action:ec.unknown,componentType:eo.unknown,method:e,correlationId:t,subAccountCreation:n?.creation,subAccountDefaultAccount:n?.defaultAccount,subAccountFunding:n?.funding},eu.high)},tM=({method:e,correlationId:t})=>{let n=E.subAccountsConfig.get();X("scw_sub_account.add_owner.completed",{action:ec.unknown,componentType:eo.unknown,method:e,correlationId:t,subAccountCreation:n?.creation,subAccountDefaultAccount:n?.defaultAccount,subAccountFunding:n?.funding},eu.high)},tL=({method:e,correlationId:t,errorMessage:n})=>{let r=E.subAccountsConfig.get();X("scw_sub_account.add_owner.error",{action:ec.error,componentType:eo.unknown,method:e,correlationId:t,errorMessage:n,subAccountCreation:r?.creation,subAccountDefaultAccount:r?.defaultAccount,subAccountFunding:r?.funding},eu.high)},tG=({method:e,correlationId:t})=>{let n=E.subAccountsConfig.get();X("scw_sub_account.insufficient_balance.error_handling.started",{action:ec.unknown,componentType:eo.unknown,method:e,correlationId:t,subAccountCreation:n?.creation,subAccountDefaultAccount:n?.defaultAccount,subAccountFunding:n?.funding},eu.high)},tq=({method:e,correlationId:t})=>{let n=E.subAccountsConfig.get();X("scw_sub_account.insufficient_balance.error_handling.completed",{action:ec.unknown,componentType:eo.unknown,method:e,correlationId:t,subAccountCreation:n?.creation,subAccountDefaultAccount:n?.defaultAccount,subAccountFunding:n?.funding},eu.high)},tH=({method:e,correlationId:t,errorMessage:n})=>{let r=E.subAccountsConfig.get();X("scw_sub_account.insufficient_balance.error_handling.error",{action:ec.error,componentType:eo.unknown,method:e,correlationId:t,errorMessage:n,subAccountCreation:r?.creation,subAccountDefaultAccount:r?.defaultAccount,subAccountFunding:r?.funding},eu.high)};var tz=n(2806),tK=n(8851),tV=n(89259),tZ=n(30326),tW=n(52588),tJ=n(92406),tY=n(60627),tQ=n(63994),tX=n(35840),t$=n(89728),t0=n(43481),t1=n(97265);class t2 extends t$.G{constructor({cause:e}){super("Smart Account is not deployed.",{cause:e,metaMessages:["This could arise when:","- No `factory`/`factoryData` or `initCode` properties are provided for Smart Account deployment.","- An incorrect `sender` address is provided."],name:"AccountNotDeployedError"})}}Object.defineProperty(t2,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa20/});class t3 extends t$.G{constructor({cause:e,data:t,message:n}={}){let r=n?.replace("execution reverted: ","")?.replace("execution reverted","");super(`Execution reverted ${r?`with reason: ${r}`:"for an unknown reason"}.`,{cause:e,name:"ExecutionRevertedError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t}}Object.defineProperty(t3,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32521}),Object.defineProperty(t3,"message",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});class t6 extends t$.G{constructor({cause:e}){super("Failed to send funds to beneficiary.",{cause:e,name:"FailedToSendToBeneficiaryError"})}}Object.defineProperty(t6,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa91/});class t5 extends t$.G{constructor({cause:e}){super("Gas value overflowed.",{cause:e,metaMessages:["This could arise when:","- one of the gas values exceeded 2**120 (uint120)"].filter(Boolean),name:"GasValuesOverflowError"})}}Object.defineProperty(t5,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa94/});class t4 extends t$.G{constructor({cause:e}){super("The `handleOps` function was called by the Bundler with a gas limit too low.",{cause:e,name:"HandleOpsOutOfGasError"})}}Object.defineProperty(t4,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa95/});class t7 extends t$.G{constructor({cause:e,factory:t,factoryData:n,initCode:r}){super("Failed to simulate deployment for Smart Account.",{cause:e,metaMessages:["This could arise when:","- Invalid `factory`/`factoryData` or `initCode` properties are present","- Smart Account deployment execution ran out of gas (low `verificationGasLimit` value)","- Smart Account deployment execution reverted with an error\n",t&&`factory: ${t}`,n&&`factoryData: ${n}`,r&&`initCode: ${r}`].filter(Boolean),name:"InitCodeFailedError"})}}Object.defineProperty(t7,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa13/});class t8 extends t$.G{constructor({cause:e,factory:t,factoryData:n,initCode:r}){super("Smart Account initialization implementation did not create an account.",{cause:e,metaMessages:["This could arise when:","- `factory`/`factoryData` or `initCode` properties are invalid","- Smart Account initialization implementation is incorrect\n",t&&`factory: ${t}`,n&&`factoryData: ${n}`,r&&`initCode: ${r}`].filter(Boolean),name:"InitCodeMustCreateSenderError"})}}Object.defineProperty(t8,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa15/});class t9 extends t$.G{constructor({cause:e,factory:t,factoryData:n,initCode:r,sender:a}){super("Smart Account initialization implementation does not return the expected sender.",{cause:e,metaMessages:["This could arise when:","Smart Account initialization implementation does not return a sender address\n",t&&`factory: ${t}`,n&&`factoryData: ${n}`,r&&`initCode: ${r}`,a&&`sender: ${a}`].filter(Boolean),name:"InitCodeMustReturnSenderError"})}}Object.defineProperty(t9,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa14/});class ne extends t$.G{constructor({cause:e}){super("Smart Account does not have sufficient funds to execute the User Operation.",{cause:e,metaMessages:["This could arise when:","- the Smart Account does not have sufficient funds to cover the required prefund, or","- a Paymaster was not provided"].filter(Boolean),name:"InsufficientPrefundError"})}}Object.defineProperty(ne,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa21/});class nt extends t$.G{constructor({cause:e}){super("Bundler attempted to call an invalid function on the EntryPoint.",{cause:e,name:"InternalCallOnlyError"})}}Object.defineProperty(nt,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa92/});class nn extends t$.G{constructor({cause:e}){super("Bundler used an invalid aggregator for handling aggregated User Operations.",{cause:e,name:"InvalidAggregatorError"})}}Object.defineProperty(nn,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa96/});class nr extends t$.G{constructor({cause:e,nonce:t}){super("Invalid Smart Account nonce used for User Operation.",{cause:e,metaMessages:[t&&`nonce: ${t}`].filter(Boolean),name:"InvalidAccountNonceError"})}}Object.defineProperty(nr,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa25/});class na extends t$.G{constructor({cause:e}){super("Bundler has not set a beneficiary address.",{cause:e,name:"InvalidBeneficiaryError"})}}Object.defineProperty(na,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa90/});class ni extends t$.G{constructor({cause:e}){super("Invalid fields set on User Operation.",{cause:e,name:"InvalidFieldsError"})}}Object.defineProperty(ni,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class ns extends t$.G{constructor({cause:e,paymasterAndData:t}){super("Paymaster properties provided are invalid.",{cause:e,metaMessages:["This could arise when:","- the `paymasterAndData` property is of an incorrect length\n",t&&`paymasterAndData: ${t}`].filter(Boolean),name:"InvalidPaymasterAndDataError"})}}Object.defineProperty(ns,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa93/});class no extends t$.G{constructor({cause:e}){super("Paymaster deposit for the User Operation is too low.",{cause:e,metaMessages:["This could arise when:","- the Paymaster has deposited less than the expected amount via the `deposit` function"].filter(Boolean),name:"PaymasterDepositTooLowError"})}}Object.defineProperty(no,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32508}),Object.defineProperty(no,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa31/});class nc extends t$.G{constructor({cause:e}){super("The `validatePaymasterUserOp` function on the Paymaster reverted.",{cause:e,name:"PaymasterFunctionRevertedError"})}}Object.defineProperty(nc,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa33/});class nu extends t$.G{constructor({cause:e}){super("The Paymaster contract has not been deployed.",{cause:e,name:"PaymasterNotDeployedError"})}}Object.defineProperty(nu,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa30/});class nl extends t$.G{constructor({cause:e}){super("UserOperation rejected because paymaster (or signature aggregator) is throttled/banned.",{cause:e,name:"PaymasterRateLimitError"})}}Object.defineProperty(nl,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32504});class nd extends t$.G{constructor({cause:e}){super("UserOperation rejected because paymaster (or signature aggregator) is throttled/banned.",{cause:e,name:"PaymasterStakeTooLowError"})}}Object.defineProperty(nd,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32505});class nf extends t$.G{constructor({cause:e}){super("Paymaster `postOp` function reverted.",{cause:e,name:"PaymasterPostOpFunctionRevertedError"})}}Object.defineProperty(nf,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa50/});class np extends t$.G{constructor({cause:e,factory:t,factoryData:n,initCode:r}){super("Smart Account has already been deployed.",{cause:e,metaMessages:["Remove the following properties and try again:",t&&"`factory`",n&&"`factoryData`",r&&"`initCode`"].filter(Boolean),name:"SenderAlreadyConstructedError"})}}Object.defineProperty(np,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa10/});class nm extends t$.G{constructor({cause:e}){super("UserOperation rejected because account signature check failed (or paymaster signature, if the paymaster uses its data as signature).",{cause:e,name:"SignatureCheckFailedError"})}}Object.defineProperty(nm,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32507});class nh extends t$.G{constructor({cause:e}){super("The `validateUserOp` function on the Smart Account reverted.",{cause:e,name:"SmartAccountFunctionRevertedError"})}}Object.defineProperty(nh,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa23/});class ny extends t$.G{constructor({cause:e}){super("UserOperation rejected because account specified unsupported signature aggregator.",{cause:e,name:"UnsupportedSignatureAggregatorError"})}}Object.defineProperty(ny,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32506});class nb extends t$.G{constructor({cause:e}){super("User Operation expired.",{cause:e,metaMessages:["This could arise when:","- the `validAfter` or `validUntil` values returned from `validateUserOp` on the Smart Account are not satisfied"].filter(Boolean),name:"UserOperationExpiredError"})}}Object.defineProperty(nb,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa22/});class ng extends t$.G{constructor({cause:e}){super("Paymaster for User Operation expired.",{cause:e,metaMessages:["This could arise when:","- the `validAfter` or `validUntil` values returned from `validatePaymasterUserOp` on the Paymaster are not satisfied"].filter(Boolean),name:"UserOperationPaymasterExpiredError"})}}Object.defineProperty(ng,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa32/});class nv extends t$.G{constructor({cause:e}){super("Signature provided for the User Operation is invalid.",{cause:e,metaMessages:["This could arise when:","- the `signature` for the User Operation is incorrectly computed, and unable to be verified by the Smart Account"].filter(Boolean),name:"UserOperationSignatureError"})}}Object.defineProperty(nv,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa24/});class nw extends t$.G{constructor({cause:e}){super("Signature provided for the User Operation is invalid.",{cause:e,metaMessages:["This could arise when:","- the `signature` for the User Operation is incorrectly computed, and unable to be verified by the Paymaster"].filter(Boolean),name:"UserOperationPaymasterSignatureError"})}}Object.defineProperty(nw,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa34/});class nx extends t$.G{constructor({cause:e}){super("User Operation rejected by EntryPoint's `simulateValidation` during account creation or validation.",{cause:e,name:"UserOperationRejectedByEntryPointError"})}}Object.defineProperty(nx,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32500});class nk extends t$.G{constructor({cause:e}){super("User Operation rejected by Paymaster's `validatePaymasterUserOp`.",{cause:e,name:"UserOperationRejectedByPaymasterError"})}}Object.defineProperty(nk,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32501});class nE extends t$.G{constructor({cause:e}){super("User Operation rejected with op code validation error.",{cause:e,name:"UserOperationRejectedByOpCodeError"})}}Object.defineProperty(nE,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32502});class nA extends t$.G{constructor({cause:e}){super("UserOperation out of time-range: either wallet or paymaster returned a time-range, and it is already expired (or will expire soon).",{cause:e,name:"UserOperationOutOfTimeRangeError"})}}Object.defineProperty(nA,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32503});class nS extends t$.G{constructor({cause:e}){super(`An error occurred while executing user operation: ${e?.shortMessage}`,{cause:e,name:"UnknownBundlerError"})}}class nC extends t$.G{constructor({cause:e}){super("User Operation verification gas limit exceeded.",{cause:e,metaMessages:["This could arise when:","- the gas used for verification exceeded the `verificationGasLimit`"].filter(Boolean),name:"VerificationGasLimitExceededError"})}}Object.defineProperty(nC,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa40/});class nP extends t$.G{constructor({cause:e}){super("User Operation verification gas limit is too low.",{cause:e,metaMessages:["This could arise when:","- the `verificationGasLimit` is too low to verify the User Operation"].filter(Boolean),name:"VerificationGasLimitTooLowError"})}}Object.defineProperty(nP,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa41/});var nO=n(22412),nI=n(35301);class nT extends t$.G{constructor(e,{callData:t,callGasLimit:n,docsPath:r,factory:a,factoryData:i,initCode:s,maxFeePerGas:o,maxPriorityFeePerGas:c,nonce:u,paymaster:l,paymasterAndData:d,paymasterData:f,paymasterPostOpGasLimit:p,paymasterVerificationGasLimit:m,preVerificationGas:h,sender:y,signature:b,verificationGasLimit:g}){super(e.shortMessage,{cause:e,docsPath:r,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Request Arguments:",(0,nO.xr)({callData:t,callGasLimit:n,factory:a,factoryData:i,initCode:s,maxFeePerGas:void 0!==o&&`${(0,nI.o)(o)} gwei`,maxPriorityFeePerGas:void 0!==c&&`${(0,nI.o)(c)} gwei`,nonce:u,paymaster:l,paymasterAndData:d,paymasterData:f,paymasterPostOpGasLimit:p,paymasterVerificationGasLimit:m,preVerificationGas:h,sender:y,signature:b,verificationGasLimit:g})].filter(Boolean),name:"UserOperationExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=e}}class nB extends t$.G{constructor({hash:e}){super(`User Operation receipt with hash "${e}" could not be found. The User Operation may not have been processed yet.`,{name:"UserOperationReceiptNotFoundError"})}}class nU extends t$.G{constructor({hash:e}){super(`User Operation with hash "${e}" could not be found.`,{name:"UserOperationNotFoundError"})}}class n_ extends t$.G{constructor({hash:e}){super(`Timed out while waiting for User Operation with hash "${e}" to be confirmed.`,{name:"WaitForUserOperationReceiptTimeoutError"})}}let nj=[t3,ni,no,nl,nd,nm,ny,nA,nx,nk,nE];function nN(e,{calls:t,docsPath:n,...r}){return new nT((()=>{let n=function(e,t){let n=(e.details||"").toLowerCase();if(t2.message.test(n))return new t2({cause:e});if(t6.message.test(n))return new t6({cause:e});if(t5.message.test(n))return new t5({cause:e});if(t4.message.test(n))return new t4({cause:e});if(t7.message.test(n))return new t7({cause:e,factory:t.factory,factoryData:t.factoryData,initCode:t.initCode});if(t8.message.test(n))return new t8({cause:e,factory:t.factory,factoryData:t.factoryData,initCode:t.initCode});if(t9.message.test(n))return new t9({cause:e,factory:t.factory,factoryData:t.factoryData,initCode:t.initCode,sender:t.sender});if(ne.message.test(n))return new ne({cause:e});if(nt.message.test(n))return new nt({cause:e});if(nr.message.test(n))return new nr({cause:e,nonce:t.nonce});if(nn.message.test(n))return new nn({cause:e});if(na.message.test(n))return new na({cause:e});if(ns.message.test(n))return new ns({cause:e});if(no.message.test(n))return new no({cause:e});if(nc.message.test(n))return new nc({cause:e});if(nu.message.test(n))return new nu({cause:e});if(nf.message.test(n))return new nf({cause:e});if(nh.message.test(n))return new nh({cause:e});if(np.message.test(n))return new np({cause:e,factory:t.factory,factoryData:t.factoryData,initCode:t.initCode});if(nb.message.test(n))return new nb({cause:e});if(ng.message.test(n))return new ng({cause:e});if(nw.message.test(n))return new nw({cause:e});if(nv.message.test(n))return new nv({cause:e});if(nC.message.test(n))return new nC({cause:e});if(nP.message.test(n))return new nP({cause:e});let r=e.walk(e=>nj.some(t=>t.code===e.code));if(r){if(r.code===t3.code)return new t3({cause:e,data:r.data,message:r.details});if(r.code===ni.code)return new ni({cause:e});if(r.code===no.code)return new no({cause:e});if(r.code===nl.code)return new nl({cause:e});if(r.code===nd.code)return new nd({cause:e});if(r.code===nm.code)return new nm({cause:e});if(r.code===ny.code)return new ny({cause:e});if(r.code===nA.code)return new nA({cause:e});if(r.code===nx.code)return new nx({cause:e});if(r.code===nk.code)return new nk({cause:e});if(r.code===nE.code)return new nE({cause:e})}return new nS({cause:e})}(e,r);if(t&&n instanceof t3){let e;let r=(n.walk(t=>{if("string"==typeof t.data||"string"==typeof t.data?.revertData||!(t instanceof t$.G)&&"string"==typeof t.message){let n=(t.data?.revertData||t.data||t.message).match?.(/(0x[A-Za-z0-9]*)/);if(n)return e=n[1],!0}return!1}),e),a=t?.filter(e=>e.abi);if(r&&a.length>0)return function(e){let{calls:t,revertData:n}=e,{abi:r,functionName:a,args:i,to:s}=(()=>{let e=t?.filter(e=>!!e.abi);if(1===e.length)return e[0];let r=e.filter(e=>{try{return!!(0,t1.p)({abi:e.abi,data:n})}catch{return!1}});return 1===r.length?r[0]:{abi:[],functionName:e.reduce((e,t)=>`${e?`${e} | `:""}${t.functionName}`,""),args:void 0,to:void 0}})(),o="0x"===n?new t0.Dk({functionName:a}):new t0.Lu({abi:r,data:n,functionName:a});return new t0.uq(o,{abi:r,args:i,contractAddress:s,functionName:a})}({calls:a,revertData:r})}return n})(),{docsPath:n,...r})}var nR=n(69313);function nD(e){var t;let n={};return void 0!==e.callData&&(n.callData=e.callData),void 0!==e.callGasLimit&&(n.callGasLimit=(0,Q.eC)(e.callGasLimit)),void 0!==e.factory&&(n.factory=e.factory),void 0!==e.factoryData&&(n.factoryData=e.factoryData),void 0!==e.initCode&&(n.initCode=e.initCode),void 0!==e.maxFeePerGas&&(n.maxFeePerGas=(0,Q.eC)(e.maxFeePerGas)),void 0!==e.maxPriorityFeePerGas&&(n.maxPriorityFeePerGas=(0,Q.eC)(e.maxPriorityFeePerGas)),void 0!==e.nonce&&(n.nonce=(0,Q.eC)(e.nonce)),void 0!==e.paymaster&&(n.paymaster=e.paymaster),void 0!==e.paymasterAndData&&(n.paymasterAndData=e.paymasterAndData||"0x"),void 0!==e.paymasterData&&(n.paymasterData=e.paymasterData),void 0!==e.paymasterPostOpGasLimit&&(n.paymasterPostOpGasLimit=(0,Q.eC)(e.paymasterPostOpGasLimit)),void 0!==e.paymasterSignature&&(n.paymasterSignature=e.paymasterSignature),void 0!==e.paymasterVerificationGasLimit&&(n.paymasterVerificationGasLimit=(0,Q.eC)(e.paymasterVerificationGasLimit)),void 0!==e.preVerificationGas&&(n.preVerificationGas=(0,Q.eC)(e.preVerificationGas)),void 0!==e.sender&&(n.sender=e.sender),void 0!==e.signature&&(n.signature=e.signature),void 0!==e.verificationGasLimit&&(n.verificationGasLimit=(0,Q.eC)(e.verificationGasLimit)),void 0!==e.authorization&&(n.eip7702Auth={address:(t=e.authorization).address,chainId:(0,Q.eC)(t.chainId),nonce:(0,Q.eC)(t.nonce),r:t.r?(0,Q.eC)(BigInt(t.r),{size:32}):(0,nR.vk)("0x",{size:32}),s:t.s?(0,Q.eC)(BigInt(t.s),{size:32}):(0,nR.vk)("0x",{size:32}),yParity:t.yParity?(0,Q.eC)(t.yParity,{size:1}):(0,nR.vk)("0x",{size:32})}),n}var nF=n(18017),nM=n(94590),nL=n(59075);async function nG(e,t){let{chainId:n,entryPointAddress:r,context:a,...i}=t,s=nD(i),{paymasterPostOpGasLimit:o,paymasterVerificationGasLimit:c,...u}=await e.request({method:"pm_getPaymasterData",params:[{...s,callGasLimit:s.callGasLimit??"0x0",verificationGasLimit:s.verificationGasLimit??"0x0",preVerificationGas:s.preVerificationGas??"0x0"},r,(0,Q.eC)(n),a]});return{...u,...o&&{paymasterPostOpGasLimit:(0,tP.y_)(o)},...c&&{paymasterVerificationGasLimit:(0,tP.y_)(c)}}}async function nq(e,t){let{chainId:n,entryPointAddress:r,context:a,...i}=t,s=nD(i),{paymasterPostOpGasLimit:o,paymasterVerificationGasLimit:c,...u}=await e.request({method:"pm_getPaymasterStubData",params:[{...s,callGasLimit:s.callGasLimit??"0x0",verificationGasLimit:s.verificationGasLimit??"0x0",preVerificationGas:s.preVerificationGas??"0x0"},r,(0,Q.eC)(n),a]});return{...u,...o&&{paymasterPostOpGasLimit:(0,tP.y_)(o)},...c&&{paymasterVerificationGasLimit:(0,tP.y_)(c)}}}let nH=["factory","fees","gas","paymaster","nonce","signature","authorization"];async function nz(e,t){let n;let{account:r=e.account,parameters:a=nH,stateOverride:i}=t;if(!r)throw new tY.o;let s=(0,tJ.T)(r),o=t.paymaster??e?.paymaster,c="string"==typeof o?o:void 0,{getPaymasterStubData:u,getPaymasterData:l}=(()=>{if(!0===o)return{getPaymasterStubData:t=>(0,tQ.s)(e,nq,"getPaymasterStubData")(t),getPaymasterData:t=>(0,tQ.s)(e,nG,"getPaymasterData")(t)};if("object"==typeof o){let{getPaymasterStubData:e,getPaymasterData:t}=o;return{getPaymasterStubData:t&&e?e:t,getPaymasterData:t&&e?t:void 0}}return{getPaymasterStubData:void 0,getPaymasterData:void 0}})(),d=t.paymasterContext?t.paymasterContext:e?.paymasterContext,f={...t,paymaster:c,sender:s.address},[p,m,h,y,b]=await Promise.all([(async()=>t.calls?s.encodeCalls(t.calls.map(e=>e.abi?{data:(0,Y.R)(e),to:e.to,value:e.value}:e)):t.callData)(),(async()=>{if(!a.includes("factory"))return;if(t.initCode)return{initCode:t.initCode};if(t.factory&&t.factoryData)return{factory:t.factory,factoryData:t.factoryData};let{factory:e,factoryData:n}=await s.getFactoryArgs();return"0.6"===s.entryPoint.version?{initCode:e&&n?(0,nL.zo)([e,n]):void 0}:{factory:e,factoryData:n}})(),(async()=>{if(a.includes("fees")){if("bigint"==typeof t.maxFeePerGas&&"bigint"==typeof t.maxPriorityFeePerGas)return f;if(e?.userOperation?.estimateFeesPerGas){let t=await e.userOperation.estimateFeesPerGas({account:s,bundlerClient:e,userOperation:f});return{...f,...t}}try{let n=e.client??e,r=await (0,tQ.s)(n,nM.X,"estimateFeesPerGas")({chain:n.chain,type:"eip1559"});return{maxFeePerGas:"bigint"==typeof t.maxFeePerGas?t.maxFeePerGas:BigInt(2n*r.maxFeePerGas),maxPriorityFeePerGas:"bigint"==typeof t.maxPriorityFeePerGas?t.maxPriorityFeePerGas:BigInt(2n*r.maxPriorityFeePerGas)}}catch{return}}})(),(async()=>{if(a.includes("nonce"))return"bigint"==typeof t.nonce?t.nonce:s.getNonce()})(),(async()=>{if(a.includes("authorization")){if("object"==typeof t.authorization)return t.authorization;if(s.authorization&&!await s.isDeployed())return{...await (0,nF.x)(s.client,s.authorization),r:"0xfffffffffffffffffffffffffffffff000000000000000000000000000000000",s:"0x7aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",yParity:1}}})()]);async function g(){return n||(e.chain?e.chain.id:n=await (0,tQ.s)(e,tW.L,"getChainId")({}))}void 0!==p&&(f.callData=p),void 0!==m&&(f={...f,...m}),void 0!==h&&(f={...f,...h}),void 0!==y&&(f.nonce=y),void 0!==b&&(f.authorization=b),a.includes("signature")&&(void 0!==t.signature?f.signature=t.signature:f.signature=await s.getStubSignature(f)),"0.6"!==s.entryPoint.version||f.initCode||(f.initCode="0x");let v=!1;if(a.includes("paymaster")&&u&&!c&&!t.paymasterAndData){let{isFinal:e=!1,sponsor:t,...n}=await u({chainId:await g(),entryPointAddress:s.entryPoint.address,context:d,...f});v=e,f={...f,...n}}if("0.6"!==s.entryPoint.version||f.paymasterAndData||(f.paymasterAndData="0x"),a.includes("gas")){if(s.userOperation?.estimateGas){let e=await s.userOperation.estimateGas(f);f={...f,...e}}if(void 0===f.callGasLimit||void 0===f.preVerificationGas||void 0===f.verificationGasLimit||f.paymaster&&void 0===f.paymasterPostOpGasLimit||f.paymaster&&void 0===f.paymasterVerificationGasLimit){let t=await (0,tQ.s)(e,nK,"estimateUserOperationGas")({account:s,callGasLimit:0n,preVerificationGas:0n,verificationGasLimit:0n,stateOverride:i,...f.paymaster?{paymasterPostOpGasLimit:0n,paymasterVerificationGasLimit:0n}:{},...f});f={...f,callGasLimit:f.callGasLimit??t.callGasLimit,preVerificationGas:f.preVerificationGas??t.preVerificationGas,verificationGasLimit:f.verificationGasLimit??t.verificationGasLimit,paymasterPostOpGasLimit:f.paymasterPostOpGasLimit??t.paymasterPostOpGasLimit,paymasterVerificationGasLimit:f.paymasterVerificationGasLimit??t.paymasterVerificationGasLimit}}}if(a.includes("paymaster")&&l&&!c&&!t.paymasterAndData&&!v){let e=await l({chainId:await g(),entryPointAddress:s.entryPoint.address,context:d,...f});f={...f,...e}}return delete f.calls,delete f.parameters,delete f.paymasterContext,"string"!=typeof f.paymaster&&delete f.paymaster,f}async function nK(e,t){let{account:n=e.account,entryPointAddress:r,stateOverride:a}=t;if(!n&&!t.sender)throw new tY.o;let i=n?(0,tJ.T)(n):void 0,s=(0,tX.mF)(a),o=i?await (0,tQ.s)(e,nz,"prepareUserOperation")({...t,parameters:["authorization","factory","nonce","paymaster","signature"]}):t;try{let t=[nD(o),r??i?.entryPoint?.address],n=await e.request({method:"eth_estimateUserOperationGas",params:s?[...t,s]:[...t]});return function(e){let t={};return e.callGasLimit&&(t.callGasLimit=BigInt(e.callGasLimit)),e.preVerificationGas&&(t.preVerificationGas=BigInt(e.preVerificationGas)),e.verificationGasLimit&&(t.verificationGasLimit=BigInt(e.verificationGasLimit)),e.paymasterPostOpGasLimit&&(t.paymasterPostOpGasLimit=BigInt(e.paymasterPostOpGasLimit)),e.paymasterVerificationGasLimit&&(t.paymasterVerificationGasLimit=BigInt(e.paymasterVerificationGasLimit)),t}(n)}catch(n){let e=t.calls;throw nN(n,{...o,...e?{calls:e}:{}})}}async function nV(e,{hash:t}){let n=await e.request({method:"eth_getUserOperationByHash",params:[t]},{dedupe:!0});if(!n)throw new nU({hash:t});let{blockHash:r,blockNumber:a,entryPoint:i,transactionHash:s,userOperation:o}=n;return{blockHash:r,blockNumber:BigInt(a),entryPoint:i,transactionHash:s,userOperation:function(e){let t={...e};return e.callGasLimit&&(t.callGasLimit=BigInt(e.callGasLimit)),e.maxFeePerGas&&(t.maxFeePerGas=BigInt(e.maxFeePerGas)),e.maxPriorityFeePerGas&&(t.maxPriorityFeePerGas=BigInt(e.maxPriorityFeePerGas)),e.nonce&&(t.nonce=BigInt(e.nonce)),e.paymasterPostOpGasLimit&&(t.paymasterPostOpGasLimit=BigInt(e.paymasterPostOpGasLimit)),e.paymasterVerificationGasLimit&&(t.paymasterVerificationGasLimit=BigInt(e.paymasterVerificationGasLimit)),e.preVerificationGas&&(t.preVerificationGas=BigInt(e.preVerificationGas)),e.verificationGasLimit&&(t.verificationGasLimit=BigInt(e.verificationGasLimit)),t}(o)}}var nZ=n(99786),nW=n(60158);async function nJ(e,{hash:t}){let n=await e.request({method:"eth_getUserOperationReceipt",params:[t]},{dedupe:!0});if(!n)throw new nB({hash:t});return function(e){let t={...e};return e.actualGasCost&&(t.actualGasCost=BigInt(e.actualGasCost)),e.actualGasUsed&&(t.actualGasUsed=BigInt(e.actualGasUsed)),e.logs&&(t.logs=e.logs.map(e=>(0,nZ.U)(e))),e.receipt&&(t.receipt=(0,nW.fA)(t.receipt)),t}(n)}async function nY(e,t){let{account:n=e.account,entryPointAddress:r}=t;if(!n&&!t.sender)throw new tY.o;let a=n?(0,tJ.T)(n):void 0,i=a?await (0,tQ.s)(e,nz,"prepareUserOperation")(t):t,s=t.signature||await a?.signUserOperation?.(i),o=nD({...i,signature:s});try{return await e.request({method:"eth_sendUserOperation",params:[o,r??a?.entryPoint?.address]},{retryCount:0})}catch(n){let e=t.calls;throw nN(n,{...i,...e?{calls:e}:{},signature:s})}}var nQ=n(50100),nX=n(96832),n$=n(96838);function n0(e){return{estimateUserOperationGas:t=>nK(e,t),getChainId:()=>(0,tW.L)(e),getSupportedEntryPoints:()=>e.request({method:"eth_supportedEntryPoints"}),getUserOperation:t=>nV(e,t),getUserOperationReceipt:t=>nJ(e,t),prepareUserOperation:t=>nz(e,t),sendUserOperation:t=>nY(e,t),waitForUserOperationReceipt:t=>(function(e,t){let{hash:n,pollingInterval:r=e.pollingInterval,retryCount:a,timeout:i=12e4}=t,s=0,o=(0,n$.P)(["waitForUserOperationReceipt",e.uid,n]);return new Promise((t,c)=>{let u=(0,nQ.N7)(o,{resolve:t,reject:c},t=>{let o=e=>{l(),e(),u()},c=i?setTimeout(()=>o(()=>t.reject(new n_({hash:n}))),i):void 0,l=(0,nX.$)(async()=>{a&&s>=a&&(clearTimeout(c),o(()=>t.reject(new n_({hash:n}))));try{let r=await (0,tQ.s)(e,nJ,"getUserOperationReceipt")({hash:n});clearTimeout(c),o(()=>t.resolve(r))}catch(e){"UserOperationReceiptNotFoundError"!==e.name&&(clearTimeout(c),o(()=>t.reject(e)))}s++},{emitOnBegin:!0,interval:r});return l})})})(e,t)}}var n1=n(20466),n2=n(3383),n3=n(20036);let n6={block:(0,n2.G)({format:e=>({transactions:e.transactions?.map(e=>{if("string"==typeof e)return e;let t=n3.Tr(e);return"0x7e"===t.typeHex&&(t.isSystemTx=e.isSystemTx,t.mint=e.mint?tP.y_(e.mint):void 0,t.sourceHash=e.sourceHash,t.type="deposit"),t}),stateRoot:e.stateRoot})}),transaction:(0,n3.y_)({format(e){let t={};return"0x7e"===e.type&&(t.isSystemTx=e.isSystemTx,t.mint=e.mint?(0,tP.y_)(e.mint):void 0,t.sourceHash=e.sourceHash,t.type="deposit"),t}}),transactionReceipt:(0,nW.dI)({format:e=>({l1GasPrice:e.l1GasPrice?(0,tP.y_)(e.l1GasPrice):null,l1GasUsed:e.l1GasUsed?(0,tP.y_)(e.l1GasUsed):null,l1Fee:e.l1Fee?(0,tP.y_)(e.l1Fee):null,l1FeeScalar:e.l1FeeScalar?Number(e.l1FeeScalar):null})})};var n5=n(89811);let n4={blockTime:2e3,contracts:n1.r,formatters:n6,serializers:n5.fE},n7=(0,tz.a)({...n4,id:8453,name:"Base",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.base.org"]}},blockExplorers:{default:{name:"Basescan",url:"https://basescan.org",apiUrl:"https://api.basescan.org/api"}},contracts:{...n4.contracts,disputeGameFactory:{1:{address:"0x43edB88C4B80fDD2AdFF2412A7BebF9dF42cB40e"}},l2OutputOracle:{1:{address:"0x56315b90c40730925ec5485cf004d835058518A0"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:5022},portal:{1:{address:"0x49048044D57e1C92A77f79988d21Fa8fAF74E97e",blockCreated:17482143}},l1StandardBridge:{1:{address:"0x3154Cf16ccdb4C6d922629664174b904d80F2C35",blockCreated:17482143}}},sourceId:1});({...n7});let n8=(0,tz.a)({id:43114,name:"Avalanche",blockTime:1700,nativeCurrency:{decimals:18,name:"Avalanche",symbol:"AVAX"},rpcUrls:{default:{http:["https://api.avax.network/ext/bc/C/rpc"]}},blockExplorers:{default:{name:"SnowTrace",url:"https://snowtrace.io",apiUrl:"https://api.snowtrace.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:11907934}}}),n9=(0,tz.a)({id:42161,name:"Arbitrum One",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},blockTime:250,rpcUrls:{default:{http:["https://arb1.arbitrum.io/rpc"]}},blockExplorers:{default:{name:"Arbiscan",url:"https://arbiscan.io",apiUrl:"https://api.arbiscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:7654707}}}),re=(0,tz.a)({id:137,name:"Polygon",blockTime:2e3,nativeCurrency:{name:"POL",symbol:"POL",decimals:18},rpcUrls:{default:{http:["https://polygon-rpc.com"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://polygonscan.com",apiUrl:"https://api.etherscan.io/v2/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:25770160}}}),rt=(0,tz.a)({id:1,name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},blockTime:12e3,rpcUrls:{default:{http:["https://eth.merkle.io"]}},blockExplorers:{default:{name:"Etherscan",url:"https://etherscan.io",apiUrl:"https://api.etherscan.io/api"}},contracts:{ensUniversalResolver:{address:"0xeeeeeeee14d718c2b47d9923deab1335e144eeee",blockCreated:23085558},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}}),rn=(0,tz.a)({id:56,name:"BNB Smart Chain",blockTime:750,nativeCurrency:{decimals:18,name:"BNB",symbol:"BNB"},rpcUrls:{default:{http:["https://56.rpc.thirdweb.com"]}},blockExplorers:{default:{name:"BscScan",url:"https://bscscan.com",apiUrl:"https://api.bscscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:15921452}}}),rr=(0,tz.a)({...n4,id:7777777,name:"Zora",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.zora.energy"],webSocket:["wss://rpc.zora.energy"]}},blockExplorers:{default:{name:"Explorer",url:"https://explorer.zora.energy",apiUrl:"https://explorer.zora.energy/api"}},contracts:{...n4.contracts,l2OutputOracle:{1:{address:"0x9E6204F750cD866b299594e2aC9eA824E2e5f95c"}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:5882},portal:{1:{address:"0x1a0ad011913A150f69f6A19DF447A0CfD9551054"}},l1StandardBridge:{1:{address:"0x3e2Ea9B92B7E48A52296fD261dc26fd995284631"}}},sourceId:1}),ra=(0,tz.a)({...n4,id:10,name:"OP Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.optimism.io"]}},blockExplorers:{default:{name:"Optimism Explorer",url:"https://optimistic.etherscan.io",apiUrl:"https://api-optimistic.etherscan.io/api"}},contracts:{...n4.contracts,disputeGameFactory:{1:{address:"0xe5965Ab5962eDc7477C8520243A95517CD252fA9"}},l2OutputOracle:{1:{address:"0xdfe97868233d1aa22e815a266982f2cf17685a27"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:4286263},portal:{1:{address:"0xbEb5Fc579115071764c7423A4f12eDde41f106Ed"}},l1StandardBridge:{1:{address:"0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1"}}},sourceId:1}),ri=(0,tz.a)({...n4,id:84532,network:"base-sepolia",name:"Base Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.base.org"]}},blockExplorers:{default:{name:"Basescan",url:"https://sepolia.basescan.org",apiUrl:"https://api-sepolia.basescan.org/api"}},contracts:{...n4.contracts,disputeGameFactory:{11155111:{address:"0xd6E6dBf4F7EA0ac412fD8b65ED297e64BB7a06E1"}},l2OutputOracle:{11155111:{address:"0x84457ca9D0163FbC4bbfe4Dfbb20ba46e48DF254"}},portal:{11155111:{address:"0x49f53e41452c74589e85ca1677426ba426459e85",blockCreated:4446677}},l1StandardBridge:{11155111:{address:"0xfd0Bf71F60660E2f608ed56e1659C450eB113120",blockCreated:4446677}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1059647}},testnet:!0,sourceId:11155111});({...ri});let rs=(0,tz.a)({id:11155111,name:"Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://11155111.rpc.thirdweb.com"]}},blockExplorers:{default:{name:"Etherscan",url:"https://sepolia.etherscan.io",apiUrl:"https://api-sepolia.etherscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:751532},ensUniversalResolver:{address:"0xeeeeeeee14d718c2b47d9923deab1335e144eeee",blockCreated:8928790}},testnet:!0}),ro=(0,tz.a)({...n4,id:11155420,name:"OP Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.optimism.io"]}},blockExplorers:{default:{name:"Blockscout",url:"https://optimism-sepolia.blockscout.com",apiUrl:"https://optimism-sepolia.blockscout.com/api"}},contracts:{...n4.contracts,disputeGameFactory:{11155111:{address:"0x05F9613aDB30026FFd634f38e5C4dFd30a197Fa1"}},l2OutputOracle:{11155111:{address:"0x90E9c4f8a994a250F6aEfd61CAFb4F2e895D458F"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1620204},portal:{11155111:{address:"0x16Fc5058F25648194471939df75CF27A2fdC48BC"}},l1StandardBridge:{11155111:{address:"0xFBb0621E0B23b5478B630BD55a5f21f67730B0F1"}}},testnet:!0,sourceId:11155111}),rc=f(()=>({})),ru=[n7,n8,n9,re,rt,rn,rr,ra,ri,rs,ro].reduce((e,t)=>(e.set(t.id,t),e),new Map);function rl(e){let t=ru.get(e);if(t?.rpcUrls?.default?.http?.[0])return t.rpcUrls.default.http[0]}function rd(e){e.forEach(e=>{var t;let n=e.rpcUrl;if(n||(n=rl(e.id)),!n)return;let r=(t=e.id,ru.get(t)),a=rf({chainId:e.id,rpcUrl:n,nativeCurrency:e.nativeCurrency,viemChain:r});rp(e.id,a)})}function rf(e){let{chainId:t,rpcUrl:n,nativeCurrency:r,viemChain:a}=e,i=function(e,t,n){let r=n?.viemChain,a=n?.nativeCurrency,i=a?.name??r?.name??"",s=a?.symbol??r?.nativeCurrency?.symbol??"",o=a?.decimal??r?.nativeCurrency?.decimals??18;return(0,tz.a)({id:e,name:i,nativeCurrency:{name:i,symbol:s,decimals:o},rpcUrls:{default:{http:[t]}}})}(t,n,{viemChain:a,nativeCurrency:r}),s=(0,tK.v)({chain:i,transport:(0,tV.d)(n)}),o=function(e){let{client:t,key:n="bundler",name:r="Bundler Client",paymaster:a,paymasterContext:i,transport:s,userOperation:o}=e;return Object.assign((0,tZ.e)({...e,chain:e.chain??t?.chain,key:n,name:r,transport:s,type:"bundlerClient"}),{client:t,paymaster:a,paymasterContext:i,userOperation:o}).extend(n0)}({client:s,transport:(0,tV.d)(n)});return{client:s,bundlerClient:o}}function rp(e,t){rc.setState(n=>({...n,[e]:{client:t.client,bundlerClient:t.bundlerClient}}))}function rm(e){let t=rc.getState()[e]?.client;if(t)return t;let n=function(e){let t=rl(e),n=ru.get(e);if(t)return rf({chainId:e,rpcUrl:t,viemChain:n})}(e);if(n)return rp(e,n),n.client}let rh=f(()=>({correlationIds:new Map})),ry={get:e=>rh.getState().correlationIds.get(e),set:(e,t)=>{rh.setState(n=>{let r=new Map(n.correlationIds);return r.set(e,t),{correlationIds:r}})},delete:e=>{rh.setState(t=>{let n=new Map(t.correlationIds);return n.delete(e),{correlationIds:n}})},clear:()=>{rh.setState({correlationIds:new Map})}};var rb=n(24362),rg=n(78238);function rv(e){if("object"!=typeof e||null===e)throw N.rpc.internal("sub account info is not an object");if(!("address"in e))throw N.rpc.internal("sub account is invalid");if("address"in e&&"string"==typeof e.address&&!(0,rb.U)(e.address))throw N.rpc.internal("sub account address is invalid");if("factory"in e&&"string"==typeof e.factory&&!(0,rb.U)(e.factory))throw N.rpc.internal("sub account factory address is invalid");if("factoryData"in e&&"string"==typeof e.factoryData&&!(0,rg.v)(e.factoryData))throw N.rpc.internal("sub account factory data is invalid")}async function rw(){return crypto.subtle.generateKey({name:"ECDH",namedCurve:"P-256"},!0,["deriveKey"])}async function rx(e,t){return crypto.subtle.deriveKey({name:"ECDH",public:t},e,{name:"AES-GCM",length:256},!1,["encrypt","decrypt"])}async function rk(e,t){let n=crypto.getRandomValues(new Uint8Array(12)),r=await crypto.subtle.encrypt({name:"AES-GCM",iv:n},e,new TextEncoder().encode(t));return{iv:n,cipherText:r}}async function rE(e,{iv:t,cipherText:n}){let r=await crypto.subtle.decrypt({name:"AES-GCM",iv:t},e,n);return new TextDecoder().decode(r)}function rA(e){switch(e){case"public":return"spki";case"private":return"pkcs8"}}async function rS(e,t){let n=rA(e);return[...new Uint8Array(await crypto.subtle.exportKey(n,t))].map(e=>e.toString(16).padStart(2,"0")).join("")}async function rC(e,t){let n=rA(e),r=new Uint8Array(t.match(/.{1,2}/g).map(e=>Number.parseInt(e,16))).buffer;return await crypto.subtle.importKey(n,new Uint8Array(r),{name:"ECDH",namedCurve:"P-256"},!0,"private"===e?["deriveKey"]:[])}async function rP(e,t){return rk(t,JSON.stringify(e,(e,t)=>t instanceof Error?{...t.code?{code:t.code}:{},message:t.message}:t))}async function rO(e,t){return JSON.parse(await rE(t,e))}async function rI(e,t){let n={...e,jsonrpc:"2.0",id:crypto.randomUUID()},r=await fetch(t,{method:"POST",body:JSON.stringify(n),mode:"cors",headers:{"Content-Type":"application/json","X-Cbw-Sdk-Version":c,"X-Cbw-Sdk-Platform":o}}),{result:a,error:i}=await r.json();if(i)throw i;return a}var rT=n(6005),rB=n.t(rT,2);let rU=rB&&"object"==typeof rB&&"webcrypto"in rB?rT.webcrypto:rB&&"object"==typeof rB&&"randomBytes"in rB?rB:void 0;function r_(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name}function rj(e){if(!Number.isSafeInteger(e)||e<0)throw Error("positive integer expected, got "+e)}function rN(e,...t){if(!r_(e))throw Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw Error("Uint8Array expected of length "+t+", got length="+e.length)}function rR(e){if("function"!=typeof e||"function"!=typeof e.create)throw Error("Hash should be wrapped by utils.createHasher");rj(e.outputLen),rj(e.blockLen)}function rD(e,t=!0){if(e.destroyed)throw Error("Hash instance has been destroyed");if(t&&e.finished)throw Error("Hash#digest() has already been called")}function rF(...e){for(let t=0;t>>t}let rG="function"==typeof Uint8Array.from([]).toHex&&"function"==typeof Uint8Array.fromHex,rq=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function rH(e){if(rN(e),rG)return e.toHex();let t="";for(let n=0;n=rz._0&&e<=rz._9?e-rz._0:e>=rz.A&&e<=rz.F?e-(rz.A-10):e>=rz.a&&e<=rz.f?e-(rz.a-10):void 0}function rV(e){if("string"!=typeof e)throw Error("hex string expected, got "+typeof e);if(rG)return Uint8Array.fromHex(e);let t=e.length,n=t/2;if(t%2)throw Error("hex string expected, got unpadded hex of length "+t);let r=new Uint8Array(n);for(let t=0,a=0;te().update(rZ(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function rQ(e=32){if(rU&&"function"==typeof rU.getRandomValues)return rU.getRandomValues(new Uint8Array(e));if(rU&&"function"==typeof rU.randomBytes)return Uint8Array.from(rU.randomBytes(e));throw Error("crypto.getRandomValues must be defined")}class rX extends rJ{constructor(e,t,n,r){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=r,this.buffer=new Uint8Array(e),this.view=rM(this.buffer)}update(e){rD(this),rN(e=rZ(e));let{view:t,buffer:n,blockLen:r}=this,a=e.length;for(let i=0;ir-i&&(this.process(n,0),i=0);for(let e=i;e>a&i),o=Number(n&i),c=r?4:0,u=r?0:4;e.setUint32(t+c,s,r),e.setUint32(t+u,o,r)})(n,r-8,BigInt(8*this.length),a),this.process(n,0);let s=rM(e),o=this.outputLen;if(o%4)throw Error("_sha2: outputLen should be aligned to 32bit");let c=o/4,u=this.get();if(c>u.length)throw Error("_sha2: outputLen bigger than state");for(let e=0;ee>>>n,r5=(e,t,n)=>e<<32-n|t>>>n,r4=(e,t,n)=>e>>>n|t<<32-n,r7=(e,t,n)=>e<<32-n|t>>>n,r8=(e,t,n)=>e<<64-n|t>>>n-32,r9=(e,t,n)=>e>>>n-32|t<<64-n;function ae(e,t,n,r){let a=(t>>>0)+(r>>>0);return{h:e+n+(a/4294967296|0)|0,l:0|a}}let at=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0),an=(e,t,n,r)=>t+n+r+(e/4294967296|0)|0,ar=(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0),aa=(e,t,n,r,a)=>t+n+r+a+(e/4294967296|0)|0,ai=(e,t,n,r,a)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(a>>>0),as=(e,t,n,r,a,i)=>t+n+r+a+i+(e/4294967296|0)|0,ao=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),ac=new Uint32Array(64);class au extends rX{constructor(e=32){super(64,e,8,!1),this.A=0|r$[0],this.B=0|r$[1],this.C=0|r$[2],this.D=0|r$[3],this.E=0|r$[4],this.F=0|r$[5],this.G=0|r$[6],this.H=0|r$[7]}get(){let{A:e,B:t,C:n,D:r,E:a,F:i,G:s,H:o}=this;return[e,t,n,r,a,i,s,o]}set(e,t,n,r,a,i,s,o){this.A=0|e,this.B=0|t,this.C=0|n,this.D=0|r,this.E=0|a,this.F=0|i,this.G=0|s,this.H=0|o}process(e,t){for(let n=0;n<16;n++,t+=4)ac[n]=e.getUint32(t,!1);for(let e=16;e<64;e++){let t=ac[e-15],n=ac[e-2],r=rL(t,7)^rL(t,18)^t>>>3,a=rL(n,17)^rL(n,19)^n>>>10;ac[e]=a+ac[e-7]+r+ac[e-16]|0}let{A:n,B:r,C:a,D:i,E:s,F:o,G:c,H:u}=this;for(let e=0;e<64;e++){var l,d,f,p;let t=u+(rL(s,6)^rL(s,11)^rL(s,25))+((l=s)&o^~l&c)+ao[e]+ac[e]|0,m=(rL(n,2)^rL(n,13)^rL(n,22))+((d=n)&(f=r)^d&(p=a)^f&p)|0;u=c,c=o,o=s,s=i+t|0,i=a,a=r,r=n,n=t+m|0}n=n+this.A|0,r=r+this.B|0,a=a+this.C|0,i=i+this.D|0,s=s+this.E|0,o=o+this.F|0,c=c+this.G|0,u=u+this.H|0,this.set(n,r,a,i,s,o,c,u)}roundClean(){rF(ac)}destroy(){this.set(0,0,0,0,0,0,0,0),rF(this.buffer)}}let al=function(e,t=!1){let n=e.length,r=new Uint32Array(n),a=new Uint32Array(n);for(let i=0;i>r3&r2)}:{h:0|Number(e>>r3&r2),l:0|Number(e&r2)}}(e[i],t);[r[i],a[i]]=[n,s]}return[r,a]}(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))),ad=al[0],af=al[1],ap=new Uint32Array(80),am=new Uint32Array(80);class ah extends rX{constructor(e=64){super(128,e,16,!1),this.Ah=0|r1[0],this.Al=0|r1[1],this.Bh=0|r1[2],this.Bl=0|r1[3],this.Ch=0|r1[4],this.Cl=0|r1[5],this.Dh=0|r1[6],this.Dl=0|r1[7],this.Eh=0|r1[8],this.El=0|r1[9],this.Fh=0|r1[10],this.Fl=0|r1[11],this.Gh=0|r1[12],this.Gl=0|r1[13],this.Hh=0|r1[14],this.Hl=0|r1[15]}get(){let{Ah:e,Al:t,Bh:n,Bl:r,Ch:a,Cl:i,Dh:s,Dl:o,Eh:c,El:u,Fh:l,Fl:d,Gh:f,Gl:p,Hh:m,Hl:h}=this;return[e,t,n,r,a,i,s,o,c,u,l,d,f,p,m,h]}set(e,t,n,r,a,i,s,o,c,u,l,d,f,p,m,h){this.Ah=0|e,this.Al=0|t,this.Bh=0|n,this.Bl=0|r,this.Ch=0|a,this.Cl=0|i,this.Dh=0|s,this.Dl=0|o,this.Eh=0|c,this.El=0|u,this.Fh=0|l,this.Fl=0|d,this.Gh=0|f,this.Gl=0|p,this.Hh=0|m,this.Hl=0|h}process(e,t){for(let n=0;n<16;n++,t+=4)ap[n]=e.getUint32(t),am[n]=e.getUint32(t+=4);for(let e=16;e<80;e++){let t=0|ap[e-15],n=0|am[e-15],r=r4(t,n,1)^r4(t,n,8)^r6(t,n,7),a=r7(t,n,1)^r7(t,n,8)^r5(t,n,7),i=0|ap[e-2],s=0|am[e-2],o=r4(i,s,19)^r8(i,s,61)^r6(i,s,6),c=ar(a,r7(i,s,19)^r9(i,s,61)^r5(i,s,6),am[e-7],am[e-16]),u=aa(c,r,o,ap[e-7],ap[e-16]);ap[e]=0|u,am[e]=0|c}let{Ah:n,Al:r,Bh:a,Bl:i,Ch:s,Cl:o,Dh:c,Dl:u,Eh:l,El:d,Fh:f,Fl:p,Gh:m,Gl:h,Hh:y,Hl:b}=this;for(let e=0;e<80;e++){let t=r4(l,d,14)^r4(l,d,18)^r8(l,d,41),g=r7(l,d,14)^r7(l,d,18)^r9(l,d,41),v=l&f^~l&m,w=ai(b,g,d&p^~d&h,af[e],am[e]),x=as(w,y,t,v,ad[e],ap[e]),k=0|w,E=r4(n,r,28)^r8(n,r,34)^r8(n,r,39),A=r7(n,r,28)^r9(n,r,34)^r9(n,r,39),S=n&a^n&s^a&s,C=r&i^r&o^i&o;y=0|m,b=0|h,m=0|f,h=0|p,f=0|l,p=0|d,({h:l,l:d}=ae(0|c,0|u,0|x,0|k)),c=0|s,u=0|o,s=0|a,o=0|i,a=0|n,i=0|r;let P=at(k,A,C);n=an(P,x,E,S),r=0|P}({h:n,l:r}=ae(0|this.Ah,0|this.Al,0|n,0|r)),({h:a,l:i}=ae(0|this.Bh,0|this.Bl,0|a,0|i)),({h:s,l:o}=ae(0|this.Ch,0|this.Cl,0|s,0|o)),({h:c,l:u}=ae(0|this.Dh,0|this.Dl,0|c,0|u)),({h:l,l:d}=ae(0|this.Eh,0|this.El,0|l,0|d)),({h:f,l:p}=ae(0|this.Fh,0|this.Fl,0|f,0|p)),({h:m,l:h}=ae(0|this.Gh,0|this.Gl,0|m,0|h)),({h:y,l:b}=ae(0|this.Hh,0|this.Hl,0|y,0|b)),this.set(n,r,a,i,s,o,c,u,l,d,f,p,m,h,y,b)}roundClean(){rF(ap,am)}destroy(){rF(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}class ay extends ah{constructor(){super(48),this.Ah=0|r0[0],this.Al=0|r0[1],this.Bh=0|r0[2],this.Bl=0|r0[3],this.Ch=0|r0[4],this.Cl=0|r0[5],this.Dh=0|r0[6],this.Dl=0|r0[7],this.Eh=0|r0[8],this.El=0|r0[9],this.Fh=0|r0[10],this.Fl=0|r0[11],this.Gh=0|r0[12],this.Gl=0|r0[13],this.Hh=0|r0[14],this.Hl=0|r0[15]}}let ab=rY(()=>new au),ag=rY(()=>new ah),av=rY(()=>new ay);class aw extends rJ{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,rR(e);let n=rZ(t);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let r=this.blockLen,a=new Uint8Array(r);a.set(n.length>r?e.create().update(n).digest():n);for(let e=0;enew aw(e,t).update(n).digest();ax.create=(e,t)=>new aw(e,t);let ak=BigInt(0),aE=BigInt(1);function aA(e,t=""){if("boolean"!=typeof e)throw Error((t&&`"${t}"`)+"expected boolean, got type="+typeof e);return e}function aS(e,t,n=""){let r=r_(e),a=e?.length,i=void 0!==t;if(!r||i&&a!==t)throw Error((n&&`"${n}" `)+"expected Uint8Array"+(i?` of length ${t}`:"")+", got "+(r?`length=${a}`:`type=${typeof e}`));return e}function aC(e){let t=e.toString(16);return 1&t.length?"0"+t:t}function aP(e){if("string"!=typeof e)throw Error("hex string expected, got "+typeof e);return""===e?ak:BigInt("0x"+e)}function aO(e){return rN(e),aP(rH(Uint8Array.from(e).reverse()))}function aI(e,t){return rV(e.toString(16).padStart(2*t,"0"))}function aT(e,t){return aI(e,t).reverse()}function aB(e,t,n){let r;if("string"==typeof t)try{r=rV(t)}catch(t){throw Error(e+" must be hex string or Uint8Array, cause: "+t)}else if(r_(t))r=Uint8Array.from(t);else throw Error(e+" must be hex string or Uint8Array");let a=r.length;if("number"==typeof n&&a!==n)throw Error(e+" of length "+n+" expected, got "+a);return r}let aU=e=>"bigint"==typeof e&&ak<=e;function a_(e){let t;for(t=0;e>ak;e>>=aE,t+=1);return t}let aj=e=>(aE<r(e,t,!1)),Object.entries(n).forEach(([e,t])=>r(e,t,!0))}function aR(e){let t=new WeakMap;return(n,...r)=>{let a=t.get(n);if(void 0!==a)return a;let i=e(n,...r);return t.set(n,i),i}}let aD=BigInt(0),aF=BigInt(1),aM=BigInt(2),aL=BigInt(3),aG=BigInt(4),aq=BigInt(5),aH=BigInt(7),az=BigInt(8),aK=BigInt(9),aV=BigInt(16);function aZ(e,t){let n=e%t;return n>=aD?n:t+n}function aW(e,t){if(e===aD)throw Error("invert: expected non-zero number");if(t<=aD)throw Error("invert: expected positive modulus, got "+t);let n=aZ(e,t),r=t,a=aD,i=aF,s=aF,o=aD;for(;n!==aD;){let e=r/n,t=r%n,c=a-s*e,u=i-o*e;r=n,n=t,a=s,i=o,s=c,o=u}if(r!==aF)throw Error("invert: does not exist");return aZ(a,t)}function aJ(e,t,n){if(!e.eql(e.sqr(t),n))throw Error("Cannot find square root")}function aY(e,t){let n=(e.ORDER+aF)/aG,r=e.pow(t,n);return aJ(e,r,t),r}function aQ(e,t){let n=(e.ORDER-aq)/az,r=e.mul(t,aM),a=e.pow(r,n),i=e.mul(t,a),s=e.mul(e.mul(i,aM),a),o=e.mul(i,e.sub(s,e.ONE));return aJ(e,o,t),o}function aX(e){if(e1e3)throw Error("Cannot find square root: probably non-prime P");if(1===n)return aY;let i=a.pow(r,t),s=(t+aF)/aM;return function(e,r){if(e.is0(r))return r;if(1!==a1(e,r))throw Error("Cannot find square root");let a=n,o=e.mul(e.ONE,i),c=e.pow(r,t),u=e.pow(r,s);for(;!e.eql(c,e.ONE);){if(e.is0(c))return e.ZERO;let t=1,n=e.sqr(c);for(;!e.eql(n,e.ONE);)if(t++,n=e.sqr(n),t===a)throw Error("Cannot find square root");let r=aF<e.is0(n)?t:(r[a]=t,e.mul(t,n)),e.ONE),i=e.inv(a);return t.reduceRight((t,n,a)=>e.is0(n)?t:(r[a]=e.mul(t,r[a]),e.mul(t,n)),i),r}function a1(e,t){let n=(e.ORDER-aF)/aM,r=e.pow(t,n),a=e.eql(r,e.ONE),i=e.eql(r,e.ZERO),s=e.eql(r,e.neg(e.ONE));if(!a&&!i&&!s)throw Error("invalid Legendre symbol result");return a?1:i?0:-1}function a2(e,t){void 0!==t&&rj(t);let n=void 0!==t?t:e.toString(2).length;return{nBitLength:n,nByteLength:Math.ceil(n/8)}}function a3(e,t,n=!1,r={}){let a,i,s,o;if(e<=aD)throw Error("invalid field: expected ORDER > 0, got "+e);let c=!1;if("object"==typeof t&&null!=t){if(r.sqrt||n)throw Error("cannot specify opts in two arguments");t.BITS&&(i=t.BITS),t.sqrt&&(s=t.sqrt),"boolean"==typeof t.isLE&&(n=t.isLE),"boolean"==typeof t.modFromBytes&&(c=t.modFromBytes),o=t.allowedLengths}else"number"==typeof t&&(i=t),r.sqrt&&(s=r.sqrt);let{nBitLength:u,nByteLength:l}=a2(e,i);if(l>2048)throw Error("invalid field: expected ORDER of <= 2048 bytes");let d=Object.freeze({ORDER:e,isLE:n,BITS:u,BYTES:l,MASK:aj(u),ZERO:aD,ONE:aF,allowedLengths:o,create:t=>aZ(t,e),isValid:t=>{if("bigint"!=typeof t)throw Error("invalid field element: expected bigint, got "+typeof t);return aD<=t&&te===aD,isValidNot0:e=>!d.is0(e)&&d.isValid(e),isOdd:e=>(e&aF)===aF,neg:t=>aZ(-t,e),eql:(e,t)=>e===t,sqr:t=>aZ(t*t,e),add:(t,n)=>aZ(t+n,e),sub:(t,n)=>aZ(t-n,e),mul:(t,n)=>aZ(t*n,e),pow:(e,t)=>(function(e,t,n){if(naD;)n&aF&&(r=e.mul(r,a)),a=e.sqr(a),n>>=aF;return r})(d,e,t),div:(t,n)=>aZ(t*aW(n,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>aW(t,e),sqrt:s||(t=>(!a&&(a=e%aG===aL?aY:e%az===aq?aQ:e%aV===aK?function(e){let t=a3(e),n=aX(e),r=n(t,t.neg(t.ONE)),a=n(t,r),i=n(t,t.neg(r)),s=(e+aH)/aV;return(e,t)=>{let n=e.pow(t,s),o=e.mul(n,r),c=e.mul(n,a),u=e.mul(n,i),l=e.eql(e.sqr(o),t),d=e.eql(e.sqr(c),t);n=e.cmov(n,o,l),o=e.cmov(u,c,d);let f=e.eql(e.sqr(o),t),p=e.cmov(n,o,f);return aJ(e,p,t),p}}(e):aX(e)),a(d,t))),toBytes:e=>n?aT(e,l):aI(e,l),fromBytes:(t,r=!0)=>{if(o){if(!o.includes(t.length)||t.length>l)throw Error("Field.fromBytes: expected "+o+" bytes, got "+t.length);let e=new Uint8Array(l);e.set(t,n?0:e.length-t.length),t=e}if(t.length!==l)throw Error("Field.fromBytes: expected "+l+" bytes, got "+t.length);let a=n?aO(t):aP(rH(t));if(c&&(a=aZ(a,e)),!r&&!d.isValid(a))throw Error("invalid field element: outside of range 0..ORDER");return a},invertBatch:e=>a0(d,e),cmov:(e,t,n)=>n?t:e});return Object.freeze(d)}function a6(e){if("bigint"!=typeof e)throw Error("field order must be bigint");return Math.ceil(e.toString(2).length/8)}function a5(e){let t=a6(e);return t+Math.ceil(t/2)}let a4=BigInt(0),a7=BigInt(1);function a8(e,t){let n=t.negate();return e?n:t}function a9(e,t){let n=a0(e.Fp,t.map(e=>e.Z));return t.map((t,r)=>e.fromAffine(t.toAffine(n[r])))}function ie(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw Error("invalid window size, expected [1.."+t+"], got W="+e)}function it(e,t){ie(e,t);let n=Math.ceil(t/e)+1,r=2**(e-1),a=2**e;return{windows:n,windowSize:r,mask:aj(e),maxNumber:a,shiftBy:BigInt(e)}}function ir(e,t,n){let{windowSize:r,mask:a,maxNumber:i,shiftBy:s}=n,o=Number(e&a),c=e>>s;o>r&&(o-=i,c+=a7);let u=t*r,l=u+Math.abs(o)-1;return{nextN:c,offset:l,isZero:0===o,isNeg:o<0,isNegF:t%2!=0,offsetF:u}}let ia=new WeakMap,ii=new WeakMap;function is(e){return ii.get(e)||1}function io(e){if(e!==a4)throw Error("invalid wNAF")}class ic{constructor(e,t){this.BASE=e.BASE,this.ZERO=e.ZERO,this.Fn=e.Fn,this.bits=t}_unsafeLadder(e,t,n=this.ZERO){let r=e;for(;t>a4;)t&a7&&(n=n.add(r)),r=r.double(),t>>=a7;return n}precomputeWindow(e,t){let{windows:n,windowSize:r}=it(t,this.bits),a=[],i=e,s=i;for(let e=0;e(e[t]="function",e),{ORDER:"bigint",MASK:"bigint",BYTES:"number",BITS:"number"})),t}let il=(e,t)=>(e+(e>=0?t:-t)/ig)/t;function id(e){if(!["compact","recovered","der"].includes(e))throw Error('Signature format must be "compact", "recovered", or "der"');return e}function ip(e,t){let n={};for(let r of Object.keys(t))n[r]=void 0===e[r]?t[r]:e[r];return aA(n.lowS,"lowS"),aA(n.prehash,"prehash"),void 0!==n.format&&id(n.format),n}class im extends Error{constructor(e=""){super(e)}}let ih={Err:im,_tlv:{encode:(e,t)=>{let{Err:n}=ih;if(e<0||e>256)throw new n("tlv.encode: wrong tag");if(1&t.length)throw new n("tlv.encode: unpadded data");let r=t.length/2,a=aC(r);if(a.length/2&128)throw new n("tlv.encode: long form length too big");let i=r>127?aC(a.length/2|128):"";return aC(e)+i+a+t},decode(e,t){let{Err:n}=ih,r=0;if(e<0||e>256)throw new n("tlv.encode: wrong tag");if(t.length<2||t[r++]!==e)throw new n("tlv.decode: wrong tlv");let a=t[r++],i=0;if(128&a){let e=127&a;if(!e)throw new n("tlv.decode(long): indefinite length not supported");if(e>4)throw new n("tlv.decode(long): byte length is too big");let s=t.subarray(r,r+e);if(s.length!==e)throw new n("tlv.decode: length bytes not complete");if(0===s[0])throw new n("tlv.decode(long): zero leftmost byte");for(let e of s)i=i<<8|e;if(r+=e,i<128)throw new n("tlv.decode(long): not minimal encoding")}else i=a;let s=t.subarray(r,r+i);if(s.length!==i)throw new n("tlv.decode: wrong value length");return{v:s,l:t.subarray(r+i)}}},_int:{encode(e){let{Err:t}=ih;if(e(function(e){let{CURVE:t,curveOpts:n,hash:r,ecdsaOpts:a}=function(e){let{CURVE:t,curveOpts:n}=function(e){let t={a:e.a,b:e.b,p:e.Fp.ORDER,n:e.n,h:e.h,Gx:e.Gx,Gy:e.Gy},n=e.Fp,r=e.allowedPrivateKeyLengths?Array.from(new Set(e.allowedPrivateKeyLengths.map(e=>Math.ceil(e/2)))):void 0,a={Fp:n,Fn:a3(t.n,{BITS:e.nBitLength,allowedLengths:r,modFromBytes:e.wrapPrivateKey}),allowInfinityPoint:e.allowInfinityPoint,endo:e.endo,isTorsionFree:e.isTorsionFree,clearCofactor:e.clearCofactor,fromBytes:e.fromBytes,toBytes:e.toBytes};return{CURVE:t,curveOpts:a}}(e),r={hmac:e.hmac,randomBytes:e.randomBytes,lowS:e.lowS,bits2int:e.bits2int,bits2int_modN:e.bits2int_modN};return{CURVE:t,curveOpts:n,hash:e.hash,ecdsaOpts:r}}(e);return function(e,t){let n=t.Point;return Object.assign({},t,{ProjectivePoint:n,CURVE:Object.assign({},e,a2(n.Fn.ORDER,n.Fn.BITS))})}(e,function(e,t,n={}){rR(t),aN(n,{},{hmac:"function",lowS:"boolean",randomBytes:"function",bits2int:"function",bits2int_modN:"function"});let r=n.randomBytes||rQ,a=n.hmac||((e,...n)=>ax(t,e,rW(...n))),{Fp:i,Fn:s}=e,{ORDER:o,BITS:c}=s,{keygen:u,getPublicKey:l,getSharedSecret:d,utils:f,lengths:p}=function(e,t={}){let{Fn:n}=e,r=t.randomBytes||rQ,a=Object.assign(iE(e.Fp,n),{seed:a5(n.ORDER)});function i(e){try{return!!ix(n,e)}catch(e){return!1}}function s(e=r(a.seed)){return function(e,t,n=!1){let r=e.length,a=a6(t),i=a5(t);if(r<16||r1024)throw Error("expected "+i+"-1024 bytes of input, got "+r);let s=aZ(n?aO(e):aP(rH(e)),t-aF)+aF;return n?aT(s,a):aI(s,a)}(aS(e,a.seed,"seed"),n.ORDER)}function o(t,r=!0){return e.BASE.multiply(ix(n,t)).toBytes(r)}function c(t){if("bigint"==typeof t)return!1;if(t instanceof e)return!0;let{secretKey:r,publicKey:i,publicKeyUncompressed:s}=a;if(n.allowedLengths||r===i)return;let o=aB("key",t).length;return o===i||o===s}return Object.freeze({getPublicKey:o,getSharedSecret:function(t,r,a=!0){if(!0===c(t))throw Error("first arg must be private key");if(!1===c(r))throw Error("second arg must be public key");let i=ix(n,t);return e.fromHex(r).multiply(i).toBytes(a)},keygen:function(e){let t=s(e);return{secretKey:t,publicKey:o(t)}},Point:e,utils:{isValidSecretKey:i,isValidPublicKey:function(t,n){let{publicKey:r,publicKeyUncompressed:i}=a;try{let a=t.length;if(!0===n&&a!==r||!1===n&&a!==i)return!1;return!!e.fromBytes(t)}catch(e){return!1}},randomSecretKey:s,isValidPrivateKey:i,randomPrivateKey:s,normPrivateKeyToScalar:e=>ix(n,e),precompute:(t=8,n=e.BASE)=>n.precompute(t,!1)},lengths:a})}(e,n),m={prehash:!1,lowS:"boolean"==typeof n.lowS&&n.lowS,format:void 0,extraEntropy:!1},h="compact";function y(e,t){if(!s.isValidNot0(t))throw Error(`invalid signature ${e}: out of range 1..Point.Fn.ORDER`);return t}class b{constructor(e,t,n){this.r=y("r",e),this.s=y("s",t),null!=n&&(this.recovery=n),Object.freeze(this)}static fromBytes(e,t=h){let n;if(function(e,t){id(t);let n=p.signature;aS(e,"compact"===t?n:"recovered"===t?n+1:void 0,`${t} signature`)}(e,t),"der"===t){let{r:t,s:n}=ih.toSig(aS(e));return new b(t,n)}"recovered"===t&&(n=e[0],t="compact",e=e.subarray(1));let r=s.BYTES,a=e.subarray(0,r),i=e.subarray(r,2*r);return new b(s.fromBytes(a),s.fromBytes(i),n)}static fromHex(e,t){return this.fromBytes(rV(e),t)}addRecoveryBit(e){return new b(this.r,this.s,e)}recoverPublicKey(t){let n=i.ORDER,{r,s:a,recovery:c}=this;if(null==c||![0,1,2,3].includes(c))throw Error("recovery id invalid");if(o*ig1)throw Error("recovery id is ambiguous for h>1 curve");let u=2===c||3===c?r+o:r;if(!i.isValid(u))throw Error("recovery id 2 or 3 invalid");let l=i.toBytes(u),d=e.fromBytes(rW(ik((1&c)==0),l)),f=s.inv(u),p=v(aB("msgHash",t)),m=s.create(-p*f),h=s.create(a*f),y=e.BASE.multiplyUnsafe(m).add(d.multiplyUnsafe(h));if(y.is0())throw Error("point at infinify");return y.assertValidity(),y}hasHighS(){return this.s>o>>ib}toBytes(e=h){if(id(e),"der"===e)return rV(ih.hexFromSig(this));let t=s.toBytes(this.r),n=s.toBytes(this.s);if("recovered"===e){if(null==this.recovery)throw Error("recovery bit must be present");return rW(Uint8Array.of(this.recovery),t,n)}return rW(t,n)}toHex(e){return rH(this.toBytes(e))}assertValidity(){}static fromCompact(e){return b.fromBytes(aB("sig",e),"compact")}static fromDER(e){return b.fromBytes(aB("sig",e),"der")}normalizeS(){return this.hasHighS()?new b(this.r,s.neg(this.s),this.recovery):this}toDERRawBytes(){return this.toBytes("der")}toDERHex(){return rH(this.toBytes("der"))}toCompactRawBytes(){return this.toBytes("compact")}toCompactHex(){return rH(this.toBytes("compact"))}}let g=n.bits2int||function(e){if(e.length>8192)throw Error("input is too large");let t=aP(rH(e)),n=8*e.length-c;return n>0?t>>BigInt(n):t},v=n.bits2int_modN||function(e){return s.create(g(e))},w=aj(c);function x(e){return function(e,t,n,r){if(!(aU(t)&&aU(n)&&aU(r))||!(n<=t)||!(te in a))throw Error("sign() legacy options not supported");let{lowS:i,prehash:c,extraEntropy:u}=ip(a,m),l=v(t=k(t,c)),d=ix(s,n),f=[x(d),x(l)];if(null!=u&&!1!==u){let e=!0===u?r(p.secretKey):u;f.push(aB("extraEntropy",e))}return{seed:rW(...f),k2sig:function(t){let n=g(t);if(!s.isValidNot0(n))return;let r=s.inv(n),a=e.BASE.multiply(n).toAffine(),c=s.create(a.x);if(c===iy)return;let u=s.create(r*s.create(l+c*d));if(u===iy)return;let f=(a.x===c?0:2)|Number(a.y&ib),p=u;return i&&u>o>>ib&&(p=s.neg(u),f^=1),new b(c,p,f)}}}(n=aB("message",n),i,c);return(function(e,t,n){if("number"!=typeof e||e<2)throw Error("hashLen must be a number");if("number"!=typeof t||t<2)throw Error("qByteLen must be a number");if("function"!=typeof n)throw Error("hmacFn must be a function");let r=e=>new Uint8Array(e),a=e=>Uint8Array.of(e),i=r(e),s=r(e),o=0,c=()=>{i.fill(1),s.fill(0),o=0},u=(...e)=>n(s,i,...e),l=(e=r(0))=>{s=u(a(0),e),i=u(),0!==e.length&&(s=u(a(1),e),i=u())},d=()=>{if(o++>=1e3)throw Error("drbg: tried 1000 values");let e=0,n=[];for(;e{let n;for(c(),l(e);!(n=t(d()));)l();return c(),n}})(t.outputLen,s.BYTES,a)(u,l)},verify:function(t,n,r,a={}){let{lowS:i,prehash:o,format:c}=ip(a,m);if(r=aB("publicKey",r),n=k(aB("message",n),o),"strict"in a)throw Error("options.strict was renamed to lowS");let u=void 0===c?function(e){let t;let n="string"==typeof e||r_(e),r=!n&&null!==e&&"object"==typeof e&&"bigint"==typeof e.r&&"bigint"==typeof e.s;if(!n&&!r)throw Error("invalid signature, expected Uint8Array, hex string or Signature instance");if(r)t=new b(e.r,e.s);else if(n){try{t=b.fromBytes(aB("sig",e),"der")}catch(e){if(!(e instanceof ih.Err))throw e}if(!t)try{t=b.fromBytes(aB("sig",e),"compact")}catch(e){return!1}}return!!t&&t}(t):b.fromBytes(aB("sig",t),c);if(!1===u)return!1;try{let t=e.fromBytes(r);if(i&&u.hasHighS())return!1;let{r:a,s:o}=u,c=v(n),l=s.inv(o),d=s.create(c*l),f=s.create(a*l),p=e.BASE.multiplyUnsafe(d).add(t.multiplyUnsafe(f));if(p.is0())return!1;return s.create(p.x)===a}catch(e){return!1}},recoverPublicKey:function(e,t,n={}){let{prehash:r}=ip(n,m);return t=k(t,r),b.fromBytes(e,"recovered").recoverPublicKey(t).toBytes()},Signature:b,hash:t})}(function(e,t={}){let n=function(e,t,n={},r){if(void 0===r&&(r="edwards"===e),!t||"object"!=typeof t)throw Error(`expected valid ${e} CURVE object`);for(let e of["p","n","h"]){let n=t[e];if(!("bigint"==typeof n&&n>a4))throw Error(`CURVE.${e} must be positive bigint`)}let a=iu(t.p,n.Fp,r),i=iu(t.n,n.Fn,r);for(let n of["Gx","Gy","a","weierstrass"===e?"b":"d"])if(!a.isValid(t[n]))throw Error(`CURVE.${n} must be valid field element of CURVE.Fp`);return{CURVE:t=Object.freeze(Object.assign({},t)),Fp:a,Fn:i}}("weierstrass",e,t),{Fp:r,Fn:a}=n,i=n.CURVE,{h:s,n:o}=i;aN(t,{},{allowInfinityPoint:"boolean",clearCofactor:"function",isTorsionFree:"function",fromBytes:"function",toBytes:"function",endo:"object",wrapPrivateKey:"boolean"});let{endo:c}=t;if(c&&(!r.is0(i.a)||"bigint"!=typeof c.beta||!Array.isArray(c.basises)))throw Error('invalid endo: expected "beta": bigint and "basises": array');let u=iE(r,a);function l(){if(!r.isOdd)throw Error("compression is not supported: Field does not have .isOdd()")}let d=t.toBytes||function(e,t,n){let{x:a,y:i}=t.toAffine(),s=r.toBytes(a);return(aA(n,"isCompressed"),n)?(l(),rW(ik(!r.isOdd(i)),s)):rW(Uint8Array.of(4),s,r.toBytes(i))},f=t.fromBytes||function(e){aS(e,void 0,"Point");let{publicKey:t,publicKeyUncompressed:n}=u,a=e.length,i=e[0],s=e.subarray(1);if(a===t&&(2===i||3===i)){let e;let t=r.fromBytes(s);if(!r.isValid(t))throw Error("bad point: is not on curve, wrong x");let n=p(t);try{e=r.sqrt(n)}catch(e){throw Error("bad point: is not on curve, sqrt error"+(e instanceof Error?": "+e.message:""))}return l(),(1&i)==1!==r.isOdd(e)&&(e=r.neg(e)),{x:t,y:e}}if(a===n&&4===i){let e=r.BYTES,t=r.fromBytes(s.subarray(0,e)),n=r.fromBytes(s.subarray(e,2*e));if(!m(t,n))throw Error("bad point: is not on curve");return{x:t,y:n}}throw Error(`bad point: got length ${a}, expected compressed=${t} or uncompressed=${n}`)};function p(e){let t=r.sqr(e),n=r.mul(t,e);return r.add(r.add(n,r.mul(e,i.a)),i.b)}function m(e,t){let n=r.sqr(t),a=p(e);return r.eql(n,a)}if(!m(i.Gx,i.Gy))throw Error("bad curve params: generator point");let h=r.mul(r.pow(i.a,iv),iw),y=r.mul(r.sqr(i.b),BigInt(27));if(r.is0(r.add(h,y)))throw Error("bad curve params: a or b");function b(e,t,n=!1){if(!r.isValid(t)||n&&r.is0(t))throw Error(`bad point coordinate ${e}`);return t}function g(e){if(!(e instanceof E))throw Error("ProjectivePoint expected")}function v(e){if(!c||!c.basises)throw Error("no endo");return function(e,t,n){let[[r,a],[i,s]]=t,o=il(s*e,n),c=il(-a*e,n),u=e-o*r-c*i,l=-o*a-c*s,d=u=p||l=p)throw Error("splitScalar (endomorphism): failed, k="+e);return{k1neg:d,k1:u,k2neg:f,k2:l}}(e,c.basises,a.ORDER)}let w=aR((e,t)=>{let{X:n,Y:a,Z:i}=e;if(r.eql(i,r.ONE))return{x:n,y:a};let s=e.is0();null==t&&(t=s?r.ONE:r.inv(i));let o=r.mul(n,t),c=r.mul(a,t),u=r.mul(i,t);if(s)return{x:r.ZERO,y:r.ZERO};if(!r.eql(u,r.ONE))throw Error("invZ was invalid");return{x:o,y:c}}),x=aR(e=>{if(e.is0()){if(t.allowInfinityPoint&&!r.is0(e.Y))return;throw Error("bad point: ZERO")}let{x:n,y:a}=e.toAffine();if(!r.isValid(n)||!r.isValid(a))throw Error("bad point: x or y not field elements");if(!m(n,a))throw Error("bad point: equation left != right");if(!e.isTorsionFree())throw Error("bad point: not in prime-order subgroup");return!0});function k(e,t,n,a,i){return n=new E(r.mul(n.X,e),n.Y,n.Z),t=a8(a,t),n=a8(i,n),t.add(n)}class E{constructor(e,t,n){this.X=b("x",e),this.Y=b("y",t,!0),this.Z=b("z",n),Object.freeze(this)}static CURVE(){return i}static fromAffine(e){let{x:t,y:n}=e||{};if(!e||!r.isValid(t)||!r.isValid(n))throw Error("invalid affine point");if(e instanceof E)throw Error("projective point not allowed");return r.is0(t)&&r.is0(n)?E.ZERO:new E(t,n,r.ONE)}static fromBytes(e){let t=E.fromAffine(f(aS(e,void 0,"point")));return t.assertValidity(),t}static fromHex(e){return E.fromBytes(aB("pointHex",e))}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(e=8,t=!0){return S.createCache(this,e),t||this.multiply(iv),this}assertValidity(){x(this)}hasEvenY(){let{y:e}=this.toAffine();if(!r.isOdd)throw Error("Field doesn't support isOdd");return!r.isOdd(e)}equals(e){g(e);let{X:t,Y:n,Z:a}=this,{X:i,Y:s,Z:o}=e,c=r.eql(r.mul(t,o),r.mul(i,a)),u=r.eql(r.mul(n,o),r.mul(s,a));return c&&u}negate(){return new E(this.X,r.neg(this.Y),this.Z)}double(){let{a:e,b:t}=i,n=r.mul(t,iv),{X:a,Y:s,Z:o}=this,c=r.ZERO,u=r.ZERO,l=r.ZERO,d=r.mul(a,a),f=r.mul(s,s),p=r.mul(o,o),m=r.mul(a,s);return m=r.add(m,m),l=r.mul(a,o),l=r.add(l,l),c=r.mul(e,l),u=r.mul(n,p),u=r.add(c,u),c=r.sub(f,u),u=r.add(f,u),u=r.mul(c,u),c=r.mul(m,c),l=r.mul(n,l),p=r.mul(e,p),m=r.sub(d,p),m=r.mul(e,m),m=r.add(m,l),l=r.add(d,d),d=r.add(l,d),d=r.add(d,p),d=r.mul(d,m),u=r.add(u,d),p=r.mul(s,o),p=r.add(p,p),d=r.mul(p,m),c=r.sub(c,d),l=r.mul(p,f),l=r.add(l,l),new E(c,u,l=r.add(l,l))}add(e){g(e);let{X:t,Y:n,Z:a}=this,{X:s,Y:o,Z:c}=e,u=r.ZERO,l=r.ZERO,d=r.ZERO,f=i.a,p=r.mul(i.b,iv),m=r.mul(t,s),h=r.mul(n,o),y=r.mul(a,c),b=r.add(t,n),v=r.add(s,o);b=r.mul(b,v),v=r.add(m,h),b=r.sub(b,v),v=r.add(t,a);let w=r.add(s,c);return v=r.mul(v,w),w=r.add(m,y),v=r.sub(v,w),w=r.add(n,a),u=r.add(o,c),w=r.mul(w,u),u=r.add(h,y),w=r.sub(w,u),d=r.mul(f,v),u=r.mul(p,y),d=r.add(u,d),u=r.sub(h,d),d=r.add(h,d),l=r.mul(u,d),h=r.add(m,m),h=r.add(h,m),y=r.mul(f,y),v=r.mul(p,v),h=r.add(h,y),y=r.sub(m,y),y=r.mul(f,y),v=r.add(v,y),m=r.mul(h,v),l=r.add(l,m),m=r.mul(w,v),u=r.mul(b,u),u=r.sub(u,m),m=r.mul(b,h),d=r.mul(w,d),new E(u,l,d=r.add(d,m))}subtract(e){return this.add(e.negate())}is0(){return this.equals(E.ZERO)}multiply(e){let n,r;let{endo:i}=t;if(!a.isValidNot0(e))throw Error("invalid scalar: out of range");let s=e=>S.cached(this,e,e=>a9(E,e));if(i){let{k1neg:t,k1:a,k2neg:o,k2:c}=v(e),{p:u,f:l}=s(a),{p:d,f:f}=s(c);r=l.add(f),n=k(i.beta,u,d,t,o)}else{let{p:t,f:a}=s(e);n=t,r=a}return a9(E,[n,r])[0]}multiplyUnsafe(e){let{endo:n}=t;if(!a.isValid(e))throw Error("invalid scalar: out of range");if(e===iy||this.is0())return E.ZERO;if(e===ib)return this;if(S.hasCache(this))return this.multiply(e);if(!n)return S.unsafe(this,e);{let{k1neg:t,k1:r,k2neg:a,k2:i}=v(e),{p1:s,p2:o}=function(e,t,n,r){let a=t,i=e.ZERO,s=e.ZERO;for(;n>a4||r>a4;)n&a7&&(i=i.add(a)),r&a7&&(s=s.add(a)),a=a.double(),n>>=a7,r>>=a7;return{p1:i,p2:s}}(E,this,r,i);return k(n.beta,s,o,t,a)}}multiplyAndAddUnsafe(e,t,n){let r=this.multiplyUnsafe(t).add(e.multiplyUnsafe(n));return r.is0()?void 0:r}toAffine(e){return w(this,e)}isTorsionFree(){let{isTorsionFree:e}=t;return s===ib||(e?e(E,this):S.unsafe(this,o).is0())}clearCofactor(){let{clearCofactor:e}=t;return s===ib?this:e?e(E,this):this.multiplyUnsafe(s)}isSmallOrder(){return this.multiplyUnsafe(s).is0()}toBytes(e=!0){return aA(e,"isCompressed"),this.assertValidity(),d(E,this,e)}toHex(e=!0){return rH(this.toBytes(e))}toString(){return``}get px(){return this.X}get py(){return this.X}get pz(){return this.Z}toRawBytes(e=!0){return this.toBytes(e)}_setWindowSize(e){this.precompute(e)}static normalizeZ(e){return a9(E,e)}static msm(e,t){return function(e,t,n,r){(function(e,t){if(!Array.isArray(e))throw Error("array expected");e.forEach((e,n)=>{if(!(e instanceof t))throw Error("invalid point at index "+n)})})(n,e),function(e,t){if(!Array.isArray(e))throw Error("array of scalars expected");e.forEach((e,n)=>{if(!t.isValid(e))throw Error("invalid scalar at index "+n)})}(r,t);let a=n.length,i=r.length;if(a!==i)throw Error("arrays of points and scalars must have equal length");let s=e.ZERO,o=a_(BigInt(a)),c=1;o>12?c=o-3:o>4?c=o-2:o>0&&(c=2);let u=aj(c),l=Array(Number(u)+1).fill(s),d=Math.floor((t.BITS-1)/c)*c,f=s;for(let e=d;e>=0;e-=c){l.fill(s);for(let t=0;t>BigInt(e)&u);l[a]=l[a].add(n[t])}let t=s;for(let e=l.length-1,n=s;e>0;e--)n=n.add(l[e]),t=t.add(n);if(f=f.add(t),0!==e)for(let e=0;e{if(t.cause instanceof iU){if(t.cause.details)return t.cause.details;if(t.cause.shortMessage)return t.cause.shortMessage}return t.cause?.message?t.cause.message:t.details})(),r=t.cause instanceof iU&&t.cause.docsPath||t.docsPath,a=`https://oxlib.sh${r??""}`;super([e||"An error occurred.",...t.metaMessages?["",...t.metaMessages]:[],...n||r?["",n?`Details: ${n}`:void 0,r?`See: ${a}`:void 0]:[]].filter(e=>"string"==typeof e).join("\n"),t.cause?{cause:t.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:"ox@0.1.1"}),this.cause=t.cause,this.details=n,this.docs=a,this.docsPath=r,this.shortMessage=e}walk(e){return function e(t,n){return n?.(t)?t:t&&"object"==typeof t&&"cause"in t&&t.cause?e(t.cause,n):n?null:t}(this,e)}}function i_(e,t,n){return JSON.stringify(e,(e,n)=>"function"==typeof t?t(e,n):"bigint"==typeof n?n.toString()+"#__bigint":n,n)}function ij(e,t){if(iK(e)>t)throw new iJ({givenSize:iK(e),maxSize:t})}function iN(e,t={}){let{dir:n,size:r=32}=t;if(0===r)return e;let a=e.replace("0x","");if(a.length>2*r)throw new iQ({size:Math.ceil(a.length/2),targetSize:r,type:"Hex"});return`0x${a["right"===n?"padEnd":"padStart"](2*r,"0")}`}let iR=new TextEncoder,iD=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function iF(...e){return`0x${e.reduce((e,t)=>e+t.replace("0x",""),"")}`}function iM(e){return e instanceof Uint8Array?iL(e):Array.isArray(e)?iL(new Uint8Array(e)):e}function iL(e,t={}){let n="";for(let t=0;tr||s0&&t>iK(e)-1)throw new iY({offset:t,position:"start",size:iK(e)})}(e,t);let i=`0x${e.replace("0x","").slice((t??0)*2,(n??e.length)*2)}`;return a&&function(e,t,n){if("number"==typeof t&&"number"==typeof n&&iK(e)!==n-t)throw new iY({offset:n,position:"end",size:iK(e)})}(i,t,n),i}function iK(e){return Math.ceil((e.length-2)/2)}class iV extends iU{constructor({max:e,min:t,signed:n,size:r,value:a}){super(`Number \`${a}\` is not in safe${r?` ${8*r}-bit`:""}${n?" signed":" unsigned"} integer range ${e?`(\`${t}\` to \`${e}\`)`:`(above \`${t}\`)`}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.IntegerOutOfRangeError"})}}class iZ extends iU{constructor(e){super(`Value \`${"object"==typeof e?i_(e):e}\` of type \`${typeof e}\` is an invalid hex type.`,{metaMessages:['Hex types must be represented as `"0x${string}"`.']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexTypeError"})}}class iW extends iU{constructor(e){super(`Value \`${e}\` is an invalid hex value.`,{metaMessages:['Hex values must start with `"0x"` and contain only hexadecimal characters (0-9, a-f, A-F).']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexValueError"})}}class iJ extends iU{constructor({givenSize:e,maxSize:t}){super(`Size cannot exceed \`${t}\` bytes. Given size: \`${e}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeOverflowError"})}}class iY extends iU{constructor({offset:e,position:t,size:n}){super(`Slice ${"start"===t?"starting":"ending"} at offset \`${e}\` is out-of-bounds (size: \`${n}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SliceOffsetOutOfBoundsError"})}}class iQ extends iU{constructor({size:e,targetSize:t,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (\`${e}\`) exceeds padding size (\`${t}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeExceedsPaddingSizeError"})}}let iX={zero:48,nine:57,A:65,F:70,a:97,f:102};function i$(e){return e>=iX.zero&&e<=iX.nine?e-iX.zero:e>=iX.A&&e<=iX.F?e-(iX.A-10):e>=iX.a&&e<=iX.f?e-(iX.a-10):void 0}function i0(e){return e instanceof Uint8Array?e:"string"==typeof e?i2(e):i1(e)}function i1(e){return e instanceof Uint8Array?e:new Uint8Array(e)}function i2(e,t={}){let{size:n}=t,r=e;n&&(ij(e,n),r=iH(e,n));let a=r.slice(2);a.length%2&&(a=`0${a}`);let i=a.length/2,s=new Uint8Array(i);for(let e=0,t=0;e0&&t>i3(e)-1)throw new i8({offset:t,position:"start",size:i3(e)})}(e,t);let i=e.slice(t,n);return a&&function(e,t,n){if("number"==typeof t&&"number"==typeof n&&i3(e)!==n-t)throw new i8({offset:n,position:"end",size:i3(e)})}(i,t,n),i}function i5(e,t={}){let{size:n}=t;return void 0!==n&&function(e,t){if(i3(e)>t)throw new i7({givenSize:i3(e),maxSize:t})}(e,n),function(e,t={}){let{signed:n}=t;t.size&&ij(e,t.size);let r=BigInt(e);if(!n)return r;let a=(1n<<8n*BigInt((e.length-2)/2))-1n;return r<=a>>1n?r:r-a-1n}(iL(e,t),t)}class i4 extends iU{constructor(e){super(`Value \`${"object"==typeof e?i_(e):e}\` of type \`${typeof e}\` is an invalid Bytes value.`,{metaMessages:["Bytes values must be of type `Bytes`."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.InvalidBytesTypeError"})}}class i7 extends iU{constructor({givenSize:e,maxSize:t}){super(`Size cannot exceed \`${t}\` bytes. Given size: \`${e}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeOverflowError"})}}class i8 extends iU{constructor({offset:e,position:t,size:n}){super(`Slice ${"start"===t?"starting":"ending"} at offset \`${e}\` is out-of-bounds (size: \`${n}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SliceOffsetOutOfBoundsError"})}}function i9(e,t={}){let{compressed:n}=t,{prefix:r,x:a,y:i}=e;if(!1===n||"bigint"==typeof a&&"bigint"==typeof i){if(4!==r)throw new sr({prefix:r,cause:new si});return}if(!0===n||"bigint"==typeof a&&void 0===i){if(3!==r&&2!==r)throw new sr({prefix:r,cause:new sa});return}throw new sn({publicKey:e})}function se(e){if(132!==e.length&&130!==e.length&&68!==e.length)throw new ss({publicKey:e});return 130===e.length?{prefix:4,x:BigInt(iz(e,0,32)),y:BigInt(iz(e,32,64))}:132===e.length?{prefix:Number(iz(e,0,1)),x:BigInt(iz(e,1,33)),y:BigInt(iz(e,33,65))}:{prefix:Number(iz(e,0,1)),x:BigInt(iz(e,1,33))}}function st(e,t={}){i9(e);let{prefix:n,x:r,y:a}=e,{includePrefix:i=!0}=t;return iF(i?iG(n,{size:1}):"0x",iG(r,{size:32}),"bigint"==typeof a?iG(a,{size:32}):"0x")}class sn extends iU{constructor({publicKey:e}){super(`Value \`${i_(e)}\` is not a valid public key.`,{metaMessages:["Public key must contain:","- an `x` and `prefix` value (compressed)","- an `x`, `y`, and `prefix` value (uncompressed)"]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidError"})}}class sr extends iU{constructor({prefix:e,cause:t}){super(`Prefix "${e}" is invalid.`,{cause:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidPrefixError"})}}class sa extends iU{constructor(){super("Prefix must be 2 or 3 for compressed public keys."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidCompressedPrefixError"})}}class si extends iU{constructor(){super("Prefix must be 4 for uncompressed public keys."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidUncompressedPrefixError"})}}class ss extends iU{constructor({publicKey:e}){super(`Value \`${e}\` is an invalid public key size.`,{metaMessages:["Expected: 33 bytes (compressed + prefix), 64 bytes (uncompressed) or 65 bytes (uncompressed + prefix).",`Received ${iK(iM(e))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidSerializedSizeError"})}}async function so(e={}){let{extractable:t=!1}=e,n=await globalThis.crypto.subtle.generateKey({name:"ECDSA",namedCurve:"P-256"},t,["sign","verify"]),r=function(e){let t=(()=>{if(function(e,t={}){let{strict:n=!1}=t;try{return function(e,t={}){let{strict:n=!1}=t;if(!e||"string"!=typeof e)throw new iZ(e);if(n&&!/^0x[0-9a-fA-F]*$/.test(e)||!e.startsWith("0x"))throw new iW(e)}(e,{strict:n}),!0}catch{return!1}}(e))return se(e);if(function(e){try{return function(e){if(!(e instanceof Uint8Array)&&(!e||"object"!=typeof e||!("BYTES_PER_ELEMENT"in e)||1!==e.BYTES_PER_ELEMENT||"Uint8Array"!==e.constructor.name))throw new i4(e)}(e),!0}catch{return!1}}(e))return se(iL(e));let{prefix:t,x:n,y:r}=e;return"bigint"==typeof n&&"bigint"==typeof r?{prefix:t??4,x:n,y:r}:{prefix:t,x:n}})();return i9(t),t}(new Uint8Array(await globalThis.crypto.subtle.exportKey("raw",n.publicKey)));return{privateKey:n.privateKey,publicKey:r}}async function sc(e){let{payload:t,privateKey:n}=e,r=i1(new Uint8Array(await globalThis.crypto.subtle.sign({name:"ECDSA",hash:"SHA-256"},n,i0(t)))),a=i5(i6(r,0,32)),i=i5(i6(r,32,64));return i>iB.CURVE.n/2n&&(i=iB.CURVE.n-i),{r:a,s:i}}let su=new TextDecoder,sl=Object.fromEntries(Array.from("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/").map((e,t)=>[t,e.charCodeAt(0)]));function sd(e,...t){if(!(e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name))throw Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw Error("Uint8Array expected of length "+t+", got length="+e.length)}function sf(e,t=!0){if(e.destroyed)throw Error("Hash instance has been destroyed");if(t&&e.finished)throw Error("Hash#digest() has already been called")}function sp(...e){for(let t=0;t>>t}Object.fromEntries(Array.from("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/").map((e,t)=>[e.charCodeAt(0),t]));function sy(e){return"string"==typeof e&&(e=function(e){if("string"!=typeof e)throw Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}(e)),sd(e),e}class sb{}class sg extends sb{constructor(e,t,n,r){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=r,this.buffer=new Uint8Array(e),this.view=sm(this.buffer)}update(e){sf(this),sd(e=sy(e));let{view:t,buffer:n,blockLen:r}=this,a=e.length;for(let i=0;ir-i&&(this.process(n,0),i=0);for(let e=i;e>a&i),o=Number(n&i),c=r?4:0,u=r?0:4;e.setUint32(t+c,s,r),e.setUint32(t+u,o,r)})(n,r-8,BigInt(8*this.length),a),this.process(n,0);let s=sm(e),o=this.outputLen;if(o%4)throw Error("_sha2: outputLen should be aligned to 32bit");let c=o/4,u=this.get();if(c>u.length)throw Error("_sha2: outputLen bigger than state");for(let e=0;e>>3,a=sh(n,17)^sh(n,19)^n>>>10;sE[e]=a+sE[e-7]+r+sE[e-16]|0}let{A:n,B:r,C:a,D:i,E:s,F:o,G:c,H:u}=this;for(let e=0;e<64;e++){var l,d,f,p;let t=u+(sh(s,6)^sh(s,11)^sh(s,25))+((l=s)&o^~l&c)+sk[e]+sE[e]|0,m=(sh(n,2)^sh(n,13)^sh(n,22))+((d=n)&(f=r)^d&(p=a)^f&p)|0;u=c,c=o,o=s,s=i+t|0,i=a,a=r,r=n,n=t+m|0}n=n+this.A|0,r=r+this.B|0,a=a+this.C|0,i=i+this.D|0,s=s+this.E|0,o=o+this.F|0,c=c+this.G|0,u=u+this.H|0,this.set(n,r,a,i,s,o,c,u)}roundClean(){sp(sE)}destroy(){this.set(0,0,0,0,0,0,0,0),sp(this.buffer)}}let sS=function(e,t=!1){let n=e.length,r=new Uint32Array(n),a=new Uint32Array(n);for(let i=0;i>sx&sw)}:{h:0|Number(e>>sx&sw),l:0|Number(e&sw)}}(e[i],t);[r[i],a[i]]=[n,s]}return[r,a]}(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e)));sS[0],sS[1];let sC=function(e){let t=t=>e().update(sy(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}(()=>new sA);function sP(e,t={}){let{as:n="string"==typeof e?"Hex":"Bytes"}=t,r=sC(i0(e));return"Bytes"===n?r:iL(r)}Uint8Array.from([105,171,180,181,160,222,75,198,42,42,32,31,141,37,186,233]);let sO=2n**256n-1n;function sI(e){if(130!==e.length&&132!==e.length)throw new sT({signature:e});let t=BigInt(iz(e,0,32)),n=BigInt(iz(e,32,64)),r=(()=>{let t=Number(`0x${e.slice(130)}`);if(!Number.isNaN(t))try{return function(e){if(0===e||27===e)return 0;if(1===e||28===e)return 1;if(e>=35)return e%2==0?1:0;throw new sN({value:e})}(t)}catch{throw new sj({value:t})}})();return void 0===r?{r:t,s:n}:{r:t,s:n,yParity:r}}class sT extends iU{constructor({signature:e}){super(`Value \`${e}\` is an invalid signature size.`,{metaMessages:["Expected: 64 bytes or 65 bytes.",`Received ${iK(iM(e))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSerializedSizeError"})}}class sB extends iU{constructor({signature:e}){super(`Signature \`${i_(e)}\` is missing either an \`r\`, \`s\`, or \`yParity\` property.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.MissingPropertiesError"})}}class sU extends iU{constructor({value:e}){super(`Value \`${e}\` is an invalid r value. r must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidRError"})}}class s_ extends iU{constructor({value:e}){super(`Value \`${e}\` is an invalid s value. s must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSError"})}}class sj extends iU{constructor({value:e}){super(`Value \`${e}\` is an invalid y-parity value. Y-parity must be 0 or 1.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidYParityError"})}}class sN extends iU{constructor({value:e}){super(`Value \`${e}\` is an invalid v value. v must be 27, 28 or >=35.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidVError"})}}var sR=n(12825),sD=n(51658),sF=n(70711);let sM="activeId",sL=function(e,t){let n="undefined"!=typeof indexedDB?(0,sF.MT)(e,t):void 0;return{getItem:async e=>await (0,sF.U2)(e,n)||null,removeItem:async e=>(0,sF.IV)(e,n),setItem:async(e,t)=>(0,sF.t8)(e,t,n)}}("base-acc-sdk","keys");async function sG(){let e=await so({extractable:!1}),t=iz(st(e.publicKey),1);return await sL.setItem(t,e),await sL.setItem(sM,t),e}async function sq(){let e=await sL.getItem(sM);return e&&await sL.getItem(e)||null}async function sH(){let e=await sq();if(!e){let e=await sG(),t=iz(st(e.publicKey),1);return await sL.setItem(t,e),await sL.setItem(sM,t),e}return e}async function sz(){let e=await sH(),t=iz(st(e.publicKey),1),n=async t=>{let{payload:n,metadata:r}=function(e){let{challenge:t,crossOrigin:n,extraClientData:r,flag:a,origin:i,rpId:s,signCount:o,userVerification:c="required"}=e,u=function(e={}){let{flag:t=5,rpId:n=window.location.hostname,signCount:r=0}=e;return iF(sP(iq(n)),iG(t,{size:1}),iG(r,{size:4}))}({flag:a,rpId:s,signCount:o}),l=function(e){let{challenge:t,crossOrigin:n=!1,extraClientData:r,origin:a=window.location.origin}=e;return JSON.stringify({type:"webauthn.get",challenge:function(e,t={}){return function(e,t={}){let{pad:n=!0,url:r=!1}=t,a=new Uint8Array(4*Math.ceil(e.length/3));for(let t=0,n=0;n>18],a[t+1]=sl[r>>12&63],a[t+2]=sl[r>>6&63],a[t+3]=sl[63&r]}let i=e.length%3,s=4*Math.floor(e.length/3)+(i&&i+1),o=su.decode(new Uint8Array(a.buffer,0,s));return n&&1===i&&(o+="=="),n&&2===i&&(o+="="),r&&(o=o.replaceAll("+","-").replaceAll("/","_")),o}(i2(e),t)}(t,{url:!0,pad:!1}),origin:a,crossOrigin:n,...r})}({challenge:t,crossOrigin:n,extraClientData:r,origin:i}),d=sP(iq(l)),f=l.indexOf('"challenge"'),p=l.indexOf('"type"'),m=iF(u,d);return{metadata:{authenticatorData:u,clientDataJSON:l,challengeIndex:f,typeIndex:p,userVerificationRequired:"required"===c},payload:m}}({challenge:t,origin:"https://keys.coinbase.com",userVerification:"preferred"});return{signature:function(e){(function(e,t={}){let{recovered:n}=t;if(void 0===e.r||void 0===e.s||n&&void 0===e.yParity)throw new sB({signature:e});if(e.r<0n||e.r>sO)throw new sU({value:e.r});if(e.s<0n||e.s>sO)throw new s_({value:e.s});if("number"==typeof e.yParity&&0!==e.yParity&&1!==e.yParity)throw new sj({value:e.yParity})})(e);let t=e.r,n=e.s;return iF(iG(t,{size:32}),iG(n,{size:32}),"number"==typeof e.yParity?iG(function(e){if(0===e)return 27;if(1===e)return 28;throw new sj({value:e})}(e.yParity),{size:1}):"0x")}(await sc({payload:n,privateKey:e.privateKey})),raw:{},webauthn:r}};return{id:t,publicKey:t,sign:async({hash:e})=>n(e),signMessage:async({message:e})=>n((0,sR.r)(e)),signTypedData:async e=>n((0,sD.Jv)(e)),type:"webAuthn"}}async function sK(){return{account:await sz()}}let sV={storageKey:"ownPrivateKey",keyType:"private"},sZ={storageKey:"ownPublicKey",keyType:"public"},sW={storageKey:"peerPublicKey",keyType:"public"};class sJ{ownPrivateKey=null;ownPublicKey=null;peerPublicKey=null;sharedSecret=null;async getOwnPublicKey(){return await this.loadKeysIfNeeded(),this.ownPublicKey}async getSharedSecret(){return await this.loadKeysIfNeeded(),this.sharedSecret}async setPeerPublicKey(e){this.sharedSecret=null,this.peerPublicKey=e,await this.storeKey(sW,e),await this.loadKeysIfNeeded()}async clear(){this.ownPrivateKey=null,this.ownPublicKey=null,this.peerPublicKey=null,this.sharedSecret=null,E.keys.clear()}async generateKeyPair(){let e=await rw();this.ownPrivateKey=e.privateKey,this.ownPublicKey=e.publicKey,await this.storeKey(sV,e.privateKey),await this.storeKey(sZ,e.publicKey)}async loadKeysIfNeeded(){null===this.ownPrivateKey&&(this.ownPrivateKey=await this.loadKey(sV)),null===this.ownPublicKey&&(this.ownPublicKey=await this.loadKey(sZ)),(null===this.ownPrivateKey||null===this.ownPublicKey)&&await this.generateKeyPair(),null===this.peerPublicKey&&(this.peerPublicKey=await this.loadKey(sW)),null===this.sharedSecret&&null!==this.ownPrivateKey&&null!==this.peerPublicKey&&(this.sharedSecret=await rx(this.ownPrivateKey,this.peerPublicKey))}async loadKey(e){let t=E.keys.get(e.storageKey);return t?rC(e.keyType,t):null}async storeKey(e,t){let n=await rS(e.keyType,t);E.keys.set(e.storageKey,n)}}var sY=n(99766),sQ=n(96365);function sX(e,t){if("object"==typeof e&&null!==e)return t.split(/[.[\]]+/).filter(Boolean).reduce((e,t)=>{if("object"==typeof e&&null!==e)return e[t]},e)}var s$=n(85944);function s0(e){if(!Array.isArray(e.params))return null;switch(e.method){case"personal_sign":return e.params[1];case"eth_signTypedData_v4":return e.params[0];case"eth_signTransaction":case"eth_sendTransaction":case"wallet_sendCalls":return e.params[0]?.from;default:return null}}function s1(e){if(!e||!Array.isArray(e)||!e[0]?.chainId||"string"!=typeof e[0].chainId&&"number"!=typeof e[0].chainId)throw N.rpc.invalidParams()}function s2(e,t){let n={...e};if(t&&e.method.startsWith("wallet_")){let e=sX(n,"params.0.capabilities");if(void 0===e&&(e={}),"object"!=typeof e)throw N.rpc.invalidParams();e={...t,...e},n.params&&Array.isArray(n.params)&&(n.params[0]={...n.params[0],capabilities:e})}return n}async function s3(){let e=E.subAccountsConfig.get()??{},t={};if("on-connect"===e.creation){let{account:n}=e.toOwnerAccount?await e.toOwnerAccount():await sK();if(!n)throw N.provider.unauthorized("No owner account found");t.addSubAccount={account:{type:"create",keys:[{type:n.address?"address":"webauthn-p256",publicKey:n.address||n.publicKey}]}}}E.subAccountsConfig.set({...e,capabilities:t})}async function s6({client:e,id:t}){let n=await (0,s$.l)(e,{id:t});if("success"===n.status)return n.receipts?.[0].transactionHash;throw N.rpc.internal("failed to send transaction")}function s5({calls:e,from:t,chainId:n,capabilities:r}){let a=k.get().paymasterUrls,i={method:"wallet_sendCalls",params:[{version:"1.0",calls:e,chainId:(0,Q.eC)(n),from:t,atomicRequired:!0,capabilities:r}]};return a?.[n]&&(i=s2(i,{paymasterService:{url:a?.[n]}})),i}async function s4(){let e=tf();return await new Promise((t,n)=>{en({dialogContext:"sub_account_insufficient_balance"}),e.presentItem({title:"Insufficient spend permission",message:"Your spend permission's remaining balance cannot cover this transaction. Please use your primary account to complete this transaction.",onClose:()=>{er({dialogContext:"sub_account_insufficient_balance"}),e.clear(),n(Error("User cancelled funding"))},actionItems:[{text:"Use primary account",variant:"primary",onClick:()=>{ea({dialogContext:"sub_account_insufficient_balance",dialogAction:"continue_in_popup"}),e.clear(),t("continue_popup")}},{text:"Cancel",variant:"secondary",onClick:()=>{ea({dialogContext:"sub_account_insufficient_balance",dialogAction:"cancel"}),e.clear(),n(Error("User cancelled funding"))}}]})})}function s7(e,t){let n=e.filter(e=>e!==t);return[t,...n]}function s8(e,t){return[...e.filter(e=>e!==t),t]}var s9=n(84808),oe=n(69947);function ot(e){return btoa(String.fromCharCode(...new Uint8Array(e))).replaceAll("+","-").replaceAll("/","_").replace(/=+$/,"")}var on=n(57406),or=n(73601),oa=n(76460),oi=n(6809),os=n(23375),oo=n(20587),oc=n(34593);let ou=[{inputs:[{name:"preOpGas",type:"uint256"},{name:"paid",type:"uint256"},{name:"validAfter",type:"uint48"},{name:"validUntil",type:"uint48"},{name:"targetSuccess",type:"bool"},{name:"targetResult",type:"bytes"}],name:"ExecutionResult",type:"error"},{inputs:[{name:"opIndex",type:"uint256"},{name:"reason",type:"string"}],name:"FailedOp",type:"error"},{inputs:[{name:"sender",type:"address"}],name:"SenderAddressResult",type:"error"},{inputs:[{name:"aggregator",type:"address"}],name:"SignatureValidationFailed",type:"error"},{inputs:[{components:[{name:"preOpGas",type:"uint256"},{name:"prefund",type:"uint256"},{name:"sigFailed",type:"bool"},{name:"validAfter",type:"uint48"},{name:"validUntil",type:"uint48"},{name:"paymasterContext",type:"bytes"}],name:"returnInfo",type:"tuple"},{components:[{name:"stake",type:"uint256"},{name:"unstakeDelaySec",type:"uint256"}],name:"senderInfo",type:"tuple"},{components:[{name:"stake",type:"uint256"},{name:"unstakeDelaySec",type:"uint256"}],name:"factoryInfo",type:"tuple"},{components:[{name:"stake",type:"uint256"},{name:"unstakeDelaySec",type:"uint256"}],name:"paymasterInfo",type:"tuple"}],name:"ValidationResult",type:"error"},{inputs:[{components:[{name:"preOpGas",type:"uint256"},{name:"prefund",type:"uint256"},{name:"sigFailed",type:"bool"},{name:"validAfter",type:"uint48"},{name:"validUntil",type:"uint48"},{name:"paymasterContext",type:"bytes"}],name:"returnInfo",type:"tuple"},{components:[{name:"stake",type:"uint256"},{name:"unstakeDelaySec",type:"uint256"}],name:"senderInfo",type:"tuple"},{components:[{name:"stake",type:"uint256"},{name:"unstakeDelaySec",type:"uint256"}],name:"factoryInfo",type:"tuple"},{components:[{name:"stake",type:"uint256"},{name:"unstakeDelaySec",type:"uint256"}],name:"paymasterInfo",type:"tuple"},{components:[{name:"aggregator",type:"address"},{components:[{name:"stake",type:"uint256"},{name:"unstakeDelaySec",type:"uint256"}],name:"stakeInfo",type:"tuple"}],name:"aggregatorInfo",type:"tuple"}],name:"ValidationResultWithAggregation",type:"error"},{anonymous:!1,inputs:[{indexed:!0,name:"userOpHash",type:"bytes32"},{indexed:!0,name:"sender",type:"address"},{indexed:!1,name:"factory",type:"address"},{indexed:!1,name:"paymaster",type:"address"}],name:"AccountDeployed",type:"event"},{anonymous:!1,inputs:[],name:"BeforeExecution",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"account",type:"address"},{indexed:!1,name:"totalDeposit",type:"uint256"}],name:"Deposited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"aggregator",type:"address"}],name:"SignatureAggregatorChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"account",type:"address"},{indexed:!1,name:"totalStaked",type:"uint256"},{indexed:!1,name:"unstakeDelaySec",type:"uint256"}],name:"StakeLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"account",type:"address"},{indexed:!1,name:"withdrawTime",type:"uint256"}],name:"StakeUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"account",type:"address"},{indexed:!1,name:"withdrawAddress",type:"address"},{indexed:!1,name:"amount",type:"uint256"}],name:"StakeWithdrawn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"userOpHash",type:"bytes32"},{indexed:!0,name:"sender",type:"address"},{indexed:!0,name:"paymaster",type:"address"},{indexed:!1,name:"nonce",type:"uint256"},{indexed:!1,name:"success",type:"bool"},{indexed:!1,name:"actualGasCost",type:"uint256"},{indexed:!1,name:"actualGasUsed",type:"uint256"}],name:"UserOperationEvent",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"userOpHash",type:"bytes32"},{indexed:!0,name:"sender",type:"address"},{indexed:!1,name:"nonce",type:"uint256"},{indexed:!1,name:"revertReason",type:"bytes"}],name:"UserOperationRevertReason",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"account",type:"address"},{indexed:!1,name:"withdrawAddress",type:"address"},{indexed:!1,name:"amount",type:"uint256"}],name:"Withdrawn",type:"event"},{inputs:[],name:"SIG_VALIDATION_FAILED",outputs:[{name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"initCode",type:"bytes"},{name:"sender",type:"address"},{name:"paymasterAndData",type:"bytes"}],name:"_validateSenderAndPaymaster",outputs:[],stateMutability:"view",type:"function"},{inputs:[{name:"unstakeDelaySec",type:"uint32"}],name:"addStake",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{name:"account",type:"address"}],name:"balanceOf",outputs:[{name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"account",type:"address"}],name:"depositTo",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{name:"",type:"address"}],name:"deposits",outputs:[{name:"deposit",type:"uint112"},{name:"staked",type:"bool"},{name:"stake",type:"uint112"},{name:"unstakeDelaySec",type:"uint32"},{name:"withdrawTime",type:"uint48"}],stateMutability:"view",type:"function"},{inputs:[{name:"account",type:"address"}],name:"getDepositInfo",outputs:[{components:[{name:"deposit",type:"uint112"},{name:"staked",type:"bool"},{name:"stake",type:"uint112"},{name:"unstakeDelaySec",type:"uint32"},{name:"withdrawTime",type:"uint48"}],name:"info",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{name:"sender",type:"address"},{name:"key",type:"uint192"}],name:"getNonce",outputs:[{name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"initCode",type:"bytes"}],name:"getSenderAddress",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{name:"sender",type:"address"},{name:"nonce",type:"uint256"},{name:"initCode",type:"bytes"},{name:"callData",type:"bytes"},{name:"callGasLimit",type:"uint256"},{name:"verificationGasLimit",type:"uint256"},{name:"preVerificationGas",type:"uint256"},{name:"maxFeePerGas",type:"uint256"},{name:"maxPriorityFeePerGas",type:"uint256"},{name:"paymasterAndData",type:"bytes"},{name:"signature",type:"bytes"}],name:"userOp",type:"tuple"}],name:"getUserOpHash",outputs:[{name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{components:[{components:[{name:"sender",type:"address"},{name:"nonce",type:"uint256"},{name:"initCode",type:"bytes"},{name:"callData",type:"bytes"},{name:"callGasLimit",type:"uint256"},{name:"verificationGasLimit",type:"uint256"},{name:"preVerificationGas",type:"uint256"},{name:"maxFeePerGas",type:"uint256"},{name:"maxPriorityFeePerGas",type:"uint256"},{name:"paymasterAndData",type:"bytes"},{name:"signature",type:"bytes"}],name:"userOps",type:"tuple[]"},{name:"aggregator",type:"address"},{name:"signature",type:"bytes"}],name:"opsPerAggregator",type:"tuple[]"},{name:"beneficiary",type:"address"}],name:"handleAggregatedOps",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{name:"sender",type:"address"},{name:"nonce",type:"uint256"},{name:"initCode",type:"bytes"},{name:"callData",type:"bytes"},{name:"callGasLimit",type:"uint256"},{name:"verificationGasLimit",type:"uint256"},{name:"preVerificationGas",type:"uint256"},{name:"maxFeePerGas",type:"uint256"},{name:"maxPriorityFeePerGas",type:"uint256"},{name:"paymasterAndData",type:"bytes"},{name:"signature",type:"bytes"}],name:"ops",type:"tuple[]"},{name:"beneficiary",type:"address"}],name:"handleOps",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"key",type:"uint192"}],name:"incrementNonce",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"callData",type:"bytes"},{components:[{components:[{name:"sender",type:"address"},{name:"nonce",type:"uint256"},{name:"callGasLimit",type:"uint256"},{name:"verificationGasLimit",type:"uint256"},{name:"preVerificationGas",type:"uint256"},{name:"paymaster",type:"address"},{name:"maxFeePerGas",type:"uint256"},{name:"maxPriorityFeePerGas",type:"uint256"}],name:"mUserOp",type:"tuple"},{name:"userOpHash",type:"bytes32"},{name:"prefund",type:"uint256"},{name:"contextOffset",type:"uint256"},{name:"preOpGas",type:"uint256"}],name:"opInfo",type:"tuple"},{name:"context",type:"bytes"}],name:"innerHandleOp",outputs:[{name:"actualGasCost",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"",type:"address"},{name:"",type:"uint192"}],name:"nonceSequenceNumber",outputs:[{name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{components:[{name:"sender",type:"address"},{name:"nonce",type:"uint256"},{name:"initCode",type:"bytes"},{name:"callData",type:"bytes"},{name:"callGasLimit",type:"uint256"},{name:"verificationGasLimit",type:"uint256"},{name:"preVerificationGas",type:"uint256"},{name:"maxFeePerGas",type:"uint256"},{name:"maxPriorityFeePerGas",type:"uint256"},{name:"paymasterAndData",type:"bytes"},{name:"signature",type:"bytes"}],name:"op",type:"tuple"},{name:"target",type:"address"},{name:"targetCallData",type:"bytes"}],name:"simulateHandleOp",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{name:"sender",type:"address"},{name:"nonce",type:"uint256"},{name:"initCode",type:"bytes"},{name:"callData",type:"bytes"},{name:"callGasLimit",type:"uint256"},{name:"verificationGasLimit",type:"uint256"},{name:"preVerificationGas",type:"uint256"},{name:"maxFeePerGas",type:"uint256"},{name:"maxPriorityFeePerGas",type:"uint256"},{name:"paymasterAndData",type:"bytes"},{name:"signature",type:"bytes"}],name:"userOp",type:"tuple"}],name:"simulateValidation",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"withdrawAddress",type:"address"}],name:"withdrawStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"withdrawAddress",type:"address"},{name:"withdrawAmount",type:"uint256"}],name:"withdrawTo",outputs:[],stateMutability:"nonpayable",type:"function"},{stateMutability:"payable",type:"receive"}];var ol=n(21887),od=n(49483),of=n(12984),op=(n(86579),n(87722));function om(e){let{address:t,data:n,signature:r,to:a="hex"}=e,i=(0,nL.SM)([(0,or.E)([{type:"address"},{type:"bytes"},{type:"bytes"}],[t,n,r]),"0x6492649264926492649264926492649264926492649264926492649264926492"]);return"hex"===a?i:(0,s9.nr)(i)}async function oh(e){let{extend:t,nonceKeyManager:n=function(e){let{source:t}=e,n=new Map,r=new op.k(8192),a=new Map,i=({address:e,chainId:t})=>`${e}.${t}`;return{async consume({address:e,chainId:n,client:a}){let s=i({address:e,chainId:n}),o=this.get({address:e,chainId:n,client:a});this.increment({address:e,chainId:n});let c=await o;return await t.set({address:e,chainId:n},c),r.set(s,c),c},async increment({address:e,chainId:t}){let r=i({address:e,chainId:t}),a=n.get(r)??0;n.set(r,a+1)},async get({address:e,chainId:s,client:o}){let c=i({address:e,chainId:s}),u=a.get(c);return u||(u=(async()=>{try{let n=await t.get({address:e,chainId:s,client:o}),a=r.get(c)??0;if(a>0&&n<=a)return a+1;return r.delete(c),n}finally{this.reset({address:e,chainId:s})}})(),a.set(c,u)),(n.get(c)??0)+await u},reset({address:e,chainId:t}){let r=i({address:e,chainId:t});n.delete(r),a.delete(r)}}}({source:{get:()=>Date.now(),set(){}}}),...r}=e,a=!1,i=await e.getAddress();return{...t,...r,address:i,async getFactoryArgs(){return"isDeployed"in this&&await this.isDeployed()?{factory:void 0,factoryData:void 0}:e.getFactoryArgs()},async getNonce(t){let r=t?.key??BigInt(await n.consume({address:i,chainId:e.client.chain.id,client:e.client}));return e.getNonce?await e.getNonce({...t,key:r}):await (0,of.L)(e.client,{abi:(0,ol.V)(["function getNonce(address, uint192) pure returns (uint256)"]),address:e.entryPoint.address,functionName:"getNonce",args:[i,r]})},isDeployed:async()=>!!a||(a=!!await (0,tQ.s)(e.client,od.C,"getCode")({address:i})),...e.sign?{async sign(t){let[{factory:n,factoryData:r},a]=await Promise.all([this.getFactoryArgs(),e.sign(t)]);return n&&r?om({address:n,data:r,signature:a}):a}}:{},async signMessage(t){let[{factory:n,factoryData:r},a]=await Promise.all([this.getFactoryArgs(),e.signMessage(t)]);return n&&r&&"0x7702"!==n?om({address:n,data:r,signature:a}):a},async signTypedData(t){let[{factory:n,factoryData:r},a]=await Promise.all([this.getFactoryArgs(),e.signTypedData(t)]);return n&&r&&"0x7702"!==n?om({address:n,data:r,signature:a}):a},type:"smart"}}function oy(e){let{authorization:t,factory:n,factoryData:r}=e;if("0x7702"===n||"0x7702000000000000000000000000000000000000"===n){if(!t)return"0x7702000000000000000000000000000000000000";let e=t.address;return(0,nL.zo)([e,r??"0x"])}return n?(0,nL.zo)([n,r??"0x"]):"0x"}function ob(e){let{callGasLimit:t,callData:n,maxPriorityFeePerGas:r,maxFeePerGas:a,paymaster:i,paymasterData:s,paymasterPostOpGasLimit:o,paymasterSignature:c,paymasterVerificationGasLimit:u,sender:l,signature:d="0x",verificationGasLimit:f}=e,p=(0,nL.zo)([(0,nR.vk)((0,Q.eC)(f||0n),{size:16}),(0,nR.vk)((0,Q.eC)(t||0n),{size:16})]),m=oy(e),h=(0,nL.zo)([(0,nR.vk)((0,Q.eC)(r||0n),{size:16}),(0,nR.vk)((0,Q.eC)(a||0n),{size:16})]);return{accountGasLimits:p,callData:n,initCode:m,gasFees:h,nonce:e.nonce??0n,paymasterAndData:i?(0,nL.zo)([i,(0,nR.vk)((0,Q.eC)(u||0n),{size:16}),(0,nR.vk)((0,Q.eC)(o||0n),{size:16}),s||"0x",...c?[c]:[]]):"0x",preVerificationGas:e.preVerificationGas??0n,sender:l,signature:d}}let og={PackedUserOperation:[{type:"address",name:"sender"},{type:"uint256",name:"nonce"},{type:"bytes",name:"initCode"},{type:"bytes",name:"callData"},{type:"bytes32",name:"accountGasLimits"},{type:"uint256",name:"preVerificationGas"},{type:"bytes32",name:"gasFees"},{type:"bytes",name:"paymasterAndData"}]};async function ov(e){let{owner:t,ownerIndex:n,address:r,client:a,factoryData:i}=e,s={abi:ou,address:"0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789",version:"0.6"},o={abi:P,address:"0xba5ed110efdba3d005bfc882d75358acbbb85842"};return oh({client:a,entryPoint:s,extend:{abi:C,factory:o},async decodeCalls(e){let t=(0,on.p)({abi:C,data:e});if("execute"===t.functionName)return[{to:t.args[0],value:t.args[1],data:t.args[2]}];if("executeBatch"===t.functionName)return t.args[0].map(e=>({to:e.target,value:e.value,data:e.data}));throw new t$.G(`unable to decode calls for "${t.functionName}"`)},encodeCalls:async e=>1===e.length?(0,Y.R)({abi:C,functionName:"execute",args:[e[0].to,e[0].value??BigInt(0),e[0].data??"0x"]}):(0,Y.R)({abi:C,functionName:"executeBatch",args:[e.map(e=>({data:e.data??"0x",target:e.to,value:e.value??BigInt(0)}))]}),getAddress:async()=>r,getFactoryArgs:async()=>({factory:o.address,factoryData:i}),getStubSignature:async()=>"webAuthn"===t.type?"0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000000170000000000000000000000000000000000000000000000000000000000000001949fc7c88032b9fcb5f6efc7a7b8c63668eae9871b765e23123bb473ff57aa831a7c0d9276168ebcc29f2875a0239cffdf2a9cd1c2007c5c77c071db9264df1d000000000000000000000000000000000000000000000000000000000000002549960de5880e8c687434170f6476605b8fe4aeb9a28632c7995cf3ba831d97630500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008a7b2274797065223a22776562617574686e2e676574222c226368616c6c656e6765223a2273496a396e6164474850596759334b7156384f7a4a666c726275504b474f716d59576f4d57516869467773222c226f726967696e223a2268747470733a2f2f7369676e2e636f696e626173652e636f6d222c2263726f73734f726967696e223a66616c73657d00000000000000000000000000000000000000000000":ok({ownerIndex:n,signature:"0xfffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c"}),async sign(e){let r=ox({address:await this.getAddress(),chainId:a.chain.id,hash:e.hash});return ok({ownerIndex:n,signature:await ow({hash:r,owner:t})})},async signMessage(e){let{message:r}=e,i=ox({address:await this.getAddress(),chainId:a.chain.id,hash:(0,sR.r)(r)});return ok({ownerIndex:n,signature:await ow({hash:i,owner:t})})},async signTypedData(e){let{domain:r,types:i,primaryType:s,message:o}=e,c=ox({address:await this.getAddress(),chainId:a.chain.id,hash:(0,sD.Jv)({domain:r,message:o,primaryType:s,types:i})});return ok({ownerIndex:n,signature:await ow({hash:c,owner:t})})},async signUserOperation(e){let{chainId:r=a.chain.id,...i}=e,o=await this.getAddress(),c=function(e){let{chainId:t,entryPointAddress:n,entryPointVersion:r}=e,a=e.userOperation,{authorization:i,callData:s="0x",callGasLimit:o,maxFeePerGas:c,maxPriorityFeePerGas:u,nonce:l,paymasterAndData:d="0x",preVerificationGas:f,sender:p,verificationGasLimit:m}=a;if("0.8"===r||"0.9"===r)return(0,sD.Jv)(function(e){let{chainId:t,entryPointAddress:n,userOperation:r}=e;return{types:og,primaryType:"PackedUserOperation",domain:{name:"ERC4337",version:"1",chainId:t,verifyingContract:n},message:ob(r)}}({chainId:t,entryPointAddress:n,userOperation:a}));let h=(()=>{if("0.6"===r){let e=oy({authorization:i,factory:a.initCode?.slice(0,42),factoryData:a.initCode?.slice(42)});return(0,or.E)([{type:"address"},{type:"uint256"},{type:"bytes32"},{type:"bytes32"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"bytes32"}],[p,l,(0,sQ.w)(e),(0,sQ.w)(s),o,m,f,c,u,(0,sQ.w)(d)])}if("0.7"===r){let e=ob(a);return(0,or.E)([{type:"address"},{type:"uint256"},{type:"bytes32"},{type:"bytes32"},{type:"bytes32"},{type:"uint256"},{type:"bytes32"},{type:"bytes32"}],[e.sender,e.nonce,(0,sQ.w)(e.initCode),(0,sQ.w)(e.callData),e.accountGasLimits,e.preVerificationGas,e.gasFees,(0,sQ.w)(e.paymasterAndData)])}throw Error(`entryPointVersion "${r}" not supported.`)})();return(0,sQ.w)((0,or.E)([{type:"bytes32"},{type:"address"},{type:"uint256"}],[(0,sQ.w)(h),n,BigInt(t)]))}({chainId:r,entryPointAddress:s.address,entryPointVersion:s.version,userOperation:{...i,sender:o}});return ok({ownerIndex:n,signature:await ow({hash:c,owner:t})})},userOperation:{async estimateGas(e){if("webAuthn"===t.type)return{verificationGasLimit:BigInt(Math.max(Number(e.verificationGasLimit??BigInt(0)),8e5))}}}})}async function ow({hash:e,owner:t}){if("webAuthn"===t.type){let{signature:n,webauthn:r}=await t.sign({hash:e});return function({webauthn:e,signature:t}){let{r:n,s:r}=sI(t);return(0,or.E)([{components:[{name:"authenticatorData",type:"bytes"},{name:"clientDataJSON",type:"bytes"},{name:"challengeIndex",type:"uint256"},{name:"typeIndex",type:"uint256"},{name:"r",type:"uint256"},{name:"s",type:"uint256"}],type:"tuple"}],[{authenticatorData:e.authenticatorData,clientDataJSON:(0,Q.$G)(e.clientDataJSON),challengeIndex:BigInt(e.challengeIndex),typeIndex:BigInt(e.typeIndex),r:n,s:r}])}({signature:n,webauthn:r})}if(t.sign)return t.sign({hash:e});throw new t$.G("`owner` does not support raw sign.")}function ox({address:e,chainId:t,hash:n}){return(0,sD.Jv)({domain:{chainId:t,name:"Coinbase Smart Wallet",verifyingContract:e,version:"1"},types:{CoinbaseSmartWalletMessage:[{name:"hash",type:"bytes32"}]},primaryType:"CoinbaseSmartWalletMessage",message:{hash:n}})}function ok(e){let{ownerIndex:t=0}=e,n=(()=>{if(65!==(0,oa.d)(e.signature))return e.signature;let t=function(e){let{r:t,s:n}=oi.secp256k1.Signature.fromCompact(e.slice(2,130)),r=Number(`0x${e.slice(130)}`),[a,i]=(()=>{if(0===r||1===r)return[void 0,r];if(27===r)return[BigInt(r),0];if(28===r)return[BigInt(r),1];throw Error("Invalid yParityOrV value")})();return void 0!==a?{r:(0,Q.eC)(t,{size:32}),s:(0,Q.eC)(n,{size:32}),v:a,yParity:i}:{r:(0,Q.eC)(t,{size:32}),s:(0,Q.eC)(n,{size:32}),yParity:i}}(e.signature);return function(e,t){if(e.length!==t.length)throw new os.fs({expectedLength:e.length,givenLength:t.length});let n=[];for(let r=0;r{try{switch(e.method){case"wallet_addSubAccount":return c;case"eth_accounts":return[c.address];case"eth_coinbase":return c.address;case"net_version":return u.toString();case"eth_chainId":return(0,Q.eC)(u);case"eth_sendTransaction":{z(e.params);let n=e.params[0];H(n.to,N.rpc.invalidParams("to is required"));let r={to:n.to,data:tC(n.data??"0x",!0),value:tC(n.value??"0x",!0),from:n.from??c.address},a=s5({calls:[r],chainId:u,from:r.from}),i=await d(a);return s6({client:t,id:i})}case"wallet_sendCalls":{let t;z(e.params);let n=sX(e.params[0],"chainId");if(!n)throw N.rpc.invalidParams("chainId is required");if(!(0,rg.v)(n))throw N.rpc.invalidParams("chainId must be a hex encoded integer");if(!e.params[0])throw N.rpc.invalidParams("params are required");if(!("calls"in e.params[0]))throw N.rpc.invalidParams("calls are required");let r={method:"wallet_prepareCalls",params:[{version:"1.0",calls:e.params[0].calls,chainId:n,from:c.address,capabilities:"capabilities"in e.params[0]?e.params[0].capabilities:{}}]};s&&(r=s2(r,{funding:[{type:"spendPermission",data:{autoApply:!0,sources:[s],preference:"PREFER_DIRECT_BALANCE"}}]}));let i=await d(r),o=await a.sign?.({hash:tP.rR(i.signatureRequest.hash)});if(!o)throw N.rpc.internal("signature not found");return t=(0,rg.v)(o)?{type:"secp256k1",data:{address:a.address,signature:o}}:{type:"webauthn",data:{signature:JSON.stringify(function({webauthn:e,signature:t,id:n}){let r=sI(t);return{id:n,rawId:ot((0,s9.qX)(n)),response:{authenticatorData:ot((0,s9.nr)(e.authenticatorData)),clientDataJSON:ot((0,s9.qX)(e.clientDataJSON)),signature:ot(function(e,t){let n=(0,s9.nr)((0,oe.f)((0,Q.eC)(e))),r=(0,s9.nr)((0,oe.f)((0,Q.eC)(t))),a=n.length,i=r.length,s=a+i+4,o=new Uint8Array(s+2);return o[0]=48,o[1]=s,o[2]=2,o[3]=a,o.set(n,4),o[a+4]=2,o[a+5]=i,o.set(r,a+6),o}(r.r,r.s))},type:JSON.parse(e.clientDataJSON).type}}({id:a.id??"1",...o})),publicKey:a.publicKey}},(await d({method:"wallet_sendPreparedCalls",params:[{version:"1.0",type:i.type,data:i.userOp,chainId:i.chainId,signature:t}]}))[0]}case"wallet_sendPreparedCalls":{z(e.params);let n=sX(e.params[0],"chainId");if(!n)throw N.rpc.invalidParams("chainId is required");if(!(0,rg.v)(n))throw N.rpc.invalidParams("chainId must be a hex encoded integer");return await t.request({method:"wallet_sendPreparedCalls",params:e.params})}case"wallet_prepareCalls":{z(e.params);let n=sX(e.params[0],"chainId");if(!n)throw N.rpc.invalidParams("chainId is required");if(!(0,rg.v)(n))throw N.rpc.invalidParams("chainId must be a hex encoded integer");if(!e.params[0])throw N.rpc.invalidParams("params are required");if(!sX(e.params[0],"calls"))throw N.rpc.invalidParams("calls are required");let r=e.params[0];return!o||!r.capabilities||"attribution"in r.capabilities||(r.capabilities.attribution=o),await t.request({method:"wallet_prepareCalls",params:[{...e.params[0],chainId:n}]})}case"personal_sign":{if(z(e.params),!(0,rg.v)(e.params[0]))throw N.rpc.invalidParams("message must be a hex encoded string");let t=(0,tP.rR)(e.params[0]);return l.signMessage({message:t})}case"eth_signTypedData_v4":{z(e.params);let t="string"==typeof e.params[1]?JSON.parse(e.params[1]):e.params[1];return l.signTypedData(t)}default:throw N.rpc.methodNotSupported()}}catch(e){if(q(e)){let t=function(e){try{let t=JSON.parse(e.details);return new M(t.code,t.message,t.data)}catch(e){return null}}(e);if(t)throw t}throw e}};return{request:d}}async function oA({address:e,client:t,publicKey:n,factory:r,factoryData:a}){if(!await (0,od.C)(t,{address:e})&&r&&a){let e=(0,on.p)({abi:P,data:a});if("createAccount"!==e.functionName)throw N.rpc.internal("unknown factory function");let[t]=e.args;return t.findIndex(e=>e.toLowerCase()===oS(n).toLowerCase())}let i=await (0,of.L)(t,{address:e,abi:C,functionName:"ownerCount"});for(let r=Number(i)-1;r>=0;r--){let a=await (0,of.L)(t,{address:e,abi:C,functionName:"ownerAtIndex",args:[BigInt(r)]}),i=oS(n);if(a.toLowerCase()===i.toLowerCase())return r}return -1}function oS(e){return(0,rb.U)(e)?(0,nR.vk)(e):e}async function oC(){let e=E.config.get().metadata?.appName??"App",t=tf();return new Promise(n=>{en({dialogContext:"sub_account_add_owner"}),t.presentItem({title:`Re-authorize ${e}`,message:`${e} has lost access to your account. Please sign at the next step to re-authorize ${e}`,onClose:()=>{er({dialogContext:"sub_account_add_owner"}),n("cancel")},actionItems:[{text:"Continue",variant:"primary",onClick:()=>{ea({dialogContext:"sub_account_add_owner",dialogAction:"confirm"}),t.clear(),n("authenticate")}},{text:"Not now",variant:"secondary",onClick:()=>{ea({dialogContext:"sub_account_add_owner",dialogAction:"cancel"}),t.clear(),n("cancel")}}]})})}async function oP({ownerAccount:e,globalAccountRequest:t,chainId:n}){let r=E.account.get(),a=E.subAccounts.get(),i=r.accounts?.find(e=>e.toLowerCase()!==a?.address.toLowerCase());H(i,N.provider.unauthorized("no global account")),H(r.chain?.id,N.provider.unauthorized("no chain id")),H(a?.address,N.provider.unauthorized("no sub account"));let s=[];if("local"===e.type&&e.address&&s.push({to:a.address,data:(0,Y.R)({abi:C,functionName:"addOwnerAddress",args:[e.address]}),value:(0,Q.NC)(0)}),e.publicKey){let[t,n]=(0,J.r)([{type:"bytes32"},{type:"bytes32"}],e.publicKey);s.push({to:a.address,data:(0,Y.R)({abi:C,functionName:"addOwnerPublicKey",args:[t,n]}),value:(0,Q.NC)(0)})}let o={method:"wallet_sendCalls",params:[{version:"1",calls:s,chainId:(0,Q.eC)(n),from:i}]};if("cancel"===await oC())throw N.provider.unauthorized("user cancelled");let c=await t(o),u=rm(r.chain.id);if(H(u,N.rpc.internal(`client not found for chainId ${r.chain.id}`)),"success"!==(await (0,s$.l)(u,{id:c})).status)throw N.rpc.internal("add owner call failed");let l=await oA({address:a.address,publicKey:"local"===e.type&&e.address?e.address:e.publicKey,client:u});if(-1===l)throw N.rpc.internal("failed to find owner index");return l}async function oO({request:e,globalAccountAddress:t,subAccountAddress:n,client:r,globalAccountRequest:a,chainId:i,prependCalls:s}){var o,c;let u;if("wallet_sendCalls"===e.method&&"object"==typeof(o=e.params)&&null!==o&&Array.isArray(o)&&o.length>0&&"object"==typeof o[0]&&null!==o[0]&&"calls"in o[0])u=e.params[0];else if("eth_sendTransaction"===e.method&&Array.isArray(c=e.params)&&1===c.length&&"object"==typeof c[0]&&null!==c[0]&&"to"in c[0])u=s5({calls:[e.params[0]],chainId:i,from:e.params[0].from}).params[0];else throw Error(`Could not get original call from ${e.method} request`);let l=[...s??[],{data:(0,Y.R)({abi:C,functionName:"executeBatch",args:[u.calls.map(e=>({target:e.to,value:(0,tP.y_)(e.value??"0x0"),data:e.data??"0x"}))]}),to:n,value:"0x0"}],d=s2({method:"wallet_sendCalls",params:[{...u,calls:l,from:t,version:"2.0.0",atomicRequired:!0}]},{spendPermissions:{request:{spender:n}}}),f=await a(d),p=f.id;return(f.capabilities?.spendPermissions&&x.set(f.capabilities.spendPermissions.permissions),"eth_sendTransaction"===e.method)?s6({client:r,id:p}):f}async function oI({globalAccountAddress:e,subAccountAddress:t,client:n,request:r,globalAccountRequest:a}){let i=n.chain?.id;H(i,N.rpc.internal("invalid chainId"));try{await s4()}catch{throw N.provider.userRejectedRequest({message:"User cancelled funding"})}return await oO({request:r,globalAccountAddress:e,subAccountAddress:t,client:n,globalAccountRequest:a,chainId:i})}class oT{communicator;keyManager;callback;accounts;chain;constructor(e){this.communicator=e.communicator,this.callback=e.callback,this.keyManager=new sJ;let{account:t,chains:n}=E.getState();this.accounts=t.accounts??[],this.chain=t.chain??{id:e.metadata.appChainIds?.[0]??1},n&&rd(n)}get isConnected(){return this.accounts.length>0}async handshake(e){let t=ry.get(e);tI({method:e.method,correlationId:t});try{await this.communicator.waitForPopupLoaded?.();let n=await this.createRequestMessage({handshake:{method:e.method,params:e.params??[]}},t),r=await this.communicator.postRequestAndWaitForResponse(n);if("failure"in r.content)throw r.content.failure;let a=await rC("public",r.sender);await this.keyManager.setPeerPublicKey(a);let i=await this.decryptResponseMessage(r);this.handleResponse(e,i),tB({method:e.method,correlationId:t})}catch(n){throw tT({method:e.method,correlationId:t,errorMessage:tv(n)}),n}}async request(e){let t=ry.get(e);tU({method:e.method,correlationId:t});try{let n=await this._request(e);return tj({method:e.method,correlationId:t}),n}catch(n){throw t_({method:e.method,correlationId:t,errorMessage:tv(n)}),n}}async _request(e){if(0===this.accounts.length)switch(e.method){case"wallet_switchEthereumChain":s1(e.params),this.chain.id=Number(e.params[0].chainId);return;case"wallet_connect":{await this.communicator.waitForPopupLoaded?.(),await s3();let t=E.subAccountsConfig.get(),n=s2(e,t?.capabilities??{});return this.sendRequestToPopup(n)}case"wallet_sendCalls":case"wallet_sign":return this.sendRequestToPopup(e);default:throw N.provider.unauthorized()}if(this.shouldRequestUseSubAccountSigner(e)){let t=ry.get(e);tN({method:e.method,correlationId:t});try{let n=await this.sendRequestToSubAccountSigner(e);return tR({method:e.method,correlationId:t}),n}catch(n){throw tD({method:e.method,correlationId:t,errorMessage:tv(n)}),n}}switch(e.method){case"eth_requestAccounts":case"eth_accounts":{let e=E.subAccounts.get(),t=E.subAccountsConfig.get();return e?.address&&(this.accounts=t?.defaultAccount==="sub"?s7(this.accounts,e.address):s8(this.accounts,e.address)),this.callback?.("connect",{chainId:Q.eC(this.chain.id)}),this.accounts}case"eth_coinbase":return this.accounts[0];case"net_version":return this.chain.id;case"eth_chainId":return(0,Q.eC)(this.chain.id);case"wallet_getCapabilities":return this.handleGetCapabilitiesRequest(e);case"wallet_switchEthereumChain":return this.handleSwitchChainRequest(e);case"eth_ecRecover":case"personal_sign":case"wallet_sign":case"personal_ecRecover":case"eth_signTransaction":case"eth_sendTransaction":case"eth_signTypedData_v1":case"eth_signTypedData_v3":case"eth_signTypedData_v4":case"eth_signTypedData":case"wallet_addEthereumChain":case"wallet_watchAsset":case"wallet_sendCalls":case"wallet_showCallsStatus":case"wallet_grantPermissions":return this.sendRequestToPopup(e);case"wallet_connect":{await this.communicator.waitForPopupLoaded?.(),await s3();let t=E.subAccountsConfig.get(),n=s2(e,t?.capabilities??{}),r=await this.sendRequestToPopup(n);return this.callback?.("connect",{chainId:Q.eC(this.chain.id)}),r}case"wallet_getSubAccounts":{let t=E.subAccounts.get();if(t?.address)return{subAccounts:[t]};if(!this.chain.rpcUrl)throw N.rpc.internal("No RPC URL set for chain");let n=await rI(e,this.chain.rpcUrl);if(z(n.subAccounts,"subAccounts"),n.subAccounts.length>0){rv(n.subAccounts[0]);let e=n.subAccounts[0];E.subAccounts.set({address:e.address,factory:e.factory,factoryData:e.factoryData})}return n}case"wallet_addSubAccount":return this.addSubAccount(e);case"coinbase_fetchPermissions":{!function(e){if("coinbase_fetchPermissions"!==e.method||void 0!==e.params){if("coinbase_fetchPermissions"===e.method&&Array.isArray(e.params)&&1===e.params.length&&"object"==typeof e.params[0]){if("string"!=typeof e.params[0].account||!e.params[0].chainId.startsWith("0x"))throw N.rpc.invalidParams("FetchPermissions - Invalid params: params[0].account must be a hex string");if("string"!=typeof e.params[0].chainId||!e.params[0].chainId.startsWith("0x"))throw N.rpc.invalidParams("FetchPermissions - Invalid params: params[0].chainId must be a hex string");if("string"!=typeof e.params[0].spender||!e.params[0].spender.startsWith("0x"))throw N.rpc.invalidParams("FetchPermissions - Invalid params: params[0].spender must be a hex string");return}throw N.rpc.invalidParams()}}(e);let t=function(e){if(void 0!==e.params)return e;let t=E.getState().account.accounts?.[0],n=E.getState().account.chain?.id,r=E.getState().subAccount?.address;if(!t||!r||!n)throw N.rpc.invalidParams("FetchPermissions - one or more of account, sub account, or chain id is missing, connect to sub account via wallet_connect first");return{method:"coinbase_fetchPermissions",params:[{account:t,chainId:(0,Q.eC)(n),spender:r}]}}(e),n=await rI(t,s),r=(0,tP.ly)(t.params?.[0].chainId);return E.spendPermissions.set(n.permissions.map(e=>({...e,chainId:r}))),n}case"coinbase_fetchPermission":{let t=await rI(e,s);return t.permission&&t.permission.chainId&&E.spendPermissions.set([t.permission]),t}default:if(!this.chain.rpcUrl)throw N.rpc.internal("No RPC URL set for chain");return rI(e,this.chain.rpcUrl)}}async sendRequestToPopup(e){await this.communicator.waitForPopupLoaded?.();let t=await this.sendEncryptedRequest(e),n=await this.decryptResponseMessage(t);return this.handleResponse(e,n)}async handleResponse(e,t){let n=t.result;if("error"in n)throw n.error;switch(e.method){case"eth_requestAccounts":{let e=n.value;this.accounts=e,E.account.set({accounts:e,chain:this.chain}),this.callback?.("accountsChanged",e);break}case"wallet_connect":{let e=n.value,t=e.accounts.map(e=>e.address);this.accounts=t,E.account.set({accounts:t});let r=e.accounts.at(0),a=r?.capabilities;if(a?.subAccounts){let e=a?.subAccounts;z(e,"subAccounts"),rv(e[0]),E.subAccounts.set({address:e[0].address,factory:e[0].factory,factoryData:e[0].factoryData})}let i=E.subAccounts.get(),s=E.subAccountsConfig.get();i?.address&&(this.accounts=s?.defaultAccount==="sub"?s7(this.accounts,i.address):s8(this.accounts,i.address));let o=e?.accounts?.[0].capabilities?.spendPermissions;o&&"permissions"in o&&E.spendPermissions.set(o?.permissions),this.callback?.("accountsChanged",this.accounts);break}case"wallet_addSubAccount":{rv(n.value);let e=n.value;E.subAccounts.set(e);let t=E.subAccountsConfig.get();this.accounts=t?.defaultAccount==="sub"?s7(this.accounts,e.address):s8(this.accounts,e.address),this.callback?.("accountsChanged",this.accounts)}}return n.value}async cleanup(){let e=E.config.get().metadata;await this.keyManager.clear(),E.account.clear(),E.subAccounts.clear(),E.spendPermissions.clear(),E.chains.clear(),this.accounts=[],this.chain={id:e?.appChainIds?.[0]??1}}async handleSwitchChainRequest(e){s1(e.params);let t=function(e){if("number"==typeof e&&Number.isInteger(e))return tx(e);if("string"==typeof e){if(tk.test(e))return tx(Number(e));if(function(e){if("string"!=typeof e)return!1;let t=tS(e).toLowerCase();return tE.test(t)}(e))return tx(Number(BigInt(function(e,t=!1){let n=tC(e,!1);return n.length%2==1&&(n=tw(`0${n}`)),t?tw(`0x${n}`):n}(e,!0))))}throw N.rpc.invalidParams(`Not an integer: ${String(e)}`)}(e.params[0].chainId);if(this.updateChain(t))return null;let n=await this.sendRequestToPopup(e);return null===n&&this.updateChain(t),n}async handleGetCapabilitiesRequest(e){!function(e){if(!e||!Array.isArray(e)||1!==e.length&&2!==e.length||"string"!=typeof e[0]||!(0,rb.U)(e[0]))throw N.rpc.invalidParams();if(2===e.length){if(!Array.isArray(e[1]))throw N.rpc.invalidParams();for(let t of e[1])if("string"!=typeof t||!t.startsWith("0x"))throw N.rpc.invalidParams()}}(e.params);let t=e.params[0],n=e.params[1];if(!this.accounts.some(e=>(0,tO.E)(e,t)))throw N.provider.unauthorized("no active account found when getting capabilities");let r=E.getState().account.capabilities;if(!r)return{};if(!n||0===n.length)return r;let a=new Set(n.map(e=>(0,tP.ly)(e)));return Object.fromEntries(Object.entries(r).filter(([e])=>{try{let t=(0,tP.ly)(e);return a.has(t)}catch{return!1}}))}async sendEncryptedRequest(e){let t=await this.keyManager.getSharedSecret();if(!t)throw N.provider.unauthorized("No shared secret found when encrypting request");let n=await rP({action:e,chainId:this.chain.id},t),r=ry.get(e),a=await this.createRequestMessage({encrypted:n},r);return this.communicator.postRequestAndWaitForResponse(a)}async createRequestMessage(e,t){let n=await rS("public",await this.keyManager.getOwnPublicKey());return{id:crypto.randomUUID(),correlationId:t,sender:n,content:e,timestamp:new Date}}async decryptResponseMessage(e){let t=e.content;if("failure"in t)throw t.failure;let n=await this.keyManager.getSharedSecret();if(!n)throw N.provider.unauthorized("Invalid session: no shared secret found when decrypting response");let r=await rO(t.encrypted,n),a=r.data?.chains;if(a){let e=r.data?.nativeCurrencies,t=Object.entries(a).map(([t,n])=>{let r=e?.[Number(t)];return{id:Number(t),rpcUrl:n,...r?{nativeCurrency:r}:{}}});E.chains.set(t),this.updateChain(this.chain.id,t),rd(t)}let i=r.data?.capabilities;return i&&E.account.set({capabilities:i}),r}updateChain(e,t){let n=E.getState(),r=t??n.chains,a=r?.find(t=>t.id===e);return!!a&&(a!==this.chain&&(this.chain=a,E.account.set({chain:a}),this.callback?.("chainChanged",tA(a.id))),!0)}async addSubAccount(e){let t=E.getState().subAccount,n=E.subAccountsConfig.get();if(t?.address)return this.accounts=n?.defaultAccount==="sub"?s7(this.accounts,t.address):s8(this.accounts,t.address),this.callback?.("accountsChanged",this.accounts),t;if(await this.communicator.waitForPopupLoaded?.(),Array.isArray(e.params)&&e.params.length>0&&e.params[0].account&&"create"===e.params[0].account.type){let t;if(e.params[0].account.keys&&e.params[0].account.keys.length>0)t=e.params[0].account.keys;else{let e=E.subAccountsConfig.get()??{},{account:n}=e.toOwnerAccount?await e.toOwnerAccount():await sK();if(!n)throw N.provider.unauthorized("could not get subaccount owner account when adding sub account");t=[{type:n.address?"address":"webauthn-p256",publicKey:n.address||n.publicKey}]}e.params[0].account.keys=t}let r=await this.sendRequestToPopup(e);return rv(r),r}shouldRequestUseSubAccountSigner(e){let t=s0(e),n=E.subAccounts.get();return!!t&&t.toLowerCase()===n?.address.toLowerCase()}async sendRequestToSubAccountSigner(e){let t=E.subAccounts.get(),n=E.subAccountsConfig.get(),r=E.config.get();H(t?.address,N.provider.unauthorized("no active sub account when sending request to sub account signer"));let a=n?.toOwnerAccount?await n.toOwnerAccount():await sK();H(a?.account,N.provider.unauthorized("no active sub account owner when sending request to sub account signer")),void 0===s0(e)&&(e=function(e,t){if(!Array.isArray(e.params))throw N.rpc.invalidParams();let n=[...e.params];switch(e.method){case"eth_signTransaction":case"eth_sendTransaction":case"wallet_sendCalls":n[0].from=t;break;case"eth_signTypedData_v4":n[0]=t;break;case"personal_sign":n[1]=t}return{...e,params:n}}(e,t.address));let i=this.accounts.find(e=>e.toLowerCase()!==t.address.toLowerCase());H(i,N.provider.unauthorized("no global account found when sending request to sub account signer"));let s=function({attribution:e,dappOrigin:t}){if(e){if("auto"in e&&e.auto&&t)return(0,sY.tP)((0,sQ.w)((0,Q.NC)(t)),0,16);if("dataSuffix"in e)return e.dataSuffix}}({attribution:r.preference?.attribution,dappOrigin:window.location.origin}),o="wallet_sendCalls"===e.method&&e.params?.[0]?.chainId,c=o?(0,tP.ly)(o):this.chain.id,u=rm(c);if(H(u,N.rpc.internal(`client not found for chainId ${c} when sending request to sub account signer`)),["eth_sendTransaction","wallet_sendCalls"].includes(e.method)){let n=E.subAccountsConfig.get();if(n?.funding==="spend-permissions"&&0===x.get().length)return await oO({request:e,globalAccountAddress:i,subAccountAddress:t.address,client:u,globalAccountRequest:this.sendRequestToPopup.bind(this),chainId:c})}let l="local"===a.account.type?a.account.address:a.account.publicKey,d=await oA({address:t.address,factory:t.factory,factoryData:t.factoryData,publicKey:l,client:u});if(-1===d){let t=ry.get(e);tF({method:e.method,correlationId:t});try{d=await oP({ownerAccount:a.account,globalAccountRequest:this.sendRequestToPopup.bind(this),chainId:c}),tM({method:e.method,correlationId:t})}catch(n){return tL({method:e.method,correlationId:t,errorMessage:tv(n)}),N.provider.unauthorized("failed to add sub account owner when sending request to sub account signer")}}let{request:f}=await oE({address:t.address,owner:a.account,client:u,factory:t.factory,factoryData:t.factoryData,parentAddress:i,attribution:s?{suffix:s}:void 0,ownerIndex:d});try{return await f(e)}catch(s){let n;let r=E.subAccountsConfig.get();if(r?.funding==="manual")throw s;if(q(s))n=JSON.parse(s.details);else if(G(s))n=s;else throw s;if(!(G(n)&&n.data)||!n.data)throw s;let a=ry.get(e);tG({method:e.method,correlationId:a});try{let r=await oI({errorData:n.data,globalAccountAddress:i,subAccountAddress:t.address,client:u,request:e,globalAccountRequest:this.request.bind(this)});return tq({method:e.method,correlationId:a}),r}catch(t){throw console.error(t),tH({method:e.method,correlationId:a,errorMessage:tv(t)}),s}}}}class oB extends th{communicator;signer;constructor({metadata:e,preference:{walletUrl:t,...n}}){super(),this.communicator=new tp({url:t,metadata:e,preference:n}),this.signer=new oT({metadata:e,communicator:this.communicator,callback:this.emit.bind(this)})}async request(e){let t=crypto.randomUUID();ry.set(e,t),ty({method:e.method,correlationId:t});try{let n=await this._request(e);return tg({method:e.method,correlationId:t}),n}catch(n){throw tb({method:e.method,correlationId:t,errorMessage:tv(n)}),n}finally{ry.delete(e)}}async _request(e){try{if(function(e){if(!e||"object"!=typeof e||Array.isArray(e))throw N.rpc.invalidParams({message:"Expected a single, non-array, object argument.",data:e});let{method:t,params:n}=e;if("string"!=typeof t||0===t.length)throw N.rpc.invalidParams({message:"'args.method' must be a non-empty string.",data:e});if(void 0!==n&&!Array.isArray(n)&&("object"!=typeof n||null===n))throw N.rpc.invalidParams({message:"'args.params' must be an object or array if provided.",data:e});switch(t){case"eth_sign":case"eth_signTypedData_v2":case"eth_subscribe":case"eth_unsubscribe":throw N.provider.unsupportedMethod()}}(e),!this.signer.isConnected)switch(e.method){case"eth_requestAccounts":await this.signer.handshake({method:"handshake"}),await s3(),await this.signer.request({method:"wallet_connect",params:[{version:"1",capabilities:{...E.subAccountsConfig.get()?.capabilities??{}}}]});break;case"wallet_connect":return await this.signer.handshake({method:"handshake"}),await this.signer.request(e);case"wallet_switchEthereumChain":break;case"wallet_sendCalls":case"wallet_sign":try{return await this.signer.handshake({method:"handshake"}),await this.signer.request(e)}finally{await this.signer.cleanup()}case"wallet_getCallsStatus":return await rI(e,s);case"eth_accounts":return[];case"net_version":return 1;case"eth_chainId":return tA(1);default:throw N.provider.unauthorized("Must call 'eth_requestAccounts' before other methods")}return await this.signer.request(e)}catch(t){let{code:e}=t;return e===O.provider.unauthorized&&await this.disconnect(),Promise.reject(function(e){let t=function(e,{shouldIncludeStack:t=!1}={}){var n,r;let a={};return e&&"object"==typeof e&&!Array.isArray(e)&&_(e,"code")&&Number.isInteger(n=e.code)&&(I[n.toString()]||(r=n)>=-32099&&r<=-32e3)?(a.code=e.code,e.message&&"string"==typeof e.message?(a.message=e.message,_(e,"data")&&(a.data=e.data)):(a.message=B(a.code),a.data={originalError:U(e)})):(a.code=O.rpc.internal,a.message=j(e,"message")?e.message:T,a.data={originalError:U(e)}),t&&(a.stack=j(e,"stack")?e.stack:void 0),a}(function(e){if("string"==typeof e)return{message:e,code:O.rpc.internal};if(void 0!==e.errorMessage){let t=e.errorMessage,n=e.errorCode??(t.match(/(denied|rejected)/i)?O.provider.userRejectedRequest:void 0);return{...e,message:t,code:n,data:{method:e.method}}}return e}(e),{shouldIncludeStack:!0}),n=new URL("https://docs.cloud.coinbase.com/wallet-sdk/docs/errors");return n.searchParams.set("version",c),n.searchParams.set("code",t.code.toString()),n.searchParams.set("message",t.message),{...t,docUrl:n.href}}(t))}}async disconnect(){await this.signer.cleanup(),ry.clear(),this.emit("disconnect",N.provider.disconnected("User initiated disconnection"))}isBaseAccount=!0}function oU(e){let t={metadata:{appName:e.appName||"App",appLogoUrl:e.appLogoUrl||"",appChainIds:e.appChainIds||[]},preference:e.preference??{},paymasterUrls:e.paymasterUrls};e.subAccounts?.toOwnerAccount&&W(e.subAccounts.toOwnerAccount),E.subAccountsConfig.set({toOwnerAccount:e.subAccounts?.toOwnerAccount,creation:e.subAccounts?.creation??"manual",defaultAccount:e.subAccounts?.defaultAccount??"universal",funding:e.subAccounts?.funding??"spend-permissions"}),E.config.set(t),E.persist.rehydrate(),V(),function(e){if(e){if(e.attribution&&void 0!==e.attribution.auto&&void 0!==e.attribution.dataSuffix)throw Error("Attribution cannot contain both auto and dataSuffix properties");if(e.telemetry&&"boolean"!=typeof e.telemetry)throw Error("Telemetry must be a boolean")}}(t.preference),!1!==t.preference.telemetry&&A();let n=null,r={getProvider:()=>(n||(n=function(){let e=window.top?.ethereum??window.ethereum;return e?.isCoinbaseBrowser?e:null}()??new oB(t)),n),subAccount:{create:async e=>await r.getProvider()?.request({method:"wallet_addSubAccount",params:[{version:"1",account:e}]}),async get(){let e=E.subAccounts.get();if(e?.address)return e;let t=await r.getProvider()?.request({method:"wallet_connect",params:[{version:"1",capabilities:{}}]}),n=t.accounts[0].capabilities?.subAccounts;return Array.isArray(n)?n[0]:null},addOwner:async({address:e,publicKey:t,chainId:n})=>{let a=E.subAccounts.get(),i=E.account.get();H(i,Error("account does not exist")),H(a?.address,Error("subaccount does not exist"));let s=[];if(t){let[e,n]=(0,J.r)([{type:"bytes32"},{type:"bytes32"}],t);s.push({to:a.address,data:(0,Y.R)({abi:C,functionName:"addOwnerPublicKey",args:[e,n]}),value:(0,Q.NC)(0)})}return e&&s.push({to:a.address,data:(0,Y.R)({abi:C,functionName:"addOwnerAddress",args:[e]}),value:(0,Q.NC)(0)}),await r.getProvider()?.request({method:"wallet_sendCalls",params:[{calls:s,chainId:Q.NC(n),from:i.accounts?.[0],version:"1"}]})},setToOwnerAccount(e){W(e),E.subAccountsConfig.set({toOwnerAccount:e})}}};return r}},18482:(e,t,n)=>{n.d(t,{$:()=>c});var r=n(99766),a=n(69947),i=n(65217),s=n(60158),o=n(99303);async function c(e,t){async function n(t){if(t.endsWith(o.ny.slice(2))){let n=(0,a.f)((0,r.p5)(t,-64,-32)),s=(0,r.p5)(t,0,-64).slice(2).match(/.{1,64}/g),c=await Promise.all(s.map(t=>o.rC.slice(2)!==t?e.request({method:"eth_getTransactionReceipt",params:[`0x${t}`]},{dedupe:!0}):void 0)),u=c.some(e=>null===e)?100:c.every(e=>e?.status==="0x1")?200:c.every(e=>e?.status==="0x0")?500:600;return{atomic:!1,chainId:(0,i.ly)(n),receipts:c.filter(Boolean),status:u,version:"2.0.0"}}return e.request({method:"wallet_getCallsStatus",params:[t]})}let{atomic:c=!1,chainId:u,receipts:l,version:d="2.0.0",...f}=await n(t.id),[p,m]=(()=>{let e=f.status;return e>=100&&e<200?["pending",e]:e>=200&&e<300?["success",e]:e>=300&&e<700?["failure",e]:"CONFIRMED"===e?["success",200]:"PENDING"===e?["pending",100]:[void 0,e]})();return{...f,atomic:c,chainId:u?(0,i.ly)(u):void 0,receipts:l?.map(e=>({...e,blockNumber:i.y_(e.blockNumber),gasUsed:i.y_(e.gasUsed),status:s.ew[e.status]}))??[],statusCode:m,status:p,version:d}}},18017:(e,t,n)=>{n.d(t,{x:()=>u});var r=n(92406),a=n(60627),i=n(90049),s=n(63994),o=n(52588),c=n(86579);async function u(e,t){let{account:n=e.account,chainId:u,nonce:l}=t;if(!n)throw new a.o({docsPath:"/docs/eip7702/prepareAuthorization"});let d=(0,r.T)(n),f=(()=>{if(t.executor)return"self"===t.executor?t.executor:(0,r.T)(t.executor)})(),p={address:t.contractAddress??t.address,chainId:u,nonce:l};return void 0===p.chainId&&(p.chainId=e.chain?.id??await (0,s.s)(e,o.L,"getChainId")({})),void 0===p.nonce&&(p.nonce=await (0,s.s)(e,c.K,"getTransactionCount")({address:d.address,blockTag:"pending"}),("self"===f||f?.address&&(0,i.E)(f.address,d.address))&&(p.nonce+=1)),p}},99303:(e,t,n)=>{n.d(t,{ny:()=>f,rC:()=>p,s_:()=>m});var r=n(92406),a=n(89728),i=n(75275),s=n(42068),o=n(59075),c=n(65217),u=n(75247),l=n(54183),d=n(82386);let f="0x5792579257925792579257925792579257925792579257925792579257925792",p=(0,u.eC)(0,{size:32});async function m(e,t){let{account:n=e.account,capabilities:m,chain:h=e.chain,experimental_fallback:y,experimental_fallbackDelay:b=32,forceAtomic:g=!1,id:v,version:w="2.0.0"}=t,x=n?(0,r.T)(n):null,k=t.calls.map(e=>{let t=e.abi?(0,s.R)({abi:e.abi,functionName:e.functionName,args:e.args}):e.data;return{data:e.dataSuffix&&t?(0,o.zo)([t,e.dataSuffix]):t,to:e.to,value:e.value?(0,u.eC)(e.value):void 0}});try{let t=await e.request({method:"wallet_sendCalls",params:[{atomicRequired:g,calls:k,capabilities:m,chainId:(0,u.eC)(h.id),from:x?.address,id:v,version:w}]},{retryCount:0});if("string"==typeof t)return{id:t};return t}catch(n){if(y&&("MethodNotFoundRpcError"===n.name||"MethodNotSupportedRpcError"===n.name||"UnknownRpcError"===n.name||n.details.toLowerCase().includes("does not exist / is not available")||n.details.toLowerCase().includes("missing or invalid. request()")||n.details.toLowerCase().includes("did not match any variant of untagged enum")||n.details.toLowerCase().includes("account upgraded to unsupported contract")||n.details.toLowerCase().includes("eip-7702 not supported")||n.details.toLowerCase().includes("unsupported wc_ method")||n.details.toLowerCase().includes("feature toggled misconfigured")||n.details.toLowerCase().includes("jsonrpcengine: response has no error or result for request"))){if(m&&Object.values(m).some(e=>!e.optional)){let e="non-optional `capabilities` are not supported on fallback to `eth_sendTransaction`.";throw new i.vl(new a.G(e,{details:e}))}if(g&&k.length>1){let e="`forceAtomic` is not supported on fallback to `eth_sendTransaction`.";throw new i.r0(new a.G(e,{details:e}))}let t=[];for(let n of k){let r=(0,d.T)(e,{account:x,chain:h,data:n.data,to:n.to,value:n.value?(0,c.y_)(n.value):void 0});t.push(r),b>0&&await new Promise(e=>setTimeout(e,b))}let n=await Promise.allSettled(t);if(n.every(e=>"rejected"===e.status))throw n[0].reason;let r=n.map(e=>"fulfilled"===e.status?e.value:p);return{id:(0,o.zo)([...r,(0,u.eC)(h.id,{size:32}),f])}}throw(0,l.$)(n,{...t,account:x,chain:t.chain})}}},85944:(e,t,n)=>{n.d(t,{l:()=>f});var r=n(89728);class a extends r.G{constructor(e){super(`Call bundle failed with status: ${e.statusCode}`,{name:"BundleFailedError"}),Object.defineProperty(this,"result",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.result=e}}var i=n(63994),s=n(50100),o=n(96832),c=n(79406),u=n(5448),l=n(96838),d=n(18482);async function f(e,t){let n;let{id:r,pollingInterval:f=e.pollingInterval,status:m=({statusCode:e})=>200===e||e>=300,retryCount:h=4,retryDelay:y=({count:e})=>200*~~(1<{let s=(0,o.$)(async()=>{let o=e=>{clearTimeout(n),s(),e(),E()};try{let n=await (0,u.J)(async()=>{let t=await (0,i.s)(e,d.$,"getCallsStatus")({id:r});if(g&&"failure"===t.status)throw new a(t);return t},{retryCount:h,delay:y});if(!m(n))return;o(()=>t.resolve(n))}catch(e){o(()=>t.reject(e))}},{interval:f,emitOnBegin:!0});return s});return n=b?setTimeout(()=>{E(),clearTimeout(n),k(new p({id:r}))},b):void 0,await w}class p extends r.G{constructor({id:e}){super(`Timed out while waiting for call bundle with id "${e}" to be confirmed.`,{name:"WaitForCallsStatusTimeoutError"})}}},8851:(e,t,n)=>{n.d(t,{v:()=>i});var r=n(30326),a=n(2423);function i(e){let{key:t="public",name:n="Public Client"}=e;return(0,r.e)({...e,key:t,name:n,type:"publicClient"}).extend(a.I)}}}; \ No newline at end of file diff --git a/frontend/.next/server/chunks/9409.js b/frontend/.next/server/chunks/9409.js new file mode 100644 index 0000000..a267556 --- /dev/null +++ b/frontend/.next/server/chunks/9409.js @@ -0,0 +1,14 @@ +"use strict";exports.id=9409,exports.ids=[9409],exports.modules={69409:(t,e,r)=>{r.r(e),r.d(e,{PhCircleHalf:()=>d}),r(31325);var a=r(70460),i=r(75466),o=r(66005),s=r(28405),l=r(43961),p=Object.defineProperty,h=Object.getOwnPropertyDescriptor,Z=(t,e,r,a)=>{for(var i,o=a>1?void 0:a?h(e,r):e,s=t.length-1;s>=0;s--)(i=t[s])&&(o=(a?i(e,r,o):i(o))||o);return a&&o&&p(e,r,o),o};let d=class extends i.oi{constructor(){super(...arguments),this.size="1em",this.weight="regular",this.color="currentColor",this.mirrored=!1}render(){var t;return(0,a.dy)` + ${d.weightsMap.get(null!=(t=this.weight)?t:"regular")} + `}};d.weightsMap=new Map([["thin",(0,a.YP)``],["light",(0,a.YP)``],["regular",(0,a.YP)``],["bold",(0,a.YP)``],["fill",(0,a.YP)``],["duotone",(0,a.YP)``]]),d.styles=(0,l.iv)` + :host { + display: contents; + } + `,Z([(0,s.C)({type:String,reflect:!0})],d.prototype,"size",2),Z([(0,s.C)({type:String,reflect:!0})],d.prototype,"weight",2),Z([(0,s.C)({type:String,reflect:!0})],d.prototype,"color",2),Z([(0,s.C)({type:Boolean,reflect:!0})],d.prototype,"mirrored",2),d=Z([(0,o.M)("ph-circle-half")],d)}}; \ No newline at end of file diff --git a/frontend/.next/server/chunks/9429.js b/frontend/.next/server/chunks/9429.js new file mode 100644 index 0000000..9f480ec --- /dev/null +++ b/frontend/.next/server/chunks/9429.js @@ -0,0 +1,14 @@ +"use strict";exports.id=9429,exports.ids=[9429],exports.modules={99429:(t,e,r)=>{r.r(e),r.d(e,{PhBrowser:()=>l}),r(31325);var o=r(70460),i=r(75466),s=r(66005),a=r(28405),p=r(43961),V=Object.defineProperty,h=Object.getOwnPropertyDescriptor,H=(t,e,r,o)=>{for(var i,s=o>1?void 0:o?h(e,r):e,a=t.length-1;a>=0;a--)(i=t[a])&&(s=(o?i(e,r,s):i(s))||s);return o&&s&&V(e,r,s),s};let l=class extends i.oi{constructor(){super(...arguments),this.size="1em",this.weight="regular",this.color="currentColor",this.mirrored=!1}render(){var t;return(0,o.dy)` + ${l.weightsMap.get(null!=(t=this.weight)?t:"regular")} + `}};l.weightsMap=new Map([["thin",(0,o.YP)``],["light",(0,o.YP)``],["regular",(0,o.YP)``],["bold",(0,o.YP)``],["fill",(0,o.YP)``],["duotone",(0,o.YP)``]]),l.styles=(0,p.iv)` + :host { + display: contents; + } + `,H([(0,a.C)({type:String,reflect:!0})],l.prototype,"size",2),H([(0,a.C)({type:String,reflect:!0})],l.prototype,"weight",2),H([(0,a.C)({type:String,reflect:!0})],l.prototype,"color",2),H([(0,a.C)({type:Boolean,reflect:!0})],l.prototype,"mirrored",2),l=H([(0,s.M)("ph-browser")],l)}}; \ No newline at end of file diff --git a/frontend/.next/server/chunks/9517.js b/frontend/.next/server/chunks/9517.js new file mode 100644 index 0000000..60be985 --- /dev/null +++ b/frontend/.next/server/chunks/9517.js @@ -0,0 +1,410 @@ +"use strict";exports.id=9517,exports.ids=[9517],exports.modules={9517:(e,t,i)=>{i.r(t),i.d(t,{W3mApproveTransactionView:()=>h,W3mRegisterAccountNameSuccess:()=>Q,W3mRegisterAccountNameView:()=>q,W3mSmartAccountSettingsView:()=>_,W3mUpgradeWalletView:()=>S});var o=i(37207),r=i(90670),n=i(71848),a=i(20833),s=i(30288),c=i(9346),l=i(71106),d=i(67668);let u=(0,o.iv)` + div { + width: 100%; + } + + [data-ready='false'] { + transform: scale(1.05); + } + + @media (max-width: 430px) { + [data-ready='false'] { + transform: translateY(-50px); + } + } +`;var p=function(e,t,i,o){var r,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(n<3?r(a):n>3?r(t,i,a):r(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let h=class extends o.oi{constructor(){super(),this.bodyObserver=void 0,this.unsubscribe=[],this.iframe=document.getElementById("w3m-iframe"),this.ready=!1,this.unsubscribe.push(a.I.subscribeKey("open",e=>{e||this.onHideIframe()}),a.I.subscribeKey("shake",e=>{e?this.iframe.style.animation="w3m-shake 500ms var(--apkt-easings-ease-out-power-2)":this.iframe.style.animation="none"}))}disconnectedCallback(){this.onHideIframe(),this.unsubscribe.forEach(e=>e()),this.bodyObserver?.unobserve(window.document.body)}async firstUpdated(){await this.syncTheme(),this.iframe.style.display="block";let e=this?.renderRoot?.querySelector("div");this.bodyObserver=new ResizeObserver(t=>{let i=t?.[0]?.contentBoxSize,o=i?.[0]?.inlineSize;this.iframe.style.height="600px",e.style.height="600px",s.OptionsController.state.enableEmbedded?this.updateFrameSizeForEmbeddedMode():(o&&o<=430?(this.iframe.style.width="100%",this.iframe.style.left="0px",this.iframe.style.bottom="0px",this.iframe.style.top="unset"):(this.iframe.style.width="360px",this.iframe.style.left="calc(50% - 180px)",this.iframe.style.top="calc(50% - 300px + 32px)",this.iframe.style.bottom="unset"),this.onShowIframe())}),this.bodyObserver.observe(window.document.body)}render(){return(0,o.dy)`
`}onShowIframe(){let e=window.innerWidth<=430;this.ready=!0,this.iframe.style.animation=e?"w3m-iframe-zoom-in-mobile 200ms var(--apkt-easings-ease-out-power-2)":"w3m-iframe-zoom-in 200ms var(--apkt-easings-ease-out-power-2)"}onHideIframe(){this.iframe.style.display="none",this.iframe.style.animation="w3m-iframe-fade-out 200ms var(--apkt-easings-ease-out-power-2)"}async syncTheme(){let e=c.ConnectorController.getAuthConnector();if(e){let t=l.ThemeController.getSnapshot().themeMode,i=l.ThemeController.getSnapshot().themeVariables;await e.provider.syncTheme({themeVariables:i,w3mThemeVariables:(0,n.t)(i,t)})}}async updateFrameSizeForEmbeddedMode(){let e=this?.renderRoot?.querySelector("div");await new Promise(e=>{setTimeout(e,300)});let t=this.getBoundingClientRect();e.style.width="100%",this.iframe.style.left=`${t.left}px`,this.iframe.style.top=`${t.top}px`,this.iframe.style.width=`${t.width}px`,this.iframe.style.height=`${t.height}px`,this.onShowIframe()}};h.styles=u,p([(0,r.SB)()],h.prototype,"ready",void 0),h=p([(0,d.Mo)("w3m-approve-transaction-view")],h);var g=i(16114);i(64559),i(35300),i(68865),i(71762);var m=i(10820),f=i(18322),b=i(30955);let y=(0,b.iv)` + a { + border: none; + border-radius: ${({borderRadius:e})=>e["20"]}; + display: flex; + flex-direction: row; + align-items: center; + padding: ${({spacing:e})=>e[1]}; + transition: + background-color ${({durations:e})=>e.lg} + ${({easings:e})=>e["ease-out-power-2"]}, + box-shadow ${({durations:e})=>e.lg} + ${({easings:e})=>e["ease-out-power-2"]}, + border ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]}; + will-change: background-color, box-shadow, border; + } + + /* -- Variants --------------------------------------------------------------- */ + a[data-type='success'] { + background-color: ${({tokens:e})=>e.core.backgroundSuccess}; + color: ${({tokens:e})=>e.core.textSuccess}; + } + + a[data-type='error'] { + background-color: ${({tokens:e})=>e.core.backgroundError}; + color: ${({tokens:e})=>e.core.textError}; + } + + a[data-type='warning'] { + background-color: ${({tokens:e})=>e.core.backgroundWarning}; + color: ${({tokens:e})=>e.core.textWarning}; + } + + /* -- Sizes --------------------------------------------------------------- */ + a[data-size='sm'] { + height: 24px; + } + + a[data-size='md'] { + height: 28px; + } + + a[data-size='lg'] { + height: 32px; + } + + a[data-size='sm'] > wui-image, + a[data-size='sm'] > wui-icon { + width: 16px; + height: 16px; + } + + a[data-size='md'] > wui-image, + a[data-size='md'] > wui-icon { + width: 20px; + height: 20px; + } + + a[data-size='lg'] > wui-image, + a[data-size='lg'] > wui-icon { + width: 24px; + height: 24px; + } + + wui-text { + padding-left: ${({spacing:e})=>e[1]}; + padding-right: ${({spacing:e})=>e[1]}; + } + + wui-image { + border-radius: ${({borderRadius:e})=>e[3]}; + overflow: hidden; + user-drag: none; + user-select: none; + -moz-user-select: none; + -webkit-user-drag: none; + -webkit-user-select: none; + -ms-user-select: none; + } + + /* -- States --------------------------------------------------------------- */ + @media (hover: hover) and (pointer: fine) { + a[data-type='success']:not(:disabled):hover { + background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; + box-shadow: 0px 0px 0px 1px ${({tokens:e})=>e.core.borderSuccess}; + } + + a[data-type='error']:not(:disabled):hover { + background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; + box-shadow: 0px 0px 0px 1px ${({tokens:e})=>e.core.borderError}; + } + + a[data-type='warning']:not(:disabled):hover { + background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; + box-shadow: 0px 0px 0px 1px ${({tokens:e})=>e.core.borderWarning}; + } + } + + a[data-type='success']:not(:disabled):focus-visible { + box-shadow: + 0px 0px 0px 1px ${({tokens:e})=>e.core.backgroundAccentPrimary}, + 0px 0px 0px 4px ${({tokens:e})=>e.core.foregroundAccent020}; + } + + a[data-type='error']:not(:disabled):focus-visible { + box-shadow: + 0px 0px 0px 1px ${({tokens:e})=>e.core.backgroundAccentPrimary}, + 0px 0px 0px 4px ${({tokens:e})=>e.core.foregroundAccent020}; + } + + a[data-type='warning']:not(:disabled):focus-visible { + box-shadow: + 0px 0px 0px 1px ${({tokens:e})=>e.core.backgroundAccentPrimary}, + 0px 0px 0px 4px ${({tokens:e})=>e.core.foregroundAccent020}; + } + + a:disabled { + opacity: 0.5; + } +`;var w=function(e,t,i,o){var r,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(n<3?r(a):n>3?r(t,i,a):r(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let x={sm:"md-regular",md:"lg-regular",lg:"lg-regular"},v={success:"sealCheck",error:"warning",warning:"exclamationCircle"},$=class extends o.oi{constructor(){super(...arguments),this.type="success",this.size="md",this.imageSrc=void 0,this.disabled=!1,this.href="",this.text=void 0}render(){return(0,o.dy)` + + ${this.imageTemplate()} + ${this.text} + + `}imageTemplate(){return this.imageSrc?(0,o.dy)``:(0,o.dy)``}};$.styles=[m.ET,m.ZM,y],w([(0,r.Cb)()],$.prototype,"type",void 0),w([(0,r.Cb)()],$.prototype,"size",void 0),w([(0,r.Cb)()],$.prototype,"imageSrc",void 0),w([(0,r.Cb)({type:Boolean})],$.prototype,"disabled",void 0),w([(0,r.Cb)()],$.prototype,"href",void 0),w([(0,r.Cb)()],$.prototype,"text",void 0),$=w([(0,f.M)("wui-semantic-chip")],$),i(44680);let S=class extends o.oi{render(){return(0,o.dy)` + + Follow the instructions on + + + + You will have to reconnect for security reasons + + + `}};S=function(e,t,i,o){var r,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(n<3?r(a):n>3?r(t,i,a):r(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a}([(0,d.Mo)("w3m-upgrade-wallet-view")],S);var C=i(64895),A=i(42772),R=i(52180),T=i(71263),k=i(15681),E=i(5018),N=i(73372),O=function(e,t,i,o){var r,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(n<3?r(a):n>3?r(t,i,a):r(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let _=class extends o.oi{constructor(){super(...arguments),this.loading=!1,this.switched=!1,this.text="",this.network=A.R.state.activeCaipNetwork}render(){return(0,o.dy)` + + ${this.togglePreferredAccountTypeTemplate()} ${this.toggleSmartAccountVersionTemplate()} + + `}toggleSmartAccountVersionTemplate(){return(0,o.dy)` + + + Force Smart Account Version ${this.isV6()?"7":"6"} + + + `}isV6(){return"v6"===(E.e.get("dapp_smart_account_version")||"v6")}toggleSmartAccountVersion(){E.e.set("dapp_smart_account_version",this.isV6()?"v7":"v6"),"undefined"!=typeof window&&window?.location?.reload()}togglePreferredAccountTypeTemplate(){let e=this.network?.chainNamespace,t=A.R.checkIfSmartAccountEnabled(),i=c.ConnectorController.getConnectorId(e);return c.ConnectorController.getAuthConnector()&&i===C.b.CONNECTOR_ID.AUTH&&t?(this.switched||(this.text=(0,R.r9)(e)===N.y_.ACCOUNT_TYPES.SMART_ACCOUNT?"Switch to your EOA":"Switch to your Smart Account"),(0,o.dy)` + + ${this.text} + + `):null}async changePreferredAccountType(){let e=this.network?.chainNamespace,t=A.R.checkIfSmartAccountEnabled(),i=(0,R.r9)(e)!==N.y_.ACCOUNT_TYPES.SMART_ACCOUNT&&t?N.y_.ACCOUNT_TYPES.SMART_ACCOUNT:N.y_.ACCOUNT_TYPES.EOA;c.ConnectorController.getAuthConnector()&&(this.loading=!0,await T.ConnectionController.setPreferredAccountType(i,e),this.text=i===N.y_.ACCOUNT_TYPES.SMART_ACCOUNT?"Switch to your EOA":"Switch to your Smart Account",this.switched=!0,k.S.resetSend(),this.loading=!1,this.requestUpdate())}};O([(0,r.SB)()],_.prototype,"loading",void 0),O([(0,r.SB)()],_.prototype,"switched",void 0),O([(0,r.SB)()],_.prototype,"text",void 0),O([(0,r.SB)()],_.prototype,"network",void 0),_=O([(0,d.Mo)("w3m-smart-account-settings-view")],_);var P=i(96644),I=i(24345),z=i(34862),D=i(77870),j=i(61741);i(72227),i(47155);let M=(0,b.iv)` + :host { + width: 100%; + } + + button { + width: 100%; + display: flex; + justify-content: space-between; + align-items: center; + background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; + border-radius: ${({borderRadius:e})=>e[4]}; + padding: ${({spacing:e})=>e[4]}; + } + + .name { + max-width: 75%; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + + @media (hover: hover) and (pointer: fine) { + button:hover:enabled { + cursor: pointer; + background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; + border-radius: ${({borderRadius:e})=>e[6]}; + } + } + + button:disabled { + opacity: 0.5; + cursor: default; + } + + button:focus-visible:enabled { + box-shadow: 0 0 0 4px ${({tokens:e})=>e.core.foregroundAccent040}; + background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; + } +`;var U=function(e,t,i,o){var r,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(n<3?r(a):n>3?r(t,i,a):r(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let B=class extends o.oi{constructor(){super(...arguments),this.name="",this.registered=!1,this.loading=!1,this.disabled=!1}render(){return(0,o.dy)` + + `}templateRightContent(){return this.loading?(0,o.dy)``:this.registered?(0,o.dy)`Registered`:(0,o.dy)`Available`}};B.styles=[m.ET,m.ZM,M],U([(0,r.Cb)()],B.prototype,"name",void 0),U([(0,r.Cb)({type:Boolean})],B.prototype,"registered",void 0),U([(0,r.Cb)({type:Boolean})],B.prototype,"loading",void 0),U([(0,r.Cb)({type:Boolean})],B.prototype,"disabled",void 0),B=U([(0,f.M)("wui-account-name-suggestion-item")],B);var V=i(83479);i(25685);let Y=(0,b.iv)` + :host { + position: relative; + width: 100%; + display: inline-block; + } + + :host([disabled]) { + opacity: 0.5; + cursor: not-allowed; + } + + .base-name { + position: absolute; + right: ${({spacing:e})=>e[4]}; + top: 50%; + transform: translateY(-50%); + text-align: right; + padding: ${({spacing:e})=>e[1]}; + background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; + border-radius: ${({borderRadius:e})=>e[1]}; + } +`;var W=function(e,t,i,o){var r,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(n<3?r(a):n>3?r(t,i,a):r(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let F=class extends o.oi{constructor(){super(...arguments),this.disabled=!1,this.loading=!1}render(){return(0,o.dy)` + + `}};F.styles=[m.ET,Y],W([(0,r.Cb)()],F.prototype,"errorMessage",void 0),W([(0,r.Cb)({type:Boolean})],F.prototype,"disabled",void 0),W([(0,r.Cb)()],F.prototype,"value",void 0),W([(0,r.Cb)({type:Boolean})],F.prototype,"loading",void 0),W([(0,r.Cb)({attribute:!1})],F.prototype,"onKeyDown",void 0),F=W([(0,f.M)("wui-ens-input")],F),i(98855),i(1640),i(1159);var K=i(46821);let H=(0,d.iv)` + wui-flex { + width: 100%; + } + + .suggestion { + background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; + border-radius: ${({borderRadius:e})=>e[4]}; + } + + .suggestion:hover:not(:disabled) { + cursor: pointer; + border: none; + width: 100%; + display: flex; + justify-content: space-between; + align-items: center; + background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; + border-radius: ${({borderRadius:e})=>e[6]}; + padding: ${({spacing:e})=>e[4]}; + } + + .suggestion:disabled { + opacity: 0.5; + cursor: default; + } + + .suggestion:focus-visible:not(:disabled) { + box-shadow: 0 0 0 4px ${({tokens:e})=>e.core.foregroundAccent040}; + background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; + } + + .suggested-name { + max-width: 75%; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + + form { + width: 100%; + position: relative; + } + + .input-submit-button, + .input-loading-spinner { + position: absolute; + top: 22px; + transform: translateY(-50%); + right: 10px; + } +`;var L=function(e,t,i,o){var r,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(n<3?r(a):n>3?r(t,i,a):r(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let q=class extends o.oi{constructor(){super(),this.formRef=(0,P.V)(),this.usubscribe=[],this.name="",this.error="",this.loading=I.a.state.loading,this.suggestions=I.a.state.suggestions,this.profileName=A.R.getAccountData()?.profileName,this.onDebouncedNameInputChange=z.j.debounce(e=>{e.length<4?this.error="Name must be at least 4 characters long":K.g.isValidReownName(e)?(this.error="",I.a.getSuggestions(e)):this.error="The value is not a valid username"}),this.usubscribe.push(I.a.subscribe(e=>{this.suggestions=e.suggestions,this.loading=e.loading}),A.R.subscribeChainProp("accountState",e=>{this.profileName=e?.profileName,e?.profileName&&(this.error="You already own a name")}))}firstUpdated(){this.formRef.value?.addEventListener("keydown",this.onEnterKey.bind(this))}disconnectedCallback(){super.disconnectedCallback(),this.usubscribe.forEach(e=>e()),this.formRef.value?.removeEventListener("keydown",this.onEnterKey.bind(this))}render(){return(0,o.dy)` + + + + + ${this.submitButtonTemplate()} + + + ${this.templateSuggestions()} + + `}submitButtonTemplate(){let e=this.suggestions.find(e=>e.name?.split(".")?.[0]===this.name&&e.registered);if(this.loading)return(0,o.dy)``;let t=`${this.name}${C.b.WC_NAME_SUFFIX}`;return(0,o.dy)` + this.onSubmitName(t)} + > + + `}onNameInputChange(e){let t=K.g.validateReownName(e.detail||"");this.name=t,this.onDebouncedNameInputChange(t)}onKeyDown(e){1!==e.key.length||K.g.isValidReownName(e.key)||e.preventDefault()}templateSuggestions(){return!this.name||this.name.length<4||this.error?null:(0,o.dy)` + ${this.suggestions.map(e=>(0,o.dy)`this.onSubmitName(e.name)} + >`)} + `}isAllowedToSubmit(e){let t=e.split(".")?.[0],i=this.suggestions.find(e=>e.name?.split(".")?.[0]===t&&e.registered);return!this.loading&&!this.error&&!this.profileName&&t&&I.a.validateName(t)&&!i}async onSubmitName(e){try{if(!this.isAllowedToSubmit(e))return;D.X.sendEvent({type:"track",event:"REGISTER_NAME_INITIATED",properties:{isSmartAccount:(0,R.r9)(A.R.state.activeChain)===N.y_.ACCOUNT_TYPES.SMART_ACCOUNT,ensName:e}}),await I.a.registerName(e),D.X.sendEvent({type:"track",event:"REGISTER_NAME_SUCCESS",properties:{isSmartAccount:(0,R.r9)(A.R.state.activeChain)===N.y_.ACCOUNT_TYPES.SMART_ACCOUNT,ensName:e}})}catch(t){j.SnackController.showError(t.message),D.X.sendEvent({type:"track",event:"REGISTER_NAME_ERROR",properties:{isSmartAccount:(0,R.r9)(A.R.state.activeChain)===N.y_.ACCOUNT_TYPES.SMART_ACCOUNT,ensName:e,error:z.j.parseError(t)}})}}onEnterKey(e){if("Enter"===e.key&&this.name&&this.isAllowedToSubmit(this.name)){let e=`${this.name}${C.b.WC_NAME_SUFFIX}`;this.onSubmitName(e)}}};q.styles=H,L([(0,r.Cb)()],q.prototype,"errorMessage",void 0),L([(0,r.SB)()],q.prototype,"name",void 0),L([(0,r.SB)()],q.prototype,"error",void 0),L([(0,r.SB)()],q.prototype,"loading",void 0),L([(0,r.SB)()],q.prototype,"suggestions",void 0),L([(0,r.SB)()],q.prototype,"profileName",void 0),q=L([(0,d.Mo)("w3m-register-account-name-view")],q);var X=i(88064),G=i(14212);i(3966),i(4030),i(2427);let Z=(0,o.iv)` + .continue-button-container { + width: 100%; + } +`,Q=class extends o.oi{render(){return(0,o.dy)` + + ${this.onboardingTemplate()} ${this.buttonsTemplate()} + {z.j.openHref(X.U.URLS.FAQ,"_blank")}} + > + Learn more + + + + `}onboardingTemplate(){return(0,o.dy)` + + + + + + Account name chosen successfully + + + You can now fund your account and trade crypto + + + `}buttonsTemplate(){return(0,o.dy)` + Let's Go! + + `}redirectToAccount(){G.RouterController.replace("Account")}};Q.styles=Z,Q=function(e,t,i,o){var r,n=arguments.length,a=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,o);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(n<3?r(a):n>3?r(t,i,a):r(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a}([(0,d.Mo)("w3m-register-account-name-success-view")],Q)}}; \ No newline at end of file diff --git a/frontend/.next/server/chunks/9818.js b/frontend/.next/server/chunks/9818.js new file mode 100644 index 0000000..f779597 --- /dev/null +++ b/frontend/.next/server/chunks/9818.js @@ -0,0 +1,14 @@ +"use strict";exports.id=9818,exports.ids=[9818],exports.modules={9818:(t,e,a)=>{a.r(e),a.d(e,{PhImage:()=>Z}),a(31325);var r=a(70460),l=a(75466),i=a(66005),o=a(28405),s=a(43961),p=Object.defineProperty,h=Object.getOwnPropertyDescriptor,V=(t,e,a,r)=>{for(var l,i=r>1?void 0:r?h(e,a):e,o=t.length-1;o>=0;o--)(l=t[o])&&(i=(r?l(e,a,i):l(i))||i);return r&&i&&p(e,a,i),i};let Z=class extends l.oi{constructor(){super(...arguments),this.size="1em",this.weight="regular",this.color="currentColor",this.mirrored=!1}render(){var t;return(0,r.dy)` + ${Z.weightsMap.get(null!=(t=this.weight)?t:"regular")} + `}};Z.weightsMap=new Map([["thin",(0,r.YP)``],["light",(0,r.YP)``],["regular",(0,r.YP)``],["bold",(0,r.YP)``],["fill",(0,r.YP)``],["duotone",(0,r.YP)``]]),Z.styles=(0,s.iv)` + :host { + display: contents; + } + `,V([(0,o.C)({type:String,reflect:!0})],Z.prototype,"size",2),V([(0,o.C)({type:String,reflect:!0})],Z.prototype,"weight",2),V([(0,o.C)({type:String,reflect:!0})],Z.prototype,"color",2),V([(0,o.C)({type:Boolean,reflect:!0})],Z.prototype,"mirrored",2),Z=V([(0,i.M)("ph-image")],Z)}}; \ No newline at end of file diff --git a/frontend/.next/server/chunks/9890.js b/frontend/.next/server/chunks/9890.js new file mode 100644 index 0000000..2342bf7 --- /dev/null +++ b/frontend/.next/server/chunks/9890.js @@ -0,0 +1,14 @@ +"use strict";exports.id=9890,exports.ids=[9890],exports.modules={9890:(t,e,r)=>{r.r(e),r.d(e,{PhArrowLeft:()=>n}),r(31325);var l=r(70460),a=r(75466),o=r(66005),i=r(28405),s=r(43961),h=Object.defineProperty,p=Object.getOwnPropertyDescriptor,d=(t,e,r,l)=>{for(var a,o=l>1?void 0:l?p(e,r):e,i=t.length-1;i>=0;i--)(a=t[i])&&(o=(l?a(e,r,o):a(o))||o);return l&&o&&h(e,r,o),o};let n=class extends a.oi{constructor(){super(...arguments),this.size="1em",this.weight="regular",this.color="currentColor",this.mirrored=!1}render(){var t;return(0,l.dy)` + ${n.weightsMap.get(null!=(t=this.weight)?t:"regular")} + `}};n.weightsMap=new Map([["thin",(0,l.YP)``],["light",(0,l.YP)``],["regular",(0,l.YP)``],["bold",(0,l.YP)``],["fill",(0,l.YP)``],["duotone",(0,l.YP)``]]),n.styles=(0,s.iv)` + :host { + display: contents; + } + `,d([(0,i.C)({type:String,reflect:!0})],n.prototype,"size",2),d([(0,i.C)({type:String,reflect:!0})],n.prototype,"weight",2),d([(0,i.C)({type:String,reflect:!0})],n.prototype,"color",2),d([(0,i.C)({type:Boolean,reflect:!0})],n.prototype,"mirrored",2),n=d([(0,o.M)("ph-arrow-left")],n)}}; \ No newline at end of file diff --git a/frontend/.next/server/chunks/font-manifest.json b/frontend/.next/server/chunks/font-manifest.json new file mode 100644 index 0000000..0637a08 --- /dev/null +++ b/frontend/.next/server/chunks/font-manifest.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/frontend/.next/server/font-manifest.json b/frontend/.next/server/font-manifest.json new file mode 100644 index 0000000..0637a08 --- /dev/null +++ b/frontend/.next/server/font-manifest.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/frontend/.next/server/interception-route-rewrite-manifest.js b/frontend/.next/server/interception-route-rewrite-manifest.js new file mode 100644 index 0000000..24f77ba --- /dev/null +++ b/frontend/.next/server/interception-route-rewrite-manifest.js @@ -0,0 +1 @@ +self.__INTERCEPTION_ROUTE_REWRITE_MANIFEST="[]"; \ No newline at end of file diff --git a/frontend/.next/server/middleware-build-manifest.js b/frontend/.next/server/middleware-build-manifest.js new file mode 100644 index 0000000..232d34c --- /dev/null +++ b/frontend/.next/server/middleware-build-manifest.js @@ -0,0 +1 @@ +self.__BUILD_MANIFEST={polyfillFiles:["static/chunks/polyfills-42372ed130431b0a.js"],devFiles:[],ampDevFiles:[],lowPriorityFiles:[],rootMainFiles:["static/chunks/webpack-d8be11d58819d354.js","static/chunks/fd9d1056-76ef4ce4d9db9dd9.js","static/chunks/2117-c30431d66a0cce6d.js","static/chunks/main-app-808b815ae52119d6.js"],pages:{"/_app":["static/chunks/webpack-d8be11d58819d354.js","static/chunks/framework-8e0e0f4a6b83a956.js","static/chunks/main-141492b7e0994e0f.js","static/chunks/pages/_app-3c9ca398d360b709.js"],"/_error":["static/chunks/webpack-d8be11d58819d354.js","static/chunks/framework-8e0e0f4a6b83a956.js","static/chunks/main-141492b7e0994e0f.js","static/chunks/pages/_error-cf5ca766ac8f493f.js"]},ampFirstPages:[]},self.__BUILD_MANIFEST.lowPriorityFiles=["/static/"+process.env.__NEXT_BUILD_ID+"/_buildManifest.js",,"/static/"+process.env.__NEXT_BUILD_ID+"/_ssgManifest.js"]; \ No newline at end of file diff --git a/frontend/.next/server/middleware-manifest.json b/frontend/.next/server/middleware-manifest.json new file mode 100644 index 0000000..33872a3 --- /dev/null +++ b/frontend/.next/server/middleware-manifest.json @@ -0,0 +1,6 @@ +{ + "version": 3, + "middleware": {}, + "functions": {}, + "sortedMiddleware": [] +} \ No newline at end of file diff --git a/frontend/.next/server/middleware-react-loadable-manifest.js b/frontend/.next/server/middleware-react-loadable-manifest.js new file mode 100644 index 0000000..94b02a7 --- /dev/null +++ b/frontend/.next/server/middleware-react-loadable-manifest.js @@ -0,0 +1 @@ +self.__REACT_LOADABLE_MANIFEST='{"app\\\\page.tsx -> @/components/map/MapView":{"id":60319,"files":["static/chunks/d0deef33.0379166a4ec23470.js","static/chunks/319.da60cadf1434690f.js"]},"components\\\\map\\\\MapView.tsx -> ./MapContainer":{"id":62241,"files":["static/css/fc1c9daac70c093b.css","static/chunks/2241.7fe485087c7b274c.js"]},"node_modules\\\\@reown\\\\appkit-adapter-wagmi\\\\dist\\\\esm\\\\src\\\\utils\\\\helpers.js -> @wagmi/connectors":{"id":33326,"files":["static/chunks/3326.cffefb3dee6c4d0c.js"]},"node_modules\\\\@reown\\\\appkit-adapter-wagmi\\\\node_modules\\\\@wagmi\\\\connectors\\\\dist\\\\esm\\\\baseAccount.js -> @base-org/account":{"id":74324,"files":["static/chunks/846-581a3df87add5941.js","static/chunks/8332-dfab188c89f6de1d.js","static/chunks/7895.60e7b58d352b820a.js"]},"node_modules\\\\@reown\\\\appkit-adapter-wagmi\\\\node_modules\\\\@wagmi\\\\connectors\\\\dist\\\\esm\\\\coinbaseWallet.js -> @coinbase/wallet-sdk":{"id":null,"files":[]},"node_modules\\\\@reown\\\\appkit-adapter-wagmi\\\\node_modules\\\\@wagmi\\\\connectors\\\\dist\\\\esm\\\\gemini.js -> @gemini-wallet/core":{"id":null,"files":[]},"node_modules\\\\@reown\\\\appkit-adapter-wagmi\\\\node_modules\\\\@wagmi\\\\connectors\\\\dist\\\\esm\\\\metaMask.js -> @metamask/sdk":{"id":null,"files":[]},"node_modules\\\\@reown\\\\appkit-adapter-wagmi\\\\node_modules\\\\@wagmi\\\\connectors\\\\dist\\\\esm\\\\porto.js -> porto":{"id":null,"files":[]},"node_modules\\\\@reown\\\\appkit-adapter-wagmi\\\\node_modules\\\\@wagmi\\\\connectors\\\\dist\\\\esm\\\\porto.js -> porto/internal":{"id":null,"files":[]},"node_modules\\\\@reown\\\\appkit-adapter-wagmi\\\\node_modules\\\\@wagmi\\\\connectors\\\\dist\\\\esm\\\\safe.js -> @safe-global/safe-apps-provider":{"id":97353,"files":["static/chunks/2181.879c7cea39e9112f.js","static/chunks/7353.04a39413462e94b8.js"]},"node_modules\\\\@reown\\\\appkit-adapter-wagmi\\\\node_modules\\\\@wagmi\\\\connectors\\\\dist\\\\esm\\\\safe.js -> @safe-global/safe-apps-sdk":{"id":74946,"files":["static/chunks/2181.879c7cea39e9112f.js","static/chunks/4946.1ccfccafc680a298.js"]},"node_modules\\\\@reown\\\\appkit-adapter-wagmi\\\\node_modules\\\\@wagmi\\\\connectors\\\\dist\\\\esm\\\\walletConnect.js -> @walletconnect/ethereum-provider":{"id":null,"files":[]},"node_modules\\\\@reown\\\\appkit-controllers\\\\dist\\\\esm\\\\src\\\\utils\\\\ViemUtil.js -> viem":{"id":47857,"files":["static/chunks/846-581a3df87add5941.js","static/chunks/8332-dfab188c89f6de1d.js","static/chunks/7857.7035f3d8540cb099.js"]},"node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> @phosphor-icons/webcomponents/PhArrowCircleDown":{"id":72656,"files":["static/chunks/790.2d212f48acdb6fec.js","static/chunks/2656.d343e9ac9b094bec.js"]},"node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> @phosphor-icons/webcomponents/PhArrowClockwise":{"id":48145,"files":["static/chunks/790.2d212f48acdb6fec.js","static/chunks/8145.869f872c68e4027f.js"]},"node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> @phosphor-icons/webcomponents/PhArrowDown":{"id":61222,"files":["static/chunks/790.2d212f48acdb6fec.js","static/chunks/1222.cd19409b55e4761d.js"]},"node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> @phosphor-icons/webcomponents/PhArrowLeft":{"id":60851,"files":["static/chunks/790.2d212f48acdb6fec.js","static/chunks/851.25eeddf2d58e27ae.js"]},"node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> @phosphor-icons/webcomponents/PhArrowRight":{"id":3529,"files":["static/chunks/790.2d212f48acdb6fec.js","static/chunks/3529.3c45e6d75a0099b7.js"]},"node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> @phosphor-icons/webcomponents/PhArrowSquareOut":{"id":92080,"files":["static/chunks/790.2d212f48acdb6fec.js","static/chunks/2080.0a4ad3526a695fa0.js"]},"node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> @phosphor-icons/webcomponents/PhArrowUp":{"id":92103,"files":["static/chunks/790.2d212f48acdb6fec.js","static/chunks/2103.5c09694c154d63b7.js"]},"node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> @phosphor-icons/webcomponents/PhArrowUpRight":{"id":74278,"files":["static/chunks/790.2d212f48acdb6fec.js","static/chunks/4278.32a097a4a046b144.js"]},"node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> @phosphor-icons/webcomponents/PhArrowsClockwise":{"id":40687,"files":["static/chunks/790.2d212f48acdb6fec.js","static/chunks/687.8ae173c7b8f95af6.js"]},"node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> @phosphor-icons/webcomponents/PhArrowsDownUp":{"id":38257,"files":["static/chunks/790.2d212f48acdb6fec.js","static/chunks/8257.85db10780638e796.js"]},"node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> @phosphor-icons/webcomponents/PhArrowsLeftRight":{"id":44156,"files":["static/chunks/790.2d212f48acdb6fec.js","static/chunks/4156.99eb5ef9a3a7db6b.js"]},"node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> @phosphor-icons/webcomponents/PhBank":{"id":32381,"files":["static/chunks/790.2d212f48acdb6fec.js","static/chunks/2381.99b49ec0de0ecc07.js"]},"node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> @phosphor-icons/webcomponents/PhBrowser":{"id":65370,"files":["static/chunks/790.2d212f48acdb6fec.js","static/chunks/5370.40f093982f3433dd.js"]},"node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> @phosphor-icons/webcomponents/PhCaretDown":{"id":74653,"files":["static/chunks/790.2d212f48acdb6fec.js","static/chunks/4653.8fb9eeb0b101872e.js"]},"node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> @phosphor-icons/webcomponents/PhCaretLeft":{"id":27550,"files":["static/chunks/790.2d212f48acdb6fec.js","static/chunks/7550.52bc17f39c020f0e.js"]},"node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> @phosphor-icons/webcomponents/PhCaretRight":{"id":4324,"files":["static/chunks/790.2d212f48acdb6fec.js","static/chunks/4324.2d21e6e94d240f5a.js"]},"node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> @phosphor-icons/webcomponents/PhCaretUp":{"id":8213,"files":["static/chunks/790.2d212f48acdb6fec.js","static/chunks/8213.ce0cd878f7af2dfc.js"]},"node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> @phosphor-icons/webcomponents/PhCheck":{"id":25957,"files":["static/chunks/790.2d212f48acdb6fec.js","static/chunks/5957.3e389379b1ac5186.js"]},"node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> @phosphor-icons/webcomponents/PhCircleHalf":{"id":64792,"files":["static/chunks/790.2d212f48acdb6fec.js","static/chunks/4792.4375898a5363bf32.js"]},"node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> @phosphor-icons/webcomponents/PhClock":{"id":67107,"files":["static/chunks/790.2d212f48acdb6fec.js","static/chunks/7107.e6fa05964563ed52.js"]},"node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> @phosphor-icons/webcomponents/PhCompass":{"id":11414,"files":["static/chunks/790.2d212f48acdb6fec.js","static/chunks/1414.7a19581128bac08d.js"]},"node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> @phosphor-icons/webcomponents/PhCopy":{"id":83631,"files":["static/chunks/790.2d212f48acdb6fec.js","static/chunks/3631.449c8eaa27256fb6.js"]},"node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> @phosphor-icons/webcomponents/PhCreditCard":{"id":43869,"files":["static/chunks/790.2d212f48acdb6fec.js","static/chunks/3869.b25c967665cf8d84.js"]},"node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> @phosphor-icons/webcomponents/PhCurrencyDollar":{"id":17076,"files":["static/chunks/790.2d212f48acdb6fec.js","static/chunks/7076.4908ec83929a649c.js"]},"node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> @phosphor-icons/webcomponents/PhDesktop":{"id":18426,"files":["static/chunks/790.2d212f48acdb6fec.js","static/chunks/8426.3f6fba98a8b37036.js"]},"node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> @phosphor-icons/webcomponents/PhDeviceMobile":{"id":9984,"files":["static/chunks/790.2d212f48acdb6fec.js","static/chunks/9984.9143581f48043503.js"]},"node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> @phosphor-icons/webcomponents/PhDotsThree":{"id":4931,"files":["static/chunks/790.2d212f48acdb6fec.js","static/chunks/4931.563d35ad17647dc0.js"]},"node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> @phosphor-icons/webcomponents/PhEnvelope":{"id":65988,"files":["static/chunks/790.2d212f48acdb6fec.js","static/chunks/5988.23cfd2cfcc8815ae.js"]},"node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> @phosphor-icons/webcomponents/PhFunnelSimple":{"id":21078,"files":["static/chunks/790.2d212f48acdb6fec.js","static/chunks/1078.156b2c5a8f45f240.js"]},"node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> @phosphor-icons/webcomponents/PhGlobe":{"id":98592,"files":["static/chunks/790.2d212f48acdb6fec.js","static/chunks/8592.f05cc9e6663ab7b0.js"]},"node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> @phosphor-icons/webcomponents/PhIdentificationCard":{"id":23124,"files":["static/chunks/790.2d212f48acdb6fec.js","static/chunks/3124.1a3770a9aaaf9cfc.js"]},"node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> @phosphor-icons/webcomponents/PhImage":{"id":75857,"files":["static/chunks/790.2d212f48acdb6fec.js","static/chunks/5857.9b39683897969c57.js"]},"node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> @phosphor-icons/webcomponents/PhInfo":{"id":71086,"files":["static/chunks/790.2d212f48acdb6fec.js","static/chunks/1086.835f6d3c18c91f75.js"]},"node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> @phosphor-icons/webcomponents/PhLightbulb":{"id":45851,"files":["static/chunks/790.2d212f48acdb6fec.js","static/chunks/5851.3380ed20e0153f1f.js"]},"node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> @phosphor-icons/webcomponents/PhMagnifyingGlass":{"id":83314,"files":["static/chunks/790.2d212f48acdb6fec.js","static/chunks/3314.6a9f8d33ba7ef171.js"]},"node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> @phosphor-icons/webcomponents/PhPaperPlaneRight":{"id":70169,"files":["static/chunks/790.2d212f48acdb6fec.js","static/chunks/169.fb7afe3a66917fd8.js"]},"node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> @phosphor-icons/webcomponents/PhPlus":{"id":50131,"files":["static/chunks/790.2d212f48acdb6fec.js","static/chunks/131.271fc803433a0511.js"]},"node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> @phosphor-icons/webcomponents/PhPower":{"id":53664,"files":["static/chunks/790.2d212f48acdb6fec.js","static/chunks/3664.436d19ee6e4d69b6.js"]},"node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> @phosphor-icons/webcomponents/PhPuzzlePiece":{"id":33298,"files":["static/chunks/790.2d212f48acdb6fec.js","static/chunks/3298.d670408e0ef18a68.js"]},"node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> @phosphor-icons/webcomponents/PhQrCode":{"id":86554,"files":["static/chunks/790.2d212f48acdb6fec.js","static/chunks/6554.7b6ca0e260079172.js"]},"node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> @phosphor-icons/webcomponents/PhQuestion":{"id":50375,"files":["static/chunks/790.2d212f48acdb6fec.js","static/chunks/375.46d771727ecb7b8d.js"]},"node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> @phosphor-icons/webcomponents/PhQuestionMark":{"id":35779,"files":["static/chunks/790.2d212f48acdb6fec.js","static/chunks/5779.cccde6676cacf91f.js"]},"node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> @phosphor-icons/webcomponents/PhSealCheck":{"id":63049,"files":["static/chunks/790.2d212f48acdb6fec.js","static/chunks/9365.33fd392ca47b0dac.js"]},"node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> @phosphor-icons/webcomponents/PhSignOut":{"id":98406,"files":["static/chunks/790.2d212f48acdb6fec.js","static/chunks/8406.3b5b9d57e237e264.js"]},"node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> @phosphor-icons/webcomponents/PhSpinner":{"id":37759,"files":["static/chunks/790.2d212f48acdb6fec.js","static/chunks/7759.b32ff100e61b9e4e.js"]},"node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> @phosphor-icons/webcomponents/PhTrash":{"id":49504,"files":["static/chunks/790.2d212f48acdb6fec.js","static/chunks/9504.e446f47ea8377b76.js"]},"node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> @phosphor-icons/webcomponents/PhUser":{"id":17941,"files":["static/chunks/790.2d212f48acdb6fec.js","static/chunks/7941.f53ba4396375d65a.js"]},"node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> @phosphor-icons/webcomponents/PhVault":{"id":32464,"files":["static/chunks/790.2d212f48acdb6fec.js","static/chunks/2464.d65b51956fb7a993.js"]},"node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> @phosphor-icons/webcomponents/PhWallet":{"id":76792,"files":["static/chunks/790.2d212f48acdb6fec.js","static/chunks/6792.4df44eab8baa0a52.js"]},"node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> @phosphor-icons/webcomponents/PhWarning":{"id":8971,"files":["static/chunks/790.2d212f48acdb6fec.js","static/chunks/8971.b53a598d17200600.js"]},"node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> @phosphor-icons/webcomponents/PhWarningCircle":{"id":2947,"files":["static/chunks/790.2d212f48acdb6fec.js","static/chunks/2947.eb856c7b9a09bd13.js"]},"node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> @phosphor-icons/webcomponents/PhX":{"id":98022,"files":["static/chunks/790.2d212f48acdb6fec.js","static/chunks/8022.a095b1e5f9fa6d81.js"]},"node_modules\\\\@reown\\\\appkit\\\\dist\\\\esm\\\\src\\\\client\\\\appkit-base-client.js -> @reown/appkit-controllers/features":{"id":63520,"files":["static/chunks/3520.3b598679dc20dc79.js"]},"node_modules\\\\@reown\\\\appkit\\\\dist\\\\esm\\\\src\\\\client\\\\appkit.js -> @reown/appkit-pay":{"id":90070,"files":["static/chunks/70.903da54c4e7020d3.js"]},"node_modules\\\\@reown\\\\appkit\\\\dist\\\\esm\\\\src\\\\client\\\\appkit.js -> @reown/appkit-scaffold-ui":{"id":2789,"files":[]},"node_modules\\\\@reown\\\\appkit\\\\dist\\\\esm\\\\src\\\\client\\\\appkit.js -> @reown/appkit-scaffold-ui/email":{"id":22094,"files":["static/chunks/2094.f8f74f805a958fdc.js"]},"node_modules\\\\@reown\\\\appkit\\\\dist\\\\esm\\\\src\\\\client\\\\appkit.js -> @reown/appkit-scaffold-ui/embedded-wallet":{"id":77354,"files":["static/chunks/7354.51cf9d733f62303d.js"]},"node_modules\\\\@reown\\\\appkit\\\\dist\\\\esm\\\\src\\\\client\\\\appkit.js -> @reown/appkit-scaffold-ui/onramp":{"id":84319,"files":["static/chunks/4319.48b25dc06ce3925d.js"]},"node_modules\\\\@reown\\\\appkit\\\\dist\\\\esm\\\\src\\\\client\\\\appkit.js -> @reown/appkit-scaffold-ui/pay-with-exchange":{"id":62420,"files":["static/chunks/2420.c80513ba367f5412.js"]},"node_modules\\\\@reown\\\\appkit\\\\dist\\\\esm\\\\src\\\\client\\\\appkit.js -> @reown/appkit-scaffold-ui/receive":{"id":94893,"files":["static/chunks/4893.cc57c10cc15fb42c.js"]},"node_modules\\\\@reown\\\\appkit\\\\dist\\\\esm\\\\src\\\\client\\\\appkit.js -> @reown/appkit-scaffold-ui/reown-authentication/data-capture":{"id":9018,"files":["static/chunks/9018.a2df5c7e623e3337.js"]},"node_modules\\\\@reown\\\\appkit\\\\dist\\\\esm\\\\src\\\\client\\\\appkit.js -> @reown/appkit-scaffold-ui/send":{"id":76985,"files":["static/chunks/1272.1e155f7760fa53cc.js","static/chunks/6985.453256d75f56023b.js"]},"node_modules\\\\@reown\\\\appkit\\\\dist\\\\esm\\\\src\\\\client\\\\appkit.js -> @reown/appkit-scaffold-ui/socials":{"id":8867,"files":["static/chunks/8867.d44333fb28d367ff.js"]},"node_modules\\\\@reown\\\\appkit\\\\dist\\\\esm\\\\src\\\\client\\\\appkit.js -> @reown/appkit-scaffold-ui/swaps":{"id":62523,"files":["static/chunks/1272.1e155f7760fa53cc.js","static/chunks/2523.ba3a819c19e70471.js"]},"node_modules\\\\@reown\\\\appkit\\\\dist\\\\esm\\\\src\\\\client\\\\appkit.js -> @reown/appkit-scaffold-ui/transactions":{"id":23227,"files":["static/chunks/3227.f776441c538e48e4.js"]},"node_modules\\\\@reown\\\\appkit\\\\dist\\\\esm\\\\src\\\\client\\\\appkit.js -> @reown/appkit-scaffold-ui/w3m-modal":{"id":27767,"files":["static/chunks/1272.1e155f7760fa53cc.js","static/chunks/7767.0aafbc22bca88e17.js"]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\dist\\\\index.es.js -> @reown/appkit/core":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-controllers\\\\node_modules\\\\@walletconnect\\\\utils\\\\node_modules\\\\viem\\\\_esm\\\\actions\\\\public\\\\call.js -> ../../utils/ccip.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-controllers\\\\node_modules\\\\@walletconnect\\\\utils\\\\node_modules\\\\viem\\\\_esm\\\\utils\\\\rpc\\\\webSocket.js -> isows":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-controllers\\\\node_modules\\\\@walletconnect\\\\utils\\\\node_modules\\\\viem\\\\_esm\\\\utils\\\\signature\\\\recoverPublicKey.js -> @noble/curves/secp256k1":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> ../../assets/svg/add.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> ../../assets/svg/all-wallets.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> ../../assets/svg/app-store.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> ../../assets/svg/apple.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> ../../assets/svg/arrow-bottom-circle.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> ../../assets/svg/arrow-bottom.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> ../../assets/svg/arrow-left.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> ../../assets/svg/arrow-right.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> ../../assets/svg/arrow-top.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> ../../assets/svg/bank.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> ../../assets/svg/browser.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> ../../assets/svg/card.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> ../../assets/svg/checkmark-bold.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> ../../assets/svg/checkmark.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> ../../assets/svg/chevron-bottom.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> ../../assets/svg/chevron-left.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> ../../assets/svg/chevron-right.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> ../../assets/svg/chevron-top.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> ../../assets/svg/chrome-store.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> ../../assets/svg/clock.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> ../../assets/svg/close.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> ../../assets/svg/coinPlaceholder.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> ../../assets/svg/compass.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> ../../assets/svg/copy.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> ../../assets/svg/cursor-transparent.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> ../../assets/svg/cursor.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> ../../assets/svg/desktop.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> ../../assets/svg/disconnect.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> ../../assets/svg/discord.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> ../../assets/svg/etherscan.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> ../../assets/svg/exclamation-triangle.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> ../../assets/svg/extension.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> ../../assets/svg/external-link.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> ../../assets/svg/facebook.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> ../../assets/svg/farcaster.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> ../../assets/svg/filters.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> ../../assets/svg/github.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> ../../assets/svg/google.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> ../../assets/svg/help-circle.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> ../../assets/svg/id.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> ../../assets/svg/image.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> ../../assets/svg/info-circle.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> ../../assets/svg/info.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> ../../assets/svg/lightbulb.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> ../../assets/svg/mail.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> ../../assets/svg/mobile.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> ../../assets/svg/more.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> ../../assets/svg/network-placeholder.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> ../../assets/svg/nftPlaceholder.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> ../../assets/svg/off.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> ../../assets/svg/play-store.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> ../../assets/svg/plus.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> ../../assets/svg/qr-code.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> ../../assets/svg/recycle-horizontal.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> ../../assets/svg/refresh.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> ../../assets/svg/reown-logo.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> ../../assets/svg/search.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> ../../assets/svg/send.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> ../../assets/svg/swapHorizontal.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> ../../assets/svg/swapHorizontalBold.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> ../../assets/svg/swapHorizontalMedium.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> ../../assets/svg/swapHorizontalRoundedBold.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> ../../assets/svg/swapVertical.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> ../../assets/svg/telegram.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> ../../assets/svg/three-dots.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> ../../assets/svg/twitch.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> ../../assets/svg/twitterIcon.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> ../../assets/svg/verify-filled.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> ../../assets/svg/verify.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> ../../assets/svg/wallet-placeholder.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> ../../assets/svg/wallet.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> ../../assets/svg/walletconnect.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> ../../assets/svg/warning-circle.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit-ui\\\\dist\\\\esm\\\\src\\\\components\\\\wui-icon\\\\index.js -> ../../assets/svg/x.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit\\\\dist\\\\esm\\\\src\\\\client\\\\appkit-core.js -> @reown/appkit-scaffold-ui/basic":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit\\\\dist\\\\esm\\\\src\\\\client\\\\appkit-core.js -> @reown/appkit-scaffold-ui/w3m-modal":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit\\\\node_modules\\\\@walletconnect\\\\utils\\\\node_modules\\\\viem\\\\_esm\\\\actions\\\\public\\\\call.js -> ../../utils/ccip.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit\\\\node_modules\\\\@walletconnect\\\\utils\\\\node_modules\\\\viem\\\\_esm\\\\utils\\\\rpc\\\\webSocket.js -> isows":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@reown\\\\appkit\\\\node_modules\\\\@walletconnect\\\\utils\\\\node_modules\\\\viem\\\\_esm\\\\utils\\\\signature\\\\recoverPublicKey.js -> @noble/curves/secp256k1":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@walletconnect\\\\utils\\\\node_modules\\\\viem\\\\_esm\\\\actions\\\\public\\\\call.js -> ../../utils/ccip.js":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@walletconnect\\\\utils\\\\node_modules\\\\viem\\\\_esm\\\\utils\\\\rpc\\\\webSocket.js -> isows":{"id":null,"files":[]},"node_modules\\\\@walletconnect\\\\ethereum-provider\\\\node_modules\\\\@walletconnect\\\\utils\\\\node_modules\\\\viem\\\\_esm\\\\utils\\\\signature\\\\recoverPublicKey.js -> @noble/curves/secp256k1":{"id":null,"files":[]},"node_modules\\\\viem\\\\_esm\\\\actions\\\\public\\\\call.js -> ../../utils/ccip.js":{"id":71735,"files":["static/chunks/1735.384ac074ce4d298b.js"]},"node_modules\\\\viem\\\\_esm\\\\utils\\\\rpc\\\\webSocket.js -> isows":{"id":8759,"files":[]},"node_modules\\\\viem\\\\_esm\\\\utils\\\\signature\\\\recoverPublicKey.js -> @noble/curves/secp256k1":{"id":10846,"files":["static/chunks/58-fe2b18b75c935912.js","static/chunks/846-581a3df87add5941.js"]}}'; \ No newline at end of file diff --git a/frontend/.next/server/next-font-manifest.js b/frontend/.next/server/next-font-manifest.js new file mode 100644 index 0000000..8267a50 --- /dev/null +++ b/frontend/.next/server/next-font-manifest.js @@ -0,0 +1 @@ +self.__NEXT_FONT_MANIFEST='{"pages":{},"app":{},"appUsingSizeAdjust":false,"pagesUsingSizeAdjust":false}'; \ No newline at end of file diff --git a/frontend/.next/server/next-font-manifest.json b/frontend/.next/server/next-font-manifest.json new file mode 100644 index 0000000..25f78e7 --- /dev/null +++ b/frontend/.next/server/next-font-manifest.json @@ -0,0 +1 @@ +{"pages":{},"app":{},"appUsingSizeAdjust":false,"pagesUsingSizeAdjust":false} \ No newline at end of file diff --git a/frontend/.next/server/pages-manifest.json b/frontend/.next/server/pages-manifest.json new file mode 100644 index 0000000..a679766 --- /dev/null +++ b/frontend/.next/server/pages-manifest.json @@ -0,0 +1,5 @@ +{ + "/_app": "pages/_app.js", + "/_error": "pages/_error.js", + "/_document": "pages/_document.js" +} \ No newline at end of file diff --git a/frontend/.next/server/pages/_app.js b/frontend/.next/server/pages/_app.js new file mode 100644 index 0000000..7eef73e --- /dev/null +++ b/frontend/.next/server/pages/_app.js @@ -0,0 +1 @@ +"use strict";(()=>{var e={};e.id=2888,e.ids=[2888],e.modules={48141:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return a}});let n=r(50167),o=r(20997),i=n._(r(16689)),u=r(45782);async function s(e){let{Component:t,ctx:r}=e;return{pageProps:await (0,u.loadGetInitialProps)(t,r)}}class a extends i.default.Component{render(){let{Component:e,pageProps:t}=this.props;return(0,o.jsx)(e,{...t})}}a.origGetInitialProps=s,a.getInitialProps=s,("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},45782:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{DecodeError:function(){return g},MiddlewareNotFoundError:function(){return E},MissingStaticPage:function(){return y},NormalizeError:function(){return m},PageNotFoundError:function(){return P},SP:function(){return d},ST:function(){return p},WEB_VITALS:function(){return r},execOnce:function(){return n},getDisplayName:function(){return a},getLocationOrigin:function(){return u},getURL:function(){return s},isAbsoluteUrl:function(){return i},isResSent:function(){return c},loadGetInitialProps:function(){return f},normalizeRepeatedSlashes:function(){return l},stringifyError:function(){return x}});let r=["CLS","FCP","FID","INP","LCP","TTFB"];function n(e){let t,r=!1;return function(){for(var n=arguments.length,o=Array(n),i=0;io.test(e);function u(){let{protocol:e,hostname:t,port:r}=window.location;return e+"//"+t+(r?":"+r:"")}function s(){let{href:e}=window.location,t=u();return e.substring(t.length)}function a(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function c(e){return e.finished||e.headersSent}function l(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?"?"+t.slice(1).join("?"):"")}async function f(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await f(t.Component,t.ctx)}:{};let n=await e.getInitialProps(t);if(r&&c(r))return n;if(!n)throw Error('"'+a(e)+'.getInitialProps()" should resolve to an object. But found "'+n+'" instead.');return n}let d="undefined"!=typeof performance,p=d&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class g extends Error{}class m extends Error{}class P extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message="Cannot find module for page: "+e}}class y extends Error{constructor(e,t){super(),this.message="Failed to load static file for page: "+e+" "+t}}class E extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function x(e){return JSON.stringify({message:e.message,stack:e.stack})}},16689:e=>{e.exports=require("react")},20997:e=>{e.exports=require("react/jsx-runtime")},50167:(e,t)=>{t._=t._interop_require_default=function(e){return e&&e.__esModule?e:{default:e}}}};var t=require("../webpack-runtime.js");t.C(e);var r=t(t.s=48141);module.exports=r})(); \ No newline at end of file diff --git a/frontend/.next/server/pages/_app.js.nft.json b/frontend/.next/server/pages/_app.js.nft.json new file mode 100644 index 0000000..90a7719 --- /dev/null +++ b/frontend/.next/server/pages/_app.js.nft.json @@ -0,0 +1 @@ +{"version":1,"files":["../webpack-runtime.js","../../../package.json","../../../node_modules/next/dist/pages/_app.js"]} \ No newline at end of file diff --git a/frontend/.next/server/pages/_document.js b/frontend/.next/server/pages/_document.js new file mode 100644 index 0000000..12494af --- /dev/null +++ b/frontend/.next/server/pages/_document.js @@ -0,0 +1 @@ +"use strict";(()=>{var e={};e.id=660,e.ids=[660],e.modules={62785:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},16689:e=>{e.exports=require("react")},20997:e=>{e.exports=require("react/jsx-runtime")},55315:e=>{e.exports=require("path")}};var r=require("../webpack-runtime.js");r.C(e);var s=e=>r(r.s=e),t=r.X(0,[1682],()=>s(61682));module.exports=t})(); \ No newline at end of file diff --git a/frontend/.next/server/pages/_document.js.nft.json b/frontend/.next/server/pages/_document.js.nft.json new file mode 100644 index 0000000..f71e2cc --- /dev/null +++ b/frontend/.next/server/pages/_document.js.nft.json @@ -0,0 +1 @@ +{"version":1,"files":["../webpack-runtime.js","../chunks/1682.js","../../../package.json","../../../node_modules/next/dist/pages/_document.js"]} \ No newline at end of file diff --git a/frontend/.next/server/pages/_error.js b/frontend/.next/server/pages/_error.js new file mode 100644 index 0000000..a43e915 --- /dev/null +++ b/frontend/.next/server/pages/_error.js @@ -0,0 +1 @@ +"use strict";(()=>{var e={};e.id=4820,e.ids=[4820,660],e.modules={1323:(e,t)=>{Object.defineProperty(t,"l",{enumerable:!0,get:function(){return function e(t,r){return r in t?t[r]:"then"in t&&"function"==typeof t.then?t.then(t=>e(t,r)):"function"==typeof t&&"default"===r?t:void 0}}})},46051:(e,t,r)=>{r.r(t),r.d(t,{config:()=>h,default:()=>p,getServerSideProps:()=>g,getStaticPaths:()=>f,getStaticProps:()=>c,reportWebVitals:()=>y,routeModule:()=>v,unstable_getServerProps:()=>P,unstable_getServerSideProps:()=>x,unstable_getStaticParams:()=>_,unstable_getStaticPaths:()=>m,unstable_getStaticProps:()=>b});var n=r(87093),o=r(35244),l=r(1323),a=r(61682),i=r.n(a),u=r(48141),d=r.n(u),s=r(18529);let p=(0,l.l)(s,"default"),c=(0,l.l)(s,"getStaticProps"),f=(0,l.l)(s,"getStaticPaths"),g=(0,l.l)(s,"getServerSideProps"),h=(0,l.l)(s,"config"),y=(0,l.l)(s,"reportWebVitals"),b=(0,l.l)(s,"unstable_getStaticProps"),m=(0,l.l)(s,"unstable_getStaticPaths"),_=(0,l.l)(s,"unstable_getStaticParams"),P=(0,l.l)(s,"unstable_getServerProps"),x=(0,l.l)(s,"unstable_getServerSideProps"),v=new n.PagesRouteModule({definition:{kind:o.x.PAGES,page:"/_error",pathname:"/_error",bundlePath:"",filename:""},components:{App:d(),Document:i()},userland:s})},48141:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return u}});let n=r(50167),o=r(20997),l=n._(r(16689)),a=r(45782);async function i(e){let{Component:t,ctx:r}=e;return{pageProps:await (0,a.loadGetInitialProps)(t,r)}}class u extends l.default.Component{render(){let{Component:e,pageProps:t}=this.props;return(0,o.jsx)(e,{...t})}}u.origGetInitialProps=i,u.getInitialProps=i,("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},18529:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return s}});let n=r(50167),o=r(20997),l=n._(r(16689)),a=n._(r(50494)),i={400:"Bad Request",404:"This page could not be found",405:"Method Not Allowed",500:"Internal Server Error"};function u(e){let{res:t,err:r}=e;return{statusCode:t&&t.statusCode?t.statusCode:r?r.statusCode:404}}let d={error:{fontFamily:'system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"',height:"100vh",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},desc:{lineHeight:"48px"},h1:{display:"inline-block",margin:"0 20px 0 0",paddingRight:23,fontSize:24,fontWeight:500,verticalAlign:"top"},h2:{fontSize:14,fontWeight:400,lineHeight:"28px"},wrap:{display:"inline-block"}};class s extends l.default.Component{render(){let{statusCode:e,withDarkMode:t=!0}=this.props,r=this.props.title||i[e]||"An unexpected error has occurred";return(0,o.jsxs)("div",{style:d.error,children:[(0,o.jsx)(a.default,{children:(0,o.jsx)("title",{children:e?e+": "+r:"Application error: a client-side exception has occurred"})}),(0,o.jsxs)("div",{style:d.desc,children:[(0,o.jsx)("style",{dangerouslySetInnerHTML:{__html:"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}"+(t?"@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}":"")}}),e?(0,o.jsx)("h1",{className:"next-error-h1",style:d.h1,children:e}):null,(0,o.jsx)("div",{style:d.wrap,children:(0,o.jsxs)("h2",{style:d.h2,children:[this.props.title||e?r:(0,o.jsx)(o.Fragment,{children:"Application error: a client-side exception has occurred (see the browser console for more information)"}),"."]})})]})]})}}s.displayName="ErrorPage",s.getInitialProps=u,s.origGetInitialProps=u,("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},98579:(e,t)=>{function r(e){let{ampFirst:t=!1,hybrid:r=!1,hasQuery:n=!1}=void 0===e?{}:e;return t||r&&n}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isInAmpMode",{enumerable:!0,get:function(){return r}})},50494:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{default:function(){return h},defaultHead:function(){return p}});let n=r(50167),o=r(28760),l=r(20997),a=o._(r(16689)),i=n._(r(3657)),u=r(98039),d=r(41988),s=r(98579);function p(e){void 0===e&&(e=!1);let t=[(0,l.jsx)("meta",{charSet:"utf-8"})];return e||t.push((0,l.jsx)("meta",{name:"viewport",content:"width=device-width"})),t}function c(e,t){return"string"==typeof t||"number"==typeof t?e:t.type===a.default.Fragment?e.concat(a.default.Children.toArray(t.props.children).reduce((e,t)=>"string"==typeof t||"number"==typeof t?e:e.concat(t),[])):e.concat(t)}r(79784);let f=["name","httpEquiv","charSet","itemProp"];function g(e,t){let{inAmpMode:r}=t;return e.reduce(c,[]).reverse().concat(p(r).reverse()).filter(function(){let e=new Set,t=new Set,r=new Set,n={};return o=>{let l=!0,a=!1;if(o.key&&"number"!=typeof o.key&&o.key.indexOf("$")>0){a=!0;let t=o.key.slice(o.key.indexOf("$")+1);e.has(t)?l=!1:e.add(t)}switch(o.type){case"title":case"base":t.has(o.type)?l=!1:t.add(o.type);break;case"meta":for(let e=0,t=f.length;e{let n=e.key||t;if(!r&&"link"===e.type&&e.props.href&&["https://fonts.googleapis.com/css","https://use.typekit.net/"].some(t=>e.props.href.startsWith(t))){let t={...e.props||{}};return t["data-href"]=t.href,t.href=void 0,t["data-optimized-fonts"]=!0,a.default.cloneElement(e,t)}return a.default.cloneElement(e,{key:n})})}let h=function(e){let{children:t}=e,r=(0,a.useContext)(u.AmpStateContext),n=(0,a.useContext)(d.HeadManagerContext);return(0,l.jsx)(i.default,{reduceComponentsToState:g,headManager:n,inAmpMode:(0,s.isInAmpMode)(r),children:t})};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3657:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return a}});let n=r(16689),o=()=>{},l=()=>{};function a(e){var t;let{headManager:r,reduceComponentsToState:a}=e;function i(){if(r&&r.mountedInstances){let t=n.Children.toArray(Array.from(r.mountedInstances).filter(Boolean));r.updateHead(a(t,e))}}return null==r||null==(t=r.mountedInstances)||t.add(e.children),i(),o(()=>{var t;return null==r||null==(t=r.mountedInstances)||t.add(e.children),()=>{var t;null==r||null==(t=r.mountedInstances)||t.delete(e.children)}}),o(()=>(r&&(r._pendingUpdate=i),()=>{r&&(r._pendingUpdate=i)})),l(()=>(r&&r._pendingUpdate&&(r._pendingUpdate(),r._pendingUpdate=null),()=>{r&&r._pendingUpdate&&(r._pendingUpdate(),r._pendingUpdate=null)})),null}},79784:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"warnOnce",{enumerable:!0,get:function(){return r}});let r=e=>{}},35244:(e,t)=>{var r;Object.defineProperty(t,"x",{enumerable:!0,get:function(){return r}}),function(e){e.PAGES="PAGES",e.PAGES_API="PAGES_API",e.APP_PAGE="APP_PAGE",e.APP_ROUTE="APP_ROUTE"}(r||(r={}))},98039:(e,t,r)=>{e.exports=r(87093).vendored.contexts.AmpContext},41988:(e,t,r)=>{e.exports=r(87093).vendored.contexts.HeadManagerContext},62785:e=>{e.exports=require("next/dist/compiled/next-server/pages.runtime.prod.js")},16689:e=>{e.exports=require("react")},20997:e=>{e.exports=require("react/jsx-runtime")},55315:e=>{e.exports=require("path")},28760:(e,t)=>{function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(r=function(e){return e?n:t})(e)}t._=t._interop_require_wildcard=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=r(t);if(n&&n.has(e))return n.get(e);var o={__proto__:null},l=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var i=l?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(o,a,i):o[a]=e[a]}return o.default=e,n&&n.set(e,o),o}}};var t=require("../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),n=t.X(0,[1682],()=>r(46051));module.exports=n})(); \ No newline at end of file diff --git a/frontend/.next/server/pages/_error.js.nft.json b/frontend/.next/server/pages/_error.js.nft.json new file mode 100644 index 0000000..96e5c6d --- /dev/null +++ b/frontend/.next/server/pages/_error.js.nft.json @@ -0,0 +1 @@ +{"version":1,"files":["../webpack-runtime.js","../chunks/1682.js"]} \ No newline at end of file diff --git a/frontend/.next/server/server-reference-manifest.js b/frontend/.next/server/server-reference-manifest.js new file mode 100644 index 0000000..3ca5dc5 --- /dev/null +++ b/frontend/.next/server/server-reference-manifest.js @@ -0,0 +1 @@ +self.__RSC_SERVER_MANIFEST="{\"node\":{},\"edge\":{},\"encryptionKey\":\"process.env.NEXT_SERVER_ACTIONS_ENCRYPTION_KEY\"}" \ No newline at end of file diff --git a/frontend/.next/server/server-reference-manifest.json b/frontend/.next/server/server-reference-manifest.json new file mode 100644 index 0000000..bb795e1 --- /dev/null +++ b/frontend/.next/server/server-reference-manifest.json @@ -0,0 +1 @@ +{"node":{},"edge":{},"encryptionKey":"j+REXFVivnVy0sDJWSaC1r9noBCXMJFcx6F37IeHWFQ="} \ No newline at end of file diff --git a/frontend/.next/server/webpack-runtime.js b/frontend/.next/server/webpack-runtime.js new file mode 100644 index 0000000..05670cc --- /dev/null +++ b/frontend/.next/server/webpack-runtime.js @@ -0,0 +1 @@ +(()=>{"use strict";var e={},r={};function t(o){var a=r[o];if(void 0!==a)return a.exports;var n=r[o]={exports:{}},u=!0;try{e[o].call(n.exports,n,n.exports,t),u=!1}finally{u&&delete r[o]}return n.exports}t.m=e,t.amdO={},t.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return t.d(r,{a:r}),r},(()=>{var e,r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;t.t=function(o,a){if(1&a&&(o=this(o)),8&a||"object"==typeof o&&o&&(4&a&&o.__esModule||16&a&&"function"==typeof o.then))return o;var n=Object.create(null);t.r(n);var u={};e=e||[null,r({}),r([]),r(r)];for(var f=2&a&&o;"object"==typeof f&&!~e.indexOf(f);f=r(f))Object.getOwnPropertyNames(f).forEach(e=>u[e]=()=>o[e]);return u.default=()=>o,t.d(n,u),n}})(),t.d=(e,r)=>{for(var o in r)t.o(r,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:r[o]})},t.f={},t.e=e=>Promise.all(Object.keys(t.f).reduce((r,o)=>(t.f[o](e,r),r),[])),t.u=e=>""+e+".js",t.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.X=(e,r,o)=>{var a=r;o||(r=e,o=()=>t(t.s=a)),r.map(t.e,t);var n=o();return void 0===n?e:n},(()=>{var e={6658:1},r=r=>{var o=r.modules,a=r.ids,n=r.runtime;for(var u in o)t.o(o,u)&&(t.m[u]=o[u]);n&&n(t);for(var f=0;f{e[o]||(6658!=o?r(require("./chunks/"+t.u(o))):e[o]=1)},module.exports=t,t.C=r})()})(); \ No newline at end of file diff --git a/frontend/.next/static/Y8ulW7r0fa9CblbTYDPPF/_buildManifest.js b/frontend/.next/static/Y8ulW7r0fa9CblbTYDPPF/_buildManifest.js new file mode 100644 index 0000000..1b732be --- /dev/null +++ b/frontend/.next/static/Y8ulW7r0fa9CblbTYDPPF/_buildManifest.js @@ -0,0 +1 @@ +self.__BUILD_MANIFEST={__rewrites:{afterFiles:[],beforeFiles:[],fallback:[]},"/_error":["static/chunks/pages/_error-cf5ca766ac8f493f.js"],sortedPages:["/_app","/_error"]},self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB(); \ No newline at end of file diff --git a/frontend/.next/static/Y8ulW7r0fa9CblbTYDPPF/_ssgManifest.js b/frontend/.next/static/Y8ulW7r0fa9CblbTYDPPF/_ssgManifest.js new file mode 100644 index 0000000..0511aa8 --- /dev/null +++ b/frontend/.next/static/Y8ulW7r0fa9CblbTYDPPF/_ssgManifest.js @@ -0,0 +1 @@ +self.__SSG_MANIFEST=new Set,self.__SSG_MANIFEST_CB&&self.__SSG_MANIFEST_CB(); \ No newline at end of file diff --git a/frontend/.next/static/chunks/1078.156b2c5a8f45f240.js b/frontend/.next/static/chunks/1078.156b2c5a8f45f240.js new file mode 100644 index 0000000..c7b4c41 --- /dev/null +++ b/frontend/.next/static/chunks/1078.156b2c5a8f45f240.js @@ -0,0 +1,14 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1078],{21078:function(t,e,a){a.r(e),a.d(e,{PhFunnelSimple:function(){return H}}),a(31498);var r=a(38157),i=a(48567),h=a(54910),o=a(69709),s=a(78313),l=Object.defineProperty,p=Object.getOwnPropertyDescriptor,n=(t,e,a,r)=>{for(var i,h=r>1?void 0:r?p(e,a):e,o=t.length-1;o>=0;o--)(i=t[o])&&(h=(r?i(e,a,h):i(h))||h);return r&&h&&l(e,a,h),h};let H=class extends i.oi{constructor(){super(...arguments),this.size="1em",this.weight="regular",this.color="currentColor",this.mirrored=!1}render(){var t;return(0,r.dy)` + ${H.weightsMap.get(null!=(t=this.weight)?t:"regular")} + `}};H.weightsMap=new Map([["thin",(0,r.YP)``],["light",(0,r.YP)``],["regular",(0,r.YP)``],["bold",(0,r.YP)``],["fill",(0,r.YP)``],["duotone",(0,r.YP)``]]),H.styles=(0,s.iv)` + :host { + display: contents; + } + `,n([(0,o.C)({type:String,reflect:!0})],H.prototype,"size",2),n([(0,o.C)({type:String,reflect:!0})],H.prototype,"weight",2),n([(0,o.C)({type:String,reflect:!0})],H.prototype,"color",2),n([(0,o.C)({type:Boolean,reflect:!0})],H.prototype,"mirrored",2),H=n([(0,h.M)("ph-funnel-simple")],H)}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/1086.835f6d3c18c91f75.js b/frontend/.next/static/chunks/1086.835f6d3c18c91f75.js new file mode 100644 index 0000000..087794e --- /dev/null +++ b/frontend/.next/static/chunks/1086.835f6d3c18c91f75.js @@ -0,0 +1,14 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1086],{71086:function(t,e,r){r.r(e),r.d(e,{PhInfo:function(){return Z}}),r(31498);var a=r(38157),i=r(48567),o=r(54910),s=r(69709),h=r(78313),p=Object.defineProperty,l=Object.getOwnPropertyDescriptor,n=(t,e,r,a)=>{for(var i,o=a>1?void 0:a?l(e,r):e,s=t.length-1;s>=0;s--)(i=t[s])&&(o=(a?i(e,r,o):i(o))||o);return a&&o&&p(e,r,o),o};let Z=class extends i.oi{constructor(){super(...arguments),this.size="1em",this.weight="regular",this.color="currentColor",this.mirrored=!1}render(){var t;return(0,a.dy)` + ${Z.weightsMap.get(null!=(t=this.weight)?t:"regular")} + `}};Z.weightsMap=new Map([["thin",(0,a.YP)``],["light",(0,a.YP)``],["regular",(0,a.YP)``],["bold",(0,a.YP)``],["fill",(0,a.YP)``],["duotone",(0,a.YP)``]]),Z.styles=(0,h.iv)` + :host { + display: contents; + } + `,n([(0,s.C)({type:String,reflect:!0})],Z.prototype,"size",2),n([(0,s.C)({type:String,reflect:!0})],Z.prototype,"weight",2),n([(0,s.C)({type:String,reflect:!0})],Z.prototype,"color",2),n([(0,s.C)({type:Boolean,reflect:!0})],Z.prototype,"mirrored",2),Z=n([(0,o.M)("ph-info")],Z)}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/1222.cd19409b55e4761d.js b/frontend/.next/static/chunks/1222.cd19409b55e4761d.js new file mode 100644 index 0000000..ad0b4a7 --- /dev/null +++ b/frontend/.next/static/chunks/1222.cd19409b55e4761d.js @@ -0,0 +1,14 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1222],{61222:function(t,e,r){r.r(e),r.d(e,{PhArrowDown:function(){return c}}),r(31498);var l=r(38157),a=r(48567),o=r(54910),i=r(69709),s=r(78313),h=Object.defineProperty,p=Object.getOwnPropertyDescriptor,n=(t,e,r,l)=>{for(var a,o=l>1?void 0:l?p(e,r):e,i=t.length-1;i>=0;i--)(a=t[i])&&(o=(l?a(e,r,o):a(o))||o);return l&&o&&h(e,r,o),o};let c=class extends a.oi{constructor(){super(...arguments),this.size="1em",this.weight="regular",this.color="currentColor",this.mirrored=!1}render(){var t;return(0,l.dy)` + ${c.weightsMap.get(null!=(t=this.weight)?t:"regular")} + `}};c.weightsMap=new Map([["thin",(0,l.YP)``],["light",(0,l.YP)``],["regular",(0,l.YP)``],["bold",(0,l.YP)``],["fill",(0,l.YP)``],["duotone",(0,l.YP)``]]),c.styles=(0,s.iv)` + :host { + display: contents; + } + `,n([(0,i.C)({type:String,reflect:!0})],c.prototype,"size",2),n([(0,i.C)({type:String,reflect:!0})],c.prototype,"weight",2),n([(0,i.C)({type:String,reflect:!0})],c.prototype,"color",2),n([(0,i.C)({type:Boolean,reflect:!0})],c.prototype,"mirrored",2),c=n([(0,o.M)("ph-arrow-down")],c)}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/1272.1e155f7760fa53cc.js b/frontend/.next/static/chunks/1272.1e155f7760fa53cc.js new file mode 100644 index 0000000..f02a416 --- /dev/null +++ b/frontend/.next/static/chunks/1272.1e155f7760fa53cc.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1272],{41272:function(e,o,t){t.d(o,{nY:function(){return h}});var n=t(69887),a=t(55543),r=t(23614),s=t(44649),i=t(4786),c=t(98388),l=t(43291),u=t(59712),d=t(53357),k=t(87280);let T={getGasPriceInEther:(e,o)=>Number(o*e)/1e18,getGasPriceInUSD(e,o,t){let n=T.getGasPriceInEther(o,t);return r.C.bigNumber(e).times(n).toNumber()},getPriceImpact({sourceTokenAmount:e,sourceTokenPriceInUSD:o,toTokenPriceInUSD:t,toTokenAmount:n}){let a=r.C.bigNumber(e).times(o),s=r.C.bigNumber(n).times(t);return a.minus(s).div(a).times(100).toNumber()},getMaxSlippage(e,o){let t=r.C.bigNumber(e).div(100);return r.C.multiply(o,t).toNumber()},getProviderFee:(e,o=.0085)=>r.C.bigNumber(e).times(o).toString(),isInsufficientNetworkTokenForGas:(e,o)=>!!r.C.bigNumber(e).eq(0)||r.C.bigNumber(r.C.bigNumber(o||"0")).gt(e),isInsufficientSourceTokenForSwap(e,o,t){let n=t?.find(e=>e.address===o)?.quantity?.numeric;return r.C.bigNumber(n||"0").lt(e)}};var m=t(59388),g=t(72723),p=t(61704),w=t(6943),A=t(64369),S=t(35652),P=t(31929),C=t(86777),v=t(66909);let b={initializing:!1,initialized:!1,loadingPrices:!1,loadingQuote:!1,loadingApprovalTransaction:!1,loadingBuildTransaction:!1,loadingTransaction:!1,switchingTokens:!1,fetchError:!1,approvalTransaction:void 0,swapTransaction:void 0,transactionError:void 0,sourceToken:void 0,sourceTokenAmount:"",sourceTokenPriceInUSD:0,toToken:void 0,toTokenAmount:"",toTokenPriceInUSD:0,networkPrice:"0",networkBalanceInUSD:"0",networkTokenSymbol:"",inputError:void 0,slippage:u.bq.CONVERT_SLIPPAGE_TOLERANCE,tokens:void 0,popularTokens:void 0,suggestedTokens:void 0,foundTokens:void 0,myTokensWithBalance:void 0,tokensPriceMap:{},gasFee:"0",gasPriceInUSD:0,priceImpact:void 0,maxSlippage:void 0,providerFee:void 0},y=(0,n.sj)({...b}),f={state:y,subscribe:e=>(0,n.Ld)(y,()=>e(y)),subscribeKey:(e,o)=>(0,a.VW)(y,e,o),getParams(){let e=w.R.state.activeChain,o=w.R.getAccountData(e)?.caipAddress??w.R.state.activeCaipAddress,t=d.j.getPlainAddress(o),n=(0,l.EO)(),a=S.ConnectorController.getConnectorId(w.R.state.activeChain);if(!t)throw Error("No address found to swap the tokens from.");let i=!y.toToken?.address||!y.toToken?.decimals,c=!y.sourceToken?.address||!y.sourceToken?.decimals||!r.C.bigNumber(y.sourceTokenAmount).gt(0),u=!y.sourceTokenAmount;return{networkAddress:n,fromAddress:t,fromCaipAddress:o,sourceTokenAddress:y.sourceToken?.address,toTokenAddress:y.toToken?.address,toTokenAmount:y.toTokenAmount,toTokenDecimals:y.toToken?.decimals,sourceTokenAmount:y.sourceTokenAmount,sourceTokenDecimals:y.sourceToken?.decimals,invalidToToken:i,invalidSourceToken:c,invalidSourceTokenAmount:u,availableToSwap:o&&!i&&!c&&!u,isAuthConnector:a===s.b.CONNECTOR_ID.AUTH}},async setSourceToken(e){if(!e){y.sourceToken=e,y.sourceTokenAmount="",y.sourceTokenPriceInUSD=0;return}y.sourceToken=e,await h.setTokenPrice(e.address,"sourceToken")},setSourceTokenAmount(e){y.sourceTokenAmount=e},async setToToken(e){if(!e){y.toToken=e,y.toTokenAmount="",y.toTokenPriceInUSD=0;return}y.toToken=e,await h.setTokenPrice(e.address,"toToken")},setToTokenAmount(e){y.toTokenAmount=e?r.C.toFixed(e,6):""},async setTokenPrice(e,o){let t=y.tokensPriceMap[e]||0;t||(y.loadingPrices=!0,t=await h.getAddressPrice(e)),"sourceToken"===o?y.sourceTokenPriceInUSD=t:"toToken"===o&&(y.toTokenPriceInUSD=t),y.loadingPrices&&(y.loadingPrices=!1),h.getParams().availableToSwap&&!y.switchingTokens&&h.swapTokens()},async switchTokens(){if(!y.initializing&&y.initialized&&!y.switchingTokens){y.switchingTokens=!0;try{let e=y.toToken?{...y.toToken}:void 0,o=y.sourceToken?{...y.sourceToken}:void 0,t=e&&""===y.toTokenAmount?"1":y.toTokenAmount;h.setSourceTokenAmount(t),h.setToTokenAmount(""),await h.setSourceToken(e),await h.setToToken(o),y.switchingTokens=!1,h.swapTokens()}catch(e){throw y.switchingTokens=!1,e}}},resetState(){y.myTokensWithBalance=b.myTokensWithBalance,y.tokensPriceMap=b.tokensPriceMap,y.initialized=b.initialized,y.initializing=b.initializing,y.switchingTokens=b.switchingTokens,y.sourceToken=b.sourceToken,y.sourceTokenAmount=b.sourceTokenAmount,y.sourceTokenPriceInUSD=b.sourceTokenPriceInUSD,y.toToken=b.toToken,y.toTokenAmount=b.toTokenAmount,y.toTokenPriceInUSD=b.toTokenPriceInUSD,y.networkPrice=b.networkPrice,y.networkTokenSymbol=b.networkTokenSymbol,y.networkBalanceInUSD=b.networkBalanceInUSD,y.inputError=b.inputError},resetValues(){let{networkAddress:e}=h.getParams(),o=y.tokens?.find(o=>o.address===e);h.setSourceToken(o),h.setToToken(void 0)},getApprovalLoadingState:()=>y.loadingApprovalTransaction,clearError(){y.transactionError=void 0},async initializeState(){if(!y.initializing){if(y.initializing=!0,!y.initialized)try{await h.fetchTokens(),y.initialized=!0}catch(e){y.initialized=!1,v.SnackController.showError("Failed to initialize swap"),C.RouterController.goBack()}y.initializing=!1}},async fetchTokens(){let{networkAddress:e}=h.getParams();await h.getNetworkTokenPrice(),await h.getMyTokensWithBalance();let o=y.myTokensWithBalance?.find(o=>o.address===e);o&&(y.networkTokenSymbol=o.symbol,h.setSourceToken(o),h.setSourceTokenAmount("0"))},async getTokenList(){let e=w.R.state.activeCaipNetwork?.caipNetworkId;if(y.caipNetworkId!==e||!y.tokens)try{y.tokensLoading=!0;let o=await k.n.getTokenList(e);y.tokens=o,y.caipNetworkId=e,y.popularTokens=o.sort((e,o)=>e.symbolo.symbol?1:0);let t=(e&&u.bq.SUGGESTED_TOKENS_BY_CHAIN?.[e]||[]).map(e=>o.find(o=>o.symbol===e)).filter(e=>!!e),n=(u.bq.SWAP_SUGGESTED_TOKENS||[]).map(e=>o.find(o=>o.symbol===e)).filter(e=>!!e).filter(e=>!t.some(o=>o.address===e.address));y.suggestedTokens=[...t,...n]}catch(e){y.tokens=[],y.popularTokens=[],y.suggestedTokens=[]}finally{y.tokensLoading=!1}},async getAddressPrice(e){let o=y.tokensPriceMap[e];if(o)return o;let t=await p.L.fetchTokenPrice({addresses:[e]}),n=t?.fungibles||[],a=[...y.tokens||[],...y.myTokensWithBalance||[]],r=a?.find(o=>o.address===e)?.symbol,s=parseFloat((n.find(e=>e.symbol.toLowerCase()===r?.toLowerCase())?.price||0).toString());return y.tokensPriceMap[e]=s,s},async getNetworkTokenPrice(){let{networkAddress:e}=h.getParams(),o=await p.L.fetchTokenPrice({addresses:[e]}).catch(()=>(v.SnackController.showError("Failed to fetch network token price"),{fungibles:[]})),t=o.fungibles?.[0],n=t?.price.toString()||"0";y.tokensPriceMap[e]=parseFloat(n),y.networkTokenSymbol=t?.symbol||"",y.networkPrice=n},async getMyTokensWithBalance(e){let o=await c.Q.getMyTokensWithBalance(e),t=k.n.mapBalancesToSwapTokens(o);t&&(await h.getInitialGasPrice(),h.setBalances(t))},setBalances(e){let{networkAddress:o}=h.getParams(),t=w.R.state.activeCaipNetwork;if(!t)return;let n=e.find(e=>e.address===o);e.forEach(e=>{y.tokensPriceMap[e.address]=e.price||0}),y.myTokensWithBalance=e.filter(e=>e.address.startsWith(t.caipNetworkId)),y.networkBalanceInUSD=n?r.C.multiply(n.quantity.numeric,n.price).toString():"0"},async getInitialGasPrice(){let e=await k.n.fetchGasPrice();if(!e)return{gasPrice:null,gasPriceInUSD:null};switch(w.R.state?.activeCaipNetwork?.chainNamespace){case s.b.CHAIN.SOLANA:return y.gasFee=e.standard??"0",y.gasPriceInUSD=r.C.multiply(e.standard,y.networkPrice).div(1e9).toNumber(),{gasPrice:BigInt(y.gasFee),gasPriceInUSD:Number(y.gasPriceInUSD)};case s.b.CHAIN.EVM:default:let o=e.standard??"0",t=BigInt(o),n=BigInt(15e4),a=T.getGasPriceInUSD(y.networkPrice,n,t);return y.gasFee=o,y.gasPriceInUSD=a,{gasPrice:t,gasPriceInUSD:a}}},async swapTokens(){let e=w.R.getAccountData()?.address,o=y.sourceToken,t=y.toToken,n=r.C.bigNumber(y.sourceTokenAmount).gt(0);if(n||h.setToTokenAmount(""),!t||!o||y.loadingPrices||!n||!e)return;y.loadingQuote=!0;let a=r.C.bigNumber(y.sourceTokenAmount).times(10**o.decimals).round(0);try{let n=await p.L.fetchSwapQuote({userAddress:e,from:o.address,to:t.address,gasPrice:y.gasFee,amount:a.toString()});y.loadingQuote=!1;let s=n?.quotes?.[0]?.toAmount;if(!s){g.AlertController.open({displayMessage:"Incorrect amount",debugMessage:"Please enter a valid amount"},"error");return}let i=r.C.bigNumber(s).div(10**t.decimals).toString();h.setToTokenAmount(i),h.hasInsufficientToken(y.sourceTokenAmount,o.address)?y.inputError="Insufficient balance":(y.inputError=void 0,h.setTransactionDetails())}catch(o){let e=await k.n.handleSwapError(o);y.loadingQuote=!1,y.inputError=e||"Insufficient balance"}},async getTransaction(){let{fromCaipAddress:e,availableToSwap:o}=h.getParams(),t=y.sourceToken,n=y.toToken;if(e&&o&&t&&n&&!y.loadingQuote)try{let o;return y.loadingBuildTransaction=!0,o=await k.n.fetchSwapAllowance({userAddress:e,tokenAddress:t.address,sourceTokenAmount:y.sourceTokenAmount,sourceTokenDecimals:t.decimals})?await h.createSwapTransaction():await h.createAllowanceTransaction(),y.loadingBuildTransaction=!1,y.fetchError=!1,o}catch(e){C.RouterController.goBack(),v.SnackController.showError("Failed to check allowance"),y.loadingBuildTransaction=!1,y.approvalTransaction=void 0,y.swapTransaction=void 0,y.fetchError=!0;return}},async createAllowanceTransaction(){let{fromCaipAddress:e,sourceTokenAddress:o,toTokenAddress:t}=h.getParams();if(e&&t){if(!o)throw Error("createAllowanceTransaction - No source token address found.");try{let n=await p.L.generateApproveCalldata({from:o,to:t,userAddress:e}),a=d.j.getPlainAddress(n.tx.from);if(!a)throw Error("SwapController:createAllowanceTransaction - address is required");let r={data:n.tx.data,to:a,gasPrice:BigInt(n.tx.eip155.gasPrice),value:BigInt(n.tx.value),toAmount:y.toTokenAmount};return y.swapTransaction=void 0,y.approvalTransaction={data:r.data,to:r.to,gasPrice:r.gasPrice,value:r.value,toAmount:r.toAmount},{data:r.data,to:r.to,gasPrice:r.gasPrice,value:r.value,toAmount:r.toAmount}}catch(e){C.RouterController.goBack(),v.SnackController.showError("Failed to create approval transaction"),y.approvalTransaction=void 0,y.swapTransaction=void 0,y.fetchError=!0;return}}},async createSwapTransaction(){let{networkAddress:e,fromCaipAddress:o,sourceTokenAmount:t}=h.getParams(),n=y.sourceToken,a=y.toToken;if(!o||!t||!n||!a)return;let r=A.ConnectionController.parseUnits(t,n.decimals)?.toString();try{let t=await p.L.generateSwapCalldata({userAddress:o,from:n.address,to:a.address,amount:r,disableEstimate:!0}),s=n.address===e,i=BigInt(t.tx.eip155.gas),c=BigInt(t.tx.eip155.gasPrice),l=d.j.getPlainAddress(t.tx.to);if(!l)throw Error("SwapController:createSwapTransaction - address is required");let u={data:t.tx.data,to:l,gas:i,gasPrice:c,value:s?BigInt(r??"0"):BigInt("0"),toAmount:y.toTokenAmount};return y.gasPriceInUSD=T.getGasPriceInUSD(y.networkPrice,i,c),y.approvalTransaction=void 0,y.swapTransaction=u,u}catch(e){C.RouterController.goBack(),v.SnackController.showError("Failed to create transaction"),y.approvalTransaction=void 0,y.swapTransaction=void 0,y.fetchError=!0;return}},onEmbeddedWalletApprovalSuccess(){v.SnackController.showLoading("Approve limit increase in your wallet"),C.RouterController.replace("SwapPreview")},async sendTransactionForApproval(e){let{fromAddress:o,isAuthConnector:t}=h.getParams();y.loadingApprovalTransaction=!0,t?C.RouterController.pushTransactionStack({onSuccess:h.onEmbeddedWalletApprovalSuccess}):v.SnackController.showLoading("Approve limit increase in your wallet");try{await A.ConnectionController.sendTransaction({address:o,to:e.to,data:e.data,value:e.value,chainNamespace:s.b.CHAIN.EVM}),await h.swapTokens(),await h.getTransaction(),y.approvalTransaction=void 0,y.loadingApprovalTransaction=!1}catch(e){y.transactionError=e?.displayMessage,y.loadingApprovalTransaction=!1,v.SnackController.showError(e?.displayMessage||"Transaction error"),P.X.sendEvent({type:"track",event:"SWAP_APPROVAL_ERROR",properties:{message:e?.displayMessage||e?.message||"Unknown",network:w.R.state.activeCaipNetwork?.caipNetworkId||"",swapFromToken:h.state.sourceToken?.symbol||"",swapToToken:h.state.toToken?.symbol||"",swapFromAmount:h.state.sourceTokenAmount||"",swapToAmount:h.state.toTokenAmount||"",isSmartAccount:(0,l.r9)(s.b.CHAIN.EVM)===i.y_.ACCOUNT_TYPES.SMART_ACCOUNT}})}},async sendTransactionForSwap(e){if(!e)return;let{fromAddress:o,toTokenAmount:t,isAuthConnector:n}=h.getParams();y.loadingTransaction=!0;let a=`Swapping ${y.sourceToken?.symbol} to ${r.C.formatNumberToLocalString(t,3)} ${y.toToken?.symbol}`,c=`Swapped ${y.sourceToken?.symbol} to ${r.C.formatNumberToLocalString(t,3)} ${y.toToken?.symbol}`;n?C.RouterController.pushTransactionStack({onSuccess(){C.RouterController.replace("Account"),v.SnackController.showLoading(a),f.resetState()}}):v.SnackController.showLoading("Confirm transaction in your wallet");try{let t=[y.sourceToken?.address,y.toToken?.address].join(","),a=await A.ConnectionController.sendTransaction({address:o,to:e.to,data:e.data,value:e.value,chainNamespace:s.b.CHAIN.EVM});return y.loadingTransaction=!1,v.SnackController.showSuccess(c),P.X.sendEvent({type:"track",event:"SWAP_SUCCESS",properties:{network:w.R.state.activeCaipNetwork?.caipNetworkId||"",swapFromToken:h.state.sourceToken?.symbol||"",swapToToken:h.state.toToken?.symbol||"",swapFromAmount:h.state.sourceTokenAmount||"",swapToAmount:h.state.toTokenAmount||"",isSmartAccount:(0,l.r9)(s.b.CHAIN.EVM)===i.y_.ACCOUNT_TYPES.SMART_ACCOUNT}}),f.resetState(),n||C.RouterController.replace("Account"),f.getMyTokensWithBalance(t),a}catch(e){y.transactionError=e?.displayMessage,y.loadingTransaction=!1,v.SnackController.showError(e?.displayMessage||"Transaction error"),P.X.sendEvent({type:"track",event:"SWAP_ERROR",properties:{message:e?.displayMessage||e?.message||"Unknown",network:w.R.state.activeCaipNetwork?.caipNetworkId||"",swapFromToken:h.state.sourceToken?.symbol||"",swapToToken:h.state.toToken?.symbol||"",swapFromAmount:h.state.sourceTokenAmount||"",swapToAmount:h.state.toTokenAmount||"",isSmartAccount:(0,l.r9)(s.b.CHAIN.EVM)===i.y_.ACCOUNT_TYPES.SMART_ACCOUNT}});return}},hasInsufficientToken:(e,o)=>T.isInsufficientSourceTokenForSwap(e,o,y.myTokensWithBalance),setTransactionDetails(){let{toTokenAddress:e,toTokenDecimals:o}=h.getParams();e&&o&&(y.gasPriceInUSD=T.getGasPriceInUSD(y.networkPrice,BigInt(y.gasFee),BigInt(15e4)),y.priceImpact=T.getPriceImpact({sourceTokenAmount:y.sourceTokenAmount,sourceTokenPriceInUSD:y.sourceTokenPriceInUSD,toTokenPriceInUSD:y.toTokenPriceInUSD,toTokenAmount:y.toTokenAmount}),y.maxSlippage=T.getMaxSlippage(y.slippage,y.toTokenAmount),y.providerFee=T.getProviderFee(y.sourceTokenAmount))}},h=(0,m.P)(f)}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/1288-b48041f8c84b424c.js b/frontend/.next/static/chunks/1288-b48041f8c84b424c.js new file mode 100644 index 0000000..b2e52b4 --- /dev/null +++ b/frontend/.next/static/chunks/1288-b48041f8c84b424c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1288],{30166:function(e,t,n){n.d(t,{default:function(){return o.a}});var r=n(55775),o=n.n(r)},27648:function(e,t,n){n.d(t,{default:function(){return o.a}});var r=n(72972),o=n.n(r)},55449:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addLocale",{enumerable:!0,get:function(){return r}}),n(33068);let r=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;ra?e.prefetch(t,o):e.prefetch(t,n,r))().catch(e=>{})}}function R(e){return"string"==typeof e?e:(0,l.formatUrl)(e)}let y=a.default.forwardRef(function(e,t){let n,r;let{href:l,as:m,children:y,prefetch:b=null,passHref:P,replace:S,shallow:O,scroll:v,locale:A,onClick:T,onMouseEnter:N,onTouchStart:I,legacyBehavior:x=!1,...C}=e;n=y,x&&("string"==typeof n||"number"==typeof n)&&(n=(0,o.jsx)("a",{children:n}));let j=a.default.useContext(f.RouterContext),M=a.default.useContext(d.AppRouterContext),w=null!=j?j:M,L=!j,D=!1!==b,U=null===b?g.PrefetchKind.AUTO:g.PrefetchKind.FULL,{href:k,as:F}=a.default.useMemo(()=>{if(!j){let e=R(l);return{href:e,as:m?R(m):e}}let[e,t]=(0,i.resolveHref)(j,l,!0);return{href:e,as:m?(0,i.resolveHref)(j,m):t||e}},[j,l,m]),X=a.default.useRef(k),W=a.default.useRef(F);x&&(r=a.default.Children.only(n));let G=x?r&&"object"==typeof r&&r.ref:t,[H,B,Y]=(0,p.useIntersection)({rootMargin:"200px"}),K=a.default.useCallback(e=>{(W.current!==F||X.current!==k)&&(Y(),W.current=F,X.current=k),H(e),G&&("function"==typeof G?G(e):"object"==typeof G&&(G.current=e))},[F,G,k,Y,H]);a.default.useEffect(()=>{w&&B&&D&&E(w,k,F,{locale:A},{kind:U},L)},[F,k,B,A,D,null==j?void 0:j.locale,w,L,U]);let V={ref:K,onClick(e){x||"function"!=typeof T||T(e),x&&r.props&&"function"==typeof r.props.onClick&&r.props.onClick(e),w&&!e.defaultPrevented&&function(e,t,n,r,o,i,l,s,c){let{nodeName:f}=e.currentTarget;if("A"===f.toUpperCase()&&(function(e){let t=e.currentTarget.getAttribute("target");return t&&"_self"!==t||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.nativeEvent&&2===e.nativeEvent.which}(e)||!c&&!(0,u.isLocalURL)(n)))return;e.preventDefault();let d=()=>{let e=null==l||l;"beforePopState"in t?t[o?"replace":"push"](n,r,{shallow:i,locale:s,scroll:e}):t[o?"replace":"push"](r||n,{scroll:e})};c?a.default.startTransition(d):d()}(e,w,k,F,S,O,v,A,L)},onMouseEnter(e){x||"function"!=typeof N||N(e),x&&r.props&&"function"==typeof r.props.onMouseEnter&&r.props.onMouseEnter(e),w&&(D||!L)&&E(w,k,F,{locale:A,priority:!0,bypassPrefetchedCheck:!0},{kind:U},L)},onTouchStart:function(e){x||"function"!=typeof I||I(e),x&&r.props&&"function"==typeof r.props.onTouchStart&&r.props.onTouchStart(e),w&&(D||!L)&&E(w,k,F,{locale:A,priority:!0,bypassPrefetchedCheck:!0},{kind:U},L)}};if((0,s.isAbsoluteUrl)(F))V.href=F;else if(!x||P||"a"===r.type&&!("href"in r.props)){let e=void 0!==A?A:null==j?void 0:j.locale,t=(null==j?void 0:j.isLocaleDomain)&&(0,h.getDomainLocale)(F,e,null==j?void 0:j.locales,null==j?void 0:j.domainLocales);V.href=t||(0,_.addBasePath)((0,c.addLocale)(F,e,null==j?void 0:j.defaultLocale))}return x?a.default.cloneElement(r,V):(0,o.jsx)("a",{...C,...V,children:n})});("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},63515:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{cancelIdleCallback:function(){return r},requestIdleCallback:function(){return n}});let n="undefined"!=typeof self&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(e){let t=Date.now();return self.setTimeout(function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})},1)},r="undefined"!=typeof self&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(e){return clearTimeout(e)};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},25246:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"resolveHref",{enumerable:!0,get:function(){return f}});let r=n(48637),o=n(57497),a=n(17053),i=n(3987),u=n(33068),l=n(53552),s=n(86279),c=n(37205);function f(e,t,n){let f;let d="string"==typeof t?t:(0,o.formatWithValidation)(t),p=d.match(/^[a-zA-Z]{1,}:\/\//),h=p?d.slice(p[0].length):d;if((h.split("?",1)[0]||"").match(/(\/\/|\\)/)){console.error("Invalid href '"+d+"' passed to next/router in page: '"+e.pathname+"'. Repeated forward-slashes (//) or backslashes \\ are not valid in the href.");let t=(0,i.normalizeRepeatedSlashes)(h);d=(p?p[0]:"")+t}if(!(0,l.isLocalURL)(d))return n?[d]:d;try{f=new URL(d.startsWith("#")?e.asPath:e.pathname,"http://n")}catch(e){f=new URL("/","http://n")}try{let e=new URL(d,f);e.pathname=(0,u.normalizePathTrailingSlash)(e.pathname);let t="";if((0,s.isDynamicRoute)(e.pathname)&&e.searchParams&&n){let n=(0,r.searchParamsToUrlQuery)(e.searchParams),{result:i,params:u}=(0,c.interpolateAs)(e.pathname,e.pathname,n);i&&(t=(0,o.formatWithValidation)({pathname:i,hash:e.hash,query:(0,a.omit)(n,u)}))}let i=e.origin===f.origin?e.href.slice(e.origin.length):e.href;return n?[i,t||i]:i}catch(e){return n?[d]:d}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},16081:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useIntersection",{enumerable:!0,get:function(){return l}});let r=n(2265),o=n(63515),a="function"==typeof IntersectionObserver,i=new Map,u=[];function l(e){let{rootRef:t,rootMargin:n,disabled:l}=e,s=l||!a,[c,f]=(0,r.useState)(!1),d=(0,r.useRef)(null),p=(0,r.useCallback)(e=>{d.current=e},[]);return(0,r.useEffect)(()=>{if(a){if(s||c)return;let e=d.current;if(e&&e.tagName)return function(e,t,n){let{id:r,observer:o,elements:a}=function(e){let t;let n={root:e.root||null,margin:e.rootMargin||""},r=u.find(e=>e.root===n.root&&e.margin===n.margin);if(r&&(t=i.get(r)))return t;let o=new Map;return t={id:n,observer:new IntersectionObserver(e=>{e.forEach(e=>{let t=o.get(e.target),n=e.isIntersecting||e.intersectionRatio>0;t&&n&&t(n)})},e),elements:o},u.push(n),i.set(n,t),t}(n);return a.set(e,t),o.observe(e),function(){if(a.delete(e),o.unobserve(e),0===a.size){o.disconnect(),i.delete(r);let e=u.findIndex(e=>e.root===r.root&&e.margin===r.margin);e>-1&&u.splice(e,1)}}}(e,e=>e&&f(e),{root:null==t?void 0:t.current,rootMargin:n})}else if(!c){let e=(0,o.requestIdleCallback)(()=>f(!0));return()=>(0,o.cancelIdleCallback)(e)}},[s,n,t,c,d.current]),[p,c,(0,r.useCallback)(()=>{f(!1)},[])]}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},19259:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{ACTION_SUFFIX:function(){return l},APP_DIR_ALIAS:function(){return T},CACHE_ONE_YEAR:function(){return y},DOT_NEXT_ALIAS:function(){return v},ESLINT_DEFAULT_DIRS:function(){return Y},GSP_NO_RETURNED_VALUE:function(){return F},GSSP_COMPONENT_MEMBER_ERROR:function(){return G},GSSP_NO_RETURNED_VALUE:function(){return X},INSTRUMENTATION_HOOK_FILENAME:function(){return S},MIDDLEWARE_FILENAME:function(){return b},MIDDLEWARE_LOCATION_REGEXP:function(){return P},NEXT_BODY_SUFFIX:function(){return f},NEXT_CACHE_IMPLICIT_TAG_ID:function(){return R},NEXT_CACHE_REVALIDATED_TAGS_HEADER:function(){return h},NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER:function(){return _},NEXT_CACHE_SOFT_TAGS_HEADER:function(){return p},NEXT_CACHE_SOFT_TAG_MAX_LENGTH:function(){return E},NEXT_CACHE_TAGS_HEADER:function(){return d},NEXT_CACHE_TAG_MAX_ITEMS:function(){return g},NEXT_CACHE_TAG_MAX_LENGTH:function(){return m},NEXT_DATA_SUFFIX:function(){return s},NEXT_INTERCEPTION_MARKER_PREFIX:function(){return r},NEXT_META_SUFFIX:function(){return c},NEXT_QUERY_PARAM_PREFIX:function(){return n},NON_STANDARD_NODE_ENV:function(){return H},PAGES_DIR_ALIAS:function(){return O},PRERENDER_REVALIDATE_HEADER:function(){return o},PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER:function(){return a},PUBLIC_DIR_MIDDLEWARE_CONFLICT:function(){return M},ROOT_DIR_ALIAS:function(){return A},RSC_ACTION_CLIENT_WRAPPER_ALIAS:function(){return j},RSC_ACTION_ENCRYPTION_ALIAS:function(){return C},RSC_ACTION_PROXY_ALIAS:function(){return x},RSC_ACTION_VALIDATE_ALIAS:function(){return I},RSC_MOD_REF_PROXY_ALIAS:function(){return N},RSC_PREFETCH_SUFFIX:function(){return i},RSC_SUFFIX:function(){return u},SERVER_PROPS_EXPORT_ERROR:function(){return k},SERVER_PROPS_GET_INIT_PROPS_CONFLICT:function(){return L},SERVER_PROPS_SSG_CONFLICT:function(){return D},SERVER_RUNTIME:function(){return K},SSG_FALLBACK_EXPORT_ERROR:function(){return B},SSG_GET_INITIAL_PROPS_CONFLICT:function(){return w},STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR:function(){return U},UNSTABLE_REVALIDATE_RENAME_ERROR:function(){return W},WEBPACK_LAYERS:function(){return z},WEBPACK_RESOURCE_QUERIES:function(){return q}});let n="nxtP",r="nxtI",o="x-prerender-revalidate",a="x-prerender-revalidate-if-generated",i=".prefetch.rsc",u=".rsc",l=".action",s=".json",c=".meta",f=".body",d="x-next-cache-tags",p="x-next-cache-soft-tags",h="x-next-revalidated-tags",_="x-next-revalidate-tag-token",g=128,m=256,E=1024,R="_N_T_",y=31536e3,b="middleware",P=`(?:src/)?${b}`,S="instrumentation",O="private-next-pages",v="private-dot-next",A="private-next-root-dir",T="private-next-app-dir",N="private-next-rsc-mod-ref-proxy",I="private-next-rsc-action-validate",x="private-next-rsc-server-reference",C="private-next-rsc-action-encryption",j="private-next-rsc-action-client-wrapper",M="You can not have a '_next' folder inside of your public folder. This conflicts with the internal '/_next' route. https://nextjs.org/docs/messages/public-next-folder-conflict",w="You can not use getInitialProps with getStaticProps. To use SSG, please remove your getInitialProps",L="You can not use getInitialProps with getServerSideProps. Please remove getInitialProps.",D="You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps",U="can not have getInitialProps/getServerSideProps, https://nextjs.org/docs/messages/404-get-initial-props",k="pages with `getServerSideProps` can not be exported. See more info here: https://nextjs.org/docs/messages/gssp-export",F="Your `getStaticProps` function did not return an object. Did you forget to add a `return`?",X="Your `getServerSideProps` function did not return an object. Did you forget to add a `return`?",W="The `unstable_revalidate` property is available for general use.\nPlease use `revalidate` instead.",G="can not be attached to a page's component and must be exported from the page. See more info here: https://nextjs.org/docs/messages/gssp-component-member",H='You are using a non-standard "NODE_ENV" value in your environment. This creates inconsistencies in the project and is strongly advised against. Read more: https://nextjs.org/docs/messages/non-standard-node-env',B="Pages with `fallback` enabled in `getStaticPaths` can not be exported. See more info here: https://nextjs.org/docs/messages/ssg-fallback-true-export",Y=["app","pages","components","lib","src"],K={edge:"edge",experimentalEdge:"experimental-edge",nodejs:"nodejs"},V={shared:"shared",reactServerComponents:"rsc",serverSideRendering:"ssr",actionBrowser:"action-browser",api:"api",middleware:"middleware",instrument:"instrument",edgeAsset:"edge-asset",appPagesBrowser:"app-pages-browser",appMetadataRoute:"app-metadata-route",appRouteHandler:"app-route-handler"},z={...V,GROUP:{serverOnly:[V.reactServerComponents,V.actionBrowser,V.appMetadataRoute,V.appRouteHandler,V.instrument],clientOnly:[V.serverSideRendering,V.appPagesBrowser],nonClientServerTarget:[V.middleware,V.api],app:[V.reactServerComponents,V.actionBrowser,V.appMetadataRoute,V.appRouteHandler,V.serverSideRendering,V.appPagesBrowser,V.shared,V.instrument]}},q={edgeSSREntry:"__next_edge_ssr_entry__",metadata:"__next_metadata__",metadataRoute:"__next_metadata_route__",metadataImageMeta:"__next_metadata_image_meta__"}},55775:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return a}});let r=n(47043);n(57437),n(2265);let o=r._(n(15602));function a(e,t){var n;let r={loading:e=>{let{error:t,isLoading:n,pastDelay:r}=e;return null}};"function"==typeof e&&(r.loader=e);let a={...r,...t};return(0,o.default)({...a,modules:null==(n=a.loadableGenerated)?void 0:n.modules})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},90042:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"escapeStringRegexp",{enumerable:!0,get:function(){return o}});let n=/[|\\{}()[\]^$+*?.-]/,r=/[|\\{}()[\]^$+*?.-]/g;function o(e){return n.test(e)?e.replace(r,"\\$&"):e}},81523:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BailoutToCSR",{enumerable:!0,get:function(){return o}});let r=n(18993);function o(e){let{reason:t,children:n}=e;if("undefined"==typeof window)throw new r.BailoutToCSRError(t);return n}},15602:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return s}});let r=n(57437),o=n(2265),a=n(81523),i=n(70049);function u(e){return{default:e&&"default"in e?e.default:e}}let l={loader:()=>Promise.resolve(u(()=>null)),loading:null,ssr:!0},s=function(e){let t={...l,...e},n=(0,o.lazy)(()=>t.loader().then(u)),s=t.loading;function c(e){let u=s?(0,r.jsx)(s,{isLoading:!0,pastDelay:!0,error:null}):null,l=t.ssr?(0,r.jsxs)(r.Fragment,{children:["undefined"==typeof window?(0,r.jsx)(i.PreloadCss,{moduleIds:t.modules}):null,(0,r.jsx)(n,{...e})]}):(0,r.jsx)(a.BailoutToCSR,{reason:"next/dynamic",children:(0,r.jsx)(n,{...e})});return(0,r.jsx)(o.Suspense,{fallback:u,children:l})}return c.displayName="LoadableComponent",c}},70049:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"PreloadCss",{enumerable:!0,get:function(){return a}});let r=n(57437),o=n(20544);function a(e){let{moduleIds:t}=e;if("undefined"!=typeof window)return null;let n=(0,o.getExpectedRequestStore)("next/dynamic css"),a=[];if(n.reactLoadableManifest&&t){let e=n.reactLoadableManifest;for(let n of t){if(!e[n])continue;let t=e[n].files.filter(e=>e.endsWith(".css"));a.push(...t)}}return 0===a.length?null:(0,r.jsx)(r.Fragment,{children:a.map(e=>(0,r.jsx)("link",{precedence:"dynamic",rel:"stylesheet",href:n.assetPrefix+"/_next/"+encodeURI(e),as:"style"},e))})}},25523:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"RouterContext",{enumerable:!0,get:function(){return r}});let r=n(47043)._(n(2265)).default.createContext(null)},57497:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{formatUrl:function(){return a},formatWithValidation:function(){return u},urlObjectKeys:function(){return i}});let r=n(53099)._(n(48637)),o=/https?|ftp|gopher|file/;function a(e){let{auth:t,hostname:n}=e,a=e.protocol||"",i=e.pathname||"",u=e.hash||"",l=e.query||"",s=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?s=t+e.host:n&&(s=t+(~n.indexOf(":")?"["+n+"]":n),e.port&&(s+=":"+e.port)),l&&"object"==typeof l&&(l=String(r.urlQueryToSearchParams(l)));let c=e.search||l&&"?"+l||"";return a&&!a.endsWith(":")&&(a+=":"),e.slashes||(!a||o.test(a))&&!1!==s?(s="//"+(s||""),i&&"/"!==i[0]&&(i="/"+i)):s||(s=""),u&&"#"!==u[0]&&(u="#"+u),c&&"?"!==c[0]&&(c="?"+c),""+a+s+(i=i.replace(/[?#]/g,encodeURIComponent))+(c=c.replace("#","%23"))+u}let i=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function u(e){return a(e)}},86279:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{getSortedRoutes:function(){return r.getSortedRoutes},isDynamicRoute:function(){return o.isDynamicRoute}});let r=n(14777),o=n(38104)},37205:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"interpolateAs",{enumerable:!0,get:function(){return a}});let r=n(4199),o=n(9964);function a(e,t,n){let a="",i=(0,o.getRouteRegex)(e),u=i.groups,l=(t!==e?(0,r.getRouteMatcher)(i)(t):"")||n;a=e;let s=Object.keys(u);return s.every(e=>{let t=l[e]||"",{repeat:n,optional:r}=u[e],o="["+(n?"...":"")+e+"]";return r&&(o=(t?"":"/")+"["+o+"]"),n&&!Array.isArray(t)&&(t=[t]),(r||e in l)&&(a=a.replace(o,n?t.map(e=>encodeURIComponent(e)).join("/"):encodeURIComponent(t))||"/")})||(a=""),{params:s,result:a}}},38104:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isDynamicRoute",{enumerable:!0,get:function(){return a}});let r=n(91182),o=/\/\[[^/]+?\](?=\/|$)/;function a(e){return(0,r.isInterceptionRouteAppPath)(e)&&(e=(0,r.extractInterceptionRouteInformation)(e).interceptedRoute),o.test(e)}},53552:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isLocalURL",{enumerable:!0,get:function(){return a}});let r=n(3987),o=n(11283);function a(e){if(!(0,r.isAbsoluteUrl)(e))return!0;try{let t=(0,r.getLocationOrigin)(),n=new URL(e,t);return n.origin===t&&(0,o.hasBasePath)(n.pathname)}catch(e){return!1}}},17053:function(e,t){function n(e,t){let n={};return Object.keys(e).forEach(r=>{t.includes(r)||(n[r]=e[r])}),n}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"omit",{enumerable:!0,get:function(){return n}})},48637:function(e,t){function n(e){let t={};return e.forEach((e,n)=>{void 0===t[n]?t[n]=e:Array.isArray(t[n])?t[n].push(e):t[n]=[t[n],e]}),t}function r(e){return"string"!=typeof e&&("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function o(e){let t=new URLSearchParams;return Object.entries(e).forEach(e=>{let[n,o]=e;Array.isArray(o)?o.forEach(e=>t.append(n,r(e))):t.set(n,r(o))}),t}function a(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r{Array.from(t.keys()).forEach(t=>e.delete(t)),t.forEach((t,n)=>e.append(n,t))}),e}Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{assign:function(){return a},searchParamsToUrlQuery:function(){return n},urlQueryToSearchParams:function(){return o}})},4199:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getRouteMatcher",{enumerable:!0,get:function(){return o}});let r=n(3987);function o(e){let{re:t,groups:n}=e;return e=>{let o=t.exec(e);if(!o)return!1;let a=e=>{try{return decodeURIComponent(e)}catch(e){throw new r.DecodeError("failed to decode param")}},i={};return Object.keys(n).forEach(e=>{let t=n[e],r=o[t.pos];void 0!==r&&(i[e]=~r.indexOf("/")?r.split("/").map(e=>a(e)):t.repeat?[a(r)]:a(r))}),i}}},9964:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{getNamedMiddlewareRegex:function(){return p},getNamedRouteRegex:function(){return d},getRouteRegex:function(){return s},parseParameter:function(){return u}});let r=n(19259),o=n(91182),a=n(90042),i=n(26674);function u(e){let t=e.startsWith("[")&&e.endsWith("]");t&&(e=e.slice(1,-1));let n=e.startsWith("...");return n&&(e=e.slice(3)),{key:e,repeat:n,optional:t}}function l(e){let t=(0,i.removeTrailingSlash)(e).slice(1).split("/"),n={},r=1;return{parameterizedRoute:t.map(e=>{let t=o.INTERCEPTION_ROUTE_MARKERS.find(t=>e.startsWith(t)),i=e.match(/\[((?:\[.*\])|.+)\]/);if(t&&i){let{key:e,optional:o,repeat:l}=u(i[1]);return n[e]={pos:r++,repeat:l,optional:o},"/"+(0,a.escapeStringRegexp)(t)+"([^/]+?)"}if(!i)return"/"+(0,a.escapeStringRegexp)(e);{let{key:e,repeat:t,optional:o}=u(i[1]);return n[e]={pos:r++,repeat:t,optional:o},t?o?"(?:/(.+?))?":"/(.+?)":"/([^/]+?)"}}).join(""),groups:n}}function s(e){let{parameterizedRoute:t,groups:n}=l(e);return{re:RegExp("^"+t+"(?:/)?$"),groups:n}}function c(e){let{interceptionMarker:t,getSafeRouteKey:n,segment:r,routeKeys:o,keyPrefix:i}=e,{key:l,optional:s,repeat:c}=u(r),f=l.replace(/\W/g,"");i&&(f=""+i+f);let d=!1;(0===f.length||f.length>30)&&(d=!0),isNaN(parseInt(f.slice(0,1)))||(d=!0),d&&(f=n()),i?o[f]=""+i+l:o[f]=l;let p=t?(0,a.escapeStringRegexp)(t):"";return c?s?"(?:/"+p+"(?<"+f+">.+?))?":"/"+p+"(?<"+f+">.+?)":"/"+p+"(?<"+f+">[^/]+?)"}function f(e,t){let n;let u=(0,i.removeTrailingSlash)(e).slice(1).split("/"),l=(n=0,()=>{let e="",t=++n;for(;t>0;)e+=String.fromCharCode(97+(t-1)%26),t=Math.floor((t-1)/26);return e}),s={};return{namedParameterizedRoute:u.map(e=>{let n=o.INTERCEPTION_ROUTE_MARKERS.some(t=>e.startsWith(t)),i=e.match(/\[((?:\[.*\])|.+)\]/);if(n&&i){let[n]=e.split(i[0]);return c({getSafeRouteKey:l,interceptionMarker:n,segment:i[1],routeKeys:s,keyPrefix:t?r.NEXT_INTERCEPTION_MARKER_PREFIX:void 0})}return i?c({getSafeRouteKey:l,segment:i[1],routeKeys:s,keyPrefix:t?r.NEXT_QUERY_PARAM_PREFIX:void 0}):"/"+(0,a.escapeStringRegexp)(e)}).join(""),routeKeys:s}}function d(e,t){let n=f(e,t);return{...s(e),namedRegex:"^"+n.namedParameterizedRoute+"(?:/)?$",routeKeys:n.routeKeys}}function p(e,t){let{parameterizedRoute:n}=l(e),{catchAll:r=!0}=t;if("/"===n)return{namedRegex:"^/"+(r?".*":"")+"$"};let{namedParameterizedRoute:o}=f(e,!1);return{namedRegex:"^"+o+(r?"(?:(/.*)?)":"")+"$"}}},14777:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getSortedRoutes",{enumerable:!0,get:function(){return r}});class n{insert(e){this._insert(e.split("/").filter(Boolean),[],!1)}smoosh(){return this._smoosh()}_smoosh(e){void 0===e&&(e="/");let t=[...this.children.keys()].sort();null!==this.slugName&&t.splice(t.indexOf("[]"),1),null!==this.restSlugName&&t.splice(t.indexOf("[...]"),1),null!==this.optionalRestSlugName&&t.splice(t.indexOf("[[...]]"),1);let n=t.map(t=>this.children.get(t)._smoosh(""+e+t+"/")).reduce((e,t)=>[...e,...t],[]);if(null!==this.slugName&&n.push(...this.children.get("[]")._smoosh(e+"["+this.slugName+"]/")),!this.placeholder){let t="/"===e?"/":e.slice(0,-1);if(null!=this.optionalRestSlugName)throw Error('You cannot define a route with the same specificity as a optional catch-all route ("'+t+'" and "'+t+"[[..."+this.optionalRestSlugName+']]").');n.unshift(t)}return null!==this.restSlugName&&n.push(...this.children.get("[...]")._smoosh(e+"[..."+this.restSlugName+"]/")),null!==this.optionalRestSlugName&&n.push(...this.children.get("[[...]]")._smoosh(e+"[[..."+this.optionalRestSlugName+"]]/")),n}_insert(e,t,r){if(0===e.length){this.placeholder=!1;return}if(r)throw Error("Catch-all must be the last part of the URL.");let o=e[0];if(o.startsWith("[")&&o.endsWith("]")){let n=o.slice(1,-1),i=!1;if(n.startsWith("[")&&n.endsWith("]")&&(n=n.slice(1,-1),i=!0),n.startsWith("...")&&(n=n.substring(3),r=!0),n.startsWith("[")||n.endsWith("]"))throw Error("Segment names may not start or end with extra brackets ('"+n+"').");if(n.startsWith("."))throw Error("Segment names may not start with erroneous periods ('"+n+"').");function a(e,n){if(null!==e&&e!==n)throw Error("You cannot use different slug names for the same dynamic path ('"+e+"' !== '"+n+"').");t.forEach(e=>{if(e===n)throw Error('You cannot have the same slug name "'+n+'" repeat within a single dynamic path');if(e.replace(/\W/g,"")===o.replace(/\W/g,""))throw Error('You cannot have the slug names "'+e+'" and "'+n+'" differ only by non-word symbols within a single dynamic path')}),t.push(n)}if(r){if(i){if(null!=this.restSlugName)throw Error('You cannot use both an required and optional catch-all route at the same level ("[...'+this.restSlugName+']" and "'+e[0]+'" ).');a(this.optionalRestSlugName,n),this.optionalRestSlugName=n,o="[[...]]"}else{if(null!=this.optionalRestSlugName)throw Error('You cannot use both an optional and required catch-all route at the same level ("[[...'+this.optionalRestSlugName+']]" and "'+e[0]+'").');a(this.restSlugName,n),this.restSlugName=n,o="[...]"}}else{if(i)throw Error('Optional route parameters are not yet supported ("'+e[0]+'").');a(this.slugName,n),this.slugName=n,o="[]"}}this.children.has(o)||this.children.set(o,new n),this.children.get(o)._insert(e.slice(1),t,r)}constructor(){this.placeholder=!0,this.children=new Map,this.slugName=null,this.restSlugName=null,this.optionalRestSlugName=null}}function r(e){let t=new n;return e.forEach(e=>t.insert(e)),t.smoosh()}},3987:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{DecodeError:function(){return h},MiddlewareNotFoundError:function(){return E},MissingStaticPage:function(){return m},NormalizeError:function(){return _},PageNotFoundError:function(){return g},SP:function(){return d},ST:function(){return p},WEB_VITALS:function(){return n},execOnce:function(){return r},getDisplayName:function(){return l},getLocationOrigin:function(){return i},getURL:function(){return u},isAbsoluteUrl:function(){return a},isResSent:function(){return s},loadGetInitialProps:function(){return f},normalizeRepeatedSlashes:function(){return c},stringifyError:function(){return R}});let n=["CLS","FCP","FID","INP","LCP","TTFB"];function r(e){let t,n=!1;return function(){for(var r=arguments.length,o=Array(r),a=0;ao.test(e);function i(){let{protocol:e,hostname:t,port:n}=window.location;return e+"//"+t+(n?":"+n:"")}function u(){let{href:e}=window.location,t=i();return e.substring(t.length)}function l(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function s(e){return e.finished||e.headersSent}function c(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?"?"+t.slice(1).join("?"):"")}async function f(e,t){let n=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await f(t.Component,t.ctx)}:{};let r=await e.getInitialProps(t);if(n&&s(n))return r;if(!r)throw Error('"'+l(e)+'.getInitialProps()" should resolve to an object. But found "'+r+'" instead.');return r}let d="undefined"!=typeof performance,p=d&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class h extends Error{}class _ extends Error{}class g extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message="Cannot find module for page: "+e}}class m extends Error{constructor(e,t){super(),this.message="Failed to load static file for page: "+e+" "+t}}class E extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function R(e){return JSON.stringify({message:e.message,stack:e.stack})}}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/131.271fc803433a0511.js b/frontend/.next/static/chunks/131.271fc803433a0511.js new file mode 100644 index 0000000..968631f --- /dev/null +++ b/frontend/.next/static/chunks/131.271fc803433a0511.js @@ -0,0 +1,14 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[131],{50131:function(t,e,r){r.r(e),r.d(e,{PhPlus:function(){return c}}),r(31498);var a=r(38157),h=r(48567),i=r(54910),o=r(69709),s=r(78313),p=Object.defineProperty,l=Object.getOwnPropertyDescriptor,n=(t,e,r,a)=>{for(var h,i=a>1?void 0:a?l(e,r):e,o=t.length-1;o>=0;o--)(h=t[o])&&(i=(a?h(e,r,i):h(i))||i);return a&&i&&p(e,r,i),i};let c=class extends h.oi{constructor(){super(...arguments),this.size="1em",this.weight="regular",this.color="currentColor",this.mirrored=!1}render(){var t;return(0,a.dy)` + ${c.weightsMap.get(null!=(t=this.weight)?t:"regular")} + `}};c.weightsMap=new Map([["thin",(0,a.YP)``],["light",(0,a.YP)``],["regular",(0,a.YP)``],["bold",(0,a.YP)``],["fill",(0,a.YP)``],["duotone",(0,a.YP)``]]),c.styles=(0,s.iv)` + :host { + display: contents; + } + `,n([(0,o.C)({type:String,reflect:!0})],c.prototype,"size",2),n([(0,o.C)({type:String,reflect:!0})],c.prototype,"weight",2),n([(0,o.C)({type:String,reflect:!0})],c.prototype,"color",2),n([(0,o.C)({type:Boolean,reflect:!0})],c.prototype,"mirrored",2),c=n([(0,i.M)("ph-plus")],c)}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/1414.7a19581128bac08d.js b/frontend/.next/static/chunks/1414.7a19581128bac08d.js new file mode 100644 index 0000000..dc3af66 --- /dev/null +++ b/frontend/.next/static/chunks/1414.7a19581128bac08d.js @@ -0,0 +1,14 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1414],{11414:function(t,e,l){l.r(e),l.d(e,{PhCompass:function(){return Z}}),l(31498);var r=l(38157),a=l(48567),o=l(54910),i=l(69709),s=l(78313),p=Object.defineProperty,h=Object.getOwnPropertyDescriptor,n=(t,e,l,r)=>{for(var a,o=r>1?void 0:r?h(e,l):e,i=t.length-1;i>=0;i--)(a=t[i])&&(o=(r?a(e,l,o):a(o))||o);return r&&o&&p(e,l,o),o};let Z=class extends a.oi{constructor(){super(...arguments),this.size="1em",this.weight="regular",this.color="currentColor",this.mirrored=!1}render(){var t;return(0,r.dy)` + ${Z.weightsMap.get(null!=(t=this.weight)?t:"regular")} + `}};Z.weightsMap=new Map([["thin",(0,r.YP)``],["light",(0,r.YP)``],["regular",(0,r.YP)``],["bold",(0,r.YP)``],["fill",(0,r.YP)``],["duotone",(0,r.YP)``]]),Z.styles=(0,s.iv)` + :host { + display: contents; + } + `,n([(0,i.C)({type:String,reflect:!0})],Z.prototype,"size",2),n([(0,i.C)({type:String,reflect:!0})],Z.prototype,"weight",2),n([(0,i.C)({type:String,reflect:!0})],Z.prototype,"color",2),n([(0,i.C)({type:Boolean,reflect:!0})],Z.prototype,"mirrored",2),Z=n([(0,o.M)("ph-compass")],Z)}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/169.fb7afe3a66917fd8.js b/frontend/.next/static/chunks/169.fb7afe3a66917fd8.js new file mode 100644 index 0000000..6b00a44 --- /dev/null +++ b/frontend/.next/static/chunks/169.fb7afe3a66917fd8.js @@ -0,0 +1,14 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[169],{70169:function(t,e,r){r.r(e),r.d(e,{PhPaperPlaneRight:function(){return c}}),r(31498);var a=r(38157),l=r(48567),i=r(54910),o=r(69709),h=r(78313),p=Object.defineProperty,s=Object.getOwnPropertyDescriptor,n=(t,e,r,a)=>{for(var l,i=a>1?void 0:a?s(e,r):e,o=t.length-1;o>=0;o--)(l=t[o])&&(i=(a?l(e,r,i):l(i))||i);return a&&i&&p(e,r,i),i};let c=class extends l.oi{constructor(){super(...arguments),this.size="1em",this.weight="regular",this.color="currentColor",this.mirrored=!1}render(){var t;return(0,a.dy)` + ${c.weightsMap.get(null!=(t=this.weight)?t:"regular")} + `}};c.weightsMap=new Map([["thin",(0,a.YP)``],["light",(0,a.YP)``],["regular",(0,a.YP)``],["bold",(0,a.YP)``],["fill",(0,a.YP)``],["duotone",(0,a.YP)``]]),c.styles=(0,h.iv)` + :host { + display: contents; + } + `,n([(0,o.C)({type:String,reflect:!0})],c.prototype,"size",2),n([(0,o.C)({type:String,reflect:!0})],c.prototype,"weight",2),n([(0,o.C)({type:String,reflect:!0})],c.prototype,"color",2),n([(0,o.C)({type:Boolean,reflect:!0})],c.prototype,"mirrored",2),c=n([(0,i.M)("ph-paper-plane-right")],c)}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/1735.384ac074ce4d298b.js b/frontend/.next/static/chunks/1735.384ac074ce4d298b.js new file mode 100644 index 0000000..97d8ab1 --- /dev/null +++ b/frontend/.next/static/chunks/1735.384ac074ce4d298b.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1735],{87721:function(t,e,a){a.d(e,{p:function(){return c}});var n=a(65531),r=a(69921),s=a(10464),o=a(2742),i=a(7275);function c(t){let{abi:e,data:a}=t,c=(0,r.tP)(a,0,4),u=e.find(t=>"function"===t.type&&c===(0,s.C)((0,i.t)(t)));if(!u)throw new n.eF(c,{docsPath:"/docs/contract/decodeFunctionData"});return{functionName:u.name,args:"inputs"in u&&u.inputs&&u.inputs.length>0?(0,o.r)(u.inputs,(0,r.tP)(a,4)):void 0}}},93637:function(t,e,a){a.d(e,{E:function(){return s}});var n=a(10052),r=a(4012);function s(t,e){if(!(0,r.U)(t,{strict:!1}))throw new n.b({address:t});if(!(0,r.U)(e,{strict:!1}))throw new n.b({address:e});return t.toLowerCase()===e.toLowerCase()}},71735:function(t,e,a){a.d(e,{offchainLookup:function(){return b},offchainLookupSignature:function(){return y}});var n=a(50550),r=a(31853),s=a(81544),o=a(97564);class i extends s.G{constructor({callbackSelector:t,cause:e,data:a,extraData:n,sender:r,urls:s}){super(e.shortMessage||"An error occurred while fetching for an offchain result.",{cause:e,metaMessages:[...e.metaMessages||[],e.metaMessages?.length?"":[],"Offchain Gateway Call:",s&&[" Gateway URL(s):",...s.map(t=>` ${(0,o.G)(t)}`)],` Sender: ${r}`,` Data: ${a}`,` Callback selector: ${t}`,` Extra data: ${n}`].flat(),name:"OffchainLookupError"})}}class c extends s.G{constructor({result:t,url:e}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${(0,o.G)(e)}`,`Response: ${(0,r.P)(t)}`],name:"OffchainLookupResponseMalformedError"})}}class u extends s.G{constructor({sender:t,to:e}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${e}`,`OffchainLookup sender address: ${t}`],name:"OffchainLookupSenderMismatchError"})}}var f=a(17057),d=a(33591),l=a(30056),p=a(93637),h=a(89256),w=a(93610),m=a(7143);let y="0x556f1830",g={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]};async function b(t,{blockNumber:e,blockTag:a,data:r,to:s}){let{args:o}=(0,d.p)({data:r,abi:[g]}),[c,f,w,y,b]=o,{ccipRead:M}=t,k=M&&"function"==typeof M?.request?M.request:E;try{if(!(0,p.E)(s,c))throw new u({sender:c,to:s});let r=f.includes(m.M)?await (0,m.w)({data:w,ccipRequest:k}):await k({data:w,sender:c,urls:f}),{data:o}=await (0,n.R)(t,{blockNumber:e,blockTag:a,data:(0,h.zo)([y,(0,l.E)([{type:"bytes"},{type:"bytes"}],[r,b])]),to:s});return o}catch(t){throw new i({callbackSelector:y,cause:t,data:r,extraData:b,sender:c,urls:f})}}async function E({data:t,sender:e,urls:a}){let n=Error("An unknown error occurred.");for(let s=0;s0){if(!r.inputs)throw new o.Zh(r.name,{docsPath:l});h=(0,u.E)(r.inputs,n)}return(0,i.SM)([p,h])}let h="/docs/contract/encodeFunctionResult",w="x-batch-gateway:true";async function m(t){let{data:e,ccipRequest:a}=t,{args:[i]}=(0,s.p)({abi:n.Yi,data:e}),c=[],f=[];return await Promise.all(i.map(async(t,e)=>{try{f[e]=t.urls.includes(w)?await m({data:t.data,ccipRequest:a}):await a(t),c[e]=!1}catch(t){c[e]=!0,f[e]="HttpRequestError"===t.name&&t.status?p({abi:n.Yi,errorName:"HttpError",args:[t.status,t.shortMessage]}):p({abi:[r.Up],errorName:"Error",args:["shortMessage"in t?t.shortMessage:t.message]})}})),function(t){let{abi:e,functionName:a,result:n}=t,r=e[0];if(a){let t=(0,d.mE)({abi:e,name:a});if(!t)throw new o.xL(a,{docsPath:h});r=t}if("function"!==r.type)throw new o.xL(void 0,{docsPath:h});if(!r.outputs)throw new o.MX(r.name,{docsPath:h});let s=(()=>{if(0===r.outputs.length)return[];if(1===r.outputs.length)return[n];if(Array.isArray(n))return n;throw new o.hn(n)})();return(0,u.E)(r.outputs,s)}({abi:n.Yi,functionName:"query",result:[c,f]})}}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/2080.0a4ad3526a695fa0.js b/frontend/.next/static/chunks/2080.0a4ad3526a695fa0.js new file mode 100644 index 0000000..568d2d8 --- /dev/null +++ b/frontend/.next/static/chunks/2080.0a4ad3526a695fa0.js @@ -0,0 +1,14 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2080],{92080:function(a,t,e){e.r(t),e.d(t,{PhArrowSquareOut:function(){return H}}),e(31498);var r=e(38157),h=e(48567),o=e(54910),i=e(69709),l=e(78313),s=Object.defineProperty,p=Object.getOwnPropertyDescriptor,n=(a,t,e,r)=>{for(var h,o=r>1?void 0:r?p(t,e):t,i=a.length-1;i>=0;i--)(h=a[i])&&(o=(r?h(t,e,o):h(o))||o);return r&&o&&s(t,e,o),o};let H=class extends h.oi{constructor(){super(...arguments),this.size="1em",this.weight="regular",this.color="currentColor",this.mirrored=!1}render(){var a;return(0,r.dy)` + ${H.weightsMap.get(null!=(a=this.weight)?a:"regular")} + `}};H.weightsMap=new Map([["thin",(0,r.YP)``],["light",(0,r.YP)``],["regular",(0,r.YP)``],["bold",(0,r.YP)``],["fill",(0,r.YP)``],["duotone",(0,r.YP)``]]),H.styles=(0,l.iv)` + :host { + display: contents; + } + `,n([(0,i.C)({type:String,reflect:!0})],H.prototype,"size",2),n([(0,i.C)({type:String,reflect:!0})],H.prototype,"weight",2),n([(0,i.C)({type:String,reflect:!0})],H.prototype,"color",2),n([(0,i.C)({type:Boolean,reflect:!0})],H.prototype,"mirrored",2),H=n([(0,o.M)("ph-arrow-square-out")],H)}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/2094.f8f74f805a958fdc.js b/frontend/.next/static/chunks/2094.f8f74f805a958fdc.js new file mode 100644 index 0000000..dd81161 --- /dev/null +++ b/frontend/.next/static/chunks/2094.f8f74f805a958fdc.js @@ -0,0 +1,221 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2094],{22094:function(e,t,i){i.r(t),i.d(t,{W3mEmailLoginView:function(){return T},W3mEmailOtpWidget:function(){return h.m},W3mEmailVerifyDeviceView:function(){return y},W3mEmailVerifyOtpView:function(){return p},W3mUpdateEmailPrimaryOtpView:function(){return O},W3mUpdateEmailSecondaryOtpView:function(){return I},W3mUpdateEmailWalletView:function(){return x}});var r=i(6943),n=i(64369),o=i(5688),a=i(31929),l=i(89512),s=i(86777),c=i(66909),u=i(53357),d=i(92413),h=i(55499);let p=class extends h.m{constructor(){super(...arguments),this.onOtpSubmit=async e=>{try{if(this.authConnector){let t=r.R.state.activeChain,i=n.ConnectionController.getConnections(t),u=o.OptionsController.state.remoteFeatures?.multiWallet,d=i.length>0;if(await this.authConnector.provider.connectOtp({otp:e}),a.X.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_PASS"}),t)await n.ConnectionController.connectExternal(this.authConnector,t);else throw Error("Active chain is not set on ChainController");if(o.OptionsController.state.remoteFeatures?.emailCapture)return;if(o.OptionsController.state.siwx){l.I.close();return}if(d&&u){s.RouterController.replace("ProfileWallets"),c.SnackController.showSuccess("New Wallet Added");return}l.I.close()}}catch(e){throw a.X.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_FAIL",properties:{message:u.j.parseError(e)}}),e}},this.onOtpResend=async e=>{this.authConnector&&(await this.authConnector.provider.connectEmail({email:e}),a.X.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_SENT"}))}}};p=function(e,t,i,r){var n,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(a=(o<3?n(a):o>3?n(t,i,a):n(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a}([(0,d.Mo)("w3m-email-verify-otp-view")],p);var m=i(31133),f=i(84927),w=i(35652);i(96277),i(92374),i(51437),i(44732);var g=(0,d.iv)` + wui-icon-box { + height: ${({spacing:e})=>e["16"]}; + width: ${({spacing:e})=>e["16"]}; + } +`,v=function(e,t,i,r){var n,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(a=(o<3?n(a):o>3?n(t,i,a):n(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let y=class extends m.oi{constructor(){super(),this.email=s.RouterController.state.data?.email,this.authConnector=w.ConnectorController.getAuthConnector(),this.loading=!1,this.listenForDeviceApproval()}render(){if(!this.email)throw Error("w3m-email-verify-device-view: No email provided");if(!this.authConnector)throw Error("w3m-email-verify-device-view: No auth connector provided");return(0,m.dy)` + + + + + + + Approve the login link we sent to + + ${this.email} + + + + The code expires in 20 minutes + + + + + Didn't receive it? + + + Resend email + + + + + `}async listenForDeviceApproval(){if(this.authConnector)try{await this.authConnector.provider.connectDevice(),a.X.sendEvent({type:"track",event:"DEVICE_REGISTERED_FOR_EMAIL"}),a.X.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_SENT"}),s.RouterController.replace("EmailVerifyOtp",{email:this.email})}catch(e){s.RouterController.goBack()}}async onResendCode(){try{if(!this.loading){if(!this.authConnector||!this.email)throw Error("w3m-email-login-widget: Unable to resend email");this.loading=!0,await this.authConnector.provider.connectEmail({email:this.email}),this.listenForDeviceApproval(),c.SnackController.showSuccess("Code email resent")}}catch(e){c.SnackController.showError(e)}finally{this.loading=!1}}};y.styles=g,v([(0,f.SB)()],y.prototype,"loading",void 0),y=v([(0,d.Mo)("w3m-email-verify-device-view")],y);var b=i(7226);i(97585),i(7861);var E=(0,m.iv)` + wui-email-input { + width: 100%; + } + + form { + width: 100%; + display: block; + position: relative; + } +`,C=function(e,t,i,r){var n,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(a=(o<3?n(a):o>3?n(t,i,a):n(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let x=class extends m.oi{constructor(){super(...arguments),this.formRef=(0,b.V)(),this.initialEmail=s.RouterController.state.data?.email??"",this.redirectView=s.RouterController.state.data?.redirectView,this.email="",this.loading=!1}firstUpdated(){this.formRef.value?.addEventListener("keydown",e=>{"Enter"===e.key&&this.onSubmitEmail(e)})}render(){return(0,m.dy)` + +
+ + + +
+ ${this.buttonsTemplate()} +
+ `}onEmailInputChange(e){this.email=e.detail}async onSubmitEmail(e){try{if(this.loading)return;this.loading=!0,e.preventDefault();let t=w.ConnectorController.getAuthConnector();if(!t)throw Error("w3m-update-email-wallet: Auth connector not found");let i=await t.provider.updateEmail({email:this.email});a.X.sendEvent({type:"track",event:"EMAIL_EDIT"}),"VERIFY_SECONDARY_OTP"===i.action?s.RouterController.push("UpdateEmailSecondaryOtp",{email:this.initialEmail,newEmail:this.email,redirectView:this.redirectView}):s.RouterController.push("UpdateEmailPrimaryOtp",{email:this.initialEmail,newEmail:this.email,redirectView:this.redirectView})}catch(e){c.SnackController.showError(e),this.loading=!1}}buttonsTemplate(){let e=!this.loading&&this.email.length>3&&this.email!==this.initialEmail;return this.redirectView?(0,m.dy)` + + + Cancel + + + + Save + + + `:(0,m.dy)` + + Save + + `}};x.styles=E,C([(0,f.SB)()],x.prototype,"email",void 0),C([(0,f.SB)()],x.prototype,"loading",void 0),x=C([(0,d.Mo)("w3m-update-email-wallet-view")],x);let O=class extends h.m{constructor(){super(),this.email=s.RouterController.state.data?.email,this.onOtpSubmit=async e=>{try{this.authConnector&&(await this.authConnector.provider.updateEmailPrimaryOtp({otp:e}),a.X.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_PASS"}),s.RouterController.replace("UpdateEmailSecondaryOtp",s.RouterController.state.data))}catch(e){throw a.X.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_FAIL",properties:{message:u.j.parseError(e)}}),e}},this.onStartOver=()=>{s.RouterController.replace("UpdateEmailWallet",s.RouterController.state.data)}}};O=function(e,t,i,r){var n,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(a=(o<3?n(a):o>3?n(t,i,a):n(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a}([(0,d.Mo)("w3m-update-email-primary-otp-view")],O);let I=class extends h.m{constructor(){super(),this.email=s.RouterController.state.data?.newEmail,this.redirectView=s.RouterController.state.data?.redirectView,this.onOtpSubmit=async e=>{try{this.authConnector&&(await this.authConnector.provider.updateEmailSecondaryOtp({otp:e}),a.X.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_PASS"}),this.redirectView&&s.RouterController.reset(this.redirectView))}catch(e){throw a.X.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_FAIL",properties:{message:u.j.parseError(e)}}),e}},this.onStartOver=()=>{s.RouterController.replace("UpdateEmailWallet",s.RouterController.state.data)}}};I=function(e,t,i,r){var n,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(a=(o<3?n(a):o>3?n(t,i,a):n(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a}([(0,d.Mo)("w3m-update-email-secondary-otp-view")],I);var R=i(44649),$=i(88578),S=function(e,t,i,r){var n,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(a=(o<3?n(a):o>3?n(t,i,a):n(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let T=class extends m.oi{constructor(){super(),this.authConnector=w.ConnectorController.getAuthConnector(),this.isEmailEnabled=o.OptionsController.state.remoteFeatures?.email,this.isAuthEnabled=this.checkIfAuthEnabled(w.ConnectorController.state.connectors),this.connectors=w.ConnectorController.state.connectors,w.ConnectorController.subscribeKey("connectors",e=>{this.connectors=e,this.isAuthEnabled=this.checkIfAuthEnabled(this.connectors)})}render(){if(!this.isEmailEnabled)throw Error("w3m-email-login-view: Email is not enabled");if(!this.isAuthEnabled)throw Error("w3m-email-login-view: No auth connector provided");return(0,m.dy)` + + `}checkIfAuthEnabled(e){let t=e.filter(e=>e.type===$.b.CONNECTOR_TYPE_AUTH).map(e=>e.chain);return R.b.AUTH_CONNECTOR_SUPPORTED_CHAINS.some(e=>t.includes(e))}};S([(0,f.SB)()],T.prototype,"connectors",void 0),T=S([(0,d.Mo)("w3m-email-login-view")],T)},55499:function(e,t,i){i.d(t,{m:function(){return O}});var r,n=i(31133),o=i(84927),a=i(86777),l=i(35652),s=i(53357),c=i(66909),u=i(92413);i(96277),i(51437),i(81255),i(5680);var d=i(84249),h=i(3874),p=i(57116),m=i(11131),f=(0,m.iv)` + :host { + position: relative; + display: inline-block; + } + + input { + width: 48px; + height: 48px; + background: ${({tokens:e})=>e.theme.foregroundPrimary}; + border-radius: ${({borderRadius:e})=>e[4]}; + border: 1px solid ${({tokens:e})=>e.theme.borderPrimary}; + font-family: ${({fontFamily:e})=>e.regular}; + font-size: ${({textSize:e})=>e.large}; + line-height: 18px; + letter-spacing: -0.16px; + text-align: center; + color: ${({tokens:e})=>e.theme.textPrimary}; + caret-color: ${({tokens:e})=>e.core.textAccentPrimary}; + transition: + background-color ${({durations:e})=>e.lg} + ${({easings:e})=>e["ease-out-power-2"]}, + border-color ${({durations:e})=>e.lg} + ${({easings:e})=>e["ease-out-power-2"]}, + box-shadow ${({durations:e})=>e.lg} + ${({easings:e})=>e["ease-out-power-2"]}; + will-change: background-color, border-color, box-shadow; + box-sizing: border-box; + -webkit-appearance: none; + -moz-appearance: textfield; + padding: ${({spacing:e})=>e[4]}; + } + + input::-webkit-outer-spin-button, + input::-webkit-inner-spin-button { + -webkit-appearance: none; + margin: 0; + } + + input[type='number'] { + -moz-appearance: textfield; + } + + input:disabled { + cursor: not-allowed; + opacity: 0.5; + } + + input:focus-visible:enabled { + background-color: transparent; + border: 1px solid ${({tokens:e})=>e.theme.borderSecondary}; + box-shadow: 0px 0px 0px 4px ${({tokens:e})=>e.core.foregroundAccent040}; + } +`,w=function(e,t,i,r){var n,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(a=(o<3?n(a):o>3?n(t,i,a):n(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let g=class extends n.oi{constructor(){super(...arguments),this.disabled=!1,this.value=""}render(){return(0,n.dy)` `}};g.styles=[d.ET,d.ZM,f],w([(0,o.Cb)({type:Boolean})],g.prototype,"disabled",void 0),w([(0,o.Cb)({type:String})],g.prototype,"value",void 0),g=w([(0,p.M)("wui-input-numeric")],g);var v=(0,n.iv)` + :host { + position: relative; + display: block; + } +`,y=function(e,t,i,r){var n,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var l=e.length-1;l>=0;l--)(n=e[l])&&(a=(o<3?n(a):o>3?n(t,i,a):n(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let b=class extends n.oi{constructor(){super(...arguments),this.length=6,this.otp="",this.values=Array.from({length:this.length}).map(()=>""),this.numerics=[],this.shouldInputBeEnabled=e=>this.values.slice(0,e).every(e=>""!==e),this.handleKeyDown=(e,t)=>{let i=e.target,r=this.getInputElement(i);if(!r)return;["ArrowLeft","ArrowRight","Shift","Delete"].includes(e.key)&&e.preventDefault();let n=r.selectionStart;switch(e.key){case"ArrowLeft":n&&r.setSelectionRange(n+1,n+1),this.focusInputField("prev",t);break;case"ArrowRight":case"Shift":this.focusInputField("next",t);break;case"Delete":case"Backspace":""===r.value?this.focusInputField("prev",t):this.updateInput(r,t,"")}},this.focusInputField=(e,t)=>{if("next"===e){let e=t+1;if(!this.shouldInputBeEnabled(e))return;let i=this.numerics[e-1?e:t],r=i?this.getInputElement(i):void 0;r&&r.focus()}}}firstUpdated(){this.otp&&(this.values=this.otp.split(""));let e=this.shadowRoot?.querySelectorAll("wui-input-numeric");e&&(this.numerics=Array.from(e)),this.numerics[0]?.focus()}render(){return(0,n.dy)` + + ${Array.from({length:this.length}).map((e,t)=>(0,n.dy)` + this.handleInput(e,t)} + @click=${e=>this.selectInput(e)} + @keydown=${e=>this.handleKeyDown(e,t)} + .disabled=${!this.shouldInputBeEnabled(t)} + .value=${this.values[t]||""} + > + + `)} + + `}updateInput(e,t,i){let r=this.numerics[t],n=e||(r?this.getInputElement(r):void 0);n&&(n.value=i,this.values=this.values.map((e,r)=>r===t?i:e))}selectInput(e){let t=e.target;if(t){let e=this.getInputElement(t);e?.select()}}handleInput(e,t){let i=e.target,r=this.getInputElement(i);if(r){let i=r.value;"insertFromPaste"===e.inputType?this.handlePaste(r,i,t):h.H.isNumber(i)&&e.data?(this.updateInput(r,t,e.data),this.focusInputField("next",t)):this.updateInput(r,t,"")}this.dispatchInputChangeEvent()}handlePaste(e,t,i){let r=t[0];if(r&&h.H.isNumber(r)){this.updateInput(e,i,r);let n=t.substring(1);if(i+1=0;l--)(n=e[l])&&(a=(o<3?n(a):o>3?n(t,i,a):n(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let O=r=class extends n.oi{firstUpdated(){this.startOTPTimeout()}disconnectedCallback(){clearTimeout(this.OTPTimeout)}constructor(){super(),this.loading=!1,this.timeoutTimeLeft=E.$.getTimeToNextEmailLogin(),this.error="",this.otp="",this.email=a.RouterController.state.data?.email,this.authConnector=l.ConnectorController.getAuthConnector()}render(){if(!this.email)throw Error("w3m-email-otp-widget: No email provided");let e=!!this.timeoutTimeLeft,t=this.getFooterLabels(e);return(0,n.dy)` + + + + The code expires in 20 minutes + + ${this.loading?(0,n.dy)``:(0,n.dy)` + + ${this.error?(0,n.dy)` + + ${this.error}. Try Again + + `:null} + `} + + + ${t.title} + + ${t.action} + + + + `}startOTPTimeout(){this.timeoutTimeLeft=E.$.getTimeToNextEmailLogin(),this.OTPTimeout=setInterval(()=>{this.timeoutTimeLeft>0?this.timeoutTimeLeft=E.$.getTimeToNextEmailLogin():clearInterval(this.OTPTimeout)},1e3)}async onOtpInputChange(e){try{!this.loading&&(this.otp=e.detail,this.shouldSubmitOnOtpChange()&&(this.loading=!0,await this.onOtpSubmit?.(this.otp)))}catch(e){this.error=s.j.parseError(e),this.loading=!1}}async onResendCode(){try{if(this.onOtpResend){if(!this.loading&&!this.timeoutTimeLeft){if(this.error="",this.otp="",!l.ConnectorController.getAuthConnector()||!this.email)throw Error("w3m-email-otp-widget: Unable to resend email");this.loading=!0,await this.onOtpResend(this.email),this.startOTPTimeout(),c.SnackController.showSuccess("Code email resent")}}else this.onStartOver&&this.onStartOver()}catch(e){c.SnackController.showError(e)}finally{this.loading=!1}}getFooterLabels(e){return this.onStartOver?{title:"Something wrong?",action:`Try again ${e?`in ${this.timeoutTimeLeft}s`:""}`}:{title:"Didn't receive it?",action:`Resend ${e?`in ${this.timeoutTimeLeft}s`:"Code"}`}}shouldSubmitOnOtpChange(){return this.authConnector&&this.otp.length===r.OTP_LENGTH}};O.OTP_LENGTH=6,O.styles=C,x([(0,o.SB)()],O.prototype,"loading",void 0),x([(0,o.SB)()],O.prototype,"timeoutTimeLeft",void 0),x([(0,o.SB)()],O.prototype,"error",void 0),O=r=x([(0,u.Mo)("w3m-email-otp-widget")],O)}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/2103.5c09694c154d63b7.js b/frontend/.next/static/chunks/2103.5c09694c154d63b7.js new file mode 100644 index 0000000..59a8e0e --- /dev/null +++ b/frontend/.next/static/chunks/2103.5c09694c154d63b7.js @@ -0,0 +1,14 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2103],{92103:function(t,e,r){r.r(e),r.d(e,{PhArrowUp:function(){return c}}),r(31498);var a=r(38157),l=r(48567),o=r(54910),i=r(69709),s=r(78313),h=Object.defineProperty,p=Object.getOwnPropertyDescriptor,n=(t,e,r,a)=>{for(var l,o=a>1?void 0:a?p(e,r):e,i=t.length-1;i>=0;i--)(l=t[i])&&(o=(a?l(e,r,o):l(o))||o);return a&&o&&h(e,r,o),o};let c=class extends l.oi{constructor(){super(...arguments),this.size="1em",this.weight="regular",this.color="currentColor",this.mirrored=!1}render(){var t;return(0,a.dy)` + ${c.weightsMap.get(null!=(t=this.weight)?t:"regular")} + `}};c.weightsMap=new Map([["thin",(0,a.YP)``],["light",(0,a.YP)``],["regular",(0,a.YP)``],["bold",(0,a.YP)``],["fill",(0,a.YP)``],["duotone",(0,a.YP)``]]),c.styles=(0,s.iv)` + :host { + display: contents; + } + `,n([(0,i.C)({type:String,reflect:!0})],c.prototype,"size",2),n([(0,i.C)({type:String,reflect:!0})],c.prototype,"weight",2),n([(0,i.C)({type:String,reflect:!0})],c.prototype,"color",2),n([(0,i.C)({type:Boolean,reflect:!0})],c.prototype,"mirrored",2),c=n([(0,o.M)("ph-arrow-up")],c)}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/2117-c30431d66a0cce6d.js b/frontend/.next/static/chunks/2117-c30431d66a0cce6d.js new file mode 100644 index 0000000..e3af533 --- /dev/null +++ b/frontend/.next/static/chunks/2117-c30431d66a0cce6d.js @@ -0,0 +1,2 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2117],{65157:function(e,t){"use strict";function n(){return""}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getDeploymentIdQueryOrEmptyString",{enumerable:!0,get:function(){return n}})},91572:function(){"trimStart"in String.prototype||(String.prototype.trimStart=String.prototype.trimLeft),"trimEnd"in String.prototype||(String.prototype.trimEnd=String.prototype.trimRight),"description"in Symbol.prototype||Object.defineProperty(Symbol.prototype,"description",{configurable:!0,get:function(){var e=/\((.*)\)/.exec(this.toString());return e?e[1]:void 0}}),Array.prototype.flat||(Array.prototype.flat=function(e,t){return t=this.concat.apply([],this),e>1&&t.some(Array.isArray)?t.flat(e-1):t},Array.prototype.flatMap=function(e,t){return this.map(e,t).flat()}),Promise.prototype.finally||(Promise.prototype.finally=function(e){if("function"!=typeof e)return this.then(e,e);var t=this.constructor||Promise;return this.then(function(n){return t.resolve(e()).then(function(){return n})},function(n){return t.resolve(e()).then(function(){throw n})})}),Object.fromEntries||(Object.fromEntries=function(e){return Array.from(e).reduce(function(e,t){return e[t[0]]=t[1],e},{})}),Array.prototype.at||(Array.prototype.at=function(e){var t=Math.trunc(e)||0;if(t<0&&(t+=this.length),!(t<0||t>=this.length))return this[t]}),Object.hasOwn||(Object.hasOwn=function(e,t){if(null==e)throw TypeError("Cannot convert undefined or null to object");return Object.prototype.hasOwnProperty.call(Object(e),t)}),"canParse"in URL||(URL.canParse=function(e,t){try{return new URL(e,t),!0}catch(e){return!1}})},1634:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addBasePath",{enumerable:!0,get:function(){return u}});let r=n(68498),o=n(33068);function u(e,t){return(0,o.normalizePathTrailingSlash)((0,r.addPathPrefix)(e,""))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},75266:function(e,t){"use strict";function n(e){var t,n;t=self.__next_s,n=()=>{e()},t&&t.length?t.reduce((e,t)=>{let[n,r]=t;return e.then(()=>new Promise((e,t)=>{let o=document.createElement("script");if(r)for(let e in r)"children"!==e&&o.setAttribute(e,r[e]);n?(o.src=n,o.onload=()=>e(),o.onerror=t):r&&(o.innerHTML=r.children,setTimeout(e)),document.head.appendChild(o)}))},Promise.resolve()).catch(e=>{console.error(e)}).then(()=>{n()}):n()}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"appBootstrap",{enumerable:!0,get:function(){return n}}),window.next={version:"14.2.33",appDir:!0},("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},83079:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"callServer",{enumerable:!0,get:function(){return o}});let r=n(12846);async function o(e,t){let n=(0,r.getServerActionDispatcher)();if(!n)throw Error("Invariant: missing action dispatcher.");return new Promise((r,o)=>{n({actionId:e,actionArgs:t,resolve:r,reject:o})})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},92304:function(e,t,n){"use strict";let r,o;Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"hydrate",{enumerable:!0,get:function(){return C}});let u=n(47043),l=n(53099),a=n(57437);n(91572);let i=u._(n(34040)),c=l._(n(2265)),s=n(6671),f=n(48701),d=u._(n(61404)),p=n(83079),h=n(89721),y=n(2103);n(70647);let _=window.console.error;window.console.error=function(){for(var e=arguments.length,t=Array(e),n=0;n{if((0,h.isNextRouterError)(e.error)){e.preventDefault();return}});let v=document,b=new TextEncoder,g=!1,m=!1,R=null;function P(e){if(0===e[0])r=[];else if(1===e[0]){if(!r)throw Error("Unexpected server data: missing bootstrap script.");o?o.enqueue(b.encode(e[1])):r.push(e[1])}else 2===e[0]&&(R=e[1])}let j=function(){o&&!m&&(o.close(),m=!0,r=void 0),g=!0};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",j,!1):j();let O=self.__next_f=self.__next_f||[];O.forEach(P),O.push=P;let E=new ReadableStream({start(e){r&&(r.forEach(t=>{e.enqueue(b.encode(t))}),g&&!m&&(e.close(),m=!0,r=void 0)),o=e}}),S=(0,s.createFromReadableStream)(E,{callServer:p.callServer});function w(){return(0,c.use)(S)}let M=c.default.StrictMode;function T(e){let{children:t}=e;return t}function C(){let e=(0,y.createMutableActionQueue)(),t=(0,a.jsx)(M,{children:(0,a.jsx)(f.HeadManagerContext.Provider,{value:{appDir:!0},children:(0,a.jsx)(y.ActionQueueContext.Provider,{value:e,children:(0,a.jsx)(T,{children:(0,a.jsx)(w,{})})})})}),n=window.__next_root_layout_missing_tags,r=!!(null==n?void 0:n.length),o={onRecoverableError:d.default};"__next_error__"===document.documentElement.id||r?i.default.createRoot(v,o).render(t):c.default.startTransition(()=>i.default.hydrateRoot(v,t,{...o,formState:R}))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},54278:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(19506),(0,n(75266).appBootstrap)(()=>{let{hydrate:e}=n(92304);n(12846),n(4707),e()}),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},19506:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(65157);{let e=n.u;n.u=function(){for(var t=arguments.length,n=Array(t),r=0;r(l(function(){var e;let t=document.getElementsByName(u)[0];if(null==t?void 0:null==(e=t.shadowRoot)?void 0:e.childNodes[0])return t.shadowRoot.childNodes[0];{let e=document.createElement(u);e.style.cssText="position:absolute";let t=document.createElement("div");return t.ariaLive="assertive",t.id="__next-route-announcer__",t.role="alert",t.style.cssText="position:absolute;border:0;height:1px;margin:-1px;padding:0;width:1px;clip:rect(0 0 0 0);overflow:hidden;white-space:nowrap;word-wrap:normal",e.attachShadow({mode:"open"}).appendChild(t),document.body.appendChild(e),t}}()),()=>{let e=document.getElementsByTagName(u)[0];(null==e?void 0:e.isConnected)&&document.body.removeChild(e)}),[]);let[a,i]=(0,r.useState)(""),c=(0,r.useRef)();return(0,r.useEffect)(()=>{let e="";if(document.title)e=document.title;else{let t=document.querySelector("h1");t&&(e=t.innerText||t.textContent||"")}void 0!==c.current&&c.current!==e&&i(e),c.current=e},[t]),n?(0,o.createPortal)(a,n):null}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6866:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{ACTION:function(){return r},FLIGHT_PARAMETERS:function(){return i},NEXT_DID_POSTPONE_HEADER:function(){return s},NEXT_ROUTER_PREFETCH_HEADER:function(){return u},NEXT_ROUTER_STATE_TREE:function(){return o},NEXT_RSC_UNION_QUERY:function(){return c},NEXT_URL:function(){return l},RSC_CONTENT_TYPE_HEADER:function(){return a},RSC_HEADER:function(){return n}});let n="RSC",r="Next-Action",o="Next-Router-State-Tree",u="Next-Router-Prefetch",l="Next-Url",a="text/x-component",i=[[n],[o],[u]],c="_rsc",s="x-nextjs-postponed";("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},12846:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{createEmptyCacheNode:function(){return x},default:function(){return I},getServerActionDispatcher:function(){return S},urlToUrlWithoutFlightMarker:function(){return M}});let r=n(53099),o=n(57437),u=r._(n(2265)),l=n(61956),a=n(24673),i=n(33456),c=n(79060),s=n(47744),f=n(61060),d=n(82952),p=n(86146),h=n(1634),y=n(6495),_=n(4123),v=n(39320),b=n(38137),g=n(6866),m=n(35076),R=n(11283),P=n(84541),j="undefined"==typeof window,O=j?null:new Map,E=null;function S(){return E}let w={};function M(e){let t=new URL(e,location.origin);return t.searchParams.delete(g.NEXT_RSC_UNION_QUERY),t}function T(e){return e.origin!==window.location.origin}function C(e){let{appRouterState:t,sync:n}=e;return(0,u.useInsertionEffect)(()=>{let{tree:e,pushRef:r,canonicalUrl:o}=t,u={...r.preserveCustomHistoryState?window.history.state:{},__NA:!0,__PRIVATE_NEXTJS_INTERNALS_TREE:e};r.pendingPush&&(0,i.createHrefFromUrl)(new URL(window.location.href))!==o?(r.pendingPush=!1,window.history.pushState(u,"",o)):window.history.replaceState(u,"",o),n(t)},[t,n]),null}function x(){return{lazyData:null,rsc:null,prefetchRsc:null,head:null,prefetchHead:null,parallelRoutes:new Map,lazyDataResolved:!1,loading:null}}function A(e){null==e&&(e={});let t=window.history.state,n=null==t?void 0:t.__NA;n&&(e.__NA=n);let r=null==t?void 0:t.__PRIVATE_NEXTJS_INTERNALS_TREE;return r&&(e.__PRIVATE_NEXTJS_INTERNALS_TREE=r),e}function N(e){let{headCacheNode:t}=e,n=null!==t?t.head:null,r=null!==t?t.prefetchHead:null,o=null!==r?r:n;return(0,u.useDeferredValue)(n,o)}function D(e){let t,{buildId:n,initialHead:r,initialTree:i,urlParts:f,initialSeedData:g,couldBeIntercepted:S,assetPrefix:M,missingSlots:x}=e,D=(0,u.useMemo)(()=>(0,d.createInitialRouterState)({buildId:n,initialSeedData:g,urlParts:f,initialTree:i,initialParallelRoutes:O,location:j?null:window.location,initialHead:r,couldBeIntercepted:S}),[n,g,f,i,r,S]),[I,U,k]=(0,s.useReducerWithReduxDevtools)(D);(0,u.useEffect)(()=>{O=null},[]);let{canonicalUrl:F}=(0,s.useUnwrapState)(I),{searchParams:L,pathname:H}=(0,u.useMemo)(()=>{let e=new URL(F,"undefined"==typeof window?"http://n":window.location.href);return{searchParams:e.searchParams,pathname:(0,R.hasBasePath)(e.pathname)?(0,m.removeBasePath)(e.pathname):e.pathname}},[F]),G=(0,u.useCallback)(e=>{let{previousTree:t,serverResponse:n}=e;(0,u.startTransition)(()=>{U({type:a.ACTION_SERVER_PATCH,previousTree:t,serverResponse:n})})},[U]),$=(0,u.useCallback)((e,t,n)=>{let r=new URL((0,h.addBasePath)(e),location.href);return U({type:a.ACTION_NAVIGATE,url:r,isExternalUrl:T(r),locationSearch:location.search,shouldScroll:null==n||n,navigateType:t})},[U]);E=(0,u.useCallback)(e=>{(0,u.startTransition)(()=>{U({...e,type:a.ACTION_SERVER_ACTION})})},[U]);let z=(0,u.useMemo)(()=>({back:()=>window.history.back(),forward:()=>window.history.forward(),prefetch:(e,t)=>{let n;if(!(0,p.isBot)(window.navigator.userAgent)){try{n=new URL((0,h.addBasePath)(e),window.location.href)}catch(t){throw Error("Cannot prefetch '"+e+"' because it cannot be converted to a URL.")}T(n)||(0,u.startTransition)(()=>{var e;U({type:a.ACTION_PREFETCH,url:n,kind:null!=(e=null==t?void 0:t.kind)?e:a.PrefetchKind.FULL})})}},replace:(e,t)=>{void 0===t&&(t={}),(0,u.startTransition)(()=>{var n;$(e,"replace",null==(n=t.scroll)||n)})},push:(e,t)=>{void 0===t&&(t={}),(0,u.startTransition)(()=>{var n;$(e,"push",null==(n=t.scroll)||n)})},refresh:()=>{(0,u.startTransition)(()=>{U({type:a.ACTION_REFRESH,origin:window.location.origin})})},fastRefresh:()=>{throw Error("fastRefresh can only be used in development mode. Please use refresh instead.")}}),[U,$]);(0,u.useEffect)(()=>{window.next&&(window.next.router=z)},[z]),(0,u.useEffect)(()=>{function e(e){var t;e.persisted&&(null==(t=window.history.state)?void 0:t.__PRIVATE_NEXTJS_INTERNALS_TREE)&&(w.pendingMpaPath=void 0,U({type:a.ACTION_RESTORE,url:new URL(window.location.href),tree:window.history.state.__PRIVATE_NEXTJS_INTERNALS_TREE}))}return window.addEventListener("pageshow",e),()=>{window.removeEventListener("pageshow",e)}},[U]);let{pushRef:B}=(0,s.useUnwrapState)(I);if(B.mpaNavigation){if(w.pendingMpaPath!==F){let e=window.location;B.pendingPush?e.assign(F):e.replace(F),w.pendingMpaPath=F}(0,u.use)(b.unresolvedThenable)}(0,u.useEffect)(()=>{let e=window.history.pushState.bind(window.history),t=window.history.replaceState.bind(window.history),n=e=>{var t;let n=window.location.href,r=null==(t=window.history.state)?void 0:t.__PRIVATE_NEXTJS_INTERNALS_TREE;(0,u.startTransition)(()=>{U({type:a.ACTION_RESTORE,url:new URL(null!=e?e:n,n),tree:r})})};window.history.pushState=function(t,r,o){return(null==t?void 0:t.__NA)||(null==t?void 0:t._N)||(t=A(t),o&&n(o)),e(t,r,o)},window.history.replaceState=function(e,r,o){return(null==e?void 0:e.__NA)||(null==e?void 0:e._N)||(e=A(e),o&&n(o)),t(e,r,o)};let r=e=>{let{state:t}=e;if(t){if(!t.__NA){window.location.reload();return}(0,u.startTransition)(()=>{U({type:a.ACTION_RESTORE,url:new URL(window.location.href),tree:t.__PRIVATE_NEXTJS_INTERNALS_TREE})})}};return window.addEventListener("popstate",r),()=>{window.history.pushState=e,window.history.replaceState=t,window.removeEventListener("popstate",r)}},[U]);let{cache:K,tree:W,nextUrl:V,focusAndScrollRef:Y}=(0,s.useUnwrapState)(I),X=(0,u.useMemo)(()=>(0,v.findHeadInCache)(K,W[1]),[K,W]),q=(0,u.useMemo)(()=>(function e(t,n){for(let r of(void 0===n&&(n={}),Object.values(t[1]))){let t=r[0],o=Array.isArray(t),u=o?t[1]:t;!u||u.startsWith(P.PAGE_SEGMENT_KEY)||(o&&("c"===t[2]||"oc"===t[2])?n[t[0]]=t[1].split("/"):o&&(n[t[0]]=t[1]),n=e(r,n))}return n})(W),[W]);if(null!==X){let[e,n]=X;t=(0,o.jsx)(N,{headCacheNode:e},n)}else t=null;let J=(0,o.jsxs)(_.RedirectBoundary,{children:[t,K.rsc,(0,o.jsx)(y.AppRouterAnnouncer,{tree:W})]});return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(C,{appRouterState:(0,s.useUnwrapState)(I),sync:k}),(0,o.jsx)(c.PathParamsContext.Provider,{value:q,children:(0,o.jsx)(c.PathnameContext.Provider,{value:H,children:(0,o.jsx)(c.SearchParamsContext.Provider,{value:L,children:(0,o.jsx)(l.GlobalLayoutRouterContext.Provider,{value:{buildId:n,changeByServerResponse:G,tree:W,focusAndScrollRef:Y,nextUrl:V},children:(0,o.jsx)(l.AppRouterContext.Provider,{value:z,children:(0,o.jsx)(l.LayoutRouterContext.Provider,{value:{childNodes:K.parallelRoutes,tree:W,url:F,loading:K.loading},children:J})})})})})})]})}function I(e){let{globalErrorComponent:t,...n}=e;return(0,o.jsx)(f.ErrorBoundary,{errorComponent:t,children:(0,o.jsx)(D,{...n})})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},96149:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"bailoutToClientRendering",{enumerable:!0,get:function(){return u}});let r=n(18993),o=n(51845);function u(e){let t=o.staticGenerationAsyncStorage.getStore();if((null==t||!t.forceStatic)&&(null==t?void 0:t.isStaticGeneration))throw new r.BailoutToCSRError(e)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},19107:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ClientPageRoot",{enumerable:!0,get:function(){return u}});let r=n(57437),o=n(54535);function u(e){let{Component:t,props:n}=e;return n.searchParams=(0,o.createDynamicallyTrackedSearchParams)(n.searchParams||{}),(0,r.jsx)(t,{...n})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},61060:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{ErrorBoundary:function(){return h},ErrorBoundaryHandler:function(){return f},GlobalError:function(){return d},default:function(){return p}});let r=n(47043),o=n(57437),u=r._(n(2265)),l=n(35475),a=n(89721),i=n(51845),c={error:{fontFamily:'system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"',height:"100vh",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},text:{fontSize:"14px",fontWeight:400,lineHeight:"28px",margin:"0 8px"}};function s(e){let{error:t}=e,n=i.staticGenerationAsyncStorage.getStore();if((null==n?void 0:n.isRevalidate)||(null==n?void 0:n.isStaticGeneration))throw console.error(t),t;return null}class f extends u.default.Component{static getDerivedStateFromError(e){if((0,a.isNextRouterError)(e))throw e;return{error:e}}static getDerivedStateFromProps(e,t){return e.pathname!==t.previousPathname&&t.error?{error:null,previousPathname:e.pathname}:{error:t.error,previousPathname:e.pathname}}render(){return this.state.error?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(s,{error:this.state.error}),this.props.errorStyles,this.props.errorScripts,(0,o.jsx)(this.props.errorComponent,{error:this.state.error,reset:this.reset})]}):this.props.children}constructor(e){super(e),this.reset=()=>{this.setState({error:null})},this.state={error:null,previousPathname:this.props.pathname}}}function d(e){let{error:t}=e,n=null==t?void 0:t.digest;return(0,o.jsxs)("html",{id:"__next_error__",children:[(0,o.jsx)("head",{}),(0,o.jsxs)("body",{children:[(0,o.jsx)(s,{error:t}),(0,o.jsx)("div",{style:c.error,children:(0,o.jsxs)("div",{children:[(0,o.jsx)("h2",{style:c.text,children:"Application error: a "+(n?"server":"client")+"-side exception has occurred (see the "+(n?"server logs":"browser console")+" for more information)."}),n?(0,o.jsx)("p",{style:c.text,children:"Digest: "+n}):null]})})]})]})}let p=d;function h(e){let{errorComponent:t,errorStyles:n,errorScripts:r,children:u}=e,a=(0,l.usePathname)();return t?(0,o.jsx)(f,{pathname:a,errorComponent:t,errorStyles:n,errorScripts:r,children:u}):(0,o.jsx)(o.Fragment,{children:u})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},46177:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{DynamicServerError:function(){return r},isDynamicServerError:function(){return o}});let n="DYNAMIC_SERVER_USAGE";class r extends Error{constructor(e){super("Dynamic server usage: "+e),this.description=e,this.digest=n}}function o(e){return"object"==typeof e&&null!==e&&"digest"in e&&"string"==typeof e.digest&&e.digest===n}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},89721:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isNextRouterError",{enumerable:!0,get:function(){return u}});let r=n(98200),o=n(88968);function u(e){return e&&e.digest&&((0,o.isRedirectError)(e)||(0,r.isNotFoundError)(e))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4707:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return E}});let r=n(47043),o=n(53099),u=n(57437),l=o._(n(2265)),a=r._(n(54887)),i=n(61956),c=n(44848),s=n(38137),f=n(61060),d=n(76015),p=n(7092),h=n(4123),y=n(80),_=n(73171),v=n(78505),b=n(28077),g=["bottom","height","left","right","top","width","x","y"];function m(e,t){let n=e.getBoundingClientRect();return n.top>=0&&n.top<=t}class R extends l.default.Component{componentDidMount(){this.handlePotentialScroll()}componentDidUpdate(){this.props.focusAndScrollRef.apply&&this.handlePotentialScroll()}render(){return this.props.children}constructor(...e){super(...e),this.handlePotentialScroll=()=>{let{focusAndScrollRef:e,segmentPath:t}=this.props;if(e.apply){var n;if(0!==e.segmentPaths.length&&!e.segmentPaths.some(e=>t.every((t,n)=>(0,d.matchSegment)(t,e[n]))))return;let r=null,o=e.hashFragment;if(o&&(r="top"===o?document.body:null!=(n=document.getElementById(o))?n:document.getElementsByName(o)[0]),r||(r="undefined"==typeof window?null:a.default.findDOMNode(this)),!(r instanceof Element))return;for(;!(r instanceof HTMLElement)||function(e){if(["sticky","fixed"].includes(getComputedStyle(e).position))return!0;let t=e.getBoundingClientRect();return g.every(e=>0===t[e])}(r);){if(null===r.nextElementSibling)return;r=r.nextElementSibling}e.apply=!1,e.hashFragment=null,e.segmentPaths=[],(0,p.handleSmoothScroll)(()=>{if(o){r.scrollIntoView();return}let e=document.documentElement,t=e.clientHeight;!m(r,t)&&(e.scrollTop=0,m(r,t)||r.scrollIntoView())},{dontForceLayout:!0,onlyHashChange:e.onlyHashChange}),e.onlyHashChange=!1,r.focus()}}}}function P(e){let{segmentPath:t,children:n}=e,r=(0,l.useContext)(i.GlobalLayoutRouterContext);if(!r)throw Error("invariant global layout router not mounted");return(0,u.jsx)(R,{segmentPath:t,focusAndScrollRef:r.focusAndScrollRef,children:n})}function j(e){let{parallelRouterKey:t,url:n,childNodes:r,segmentPath:o,tree:a,cacheKey:f}=e,p=(0,l.useContext)(i.GlobalLayoutRouterContext);if(!p)throw Error("invariant global layout router not mounted");let{buildId:h,changeByServerResponse:y,tree:_}=p,v=r.get(f);if(void 0===v){let e={lazyData:null,rsc:null,prefetchRsc:null,head:null,prefetchHead:null,parallelRoutes:new Map,lazyDataResolved:!1,loading:null};v=e,r.set(f,e)}let g=null!==v.prefetchRsc?v.prefetchRsc:v.rsc,m=(0,l.useDeferredValue)(v.rsc,g),R="object"==typeof m&&null!==m&&"function"==typeof m.then?(0,l.use)(m):m;if(!R){let e=v.lazyData;if(null===e){let t=function e(t,n){if(t){let[r,o]=t,u=2===t.length;if((0,d.matchSegment)(n[0],r)&&n[1].hasOwnProperty(o)){if(u){let t=e(void 0,n[1][o]);return[n[0],{...n[1],[o]:[t[0],t[1],t[2],"refetch"]}]}return[n[0],{...n[1],[o]:e(t.slice(2),n[1][o])}]}}return n}(["",...o],_),r=(0,b.hasInterceptionRouteInCurrentTree)(_);v.lazyData=e=(0,c.fetchServerResponse)(new URL(n,location.origin),t,r?p.nextUrl:null,h),v.lazyDataResolved=!1}let t=(0,l.use)(e);v.lazyDataResolved||(setTimeout(()=>{(0,l.startTransition)(()=>{y({previousTree:_,serverResponse:t})})}),v.lazyDataResolved=!0),(0,l.use)(s.unresolvedThenable)}return(0,u.jsx)(i.LayoutRouterContext.Provider,{value:{tree:a[1][t],childNodes:v.parallelRoutes,url:n,loading:v.loading},children:R})}function O(e){let{children:t,hasLoading:n,loading:r,loadingStyles:o,loadingScripts:a}=e;return n?(0,u.jsx)(l.Suspense,{fallback:(0,u.jsxs)(u.Fragment,{children:[o,a,r]}),children:t}):(0,u.jsx)(u.Fragment,{children:t})}function E(e){let{parallelRouterKey:t,segmentPath:n,error:r,errorStyles:o,errorScripts:a,templateStyles:c,templateScripts:s,template:d,notFound:p,notFoundStyles:b}=e,g=(0,l.useContext)(i.LayoutRouterContext);if(!g)throw Error("invariant expected layout router to be mounted");let{childNodes:m,tree:R,url:E,loading:S}=g,w=m.get(t);w||(w=new Map,m.set(t,w));let M=R[1][t][0],T=(0,_.getSegmentValue)(M),C=[M];return(0,u.jsx)(u.Fragment,{children:C.map(e=>{let l=(0,_.getSegmentValue)(e),g=(0,v.createRouterCacheKey)(e);return(0,u.jsxs)(i.TemplateContext.Provider,{value:(0,u.jsx)(P,{segmentPath:n,children:(0,u.jsx)(f.ErrorBoundary,{errorComponent:r,errorStyles:o,errorScripts:a,children:(0,u.jsx)(O,{hasLoading:!!S,loading:null==S?void 0:S[0],loadingStyles:null==S?void 0:S[1],loadingScripts:null==S?void 0:S[2],children:(0,u.jsx)(y.NotFoundBoundary,{notFound:p,notFoundStyles:b,children:(0,u.jsx)(h.RedirectBoundary,{children:(0,u.jsx)(j,{parallelRouterKey:t,url:E,tree:R,childNodes:w,segmentPath:n,cacheKey:g,isActive:T===l})})})})})}),children:[c,s,d]},(0,v.createRouterCacheKey)(e,!0))})})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},76015:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{canSegmentBeOverridden:function(){return u},matchSegment:function(){return o}});let r=n(87417),o=(e,t)=>"string"==typeof e?"string"==typeof t&&e===t:"string"!=typeof t&&e[0]===t[0]&&e[1]===t[1],u=(e,t)=>{var n;return!Array.isArray(e)&&!!Array.isArray(t)&&(null==(n=(0,r.getSegmentParam)(e))?void 0:n.param)===t[0]};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},35475:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{ReadonlyURLSearchParams:function(){return i.ReadonlyURLSearchParams},RedirectType:function(){return i.RedirectType},ServerInsertedHTMLContext:function(){return c.ServerInsertedHTMLContext},notFound:function(){return i.notFound},permanentRedirect:function(){return i.permanentRedirect},redirect:function(){return i.redirect},useParams:function(){return p},usePathname:function(){return f},useRouter:function(){return d},useSearchParams:function(){return s},useSelectedLayoutSegment:function(){return y},useSelectedLayoutSegments:function(){return h},useServerInsertedHTML:function(){return c.useServerInsertedHTML}});let r=n(2265),o=n(61956),u=n(79060),l=n(73171),a=n(84541),i=n(52646),c=n(55501);function s(){let e=(0,r.useContext)(u.SearchParamsContext),t=(0,r.useMemo)(()=>e?new i.ReadonlyURLSearchParams(e):null,[e]);if("undefined"==typeof window){let{bailoutToClientRendering:e}=n(96149);e("useSearchParams()")}return t}function f(){return(0,r.useContext)(u.PathnameContext)}function d(){let e=(0,r.useContext)(o.AppRouterContext);if(null===e)throw Error("invariant expected app router to be mounted");return e}function p(){return(0,r.useContext)(u.PathParamsContext)}function h(e){void 0===e&&(e="children");let t=(0,r.useContext)(o.LayoutRouterContext);return t?function e(t,n,r,o){let u;if(void 0===r&&(r=!0),void 0===o&&(o=[]),r)u=t[1][n];else{var i;let e=t[1];u=null!=(i=e.children)?i:Object.values(e)[0]}if(!u)return o;let c=u[0],s=(0,l.getSegmentValue)(c);return!s||s.startsWith(a.PAGE_SEGMENT_KEY)?o:(o.push(s),e(u,n,!1,o))}(t.tree,e):null}function y(e){void 0===e&&(e="children");let t=h(e);if(!t||0===t.length)return null;let n="children"===e?t[0]:t[t.length-1];return n===a.DEFAULT_SEGMENT_KEY?null:n}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},52646:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{ReadonlyURLSearchParams:function(){return l},RedirectType:function(){return r.RedirectType},notFound:function(){return o.notFound},permanentRedirect:function(){return r.permanentRedirect},redirect:function(){return r.redirect}});let r=n(88968),o=n(98200);class u extends Error{constructor(){super("Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams")}}class l extends URLSearchParams{append(){throw new u}delete(){throw new u}set(){throw new u}sort(){throw new u}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},80:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"NotFoundBoundary",{enumerable:!0,get:function(){return s}});let r=n(53099),o=n(57437),u=r._(n(2265)),l=n(35475),a=n(98200);n(31765);let i=n(61956);class c extends u.default.Component{componentDidCatch(){}static getDerivedStateFromError(e){if((0,a.isNotFoundError)(e))return{notFoundTriggered:!0};throw e}static getDerivedStateFromProps(e,t){return e.pathname!==t.previousPathname&&t.notFoundTriggered?{notFoundTriggered:!1,previousPathname:e.pathname}:{notFoundTriggered:t.notFoundTriggered,previousPathname:e.pathname}}render(){return this.state.notFoundTriggered?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("meta",{name:"robots",content:"noindex"}),!1,this.props.notFoundStyles,this.props.notFound]}):this.props.children}constructor(e){super(e),this.state={notFoundTriggered:!!e.asNotFound,previousPathname:e.pathname}}}function s(e){let{notFound:t,notFoundStyles:n,asNotFound:r,children:a}=e,s=(0,l.usePathname)(),f=(0,u.useContext)(i.MissingSlotContext);return t?(0,o.jsx)(c,{pathname:s,notFound:t,notFoundStyles:n,asNotFound:r,missingSlots:f,children:a}):(0,o.jsx)(o.Fragment,{children:a})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},98200:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{isNotFoundError:function(){return o},notFound:function(){return r}});let n="NEXT_NOT_FOUND";function r(){let e=Error(n);throw e.digest=n,e}function o(e){return"object"==typeof e&&null!==e&&"digest"in e&&e.digest===n}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},29744:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"PromiseQueue",{enumerable:!0,get:function(){return c}});let r=n(2522),o=n(90675);var u=o._("_maxConcurrency"),l=o._("_runningCount"),a=o._("_queue"),i=o._("_processNext");class c{enqueue(e){let t,n;let o=new Promise((e,r)=>{t=e,n=r}),u=async()=>{try{r._(this,l)[l]++;let n=await e();t(n)}catch(e){n(e)}finally{r._(this,l)[l]--,r._(this,i)[i]()}};return r._(this,a)[a].push({promiseFn:o,task:u}),r._(this,i)[i](),o}bump(e){let t=r._(this,a)[a].findIndex(t=>t.promiseFn===e);if(t>-1){let e=r._(this,a)[a].splice(t,1)[0];r._(this,a)[a].unshift(e),r._(this,i)[i](!0)}}constructor(e=5){Object.defineProperty(this,i,{value:s}),Object.defineProperty(this,u,{writable:!0,value:void 0}),Object.defineProperty(this,l,{writable:!0,value:void 0}),Object.defineProperty(this,a,{writable:!0,value:void 0}),r._(this,u)[u]=e,r._(this,l)[l]=0,r._(this,a)[a]=[]}}function s(e){if(void 0===e&&(e=!1),(r._(this,l)[l]0){var t;null==(t=r._(this,a)[a].shift())||t.task()}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4123:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{RedirectBoundary:function(){return s},RedirectErrorBoundary:function(){return c}});let r=n(53099),o=n(57437),u=r._(n(2265)),l=n(35475),a=n(88968);function i(e){let{redirect:t,reset:n,redirectType:r}=e,o=(0,l.useRouter)();return(0,u.useEffect)(()=>{u.default.startTransition(()=>{r===a.RedirectType.push?o.push(t,{}):o.replace(t,{}),n()})},[t,r,n,o]),null}class c extends u.default.Component{static getDerivedStateFromError(e){if((0,a.isRedirectError)(e))return{redirect:(0,a.getURLFromRedirectError)(e),redirectType:(0,a.getRedirectTypeFromError)(e)};throw e}render(){let{redirect:e,redirectType:t}=this.state;return null!==e&&null!==t?(0,o.jsx)(i,{redirect:e,redirectType:t,reset:()=>this.setState({redirect:null})}):this.props.children}constructor(e){super(e),this.state={redirect:null,redirectType:null}}}function s(e){let{children:t}=e,n=(0,l.useRouter)();return(0,o.jsx)(c,{router:n,children:t})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5001:function(e,t){"use strict";var n,r;Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"RedirectStatusCode",{enumerable:!0,get:function(){return n}}),(r=n||(n={}))[r.SeeOther=303]="SeeOther",r[r.TemporaryRedirect=307]="TemporaryRedirect",r[r.PermanentRedirect=308]="PermanentRedirect",("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},88968:function(e,t,n){"use strict";var r,o;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{RedirectType:function(){return r},getRedirectError:function(){return c},getRedirectStatusCodeFromError:function(){return y},getRedirectTypeFromError:function(){return h},getURLFromRedirectError:function(){return p},isRedirectError:function(){return d},permanentRedirect:function(){return f},redirect:function(){return s}});let u=n(20544),l=n(90295),a=n(5001),i="NEXT_REDIRECT";function c(e,t,n){void 0===n&&(n=a.RedirectStatusCode.TemporaryRedirect);let r=Error(i);r.digest=i+";"+t+";"+e+";"+n+";";let o=u.requestAsyncStorage.getStore();return o&&(r.mutableCookies=o.mutableCookies),r}function s(e,t){void 0===t&&(t="replace");let n=l.actionAsyncStorage.getStore();throw c(e,t,(null==n?void 0:n.isAction)?a.RedirectStatusCode.SeeOther:a.RedirectStatusCode.TemporaryRedirect)}function f(e,t){void 0===t&&(t="replace");let n=l.actionAsyncStorage.getStore();throw c(e,t,(null==n?void 0:n.isAction)?a.RedirectStatusCode.SeeOther:a.RedirectStatusCode.PermanentRedirect)}function d(e){if("object"!=typeof e||null===e||!("digest"in e)||"string"!=typeof e.digest)return!1;let[t,n,r,o]=e.digest.split(";",4),u=Number(o);return t===i&&("replace"===n||"push"===n)&&"string"==typeof r&&!isNaN(u)&&u in a.RedirectStatusCode}function p(e){return d(e)?e.digest.split(";",3)[2]:null}function h(e){if(!d(e))throw Error("Not a redirect error");return e.digest.split(";",2)[1]}function y(e){if(!d(e))throw Error("Not a redirect error");return Number(e.digest.split(";",4)[3])}(o=r||(r={})).push="push",o.replace="replace",("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},36423:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return a}});let r=n(53099),o=n(57437),u=r._(n(2265)),l=n(61956);function a(){let e=(0,u.useContext)(l.TemplateContext);return(0,o.jsx)(o.Fragment,{children:e})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},20544:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{getExpectedRequestStore:function(){return o},requestAsyncStorage:function(){return r.requestAsyncStorage}});let r=n(25575);function o(e){let t=r.requestAsyncStorage.getStore();if(t)return t;throw Error("`"+e+"` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context")}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},22356:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"applyFlightData",{enumerable:!0,get:function(){return u}});let r=n(27420),o=n(92576);function u(e,t,n,u){let[l,a,i]=n.slice(-3);if(null===a)return!1;if(3===n.length){let n=a[2],o=a[3];t.loading=o,t.rsc=n,t.prefetchRsc=null,(0,r.fillLazyItemsTillLeafWithHead)(t,e,l,a,i,u)}else t.rsc=e.rsc,t.prefetchRsc=e.prefetchRsc,t.parallelRoutes=new Map(e.parallelRoutes),t.loading=e.loading,(0,o.fillCacheWithNewSubTreeData)(t,e,n,u);return!0}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},81935:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"applyRouterStatePatchToTree",{enumerable:!0,get:function(){return function e(t,n,r,a){let i;let[c,s,f,d,p]=n;if(1===t.length){let e=l(n,r,t);return(0,u.addRefreshMarkerToActiveParallelSegments)(e,a),e}let[h,y]=t;if(!(0,o.matchSegment)(h,c))return null;if(2===t.length)i=l(s[y],r,t);else if(null===(i=e(t.slice(2),s[y],r,a)))return null;let _=[t[0],{...s,[y]:i},f,d];return p&&(_[4]=!0),(0,u.addRefreshMarkerToActiveParallelSegments)(_,a),_}}});let r=n(84541),o=n(76015),u=n(50232);function l(e,t,n){let[u,a]=e,[i,c]=t;if(i===r.DEFAULT_SEGMENT_KEY&&u!==r.DEFAULT_SEGMENT_KEY)return e;if((0,o.matchSegment)(u,i)){let t={};for(let e in a)void 0!==c[e]?t[e]=l(a[e],c[e],n):t[e]=a[e];for(let e in c)t[e]||(t[e]=c[e]);let r=[u,t];return e[2]&&(r[2]=e[2]),e[3]&&(r[3]=e[3]),e[4]&&(r[4]=e[4]),r}return t}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},65556:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"clearCacheNodeDataForSegmentPath",{enumerable:!0,get:function(){return function e(t,n,o){let u=o.length<=2,[l,a]=o,i=(0,r.createRouterCacheKey)(a),c=n.parallelRoutes.get(l),s=t.parallelRoutes.get(l);s&&s!==c||(s=new Map(c),t.parallelRoutes.set(l,s));let f=null==c?void 0:c.get(i),d=s.get(i);if(u){d&&d.lazyData&&d!==f||s.set(i,{lazyData:null,rsc:null,prefetchRsc:null,head:null,prefetchHead:null,parallelRoutes:new Map,lazyDataResolved:!1,loading:null});return}if(!d||!f){d||s.set(i,{lazyData:null,rsc:null,prefetchRsc:null,head:null,prefetchHead:null,parallelRoutes:new Map,lazyDataResolved:!1,loading:null});return}return d===f&&(d={lazyData:d.lazyData,rsc:d.rsc,prefetchRsc:d.prefetchRsc,head:d.head,prefetchHead:d.prefetchHead,parallelRoutes:new Map(d.parallelRoutes),lazyDataResolved:d.lazyDataResolved,loading:d.loading},s.set(i,d)),e(d,f,o.slice(2))}}});let r=n(78505);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5410:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{computeChangedPath:function(){return s},extractPathFromFlightRouterState:function(){return c}});let r=n(91182),o=n(84541),u=n(76015),l=e=>"/"===e[0]?e.slice(1):e,a=e=>"string"==typeof e?"children"===e?"":e:e[1];function i(e){return e.reduce((e,t)=>""===(t=l(t))||(0,o.isGroupSegment)(t)?e:e+"/"+t,"")||"/"}function c(e){var t;let n=Array.isArray(e[0])?e[0][1]:e[0];if(n===o.DEFAULT_SEGMENT_KEY||r.INTERCEPTION_ROUTE_MARKERS.some(e=>n.startsWith(e)))return;if(n.startsWith(o.PAGE_SEGMENT_KEY))return"";let u=[a(n)],l=null!=(t=e[1])?t:{},s=l.children?c(l.children):void 0;if(void 0!==s)u.push(s);else for(let[e,t]of Object.entries(l)){if("children"===e)continue;let n=c(t);void 0!==n&&u.push(n)}return i(u)}function s(e,t){let n=function e(t,n){let[o,l]=t,[i,s]=n,f=a(o),d=a(i);if(r.INTERCEPTION_ROUTE_MARKERS.some(e=>f.startsWith(e)||d.startsWith(e)))return"";if(!(0,u.matchSegment)(o,i)){var p;return null!=(p=c(n))?p:""}for(let t in l)if(s[t]){let n=e(l[t],s[t]);if(null!==n)return a(i)+"/"+n}return null}(e,t);return null==n||"/"===n?n:i(n.split("/"))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},33456:function(e,t){"use strict";function n(e,t){return void 0===t&&(t=!0),e.pathname+e.search+(t?e.hash:"")}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createHrefFromUrl",{enumerable:!0,get:function(){return n}}),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},82952:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createInitialRouterState",{enumerable:!0,get:function(){return c}});let r=n(33456),o=n(27420),u=n(5410),l=n(60305),a=n(24673),i=n(50232);function c(e){var t;let{buildId:n,initialTree:c,initialSeedData:s,urlParts:f,initialParallelRoutes:d,location:p,initialHead:h,couldBeIntercepted:y}=e,_=f.join("/"),v=!p,b={lazyData:null,rsc:s[2],prefetchRsc:null,head:null,prefetchHead:null,parallelRoutes:v?new Map:d,lazyDataResolved:!1,loading:s[3]},g=p?(0,r.createHrefFromUrl)(p):_;(0,i.addRefreshMarkerToActiveParallelSegments)(c,g);let m=new Map;(null===d||0===d.size)&&(0,o.fillLazyItemsTillLeafWithHead)(b,void 0,c,s,h);let R={buildId:n,tree:c,cache:b,prefetchCache:m,pushRef:{pendingPush:!1,mpaNavigation:!1,preserveCustomHistoryState:!0},focusAndScrollRef:{apply:!1,onlyHashChange:!1,hashFragment:null,segmentPaths:[]},canonicalUrl:g,nextUrl:null!=(t=(0,u.extractPathFromFlightRouterState)(c)||(null==p?void 0:p.pathname))?t:null};if(p){let e=new URL(""+p.pathname+p.search,p.origin),t=[["",c,null,null]];(0,l.createPrefetchCacheEntryForInitialLoad)({url:e,kind:a.PrefetchKind.AUTO,data:[t,void 0,!1,y],tree:R.tree,prefetchCache:R.prefetchCache,nextUrl:R.nextUrl})}return R}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},78505:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createRouterCacheKey",{enumerable:!0,get:function(){return o}});let r=n(84541);function o(e,t){return(void 0===t&&(t=!1),Array.isArray(e))?e[0]+"|"+e[1]+"|"+e[2]:t&&e.startsWith(r.PAGE_SEGMENT_KEY)?r.PAGE_SEGMENT_KEY:e}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},44848:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"fetchServerResponse",{enumerable:!0,get:function(){return f}});let r=n(6866),o=n(12846),u=n(83079),l=n(24673),a=n(37207),i=n(91311),{createFromFetch:c}=n(6671);function s(e){return[(0,o.urlToUrlWithoutFlightMarker)(e).toString(),void 0,!1,!1]}async function f(e,t,n,f,d){let p={[r.RSC_HEADER]:"1",[r.NEXT_ROUTER_STATE_TREE]:(0,i.prepareFlightRouterStateForRequest)(t)};d===l.PrefetchKind.AUTO&&(p[r.NEXT_ROUTER_PREFETCH_HEADER]="1"),n&&(p[r.NEXT_URL]=n);let h=(0,a.hexHash)([p[r.NEXT_ROUTER_PREFETCH_HEADER]||"0",p[r.NEXT_ROUTER_STATE_TREE],p[r.NEXT_URL]].join(","));try{var y;let t=new URL(e);t.searchParams.set(r.NEXT_RSC_UNION_QUERY,h);let n=await fetch(t,{credentials:"same-origin",headers:p}),l=(0,o.urlToUrlWithoutFlightMarker)(n.url),a=n.redirected?l:void 0,i=n.headers.get("content-type")||"",d=!!n.headers.get(r.NEXT_DID_POSTPONE_HEADER),_=!!(null==(y=n.headers.get("vary"))?void 0:y.includes(r.NEXT_URL));if(i!==r.RSC_CONTENT_TYPE_HEADER||!n.ok)return e.hash&&(l.hash=e.hash),s(l.toString());let[v,b]=await c(Promise.resolve(n),{callServer:u.callServer});if(f!==v)return s(n.url);return[b,a,d,_]}catch(t){return console.error("Failed to fetch RSC payload for "+e+". Falling back to browser navigation.",t),[e.toString(),void 0,!1,!1]}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},92576:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"fillCacheWithNewSubTreeData",{enumerable:!0,get:function(){return function e(t,n,l,a){let i=l.length<=5,[c,s]=l,f=(0,u.createRouterCacheKey)(s),d=n.parallelRoutes.get(c);if(!d)return;let p=t.parallelRoutes.get(c);p&&p!==d||(p=new Map(d),t.parallelRoutes.set(c,p));let h=d.get(f),y=p.get(f);if(i){if(!y||!y.lazyData||y===h){let e=l[3];y={lazyData:null,rsc:e[2],prefetchRsc:null,head:null,prefetchHead:null,loading:e[3],parallelRoutes:h?new Map(h.parallelRoutes):new Map,lazyDataResolved:!1},h&&(0,r.invalidateCacheByRouterState)(y,h,l[2]),(0,o.fillLazyItemsTillLeafWithHead)(y,h,l[2],e,l[4],a),p.set(f,y)}return}y&&h&&(y===h&&(y={lazyData:y.lazyData,rsc:y.rsc,prefetchRsc:y.prefetchRsc,head:y.head,prefetchHead:y.prefetchHead,parallelRoutes:new Map(y.parallelRoutes),lazyDataResolved:!1,loading:y.loading},p.set(f,y)),e(y,h,l.slice(2),a))}}});let r=n(94377),o=n(27420),u=n(78505);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},27420:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"fillLazyItemsTillLeafWithHead",{enumerable:!0,get:function(){return function e(t,n,u,l,a,i){if(0===Object.keys(u[1]).length){t.head=a;return}for(let c in u[1]){let s;let f=u[1][c],d=f[0],p=(0,r.createRouterCacheKey)(d),h=null!==l&&void 0!==l[1][c]?l[1][c]:null;if(n){let r=n.parallelRoutes.get(c);if(r){let n;let u=(null==i?void 0:i.kind)==="auto"&&i.status===o.PrefetchCacheEntryStatus.reusable,l=new Map(r),s=l.get(p);n=null!==h?{lazyData:null,rsc:h[2],prefetchRsc:null,head:null,prefetchHead:null,loading:h[3],parallelRoutes:new Map(null==s?void 0:s.parallelRoutes),lazyDataResolved:!1}:u&&s?{lazyData:s.lazyData,rsc:s.rsc,prefetchRsc:s.prefetchRsc,head:s.head,prefetchHead:s.prefetchHead,parallelRoutes:new Map(s.parallelRoutes),lazyDataResolved:s.lazyDataResolved,loading:s.loading}:{lazyData:null,rsc:null,prefetchRsc:null,head:null,prefetchHead:null,parallelRoutes:new Map(null==s?void 0:s.parallelRoutes),lazyDataResolved:!1,loading:null},l.set(p,n),e(n,s,f,h||null,a,i),t.parallelRoutes.set(c,l);continue}}if(null!==h){let e=h[2],t=h[3];s={lazyData:null,rsc:e,prefetchRsc:null,head:null,prefetchHead:null,parallelRoutes:new Map,lazyDataResolved:!1,loading:t}}else s={lazyData:null,rsc:null,prefetchRsc:null,head:null,prefetchHead:null,parallelRoutes:new Map,lazyDataResolved:!1,loading:null};let y=t.parallelRoutes.get(c);y?y.set(p,s):t.parallelRoutes.set(c,new Map([[p,s]])),e(s,void 0,f,h,a,i)}}}});let r=n(78505),o=n(24673);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},44510:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"handleMutable",{enumerable:!0,get:function(){return u}});let r=n(5410);function o(e){return void 0!==e}function u(e,t){var n,u,l;let a=null==(u=t.shouldScroll)||u,i=e.nextUrl;if(o(t.patchedTree)){let n=(0,r.computeChangedPath)(e.tree,t.patchedTree);n?i=n:i||(i=e.canonicalUrl)}return{buildId:e.buildId,canonicalUrl:o(t.canonicalUrl)?t.canonicalUrl===e.canonicalUrl?e.canonicalUrl:t.canonicalUrl:e.canonicalUrl,pushRef:{pendingPush:o(t.pendingPush)?t.pendingPush:e.pushRef.pendingPush,mpaNavigation:o(t.mpaNavigation)?t.mpaNavigation:e.pushRef.mpaNavigation,preserveCustomHistoryState:o(t.preserveCustomHistoryState)?t.preserveCustomHistoryState:e.pushRef.preserveCustomHistoryState},focusAndScrollRef:{apply:!!a&&(!!o(null==t?void 0:t.scrollableSegments)||e.focusAndScrollRef.apply),onlyHashChange:!!t.hashFragment&&e.canonicalUrl.split("#",1)[0]===(null==(n=t.canonicalUrl)?void 0:n.split("#",1)[0]),hashFragment:a?t.hashFragment&&""!==t.hashFragment?decodeURIComponent(t.hashFragment.slice(1)):e.focusAndScrollRef.hashFragment:null,segmentPaths:a?null!=(l=null==t?void 0:t.scrollableSegments)?l:e.focusAndScrollRef.segmentPaths:[]},cache:t.cache?t.cache:e.cache,prefetchCache:t.prefetchCache?t.prefetchCache:e.prefetchCache,tree:o(t.patchedTree)?t.patchedTree:e.tree,nextUrl:i}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},77831:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"handleSegmentMismatch",{enumerable:!0,get:function(){return o}});let r=n(95967);function o(e,t,n){return(0,r.handleExternalUrl)(e,{},e.canonicalUrl,!0)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},77058:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"invalidateCacheBelowFlightSegmentPath",{enumerable:!0,get:function(){return function e(t,n,o){let u=o.length<=2,[l,a]=o,i=(0,r.createRouterCacheKey)(a),c=n.parallelRoutes.get(l);if(!c)return;let s=t.parallelRoutes.get(l);if(s&&s!==c||(s=new Map(c),t.parallelRoutes.set(l,s)),u){s.delete(i);return}let f=c.get(i),d=s.get(i);d&&f&&(d===f&&(d={lazyData:d.lazyData,rsc:d.rsc,prefetchRsc:d.prefetchRsc,head:d.head,prefetchHead:d.prefetchHead,parallelRoutes:new Map(d.parallelRoutes),lazyDataResolved:d.lazyDataResolved},s.set(i,d)),e(d,f,o.slice(2)))}}});let r=n(78505);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},94377:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"invalidateCacheByRouterState",{enumerable:!0,get:function(){return o}});let r=n(78505);function o(e,t,n){for(let o in n[1]){let u=n[1][o][0],l=(0,r.createRouterCacheKey)(u),a=t.parallelRoutes.get(o);if(a){let t=new Map(a);t.delete(l),e.parallelRoutes.set(o,t)}}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},63237:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isNavigatingToNewRootLayout",{enumerable:!0,get:function(){return function e(t,n){let r=t[0],o=n[0];if(Array.isArray(r)&&Array.isArray(o)){if(r[0]!==o[0]||r[2]!==o[2])return!0}else if(r!==o)return!0;if(t[4])return!n[4];if(n[4])return!0;let u=Object.values(t[1])[0],l=Object.values(n[1])[0];return!u||!l||e(u,l)}}}),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},56118:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{abortTask:function(){return c},listenForDynamicRequest:function(){return a},updateCacheNodeOnNavigation:function(){return function e(t,n,a,c,s){let f=n[1],d=a[1],p=c[1],h=t.parallelRoutes,y=new Map(h),_={},v=null;for(let t in d){let n;let a=d[t],c=f[t],b=h.get(t),g=p[t],m=a[0],R=(0,u.createRouterCacheKey)(m),P=void 0!==c?c[0]:void 0,j=void 0!==b?b.get(R):void 0;if(null!==(n=m===r.PAGE_SEGMENT_KEY?l(a,void 0!==g?g:null,s):m===r.DEFAULT_SEGMENT_KEY?void 0!==c?{route:c,node:null,children:null}:l(a,void 0!==g?g:null,s):void 0!==P&&(0,o.matchSegment)(m,P)&&void 0!==j&&void 0!==c?null!=g?e(j,c,a,g,s):function(e){let t=i(e,null,null);return{route:e,node:t,children:null}}(a):l(a,void 0!==g?g:null,s))){null===v&&(v=new Map),v.set(t,n);let e=n.node;if(null!==e){let n=new Map(b);n.set(R,e),y.set(t,n)}_[t]=n.route}else _[t]=a}if(null===v)return null;let b={lazyData:null,rsc:t.rsc,prefetchRsc:t.prefetchRsc,head:t.head,prefetchHead:t.prefetchHead,loading:t.loading,parallelRoutes:y,lazyDataResolved:!1};return{route:function(e,t){let n=[e[0],t];return 2 in e&&(n[2]=e[2]),3 in e&&(n[3]=e[3]),4 in e&&(n[4]=e[4]),n}(a,_),node:b,children:v}}},updateCacheNodeOnPopstateRestoration:function(){return function e(t,n){let r=n[1],o=t.parallelRoutes,l=new Map(o);for(let t in r){let n=r[t],a=n[0],i=(0,u.createRouterCacheKey)(a),c=o.get(t);if(void 0!==c){let r=c.get(i);if(void 0!==r){let o=e(r,n),u=new Map(c);u.set(i,o),l.set(t,u)}}}let a=t.rsc,i=d(a)&&"pending"===a.status;return{lazyData:null,rsc:a,head:t.head,prefetchHead:i?t.prefetchHead:null,prefetchRsc:i?t.prefetchRsc:null,loading:i?t.loading:null,parallelRoutes:l,lazyDataResolved:!1}}}});let r=n(84541),o=n(76015),u=n(78505);function l(e,t,n){let r=i(e,t,n);return{route:e,node:r,children:null}}function a(e,t){t.then(t=>{for(let n of t[0]){let t=n.slice(0,-3),r=n[n.length-3],l=n[n.length-2],a=n[n.length-1];"string"!=typeof t&&function(e,t,n,r,l){let a=e;for(let e=0;e{c(e,t)})}function i(e,t,n){let r=e[1],o=null!==t?t[1]:null,l=new Map;for(let e in r){let t=r[e],a=null!==o?o[e]:null,c=t[0],s=(0,u.createRouterCacheKey)(c),f=i(t,void 0===a?null:a,n),d=new Map;d.set(s,f),l.set(e,d)}let a=0===l.size,c=null!==t?t[2]:null,s=null!==t?t[3]:null;return{lazyData:null,parallelRoutes:l,prefetchRsc:void 0!==c?c:null,prefetchHead:a?n:null,loading:void 0!==s?s:null,rsc:p(),head:a?p():null,lazyDataResolved:!1}}function c(e,t){let n=e.node;if(null===n)return;let r=e.children;if(null===r)s(e.route,n,t);else for(let e of r.values())c(e,t);e.node=null}function s(e,t,n){let r=e[1],o=t.parallelRoutes;for(let e in r){let t=r[e],l=o.get(e);if(void 0===l)continue;let a=t[0],i=(0,u.createRouterCacheKey)(a),c=l.get(i);void 0!==c&&s(t,c,n)}let l=t.rsc;d(l)&&(null===n?l.resolve(null):l.reject(n));let a=t.head;d(a)&&a.resolve(null)}let f=Symbol();function d(e){return e&&e.tag===f}function p(){let e,t;let n=new Promise((n,r)=>{e=n,t=r});return n.status="pending",n.resolve=t=>{"pending"===n.status&&(n.status="fulfilled",n.value=t,e(t))},n.reject=e=>{"pending"===n.status&&(n.status="rejected",n.reason=e,t(e))},n.tag=f,n}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},60305:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{createPrefetchCacheEntryForInitialLoad:function(){return c},getOrCreatePrefetchCacheEntry:function(){return i},prunePrefetchCache:function(){return f}});let r=n(33456),o=n(44848),u=n(24673),l=n(24819);function a(e,t){let n=(0,r.createHrefFromUrl)(e,!1);return t?t+"%"+n:n}function i(e){let t,{url:n,nextUrl:r,tree:o,buildId:l,prefetchCache:i,kind:c}=e,f=a(n,r),d=i.get(f);if(d)t=d;else{let e=a(n),r=i.get(e);r&&(t=r)}return t?(t.status=h(t),t.kind!==u.PrefetchKind.FULL&&c===u.PrefetchKind.FULL)?s({tree:o,url:n,buildId:l,nextUrl:r,prefetchCache:i,kind:null!=c?c:u.PrefetchKind.TEMPORARY}):(c&&t.kind===u.PrefetchKind.TEMPORARY&&(t.kind=c),t):s({tree:o,url:n,buildId:l,nextUrl:r,prefetchCache:i,kind:c||u.PrefetchKind.TEMPORARY})}function c(e){let{nextUrl:t,tree:n,prefetchCache:r,url:o,kind:l,data:i}=e,[,,,c]=i,s=c?a(o,t):a(o),f={treeAtTimeOfPrefetch:n,data:Promise.resolve(i),kind:l,prefetchTime:Date.now(),lastUsedTime:Date.now(),key:s,status:u.PrefetchCacheEntryStatus.fresh};return r.set(s,f),f}function s(e){let{url:t,kind:n,tree:r,nextUrl:i,buildId:c,prefetchCache:s}=e,f=a(t),d=l.prefetchQueue.enqueue(()=>(0,o.fetchServerResponse)(t,r,i,c,n).then(e=>{let[,,,n]=e;return n&&function(e){let{url:t,nextUrl:n,prefetchCache:r}=e,o=a(t),u=r.get(o);if(!u)return;let l=a(t,n);r.set(l,u),r.delete(o)}({url:t,nextUrl:i,prefetchCache:s}),e})),p={treeAtTimeOfPrefetch:r,data:d,kind:n,prefetchTime:Date.now(),lastUsedTime:null,key:f,status:u.PrefetchCacheEntryStatus.fresh};return s.set(f,p),p}function f(e){for(let[t,n]of e)h(n)===u.PrefetchCacheEntryStatus.expired&&e.delete(t)}let d=1e3*Number("30"),p=1e3*Number("300");function h(e){let{kind:t,prefetchTime:n,lastUsedTime:r}=e;return Date.now()<(null!=r?r:n)+d?r?u.PrefetchCacheEntryStatus.reusable:u.PrefetchCacheEntryStatus.fresh:"auto"===t&&Date.now(){let[n,f]=t,h=!1;if(E.lastUsedTime||(E.lastUsedTime=Date.now(),h=!0),"string"==typeof n)return _(e,R,n,O);if(document.getElementById("__next-page-redirect"))return _(e,R,j,O);let b=e.tree,g=e.cache,w=[];for(let t of n){let n=t.slice(0,-4),r=t.slice(-3)[0],c=["",...n],f=(0,u.applyRouterStatePatchToTree)(c,b,r,j);if(null===f&&(f=(0,u.applyRouterStatePatchToTree)(c,S,r,j)),null!==f){if((0,a.isNavigatingToNewRootLayout)(b,f))return _(e,R,j,O);let u=(0,d.createEmptyCacheNode)(),m=!1;for(let e of(E.status!==i.PrefetchCacheEntryStatus.stale||h?m=(0,s.applyFlightData)(g,u,t,E):(m=function(e,t,n,r){let o=!1;for(let u of(e.rsc=t.rsc,e.prefetchRsc=t.prefetchRsc,e.loading=t.loading,e.parallelRoutes=new Map(t.parallelRoutes),v(r).map(e=>[...n,...e])))(0,y.clearCacheNodeDataForSegmentPath)(e,t,u),o=!0;return o}(u,g,n,r),E.lastUsedTime=Date.now()),(0,l.shouldHardNavigate)(c,b)?(u.rsc=g.rsc,u.prefetchRsc=g.prefetchRsc,(0,o.invalidateCacheBelowFlightSegmentPath)(u,g,n),R.cache=u):m&&(R.cache=u,g=u),b=f,v(r))){let t=[...n,...e];t[t.length-1]!==p.DEFAULT_SEGMENT_KEY&&w.push(t)}}}return R.patchedTree=b,R.canonicalUrl=f?(0,r.createHrefFromUrl)(f):j,R.pendingPush=O,R.scrollableSegments=w,R.hashFragment=P,R.shouldScroll=m,(0,c.handleMutable)(e,R)},()=>e)};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},24819:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{prefetchQueue:function(){return l},prefetchReducer:function(){return a}});let r=n(6866),o=n(29744),u=n(60305),l=new o.PromiseQueue(5);function a(e,t){(0,u.prunePrefetchCache)(e.prefetchCache);let{url:n}=t;return n.searchParams.delete(r.NEXT_RSC_UNION_QUERY),(0,u.getOrCreatePrefetchCacheEntry)({url:n,nextUrl:e.nextUrl,prefetchCache:e.prefetchCache,kind:t.kind,tree:e.tree,buildId:e.buildId}),e}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},99601:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"refreshReducer",{enumerable:!0,get:function(){return h}});let r=n(44848),o=n(33456),u=n(81935),l=n(63237),a=n(95967),i=n(44510),c=n(27420),s=n(12846),f=n(77831),d=n(28077),p=n(50232);function h(e,t){let{origin:n}=t,h={},y=e.canonicalUrl,_=e.tree;h.preserveCustomHistoryState=!1;let v=(0,s.createEmptyCacheNode)(),b=(0,d.hasInterceptionRouteInCurrentTree)(e.tree);return v.lazyData=(0,r.fetchServerResponse)(new URL(y,n),[_[0],_[1],_[2],"refetch"],b?e.nextUrl:null,e.buildId),v.lazyData.then(async n=>{let[r,s]=n;if("string"==typeof r)return(0,a.handleExternalUrl)(e,h,r,e.pushRef.pendingPush);for(let n of(v.lazyData=null,r)){if(3!==n.length)return console.log("REFRESH FAILED"),e;let[r]=n,i=(0,u.applyRouterStatePatchToTree)([""],_,r,e.canonicalUrl);if(null===i)return(0,f.handleSegmentMismatch)(e,t,r);if((0,l.isNavigatingToNewRootLayout)(_,i))return(0,a.handleExternalUrl)(e,h,y,e.pushRef.pendingPush);let d=s?(0,o.createHrefFromUrl)(s):void 0;s&&(h.canonicalUrl=d);let[g,m]=n.slice(-2);if(null!==g){let e=g[2];v.rsc=e,v.prefetchRsc=null,(0,c.fillLazyItemsTillLeafWithHead)(v,void 0,r,g,m),h.prefetchCache=new Map}await (0,p.refreshInactiveParallelSegments)({state:e,updatedTree:i,updatedCache:v,includeNextUrl:b,canonicalUrl:h.canonicalUrl||e.canonicalUrl}),h.cache=v,h.patchedTree=i,h.canonicalUrl=y,_=i}return(0,i.handleMutable)(e,h)},()=>e)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},77784:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"restoreReducer",{enumerable:!0,get:function(){return u}});let r=n(33456),o=n(5410);function u(e,t){var n;let{url:u,tree:l}=t,a=(0,r.createHrefFromUrl)(u),i=l||e.tree,c=e.cache;return{buildId:e.buildId,canonicalUrl:a,pushRef:{pendingPush:!1,mpaNavigation:!1,preserveCustomHistoryState:!0},focusAndScrollRef:e.focusAndScrollRef,cache:c,prefetchCache:e.prefetchCache,tree:i,nextUrl:null!=(n=(0,o.extractPathFromFlightRouterState)(i))?n:u.pathname}}n(56118),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},13722:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"serverActionReducer",{enumerable:!0,get:function(){return m}});let r=n(83079),o=n(6866),u=n(1634),l=n(33456),a=n(95967),i=n(81935),c=n(63237),s=n(44510),f=n(27420),d=n(12846),p=n(28077),h=n(77831),y=n(50232),_=n(91311),{createFromFetch:v,encodeReply:b}=n(6671);async function g(e,t,n){let l,{actionId:a,actionArgs:i}=n,c=await b(i),s=await fetch("",{method:"POST",headers:{Accept:o.RSC_CONTENT_TYPE_HEADER,[o.ACTION]:a,[o.NEXT_ROUTER_STATE_TREE]:(0,_.prepareFlightRouterStateForRequest)(e.tree),...t?{[o.NEXT_URL]:t}:{}},body:c}),f=s.headers.get("x-action-redirect");try{let e=JSON.parse(s.headers.get("x-action-revalidated")||"[[],0,0]");l={paths:e[0]||[],tag:!!e[1],cookie:e[2]}}catch(e){l={paths:[],tag:!1,cookie:!1}}let d=f?new URL((0,u.addBasePath)(f),new URL(e.canonicalUrl,window.location.href)):void 0;if(s.headers.get("content-type")===o.RSC_CONTENT_TYPE_HEADER){let e=await v(Promise.resolve(s),{callServer:r.callServer});if(f){let[,t]=null!=e?e:[];return{actionFlightData:t,redirectLocation:d,revalidatedParts:l}}let[t,[,n]]=null!=e?e:[];return{actionResult:t,actionFlightData:n,redirectLocation:d,revalidatedParts:l}}return{redirectLocation:d,revalidatedParts:l}}function m(e,t){let{resolve:n,reject:r}=t,o={},u=e.canonicalUrl,_=e.tree;o.preserveCustomHistoryState=!1;let v=e.nextUrl&&(0,p.hasInterceptionRouteInCurrentTree)(e.tree)?e.nextUrl:null;return o.inFlightServerAction=g(e,v,t),o.inFlightServerAction.then(async r=>{let{actionResult:p,actionFlightData:b,redirectLocation:g}=r;if(g&&(e.pushRef.pendingPush=!0,o.pendingPush=!0),!b)return(n(p),g)?(0,a.handleExternalUrl)(e,o,g.href,e.pushRef.pendingPush):e;if("string"==typeof b)return(0,a.handleExternalUrl)(e,o,b,e.pushRef.pendingPush);if(o.inFlightServerAction=null,g){let e=(0,l.createHrefFromUrl)(g,!1);o.canonicalUrl=e}for(let n of b){if(3!==n.length)return console.log("SERVER ACTION APPLY FAILED"),e;let[r]=n,s=(0,i.applyRouterStatePatchToTree)([""],_,r,g?(0,l.createHrefFromUrl)(g):e.canonicalUrl);if(null===s)return(0,h.handleSegmentMismatch)(e,t,r);if((0,c.isNavigatingToNewRootLayout)(_,s))return(0,a.handleExternalUrl)(e,o,u,e.pushRef.pendingPush);let[p,b]=n.slice(-2),m=null!==p?p[2]:null;if(null!==m){let t=(0,d.createEmptyCacheNode)();t.rsc=m,t.prefetchRsc=null,(0,f.fillLazyItemsTillLeafWithHead)(t,void 0,r,p,b),await (0,y.refreshInactiveParallelSegments)({state:e,updatedTree:s,updatedCache:t,includeNextUrl:!!v,canonicalUrl:o.canonicalUrl||e.canonicalUrl}),o.cache=t,o.prefetchCache=new Map}o.patchedTree=s,_=s}return n(p),(0,s.handleMutable)(e,o)},t=>(r(t),e))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},68448:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"serverPatchReducer",{enumerable:!0,get:function(){return f}});let r=n(33456),o=n(81935),u=n(63237),l=n(95967),a=n(22356),i=n(44510),c=n(12846),s=n(77831);function f(e,t){let{serverResponse:n}=t,[f,d]=n,p={};if(p.preserveCustomHistoryState=!1,"string"==typeof f)return(0,l.handleExternalUrl)(e,p,f,e.pushRef.pendingPush);let h=e.tree,y=e.cache;for(let n of f){let i=n.slice(0,-4),[f]=n.slice(-3,-2),_=(0,o.applyRouterStatePatchToTree)(["",...i],h,f,e.canonicalUrl);if(null===_)return(0,s.handleSegmentMismatch)(e,t,f);if((0,u.isNavigatingToNewRootLayout)(h,_))return(0,l.handleExternalUrl)(e,p,e.canonicalUrl,e.pushRef.pendingPush);let v=d?(0,r.createHrefFromUrl)(d):void 0;v&&(p.canonicalUrl=v);let b=(0,c.createEmptyCacheNode)();(0,a.applyFlightData)(y,b,n),p.patchedTree=_,p.cache=b,y=b,h=_}return(0,i.handleMutable)(e,p)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},50232:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{addRefreshMarkerToActiveParallelSegments:function(){return function e(t,n){let[r,o,,l]=t;for(let a in r.includes(u.PAGE_SEGMENT_KEY)&&"refresh"!==l&&(t[2]=n,t[3]="refresh"),o)e(o[a],n)}},refreshInactiveParallelSegments:function(){return l}});let r=n(22356),o=n(44848),u=n(84541);async function l(e){let t=new Set;await a({...e,rootTree:e.updatedTree,fetchedSegments:t})}async function a(e){let{state:t,updatedTree:n,updatedCache:u,includeNextUrl:l,fetchedSegments:i,rootTree:c=n,canonicalUrl:s}=e,[,f,d,p]=n,h=[];if(d&&d!==s&&"refresh"===p&&!i.has(d)){i.add(d);let e=(0,o.fetchServerResponse)(new URL(d,location.origin),[c[0],c[1],c[2],"refetch"],l?t.nextUrl:null,t.buildId).then(e=>{let t=e[0];if("string"!=typeof t)for(let e of t)(0,r.applyFlightData)(u,u,e)});h.push(e)}for(let e in f){let n=a({state:t,updatedTree:f[e],updatedCache:u,includeNextUrl:l,fetchedSegments:i,rootTree:c,canonicalUrl:s});h.push(n)}await Promise.all(h)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},24673:function(e,t){"use strict";var n,r,o,u;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{ACTION_FAST_REFRESH:function(){return f},ACTION_NAVIGATE:function(){return a},ACTION_PREFETCH:function(){return s},ACTION_REFRESH:function(){return l},ACTION_RESTORE:function(){return i},ACTION_SERVER_ACTION:function(){return d},ACTION_SERVER_PATCH:function(){return c},PrefetchCacheEntryStatus:function(){return r},PrefetchKind:function(){return n},isThenable:function(){return p}});let l="refresh",a="navigate",i="restore",c="server-patch",s="prefetch",f="fast-refresh",d="server-action";function p(e){return e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof e.then}(o=n||(n={})).AUTO="auto",o.FULL="full",o.TEMPORARY="temporary",(u=r||(r={})).fresh="fresh",u.reusable="reusable",u.expired="expired",u.stale="stale",("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},91450:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"reducer",{enumerable:!0,get:function(){return f}});let r=n(24673),o=n(95967),u=n(68448),l=n(77784),a=n(99601),i=n(24819),c=n(44529),s=n(13722),f="undefined"==typeof window?function(e,t){return e}:function(e,t){switch(t.type){case r.ACTION_NAVIGATE:return(0,o.navigateReducer)(e,t);case r.ACTION_SERVER_PATCH:return(0,u.serverPatchReducer)(e,t);case r.ACTION_RESTORE:return(0,l.restoreReducer)(e,t);case r.ACTION_REFRESH:return(0,a.refreshReducer)(e,t);case r.ACTION_FAST_REFRESH:return(0,c.fastRefreshReducer)(e,t);case r.ACTION_PREFETCH:return(0,i.prefetchReducer)(e,t);case r.ACTION_SERVER_ACTION:return(0,s.serverActionReducer)(e,t);default:throw Error("Unknown action")}};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},53728:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"shouldHardNavigate",{enumerable:!0,get:function(){return function e(t,n){let[o,u]=n,[l,a]=t;return(0,r.matchSegment)(l,o)?!(t.length<=2)&&e(t.slice(2),u[a]):!!Array.isArray(l)}}});let r=n(76015);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},54535:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{createDynamicallyTrackedSearchParams:function(){return a},createUntrackedSearchParams:function(){return l}});let r=n(51845),o=n(86999),u=n(30650);function l(e){let t=r.staticGenerationAsyncStorage.getStore();return t&&t.forceStatic?{}:e}function a(e){let t=r.staticGenerationAsyncStorage.getStore();return t?t.forceStatic?{}:t.isStaticGeneration||t.dynamicShouldError?new Proxy({},{get:(e,n,r)=>("string"==typeof n&&(0,o.trackDynamicDataAccessed)(t,"searchParams."+n),u.ReflectAdapter.get(e,n,r)),has:(e,n)=>("string"==typeof n&&(0,o.trackDynamicDataAccessed)(t,"searchParams."+n),Reflect.has(e,n)),ownKeys:e=>((0,o.trackDynamicDataAccessed)(t,"searchParams"),Reflect.ownKeys(e))}):e:e}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},51845:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"staticGenerationAsyncStorage",{enumerable:!0,get:function(){return r.staticGenerationAsyncStorage}});let r=n(20030);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},36864:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{StaticGenBailoutError:function(){return r},isStaticGenBailoutError:function(){return o}});let n="NEXT_STATIC_GEN_BAILOUT";class r extends Error{constructor(...e){super(...e),this.code=n}}function o(e){return"object"==typeof e&&null!==e&&"code"in e&&e.code===n}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},38137:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"unresolvedThenable",{enumerable:!0,get:function(){return n}});let n={then:()=>{}};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},47744:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{useReducerWithReduxDevtools:function(){return i},useUnwrapState:function(){return a}});let r=n(53099)._(n(2265)),o=n(24673),u=n(2103);function l(e){if(e instanceof Map){let t={};for(let[n,r]of e.entries()){if("function"==typeof r){t[n]="fn()";continue}if("object"==typeof r&&null!==r){if(r.$$typeof){t[n]=r.$$typeof.toString();continue}if(r._bundlerConfig){t[n]="FlightData";continue}}t[n]=l(r)}return t}if("object"==typeof e&&null!==e){let t={};for(let n in e){let r=e[n];if("function"==typeof r){t[n]="fn()";continue}if("object"==typeof r&&null!==r){if(r.$$typeof){t[n]=r.$$typeof.toString();continue}if(r.hasOwnProperty("_bundlerConfig")){t[n]="FlightData";continue}}t[n]=l(r)}return t}return Array.isArray(e)?e.map(l):e}function a(e){return(0,o.isThenable)(e)?(0,r.use)(e):e}let i="undefined"!=typeof window?function(e){let[t,n]=r.default.useState(e),o=(0,r.useContext)(u.ActionQueueContext);if(!o)throw Error("Invariant: Missing ActionQueueContext");let a=(0,r.useRef)(),i=(0,r.useRef)();return(0,r.useEffect)(()=>{if(!a.current&&!1!==i.current){if(void 0===i.current&&void 0===window.__REDUX_DEVTOOLS_EXTENSION__){i.current=!1;return}return a.current=window.__REDUX_DEVTOOLS_EXTENSION__.connect({instanceId:8e3,name:"next-router"}),a.current&&(a.current.init(l(e)),o&&(o.devToolsInstance=a.current)),()=>{a.current=void 0}}},[e,o]),[t,(0,r.useCallback)(t=>{o.state||(o.state=e),o.dispatch(t,n)},[o,e]),(0,r.useCallback)(e=>{a.current&&a.current.send({type:"RENDER_SYNC"},l(e))},[])]}:function(e){return[e,()=>{},()=>{}]};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},91311:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"prepareFlightRouterStateForRequest",{enumerable:!0,get:function(){return o}});let r=n(84541);function o(e,t){return t?encodeURIComponent(JSON.stringify(e)):encodeURIComponent(JSON.stringify(function e(t){let[n,o,,u,l]=t,a="string"==typeof n&&n.startsWith(r.PAGE_SEGMENT_KEY+"?")?r.PAGE_SEGMENT_KEY:n,i={};for(let[t,n]of Object.entries(o))i[t]=e(n);let c=[a,i,null,u&&"refresh"!==u?u:null];return void 0!==l&&(c[4]=l),c}(e)))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},11283:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"hasBasePath",{enumerable:!0,get:function(){return o}});let r=n(10580);function o(e){return(0,r.pathHasPrefix)(e,"")}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},33068:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizePathTrailingSlash",{enumerable:!0,get:function(){return u}});let r=n(26674),o=n(63381),u=e=>{if(!e.startsWith("/"))return e;let{pathname:t,query:n,hash:u}=(0,o.parsePath)(e);return""+(0,r.removeTrailingSlash)(t)+n+u};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},61404:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o}});let r=n(18993);function o(e){let t="function"==typeof reportError?reportError:e=>{window.console.error(e)};(0,r.isBailoutToCSRError)(e)||t(e)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},35076:function(e,t,n){"use strict";function r(e){return e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"removeBasePath",{enumerable:!0,get:function(){return r}}),n(11283),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},12010:function(e,t){"use strict";function n(e,t){var n=e.length;for(e.push(t);0>>1,o=e[r];if(0>>1;ru(i,n))cu(s,i)?(e[r]=s,e[c]=n,r=c):(e[r]=i,e[a]=n,r=a);else if(cu(s,n))e[r]=s,e[c]=n,r=c;else break}}return t}function u(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if(t.unstable_now=void 0,"object"==typeof performance&&"function"==typeof performance.now){var l,a=performance;t.unstable_now=function(){return a.now()}}else{var i=Date,c=i.now();t.unstable_now=function(){return i.now()-c}}var s=[],f=[],d=1,p=null,h=3,y=!1,_=!1,v=!1,b="function"==typeof setTimeout?setTimeout:null,g="function"==typeof clearTimeout?clearTimeout:null,m="undefined"!=typeof setImmediate?setImmediate:null;function R(e){for(var t=r(f);null!==t;){if(null===t.callback)o(f);else if(t.startTime<=e)o(f),t.sortIndex=t.expirationTime,n(s,t);else break;t=r(f)}}function P(e){if(v=!1,R(e),!_){if(null!==r(s))_=!0,x();else{var t=r(f);null!==t&&A(P,t.startTime-e)}}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var j=!1,O=-1,E=5,S=-1;function w(){return!(t.unstable_now()-Se&&w());){var a=p.callback;if("function"==typeof a){p.callback=null,h=p.priorityLevel;var i=a(p.expirationTime<=e);if(e=t.unstable_now(),"function"==typeof i){p.callback=i,R(e),n=!0;break t}p===r(s)&&o(s),R(e)}else o(s);p=r(s)}if(null!==p)n=!0;else{var c=r(f);null!==c&&A(P,c.startTime-e),n=!1}}break e}finally{p=null,h=u,y=!1}n=void 0}}finally{n?l():j=!1}}}if("function"==typeof m)l=function(){m(M)};else if("undefined"!=typeof MessageChannel){var T=new MessageChannel,C=T.port2;T.port1.onmessage=M,l=function(){C.postMessage(null)}}else l=function(){b(M,0)};function x(){j||(j=!0,l())}function A(e,n){O=b(function(){e(t.unstable_now())},n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){_||y||(_=!0,x())},t.unstable_forceFrameRate=function(e){0>e||125l?(e.sortIndex=u,n(f,e),null===r(s)&&e===r(f)&&(v?(g(O),O=-1):v=!0,A(P,u-l))):(e.sortIndex=a,n(s,e),_||y||(_=!0,x())),e},t.unstable_shouldYield=w,t.unstable_wrapCallback=function(e){var t=h;return function(){var n=h;h=t;try{return e.apply(this,arguments)}finally{h=n}}}},71767:function(e,t,n){"use strict";e.exports=n(12010)},60934:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{getPathname:function(){return r},isFullStringUrl:function(){return o},parseUrl:function(){return u}});let n="http://n";function r(e){return new URL(e,n).pathname}function o(e){return/https?:\/\//.test(e)}function u(e){let t;try{t=new URL(e,n)}catch{}return t}},86999:function(e,t,n){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{Postpone:function(){return d},createPostponedAbortSignal:function(){return b},createPrerenderState:function(){return c},formatDynamicAPIAccesses:function(){return _},markCurrentScopeAsDynamic:function(){return s},trackDynamicDataAccessed:function(){return f},trackDynamicFetch:function(){return p},usedDynamicAPIs:function(){return y}});let o=(r=n(2265))&&r.__esModule?r:{default:r},u=n(46177),l=n(36864),a=n(60934),i="function"==typeof o.default.unstable_postpone;function c(e){return{isDebugSkeleton:e,dynamicAccesses:[]}}function s(e,t){let n=(0,a.getPathname)(e.urlPathname);if(!e.isUnstableCacheCallback){if(e.dynamicShouldError)throw new l.StaticGenBailoutError(`Route ${n} with \`dynamic = "error"\` couldn't be rendered statically because it used \`${t}\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`);if(e.prerenderState)h(e.prerenderState,t,n);else if(e.revalidate=0,e.isStaticGeneration){let r=new u.DynamicServerError(`Route ${n} couldn't be rendered statically because it used ${t}. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`);throw e.dynamicUsageDescription=t,e.dynamicUsageStack=r.stack,r}}}function f(e,t){let n=(0,a.getPathname)(e.urlPathname);if(e.isUnstableCacheCallback)throw Error(`Route ${n} used "${t}" inside a function cached with "unstable_cache(...)". Accessing Dynamic data sources inside a cache scope is not supported. If you need this data inside a cached function use "${t}" outside of the cached function and pass the required dynamic data in as an argument. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`);if(e.dynamicShouldError)throw new l.StaticGenBailoutError(`Route ${n} with \`dynamic = "error"\` couldn't be rendered statically because it used \`${t}\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`);if(e.prerenderState)h(e.prerenderState,t,n);else if(e.revalidate=0,e.isStaticGeneration){let r=new u.DynamicServerError(`Route ${n} couldn't be rendered statically because it used \`${t}\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`);throw e.dynamicUsageDescription=t,e.dynamicUsageStack=r.stack,r}}function d({reason:e,prerenderState:t,pathname:n}){h(t,e,n)}function p(e,t){e.prerenderState&&h(e.prerenderState,t,e.urlPathname)}function h(e,t,n){v();let r=`Route ${n} needs to bail out of prerendering at this point because it used ${t}. React throws this special object to indicate where. It should not be caught by your own try/catch. Learn more: https://nextjs.org/docs/messages/ppr-caught-error`;e.dynamicAccesses.push({stack:e.isDebugSkeleton?Error().stack:void 0,expression:t}),o.default.unstable_postpone(r)}function y(e){return e.dynamicAccesses.length>0}function _(e){return e.dynamicAccesses.filter(e=>"string"==typeof e.stack&&e.stack.length>0).map(({expression:e,stack:t})=>(t=t.split("\n").slice(4).filter(e=>!(e.includes("node_modules/next/")||e.includes(" ()")||e.includes(" (node:"))).join("\n"),`Dynamic API Usage Debug - ${e}: +${t}`))}function v(){if(!i)throw Error("Invariant: React.unstable_postpone is not defined. This suggests the wrong version of React was loaded. This is a bug in Next.js")}function b(e){v();let t=new AbortController;try{o.default.unstable_postpone(e)}catch(e){t.abort(e)}return t.signal}},87417:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getSegmentParam",{enumerable:!0,get:function(){return o}});let r=n(91182);function o(e){let t=r.INTERCEPTION_ROUTE_MARKERS.find(t=>e.startsWith(t));return(t&&(e=e.slice(t.length)),e.startsWith("[[...")&&e.endsWith("]]"))?{type:"optional-catchall",param:e.slice(5,-2)}:e.startsWith("[...")&&e.endsWith("]")?{type:t?"catchall-intercepted":"catchall",param:e.slice(4,-1)}:e.startsWith("[")&&e.endsWith("]")?{type:t?"dynamic-intercepted":"dynamic",param:e.slice(1,-1)}:null}},70647:function(e,t){"use strict";var n,r;Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"HMR_ACTIONS_SENT_TO_BROWSER",{enumerable:!0,get:function(){return n}}),(r=n||(n={})).ADDED_PAGE="addedPage",r.REMOVED_PAGE="removedPage",r.RELOAD_PAGE="reloadPage",r.SERVER_COMPONENT_CHANGES="serverComponentChanges",r.MIDDLEWARE_CHANGES="middlewareChanges",r.CLIENT_CHANGES="clientChanges",r.SERVER_ONLY_CHANGES="serverOnlyChanges",r.SYNC="sync",r.BUILT="built",r.BUILDING="building",r.DEV_PAGES_MANIFEST_UPDATE="devPagesManifestUpdate",r.TURBOPACK_MESSAGE="turbopack-message",r.SERVER_ERROR="serverError",r.TURBOPACK_CONNECTED="turbopack-connected"},91182:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{INTERCEPTION_ROUTE_MARKERS:function(){return o},extractInterceptionRouteInformation:function(){return l},isInterceptionRouteAppPath:function(){return u}});let r=n(20926),o=["(..)(..)","(.)","(..)","(...)"];function u(e){return void 0!==e.split("/").find(e=>o.find(t=>e.startsWith(t)))}function l(e){let t,n,u;for(let r of e.split("/"))if(n=o.find(e=>r.startsWith(e))){[t,u]=e.split(n,2);break}if(!t||!n||!u)throw Error(`Invalid interception route: ${e}. Must be in the format //(..|...|..)(..)/`);switch(t=(0,r.normalizeAppPath)(t),n){case"(.)":u="/"===t?`/${u}`:t+"/"+u;break;case"(..)":if("/"===t)throw Error(`Invalid interception route: ${e}. Cannot use (..) marker at the root level, use (.) instead.`);u=t.split("/").slice(0,-1).concat(u).join("/");break;case"(...)":u="/"+u;break;case"(..)(..)":let l=t.split("/");if(l.length<=2)throw Error(`Invalid interception route: ${e}. Cannot use (..)(..) marker at the root level or one level up.`);u=l.slice(0,-2).concat(u).join("/");break;default:throw Error("Invariant: unexpected marker")}return{interceptingRoute:t,interceptedRoute:u}}},30650:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ReflectAdapter",{enumerable:!0,get:function(){return n}});class n{static get(e,t,n){let r=Reflect.get(e,t,n);return"function"==typeof r?r.bind(e):r}static set(e,t,n,r){return Reflect.set(e,t,n,r)}static has(e,t){return Reflect.has(e,t)}static deleteProperty(e,t){return Reflect.deleteProperty(e,t)}}},61956:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{AppRouterContext:function(){return o},GlobalLayoutRouterContext:function(){return l},LayoutRouterContext:function(){return u},MissingSlotContext:function(){return i},TemplateContext:function(){return a}});let r=n(47043)._(n(2265)),o=r.default.createContext(null),u=r.default.createContext(null),l=r.default.createContext(null),a=r.default.createContext(null),i=r.default.createContext(new Set)},37207:function(e,t){"use strict";function n(e){let t=5381;for(let n=0;n>>0}function r(e){return n(e).toString(36).slice(0,5)}Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{djb2Hash:function(){return n},hexHash:function(){return r}})},48701:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"HeadManagerContext",{enumerable:!0,get:function(){return r}});let r=n(47043)._(n(2265)).default.createContext({})},79060:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{PathParamsContext:function(){return l},PathnameContext:function(){return u},SearchParamsContext:function(){return o}});let r=n(2265),o=(0,r.createContext)(null),u=(0,r.createContext)(null),l=(0,r.createContext)(null)},18993:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{BailoutToCSRError:function(){return r},isBailoutToCSRError:function(){return o}});let n="BAILOUT_TO_CLIENT_SIDE_RENDERING";class r extends Error{constructor(e){super("Bail out to client-side rendering: "+e),this.reason=e,this.digest=n}}function o(e){return"object"==typeof e&&null!==e&&"digest"in e&&e.digest===n}},78162:function(e,t){"use strict";function n(e){return e.startsWith("/")?e:"/"+e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ensureLeadingSlash",{enumerable:!0,get:function(){return n}})},2103:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{ActionQueueContext:function(){return a},createMutableActionQueue:function(){return s}});let r=n(53099),o=n(24673),u=n(91450),l=r._(n(2265)),a=l.default.createContext(null);function i(e,t){null!==e.pending&&(e.pending=e.pending.next,null!==e.pending?c({actionQueue:e,action:e.pending,setState:t}):e.needsRefresh&&(e.needsRefresh=!1,e.dispatch({type:o.ACTION_REFRESH,origin:window.location.origin},t)))}async function c(e){let{actionQueue:t,action:n,setState:r}=e,u=t.state;if(!u)throw Error("Invariant: Router state not initialized");t.pending=n;let l=n.payload,a=t.action(u,l);function c(e){n.discarded||(t.state=e,t.devToolsInstance&&t.devToolsInstance.send(l,e),i(t,r),n.resolve(e))}(0,o.isThenable)(a)?a.then(c,e=>{i(t,r),n.reject(e)}):c(a)}function s(){let e={state:null,dispatch:(t,n)=>(function(e,t,n){let r={resolve:n,reject:()=>{}};if(t.type!==o.ACTION_RESTORE){let e=new Promise((e,t)=>{r={resolve:e,reject:t}});(0,l.startTransition)(()=>{n(e)})}let u={payload:t,next:null,resolve:r.resolve,reject:r.reject};null===e.pending?(e.last=u,c({actionQueue:e,action:u,setState:n})):t.type===o.ACTION_NAVIGATE||t.type===o.ACTION_RESTORE?(e.pending.discarded=!0,e.last=u,e.pending.payload.type===o.ACTION_SERVER_ACTION&&(e.needsRefresh=!0),c({actionQueue:e,action:u,setState:n})):(null!==e.last&&(e.last.next=u),e.last=u)})(e,t,n),action:async(e,t)=>{if(null===e)throw Error("Invariant: Router state not initialized");return(0,u.reducer)(e,t)},pending:null,last:null};return e}},68498:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addPathPrefix",{enumerable:!0,get:function(){return o}});let r=n(63381);function o(e,t){if(!e.startsWith("/")||!t)return e;let{pathname:n,query:o,hash:u}=(0,r.parsePath)(e);return""+t+n+o+u}},20926:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{normalizeAppPath:function(){return u},normalizeRscURL:function(){return l}});let r=n(78162),o=n(84541);function u(e){return(0,r.ensureLeadingSlash)(e.split("/").reduce((e,t,n,r)=>!t||(0,o.isGroupSegment)(t)||"@"===t[0]||("page"===t||"route"===t)&&n===r.length-1?e:e+"/"+t,""))}function l(e){return e.replace(/\.rsc($|\?)/,"$1")}},7092:function(e,t){"use strict";function n(e,t){if(void 0===t&&(t={}),t.onlyHashChange){e();return}let n=document.documentElement,r=n.style.scrollBehavior;n.style.scrollBehavior="auto",t.dontForceLayout||n.getClientRects(),e(),n.style.scrollBehavior=r}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"handleSmoothScroll",{enumerable:!0,get:function(){return n}})},86146:function(e,t){"use strict";function n(e){return/Googlebot|Mediapartners-Google|AdsBot-Google|googleweblight|Storebot-Google|Google-PageRenderer|Bingbot|BingPreview|Slurp|DuckDuckBot|baiduspider|yandex|sogou|LinkedInBot|bitlybot|tumblr|vkShare|quora link preview|facebookexternalhit|facebookcatalog|Twitterbot|applebot|redditbot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|ia_archiver/i.test(e)}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isBot",{enumerable:!0,get:function(){return n}})},63381:function(e,t){"use strict";function n(e){let t=e.indexOf("#"),n=e.indexOf("?"),r=n>-1&&(t<0||n-1?{pathname:e.substring(0,r?n:t),query:r?e.substring(n,t>-1?t:void 0):"",hash:t>-1?e.slice(t):""}:{pathname:e,query:"",hash:""}}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"parsePath",{enumerable:!0,get:function(){return n}})},10580:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"pathHasPrefix",{enumerable:!0,get:function(){return o}});let r=n(63381);function o(e,t){if("string"!=typeof e)return!1;let{pathname:n}=(0,r.parsePath)(e);return n===t||n.startsWith(t+"/")}},26674:function(e,t){"use strict";function n(e){return e.replace(/\/$/,"")||"/"}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"removeTrailingSlash",{enumerable:!0,get:function(){return n}})},84541:function(e,t){"use strict";function n(e){return"("===e[0]&&e.endsWith(")")}Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{DEFAULT_SEGMENT_KEY:function(){return o},PAGE_SEGMENT_KEY:function(){return r},isGroupSegment:function(){return n}});let r="__PAGE__",o="__DEFAULT__"},55501:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{ServerInsertedHTMLContext:function(){return o},useServerInsertedHTML:function(){return u}});let r=n(53099)._(n(2265)),o=r.default.createContext(null);function u(e){let t=(0,r.useContext)(o);t&&t(e)}},31765:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"warnOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},47149:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"actionAsyncStorage",{enumerable:!0,get:function(){return r}});let r=(0,n(54832).createAsyncLocalStorage)();("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},54832:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createAsyncLocalStorage",{enumerable:!0,get:function(){return u}});let n=Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available");class r{disable(){throw n}getStore(){}run(){throw n}exit(){throw n}enterWith(){throw n}}let o=globalThis.AsyncLocalStorage;function u(){return o?new o:new r}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},25575:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"requestAsyncStorage",{enumerable:!0,get:function(){return r}});let r=(0,n(54832).createAsyncLocalStorage)();("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},20030:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"staticGenerationAsyncStorage",{enumerable:!0,get:function(){return r}});let r=(0,n(54832).createAsyncLocalStorage)();("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},34040:function(e,t,n){"use strict";var r=n(54887);t.createRoot=r.createRoot,t.hydrateRoot=r.hydrateRoot},54887:function(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(84417)},97950:function(e,t,n){"use strict";var r=n(54887),o={stream:!0},u=new Map;function l(e){var t=n(e);return"function"!=typeof t.then||"fulfilled"===t.status?null:(t.then(function(e){t.status="fulfilled",t.value=e},function(e){t.status="rejected",t.reason=e}),t)}function a(){}var i=new Map,c=n.u;n.u=function(e){var t=i.get(e);return void 0!==t?t:c(e)};var s=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Dispatcher,f=Symbol.for("react.element"),d=Symbol.for("react.lazy"),p=Symbol.iterator,h=Array.isArray,y=Object.getPrototypeOf,_=Object.prototype,v=new WeakMap;function b(e,t,n,r){this.status=e,this.value=t,this.reason=n,this._response=r}function g(e){switch(e.status){case"resolved_model":S(e);break;case"resolved_module":w(e)}switch(e.status){case"fulfilled":return e.value;case"pending":case"blocked":case"cyclic":throw e;default:throw e.reason}}function m(e,t){for(var n=0;nh?(_=h,h=3,p++):(_=0,h=3);continue;case 2:44===(m=d[p++])?h=4:v=v<<4|(96d.length&&(m=-1)}var O=d.byteOffset+p;if(-1{o=e}},3950:function(e,n){var t,a,s,i,r,o;Object.defineProperty(n,"__esModule",{value:!0}),n.FEATURES=n.GAS_PRICE_TYPE=n.RPC_AUTHENTICATION=void 0,(i=t||(n.RPC_AUTHENTICATION=t={})).API_KEY_PATH="API_KEY_PATH",i.NO_AUTHENTICATION="NO_AUTHENTICATION",i.UNKNOWN="UNKNOWN",(r=a||(n.GAS_PRICE_TYPE=a={})).ORACLE="ORACLE",r.FIXED="FIXED",r.FIXED_1559="FIXED1559",r.UNKNOWN="UNKNOWN",(o=s||(n.FEATURES=s={})).ERC721="ERC721",o.SAFE_APPS="SAFE_APPS",o.CONTRACT_INTERACTION="CONTRACT_INTERACTION",o.DOMAIN_LOOKUP="DOMAIN_LOOKUP",o.SPENDING_LIMIT="SPENDING_LIMIT",o.EIP1559="EIP1559",o.SAFE_TX_GAS_OPTIONAL="SAFE_TX_GAS_OPTIONAL",o.TX_SIMULATION="TX_SIMULATION",o.EIP1271="EIP1271"},46143:function(e,n){var t,a;Object.defineProperty(n,"__esModule",{value:!0}),n.TokenType=void 0,(a=t||(n.TokenType=t={})).ERC20="ERC20",a.ERC721="ERC721",a.NATIVE_TOKEN="NATIVE_TOKEN",a.UNKNOWN="UNKNOWN"},46257:function(e,n){var t,a,s,i;Object.defineProperty(n,"__esModule",{value:!0}),n.NativeStakingStatus=n.ConfirmationViewTypes=void 0,(s=t||(n.ConfirmationViewTypes=t={})).GENERIC="GENERIC",s.COW_SWAP_ORDER="COW_SWAP_ORDER",s.COW_SWAP_TWAP_ORDER="COW_SWAP_TWAP_ORDER",s.KILN_NATIVE_STAKING_DEPOSIT="KILN_NATIVE_STAKING_DEPOSIT",s.KILN_NATIVE_STAKING_VALIDATORS_EXIT="KILN_NATIVE_STAKING_VALIDATORS_EXIT",s.KILN_NATIVE_STAKING_WITHDRAW="KILN_NATIVE_STAKING_WITHDRAW",(i=a||(n.NativeStakingStatus=a={})).NOT_STAKED="NOT_STAKED",i.ACTIVATING="ACTIVATING",i.DEPOSIT_IN_PROGRESS="DEPOSIT_IN_PROGRESS",i.ACTIVE="ACTIVE",i.EXIT_REQUESTED="EXIT_REQUESTED",i.EXITING="EXITING",i.EXITED="EXITED",i.SLASHED="SLASHED"},33421:function(e,n){Object.defineProperty(n,"__esModule",{value:!0})},92916:function(e,n){var t,a;Object.defineProperty(n,"__esModule",{value:!0}),n.DeviceType=void 0,(a=t||(n.DeviceType=t={})).ANDROID="ANDROID",a.IOS="IOS",a.WEB="WEB"},87633:function(e,n){Object.defineProperty(n,"__esModule",{value:!0})},85940:function(e,n){var t,a,s,i,r;Object.defineProperty(n,"__esModule",{value:!0}),n.SafeAppSocialPlatforms=n.SafeAppFeatures=n.SafeAppAccessPolicyTypes=void 0,(i=t||(n.SafeAppAccessPolicyTypes=t={})).NoRestrictions="NO_RESTRICTIONS",i.DomainAllowlist="DOMAIN_ALLOWLIST",(a||(n.SafeAppFeatures=a={})).BATCHED_TRANSACTIONS="BATCHED_TRANSACTIONS",(r=s||(n.SafeAppSocialPlatforms=s={})).TWITTER="TWITTER",r.GITHUB="GITHUB",r.DISCORD="DISCORD",r.TELEGRAM="TELEGRAM"},40525:function(e,n){var t,a;Object.defineProperty(n,"__esModule",{value:!0}),n.ImplementationVersionState=void 0,(a=t||(n.ImplementationVersionState=t={})).UP_TO_DATE="UP_TO_DATE",a.OUTDATED="OUTDATED",a.UNKNOWN="UNKNOWN"},89153:function(e,n){var t,a,s,i;Object.defineProperty(n,"__esModule",{value:!0}),n.SafeMessageStatus=n.SafeMessageListItemType=void 0,(s=t||(n.SafeMessageListItemType=t={})).DATE_LABEL="DATE_LABEL",s.MESSAGE="MESSAGE",(i=a||(n.SafeMessageStatus=a={})).NEEDS_CONFIRMATION="NEEDS_CONFIRMATION",i.CONFIRMED="CONFIRMED"},66136:function(e,n){var t,a,s,i,r,o,d,c,u,E,f,T,I,p,_,l,A,h,N,O,S,g,v,D;Object.defineProperty(n,"__esModule",{value:!0}),n.LabelValue=n.StartTimeValue=n.DurationType=n.DetailedExecutionInfoType=n.TransactionListItemType=n.ConflictType=n.TransactionInfoType=n.SettingsInfoType=n.TransactionTokenType=n.TransferDirection=n.TransactionStatus=n.Operation=void 0,(I=t||(n.Operation=t={}))[I.CALL=0]="CALL",I[I.DELEGATE=1]="DELEGATE",(p=a||(n.TransactionStatus=a={})).AWAITING_CONFIRMATIONS="AWAITING_CONFIRMATIONS",p.AWAITING_EXECUTION="AWAITING_EXECUTION",p.CANCELLED="CANCELLED",p.FAILED="FAILED",p.SUCCESS="SUCCESS",(_=s||(n.TransferDirection=s={})).INCOMING="INCOMING",_.OUTGOING="OUTGOING",_.UNKNOWN="UNKNOWN",(l=i||(n.TransactionTokenType=i={})).ERC20="ERC20",l.ERC721="ERC721",l.NATIVE_COIN="NATIVE_COIN",(A=r||(n.SettingsInfoType=r={})).SET_FALLBACK_HANDLER="SET_FALLBACK_HANDLER",A.ADD_OWNER="ADD_OWNER",A.REMOVE_OWNER="REMOVE_OWNER",A.SWAP_OWNER="SWAP_OWNER",A.CHANGE_THRESHOLD="CHANGE_THRESHOLD",A.CHANGE_IMPLEMENTATION="CHANGE_IMPLEMENTATION",A.ENABLE_MODULE="ENABLE_MODULE",A.DISABLE_MODULE="DISABLE_MODULE",A.SET_GUARD="SET_GUARD",A.DELETE_GUARD="DELETE_GUARD",(h=o||(n.TransactionInfoType=o={})).TRANSFER="Transfer",h.SETTINGS_CHANGE="SettingsChange",h.CUSTOM="Custom",h.CREATION="Creation",h.SWAP_ORDER="SwapOrder",h.TWAP_ORDER="TwapOrder",h.SWAP_TRANSFER="SwapTransfer",h.NATIVE_STAKING_DEPOSIT="NativeStakingDeposit",h.NATIVE_STAKING_VALIDATORS_EXIT="NativeStakingValidatorsExit",h.NATIVE_STAKING_WITHDRAW="NativeStakingWithdraw",(N=d||(n.ConflictType=d={})).NONE="None",N.HAS_NEXT="HasNext",N.END="End",(O=c||(n.TransactionListItemType=c={})).TRANSACTION="TRANSACTION",O.LABEL="LABEL",O.CONFLICT_HEADER="CONFLICT_HEADER",O.DATE_LABEL="DATE_LABEL",(S=u||(n.DetailedExecutionInfoType=u={})).MULTISIG="MULTISIG",S.MODULE="MODULE",(g=E||(n.DurationType=E={})).AUTO="AUTO",g.LIMIT_DURATION="LIMIT_DURATION",(v=f||(n.StartTimeValue=f={})).AT_MINING_TIME="AT_MINING_TIME",v.AT_EPOCH="AT_EPOCH",(D=T||(n.LabelValue=T={})).Queued="Queued",D.Next="Next"},90963:function(e,n){var t=this&&this.__awaiter||function(e,n,t,a){return new(t||(t=Promise))(function(s,i){function r(e){try{d(a.next(e))}catch(e){i(e)}}function o(e){try{d(a.throw(e))}catch(e){i(e)}}function d(e){var n;e.done?s(e.value):((n=e.value)instanceof t?n:new t(function(e){e(n)})).then(r,o)}d((a=a.apply(e,n||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0}),n.insertParams=function(e,n){return n?Object.keys(n).reduce((e,t)=>{var a;return a=String(n[t]),e.replace(RegExp(`\\{${t}\\}`,"g"),a)},e):e},n.stringifyQuery=function(e){if(!e)return"";let n=new URLSearchParams;Object.keys(e).forEach(t=>{null!=e[t]&&n.append(t,String(e[t]))});let t=n.toString();return t?`?${t}`:""},n.fetchData=function(e,n,a,i,r){return t(this,void 0,void 0,function*(){let t={method:null!=n?n:"POST",headers:Object.assign({"Content-Type":"application/json"},i)};return r&&(t.credentials=r),null!=a&&(t.body="string"==typeof a?a:JSON.stringify(a)),s((yield fetch(e,t)))})},n.getData=function(e,n,a){return t(this,void 0,void 0,function*(){let t={method:"GET"};return n&&(t.headers=Object.assign(Object.assign({},n),{"Content-Type":"application/json"})),a&&(t.credentials=a),s((yield fetch(e,t)))})};let a=e=>"object"==typeof e&&null!==e&&("code"in e||"statusCode"in e)&&"message"in e;function s(e){return t(this,void 0,void 0,function*(){var n;let t;try{t=yield e.json()}catch(e){t={}}if(!e.ok)throw Error(a(t)?`CGW error - ${null!==(n=t.code)&&void 0!==n?n:t.statusCode}: ${t.message}`:`CGW error - status ${e.statusText}`);return t})}}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/2241.7fe485087c7b274c.js b/frontend/.next/static/chunks/2241.7fe485087c7b274c.js new file mode 100644 index 0000000..7cc9dea --- /dev/null +++ b/frontend/.next/static/chunks/2241.7fe485087c7b274c.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2241],{62241:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return w}});var l=n(57437),r=n(2265),u=n(32679),a=n(81080),s=n(60759);function o(){return(o=Object.assign||function(e){for(var t=1;tv?.map??null,[v]);let g=(0,r.useCallback)(l=>{if(null!==l&&null===v){let r=new s.Map(l,d);null!=n&&null!=h?r.setView(n,h):null!=e&&r.fitBounds(e,t),null!=p&&r.whenReady(p),y((0,a.Hb)(r))}},[]);(0,r.useEffect)(()=>()=>{v?.map.remove()},[v]);let x=v?r.createElement(a.UO,{value:v},l):i??null;return r.createElement("div",o({},w,{ref:g}),x)});var i=n(16226),f=n(38651),p=n(22538);let h=(0,i.Lf)(function({url:e,...t},n){let l=new s.TileLayer(e,(0,f.q)(t,n));return(0,p.O)(l,n)},function(e,t,n){!function(e,t,n){let{opacity:l,zIndex:r}=t;null!=l&&l!==n.opacity&&e.setOpacity(l),null!=r&&r!==n.zIndex&&e.setZIndex(r)}(e,t,n);let{url:l}=t;null!=l&&l!==n.url&&e.setUrl(l)});n(35046);var d=n(29264);function m(e){let{center:t,zoom:n,onMapReady:l}=e,a=(0,u.Sx)(),s=(0,r.useRef)(!1);return(0,r.useEffect)(()=>{!s.current&&l&&(l(a),s.current=!0)},[a,l]),(0,r.useEffect)(()=>{a.setView([t.lat,t.lng],n)},[t,n,a]),null}function w(e){let{center:t,zoom:n=d.Bn.defaultZoom,children:r,onMapReady:u}=e;return(0,l.jsx)("div",{className:"w-full h-full relative",children:(0,l.jsxs)(c,{center:[t.lat,t.lng],zoom:n,style:{height:"100%",width:"100%",zIndex:0},scrollWheelZoom:!0,className:"z-0",children:[(0,l.jsx)(h,{attribution:'\xa9 OpenStreetMap contributors',url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"}),(0,l.jsx)(m,{center:t,zoom:n,onMapReady:u}),r]})})}},35046:function(){}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/2381.99b49ec0de0ecc07.js b/frontend/.next/static/chunks/2381.99b49ec0de0ecc07.js new file mode 100644 index 0000000..bc60db6 --- /dev/null +++ b/frontend/.next/static/chunks/2381.99b49ec0de0ecc07.js @@ -0,0 +1,14 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2381],{32381:function(t,a,e){e.r(a),e.d(a,{PhBank:function(){return p}}),e(31498);var H=e(38157),r=e(48567),h=e(54910),l=e(69709),i=e(78313),o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,Z=(t,a,e,H)=>{for(var r,h=H>1?void 0:H?s(a,e):a,l=t.length-1;l>=0;l--)(r=t[l])&&(h=(H?r(a,e,h):r(h))||h);return H&&h&&o(a,e,h),h};let p=class extends r.oi{constructor(){super(...arguments),this.size="1em",this.weight="regular",this.color="currentColor",this.mirrored=!1}render(){var t;return(0,H.dy)` + ${p.weightsMap.get(null!=(t=this.weight)?t:"regular")} + `}};p.weightsMap=new Map([["thin",(0,H.YP)``],["light",(0,H.YP)``],["regular",(0,H.YP)``],["bold",(0,H.YP)``],["fill",(0,H.YP)``],["duotone",(0,H.YP)``]]),p.styles=(0,i.iv)` + :host { + display: contents; + } + `,Z([(0,l.C)({type:String,reflect:!0})],p.prototype,"size",2),Z([(0,l.C)({type:String,reflect:!0})],p.prototype,"weight",2),Z([(0,l.C)({type:String,reflect:!0})],p.prototype,"color",2),Z([(0,l.C)({type:Boolean,reflect:!0})],p.prototype,"mirrored",2),p=Z([(0,h.M)("ph-bank")],p)}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/2420.c80513ba367f5412.js b/frontend/.next/static/chunks/2420.c80513ba367f5412.js new file mode 100644 index 0000000..55a8f81 --- /dev/null +++ b/frontend/.next/static/chunks/2420.c80513ba367f5412.js @@ -0,0 +1,357 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2420],{62420:function(t,e,i){i.r(e),i.d(e,{W3mDepositFromExchangeSelectAssetView:function(){return R},W3mDepositFromExchangeView:function(){return I}});var n=i(31133),o=i(84927),a=i(32801),r=i(6943),s=i(9993),u=i(86777),l=i(63043),c=i(66909),d=i(64369),h=i(92413);i(74975),i(23805),i(18360);var p=i(84249),m=i(57116),g=i(11131),y=(0,g.iv)` + button { + border: none; + border-radius: ${({borderRadius:t})=>t["20"]}; + display: flex; + flex-direction: row; + align-items: center; + padding: ${({spacing:t})=>t[1]}; + transition: + background-color ${({durations:t})=>t.lg} + ${({easings:t})=>t["ease-out-power-2"]}, + box-shadow ${({durations:t})=>t.lg} + ${({easings:t})=>t["ease-out-power-2"]}; + will-change: background-color, box-shadow; + } + + /* -- Variants --------------------------------------------------------------- */ + button[data-type='accent'] { + background-color: ${({tokens:t})=>t.core.backgroundAccentPrimary}; + color: ${({tokens:t})=>t.theme.textPrimary}; + } + + button[data-type='neutral'] { + background-color: ${({tokens:t})=>t.theme.foregroundSecondary}; + color: ${({tokens:t})=>t.theme.textPrimary}; + } + + /* -- Sizes --------------------------------------------------------------- */ + button[data-size='sm'] { + height: 24px; + } + + button[data-size='md'] { + height: 28px; + } + + button[data-size='lg'] { + height: 32px; + } + + button[data-size='sm'] > wui-image, + button[data-size='sm'] > wui-icon { + width: 16px; + height: 16px; + } + + button[data-size='md'] > wui-image, + button[data-size='md'] > wui-icon { + width: 20px; + height: 20px; + } + + button[data-size='lg'] > wui-image, + button[data-size='lg'] > wui-icon { + width: 24px; + height: 24px; + } + + wui-text { + padding-left: ${({spacing:t})=>t[1]}; + padding-right: ${({spacing:t})=>t[1]}; + } + + wui-image { + border-radius: ${({borderRadius:t})=>t[3]}; + overflow: hidden; + user-drag: none; + user-select: none; + -moz-user-select: none; + -webkit-user-drag: none; + -webkit-user-select: none; + -ms-user-select: none; + } + + /* -- States --------------------------------------------------------------- */ + @media (hover: hover) and (pointer: fine) { + button[data-type='accent']:not(:disabled):hover { + background-color: ${({tokens:t})=>t.core.foregroundAccent060}; + } + + button[data-type='neutral']:not(:disabled):hover { + background-color: ${({tokens:t})=>t.theme.foregroundTertiary}; + } + } + + button[data-type='accent']:not(:disabled):focus-visible, + button[data-type='accent']:not(:disabled):active { + box-shadow: 0 0 0 4px ${({tokens:t})=>t.core.foregroundAccent020}; + } + + button[data-type='neutral']:not(:disabled):focus-visible, + button[data-type='neutral']:not(:disabled):active { + box-shadow: 0 0 0 4px ${({tokens:t})=>t.core.foregroundAccent020}; + } + + button:disabled { + opacity: 0.5; + } +`,f=function(t,e,i,n){var o,a=arguments.length,r=a<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(r=(a<3?o(r):a>3?o(e,i,r):o(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};let w={sm:"sm-regular",md:"md-regular",lg:"lg-regular"},b=class extends n.oi{constructor(){super(...arguments),this.type="accent",this.size="md",this.imageSrc="",this.disabled=!1,this.leftIcon=void 0,this.rightIcon=void 0,this.text=""}render(){return(0,n.dy)` + + `}};b.styles=[p.ET,p.ZM,y],f([(0,o.Cb)()],b.prototype,"type",void 0),f([(0,o.Cb)()],b.prototype,"size",void 0),f([(0,o.Cb)()],b.prototype,"imageSrc",void 0),f([(0,o.Cb)({type:Boolean})],b.prototype,"disabled",void 0),f([(0,o.Cb)()],b.prototype,"leftIcon",void 0),f([(0,o.Cb)()],b.prototype,"rightIcon",void 0),f([(0,o.Cb)()],b.prototype,"text",void 0),b=f([(0,m.M)("wui-chip-button")],b),i(96277),i(29158),i(1799),i(53774),i(80843),i(44732),i(97585),i(78489),i(51437);var x=function(t,e,i,n){var o,a=arguments.length,r=a<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(r=(a<3?o(r):a>3?o(e,i,r):o(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};let v=class extends n.oi{constructor(){super(...arguments),this.maxDecimals=void 0,this.maxIntegers=void 0}render(){return(0,n.dy)` + + + USD + + `}};x([(0,o.Cb)({type:Number})],v.prototype,"amount",void 0),x([(0,o.Cb)({type:Number})],v.prototype,"maxDecimals",void 0),x([(0,o.Cb)({type:Number})],v.prototype,"maxIntegers",void 0),v=x([(0,h.Mo)("w3m-fund-input")],v);var $=(0,h.iv)` + .amount-input-container { + border-radius: ${({borderRadius:t})=>t["6"]}; + border-top-right-radius: 0; + border-top-left-radius: 0; + background-color: ${({tokens:t})=>t.theme.foregroundPrimary}; + padding: ${({spacing:t})=>t[1]}; + } + + .container { + border-radius: 30px; + } +`,k=function(t,e,i,n){var o,a=arguments.length,r=a<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(r=(a<3?o(r):a>3?o(e,i,r):o(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};let C=[10,50,100],I=class extends n.oi{constructor(){super(),this.unsubscribe=[],this.network=r.R.state.activeCaipNetwork,this.exchanges=s.u.state.exchanges,this.isLoading=s.u.state.isLoading,this.amount=s.u.state.amount,this.tokenAmount=s.u.state.tokenAmount,this.priceLoading=s.u.state.priceLoading,this.isPaymentInProgress=s.u.state.isPaymentInProgress,this.currentPayment=s.u.state.currentPayment,this.paymentId=s.u.state.paymentId,this.paymentAsset=s.u.state.paymentAsset,this.unsubscribe.push(r.R.subscribeKey("activeCaipNetwork",t=>{this.network=t,this.setDefaultPaymentAsset()}),s.u.subscribe(t=>{this.exchanges=t.exchanges,this.isLoading=t.isLoading,this.amount=t.amount,this.tokenAmount=t.tokenAmount,this.priceLoading=t.priceLoading,this.paymentId=t.paymentId,this.isPaymentInProgress=t.isPaymentInProgress,this.currentPayment=t.currentPayment,this.paymentAsset=t.paymentAsset,t.isPaymentInProgress&&t.currentPayment?.exchangeId&&t.currentPayment?.sessionId&&t.paymentId&&this.handlePaymentInProgress()}))}disconnectedCallback(){this.unsubscribe.forEach(t=>t()),s.u.state.isPaymentInProgress||s.u.reset()}async firstUpdated(){await this.getPaymentAssets(),this.paymentAsset||await this.setDefaultPaymentAsset(),s.u.setAmount(C[0]),await s.u.fetchExchanges()}render(){return(0,n.dy)` + + ${this.amountInputTemplate()} ${this.exchangesTemplate()} + + `}exchangesLoadingTemplate(){return Array.from({length:2}).map(()=>(0,n.dy)``)}_exchangesTemplate(){return this.exchanges.length>0?this.exchanges.map(t=>(0,n.dy)`this.onExchangeClick(t)} + chevron + variant="image" + imageSrc=${t.imageUrl} + ?loading=${this.isLoading} + > + + Deposit from ${t.name} + + `):(0,n.dy)` + + No exchanges support this asset on this network + + `}exchangesTemplate(){return(0,n.dy)` + ${this.isLoading?this.exchangesLoadingTemplate():this._exchangesTemplate()} + `}amountInputTemplate(){return(0,n.dy)` + + + Asset + u.RouterController.push("PayWithExchangeSelectAsset")} + size="lg" + .chainImageSrc=${(0,a.o)(l.f.getNetworkImage(this.network))} + > + + + + + + ${this.tokenAmountTemplate()} + + + ${C.map(t=>(0,n.dy)`s.u.setAmount(t)} + type="neutral" + size="lg" + text=${`$${t}`} + >`)} + + + `}tokenAmountTemplate(){return this.priceLoading?(0,n.dy)``:(0,n.dy)` + + ${this.tokenAmount.toFixed(4)} ${this.paymentAsset?.metadata.symbol} + + `}async onExchangeClick(t){if(!this.amount){c.SnackController.showError("Please enter an amount");return}await s.u.handlePayWithExchange(t.id)}handlePaymentInProgress(){let t=r.R.state.activeChain,{redirectView:e="Account"}=u.RouterController.state.data??{};this.isPaymentInProgress&&this.currentPayment?.exchangeId&&this.currentPayment?.sessionId&&this.paymentId&&(s.u.waitUntilComplete({exchangeId:this.currentPayment.exchangeId,sessionId:this.currentPayment.sessionId,paymentId:this.paymentId}).then(e=>{"SUCCESS"===e.status?(c.SnackController.showSuccess("Deposit completed"),s.u.reset(),t&&(r.R.fetchTokenBalance(),d.ConnectionController.updateBalance(t)),u.RouterController.replace("Transactions")):"FAILED"===e.status&&c.SnackController.showError("Deposit failed")}),c.SnackController.showLoading("Deposit in progress..."),u.RouterController.replace(e))}onAmountChange({detail:t}){s.u.setAmount(t?Number(t):null)}async getPaymentAssets(){this.network&&await s.u.getAssetsForNetwork(this.network.caipNetworkId)}async setDefaultPaymentAsset(){if(this.network){let t=await s.u.getAssetsForNetwork(this.network.caipNetworkId);t[0]&&s.u.setPaymentAsset(t[0])}}};I.styles=$,k([(0,o.SB)()],I.prototype,"network",void 0),k([(0,o.SB)()],I.prototype,"exchanges",void 0),k([(0,o.SB)()],I.prototype,"isLoading",void 0),k([(0,o.SB)()],I.prototype,"amount",void 0),k([(0,o.SB)()],I.prototype,"tokenAmount",void 0),k([(0,o.SB)()],I.prototype,"priceLoading",void 0),k([(0,o.SB)()],I.prototype,"isPaymentInProgress",void 0),k([(0,o.SB)()],I.prototype,"currentPayment",void 0),k([(0,o.SB)()],I.prototype,"paymentId",void 0),k([(0,o.SB)()],I.prototype,"paymentAsset",void 0),I=k([(0,h.Mo)("w3m-deposit-from-exchange-view")],I);var P=i(53357);i(4594),i(92374),i(64349),i(79207),i(39203);var S=(0,h.iv)` + .contentContainer { + height: 440px; + overflow: scroll; + scrollbar-width: none; + } + + .contentContainer::-webkit-scrollbar { + display: none; + } + + wui-icon-box { + width: 40px; + height: 40px; + border-radius: ${({borderRadius:t})=>t["3"]}; + } +`,A=function(t,e,i,n){var o,a=arguments.length,r=a<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(r=(a<3?o(r):a>3?o(e,i,r):o(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};let R=class extends n.oi{constructor(){super(),this.unsubscribe=[],this.assets=s.u.state.assets,this.search="",this.onDebouncedSearch=P.j.debounce(t=>{this.search=t}),this.unsubscribe.push(s.u.subscribe(t=>{this.assets=t.assets}))}disconnectedCallback(){this.unsubscribe.forEach(t=>t())}render(){return(0,n.dy)` + + ${this.templateSearchInput()} ${this.templateTokens()} + + `}templateSearchInput(){return(0,n.dy)` + + + + `}templateTokens(){let t=this.assets.filter(t=>t.metadata.name.toLowerCase().includes(this.search.toLowerCase())),e=t.length>0;return(0,n.dy)` + + + Available tokens + + + ${e?t.map(t=>(0,n.dy)` + ${t.metadata.name} + ${t.metadata.symbol} + `):(0,n.dy)` + + + + No tokens found + + + Buy + `} + + + `}onBuyClick(){u.RouterController.push("OnRampProviders")}onInputChange(t){this.onDebouncedSearch(t.detail)}handleTokenClick(t){s.u.setPaymentAsset(t),u.RouterController.goBack()}};R.styles=S,A([(0,o.SB)()],R.prototype,"assets",void 0),A([(0,o.SB)()],R.prototype,"search",void 0),R=A([(0,h.Mo)("w3m-deposit-from-exchange-select-asset-view")],R)},1799:function(t,e,i){i(23805)},78489:function(t,e,i){var n=i(31133),o=i(84927),a=i(7226),r=i(11131),s=i(84249),u=i(3874),l=i(57116),c=(0,r.iv)` + :host { + position: relative; + display: inline-block; + } + + :host([data-error='true']) > input { + color: ${({tokens:t})=>t.core.textError}; + } + + :host([data-error='false']) > input { + color: ${({tokens:t})=>t.theme.textSecondary}; + } + + input { + background: transparent; + height: auto; + box-sizing: border-box; + color: ${({tokens:t})=>t.theme.textPrimary}; + font-feature-settings: 'case' on; + font-size: ${({textSize:t})=>t.h4}; + caret-color: ${({tokens:t})=>t.core.backgroundAccentPrimary}; + line-height: ${({typography:t})=>t["h4-regular-mono"].lineHeight}; + letter-spacing: ${({typography:t})=>t["h4-regular-mono"].letterSpacing}; + -webkit-appearance: none; + -moz-appearance: textfield; + padding: 0px; + font-family: ${({fontFamily:t})=>t.mono}; + } + + :host([data-width-variant='auto']) input { + width: 100%; + } + + :host([data-width-variant='fit']) input { + width: 1ch; + } + + .wui-input-amount-fit-mirror { + position: absolute; + visibility: hidden; + white-space: pre; + font-size: var(--local-font-size); + line-height: 130%; + letter-spacing: -1.28px; + font-family: ${({fontFamily:t})=>t.mono}; + } + + .wui-input-amount-fit-width { + display: inline-block; + position: relative; + } + + input::-webkit-outer-spin-button, + input::-webkit-inner-spin-button { + -webkit-appearance: none; + margin: 0; + } + + input::placeholder { + color: ${({tokens:t})=>t.theme.textSecondary}; + } +`,d=function(t,e,i,n){var o,a=arguments.length,r=a<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(r=(a<3?o(r):a>3?o(e,i,r):o(e,i))||r);return a>3&&r&&Object.defineProperty(e,i,r),r};let h=class extends n.oi{constructor(){super(...arguments),this.inputElementRef=(0,a.V)(),this.disabled=!1,this.value="",this.placeholder="0",this.widthVariant="auto",this.maxDecimals=void 0,this.maxIntegers=void 0,this.fontSize="h4",this.error=!1}firstUpdated(){this.resizeInput()}updated(){this.style.setProperty("--local-font-size",r.gR.textSize[this.fontSize]),this.resizeInput()}render(){return(this.dataset.widthVariant=this.widthVariant,this.dataset.error=String(this.error),this.inputElementRef?.value&&this.value&&(this.inputElementRef.value.value=this.value),"auto"===this.widthVariant)?this.inputTemplate():(0,n.dy)` +
+ + ${this.inputTemplate()} +
+ `}inputTemplate(){return(0,n.dy)``}dispatchInputChangeEvent(){this.inputElementRef.value&&(this.inputElementRef.value.value=u.H.maskInput({value:this.inputElementRef.value.value,decimals:this.maxDecimals,integers:this.maxIntegers}),this.dispatchEvent(new CustomEvent("inputChange",{detail:this.inputElementRef.value.value,bubbles:!0,composed:!0})),this.resizeInput())}resizeInput(){if("fit"===this.widthVariant){let t=this.inputElementRef.value;if(t){let e=t.previousElementSibling;e&&(e.textContent=t.value||"0",t.style.width=`${e.offsetWidth}px`)}}}};h.styles=[s.ET,s.ZM,c],d([(0,o.Cb)({type:Boolean})],h.prototype,"disabled",void 0),d([(0,o.Cb)({type:String})],h.prototype,"value",void 0),d([(0,o.Cb)({type:String})],h.prototype,"placeholder",void 0),d([(0,o.Cb)({type:String})],h.prototype,"widthVariant",void 0),d([(0,o.Cb)({type:Number})],h.prototype,"maxDecimals",void 0),d([(0,o.Cb)({type:Number})],h.prototype,"maxIntegers",void 0),d([(0,o.Cb)({type:String})],h.prototype,"fontSize",void 0),d([(0,o.Cb)({type:Boolean})],h.prototype,"error",void 0),d([(0,l.M)("wui-input-amount")],h)}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/2464.d65b51956fb7a993.js b/frontend/.next/static/chunks/2464.d65b51956fb7a993.js new file mode 100644 index 0000000..77b1bde --- /dev/null +++ b/frontend/.next/static/chunks/2464.d65b51956fb7a993.js @@ -0,0 +1,14 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2464],{32464:function(a,t,e){e.r(t),e.d(t,{PhVault:function(){return v}}),e(31498);var r=e(38157),H=e(48567),h=e(54910),i=e(69709),o=e(78313),s=Object.defineProperty,l=Object.getOwnPropertyDescriptor,p=(a,t,e,r)=>{for(var H,h=r>1?void 0:r?l(t,e):t,i=a.length-1;i>=0;i--)(H=a[i])&&(h=(r?H(t,e,h):H(h))||h);return r&&h&&s(t,e,h),h};let v=class extends H.oi{constructor(){super(...arguments),this.size="1em",this.weight="regular",this.color="currentColor",this.mirrored=!1}render(){var a;return(0,r.dy)` + ${v.weightsMap.get(null!=(a=this.weight)?a:"regular")} + `}};v.weightsMap=new Map([["thin",(0,r.YP)``],["light",(0,r.YP)``],["regular",(0,r.YP)``],["bold",(0,r.YP)``],["fill",(0,r.YP)``],["duotone",(0,r.YP)``]]),v.styles=(0,o.iv)` + :host { + display: contents; + } + `,p([(0,i.C)({type:String,reflect:!0})],v.prototype,"size",2),p([(0,i.C)({type:String,reflect:!0})],v.prototype,"weight",2),p([(0,i.C)({type:String,reflect:!0})],v.prototype,"color",2),p([(0,i.C)({type:Boolean,reflect:!0})],v.prototype,"mirrored",2),v=p([(0,h.M)("ph-vault")],v)}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/249-2ad93869502a7dde.js b/frontend/.next/static/chunks/249-2ad93869502a7dde.js new file mode 100644 index 0000000..8deb362 --- /dev/null +++ b/frontend/.next/static/chunks/249-2ad93869502a7dde.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[249],{33145:function(e,t,n){n.d(t,{default:function(){return i.a}});var r=n(48461),i=n.n(r)},65878:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Image",{enumerable:!0,get:function(){return b}});let r=n(47043),i=n(53099),o=n(57437),s=i._(n(2265)),a=r._(n(54887)),u=r._(n(38293)),l=n(55346),d=n(90128),c=n(62589);n(31765);let f=n(25523),p=r._(n(5084)),h={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1};function m(e,t,n,r,i,o,s){let a=null==e?void 0:e.src;e&&e["data-loaded-src"]!==a&&(e["data-loaded-src"]=a,("decode"in e?e.decode():Promise.resolve()).catch(()=>{}).then(()=>{if(e.parentElement&&e.isConnected){if("empty"!==t&&i(!0),null==n?void 0:n.current){let t=new Event("load");Object.defineProperty(t,"target",{writable:!1,value:e});let r=!1,i=!1;n.current({...t,nativeEvent:t,currentTarget:e,target:e,isDefaultPrevented:()=>r,isPropagationStopped:()=>i,persist:()=>{},preventDefault:()=>{r=!0,t.preventDefault()},stopPropagation:()=>{i=!0,t.stopPropagation()}})}(null==r?void 0:r.current)&&r.current(e)}}))}function g(e){return s.use?{fetchPriority:e}:{fetchpriority:e}}"undefined"==typeof window&&(globalThis.__NEXT_IMAGE_IMPORTED=!0);let y=(0,s.forwardRef)((e,t)=>{let{src:n,srcSet:r,sizes:i,height:a,width:u,decoding:l,className:d,style:c,fetchPriority:f,placeholder:p,loading:h,unoptimized:y,fill:v,onLoadRef:b,onLoadingCompleteRef:w,setBlurComplete:_,setShowAltText:S,sizesInput:C,onLoad:O,onError:x,...j}=e;return(0,o.jsx)("img",{...j,...g(f),loading:h,width:u,height:a,decoding:l,"data-nimg":v?"fill":"1",className:d,style:c,sizes:i,srcSet:r,src:n,ref:(0,s.useCallback)(e=>{t&&("function"==typeof t?t(e):"object"==typeof t&&(t.current=e)),e&&(x&&(e.src=e.src),e.complete&&m(e,p,b,w,_,y,C))},[n,p,b,w,_,x,y,C,t]),onLoad:e=>{m(e.currentTarget,p,b,w,_,y,C)},onError:e=>{S(!0),"empty"!==p&&_(!0),x&&x(e)}})});function v(e){let{isAppRouter:t,imgAttributes:n}=e,r={as:"image",imageSrcSet:n.srcSet,imageSizes:n.sizes,crossOrigin:n.crossOrigin,referrerPolicy:n.referrerPolicy,...g(n.fetchPriority)};return t&&a.default.preload?(a.default.preload(n.src,r),null):(0,o.jsx)(u.default,{children:(0,o.jsx)("link",{rel:"preload",href:n.srcSet?void 0:n.src,...r},"__nimg-"+n.src+n.srcSet+n.sizes)})}let b=(0,s.forwardRef)((e,t)=>{let n=(0,s.useContext)(f.RouterContext),r=(0,s.useContext)(c.ImageConfigContext),i=(0,s.useMemo)(()=>{var e;let t=h||r||d.imageConfigDefault,n=[...t.deviceSizes,...t.imageSizes].sort((e,t)=>e-t),i=t.deviceSizes.sort((e,t)=>e-t),o=null==(e=t.qualities)?void 0:e.sort((e,t)=>e-t);return{...t,allSizes:n,deviceSizes:i,qualities:o}},[r]),{onLoad:a,onLoadingComplete:u}=e,m=(0,s.useRef)(a);(0,s.useEffect)(()=>{m.current=a},[a]);let g=(0,s.useRef)(u);(0,s.useEffect)(()=>{g.current=u},[u]);let[b,w]=(0,s.useState)(!1),[_,S]=(0,s.useState)(!1),{props:C,meta:O}=(0,l.getImgProps)(e,{defaultLoader:p.default,imgConf:i,blurComplete:b,showAltText:_});return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(y,{...C,unoptimized:O.unoptimized,placeholder:O.placeholder,fill:O.fill,onLoadRef:m,onLoadingCompleteRef:g,setBlurComplete:w,setShowAltText:S,sizesInput:e.sizes,ref:t}),O.priority?(0,o.jsx)(v,{isAppRouter:!n,imgAttributes:C}):null]})});("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},91436:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"AmpStateContext",{enumerable:!0,get:function(){return r}});let r=n(47043)._(n(2265)).default.createContext({})},23964:function(e,t){function n(e){let{ampFirst:t=!1,hybrid:n=!1,hasQuery:r=!1}=void 0===e?{}:e;return t||n&&r}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isInAmpMode",{enumerable:!0,get:function(){return n}})},55346:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getImgProps",{enumerable:!0,get:function(){return a}}),n(31765);let r=n(96496),i=n(90128);function o(e){return void 0!==e.default}function s(e){return void 0===e?e:"number"==typeof e?Number.isFinite(e)?e:NaN:"string"==typeof e&&/^[0-9]+$/.test(e)?parseInt(e,10):NaN}function a(e,t){var n,a;let u,l,d,{src:c,sizes:f,unoptimized:p=!1,priority:h=!1,loading:m,className:g,quality:y,width:v,height:b,fill:w=!1,style:_,overrideSrc:S,onLoad:C,onLoadingComplete:O,placeholder:x="empty",blurDataURL:j,fetchPriority:M,decoding:P="async",layout:E,objectFit:R,objectPosition:z,lazyBoundary:I,lazyRoot:A,...k}=e,{imgConf:L,showAltText:q,blurComplete:D,defaultLoader:U}=t,F=L||i.imageConfigDefault;if("allSizes"in F)u=F;else{let e=[...F.deviceSizes,...F.imageSizes].sort((e,t)=>e-t),t=F.deviceSizes.sort((e,t)=>e-t),r=null==(n=F.qualities)?void 0:n.sort((e,t)=>e-t);u={...F,allSizes:e,deviceSizes:t,qualities:r}}if(void 0===U)throw Error("images.loaderFile detected but the file is missing default export.\nRead more: https://nextjs.org/docs/messages/invalid-images-config");let N=k.loader||U;delete k.loader,delete k.srcSet;let T="__next_img_default"in N;if(T){if("custom"===u.loader)throw Error('Image with src "'+c+'" is missing "loader" prop.\nRead more: https://nextjs.org/docs/messages/next-image-missing-loader')}else{let e=N;N=t=>{let{config:n,...r}=t;return e(r)}}if(E){"fill"===E&&(w=!0);let e={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}}[E];e&&(_={..._,...e});let t={responsive:"100vw",fill:"100vw"}[E];t&&!f&&(f=t)}let K="",G=s(v),B=s(b);if("object"==typeof(a=c)&&(o(a)||void 0!==a.src)){let e=o(c)?c.default:c;if(!e.src)throw Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received "+JSON.stringify(e));if(!e.height||!e.width)throw Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received "+JSON.stringify(e));if(l=e.blurWidth,d=e.blurHeight,j=j||e.blurDataURL,K=e.src,!w){if(G||B){if(G&&!B){let t=G/e.width;B=Math.round(e.height*t)}else if(!G&&B){let t=B/e.height;G=Math.round(e.width*t)}}else G=e.width,B=e.height}}let V=!h&&("lazy"===m||void 0===m);(!(c="string"==typeof c?c:K)||c.startsWith("data:")||c.startsWith("blob:"))&&(p=!0,V=!1),u.unoptimized&&(p=!0),T&&c.endsWith(".svg")&&!u.dangerouslyAllowSVG&&(p=!0),h&&(M="high");let W=s(y),H=Object.assign(w?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:R,objectPosition:z}:{},q?{}:{color:"transparent"},_),Y=D||"empty"===x?null:"blur"===x?'url("data:image/svg+xml;charset=utf-8,'+(0,r.getImageBlurSvg)({widthInt:G,heightInt:B,blurWidth:l,blurHeight:d,blurDataURL:j||"",objectFit:H.objectFit})+'")':'url("'+x+'")',Z=Y?{backgroundSize:H.objectFit||"cover",backgroundPosition:H.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:Y}:{},$=function(e){let{config:t,src:n,unoptimized:r,width:i,quality:o,sizes:s,loader:a}=e;if(r)return{src:n,srcSet:void 0,sizes:void 0};let{widths:u,kind:l}=function(e,t,n){let{deviceSizes:r,allSizes:i}=e;if(n){let e=/(^|\s)(1?\d?\d)vw/g,t=[];for(let r;r=e.exec(n);r)t.push(parseInt(r[2]));if(t.length){let e=.01*Math.min(...t);return{widths:i.filter(t=>t>=r[0]*e),kind:"w"}}return{widths:i,kind:"w"}}return"number"!=typeof t?{widths:r,kind:"w"}:{widths:[...new Set([t,2*t].map(e=>i.find(t=>t>=e)||i[i.length-1]))],kind:"x"}}(t,i,s),d=u.length-1;return{sizes:s||"w"!==l?s:"100vw",srcSet:u.map((e,r)=>a({config:t,src:n,quality:o,width:e})+" "+("w"===l?e:r+1)+l).join(", "),src:a({config:t,src:n,quality:o,width:u[d]})}}({config:u,src:c,unoptimized:p,width:G,quality:W,sizes:f,loader:N});return{props:{...k,loading:V?"lazy":m,fetchPriority:M,width:G,height:B,decoding:P,className:g,style:{...H,...Z},sizes:$.sizes,srcSet:$.srcSet,src:S||$.src},meta:{unoptimized:p,priority:h,placeholder:x,fill:w}}}},38293:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{default:function(){return m},defaultHead:function(){return c}});let r=n(47043),i=n(53099),o=n(57437),s=i._(n(2265)),a=r._(n(17421)),u=n(91436),l=n(48701),d=n(23964);function c(e){void 0===e&&(e=!1);let t=[(0,o.jsx)("meta",{charSet:"utf-8"})];return e||t.push((0,o.jsx)("meta",{name:"viewport",content:"width=device-width"})),t}function f(e,t){return"string"==typeof t||"number"==typeof t?e:t.type===s.default.Fragment?e.concat(s.default.Children.toArray(t.props.children).reduce((e,t)=>"string"==typeof t||"number"==typeof t?e:e.concat(t),[])):e.concat(t)}n(31765);let p=["name","httpEquiv","charSet","itemProp"];function h(e,t){let{inAmpMode:n}=t;return e.reduce(f,[]).reverse().concat(c(n).reverse()).filter(function(){let e=new Set,t=new Set,n=new Set,r={};return i=>{let o=!0,s=!1;if(i.key&&"number"!=typeof i.key&&i.key.indexOf("$")>0){s=!0;let t=i.key.slice(i.key.indexOf("$")+1);e.has(t)?o=!1:e.add(t)}switch(i.type){case"title":case"base":t.has(i.type)?o=!1:t.add(i.type);break;case"meta":for(let e=0,t=p.length;e{let r=e.key||t;if(!n&&"link"===e.type&&e.props.href&&["https://fonts.googleapis.com/css","https://use.typekit.net/"].some(t=>e.props.href.startsWith(t))){let t={...e.props||{}};return t["data-href"]=t.href,t.href=void 0,t["data-optimized-fonts"]=!0,s.default.cloneElement(e,t)}return s.default.cloneElement(e,{key:r})})}let m=function(e){let{children:t}=e,n=(0,s.useContext)(u.AmpStateContext),r=(0,s.useContext)(l.HeadManagerContext);return(0,o.jsx)(a.default,{reduceComponentsToState:h,headManager:r,inAmpMode:(0,d.isInAmpMode)(n),children:t})};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},96496:function(e,t){function n(e){let{widthInt:t,heightInt:n,blurWidth:r,blurHeight:i,blurDataURL:o,objectFit:s}=e,a=r?40*r:t,u=i?40*i:n,l=a&&u?"viewBox='0 0 "+a+" "+u+"'":"";return"%3Csvg xmlns='http://www.w3.org/2000/svg' "+l+"%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E%3CfeComposite operator='out' in='s'/%3E%3CfeComposite in2='SourceGraphic'/%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='"+(l?"none":"contain"===s?"xMidYMid":"cover"===s?"xMidYMid slice":"none")+"' style='filter: url(%23b);' href='"+o+"'/%3E%3C/svg%3E"}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getImageBlurSvg",{enumerable:!0,get:function(){return n}})},62589:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ImageConfigContext",{enumerable:!0,get:function(){return o}});let r=n(47043)._(n(2265)),i=n(90128),o=r.default.createContext(i.imageConfigDefault)},90128:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{VALID_LOADERS:function(){return n},imageConfigDefault:function(){return r}});let n=["default","imgix","cloudinary","akamai","custom"],r={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",loaderFile:"",domains:[],disableStaticImages:!1,minimumCacheTTL:60,formats:["image/webp"],dangerouslyAllowSVG:!1,contentSecurityPolicy:"script-src 'none'; frame-src 'none'; sandbox;",contentDispositionType:"inline",localPatterns:void 0,remotePatterns:[],qualities:void 0,unoptimized:!1}},48461:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{default:function(){return u},getImageProps:function(){return a}});let r=n(47043),i=n(55346),o=n(65878),s=r._(n(5084));function a(e){let{props:t}=(0,i.getImgProps)(e,{defaultLoader:s.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1}});for(let[e,n]of Object.entries(t))void 0===n&&delete t[e];return{props:t}}let u=o.Image},5084:function(e,t){function n(e){var t;let{config:n,src:r,width:i,quality:o}=e,s=o||(null==(t=n.qualities)?void 0:t.reduce((e,t)=>Math.abs(t-75){}:r.useLayoutEffect,s=i?()=>{}:r.useEffect;function a(e){let{headManager:t,reduceComponentsToState:n}=e;function a(){if(t&&t.mountedInstances){let i=r.Children.toArray(Array.from(t.mountedInstances).filter(Boolean));t.updateHead(n(i,e))}}if(i){var u;null==t||null==(u=t.mountedInstances)||u.add(e.children),a()}return o(()=>{var n;return null==t||null==(n=t.mountedInstances)||n.add(e.children),()=>{var n;null==t||null==(n=t.mountedInstances)||n.delete(e.children)}}),o(()=>(t&&(t._pendingUpdate=a),()=>{t&&(t._pendingUpdate=a)})),s(()=>(t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null),()=>{t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null)})),null}},28766:function(e,t,n){n.d(t,{L:function(){return u}});var r=n(65436),i=n(17283),o=n(34180),s=n(82645),a=n(50550);async function u(e,t){let{abi:n,address:u,args:l,functionName:d,...c}=t,f=(0,i.R)({abi:n,args:l,functionName:d});try{let{data:t}=await (0,s.s)(e,a.R,"call")({...c,data:f,to:u});return(0,r.k)({abi:n,args:l,functionName:d,data:t||"0x"})}catch(e){throw(0,o.S)(e,{abi:n,address:u,args:l,docsPath:"/docs/contract/readContract",functionName:d})}}},89416:function(e,t,n){n.d(t,{u:function(){return l}});var r=n(28766),i=n(44199),o=n(27534),s=n(97074),a=n(44005),u=n(12364);function l(){var e,t,n;let l=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{abi:d,address:c,functionName:f,query:p={}}=l,h=l.code,m=(0,u.Z)(l),g=(0,a.x)({config:m}),y=function(e,t={}){return{async queryFn({queryKey:n}){let o=t.abi;if(!o)throw Error("abi is required");let{functionName:s,scopeKey:a,...u}=n[1],l=(()=>{let e=n[1];if(e.address)return{address:e.address};if(e.code)return{code:e.code};throw Error("address or code is required")})();if(!s)throw Error("functionName is required");return function(e,t){let{chainId:n,...o}=t,s=e.getClient({chainId:n});return(0,i.s)(s,r.L,"readContract")(o)}(e,{abi:o,functionName:s,args:u.args,...l,...u})},queryKey:function(e={}){let{abi:t,...n}=e;return["readContract",(0,o.OP)(n)]}(t)}}(m,{...l,chainId:null!==(e=l.chainId)&&void 0!==e?e:g}),v=!!((c||h)&&d&&f&&(null===(t=p.enabled)||void 0===t||t));return(0,s.aM)({...p,...y,enabled:v,structuralSharing:null!==(n=p.structuralSharing)&&void 0!==n?n:o.if})}},2398:function(e,t,n){n.d(t,{A:function(){return u}});var r=n(93184),i=n(27534),o=n(97074),s=n(44005),a=n(12364);function u(){var e,t;let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{hash:u,query:l={}}=n,d=(0,a.Z)(n),c=(0,s.x)({config:d}),f=function(e,t={}){return{async queryFn({queryKey:n}){let{hash:i,...o}=n[1];if(!i)throw Error("hash is required");return(0,r.e)(e,{...o,onReplaced:t.onReplaced,hash:i})},queryKey:function(e={}){let{onReplaced:t,...n}=e;return["waitForTransactionReceipt",(0,i.OP)(n)]}(t)}}(d,{...n,chainId:null!==(e=n.chainId)&&void 0!==e?e:c}),p=!!(u&&(null===(t=l.enabled)||void 0===t||t));return(0,o.aM)({...l,...f,enabled:p})}},6115:function(e,t,n){n.d(t,{S:function(){return f}});var r=n(2265),i=n(2894),o=n(18238),s=n(24112),a=n(45345),u=class extends s.l{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),(0,a.VS)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,a.Ym)(t.mutationKey)!==(0,a.Ym)(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#o(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#o()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??(0,i.R)();this.#t={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#o(e){o.Vr.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};e?.type==="success"?(this.#r.onSuccess?.(e.data,t,n,r),this.#r.onSettled?.(e.data,null,t,n,r)):e?.type==="error"&&(this.#r.onError?.(e.error,t,n,r),this.#r.onSettled?.(void 0,e.error,t,n,r))}this.listeners.forEach(e=>{e(this.#t)})})}},l=n(29827),d=n(18470),c=n(12364);function f(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=(e=(0,c.Z)(t),{mutationFn:t=>(0,d.n)(e,t),mutationKey:["writeContract"]}),i=function(e,t){let n=(0,l.NL)(void 0),[i]=r.useState(()=>new u(n,e));r.useEffect(()=>{i.setOptions(e)},[i,e]);let s=r.useSyncExternalStore(r.useCallback(e=>i.subscribe(o.Vr.batchCalls(e)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),d=r.useCallback((e,t)=>{i.mutate(e,t).catch(a.ZT)},[i]);if(s.error&&(0,a.L3)(i.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:d,mutateAsync:s.mutate}}({...t.mutation,...n});return{...i,mutate:i.mutate,mutateAsync:i.mutateAsync,writeContract:i.mutate,writeContractAsync:i.mutateAsync}}}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/2523.ba3a819c19e70471.js b/frontend/.next/static/chunks/2523.ba3a819c19e70471.js new file mode 100644 index 0000000..b34aff0 --- /dev/null +++ b/frontend/.next/static/chunks/2523.ba3a819c19e70471.js @@ -0,0 +1,1187 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2523],{62523:function(e,t,o){o.r(t),o.d(t,{W3mSwapPreviewView:function(){return Y},W3mSwapSelectTokenView:function(){return _},W3mSwapView:function(){return A}});var i=o(31133),n=o(84927),r=o(23614),a=o(6943),s=o(86777),l=o(41272),c=o(53357),u=o(89512),d=o(31929),p=o(43291),h=o(92413);o(97585),o(96277),o(4594),o(92374),o(44732);var g=o(4786),w=o(59712);o(32567),o(92815);var m=(0,h.iv)` + :host { + width: 100%; + } + + .details-container > wui-flex { + background: ${({tokens:e})=>e.theme.foregroundPrimary}; + border-radius: ${({borderRadius:e})=>e["3"]}; + width: 100%; + } + + .details-container > wui-flex > button { + border: none; + background: none; + padding: ${({spacing:e})=>e["3"]}; + border-radius: ${({borderRadius:e})=>e["3"]}; + cursor: pointer; + } + + .details-content-container { + padding: ${({spacing:e})=>e["2"]}; + padding-top: 0px; + display: flex; + align-items: center; + justify-content: center; + } + + .details-content-container > wui-flex { + width: 100%; + } + + .details-row { + width: 100%; + padding: ${({spacing:e})=>e["3"]}; + padding-left: ${({spacing:e})=>e["3"]}; + padding-right: ${({spacing:e})=>e["2"]}; + border-radius: calc( + ${({borderRadius:e})=>e["1"]} + ${({borderRadius:e})=>e["1"]} + ); + background: ${({tokens:e})=>e.theme.foregroundPrimary}; + } + + .details-row-title { + white-space: nowrap; + } + + .details-row.provider-free-row { + padding-right: ${({spacing:e})=>e["2"]}; + } +`,k=function(e,t,o,i){var n,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(r<3?n(a):r>3?n(t,o,a):n(t,o))||a);return r>3&&a&&Object.defineProperty(t,o,a),a};let b=w.bq.CONVERT_SLIPPAGE_TOLERANCE,f=class extends i.oi{constructor(){super(),this.unsubscribe=[],this.networkName=a.R.state.activeCaipNetwork?.name,this.detailsOpen=!1,this.sourceToken=l.nY.state.sourceToken,this.toToken=l.nY.state.toToken,this.toTokenAmount=l.nY.state.toTokenAmount,this.sourceTokenPriceInUSD=l.nY.state.sourceTokenPriceInUSD,this.toTokenPriceInUSD=l.nY.state.toTokenPriceInUSD,this.priceImpact=l.nY.state.priceImpact,this.maxSlippage=l.nY.state.maxSlippage,this.networkTokenSymbol=l.nY.state.networkTokenSymbol,this.inputError=l.nY.state.inputError,this.unsubscribe.push(l.nY.subscribe(e=>{this.sourceToken=e.sourceToken,this.toToken=e.toToken,this.toTokenAmount=e.toTokenAmount,this.priceImpact=e.priceImpact,this.maxSlippage=e.maxSlippage,this.sourceTokenPriceInUSD=e.sourceTokenPriceInUSD,this.toTokenPriceInUSD=e.toTokenPriceInUSD,this.inputError=e.inputError}))}render(){let e=this.toTokenAmount&&this.maxSlippage?r.C.bigNumber(this.toTokenAmount).minus(this.maxSlippage).toString():null;if(!this.sourceToken||!this.toToken||this.inputError)return null;let t=this.sourceTokenPriceInUSD&&this.toTokenPriceInUSD?1/this.toTokenPriceInUSD*this.sourceTokenPriceInUSD:0;return(0,i.dy)` + + + + ${this.detailsOpen?(0,i.dy)` + + ${this.priceImpact?(0,i.dy)` + + + + Price impact + + + + + + + + ${r.C.formatNumberToLocalString(this.priceImpact,3)}% + + + + `:null} + ${this.maxSlippage&&this.sourceToken.symbol?(0,i.dy)` + + + + Max. slippage + + + + + + + + ${r.C.formatNumberToLocalString(this.maxSlippage,6)} + ${this.toToken.symbol} ${b}% + + + + `:null} + + + + + Provider fee + + + + 0.85% + + + + + `:null} + + + `}toggleDetails(){this.detailsOpen=!this.detailsOpen}};f.styles=[m],k([(0,n.SB)()],f.prototype,"networkName",void 0),k([(0,n.Cb)()],f.prototype,"detailsOpen",void 0),k([(0,n.SB)()],f.prototype,"sourceToken",void 0),k([(0,n.SB)()],f.prototype,"toToken",void 0),k([(0,n.SB)()],f.prototype,"toTokenAmount",void 0),k([(0,n.SB)()],f.prototype,"sourceTokenPriceInUSD",void 0),k([(0,n.SB)()],f.prototype,"toTokenPriceInUSD",void 0),k([(0,n.SB)()],f.prototype,"priceImpact",void 0),k([(0,n.SB)()],f.prototype,"maxSlippage",void 0),k([(0,n.SB)()],f.prototype,"networkTokenSymbol",void 0),k([(0,n.SB)()],f.prototype,"inputError",void 0),f=k([(0,h.Mo)("w3m-swap-details")],f),o(80843);var x=(0,h.iv)` + :host { + width: 100%; + } + + :host > wui-flex { + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: center; + border-radius: ${({borderRadius:e})=>e["5"]}; + padding: ${({spacing:e})=>e["5"]}; + padding-right: ${({spacing:e})=>e["3"]}; + background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; + box-shadow: inset 0px 0px 0px 1px ${({tokens:e})=>e.theme.foregroundPrimary}; + width: 100%; + height: 100px; + box-sizing: border-box; + position: relative; + } + + wui-shimmer.market-value { + opacity: 0; + } + + :host > wui-flex > svg.input_mask { + position: absolute; + inset: 0; + z-index: 5; + } + + :host wui-flex .input_mask__border, + :host wui-flex .input_mask__background { + transition: fill ${({durations:e})=>e.md} + ${({easings:e})=>e["ease-out-power-1"]}; + will-change: fill; + } + + :host wui-flex .input_mask__border { + fill: ${({tokens:e})=>e.core.glass010}; + } + + :host wui-flex .input_mask__background { + fill: ${({tokens:e})=>e.theme.foregroundPrimary}; + } +`,y=function(e,t,o,i){var n,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(r<3?n(a):r>3?n(t,o,a):n(t,o))||a);return r>3&&a&&Object.defineProperty(t,o,a),a};let T=class extends i.oi{constructor(){super(...arguments),this.target="sourceToken"}render(){return(0,i.dy)` + + + + + ${this.templateTokenSelectButton()} + + `}templateTokenSelectButton(){return(0,i.dy)` + + + + `}};T.styles=[x],y([(0,n.Cb)()],T.prototype,"target",void 0),T=y([(0,h.Mo)("w3m-swap-input-skeleton")],T);let v={numericInputKeyDown(e,t,o){let i=e.metaKey||e.ctrlKey,n=e.key,r=n.toLocaleLowerCase(),a=","===n,s="."===n,l=n>="0"&&n<="9";i||"a"!==r&&"c"!==r&&"v"!==r&&"x"!==r||e.preventDefault(),"0"!==t||a||s||"0"!==n||e.preventDefault(),"0"===t&&l&&(o(n),e.preventDefault()),(a||s)&&(t||(o("0."),e.preventDefault()),(t?.includes(".")||t?.includes(","))&&e.preventDefault()),l||["Backspace","Meta","Ctrl","a","A","c","C","x","X","v","V","ArrowLeft","ArrowRight","Tab"].includes(n)||s||a||e.preventDefault()}};o(7060);var $=(0,h.iv)` + :host > wui-flex { + display: flex; + flex-direction: row; + justify-content: space-between; + align-items: center; + border-radius: ${({borderRadius:e})=>e["5"]}; + background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; + padding: ${({spacing:e})=>e["5"]}; + padding-right: ${({spacing:e})=>e["3"]}; + width: 100%; + height: 100px; + box-sizing: border-box; + box-shadow: inset 0px 0px 0px 1px ${({tokens:e})=>e.theme.foregroundPrimary}; + position: relative; + transition: box-shadow ${({easings:e})=>e["ease-out-power-1"]} + ${({durations:e})=>e.lg}; + will-change: background-color; + } + + :host wui-flex.focus { + box-shadow: inset 0px 0px 0px 1px ${({tokens:e})=>e.core.glass010}; + } + + :host > wui-flex .swap-input, + :host > wui-flex .swap-token-button { + z-index: 10; + } + + :host > wui-flex .swap-input { + -webkit-mask-image: linear-gradient( + 270deg, + transparent 0px, + transparent 8px, + black 24px, + black 25px, + black 32px, + black 100% + ); + mask-image: linear-gradient( + 270deg, + transparent 0px, + transparent 8px, + black 24px, + black 25px, + black 32px, + black 100% + ); + } + + :host > wui-flex .swap-input input { + background: none; + border: none; + height: 42px; + width: 100%; + font-size: 32px; + font-style: normal; + font-weight: 400; + line-height: 130%; + letter-spacing: -1.28px; + outline: none; + caret-color: ${({tokens:e})=>e.core.textAccentPrimary}; + color: ${({tokens:e})=>e.theme.textPrimary}; + padding: 0px; + } + + :host > wui-flex .swap-input input:focus-visible { + outline: none; + } + + :host > wui-flex .swap-input input::-webkit-outer-spin-button, + :host > wui-flex .swap-input input::-webkit-inner-spin-button { + -webkit-appearance: none; + margin: 0; + } + + .max-value-button { + background-color: transparent; + border: none; + cursor: pointer; + color: ${({tokens:e})=>e.core.glass010}; + padding-left: 0px; + } + + .market-value { + min-height: 18px; + } +`,S=function(e,t,o,i){var n,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(r<3?n(a):r>3?n(t,o,a):n(t,o))||a);return r>3&&a&&Object.defineProperty(t,o,a),a};let C=class extends i.oi{constructor(){super(...arguments),this.focused=!1,this.price=0,this.target="sourceToken",this.onSetAmount=null,this.onSetMaxValue=null}render(){let e=this.marketValue||"0",t=r.C.bigNumber(e).gt("0");return(0,i.dy)` + + + this.onFocusChange(!0)} + @focusout=${()=>this.onFocusChange(!1)} + ?disabled=${this.disabled} + value=${this.value||""} + @input=${this.dispatchInputChangeEvent} + @keydown=${this.handleKeydown} + placeholder="0" + type="text" + inputmode="decimal" + pattern="[0-9,.]*" + /> + + ${t?`$${r.C.formatNumberToLocalString(this.marketValue,2)}`:null} + + + ${this.templateTokenSelectButton()} + + `}handleKeydown(e){return v.numericInputKeyDown(e,this.value,e=>this.onSetAmount?.(this.target,e))}dispatchInputChangeEvent(e){if(!this.onSetAmount)return;let t=e.target.value.replace(/[^0-9.]/gu,"");","===t||"."===t?this.onSetAmount(this.target,"0."):t.endsWith(",")?this.onSetAmount(this.target,t.replace(",",".")):this.onSetAmount(this.target,t)}setMaxValueToInput(){this.onSetMaxValue?.(this.target,this.balance)}templateTokenSelectButton(){return this.token?(0,i.dy)` + + + + ${this.tokenBalanceTemplate()} + + `:(0,i.dy)` + Select token + `}tokenBalanceTemplate(){let e=r.C.multiply(this.balance,this.price),t=!!e&&e?.gt(5e-5);return(0,i.dy)` + ${t?(0,i.dy)` + ${r.C.formatNumberToLocalString(this.balance,2)} + `:null} + ${"sourceToken"===this.target?this.tokenActionButtonTemplate(t):null} + `}tokenActionButtonTemplate(e){return e?(0,i.dy)` `:(0,i.dy)` `}onFocusChange(e){this.focused=e}onSelectToken(){d.X.sendEvent({type:"track",event:"CLICK_SELECT_TOKEN_TO_SWAP"}),s.RouterController.push("SwapSelectToken",{target:this.target})}onBuyToken(){s.RouterController.push("OnRampProviders")}};C.styles=[$],S([(0,n.Cb)()],C.prototype,"focused",void 0),S([(0,n.Cb)()],C.prototype,"balance",void 0),S([(0,n.Cb)()],C.prototype,"value",void 0),S([(0,n.Cb)()],C.prototype,"price",void 0),S([(0,n.Cb)()],C.prototype,"marketValue",void 0),S([(0,n.Cb)()],C.prototype,"disabled",void 0),S([(0,n.Cb)()],C.prototype,"target",void 0),S([(0,n.Cb)()],C.prototype,"token",void 0),S([(0,n.Cb)()],C.prototype,"onSetAmount",void 0),S([(0,n.Cb)()],C.prototype,"onSetMaxValue",void 0),C=S([(0,h.Mo)("w3m-swap-input")],C);var P=(0,h.iv)` + :host > wui-flex:first-child { + overflow-y: auto; + overflow-x: hidden; + scrollbar-width: none; + } + + :host > wui-flex:first-child::-webkit-scrollbar { + display: none; + } + + wui-loading-hexagon { + position: absolute; + } + + .action-button { + width: 100%; + border-radius: ${({borderRadius:e})=>e["4"]}; + } + + .action-button:disabled { + border-color: 1px solid ${({tokens:e})=>e.core.glass010}; + } + + .swap-inputs-container { + position: relative; + } + + wui-icon-box { + width: 32px; + height: 32px; + border-radius: ${({borderRadius:e})=>e["10"]} !important; + border: 4px solid ${({tokens:e})=>e.theme.backgroundPrimary}; + background: ${({tokens:e})=>e.theme.foregroundPrimary}; + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + z-index: 3; + } + + .replace-tokens-button-container { + display: flex; + justify-content: center; + align-items: center; + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + gap: ${({spacing:e})=>e["2"]}; + border-radius: ${({borderRadius:e})=>e["4"]}; + background-color: ${({tokens:e})=>e.theme.backgroundPrimary}; + padding: ${({spacing:e})=>e["2"]}; + } + + .details-container > wui-flex { + background: ${({tokens:e})=>e.theme.foregroundPrimary}; + border-radius: ${({borderRadius:e})=>e["3"]}; + width: 100%; + } + + .details-container > wui-flex > button { + border: none; + background: none; + padding: ${({spacing:e})=>e["3"]}; + border-radius: ${({borderRadius:e})=>e["3"]}; + transition: background ${({durations:e})=>e.lg} + ${({easings:e})=>e["ease-out-power-2"]}; + will-change: background; + } + + .details-container > wui-flex > button:hover { + background: ${({tokens:e})=>e.theme.foregroundPrimary}; + } + + .details-content-container { + padding: ${({spacing:e})=>e["2"]}; + display: flex; + align-items: center; + justify-content: center; + } + + .details-content-container > wui-flex { + width: 100%; + } + + .details-row { + width: 100%; + padding: ${({spacing:e})=>e["3"]} ${({spacing:e})=>e["5"]}; + border-radius: ${({borderRadius:e})=>e["3"]}; + background: ${({tokens:e})=>e.theme.foregroundPrimary}; + } +`,I=function(e,t,o,i){var n,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(r<3?n(a):r>3?n(t,o,a):n(t,o))||a);return r>3&&a&&Object.defineProperty(t,o,a),a};let A=class extends i.oi{subscribe({resetSwapState:e,initializeSwapState:t}){return()=>{a.R.subscribeKey("activeCaipNetwork",o=>this.onCaipNetworkChange({newCaipNetwork:o,resetSwapState:e,initializeSwapState:t})),a.R.subscribeChainProp("accountState",o=>{this.onCaipAddressChange({newCaipAddress:o?.caipAddress,resetSwapState:e,initializeSwapState:t})})}}constructor(){super(),this.unsubscribe=[],this.initialParams=s.RouterController.state.data?.swap,this.detailsOpen=!1,this.caipAddress=a.R.getAccountData()?.caipAddress,this.caipNetworkId=a.R.state.activeCaipNetwork?.caipNetworkId,this.initialized=l.nY.state.initialized,this.loadingQuote=l.nY.state.loadingQuote,this.loadingPrices=l.nY.state.loadingPrices,this.loadingTransaction=l.nY.state.loadingTransaction,this.sourceToken=l.nY.state.sourceToken,this.sourceTokenAmount=l.nY.state.sourceTokenAmount,this.sourceTokenPriceInUSD=l.nY.state.sourceTokenPriceInUSD,this.toToken=l.nY.state.toToken,this.toTokenAmount=l.nY.state.toTokenAmount,this.toTokenPriceInUSD=l.nY.state.toTokenPriceInUSD,this.inputError=l.nY.state.inputError,this.fetchError=l.nY.state.fetchError,this.lastTokenPriceUpdate=0,this.minTokenPriceUpdateInterval=1e4,this.visibilityChangeHandler=()=>{document?.hidden?(clearInterval(this.interval),this.interval=void 0):this.startTokenPriceInterval()},this.startTokenPriceInterval=()=>{this.interval&&Date.now()-this.lastTokenPriceUpdatethis.minTokenPriceUpdateInterval&&this.fetchTokensAndValues(),clearInterval(this.interval),this.interval=setInterval(()=>{this.fetchTokensAndValues()},this.minTokenPriceUpdateInterval))},this.watchTokensAndValues=()=>{this.sourceToken&&this.toToken&&(this.subscribeToVisibilityChange(),this.startTokenPriceInterval())},this.onDebouncedGetSwapCalldata=c.j.debounce(async()=>{await l.nY.swapTokens()},200),this.subscribe({resetSwapState:!0,initializeSwapState:!1})(),this.unsubscribe.push(this.subscribe({resetSwapState:!1,initializeSwapState:!0}),u.I.subscribeKey("open",e=>{e||l.nY.resetState()}),s.RouterController.subscribeKey("view",e=>{e.includes("Swap")||l.nY.resetValues()}),l.nY.subscribe(e=>{this.initialized=e.initialized,this.loadingQuote=e.loadingQuote,this.loadingPrices=e.loadingPrices,this.loadingTransaction=e.loadingTransaction,this.sourceToken=e.sourceToken,this.sourceTokenAmount=e.sourceTokenAmount,this.sourceTokenPriceInUSD=e.sourceTokenPriceInUSD,this.toToken=e.toToken,this.toTokenAmount=e.toTokenAmount,this.toTokenPriceInUSD=e.toTokenPriceInUSD,this.inputError=e.inputError,this.fetchError=e.fetchError,e.sourceToken&&e.toToken&&this.watchTokensAndValues()}))}async firstUpdated(){l.nY.initializeState(),this.watchTokensAndValues(),await this.handleSwapParameters()}disconnectedCallback(){this.unsubscribe.forEach(e=>e?.()),clearInterval(this.interval),document?.removeEventListener("visibilitychange",this.visibilityChangeHandler)}render(){return(0,i.dy)` + + ${this.initialized?this.templateSwap():this.templateLoading()} + + `}subscribeToVisibilityChange(){document?.removeEventListener("visibilitychange",this.visibilityChangeHandler),document?.addEventListener("visibilitychange",this.visibilityChangeHandler)}fetchTokensAndValues(){l.nY.getNetworkTokenPrice(),l.nY.getMyTokensWithBalance(),l.nY.swapTokens(),this.lastTokenPriceUpdate=Date.now()}templateSwap(){return(0,i.dy)` + + + ${this.templateTokenInput("sourceToken",this.sourceToken)} + ${this.templateTokenInput("toToken",this.toToken)} ${this.templateReplaceTokensButton()} + + ${this.templateDetails()} ${this.templateActionButton()} + + `}actionButtonLabel(){let e=!this.sourceTokenAmount||"0"===this.sourceTokenAmount;return this.fetchError?"Swap":this.sourceToken&&this.toToken?e?"Enter amount":this.inputError?this.inputError:"Review swap":"Select token"}templateReplaceTokensButton(){return(0,i.dy)` + + + + `}templateLoading(){return(0,i.dy)` + + + + + ${this.templateReplaceTokensButton()} + + ${this.templateActionButton()} + + `}templateTokenInput(e,t){let o=l.nY.state.myTokensWithBalance?.find(e=>e?.address===t?.address),n="toToken"===e?this.toTokenAmount:this.sourceTokenAmount,a="toToken"===e?this.toTokenPriceInUSD:this.sourceTokenPriceInUSD,s=r.C.parseLocalStringToNumber(n)*a;return(0,i.dy)``}onSetMaxValue(e,t){let o=r.C.bigNumber(t||"0");this.handleChangeAmount(e,o.gt(0)?o.toFixed(20):"0")}templateDetails(){return this.sourceToken&&this.toToken&&!this.inputError?(0,i.dy)``:null}handleChangeAmount(e,t){l.nY.clearError(),"sourceToken"===e?l.nY.setSourceTokenAmount(t):l.nY.setToTokenAmount(t),this.onDebouncedGetSwapCalldata()}templateActionButton(){let e=!this.toToken||!this.sourceToken,t=!this.sourceTokenAmount||"0"===this.sourceTokenAmount,o=this.loadingQuote||this.loadingPrices||this.loadingTransaction,n=o||e||t||this.inputError;return(0,i.dy)` + + ${this.actionButtonLabel()} + + `}async onSwitchTokens(){await l.nY.switchTokens()}async onSwapPreview(){this.fetchError&&await l.nY.swapTokens(),d.X.sendEvent({type:"track",event:"INITIATE_SWAP",properties:{network:this.caipNetworkId||"",swapFromToken:this.sourceToken?.symbol||"",swapToToken:this.toToken?.symbol||"",swapFromAmount:this.sourceTokenAmount||"",swapToAmount:this.toTokenAmount||"",isSmartAccount:(0,p.r9)(a.R.state.activeChain)===g.y_.ACCOUNT_TYPES.SMART_ACCOUNT}}),s.RouterController.push("SwapPreview")}async handleSwapParameters(){if(this.initialParams){if(!l.nY.state.initialized){let e=new Promise(e=>{let t=l.nY.subscribeKey("initialized",o=>{o&&(t?.(),e())})});await e}await this.setSwapParameters(this.initialParams)}}async setSwapParameters({amount:e,fromToken:t,toToken:o}){if(!l.nY.state.tokens||!l.nY.state.myTokensWithBalance){let e=new Promise(e=>{let t=l.nY.subscribeKey("myTokensWithBalance",o=>{o&&o.length>0&&(t?.(),e())});setTimeout(()=>{t?.(),e()},5e3)});await e}let i=[...l.nY.state.tokens||[],...l.nY.state.myTokensWithBalance||[]];if(t){let e=i.find(e=>e.symbol.toLowerCase()===t.toLowerCase());e&&l.nY.setSourceToken(e)}if(o){let e=i.find(e=>e.symbol.toLowerCase()===o.toLowerCase());e&&l.nY.setToToken(e)}e&&!isNaN(Number(e))&&l.nY.setSourceTokenAmount(e)}onCaipAddressChange({newCaipAddress:e,resetSwapState:t,initializeSwapState:o}){this.caipAddress!==e&&(this.caipAddress=e,t&&l.nY.resetState(),o&&l.nY.initializeState())}onCaipNetworkChange({newCaipNetwork:e,resetSwapState:t,initializeSwapState:o}){this.caipNetworkId!==e?.caipNetworkId&&(this.caipNetworkId=e?.caipNetworkId,t&&l.nY.resetState(),o&&l.nY.initializeState())}};A.styles=P,I([(0,n.Cb)({type:Object})],A.prototype,"initialParams",void 0),I([(0,n.SB)()],A.prototype,"interval",void 0),I([(0,n.SB)()],A.prototype,"detailsOpen",void 0),I([(0,n.SB)()],A.prototype,"caipAddress",void 0),I([(0,n.SB)()],A.prototype,"caipNetworkId",void 0),I([(0,n.SB)()],A.prototype,"initialized",void 0),I([(0,n.SB)()],A.prototype,"loadingQuote",void 0),I([(0,n.SB)()],A.prototype,"loadingPrices",void 0),I([(0,n.SB)()],A.prototype,"loadingTransaction",void 0),I([(0,n.SB)()],A.prototype,"sourceToken",void 0),I([(0,n.SB)()],A.prototype,"sourceTokenAmount",void 0),I([(0,n.SB)()],A.prototype,"sourceTokenPriceInUSD",void 0),I([(0,n.SB)()],A.prototype,"toToken",void 0),I([(0,n.SB)()],A.prototype,"toTokenAmount",void 0),I([(0,n.SB)()],A.prototype,"toTokenPriceInUSD",void 0),I([(0,n.SB)()],A.prototype,"inputError",void 0),I([(0,n.SB)()],A.prototype,"fetchError",void 0),I([(0,n.SB)()],A.prototype,"lastTokenPriceUpdate",void 0),A=I([(0,h.Mo)("w3m-swap-view")],A);var B=(0,h.iv)` + :host > wui-flex:first-child { + overflow-y: auto; + overflow-x: hidden; + scrollbar-width: none; + } + + :host > wui-flex:first-child::-webkit-scrollbar { + display: none; + } + + .preview-container, + .details-container { + width: 100%; + } + + .token-image { + width: 24px; + height: 24px; + box-shadow: 0 0 0 2px ${({tokens:e})=>e.core.glass010}; + border-radius: 12px; + } + + wui-loading-hexagon { + position: absolute; + } + + .token-item { + display: flex; + align-items: center; + justify-content: center; + gap: ${({spacing:e})=>e["2"]}; + padding: ${({spacing:e})=>e["2"]}; + height: 40px; + border: none; + border-radius: 80px; + background: ${({tokens:e})=>e.theme.foregroundPrimary}; + box-shadow: inset 0 0 0 1px ${({tokens:e})=>e.theme.foregroundPrimary}; + cursor: pointer; + transition: background ${({durations:e})=>e.lg} + ${({easings:e})=>e["ease-out-power-2"]}; + will-change: background; + } + + .token-item:hover { + background: ${({tokens:e})=>e.core.glass010}; + } + + .preview-token-details-container { + width: 100%; + } + + .details-row { + width: 100%; + padding: ${({spacing:e})=>e["3"]} ${({spacing:e})=>e["5"]}; + border-radius: ${({borderRadius:e})=>e["3"]}; + background: ${({tokens:e})=>e.theme.foregroundPrimary}; + } + + .action-buttons-container { + width: 100%; + gap: ${({spacing:e})=>e["2"]}; + } + + .action-buttons-container > button { + display: flex; + align-items: center; + justify-content: center; + background: transparent; + height: 48px; + border-radius: ${({borderRadius:e})=>e["4"]}; + border: none; + box-shadow: inset 0 0 0 1px ${({tokens:e})=>e.core.glass010}; + } + + .action-buttons-container > button:disabled { + opacity: 0.8; + cursor: not-allowed; + } + + .action-button > wui-loading-spinner { + display: inline-block; + } + + .cancel-button:hover, + .action-button:hover { + cursor: pointer; + } + + .action-buttons-container > wui-button.cancel-button { + flex: 2; + } + + .action-buttons-container > wui-button.action-button { + flex: 4; + } + + .action-buttons-container > button.action-button > wui-text { + color: white; + } + + .details-container > wui-flex { + background: ${({tokens:e})=>e.theme.foregroundPrimary}; + border-radius: ${({borderRadius:e})=>e["3"]}; + width: 100%; + } + + .details-container > wui-flex > button { + border: none; + background: none; + padding: ${({spacing:e})=>e["3"]}; + border-radius: ${({borderRadius:e})=>e["3"]}; + transition: background ${({durations:e})=>e.lg} + ${({easings:e})=>e["ease-out-power-2"]}; + will-change: background; + } + + .details-container > wui-flex > button:hover { + background: ${({tokens:e})=>e.theme.foregroundPrimary}; + } + + .details-content-container { + padding: ${({spacing:e})=>e["2"]}; + display: flex; + align-items: center; + justify-content: center; + } + + .details-content-container > wui-flex { + width: 100%; + } + + .details-row { + width: 100%; + padding: ${({spacing:e})=>e["3"]} ${({spacing:e})=>e["5"]}; + border-radius: ${({borderRadius:e})=>e["3"]}; + background: ${({tokens:e})=>e.theme.foregroundPrimary}; + } +`,D=function(e,t,o,i){var n,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(r<3?n(a):r>3?n(t,o,a):n(t,o))||a);return r>3&&a&&Object.defineProperty(t,o,a),a};let Y=class extends i.oi{constructor(){super(),this.unsubscribe=[],this.detailsOpen=!0,this.approvalTransaction=l.nY.state.approvalTransaction,this.swapTransaction=l.nY.state.swapTransaction,this.sourceToken=l.nY.state.sourceToken,this.sourceTokenAmount=l.nY.state.sourceTokenAmount??"",this.sourceTokenPriceInUSD=l.nY.state.sourceTokenPriceInUSD,this.balanceSymbol=a.R.getAccountData()?.balanceSymbol,this.toToken=l.nY.state.toToken,this.toTokenAmount=l.nY.state.toTokenAmount??"",this.toTokenPriceInUSD=l.nY.state.toTokenPriceInUSD,this.caipNetwork=a.R.state.activeCaipNetwork,this.inputError=l.nY.state.inputError,this.loadingQuote=l.nY.state.loadingQuote,this.loadingApprovalTransaction=l.nY.state.loadingApprovalTransaction,this.loadingBuildTransaction=l.nY.state.loadingBuildTransaction,this.loadingTransaction=l.nY.state.loadingTransaction,this.unsubscribe.push(a.R.subscribeChainProp("accountState",e=>{e?.balanceSymbol!==this.balanceSymbol&&s.RouterController.goBack()}),a.R.subscribeKey("activeCaipNetwork",e=>{this.caipNetwork!==e&&(this.caipNetwork=e)}),l.nY.subscribe(e=>{this.approvalTransaction=e.approvalTransaction,this.swapTransaction=e.swapTransaction,this.sourceToken=e.sourceToken,this.toToken=e.toToken,this.toTokenPriceInUSD=e.toTokenPriceInUSD,this.sourceTokenAmount=e.sourceTokenAmount??"",this.toTokenAmount=e.toTokenAmount??"",this.inputError=e.inputError,e.inputError&&s.RouterController.goBack(),this.loadingQuote=e.loadingQuote,this.loadingApprovalTransaction=e.loadingApprovalTransaction,this.loadingBuildTransaction=e.loadingBuildTransaction,this.loadingTransaction=e.loadingTransaction}))}firstUpdated(){l.nY.getTransaction(),this.refreshTransaction()}disconnectedCallback(){this.unsubscribe.forEach(e=>e?.()),clearInterval(this.interval)}render(){return(0,i.dy)` + + ${this.templateSwap()} + + `}refreshTransaction(){this.interval=setInterval(()=>{l.nY.getApprovalLoadingState()||l.nY.getTransaction()},1e4)}templateSwap(){let e=`${r.C.formatNumberToLocalString(parseFloat(this.sourceTokenAmount))} ${this.sourceToken?.symbol}`,t=`${r.C.formatNumberToLocalString(parseFloat(this.toTokenAmount))} ${this.toToken?.symbol}`,o=parseFloat(this.sourceTokenAmount)*this.sourceTokenPriceInUSD,n=parseFloat(this.toTokenAmount)*this.toTokenPriceInUSD,a=r.C.formatNumberToLocalString(o),s=r.C.formatNumberToLocalString(n),l=this.loadingQuote||this.loadingBuildTransaction||this.loadingTransaction||this.loadingApprovalTransaction;return(0,i.dy)` + + + + + Send + $${a} + + + + + + + + Receive + $${s} + + + + + + + ${this.templateDetails()} + + + + Review transaction carefully + + + + + Cancel + + + ${this.actionButtonLabel()} + + + + `}templateDetails(){return this.sourceToken&&this.toToken&&!this.inputError?(0,i.dy)``:null}actionButtonLabel(){return this.loadingApprovalTransaction?"Approving...":this.approvalTransaction?"Approve":"Swap"}onCancelTransaction(){s.RouterController.goBack()}onSendTransaction(){this.approvalTransaction?l.nY.sendTransactionForApproval(this.approvalTransaction):l.nY.sendTransactionForSwap(this.swapTransaction)}};Y.styles=B,D([(0,n.SB)()],Y.prototype,"interval",void 0),D([(0,n.SB)()],Y.prototype,"detailsOpen",void 0),D([(0,n.SB)()],Y.prototype,"approvalTransaction",void 0),D([(0,n.SB)()],Y.prototype,"swapTransaction",void 0),D([(0,n.SB)()],Y.prototype,"sourceToken",void 0),D([(0,n.SB)()],Y.prototype,"sourceTokenAmount",void 0),D([(0,n.SB)()],Y.prototype,"sourceTokenPriceInUSD",void 0),D([(0,n.SB)()],Y.prototype,"balanceSymbol",void 0),D([(0,n.SB)()],Y.prototype,"toToken",void 0),D([(0,n.SB)()],Y.prototype,"toTokenAmount",void 0),D([(0,n.SB)()],Y.prototype,"toTokenPriceInUSD",void 0),D([(0,n.SB)()],Y.prototype,"caipNetwork",void 0),D([(0,n.SB)()],Y.prototype,"inputError",void 0),D([(0,n.SB)()],Y.prototype,"loadingQuote",void 0),D([(0,n.SB)()],Y.prototype,"loadingApprovalTransaction",void 0),D([(0,n.SB)()],Y.prototype,"loadingBuildTransaction",void 0),D([(0,n.SB)()],Y.prototype,"loadingTransaction",void 0),Y=D([(0,h.Mo)("w3m-swap-preview-view")],Y),o(64349),o(23805),o(18360),o(5680);var R=o(84249),E=o(57116),j=o(11131),L=(0,j.iv)` + :host { + width: 100%; + height: 60px; + min-height: 60px; + } + + :host > wui-flex { + cursor: pointer; + height: 100%; + display: flex; + column-gap: ${({spacing:e})=>e["3"]}; + padding: ${({spacing:e})=>e["2"]}; + padding-right: ${({spacing:e})=>e["4"]}; + width: 100%; + background-color: transparent; + border-radius: ${({borderRadius:e})=>e["4"]}; + color: ${({tokens:e})=>e.theme.foregroundSecondary}; + transition: + background-color ${({durations:e})=>e.lg} + ${({easings:e})=>e["ease-out-power-2"]}, + opacity ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]}; + will-change: background-color, opacity; + } + + @media (hover: hover) and (pointer: fine) { + :host > wui-flex:hover { + background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; + } + + :host > wui-flex:active { + background-color: ${({tokens:e})=>e.core.glass010}; + } + } + + :host([disabled]) > wui-flex { + opacity: 0.6; + } + + :host([disabled]) > wui-flex:hover { + background-color: transparent; + } + + :host > wui-flex > wui-flex { + flex: 1; + } + + :host > wui-flex > wui-image, + :host > wui-flex > .token-item-image-placeholder { + width: 40px; + max-width: 40px; + height: 40px; + border-radius: ${({borderRadius:e})=>e["20"]}; + position: relative; + } + + :host > wui-flex > .token-item-image-placeholder { + display: flex; + align-items: center; + justify-content: center; + } + + :host > wui-flex > wui-image::after, + :host > wui-flex > .token-item-image-placeholder::after { + position: absolute; + content: ''; + inset: 0; + box-shadow: inset 0 0 0 1px ${({tokens:e})=>e.core.glass010}; + border-radius: ${({borderRadius:e})=>e["8"]}; + } + + button > wui-icon-box[data-variant='square-blue'] { + border-radius: ${({borderRadius:e})=>e["2"]}; + position: relative; + border: none; + width: 36px; + height: 36px; + } +`,U=function(e,t,o,i){var n,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(r<3?n(a):r>3?n(t,o,a):n(t,o))||a);return r>3&&a&&Object.defineProperty(t,o,a),a};let O=class extends i.oi{constructor(){super(),this.observer=new IntersectionObserver(()=>void 0),this.imageSrc=void 0,this.name=void 0,this.symbol=void 0,this.price=void 0,this.amount=void 0,this.visible=!1,this.imageError=!1,this.observer=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting?this.visible=!0:this.visible=!1})},{threshold:.1})}firstUpdated(){this.observer.observe(this)}disconnectedCallback(){this.observer.disconnect()}render(){if(!this.visible)return null;let e=this.amount&&this.price?r.C.multiply(this.price,this.amount)?.toFixed(3):null;return(0,i.dy)` + + ${this.visualTemplate()} + + + ${this.name} + ${e?(0,i.dy)` + + $${r.C.formatNumberToLocalString(e,3)} + + `:null} + + + ${this.symbol} + ${this.amount?(0,i.dy)` + ${r.C.formatNumberToLocalString(this.amount,5)} + `:null} + + + + `}visualTemplate(){return this.imageError?(0,i.dy)` + + `:this.imageSrc?(0,i.dy)``:null}imageLoadError(){this.imageError=!0}};O.styles=[R.ET,R.ZM,L],U([(0,n.Cb)()],O.prototype,"imageSrc",void 0),U([(0,n.Cb)()],O.prototype,"name",void 0),U([(0,n.Cb)()],O.prototype,"symbol",void 0),U([(0,n.Cb)()],O.prototype,"price",void 0),U([(0,n.Cb)()],O.prototype,"amount",void 0),U([(0,n.SB)()],O.prototype,"visible",void 0),U([(0,n.SB)()],O.prototype,"imageError",void 0),O=U([(0,E.M)("wui-token-list-item")],O),o(42653);var z=(0,j.iv)` + :host { + width: 100%; + } + + :host > wui-flex { + cursor: pointer; + height: 100%; + width: 100%; + display: flex; + column-gap: ${({spacing:e})=>e["3"]}; + padding: ${({spacing:e})=>e["2"]}; + padding-right: ${({spacing:e})=>e["4"]}; + } + + wui-flex { + display: flex; + flex: 1; + } +`;let N=class extends i.oi{render(){return(0,i.dy)` + + + + + + + + + + + + `}};N.styles=[R.ET,z],N=function(e,t,o,i){var n,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(r<3?n(a):r>3?n(t,o,a):n(t,o))||a);return r>3&&a&&Object.defineProperty(t,o,a),a}([(0,E.M)("wui-token-list-item-loader")],N);var V=(0,h.iv)` + :host { + --tokens-scroll--top-opacity: 0; + --tokens-scroll--bottom-opacity: 1; + --suggested-tokens-scroll--left-opacity: 0; + --suggested-tokens-scroll--right-opacity: 1; + } + + :host > wui-flex:first-child { + overflow-y: hidden; + overflow-x: hidden; + scrollbar-width: none; + scrollbar-height: none; + } + + :host > wui-flex:first-child::-webkit-scrollbar { + display: none; + } + + wui-loading-hexagon { + position: absolute; + } + + .suggested-tokens-container { + overflow-x: auto; + mask-image: linear-gradient( + to right, + rgba(0, 0, 0, calc(1 - var(--suggested-tokens-scroll--left-opacity))) 0px, + rgba(200, 200, 200, calc(1 - var(--suggested-tokens-scroll--left-opacity))) 1px, + black 50px, + black 90px, + black calc(100% - 90px), + black calc(100% - 50px), + rgba(155, 155, 155, calc(1 - var(--suggested-tokens-scroll--right-opacity))) calc(100% - 1px), + rgba(0, 0, 0, calc(1 - var(--suggested-tokens-scroll--right-opacity))) 100% + ); + } + + .suggested-tokens-container::-webkit-scrollbar { + display: none; + } + + .tokens-container { + border-top: 1px solid ${({tokens:e})=>e.core.glass010}; + height: 100%; + max-height: 390px; + } + + .tokens { + width: 100%; + overflow-y: auto; + mask-image: linear-gradient( + to bottom, + rgba(0, 0, 0, calc(1 - var(--tokens-scroll--top-opacity))) 0px, + rgba(200, 200, 200, calc(1 - var(--tokens-scroll--top-opacity))) 1px, + black 50px, + black 90px, + black calc(100% - 90px), + black calc(100% - 50px), + rgba(155, 155, 155, calc(1 - var(--tokens-scroll--bottom-opacity))) calc(100% - 1px), + rgba(0, 0, 0, calc(1 - var(--tokens-scroll--bottom-opacity))) 100% + ); + } + + .network-search-input, + .select-network-button { + height: 40px; + } + + .select-network-button { + border: none; + display: flex; + flex-direction: row; + align-items: center; + justify-content: center; + gap: ${({spacing:e})=>e["2"]}; + box-shadow: inset 0 0 0 1px ${({tokens:e})=>e.core.glass010}; + background-color: transparent; + border-radius: ${({borderRadius:e})=>e["3"]}; + padding: ${({spacing:e})=>e["2"]}; + align-items: center; + transition: background-color ${({durations:e})=>e.lg} + ${({easings:e})=>e["ease-out-power-2"]}; + will-change: background-color; + } + + .select-network-button:hover { + background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; + } + + .select-network-button > wui-image { + width: 26px; + height: 26px; + border-radius: ${({borderRadius:e})=>e["4"]}; + box-shadow: inset 0 0 0 1px ${({tokens:e})=>e.core.glass010}; + } +`,M=function(e,t,o,i){var n,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(r<3?n(a):r>3?n(t,o,a):n(t,o))||a);return r>3&&a&&Object.defineProperty(t,o,a),a};let _=class extends i.oi{constructor(){super(),this.unsubscribe=[],this.targetToken=s.RouterController.state.data?.target,this.sourceToken=l.nY.state.sourceToken,this.sourceTokenAmount=l.nY.state.sourceTokenAmount,this.toToken=l.nY.state.toToken,this.myTokensWithBalance=l.nY.state.myTokensWithBalance,this.popularTokens=l.nY.state.popularTokens,this.suggestedTokens=l.nY.state.suggestedTokens,this.tokensLoading=l.nY.state.tokensLoading,this.searchValue="",this.unsubscribe.push(l.nY.subscribe(e=>{this.sourceToken=e.sourceToken,this.toToken=e.toToken,this.myTokensWithBalance=e.myTokensWithBalance,this.popularTokens=e.popularTokens,this.suggestedTokens=e.suggestedTokens,this.tokensLoading=e.tokensLoading}))}async firstUpdated(){await l.nY.getTokenList()}updated(){let e=this.renderRoot?.querySelector(".suggested-tokens-container");e?.addEventListener("scroll",this.handleSuggestedTokensScroll.bind(this));let t=this.renderRoot?.querySelector(".tokens");t?.addEventListener("scroll",this.handleTokenListScroll.bind(this))}disconnectedCallback(){super.disconnectedCallback();let e=this.renderRoot?.querySelector(".suggested-tokens-container"),t=this.renderRoot?.querySelector(".tokens");e?.removeEventListener("scroll",this.handleSuggestedTokensScroll.bind(this)),t?.removeEventListener("scroll",this.handleTokenListScroll.bind(this)),clearInterval(this.interval)}render(){return(0,i.dy)` + + ${this.templateSearchInput()} ${this.templateSuggestedTokens()} ${this.templateTokens()} + + `}onSelectToken(e){"sourceToken"===this.targetToken?l.nY.setSourceToken(e):(l.nY.setToToken(e),this.sourceToken&&this.sourceTokenAmount&&l.nY.swapTokens()),s.RouterController.goBack()}templateSearchInput(){return(0,i.dy)` + + + + `}templateMyTokens(){let e=this.myTokensWithBalance?Object.values(this.myTokensWithBalance):[],t=this.filterTokensWithText(e,this.searchValue);return t?.length>0?(0,i.dy)` + Your tokens + + ${t.map(e=>{let t=e.symbol===this.sourceToken?.symbol||e.symbol===this.toToken?.symbol;return(0,i.dy)` + {t||this.onSelectToken(e)}} + > + + `})}`:null}templateAllTokens(){let e=this.popularTokens?this.popularTokens:[],t=this.filterTokensWithText(e,this.searchValue);return this.tokensLoading?(0,i.dy)` + + + + + + `:t?.length>0?(0,i.dy)` + ${t.map(e=>(0,i.dy)` + this.onSelectToken(e)} + > + + `)} + `:null}templateTokens(){return(0,i.dy)` + + + ${this.templateMyTokens()} + + Tokens + + ${this.templateAllTokens()} + + + `}templateSuggestedTokens(){let e=this.suggestedTokens?this.suggestedTokens.slice(0,8):null;return this.tokensLoading?(0,i.dy)` + + + + + + + + `:e?(0,i.dy)` + + ${e.map(e=>(0,i.dy)` + this.onSelectToken(e)} + > + + `)} + + `:null}onSearchInputChange(e){this.searchValue=e.detail}handleSuggestedTokensScroll(){let e=this.renderRoot?.querySelector(".suggested-tokens-container");e&&(e.style.setProperty("--suggested-tokens-scroll--left-opacity",h.kj.interpolate([0,100],[0,1],e.scrollLeft).toString()),e.style.setProperty("--suggested-tokens-scroll--right-opacity",h.kj.interpolate([0,100],[0,1],e.scrollWidth-e.scrollLeft-e.offsetWidth).toString()))}handleTokenListScroll(){let e=this.renderRoot?.querySelector(".tokens");e&&(e.style.setProperty("--tokens-scroll--top-opacity",h.kj.interpolate([0,100],[0,1],e.scrollTop).toString()),e.style.setProperty("--tokens-scroll--bottom-opacity",h.kj.interpolate([0,100],[0,1],e.scrollHeight-e.scrollTop-e.offsetHeight).toString()))}filterTokensWithText(e,t){return e.filter(e=>`${e.symbol} ${e.name} ${e.address}`.toLowerCase().includes(t.toLowerCase())).sort((e,o)=>{let i=`${e.symbol} ${e.name} ${e.address}`.toLowerCase(),n=`${o.symbol} ${o.name} ${o.address}`.toLowerCase();return i.indexOf(t.toLowerCase())-n.indexOf(t.toLowerCase())})}};_.styles=V,M([(0,n.SB)()],_.prototype,"interval",void 0),M([(0,n.SB)()],_.prototype,"targetToken",void 0),M([(0,n.SB)()],_.prototype,"sourceToken",void 0),M([(0,n.SB)()],_.prototype,"sourceTokenAmount",void 0),M([(0,n.SB)()],_.prototype,"toToken",void 0),M([(0,n.SB)()],_.prototype,"myTokensWithBalance",void 0),M([(0,n.SB)()],_.prototype,"popularTokens",void 0),M([(0,n.SB)()],_.prototype,"suggestedTokens",void 0),M([(0,n.SB)()],_.prototype,"tokensLoading",void 0),M([(0,n.SB)()],_.prototype,"searchValue",void 0),_=M([(0,h.Mo)("w3m-swap-select-token-view")],_)},7060:function(e,t,o){var i=o(31133),n=o(84927);o(74975),o(23805),o(42653),o(18360),o(5680);var r=o(84249),a=o(57116),s=o(11131),l=(0,s.iv)` + button { + display: block; + display: flex; + align-items: center; + padding: ${({spacing:e})=>e[1]}; + transition: background-color ${({durations:e})=>e.lg} + ${({easings:e})=>e["ease-out-power-2"]}; + will-change: background-color; + background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; + border-radius: ${({borderRadius:e})=>e[32]}; + } + + wui-image { + border-radius: ${({borderRadius:e})=>e[32]}; + } + + wui-text { + padding-left: ${({spacing:e})=>e[1]}; + padding-right: ${({spacing:e})=>e[1]}; + } + + .left-icon-container { + width: 24px; + height: 24px; + justify-content: center; + align-items: center; + } + + .left-image-container { + position: relative; + justify-content: center; + align-items: center; + } + + .chain-image { + position: absolute; + border: 1px solid ${({tokens:e})=>e.theme.foregroundPrimary}; + } + + /* -- Sizes --------------------------------------------------- */ + button[data-size='lg'] { + height: 32px; + } + + button[data-size='md'] { + height: 28px; + } + + button[data-size='sm'] { + height: 24px; + } + + button[data-size='lg'] .token-image { + width: 24px; + height: 24px; + } + + button[data-size='md'] .token-image { + width: 20px; + height: 20px; + } + + button[data-size='sm'] .token-image { + width: 16px; + height: 16px; + } + + button[data-size='lg'] .left-icon-container { + width: 24px; + height: 24px; + } + + button[data-size='md'] .left-icon-container { + width: 20px; + height: 20px; + } + + button[data-size='sm'] .left-icon-container { + width: 16px; + height: 16px; + } + + button[data-size='lg'] .chain-image { + width: 12px; + height: 12px; + bottom: 2px; + right: -4px; + } + + button[data-size='md'] .chain-image { + width: 10px; + height: 10px; + bottom: 2px; + right: -4px; + } + + button[data-size='sm'] .chain-image { + width: 8px; + height: 8px; + bottom: 2px; + right: -3px; + } + + /* -- Focus states --------------------------------------------------- */ + button:focus-visible:enabled { + background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; + box-shadow: 0 0 0 4px ${({tokens:e})=>e.core.foregroundAccent040}; + } + + /* -- Hover & Active states ----------------------------------------------------------- */ + @media (hover: hover) { + button:hover:enabled, + button:active:enabled { + background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; + } + } + + /* -- Disabled states --------------------------------------------------- */ + button:disabled { + background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; + opacity: 0.5; + } +`,c=function(e,t,o,i){var n,r=arguments.length,a=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(a=(r<3?n(a):r>3?n(t,o,a):n(t,o))||a);return r>3&&a&&Object.defineProperty(t,o,a),a};let u={lg:"lg-regular",md:"lg-regular",sm:"md-regular"},d={lg:"lg",md:"md",sm:"sm"},p=class extends i.oi{constructor(){super(...arguments),this.size="md",this.disabled=!1,this.text="",this.loading=!1}render(){return this.loading?(0,i.dy)` + + + `:(0,i.dy)` + + `}imageTemplate(){if(this.imageSrc&&this.chainImageSrc)return(0,i.dy)` + + + `;if(this.imageSrc)return(0,i.dy)``;let e=d[this.size];return(0,i.dy)` + + `}textTemplate(){let e=u[this.size];return(0,i.dy)`${this.text}`}};p.styles=[r.ET,r.ZM,l],c([(0,n.Cb)()],p.prototype,"size",void 0),c([(0,n.Cb)()],p.prototype,"imageSrc",void 0),c([(0,n.Cb)()],p.prototype,"chainImageSrc",void 0),c([(0,n.Cb)({type:Boolean})],p.prototype,"disabled",void 0),c([(0,n.Cb)()],p.prototype,"text",void 0),c([(0,n.Cb)({type:Boolean})],p.prototype,"loading",void 0),c([(0,a.M)("wui-token-button")],p)}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/2656.d343e9ac9b094bec.js b/frontend/.next/static/chunks/2656.d343e9ac9b094bec.js new file mode 100644 index 0000000..5c3750e --- /dev/null +++ b/frontend/.next/static/chunks/2656.d343e9ac9b094bec.js @@ -0,0 +1,14 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2656],{72656:function(t,e,r){r.r(e),r.d(e,{PhArrowCircleDown:function(){return c}}),r(31498);var a=r(38157),l=r(48567),o=r(54910),i=r(69709),s=r(78313),h=Object.defineProperty,p=Object.getOwnPropertyDescriptor,n=(t,e,r,a)=>{for(var l,o=a>1?void 0:a?p(e,r):e,i=t.length-1;i>=0;i--)(l=t[i])&&(o=(a?l(e,r,o):l(o))||o);return a&&o&&h(e,r,o),o};let c=class extends l.oi{constructor(){super(...arguments),this.size="1em",this.weight="regular",this.color="currentColor",this.mirrored=!1}render(){var t;return(0,a.dy)` + ${c.weightsMap.get(null!=(t=this.weight)?t:"regular")} + `}};c.weightsMap=new Map([["thin",(0,a.YP)``],["light",(0,a.YP)``],["regular",(0,a.YP)``],["bold",(0,a.YP)``],["fill",(0,a.YP)``],["duotone",(0,a.YP)``]]),c.styles=(0,s.iv)` + :host { + display: contents; + } + `,n([(0,i.C)({type:String,reflect:!0})],c.prototype,"size",2),n([(0,i.C)({type:String,reflect:!0})],c.prototype,"weight",2),n([(0,i.C)({type:String,reflect:!0})],c.prototype,"color",2),n([(0,i.C)({type:Boolean,reflect:!0})],c.prototype,"mirrored",2),c=n([(0,o.M)("ph-arrow-circle-down")],c)}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/2947.eb856c7b9a09bd13.js b/frontend/.next/static/chunks/2947.eb856c7b9a09bd13.js new file mode 100644 index 0000000..fcce638 --- /dev/null +++ b/frontend/.next/static/chunks/2947.eb856c7b9a09bd13.js @@ -0,0 +1,14 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2947],{2947:function(t,e,r){r.r(e),r.d(e,{PhWarningCircle:function(){return c}}),r(31498);var a=r(38157),i=r(48567),o=r(54910),s=r(69709),h=r(78313),l=Object.defineProperty,n=Object.getOwnPropertyDescriptor,p=(t,e,r,a)=>{for(var i,o=a>1?void 0:a?n(e,r):e,s=t.length-1;s>=0;s--)(i=t[s])&&(o=(a?i(e,r,o):i(o))||o);return a&&o&&l(e,r,o),o};let c=class extends i.oi{constructor(){super(...arguments),this.size="1em",this.weight="regular",this.color="currentColor",this.mirrored=!1}render(){var t;return(0,a.dy)` + ${c.weightsMap.get(null!=(t=this.weight)?t:"regular")} + `}};c.weightsMap=new Map([["thin",(0,a.YP)``],["light",(0,a.YP)``],["regular",(0,a.YP)``],["bold",(0,a.YP)``],["fill",(0,a.YP)``],["duotone",(0,a.YP)``]]),c.styles=(0,h.iv)` + :host { + display: contents; + } + `,p([(0,s.C)({type:String,reflect:!0})],c.prototype,"size",2),p([(0,s.C)({type:String,reflect:!0})],c.prototype,"weight",2),p([(0,s.C)({type:String,reflect:!0})],c.prototype,"color",2),p([(0,s.C)({type:Boolean,reflect:!0})],c.prototype,"mirrored",2),c=p([(0,o.M)("ph-warning-circle")],c)}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/3124.1a3770a9aaaf9cfc.js b/frontend/.next/static/chunks/3124.1a3770a9aaaf9cfc.js new file mode 100644 index 0000000..fb1d0bf --- /dev/null +++ b/frontend/.next/static/chunks/3124.1a3770a9aaaf9cfc.js @@ -0,0 +1,14 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3124],{23124:function(a,t,e){e.r(t),e.d(t,{PhIdentificationCard:function(){return n}}),e(31498);var r=e(38157),i=e(48567),h=e(54910),s=e(69709),o=e(78313),Z=Object.defineProperty,A=Object.getOwnPropertyDescriptor,H=(a,t,e,r)=>{for(var i,h=r>1?void 0:r?A(t,e):t,s=a.length-1;s>=0;s--)(i=a[s])&&(h=(r?i(t,e,h):i(h))||h);return r&&h&&Z(t,e,h),h};let n=class extends i.oi{constructor(){super(...arguments),this.size="1em",this.weight="regular",this.color="currentColor",this.mirrored=!1}render(){var a;return(0,r.dy)` + ${n.weightsMap.get(null!=(a=this.weight)?a:"regular")} + `}};n.weightsMap=new Map([["thin",(0,r.YP)``],["light",(0,r.YP)``],["regular",(0,r.YP)``],["bold",(0,r.YP)``],["fill",(0,r.YP)``],["duotone",(0,r.YP)``]]),n.styles=(0,o.iv)` + :host { + display: contents; + } + `,H([(0,s.C)({type:String,reflect:!0})],n.prototype,"size",2),H([(0,s.C)({type:String,reflect:!0})],n.prototype,"weight",2),H([(0,s.C)({type:String,reflect:!0})],n.prototype,"color",2),H([(0,s.C)({type:Boolean,reflect:!0})],n.prototype,"mirrored",2),n=H([(0,h.M)("ph-identification-card")],n)}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/319.da60cadf1434690f.js b/frontend/.next/static/chunks/319.da60cadf1434690f.js new file mode 100644 index 0000000..5c0e44c --- /dev/null +++ b/frontend/.next/static/chunks/319.da60cadf1434690f.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[319],{60319:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return O}});var r=n(57437),o=n(2265),l=n(30166),a=n(16226),s=n(22538),i=n(81080),c=n(60759);let u=(0,a.dW)(function({position:e,...t},n){let r=new c.Marker(e,t);return(0,s.O)(r,(0,i.sj)(n,{overlayContainer:r}))},function(e,t,n){t.position!==n.position&&e.setLatLng(t.position),null!=t.icon&&t.icon!==n.icon&&e.setIcon(t.icon),null!=t.zIndexOffset&&t.zIndexOffset!==n.zIndexOffset&&e.setZIndexOffset(t.zIndexOffset),null!=t.opacity&&t.opacity!==n.opacity&&e.setOpacity(t.opacity),null!=e.dragging&&t.draggable!==n.draggable&&(!0===t.draggable?e.dragging.enable():e.dragging.disable())}),d=(0,a.SO)(function(e,t){let n=new c.Popup(e,t.overlayContainer);return(0,s.O)(n,t)},function(e,t,{position:n},r){(0,o.useEffect)(function(){let{instance:o}=e;function l(e){e.popup===o&&(o.update(),r(!0))}function a(e){e.popup===o&&r(!1)}return t.map.on({popupopen:l,popupclose:a}),null==t.overlayContainer?(null!=n&&o.setLatLng(n),o.openOn(t.map)):t.overlayContainer.bindPopup(o),function(){t.map.off({popupopen:l,popupclose:a}),t.overlayContainer?.unbindPopup(),t.map.removeLayer(o)}},[e,t,r,n])});var f=n(27648);function m(e){let{spot:t}=e;return(0,r.jsxs)("div",{className:"spot-info-window p-3 min-w-[250px]",children:[(0,r.jsxs)("div",{className:"mb-2",children:[(0,r.jsxs)("h3",{className:"font-semibold text-lg text-gray-900 mb-1",children:["Spot #",t.id]}),(0,r.jsx)("p",{className:"text-sm text-gray-600 truncate",children:t.location})]}),t.description&&(0,r.jsx)("p",{className:"text-sm text-gray-700 mb-2 line-clamp-2",children:t.description}),(0,r.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"text-xl font-bold text-blue-600",children:t.pricePerHour}),(0,r.jsx)("span",{className:"text-gray-500 text-sm ml-1",children:"cUSD/hr"})]}),(0,r.jsx)("span",{className:"px-2 py-1 rounded-full text-xs font-medium ".concat(t.isAvailable?"bg-green-100 text-green-800":"bg-red-100 text-red-800"),children:t.isAvailable?"Available":"Unavailable"})]}),(0,r.jsx)(f.default,{href:"/booking/".concat(t.id),className:"block w-full text-center bg-blue-600 text-white py-2 px-4 rounded-md hover:bg-blue-700 transition-colors text-sm font-medium",children:"View Details"})]})}let p=e=>(0,c.divIcon)({html:'\n \n \n \n \n '),className:"custom-marker",iconSize:[32,40],iconAnchor:[16,40],popupAnchor:[0,-40]});function h(e){let{spot:t,onClick:n}=e;if(!t.coordinates)return null;let o=[t.coordinates.lat,t.coordinates.lng],l=p(t.isAvailable);return(0,r.jsx)(u,{position:o,icon:l,eventHandlers:{click:()=>{null==n||n(t)}},children:(0,r.jsx)(d,{maxWidth:300,className:"spot-popup",children:(0,r.jsx)(m,{spot:t})})})}var x=n(29264);async function g(e){return"google"===x.Bn.provider&&x.Bn.googleMapsApiKey?b(e):v(e)}async function v(e){try{let t="https://nominatim.openstreetmap.org/search?format=json&q=".concat(encodeURIComponent(e),"&limit=1"),n=await fetch(t,{headers:{"User-Agent":"CarIn-Parking-App"}});if(!n.ok)throw Error("Geocoding service unavailable");let r=await n.json();if(!r||0===r.length)throw Error("Address not found");let o=r[0];return{address:o.display_name,coordinates:{lat:parseFloat(o.lat),lng:parseFloat(o.lon)}}}catch(e){throw{message:e.message||"Failed to geocode address",code:"GEOCODE_ERROR"}}}async function b(e){try{let t="https://maps.googleapis.com/maps/api/geocode/json?address=".concat(encodeURIComponent(e),"&key=").concat(x.Bn.googleMapsApiKey),n=await fetch(t);if(!n.ok)throw Error("Google Geocoding API unavailable");let r=await n.json();if("OK"!==r.status||!r.results||0===r.results.length)throw Error("Address not found");let o=r.results[0],l=o.geometry.location;return{address:o.formatted_address,coordinates:{lat:l.lat,lng:l.lng}}}catch(e){throw{message:e.message||"Failed to geocode address",code:"GEOCODE_ERROR"}}}function y(e){let{onLocationFound:t,onError:n,placeholder:l="Search for an address or location..."}=e,[a,s]=(0,o.useState)(""),[i,c]=(0,o.useState)(!1),u=(0,o.useRef)(null),d=(0,o.useCallback)(async e=>{if(e.trim()){c(!0);try{let n=await g(e);t(n.coordinates,n.address),s(n.address)}catch(t){let e=t.message||"Failed to find location";null==n||n(e)}finally{c(!1)}}},[t,n]);return(0,r.jsx)("form",{onSubmit:e=>{e.preventDefault(),u.current&&clearTimeout(u.current),d(a)},className:"w-full",children:(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("input",{type:"text",value:a,onChange:e=>{let t=e.target.value;s(t),u.current&&clearTimeout(u.current),t.trim().length>=3&&(u.current=setTimeout(()=>{d(t)},500))},placeholder:l,className:"w-full px-4 py-2 pr-10 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent",disabled:i}),(0,r.jsx)("div",{className:"absolute right-3 top-1/2 transform -translate-y-1/2",children:i?(0,r.jsx)("div",{className:"animate-spin rounded-full h-5 w-5 border-b-2 border-blue-600"}):(0,r.jsx)("svg",{className:"w-5 h-5 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})})]})})}function j(e){var t,n,l,a;let{onFilterChange:s,defaultFilters:i}=e,[c,u]=(0,o.useState)({minPrice:null!==(t=null==i?void 0:i.minPrice)&&void 0!==t?t:0,maxPrice:null!==(n=null==i?void 0:i.maxPrice)&&void 0!==n?n:10,showAvailableOnly:null!==(l=null==i?void 0:i.showAvailableOnly)&&void 0!==l&&l,maxDistance:null!==(a=null==i?void 0:i.maxDistance)&&void 0!==a?a:50}),[d,f]=(0,o.useState)(!1),m=(e,t)=>{let n={...c,[e]:t};u(n),s(n)};return(0,r.jsxs)("div",{className:"bg-white rounded-lg shadow-lg p-4",children:[(0,r.jsxs)("button",{onClick:()=>f(!d),className:"w-full flex items-center justify-between text-left",children:[(0,r.jsx)("span",{className:"font-semibold",children:"Filters"}),(0,r.jsx)("svg",{className:"w-5 h-5 transition-transform ".concat(d?"rotate-180":""),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),d&&(0,r.jsxs)("div",{className:"mt-4 space-y-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Price Range (cUSD/hr)"}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("input",{type:"number",min:"0",step:"0.1",value:c.minPrice,onChange:e=>m("minPrice",parseFloat(e.target.value)||0),className:"flex-1 px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"Min"}),(0,r.jsx)("span",{className:"text-gray-500",children:"-"}),(0,r.jsx)("input",{type:"number",min:"0",step:"0.1",value:c.maxPrice,onChange:e=>m("maxPrice",parseFloat(e.target.value)||10),className:"flex-1 px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"Max"})]})]}),(0,r.jsx)("div",{children:(0,r.jsxs)("label",{className:"flex items-center gap-2",children:[(0,r.jsx)("input",{type:"checkbox",checked:c.showAvailableOnly,onChange:e=>m("showAvailableOnly",e.target.checked),className:"rounded border-gray-300 text-blue-600 focus:ring-blue-500"}),(0,r.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Show available spots only"})]})}),(0,r.jsxs)("div",{children:[(0,r.jsxs)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:["Max Distance: ",c.maxDistance," km"]}),(0,r.jsx)("input",{type:"range",min:"1",max:"100",value:c.maxDistance,onChange:e=>m("maxDistance",parseInt(e.target.value)),className:"w-full"})]})]})]})}var w=n(32679),N=n(96567);function k(e){let{onCenterChange:t}=e,n=(0,w.Sx)(),{location:o,getCurrentPosition:l}=(0,N.Z)();return(0,r.jsxs)("div",{className:"absolute top-4 right-4 z-[1000] flex flex-col gap-2",children:[(0,r.jsx)("button",{onClick:()=>{o?(n.setView([o.lat,o.lng],15),null==t||t(o)):l()},className:"bg-white p-2 rounded-lg shadow-lg hover:bg-gray-50 transition-colors",title:"Center on my location",children:(0,r.jsxs)("svg",{className:"w-5 h-5 text-blue-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z"}),(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 11a3 3 0 11-6 0 3 3 0 016 0z"})]})}),(0,r.jsxs)("div",{className:"flex flex-col bg-white rounded-lg shadow-lg overflow-hidden",children:[(0,r.jsx)("button",{onClick:()=>{n.zoomIn()},className:"p-2 hover:bg-gray-50 transition-colors border-b border-gray-200",title:"Zoom in",children:(0,r.jsx)("svg",{className:"w-5 h-5 text-gray-700",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})})}),(0,r.jsx)("button",{onClick:()=>{n.zoomOut()},className:"p-2 hover:bg-gray-50 transition-colors",title:"Zoom out",children:(0,r.jsx)("svg",{className:"w-5 h-5 text-gray-700",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M20 12H4"})})})]}),(0,r.jsx)("button",{onClick:()=>{var e,t,r;let o=n.getContainer();document.fullscreenElement?null===(t=(r=document).exitFullscreen)||void 0===t||t.call(r):null===(e=o.requestFullscreen)||void 0===e||e.call(o)},className:"bg-white p-2 rounded-lg shadow-lg hover:bg-gray-50 transition-colors",title:"Toggle fullscreen",children:(0,r.jsx)("svg",{className:"w-5 h-5 text-gray-700",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 8V4m0 0h4M4 4l5 5m11-1V4m0 0h-4m4 0l-5 5M4 16v4m0 0h4m-4 0l5-5m11 5l-5-5m5 5v-4m0 4h-4"})})})]})}var C=n(97130),E=n(43781);let L=(0,l.default)(()=>Promise.all([n.e(5641),n.e(2241)]).then(n.bind(n,62241)),{loadableGenerated:{webpack:()=>[62241]},ssr:!1,loading:()=>(0,r.jsx)("div",{className:"w-full h-full flex items-center justify-center bg-gray-100",children:(0,r.jsxs)("div",{className:"text-center",children:[(0,r.jsx)("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto mb-4"}),(0,r.jsx)("p",{className:"text-gray-600",children:"Loading map..."})]})})});function O(e){let{onSpotClick:t}=e,{spots:n,loading:l,error:a,refresh:s}=(0,C.j)(),{location:i}=(0,N.Z)(),{getAvailability:c}=function(e){let[t,n]=(0,o.useState)(new Map),r=(0,o.useCallback)(async e=>{try{await new Promise(e=>setTimeout(e,500));let t=Math.random()>.3;n(n=>{let r=new Map(n);return r.set(e,{spotId:e,isAvailable:t,lastChecked:Date.now()}),r})}catch(t){console.error("Failed to check availability for spot ".concat(e,":"),t)}},[]),l=(0,o.useCallback)(async()=>{await Promise.all(e.map(e=>r(e.id)))},[e,r]);(0,o.useEffect)(()=>{l();let e=setInterval(()=>{l()},3e4);return()=>clearInterval(e)},[l]);let a=(0,o.useCallback)(e=>{let n=t.get(e);return n?n.isAvailable:null},[t]);return{availabilityMap:t,getAvailability:a,refreshAvailability:l}}(n),[u,d]=(0,o.useState)(i||x.Bn.defaultCenter),[f,m]=(0,o.useState)({minPrice:0,maxPrice:10,showAvailableOnly:!1,maxDistance:50});(0,o.useEffect)(()=>{i&&d(i)},[i]);let p=(0,o.useMemo)(()=>n.filter(e=>{let t=parseFloat(e.pricePerHour);return!(tf.maxPrice||f.showAvailableOnly&&!e.isAvailable||i&&e.coordinates&&(0,E.cL)(i,e.coordinates)>f.maxDistance)}),[n,f,i]),g=(0,o.useCallback)((e,t)=>{d(e)},[]),v=(0,o.useCallback)(e=>{m(e)},[]);return l&&0===n.length?(0,r.jsx)("div",{className:"w-full h-full flex items-center justify-center bg-gray-100",children:(0,r.jsxs)("div",{className:"text-center",children:[(0,r.jsx)("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto mb-4"}),(0,r.jsx)("p",{className:"text-gray-600",children:"Loading parking spots..."})]})}):a?(0,r.jsx)("div",{className:"w-full h-full flex items-center justify-center bg-gray-100",children:(0,r.jsxs)("div",{className:"text-center p-6 bg-white rounded-lg shadow",children:[(0,r.jsxs)("p",{className:"text-red-600 mb-4",children:["Error loading spots: ",a]}),(0,r.jsx)("button",{onClick:s,className:"px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700",children:"Retry"})]})}):(0,r.jsxs)("div",{className:"relative w-full h-full",children:[(0,r.jsx)("div",{className:"absolute top-4 left-4 right-4 md:right-auto md:w-80 z-[1000]",children:(0,r.jsx)(y,{onLocationFound:g})}),(0,r.jsx)("div",{className:"absolute top-20 md:top-4 md:left-[340px] left-4 right-4 md:right-auto md:w-64 z-[1000]",children:(0,r.jsx)(j,{onFilterChange:v})}),(0,r.jsx)("div",{className:"w-full h-full min-h-[500px] md:min-h-[600px]",children:(0,r.jsxs)(L,{center:u,children:[(0,r.jsx)(k,{onCenterChange:d}),p.filter(e=>e.coordinates).map(e=>(0,r.jsx)(h,{spot:e,onClick:t},e.id))]})}),(0,r.jsx)("div",{className:"absolute bottom-4 left-4 z-[1000] bg-white px-4 py-2 rounded-lg shadow-lg",children:(0,r.jsxs)("p",{className:"text-sm text-gray-600",children:["Showing ",(0,r.jsx)("span",{className:"font-semibold",children:p.length})," ","of ",(0,r.jsx)("span",{className:"font-semibold",children:n.length})," spots"]})})]})}},29264:function(e,t,n){"use strict";n.d(t,{Bn:function(){return o}});var r=n(40257);let o={provider:r.env.NEXT_PUBLIC_MAP_PROVIDER||"leaflet",googleMapsApiKey:r.env.NEXT_PUBLIC_GOOGLE_MAPS_API_KEY,defaultCenter:{lat:37.7749,lng:-122.4194},defaultZoom:13,maxZoom:18,minZoom:10}},40257:function(e,t,n){"use strict";var r,o;e.exports=(null==(r=n.g.process)?void 0:r.env)&&"object"==typeof(null==(o=n.g.process)?void 0:o.env)?n.g.process:n(44227)},44227:function(e){!function(){var t={229:function(e){var t,n,r,o=e.exports={};function l(){throw Error("setTimeout has not been defined")}function a(){throw Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===l||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:l}catch(e){t=l}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var i=[],c=!1,u=-1;function d(){c&&r&&(c=!1,r.length?i=r.concat(i):u=-1,i.length&&f())}function f(){if(!c){var e=s(d);c=!0;for(var t=i.length;t;){for(r=i,i=[];++u1)for(var n=1;n");return e}},22538:function(e,t,n){"use strict";n.d(t,{I:function(){return l},O:function(){return o}});var r=n(2265);function o(e,t,n){return Object.freeze({instance:e,context:t,container:n})}function l(e,t){return null==t?function(t,n){let o=(0,r.useRef)();return o.current||(o.current=e(t,n)),o}:function(n,o){let l=(0,r.useRef)();l.current||(l.current=e(n,o));let a=(0,r.useRef)(n),{instance:s}=l.current;return(0,r.useEffect)(function(){a.current!==n&&(t(s,n,a.current),a.current=n)},[s,n,o]),l}}},16226:function(e,t,n){"use strict";n.d(t,{dW:function(){return d},SO:function(){return f},Lf:function(){return m}});var r=n(2265),o=n(54887),l=n(81080),a=n(22538);function s(e,t){let n=(0,r.useRef)(t);(0,r.useEffect)(function(){t!==n.current&&null!=e.attributionControl&&(null!=n.current&&e.attributionControl.removeAttribution(n.current),null!=t&&e.attributionControl.addAttribution(t)),n.current=t},[e,t])}function i(e,t){let n=(0,r.useRef)();(0,r.useEffect)(function(){return null!=t&&e.instance.on(t),n.current=t,function(){null!=n.current&&e.instance.off(n.current),n.current=null}},[e,t])}var c=n(38651);function u(e){return function(t){var n;let o=(0,l.mE)(),a=e((0,c.q)(t,o),o);return s(o.map,t.attribution),i(a.current,t.eventHandlers),n=a.current,(0,r.useEffect)(function(){return(o.layerContainer??o.map).addLayer(n.instance),function(){o.layerContainer?.removeLayer(n.instance),o.map.removeLayer(n.instance)}},[o,n]),a}}function d(e,t){var n;return n=u((0,a.I)(e,t)),(0,r.forwardRef)(function(e,t){let{instance:o,context:a}=n(e).current;return(0,r.useImperativeHandle)(t,()=>o),null==e.children?null:r.createElement(l.UO,{value:a},e.children)})}function f(e,t){var n,u;return n=(0,a.I)(e),u=function(e,r){let o=(0,l.mE)(),a=n((0,c.q)(e,o),o);return s(o.map,e.attribution),i(a.current,e.eventHandlers),t(a.current,o,e,r),a},(0,r.forwardRef)(function(e,t){let[n,l]=(0,r.useState)(!1),{instance:a}=u(e,l).current;(0,r.useImperativeHandle)(t,()=>a),(0,r.useEffect)(function(){n&&a.update()},[a,n,e.children]);let s=a._contentNode;return s?(0,o.createPortal)(e.children,s):null})}function m(e,t){var n;return n=u((0,a.I)(e,t)),(0,r.forwardRef)(function(e,t){let{instance:o}=n(e).current;return(0,r.useImperativeHandle)(t,()=>o),null})}},38651:function(e,t,n){"use strict";function r(e,t){let n=e.pane??t.pane;return n?{...e,pane:n}:e}n.d(t,{q:function(){return r}})},32679:function(e,t,n){"use strict";n.d(t,{Sx:function(){return o}});var r=n(81080);function o(){return(0,r.mE)().map}n(2265)}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/3227.f776441c538e48e4.js b/frontend/.next/static/chunks/3227.f776441c538e48e4.js new file mode 100644 index 0000000..b1e9fe6 --- /dev/null +++ b/frontend/.next/static/chunks/3227.f776441c538e48e4.js @@ -0,0 +1,16 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3227],{23227:function(e,t,i){i.r(t),i.d(t,{W3mTransactionsView:function(){return o}});var r=i(31133),n=i(92413);i(96277),i(20225);var l=(0,r.iv)` + :host > wui-flex:first-child { + height: 500px; + overflow-y: auto; + overflow-x: hidden; + scrollbar-width: none; + } + + :host > wui-flex:first-child::-webkit-scrollbar { + display: none; + } +`;let o=class extends r.oi{render(){return(0,r.dy)` + + + + `}};o.styles=l,o=function(e,t,i,r){var n,l=arguments.length,o=l<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,r);else for(var c=e.length-1;c>=0;c--)(n=e[c])&&(o=(l<3?n(o):l>3?n(t,i,o):n(t,i))||o);return l>3&&o&&Object.defineProperty(t,i,o),o}([(0,n.Mo)("w3m-transactions-view")],o)}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/3298.d670408e0ef18a68.js b/frontend/.next/static/chunks/3298.d670408e0ef18a68.js new file mode 100644 index 0000000..3489f3f --- /dev/null +++ b/frontend/.next/static/chunks/3298.d670408e0ef18a68.js @@ -0,0 +1,14 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3298],{33298:function(a,t,e){e.r(t),e.d(t,{PhPuzzlePiece:function(){return H}}),e(31498);var r=e(38157),i=e(48567),h=e(54910),A=e(69709),o=e(78313),s=Object.defineProperty,p=Object.getOwnPropertyDescriptor,l=(a,t,e,r)=>{for(var i,h=r>1?void 0:r?p(t,e):t,A=a.length-1;A>=0;A--)(i=a[A])&&(h=(r?i(t,e,h):i(h))||h);return r&&h&&s(t,e,h),h};let H=class extends i.oi{constructor(){super(...arguments),this.size="1em",this.weight="regular",this.color="currentColor",this.mirrored=!1}render(){var a;return(0,r.dy)` + ${H.weightsMap.get(null!=(a=this.weight)?a:"regular")} + `}};H.weightsMap=new Map([["thin",(0,r.YP)``],["light",(0,r.YP)``],["regular",(0,r.YP)``],["bold",(0,r.YP)``],["fill",(0,r.YP)``],["duotone",(0,r.YP)``]]),H.styles=(0,o.iv)` + :host { + display: contents; + } + `,l([(0,A.C)({type:String,reflect:!0})],H.prototype,"size",2),l([(0,A.C)({type:String,reflect:!0})],H.prototype,"weight",2),l([(0,A.C)({type:String,reflect:!0})],H.prototype,"color",2),l([(0,A.C)({type:Boolean,reflect:!0})],H.prototype,"mirrored",2),H=l([(0,h.M)("ph-puzzle-piece")],H)}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/3314.6a9f8d33ba7ef171.js b/frontend/.next/static/chunks/3314.6a9f8d33ba7ef171.js new file mode 100644 index 0000000..c9a1a14 --- /dev/null +++ b/frontend/.next/static/chunks/3314.6a9f8d33ba7ef171.js @@ -0,0 +1,14 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3314],{83314:function(t,e,r){r.r(e),r.d(e,{PhMagnifyingGlass:function(){return g}}),r(31498);var a=r(38157),i=r(48567),l=r(54910),s=r(69709),o=r(78313),h=Object.defineProperty,n=Object.getOwnPropertyDescriptor,p=(t,e,r,a)=>{for(var i,l=a>1?void 0:a?n(e,r):e,s=t.length-1;s>=0;s--)(i=t[s])&&(l=(a?i(e,r,l):i(l))||l);return a&&l&&h(e,r,l),l};let g=class extends i.oi{constructor(){super(...arguments),this.size="1em",this.weight="regular",this.color="currentColor",this.mirrored=!1}render(){var t;return(0,a.dy)` + ${g.weightsMap.get(null!=(t=this.weight)?t:"regular")} + `}};g.weightsMap=new Map([["thin",(0,a.YP)``],["light",(0,a.YP)``],["regular",(0,a.YP)``],["bold",(0,a.YP)``],["fill",(0,a.YP)``],["duotone",(0,a.YP)``]]),g.styles=(0,o.iv)` + :host { + display: contents; + } + `,p([(0,s.C)({type:String,reflect:!0})],g.prototype,"size",2),p([(0,s.C)({type:String,reflect:!0})],g.prototype,"weight",2),p([(0,s.C)({type:String,reflect:!0})],g.prototype,"color",2),p([(0,s.C)({type:Boolean,reflect:!0})],g.prototype,"mirrored",2),g=p([(0,l.M)("ph-magnifying-glass")],g)}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/3326.cffefb3dee6c4d0c.js b/frontend/.next/static/chunks/3326.cffefb3dee6c4d0c.js new file mode 100644 index 0000000..1a00226 --- /dev/null +++ b/frontend/.next/static/chunks/3326.cffefb3dee6c4d0c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3326],{33326:function(e,t,n){n.d(t,{baseAccount:function(){return o},safe:function(){return u}});var a=n(53738),i=n(13102),r=n(31669),c=n(59455),s=n(77014);function o(e={}){let t,o,d,h;return(0,a.K)(a=>({id:"baseAccount",name:"Base Account",rdns:"app.base.account",type:"baseAccount",async connect({chainId:e,withCapabilities:t,...n}={}){try{let u=await this.getProvider(),l=e??a.chains[0]?.id;if(!l)throw new i.X4;let{accounts:w,currentChainId:m}=await (async()=>{if(n.isReconnecting)return{accounts:(await u.request({method:"eth_accounts",params:[]})).map(e=>({address:(0,r.K)(e)})),currentChainId:await this.getChainId()};let e=await u.request({method:"wallet_connect",params:[{capabilities:"capabilities"in n&&n.capabilities?n.capabilities:{},chainIds:[(0,c.eC)(l),...a.chains.filter(e=>e.id!==l).map(e=>(0,c.eC)(e.id))]}]});return{accounts:(await u.request({method:"eth_accounts"})).map(t=>e.accounts.find(e=>e.address===t)??{address:t}).map(e=>({address:(0,r.K)(e.address),capabilities:e.capabilities??{}})),currentChainId:Number(e.chainIds[0])}})();if(o||(o=this.onAccountsChanged.bind(this),u.on("accountsChanged",o)),d||(d=this.onChainChanged.bind(this),u.on("chainChanged",d)),h||(h=this.onDisconnect.bind(this),u.on("disconnect",h)),e&&m!==e){let t=await this.switchChain({chainId:e}).catch(e=>{if(e.code===s.ab.code)throw e;return{id:m}});m=t?.id??m}return{accounts:t?w:w.map(e=>e.address),chainId:m}}catch(e){if(/(user closed modal|accounts received is empty|user denied account|request rejected)/i.test(e.message))throw new s.ab(e);throw e}},async disconnect(){let e=await this.getProvider();o&&(e.removeListener("accountsChanged",o),o=void 0),d&&(e.removeListener("chainChanged",d),d=void 0),h&&(e.removeListener("disconnect",h),h=void 0),e.disconnect()},async getAccounts(){let e=await this.getProvider();return(await e.request({method:"eth_accounts"})).map(e=>(0,r.K)(e))},async getChainId(){let e=await this.getProvider();return Number(await e.request({method:"eth_chainId"}))},async getProvider(){if(!t){let i="string"==typeof e.preference?{options:e.preference}:{...e.preference,options:e.preference?.options??"all"},{createBaseAccountSDK:r}=await Promise.all([n.e(846),n.e(8332),n.e(7895)]).then(n.bind(n,74324));t=r({...e,appChainIds:a.chains.map(e=>e.id),preference:i}).getProvider()}return t},async isAuthorized(){try{return!!(await this.getAccounts()).length}catch{return!1}},async switchChain({addEthereumChainParameter:e,chainId:t}){let n=a.chains.find(e=>e.id===t);if(!n)throw new s.x3(new i.X4);let r=await this.getProvider();try{return await r.request({method:"wallet_switchEthereumChain",params:[{chainId:(0,c.eC)(n.id)}]}),n}catch(a){if(4902===a.code)try{let a,i;a=e?.blockExplorerUrls?e.blockExplorerUrls:n.blockExplorers?.default.url?[n.blockExplorers?.default.url]:[],i=e?.rpcUrls?.length?e.rpcUrls:[n.rpcUrls.default?.http[0]??""];let s={blockExplorerUrls:a,chainId:(0,c.eC)(t),chainName:e?.chainName??n.name,iconUrls:e?.iconUrls,nativeCurrency:e?.nativeCurrency??n.nativeCurrency,rpcUrls:i};return await r.request({method:"wallet_addEthereumChain",params:[s]}),n}catch(e){throw new s.ab(e)}throw new s.x3(a)}},onAccountsChanged(e){0===e.length?this.onDisconnect():a.emitter.emit("change",{accounts:e.map(e=>(0,r.K)(e))})},onChainChanged(e){let t=Number(e);a.emitter.emit("change",{chainId:t})},async onDisconnect(e){a.emitter.emit("disconnect");let t=await this.getProvider();o&&(t.removeListener("accountsChanged",o),o=void 0),d&&(t.removeListener("chainChanged",d),d=void 0),h&&(t.removeListener("disconnect",h),h=void 0)}}))}var d=n(14478),h=n(39504);function u(e={}){let t,i;let{shimDisconnect:c=!1}=e;return(0,a.K)(a=>({id:"safe",name:"Safe",type:u.type,async connect({withCapabilities:e}={}){let t=await this.getProvider();if(!t)throw new d.M;let n=await this.getAccounts(),r=await this.getChainId();return i||(i=this.onDisconnect.bind(this),t.on("disconnect",i)),c&&await a.storage?.removeItem("safe.disconnected"),{accounts:e?n.map(e=>({address:e,capabilities:{}})):n,chainId:r}},async disconnect(){let e=await this.getProvider();if(!e)throw new d.M;i&&(e.removeListener("disconnect",i),i=void 0),c&&await a.storage?.setItem("safe.disconnected",!0)},async getAccounts(){let e=await this.getProvider();if(!e)throw new d.M;return(await e.request({method:"eth_accounts"})).map(r.K)},async getProvider(){if("undefined"!=typeof window&&window?.parent!==window){if(!t){let{default:a}=await Promise.all([n.e(2181),n.e(4946)]).then(n.bind(n,74946)),i=new a(e),r=await (0,h.F)(()=>i.safe.getInfo(),{timeout:e.unstable_getInfoTimeout??10});if(!r)throw Error("Could not load Safe information");t=new(await (async()=>{let e=await Promise.all([n.e(2181),n.e(7353)]).then(n.t.bind(n,97353,19));return"function"!=typeof e.SafeAppProvider&&"function"==typeof e.default.SafeAppProvider?e.default.SafeAppProvider:e.SafeAppProvider})())(r,i)}return t}},async getChainId(){let e=await this.getProvider();if(!e)throw new d.M;return Number(e.chainId)},async isAuthorized(){try{if(c&&await a.storage?.getItem("safe.disconnected"))return!1;return!!(await this.getAccounts()).length}catch{return!1}},onAccountsChanged(){},onChainChanged(){},onDisconnect(){a.emitter.emit("disconnect")}}))}u.type="safe"}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/3520.3b598679dc20dc79.js b/frontend/.next/static/chunks/3520.3b598679dc20dc79.js new file mode 100644 index 0000000..4077c45 --- /dev/null +++ b/frontend/.next/static/chunks/3520.3b598679dc20dc79.js @@ -0,0 +1,4 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3520],{63520:function(e,t,s){s.d(t,{ReownAuthentication:function(){return r.z}});var r=s(20287)},20287:function(e,t,s){s.d(t,{z:function(){return l}});var r=s(61616),n=s(44649),o=s(17766),i=s(61704),a=s(6943),c=s(43291),u=s(68903);class h{constructor(e){this.getNonce=e.getNonce}async createMessage(e){let t={accountAddress:e.accountAddress,chainId:e.chainId,version:"1",domain:"undefined"==typeof document?"Unknown Domain":document.location.host,uri:"undefined"==typeof document?"Unknown URI":document.location.href,resources:this.resources,nonce:await this.getNonce(e),issuedAt:this.stringifyDate(new Date),statement:void 0,expirationTime:void 0,notBefore:void 0};return Object.assign(t,{toString:()=>this.stringify(t)})}stringify(e){let t=this.getNetworkName(e.chainId);return[`${e.domain} wants you to sign in with your ${t} account:`,e.accountAddress,e.statement?` +${e.statement} +`:"",`URI: ${e.uri}`,`Version: ${e.version}`,`Chain ID: ${e.chainId}`,`Nonce: ${e.nonce}`,e.issuedAt&&`Issued At: ${e.issuedAt}`,e.expirationTime&&`Expiration Time: ${e.expirationTime}`,e.notBefore&&`Not Before: ${e.notBefore}`,e.requestId&&`Request ID: ${e.requestId}`,e.resources?.length&&e.resources.reduce((e,t)=>`${e} +- ${t}`,"Resources:")].filter(e=>"string"==typeof e).join("\n").trim()}getNetworkName(e){let t=a.R.getAllRequestedCaipNetworks();return u.p.getNetworkNameByCaipNetworkId(t,e)}stringifyDate(e){return e.toISOString()}}class l{constructor(e={}){this.otpUuid=null,this.listeners={sessionChanged:[]},this.localAuthStorageKey=e.localAuthStorageKey||r.uJ.SIWX_AUTH_TOKEN,this.localNonceStorageKey=e.localNonceStorageKey||r.uJ.SIWX_NONCE_TOKEN,this.required=e.required??!0,this.messenger=new h({getNonce:this.getNonce.bind(this)})}async createMessage(e){return this.messenger.createMessage(e)}async addSession(e){let t=await this.request({method:"POST",key:"authenticate",body:{data:e.data,message:e.message,signature:e.signature,clientId:this.getClientId(),walletInfo:this.getWalletInfo()},headers:["nonce","otp"]});this.setStorageToken(t.token,this.localAuthStorageKey),this.emit("sessionChanged",e),this.setAppKitAccountUser(function(e){let t=e.split(".");if(3!==t.length)throw Error("Invalid token");let s=t[1];if("string"!=typeof s)throw Error("Invalid token");let r=s.replace(/-/gu,"+").replace(/_/gu,"/");return JSON.parse(atob(r.padEnd(r.length+(4-r.length%4)%4,"=")))}(t.token)),this.otpUuid=null}async getSessions(e,t){try{if(!this.getStorageToken(this.localAuthStorageKey))return[];let s=await this.request({method:"GET",key:"me",query:{},headers:["auth"]});if(!s)return[];let r=s.address.toLowerCase()===t.toLowerCase(),n=s.caip2Network===e;if(!r||!n)return[];let o={data:{accountAddress:s.address,chainId:s.caip2Network},message:"",signature:""};return this.emit("sessionChanged",o),this.setAppKitAccountUser(s),[o]}catch{return[]}}async revokeSession(e,t){return Promise.resolve(this.clearStorageTokens())}async setSessions(e){if(0===e.length)this.clearStorageTokens();else{let t=e.find(e=>e.data.chainId===c.eq()?.caipNetworkId)||e[0];await this.addSession(t)}}getRequired(){return this.required}async getSessionAccount(){if(!this.getStorageToken(this.localAuthStorageKey))throw Error("Not authenticated");return this.request({method:"GET",key:"me",body:void 0,query:{includeAppKitAccount:!0},headers:["auth"]})}async setSessionAccountMetadata(e=null){if(!this.getStorageToken(this.localAuthStorageKey))throw Error("Not authenticated");return this.request({method:"PUT",key:"account-metadata",body:{metadata:e},headers:["auth"]})}on(e,t){return this.listeners[e].push(t),()=>{this.listeners[e]=this.listeners[e].filter(e=>e!==t)}}removeAllListeners(){Object.keys(this.listeners).forEach(e=>{this.listeners[e]=[]})}async requestEmailOtp({email:e,account:t}){let s=await this.request({method:"POST",key:"otp",body:{email:e,account:t}});return this.otpUuid=s.uuid,this.messenger.resources=[`email:${e}`],s}confirmEmailOtp({code:e}){return this.request({method:"PUT",key:"otp",body:{code:e},headers:["otp"]})}async request({method:e,key:t,query:s,body:r,headers:o}){let{projectId:i,st:a,sv:c}=this.getSDKProperties(),u=new URL(`${n.b.W3M_API_URL}/auth/v1/${String(t)}`);u.searchParams.set("projectId",i),u.searchParams.set("st",a),u.searchParams.set("sv",c),s&&Object.entries(s).forEach(([e,t])=>u.searchParams.set(e,String(t)));let h=await fetch(u,{method:e,body:r?JSON.stringify(r):void 0,headers:Array.isArray(o)?o.reduce((e,t)=>{switch(t){case"nonce":e["x-nonce-jwt"]=`Bearer ${this.getStorageToken(this.localNonceStorageKey)}`;break;case"auth":e.Authorization=`Bearer ${this.getStorageToken(this.localAuthStorageKey)}`;break;case"otp":this.otpUuid&&(e["x-otp"]=this.otpUuid)}return e},{}):void 0});if(!h.ok)throw Error(await h.text());return h.headers.get("content-type")?.includes("application/json")?h.json():null}getStorageToken(e){return r.mr.getItem(e)}setStorageToken(e,t){r.mr.setItem(t,e)}clearStorageTokens(){this.otpUuid=null,r.mr.removeItem(this.localAuthStorageKey),r.mr.removeItem(this.localNonceStorageKey),this.emit("sessionChanged",void 0)}async getNonce(){let{nonce:e,token:t}=await this.request({method:"GET",key:"nonce"});return this.setStorageToken(t,this.localNonceStorageKey),e}getClientId(){return i.L.state.clientId}getWalletInfo(){let e=a.R.getAccountData()?.connectedWalletInfo;if(!e)return;if("social"in e&&"identifier"in e)return{type:"social",social:e.social,identifier:e.identifier};let{name:t,icon:s}=e,r="unknown";switch(e.type){case"EXTERNAL":case"INJECTED":case"ANNOUNCED":r="extension";break;case"WALLET_CONNECT":r="walletconnect";break;default:r="unknown"}return{type:r,name:t,icon:s}}getSDKProperties(){return o.ApiController._getSdkProperties()}emit(e,t){this.listeners[e].forEach(e=>e(t))}setAppKitAccountUser(e){let{email:t}=e;t&&Object.values(n.b.CHAIN).forEach(e=>{a.R.setAccountProp("user",{email:t},e)})}}}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/3529.3c45e6d75a0099b7.js b/frontend/.next/static/chunks/3529.3c45e6d75a0099b7.js new file mode 100644 index 0000000..a3ad107 --- /dev/null +++ b/frontend/.next/static/chunks/3529.3c45e6d75a0099b7.js @@ -0,0 +1,14 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3529],{3529:function(t,e,r){r.r(e),r.d(e,{PhArrowRight:function(){return c}}),r(31498);var l=r(38157),i=r(48567),o=r(54910),a=r(69709),h=r(78313),s=Object.defineProperty,p=Object.getOwnPropertyDescriptor,n=(t,e,r,l)=>{for(var i,o=l>1?void 0:l?p(e,r):e,a=t.length-1;a>=0;a--)(i=t[a])&&(o=(l?i(e,r,o):i(o))||o);return l&&o&&s(e,r,o),o};let c=class extends i.oi{constructor(){super(...arguments),this.size="1em",this.weight="regular",this.color="currentColor",this.mirrored=!1}render(){var t;return(0,l.dy)` + ${c.weightsMap.get(null!=(t=this.weight)?t:"regular")} + `}};c.weightsMap=new Map([["thin",(0,l.YP)``],["light",(0,l.YP)``],["regular",(0,l.YP)``],["bold",(0,l.YP)``],["fill",(0,l.YP)``],["duotone",(0,l.YP)``]]),c.styles=(0,h.iv)` + :host { + display: contents; + } + `,n([(0,a.C)({type:String,reflect:!0})],c.prototype,"size",2),n([(0,a.C)({type:String,reflect:!0})],c.prototype,"weight",2),n([(0,a.C)({type:String,reflect:!0})],c.prototype,"color",2),n([(0,a.C)({type:Boolean,reflect:!0})],c.prototype,"mirrored",2),c=n([(0,o.M)("ph-arrow-right")],c)}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/3631.449c8eaa27256fb6.js b/frontend/.next/static/chunks/3631.449c8eaa27256fb6.js new file mode 100644 index 0000000..9170d03 --- /dev/null +++ b/frontend/.next/static/chunks/3631.449c8eaa27256fb6.js @@ -0,0 +1,14 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3631],{83631:function(t,e,a){a.r(e),a.d(e,{PhCopy:function(){return l}}),a(31498);var r=a(38157),H=a(48567),V=a(54910),o=a(69709),i=a(78313),h=Object.defineProperty,s=Object.getOwnPropertyDescriptor,p=(t,e,a,r)=>{for(var H,V=r>1?void 0:r?s(e,a):e,o=t.length-1;o>=0;o--)(H=t[o])&&(V=(r?H(e,a,V):H(V))||V);return r&&V&&h(e,a,V),V};let l=class extends H.oi{constructor(){super(...arguments),this.size="1em",this.weight="regular",this.color="currentColor",this.mirrored=!1}render(){var t;return(0,r.dy)` + ${l.weightsMap.get(null!=(t=this.weight)?t:"regular")} + `}};l.weightsMap=new Map([["thin",(0,r.YP)``],["light",(0,r.YP)``],["regular",(0,r.YP)``],["bold",(0,r.YP)``],["fill",(0,r.YP)``],["duotone",(0,r.YP)``]]),l.styles=(0,i.iv)` + :host { + display: contents; + } + `,p([(0,o.C)({type:String,reflect:!0})],l.prototype,"size",2),p([(0,o.C)({type:String,reflect:!0})],l.prototype,"weight",2),p([(0,o.C)({type:String,reflect:!0})],l.prototype,"color",2),p([(0,o.C)({type:Boolean,reflect:!0})],l.prototype,"mirrored",2),l=p([(0,V.M)("ph-copy")],l)}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/3664.436d19ee6e4d69b6.js b/frontend/.next/static/chunks/3664.436d19ee6e4d69b6.js new file mode 100644 index 0000000..6495e08 --- /dev/null +++ b/frontend/.next/static/chunks/3664.436d19ee6e4d69b6.js @@ -0,0 +1,14 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3664],{53664:function(t,e,r){r.r(e),r.d(e,{PhPower:function(){return c}}),r(31498);var a=r(38157),o=r(48567),i=r(54910),s=r(69709),h=r(78313),p=Object.defineProperty,l=Object.getOwnPropertyDescriptor,n=(t,e,r,a)=>{for(var o,i=a>1?void 0:a?l(e,r):e,s=t.length-1;s>=0;s--)(o=t[s])&&(i=(a?o(e,r,i):o(i))||i);return a&&i&&p(e,r,i),i};let c=class extends o.oi{constructor(){super(...arguments),this.size="1em",this.weight="regular",this.color="currentColor",this.mirrored=!1}render(){var t;return(0,a.dy)` + ${c.weightsMap.get(null!=(t=this.weight)?t:"regular")} + `}};c.weightsMap=new Map([["thin",(0,a.YP)``],["light",(0,a.YP)``],["regular",(0,a.YP)``],["bold",(0,a.YP)``],["fill",(0,a.YP)``],["duotone",(0,a.YP)``]]),c.styles=(0,h.iv)` + :host { + display: contents; + } + `,n([(0,s.C)({type:String,reflect:!0})],c.prototype,"size",2),n([(0,s.C)({type:String,reflect:!0})],c.prototype,"weight",2),n([(0,s.C)({type:String,reflect:!0})],c.prototype,"color",2),n([(0,s.C)({type:Boolean,reflect:!0})],c.prototype,"mirrored",2),c=n([(0,i.M)("ph-power")],c)}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/3676-c7aba7981a7293f9.js b/frontend/.next/static/chunks/3676-c7aba7981a7293f9.js new file mode 100644 index 0000000..309553f --- /dev/null +++ b/frontend/.next/static/chunks/3676-c7aba7981a7293f9.js @@ -0,0 +1,2 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3676],{35398:function(e,t,r){r.d(t,{ZP:function(){return y}});var n,i,o,s=r(2265),l=Object.defineProperty,a=Object.getOwnPropertySymbols,h=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable,c=(e,t,r)=>t in e?l(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,f=(e,t)=>{for(var r in t||(t={}))h.call(t,r)&&c(e,r,t[r]);if(a)for(var r of a(t))u.call(t,r)&&c(e,r,t[r]);return e},d=(e,t)=>{var r={};for(var n in e)h.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&a)for(var n of a(e))0>t.indexOf(n)&&u.call(e,n)&&(r[n]=e[n]);return r};(e=>{let t=class{constructor(e,r,n,o){if(this.version=e,this.errorCorrectionLevel=r,this.modules=[],this.isFunction=[],et.MAX_VERSION)throw RangeError("Version value out of range");if(o<-1||o>7)throw RangeError("Mask value out of range");this.size=4*e+17;let s=[];for(let e=0;e7)throw RangeError("Invalid value");for(u=o;;u++){let r=8*t.getNumDataCodewords(u,n),i=s.getTotalBits(e,u);if(i<=r){c=i;break}if(u>=l)throw RangeError("Data too long")}for(let e of[t.Ecc.MEDIUM,t.Ecc.QUARTILE,t.Ecc.HIGH])h&&c<=8*t.getNumDataCodewords(u,e)&&(n=e);let f=[];for(let t of e)for(let e of(r(t.mode.modeBits,4,f),r(t.numChars,t.mode.numCharCountBits(u),f),t.getData()))f.push(e);i(f.length==c);let d=8*t.getNumDataCodewords(u,n);i(f.length<=d),r(0,Math.min(4,d-f.length),f),r(0,(8-f.length%8)%8,f),i(f.length%8==0);for(let e=236;f.lengthg[t>>>3]|=e<<7-(7&t)),new t(u,n,g,a)}getModule(e,t){return 0<=e&&e>>9)*1335;let o=(t<<10|r)^21522;i(o>>>15==0);for(let e=0;e<=5;e++)this.setFunctionModule(8,e,n(o,e));this.setFunctionModule(8,7,n(o,6)),this.setFunctionModule(8,8,n(o,7)),this.setFunctionModule(7,8,n(o,8));for(let e=9;e<15;e++)this.setFunctionModule(14-e,8,n(o,e));for(let e=0;e<8;e++)this.setFunctionModule(this.size-1-e,8,n(o,e));for(let e=8;e<15;e++)this.setFunctionModule(8,this.size-15+e,n(o,e));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let t=0;t<12;t++)e=e<<1^(e>>>11)*7973;let t=this.version<<12|e;i(t>>>18==0);for(let e=0;e<18;e++){let r=n(t,e),i=this.size-11+e%3,o=Math.floor(e/3);this.setFunctionModule(i,o,r),this.setFunctionModule(o,i,r)}}drawFinderPattern(e,t){for(let r=-4;r<=4;r++)for(let n=-4;n<=4;n++){let i=Math.max(Math.abs(n),Math.abs(r)),o=e+n,s=t+r;0<=o&&o{(e!=h-s||r>=a)&&f.push(t[e])});return i(f.length==l),f}drawCodewords(e){if(e.length!=Math.floor(t.getNumRawDataModules(this.version)/8))throw RangeError("Invalid argument");let r=0;for(let t=this.size-1;t>=1;t-=2){6==t&&(t=5);for(let i=0;i>>3],7-(7&r)),r++)}}i(r==8*e.length)}applyMask(e){if(e<0||e>7)throw RangeError("Mask value out of range");for(let t=0;t5&&e++:(this.finderPenaltyAddHistory(i,o),n||(e+=this.finderPenaltyCountPatterns(o)*t.PENALTY_N3),n=this.modules[r][s],i=1);e+=this.finderPenaltyTerminateAndCount(n,i,o)*t.PENALTY_N3}for(let r=0;r5&&e++:(this.finderPenaltyAddHistory(i,o),n||(e+=this.finderPenaltyCountPatterns(o)*t.PENALTY_N3),n=this.modules[s][r],i=1);e+=this.finderPenaltyTerminateAndCount(n,i,o)*t.PENALTY_N3}for(let r=0;re+(t?1:0),r);let n=this.size*this.size,o=Math.ceil(Math.abs(20*r-10*n)/n)-1;return i(0<=o&&o<=9),i(0<=(e+=o*t.PENALTY_N4)&&e<=2568888),e}getAlignmentPatternPositions(){if(1==this.version)return[];{let e=Math.floor(this.version/7)+2,t=32==this.version?26:2*Math.ceil((4*this.version+4)/(2*e-2)),r=[6];for(let n=this.size-7;r.lengtht.MAX_VERSION)throw RangeError("Version number out of range");let r=(16*e+128)*e+64;if(e>=2){let t=Math.floor(e/7)+2;r-=(25*t-10)*t-55,e>=7&&(r-=36)}return i(208<=r&&r<=29648),r}static getNumDataCodewords(e,r){return Math.floor(t.getNumRawDataModules(e)/8)-t.ECC_CODEWORDS_PER_BLOCK[r.ordinal][e]*t.NUM_ERROR_CORRECTION_BLOCKS[r.ordinal][e]}static reedSolomonComputeDivisor(e){if(e<1||e>255)throw RangeError("Degree out of range");let r=[];for(let t=0;t0);for(let i of e){let e=i^n.shift();n.push(0),r.forEach((r,i)=>n[i]^=t.reedSolomonMultiply(r,e))}return n}static reedSolomonMultiply(e,t){if(e>>>8!=0||t>>>8!=0)throw RangeError("Byte out of range");let r=0;for(let n=7;n>=0;n--)r=r<<1^(r>>>7)*285^(t>>>n&1)*e;return i(r>>>8==0),r}finderPenaltyCountPatterns(e){let t=e[1];i(t<=3*this.size);let r=t>0&&e[2]==t&&e[3]==3*t&&e[4]==t&&e[5]==t;return(r&&e[0]>=4*t&&e[6]>=t?1:0)+(r&&e[6]>=4*t&&e[0]>=t?1:0)}finderPenaltyTerminateAndCount(e,t,r){return e&&(this.finderPenaltyAddHistory(t,r),t=0),t+=this.size,this.finderPenaltyAddHistory(t,r),this.finderPenaltyCountPatterns(r)}finderPenaltyAddHistory(e,t){0==t[0]&&(e+=this.size),t.pop(),t.unshift(e)}};function r(e,t,r){if(t<0||t>31||e>>>t!=0)throw RangeError("Value out of range");for(let n=t-1;n>=0;n--)r.push(e>>>n&1)}function n(e,t){return(e>>>t&1)!=0}function i(e){if(!e)throw Error("Assertion error")}t.MIN_VERSION=1,t.MAX_VERSION=40,t.PENALTY_N1=3,t.PENALTY_N2=3,t.PENALTY_N3=40,t.PENALTY_N4=10,t.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],t.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=t;let o=class{constructor(e,t,r){if(this.mode=e,this.numChars=t,this.bitData=r,t<0)throw RangeError("Invalid argument");this.bitData=r.slice()}static makeBytes(e){let t=[];for(let n of e)r(n,8,t);return new o(o.Mode.BYTE,e.length,t)}static makeNumeric(e){if(!o.isNumeric(e))throw RangeError("String contains non-numeric characters");let t=[];for(let n=0;n=1<{let t=class{constructor(e,t){this.ordinal=e,this.formatBits=t}};t.LOW=new t(0,1),t.MEDIUM=new t(1,0),t.QUARTILE=new t(2,3),t.HIGH=new t(3,2),e.Ecc=t})((n=o||(o={})).QrCode||(n.QrCode={})),(e=>{let t=class{constructor(e,t){this.modeBits=e,this.numBitsCharCount=t}numCharCountBits(e){return this.numBitsCharCount[Math.floor((e+7)/17)]}};t.NUMERIC=new t(1,[10,12,14]),t.ALPHANUMERIC=new t(2,[9,11,13]),t.BYTE=new t(4,[8,16,16]),t.KANJI=new t(8,[8,10,12]),t.ECI=new t(7,[0,0,0]),e.Mode=t})((i=o||(o={})).QrSegment||(i.QrSegment={}));var g=o,m={L:g.QrCode.Ecc.LOW,M:g.QrCode.Ecc.MEDIUM,Q:g.QrCode.Ecc.QUARTILE,H:g.QrCode.Ecc.HIGH},E="#FFFFFF",M="#000000";function C(e,t=0){let r=[];return e.forEach(function(e,n){let i=null;e.forEach(function(o,s){if(!o&&null!==i){r.push(`M${i+t} ${n+t}h${s-i}v1H${i+t}z`),i=null;return}if(s===e.length-1){if(!o)return;null===i?r.push(`M${s+t},${n+t} h1v1H${s+t}z`):r.push(`M${i+t},${n+t} h${s+1-i}v1H${i+t}z`);return}o&&null===i&&(i=s)})}),r.join("")}function w(e,t){return e.slice().map((e,r)=>r=t.y+t.h?e:e.map((e,r)=>(r=t.x+t.w)&&e))}function R(e,t,r,n){if(null==n)return null;let i=e.length+2*(r?4:0),o=Math.floor(.1*t),s=i/t,l=(n.width||o)*s,a=(n.height||o)*s,h=null==n.x?e.length/2-l/2:n.x*s,u=null==n.y?e.length/2-a/2:n.y*s,c=null;if(n.excavate){let e=Math.floor(h),t=Math.floor(u);c={x:e,y:t,w:Math.ceil(l+h-e),h:Math.ceil(a+u-t)}}return{x:h,y:u,h:a,w:l,excavation:c}}var N=function(){try{new Path2D().addPath(new Path2D)}catch(e){return!1}return!0}();function p(e){let{value:t,size:r=128,level:n="L",bgColor:i=E,fgColor:o=M,includeMargin:l=!1,style:a,imageSettings:h}=e,u=d(e,["value","size","level","bgColor","fgColor","includeMargin","style","imageSettings"]),c=null==h?void 0:h.src,p=s.useRef(null),A=s.useRef(null),[y,P]=s.useState(!1);s.useEffect(()=>{if(null!=p.current){let e=p.current,s=e.getContext("2d");if(!s)return;let a=g.QrCode.encodeText(t,m[n]).getModules(),u=l?4:0,c=a.length+2*u,f=R(a,r,l,h),d=A.current,E=null!=f&&null!==d&&d.complete&&0!==d.naturalHeight&&0!==d.naturalWidth;E&&null!=f.excavation&&(a=w(a,f.excavation));let M=window.devicePixelRatio||1;e.height=e.width=r*M;let y=r/c*M;s.scale(y,y),s.fillStyle=i,s.fillRect(0,0,c,c),s.fillStyle=o,N?s.fill(new Path2D(C(a,u))):a.forEach(function(e,t){e.forEach(function(e,r){e&&s.fillRect(r+u,t+u,1,1)})}),E&&s.drawImage(d,f.x+u,f.y+u,f.w,f.h)}}),s.useEffect(()=>{P(!1)},[c]);let v=f({height:r,width:r},a),I=null;return null!=c&&(I=s.createElement("img",{src:c,key:c,style:{display:"none"},onLoad:()=>{P(!0)},ref:A})),s.createElement(s.Fragment,null,s.createElement("canvas",f({style:v,height:r,width:r,ref:p},u)),I)}function A(e){let{value:t,size:r=128,level:n="L",bgColor:i=E,fgColor:o=M,includeMargin:l=!1,imageSettings:a}=e,h=d(e,["value","size","level","bgColor","fgColor","includeMargin","imageSettings"]),u=g.QrCode.encodeText(t,m[n]).getModules(),c=l?4:0,N=u.length+2*c,p=R(u,r,l,a),A=null;null!=a&&null!=p&&(null!=p.excavation&&(u=w(u,p.excavation)),A=s.createElement("image",{xlinkHref:a.src,height:p.h,width:p.w,x:p.x+c,y:p.y+c,preserveAspectRatio:"none"}));let y=C(u,c);return s.createElement("svg",f({height:r,width:r,viewBox:`0 0 ${N} ${N}`},h),s.createElement("path",{fill:i,d:`M0,0 h${N}v${N}H0z`,shapeRendering:"crispEdges"}),s.createElement("path",{fill:o,d:y,shapeRendering:"crispEdges"}),A)}var y=e=>{let{renderAs:t}=e,r=d(e,["renderAs"]);return"svg"===t?s.createElement(A,f({},r)):s.createElement(p,f({},r))}},93637:function(e,t,r){r.d(t,{E:function(){return o}});var n=r(10052),i=r(4012);function o(e,t){if(!(0,i.U)(e,{strict:!1}))throw new n.b({address:e});if(!(0,i.U)(t,{strict:!1}))throw new n.b({address:t});return e.toLowerCase()===t.toLowerCase()}},15566:function(e,t,r){r.d(t,{r:function(){return l}});var n=r(13169),i=r(89256),o=r(20556),s=r(59455);function l(e,t){return(0,n.w)(function(e){let t="string"==typeof e?(0,s.$G)(e):"string"==typeof e.raw?e.raw:(0,s.ci)(e.raw),r=(0,s.$G)(`\x19Ethereum Signed Message: +${(0,o.d)(t)}`);return(0,i.zo)([r,t])}(e),t)}},48790:function(e,t,r){r.d(t,{n:function(){return a}});var n=r(31669),i=r(93637),o=r(15566),s=r(69021);async function l({message:e,signature:t}){return(0,s.R)({hash:(0,o.r)(e),signature:t})}async function a({address:e,message:t,signature:r}){return(0,i.E)((0,n.K)(e),await l({message:t,signature:r}))}}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/375.46d771727ecb7b8d.js b/frontend/.next/static/chunks/375.46d771727ecb7b8d.js new file mode 100644 index 0000000..1c5cd87 --- /dev/null +++ b/frontend/.next/static/chunks/375.46d771727ecb7b8d.js @@ -0,0 +1,14 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[375],{50375:function(t,e,r){r.r(e),r.d(e,{PhQuestion:function(){return n}}),r(31498);var a=r(38157),s=r(48567),i=r(54910),o=r(69709),c=r(78313),h=Object.defineProperty,p=Object.getOwnPropertyDescriptor,l=(t,e,r,a)=>{for(var s,i=a>1?void 0:a?p(e,r):e,o=t.length-1;o>=0;o--)(s=t[o])&&(i=(a?s(e,r,i):s(i))||i);return a&&i&&h(e,r,i),i};let n=class extends s.oi{constructor(){super(...arguments),this.size="1em",this.weight="regular",this.color="currentColor",this.mirrored=!1}render(){var t;return(0,a.dy)` + ${n.weightsMap.get(null!=(t=this.weight)?t:"regular")} + `}};n.weightsMap=new Map([["thin",(0,a.YP)``],["light",(0,a.YP)``],["regular",(0,a.YP)``],["bold",(0,a.YP)``],["fill",(0,a.YP)``],["duotone",(0,a.YP)``]]),n.styles=(0,c.iv)` + :host { + display: contents; + } + `,l([(0,o.C)({type:String,reflect:!0})],n.prototype,"size",2),l([(0,o.C)({type:String,reflect:!0})],n.prototype,"weight",2),l([(0,o.C)({type:String,reflect:!0})],n.prototype,"color",2),l([(0,o.C)({type:Boolean,reflect:!0})],n.prototype,"mirrored",2),n=l([(0,i.M)("ph-question")],n)}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/3869.b25c967665cf8d84.js b/frontend/.next/static/chunks/3869.b25c967665cf8d84.js new file mode 100644 index 0000000..6872e6a --- /dev/null +++ b/frontend/.next/static/chunks/3869.b25c967665cf8d84.js @@ -0,0 +1,14 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3869],{43869:function(t,a,e){e.r(a),e.d(a,{PhCreditCard:function(){return V}}),e(31498);var r=e(38157),h=e(48567),i=e(54910),H=e(69709),o=e(78313),s=Object.defineProperty,p=Object.getOwnPropertyDescriptor,l=(t,a,e,r)=>{for(var h,i=r>1?void 0:r?p(a,e):a,H=t.length-1;H>=0;H--)(h=t[H])&&(i=(r?h(a,e,i):h(i))||i);return r&&i&&s(a,e,i),i};let V=class extends h.oi{constructor(){super(...arguments),this.size="1em",this.weight="regular",this.color="currentColor",this.mirrored=!1}render(){var t;return(0,r.dy)` + ${V.weightsMap.get(null!=(t=this.weight)?t:"regular")} + `}};V.weightsMap=new Map([["thin",(0,r.YP)``],["light",(0,r.YP)``],["regular",(0,r.YP)``],["bold",(0,r.YP)``],["fill",(0,r.YP)``],["duotone",(0,r.YP)``]]),V.styles=(0,o.iv)` + :host { + display: contents; + } + `,l([(0,H.C)({type:String,reflect:!0})],V.prototype,"size",2),l([(0,H.C)({type:String,reflect:!0})],V.prototype,"weight",2),l([(0,H.C)({type:String,reflect:!0})],V.prototype,"color",2),l([(0,H.C)({type:Boolean,reflect:!0})],V.prototype,"mirrored",2),V=l([(0,i.M)("ph-credit-card")],V)}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/4156.99eb5ef9a3a7db6b.js b/frontend/.next/static/chunks/4156.99eb5ef9a3a7db6b.js new file mode 100644 index 0000000..fd3d43e --- /dev/null +++ b/frontend/.next/static/chunks/4156.99eb5ef9a3a7db6b.js @@ -0,0 +1,14 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4156],{44156:function(t,e,a){a.r(e),a.d(e,{PhArrowsLeftRight:function(){return H}}),a(31498);var r=a(38157),l=a(48567),i=a(54910),o=a(69709),s=a(78313),h=Object.defineProperty,p=Object.getOwnPropertyDescriptor,n=(t,e,a,r)=>{for(var l,i=r>1?void 0:r?p(e,a):e,o=t.length-1;o>=0;o--)(l=t[o])&&(i=(r?l(e,a,i):l(i))||i);return r&&i&&h(e,a,i),i};let H=class extends l.oi{constructor(){super(...arguments),this.size="1em",this.weight="regular",this.color="currentColor",this.mirrored=!1}render(){var t;return(0,r.dy)` + ${H.weightsMap.get(null!=(t=this.weight)?t:"regular")} + `}};H.weightsMap=new Map([["thin",(0,r.YP)``],["light",(0,r.YP)``],["regular",(0,r.YP)``],["bold",(0,r.YP)``],["fill",(0,r.YP)``],["duotone",(0,r.YP)``]]),H.styles=(0,s.iv)` + :host { + display: contents; + } + `,n([(0,o.C)({type:String,reflect:!0})],H.prototype,"size",2),n([(0,o.C)({type:String,reflect:!0})],H.prototype,"weight",2),n([(0,o.C)({type:String,reflect:!0})],H.prototype,"color",2),n([(0,o.C)({type:Boolean,reflect:!0})],H.prototype,"mirrored",2),H=n([(0,i.M)("ph-arrows-left-right")],H)}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/4278.32a097a4a046b144.js b/frontend/.next/static/chunks/4278.32a097a4a046b144.js new file mode 100644 index 0000000..60ab4ef --- /dev/null +++ b/frontend/.next/static/chunks/4278.32a097a4a046b144.js @@ -0,0 +1,14 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4278],{74278:function(t,e,r){r.r(e),r.d(e,{PhArrowUpRight:function(){return c}}),r(31498);var i=r(38157),o=r(48567),a=r(54910),h=r(69709),s=r(78313),p=Object.defineProperty,l=Object.getOwnPropertyDescriptor,n=(t,e,r,i)=>{for(var o,a=i>1?void 0:i?l(e,r):e,h=t.length-1;h>=0;h--)(o=t[h])&&(a=(i?o(e,r,a):o(a))||a);return i&&a&&p(e,r,a),a};let c=class extends o.oi{constructor(){super(...arguments),this.size="1em",this.weight="regular",this.color="currentColor",this.mirrored=!1}render(){var t;return(0,i.dy)` + ${c.weightsMap.get(null!=(t=this.weight)?t:"regular")} + `}};c.weightsMap=new Map([["thin",(0,i.YP)``],["light",(0,i.YP)``],["regular",(0,i.YP)``],["bold",(0,i.YP)``],["fill",(0,i.YP)``],["duotone",(0,i.YP)``]]),c.styles=(0,s.iv)` + :host { + display: contents; + } + `,n([(0,h.C)({type:String,reflect:!0})],c.prototype,"size",2),n([(0,h.C)({type:String,reflect:!0})],c.prototype,"weight",2),n([(0,h.C)({type:String,reflect:!0})],c.prototype,"color",2),n([(0,h.C)({type:Boolean,reflect:!0})],c.prototype,"mirrored",2),c=n([(0,a.M)("ph-arrow-up-right")],c)}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/4319.48b25dc06ce3925d.js b/frontend/.next/static/chunks/4319.48b25dc06ce3925d.js new file mode 100644 index 0000000..c53c3b0 --- /dev/null +++ b/frontend/.next/static/chunks/4319.48b25dc06ce3925d.js @@ -0,0 +1,422 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4319],{84319:function(e,t,r){r.r(t),r.d(t,{W3mBuyInProgressView:function(){return W},W3mOnRampProvidersView:function(){return P},W3mOnrampFiatSelectView:function(){return m},W3mOnrampTokensView:function(){return B},W3mOnrampWidget:function(){return q},W3mWhatIsABuyView:function(){return M}});var i=r(31133),o=r(84927),n=r(32801),s=r(28921),a=r(22472),c=r(81341),u=r(5688),l=r(89512),d=r(92413);r(96277),r(53774),r(44732),r(34041);var p=(0,d.iv)` + :host > wui-grid { + max-height: 360px; + overflow: auto; + } + + wui-flex { + transition: opacity ${({easings:e})=>e["ease-out-power-1"]} + ${({durations:e})=>e.md}; + will-change: opacity; + } + + wui-grid::-webkit-scrollbar { + display: none; + } + + wui-flex.disabled { + opacity: 0.3; + pointer-events: none; + user-select: none; + } +`,h=function(e,t,r,i){var o,n=arguments.length,s=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s);return n>3&&s&&Object.defineProperty(t,r,s),s};let m=class extends i.oi{constructor(){super(),this.unsubscribe=[],this.selectedCurrency=s.ph.state.paymentCurrency,this.currencies=s.ph.state.paymentCurrencies,this.currencyImages=a.W.state.currencyImages,this.checked=c.M.state.isLegalCheckboxChecked,this.unsubscribe.push(s.ph.subscribe(e=>{this.selectedCurrency=e.paymentCurrency,this.currencies=e.paymentCurrencies}),a.W.subscribeKey("currencyImages",e=>this.currencyImages=e),c.M.subscribeKey("isLegalCheckboxChecked",e=>{this.checked=e}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){let{termsConditionsUrl:e,privacyPolicyUrl:t}=u.OptionsController.state,r=u.OptionsController.state.features?.legalCheckbox,o=!!(e||t)&&!!r&&!this.checked;return(0,i.dy)` + + + ${this.currenciesTemplate(o)} + + `}currenciesTemplate(e=!1){return this.currencies.map(t=>(0,i.dy)` + this.selectCurrency(t)} + variant="image" + tabIdx=${(0,n.o)(e?-1:void 0)} + > + ${t.id} + + `)}selectCurrency(e){e&&(s.ph.setPaymentCurrency(e),l.I.close())}};m.styles=p,h([(0,o.SB)()],m.prototype,"selectedCurrency",void 0),h([(0,o.SB)()],m.prototype,"currencies",void 0),h([(0,o.SB)()],m.prototype,"currencyImages",void 0),h([(0,o.SB)()],m.prototype,"checked",void 0),m=h([(0,d.Mo)("w3m-onramp-fiat-select-view")],m);var y=r(6943),w=r(86777),f=r(53357),b=r(31929),g=r(43291),v=r(4786),x=r(63043);r(4594),r(1799),r(81255),r(62346);var C=(0,d.iv)` + button { + padding: ${({spacing:e})=>e["3"]}; + border-radius: ${({borderRadius:e})=>e["4"]}; + border: none; + outline: none; + background-color: ${({tokens:e})=>e.core.glass010}; + width: 100%; + display: flex; + align-items: center; + justify-content: flex-start; + gap: ${({spacing:e})=>e["3"]}; + transition: background-color ${({easings:e})=>e["ease-out-power-1"]} + ${({durations:e})=>e.md}; + will-change: background-color; + cursor: pointer; + } + + button:hover { + background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; + } + + .provider-image { + width: ${({spacing:e})=>e["10"]}; + min-width: ${({spacing:e})=>e["10"]}; + height: ${({spacing:e})=>e["10"]}; + border-radius: calc( + ${({borderRadius:e})=>e["4"]} - calc(${({spacing:e})=>e["3"]} / 2) + ); + position: relative; + overflow: hidden; + } + + .network-icon { + width: ${({spacing:e})=>e["3"]}; + height: ${({spacing:e})=>e["3"]}; + border-radius: calc(${({spacing:e})=>e["3"]} / 2); + overflow: hidden; + box-shadow: + 0 0 0 3px ${({tokens:e})=>e.theme.foregroundPrimary}, + 0 0 0 3px ${({tokens:e})=>e.theme.backgroundPrimary}; + transition: box-shadow ${({easings:e})=>e["ease-out-power-1"]} + ${({durations:e})=>e.md}; + will-change: box-shadow; + } + + button:hover .network-icon { + box-shadow: + 0 0 0 3px ${({tokens:e})=>e.core.glass010}, + 0 0 0 3px ${({tokens:e})=>e.theme.backgroundPrimary}; + } +`,$=function(e,t,r,i){var o,n=arguments.length,s=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s);return n>3&&s&&Object.defineProperty(t,r,s),s};let k=class extends i.oi{constructor(){super(...arguments),this.disabled=!1,this.color="inherit",this.label="",this.feeRange="",this.loading=!1,this.onClick=null}render(){return(0,i.dy)` + + `}networksTemplate(){let e=y.R.getAllRequestedCaipNetworks(),t=e?.filter(e=>e?.assets?.imageId)?.slice(0,5);return(0,i.dy)` + + ${t?.map(e=>i.dy` + + + + `)} + + `}};k.styles=[C],$([(0,o.Cb)({type:Boolean})],k.prototype,"disabled",void 0),$([(0,o.Cb)()],k.prototype,"color",void 0),$([(0,o.Cb)()],k.prototype,"name",void 0),$([(0,o.Cb)()],k.prototype,"label",void 0),$([(0,o.Cb)()],k.prototype,"feeRange",void 0),$([(0,o.Cb)({type:Boolean})],k.prototype,"loading",void 0),$([(0,o.Cb)()],k.prototype,"onClick",void 0),k=$([(0,d.Mo)("w3m-onramp-provider-item")],k),r(5867);var R=function(e,t,r,i){var o,n=arguments.length,s=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s);return n>3&&s&&Object.defineProperty(t,r,s),s};let P=class extends i.oi{constructor(){super(),this.unsubscribe=[],this.providers=s.ph.state.providers,this.unsubscribe.push(s.ph.subscribeKey("providers",e=>{this.providers=e}))}render(){return(0,i.dy)` + + ${this.onRampProvidersTemplate()} + + `}onRampProvidersTemplate(){return this.providers.filter(e=>e.supportedChains.includes(y.R.state.activeChain??"eip155")).map(e=>(0,i.dy)` + {this.onClickProvider(e)}} + ?disabled=${!e.url} + data-testid=${`onramp-provider-${e.name}`} + > + `)}onClickProvider(e){s.ph.setSelectedProvider(e),w.RouterController.push("BuyInProgress"),f.j.openHref(s.ph.state.selectedProvider?.url||e.url,"popupWindow","width=600,height=800,scrollbars=yes"),b.X.sendEvent({type:"track",event:"SELECT_BUY_PROVIDER",properties:{provider:e.name,isSmartAccount:(0,g.r9)(y.R.state.activeChain)===v.y_.ACCOUNT_TYPES.SMART_ACCOUNT}})}};R([(0,o.SB)()],P.prototype,"providers",void 0),P=R([(0,d.Mo)("w3m-onramp-providers-view")],P),r(88239);var I=(0,d.iv)` + :host > wui-grid { + max-height: 360px; + overflow: auto; + } + + wui-flex { + transition: opacity ${({easings:e})=>e["ease-out-power-1"]} + ${({durations:e})=>e.md}; + will-change: opacity; + } + + wui-grid::-webkit-scrollbar { + display: none; + } + + wui-flex.disabled { + opacity: 0.3; + pointer-events: none; + user-select: none; + } +`,O=function(e,t,r,i){var o,n=arguments.length,s=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s);return n>3&&s&&Object.defineProperty(t,r,s),s};let B=class extends i.oi{constructor(){super(),this.unsubscribe=[],this.selectedCurrency=s.ph.state.purchaseCurrencies,this.tokens=s.ph.state.purchaseCurrencies,this.tokenImages=a.W.state.tokenImages,this.checked=c.M.state.isLegalCheckboxChecked,this.unsubscribe.push(s.ph.subscribe(e=>{this.selectedCurrency=e.purchaseCurrencies,this.tokens=e.purchaseCurrencies}),a.W.subscribeKey("tokenImages",e=>this.tokenImages=e),c.M.subscribeKey("isLegalCheckboxChecked",e=>{this.checked=e}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){let{termsConditionsUrl:e,privacyPolicyUrl:t}=u.OptionsController.state,r=u.OptionsController.state.features?.legalCheckbox,o=!!(e||t)&&!!r&&!this.checked;return(0,i.dy)` + + + ${this.currenciesTemplate(o)} + + `}currenciesTemplate(e=!1){return this.tokens.map(t=>(0,i.dy)` + this.selectToken(t)} + variant="image" + tabIdx=${(0,n.o)(e?-1:void 0)} + > + + ${t.name} + ${t.symbol} + + + `)}selectToken(e){e&&(s.ph.setPurchaseCurrency(e),l.I.close())}};B.styles=I,O([(0,o.SB)()],B.prototype,"selectedCurrency",void 0),O([(0,o.SB)()],B.prototype,"tokens",void 0),O([(0,o.SB)()],B.prototype,"tokenImages",void 0),O([(0,o.SB)()],B.prototype,"checked",void 0),B=O([(0,d.Mo)("w3m-onramp-token-select-view")],B);var S=r(64369),A=r(52005),j=r(66909);r(97585),r(92374),r(51437),r(87302);var T=(0,d.iv)` + @keyframes shake { + 0% { + transform: translateX(0); + } + 25% { + transform: translateX(3px); + } + 50% { + transform: translateX(-3px); + } + 75% { + transform: translateX(3px); + } + 100% { + transform: translateX(0); + } + } + + wui-flex:first-child:not(:only-child) { + position: relative; + } + + wui-loading-thumbnail { + position: absolute; + } + + wui-visual { + border-radius: calc( + ${({borderRadius:e})=>e["1"]} * 9 - ${({borderRadius:e})=>e["3"]} + ); + position: relative; + overflow: hidden; + } + + wui-icon-box { + position: absolute; + right: calc(${({spacing:e})=>e["1"]} * -1); + bottom: calc(${({spacing:e})=>e["1"]} * -1); + opacity: 0; + transform: scale(0.5); + transition: + opacity ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]}, + transform ${({durations:e})=>e.lg} + ${({easings:e})=>e["ease-out-power-2"]}; + will-change: opacity, transform; + } + + wui-text[align='center'] { + width: 100%; + padding: 0px ${({spacing:e})=>e["4"]}; + } + + [data-error='true'] wui-icon-box { + opacity: 1; + transform: scale(1); + } + + [data-error='true'] > wui-flex:first-child { + animation: shake 250ms ${({easings:e})=>e["ease-out-power-2"]} both; + } + + [data-retry='false'] wui-link { + display: none; + } + + [data-retry='true'] wui-link { + display: block; + opacity: 1; + } + + wui-link { + padding: ${({spacing:e})=>e["01"]} ${({spacing:e})=>e["2"]}; + } +`,D=function(e,t,r,i){var o,n=arguments.length,s=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s);return n>3&&s&&Object.defineProperty(t,r,s),s};let W=class extends i.oi{constructor(){super(),this.unsubscribe=[],this.selectedOnRampProvider=s.ph.state.selectedProvider,this.uri=S.ConnectionController.state.wcUri,this.ready=!1,this.showRetry=!1,this.buffering=!1,this.error=!1,this.isMobile=!1,this.onRetry=void 0,this.unsubscribe.push(s.ph.subscribeKey("selectedProvider",e=>{this.selectedOnRampProvider=e}))}disconnectedCallback(){this.intervalId&&clearInterval(this.intervalId)}render(){let e="Continue in external window";this.error?e="Buy failed":this.selectedOnRampProvider&&(e=`Buy in ${this.selectedOnRampProvider?.label}`);let t=this.error?"Buy can be declined from your side or due to and error on the provider app":`We’ll notify you once your Buy is processed`;return(0,i.dy)` + + + + + + ${this.error?null:this.loaderTemplate()} + + + + + + + ${e} + + ${t} + + + ${this.error?this.tryAgainTemplate():null} + + + + + + Copy link + + + `}onTryAgain(){this.selectedOnRampProvider&&(this.error=!1,f.j.openHref(this.selectedOnRampProvider.url,"popupWindow","width=600,height=800,scrollbars=yes"))}tryAgainTemplate(){return this.selectedOnRampProvider?.url?(0,i.dy)` + + Try again + `:null}loaderTemplate(){let e=A.ThemeController.state.themeVariables["--w3m-border-radius-master"],t=e?parseInt(e.replace("px",""),10):4;return(0,i.dy)``}onCopyUri(){if(!this.selectedOnRampProvider?.url){j.SnackController.showError("No link found"),w.RouterController.goBack();return}try{f.j.copyToClopboard(this.selectedOnRampProvider.url),j.SnackController.showSuccess("Link copied")}catch{j.SnackController.showError("Failed to copy")}}};W.styles=T,D([(0,o.SB)()],W.prototype,"intervalId",void 0),D([(0,o.SB)()],W.prototype,"selectedOnRampProvider",void 0),D([(0,o.SB)()],W.prototype,"uri",void 0),D([(0,o.SB)()],W.prototype,"ready",void 0),D([(0,o.SB)()],W.prototype,"showRetry",void 0),D([(0,o.SB)()],W.prototype,"buffering",void 0),D([(0,o.SB)()],W.prototype,"error",void 0),D([(0,o.Cb)({type:Boolean})],W.prototype,"isMobile",void 0),D([(0,o.Cb)()],W.prototype,"onRetry",void 0),W=D([(0,d.Mo)("w3m-buy-in-progress-view")],W);let M=class extends i.oi{render(){return(0,i.dy)` + + + + + Quickly and easily buy digital assets! + + + Simply select your preferred onramp provider and add digital assets to your account + using your credit card or bank transfer + + + + + Buy + + + `}};M=function(e,t,r,i){var o,n=arguments.length,s=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s);return n>3&&s&&Object.defineProperty(t,r,s),s}([(0,d.Mo)("w3m-what-is-a-buy-view")],M),r(64349);var L=(0,d.iv)` + :host { + width: 100%; + } + + wui-loading-spinner { + position: absolute; + top: 50%; + right: 20px; + transform: translateY(-50%); + } + + .currency-container { + position: absolute; + top: 50%; + transform: translateY(-50%); + right: ${({spacing:e})=>e["2"]}; + height: 40px; + padding: ${({spacing:e})=>e["2"]} ${({spacing:e})=>e["2"]} + ${({spacing:e})=>e["2"]} ${({spacing:e})=>e["2"]}; + min-width: 95px; + border-radius: ${({borderRadius:e})=>e.round}; + border: 1px solid ${({tokens:e})=>e.theme.foregroundPrimary}; + background: ${({tokens:e})=>e.theme.foregroundPrimary}; + cursor: pointer; + } + + .currency-container > wui-image { + height: 24px; + width: 24px; + border-radius: 50%; + } +`,E=function(e,t,r,i){var o,n=arguments.length,s=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s);return n>3&&s&&Object.defineProperty(t,r,s),s};let z=class extends i.oi{constructor(){super(),this.unsubscribe=[],this.type="Token",this.value=0,this.currencies=[],this.selectedCurrency=this.currencies?.[0],this.currencyImages=a.W.state.currencyImages,this.tokenImages=a.W.state.tokenImages,this.unsubscribe.push(s.ph.subscribeKey("purchaseCurrency",e=>{e&&"Fiat"!==this.type&&(this.selectedCurrency=this.formatPurchaseCurrency(e))}),s.ph.subscribeKey("paymentCurrency",e=>{e&&"Token"!==this.type&&(this.selectedCurrency=this.formatPaymentCurrency(e))}),s.ph.subscribe(e=>{"Fiat"===this.type?this.currencies=e.purchaseCurrencies.map(this.formatPurchaseCurrency):this.currencies=e.paymentCurrencies.map(this.formatPaymentCurrency)}),a.W.subscribe(e=>{this.currencyImages={...e.currencyImages},this.tokenImages={...e.tokenImages}}))}firstUpdated(){s.ph.getAvailableCurrencies()}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){let e=this.selectedCurrency?.symbol||"",t=this.currencyImages[e]||this.tokenImages[e];return(0,i.dy)` + ${this.selectedCurrency?(0,i.dy)` l.I.open({view:`OnRamp${this.type}Select`})} + > + + ${this.selectedCurrency.symbol} + `:(0,i.dy)``} + `}formatPaymentCurrency(e){return{name:e.id,symbol:e.id}}formatPurchaseCurrency(e){return{name:e.name,symbol:e.symbol}}};z.styles=L,E([(0,o.Cb)({type:String})],z.prototype,"type",void 0),E([(0,o.Cb)({type:Number})],z.prototype,"value",void 0),E([(0,o.SB)()],z.prototype,"currencies",void 0),E([(0,o.SB)()],z.prototype,"selectedCurrency",void 0),E([(0,o.SB)()],z.prototype,"currencyImages",void 0),E([(0,o.SB)()],z.prototype,"tokenImages",void 0),z=E([(0,d.Mo)("w3m-onramp-input")],z);var K=(0,d.iv)` + :host > wui-flex { + width: 100%; + max-width: 360px; + } + + :host > wui-flex > wui-flex { + border-radius: ${({borderRadius:e})=>e["8"]}; + width: 100%; + } + + .amounts-container { + width: 100%; + } +`,U=function(e,t,r,i){var o,n=arguments.length,s=n<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(n<3?o(s):n>3?o(t,r,s):o(t,r))||s);return n>3&&s&&Object.defineProperty(t,r,s),s};let N={USD:"$",EUR:"€",GBP:"\xa3"},_=[100,250,500,1e3],q=class extends i.oi{constructor(){super(),this.unsubscribe=[],this.disabled=!1,this.caipAddress=y.R.state.activeCaipAddress,this.loading=l.I.state.loading,this.paymentCurrency=s.ph.state.paymentCurrency,this.paymentAmount=s.ph.state.paymentAmount,this.purchaseAmount=s.ph.state.purchaseAmount,this.quoteLoading=s.ph.state.quotesLoading,this.unsubscribe.push(y.R.subscribeKey("activeCaipAddress",e=>this.caipAddress=e),l.I.subscribeKey("loading",e=>{this.loading=e}),s.ph.subscribe(e=>{this.paymentCurrency=e.paymentCurrency,this.paymentAmount=e.paymentAmount,this.purchaseAmount=e.purchaseAmount,this.quoteLoading=e.quotesLoading}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return(0,i.dy)` + + + + + + ${_.map(e=>(0,i.dy)`this.selectPresetAmount(e)} + >${`${N[this.paymentCurrency?.id||"USD"]} ${e}`}`)} + + ${this.templateButton()} + + + `}templateButton(){return this.caipAddress?(0,i.dy)` + Get quotes + `:(0,i.dy)` + Connect wallet + `}getQuotes(){this.loading||l.I.open({view:"OnRampProviders"})}openModal(){l.I.open({view:"Connect"})}async onPaymentAmountChange(e){s.ph.setPaymentAmount(Number(e.detail)),await s.ph.getQuote()}async selectPresetAmount(e){s.ph.setPaymentAmount(e),await s.ph.getQuote()}};q.styles=K,U([(0,o.Cb)({type:Boolean})],q.prototype,"disabled",void 0),U([(0,o.SB)()],q.prototype,"caipAddress",void 0),U([(0,o.SB)()],q.prototype,"loading",void 0),U([(0,o.SB)()],q.prototype,"paymentCurrency",void 0),U([(0,o.SB)()],q.prototype,"paymentAmount",void 0),U([(0,o.SB)()],q.prototype,"purchaseAmount",void 0),U([(0,o.SB)()],q.prototype,"quoteLoading",void 0),q=U([(0,d.Mo)("w3m-onramp-widget")],q)},1799:function(e,t,r){r(23805)}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/4324.2d21e6e94d240f5a.js b/frontend/.next/static/chunks/4324.2d21e6e94d240f5a.js new file mode 100644 index 0000000..7768a97 --- /dev/null +++ b/frontend/.next/static/chunks/4324.2d21e6e94d240f5a.js @@ -0,0 +1,14 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4324],{4324:function(t,e,r){r.r(e),r.d(e,{PhCaretRight:function(){return c}}),r(31498);var i=r(38157),l=r(48567),o=r(54910),s=r(69709),a=r(78313),h=Object.defineProperty,p=Object.getOwnPropertyDescriptor,n=(t,e,r,i)=>{for(var l,o=i>1?void 0:i?p(e,r):e,s=t.length-1;s>=0;s--)(l=t[s])&&(o=(i?l(e,r,o):l(o))||o);return i&&o&&h(e,r,o),o};let c=class extends l.oi{constructor(){super(...arguments),this.size="1em",this.weight="regular",this.color="currentColor",this.mirrored=!1}render(){var t;return(0,i.dy)` + ${c.weightsMap.get(null!=(t=this.weight)?t:"regular")} + `}};c.weightsMap=new Map([["thin",(0,i.YP)``],["light",(0,i.YP)``],["regular",(0,i.YP)``],["bold",(0,i.YP)``],["fill",(0,i.YP)``],["duotone",(0,i.YP)``]]),c.styles=(0,a.iv)` + :host { + display: contents; + } + `,n([(0,s.C)({type:String,reflect:!0})],c.prototype,"size",2),n([(0,s.C)({type:String,reflect:!0})],c.prototype,"weight",2),n([(0,s.C)({type:String,reflect:!0})],c.prototype,"color",2),n([(0,s.C)({type:Boolean,reflect:!0})],c.prototype,"mirrored",2),c=n([(0,o.M)("ph-caret-right")],c)}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/4506-bc1a7fb316d20484.js b/frontend/.next/static/chunks/4506-bc1a7fb316d20484.js new file mode 100644 index 0000000..55d51ae --- /dev/null +++ b/frontend/.next/static/chunks/4506-bc1a7fb316d20484.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4506],{54506:function(t,e,n){n.d(e,{Z:function(){return p}});var a,r={};function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){if(e.length1?"s":"")+" required, but only "+e.length+" present")}function u(t){i(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"===o(t)&&"[object Date]"===e?new Date(t.getTime()):"number"==typeof t||"[object Number]"===e?new Date(t):(("string"==typeof t||"[object String]"===e)&&"undefined"!=typeof console&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(Error().stack)),new Date(NaN))}function s(t,e){i(2,arguments);var n=u(t),a=u(e),r=n.getTime()-a.getTime();return r<0?-1:r>0?1:r}var d={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},l={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function h(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}var m={date:h({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:h({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:h({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},f={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function c(t){return function(e,n){var a;if("formatting"===(null!=n&&n.context?String(n.context):"standalone")&&t.formattingValues){var r=t.defaultFormattingWidth||t.defaultWidth,o=null!=n&&n.width?String(n.width):r;a=t.formattingValues[o]||t.formattingValues[r]}else{var i=t.defaultWidth,u=null!=n&&n.width?String(n.width):t.defaultWidth;a=t.values[u]||t.values[i]}return a[t.argumentCallback?t.argumentCallback(e):e]}}function g(t){return function(e){var n,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=a.width,o=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],i=e.match(o);if(!i)return null;var u=i[0],s=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],d=Array.isArray(s)?function(t,e){for(var n=0;n0?"in "+a:a+" ago":a},formatLong:m,formatRelative:function(t,e,n,a){return f[t]},localize:{ordinalNumber:function(t,e){var n=Number(t),a=n%100;if(a>20||a<10)switch(a%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:c({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:c({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:c({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:c({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:c({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(a={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}},function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.match(a.matchPattern);if(!n)return null;var r=n[0],o=t.match(a.parsePattern);if(!o)return null;var i=a.valueCallback?a.valueCallback(o[0]):o[0];return{value:i=e.valueCallback?e.valueCallback(i):i,rest:t.slice(r.length)}}),era:g({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:g({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:g({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:g({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:g({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};function b(t,e){if(null==t)throw TypeError("assign requires that input parameter not be null or undefined");for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}function y(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}function p(t,e){return i(1,arguments),function(t,e,n){i(2,arguments);var a,o,l,h,m,f=null!==(a=null!==(o=null==n?void 0:n.locale)&&void 0!==o?o:r.locale)&&void 0!==a?a:v;if(!f.formatDistance)throw RangeError("locale must contain formatDistance property");var c=s(t,e);if(isNaN(c))throw RangeError("Invalid time value");var g=b(b({},n),{addSuffix:!!(null==n?void 0:n.addSuffix),comparison:c});c>0?(l=u(e),h=u(t)):(l=u(t),h=u(e));var p=function(t,e,n){i(2,arguments);var a,r=function(t,e){return i(2,arguments),u(t).getTime()-u(e).getTime()}(t,e)/1e3;return((a=null==n?void 0:n.roundingMethod)?d[a]:d.trunc)(r)}(h,l),w=Math.round((p-(y(h)-y(l))/1e3)/60);if(w<2){if(null!=n&&n.includeSeconds){if(p<5)return f.formatDistance("lessThanXSeconds",5,g);if(p<10)return f.formatDistance("lessThanXSeconds",10,g);if(p<20)return f.formatDistance("lessThanXSeconds",20,g);if(p<40)return f.formatDistance("halfAMinute",0,g);else if(p<60)return f.formatDistance("lessThanXMinutes",1,g);else return f.formatDistance("xMinutes",1,g)}return 0===w?f.formatDistance("lessThanXMinutes",1,g):f.formatDistance("xMinutes",w,g)}if(w<45)return f.formatDistance("xMinutes",w,g);if(w<90)return f.formatDistance("aboutXHours",1,g);if(w<1440)return f.formatDistance("aboutXHours",Math.round(w/60),g);if(w<2520)return f.formatDistance("xDays",1,g);if(w<43200)return f.formatDistance("xDays",Math.round(w/1440),g);if(w<86400)return m=Math.round(w/43200),f.formatDistance("aboutXMonths",m,g);if((m=function(t,e){i(2,arguments);var n,a=u(t),r=u(e),o=s(a,r),d=Math.abs(function(t,e){i(2,arguments);var n=u(t),a=u(e);return 12*(n.getFullYear()-a.getFullYear())+(n.getMonth()-a.getMonth())}(a,r));if(d<1)n=0;else{1===a.getMonth()&&a.getDate()>27&&a.setDate(30),a.setMonth(a.getMonth()-o*d);var l=s(a,r)===-o;(function(t){i(1,arguments);var e=u(t);return(function(t){i(1,arguments);var e=u(t);return e.setHours(23,59,59,999),e})(e).getTime()===(function(t){i(1,arguments);var e=u(t),n=e.getMonth();return e.setFullYear(e.getFullYear(),n+1,0),e.setHours(23,59,59,999),e})(e).getTime()})(u(t))&&1===d&&1===s(t,r)&&(l=!1),n=o*(d-Number(l))}return 0===n?0:n}(h,l))<12)return f.formatDistance("xMonths",Math.round(w/43200),g);var M=m%12,D=Math.floor(m/12);return M<3?f.formatDistance("aboutXYears",D,g):M<9?f.formatDistance("overXYears",D,g):f.formatDistance("almostXYears",D+1,g)}(t,Date.now(),e)}}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/4653.8fb9eeb0b101872e.js b/frontend/.next/static/chunks/4653.8fb9eeb0b101872e.js new file mode 100644 index 0000000..15634f0 --- /dev/null +++ b/frontend/.next/static/chunks/4653.8fb9eeb0b101872e.js @@ -0,0 +1,14 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4653],{74653:function(t,e,r){r.r(e),r.d(e,{PhCaretDown:function(){return c}}),r(31498);var l=r(38157),o=r(48567),a=r(54910),i=r(69709),s=r(78313),h=Object.defineProperty,p=Object.getOwnPropertyDescriptor,n=(t,e,r,l)=>{for(var o,a=l>1?void 0:l?p(e,r):e,i=t.length-1;i>=0;i--)(o=t[i])&&(a=(l?o(e,r,a):o(a))||a);return l&&a&&h(e,r,a),a};let c=class extends o.oi{constructor(){super(...arguments),this.size="1em",this.weight="regular",this.color="currentColor",this.mirrored=!1}render(){var t;return(0,l.dy)` + ${c.weightsMap.get(null!=(t=this.weight)?t:"regular")} + `}};c.weightsMap=new Map([["thin",(0,l.YP)``],["light",(0,l.YP)``],["regular",(0,l.YP)``],["bold",(0,l.YP)``],["fill",(0,l.YP)``],["duotone",(0,l.YP)``]]),c.styles=(0,s.iv)` + :host { + display: contents; + } + `,n([(0,i.C)({type:String,reflect:!0})],c.prototype,"size",2),n([(0,i.C)({type:String,reflect:!0})],c.prototype,"weight",2),n([(0,i.C)({type:String,reflect:!0})],c.prototype,"color",2),n([(0,i.C)({type:Boolean,reflect:!0})],c.prototype,"mirrored",2),c=n([(0,a.M)("ph-caret-down")],c)}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/4792.4375898a5363bf32.js b/frontend/.next/static/chunks/4792.4375898a5363bf32.js new file mode 100644 index 0000000..8936d03 --- /dev/null +++ b/frontend/.next/static/chunks/4792.4375898a5363bf32.js @@ -0,0 +1,14 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4792],{64792:function(t,e,r){r.r(e),r.d(e,{PhCircleHalf:function(){return c}}),r(31498);var a=r(38157),i=r(48567),o=r(54910),s=r(69709),h=r(78313),l=Object.defineProperty,p=Object.getOwnPropertyDescriptor,n=(t,e,r,a)=>{for(var i,o=a>1?void 0:a?p(e,r):e,s=t.length-1;s>=0;s--)(i=t[s])&&(o=(a?i(e,r,o):i(o))||o);return a&&o&&l(e,r,o),o};let c=class extends i.oi{constructor(){super(...arguments),this.size="1em",this.weight="regular",this.color="currentColor",this.mirrored=!1}render(){var t;return(0,a.dy)` + ${c.weightsMap.get(null!=(t=this.weight)?t:"regular")} + `}};c.weightsMap=new Map([["thin",(0,a.YP)``],["light",(0,a.YP)``],["regular",(0,a.YP)``],["bold",(0,a.YP)``],["fill",(0,a.YP)``],["duotone",(0,a.YP)``]]),c.styles=(0,h.iv)` + :host { + display: contents; + } + `,n([(0,s.C)({type:String,reflect:!0})],c.prototype,"size",2),n([(0,s.C)({type:String,reflect:!0})],c.prototype,"weight",2),n([(0,s.C)({type:String,reflect:!0})],c.prototype,"color",2),n([(0,s.C)({type:Boolean,reflect:!0})],c.prototype,"mirrored",2),c=n([(0,o.M)("ph-circle-half")],c)}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/4893.cc57c10cc15fb42c.js b/frontend/.next/static/chunks/4893.cc57c10cc15fb42c.js new file mode 100644 index 0000000..99c49af --- /dev/null +++ b/frontend/.next/static/chunks/4893.cc57c10cc15fb42c.js @@ -0,0 +1,131 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4893],{94893:function(e,t,i){i.r(t),i.d(t,{W3mWalletReceiveView:function(){return C}});var r=i(31133),o=i(84927),n=i(32801),a=i(6943),s=i(66909),c=i(63043),l=i(52005),u=i(43291),d=i(86777),w=i(53357),p=i(92413);i(74975),i(23805),i(18360),i(5680);var h=i(84249),m=i(57116),f=i(11131),g=(0,f.iv)` + button { + width: 100%; + display: flex; + align-items: center; + justify-content: space-between; + gap: ${({spacing:e})=>e[4]}; + background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; + border-radius: ${({borderRadius:e})=>e[3]}; + border: none; + padding: ${({spacing:e})=>e[3]}; + transition: background-color ${({durations:e})=>e.lg} + ${({easings:e})=>e["ease-out-power-2"]}; + will-change: background-color; + } + + /* -- Hover & Active states ----------------------------------------------------------- */ + button:hover:enabled, + button:active:enabled { + background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; + } + + wui-text { + flex: 1; + color: ${({tokens:e})=>e.theme.textSecondary}; + } + + wui-flex { + width: auto; + display: flex; + align-items: center; + gap: ${({spacing:e})=>e["01"]}; + } + + wui-icon { + color: ${({tokens:e})=>e.theme.iconDefault}; + } + + .network-icon { + position: relative; + width: 20px; + height: 20px; + border-radius: ${({borderRadius:e})=>e[4]}; + overflow: hidden; + margin-left: -8px; + } + + .network-icon:first-child { + margin-left: 0px; + } + + .network-icon:after { + position: absolute; + inset: 0; + content: ''; + display: block; + height: 100%; + width: 100%; + border-radius: ${({borderRadius:e})=>e[4]}; + box-shadow: inset 0 0 0 1px ${({tokens:e})=>e.core.glass010}; + } +`,b=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let k=class extends r.oi{constructor(){super(...arguments),this.networkImages=[""],this.text=""}render(){return(0,r.dy)` + + `}networksTemplate(){let e=this.networkImages.slice(0,5);return(0,r.dy)` + ${e?.map(e=>r.dy` `)} + `}};k.styles=[h.ET,h.ZM,g],b([(0,o.Cb)({type:Array})],k.prototype,"networkImages",void 0),b([(0,o.Cb)()],k.prototype,"text",void 0),k=b([(0,m.M)("wui-compatible-network")],k),i(96277),i(930),i(44732);var y=i(4786),v=(0,p.iv)` + wui-compatible-network { + margin-top: ${({spacing:e})=>e["4"]}; + width: 100%; + } + + wui-qr-code { + width: unset !important; + height: unset !important; + } + + wui-icon { + align-items: normal; + } +`,x=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let C=class extends r.oi{constructor(){super(),this.unsubscribe=[],this.address=a.R.getAccountData()?.address,this.profileName=a.R.getAccountData()?.profileName,this.network=a.R.state.activeCaipNetwork,this.unsubscribe.push(a.R.subscribeChainProp("accountState",e=>{e?(this.address=e.address,this.profileName=e.profileName):s.SnackController.showError("Account not found")}),a.R.subscribeKey("activeCaipNetwork",e=>{e?.id&&(this.network=e)}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){if(!this.address)throw Error("w3m-wallet-receive-view: No account provided");let e=c.f.getNetworkImage(this.network);return(0,r.dy)` + + + + + Copy your address or scan this QR code + + + + Copy address + + + ${this.networkTemplate()} + `}networkTemplate(){let e=a.R.getAllRequestedCaipNetworks(),t=a.R.checkIfSmartAccountEnabled(),i=a.R.state.activeCaipNetwork,o=e.filter(e=>e?.chainNamespace===i?.chainNamespace);if((0,u.r9)(i?.chainNamespace)===y.y_.ACCOUNT_TYPES.SMART_ACCOUNT&&t)return i?(0,r.dy)``:null;let n=(o?.filter(e=>e?.assets?.imageId)?.slice(0,5)).map(c.f.getNetworkImage).filter(Boolean);return(0,r.dy)``}onReceiveClick(){d.RouterController.push("WalletCompatibleNetworks")}onCopyClick(){try{this.address&&(w.j.copyToClopboard(this.address),s.SnackController.showSuccess("Address copied"))}catch{s.SnackController.showError("Failed to copy")}}};C.styles=v,x([(0,o.SB)()],C.prototype,"address",void 0),x([(0,o.SB)()],C.prototype,"profileName",void 0),x([(0,o.SB)()],C.prototype,"network",void 0),C=x([(0,p.Mo)("w3m-wallet-receive-view")],C)}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/4931.563d35ad17647dc0.js b/frontend/.next/static/chunks/4931.563d35ad17647dc0.js new file mode 100644 index 0000000..d7c6716 --- /dev/null +++ b/frontend/.next/static/chunks/4931.563d35ad17647dc0.js @@ -0,0 +1,14 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4931],{4931:function(t,e,r){r.r(e),r.d(e,{PhDotsThree:function(){return c}}),r(31498);var a=r(38157),o=r(48567),i=r(54910),s=r(69709),h=r(78313),p=Object.defineProperty,l=Object.getOwnPropertyDescriptor,n=(t,e,r,a)=>{for(var o,i=a>1?void 0:a?l(e,r):e,s=t.length-1;s>=0;s--)(o=t[s])&&(i=(a?o(e,r,i):o(i))||i);return a&&i&&p(e,r,i),i};let c=class extends o.oi{constructor(){super(...arguments),this.size="1em",this.weight="regular",this.color="currentColor",this.mirrored=!1}render(){var t;return(0,a.dy)` + ${c.weightsMap.get(null!=(t=this.weight)?t:"regular")} + `}};c.weightsMap=new Map([["thin",(0,a.YP)``],["light",(0,a.YP)``],["regular",(0,a.YP)``],["bold",(0,a.YP)``],["fill",(0,a.YP)``],["duotone",(0,a.YP)``]]),c.styles=(0,h.iv)` + :host { + display: contents; + } + `,n([(0,s.C)({type:String,reflect:!0})],c.prototype,"size",2),n([(0,s.C)({type:String,reflect:!0})],c.prototype,"weight",2),n([(0,s.C)({type:String,reflect:!0})],c.prototype,"color",2),n([(0,s.C)({type:Boolean,reflect:!0})],c.prototype,"mirrored",2),c=n([(0,i.M)("ph-dots-three")],c)}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/4946.1ccfccafc680a298.js b/frontend/.next/static/chunks/4946.1ccfccafc680a298.js new file mode 100644 index 0000000..d2598f2 --- /dev/null +++ b/frontend/.next/static/chunks/4946.1ccfccafc680a298.js @@ -0,0 +1,2 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4946],{74946:function(e,t,s){s.d(t,{default:function(){return E}});let a=()=>"9.1.0",n=e=>e.toString(16).padStart(2,"0"),i=e=>{let t=new Uint8Array((e||40)/2);return window.crypto.getRandomValues(t),Array.from(t,n).join("")},r=()=>"undefined"!=typeof window?i(10):new Date().getTime().toString(36);class o{}o.makeRequest=(e,t)=>({id:r(),method:e,params:t,env:{sdkVersion:a()}}),o.makeResponse=(e,t,s)=>({id:e,success:!0,version:s,data:t}),o.makeErrorResponse=(e,t,s)=>({id:e,success:!1,error:t,version:s}),(f=p||(p={})).sendTransactions="sendTransactions",f.rpcCall="rpcCall",f.getChainInfo="getChainInfo",f.getSafeInfo="getSafeInfo",f.getTxBySafeTxHash="getTxBySafeTxHash",f.getSafeBalances="getSafeBalances",f.signMessage="signMessage",f.signTypedMessage="signTypedMessage",f.getEnvironmentInfo="getEnvironmentInfo",f.getOffChainSignature="getOffChainSignature",f.requestAddressBook="requestAddressBook",f.wallet_getPermissions="wallet_getPermissions",f.wallet_requestPermissions="wallet_requestPermissions",(w||(w={})).requestAddressBook="requestAddressBook";class c{constructor(e=null,t=!1){this.allowedOrigins=null,this.callbacks=new Map,this.debugMode=!1,this.isServer="undefined"==typeof window,this.isValidMessage=({origin:e,data:t,source:s})=>{let a=!this.isServer&&s===window.parent,n=void 0!==t.version&&parseInt(t.version.split(".")[0]),i=!0;return Array.isArray(this.allowedOrigins)&&(i=void 0!==this.allowedOrigins.find(t=>t.test(e))),!!t&&a&&"number"==typeof n&&n>=1&&i},this.logIncomingMessage=e=>{console.info(`Safe Apps SDK v1: A message was received from origin ${e.origin}. `,e.data)},this.onParentMessage=e=>{this.isValidMessage(e)&&(this.debugMode&&this.logIncomingMessage(e),this.handleIncomingMessage(e.data))},this.handleIncomingMessage=e=>{let{id:t}=e,s=this.callbacks.get(t);s&&(s(e),this.callbacks.delete(t))},this.send=(e,t)=>{let s=o.makeRequest(e,t);if(this.isServer)throw Error("Window doesn't exist");return window.parent.postMessage(s,"*"),new Promise((e,t)=>{this.callbacks.set(s.id,s=>{if(!s.success){t(Error(s.error));return}e(s)})})},this.allowedOrigins=e,this.debugMode=t,this.isServer||window.addEventListener("message",this.onParentMessage)}}let l=e=>"object"==typeof e&&null!=e&&"domain"in e&&"types"in e&&"message"in e;s(42181);class u{constructor(e){this.communicator=e}async getBySafeTxHash(e){if(!e)throw Error("Invalid safeTxHash");return(await this.communicator.send(p.getTxBySafeTxHash,{safeTxHash:e})).data}async signMessage(e){return(await this.communicator.send(p.signMessage,{message:e})).data}async signTypedMessage(e){if(!l(e))throw Error("Invalid typed data");return(await this.communicator.send(p.signTypedMessage,{typedData:e})).data}async send({txs:e,params:t}){if(!e||!e.length)throw Error("No transactions were passed");return(await this.communicator.send(p.sendTransactions,{txs:e,params:t})).data}}let d="eth_call",h=(e="latest")=>e,m=(e=!1)=>e,g=e=>Number.isInteger(e)?`0x${e.toString(16)}`:e;class y{constructor(e){this.communicator=e,this.call=this.buildRequest({call:d,formatters:[null,h]}),this.getBalance=this.buildRequest({call:"eth_getBalance",formatters:[null,h]}),this.getCode=this.buildRequest({call:"eth_getCode",formatters:[null,h]}),this.getStorageAt=this.buildRequest({call:"eth_getStorageAt",formatters:[null,g,h]}),this.getPastLogs=this.buildRequest({call:"eth_getLogs"}),this.getBlockByHash=this.buildRequest({call:"eth_getBlockByHash",formatters:[null,m]}),this.getBlockByNumber=this.buildRequest({call:"eth_getBlockByNumber",formatters:[g,m]}),this.getTransactionByHash=this.buildRequest({call:"eth_getTransactionByHash"}),this.getTransactionReceipt=this.buildRequest({call:"eth_getTransactionReceipt"}),this.getTransactionCount=this.buildRequest({call:"eth_getTransactionCount",formatters:[null,h]}),this.getGasPrice=this.buildRequest({call:"eth_gasPrice"}),this.getEstimateGas=e=>this.buildRequest({call:"eth_estimateGas"})([e]),this.setSafeSettings=this.buildRequest({call:"safe_setSettings"})}buildRequest(e){let{call:t,formatters:s}=e;return async e=>(s&&Array.isArray(e)&&s.forEach((t,s)=>{t&&(e[s]=t(e[s]))}),(await this.communicator.send(p.rpcCall,{call:t,params:e||[]})).data)}}var f,p,w,b=s(17283),v=s(15566),S=s(42727);class I extends Error{constructor(e,t,s){super(e),this.code=t,this.data=s,Object.setPrototypeOf(this,I.prototype)}}class P{constructor(e){this.communicator=e}async getPermissions(){return(await this.communicator.send(p.wallet_getPermissions,void 0)).data}async requestPermissions(e){if(!this.isPermissionRequestValid(e))throw new I("Permissions request is invalid",4001);try{return(await this.communicator.send(p.wallet_requestPermissions,e)).data}catch{throw new I("Permissions rejected",4001)}}isPermissionRequestValid(e){return e.every(e=>"object"==typeof e&&Object.keys(e).every(e=>!!Object.values(w).includes(e)))}}let M=(e,t)=>t.some(t=>t.parentCapability===e);class k{constructor(e){this.communicator=e}async getChainInfo(){return(await this.communicator.send(p.getChainInfo,void 0)).data}async getInfo(){return(await this.communicator.send(p.getSafeInfo,void 0)).data}async experimental_getBalances({currency:e="usd"}={}){return(await this.communicator.send(p.getSafeBalances,{currency:e})).data}async check1271Signature(e,t="0x"){let s=await this.getInfo(),a=(0,b.R)({abi:[{constant:!1,inputs:[{name:"_dataHash",type:"bytes32"},{name:"_signature",type:"bytes"}],name:"isValidSignature",outputs:[{name:"",type:"bytes4"}],payable:!1,stateMutability:"nonpayable",type:"function"}],functionName:"isValidSignature",args:[e,t]}),n={call:d,params:[{to:s.safeAddress,data:a},"latest"]};try{return"0x1626ba7e"===(await this.communicator.send(p.rpcCall,n)).data.slice(0,10).toLowerCase()}catch(e){return!1}}async check1271SignatureBytes(e,t="0x"){let s=await this.getInfo(),a=(0,b.R)({abi:[{constant:!1,inputs:[{name:"_data",type:"bytes"},{name:"_signature",type:"bytes"}],name:"isValidSignature",outputs:[{name:"",type:"bytes4"}],payable:!1,stateMutability:"nonpayable",type:"function"}],functionName:"isValidSignature",args:[e,t]}),n={call:d,params:[{to:s.safeAddress,data:a},"latest"]};try{return"0x20c13b0b"===(await this.communicator.send(p.rpcCall,n)).data.slice(0,10).toLowerCase()}catch(e){return!1}}calculateMessageHash(e){return(0,v.r)(e)}calculateTypedMessageHash(e){let t="object"==typeof e.domain.chainId?e.domain.chainId.toNumber():Number(e.domain.chainId),s=e.primaryType;if(!s){let t=Object.values(e.types),a=Object.keys(e.types).filter(e=>t.every(t=>t.every(({type:t})=>t.replace("[","").replace("]","")!==e)));if(0===a.length||a.length>1)throw Error("Please specify primaryType");s=a[0]}return(0,S.Jv)({message:e.message,domain:{...e.domain,chainId:t,verifyingContract:e.domain.verifyingContract,salt:e.domain.salt},types:e.types,primaryType:s})}async getOffChainSignature(e){return(await this.communicator.send(p.getOffChainSignature,e)).data}async isMessageSigned(e,t="0x"){let s;if("string"==typeof e&&(s=async()=>{let s=this.calculateMessageHash(e);return await this.isMessageHashSigned(s,t)}),l(e)&&(s=async()=>{let s=this.calculateTypedMessageHash(e);return await this.isMessageHashSigned(s,t)}),s)return await s();throw Error("Invalid message type")}async isMessageHashSigned(e,t="0x"){for(let s of[this.check1271Signature.bind(this),this.check1271SignatureBytes.bind(this)])if(await s(e,t))return!0;return!1}async getEnvironmentInfo(){return(await this.communicator.send(p.getEnvironmentInfo,void 0)).data}async requestAddressBook(){return(await this.communicator.send(p.requestAddressBook,void 0)).data}}!function(e,t,s,a){var n,i=arguments.length,r=i<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,s):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,s,a);else for(var o=e.length-1;o>=0;o--)(n=e[o])&&(r=(i<3?n(r):i>3?n(t,s,r):n(t,s))||r);i>3&&r&&Object.defineProperty(t,s,r)}([(e,t,s)=>{let a=s.value;return s.value=async function(){let e=new P(this.communicator),s=await e.getPermissions();if(M(t,s)||(s=await e.requestPermissions([{[t]:{}}])),!M(t,s))throw new I("Permissions rejected",4001);return a.apply(this)},s}],k.prototype,"requestAddressBook",null);class C{constructor(e={}){let{allowedDomains:t=null,debug:s=!1}=e;this.communicator=new c(t,s),this.eth=new y(this.communicator),this.txs=new u(this.communicator),this.safe=new k(this.communicator),this.wallet=new P(this.communicator)}}var E=C},15566:function(e,t,s){s.d(t,{r:function(){return o}});var a=s(13169),n=s(89256),i=s(20556),r=s(59455);function o(e,t){return(0,a.w)(function(e){let t="string"==typeof e?(0,r.$G)(e):"string"==typeof e.raw?e.raw:(0,r.ci)(e.raw),s=(0,r.$G)(`\x19Ethereum Signed Message: +${(0,i.d)(t)}`);return(0,n.zo)([s,t])}(e),t)}},42727:function(e,t,s){s.d(t,{Jv:function(){return c}});var a=s(30056),n=s(89256),i=s(59455),r=s(13169),o=s(99493);function c(e){let{domain:t={},message:s,primaryType:a}=e,i={EIP712Domain:(0,o.cj)({domain:t}),...e.types};(0,o.iC)({domain:t,message:s,primaryType:a,types:i});let c=["0x1901"];return t&&c.push(function({domain:e,types:t}){return l({data:e,primaryType:"EIP712Domain",types:t})}({domain:t,types:i})),"EIP712Domain"!==a&&c.push(l({data:s,primaryType:a,types:i})),(0,r.w)((0,n.zo)(c))}function l({data:e,primaryType:t,types:s}){let n=function e({data:t,primaryType:s,types:n}){let o=[{type:"bytes32"}],c=[function({primaryType:e,types:t}){let s=(0,i.NC)(function({primaryType:e,types:t}){let s="",a=function e({primaryType:t,types:s},a=new Set){let n=t.match(/^\w*/u),i=n?.[0];if(a.has(i)||void 0===s[i])return a;for(let t of(a.add(i),s[i]))e({primaryType:t.type,types:s},a);return a}({primaryType:e,types:t});for(let n of(a.delete(e),[e,...Array.from(a).sort()]))s+=`${n}(${t[n].map(({name:e,type:t})=>`${t} ${e}`).join(",")})`;return s}({primaryType:e,types:t}));return(0,r.w)(s)}({primaryType:s,types:n})];for(let l of n[s]){let[s,u]=function t({types:s,name:n,type:o,value:c}){if(void 0!==s[o])return[{type:"bytes32"},(0,r.w)(e({data:c,primaryType:o,types:s}))];if("bytes"===o)return[{type:"bytes32"},(0,r.w)(c)];if("string"===o)return[{type:"bytes32"},(0,r.w)((0,i.NC)(c))];if(o.lastIndexOf("]")===o.length-1){let e=o.slice(0,o.lastIndexOf("[")),i=c.map(a=>t({name:n,type:e,types:s,value:a}));return[{type:"bytes32"},(0,r.w)((0,a.E)(i.map(([e])=>e),i.map(([,e])=>e)))]}return[{type:o},c]}({types:n,name:l.name,type:l.type,value:t[l.name]});o.push(s),c.push(u)}return(0,a.E)(o,c)}({data:e,primaryType:t,types:s});return(0,r.w)(n)}},99493:function(e,t,s){s.d(t,{cj:function(){return f},H6:function(){return g},iC:function(){return y}});var a=s(65531),n=s(10052),i=s(31853),r=s(81544);class o extends r.G{constructor({domain:e}){super(`Invalid domain "${(0,i.P)(e)}".`,{metaMessages:["Must be a valid EIP-712 domain."]})}}class c extends r.G{constructor({primaryType:e,types:t}){super(`Invalid primary type \`${e}\` must be one of \`${JSON.stringify(Object.keys(t))}\`.`,{docsPath:"/api/glossary/Errors#typeddatainvalidprimarytypeerror",metaMessages:["Check that the primary type is a key in `types`."]})}}class l extends r.G{constructor({type:e}){super(`Struct type "${e}" is invalid.`,{metaMessages:["Struct type must not be a Solidity type."],name:"InvalidStructTypeError"})}}var u=s(4012),d=s(20556),h=s(59455),m=s(23251);function g(e){let{domain:t,message:s,primaryType:a,types:n}=e,r=(e,t)=>{let s={...t};for(let t of e){let{name:e,type:a}=t;"address"===a&&(s[e]=s[e].toLowerCase())}return s},o=n.EIP712Domain&&t?r(n.EIP712Domain,t):{},c=(()=>{if("EIP712Domain"!==a)return r(n[a],s)})();return(0,i.P)({domain:o,message:c,primaryType:a,types:n})}function y(e){let{domain:t,message:s,primaryType:i,types:r}=e,g=(e,t)=>{for(let s of e){let{name:e,type:i}=s,o=t[e],c=i.match(m.lh);if(c&&("number"==typeof o||"bigint"==typeof o)){let[e,t,s]=c;(0,h.eC)(o,{signed:"int"===t,size:Number.parseInt(s,10)/8})}if("address"===i&&"string"==typeof o&&!(0,u.U)(o))throw new n.b({address:o});let y=i.match(m.eL);if(y){let[e,t]=y;if(t&&(0,d.d)(o)!==Number.parseInt(t,10))throw new a.KY({expectedSize:Number.parseInt(t,10),givenSize:(0,d.d)(o)})}let f=r[i];f&&(function(e){if("address"===e||"bool"===e||"string"===e||e.startsWith("bytes")||e.startsWith("uint")||e.startsWith("int"))throw new l({type:e})}(i),g(f,o))}};if(r.EIP712Domain&&t){if("object"!=typeof t)throw new o({domain:t});g(r.EIP712Domain,t)}if("EIP712Domain"!==i){if(r[i])g(r[i],s);else throw new c({primaryType:i,types:r})}}function f({domain:e}){return["string"==typeof e?.name&&{name:"name",type:"string"},e?.version&&{name:"version",type:"string"},("number"==typeof e?.chainId||"bigint"==typeof e?.chainId)&&{name:"chainId",type:"uint256"},e?.verifyingContract&&{name:"verifyingContract",type:"address"},e?.salt&&{name:"salt",type:"bytes32"}].filter(Boolean)}}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/5370.40f093982f3433dd.js b/frontend/.next/static/chunks/5370.40f093982f3433dd.js new file mode 100644 index 0000000..327aab1 --- /dev/null +++ b/frontend/.next/static/chunks/5370.40f093982f3433dd.js @@ -0,0 +1,14 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5370],{65370:function(t,e,r){r.r(e),r.d(e,{PhBrowser:function(){return H}}),r(31498);var o=r(38157),a=r(48567),i=r(54910),s=r(69709),h=r(78313),p=Object.defineProperty,V=Object.getOwnPropertyDescriptor,l=(t,e,r,o)=>{for(var a,i=o>1?void 0:o?V(e,r):e,s=t.length-1;s>=0;s--)(a=t[s])&&(i=(o?a(e,r,i):a(i))||i);return o&&i&&p(e,r,i),i};let H=class extends a.oi{constructor(){super(...arguments),this.size="1em",this.weight="regular",this.color="currentColor",this.mirrored=!1}render(){var t;return(0,o.dy)` + ${H.weightsMap.get(null!=(t=this.weight)?t:"regular")} + `}};H.weightsMap=new Map([["thin",(0,o.YP)``],["light",(0,o.YP)``],["regular",(0,o.YP)``],["bold",(0,o.YP)``],["fill",(0,o.YP)``],["duotone",(0,o.YP)``]]),H.styles=(0,h.iv)` + :host { + display: contents; + } + `,l([(0,s.C)({type:String,reflect:!0})],H.prototype,"size",2),l([(0,s.C)({type:String,reflect:!0})],H.prototype,"weight",2),l([(0,s.C)({type:String,reflect:!0})],H.prototype,"color",2),l([(0,s.C)({type:Boolean,reflect:!0})],H.prototype,"mirrored",2),H=l([(0,i.M)("ph-browser")],H)}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/5779.cccde6676cacf91f.js b/frontend/.next/static/chunks/5779.cccde6676cacf91f.js new file mode 100644 index 0000000..1f27358 --- /dev/null +++ b/frontend/.next/static/chunks/5779.cccde6676cacf91f.js @@ -0,0 +1,14 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5779],{35779:function(t,e,r){r.r(e),r.d(e,{PhQuestionMark:function(){return n}}),r(31498);var a=r(38157),s=r(48567),i=r(54910),o=r(69709),c=r(78313),h=Object.defineProperty,p=Object.getOwnPropertyDescriptor,l=(t,e,r,a)=>{for(var s,i=a>1?void 0:a?p(e,r):e,o=t.length-1;o>=0;o--)(s=t[o])&&(i=(a?s(e,r,i):s(i))||i);return a&&i&&h(e,r,i),i};let n=class extends s.oi{constructor(){super(...arguments),this.size="1em",this.weight="regular",this.color="currentColor",this.mirrored=!1}render(){var t;return(0,a.dy)` + ${n.weightsMap.get(null!=(t=this.weight)?t:"regular")} + `}};n.weightsMap=new Map([["thin",(0,a.YP)``],["light",(0,a.YP)``],["regular",(0,a.YP)``],["bold",(0,a.YP)``],["fill",(0,a.YP)``],["duotone",(0,a.YP)``]]),n.styles=(0,c.iv)` + :host { + display: contents; + } + `,l([(0,o.C)({type:String,reflect:!0})],n.prototype,"size",2),l([(0,o.C)({type:String,reflect:!0})],n.prototype,"weight",2),l([(0,o.C)({type:String,reflect:!0})],n.prototype,"color",2),l([(0,o.C)({type:Boolean,reflect:!0})],n.prototype,"mirrored",2),n=l([(0,i.M)("ph-question-mark")],n)}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/58-fe2b18b75c935912.js b/frontend/.next/static/chunks/58-fe2b18b75c935912.js new file mode 100644 index 0000000..283b493 --- /dev/null +++ b/frontend/.next/static/chunks/58-fe2b18b75c935912.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[58],{10058:function(e,t,s){s.d(t,{JQ:function(){return n}});var c=s(61714);class i extends c.kb{constructor(e,t,s,i){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=e,this.outputLen=t,this.padOffset=s,this.isLE=i,this.buffer=new Uint8Array(e),this.view=(0,c.GL)(this.buffer)}update(e){(0,c.$h)(this),e=(0,c.O0)(e),(0,c.gk)(e);let{view:t,buffer:s,blockLen:i}=this,b=e.length;for(let f=0;fi-f&&(this.process(s,0),f=0);for(let e=f;e>i&b),a=Number(s&b),h=c?4:0,d=c?0:4;e.setUint32(t+h,f,c),e.setUint32(t+d,a,c)}(s,i-8,BigInt(8*this.length),b),this.process(s,0);let a=(0,c.GL)(e),h=this.outputLen;if(h%4)throw Error("_sha2: outputLen should be aligned to 32bit");let d=h/4,x=this.get();if(d>x.length)throw Error("_sha2: outputLen bigger than state");for(let e=0;e>>3,b=(0,c.np)(s,17)^(0,c.np)(s,19)^s>>>10;h[e]=b+h[e-7]+i+h[e-16]|0}let{A:s,B:i,C:b,D:f,E:d,F:x,G:n,H:r}=this;for(let e=0;e<64;e++){var o,l,u,p;let t=r+((0,c.np)(d,6)^(0,c.np)(d,11)^(0,c.np)(d,25))+((o=d)&x^~o&n)+a[e]+h[e]|0,g=((0,c.np)(s,2)^(0,c.np)(s,13)^(0,c.np)(s,22))+((l=s)&(u=i)^l&(p=b)^u&p)|0;r=n,n=x,x=d,d=f+t|0,f=b,b=i,i=s,s=t+g|0}s=s+this.A|0,i=i+this.B|0,b=b+this.C|0,f=f+this.D|0,d=d+this.E|0,x=x+this.F|0,n=n+this.G|0,r=r+this.H|0,this.set(s,i,b,f,d,x,n,r)}roundClean(){(0,c.ru)(h)}destroy(){this.set(0,0,0,0,0,0,0,0),(0,c.ru)(this.buffer)}}let x=f.Vl(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e)));x[0],x[1];let n=(0,c.V1)(()=>new d)}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/5851.3380ed20e0153f1f.js b/frontend/.next/static/chunks/5851.3380ed20e0153f1f.js new file mode 100644 index 0000000..c754482 --- /dev/null +++ b/frontend/.next/static/chunks/5851.3380ed20e0153f1f.js @@ -0,0 +1,14 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5851],{45851:function(a,t,e){e.r(t),e.d(t,{PhLightbulb:function(){return v}}),e(31498);var r=e(38157),h=e(48567),A=e(54910),i=e(69709),o=e(78313),s=Object.defineProperty,l=Object.getOwnPropertyDescriptor,p=(a,t,e,r)=>{for(var h,A=r>1?void 0:r?l(t,e):t,i=a.length-1;i>=0;i--)(h=a[i])&&(A=(r?h(t,e,A):h(A))||A);return r&&A&&s(t,e,A),A};let v=class extends h.oi{constructor(){super(...arguments),this.size="1em",this.weight="regular",this.color="currentColor",this.mirrored=!1}render(){var a;return(0,r.dy)` + ${v.weightsMap.get(null!=(a=this.weight)?a:"regular")} + `}};v.weightsMap=new Map([["thin",(0,r.YP)``],["light",(0,r.YP)``],["regular",(0,r.YP)``],["bold",(0,r.YP)``],["fill",(0,r.YP)``],["duotone",(0,r.YP)``]]),v.styles=(0,o.iv)` + :host { + display: contents; + } + `,p([(0,i.C)({type:String,reflect:!0})],v.prototype,"size",2),p([(0,i.C)({type:String,reflect:!0})],v.prototype,"weight",2),p([(0,i.C)({type:String,reflect:!0})],v.prototype,"color",2),p([(0,i.C)({type:Boolean,reflect:!0})],v.prototype,"mirrored",2),v=p([(0,A.M)("ph-lightbulb")],v)}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/5857.9b39683897969c57.js b/frontend/.next/static/chunks/5857.9b39683897969c57.js new file mode 100644 index 0000000..b7a23b4 --- /dev/null +++ b/frontend/.next/static/chunks/5857.9b39683897969c57.js @@ -0,0 +1,14 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5857],{75857:function(t,e,a){a.r(e),a.d(e,{PhImage:function(){return n}}),a(31498);var r=a(38157),l=a(48567),i=a(54910),o=a(69709),s=a(78313),h=Object.defineProperty,p=Object.getOwnPropertyDescriptor,V=(t,e,a,r)=>{for(var l,i=r>1?void 0:r?p(e,a):e,o=t.length-1;o>=0;o--)(l=t[o])&&(i=(r?l(e,a,i):l(i))||i);return r&&i&&h(e,a,i),i};let n=class extends l.oi{constructor(){super(...arguments),this.size="1em",this.weight="regular",this.color="currentColor",this.mirrored=!1}render(){var t;return(0,r.dy)` + ${n.weightsMap.get(null!=(t=this.weight)?t:"regular")} + `}};n.weightsMap=new Map([["thin",(0,r.YP)``],["light",(0,r.YP)``],["regular",(0,r.YP)``],["bold",(0,r.YP)``],["fill",(0,r.YP)``],["duotone",(0,r.YP)``]]),n.styles=(0,s.iv)` + :host { + display: contents; + } + `,V([(0,o.C)({type:String,reflect:!0})],n.prototype,"size",2),V([(0,o.C)({type:String,reflect:!0})],n.prototype,"weight",2),V([(0,o.C)({type:String,reflect:!0})],n.prototype,"color",2),V([(0,o.C)({type:Boolean,reflect:!0})],n.prototype,"mirrored",2),n=V([(0,i.M)("ph-image")],n)}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/5957.3e389379b1ac5186.js b/frontend/.next/static/chunks/5957.3e389379b1ac5186.js new file mode 100644 index 0000000..520b380 --- /dev/null +++ b/frontend/.next/static/chunks/5957.3e389379b1ac5186.js @@ -0,0 +1,14 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5957],{25957:function(t,e,r){r.r(e),r.d(e,{PhCheck:function(){return c}}),r(31498);var a=r(38157),l=r(48567),i=r(54910),o=r(69709),s=r(78313),h=Object.defineProperty,p=Object.getOwnPropertyDescriptor,n=(t,e,r,a)=>{for(var l,i=a>1?void 0:a?p(e,r):e,o=t.length-1;o>=0;o--)(l=t[o])&&(i=(a?l(e,r,i):l(i))||i);return a&&i&&h(e,r,i),i};let c=class extends l.oi{constructor(){super(...arguments),this.size="1em",this.weight="regular",this.color="currentColor",this.mirrored=!1}render(){var t;return(0,a.dy)` + ${c.weightsMap.get(null!=(t=this.weight)?t:"regular")} + `}};c.weightsMap=new Map([["thin",(0,a.YP)``],["light",(0,a.YP)``],["regular",(0,a.YP)``],["bold",(0,a.YP)``],["fill",(0,a.YP)``],["duotone",(0,a.YP)``]]),c.styles=(0,s.iv)` + :host { + display: contents; + } + `,n([(0,o.C)({type:String,reflect:!0})],c.prototype,"size",2),n([(0,o.C)({type:String,reflect:!0})],c.prototype,"weight",2),n([(0,o.C)({type:String,reflect:!0})],c.prototype,"color",2),n([(0,o.C)({type:Boolean,reflect:!0})],c.prototype,"mirrored",2),c=n([(0,i.M)("ph-check")],c)}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/5988.23cfd2cfcc8815ae.js b/frontend/.next/static/chunks/5988.23cfd2cfcc8815ae.js new file mode 100644 index 0000000..dc3162f --- /dev/null +++ b/frontend/.next/static/chunks/5988.23cfd2cfcc8815ae.js @@ -0,0 +1,14 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5988],{65988:function(t,e,r){r.r(e),r.d(e,{PhEnvelope:function(){return Z}}),r(31498);var a=r(38157),o=r(48567),i=r(54910),l=r(69709),s=r(78313),h=Object.defineProperty,p=Object.getOwnPropertyDescriptor,n=(t,e,r,a)=>{for(var o,i=a>1?void 0:a?p(e,r):e,l=t.length-1;l>=0;l--)(o=t[l])&&(i=(a?o(e,r,i):o(i))||i);return a&&i&&h(e,r,i),i};let Z=class extends o.oi{constructor(){super(...arguments),this.size="1em",this.weight="regular",this.color="currentColor",this.mirrored=!1}render(){var t;return(0,a.dy)` + ${Z.weightsMap.get(null!=(t=this.weight)?t:"regular")} + `}};Z.weightsMap=new Map([["thin",(0,a.YP)``],["light",(0,a.YP)``],["regular",(0,a.YP)``],["bold",(0,a.YP)``],["fill",(0,a.YP)``],["duotone",(0,a.YP)``]]),Z.styles=(0,s.iv)` + :host { + display: contents; + } + `,n([(0,l.C)({type:String,reflect:!0})],Z.prototype,"size",2),n([(0,l.C)({type:String,reflect:!0})],Z.prototype,"weight",2),n([(0,l.C)({type:String,reflect:!0})],Z.prototype,"color",2),n([(0,l.C)({type:Boolean,reflect:!0})],Z.prototype,"mirrored",2),Z=n([(0,i.M)("ph-envelope")],Z)}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/6130-70b00f422f028783.js b/frontend/.next/static/chunks/6130-70b00f422f028783.js new file mode 100644 index 0000000..7b015a7 --- /dev/null +++ b/frontend/.next/static/chunks/6130-70b00f422f028783.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6130],{12809:function(t,e,n){n.d(e,{CH:function(){return e8}});var r=n(35157),i=n(69781);let a={};function s(t,e){let n=!1;return e<0&&(n=!0,e*=-1),new u(a,`${n?"":"u"}int${e}`,t,{signed:n,width:e})}function o(t,e){return new u(a,`bytes${e||""}`,t,{size:e})}let l=Symbol.for("_ethers_typed");class u{type;value;#t;_typedSymbol;constructor(t,e,n,s){null==s&&(s=null),(0,r.NK)(a,t,"Typed"),(0,i.h)(this,{_typedSymbol:l,type:e,value:n}),this.#t=s,this.format()}format(){if("array"===this.type||"dynamicArray"===this.type)throw Error("");return"tuple"===this.type?`tuple(${this.value.map(t=>t.format()).join(",")})`:this.type}defaultValue(){return 0}minValue(){return 0}maxValue(){return 0}isBigInt(){return!!this.type.match(/^u?int[0-9]+$/)}isData(){return this.type.startsWith("bytes")}isString(){return"string"===this.type}get tupleName(){if("tuple"!==this.type)throw TypeError("not a tuple");return this.#t}get arrayLength(){if("array"!==this.type)throw TypeError("not an array");return!0===this.#t?-1:!1===this.#t?this.value.length:null}static from(t,e){return new u(a,t,e)}static uint8(t){return s(t,8)}static uint16(t){return s(t,16)}static uint24(t){return s(t,24)}static uint32(t){return s(t,32)}static uint40(t){return s(t,40)}static uint48(t){return s(t,48)}static uint56(t){return s(t,56)}static uint64(t){return s(t,64)}static uint72(t){return s(t,72)}static uint80(t){return s(t,80)}static uint88(t){return s(t,88)}static uint96(t){return s(t,96)}static uint104(t){return s(t,104)}static uint112(t){return s(t,112)}static uint120(t){return s(t,120)}static uint128(t){return s(t,128)}static uint136(t){return s(t,136)}static uint144(t){return s(t,144)}static uint152(t){return s(t,152)}static uint160(t){return s(t,160)}static uint168(t){return s(t,168)}static uint176(t){return s(t,176)}static uint184(t){return s(t,184)}static uint192(t){return s(t,192)}static uint200(t){return s(t,200)}static uint208(t){return s(t,208)}static uint216(t){return s(t,216)}static uint224(t){return s(t,224)}static uint232(t){return s(t,232)}static uint240(t){return s(t,240)}static uint248(t){return s(t,248)}static uint256(t){return s(t,256)}static uint(t){return s(t,256)}static int8(t){return s(t,-8)}static int16(t){return s(t,-16)}static int24(t){return s(t,-24)}static int32(t){return s(t,-32)}static int40(t){return s(t,-40)}static int48(t){return s(t,-48)}static int56(t){return s(t,-56)}static int64(t){return s(t,-64)}static int72(t){return s(t,-72)}static int80(t){return s(t,-80)}static int88(t){return s(t,-88)}static int96(t){return s(t,-96)}static int104(t){return s(t,-104)}static int112(t){return s(t,-112)}static int120(t){return s(t,-120)}static int128(t){return s(t,-128)}static int136(t){return s(t,-136)}static int144(t){return s(t,-144)}static int152(t){return s(t,-152)}static int160(t){return s(t,-160)}static int168(t){return s(t,-168)}static int176(t){return s(t,-176)}static int184(t){return s(t,-184)}static int192(t){return s(t,-192)}static int200(t){return s(t,-200)}static int208(t){return s(t,-208)}static int216(t){return s(t,-216)}static int224(t){return s(t,-224)}static int232(t){return s(t,-232)}static int240(t){return s(t,-240)}static int248(t){return s(t,-248)}static int256(t){return s(t,-256)}static int(t){return s(t,-256)}static bytes1(t){return o(t,1)}static bytes2(t){return o(t,2)}static bytes3(t){return o(t,3)}static bytes4(t){return o(t,4)}static bytes5(t){return o(t,5)}static bytes6(t){return o(t,6)}static bytes7(t){return o(t,7)}static bytes8(t){return o(t,8)}static bytes9(t){return o(t,9)}static bytes10(t){return o(t,10)}static bytes11(t){return o(t,11)}static bytes12(t){return o(t,12)}static bytes13(t){return o(t,13)}static bytes14(t){return o(t,14)}static bytes15(t){return o(t,15)}static bytes16(t){return o(t,16)}static bytes17(t){return o(t,17)}static bytes18(t){return o(t,18)}static bytes19(t){return o(t,19)}static bytes20(t){return o(t,20)}static bytes21(t){return o(t,21)}static bytes22(t){return o(t,22)}static bytes23(t){return o(t,23)}static bytes24(t){return o(t,24)}static bytes25(t){return o(t,25)}static bytes26(t){return o(t,26)}static bytes27(t){return o(t,27)}static bytes28(t){return o(t,28)}static bytes29(t){return o(t,29)}static bytes30(t){return o(t,30)}static bytes31(t){return o(t,31)}static bytes32(t){return o(t,32)}static address(t){return new u(a,"address",t)}static bool(t){return new u(a,"bool",!!t)}static bytes(t){return new u(a,"bytes",t)}static string(t){return new u(a,"string",t)}static array(t,e){throw Error("not implemented yet")}static tuple(t,e){throw Error("not implemented yet")}static overrides(t){return new u(a,"overrides",Object.assign({},t))}static isTyped(t){return t&&"object"==typeof t&&"_typedSymbol"in t&&t._typedSymbol===l}static dereference(t,e){if(u.isTyped(t)){if(t.type!==e)throw Error(`invalid type: expecetd ${e}, got ${t.type}`);return t.value}return t}}function c(t){if(!Number.isSafeInteger(t)||t<0)throw Error(`Wrong positive integer: ${t}`)}function h(t,...e){if(!(t instanceof Uint8Array))throw Error("Expected Uint8Array");if(e.length>0&&!e.includes(t.length))throw Error(`Expected Uint8Array of length ${e}, not of length=${t.length}`)}function f(t,e=!0){if(t.destroyed)throw Error("Hash instance has been destroyed");if(e&&t.finished)throw Error("Hash#digest() has already been called")}let d=BigInt(4294967296-1),p=BigInt(32),g=(t,e,n)=>t<>>32-n,m=(t,e,n)=>e<>>32-n,y=(t,e,n)=>e<>>64-n,b=(t,e,n)=>t<>>64-n,w=t=>t instanceof Uint8Array,v=t=>new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4));if(68!==new Uint8Array(new Uint32Array([287454020]).buffer)[0])throw Error("Non little-endian hardware is not supported");function E(t){if("string"==typeof t&&(t=function(t){if("string"!=typeof t)throw Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}(t)),!w(t))throw Error(`expected Uint8Array, got ${typeof t}`);return t}class N{clone(){return this._cloneInto()}}let[T,x,O]=[[],[],[]],k=BigInt(0),A=BigInt(1),R=BigInt(2),P=BigInt(7),I=BigInt(256),_=BigInt(113);for(let t=0,e=A,n=1,r=0;t<24;t++){[n,r]=[r,(2*n+3*r)%5],T.push(2*(5*r+n)),x.push((t+1)*(t+2)/2%64);let i=k;for(let t=0;t<7;t++)(e=(e<>P)*_)%I)&R&&(i^=A<<(A<>p&d)}:{h:0|Number(t>>p&d),l:0|Number(t&d)}}(t[i],e);[n[i],r[i]]=[a,s]}return[n,r]}(O,!0),S=(t,e,n)=>n>32?y(t,e,n):g(t,e,n),F=(t,e,n)=>n>32?b(t,e,n):m(t,e,n);class L extends N{constructor(t,e,n,r=!1,i=24){if(super(),this.blockLen=t,this.suffix=e,this.outputLen=n,this.enableXOF=r,this.rounds=i,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,c(n),0>=this.blockLen||this.blockLen>=200)throw Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=v(this.state)}keccak(){!function(t,e=24){let n=new Uint32Array(10);for(let r=24-e;r<24;r++){for(let e=0;e<10;e++)n[e]=t[e]^t[e+10]^t[e+20]^t[e+30]^t[e+40];for(let e=0;e<10;e+=2){let r=(e+8)%10,i=(e+2)%10,a=n[i],s=n[i+1],o=S(a,s,1)^n[r],l=F(a,s,1)^n[r+1];for(let n=0;n<50;n+=10)t[e+n]^=o,t[e+n+1]^=l}let e=t[2],i=t[3];for(let n=0;n<24;n++){let r=x[n],a=S(e,i,r),s=F(e,i,r),o=T[n];e=t[o],i=t[o+1],t[o]=a,t[o+1]=s}for(let e=0;e<50;e+=10){for(let r=0;r<10;r++)n[r]=t[e+r];for(let r=0;r<10;r++)t[e+r]^=~n[(r+2)%10]&n[(r+4)%10]}t[0]^=U[r],t[1]^=C[r]}n.fill(0)}(this.state32,this.rounds),this.posOut=0,this.pos=0}update(t){f(this);let{blockLen:e,state:n}=this,r=(t=E(t)).length;for(let i=0;i=n&&this.keccak();let a=Math.min(n-this.posOut,i-r);t.set(e.subarray(this.posOut,this.posOut+a),r),this.posOut+=a,r+=a}return t}xofInto(t){if(!this.enableXOF)throw Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return c(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(!function(t,e){h(t);let n=e.outputLen;if(t.lengtht().update(E(e)).digest(),n=t();return e.outputLen=n.outputLen,e.blockLen=n.blockLen,e.create=()=>t(),e}(()=>new L(136,1,32));var j=n(59369);let D=!1,$=function(t){return B(t)},M=$;function V(t){let e=(0,j.Pw)(t,"data");return(0,j.Dv)(M(e))}V._=$,V.lock=function(){D=!0},V.register=function(t){if(D)throw TypeError("keccak256 is locked");M=t},Object.freeze(V);var z=n(9478);function G(t){return V((0,z.Y0)(t))}var H=n(45474);let q=new Uint8Array(32),J=["then"],K={},W=new WeakMap;function Z(t){return W.get(t)}function Y(t,e){let n=Error(`deferred error during ABI decoding triggered accessing ${t}`);throw n.error=e,n}class X extends Array{#e;constructor(...t){var e,n;let r=t[0],i=t[1],a=(t[2]||[]).slice(),s=!0;r!==K&&(i=t,a=[],s=!1),super(i.length),i.forEach((t,e)=>{this[e]=t});let o=a.reduce((t,e)=>("string"==typeof e&&t.set(e,(t.get(e)||0)+1),t),new Map);if(e=Object.freeze(i.map((t,e)=>{let n=a[e];return null!=n&&1===o.get(n)?n:null})),W.set(this,e),this.#e=[],null==this.#e&&this.#e,!s)return;Object.freeze(this);let l=new Proxy(this,{get:(t,e,n)=>{if("string"==typeof e){if(e.match(/^[0-9]+$/)){let n=(0,H.Dx)(e,"%index");if(n<0||n>=this.length)throw RangeError("out of result range");let r=t[n];return r instanceof Error&&Y(`index ${n}`,r),r}if(J.indexOf(e)>=0)return Reflect.get(t,e,n);let r=t[e];if(r instanceof Function)return function(...e){return r.apply(this===n?t:this,e)};if(!(e in t))return t.getValue.apply(this===n?t:this,[e])}return Reflect.get(t,e,n)}});return n=Z(this),W.set(l,n),l}toArray(t){let e=[];return this.forEach((n,r)=>{n instanceof Error&&Y(`index ${r}`,n),t&&n instanceof X&&(n=n.toArray(t)),e.push(n)}),e}toObject(t){let e=Z(this);return e.reduce((n,i,a)=>((0,r.hu)(null!=i,`value at index ${a} unnamed`,"UNSUPPORTED_OPERATION",{operation:"toObject()"}),function t(e,n,r){return e.indexOf(null)>=0?n.map((e,n)=>e instanceof X?t(Z(e),e,r):e):e.reduce((e,i,a)=>{let s=n.getValue(i);return i in e||(r&&s instanceof X&&(s=t(Z(s),s,r)),e[i]=s),e},{})}(e,this,t)),{})}slice(t,e){null==t&&(t=0),t<0&&(t+=this.length)<0&&(t=0),null==e&&(e=this.length),e<0&&(e+=this.length)<0&&(e=0),e>this.length&&(e=this.length);let n=Z(this),r=[],i=[];for(let a=t;a{this.#n[t]=Q(e)}}}class tn{allowLoose;#n;#a;#s;#o;#l;constructor(t,e,n){(0,i.h)(this,{allowLoose:!!e}),this.#n=(0,j.h_)(t),this.#s=0,this.#o=null,this.#l=null!=n?n:1024,this.#a=0}get data(){return(0,j.Dv)(this.#n)}get dataLength(){return this.#n.length}get consumed(){return this.#a}get bytes(){return new Uint8Array(this.#n)}#u(t){if(this.#o)return this.#o.#u(t);this.#s+=t,(0,r.hu)(this.#l<1||this.#s<=this.#l*this.dataLength,`compressed ABI data exceeds inflation ratio of ${this.#l} ( see: https://github.com/ethers-io/ethers.js/issues/4537 )`,"BUFFER_OVERRUN",{buffer:(0,j.h_)(this.#n),offset:this.#a,length:t,info:{bytesRead:this.#s,dataLength:this.dataLength}})}#c(t,e,n){let i=32*Math.ceil(e/32);return this.#a+i>this.#n.length&&(this.allowLoose&&n&&this.#a+e<=this.#n.length?i=e:(0,r.hu)(!1,"data out-of-bounds","BUFFER_OVERRUN",{buffer:(0,j.h_)(this.#n),length:this.#n.length,offset:this.#a+i})),this.#n.slice(this.#a,this.#a+i)}subReader(t){let e=new tn(this.#n.slice(this.#a+t),this.allowLoose,this.#l);return e.#o=this,e}readBytes(t,e){let n=this.#c(0,t,!!e);return this.#u(t),this.#a+=n.length,n.slice(0,t)}readValue(){return(0,H.Gh)(this.readBytes(32))}readIndex(){return(0,H.He)(this.readBytes(32))}}let tr=BigInt(0),ti=BigInt(36);function ta(t){let e=(t=t.toLowerCase()).substring(2).split(""),n=new Uint8Array(40);for(let t=0;t<40;t++)n[t]=e[t].charCodeAt(0);let r=(0,j.Pw)(V(n));for(let t=0;t<40;t+=2)r[t>>1]>>4>=8&&(e[t]=e[t].toUpperCase()),(15&r[t>>1])>=8&&(e[t+1]=e[t+1].toUpperCase());return"0x"+e.join("")}let ts={};for(let t=0;t<10;t++)ts[String(t)]=String(t);for(let t=0;t<26;t++)ts[String.fromCharCode(65+t)]=String(10+t);let to=function(){let t={};for(let e=0;e<36;e++)t["0123456789abcdefghijklmnopqrstuvwxyz"[e]]=BigInt(e);return t}();function tl(t){if((0,r.en)("string"==typeof t,"invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/)){t.startsWith("0x")||(t="0x"+t);let e=ta(t);return(0,r.en)(!t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)||e===t,"bad address checksum","address",t),e}if(t.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){(0,r.en)(t.substring(2,4)===function(t){let e=(t=(t=t.toUpperCase()).substring(4)+t.substring(0,2)+"00").split("").map(t=>ts[t]).join("");for(;e.length>=15;){let t=e.substring(0,15);e=parseInt(t,10)%97+e.substring(t.length)}let n=String(98-parseInt(e,10)%97);for(;n.length<2;)n="0"+n;return n}(t),"bad icap checksum","address",t);let e=(function(t){t=t.toLowerCase();let e=tr;for(let n=0;n{let i=e.localName;return(0,r.hu)(i,"cannot encode object for signature with missing names","INVALID_ARGUMENT",{argument:"values",info:{coder:e},value:n}),(0,r.hu)(!t[i],"cannot encode object for signature with duplicate names","INVALID_ARGUMENT",{argument:"values",info:{coder:e},value:n}),t[i]=!0,n[i]})}else(0,r.en)(!1,"invalid tuple value","tuple",n);(0,r.en)(e.length===i.length,"types/value length mismatch","tuple",n);let a=new te,s=new te,o=[];return e.forEach((t,e)=>{let n=i[e];if(t.dynamic){let e=s.length;t.encode(s,n);let r=a.writeUpdatableValue();o.push(t=>{r(t+e)})}else t.encode(a,n)}),o.forEach(t=>{t(a.length)}),t.appendWriter(a)+t.appendWriter(s)}function tf(t,e){let n=[],i=[],a=t.subReader(0);return e.forEach(e=>{let s=null;if(e.dynamic){let n=t.readIndex(),i=a.subReader(n);try{s=e.decode(i)}catch(t){if((0,r.VZ)(t,"BUFFER_OVERRUN"))throw t;(s=t).baseType=e.name,s.name=e.localName,s.type=e.type}}else try{s=e.decode(t)}catch(t){if((0,r.VZ)(t,"BUFFER_OVERRUN"))throw t;(s=t).baseType=e.name,s.name=e.localName,s.type=e.type}if(void 0==s)throw Error("investigate");n.push(s),i.push(e.localName||null)}),X.fromItems(n,i)}class td extends tt{coder;length;constructor(t,e,n){super("array",t.type+"["+(e>=0?e:"")+"]",n,-1===e||t.dynamic),(0,i.h)(this,{coder:t,length:e})}defaultValue(){let t=this.coder.defaultValue(),e=[];for(let n=0;nt||n<-(t+tE))&&this._throwError("value out-of-bounds",e),n=(0,H.$j)(n,256)}else(n(0,H.sS)(r,8*this.size))&&this._throwError("value out-of-bounds",e);return t.writeValue(n)}decode(t){let e=(0,H.sS)(t.readValue(),8*this.size);return this.signed&&(e=(0,H._Y)(e,8*this.size)),e}}class tx extends tg{constructor(t){super("string",t)}defaultValue(){return""}encode(t,e){return super.encode(t,(0,z.Y0)(u.dereference(e,"string")))}decode(t){return(0,z.ZN)(super.decode(t))}}class tO extends tt{coders;constructor(t,e){let n=!1,r=[];t.forEach(t=>{t.dynamic&&(n=!0),r.push(t.type)}),super("tuple","tuple("+r.join(",")+")",e,n),(0,i.h)(this,{coders:Object.freeze(t.slice())})}defaultValue(){let t=[];this.coders.forEach(e=>{t.push(e.defaultValue())});let e=this.coders.reduce((t,e)=>{let n=e.localName;return n&&(t[n]||(t[n]=0),t[n]++),t},{});return this.coders.forEach((n,r)=>{let i=n.localName;i&&1===e[i]&&("length"===i&&(i="_length"),null==t[i]&&(t[i]=t[r]))}),Object.freeze(t)}encode(t,e){let n=u.dereference(e,"tuple");return th(t,this.coders,n)}decode(t){return tf(t,this.coders)}}function tk(t){let e=new Set;return t.forEach(t=>e.add(t)),Object.freeze(e)}let tA=tk("external public payable override".split(" ")),tR="constant external internal payable private public pure view override",tP=tk(tR.split(" ")),tI="constructor error event fallback function receive struct",t_=tk(tI.split(" ")),tU="calldata memory storage payable indexed",tC=tk(tU.split(" ")),tS=tk([tI,tU,"tuple returns",tR].join(" ").split(" ")),tF={"(":"OPEN_PAREN",")":"CLOSE_PAREN","[":"OPEN_BRACKET","]":"CLOSE_BRACKET",",":"COMMA","@":"AT"},tL=RegExp("^(\\s*)"),tB=RegExp("^([0-9]+)"),tj=RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)"),tD=RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)$"),t$=RegExp("^(address|bool|bytes([0-9]*)|string|u?int([0-9]*))$");class tM{#a;#h;get offset(){return this.#a}get length(){return this.#h.length-this.#a}constructor(t){this.#a=0,this.#h=t.slice()}clone(){return new tM(this.#h)}reset(){this.#a=0}#f(t=0,e=0){return new tM(this.#h.slice(t,e).map(e=>Object.freeze(Object.assign({},e,{match:e.match-t,linkBack:e.linkBack-t,linkNext:e.linkNext-t}))))}popKeyword(t){let e=this.peek();if("KEYWORD"!==e.type||!t.has(e.text))throw Error(`expected keyword ${e.text}`);return this.pop().text}popType(t){if(this.peek().type!==t){let e=this.peek();throw Error(`expected ${t}; got ${e.type} ${JSON.stringify(e.text)}`)}return this.pop().text}popParen(){let t=this.peek();if("OPEN_PAREN"!==t.type)throw Error("bad start");let e=this.#f(this.#a+1,t.match+1);return this.#a=t.match+1,e}popParams(){let t=this.peek();if("OPEN_PAREN"!==t.type)throw Error("bad start");let e=[];for(;this.#a=this.#h.length)throw Error("out-of-bounds");return this.#h[this.#a]}peekKeyword(t){let e=this.peekType("KEYWORD");return null!=e&&t.has(e)?e:null}peekType(t){if(0===this.length)return null;let e=this.peek();return e.type===t?e.text:null}pop(){let t=this.peek();return this.#a++,t}toString(){let t=[];for(let e=this.#a;e`}}function tV(t){let e=[],n=e=>{let n=a0&&"NUMBER"===e[e.length-1].type){let n=e.pop().text;t=n+t,e[e.length-1].value=(0,H.Dx)(n)}if(0===e.length||"BRACKET"!==e[e.length-1].type)throw Error("missing opening bracket");e[e.length-1].text+=t}continue}if(o=s.match(tj)){if(l.text=o[1],a+=l.text.length,tS.has(l.text)){l.type="KEYWORD";continue}if(l.text.match(t$)){l.type="TYPE";continue}l.type="ID";continue}if(o=s.match(tB)){l.text=o[1],l.type="NUMBER",a+=l.text.length;continue}throw Error(`unexpected token ${JSON.stringify(s[0])} at position ${a}`)}return new tM(e.map(t=>Object.freeze(t)))}function tz(t,e){let n=[];for(let r in e.keys())t.has(r)&&n.push(r);if(n.length>1)throw Error(`conflicting types: ${n.join(", ")}`)}function tG(t,e){if(e.peekKeyword(t_)){let n=e.pop().text;if(n!==t)throw Error(`expected ${t}, got ${n}`)}return e.popType("ID")}function tH(t,e){let n=new Set;for(;;){let r=t.peekType("KEYWORD");if(null==r||e&&!e.has(r))break;if(t.pop(),n.has(r))throw Error(`duplicate keywords: ${JSON.stringify(r)}`);n.add(r)}return Object.freeze(n)}function tq(t){let e=tH(t,tP);return(tz(e,tk("constant payable nonpayable".split(" "))),tz(e,tk("pure view payable nonpayable".split(" "))),e.has("view"))?"view":e.has("pure")?"pure":e.has("payable")?"payable":e.has("nonpayable")?"nonpayable":e.has("constant")?"view":"nonpayable"}function tJ(t,e){return t.popParams().map(t=>t8.from(t,e))}function tK(t){if(t.peekType("AT")){if(t.pop(),t.peekType("NUMBER"))return(0,H.yT)(t.pop().text);throw Error("invalid gas")}return null}function tW(t){if(t.length)throw Error(`unexpected tokens at offset ${t.offset}: ${t.toString()}`)}let tZ=new RegExp(/^(.*)\[([0-9]*)\]$/);function tY(t){let e=t.match(t$);if((0,r.en)(e,"invalid type","type",t),"uint"===t)return"uint256";if("int"===t)return"int256";if(e[2]){let n=parseInt(e[2]);(0,r.en)(0!==n&&n<=32,"invalid bytes length","type",t)}else if(e[3]){let n=parseInt(e[3]);(0,r.en)(0!==n&&n<=256&&n%8==0,"invalid numeric width","type",t)}return t}let tX={},tQ=Symbol.for("_ethers_internal"),t0="_ParamTypeInternal",t1="_ErrorInternal",t2="_EventInternal",t4="_ConstructorInternal",t3="_FallbackInternal",t5="_FunctionInternal",t6="_StructInternal";class t8{name;type;baseType;indexed;components;arrayLength;arrayChildren;constructor(t,e,n,a,s,o,l,u){if((0,r.NK)(t,tX,"ParamType"),Object.defineProperty(this,tQ,{value:t0}),o&&(o=Object.freeze(o.slice())),"array"===a){if(null==l||null==u)throw Error("")}else if(null!=l||null!=u)throw Error("");if("tuple"===a){if(null==o)throw Error("")}else if(null!=o)throw Error("");(0,i.h)(this,{name:e,type:n,baseType:a,indexed:s,components:o,arrayLength:l,arrayChildren:u})}format(t){if(null==t&&(t="sighash"),"json"===t){let e=this.name||"";if(this.isArray()){let t=JSON.parse(this.arrayChildren.format("json"));return t.name=e,t.type+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`,JSON.stringify(t)}let n={type:"tuple"===this.baseType?"tuple":this.type,name:e};return"boolean"==typeof this.indexed&&(n.indexed=this.indexed),this.isTuple()&&(n.components=this.components.map(e=>JSON.parse(e.format(t)))),JSON.stringify(n)}let e="";return this.isArray()?e+=this.arrayChildren.format(t)+`[${this.arrayLength<0?"":String(this.arrayLength)}]`:this.isTuple()?e+="("+this.components.map(e=>e.format(t)).join("full"===t?", ":",")+")":e+=this.type,"sighash"!==t&&(!0===this.indexed&&(e+=" indexed"),"full"===t&&this.name&&(e+=" "+this.name)),e}isArray(){return"array"===this.baseType}isTuple(){return"tuple"===this.baseType}isIndexable(){return null!=this.indexed}walk(t,e){if(this.isArray()){if(!Array.isArray(t))throw Error("invalid array value");if(-1!==this.arrayLength&&t.length!==this.arrayLength)throw Error("array is wrong length");let n=this;return t.map(t=>n.arrayChildren.walk(t,e))}if(this.isTuple()){if(!Array.isArray(t))throw Error("invalid tuple value");if(t.length!==this.components.length)throw Error("array is wrong length");let n=this;return t.map((t,r)=>n.components[r].walk(t,e))}return e(this.type,t)}#d(t,e,n,r){if(this.isArray()){if(!Array.isArray(e))throw Error("invalid array value");if(-1!==this.arrayLength&&e.length!==this.arrayLength)throw Error("array is wrong length");let i=this.arrayChildren,a=e.slice();a.forEach((e,r)=>{i.#d(t,e,n,t=>{a[r]=t})}),r(a);return}if(this.isTuple()){let i;let a=this.components;if(Array.isArray(e))i=e.slice();else{if(null==e||"object"!=typeof e)throw Error("invalid tuple value");i=a.map(t=>{if(!t.name)throw Error("cannot use object value with unnamed components");if(!(t.name in e))throw Error(`missing value for component ${t.name}`);return e[t.name]})}if(i.length!==this.components.length)throw Error("array is wrong length");i.forEach((e,r)=>{a[r].#d(t,e,n,t=>{i[r]=t})}),r(i);return}let i=n(this.type,e);i.then?t.push(async function(){r(await i)}()):r(i)}async walkAsync(t,e){let n=[],r=[t];return this.#d(n,t,e,t=>{r[0]=t}),n.length&&await Promise.all(n),r[0]}static from(t,e){if(t8.isParamType(t))return t;if("string"==typeof t)try{return t8.from(tV(t),e)}catch(e){(0,r.en)(!1,"invalid param type","obj",t)}else if(t instanceof tM){let n="",r="",i=null;tH(t,tk(["tuple"])).has("tuple")||t.peekType("OPEN_PAREN")?(r="tuple",i=t.popParams().map(t=>t8.from(t)),n=`tuple(${i.map(t=>t.format()).join(",")})`):r=n=tY(t.popType("TYPE"));let a=null,s=null;for(;t.length&&t.peekType("BRACKET");){let e=t.pop();a=new t8(tX,"",n,r,null,i,s,a),s=e.value,n+=e.text,r="array",i=null}let o=null;if(tH(t,tC).has("indexed")){if(!e)throw Error("");o=!0}let l=t.peekType("ID")?t.pop().text:"";if(t.length)throw Error("leftover tokens");return new t8(tX,l,n,r,o,i,s,a)}let n=t.name;(0,r.en)(!n||"string"==typeof n&&n.match(tD),"invalid name","obj.name",n);let i=t.indexed;null!=i&&((0,r.en)(e,"parameter cannot be indexed","obj.indexed",t.indexed),i=!!i);let a=t.type,s=a.match(tZ);if(s){let e=parseInt(s[2]||"-1"),r=t8.from({type:s[1],components:t.components});return new t8(tX,n||"",a,"array",i,null,e,r)}if("tuple"===a||a.startsWith("tuple(")||a.startsWith("(")){let e=null!=t.components?t.components.map(t=>t8.from(t)):null;return new t8(tX,n||"",a,"tuple",i,e,null,null)}return new t8(tX,n||"",a=tY(t.type),a,i,null,null,null)}static isParamType(t){return t&&t[tQ]===t0}}class t9{type;inputs;constructor(t,e,n){(0,r.NK)(t,tX,"Fragment"),n=Object.freeze(n.slice()),(0,i.h)(this,{type:e,inputs:n})}static from(t){if("string"==typeof t){try{t9.from(JSON.parse(t))}catch(t){}return t9.from(tV(t))}if(t instanceof tM)switch(t.peekKeyword(t_)){case"constructor":return er.from(t);case"error":return ee.from(t);case"event":return en.from(t);case"fallback":case"receive":return ei.from(t);case"function":return ea.from(t);case"struct":return es.from(t)}else if("object"==typeof t){switch(t.type){case"constructor":return er.from(t);case"error":return ee.from(t);case"event":return en.from(t);case"fallback":case"receive":return ei.from(t);case"function":return ea.from(t);case"struct":return es.from(t)}(0,r.hu)(!1,`unsupported type: ${t.type}`,"UNSUPPORTED_OPERATION",{operation:"Fragment.from"})}(0,r.en)(!1,"unsupported frgament object","obj",t)}static isConstructor(t){return er.isFragment(t)}static isError(t){return ee.isFragment(t)}static isEvent(t){return en.isFragment(t)}static isFunction(t){return ea.isFragment(t)}static isStruct(t){return es.isFragment(t)}}class t7 extends t9{name;constructor(t,e,n,a){super(t,e,a),(0,r.en)("string"==typeof n&&n.match(tD),"invalid identifier","name",n),a=Object.freeze(a.slice()),(0,i.h)(this,{name:n})}}function et(t,e){return"("+e.map(e=>e.format(t)).join("full"===t?", ":",")+")"}class ee extends t7{constructor(t,e,n){super(t,"error",e,n),Object.defineProperty(this,tQ,{value:t1})}get selector(){return G(this.format("sighash")).substring(0,10)}format(t){if(null==t&&(t="sighash"),"json"===t)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(e=>JSON.parse(e.format(t)))});let e=[];return"sighash"!==t&&e.push("error"),e.push(this.name+et(t,this.inputs)),e.join(" ")}static from(t){if(ee.isFragment(t))return t;if("string"==typeof t)return ee.from(tV(t));if(t instanceof tM){let e=tG("error",t),n=tJ(t);return tW(t),new ee(tX,e,n)}return new ee(tX,t.name,t.inputs?t.inputs.map(t8.from):[])}static isFragment(t){return t&&t[tQ]===t1}}class en extends t7{anonymous;constructor(t,e,n,r){super(t,"event",e,n),Object.defineProperty(this,tQ,{value:t2}),(0,i.h)(this,{anonymous:r})}get topicHash(){return G(this.format("sighash"))}format(t){if(null==t&&(t="sighash"),"json"===t)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(e=>JSON.parse(e.format(t)))});let e=[];return"sighash"!==t&&e.push("event"),e.push(this.name+et(t,this.inputs)),"sighash"!==t&&this.anonymous&&e.push("anonymous"),e.join(" ")}static getTopicHash(t,e){return new en(tX,t,e=(e||[]).map(t=>t8.from(t)),!1).topicHash}static from(t){if(en.isFragment(t))return t;if("string"==typeof t)try{return en.from(tV(t))}catch(e){(0,r.en)(!1,"invalid event fragment","obj",t)}else if(t instanceof tM){let e=tG("event",t),n=tJ(t,!0),r=!!tH(t,tk(["anonymous"])).has("anonymous");return tW(t),new en(tX,e,n,r)}return new en(tX,t.name,t.inputs?t.inputs.map(t=>t8.from(t,!0)):[],!!t.anonymous)}static isFragment(t){return t&&t[tQ]===t2}}class er extends t9{payable;gas;constructor(t,e,n,r,a){super(t,e,n),Object.defineProperty(this,tQ,{value:t4}),(0,i.h)(this,{payable:r,gas:a})}format(t){if((0,r.hu)(null!=t&&"sighash"!==t,"cannot format a constructor for sighash","UNSUPPORTED_OPERATION",{operation:"format(sighash)"}),"json"===t)return JSON.stringify({type:"constructor",stateMutability:this.payable?"payable":"undefined",payable:this.payable,gas:null!=this.gas?this.gas:void 0,inputs:this.inputs.map(e=>JSON.parse(e.format(t)))});let e=[`constructor${et(t,this.inputs)}`];return this.payable&&e.push("payable"),null!=this.gas&&e.push(`@${this.gas.toString()}`),e.join(" ")}static from(t){if(er.isFragment(t))return t;if("string"==typeof t)try{return er.from(tV(t))}catch(e){(0,r.en)(!1,"invalid constuctor fragment","obj",t)}else if(t instanceof tM){tH(t,tk(["constructor"]));let e=tJ(t),n=!!tH(t,tA).has("payable"),r=tK(t);return tW(t),new er(tX,"constructor",e,n,r)}return new er(tX,"constructor",t.inputs?t.inputs.map(t8.from):[],!!t.payable,null!=t.gas?t.gas:null)}static isFragment(t){return t&&t[tQ]===t4}}class ei extends t9{payable;constructor(t,e,n){super(t,"fallback",e),Object.defineProperty(this,tQ,{value:t3}),(0,i.h)(this,{payable:n})}format(t){let e=0===this.inputs.length?"receive":"fallback";return"json"===t?JSON.stringify({type:e,stateMutability:this.payable?"payable":"nonpayable"}):`${e}()${this.payable?" payable":""}`}static from(t){if(ei.isFragment(t))return t;if("string"==typeof t)try{return ei.from(tV(t))}catch(e){(0,r.en)(!1,"invalid fallback fragment","obj",t)}else if(t instanceof tM){let e=t.toString(),n=t.peekKeyword(tk(["fallback","receive"]));if((0,r.en)(n,"type must be fallback or receive","obj",e),"receive"===t.popKeyword(tk(["fallback","receive"]))){let e=tJ(t);return(0,r.en)(0===e.length,"receive cannot have arguments","obj.inputs",e),tH(t,tk(["payable"])),tW(t),new ei(tX,[],!0)}let i=tJ(t);i.length?(0,r.en)(1===i.length&&"bytes"===i[0].type,"invalid fallback inputs","obj.inputs",i.map(t=>t.format("minimal")).join(", ")):i=[t8.from("bytes")];let a=tq(t);if((0,r.en)("nonpayable"===a||"payable"===a,"fallback cannot be constants","obj.stateMutability",a),tH(t,tk(["returns"])).has("returns")){let e=tJ(t);(0,r.en)(1===e.length&&"bytes"===e[0].type,"invalid fallback outputs","obj.outputs",e.map(t=>t.format("minimal")).join(", "))}return tW(t),new ei(tX,i,"payable"===a)}return"receive"===t.type?new ei(tX,[],!0):"fallback"===t.type?new ei(tX,[t8.from("bytes")],"payable"===t.stateMutability):void(0,r.en)(!1,"invalid fallback description","obj",t)}static isFragment(t){return t&&t[tQ]===t3}}class ea extends t7{constant;outputs;stateMutability;payable;gas;constructor(t,e,n,r,a,s){super(t,"function",e,r),Object.defineProperty(this,tQ,{value:t5}),a=Object.freeze(a.slice()),(0,i.h)(this,{constant:"view"===n||"pure"===n,gas:s,outputs:a,payable:"payable"===n,stateMutability:n})}get selector(){return G(this.format("sighash")).substring(0,10)}format(t){if(null==t&&(t="sighash"),"json"===t)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:null!=this.gas?this.gas:void 0,inputs:this.inputs.map(e=>JSON.parse(e.format(t))),outputs:this.outputs.map(e=>JSON.parse(e.format(t)))});let e=[];return"sighash"!==t&&e.push("function"),e.push(this.name+et(t,this.inputs)),"sighash"!==t&&("nonpayable"!==this.stateMutability&&e.push(this.stateMutability),this.outputs&&this.outputs.length&&(e.push("returns"),e.push(et(t,this.outputs))),null!=this.gas&&e.push(`@${this.gas.toString()}`)),e.join(" ")}static getSelector(t,e){return new ea(tX,t,"view",e=(e||[]).map(t=>t8.from(t)),[],null).selector}static from(t){if(ea.isFragment(t))return t;if("string"==typeof t)try{return ea.from(tV(t))}catch(e){(0,r.en)(!1,"invalid function fragment","obj",t)}else if(t instanceof tM){let e=tG("function",t),n=tJ(t),r=tq(t),i=[];tH(t,tk(["returns"])).has("returns")&&(i=tJ(t));let a=tK(t);return tW(t),new ea(tX,e,r,n,i,a)}let e=t.stateMutability;return null!=e||(e="payable","boolean"==typeof t.constant?(e="view",t.constant||(e="payable","boolean"!=typeof t.payable||t.payable||(e="nonpayable"))):"boolean"!=typeof t.payable||t.payable||(e="nonpayable")),new ea(tX,t.name,e,t.inputs?t.inputs.map(t8.from):[],t.outputs?t.outputs.map(t8.from):[],null!=t.gas?t.gas:null)}static isFragment(t){return t&&t[tQ]===t5}}class es extends t7{constructor(t,e,n){super(t,"struct",e,n),Object.defineProperty(this,tQ,{value:t6})}format(){throw Error("@TODO")}static from(t){if("string"==typeof t)try{return es.from(tV(t))}catch(e){(0,r.en)(!1,"invalid struct fragment","obj",t)}else if(t instanceof tM){let e=tG("struct",t),n=tJ(t);return tW(t),new es(tX,e,n)}return new es(tX,t.name,t.inputs?t.inputs.map(t8.from):[])}static isFragment(t){return t&&t[tQ]===t6}}let eo=new Map;eo.set(0,"GENERIC_PANIC"),eo.set(1,"ASSERT_FALSE"),eo.set(17,"OVERFLOW"),eo.set(18,"DIVIDE_BY_ZERO"),eo.set(33,"ENUM_RANGE_ERROR"),eo.set(34,"BAD_STORAGE_DATA"),eo.set(49,"STACK_UNDERFLOW"),eo.set(50,"ARRAY_RANGE_ERROR"),eo.set(65,"OUT_OF_MEMORY"),eo.set(81,"UNINITIALIZED_FUNCTION_CALL");let el=new RegExp(/^bytes([0-9]*)$/),eu=new RegExp(/^(u?int)([0-9]*)$/),ec=null,eh=1024;class ef{#p(t){if(t.isArray())return new td(this.#p(t.arrayChildren),t.arrayLength,t.name);if(t.isTuple())return new tO(t.components.map(t=>this.#p(t)),t.name);switch(t.baseType){case"address":return new tu(t.name);case"bool":return new tp(t.name);case"string":return new tx(t.name);case"bytes":return new tm(t.name);case"":return new tw(t.name)}let e=t.type.match(eu);if(e){let n=parseInt(e[2]||"256");return(0,r.en)(0!==n&&n<=256&&n%8==0,"invalid "+e[1]+" bit length","param",t),new tT(n/8,"int"===e[1],t.name)}if(e=t.type.match(el)){let n=parseInt(e[1]);return(0,r.en)(0!==n&&n<=32,"invalid bytes length","param",t),new ty(n,t.name)}(0,r.en)(!1,"invalid type","type",t.type)}getDefaultValue(t){return new tO(t.map(t=>this.#p(t8.from(t))),"_").defaultValue()}encode(t,e){(0,r.fG)(e.length,t.length,"types/values length mismatch");let n=new tO(t.map(t=>this.#p(t8.from(t))),"_"),i=new te;return n.encode(i,e),i.data}decode(t,e,n){return new tO(t.map(t=>this.#p(t8.from(t))),"_").decode(new tn(e,n,eh))}static _setDefaultMaxInflation(t){(0,r.en)("number"==typeof t&&Number.isInteger(t),"invalid defaultMaxInflation factor","value",t),eh=t}static defaultAbiCoder(){return null==ec&&(ec=new ef),ec}static getBuiltinCallException(t,e,n){return function(t,e,n,i){let a="missing revert data",s=null,o=null;if(n){a="execution reverted";let t=(0,j.Pw)(n);if(n=(0,j.Dv)(n),0===t.length)a+=" (no data present; likely require(false) occurred",s="require(false)";else if(t.length%32!=4)a+=" (could not decode reason; invalid data length)";else if("0x08c379a0"===(0,j.Dv)(t.slice(0,4)))try{s=i.decode(["string"],t.slice(4))[0],o={signature:"Error(string)",name:"Error",args:[s]},a+=`: ${JSON.stringify(s)}`}catch(t){a+=" (could not decode reason; invalid string data)"}else if("0x4e487b71"===(0,j.Dv)(t.slice(0,4)))try{let e=Number(i.decode(["uint256"],t.slice(4))[0]);o={signature:"Panic(uint256)",name:"Panic",args:[e]},s=`Panic due to ${eo.get(e)||"UNKNOWN"}(${e})`,a+=`: ${s}`}catch(t){a+=" (could not decode panic code)"}else a+=" (unknown custom error)"}let l={to:e.to?tl(e.to):null,data:e.data||"0x"};return e.from&&(l.from=tl(e.from)),(0,r.wf)(a,"CALL_EXCEPTION",{action:t,data:n,reason:s,transaction:l,invocation:null,revert:o})}(t,e,n,ef.defaultAbiCoder())}}class ed{fragment;name;signature;topic;args;constructor(t,e,n){let r=t.name,a=t.format();(0,i.h)(this,{fragment:t,name:r,signature:a,topic:e,args:n})}}class ep{fragment;name;args;signature;selector;value;constructor(t,e,n,r){let a=t.name,s=t.format();(0,i.h)(this,{fragment:t,name:a,args:n,signature:s,selector:e,value:r})}}class eg{fragment;name;args;signature;selector;constructor(t,e,n){let r=t.name,a=t.format();(0,i.h)(this,{fragment:t,name:r,args:n,signature:a,selector:e})}}class em{hash;_isIndexed;static isIndexed(t){return!!(t&&t._isIndexed)}constructor(t){(0,i.h)(this,{hash:t,_isIndexed:!0})}}let ey={0:"generic panic",1:"assert(false)",17:"arithmetic overflow",18:"division or modulo by zero",33:"enum overflow",34:"invalid encoded storage byte array accessed",49:"out-of-bounds array access; popping on an empty array",50:"out-of-bounds access of an array or bytesN",65:"out of memory",81:"uninitialized function"},eb={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:t=>`reverted with reason string ${JSON.stringify(t)}`},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"],reason:t=>{let e="unknown panic code";return t>=0&&t<=255&&ey[t.toString()]&&(e=ey[t.toString()]),`reverted with panic code 0x${t.toString(16)} (${e})`}}};class ew{fragments;deploy;fallback;receive;#g;#m;#y;#b;constructor(t){let e=[];e="string"==typeof t?JSON.parse(t):t,this.#y=new Map,this.#g=new Map,this.#m=new Map;let n=[];for(let t of e)try{n.push(t9.from(t))}catch(e){console.log(`[Warning] Invalid Fragment ${JSON.stringify(t)}:`,e.message)}(0,i.h)(this,{fragments:Object.freeze(n)});let a=null,s=!1;this.#b=this.getAbiCoder(),this.fragments.forEach((t,e)=>{let n;switch(t.type){case"constructor":if(this.deploy){console.log("duplicate definition - constructor");return}(0,i.h)(this,{deploy:t});return;case"fallback":0===t.inputs.length?s=!0:((0,r.en)(!a||t.payable!==a.payable,"conflicting fallback fragments",`fragments[${e}]`,t),s=(a=t).payable);return;case"function":n=this.#y;break;case"event":n=this.#m;break;case"error":n=this.#g;break;default:return}let o=t.format();n.has(o)||n.set(o,t)}),this.deploy||(0,i.h)(this,{deploy:er.from("constructor()")}),(0,i.h)(this,{fallback:a,receive:s})}format(t){let e=t?"minimal":"full";return this.fragments.map(t=>t.format(e))}formatJson(){return JSON.stringify(this.fragments.map(t=>t.format("json")).map(t=>JSON.parse(t)))}getAbiCoder(){return ef.defaultAbiCoder()}#w(t,e,n){if((0,j.A7)(t)){let e=t.toLowerCase();for(let t of this.#y.values())if(e===t.selector)return t;return null}if(-1===t.indexOf("(")){let i=[];for(let[e,n]of this.#y)e.split("(")[0]===t&&i.push(n);if(e){let t=e.length>0?e[e.length-1]:null,n=e.length,r=!0;u.isTyped(t)&&"overrides"===t.type&&(r=!1,n--);for(let t=i.length-1;t>=0;t--){let e=i[t].inputs.length;e===n||r&&e===n-1||i.splice(t,1)}for(let t=i.length-1;t>=0;t--){let n=i[t].inputs;for(let r=0;r=n.length){if("overrides"===e[r].type)continue;i.splice(t,1);break}if(e[r].type!==n[r].baseType){i.splice(t,1);break}}}}if(1===i.length&&e&&e.length!==i[0].inputs.length){let t=e[e.length-1];(null==t||Array.isArray(t)||"object"!=typeof t)&&i.splice(0,1)}if(0===i.length)return null;if(i.length>1&&n){let e=i.map(t=>JSON.stringify(t.format())).join(", ");(0,r.en)(!1,`ambiguous function description (i.e. matches ${e})`,"key",t)}return i[0]}return this.#y.get(ea.from(t).format())||null}getFunctionName(t){let e=this.#w(t,null,!1);return(0,r.en)(e,"no matching function","key",t),e.name}hasFunction(t){return!!this.#w(t,null,!1)}getFunction(t,e){return this.#w(t,e||null,!0)}forEachFunction(t){let e=Array.from(this.#y.keys());e.sort((t,e)=>t.localeCompare(e));for(let n=0;n=0;t--)i[t].inputs.length=0;t--){let n=i[t].inputs;for(let r=0;r1&&n){let e=i.map(t=>JSON.stringify(t.format())).join(", ");(0,r.en)(!1,`ambiguous event description (i.e. matches ${e})`,"key",t)}return i[0]}return this.#m.get(en.from(t).format())||null}getEventName(t){let e=this.#v(t,null,!1);return(0,r.en)(e,"no matching event","key",t),e.name}hasEvent(t){return!!this.#v(t,null,!1)}getEvent(t,e){return this.#v(t,e||null,!0)}forEachEvent(t){let e=Array.from(this.#m.keys());e.sort((t,e)=>t.localeCompare(e));for(let n=0;n1){let n=e.map(t=>JSON.stringify(t.format())).join(", ");(0,r.en)(!1,`ambiguous error description (i.e. ${n})`,"name",t)}return e[0]}return"Error(string)"===(t=ee.from(t).format())?ee.from("error Error(string)"):"Panic(uint256)"===t?ee.from("error Panic(uint256)"):this.#g.get(t)||null}forEachError(t){let e=Array.from(this.#g.keys());e.sort((t,e)=>t.localeCompare(e));for(let n=0;n"string"===t.type?G(e):"bytes"===t.type?V((0,j.Dv)(e)):("bool"===t.type&&"boolean"==typeof e?e=e?"0x01":"0x00":t.type.match(/^u?int/)?e=(0,H.m9)(e):t.type.match(/^bytes/)?e=(0,j.SK)(e,32):"address"===t.type&&this.#b.encode(["address"],[e]),(0,j.U3)((0,j.Dv)(e),32));for(e.forEach((e,a)=>{let s=t.inputs[a];if(!s.indexed){(0,r.en)(null==e,"cannot filter non-indexed parameters; must be null","contract."+s.name,e);return}null==e?n.push(null):"array"===s.baseType||"tuple"===s.baseType?(0,r.en)(!1,"filtering with tuples or arrays not supported","contract."+s.name,e):Array.isArray(e)?n.push(e.map(t=>i(s,t))):n.push(i(s,e))});n.length&&null===n[n.length-1];)n.pop();return n}encodeEventLog(t,e){if("string"==typeof t){let e=this.getEvent(t);(0,r.en)(e,"unknown event","eventFragment",t),t=e}let n=[],i=[],a=[];return t.anonymous||n.push(t.topicHash),(0,r.en)(e.length===t.inputs.length,"event arguments/values mismatch","values",e),t.inputs.forEach((t,r)=>{let s=e[r];if(t.indexed){if("string"===t.type)n.push(G(s));else if("bytes"===t.type)n.push(V(s));else if("tuple"===t.baseType||"array"===t.baseType)throw Error("not implemented");else n.push(this.#b.encode([t.type],[s]))}else i.push(t),a.push(s)}),{data:this.#b.encode(i,a),topics:n}}decodeEventLog(t,e,n){if("string"==typeof t){let e=this.getEvent(t);(0,r.en)(e,"unknown event","eventFragment",t),t=e}if(null!=n&&!t.anonymous){let e=t.topicHash;(0,r.en)((0,j.A7)(n[0],32)&&n[0].toLowerCase()===e,"fragment/topic mismatch","topics[0]",n[0]),n=n.slice(1)}let i=[],a=[],s=[];t.inputs.forEach((t,e)=>{t.indexed?"string"===t.type||"bytes"===t.type||"tuple"===t.baseType||"array"===t.baseType?(i.push(t8.from({type:"bytes32",name:t.name})),s.push(!0)):(i.push(t),s.push(!1)):(a.push(t),s.push(!1))});let o=null!=n?this.#b.decode(i,(0,j.zo)(n)):null,l=this.#b.decode(a,e,!0),u=[],c=[],h=0,f=0;return t.inputs.forEach((t,e)=>{let n=null;if(t.indexed){if(null==o)n=new em(null);else if(s[e])n=new em(o[f++]);else try{n=o[f++]}catch(t){n=t}}else try{n=l[h++]}catch(t){n=t}u.push(n),c.push(t.name||null)}),X.fromItems(u,c)}parseTransaction(t){let e=(0,j.Pw)(t.data,"tx.data"),n=(0,H.yT)(null!=t.value?t.value:0,"tx.value"),r=this.getFunction((0,j.Dv)(e.slice(0,4)));if(!r)return null;let i=this.#b.decode(r.inputs,e.slice(4));return new ep(r,r.selector,i,n)}parseCallResult(t){throw Error("@TODO")}parseLog(t){let e=this.getEvent(t.topics[0]);return!e||e.anonymous?null:new ed(e,e.topicHash,this.decodeEventLog(e,t.data,t.topics))}parseError(t){let e=(0,j.Dv)(t),n=this.getError((0,j.QB)(e,0,4));if(!n)return null;let r=this.#b.decode(n.inputs,(0,j.QB)(e,4));return new eg(n,n.selector,r)}static from(t){return t instanceof ew?t:new ew("string"==typeof t?JSON.parse(t):"function"==typeof t.formatJson?t.formatJson():"function"==typeof t.format?t.format("json"):t)}}function ev(t){return t&&"function"==typeof t.getAddress}async function eE(t,e){let n=await e;return(null==n||"0x0000000000000000000000000000000000000000"===n)&&((0,r.hu)("string"!=typeof t,"unconfigured name","UNCONFIGURED_NAME",{value:t}),(0,r.en)(!1,"invalid AddressLike value; did not resolve to a value address","target",t)),tl(n)}function eN(t,e){return"string"==typeof t?t.match(/^0x[0-9a-f]{40}$/i)?tl(t):((0,r.hu)(null!=e,"ENS resolution requires a provider","UNSUPPORTED_OPERATION",{operation:"resolveName"}),eE(t,e.resolveName(t))):ev(t)?eE(t,t.getAddress()):t&&"function"==typeof t.then?eE(t,t):void(0,r.en)(!1,"unsupported addressable value","target",t)}function eT(t,e){return{address:tl(t),storageKeys:e.map((t,e)=>((0,r.en)((0,j.A7)(t,32),"invalid slot",`storageKeys[${e}]`,t),t.toLowerCase()))}}let ex=BigInt(0);function eO(t){return null==t?null:t.toString()}class ek{provider;transactionHash;blockHash;blockNumber;removed;address;data;topics;index;transactionIndex;constructor(t,e){this.provider=e;let n=Object.freeze(t.topics.slice());(0,i.h)(this,{transactionHash:t.transactionHash,blockHash:t.blockHash,blockNumber:t.blockNumber,removed:t.removed,address:t.address,data:t.data,topics:n,index:t.index,transactionIndex:t.transactionIndex})}toJSON(){let{address:t,blockHash:e,blockNumber:n,data:r,index:i,removed:a,topics:s,transactionHash:o,transactionIndex:l}=this;return{_type:"log",address:t,blockHash:e,blockNumber:n,data:r,index:i,removed:a,topics:s,transactionHash:o,transactionIndex:l}}async getBlock(){let t=await this.provider.getBlock(this.blockHash);return(0,r.hu)(!!t,"failed to find transaction","UNKNOWN_ERROR",{}),t}async getTransaction(){let t=await this.provider.getTransaction(this.transactionHash);return(0,r.hu)(!!t,"failed to find transaction","UNKNOWN_ERROR",{}),t}async getTransactionReceipt(){let t=await this.provider.getTransactionReceipt(this.transactionHash);return(0,r.hu)(!!t,"failed to find transaction receipt","UNKNOWN_ERROR",{}),t}removedEvent(){return{orphan:"drop-log",log:{transactionHash:this.transactionHash,blockHash:this.blockHash,blockNumber:this.blockNumber,address:this.address,data:this.data,topics:Object.freeze(this.topics.slice()),index:this.index}}}}class eA{provider;to;from;contractAddress;hash;index;blockHash;blockNumber;logsBloom;gasUsed;blobGasUsed;cumulativeGasUsed;gasPrice;blobGasPrice;type;status;root;#E;constructor(t,e){this.#E=Object.freeze(t.logs.map(t=>new ek(t,e)));let n=ex;null!=t.effectiveGasPrice?n=t.effectiveGasPrice:null!=t.gasPrice&&(n=t.gasPrice),(0,i.h)(this,{provider:e,to:t.to,from:t.from,contractAddress:t.contractAddress,hash:t.hash,index:t.index,blockHash:t.blockHash,blockNumber:t.blockNumber,logsBloom:t.logsBloom,gasUsed:t.gasUsed,cumulativeGasUsed:t.cumulativeGasUsed,blobGasUsed:t.blobGasUsed,gasPrice:n,blobGasPrice:t.blobGasPrice,type:t.type,status:t.status,root:t.root})}get logs(){return this.#E}toJSON(){let{to:t,from:e,contractAddress:n,hash:r,index:i,blockHash:a,blockNumber:s,logsBloom:o,logs:l,status:u,root:c}=this;return{_type:"TransactionReceipt",blockHash:a,blockNumber:s,contractAddress:n,cumulativeGasUsed:eO(this.cumulativeGasUsed),from:e,gasPrice:eO(this.gasPrice),blobGasUsed:eO(this.blobGasUsed),blobGasPrice:eO(this.blobGasPrice),gasUsed:eO(this.gasUsed),hash:r,index:i,logs:l,logsBloom:o,root:c,status:u,to:t}}get length(){return this.logs.length}[Symbol.iterator](){let t=0;return{next:()=>t{if(l)return null;let{blockNumber:t,nonce:e}=await (0,i.m)({blockNumber:this.provider.getBlockNumber(),nonce:this.provider.getTransactionCount(this.from)});if(e{if(null==t||0!==t.status)return t;(0,r.hu)(!1,"transaction execution reverted","CALL_EXCEPTION",{action:"sendTransaction",data:null,reason:null,invocation:null,revert:null,transaction:{to:t.to,from:t.from,data:""},receipt:t})},h=await this.provider.getTransactionReceipt(this.hash);if(0===n)return c(h);if(h){if(1===n||await h.confirmations()>=n)return c(h)}else if(await u(),0===n)return null;let f=new Promise((t,e)=>{let i=[],o=()=>{i.forEach(t=>t())};if(i.push(()=>{l=!0}),a>0){let t=setTimeout(()=>{o(),e((0,r.wf)("wait for transaction timeout","TIMEOUT"))},a);i.push(()=>{clearTimeout(t)})}let h=async r=>{if(await r.confirmations()>=n){o();try{t(c(r))}catch(t){e(t)}}};if(i.push(()=>{this.provider.off(this.hash,h)}),this.provider.on(this.hash,h),s>=0){let t=async()=>{try{await u()}catch(t){if((0,r.VZ)(t,"TRANSACTION_REPLACED")){o(),e(t);return}}l||this.provider.once("block",t)};i.push(()=>{this.provider.off("block",t)}),this.provider.once("block",t)}});return await f}isMined(){return null!=this.blockHash}isLegacy(){return 0===this.type}isBerlin(){return 1===this.type}isLondon(){return 2===this.type}isCancun(){return 3===this.type}removedEvent(){return(0,r.hu)(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),eI(this)}reorderedEvent(t){return(0,r.hu)(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),(0,r.hu)(!t||t.isMined(),"unmined 'other' transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),eP(this,t)}replaceableTransaction(t){(0,r.en)(Number.isInteger(t)&&t>=0,"invalid startBlock","startBlock",t);let e=new eR(this,this.provider);return e.#N=t,e}}function eP(t,e){return{orphan:"reorder-transaction",tx:t,other:e}}function eI(t){return{orphan:"drop-transaction",tx:t}}class e_{filter;emitter;#T;constructor(t,e,n){this.#T=e,(0,i.h)(this,{emitter:t,filter:n})}async removeListener(){null!=this.#T&&await this.emitter.off(this.filter,this.#T)}}class eU extends ek{interface;fragment;args;constructor(t,e,n){super(t,t.provider);let r=e.decodeEventLog(n,t.data,t.topics);(0,i.h)(this,{args:r,fragment:n,interface:e})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}class eC extends ek{error;constructor(t,e){super(t,t.provider),(0,i.h)(this,{error:e})}}class eS extends eA{#x;constructor(t,e,n){super(n,e),this.#x=t}get logs(){return super.logs.map(t=>{let e=t.topics.length?this.#x.getEvent(t.topics[0]):null;if(e)try{return new eU(t,this.#x,e)}catch(e){return new eC(t,e)}return t})}}class eF extends eR{#x;constructor(t,e,n){super(n,e),this.#x=t}async wait(t,e){let n=await super.wait(t,e);return null==n?null:new eS(this.#x,this.provider,n)}}class eL extends e_{log;constructor(t,e,n,r){super(t,e,n),(0,i.h)(this,{log:r})}async getBlock(){return await this.log.getBlock()}async getTransaction(){return await this.log.getTransaction()}async getTransactionReceipt(){return await this.log.getTransactionReceipt()}}class eB extends eL{constructor(t,e,n,r,a){super(t,e,n,new eU(a,t.interface,r));let s=t.interface.decodeEventLog(r,this.log.data,this.log.topics);(0,i.h)(this,{args:s,fragment:r})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}let ej=BigInt(0);function eD(t){return t&&"function"==typeof t.call}function e$(t){return t&&"function"==typeof t.estimateGas}function eM(t){return t&&"function"==typeof t.resolveName}function eV(t){return t&&"function"==typeof t.sendTransaction}function ez(t){if(null!=t){if(eM(t))return t;if(t.provider)return t.provider}}class eG{#O;fragment;constructor(t,e,n){if((0,i.h)(this,{fragment:e}),e.inputs.lengthnull==n[e]?null:t.walkAsync(n[e],(t,e)=>"address"===t?Array.isArray(e)?Promise.all(e.map(t=>eN(t,a))):eN(e,a):e)));return t.interface.encodeFilterTopics(e,r)}()}getTopicFilter(){return this.#O}}function eH(t,e){return null==t?null:"function"==typeof t[e]?t:t.provider&&"function"==typeof t.provider[e]?t.provider:null}function eq(t){return null==t?null:t.provider||null}async function eJ(t,e){let n=u.dereference(t,"overrides");(0,r.en)("object"==typeof n,"invalid overrides parameter","overrides",t);let i=function(t){let e={};for(let n of(t.to&&(e.to=t.to),t.from&&(e.from=t.from),t.data&&(e.data=(0,j.Dv)(t.data)),"chainId,gasLimit,gasPrice,maxFeePerBlobGas,maxFeePerGas,maxPriorityFeePerGas,value".split(/,/)))n in t&&null!=t[n]&&(e[n]=(0,H.yT)(t[n],`request.${n}`));for(let n of"type,nonce".split(/,/))n in t&&null!=t[n]&&(e[n]=(0,H.Dx)(t[n],`request.${n}`));return t.accessList&&(e.accessList=function(t){if(Array.isArray(t))return t.map((e,n)=>Array.isArray(e)?((0,r.en)(2===e.length,"invalid slot set",`value[${n}]`,e),eT(e[0],e[1])):((0,r.en)(null!=e&&"object"==typeof e,"invalid address-slot set","value",t),eT(e.address,e.storageKeys)));(0,r.en)(null!=t&&"object"==typeof t,"invalid access list","value",t);let e=Object.keys(t).map(e=>{let n=t[e].reduce((t,e)=>(t[e]=!0,t),{});return eT(e,Object.keys(n).sort())});return e.sort((t,e)=>t.address.localeCompare(e.address)),e}(t.accessList)),t.authorizationList&&(e.authorizationList=t.authorizationList.slice()),"blockTag"in t&&(e.blockTag=t.blockTag),"enableCcipRead"in t&&(e.enableCcipRead=!!t.enableCcipRead),"customData"in t&&(e.customData=t.customData),"blobVersionedHashes"in t&&t.blobVersionedHashes&&(e.blobVersionedHashes=t.blobVersionedHashes.slice()),"kzg"in t&&(e.kzg=t.kzg),"blobWrapperVersion"in t&&(e.blobWrapperVersion=t.blobWrapperVersion),"blobs"in t&&t.blobs&&(e.blobs=t.blobs.map(t=>(0,j.Zq)(t)?(0,j.Dv)(t):Object.assign({},t))),e}(n);return(0,r.en)(null==i.to||(e||[]).indexOf("to")>=0,"cannot override to","overrides.to",i.to),(0,r.en)(null==i.data||(e||[]).indexOf("data")>=0,"cannot override data","overrides.data",i.data),i.from&&(i.from=i.from),i}async function eK(t,e,n){let r=eH(t,"resolveName"),i=eM(r)?r:null;return await Promise.all(e.map((t,e)=>t.walkAsync(n[e],(t,e)=>(e=u.dereference(e,t),"address"===t)?eN(e,i):e)))}let eW=Symbol.for("_ethersInternal_contract"),eZ=new WeakMap;function eY(t){return eZ.get(t[eW])}async function eX(t,e){let n;let i=null;if(Array.isArray(e)){let i=function(e){if((0,j.A7)(e,32))return e;let n=t.interface.getEvent(e);return(0,r.en)(n,"unknown fragment","name",e),n.topicHash};n=e.map(t=>null==t?null:Array.isArray(t)?t.map(i):i(t))}else"*"===e?n=[null]:"string"==typeof e?(0,j.A7)(e,32)?n=[e]:(i=t.interface.getEvent(e),(0,r.en)(i,"unknown fragment","event",e),n=[i.topicHash]):e&&"object"==typeof e&&"getTopicFilter"in e&&"function"==typeof e.getTopicFilter&&e.fragment?n=await e.getTopicFilter():"fragment"in e?n=[(i=e.fragment).topicHash]:(0,r.en)(!1,"unknown event name","event",e);return{fragment:i,tag:(n=n.map(t=>{if(null==t)return null;if(Array.isArray(t)){let e=Array.from(new Set(t.map(t=>t.toLowerCase())).values());return 1===e.length?e[0]:(e.sort(),e)}return t.toLowerCase()})).map(t=>null==t?"null":Array.isArray(t)?t.join("|"):t).join("&"),topics:n}}async function eQ(t,e){let{subs:n}=eY(t);return n.get((await eX(t,e)).tag)||null}async function e0(t,e,n){let i=eq(t.runner);(0,r.hu)(i,"contract runner does not support subscribing","UNSUPPORTED_OPERATION",{operation:e});let{fragment:a,tag:s,topics:o}=await eX(t,n),{addr:l,subs:u}=eY(t),c=u.get(s);if(!c){let e={address:l||t,topics:o},r=e=>{let r=a;if(null==r)try{r=t.interface.getEvent(e.topics[0])}catch(t){}if(r){let i=r,s=a?t.interface.decodeEventLog(a,e.data,e.topics):[];e4(t,n,s,r=>new eB(t,r,n,i,e))}else e4(t,n,[],r=>new eL(t,r,n,e))},h=[];c={tag:s,listeners:[],start:()=>{h.length||h.push(i.on(e,r))},stop:async()=>{if(0==h.length)return;let t=h;h=[],await Promise.all(t),i.off(e,r)}},u.set(s,c)}return c}let e1=Promise.resolve();async function e2(t,e,n,r){await e1;let i=await eQ(t,e);if(!i)return!1;let a=i.listeners.length;return i.listeners=i.listeners.filter(({listener:e,once:i})=>{let a=Array.from(n);r&&a.push(r(i?null:e));try{e.call(t,...a)}catch(t){}return!i}),0===i.listeners.length&&(i.stop(),eY(t).subs.delete(i.tag)),a>0}async function e4(t,e,n,r){try{await e1}catch(t){}let i=e2(t,e,n,r);return e1=i,await i}let e3=["then"];class e5{target;interface;runner;filters;[eW];fallback;constructor(t,e,n,a){var s;let o;(0,r.en)("string"==typeof t||ev(t),"invalid value for Contract target","target",t),null==n&&(n=null);let l=ew.from(e);(0,i.h)(this,{target:t,runner:n,interface:l}),Object.defineProperty(this,eW,{value:{}});let u=null,c=null;if(a){let t=eq(n);c=new eF(this.interface,t,a)}let h=new Map;if("string"==typeof t){if((0,j.A7)(t))u=t,o=Promise.resolve(t);else{let e=eH(n,"resolveName");if(!eM(e))throw(0,r.wf)("contract runner does not support name resolution","UNSUPPORTED_OPERATION",{operation:"resolveName"});o=e.resolveName(t).then(e=>{if(null==e)throw(0,r.wf)("an ENS name used for a contract target must be correctly configured","UNCONFIGURED_NAME",{value:t});return eY(this).addr=e,e})}}else o=t.getAddress().then(t=>{if(null==t)throw Error("TODO");return eY(this).addr=t,t});s={addrPromise:o,addr:u,deployTx:c,subs:h},eZ.set(this[eW],s);let f=new Proxy({},{get:(t,e,n)=>{if("symbol"==typeof e||e3.indexOf(e)>=0)return Reflect.get(t,e,n);try{return this.getEvent(e)}catch(t){if(!(0,r.VZ)(t,"INVALID_ARGUMENT")||"key"!==t.argument)throw t}},has:(t,e)=>e3.indexOf(e)>=0?Reflect.has(t,e):Reflect.has(t,e)||this.interface.hasEvent(String(e))});return(0,i.h)(this,{filters:f}),(0,i.h)(this,{fallback:l.receive||l.fallback?function(t){let e=async function(e){let n=await eJ(e,["data"]);n.to=await t.getAddress(),n.from&&(n.from=await eN(n.from,ez(t.runner)));let i=t.interface,a=(0,H.yT)(n.value||ej,"overrides.value")===ej,s="0x"===(n.data||"0x");!i.fallback||i.fallback.payable||!i.receive||s||a||(0,r.en)(!1,"cannot send data to receive or send value to non-payable fallback","overrides",e),(0,r.en)(i.fallback||s,"cannot send data to receive-only contract","overrides.data",n.data);let o=i.receive||i.fallback&&i.fallback.payable;return(0,r.en)(o||a,"cannot send value to non-payable fallback","overrides.value",n.value),(0,r.en)(i.fallback||s,"cannot send data to receive-only contract","overrides.data",n.data),n},n=async function(n){let i=eH(t.runner,"call");(0,r.hu)(eD(i),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});let a=await e(n);try{return await i.call(a)}catch(e){if((0,r.Hl)(e)&&e.data)throw t.interface.makeError(e.data,a);throw e}},a=async function(n){let i=t.runner;(0,r.hu)(eV(i),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});let a=await i.sendTransaction(await e(n)),s=eq(t.runner);return new eF(t.interface,s,a)},s=async function(n){let i=eH(t.runner,"estimateGas");return(0,r.hu)(e$(i),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await i.estimateGas(await e(n))},o=async t=>await a(t);return(0,i.h)(o,{_contract:t,estimateGas:s,populateTransaction:e,send:a,staticCall:n}),o}(this):null}),new Proxy(this,{get:(t,e,n)=>{if("symbol"==typeof e||e in t||e3.indexOf(e)>=0)return Reflect.get(t,e,n);try{return t.getFunction(e)}catch(t){if(!(0,r.VZ)(t,"INVALID_ARGUMENT")||"key"!==t.argument)throw t}},has:(t,e)=>"symbol"==typeof e||e in t||e3.indexOf(e)>=0?Reflect.has(t,e):t.interface.hasFunction(e)})}connect(t){return new e5(this.target,this.interface,t)}attach(t){return new e5(t,this.interface,this.runner)}async getAddress(){return await eY(this).addrPromise}async getDeployedCode(){let t=eq(this.runner);(0,r.hu)(t,"runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"getDeployedCode"});let e=await t.getCode(await this.getAddress());return"0x"===e?null:e}async waitForDeployment(){let t=this.deploymentTransaction();if(t)return await t.wait(),this;if(null!=await this.getDeployedCode())return this;let e=eq(this.runner);return(0,r.hu)(null!=e,"contract runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"waitForDeployment"}),new Promise((t,n)=>{let r=async()=>{try{let n=await this.getDeployedCode();if(null!=n)return t(this);e.once("block",r)}catch(t){n(t)}};r()})}deploymentTransaction(){return eY(this).deployTx}getFunction(t){return"string"!=typeof t&&(t=t.format()),function(t,e){let n=function(...n){let i=t.interface.getFunction(e,n);return(0,r.hu)(i,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e,args:n}}),i},a=async function(...e){let r=n(...e),a={};if(r.inputs.length+1===e.length&&(a=await eJ(e.pop())).from&&(a.from=await eN(a.from,ez(t.runner))),r.inputs.length!==e.length)throw Error("internal error: fragment inputs doesn't match arguments; should not happen");let s=await eK(t.runner,r.inputs,e);return Object.assign({},a,await (0,i.m)({to:t.getAddress(),data:t.interface.encodeFunctionData(r,s)}))},s=async function(...t){let e=await u(...t);return 1===e.length?e[0]:e},o=async function(...e){let n=t.runner;(0,r.hu)(eV(n),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});let i=await n.sendTransaction(await a(...e)),s=eq(t.runner);return new eF(t.interface,s,i)},l=async function(...e){let n=eH(t.runner,"estimateGas");return(0,r.hu)(e$(n),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await n.estimateGas(await a(...e))},u=async function(...e){let i=eH(t.runner,"call");(0,r.hu)(eD(i),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});let s=await a(...e),o="0x";try{o=await i.call(s)}catch(e){if((0,r.Hl)(e)&&e.data)throw t.interface.makeError(e.data,s);throw e}let l=n(...e);return t.interface.decodeFunctionResult(l,o)},c=async(...t)=>n(...t).constant?await s(...t):await o(...t);return(0,i.h)(c,{name:t.interface.getFunctionName(e),_contract:t,_key:e,getFragment:n,estimateGas:l,populateTransaction:a,send:o,staticCall:s,staticCallResult:u}),Object.defineProperty(c,"fragment",{configurable:!1,enumerable:!0,get:()=>{let n=t.interface.getFunction(e);return(0,r.hu)(n,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e}}),n}}),c}(this,t)}getEvent(t){return"string"!=typeof t&&(t=t.format()),function(t,e){let n=function(...n){let i=t.interface.getEvent(e,n);return(0,r.hu)(i,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e,args:n}}),i},a=function(...e){return new eG(t,n(...e),e)};return(0,i.h)(a,{name:t.interface.getEventName(e),_contract:t,_key:e,getFragment:n}),Object.defineProperty(a,"fragment",{configurable:!1,enumerable:!0,get:()=>{let n=t.interface.getEvent(e);return(0,r.hu)(n,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e}}),n}}),a}(this,t)}async queryTransaction(t){throw Error("@TODO")}async queryFilter(t,e,n){null==e&&(e=0),null==n&&(n="latest");let{addr:i,addrPromise:a}=eY(this),s=i||await a,{fragment:o,topics:l}=await eX(this,t),u={address:s,topics:l,fromBlock:e,toBlock:n},c=eq(this.runner);return(0,r.hu)(c,"contract runner does not have a provider","UNSUPPORTED_OPERATION",{operation:"queryFilter"}),(await c.getLogs(u)).map(t=>{let e=o;if(null==e)try{e=this.interface.getEvent(t.topics[0])}catch(t){}if(e)try{return new eU(t,this.interface,e)}catch(e){return new eC(t,e)}return new ek(t,c)})}async on(t,e){let n=await e0(this,"on",t);return n.listeners.push({listener:e,once:!1}),n.start(),this}async once(t,e){let n=await e0(this,"once",t);return n.listeners.push({listener:e,once:!0}),n.start(),this}async emit(t,...e){return await e4(this,t,e,null)}async listenerCount(t){if(t){let e=await eQ(this,t);return e?e.listeners.length:0}let{subs:e}=eY(this),n=0;for(let{listeners:t}of e.values())n+=t.length;return n}async listeners(t){if(t){let e=await eQ(this,t);return e?e.listeners.map(({listener:t})=>t):[]}let{subs:e}=eY(this),n=[];for(let{listeners:t}of e.values())n=n.concat(t.map(({listener:t})=>t));return n}async off(t,e){let n=await eQ(this,t);if(!n)return this;if(e){let t=n.listeners.map(({listener:t})=>t).indexOf(e);t>=0&&n.listeners.splice(t,1)}return(null==e||0===n.listeners.length)&&(n.stop(),eY(this).subs.delete(n.tag)),this}async removeAllListeners(t){if(t){let e=await eQ(this,t);if(!e)return this;e.stop(),eY(this).subs.delete(e.tag)}else{let{subs:t}=eY(this);for(let{tag:e,stop:n}of t.values())n(),t.delete(e)}return this}async addListener(t,e){return await this.on(t,e)}async removeListener(t,e){return await this.off(t,e)}static buildClass(t){class e extends e5{constructor(e,n=null){super(e,t,n)}}return e}static from(t,e,n){return null==n&&(n=null),new this(t,e,n)}}function e6(){return e5}class e8 extends e6(){}},59369:function(t,e,n){n.d(e,{A7:function(){return o},Dv:function(){return c},Pw:function(){return a},QB:function(){return f},SK:function(){return g},U3:function(){return p},Zq:function(){return l},h_:function(){return s},zo:function(){return h}});var r=n(35157);function i(t,e,n){if(t instanceof Uint8Array)return n?new Uint8Array(t):t;if("string"==typeof t&&t.length%2==0&&t.match(/^0x[0-9a-f]*$/i)){let e=new Uint8Array((t.length-2)/2),n=2;for(let r=0;r>4]+u[15&r]}return n}function h(t){return"0x"+t.map(t=>c(t).substring(2)).join("")}function f(t,e,n){let i=a(t);return null!=n&&n>i.length&&(0,r.hu)(!1,"cannot slice beyond data bounds","BUFFER_OVERRUN",{buffer:i,length:i.length,offset:n}),c(i.slice(null==e?0:e,null==n?i.length:n))}function d(t,e,n){let i=a(t);(0,r.hu)(e>=i.length,"padding exceeds data length","BUFFER_OVERRUN",{buffer:new Uint8Array(i),length:e,offset:e+1});let s=new Uint8Array(e);return s.fill(0),n?s.set(i,e-i.length):s.set(i,0),c(s)}function p(t,e){return d(t,e,!0)}function g(t,e){return d(t,e,!1)}},35157:function(t,e,n){n.d(e,{hu:function(){return l},en:function(){return u},fG:function(){return c},fA:function(){return f},NK:function(){return d},Hl:function(){return s},VZ:function(){return a},wf:function(){return o}});var r=n(69781);function i(t,e){if(null==t)return"null";if(null==e&&(e=new Set),"object"==typeof t){if(e.has(t))return"[Circular]";e.add(t)}if(Array.isArray(t))return"[ "+t.map(t=>i(t,e)).join(", ")+" ]";if(t instanceof Uint8Array){let e="0123456789abcdef",n="0x";for(let r=0;r>4]+e[15&t[r]];return n}if("object"==typeof t&&"function"==typeof t.toJSON)return i(t.toJSON(),e);switch(typeof t){case"boolean":case"number":case"symbol":return t.toString();case"bigint":return BigInt(t).toString();case"string":return JSON.stringify(t);case"object":{let n=Object.keys(t);return n.sort(),"{ "+n.map(n=>`${i(n,e)}: ${i(t[n],e)}`).join(", ")+" }"}}return"[ COULD NOT SERIALIZE ]"}function a(t,e){return t&&t.code===e}function s(t){return a(t,"CALL_EXCEPTION")}function o(t,e,n){let a,s=t;{let r=[];if(n){if("message"in n||"code"in n||"name"in n)throw Error(`value will overwrite populated values: ${i(n)}`);for(let t in n){if("shortMessage"===t)continue;let e=n[t];r.push(t+"="+i(e))}}r.push(`code=${e}`),r.push("version=6.16.0"),r.length&&(t+=" ("+r.join(", ")+")")}switch(e){case"INVALID_ARGUMENT":a=TypeError(t);break;case"NUMERIC_FAULT":case"BUFFER_OVERRUN":a=RangeError(t);break;default:a=Error(t)}return(0,r.h)(a,{code:e}),n&&Object.assign(a,n),null==a.shortMessage&&(0,r.h)(a,{shortMessage:s}),a}function l(t,e,n,r){if(!t)throw o(e,n,r)}function u(t,e,n,r){l(t,e,"INVALID_ARGUMENT",{argument:n,value:r})}function c(t,e,n){null==n&&(n=""),n&&(n=": "+n),l(t>=e,"missing argument"+n,"MISSING_ARGUMENT",{count:t,expectedCount:e}),l(t<=e,"too many arguments"+n,"UNEXPECTED_ARGUMENT",{count:t,expectedCount:e})}let h=["NFD","NFC","NFKD","NFKC"].reduce((t,e)=>{try{if("test"!=="test".normalize(e))throw Error("bad");if("NFD"===e){let t=String.fromCharCode(233).normalize("NFD"),e=String.fromCharCode(101,769);if(t!==e)throw Error("broken")}t.push(e)}catch(t){}return t},[]);function f(t){l(h.indexOf(t)>=0,"platform missing String.prototype.normalize","UNSUPPORTED_OPERATION",{operation:"String.prototype.normalize",info:{form:t}})}function d(t,e,n){if(null==n&&(n=""),t!==e){let t=n,e="new";n&&(t+=".",e+=" "+n),l(!1,`private constructor; use ${t}from* methods`,"UNSUPPORTED_OPERATION",{operation:e})}}},45474:function(t,e,n){n.d(e,{$j:function(){return o},Dx:function(){return d},Gh:function(){return f},He:function(){return p},_Y:function(){return s},m9:function(){return g},ot:function(){return m},sS:function(){return l},yT:function(){return u}});var r=n(35157);let i=BigInt(0),a=BigInt(1);function s(t,e){let n=c(t,"value"),s=BigInt(d(e,"width"));return((0,r.hu)(n>>s===i,"overflow","NUMERIC_FAULT",{operation:"fromTwos",fault:"overflow",value:t}),n>>s-a)?-((~n&(a<=-9007199254740991&&t<=9007199254740991,"overflow",e||"value",t),BigInt(t);case"string":try{if(""===t)throw Error("empty string");if("-"===t[0]&&"-"!==t[1])return-BigInt(t.substring(1));return BigInt(t)}catch(n){(0,r.en)(!1,`invalid BigNumberish string: ${n.message}`,e||"value",t)}}(0,r.en)(!1,"invalid BigNumberish value",e||"value",t)}function c(t,e){let n=u(t,e);return(0,r.hu)(n>=i,"unsigned value cannot be negative","NUMERIC_FAULT",{fault:"overflow",operation:"getUint",value:t}),n}let h="0123456789abcdef";function f(t){if(t instanceof Uint8Array){let e="0x0";for(let n of t)e+=h[n>>4]+h[15&n];return BigInt(e)}return u(t)}function d(t,e){switch(typeof t){case"bigint":return(0,r.en)(t>=-9007199254740991&&t<=9007199254740991,"overflow",e||"value",t),Number(t);case"number":return(0,r.en)(Number.isInteger(t),"underflow",e||"value",t),(0,r.en)(t>=-9007199254740991&&t<=9007199254740991,"overflow",e||"value",t),t;case"string":try{if(""===t)throw Error("empty string");return d(BigInt(t),e)}catch(n){(0,r.en)(!1,`invalid numeric string: ${n.message}`,e||"value",t)}}(0,r.en)(!1,"invalid numeric value",e||"value",t)}function p(t){return d(f(t))}function g(t,e){let n=c(t,"value"),a=n.toString(16);if(null==e)a.length%2&&(a="0"+a);else{let s=d(e,"width");if(0===s&&n===i)return"0x";for((0,r.hu)(2*s>=a.length,`value exceeds width (${s} bytes)`,"NUMERIC_FAULT",{operation:"toBeHex",fault:"overflow",value:t});a.length<2*s;)a="0"+a}return"0x"+a}function m(t,e){let n=c(t,"value");if(n===i)return new Uint8Array(null!=e?d(e,"width"):0);let a=n.toString(16);if(a.length%2&&(a="0"+a),null!=e){let n=d(e,"width");for(;a.length<2*n;)a="00"+a;(0,r.hu)(2*n===a.length,`value exceeds width (${n} bytes)`,"NUMERIC_FAULT",{operation:"toBeArray",fault:"overflow",value:t})}let s=new Uint8Array(a.length/2);for(let t=0;tPromise.resolve(t[e])))).reduce((t,n,r)=>(t[e[r]]=n,t),{})}function i(t,e,n){for(let r in e){let i=e[r],a=n?n[r]:null;a&&function(t,e,n){let r=e.split("|").map(t=>t.trim());for(let n=0;n=-e&&tl?(0,a._Y)((0,a.sS)(t,i),i):-(0,a._Y)((0,a.sS)(-t,i),i)}else{let e=u<=0&&tnull==a[t]?n:((0,r.en)(typeof a[t]===e,"invalid fixed format ("+t+" not "+e+")","format."+t,a[t]),a[t]);e=s("signed","boolean",e),n=s("width","number",n),i=s("decimals","number",i)}(0,r.en)(n%8==0,"invalid FixedNumber width (not byte aligned)","format.width",n),(0,r.en)(i<=80,"invalid FixedNumber decimals (too large)","format.decimals",i);let a=(e?"":"u")+"fixed"+String(n)+"x"+String(i);return{signed:e,width:n,decimals:i,name:a}}class m{format;#k;#A;#R;_value;constructor(t,e,n){(0,r.NK)(t,h,"FixedNumber"),this.#A=e,this.#k=n;let i=function(t,e){let n="";t0?n*=d(r):r<0&&(e*=d(-r)),en?1:0}eq(t){return 0===this.cmp(t)}lt(t){return 0>this.cmp(t)}lte(t){return 0>=this.cmp(t)}gt(t){return this.cmp(t)>0}gte(t){return this.cmp(t)>=0}floor(){let t=this.#A;return this.#Al&&(t+=this.#R-u),t=this.#A/this.#R*this.#R,this.#I(t,"ceiling")}round(t){if(null==t&&(t=0),t>=this.decimals)return this;let e=this.decimals-t,n=c*d(e-1),r=this.value+n,i=d(e);return p(r=r/i*i,this.#k,"round"),new m(h,r,this.#k)}isZero(){return this.#A===l}isNegative(){return this.#A0){let e=d(u);(0,r.hu)(o%e===l,"value loses precision for format","NUMERIC_FAULT",{operation:"fromValue",fault:"underflow",value:t}),o/=e}else u<0&&(o*=d(-u));return p(o,s,"fromValue"),new m(h,o,s)}static fromString(t,e){let n=t.match(/^(-?)([0-9]*)\.?([0-9]*)$/);(0,r.en)(n&&n[2].length+n[3].length>0,"invalid FixedNumber string value","value",t);let i=g(e),a=n[2]||"0",s=n[3]||"";for(;s.length>6==2;r++)t++;return t}return"OVERRUN"===t?n.length-e-1:0}let s=Object.freeze({error:function(t,e,n,r,a){(0,i.en)(!1,`invalid codepoint at offset ${e}; ${t}`,"bytes",n)},ignore:a,replace:function(t,e,n,r,s){return"OVERLONG"===t?((0,i.en)("number"==typeof s,"invalid bad code point for replacement","badCodepoint",s),r.push(s),0):(r.push(65533),a(t,e,n,r,s))}});function o(t,e){(0,i.en)("string"==typeof t,"invalid string value","str",t),null!=e&&((0,i.fA)(e),t=t.normalize(e));let n=[];for(let e=0;e>6|192),n.push(63&r|128);else if((64512&r)==55296){e++;let a=t.charCodeAt(e);(0,i.en)(e>18|240),n.push(s>>12&63|128),n.push(s>>6&63|128),n.push(63&s|128)}else n.push(r>>12|224),n.push(r>>6&63|128),n.push(63&r|128)}return new Uint8Array(n)}function l(t,e){return(function(t,e){null==e&&(e=s.error);let n=(0,r.Pw)(t,"bytes"),i=[],a=0;for(;a>7==0){i.push(t);continue}let r=null,s=null;if((224&t)==192)r=1,s=127;else if((240&t)==224)r=2,s=2047;else if((248&t)==240)r=3,s=65535;else{(192&t)==128?a+=e("UNEXPECTED_CONTINUE",a-1,n,i):a+=e("BAD_PREFIX",a-1,n,i);continue}if(a-1+r>=n.length){a+=e("OVERRUN",a-1,n,i);continue}let o=t&(1<<8-r-1)-1;for(let t=0;t1114111){a+=e("OUT_OF_RANGE",a-1-r,n,i,o);continue}if(o>=55296&&o<=57343){a+=e("UTF16_SURROGATE",a-1-r,n,i,o);continue}if(o<=s){a+=e("OVERLONG",a-1-r,n,i,o);continue}i.push(o)}}return i})(t,e).map(t=>t<=65535?String.fromCharCode(t):String.fromCharCode(((t-=65536)>>10&1023)+55296,(1023&t)+56320)).join("")}},34557:function(t,e,n){n.d(e,{$:function(){return l}});var r=n(69921),i=n(36826),a=n(72932),s=n(13550),o=n(89361);async function l(t,e){async function n(e){if(e.endsWith(o.ny.slice(2))){let n=(0,i.f)((0,r.p5)(e,-64,-32)),s=(0,r.p5)(e,0,-64).slice(2).match(/.{1,64}/g),l=await Promise.all(s.map(e=>o.rC.slice(2)!==e?t.request({method:"eth_getTransactionReceipt",params:[`0x${e}`]},{dedupe:!0}):void 0)),u=l.some(t=>null===t)?100:l.every(t=>t?.status==="0x1")?200:l.every(t=>t?.status==="0x0")?500:600;return{atomic:!1,chainId:(0,a.ly)(n),receipts:l.filter(Boolean),status:u,version:"2.0.0"}}return t.request({method:"wallet_getCallsStatus",params:[e]})}let{atomic:l=!1,chainId:u,receipts:c,version:h="2.0.0",...f}=await n(e.id),[d,p]=(()=>{let t=f.status;return t>=100&&t<200?["pending",t]:t>=200&&t<300?["success",t]:t>=300&&t<700?["failure",t]:"CONFIRMED"===t?["success",200]:"PENDING"===t?["pending",100]:[void 0,t]})();return{...f,atomic:l,chainId:u?(0,a.ly)(u):void 0,receipts:c?.map(t=>({...t,blockNumber:a.y_(t.blockNumber),gasUsed:a.y_(t.gasUsed),status:s.ew[t.status]}))??[],statusCode:p,status:d,version:h}}},89239:function(t,e,n){n.d(e,{x:function(){return u}});var r=n(19775),i=n(65704),a=n(93637),s=n(82645),o=n(12363),l=n(16689);async function u(t,e){let{account:n=t.account,chainId:u,nonce:c}=e;if(!n)throw new i.o({docsPath:"/docs/eip7702/prepareAuthorization"});let h=(0,r.T)(n),f=(()=>{if(e.executor)return"self"===e.executor?e.executor:(0,r.T)(e.executor)})(),d={address:e.contractAddress??e.address,chainId:u,nonce:c};return void 0===d.chainId&&(d.chainId=t.chain?.id??await (0,s.s)(t,o.L,"getChainId")({})),void 0===d.nonce&&(d.nonce=await (0,s.s)(t,l.K,"getTransactionCount")({address:h.address,blockTag:"pending"}),("self"===f||f?.address&&(0,a.E)(f.address,h.address))&&(d.nonce+=1)),d}},89361:function(t,e,n){n.d(e,{ny:function(){return f},rC:function(){return d},s_:function(){return p}});var r=n(19775),i=n(81544),a=n(77014),s=n(17283),o=n(89256),l=n(72932),u=n(59455),c=n(93606),h=n(41709);let f="0x5792579257925792579257925792579257925792579257925792579257925792",d=(0,u.eC)(0,{size:32});async function p(t,e){let{account:n=t.account,capabilities:p,chain:g=t.chain,experimental_fallback:m,experimental_fallbackDelay:y=32,forceAtomic:b=!1,id:w,version:v="2.0.0"}=e,E=n?(0,r.T)(n):null,N=e.calls.map(t=>{let e=t.abi?(0,s.R)({abi:t.abi,functionName:t.functionName,args:t.args}):t.data;return{data:t.dataSuffix&&e?(0,o.zo)([e,t.dataSuffix]):e,to:t.to,value:t.value?(0,u.eC)(t.value):void 0}});try{let e=await t.request({method:"wallet_sendCalls",params:[{atomicRequired:b,calls:N,capabilities:p,chainId:(0,u.eC)(g.id),from:E?.address,id:w,version:v}]},{retryCount:0});if("string"==typeof e)return{id:e};return e}catch(n){if(m&&("MethodNotFoundRpcError"===n.name||"MethodNotSupportedRpcError"===n.name||"UnknownRpcError"===n.name||n.details.toLowerCase().includes("does not exist / is not available")||n.details.toLowerCase().includes("missing or invalid. request()")||n.details.toLowerCase().includes("did not match any variant of untagged enum")||n.details.toLowerCase().includes("account upgraded to unsupported contract")||n.details.toLowerCase().includes("eip-7702 not supported")||n.details.toLowerCase().includes("unsupported wc_ method")||n.details.toLowerCase().includes("feature toggled misconfigured")||n.details.toLowerCase().includes("jsonrpcengine: response has no error or result for request"))){if(p&&Object.values(p).some(t=>!t.optional)){let t="non-optional `capabilities` are not supported on fallback to `eth_sendTransaction`.";throw new a.vl(new i.G(t,{details:t}))}if(b&&N.length>1){let t="`forceAtomic` is not supported on fallback to `eth_sendTransaction`.";throw new a.r0(new i.G(t,{details:t}))}let e=[];for(let n of N){let r=(0,h.T)(t,{account:E,chain:g,data:n.data,to:n.to,value:n.value?(0,l.y_)(n.value):void 0});e.push(r),y>0&&await new Promise(t=>setTimeout(t,y))}let n=await Promise.allSettled(e);if(n.every(t=>"rejected"===t.status))throw n[0].reason;let r=n.map(t=>"fulfilled"===t.status?t.value:d);return{id:(0,o.zo)([...r,(0,u.eC)(g.id,{size:32}),f])}}throw(0,c.$)(n,{...e,account:E,chain:e.chain})}}},88027:function(t,e,n){n.d(e,{l:function(){return f}});var r=n(81544);class i extends r.G{constructor(t){super(`Call bundle failed with status: ${t.statusCode}`,{name:"BundleFailedError"}),Object.defineProperty(this,"result",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.result=t}}var a=n(82645),s=n(36478),o=n(41495),l=n(56921),u=n(49287),c=n(31853),h=n(34557);async function f(t,e){let n;let{id:r,pollingInterval:f=t.pollingInterval,status:p=({statusCode:t})=>200===t||t>=300,retryCount:g=4,retryDelay:m=({count:t})=>200*~~(1<{let s=(0,o.$)(async()=>{let o=t=>{clearTimeout(n),s(),t(),T()};try{let n=await (0,u.J)(async()=>{let e=await (0,a.s)(t,h.$,"getCallsStatus")({id:r});if(b&&"failure"===e.status)throw new i(e);return e},{retryCount:g,delay:m});if(!p(n))return;o(()=>e.resolve(n))}catch(t){o(()=>e.reject(t))}},{interval:f,emitOnBegin:!0});return s});return n=y?setTimeout(()=>{T(),clearTimeout(n),N(new d({id:r}))},y):void 0,await v}class d extends r.G{constructor({id:t}){super(`Timed out while waiting for call bundle with id "${t}" to be confirmed.`,{name:"WaitForCallsStatusTimeoutError"})}}},53882:function(t,e,n){n.d(e,{t:function(){return o}});var r=n(28332);function i(t,e={}){let n=function(t,e={}){try{return t.getClient(e)}catch{return}}(t,e);return n?.extend(r.I)}var a=n(35195),s=n(12364);function o(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=(0,s.Z)(t);return(0,a.useSyncExternalStoreWithSelector)(t=>(function(t,e){let{onChange:n}=e;return t.subscribe(()=>i(t),n,{equalityFn:(t,e)=>t?.uid===e?.uid})})(e,{onChange:t}),()=>i(e,t),()=>i(e,t),t=>t,(t,e)=>(null==t?void 0:t.uid)===(null==e?void 0:e.uid))}},13577:function(t,e,n){n.d(e,{p:function(){return ti}});var r=n(29827),i=n(332),a=n(12363),s=n(59455);async function o(t,{chain:e}){let{id:n,name:r,nativeCurrency:i,rpcUrls:a,blockExplorers:o}=e;await t.request({method:"wallet_addEthereumChain",params:[{chainId:(0,s.eC)(n),chainName:r,nativeCurrency:i,rpcUrls:a.default.http,blockExplorerUrls:o?Object.values(o).map(({url:t})=>t):void 0}]},{dedupe:!0,retryCount:0})}var l=n(23010),u=n(41709),c=n(31669);async function h(t){return t.account?.type==="local"?[t.account.address]:(await t.request({method:"eth_accounts"},{dedupe:!0})).map(t=>(0,c.x)(t))}var f=n(34557),d=n(19775);async function p(t,e={}){let{account:n=t.account,chainId:r}=e,i=n?(0,d.T)(n):void 0,a=r?[i?.address,[(0,s.eC)(r)]]:[i?.address],o=await t.request({method:"wallet_getCapabilities",params:a}),l={};for(let[t,e]of Object.entries(o))for(let[n,r]of(l[Number(t)]={},Object.entries(e)))"addSubAccount"===n&&(n="unstable_addSubAccount"),l[Number(t)][n]=r;return"number"==typeof r?l[r]:l}async function g(t){return await t.request({method:"wallet_getPermissions"},{dedupe:!0})}var m=n(89239),y=n(34467);async function b(t){return(await t.request({method:"eth_requestAccounts"},{dedupe:!0,retryCount:0})).map(t=>(0,c.K)(t))}async function w(t,e){return t.request({method:"wallet_requestPermissions",params:[e]},{retryCount:0})}var v=n(89361),E=n(88027);async function N(t,e){let{chain:n=t.chain}=e,r=e.timeout??Math.max((n?.blockTime??0)*3,5e3),i=await (0,v.s_)(t,e);return await (0,E.l)(t,{...e,id:i.id,timeout:r})}var T=n(9769),x=n(85631),O=n(65704),k=n(81544),A=n(63228),R=n(55834),P=n(40402),I=n(93606),_=n(70878),U=n(92614),C=n(82645),S=n(82061),F=n(54605),L=n(67348);let B=new S.k(128);async function j(t,e){let{account:n=t.account,chain:r=t.chain,accessList:i,authorizationList:s,blobs:o,data:l,gas:u,gasPrice:c,maxFeePerBlobGas:h,maxFeePerGas:f,maxPriorityFeePerGas:p,nonce:g,pollingInterval:m,throwOnReceiptRevert:b,type:w,value:v,...E}=e,N=e.timeout??Math.max((r?.blockTime??0)*3,5e3);if(void 0===n)throw new O.o({docsPath:"/docs/actions/wallet/sendTransactionSync"});let T=n?(0,d.T)(n):null;try{(0,F.F)(e);let n=await (async()=>e.to?e.to:null!==e.to&&s&&s.length>0?await (0,R.z)({authorization:s[0]}).catch(()=>{throw new k.G("`to` is required. Could not infer from `authorizationList`.")}):void 0)();if(T?.type==="json-rpc"||null===T){let e;null!==r&&(e=await (0,C.s)(t,a.L,"getChainId")({}),(0,P.q)({currentChainId:e,chain:r}));let d=t.chain?.formatters?.transactionRequest?.format,y=(d||U.tG)({...(0,_.K)(E,{format:d}),accessList:i,account:T,authorizationList:s,blobs:o,chainId:e,data:l,gas:u,gasPrice:c,maxFeePerBlobGas:h,maxFeePerGas:f,maxPriorityFeePerGas:p,nonce:g,to:n,type:w,value:v},"sendTransaction"),x=B.get(t.uid),O=x?"wallet_sendTransaction":"eth_sendTransaction",k=await (async()=>{try{return await t.request({method:O,params:[y]},{retryCount:0})}catch(e){if(!1===x)throw e;if("InvalidInputRpcError"===e.name||"InvalidParamsRpcError"===e.name||"MethodNotFoundRpcError"===e.name||"MethodNotSupportedRpcError"===e.name)return await t.request({method:"wallet_sendTransaction",params:[y]},{retryCount:0}).then(e=>(B.set(t.uid,!0),e)).catch(n=>{if("MethodNotFoundRpcError"===n.name||"MethodNotSupportedRpcError"===n.name)throw B.set(t.uid,!1),e;throw n});throw e}})(),R=await (0,C.s)(t,L.e,"waitForTransactionReceipt")({checkReplacement:!1,hash:k,pollingInterval:m,timeout:N});if(b&&"reverted"===R.status)throw new A.A3({receipt:R});return R}if(T?.type==="local"){let e=await (0,C.s)(t,y.ZE,"prepareTransactionRequest")({account:T,accessList:i,authorizationList:s,blobs:o,chain:r,data:l,gas:u,gasPrice:c,maxFeePerBlobGas:h,maxFeePerGas:f,maxPriorityFeePerGas:p,nonce:g,nonceManager:T.nonceManager,parameters:[...y.QZ,"sidecars"],type:w,value:v,...E,to:n}),a=r?.serializers?.transaction,d=await T.signTransaction(e,{serializer:a});return await (0,C.s)(t,x.s,"sendRawTransactionSync")({serializedTransaction:d,throwOnReceiptRevert:b})}if(T?.type==="smart")throw new O.Y({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"});throw new O.Y({docsPath:"/docs/actions/wallet/sendTransactionSync",type:T?.type})}catch(t){if(t instanceof O.Y)throw t;throw(0,I.$)(t,{...e,account:T,chain:e.chain||void 0})}}async function D(t,e){let{id:n}=e;await t.request({method:"wallet_showCallsStatus",params:[n]})}async function $(t,e){let{account:n=t.account}=e;if(!n)throw new O.o({docsPath:"/docs/eip7702/signAuthorization"});let r=(0,d.T)(n);if(!r.signAuthorization)throw new O.Y({docsPath:"/docs/eip7702/signAuthorization",metaMessages:["The `signAuthorization` Action does not support JSON-RPC Accounts."],type:r.type});let i=await (0,m.x)(t,e);return r.signAuthorization(i)}var M=n(70550);async function V(t,e){let{account:n=t.account,chain:r=t.chain,...i}=e;if(!n)throw new O.o({docsPath:"/docs/actions/wallet/signTransaction"});let o=(0,d.T)(n);(0,F.F)({account:o,...e});let l=await (0,C.s)(t,a.L,"getChainId")({});null!==r&&(0,P.q)({currentChainId:l,chain:r});let u=r?.formatters||t.chain?.formatters,c=u?.transactionRequest?.format||U.tG;return o.signTransaction?o.signTransaction({...i,chainId:l},{serializer:t.chain?.serializers?.transaction}):await t.request({method:"eth_signTransaction",params:[{...c({...i,account:o},"signTransaction"),chainId:(0,s.eC)(l),from:o.address}]},{retryCount:0})}var z=n(99493);async function G(t,e){let{account:n=t.account,domain:r,message:i,primaryType:a}=e;if(!n)throw new O.o({docsPath:"/docs/actions/wallet/signTypedData"});let s=(0,d.T)(n),o={EIP712Domain:(0,z.cj)({domain:r}),...e.types};if((0,z.iC)({domain:r,message:i,primaryType:a,types:o}),s.signTypedData)return s.signTypedData({domain:r,message:i,primaryType:a,types:o});let l=(0,z.H6)({domain:r,message:i,primaryType:a,types:o});return t.request({method:"eth_signTypedData_v4",params:[s.address,l]},{retryCount:0})}async function H(t,{id:e}){await t.request({method:"wallet_switchEthereumChain",params:[{chainId:(0,s.eC)(e)}]},{retryCount:0})}async function q(t,e){return await t.request({method:"wallet_watchAsset",params:e},{retryCount:0})}var J=n(50825);async function K(t,e){return J.n.internal(t,j,"sendTransactionSync",e)}function W(t){return{addChain:e=>o(t,e),deployContract:e=>(function(t,e){let{abi:n,args:r,bytecode:i,...a}=e,s=(0,l.w)({abi:n,args:r,bytecode:i});return(0,u.T)(t,{...a,...a.authorizationList?{to:null}:{},data:s})})(t,e),fillTransaction:e=>(0,i.b)(t,e),getAddresses:()=>h(t),getCallsStatus:e=>(0,f.$)(t,e),getCapabilities:e=>p(t,e),getChainId:()=>(0,a.L)(t),getPermissions:()=>g(t),prepareAuthorization:e=>(0,m.x)(t,e),prepareTransactionRequest:e=>(0,y.ZE)(t,e),requestAddresses:()=>b(t),requestPermissions:e=>w(t,e),sendCalls:e=>(0,v.s_)(t,e),sendCallsSync:e=>N(t,e),sendRawTransaction:e=>(0,T.p)(t,e),sendRawTransactionSync:e=>(0,x.s)(t,e),sendTransaction:e=>(0,u.T)(t,e),sendTransactionSync:e=>j(t,e),showCallsStatus:e=>D(t,e),signAuthorization:e=>$(t,e),signMessage:e=>(0,M.l)(t,e),signTransaction:e=>V(t,e),signTypedData:e=>G(t,e),switchChain:e=>H(t,e),waitForCallsStatus:e=>(0,E.l)(t,e),watchAsset:e=>q(t,e),writeContract:e=>(0,J.n)(t,e),writeContractSync:e=>K(t,e)}}var Z=n(18849);async function Y(t,e={}){return(await (0,Z.e)(t,e)).extend(W)}var X=n(27534),Q=n(2265),tt=n(97074),te=n(44005),tn=n(12364),tr=n(21843);function ti(){var t,e,n,i;let a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{query:s={},...o}=a,l=(0,tn.Z)(o),u=(0,r.NL)(),{address:c,connector:h,status:f}=(0,tr.R)({config:l}),d=(0,te.x)({config:l}),p=null!==(t=a.connector)&&void 0!==t?t:h,{queryKey:g,...m}=function(t,e={}){return{gcTime:0,async queryFn({queryKey:n}){let{connector:r}=e,{connectorUid:i,scopeKey:a,...s}=n[1];return Y(t,{...s,connector:r})},queryKey:function(t={}){let{connector:e,...n}=t;return["walletClient",{...(0,X.OP)(n),connectorUid:e?.uid}]}(e)}}(l,{...a,chainId:null!==(e=a.chainId)&&void 0!==e?e:d,connector:null!==(n=a.connector)&&void 0!==n?n:h}),y=!!(("connected"===f||"reconnecting"===f&&(null==p?void 0:p.getProvider))&&(null===(i=s.enabled)||void 0===i||i)),b=(0,Q.useRef)(c);return(0,Q.useEffect)(()=>{let t=b.current;!c&&t?(u.removeQueries({queryKey:g}),b.current=void 0):c!==t&&(u.invalidateQueries({queryKey:g}),b.current=c)},[c,u]),(0,tt.aM)({...s,...m,queryKey:g,enabled:y,staleTime:Number.POSITIVE_INFINITY})}}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/642-85023725345243d1.js b/frontend/.next/static/chunks/642-85023725345243d1.js new file mode 100644 index 0000000..2cf5744 --- /dev/null +++ b/frontend/.next/static/chunks/642-85023725345243d1.js @@ -0,0 +1,28 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[642],{40257:function(e,t,n){"use strict";var r,i;e.exports=(null==(r=n.g.process)?void 0:r.env)&&"object"==typeof(null==(i=n.g.process)?void 0:i.env)?n.g.process:n(44227)},44227:function(e){!function(){var t={229:function(e){var t,n,r,i=e.exports={};function s(){throw Error("setTimeout has not been defined")}function a(){throw Error("clearTimeout has not been defined")}function o(e){if(t===setTimeout)return setTimeout(e,0);if((t===s||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:s}catch(e){t=s}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var c=[],u=!1,f=-1;function l(){u&&r&&(u=!1,r.length?c=r.concat(c):f=-1,c.length&&d())}function d(){if(!u){var e=o(l);u=!0;for(var t=c.length;t;){for(r=c,c=[];++f1)for(var n=1;n{if(!i.sk&&window.addEventListener){let t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return"boolean"==typeof this.#e?this.#e:globalThis.document?.visibilityState!=="hidden"}}},18238:function(e,t,n){"use strict";n.d(t,{Vr:function(){return i}});var r=n(84554).Hp,i=function(){let e=[],t=0,n=e=>{e()},i=e=>{e()},s=r,a=r=>{t?e.push(r):s(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&s(()=>{i(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{--t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{i=e},setScheduler:e=>{s=e}}}()},57853:function(e,t,n){"use strict";n.d(t,{N:function(){return s}});var r=n(24112),i=n(45345),s=new class extends r.l{#r=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!i.sk&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#r!==e&&(this.#r=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#r}}},21733:function(e,t,n){"use strict";n.d(t,{A:function(){return o},z:function(){return c}});var r=n(45345),i=n(18238),s=n(11255),a=n(7989),o=class extends a.F{#i;#s;#a;#o;#c;#u;#f;constructor(e){super(),this.#f=!1,this.#u=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#o=e.client,this.#a=this.#o.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#i=f(this.options),this.state=e.state??this.#i,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#c?.promise}setOptions(e){if(this.options={...this.#u,...e},this.updateGcTime(this.options.gcTime),this.state&&void 0===this.state.data){let e=f(this.options);void 0!==e.data&&(this.setState(u(e.data,e.dataUpdatedAt)),this.#i=e)}}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.#a.remove(this)}setData(e,t){let n=(0,r.oE)(this.state.data,e,this.options);return this.#l({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#l({type:"setState",state:e,setStateOptions:t})}cancel(e){let t=this.#c?.promise;return this.#c?.cancel(e),t?t.then(r.ZT).catch(r.ZT):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#i)}isActive(){return this.observers.some(e=>!1!==(0,r.Nc)(e.options.enabled,this))}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===r.CN||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>"static"===(0,r.KC)(e.options.staleTime,this))}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):void 0===this.state.data||this.state.isInvalidated}isStaleByTime(e=0){return void 0===this.state.data||"static"!==e&&(!!this.state.isInvalidated||!(0,r.Kp)(this.state.dataUpdatedAt,e))}onFocus(){let e=this.observers.find(e=>e.shouldFetchOnWindowFocus());e?.refetch({cancelRefetch:!1}),this.#c?.continue()}onOnline(){let e=this.observers.find(e=>e.shouldFetchOnReconnect());e?.refetch({cancelRefetch:!1}),this.#c?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#a.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#c&&(this.#f?this.#c.cancel({revert:!0}):this.#c.cancelRetry()),this.scheduleGc()),this.#a.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#l({type:"invalidate"})}async fetch(e,t){if("idle"!==this.state.fetchStatus&&this.#c?.status()!=="rejected"){if(void 0!==this.state.data&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#c)return this.#c.continueRetry(),this.#c.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,i=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#f=!0,n.signal)})},a=()=>{let e=(0,r.cG)(this.options,t),n=(()=>{let e={client:this.#o,queryKey:this.queryKey,meta:this.meta};return i(e),e})();return(this.#f=!1,this.options.persister)?this.options.persister(e,n,this):e(n)},o=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#o,state:this.state,fetchFn:a};return i(e),e})();this.options.behavior?.onFetch(o,this),this.#s=this.state,("idle"===this.state.fetchStatus||this.state.fetchMeta!==o.fetchOptions?.meta)&&this.#l({type:"fetch",meta:o.fetchOptions?.meta}),this.#c=(0,s.Mz)({initialPromise:t?.initialPromise,fn:o.fetchFn,onCancel:e=>{e instanceof s.p8&&e.revert&&this.setState({...this.#s,fetchStatus:"idle"}),n.abort()},onFail:(e,t)=>{this.#l({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#l({type:"pause"})},onContinue:()=>{this.#l({type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0});try{let e=await this.#c.start();if(void 0===e)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#a.config.onSuccess?.(e,this),this.#a.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof s.p8){if(e.silent)return this.#c.promise;if(e.revert){if(void 0===this.state.data)throw e;return this.state.data}}throw this.#l({type:"error",error:e}),this.#a.config.onError?.(e,this),this.#a.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#l(e){this.state=(t=>{switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,...c(t.data,this.options),fetchMeta:e.meta??null};case"success":let n={...t,...u(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#s=e.manual?n:void 0,n;case"error":let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error"};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}})(this.state),i.Vr.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#a.notify({query:this,type:"updated",action:e})})}};function c(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:(0,s.Kw)(t.networkMode)?"fetching":"paused",...void 0===e&&{error:null,status:"pending"}}}function u(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function f(e){let t="function"==typeof e.initialData?e.initialData():e.initialData,n=void 0!==t,r=n?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}},7989:function(e,t,n){"use strict";n.d(t,{F:function(){return s}});var r=n(84554),i=n(45345),s=class{#d;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),(0,i.PN)(this.gcTime)&&(this.#d=r.mr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(i.sk?1/0:3e5))}clearGcTimeout(){this.#d&&(r.mr.clearTimeout(this.#d),this.#d=void 0)}}},11255:function(e,t,n){"use strict";n.d(t,{Kw:function(){return c},Mz:function(){return f},p8:function(){return u}});var r=n(87045),i=n(57853),s=n(16803),a=n(45345);function o(e){return Math.min(1e3*2**e,3e4)}function c(e){return(e??"online")!=="online"||i.N.isOnline()}var u=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function f(e){let t,n=!1,f=0,l=(0,s.O)(),d=()=>"pending"!==l.status,b=()=>r.j.isFocused()&&("always"===e.networkMode||i.N.isOnline())&&e.canRun(),p=()=>c(e.networkMode)&&e.canRun(),h=e=>{d()||(t?.(),l.resolve(e))},m=e=>{d()||(t?.(),l.reject(e))},y=()=>new Promise(n=>{t=e=>{(d()||b())&&n(e)},e.onPause?.()}).then(()=>{t=void 0,d()||e.onContinue?.()}),g=()=>{let t;if(d())return;let r=0===f?e.initialPromise:void 0;try{t=r??e.fn()}catch(e){t=Promise.reject(e)}Promise.resolve(t).then(h).catch(t=>{if(d())return;let r=e.retry??(a.sk?0:3),i=e.retryDelay??o,s="function"==typeof i?i(f,t):i,c=!0===r||"number"==typeof r&&fb()?void 0:y()).then(()=>{n?m(t):g()})})};return{promise:l,status:()=>l.status,cancel:t=>{if(!d()){let n=new u(t);m(n),e.onCancel?.(n)}},continue:()=>(t?.(),l),cancelRetry:()=>{n=!0},continueRetry:()=>{n=!1},canStart:p,start:()=>(p()?g():y().then(g),l)}}},24112:function(e,t,n){"use strict";n.d(t,{l:function(){return r}});var r=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}},16803:function(e,t,n){"use strict";function r(){let e,t;let n=new Promise((n,r)=>{e=n,t=r});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.status="pending",n.catch(()=>{}),n.resolve=t=>{r({status:"fulfilled",value:t}),e(t)},n.reject=e=>{r({status:"rejected",reason:e}),t(e)},n}n.d(t,{O:function(){return r}})},84554:function(e,t,n){"use strict";n.d(t,{Hp:function(){return s},mr:function(){return i}});var r={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},i=new class{#b=r;#p=!1;setTimeoutProvider(e){this.#b=e}setTimeout(e,t){return this.#b.setTimeout(e,t)}clearTimeout(e){this.#b.clearTimeout(e)}setInterval(e,t){return this.#b.setInterval(e,t)}clearInterval(e){this.#b.clearInterval(e)}};function s(e){setTimeout(e,0)}},45345:function(e,t,n){"use strict";n.d(t,{CN:function(){return T},Ht:function(){return I},KC:function(){return u},Kp:function(){return c},L3:function(){return E},Nc:function(){return f},PN:function(){return o},Q$:function(){return y},Rm:function(){return b},SE:function(){return a},VS:function(){return g},VX:function(){return G},X7:function(){return d},Ym:function(){return p},ZT:function(){return s},_v:function(){return P},_x:function(){return l},cG:function(){return M},oE:function(){return $},sk:function(){return i},to:function(){return h}});var r=n(84554),i="undefined"==typeof window||"Deno"in globalThis;function s(){}function a(e,t){return"function"==typeof e?e(t):e}function o(e){return"number"==typeof e&&e>=0&&e!==1/0}function c(e,t){return Math.max(e+(t||0)-Date.now(),0)}function u(e,t){return"function"==typeof e?e(t):e}function f(e,t){return"function"==typeof e?e(t):e}function l(e,t){let{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:a,stale:o}=e;if(a){if(r){if(t.queryHash!==b(a,t.options))return!1}else if(!h(t.queryKey,a))return!1}if("all"!==n){let e=t.isActive();if("active"===n&&!e||"inactive"===n&&e)return!1}return("boolean"!=typeof o||t.isStale()===o)&&(!i||i===t.state.fetchStatus)&&(!s||!!s(t))}function d(e,t){let{exact:n,status:r,predicate:i,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(p(t.options.mutationKey)!==p(s))return!1}else if(!h(t.options.mutationKey,s))return!1}return(!r||t.state.status===r)&&(!i||!!i(t))}function b(e,t){return(t?.queryKeyHashFn||p)(e)}function p(e){return JSON.stringify(e,(e,t)=>w(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function h(e,t){return e===t||typeof e==typeof t&&!!e&&!!t&&"object"==typeof e&&"object"==typeof t&&Object.keys(t).every(n=>h(e[n],t[n]))}var m=Object.prototype.hasOwnProperty;function y(e,t){if(e===t)return e;let n=v(e)&&v(t);if(!n&&!(w(e)&&w(t)))return t;let r=(n?e:Object.keys(e)).length,i=n?t:Object.keys(t),s=i.length,a=n?Array(s):{},o=0;for(let c=0;c{r.mr.setTimeout(t,e)})}function $(e,t,n){return"function"==typeof n.structuralSharing?n.structuralSharing(e,t):!1!==n.structuralSharing?y(e,t):t}function G(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function I(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var T=Symbol();function M(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:e.queryFn&&e.queryFn!==T?e.queryFn:()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`))}function E(e,t){return"function"==typeof e?e(...t):!!e}},29827:function(e,t,n){"use strict";n.d(t,{NL:function(){return a},aH:function(){return o}});var r=n(2265),i=n(57437),s=r.createContext(void 0),a=e=>{let t=r.useContext(s);if(e)return e;if(!t)throw Error("No QueryClient set, use QueryClientProvider to set one");return t},o=e=>{let{client:t,children:n}=e;return r.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),(0,i.jsx)(s.Provider,{value:t,children:n})}},23317:function(e,t,n){"use strict";function r(e){let t=e.state.current,n=e.state.connections.get(t),r=n?.accounts,i=r?.[0],s=e.chains.find(e=>e.id===n?.chainId),a=e.state.status;switch(a){case"connected":return{address:i,addresses:r,chain:s,chainId:n?.chainId,connector:n?.connector,isConnected:!0,isConnecting:!1,isDisconnected:!1,isReconnecting:!1,status:a};case"reconnecting":return{address:i,addresses:r,chain:s,chainId:n?.chainId,connector:n?.connector,isConnected:!!i,isConnecting:!1,isDisconnected:!1,isReconnecting:!0,status:a};case"connecting":return{address:i,addresses:r,chain:s,chainId:n?.chainId,connector:n?.connector,isConnected:!1,isConnecting:!0,isDisconnected:!1,isReconnecting:!1,status:a};case"disconnected":return{address:void 0,addresses:void 0,chain:void 0,chainId:void 0,connector:void 0,isConnected:!1,isConnecting:!1,isDisconnected:!0,isReconnecting:!1,status:a}}}n.d(t,{B:function(){return r}})},18849:function(e,t,n){"use strict";n.d(t,{e:function(){return c}});var r=n(82538),i=n(24250),s=n(19775),a=n(31669),o=n(13102);async function c(e,t={}){let n;let{assertChainId:c=!0}=t;if(t.connector){let{connector:r}=t;if("reconnecting"===e.state.status&&!r.getAccounts&&!r.getChainId)throw new o.$S({connector:r});let[i,s]=await Promise.all([r.getAccounts().catch(e=>{if(null===t.account)return[];throw e}),r.getChainId()]);n={accounts:i,chainId:s,connector:r}}else n=e.state.connections.get(e.state.current);if(!n)throw new o.aH;let u=t.chainId??n.chainId,f=await n.connector.getChainId();if(c&&f!==u)throw new o.XZ({connectionChainId:u,connectorChainId:f});let l=n.connector;if(l.getClient)return l.getClient({chainId:u});let d=(0,s.T)(t.account??n.accounts[0]);if(d&&(d.address=(0,a.K)(d.address)),t.account&&!n.accounts.some(e=>e.toLowerCase()===d.address.toLowerCase()))throw new o.JK({address:d.address,connector:l});let b=e.chains.find(e=>e.id===u),p=await n.connector.getProvider({chainId:u});return(0,r.e)({account:d,chain:b,name:"Connector Client",transport:e=>(function(e,t={}){let{key:n="custom",methods:r,name:s="Custom Provider",retryDelay:a}=t;return({retryCount:o})=>(0,i.q)({key:n,methods:r,name:s,request:e.request.bind(e),retryCount:t.retryCount??o,retryDelay:a,type:"custom"})})(p)({...e,retryCount:0})})}},54026:function(e,t,n){"use strict";n.d(t,{G:function(){return i}});let r=!1;async function i(e,t={}){let n;if(r)return[];r=!0,e.setState(e=>({...e,status:e.current?"reconnecting":"connecting"}));let i=[];if(t.connectors?.length)for(let n of t.connectors){let t;t="function"==typeof n?e._internal.connectors.setup(n):n,i.push(t)}else i.push(...e.connectors);try{n=await e.storage?.getItem("recentConnectorId")}catch{}let s={};for(let[,t]of e.state.connections)s[t.connector.id]=1;n&&(s[n]=0);let a=Object.keys(s).length>0?[...i].sort((e,t)=>(s[e.id]??10)-(s[t.id]??10)):i,o=!1,c=[],u=[];for(let t of a){let n=await t.getProvider().catch(()=>void 0);if(!n||u.some(e=>e===n)||!await t.isAuthorized())continue;let r=await t.connect({isReconnecting:!0}).catch(()=>null);r&&(t.emitter.off("connect",e._internal.events.connect),t.emitter.on("change",e._internal.events.change),t.emitter.on("disconnect",e._internal.events.disconnect),e.setState(e=>{let n=new Map(o?e.connections:new Map).set(t.uid,{accounts:r.accounts,chainId:r.chainId,connector:t});return{...e,current:o?e.current:t.uid,connections:n}}),c.push({accounts:r.accounts,chainId:r.chainId,connector:t}),u.push(n),o=!0)}return("reconnecting"===e.state.status||"connecting"===e.state.status)&&(o?e.setState(e=>({...e,status:"connected"})):e.setState(e=>({...e,connections:new Map,current:null,status:"disconnected"}))),r=!1,c}},20148:function(e,t,n){"use strict";n.d(t,{Y:function(){return s}});var r=n(52123),i=n(23317);function s(e,t){let{onChange:n}=t;return e.subscribe(()=>(0,i.B)(e),n,{equalityFn(e,t){let{connector:n,...i}=e,{connector:s,...a}=t;return(0,r.v)(i,a)&&n?.id===s?.id&&n?.uid===s?.uid}})}},26129:function(e,t,n){"use strict";n.d(t,{G:function(){return c}});var r,i,s=n(19676);let a=()=>`@wagmi/core@${s.i}`;var o=function(e,t,n,r){if("a"===n&&!r)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};class c extends Error{get docsBaseUrl(){return"https://wagmi.sh/core"}get version(){return a()}constructor(e,t={}){super(),r.add(this),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WagmiCoreError"});let n=t.cause instanceof c?t.cause.details:t.cause?.message?t.cause.message:t.details,i=t.cause instanceof c&&t.cause.docsPath||t.docsPath;this.message=[e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...i?[`Docs: ${this.docsBaseUrl}${i}.html${t.docsSlug?`#${t.docsSlug}`:""}`]:[],...n?[`Details: ${n}`]:[],`Version: ${this.version}`].join("\n"),t.cause&&(this.cause=t.cause),this.details=n,this.docsPath=i,this.metaMessages=t.metaMessages,this.shortMessage=e}walk(e){return o(this,r,"m",i).call(this,this,e)}}r=new WeakSet,i=function e(t,n){return n?.(t)?t:t.cause?o(this,r,"m",e).call(this,t.cause,n):t}},13102:function(e,t,n){"use strict";n.d(t,{$S:function(){return u},JK:function(){return o},X4:function(){return i},XZ:function(){return c},aH:function(){return a},wi:function(){return s}});var r=n(26129);class i extends r.G{constructor(){super("Chain not configured."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ChainNotConfiguredError"})}}class s extends r.G{constructor(){super("Connector already connected."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorAlreadyConnectedError"})}}class a extends r.G{constructor(){super("Connector not connected."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorNotConnectedError"})}}class o extends r.G{constructor({address:e,connector:t}){super(`Account "${e}" not found for connector "${t.name}".`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorAccountNotFoundError"})}}class c extends r.G{constructor({connectionChainId:e,connectorChainId:t}){super(`The current chain of the connector (id: ${t}) does not match the connection's chain (id: ${e}).`,{metaMessages:[`Current Chain ID: ${t}`,`Expected Chain ID: ${e}`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorChainMismatchError"})}}class u extends r.G{constructor({connector:e}){super(`Connector "${e.name}" unavailable while reconnecting.`,{details:"During the reconnection step, the only connector methods guaranteed to be available are: `id`, `name`, `type`, `uid`. All other methods are not guaranteed to be available until reconnection completes and connectors are fully restored. This error commonly occurs for connectors that asynchronously inject after reconnection has already started."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ConnectorUnavailableReconnectingError"})}}},52123:function(e,t,n){"use strict";n.d(t,{v:function(){return function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){let r,i;if(t.constructor!==n.constructor)return!1;if(Array.isArray(t)&&Array.isArray(n)){if((r=t.length)!==n.length)return!1;for(i=r;0!=i--;)if(!e(t[i],n[i]))return!1;return!0}if("function"==typeof t.valueOf&&t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if("function"==typeof t.toString&&t.toString!==Object.prototype.toString)return t.toString()===n.toString();let s=Object.keys(t);if((r=s.length)!==Object.keys(n).length)return!1;for(i=r;0!=i--;)if(!Object.hasOwn(n,s[i]))return!1;for(i=r;0!=i--;){let r=s[i];if(r&&!e(t[r],n[r]))return!1}return!0}return t!=t&&n!=n}}})},19676:function(e,t,n){"use strict";n.d(t,{i:function(){return r}});let r="3.0.0"},19775:function(e,t,n){"use strict";function r(e){return"string"==typeof e?{address:e,type:"json-rpc"}:e}n.d(t,{T:function(){return r}})},50550:function(e,t,n){"use strict";n.d(t,{R:function(){return P}});var r=n(75475),i=n(30497),s=n(19775),a=n(98158),o=n(45434),c=n(81544),u=n(35586),f=n(20010),l=n(65436),d=n(23010),b=n(17283),p=n(93627),h=n(59455),m=n(14015),y=n(70878),g=n(92614),v=n(43226),w=n(77911),x=n(54605);async function P(e,t){let{account:a=e.account,authorizationList:l,batch:b=!!e.batch?.multicall,blockNumber:p,blockTag:v=e.experimental_blockTag??"latest",accessList:P,blobs:I,blockOverrides:T,code:M,data:E,factory:C,factoryData:F,gas:O,gasPrice:A,maxFeePerBlobGas:k,maxFeePerGas:B,maxPriorityFeePerGas:j,nonce:S,to:R,value:N,stateOverride:z,...U}=t,L=a?(0,s.T)(a):void 0;if(M&&(C||F))throw new c.G("Cannot provide both `code` & `factory`/`factoryData` as parameters.");if(M&&R)throw new c.G("Cannot provide both `code` & `to` as parameters.");let _=M&&E,D=C&&F&&R&&E,q=_||D,H=_?G({code:M,data:E}):D?function(e){let{data:t,factory:n,factoryData:i,to:s}=e;return(0,d.w)({abi:(0,r.V)(["constructor(address, bytes, address, bytes)"]),bytecode:o.pG,args:[s,t,n,i]})}({data:E,factory:C,factoryData:F,to:R}):E;try{(0,x.F)(t);let n=("bigint"==typeof p?(0,h.eC)(p):void 0)||v,r=T?i.o(T):void 0,s=(0,w.mF)(z),a=e.chain?.formatters?.transactionRequest?.format,o=(a||g.tG)({...(0,y.K)(U,{format:a}),accessList:P,account:L,authorizationList:l,blobs:I,data:H,gas:O,gasPrice:A,maxFeePerBlobGas:k,maxFeePerGas:B,maxPriorityFeePerGas:j,nonce:S,to:q?void 0:R,value:N},"call");if(b&&function({request:e}){let{data:t,to:n,...r}=e;return!(!t||t.startsWith("0x82ad56cb"))&&!!n&&!(Object.values(r).filter(e=>void 0!==e).length>0)}({request:o})&&!s&&!r)try{return await $(e,{...o,blockNumber:p,blockTag:v})}catch(e){if(!(e instanceof u.pZ)&&!(e instanceof u.mm))throw e}let c=(()=>{let e=[o,n];return s&&r?[...e,s,r]:s?[...e,s]:r?[...e,{},r]:e})(),f=await e.request({method:"eth_call",params:c});if("0x"===f)return{data:void 0};return{data:f}}catch(a){let r=function(e){if(!(e instanceof c.G))return;let t=e.walk();return"object"==typeof t?.data?t.data?.data:t.data}(a),{offchainLookup:i,offchainLookupSignature:s}=await n.e(1735).then(n.bind(n,71735));if(!1!==e.ccipRead&&r?.slice(0,10)===s&&R)return{data:await i(e,{data:r,to:R})};if(q&&r?.slice(0,10)==="0x101bb98d")throw new f.Mo({factory:C});throw(0,m.P)(a,{...t,account:L,chain:e.chain})}}async function $(e,t){let{batchSize:n=1024,deployless:r=!1,wait:i=0}="object"==typeof e.batch?.multicall?e.batch.multicall:{},{blockNumber:s,blockTag:c=e.experimental_blockTag??"latest",data:d,to:m}=t,y=(()=>{if(r)return null;if(t.multicallAddress)return t.multicallAddress;if(e.chain)return(0,p.L)({blockNumber:s,chain:e.chain,contract:"multicall3"});throw new u.pZ})(),g=("bigint"==typeof s?(0,h.eC)(s):void 0)||c,{schedule:w}=(0,v.S)({id:`${e.uid}.${g}`,wait:i,shouldSplitBatch:e=>e.reduce((e,{data:t})=>e+(t.length-2),0)>2*n,fn:async t=>{let n=t.map(e=>({allowFailure:!0,callData:e.data,target:e.to})),r=(0,b.R)({abi:a.F8,args:[n],functionName:"aggregate3"}),i=await e.request({method:"eth_call",params:[{...null===y?{data:G({code:o.xd,data:r})}:{to:y,data:r}},g]});return(0,l.k)({abi:a.F8,args:[n],functionName:"aggregate3",data:i||"0x"})}}),[{returnData:x,success:P}]=await w({data:d,to:m});if(!P)throw new f.VQ({data:x});return"0x"===x?{data:void 0}:{data:x}}function G(e){let{code:t,data:n}=e;return(0,d.w)({abi:(0,r.V)(["constructor(bytes, bytes)"]),bytecode:o.NO,args:[t,n]})}},6458:function(e,t,n){"use strict";n.d(t,{C:function(){return u},X:function(){return c}});var r=n(4496),i=n(82645),s=n(96174),a=n(74587),o=n(25283);async function c(e,t){return u(e,t)}async function u(e,t){let{block:n,chain:c=e.chain,request:u,type:f="eip1559"}=t||{},l=await (async()=>"function"==typeof c?.fees?.baseFeeMultiplier?c.fees.baseFeeMultiplier({block:n,client:e,request:u}):c?.fees?.baseFeeMultiplier??1.2)();if(l<1)throw new r.Fz;let d=10**(l.toString().split(".")[1]?.length??0),b=e=>e*BigInt(Math.ceil(l*d))/BigInt(d),p=n||await (0,i.s)(e,a.Q,"getBlock")({});if("function"==typeof c?.fees?.estimateFeesPerGas){let t=await c.fees.estimateFeesPerGas({block:n,client:e,multiply:b,request:u,type:f});if(null!==t)return t}if("eip1559"===f){if("bigint"!=typeof p.baseFeePerGas)throw new r.e5;let t="bigint"==typeof u?.maxPriorityFeePerGas?u.maxPriorityFeePerGas:await (0,s.h)(e,{block:p,chain:c,request:u}),n=b(p.baseFeePerGas);return{maxFeePerGas:u?.maxFeePerGas??n+t,maxPriorityFeePerGas:t}}return{gasPrice:u?.gasPrice??b(await (0,i.s)(e,o.o,"getGasPrice")({}))}}},8741:function(e,t,n){"use strict";n.d(t,{Q:function(){return g}});var r=n(19775),i=n(81544),s=n(55834),a=n(59455),o=n(71282),c=n(29707),u=n(63228);class f extends i.G{constructor(e,{account:t,docsPath:n,chain:r,data:i,gas:s,gasPrice:a,maxFeePerGas:f,maxPriorityFeePerGas:l,nonce:d,to:b,value:p}){super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Estimate Gas Arguments:",(0,u.xr)({from:t?.address,to:b,value:void 0!==p&&`${(0,o.d)(p)} ${r?.nativeCurrency?.symbol||"ETH"}`,data:i,gas:s,gasPrice:void 0!==a&&`${(0,c.o)(a)} gwei`,maxFeePerGas:void 0!==f&&`${(0,c.o)(f)} gwei`,maxPriorityFeePerGas:void 0!==l&&`${(0,c.o)(l)} gwei`,nonce:d})].filter(Boolean),name:"EstimateGasExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=e}}var l=n(78125),d=n(18856),b=n(70878),p=n(92614),h=n(77911),m=n(54605),y=n(34467);async function g(e,t){let{account:n=e.account,prepare:o=!0}=t,c=n?(0,r.T)(n):void 0,u=Array.isArray(o)?o:c?.type!=="local"?["blobVersionedHashes"]:void 0;try{let n=await (async()=>t.to?t.to:t.authorizationList&&t.authorizationList.length>0?await (0,s.z)({authorization:t.authorizationList[0]}).catch(()=>{throw new i.G("`to` is required. Could not infer from `authorizationList`")}):void 0)(),{accessList:r,authorizationList:f,blobs:l,blobVersionedHashes:d,blockNumber:g,blockTag:v,data:w,gas:x,gasPrice:P,maxFeePerBlobGas:$,maxFeePerGas:G,maxPriorityFeePerGas:I,nonce:T,value:M,stateOverride:E,...C}=o?await (0,y.ZE)(e,{...t,parameters:u,to:n}):t;if(x&&t.gas!==x)return x;let F=("bigint"==typeof g?(0,a.eC)(g):void 0)||v,O=(0,h.mF)(E);(0,m.F)(t);let A=e.chain?.formatters?.transactionRequest?.format,k=(A||p.tG)({...(0,b.K)(C,{format:A}),account:c,accessList:r,authorizationList:f,blobs:l,blobVersionedHashes:d,data:w,gasPrice:P,maxFeePerBlobGas:$,maxFeePerGas:G,maxPriorityFeePerGas:I,nonce:T,to:n,value:M},"estimateGas");return BigInt(await e.request({method:"eth_estimateGas",params:O?[k,F??e.experimental_blockTag??"latest",O]:F?[k,F]:[k]}))}catch(n){throw function(e,{docsPath:t,...n}){return new f((()=>{let t=(0,d.k)(e,n);return t instanceof l.cj?e:t})(),{docsPath:t,...n})}(n,{...t,account:c,chain:e.chain})}}},96174:function(e,t,n){"use strict";n.d(t,{_:function(){return c},h:function(){return u}});var r=n(4496),i=n(72932),s=n(82645),a=n(74587),o=n(25283);async function c(e,t){return u(e,t)}async function u(e,t){let{block:n,chain:c=e.chain,request:u}=t||{};try{let t=c?.fees?.maxPriorityFeePerGas??c?.fees?.defaultPriorityFee;if("function"==typeof t){let r=n||await (0,s.s)(e,a.Q,"getBlock")({}),i=await t({block:r,client:e,request:u});if(null===i)throw Error();return i}if(void 0!==t)return t;let r=await e.request({method:"eth_maxPriorityFeePerGas"});return(0,i.y_)(r)}catch{let[t,i]=await Promise.all([n?Promise.resolve(n):(0,s.s)(e,a.Q,"getBlock")({}),(0,s.s)(e,o.o,"getGasPrice")({})]);if("bigint"!=typeof t.baseFeePerGas)throw new r.e5;let c=i-t.baseFeePerGas;if(c<0n)return 0n;return c}}},332:function(e,t,n){"use strict";n.d(t,{b:function(){return b}});var r=n(19775),i=n(4496),s=n(93606),a=n(70878),o=n(27481),c=n(92614),u=n(82645),f=n(54605),l=n(74587),d=n(12363);async function b(e,t){let{account:n=e.account,accessList:b,authorizationList:p,chain:h=e.chain,blobVersionedHashes:m,blobs:y,data:g,gas:v,gasPrice:w,maxFeePerBlobGas:x,maxFeePerGas:P,maxPriorityFeePerGas:$,nonce:G,nonceManager:I,to:T,type:M,value:E,...C}=t,F=await (async()=>{if(!n||!I||void 0!==G)return G;let t=(0,r.T)(n),i=h?h.id:await (0,u.s)(e,d.L,"getChainId")({});return await I.consume({address:t.address,chainId:i,client:e})})();(0,f.F)(t);let O=h?.formatters?.transactionRequest?.format,A=(O||c.tG)({...(0,a.K)(C,{format:O}),account:n?(0,r.T)(n):void 0,accessList:b,authorizationList:p,blobs:y,blobVersionedHashes:m,data:g,gas:v,gasPrice:w,maxFeePerBlobGas:x,maxFeePerGas:P,maxPriorityFeePerGas:$,nonce:F,to:T,type:M,value:E},"fillTransaction");try{let n=await e.request({method:"eth_fillTransaction",params:[A]}),r=(h?.formatters?.transaction?.format||o.Tr)(n.tx);delete r.blockHash,delete r.blockNumber,delete r.r,delete r.s,delete r.transactionIndex,delete r.v,delete r.yParity,r.data=r.input,r.gas&&(r.gas=t.gas??r.gas),r.gasPrice&&(r.gasPrice=t.gasPrice??r.gasPrice),r.maxFeePerBlobGas&&(r.maxFeePerBlobGas=t.maxFeePerBlobGas??r.maxFeePerBlobGas),r.maxFeePerGas&&(r.maxFeePerGas=t.maxFeePerGas??r.maxFeePerGas),r.maxPriorityFeePerGas&&(r.maxPriorityFeePerGas=t.maxPriorityFeePerGas??r.maxPriorityFeePerGas),r.nonce&&(r.nonce=t.nonce??r.nonce);let s=await (async()=>{if("function"==typeof h?.fees?.baseFeeMultiplier){let n=await (0,u.s)(e,l.Q,"getBlock")({});return h.fees.baseFeeMultiplier({block:n,client:e,request:t})}return h?.fees?.baseFeeMultiplier??1.2})();if(s<1)throw new i.Fz;let a=s.toString().split(".")[1]?.length??0,c=10**a,f=e=>e*BigInt(Math.ceil(s*c))/BigInt(c);return r.maxFeePerGas&&!t.maxFeePerGas&&(r.maxFeePerGas=f(r.maxFeePerGas)),r.gasPrice&&!t.gasPrice&&(r.gasPrice=f(r.gasPrice)),{raw:n.raw,transaction:{from:A.from,...r}}}catch(n){throw(0,s.$)(n,{...t,chain:e.chain})}}},74587:function(e,t,n){"use strict";n.d(t,{Q:function(){return a}});var r=n(12197),i=n(59455),s=n(59069);async function a(e,{blockHash:t,blockNumber:n,blockTag:a=e.experimental_blockTag??"latest",includeTransactions:o}={}){let c=o??!1,u=void 0!==n?(0,i.eC)(n):void 0,f=null;if(!(f=t?await e.request({method:"eth_getBlockByHash",params:[t,c]},{dedupe:!0}):await e.request({method:"eth_getBlockByNumber",params:[u||a,c]},{dedupe:!!u})))throw new r.f({blockHash:t,blockNumber:n});return(e.chain?.formatters?.block?.format||s.Z)(f,"getBlock")}},13708:function(e,t,n){"use strict";n.d(t,{z:function(){return o}});let r=new Map,i=new Map;async function s(e,{cacheKey:t,cacheTime:n=Number.POSITIVE_INFINITY}){let s=function(e){let t=(e,t)=>({clear:()=>t.delete(e),get:()=>t.get(e),set:n=>t.set(e,n)}),n=t(e,r),s=t(e,i);return{clear:()=>{n.clear(),s.clear()},promise:n,response:s}}(t),a=s.response.get();if(a&&n>0&&Date.now()-a.created.getTime()`blockNumber.${e}`;async function o(e,{cacheTime:t=e.cacheTime}={}){return BigInt(await s(()=>e.request({method:"eth_blockNumber"}),{cacheKey:a(e.uid),cacheTime:t}))}},12363:function(e,t,n){"use strict";n.d(t,{L:function(){return i}});var r=n(72932);async function i(e){let t=await e.request({method:"eth_chainId"},{dedupe:!0});return(0,r.ly)(t)}},25283:function(e,t,n){"use strict";async function r(e){return BigInt(await e.request({method:"eth_gasPrice"}))}n.d(t,{o:function(){return r}})},39277:function(e,t,n){"use strict";n.d(t,{f:function(){return a}});var r=n(63228),i=n(59455),s=n(27481);async function a(e,{blockHash:t,blockNumber:n,blockTag:a,hash:o,index:c,sender:u,nonce:f}){let l=a||"latest",d=void 0!==n?(0,i.eC)(n):void 0,b=null;if(o?b=await e.request({method:"eth_getTransactionByHash",params:[o]},{dedupe:!0}):t?b=await e.request({method:"eth_getTransactionByBlockHashAndIndex",params:[t,(0,i.eC)(c)]},{dedupe:!0}):(d||l)&&"number"==typeof c?b=await e.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[d||l,(0,i.eC)(c)]},{dedupe:!!d}):u&&"number"==typeof f&&(b=await e.request({method:"eth_getTransactionBySenderAndNonce",params:[u,(0,i.eC)(f)]},{dedupe:!0})),!b)throw new r.Bh({blockHash:t,blockNumber:n,blockTag:l,hash:o,index:c});return(e.chain?.formatters?.transaction?.format||s.Tr)(b,"getTransaction")}},16689:function(e,t,n){"use strict";n.d(t,{K:function(){return s}});var r=n(72932),i=n(59455);async function s(e,{address:t,blockTag:n="latest",blockNumber:s}){let a=await e.request({method:"eth_getTransactionCount",params:[t,"bigint"==typeof s?(0,i.eC)(s):n]},{dedupe:!!s});return(0,r.ly)(a)}},78526:function(e,t,n){"use strict";n.d(t,{a:function(){return s}});var r=n(63228),i=n(13550);async function s(e,{hash:t}){let n=await e.request({method:"eth_getTransactionReceipt",params:[t]},{dedupe:!0});if(!n)throw new r.Yb({hash:t});return(e.chain?.formatters?.transactionReceipt?.format||i.fA)(n,"getTransactionReceipt")}},67348:function(e,t,n){"use strict";n.d(t,{e:function(){return p}});var r=n(12197),i=n(63228),s=n(82645),a=n(36478),o=n(56921),c=n(49287),u=n(31853),f=n(74587),l=n(39277),d=n(78526),b=n(99376);async function p(e,t){let n,p,h,m,y;let{checkReplacement:g=!0,confirmations:v=1,hash:w,onReplaced:x,retryCount:P=6,retryDelay:$=({count:e})=>200*~~(1<{y?.(),m?.(),F(new i.mc({hash:w}))},G):void 0;return m=(0,a.N7)(I,{onReplaced:x,resolve:C,reject:F},async t=>{if((h=await (0,s.s)(e,d.a,"getTransactionReceipt")({hash:w}).catch(()=>void 0))&&v<=1){clearTimeout(O),t.resolve(h),m?.();return}y=(0,s.s)(e,b.q,"watchBlockNumber")({emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:T,async onBlockNumber(a){let o=e=>{clearTimeout(O),y?.(),e(),m?.()},u=a;if(!M)try{if(h){if(v>1&&(!h.blockNumber||u-h.blockNumber+1nt.resolve(h));return}if(g&&!n&&(M=!0,await (0,c.J)(async()=>{(n=await (0,s.s)(e,l.f,"getTransaction")({hash:w})).blockNumber&&(u=n.blockNumber)},{delay:$,retryCount:P}),M=!1),h=await (0,s.s)(e,d.a,"getTransactionReceipt")({hash:w}),v>1&&(!h.blockNumber||u-h.blockNumber+1nt.resolve(h))}catch(a){if(a instanceof i.Bh||a instanceof i.Yb){if(!n){M=!1;return}try{p=n,M=!0;let i=await (0,c.J)(()=>(0,s.s)(e,f.Q,"getBlock")({blockNumber:u,includeTransactions:!0}),{delay:$,retryCount:P,shouldRetry:({error:e})=>e instanceof r.f});M=!1;let a=i.transactions.find(({from:e,nonce:t})=>e===p.from&&t===p.nonce);if(!a||(h=await (0,s.s)(e,d.a,"getTransactionReceipt")({hash:a.hash}),v>1&&(!h.blockNumber||u-h.blockNumber+1n{t.onReplaced?.({reason:l,replacedTransaction:p,transaction:a,transactionReceipt:h}),t.resolve(h)})}catch(e){o(()=>t.reject(e))}}else o(()=>t.reject(a))}}})}),E}},99376:function(e,t,n){"use strict";n.d(t,{q:function(){return u}});var r=n(72932),i=n(82645),s=n(36478),a=n(41495),o=n(31853),c=n(13708);function u(e,{emitOnBegin:t=!1,emitMissed:n=!1,onBlockNumber:u,onError:f,poll:l,pollingInterval:d=e.pollingInterval}){let b;return(void 0!==l?l:"webSocket"!==e.transport.type&&"ipc"!==e.transport.type&&("fallback"!==e.transport.type||"webSocket"!==e.transport.transports[0].config.type&&"ipc"!==e.transport.transports[0].config.type))?(()=>{let r=(0,o.P)(["watchBlockNumber",e.uid,t,n,d]);return(0,s.N7)(r,{onBlockNumber:u,onError:f},r=>(0,a.$)(async()=>{try{let t=await (0,i.s)(e,c.z,"getBlockNumber")({cacheTime:0});if(void 0!==b){if(t===b)return;if(t-b>1&&n)for(let e=b+1n;eb)&&(r.onBlockNumber(t,b),b=t)}catch(e){r.onError?.(e)}},{emitOnBegin:t,interval:d}))})():(()=>{let i=(0,o.P)(["watchBlockNumber",e.uid,t,n]);return(0,s.N7)(i,{onBlockNumber:u,onError:f},t=>{let n=!0,i=()=>n=!1;return(async()=>{try{let s=(()=>{if("fallback"===e.transport.type){let t=e.transport.transports.find(e=>"webSocket"===e.config.type||"ipc"===e.config.type);return t?t.value:e.transport}return e.transport})(),{unsubscribe:a}=await s.subscribe({params:["newHeads"],onData(e){if(!n)return;let i=(0,r.y_)(e.result?.number);t.onBlockNumber(i,b),b=i},onError(e){t.onError?.(e)}});i=a,n||i()}catch(e){f?.(e)}})(),()=>i()})})()}},34467:function(e,t,n){"use strict";n.d(t,{QZ:function(){return v},ZE:function(){return P}});var r=n(19775),i=n(6458),s=n(8741),a=n(74587),o=n(16689),c=n(4496),u=n(63563),f=n(67496),l=n(89952),d=n(10932),b=n(82645),p=n(82061),h=n(54605),m=n(90683),y=n(332),g=n(12363);let v=["blobVersionedHashes","chainId","fees","gas","nonce","type"],w=new Map,x=new p.k(128);async function P(e,t){let n,p,P=t,{account:$=e.account,chain:G=e.chain,nonceManager:I,parameters:T=v}=P,M="function"==typeof G?.prepareTransactionRequest?{fn:G.prepareTransactionRequest,runAt:["beforeFillTransaction"]}:Array.isArray(G?.prepareTransactionRequest)?{fn:G.prepareTransactionRequest[0],runAt:G.prepareTransactionRequest[1].runAt}:void 0;async function E(){return n||(void 0!==P.chainId?P.chainId:G?G.id:n=await (0,b.s)(e,g.L,"getChainId")({}))}let C=$?(0,r.T)($):$,F=P.nonce;if(T.includes("nonce")&&void 0===F&&C&&I){let t=await E();F=await I.consume({address:C.address,chainId:t,client:e})}M?.fn&&M.runAt?.includes("beforeFillTransaction")&&(P=await M.fn(P,{phase:"beforeFillTransaction"}),F??=P.nonce);let O=(!(T.includes("blobVersionedHashes")||T.includes("sidecars"))||!P.kzg||!P.blobs)&&!1!==x.get(e.uid)&&["fees","gas"].some(e=>T.includes(e))&&(T.includes("chainId")&&"number"!=typeof P.chainId||T.includes("nonce")&&"number"!=typeof F||T.includes("fees")&&"bigint"!=typeof P.gasPrice&&("bigint"!=typeof P.maxFeePerGas||"bigint"!=typeof P.maxPriorityFeePerGas)||T.includes("gas")&&"bigint"!=typeof P.gas)?await (0,b.s)(e,y.b,"fillTransaction")({...P,nonce:F}).then(t=>{let{chainId:n,from:r,gas:i,gasPrice:s,nonce:a,maxFeePerBlobGas:o,maxFeePerGas:c,maxPriorityFeePerGas:u,type:f,...l}=t.transaction;return x.set(e.uid,!0),{...P,...r?{from:r}:{},...f?{type:f}:{},...void 0!==n?{chainId:n}:{},...void 0!==i?{gas:i}:{},...void 0!==s?{gasPrice:s}:{},...void 0!==a?{nonce:a}:{},...void 0!==o?{maxFeePerBlobGas:o}:{},...void 0!==c?{maxFeePerGas:c}:{},...void 0!==u?{maxPriorityFeePerGas:u}:{},..."nonceKey"in l&&void 0!==l.nonceKey?{nonceKey:l.nonceKey}:{}}}).catch(t=>(t.walk?.(e=>"MethodNotFoundRpcError"===e.name||"MethodNotSupportedRpcError"===e.name)&&x.set(e.uid,!1),P)):P;F??=O.nonce;let{blobs:A,gas:k,kzg:B,type:j}=P={...O,...C?{from:C?.address}:{},...F?{nonce:F}:{}};async function S(){return p||(p=await (0,b.s)(e,a.Q,"getBlock")({blockTag:"latest"}))}if(M?.fn&&M.runAt?.includes("beforeFillParameters")&&(P=await M.fn(P,{phase:"beforeFillParameters"})),T.includes("nonce")&&void 0===F&&C&&!I&&(P.nonce=await (0,b.s)(e,o.K,"getTransactionCount")({address:C.address,blockTag:"pending"})),(T.includes("blobVersionedHashes")||T.includes("sidecars"))&&A&&B){let e=(0,u.P)({blobs:A,kzg:B});if(T.includes("blobVersionedHashes")){let t=(0,l.C)({commitments:e,to:"hex"});P.blobVersionedHashes=t}if(T.includes("sidecars")){let t=(0,f.y)({blobs:A,commitments:e,kzg:B}),n=(0,d.j)({blobs:A,commitments:e,proofs:t,to:"hex"});P.sidecars=n}}if(T.includes("chainId")&&(P.chainId=await E()),(T.includes("fees")||T.includes("type"))&&void 0===j)try{P.type=(0,m.l)(P)}catch{let t=w.get(e.uid);if(void 0===t){let n=await S();t="bigint"==typeof n?.baseFeePerGas,w.set(e.uid,t)}P.type=t?"eip1559":"legacy"}if(T.includes("fees")){if("legacy"!==P.type&&"eip2930"!==P.type){if(void 0===P.maxFeePerGas||void 0===P.maxPriorityFeePerGas){let t=await S(),{maxFeePerGas:n,maxPriorityFeePerGas:r}=await (0,i.C)(e,{block:t,chain:G,request:P});if(void 0===P.maxPriorityFeePerGas&&P.maxFeePerGas&&P.maxFeePerGast.to?t.to:null!==t.to&&v&&v.length>0?await (0,a.z)({authorization:v[0]}).catch(()=>{throw new s.G("`to` is required. Could not infer from `authorizationList`.")}):void 0)();if(O?.type==="json-rpc"||null===O){let t;null!==d&&(t=await (0,l.s)(e,p.L,"getChainId")({}),(0,o.q)({currentChainId:t,chain:d}));let r=e.chain?.formatters?.transactionRequest?.format,i=(r||f.tG)({...(0,u.K)(F,{format:r}),accessList:g,account:O,authorizationList:v,blobs:w,chainId:t,data:x,gas:P,gasPrice:$,maxFeePerBlobGas:G,maxFeePerGas:I,maxPriorityFeePerGas:T,nonce:M,to:n,type:E,value:C},"sendTransaction"),s=y.get(e.uid);try{return await e.request({method:s?"wallet_sendTransaction":"eth_sendTransaction",params:[i]},{retryCount:0})}catch(t){if(!1===s)throw t;if("InvalidInputRpcError"===t.name||"InvalidParamsRpcError"===t.name||"MethodNotFoundRpcError"===t.name||"MethodNotSupportedRpcError"===t.name)return await e.request({method:"wallet_sendTransaction",params:[i]},{retryCount:0}).then(t=>(y.set(e.uid,!0),t)).catch(n=>{if("MethodNotFoundRpcError"===n.name||"MethodNotSupportedRpcError"===n.name)throw y.set(e.uid,!1),t;throw n});throw t}}if(O?.type==="local"){let t=await (0,l.s)(e,h.ZE,"prepareTransactionRequest")({account:O,accessList:g,authorizationList:v,blobs:w,chain:d,data:x,gas:P,gasPrice:$,maxFeePerBlobGas:G,maxFeePerGas:I,maxPriorityFeePerGas:T,nonce:M,nonceManager:O.nonceManager,parameters:[...h.QZ,"sidecars"],type:E,value:C,...F,to:n}),r=d?.serializers?.transaction,i=await O.signTransaction(t,{serializer:r});return await (0,l.s)(e,m.p,"sendRawTransaction")({serializedTransaction:i})}if(O?.type==="smart")throw new i.Y({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"});throw new i.Y({docsPath:"/docs/actions/wallet/sendTransaction",type:O?.type})}catch(e){if(e instanceof i.Y)throw e;throw(0,c.$)(e,{...t,account:O,chain:t.chain||void 0})}}},50825:function(e,t,n){"use strict";n.d(t,{n:function(){return u}});var r=n(19775),i=n(65704),s=n(17283),a=n(34180),o=n(82645),c=n(41709);async function u(e,t){return u.internal(e,c.T,"sendTransaction",t)}!function(e){async function t(e,t,n,c){let{abi:u,account:f=e.account,address:l,args:d,dataSuffix:b,functionName:p,...h}=c;if(void 0===f)throw new i.o({docsPath:"/docs/contract/writeContract"});let m=f?(0,r.T)(f):null,y=(0,s.R)({abi:u,args:d,functionName:p});try{return await (0,o.s)(e,t,n)({data:`${y}${b?b.replace("0x",""):""}`,to:l,account:m,...h})}catch(e){throw(0,a.S)(e,{abi:u,address:l,args:d,docsPath:"/docs/contract/writeContract",functionName:p,sender:m?.address})}}e.internal=t}(u||(u={}))},82538:function(e,t,n){"use strict";n.d(t,{e:function(){return s}});var r=n(19775),i=n(78217);function s(e){let{batch:t,chain:n,ccipRead:s,key:a="base",name:o="Base Client",type:c="base"}=e,u=e.experimental_blockTag??("number"==typeof n?.experimental_preconfirmationTime?"pending":void 0),f=n?.blockTime??12e3,l=e.pollingInterval??Math.min(Math.max(Math.floor(f/2),500),4e3),d=e.cacheTime??l,b=e.account?(0,r.T)(e.account):void 0,{config:p,request:h,value:m}=e.transport({account:b,chain:n,pollingInterval:l}),y={account:b,batch:t,cacheTime:d,ccipRead:s,chain:n,key:a,name:o,pollingInterval:l,request:h,transport:{...p,...m},type:c,uid:(0,i.h)(),...u?{experimental_blockTag:u}:{}};return Object.assign(y,{extend:function e(t){return n=>{let r=n(t);for(let e in y)delete r[e];let i={...t,...r};return Object.assign(i,{extend:e(i)})}}(y)})}},24250:function(e,t,n){"use strict";n.d(t,{q:function(){return l}});var r=n(81544),i=n(17057),s=n(77014),a=n(59455);let o=new(n(82061)).k(8192);var c=n(49287),u=n(31853),f=n(78217);function l({key:e,methods:t,name:n,request:l,retryCount:d=3,retryDelay:b=150,timeout:p,type:h},m){return{config:{key:e,methods:t,name:n,request:l,retryCount:d,retryDelay:b,timeout:p,type:h},request:function(e,t={}){return async(n,f={})=>{let{dedupe:l=!1,methods:d,retryDelay:b=150,retryCount:p=3,uid:h}={...t,...f},{method:m}=n;if(d?.exclude?.includes(m)||d?.include&&!d.include.includes(m))throw new s.gS(Error("method not supported"),{method:m});let y=l?(0,a.$G)(`${h}.${(0,u.P)(n)}`):void 0;return function(e,{enabled:t=!0,id:n}){if(!t||!n)return e();if(o.get(n))return o.get(n);let r=e().finally(()=>o.delete(n));return o.set(n,r),r}(()=>(0,c.J)(async()=>{try{return await e(n)}catch(e){switch(e.code){case s.s7.code:throw new s.s7(e);case s.B.code:throw new s.B(e);case s.LX.code:throw new s.LX(e,{method:n.method});case s.nY.code:throw new s.nY(e);case s.XS.code:throw new s.XS(e);case s.yR.code:throw new s.yR(e);case s.Og.code:throw new s.Og(e);case s.pT.code:throw new s.pT(e);case s.KB.code:throw new s.KB(e);case s.gS.code:throw new s.gS(e,{method:n.method});case s.Pv.code:throw new s.Pv(e);case s.GD.code:throw new s.GD(e);case s.ab.code:throw new s.ab(e);case s.PE.code:throw new s.PE(e);case s.Ts.code:throw new s.Ts(e);case s.u5.code:throw new s.u5(e);case s.I0.code:throw new s.I0(e);case s.x3.code:throw new s.x3(e);case s.vl.code:throw new s.vl(e);case s.Uu.code:throw new s.Uu(e);case s.Nt.code:throw new s.Nt(e);case s.EJ.code:throw new s.EJ(e);case s.fl.code:throw new s.fl(e);case s.NO.code:throw new s.NO(e);case s.r0.code:throw new s.r0(e);case 5e3:throw new s.ab(e);default:if(e instanceof r.G)throw e;throw new s.ir(e)}}},{delay:({count:e,error:t})=>{if(t&&t instanceof i.Gg){let e=t?.headers?.get("Retry-After");if(e?.match(/\d/))return 1e3*Number.parseInt(e,10)}return~~(1<"code"in e&&"number"==typeof e.code?-1===e.code||e.code===s.Pv.code||e.code===s.XS.code:!(e instanceof i.Gg)||!e.status||403===e.status||408===e.status||413===e.status||429===e.status||500===e.status||502===e.status||503===e.status||504===e.status}),{enabled:l,id:y})}}(l,{methods:t,retryCount:d,retryDelay:b,uid:(0,f.h)()}),value:m}}},98158:function(e,t,n){"use strict";n.d(t,{F8:function(){return r},MR:function(){return l},Wo:function(){return d},X$:function(){return u},Yi:function(){return i},_A:function(){return f},du:function(){return o},k3:function(){return a},nZ:function(){return c}});let r=[{inputs:[{components:[{name:"target",type:"address"},{name:"allowFailure",type:"bool"},{name:"callData",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{name:"success",type:"bool"},{name:"returnData",type:"bytes"}],name:"returnData",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentBlockTimestamp",outputs:[{internalType:"uint256",name:"timestamp",type:"uint256"}],stateMutability:"view",type:"function"}],i=[{name:"query",type:"function",stateMutability:"view",inputs:[{type:"tuple[]",name:"queries",components:[{type:"address",name:"sender"},{type:"string[]",name:"urls"},{type:"bytes",name:"data"}]}],outputs:[{type:"bool[]",name:"failures"},{type:"bytes[]",name:"responses"}]},{name:"HttpError",type:"error",inputs:[{type:"uint16",name:"status"},{type:"string",name:"message"}]}],s=[{inputs:[{name:"dns",type:"bytes"}],name:"DNSDecodingFailed",type:"error"},{inputs:[{name:"ens",type:"string"}],name:"DNSEncodingFailed",type:"error"},{inputs:[],name:"EmptyAddress",type:"error"},{inputs:[{name:"status",type:"uint16"},{name:"message",type:"string"}],name:"HttpError",type:"error"},{inputs:[],name:"InvalidBatchGatewayResponse",type:"error"},{inputs:[{name:"errorData",type:"bytes"}],name:"ResolverError",type:"error"},{inputs:[{name:"name",type:"bytes"},{name:"resolver",type:"address"}],name:"ResolverNotContract",type:"error"},{inputs:[{name:"name",type:"bytes"}],name:"ResolverNotFound",type:"error"},{inputs:[{name:"primary",type:"string"},{name:"primaryAddress",type:"bytes"}],name:"ReverseAddressMismatch",type:"error"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"UnsupportedResolverProfile",type:"error"}],a=[...s,{name:"resolveWithGateways",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"},{name:"gateways",type:"string[]"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]}],o=[...s,{name:"reverseWithGateways",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"},{type:"uint256",name:"coinType"},{type:"string[]",name:"gateways"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolver"},{type:"address",name:"reverseResolver"}]}],c=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}],u=[{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"}],outputs:[{name:"",type:"address"}]},{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"coinType",type:"uint256"}],outputs:[{name:"",type:"bytes"}]}],f=[{name:"isValidSignature",type:"function",stateMutability:"view",inputs:[{name:"hash",type:"bytes32"},{name:"signature",type:"bytes"}],outputs:[{name:"",type:"bytes4"}]}],l=[{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function",name:"isValidSig"}],d=[{type:"event",name:"Approval",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"event",name:"Transfer",inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"function",name:"allowance",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"approve",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{type:"uint8"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{type:"uint256"}]},{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"transferFrom",stateMutability:"nonpayable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]}]},45434:function(e,t,n){"use strict";n.d(t,{NO:function(){return r},de:function(){return s},pG:function(){return i},xd:function(){return a}});let r="0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe",i="0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe",s="0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572",a="0x608060405234801561001057600080fd5b506115b9806100206000396000f3fe6080604052600436106100f35760003560e01c80634d2301cc1161008a578063a8b0574e11610059578063a8b0574e14610325578063bce38bd714610350578063c3077fa914610380578063ee82ac5e146103b2576100f3565b80634d2301cc1461026257806372425d9d1461029f57806382ad56cb146102ca57806386d516e8146102fa576100f3565b80633408e470116100c65780633408e470146101af578063399542e9146101da5780633e64a6961461020c57806342cbb15c14610237576100f3565b80630f28c97d146100f8578063174dea7114610123578063252dba421461015357806327e86d6e14610184575b600080fd5b34801561010457600080fd5b5061010d6103ef565b60405161011a9190610c0a565b60405180910390f35b61013d60048036038101906101389190610c94565b6103f7565b60405161014a9190610e94565b60405180910390f35b61016d60048036038101906101689190610f0c565b610615565b60405161017b92919061101b565b60405180910390f35b34801561019057600080fd5b506101996107ab565b6040516101a69190611064565b60405180910390f35b3480156101bb57600080fd5b506101c46107b7565b6040516101d19190610c0a565b60405180910390f35b6101f460048036038101906101ef91906110ab565b6107bf565b6040516102039392919061110b565b60405180910390f35b34801561021857600080fd5b506102216107e1565b60405161022e9190610c0a565b60405180910390f35b34801561024357600080fd5b5061024c6107e9565b6040516102599190610c0a565b60405180910390f35b34801561026e57600080fd5b50610289600480360381019061028491906111a7565b6107f1565b6040516102969190610c0a565b60405180910390f35b3480156102ab57600080fd5b506102b4610812565b6040516102c19190610c0a565b60405180910390f35b6102e460048036038101906102df919061122a565b61081a565b6040516102f19190610e94565b60405180910390f35b34801561030657600080fd5b5061030f6109e4565b60405161031c9190610c0a565b60405180910390f35b34801561033157600080fd5b5061033a6109ec565b6040516103479190611286565b60405180910390f35b61036a600480360381019061036591906110ab565b6109f4565b6040516103779190610e94565b60405180910390f35b61039a60048036038101906103959190610f0c565b610ba6565b6040516103a99392919061110b565b60405180910390f35b3480156103be57600080fd5b506103d960048036038101906103d491906112cd565b610bca565b6040516103e69190611064565b60405180910390f35b600042905090565b60606000808484905090508067ffffffffffffffff81111561041c5761041b6112fa565b5b60405190808252806020026020018201604052801561045557816020015b610442610bd5565b81526020019060019003908161043a5790505b5092503660005b828110156105c957600085828151811061047957610478611329565b5b6020026020010151905087878381811061049657610495611329565b5b90506020028101906104a89190611367565b925060008360400135905080860195508360000160208101906104cb91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16818580606001906104f2919061138f565b604051610500929190611431565b60006040518083038185875af1925050503d806000811461053d576040519150601f19603f3d011682016040523d82523d6000602084013e610542565b606091505b5083600001846020018290528215151515815250505081516020850135176105bc577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260846000fd5b826001019250505061045c565b5082341461060c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610603906114a7565b60405180910390fd5b50505092915050565b6000606043915060008484905090508067ffffffffffffffff81111561063e5761063d6112fa565b5b60405190808252806020026020018201604052801561067157816020015b606081526020019060019003908161065c5790505b5091503660005b828110156107a157600087878381811061069557610694611329565b5b90506020028101906106a791906114c7565b92508260000160208101906106bc91906111a7565b73ffffffffffffffffffffffffffffffffffffffff168380602001906106e2919061138f565b6040516106f0929190611431565b6000604051808303816000865af19150503d806000811461072d576040519150601f19603f3d011682016040523d82523d6000602084013e610732565b606091505b5086848151811061074657610745611329565b5b60200260200101819052819250505080610795576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078c9061153b565b60405180910390fd5b81600101915050610678565b5050509250929050565b60006001430340905090565b600046905090565b6000806060439250434091506107d68686866109f4565b905093509350939050565b600048905090565b600043905090565b60008173ffffffffffffffffffffffffffffffffffffffff16319050919050565b600044905090565b606060008383905090508067ffffffffffffffff81111561083e5761083d6112fa565b5b60405190808252806020026020018201604052801561087757816020015b610864610bd5565b81526020019060019003908161085c5790505b5091503660005b828110156109db57600084828151811061089b5761089a611329565b5b602002602001015190508686838181106108b8576108b7611329565b5b90506020028101906108ca919061155b565b92508260000160208101906108df91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060400190610905919061138f565b604051610913929190611431565b6000604051808303816000865af19150503d8060008114610950576040519150601f19603f3d011682016040523d82523d6000602084013e610955565b606091505b5082600001836020018290528215151515815250505080516020840135176109cf577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260646000fd5b8160010191505061087e565b50505092915050565b600045905090565b600041905090565b606060008383905090508067ffffffffffffffff811115610a1857610a176112fa565b5b604051908082528060200260200182016040528015610a5157816020015b610a3e610bd5565b815260200190600190039081610a365790505b5091503660005b82811015610b9c576000848281518110610a7557610a74611329565b5b60200260200101519050868683818110610a9257610a91611329565b5b9050602002810190610aa491906114c7565b9250826000016020810190610ab991906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060200190610adf919061138f565b604051610aed929190611431565b6000604051808303816000865af19150503d8060008114610b2a576040519150601f19603f3d011682016040523d82523d6000602084013e610b2f565b606091505b508260000183602001829052821515151581525050508715610b90578060000151610b8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b869061153b565b60405180910390fd5b5b81600101915050610a58565b5050509392505050565b6000806060610bb7600186866107bf565b8093508194508295505050509250925092565b600081409050919050565b6040518060400160405280600015158152602001606081525090565b6000819050919050565b610c0481610bf1565b82525050565b6000602082019050610c1f6000830184610bfb565b92915050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b60008083601f840112610c5457610c53610c2f565b5b8235905067ffffffffffffffff811115610c7157610c70610c34565b5b602083019150836020820283011115610c8d57610c8c610c39565b5b9250929050565b60008060208385031215610cab57610caa610c25565b5b600083013567ffffffffffffffff811115610cc957610cc8610c2a565b5b610cd585828601610c3e565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60008115159050919050565b610d2281610d0d565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610d62578082015181840152602081019050610d47565b83811115610d71576000848401525b50505050565b6000601f19601f8301169050919050565b6000610d9382610d28565b610d9d8185610d33565b9350610dad818560208601610d44565b610db681610d77565b840191505092915050565b6000604083016000830151610dd96000860182610d19565b5060208301518482036020860152610df18282610d88565b9150508091505092915050565b6000610e0a8383610dc1565b905092915050565b6000602082019050919050565b6000610e2a82610ce1565b610e348185610cec565b935083602082028501610e4685610cfd565b8060005b85811015610e825784840389528151610e638582610dfe565b9450610e6e83610e12565b925060208a01995050600181019050610e4a565b50829750879550505050505092915050565b60006020820190508181036000830152610eae8184610e1f565b905092915050565b60008083601f840112610ecc57610ecb610c2f565b5b8235905067ffffffffffffffff811115610ee957610ee8610c34565b5b602083019150836020820283011115610f0557610f04610c39565b5b9250929050565b60008060208385031215610f2357610f22610c25565b5b600083013567ffffffffffffffff811115610f4157610f40610c2a565b5b610f4d85828601610eb6565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000610f918383610d88565b905092915050565b6000602082019050919050565b6000610fb182610f59565b610fbb8185610f64565b935083602082028501610fcd85610f75565b8060005b858110156110095784840389528151610fea8582610f85565b9450610ff583610f99565b925060208a01995050600181019050610fd1565b50829750879550505050505092915050565b60006040820190506110306000830185610bfb565b81810360208301526110428184610fa6565b90509392505050565b6000819050919050565b61105e8161104b565b82525050565b60006020820190506110796000830184611055565b92915050565b61108881610d0d565b811461109357600080fd5b50565b6000813590506110a58161107f565b92915050565b6000806000604084860312156110c4576110c3610c25565b5b60006110d286828701611096565b935050602084013567ffffffffffffffff8111156110f3576110f2610c2a565b5b6110ff86828701610eb6565b92509250509250925092565b60006060820190506111206000830186610bfb565b61112d6020830185611055565b818103604083015261113f8184610e1f565b9050949350505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061117482611149565b9050919050565b61118481611169565b811461118f57600080fd5b50565b6000813590506111a18161117b565b92915050565b6000602082840312156111bd576111bc610c25565b5b60006111cb84828501611192565b91505092915050565b60008083601f8401126111ea576111e9610c2f565b5b8235905067ffffffffffffffff81111561120757611206610c34565b5b60208301915083602082028301111561122357611222610c39565b5b9250929050565b6000806020838503121561124157611240610c25565b5b600083013567ffffffffffffffff81111561125f5761125e610c2a565b5b61126b858286016111d4565b92509250509250929050565b61128081611169565b82525050565b600060208201905061129b6000830184611277565b92915050565b6112aa81610bf1565b81146112b557600080fd5b50565b6000813590506112c7816112a1565b92915050565b6000602082840312156112e3576112e2610c25565b5b60006112f1848285016112b8565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080fd5b600080fd5b600080fd5b60008235600160800383360303811261138357611382611358565b5b80830191505092915050565b600080833560016020038436030381126113ac576113ab611358565b5b80840192508235915067ffffffffffffffff8211156113ce576113cd61135d565b5b6020830192506001820236038313156113ea576113e9611362565b5b509250929050565b600081905092915050565b82818337600083830152505050565b600061141883856113f2565b93506114258385846113fd565b82840190509392505050565b600061143e82848661140c565b91508190509392505050565b600082825260208201905092915050565b7f4d756c746963616c6c333a2076616c7565206d69736d61746368000000000000600082015250565b6000611491601a8361144a565b915061149c8261145b565b602082019050919050565b600060208201905081810360008301526114c081611484565b9050919050565b6000823560016040038336030381126114e3576114e2611358565b5b80830191505092915050565b7f4d756c746963616c6c333a2063616c6c206661696c6564000000000000000000600082015250565b600061152560178361144a565b9150611530826114ef565b602082019050919050565b6000602082019050818103600083015261155481611518565b9050919050565b60008235600160600383360303811261157757611576611358565b5b8083019150509291505056fea264697066735822122020c1bc9aacf8e4a6507193432a895a8e77094f45a1395583f07b24e860ef06cd64736f6c634300080c0033"},43188:function(e,t,n){"use strict";n.d(t,{l:function(){return r}});let r=1},75018:function(e,t,n){"use strict";n.d(t,{zL:function(){return r}});let r=2n**256n-1n},55246:function(e,t,n){"use strict";n.d(t,{$:function(){return r},Up:function(){return i},hZ:function(){return s}});let r={1:"An `assert` condition failed.",17:"Arithmetic operation resulted in underflow or overflow.",18:"Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",33:"Attempted to convert to an invalid type.",34:"Attempted to access a storage byte array that is incorrectly encoded.",49:"Performed `.pop()` on an empty array",50:"Array index is out of bounds.",65:"Allocated too much memory or created an array which is too large.",81:"Attempted to call a zero-initialized variable of internal function type."},i={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},s={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"}},98173:function(e,t,n){"use strict";n.d(t,{Zn:function(){return i},ez:function(){return r}});let r={gwei:9,wei:18},i={ether:-9,wei:9}},65531:function(e,t,n){"use strict";n.d(t,{CI:function(){return M},FM:function(){return m},Gy:function(){return I},KY:function(){return $},M4:function(){return l},MS:function(){return p},MX:function(){return w},Mi:function(){return F},S4:function(){return P},SM:function(){return G},Zh:function(){return b},cO:function(){return o},dh:function(){return T},eF:function(){return x},fM:function(){return a},fs:function(){return d},gr:function(){return f},hn:function(){return E},lC:function(){return y},mv:function(){return g},wM:function(){return C},wb:function(){return u},xB:function(){return c},xL:function(){return v},yP:function(){return h}});var r=n(7275),i=n(20556),s=n(81544);class a extends s.G{constructor({docsPath:e}){super("A constructor was not found on the ABI.\nMake sure you are using the correct ABI and that the constructor exists on it.",{docsPath:e,name:"AbiConstructorNotFoundError"})}}class o extends s.G{constructor({docsPath:e}){super("Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.\nMake sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists.",{docsPath:e,name:"AbiConstructorParamsNotFoundError"})}}class c extends s.G{constructor({data:e,params:t,size:n}){super(`Data size of ${n} bytes is too small for given parameters.`,{metaMessages:[`Params: (${(0,r.h)(t,{includeName:!0})})`,`Data: ${e} (${n} bytes)`],name:"AbiDecodingDataSizeTooSmallError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=e,this.params=t,this.size=n}}class u extends s.G{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.',{name:"AbiDecodingZeroDataError"})}}class f extends s.G{constructor({expectedLength:e,givenLength:t,type:n}){super(`ABI encoding array length mismatch for type ${n}. +Expected length: ${e} +Given length: ${t}`,{name:"AbiEncodingArrayLengthMismatchError"})}}class l extends s.G{constructor({expectedSize:e,value:t}){super(`Size of bytes "${t}" (bytes${(0,i.d)(t)}) does not match expected size (bytes${e}).`,{name:"AbiEncodingBytesSizeMismatchError"})}}class d extends s.G{constructor({expectedLength:e,givenLength:t}){super(`ABI encoding params/values length mismatch. +Expected length (params): ${e} +Given length (values): ${t}`,{name:"AbiEncodingLengthMismatchError"})}}class b extends s.G{constructor(e,{docsPath:t}){super(`Arguments (\`args\`) were provided to "${e}", but "${e}" on the ABI does not contain any parameters (\`inputs\`). +Cannot encode error result without knowing what the parameter types are. +Make sure you are using the correct ABI and that the inputs exist on it.`,{docsPath:t,name:"AbiErrorInputsNotFoundError"})}}class p extends s.G{constructor(e,{docsPath:t}={}){super(`Error ${e?`"${e}" `:""}not found on ABI. +Make sure you are using the correct ABI and that the error exists on it.`,{docsPath:t,name:"AbiErrorNotFoundError"})}}class h extends s.G{constructor(e,{docsPath:t}){super(`Encoded error signature "${e}" not found on ABI. +Make sure you are using the correct ABI and that the error exists on it. +You can look up the decoded signature here: https://openchain.xyz/signatures?query=${e}.`,{docsPath:t,name:"AbiErrorSignatureNotFoundError"}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.signature=e}}class m extends s.G{constructor({docsPath:e}){super("Cannot extract event signature from empty topics.",{docsPath:e,name:"AbiEventSignatureEmptyTopicsError"})}}class y extends s.G{constructor(e,{docsPath:t}){super(`Encoded event signature "${e}" not found on ABI. +Make sure you are using the correct ABI and that the event exists on it. +You can look up the signature here: https://openchain.xyz/signatures?query=${e}.`,{docsPath:t,name:"AbiEventSignatureNotFoundError"})}}class g extends s.G{constructor(e,{docsPath:t}={}){super(`Event ${e?`"${e}" `:""}not found on ABI. +Make sure you are using the correct ABI and that the event exists on it.`,{docsPath:t,name:"AbiEventNotFoundError"})}}class v extends s.G{constructor(e,{docsPath:t}={}){super(`Function ${e?`"${e}" `:""}not found on ABI. +Make sure you are using the correct ABI and that the function exists on it.`,{docsPath:t,name:"AbiFunctionNotFoundError"})}}class w extends s.G{constructor(e,{docsPath:t}){super(`Function "${e}" does not contain any \`outputs\` on ABI. +Cannot decode function result without knowing what the parameter types are. +Make sure you are using the correct ABI and that the function exists on it.`,{docsPath:t,name:"AbiFunctionOutputsNotFoundError"})}}class x extends s.G{constructor(e,{docsPath:t}){super(`Encoded function signature "${e}" not found on ABI. +Make sure you are using the correct ABI and that the function exists on it. +You can look up the signature here: https://openchain.xyz/signatures?query=${e}.`,{docsPath:t,name:"AbiFunctionSignatureNotFoundError"})}}class P extends s.G{constructor(e,t){super("Found ambiguous types in overloaded ABI items.",{metaMessages:[`\`${e.type}\` in \`${(0,r.t)(e.abiItem)}\`, and`,`\`${t.type}\` in \`${(0,r.t)(t.abiItem)}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."],name:"AbiItemAmbiguityError"})}}class $ extends s.G{constructor({expectedSize:e,givenSize:t}){super(`Expected bytes${e}, got bytes${t}.`,{name:"BytesSizeMismatchError"})}}class G extends s.G{constructor({abiItem:e,data:t,params:n,size:i}){super(`Data size of ${i} bytes is too small for non-indexed event parameters.`,{metaMessages:[`Params: (${(0,r.h)(n,{includeName:!0})})`,`Data: ${t} (${i} bytes)`],name:"DecodeLogDataMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=e,this.data=t,this.params=n,this.size=i}}class I extends s.G{constructor({abiItem:e,param:t}){super(`Expected a topic for indexed event parameter${t.name?` "${t.name}"`:""} on event "${(0,r.t)(e,{includeName:!0})}".`,{name:"DecodeLogTopicsMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=e}}class T extends s.G{constructor(e,{docsPath:t}){super(`Type "${e}" is not a valid encoding type. +Please provide a valid ABI type.`,{docsPath:t,name:"InvalidAbiEncodingType"})}}class M extends s.G{constructor(e,{docsPath:t}){super(`Type "${e}" is not a valid decoding type. +Please provide a valid ABI type.`,{docsPath:t,name:"InvalidAbiDecodingType"})}}class E extends s.G{constructor(e){super(`Value "${e}" is not a valid array.`,{name:"InvalidArrayError"})}}class C extends s.G{constructor(e){super(`"${e}" is not a valid definition type. +Valid types: "function", "event", "error"`,{name:"InvalidDefinitionTypeError"})}}class F extends s.G{constructor(e){super(`Type "${e}" is not supported for packed encoding.`,{name:"UnsupportedPackedAbiType"})}}},65704:function(e,t,n){"use strict";n.d(t,{Y:function(){return s},o:function(){return i}});var r=n(81544);class i extends r.G{constructor({docsPath:e}={}){super("Could not find an Account to execute with this Action.\nPlease provide an Account with the `account` argument on the Action, or by supplying an `account` to the Client.",{docsPath:e,docsSlug:"account",name:"AccountNotFoundError"})}}class s extends r.G{constructor({docsPath:e,metaMessages:t,type:n}){super(`Account type "${n}" is not supported.`,{docsPath:e,metaMessages:t,name:"AccountTypeNotSupportedError"})}}},48073:function(e,t,n){"use strict";n.d(t,{RX:function(){return a},cJ:function(){return c},m7:function(){return s},xd:function(){return o}});var r=n(43188),i=n(81544);class s extends i.G{constructor({maxSize:e,size:t}){super("Blob size is too large.",{metaMessages:[`Max: ${e} bytes`,`Given: ${t} bytes`],name:"BlobSizeTooLargeError"})}}class a extends i.G{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"})}}class o extends i.G{constructor({hash:e,size:t}){super(`Versioned hash "${e}" size is invalid.`,{metaMessages:["Expected: 32",`Received: ${t}`],name:"InvalidVersionedHashSizeError"})}}class c extends i.G{constructor({hash:e,version:t}){super(`Versioned hash "${e}" version is invalid.`,{metaMessages:[`Expected: ${r.l}`,`Received: ${t}`],name:"InvalidVersionedHashVersionError"})}}},12197:function(e,t,n){"use strict";n.d(t,{f:function(){return i}});var r=n(81544);class i extends r.G{constructor({blockHash:e,blockNumber:t}){let n="Block";e&&(n=`Block at hash "${e}"`),t&&(n=`Block at number "${t}"`),super(`${n} could not be found.`,{name:"BlockNotFoundError"})}}},35586:function(e,t,n){"use strict";n.d(t,{Bk:function(){return a},Yl:function(){return s},hJ:function(){return c},mm:function(){return i},pZ:function(){return o}});var r=n(81544);class i extends r.G{constructor({blockNumber:e,chain:t,contract:n}){super(`Chain "${t.name}" does not support contract "${n.name}".`,{metaMessages:["This could be due to any of the following:",...e&&n.blockCreated&&n.blockCreated>e?[`- The contract "${n.name}" was not deployed until block ${n.blockCreated} (current block ${e}).`]:[`- The chain does not have the contract "${n.name}" configured.`]],name:"ChainDoesNotSupportContract"})}}class s extends r.G{constructor({chain:e,currentChainId:t}){super(`The current chain of the wallet (id: ${t}) does not match the target chain for the transaction (id: ${e.id} – ${e.name}).`,{metaMessages:[`Current Chain ID: ${t}`,`Expected Chain ID: ${e.id} – ${e.name}`],name:"ChainMismatchError"})}}class a extends r.G{constructor(){super("No chain was provided to the request.\nPlease provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient.",{name:"ChainNotFoundError"})}}class o extends r.G{constructor(){super("No chain was provided to the Client.",{name:"ClientChainNotConfiguredError"})}}class c extends r.G{constructor({chainId:e}){super("number"==typeof e?`Chain ID "${e}" is invalid.`:"Chain ID is invalid.",{name:"InvalidChainIdError"})}}},20010:function(e,t,n){"use strict";n.d(t,{cg:function(){return y},uq:function(){return g},Lu:function(){return v},Dk:function(){return w},Mo:function(){return x},VQ:function(){return P}});var r=n(19775),i=n(55246),s=n(33591),a=n(7275),o=n(31853);function c({abiItem:e,args:t,includeFunctionName:n=!0,includeName:r=!1}){if("name"in e&&"inputs"in e&&e.inputs)return`${n?e.name:""}(${e.inputs.map((e,n)=>`${r&&e.name?`${e.name}: `:""}${"object"==typeof t[n]?(0,o.P)(t[n]):t[n]}`).join(", ")})`}var u=n(64043),f=n(71282),l=n(29707),d=n(65531),b=n(81544),p=n(29625),h=n(63228),m=n(97564);class y extends b.G{constructor(e,{account:t,docsPath:n,chain:i,data:s,gas:a,gasPrice:o,maxFeePerGas:c,maxPriorityFeePerGas:u,nonce:d,to:b,value:m,stateOverride:y}){let g=t?(0,r.T)(t):void 0,v=(0,h.xr)({from:g?.address,to:b,value:void 0!==m&&`${(0,f.d)(m)} ${i?.nativeCurrency?.symbol||"ETH"}`,data:s,gas:a,gasPrice:void 0!==o&&`${(0,l.o)(o)} gwei`,maxFeePerGas:void 0!==c&&`${(0,l.o)(c)} gwei`,maxPriorityFeePerGas:void 0!==u&&`${(0,l.o)(u)} gwei`,nonce:d});y&&(v+=` +${(0,p.Bj)(y)}`),super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Raw Call Arguments:",v].filter(Boolean),name:"CallExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=e}}class g extends b.G{constructor(e,{abi:t,args:n,contractAddress:r,docsPath:i,functionName:s,sender:o}){let f=(0,u.mE)({abi:t,args:n,name:s}),l=f?c({abiItem:f,args:n,includeFunctionName:!1,includeName:!1}):void 0,d=f?(0,a.t)(f,{includeName:!0}):void 0,b=(0,h.xr)({address:r&&(0,m.C)(r),function:d,args:l&&"()"!==l&&`${[...Array(s?.length??0).keys()].map(()=>" ").join("")}${l}`,sender:o});super(e.shortMessage||`An unknown error occurred while executing the contract function "${s}".`,{cause:e,docsPath:i,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],b&&"Contract Call:",b].filter(Boolean),name:"ContractFunctionExecutionError"}),Object.defineProperty(this,"abi",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"args",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"contractAddress",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"formattedArgs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"functionName",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sender",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abi=t,this.args=n,this.cause=e,this.contractAddress=r,this.functionName=s,this.sender=o}}class v extends b.G{constructor({abi:e,data:t,functionName:n,message:r}){let o,u,f,l,b;if(t&&"0x"!==t)try{let{abiItem:n,errorName:r,args:o}=u=(0,s.p)({abi:e,data:t});if("Error"===r)l=o[0];else if("Panic"===r){let[e]=o;l=i.$[e]}else{let e=n?(0,a.t)(n,{includeName:!0}):void 0,t=n&&o?c({abiItem:n,args:o,includeFunctionName:!1,includeName:!1}):void 0;f=[e?`Error: ${e}`:"",t&&"()"!==t?` ${[...Array(r?.length??0).keys()].map(()=>" ").join("")}${t}`:""]}}catch(e){o=e}else r&&(l=r);o instanceof d.yP&&(b=o.signature,f=[`Unable to decode signature "${b}" as it was not found on the provided ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${b}.`]),super(l&&"execution reverted"!==l||b?[`The contract function "${n}" reverted with the following ${b?"signature":"reason"}:`,l||b].join("\n"):`The contract function "${n}" reverted.`,{cause:o,metaMessages:f,name:"ContractFunctionRevertedError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"raw",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"reason",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=u,this.raw=t,this.reason=l,this.signature=b}}class w extends b.G{constructor({functionName:e}){super(`The contract function "${e}" returned no data ("0x").`,{metaMessages:["This could be due to any of the following:",` - The contract does not have the function "${e}",`," - The parameters passed to the contract function may be invalid, or"," - The address is not a contract."],name:"ContractFunctionZeroDataError"})}}class x extends b.G{constructor({factory:e}){super(`Deployment for counterfactual contract call failed${e?` for factory "${e}".`:""}`,{metaMessages:["Please ensure:","- The `factory` is a valid contract deployment factory (ie. Create2 Factory, ERC-4337 Factory, etc).","- The `factoryData` is a valid encoded function call for contract deployment function on the factory."],name:"CounterfactualDeploymentFailedError"})}}class P extends b.G{constructor({data:e,message:t}){super(t||"",{name:"RawContractError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=e}}},33630:function(e,t,n){"use strict";n.d(t,{KD:function(){return a},T_:function(){return i},lQ:function(){return s}});var r=n(81544);class i extends r.G{constructor({offset:e}){super(`Offset \`${e}\` cannot be negative.`,{name:"NegativeOffsetError"})}}class s extends r.G{constructor({length:e,position:t}){super(`Position \`${t}\` is out of bounds (\`0 < position < ${e}\`).`,{name:"PositionOutOfBoundsError"})}}class a extends r.G{constructor({count:e,limit:t}){super(`Recursive read limit of \`${t}\` exceeded (recursive read count: \`${e}\`).`,{name:"RecursiveReadLimitExceededError"})}}},4496:function(e,t,n){"use strict";n.d(t,{Fz:function(){return s},e5:function(){return a},ld:function(){return o}});var r=n(29707),i=n(81544);class s extends i.G{constructor(){super("`baseFeeMultiplier` must be greater than 1.",{name:"BaseFeeScalarError"})}}class a extends i.G{constructor(){super("Chain does not support EIP-1559 fees.",{name:"Eip1559FeesNotSupportedError"})}}class o extends i.G{constructor({maxPriorityFeePerGas:e}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${(0,r.o)(e)} gwei).`,{name:"MaxFeePerGasTooLowError"})}}},78125:function(e,t,n){"use strict";n.d(t,{C_:function(){return l},G$:function(){return o},Hh:function(){return a},M_:function(){return s},WF:function(){return d},ZI:function(){return c},cj:function(){return m},cs:function(){return h},dR:function(){return b},pZ:function(){return p},se:function(){return f},vU:function(){return u}});var r=n(29707),i=n(81544);class s extends i.G{constructor({cause:e,message:t}={}){let n=t?.replace("execution reverted: ","")?.replace("execution reverted","");super(`Execution reverted ${n?`with reason: ${n}`:"for an unknown reason"}.`,{cause:e,name:"ExecutionRevertedError"})}}Object.defineProperty(s,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(s,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});class a extends i.G{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${(0,r.o)(t)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:e,name:"FeeCapTooHighError"})}}Object.defineProperty(a,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});class o extends i.G{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${(0,r.o)(t)}`:""} gwei) cannot be lower than the block base fee.`,{cause:e,name:"FeeCapTooLowError"})}}Object.defineProperty(o,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/});class c extends i.G{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}is higher than the next one expected.`,{cause:e,name:"NonceTooHighError"})}}Object.defineProperty(c,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class u extends i.G{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}is lower than the current nonce of the account. +Try increasing the nonce or find the latest nonce with \`getTransactionCount\`.`,{cause:e,name:"NonceTooLowError"})}}Object.defineProperty(u,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class f extends i.G{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}exceeds the maximum allowed nonce.`,{cause:e,name:"NonceMaxValueError"})}}Object.defineProperty(f,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class l extends i.G{constructor({cause:e}={}){super("The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account.",{cause:e,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."],name:"InsufficientFundsError"})}}Object.defineProperty(l,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds|exceeds transaction sender account balance/});class d extends i.G{constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:e,name:"IntrinsicGasTooHighError"})}}Object.defineProperty(d,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class b extends i.G{constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction is too low.`,{cause:e,name:"IntrinsicGasTooLowError"})}}Object.defineProperty(b,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class p extends i.G{constructor({cause:e}){super("The transaction type is not supported for this chain.",{cause:e,name:"TransactionTypeNotSupportedError"})}}Object.defineProperty(p,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class h extends i.G{constructor({cause:e,maxPriorityFeePerGas:t,maxFeePerGas:n}={}){super(`The provided tip (\`maxPriorityFeePerGas\`${t?` = ${(0,r.o)(t)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${n?` = ${(0,r.o)(n)} gwei`:""}).`,{cause:e,name:"TipAboveFeeCapError"})}}Object.defineProperty(h,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});class m extends i.G{constructor({cause:e}){super(`An error occurred while executing: ${e?.shortMessage}`,{cause:e,name:"UnknownNodeError"})}}},17057:function(e,t,n){"use strict";n.d(t,{Gg:function(){return a},W5:function(){return c},bs:function(){return o}});var r=n(31853),i=n(81544),s=n(97564);class a extends i.G{constructor({body:e,cause:t,details:n,headers:i,status:a,url:o}){super("HTTP request failed.",{cause:t,details:n,metaMessages:[a&&`Status: ${a}`,`URL: ${(0,s.G)(o)}`,e&&`Request body: ${(0,r.P)(e)}`].filter(Boolean),name:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.body=e,this.headers=i,this.status=a,this.url=o}}class o extends i.G{constructor({body:e,error:t,url:n}){super("RPC Request failed.",{cause:t,details:t.message,metaMessages:[`URL: ${(0,s.G)(n)}`,`Request body: ${(0,r.P)(e)}`],name:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=t.code,this.data=t.data,this.url=n}}class c extends i.G{constructor({body:e,url:t}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${(0,s.G)(t)}`,`Request body: ${(0,r.P)(e)}`],name:"TimeoutError"}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.url=t}}},77014:function(e,t,n){"use strict";n.d(t,{B:function(){return c},EJ:function(){return E},GD:function(){return g},I0:function(){return $},KB:function(){return h},LX:function(){return u},NO:function(){return F},Nt:function(){return M},Og:function(){return b},PE:function(){return w},Pv:function(){return y},Ts:function(){return x},Uu:function(){return T},XS:function(){return l},ab:function(){return v},fl:function(){return C},gS:function(){return m},ir:function(){return A},nY:function(){return f},pT:function(){return p},r0:function(){return O},s7:function(){return o},u5:function(){return P},vl:function(){return I},x3:function(){return G},yR:function(){return d}});var r=n(81544),i=n(17057);class s extends r.G{constructor(e,{code:t,docsPath:n,metaMessages:r,name:s,shortMessage:a}){super(a,{cause:e,docsPath:n,metaMessages:r||e?.metaMessages,name:s||"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=s||e.name,this.code=e instanceof i.bs?e.code:t??-1}}class a extends s{constructor(e,t){super(e,t),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t.data}}class o extends s{constructor(e){super(e,{code:o.code,name:"ParseRpcError",shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."})}}Object.defineProperty(o,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});class c extends s{constructor(e){super(e,{code:c.code,name:"InvalidRequestRpcError",shortMessage:"JSON is not a valid request object."})}}Object.defineProperty(c,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});class u extends s{constructor(e,{method:t}={}){super(e,{code:u.code,name:"MethodNotFoundRpcError",shortMessage:`The method${t?` "${t}"`:""} does not exist / is not available.`})}}Object.defineProperty(u,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});class f extends s{constructor(e){super(e,{code:f.code,name:"InvalidParamsRpcError",shortMessage:"Invalid parameters were provided to the RPC method.\nDouble check you have provided the correct parameters."})}}Object.defineProperty(f,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class l extends s{constructor(e){super(e,{code:l.code,name:"InternalRpcError",shortMessage:"An internal error was received."})}}Object.defineProperty(l,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});class d extends s{constructor(e){super(e,{code:d.code,name:"InvalidInputRpcError",shortMessage:"Missing or invalid parameters.\nDouble check you have provided the correct parameters."})}}Object.defineProperty(d,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class b extends s{constructor(e){super(e,{code:b.code,name:"ResourceNotFoundRpcError",shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}Object.defineProperty(b,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class p extends s{constructor(e){super(e,{code:p.code,name:"ResourceUnavailableRpcError",shortMessage:"Requested resource not available."})}}Object.defineProperty(p,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class h extends s{constructor(e){super(e,{code:h.code,name:"TransactionRejectedRpcError",shortMessage:"Transaction creation failed."})}}Object.defineProperty(h,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class m extends s{constructor(e,{method:t}={}){super(e,{code:m.code,name:"MethodNotSupportedRpcError",shortMessage:`Method${t?` "${t}"`:""} is not supported.`})}}Object.defineProperty(m,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class y extends s{constructor(e){super(e,{code:y.code,name:"LimitExceededRpcError",shortMessage:"Request exceeds defined limit."})}}Object.defineProperty(y,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class g extends s{constructor(e){super(e,{code:g.code,name:"JsonRpcVersionUnsupportedError",shortMessage:"Version of JSON-RPC protocol is not supported."})}}Object.defineProperty(g,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class v extends a{constructor(e){super(e,{code:v.code,name:"UserRejectedRequestError",shortMessage:"User rejected the request."})}}Object.defineProperty(v,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class w extends a{constructor(e){super(e,{code:w.code,name:"UnauthorizedProviderError",shortMessage:"The requested method and/or account has not been authorized by the user."})}}Object.defineProperty(w,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class x extends a{constructor(e,{method:t}={}){super(e,{code:x.code,name:"UnsupportedProviderMethodError",shortMessage:`The Provider does not support the requested method${t?` " ${t}"`:""}.`})}}Object.defineProperty(x,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class P extends a{constructor(e){super(e,{code:P.code,name:"ProviderDisconnectedError",shortMessage:"The Provider is disconnected from all chains."})}}Object.defineProperty(P,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class $ extends a{constructor(e){super(e,{code:$.code,name:"ChainDisconnectedError",shortMessage:"The Provider is not connected to the requested chain."})}}Object.defineProperty($,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});class G extends a{constructor(e){super(e,{code:G.code,name:"SwitchChainError",shortMessage:"An error occurred when attempting to switch chain."})}}Object.defineProperty(G,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class I extends a{constructor(e){super(e,{code:I.code,name:"UnsupportedNonOptionalCapabilityError",shortMessage:"This Wallet does not support a capability that was not marked as optional."})}}Object.defineProperty(I,"code",{enumerable:!0,configurable:!0,writable:!0,value:5700});class T extends a{constructor(e){super(e,{code:T.code,name:"UnsupportedChainIdError",shortMessage:"This Wallet does not support the requested chain ID."})}}Object.defineProperty(T,"code",{enumerable:!0,configurable:!0,writable:!0,value:5710});class M extends a{constructor(e){super(e,{code:M.code,name:"DuplicateIdError",shortMessage:"There is already a bundle submitted with this ID."})}}Object.defineProperty(M,"code",{enumerable:!0,configurable:!0,writable:!0,value:5720});class E extends a{constructor(e){super(e,{code:E.code,name:"UnknownBundleIdError",shortMessage:"This bundle id is unknown / has not been submitted"})}}Object.defineProperty(E,"code",{enumerable:!0,configurable:!0,writable:!0,value:5730});class C extends a{constructor(e){super(e,{code:C.code,name:"BundleTooLargeError",shortMessage:"The call bundle is too large for the Wallet to process."})}}Object.defineProperty(C,"code",{enumerable:!0,configurable:!0,writable:!0,value:5740});class F extends a{constructor(e){super(e,{code:F.code,name:"AtomicReadyWalletRejectedUpgradeError",shortMessage:"The Wallet can support atomicity after an upgrade, but the user rejected the upgrade."})}}Object.defineProperty(F,"code",{enumerable:!0,configurable:!0,writable:!0,value:5750});class O extends a{constructor(e){super(e,{code:O.code,name:"AtomicityNotSupportedError",shortMessage:"The wallet does not support atomic execution but the request requires it."})}}Object.defineProperty(O,"code",{enumerable:!0,configurable:!0,writable:!0,value:5760});class A extends s{constructor(e){super(e,{name:"UnknownRpcError",shortMessage:"An unknown RPC error occurred."})}}},29625:function(e,t,n){"use strict";n.d(t,{Bj:function(){return o},Nc:function(){return i},Z8:function(){return s}});var r=n(81544);class i extends r.G{constructor({address:e}){super(`State for account "${e}" is set multiple times.`,{name:"AccountStateConflictError"})}}class s extends r.G{constructor(){super("state and stateDiff are set on the same account.",{name:"StateAssignmentConflictError"})}}function a(e){return e.reduce((e,{slot:t,value:n})=>`${e} ${t}: ${n} +`,"")}function o(e){return e.reduce((e,{address:t,...n})=>{let r=`${e} ${t}: +`;return n.nonce&&(r+=` nonce: ${n.nonce} +`),n.balance&&(r+=` balance: ${n.balance} +`),n.code&&(r+=` code: ${n.code} +`),n.state&&(r+=" state:\n"+a(n.state)),n.stateDiff&&(r+=" stateDiff:\n"+a(n.stateDiff)),r}," State Override:\n").slice(0,-1)}},63228:function(e,t,n){"use strict";n.d(t,{A3:function(){return b},Bh:function(){return l},JC:function(){return u},Yb:function(){return d},j3:function(){return c},mc:function(){return p},mk:function(){return f},vl:function(){return o},xr:function(){return a}});var r=n(71282),i=n(29707),s=n(81544);function a(e){let t=Object.entries(e).map(([e,t])=>void 0===t||!1===t?null:[e,t]).filter(Boolean),n=t.reduce((e,[t])=>Math.max(e,t.length),0);return t.map(([e,t])=>` ${`${e}:`.padEnd(n+1)} ${t}`).join("\n")}class o extends s.G{constructor({v:e}){super(`Invalid \`v\` value "${e}". Expected 27 or 28.`,{name:"InvalidLegacyVError"})}}class c extends s.G{constructor({transaction:e}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",a(e),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or","- an EIP-7702 Transaction with `authorizationList`, or","- a Legacy Transaction with `gasPrice`"],name:"InvalidSerializableTransactionError"})}}class u extends s.G{constructor({storageKey:e}){super(`Size for storage key "${e}" is invalid. Expected 32 bytes. Got ${Math.floor((e.length-2)/2)} bytes.`,{name:"InvalidStorageKeySizeError"})}}class f extends s.G{constructor(e,{account:t,docsPath:n,chain:s,data:o,gas:c,gasPrice:u,maxFeePerGas:f,maxPriorityFeePerGas:l,nonce:d,to:b,value:p}){super(e.shortMessage,{cause:e,docsPath:n,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Request Arguments:",a({chain:s&&`${s?.name} (id: ${s?.id})`,from:t?.address,to:b,value:void 0!==p&&`${(0,r.d)(p)} ${s?.nativeCurrency?.symbol||"ETH"}`,data:o,gas:c,gasPrice:void 0!==u&&`${(0,i.o)(u)} gwei`,maxFeePerGas:void 0!==f&&`${(0,i.o)(f)} gwei`,maxPriorityFeePerGas:void 0!==l&&`${(0,i.o)(l)} gwei`,nonce:d})].filter(Boolean),name:"TransactionExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=e}}class l extends s.G{constructor({blockHash:e,blockNumber:t,blockTag:n,hash:r,index:i}){let s="Transaction";n&&void 0!==i&&(s=`Transaction at block time "${n}" at index "${i}"`),e&&void 0!==i&&(s=`Transaction at block hash "${e}" at index "${i}"`),t&&void 0!==i&&(s=`Transaction at block number "${t}" at index "${i}"`),r&&(s=`Transaction with hash "${r}"`),super(`${s} could not be found.`,{name:"TransactionNotFoundError"})}}class d extends s.G{constructor({hash:e}){super(`Transaction receipt with hash "${e}" could not be found. The Transaction may not be processed on a block yet.`,{name:"TransactionReceiptNotFoundError"})}}class b extends s.G{constructor({receipt:e}){super(`Transaction with hash "${e.transactionHash}" reverted.`,{metaMessages:['The receipt marked the transaction as "reverted". This could mean that the function on the contract you are trying to call threw an error.'," ","You can attempt to extract the revert reason by:","- calling the `simulateContract` or `simulateCalls` Action with the `abi` and `functionName` of the contract","- using the `call` Action with raw `data`"],name:"TransactionReceiptRevertedError"}),Object.defineProperty(this,"receipt",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.receipt=e}}class p extends s.G{constructor({hash:e}){super(`Timed out while waiting for transaction with hash "${e}" to be confirmed.`,{name:"WaitForTransactionReceiptTimeoutError"})}}},97564:function(e,t,n){"use strict";n.d(t,{C:function(){return r},G:function(){return i}});let r=e=>e,i=e=>e},2742:function(e,t,n){"use strict";n.d(t,{r:function(){return h}});var r=n(65531),i=n(31669),s=n(46033),a=n(20556),o=n(69921),c=n(36826),u=n(63152),f=n(72932),l=n(59455);function d(e,t={}){void 0!==t.size&&(0,f.Yf)(e,{size:t.size});let n=(0,l.ci)(e,t);return(0,f.ly)(n,t)}var b=n(44659),p=n(30056);function h(e,t){let n="string"==typeof t?(0,b.nr)(t):t,h=(0,s.q)(n);if(0===(0,a.d)(n)&&e.length>0)throw new r.wb;if((0,a.d)(t)&&32>(0,a.d)(t))throw new r.xB({data:"string"==typeof t?t:(0,l.ci)(t),params:e,size:(0,a.d)(t)});let y=0,g=[];for(let t=0;t!e),s=i?[]:{},a=0;if(m(n)){let o=r+d(t.readBytes(32));for(let r=0;r1||n[0]>1)throw new u.yr(n);return!!n[0]}(t.readBytes(32),{size:32}),32];if(n.type.startsWith("bytes"))return function(e,t,{staticPosition:n}){let[r,i]=t.type.split("bytes");if(!i){let t=d(e.readBytes(32));e.setPosition(n+t);let r=d(e.readBytes(32));if(0===r)return e.setPosition(n+32),["0x",32];let i=e.readBytes(r);return e.setPosition(n+32),[(0,l.ci)(i),32]}return[(0,l.ci)(e.readBytes(Number.parseInt(i,10),32)),32]}(t,n,{staticPosition:s});if(n.type.startsWith("uint")||n.type.startsWith("int"))return function(e,t){let n=t.type.startsWith("int"),r=Number.parseInt(t.type.split("int")[1]||"256",10),i=e.readBytes(32);return[r>48?function(e,t={}){void 0!==t.size&&(0,f.Yf)(e,{size:t.size});let n=(0,l.ci)(e,t);return(0,f.y_)(n,t)}(i,{signed:n}):d(i,{signed:n}),32]}(t,n);if("string"===n.type)return function(e,{staticPosition:t}){let n=d(e.readBytes(32));e.setPosition(t+n);let r=d(e.readBytes(32));if(0===r)return e.setPosition(t+32),["",32];let i=e.readBytes(r,32),s=function(e,t={}){let n=e;return void 0!==t.size&&((0,f.Yf)(n,{size:t.size}),n=(0,c.f)(n,{dir:"right"})),new TextDecoder().decode(n)}((0,c.f)(i));return e.setPosition(t+32),[s,32]}(t,{staticPosition:s});throw new r.CI(n.type,{docsPath:"/docs/contract/decodeAbiParameters"})}(h,n,{staticPosition:0});y+=a,g.push(s)}return g}function m(e){let{type:t}=e;if("string"===t||"bytes"===t||t.endsWith("[]"))return!0;if("tuple"===t)return e.components?.some(m);let n=(0,p.S)(e.type);return!!(n&&m({...e,type:n[1]}))}},33591:function(e,t,n){"use strict";n.d(t,{p:function(){return u}});var r=n(55246),i=n(65531),s=n(69921),a=n(10464),o=n(2742),c=n(7275);function u(e){let{abi:t,data:n}=e,u=(0,s.tP)(n,0,4);if("0x"===u)throw new i.wb;let f=[...t||[],r.Up,r.hZ].find(e=>"error"===e.type&&u===(0,a.C)((0,c.t)(e)));if(!f)throw new i.yP(u,{docsPath:"/docs/contract/decodeErrorResult"});return{abiItem:f,args:"inputs"in f&&f.inputs&&f.inputs.length>0?(0,o.r)(f.inputs,(0,s.tP)(n,4)):void 0,errorName:f.name}}},65436:function(e,t,n){"use strict";n.d(t,{k:function(){return o}});var r=n(65531),i=n(2742),s=n(64043);let a="/docs/contract/decodeFunctionResult";function o(e){let{abi:t,args:n,functionName:o,data:c}=e,u=t[0];if(o){let e=(0,s.mE)({abi:t,args:n,name:o});if(!e)throw new r.xL(o,{docsPath:a});u=e}if("function"!==u.type)throw new r.xL(void 0,{docsPath:a});if(!u.outputs)throw new r.MX(u.name,{docsPath:a});let f=(0,i.r)(u.outputs,c);return f&&f.length>1?f:f&&1===f.length?f[0]:void 0}},30056:function(e,t,n){"use strict";n.d(t,{E:function(){return p},S:function(){return m}});var r=n(65531),i=n(10052),s=n(81544),a=n(63152),o=n(4012),c=n(89256),u=n(8796),f=n(20556),l=n(69921),d=n(59455),b=n(23251);function p(e,t){if(e.length!==t.length)throw new r.fs({expectedLength:e.length,givenLength:t.length});let n=h(function({params:e,values:t}){let n=[];for(let p=0;p0?(0,c.zo)([t,e]):t}}if(a)return{dynamic:!0,encoded:e}}return{dynamic:!1,encoded:(0,c.zo)(o.map(({encoded:e})=>e))}}(n,{length:i,param:{...t,type:s}})}if("tuple"===t.type)return function(t,{param:n}){let r=!1,i=[];for(let s=0;se))}}(n,{param:t});if("address"===t.type)return function(e){if(!(0,o.U)(e))throw new i.b({address:e});return{dynamic:!1,encoded:(0,u.gc)(e.toLowerCase())}}(n);if("bool"===t.type)return function(e){if("boolean"!=typeof e)throw new s.G(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:(0,u.gc)((0,d.C4)(e))}}(n);if(t.type.startsWith("uint")||t.type.startsWith("int")){let e=t.type.startsWith("int"),[,,r="256"]=b.lh.exec(t.type)??[];return function(e,{signed:t,size:n=256}){if("number"==typeof n){let r=2n**(BigInt(n)-(t?1n:0n))-1n,i=t?-r-1n:0n;if(e>r||e"type"in e&&"constructor"===e.type);if(!c)throw new r.fM({docsPath:a});if(!("inputs"in c)||!c.inputs||0===c.inputs.length)throw new r.cO({docsPath:a});let u=(0,s.E)(c.inputs,n);return(0,i.SM)([o,u])}},17283:function(e,t,n){"use strict";n.d(t,{R:function(){return f}});var r=n(89256),i=n(30056),s=n(65531),a=n(10464),o=n(7275),c=n(64043);let u="/docs/contract/encodeFunctionData";function f(e){let{args:t}=e,{abi:n,functionName:f}=1===e.abi.length&&e.functionName?.startsWith("0x")?e:function(e){let{abi:t,args:n,functionName:r}=e,i=t[0];if(r){let e=(0,c.mE)({abi:t,args:n,name:r});if(!e)throw new s.xL(r,{docsPath:u});i=e}if("function"!==i.type)throw new s.xL(void 0,{docsPath:u});return{abi:[i],functionName:(0,a.C)((0,o.t)(i))}}(e),l=n[0],d="inputs"in l&&l.inputs?(0,i.E)(l.inputs,t??[]):void 0;return(0,r.SM)([f,d??"0x"])}},7275:function(e,t,n){"use strict";n.d(t,{h:function(){return s},t:function(){return i}});var r=n(65531);function i(e,{includeName:t=!1}={}){if("function"!==e.type&&"event"!==e.type&&"error"!==e.type)throw new r.wM(e.type);return`${e.name}(${s(e.inputs,{includeName:t})})`}function s(e,{includeName:t=!1}={}){return e?e.map(e=>(function(e,{includeName:t}){return e.type.startsWith("tuple")?`(${s(e.components,{includeName:t})})${e.type.slice(5)}`:e.type+(t&&e.name?` ${e.name}`:"")})(e,{includeName:t})).join(t?", ":","):""}},64043:function(e,t,n){"use strict";n.d(t,{mE:function(){return c}});var r=n(65531),i=n(93610),s=n(4012),a=n(45392),o=n(10464);function c(e){let t;let{abi:n,args:c=[],name:u}=e,f=(0,i.v)(u,{strict:!1}),l=n.filter(e=>f?"function"===e.type?(0,o.C)(e)===u:"event"===e.type&&(0,a.n)(e)===u:"name"in e&&e.name===u);if(0!==l.length){if(1===l.length)return l[0];for(let e of l)if("inputs"in e){if(!c||0===c.length){if(!e.inputs||0===e.inputs.length)return e;continue}if(e.inputs&&0!==e.inputs.length&&e.inputs.length===c.length&&c.every((t,n)=>{let r="inputs"in e&&e.inputs[n];return!!r&&function e(t,n){let r=typeof t,i=n.type;switch(i){case"address":return(0,s.U)(t,{strict:!1});case"bool":return"boolean"===r;case"function":case"string":return"string"===r;default:if("tuple"===i&&"components"in n)return Object.values(n.components).every((n,r)=>e(Object.values(t)[r],n));if(/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(i))return"number"===r||"bigint"===r;if(/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(i))return"string"===r||t instanceof Uint8Array;if(/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(i))return Array.isArray(t)&&t.every(t=>e(t,{...n,type:i.replace(/(\[[0-9]{0,}\])$/,"")}));return!1}}(t,r)})){if(t&&"inputs"in t&&t.inputs){let n=function e(t,n,r){for(let i in t){let a=t[i],o=n[i];if("tuple"===a.type&&"tuple"===o.type&&"components"in a&&"components"in o)return e(a.components,o.components,r[i]);let c=[a.type,o.type];if(c.includes("address")&&c.includes("bytes20")||(c.includes("address")&&c.includes("string")||c.includes("address")&&c.includes("bytes"))&&(0,s.U)(r[i],{strict:!1}))return c}}(e.inputs,t.inputs,c);if(n)throw new r.S4({abiItem:e,type:n[0]},{abiItem:t,type:n[1]})}t=e}}return t||l[0]}}},55834:function(e,t,n){"use strict";n.d(t,{z:function(){return u}});var r=n(69021),i=n(89256),s=n(44659),a=n(59455),o=n(70044),c=n(13169);async function u(e){let{authorization:t,signature:n}=e;return(0,r.R)({hash:function(e){let{chainId:t,nonce:n,to:r}=e,u=e.contractAddress??e.address,f=(0,c.w)((0,i.SM)(["0x05",(0,o.LV)([t?(0,a.eC)(t):"0x",u,n?(0,a.eC)(n):"0x"])]));return"bytes"===r?(0,s.nr)(f):f}(t),signature:n??t})}},63563:function(e,t,n){"use strict";n.d(t,{P:function(){return s}});var r=n(44659),i=n(59455);function s(e){let{kzg:t}=e,n=e.to??("string"==typeof e.blobs[0]?"hex":"bytes"),s="string"==typeof e.blobs[0]?e.blobs.map(e=>(0,r.nr)(e)):e.blobs,a=[];for(let e of s)a.push(Uint8Array.from(t.blobToKzgCommitment(e)));return"bytes"===n?a:a.map(e=>(0,i.ci)(e))}},67496:function(e,t,n){"use strict";n.d(t,{y:function(){return s}});var r=n(44659),i=n(59455);function s(e){let{kzg:t}=e,n=e.to??("string"==typeof e.blobs[0]?"hex":"bytes"),s="string"==typeof e.blobs[0]?e.blobs.map(e=>(0,r.nr)(e)):e.blobs,a="string"==typeof e.commitments[0]?e.commitments.map(e=>(0,r.nr)(e)):e.commitments,o=[];for(let e=0;e(0,i.ci)(e))}},89952:function(e,t,n){"use strict";n.d(t,{C:function(){return o}});var r=n(59455);let i=n(10058).JQ;var s=n(93610),a=n(44659);function o(e){let{commitments:t,version:n}=e,o=e.to??("string"==typeof t[0]?"hex":"bytes"),c=[];for(let e of t)c.push(function(e){let{commitment:t,version:n=1}=e,o=e.to??("string"==typeof t?"hex":"bytes"),c=function(e,t){let n=i((0,s.v)(e,{strict:!1})?(0,a.O0)(e):e);return"bytes"===(t||"hex")?n:(0,r.NC)(n)}(t,"bytes");return c.set([n],0),"bytes"===o?c:(0,r.ci)(c)}({commitment:e,to:o,version:n}));return c}},10932:function(e,t,n){"use strict";n.d(t,{j:function(){return f}});var r=n(63563),i=n(67496),s=n(48073),a=n(46033),o=n(20556),c=n(44659),u=n(59455);function f(e){let{data:t,kzg:n,to:f}=e,l=e.blobs??function(e){let t=e.to??("string"==typeof e.data?"hex":"bytes"),n="string"==typeof e.data?(0,c.nr)(e.data):e.data,r=(0,o.d)(n);if(!r)throw new s.RX;if(r>761855)throw new s.m7({maxSize:761855,size:r});let i=[],f=!0,l=0;for(;f;){let e=(0,a.q)(new Uint8Array(131072)),t=0;for(;t<4096;){let r=n.slice(l,l+31);if(e.pushByte(0),e.pushBytes(r),r.length<31){e.pushByte(128),f=!1;break}t++,l+=31}i.push(e)}return"bytes"===t?i.map(e=>e.bytes):i.map(e=>(0,u.ci)(e.bytes))}({data:t,to:f}),d=e.commitments??(0,r.P)({blobs:l,kzg:n,to:f}),b=e.proofs??(0,i.y)({blobs:l,commitments:d,kzg:n,to:f}),p=[];for(let e=0;ee)throw new r.mm({blockNumber:e,chain:t,contract:{name:n,blockCreated:i.blockCreated}});return i.address}},46033:function(e,t,n){"use strict";n.d(t,{q:function(){return s}});var r=n(33630);let i={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new r.KD({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new r.lQ({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new r.T_({offset:e});let t=this.position-e;this.assertPosition(t),this.position=t},getReadCount(e){return this.positionReadCount.get(e||this.position)||0},incrementPosition(e){if(e<0)throw new r.T_({offset:e});let t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){let t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){let n=t??this.position;return this.assertPosition(n+e-1),this.bytes.subarray(n,n+e)},inspectUint8(e){let t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){let t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){let t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){let t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,255&e),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){this.assertReadLimit(),this._touch();let e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();let n=this.inspectBytes(e);return this.position+=t??e,n},readUint8(){this.assertReadLimit(),this._touch();let e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();let e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();let e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();let e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){let t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;let e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}};function s(e,{recursiveReadLimit:t=8192}={}){let n=Object.create(i);return n.bytes=e,n.dataView=new DataView(e.buffer??e,e.byteOffset,e.byteLength),n.positionReadCount=new Map,n.recursiveReadLimit=t,n}},69921:function(e,t,n){"use strict";n.d(t,{T4:function(){return u},p5:function(){return f},tP:function(){return a}});var r=n(47116),i=n(93610),s=n(20556);function a(e,t,n,{strict:r}={}){return(0,i.v)(e,{strict:!1})?f(e,t,n,{strict:r}):u(e,t,n,{strict:r})}function o(e,t){if("number"==typeof t&&t>0&&t>(0,s.d)(e)-1)throw new r.mV({offset:t,position:"start",size:(0,s.d)(e)})}function c(e,t,n){if("number"==typeof t&&"number"==typeof n&&(0,s.d)(e)!==n-t)throw new r.mV({offset:n,position:"end",size:(0,s.d)(e)})}function u(e,t,n,{strict:r}={}){o(e,t);let i=e.slice(t,n);return r&&c(i,t,n),i}function f(e,t,n,{strict:r}={}){o(e,t);let i=`0x${e.replace("0x","").slice((t??0)*2,(n??e.length)*2)}`;return r&&c(i,t,n),i}},70044:function(e,t,n){"use strict";n.d(t,{LV:function(){return o}});var r=n(81544),i=n(46033),s=n(44659),a=n(59455);function o(e,t="hex"){let n=function e(t){return Array.isArray(t)?function(e){let t=e.reduce((e,t)=>e+t.length,0),n=c(t);return{length:t<=55?1+t:1+n+t,encode(r){for(let{encode:i}of(t<=55?r.pushByte(192+t):(r.pushByte(247+n),1===n?r.pushUint8(t):2===n?r.pushUint16(t):3===n?r.pushUint24(t):r.pushUint32(t)),e))i(r)}}}(t.map(t=>e(t))):function(e){let t="string"==typeof e?(0,s.nr)(e):e,n=c(t.length);return{length:1===t.length&&t[0]<128?1:t.length<=55?1+t.length:1+n+t.length,encode(e){1===t.length&&t[0]<128||(t.length<=55?e.pushByte(128+t.length):(e.pushByte(183+n),1===n?e.pushUint8(t.length):2===n?e.pushUint16(t.length):3===n?e.pushUint24(t.length):e.pushUint32(t.length))),e.pushBytes(t)}}}(t)}(e),r=(0,i.q)(new Uint8Array(n.length));return(n.encode(r),"hex"===t)?(0,a.ci)(r.bytes):r.bytes}function c(e){if(e<256)return 1;if(e<65536)return 2;if(e<16777216)return 3;if(e<4294967296)return 4;throw new r.G("Length is too large.")}},14015:function(e,t,n){"use strict";n.d(t,{P:function(){return a}});var r=n(20010),i=n(78125),s=n(18856);function a(e,{docsPath:t,...n}){let a=(()=>{let t=(0,s.k)(e,n);return t instanceof i.cj?e:t})();return new r.cg(a,{docsPath:t,...n})}},34180:function(e,t,n){"use strict";n.d(t,{S:function(){return c}});var r=n(65531),i=n(81544),s=n(20010),a=n(17057),o=n(77014);function c(e,{abi:t,address:n,args:c,docsPath:u,functionName:f,sender:l}){let d=e instanceof s.VQ?e:e instanceof i.G?e.walk(e=>"data"in e)||e.walk():{},{code:b,data:p,details:h,message:m,shortMessage:y}=d,g=e instanceof r.wb?new s.Dk({functionName:f}):[3,o.XS.code].includes(b)&&(p||h||m||y)||b===o.yR.code&&"execution reverted"===h&&p?new s.Lu({abi:t,data:"object"==typeof p?p.data:p,functionName:f,message:d instanceof a.bs?h:y??m}):e;return new s.uq(g,{abi:t,args:c,contractAddress:n,docsPath:u,functionName:f,sender:l})}},18856:function(e,t,n){"use strict";n.d(t,{k:function(){return s}});var r=n(81544),i=n(78125);function s(e,t){let n=(e.details||"").toLowerCase(),s=e instanceof r.G?e.walk(e=>e?.code===i.M_.code):e;return s instanceof r.G?new i.M_({cause:e,message:s.details}):i.M_.nodeMessage.test(n)?new i.M_({cause:e,message:e.details}):i.Hh.nodeMessage.test(n)?new i.Hh({cause:e,maxFeePerGas:t?.maxFeePerGas}):i.G$.nodeMessage.test(n)?new i.G$({cause:e,maxFeePerGas:t?.maxFeePerGas}):i.ZI.nodeMessage.test(n)?new i.ZI({cause:e,nonce:t?.nonce}):i.vU.nodeMessage.test(n)?new i.vU({cause:e,nonce:t?.nonce}):i.se.nodeMessage.test(n)?new i.se({cause:e,nonce:t?.nonce}):i.C_.nodeMessage.test(n)?new i.C_({cause:e}):i.WF.nodeMessage.test(n)?new i.WF({cause:e,gas:t?.gas}):i.dR.nodeMessage.test(n)?new i.dR({cause:e,gas:t?.gas}):i.pZ.nodeMessage.test(n)?new i.pZ({cause:e}):i.cs.nodeMessage.test(n)?new i.cs({cause:e,maxFeePerGas:t?.maxFeePerGas,maxPriorityFeePerGas:t?.maxPriorityFeePerGas}):new i.cj({cause:e})}},93606:function(e,t,n){"use strict";n.d(t,{$:function(){return a}});var r=n(78125),i=n(63228),s=n(18856);function a(e,{docsPath:t,...n}){let a=(()=>{let t=(0,s.k)(e,n);return t instanceof r.cj?e:t})();return new i.mk(a,{docsPath:t,...n})}},59069:function(e,t,n){"use strict";n.d(t,{G:function(){return a},Z:function(){return s}});var r=n(94870),i=n(27481);function s(e,t){let n=(e.transactions??[]).map(e=>"string"==typeof e?e:(0,i.Tr)(e));return{...e,baseFeePerGas:e.baseFeePerGas?BigInt(e.baseFeePerGas):null,blobGasUsed:e.blobGasUsed?BigInt(e.blobGasUsed):void 0,difficulty:e.difficulty?BigInt(e.difficulty):void 0,excessBlobGas:e.excessBlobGas?BigInt(e.excessBlobGas):void 0,gasLimit:e.gasLimit?BigInt(e.gasLimit):void 0,gasUsed:e.gasUsed?BigInt(e.gasUsed):void 0,hash:e.hash?e.hash:null,logsBloom:e.logsBloom?e.logsBloom:null,nonce:e.nonce?e.nonce:null,number:e.number?BigInt(e.number):null,size:e.size?BigInt(e.size):void 0,timestamp:e.timestamp?BigInt(e.timestamp):void 0,transactions:n,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}let a=(0,r.$)("block",s)},70878:function(e,t,n){"use strict";function r(e,{format:t}){if(!t)return{};let n={};return!function t(r){for(let i of Object.keys(r))i in e&&(n[i]=e[i]),r[i]&&"object"==typeof r[i]&&!Array.isArray(r[i])&&t(r[i])}(t(e||{})),n}n.d(t,{K:function(){return r}})},94870:function(e,t,n){"use strict";function r(e,t){return({exclude:n,format:r})=>({exclude:n,format:(e,i)=>{let s=t(e,i);if(n)for(let e of n)delete s[e];return{...s,...r(e,i)}},type:e})}n.d(t,{$:function(){return r}})},55668:function(e,t,n){"use strict";function r(e,{args:t,eventName:n}={}){return{...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,blockTimestamp:e.blockTimestamp?BigInt(e.blockTimestamp):null===e.blockTimestamp?null:void 0,logIndex:e.logIndex?Number(e.logIndex):null,transactionHash:e.transactionHash?e.transactionHash:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,...n?{args:t,eventName:n}:{}}}n.d(t,{U:function(){return r}})},27481:function(e,t,n){"use strict";n.d(t,{Tr:function(){return a},c8:function(){return s},y_:function(){return o}});var r=n(72932),i=n(94870);let s={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"};function a(e,t){let n={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?(0,r.ly)(e.chainId):void 0,gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,maxFeePerBlobGas:e.maxFeePerBlobGas?BigInt(e.maxFeePerBlobGas):void 0,maxFeePerGas:e.maxFeePerGas?BigInt(e.maxFeePerGas):void 0,maxPriorityFeePerGas:e.maxPriorityFeePerGas?BigInt(e.maxPriorityFeePerGas):void 0,nonce:e.nonce?(0,r.ly)(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?s[e.type]:void 0,typeHex:e.type?e.type:void 0,value:e.value?BigInt(e.value):void 0,v:e.v?BigInt(e.v):void 0};return e.authorizationList&&(n.authorizationList=e.authorizationList.map(e=>({address:e.address,chainId:Number(e.chainId),nonce:Number(e.nonce),r:e.r,s:e.s,yParity:Number(e.yParity)}))),n.yParity=(()=>{if(e.yParity)return Number(e.yParity);if("bigint"==typeof n.v){if(0n===n.v||27n===n.v)return 0;if(1n===n.v||28n===n.v)return 1;if(n.v>=35n)return n.v%2n===0n?1:0}})(),"legacy"===n.type&&(delete n.accessList,delete n.maxFeePerBlobGas,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas,delete n.yParity),"eip2930"===n.type&&(delete n.maxFeePerBlobGas,delete n.maxFeePerGas,delete n.maxPriorityFeePerGas),"eip1559"===n.type&&delete n.maxFeePerBlobGas,n}let o=(0,i.$)("transaction",a)},13550:function(e,t,n){"use strict";n.d(t,{dI:function(){return u},ew:function(){return o},fA:function(){return c}});var r=n(72932),i=n(94870),s=n(55668),a=n(27481);let o={"0x0":"reverted","0x1":"success"};function c(e,t){let n={...e,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,contractAddress:e.contractAddress?e.contractAddress:null,cumulativeGasUsed:e.cumulativeGasUsed?BigInt(e.cumulativeGasUsed):null,effectiveGasPrice:e.effectiveGasPrice?BigInt(e.effectiveGasPrice):null,gasUsed:e.gasUsed?BigInt(e.gasUsed):null,logs:e.logs?e.logs.map(e=>(0,s.U)(e)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?(0,r.ly)(e.transactionIndex):null,status:e.status?o[e.status]:null,type:e.type?a.c8[e.type]||e.type:null};return e.blobGasPrice&&(n.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(n.blobGasUsed=BigInt(e.blobGasUsed)),n}let u=(0,i.$)("transactionReceipt",c)},92614:function(e,t,n){"use strict";n.d(t,{iy:function(){return o},tG:function(){return a}});var r=n(59455),i=n(94870);let s={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"};function a(e,t){let n={};return void 0!==e.authorizationList&&(n.authorizationList=e.authorizationList.map(e=>({address:e.address,r:e.r?(0,r.eC)(BigInt(e.r)):e.r,s:e.s?(0,r.eC)(BigInt(e.s)):e.s,chainId:(0,r.eC)(e.chainId),nonce:(0,r.eC)(e.nonce),...void 0!==e.yParity?{yParity:(0,r.eC)(e.yParity)}:{},...void 0!==e.v&&void 0===e.yParity?{v:(0,r.eC)(e.v)}:{}}))),void 0!==e.accessList&&(n.accessList=e.accessList),void 0!==e.blobVersionedHashes&&(n.blobVersionedHashes=e.blobVersionedHashes),void 0!==e.blobs&&("string"!=typeof e.blobs[0]?n.blobs=e.blobs.map(e=>(0,r.ci)(e)):n.blobs=e.blobs),void 0!==e.data&&(n.data=e.data),e.account&&(n.from=e.account.address),void 0!==e.from&&(n.from=e.from),void 0!==e.gas&&(n.gas=(0,r.eC)(e.gas)),void 0!==e.gasPrice&&(n.gasPrice=(0,r.eC)(e.gasPrice)),void 0!==e.maxFeePerBlobGas&&(n.maxFeePerBlobGas=(0,r.eC)(e.maxFeePerBlobGas)),void 0!==e.maxFeePerGas&&(n.maxFeePerGas=(0,r.eC)(e.maxFeePerGas)),void 0!==e.maxPriorityFeePerGas&&(n.maxPriorityFeePerGas=(0,r.eC)(e.maxPriorityFeePerGas)),void 0!==e.nonce&&(n.nonce=(0,r.eC)(e.nonce)),void 0!==e.to&&(n.to=e.to),void 0!==e.type&&(n.type=s[e.type]),void 0!==e.value&&(n.value=(0,r.eC)(e.value)),n}let o=(0,i.$)("transactionRequest",a)},82645:function(e,t,n){"use strict";function r(e,t,n){let r=e[t.name];if("function"==typeof r)return r;let i=e[n];return"function"==typeof i?i:n=>t(e,n)}n.d(t,{s:function(){return r}})},45392:function(e,t,n){"use strict";n.d(t,{n:function(){return r}});let r=n(40176).r},10464:function(e,t,n){"use strict";n.d(t,{C:function(){return s}});var r=n(69921),i=n(40176);let s=e=>(0,r.tP)((0,i.r)(e),0,4)},40176:function(e,t,n){"use strict";n.d(t,{r:function(){return u}});var r=n(44659),i=n(13169);let s=e=>(0,i.w)((0,r.O0)(e));var a=n(24658),o=n(81544);let c=e=>(function(e){let t=!0,n="",r=0,i="",s=!1;for(let a=0;ar.get(e)||[],c=()=>{let t=o();r.set(e,t.filter(e=>e.id!==a))},u=()=>{let t=o();if(!t.some(e=>e.id===a))return;let n=i.get(e);if(1===t.length&&n){let e=n();e instanceof Promise&&e.catch(()=>{})}c()},f=o();if(r.set(e,[...f,{id:a,fns:t}]),f&&f.length>0)return u;let l={};for(let e in t)l[e]=(...t)=>{let n=o();if(0!==n.length)for(let r of n)r.fns[e]?.(...t)};let d=n(l);return"function"==typeof d&&i.set(e,d),u}},41495:function(e,t,n){"use strict";n.d(t,{$:function(){return i}});var r=n(33457);function i(e,{emitOnBegin:t,initialWaitTime:n,interval:i}){let s=!0,a=()=>s=!1;return(async()=>{let o;t&&(o=await e({unpoll:a}));let c=await n?.(o)??i;await (0,r.D)(c);let u=async()=>{s&&(await e({unpoll:a}),await (0,r.D)(i),u())};u()})(),a}},43226:function(e,t,n){"use strict";n.d(t,{S:function(){return s}});var r=n(56921);let i=new Map;function s({fn:e,id:t,shouldSplitBatch:n,wait:s=0,sort:a}){let o=async()=>{let t=f();c();let n=t.map(({args:e})=>e);0!==n.length&&e(n).then(e=>{a&&Array.isArray(e)&&e.sort(a);for(let n=0;n{for(let n=0;ni.delete(t),u=()=>f().map(({args:e})=>e),f=()=>i.get(t)||[],l=e=>i.set(t,[...f(),e]);return{flush:c,async schedule(e){let{promise:t,resolve:i,reject:a}=(0,r.n)();return(n?.([...u(),e])&&o(),f().length>0)?l({args:e,resolve:i,reject:a}):(l({args:e,resolve:i,reject:a}),setTimeout(o,s)),t}}}},56921:function(e,t,n){"use strict";function r(){let e=()=>void 0,t=()=>void 0;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}n.d(t,{n:function(){return r}})},49287:function(e,t,n){"use strict";n.d(t,{J:function(){return i}});var r=n(33457);function i(e,{delay:t=100,retryCount:n=2,shouldRetry:i=()=>!0}={}){return new Promise((s,a)=>{let o=async({count:c=0}={})=>{let u=async({error:e})=>{let n="function"==typeof t?t({count:c,error:e}):t;n&&await (0,r.D)(n),o({count:c+1})};try{let t=await e();s(t)}catch(e){if(c{if(66!==t.length)throw new i.W_({size:t.length,targetSize:66,type:"hex"});if(66!==n.length)throw new i.W_({size:n.length,targetSize:66,type:"hex"});return e[t]=n,e},{})}function u(e){if(!e)return;let t={};for(let{address:n,...i}of e){if(!(0,a.U)(n,{strict:!1}))throw new r.b({address:n});if(t[n])throw new s.Nc({address:n});t[n]=function(e){let{balance:t,nonce:n,state:r,stateDiff:i,code:a}=e,u={};if(void 0!==a&&(u.code=a),void 0!==t&&(u.balance=(0,o.eC)(t)),void 0!==n&&(u.nonce=(0,o.eC)(n)),void 0!==r&&(u.state=c(r)),void 0!==i){if(u.state)throw new s.Z8;u.stateDiff=c(i)}return u}(i)}return t}},31853:function(e,t,n){"use strict";n.d(t,{P:function(){return r}});let r=(e,t,n)=>JSON.stringify(e,(e,n)=>{let r="bigint"==typeof n?n.toString():n;return"function"==typeof t?t(e,r):r},n)},54605:function(e,t,n){"use strict";n.d(t,{F:function(){return c}});var r=n(19775),i=n(75018),s=n(10052),a=n(78125),o=n(4012);function c(e){let{account:t,maxFeePerGas:n,maxPriorityFeePerGas:c,to:u}=e,f=t?(0,r.T)(t):void 0;if(f&&!(0,o.U)(f.address))throw new s.b({address:f.address});if(u&&!(0,o.U)(u))throw new s.b({address:u});if(n&&n>i.zL)throw new a.Hh({maxFeePerGas:n});if(c&&n&&c>n)throw new a.cs({maxFeePerGas:n,maxPriorityFeePerGas:c})}},90683:function(e,t,n){"use strict";n.d(t,{l:function(){return i}});var r=n(63228);function i(e){if(e.type)return e.type;if(void 0!==e.authorizationList)return"eip7702";if(void 0!==e.blobs||void 0!==e.blobVersionedHashes||void 0!==e.maxFeePerBlobGas||void 0!==e.sidecars)return"eip4844";if(void 0!==e.maxFeePerGas||void 0!==e.maxPriorityFeePerGas)return"eip1559";if(void 0!==e.gasPrice)return void 0!==e.accessList?"eip2930":"legacy";throw new r.j3({transaction:e})}},78217:function(e,t,n){"use strict";let r;n.d(t,{h:function(){return s}});let i=256;function s(e=11){if(!r||i+e>512){r="",i=0;for(let e=0;e<256;e++)r+=(256+256*Math.random()|0).toString(16).substring(1)}return r.substring(i,i+++e)}},71282:function(e,t,n){"use strict";n.d(t,{d:function(){return s}});var r=n(98173),i=n(39502);function s(e,t="wei"){return(0,i.b)(e,r.ez[t])}},29707:function(e,t,n){"use strict";n.d(t,{o:function(){return s}});var r=n(98173),i=n(39502);function s(e,t="wei"){return(0,i.b)(e,r.Zn[t])}},39502:function(e,t,n){"use strict";function r(e,t){let n=e.toString(),r=n.startsWith("-");r&&(n=n.slice(1));let[i,s]=[(n=n.padStart(t,"0")).slice(0,n.length-t),n.slice(n.length-t)];return s=s.replace(/(0+)$/,""),`${r?"-":""}${i||"0"}${s?`.${s}`:""}`}n.d(t,{b:function(){return r}})},33457:function(e,t,n){"use strict";async function r(e){return new Promise(t=>setTimeout(t,e))}n.d(t,{D:function(){return r}})},72138:function(e,t,n){"use strict";n.d(t,{G:function(){return r}});class r extends Error{constructor(e,t={}){let n=t.cause instanceof r?t.cause.details:t.cause?.message?t.cause.message:t.details,i=t.cause instanceof r&&t.cause.docsPath||t.docsPath;super([e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...i?[`Docs: https://abitype.dev${i}`]:[],...n?[`Details: ${n}`]:[],"Version: abitype@1.1.0"].join("\n")),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiTypeError"}),t.cause&&(this.cause=t.cause),this.details=n,this.docsPath=i,this.metaMessages=t.metaMessages,this.shortMessage=e}}},67995:function(e,t,n){"use strict";n.d(t,{F:function(){return s},Hk:function(){return a},a_:function(){return i}});var r=n(72138);class i extends r.G{constructor({signature:e}){super("Failed to parse ABI item.",{details:`parseAbiItem(${JSON.stringify(e,null,2)})`,docsPath:"/api/human#parseabiitem-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiItemError"})}}class s extends r.G{constructor({type:e}){super("Unknown type.",{metaMessages:[`Type "${e}" is not a valid ABI type. Perhaps you forgot to include a struct signature?`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownTypeError"})}}class a extends r.G{constructor({type:e}){super("Unknown type.",{metaMessages:[`Type "${e}" is not a valid ABI type.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSolidityTypeError"})}}},97913:function(e,t,n){"use strict";n.d(t,{$r:function(){return i},TT:function(){return a},_D:function(){return c},aZ:function(){return u},jO:function(){return s},zL:function(){return o}});var r=n(72138);class i extends r.G{constructor({params:e}){super("Failed to parse ABI parameters.",{details:`parseAbiParameters(${JSON.stringify(e,null,2)})`,docsPath:"/api/human#parseabiparameters-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiParametersError"})}}class s extends r.G{constructor({param:e}){super("Invalid ABI parameter.",{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParameterError"})}}class a extends r.G{constructor({param:e,name:t}){super("Invalid ABI parameter.",{details:e,metaMessages:[`"${t}" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SolidityProtectedKeywordError"})}}class o extends r.G{constructor({param:e,type:t,modifier:n}){super("Invalid ABI parameter.",{details:e,metaMessages:[`Modifier "${n}" not allowed${t?` in "${t}" type`:""}.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidModifierError"})}}class c extends r.G{constructor({param:e,type:t,modifier:n}){super("Invalid ABI parameter.",{details:e,metaMessages:[`Modifier "${n}" not allowed${t?` in "${t}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${n}" was given.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidFunctionModifierError"})}}class u extends r.G{constructor({abiParameter:e}){super("Invalid ABI parameter.",{details:JSON.stringify(e,null,2),metaMessages:["ABI parameter type is invalid."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiTypeParameterError"})}}},36701:function(e,t,n){"use strict";n.d(t,{H6:function(){return a},Vs:function(){return s},wn:function(){return i}});var r=n(72138);class i extends r.G{constructor({signature:e,type:t}){super(`Invalid ${t} signature.`,{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSignatureError"})}}class s extends r.G{constructor({signature:e}){super("Unknown signature.",{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSignatureError"})}}class a extends r.G{constructor({signature:e}){super("Invalid struct signature.",{details:e,metaMessages:["No properties exist."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStructSignatureError"})}}},24658:function(e,t,n){"use strict";n.d(t,{t:function(){return i}});var r=n(95387);function i(e){return"function"===e.type?`function ${e.name}(${(0,r.P)(e.inputs)})${e.stateMutability&&"nonpayable"!==e.stateMutability?` ${e.stateMutability}`:""}${e.outputs?.length?` returns (${(0,r.P)(e.outputs)})`:""}`:"event"===e.type?`event ${e.name}(${(0,r.P)(e.inputs)})`:"error"===e.type?`error ${e.name}(${(0,r.P)(e.inputs)})`:"constructor"===e.type?`constructor(${(0,r.P)(e.inputs)})${"payable"===e.stateMutability?" payable":""}`:"fallback"===e.type?`fallback() external${"payable"===e.stateMutability?" payable":""}`:"receive() external payable"}},95387:function(e,t,n){"use strict";n.d(t,{P:function(){return s}});var r=n(62619);let i=/^tuple(?(\[(\d*)\])*)$/;function s(e){let t="",n=e.length;for(let s=0;s[a-zA-Z$_][a-zA-Z0-9$_]*)\((?.*?)\)$/;function s(e){return i.test(e)}function a(e){return(0,r.Zw)(i,e)}let o=/^event (?[a-zA-Z$_][a-zA-Z0-9$_]*)\((?.*?)\)$/;function c(e){return o.test(e)}function u(e){return(0,r.Zw)(o,e)}let f=/^function (?[a-zA-Z$_][a-zA-Z0-9$_]*)\((?.*?)\)(?: (?external|public{1}))?(?: (?pure|view|nonpayable|payable{1}))?(?: returns\s?\((?.*?)\))?$/;function l(e){return f.test(e)}function d(e){return(0,r.Zw)(f,e)}let b=/^struct (?[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?.*?)\}$/;function p(e){return b.test(e)}function h(e){return(0,r.Zw)(b,e)}let m=/^constructor\((?.*?)\)(?:\s(?payable{1}))?$/;function y(e){return m.test(e)}function g(e){return(0,r.Zw)(m,e)}let v=/^fallback\(\) external(?:\s(?payable{1}))?$/;function w(e){return v.test(e)}function x(e){return(0,r.Zw)(v,e)}let P=/^receive\(\) external payable$/;function $(e){return P.test(e)}let G=new Set(["memory","indexed","storage","calldata"]),I=new Set(["indexed"]),T=new Set(["calldata","memory","storage"])},19540:function(e,t,n){"use strict";n.d(t,{D:function(){return l}});var r=n(62619),i=n(67995),s=n(97913),a=n(36701),o=n(72138);class c extends o.G{constructor({type:e}){super("Circular reference detected.",{metaMessages:[`Struct "${e}" is a circular reference.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CircularReferenceError"})}}var u=n(99940),f=n(64289);function l(e){let t={},n=e.length;for(let r=0;r[a-zA-Z$_][a-zA-Z0-9$_]*)(?(?:\[\d*?\])+?)?$/},64289:function(e,t,n){"use strict";n.d(t,{uN:function(){return y},C$:function(){return h},cK:function(){return l},Q4:function(){return m}});var r=n(62619),i=n(67995),s=n(97913),a=n(36701),o=n(72138);class c extends o.G{constructor({current:e,depth:t}){super("Unbalanced parentheses.",{metaMessages:[`"${e.trim()}" has too many ${t>0?"opening":"closing"} parentheses.`],details:`Depth "${t}"`}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParenthesisError"})}}let u=new Map([["address",{type:"address"}],["bool",{type:"bool"}],["bytes",{type:"bytes"}],["bytes32",{type:"bytes32"}],["int",{type:"int256"}],["int256",{type:"int256"}],["string",{type:"string"}],["uint",{type:"uint256"}],["uint8",{type:"uint8"}],["uint16",{type:"uint16"}],["uint24",{type:"uint24"}],["uint32",{type:"uint32"}],["uint64",{type:"uint64"}],["uint96",{type:"uint96"}],["uint112",{type:"uint112"}],["uint160",{type:"uint160"}],["uint192",{type:"uint192"}],["uint256",{type:"uint256"}],["address owner",{type:"address",name:"owner"}],["address to",{type:"address",name:"to"}],["bool approved",{type:"bool",name:"approved"}],["bytes _data",{type:"bytes",name:"_data"}],["bytes data",{type:"bytes",name:"data"}],["bytes signature",{type:"bytes",name:"signature"}],["bytes32 hash",{type:"bytes32",name:"hash"}],["bytes32 r",{type:"bytes32",name:"r"}],["bytes32 root",{type:"bytes32",name:"root"}],["bytes32 s",{type:"bytes32",name:"s"}],["string name",{type:"string",name:"name"}],["string symbol",{type:"string",name:"symbol"}],["string tokenURI",{type:"string",name:"tokenURI"}],["uint tokenId",{type:"uint256",name:"tokenId"}],["uint8 v",{type:"uint8",name:"v"}],["uint256 balance",{type:"uint256",name:"balance"}],["uint256 tokenId",{type:"uint256",name:"tokenId"}],["uint256 value",{type:"uint256",name:"value"}],["event:address indexed from",{type:"address",name:"from",indexed:!0}],["event:address indexed to",{type:"address",name:"to",indexed:!0}],["event:uint indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}],["event:uint256 indexed tokenId",{type:"uint256",name:"tokenId",indexed:!0}]]);var f=n(99940);function l(e,t={}){if((0,f.rh)(e))return function(e,t={}){let n=(0,f.l$)(e);if(!n)throw new a.wn({signature:e,type:"function"});let r=m(n.parameters),i=[],s=r.length;for(let e=0;e[a-zA-Z$_][a-zA-Z0-9$_]*(?:\spayable)?)(?(?:\[\d*?\])+?)?(?:\s(?calldata|indexed|memory|storage{1}))?(?:\s(?[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,b=/^\((?.+?)\)(?(?:\[\d*?\])+?)?(?:\s(?calldata|indexed|memory|storage{1}))?(?:\s(?[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,p=/^u?int$/;function h(e,t){var n,a;let o;let c=function(e,t,n){let r="";if(n)for(let e of Object.entries(n)){if(!e)continue;let t="";for(let n of e[1])t+=`[${n.type}${n.name?`:${n.name}`:""}]`;r+=`(${e[0]}{${t}})`}return t?`${t}:${e}${r}`:e}(e,t?.type,t?.structs);if(u.has(c))return u.get(c);let l=r.cN.test(e),v=(0,r.Zw)(l?b:d,e);if(!v)throw new s.jO({param:e});if(v.name&&("address"===(n=v.name)||"bool"===n||"function"===n||"string"===n||"tuple"===n||r.eL.test(n)||r.lh.test(n)||g.test(n)))throw new s.TT({param:e,name:v.name});let w=v.name?{name:v.name}:{},x="indexed"===v.modifier?{indexed:!0}:{},P=t?.structs??{},$={};if(l){o="tuple";let e=m(v.type),t=[],n=e.length;for(let r=0;r{if(t.cause instanceof r){if(t.cause.details)return t.cause.details;if(t.cause.shortMessage)return t.cause.shortMessage}return t.cause&&"details"in t.cause&&"string"==typeof t.cause.details?t.cause.details:t.cause?.message?t.cause.message:t.details})(),i=t.cause instanceof r&&t.cause.docsPath||t.docsPath,s=`https://oxlib.sh${i??""}`;super([e||"An error occurred.",...t.metaMessages?["",...t.metaMessages]:[],...n||i?["",n?`Details: ${n}`:void 0,i?`See: ${s}`:void 0]:[]].filter(e=>"string"==typeof e).join("\n"),t.cause?{cause:t.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:"ox@0.1.1"}),this.cause=t.cause,this.details=n,this.docs=s,this.docsPath=i,this.shortMessage=e}walk(e){return function e(t,n){return n?.(t)?t:t&&"object"==typeof t&&"cause"in t&&t.cause?e(t.cause,n):n?null:t}(this,e)}}},65759:function(e,t,n){"use strict";n.d(t,{$s:function(){return T},Dp:function(){return u},Gh:function(){return g},Gu:function(){return w},He:function(){return v},J5:function(){return x},M6:function(){return G},O3:function(){return f},Q_:function(){return p},dp:function(){return y},eh:function(){return h},mL:function(){return b},mV:function(){return I},tP:function(){return m},xS:function(){return d},xv:function(){return l},zo:function(){return c}});var r=n(22496),i=n(26499),s=n(62266);let a=new TextEncoder,o=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function c(...e){return`0x${e.reduce((e,t)=>e+t.replace("0x",""),"")}`}function u(e){return e instanceof Uint8Array?l(e):Array.isArray(e)?l(new Uint8Array(e)):e}function f(e,t={}){let n=`0x${Number(e)}`;return"number"==typeof t.size?(i.Yf(n,t.size),p(n,t.size)):n}function l(e,t={}){let n="";for(let t=0;tn||s>1n?r:r-s-1n}function v(e,t={}){let{signed:n,size:r}=t;return n||r?Number(g(e,t)):Number(e)}function w(e,t={}){let{strict:n=!1}=t;try{return!function(e,t={}){let{strict:n=!1}=t;if(!e||"string"!=typeof e)throw new P(e);if(n&&!/^0x[0-9a-fA-F]*$/.test(e)||!e.startsWith("0x"))throw new $(e)}(e,{strict:n}),!0}catch{return!1}}class x extends r.G{constructor({max:e,min:t,signed:n,size:r,value:i}){super(`Number \`${i}\` is not in safe${r?` ${8*r}-bit`:""}${n?" signed":" unsigned"} integer range ${e?`(\`${t}\` to \`${e}\`)`:`(above \`${t}\`)`}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.IntegerOutOfRangeError"})}}class P extends r.G{constructor(e){super(`Value \`${"object"==typeof e?s.P(e):e}\` of type \`${typeof e}\` is an invalid hex type.`,{metaMessages:['Hex types must be represented as `"0x${string}"`.']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexTypeError"})}}class $ extends r.G{constructor(e){super(`Value \`${e}\` is an invalid hex value.`,{metaMessages:['Hex values must start with `"0x"` and contain only hexadecimal characters (0-9, a-f, A-F).']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexValueError"})}}class G extends r.G{constructor({givenSize:e,maxSize:t}){super(`Size cannot exceed \`${t}\` bytes. Given size: \`${e}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeOverflowError"})}}class I extends r.G{constructor({offset:e,position:t,size:n}){super(`Slice ${"start"===t?"starting":"ending"} at offset \`${e}\` is out-of-bounds (size: \`${n}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SliceOffsetOutOfBoundsError"})}}class T extends r.G{constructor({size:e,targetSize:t,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (\`${e}\`) exceeds padding size (\`${t}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeExceedsPaddingSizeError"})}}},62266:function(e,t,n){"use strict";function r(e,t,n){return JSON.stringify(e,(e,n)=>"function"==typeof t?t(e,n):"bigint"==typeof n?n.toString()+"#__bigint":n,n)}n.d(t,{P:function(){return r}})},26499:function(e,t,n){"use strict";n.d(t,{EM:function(){return s},Ro:function(){return a},Yf:function(){return i},vk:function(){return o}});var r=n(65759);function i(e,t){if(r.dp(e)>t)throw new r.M6({givenSize:r.dp(e),maxSize:t})}function s(e,t){if("number"==typeof t&&t>0&&t>r.dp(e)-1)throw new r.mV({offset:t,position:"start",size:r.dp(e)})}function a(e,t,n){if("number"==typeof t&&"number"==typeof n&&r.dp(e)!==n-t)throw new r.mV({offset:n,position:"end",size:r.dp(e)})}function o(e,t={}){let{dir:n,size:i=32}=t;if(0===i)return e;let s=e.replace("0x","");if(s.length>2*i)throw new r.$s({size:Math.ceil(s.length/2),targetSize:i,type:"Hex"});return`0x${s["right"===n?"padEnd":"padStart"](2*i,"0")}`}},78749:function(e,t,n){"use strict";n.d(t,{V:function(){return a},F:function(){return o}});var r=n(2265),i=n(54026);function s(e){let{children:t,config:n,initialState:s,reconnectOnMount:a=!0}=e,{onMount:o}=function(e,t){let{initialState:n,reconnectOnMount:r}=t;return n&&!e._internal.store.persist.hasHydrated()&&e.setState({...n,chainId:e.chains.some(e=>e.id===n.chainId)?n.chainId:e.chains[0].id,connections:r?n.connections:new Map,status:r?"reconnecting":"disconnected"}),{async onMount(){e._internal.ssr&&(await e._internal.store.persist.rehydrate(),e._internal.mipd&&e._internal.connectors.setState(t=>{let n=new Set;for(let e of t??[])if(e.rdns)for(let t of Array.isArray(e.rdns)?e.rdns:[e.rdns])n.add(t);let r=[];for(let t of e._internal.mipd?.getProviders()??[]){if(n.has(t.info.rdns))continue;let i=e._internal.connectors.providerDetailToConnector(t),s=e._internal.connectors.setup(i);r.push(s)}return[...t,...r]})),r?(0,i.G)(e):e.storage&&e.setState(e=>({...e,connections:new Map}))}}}(n,{initialState:s,reconnectOnMount:a});n._internal.ssr||o();let c=(0,r.useRef)(!0);return(0,r.useEffect)(()=>{if(c.current&&n._internal.ssr)return o(),()=>{c.current=!1}},[]),t}let a=(0,r.createContext)(void 0);function o(e){let{children:t,config:n}=e;return(0,r.createElement)(s,e,(0,r.createElement)(a.Provider,{value:n},t))}}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/6554.7b6ca0e260079172.js b/frontend/.next/static/chunks/6554.7b6ca0e260079172.js new file mode 100644 index 0000000..47f6cf2 --- /dev/null +++ b/frontend/.next/static/chunks/6554.7b6ca0e260079172.js @@ -0,0 +1,14 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6554],{86554:function(a,h,t){t.r(h),t.d(h,{PhQrCode:function(){return i}}),t(31498);var e=t(38157),r=t(48567),v=t(54910),V=t(69709),Z=t(78313),H=Object.defineProperty,m=Object.getOwnPropertyDescriptor,o=(a,h,t,e)=>{for(var r,v=e>1?void 0:e?m(h,t):h,V=a.length-1;V>=0;V--)(r=a[V])&&(v=(e?r(h,t,v):r(v))||v);return e&&v&&H(h,t,v),v};let i=class extends r.oi{constructor(){super(...arguments),this.size="1em",this.weight="regular",this.color="currentColor",this.mirrored=!1}render(){var a;return(0,e.dy)` + ${i.weightsMap.get(null!=(a=this.weight)?a:"regular")} + `}};i.weightsMap=new Map([["thin",(0,e.YP)``],["light",(0,e.YP)``],["regular",(0,e.YP)``],["bold",(0,e.YP)``],["fill",(0,e.YP)``],["duotone",(0,e.YP)``]]),i.styles=(0,Z.iv)` + :host { + display: contents; + } + `,o([(0,V.C)({type:String,reflect:!0})],i.prototype,"size",2),o([(0,V.C)({type:String,reflect:!0})],i.prototype,"weight",2),o([(0,V.C)({type:String,reflect:!0})],i.prototype,"color",2),o([(0,V.C)({type:Boolean,reflect:!0})],i.prototype,"mirrored",2),i=o([(0,v.M)("ph-qr-code")],i)}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/6792.4df44eab8baa0a52.js b/frontend/.next/static/chunks/6792.4df44eab8baa0a52.js new file mode 100644 index 0000000..6c42918 --- /dev/null +++ b/frontend/.next/static/chunks/6792.4df44eab8baa0a52.js @@ -0,0 +1,14 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6792],{76792:function(t,a,e){e.r(a),e.d(a,{PhWallet:function(){return n}}),e(31498);var r=e(38157),i=e(48567),o=e(54910),s=e(69709),H=e(78313),l=Object.defineProperty,h=Object.getOwnPropertyDescriptor,p=(t,a,e,r)=>{for(var i,o=r>1?void 0:r?h(a,e):a,s=t.length-1;s>=0;s--)(i=t[s])&&(o=(r?i(a,e,o):i(o))||o);return r&&o&&l(a,e,o),o};let n=class extends i.oi{constructor(){super(...arguments),this.size="1em",this.weight="regular",this.color="currentColor",this.mirrored=!1}render(){var t;return(0,r.dy)` + ${n.weightsMap.get(null!=(t=this.weight)?t:"regular")} + `}};n.weightsMap=new Map([["thin",(0,r.YP)``],["light",(0,r.YP)``],["regular",(0,r.YP)``],["bold",(0,r.YP)``],["fill",(0,r.YP)``],["duotone",(0,r.YP)``]]),n.styles=(0,H.iv)` + :host { + display: contents; + } + `,p([(0,s.C)({type:String,reflect:!0})],n.prototype,"size",2),p([(0,s.C)({type:String,reflect:!0})],n.prototype,"weight",2),p([(0,s.C)({type:String,reflect:!0})],n.prototype,"color",2),p([(0,s.C)({type:Boolean,reflect:!0})],n.prototype,"mirrored",2),n=p([(0,o.M)("ph-wallet")],n)}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/687.8ae173c7b8f95af6.js b/frontend/.next/static/chunks/687.8ae173c7b8f95af6.js new file mode 100644 index 0000000..6bd38b6 --- /dev/null +++ b/frontend/.next/static/chunks/687.8ae173c7b8f95af6.js @@ -0,0 +1,14 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[687],{40687:function(a,t,e){e.r(t),e.d(t,{PhArrowsClockwise:function(){return c}}),e(31498);var r=e(38157),h=e(48567),o=e(54910),i=e(69709),l=e(78313),s=Object.defineProperty,p=Object.getOwnPropertyDescriptor,n=(a,t,e,r)=>{for(var h,o=r>1?void 0:r?p(t,e):t,i=a.length-1;i>=0;i--)(h=a[i])&&(o=(r?h(t,e,o):h(o))||o);return r&&o&&s(t,e,o),o};let c=class extends h.oi{constructor(){super(...arguments),this.size="1em",this.weight="regular",this.color="currentColor",this.mirrored=!1}render(){var a;return(0,r.dy)` + ${c.weightsMap.get(null!=(a=this.weight)?a:"regular")} + `}};c.weightsMap=new Map([["thin",(0,r.YP)``],["light",(0,r.YP)``],["regular",(0,r.YP)``],["bold",(0,r.YP)``],["fill",(0,r.YP)``],["duotone",(0,r.YP)``]]),c.styles=(0,l.iv)` + :host { + display: contents; + } + `,n([(0,i.C)({type:String,reflect:!0})],c.prototype,"size",2),n([(0,i.C)({type:String,reflect:!0})],c.prototype,"weight",2),n([(0,i.C)({type:String,reflect:!0})],c.prototype,"color",2),n([(0,i.C)({type:Boolean,reflect:!0})],c.prototype,"mirrored",2),c=n([(0,o.M)("ph-arrows-clockwise")],c)}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/6985.453256d75f56023b.js b/frontend/.next/static/chunks/6985.453256d75f56023b.js new file mode 100644 index 0000000..cf10ddf --- /dev/null +++ b/frontend/.next/static/chunks/6985.453256d75f56023b.js @@ -0,0 +1,768 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6985],{76985:function(e,t,i){i.r(t),i.d(t,{W3mSendConfirmedView:function(){return G},W3mSendSelectTokenView:function(){return N},W3mWalletSendPreviewView:function(){return Q},W3mWalletSendView:function(){return A}});var n=i(31133),r=i(84927),o=i(61347),a=i(86777),s=i(6943),l=i(89512),c=i(41272),u=i(64369),d=i(53357),h=i(66909),p=i(59712),m=i(63043),f=i(98388),g=i(92413);i(97585),i(96277),i(92374),i(39203);var w=i(7226);i(4594),i(44732);var b=(0,g.iv)` + :host { + width: 100%; + height: 100px; + border-radius: ${({borderRadius:e})=>e["5"]}; + border: 1px solid ${({tokens:e})=>e.theme.foregroundPrimary}; + background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; + transition: background-color ${({durations:e})=>e.lg} + ${({easings:e})=>e["ease-out-power-1"]}; + will-change: background-color; + position: relative; + } + + :host(:hover) { + background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; + } + + wui-flex { + width: 100%; + height: fit-content; + } + + wui-button { + display: ruby; + color: ${({tokens:e})=>e.theme.textPrimary}; + margin: 0 ${({spacing:e})=>e["2"]}; + } + + .instruction { + position: absolute; + top: 50%; + transform: translateY(-50%); + z-index: 2; + } + + .paste { + display: inline-flex; + } + + textarea { + background: transparent; + width: 100%; + font-family: ${({fontFamily:e})=>e.regular}; + font-style: normal; + font-size: ${({textSize:e})=>e.large}; + font-weight: ${({fontWeight:e})=>e.regular}; + line-height: ${({typography:e})=>e["lg-regular"].lineHeight}; + letter-spacing: ${({typography:e})=>e["lg-regular"].letterSpacing}; + color: ${({tokens:e})=>e.theme.textSecondary}; + caret-color: ${({tokens:e})=>e.core.backgroundAccentPrimary}; + box-sizing: border-box; + -webkit-appearance: none; + -moz-appearance: textfield; + padding: 0px; + border: none; + outline: none; + appearance: none; + resize: none; + overflow: hidden; + } +`,y=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let v=class extends n.oi{constructor(){super(...arguments),this.inputElementRef=(0,w.V)(),this.instructionElementRef=(0,w.V)(),this.readOnly=!1,this.instructionHidden=!!this.value,this.pasting=!1,this.onDebouncedSearch=d.j.debounce(async e=>{if(!e.length){this.setReceiverAddress("");return}let t=s.R.state.activeChain;if(d.j.isAddress(e,t)){this.setReceiverAddress(e);return}try{let t=await u.ConnectionController.getEnsAddress(e);if(t){o.S.setReceiverProfileName(e),o.S.setReceiverAddress(t);let i=await u.ConnectionController.getEnsAvatar(e);o.S.setReceiverProfileImageUrl(i||void 0)}}catch(t){this.setReceiverAddress(e)}finally{o.S.setLoading(!1)}})}firstUpdated(){this.value&&(this.instructionHidden=!0),this.checkHidden()}render(){return this.readOnly?(0,n.dy)` + + `:(0,n.dy)` + + Type or + + + Paste + + address + + + `}async focusInput(){this.instructionElementRef.value&&(this.instructionHidden=!0,await this.toggleInstructionFocus(!1),this.instructionElementRef.value.style.pointerEvents="none",this.inputElementRef.value?.focus(),this.inputElementRef.value&&(this.inputElementRef.value.selectionStart=this.inputElementRef.value.selectionEnd=this.inputElementRef.value.value.length))}async focusInstruction(){this.instructionElementRef.value&&(this.instructionHidden=!1,await this.toggleInstructionFocus(!0),this.instructionElementRef.value.style.pointerEvents="auto",this.inputElementRef.value?.blur())}async toggleInstructionFocus(e){this.instructionElementRef.value&&await this.instructionElementRef.value.animate([{opacity:e?0:1},{opacity:e?1:0}],{duration:100,easing:"ease",fill:"forwards"}).finished}onBoxClick(){this.value||this.instructionHidden||this.focusInput()}onBlur(){this.value||!this.instructionHidden||this.pasting||this.focusInstruction()}checkHidden(){this.instructionHidden&&this.focusInput()}async onPasteClick(){this.pasting=!0;let e=await navigator.clipboard.readText();o.S.setReceiverAddress(e),this.focusInput()}onInputChange(e){let t=e.target;this.pasting=!1,this.value=e.target?.value,t.value&&!this.instructionHidden&&this.focusInput(),o.S.setLoading(!0),this.onDebouncedSearch(t.value)}setReceiverAddress(e){o.S.setReceiverAddress(e),o.S.setReceiverProfileName(void 0),o.S.setReceiverProfileImageUrl(void 0),o.S.setLoading(!1)}};v.styles=b,y([(0,r.Cb)()],v.prototype,"value",void 0),y([(0,r.Cb)({type:Boolean})],v.prototype,"readOnly",void 0),y([(0,r.SB)()],v.prototype,"instructionHidden",void 0),y([(0,r.SB)()],v.prototype,"pasting",void 0),v=y([(0,g.Mo)("w3m-input-address")],v);var x=i(23614);i(78489),i(51437),i(7060);var k=(0,g.iv)` + :host { + width: 100%; + height: 100px; + border-radius: ${({borderRadius:e})=>e["5"]}; + border: 1px solid ${({tokens:e})=>e.theme.foregroundPrimary}; + background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; + transition: background-color ${({durations:e})=>e.lg} + ${({easings:e})=>e["ease-out-power-1"]}; + will-change: background-color; + transition: all ${({easings:e})=>e["ease-out-power-1"]} + ${({durations:e})=>e.lg}; + } + + :host(:hover) { + background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; + } + + wui-flex { + width: 100%; + height: fit-content; + } + + wui-button { + width: 100%; + display: flex; + justify-content: flex-end; + } + + wui-input-amount { + mask-image: linear-gradient( + 270deg, + transparent 0px, + transparent 8px, + black 24px, + black 25px, + black 32px, + black 100% + ); + } + + .totalValue { + width: 100%; + } +`,$=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let S=class extends n.oi{constructor(){super(...arguments),this.readOnly=!1,this.isInsufficientBalance=!1}render(){let e=this.readOnly||!this.token;return(0,n.dy)` + + + ${this.buttonTemplate()} + + ${this.bottomTemplate()} + `}buttonTemplate(){return this.token?(0,n.dy)` + `:(0,n.dy)`Select token`}handleSelectButtonClick(){this.readOnly||a.RouterController.push("WalletSendSelectToken")}sendValueTemplate(){if(!this.readOnly&&this.token&&this.sendTokenAmount){let e=this.token.price*this.sendTokenAmount;return(0,n.dy)`${e?`$${x.C.formatNumberToLocalString(e,2)}`:"Incorrect value"}`}return null}maxAmountTemplate(){return this.token?(0,n.dy)` + ${g.Hg.roundNumber(Number(this.token.quantity.numeric),6,5)} + `:null}actionTemplate(){return this.token?(0,n.dy)`Max`:null}bottomTemplate(){return this.readOnly?null:(0,n.dy)` + ${this.sendValueTemplate()} + + ${this.maxAmountTemplate()} ${this.actionTemplate()} + + `}onInputChange(e){o.S.setTokenAmount(e.detail)}onMaxClick(){if(this.token){let e=x.C.bigNumber(this.token.quantity.numeric);o.S.setTokenAmount(Number(e.toFixed(20)))}}};S.styles=k,$([(0,r.Cb)({type:Object})],S.prototype,"token",void 0),$([(0,r.Cb)({type:Boolean})],S.prototype,"readOnly",void 0),$([(0,r.Cb)({type:Number})],S.prototype,"sendTokenAmount",void 0),$([(0,r.Cb)({type:Boolean})],S.prototype,"isInsufficientBalance",void 0),S=$([(0,g.Mo)("w3m-input-token")],S);var C=(0,g.iv)` + :host { + display: block; + } + + wui-flex { + position: relative; + } + + wui-icon-box { + width: 32px; + height: 32px; + border-radius: ${({borderRadius:e})=>e["10"]} !important; + border: 4px solid ${({tokens:e})=>e.theme.backgroundPrimary}; + background: ${({tokens:e})=>e.theme.foregroundPrimary}; + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + z-index: 3; + } + + wui-button { + --local-border-radius: ${({borderRadius:e})=>e["4"]} !important; + } + + .inputContainer { + height: fit-content; + } +`,R=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let T={INSUFFICIENT_FUNDS:"Insufficient Funds",INCORRECT_VALUE:"Incorrect Value",INVALID_ADDRESS:"Invalid Address",ADD_ADDRESS:"Add Address",ADD_AMOUNT:"Add Amount",SELECT_TOKEN:"Select Token",PREVIEW_SEND:"Preview Send"},A=class extends n.oi{constructor(){super(),this.unsubscribe=[],this.isTryingToChooseDifferentWallet=!1,this.token=o.S.state.token,this.sendTokenAmount=o.S.state.sendTokenAmount,this.receiverAddress=o.S.state.receiverAddress,this.receiverProfileName=o.S.state.receiverProfileName,this.loading=o.S.state.loading,this.params=a.RouterController.state.data?.send,this.caipAddress=s.R.getAccountData()?.caipAddress,this.message=T.PREVIEW_SEND,this.disconnecting=!1,this.token&&!this.params&&(this.fetchBalances(),this.fetchNetworkPrice());let e=s.R.subscribeKey("activeCaipAddress",t=>{!t&&this.isTryingToChooseDifferentWallet&&(this.isTryingToChooseDifferentWallet=!1,l.I.open({view:"Connect",data:{redirectView:"WalletSend"}}).catch(()=>null),e())});this.unsubscribe.push(s.R.subscribeAccountStateProp("caipAddress",e=>{this.caipAddress=e}),o.S.subscribe(e=>{this.token=e.token,this.sendTokenAmount=e.sendTokenAmount,this.receiverAddress=e.receiverAddress,this.receiverProfileName=e.receiverProfileName,this.loading=e.loading}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}async firstUpdated(){await this.handleSendParameters()}render(){this.getMessage();let e=!!this.params;return(0,n.dy)` + + + + + + ${this.buttonTemplate()} + `}async fetchBalances(){await o.S.fetchTokenBalance(),o.S.fetchNetworkBalance()}async fetchNetworkPrice(){await c.nY.getNetworkTokenPrice()}onButtonClick(){a.RouterController.push("WalletSendPreview",{send:this.params})}onFundWalletClick(){a.RouterController.push("FundWallet",{redirectView:"WalletSend"})}async onConnectDifferentWalletClick(){try{this.isTryingToChooseDifferentWallet=!0,this.disconnecting=!0,await u.ConnectionController.disconnect()}finally{this.disconnecting=!1}}getMessage(){this.message=T.PREVIEW_SEND,this.receiverAddress&&!d.j.isAddress(this.receiverAddress,s.R.state.activeChain)&&(this.message=T.INVALID_ADDRESS),this.receiverAddress||(this.message=T.ADD_ADDRESS),this.sendTokenAmount&&this.token&&this.sendTokenAmount>Number(this.token.quantity.numeric)&&(this.message=T.INSUFFICIENT_FUNDS),this.sendTokenAmount||(this.message=T.ADD_AMOUNT),this.sendTokenAmount&&this.token?.price&&!(this.sendTokenAmount*this.token.price)&&(this.message=T.INCORRECT_VALUE),this.token||(this.message=T.SELECT_TOKEN)}buttonTemplate(){let e=!this.message.startsWith(T.PREVIEW_SEND),t=this.message===T.INSUFFICIENT_FUNDS,i=!!this.params;return t&&!i?(0,n.dy)` + + + Fund Wallet + + + + + + Connect a different wallet + + + `:(0,n.dy)` + + ${this.message} + + `}async handleSendParameters(){if(this.loading=!0,!this.params){this.loading=!1;return}let e=Number(this.params.amount);if(isNaN(e)){h.SnackController.showError("Invalid amount"),this.loading=!1;return}let{namespace:t,chainId:i,assetAddress:n}=this.params;if(!p.bq.SEND_PARAMS_SUPPORTED_CHAINS.includes(t)){h.SnackController.showError(`Chain "${t}" is not supported for send parameters`),this.loading=!1;return}let r=s.R.getCaipNetworkById(i,t);if(!r){h.SnackController.showError(`Network with id "${i}" not found`),this.loading=!1;return}try{let{balance:t,name:i,symbol:a,decimals:s}=await f.Q.fetchERC20Balance({caipAddress:this.caipAddress,assetAddress:n,caipNetwork:r});if(!i||!a||!s||!t){h.SnackController.showError("Token not found");return}o.S.setToken({name:i,symbol:a,chainId:r.id.toString(),address:`${r.chainNamespace}:${r.id}:${n}`,value:0,price:0,quantity:{decimals:s.toString(),numeric:t.toString()},iconUrl:m.f.getTokenImage(a)??""}),o.S.setTokenAmount(e),o.S.setReceiverAddress(this.params.to)}catch(e){console.error("Failed to load token information:",e),h.SnackController.showError("Failed to load token information")}finally{this.loading=!1}}};A.styles=C,R([(0,r.SB)()],A.prototype,"token",void 0),R([(0,r.SB)()],A.prototype,"sendTokenAmount",void 0),R([(0,r.SB)()],A.prototype,"receiverAddress",void 0),R([(0,r.SB)()],A.prototype,"receiverProfileName",void 0),R([(0,r.SB)()],A.prototype,"loading",void 0),R([(0,r.SB)()],A.prototype,"params",void 0),R([(0,r.SB)()],A.prototype,"caipAddress",void 0),R([(0,r.SB)()],A.prototype,"message",void 0),R([(0,r.SB)()],A.prototype,"disconnecting",void 0),A=R([(0,g.Mo)("w3m-wallet-send-view")],A),i(64349),i(79207);var E=(0,g.iv)` + .contentContainer { + height: 440px; + overflow: scroll; + scrollbar-width: none; + } + + .contentContainer::-webkit-scrollbar { + display: none; + } + + wui-icon-box { + width: 40px; + height: 40px; + border-radius: ${({borderRadius:e})=>e["3"]}; + } +`,P=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let N=class extends n.oi{constructor(){super(),this.unsubscribe=[],this.tokenBalances=o.S.state.tokenBalances,this.search="",this.onDebouncedSearch=d.j.debounce(e=>{this.search=e}),this.fetchBalancesAndNetworkPrice(),this.unsubscribe.push(o.S.subscribe(e=>{this.tokenBalances=e.tokenBalances}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return(0,n.dy)` + + ${this.templateSearchInput()} ${this.templateTokens()} + + `}async fetchBalancesAndNetworkPrice(){this.tokenBalances&&this.tokenBalances?.length!==0||(await this.fetchBalances(),await this.fetchNetworkPrice())}async fetchBalances(){await o.S.fetchTokenBalance(),o.S.fetchNetworkBalance()}async fetchNetworkPrice(){await c.nY.getNetworkTokenPrice()}templateSearchInput(){return(0,n.dy)` + + + + `}templateTokens(){return this.tokens=this.tokenBalances?.filter(e=>e.chainId===s.R.state.activeCaipNetwork?.caipNetworkId),this.search?this.filteredTokens=this.tokenBalances?.filter(e=>e.name.toLowerCase().includes(this.search.toLowerCase())):this.filteredTokens=this.tokens,(0,n.dy)` + + + Your tokens + + + ${this.filteredTokens&&this.filteredTokens.length>0?this.filteredTokens.map(e=>(0,n.dy)``):(0,n.dy)` + + + + No tokens found + + + Your tokens will appear here + + + Buy + `} + + + `}onBuyClick(){a.RouterController.push("OnRampProviders")}onInputChange(e){this.onDebouncedSearch(e.detail)}handleTokenClick(e){o.S.setToken(e),o.S.setTokenAmount(void 0),a.RouterController.goBack()}};N.styles=E,P([(0,r.SB)()],N.prototype,"tokenBalances",void 0),P([(0,r.SB)()],N.prototype,"tokens",void 0),P([(0,r.SB)()],N.prototype,"filteredTokens",void 0),P([(0,r.SB)()],N.prototype,"search",void 0),N=P([(0,g.Mo)("w3m-wallet-send-select-token-view")],N);var I=i(42935),D=i(44649),B=i(59388),z=i(31929);i(74975),i(23805),i(18360),i(5680);var O=i(84249),j=i(57116);i(48682);var V=i(11131),_=(0,V.iv)` + :host { + height: 32px; + display: flex; + align-items: center; + gap: ${({spacing:e})=>e[1]}; + border-radius: ${({borderRadius:e})=>e[32]}; + background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; + padding: ${({spacing:e})=>e[1]}; + padding-left: ${({spacing:e})=>e[2]}; + } + + wui-avatar, + wui-image { + width: 24px; + height: 24px; + border-radius: ${({borderRadius:e})=>e[16]}; + } + + wui-icon { + border-radius: ${({borderRadius:e})=>e[16]}; + } +`,U=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let W=class extends n.oi{constructor(){super(...arguments),this.text=""}render(){return(0,n.dy)`${this.text} + ${this.imageTemplate()}`}imageTemplate(){return this.address?(0,n.dy)``:this.imageSrc?(0,n.dy)``:(0,n.dy)``}};W.styles=[O.ET,O.ZM,_],U([(0,r.Cb)({type:String})],W.prototype,"text",void 0),U([(0,r.Cb)({type:String})],W.prototype,"address",void 0),U([(0,r.Cb)({type:String})],W.prototype,"imageSrc",void 0),W=U([(0,j.M)("wui-preview-item")],W);var F=i(32801),M=(0,V.iv)` + :host { + display: flex; + padding: ${({spacing:e})=>e[4]} ${({spacing:e})=>e[3]}; + width: 100%; + background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; + border-radius: ${({borderRadius:e})=>e[4]}; + } + + wui-image { + width: 20px; + height: 20px; + border-radius: ${({borderRadius:e})=>e[16]}; + } + + wui-icon { + width: 20px; + height: 20px; + } +`,H=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let L=class extends n.oi{constructor(){super(...arguments),this.imageSrc=void 0,this.textTitle="",this.textValue=void 0}render(){return(0,n.dy)` + + ${this.textTitle} + ${this.templateContent()} + + `}templateContent(){return this.imageSrc?(0,n.dy)``:this.textValue?(0,n.dy)` ${this.textValue} `:(0,n.dy)``}};L.styles=[O.ET,O.ZM,M],H([(0,r.Cb)()],L.prototype,"imageSrc",void 0),H([(0,r.Cb)()],L.prototype,"textTitle",void 0),H([(0,r.Cb)()],L.prototype,"textValue",void 0),L=H([(0,j.M)("wui-list-content")],L);var q=(0,g.iv)` + :host { + display: flex; + width: auto; + flex-direction: column; + gap: ${({spacing:e})=>e["1"]}; + border-radius: ${({borderRadius:e})=>e["5"]}; + background: ${({tokens:e})=>e.theme.foregroundPrimary}; + padding: ${({spacing:e})=>e["3"]} ${({spacing:e})=>e["2"]} + ${({spacing:e})=>e["2"]} ${({spacing:e})=>e["2"]}; + } + + wui-list-content { + width: -webkit-fill-available !important; + } + + wui-text { + padding: 0 ${({spacing:e})=>e["2"]}; + } + + wui-flex { + margin-top: ${({spacing:e})=>e["2"]}; + } + + .network { + cursor: pointer; + transition: background-color ${({durations:e})=>e.lg} + ${({easings:e})=>e["ease-out-power-1"]}; + will-change: background-color; + } + + .network:focus-visible { + border: 1px solid ${({tokens:e})=>e.core.textAccentPrimary}; + background-color: ${({tokens:e})=>e.core.glass010}; + -webkit-box-shadow: 0px 0px 0px 4px ${({tokens:e})=>e.core.foregroundAccent010}; + -moz-box-shadow: 0px 0px 0px 4px ${({tokens:e})=>e.core.foregroundAccent010}; + box-shadow: 0px 0px 0px 4px ${({tokens:e})=>e.core.foregroundAccent010}; + } + + .network:hover { + background-color: ${({tokens:e})=>e.core.glass010}; + } + + .network:active { + background-color: ${({tokens:e})=>e.core.glass010}; + } +`,Y=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let K=class extends n.oi{constructor(){super(...arguments),this.params=a.RouterController.state.data?.send}render(){return(0,n.dy)` Details + + + + ${this.networkTemplate()} + `}networkTemplate(){return this.caipNetwork?.name?(0,n.dy)` this.onNetworkClick(this.caipNetwork)} + class="network" + textTitle="Network" + imageSrc=${(0,F.o)(m.f.getNetworkImage(this.caipNetwork))} + >`:null}onNetworkClick(e){e&&!this.params&&a.RouterController.push("Networks",{network:e})}};K.styles=q,Y([(0,r.Cb)()],K.prototype,"receiverAddress",void 0),Y([(0,r.Cb)({type:Object})],K.prototype,"caipNetwork",void 0),Y([(0,r.SB)()],K.prototype,"params",void 0),K=Y([(0,g.Mo)("w3m-wallet-send-details")],K);var Z=(0,g.iv)` + wui-avatar, + wui-image { + display: ruby; + width: 32px; + height: 32px; + border-radius: ${({borderRadius:e})=>e["20"]}; + } + + .sendButton { + width: 70%; + --local-width: 100% !important; + --local-border-radius: ${({borderRadius:e})=>e["4"]} !important; + } + + .cancelButton { + width: 30%; + --local-width: 100% !important; + --local-border-radius: ${({borderRadius:e})=>e["4"]} !important; + } +`,J=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let Q=class extends n.oi{constructor(){super(),this.unsubscribe=[],this.token=o.S.state.token,this.sendTokenAmount=o.S.state.sendTokenAmount,this.receiverAddress=o.S.state.receiverAddress,this.receiverProfileName=o.S.state.receiverProfileName,this.receiverProfileImageUrl=o.S.state.receiverProfileImageUrl,this.caipNetwork=s.R.state.activeCaipNetwork,this.loading=o.S.state.loading,this.params=a.RouterController.state.data?.send,this.unsubscribe.push(o.S.subscribe(e=>{this.token=e.token,this.sendTokenAmount=e.sendTokenAmount,this.receiverAddress=e.receiverAddress,this.receiverProfileName=e.receiverProfileName,this.receiverProfileImageUrl=e.receiverProfileImageUrl,this.loading=e.loading}),s.R.subscribeKey("activeCaipNetwork",e=>this.caipNetwork=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return(0,n.dy)` + + + + Send + ${this.sendValueTemplate()} + + + + + + + + To + + + + + + + + Review transaction carefully + + + + Cancel + + + Send + + + `}sendValueTemplate(){if(!this.params&&this.token&&this.sendTokenAmount){let e=this.token.price*this.sendTokenAmount;return(0,n.dy)`$${e.toFixed(2)}`}return null}async onSendClick(){if(!this.sendTokenAmount||!this.receiverAddress){h.SnackController.showError("Please enter a valid amount and receiver address");return}try{await o.S.sendToken(),this.params?a.RouterController.reset("WalletSendConfirmed"):(h.SnackController.showSuccess("Transaction started"),a.RouterController.replace("Account"))}catch(i){let e="Failed to send transaction. Please try again.",t=i instanceof B.g&&i.originalName===I.jD.PROVIDER_RPC_ERROR_NAME.USER_REJECTED_REQUEST;(s.R.state.activeChain===D.b.CHAIN.SOLANA||t)&&i instanceof Error&&(e=i.message),z.X.sendEvent({type:"track",event:t?"SEND_REJECTED":"SEND_ERROR",properties:o.S.getSdkEventProperties(i)}),h.SnackController.showError(e)}}onCancelClick(){a.RouterController.goBack()}};Q.styles=Z,J([(0,r.SB)()],Q.prototype,"token",void 0),J([(0,r.SB)()],Q.prototype,"sendTokenAmount",void 0),J([(0,r.SB)()],Q.prototype,"receiverAddress",void 0),J([(0,r.SB)()],Q.prototype,"receiverProfileName",void 0),J([(0,r.SB)()],Q.prototype,"receiverProfileImageUrl",void 0),J([(0,r.SB)()],Q.prototype,"caipNetwork",void 0),J([(0,r.SB)()],Q.prototype,"loading",void 0),J([(0,r.SB)()],Q.prototype,"params",void 0),Q=J([(0,g.Mo)("w3m-wallet-send-preview-view")],Q);var X=(0,g.iv)` + .icon-box { + width: 64px; + height: 64px; + border-radius: 16px; + background-color: ${({spacing:e})=>e[16]}; + border: 8px solid ${({tokens:e})=>e.theme.borderPrimary}; + border-radius: ${({borderRadius:e})=>e.round}; + } +`;let G=class extends n.oi{constructor(){super(),this.unsubscribe=[],this.unsubscribe.push()}render(){return(0,n.dy)` + + + + + + You successfully sent asset + + + Close + + + `}onCloseClick(){l.I.close()}};G.styles=X,G=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a}([(0,g.Mo)("w3m-send-confirmed-view")],G)},78489:function(e,t,i){var n=i(31133),r=i(84927),o=i(7226),a=i(11131),s=i(84249),l=i(3874),c=i(57116),u=(0,a.iv)` + :host { + position: relative; + display: inline-block; + } + + :host([data-error='true']) > input { + color: ${({tokens:e})=>e.core.textError}; + } + + :host([data-error='false']) > input { + color: ${({tokens:e})=>e.theme.textSecondary}; + } + + input { + background: transparent; + height: auto; + box-sizing: border-box; + color: ${({tokens:e})=>e.theme.textPrimary}; + font-feature-settings: 'case' on; + font-size: ${({textSize:e})=>e.h4}; + caret-color: ${({tokens:e})=>e.core.backgroundAccentPrimary}; + line-height: ${({typography:e})=>e["h4-regular-mono"].lineHeight}; + letter-spacing: ${({typography:e})=>e["h4-regular-mono"].letterSpacing}; + -webkit-appearance: none; + -moz-appearance: textfield; + padding: 0px; + font-family: ${({fontFamily:e})=>e.mono}; + } + + :host([data-width-variant='auto']) input { + width: 100%; + } + + :host([data-width-variant='fit']) input { + width: 1ch; + } + + .wui-input-amount-fit-mirror { + position: absolute; + visibility: hidden; + white-space: pre; + font-size: var(--local-font-size); + line-height: 130%; + letter-spacing: -1.28px; + font-family: ${({fontFamily:e})=>e.mono}; + } + + .wui-input-amount-fit-width { + display: inline-block; + position: relative; + } + + input::-webkit-outer-spin-button, + input::-webkit-inner-spin-button { + -webkit-appearance: none; + margin: 0; + } + + input::placeholder { + color: ${({tokens:e})=>e.theme.textSecondary}; + } +`,d=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let h=class extends n.oi{constructor(){super(...arguments),this.inputElementRef=(0,o.V)(),this.disabled=!1,this.value="",this.placeholder="0",this.widthVariant="auto",this.maxDecimals=void 0,this.maxIntegers=void 0,this.fontSize="h4",this.error=!1}firstUpdated(){this.resizeInput()}updated(){this.style.setProperty("--local-font-size",a.gR.textSize[this.fontSize]),this.resizeInput()}render(){return(this.dataset.widthVariant=this.widthVariant,this.dataset.error=String(this.error),this.inputElementRef?.value&&this.value&&(this.inputElementRef.value.value=this.value),"auto"===this.widthVariant)?this.inputTemplate():(0,n.dy)` +
+ + ${this.inputTemplate()} +
+ `}inputTemplate(){return(0,n.dy)``}dispatchInputChangeEvent(){this.inputElementRef.value&&(this.inputElementRef.value.value=l.H.maskInput({value:this.inputElementRef.value.value,decimals:this.maxDecimals,integers:this.maxIntegers}),this.dispatchEvent(new CustomEvent("inputChange",{detail:this.inputElementRef.value.value,bubbles:!0,composed:!0})),this.resizeInput())}resizeInput(){if("fit"===this.widthVariant){let e=this.inputElementRef.value;if(e){let t=e.previousElementSibling;t&&(t.textContent=e.value||"0",e.style.width=`${t.offsetWidth}px`)}}}};h.styles=[s.ET,s.ZM,u],d([(0,r.Cb)({type:Boolean})],h.prototype,"disabled",void 0),d([(0,r.Cb)({type:String})],h.prototype,"value",void 0),d([(0,r.Cb)({type:String})],h.prototype,"placeholder",void 0),d([(0,r.Cb)({type:String})],h.prototype,"widthVariant",void 0),d([(0,r.Cb)({type:Number})],h.prototype,"maxDecimals",void 0),d([(0,r.Cb)({type:Number})],h.prototype,"maxIntegers",void 0),d([(0,r.Cb)({type:String})],h.prototype,"fontSize",void 0),d([(0,r.Cb)({type:Boolean})],h.prototype,"error",void 0),d([(0,c.M)("wui-input-amount")],h)},7060:function(e,t,i){var n=i(31133),r=i(84927);i(74975),i(23805),i(42653),i(18360),i(5680);var o=i(84249),a=i(57116),s=i(11131),l=(0,s.iv)` + button { + display: block; + display: flex; + align-items: center; + padding: ${({spacing:e})=>e[1]}; + transition: background-color ${({durations:e})=>e.lg} + ${({easings:e})=>e["ease-out-power-2"]}; + will-change: background-color; + background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; + border-radius: ${({borderRadius:e})=>e[32]}; + } + + wui-image { + border-radius: ${({borderRadius:e})=>e[32]}; + } + + wui-text { + padding-left: ${({spacing:e})=>e[1]}; + padding-right: ${({spacing:e})=>e[1]}; + } + + .left-icon-container { + width: 24px; + height: 24px; + justify-content: center; + align-items: center; + } + + .left-image-container { + position: relative; + justify-content: center; + align-items: center; + } + + .chain-image { + position: absolute; + border: 1px solid ${({tokens:e})=>e.theme.foregroundPrimary}; + } + + /* -- Sizes --------------------------------------------------- */ + button[data-size='lg'] { + height: 32px; + } + + button[data-size='md'] { + height: 28px; + } + + button[data-size='sm'] { + height: 24px; + } + + button[data-size='lg'] .token-image { + width: 24px; + height: 24px; + } + + button[data-size='md'] .token-image { + width: 20px; + height: 20px; + } + + button[data-size='sm'] .token-image { + width: 16px; + height: 16px; + } + + button[data-size='lg'] .left-icon-container { + width: 24px; + height: 24px; + } + + button[data-size='md'] .left-icon-container { + width: 20px; + height: 20px; + } + + button[data-size='sm'] .left-icon-container { + width: 16px; + height: 16px; + } + + button[data-size='lg'] .chain-image { + width: 12px; + height: 12px; + bottom: 2px; + right: -4px; + } + + button[data-size='md'] .chain-image { + width: 10px; + height: 10px; + bottom: 2px; + right: -4px; + } + + button[data-size='sm'] .chain-image { + width: 8px; + height: 8px; + bottom: 2px; + right: -3px; + } + + /* -- Focus states --------------------------------------------------- */ + button:focus-visible:enabled { + background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; + box-shadow: 0 0 0 4px ${({tokens:e})=>e.core.foregroundAccent040}; + } + + /* -- Hover & Active states ----------------------------------------------------------- */ + @media (hover: hover) { + button:hover:enabled, + button:active:enabled { + background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; + } + } + + /* -- Disabled states --------------------------------------------------- */ + button:disabled { + background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; + opacity: 0.5; + } +`,c=function(e,t,i,n){var r,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,i,a):r(t,i))||a);return o>3&&a&&Object.defineProperty(t,i,a),a};let u={lg:"lg-regular",md:"lg-regular",sm:"md-regular"},d={lg:"lg",md:"md",sm:"sm"},h=class extends n.oi{constructor(){super(...arguments),this.size="md",this.disabled=!1,this.text="",this.loading=!1}render(){return this.loading?(0,n.dy)` + + + `:(0,n.dy)` + + `}imageTemplate(){if(this.imageSrc&&this.chainImageSrc)return(0,n.dy)` + + + `;if(this.imageSrc)return(0,n.dy)``;let e=d[this.size];return(0,n.dy)` + + `}textTemplate(){let e=u[this.size];return(0,n.dy)`${this.text}`}};h.styles=[o.ET,o.ZM,l],c([(0,r.Cb)()],h.prototype,"size",void 0),c([(0,r.Cb)()],h.prototype,"imageSrc",void 0),c([(0,r.Cb)()],h.prototype,"chainImageSrc",void 0),c([(0,r.Cb)({type:Boolean})],h.prototype,"disabled",void 0),c([(0,r.Cb)()],h.prototype,"text",void 0),c([(0,r.Cb)({type:Boolean})],h.prototype,"loading",void 0),c([(0,a.M)("wui-token-button")],h)}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/70.903da54c4e7020d3.js b/frontend/.next/static/chunks/70.903da54c4e7020d3.js new file mode 100644 index 0000000..19a03fa --- /dev/null +++ b/frontend/.next/static/chunks/70.903da54c4e7020d3.js @@ -0,0 +1,268 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[70],{90070:function(e,t,n){n.r(t),n.d(t,{W3mPayLoadingView:function(){return j},W3mPayView:function(){return B},arbitrumUSDC:function(){return es},arbitrumUSDT:function(){return ed},baseETH:function(){return et},baseSepoliaETH:function(){return ea},baseUSDC:function(){return en},ethereumUSDC:function(){return er},ethereumUSDT:function(){return eu},getExchanges:function(){return X},getIsPaymentInProgress:function(){return Q},getPayError:function(){return Z},getPayResult:function(){return J},openPay:function(){return K},optimismUSDC:function(){return ei},optimismUSDT:function(){return el},pay:function(){return q},polygonUSDC:function(){return eo},polygonUSDT:function(){return ep},solanaSOL:function(){return ey},solanaUSDC:function(){return ec},solanaUSDT:function(){return em}});var a=n(31133),r=n(84927),i=n(32801),s=n(6943),o=n(89512),c=n(53357),u=n(66909),l=n(64369),d=n(92413);n(97585),n(96277),n(4594),n(65451),n(29158),n(1799),n(53774),n(81255),n(10005),n(39203),n(44732),n(40511);var p=n(69887),m=n(55543),y=n(44649),h=n(86988),w=n(31929),g=n(76115),E=n(86777);let f={INVALID_PAYMENT_CONFIG:"INVALID_PAYMENT_CONFIG",INVALID_RECIPIENT:"INVALID_RECIPIENT",INVALID_ASSET:"INVALID_ASSET",INVALID_AMOUNT:"INVALID_AMOUNT",UNKNOWN_ERROR:"UNKNOWN_ERROR",UNABLE_TO_INITIATE_PAYMENT:"UNABLE_TO_INITIATE_PAYMENT",INVALID_CHAIN_NAMESPACE:"INVALID_CHAIN_NAMESPACE",GENERIC_PAYMENT_ERROR:"GENERIC_PAYMENT_ERROR",UNABLE_TO_GET_EXCHANGES:"UNABLE_TO_GET_EXCHANGES",ASSET_NOT_SUPPORTED:"ASSET_NOT_SUPPORTED",UNABLE_TO_GET_PAY_URL:"UNABLE_TO_GET_PAY_URL",UNABLE_TO_GET_BUY_STATUS:"UNABLE_TO_GET_BUY_STATUS"},I={[f.INVALID_PAYMENT_CONFIG]:"Invalid payment configuration",[f.INVALID_RECIPIENT]:"Invalid recipient address",[f.INVALID_ASSET]:"Invalid asset specified",[f.INVALID_AMOUNT]:"Invalid payment amount",[f.UNKNOWN_ERROR]:"Unknown payment error occurred",[f.UNABLE_TO_INITIATE_PAYMENT]:"Unable to initiate payment",[f.INVALID_CHAIN_NAMESPACE]:"Invalid chain namespace",[f.GENERIC_PAYMENT_ERROR]:"Unable to process payment",[f.UNABLE_TO_GET_EXCHANGES]:"Unable to get exchanges",[f.ASSET_NOT_SUPPORTED]:"Asset not supported by the selected exchange",[f.UNABLE_TO_GET_PAY_URL]:"Unable to get payment URL",[f.UNABLE_TO_GET_BUY_STATUS]:"Unable to get buy status"};class A extends Error{get message(){return I[this.code]}constructor(e,t){super(I[e]),this.name="AppKitPayError",this.code=e,this.details=t,Error.captureStackTrace&&Error.captureStackTrace(this,A)}}var N=n(5688);class b extends Error{}async function P(e,t){let n=function(){let e=N.OptionsController.getSnapshot().projectId;return`https://rpc.walletconnect.org/v1/json-rpc?projectId=${e}`}(),{sdkType:a,sdkVersion:r,projectId:i}=N.OptionsController.getSnapshot(),s={jsonrpc:"2.0",id:1,method:e,params:{...t||{},st:a,sv:r,projectId:i}},o=await fetch(n,{method:"POST",body:JSON.stringify(s),headers:{"Content-Type":"application/json"}}),c=await o.json();if(c.error)throw new b(c.error.message);return c}async function C(e){return(await P("reown_getExchanges",e)).result}async function S(e){return(await P("reown_getExchangePayUrl",e)).result}async function _(e){return(await P("reown_getExchangeBuyStatus",e)).result}let x=["eip155","solana"],T={eip155:{native:{assetNamespace:"slip44",assetReference:"60"},defaultTokenNamespace:"erc20"},solana:{native:{assetNamespace:"slip44",assetReference:"501"},defaultTokenNamespace:"token"}};function v(e,t){let{chainNamespace:n,chainId:a}=h.u.parseCaipNetworkId(e),r=T[n];if(!r)throw Error(`Unsupported chain namespace for CAIP-19 formatting: ${n}`);let i=r.native.assetNamespace,s=r.native.assetReference;"native"!==t&&(i=r.defaultTokenNamespace,s=t);let o=`${n}:${a}`;return`${o}/${i}:${s}`}var k=n(41613);async function R(e){let{paymentAssetNetwork:t,activeCaipNetwork:n,approvedCaipNetworkIds:a,requestedCaipNetworks:r}=e,i=c.j.sortRequestedNetworks(a,r).find(e=>e.caipNetworkId===t);if(!i)throw new A(f.INVALID_PAYMENT_CONFIG);if(i.caipNetworkId===n.caipNetworkId)return;let o=s.R.getNetworkProp("supportsAllNetworks",i.chainNamespace);if(!(a?.includes(i.caipNetworkId)||o))throw new A(f.INVALID_PAYMENT_CONFIG);try{await s.R.switchActiveNetwork(i)}catch(e){throw new A(f.GENERIC_PAYMENT_ERROR,e)}}async function U(e,t,n){if(t!==y.b.CHAIN.EVM)throw new A(f.INVALID_CHAIN_NAMESPACE);if(!n.fromAddress)throw new A(f.INVALID_PAYMENT_CONFIG,"fromAddress is required for native EVM payments.");let a="string"==typeof n.amount?parseFloat(n.amount):n.amount;if(isNaN(a))throw new A(f.INVALID_PAYMENT_CONFIG);let r=e.metadata?.decimals??18,i=l.ConnectionController.parseUnits(a.toString(),r);if("bigint"!=typeof i)throw new A(f.GENERIC_PAYMENT_ERROR);return await l.ConnectionController.sendTransaction({chainNamespace:t,to:n.recipient,address:n.fromAddress,value:i,data:"0x"})??void 0}async function D(e,t){if(!t.fromAddress)throw new A(f.INVALID_PAYMENT_CONFIG,"fromAddress is required for ERC20 EVM payments.");let n=e.asset,a=t.recipient,r=Number(e.metadata.decimals),i=l.ConnectionController.parseUnits(t.amount.toString(),r);if(void 0===i)throw new A(f.GENERIC_PAYMENT_ERROR);return await l.ConnectionController.writeContract({fromAddress:t.fromAddress,tokenAddress:n,args:[a,i],method:"transfer",abi:k.g.getERC20Abi(n),chainNamespace:y.b.CHAIN.EVM})??void 0}async function O(e,t){if(e!==y.b.CHAIN.SOLANA)throw new A(f.INVALID_CHAIN_NAMESPACE);if(!t.fromAddress)throw new A(f.INVALID_PAYMENT_CONFIG,"fromAddress is required for Solana payments.");let n="string"==typeof t.amount?parseFloat(t.amount):t.amount;if(isNaN(n)||n<=0)throw new A(f.INVALID_PAYMENT_CONFIG,"Invalid payment amount.");try{if(!g.O.getProvider(e))throw new A(f.GENERIC_PAYMENT_ERROR,"No Solana provider available.");let a=await l.ConnectionController.sendTransaction({chainNamespace:y.b.CHAIN.SOLANA,to:t.recipient,value:n,tokenMint:t.tokenMint});if(!a)throw new A(f.GENERIC_PAYMENT_ERROR,"Transaction failed.");return a}catch(e){if(e instanceof A)throw e;throw new A(f.GENERIC_PAYMENT_ERROR,`Solana payment failed: ${e}`)}}let L="unknown",M=(0,p.sj)({paymentAsset:{network:"eip155:1",asset:"0x0",metadata:{name:"0x0",symbol:"0x0",decimals:0}},recipient:"0x0",amount:0,isConfigured:!1,error:null,isPaymentInProgress:!1,exchanges:[],isLoading:!1,openInNewTab:!0,redirectUrl:void 0,payWithExchange:void 0,currentPayment:void 0,analyticsSet:!1,paymentId:void 0}),$={state:M,subscribe:e=>(0,p.Ld)(M,()=>e(M)),subscribeKey:(e,t)=>(0,m.VW)(M,e,t),async handleOpenPay(e){this.resetState(),this.setPaymentConfig(e),this.subscribeEvents(),this.initializeAnalytics(),M.isConfigured=!0,w.X.sendEvent({type:"track",event:"PAY_MODAL_OPEN",properties:{exchanges:M.exchanges,configuration:{network:M.paymentAsset.network,asset:M.paymentAsset.asset,recipient:M.recipient,amount:M.amount}}}),await o.I.open({view:"Pay"})},resetState(){M.paymentAsset={network:"eip155:1",asset:"0x0",metadata:{name:"0x0",symbol:"0x0",decimals:0}},M.recipient="0x0",M.amount=0,M.isConfigured=!1,M.error=null,M.isPaymentInProgress=!1,M.isLoading=!1,M.currentPayment=void 0},setPaymentConfig(e){if(!e.paymentAsset)throw new A(f.INVALID_PAYMENT_CONFIG);try{M.paymentAsset=e.paymentAsset,M.recipient=e.recipient,M.amount=e.amount,M.openInNewTab=e.openInNewTab??!0,M.redirectUrl=e.redirectUrl,M.payWithExchange=e.payWithExchange,M.error=null}catch(e){throw new A(f.INVALID_PAYMENT_CONFIG,e.message)}},getPaymentAsset:()=>M.paymentAsset,getExchanges:()=>M.exchanges,async fetchExchanges(){try{M.isLoading=!0;let e=await C({page:0,asset:v(M.paymentAsset.network,M.paymentAsset.asset),amount:M.amount.toString()});M.exchanges=e.exchanges.slice(0,2)}catch(e){throw u.SnackController.showError(I.UNABLE_TO_GET_EXCHANGES),new A(f.UNABLE_TO_GET_EXCHANGES)}finally{M.isLoading=!1}},async getAvailableExchanges(e){try{let t=e?.asset&&e?.network?v(e.network,e.asset):void 0;return await C({page:e?.page??0,asset:t,amount:e?.amount?.toString()})}catch(e){throw new A(f.UNABLE_TO_GET_EXCHANGES)}},async getPayUrl(e,t,n=!1){try{let a=Number(t.amount),r=await S({exchangeId:e,asset:v(t.network,t.asset),amount:a.toString(),recipient:`${t.network}:${t.recipient}`});return w.X.sendEvent({type:"track",event:"PAY_EXCHANGE_SELECTED",properties:{source:"pay",exchange:{id:e},configuration:{network:t.network,asset:t.asset,recipient:t.recipient,amount:a},currentPayment:{type:"exchange",exchangeId:e},headless:n}}),n&&(this.initiatePayment(),w.X.sendEvent({type:"track",event:"PAY_INITIATED",properties:{source:"pay",paymentId:M.paymentId||L,configuration:{network:t.network,asset:t.asset,recipient:t.recipient,amount:a},currentPayment:{type:"exchange",exchangeId:e}}})),r}catch(e){if(e instanceof Error&&e.message.includes("is not supported"))throw new A(f.ASSET_NOT_SUPPORTED);throw Error(e.message)}},async openPayUrl(e,t,n=!1){try{let a=await this.getPayUrl(e.exchangeId,t,n);if(!a)throw new A(f.UNABLE_TO_GET_PAY_URL);let r=e.openInNewTab??!0;return c.j.openHref(a.url,r?"_blank":"_self"),a}catch(e){throw e instanceof A?M.error=e.message:M.error=I.GENERIC_PAYMENT_ERROR,new A(f.UNABLE_TO_GET_PAY_URL)}},subscribeEvents(){M.isConfigured||(l.ConnectionController.subscribeKey("connections",e=>{e.size>0&&this.handlePayment()}),s.R.subscribeChainProp("accountState",e=>{let t=l.ConnectionController.hasAnyConnection(y.b.CONNECTOR_ID.WALLET_CONNECT);e?.caipAddress&&(t?setTimeout(()=>{this.handlePayment()},100):this.handlePayment())}))},async handlePayment(){M.currentPayment={type:"wallet",status:"IN_PROGRESS"};let e=s.R.getActiveCaipAddress();if(!e)return;let{chainId:t,address:n}=h.u.parseCaipAddress(e),a=s.R.state.activeChain;if(!n||!t||!a||!g.O.getProvider(a))return;let r=s.R.state.activeCaipNetwork;if(r&&!M.isPaymentInProgress)try{this.initiatePayment();let e=s.R.getAllRequestedCaipNetworks(),t=s.R.getAllApprovedCaipNetworkIds();switch(await R({paymentAssetNetwork:M.paymentAsset.network,activeCaipNetwork:r,approvedCaipNetworkIds:t,requestedCaipNetworks:e}),await o.I.open({view:"PayLoading"}),a){case y.b.CHAIN.EVM:"native"===M.paymentAsset.asset&&(M.currentPayment.result=await U(M.paymentAsset,a,{recipient:M.recipient,amount:M.amount,fromAddress:n})),M.paymentAsset.asset.startsWith("0x")&&(M.currentPayment.result=await D(M.paymentAsset,{recipient:M.recipient,amount:M.amount,fromAddress:n})),M.currentPayment.status="SUCCESS";break;case y.b.CHAIN.SOLANA:M.currentPayment.result=await O(a,{recipient:M.recipient,amount:M.amount,fromAddress:n,tokenMint:"native"===M.paymentAsset.asset?void 0:M.paymentAsset.asset}),M.currentPayment.status="SUCCESS";break;default:throw new A(f.INVALID_CHAIN_NAMESPACE)}}catch(e){e instanceof A?M.error=e.message:M.error=I.GENERIC_PAYMENT_ERROR,M.currentPayment.status="FAILED",u.SnackController.showError(M.error)}finally{M.isPaymentInProgress=!1}},getExchangeById:e=>M.exchanges.find(t=>t.id===e),validatePayConfig(e){let{paymentAsset:t,recipient:n,amount:a}=e;if(!t)throw new A(f.INVALID_PAYMENT_CONFIG);if(!n)throw new A(f.INVALID_RECIPIENT);if(!t.asset)throw new A(f.INVALID_ASSET);if(null==a||a<=0)throw new A(f.INVALID_AMOUNT)},handlePayWithWallet(){let e=s.R.getActiveCaipAddress();if(!e){E.RouterController.push("Connect");return}let{chainId:t,address:n}=h.u.parseCaipAddress(e),a=s.R.state.activeChain;if(!n||!t||!a){E.RouterController.push("Connect");return}this.handlePayment()},async handlePayWithExchange(e){try{M.currentPayment={type:"exchange",exchangeId:e};let{network:t,asset:n}=M.paymentAsset,a={network:t,asset:n,amount:M.amount,recipient:M.recipient},r=await this.getPayUrl(e,a);if(!r)throw new A(f.UNABLE_TO_INITIATE_PAYMENT);return M.currentPayment.sessionId=r.sessionId,M.currentPayment.status="IN_PROGRESS",M.currentPayment.exchangeId=e,this.initiatePayment(),{url:r.url,openInNewTab:M.openInNewTab}}catch(e){return e instanceof A?M.error=e.message:M.error=I.GENERIC_PAYMENT_ERROR,M.isPaymentInProgress=!1,u.SnackController.showError(M.error),null}},async getBuyStatus(e,t){try{let n=await _({sessionId:t,exchangeId:e});return("SUCCESS"===n.status||"FAILED"===n.status)&&w.X.sendEvent({type:"track",event:"SUCCESS"===n.status?"PAY_SUCCESS":"PAY_ERROR",properties:{message:"FAILED"===n.status?c.j.parseError(M.error):void 0,source:"pay",paymentId:M.paymentId||L,configuration:{network:M.paymentAsset.network,asset:M.paymentAsset.asset,recipient:M.recipient,amount:M.amount},currentPayment:{type:"exchange",exchangeId:M.currentPayment?.exchangeId,sessionId:M.currentPayment?.sessionId,result:n.txHash}}}),n}catch(e){throw new A(f.UNABLE_TO_GET_BUY_STATUS)}},async updateBuyStatus(e,t){try{let n=await this.getBuyStatus(e,t);M.currentPayment&&(M.currentPayment.status=n.status,M.currentPayment.result=n.txHash),("SUCCESS"===n.status||"FAILED"===n.status)&&(M.isPaymentInProgress=!1)}catch(e){throw new A(f.UNABLE_TO_GET_BUY_STATUS)}},initiatePayment(){M.isPaymentInProgress=!0,M.paymentId=crypto.randomUUID()},initializeAnalytics(){M.analyticsSet||(M.analyticsSet=!0,this.subscribeKey("isPaymentInProgress",e=>{if(M.currentPayment?.status&&"UNKNOWN"!==M.currentPayment.status){let e={IN_PROGRESS:"PAY_INITIATED",SUCCESS:"PAY_SUCCESS",FAILED:"PAY_ERROR"}[M.currentPayment.status];w.X.sendEvent({type:"track",event:e,properties:{message:"FAILED"===M.currentPayment.status?c.j.parseError(M.error):void 0,source:"pay",paymentId:M.paymentId||L,configuration:{network:M.paymentAsset.network,asset:M.paymentAsset.asset,recipient:M.recipient,amount:M.amount},currentPayment:{type:M.currentPayment.type,exchangeId:M.currentPayment.exchangeId,sessionId:M.currentPayment.sessionId,result:M.currentPayment.result}}})}}))}};var G=(0,a.iv)` + wui-separator { + margin: var(--apkt-spacing-3) calc(var(--apkt-spacing-3) * -1) var(--apkt-spacing-2) + calc(var(--apkt-spacing-3) * -1); + width: calc(100% + var(--apkt-spacing-3) * 2); + } + + .token-display { + padding: var(--apkt-spacing-3) var(--apkt-spacing-3); + border-radius: var(--apkt-borderRadius-5); + background-color: var(--apkt-tokens-theme-backgroundPrimary); + margin-top: var(--apkt-spacing-3); + margin-bottom: var(--apkt-spacing-3); + } + + .token-display wui-text { + text-transform: none; + } + + wui-loading-spinner { + padding: var(--apkt-spacing-2); + } +`,Y=function(e,t,n,a){var r,i=arguments.length,s=i<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,n):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,a);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(s=(i<3?r(s):i>3?r(t,n,s):r(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s};let B=class extends a.oi{constructor(){super(),this.unsubscribe=[],this.amount="",this.tokenSymbol="",this.networkName="",this.exchanges=$.state.exchanges,this.isLoading=$.state.isLoading,this.loadingExchangeId=null,this.connectedWalletInfo=s.R.getAccountData()?.connectedWalletInfo,this.initializePaymentDetails(),this.unsubscribe.push($.subscribeKey("exchanges",e=>this.exchanges=e)),this.unsubscribe.push($.subscribeKey("isLoading",e=>this.isLoading=e)),this.unsubscribe.push(s.R.subscribeChainProp("accountState",e=>{this.connectedWalletInfo=e?.connectedWalletInfo})),$.fetchExchanges()}get isWalletConnected(){let e=s.R.getAccountData();return e?.status==="connected"}render(){return(0,a.dy)` + + + ${this.renderPaymentHeader()} + + + ${this.renderPayWithWallet()} ${this.renderExchangeOptions()} + + + + `}initializePaymentDetails(){let e=$.getPaymentAsset();this.networkName=e.network,this.tokenSymbol=e.metadata.symbol,this.amount=$.state.amount.toString()}renderPayWithWallet(){return!function(e){let{chainNamespace:t}=h.u.parseCaipNetworkId(e);return x.includes(t)}(this.networkName)?(0,a.dy)``:(0,a.dy)` + ${this.isWalletConnected?this.renderConnectedView():this.renderDisconnectedView()} + + `}renderPaymentHeader(){let e=this.networkName;if(this.networkName){let t=s.R.getAllRequestedCaipNetworks().find(e=>e.caipNetworkId===this.networkName);t&&(e=t.name)}return(0,a.dy)` + + + ${this.amount||"0.0000"} + + + ${this.tokenSymbol||"Unknown Asset"} + + ${e?(0,a.dy)` + + on ${e} + + `:""} + + + + `}renderConnectedView(){let e=this.connectedWalletInfo?.name||"connected wallet";return(0,a.dy)` + + Pay with ${e} + + + + Disconnect + + `}renderDisconnectedView(){return(0,a.dy)` + Pay from wallet + `}renderExchangeOptions(){return this.isLoading?(0,a.dy)` + + `:0===this.exchanges.length?(0,a.dy)` + No exchanges available + `:this.exchanges.map(e=>(0,a.dy)` + this.onExchangePayment(e.id)} + data-testid="exchange-option-${e.id}" + ?chevron=${!0} + ?disabled=${null!==this.loadingExchangeId} + ?loading=${this.loadingExchangeId===e.id} + imageSrc=${(0,i.o)(e.imageUrl)} + > + + Pay with ${e.name} + + + `)}onWalletPayment(){$.handlePayWithWallet()}async onExchangePayment(e){try{this.loadingExchangeId=e;let t=await $.handlePayWithExchange(e);t&&(await o.I.open({view:"PayLoading"}),c.j.openHref(t.url,t.openInNewTab?"_blank":"_self"))}catch(e){console.error("Failed to pay with exchange",e),u.SnackController.showError("Failed to pay with exchange")}finally{this.loadingExchangeId=null}}async onDisconnect(e){e.stopPropagation();try{await l.ConnectionController.disconnect()}catch{console.error("Failed to disconnect"),u.SnackController.showError("Failed to disconnect")}}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}};B.styles=G,Y([(0,r.SB)()],B.prototype,"amount",void 0),Y([(0,r.SB)()],B.prototype,"tokenSymbol",void 0),Y([(0,r.SB)()],B.prototype,"networkName",void 0),Y([(0,r.SB)()],B.prototype,"exchanges",void 0),Y([(0,r.SB)()],B.prototype,"isLoading",void 0),Y([(0,r.SB)()],B.prototype,"loadingExchangeId",void 0),Y([(0,r.SB)()],B.prototype,"connectedWalletInfo",void 0),B=Y([(0,d.Mo)("w3m-pay-view")],B);var V=n(52005),W=n(35652),F=n(63043);n(87302);var z=(0,a.iv)` + :host { + display: block; + height: 100%; + width: 100%; + } + + wui-flex:first-child:not(:only-child) { + position: relative; + } + + wui-loading-thumbnail { + position: absolute; + } +`,H=function(e,t,n,a){var r,i=arguments.length,s=i<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,n):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,a);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(s=(i<3?r(s):i>3?r(t,n,s):r(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s};let j=class extends a.oi{constructor(){super(),this.loadingMessage="",this.subMessage="",this.paymentState="in-progress",this.paymentState=$.state.isPaymentInProgress?"in-progress":"completed",this.updateMessages(),this.setupSubscription(),this.setupExchangeSubscription()}disconnectedCallback(){clearInterval(this.exchangeSubscription)}render(){return(0,a.dy)` + + ${this.getStateIcon()} + + + ${this.loadingMessage} + + + ${this.subMessage} + + + + `}updateMessages(){switch(this.paymentState){case"completed":this.loadingMessage="Payment completed",this.subMessage="Your transaction has been successfully processed";break;case"error":this.loadingMessage="Payment failed",this.subMessage="There was an error processing your transaction";break;default:$.state.currentPayment?.type==="exchange"?(this.loadingMessage="Payment initiated",this.subMessage="Please complete the payment on the exchange"):(this.loadingMessage="Awaiting payment confirmation",this.subMessage="Please confirm the payment transaction in your wallet")}}getStateIcon(){switch(this.paymentState){case"completed":return this.successTemplate();case"error":return this.errorTemplate();default:return this.loaderTemplate()}}setupExchangeSubscription(){$.state.currentPayment?.type==="exchange"&&(this.exchangeSubscription=setInterval(async()=>{let e=$.state.currentPayment?.exchangeId,t=$.state.currentPayment?.sessionId;e&&t&&(await $.updateBuyStatus(e,t),$.state.currentPayment?.status==="SUCCESS"&&clearInterval(this.exchangeSubscription))},4e3))}setupSubscription(){$.subscribeKey("isPaymentInProgress",e=>{e||"in-progress"!==this.paymentState||($.state.error||!$.state.currentPayment?.result?this.paymentState="error":this.paymentState="completed",this.updateMessages(),setTimeout(()=>{"disconnected"!==l.ConnectionController.state.status&&o.I.close()},3e3))}),$.subscribeKey("error",e=>{e&&"in-progress"===this.paymentState&&(this.paymentState="error",this.updateMessages())})}loaderTemplate(){let e=V.ThemeController.state.themeVariables["--w3m-border-radius-master"],t=e?parseInt(e.replace("px",""),10):4,n=this.getPaymentIcon();return(0,a.dy)` + + ${n?(0,a.dy)``:null} + + + `}getPaymentIcon(){let e=$.state.currentPayment;if(e){if("exchange"===e.type){let t=e.exchangeId;if(t){let e=$.getExchangeById(t);return e?.imageUrl}}if("wallet"===e.type){let e=s.R.getAccountData()?.connectedWalletInfo?.icon;if(e)return e;let t=s.R.state.activeChain;if(!t)return;let n=W.ConnectorController.getConnectorId(t);if(!n)return;let a=W.ConnectorController.getConnectorById(n);if(!a)return;return F.f.getConnectorImage(a)}}}successTemplate(){return(0,a.dy)``}errorTemplate(){return(0,a.dy)``}};async function K(e){return $.handleOpenPay(e)}async function q(e,t=3e5){if(t<=0)throw new A(f.INVALID_PAYMENT_CONFIG,"Timeout must be greater than 0");try{await K(e)}catch(e){if(e instanceof A)throw e;throw new A(f.UNABLE_TO_INITIATE_PAYMENT,e.message)}return new Promise((e,n)=>{var a;let r=!1,i=setTimeout(()=>{r||(r=!0,o(),n(new A(f.GENERIC_PAYMENT_ERROR,"Payment timeout")))},t);function s(){if(r)return;let t=$.state.currentPayment,n=$.state.error,a=$.state.isPaymentInProgress;if(t?.status==="SUCCESS"){r=!0,o(),clearTimeout(i),e({success:!0,result:t.result});return}if(t?.status==="FAILED"){r=!0,o(),clearTimeout(i),e({success:!1,error:n||"Payment failed"});return}!n||a||t||(r=!0,o(),clearTimeout(i),e({success:!1,error:n}))}let o=(a=[ee("currentPayment",s),ee("error",s),ee("isPaymentInProgress",s)],()=>{a.forEach(e=>{try{e()}catch{}})});s()})}function X(){return $.getExchanges()}function J(){return $.state.currentPayment?.result}function Z(){return $.state.error}function Q(){return $.state.isPaymentInProgress}function ee(e,t){return $.subscribeKey(e,t)}j.styles=z,H([(0,r.SB)()],j.prototype,"loadingMessage",void 0),H([(0,r.SB)()],j.prototype,"subMessage",void 0),H([(0,r.SB)()],j.prototype,"paymentState",void 0),j=H([(0,d.Mo)("w3m-pay-loading-view")],j);let et={network:"eip155:8453",asset:"native",metadata:{name:"Ethereum",symbol:"ETH",decimals:18}},en={network:"eip155:8453",asset:"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",metadata:{name:"USD Coin",symbol:"USDC",decimals:6}},ea={network:"eip155:84532",asset:"native",metadata:{name:"Ethereum",symbol:"ETH",decimals:18}},er={network:"eip155:1",asset:"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",metadata:{name:"USD Coin",symbol:"USDC",decimals:6}},ei={network:"eip155:10",asset:"0x0b2c639c533813f4aa9d7837caf62653d097ff85",metadata:{name:"USD Coin",symbol:"USDC",decimals:6}},es={network:"eip155:42161",asset:"0xaf88d065e77c8cC2239327C5EDb3A432268e5831",metadata:{name:"USD Coin",symbol:"USDC",decimals:6}},eo={network:"eip155:137",asset:"0x3c499c542cef5e3811e1192ce70d8cc03d5c3359",metadata:{name:"USD Coin",symbol:"USDC",decimals:6}},ec={network:"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",asset:"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",metadata:{name:"USD Coin",symbol:"USDC",decimals:6}},eu={network:"eip155:1",asset:"0xdAC17F958D2ee523a2206206994597C13D831ec7",metadata:{name:"Tether USD",symbol:"USDT",decimals:6}},el={network:"eip155:10",asset:"0x94b008aA00579c1307B0EF2c499aD98a8ce58e58",metadata:{name:"Tether USD",symbol:"USDT",decimals:6}},ed={network:"eip155:42161",asset:"0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9",metadata:{name:"Tether USD",symbol:"USDT",decimals:6}},ep={network:"eip155:137",asset:"0xc2132d05d31c914a87c6611c10748aeb04b58e8f",metadata:{name:"Tether USD",symbol:"USDT",decimals:6}},em={network:"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",asset:"Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB",metadata:{name:"Tether USD",symbol:"USDT",decimals:6}},ey={network:"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",asset:"native",metadata:{name:"Solana",symbol:"SOL",decimals:9}}},65451:function(e,t,n){var a=n(31133),r=n(84927),i=n(32801);n(74975);var s=n(84249),o=n(57116),c=n(11131),u=(0,c.iv)` + :host { + position: relative; + } + + button { + display: flex; + justify-content: center; + align-items: center; + background-color: transparent; + padding: ${({spacing:e})=>e[1]}; + } + + /* -- Colors --------------------------------------------------- */ + button[data-type='accent'] wui-icon { + color: ${({tokens:e})=>e.core.iconAccentPrimary}; + } + + button[data-type='neutral'][data-variant='primary'] wui-icon { + color: ${({tokens:e})=>e.theme.iconInverse}; + } + + button[data-type='neutral'][data-variant='secondary'] wui-icon { + color: ${({tokens:e})=>e.theme.iconDefault}; + } + + button[data-type='success'] wui-icon { + color: ${({tokens:e})=>e.core.iconSuccess}; + } + + button[data-type='error'] wui-icon { + color: ${({tokens:e})=>e.core.iconError}; + } + + /* -- Sizes --------------------------------------------------- */ + button[data-size='xs'] { + width: 16px; + height: 16px; + + border-radius: ${({borderRadius:e})=>e[1]}; + } + + button[data-size='sm'] { + width: 20px; + height: 20px; + border-radius: ${({borderRadius:e})=>e[1]}; + } + + button[data-size='md'] { + width: 24px; + height: 24px; + border-radius: ${({borderRadius:e})=>e[2]}; + } + + button[data-size='lg'] { + width: 28px; + height: 28px; + border-radius: ${({borderRadius:e})=>e[2]}; + } + + button[data-size='xs'] wui-icon { + width: 8px; + height: 8px; + } + + button[data-size='sm'] wui-icon { + width: 12px; + height: 12px; + } + + button[data-size='md'] wui-icon { + width: 16px; + height: 16px; + } + + button[data-size='lg'] wui-icon { + width: 20px; + height: 20px; + } + + /* -- Hover --------------------------------------------------- */ + @media (hover: hover) { + button[data-type='accent']:hover:enabled { + background-color: ${({tokens:e})=>e.core.foregroundAccent010}; + } + + button[data-variant='primary'][data-type='neutral']:hover:enabled { + background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; + } + + button[data-variant='secondary'][data-type='neutral']:hover:enabled { + background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; + } + + button[data-type='success']:hover:enabled { + background-color: ${({tokens:e})=>e.core.backgroundSuccess}; + } + + button[data-type='error']:hover:enabled { + background-color: ${({tokens:e})=>e.core.backgroundError}; + } + } + + /* -- Focus --------------------------------------------------- */ + button:focus-visible { + box-shadow: 0 0 0 4px ${({tokens:e})=>e.core.foregroundAccent020}; + } + + /* -- Properties --------------------------------------------------- */ + button[data-full-width='true'] { + width: 100%; + } + + :host([fullWidth]) { + width: 100%; + } + + button[disabled] { + opacity: 0.5; + cursor: not-allowed; + } +`,l=function(e,t,n,a){var r,i=arguments.length,s=i<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,n):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,a);else for(var o=e.length-1;o>=0;o--)(r=e[o])&&(s=(i<3?r(s):i>3?r(t,n,s):r(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s};let d=class extends a.oi{constructor(){super(...arguments),this.icon="card",this.variant="primary",this.type="accent",this.size="md",this.iconSize=void 0,this.fullWidth=!1,this.disabled=!1}render(){return(0,a.dy)``}};d.styles=[s.ET,s.ZM,u],l([(0,r.Cb)()],d.prototype,"icon",void 0),l([(0,r.Cb)()],d.prototype,"variant",void 0),l([(0,r.Cb)()],d.prototype,"type",void 0),l([(0,r.Cb)()],d.prototype,"size",void 0),l([(0,r.Cb)()],d.prototype,"iconSize",void 0),l([(0,r.Cb)({type:Boolean})],d.prototype,"fullWidth",void 0),l([(0,r.Cb)({type:Boolean})],d.prototype,"disabled",void 0),l([(0,o.M)("wui-icon-button")],d)},1799:function(e,t,n){n(23805)}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/7076.4908ec83929a649c.js b/frontend/.next/static/chunks/7076.4908ec83929a649c.js new file mode 100644 index 0000000..575fa8d --- /dev/null +++ b/frontend/.next/static/chunks/7076.4908ec83929a649c.js @@ -0,0 +1,14 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7076],{17076:function(h,a,t){t.r(a),t.d(a,{PhCurrencyDollar:function(){return V}}),t(31498);var e=t(38157),r=t(48567),o=t(54910),i=t(69709),s=t(78313),l=Object.defineProperty,p=Object.getOwnPropertyDescriptor,n=(h,a,t,e)=>{for(var r,o=e>1?void 0:e?p(a,t):a,i=h.length-1;i>=0;i--)(r=h[i])&&(o=(e?r(a,t,o):r(o))||o);return e&&o&&l(a,t,o),o};let V=class extends r.oi{constructor(){super(...arguments),this.size="1em",this.weight="regular",this.color="currentColor",this.mirrored=!1}render(){var h;return(0,e.dy)` + ${V.weightsMap.get(null!=(h=this.weight)?h:"regular")} + `}};V.weightsMap=new Map([["thin",(0,e.YP)``],["light",(0,e.YP)``],["regular",(0,e.YP)``],["bold",(0,e.YP)``],["fill",(0,e.YP)``],["duotone",(0,e.YP)``]]),V.styles=(0,s.iv)` + :host { + display: contents; + } + `,n([(0,i.C)({type:String,reflect:!0})],V.prototype,"size",2),n([(0,i.C)({type:String,reflect:!0})],V.prototype,"weight",2),n([(0,i.C)({type:String,reflect:!0})],V.prototype,"color",2),n([(0,i.C)({type:Boolean,reflect:!0})],V.prototype,"mirrored",2),V=n([(0,o.M)("ph-currency-dollar")],V)}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/7077-dc792828aefd3801.js b/frontend/.next/static/chunks/7077-dc792828aefd3801.js new file mode 100644 index 0000000..66cd7e8 --- /dev/null +++ b/frontend/.next/static/chunks/7077-dc792828aefd3801.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7077],{13716:function(t,e,n){n.d(e,{W:function(){return a}});var r=n(46908);async function a(t){let e=(0,r.g)(t,{method:"eth_newPendingTransactionFilter"}),n=await t.request({method:"eth_newPendingTransactionFilter"});return{id:n,request:e(n),type:"transaction"}}},32807:function(t,e,n){n.d(e,{s:function(){return a}});var r=n(59455);async function a(t,{address:e,blockNumber:n,blockTag:a=t.experimental_blockTag??"latest"}){let i="bigint"==typeof n?(0,r.eC)(n):void 0;return BigInt(await t.request({method:"eth_getBalance",params:[e,i||a]}))}},18789:function(t,e,n){n.d(e,{K:function(){return i}});var r=n(42133),a=n(55668);async function i(t,{filter:e}){let n="strict"in e&&e.strict,i=await e.request({method:"eth_getFilterChanges",params:[e.id]});if("string"==typeof i[0])return i;let s=i.map(t=>(0,a.U)(t));return"abi"in e&&e.abi?(0,r.h)({abi:e.abi,logs:s,strict:n}):s}},97638:function(t,e,n){n.d(e,{W:function(){return r}});async function r(t,{filter:e}){return e.request({method:"eth_uninstallFilter",params:[e.id]})}},1337:function(t,e,n){n.d(e,{O:function(){return l}});var r=n(82645),a=n(36478),i=n(41495),s=n(31853),o=n(13716),u=n(18789),c=n(97638);function l(t,{batch:e=!0,onError:n,onTransactions:l,poll:f,pollingInterval:d=t.pollingInterval}){let y,p;return(void 0!==f?f:"webSocket"!==t.transport.type&&"ipc"!==t.transport.type)?(()=>{let f=(0,s.P)(["watchPendingTransactions",t.uid,e,d]);return(0,a.N7)(f,{onTransactions:l,onError:n},n=>{let a;let s=(0,i.$)(async()=>{try{if(!a)try{a=await (0,r.s)(t,o.W,"createPendingTransactionFilter")({});return}catch(t){throw s(),t}let i=await (0,r.s)(t,u.K,"getFilterChanges")({filter:a});if(0===i.length)return;if(e)n.onTransactions(i);else for(let t of i)n.onTransactions([t])}catch(t){n.onError?.(t)}},{emitOnBegin:!0,interval:d});return async()=>{a&&await (0,r.s)(t,c.W,"uninstallFilter")({filter:a}),s()}})})():(y=!0,p=()=>y=!1,(async()=>{try{let{unsubscribe:e}=await t.transport.subscribe({params:["newPendingTransactions"],onData(t){if(!y)return;let e=t.result;l([e])},onError(t){n?.(t)}});p=e,y||p()}catch(t){n?.(t)}})(),()=>p())}},70550:function(t,e,n){n.d(e,{l:function(){return s}});var r=n(19775),a=n(65704),i=n(59455);async function s(t,{account:e=t.account,message:n}){if(!e)throw new a.o({docsPath:"/docs/actions/wallet/signMessage"});let s=(0,r.T)(e);if(s.signMessage)return s.signMessage({message:n});let o="string"==typeof n?(0,i.$G)(n):n.raw instanceof Uint8Array?(0,i.NC)(n.raw):n.raw;return t.request({method:"personal_sign",params:[o,s.address]},{retryCount:0})}},27964:function(t,e,n){n.d(e,{F:function(){return l}});var r=n(65531),a=n(33630),i=n(20556),s=n(45392),o=n(2742),u=n(7275);let c="/docs/contract/decodeEventLog";function l(t){let{abi:e,data:n,strict:l,topics:f}=t,d=l??!0,[y,...p]=f;if(!y)throw new r.FM({docsPath:c});let h=e.find(t=>"event"===t.type&&y===(0,s.n)((0,u.t)(t)));if(!(h&&"name"in h)||"event"!==h.type)throw new r.lC(y,{docsPath:c});let{name:g,inputs:m}=h,w=m?.some(t=>!("name"in t&&t.name)),v=w?[]:{},b=m.map((t,e)=>[t,e]).filter(([t])=>"indexed"in t&&t.indexed);for(let t=0;t!("indexed"in t&&t.indexed));if(A.length>0){if(n&&"0x"!==n)try{let t=(0,o.r)(A,n);if(t){if(w)for(let e=0;e0?v:void 0}}},42133:function(t,e,n){n.d(e,{h:function(){return u}});var r=n(93637),a=n(44659),i=n(13169),s=n(45392),o=n(27964);function u(t){let{abi:e,args:n,logs:u,strict:c=!0}=t,l=(()=>{if(t.eventName)return Array.isArray(t.eventName)?t.eventName:[t.eventName]})();return u.map(t=>{let u,f;let d=e.filter(e=>"event"===e.type&&t.topics[0]===(0,s.n)(e));if(0===d.length)return null;for(let e of d)try{u=(0,o.F)({...t,abi:[e],strict:!0}),f=e;break}catch{}if(!u&&!c){f=d[0];try{u=(0,o.F)({...t,abi:[f],strict:!1})}catch{let e=f.inputs?.some(t=>!("name"in t&&t.name));return{...t,args:e?[]:{},eventName:f.name}}}return u&&f&&(!l||l.includes(u.eventName))&&function(t){let{args:e,inputs:n,matchArgs:s}=t;if(!s)return!0;if(!e)return!1;function o(t,e,n){try{if("address"===t.type)return(0,r.E)(e,n);if("string"===t.type||"bytes"===t.type)return(0,i.w)((0,a.O0)(e))===n;return e===n}catch{return!1}}return Array.isArray(e)&&Array.isArray(s)?s.every((t,r)=>{if(null==t)return!0;let a=n[r];return!!a&&(Array.isArray(t)?t:[t]).some(t=>o(a,t,e[r]))}):!("object"!=typeof e||Array.isArray(e)||"object"!=typeof s||Array.isArray(s))&&Object.entries(s).every(([t,r])=>{if(null==r)return!0;let a=n.find(e=>e.name===t);return!!a&&(Array.isArray(r)?r:[r]).some(n=>o(a,n,e[t]))})}({args:u.args,inputs:f.inputs,matchArgs:n})?{...u,...t}:null}).filter(Boolean)}},93637:function(t,e,n){n.d(e,{E:function(){return i}});var r=n(10052),a=n(4012);function i(t,e){if(!(0,a.U)(t,{strict:!1}))throw new r.b({address:t});if(!(0,a.U)(e,{strict:!1}))throw new r.b({address:e});return t.toLowerCase()===e.toLowerCase()}},46908:function(t,e,n){n.d(e,{g:function(){return r}});function r(t,{method:e}){let n={};return"fallback"===t.transport.type&&t.transport.onResponse?.(({method:t,response:r,status:a,transport:i})=>{"success"===a&&e===t&&(n[r]=i.request)}),e=>n[e]||t.request}}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/7107.e6fa05964563ed52.js b/frontend/.next/static/chunks/7107.e6fa05964563ed52.js new file mode 100644 index 0000000..be608cd --- /dev/null +++ b/frontend/.next/static/chunks/7107.e6fa05964563ed52.js @@ -0,0 +1,14 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7107],{67107:function(t,e,r){r.r(e),r.d(e,{PhClock:function(){return c}}),r(31498);var a=r(38157),o=r(48567),i=r(54910),h=r(69709),s=r(78313),l=Object.defineProperty,p=Object.getOwnPropertyDescriptor,n=(t,e,r,a)=>{for(var o,i=a>1?void 0:a?p(e,r):e,h=t.length-1;h>=0;h--)(o=t[h])&&(i=(a?o(e,r,i):o(i))||i);return a&&i&&l(e,r,i),i};let c=class extends o.oi{constructor(){super(...arguments),this.size="1em",this.weight="regular",this.color="currentColor",this.mirrored=!1}render(){var t;return(0,a.dy)` + ${c.weightsMap.get(null!=(t=this.weight)?t:"regular")} + `}};c.weightsMap=new Map([["thin",(0,a.YP)``],["light",(0,a.YP)``],["regular",(0,a.YP)``],["bold",(0,a.YP)``],["fill",(0,a.YP)``],["duotone",(0,a.YP)``]]),c.styles=(0,s.iv)` + :host { + display: contents; + } + `,n([(0,h.C)({type:String,reflect:!0})],c.prototype,"size",2),n([(0,h.C)({type:String,reflect:!0})],c.prototype,"weight",2),n([(0,h.C)({type:String,reflect:!0})],c.prototype,"color",2),n([(0,h.C)({type:Boolean,reflect:!0})],c.prototype,"mirrored",2),c=n([(0,i.M)("ph-clock")],c)}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/7353.04a39413462e94b8.js b/frontend/.next/static/chunks/7353.04a39413462e94b8.js new file mode 100644 index 0000000..ac52fdd --- /dev/null +++ b/frontend/.next/static/chunks/7353.04a39413462e94b8.js @@ -0,0 +1,31 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7353],{97353:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.SafeAppProvider=void 0;var n=r(76708);Object.defineProperty(t,"SafeAppProvider",{enumerable:!0,get:function(){return n.SafeAppProvider}})},76708:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.SafeAppProvider=void 0;let n=r(22441),o=r(55445),i=r(49187);class a extends o.EventEmitter{constructor(e,t){super(),this.submittedTxs=new Map,this.safe=e,this.sdk=t}async connect(){this.emit("connect",{chainId:this.chainId})}async disconnect(){}get chainId(){return this.safe.chainId}async request(e){let{method:t,params:r=[]}=e;switch(t){case"eth_accounts":return[this.safe.safeAddress];case"net_version":case"eth_chainId":return(0,i.numberToHex)(this.chainId);case"personal_sign":{let[e,t]=r;if(this.safe.safeAddress.toLowerCase()!==t.toLowerCase())throw Error("The address or message hash is invalid");let n=await this.sdk.txs.signMessage(e);return("signature"in n?n.signature:void 0)||"0x"}case"eth_sign":{let[e,t]=r;if(this.safe.safeAddress.toLowerCase()!==e.toLowerCase()||!t.startsWith("0x"))throw Error("The address or message hash is invalid");let n=await this.sdk.txs.signMessage(t);return("signature"in n?n.signature:void 0)||"0x"}case"eth_signTypedData":case"eth_signTypedData_v4":{let[e,t]=r,n="string"==typeof t?JSON.parse(t):t;if(this.safe.safeAddress.toLowerCase()!==e.toLowerCase())throw Error("The address is invalid");let o=await this.sdk.txs.signTypedMessage(n);return("signature"in o?o.signature:void 0)||"0x"}case"eth_sendTransaction":let o={...r[0],value:r[0].value||"0",data:r[0].data||"0x"};"string"==typeof o.gas&&o.gas.startsWith("0x")&&(o.gas=parseInt(o.gas,16));let a=await this.sdk.txs.send({txs:[o],params:{safeTxGas:o.gas}});return this.submittedTxs.set(a.safeTxHash,{from:this.safe.safeAddress,hash:a.safeTxHash,gas:0,gasPrice:"0x00",nonce:0,input:o.data,value:o.value,to:o.to,blockHash:null,blockNumber:null,transactionIndex:null}),a.safeTxHash;case"eth_blockNumber":return(await this.sdk.eth.getBlockByNumber(["latest"])).number;case"eth_getBalance":return this.sdk.eth.getBalance([(0,i.getLowerCase)(r[0]),r[1]]);case"eth_getCode":return this.sdk.eth.getCode([(0,i.getLowerCase)(r[0]),r[1]]);case"eth_getTransactionCount":return this.sdk.eth.getTransactionCount([(0,i.getLowerCase)(r[0]),r[1]]);case"eth_getStorageAt":return this.sdk.eth.getStorageAt([(0,i.getLowerCase)(r[0]),r[1],r[2]]);case"eth_getBlockByNumber":return this.sdk.eth.getBlockByNumber([r[0],r[1]]);case"eth_getBlockByHash":return this.sdk.eth.getBlockByHash([r[0],r[1]]);case"eth_getTransactionByHash":let s=r[0];try{s=(await this.sdk.txs.getBySafeTxHash(s)).txHash||s}catch(e){}if(this.submittedTxs.has(s))return this.submittedTxs.get(s);return this.sdk.eth.getTransactionByHash([s]).then(e=>(e&&(e.hash=r[0]),e));case"eth_getTransactionReceipt":{let e=r[0];try{e=(await this.sdk.txs.getBySafeTxHash(e)).txHash||e}catch(e){}return this.sdk.eth.getTransactionReceipt([e]).then(e=>(e&&(e.transactionHash=r[0]),e))}case"eth_estimateGas":return this.sdk.eth.getEstimateGas(r[0]);case"eth_call":return this.sdk.eth.call([r[0],r[1]]);case"eth_getLogs":return this.sdk.eth.getPastLogs([r[0]]);case"eth_gasPrice":return this.sdk.eth.getGasPrice();case"wallet_getPermissions":return this.sdk.wallet.getPermissions();case"wallet_requestPermissions":return this.sdk.wallet.requestPermissions(r[0]);case"safe_setSettings":return this.sdk.eth.setSafeSettings([r[0]]);case"wallet_sendCalls":{let{from:e,calls:t,chainId:n}=r[0];if(n!==(0,i.numberToHex)(this.chainId))throw Error(`Safe is not on chain ${n}`);if(e!==this.safe.safeAddress)throw Error("Invalid from address");let o=t.map((e,t)=>{if(!e.to)throw Error(`Invalid call #${t}: missing "to" field`);return{to:e.to,data:e.data??"0x",value:e.value??(0,i.numberToHex)(0)}}),{safeTxHash:a}=await this.sdk.txs.send({txs:o});return{id:a}}case"wallet_getCallsStatus":{let e=r[0],t={[n.TransactionStatus.AWAITING_CONFIRMATIONS]:100,[n.TransactionStatus.AWAITING_EXECUTION]:100,[n.TransactionStatus.SUCCESS]:200,[n.TransactionStatus.CANCELLED]:400,[n.TransactionStatus.FAILED]:500},o=await this.sdk.txs.getBySafeTxHash(e),a={version:"1.0",id:e,chainId:(0,i.numberToHex)(this.chainId),status:t[o.txStatus]};if(!o.txHash)return a;let s=await this.sdk.eth.getTransactionReceipt([o.txHash]);if(!s)return a;let u=o.txData?.dataDecoded?.method!=="multiSend"?1:o.txData.dataDecoded.parameters?.[0].valueDecoded?.length??1,c=Number(s.blockNumber),l=Number(s.gasUsed);return a.receipts=Array(u).fill({logs:s.logs,status:(0,i.numberToHex)(o.txStatus===n.TransactionStatus.SUCCESS?1:0),blockHash:s.blockHash,blockNumber:(0,i.numberToHex)(c),gasUsed:(0,i.numberToHex)(l),transactionHash:o.txHash}),a}case"wallet_showCallsStatus":throw Error(`"${e.method}" not supported`);case"wallet_getCapabilities":return{[(0,i.numberToHex)(this.chainId)]:{atomicBatch:{supported:!0}}};default:throw Error(`"${e.method}" not implemented`)}}send(e,t){e||t("Undefined request"),this.request(e).then(r=>t(null,{jsonrpc:"2.0",id:e.id,result:r})).catch(e=>t(e,null))}}t.SafeAppProvider=a},49187:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.numberToHex=t.getLowerCase=void 0,t.getLowerCase=function(e){return e?e.toLowerCase():e},t.numberToHex=function(e){return`0x${e.toString(16)}`}},990:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getHash=a,t.createCurve=function(e,t){let r=t=>(0,i.weierstrass)({...e,...a(t)});return{...r(t),create:r}};let n=r(17758),o=r(80819),i=r(58665);function a(e){return{hash:e,hmac:(t,...r)=>(0,n.hmac)(e,t,(0,o.concatBytes)(...r)),randomBytes:o.randomBytes}}},13414:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.wNAF=function(e,t){return{constTimeNegate:s,hasPrecomputes:e=>1!==m(e),unsafeLadder(t,r,n=e.ZERO){let o=t;for(;r>i;)r&a&&(n=n.add(o)),o=o.double(),r>>=a;return n},precomputeWindow(e,r){let{windows:n,windowSize:o}=c(r,t),i=[],a=e,s=a;for(let e=0;e12?c=u-3:u>4?c=u-2:u>0&&(c=2);let l=(0,o.bitMask)(c),p=Array(Number(l)+1).fill(s),b=Math.floor((t.BITS-1)/c)*c,m=s;for(let e=b;e>=0;e-=c){p.fill(s);for(let t=0;t>BigInt(e)&l);p[o]=p[o].add(r[t])}let t=s;for(let e=p.length-1,r=s;e>0;e--)r=r.add(p[e]),t=t.add(r);if(m=m.add(t),0!==e)for(let e=0;e{let t=[];for(let r=0,n=e;r{if(f(e,t),e.length>r.length)throw Error("array of scalars must be smaller than array of points");let o=i;for(let t=0;t>r&c);n&&(o=o.add(l[t][n-1]))}}return o}},t.validateBasic=function(e){return(0,n.validateField)(e.Fp),(0,o.validateObject)(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...(0,n.nLength)(e.n,e.nBitLength),...e,p:e.Fp.ORDER})};let n=r(13244),o=r(21626),i=BigInt(0),a=BigInt(1);function s(e,t){let r=t.negate();return e?r:t}function u(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw Error("invalid window size, expected [1.."+t+"], got W="+e)}function c(e,t){u(e,t);let r=Math.ceil(t/e)+1,n=2**(e-1),i=2**e;return{windows:r,windowSize:n,mask:(0,o.bitMask)(e),maxNumber:i,shiftBy:BigInt(e)}}function l(e,t,r){let{windowSize:n,mask:o,maxNumber:i,shiftBy:s}=r,u=Number(e&o),c=e>>s;u>n&&(u-=i,c+=a);let l=t*n,d=l+Math.abs(u)-1;return{nextN:c,offset:d,isZero:0===u,isNeg:u<0,isNegF:t%2!=0,offsetF:l}}function d(e,t){if(!Array.isArray(e))throw Error("array expected");e.forEach((e,r)=>{if(!(e instanceof t))throw Error("invalid point at index "+r)})}function f(e,t){if(!Array.isArray(e))throw Error("array of scalars expected");e.forEach((e,r)=>{if(!t.isValid(e))throw Error("invalid scalar at index "+r)})}let p=new WeakMap,b=new WeakMap;function m(e){return b.get(e)||1}},30358:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.expand_message_xmd=u,t.expand_message_xof=c,t.hash_to_field=l,t.isogenyMap=function(e,t){let r=t.map(e=>Array.from(e).reverse());return(t,o)=>{let[i,a,s,u]=r.map(r=>r.reduce((r,n)=>e.add(e.mul(r,t),n))),[c,l]=(0,n.FpInvertBatch)(e,[a,u],!0);return t=e.mul(i,c),o=e.mul(o,e.mul(s,l)),{x:t,y:o}}},t.createHasher=function(e,t,r){if("function"!=typeof t)throw Error("mapToCurve() must be defined");function n(r){return e.fromAffine(t(r))}function o(t){let r=t.clearCofactor();return r.equals(e.ZERO)?e.ZERO:(r.assertValidity(),r)}return{defaults:r,hashToCurve(e,t){let i=l(e,2,{...r,DST:r.DST,...t}),a=n(i[0]),s=n(i[1]);return o(a.add(s))},encodeToCurve:(e,t)=>o(n(l(e,1,{...r,DST:r.encodeDST,...t})[0])),mapToCurve(e){if(!Array.isArray(e))throw Error("expected array of bigints");for(let t of e)if("bigint"!=typeof t)throw Error("expected array of bigints");return o(n(e))}}};let n=r(13244),o=r(21626),i=o.bytesToNumberBE;function a(e,t){if(s(e),s(t),e<0||e>=1<<8*t)throw Error("invalid I2OSP input: "+e);let r=Array.from({length:t}).fill(0);for(let n=t-1;n>=0;n--)r[n]=255&e,e>>>=8;return new Uint8Array(r)}function s(e){if(!Number.isSafeInteger(e))throw Error("number expected")}function u(e,t,r,n){(0,o.abytes)(e),(0,o.abytes)(t),s(r),t.length>255&&(t=n((0,o.concatBytes)((0,o.utf8ToBytes)("H2C-OVERSIZE-DST-"),t)));let{outputLen:i,blockLen:u}=n,c=Math.ceil(r/i);if(r>65535||c>255)throw Error("expand_message_xmd: invalid lenInBytes");let l=(0,o.concatBytes)(t,a(t.length,1)),d=a(0,u),f=a(r,2),p=Array(c),b=n((0,o.concatBytes)(d,e,f,a(0,1),l));p[0]=n((0,o.concatBytes)(b,a(1,1),l));for(let e=1;e<=c;e++){let t=[function(e,t){let r=new Uint8Array(e.length);for(let n=0;n255&&(t=i.create({dkLen:Math.ceil(2*n/8)}).update((0,o.utf8ToBytes)("H2C-OVERSIZE-DST-")).update(t).digest()),r>65535||t.length>255)throw Error("expand_message_xof: invalid lenInBytes");return i.create({dkLen:r}).update(e).update(a(r,2)).update(t).update(a(t.length,1)).digest()}function l(e,t,r){let a;(0,o.validateObject)(r,{DST:"stringOrUint8Array",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});let{p:l,k:d,m:f,hash:p,expand:b,DST:m}=r;(0,o.abytes)(e),s(t);let y="string"==typeof m?(0,o.utf8ToBytes)(m):m,h=Math.ceil((l.toString(2).length+d)/8),g=t*f*h;if("xmd"===b)a=u(e,y,g,p);else if("xof"===b)a=c(e,y,g,d,p);else if("_internal_pass"===b)a=e;else throw Error('expand must be "xmd" or "xof"');let v=Array(t);for(let e=0;ei;)n*=n,n%=r;return n},t.invert=p,t.tonelliShanks=y,t.FpSqrt=h,t.validateField=function(e){let t=g.reduce((e,t)=>(e[t]="function",e),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"});return(0,o.validateObject)(e,t)},t.FpPow=v,t.FpInvertBatch=E,t.FpDiv=function(e,t,r){return e.mul(t,"bigint"==typeof r?p(r,e.ORDER):e.inv(r))},t.FpLegendre=x,t.FpIsSquare=function(e,t){return 1===x(e,t)},t.nLength=w,t.Field=P,t.FpSqrtOdd=function(e,t){if(!e.isOdd)throw Error("Field doesn't have isOdd");let r=e.sqrt(t);return e.isOdd(r)?r:e.neg(r)},t.FpSqrtEven=function(e,t){if(!e.isOdd)throw Error("Field doesn't have isOdd");let r=e.sqrt(t);return e.isOdd(r)?e.neg(r):r},t.hashToPrivateScalar=function(e,t,r=!1){let n=(e=(0,o.ensureBytes)("privateHash",e)).length,i=w(t).nByteLength+8;if(i<24||n1024)throw Error("hashToPrivateScalar: expected "+i+"-1024 bytes of input, got "+n);return f(r?(0,o.bytesToNumberLE)(e):(0,o.bytesToNumberBE)(e),t-a)+a},t.getFieldBytesLength=I,t.getMinHashLength=T,t.mapHashToField=function(e,t,r=!1){let n=e.length,i=I(t),s=T(t);if(n<16||n1024)throw Error("expected "+s+"-1024 bytes of input, got "+n);let u=f(r?(0,o.bytesToNumberLE)(e):(0,o.bytesToNumberBE)(e),t-a)+a;return r?(0,o.numberToBytesLE)(u,i):(0,o.numberToBytesBE)(u,i)};let n=r(80819),o=r(21626),i=BigInt(0),a=BigInt(1),s=BigInt(2),u=BigInt(3),c=BigInt(4),l=BigInt(5),d=BigInt(8);function f(e,t){let r=e%t;return r>=i?r:t+r}function p(e,t){if(e===i)throw Error("invert: expected non-zero number");if(t<=i)throw Error("invert: expected positive modulus, got "+t);let r=f(e,t),n=t,o=i,s=a,u=a,c=i;for(;r!==i;){let e=n/r,t=n%r,i=o-u*e,a=s-c*e;n=r,r=t,o=u,s=c,u=i,c=a}if(n!==a)throw Error("invert: does not exist");return f(o,t)}function b(e,t){let r=(e.ORDER+a)/c,n=e.pow(t,r);if(!e.eql(e.sqr(n),t))throw Error("Cannot find square root");return n}function m(e,t){let r=(e.ORDER-l)/d,n=e.mul(t,s),o=e.pow(n,r),i=e.mul(t,o),a=e.mul(e.mul(i,s),o),u=e.mul(i,e.sub(a,e.ONE));if(!e.eql(e.sqr(u),t))throw Error("Cannot find square root");return u}function y(e){if(e1e3)throw Error("Cannot find square root: probably non-prime P");if(1===r)return b;let u=o.pow(n,t),c=(t+a)/s;return function(e,n){if(e.is0(n))return n;if(1!==x(e,n))throw Error("Cannot find square root");let o=r,i=e.mul(e.ONE,u),s=e.pow(n,t),l=e.pow(n,c);for(;!e.eql(s,e.ONE);){if(e.is0(s))return e.ZERO;let t=1,r=e.sqr(s);for(;!e.eql(r,e.ONE);)if(t++,r=e.sqr(r),t===o)throw Error("Cannot find square root");let n=a<(f(e,t)&a)===a;let g=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function v(e,t,r){if(ri;)r&a&&(n=e.mul(n,o)),o=e.sqr(o),r>>=a;return n}function E(e,t,r=!1){let n=Array(t.length).fill(r?e.ZERO:void 0),o=t.reduce((t,r,o)=>e.is0(r)?t:(n[o]=t,e.mul(t,r)),e.ONE),i=e.inv(o);return t.reduceRight((t,r,o)=>e.is0(r)?t:(n[o]=e.mul(t,n[o]),e.mul(t,r)),i),n}function x(e,t){let r=(e.ORDER-a)/s,n=e.pow(t,r),o=e.eql(n,e.ONE),i=e.eql(n,e.ZERO),u=e.eql(n,e.neg(e.ONE));if(!o&&!i&&!u)throw Error("invalid Legendre symbol result");return o?1:i?0:-1}function w(e,t){void 0!==t&&(0,n.anumber)(t);let r=void 0!==t?t:e.toString(2).length;return{nBitLength:r,nByteLength:Math.ceil(r/8)}}function P(e,t,r=!1,n={}){let s;if(e<=i)throw Error("invalid field: expected ORDER > 0, got "+e);let{nBitLength:u,nByteLength:c}=w(e,t);if(c>2048)throw Error("invalid field: expected ORDER of <= 2048 bytes");let l=Object.freeze({ORDER:e,isLE:r,BITS:u,BYTES:c,MASK:(0,o.bitMask)(u),ZERO:i,ONE:a,create:t=>f(t,e),isValid:t=>{if("bigint"!=typeof t)throw Error("invalid field element: expected bigint, got "+typeof t);return i<=t&&te===i,isOdd:e=>(e&a)===a,neg:t=>f(-t,e),eql:(e,t)=>e===t,sqr:t=>f(t*t,e),add:(t,r)=>f(t+r,e),sub:(t,r)=>f(t-r,e),mul:(t,r)=>f(t*r,e),pow:(e,t)=>v(l,e,t),div:(t,r)=>f(t*p(r,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>p(t,e),sqrt:n.sqrt||(t=>(s||(s=h(e)),s(l,t))),toBytes:e=>r?(0,o.numberToBytesLE)(e,c):(0,o.numberToBytesBE)(e,c),fromBytes:e=>{if(e.length!==c)throw Error("Field.fromBytes: expected "+c+" bytes, got "+e.length);return r?(0,o.bytesToNumberLE)(e):(0,o.bytesToNumberBE)(e)},invertBatch:e=>E(l,e),cmov:(e,t,r)=>r?t:e});return Object.freeze(l)}function I(e){if("bigint"!=typeof e)throw Error("field order must be bigint");return Math.ceil(e.toString(2).length/8)}function T(e){let t=I(e);return t+Math.ceil(t/2)}},21626:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.notImplemented=t.bitMask=void 0,t.isBytes=o,t.abytes=i,t.abool=function(e,t){if("boolean"!=typeof t)throw Error(e+" boolean expected, got "+t)},t.numberToHexUnpadded=a,t.hexToNumber=s,t.bytesToHex=l,t.hexToBytes=p,t.bytesToNumberBE=function(e){return s(l(e))},t.bytesToNumberLE=function(e){return i(e),s(l(Uint8Array.from(e).reverse()))},t.numberToBytesBE=b,t.numberToBytesLE=function(e,t){return b(e,t).reverse()},t.numberToVarBytesBE=function(e){return p(a(e))},t.ensureBytes=function(e,t,r){let n;if("string"==typeof t)try{n=p(t)}catch(t){throw Error(e+" must be hex string or Uint8Array, cause: "+t)}else if(o(t))n=Uint8Array.from(t);else throw Error(e+" must be hex string or Uint8Array");let i=n.length;if("number"==typeof r&&i!==r)throw Error(e+" of length "+r+" expected, got "+i);return n},t.concatBytes=m,t.equalBytes=function(e,t){if(e.length!==t.length)return!1;let r=0;for(let n=0;nr;e>>=n,t+=1);return t},t.bitGet=function(e,t){return e>>BigInt(t)&n},t.bitSet=function(e,t,o){return e|(o?n:r)<{n.fill(1),o.fill(0),i=0},s=(...e)=>r(o,n,...e),u=(e=g(0))=>{o=s(v([0]),e),n=s(),0!==e.length&&(o=s(v([1]),e),n=s())},c=()=>{if(i++>=1e3)throw Error("drbg: tried 1000 values");let e=0,r=[];for(;e{let r;for(a(),u(e);!(r=t(c()));)u();return a(),r}},t.validateObject=function(e,t,r={}){let n=(t,r,n)=>{let o=E[r];if("function"!=typeof o)throw Error("invalid validator function");let i=e[t];if((!n||void 0!==i)&&!o(i,e))throw Error("param "+String(t)+" is invalid. Expected "+r+", got "+i)};for(let[e,r]of Object.entries(t))n(e,r,!1);for(let[e,t]of Object.entries(r))n(e,t,!0);return e},t.memoized=function(e){let t=new WeakMap;return(r,...n)=>{let o=t.get(r);if(void 0!==o)return o;let i=e(r,...n);return t.set(r,i),i}};let r=BigInt(0),n=BigInt(1);function o(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name}function i(e){if(!o(e))throw Error("Uint8Array expected")}function a(e){let t=e.toString(16);return 1&t.length?"0"+t:t}function s(e){if("string"!=typeof e)throw Error("hex string expected, got "+typeof e);return""===e?r:BigInt("0x"+e)}let u="function"==typeof Uint8Array.from([]).toHex&&"function"==typeof Uint8Array.fromHex,c=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function l(e){if(i(e),u)return e.toHex();let t="";for(let r=0;r=d._0&&e<=d._9?e-d._0:e>=d.A&&e<=d.F?e-(d.A-10):e>=d.a&&e<=d.f?e-(d.a-10):void 0}function p(e){if("string"!=typeof e)throw Error("hex string expected, got "+typeof e);if(u)return Uint8Array.fromHex(e);let t=e.length,r=t/2;if(t%2)throw Error("hex string expected, got unpadded hex of length "+t);let n=new Uint8Array(r);for(let t=0,o=0;t"bigint"==typeof e&&r<=e;function h(e,t,r){return y(e)&&y(t)&&y(r)&&t<=e&&e(n<new Uint8Array(e),v=e=>Uint8Array.from(e),E={bigint:e=>"bigint"==typeof e,function:e=>"function"==typeof e,boolean:e=>"boolean"==typeof e,string:e=>"string"==typeof e,stringOrUint8Array:e=>"string"==typeof e||o(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>"function"==typeof e&&Number.isSafeInteger(e.outputLen)};t.notImplemented=()=>{throw Error("not implemented")}},58665:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.DER=t.DERErr=void 0,t.weierstrassPoints=b,t.weierstrass=function(e){let r=function(e){let t=(0,n.validateBasic)(e);return(0,i.validateObject)(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}(e),{Fp:s,n:d,nByteLength:f,nBitLength:p}=r,m=s.BYTES+1,y=2*s.BYTES+1;function h(e){return(0,o.mod)(e,d)}function g(e){return(0,o.invert)(e,d)}let{ProjectivePoint:v,normPrivateKeyToScalar:E,weierstrassEquation:x,isWithinCurveOrder:w}=b({...r,toBytes(e,t,r){let n=t.toAffine(),o=s.toBytes(n.x),a=i.concatBytes;return((0,i.abool)("isCompressed",r),r)?a(Uint8Array.from([t.hasEvenY()?2:3]),o):a(Uint8Array.from([4]),o,s.toBytes(n.y))},fromBytes(e){let t=e.length,r=e[0],n=e.subarray(1);if(t===m&&(2===r||3===r)){let e;let t=(0,i.bytesToNumberBE)(n);if(!(0,i.inRange)(t,l,s.ORDER))throw Error("Point is not on curve");let o=x(t);try{e=s.sqrt(o)}catch(e){throw Error("Point is not on curve"+(e instanceof Error?": "+e.message:""))}return(1&r)==1!=((e&l)===l)&&(e=s.neg(e)),{x:t,y:e}}if(t===y&&4===r)return{x:s.fromBytes(n.subarray(0,s.BYTES)),y:s.fromBytes(n.subarray(s.BYTES,2*s.BYTES))};throw Error("invalid Point, expected length of "+m+", or uncompressed "+y+", got "+t)}}),P=(e,t,r)=>(0,i.bytesToNumberBE)(e.slice(t,r));class I{constructor(e,t,r){(0,i.aInRange)("r",e,l,d),(0,i.aInRange)("s",t,l,d),this.r=e,this.s=t,null!=r&&(this.recovery=r),Object.freeze(this)}static fromCompact(e){return new I(P(e=(0,i.ensureBytes)("compactSignature",e,2*f),0,f),P(e,f,2*f))}static fromDER(e){let{r,s:n}=t.DER.toSig((0,i.ensureBytes)("DER",e));return new I(r,n)}assertValidity(){}addRecoveryBit(e){return new I(this.r,this.s,e)}recoverPublicKey(e){let{r:t,s:n,recovery:o}=this,a=O((0,i.ensureBytes)("msgHash",e));if(null==o||![0,1,2,3].includes(o))throw Error("recovery id invalid");let c=2===o||3===o?t+r.n:t;if(c>=s.ORDER)throw Error("recovery id 2 or 3 invalid");let l=(1&o)==0?"02":"03",d=v.fromHex(l+u(c,s.BYTES)),f=g(c),p=h(-a*f),b=h(n*f),m=v.BASE.multiplyAndAddUnsafe(d,p,b);if(!m)throw Error("point at infinify");return m.assertValidity(),m}hasHighS(){return this.s>d>>l}normalizeS(){return this.hasHighS()?new I(this.r,h(-this.s),this.recovery):this}toDERRawBytes(){return(0,i.hexToBytes)(this.toDERHex())}toDERHex(){return t.DER.hexFromSig(this)}toCompactRawBytes(){return(0,i.hexToBytes)(this.toCompactHex())}toCompactHex(){return u(this.r,f)+u(this.s,f)}}function T(e){if("bigint"==typeof e)return!1;if(e instanceof v)return!0;let t=(0,i.ensureBytes)("key",e).length,n=s.BYTES,o=n+1;if(!r.allowedPrivateKeyLengths&&f!==o)return t===o||t===2*n+1}let A=r.bits2int||function(e){if(e.length>8192)throw Error("input is too large");let t=(0,i.bytesToNumberBE)(e),r=8*e.length-p;return r>0?t>>BigInt(r):t},O=r.bits2int_modN||function(e){return h(A(e))},B=(0,i.bitMask)(p);function S(e){return(0,i.aInRange)("num < 2^"+p,e,c,B),(0,i.numberToBytesBE)(e,f)}let j={lowS:r.lowS,prehash:!1},_={lowS:r.lowS,prehash:!1};return v.BASE._setWindowSize(8),{CURVE:r,getPublicKey:function(e,t=!0){return v.fromPrivateKey(e).toRawBytes(t)},getSharedSecret:function(e,t,r=!0){if(!0===T(e))throw Error("first arg must be private key");if(!1===T(t))throw Error("second arg must be public key");return v.fromHex(t).multiply(E(e)).toRawBytes(r)},sign:function(e,t,n=j){let{seed:o,k2sig:u}=function(e,t,n=j){if(["recovered","canonical"].some(e=>e in n))throw Error("sign() legacy options not supported");let{hash:o,randomBytes:u}=r,{lowS:f,prehash:p,extraEntropy:b}=n;null==f&&(f=!0),e=(0,i.ensureBytes)("msgHash",e),a(n),p&&(e=(0,i.ensureBytes)("prehashed msgHash",o(e)));let m=O(e),y=E(t),x=[S(y),S(m)];if(null!=b&&!1!==b){let e=!0===b?u(s.BYTES):b;x.push((0,i.ensureBytes)("extraEntropy",e))}return{seed:(0,i.concatBytes)(...x),k2sig:function(e){let t=A(e);if(!w(t))return;let r=g(t),n=v.BASE.multiply(t).toAffine(),o=h(n.x);if(o===c)return;let i=h(r*h(m+o*y));if(i===c)return;let a=(n.x===o?0:2)|Number(n.y&l),s=i;if(f&&i>d>>l)s=i>d>>l?h(-i):i,a^=1;return new I(o,s,a)}}}(e,t,n);return(0,i.createHmacDrbg)(r.hash.outputLen,r.nByteLength,r.hmac)(o,u)},verify:function(e,n,o,s=_){let u,c;n=(0,i.ensureBytes)("msgHash",n),o=(0,i.ensureBytes)("publicKey",o);let{lowS:l,prehash:d,format:f}=s;if(a(s),"strict"in s)throw Error("options.strict was renamed to lowS");if(void 0!==f&&"compact"!==f&&"der"!==f)throw Error("format must be compact or der");let p="string"==typeof e||(0,i.isBytes)(e),b=!p&&!f&&"object"==typeof e&&null!==e&&"bigint"==typeof e.r&&"bigint"==typeof e.s;if(!p&&!b)throw Error("invalid signature, expected Uint8Array, hex string or Signature instance");try{if(b&&(c=new I(e.r,e.s)),p){try{"compact"!==f&&(c=I.fromDER(e))}catch(e){if(!(e instanceof t.DER.Err))throw e}c||"der"===f||(c=I.fromCompact(e))}u=v.fromHex(o)}catch(e){return!1}if(!c||l&&c.hasHighS())return!1;d&&(n=r.hash(n));let{r:m,s:y}=c,E=O(n),x=g(y),w=h(E*x),P=h(m*x),T=v.BASE.multiplyAndAddUnsafe(u,w,P)?.toAffine();return!!T&&h(T.x)===m},ProjectivePoint:v,Signature:I,utils:{isValidPrivateKey(e){try{return E(e),!0}catch(e){return!1}},normPrivateKeyToScalar:E,randomPrivateKey:()=>{let e=(0,o.getMinHashLength)(r.n);return(0,o.mapHashToField)(r.randomBytes(e),r.n)},precompute:(e=8,t=v.BASE)=>(t._setWindowSize(e),t.multiply(BigInt(3)),t)}}},t.SWUFpSqrtRatio=m,t.mapToCurveSimpleSWU=function(e,t){if((0,o.validateField)(e),!e.isValid(t.A)||!e.isValid(t.B)||!e.isValid(t.Z))throw Error("mapToCurveSimpleSWU: invalid opts");let r=m(e,t.Z);if(!e.isOdd)throw Error("Fp.isOdd is not implemented!");return n=>{let i,a,s,u,c,l,d,f;i=e.sqr(n),i=e.mul(i,t.Z),a=e.sqr(i),a=e.add(a,i),s=e.add(a,e.ONE),s=e.mul(s,t.B),u=e.cmov(t.Z,e.neg(a),!e.eql(a,e.ZERO)),u=e.mul(u,t.A),a=e.sqr(s),l=e.sqr(u),c=e.mul(l,t.A),a=e.add(a,c),a=e.mul(a,s),l=e.mul(l,u),c=e.mul(l,t.B),a=e.add(a,c),d=e.mul(i,s);let{isValid:p,value:b}=r(a,l);f=e.mul(i,n),f=e.mul(f,b),d=e.cmov(d,s,p),f=e.cmov(f,b,p);let m=e.isOdd(n)===e.isOdd(f);f=e.cmov(e.neg(f),f,m);let y=(0,o.FpInvertBatch)(e,[u],!0)[0];return{x:d=e.mul(d,y),y:f}}};let n=r(13414),o=r(13244),i=r(21626);function a(e){void 0!==e.lowS&&(0,i.abool)("lowS",e.lowS),void 0!==e.prehash&&(0,i.abool)("prehash",e.prehash)}class s extends Error{constructor(e=""){super(e)}}function u(e,t){return(0,i.bytesToHex)((0,i.numberToBytesBE)(e,t))}t.DERErr=s,t.DER={Err:s,_tlv:{encode:(e,r)=>{let{Err:n}=t.DER;if(e<0||e>256)throw new n("tlv.encode: wrong tag");if(1&r.length)throw new n("tlv.encode: unpadded data");let o=r.length/2,a=(0,i.numberToHexUnpadded)(o);if(a.length/2&128)throw new n("tlv.encode: long form length too big");let s=o>127?(0,i.numberToHexUnpadded)(a.length/2|128):"";return(0,i.numberToHexUnpadded)(e)+s+a+r},decode(e,r){let{Err:n}=t.DER,o=0;if(e<0||e>256)throw new n("tlv.encode: wrong tag");if(r.length<2||r[o++]!==e)throw new n("tlv.decode: wrong tlv");let i=r[o++],a=0;if(128&i){let e=127&i;if(!e)throw new n("tlv.decode(long): indefinite length not supported");if(e>4)throw new n("tlv.decode(long): byte length is too big");let t=r.subarray(o,o+e);if(t.length!==e)throw new n("tlv.decode: length bytes not complete");if(0===t[0])throw new n("tlv.decode(long): zero leftmost byte");for(let e of t)a=a<<8|e;if(o+=e,a<128)throw new n("tlv.decode(long): not minimal encoding")}else a=i;let s=r.subarray(o,o+a);if(s.length!==a)throw new n("tlv.decode: wrong value length");return{v:s,l:r.subarray(o+a)}}},_int:{encode(e){let{Err:r}=t.DER;if(e{let o=t.toAffine();return(0,i.concatBytes)(Uint8Array.from([4]),r.toBytes(o.x),r.toBytes(o.y))}),u=t.fromBytes||(e=>{let t=e.subarray(1);return{x:r.fromBytes(t.subarray(0,r.BYTES)),y:r.fromBytes(t.subarray(r.BYTES,2*r.BYTES))}});function d(e){let{a:n,b:o}=t,i=r.sqr(e),a=r.mul(i,e);return r.add(r.add(a,r.mul(e,n)),o)}function b(e,t){let n=r.sqr(t),o=d(e);return r.eql(n,o)}if(!b(t.Gx,t.Gy))throw Error("bad curve params: generator point");let m=r.mul(r.pow(t.a,f),p),y=r.mul(r.sqr(t.b),BigInt(27));if(r.is0(r.add(m,y)))throw Error("bad curve params: a or b");function h(e){let r;let{allowedPrivateKeyLengths:n,nByteLength:a,wrapPrivateKey:s,n:u}=t;if(n&&"bigint"!=typeof e){if((0,i.isBytes)(e)&&(e=(0,i.bytesToHex)(e)),"string"!=typeof e||!n.includes(e.length))throw Error("invalid private key");e=e.padStart(2*a,"0")}try{r="bigint"==typeof e?e:(0,i.bytesToNumberBE)((0,i.ensureBytes)("private key",e,a))}catch(t){throw Error("invalid private key, expected hex or "+a+" bytes, got "+typeof e)}return s&&(r=(0,o.mod)(r,u)),(0,i.aInRange)("private key",r,l,u),r}function g(e){if(!(e instanceof x))throw Error("ProjectivePoint expected")}let v=(0,i.memoized)((e,t)=>{let{px:n,py:o,pz:i}=e;if(r.eql(i,r.ONE))return{x:n,y:o};let a=e.is0();null==t&&(t=a?r.ONE:r.inv(i));let s=r.mul(n,t),u=r.mul(o,t),c=r.mul(i,t);if(a)return{x:r.ZERO,y:r.ZERO};if(!r.eql(c,r.ONE))throw Error("invZ was invalid");return{x:s,y:u}}),E=(0,i.memoized)(e=>{if(e.is0()){if(t.allowInfinityPoint&&!r.is0(e.py))return;throw Error("bad point: ZERO")}let{x:n,y:o}=e.toAffine();if(!r.isValid(n)||!r.isValid(o))throw Error("bad point: x or y not FE");if(!b(n,o))throw Error("bad point: equation left != right");if(!e.isTorsionFree())throw Error("bad point: not in prime-order subgroup");return!0});class x{constructor(e,t,n){if(null==e||!r.isValid(e))throw Error("x required");if(null==t||!r.isValid(t)||r.is0(t))throw Error("y required");if(null==n||!r.isValid(n))throw Error("z required");this.px=e,this.py=t,this.pz=n,Object.freeze(this)}static fromAffine(e){let{x:t,y:n}=e||{};if(!e||!r.isValid(t)||!r.isValid(n))throw Error("invalid affine point");if(e instanceof x)throw Error("projective point not allowed");let o=e=>r.eql(e,r.ZERO);return o(t)&&o(n)?x.ZERO:new x(t,n,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(e){let t=(0,o.FpInvertBatch)(r,e.map(e=>e.pz));return e.map((e,r)=>e.toAffine(t[r])).map(x.fromAffine)}static fromHex(e){let t=x.fromAffine(u((0,i.ensureBytes)("pointHex",e)));return t.assertValidity(),t}static fromPrivateKey(e){return x.BASE.multiply(h(e))}static msm(e,t){return(0,n.pippenger)(x,a,e,t)}_setWindowSize(e){I.setWindowSize(this,e)}assertValidity(){E(this)}hasEvenY(){let{y:e}=this.toAffine();if(r.isOdd)return!r.isOdd(e);throw Error("Field doesn't support isOdd")}equals(e){g(e);let{px:t,py:n,pz:o}=this,{px:i,py:a,pz:s}=e,u=r.eql(r.mul(t,s),r.mul(i,o)),c=r.eql(r.mul(n,s),r.mul(a,o));return u&&c}negate(){return new x(this.px,r.neg(this.py),this.pz)}double(){let{a:e,b:n}=t,o=r.mul(n,f),{px:i,py:a,pz:s}=this,u=r.ZERO,c=r.ZERO,l=r.ZERO,d=r.mul(i,i),p=r.mul(a,a),b=r.mul(s,s),m=r.mul(i,a);return m=r.add(m,m),l=r.mul(i,s),l=r.add(l,l),u=r.mul(e,l),c=r.mul(o,b),c=r.add(u,c),u=r.sub(p,c),c=r.add(p,c),c=r.mul(u,c),u=r.mul(m,u),l=r.mul(o,l),b=r.mul(e,b),m=r.sub(d,b),m=r.mul(e,m),m=r.add(m,l),l=r.add(d,d),d=r.add(l,d),d=r.add(d,b),d=r.mul(d,m),c=r.add(c,d),b=r.mul(a,s),b=r.add(b,b),d=r.mul(b,m),u=r.sub(u,d),l=r.mul(b,p),l=r.add(l,l),new x(u,c,l=r.add(l,l))}add(e){g(e);let{px:n,py:o,pz:i}=this,{px:a,py:s,pz:u}=e,c=r.ZERO,l=r.ZERO,d=r.ZERO,p=t.a,b=r.mul(t.b,f),m=r.mul(n,a),y=r.mul(o,s),h=r.mul(i,u),v=r.add(n,o),E=r.add(a,s);v=r.mul(v,E),E=r.add(m,y),v=r.sub(v,E),E=r.add(n,i);let w=r.add(a,u);return E=r.mul(E,w),w=r.add(m,h),E=r.sub(E,w),w=r.add(o,i),c=r.add(s,u),w=r.mul(w,c),c=r.add(y,h),w=r.sub(w,c),d=r.mul(p,E),c=r.mul(b,h),d=r.add(c,d),c=r.sub(y,d),d=r.add(y,d),l=r.mul(c,d),y=r.add(m,m),y=r.add(y,m),h=r.mul(p,h),E=r.mul(b,E),y=r.add(y,h),h=r.sub(m,h),h=r.mul(p,h),E=r.add(E,h),m=r.mul(y,E),l=r.add(l,m),m=r.mul(w,E),c=r.mul(v,c),c=r.sub(c,m),m=r.mul(v,y),d=r.mul(w,d),new x(c,l,d=r.add(d,m))}subtract(e){return this.add(e.negate())}is0(){return this.equals(x.ZERO)}wNAF(e){return I.wNAFCached(this,e,x.normalizeZ)}multiplyUnsafe(e){let{endo:n,n:o}=t;(0,i.aInRange)("scalar",e,c,o);let a=x.ZERO;if(e===c)return a;if(this.is0()||e===l)return this;if(!n||I.hasPrecomputes(this))return I.wNAFCachedUnsafe(this,e,x.normalizeZ);let{k1neg:s,k1:u,k2neg:d,k2:f}=n.splitScalar(e),p=a,b=a,m=this;for(;u>c||f>c;)u&l&&(p=p.add(m)),f&l&&(b=b.add(m)),m=m.double(),u>>=l,f>>=l;return s&&(p=p.negate()),d&&(b=b.negate()),b=new x(r.mul(b.px,n.beta),b.py,b.pz),p.add(b)}multiply(e){let n,o;let{endo:a,n:s}=t;if((0,i.aInRange)("scalar",e,l,s),a){let{k1neg:t,k1:i,k2neg:s,k2:u}=a.splitScalar(e),{p:c,f:l}=this.wNAF(i),{p:d,f:f}=this.wNAF(u);c=I.constTimeNegate(t,c),d=I.constTimeNegate(s,d),d=new x(r.mul(d.px,a.beta),d.py,d.pz),n=c.add(d),o=l.add(f)}else{let{p:t,f:r}=this.wNAF(e);n=t,o=r}return x.normalizeZ([n,o])[0]}multiplyAndAddUnsafe(e,t,r){let n=x.BASE,o=(e,t)=>t!==c&&t!==l&&e.equals(n)?e.multiply(t):e.multiplyUnsafe(t),i=o(this,t).add(o(e,r));return i.is0()?void 0:i}toAffine(e){return v(this,e)}isTorsionFree(){let{h:e,isTorsionFree:r}=t;if(e===l)return!0;if(r)return r(x,this);throw Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){let{h:e,clearCofactor:r}=t;return e===l?this:r?r(x,this):this.multiplyUnsafe(t.h)}toRawBytes(e=!0){return(0,i.abool)("isCompressed",e),this.assertValidity(),s(x,this,e)}toHex(e=!0){return(0,i.abool)("isCompressed",e),(0,i.bytesToHex)(this.toRawBytes(e))}}x.BASE=new x(t.Gx,t.Gy,r.ONE),x.ZERO=new x(r.ZERO,r.ONE,r.ZERO);let{endo:w,nBitLength:P}=t,I=(0,n.wNAF)(x,w?Math.ceil(P/2):P);return{CURVE:t,ProjectivePoint:x,normPrivateKeyToScalar:h,weierstrassEquation:d,isWithinCurveOrder:function(e){return(0,i.inRange)(e,l,t.n)}}}function m(e,t){let r=e.ORDER,n=c;for(let e=r-l;e%d===c;e/=d)n+=l;let o=n,i=d<{let n=m,a=e.pow(r,b),s=e.sqr(a);s=e.mul(s,r);let c=e.mul(t,s);c=e.pow(c,u),c=e.mul(c,a),a=e.mul(c,r),s=e.mul(c,t);let f=e.mul(s,a);c=e.pow(f,i);let p=e.eql(c,e.ONE);a=e.mul(s,y),c=e.mul(f,n),s=e.cmov(a,s,p),f=e.cmov(c,f,p);for(let t=o;t>l;t--){let r=t-d;r=d<{let i=e.sqr(o),a=e.mul(t,o);i=e.mul(i,a);let s=e.pow(i,r);s=e.mul(s,a);let u=e.mul(s,n),c=e.mul(e.sqr(s),o),l=e.eql(c,t),d=e.cmov(u,s,l);return{isValid:l,value:d}}}return h}},92989:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.encodeToCurve=t.hashToCurve=t.secp256k1_hasher=t.schnorr=t.secp256k1=void 0;let n=r(56761),o=r(80819),i=r(990),a=r(30358),s=r(13244),u=r(21626),c=r(58665),l=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),d=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),f=BigInt(0),p=BigInt(1),b=BigInt(2),m=(e,t)=>(e+t/b)/t;function y(e){let t=BigInt(3),r=BigInt(6),n=BigInt(11),o=BigInt(22),i=BigInt(23),a=BigInt(44),u=BigInt(88),c=e*e*e%l,d=c*c*e%l,f=(0,s.pow2)(d,t,l)*d%l,p=(0,s.pow2)(f,t,l)*d%l,m=(0,s.pow2)(p,b,l)*c%l,y=(0,s.pow2)(m,n,l)*m%l,g=(0,s.pow2)(y,o,l)*y%l,v=(0,s.pow2)(g,a,l)*g%l,E=(0,s.pow2)(v,u,l)*v%l,x=(0,s.pow2)(E,a,l)*g%l,w=(0,s.pow2)(x,t,l)*d%l,P=(0,s.pow2)(w,i,l)*y%l,I=(0,s.pow2)(P,r,l)*c%l,T=(0,s.pow2)(I,b,l);if(!h.eql(h.sqr(T),e))throw Error("Cannot find square root");return T}let h=(0,s.Field)(l,void 0,void 0,{sqrt:y});t.secp256k1=(0,i.createCurve)({a:f,b:BigInt(7),Fp:h,n:d,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{let t=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-p*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),n=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),o=BigInt("0x100000000000000000000000000000000"),i=m(t*e,d),a=m(-r*e,d),u=(0,s.mod)(e-i*t-a*n,d),c=(0,s.mod)(-i*r-a*t,d),l=u>o,f=c>o;if(l&&(u=d-u),f&&(c=d-c),u>o||c>o)throw Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:l,k1:u,k2neg:f,k2:c}}}},n.sha256);let g={};function v(e,...t){let r=g[e];if(void 0===r){let t=(0,n.sha256)(Uint8Array.from(e,e=>e.charCodeAt(0)));r=(0,u.concatBytes)(t,t),g[e]=r}return(0,n.sha256)((0,u.concatBytes)(r,...t))}let E=e=>e.toRawBytes(!0).slice(1),x=e=>(0,u.numberToBytesBE)(e,32),w=e=>(0,s.mod)(e,l),P=e=>(0,s.mod)(e,d),I=t.secp256k1.ProjectivePoint,T=(e,t,r)=>I.BASE.multiplyAndAddUnsafe(e,t,r);function A(e){let r=t.secp256k1.utils.normPrivateKeyToScalar(e),n=I.fromPrivateKey(r);return{scalar:n.hasEvenY()?r:P(-r),bytes:E(n)}}function O(e){(0,u.aInRange)("x",e,p,l);let t=w(e*e),r=y(w(t*e+BigInt(7)));r%b!==f&&(r=w(-r));let n=new I(e,r,p);return n.assertValidity(),n}let B=u.bytesToNumberBE;function S(...e){return P(B(v("BIP0340/challenge",...e)))}function j(e,t,r){let n=(0,u.ensureBytes)("signature",e,64),o=(0,u.ensureBytes)("message",t),i=(0,u.ensureBytes)("publicKey",r,32);try{let e=O(B(i)),t=B(n.subarray(0,32));if(!(0,u.inRange)(t,p,l))return!1;let r=B(n.subarray(32,64));if(!(0,u.inRange)(r,p,d))return!1;let a=S(x(t),E(e),o),s=T(e,r,P(-a));if(!s||!s.hasEvenY()||s.toAffine().x!==t)return!1;return!0}catch(e){return!1}}t.schnorr={getPublicKey:function(e){return A(e).bytes},sign:function(e,t,r=(0,o.randomBytes)(32)){let n=(0,u.ensureBytes)("message",e),{bytes:i,scalar:a}=A(t),s=x(a^B(v("BIP0340/aux",(0,u.ensureBytes)("auxRand",r,32)))),c=P(B(v("BIP0340/nonce",s,i,n)));if(c===f)throw Error("sign failed: k is zero");let{bytes:l,scalar:d}=A(c),p=S(l,i,n),b=new Uint8Array(64);if(b.set(l,0),b.set(x(P(d+p*a)),32),!j(b,n,i))throw Error("sign: Invalid signature produced");return b},verify:j,utils:{randomPrivateKey:t.secp256k1.utils.randomPrivateKey,lift_x:O,pointToBytes:E,numberToBytesBE:u.numberToBytesBE,bytesToNumberBE:u.bytesToNumberBE,taggedHash:v,mod:s.mod}};let _=(0,a.isogenyMap)(h,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map(e=>e.map(e=>BigInt(e)))),M=(0,c.mapToCurveSimpleSWU)(h,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:h.create(BigInt("-11"))});t.secp256k1_hasher=(0,a.createHasher)(t.secp256k1.ProjectivePoint,e=>{let{x:t,y:r}=M(h.create(e[0]));return _(t,r)},{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:h.ORDER,m:1,k:128,expand:"xmd",hash:n.sha256}),t.hashToCurve=t.secp256k1_hasher.hashToCurve,t.encodeToCurve=t.secp256k1_hasher.encodeToCurve},91696:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.SHA512_IV=t.SHA384_IV=t.SHA224_IV=t.SHA256_IV=t.HashMD=void 0,t.setBigUint64=o,t.Chi=function(e,t,r){return e&t^~e&r},t.Maj=function(e,t,r){return e&t^e&r^t&r};let n=r(80819);function o(e,t,r,n){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,r,n);let o=BigInt(32),i=BigInt(4294967295),a=Number(r>>o&i),s=Number(r&i),u=n?4:0,c=n?0:4;e.setUint32(t+u,a,n),e.setUint32(t+c,s,n)}class i extends n.Hash{constructor(e,t,r,o){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=o,this.buffer=new Uint8Array(e),this.view=(0,n.createView)(this.buffer)}update(e){(0,n.aexists)(this),e=(0,n.toBytes)(e),(0,n.abytes)(e);let{view:t,buffer:r,blockLen:o}=this,i=e.length;for(let a=0;ai-s&&(this.process(r,0),s=0);for(let e=s;ed.length)throw Error("_sha2: outputLen bigger than state");for(let e=0;e>n&r)}:{h:0|Number(e>>n&r),l:0|Number(e&r)}}function i(e,t=!1){let r=e.length,n=new Uint32Array(r),i=new Uint32Array(r);for(let a=0;aBigInt(e>>>0)<>>0);t.toBig=a;let s=(e,t,r)=>e>>>r;t.shrSH=s;let u=(e,t,r)=>e<<32-r|t>>>r;t.shrSL=u;let c=(e,t,r)=>e>>>r|t<<32-r;t.rotrSH=c;let l=(e,t,r)=>e<<32-r|t>>>r;t.rotrSL=l;let d=(e,t,r)=>e<<64-r|t>>>r-32;t.rotrBH=d;let f=(e,t,r)=>e>>>r-32|t<<64-r;t.rotrBL=f;let p=(e,t)=>t;t.rotr32H=p;let b=(e,t)=>e;t.rotr32L=b;let m=(e,t,r)=>e<>>32-r;t.rotlSH=m;let y=(e,t,r)=>t<>>32-r;t.rotlSL=y;let h=(e,t,r)=>t<>>64-r;t.rotlBH=h;let g=(e,t,r)=>e<>>64-r;function v(e,t,r,n){let o=(t>>>0)+(n>>>0);return{h:e+r+(o/4294967296|0)|0,l:0|o}}t.rotlBL=g;let E=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0);t.add3L=E;let x=(e,t,r,n)=>t+r+n+(e/4294967296|0)|0;t.add3H=x;let w=(e,t,r,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0);t.add4L=w;let P=(e,t,r,n,o)=>t+r+n+o+(e/4294967296|0)|0;t.add4H=P;let I=(e,t,r,n,o)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(o>>>0);t.add5L=I;let T=(e,t,r,n,o,i)=>t+r+n+o+i+(e/4294967296|0)|0;t.add5H=T,t.default={fromBig:o,split:i,toBig:a,shrSH:s,shrSL:u,rotrSH:c,rotrSL:l,rotrBH:d,rotrBL:f,rotr32H:p,rotr32L:b,rotlSH:m,rotlSL:y,rotlBH:h,rotlBL:g,add:v,add3L:E,add3H:x,add4L:w,add4H:P,add5H:T,add5L:I}},69452:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=void 0,t.crypto="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0},17758:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.hmac=t.HMAC=void 0;let n=r(80819);class o extends n.Hash{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,(0,n.ahash)(e);let r=(0,n.toBytes)(t);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let o=this.blockLen,i=new Uint8Array(o);i.set(r.length>o?e.create().update(r).digest():r);for(let e=0;enew o(e,t).update(r).digest(),t.hmac.create=(e,t)=>new o(e,t)},30343:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.ripemd160=t.RIPEMD160=t.md5=t.MD5=t.sha1=t.SHA1=void 0;let n=r(91696),o=r(80819),i=Uint32Array.from([1732584193,4023233417,2562383102,271733878,3285377520]),a=new Uint32Array(80);class s extends n.HashMD{constructor(){super(64,20,8,!1),this.A=0|i[0],this.B=0|i[1],this.C=0|i[2],this.D=0|i[3],this.E=0|i[4]}get(){let{A:e,B:t,C:r,D:n,E:o}=this;return[e,t,r,n,o]}set(e,t,r,n,o){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|n,this.E=0|o}process(e,t){for(let r=0;r<16;r++,t+=4)a[r]=e.getUint32(t,!1);for(let e=16;e<80;e++)a[e]=(0,o.rotl)(a[e-3]^a[e-8]^a[e-14]^a[e-16],1);let{A:r,B:i,C:s,D:u,E:c}=this;for(let e=0;e<80;e++){let t,l;e<20?(t=(0,n.Chi)(i,s,u),l=1518500249):e<40?(t=i^s^u,l=1859775393):e<60?(t=(0,n.Maj)(i,s,u),l=2400959708):(t=i^s^u,l=3395469782);let d=(0,o.rotl)(r,5)+t+c+l+a[e]|0;c=u,u=s,s=(0,o.rotl)(i,30),i=r,r=d}r=r+this.A|0,i=i+this.B|0,s=s+this.C|0,u=u+this.D|0,c=c+this.E|0,this.set(r,i,s,u,c)}roundClean(){(0,o.clean)(a)}destroy(){this.set(0,0,0,0,0),(0,o.clean)(this.buffer)}}t.SHA1=s,t.sha1=(0,o.createHasher)(()=>new s);let u=Array.from({length:64},(e,t)=>Math.floor(4294967296*Math.abs(Math.sin(t+1)))),c=i.slice(0,4),l=new Uint32Array(16);class d extends n.HashMD{constructor(){super(64,16,8,!0),this.A=0|c[0],this.B=0|c[1],this.C=0|c[2],this.D=0|c[3]}get(){let{A:e,B:t,C:r,D:n}=this;return[e,t,r,n]}set(e,t,r,n){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|n}process(e,t){for(let r=0;r<16;r++,t+=4)l[r]=e.getUint32(t,!0);let{A:r,B:i,C:a,D:s}=this;for(let e=0;e<64;e++){let t,c,d;e<16?(t=(0,n.Chi)(i,a,s),c=e,d=[7,12,17,22]):e<32?(t=(0,n.Chi)(s,i,a),c=(5*e+1)%16,d=[5,9,14,20]):e<48?(t=i^a^s,c=(3*e+5)%16,d=[4,11,16,23]):(t=a^(i|~s),c=7*e%16,d=[6,10,15,21]),t=t+r+u[e]+l[c],r=s,s=a,a=i,i+=(0,o.rotl)(t,d[e%4])}r=r+this.A|0,i=i+this.B|0,a=a+this.C|0,s=s+this.D|0,this.set(r,i,a,s)}roundClean(){(0,o.clean)(l)}destroy(){this.set(0,0,0,0),(0,o.clean)(this.buffer)}}t.MD5=d,t.md5=(0,o.createHasher)(()=>new d);let f=Uint8Array.from([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),p=Uint8Array.from(Array(16).fill(0).map((e,t)=>t)),b=p.map(e=>(9*e+5)%16),m=(()=>{let e=[[p],[b]];for(let t=0;t<4;t++)for(let r of e)r.push(r[t].map(e=>f[e]));return e})(),y=m[0],h=m[1],g=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map(e=>Uint8Array.from(e)),v=y.map((e,t)=>e.map(e=>g[t][e])),E=h.map((e,t)=>e.map(e=>g[t][e])),x=Uint32Array.from([0,1518500249,1859775393,2400959708,2840853838]),w=Uint32Array.from([1352829926,1548603684,1836072691,2053994217,0]);function P(e,t,r,n){return 0===e?t^r^n:1===e?t&r|~t&n:2===e?(t|~r)^n:3===e?t&n|r&~n:t^(r|~n)}let I=new Uint32Array(16);class T extends n.HashMD{constructor(){super(64,20,8,!0),this.h0=1732584193,this.h1=-271733879,this.h2=-1732584194,this.h3=271733878,this.h4=-1009589776}get(){let{h0:e,h1:t,h2:r,h3:n,h4:o}=this;return[e,t,r,n,o]}set(e,t,r,n,o){this.h0=0|e,this.h1=0|t,this.h2=0|r,this.h3=0|n,this.h4=0|o}process(e,t){for(let r=0;r<16;r++,t+=4)I[r]=e.getUint32(t,!0);let r=0|this.h0,n=r,i=0|this.h1,a=i,s=0|this.h2,u=s,c=0|this.h3,l=c,d=0|this.h4,f=d;for(let e=0;e<5;e++){let t=4-e,p=x[e],b=w[e],m=y[e],g=h[e],T=v[e],A=E[e];for(let t=0;t<16;t++){let n=(0,o.rotl)(r+P(e,i,s,c)+I[m[t]]+p,T[t])+d|0;r=d,d=c,c=0|(0,o.rotl)(s,10),s=i,i=n}for(let e=0;e<16;e++){let r=(0,o.rotl)(n+P(t,a,u,l)+I[g[e]]+b,A[e])+f|0;n=f,f=l,l=0|(0,o.rotl)(u,10),u=a,a=r}}this.set(this.h1+s+l|0,this.h2+c+f|0,this.h3+d+n|0,this.h4+r+a|0,this.h0+i+u|0)}roundClean(){(0,o.clean)(I)}destroy(){this.destroyed=!0,(0,o.clean)(this.buffer),this.set(0,0,0,0,0)}}t.RIPEMD160=T,t.ripemd160=(0,o.createHasher)(()=>new T)},52618:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.ripemd160=t.RIPEMD160=void 0;let n=r(30343);t.RIPEMD160=n.RIPEMD160,t.ripemd160=n.ripemd160},56761:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.sha512_224=t.sha512_256=t.sha384=t.sha512=t.sha224=t.sha256=t.SHA512_256=t.SHA512_224=t.SHA384=t.SHA512=t.SHA224=t.SHA256=void 0;let n=r(91696),o=r(71473),i=r(80819),a=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),s=new Uint32Array(64);class u extends n.HashMD{constructor(e=32){super(64,e,8,!1),this.A=0|n.SHA256_IV[0],this.B=0|n.SHA256_IV[1],this.C=0|n.SHA256_IV[2],this.D=0|n.SHA256_IV[3],this.E=0|n.SHA256_IV[4],this.F=0|n.SHA256_IV[5],this.G=0|n.SHA256_IV[6],this.H=0|n.SHA256_IV[7]}get(){let{A:e,B:t,C:r,D:n,E:o,F:i,G:a,H:s}=this;return[e,t,r,n,o,i,a,s]}set(e,t,r,n,o,i,a,s){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|n,this.E=0|o,this.F=0|i,this.G=0|a,this.H=0|s}process(e,t){for(let r=0;r<16;r++,t+=4)s[r]=e.getUint32(t,!1);for(let e=16;e<64;e++){let t=s[e-15],r=s[e-2],n=(0,i.rotr)(t,7)^(0,i.rotr)(t,18)^t>>>3,o=(0,i.rotr)(r,17)^(0,i.rotr)(r,19)^r>>>10;s[e]=o+s[e-7]+n+s[e-16]|0}let{A:r,B:o,C:u,D:c,E:l,F:d,G:f,H:p}=this;for(let e=0;e<64;e++){let t=p+((0,i.rotr)(l,6)^(0,i.rotr)(l,11)^(0,i.rotr)(l,25))+(0,n.Chi)(l,d,f)+a[e]+s[e]|0,b=((0,i.rotr)(r,2)^(0,i.rotr)(r,13)^(0,i.rotr)(r,22))+(0,n.Maj)(r,o,u)|0;p=f,f=d,d=l,l=c+t|0,c=u,u=o,o=r,r=t+b|0}r=r+this.A|0,o=o+this.B|0,u=u+this.C|0,c=c+this.D|0,l=l+this.E|0,d=d+this.F|0,f=f+this.G|0,p=p+this.H|0,this.set(r,o,u,c,l,d,f,p)}roundClean(){(0,i.clean)(s)}destroy(){this.set(0,0,0,0,0,0,0,0),(0,i.clean)(this.buffer)}}t.SHA256=u;class c extends u{constructor(){super(28),this.A=0|n.SHA224_IV[0],this.B=0|n.SHA224_IV[1],this.C=0|n.SHA224_IV[2],this.D=0|n.SHA224_IV[3],this.E=0|n.SHA224_IV[4],this.F=0|n.SHA224_IV[5],this.G=0|n.SHA224_IV[6],this.H=0|n.SHA224_IV[7]}}t.SHA224=c;let l=o.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))),d=l[0],f=l[1],p=new Uint32Array(80),b=new Uint32Array(80);class m extends n.HashMD{constructor(e=64){super(128,e,16,!1),this.Ah=0|n.SHA512_IV[0],this.Al=0|n.SHA512_IV[1],this.Bh=0|n.SHA512_IV[2],this.Bl=0|n.SHA512_IV[3],this.Ch=0|n.SHA512_IV[4],this.Cl=0|n.SHA512_IV[5],this.Dh=0|n.SHA512_IV[6],this.Dl=0|n.SHA512_IV[7],this.Eh=0|n.SHA512_IV[8],this.El=0|n.SHA512_IV[9],this.Fh=0|n.SHA512_IV[10],this.Fl=0|n.SHA512_IV[11],this.Gh=0|n.SHA512_IV[12],this.Gl=0|n.SHA512_IV[13],this.Hh=0|n.SHA512_IV[14],this.Hl=0|n.SHA512_IV[15]}get(){let{Ah:e,Al:t,Bh:r,Bl:n,Ch:o,Cl:i,Dh:a,Dl:s,Eh:u,El:c,Fh:l,Fl:d,Gh:f,Gl:p,Hh:b,Hl:m}=this;return[e,t,r,n,o,i,a,s,u,c,l,d,f,p,b,m]}set(e,t,r,n,o,i,a,s,u,c,l,d,f,p,b,m){this.Ah=0|e,this.Al=0|t,this.Bh=0|r,this.Bl=0|n,this.Ch=0|o,this.Cl=0|i,this.Dh=0|a,this.Dl=0|s,this.Eh=0|u,this.El=0|c,this.Fh=0|l,this.Fl=0|d,this.Gh=0|f,this.Gl=0|p,this.Hh=0|b,this.Hl=0|m}process(e,t){for(let r=0;r<16;r++,t+=4)p[r]=e.getUint32(t),b[r]=e.getUint32(t+=4);for(let e=16;e<80;e++){let t=0|p[e-15],r=0|b[e-15],n=o.rotrSH(t,r,1)^o.rotrSH(t,r,8)^o.shrSH(t,r,7),i=o.rotrSL(t,r,1)^o.rotrSL(t,r,8)^o.shrSL(t,r,7),a=0|p[e-2],s=0|b[e-2],u=o.rotrSH(a,s,19)^o.rotrBH(a,s,61)^o.shrSH(a,s,6),c=o.rotrSL(a,s,19)^o.rotrBL(a,s,61)^o.shrSL(a,s,6),l=o.add4L(i,c,b[e-7],b[e-16]),d=o.add4H(l,n,u,p[e-7],p[e-16]);p[e]=0|d,b[e]=0|l}let{Ah:r,Al:n,Bh:i,Bl:a,Ch:s,Cl:u,Dh:c,Dl:l,Eh:m,El:y,Fh:h,Fl:g,Gh:v,Gl:E,Hh:x,Hl:w}=this;for(let e=0;e<80;e++){let t=o.rotrSH(m,y,14)^o.rotrSH(m,y,18)^o.rotrBH(m,y,41),P=o.rotrSL(m,y,14)^o.rotrSL(m,y,18)^o.rotrBL(m,y,41),I=m&h^~m&v,T=y&g^~y&E,A=o.add5L(w,P,T,f[e],b[e]),O=o.add5H(A,x,t,I,d[e],p[e]),B=0|A,S=o.rotrSH(r,n,28)^o.rotrBH(r,n,34)^o.rotrBH(r,n,39),j=o.rotrSL(r,n,28)^o.rotrBL(r,n,34)^o.rotrBL(r,n,39),_=r&i^r&s^i&s,M=n&a^n&u^a&u;x=0|v,w=0|E,v=0|h,E=0|g,h=0|m,g=0|y,({h:m,l:y}=o.add(0|c,0|l,0|O,0|B)),c=0|s,l=0|u,s=0|i,u=0|a,i=0|r,a=0|n;let C=o.add3L(B,j,M);r=o.add3H(C,O,S,_),n=0|C}({h:r,l:n}=o.add(0|this.Ah,0|this.Al,0|r,0|n)),({h:i,l:a}=o.add(0|this.Bh,0|this.Bl,0|i,0|a)),({h:s,l:u}=o.add(0|this.Ch,0|this.Cl,0|s,0|u)),({h:c,l:l}=o.add(0|this.Dh,0|this.Dl,0|c,0|l)),({h:m,l:y}=o.add(0|this.Eh,0|this.El,0|m,0|y)),({h:h,l:g}=o.add(0|this.Fh,0|this.Fl,0|h,0|g)),({h:v,l:E}=o.add(0|this.Gh,0|this.Gl,0|v,0|E)),({h:x,l:w}=o.add(0|this.Hh,0|this.Hl,0|x,0|w)),this.set(r,n,i,a,s,u,c,l,m,y,h,g,v,E,x,w)}roundClean(){(0,i.clean)(p,b)}destroy(){(0,i.clean)(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}t.SHA512=m;class y extends m{constructor(){super(48),this.Ah=0|n.SHA384_IV[0],this.Al=0|n.SHA384_IV[1],this.Bh=0|n.SHA384_IV[2],this.Bl=0|n.SHA384_IV[3],this.Ch=0|n.SHA384_IV[4],this.Cl=0|n.SHA384_IV[5],this.Dh=0|n.SHA384_IV[6],this.Dl=0|n.SHA384_IV[7],this.Eh=0|n.SHA384_IV[8],this.El=0|n.SHA384_IV[9],this.Fh=0|n.SHA384_IV[10],this.Fl=0|n.SHA384_IV[11],this.Gh=0|n.SHA384_IV[12],this.Gl=0|n.SHA384_IV[13],this.Hh=0|n.SHA384_IV[14],this.Hl=0|n.SHA384_IV[15]}}t.SHA384=y;let h=Uint32Array.from([2352822216,424955298,1944164710,2312950998,502970286,855612546,1738396948,1479516111,258812777,2077511080,2011393907,79989058,1067287976,1780299464,286451373,2446758561]),g=Uint32Array.from([573645204,4230739756,2673172387,3360449730,596883563,1867755857,2520282905,1497426621,2519219938,2827943907,3193839141,1401305490,721525244,746961066,246885852,2177182882]);class v extends m{constructor(){super(28),this.Ah=0|h[0],this.Al=0|h[1],this.Bh=0|h[2],this.Bl=0|h[3],this.Ch=0|h[4],this.Cl=0|h[5],this.Dh=0|h[6],this.Dl=0|h[7],this.Eh=0|h[8],this.El=0|h[9],this.Fh=0|h[10],this.Fl=0|h[11],this.Gh=0|h[12],this.Gl=0|h[13],this.Hh=0|h[14],this.Hl=0|h[15]}}t.SHA512_224=v;class E extends m{constructor(){super(32),this.Ah=0|g[0],this.Al=0|g[1],this.Bh=0|g[2],this.Bl=0|g[3],this.Ch=0|g[4],this.Cl=0|g[5],this.Dh=0|g[6],this.Dl=0|g[7],this.Eh=0|g[8],this.El=0|g[9],this.Fh=0|g[10],this.Fl=0|g[11],this.Gh=0|g[12],this.Gl=0|g[13],this.Hh=0|g[14],this.Hl=0|g[15]}}t.SHA512_256=E,t.sha256=(0,i.createHasher)(()=>new u),t.sha224=(0,i.createHasher)(()=>new c),t.sha512=(0,i.createHasher)(()=>new m),t.sha384=(0,i.createHasher)(()=>new y),t.sha512_256=(0,i.createHasher)(()=>new E),t.sha512_224=(0,i.createHasher)(()=>new v)},48850:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.sha224=t.SHA224=t.sha256=t.SHA256=void 0;let n=r(56761);t.SHA256=n.SHA256,t.sha256=n.sha256,t.SHA224=n.SHA224,t.sha224=n.sha224},27705:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.shake256=t.shake128=t.keccak_512=t.keccak_384=t.keccak_256=t.keccak_224=t.sha3_512=t.sha3_384=t.sha3_256=t.sha3_224=t.Keccak=void 0,t.keccakP=v;let n=r(71473),o=r(80819),i=BigInt(0),a=BigInt(1),s=BigInt(2),u=BigInt(7),c=BigInt(256),l=BigInt(113),d=[],f=[],p=[];for(let e=0,t=a,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],d.push(2*(5*n+r)),f.push((e+1)*(e+2)/2%64);let o=i;for(let e=0;e<7;e++)(t=(t<>u)*l)%c)&s&&(o^=a<<(a<r>32?(0,n.rotlBH)(e,t,r):(0,n.rotlSH)(e,t,r),g=(e,t,r)=>r>32?(0,n.rotlBL)(e,t,r):(0,n.rotlSL)(e,t,r);function v(e,t=24){let r=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let t=0;t<10;t++)r[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){let n=(t+8)%10,o=(t+2)%10,i=r[o],a=r[o+1],s=h(i,a,1)^r[n],u=g(i,a,1)^r[n+1];for(let r=0;r<50;r+=10)e[t+r]^=s,e[t+r+1]^=u}let t=e[2],o=e[3];for(let r=0;r<24;r++){let n=f[r],i=h(t,o,n),a=g(t,o,n),s=d[r];t=e[s],o=e[s+1],e[s]=i,e[s+1]=a}for(let t=0;t<50;t+=10){for(let n=0;n<10;n++)r[n]=e[t+n];for(let n=0;n<10;n++)e[t+n]^=~r[(n+2)%10]&r[(n+4)%10]}e[0]^=m[n],e[1]^=y[n]}(0,o.clean)(r)}class E extends o.Hash{constructor(e,t,r,n=!1,i=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=e,this.suffix=t,this.outputLen=r,this.enableXOF=n,this.rounds=i,(0,o.anumber)(r),!(0=r&&this.keccak();let i=Math.min(r-this.posOut,o-n);e.set(t.subarray(this.posOut,this.posOut+i),n),this.posOut+=i,n+=i}return e}xofInto(e){if(!this.enableXOF)throw Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return(0,o.anumber)(e),this.xofInto(new Uint8Array(e))}digestInto(e){if((0,o.aoutput)(e,this),this.finished)throw Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,(0,o.clean)(this.state)}_cloneInto(e){let{blockLen:t,suffix:r,outputLen:n,rounds:o,enableXOF:i}=this;return e||(e=new E(t,r,n,i,o)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=o,e.suffix=r,e.outputLen=n,e.enableXOF=i,e.destroyed=this.destroyed,e}}t.Keccak=E;let x=(e,t,r)=>(0,o.createHasher)(()=>new E(t,e,r));t.sha3_224=x(6,144,28),t.sha3_256=x(6,136,32),t.sha3_384=x(6,104,48),t.sha3_512=x(6,72,64),t.keccak_224=x(1,144,28),t.keccak_256=x(1,136,32),t.keccak_384=x(1,104,48),t.keccak_512=x(1,72,64);let w=(e,t,r)=>(0,o.createXOFer)((n={})=>new E(t,e,void 0===n.dkLen?r:n.dkLen,!0));t.shake128=w(31,168,16),t.shake256=w(31,136,32)},80819:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.wrapXOFConstructorWithOpts=t.wrapConstructorWithOpts=t.wrapConstructor=t.Hash=t.nextTick=t.swap32IfBE=t.byteSwapIfBE=t.swap8IfBE=t.isLE=void 0,t.isBytes=o,t.anumber=i,t.abytes=a,t.ahash=function(e){if("function"!=typeof e||"function"!=typeof e.create)throw Error("Hash should be wrapped by utils.createHasher");i(e.outputLen),i(e.blockLen)},t.aexists=function(e,t=!0){if(e.destroyed)throw Error("Hash instance has been destroyed");if(t&&e.finished)throw Error("Hash#digest() has already been called")},t.aoutput=function(e,t){a(e);let r=t.outputLen;if(e.length>>t},t.rotl=function(e,t){return e<>>32-t>>>0},t.byteSwap=s,t.byteSwap32=u,t.bytesToHex=function(e){if(a(e),c)return e.toHex();let t="";for(let r=0;r0&&!t.includes(e.length))throw Error("Uint8Array expected of length "+t+", got length="+e.length)}function s(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function u(e){for(let t=0;te:e=>s(e),t.byteSwapIfBE=t.swap8IfBE,t.swap32IfBE=t.isLE?e=>e:u;let c="function"==typeof Uint8Array.from([]).toHex&&"function"==typeof Uint8Array.fromHex,l=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0")),d={_0:48,_9:57,A:65,F:70,a:97,f:102};function f(e){return e>=d._0&&e<=d._9?e-d._0:e>=d.A&&e<=d.F?e-(d.A-10):e>=d.a&&e<=d.f?e-(d.a-10):void 0}let p=async()=>{};async function b(e,r,n){let o=Date.now();for(let i=0;i=0&&ee().update(y(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function v(e){let t=(t,r)=>e(r).update(y(t)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t}function E(e){let t=(t,r)=>e(r).update(y(t)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t}t.Hash=h,t.wrapConstructor=g,t.wrapConstructorWithOpts=v,t.wrapXOFConstructorWithOpts=E},29901:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0});let i=r(63517);class a{constructor(e=null,t=!1){this.allowedOrigins=null,this.callbacks=new Map,this.debugMode=!1,this.isServer="undefined"==typeof window,this.isValidMessage=({origin:e,data:t,source:r})=>{let n=!this.isServer&&r===window.parent,o=void 0!==t.version&&parseInt(t.version.split(".")[0]),i=!0;return Array.isArray(this.allowedOrigins)&&(i=void 0!==this.allowedOrigins.find(t=>t.test(e))),!!t&&n&&"number"==typeof o&&o>=1&&i},this.logIncomingMessage=e=>{console.info(`Safe Apps SDK v1: A message was received from origin ${e.origin}. `,e.data)},this.onParentMessage=e=>{this.isValidMessage(e)&&(this.debugMode&&this.logIncomingMessage(e),this.handleIncomingMessage(e.data))},this.handleIncomingMessage=e=>{let{id:t}=e,r=this.callbacks.get(t);r&&(r(e),this.callbacks.delete(t))},this.send=(e,t)=>{let r=i.MessageFormatter.makeRequest(e,t);if(this.isServer)throw Error("Window doesn't exist");return window.parent.postMessage(r,"*"),new Promise((e,t)=>{this.callbacks.set(r.id,r=>{if(!r.success){t(Error(r.error));return}e(r)})})},this.allowedOrigins=e,this.debugMode=t,this.isServer||window.addEventListener("message",this.onParentMessage)}}t.default=a,o(r(38202),t)},63517:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.MessageFormatter=void 0;let n=r(13834),o=r(70318);class i{}t.MessageFormatter=i,i.makeRequest=(e,t)=>({id:(0,o.generateRequestId)(),method:e,params:t,env:{sdkVersion:(0,n.getSDKVersion)()}}),i.makeResponse=(e,t,r)=>({id:e,success:!0,version:r,data:t}),i.makeErrorResponse=(e,t,r)=>({id:e,success:!1,error:t,version:r})},38202:function(e,t){var r,n,o;Object.defineProperty(t,"__esModule",{value:!0}),t.RestrictedMethods=t.Methods=void 0,(o=r||(t.Methods=r={})).sendTransactions="sendTransactions",o.rpcCall="rpcCall",o.getChainInfo="getChainInfo",o.getSafeInfo="getSafeInfo",o.getTxBySafeTxHash="getTxBySafeTxHash",o.getSafeBalances="getSafeBalances",o.signMessage="signMessage",o.signTypedMessage="signTypedMessage",o.getEnvironmentInfo="getEnvironmentInfo",o.getOffChainSignature="getOffChainSignature",o.requestAddressBook="requestAddressBook",o.wallet_getPermissions="wallet_getPermissions",o.wallet_requestPermissions="wallet_requestPermissions",(n||(t.RestrictedMethods=n={})).requestAddressBook="requestAddressBook"},70318:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.generateRequestId=void 0;let r=e=>e.toString(16).padStart(2,"0"),n=e=>{let t=new Uint8Array((e||40)/2);return window.crypto.getRandomValues(t),Array.from(t,r).join("")};t.generateRequestId=()=>"undefined"!=typeof window?n(10):new Date().getTime().toString(36)},70638:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});let n=r(47630),o=r(42260),i=(e,t)=>t.some(t=>t.parentCapability===e);t.default=()=>(e,t,r)=>{let a=r.value;return r.value=async function(){let e=new n.Wallet(this.communicator),r=await e.getPermissions();if(i(t,r)||(r=await e.requestPermissions([{[t]:{}}])),!i(t,r))throw new o.PermissionsError("Permissions rejected",o.PERMISSIONS_REQUEST_REJECTED);return a.apply(this)},r}},73835:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.RPC_CALLS=void 0,t.RPC_CALLS={eth_call:"eth_call",eth_gasPrice:"eth_gasPrice",eth_getLogs:"eth_getLogs",eth_getBalance:"eth_getBalance",eth_getCode:"eth_getCode",eth_getBlockByHash:"eth_getBlockByHash",eth_getBlockByNumber:"eth_getBlockByNumber",eth_getStorageAt:"eth_getStorageAt",eth_getTransactionByHash:"eth_getTransactionByHash",eth_getTransactionReceipt:"eth_getTransactionReceipt",eth_getTransactionCount:"eth_getTransactionCount",eth_estimateGas:"eth_estimateGas",safe_setSettings:"safe_setSettings"}},16877:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.Eth=void 0;let n=r(73835),o=r(38202),i=(e="latest")=>e,a=(e=!1)=>e,s=e=>Number.isInteger(e)?`0x${e.toString(16)}`:e;class u{constructor(e){this.communicator=e,this.call=this.buildRequest({call:n.RPC_CALLS.eth_call,formatters:[null,i]}),this.getBalance=this.buildRequest({call:n.RPC_CALLS.eth_getBalance,formatters:[null,i]}),this.getCode=this.buildRequest({call:n.RPC_CALLS.eth_getCode,formatters:[null,i]}),this.getStorageAt=this.buildRequest({call:n.RPC_CALLS.eth_getStorageAt,formatters:[null,s,i]}),this.getPastLogs=this.buildRequest({call:n.RPC_CALLS.eth_getLogs}),this.getBlockByHash=this.buildRequest({call:n.RPC_CALLS.eth_getBlockByHash,formatters:[null,a]}),this.getBlockByNumber=this.buildRequest({call:n.RPC_CALLS.eth_getBlockByNumber,formatters:[s,a]}),this.getTransactionByHash=this.buildRequest({call:n.RPC_CALLS.eth_getTransactionByHash}),this.getTransactionReceipt=this.buildRequest({call:n.RPC_CALLS.eth_getTransactionReceipt}),this.getTransactionCount=this.buildRequest({call:n.RPC_CALLS.eth_getTransactionCount,formatters:[null,i]}),this.getGasPrice=this.buildRequest({call:n.RPC_CALLS.eth_gasPrice}),this.getEstimateGas=e=>this.buildRequest({call:n.RPC_CALLS.eth_estimateGas})([e]),this.setSafeSettings=this.buildRequest({call:n.RPC_CALLS.safe_setSettings})}buildRequest(e){let{call:t,formatters:r}=e;return async e=>(r&&Array.isArray(e)&&r.forEach((t,r)=>{t&&(e[r]=t(e[r]))}),(await this.communicator.send(o.Methods.rpcCall,{call:t,params:e||[]})).data)}}t.Eth=u},22441:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getSDKVersion=void 0;let a=i(r(12382));t.default=a.default,o(r(12382),t),o(r(40494),t),o(r(38202),t),o(r(63517),t);var s=r(13834);Object.defineProperty(t,"getSDKVersion",{enumerable:!0,get:function(){return s.getSDKVersion}}),o(r(73835),t)},99395:function(e,t,r){var n=this&&this.__decorate||function(e,t,r,n){var o,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,r,a):o(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Safe=void 0;let i=r(50512),a=r(20931),s=r(38202),u=r(73835),c=r(40494),l=o(r(70638));class d{constructor(e){this.communicator=e}async getChainInfo(){return(await this.communicator.send(s.Methods.getChainInfo,void 0)).data}async getInfo(){return(await this.communicator.send(s.Methods.getSafeInfo,void 0)).data}async experimental_getBalances({currency:e="usd"}={}){return(await this.communicator.send(s.Methods.getSafeBalances,{currency:e})).data}async check1271Signature(e,t="0x"){let r=await this.getInfo(),n=(0,i.encodeFunctionData)({abi:[{constant:!1,inputs:[{name:"_dataHash",type:"bytes32"},{name:"_signature",type:"bytes"}],name:"isValidSignature",outputs:[{name:"",type:"bytes4"}],payable:!1,stateMutability:"nonpayable",type:"function"}],functionName:"isValidSignature",args:[e,t]}),o={call:u.RPC_CALLS.eth_call,params:[{to:r.safeAddress,data:n},"latest"]};try{return(await this.communicator.send(s.Methods.rpcCall,o)).data.slice(0,10).toLowerCase()===a.MAGIC_VALUE}catch(e){return!1}}async check1271SignatureBytes(e,t="0x"){let r=await this.getInfo(),n=(0,i.encodeFunctionData)({abi:[{constant:!1,inputs:[{name:"_data",type:"bytes"},{name:"_signature",type:"bytes"}],name:"isValidSignature",outputs:[{name:"",type:"bytes4"}],payable:!1,stateMutability:"nonpayable",type:"function"}],functionName:"isValidSignature",args:[e,t]}),o={call:u.RPC_CALLS.eth_call,params:[{to:r.safeAddress,data:n},"latest"]};try{return(await this.communicator.send(s.Methods.rpcCall,o)).data.slice(0,10).toLowerCase()===a.MAGIC_VALUE_BYTES}catch(e){return!1}}calculateMessageHash(e){return(0,i.hashMessage)(e)}calculateTypedMessageHash(e){let t="object"==typeof e.domain.chainId?e.domain.chainId.toNumber():Number(e.domain.chainId),r=e.primaryType;if(!r){let t=Object.values(e.types),n=Object.keys(e.types).filter(e=>t.every(t=>t.every(({type:t})=>t.replace("[","").replace("]","")!==e)));if(0===n.length||n.length>1)throw Error("Please specify primaryType");r=n[0]}return(0,i.hashTypedData)({message:e.message,domain:{...e.domain,chainId:t,verifyingContract:e.domain.verifyingContract,salt:e.domain.salt},types:e.types,primaryType:r})}async getOffChainSignature(e){return(await this.communicator.send(s.Methods.getOffChainSignature,e)).data}async isMessageSigned(e,t="0x"){let r;if("string"==typeof e&&(r=async()=>{let r=this.calculateMessageHash(e);return await this.isMessageHashSigned(r,t)}),(0,c.isObjectEIP712TypedData)(e)&&(r=async()=>{let r=this.calculateTypedMessageHash(e);return await this.isMessageHashSigned(r,t)}),r)return await r();throw Error("Invalid message type")}async isMessageHashSigned(e,t="0x"){for(let r of[this.check1271Signature.bind(this),this.check1271SignatureBytes.bind(this)])if(await r(e,t))return!0;return!1}async getEnvironmentInfo(){return(await this.communicator.send(s.Methods.getEnvironmentInfo,void 0)).data}async requestAddressBook(){return(await this.communicator.send(s.Methods.requestAddressBook,void 0)).data}}t.Safe=d,n([(0,l.default)()],d.prototype,"requestAddressBook",null)},20931:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MAGIC_VALUE_BYTES=t.MAGIC_VALUE=void 0,t.MAGIC_VALUE="0x1626ba7e",t.MAGIC_VALUE_BYTES="0x20c13b0b"},12382:function(e,t,r){var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});let o=n(r(29901)),i=r(18668),a=r(16877),s=r(99395),u=r(47630);class c{constructor(e={}){let{allowedDomains:t=null,debug:r=!1}=e;this.communicator=new o.default(t,r),this.eth=new a.Eth(this.communicator),this.txs=new i.TXs(this.communicator),this.safe=new s.Safe(this.communicator),this.wallet=new u.Wallet(this.communicator)}}t.default=c},18668:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.TXs=void 0;let n=r(38202),o=r(40494);class i{constructor(e){this.communicator=e}async getBySafeTxHash(e){if(!e)throw Error("Invalid safeTxHash");return(await this.communicator.send(n.Methods.getTxBySafeTxHash,{safeTxHash:e})).data}async signMessage(e){return(await this.communicator.send(n.Methods.signMessage,{message:e})).data}async signTypedMessage(e){if(!(0,o.isObjectEIP712TypedData)(e))throw Error("Invalid typed data");return(await this.communicator.send(n.Methods.signTypedMessage,{typedData:e})).data}async send({txs:e,params:t}){if(!e||!e.length)throw Error("No transactions were passed");return(await this.communicator.send(n.Methods.sendTransactions,{txs:e,params:t})).data}}t.TXs=i},2184:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.TransferDirection=t.TransactionStatus=t.TokenType=t.Operation=void 0;var n=r(42181);Object.defineProperty(t,"Operation",{enumerable:!0,get:function(){return n.Operation}}),Object.defineProperty(t,"TokenType",{enumerable:!0,get:function(){return n.TokenType}}),Object.defineProperty(t,"TransactionStatus",{enumerable:!0,get:function(){return n.TransactionStatus}}),Object.defineProperty(t,"TransferDirection",{enumerable:!0,get:function(){return n.TransferDirection}})},40494:function(e,t,r){var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(32845),t),o(r(46465),t),o(r(2184),t),o(r(84753),t)},84753:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),r(38202)},42260:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.PermissionsError=t.PERMISSIONS_REQUEST_REJECTED=void 0,t.PERMISSIONS_REQUEST_REJECTED=4001;class r extends Error{constructor(e,t,n){super(e),this.code=t,this.data=n,Object.setPrototypeOf(this,r.prototype)}}t.PermissionsError=r},46465:function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},32845:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isObjectEIP712TypedData=void 0,t.isObjectEIP712TypedData=e=>"object"==typeof e&&null!=e&&"domain"in e&&"types"in e&&"message"in e},13834:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getSDKVersion=void 0,t.getSDKVersion=()=>"9.1.0"},47630:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.Wallet=void 0;let n=r(38202),o=r(42260);class i{constructor(e){this.communicator=e}async getPermissions(){return(await this.communicator.send(n.Methods.wallet_getPermissions,void 0)).data}async requestPermissions(e){if(!this.isPermissionRequestValid(e))throw new o.PermissionsError("Permissions request is invalid",o.PERMISSIONS_REQUEST_REJECTED);try{return(await this.communicator.send(n.Methods.wallet_requestPermissions,e)).data}catch{throw new o.PermissionsError("Permissions rejected",o.PERMISSIONS_REQUEST_REJECTED)}}isPermissionRequestValid(e){return e.every(e=>"object"==typeof e&&Object.keys(e).every(e=>!!Object.values(n.RestrictedMethods).includes(e)))}}t.Wallet=i},83153:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.parseAccount=function(e){return"string"==typeof e?{address:e,type:"json-rpc"}:e}},5104:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.publicKeyToAddress=function(e){let t=(0,o.keccak256)(`0x${e.substring(4)}`).substring(26);return(0,n.checksumAddress)(`0x${t}`)};let n=r(37743),o=r(59391)},83412:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getEnsAddress=m;let n=r(73579),o=r(13632),i=r(51974),a=r(79810),s=r(46041),u=r(30769),c=r(23276),l=r(74551),d=r(50789),f=r(94103),p=r(54628),b=r(51693);async function m(e,t){let{blockNumber:r,blockTag:m,coinType:y,name:h,gatewayUrls:g,strict:v}=t,{chain:E}=e,x=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!E)throw Error("client chain not configured. universalResolverAddress is required.");return(0,a.getChainContractAddress)({blockNumber:r,chain:E,contract:"ensUniversalResolver"})})(),w=E?.ensTlds;if(w&&!w.some(e=>h.endsWith(e)))return null;let P=null!=y?[(0,d.namehash)(h),BigInt(y)]:[(0,d.namehash)(h)];try{let t=(0,i.encodeFunctionData)({abi:n.addressResolverAbi,functionName:"addr",args:P}),a={address:x,abi:n.universalResolverResolveAbi,functionName:"resolveWithGateways",args:[(0,u.toHex)((0,f.packetToBytes)(h)),t,g??[l.localBatchGatewayUrl]],blockNumber:r,blockTag:m},c=(0,p.getAction)(e,b.readContract,"readContract"),d=await c(a);if("0x"===d[0])return null;let y=(0,o.decodeFunctionResult)({abi:n.addressResolverAbi,args:P,functionName:"addr",data:d[0]});if("0x"===y||"0x00"===(0,s.trim)(y))return null;return y}catch(e){if(v)throw e;if((0,c.isNullUniversalResolverError)(e))return null;throw e}}},11599:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getEnsAvatar=a;let n=r(33950),o=r(54628),i=r(83721);async function a(e,{blockNumber:t,blockTag:r,assetGatewayUrls:a,name:s,gatewayUrls:u,strict:c,universalResolverAddress:l}){let d=await (0,o.getAction)(e,i.getEnsText,"getEnsText")({blockNumber:t,blockTag:r,key:"avatar",name:s,universalResolverAddress:l,gatewayUrls:u,strict:c});if(!d)return null;try{return await (0,n.parseAvatarRecord)(e,{record:d,gatewayUrls:a})}catch{return null}}},87482:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getEnsName=c;let n=r(73579),o=r(79810),i=r(23276),a=r(74551),s=r(54628),u=r(51693);async function c(e,t){let{address:r,blockNumber:c,blockTag:l,coinType:d=60n,gatewayUrls:f,strict:p}=t,{chain:b}=e,m=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!b)throw Error("client chain not configured. universalResolverAddress is required.");return(0,o.getChainContractAddress)({blockNumber:c,chain:b,contract:"ensUniversalResolver"})})();try{let t={address:m,abi:n.universalResolverReverseAbi,args:[r,d,f??[a.localBatchGatewayUrl]],functionName:"reverseWithGateways",blockNumber:c,blockTag:l},o=(0,s.getAction)(e,u.readContract,"readContract"),[i]=await o(t);return i||null}catch(e){if(p)throw e;if((0,i.isNullUniversalResolverError)(e))return null;throw e}}},9429:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getEnsResolver=u;let n=r(79810),o=r(30769),i=r(94103),a=r(54628),s=r(51693);async function u(e,t){let{blockNumber:r,blockTag:u,name:c}=t,{chain:l}=e,d=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!l)throw Error("client chain not configured. universalResolverAddress is required.");return(0,n.getChainContractAddress)({blockNumber:r,chain:l,contract:"ensUniversalResolver"})})(),f=l?.ensTlds;if(f&&!f.some(e=>c.endsWith(e)))throw Error(`${c} is not a valid ENS TLD (${f?.join(", ")}) for chain "${l.name}" (id: ${l.id}).`);let[p]=await (0,a.getAction)(e,s.readContract,"readContract")({address:d,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"},{type:"uint256"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[(0,o.toHex)((0,i.packetToBytes)(c))],blockNumber:r,blockTag:u});return p}},83721:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getEnsText=b;let n=r(73579),o=r(13632),i=r(51974),a=r(79810),s=r(30769),u=r(23276),c=r(74551),l=r(50789),d=r(94103),f=r(54628),p=r(51693);async function b(e,t){let{blockNumber:r,blockTag:b,key:m,name:y,gatewayUrls:h,strict:g}=t,{chain:v}=e,E=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!v)throw Error("client chain not configured. universalResolverAddress is required.");return(0,a.getChainContractAddress)({blockNumber:r,chain:v,contract:"ensUniversalResolver"})})(),x=v?.ensTlds;if(x&&!x.some(e=>y.endsWith(e)))return null;try{let t={address:E,abi:n.universalResolverResolveAbi,args:[(0,s.toHex)((0,d.packetToBytes)(y)),(0,i.encodeFunctionData)({abi:n.textResolverAbi,functionName:"text",args:[(0,l.namehash)(y),m]}),h??[c.localBatchGatewayUrl]],functionName:"resolveWithGateways",blockNumber:r,blockTag:b},a=(0,f.getAction)(e,p.readContract,"readContract"),u=await a(t);if("0x"===u[0])return null;let g=(0,o.decodeFunctionResult)({abi:n.textResolverAbi,functionName:"text",data:u[0]});return""===g?null:g}catch(e){if(g)throw e;if((0,u.isNullUniversalResolverError)(e))return null;throw e}}},85694:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getContract=function({abi:e,address:t,client:r}){let[p,b]=r?"public"in r&&"wallet"in r?[r.public,r.wallet]:"public"in r?[r.public,void 0]:"wallet"in r?[void 0,r.wallet]:[r,r]:[void 0,void 0],m=null!=p,y=null!=b,h={},g=!1,v=!1,E=!1;for(let t of e)if("function"===t.type?"view"===t.stateMutability||"pure"===t.stateMutability?g=!0:v=!0:"event"===t.type&&(E=!0),g&&v&&E)break;return m&&(g&&(h.read=new Proxy({},{get:(r,o)=>(...r)=>{let{args:i,options:a}=d(r);return(0,n.getAction)(p,s.readContract,"readContract")({abi:e,address:t,functionName:o,args:i,...a})}})),v&&(h.simulate=new Proxy({},{get:(r,o)=>(...r)=>{let{args:i,options:a}=d(r);return(0,n.getAction)(p,u.simulateContract,"simulateContract")({abi:e,address:t,functionName:o,args:i,...a})}})),E&&(h.createEventFilter=new Proxy({},{get:(r,i)=>(...r)=>{let{args:a,options:s}=f(r,e.find(e=>"event"===e.type&&e.name===i));return(0,n.getAction)(p,o.createContractEventFilter,"createContractEventFilter")({abi:e,address:t,eventName:i,args:a,...s})}}),h.getEvents=new Proxy({},{get:(r,o)=>(...r)=>{let{args:i,options:s}=f(r,e.find(e=>"event"===e.type&&e.name===o));return(0,n.getAction)(p,a.getContractEvents,"getContractEvents")({abi:e,address:t,eventName:o,args:i,...s})}}),h.watchEvent=new Proxy({},{get:(r,o)=>(...r)=>{let{args:i,options:a}=f(r,e.find(e=>"event"===e.type&&e.name===o));return(0,n.getAction)(p,c.watchContractEvent,"watchContractEvent")({abi:e,address:t,eventName:o,args:i,...a})}}))),y&&v&&(h.write=new Proxy({},{get:(r,o)=>(...r)=>{let{args:i,options:a}=d(r);return(0,n.getAction)(b,l.writeContract,"writeContract")({abi:e,address:t,functionName:o,args:i,...a})}})),(m||y)&&v&&(h.estimateGas=new Proxy({},{get:(r,o)=>(...r)=>{let{args:a,options:s}=d(r),u=p??b;return(0,n.getAction)(u,i.estimateContractGas,"estimateContractGas")({abi:e,address:t,functionName:o,args:a,...s,account:s.account??b.account})}})),h.address=t,h.abi=e,h},t.getFunctionParameters=d,t.getEventParameters=f;let n=r(54628),o=r(94475),i=r(79432),a=r(37018),s=r(51693),u=r(7604),c=r(23619),l=r(97273);function d(e){let t=e.length&&Array.isArray(e[0]);return{args:t?e[0]:[],options:(t?e[1]:e[0])??{}}}function f(e,t){let r=!1;return Array.isArray(e[0])?r=!0:1===e.length?r=t.inputs.some(e=>e.indexed):2===e.length&&(r=!0),{args:r?e[0]:void 0,options:(r?e[1]:e[0])??{}}}},92137:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.call=P,t.getRevertErrorData=A;let n=r(65991),o=r(51239),i=r(83153),a=r(73579),s=r(71112),u=r(22530),c=r(3035),l=r(3011),d=r(78924),f=r(13632),p=r(26573),b=r(51974),m=r(79810),y=r(30769),h=r(76919),g=r(67390),v=r(2148),E=r(62018),x=r(97067),w=r(13714);async function P(e,t){let{account:a=e.account,authorizationList:f,batch:b=!!e.batch?.multicall,blockNumber:m,blockTag:E=e.experimental_blockTag??"latest",accessList:P,blobs:O,blockOverrides:B,code:S,data:j,factory:_,factoryData:M,gas:C,gasPrice:R,maxFeePerBlobGas:k,maxFeePerGas:F,maxPriorityFeePerGas:N,nonce:H,to:U,value:z,stateOverride:L,...$}=t,D=a?(0,i.parseAccount)(a):void 0;if(S&&(_||M))throw new c.BaseError("Cannot provide both `code` & `factory`/`factoryData` as parameters.");if(S&&U)throw new c.BaseError("Cannot provide both `code` & `to` as parameters.");let q=S&&j,G=_&&M&&U&&j,V=q||G,W=q?T({code:S,data:j}):G?function(e){let{data:t,factory:r,factoryData:o,to:i}=e;return(0,p.encodeDeployData)({abi:(0,n.parseAbi)(["constructor(address, bytes, address, bytes)"]),bytecode:u.deploylessCallViaFactoryBytecode,args:[i,t,r,o]})}({data:j,factory:_,factoryData:M,to:U}):j;try{(0,w.assertRequest)(t);let r=("bigint"==typeof m?(0,y.numberToHex)(m):void 0)||E,n=B?o.toRpc(B):void 0,i=(0,x.serializeStateOverride)(L),a=e.chain?.formatters?.transactionRequest?.format,u=(a||v.formatTransactionRequest)({...(0,g.extract)($,{format:a}),accessList:P,account:D,authorizationList:f,blobs:O,data:W,gas:C,gasPrice:R,maxFeePerBlobGas:k,maxFeePerGas:F,maxPriorityFeePerGas:N,nonce:H,to:V?void 0:U,value:z},"call");if(b&&function({request:e}){let{data:t,to:r,...n}=e;return!(!t||t.startsWith(s.aggregate3Signature))&&!!r&&!(Object.values(n).filter(e=>void 0!==e).length>0)}({request:u})&&!i&&!n)try{return await I(e,{...u,blockNumber:m,blockTag:E})}catch(e){if(!(e instanceof l.ClientChainNotConfiguredError)&&!(e instanceof l.ChainDoesNotSupportContract))throw e}let c=(()=>{let e=[u,r];return i&&n?[...e,i,n]:i?[...e,i]:n?[...e,{},n]:e})(),d=await e.request({method:"eth_call",params:c});if("0x"===d)return{data:void 0};return{data:d}}catch(a){let n=A(a),{offchainLookup:o,offchainLookupSignature:i}=await Promise.resolve().then(()=>r(46069));if(!1!==e.ccipRead&&n?.slice(0,10)===i&&U)return{data:await o(e,{data:n,to:U})};if(V&&n?.slice(0,10)==="0x101bb98d")throw new d.CounterfactualDeploymentFailedError({factory:_});throw(0,h.getCallError)(a,{...t,account:D,chain:e.chain})}}async function I(e,t){let{batchSize:r=1024,deployless:n=!1,wait:o=0}="object"==typeof e.batch?.multicall?e.batch.multicall:{},{blockNumber:i,blockTag:s=e.experimental_blockTag??"latest",data:c,to:p}=t,h=(()=>{if(n)return null;if(t.multicallAddress)return t.multicallAddress;if(e.chain)return(0,m.getChainContractAddress)({blockNumber:i,chain:e.chain,contract:"multicall3"});throw new l.ClientChainNotConfiguredError})(),g=("bigint"==typeof i?(0,y.numberToHex)(i):void 0)||s,{schedule:v}=(0,E.createBatchScheduler)({id:`${e.uid}.${g}`,wait:o,shouldSplitBatch:e=>e.reduce((e,{data:t})=>e+(t.length-2),0)>2*r,fn:async t=>{let r=t.map(e=>({allowFailure:!0,callData:e.data,target:e.to})),n=(0,b.encodeFunctionData)({abi:a.multicall3Abi,args:[r],functionName:"aggregate3"}),o=await e.request({method:"eth_call",params:[{...null===h?{data:T({code:u.multicall3Bytecode,data:n})}:{to:h,data:n}},g]});return(0,f.decodeFunctionResult)({abi:a.multicall3Abi,args:[r],functionName:"aggregate3",data:o||"0x"})}}),[{returnData:x,success:w}]=await v({data:c,to:p});if(!w)throw new d.RawContractError({data:x});return"0x"===x?{data:void 0}:{data:x}}function T(e){let{code:t,data:r}=e;return(0,p.encodeDeployData)({abi:(0,n.parseAbi)(["constructor(bytes, bytes)"]),bytecode:u.deploylessCallViaBytecodeBytecode,args:[t,r]})}function A(e){if(!(e instanceof c.BaseError))return;let t=e.walk();return"object"==typeof t?.data?t.data?.data:t.data}},1974:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.createAccessList=c;let n=r(83153),o=r(30769),i=r(76919),a=r(67390),s=r(2148),u=r(13714);async function c(e,t){let{account:r=e.account,blockNumber:c,blockTag:l="latest",blobs:d,data:f,gas:p,gasPrice:b,maxFeePerBlobGas:m,maxFeePerGas:y,maxPriorityFeePerGas:h,to:g,value:v,...E}=t,x=r?(0,n.parseAccount)(r):void 0;try{(0,u.assertRequest)(t);let r="bigint"==typeof c?(0,o.numberToHex)(c):void 0,n=e.chain?.formatters?.transactionRequest?.format,i=(n||s.formatTransactionRequest)({...(0,a.extract)(E,{format:n}),account:x,blobs:d,data:f,gas:p,gasPrice:b,maxFeePerBlobGas:m,maxFeePerGas:y,maxPriorityFeePerGas:h,to:g,value:v},"createAccessList"),w=await e.request({method:"eth_createAccessList",params:[i,r||l]});return{accessList:w.accessList,gasUsed:BigInt(w.gasUsed)}}catch(r){throw(0,i.getCallError)(r,{...t,account:x,chain:e.chain})}}},9845:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.createBlockFilter=o;let n=r(18970);async function o(e){let t=(0,n.createFilterRequestScope)(e,{method:"eth_newBlockFilter"}),r=await e.request({method:"eth_newBlockFilter"});return{id:r,request:t(r),type:"block"}}},94475:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.createContractEventFilter=a;let n=r(19789),o=r(30769),i=r(18970);async function a(e,t){let{address:r,abi:a,args:s,eventName:u,fromBlock:c,strict:l,toBlock:d}=t,f=(0,i.createFilterRequestScope)(e,{method:"eth_newFilter"}),p=u?(0,n.encodeEventTopics)({abi:a,args:s,eventName:u}):void 0,b=await e.request({method:"eth_newFilter",params:[{address:r,fromBlock:"bigint"==typeof c?(0,o.numberToHex)(c):c,toBlock:"bigint"==typeof d?(0,o.numberToHex)(d):d,topics:p}]});return{abi:a,args:s,eventName:u,id:b,request:f(b),strict:!!l,type:"event"}}},77785:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.createEventFilter=a;let n=r(19789),o=r(30769),i=r(18970);async function a(e,{address:t,args:r,event:a,events:s,fromBlock:u,strict:c,toBlock:l}={}){let d=s??(a?[a]:void 0),f=(0,i.createFilterRequestScope)(e,{method:"eth_newFilter"}),p=[];d&&(p=[d.flatMap(e=>(0,n.encodeEventTopics)({abi:[e],eventName:e.name,args:r}))],a&&(p=p[0]));let b=await e.request({method:"eth_newFilter",params:[{address:t,fromBlock:"bigint"==typeof u?(0,o.numberToHex)(u):u,toBlock:"bigint"==typeof l?(0,o.numberToHex)(l):l,...p.length?{topics:p}:{}}]});return{abi:d,args:r,eventName:a?a.name:void 0,fromBlock:u,id:b,request:f(b),strict:!!c,toBlock:l,type:"event"}}},36263:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.createPendingTransactionFilter=o;let n=r(18970);async function o(e){let t=(0,n.createFilterRequestScope)(e,{method:"eth_newPendingTransactionFilter"}),r=await e.request({method:"eth_newPendingTransactionFilter"});return{id:r,request:t(r),type:"transaction"}}},79432:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.estimateContractGas=u;let n=r(83153),o=r(51974),i=r(19930),a=r(54628),s=r(80428);async function u(e,t){let{abi:r,address:u,args:c,functionName:l,dataSuffix:d,...f}=t,p=(0,o.encodeFunctionData)({abi:r,args:c,functionName:l});try{return await (0,a.getAction)(e,s.estimateGas,"estimateGas")({data:`${p}${d?d.replace("0x",""):""}`,to:u,...f})}catch(t){let e=f.account?(0,n.parseAccount)(f.account):void 0;throw(0,i.getContractError)(t,{abi:r,address:u,args:c,docsPath:"/docs/contract/estimateContractGas",functionName:l,sender:e?.address})}}},51736:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.estimateFeesPerGas=u,t.internal_estimateFeesPerGas=c;let n=r(83978),o=r(54628),i=r(31657),a=r(79836),s=r(27411);async function u(e,t){return c(e,t)}async function c(e,t){let{block:r,chain:u=e.chain,request:c,type:l="eip1559"}=t||{},d=await (async()=>"function"==typeof u?.fees?.baseFeeMultiplier?u.fees.baseFeeMultiplier({block:r,client:e,request:c}):u?.fees?.baseFeeMultiplier??1.2)();if(d<1)throw new n.BaseFeeScalarError;let f=10**(d.toString().split(".")[1]?.length??0),p=e=>e*BigInt(Math.ceil(d*f))/BigInt(f),b=r||await (0,o.getAction)(e,a.getBlock,"getBlock")({});if("function"==typeof u?.fees?.estimateFeesPerGas){let t=await u.fees.estimateFeesPerGas({block:r,client:e,multiply:p,request:c,type:l});if(null!==t)return t}if("eip1559"===l){if("bigint"!=typeof b.baseFeePerGas)throw new n.Eip1559FeesNotSupportedError;let t="bigint"==typeof c?.maxPriorityFeePerGas?c.maxPriorityFeePerGas:await (0,i.internal_estimateMaxPriorityFeePerGas)(e,{block:b,chain:u,request:c}),r=p(b.baseFeePerGas);return{maxFeePerGas:c?.maxFeePerGas??r+t,maxPriorityFeePerGas:t}}return{gasPrice:c?.gasPrice??p(await (0,o.getAction)(e,s.getGasPrice,"getGasPrice")({}))}}},80428:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.estimateGas=p;let n=r(83153),o=r(3035),i=r(84218),a=r(30769),s=r(87912),u=r(67390),c=r(2148),l=r(97067),d=r(13714),f=r(52540);async function p(e,t){let{account:r=e.account,prepare:p=!0}=t,b=r?(0,n.parseAccount)(r):void 0,m=Array.isArray(p)?p:b?.type!=="local"?["blobVersionedHashes"]:void 0;try{let r=await (async()=>t.to?t.to:t.authorizationList&&t.authorizationList.length>0?await (0,i.recoverAuthorizationAddress)({authorization:t.authorizationList[0]}).catch(()=>{throw new o.BaseError("`to` is required. Could not infer from `authorizationList`")}):void 0)(),{accessList:n,authorizationList:s,blobs:y,blobVersionedHashes:h,blockNumber:g,blockTag:v,data:E,gas:x,gasPrice:w,maxFeePerBlobGas:P,maxFeePerGas:I,maxPriorityFeePerGas:T,nonce:A,value:O,stateOverride:B,...S}=p?await (0,f.prepareTransactionRequest)(e,{...t,parameters:m,to:r}):t;if(x&&t.gas!==x)return x;let j=("bigint"==typeof g?(0,a.numberToHex)(g):void 0)||v,_=(0,l.serializeStateOverride)(B);(0,d.assertRequest)(t);let M=e.chain?.formatters?.transactionRequest?.format,C=(M||c.formatTransactionRequest)({...(0,u.extract)(S,{format:M}),account:b,accessList:n,authorizationList:s,blobs:y,blobVersionedHashes:h,data:E,gasPrice:w,maxFeePerBlobGas:P,maxFeePerGas:I,maxPriorityFeePerGas:T,nonce:A,to:r,value:O},"estimateGas");return BigInt(await e.request({method:"eth_estimateGas",params:_?[C,j??e.experimental_blockTag??"latest",_]:j?[C,j]:[C]}))}catch(r){throw(0,s.getEstimateGasError)(r,{...t,account:b,chain:e.chain})}}},31657:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.estimateMaxPriorityFeePerGas=u,t.internal_estimateMaxPriorityFeePerGas=c;let n=r(83978),o=r(66877),i=r(54628),a=r(79836),s=r(27411);async function u(e,t){return c(e,t)}async function c(e,t){let{block:r,chain:u=e.chain,request:c}=t||{};try{let t=u?.fees?.maxPriorityFeePerGas??u?.fees?.defaultPriorityFee;if("function"==typeof t){let n=r||await (0,i.getAction)(e,a.getBlock,"getBlock")({}),o=await t({block:n,client:e,request:c});if(null===o)throw Error();return o}if(void 0!==t)return t;let n=await e.request({method:"eth_maxPriorityFeePerGas"});return(0,o.hexToBigInt)(n)}catch{let[t,o]=await Promise.all([r?Promise.resolve(r):(0,i.getAction)(e,a.getBlock,"getBlock")({}),(0,i.getAction)(e,s.getGasPrice,"getGasPrice")({})]);if("bigint"!=typeof t.baseFeePerGas)throw new n.Eip1559FeesNotSupportedError;let u=o-t.baseFeePerGas;if(u<0n)return 0n;return u}}},52223:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.fillTransaction=p;let n=r(83153),o=r(83978),i=r(45157),a=r(67390),s=r(91194),u=r(2148),c=r(54628),l=r(13714),d=r(79836),f=r(57924);async function p(e,t){let{account:r=e.account,accessList:p,authorizationList:b,chain:m=e.chain,blobVersionedHashes:y,blobs:h,data:g,gas:v,gasPrice:E,maxFeePerBlobGas:x,maxFeePerGas:w,maxPriorityFeePerGas:P,nonce:I,nonceManager:T,to:A,type:O,value:B,...S}=t,j=await (async()=>{if(!r||!T||void 0!==I)return I;let t=(0,n.parseAccount)(r),o=m?m.id:await (0,c.getAction)(e,f.getChainId,"getChainId")({});return await T.consume({address:t.address,chainId:o,client:e})})();(0,l.assertRequest)(t);let _=m?.formatters?.transactionRequest?.format,M=(_||u.formatTransactionRequest)({...(0,a.extract)(S,{format:_}),account:r?(0,n.parseAccount)(r):void 0,accessList:p,authorizationList:b,blobs:h,blobVersionedHashes:y,data:g,gas:v,gasPrice:E,maxFeePerBlobGas:x,maxFeePerGas:w,maxPriorityFeePerGas:P,nonce:j,to:A,type:O,value:B},"fillTransaction");try{let r=await e.request({method:"eth_fillTransaction",params:[M]}),n=(m?.formatters?.transaction?.format||s.formatTransaction)(r.tx);delete n.blockHash,delete n.blockNumber,delete n.r,delete n.s,delete n.transactionIndex,delete n.v,delete n.yParity,n.data=n.input,n.gas&&(n.gas=t.gas??n.gas),n.gasPrice&&(n.gasPrice=t.gasPrice??n.gasPrice),n.maxFeePerBlobGas&&(n.maxFeePerBlobGas=t.maxFeePerBlobGas??n.maxFeePerBlobGas),n.maxFeePerGas&&(n.maxFeePerGas=t.maxFeePerGas??n.maxFeePerGas),n.maxPriorityFeePerGas&&(n.maxPriorityFeePerGas=t.maxPriorityFeePerGas??n.maxPriorityFeePerGas),n.nonce&&(n.nonce=t.nonce??n.nonce);let i=await (async()=>{if("function"==typeof m?.fees?.baseFeeMultiplier){let r=await (0,c.getAction)(e,d.getBlock,"getBlock")({});return m.fees.baseFeeMultiplier({block:r,client:e,request:t})}return m?.fees?.baseFeeMultiplier??1.2})();if(i<1)throw new o.BaseFeeScalarError;let a=i.toString().split(".")[1]?.length??0,u=10**a,l=e=>e*BigInt(Math.ceil(i*u))/BigInt(u);return n.maxFeePerGas&&!t.maxFeePerGas&&(n.maxFeePerGas=l(n.maxFeePerGas)),n.gasPrice&&!t.gasPrice&&(n.gasPrice=l(n.gasPrice)),{raw:r.raw,transaction:{from:M.from,...n}}}catch(r){throw(0,i.getTransactionError)(r,{...t,chain:e.chain})}}},15734:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getBalance=o;let n=r(30769);async function o(e,{address:t,blockNumber:r,blockTag:o=e.experimental_blockTag??"latest"}){let i="bigint"==typeof r?(0,n.numberToHex)(r):void 0;return BigInt(await e.request({method:"eth_getBalance",params:[t,i||o]}))}},37220:function(e,t){async function r(e){return BigInt(await e.request({method:"eth_blobBaseFee"}))}Object.defineProperty(t,"__esModule",{value:!0}),t.getBlobBaseFee=r},79836:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getBlock=a;let n=r(36240),o=r(30769),i=r(29476);async function a(e,{blockHash:t,blockNumber:r,blockTag:a=e.experimental_blockTag??"latest",includeTransactions:s}={}){let u=s??!1,c=void 0!==r?(0,o.numberToHex)(r):void 0,l=null;if(!(l=t?await e.request({method:"eth_getBlockByHash",params:[t,u]},{dedupe:!0}):await e.request({method:"eth_getBlockByNumber",params:[c||a,u]},{dedupe:!!c})))throw new n.BlockNotFoundError({blockHash:t,blockNumber:r});return(e.chain?.formatters?.block?.format||i.formatBlock)(l,"getBlock")}},77961:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getBlockNumberCache=function(e){return(0,n.getCache)(o(e))},t.getBlockNumber=i;let n=r(70513),o=e=>`blockNumber.${e}`;async function i(e,{cacheTime:t=e.cacheTime}={}){return BigInt(await (0,n.withCache)(()=>e.request({method:"eth_blockNumber"}),{cacheKey:o(e.uid),cacheTime:t}))}},76046:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getBlockTransactionCount=i;let n=r(66877),o=r(30769);async function i(e,{blockHash:t,blockNumber:r,blockTag:i="latest"}={}){let a;let s=void 0!==r?(0,o.numberToHex)(r):void 0;return a=t?await e.request({method:"eth_getBlockTransactionCountByHash",params:[t]},{dedupe:!0}):await e.request({method:"eth_getBlockTransactionCountByNumber",params:[s||i]},{dedupe:!!s}),(0,n.hexToNumber)(a)}},57924:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getChainId=o;let n=r(66877);async function o(e){let t=await e.request({method:"eth_chainId"},{dedupe:!0});return(0,n.hexToNumber)(t)}},76516:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getCode=o;let n=r(30769);async function o(e,{address:t,blockNumber:r,blockTag:o="latest"}){let i=void 0!==r?(0,n.numberToHex)(r):void 0,a=await e.request({method:"eth_getCode",params:[t,i||o]},{dedupe:!!i});if("0x"!==a)return a}},37018:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getContractEvents=a;let n=r(52396),o=r(54628),i=r(64934);async function a(e,t){let{abi:r,address:a,args:s,blockHash:u,eventName:c,fromBlock:l,toBlock:d,strict:f}=t,p=c?(0,n.getAbiItem)({abi:r,name:c}):void 0,b=p?void 0:r.filter(e=>"event"===e.type);return(0,o.getAction)(e,i.getLogs,"getLogs")({address:a,args:s,blockHash:u,event:p,events:b,fromBlock:l,toBlock:d,strict:f})}},58296:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getEip712Domain=a;let n=r(37466),o=r(54628),i=r(51693);async function a(e,t){let{address:r,factory:a,factoryData:u}=t;try{let[t,n,c,l,d,f,p]=await (0,o.getAction)(e,i.readContract,"readContract")({abi:s,address:r,functionName:"eip712Domain",factory:a,factoryData:u});return{domain:{name:n,version:c,chainId:Number(l),verifyingContract:d,salt:f},extensions:p,fields:t}}catch(e){if("ContractFunctionExecutionError"===e.name&&"ContractFunctionZeroDataError"===e.cause.name)throw new n.Eip712DomainNotFoundError({address:r});throw e}}let s=[{inputs:[],name:"eip712Domain",outputs:[{name:"fields",type:"bytes1"},{name:"name",type:"string"},{name:"version",type:"string"},{name:"chainId",type:"uint256"},{name:"verifyingContract",type:"address"},{name:"salt",type:"bytes32"},{name:"extensions",type:"uint256[]"}],stateMutability:"view",type:"function"}]},12743:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getFeeHistory=i;let n=r(30769),o=r(35041);async function i(e,{blockCount:t,blockNumber:r,blockTag:i="latest",rewardPercentiles:a}){let s="bigint"==typeof r?(0,n.numberToHex)(r):void 0,u=await e.request({method:"eth_feeHistory",params:[(0,n.numberToHex)(t),s||i,a]},{dedupe:!!s});return(0,o.formatFeeHistory)(u)}},15925:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getFilterChanges=i;let n=r(11066),o=r(99154);async function i(e,{filter:t}){let r="strict"in t&&t.strict,i=await t.request({method:"eth_getFilterChanges",params:[t.id]});if("string"==typeof i[0])return i;let a=i.map(e=>(0,o.formatLog)(e));return"abi"in t&&t.abi?(0,n.parseEventLogs)({abi:t.abi,logs:a,strict:r}):a}},8606:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getFilterLogs=i;let n=r(11066),o=r(99154);async function i(e,{filter:t}){let r=t.strict??!1,i=(await t.request({method:"eth_getFilterLogs",params:[t.id]})).map(e=>(0,o.formatLog)(e));return t.abi?(0,n.parseEventLogs)({abi:t.abi,logs:i,strict:r}):i}},27411:function(e,t){async function r(e){return BigInt(await e.request({method:"eth_gasPrice"}))}Object.defineProperty(t,"__esModule",{value:!0}),t.getGasPrice=r},64934:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getLogs=s;let n=r(19789),o=r(11066),i=r(30769),a=r(99154);async function s(e,{address:t,blockHash:r,fromBlock:s,toBlock:u,event:c,events:l,args:d,strict:f}={}){let p=l??(c?[c]:void 0),b=[];p&&(b=[p.flatMap(e=>(0,n.encodeEventTopics)({abi:[e],eventName:e.name,args:l?void 0:d}))],c&&(b=b[0]));let m=(r?await e.request({method:"eth_getLogs",params:[{address:t,topics:b,blockHash:r}]}):await e.request({method:"eth_getLogs",params:[{address:t,topics:b,fromBlock:"bigint"==typeof s?(0,i.numberToHex)(s):s,toBlock:"bigint"==typeof u?(0,i.numberToHex)(u):u}]})).map(e=>(0,a.formatLog)(e));return p?(0,o.parseEventLogs)({abi:p,args:d,logs:m,strict:f??!1}):m}},60891:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getProof=i;let n=r(30769),o=r(94407);async function i(e,{address:t,blockNumber:r,blockTag:i,storageKeys:a}){let s=void 0!==r?(0,n.numberToHex)(r):void 0,u=await e.request({method:"eth_getProof",params:[t,a,s||(i??"latest")]});return(0,o.formatProof)(u)}},88011:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getStorageAt=o;let n=r(30769);async function o(e,{address:t,blockNumber:r,blockTag:o="latest",slot:i}){let a=void 0!==r?(0,n.numberToHex)(r):void 0;return await e.request({method:"eth_getStorageAt",params:[t,i,a||o]})}},30519:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getTransaction=a;let n=r(29896),o=r(30769),i=r(91194);async function a(e,{blockHash:t,blockNumber:r,blockTag:a,hash:s,index:u,sender:c,nonce:l}){let d=a||"latest",f=void 0!==r?(0,o.numberToHex)(r):void 0,p=null;if(s?p=await e.request({method:"eth_getTransactionByHash",params:[s]},{dedupe:!0}):t?p=await e.request({method:"eth_getTransactionByBlockHashAndIndex",params:[t,(0,o.numberToHex)(u)]},{dedupe:!0}):(f||d)&&"number"==typeof u?p=await e.request({method:"eth_getTransactionByBlockNumberAndIndex",params:[f||d,(0,o.numberToHex)(u)]},{dedupe:!!f}):c&&"number"==typeof l&&(p=await e.request({method:"eth_getTransactionBySenderAndNonce",params:[c,(0,o.numberToHex)(l)]},{dedupe:!0})),!p)throw new n.TransactionNotFoundError({blockHash:t,blockNumber:r,blockTag:d,hash:s,index:u});return(e.chain?.formatters?.transaction?.format||i.formatTransaction)(p,"getTransaction")}},49765:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getTransactionConfirmations=a;let n=r(54628),o=r(77961),i=r(30519);async function a(e,{hash:t,transactionReceipt:r}){let[a,s]=await Promise.all([(0,n.getAction)(e,o.getBlockNumber,"getBlockNumber")({}),t?(0,n.getAction)(e,i.getTransaction,"getTransaction")({hash:t}):void 0]),u=r?.blockNumber||s?.blockNumber;return u?a-u+1n:0n}},53335:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getTransactionCount=i;let n=r(66877),o=r(30769);async function i(e,{address:t,blockTag:r="latest",blockNumber:i}){let a=await e.request({method:"eth_getTransactionCount",params:[t,"bigint"==typeof i?(0,o.numberToHex)(i):r]},{dedupe:!!i});return(0,n.hexToNumber)(a)}},77981:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getTransactionReceipt=i;let n=r(29896),o=r(43003);async function i(e,{hash:t}){let r=await e.request({method:"eth_getTransactionReceipt",params:[t]},{dedupe:!0});if(!r)throw new n.TransactionReceiptNotFoundError({hash:t});return(e.chain?.formatters?.transactionReceipt?.format||o.formatTransactionReceipt)(r,"getTransactionReceipt")}},24173:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.multicall=b;let n=r(73579),o=r(22530),i=r(21837),a=r(3035),s=r(78924),u=r(13632),c=r(51974),l=r(79810),d=r(19930),f=r(54628),p=r(51693);async function b(e,t){let{account:r,authorizationList:b,allowFailure:m=!0,blockNumber:y,blockOverrides:h,blockTag:g,stateOverride:v}=t,E=t.contracts,{batchSize:x=t.batchSize??1024,deployless:w=t.deployless??!1}="object"==typeof e.batch?.multicall?e.batch.multicall:{},P=(()=>{if(t.multicallAddress)return t.multicallAddress;if(w)return null;if(e.chain)return(0,l.getChainContractAddress)({blockNumber:y,chain:e.chain,contract:"multicall3"});throw Error("client chain not configured. multicallAddress is required.")})(),I=[[]],T=0,A=0;for(let e=0;e0&&A>x&&I[T].length>0&&(T++,A=(e.length-2)/2,I[T]=[]),I[T]=[...I[T],{allowFailure:!0,callData:e,target:n}]}catch(a){let e=(0,d.getContractError)(a,{abi:t,address:n,args:o,docsPath:"/docs/contract/multicall",functionName:i,sender:r});if(!m)throw e;I[T]=[...I[T],{allowFailure:!0,callData:"0x",target:n}]}}let O=await Promise.allSettled(I.map(t=>(0,f.getAction)(e,p.readContract,"readContract")({...null===P?{code:o.multicall3Bytecode}:{address:P},abi:n.multicall3Abi,account:r,args:[t],authorizationList:b,blockNumber:y,blockOverrides:h,blockTag:g,functionName:"aggregate3",stateOverride:v}))),B=[];for(let e=0;e{let t=e.account?(0,o.parseAccount)(e.account):void 0,r=e.abi?(0,c.encodeFunctionData)(e):e.data,n={...e,account:t,data:e.dataSuffix?(0,l.concat)([r||"0x",e.dataSuffix]):r,from:e.from??t?.address};return(0,g.assertRequest)(n),(0,y.formatTransactionRequest)(n)}),a=e.stateOverrides?(0,h.serializeStateOverride)(e.stateOverrides):void 0;t.push({blockOverrides:r,calls:i,stateOverrides:a})}let s="bigint"==typeof r?(0,d.numberToHex)(r):void 0;return(await e.request({method:"eth_simulateV1",params:[{blockStateCalls:t,returnFullTransactions:x,traceTransfers:w,validation:P},s||v]})).map((e,t)=>({...(0,b.formatBlock)(e),calls:e.calls.map((e,r)=>{let{abi:n,args:o,functionName:s,to:c}=E[t].calls[r],l=e.error?.data??e.returnData,d=BigInt(e.gasUsed),p=e.logs?.map(e=>m.formatLog(e)),b="0x1"===e.status?"success":"failure",y=n&&"success"===b&&"0x"!==l?(0,u.decodeFunctionResult)({abi:n,data:l,functionName:s}):null,h=(()=>{let t;if("success"!==b&&(e.error?.data==="0x"?t=new i.AbiDecodingZeroDataError:e.error&&(t=new a.RawContractError(e.error)),t))return(0,f.getContractError)(t,{abi:n??[],address:c??"0x",args:o,functionName:s??""})})();return{data:l,gasUsed:d,logs:p,status:b,..."success"===b?{result:y}:{error:h}}})}))}catch(t){let e=(0,p.getNodeError)(t,{});if(e instanceof s.UnknownNodeError)throw t;throw e}}},53162:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.simulateCalls=p;let n=r(9068),o=r(10717),i=r(83153),a=r(96784),s=r(22530),u=r(3035),c=r(51974),l=r(50303),d=r(1974),f=r(52883);async function p(e,t){let{blockNumber:r,blockTag:p,calls:b,stateOverrides:m,traceAssetChanges:y,traceTransfers:h,validation:g}=t,v=t.account?(0,i.parseAccount)(t.account):void 0;if(y&&!v)throw new u.BaseError("`account` is required when `traceAssetChanges` is true");let E=v?n.encode(n.from("constructor(bytes, bytes)"),{bytecode:s.deploylessCallViaBytecodeBytecode,args:["0x6080604052348015600e575f80fd5b5061016d8061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063f8b2cb4f1461002d575b5f80fd5b610047600480360381019061004291906100db565b61005d565b604051610054919061011e565b60405180910390f35b5f8173ffffffffffffffffffffffffffffffffffffffff16319050919050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100aa82610081565b9050919050565b6100ba816100a0565b81146100c4575f80fd5b50565b5f813590506100d5816100b1565b92915050565b5f602082840312156100f0576100ef61007d565b5b5f6100fd848285016100c7565b91505092915050565b5f819050919050565b61011881610106565b82525050565b5f6020820190506101315f83018461010f565b9291505056fea26469706673582212203b9fe929fe995c7cf9887f0bdba8a36dd78e8b73f149b17d2d9ad7cd09d2dc6264736f6c634300081a0033",o.encodeData(o.from("function getBalance(address)"),[v.address])]}):void 0,x=y?await Promise.all(t.calls.map(async t=>{if(!t.data&&!t.abi)return;let{accessList:r}=await (0,d.createAccessList)(e,{account:v.address,...t,data:t.abi?(0,c.encodeFunctionData)(t):t.data});return r.map(({address:e,storageKeys:t})=>t.length>0?e:null)})).then(e=>e.flat().filter(Boolean)):[],w=await (0,f.simulateBlocks)(e,{blockNumber:r,blockTag:p,blocks:[...y?[{calls:[{data:E}],stateOverrides:m},{calls:x.map((e,t)=>({abi:[o.from("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[v.address],to:e,from:a.zeroAddress,nonce:t})),stateOverrides:[{address:a.zeroAddress,nonce:0}]}]:[],{calls:[...b,{}].map(e=>({...e,from:v?.address})),stateOverrides:m},...y?[{calls:[{data:E}]},{calls:x.map((e,t)=>({abi:[o.from("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[v.address],to:e,from:a.zeroAddress,nonce:t})),stateOverrides:[{address:a.zeroAddress,nonce:0}]},{calls:x.map((e,t)=>({to:e,abi:[o.from("function decimals() returns (uint256)")],functionName:"decimals",from:a.zeroAddress,nonce:t})),stateOverrides:[{address:a.zeroAddress,nonce:0}]},{calls:x.map((e,t)=>({to:e,abi:[o.from("function tokenURI(uint256) returns (string)")],functionName:"tokenURI",args:[0n],from:a.zeroAddress,nonce:t})),stateOverrides:[{address:a.zeroAddress,nonce:0}]},{calls:x.map((e,t)=>({to:e,abi:[o.from("function symbol() returns (string)")],functionName:"symbol",from:a.zeroAddress,nonce:t})),stateOverrides:[{address:a.zeroAddress,nonce:0}]}]:[]],traceTransfers:h,validation:g}),P=y?w[2]:w[0],[I,T,,A,O,B,S,j]=y?w:[],{calls:_,...M}=P,C=_.slice(0,-1)??[],R=[...I?.calls??[],...T?.calls??[]].map(e=>"success"===e.status?(0,l.hexToBigInt)(e.data):null),k=[...A?.calls??[],...O?.calls??[]].map(e=>"success"===e.status?(0,l.hexToBigInt)(e.data):null),F=(B?.calls??[]).map(e=>"success"===e.status?e.result:null),N=(j?.calls??[]).map(e=>"success"===e.status?e.result:null),H=(S?.calls??[]).map(e=>"success"===e.status?e.result:null),U=[];for(let[e,t]of k.entries()){let r=R[e];if("bigint"!=typeof t||"bigint"!=typeof r)continue;let n=F[e-1],o=N[e-1],i=H[e-1],s=0===e?{address:a.ethAddress,decimals:18,symbol:"ETH"}:{address:x[e-1],decimals:i||n?Number(n??1):void 0,symbol:o??void 0};U.some(e=>e.token.address===s.address)||U.push({token:s,value:{pre:r,post:t,diff:t-r}})}return{assetChanges:U,block:M,results:C}}},7604:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.simulateContract=c;let n=r(83153),o=r(13632),i=r(51974),a=r(19930),s=r(54628),u=r(92137);async function c(e,t){let{abi:r,address:c,args:l,dataSuffix:d,functionName:f,...p}=t,b=p.account?(0,n.parseAccount)(p.account):e.account,m=(0,i.encodeFunctionData)({abi:r,args:l,functionName:f});try{let{data:n}=await (0,s.getAction)(e,u.call,"call")({batch:!1,data:`${m}${d?d.replace("0x",""):""}`,to:c,...p,account:b}),i=(0,o.decodeFunctionResult)({abi:r,args:l,functionName:f,data:n||"0x"}),a=r.filter(e=>"name"in e&&e.name===t.functionName);return{result:i,request:{abi:a,address:c,args:l,dataSuffix:d,functionName:f,...p,account:b}}}catch(e){throw(0,a.getContractError)(e,{abi:r,address:c,args:l,docsPath:"/docs/contract/simulateContract",functionName:f,sender:b?.address})}}},39629:function(e,t){async function r(e,{filter:t}){return t.request({method:"eth_uninstallFilter",params:[t.id]})}Object.defineProperty(t,"__esModule",{value:!0}),t.uninstallFilter=r},15535:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.verifyHash=P,t.verifyErc8010=I,t.verifyErc1271=A;let n=r(99197),o=r(31225),i=r(73579),a=r(22530),s=r(78924),u=r(26573),c=r(51974),l=r(37743),d=r(70843),f=r(77352),p=r(22458),b=r(49706),m=r(66877),y=r(30769),h=r(54628),g=r(6271),v=r(89762),E=r(92137),x=r(76516),w=r(51693);async function P(e,t){let{address:r,hash:n,erc6492VerifierAddress:i=t.universalSignatureVerifierAddress??e.chain?.contracts?.erc6492Verifier?.address,multicallAddress:a=t.multicallAddress??e.chain?.contracts?.multicall3?.address}=t,s=(()=>{let e=t.signature;return(0,b.isHex)(e)?e:"object"==typeof e&&"r"in e&&"s"in e?(0,v.serializeSignature)(e):(0,y.bytesToHex)(e)})();try{if(o.SignatureErc8010.validate(s))return await I(e,{...t,multicallAddress:a,signature:s});return await T(e,{...t,verifierAddress:i,signature:s})}catch(e){try{if((0,d.isAddressEqual)((0,l.getAddress)(r),await (0,g.recoverAddress)({hash:n,signature:s})))return!0}catch{}if(e instanceof O)return!1;throw e}}async function I(e,t){let{address:r,blockNumber:n,blockTag:s,hash:u,multicallAddress:l}=t,{authorization:d,data:b,signature:m,to:g}=o.SignatureErc8010.unwrap(t.signature);if(await (0,x.getCode)(e,{address:r,blockNumber:n,blockTag:s})===(0,p.concatHex)(["0xef0100",d.address]))return await A(e,{address:r,blockNumber:n,blockTag:s,hash:u,signature:m});let v={address:d.address,chainId:Number(d.chainId),nonce:Number(d.nonce),r:(0,y.numberToHex)(d.r,{size:32}),s:(0,y.numberToHex)(d.s,{size:32}),yParity:d.yParity};if(!await (0,f.verifyAuthorization)({address:r,authorization:v}))throw new O;let E=await (0,h.getAction)(e,w.readContract,"readContract")({...l?{address:l}:{code:a.multicall3Bytecode},authorizationList:[v],abi:i.multicall3Abi,blockNumber:n,blockTag:"pending",functionName:"aggregate3",args:[[...b?[{allowFailure:!0,target:g??r,callData:b}]:[],{allowFailure:!0,target:r,callData:(0,c.encodeFunctionData)({abi:i.erc1271Abi,functionName:"isValidSignature",args:[u,m]})}]]}),P=E[E.length-1]?.returnData;if(P?.startsWith("0x1626ba7e"))return!0;throw new O}async function T(e,t){let{address:r,factory:o,factoryData:l,hash:d,signature:f,verifierAddress:p,...b}=t,y=await (async()=>!o&&!l||n.SignatureErc6492.validate(f)?f:n.SignatureErc6492.wrap({data:l,signature:f,to:o}))(),g=p?{to:p,data:(0,c.encodeFunctionData)({abi:i.erc6492SignatureValidatorAbi,functionName:"isValidSig",args:[r,d,y]}),...b}:{data:(0,u.encodeDeployData)({abi:i.erc6492SignatureValidatorAbi,args:[r,d,y],bytecode:a.erc6492SignatureValidatorByteCode}),...b},{data:v}=await (0,h.getAction)(e,E.call,"call")(g).catch(e=>{if(e instanceof s.CallExecutionError)throw new O;throw e});if((0,m.hexToBool)(v??"0x0"))return!0;throw new O}async function A(e,t){let{address:r,blockNumber:n,blockTag:o,hash:a,signature:u}=t;if((await (0,h.getAction)(e,w.readContract,"readContract")({address:r,abi:i.erc1271Abi,args:[a,u],blockNumber:n,blockTag:o,functionName:"isValidSignature"}).catch(e=>{if(e instanceof s.ContractFunctionExecutionError)throw new O;throw e})).startsWith("0x1626ba7e"))return!0;throw new O}class O extends Error{}},52412:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.verifyMessage=a;let n=r(54628),o=r(34769),i=r(15535);async function a(e,{address:t,message:r,factory:a,factoryData:s,signature:u,...c}){let l=(0,o.hashMessage)(r);return(0,n.getAction)(e,i.verifyHash,"verifyHash")({address:t,factory:a,factoryData:s,hash:l,signature:u,...c})}},98045:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.verifyTypedData=a;let n=r(54628),o=r(38445),i=r(15535);async function a(e,t){let{address:r,factory:a,factoryData:s,signature:u,message:c,primaryType:l,types:d,domain:f,...p}=t,b=(0,o.hashTypedData)({message:c,primaryType:l,types:d,domain:f});return(0,n.getAction)(e,i.verifyHash,"verifyHash")({address:r,factory:a,factoryData:s,hash:b,signature:u,...p})}},37351:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.waitForTransactionReceipt=b;let n=r(36240),o=r(29896),i=r(54628),a=r(39102),s=r(55934),u=r(96055),c=r(71156),l=r(79836),d=r(30519),f=r(77981),p=r(73435);async function b(e,t){let r,b,m,y,h;let{checkReplacement:g=!0,confirmations:v=1,hash:E,onReplaced:x,retryCount:w=6,retryDelay:P=({count:e})=>200*~~(1<{h?.(),y?.(),j(new o.WaitForTransactionReceiptTimeoutError({hash:E}))},I):void 0;return y=(0,a.observe)(T,{onReplaced:x,resolve:S,reject:j},async t=>{if((m=await (0,i.getAction)(e,f.getTransactionReceipt,"getTransactionReceipt")({hash:E}).catch(()=>void 0))&&v<=1){clearTimeout(_),t.resolve(m),y?.();return}h=(0,i.getAction)(e,p.watchBlockNumber,"watchBlockNumber")({emitMissed:!0,emitOnBegin:!0,poll:!0,pollingInterval:A,async onBlockNumber(a){let s=e=>{clearTimeout(_),h?.(),e(),y?.()},c=a;if(!O)try{if(m){if(v>1&&(!m.blockNumber||c-m.blockNumber+1nt.resolve(m));return}if(g&&!r&&(O=!0,await (0,u.withRetry)(async()=>{(r=await (0,i.getAction)(e,d.getTransaction,"getTransaction")({hash:E})).blockNumber&&(c=r.blockNumber)},{delay:P,retryCount:w}),O=!1),m=await (0,i.getAction)(e,f.getTransactionReceipt,"getTransactionReceipt")({hash:E}),v>1&&(!m.blockNumber||c-m.blockNumber+1nt.resolve(m))}catch(a){if(a instanceof o.TransactionNotFoundError||a instanceof o.TransactionReceiptNotFoundError){if(!r){O=!1;return}try{b=r,O=!0;let o=await (0,u.withRetry)(()=>(0,i.getAction)(e,l.getBlock,"getBlock")({blockNumber:c,includeTransactions:!0}),{delay:P,retryCount:w,shouldRetry:({error:e})=>e instanceof n.BlockNotFoundError});O=!1;let a=o.transactions.find(({from:e,nonce:t})=>e===b.from&&t===b.nonce);if(!a||(m=await (0,i.getAction)(e,f.getTransactionReceipt,"getTransactionReceipt")({hash:a.hash}),v>1&&(!m.blockNumber||c-m.blockNumber+1n{t.onReplaced?.({reason:d,replacedTransaction:b,transaction:a,transactionReceipt:m}),t.resolve(m)})}catch(e){s(()=>t.reject(e))}}else s(()=>t.reject(a))}}})}),B}},73435:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.watchBlockNumber=function(e,{emitOnBegin:t=!1,emitMissed:r=!1,onBlockNumber:c,onError:l,poll:d,pollingInterval:f=e.pollingInterval}){let p;return(void 0!==d?d:"webSocket"!==e.transport.type&&"ipc"!==e.transport.type&&("fallback"!==e.transport.type||"webSocket"!==e.transport.transports[0].config.type&&"ipc"!==e.transport.transports[0].config.type))?(()=>{let n=(0,s.stringify)(["watchBlockNumber",e.uid,t,r,f]);return(0,i.observe)(n,{onBlockNumber:c,onError:l},n=>(0,a.poll)(async()=>{try{let t=await (0,o.getAction)(e,u.getBlockNumber,"getBlockNumber")({cacheTime:0});if(void 0!==p){if(t===p)return;if(t-p>1&&r)for(let e=p+1n;ep)&&(n.onBlockNumber(t,p),p=t)}catch(e){n.onError?.(e)}},{emitOnBegin:t,interval:f}))})():(()=>{let o=(0,s.stringify)(["watchBlockNumber",e.uid,t,r]);return(0,i.observe)(o,{onBlockNumber:c,onError:l},t=>{let r=!0,o=()=>r=!1;return(async()=>{try{let i=(()=>{if("fallback"===e.transport.type){let t=e.transport.transports.find(e=>"webSocket"===e.config.type||"ipc"===e.config.type);return t?t.value:e.transport}return e.transport})(),{unsubscribe:a}=await i.subscribe({params:["newHeads"],onData(e){if(!r)return;let o=(0,n.hexToBigInt)(e.result?.number);t.onBlockNumber(o,p),p=o},onError(e){t.onError?.(e)}});o=a,r||o()}catch(e){l?.(e)}})(),()=>o()})})()};let n=r(66877),o=r(54628),i=r(39102),a=r(52258),s=r(71156),u=r(77961)},25911:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.watchBlocks=function(e,{blockTag:t=e.experimental_blockTag??"latest",emitMissed:r=!1,emitOnBegin:u=!1,onBlock:c,onError:l,includeTransactions:d,poll:f,pollingInterval:p=e.pollingInterval}){let b,m,y,h;let g=void 0!==f?f:"webSocket"!==e.transport.type&&"ipc"!==e.transport.type&&("fallback"!==e.transport.type||"webSocket"!==e.transport.transports[0].config.type&&"ipc"!==e.transport.transports[0].config.type),v=d??!1;return g?(()=>{let d=(0,a.stringify)(["watchBlocks",e.uid,t,r,u,v,p]);return(0,o.observe)(d,{onBlock:c,onError:l},o=>(0,i.poll)(async()=>{try{let i=await (0,n.getAction)(e,s.getBlock,"getBlock")({blockTag:t,includeTransactions:v});if(null!==i.number&&b?.number!=null){if(i.number===b.number)return;if(i.number-b.number>1&&r)for(let t=b?.number+1n;tb.number)&&(o.onBlock(i,b),b=i)}catch(e){o.onError?.(e)}},{emitOnBegin:u,interval:p}))})():(m=!0,y=!0,h=()=>m=!1,(async()=>{try{u&&(0,n.getAction)(e,s.getBlock,"getBlock")({blockTag:t,includeTransactions:v}).then(e=>{m&&y&&(c(e,void 0),y=!1)}).catch(l);let r=(()=>{if("fallback"===e.transport.type){let t=e.transport.transports.find(e=>"webSocket"===e.config.type||"ipc"===e.config.type);return t?t.value:e.transport}return e.transport})(),{unsubscribe:o}=await r.subscribe({params:["newHeads"],async onData(t){if(!m)return;let r=await (0,n.getAction)(e,s.getBlock,"getBlock")({blockNumber:t.result?.number,includeTransactions:v}).catch(()=>{});m&&(c(r,b),y=!1,b=r)},onError(e){l?.(e)}});h=o,m||h()}catch(e){l?.(e)}})(),()=>h())};let n=r(54628),o=r(39102),i=r(52258),a=r(71156),s=r(79836)},23619:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.watchContractEvent=function(e,t){let{abi:r,address:h,args:g,batch:v=!0,eventName:E,fromBlock:x,onError:w,onLogs:P,poll:I,pollingInterval:T=e.pollingInterval,strict:A}=t;return(void 0!==I?I:"bigint"==typeof x||"webSocket"!==e.transport.type&&"ipc"!==e.transport.type&&("fallback"!==e.transport.type||"webSocket"!==e.transport.transports[0].config.type&&"ipc"!==e.transport.transports[0].config.type))?(()=>{let t=A??!1,n=(0,d.stringify)(["watchContractEvent",h,g,v,e.uid,E,T,t,x]);return(0,c.observe)(n,{onLogs:P,onError:w},n=>{let i,a;void 0!==x&&(i=x-1n);let s=!1,c=(0,l.poll)(async()=>{if(!s){try{a=await (0,u.getAction)(e,f.createContractEventFilter,"createContractEventFilter")({abi:r,address:h,args:g,eventName:E,strict:t,fromBlock:x})}catch{}s=!0;return}try{let o;if(a)o=await (0,u.getAction)(e,m.getFilterChanges,"getFilterChanges")({filter:a});else{let n=await (0,u.getAction)(e,p.getBlockNumber,"getBlockNumber")({});o=i&&i{a&&await (0,u.getAction)(e,y.uninstallFilter,"uninstallFilter")({filter:a}),c()}})})():(()=>{let t=(0,d.stringify)(["watchContractEvent",h,g,v,e.uid,E,T,A??!1]),o=!0,u=()=>o=!1;return(0,c.observe)(t,{onLogs:P,onError:w},t=>((async()=>{try{let c=(()=>{if("fallback"===e.transport.type){let t=e.transport.transports.find(e=>"webSocket"===e.config.type||"ipc"===e.config.type);return t?t.value:e.transport}return e.transport})(),l=E?(0,a.encodeEventTopics)({abi:r,eventName:E,args:g}):[],{unsubscribe:d}=await c.subscribe({params:["logs",{address:h,topics:l}],onData(e){if(!o)return;let a=e.result;try{let{eventName:e,args:n}=(0,i.decodeEventLog)({abi:r,data:a.data,topics:a.topics,strict:A}),o=(0,s.formatLog)(a,{args:n,eventName:e});t.onLogs([o])}catch(i){let e,r;if(i instanceof n.DecodeLogDataMismatch||i instanceof n.DecodeLogTopicsMismatch){if(A)return;e=i.abiItem.name,r=i.abiItem.inputs?.some(e=>!("name"in e&&e.name))}let o=(0,s.formatLog)(a,{args:r?[]:{},eventName:e});t.onLogs([o])}},onError(e){t.onError?.(e)}});u=d,o||u()}catch(e){w?.(e)}})(),()=>u()))})()};let n=r(21837),o=r(23635),i=r(94371),a=r(19789),s=r(99154),u=r(54628),c=r(39102),l=r(52258),d=r(71156),f=r(94475),p=r(77961),b=r(37018),m=r(15925),y=r(39629)},80109:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.watchEvent=function(e,{address:t,args:r,batch:h=!0,event:g,events:v,fromBlock:E,onError:x,onLogs:w,poll:P,pollingInterval:I=e.pollingInterval,strict:T}){let A,O;let B=void 0!==P?P:"bigint"==typeof E||"webSocket"!==e.transport.type&&"ipc"!==e.transport.type&&("fallback"!==e.transport.type||"webSocket"!==e.transport.transports[0].config.type&&"ipc"!==e.transport.transports[0].config.type),S=T??!1;return B?(()=>{let n=(0,d.stringify)(["watchEvent",t,r,h,e.uid,g,I,E]);return(0,c.observe)(n,{onLogs:w,onError:x},n=>{let i,a;void 0!==E&&(i=E-1n);let s=!1,c=(0,l.poll)(async()=>{if(!s){try{a=await (0,u.getAction)(e,f.createEventFilter,"createEventFilter")({address:t,args:r,event:g,events:v,strict:S,fromBlock:E})}catch{}s=!0;return}try{let o;if(a)o=await (0,u.getAction)(e,b.getFilterChanges,"getFilterChanges")({filter:a});else{let n=await (0,u.getAction)(e,p.getBlockNumber,"getBlockNumber")({});o=i&&i!==n?await (0,u.getAction)(e,m.getLogs,"getLogs")({address:t,args:r,event:g,events:v,fromBlock:i+1n,toBlock:n}):[],i=n}if(0===o.length)return;if(h)n.onLogs(o);else for(let e of o)n.onLogs([e])}catch(e){a&&e instanceof o.InvalidInputRpcError&&(s=!1),n.onError?.(e)}},{emitOnBegin:!0,interval:I});return async()=>{a&&await (0,u.getAction)(e,y.uninstallFilter,"uninstallFilter")({filter:a}),c()}})})():(A=!0,O=()=>A=!1,(async()=>{try{let o=(()=>{if("fallback"===e.transport.type){let t=e.transport.transports.find(e=>"webSocket"===e.config.type||"ipc"===e.config.type);return t?t.value:e.transport}return e.transport})(),u=v??(g?[g]:void 0),c=[];u&&(c=[u.flatMap(e=>(0,a.encodeEventTopics)({abi:[e],eventName:e.name,args:r}))],g&&(c=c[0]));let{unsubscribe:l}=await o.subscribe({params:["logs",{address:t,topics:c}],onData(e){if(!A)return;let t=e.result;try{let{eventName:e,args:r}=(0,i.decodeEventLog)({abi:u??[],data:t.data,topics:t.topics,strict:S}),n=(0,s.formatLog)(t,{args:r,eventName:e});w([n])}catch(i){let e,r;if(i instanceof n.DecodeLogDataMismatch||i instanceof n.DecodeLogTopicsMismatch){if(T)return;e=i.abiItem.name,r=i.abiItem.inputs?.some(e=>!("name"in e&&e.name))}let o=(0,s.formatLog)(t,{args:r?[]:{},eventName:e});w([o])}},onError(e){x?.(e)}});O=l,A||O()}catch(e){x?.(e)}})(),()=>O())};let n=r(21837),o=r(23635),i=r(94371),a=r(19789),s=r(99154),u=r(54628),c=r(39102),l=r(52258),d=r(71156),f=r(77785),p=r(77961),b=r(15925),m=r(64934),y=r(39629)},43868:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.watchPendingTransactions=function(e,{batch:t=!0,onError:r,onTransactions:l,poll:d,pollingInterval:f=e.pollingInterval}){let p,b;return(void 0!==d?d:"webSocket"!==e.transport.type&&"ipc"!==e.transport.type)?(()=>{let d=(0,a.stringify)(["watchPendingTransactions",e.uid,t,f]);return(0,o.observe)(d,{onTransactions:l,onError:r},r=>{let o;let a=(0,i.poll)(async()=>{try{if(!o)try{o=await (0,n.getAction)(e,s.createPendingTransactionFilter,"createPendingTransactionFilter")({});return}catch(e){throw a(),e}let i=await (0,n.getAction)(e,u.getFilterChanges,"getFilterChanges")({filter:o});if(0===i.length)return;if(t)r.onTransactions(i);else for(let e of i)r.onTransactions([e])}catch(e){r.onError?.(e)}},{emitOnBegin:!0,interval:f});return async()=>{o&&await (0,n.getAction)(e,c.uninstallFilter,"uninstallFilter")({filter:o}),a()}})})():(p=!0,b=()=>p=!1,(async()=>{try{let{unsubscribe:t}=await e.transport.subscribe({params:["newPendingTransactions"],onData(e){if(!p)return;let t=e.result;l([t])},onError(e){r?.(e)}});b=t,p||b()}catch(e){r?.(e)}})(),()=>b())};let n=r(54628),o=r(39102),i=r(52258),a=r(71156),s=r(36263),u=r(15925),c=r(39629)},66358:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.verifySiweMessage=s;let n=r(34769),o=r(83965),i=r(28224),a=r(15535);async function s(e,t){let{address:r,domain:s,message:u,nonce:c,scheme:l,signature:d,time:f=new Date,...p}=t,b=(0,o.parseSiweMessage)(u);if(!b.address||!(0,i.validateSiweMessage)({address:r,domain:s,message:b,nonce:c,scheme:l,time:f}))return!1;let m=(0,n.hashMessage)(u);return(0,a.verifyHash)(e,{address:b.address,hash:m,signature:d,...p})}},97589:function(e,t){async function r(e,{hash:t}){await e.request({method:`${e.mode}_dropTransaction`,params:[t]})}Object.defineProperty(t,"__esModule",{value:!0}),t.dropTransaction=r},24434:function(e,t){async function r(e){return e.request({method:`${e.mode}_dumpState`})}Object.defineProperty(t,"__esModule",{value:!0}),t.dumpState=r},67876:function(e,t){async function r(e){return"ganache"===e.mode?await e.request({method:"eth_mining"}):await e.request({method:`${e.mode}_getAutomine`})}Object.defineProperty(t,"__esModule",{value:!0}),t.getAutomine=r},10299:function(e,t){async function r(e){return await e.request({method:"txpool_content"})}Object.defineProperty(t,"__esModule",{value:!0}),t.getTxpoolContent=r},40432:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getTxpoolStatus=o;let n=r(66877);async function o(e){let{pending:t,queued:r}=await e.request({method:"txpool_status"});return{pending:(0,n.hexToNumber)(t),queued:(0,n.hexToNumber)(r)}}},99252:function(e,t){async function r(e,{address:t}){await e.request({method:`${e.mode}_impersonateAccount`,params:[t]})}Object.defineProperty(t,"__esModule",{value:!0}),t.impersonateAccount=r},62273:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.increaseTime=o;let n=r(30769);async function o(e,{seconds:t}){return await e.request({method:"evm_increaseTime",params:[(0,n.numberToHex)(t)]})}},36386:function(e,t){async function r(e){return await e.request({method:"txpool_inspect"})}Object.defineProperty(t,"__esModule",{value:!0}),t.inspectTxpool=r},12101:function(e,t){async function r(e,{state:t}){await e.request({method:`${e.mode}_loadState`,params:[t]})}Object.defineProperty(t,"__esModule",{value:!0}),t.loadState=r},62204:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.mine=o;let n=r(30769);async function o(e,{blocks:t,interval:r}){"ganache"===e.mode?await e.request({method:"evm_mine",params:[{blocks:(0,n.numberToHex)(t)}]}):await e.request({method:`${e.mode}_mine`,params:[(0,n.numberToHex)(t),(0,n.numberToHex)(r||0)]})}},3138:function(e,t){async function r(e){await e.request({method:`${e.mode}_removeBlockTimestampInterval`})}Object.defineProperty(t,"__esModule",{value:!0}),t.removeBlockTimestampInterval=r},95206:function(e,t){async function r(e,{blockNumber:t,jsonRpcUrl:r}={}){await e.request({method:`${e.mode}_reset`,params:[{forking:{blockNumber:Number(t),jsonRpcUrl:r}}]})}Object.defineProperty(t,"__esModule",{value:!0}),t.reset=r},4072:function(e,t){async function r(e,{id:t}){await e.request({method:"evm_revert",params:[t]})}Object.defineProperty(t,"__esModule",{value:!0}),t.revert=r},3136:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.sendUnsignedTransaction=i;let n=r(67390),o=r(2148);async function i(e,t){let{accessList:r,data:i,from:a,gas:s,gasPrice:u,maxFeePerGas:c,maxPriorityFeePerGas:l,nonce:d,to:f,value:p,...b}=t,m=e.chain?.formatters?.transactionRequest?.format,y=(m||o.formatTransactionRequest)({...(0,n.extract)(b,{format:m}),accessList:r,data:i,from:a,gas:s,gasPrice:u,maxFeePerGas:c,maxPriorityFeePerGas:l,nonce:d,to:f,value:p},"sendUnsignedTransaction");return await e.request({method:"eth_sendUnsignedTransaction",params:[y]})}},45472:function(e,t){async function r(e,t){"ganache"===e.mode?t?await e.request({method:"miner_start"}):await e.request({method:"miner_stop"}):await e.request({method:"evm_setAutomine",params:[t]})}Object.defineProperty(t,"__esModule",{value:!0}),t.setAutomine=r},37919:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.setBalance=o;let n=r(30769);async function o(e,{address:t,value:r}){"ganache"===e.mode?await e.request({method:"evm_setAccountBalance",params:[t,(0,n.numberToHex)(r)]}):await e.request({method:`${e.mode}_setBalance`,params:[t,(0,n.numberToHex)(r)]})}},28373:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.setBlockGasLimit=o;let n=r(30769);async function o(e,{gasLimit:t}){await e.request({method:"evm_setBlockGasLimit",params:[(0,n.numberToHex)(t)]})}},56970:function(e,t){async function r(e,{interval:t}){let r="hardhat"===e.mode?1e3*t:t;await e.request({method:`${e.mode}_setBlockTimestampInterval`,params:[r]})}Object.defineProperty(t,"__esModule",{value:!0}),t.setBlockTimestampInterval=r},41842:function(e,t){async function r(e,{address:t,bytecode:r}){"ganache"===e.mode?await e.request({method:"evm_setAccountCode",params:[t,r]}):await e.request({method:`${e.mode}_setCode`,params:[t,r]})}Object.defineProperty(t,"__esModule",{value:!0}),t.setCode=r},80615:function(e,t){async function r(e,{address:t}){await e.request({method:`${e.mode}_setCoinbase`,params:[t]})}Object.defineProperty(t,"__esModule",{value:!0}),t.setCoinbase=r},10353:function(e,t){async function r(e,{interval:t}){let r="hardhat"===e.mode?1e3*t:t;await e.request({method:"evm_setIntervalMining",params:[r]})}Object.defineProperty(t,"__esModule",{value:!0}),t.setIntervalMining=r},61434:function(e,t){async function r(e,t){await e.request({method:`${e.mode}_setLoggingEnabled`,params:[t]})}Object.defineProperty(t,"__esModule",{value:!0}),t.setLoggingEnabled=r},73144:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.setMinGasPrice=o;let n=r(30769);async function o(e,{gasPrice:t}){await e.request({method:`${e.mode}_setMinGasPrice`,params:[(0,n.numberToHex)(t)]})}},92984:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.setNextBlockBaseFeePerGas=o;let n=r(30769);async function o(e,{baseFeePerGas:t}){await e.request({method:`${e.mode}_setNextBlockBaseFeePerGas`,params:[(0,n.numberToHex)(t)]})}},25060:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.setNextBlockTimestamp=o;let n=r(30769);async function o(e,{timestamp:t}){await e.request({method:"evm_setNextBlockTimestamp",params:[(0,n.numberToHex)(t)]})}},58505:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.setNonce=o;let n=r(30769);async function o(e,{address:t,nonce:r}){await e.request({method:`${e.mode}_setNonce`,params:[t,(0,n.numberToHex)(r)]})}},98449:function(e,t){async function r(e,t){await e.request({method:`${e.mode}_setRpcUrl`,params:[t]})}Object.defineProperty(t,"__esModule",{value:!0}),t.setRpcUrl=r},31703:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.setStorageAt=o;let n=r(30769);async function o(e,{address:t,index:r,value:o}){await e.request({method:`${e.mode}_setStorageAt`,params:[t,"number"==typeof r?(0,n.numberToHex)(r):r,o]})}},5425:function(e,t){async function r(e){return await e.request({method:"evm_snapshot"})}Object.defineProperty(t,"__esModule",{value:!0}),t.snapshot=r},53474:function(e,t){async function r(e,{address:t}){await e.request({method:`${e.mode}_stopImpersonatingAccount`,params:[t]})}Object.defineProperty(t,"__esModule",{value:!0}),t.stopImpersonatingAccount=r},24152:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.addChain=o;let n=r(30769);async function o(e,{chain:t}){let{id:r,name:o,nativeCurrency:i,rpcUrls:a,blockExplorers:s}=t;await e.request({method:"wallet_addEthereumChain",params:[{chainId:(0,n.numberToHex)(r),chainName:o,nativeCurrency:i,rpcUrls:a.default.http,blockExplorerUrls:s?Object.values(s).map(({url:e})=>e):void 0}]},{dedupe:!0,retryCount:0})}},98990:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.deployContract=function(e,t){let{abi:r,args:i,bytecode:a,...s}=t,u=(0,n.encodeDeployData)({abi:r,args:i,bytecode:a});return(0,o.sendTransaction)(e,{...s,...s.authorizationList?{to:null}:{},data:u})};let n=r(26573),o=r(49663)},86705:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getAddresses=o;let n=r(37743);async function o(e){return e.account?.type==="local"?[e.account.address]:(await e.request({method:"eth_accounts"},{dedupe:!0})).map(e=>(0,n.checksumAddress)(e))}},11320:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getCallsStatus=u;let n=r(86699),o=r(46041),i=r(66877),a=r(43003),s=r(45239);async function u(e,t){async function r(t){if(t.endsWith(s.fallbackMagicIdentifier.slice(2))){let r=(0,o.trim)((0,n.sliceHex)(t,-64,-32)),a=(0,n.sliceHex)(t,0,-64).slice(2).match(/.{1,64}/g),u=await Promise.all(a.map(t=>s.fallbackTransactionErrorMagicIdentifier.slice(2)!==t?e.request({method:"eth_getTransactionReceipt",params:[`0x${t}`]},{dedupe:!0}):void 0)),c=u.some(e=>null===e)?100:u.every(e=>e?.status==="0x1")?200:u.every(e=>e?.status==="0x0")?500:600;return{atomic:!1,chainId:(0,i.hexToNumber)(r),receipts:u.filter(Boolean),status:c,version:"2.0.0"}}return e.request({method:"wallet_getCallsStatus",params:[t]})}let{atomic:u=!1,chainId:c,receipts:l,version:d="2.0.0",...f}=await r(t.id),[p,b]=(()=>{let e=f.status;return e>=100&&e<200?["pending",e]:e>=200&&e<300?["success",e]:e>=300&&e<700?["failure",e]:"CONFIRMED"===e?["success",200]:"PENDING"===e?["pending",100]:[void 0,e]})();return{...f,atomic:u,chainId:c?(0,i.hexToNumber)(c):void 0,receipts:l?.map(e=>({...e,blockNumber:i.hexToBigInt(e.blockNumber),gasUsed:i.hexToBigInt(e.gasUsed),status:a.receiptStatuses[e.status]}))??[],statusCode:b,status:p,version:d}}},82266:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getCapabilities=i;let n=r(83153),o=r(30769);async function i(e,t={}){let{account:r=e.account,chainId:i}=t,a=r?(0,n.parseAccount)(r):void 0,s=i?[a?.address,[(0,o.numberToHex)(i)]]:[a?.address],u=await e.request({method:"wallet_getCapabilities",params:s}),c={};for(let[e,t]of Object.entries(u))for(let[r,n]of(c[Number(e)]={},Object.entries(t)))"addSubAccount"===r&&(r="unstable_addSubAccount"),c[Number(e)][r]=n;return"number"==typeof i?c[i]:c}},50699:function(e,t){async function r(e){return await e.request({method:"wallet_getPermissions"},{dedupe:!0})}Object.defineProperty(t,"__esModule",{value:!0}),t.getPermissions=r},95073:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.prepareAuthorization=c;let n=r(83153),o=r(64742),i=r(70843),a=r(54628),s=r(57924),u=r(53335);async function c(e,t){let{account:r=e.account,chainId:c,nonce:l}=t;if(!r)throw new o.AccountNotFoundError({docsPath:"/docs/eip7702/prepareAuthorization"});let d=(0,n.parseAccount)(r),f=(()=>{if(t.executor)return"self"===t.executor?t.executor:(0,n.parseAccount)(t.executor)})(),p={address:t.contractAddress??t.address,chainId:c,nonce:l};return void 0===p.chainId&&(p.chainId=e.chain?.id??await (0,a.getAction)(e,s.getChainId,"getChainId")({})),void 0===p.nonce&&(p.nonce=await (0,a.getAction)(e,u.getTransactionCount,"getTransactionCount")({address:d.address,blockTag:"pending"}),("self"===f||f?.address&&(0,i.isAddressEqual)(f.address,d.address))&&(p.nonce+=1)),p}},52540:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.supportsFillTransaction=t.eip1559NetworkCache=t.defaultParameters=void 0,t.prepareTransactionRequest=v;let n=r(83153),o=r(51736),i=r(80428),a=r(79836),s=r(53335),u=r(83978),c=r(40658),l=r(43880),d=r(12854),f=r(97),p=r(54628),b=r(87569),m=r(13714),y=r(92830),h=r(52223),g=r(57924);async function v(e,r){let b,v,E=r,{account:x=e.account,chain:w=e.chain,nonceManager:P,parameters:I=t.defaultParameters}=E,T="function"==typeof w?.prepareTransactionRequest?{fn:w.prepareTransactionRequest,runAt:["beforeFillTransaction"]}:Array.isArray(w?.prepareTransactionRequest)?{fn:w.prepareTransactionRequest[0],runAt:w.prepareTransactionRequest[1].runAt}:void 0;async function A(){return b||(void 0!==E.chainId?E.chainId:w?w.id:b=await (0,p.getAction)(e,g.getChainId,"getChainId")({}))}let O=x?(0,n.parseAccount)(x):x,B=E.nonce;if(I.includes("nonce")&&void 0===B&&O&&P){let t=await A();B=await P.consume({address:O.address,chainId:t,client:e})}T?.fn&&T.runAt?.includes("beforeFillTransaction")&&(E=await T.fn(E,{phase:"beforeFillTransaction"}),B??=E.nonce);let S=(!(I.includes("blobVersionedHashes")||I.includes("sidecars"))||!E.kzg||!E.blobs)&&!1!==t.supportsFillTransaction.get(e.uid)&&["fees","gas"].some(e=>I.includes(e))&&(I.includes("chainId")&&"number"!=typeof E.chainId||I.includes("nonce")&&"number"!=typeof B||I.includes("fees")&&"bigint"!=typeof E.gasPrice&&("bigint"!=typeof E.maxFeePerGas||"bigint"!=typeof E.maxPriorityFeePerGas)||I.includes("gas")&&"bigint"!=typeof E.gas)?await (0,p.getAction)(e,h.fillTransaction,"fillTransaction")({...E,nonce:B}).then(r=>{let{chainId:n,from:o,gas:i,gasPrice:a,nonce:s,maxFeePerBlobGas:u,maxFeePerGas:c,maxPriorityFeePerGas:l,type:d,...f}=r.transaction;return t.supportsFillTransaction.set(e.uid,!0),{...E,...o?{from:o}:{},...d?{type:d}:{},...void 0!==n?{chainId:n}:{},...void 0!==i?{gas:i}:{},...void 0!==a?{gasPrice:a}:{},...void 0!==s?{nonce:s}:{},...void 0!==u?{maxFeePerBlobGas:u}:{},...void 0!==c?{maxFeePerGas:c}:{},...void 0!==l?{maxPriorityFeePerGas:l}:{},..."nonceKey"in f&&void 0!==f.nonceKey?{nonceKey:f.nonceKey}:{}}}).catch(r=>(r.walk?.(e=>"MethodNotFoundRpcError"===e.name||"MethodNotSupportedRpcError"===e.name)&&t.supportsFillTransaction.set(e.uid,!1),E)):E;B??=S.nonce;let{blobs:j,gas:_,kzg:M,type:C}=E={...S,...O?{from:O?.address}:{},...B?{nonce:B}:{}};async function R(){return v||(v=await (0,p.getAction)(e,a.getBlock,"getBlock")({blockTag:"latest"}))}if(T?.fn&&T.runAt?.includes("beforeFillParameters")&&(E=await T.fn(E,{phase:"beforeFillParameters"})),I.includes("nonce")&&void 0===B&&O&&!P&&(E.nonce=await (0,p.getAction)(e,s.getTransactionCount,"getTransactionCount")({address:O.address,blockTag:"pending"})),(I.includes("blobVersionedHashes")||I.includes("sidecars"))&&j&&M){let e=(0,c.blobsToCommitments)({blobs:j,kzg:M});if(I.includes("blobVersionedHashes")){let t=(0,d.commitmentsToVersionedHashes)({commitments:e,to:"hex"});E.blobVersionedHashes=t}if(I.includes("sidecars")){let t=(0,l.blobsToProofs)({blobs:j,commitments:e,kzg:M}),r=(0,f.toBlobSidecars)({blobs:j,commitments:e,proofs:t,to:"hex"});E.sidecars=r}}if(I.includes("chainId")&&(E.chainId=await A()),(I.includes("fees")||I.includes("type"))&&void 0===C)try{E.type=(0,y.getTransactionType)(E)}catch{let r=t.eip1559NetworkCache.get(e.uid);if(void 0===r){let n=await R();r="bigint"==typeof n?.baseFeePerGas,t.eip1559NetworkCache.set(e.uid,r)}E.type=r?"eip1559":"legacy"}if(I.includes("fees")){if("legacy"!==E.type&&"eip2930"!==E.type){if(void 0===E.maxFeePerGas||void 0===E.maxPriorityFeePerGas){let t=await R(),{maxFeePerGas:r,maxPriorityFeePerGas:n}=await (0,o.internal_estimateFeesPerGas)(e,{block:t,chain:w,request:E});if(void 0===E.maxPriorityFeePerGas&&E.maxFeePerGas&&E.maxFeePerGas(0,n.getAddress)(e))}},13121:function(e,t){async function r(e,t){return e.request({method:"wallet_requestPermissions",params:[t]},{retryCount:0})}Object.defineProperty(t,"__esModule",{value:!0}),t.requestPermissions=r},45239:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.fallbackTransactionErrorMagicIdentifier=t.fallbackMagicIdentifier=void 0,t.sendCalls=f;let n=r(83153),o=r(3035),i=r(23635),a=r(51974),s=r(22458),u=r(66877),c=r(30769),l=r(45157),d=r(49663);async function f(e,r){let{account:f=e.account,capabilities:p,chain:b=e.chain,experimental_fallback:m,experimental_fallbackDelay:y=32,forceAtomic:h=!1,id:g,version:v="2.0.0"}=r,E=f?(0,n.parseAccount)(f):null,x=r.calls.map(e=>{let t=e.abi?(0,a.encodeFunctionData)({abi:e.abi,functionName:e.functionName,args:e.args}):e.data;return{data:e.dataSuffix&&t?(0,s.concat)([t,e.dataSuffix]):t,to:e.to,value:e.value?(0,c.numberToHex)(e.value):void 0}});try{let t=await e.request({method:"wallet_sendCalls",params:[{atomicRequired:h,calls:x,capabilities:p,chainId:(0,c.numberToHex)(b.id),from:E?.address,id:g,version:v}]},{retryCount:0});if("string"==typeof t)return{id:t};return t}catch(n){if(m&&("MethodNotFoundRpcError"===n.name||"MethodNotSupportedRpcError"===n.name||"UnknownRpcError"===n.name||n.details.toLowerCase().includes("does not exist / is not available")||n.details.toLowerCase().includes("missing or invalid. request()")||n.details.toLowerCase().includes("did not match any variant of untagged enum")||n.details.toLowerCase().includes("account upgraded to unsupported contract")||n.details.toLowerCase().includes("eip-7702 not supported")||n.details.toLowerCase().includes("unsupported wc_ method")||n.details.toLowerCase().includes("feature toggled misconfigured")||n.details.toLowerCase().includes("jsonrpcengine: response has no error or result for request"))){if(p&&Object.values(p).some(e=>!e.optional)){let e="non-optional `capabilities` are not supported on fallback to `eth_sendTransaction`.";throw new i.UnsupportedNonOptionalCapabilityError(new o.BaseError(e,{details:e}))}if(h&&x.length>1){let e="`forceAtomic` is not supported on fallback to `eth_sendTransaction`.";throw new i.AtomicityNotSupportedError(new o.BaseError(e,{details:e}))}let r=[];for(let t of x){let n=(0,d.sendTransaction)(e,{account:E,chain:b,data:t.data,to:t.to,value:t.value?(0,u.hexToBigInt)(t.value):void 0});r.push(n),y>0&&await new Promise(e=>setTimeout(e,y))}let n=await Promise.allSettled(r);if(n.every(e=>"rejected"===e.status))throw n[0].reason;let a=n.map(e=>"fulfilled"===e.status?e.value:t.fallbackTransactionErrorMagicIdentifier);return{id:(0,s.concat)([...a,(0,c.numberToHex)(b.id,{size:32}),t.fallbackMagicIdentifier])}}throw(0,l.getTransactionError)(n,{...r,account:E,chain:r.chain})}}t.fallbackMagicIdentifier="0x5792579257925792579257925792579257925792579257925792579257925792",t.fallbackTransactionErrorMagicIdentifier=(0,c.numberToHex)(0,{size:32})},5490:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.sendCallsSync=i;let n=r(45239),o=r(65762);async function i(e,t){let{chain:r=e.chain}=t,i=t.timeout??Math.max((r?.blockTime??0)*3,5e3),a=await (0,n.sendCalls)(e,t);return await (0,o.waitForCallsStatus)(e,{...t,id:a.id,timeout:i})}},79453:function(e,t){async function r(e,{serializedTransaction:t}){return e.request({method:"eth_sendRawTransaction",params:[t]},{retryCount:0})}Object.defineProperty(t,"__esModule",{value:!0}),t.sendRawTransaction=r},84072:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.sendRawTransactionSync=a;let n=r(29896),o=r(43003),i=r(50303);async function a(e,{serializedTransaction:t,throwOnReceiptRevert:r,timeout:a}){let s=await e.request({method:"eth_sendRawTransactionSync",params:a?[t,(0,i.numberToHex)(a)]:[t]},{retryCount:0}),u=(e.chain?.formatters?.transactionReceipt?.format||o.formatTransactionReceipt)(s);if("reverted"===u.status&&r)throw new n.TransactionReceiptRevertedError({receipt:u});return u}},49663:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.sendTransaction=g;let n=r(83153),o=r(64742),i=r(3035),a=r(84218),s=r(5909),u=r(45157),c=r(67390),l=r(2148),d=r(54628),f=r(87569),p=r(13714),b=r(57924),m=r(52540),y=r(79453),h=new f.LruMap(128);async function g(e,t){let{account:r=e.account,chain:f=e.chain,accessList:g,authorizationList:v,blobs:E,data:x,gas:w,gasPrice:P,maxFeePerBlobGas:I,maxFeePerGas:T,maxPriorityFeePerGas:A,nonce:O,type:B,value:S,...j}=t;if(void 0===r)throw new o.AccountNotFoundError({docsPath:"/docs/actions/wallet/sendTransaction"});let _=r?(0,n.parseAccount)(r):null;try{(0,p.assertRequest)(t);let r=await (async()=>t.to?t.to:null!==t.to&&v&&v.length>0?await (0,a.recoverAuthorizationAddress)({authorization:v[0]}).catch(()=>{throw new i.BaseError("`to` is required. Could not infer from `authorizationList`.")}):void 0)();if(_?.type==="json-rpc"||null===_){let t;null!==f&&(t=await (0,d.getAction)(e,b.getChainId,"getChainId")({}),(0,s.assertCurrentChain)({currentChainId:t,chain:f}));let n=e.chain?.formatters?.transactionRequest?.format,o=(n||l.formatTransactionRequest)({...(0,c.extract)(j,{format:n}),accessList:g,account:_,authorizationList:v,blobs:E,chainId:t,data:x,gas:w,gasPrice:P,maxFeePerBlobGas:I,maxFeePerGas:T,maxPriorityFeePerGas:A,nonce:O,to:r,type:B,value:S},"sendTransaction"),i=h.get(e.uid);try{return await e.request({method:i?"wallet_sendTransaction":"eth_sendTransaction",params:[o]},{retryCount:0})}catch(t){if(!1===i)throw t;if("InvalidInputRpcError"===t.name||"InvalidParamsRpcError"===t.name||"MethodNotFoundRpcError"===t.name||"MethodNotSupportedRpcError"===t.name)return await e.request({method:"wallet_sendTransaction",params:[o]},{retryCount:0}).then(t=>(h.set(e.uid,!0),t)).catch(r=>{if("MethodNotFoundRpcError"===r.name||"MethodNotSupportedRpcError"===r.name)throw h.set(e.uid,!1),t;throw r});throw t}}if(_?.type==="local"){let t=await (0,d.getAction)(e,m.prepareTransactionRequest,"prepareTransactionRequest")({account:_,accessList:g,authorizationList:v,blobs:E,chain:f,data:x,gas:w,gasPrice:P,maxFeePerBlobGas:I,maxFeePerGas:T,maxPriorityFeePerGas:A,nonce:O,nonceManager:_.nonceManager,parameters:[...m.defaultParameters,"sidecars"],type:B,value:S,...j,to:r}),n=f?.serializers?.transaction,o=await _.signTransaction(t,{serializer:n});return await (0,d.getAction)(e,y.sendRawTransaction,"sendRawTransaction")({serializedTransaction:o})}if(_?.type==="smart")throw new o.AccountTypeNotSupportedError({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"});throw new o.AccountTypeNotSupportedError({docsPath:"/docs/actions/wallet/sendTransaction",type:_?.type})}catch(e){if(e instanceof o.AccountTypeNotSupportedError)throw e;throw(0,u.getTransactionError)(e,{...t,account:_,chain:t.chain||void 0})}}},76151:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.sendTransactionSync=E;let n=r(83153),o=r(64742),i=r(3035),a=r(29896),s=r(84218),u=r(5909),c=r(45157),l=r(67390),d=r(2148),f=r(54628),p=r(87569),b=r(13714),m=r(57924),y=r(37351),h=r(52540),g=r(84072),v=new p.LruMap(128);async function E(e,t){let{account:r=e.account,chain:p=e.chain,accessList:E,authorizationList:x,blobs:w,data:P,gas:I,gasPrice:T,maxFeePerBlobGas:A,maxFeePerGas:O,maxPriorityFeePerGas:B,nonce:S,pollingInterval:j,throwOnReceiptRevert:_,type:M,value:C,...R}=t,k=t.timeout??Math.max((p?.blockTime??0)*3,5e3);if(void 0===r)throw new o.AccountNotFoundError({docsPath:"/docs/actions/wallet/sendTransactionSync"});let F=r?(0,n.parseAccount)(r):null;try{(0,b.assertRequest)(t);let r=await (async()=>t.to?t.to:null!==t.to&&x&&x.length>0?await (0,s.recoverAuthorizationAddress)({authorization:x[0]}).catch(()=>{throw new i.BaseError("`to` is required. Could not infer from `authorizationList`.")}):void 0)();if(F?.type==="json-rpc"||null===F){let t;null!==p&&(t=await (0,f.getAction)(e,m.getChainId,"getChainId")({}),(0,u.assertCurrentChain)({currentChainId:t,chain:p}));let n=e.chain?.formatters?.transactionRequest?.format,o=(n||d.formatTransactionRequest)({...(0,l.extract)(R,{format:n}),accessList:E,account:F,authorizationList:x,blobs:w,chainId:t,data:P,gas:I,gasPrice:T,maxFeePerBlobGas:A,maxFeePerGas:O,maxPriorityFeePerGas:B,nonce:S,to:r,type:M,value:C},"sendTransaction"),i=v.get(e.uid),s=i?"wallet_sendTransaction":"eth_sendTransaction",c=await (async()=>{try{return await e.request({method:s,params:[o]},{retryCount:0})}catch(t){if(!1===i)throw t;if("InvalidInputRpcError"===t.name||"InvalidParamsRpcError"===t.name||"MethodNotFoundRpcError"===t.name||"MethodNotSupportedRpcError"===t.name)return await e.request({method:"wallet_sendTransaction",params:[o]},{retryCount:0}).then(t=>(v.set(e.uid,!0),t)).catch(r=>{if("MethodNotFoundRpcError"===r.name||"MethodNotSupportedRpcError"===r.name)throw v.set(e.uid,!1),t;throw r});throw t}})(),b=await (0,f.getAction)(e,y.waitForTransactionReceipt,"waitForTransactionReceipt")({checkReplacement:!1,hash:c,pollingInterval:j,timeout:k});if(_&&"reverted"===b.status)throw new a.TransactionReceiptRevertedError({receipt:b});return b}if(F?.type==="local"){let t=await (0,f.getAction)(e,h.prepareTransactionRequest,"prepareTransactionRequest")({account:F,accessList:E,authorizationList:x,blobs:w,chain:p,data:P,gas:I,gasPrice:T,maxFeePerBlobGas:A,maxFeePerGas:O,maxPriorityFeePerGas:B,nonce:S,nonceManager:F.nonceManager,parameters:[...h.defaultParameters,"sidecars"],type:M,value:C,...R,to:r}),n=p?.serializers?.transaction,o=await F.signTransaction(t,{serializer:n});return await (0,f.getAction)(e,g.sendRawTransactionSync,"sendRawTransactionSync")({serializedTransaction:o,throwOnReceiptRevert:_})}if(F?.type==="smart")throw new o.AccountTypeNotSupportedError({metaMessages:["Consider using the `sendUserOperation` Action instead."],docsPath:"/docs/actions/bundler/sendUserOperation",type:"smart"});throw new o.AccountTypeNotSupportedError({docsPath:"/docs/actions/wallet/sendTransactionSync",type:F?.type})}catch(e){if(e instanceof o.AccountTypeNotSupportedError)throw e;throw(0,c.getTransactionError)(e,{...t,account:F,chain:t.chain||void 0})}}},56815:function(e,t){async function r(e,t){let{id:r}=t;await e.request({method:"wallet_showCallsStatus",params:[r]})}Object.defineProperty(t,"__esModule",{value:!0}),t.showCallsStatus=r},70500:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.signAuthorization=a;let n=r(83153),o=r(64742),i=r(95073);async function a(e,t){let{account:r=e.account}=t;if(!r)throw new o.AccountNotFoundError({docsPath:"/docs/eip7702/signAuthorization"});let a=(0,n.parseAccount)(r);if(!a.signAuthorization)throw new o.AccountTypeNotSupportedError({docsPath:"/docs/eip7702/signAuthorization",metaMessages:["The `signAuthorization` Action does not support JSON-RPC Accounts."],type:a.type});let s=await (0,i.prepareAuthorization)(e,t);return a.signAuthorization(s)}},8808:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.signMessage=a;let n=r(83153),o=r(64742),i=r(30769);async function a(e,{account:t=e.account,message:r}){if(!t)throw new o.AccountNotFoundError({docsPath:"/docs/actions/wallet/signMessage"});let a=(0,n.parseAccount)(t);if(a.signMessage)return a.signMessage({message:r});let s="string"==typeof r?(0,i.stringToHex)(r):r.raw instanceof Uint8Array?(0,i.toHex)(r.raw):r.raw;return e.request({method:"personal_sign",params:[s,a.address]},{retryCount:0})}},25350:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.signTransaction=d;let n=r(83153),o=r(64742),i=r(5909),a=r(30769),s=r(2148),u=r(54628),c=r(13714),l=r(57924);async function d(e,t){let{account:r=e.account,chain:d=e.chain,...f}=t;if(!r)throw new o.AccountNotFoundError({docsPath:"/docs/actions/wallet/signTransaction"});let p=(0,n.parseAccount)(r);(0,c.assertRequest)({account:p,...t});let b=await (0,u.getAction)(e,l.getChainId,"getChainId")({});null!==d&&(0,i.assertCurrentChain)({currentChainId:b,chain:d});let m=d?.formatters||e.chain?.formatters,y=m?.transactionRequest?.format||s.formatTransactionRequest;return p.signTransaction?p.signTransaction({...f,chainId:b},{serializer:e.chain?.serializers?.transaction}):await e.request({method:"eth_signTransaction",params:[{...y({...f,account:p},"signTransaction"),chainId:(0,a.numberToHex)(b),from:p.address}]},{retryCount:0})}},40995:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.signTypedData=a;let n=r(83153),o=r(64742),i=r(56617);async function a(e,t){let{account:r=e.account,domain:a,message:s,primaryType:u}=t;if(!r)throw new o.AccountNotFoundError({docsPath:"/docs/actions/wallet/signTypedData"});let c=(0,n.parseAccount)(r),l={EIP712Domain:(0,i.getTypesForEIP712Domain)({domain:a}),...t.types};if((0,i.validateTypedData)({domain:a,message:s,primaryType:u,types:l}),c.signTypedData)return c.signTypedData({domain:a,message:s,primaryType:u,types:l});let d=(0,i.serializeTypedData)({domain:a,message:s,primaryType:u,types:l});return e.request({method:"eth_signTypedData_v4",params:[c.address,d]},{retryCount:0})}},90547:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.switchChain=o;let n=r(30769);async function o(e,{id:t}){await e.request({method:"wallet_switchEthereumChain",params:[{chainId:(0,n.numberToHex)(t)}]},{retryCount:0})}},65762:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.WaitForCallsStatusTimeoutError=void 0,t.waitForCallsStatus=f;let n=r(3035),o=r(7994),i=r(54628),a=r(39102),s=r(52258),u=r(55934),c=r(96055),l=r(71156),d=r(11320);async function f(e,t){let r;let{id:n,pollingInterval:f=e.pollingInterval,status:b=({statusCode:e})=>200===e||e>=300,retryCount:m=4,retryDelay:y=({count:e})=>200*~~(1<{let a=(0,s.poll)(async()=>{let s=e=>{clearTimeout(r),a(),e(),P()};try{let r=await (0,c.withRetry)(async()=>{let t=await (0,i.getAction)(e,d.getCallsStatus,"getCallsStatus")({id:n});if(g&&"failure"===t.status)throw new o.BundleFailedError(t);return t},{retryCount:m,delay:y});if(!b(r))return;s(()=>t.resolve(r))}catch(e){s(()=>t.reject(e))}},{interval:f,emitOnBegin:!0});return a});return r=h?setTimeout(()=>{P(),clearTimeout(r),w(new p({id:n}))},h):void 0,await E}class p extends n.BaseError{constructor({id:e}){super(`Timed out while waiting for call bundle with id "${e}" to be confirmed.`,{name:"WaitForCallsStatusTimeoutError"})}}t.WaitForCallsStatusTimeoutError=p},6515:function(e,t){async function r(e,t){return await e.request({method:"wallet_watchAsset",params:t},{retryCount:0})}Object.defineProperty(t,"__esModule",{value:!0}),t.watchAsset=r},97273:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.writeContract=c;let n=r(83153),o=r(64742),i=r(51974),a=r(19930),s=r(54628),u=r(49663);async function c(e,t){return c.internal(e,u.sendTransaction,"sendTransaction",t)}!function(e){async function t(e,t,r,u){let{abi:c,account:l=e.account,address:d,args:f,dataSuffix:p,functionName:b,...m}=u;if(void 0===l)throw new o.AccountNotFoundError({docsPath:"/docs/contract/writeContract"});let y=l?(0,n.parseAccount)(l):null,h=(0,i.encodeFunctionData)({abi:c,args:f,functionName:b});try{return await (0,s.getAction)(e,t,r)({data:`${h}${p?p.replace("0x",""):""}`,to:d,account:y,...m})}catch(e){throw(0,a.getContractError)(e,{abi:c,address:d,args:f,docsPath:"/docs/contract/writeContract",functionName:b,sender:y?.address})}}e.internal=t}(c||(t.writeContract=c={}))},51971:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.writeContractSync=i;let n=r(76151),o=r(97273);async function i(e,t){return o.writeContract.internal(e,n.sendTransactionSync,"sendTransactionSync",t)}},3542:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.createClient=function(e){let{batch:t,chain:r,ccipRead:i,key:a="base",name:s="Base Client",type:u="base"}=e,c=e.experimental_blockTag??("number"==typeof r?.experimental_preconfirmationTime?"pending":void 0),l=r?.blockTime??12e3,d=e.pollingInterval??Math.min(Math.max(Math.floor(l/2),500),4e3),f=e.cacheTime??d,p=e.account?(0,n.parseAccount)(e.account):void 0,{config:b,request:m,value:y}=e.transport({account:p,chain:r,pollingInterval:d}),h={account:p,batch:t,cacheTime:f,ccipRead:i,chain:r,key:a,name:s,pollingInterval:d,request:m,transport:{...b,...y},type:u,uid:(0,o.uid)(),...c?{experimental_blockTag:c}:{}};return Object.assign(h,{extend:function e(t){return r=>{let n=r(t);for(let e in h)delete n[e];let o={...t,...n};return Object.assign(o,{extend:e(o)})}}(h)})},t.rpcSchema=function(){return null};let n=r(83153),o=r(68539)},46011:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.createPublicClient=function(e){let{key:t="public",name:r="Public Client"}=e;return(0,n.createClient)({...e,key:t,name:r,type:"publicClient"}).extend(o.publicActions)};let n=r(3542),o=r(97888)},52952:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.createTestClient=function(e){let{key:t="test",name:r="Test Client",mode:i}=e;return(0,n.createClient)({...e,key:t,name:r,type:"testClient"}).extend(e=>({mode:i,...(0,o.testActions)({mode:i})(e)}))};let n=r(3542),o=r(91307)},93549:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.createWalletClient=function(e){let{key:t="wallet",name:r="Wallet Client",transport:i}=e;return(0,n.createClient)({...e,key:t,name:r,transport:i,type:"walletClient"}).extend(o.walletActions)};let n=r(3542),o=r(57736)},97888:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.publicActions=function(e){return{call:t=>(0,u.call)(e,t),createAccessList:t=>(0,c.createAccessList)(e,t),createBlockFilter:()=>(0,l.createBlockFilter)(e),createContractEventFilter:t=>(0,d.createContractEventFilter)(e,t),createEventFilter:t=>(0,f.createEventFilter)(e,t),createPendingTransactionFilter:()=>(0,p.createPendingTransactionFilter)(e),estimateContractGas:t=>(0,b.estimateContractGas)(e,t),estimateGas:t=>(0,y.estimateGas)(e,t),getBalance:t=>(0,v.getBalance)(e,t),getBlobBaseFee:()=>(0,E.getBlobBaseFee)(e),getBlock:t=>(0,x.getBlock)(e,t),getBlockNumber:t=>(0,w.getBlockNumber)(e,t),getBlockTransactionCount:t=>(0,P.getBlockTransactionCount)(e,t),getBytecode:t=>(0,T.getCode)(e,t),getChainId:()=>(0,I.getChainId)(e),getCode:t=>(0,T.getCode)(e,t),getContractEvents:t=>(0,A.getContractEvents)(e,t),getEip712Domain:t=>(0,O.getEip712Domain)(e,t),getEnsAddress:t=>(0,n.getEnsAddress)(e,t),getEnsAvatar:t=>(0,o.getEnsAvatar)(e,t),getEnsName:t=>(0,i.getEnsName)(e,t),getEnsResolver:t=>(0,a.getEnsResolver)(e,t),getEnsText:t=>(0,s.getEnsText)(e,t),getFeeHistory:t=>(0,B.getFeeHistory)(e,t),estimateFeesPerGas:t=>(0,m.estimateFeesPerGas)(e,t),getFilterChanges:t=>(0,S.getFilterChanges)(e,t),getFilterLogs:t=>(0,j.getFilterLogs)(e,t),getGasPrice:()=>(0,_.getGasPrice)(e),getLogs:t=>(0,M.getLogs)(e,t),getProof:t=>(0,C.getProof)(e,t),estimateMaxPriorityFeePerGas:t=>(0,h.estimateMaxPriorityFeePerGas)(e,t),fillTransaction:t=>(0,g.fillTransaction)(e,t),getStorageAt:t=>(0,R.getStorageAt)(e,t),getTransaction:t=>(0,k.getTransaction)(e,t),getTransactionConfirmations:t=>(0,F.getTransactionConfirmations)(e,t),getTransactionCount:t=>(0,N.getTransactionCount)(e,t),getTransactionReceipt:t=>(0,H.getTransactionReceipt)(e,t),multicall:t=>(0,U.multicall)(e,t),prepareTransactionRequest:t=>(0,et.prepareTransactionRequest)(e,t),readContract:t=>(0,z.readContract)(e,t),sendRawTransaction:t=>(0,er.sendRawTransaction)(e,t),sendRawTransactionSync:t=>(0,en.sendRawTransactionSync)(e,t),simulate:t=>(0,L.simulateBlocks)(e,t),simulateBlocks:t=>(0,L.simulateBlocks)(e,t),simulateCalls:t=>(0,$.simulateCalls)(e,t),simulateContract:t=>(0,D.simulateContract)(e,t),verifyHash:t=>(0,G.verifyHash)(e,t),verifyMessage:t=>(0,V.verifyMessage)(e,t),verifySiweMessage:t=>(0,ee.verifySiweMessage)(e,t),verifyTypedData:t=>(0,W.verifyTypedData)(e,t),uninstallFilter:t=>(0,q.uninstallFilter)(e,t),waitForTransactionReceipt:t=>(0,K.waitForTransactionReceipt)(e,t),watchBlocks:t=>(0,J.watchBlocks)(e,t),watchBlockNumber:t=>(0,Z.watchBlockNumber)(e,t),watchContractEvent:t=>(0,Y.watchContractEvent)(e,t),watchEvent:t=>(0,X.watchEvent)(e,t),watchPendingTransactions:t=>(0,Q.watchPendingTransactions)(e,t)}};let n=r(83412),o=r(11599),i=r(87482),a=r(9429),s=r(83721),u=r(92137),c=r(1974),l=r(9845),d=r(94475),f=r(77785),p=r(36263),b=r(79432),m=r(51736),y=r(80428),h=r(31657),g=r(52223),v=r(15734),E=r(37220),x=r(79836),w=r(77961),P=r(76046),I=r(57924),T=r(76516),A=r(37018),O=r(58296),B=r(12743),S=r(15925),j=r(8606),_=r(27411),M=r(64934),C=r(60891),R=r(88011),k=r(30519),F=r(49765),N=r(53335),H=r(77981),U=r(24173),z=r(51693),L=r(52883),$=r(53162),D=r(7604),q=r(39629),G=r(15535),V=r(52412),W=r(98045),K=r(37351),Z=r(73435),J=r(25911),Y=r(23619),X=r(80109),Q=r(43868),ee=r(66358),et=r(52540),er=r(79453),en=r(84072)},91307:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.testActions=function({mode:e}){return t=>{let r=t.extend(()=>({mode:e}));return{dropTransaction:e=>(0,n.dropTransaction)(r,e),dumpState:()=>(0,o.dumpState)(r),getAutomine:()=>(0,i.getAutomine)(r),getTxpoolContent:()=>(0,a.getTxpoolContent)(r),getTxpoolStatus:()=>(0,s.getTxpoolStatus)(r),impersonateAccount:e=>(0,u.impersonateAccount)(r,e),increaseTime:e=>(0,c.increaseTime)(r,e),inspectTxpool:()=>(0,l.inspectTxpool)(r),loadState:e=>(0,d.loadState)(r,e),mine:e=>(0,f.mine)(r,e),removeBlockTimestampInterval:()=>(0,p.removeBlockTimestampInterval)(r),reset:e=>(0,b.reset)(r,e),revert:e=>(0,m.revert)(r,e),sendUnsignedTransaction:e=>(0,y.sendUnsignedTransaction)(r,e),setAutomine:e=>(0,h.setAutomine)(r,e),setBalance:e=>(0,g.setBalance)(r,e),setBlockGasLimit:e=>(0,v.setBlockGasLimit)(r,e),setBlockTimestampInterval:e=>(0,E.setBlockTimestampInterval)(r,e),setCode:e=>(0,x.setCode)(r,e),setCoinbase:e=>(0,w.setCoinbase)(r,e),setIntervalMining:e=>(0,P.setIntervalMining)(r,e),setLoggingEnabled:e=>(0,I.setLoggingEnabled)(r,e),setMinGasPrice:e=>(0,T.setMinGasPrice)(r,e),setNextBlockBaseFeePerGas:e=>(0,A.setNextBlockBaseFeePerGas)(r,e),setNextBlockTimestamp:e=>(0,O.setNextBlockTimestamp)(r,e),setNonce:e=>(0,B.setNonce)(r,e),setRpcUrl:e=>(0,S.setRpcUrl)(r,e),setStorageAt:e=>(0,j.setStorageAt)(r,e),snapshot:()=>(0,_.snapshot)(r),stopImpersonatingAccount:e=>(0,M.stopImpersonatingAccount)(r,e)}}};let n=r(97589),o=r(24434),i=r(67876),a=r(10299),s=r(40432),u=r(99252),c=r(62273),l=r(36386),d=r(12101),f=r(62204),p=r(3138),b=r(95206),m=r(4072),y=r(3136),h=r(45472),g=r(37919),v=r(28373),E=r(56970),x=r(41842),w=r(80615),P=r(10353),I=r(61434),T=r(73144),A=r(92984),O=r(25060),B=r(58505),S=r(98449),j=r(31703),_=r(5425),M=r(53474)},57736:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.walletActions=function(e){return{addChain:t=>(0,i.addChain)(e,t),deployContract:t=>(0,a.deployContract)(e,t),fillTransaction:t=>(0,n.fillTransaction)(e,t),getAddresses:()=>(0,s.getAddresses)(e),getCallsStatus:t=>(0,u.getCallsStatus)(e,t),getCapabilities:t=>(0,c.getCapabilities)(e,t),getChainId:()=>(0,o.getChainId)(e),getPermissions:()=>(0,l.getPermissions)(e),prepareAuthorization:t=>(0,d.prepareAuthorization)(e,t),prepareTransactionRequest:t=>(0,f.prepareTransactionRequest)(e,t),requestAddresses:()=>(0,p.requestAddresses)(e),requestPermissions:t=>(0,b.requestPermissions)(e,t),sendCalls:t=>(0,m.sendCalls)(e,t),sendCallsSync:t=>(0,y.sendCallsSync)(e,t),sendRawTransaction:t=>(0,h.sendRawTransaction)(e,t),sendRawTransactionSync:t=>(0,g.sendRawTransactionSync)(e,t),sendTransaction:t=>(0,v.sendTransaction)(e,t),sendTransactionSync:t=>(0,E.sendTransactionSync)(e,t),showCallsStatus:t=>(0,x.showCallsStatus)(e,t),signAuthorization:t=>(0,w.signAuthorization)(e,t),signMessage:t=>(0,P.signMessage)(e,t),signTransaction:t=>(0,I.signTransaction)(e,t),signTypedData:t=>(0,T.signTypedData)(e,t),switchChain:t=>(0,A.switchChain)(e,t),waitForCallsStatus:t=>(0,O.waitForCallsStatus)(e,t),watchAsset:t=>(0,B.watchAsset)(e,t),writeContract:t=>(0,S.writeContract)(e,t),writeContractSync:t=>(0,j.writeContractSync)(e,t)}};let n=r(52223),o=r(57924),i=r(24152),a=r(98990),s=r(86705),u=r(11320),c=r(82266),l=r(50699),d=r(95073),f=r(52540),p=r(35416),b=r(13121),m=r(45239),y=r(5490),h=r(79453),g=r(84072),v=r(49663),E=r(76151),x=r(56815),w=r(70500),P=r(8808),I=r(25350),T=r(40995),A=r(90547),O=r(65762),B=r(6515),S=r(97273),j=r(51971)},1286:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.createTransport=function({key:e,methods:t,name:r,request:i,retryCount:a=3,retryDelay:s=150,timeout:u,type:c},l){let d=(0,o.uid)();return{config:{key:e,methods:t,name:r,request:i,retryCount:a,retryDelay:s,timeout:u,type:c},request:(0,n.buildRequest)(i,{methods:t,retryCount:a,retryDelay:s,uid:d}),value:l}};let n=r(58877),o=r(68539)},60019:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.custom=function(e,t={}){let{key:r="custom",methods:o,name:i="Custom Provider",retryDelay:a}=t;return({retryCount:s})=>(0,n.createTransport)({key:r,methods:o,name:i,request:e.request.bind(e),retryCount:t.retryCount??s,retryDelay:a,type:"custom"})};let n=r(1286)},70371:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.fallback=function(e,t={}){let{key:r="fallback",name:n="Fallback",rank:o=!1,shouldThrow:i=s,retryCount:c,retryDelay:l}=t;return({chain:t,pollingInterval:s=4e3,timeout:d,...f})=>{let p=e,b=()=>{},m=(0,a.createTransport)({key:r,name:n,async request({method:e,params:r}){let n;let o=async(a=0)=>{let s=p[a]({...f,chain:t,retryCount:0,timeout:d});try{let t=await s.request({method:e,params:r});return b({method:e,params:r,response:t,transport:s,status:"success"}),t}catch(u){if(b({error:u,method:e,params:r,transport:s,status:"error"}),i(u)||a===p.length-1||!(n??=p.slice(a+1).some(r=>{let{include:n,exclude:o}=r({chain:t}).config.methods||{};return n?n.includes(e):!o||!o.includes(e)})))throw u;return o(a+1)}};return o()},retryCount:c,retryDelay:l,type:"fallback"},{onResponse:e=>b=e,transports:p.map(e=>e({chain:t,retryCount:0}))});if(o){let e="object"==typeof o?o:{};u({chain:t,interval:e.interval??s,onTransports:e=>p=e,ping:e.ping,sampleCount:e.sampleCount,timeout:e.timeout,transports:p,weights:e.weights})}return m}},t.shouldThrow=s,t.rankTransports=u;let n=r(21013),o=r(23635),i=r(82958),a=r(1286);function s(e){return!!("code"in e&&"number"==typeof e.code&&(e.code===o.TransactionRejectedRpcError.code||e.code===o.UserRejectedRequestError.code||n.ExecutionRevertedError.nodeMessage.test(e.message)||5e3===e.code))}function u({chain:e,interval:t=4e3,onTransports:r,ping:n,sampleCount:o=10,timeout:a=1e3,transports:s,weights:u={}}){let{stability:c=.7,latency:l=.3}=u,d=[],f=async()=>{let u=await Promise.all(s.map(async t=>{let r,o;let i=t({chain:e,retryCount:0,timeout:a}),s=Date.now();try{await (n?n({transport:i}):i.request({method:"net_listening"})),o=1}catch{o=0}finally{r=Date.now()}return{latency:r-s,success:o}}));d.push(u),d.length>o&&d.shift();let p=Math.max(...d.map(e=>Math.max(...e.map(({latency:e})=>e))));r(s.map((e,t)=>{let r=d.map(e=>e[t].latency),n=r.reduce((e,t)=>e+t,0)/r.length,o=d.map(e=>e[t].success),i=o.reduce((e,t)=>e+t,0)/o.length;return 0===i?[0,t]:[l*(1-n/p)+c*i,t]}).sort((e,t)=>t[0]-e[0]).map(([,e])=>s[e])),await (0,i.wait)(t),f()};f()}},70090:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.http=function(e,t={}){let{batch:r,fetchFn:u,fetchOptions:c,key:l="http",methods:d,name:f="HTTP JSON-RPC",onFetchRequest:p,onFetchResponse:b,retryDelay:m,raw:y}=t;return({chain:h,retryCount:g,timeout:v})=>{let{batchSize:E=1e3,wait:x=0}="object"==typeof r?r:{},w=t.retryCount??g,P=v??t.timeout??1e4,I=e||h?.rpcUrls.default.http[0];if(!I)throw new o.UrlRequiredError;let T=(0,a.getHttpRpcClient)(I,{fetchFn:u,fetchOptions:c,onRequest:p,onResponse:b,timeout:P});return(0,s.createTransport)({key:l,methods:d,name:f,async request({method:e,params:t}){let o={method:e,params:t},{schedule:a}=(0,i.createBatchScheduler)({id:I,wait:x,shouldSplitBatch:e=>e.length>E,fn:e=>T.request({body:e}),sort:(e,t)=>e.id-t.id}),s=async e=>r?a(e):[await T.request({body:e})],[{error:u,result:c}]=await s(o);if(y)return{error:u,result:c};if(u)throw new n.RpcRequestError({body:o,error:u,url:I});return c},retryCount:w,retryDelay:m,timeout:P,type:"http"},{fetchOptions:c,url:I})}};let n=r(8880),o=r(37511),i=r(62018),a=r(61456),s=r(1286)},54123:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.webSocket=function(e,t={}){let{keepAlive:r,key:u="webSocket",methods:c,name:l="WebSocket JSON-RPC",reconnect:d,retryDelay:f}=t;return({chain:p,retryCount:b,timeout:m})=>{let y=t.retryCount??b,h=m??t.timeout??1e4,g=e||p?.rpcUrls.default.webSocket?.[0],v={keepAlive:r,reconnect:d};if(!g)throw new o.UrlRequiredError;return(0,s.createTransport)({key:u,methods:c,name:l,async request({method:e,params:t}){let r={method:e,params:t},o=await (0,a.getWebSocketRpcClient)(g,v),{error:i,result:s}=await o.requestAsync({body:r,timeout:h});if(i)throw new n.RpcRequestError({body:r,error:i,url:g});return s},retryCount:y,retryDelay:f,timeout:h,type:"webSocket"},{getSocket:()=>(0,i.getSocket)(g),getRpcClient:()=>(0,a.getWebSocketRpcClient)(g,v),async subscribe({params:e,onData:t,onError:r}){let n=await (0,a.getWebSocketRpcClient)(g,v),{result:o}=await new Promise((o,i)=>n.request({body:{method:"eth_subscribe",params:e},onError(e){i(e),r?.(e)},onResponse(e){if(e.error){i(e.error),r?.(e.error);return}if("number"==typeof e.id){o(e);return}"eth_subscription"===e.method&&t(e.params)}}));return{subscriptionId:o,unsubscribe:async()=>new Promise(e=>n.request({body:{method:"eth_unsubscribe",params:[o]},onResponse:e}))}}})}};let n=r(8880),o=r(37511),i=r(91009),a=r(52060),s=r(1286)},73579:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.erc4626Abi=t.erc721Abi=t.erc1155Abi=t.erc20Abi_bytes32=t.erc20Abi=t.erc6492SignatureValidatorAbi=t.erc1271Abi=t.addressResolverAbi=t.textResolverAbi=t.universalResolverReverseAbi=t.universalResolverResolveAbi=t.batchGatewayAbi=t.multicall3Abi=void 0,t.multicall3Abi=[{inputs:[{components:[{name:"target",type:"address"},{name:"allowFailure",type:"bool"},{name:"callData",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{name:"success",type:"bool"},{name:"returnData",type:"bytes"}],name:"returnData",type:"tuple[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentBlockTimestamp",outputs:[{internalType:"uint256",name:"timestamp",type:"uint256"}],stateMutability:"view",type:"function"}],t.batchGatewayAbi=[{name:"query",type:"function",stateMutability:"view",inputs:[{type:"tuple[]",name:"queries",components:[{type:"address",name:"sender"},{type:"string[]",name:"urls"},{type:"bytes",name:"data"}]}],outputs:[{type:"bool[]",name:"failures"},{type:"bytes[]",name:"responses"}]},{name:"HttpError",type:"error",inputs:[{type:"uint16",name:"status"},{type:"string",name:"message"}]}];let r=[{inputs:[{name:"dns",type:"bytes"}],name:"DNSDecodingFailed",type:"error"},{inputs:[{name:"ens",type:"string"}],name:"DNSEncodingFailed",type:"error"},{inputs:[],name:"EmptyAddress",type:"error"},{inputs:[{name:"status",type:"uint16"},{name:"message",type:"string"}],name:"HttpError",type:"error"},{inputs:[],name:"InvalidBatchGatewayResponse",type:"error"},{inputs:[{name:"errorData",type:"bytes"}],name:"ResolverError",type:"error"},{inputs:[{name:"name",type:"bytes"},{name:"resolver",type:"address"}],name:"ResolverNotContract",type:"error"},{inputs:[{name:"name",type:"bytes"}],name:"ResolverNotFound",type:"error"},{inputs:[{name:"primary",type:"string"},{name:"primaryAddress",type:"bytes"}],name:"ReverseAddressMismatch",type:"error"},{inputs:[{internalType:"bytes4",name:"selector",type:"bytes4"}],name:"UnsupportedResolverProfile",type:"error"}];t.universalResolverResolveAbi=[...r,{name:"resolveWithGateways",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes"},{name:"data",type:"bytes"},{name:"gateways",type:"string[]"}],outputs:[{name:"",type:"bytes"},{name:"address",type:"address"}]}],t.universalResolverReverseAbi=[...r,{name:"reverseWithGateways",type:"function",stateMutability:"view",inputs:[{type:"bytes",name:"reverseName"},{type:"uint256",name:"coinType"},{type:"string[]",name:"gateways"}],outputs:[{type:"string",name:"resolvedName"},{type:"address",name:"resolver"},{type:"address",name:"reverseResolver"}]}],t.textResolverAbi=[{name:"text",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"key",type:"string"}],outputs:[{name:"",type:"string"}]}],t.addressResolverAbi=[{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"}],outputs:[{name:"",type:"address"}]},{name:"addr",type:"function",stateMutability:"view",inputs:[{name:"name",type:"bytes32"},{name:"coinType",type:"uint256"}],outputs:[{name:"",type:"bytes"}]}],t.erc1271Abi=[{name:"isValidSignature",type:"function",stateMutability:"view",inputs:[{name:"hash",type:"bytes32"},{name:"signature",type:"bytes"}],outputs:[{name:"",type:"bytes4"}]}],t.erc6492SignatureValidatorAbi=[{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function",name:"isValidSig"}],t.erc20Abi=[{type:"event",name:"Approval",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"event",name:"Transfer",inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"function",name:"allowance",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"approve",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{type:"uint8"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{type:"uint256"}]},{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"transferFrom",stateMutability:"nonpayable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]}],t.erc20Abi_bytes32=[{type:"event",name:"Approval",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"event",name:"Transfer",inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}]},{type:"function",name:"allowance",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"approve",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"decimals",stateMutability:"view",inputs:[],outputs:[{type:"uint8"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{type:"bytes32"}]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{type:"bytes32"}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{type:"uint256"}]},{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]},{type:"function",name:"transferFrom",stateMutability:"nonpayable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]}],t.erc1155Abi=[{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"uint256",name:"needed",type:"uint256"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ERC1155InsufficientBalance",type:"error"},{inputs:[{internalType:"address",name:"approver",type:"address"}],name:"ERC1155InvalidApprover",type:"error"},{inputs:[{internalType:"uint256",name:"idsLength",type:"uint256"},{internalType:"uint256",name:"valuesLength",type:"uint256"}],name:"ERC1155InvalidArrayLength",type:"error"},{inputs:[{internalType:"address",name:"operator",type:"address"}],name:"ERC1155InvalidOperator",type:"error"},{inputs:[{internalType:"address",name:"receiver",type:"address"}],name:"ERC1155InvalidReceiver",type:"error"},{inputs:[{internalType:"address",name:"sender",type:"address"}],name:"ERC1155InvalidSender",type:"error"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"address",name:"owner",type:"address"}],name:"ERC1155MissingApprovalForAll",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"account",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256[]",name:"ids",type:"uint256[]"},{indexed:!1,internalType:"uint256[]",name:"values",type:"uint256[]"}],name:"TransferBatch",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"id",type:"uint256"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"TransferSingle",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"string",name:"value",type:"string"},{indexed:!0,internalType:"uint256",name:"id",type:"uint256"}],name:"URI",type:"event"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"uint256",name:"id",type:"uint256"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address[]",name:"accounts",type:"address[]"},{internalType:"uint256[]",name:"ids",type:"uint256[]"}],name:"balanceOfBatch",outputs:[{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256[]",name:"ids",type:"uint256[]"},{internalType:"uint256[]",name:"values",type:"uint256[]"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeBatchTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"id",type:"uint256"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"uri",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}],t.erc721Abi=[{type:"event",name:"Approval",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!0,name:"tokenId",type:"uint256"}]},{type:"event",name:"ApprovalForAll",inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"operator",type:"address"},{indexed:!1,name:"approved",type:"bool"}]},{type:"event",name:"Transfer",inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!0,name:"tokenId",type:"uint256"}]},{type:"function",name:"approve",stateMutability:"payable",inputs:[{name:"spender",type:"address"},{name:"tokenId",type:"uint256"}],outputs:[]},{type:"function",name:"balanceOf",stateMutability:"view",inputs:[{name:"account",type:"address"}],outputs:[{type:"uint256"}]},{type:"function",name:"getApproved",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{type:"address"}]},{type:"function",name:"isApprovedForAll",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"operator",type:"address"}],outputs:[{type:"bool"}]},{type:"function",name:"name",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"ownerOf",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"owner",type:"address"}]},{type:"function",name:"safeTransferFrom",stateMutability:"payable",inputs:[{name:"from",type:"address"},{name:"to",type:"address"},{name:"tokenId",type:"uint256"}],outputs:[]},{type:"function",name:"safeTransferFrom",stateMutability:"nonpayable",inputs:[{name:"from",type:"address"},{name:"to",type:"address"},{name:"id",type:"uint256"},{name:"data",type:"bytes"}],outputs:[]},{type:"function",name:"setApprovalForAll",stateMutability:"nonpayable",inputs:[{name:"operator",type:"address"},{name:"approved",type:"bool"}],outputs:[]},{type:"function",name:"symbol",stateMutability:"view",inputs:[],outputs:[{type:"string"}]},{type:"function",name:"tokenByIndex",stateMutability:"view",inputs:[{name:"index",type:"uint256"}],outputs:[{type:"uint256"}]},{type:"function",name:"tokenByIndex",stateMutability:"view",inputs:[{name:"owner",type:"address"},{name:"index",type:"uint256"}],outputs:[{name:"tokenId",type:"uint256"}]},{type:"function",name:"tokenURI",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{type:"string"}]},{type:"function",name:"totalSupply",stateMutability:"view",inputs:[],outputs:[{type:"uint256"}]},{type:"function",name:"transferFrom",stateMutability:"payable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"tokenId",type:"uint256"}],outputs:[]}],t.erc4626Abi=[{anonymous:!1,inputs:[{indexed:!0,name:"owner",type:"address"},{indexed:!0,name:"spender",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"sender",type:"address"},{indexed:!0,name:"receiver",type:"address"},{indexed:!1,name:"assets",type:"uint256"},{indexed:!1,name:"shares",type:"uint256"}],name:"Deposit",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"from",type:"address"},{indexed:!0,name:"to",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"sender",type:"address"},{indexed:!0,name:"receiver",type:"address"},{indexed:!0,name:"owner",type:"address"},{indexed:!1,name:"assets",type:"uint256"},{indexed:!1,name:"shares",type:"uint256"}],name:"Withdraw",type:"event"},{inputs:[{name:"owner",type:"address"},{name:"spender",type:"address"}],name:"allowance",outputs:[{type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],name:"approve",outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"asset",outputs:[{name:"assetTokenAddress",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{name:"account",type:"address"}],name:"balanceOf",outputs:[{type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"shares",type:"uint256"}],name:"convertToAssets",outputs:[{name:"assets",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"assets",type:"uint256"}],name:"convertToShares",outputs:[{name:"shares",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"assets",type:"uint256"},{name:"receiver",type:"address"}],name:"deposit",outputs:[{name:"shares",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"caller",type:"address"}],name:"maxDeposit",outputs:[{name:"maxAssets",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"caller",type:"address"}],name:"maxMint",outputs:[{name:"maxShares",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"owner",type:"address"}],name:"maxRedeem",outputs:[{name:"maxShares",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"owner",type:"address"}],name:"maxWithdraw",outputs:[{name:"maxAssets",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"shares",type:"uint256"},{name:"receiver",type:"address"}],name:"mint",outputs:[{name:"assets",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"assets",type:"uint256"}],name:"previewDeposit",outputs:[{name:"shares",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"shares",type:"uint256"}],name:"previewMint",outputs:[{name:"assets",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"shares",type:"uint256"}],name:"previewRedeem",outputs:[{name:"assets",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"assets",type:"uint256"}],name:"previewWithdraw",outputs:[{name:"shares",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"shares",type:"uint256"},{name:"receiver",type:"address"},{name:"owner",type:"address"}],name:"redeem",outputs:[{name:"assets",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"totalAssets",outputs:[{name:"totalManagedAssets",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"to",type:"address"},{name:"amount",type:"uint256"}],name:"transfer",outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"from",type:"address"},{name:"to",type:"address"},{name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"assets",type:"uint256"},{name:"receiver",type:"address"},{name:"owner",type:"address"}],name:"withdraw",outputs:[{name:"shares",type:"uint256"}],stateMutability:"nonpayable",type:"function"}]},96784:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.zeroAddress=t.ethAddress=void 0,t.ethAddress="0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",t.zeroAddress="0x0000000000000000000000000000000000000000"},8166:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.maxBytesPerTransaction=t.bytesPerBlob=t.fieldElementsPerBlob=t.bytesPerFieldElement=void 0,t.bytesPerFieldElement=32,t.fieldElementsPerBlob=4096,t.bytesPerBlob=t.bytesPerFieldElement*t.fieldElementsPerBlob,t.maxBytesPerTransaction=6*t.bytesPerBlob-1-1*t.fieldElementsPerBlob*6},99624:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.zeroHash=t.erc6492MagicBytes=void 0,t.erc6492MagicBytes="0x6492649264926492649264926492649264926492649264926492649264926492",t.zeroHash="0x0000000000000000000000000000000000000000000000000000000000000000"},71112:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.aggregate3Signature=void 0,t.aggregate3Signature="0x82ad56cb"},22530:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.multicall3Bytecode=t.erc6492SignatureValidatorByteCode=t.deploylessCallViaFactoryBytecode=t.deploylessCallViaBytecodeBytecode=void 0,t.deploylessCallViaBytecodeBytecode="0x608060405234801561001057600080fd5b5060405161018e38038061018e83398101604081905261002f91610124565b6000808351602085016000f59050803b61004857600080fd5b6000808351602085016000855af16040513d6000823e81610067573d81fd5b3d81f35b634e487b7160e01b600052604160045260246000fd5b600082601f83011261009257600080fd5b81516001600160401b038111156100ab576100ab61006b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156100d9576100d961006b565b6040528181528382016020018510156100f157600080fd5b60005b82811015610110576020818601810151838301820152016100f4565b506000918101602001919091529392505050565b6000806040838503121561013757600080fd5b82516001600160401b0381111561014d57600080fd5b61015985828601610081565b602085015190935090506001600160401b0381111561017757600080fd5b61018385828601610081565b915050925092905056fe",t.deploylessCallViaFactoryBytecode="0x608060405234801561001057600080fd5b506040516102c03803806102c083398101604081905261002f916101e6565b836001600160a01b03163b6000036100e457600080836001600160a01b03168360405161005c9190610270565b6000604051808303816000865af19150503d8060008114610099576040519150601f19603f3d011682016040523d82523d6000602084013e61009e565b606091505b50915091508115806100b857506001600160a01b0386163b155b156100e1578060405163101bb98d60e01b81526004016100d8919061028c565b60405180910390fd5b50505b6000808451602086016000885af16040513d6000823e81610103573d81fd5b3d81f35b80516001600160a01b038116811461011e57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561015457818101518382015260200161013c565b50506000910152565b600082601f83011261016e57600080fd5b81516001600160401b0381111561018757610187610123565b604051601f8201601f19908116603f011681016001600160401b03811182821017156101b5576101b5610123565b6040528181528382016020018510156101cd57600080fd5b6101de826020830160208701610139565b949350505050565b600080600080608085870312156101fc57600080fd5b61020585610107565b60208601519094506001600160401b0381111561022157600080fd5b61022d8782880161015d565b93505061023c60408601610107565b60608601519092506001600160401b0381111561025857600080fd5b6102648782880161015d565b91505092959194509250565b60008251610282818460208701610139565b9190910192915050565b60208152600082518060208401526102ab816040850160208701610139565b601f01601f1916919091016040019291505056fe",t.erc6492SignatureValidatorByteCode="0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572",t.multicall3Bytecode="0x608060405234801561001057600080fd5b506115b9806100206000396000f3fe6080604052600436106100f35760003560e01c80634d2301cc1161008a578063a8b0574e11610059578063a8b0574e14610325578063bce38bd714610350578063c3077fa914610380578063ee82ac5e146103b2576100f3565b80634d2301cc1461026257806372425d9d1461029f57806382ad56cb146102ca57806386d516e8146102fa576100f3565b80633408e470116100c65780633408e470146101af578063399542e9146101da5780633e64a6961461020c57806342cbb15c14610237576100f3565b80630f28c97d146100f8578063174dea7114610123578063252dba421461015357806327e86d6e14610184575b600080fd5b34801561010457600080fd5b5061010d6103ef565b60405161011a9190610c0a565b60405180910390f35b61013d60048036038101906101389190610c94565b6103f7565b60405161014a9190610e94565b60405180910390f35b61016d60048036038101906101689190610f0c565b610615565b60405161017b92919061101b565b60405180910390f35b34801561019057600080fd5b506101996107ab565b6040516101a69190611064565b60405180910390f35b3480156101bb57600080fd5b506101c46107b7565b6040516101d19190610c0a565b60405180910390f35b6101f460048036038101906101ef91906110ab565b6107bf565b6040516102039392919061110b565b60405180910390f35b34801561021857600080fd5b506102216107e1565b60405161022e9190610c0a565b60405180910390f35b34801561024357600080fd5b5061024c6107e9565b6040516102599190610c0a565b60405180910390f35b34801561026e57600080fd5b50610289600480360381019061028491906111a7565b6107f1565b6040516102969190610c0a565b60405180910390f35b3480156102ab57600080fd5b506102b4610812565b6040516102c19190610c0a565b60405180910390f35b6102e460048036038101906102df919061122a565b61081a565b6040516102f19190610e94565b60405180910390f35b34801561030657600080fd5b5061030f6109e4565b60405161031c9190610c0a565b60405180910390f35b34801561033157600080fd5b5061033a6109ec565b6040516103479190611286565b60405180910390f35b61036a600480360381019061036591906110ab565b6109f4565b6040516103779190610e94565b60405180910390f35b61039a60048036038101906103959190610f0c565b610ba6565b6040516103a99392919061110b565b60405180910390f35b3480156103be57600080fd5b506103d960048036038101906103d491906112cd565b610bca565b6040516103e69190611064565b60405180910390f35b600042905090565b60606000808484905090508067ffffffffffffffff81111561041c5761041b6112fa565b5b60405190808252806020026020018201604052801561045557816020015b610442610bd5565b81526020019060019003908161043a5790505b5092503660005b828110156105c957600085828151811061047957610478611329565b5b6020026020010151905087878381811061049657610495611329565b5b90506020028101906104a89190611367565b925060008360400135905080860195508360000160208101906104cb91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16818580606001906104f2919061138f565b604051610500929190611431565b60006040518083038185875af1925050503d806000811461053d576040519150601f19603f3d011682016040523d82523d6000602084013e610542565b606091505b5083600001846020018290528215151515815250505081516020850135176105bc577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260846000fd5b826001019250505061045c565b5082341461060c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610603906114a7565b60405180910390fd5b50505092915050565b6000606043915060008484905090508067ffffffffffffffff81111561063e5761063d6112fa565b5b60405190808252806020026020018201604052801561067157816020015b606081526020019060019003908161065c5790505b5091503660005b828110156107a157600087878381811061069557610694611329565b5b90506020028101906106a791906114c7565b92508260000160208101906106bc91906111a7565b73ffffffffffffffffffffffffffffffffffffffff168380602001906106e2919061138f565b6040516106f0929190611431565b6000604051808303816000865af19150503d806000811461072d576040519150601f19603f3d011682016040523d82523d6000602084013e610732565b606091505b5086848151811061074657610745611329565b5b60200260200101819052819250505080610795576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078c9061153b565b60405180910390fd5b81600101915050610678565b5050509250929050565b60006001430340905090565b600046905090565b6000806060439250434091506107d68686866109f4565b905093509350939050565b600048905090565b600043905090565b60008173ffffffffffffffffffffffffffffffffffffffff16319050919050565b600044905090565b606060008383905090508067ffffffffffffffff81111561083e5761083d6112fa565b5b60405190808252806020026020018201604052801561087757816020015b610864610bd5565b81526020019060019003908161085c5790505b5091503660005b828110156109db57600084828151811061089b5761089a611329565b5b602002602001015190508686838181106108b8576108b7611329565b5b90506020028101906108ca919061155b565b92508260000160208101906108df91906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060400190610905919061138f565b604051610913929190611431565b6000604051808303816000865af19150503d8060008114610950576040519150601f19603f3d011682016040523d82523d6000602084013e610955565b606091505b5082600001836020018290528215151515815250505080516020840135176109cf577f08c379a000000000000000000000000000000000000000000000000000000000600052602060045260176024527f4d756c746963616c6c333a2063616c6c206661696c656400000000000000000060445260646000fd5b8160010191505061087e565b50505092915050565b600045905090565b600041905090565b606060008383905090508067ffffffffffffffff811115610a1857610a176112fa565b5b604051908082528060200260200182016040528015610a5157816020015b610a3e610bd5565b815260200190600190039081610a365790505b5091503660005b82811015610b9c576000848281518110610a7557610a74611329565b5b60200260200101519050868683818110610a9257610a91611329565b5b9050602002810190610aa491906114c7565b9250826000016020810190610ab991906111a7565b73ffffffffffffffffffffffffffffffffffffffff16838060200190610adf919061138f565b604051610aed929190611431565b6000604051808303816000865af19150503d8060008114610b2a576040519150601f19603f3d011682016040523d82523d6000602084013e610b2f565b606091505b508260000183602001829052821515151581525050508715610b90578060000151610b8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b869061153b565b60405180910390fd5b5b81600101915050610a58565b5050509392505050565b6000806060610bb7600186866107bf565b8093508194508295505050509250925092565b600081409050919050565b6040518060400160405280600015158152602001606081525090565b6000819050919050565b610c0481610bf1565b82525050565b6000602082019050610c1f6000830184610bfb565b92915050565b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b60008083601f840112610c5457610c53610c2f565b5b8235905067ffffffffffffffff811115610c7157610c70610c34565b5b602083019150836020820283011115610c8d57610c8c610c39565b5b9250929050565b60008060208385031215610cab57610caa610c25565b5b600083013567ffffffffffffffff811115610cc957610cc8610c2a565b5b610cd585828601610c3e565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b60008115159050919050565b610d2281610d0d565b82525050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610d62578082015181840152602081019050610d47565b83811115610d71576000848401525b50505050565b6000601f19601f8301169050919050565b6000610d9382610d28565b610d9d8185610d33565b9350610dad818560208601610d44565b610db681610d77565b840191505092915050565b6000604083016000830151610dd96000860182610d19565b5060208301518482036020860152610df18282610d88565b9150508091505092915050565b6000610e0a8383610dc1565b905092915050565b6000602082019050919050565b6000610e2a82610ce1565b610e348185610cec565b935083602082028501610e4685610cfd565b8060005b85811015610e825784840389528151610e638582610dfe565b9450610e6e83610e12565b925060208a01995050600181019050610e4a565b50829750879550505050505092915050565b60006020820190508181036000830152610eae8184610e1f565b905092915050565b60008083601f840112610ecc57610ecb610c2f565b5b8235905067ffffffffffffffff811115610ee957610ee8610c34565b5b602083019150836020820283011115610f0557610f04610c39565b5b9250929050565b60008060208385031215610f2357610f22610c25565b5b600083013567ffffffffffffffff811115610f4157610f40610c2a565b5b610f4d85828601610eb6565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6000610f918383610d88565b905092915050565b6000602082019050919050565b6000610fb182610f59565b610fbb8185610f64565b935083602082028501610fcd85610f75565b8060005b858110156110095784840389528151610fea8582610f85565b9450610ff583610f99565b925060208a01995050600181019050610fd1565b50829750879550505050505092915050565b60006040820190506110306000830185610bfb565b81810360208301526110428184610fa6565b90509392505050565b6000819050919050565b61105e8161104b565b82525050565b60006020820190506110796000830184611055565b92915050565b61108881610d0d565b811461109357600080fd5b50565b6000813590506110a58161107f565b92915050565b6000806000604084860312156110c4576110c3610c25565b5b60006110d286828701611096565b935050602084013567ffffffffffffffff8111156110f3576110f2610c2a565b5b6110ff86828701610eb6565b92509250509250925092565b60006060820190506111206000830186610bfb565b61112d6020830185611055565b818103604083015261113f8184610e1f565b9050949350505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061117482611149565b9050919050565b61118481611169565b811461118f57600080fd5b50565b6000813590506111a18161117b565b92915050565b6000602082840312156111bd576111bc610c25565b5b60006111cb84828501611192565b91505092915050565b60008083601f8401126111ea576111e9610c2f565b5b8235905067ffffffffffffffff81111561120757611206610c34565b5b60208301915083602082028301111561122357611222610c39565b5b9250929050565b6000806020838503121561124157611240610c25565b5b600083013567ffffffffffffffff81111561125f5761125e610c2a565b5b61126b858286016111d4565b92509250509250929050565b61128081611169565b82525050565b600060208201905061129b6000830184611277565b92915050565b6112aa81610bf1565b81146112b557600080fd5b50565b6000813590506112c7816112a1565b92915050565b6000602082840312156112e3576112e2610c25565b5b60006112f1848285016112b8565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080fd5b600080fd5b600080fd5b60008235600160800383360303811261138357611382611358565b5b80830191505092915050565b600080833560016020038436030381126113ac576113ab611358565b5b80840192508235915067ffffffffffffffff8211156113ce576113cd61135d565b5b6020830192506001820236038313156113ea576113e9611362565b5b509250929050565b600081905092915050565b82818337600083830152505050565b600061141883856113f2565b93506114258385846113fd565b82840190509392505050565b600061143e82848661140c565b91508190509392505050565b600082825260208201905092915050565b7f4d756c746963616c6c333a2076616c7565206d69736d61746368000000000000600082015250565b6000611491601a8361144a565b915061149c8261145b565b602082019050919050565b600060208201905081810360008301526114c081611484565b9050919050565b6000823560016040038336030381126114e3576114e2611358565b5b80830191505092915050565b7f4d756c746963616c6c333a2063616c6c206661696c6564000000000000000000600082015250565b600061152560178361144a565b9150611530826114ef565b602082019050919050565b6000602082019050818103600083015261155481611518565b9050919050565b60008235600160600383360303811261157757611576611358565b5b8083019150509291505056fea264697066735822122020c1bc9aacf8e4a6507193432a895a8e77094f45a1395583f07b24e860ef06cd64736f6c634300080c0033"},96611:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.versionedHashVersionKzg=void 0,t.versionedHashVersionKzg=1},22164:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.minInt144=t.minInt136=t.minInt128=t.minInt120=t.minInt112=t.minInt104=t.minInt96=t.minInt88=t.minInt80=t.minInt72=t.minInt64=t.minInt56=t.minInt48=t.minInt40=t.minInt32=t.minInt24=t.minInt16=t.minInt8=t.maxInt256=t.maxInt248=t.maxInt240=t.maxInt232=t.maxInt224=t.maxInt216=t.maxInt208=t.maxInt200=t.maxInt192=t.maxInt184=t.maxInt176=t.maxInt168=t.maxInt160=t.maxInt152=t.maxInt144=t.maxInt136=t.maxInt128=t.maxInt120=t.maxInt112=t.maxInt104=t.maxInt96=t.maxInt88=t.maxInt80=t.maxInt72=t.maxInt64=t.maxInt56=t.maxInt48=t.maxInt40=t.maxInt32=t.maxInt24=t.maxInt16=t.maxInt8=void 0,t.maxUint256=t.maxUint248=t.maxUint240=t.maxUint232=t.maxUint224=t.maxUint216=t.maxUint208=t.maxUint200=t.maxUint192=t.maxUint184=t.maxUint176=t.maxUint168=t.maxUint160=t.maxUint152=t.maxUint144=t.maxUint136=t.maxUint128=t.maxUint120=t.maxUint112=t.maxUint104=t.maxUint96=t.maxUint88=t.maxUint80=t.maxUint72=t.maxUint64=t.maxUint56=t.maxUint48=t.maxUint40=t.maxUint32=t.maxUint24=t.maxUint16=t.maxUint8=t.minInt256=t.minInt248=t.minInt240=t.minInt232=t.minInt224=t.minInt216=t.minInt208=t.minInt200=t.minInt192=t.minInt184=t.minInt176=t.minInt168=t.minInt160=t.minInt152=void 0,t.maxInt8=2n**(8n-1n)-1n,t.maxInt16=2n**(16n-1n)-1n,t.maxInt24=2n**(24n-1n)-1n,t.maxInt32=2n**(32n-1n)-1n,t.maxInt40=2n**(40n-1n)-1n,t.maxInt48=2n**(48n-1n)-1n,t.maxInt56=2n**(56n-1n)-1n,t.maxInt64=2n**(64n-1n)-1n,t.maxInt72=2n**(72n-1n)-1n,t.maxInt80=2n**(80n-1n)-1n,t.maxInt88=2n**(88n-1n)-1n,t.maxInt96=2n**(96n-1n)-1n,t.maxInt104=2n**(104n-1n)-1n,t.maxInt112=2n**(112n-1n)-1n,t.maxInt120=2n**(120n-1n)-1n,t.maxInt128=2n**(128n-1n)-1n,t.maxInt136=2n**(136n-1n)-1n,t.maxInt144=2n**(144n-1n)-1n,t.maxInt152=2n**(152n-1n)-1n,t.maxInt160=2n**(160n-1n)-1n,t.maxInt168=2n**(168n-1n)-1n,t.maxInt176=2n**(176n-1n)-1n,t.maxInt184=2n**(184n-1n)-1n,t.maxInt192=2n**(192n-1n)-1n,t.maxInt200=2n**(200n-1n)-1n,t.maxInt208=2n**(208n-1n)-1n,t.maxInt216=2n**(216n-1n)-1n,t.maxInt224=2n**(224n-1n)-1n,t.maxInt232=2n**(232n-1n)-1n,t.maxInt240=2n**(240n-1n)-1n,t.maxInt248=2n**(248n-1n)-1n,t.maxInt256=2n**(256n-1n)-1n,t.minInt8=-(2n**(8n-1n)),t.minInt16=-(2n**(16n-1n)),t.minInt24=-(2n**(24n-1n)),t.minInt32=-(2n**(32n-1n)),t.minInt40=-(2n**(40n-1n)),t.minInt48=-(2n**(48n-1n)),t.minInt56=-(2n**(56n-1n)),t.minInt64=-(2n**(64n-1n)),t.minInt72=-(2n**(72n-1n)),t.minInt80=-(2n**(80n-1n)),t.minInt88=-(2n**(88n-1n)),t.minInt96=-(2n**(96n-1n)),t.minInt104=-(2n**(104n-1n)),t.minInt112=-(2n**(112n-1n)),t.minInt120=-(2n**(120n-1n)),t.minInt128=-(2n**(128n-1n)),t.minInt136=-(2n**(136n-1n)),t.minInt144=-(2n**(144n-1n)),t.minInt152=-(2n**(152n-1n)),t.minInt160=-(2n**(160n-1n)),t.minInt168=-(2n**(168n-1n)),t.minInt176=-(2n**(176n-1n)),t.minInt184=-(2n**(184n-1n)),t.minInt192=-(2n**(192n-1n)),t.minInt200=-(2n**(200n-1n)),t.minInt208=-(2n**(208n-1n)),t.minInt216=-(2n**(216n-1n)),t.minInt224=-(2n**(224n-1n)),t.minInt232=-(2n**(232n-1n)),t.minInt240=-(2n**(240n-1n)),t.minInt248=-(2n**(248n-1n)),t.minInt256=-(2n**(256n-1n)),t.maxUint8=2n**8n-1n,t.maxUint16=2n**16n-1n,t.maxUint24=2n**24n-1n,t.maxUint32=2n**32n-1n,t.maxUint40=2n**40n-1n,t.maxUint48=2n**48n-1n,t.maxUint56=2n**56n-1n,t.maxUint64=2n**64n-1n,t.maxUint72=2n**72n-1n,t.maxUint80=2n**80n-1n,t.maxUint88=2n**88n-1n,t.maxUint96=2n**96n-1n,t.maxUint104=2n**104n-1n,t.maxUint112=2n**112n-1n,t.maxUint120=2n**120n-1n,t.maxUint128=2n**128n-1n,t.maxUint136=2n**136n-1n,t.maxUint144=2n**144n-1n,t.maxUint152=2n**152n-1n,t.maxUint160=2n**160n-1n,t.maxUint168=2n**168n-1n,t.maxUint176=2n**176n-1n,t.maxUint184=2n**184n-1n,t.maxUint192=2n**192n-1n,t.maxUint200=2n**200n-1n,t.maxUint208=2n**208n-1n,t.maxUint216=2n**216n-1n,t.maxUint224=2n**224n-1n,t.maxUint232=2n**232n-1n,t.maxUint240=2n**240n-1n,t.maxUint248=2n**248n-1n,t.maxUint256=2n**256n-1n},14012:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.solidityPanic=t.solidityError=t.panicReasons=void 0,t.panicReasons={1:"An `assert` condition failed.",17:"Arithmetic operation resulted in underflow or overflow.",18:"Division or modulo by zero (e.g. `5 / 0` or `23 % 0`).",33:"Attempted to convert to an invalid type.",34:"Attempted to access a storage byte array that is incorrectly encoded.",49:"Performed `.pop()` on an empty array",50:"Array index is out of bounds.",65:"Allocated too much memory or created an array which is too large.",81:"Attempted to call a zero-initialized variable of internal function type."},t.solidityError={inputs:[{name:"message",type:"string"}],name:"Error",type:"error"},t.solidityPanic={inputs:[{name:"reason",type:"uint256"}],name:"Panic",type:"error"}},79983:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.presignMessagePrefix=void 0,t.presignMessagePrefix="\x19Ethereum Signed Message:\n"},28698:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.weiUnits=t.gweiUnits=t.etherUnits=void 0,t.etherUnits={gwei:9,wei:18},t.gweiUnits={ether:-9,wei:9},t.weiUnits={ether:-18,gwei:-9}},21837:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.UnsupportedPackedAbiType=t.InvalidDefinitionTypeError=t.InvalidArrayError=t.InvalidAbiDecodingTypeError=t.InvalidAbiEncodingTypeError=t.DecodeLogTopicsMismatch=t.DecodeLogDataMismatch=t.BytesSizeMismatchError=t.AbiItemAmbiguityError=t.AbiFunctionSignatureNotFoundError=t.AbiFunctionOutputsNotFoundError=t.AbiFunctionNotFoundError=t.AbiEventNotFoundError=t.AbiEventSignatureNotFoundError=t.AbiEventSignatureEmptyTopicsError=t.AbiErrorSignatureNotFoundError=t.AbiErrorNotFoundError=t.AbiErrorInputsNotFoundError=t.AbiEncodingLengthMismatchError=t.AbiEncodingBytesSizeMismatchError=t.AbiEncodingArrayLengthMismatchError=t.AbiDecodingZeroDataError=t.AbiDecodingDataSizeTooSmallError=t.AbiDecodingDataSizeInvalidError=t.AbiConstructorParamsNotFoundError=t.AbiConstructorNotFoundError=void 0;let n=r(70680),o=r(92242),i=r(3035);class a extends i.BaseError{constructor({docsPath:e}){super("A constructor was not found on the ABI.\nMake sure you are using the correct ABI and that the constructor exists on it.",{docsPath:e,name:"AbiConstructorNotFoundError"})}}t.AbiConstructorNotFoundError=a;class s extends i.BaseError{constructor({docsPath:e}){super("Constructor arguments were provided (`args`), but a constructor parameters (`inputs`) were not found on the ABI.\nMake sure you are using the correct ABI, and that the `inputs` attribute on the constructor exists.",{docsPath:e,name:"AbiConstructorParamsNotFoundError"})}}t.AbiConstructorParamsNotFoundError=s;class u extends i.BaseError{constructor({data:e,size:t}){super(`Data size of ${t} bytes is invalid. +Size must be in increments of 32 bytes (size % 32 === 0).`,{metaMessages:[`Data: ${e} (${t} bytes)`],name:"AbiDecodingDataSizeInvalidError"})}}t.AbiDecodingDataSizeInvalidError=u;class c extends i.BaseError{constructor({data:e,params:t,size:r}){super(`Data size of ${r} bytes is too small for given parameters.`,{metaMessages:[`Params: (${(0,n.formatAbiParams)(t,{includeName:!0})})`,`Data: ${e} (${r} bytes)`],name:"AbiDecodingDataSizeTooSmallError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=e,this.params=t,this.size=r}}t.AbiDecodingDataSizeTooSmallError=c;class l extends i.BaseError{constructor(){super('Cannot decode zero data ("0x") with ABI parameters.',{name:"AbiDecodingZeroDataError"})}}t.AbiDecodingZeroDataError=l;class d extends i.BaseError{constructor({expectedLength:e,givenLength:t,type:r}){super(`ABI encoding array length mismatch for type ${r}. +Expected length: ${e} +Given length: ${t}`,{name:"AbiEncodingArrayLengthMismatchError"})}}t.AbiEncodingArrayLengthMismatchError=d;class f extends i.BaseError{constructor({expectedSize:e,value:t}){super(`Size of bytes "${t}" (bytes${(0,o.size)(t)}) does not match expected size (bytes${e}).`,{name:"AbiEncodingBytesSizeMismatchError"})}}t.AbiEncodingBytesSizeMismatchError=f;class p extends i.BaseError{constructor({expectedLength:e,givenLength:t}){super(`ABI encoding params/values length mismatch. +Expected length (params): ${e} +Given length (values): ${t}`,{name:"AbiEncodingLengthMismatchError"})}}t.AbiEncodingLengthMismatchError=p;class b extends i.BaseError{constructor(e,{docsPath:t}){super(`Arguments (\`args\`) were provided to "${e}", but "${e}" on the ABI does not contain any parameters (\`inputs\`). +Cannot encode error result without knowing what the parameter types are. +Make sure you are using the correct ABI and that the inputs exist on it.`,{docsPath:t,name:"AbiErrorInputsNotFoundError"})}}t.AbiErrorInputsNotFoundError=b;class m extends i.BaseError{constructor(e,{docsPath:t}={}){super(`Error ${e?`"${e}" `:""}not found on ABI. +Make sure you are using the correct ABI and that the error exists on it.`,{docsPath:t,name:"AbiErrorNotFoundError"})}}t.AbiErrorNotFoundError=m;class y extends i.BaseError{constructor(e,{docsPath:t}){super(`Encoded error signature "${e}" not found on ABI. +Make sure you are using the correct ABI and that the error exists on it. +You can look up the decoded signature here: https://openchain.xyz/signatures?query=${e}.`,{docsPath:t,name:"AbiErrorSignatureNotFoundError"}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.signature=e}}t.AbiErrorSignatureNotFoundError=y;class h extends i.BaseError{constructor({docsPath:e}){super("Cannot extract event signature from empty topics.",{docsPath:e,name:"AbiEventSignatureEmptyTopicsError"})}}t.AbiEventSignatureEmptyTopicsError=h;class g extends i.BaseError{constructor(e,{docsPath:t}){super(`Encoded event signature "${e}" not found on ABI. +Make sure you are using the correct ABI and that the event exists on it. +You can look up the signature here: https://openchain.xyz/signatures?query=${e}.`,{docsPath:t,name:"AbiEventSignatureNotFoundError"})}}t.AbiEventSignatureNotFoundError=g;class v extends i.BaseError{constructor(e,{docsPath:t}={}){super(`Event ${e?`"${e}" `:""}not found on ABI. +Make sure you are using the correct ABI and that the event exists on it.`,{docsPath:t,name:"AbiEventNotFoundError"})}}t.AbiEventNotFoundError=v;class E extends i.BaseError{constructor(e,{docsPath:t}={}){super(`Function ${e?`"${e}" `:""}not found on ABI. +Make sure you are using the correct ABI and that the function exists on it.`,{docsPath:t,name:"AbiFunctionNotFoundError"})}}t.AbiFunctionNotFoundError=E;class x extends i.BaseError{constructor(e,{docsPath:t}){super(`Function "${e}" does not contain any \`outputs\` on ABI. +Cannot decode function result without knowing what the parameter types are. +Make sure you are using the correct ABI and that the function exists on it.`,{docsPath:t,name:"AbiFunctionOutputsNotFoundError"})}}t.AbiFunctionOutputsNotFoundError=x;class w extends i.BaseError{constructor(e,{docsPath:t}){super(`Encoded function signature "${e}" not found on ABI. +Make sure you are using the correct ABI and that the function exists on it. +You can look up the signature here: https://openchain.xyz/signatures?query=${e}.`,{docsPath:t,name:"AbiFunctionSignatureNotFoundError"})}}t.AbiFunctionSignatureNotFoundError=w;class P extends i.BaseError{constructor(e,t){super("Found ambiguous types in overloaded ABI items.",{metaMessages:[`\`${e.type}\` in \`${(0,n.formatAbiItem)(e.abiItem)}\`, and`,`\`${t.type}\` in \`${(0,n.formatAbiItem)(t.abiItem)}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."],name:"AbiItemAmbiguityError"})}}t.AbiItemAmbiguityError=P;class I extends i.BaseError{constructor({expectedSize:e,givenSize:t}){super(`Expected bytes${e}, got bytes${t}.`,{name:"BytesSizeMismatchError"})}}t.BytesSizeMismatchError=I;class T extends i.BaseError{constructor({abiItem:e,data:t,params:r,size:o}){super(`Data size of ${o} bytes is too small for non-indexed event parameters.`,{metaMessages:[`Params: (${(0,n.formatAbiParams)(r,{includeName:!0})})`,`Data: ${t} (${o} bytes)`],name:"DecodeLogDataMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"params",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"size",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=e,this.data=t,this.params=r,this.size=o}}t.DecodeLogDataMismatch=T;class A extends i.BaseError{constructor({abiItem:e,param:t}){super(`Expected a topic for indexed event parameter${t.name?` "${t.name}"`:""} on event "${(0,n.formatAbiItem)(e,{includeName:!0})}".`,{name:"DecodeLogTopicsMismatch"}),Object.defineProperty(this,"abiItem",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abiItem=e}}t.DecodeLogTopicsMismatch=A;class O extends i.BaseError{constructor(e,{docsPath:t}){super(`Type "${e}" is not a valid encoding type. +Please provide a valid ABI type.`,{docsPath:t,name:"InvalidAbiEncodingType"})}}t.InvalidAbiEncodingTypeError=O;class B extends i.BaseError{constructor(e,{docsPath:t}){super(`Type "${e}" is not a valid decoding type. +Please provide a valid ABI type.`,{docsPath:t,name:"InvalidAbiDecodingType"})}}t.InvalidAbiDecodingTypeError=B;class S extends i.BaseError{constructor(e){super(`Value "${e}" is not a valid array.`,{name:"InvalidArrayError"})}}t.InvalidArrayError=S;class j extends i.BaseError{constructor(e){super(`"${e}" is not a valid definition type. +Valid types: "function", "event", "error"`,{name:"InvalidDefinitionTypeError"})}}t.InvalidDefinitionTypeError=j;class _ extends i.BaseError{constructor(e){super(`Type "${e}" is not supported for packed encoding.`,{name:"UnsupportedPackedAbiType"})}}t.UnsupportedPackedAbiType=_},64742:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.AccountTypeNotSupportedError=t.AccountNotFoundError=void 0;let n=r(3035);class o extends n.BaseError{constructor({docsPath:e}={}){super("Could not find an Account to execute with this Action.\nPlease provide an Account with the `account` argument on the Action, or by supplying an `account` to the Client.",{docsPath:e,docsSlug:"account",name:"AccountNotFoundError"})}}t.AccountNotFoundError=o;class i extends n.BaseError{constructor({docsPath:e,metaMessages:t,type:r}){super(`Account type "${r}" is not supported.`,{docsPath:e,metaMessages:t,name:"AccountTypeNotSupportedError"})}}t.AccountTypeNotSupportedError=i},30354:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidAddressError=void 0;let n=r(3035);class o extends n.BaseError{constructor({address:e}){super(`Address "${e}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}}t.InvalidAddressError=o},3035:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.BaseError=void 0,t.setErrorConfig=function(e){o=e};let n=r(53389),o={getDocsUrl:({docsBaseUrl:e,docsPath:t="",docsSlug:r})=>t?`${e??"https://viem.sh"}${t}${r?`#${r}`:""}`:void 0,version:`viem@${n.version}`};class i extends Error{constructor(e,t={}){let r=t.cause instanceof i?t.cause.details:t.cause?.message?t.cause.message:t.details,a=t.cause instanceof i&&t.cause.docsPath||t.docsPath,s=o.getDocsUrl?.({...t,docsPath:a});super([e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...s?[`Docs: ${s}`]:[],...r?[`Details: ${r}`]:[],...o.version?[`Version: ${o.version}`]:[]].join("\n"),t.cause?{cause:t.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=r,this.docsPath=a,this.metaMessages=t.metaMessages,this.name=t.name??this.name,this.shortMessage=e,this.version=n.version}walk(e){return function e(t,r){return r?.(t)?t:t&&"object"==typeof t&&"cause"in t&&void 0!==t.cause?e(t.cause,r):r?null:t}(this,e)}}t.BaseError=i},98417:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidVersionedHashVersionError=t.InvalidVersionedHashSizeError=t.EmptyBlobError=t.BlobSizeTooLargeError=void 0;let n=r(96611),o=r(3035);class i extends o.BaseError{constructor({maxSize:e,size:t}){super("Blob size is too large.",{metaMessages:[`Max: ${e} bytes`,`Given: ${t} bytes`],name:"BlobSizeTooLargeError"})}}t.BlobSizeTooLargeError=i;class a extends o.BaseError{constructor(){super("Blob data must not be empty.",{name:"EmptyBlobError"})}}t.EmptyBlobError=a;class s extends o.BaseError{constructor({hash:e,size:t}){super(`Versioned hash "${e}" size is invalid.`,{metaMessages:["Expected: 32",`Received: ${t}`],name:"InvalidVersionedHashSizeError"})}}t.InvalidVersionedHashSizeError=s;class u extends o.BaseError{constructor({hash:e,version:t}){super(`Versioned hash "${e}" version is invalid.`,{metaMessages:[`Expected: ${n.versionedHashVersionKzg}`,`Received: ${t}`],name:"InvalidVersionedHashVersionError"})}}t.InvalidVersionedHashVersionError=u},36240:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.BlockNotFoundError=void 0;let n=r(3035);class o extends n.BaseError{constructor({blockHash:e,blockNumber:t}){let r="Block";e&&(r=`Block at hash "${e}"`),t&&(r=`Block at number "${t}"`),super(`${r} could not be found.`,{name:"BlockNotFoundError"})}}t.BlockNotFoundError=o},7994:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.BundleFailedError=void 0;let n=r(3035);class o extends n.BaseError{constructor(e){super(`Call bundle failed with status: ${e.statusCode}`,{name:"BundleFailedError"}),Object.defineProperty(this,"result",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.result=e}}t.BundleFailedError=o},68344:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.OffchainLookupSenderMismatchError=t.OffchainLookupResponseMalformedError=t.OffchainLookupError=void 0;let n=r(71156),o=r(3035),i=r(63841);class a extends o.BaseError{constructor({callbackSelector:e,cause:t,data:r,extraData:n,sender:o,urls:a}){super(t.shortMessage||"An error occurred while fetching for an offchain result.",{cause:t,metaMessages:[...t.metaMessages||[],t.metaMessages?.length?"":[],"Offchain Gateway Call:",a&&[" Gateway URL(s):",...a.map(e=>` ${(0,i.getUrl)(e)}`)],` Sender: ${o}`,` Data: ${r}`,` Callback selector: ${e}`,` Extra data: ${n}`].flat(),name:"OffchainLookupError"})}}t.OffchainLookupError=a;class s extends o.BaseError{constructor({result:e,url:t}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${(0,i.getUrl)(t)}`,`Response: ${(0,n.stringify)(e)}`],name:"OffchainLookupResponseMalformedError"})}}t.OffchainLookupResponseMalformedError=s;class u extends o.BaseError{constructor({sender:e,to:t}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${t}`,`OffchainLookup sender address: ${e}`],name:"OffchainLookupSenderMismatchError"})}}t.OffchainLookupSenderMismatchError=u},3011:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidChainIdError=t.ClientChainNotConfiguredError=t.ChainNotFoundError=t.ChainMismatchError=t.ChainDoesNotSupportContract=void 0;let n=r(3035);class o extends n.BaseError{constructor({blockNumber:e,chain:t,contract:r}){super(`Chain "${t.name}" does not support contract "${r.name}".`,{metaMessages:["This could be due to any of the following:",...e&&r.blockCreated&&r.blockCreated>e?[`- The contract "${r.name}" was not deployed until block ${r.blockCreated} (current block ${e}).`]:[`- The chain does not have the contract "${r.name}" configured.`]],name:"ChainDoesNotSupportContract"})}}t.ChainDoesNotSupportContract=o;class i extends n.BaseError{constructor({chain:e,currentChainId:t}){super(`The current chain of the wallet (id: ${t}) does not match the target chain for the transaction (id: ${e.id} – ${e.name}).`,{metaMessages:[`Current Chain ID: ${t}`,`Expected Chain ID: ${e.id} – ${e.name}`],name:"ChainMismatchError"})}}t.ChainMismatchError=i;class a extends n.BaseError{constructor(){super("No chain was provided to the request.\nPlease provide a chain with the `chain` argument on the Action, or by supplying a `chain` to WalletClient.",{name:"ChainNotFoundError"})}}t.ChainNotFoundError=a;class s extends n.BaseError{constructor(){super("No chain was provided to the Client.",{name:"ClientChainNotConfiguredError"})}}t.ClientChainNotConfiguredError=s;class u extends n.BaseError{constructor({chainId:e}){super("number"==typeof e?`Chain ID "${e}" is invalid.`:"Chain ID is invalid.",{name:"InvalidChainIdError"})}}t.InvalidChainIdError=u},78924:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.RawContractError=t.CounterfactualDeploymentFailedError=t.ContractFunctionZeroDataError=t.ContractFunctionRevertedError=t.ContractFunctionExecutionError=t.CallExecutionError=void 0;let n=r(83153),o=r(14012),i=r(78220),a=r(70680),s=r(49830),u=r(52396),c=r(38928),l=r(18624),d=r(21837),f=r(3035),p=r(77191),b=r(29896),m=r(63841);class y extends f.BaseError{constructor(e,{account:t,docsPath:r,chain:o,data:i,gas:a,gasPrice:s,maxFeePerGas:u,maxPriorityFeePerGas:d,nonce:f,to:m,value:y,stateOverride:h}){let g=t?(0,n.parseAccount)(t):void 0,v=(0,b.prettyPrint)({from:g?.address,to:m,value:void 0!==y&&`${(0,c.formatEther)(y)} ${o?.nativeCurrency?.symbol||"ETH"}`,data:i,gas:a,gasPrice:void 0!==s&&`${(0,l.formatGwei)(s)} gwei`,maxFeePerGas:void 0!==u&&`${(0,l.formatGwei)(u)} gwei`,maxPriorityFeePerGas:void 0!==d&&`${(0,l.formatGwei)(d)} gwei`,nonce:f});h&&(v+=` +${(0,p.prettyStateOverride)(h)}`),super(e.shortMessage,{cause:e,docsPath:r,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Raw Call Arguments:",v].filter(Boolean),name:"CallExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=e}}t.CallExecutionError=y;class h extends f.BaseError{constructor(e,{abi:t,args:r,contractAddress:n,docsPath:o,functionName:i,sender:c}){let l=(0,u.getAbiItem)({abi:t,args:r,name:i}),d=l?(0,s.formatAbiItemWithArgs)({abiItem:l,args:r,includeFunctionName:!1,includeName:!1}):void 0,f=l?(0,a.formatAbiItem)(l,{includeName:!0}):void 0,p=(0,b.prettyPrint)({address:n&&(0,m.getContractAddress)(n),function:f,args:d&&"()"!==d&&`${[...Array(i?.length??0).keys()].map(()=>" ").join("")}${d}`,sender:c});super(e.shortMessage||`An unknown error occurred while executing the contract function "${i}".`,{cause:e,docsPath:o,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],p&&"Contract Call:",p].filter(Boolean),name:"ContractFunctionExecutionError"}),Object.defineProperty(this,"abi",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"args",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"contractAddress",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"formattedArgs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"functionName",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sender",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.abi=t,this.args=r,this.cause=e,this.contractAddress=n,this.functionName=i,this.sender=c}}t.ContractFunctionExecutionError=h;class g extends f.BaseError{constructor({abi:e,data:t,functionName:r,message:n}){let u,c,l,f,p;if(t&&"0x"!==t)try{let{abiItem:r,errorName:n,args:u}=c=(0,i.decodeErrorResult)({abi:e,data:t});if("Error"===n)f=u[0];else if("Panic"===n){let[e]=u;f=o.panicReasons[e]}else{let e=r?(0,a.formatAbiItem)(r,{includeName:!0}):void 0,t=r&&u?(0,s.formatAbiItemWithArgs)({abiItem:r,args:u,includeFunctionName:!1,includeName:!1}):void 0;l=[e?`Error: ${e}`:"",t&&"()"!==t?` ${[...Array(n?.length??0).keys()].map(()=>" ").join("")}${t}`:""]}}catch(e){u=e}else n&&(f=n);u instanceof d.AbiErrorSignatureNotFoundError&&(p=u.signature,l=[`Unable to decode signature "${p}" as it was not found on the provided ABI.`,"Make sure you are using the correct ABI and that the error exists on it.",`You can look up the decoded signature here: https://openchain.xyz/signatures?query=${p}.`]),super(f&&"execution reverted"!==f||p?[`The contract function "${r}" reverted with the following ${p?"signature":"reason"}:`,f||p].join("\n"):`The contract function "${r}" reverted.`,{cause:u,metaMessages:l,name:"ContractFunctionRevertedError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"raw",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"reason",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"signature",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=c,this.raw=t,this.reason=f,this.signature=p}}t.ContractFunctionRevertedError=g;class v extends f.BaseError{constructor({functionName:e}){super(`The contract function "${e}" returned no data ("0x").`,{metaMessages:["This could be due to any of the following:",` - The contract does not have the function "${e}",`," - The parameters passed to the contract function may be invalid, or"," - The address is not a contract."],name:"ContractFunctionZeroDataError"})}}t.ContractFunctionZeroDataError=v;class E extends f.BaseError{constructor({factory:e}){super(`Deployment for counterfactual contract call failed${e?` for factory "${e}".`:""}`,{metaMessages:["Please ensure:","- The `factory` is a valid contract deployment factory (ie. Create2 Factory, ERC-4337 Factory, etc).","- The `factoryData` is a valid encoded function call for contract deployment function on the factory."],name:"CounterfactualDeploymentFailedError"})}}t.CounterfactualDeploymentFailedError=E;class x extends f.BaseError{constructor({data:e,message:t}){super(t||"",{name:"RawContractError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=e}}t.RawContractError=x},69449:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.RecursiveReadLimitExceededError=t.PositionOutOfBoundsError=t.NegativeOffsetError=void 0;let n=r(3035);class o extends n.BaseError{constructor({offset:e}){super(`Offset \`${e}\` cannot be negative.`,{name:"NegativeOffsetError"})}}t.NegativeOffsetError=o;class i extends n.BaseError{constructor({length:e,position:t}){super(`Position \`${t}\` is out of bounds (\`0 < position < ${e}\`).`,{name:"PositionOutOfBoundsError"})}}t.PositionOutOfBoundsError=i;class a extends n.BaseError{constructor({count:e,limit:t}){super(`Recursive read limit of \`${t}\` exceeded (recursive read count: \`${e}\`).`,{name:"RecursiveReadLimitExceededError"})}}t.RecursiveReadLimitExceededError=a},97402:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidBytesLengthError=t.SizeExceedsPaddingSizeError=t.SliceOffsetOutOfBoundsError=void 0;let n=r(3035);class o extends n.BaseError{constructor({offset:e,position:t,size:r}){super(`Slice ${"start"===t?"starting":"ending"} at offset "${e}" is out-of-bounds (size: ${r}).`,{name:"SliceOffsetOutOfBoundsError"})}}t.SliceOffsetOutOfBoundsError=o;class i extends n.BaseError{constructor({size:e,targetSize:t,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (${e}) exceeds padding size (${t}).`,{name:"SizeExceedsPaddingSizeError"})}}t.SizeExceedsPaddingSizeError=i;class a extends n.BaseError{constructor({size:e,targetSize:t,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} is expected to be ${t} ${r} long, but is ${e} ${r} long.`,{name:"InvalidBytesLengthError"})}}t.InvalidBytesLengthError=a},37466:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.Eip712DomainNotFoundError=void 0;let n=r(3035);class o extends n.BaseError{constructor({address:e}){super(`No EIP-712 domain found on contract "${e}".`,{metaMessages:["Ensure that:",`- The contract is deployed at the address "${e}".`,"- `eip712Domain()` function exists on the contract.","- `eip712Domain()` function matches signature to ERC-5267 specification."],name:"Eip712DomainNotFoundError"})}}t.Eip712DomainNotFoundError=o},78753:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.SizeOverflowError=t.InvalidHexValueError=t.InvalidHexBooleanError=t.InvalidBytesBooleanError=t.IntegerOutOfRangeError=void 0;let n=r(3035);class o extends n.BaseError{constructor({max:e,min:t,signed:r,size:n,value:o}){super(`Number "${o}" is not in safe ${n?`${8*n}-bit ${r?"signed":"unsigned"} `:""}integer range ${e?`(${t} to ${e})`:`(above ${t})`}`,{name:"IntegerOutOfRangeError"})}}t.IntegerOutOfRangeError=o;class i extends n.BaseError{constructor(e){super(`Bytes value "${e}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`,{name:"InvalidBytesBooleanError"})}}t.InvalidBytesBooleanError=i;class a extends n.BaseError{constructor(e){super(`Hex value "${e}" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).`,{name:"InvalidHexBooleanError"})}}t.InvalidHexBooleanError=a;class s extends n.BaseError{constructor(e){super(`Hex value "${e}" is an odd length (${e.length}). It must be an even length.`,{name:"InvalidHexValueError"})}}t.InvalidHexValueError=s;class u extends n.BaseError{constructor({givenSize:e,maxSize:t}){super(`Size cannot exceed ${t} bytes. Given size: ${e} bytes.`,{name:"SizeOverflowError"})}}t.SizeOverflowError=u},62865:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.EnsInvalidChainIdError=t.EnsAvatarUnsupportedNamespaceError=t.EnsAvatarUriResolutionError=t.EnsAvatarInvalidNftUriError=t.EnsAvatarInvalidMetadataError=void 0;let n=r(3035);class o extends n.BaseError{constructor({data:e}){super("Unable to extract image from metadata. The metadata may be malformed or invalid.",{metaMessages:["- Metadata must be a JSON object with at least an `image`, `image_url` or `image_data` property.","",`Provided data: ${JSON.stringify(e)}`],name:"EnsAvatarInvalidMetadataError"})}}t.EnsAvatarInvalidMetadataError=o;class i extends n.BaseError{constructor({reason:e}){super(`ENS NFT avatar URI is invalid. ${e}`,{name:"EnsAvatarInvalidNftUriError"})}}t.EnsAvatarInvalidNftUriError=i;class a extends n.BaseError{constructor({uri:e}){super(`Unable to resolve ENS avatar URI "${e}". The URI may be malformed, invalid, or does not respond with a valid image.`,{name:"EnsAvatarUriResolutionError"})}}t.EnsAvatarUriResolutionError=a;class s extends n.BaseError{constructor({namespace:e}){super(`ENS NFT avatar namespace "${e}" is not supported. Must be "erc721" or "erc1155".`,{name:"EnsAvatarUnsupportedNamespaceError"})}}t.EnsAvatarUnsupportedNamespaceError=s;class u extends n.BaseError{constructor({chainId:e}){super(`Invalid ENSIP-11 chainId: ${e}. Must be between 0 and 0x7fffffff, or 1.`,{name:"EnsInvalidChainIdError"})}}t.EnsInvalidChainIdError=u},9359:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.EstimateGasExecutionError=void 0;let n=r(38928),o=r(18624),i=r(3035),a=r(29896);class s extends i.BaseError{constructor(e,{account:t,docsPath:r,chain:i,data:s,gas:u,gasPrice:c,maxFeePerGas:l,maxPriorityFeePerGas:d,nonce:f,to:p,value:b}){super(e.shortMessage,{cause:e,docsPath:r,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Estimate Gas Arguments:",(0,a.prettyPrint)({from:t?.address,to:p,value:void 0!==b&&`${(0,n.formatEther)(b)} ${i?.nativeCurrency?.symbol||"ETH"}`,data:s,gas:u,gasPrice:void 0!==c&&`${(0,o.formatGwei)(c)} gwei`,maxFeePerGas:void 0!==l&&`${(0,o.formatGwei)(l)} gwei`,maxPriorityFeePerGas:void 0!==d&&`${(0,o.formatGwei)(d)} gwei`,nonce:f})].filter(Boolean),name:"EstimateGasExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=e}}t.EstimateGasExecutionError=s},83978:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.MaxFeePerGasTooLowError=t.Eip1559FeesNotSupportedError=t.BaseFeeScalarError=void 0;let n=r(18624),o=r(3035);class i extends o.BaseError{constructor(){super("`baseFeeMultiplier` must be greater than 1.",{name:"BaseFeeScalarError"})}}t.BaseFeeScalarError=i;class a extends o.BaseError{constructor(){super("Chain does not support EIP-1559 fees.",{name:"Eip1559FeesNotSupportedError"})}}t.Eip1559FeesNotSupportedError=a;class s extends o.BaseError{constructor({maxPriorityFeePerGas:e}){super(`\`maxFeePerGas\` cannot be less than the \`maxPriorityFeePerGas\` (${(0,n.formatGwei)(e)} gwei).`,{name:"MaxFeePerGasTooLowError"})}}t.MaxFeePerGasTooLowError=s},41243:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.FilterTypeNotSupportedError=void 0;let n=r(3035);class o extends n.BaseError{constructor(e){super(`Filter type "${e}" is not supported.`,{name:"FilterTypeNotSupportedError"})}}t.FilterTypeNotSupportedError=o},21013:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.UnknownNodeError=t.TipAboveFeeCapError=t.TransactionTypeNotSupportedError=t.IntrinsicGasTooLowError=t.IntrinsicGasTooHighError=t.InsufficientFundsError=t.NonceMaxValueError=t.NonceTooLowError=t.NonceTooHighError=t.FeeCapTooLowError=t.FeeCapTooHighError=t.ExecutionRevertedError=void 0;let n=r(18624),o=r(3035);class i extends o.BaseError{constructor({cause:e,message:t}={}){let r=t?.replace("execution reverted: ","")?.replace("execution reverted","");super(`Execution reverted ${r?`with reason: ${r}`:"for an unknown reason"}.`,{cause:e,name:"ExecutionRevertedError"})}}t.ExecutionRevertedError=i,Object.defineProperty(i,"code",{enumerable:!0,configurable:!0,writable:!0,value:3}),Object.defineProperty(i,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});class a extends o.BaseError{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${(0,n.formatGwei)(t)} gwei`:""}) cannot be higher than the maximum allowed value (2^256-1).`,{cause:e,name:"FeeCapTooHighError"})}}t.FeeCapTooHighError=a,Object.defineProperty(a,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas higher than 2\^256-1|fee cap higher than 2\^256-1/});class s extends o.BaseError{constructor({cause:e,maxFeePerGas:t}={}){super(`The fee cap (\`maxFeePerGas\`${t?` = ${(0,n.formatGwei)(t)}`:""} gwei) cannot be lower than the block base fee.`,{cause:e,name:"FeeCapTooLowError"})}}t.FeeCapTooLowError=s,Object.defineProperty(s,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max fee per gas less than block base fee|fee cap less than block base fee|transaction is outdated/});class u extends o.BaseError{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}is higher than the next one expected.`,{cause:e,name:"NonceTooHighError"})}}t.NonceTooHighError=u,Object.defineProperty(u,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too high/});class c extends o.BaseError{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}is lower than the current nonce of the account. +Try increasing the nonce or find the latest nonce with \`getTransactionCount\`.`,{cause:e,name:"NonceTooLowError"})}}t.NonceTooLowError=c,Object.defineProperty(c,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce too low|transaction already imported|already known/});class l extends o.BaseError{constructor({cause:e,nonce:t}={}){super(`Nonce provided for the transaction ${t?`(${t}) `:""}exceeds the maximum allowed nonce.`,{cause:e,name:"NonceMaxValueError"})}}t.NonceMaxValueError=l,Object.defineProperty(l,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/nonce has max value/});class d extends o.BaseError{constructor({cause:e}={}){super("The total cost (gas * gas fee + value) of executing this transaction exceeds the balance of the account.",{cause:e,metaMessages:["This error could arise when the account does not have enough funds to:"," - pay for the total gas fee,"," - pay for the value to send."," ","The cost of the transaction is calculated as `gas * gas fee + value`, where:"," - `gas` is the amount of gas needed for transaction to execute,"," - `gas fee` is the gas fee,"," - `value` is the amount of ether to send to the recipient."],name:"InsufficientFundsError"})}}t.InsufficientFundsError=d,Object.defineProperty(d,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/insufficient funds|exceeds transaction sender account balance/});class f extends o.BaseError{constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction exceeds the limit allowed for the block.`,{cause:e,name:"IntrinsicGasTooHighError"})}}t.IntrinsicGasTooHighError=f,Object.defineProperty(f,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too high|gas limit reached/});class p extends o.BaseError{constructor({cause:e,gas:t}={}){super(`The amount of gas ${t?`(${t}) `:""}provided for the transaction is too low.`,{cause:e,name:"IntrinsicGasTooLowError"})}}t.IntrinsicGasTooLowError=p,Object.defineProperty(p,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/intrinsic gas too low/});class b extends o.BaseError{constructor({cause:e}){super("The transaction type is not supported for this chain.",{cause:e,name:"TransactionTypeNotSupportedError"})}}t.TransactionTypeNotSupportedError=b,Object.defineProperty(b,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/transaction type not valid/});class m extends o.BaseError{constructor({cause:e,maxPriorityFeePerGas:t,maxFeePerGas:r}={}){super(`The provided tip (\`maxPriorityFeePerGas\`${t?` = ${(0,n.formatGwei)(t)} gwei`:""}) cannot be higher than the fee cap (\`maxFeePerGas\`${r?` = ${(0,n.formatGwei)(r)} gwei`:""}).`,{cause:e,name:"TipAboveFeeCapError"})}}t.TipAboveFeeCapError=m,Object.defineProperty(m,"nodeMessage",{enumerable:!0,configurable:!0,writable:!0,value:/max priority fee per gas higher than max fee per gas|tip higher than fee cap/});class y extends o.BaseError{constructor({cause:e}){super(`An error occurred while executing: ${e?.shortMessage}`,{cause:e,name:"UnknownNodeError"})}}t.UnknownNodeError=y},8880:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.TimeoutError=t.SocketClosedError=t.RpcRequestError=t.WebSocketRequestError=t.HttpRequestError=void 0;let n=r(71156),o=r(3035),i=r(63841);class a extends o.BaseError{constructor({body:e,cause:t,details:r,headers:o,status:a,url:s}){super("HTTP request failed.",{cause:t,details:r,metaMessages:[a&&`Status: ${a}`,`URL: ${(0,i.getUrl)(s)}`,e&&`Request body: ${(0,n.stringify)(e)}`].filter(Boolean),name:"HttpRequestError"}),Object.defineProperty(this,"body",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"headers",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"status",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.body=e,this.headers=o,this.status=a,this.url=s}}t.HttpRequestError=a;class s extends o.BaseError{constructor({body:e,cause:t,details:r,url:o}){super("WebSocket request failed.",{cause:t,details:r,metaMessages:[`URL: ${(0,i.getUrl)(o)}`,e&&`Request body: ${(0,n.stringify)(e)}`].filter(Boolean),name:"WebSocketRequestError"}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.url=o}}t.WebSocketRequestError=s;class u extends o.BaseError{constructor({body:e,error:t,url:r}){super("RPC Request failed.",{cause:t,details:t.message,metaMessages:[`URL: ${(0,i.getUrl)(r)}`,`Request body: ${(0,n.stringify)(e)}`],name:"RpcRequestError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=t.code,this.data=t.data,this.url=r}}t.RpcRequestError=u;class c extends o.BaseError{constructor({url:e}={}){super("The socket has been closed.",{metaMessages:[e&&`URL: ${(0,i.getUrl)(e)}`].filter(Boolean),name:"SocketClosedError"}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.url=e}}t.SocketClosedError=c;class l extends o.BaseError{constructor({body:e,url:t}){super("The request took too long to respond.",{details:"The request timed out.",metaMessages:[`URL: ${(0,i.getUrl)(t)}`,`Request body: ${(0,n.stringify)(e)}`],name:"TimeoutError"}),Object.defineProperty(this,"url",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.url=t}}t.TimeoutError=l},23635:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.UnknownRpcError=t.AtomicityNotSupportedError=t.AtomicReadyWalletRejectedUpgradeError=t.BundleTooLargeError=t.UnknownBundleIdError=t.DuplicateIdError=t.UnsupportedChainIdError=t.UnsupportedNonOptionalCapabilityError=t.SwitchChainError=t.ChainDisconnectedError=t.ProviderDisconnectedError=t.UnsupportedProviderMethodError=t.UnauthorizedProviderError=t.UserRejectedRequestError=t.JsonRpcVersionUnsupportedError=t.LimitExceededRpcError=t.MethodNotSupportedRpcError=t.TransactionRejectedRpcError=t.ResourceUnavailableRpcError=t.ResourceNotFoundRpcError=t.InvalidInputRpcError=t.InternalRpcError=t.InvalidParamsRpcError=t.MethodNotFoundRpcError=t.InvalidRequestRpcError=t.ParseRpcError=t.ProviderRpcError=t.RpcError=void 0;let n=r(3035),o=r(8880);class i extends n.BaseError{constructor(e,{code:t,docsPath:r,metaMessages:n,name:i,shortMessage:a}){super(a,{cause:e,docsPath:r,metaMessages:n||e?.metaMessages,name:i||"RpcError"}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.name=i||e.name,this.code=e instanceof o.RpcRequestError?e.code:t??-1}}t.RpcError=i;class a extends i{constructor(e,t){super(e,t),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t.data}}t.ProviderRpcError=a;class s extends i{constructor(e){super(e,{code:s.code,name:"ParseRpcError",shortMessage:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."})}}t.ParseRpcError=s,Object.defineProperty(s,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32700});class u extends i{constructor(e){super(e,{code:u.code,name:"InvalidRequestRpcError",shortMessage:"JSON is not a valid request object."})}}t.InvalidRequestRpcError=u,Object.defineProperty(u,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32600});class c extends i{constructor(e,{method:t}={}){super(e,{code:c.code,name:"MethodNotFoundRpcError",shortMessage:`The method${t?` "${t}"`:""} does not exist / is not available.`})}}t.MethodNotFoundRpcError=c,Object.defineProperty(c,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32601});class l extends i{constructor(e){super(e,{code:l.code,name:"InvalidParamsRpcError",shortMessage:"Invalid parameters were provided to the RPC method.\nDouble check you have provided the correct parameters."})}}t.InvalidParamsRpcError=l,Object.defineProperty(l,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class d extends i{constructor(e){super(e,{code:d.code,name:"InternalRpcError",shortMessage:"An internal error was received."})}}t.InternalRpcError=d,Object.defineProperty(d,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32603});class f extends i{constructor(e){super(e,{code:f.code,name:"InvalidInputRpcError",shortMessage:"Missing or invalid parameters.\nDouble check you have provided the correct parameters."})}}t.InvalidInputRpcError=f,Object.defineProperty(f,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32e3});class p extends i{constructor(e){super(e,{code:p.code,name:"ResourceNotFoundRpcError",shortMessage:"Requested resource not found."}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ResourceNotFoundRpcError"})}}t.ResourceNotFoundRpcError=p,Object.defineProperty(p,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32001});class b extends i{constructor(e){super(e,{code:b.code,name:"ResourceUnavailableRpcError",shortMessage:"Requested resource not available."})}}t.ResourceUnavailableRpcError=b,Object.defineProperty(b,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32002});class m extends i{constructor(e){super(e,{code:m.code,name:"TransactionRejectedRpcError",shortMessage:"Transaction creation failed."})}}t.TransactionRejectedRpcError=m,Object.defineProperty(m,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32003});class y extends i{constructor(e,{method:t}={}){super(e,{code:y.code,name:"MethodNotSupportedRpcError",shortMessage:`Method${t?` "${t}"`:""} is not supported.`})}}t.MethodNotSupportedRpcError=y,Object.defineProperty(y,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32004});class h extends i{constructor(e){super(e,{code:h.code,name:"LimitExceededRpcError",shortMessage:"Request exceeds defined limit."})}}t.LimitExceededRpcError=h,Object.defineProperty(h,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32005});class g extends i{constructor(e){super(e,{code:g.code,name:"JsonRpcVersionUnsupportedError",shortMessage:"Version of JSON-RPC protocol is not supported."})}}t.JsonRpcVersionUnsupportedError=g,Object.defineProperty(g,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32006});class v extends a{constructor(e){super(e,{code:v.code,name:"UserRejectedRequestError",shortMessage:"User rejected the request."})}}t.UserRejectedRequestError=v,Object.defineProperty(v,"code",{enumerable:!0,configurable:!0,writable:!0,value:4001});class E extends a{constructor(e){super(e,{code:E.code,name:"UnauthorizedProviderError",shortMessage:"The requested method and/or account has not been authorized by the user."})}}t.UnauthorizedProviderError=E,Object.defineProperty(E,"code",{enumerable:!0,configurable:!0,writable:!0,value:4100});class x extends a{constructor(e,{method:t}={}){super(e,{code:x.code,name:"UnsupportedProviderMethodError",shortMessage:`The Provider does not support the requested method${t?` " ${t}"`:""}.`})}}t.UnsupportedProviderMethodError=x,Object.defineProperty(x,"code",{enumerable:!0,configurable:!0,writable:!0,value:4200});class w extends a{constructor(e){super(e,{code:w.code,name:"ProviderDisconnectedError",shortMessage:"The Provider is disconnected from all chains."})}}t.ProviderDisconnectedError=w,Object.defineProperty(w,"code",{enumerable:!0,configurable:!0,writable:!0,value:4900});class P extends a{constructor(e){super(e,{code:P.code,name:"ChainDisconnectedError",shortMessage:"The Provider is not connected to the requested chain."})}}t.ChainDisconnectedError=P,Object.defineProperty(P,"code",{enumerable:!0,configurable:!0,writable:!0,value:4901});class I extends a{constructor(e){super(e,{code:I.code,name:"SwitchChainError",shortMessage:"An error occurred when attempting to switch chain."})}}t.SwitchChainError=I,Object.defineProperty(I,"code",{enumerable:!0,configurable:!0,writable:!0,value:4902});class T extends a{constructor(e){super(e,{code:T.code,name:"UnsupportedNonOptionalCapabilityError",shortMessage:"This Wallet does not support a capability that was not marked as optional."})}}t.UnsupportedNonOptionalCapabilityError=T,Object.defineProperty(T,"code",{enumerable:!0,configurable:!0,writable:!0,value:5700});class A extends a{constructor(e){super(e,{code:A.code,name:"UnsupportedChainIdError",shortMessage:"This Wallet does not support the requested chain ID."})}}t.UnsupportedChainIdError=A,Object.defineProperty(A,"code",{enumerable:!0,configurable:!0,writable:!0,value:5710});class O extends a{constructor(e){super(e,{code:O.code,name:"DuplicateIdError",shortMessage:"There is already a bundle submitted with this ID."})}}t.DuplicateIdError=O,Object.defineProperty(O,"code",{enumerable:!0,configurable:!0,writable:!0,value:5720});class B extends a{constructor(e){super(e,{code:B.code,name:"UnknownBundleIdError",shortMessage:"This bundle id is unknown / has not been submitted"})}}t.UnknownBundleIdError=B,Object.defineProperty(B,"code",{enumerable:!0,configurable:!0,writable:!0,value:5730});class S extends a{constructor(e){super(e,{code:S.code,name:"BundleTooLargeError",shortMessage:"The call bundle is too large for the Wallet to process."})}}t.BundleTooLargeError=S,Object.defineProperty(S,"code",{enumerable:!0,configurable:!0,writable:!0,value:5740});class j extends a{constructor(e){super(e,{code:j.code,name:"AtomicReadyWalletRejectedUpgradeError",shortMessage:"The Wallet can support atomicity after an upgrade, but the user rejected the upgrade."})}}t.AtomicReadyWalletRejectedUpgradeError=j,Object.defineProperty(j,"code",{enumerable:!0,configurable:!0,writable:!0,value:5750});class _ extends a{constructor(e){super(e,{code:_.code,name:"AtomicityNotSupportedError",shortMessage:"The wallet does not support atomic execution but the request requires it."})}}t.AtomicityNotSupportedError=_,Object.defineProperty(_,"code",{enumerable:!0,configurable:!0,writable:!0,value:5760});class M extends i{constructor(e){super(e,{name:"UnknownRpcError",shortMessage:"An unknown RPC error occurred."})}}t.UnknownRpcError=M},77191:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.StateAssignmentConflictError=t.AccountStateConflictError=void 0,t.prettyStateMapping=a,t.prettyStateOverride=function(e){return e.reduce((e,{address:t,...r})=>{let n=`${e} ${t}: +`;return r.nonce&&(n+=` nonce: ${r.nonce} +`),r.balance&&(n+=` balance: ${r.balance} +`),r.code&&(n+=` code: ${r.code} +`),r.state&&(n+=" state:\n"+a(r.state)),r.stateDiff&&(n+=" stateDiff:\n"+a(r.stateDiff)),n}," State Override:\n").slice(0,-1)};let n=r(3035);class o extends n.BaseError{constructor({address:e}){super(`State for account "${e}" is set multiple times.`,{name:"AccountStateConflictError"})}}t.AccountStateConflictError=o;class i extends n.BaseError{constructor(){super("state and stateDiff are set on the same account.",{name:"StateAssignmentConflictError"})}}function a(e){return e.reduce((e,{slot:t,value:r})=>`${e} ${t}: ${r} +`,"")}t.StateAssignmentConflictError=i},29896:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.WaitForTransactionReceiptTimeoutError=t.TransactionReceiptRevertedError=t.TransactionReceiptNotFoundError=t.TransactionNotFoundError=t.TransactionExecutionError=t.InvalidStorageKeySizeError=t.InvalidSerializedTransactionError=t.InvalidSerializedTransactionTypeError=t.InvalidSerializableTransactionError=t.InvalidLegacyVError=t.FeeConflictError=void 0,t.prettyPrint=a;let n=r(38928),o=r(18624),i=r(3035);function a(e){let t=Object.entries(e).map(([e,t])=>void 0===t||!1===t?null:[e,t]).filter(Boolean),r=t.reduce((e,[t])=>Math.max(e,t.length),0);return t.map(([e,t])=>` ${`${e}:`.padEnd(r+1)} ${t}`).join("\n")}class s extends i.BaseError{constructor(){super("Cannot specify both a `gasPrice` and a `maxFeePerGas`/`maxPriorityFeePerGas`.\nUse `maxFeePerGas`/`maxPriorityFeePerGas` for EIP-1559 compatible networks, and `gasPrice` for others.",{name:"FeeConflictError"})}}t.FeeConflictError=s;class u extends i.BaseError{constructor({v:e}){super(`Invalid \`v\` value "${e}". Expected 27 or 28.`,{name:"InvalidLegacyVError"})}}t.InvalidLegacyVError=u;class c extends i.BaseError{constructor({transaction:e}){super("Cannot infer a transaction type from provided transaction.",{metaMessages:["Provided Transaction:","{",a(e),"}","","To infer the type, either provide:","- a `type` to the Transaction, or","- an EIP-1559 Transaction with `maxFeePerGas`, or","- an EIP-2930 Transaction with `gasPrice` & `accessList`, or","- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or","- an EIP-7702 Transaction with `authorizationList`, or","- a Legacy Transaction with `gasPrice`"],name:"InvalidSerializableTransactionError"})}}t.InvalidSerializableTransactionError=c;class l extends i.BaseError{constructor({serializedType:e}){super(`Serialized transaction type "${e}" is invalid.`,{name:"InvalidSerializedTransactionType"}),Object.defineProperty(this,"serializedType",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.serializedType=e}}t.InvalidSerializedTransactionTypeError=l;class d extends i.BaseError{constructor({attributes:e,serializedTransaction:t,type:r}){let n=Object.entries(e).map(([e,t])=>void 0===t?e:void 0).filter(Boolean);super(`Invalid serialized transaction of type "${r}" was provided.`,{metaMessages:[`Serialized Transaction: "${t}"`,n.length>0?`Missing Attributes: ${n.join(", ")}`:""].filter(Boolean),name:"InvalidSerializedTransactionError"}),Object.defineProperty(this,"serializedTransaction",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"type",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.serializedTransaction=t,this.type=r}}t.InvalidSerializedTransactionError=d;class f extends i.BaseError{constructor({storageKey:e}){super(`Size for storage key "${e}" is invalid. Expected 32 bytes. Got ${Math.floor((e.length-2)/2)} bytes.`,{name:"InvalidStorageKeySizeError"})}}t.InvalidStorageKeySizeError=f;class p extends i.BaseError{constructor(e,{account:t,docsPath:r,chain:i,data:s,gas:u,gasPrice:c,maxFeePerGas:l,maxPriorityFeePerGas:d,nonce:f,to:p,value:b}){super(e.shortMessage,{cause:e,docsPath:r,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Request Arguments:",a({chain:i&&`${i?.name} (id: ${i?.id})`,from:t?.address,to:p,value:void 0!==b&&`${(0,n.formatEther)(b)} ${i?.nativeCurrency?.symbol||"ETH"}`,data:s,gas:u,gasPrice:void 0!==c&&`${(0,o.formatGwei)(c)} gwei`,maxFeePerGas:void 0!==l&&`${(0,o.formatGwei)(l)} gwei`,maxPriorityFeePerGas:void 0!==d&&`${(0,o.formatGwei)(d)} gwei`,nonce:f})].filter(Boolean),name:"TransactionExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=e}}t.TransactionExecutionError=p;class b extends i.BaseError{constructor({blockHash:e,blockNumber:t,blockTag:r,hash:n,index:o}){let i="Transaction";r&&void 0!==o&&(i=`Transaction at block time "${r}" at index "${o}"`),e&&void 0!==o&&(i=`Transaction at block hash "${e}" at index "${o}"`),t&&void 0!==o&&(i=`Transaction at block number "${t}" at index "${o}"`),n&&(i=`Transaction with hash "${n}"`),super(`${i} could not be found.`,{name:"TransactionNotFoundError"})}}t.TransactionNotFoundError=b;class m extends i.BaseError{constructor({hash:e}){super(`Transaction receipt with hash "${e}" could not be found. The Transaction may not be processed on a block yet.`,{name:"TransactionReceiptNotFoundError"})}}t.TransactionReceiptNotFoundError=m;class y extends i.BaseError{constructor({receipt:e}){super(`Transaction with hash "${e.transactionHash}" reverted.`,{metaMessages:['The receipt marked the transaction as "reverted". This could mean that the function on the contract you are trying to call threw an error.'," ","You can attempt to extract the revert reason by:","- calling the `simulateContract` or `simulateCalls` Action with the `abi` and `functionName` of the contract","- using the `call` Action with raw `data`"],name:"TransactionReceiptRevertedError"}),Object.defineProperty(this,"receipt",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.receipt=e}}t.TransactionReceiptRevertedError=y;class h extends i.BaseError{constructor({hash:e}){super(`Timed out while waiting for transaction with hash "${e}" to be confirmed.`,{name:"WaitForTransactionReceiptTimeoutError"})}}t.WaitForTransactionReceiptTimeoutError=h},37511:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.UrlRequiredError=void 0;let n=r(3035);class o extends n.BaseError{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro",name:"UrlRequiredError"})}}t.UrlRequiredError=o},52573:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidStructTypeError=t.InvalidPrimaryTypeError=t.InvalidDomainError=void 0;let n=r(71156),o=r(3035);class i extends o.BaseError{constructor({domain:e}){super(`Invalid domain "${(0,n.stringify)(e)}".`,{metaMessages:["Must be a valid EIP-712 domain."]})}}t.InvalidDomainError=i;class a extends o.BaseError{constructor({primaryType:e,types:t}){super(`Invalid primary type \`${e}\` must be one of \`${JSON.stringify(Object.keys(t))}\`.`,{docsPath:"/api/glossary/Errors#typeddatainvalidprimarytypeerror",metaMessages:["Check that the primary type is a key in `types`."]})}}t.InvalidPrimaryTypeError=a;class s extends o.BaseError{constructor({type:e}){super(`Struct type "${e}" is invalid.`,{metaMessages:["Struct type must not be a Solidity type."],name:"InvalidStructTypeError"})}}t.InvalidStructTypeError=s},3013:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidDecimalNumberError=void 0;let n=r(3035);class o extends n.BaseError{constructor({value:e}){super(`Number \`${e}\` is not a valid decimal number.`,{name:"InvalidDecimalNumberError"})}}t.InvalidDecimalNumberError=o},63841:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getUrl=t.getContractAddress=void 0,t.getContractAddress=e=>e,t.getUrl=e=>e},53389:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="2.42.1"},50512:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.maxInt8=t.universalSignatureValidatorByteCode=t.erc6492SignatureValidatorByteCode=t.deploylessCallViaFactoryBytecode=t.deploylessCallViaBytecodeBytecode=t.zeroHash=t.zeroAddress=t.ethAddress=t.multicall3Abi=t.universalSignatureValidatorAbi=t.erc6492SignatureValidatorAbi=t.erc4626Abi=t.erc1155Abi=t.erc721Abi=t.erc20Abi_bytes32=t.erc20Abi=t.webSocket=t.http=t.shouldThrow=t.fallback=t.custom=t.createTransport=t.walletActions=t.testActions=t.publicActions=t.createWalletClient=t.createTestClient=t.createPublicClient=t.rpcSchema=t.createClient=t.WaitForCallsStatusTimeoutError=t.getContract=t.UnknownTypeError=t.UnknownSignatureError=t.SolidityProtectedKeywordError=t.parseAbiParameters=t.parseAbiParameter=t.parseAbiItem=t.parseAbi=t.InvalidStructSignatureError=t.InvalidSignatureError=t.InvalidParenthesisError=t.InvalidParameterError=t.InvalidModifierError=t.InvalidFunctionModifierError=t.InvalidAbiTypeParameterError=t.InvalidAbiParametersError=t.InvalidAbiParameterError=t.InvalidAbiItemError=t.CircularReferenceError=void 0,t.maxUint152=t.maxUint144=t.maxUint136=t.maxUint128=t.maxUint120=t.maxUint112=t.maxUint104=t.maxUint96=t.maxUint88=t.maxUint80=t.maxUint72=t.maxUint64=t.maxUint56=t.maxUint48=t.maxUint40=t.maxUint32=t.maxUint24=t.maxUint16=t.maxUint8=t.maxInt256=t.maxInt248=t.maxInt240=t.maxInt232=t.maxInt224=t.maxInt216=t.maxInt208=t.maxInt200=t.maxInt192=t.maxInt184=t.maxInt176=t.maxInt168=t.maxInt160=t.maxInt152=t.maxInt144=t.maxInt136=t.maxInt128=t.maxInt120=t.maxInt112=t.maxInt104=t.maxInt96=t.maxInt88=t.maxInt80=t.maxInt72=t.maxInt64=t.maxInt56=t.maxInt48=t.maxInt40=t.maxInt32=t.maxInt24=t.maxInt16=void 0,t.AbiConstructorNotFoundError=t.weiUnits=t.gweiUnits=t.etherUnits=t.presignMessagePrefix=t.minInt256=t.minInt248=t.minInt240=t.minInt232=t.minInt224=t.minInt216=t.minInt208=t.minInt200=t.minInt192=t.minInt184=t.minInt176=t.minInt168=t.minInt160=t.minInt152=t.minInt144=t.minInt136=t.minInt128=t.minInt120=t.minInt112=t.minInt104=t.minInt96=t.minInt88=t.minInt80=t.minInt72=t.minInt64=t.minInt56=t.minInt48=t.minInt40=t.minInt32=t.minInt24=t.minInt16=t.minInt8=t.maxUint256=t.maxUint248=t.maxUint240=t.maxUint232=t.maxUint224=t.maxUint216=t.maxUint208=t.maxUint200=t.maxUint192=t.maxUint184=t.maxUint176=t.maxUint168=t.maxUint160=void 0,t.EnsAvatarUriResolutionError=t.EnsAvatarUnsupportedNamespaceError=t.EnsAvatarInvalidNftUriError=t.SizeOverflowError=t.InvalidHexValueError=t.InvalidHexBooleanError=t.InvalidBytesBooleanError=t.IntegerOutOfRangeError=t.SliceOffsetOutOfBoundsError=t.SizeExceedsPaddingSizeError=t.RawContractError=t.CounterfactualDeploymentFailedError=t.ContractFunctionZeroDataError=t.ContractFunctionRevertedError=t.ContractFunctionExecutionError=t.CallExecutionError=t.InvalidChainIdError=t.ClientChainNotConfiguredError=t.ChainNotFoundError=t.ChainMismatchError=t.ChainDoesNotSupportContract=t.BundleFailedError=t.BlockNotFoundError=t.setErrorConfig=t.BaseError=t.InvalidAddressError=t.UnsupportedPackedAbiType=t.InvalidDefinitionTypeError=t.InvalidArrayError=t.InvalidAbiEncodingTypeError=t.InvalidAbiDecodingTypeError=t.DecodeLogTopicsMismatch=t.DecodeLogDataMismatch=t.BytesSizeMismatchError=t.AbiFunctionSignatureNotFoundError=t.AbiFunctionOutputsNotFoundError=t.AbiFunctionNotFoundError=t.AbiEventSignatureNotFoundError=t.AbiEventSignatureEmptyTopicsError=t.AbiEventNotFoundError=t.AbiErrorSignatureNotFoundError=t.AbiErrorNotFoundError=t.AbiErrorInputsNotFoundError=t.AbiEncodingLengthMismatchError=t.AbiEncodingBytesSizeMismatchError=t.AbiEncodingArrayLengthMismatchError=t.AbiDecodingZeroDataError=t.AbiDecodingDataSizeTooSmallError=t.AbiDecodingDataSizeInvalidError=t.AbiConstructorParamsNotFoundError=void 0,t.UnsupportedProviderMethodError=t.UnsupportedNonOptionalCapabilityError=t.UnsupportedChainIdError=t.UnknownRpcError=t.UnknownBundleIdError=t.UnauthorizedProviderError=t.TransactionRejectedRpcError=t.SwitchChainError=t.RpcError=t.ResourceUnavailableRpcError=t.ResourceNotFoundRpcError=t.ProviderRpcError=t.ProviderDisconnectedError=t.ParseRpcError=t.MethodNotSupportedRpcError=t.MethodNotFoundRpcError=t.LimitExceededRpcError=t.JsonRpcVersionUnsupportedError=t.InvalidRequestRpcError=t.InvalidParamsRpcError=t.InvalidInputRpcError=t.InternalRpcError=t.DuplicateIdError=t.ChainDisconnectedError=t.BundleTooLargeError=t.AtomicReadyWalletRejectedUpgradeError=t.AtomicityNotSupportedError=t.WebSocketRequestError=t.TimeoutError=t.SocketClosedError=t.RpcRequestError=t.HttpRequestError=t.UnknownNodeError=t.TransactionTypeNotSupportedError=t.TipAboveFeeCapError=t.NonceTooLowError=t.NonceTooHighError=t.NonceMaxValueError=t.IntrinsicGasTooLowError=t.IntrinsicGasTooHighError=t.InsufficientFundsError=t.FeeCapTooLowError=t.FeeCapTooHighError=t.ExecutionRevertedError=t.FilterTypeNotSupportedError=t.MaxFeePerGasTooLowError=t.Eip1559FeesNotSupportedError=t.BaseFeeScalarError=t.EstimateGasExecutionError=t.EnsInvalidChainIdError=void 0,t.toBlobs=t.toBlobSidecars=t.sidecarsToVersionedHashes=t.fromBlobs=t.commitmentToVersionedHash=t.commitmentsToVersionedHashes=t.blobsToProofs=t.blobsToCommitments=t.isAddressEqual=t.isAddress=t.getCreateAddress=t.getCreate2Address=t.getContractAddress=t.getAddress=t.checksumAddress=t.prepareEncodeFunctionData=t.parseEventLogs=t.getAbiItem=t.encodePacked=t.encodeFunctionResult=t.encodeFunctionData=t.encodeEventTopics=t.encodeErrorResult=t.encodeDeployData=t.encodeAbiParameters=t.decodeFunctionResult=t.decodeFunctionData=t.decodeEventLog=t.decodeErrorResult=t.decodeDeployData=t.decodeAbiParameters=t.EIP1193ProviderRpcError=t.InvalidDecimalNumberError=t.InvalidStructTypeError=t.InvalidPrimaryTypeError=t.InvalidDomainError=t.UrlRequiredError=t.WaitForTransactionReceiptTimeoutError=t.TransactionReceiptNotFoundError=t.TransactionNotFoundError=t.TransactionExecutionError=t.InvalidStorageKeySizeError=t.InvalidSerializedTransactionTypeError=t.InvalidSerializedTransactionError=t.InvalidSerializableTransactionError=t.InvalidLegacyVError=t.FeeConflictError=t.StateAssignmentConflictError=t.AccountStateConflictError=t.UserRejectedRequestError=void 0,t.getContractError=t.toCoinType=t.namehash=t.labelhash=t.toRlp=t.hexToRlp=t.bytesToRlp=t.toHex=t.stringToHex=t.numberToHex=t.bytesToHex=t.boolToHex=t.toBytes=t.stringToBytes=t.numberToBytes=t.hexToBytes=t.boolToBytes=t.fromRlp=t.hexToString=t.hexToNumber=t.hexToBool=t.hexToBigInt=t.fromHex=t.fromBytes=t.bytesToString=t.bytesToNumber=t.bytesToBool=t.bytesToBigInt=t.trim=t.sliceHex=t.sliceBytes=t.slice=t.size=t.padHex=t.padBytes=t.pad=t.isHex=t.isBytes=t.concatHex=t.concatBytes=t.concat=t.getChainContractAddress=t.extractChain=t.defineChain=t.assertCurrentChain=t.offchainLookupSignature=t.offchainLookupAbiItem=t.offchainLookup=t.ccipFetch=t.ccipRequest=void 0,t.recoverTypedDataAddress=t.recoverTransactionAddress=t.recoverPublicKey=t.recoverMessageAddress=t.recoverAddress=t.parseSignature=t.hexToSignature=t.parseErc8010Signature=t.parseErc6492Signature=t.parseCompactSignature=t.hexToCompactSignature=t.isErc8010Signature=t.isErc6492Signature=t.hashTypedData=t.hashStruct=t.hashDomain=t.hashMessage=t.compactSignatureToSignature=t.withTimeout=t.withRetry=t.withCache=t.nonceManager=t.createNonceManager=t.setupKzg=t.defineKzg=t.getFunctionSignature=t.toFunctionSignature=t.getFunctionSelector=t.toFunctionSelector=t.toFunctionHash=t.getEventSignature=t.toEventSignature=t.getEventSelector=t.toEventSelector=t.toEventHash=t.sha256=t.ripemd160=t.keccak256=t.isHash=t.rpcTransactionType=t.formatTransactionRequest=t.defineTransactionRequest=t.formatTransactionReceipt=t.defineTransactionReceipt=t.transactionType=t.formatTransaction=t.defineTransaction=t.formatLog=t.formatBlock=t.defineBlock=void 0,t.parseUnits=t.parseGwei=t.parseEther=t.formatUnits=t.formatGwei=t.formatEther=t.validateTypedData=t.serializeTypedData=t.getTypesForEIP712Domain=t.domainSeparator=t.serializeTransaction=t.serializeAccessList=t.parseTransaction=t.getTransactionType=t.getSerializedTransactionType=t.assertTransactionLegacy=t.assertTransactionEIP2930=t.assertTransactionEIP1559=t.assertRequest=t.stringify=t.verifyTypedData=t.verifyMessage=t.verifyHash=t.toPrefixedMessage=t.signatureToCompactSignature=t.serializeSignature=t.signatureToHex=t.serializeErc8010Signature=t.serializeErc6492Signature=t.serializeCompactSignature=t.compactSignatureToHex=void 0;var n=r(65991);Object.defineProperty(t,"CircularReferenceError",{enumerable:!0,get:function(){return n.CircularReferenceError}}),Object.defineProperty(t,"InvalidAbiItemError",{enumerable:!0,get:function(){return n.InvalidAbiItemError}}),Object.defineProperty(t,"InvalidAbiParameterError",{enumerable:!0,get:function(){return n.InvalidAbiParameterError}}),Object.defineProperty(t,"InvalidAbiParametersError",{enumerable:!0,get:function(){return n.InvalidAbiParametersError}}),Object.defineProperty(t,"InvalidAbiTypeParameterError",{enumerable:!0,get:function(){return n.InvalidAbiTypeParameterError}}),Object.defineProperty(t,"InvalidFunctionModifierError",{enumerable:!0,get:function(){return n.InvalidFunctionModifierError}}),Object.defineProperty(t,"InvalidModifierError",{enumerable:!0,get:function(){return n.InvalidModifierError}}),Object.defineProperty(t,"InvalidParameterError",{enumerable:!0,get:function(){return n.InvalidParameterError}}),Object.defineProperty(t,"InvalidParenthesisError",{enumerable:!0,get:function(){return n.InvalidParenthesisError}}),Object.defineProperty(t,"InvalidSignatureError",{enumerable:!0,get:function(){return n.InvalidSignatureError}}),Object.defineProperty(t,"InvalidStructSignatureError",{enumerable:!0,get:function(){return n.InvalidStructSignatureError}}),Object.defineProperty(t,"parseAbi",{enumerable:!0,get:function(){return n.parseAbi}}),Object.defineProperty(t,"parseAbiItem",{enumerable:!0,get:function(){return n.parseAbiItem}}),Object.defineProperty(t,"parseAbiParameter",{enumerable:!0,get:function(){return n.parseAbiParameter}}),Object.defineProperty(t,"parseAbiParameters",{enumerable:!0,get:function(){return n.parseAbiParameters}}),Object.defineProperty(t,"SolidityProtectedKeywordError",{enumerable:!0,get:function(){return n.SolidityProtectedKeywordError}}),Object.defineProperty(t,"UnknownSignatureError",{enumerable:!0,get:function(){return n.UnknownSignatureError}}),Object.defineProperty(t,"UnknownTypeError",{enumerable:!0,get:function(){return n.UnknownTypeError}});var o=r(85694);Object.defineProperty(t,"getContract",{enumerable:!0,get:function(){return o.getContract}});var i=r(65762);Object.defineProperty(t,"WaitForCallsStatusTimeoutError",{enumerable:!0,get:function(){return i.WaitForCallsStatusTimeoutError}});var a=r(3542);Object.defineProperty(t,"createClient",{enumerable:!0,get:function(){return a.createClient}}),Object.defineProperty(t,"rpcSchema",{enumerable:!0,get:function(){return a.rpcSchema}});var s=r(46011);Object.defineProperty(t,"createPublicClient",{enumerable:!0,get:function(){return s.createPublicClient}});var u=r(52952);Object.defineProperty(t,"createTestClient",{enumerable:!0,get:function(){return u.createTestClient}});var c=r(93549);Object.defineProperty(t,"createWalletClient",{enumerable:!0,get:function(){return c.createWalletClient}});var l=r(97888);Object.defineProperty(t,"publicActions",{enumerable:!0,get:function(){return l.publicActions}});var d=r(91307);Object.defineProperty(t,"testActions",{enumerable:!0,get:function(){return d.testActions}});var f=r(57736);Object.defineProperty(t,"walletActions",{enumerable:!0,get:function(){return f.walletActions}});var p=r(1286);Object.defineProperty(t,"createTransport",{enumerable:!0,get:function(){return p.createTransport}});var b=r(60019);Object.defineProperty(t,"custom",{enumerable:!0,get:function(){return b.custom}});var m=r(70371);Object.defineProperty(t,"fallback",{enumerable:!0,get:function(){return m.fallback}}),Object.defineProperty(t,"shouldThrow",{enumerable:!0,get:function(){return m.shouldThrow}});var y=r(70090);Object.defineProperty(t,"http",{enumerable:!0,get:function(){return y.http}});var h=r(54123);Object.defineProperty(t,"webSocket",{enumerable:!0,get:function(){return h.webSocket}});var g=r(73579);Object.defineProperty(t,"erc20Abi",{enumerable:!0,get:function(){return g.erc20Abi}}),Object.defineProperty(t,"erc20Abi_bytes32",{enumerable:!0,get:function(){return g.erc20Abi_bytes32}}),Object.defineProperty(t,"erc721Abi",{enumerable:!0,get:function(){return g.erc721Abi}}),Object.defineProperty(t,"erc1155Abi",{enumerable:!0,get:function(){return g.erc1155Abi}}),Object.defineProperty(t,"erc4626Abi",{enumerable:!0,get:function(){return g.erc4626Abi}}),Object.defineProperty(t,"erc6492SignatureValidatorAbi",{enumerable:!0,get:function(){return g.erc6492SignatureValidatorAbi}}),Object.defineProperty(t,"universalSignatureValidatorAbi",{enumerable:!0,get:function(){return g.erc6492SignatureValidatorAbi}}),Object.defineProperty(t,"multicall3Abi",{enumerable:!0,get:function(){return g.multicall3Abi}});var v=r(96784);Object.defineProperty(t,"ethAddress",{enumerable:!0,get:function(){return v.ethAddress}}),Object.defineProperty(t,"zeroAddress",{enumerable:!0,get:function(){return v.zeroAddress}});var E=r(99624);Object.defineProperty(t,"zeroHash",{enumerable:!0,get:function(){return E.zeroHash}});var x=r(22530);Object.defineProperty(t,"deploylessCallViaBytecodeBytecode",{enumerable:!0,get:function(){return x.deploylessCallViaBytecodeBytecode}}),Object.defineProperty(t,"deploylessCallViaFactoryBytecode",{enumerable:!0,get:function(){return x.deploylessCallViaFactoryBytecode}}),Object.defineProperty(t,"erc6492SignatureValidatorByteCode",{enumerable:!0,get:function(){return x.erc6492SignatureValidatorByteCode}}),Object.defineProperty(t,"universalSignatureValidatorByteCode",{enumerable:!0,get:function(){return x.erc6492SignatureValidatorByteCode}});var w=r(22164);Object.defineProperty(t,"maxInt8",{enumerable:!0,get:function(){return w.maxInt8}}),Object.defineProperty(t,"maxInt16",{enumerable:!0,get:function(){return w.maxInt16}}),Object.defineProperty(t,"maxInt24",{enumerable:!0,get:function(){return w.maxInt24}}),Object.defineProperty(t,"maxInt32",{enumerable:!0,get:function(){return w.maxInt32}}),Object.defineProperty(t,"maxInt40",{enumerable:!0,get:function(){return w.maxInt40}}),Object.defineProperty(t,"maxInt48",{enumerable:!0,get:function(){return w.maxInt48}}),Object.defineProperty(t,"maxInt56",{enumerable:!0,get:function(){return w.maxInt56}}),Object.defineProperty(t,"maxInt64",{enumerable:!0,get:function(){return w.maxInt64}}),Object.defineProperty(t,"maxInt72",{enumerable:!0,get:function(){return w.maxInt72}}),Object.defineProperty(t,"maxInt80",{enumerable:!0,get:function(){return w.maxInt80}}),Object.defineProperty(t,"maxInt88",{enumerable:!0,get:function(){return w.maxInt88}}),Object.defineProperty(t,"maxInt96",{enumerable:!0,get:function(){return w.maxInt96}}),Object.defineProperty(t,"maxInt104",{enumerable:!0,get:function(){return w.maxInt104}}),Object.defineProperty(t,"maxInt112",{enumerable:!0,get:function(){return w.maxInt112}}),Object.defineProperty(t,"maxInt120",{enumerable:!0,get:function(){return w.maxInt120}}),Object.defineProperty(t,"maxInt128",{enumerable:!0,get:function(){return w.maxInt128}}),Object.defineProperty(t,"maxInt136",{enumerable:!0,get:function(){return w.maxInt136}}),Object.defineProperty(t,"maxInt144",{enumerable:!0,get:function(){return w.maxInt144}}),Object.defineProperty(t,"maxInt152",{enumerable:!0,get:function(){return w.maxInt152}}),Object.defineProperty(t,"maxInt160",{enumerable:!0,get:function(){return w.maxInt160}}),Object.defineProperty(t,"maxInt168",{enumerable:!0,get:function(){return w.maxInt168}}),Object.defineProperty(t,"maxInt176",{enumerable:!0,get:function(){return w.maxInt176}}),Object.defineProperty(t,"maxInt184",{enumerable:!0,get:function(){return w.maxInt184}}),Object.defineProperty(t,"maxInt192",{enumerable:!0,get:function(){return w.maxInt192}}),Object.defineProperty(t,"maxInt200",{enumerable:!0,get:function(){return w.maxInt200}}),Object.defineProperty(t,"maxInt208",{enumerable:!0,get:function(){return w.maxInt208}}),Object.defineProperty(t,"maxInt216",{enumerable:!0,get:function(){return w.maxInt216}}),Object.defineProperty(t,"maxInt224",{enumerable:!0,get:function(){return w.maxInt224}}),Object.defineProperty(t,"maxInt232",{enumerable:!0,get:function(){return w.maxInt232}}),Object.defineProperty(t,"maxInt240",{enumerable:!0,get:function(){return w.maxInt240}}),Object.defineProperty(t,"maxInt248",{enumerable:!0,get:function(){return w.maxInt248}}),Object.defineProperty(t,"maxInt256",{enumerable:!0,get:function(){return w.maxInt256}}),Object.defineProperty(t,"maxUint8",{enumerable:!0,get:function(){return w.maxUint8}}),Object.defineProperty(t,"maxUint16",{enumerable:!0,get:function(){return w.maxUint16}}),Object.defineProperty(t,"maxUint24",{enumerable:!0,get:function(){return w.maxUint24}}),Object.defineProperty(t,"maxUint32",{enumerable:!0,get:function(){return w.maxUint32}}),Object.defineProperty(t,"maxUint40",{enumerable:!0,get:function(){return w.maxUint40}}),Object.defineProperty(t,"maxUint48",{enumerable:!0,get:function(){return w.maxUint48}}),Object.defineProperty(t,"maxUint56",{enumerable:!0,get:function(){return w.maxUint56}}),Object.defineProperty(t,"maxUint64",{enumerable:!0,get:function(){return w.maxUint64}}),Object.defineProperty(t,"maxUint72",{enumerable:!0,get:function(){return w.maxUint72}}),Object.defineProperty(t,"maxUint80",{enumerable:!0,get:function(){return w.maxUint80}}),Object.defineProperty(t,"maxUint88",{enumerable:!0,get:function(){return w.maxUint88}}),Object.defineProperty(t,"maxUint96",{enumerable:!0,get:function(){return w.maxUint96}}),Object.defineProperty(t,"maxUint104",{enumerable:!0,get:function(){return w.maxUint104}}),Object.defineProperty(t,"maxUint112",{enumerable:!0,get:function(){return w.maxUint112}}),Object.defineProperty(t,"maxUint120",{enumerable:!0,get:function(){return w.maxUint120}}),Object.defineProperty(t,"maxUint128",{enumerable:!0,get:function(){return w.maxUint128}}),Object.defineProperty(t,"maxUint136",{enumerable:!0,get:function(){return w.maxUint136}}),Object.defineProperty(t,"maxUint144",{enumerable:!0,get:function(){return w.maxUint144}}),Object.defineProperty(t,"maxUint152",{enumerable:!0,get:function(){return w.maxUint152}}),Object.defineProperty(t,"maxUint160",{enumerable:!0,get:function(){return w.maxUint160}}),Object.defineProperty(t,"maxUint168",{enumerable:!0,get:function(){return w.maxUint168}}),Object.defineProperty(t,"maxUint176",{enumerable:!0,get:function(){return w.maxUint176}}),Object.defineProperty(t,"maxUint184",{enumerable:!0,get:function(){return w.maxUint184}}),Object.defineProperty(t,"maxUint192",{enumerable:!0,get:function(){return w.maxUint192}}),Object.defineProperty(t,"maxUint200",{enumerable:!0,get:function(){return w.maxUint200}}),Object.defineProperty(t,"maxUint208",{enumerable:!0,get:function(){return w.maxUint208}}),Object.defineProperty(t,"maxUint216",{enumerable:!0,get:function(){return w.maxUint216}}),Object.defineProperty(t,"maxUint224",{enumerable:!0,get:function(){return w.maxUint224}}),Object.defineProperty(t,"maxUint232",{enumerable:!0,get:function(){return w.maxUint232}}),Object.defineProperty(t,"maxUint240",{enumerable:!0,get:function(){return w.maxUint240}}),Object.defineProperty(t,"maxUint248",{enumerable:!0,get:function(){return w.maxUint248}}),Object.defineProperty(t,"maxUint256",{enumerable:!0,get:function(){return w.maxUint256}}),Object.defineProperty(t,"minInt8",{enumerable:!0,get:function(){return w.minInt8}}),Object.defineProperty(t,"minInt16",{enumerable:!0,get:function(){return w.minInt16}}),Object.defineProperty(t,"minInt24",{enumerable:!0,get:function(){return w.minInt24}}),Object.defineProperty(t,"minInt32",{enumerable:!0,get:function(){return w.minInt32}}),Object.defineProperty(t,"minInt40",{enumerable:!0,get:function(){return w.minInt40}}),Object.defineProperty(t,"minInt48",{enumerable:!0,get:function(){return w.minInt48}}),Object.defineProperty(t,"minInt56",{enumerable:!0,get:function(){return w.minInt56}}),Object.defineProperty(t,"minInt64",{enumerable:!0,get:function(){return w.minInt64}}),Object.defineProperty(t,"minInt72",{enumerable:!0,get:function(){return w.minInt72}}),Object.defineProperty(t,"minInt80",{enumerable:!0,get:function(){return w.minInt80}}),Object.defineProperty(t,"minInt88",{enumerable:!0,get:function(){return w.minInt88}}),Object.defineProperty(t,"minInt96",{enumerable:!0,get:function(){return w.minInt96}}),Object.defineProperty(t,"minInt104",{enumerable:!0,get:function(){return w.minInt104}}),Object.defineProperty(t,"minInt112",{enumerable:!0,get:function(){return w.minInt112}}),Object.defineProperty(t,"minInt120",{enumerable:!0,get:function(){return w.minInt120}}),Object.defineProperty(t,"minInt128",{enumerable:!0,get:function(){return w.minInt128}}),Object.defineProperty(t,"minInt136",{enumerable:!0,get:function(){return w.minInt136}}),Object.defineProperty(t,"minInt144",{enumerable:!0,get:function(){return w.minInt144}}),Object.defineProperty(t,"minInt152",{enumerable:!0,get:function(){return w.minInt152}}),Object.defineProperty(t,"minInt160",{enumerable:!0,get:function(){return w.minInt160}}),Object.defineProperty(t,"minInt168",{enumerable:!0,get:function(){return w.minInt168}}),Object.defineProperty(t,"minInt176",{enumerable:!0,get:function(){return w.minInt176}}),Object.defineProperty(t,"minInt184",{enumerable:!0,get:function(){return w.minInt184}}),Object.defineProperty(t,"minInt192",{enumerable:!0,get:function(){return w.minInt192}}),Object.defineProperty(t,"minInt200",{enumerable:!0,get:function(){return w.minInt200}}),Object.defineProperty(t,"minInt208",{enumerable:!0,get:function(){return w.minInt208}}),Object.defineProperty(t,"minInt216",{enumerable:!0,get:function(){return w.minInt216}}),Object.defineProperty(t,"minInt224",{enumerable:!0,get:function(){return w.minInt224}}),Object.defineProperty(t,"minInt232",{enumerable:!0,get:function(){return w.minInt232}}),Object.defineProperty(t,"minInt240",{enumerable:!0,get:function(){return w.minInt240}}),Object.defineProperty(t,"minInt248",{enumerable:!0,get:function(){return w.minInt248}}),Object.defineProperty(t,"minInt256",{enumerable:!0,get:function(){return w.minInt256}});var P=r(79983);Object.defineProperty(t,"presignMessagePrefix",{enumerable:!0,get:function(){return P.presignMessagePrefix}});var I=r(28698);Object.defineProperty(t,"etherUnits",{enumerable:!0,get:function(){return I.etherUnits}}),Object.defineProperty(t,"gweiUnits",{enumerable:!0,get:function(){return I.gweiUnits}}),Object.defineProperty(t,"weiUnits",{enumerable:!0,get:function(){return I.weiUnits}});var T=r(21837);Object.defineProperty(t,"AbiConstructorNotFoundError",{enumerable:!0,get:function(){return T.AbiConstructorNotFoundError}}),Object.defineProperty(t,"AbiConstructorParamsNotFoundError",{enumerable:!0,get:function(){return T.AbiConstructorParamsNotFoundError}}),Object.defineProperty(t,"AbiDecodingDataSizeInvalidError",{enumerable:!0,get:function(){return T.AbiDecodingDataSizeInvalidError}}),Object.defineProperty(t,"AbiDecodingDataSizeTooSmallError",{enumerable:!0,get:function(){return T.AbiDecodingDataSizeTooSmallError}}),Object.defineProperty(t,"AbiDecodingZeroDataError",{enumerable:!0,get:function(){return T.AbiDecodingZeroDataError}}),Object.defineProperty(t,"AbiEncodingArrayLengthMismatchError",{enumerable:!0,get:function(){return T.AbiEncodingArrayLengthMismatchError}}),Object.defineProperty(t,"AbiEncodingBytesSizeMismatchError",{enumerable:!0,get:function(){return T.AbiEncodingBytesSizeMismatchError}}),Object.defineProperty(t,"AbiEncodingLengthMismatchError",{enumerable:!0,get:function(){return T.AbiEncodingLengthMismatchError}}),Object.defineProperty(t,"AbiErrorInputsNotFoundError",{enumerable:!0,get:function(){return T.AbiErrorInputsNotFoundError}}),Object.defineProperty(t,"AbiErrorNotFoundError",{enumerable:!0,get:function(){return T.AbiErrorNotFoundError}}),Object.defineProperty(t,"AbiErrorSignatureNotFoundError",{enumerable:!0,get:function(){return T.AbiErrorSignatureNotFoundError}}),Object.defineProperty(t,"AbiEventNotFoundError",{enumerable:!0,get:function(){return T.AbiEventNotFoundError}}),Object.defineProperty(t,"AbiEventSignatureEmptyTopicsError",{enumerable:!0,get:function(){return T.AbiEventSignatureEmptyTopicsError}}),Object.defineProperty(t,"AbiEventSignatureNotFoundError",{enumerable:!0,get:function(){return T.AbiEventSignatureNotFoundError}}),Object.defineProperty(t,"AbiFunctionNotFoundError",{enumerable:!0,get:function(){return T.AbiFunctionNotFoundError}}),Object.defineProperty(t,"AbiFunctionOutputsNotFoundError",{enumerable:!0,get:function(){return T.AbiFunctionOutputsNotFoundError}}),Object.defineProperty(t,"AbiFunctionSignatureNotFoundError",{enumerable:!0,get:function(){return T.AbiFunctionSignatureNotFoundError}}),Object.defineProperty(t,"BytesSizeMismatchError",{enumerable:!0,get:function(){return T.BytesSizeMismatchError}}),Object.defineProperty(t,"DecodeLogDataMismatch",{enumerable:!0,get:function(){return T.DecodeLogDataMismatch}}),Object.defineProperty(t,"DecodeLogTopicsMismatch",{enumerable:!0,get:function(){return T.DecodeLogTopicsMismatch}}),Object.defineProperty(t,"InvalidAbiDecodingTypeError",{enumerable:!0,get:function(){return T.InvalidAbiDecodingTypeError}}),Object.defineProperty(t,"InvalidAbiEncodingTypeError",{enumerable:!0,get:function(){return T.InvalidAbiEncodingTypeError}}),Object.defineProperty(t,"InvalidArrayError",{enumerable:!0,get:function(){return T.InvalidArrayError}}),Object.defineProperty(t,"InvalidDefinitionTypeError",{enumerable:!0,get:function(){return T.InvalidDefinitionTypeError}}),Object.defineProperty(t,"UnsupportedPackedAbiType",{enumerable:!0,get:function(){return T.UnsupportedPackedAbiType}});var A=r(30354);Object.defineProperty(t,"InvalidAddressError",{enumerable:!0,get:function(){return A.InvalidAddressError}});var O=r(3035);Object.defineProperty(t,"BaseError",{enumerable:!0,get:function(){return O.BaseError}}),Object.defineProperty(t,"setErrorConfig",{enumerable:!0,get:function(){return O.setErrorConfig}});var B=r(36240);Object.defineProperty(t,"BlockNotFoundError",{enumerable:!0,get:function(){return B.BlockNotFoundError}});var S=r(7994);Object.defineProperty(t,"BundleFailedError",{enumerable:!0,get:function(){return S.BundleFailedError}});var j=r(3011);Object.defineProperty(t,"ChainDoesNotSupportContract",{enumerable:!0,get:function(){return j.ChainDoesNotSupportContract}}),Object.defineProperty(t,"ChainMismatchError",{enumerable:!0,get:function(){return j.ChainMismatchError}}),Object.defineProperty(t,"ChainNotFoundError",{enumerable:!0,get:function(){return j.ChainNotFoundError}}),Object.defineProperty(t,"ClientChainNotConfiguredError",{enumerable:!0,get:function(){return j.ClientChainNotConfiguredError}}),Object.defineProperty(t,"InvalidChainIdError",{enumerable:!0,get:function(){return j.InvalidChainIdError}});var _=r(78924);Object.defineProperty(t,"CallExecutionError",{enumerable:!0,get:function(){return _.CallExecutionError}}),Object.defineProperty(t,"ContractFunctionExecutionError",{enumerable:!0,get:function(){return _.ContractFunctionExecutionError}}),Object.defineProperty(t,"ContractFunctionRevertedError",{enumerable:!0,get:function(){return _.ContractFunctionRevertedError}}),Object.defineProperty(t,"ContractFunctionZeroDataError",{enumerable:!0,get:function(){return _.ContractFunctionZeroDataError}}),Object.defineProperty(t,"CounterfactualDeploymentFailedError",{enumerable:!0,get:function(){return _.CounterfactualDeploymentFailedError}}),Object.defineProperty(t,"RawContractError",{enumerable:!0,get:function(){return _.RawContractError}});var M=r(97402);Object.defineProperty(t,"SizeExceedsPaddingSizeError",{enumerable:!0,get:function(){return M.SizeExceedsPaddingSizeError}}),Object.defineProperty(t,"SliceOffsetOutOfBoundsError",{enumerable:!0,get:function(){return M.SliceOffsetOutOfBoundsError}});var C=r(78753);Object.defineProperty(t,"IntegerOutOfRangeError",{enumerable:!0,get:function(){return C.IntegerOutOfRangeError}}),Object.defineProperty(t,"InvalidBytesBooleanError",{enumerable:!0,get:function(){return C.InvalidBytesBooleanError}}),Object.defineProperty(t,"InvalidHexBooleanError",{enumerable:!0,get:function(){return C.InvalidHexBooleanError}}),Object.defineProperty(t,"InvalidHexValueError",{enumerable:!0,get:function(){return C.InvalidHexValueError}}),Object.defineProperty(t,"SizeOverflowError",{enumerable:!0,get:function(){return C.SizeOverflowError}});var R=r(62865);Object.defineProperty(t,"EnsAvatarInvalidNftUriError",{enumerable:!0,get:function(){return R.EnsAvatarInvalidNftUriError}}),Object.defineProperty(t,"EnsAvatarUnsupportedNamespaceError",{enumerable:!0,get:function(){return R.EnsAvatarUnsupportedNamespaceError}}),Object.defineProperty(t,"EnsAvatarUriResolutionError",{enumerable:!0,get:function(){return R.EnsAvatarUriResolutionError}}),Object.defineProperty(t,"EnsInvalidChainIdError",{enumerable:!0,get:function(){return R.EnsInvalidChainIdError}});var k=r(9359);Object.defineProperty(t,"EstimateGasExecutionError",{enumerable:!0,get:function(){return k.EstimateGasExecutionError}});var F=r(83978);Object.defineProperty(t,"BaseFeeScalarError",{enumerable:!0,get:function(){return F.BaseFeeScalarError}}),Object.defineProperty(t,"Eip1559FeesNotSupportedError",{enumerable:!0,get:function(){return F.Eip1559FeesNotSupportedError}}),Object.defineProperty(t,"MaxFeePerGasTooLowError",{enumerable:!0,get:function(){return F.MaxFeePerGasTooLowError}});var N=r(41243);Object.defineProperty(t,"FilterTypeNotSupportedError",{enumerable:!0,get:function(){return N.FilterTypeNotSupportedError}});var H=r(21013);Object.defineProperty(t,"ExecutionRevertedError",{enumerable:!0,get:function(){return H.ExecutionRevertedError}}),Object.defineProperty(t,"FeeCapTooHighError",{enumerable:!0,get:function(){return H.FeeCapTooHighError}}),Object.defineProperty(t,"FeeCapTooLowError",{enumerable:!0,get:function(){return H.FeeCapTooLowError}}),Object.defineProperty(t,"InsufficientFundsError",{enumerable:!0,get:function(){return H.InsufficientFundsError}}),Object.defineProperty(t,"IntrinsicGasTooHighError",{enumerable:!0,get:function(){return H.IntrinsicGasTooHighError}}),Object.defineProperty(t,"IntrinsicGasTooLowError",{enumerable:!0,get:function(){return H.IntrinsicGasTooLowError}}),Object.defineProperty(t,"NonceMaxValueError",{enumerable:!0,get:function(){return H.NonceMaxValueError}}),Object.defineProperty(t,"NonceTooHighError",{enumerable:!0,get:function(){return H.NonceTooHighError}}),Object.defineProperty(t,"NonceTooLowError",{enumerable:!0,get:function(){return H.NonceTooLowError}}),Object.defineProperty(t,"TipAboveFeeCapError",{enumerable:!0,get:function(){return H.TipAboveFeeCapError}}),Object.defineProperty(t,"TransactionTypeNotSupportedError",{enumerable:!0,get:function(){return H.TransactionTypeNotSupportedError}}),Object.defineProperty(t,"UnknownNodeError",{enumerable:!0,get:function(){return H.UnknownNodeError}});var U=r(8880);Object.defineProperty(t,"HttpRequestError",{enumerable:!0,get:function(){return U.HttpRequestError}}),Object.defineProperty(t,"RpcRequestError",{enumerable:!0,get:function(){return U.RpcRequestError}}),Object.defineProperty(t,"SocketClosedError",{enumerable:!0,get:function(){return U.SocketClosedError}}),Object.defineProperty(t,"TimeoutError",{enumerable:!0,get:function(){return U.TimeoutError}}),Object.defineProperty(t,"WebSocketRequestError",{enumerable:!0,get:function(){return U.WebSocketRequestError}});var z=r(23635);Object.defineProperty(t,"AtomicityNotSupportedError",{enumerable:!0,get:function(){return z.AtomicityNotSupportedError}}),Object.defineProperty(t,"AtomicReadyWalletRejectedUpgradeError",{enumerable:!0,get:function(){return z.AtomicReadyWalletRejectedUpgradeError}}),Object.defineProperty(t,"BundleTooLargeError",{enumerable:!0,get:function(){return z.BundleTooLargeError}}),Object.defineProperty(t,"ChainDisconnectedError",{enumerable:!0,get:function(){return z.ChainDisconnectedError}}),Object.defineProperty(t,"DuplicateIdError",{enumerable:!0,get:function(){return z.DuplicateIdError}}),Object.defineProperty(t,"InternalRpcError",{enumerable:!0,get:function(){return z.InternalRpcError}}),Object.defineProperty(t,"InvalidInputRpcError",{enumerable:!0,get:function(){return z.InvalidInputRpcError}}),Object.defineProperty(t,"InvalidParamsRpcError",{enumerable:!0,get:function(){return z.InvalidParamsRpcError}}),Object.defineProperty(t,"InvalidRequestRpcError",{enumerable:!0,get:function(){return z.InvalidRequestRpcError}}),Object.defineProperty(t,"JsonRpcVersionUnsupportedError",{enumerable:!0,get:function(){return z.JsonRpcVersionUnsupportedError}}),Object.defineProperty(t,"LimitExceededRpcError",{enumerable:!0,get:function(){return z.LimitExceededRpcError}}),Object.defineProperty(t,"MethodNotFoundRpcError",{enumerable:!0,get:function(){return z.MethodNotFoundRpcError}}),Object.defineProperty(t,"MethodNotSupportedRpcError",{enumerable:!0,get:function(){return z.MethodNotSupportedRpcError}}),Object.defineProperty(t,"ParseRpcError",{enumerable:!0,get:function(){return z.ParseRpcError}}),Object.defineProperty(t,"ProviderDisconnectedError",{enumerable:!0,get:function(){return z.ProviderDisconnectedError}}),Object.defineProperty(t,"ProviderRpcError",{enumerable:!0,get:function(){return z.ProviderRpcError}}),Object.defineProperty(t,"ResourceNotFoundRpcError",{enumerable:!0,get:function(){return z.ResourceNotFoundRpcError}}),Object.defineProperty(t,"ResourceUnavailableRpcError",{enumerable:!0,get:function(){return z.ResourceUnavailableRpcError}}),Object.defineProperty(t,"RpcError",{enumerable:!0,get:function(){return z.RpcError}}),Object.defineProperty(t,"SwitchChainError",{enumerable:!0,get:function(){return z.SwitchChainError}}),Object.defineProperty(t,"TransactionRejectedRpcError",{enumerable:!0,get:function(){return z.TransactionRejectedRpcError}}),Object.defineProperty(t,"UnauthorizedProviderError",{enumerable:!0,get:function(){return z.UnauthorizedProviderError}}),Object.defineProperty(t,"UnknownBundleIdError",{enumerable:!0,get:function(){return z.UnknownBundleIdError}}),Object.defineProperty(t,"UnknownRpcError",{enumerable:!0,get:function(){return z.UnknownRpcError}}),Object.defineProperty(t,"UnsupportedChainIdError",{enumerable:!0,get:function(){return z.UnsupportedChainIdError}}),Object.defineProperty(t,"UnsupportedNonOptionalCapabilityError",{enumerable:!0,get:function(){return z.UnsupportedNonOptionalCapabilityError}}),Object.defineProperty(t,"UnsupportedProviderMethodError",{enumerable:!0,get:function(){return z.UnsupportedProviderMethodError}}),Object.defineProperty(t,"UserRejectedRequestError",{enumerable:!0,get:function(){return z.UserRejectedRequestError}});var L=r(77191);Object.defineProperty(t,"AccountStateConflictError",{enumerable:!0,get:function(){return L.AccountStateConflictError}}),Object.defineProperty(t,"StateAssignmentConflictError",{enumerable:!0,get:function(){return L.StateAssignmentConflictError}});var $=r(29896);Object.defineProperty(t,"FeeConflictError",{enumerable:!0,get:function(){return $.FeeConflictError}}),Object.defineProperty(t,"InvalidLegacyVError",{enumerable:!0,get:function(){return $.InvalidLegacyVError}}),Object.defineProperty(t,"InvalidSerializableTransactionError",{enumerable:!0,get:function(){return $.InvalidSerializableTransactionError}}),Object.defineProperty(t,"InvalidSerializedTransactionError",{enumerable:!0,get:function(){return $.InvalidSerializedTransactionError}}),Object.defineProperty(t,"InvalidSerializedTransactionTypeError",{enumerable:!0,get:function(){return $.InvalidSerializedTransactionTypeError}}),Object.defineProperty(t,"InvalidStorageKeySizeError",{enumerable:!0,get:function(){return $.InvalidStorageKeySizeError}}),Object.defineProperty(t,"TransactionExecutionError",{enumerable:!0,get:function(){return $.TransactionExecutionError}}),Object.defineProperty(t,"TransactionNotFoundError",{enumerable:!0,get:function(){return $.TransactionNotFoundError}}),Object.defineProperty(t,"TransactionReceiptNotFoundError",{enumerable:!0,get:function(){return $.TransactionReceiptNotFoundError}}),Object.defineProperty(t,"WaitForTransactionReceiptTimeoutError",{enumerable:!0,get:function(){return $.WaitForTransactionReceiptTimeoutError}});var D=r(37511);Object.defineProperty(t,"UrlRequiredError",{enumerable:!0,get:function(){return D.UrlRequiredError}});var q=r(52573);Object.defineProperty(t,"InvalidDomainError",{enumerable:!0,get:function(){return q.InvalidDomainError}}),Object.defineProperty(t,"InvalidPrimaryTypeError",{enumerable:!0,get:function(){return q.InvalidPrimaryTypeError}}),Object.defineProperty(t,"InvalidStructTypeError",{enumerable:!0,get:function(){return q.InvalidStructTypeError}});var G=r(3013);Object.defineProperty(t,"InvalidDecimalNumberError",{enumerable:!0,get:function(){return G.InvalidDecimalNumberError}});var V=r(47891);Object.defineProperty(t,"EIP1193ProviderRpcError",{enumerable:!0,get:function(){return V.ProviderRpcError}});var W=r(29554);Object.defineProperty(t,"decodeAbiParameters",{enumerable:!0,get:function(){return W.decodeAbiParameters}});var K=r(19746);Object.defineProperty(t,"decodeDeployData",{enumerable:!0,get:function(){return K.decodeDeployData}});var Z=r(78220);Object.defineProperty(t,"decodeErrorResult",{enumerable:!0,get:function(){return Z.decodeErrorResult}});var J=r(94371);Object.defineProperty(t,"decodeEventLog",{enumerable:!0,get:function(){return J.decodeEventLog}});var Y=r(79387);Object.defineProperty(t,"decodeFunctionData",{enumerable:!0,get:function(){return Y.decodeFunctionData}});var X=r(13632);Object.defineProperty(t,"decodeFunctionResult",{enumerable:!0,get:function(){return X.decodeFunctionResult}});var Q=r(57383);Object.defineProperty(t,"encodeAbiParameters",{enumerable:!0,get:function(){return Q.encodeAbiParameters}});var ee=r(26573);Object.defineProperty(t,"encodeDeployData",{enumerable:!0,get:function(){return ee.encodeDeployData}});var et=r(73135);Object.defineProperty(t,"encodeErrorResult",{enumerable:!0,get:function(){return et.encodeErrorResult}});var er=r(19789);Object.defineProperty(t,"encodeEventTopics",{enumerable:!0,get:function(){return er.encodeEventTopics}});var en=r(51974);Object.defineProperty(t,"encodeFunctionData",{enumerable:!0,get:function(){return en.encodeFunctionData}});var eo=r(15592);Object.defineProperty(t,"encodeFunctionResult",{enumerable:!0,get:function(){return eo.encodeFunctionResult}});var ei=r(64974);Object.defineProperty(t,"encodePacked",{enumerable:!0,get:function(){return ei.encodePacked}});var ea=r(52396);Object.defineProperty(t,"getAbiItem",{enumerable:!0,get:function(){return ea.getAbiItem}});var es=r(11066);Object.defineProperty(t,"parseEventLogs",{enumerable:!0,get:function(){return es.parseEventLogs}});var eu=r(37842);Object.defineProperty(t,"prepareEncodeFunctionData",{enumerable:!0,get:function(){return eu.prepareEncodeFunctionData}});var ec=r(37743);Object.defineProperty(t,"checksumAddress",{enumerable:!0,get:function(){return ec.checksumAddress}}),Object.defineProperty(t,"getAddress",{enumerable:!0,get:function(){return ec.getAddress}});var el=r(93111);Object.defineProperty(t,"getContractAddress",{enumerable:!0,get:function(){return el.getContractAddress}}),Object.defineProperty(t,"getCreate2Address",{enumerable:!0,get:function(){return el.getCreate2Address}}),Object.defineProperty(t,"getCreateAddress",{enumerable:!0,get:function(){return el.getCreateAddress}});var ed=r(31342);Object.defineProperty(t,"isAddress",{enumerable:!0,get:function(){return ed.isAddress}});var ef=r(70843);Object.defineProperty(t,"isAddressEqual",{enumerable:!0,get:function(){return ef.isAddressEqual}});var ep=r(40658);Object.defineProperty(t,"blobsToCommitments",{enumerable:!0,get:function(){return ep.blobsToCommitments}});var eb=r(43880);Object.defineProperty(t,"blobsToProofs",{enumerable:!0,get:function(){return eb.blobsToProofs}});var em=r(12854);Object.defineProperty(t,"commitmentsToVersionedHashes",{enumerable:!0,get:function(){return em.commitmentsToVersionedHashes}});var ey=r(75511);Object.defineProperty(t,"commitmentToVersionedHash",{enumerable:!0,get:function(){return ey.commitmentToVersionedHash}});var eh=r(18494);Object.defineProperty(t,"fromBlobs",{enumerable:!0,get:function(){return eh.fromBlobs}});var eg=r(64728);Object.defineProperty(t,"sidecarsToVersionedHashes",{enumerable:!0,get:function(){return eg.sidecarsToVersionedHashes}});var ev=r(97);Object.defineProperty(t,"toBlobSidecars",{enumerable:!0,get:function(){return ev.toBlobSidecars}});var eE=r(62840);Object.defineProperty(t,"toBlobs",{enumerable:!0,get:function(){return eE.toBlobs}});var ex=r(46069);Object.defineProperty(t,"ccipRequest",{enumerable:!0,get:function(){return ex.ccipRequest}}),Object.defineProperty(t,"ccipFetch",{enumerable:!0,get:function(){return ex.ccipRequest}}),Object.defineProperty(t,"offchainLookup",{enumerable:!0,get:function(){return ex.offchainLookup}}),Object.defineProperty(t,"offchainLookupAbiItem",{enumerable:!0,get:function(){return ex.offchainLookupAbiItem}}),Object.defineProperty(t,"offchainLookupSignature",{enumerable:!0,get:function(){return ex.offchainLookupSignature}});var ew=r(5909);Object.defineProperty(t,"assertCurrentChain",{enumerable:!0,get:function(){return ew.assertCurrentChain}});var eP=r(86892);Object.defineProperty(t,"defineChain",{enumerable:!0,get:function(){return eP.defineChain}});var eI=r(53657);Object.defineProperty(t,"extractChain",{enumerable:!0,get:function(){return eI.extractChain}});var eT=r(79810);Object.defineProperty(t,"getChainContractAddress",{enumerable:!0,get:function(){return eT.getChainContractAddress}});var eA=r(22458);Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return eA.concat}}),Object.defineProperty(t,"concatBytes",{enumerable:!0,get:function(){return eA.concatBytes}}),Object.defineProperty(t,"concatHex",{enumerable:!0,get:function(){return eA.concatHex}});var eO=r(64768);Object.defineProperty(t,"isBytes",{enumerable:!0,get:function(){return eO.isBytes}});var eB=r(49706);Object.defineProperty(t,"isHex",{enumerable:!0,get:function(){return eB.isHex}});var eS=r(61078);Object.defineProperty(t,"pad",{enumerable:!0,get:function(){return eS.pad}}),Object.defineProperty(t,"padBytes",{enumerable:!0,get:function(){return eS.padBytes}}),Object.defineProperty(t,"padHex",{enumerable:!0,get:function(){return eS.padHex}});var ej=r(92242);Object.defineProperty(t,"size",{enumerable:!0,get:function(){return ej.size}});var e_=r(86699);Object.defineProperty(t,"slice",{enumerable:!0,get:function(){return e_.slice}}),Object.defineProperty(t,"sliceBytes",{enumerable:!0,get:function(){return e_.sliceBytes}}),Object.defineProperty(t,"sliceHex",{enumerable:!0,get:function(){return e_.sliceHex}});var eM=r(46041);Object.defineProperty(t,"trim",{enumerable:!0,get:function(){return eM.trim}});var eC=r(72556);Object.defineProperty(t,"bytesToBigInt",{enumerable:!0,get:function(){return eC.bytesToBigInt}}),Object.defineProperty(t,"bytesToBool",{enumerable:!0,get:function(){return eC.bytesToBool}}),Object.defineProperty(t,"bytesToNumber",{enumerable:!0,get:function(){return eC.bytesToNumber}}),Object.defineProperty(t,"bytesToString",{enumerable:!0,get:function(){return eC.bytesToString}}),Object.defineProperty(t,"fromBytes",{enumerable:!0,get:function(){return eC.fromBytes}});var eR=r(66877);Object.defineProperty(t,"fromHex",{enumerable:!0,get:function(){return eR.fromHex}}),Object.defineProperty(t,"hexToBigInt",{enumerable:!0,get:function(){return eR.hexToBigInt}}),Object.defineProperty(t,"hexToBool",{enumerable:!0,get:function(){return eR.hexToBool}}),Object.defineProperty(t,"hexToNumber",{enumerable:!0,get:function(){return eR.hexToNumber}}),Object.defineProperty(t,"hexToString",{enumerable:!0,get:function(){return eR.hexToString}});var ek=r(16707);Object.defineProperty(t,"fromRlp",{enumerable:!0,get:function(){return ek.fromRlp}});var eF=r(14719);Object.defineProperty(t,"boolToBytes",{enumerable:!0,get:function(){return eF.boolToBytes}}),Object.defineProperty(t,"hexToBytes",{enumerable:!0,get:function(){return eF.hexToBytes}}),Object.defineProperty(t,"numberToBytes",{enumerable:!0,get:function(){return eF.numberToBytes}}),Object.defineProperty(t,"stringToBytes",{enumerable:!0,get:function(){return eF.stringToBytes}}),Object.defineProperty(t,"toBytes",{enumerable:!0,get:function(){return eF.toBytes}});var eN=r(30769);Object.defineProperty(t,"boolToHex",{enumerable:!0,get:function(){return eN.boolToHex}}),Object.defineProperty(t,"bytesToHex",{enumerable:!0,get:function(){return eN.bytesToHex}}),Object.defineProperty(t,"numberToHex",{enumerable:!0,get:function(){return eN.numberToHex}}),Object.defineProperty(t,"stringToHex",{enumerable:!0,get:function(){return eN.stringToHex}}),Object.defineProperty(t,"toHex",{enumerable:!0,get:function(){return eN.toHex}});var eH=r(63447);Object.defineProperty(t,"bytesToRlp",{enumerable:!0,get:function(){return eH.bytesToRlp}}),Object.defineProperty(t,"hexToRlp",{enumerable:!0,get:function(){return eH.hexToRlp}}),Object.defineProperty(t,"toRlp",{enumerable:!0,get:function(){return eH.toRlp}});var eU=r(55085);Object.defineProperty(t,"labelhash",{enumerable:!0,get:function(){return eU.labelhash}});var ez=r(50789);Object.defineProperty(t,"namehash",{enumerable:!0,get:function(){return ez.namehash}});var eL=r(40542);Object.defineProperty(t,"toCoinType",{enumerable:!0,get:function(){return eL.toCoinType}});var e$=r(19930);Object.defineProperty(t,"getContractError",{enumerable:!0,get:function(){return e$.getContractError}});var eD=r(29476);Object.defineProperty(t,"defineBlock",{enumerable:!0,get:function(){return eD.defineBlock}}),Object.defineProperty(t,"formatBlock",{enumerable:!0,get:function(){return eD.formatBlock}});var eq=r(99154);Object.defineProperty(t,"formatLog",{enumerable:!0,get:function(){return eq.formatLog}});var eG=r(91194);Object.defineProperty(t,"defineTransaction",{enumerable:!0,get:function(){return eG.defineTransaction}}),Object.defineProperty(t,"formatTransaction",{enumerable:!0,get:function(){return eG.formatTransaction}}),Object.defineProperty(t,"transactionType",{enumerable:!0,get:function(){return eG.transactionType}});var eV=r(43003);Object.defineProperty(t,"defineTransactionReceipt",{enumerable:!0,get:function(){return eV.defineTransactionReceipt}}),Object.defineProperty(t,"formatTransactionReceipt",{enumerable:!0,get:function(){return eV.formatTransactionReceipt}});var eW=r(2148);Object.defineProperty(t,"defineTransactionRequest",{enumerable:!0,get:function(){return eW.defineTransactionRequest}}),Object.defineProperty(t,"formatTransactionRequest",{enumerable:!0,get:function(){return eW.formatTransactionRequest}}),Object.defineProperty(t,"rpcTransactionType",{enumerable:!0,get:function(){return eW.rpcTransactionType}});var eK=r(29732);Object.defineProperty(t,"isHash",{enumerable:!0,get:function(){return eK.isHash}});var eZ=r(59391);Object.defineProperty(t,"keccak256",{enumerable:!0,get:function(){return eZ.keccak256}});var eJ=r(87916);Object.defineProperty(t,"ripemd160",{enumerable:!0,get:function(){return eJ.ripemd160}});var eY=r(4972);Object.defineProperty(t,"sha256",{enumerable:!0,get:function(){return eY.sha256}});var eX=r(84743);Object.defineProperty(t,"toEventHash",{enumerable:!0,get:function(){return eX.toEventHash}});var eQ=r(13141);Object.defineProperty(t,"toEventSelector",{enumerable:!0,get:function(){return eQ.toEventSelector}}),Object.defineProperty(t,"getEventSelector",{enumerable:!0,get:function(){return eQ.toEventSelector}});var e0=r(6820);Object.defineProperty(t,"toEventSignature",{enumerable:!0,get:function(){return e0.toEventSignature}}),Object.defineProperty(t,"getEventSignature",{enumerable:!0,get:function(){return e0.toEventSignature}});var e1=r(67038);Object.defineProperty(t,"toFunctionHash",{enumerable:!0,get:function(){return e1.toFunctionHash}});var e6=r(78038);Object.defineProperty(t,"toFunctionSelector",{enumerable:!0,get:function(){return e6.toFunctionSelector}}),Object.defineProperty(t,"getFunctionSelector",{enumerable:!0,get:function(){return e6.toFunctionSelector}});var e2=r(16926);Object.defineProperty(t,"toFunctionSignature",{enumerable:!0,get:function(){return e2.toFunctionSignature}}),Object.defineProperty(t,"getFunctionSignature",{enumerable:!0,get:function(){return e2.toFunctionSignature}});var e5=r(40439);Object.defineProperty(t,"defineKzg",{enumerable:!0,get:function(){return e5.defineKzg}});var e8=r(50860);Object.defineProperty(t,"setupKzg",{enumerable:!0,get:function(){return e8.setupKzg}});var e3=r(34332);Object.defineProperty(t,"createNonceManager",{enumerable:!0,get:function(){return e3.createNonceManager}}),Object.defineProperty(t,"nonceManager",{enumerable:!0,get:function(){return e3.nonceManager}});var e4=r(70513);Object.defineProperty(t,"withCache",{enumerable:!0,get:function(){return e4.withCache}});var e9=r(96055);Object.defineProperty(t,"withRetry",{enumerable:!0,get:function(){return e9.withRetry}});var e7=r(16637);Object.defineProperty(t,"withTimeout",{enumerable:!0,get:function(){return e7.withTimeout}});var te=r(58372);Object.defineProperty(t,"compactSignatureToSignature",{enumerable:!0,get:function(){return te.compactSignatureToSignature}});var tt=r(34769);Object.defineProperty(t,"hashMessage",{enumerable:!0,get:function(){return tt.hashMessage}});var tr=r(38445);Object.defineProperty(t,"hashDomain",{enumerable:!0,get:function(){return tr.hashDomain}}),Object.defineProperty(t,"hashStruct",{enumerable:!0,get:function(){return tr.hashStruct}}),Object.defineProperty(t,"hashTypedData",{enumerable:!0,get:function(){return tr.hashTypedData}});var tn=r(7933);Object.defineProperty(t,"isErc6492Signature",{enumerable:!0,get:function(){return tn.isErc6492Signature}});var to=r(32914);Object.defineProperty(t,"isErc8010Signature",{enumerable:!0,get:function(){return to.isErc8010Signature}});var ti=r(40040);Object.defineProperty(t,"hexToCompactSignature",{enumerable:!0,get:function(){return ti.parseCompactSignature}}),Object.defineProperty(t,"parseCompactSignature",{enumerable:!0,get:function(){return ti.parseCompactSignature}});var ta=r(70853);Object.defineProperty(t,"parseErc6492Signature",{enumerable:!0,get:function(){return ta.parseErc6492Signature}});var ts=r(93903);Object.defineProperty(t,"parseErc8010Signature",{enumerable:!0,get:function(){return ts.parseErc8010Signature}});var tu=r(70343);Object.defineProperty(t,"hexToSignature",{enumerable:!0,get:function(){return tu.parseSignature}}),Object.defineProperty(t,"parseSignature",{enumerable:!0,get:function(){return tu.parseSignature}});var tc=r(6271);Object.defineProperty(t,"recoverAddress",{enumerable:!0,get:function(){return tc.recoverAddress}});var tl=r(78581);Object.defineProperty(t,"recoverMessageAddress",{enumerable:!0,get:function(){return tl.recoverMessageAddress}});var td=r(58972);Object.defineProperty(t,"recoverPublicKey",{enumerable:!0,get:function(){return td.recoverPublicKey}});var tf=r(32608);Object.defineProperty(t,"recoverTransactionAddress",{enumerable:!0,get:function(){return tf.recoverTransactionAddress}});var tp=r(83160);Object.defineProperty(t,"recoverTypedDataAddress",{enumerable:!0,get:function(){return tp.recoverTypedDataAddress}});var tb=r(93039);Object.defineProperty(t,"compactSignatureToHex",{enumerable:!0,get:function(){return tb.serializeCompactSignature}}),Object.defineProperty(t,"serializeCompactSignature",{enumerable:!0,get:function(){return tb.serializeCompactSignature}});var tm=r(40028);Object.defineProperty(t,"serializeErc6492Signature",{enumerable:!0,get:function(){return tm.serializeErc6492Signature}});var ty=r(41252);Object.defineProperty(t,"serializeErc8010Signature",{enumerable:!0,get:function(){return ty.serializeErc8010Signature}});var th=r(89762);Object.defineProperty(t,"signatureToHex",{enumerable:!0,get:function(){return th.serializeSignature}}),Object.defineProperty(t,"serializeSignature",{enumerable:!0,get:function(){return th.serializeSignature}});var tg=r(90350);Object.defineProperty(t,"signatureToCompactSignature",{enumerable:!0,get:function(){return tg.signatureToCompactSignature}});var tv=r(85548);Object.defineProperty(t,"toPrefixedMessage",{enumerable:!0,get:function(){return tv.toPrefixedMessage}});var tE=r(86605);Object.defineProperty(t,"verifyHash",{enumerable:!0,get:function(){return tE.verifyHash}});var tx=r(72697);Object.defineProperty(t,"verifyMessage",{enumerable:!0,get:function(){return tx.verifyMessage}});var tw=r(92384);Object.defineProperty(t,"verifyTypedData",{enumerable:!0,get:function(){return tw.verifyTypedData}});var tP=r(71156);Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return tP.stringify}});var tI=r(13714);Object.defineProperty(t,"assertRequest",{enumerable:!0,get:function(){return tI.assertRequest}});var tT=r(96466);Object.defineProperty(t,"assertTransactionEIP1559",{enumerable:!0,get:function(){return tT.assertTransactionEIP1559}}),Object.defineProperty(t,"assertTransactionEIP2930",{enumerable:!0,get:function(){return tT.assertTransactionEIP2930}}),Object.defineProperty(t,"assertTransactionLegacy",{enumerable:!0,get:function(){return tT.assertTransactionLegacy}});var tA=r(57227);Object.defineProperty(t,"getSerializedTransactionType",{enumerable:!0,get:function(){return tA.getSerializedTransactionType}});var tO=r(92830);Object.defineProperty(t,"getTransactionType",{enumerable:!0,get:function(){return tO.getTransactionType}});var tB=r(98884);Object.defineProperty(t,"parseTransaction",{enumerable:!0,get:function(){return tB.parseTransaction}});var tS=r(62235);Object.defineProperty(t,"serializeAccessList",{enumerable:!0,get:function(){return tS.serializeAccessList}});var tj=r(47041);Object.defineProperty(t,"serializeTransaction",{enumerable:!0,get:function(){return tj.serializeTransaction}});var t_=r(56617);Object.defineProperty(t,"domainSeparator",{enumerable:!0,get:function(){return t_.domainSeparator}}),Object.defineProperty(t,"getTypesForEIP712Domain",{enumerable:!0,get:function(){return t_.getTypesForEIP712Domain}}),Object.defineProperty(t,"serializeTypedData",{enumerable:!0,get:function(){return t_.serializeTypedData}}),Object.defineProperty(t,"validateTypedData",{enumerable:!0,get:function(){return t_.validateTypedData}});var tM=r(38928);Object.defineProperty(t,"formatEther",{enumerable:!0,get:function(){return tM.formatEther}});var tC=r(18624);Object.defineProperty(t,"formatGwei",{enumerable:!0,get:function(){return tC.formatGwei}});var tR=r(65723);Object.defineProperty(t,"formatUnits",{enumerable:!0,get:function(){return tR.formatUnits}});var tk=r(39342);Object.defineProperty(t,"parseEther",{enumerable:!0,get:function(){return tk.parseEther}});var tF=r(26248);Object.defineProperty(t,"parseGwei",{enumerable:!0,get:function(){return tF.parseGwei}});var tN=r(79721);Object.defineProperty(t,"parseUnits",{enumerable:!0,get:function(){return tN.parseUnits}})},47891:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderRpcError=void 0;class r extends Error{constructor(e,t){super(t),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.code=e,this.details=t}}t.ProviderRpcError=r},29554:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.decodeAbiParameters=function(e,t){let r="string"==typeof t?(0,l.hexToBytes)(t):t,b=(0,i.createCursor)(r);if(0===(0,a.size)(r)&&e.length>0)throw new n.AbiDecodingZeroDataError;if((0,a.size)(t)&&32>(0,a.size)(t))throw new n.AbiDecodingDataSizeTooSmallError({data:"string"==typeof t?t:(0,d.bytesToHex)(t),params:e,size:(0,a.size)(t)});let m=0,y=[];for(let t=0;t!e),i=o?[]:{},a=0;if(p(r)){let s=n+(0,c.bytesToNumber)(t.readBytes(32));for(let n=0;n48?(0,c.bytesToBigInt)(o,{signed:r}):(0,c.bytesToNumber)(o,{signed:r}),32]}(t,r);if("string"===r.type)return function(e,{staticPosition:t}){let r=(0,c.bytesToNumber)(e.readBytes(32));e.setPosition(t+r);let n=(0,c.bytesToNumber)(e.readBytes(32));if(0===n)return e.setPosition(t+32),["",32];let o=e.readBytes(n,32),i=(0,c.bytesToString)((0,u.trim)(o));return e.setPosition(t+32),[i,32]}(t,{staticPosition:i});throw new n.InvalidAbiDecodingTypeError(r.type,{docsPath:"/docs/contract/decodeAbiParameters"})}(b,r,{staticPosition:0});m+=a,y.push(i)}return y};let n=r(21837),o=r(37743),i=r(51914),a=r(92242),s=r(86699),u=r(46041),c=r(72556),l=r(14719),d=r(30769),f=r(57383);function p(e){let{type:t}=e;if("string"===t||"bytes"===t||t.endsWith("[]"))return!0;if("tuple"===t)return e.components?.some(p);let r=(0,f.getArrayComponents)(e.type);return!!(r&&p({...e,type:r[1]}))}},19746:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.decodeDeployData=function(e){let{abi:t,bytecode:r,data:a}=e;if(a===r)return{bytecode:r};let s=t.find(e=>"type"in e&&"constructor"===e.type);if(!s)throw new n.AbiConstructorNotFoundError({docsPath:i});if(!("inputs"in s)||!s.inputs||0===s.inputs.length)throw new n.AbiConstructorParamsNotFoundError({docsPath:i});return{args:(0,o.decodeAbiParameters)(s.inputs,`0x${a.replace(r,"")}`),bytecode:r}};let n=r(21837),o=r(29554),i="/docs/contract/decodeDeployData"},78220:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.decodeErrorResult=function(e){let{abi:t,data:r}=e,c=(0,i.slice)(r,0,4);if("0x"===c)throw new o.AbiDecodingZeroDataError;let l=[...t||[],n.solidityError,n.solidityPanic].find(e=>"error"===e.type&&c===(0,a.toFunctionSelector)((0,u.formatAbiItem)(e)));if(!l)throw new o.AbiErrorSignatureNotFoundError(c,{docsPath:"/docs/contract/decodeErrorResult"});return{abiItem:l,args:"inputs"in l&&l.inputs&&l.inputs.length>0?(0,s.decodeAbiParameters)(l.inputs,(0,i.slice)(r,4)):void 0,errorName:l.name}};let n=r(14012),o=r(21837),i=r(86699),a=r(78038),s=r(29554),u=r(70680)},94371:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.decodeEventLog=function(e){let{abi:t,data:r,strict:l,topics:d}=e,f=l??!0,[p,...b]=d;if(!p)throw new n.AbiEventSignatureEmptyTopicsError({docsPath:c});let m=t.find(e=>"event"===e.type&&p===(0,a.toEventSelector)((0,u.formatAbiItem)(e)));if(!(m&&"name"in m)||"event"!==m.type)throw new n.AbiEventSignatureNotFoundError(p,{docsPath:c});let{name:y,inputs:h}=m,g=h?.some(e=>!("name"in e&&e.name)),v=g?[]:{},E=h.map((e,t)=>[e,t]).filter(([e])=>"indexed"in e&&e.indexed);for(let e=0;e!("indexed"in e&&e.indexed));if(x.length>0){if(r&&"0x"!==r)try{let e=(0,s.decodeAbiParameters)(x,r);if(e){if(g)for(let t=0;t0?v:void 0}};let n=r(21837),o=r(69449),i=r(92242),a=r(13141),s=r(29554),u=r(70680),c="/docs/contract/decodeEventLog"},79387:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.decodeFunctionData=function(e){let{abi:t,data:r}=e,u=(0,o.slice)(r,0,4),c=t.find(e=>"function"===e.type&&u===(0,i.toFunctionSelector)((0,s.formatAbiItem)(e)));if(!c)throw new n.AbiFunctionSignatureNotFoundError(u,{docsPath:"/docs/contract/decodeFunctionData"});return{functionName:c.name,args:"inputs"in c&&c.inputs&&c.inputs.length>0?(0,a.decodeAbiParameters)(c.inputs,(0,o.slice)(r,4)):void 0}};let n=r(21837),o=r(86699),i=r(78038),a=r(29554),s=r(70680)},13632:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.decodeFunctionResult=function(e){let{abi:t,args:r,functionName:s,data:u}=e,c=t[0];if(s){let e=(0,i.getAbiItem)({abi:t,args:r,name:s});if(!e)throw new n.AbiFunctionNotFoundError(s,{docsPath:a});c=e}if("function"!==c.type)throw new n.AbiFunctionNotFoundError(void 0,{docsPath:a});if(!c.outputs)throw new n.AbiFunctionOutputsNotFoundError(c.name,{docsPath:a});let l=(0,o.decodeAbiParameters)(c.outputs,u);return l&&l.length>1?l:l&&1===l.length?l[0]:void 0};let n=r(21837),o=r(29554),i=r(52396),a="/docs/contract/decodeFunctionResult"},57383:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.encodeAbiParameters=function(e,t){if(e.length!==t.length)throw new n.AbiEncodingLengthMismatchError({expectedLength:e.length,givenLength:t.length});let r=b(function({params:e,values:t}){let r=[];for(let y=0;y0?(0,u.concat)([t,e]):t}}if(a)return{dynamic:!0,encoded:e}}return{dynamic:!1,encoded:(0,u.concat)(s.map(({encoded:e})=>e))}}(r,{length:o,param:{...t,type:i}})}if("tuple"===t.type)return function(t,{param:r}){let n=!1,o=[];for(let i=0;ie))}}(r,{param:t});if("address"===t.type)return function(e){if(!(0,s.isAddress)(e))throw new o.InvalidAddressError({address:e});return{dynamic:!1,encoded:(0,c.padHex)(e.toLowerCase())}}(r);if("bool"===t.type)return function(e){if("boolean"!=typeof e)throw new i.BaseError(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:(0,c.padHex)((0,f.boolToHex)(e))}}(r);if(t.type.startsWith("uint")||t.type.startsWith("int")){let e=t.type.startsWith("int"),[,,n="256"]=p.integerRegex.exec(t.type)??[];return function(e,{signed:t,size:r=256}){if("number"==typeof r){let n=2n**(BigInt(r)-(t?1n:0n))-1n,o=t?-n-1n:0n;if(e>n||e"type"in e&&"constructor"===e.type);if(!u)throw new n.AbiConstructorNotFoundError({docsPath:a});if(!("inputs"in u)||!u.inputs||0===u.inputs.length)throw new n.AbiConstructorParamsNotFoundError({docsPath:a});let c=(0,i.encodeAbiParameters)(u.inputs,r);return(0,o.concatHex)([s,c])};let n=r(21837),o=r(22458),i=r(57383),a="/docs/contract/encodeDeployData"},73135:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.encodeErrorResult=function(e){let{abi:t,errorName:r,args:l}=e,d=t[0];if(r){let e=(0,u.getAbiItem)({abi:t,args:l,name:r});if(!e)throw new n.AbiErrorNotFoundError(r,{docsPath:c});d=e}if("error"!==d.type)throw new n.AbiErrorNotFoundError(void 0,{docsPath:c});let f=(0,s.formatAbiItem)(d),p=(0,i.toFunctionSelector)(f),b="0x";if(l&&l.length>0){if(!d.inputs)throw new n.AbiErrorInputsNotFoundError(d.name,{docsPath:c});b=(0,a.encodeAbiParameters)(d.inputs,l)}return(0,o.concatHex)([p,b])};let n=r(21837),o=r(22458),i=r(78038),a=r(57383),s=r(70680),u=r(52396),c="/docs/contract/encodeErrorResult"},19789:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.encodeEventTopics=function(e){let{abi:t,eventName:r,args:o}=e,i=t[0];if(r){let e=(0,l.getAbiItem)({abi:t,name:r});if(!e)throw new n.AbiEventNotFoundError(r,{docsPath:d});i=e}if("event"!==i.type)throw new n.AbiEventNotFoundError(void 0,{docsPath:d});let a=(0,c.formatAbiItem)(i),u=(0,s.toEventSelector)(a),p=[];if(o&&"inputs"in i){let e=i.inputs?.filter(e=>"indexed"in e&&e.indexed),t=Array.isArray(o)?o:Object.values(o).length>0?e?.map(e=>o[e.name])??[]:[];t.length>0&&(p=e?.map((e,r)=>Array.isArray(t[r])?t[r].map((n,o)=>f({param:e,value:t[r][o]})):void 0!==t[r]&&null!==t[r]?f({param:e,value:t[r]}):null)??[])}return[u,...p]};let n=r(21837),o=r(41243),i=r(14719),a=r(59391),s=r(13141),u=r(57383),c=r(70680),l=r(52396),d="/docs/contract/encodeEventTopics";function f({param:e,value:t}){if("string"===e.type||"bytes"===e.type)return(0,a.keccak256)((0,i.toBytes)(t));if("tuple"===e.type||e.type.match(/^(.*)\[(\d+)?\]$/))throw new o.FilterTypeNotSupportedError(e.type);return(0,u.encodeAbiParameters)([e],[t])}},51974:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.encodeFunctionData=function(e){let{args:t}=e,{abi:r,functionName:a}=1===e.abi.length&&e.functionName?.startsWith("0x")?e:(0,i.prepareEncodeFunctionData)(e),s=r[0],u="inputs"in s&&s.inputs?(0,o.encodeAbiParameters)(s.inputs,t??[]):void 0;return(0,n.concatHex)([a,u??"0x"])};let n=r(22458),o=r(57383),i=r(37842)},15592:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.encodeFunctionResult=function(e){let{abi:t,functionName:r,result:s}=e,u=t[0];if(r){let e=(0,i.getAbiItem)({abi:t,name:r});if(!e)throw new n.AbiFunctionNotFoundError(r,{docsPath:a});u=e}if("function"!==u.type)throw new n.AbiFunctionNotFoundError(void 0,{docsPath:a});if(!u.outputs)throw new n.AbiFunctionOutputsNotFoundError(u.name,{docsPath:a});let c=(()=>{if(0===u.outputs.length)return[];if(1===u.outputs.length)return[s];if(Array.isArray(s))return s;throw new n.InvalidArrayError(s)})();return(0,o.encodeAbiParameters)(u.outputs,c)};let n=r(21837),o=r(57383),i=r(52396),a="/docs/contract/encodeFunctionResult"},64974:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.encodePacked=function(e,t){if(e.length!==t.length)throw new n.AbiEncodingLengthMismatchError({expectedLength:e.length,givenLength:t.length});let r=[];for(let l=0;l(function(e,{includeName:t}){return e.type.startsWith("tuple")?`(${o(e.components,{includeName:t})})${e.type.slice(5)}`:e.type+(t&&e.name?` ${e.name}`:"")})(e,{includeName:t})).join(t?", ":","):""}},49830:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.formatAbiItemWithArgs=function({abiItem:e,args:t,includeFunctionName:r=!0,includeName:o=!1}){if("name"in e&&"inputs"in e&&e.inputs)return`${r?e.name:""}(${e.inputs.map((e,r)=>`${o&&e.name?`${e.name}: `:""}${"object"==typeof t[r]?(0,n.stringify)(t[r]):t[r]}`).join(", ")})`};let n=r(71156)},52396:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getAbiItem=function(e){let t;let{abi:r,args:i=[],name:l}=e,d=(0,o.isHex)(l,{strict:!1}),f=r.filter(e=>d?"function"===e.type?(0,s.toFunctionSelector)(e)===l:"event"===e.type&&(0,a.toEventSelector)(e)===l:"name"in e&&e.name===l);if(0!==f.length){if(1===f.length)return f[0];for(let e of f)if("inputs"in e){if(!i||0===i.length){if(!e.inputs||0===e.inputs.length)return e;continue}if(e.inputs&&0!==e.inputs.length&&e.inputs.length===i.length&&i.every((t,r)=>{let n="inputs"in e&&e.inputs[r];return!!n&&u(t,n)})){if(t&&"inputs"in t&&t.inputs){let r=c(e.inputs,t.inputs,i);if(r)throw new n.AbiItemAmbiguityError({abiItem:e,type:r[0]},{abiItem:t,type:r[1]})}t=e}}return t||f[0]}},t.isArgOfType=u,t.getAmbiguousTypes=c;let n=r(21837),o=r(49706),i=r(31342),a=r(13141),s=r(78038);function u(e,t){let r=typeof e,n=t.type;switch(n){case"address":return(0,i.isAddress)(e,{strict:!1});case"bool":return"boolean"===r;case"function":case"string":return"string"===r;default:if("tuple"===n&&"components"in t)return Object.values(t.components).every((t,r)=>u(Object.values(e)[r],t));if(/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(n))return"number"===r||"bigint"===r;if(/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(n))return"string"===r||e instanceof Uint8Array;if(/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(n))return Array.isArray(e)&&e.every(e=>u(e,{...t,type:n.replace(/(\[[0-9]{0,}\])$/,"")}));return!1}}function c(e,t,r){for(let n in e){let o=e[n],a=t[n];if("tuple"===o.type&&"tuple"===a.type&&"components"in o&&"components"in a)return c(o.components,a.components,r[n]);let s=[o.type,a.type];if(s.includes("address")&&s.includes("bytes20")||(s.includes("address")&&s.includes("string")||s.includes("address")&&s.includes("bytes"))&&(0,i.isAddress)(r[n],{strict:!1}))return s}}},11066:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.parseEventLogs=function(e){let{abi:t,args:r,logs:u,strict:c=!0}=e,l=(()=>{if(e.eventName)return Array.isArray(e.eventName)?e.eventName:[e.eventName]})();return u.map(e=>{let u,d;let f=t.filter(t=>"event"===t.type&&e.topics[0]===(0,a.toEventSelector)(t));if(0===f.length)return null;for(let t of f)try{u=(0,s.decodeEventLog)({...e,abi:[t],strict:!0}),d=t;break}catch{}if(!u&&!c){d=f[0];try{u=(0,s.decodeEventLog)({...e,abi:[d],strict:!1})}catch{let t=d.inputs?.some(e=>!("name"in e&&e.name));return{...e,args:t?[]:{},eventName:d.name}}}return u&&d&&(!l||l.includes(u.eventName))&&function(e){let{args:t,inputs:r,matchArgs:a}=e;if(!a)return!0;if(!t)return!1;function s(e,t,r){try{if("address"===e.type)return(0,n.isAddressEqual)(t,r);if("string"===e.type||"bytes"===e.type)return(0,i.keccak256)((0,o.toBytes)(t))===r;return t===r}catch{return!1}}return Array.isArray(t)&&Array.isArray(a)?a.every((e,n)=>{if(null==e)return!0;let o=r[n];return!!o&&(Array.isArray(e)?e:[e]).some(e=>s(o,e,t[n]))}):!("object"!=typeof t||Array.isArray(t)||"object"!=typeof a||Array.isArray(a))&&Object.entries(a).every(([e,n])=>{if(null==n)return!0;let o=r.find(t=>t.name===e);return!!o&&(Array.isArray(n)?n:[n]).some(r=>s(o,r,t[e]))})}({args:u.args,inputs:d.inputs,matchArgs:r})?{...u,...e}:null}).filter(Boolean)};let n=r(70843),o=r(14719),i=r(59391),a=r(13141),s=r(94371)},37842:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.prepareEncodeFunctionData=function(e){let{abi:t,args:r,functionName:u}=e,c=t[0];if(u){let e=(0,a.getAbiItem)({abi:t,args:r,name:u});if(!e)throw new n.AbiFunctionNotFoundError(u,{docsPath:s});c=e}if("function"!==c.type)throw new n.AbiFunctionNotFoundError(void 0,{docsPath:s});return{abi:[c],functionName:(0,o.toFunctionSelector)((0,i.formatAbiItem)(c))}};let n=r(21837),o=r(78038),i=r(70680),a=r(52396),s="/docs/contract/encodeFunctionData"},37743:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.checksumAddress=c,t.getAddress=function(e,t){if(!(0,s.isAddress)(e,{strict:!1}))throw new n.InvalidAddressError({address:e});return c(e,t)};let n=r(30354),o=r(14719),i=r(59391),a=r(87569),s=r(31342),u=new a.LruMap(8192);function c(e,t){if(u.has(`${e}.${t}`))return u.get(`${e}.${t}`);let r=t?`${t}${e.toLowerCase()}`:e.substring(2).toLowerCase(),n=(0,i.keccak256)((0,o.stringToBytes)(r),"bytes"),a=(t?r.substring(`${t}0x`.length):r).split("");for(let e=0;e<40;e+=2)n[e>>1]>>4>=8&&a[e]&&(a[e]=a[e].toUpperCase()),(15&n[e>>1])>=8&&a[e+1]&&(a[e+1]=a[e+1].toUpperCase());let s=`0x${a.join("")}`;return u.set(`${e}.${t}`,s),s}},93111:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getContractAddress=function(e){return"CREATE2"===e.opcode?f(e):d(e)},t.getCreateAddress=d,t.getCreate2Address=f;let n=r(22458),o=r(64768),i=r(61078),a=r(86699),s=r(14719),u=r(63447),c=r(59391),l=r(37743);function d(e){let t=(0,s.toBytes)((0,l.getAddress)(e.from)),r=(0,s.toBytes)(e.nonce);return 0===r[0]&&(r=new Uint8Array([])),(0,l.getAddress)(`0x${(0,c.keccak256)((0,u.toRlp)([t,r],"bytes")).slice(26)}`)}function f(e){let t=(0,s.toBytes)((0,l.getAddress)(e.from)),r=(0,i.pad)((0,o.isBytes)(e.salt)?e.salt:(0,s.toBytes)(e.salt),{size:32}),u="bytecodeHash"in e?(0,o.isBytes)(e.bytecodeHash)?e.bytecodeHash:(0,s.toBytes)(e.bytecodeHash):(0,c.keccak256)(e.bytecode,"bytes");return(0,l.getAddress)((0,a.slice)((0,c.keccak256)((0,n.concat)([(0,s.toBytes)("0xff"),t,r,u])),12))}},31342:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.isAddressCache=void 0,t.isAddress=function(e,r){let{strict:n=!0}=r??{},a=`${e}.${n}`;if(t.isAddressCache.has(a))return t.isAddressCache.get(a);let s=!!i.test(e)&&(e.toLowerCase()===e||!n||(0,o.checksumAddress)(e)===e);return t.isAddressCache.set(a,s),s};let n=r(87569),o=r(37743),i=/^0x[a-fA-F0-9]{40}$/;t.isAddressCache=new n.LruMap(8192)},70843:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.isAddressEqual=function(e,t){if(!(0,o.isAddress)(e,{strict:!1}))throw new n.InvalidAddressError({address:e});if(!(0,o.isAddress)(t,{strict:!1}))throw new n.InvalidAddressError({address:t});return e.toLowerCase()===t.toLowerCase()};let n=r(30354),o=r(31342)},60652:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.hashAuthorization=function(e){let{chainId:t,nonce:r,to:u}=e,c=e.contractAddress??e.address,l=(0,s.keccak256)((0,n.concatHex)(["0x05",(0,a.toRlp)([t?(0,i.numberToHex)(t):"0x",c,r?(0,i.numberToHex)(r):"0x"])]));return"bytes"===u?(0,o.hexToBytes)(l):l};let n=r(22458),o=r(14719),i=r(30769),a=r(63447),s=r(59391)},84218:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.recoverAuthorizationAddress=i;let n=r(6271),o=r(60652);async function i(e){let{authorization:t,signature:r}=e;return(0,n.recoverAddress)({hash:(0,o.hashAuthorization)(t),signature:r??t})}},40869:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.serializeAuthorizationList=function(e){if(!e||0===e.length)return[];let t=[];for(let r of e){let{chainId:e,nonce:i,...a}=r,s=r.address;t.push([e?(0,n.toHex)(e):"0x",s,i?(0,n.toHex)(i):"0x",...(0,o.toYParitySignatureArray)({},a)])}return t};let n=r(30769),o=r(47041)},77352:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.verifyAuthorization=a;let n=r(37743),o=r(70843),i=r(84218);async function a({address:e,authorization:t,signature:r}){return(0,o.isAddressEqual)((0,n.getAddress)(e),await (0,i.recoverAuthorizationAddress)({authorization:t,signature:r}))}},40658:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.blobsToCommitments=function(e){let{kzg:t}=e,r=e.to??("string"==typeof e.blobs[0]?"hex":"bytes"),i="string"==typeof e.blobs[0]?e.blobs.map(e=>(0,n.hexToBytes)(e)):e.blobs,a=[];for(let e of i)a.push(Uint8Array.from(t.blobToKzgCommitment(e)));return"bytes"===r?a:a.map(e=>(0,o.bytesToHex)(e))};let n=r(14719),o=r(30769)},43880:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.blobsToProofs=function(e){let{kzg:t}=e,r=e.to??("string"==typeof e.blobs[0]?"hex":"bytes"),i="string"==typeof e.blobs[0]?e.blobs.map(e=>(0,n.hexToBytes)(e)):e.blobs,a="string"==typeof e.commitments[0]?e.commitments.map(e=>(0,n.hexToBytes)(e)):e.commitments,s=[];for(let e=0;e(0,o.bytesToHex)(e))};let n=r(14719),o=r(30769)},75511:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.commitmentToVersionedHash=function(e){let{commitment:t,version:r=1}=e,i=e.to??("string"==typeof t?"hex":"bytes"),a=(0,o.sha256)(t,"bytes");return a.set([r],0),"bytes"===i?a:(0,n.bytesToHex)(a)};let n=r(30769),o=r(4972)},12854:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.commitmentsToVersionedHashes=function(e){let{commitments:t,version:r}=e,o=e.to??("string"==typeof t[0]?"hex":"bytes"),i=[];for(let e of t)i.push((0,n.commitmentToVersionedHash)({commitment:e,to:o,version:r}));return i};let n=r(75511)},18494:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.fromBlobs=function(e){let t=e.to??("string"==typeof e.blobs[0]?"hex":"bytes"),r="string"==typeof e.blobs[0]?e.blobs.map(e=>(0,o.hexToBytes)(e)):e.blobs,a=r.reduce((e,t)=>e+t.length,0),s=(0,n.createCursor)(new Uint8Array(a)),u=!0;for(let e of r){let t=(0,n.createCursor)(e);for(;u&&t.positionn.maxBytesPerTransaction)throw new o.BlobSizeTooLargeError({maxSize:n.maxBytesPerTransaction,size:c});let l=[],d=!0,f=0;for(;d;){let e=(0,i.createCursor)(new Uint8Array(n.bytesPerBlob)),t=0;for(;te.bytes):l.map(e=>(0,u.bytesToHex)(e.bytes))};let n=r(8166),o=r(98417),i=r(51914),a=r(92242),s=r(14719),u=r(30769)},58877:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.buildRequest=function(e,t={}){return async(r,d={})=>{let{dedupe:f=!1,methods:p,retryDelay:b=150,retryCount:m=3,uid:y}={...t,...d},{method:h}=r;if(p?.exclude?.includes(h)||p?.include&&!p.include.includes(h))throw new i.MethodNotSupportedRpcError(Error("method not supported"),{method:h});let g=f?(0,a.stringToHex)(`${y}.${(0,c.stringify)(r)}`):void 0;return(0,s.withDedupe)(()=>(0,u.withRetry)(async()=>{try{return await e(r)}catch(e){switch(e.code){case i.ParseRpcError.code:throw new i.ParseRpcError(e);case i.InvalidRequestRpcError.code:throw new i.InvalidRequestRpcError(e);case i.MethodNotFoundRpcError.code:throw new i.MethodNotFoundRpcError(e,{method:r.method});case i.InvalidParamsRpcError.code:throw new i.InvalidParamsRpcError(e);case i.InternalRpcError.code:throw new i.InternalRpcError(e);case i.InvalidInputRpcError.code:throw new i.InvalidInputRpcError(e);case i.ResourceNotFoundRpcError.code:throw new i.ResourceNotFoundRpcError(e);case i.ResourceUnavailableRpcError.code:throw new i.ResourceUnavailableRpcError(e);case i.TransactionRejectedRpcError.code:throw new i.TransactionRejectedRpcError(e);case i.MethodNotSupportedRpcError.code:throw new i.MethodNotSupportedRpcError(e,{method:r.method});case i.LimitExceededRpcError.code:throw new i.LimitExceededRpcError(e);case i.JsonRpcVersionUnsupportedError.code:throw new i.JsonRpcVersionUnsupportedError(e);case i.UserRejectedRequestError.code:throw new i.UserRejectedRequestError(e);case i.UnauthorizedProviderError.code:throw new i.UnauthorizedProviderError(e);case i.UnsupportedProviderMethodError.code:throw new i.UnsupportedProviderMethodError(e);case i.ProviderDisconnectedError.code:throw new i.ProviderDisconnectedError(e);case i.ChainDisconnectedError.code:throw new i.ChainDisconnectedError(e);case i.SwitchChainError.code:throw new i.SwitchChainError(e);case i.UnsupportedNonOptionalCapabilityError.code:throw new i.UnsupportedNonOptionalCapabilityError(e);case i.UnsupportedChainIdError.code:throw new i.UnsupportedChainIdError(e);case i.DuplicateIdError.code:throw new i.DuplicateIdError(e);case i.UnknownBundleIdError.code:throw new i.UnknownBundleIdError(e);case i.BundleTooLargeError.code:throw new i.BundleTooLargeError(e);case i.AtomicReadyWalletRejectedUpgradeError.code:throw new i.AtomicReadyWalletRejectedUpgradeError(e);case i.AtomicityNotSupportedError.code:throw new i.AtomicityNotSupportedError(e);case 5e3:throw new i.UserRejectedRequestError(e);default:if(e instanceof n.BaseError)throw e;throw new i.UnknownRpcError(e)}}},{delay:({count:e,error:t})=>{if(t&&t instanceof o.HttpRequestError){let e=t?.headers?.get("Retry-After");if(e?.match(/\d/))return 1e3*Number.parseInt(e,10)}return~~(1<l(e)}),{enabled:f,id:g})}},t.shouldRetry=l;let n=r(3035),o=r(8880),i=r(23635),a=r(30769),s=r(88441),u=r(96055),c=r(71156);function l(e){return"code"in e&&"number"==typeof e.code?-1===e.code||e.code===i.LimitExceededRpcError.code||e.code===i.InternalRpcError.code:!(e instanceof o.HttpRequestError)||!e.status||403===e.status||408===e.status||413===e.status||429===e.status||500===e.status||502===e.status||503===e.status||504===e.status}},46069:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.offchainLookupAbiItem=t.offchainLookupSignature=void 0,t.offchainLookup=p,t.ccipRequest=b;let n=r(92137),o=r(68344),i=r(8880),a=r(78220),s=r(57383),u=r(70843),c=r(22458),l=r(49706),d=r(74551),f=r(71156);async function p(e,{blockNumber:r,blockTag:i,data:l,to:f}){let{args:p}=(0,a.decodeErrorResult)({data:l,abi:[t.offchainLookupAbiItem]}),[m,y,h,g,v]=p,{ccipRead:E}=e,x=E&&"function"==typeof E?.request?E.request:b;try{if(!(0,u.isAddressEqual)(f,m))throw new o.OffchainLookupSenderMismatchError({sender:m,to:f});let t=y.includes(d.localBatchGatewayUrl)?await (0,d.localBatchGatewayRequest)({data:h,ccipRequest:x}):await x({data:h,sender:m,urls:y}),{data:a}=await (0,n.call)(e,{blockNumber:r,blockTag:i,data:(0,c.concat)([g,(0,s.encodeAbiParameters)([{type:"bytes"},{type:"bytes"}],[t,v])]),to:f});return a}catch(e){throw new o.OffchainLookupError({callbackSelector:g,cause:e,data:l,extraData:v,sender:m,urls:y})}}async function b({data:e,sender:t,urls:r}){let n=Error("An unknown error occurred.");for(let a=0;ae.id===t)}},79810:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getChainContractAddress=function({blockNumber:e,chain:t,contract:r}){let o=t?.contracts?.[r];if(!o)throw new n.ChainDoesNotSupportContract({chain:t,contract:{name:r}});if(e&&o.blockCreated&&o.blockCreated>e)throw new n.ChainDoesNotSupportContract({blockNumber:e,chain:t,contract:{name:r,blockCreated:o.blockCreated}});return o.address};let n=r(3011)},51914:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.createCursor=function(e,{recursiveReadLimit:t=8192}={}){let r=Object.create(o);return r.bytes=e,r.dataView=new DataView(e.buffer??e,e.byteOffset,e.byteLength),r.positionReadCount=new Map,r.recursiveReadLimit=t,r};let n=r(69449),o={bytes:new Uint8Array,dataView:new DataView(new ArrayBuffer(0)),position:0,positionReadCount:new Map,recursiveReadCount:0,recursiveReadLimit:Number.POSITIVE_INFINITY,assertReadLimit(){if(this.recursiveReadCount>=this.recursiveReadLimit)throw new n.RecursiveReadLimitExceededError({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new n.PositionOutOfBoundsError({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new n.NegativeOffsetError({offset:e});let t=this.position-e;this.assertPosition(t),this.position=t},getReadCount(e){return this.positionReadCount.get(e||this.position)||0},incrementPosition(e){if(e<0)throw new n.NegativeOffsetError({offset:e});let t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){let t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){let r=t??this.position;return this.assertPosition(r+e-1),this.bytes.subarray(r,r+e)},inspectUint8(e){let t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){let t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){let t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){let t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,255&e),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){this.assertReadLimit(),this._touch();let e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();let r=this.inspectBytes(e);return this.position+=t??e,r},readUint8(){this.assertReadLimit(),this._touch();let e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();let e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();let e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();let e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){let t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;let e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}}},22458:function(e,t){function r(e){let t=0;for(let r of e)t+=r.length;let r=new Uint8Array(t),n=0;for(let t of e)r.set(t,n),n+=t.length;return r}function n(e){return`0x${e.reduce((e,t)=>e+t.replace("0x",""),"")}`}Object.defineProperty(t,"__esModule",{value:!0}),t.concat=function(e){return"string"==typeof e[0]?n(e):r(e)},t.concatBytes=r,t.concatHex=n},64768:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isBytes=function(e){return!!e&&"object"==typeof e&&"BYTES_PER_ELEMENT"in e&&1===e.BYTES_PER_ELEMENT&&"Uint8Array"===e.constructor.name}},49706:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isHex=function(e,{strict:t=!0}={}){return!!e&&"string"==typeof e&&(t?/^0x[0-9a-fA-F]*$/.test(e):e.startsWith("0x"))}},61078:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.pad=function(e,{dir:t,size:r=32}={}){return"string"==typeof e?o(e,{dir:t,size:r}):i(e,{dir:t,size:r})},t.padHex=o,t.padBytes=i;let n=r(97402);function o(e,{dir:t,size:r=32}={}){if(null===r)return e;let o=e.replace("0x","");if(o.length>2*r)throw new n.SizeExceedsPaddingSizeError({size:Math.ceil(o.length/2),targetSize:r,type:"hex"});return`0x${o["right"===t?"padEnd":"padStart"](2*r,"0")}`}function i(e,{dir:t,size:r=32}={}){if(null===r)return e;if(e.length>r)throw new n.SizeExceedsPaddingSizeError({size:e.length,targetSize:r,type:"bytes"});let o=new Uint8Array(r);for(let n=0;n0&&t>(0,i.size)(e)-1)throw new n.SliceOffsetOutOfBoundsError({offset:t,position:"start",size:(0,i.size)(e)})}function s(e,t,r){if("number"==typeof t&&"number"==typeof r&&(0,i.size)(e)!==r-t)throw new n.SliceOffsetOutOfBoundsError({offset:r,position:"end",size:(0,i.size)(e)})}function u(e,t,r,{strict:n}={}){a(e,t);let o=e.slice(t,r);return n&&s(o,t,r),o}function c(e,t,r,{strict:n}={}){a(e,t);let o=`0x${e.replace("0x","").slice((t??0)*2,(r??e.length)*2)}`;return n&&s(o,t,r),o}},46041:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.trim=function(e,{dir:t="left"}={}){let r="string"==typeof e?e.replace("0x",""):e,n=0;for(let e=0;e1||r[0]>1)throw new n.InvalidBytesBooleanError(r);return!!r[0]}function c(e,t={}){void 0!==t.size&&(0,i.assertSize)(e,{size:t.size});let r=(0,a.bytesToHex)(e,t);return(0,i.hexToNumber)(r,t)}function l(e,t={}){let r=e;return void 0!==t.size&&((0,i.assertSize)(r,{size:t.size}),r=(0,o.trim)(r,{dir:"right"})),new TextDecoder().decode(r)}},66877:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.assertSize=s,t.fromHex=function(e,t){let r="string"==typeof t?{to:t}:t,n=r.to;return"number"===n?l(e,r):"bigint"===n?u(e,r):"string"===n?d(e,r):"boolean"===n?c(e,r):(0,a.hexToBytes)(e,r)},t.hexToBigInt=u,t.hexToBool=c,t.hexToNumber=l,t.hexToString=d;let n=r(78753),o=r(92242),i=r(46041),a=r(14719);function s(e,{size:t}){if((0,o.size)(e)>t)throw new n.SizeOverflowError({givenSize:(0,o.size)(e),maxSize:t})}function u(e,t={}){let{signed:r}=t;t.size&&s(e,{size:t.size});let n=BigInt(e);if(!r)return n;let o=(e.length-2)/2;return n<=(1n<<8n*BigInt(o)-1n)-1n?n:n-BigInt(`0x${"f".padStart(2*o,"f")}`)-1n}function c(e,t={}){let r=e;if(t.size&&(s(r,{size:t.size}),r=(0,i.trim)(r)),"0x00"===(0,i.trim)(r))return!1;if("0x01"===(0,i.trim)(r))return!0;throw new n.InvalidHexBooleanError(r)}function l(e,t={}){return Number(u(e,t))}function d(e,t={}){let r=(0,a.hexToBytes)(e);return t.size&&(s(r,{size:t.size}),r=(0,i.trim)(r,{dir:"right"})),new TextDecoder().decode(r)}},16707:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.fromRlp=function(e,t="hex"){let r=(()=>{if("string"==typeof e){if(e.length>3&&e.length%2!=0)throw new o.InvalidHexValueError(e);return(0,a.hexToBytes)(e)}return e})();return function e(t,r="hex"){if(0===t.bytes.length)return"hex"===r?(0,s.bytesToHex)(t.bytes):t.bytes;let n=t.readByte();if(n<128&&t.decrementPosition(1),n<192){let e=u(t,n,128),o=t.readBytes(e);return"hex"===r?(0,s.bytesToHex)(o):o}let o=u(t,n,192);return function(t,r,n){let o=t.position,i=[];for(;t.position-o=l.zero&&e<=l.nine?e-l.zero:e>=l.A&&e<=l.F?e-(l.A-10):e>=l.a&&e<=l.f?e-(l.a-10):void 0}function f(e,t={}){let r=e;t.size&&((0,a.assertSize)(r,{size:t.size}),r=(0,i.pad)(r,{dir:"right",size:t.size}));let o=r.slice(2);o.length%2&&(o=`0${o}`);let s=o.length/2,u=new Uint8Array(s);for(let e=0,t=0;et.toString(16).padStart(2,"0"));function s(e,t={}){let r=`0x${Number(e)}`;return"number"==typeof t.size?((0,i.assertSize)(r,{size:t.size}),(0,o.pad)(r,{size:t.size})):r}function u(e,t={}){let r="";for(let t=0;tr||se+t.length,0),r=u(t);return{length:t<=55?1+t:1+r+t,encode(n){for(let{encode:o}of(t<=55?n.pushByte(192+t):(n.pushByte(247+r),1===r?n.pushUint8(t):2===r?n.pushUint16(t):3===r?n.pushUint24(t):n.pushUint32(t)),e))o(n)}}}(t.map(t=>e(t))):function(e){let t="string"==typeof e?(0,i.hexToBytes)(e):e,r=u(t.length);return{length:1===t.length&&t[0]<128?1:t.length<=55?1+t.length:1+r+t.length,encode(e){1===t.length&&t[0]<128||(t.length<=55?e.pushByte(128+t.length):(e.pushByte(183+r),1===r?e.pushUint8(t.length):2===r?e.pushUint16(t.length):3===r?e.pushUint24(t.length):e.pushUint32(t.length))),e.pushBytes(t)}}}(t)}(e),n=(0,o.createCursor)(new Uint8Array(r.length));return(r.encode(n),"hex"===t)?(0,a.bytesToHex)(n.bytes):n.bytes}function u(e){if(e<256)return 1;if(e<65536)return 2;if(e<16777216)return 3;if(e<4294967296)return 4;throw new n.BaseError("Length is too large.")}},33950:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.parseAvatarRecord=o;let n=r(59798);async function o(e,{gatewayUrls:t,record:r}){return/eip155:/i.test(r)?i(e,{gatewayUrls:t,record:r}):(0,n.parseAvatarUri)({uri:r,gatewayUrls:t})}async function i(e,{gatewayUrls:t,record:r}){let o=(0,n.parseNftUri)(r),i=await (0,n.getNftTokenUri)(e,{nft:o}),{uri:a,isOnChain:s,isEncoded:u}=(0,n.resolveAvatarUri)({uri:i,gatewayUrls:t});if(s&&(a.includes("data:application/json;base64,")||a.startsWith("{"))){let e=JSON.parse(u?atob(a.replace("data:application/json;base64,","")):a);return(0,n.parseAvatarUri)({uri:(0,n.getJsonImage)(e),gatewayUrls:t})}let c=o.tokenID;return"erc1155"===o.namespace&&(c=c.replace("0x","").padStart(64,"0")),(0,n.getMetadataAvatarUri)({gatewayUrls:t,uri:a.replace(/(?:0x)?{id}/,c)})}},59798:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.isImageUri=c,t.getGateway=l,t.resolveAvatarUri=d,t.getJsonImage=f,t.getMetadataAvatarUri=p,t.parseAvatarUri=b,t.parseNftUri=function(e){let t=e;t.startsWith("did:nft:")&&(t=t.replace("did:nft:","").replace(/_/g,"/"));let[r,n,i]=t.split("/"),[a,s]=r.split(":"),[u,c]=n.split(":");if(!a||"eip155"!==a.toLowerCase())throw new o.EnsAvatarInvalidNftUriError({reason:"Only EIP-155 supported"});if(!s)throw new o.EnsAvatarInvalidNftUriError({reason:"Chain ID not found"});if(!c)throw new o.EnsAvatarInvalidNftUriError({reason:"Contract address not found"});if(!i)throw new o.EnsAvatarInvalidNftUriError({reason:"Token ID not found"});if(!u)throw new o.EnsAvatarInvalidNftUriError({reason:"ERC namespace not found"});return{chainID:Number.parseInt(s,10),namespace:u.toLowerCase(),contractAddress:c,tokenID:i}},t.getNftTokenUri=m;let n=r(51693),o=r(62865),i=/(?https?:\/\/[^/]*|ipfs:\/|ipns:\/|ar:\/)?(?\/)?(?ipfs\/|ipns\/)?(?[\w\-.]+)(?\/.*)?/,a=/^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\/(?[\w\-.]+))?(?\/.*)?$/,s=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,u=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;async function c(e){try{let t=await fetch(e,{method:"HEAD"});if(200===t.status){let e=t.headers.get("content-type");return e?.startsWith("image/")}return!1}catch(t){if("object"==typeof t&&void 0!==t.response||!Object.hasOwn(globalThis,"Image"))return!1;return new Promise(t=>{let r=new Image;r.onload=()=>{t(!0)},r.onerror=()=>{t(!1)},r.src=e})}}function l(e,t){return e?e.endsWith("/")?e.slice(0,-1):e:t}function d({uri:e,gatewayUrls:t}){let r=s.test(e);if(r)return{uri:e,isOnChain:!0,isEncoded:r};let n=l(t?.ipfs,"https://ipfs.io"),c=l(t?.arweave,"https://arweave.net"),d=e.match(i),{protocol:f,subpath:p,target:b,subtarget:m=""}=d?.groups||{},y="ipns:/"===f||"ipns/"===p,h="ipfs:/"===f||"ipfs/"===p||a.test(e);if(e.startsWith("http")&&!y&&!h){let r=e;return t?.arweave&&(r=e.replace(/https:\/\/arweave.net/g,t?.arweave)),{uri:r,isOnChain:!1,isEncoded:!1}}if((y||h)&&b)return{uri:`${n}/${y?"ipns":"ipfs"}/${b}${m}`,isOnChain:!1,isEncoded:!1};if("ar:/"===f&&b)return{uri:`${c}/${b}${m||""}`,isOnChain:!1,isEncoded:!1};let g=e.replace(u,"");if(g.startsWith("e.json());return await b({gatewayUrls:e,uri:f(r)})}catch{throw new o.EnsAvatarUriResolutionError({uri:t})}}async function b({gatewayUrls:e,uri:t}){let{uri:r,isOnChain:n}=d({uri:t,gatewayUrls:e});if(n||await c(r))return r;throw new o.EnsAvatarUriResolutionError({uri:t})}async function m(e,{nft:t}){if("erc721"===t.namespace)return(0,n.readContract)(e,{address:t.contractAddress,abi:[{name:"tokenURI",type:"function",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"tokenURI",args:[BigInt(t.tokenID)]});if("erc1155"===t.namespace)return(0,n.readContract)(e,{address:t.contractAddress,abi:[{name:"uri",type:"function",stateMutability:"view",inputs:[{name:"_id",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"uri",args:[BigInt(t.tokenID)]});throw new o.EnsAvatarUnsupportedNamespaceError({namespace:t.namespace})}},92803:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.encodeLabelhash=function(e){return`[${e.slice(2)}]`}},36509:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.encodedLabelToLabelhash=function(e){if(66!==e.length||0!==e.indexOf("[")||65!==e.indexOf("]"))return null;let t=`0x${e.slice(1,65)}`;return(0,n.isHex)(t)?t:null};let n=r(49706)},23276:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.isNullUniversalResolverError=function(e){if(!(e instanceof n.BaseError))return!1;let t=e.walk(e=>e instanceof o.ContractFunctionRevertedError);return t instanceof o.ContractFunctionRevertedError&&(t.data?.errorName==="HttpError"||t.data?.errorName==="ResolverError"||t.data?.errorName==="ResolverNotContract"||t.data?.errorName==="ResolverNotFound"||t.data?.errorName==="ReverseAddressMismatch"||t.data?.errorName==="UnsupportedResolverProfile")};let n=r(3035),o=r(78924)},55085:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.labelhash=function(e){let t=new Uint8Array(32).fill(0);return e?(0,a.encodedLabelToLabelhash)(e)||(0,i.keccak256)((0,n.stringToBytes)(e)):(0,o.bytesToHex)(t)};let n=r(14719),o=r(30769),i=r(59391),a=r(36509)},74551:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.localBatchGatewayUrl=void 0,t.localBatchGatewayRequest=u;let n=r(73579),o=r(14012),i=r(79387),a=r(73135),s=r(15592);async function u(e){let{data:r,ccipRequest:c}=e,{args:[l]}=(0,i.decodeFunctionData)({abi:n.batchGatewayAbi,data:r}),d=[],f=[];return await Promise.all(l.map(async(e,r)=>{try{f[r]=e.urls.includes(t.localBatchGatewayUrl)?await u({data:e.data,ccipRequest:c}):await c(e),d[r]=!1}catch(e){d[r]=!0,f[r]="HttpRequestError"===e.name&&e.status?(0,a.encodeErrorResult)({abi:n.batchGatewayAbi,errorName:"HttpError",args:[e.status,e.shortMessage]}):(0,a.encodeErrorResult)({abi:[o.solidityError],errorName:"Error",args:["shortMessage"in e?e.shortMessage:e.message]})}})),(0,s.encodeFunctionResult)({abi:n.batchGatewayAbi,functionName:"query",result:[d,f]})}t.localBatchGatewayUrl="x-batch-gateway:true"},50789:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.namehash=function(e){let t=new Uint8Array(32).fill(0);if(!e)return(0,i.bytesToHex)(t);let r=e.split(".");for(let e=r.length-1;e>=0;e-=1){let i=(0,s.encodedLabelToLabelhash)(r[e]),u=i?(0,o.toBytes)(i):(0,a.keccak256)((0,o.stringToBytes)(r[e]),"bytes");t=(0,a.keccak256)((0,n.concat)([t,u]),"bytes")}return(0,i.bytesToHex)(t)};let n=r(22458),o=r(14719),i=r(30769),a=r(59391),s=r(36509)},94103:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.packetToBytes=function(e){let t=e.replace(/^\.|\.$/gm,"");if(0===t.length)return new Uint8Array(1);let r=new Uint8Array((0,n.stringToBytes)(t).byteLength+2),a=0,s=t.split(".");for(let e=0;e255&&(t=(0,n.stringToBytes)((0,o.encodeLabelhash)((0,i.labelhash)(s[e])))),r[a]=t.length,r.set(t,a+1),a+=t.length+1}return r.byteLength!==a+1?r.slice(0,a+1):r};let n=r(14719),o=r(92803),i=r(55085)},40542:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.toCoinType=function(e){if(1===e)return 60n;if(e>=2147483648||e<0)throw new n.EnsInvalidChainIdError({chainId:e});return BigInt((2147483648|e)>>>0)};let n=r(62865)},76919:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getCallError=function(e,{docsPath:t,...r}){let a=(()=>{let t=(0,i.getNodeError)(e,r);return t instanceof o.UnknownNodeError?e:t})();return new n.CallExecutionError(a,{docsPath:t,...r})};let n=r(78924),o=r(21013),i=r(45269)},19930:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getContractError=function(e,{abi:t,address:r,args:u,docsPath:c,functionName:l,sender:d}){let f=e instanceof i.RawContractError?e:e instanceof o.BaseError?e.walk(e=>"data"in e)||e.walk():{},{code:p,data:b,details:m,message:y,shortMessage:h}=f,g=e instanceof n.AbiDecodingZeroDataError?new i.ContractFunctionZeroDataError({functionName:l}):[3,s.InternalRpcError.code].includes(p)&&(b||m||y||h)||p===s.InvalidInputRpcError.code&&"execution reverted"===m&&b?new i.ContractFunctionRevertedError({abi:t,data:"object"==typeof b?b.data:b,functionName:l,message:f instanceof a.RpcRequestError?m:h??y}):e;return new i.ContractFunctionExecutionError(g,{abi:t,args:u,contractAddress:r,docsPath:c,functionName:l,sender:d})};let n=r(21837),o=r(3035),i=r(78924),a=r(8880),s=r(23635)},87912:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getEstimateGasError=function(e,{docsPath:t,...r}){let a=(()=>{let t=(0,i.getNodeError)(e,r);return t instanceof o.UnknownNodeError?e:t})();return new n.EstimateGasExecutionError(a,{docsPath:t,...r})};let n=r(9359),o=r(21013),i=r(45269)},45269:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.containsNodeError=function(e){return e instanceof a.TransactionRejectedRpcError||e instanceof a.InvalidInputRpcError||e instanceof i.RpcRequestError&&e.code===o.ExecutionRevertedError.code},t.getNodeError=function(e,t){let r=(e.details||"").toLowerCase(),i=e instanceof n.BaseError?e.walk(e=>e?.code===o.ExecutionRevertedError.code):e;return i instanceof n.BaseError?new o.ExecutionRevertedError({cause:e,message:i.details}):o.ExecutionRevertedError.nodeMessage.test(r)?new o.ExecutionRevertedError({cause:e,message:e.details}):o.FeeCapTooHighError.nodeMessage.test(r)?new o.FeeCapTooHighError({cause:e,maxFeePerGas:t?.maxFeePerGas}):o.FeeCapTooLowError.nodeMessage.test(r)?new o.FeeCapTooLowError({cause:e,maxFeePerGas:t?.maxFeePerGas}):o.NonceTooHighError.nodeMessage.test(r)?new o.NonceTooHighError({cause:e,nonce:t?.nonce}):o.NonceTooLowError.nodeMessage.test(r)?new o.NonceTooLowError({cause:e,nonce:t?.nonce}):o.NonceMaxValueError.nodeMessage.test(r)?new o.NonceMaxValueError({cause:e,nonce:t?.nonce}):o.InsufficientFundsError.nodeMessage.test(r)?new o.InsufficientFundsError({cause:e}):o.IntrinsicGasTooHighError.nodeMessage.test(r)?new o.IntrinsicGasTooHighError({cause:e,gas:t?.gas}):o.IntrinsicGasTooLowError.nodeMessage.test(r)?new o.IntrinsicGasTooLowError({cause:e,gas:t?.gas}):o.TransactionTypeNotSupportedError.nodeMessage.test(r)?new o.TransactionTypeNotSupportedError({cause:e}):o.TipAboveFeeCapError.nodeMessage.test(r)?new o.TipAboveFeeCapError({cause:e,maxFeePerGas:t?.maxFeePerGas,maxPriorityFeePerGas:t?.maxPriorityFeePerGas}):new o.UnknownNodeError({cause:e})};let n=r(3035),o=r(21013),i=r(8880),a=r(23635)},45157:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getTransactionError=function(e,{docsPath:t,...r}){let a=(()=>{let t=(0,i.getNodeError)(e,r);return t instanceof n.UnknownNodeError?e:t})();return new o.TransactionExecutionError(a,{docsPath:t,...r})};let n=r(21013),o=r(29896),i=r(45269)},18970:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.createFilterRequestScope=function(e,{method:t}){let r={};return"fallback"===e.transport.type&&e.transport.onResponse?.(({method:e,response:n,status:o,transport:i})=>{"success"===o&&t===e&&(r[n]=i.request)}),t=>r[t]||e.request}},29476:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.defineBlock=void 0,t.formatBlock=i;let n=r(78378),o=r(91194);function i(e,t){let r=(e.transactions??[]).map(e=>"string"==typeof e?e:(0,o.formatTransaction)(e));return{...e,baseFeePerGas:e.baseFeePerGas?BigInt(e.baseFeePerGas):null,blobGasUsed:e.blobGasUsed?BigInt(e.blobGasUsed):void 0,difficulty:e.difficulty?BigInt(e.difficulty):void 0,excessBlobGas:e.excessBlobGas?BigInt(e.excessBlobGas):void 0,gasLimit:e.gasLimit?BigInt(e.gasLimit):void 0,gasUsed:e.gasUsed?BigInt(e.gasUsed):void 0,hash:e.hash?e.hash:null,logsBloom:e.logsBloom?e.logsBloom:null,nonce:e.nonce?e.nonce:null,number:e.number?BigInt(e.number):null,size:e.size?BigInt(e.size):void 0,timestamp:e.timestamp?BigInt(e.timestamp):void 0,transactions:r,totalDifficulty:e.totalDifficulty?BigInt(e.totalDifficulty):null}}t.defineBlock=(0,n.defineFormatter)("block",i)},67390:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.extract=function(e,{format:t}){if(!t)return{};let r={};return function t(n){for(let o of Object.keys(n))o in e&&(r[o]=e[o]),n[o]&&"object"==typeof n[o]&&!Array.isArray(n[o])&&t(n[o])}(t(e||{})),r}},35041:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.formatFeeHistory=function(e){return{baseFeePerGas:e.baseFeePerGas.map(e=>BigInt(e)),gasUsedRatio:e.gasUsedRatio,oldestBlock:BigInt(e.oldestBlock),reward:e.reward?.map(e=>e.map(e=>BigInt(e)))}}},78378:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.defineFormatter=function(e,t){return({exclude:r,format:n})=>({exclude:r,format:(e,o)=>{let i=t(e,o);if(r)for(let e of r)delete i[e];return{...i,...n(e,o)}},type:e})}},99154:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.formatLog=function(e,{args:t,eventName:r}={}){return{...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,blockTimestamp:e.blockTimestamp?BigInt(e.blockTimestamp):null===e.blockTimestamp?null:void 0,logIndex:e.logIndex?Number(e.logIndex):null,transactionHash:e.transactionHash?e.transactionHash:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,...r?{args:t,eventName:r}:{}}}},94407:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.formatProof=function(e){return{...e,balance:e.balance?BigInt(e.balance):void 0,nonce:e.nonce?(0,n.hexToNumber)(e.nonce):void 0,storageProof:e.storageProof?e.storageProof.map(e=>({...e,value:BigInt(e.value)})):void 0}};let n=r(50303)},91194:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.defineTransaction=t.transactionType=void 0,t.formatTransaction=i;let n=r(66877),o=r(78378);function i(e,r){let o={...e,blockHash:e.blockHash?e.blockHash:null,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,chainId:e.chainId?(0,n.hexToNumber)(e.chainId):void 0,gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,maxFeePerBlobGas:e.maxFeePerBlobGas?BigInt(e.maxFeePerBlobGas):void 0,maxFeePerGas:e.maxFeePerGas?BigInt(e.maxFeePerGas):void 0,maxPriorityFeePerGas:e.maxPriorityFeePerGas?BigInt(e.maxPriorityFeePerGas):void 0,nonce:e.nonce?(0,n.hexToNumber)(e.nonce):void 0,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Number(e.transactionIndex):null,type:e.type?t.transactionType[e.type]:void 0,typeHex:e.type?e.type:void 0,value:e.value?BigInt(e.value):void 0,v:e.v?BigInt(e.v):void 0};return e.authorizationList&&(o.authorizationList=e.authorizationList.map(e=>({address:e.address,chainId:Number(e.chainId),nonce:Number(e.nonce),r:e.r,s:e.s,yParity:Number(e.yParity)}))),o.yParity=(()=>{if(e.yParity)return Number(e.yParity);if("bigint"==typeof o.v){if(0n===o.v||27n===o.v)return 0;if(1n===o.v||28n===o.v)return 1;if(o.v>=35n)return o.v%2n===0n?1:0}})(),"legacy"===o.type&&(delete o.accessList,delete o.maxFeePerBlobGas,delete o.maxFeePerGas,delete o.maxPriorityFeePerGas,delete o.yParity),"eip2930"===o.type&&(delete o.maxFeePerBlobGas,delete o.maxFeePerGas,delete o.maxPriorityFeePerGas),"eip1559"===o.type&&delete o.maxFeePerBlobGas,o}t.transactionType={"0x0":"legacy","0x1":"eip2930","0x2":"eip1559","0x3":"eip4844","0x4":"eip7702"},t.defineTransaction=(0,o.defineFormatter)("transaction",i)},43003:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.defineTransactionReceipt=t.receiptStatuses=void 0,t.formatTransactionReceipt=s;let n=r(66877),o=r(78378),i=r(99154),a=r(91194);function s(e,r){let o={...e,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,contractAddress:e.contractAddress?e.contractAddress:null,cumulativeGasUsed:e.cumulativeGasUsed?BigInt(e.cumulativeGasUsed):null,effectiveGasPrice:e.effectiveGasPrice?BigInt(e.effectiveGasPrice):null,gasUsed:e.gasUsed?BigInt(e.gasUsed):null,logs:e.logs?e.logs.map(e=>(0,i.formatLog)(e)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?(0,n.hexToNumber)(e.transactionIndex):null,status:e.status?t.receiptStatuses[e.status]:null,type:e.type?a.transactionType[e.type]||e.type:null};return e.blobGasPrice&&(o.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(o.blobGasUsed=BigInt(e.blobGasUsed)),o}t.receiptStatuses={"0x0":"reverted","0x1":"success"},t.defineTransactionReceipt=(0,o.defineFormatter)("transactionReceipt",s)},2148:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.defineTransactionRequest=t.rpcTransactionType=void 0,t.formatTransactionRequest=i;let n=r(30769),o=r(78378);function i(e,r){let o={};return void 0!==e.authorizationList&&(o.authorizationList=e.authorizationList.map(e=>({address:e.address,r:e.r?(0,n.numberToHex)(BigInt(e.r)):e.r,s:e.s?(0,n.numberToHex)(BigInt(e.s)):e.s,chainId:(0,n.numberToHex)(e.chainId),nonce:(0,n.numberToHex)(e.nonce),...void 0!==e.yParity?{yParity:(0,n.numberToHex)(e.yParity)}:{},...void 0!==e.v&&void 0===e.yParity?{v:(0,n.numberToHex)(e.v)}:{}}))),void 0!==e.accessList&&(o.accessList=e.accessList),void 0!==e.blobVersionedHashes&&(o.blobVersionedHashes=e.blobVersionedHashes),void 0!==e.blobs&&("string"!=typeof e.blobs[0]?o.blobs=e.blobs.map(e=>(0,n.bytesToHex)(e)):o.blobs=e.blobs),void 0!==e.data&&(o.data=e.data),e.account&&(o.from=e.account.address),void 0!==e.from&&(o.from=e.from),void 0!==e.gas&&(o.gas=(0,n.numberToHex)(e.gas)),void 0!==e.gasPrice&&(o.gasPrice=(0,n.numberToHex)(e.gasPrice)),void 0!==e.maxFeePerBlobGas&&(o.maxFeePerBlobGas=(0,n.numberToHex)(e.maxFeePerBlobGas)),void 0!==e.maxFeePerGas&&(o.maxFeePerGas=(0,n.numberToHex)(e.maxFeePerGas)),void 0!==e.maxPriorityFeePerGas&&(o.maxPriorityFeePerGas=(0,n.numberToHex)(e.maxPriorityFeePerGas)),void 0!==e.nonce&&(o.nonce=(0,n.numberToHex)(e.nonce)),void 0!==e.to&&(o.to=e.to),void 0!==e.type&&(o.type=t.rpcTransactionType[e.type]),void 0!==e.value&&(o.value=(0,n.numberToHex)(e.value)),o}t.rpcTransactionType={legacy:"0x0",eip2930:"0x1",eip1559:"0x2",eip4844:"0x3",eip7702:"0x4"},t.defineTransactionRequest=(0,o.defineFormatter)("transactionRequest",i)},54628:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getAction=function(e,t,r){let n=e[t.name];if("function"==typeof n)return n;let o=e[r];return"function"==typeof o?o:r=>t(e,r)}},30347:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.hashSignature=function(e){return i(e)};let n=r(14719),o=r(59391),i=e=>(0,o.keccak256)((0,n.toBytes)(e))},29732:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.isHash=function(e){return(0,n.isHex)(e)&&32===(0,o.size)(e)};let n=r(49706),o=r(92242)},59391:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.keccak256=function(e,t){let r=(0,n.keccak_256)((0,o.isHex)(e,{strict:!1})?(0,i.toBytes)(e):e);return"bytes"===(t||"hex")?r:(0,a.toHex)(r)};let n=r(27705),o=r(49706),i=r(14719),a=r(30769)},24019:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeSignature=function(e){let t=!0,r="",o=0,i="",a=!1;for(let n=0;n(0,n.slice)((0,o.toSignatureHash)(e),0,4)},16926:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.toFunctionSignature=void 0;var n=r(23546);Object.defineProperty(t,"toFunctionSignature",{enumerable:!0,get:function(){return n.toSignature}})},23546:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.toSignature=void 0;let n=r(65991),o=r(24019);t.toSignature=e=>{let t="string"==typeof e?e:(0,n.formatAbiItem)(e);return(0,o.normalizeSignature)(t)}},34708:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.toSignatureHash=function(e){return(0,n.hashSignature)((0,o.toSignature)(e))};let n=r(30347),o=r(23546)},50303:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.padBytes=t.pad=t.isHex=t.isBytes=t.concatHex=t.concatBytes=t.concat=t.getChainContractAddress=t.extractChain=t.defineChain=t.assertCurrentChain=t.offchainLookupSignature=t.offchainLookupAbiItem=t.offchainLookup=t.ccipFetch=t.ccipRequest=t.buildRequest=t.verifyAuthorization=t.serializeAuthorizationList=t.recoverAuthorizationAddress=t.hashAuthorization=t.isAddressEqual=t.isAddress=t.getCreateAddress=t.getCreate2Address=t.getContractAddress=t.getAddress=t.parseEventLogs=t.getAbiItem=t.formatAbiItemWithArgs=t.formatAbiParams=t.formatAbiItem=t.encodePacked=t.encodeFunctionResult=t.encodeFunctionData=t.encodeEventTopics=t.encodeErrorResult=t.encodeDeployData=t.encodeAbiParameters=t.decodeFunctionResult=t.decodeFunctionData=t.decodeEventLog=t.decodeErrorResult=t.decodeAbiParameters=t.publicKeyToAddress=t.parseAccount=t.parseAbiParameters=t.parseAbiParameter=t.parseAbiItem=t.parseAbi=void 0,t.ripemd160=t.keccak256=t.isHash=t.getAction=t.formatTransactionRequest=t.defineTransactionRequest=t.defineTransactionReceipt=t.transactionType=t.formatTransaction=t.defineTransaction=t.formatLog=t.defineFormatter=t.extract=t.formatBlock=t.defineBlock=t.getTransactionError=t.getNodeError=t.containsNodeError=t.getEstimateGasError=t.getContractError=t.getCallError=t.toRlp=t.toHex=t.stringToHex=t.numberToHex=t.bytesToHex=t.boolToHex=t.toBytes=t.stringToBytes=t.numberToBytes=t.hexToBytes=t.boolToBytes=t.fromRlp=t.hexToString=t.hexToNumber=t.hexToBool=t.hexToBigInt=t.fromHex=t.fromBytes=t.bytesToString=t.bytesToNumber=t.bytesToBool=t.bytesToBigint=t.bytesToBigInt=t.trim=t.sliceHex=t.sliceBytes=t.slice=t.size=t.padHex=void 0,t.validateTypedData=t.serializeTypedData=t.serializeTransaction=t.serializeAccessList=t.parseTransaction=t.getTransactionType=t.getSerializedTransactionType=t.assertTransactionLegacy=t.assertTransactionEIP2930=t.assertTransactionEIP1559=t.assertRequest=t.stringify=t.verifyTypedData=t.verifyMessage=t.verifyHash=t.serializeErc8010Signature=t.serializeErc6492Signature=t.recoverTypedDataAddress=t.recoverPublicKey=t.recoverMessageAddress=t.recoverAddress=t.parseErc8010Signature=t.parseErc6492Signature=t.isErc8010Signature=t.isErc6492Signature=t.hashTypedData=t.hashStruct=t.hashMessage=t.getWebSocketRpcClient=t.socketClientCache=t.getSocketRpcClient=t.getHttpRpcClient=t.rpc=t.getSocket=t.integerRegex=t.bytesRegex=t.arrayRegex=t.nonceManager=t.createNonceManager=t.getFunctionSignature=t.toFunctionSignature=t.getFunctionSelector=t.toFunctionSelector=t.toFunctionHash=t.getEventSignature=t.toEventSignature=t.getEventSelector=t.toEventSelector=t.toEventHash=t.sha256=void 0,t.parseUnits=t.parseGwei=t.parseEther=t.formatUnits=t.formatGwei=t.formatEther=void 0;var n=r(65991);Object.defineProperty(t,"parseAbi",{enumerable:!0,get:function(){return n.parseAbi}}),Object.defineProperty(t,"parseAbiItem",{enumerable:!0,get:function(){return n.parseAbiItem}}),Object.defineProperty(t,"parseAbiParameter",{enumerable:!0,get:function(){return n.parseAbiParameter}}),Object.defineProperty(t,"parseAbiParameters",{enumerable:!0,get:function(){return n.parseAbiParameters}});var o=r(83153);Object.defineProperty(t,"parseAccount",{enumerable:!0,get:function(){return o.parseAccount}});var i=r(5104);Object.defineProperty(t,"publicKeyToAddress",{enumerable:!0,get:function(){return i.publicKeyToAddress}});var a=r(29554);Object.defineProperty(t,"decodeAbiParameters",{enumerable:!0,get:function(){return a.decodeAbiParameters}});var s=r(78220);Object.defineProperty(t,"decodeErrorResult",{enumerable:!0,get:function(){return s.decodeErrorResult}});var u=r(94371);Object.defineProperty(t,"decodeEventLog",{enumerable:!0,get:function(){return u.decodeEventLog}});var c=r(79387);Object.defineProperty(t,"decodeFunctionData",{enumerable:!0,get:function(){return c.decodeFunctionData}});var l=r(13632);Object.defineProperty(t,"decodeFunctionResult",{enumerable:!0,get:function(){return l.decodeFunctionResult}});var d=r(57383);Object.defineProperty(t,"encodeAbiParameters",{enumerable:!0,get:function(){return d.encodeAbiParameters}});var f=r(26573);Object.defineProperty(t,"encodeDeployData",{enumerable:!0,get:function(){return f.encodeDeployData}});var p=r(73135);Object.defineProperty(t,"encodeErrorResult",{enumerable:!0,get:function(){return p.encodeErrorResult}});var b=r(19789);Object.defineProperty(t,"encodeEventTopics",{enumerable:!0,get:function(){return b.encodeEventTopics}});var m=r(51974);Object.defineProperty(t,"encodeFunctionData",{enumerable:!0,get:function(){return m.encodeFunctionData}});var y=r(15592);Object.defineProperty(t,"encodeFunctionResult",{enumerable:!0,get:function(){return y.encodeFunctionResult}});var h=r(64974);Object.defineProperty(t,"encodePacked",{enumerable:!0,get:function(){return h.encodePacked}});var g=r(70680);Object.defineProperty(t,"formatAbiItem",{enumerable:!0,get:function(){return g.formatAbiItem}}),Object.defineProperty(t,"formatAbiParams",{enumerable:!0,get:function(){return g.formatAbiParams}});var v=r(49830);Object.defineProperty(t,"formatAbiItemWithArgs",{enumerable:!0,get:function(){return v.formatAbiItemWithArgs}});var E=r(52396);Object.defineProperty(t,"getAbiItem",{enumerable:!0,get:function(){return E.getAbiItem}});var x=r(11066);Object.defineProperty(t,"parseEventLogs",{enumerable:!0,get:function(){return x.parseEventLogs}});var w=r(37743);Object.defineProperty(t,"getAddress",{enumerable:!0,get:function(){return w.getAddress}});var P=r(93111);Object.defineProperty(t,"getContractAddress",{enumerable:!0,get:function(){return P.getContractAddress}}),Object.defineProperty(t,"getCreate2Address",{enumerable:!0,get:function(){return P.getCreate2Address}}),Object.defineProperty(t,"getCreateAddress",{enumerable:!0,get:function(){return P.getCreateAddress}});var I=r(31342);Object.defineProperty(t,"isAddress",{enumerable:!0,get:function(){return I.isAddress}});var T=r(70843);Object.defineProperty(t,"isAddressEqual",{enumerable:!0,get:function(){return T.isAddressEqual}});var A=r(60652);Object.defineProperty(t,"hashAuthorization",{enumerable:!0,get:function(){return A.hashAuthorization}});var O=r(84218);Object.defineProperty(t,"recoverAuthorizationAddress",{enumerable:!0,get:function(){return O.recoverAuthorizationAddress}});var B=r(40869);Object.defineProperty(t,"serializeAuthorizationList",{enumerable:!0,get:function(){return B.serializeAuthorizationList}});var S=r(77352);Object.defineProperty(t,"verifyAuthorization",{enumerable:!0,get:function(){return S.verifyAuthorization}});var j=r(58877);Object.defineProperty(t,"buildRequest",{enumerable:!0,get:function(){return j.buildRequest}});var _=r(46069);Object.defineProperty(t,"ccipRequest",{enumerable:!0,get:function(){return _.ccipRequest}}),Object.defineProperty(t,"ccipFetch",{enumerable:!0,get:function(){return _.ccipRequest}}),Object.defineProperty(t,"offchainLookup",{enumerable:!0,get:function(){return _.offchainLookup}}),Object.defineProperty(t,"offchainLookupAbiItem",{enumerable:!0,get:function(){return _.offchainLookupAbiItem}}),Object.defineProperty(t,"offchainLookupSignature",{enumerable:!0,get:function(){return _.offchainLookupSignature}});var M=r(5909);Object.defineProperty(t,"assertCurrentChain",{enumerable:!0,get:function(){return M.assertCurrentChain}});var C=r(86892);Object.defineProperty(t,"defineChain",{enumerable:!0,get:function(){return C.defineChain}});var R=r(53657);Object.defineProperty(t,"extractChain",{enumerable:!0,get:function(){return R.extractChain}});var k=r(79810);Object.defineProperty(t,"getChainContractAddress",{enumerable:!0,get:function(){return k.getChainContractAddress}});var F=r(22458);Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return F.concat}}),Object.defineProperty(t,"concatBytes",{enumerable:!0,get:function(){return F.concatBytes}}),Object.defineProperty(t,"concatHex",{enumerable:!0,get:function(){return F.concatHex}});var N=r(64768);Object.defineProperty(t,"isBytes",{enumerable:!0,get:function(){return N.isBytes}});var H=r(49706);Object.defineProperty(t,"isHex",{enumerable:!0,get:function(){return H.isHex}});var U=r(61078);Object.defineProperty(t,"pad",{enumerable:!0,get:function(){return U.pad}}),Object.defineProperty(t,"padBytes",{enumerable:!0,get:function(){return U.padBytes}}),Object.defineProperty(t,"padHex",{enumerable:!0,get:function(){return U.padHex}});var z=r(92242);Object.defineProperty(t,"size",{enumerable:!0,get:function(){return z.size}});var L=r(86699);Object.defineProperty(t,"slice",{enumerable:!0,get:function(){return L.slice}}),Object.defineProperty(t,"sliceBytes",{enumerable:!0,get:function(){return L.sliceBytes}}),Object.defineProperty(t,"sliceHex",{enumerable:!0,get:function(){return L.sliceHex}});var $=r(46041);Object.defineProperty(t,"trim",{enumerable:!0,get:function(){return $.trim}});var D=r(72556);Object.defineProperty(t,"bytesToBigInt",{enumerable:!0,get:function(){return D.bytesToBigInt}}),Object.defineProperty(t,"bytesToBigint",{enumerable:!0,get:function(){return D.bytesToBigInt}}),Object.defineProperty(t,"bytesToBool",{enumerable:!0,get:function(){return D.bytesToBool}}),Object.defineProperty(t,"bytesToNumber",{enumerable:!0,get:function(){return D.bytesToNumber}}),Object.defineProperty(t,"bytesToString",{enumerable:!0,get:function(){return D.bytesToString}}),Object.defineProperty(t,"fromBytes",{enumerable:!0,get:function(){return D.fromBytes}});var q=r(66877);Object.defineProperty(t,"fromHex",{enumerable:!0,get:function(){return q.fromHex}}),Object.defineProperty(t,"hexToBigInt",{enumerable:!0,get:function(){return q.hexToBigInt}}),Object.defineProperty(t,"hexToBool",{enumerable:!0,get:function(){return q.hexToBool}}),Object.defineProperty(t,"hexToNumber",{enumerable:!0,get:function(){return q.hexToNumber}}),Object.defineProperty(t,"hexToString",{enumerable:!0,get:function(){return q.hexToString}});var G=r(16707);Object.defineProperty(t,"fromRlp",{enumerable:!0,get:function(){return G.fromRlp}});var V=r(14719);Object.defineProperty(t,"boolToBytes",{enumerable:!0,get:function(){return V.boolToBytes}}),Object.defineProperty(t,"hexToBytes",{enumerable:!0,get:function(){return V.hexToBytes}}),Object.defineProperty(t,"numberToBytes",{enumerable:!0,get:function(){return V.numberToBytes}}),Object.defineProperty(t,"stringToBytes",{enumerable:!0,get:function(){return V.stringToBytes}}),Object.defineProperty(t,"toBytes",{enumerable:!0,get:function(){return V.toBytes}});var W=r(30769);Object.defineProperty(t,"boolToHex",{enumerable:!0,get:function(){return W.boolToHex}}),Object.defineProperty(t,"bytesToHex",{enumerable:!0,get:function(){return W.bytesToHex}}),Object.defineProperty(t,"numberToHex",{enumerable:!0,get:function(){return W.numberToHex}}),Object.defineProperty(t,"stringToHex",{enumerable:!0,get:function(){return W.stringToHex}}),Object.defineProperty(t,"toHex",{enumerable:!0,get:function(){return W.toHex}});var K=r(63447);Object.defineProperty(t,"toRlp",{enumerable:!0,get:function(){return K.toRlp}});var Z=r(76919);Object.defineProperty(t,"getCallError",{enumerable:!0,get:function(){return Z.getCallError}});var J=r(19930);Object.defineProperty(t,"getContractError",{enumerable:!0,get:function(){return J.getContractError}});var Y=r(87912);Object.defineProperty(t,"getEstimateGasError",{enumerable:!0,get:function(){return Y.getEstimateGasError}});var X=r(45269);Object.defineProperty(t,"containsNodeError",{enumerable:!0,get:function(){return X.containsNodeError}}),Object.defineProperty(t,"getNodeError",{enumerable:!0,get:function(){return X.getNodeError}});var Q=r(45157);Object.defineProperty(t,"getTransactionError",{enumerable:!0,get:function(){return Q.getTransactionError}});var ee=r(29476);Object.defineProperty(t,"defineBlock",{enumerable:!0,get:function(){return ee.defineBlock}}),Object.defineProperty(t,"formatBlock",{enumerable:!0,get:function(){return ee.formatBlock}});var et=r(67390);Object.defineProperty(t,"extract",{enumerable:!0,get:function(){return et.extract}});var er=r(78378);Object.defineProperty(t,"defineFormatter",{enumerable:!0,get:function(){return er.defineFormatter}});var en=r(99154);Object.defineProperty(t,"formatLog",{enumerable:!0,get:function(){return en.formatLog}});var eo=r(91194);Object.defineProperty(t,"defineTransaction",{enumerable:!0,get:function(){return eo.defineTransaction}}),Object.defineProperty(t,"formatTransaction",{enumerable:!0,get:function(){return eo.formatTransaction}}),Object.defineProperty(t,"transactionType",{enumerable:!0,get:function(){return eo.transactionType}});var ei=r(43003);Object.defineProperty(t,"defineTransactionReceipt",{enumerable:!0,get:function(){return ei.defineTransactionReceipt}});var ea=r(2148);Object.defineProperty(t,"defineTransactionRequest",{enumerable:!0,get:function(){return ea.defineTransactionRequest}}),Object.defineProperty(t,"formatTransactionRequest",{enumerable:!0,get:function(){return ea.formatTransactionRequest}});var es=r(54628);Object.defineProperty(t,"getAction",{enumerable:!0,get:function(){return es.getAction}});var eu=r(29732);Object.defineProperty(t,"isHash",{enumerable:!0,get:function(){return eu.isHash}});var ec=r(59391);Object.defineProperty(t,"keccak256",{enumerable:!0,get:function(){return ec.keccak256}});var el=r(87916);Object.defineProperty(t,"ripemd160",{enumerable:!0,get:function(){return el.ripemd160}});var ed=r(4972);Object.defineProperty(t,"sha256",{enumerable:!0,get:function(){return ed.sha256}});var ef=r(84743);Object.defineProperty(t,"toEventHash",{enumerable:!0,get:function(){return ef.toEventHash}});var ep=r(13141);Object.defineProperty(t,"toEventSelector",{enumerable:!0,get:function(){return ep.toEventSelector}}),Object.defineProperty(t,"getEventSelector",{enumerable:!0,get:function(){return ep.toEventSelector}});var eb=r(6820);Object.defineProperty(t,"toEventSignature",{enumerable:!0,get:function(){return eb.toEventSignature}}),Object.defineProperty(t,"getEventSignature",{enumerable:!0,get:function(){return eb.toEventSignature}});var em=r(67038);Object.defineProperty(t,"toFunctionHash",{enumerable:!0,get:function(){return em.toFunctionHash}});var ey=r(78038);Object.defineProperty(t,"toFunctionSelector",{enumerable:!0,get:function(){return ey.toFunctionSelector}}),Object.defineProperty(t,"getFunctionSelector",{enumerable:!0,get:function(){return ey.toFunctionSelector}});var eh=r(16926);Object.defineProperty(t,"toFunctionSignature",{enumerable:!0,get:function(){return eh.toFunctionSignature}}),Object.defineProperty(t,"getFunctionSignature",{enumerable:!0,get:function(){return eh.toFunctionSignature}});var eg=r(34332);Object.defineProperty(t,"createNonceManager",{enumerable:!0,get:function(){return eg.createNonceManager}}),Object.defineProperty(t,"nonceManager",{enumerable:!0,get:function(){return eg.nonceManager}});var ev=r(13186);Object.defineProperty(t,"arrayRegex",{enumerable:!0,get:function(){return ev.arrayRegex}}),Object.defineProperty(t,"bytesRegex",{enumerable:!0,get:function(){return ev.bytesRegex}}),Object.defineProperty(t,"integerRegex",{enumerable:!0,get:function(){return ev.integerRegex}});var eE=r(91009);Object.defineProperty(t,"getSocket",{enumerable:!0,get:function(){return eE.getSocket}}),Object.defineProperty(t,"rpc",{enumerable:!0,get:function(){return eE.rpc}});var ex=r(61456);Object.defineProperty(t,"getHttpRpcClient",{enumerable:!0,get:function(){return ex.getHttpRpcClient}});var ew=r(97506);Object.defineProperty(t,"getSocketRpcClient",{enumerable:!0,get:function(){return ew.getSocketRpcClient}}),Object.defineProperty(t,"socketClientCache",{enumerable:!0,get:function(){return ew.socketClientCache}});var eP=r(52060);Object.defineProperty(t,"getWebSocketRpcClient",{enumerable:!0,get:function(){return eP.getWebSocketRpcClient}});var eI=r(34769);Object.defineProperty(t,"hashMessage",{enumerable:!0,get:function(){return eI.hashMessage}});var eT=r(38445);Object.defineProperty(t,"hashStruct",{enumerable:!0,get:function(){return eT.hashStruct}}),Object.defineProperty(t,"hashTypedData",{enumerable:!0,get:function(){return eT.hashTypedData}});var eA=r(7933);Object.defineProperty(t,"isErc6492Signature",{enumerable:!0,get:function(){return eA.isErc6492Signature}});var eO=r(32914);Object.defineProperty(t,"isErc8010Signature",{enumerable:!0,get:function(){return eO.isErc8010Signature}});var eB=r(70853);Object.defineProperty(t,"parseErc6492Signature",{enumerable:!0,get:function(){return eB.parseErc6492Signature}});var eS=r(93903);Object.defineProperty(t,"parseErc8010Signature",{enumerable:!0,get:function(){return eS.parseErc8010Signature}});var ej=r(6271);Object.defineProperty(t,"recoverAddress",{enumerable:!0,get:function(){return ej.recoverAddress}});var e_=r(78581);Object.defineProperty(t,"recoverMessageAddress",{enumerable:!0,get:function(){return e_.recoverMessageAddress}});var eM=r(58972);Object.defineProperty(t,"recoverPublicKey",{enumerable:!0,get:function(){return eM.recoverPublicKey}});var eC=r(83160);Object.defineProperty(t,"recoverTypedDataAddress",{enumerable:!0,get:function(){return eC.recoverTypedDataAddress}});var eR=r(40028);Object.defineProperty(t,"serializeErc6492Signature",{enumerable:!0,get:function(){return eR.serializeErc6492Signature}});var ek=r(41252);Object.defineProperty(t,"serializeErc8010Signature",{enumerable:!0,get:function(){return ek.serializeErc8010Signature}});var eF=r(86605);Object.defineProperty(t,"verifyHash",{enumerable:!0,get:function(){return eF.verifyHash}});var eN=r(72697);Object.defineProperty(t,"verifyMessage",{enumerable:!0,get:function(){return eN.verifyMessage}});var eH=r(92384);Object.defineProperty(t,"verifyTypedData",{enumerable:!0,get:function(){return eH.verifyTypedData}});var eU=r(71156);Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return eU.stringify}});var ez=r(13714);Object.defineProperty(t,"assertRequest",{enumerable:!0,get:function(){return ez.assertRequest}});var eL=r(96466);Object.defineProperty(t,"assertTransactionEIP1559",{enumerable:!0,get:function(){return eL.assertTransactionEIP1559}}),Object.defineProperty(t,"assertTransactionEIP2930",{enumerable:!0,get:function(){return eL.assertTransactionEIP2930}}),Object.defineProperty(t,"assertTransactionLegacy",{enumerable:!0,get:function(){return eL.assertTransactionLegacy}});var e$=r(57227);Object.defineProperty(t,"getSerializedTransactionType",{enumerable:!0,get:function(){return e$.getSerializedTransactionType}});var eD=r(92830);Object.defineProperty(t,"getTransactionType",{enumerable:!0,get:function(){return eD.getTransactionType}});var eq=r(98884);Object.defineProperty(t,"parseTransaction",{enumerable:!0,get:function(){return eq.parseTransaction}});var eG=r(62235);Object.defineProperty(t,"serializeAccessList",{enumerable:!0,get:function(){return eG.serializeAccessList}});var eV=r(47041);Object.defineProperty(t,"serializeTransaction",{enumerable:!0,get:function(){return eV.serializeTransaction}});var eW=r(56617);Object.defineProperty(t,"serializeTypedData",{enumerable:!0,get:function(){return eW.serializeTypedData}}),Object.defineProperty(t,"validateTypedData",{enumerable:!0,get:function(){return eW.validateTypedData}});var eK=r(38928);Object.defineProperty(t,"formatEther",{enumerable:!0,get:function(){return eK.formatEther}});var eZ=r(18624);Object.defineProperty(t,"formatGwei",{enumerable:!0,get:function(){return eZ.formatGwei}});var eJ=r(65723);Object.defineProperty(t,"formatUnits",{enumerable:!0,get:function(){return eJ.formatUnits}});var eY=r(39342);Object.defineProperty(t,"parseEther",{enumerable:!0,get:function(){return eY.parseEther}});var eX=r(26248);Object.defineProperty(t,"parseGwei",{enumerable:!0,get:function(){return eX.parseGwei}});var eQ=r(79721);Object.defineProperty(t,"parseUnits",{enumerable:!0,get:function(){return eQ.parseUnits}})},40439:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.defineKzg=function({blobToKzgCommitment:e,computeBlobKzgProof:t}){return{blobToKzgCommitment:e,computeBlobKzgProof:t}}},50860:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.setupKzg=function(e,t){try{e.loadTrustedSetup(t)}catch(e){if(!e.message.includes("trusted setup is already loaded"))throw e}return(0,n.defineKzg)(e)};let n=r(40439)},87569:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.LruMap=void 0;class r extends Map{constructor(e){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=e}get(e){let t=super.get(e);return super.has(e)&&void 0!==t&&(this.delete(e),super.set(e,t)),t}set(e,t){if(super.set(e,t),this.maxSize&&this.size>this.maxSize){let e=this.keys().next().value;e&&this.delete(e)}return this}}t.LruMap=r},34332:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.nonceManager=void 0,t.createNonceManager=i,t.jsonRpc=a;let n=r(53335),o=r(87569);function i(e){let{source:t}=e,r=new Map,n=new o.LruMap(8192),i=new Map,a=({address:e,chainId:t})=>`${e}.${t}`;return{async consume({address:e,chainId:r,client:o}){let i=a({address:e,chainId:r}),s=this.get({address:e,chainId:r,client:o});this.increment({address:e,chainId:r});let u=await s;return await t.set({address:e,chainId:r},u),n.set(i,u),u},async increment({address:e,chainId:t}){let n=a({address:e,chainId:t}),o=r.get(n)??0;r.set(n,o+1)},async get({address:e,chainId:o,client:s}){let u=a({address:e,chainId:o}),c=i.get(u);return c||(c=(async()=>{try{let r=await t.get({address:e,chainId:o,client:s}),i=n.get(u)??0;if(i>0&&r<=i)return i+1;return n.delete(u),r}finally{this.reset({address:e,chainId:o})}})(),i.set(u,c)),(r.get(u)??0)+await c},reset({address:e,chainId:t}){let n=a({address:e,chainId:t});r.delete(n),i.delete(n)}}}function a(){return{async get(e){let{address:t,client:r}=e;return(0,n.getTransactionCount)(r,{address:t,blockTag:"pending"})},set(){}}}t.nonceManager=i({source:a()})},39102:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.cleanupCache=t.listenersCache=void 0,t.observe=function(e,n,o){let i=++r,a=()=>t.listenersCache.get(e)||[],s=()=>{let r=a();t.listenersCache.set(e,r.filter(e=>e.id!==i))},u=()=>{let r=a();if(!r.some(e=>e.id===i))return;let n=t.cleanupCache.get(e);if(1===r.length&&n){let e=n();e instanceof Promise&&e.catch(()=>{})}s()},c=a();if(t.listenersCache.set(e,[...c,{id:i,fns:n}]),c&&c.length>0)return u;let l={};for(let e in n)l[e]=(...t)=>{let r=a();if(0!==r.length)for(let n of r)n.fns[e]?.(...t)};let d=o(l);return"function"==typeof d&&t.cleanupCache.set(e,d),u},t.listenersCache=new Map,t.cleanupCache=new Map;let r=0},52258:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.poll=function(e,{emitOnBegin:t,initialWaitTime:r,interval:o}){let i=!0,a=()=>i=!1;return(async()=>{let s;t&&(s=await e({unpoll:a}));let u=await r?.(s)??o;await (0,n.wait)(u);let c=async()=>{i&&(await e({unpoll:a}),await (0,n.wait)(o),c())};c()})(),a};let n=r(82958)},62018:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.createBatchScheduler=function({fn:e,id:t,shouldSplitBatch:r,wait:i=0,sort:a}){let s=async()=>{let t=l();u();let r=t.map(({args:e})=>e);0!==r.length&&e(r).then(e=>{a&&Array.isArray(e)&&e.sort(a);for(let r=0;r{for(let r=0;ro.delete(t),c=()=>l().map(({args:e})=>e),l=()=>o.get(t)||[],d=e=>o.set(t,[...l(),e]);return{flush:u,async schedule(e){let{promise:t,resolve:o,reject:a}=(0,n.withResolvers)();return(r?.([...c(),e])&&s(),l().length>0)?d({args:e,resolve:o,reject:a}):(d({args:e,resolve:o,reject:a}),setTimeout(s,i)),t}}};let n=r(55934),o=new Map},70513:function(e,t){function r(e){let r=(e,t)=>({clear:()=>t.delete(e),get:()=>t.get(e),set:r=>t.set(e,r)}),n=r(e,t.promiseCache),o=r(e,t.responseCache);return{clear:()=>{n.clear(),o.clear()},promise:n,response:o}}async function n(e,{cacheKey:t,cacheTime:n=Number.POSITIVE_INFINITY}){let o=r(t),i=o.response.get();if(i&&n>0&&Date.now()-i.created.getTime()t.promiseCache.delete(n));return t.promiseCache.set(n,o),o};let n=r(87569);t.promiseCache=new n.LruMap(8192)},55934:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.withResolvers=function(){let e=()=>void 0,t=()=>void 0;return{promise:new Promise((r,n)=>{e=r,t=n}),resolve:e,reject:t}}},96055:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.withRetry=function(e,{delay:t=100,retryCount:r=2,shouldRetry:o=()=>!0}={}){return new Promise((i,a)=>{let s=async({count:u=0}={})=>{let c=async({error:e})=>{let r="function"==typeof t?t({count:u,error:e}):t;r&&await (0,n.wait)(r),s({count:u+1})};try{let t=await e();i(t)}catch(e){if(u{(async()=>{let a;try{let s=new AbortController;r>0&&(a=setTimeout(()=>{n?s.abort():i(t)},r)),o(await e({signal:s?.signal||null}))}catch(e){e?.name==="AbortError"&&i(t),i(e)}finally{clearTimeout(a)}})()})}},13186:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.integerRegex=t.bytesRegex=t.arrayRegex=void 0,t.arrayRegex=/^(.*)\[([0-9]*)\]$/,t.bytesRegex=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,t.integerRegex=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/},91009:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.rpc=void 0,t.getSocket=a;let n=r(61456),o=r(52060);async function i(e,{body:t,timeout:r=1e4}){return e.requestAsync({body:t,timeout:r})}async function a(e){let t=await (0,o.getWebSocketRpcClient)(e);return Object.assign(t.socket,{requests:t.requests,subscriptions:t.subscriptions})}t.rpc={http:(e,t)=>(0,n.getHttpRpcClient)(e).request(t),webSocket:function(e,{body:t,onError:r,onResponse:n}){return e.request({body:t,onError:r,onResponse:n}),e},webSocketAsync:i}},61456:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getHttpRpcClient=function(e,t={}){return{async request(r){let{body:s,fetchFn:u=t.fetchFn??fetch,onRequest:c=t.onRequest,onResponse:l=t.onResponse,timeout:d=t.timeout??1e4}=r,f={...t.fetchOptions??{},...r.fetchOptions??{}},{headers:p,method:b,signal:m}=f;try{let t;let r=await (0,o.withTimeout)(async({signal:t})=>{let r={...f,body:Array.isArray(s)?(0,i.stringify)(s.map(e=>({jsonrpc:"2.0",id:e.id??a.idCache.take(),...e}))):(0,i.stringify)({jsonrpc:"2.0",id:s.id??a.idCache.take(),...s}),headers:{"Content-Type":"application/json",...p},method:b||"POST",signal:m||(d>0?t:null)},n=new Request(e,r),o=await c?.(n,r)??{...r,url:e};return await u(o.url??e,o)},{errorInstance:new n.TimeoutError({body:s,url:e}),timeout:d,signal:!0});if(l&&await l(r),r.headers.get("Content-Type")?.startsWith("application/json"))t=await r.json();else{t=await r.text();try{t=JSON.parse(t||"{}")}catch(e){if(r.ok)throw e;t={error:t}}}if(!r.ok)throw new n.HttpRequestError({body:s,details:(0,i.stringify)(t.error)||r.statusText,headers:r.headers,status:r.status,url:e});return t}catch(t){if(t instanceof n.HttpRequestError||t instanceof n.TimeoutError)throw t;throw new n.HttpRequestError({body:s,cause:t,url:e})}}}};let n=r(8880),o=r(16637),i=r(71156),a=r(69385)},69385:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.idCache=void 0,t.idCache={current:0,take(){return this.current++},reset(){this.current=0}}},97506:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.socketClientCache=void 0,t.getSocketRpcClient=s;let n=r(8880),o=r(62018),i=r(16637),a=r(69385);async function s(e){let{getSocket:r,keepAlive:s=!0,key:u="socket",reconnect:c=!0,url:l}=e,{interval:d=3e4}="object"==typeof s?s:{},{attempts:f=5,delay:p=2e3}="object"==typeof c?c:{},b=JSON.stringify({keepAlive:s,key:u,url:l,reconnect:c}),m=t.socketClientCache.get(b);if(m)return m;let y=0,{schedule:h}=(0,o.createBatchScheduler)({id:b,fn:async()=>{let e,o,u;let h=new Map,g=new Map,v=!1;function E(){c&&y{await x().catch(console.error),v=!1},p)):(h.clear(),g.clear())}async function x(){let t=await r({onClose(){for(let e of h.values())e.onError?.(new n.SocketClosedError({url:l}));for(let e of g.values())e.onError?.(new n.SocketClosedError({url:l}));E()},onError(t){for(let r of(e=t,h.values()))r.onError?.(e);for(let t of g.values())t.onError?.(e);E()},onOpen(){e=void 0,y=0},onResponse(e){let t="eth_subscription"===e.method,r=t?e.params.subscription:e.id,n=t?g:h,o=n.get(r);o&&o.onResponse(e),t||n.delete(r)}});if(o=t,s&&(u&&clearInterval(u),u=setInterval(()=>o.ping?.(),d)),c&&g.size>0)for(let[e,{onResponse:t,body:r,onError:n}]of g.entries())r&&(g.delete(e),m?.request({body:r,onResponse:t,onError:n}));return t}return await x(),e=void 0,m={close(){u&&clearInterval(u),o.close(),t.socketClientCache.delete(b)},get socket(){return o},request({body:t,onError:r,onResponse:n}){e&&r&&r(e);let i=t.id??a.idCache.take(),s=e=>{("number"!=typeof e.id||i===e.id)&&("eth_subscribe"===t.method&&"string"==typeof e.result&&g.set(e.result,{onResponse:s,onError:r,body:t}),n(e))};"eth_unsubscribe"===t.method&&g.delete(t.params?.[0]),h.set(i,{onResponse:s,onError:r});try{o.request({body:{jsonrpc:"2.0",id:i,...t}})}catch(e){r?.(e)}},requestAsync({body:e,timeout:t=1e4}){return(0,i.withTimeout)(()=>new Promise((t,r)=>this.request({body:e,onError:r,onResponse:t})),{errorInstance:new n.TimeoutError({body:e,url:l}),timeout:t})},requests:h,subscriptions:g,url:l},t.socketClientCache.set(b,m),[m]}}),[g,[v]]=await h();return v}t.socketClientCache=new Map},52060:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getWebSocketRpcClient=i;let n=r(8880),o=r(97506);async function i(e,t={}){let{keepAlive:i,reconnect:a}=t;return(0,o.getSocketRpcClient)({async getSocket({onClose:t,onError:o,onOpen:i,onResponse:a}){let s=await Promise.resolve().then(()=>r(8759)).then(e=>e.WebSocket),u=new s(e);function c(){u.removeEventListener("close",c),u.removeEventListener("message",l),u.removeEventListener("error",o),u.removeEventListener("open",i),t()}function l({data:e}){if("string"!=typeof e||0!==e.trim().length)try{let t=JSON.parse(e);a(t)}catch(e){o(e)}}u.addEventListener("close",c),u.addEventListener("message",l),u.addEventListener("error",o),u.addEventListener("open",i),u.readyState===s.CONNECTING&&await new Promise((e,t)=>{u&&(u.onopen=e,u.onerror=t)});let{close:d}=u;return Object.assign(u,{close(){d.bind(u)(),c()},ping(){try{if(u.readyState===u.CLOSED||u.readyState===u.CLOSING)throw new n.WebSocketRequestError({url:u.url,cause:new n.SocketClosedError({url:u.url})});u.send(JSON.stringify({jsonrpc:"2.0",id:null,method:"net_version",params:[]}))}catch(e){o(e)}},request({body:e}){if(u.readyState===u.CLOSED||u.readyState===u.CLOSING)throw new n.WebSocketRequestError({body:e,url:u.url,cause:new n.SocketClosedError({url:u.url})});return u.send(JSON.stringify(e))}})},keepAlive:i,reconnect:a,url:e})}},58372:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.compactSignatureToSignature=function({r:e,yParityAndS:t}){let r=(0,n.hexToBytes)(t),i=128&r[0]?1:0;return 1===i&&(r[0]&=127),{r:e,s:(0,o.bytesToHex)(r),yParity:i}};let n=r(14719),o=r(30769)},34769:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.hashMessage=function(e,t){return(0,n.keccak256)((0,o.toPrefixedMessage)(e),t)};let n=r(59391),o=r(85548)},38445:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.hashTypedData=function(e){let{domain:t={},message:r,primaryType:n}=e,i={EIP712Domain:(0,s.getTypesForEIP712Domain)({domain:t}),...e.types};(0,s.validateTypedData)({domain:t,message:r,primaryType:n,types:i});let l=["0x1901"];return t&&l.push(u({domain:t,types:i})),"EIP712Domain"!==n&&l.push(c({data:r,primaryType:n,types:i})),(0,a.keccak256)((0,o.concat)(l))},t.hashDomain=u,t.hashStruct=c,t.encodeType=l;let n=r(57383),o=r(22458),i=r(30769),a=r(59391),s=r(56617);function u({domain:e,types:t}){return c({data:e,primaryType:"EIP712Domain",types:t})}function c({data:e,primaryType:t,types:r}){let o=function e({data:t,primaryType:r,types:o}){let s=[{type:"bytes32"}],u=[function({primaryType:e,types:t}){let r=(0,i.toHex)(l({primaryType:e,types:t}));return(0,a.keccak256)(r)}({primaryType:r,types:o})];for(let c of o[r]){let[r,l]=function t({types:r,name:o,type:s,value:u}){if(void 0!==r[s])return[{type:"bytes32"},(0,a.keccak256)(e({data:u,primaryType:s,types:r}))];if("bytes"===s)return[{type:"bytes32"},(0,a.keccak256)(u)];if("string"===s)return[{type:"bytes32"},(0,a.keccak256)((0,i.toHex)(u))];if(s.lastIndexOf("]")===s.length-1){let e=s.slice(0,s.lastIndexOf("[")),i=u.map(n=>t({name:o,type:e,types:r,value:n}));return[{type:"bytes32"},(0,a.keccak256)((0,n.encodeAbiParameters)(i.map(([e])=>e),i.map(([,e])=>e)))]}return[{type:s},u]}({types:o,name:c.name,type:c.type,value:t[c.name]});s.push(r),u.push(l)}return(0,n.encodeAbiParameters)(s,u)}({data:e,primaryType:t,types:r});return(0,a.keccak256)(o)}function l({primaryType:e,types:t}){let r="",n=function e({primaryType:t,types:r},n=new Set){let o=t.match(/^\w*/u),i=o?.[0];if(n.has(i)||void 0===r[i])return n;for(let t of(n.add(i),r[i]))e({primaryType:t.type,types:r},n);return n}({primaryType:e,types:t});for(let o of(n.delete(e),[e,...Array.from(n).sort()]))r+=`${o}(${t[o].map(({name:e,type:t})=>`${t} ${e}`).join(",")})`;return r}},7933:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.isErc6492Signature=function(e){return(0,o.sliceHex)(e,-32)===n.erc6492MagicBytes};let n=r(99624),o=r(86699)},32914:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.isErc8010Signature=function(e){return n.SignatureErc8010.validate(e)};let n=r(31225)},40040:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.parseCompactSignature=function(e){let{r:t,s:r}=n.secp256k1.Signature.fromCompact(e.slice(2,130));return{r:(0,o.numberToHex)(t,{size:32}),yParityAndS:(0,o.numberToHex)(r,{size:32})}};let n=r(92989),o=r(30769)},70853:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.parseErc6492Signature=function(e){if(!(0,o.isErc6492Signature)(e))return{signature:e};let[t,r,i]=(0,n.decodeAbiParameters)([{type:"address"},{type:"bytes"},{type:"bytes"}],e);return{address:t,data:r,signature:i}};let n=r(29554),o=r(7933)},93903:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.parseErc8010Signature=function(e){if(!(0,i.isErc8010Signature)(e))return{signature:e};let{authorization:t,to:r,...a}=n.SignatureErc8010.unwrap(e);return{authorization:{address:t.address,chainId:t.chainId,nonce:Number(t.nonce),r:(0,o.numberToHex)(t.r,{size:32}),s:(0,o.numberToHex)(t.s,{size:32}),yParity:t.yParity},...r?{address:r}:{},...a}};let n=r(31225),o=r(30769),i=r(32914)},70343:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.parseSignature=function(e){let{r:t,s:r}=n.secp256k1.Signature.fromCompact(e.slice(2,130)),i=Number(`0x${e.slice(130)}`),[a,s]=(()=>{if(0===i||1===i)return[void 0,i];if(27===i)return[BigInt(i),0];if(28===i)return[BigInt(i),1];throw Error("Invalid yParityOrV value")})();return void 0!==a?{r:(0,o.numberToHex)(t,{size:32}),s:(0,o.numberToHex)(r,{size:32}),v:a,yParity:s}:{r:(0,o.numberToHex)(t,{size:32}),s:(0,o.numberToHex)(r,{size:32}),yParity:s}};let n=r(92989),o=r(30769)},6271:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.recoverAddress=i;let n=r(5104),o=r(58972);async function i({hash:e,signature:t}){return(0,n.publicKeyToAddress)(await (0,o.recoverPublicKey)({hash:e,signature:t}))}},78581:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.recoverMessageAddress=i;let n=r(34769),o=r(6271);async function i({message:e,signature:t}){return(0,o.recoverAddress)({hash:(0,n.hashMessage)(e),signature:t})}},58972:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.recoverPublicKey=s;let n=r(49706),o=r(92242),i=r(66877),a=r(30769);async function s({hash:e,signature:t}){let s=(0,n.isHex)(e)?e:(0,a.toHex)(e),{secp256k1:c}=await Promise.resolve().then(()=>r(92989)),l=(()=>{if("object"==typeof t&&"r"in t&&"s"in t){let{r:e,s:r,v:n,yParity:o}=t,a=u(Number(o??n));return new c.Signature((0,i.hexToBigInt)(e),(0,i.hexToBigInt)(r)).addRecoveryBit(a)}let e=(0,n.isHex)(t)?t:(0,a.toHex)(t);if(65!==(0,o.size)(e))throw Error("invalid signature length");let r=u((0,i.hexToNumber)(`0x${e.slice(130)}`));return c.Signature.fromCompact(e.substring(2,130)).addRecoveryBit(r)})().recoverPublicKey(s.substring(2)).toHex(!1);return`0x${l}`}function u(e){if(0===e||1===e)return e;if(27===e)return 0;if(28===e)return 1;throw Error("Invalid yParityOrV value")}},32608:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.recoverTransactionAddress=s;let n=r(59391),o=r(98884),i=r(47041),a=r(6271);async function s(e){let{serializedTransaction:t,signature:r}=e,s=(0,o.parseTransaction)(t),u=r??{r:s.r,s:s.s,v:s.v,yParity:s.yParity},c=(0,i.serializeTransaction)({...s,r:void 0,s:void 0,v:void 0,yParity:void 0,sidecars:void 0});return await (0,a.recoverAddress)({hash:(0,n.keccak256)(c),signature:u})}},83160:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.recoverTypedDataAddress=i;let n=r(38445),o=r(6271);async function i(e){let{domain:t,message:r,primaryType:i,signature:a,types:s}=e;return(0,o.recoverAddress)({hash:(0,n.hashTypedData)({domain:t,message:r,primaryType:i,types:s}),signature:a})}},93039:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.serializeCompactSignature=function({r:e,yParityAndS:t}){return`0x${new n.secp256k1.Signature((0,o.hexToBigInt)(e),(0,o.hexToBigInt)(t)).toCompactHex()}`};let n=r(92989),o=r(66877)},40028:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.serializeErc6492Signature=function(e){let{address:t,data:r,signature:s,to:u="hex"}=e,c=(0,i.concatHex)([(0,o.encodeAbiParameters)([{type:"address"},{type:"bytes"},{type:"bytes"}],[t,r,s]),n.erc6492MagicBytes]);return"hex"===u?c:(0,a.hexToBytes)(c)};let n=r(99624),o=r(57383),i=r(22458),a=r(14719)},41252:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.serializeErc8010Signature=function(e){let{address:t,data:r,signature:i,to:a="hex"}=e,s=n.SignatureErc8010.wrap({authorization:{address:e.authorization.address,chainId:e.authorization.chainId,nonce:BigInt(e.authorization.nonce),r:BigInt(e.authorization.r),s:BigInt(e.authorization.s),yParity:e.authorization.yParity},data:r,signature:i,to:t});return"hex"===a?s:(0,o.hexToBytes)(s)};let n=r(31225),o=r(14719)},89762:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.serializeSignature=function({r:e,s:t,to:r="hex",v:a,yParity:s}){let u=(()=>{if(0===s||1===s)return s;if(a&&(27n===a||28n===a||a>=35n))return a%2n===0n?1:0;throw Error("Invalid `v` or `yParity` value")})(),c=`0x${new n.secp256k1.Signature((0,o.hexToBigInt)(e),(0,o.hexToBigInt)(t)).toCompactHex()}${0===u?"1b":"1c"}`;return"hex"===r?c:(0,i.hexToBytes)(c)};let n=r(92989),o=r(66877),i=r(14719)},90350:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.signatureToCompactSignature=function(e){let{r:t,s:r,v:i,yParity:a}=e,s=Number(a??i-27n),u=r;if(1===s){let e=(0,n.hexToBytes)(r);e[0]|=128,u=(0,o.bytesToHex)(e)}return{r:t,yParityAndS:u}};let n=r(14719),o=r(30769)},85548:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.toPrefixedMessage=function(e){let t="string"==typeof e?(0,a.stringToHex)(e):"string"==typeof e.raw?e.raw:(0,a.bytesToHex)(e.raw),r=(0,a.stringToHex)(`${n.presignMessagePrefix}${(0,i.size)(t)}`);return(0,o.concat)([r,t])};let n=r(79983),o=r(22458),i=r(92242),a=r(30769)},86605:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.verifyHash=a;let n=r(37743),o=r(70843),i=r(6271);async function a({address:e,hash:t,signature:r}){return(0,o.isAddressEqual)((0,n.getAddress)(e),await (0,i.recoverAddress)({hash:t,signature:r}))}},72697:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.verifyMessage=a;let n=r(37743),o=r(70843),i=r(78581);async function a({address:e,message:t,signature:r}){return(0,o.isAddressEqual)((0,n.getAddress)(e),await (0,i.recoverMessageAddress)({message:t,signature:r}))}},92384:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.verifyTypedData=a;let n=r(37743),o=r(70843),i=r(83160);async function a(e){let{address:t,domain:r,message:a,primaryType:s,signature:u,types:c}=e;return(0,o.isAddressEqual)((0,n.getAddress)(t),await (0,i.recoverTypedDataAddress)({domain:r,message:a,primaryType:s,signature:u,types:c}))}},83965:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.parseSiweMessage=function(e){let{scheme:t,statement:o,...i}=e.match(r)?.groups??{},{chainId:a,expirationTime:s,issuedAt:u,notBefore:c,requestId:l,...d}=e.match(n)?.groups??{},f=e.split("Resources:")[1]?.split("\n- ").slice(1);return{...i,...d,...a?{chainId:Number(a)}:{},...s?{expirationTime:new Date(s)}:{},...u?{issuedAt:new Date(u)}:{},...c?{notBefore:new Date(c)}:{},...l?{requestId:l}:{},...f?{resources:f}:{},...t?{scheme:t}:{},...o?{statement:o}:{}}};let r=/^(?:(?[a-zA-Z][a-zA-Z0-9+-.]*):\/\/)?(?[a-zA-Z0-9+-.]*(?::[0-9]{1,5})?) (?:wants you to sign in with your Ethereum account:\n)(?
0x[a-fA-F0-9]{40})\n\n(?:(?.*)\n\n)?/,n=/(?:URI: (?.+))\n(?:Version: (?.+))\n(?:Chain ID: (?\d+))\n(?:Nonce: (?[a-zA-Z0-9]+))\n(?:Issued At: (?.+))(?:\nExpiration Time: (?.+))?(?:\nNot Before: (?.+))?(?:\nRequest ID: (?.+))?/},28224:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.validateSiweMessage=function(e){let{address:t,domain:r,message:i,nonce:a,scheme:s,time:u=new Date}=e;if(r&&i.domain!==r||a&&i.nonce!==a||s&&i.scheme!==s||i.expirationTime&&u>=i.expirationTime||i.notBefore&&u{if(66!==t.length)throw new o.InvalidBytesLengthError({size:t.length,targetSize:66,type:"hex"});if(66!==r.length)throw new o.InvalidBytesLengthError({size:r.length,targetSize:66,type:"hex"});return e[t]=r,e},{})}function c(e){let{balance:t,nonce:r,state:n,stateDiff:o,code:a}=e,c={};if(void 0!==a&&(c.code=a),void 0!==t&&(c.balance=(0,s.numberToHex)(t)),void 0!==r&&(c.nonce=(0,s.numberToHex)(r)),void 0!==n&&(c.state=u(n)),void 0!==o){if(c.state)throw new i.StateAssignmentConflictError;c.stateDiff=u(o)}return c}},71156:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.stringify=void 0,t.stringify=(e,t,r)=>JSON.stringify(e,(e,r)=>{let n="bigint"==typeof r?r.toString():r;return"function"==typeof t?t(e,n):n},r)},13714:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.assertRequest=function(e){let{account:t,maxFeePerGas:r,maxPriorityFeePerGas:u,to:c}=e,l=t?(0,n.parseAccount)(t):void 0;if(l&&!(0,s.isAddress)(l.address))throw new i.InvalidAddressError({address:l.address});if(c&&!(0,s.isAddress)(c))throw new i.InvalidAddressError({address:c});if(r&&r>o.maxUint256)throw new a.FeeCapTooHighError({maxFeePerGas:r});if(u&&r&&u>r)throw new a.TipAboveFeeCapError({maxFeePerGas:r,maxPriorityFeePerGas:u})};let n=r(83153),o=r(22164),i=r(30354),a=r(21013),s=r(31342)},96466:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.assertTransactionEIP7702=function(e){let{authorizationList:t}=e;if(t)for(let e of t){let{chainId:t}=e,r=e.address;if(!(0,l.isAddress)(r))throw new i.InvalidAddressError({address:r});if(t<0)throw new u.InvalidChainIdError({chainId:t})}b(e)},t.assertTransactionEIP4844=function(e){let{blobVersionedHashes:t}=e;if(t){if(0===t.length)throw new s.EmptyBlobError;for(let e of t){let t=(0,d.size)(e),r=(0,p.hexToNumber)((0,f.slice)(e,0,1));if(32!==t)throw new s.InvalidVersionedHashSizeError({hash:e,size:t});if(r!==n.versionedHashVersionKzg)throw new s.InvalidVersionedHashVersionError({hash:e,version:r})}}b(e)},t.assertTransactionEIP1559=b,t.assertTransactionEIP2930=function(e){let{chainId:t,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:s,to:d}=e;if(t<=0)throw new u.InvalidChainIdError({chainId:t});if(d&&!(0,l.isAddress)(d))throw new i.InvalidAddressError({address:d});if(r||s)throw new a.BaseError("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(n&&n>o.maxUint256)throw new c.FeeCapTooHighError({maxFeePerGas:n})},t.assertTransactionLegacy=function(e){let{chainId:t,maxPriorityFeePerGas:r,gasPrice:n,maxFeePerGas:s,to:d}=e;if(d&&!(0,l.isAddress)(d))throw new i.InvalidAddressError({address:d});if(void 0!==t&&t<=0)throw new u.InvalidChainIdError({chainId:t});if(r||s)throw new a.BaseError("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");if(n&&n>o.maxUint256)throw new c.FeeCapTooHighError({maxFeePerGas:n})};let n=r(96611),o=r(22164),i=r(30354),a=r(3035),s=r(98417),u=r(3011),c=r(21013),l=r(31342),d=r(92242),f=r(86699),p=r(66877);function b(e){let{chainId:t,maxPriorityFeePerGas:r,maxFeePerGas:n,to:a}=e;if(t<=0)throw new u.InvalidChainIdError({chainId:t});if(a&&!(0,l.isAddress)(a))throw new i.InvalidAddressError({address:a});if(n&&n>o.maxUint256)throw new c.FeeCapTooHighError({maxFeePerGas:n});if(r&&n&&r>n)throw new c.TipAboveFeeCapError({maxFeePerGas:n,maxPriorityFeePerGas:r})}},57227:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getSerializedTransactionType=function(e){let t=(0,o.sliceHex)(e,0,1);if("0x04"===t)return"eip7702";if("0x03"===t)return"eip4844";if("0x02"===t)return"eip1559";if("0x01"===t)return"eip2930";if("0x"!==t&&(0,i.hexToNumber)(t)>=192)return"legacy";throw new n.InvalidSerializedTransactionTypeError({serializedType:t})};let n=r(29896),o=r(86699),i=r(66877)},92830:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getTransactionType=function(e){if(e.type)return e.type;if(void 0!==e.authorizationList)return"eip7702";if(void 0!==e.blobs||void 0!==e.blobVersionedHashes||void 0!==e.maxFeePerBlobGas||void 0!==e.sidecars)return"eip4844";if(void 0!==e.maxFeePerGas||void 0!==e.maxPriorityFeePerGas)return"eip1559";if(void 0!==e.gasPrice)return void 0!==e.accessList?"eip2930":"legacy";throw new n.InvalidSerializableTransactionError({transaction:e})};let n=r(29896)},98884:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.parseTransaction=function(e){let t=(0,b.getSerializedTransactionType)(e);return"eip1559"===t?function(e){let t=m(e),[r,n,i,a,u,c,d,f,b,g,v,E]=t;if(!(9===t.length||12===t.length))throw new o.InvalidSerializedTransactionError({attributes:{chainId:r,nonce:n,maxPriorityFeePerGas:i,maxFeePerGas:a,gas:u,to:c,value:d,data:f,accessList:b,...t.length>9?{v:g,r:v,s:E}:{}},serializedTransaction:e,type:"eip1559"});let x={chainId:(0,l.hexToNumber)(r),type:"eip1559"};return(0,s.isHex)(c)&&"0x"!==c&&(x.to=c),(0,s.isHex)(u)&&"0x"!==u&&(x.gas=(0,l.hexToBigInt)(u)),(0,s.isHex)(f)&&"0x"!==f&&(x.data=f),(0,s.isHex)(n)&&(x.nonce="0x"===n?0:(0,l.hexToNumber)(n)),(0,s.isHex)(d)&&"0x"!==d&&(x.value=(0,l.hexToBigInt)(d)),(0,s.isHex)(a)&&"0x"!==a&&(x.maxFeePerGas=(0,l.hexToBigInt)(a)),(0,s.isHex)(i)&&"0x"!==i&&(x.maxPriorityFeePerGas=(0,l.hexToBigInt)(i)),0!==b.length&&"0x"!==b&&(x.accessList=y(b)),(0,p.assertTransactionEIP1559)(x),{...12===t.length?h(t):void 0,...x}}(e):"eip2930"===t?function(e){let t=m(e),[r,n,i,a,u,c,d,f,b,g,v]=t;if(!(8===t.length||11===t.length))throw new o.InvalidSerializedTransactionError({attributes:{chainId:r,nonce:n,gasPrice:i,gas:a,to:u,value:c,data:d,accessList:f,...t.length>8?{v:b,r:g,s:v}:{}},serializedTransaction:e,type:"eip2930"});let E={chainId:(0,l.hexToNumber)(r),type:"eip2930"};return(0,s.isHex)(u)&&"0x"!==u&&(E.to=u),(0,s.isHex)(a)&&"0x"!==a&&(E.gas=(0,l.hexToBigInt)(a)),(0,s.isHex)(d)&&"0x"!==d&&(E.data=d),(0,s.isHex)(n)&&(E.nonce="0x"===n?0:(0,l.hexToNumber)(n)),(0,s.isHex)(c)&&"0x"!==c&&(E.value=(0,l.hexToBigInt)(c)),(0,s.isHex)(i)&&"0x"!==i&&(E.gasPrice=(0,l.hexToBigInt)(i)),0!==f.length&&"0x"!==f&&(E.accessList=y(f)),(0,p.assertTransactionEIP2930)(E),{...11===t.length?h(t):void 0,...E}}(e):"eip4844"===t?function(e){let t=m(e),r=4===t.length,n=r?t[0]:t,i=r?t.slice(1):[],[u,c,d,f,b,g,v,E,x,w,P,I,T,A]=n,[O,B,S]=i;if(!(11===n.length||14===n.length))throw new o.InvalidSerializedTransactionError({attributes:{chainId:u,nonce:c,maxPriorityFeePerGas:d,maxFeePerGas:f,gas:b,to:g,value:v,data:E,accessList:x,...n.length>9?{v:I,r:T,s:A}:{}},serializedTransaction:e,type:"eip4844"});let j={blobVersionedHashes:P,chainId:(0,l.hexToNumber)(u),to:g,type:"eip4844"};return(0,s.isHex)(b)&&"0x"!==b&&(j.gas=(0,l.hexToBigInt)(b)),(0,s.isHex)(E)&&"0x"!==E&&(j.data=E),(0,s.isHex)(c)&&(j.nonce="0x"===c?0:(0,l.hexToNumber)(c)),(0,s.isHex)(v)&&"0x"!==v&&(j.value=(0,l.hexToBigInt)(v)),(0,s.isHex)(w)&&"0x"!==w&&(j.maxFeePerBlobGas=(0,l.hexToBigInt)(w)),(0,s.isHex)(f)&&"0x"!==f&&(j.maxFeePerGas=(0,l.hexToBigInt)(f)),(0,s.isHex)(d)&&"0x"!==d&&(j.maxPriorityFeePerGas=(0,l.hexToBigInt)(d)),0!==x.length&&"0x"!==x&&(j.accessList=y(x)),O&&B&&S&&(j.sidecars=(0,a.toBlobSidecars)({blobs:O,commitments:B,proofs:S})),(0,p.assertTransactionEIP4844)(j),{...14===n.length?h(n):void 0,...j}}(e):"eip7702"===t?function(e){let t=m(e),[r,n,i,a,u,c,d,f,b,g,v,E,x]=t;if(10!==t.length&&13!==t.length)throw new o.InvalidSerializedTransactionError({attributes:{chainId:r,nonce:n,maxPriorityFeePerGas:i,maxFeePerGas:a,gas:u,to:c,value:d,data:f,accessList:b,authorizationList:g,...t.length>9?{v,r:E,s:x}:{}},serializedTransaction:e,type:"eip7702"});let w={chainId:(0,l.hexToNumber)(r),type:"eip7702"};return(0,s.isHex)(c)&&"0x"!==c&&(w.to=c),(0,s.isHex)(u)&&"0x"!==u&&(w.gas=(0,l.hexToBigInt)(u)),(0,s.isHex)(f)&&"0x"!==f&&(w.data=f),(0,s.isHex)(n)&&(w.nonce="0x"===n?0:(0,l.hexToNumber)(n)),(0,s.isHex)(d)&&"0x"!==d&&(w.value=(0,l.hexToBigInt)(d)),(0,s.isHex)(a)&&"0x"!==a&&(w.maxFeePerGas=(0,l.hexToBigInt)(a)),(0,s.isHex)(i)&&"0x"!==i&&(w.maxPriorityFeePerGas=(0,l.hexToBigInt)(i)),0!==b.length&&"0x"!==b&&(w.accessList=y(b)),0!==g.length&&"0x"!==g&&(w.authorizationList=function(e){let t=[];for(let r=0;r6?{v:f,r:b,s:m}:{}},serializedTransaction:e,type:"legacy"});let y={type:"legacy"};if((0,s.isHex)(a)&&"0x"!==a&&(y.to=a),(0,s.isHex)(i)&&"0x"!==i&&(y.gas=(0,l.hexToBigInt)(i)),(0,s.isHex)(c)&&"0x"!==c&&(y.data=c),(0,s.isHex)(r)&&(y.nonce="0x"===r?0:(0,l.hexToNumber)(r)),(0,s.isHex)(u)&&"0x"!==u&&(y.value=(0,l.hexToBigInt)(u)),(0,s.isHex)(n)&&"0x"!==n&&(y.gasPrice=(0,l.hexToBigInt)(n)),(0,p.assertTransactionLegacy)(y),6===t.length)return y;let h=(0,s.isHex)(f)&&"0x"!==f?(0,l.hexToBigInt)(f):0n;if("0x"===m&&"0x"===b)return h>0&&(y.chainId=Number(h)),y;let g=Number((h-35n)/2n);if(g>0)y.chainId=g;else if(27n!==h&&28n!==h)throw new o.InvalidLegacyVError({v:h});return y.v=h,y.s=m,y.r=b,y.yParity=h%2n===0n?1:0,y}(e)},t.toTransactionArray=m,t.parseAccessList=y;let n=r(30354),o=r(29896),i=r(31342),a=r(97),s=r(49706),u=r(61078),c=r(46041),l=r(66877),d=r(16707),f=r(29732),p=r(96466),b=r(57227);function m(e){return(0,d.fromRlp)(`0x${e.slice(4)}`,"hex")}function y(e){let t=[];for(let r=0;r(0,f.isHash)(e)?e:(0,c.trim)(e))})}return t}function h(e){let t=e.slice(-3),r="0x"===t[0]||0n===(0,l.hexToBigInt)(t[0])?27n:28n;return{r:(0,u.padHex)(t[1],{size:32}),s:(0,u.padHex)(t[2],{size:32}),v:r,yParity:27n===r?0:1}}},62235:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.serializeAccessList=function(e){if(!e||0===e.length)return[];let t=[];for(let r=0;r(0,d.bytesToHex)(e)),r=e.kzg,n=(0,i.blobsToCommitments)({blobs:t,kzg:r});if(void 0===w&&(w=(0,s.commitmentsToVersionedHashes)({commitments:n})),void 0===P){let e=(0,a.blobsToProofs)({blobs:t,commitments:n,kzg:r});P=(0,u.toBlobSidecars)({blobs:t,commitments:n,proofs:e})}}let I=(0,m.serializeAccessList)(E),T=[(0,d.numberToHex)(r),o?(0,d.numberToHex)(o):"0x",v?(0,d.numberToHex)(v):"0x",g?(0,d.numberToHex)(g):"0x",n?(0,d.numberToHex)(n):"0x",l??"0x",b?(0,d.numberToHex)(b):"0x",x??"0x",I,h?(0,d.numberToHex)(h):"0x",w??[],...y(e,t)],A=[],O=[],B=[];if(P)for(let e=0;e{if(t.v>=35n)return(t.v-35n)/2n>0?t.v:27n+(35n===t.v?0n:1n);if(r>0)return BigInt(2*r)+BigInt(35n+t.v-27n);let e=27n+(27n===t.v?0n:1n);if(t.v!==e)throw new n.InvalidLegacyVError({v:t.v});return e})(),o=(0,l.trim)(t.r),i=(0,l.trim)(t.s);b=[...b,(0,d.numberToHex)(e),"0x00"===o?"0x":o,"0x00"===i?"0x":i]}else r>0&&(b=[...b,(0,d.numberToHex)(r),"0x","0x"]);return(0,f.toRlp)(b)}(e,t)},t.toYParitySignatureArray=y;let n=r(29896),o=r(40869),i=r(40658),a=r(43880),s=r(12854),u=r(97),c=r(22458),l=r(46041),d=r(30769),f=r(63447),p=r(96466),b=r(92830),m=r(62235);function y(e,t){let r=t??e,{v:n,yParity:o}=r;if(void 0===r.r||void 0===r.s||void 0===n&&void 0===o)return[];let i=(0,l.trim)(r.r),a=(0,l.trim)(r.s);return["number"==typeof o?o?(0,d.numberToHex)(1):"0x":0n===n?"0x":1n===n?(0,d.numberToHex)(1):27n===n?"0x":(0,d.numberToHex)(1),"0x00"===i?"0x":i,"0x00"===a?"0x":a]}},56617:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.serializeTypedData=function(e){let{domain:t,message:r,primaryType:n,types:o}=e,i=(e,t)=>{let r={...t};for(let t of e){let{name:e,type:n}=t;"address"===n&&(r[e]=r[e].toLowerCase())}return r},a=o.EIP712Domain&&t?i(o.EIP712Domain,t):{},s=(()=>{if("EIP712Domain"!==n)return i(o[n],r)})();return(0,d.stringify)({domain:a,message:s,primaryType:n,types:o})},t.validateTypedData=function(e){let{domain:t,message:r,primaryType:l,types:d}=e,f=(e,t)=>{for(let r of e){let{name:e,type:l}=r,p=t[e],b=l.match(c.integerRegex);if(b&&("number"==typeof p||"bigint"==typeof p)){let[e,t,r]=b;(0,u.numberToHex)(p,{signed:"int"===t,size:Number.parseInt(r,10)/8})}if("address"===l&&"string"==typeof p&&!(0,a.isAddress)(p))throw new o.InvalidAddressError({address:p});let m=l.match(c.bytesRegex);if(m){let[e,t]=m;if(t&&(0,s.size)(p)!==Number.parseInt(t,10))throw new n.BytesSizeMismatchError({expectedSize:Number.parseInt(t,10),givenSize:(0,s.size)(p)})}let y=d[l];y&&(function(e){if("address"===e||"bool"===e||"string"===e||e.startsWith("bytes")||e.startsWith("uint")||e.startsWith("int"))throw new i.InvalidStructTypeError({type:e})}(l),f(y,p))}};if(d.EIP712Domain&&t){if("object"!=typeof t)throw new i.InvalidDomainError({domain:t});f(d.EIP712Domain,t)}if("EIP712Domain"!==l){if(d[l])f(d[l],r);else throw new i.InvalidPrimaryTypeError({primaryType:l,types:d})}},t.getTypesForEIP712Domain=f,t.domainSeparator=function({domain:e}){return(0,l.hashDomain)({domain:e,types:{EIP712Domain:f({domain:e})}})};let n=r(21837),o=r(30354),i=r(52573),a=r(31342),s=r(92242),u=r(30769),c=r(13186),l=r(38445),d=r(71156);function f({domain:e}){return["string"==typeof e?.name&&{name:"name",type:"string"},e?.version&&{name:"version",type:"string"},("number"==typeof e?.chainId||"bigint"==typeof e?.chainId)&&{name:"chainId",type:"uint256"},e?.verifyingContract&&{name:"verifyingContract",type:"address"},e?.salt&&{name:"salt",type:"bytes32"}].filter(Boolean)}},68539:function(e,t){let r;Object.defineProperty(t,"__esModule",{value:!0}),t.uid=function(e=11){if(!r||n+e>512){r="",n=0;for(let e=0;e<256;e++)r+=(256+256*Math.random()|0).toString(16).substring(1)}return r.substring(n,n+++e)};let n=256},38928:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.formatEther=function(e,t="wei"){return(0,o.formatUnits)(e,n.etherUnits[t])};let n=r(28698),o=r(65723)},18624:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.formatGwei=function(e,t="wei"){return(0,o.formatUnits)(e,n.gweiUnits[t])};let n=r(28698),o=r(65723)},65723:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.formatUnits=function(e,t){let r=e.toString(),n=r.startsWith("-");n&&(r=r.slice(1));let[o,i]=[(r=r.padStart(t,"0")).slice(0,r.length-t),r.slice(r.length-t)];return i=i.replace(/(0+)$/,""),`${n?"-":""}${o||"0"}${i?`.${i}`:""}`}},39342:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.parseEther=function(e,t="wei"){return(0,o.parseUnits)(e,n.etherUnits[t])};let n=r(28698),o=r(79721)},26248:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.parseGwei=function(e,t="wei"){return(0,o.parseUnits)(e,n.gweiUnits[t])};let n=r(28698),o=r(79721)},79721:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.parseUnits=function(e,t){if(!/^(-?)([0-9]*)\.?([0-9]*)$/.test(e))throw new n.InvalidDecimalNumberError({value:e});let[r,o="0"]=e.split("."),i=r.startsWith("-");if(i&&(r=r.slice(1)),o=o.replace(/(0+)$/,""),0===t)1===Math.round(Number(`.${o}`))&&(r=`${BigInt(r)+1n}`),o="";else if(o.length>t){let[e,n,i]=[o.slice(0,t-1),o.slice(t-1,t),o.slice(t)],a=Math.round(Number(`${n}.${i}`));(o=a>9?`${BigInt(e)+BigInt(1)}0`.padStart(e.length+1,"0"):`${e}${a}`).length>t&&(o=o.slice(1),r=`${BigInt(r)+1n}`),o=o.slice(0,t)}else o=o.padEnd(t,"0");return BigInt(`${i?"-":""}${r}${o}`)};let n=r(3013)},82958:function(e,t){async function r(e){return new Promise(t=>setTimeout(t,e))}Object.defineProperty(t,"__esModule",{value:!0}),t.wait=r},69468:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.BaseError=void 0;let n=r(37828);class o extends Error{constructor(e,t={}){let r=t.cause instanceof o?t.cause.details:t.cause?.message?t.cause.message:t.details,i=t.cause instanceof o&&t.cause.docsPath||t.docsPath;super([e||"An error occurred.","",...t.metaMessages?[...t.metaMessages,""]:[],...i?[`Docs: https://abitype.dev${i}`]:[],...r?[`Details: ${r}`]:[],`Version: abitype@${n.version}`].join("\n")),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiTypeError"}),t.cause&&(this.cause=t.cause),this.details=r,this.docsPath=i,this.metaMessages=t.metaMessages,this.shortMessage=e}}t.BaseError=o},65991:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.CircularReferenceError=t.InvalidParenthesisError=t.UnknownSignatureError=t.InvalidSignatureError=t.InvalidStructSignatureError=t.InvalidAbiParameterError=t.InvalidAbiParametersError=t.InvalidParameterError=t.SolidityProtectedKeywordError=t.InvalidModifierError=t.InvalidFunctionModifierError=t.InvalidAbiTypeParameterError=t.UnknownSolidityTypeError=t.InvalidAbiItemError=t.UnknownTypeError=t.parseAbiParameters=t.parseAbiParameter=t.parseAbiItem=t.parseAbi=t.formatAbiParameters=t.formatAbiParameter=t.formatAbiItem=t.formatAbi=t.narrow=t.BaseError=void 0;var n=r(69468);Object.defineProperty(t,"BaseError",{enumerable:!0,get:function(){return n.BaseError}});var o=r(26171);Object.defineProperty(t,"narrow",{enumerable:!0,get:function(){return o.narrow}});var i=r(31062);Object.defineProperty(t,"formatAbi",{enumerable:!0,get:function(){return i.formatAbi}});var a=r(77344);Object.defineProperty(t,"formatAbiItem",{enumerable:!0,get:function(){return a.formatAbiItem}});var s=r(67731);Object.defineProperty(t,"formatAbiParameter",{enumerable:!0,get:function(){return s.formatAbiParameter}});var u=r(42399);Object.defineProperty(t,"formatAbiParameters",{enumerable:!0,get:function(){return u.formatAbiParameters}});var c=r(43635);Object.defineProperty(t,"parseAbi",{enumerable:!0,get:function(){return c.parseAbi}});var l=r(68284);Object.defineProperty(t,"parseAbiItem",{enumerable:!0,get:function(){return l.parseAbiItem}});var d=r(14980);Object.defineProperty(t,"parseAbiParameter",{enumerable:!0,get:function(){return d.parseAbiParameter}});var f=r(65220);Object.defineProperty(t,"parseAbiParameters",{enumerable:!0,get:function(){return f.parseAbiParameters}});var p=r(79404);Object.defineProperty(t,"UnknownTypeError",{enumerable:!0,get:function(){return p.UnknownTypeError}}),Object.defineProperty(t,"InvalidAbiItemError",{enumerable:!0,get:function(){return p.InvalidAbiItemError}}),Object.defineProperty(t,"UnknownSolidityTypeError",{enumerable:!0,get:function(){return p.UnknownSolidityTypeError}});var b=r(40652);Object.defineProperty(t,"InvalidAbiTypeParameterError",{enumerable:!0,get:function(){return b.InvalidAbiTypeParameterError}}),Object.defineProperty(t,"InvalidFunctionModifierError",{enumerable:!0,get:function(){return b.InvalidFunctionModifierError}}),Object.defineProperty(t,"InvalidModifierError",{enumerable:!0,get:function(){return b.InvalidModifierError}}),Object.defineProperty(t,"SolidityProtectedKeywordError",{enumerable:!0,get:function(){return b.SolidityProtectedKeywordError}}),Object.defineProperty(t,"InvalidParameterError",{enumerable:!0,get:function(){return b.InvalidParameterError}}),Object.defineProperty(t,"InvalidAbiParametersError",{enumerable:!0,get:function(){return b.InvalidAbiParametersError}}),Object.defineProperty(t,"InvalidAbiParameterError",{enumerable:!0,get:function(){return b.InvalidAbiParameterError}});var m=r(3586);Object.defineProperty(t,"InvalidStructSignatureError",{enumerable:!0,get:function(){return m.InvalidStructSignatureError}}),Object.defineProperty(t,"InvalidSignatureError",{enumerable:!0,get:function(){return m.InvalidSignatureError}}),Object.defineProperty(t,"UnknownSignatureError",{enumerable:!0,get:function(){return m.UnknownSignatureError}});var y=r(39226);Object.defineProperty(t,"InvalidParenthesisError",{enumerable:!0,get:function(){return y.InvalidParenthesisError}});var h=r(9867);Object.defineProperty(t,"CircularReferenceError",{enumerable:!0,get:function(){return h.CircularReferenceError}})},79404:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.UnknownSolidityTypeError=t.UnknownTypeError=t.InvalidAbiItemError=void 0;let n=r(69468);class o extends n.BaseError{constructor({signature:e}){super("Failed to parse ABI item.",{details:`parseAbiItem(${JSON.stringify(e,null,2)})`,docsPath:"/api/human#parseabiitem-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiItemError"})}}t.InvalidAbiItemError=o;class i extends n.BaseError{constructor({type:e}){super("Unknown type.",{metaMessages:[`Type "${e}" is not a valid ABI type. Perhaps you forgot to include a struct signature?`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownTypeError"})}}t.UnknownTypeError=i;class a extends n.BaseError{constructor({type:e}){super("Unknown type.",{metaMessages:[`Type "${e}" is not a valid ABI type.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSolidityTypeError"})}}t.UnknownSolidityTypeError=a},40652:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidAbiTypeParameterError=t.InvalidFunctionModifierError=t.InvalidModifierError=t.SolidityProtectedKeywordError=t.InvalidParameterError=t.InvalidAbiParametersError=t.InvalidAbiParameterError=void 0;let n=r(69468);class o extends n.BaseError{constructor({param:e}){super("Failed to parse ABI parameter.",{details:`parseAbiParameter(${JSON.stringify(e,null,2)})`,docsPath:"/api/human#parseabiparameter-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiParameterError"})}}t.InvalidAbiParameterError=o;class i extends n.BaseError{constructor({params:e}){super("Failed to parse ABI parameters.",{details:`parseAbiParameters(${JSON.stringify(e,null,2)})`,docsPath:"/api/human#parseabiparameters-1"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiParametersError"})}}t.InvalidAbiParametersError=i;class a extends n.BaseError{constructor({param:e}){super("Invalid ABI parameter.",{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParameterError"})}}t.InvalidParameterError=a;class s extends n.BaseError{constructor({param:e,name:t}){super("Invalid ABI parameter.",{details:e,metaMessages:[`"${t}" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SolidityProtectedKeywordError"})}}t.SolidityProtectedKeywordError=s;class u extends n.BaseError{constructor({param:e,type:t,modifier:r}){super("Invalid ABI parameter.",{details:e,metaMessages:[`Modifier "${r}" not allowed${t?` in "${t}" type`:""}.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidModifierError"})}}t.InvalidModifierError=u;class c extends n.BaseError{constructor({param:e,type:t,modifier:r}){super("Invalid ABI parameter.",{details:e,metaMessages:[`Modifier "${r}" not allowed${t?` in "${t}" type`:""}.`,`Data location can only be specified for array, struct, or mapping types, but "${r}" was given.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidFunctionModifierError"})}}t.InvalidFunctionModifierError=c;class l extends n.BaseError{constructor({abiParameter:e}){super("Invalid ABI parameter.",{details:JSON.stringify(e,null,2),metaMessages:["ABI parameter type is invalid."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidAbiTypeParameterError"})}}t.InvalidAbiTypeParameterError=l},3586:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidStructSignatureError=t.UnknownSignatureError=t.InvalidSignatureError=void 0;let n=r(69468);class o extends n.BaseError{constructor({signature:e,type:t}){super(`Invalid ${t} signature.`,{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidSignatureError"})}}t.InvalidSignatureError=o;class i extends n.BaseError{constructor({signature:e}){super("Unknown signature.",{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"UnknownSignatureError"})}}t.UnknownSignatureError=i;class a extends n.BaseError{constructor({signature:e}){super("Invalid struct signature.",{details:e,metaMessages:["No properties exist."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidStructSignatureError"})}}t.InvalidStructSignatureError=a},39226:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidParenthesisError=void 0;let n=r(69468);class o extends n.BaseError{constructor({current:e,depth:t}){super("Unbalanced parentheses.",{metaMessages:[`"${e.trim()}" has too many ${t>0?"opening":"closing"} parentheses.`],details:`Depth "${t}"`}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"InvalidParenthesisError"})}}t.InvalidParenthesisError=o},9867:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.CircularReferenceError=void 0;let n=r(69468);class o extends n.BaseError{constructor({type:e}){super("Circular reference detected.",{metaMessages:[`Struct "${e}" is a circular reference.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"CircularReferenceError"})}}t.CircularReferenceError=o},31062:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.formatAbi=function(e){let t=[],r=e.length;for(let o=0;o(\[(\d*)\])*)$/},42399:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.formatAbiParameters=function(e){let t="",r=e.length;for(let o=0;o[a-zA-Z$_][a-zA-Z0-9$_]*)\((?.*?)\)$/,i=/^event (?[a-zA-Z$_][a-zA-Z0-9$_]*)\((?.*?)\)$/,a=/^function (?[a-zA-Z$_][a-zA-Z0-9$_]*)\((?.*?)\)(?: (?external|public{1}))?(?: (?pure|view|nonpayable|payable{1}))?(?: returns\s?\((?.*?)\))?$/,s=/^struct (?[a-zA-Z$_][a-zA-Z0-9$_]*) \{(?.*?)\}$/,u=/^constructor\((?.*?)\)(?:\s(?payable{1}))?$/,c=/^fallback\(\) external(?:\s(?payable{1}))?$/,l=/^receive\(\) external payable$/;t.modifiers=new Set(["memory","indexed","storage","calldata"]),t.eventModifiers=new Set(["indexed"]),t.functionModifiers=new Set(["calldata","memory","storage"])},36995:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.parseStructs=function(e){let t={},r=e.length;for(let n=0;n[a-zA-Z$_][a-zA-Z0-9$_]*)(?(?:\[\d*?\])+?)?$/},12566:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.parseSignature=function(e,t={}){if((0,c.isFunctionSignature)(e))return l(e,t);if((0,c.isEventSignature)(e))return d(e,t);if((0,c.isErrorSignature)(e))return f(e,t);if((0,c.isConstructorSignature)(e))return p(e,t);if((0,c.isFallbackSignature)(e))return b(e);if((0,c.isReceiveSignature)(e))return{type:"receive",stateMutability:"payable"};throw new a.UnknownSignatureError({signature:e})},t.parseFunctionSignature=l,t.parseEventSignature=d,t.parseErrorSignature=f,t.parseConstructorSignature=p,t.parseFallbackSignature=b,t.parseAbiParameter=g,t.splitParameters=v,t.isSolidityType=E,t.isSolidityKeyword=w,t.isValidDataLocation=P;let n=r(49185),o=r(79404),i=r(40652),a=r(3586),s=r(39226),u=r(72668),c=r(62781);function l(e,t={}){let r=(0,c.execFunctionSignature)(e);if(!r)throw new a.InvalidSignatureError({signature:e,type:"function"});let n=v(r.parameters),o=[],i=n.length;for(let e=0;e[a-zA-Z$_][a-zA-Z0-9$_]*(?:\spayable)?)(?(?:\[\d*?\])+?)?(?:\s(?calldata|indexed|memory|storage{1}))?(?:\s(?[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,y=/^\((?.+?)\)(?(?:\[\d*?\])+?)?(?:\s(?calldata|indexed|memory|storage{1}))?(?:\s(?[a-zA-Z$_][a-zA-Z0-9$_]*))?$/,h=/^u?int$/;function g(e,t){let r;let a=(0,u.getParameterCacheKey)(e,t?.type,t?.structs);if(u.parameterCache.has(a))return u.parameterCache.get(a);let s=n.isTupleRegex.test(e),l=(0,n.execTyped)(s?y:m,e);if(!l)throw new i.InvalidParameterError({param:e});if(l.name&&w(l.name))throw new i.SolidityProtectedKeywordError({param:e,name:l.name});let d=l.name?{name:l.name}:{},f="indexed"===l.modifier?{indexed:!0}:{},p=t?.structs??{},b={};if(s){r="tuple";let e=v(l.type),t=[],n=e.length;for(let r=0;r{if(Array.isArray(e[0])){let[t,r]=e;return[s(t),r]}return e})(),{bytecode:n}=r;if(0===t.inputs.length)return;let o=r.data.replace(n,"0x");return i.decode(t.inputs,o)},t.encode=function(...e){let[t,r]=(()=>{if(Array.isArray(e[0])){let[t,r]=e;return[s(t),r]}return e})(),{bytecode:n,args:o}=r;return a.concat(n,t.inputs?.length&&o?.length?i.encode(t.inputs,o):"0x")},t.format=function(e){return n.formatAbiItem(e)},t.from=function(e){return o.from(e)},t.fromAbi=s;let n=r(65991),o=r(97678),i=r(66218),a=r(5866);function s(e){let t=e.find(e=>"constructor"===e.type);if(!t)throw new o.NotFoundError({name:"constructor"});return t}},10717:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.decodeData=function(...e){let[t,r]=(()=>{if(Array.isArray(e[0])){let[t,r,n]=e;return[s(t,r),n]}return e})(),{overloads:n}=t;if(4>a.size(r))throw new o.InvalidSelectorSizeError({data:r});if(0===t.inputs.length)return;let u=n?s([t,...n],r):t;if(!(4>=a.size(r)))return i.decode(u.inputs,a.slice(r,4))},t.decodeResult=function(...e){let[t,r,n={}]=(()=>{if(Array.isArray(e[0])){let[t,r,n,o]=e;return[s(t,r),n,o]}return e})(),o=i.decode(t.outputs,r,n);if(!o||0!==Object.keys(o).length)return o&&1===Object.keys(o).length?Array.isArray(o)?o[0]:Object.values(o)[0]:o},t.encodeData=function(...e){let[t,r=[]]=(()=>{if(Array.isArray(e[0])){let[t,r,n]=e;return[s(t,r,{args:n}),n]}let[t,r]=e;return[t,r]})(),{overloads:n}=t,o=n?s([t,...n],t.name,{args:r}):t,c=u(o),l=r.length>0?i.encode(o.inputs,r):void 0;return l?a.concat(c,l):c},t.encodeResult=function(...e){let[t,r,n={}]=(()=>{if(Array.isArray(e[0])){let[t,r,n,o]=e;return[s(t,r),n,o]}return e})(),{as:o="Array"}=n,a=1===t.outputs.length?[r]:Array.isArray(r)?r:"Object"===o?Object.values(r):[r];return i.encode(t.outputs,a)},t.format=function(e){return n.formatAbiItem(e)},t.from=function(e,t={}){return o.from(e,t)},t.fromAbi=s,t.getSelector=u;let n=r(65991),o=r(97678),i=r(66218),a=r(5866);function s(e,t,r){let n=o.fromAbi(e,t,r);if("function"!==n.type)throw new o.NotFoundError({name:t,type:"function"});return n}function u(e){return o.getSelector(e)}},97678:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidSelectorSizeError=t.NotFoundError=t.AmbiguityError=void 0,t.format=function(e){return n.formatAbiItem(e)},t.from=function(e,t={}){let{prepare:r=!0}=t,o=Array.isArray(e)||"string"==typeof e?n.parseAbiItem(e):e;return{...o,...r?{hash:d(o)}:{}}},t.fromAbi=u,t.getSelector=c,t.getSignature=l,t.getSignatureHash=d;let n=r(65991),o=r(80643),i=r(49854),a=r(5866),s=r(80601);function u(e,t,r){let n;let{args:o=[],prepare:i=!0}=r??{},u=a.validate(t,{strict:!1}),l=e.filter(e=>u?"function"===e.type||"error"===e.type?c(e)===a.slice(t,0,4):"event"===e.type&&d(e)===t:"name"in e&&e.name===t);if(0===l.length)throw new p({name:t});if(1===l.length)return{...l[0],...i?{hash:d(l[0])}:{}};for(let e of l)if("inputs"in e){if(!o||0===o.length){if(!e.inputs||0===e.inputs.length)return{...e,...i?{hash:d(e)}:{}};continue}if(e.inputs&&0!==e.inputs.length&&e.inputs.length===o.length&&o.every((t,r)=>{let n="inputs"in e&&e.inputs[r];return!!n&&s.isArgOfType(t,n)})){if(n&&"inputs"in n&&n.inputs){let t=s.getAmbiguousTypes(e.inputs,n.inputs,o);if(t)throw new f({abiItem:e,type:t[0]},{abiItem:n,type:t[1]})}n=e}}let b=(()=>{if(n)return n;let[e,...t]=l;return{...e,overloads:t}})();if(!b)throw new p({name:t});return{...b,...i?{hash:d(b)}:{}}}function c(...e){let t=(()=>{if(Array.isArray(e[0])){let[t,r]=e;return u(t,r)}return e[0]})();return a.slice(d(t),0,4)}function l(...e){let t=(()=>{if(Array.isArray(e[0])){let[t,r]=e;return u(t,r)}return e[0]})(),r="string"==typeof t?t:n.formatAbiItem(t);return s.normalizeSignature(r)}function d(...e){let t=(()=>{if(Array.isArray(e[0])){let[t,r]=e;return u(t,r)}return e[0]})();return"string"!=typeof t&&"hash"in t&&t.hash?t.hash:i.keccak256(a.fromString(l(t)))}class f extends o.BaseError{constructor(e,t){super("Found ambiguous types in overloaded ABI Items.",{metaMessages:[`\`${e.type}\` in \`${s.normalizeSignature(n.formatAbiItem(e.abiItem))}\`, and`,`\`${t.type}\` in \`${s.normalizeSignature(n.formatAbiItem(t.abiItem))}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.AmbiguityError"})}}t.AmbiguityError=f;class p extends o.BaseError{constructor({name:e,data:t,type:r="item"}){super(`ABI ${r}${e?` with name "${e}"`:t?` with data "${t}"`:""} not found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.NotFoundError"})}}t.NotFoundError=p;class b extends o.BaseError{constructor({data:e}){super(`Selector size is invalid. Expected 4 bytes. Received ${a.size(e)} bytes ("${e}").`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.InvalidSelectorSizeError"})}}t.InvalidSelectorSizeError=b},66218:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidTypeError=t.InvalidArrayError=t.LengthMismatchError=t.BytesSizeMismatchError=t.ArrayLengthMismatchError=t.ZeroDataError=t.DataSizeTooSmallError=void 0,t.decode=function(e,t,r={}){let{as:n="Array",checksumAddress:o=!1}=r,a="string"==typeof t?i.fromHex(t):t,l=c.create(a);if(0===i.size(a)&&e.length>0)throw new p;if(i.size(a)&&32>i.size(a))throw new f({data:"string"==typeof t?t:s.fromBytes(t),parameters:e,size:i.size(a)});let d=0,b="Array"===n?[]:{};for(let t=0;t>1]>>4>=8&&i[e]&&(i[e]=i[e].toUpperCase()),(15&r[e>>1])>=8&&i[e+1]&&(i[e+1]=i[e+1].toUpperCase());let s=`0x${i.join("")}`;return o.checksum.set(e,s),s}function d(e,t={}){let{checksum:r=!1}=t;return(c(e),r)?l(e):e}class f extends i.BaseError{constructor({address:e,cause:t}){super(`Address "${e}" is invalid.`,{cause:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidAddressError"})}}t.InvalidAddressError=f;class p extends i.BaseError{constructor(){super("Address is not a 20 byte (40 hexadecimal character) value."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidInputError"})}}t.InvalidInputError=p;class b extends i.BaseError{constructor(){super("Address does not match its checksum counterpart."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidChecksumError"})}}t.InvalidChecksumError=b},39013:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.from=s,t.fromRpc=u,t.fromRpcList=function(e){return e.map(u)},t.fromTuple=c,t.fromTupleList=function(e){let t=[];for(let r of e)t.push(c(r));return t},t.getSignPayload=function(e){return l(e,{presign:!0})},t.hash=l,t.toRpc=d,t.toRpcList=function(e){return e.map(d)},t.toTuple=f,t.toTupleList=function(e){if(!e||0===e.length)return[];let t=[];for(let r of e)t.push(f(r));return t};let n=r(49854),o=r(5866),i=r(4288),a=r(25874);function s(e,t={}){return"string"==typeof e.chainId?u(e):{...e,...t.signature}}function u(e){let{address:t,chainId:r,nonce:n}=e,o=a.extract(e);return{address:t,chainId:Number(r),nonce:BigInt(n),...o}}function c(e){let[t,r,n,o,i,u]=e,c={address:r,chainId:"0x"===t?0:Number(t),nonce:"0x"===n?0n:BigInt(n)};return o&&i&&u&&(c={...c,...a.fromTuple([o,i,u])}),s(c)}function l(e,t={}){let{presign:r}=t;return n.keccak256(o.concat("0x05",i.fromHex(f(r?{address:e.address,chainId:e.chainId,nonce:e.nonce}:e))))}function d(e){let{address:t,chainId:r,nonce:n,...i}=e;return{address:t,chainId:o.fromNumber(r),nonce:o.fromNumber(n),...a.toRpc(i)}}function f(e){let{address:t,chainId:r,nonce:n}=e,i=a.extract(e);return[r?o.fromNumber(r):"0x",t,n?o.fromNumber(n):"0x",...i?a.toTuple(i):[]]}},51239:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.fromRpc=function(e){return{...e.baseFeePerGas&&{baseFeePerGas:BigInt(e.baseFeePerGas)},...e.blobBaseFee&&{blobBaseFee:BigInt(e.blobBaseFee)},...e.feeRecipient&&{feeRecipient:e.feeRecipient},...e.gasLimit&&{gasLimit:BigInt(e.gasLimit)},...e.number&&{number:BigInt(e.number)},...e.prevRandao&&{prevRandao:BigInt(e.prevRandao)},...e.time&&{time:BigInt(e.time)},...e.withdrawals&&{withdrawals:e.withdrawals.map(o.fromRpc)}}},t.toRpc=function(e){return{..."bigint"==typeof e.baseFeePerGas&&{baseFeePerGas:n.fromNumber(e.baseFeePerGas)},..."bigint"==typeof e.blobBaseFee&&{blobBaseFee:n.fromNumber(e.blobBaseFee)},..."string"==typeof e.feeRecipient&&{feeRecipient:e.feeRecipient},..."bigint"==typeof e.gasLimit&&{gasLimit:n.fromNumber(e.gasLimit)},..."bigint"==typeof e.number&&{number:n.fromNumber(e.number)},..."bigint"==typeof e.prevRandao&&{prevRandao:n.fromNumber(e.prevRandao)},..."bigint"==typeof e.time&&{time:n.fromNumber(e.time)},...e.withdrawals&&{withdrawals:e.withdrawals.map(o.toRpc)}}};let n=r(5866),o=r(33084)},30136:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.SizeExceedsPaddingSizeError=t.SliceOffsetOutOfBoundsError=t.SizeOverflowError=t.InvalidBytesTypeError=t.InvalidBytesBooleanError=void 0,t.assert=d,t.concat=function(...e){let t=0;for(let r of e)t+=r.length;let r=new Uint8Array(t);for(let t=0,n=0;t1||n[0]>1)throw new g(n);return!!n[0]},t.toHex=function(e,t={}){return i.fromBytes(e,t)},t.toNumber=function(e,t={}){let{size:r}=t;void 0!==r&&a.assertSize(e,r);let n=i.fromBytes(e,t);return i.toNumber(n,t)},t.toString=function(e,t={}){let{size:r}=t,n=e;return void 0!==r&&(a.assertSize(n,r),n=h(n)),c.decode(n)},t.trimLeft=y,t.trimRight=h,t.validate=function(e){try{return d(e),!0}catch{return!1}};let n=r(21626),o=r(80643),i=r(5866),a=r(7323),s=r(65450),u=r(26763),c=new TextDecoder,l=new TextEncoder;function d(e){if(!(e instanceof Uint8Array)&&(!e||"object"!=typeof e||!("BYTES_PER_ELEMENT"in e)||1!==e.BYTES_PER_ELEMENT||"Uint8Array"!==e.constructor.name))throw new v(e)}function f(e){return e instanceof Uint8Array?e:new Uint8Array(e)}function p(e,t={}){let{size:r}=t,n=e;r&&(s.assertSize(e,r),n=i.padRight(e,r));let u=n.slice(2);u.length%2&&(u=`0${u}`);let c=u.length/2,l=new Uint8Array(c);for(let e=0,t=0;e{if(t.cause instanceof o){if(t.cause.details)return t.cause.details;if(t.cause.shortMessage)return t.cause.shortMessage}return t.cause&&"details"in t.cause&&"string"==typeof t.cause.details?t.cause.details:t.cause?.message?t.cause.message:t.details})(),i=t.cause instanceof o&&t.cause.docsPath||t.docsPath,a=`https://oxlib.sh${i??""}`;super([e||"An error occurred.",...t.metaMessages?["",...t.metaMessages]:[],...r||i?["",r?`Details: ${r}`:void 0,i?`See: ${a}`:void 0]:[]].filter(e=>"string"==typeof e).join("\n"),t.cause?{cause:t.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:`ox@${(0,n.getVersion)()}`}),this.cause=t.cause,this.details=r,this.docs=a,this.docsPath=i,this.shortMessage=e}walk(e){return function e(t,r){return r?.(t)?t:t&&"object"==typeof t&&"cause"in t&&t.cause?e(t.cause,r):r?null:t}(this,e)}}t.BaseError=o},49854:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.keccak256=function(e,t={}){let{as:r="string"==typeof e?"Hex":"Bytes"}=t,n=(0,o.keccak_256)(a.from(e));return"Bytes"===r?n:s.fromBytes(n)},t.ripemd160=function(e,t={}){let{as:r="string"==typeof e?"Hex":"Bytes"}=t,o=(0,n.ripemd160)(a.from(e));return"Bytes"===r?o:s.fromBytes(o)},t.sha256=function(e,t={}){let{as:r="string"==typeof e?"Hex":"Bytes"}=t,n=(0,i.sha256)(a.from(e));return"Bytes"===r?n:s.fromBytes(n)},t.validate=function(e){return s.validate(e)&&32===s.size(e)};let n=r(52618),o=r(27705),i=r(48850),a=r(30136),s=r(5866)},5866:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.SizeExceedsPaddingSizeError=t.SliceOffsetOutOfBoundsError=t.SizeOverflowError=t.InvalidLengthError=t.InvalidHexValueError=t.InvalidHexTypeError=t.InvalidHexBooleanError=t.IntegerOutOfRangeError=void 0,t.assert=d,t.concat=function(...e){return`0x${e.reduce((e,t)=>e+t.replace("0x",""),"")}`},t.from=function(e){return e instanceof Uint8Array?f(e):Array.isArray(e)?f(new Uint8Array(e)):e},t.fromBoolean=function(e,t={}){let r=`0x${Number(e)}`;return"number"==typeof t.size?(s.assertSize(r,t.size),p(r,t.size)):r},t.fromBytes=f,t.fromNumber=function(e,t={}){let r;let{signed:n,size:o}=t,i=BigInt(e);o?r=n?(1n<<8n*BigInt(o)-1n)-1n:2n**(8n*BigInt(o))-1n:"number"==typeof e&&(r=BigInt(Number.MAX_SAFE_INTEGER));let a="bigint"==typeof r&&n?-r-1n:0;if(r&&i>r||it.toString(16).padStart(2,"0"));function d(e,t={}){let{strict:r=!1}=t;if(!e||"string"!=typeof e)throw new v(e);if(r&&!/^0x[0-9a-fA-F]*$/.test(e)||!e.startsWith("0x"))throw new E(e)}function f(e,t={}){let r="";for(let t=0;t>1n?n:n-o-1n}class h extends i.BaseError{constructor({max:e,min:t,signed:r,size:n,value:o}){super(`Number \`${o}\` is not in safe${n?` ${8*n}-bit`:""}${r?" signed":" unsigned"} integer range ${e?`(\`${t}\` to \`${e}\`)`:`(above \`${t}\`)`}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.IntegerOutOfRangeError"})}}t.IntegerOutOfRangeError=h;class g extends i.BaseError{constructor(e){super(`Hex value \`"${e}"\` is not a valid boolean.`,{metaMessages:['The hex value must be `"0x0"` (false) or `"0x1"` (true).']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexBooleanError"})}}t.InvalidHexBooleanError=g;class v extends i.BaseError{constructor(e){super(`Value \`${"object"==typeof e?u.stringify(e):e}\` of type \`${typeof e}\` is an invalid hex type.`,{metaMessages:['Hex types must be represented as `"0x${string}"`.']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexTypeError"})}}t.InvalidHexTypeError=v;class E extends i.BaseError{constructor(e){super(`Value \`${e}\` is an invalid hex value.`,{metaMessages:['Hex values must start with `"0x"` and contain only hexadecimal characters (0-9, a-f, A-F).']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexValueError"})}}t.InvalidHexValueError=E;class x extends i.BaseError{constructor(e){super(`Hex value \`"${e}"\` is an odd length (${e.length-2} nibbles).`,{metaMessages:["It must be an even length."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidLengthError"})}}t.InvalidLengthError=x;class w extends i.BaseError{constructor({givenSize:e,maxSize:t}){super(`Size cannot exceed \`${t}\` bytes. Given size: \`${e}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeOverflowError"})}}t.SizeOverflowError=w;class P extends i.BaseError{constructor({offset:e,position:t,size:r}){super(`Slice ${"start"===t?"starting":"ending"} at offset \`${e}\` is out-of-bounds (size: \`${r}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SliceOffsetOutOfBoundsError"})}}t.SliceOffsetOutOfBoundsError=P;class I extends i.BaseError{constructor({size:e,targetSize:t,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (\`${e}\`) exceeds padding size (\`${t}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeExceedsPaddingSizeError"})}}t.SizeExceedsPaddingSizeError=I},26763:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.parse=function(e,t){return JSON.parse(e,(e,n)=>"string"==typeof n&&n.endsWith(r)?BigInt(n.slice(0,-r.length)):"function"==typeof t?t(e,n):n)},t.stringify=function(e,t,n){return JSON.stringify(e,(e,n)=>"function"==typeof t?t(e,n):"bigint"==typeof n?n.toString()+r:n,n)};let r="#__bigint"},71045:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidSerializedSizeError=t.InvalidUncompressedPrefixError=t.InvalidCompressedPrefixError=t.InvalidPrefixError=t.InvalidError=void 0,t.assert=s,t.compress=function(e){let{x:t,y:r}=e;return{prefix:r%2n===0n?2:3,x:t}},t.from=function(e){let t=(()=>{if(i.validate(e))return c(e);if(n.validate(e))return u(e);let{prefix:t,x:r,y:o}=e;return"bigint"==typeof r&&"bigint"==typeof o?{prefix:t??4,x:r,y:o}:{prefix:t,x:r}})();return s(t),t},t.fromBytes=u,t.fromHex=c,t.toBytes=function(e,t={}){return n.fromHex(l(e,t))},t.toHex=l,t.validate=function(e,t={}){try{return s(e,t),!0}catch(e){return!1}};let n=r(30136),o=r(80643),i=r(5866),a=r(26763);function s(e,t={}){let{compressed:r}=t,{prefix:n,x:o,y:i}=e;if(!1===r||"bigint"==typeof o&&"bigint"==typeof i){if(4!==n)throw new f({prefix:n,cause:new b});return}if(!0===r||"bigint"==typeof o&&void 0===i){if(3!==n&&2!==n)throw new f({prefix:n,cause:new p});return}throw new d({publicKey:e})}function u(e){return c(i.fromBytes(e))}function c(e){if(132!==e.length&&130!==e.length&&68!==e.length)throw new m({publicKey:e});return 130===e.length?{prefix:4,x:BigInt(i.slice(e,0,32)),y:BigInt(i.slice(e,32,64))}:132===e.length?{prefix:Number(i.slice(e,0,1)),x:BigInt(i.slice(e,1,33)),y:BigInt(i.slice(e,33,65))}:{prefix:Number(i.slice(e,0,1)),x:BigInt(i.slice(e,1,33))}}function l(e,t={}){s(e);let{prefix:r,x:n,y:o}=e,{includePrefix:a=!0}=t;return i.concat(a?i.fromNumber(r,{size:1}):"0x",i.fromNumber(n,{size:32}),"bigint"==typeof o?i.fromNumber(o,{size:32}):"0x")}class d extends o.BaseError{constructor({publicKey:e}){super(`Value \`${a.stringify(e)}\` is not a valid public key.`,{metaMessages:["Public key must contain:","- an `x` and `prefix` value (compressed)","- an `x`, `y`, and `prefix` value (uncompressed)"]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidError"})}}t.InvalidError=d;class f extends o.BaseError{constructor({prefix:e,cause:t}){super(`Prefix "${e}" is invalid.`,{cause:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidPrefixError"})}}t.InvalidPrefixError=f;class p extends o.BaseError{constructor(){super("Prefix must be 2 or 3 for compressed public keys."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidCompressedPrefixError"})}}t.InvalidCompressedPrefixError=p;class b extends o.BaseError{constructor(){super("Prefix must be 4 for uncompressed public keys."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidUncompressedPrefixError"})}}t.InvalidUncompressedPrefixError=b;class m extends o.BaseError{constructor({publicKey:e}){super(`Value \`${e}\` is an invalid public key size.`,{metaMessages:["Expected: 33 bytes (compressed + prefix), 64 bytes (uncompressed) or 65 bytes (uncompressed + prefix).",`Received ${i.size(i.from(e))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidSerializedSizeError"})}}t.InvalidSerializedSizeError=m},4288:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.toBytes=function(e){return s(e,"Bytes")},t.toHex=function(e){return s(e,"Hex")},t.to=s,t.decodeRlpCursor=u,t.readLength=c,t.readList=l,t.from=d,t.fromBytes=function(e,t={}){let{as:r="Bytes"}=t;return d(e,{as:r})},t.fromHex=function(e,t={}){let{as:r="Hex"}=t;return d(e,{as:r})};let n=r(30136),o=r(80643),i=r(5866),a=r(71203);function s(e,t){let r=t??("string"==typeof e?"Hex":"Bytes"),o=(()=>{if("string"==typeof e){if(e.length>3&&e.length%2!=0)throw new i.InvalidLengthError(e);return n.fromHex(e)}return e})();return u(a.create(o,{recursiveReadLimit:Number.POSITIVE_INFINITY}),r)}function u(e,t="Hex"){if(0===e.bytes.length)return"Hex"===t?i.fromBytes(e.bytes):e.bytes;let r=e.readByte();if(r<128&&e.decrementPosition(1),r<192){let n=c(e,r,128),o=e.readBytes(n);return"Hex"===t?i.fromBytes(o):o}let n=c(e,r,192);return l(e,n,t)}function c(e,t,r){if(128===r&&t<128)return 1;if(t<=r+55)return t-r;if(t===r+55+1)return e.readUint8();if(t===r+55+2)return e.readUint16();if(t===r+55+3)return e.readUint24();if(t===r+55+4)return e.readUint32();throw new o.BaseError("Invalid RLP prefix")}function l(e,t,r){let n=e.position,o=[];for(;e.position-ne+t.length,0),r=f(t);return{length:t<=55?1+t:1+r+t,encode(n){for(let{encode:o}of(t<=55?n.pushByte(192+t):(n.pushByte(247+r),1===r?n.pushUint8(t):2===r?n.pushUint16(t):3===r?n.pushUint24(t):n.pushUint32(t)),e))o(n)}}}(t.map(t=>e(t))):function(e){let t="string"==typeof e?n.fromHex(e):e,r=f(t.length);return{length:1===t.length&&t[0]<128?1:t.length<=55?1+t.length:1+r+t.length,encode(e){1===t.length&&t[0]<128||(t.length<=55?e.pushByte(128+t.length):(e.pushByte(183+r),1===r?e.pushUint8(t.length):2===r?e.pushUint16(t.length):3===r?e.pushUint24(t.length):e.pushUint32(t.length))),e.pushBytes(t)}}}(t)}(e),s=a.create(new Uint8Array(o.length));return(o.encode(s),"Hex"===r)?i.fromBytes(s.bytes):s.bytes}function f(e){if(e<256)return 1;if(e<65536)return 2;if(e<16777216)return 3;if(e<4294967296)return 4;throw new o.BaseError("Length is too large.")}},89410:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.noble=void 0,t.createKeyPair=function(e={}){let{as:t="Hex"}=e,r=l({as:t}),n=c({privateKey:r});return{privateKey:r,publicKey:n}},t.getPublicKey=c,t.getSharedSecret=function(e){let{as:t="Hex",privateKey:r,publicKey:o}=e,i=n.secp256k1.ProjectivePoint.fromHex(u.toHex(o).slice(2)).multiply(n.secp256k1.utils.normPrivateKeyToScalar(a.from(r).slice(2))).toRawBytes(!0);return"Hex"===t?a.fromBytes(i):i},t.randomPrivateKey=l,t.recoverAddress=d,t.recoverPublicKey=f,t.sign=function(e){let{extraEntropy:t=s.extraEntropy,hash:r,payload:o,privateKey:u}=e,{r:c,s:l,recovery:d}=n.secp256k1.sign(i.from(o),i.from(u),{extraEntropy:"boolean"==typeof t?t:a.from(t).slice(2),lowS:!0,...r?{prehash:!0}:{}});return{r:c,s:l,yParity:d}},t.verify=function(e){let{address:t,hash:r,payload:a,publicKey:s,signature:c}=e;return t?o.isEqual(t,d({payload:a,signature:c})):n.secp256k1.verify(c,i.from(a),u.toBytes(s),...r?[{prehash:!0,lowS:!0}]:[])};let n=r(92989),o=r(95397),i=r(30136),a=r(5866),s=r(61144),u=r(71045);function c(e){let{privateKey:t}=e,r=n.secp256k1.ProjectivePoint.fromPrivateKey(a.from(t).slice(2));return u.from(r)}function l(e={}){let{as:t="Hex"}=e,r=n.secp256k1.utils.randomPrivateKey();return"Hex"===t?a.fromBytes(r):r}function d(e){return o.fromPublicKey(f(e))}function f(e){let{payload:t,signature:r}=e,{r:o,s:i,yParity:s}=r,c=new n.secp256k1.Signature(BigInt(o),BigInt(i)).addRecoveryBit(s).recoverPublicKey(a.from(t).substring(2));return u.from(c)}t.noble=n.secp256k1},25874:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidVError=t.InvalidYParityError=t.InvalidSError=t.InvalidRError=t.MissingPropertiesError=t.InvalidSerializedSizeError=void 0,t.assert=c,t.fromBytes=l,t.fromHex=d,t.extract=function(e){if(void 0!==e.r&&void 0!==e.s)return f(e)},t.from=f,t.fromDerBytes=function(e){return p(a.fromBytes(e))},t.fromDerHex=p,t.fromLegacy=b,t.fromRpc=m,t.fromTuple=function(e){let[t,r,n]=e;return f({r:"0x"===r?0n:BigInt(r),s:"0x"===n?0n:BigInt(n),yParity:"0x"===t?0:Number(t)})},t.toBytes=function(e){return o.fromHex(y(e))},t.toHex=y,t.toDerBytes=function(e){return new n.secp256k1.Signature(e.r,e.s).toDERRawBytes()},t.toDerHex=function(e){let t=new n.secp256k1.Signature(e.r,e.s);return`0x${t.toDERHex()}`},t.toLegacy=function(e){return{r:e.r,s:e.s,v:g(e.yParity)}},t.toRpc=function(e){let{r:t,s:r,yParity:n}=e;return{r:a.fromNumber(t,{size:32}),s:a.fromNumber(r,{size:32}),yParity:0===n?"0x0":"0x1"}},t.toTuple=function(e){let{r:t,s:r,yParity:n}=e;return[n?"0x01":"0x",0n===t?"0x":a.trimLeft(a.fromNumber(t)),0n===r?"0x":a.trimLeft(a.fromNumber(r))]},t.validate=function(e,t={}){try{return c(e,t),!0}catch{return!1}},t.vToYParity=h,t.yParityToV=g;let n=r(92989),o=r(30136),i=r(80643),a=r(5866),s=r(26763),u=r(22978);function c(e,t={}){let{recovered:r}=t;if(void 0===e.r||void 0===e.s||r&&void 0===e.yParity)throw new E({signature:e});if(e.r<0n||e.r>u.maxUint256)throw new x({value:e.r});if(e.s<0n||e.s>u.maxUint256)throw new w({value:e.s});if("number"==typeof e.yParity&&0!==e.yParity&&1!==e.yParity)throw new P({value:e.yParity})}function l(e){return d(a.fromBytes(e))}function d(e){if(130!==e.length&&132!==e.length)throw new v({signature:e});let t=BigInt(a.slice(e,0,32)),r=BigInt(a.slice(e,32,64)),n=(()=>{let t=Number(`0x${e.slice(130)}`);if(!Number.isNaN(t))try{return h(t)}catch{throw new P({value:t})}})();return void 0===n?{r:t,s:r}:{r:t,s:r,yParity:n}}function f(e){let t="string"==typeof e?d(e):e instanceof Uint8Array?l(e):"string"==typeof e.r?m(e):e.v?b(e):{r:e.r,s:e.s,...void 0!==e.yParity?{yParity:e.yParity}:{}};return c(t),t}function p(e){let{r:t,s:r}=n.secp256k1.Signature.fromDER(a.from(e).slice(2));return{r:t,s:r}}function b(e){return{r:e.r,s:e.s,yParity:h(e.v)}}function m(e){let t=(()=>{let t=e.v?Number(e.v):void 0,r=e.yParity?Number(e.yParity):void 0;if("number"==typeof t&&"number"!=typeof r&&(r=h(t)),"number"!=typeof r)throw new P({value:e.yParity});return r})();return{r:BigInt(e.r),s:BigInt(e.s),yParity:t}}function y(e){c(e);let t=e.r,r=e.s;return a.concat(a.fromNumber(t,{size:32}),a.fromNumber(r,{size:32}),"number"==typeof e.yParity?a.fromNumber(g(e.yParity),{size:1}):"0x")}function h(e){if(0===e||27===e)return 0;if(1===e||28===e)return 1;if(e>=35)return e%2==0?1:0;throw new I({value:e})}function g(e){if(0===e)return 27;if(1===e)return 28;throw new P({value:e})}class v extends i.BaseError{constructor({signature:e}){super(`Value \`${e}\` is an invalid signature size.`,{metaMessages:["Expected: 64 bytes or 65 bytes.",`Received ${a.size(a.from(e))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSerializedSizeError"})}}t.InvalidSerializedSizeError=v;class E extends i.BaseError{constructor({signature:e}){super(`Signature \`${s.stringify(e)}\` is missing either an \`r\`, \`s\`, or \`yParity\` property.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.MissingPropertiesError"})}}t.MissingPropertiesError=E;class x extends i.BaseError{constructor({value:e}){super(`Value \`${e}\` is an invalid r value. r must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidRError"})}}t.InvalidRError=x;class w extends i.BaseError{constructor({value:e}){super(`Value \`${e}\` is an invalid s value. s must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSError"})}}t.InvalidSError=w;class P extends i.BaseError{constructor({value:e}){super(`Value \`${e}\` is an invalid y-parity value. Y-parity must be 0 or 1.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidYParityError"})}}t.InvalidYParityError=P;class I extends i.BaseError{constructor({value:e}){super(`Value \`${e}\` is an invalid v value. v must be 27, 28 or >=35.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidVError"})}}t.InvalidVError=I},22978:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.minInt120=t.minInt112=t.minInt104=t.minInt96=t.minInt88=t.minInt80=t.minInt72=t.minInt64=t.minInt56=t.minInt48=t.minInt40=t.minInt32=t.minInt24=t.minInt16=t.minInt8=t.maxInt256=t.maxInt248=t.maxInt240=t.maxInt232=t.maxInt224=t.maxInt216=t.maxInt208=t.maxInt200=t.maxInt192=t.maxInt184=t.maxInt176=t.maxInt168=t.maxInt160=t.maxInt152=t.maxInt144=t.maxInt136=t.maxInt128=t.maxInt120=t.maxInt112=t.maxInt104=t.maxInt96=t.maxInt88=t.maxInt80=t.maxInt72=t.maxInt64=t.maxInt56=t.maxInt48=t.maxInt40=t.maxInt32=t.maxInt24=t.maxInt16=t.maxInt8=t.integerRegex=t.bytesRegex=t.arrayRegex=void 0,t.maxUint256=t.maxUint248=t.maxUint240=t.maxUint232=t.maxUint224=t.maxUint216=t.maxUint208=t.maxUint200=t.maxUint192=t.maxUint184=t.maxUint176=t.maxUint168=t.maxUint160=t.maxUint152=t.maxUint144=t.maxUint136=t.maxUint128=t.maxUint120=t.maxUint112=t.maxUint104=t.maxUint96=t.maxUint88=t.maxUint80=t.maxUint72=t.maxUint64=t.maxUint56=t.maxUint48=t.maxUint40=t.maxUint32=t.maxUint24=t.maxUint16=t.maxUint8=t.minInt256=t.minInt248=t.minInt240=t.minInt232=t.minInt224=t.minInt216=t.minInt208=t.minInt200=t.minInt192=t.minInt184=t.minInt176=t.minInt168=t.minInt160=t.minInt152=t.minInt144=t.minInt136=t.minInt128=void 0,t.arrayRegex=/^(.*)\[([0-9]*)\]$/,t.bytesRegex=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,t.integerRegex=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,t.maxInt8=2n**(8n-1n)-1n,t.maxInt16=2n**(16n-1n)-1n,t.maxInt24=2n**(24n-1n)-1n,t.maxInt32=2n**(32n-1n)-1n,t.maxInt40=2n**(40n-1n)-1n,t.maxInt48=2n**(48n-1n)-1n,t.maxInt56=2n**(56n-1n)-1n,t.maxInt64=2n**(64n-1n)-1n,t.maxInt72=2n**(72n-1n)-1n,t.maxInt80=2n**(80n-1n)-1n,t.maxInt88=2n**(88n-1n)-1n,t.maxInt96=2n**(96n-1n)-1n,t.maxInt104=2n**(104n-1n)-1n,t.maxInt112=2n**(112n-1n)-1n,t.maxInt120=2n**(120n-1n)-1n,t.maxInt128=2n**(128n-1n)-1n,t.maxInt136=2n**(136n-1n)-1n,t.maxInt144=2n**(144n-1n)-1n,t.maxInt152=2n**(152n-1n)-1n,t.maxInt160=2n**(160n-1n)-1n,t.maxInt168=2n**(168n-1n)-1n,t.maxInt176=2n**(176n-1n)-1n,t.maxInt184=2n**(184n-1n)-1n,t.maxInt192=2n**(192n-1n)-1n,t.maxInt200=2n**(200n-1n)-1n,t.maxInt208=2n**(208n-1n)-1n,t.maxInt216=2n**(216n-1n)-1n,t.maxInt224=2n**(224n-1n)-1n,t.maxInt232=2n**(232n-1n)-1n,t.maxInt240=2n**(240n-1n)-1n,t.maxInt248=2n**(248n-1n)-1n,t.maxInt256=2n**(256n-1n)-1n,t.minInt8=-(2n**(8n-1n)),t.minInt16=-(2n**(16n-1n)),t.minInt24=-(2n**(24n-1n)),t.minInt32=-(2n**(32n-1n)),t.minInt40=-(2n**(40n-1n)),t.minInt48=-(2n**(48n-1n)),t.minInt56=-(2n**(56n-1n)),t.minInt64=-(2n**(64n-1n)),t.minInt72=-(2n**(72n-1n)),t.minInt80=-(2n**(80n-1n)),t.minInt88=-(2n**(88n-1n)),t.minInt96=-(2n**(96n-1n)),t.minInt104=-(2n**(104n-1n)),t.minInt112=-(2n**(112n-1n)),t.minInt120=-(2n**(120n-1n)),t.minInt128=-(2n**(128n-1n)),t.minInt136=-(2n**(136n-1n)),t.minInt144=-(2n**(144n-1n)),t.minInt152=-(2n**(152n-1n)),t.minInt160=-(2n**(160n-1n)),t.minInt168=-(2n**(168n-1n)),t.minInt176=-(2n**(176n-1n)),t.minInt184=-(2n**(184n-1n)),t.minInt192=-(2n**(192n-1n)),t.minInt200=-(2n**(200n-1n)),t.minInt208=-(2n**(208n-1n)),t.minInt216=-(2n**(216n-1n)),t.minInt224=-(2n**(224n-1n)),t.minInt232=-(2n**(232n-1n)),t.minInt240=-(2n**(240n-1n)),t.minInt248=-(2n**(248n-1n)),t.minInt256=-(2n**(256n-1n)),t.maxUint8=2n**8n-1n,t.maxUint16=2n**16n-1n,t.maxUint24=2n**24n-1n,t.maxUint32=2n**32n-1n,t.maxUint40=2n**40n-1n,t.maxUint48=2n**48n-1n,t.maxUint56=2n**56n-1n,t.maxUint64=2n**64n-1n,t.maxUint72=2n**72n-1n,t.maxUint80=2n**80n-1n,t.maxUint88=2n**88n-1n,t.maxUint96=2n**96n-1n,t.maxUint104=2n**104n-1n,t.maxUint112=2n**112n-1n,t.maxUint120=2n**120n-1n,t.maxUint128=2n**128n-1n,t.maxUint136=2n**136n-1n,t.maxUint144=2n**144n-1n,t.maxUint152=2n**152n-1n,t.maxUint160=2n**160n-1n,t.maxUint168=2n**168n-1n,t.maxUint176=2n**176n-1n,t.maxUint184=2n**184n-1n,t.maxUint192=2n**192n-1n,t.maxUint200=2n**200n-1n,t.maxUint208=2n**208n-1n,t.maxUint216=2n**216n-1n,t.maxUint224=2n**224n-1n,t.maxUint232=2n**232n-1n,t.maxUint240=2n**240n-1n,t.maxUint248=2n**248n-1n,t.maxUint256=2n**256n-1n},33084:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.fromRpc=function(e){return{...e,amount:BigInt(e.amount),index:Number(e.index),validatorIndex:Number(e.validatorIndex)}},t.toRpc=function(e){return{address:e.address,amount:n.fromNumber(e.amount),index:n.fromNumber(e.index),validatorIndex:n.fromNumber(e.validatorIndex)}};let n=r(5866)},80601:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeSignature=function(e){let t=!0,r="",n=0,i="",a=!1;for(let o=0;oe(Object.values(t)[n],r));if(/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(i))return"number"===o||"bigint"===o;if(/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(i))return"string"===o||t instanceof Uint8Array;if(/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(i))return Array.isArray(t)&&t.every(t=>e(t,{...r,type:i.replace(/(\[[0-9]{0,}\])$/,"")}));return!1}},t.getAmbiguousTypes=function e(t,r,o){for(let i in t){let a=t[i],s=r[i];if("tuple"===a.type&&"tuple"===s.type&&"components"in a&&"components"in s)return e(a.components,s.components,o[i]);let u=[a.type,s.type];if(u.includes("address")&&u.includes("bytes20")||(u.includes("address")&&u.includes("string")||u.includes("address")&&u.includes("bytes"))&&n.validate(o[i],{strict:!1}))return u}};let n=r(95397),o=r(80643)},6311:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.decodeParameter=c,t.decodeAddress=l,t.decodeArray=d,t.decodeBool=f,t.decodeBytes=p,t.decodeNumber=b,t.decodeTuple=m,t.decodeString=y,t.prepareParameters=function({checksumAddress:e,parameters:t,values:r}){let n=[];for(let o=0;o48?i.toBigInt(o,{signed:r}):i.toNumber(o,{signed:r}),32]}function m(e,t,r){let{checksumAddress:n,staticPosition:o}=r,a=0===t.components.length||t.components.some(({name:e})=>!e),s=a?[]:{},u=0;if(O(t)){let r=o+i.toNumber(e.readBytes(32));for(let o=0;o0?s.concat(t,e):t}}if(u)return{dynamic:!0,encoded:e}}return{dynamic:!1,encoded:s.concat(...c.map(({encoded:e})=>e))}}function x(e,{type:t}){let[,r]=t.split("bytes"),o=s.size(e);if(!r){let t=e;return o%32!=0&&(t=s.padRight(t,32*Math.ceil((e.length-2)/2/32))),{dynamic:!0,encoded:s.concat(s.padLeft(s.fromNumber(o,{size:32})),t)}}if(o!==Number.parseInt(r,10))throw new n.BytesSizeMismatchError({expectedSize:Number.parseInt(r,10),value:e});return{dynamic:!1,encoded:s.padRight(e)}}function w(e){if("boolean"!=typeof e)throw new a.BaseError(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:s.padLeft(s.fromBoolean(e))}}function P(e,{signed:t,size:r}){if("number"==typeof r){let n=2n**(BigInt(r)-(t?1n:0n))-1n,o=t?-n-1n:0n;if(e>n||ee))}}function A(e){let t=e.match(/^(.*)\[(\d+)?\]$/);return t?[t[2]?Number(t[2]):null,t[1]]:void 0}function O(e){let{type:t}=e;if("string"===t||"bytes"===t||t.endsWith("[]"))return!0;if("tuple"===t)return e.components?.some(O);let r=A(e.type);return!!(r&&O({...e,type:r[1]}))}},7323:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.charCodeMap=void 0,t.assertSize=function(e,t){if(n.size(e)>t)throw new n.SizeOverflowError({givenSize:n.size(e),maxSize:t})},t.assertStartOffset=function(e,t){if("number"==typeof t&&t>0&&t>n.size(e)-1)throw new n.SliceOffsetOutOfBoundsError({offset:t,position:"start",size:n.size(e)})},t.assertEndOffset=function(e,t,r){if("number"==typeof t&&"number"==typeof r&&n.size(e)!==r-t)throw new n.SliceOffsetOutOfBoundsError({offset:r,position:"end",size:n.size(e)})},t.charCodeToBase16=function(e){return e>=t.charCodeMap.zero&&e<=t.charCodeMap.nine?e-t.charCodeMap.zero:e>=t.charCodeMap.A&&e<=t.charCodeMap.F?e-(t.charCodeMap.A-10):e>=t.charCodeMap.a&&e<=t.charCodeMap.f?e-(t.charCodeMap.a-10):void 0},t.pad=function(e,t={}){let{dir:r,size:o=32}=t;if(0===o)return e;if(e.length>o)throw new n.SizeExceedsPaddingSizeError({size:e.length,targetSize:o,type:"Bytes"});let i=new Uint8Array(o);for(let t=0;t=this.recursiveReadLimit)throw new s({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new a({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new i({offset:e});let t=this.position-e;this.assertPosition(t),this.position=t},getReadCount(e){return this.positionReadCount.get(e||this.position)||0},incrementPosition(e){if(e<0)throw new i({offset:e});let t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){let t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){let r=t??this.position;return this.assertPosition(r+e-1),this.bytes.subarray(r,r+e)},inspectUint8(e){let t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){let t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){let t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){let t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,255&e),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){this.assertReadLimit(),this._touch();let e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();let r=this.inspectBytes(e);return this.position+=t??e,r},readUint8(){this.assertReadLimit(),this._touch();let e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();let e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();let e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();let e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){let t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;let e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}};class i extends n.BaseError{constructor({offset:e}){super(`Offset \`${e}\` cannot be negative.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.NegativeOffsetError"})}}t.NegativeOffsetError=i;class a extends n.BaseError{constructor({length:e,position:t}){super(`Position \`${t}\` is out of bounds (\`0 < position < ${e}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.PositionOutOfBoundsError"})}}t.PositionOutOfBoundsError=a;class s extends n.BaseError{constructor({count:e,limit:t}){super(`Recursive read limit of \`${t}\` exceeded (recursive read count: \`${e}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.RecursiveReadLimitExceededError"})}}t.RecursiveReadLimitExceededError=s},61144:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.extraEntropy=void 0,t.setExtraEntropy=function(e){t.extraEntropy=e},t.extraEntropy=!1},32127:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getUrl=function(e){return e},t.getVersion=function(){return n.version},t.prettyPrint=function(e){if(!e)return"";let t=Object.entries(e).map(([e,t])=>void 0===t||!1===t?null:[e,t]).filter(Boolean),r=t.reduce((e,[t])=>Math.max(e,t.length),0);return t.map(([e,t])=>` ${`${e}:`.padEnd(r+1)} ${t}`).join("\n")};let n=r(34553)},65450:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.assertSize=function(e,t){if(n.size(e)>t)throw new n.SizeOverflowError({givenSize:n.size(e),maxSize:t})},t.assertStartOffset=function(e,t){if("number"==typeof t&&t>0&&t>n.size(e)-1)throw new n.SliceOffsetOutOfBoundsError({offset:t,position:"start",size:n.size(e)})},t.assertEndOffset=function(e,t,r){if("number"==typeof t&&"number"==typeof r&&n.size(e)!==r-t)throw new n.SliceOffsetOutOfBoundsError({offset:r,position:"end",size:n.size(e)})},t.pad=function(e,t={}){let{dir:r,size:o=32}=t;if(0===o)return e;let i=e.replace("0x","");if(i.length>2*o)throw new n.SizeExceedsPaddingSizeError({size:Math.ceil(i.length/2),targetSize:o,type:"Hex"});return`0x${i["right"===r?"padEnd":"padStart"](2*o,"0")}`},t.trim=function(e,t={}){let{dir:r="left"}=t,n=e.replace("0x",""),o=0;for(let e=0;ethis.maxSize){let e=this.keys().next().value;e&&this.delete(e)}return this}}t.LruMap=r},34553:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="0.1.1"},78796:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidWrappedSignatureError=t.universalSignatureValidatorAbi=t.universalSignatureValidatorBytecode=t.magicBytes=void 0,t.assert=a,t.from=function(e){return"string"==typeof e?s(e):e},t.unwrap=s,t.wrap=function(e){let{data:r,signature:o,to:a}=e;return i.concat(n.encode(n.from("address, bytes, bytes"),[a,r,o]),t.magicBytes)},t.validate=function(e){try{return a(e),!0}catch{return!1}};let n=r(66218),o=r(80643),i=r(5866);function a(e){if(i.slice(e,-32)!==t.magicBytes)throw new u(e)}function s(e){a(e);let[t,r,o]=n.decode(n.from("address, bytes, bytes"),e);return{data:r,signature:o,to:t}}t.magicBytes="0x6492649264926492649264926492649264926492649264926492649264926492",t.universalSignatureValidatorBytecode="0x608060405234801561001057600080fd5b5060405161069438038061069483398101604081905261002f9161051e565b600061003c848484610048565b9050806000526001601ff35b60007f64926492649264926492649264926492649264926492649264926492649264926100748361040c565b036101e7576000606080848060200190518101906100929190610577565b60405192955090935091506000906001600160a01b038516906100b69085906105dd565b6000604051808303816000865af19150503d80600081146100f3576040519150601f19603f3d011682016040523d82523d6000602084013e6100f8565b606091505b50509050876001600160a01b03163b60000361016057806101605760405162461bcd60e51b815260206004820152601e60248201527f5369676e617475726556616c696461746f723a206465706c6f796d656e74000060448201526064015b60405180910390fd5b604051630b135d3f60e11b808252906001600160a01b038a1690631626ba7e90610190908b9087906004016105f9565b602060405180830381865afa1580156101ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d19190610633565b6001600160e01b03191614945050505050610405565b6001600160a01b0384163b1561027a57604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e9061022790879087906004016105f9565b602060405180830381865afa158015610244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102689190610633565b6001600160e01b031916149050610405565b81516041146102df5760405162461bcd60e51b815260206004820152603a602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e6174757265206c656e6774680000000000006064820152608401610157565b6102e7610425565b5060208201516040808401518451859392600091859190811061030c5761030c61065d565b016020015160f81c9050601b811480159061032b57508060ff16601c14155b1561038c5760405162461bcd60e51b815260206004820152603b602482015260008051602061067483398151915260448201527f3a20696e76616c6964207369676e617475726520762076616c756500000000006064820152608401610157565b60408051600081526020810180835289905260ff83169181019190915260608101849052608081018390526001600160a01b0389169060019060a0016020604051602081039080840390855afa1580156103ea573d6000803e3d6000fd5b505050602060405103516001600160a01b0316149450505050505b9392505050565b600060208251101561041d57600080fd5b508051015190565b60405180606001604052806003906020820280368337509192915050565b6001600160a01b038116811461045857600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b60005b8381101561048c578181015183820152602001610474565b50506000910152565b600082601f8301126104a657600080fd5b81516001600160401b038111156104bf576104bf61045b565b604051601f8201601f19908116603f011681016001600160401b03811182821017156104ed576104ed61045b565b60405281815283820160200185101561050557600080fd5b610516826020830160208701610471565b949350505050565b60008060006060848603121561053357600080fd5b835161053e81610443565b6020850151604086015191945092506001600160401b0381111561056157600080fd5b61056d86828701610495565b9150509250925092565b60008060006060848603121561058c57600080fd5b835161059781610443565b60208501519093506001600160401b038111156105b357600080fd5b6105bf86828701610495565b604086015190935090506001600160401b0381111561056157600080fd5b600082516105ef818460208701610471565b9190910192915050565b828152604060208201526000825180604084015261061e816060850160208701610471565b601f01601f1916919091016060019392505050565b60006020828403121561064557600080fd5b81516001600160e01b03198116811461040557600080fd5b634e487b7160e01b600052603260045260246000fdfe5369676e617475726556616c696461746f72237265636f7665725369676e6572",t.universalSignatureValidatorAbi=[{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],stateMutability:"nonpayable",type:"constructor"},{inputs:[{name:"_signer",type:"address"},{name:"_hash",type:"bytes32"},{name:"_signature",type:"bytes"}],outputs:[{type:"bool"}],stateMutability:"nonpayable",type:"function",name:"isValidSig"}];class u extends o.BaseError{constructor(e){super(`Value \`${e}\` is an invalid ERC-6492 wrapped signature.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureErc6492.InvalidWrappedSignatureError"})}}t.InvalidWrappedSignatureError=u},99197:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.SignatureErc6492=void 0,t.SignatureErc6492=r(78796)},89250:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidWrappedSignatureError=t.suffixParameters=t.magicBytes=void 0,t.assert=c,t.from=function(e){return"string"==typeof e?l(e):e},t.unwrap=l,t.wrap=function(e){let{data:r,signature:i}=e;c(e);let l=s.recoverAddress({payload:o.getSignPayload(e.authorization),signature:u.from(e.authorization)}),d=n.encode(t.suffixParameters,[{...e.authorization,delegation:e.authorization.address,chainId:BigInt(e.authorization.chainId)},e.to??l,r??"0x"]),f=a.fromNumber(a.size(d),{size:32});return a.concat(i,d,f,t.magicBytes)},t.validate=function(e){try{return c(e),!0}catch{return!1}};let n=r(66218),o=r(39013),i=r(80643),a=r(5866),s=r(89410),u=r(25874);function c(e){if("string"==typeof e){if(a.slice(e,-32)!==t.magicBytes)throw new d(e)}else u.assert(e.authorization)}function l(e){c(e);let r=a.toNumber(a.slice(e,-64,-32)),i=a.slice(e,-r-64,-64),s=a.slice(e,0,-r-64),[u,l,d]=n.decode(t.suffixParameters,i);return{authorization:o.from({address:u.delegation,chainId:Number(u.chainId),nonce:u.nonce,yParity:u.yParity,r:u.r,s:u.s}),signature:s,...d&&"0x"!==d?{data:d,to:l}:{}}}t.magicBytes="0x8010801080108010801080108010801080108010801080108010801080108010",t.suffixParameters=n.from("(uint256 chainId, address delegation, uint256 nonce, uint8 yParity, uint256 r, uint256 s), address to, bytes data");class d extends i.BaseError{constructor(e){super(`Value \`${e}\` is an invalid ERC-8010 wrapped signature.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureErc8010.InvalidWrappedSignatureError"})}}t.InvalidWrappedSignatureError=d},31225:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.SignatureErc8010=void 0,t.SignatureErc8010=r(89250)},8759:function(e,t,r){r.r(t),r.d(t,{WebSocket:function(){return n}});let n=function(){if("undefined"!=typeof WebSocket)return WebSocket;if(void 0!==global.WebSocket)return global.WebSocket;if(void 0!==window.WebSocket)return window.WebSocket;if(void 0!==self.WebSocket)return self.WebSocket;throw Error("`WebSocket` is not supported in this environment")}()}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/7354.51cf9d733f62303d.js b/frontend/.next/static/chunks/7354.51cf9d733f62303d.js new file mode 100644 index 0000000..74173c4 --- /dev/null +++ b/frontend/.next/static/chunks/7354.51cf9d733f62303d.js @@ -0,0 +1,410 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7354],{77354:function(e,t,i){i.r(t),i.d(t,{W3mApproveTransactionView:function(){return h},W3mRegisterAccountNameSuccess:function(){return Q},W3mRegisterAccountNameView:function(){return q},W3mSmartAccountSettingsView:function(){return _},W3mUpgradeWalletView:function(){return S}});var r=i(31133),o=i(84927),n=i(62714),a=i(89512),s=i(5688),c=i(35652),l=i(52005),d=i(92413),u=(0,r.iv)` + div { + width: 100%; + } + + [data-ready='false'] { + transform: scale(1.05); + } + + @media (max-width: 430px) { + [data-ready='false'] { + transform: translateY(-50px); + } + } +`,p=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let h=class extends r.oi{constructor(){super(),this.bodyObserver=void 0,this.unsubscribe=[],this.iframe=document.getElementById("w3m-iframe"),this.ready=!1,this.unsubscribe.push(a.I.subscribeKey("open",e=>{e||this.onHideIframe()}),a.I.subscribeKey("shake",e=>{e?this.iframe.style.animation="w3m-shake 500ms var(--apkt-easings-ease-out-power-2)":this.iframe.style.animation="none"}))}disconnectedCallback(){this.onHideIframe(),this.unsubscribe.forEach(e=>e()),this.bodyObserver?.unobserve(window.document.body)}async firstUpdated(){await this.syncTheme(),this.iframe.style.display="block";let e=this?.renderRoot?.querySelector("div");this.bodyObserver=new ResizeObserver(t=>{let i=t?.[0]?.contentBoxSize,r=i?.[0]?.inlineSize;this.iframe.style.height="600px",e.style.height="600px",s.OptionsController.state.enableEmbedded?this.updateFrameSizeForEmbeddedMode():(r&&r<=430?(this.iframe.style.width="100%",this.iframe.style.left="0px",this.iframe.style.bottom="0px",this.iframe.style.top="unset"):(this.iframe.style.width="360px",this.iframe.style.left="calc(50% - 180px)",this.iframe.style.top="calc(50% - 300px + 32px)",this.iframe.style.bottom="unset"),this.onShowIframe())}),this.bodyObserver.observe(window.document.body)}render(){return(0,r.dy)`
`}onShowIframe(){let e=window.innerWidth<=430;this.ready=!0,this.iframe.style.animation=e?"w3m-iframe-zoom-in-mobile 200ms var(--apkt-easings-ease-out-power-2)":"w3m-iframe-zoom-in 200ms var(--apkt-easings-ease-out-power-2)"}onHideIframe(){this.iframe.style.display="none",this.iframe.style.animation="w3m-iframe-fade-out 200ms var(--apkt-easings-ease-out-power-2)"}async syncTheme(){let e=c.ConnectorController.getAuthConnector();if(e){let t=l.ThemeController.getSnapshot().themeMode,i=l.ThemeController.getSnapshot().themeVariables;await e.provider.syncTheme({themeVariables:i,w3mThemeVariables:(0,n.t)(i,t)})}}async updateFrameSizeForEmbeddedMode(){let e=this?.renderRoot?.querySelector("div");await new Promise(e=>{setTimeout(e,300)});let t=this.getBoundingClientRect();e.style.width="100%",this.iframe.style.left=`${t.left}px`,this.iframe.style.top=`${t.top}px`,this.iframe.style.width=`${t.width}px`,this.iframe.style.height=`${t.height}px`,this.onShowIframe()}};h.styles=u,p([(0,o.SB)()],h.prototype,"ready",void 0),h=p([(0,d.Mo)("w3m-approve-transaction-view")],h);var g=i(59712);i(96277),i(74975),i(23805),i(18360);var m=i(84249),f=i(57116),b=i(11131),w=(0,b.iv)` + a { + border: none; + border-radius: ${({borderRadius:e})=>e["20"]}; + display: flex; + flex-direction: row; + align-items: center; + padding: ${({spacing:e})=>e[1]}; + transition: + background-color ${({durations:e})=>e.lg} + ${({easings:e})=>e["ease-out-power-2"]}, + box-shadow ${({durations:e})=>e.lg} + ${({easings:e})=>e["ease-out-power-2"]}, + border ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]}; + will-change: background-color, box-shadow, border; + } + + /* -- Variants --------------------------------------------------------------- */ + a[data-type='success'] { + background-color: ${({tokens:e})=>e.core.backgroundSuccess}; + color: ${({tokens:e})=>e.core.textSuccess}; + } + + a[data-type='error'] { + background-color: ${({tokens:e})=>e.core.backgroundError}; + color: ${({tokens:e})=>e.core.textError}; + } + + a[data-type='warning'] { + background-color: ${({tokens:e})=>e.core.backgroundWarning}; + color: ${({tokens:e})=>e.core.textWarning}; + } + + /* -- Sizes --------------------------------------------------------------- */ + a[data-size='sm'] { + height: 24px; + } + + a[data-size='md'] { + height: 28px; + } + + a[data-size='lg'] { + height: 32px; + } + + a[data-size='sm'] > wui-image, + a[data-size='sm'] > wui-icon { + width: 16px; + height: 16px; + } + + a[data-size='md'] > wui-image, + a[data-size='md'] > wui-icon { + width: 20px; + height: 20px; + } + + a[data-size='lg'] > wui-image, + a[data-size='lg'] > wui-icon { + width: 24px; + height: 24px; + } + + wui-text { + padding-left: ${({spacing:e})=>e[1]}; + padding-right: ${({spacing:e})=>e[1]}; + } + + wui-image { + border-radius: ${({borderRadius:e})=>e[3]}; + overflow: hidden; + user-drag: none; + user-select: none; + -moz-user-select: none; + -webkit-user-drag: none; + -webkit-user-select: none; + -ms-user-select: none; + } + + /* -- States --------------------------------------------------------------- */ + @media (hover: hover) and (pointer: fine) { + a[data-type='success']:not(:disabled):hover { + background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; + box-shadow: 0px 0px 0px 1px ${({tokens:e})=>e.core.borderSuccess}; + } + + a[data-type='error']:not(:disabled):hover { + background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; + box-shadow: 0px 0px 0px 1px ${({tokens:e})=>e.core.borderError}; + } + + a[data-type='warning']:not(:disabled):hover { + background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; + box-shadow: 0px 0px 0px 1px ${({tokens:e})=>e.core.borderWarning}; + } + } + + a[data-type='success']:not(:disabled):focus-visible { + box-shadow: + 0px 0px 0px 1px ${({tokens:e})=>e.core.backgroundAccentPrimary}, + 0px 0px 0px 4px ${({tokens:e})=>e.core.foregroundAccent020}; + } + + a[data-type='error']:not(:disabled):focus-visible { + box-shadow: + 0px 0px 0px 1px ${({tokens:e})=>e.core.backgroundAccentPrimary}, + 0px 0px 0px 4px ${({tokens:e})=>e.core.foregroundAccent020}; + } + + a[data-type='warning']:not(:disabled):focus-visible { + box-shadow: + 0px 0px 0px 1px ${({tokens:e})=>e.core.backgroundAccentPrimary}, + 0px 0px 0px 4px ${({tokens:e})=>e.core.foregroundAccent020}; + } + + a:disabled { + opacity: 0.5; + } +`,y=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let x={sm:"md-regular",md:"lg-regular",lg:"lg-regular"},v={success:"sealCheck",error:"warning",warning:"exclamationCircle"},$=class extends r.oi{constructor(){super(...arguments),this.type="success",this.size="md",this.imageSrc=void 0,this.disabled=!1,this.href="",this.text=void 0}render(){return(0,r.dy)` + + ${this.imageTemplate()} + ${this.text} + + `}imageTemplate(){return this.imageSrc?(0,r.dy)``:(0,r.dy)``}};$.styles=[m.ET,m.ZM,w],y([(0,o.Cb)()],$.prototype,"type",void 0),y([(0,o.Cb)()],$.prototype,"size",void 0),y([(0,o.Cb)()],$.prototype,"imageSrc",void 0),y([(0,o.Cb)({type:Boolean})],$.prototype,"disabled",void 0),y([(0,o.Cb)()],$.prototype,"href",void 0),y([(0,o.Cb)()],$.prototype,"text",void 0),$=y([(0,f.M)("wui-semantic-chip")],$),i(44732);let S=class extends r.oi{render(){return(0,r.dy)` + + Follow the instructions on + + + + You will have to reconnect for security reasons + + + `}};S=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a}([(0,d.Mo)("w3m-upgrade-wallet-view")],S);var C=i(44649),A=i(6943),R=i(43291),T=i(64369),k=i(61347),E=i(63671),N=i(4786),O=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let _=class extends r.oi{constructor(){super(...arguments),this.loading=!1,this.switched=!1,this.text="",this.network=A.R.state.activeCaipNetwork}render(){return(0,r.dy)` + + ${this.togglePreferredAccountTypeTemplate()} ${this.toggleSmartAccountVersionTemplate()} + + `}toggleSmartAccountVersionTemplate(){return(0,r.dy)` + + + Force Smart Account Version ${this.isV6()?"7":"6"} + + + `}isV6(){return"v6"===(E.e.get("dapp_smart_account_version")||"v6")}toggleSmartAccountVersion(){E.e.set("dapp_smart_account_version",this.isV6()?"v7":"v6"),"undefined"!=typeof window&&window?.location?.reload()}togglePreferredAccountTypeTemplate(){let e=this.network?.chainNamespace,t=A.R.checkIfSmartAccountEnabled(),i=c.ConnectorController.getConnectorId(e);return c.ConnectorController.getAuthConnector()&&i===C.b.CONNECTOR_ID.AUTH&&t?(this.switched||(this.text=(0,R.r9)(e)===N.y_.ACCOUNT_TYPES.SMART_ACCOUNT?"Switch to your EOA":"Switch to your Smart Account"),(0,r.dy)` + + ${this.text} + + `):null}async changePreferredAccountType(){let e=this.network?.chainNamespace,t=A.R.checkIfSmartAccountEnabled(),i=(0,R.r9)(e)!==N.y_.ACCOUNT_TYPES.SMART_ACCOUNT&&t?N.y_.ACCOUNT_TYPES.SMART_ACCOUNT:N.y_.ACCOUNT_TYPES.EOA;c.ConnectorController.getAuthConnector()&&(this.loading=!0,await T.ConnectionController.setPreferredAccountType(i,e),this.text=i===N.y_.ACCOUNT_TYPES.SMART_ACCOUNT?"Switch to your EOA":"Switch to your Smart Account",this.switched=!0,k.S.resetSend(),this.loading=!1,this.requestUpdate())}};O([(0,o.SB)()],_.prototype,"loading",void 0),O([(0,o.SB)()],_.prototype,"switched",void 0),O([(0,o.SB)()],_.prototype,"text",void 0),O([(0,o.SB)()],_.prototype,"network",void 0),_=O([(0,d.Mo)("w3m-smart-account-settings-view")],_);var P=i(7226),I=i(12540),z=i(53357),D=i(31929),j=i(66909);i(21793),i(80675);var M=(0,b.iv)` + :host { + width: 100%; + } + + button { + width: 100%; + display: flex; + justify-content: space-between; + align-items: center; + background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; + border-radius: ${({borderRadius:e})=>e[4]}; + padding: ${({spacing:e})=>e[4]}; + } + + .name { + max-width: 75%; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + + @media (hover: hover) and (pointer: fine) { + button:hover:enabled { + cursor: pointer; + background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; + border-radius: ${({borderRadius:e})=>e[6]}; + } + } + + button:disabled { + opacity: 0.5; + cursor: default; + } + + button:focus-visible:enabled { + box-shadow: 0 0 0 4px ${({tokens:e})=>e.core.foregroundAccent040}; + background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; + } +`,U=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let B=class extends r.oi{constructor(){super(...arguments),this.name="",this.registered=!1,this.loading=!1,this.disabled=!1}render(){return(0,r.dy)` + + `}templateRightContent(){return this.loading?(0,r.dy)``:this.registered?(0,r.dy)`Registered`:(0,r.dy)`Available`}};B.styles=[m.ET,m.ZM,M],U([(0,o.Cb)()],B.prototype,"name",void 0),U([(0,o.Cb)({type:Boolean})],B.prototype,"registered",void 0),U([(0,o.Cb)({type:Boolean})],B.prototype,"loading",void 0),U([(0,o.Cb)({type:Boolean})],B.prototype,"disabled",void 0),B=U([(0,f.M)("wui-account-name-suggestion-item")],B);var V=i(32801);i(4163);var Y=(0,b.iv)` + :host { + position: relative; + width: 100%; + display: inline-block; + } + + :host([disabled]) { + opacity: 0.5; + cursor: not-allowed; + } + + .base-name { + position: absolute; + right: ${({spacing:e})=>e[4]}; + top: 50%; + transform: translateY(-50%); + text-align: right; + padding: ${({spacing:e})=>e[1]}; + background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; + border-radius: ${({borderRadius:e})=>e[1]}; + } +`,W=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let F=class extends r.oi{constructor(){super(...arguments),this.disabled=!1,this.loading=!1}render(){return(0,r.dy)` + + `}};F.styles=[m.ET,Y],W([(0,o.Cb)()],F.prototype,"errorMessage",void 0),W([(0,o.Cb)({type:Boolean})],F.prototype,"disabled",void 0),W([(0,o.Cb)()],F.prototype,"value",void 0),W([(0,o.Cb)({type:Boolean})],F.prototype,"loading",void 0),W([(0,o.Cb)({attribute:!1})],F.prototype,"onKeyDown",void 0),F=W([(0,f.M)("wui-ens-input")],F),i(4594),i(29158),i(81255);var K=i(34252),H=(0,d.iv)` + wui-flex { + width: 100%; + } + + .suggestion { + background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; + border-radius: ${({borderRadius:e})=>e[4]}; + } + + .suggestion:hover:not(:disabled) { + cursor: pointer; + border: none; + width: 100%; + display: flex; + justify-content: space-between; + align-items: center; + background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; + border-radius: ${({borderRadius:e})=>e[6]}; + padding: ${({spacing:e})=>e[4]}; + } + + .suggestion:disabled { + opacity: 0.5; + cursor: default; + } + + .suggestion:focus-visible:not(:disabled) { + box-shadow: 0 0 0 4px ${({tokens:e})=>e.core.foregroundAccent040}; + background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; + } + + .suggested-name { + max-width: 75%; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + + form { + width: 100%; + position: relative; + } + + .input-submit-button, + .input-loading-spinner { + position: absolute; + top: 22px; + transform: translateY(-50%); + right: 10px; + } +`,L=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let q=class extends r.oi{constructor(){super(),this.formRef=(0,P.V)(),this.usubscribe=[],this.name="",this.error="",this.loading=I.a.state.loading,this.suggestions=I.a.state.suggestions,this.profileName=A.R.getAccountData()?.profileName,this.onDebouncedNameInputChange=z.j.debounce(e=>{e.length<4?this.error="Name must be at least 4 characters long":K.g.isValidReownName(e)?(this.error="",I.a.getSuggestions(e)):this.error="The value is not a valid username"}),this.usubscribe.push(I.a.subscribe(e=>{this.suggestions=e.suggestions,this.loading=e.loading}),A.R.subscribeChainProp("accountState",e=>{this.profileName=e?.profileName,e?.profileName&&(this.error="You already own a name")}))}firstUpdated(){this.formRef.value?.addEventListener("keydown",this.onEnterKey.bind(this))}disconnectedCallback(){super.disconnectedCallback(),this.usubscribe.forEach(e=>e()),this.formRef.value?.removeEventListener("keydown",this.onEnterKey.bind(this))}render(){return(0,r.dy)` + +
+ + + ${this.submitButtonTemplate()} + +
+ ${this.templateSuggestions()} +
+ `}submitButtonTemplate(){let e=this.suggestions.find(e=>e.name?.split(".")?.[0]===this.name&&e.registered);if(this.loading)return(0,r.dy)``;let t=`${this.name}${C.b.WC_NAME_SUFFIX}`;return(0,r.dy)` + this.onSubmitName(t)} + > + + `}onNameInputChange(e){let t=K.g.validateReownName(e.detail||"");this.name=t,this.onDebouncedNameInputChange(t)}onKeyDown(e){1!==e.key.length||K.g.isValidReownName(e.key)||e.preventDefault()}templateSuggestions(){return!this.name||this.name.length<4||this.error?null:(0,r.dy)` + ${this.suggestions.map(e=>(0,r.dy)`this.onSubmitName(e.name)} + >`)} + `}isAllowedToSubmit(e){let t=e.split(".")?.[0],i=this.suggestions.find(e=>e.name?.split(".")?.[0]===t&&e.registered);return!this.loading&&!this.error&&!this.profileName&&t&&I.a.validateName(t)&&!i}async onSubmitName(e){try{if(!this.isAllowedToSubmit(e))return;D.X.sendEvent({type:"track",event:"REGISTER_NAME_INITIATED",properties:{isSmartAccount:(0,R.r9)(A.R.state.activeChain)===N.y_.ACCOUNT_TYPES.SMART_ACCOUNT,ensName:e}}),await I.a.registerName(e),D.X.sendEvent({type:"track",event:"REGISTER_NAME_SUCCESS",properties:{isSmartAccount:(0,R.r9)(A.R.state.activeChain)===N.y_.ACCOUNT_TYPES.SMART_ACCOUNT,ensName:e}})}catch(t){j.SnackController.showError(t.message),D.X.sendEvent({type:"track",event:"REGISTER_NAME_ERROR",properties:{isSmartAccount:(0,R.r9)(A.R.state.activeChain)===N.y_.ACCOUNT_TYPES.SMART_ACCOUNT,ensName:e,error:z.j.parseError(t)}})}}onEnterKey(e){if("Enter"===e.key&&this.name&&this.isAllowedToSubmit(this.name)){let e=`${this.name}${C.b.WC_NAME_SUFFIX}`;this.onSubmitName(e)}}};q.styles=H,L([(0,o.Cb)()],q.prototype,"errorMessage",void 0),L([(0,o.SB)()],q.prototype,"name",void 0),L([(0,o.SB)()],q.prototype,"error",void 0),L([(0,o.SB)()],q.prototype,"loading",void 0),L([(0,o.SB)()],q.prototype,"suggestions",void 0),L([(0,o.SB)()],q.prototype,"profileName",void 0),q=L([(0,d.Mo)("w3m-register-account-name-view")],q);var X=i(8330),G=i(86777);i(97585),i(92374),i(51437);var Z=(0,r.iv)` + .continue-button-container { + width: 100%; + } +`;let Q=class extends r.oi{render(){return(0,r.dy)` + + ${this.onboardingTemplate()} ${this.buttonsTemplate()} + {z.j.openHref(X.U.URLS.FAQ,"_blank")}} + > + Learn more + + + + `}onboardingTemplate(){return(0,r.dy)` + + + + + + Account name chosen successfully + + + You can now fund your account and trade crypto + + + `}buttonsTemplate(){return(0,r.dy)` + Let's Go! + + `}redirectToAccount(){G.RouterController.replace("Account")}};Q.styles=Z,Q=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a}([(0,d.Mo)("w3m-register-account-name-success-view")],Q)}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/7550.52bc17f39c020f0e.js b/frontend/.next/static/chunks/7550.52bc17f39c020f0e.js new file mode 100644 index 0000000..f45f097 --- /dev/null +++ b/frontend/.next/static/chunks/7550.52bc17f39c020f0e.js @@ -0,0 +1,14 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7550],{27550:function(t,e,r){r.r(e),r.d(e,{PhCaretLeft:function(){return c}}),r(31498);var l=r(38157),a=r(48567),i=r(54910),o=r(69709),s=r(78313),h=Object.defineProperty,p=Object.getOwnPropertyDescriptor,n=(t,e,r,l)=>{for(var a,i=l>1?void 0:l?p(e,r):e,o=t.length-1;o>=0;o--)(a=t[o])&&(i=(l?a(e,r,i):a(i))||i);return l&&i&&h(e,r,i),i};let c=class extends a.oi{constructor(){super(...arguments),this.size="1em",this.weight="regular",this.color="currentColor",this.mirrored=!1}render(){var t;return(0,l.dy)` + ${c.weightsMap.get(null!=(t=this.weight)?t:"regular")} + `}};c.weightsMap=new Map([["thin",(0,l.YP)``],["light",(0,l.YP)``],["regular",(0,l.YP)``],["bold",(0,l.YP)``],["fill",(0,l.YP)``],["duotone",(0,l.YP)``]]),c.styles=(0,s.iv)` + :host { + display: contents; + } + `,n([(0,o.C)({type:String,reflect:!0})],c.prototype,"size",2),n([(0,o.C)({type:String,reflect:!0})],c.prototype,"weight",2),n([(0,o.C)({type:String,reflect:!0})],c.prototype,"color",2),n([(0,o.C)({type:Boolean,reflect:!0})],c.prototype,"mirrored",2),c=n([(0,i.M)("ph-caret-left")],c)}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/7656-69292de0773b769f.js b/frontend/.next/static/chunks/7656-69292de0773b769f.js new file mode 100644 index 0000000..6fcf1a0 --- /dev/null +++ b/frontend/.next/static/chunks/7656-69292de0773b769f.js @@ -0,0 +1,2 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7656],{791:function(e,t,n){n.d(t,{wF:function(){return eI}}),(l=h||(h={}))[l.QR_CODE=0]="QR_CODE",l[l.AZTEC=1]="AZTEC",l[l.CODABAR=2]="CODABAR",l[l.CODE_39=3]="CODE_39",l[l.CODE_93=4]="CODE_93",l[l.CODE_128=5]="CODE_128",l[l.DATA_MATRIX=6]="DATA_MATRIX",l[l.MAXICODE=7]="MAXICODE",l[l.ITF=8]="ITF",l[l.EAN_13=9]="EAN_13",l[l.EAN_8=10]="EAN_8",l[l.PDF_417=11]="PDF_417",l[l.RSS_14=12]="RSS_14",l[l.RSS_EXPANDED=13]="RSS_EXPANDED",l[l.UPC_A=14]="UPC_A",l[l.UPC_E=15]="UPC_E",l[l.UPC_EAN_EXTENSION=16]="UPC_EAN_EXTENSION";var r,o,i,a,s,c,u,l,h,d,p,f,g,y,m=new Map([[h.QR_CODE,"QR_CODE"],[h.AZTEC,"AZTEC"],[h.CODABAR,"CODABAR"],[h.CODE_39,"CODE_39"],[h.CODE_93,"CODE_93"],[h.CODE_128,"CODE_128"],[h.DATA_MATRIX,"DATA_MATRIX"],[h.MAXICODE,"MAXICODE"],[h.ITF,"ITF"],[h.EAN_13,"EAN_13"],[h.EAN_8,"EAN_8"],[h.PDF_417,"PDF_417"],[h.RSS_14,"RSS_14"],[h.RSS_EXPANDED,"RSS_EXPANDED"],[h.UPC_A,"UPC_A"],[h.UPC_E,"UPC_E"],[h.UPC_EAN_EXTENSION,"UPC_EAN_EXTENSION"]]);(r=d||(d={}))[r.UNKNOWN=0]="UNKNOWN",r[r.URL=1]="URL",(o=p||(p={}))[o.SCAN_TYPE_CAMERA=0]="SCAN_TYPE_CAMERA",o[o.SCAN_TYPE_FILE=1]="SCAN_TYPE_FILE";var S=function(){function e(){}return e.GITHUB_PROJECT_URL="https://github.com/mebjas/html5-qrcode",e.SCAN_DEFAULT_FPS=2,e.DEFAULT_DISABLE_FLIP=!1,e.DEFAULT_REMEMBER_LAST_CAMERA_USED=!0,e.DEFAULT_SUPPORTED_SCAN_TYPE=[p.SCAN_TYPE_CAMERA,p.SCAN_TYPE_FILE],e}(),T=function(){function e(e,t){this.format=e,this.formatName=t}return e.prototype.toString=function(){return this.formatName},e.create=function(t){if(!m.has(t))throw"".concat(t," not in html5QrcodeSupportedFormatsTextMap");return new e(t,m.get(t))},e}(),M=function(){function e(){}return e.createFromText=function(e){return{decodedText:e,result:{text:e}}},e.createFromQrcodeResult=function(e){return{decodedText:e.text,result:e}},e}();(i=f||(f={}))[i.UNKWOWN_ERROR=0]="UNKWOWN_ERROR",i[i.IMPLEMENTATION_ERROR=1]="IMPLEMENTATION_ERROR",i[i.NO_CODE_FOUND_ERROR=2]="NO_CODE_FOUND_ERROR";var C=function(){function e(){}return e.createFrom=function(e){return{errorMessage:e,type:f.UNKWOWN_ERROR}},e}(),E=function(){function e(e){this.verbose=e}return e.prototype.log=function(e){this.verbose&&console.log(e)},e.prototype.warn=function(e){this.verbose&&console.warn(e)},e.prototype.logError=function(e,t){(this.verbose||!0===t)&&console.error(e)},e.prototype.logErrors=function(e){if(0===e.length)throw"Logger#logError called without arguments";this.verbose&&console.error(e)},e}();function I(e){return null==e}var A=function(){function e(){}return e.codeParseError=function(e){return"QR code parse error, error = ".concat(e)},e.errorGettingUserMedia=function(e){return"Error getting userMedia, error = ".concat(e)},e.onlyDeviceSupportedError=function(){return"The device doesn't support navigator.mediaDevices , only supported cameraIdOrConfig in this case is deviceId parameter (string)."},e.cameraStreamingNotSupported=function(){return"Camera streaming not supported by the browser."},e.unableToQuerySupportedDevices=function(){return"Unable to query supported devices, unknown error."},e.insecureContextCameraQueryError=function(){return"Camera access is only supported in secure context like https or localhost."},e.scannerPaused=function(){return"Scanner paused"},e}(),D=function(){function e(){}return e.scanningStatus=function(){return"Scanning"},e.idleStatus=function(){return"Idle"},e.errorStatus=function(){return"Error"},e.permissionStatus=function(){return"Permission"},e.noCameraFoundErrorStatus=function(){return"No Cameras"},e.lastMatch=function(e){return"Last Match: ".concat(e)},e.codeScannerTitle=function(){return"Code Scanner"},e.cameraPermissionTitle=function(){return"Request Camera Permissions"},e.cameraPermissionRequesting=function(){return"Requesting camera permissions..."},e.noCameraFound=function(){return"No camera found"},e.scanButtonStopScanningText=function(){return"Stop Scanning"},e.scanButtonStartScanningText=function(){return"Start Scanning"},e.torchOnButton=function(){return"Switch On Torch"},e.torchOffButton=function(){return"Switch Off Torch"},e.torchOnFailedMessage=function(){return"Failed to turn on torch"},e.torchOffFailedMessage=function(){return"Failed to turn off torch"},e.scanButtonScanningStarting=function(){return"Launching Camera..."},e.textIfCameraScanSelected=function(){return"Scan an Image File"},e.textIfFileScanSelected=function(){return"Scan using camera directly"},e.selectCamera=function(){return"Select Camera"},e.fileSelectionChooseImage=function(){return"Choose Image"},e.fileSelectionChooseAnother=function(){return"Choose Another"},e.fileSelectionNoImageSelected=function(){return"No image choosen"},e.anonymousCameraPrefix=function(){return"Anonymous Camera"},e.dragAndDropMessage=function(){return"Or drop an image to scan"},e.dragAndDropMessageOnlyImages=function(){return"Or drop an image to scan (other files not supported)"},e.zoom=function(){return"zoom"},e.loadingImage=function(){return"Loading image..."},e.cameraScanAltText=function(){return"Camera based scan"},e.fileScanAltText=function(){return"Fule based scan"},e}(),N=function(){function e(){}return e.poweredBy=function(){return"Powered by "},e.reportIssues=function(){return"Report issues"},e}(),v=function(){function e(){}return e.isMediaStreamConstraintsValid=function(e,t){if("object"!=typeof e){var n=typeof e;return t.logError("videoConstraints should be of type object, the "+"object passed is of type ".concat(n,"."),!0),!1}for(var r=new Set(["autoGainControl","channelCount","echoCancellation","latency","noiseSuppression","sampleRate","sampleSize","volume"]),o=Object.keys(e),i=0;i0&&o[o.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]n&&(n=i,t=o)}if(!t)throw"No largest barcode found";return t},e.prototype.createBarcodeDetectorFormats=function(e){for(var t=[],n=0;n0&&o[o.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]=r&&(e.isClosed=!0,e.parentElement.removeChild(e.surface),t())})})},e.prototype.getCapabilities=function(){return new P(this.getFirstTrackOrFail())},e}(),Q=function(){function e(e){this.mediaStream=e}return e.prototype.render=function(e,t,n){return j(this,void 0,void 0,function(){return B(this,function(r){return[2,Y.create(e,this.mediaStream,t,n)]})})},e.create=function(t){return j(this,void 0,void 0,function(){var n;return B(this,function(r){switch(r.label){case 0:if(!navigator.mediaDevices)throw"navigator.mediaDevices not supported";return n={audio:!1,video:t},[4,navigator.mediaDevices.getUserMedia(n)];case 1:return[2,new e(r.sent())]}})})},e}(),H=function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):((t=e.value)instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})},V=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]0&&o[o.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]e&&(this.logger.warn("`qrbox.width` or `qrbox` is larger than the width of the root element. The width will be truncated to the width of root element."),r=e),r)},e.prototype.validateQrboxConfig=function(e){if("number"!=typeof e&&"function"!=typeof e&&(void 0===e.width||void 0===e.height))throw"Invalid instance of QrDimensions passed for 'config.qrbox'. Both 'width' and 'height' should be set."},e.prototype.toQrdimensions=function(e,t,n){if("number"==typeof n)return{width:n,height:n};if("function"==typeof n)try{return n(e,t)}catch(e){throw Error("qrbox config was passed as a function but it failed with unknown error"+e)}return n},e.prototype.setupUi=function(e,t,n){n.isShadedBoxEnabled()&&this.validateQrboxSize(e,t,n);var r=I(n.qrbox)?{width:e,height:t}:n.qrbox;this.validateQrboxConfig(r);var o=this.toQrdimensions(e,t,r);o.height>t&&this.logger.warn("[Html5Qrcode] config.qrbox has height that isgreater than the height of the video stream. Shading will be ignored");var i=n.isShadedBoxEnabled()&&o.height<=t,a=i?this.getShadedRegionBounds(e,t,o):{x:0,y:0,width:e,height:t},s=this.createCanvasElement(a.width,a.height),c=s.getContext("2d",{willReadFrequently:!0});c.canvas.width=a.width,c.canvas.height=a.height,this.element.append(s),i&&this.possiblyInsertShadingElement(this.element,e,t,o),this.createScannerPausedUiElement(this.element),this.qrRegion=a,this.context=c,this.canvasElement=s},e.prototype.createScannerPausedUiElement=function(e){var t=document.createElement("div");t.innerText=A.scannerPaused(),t.style.display="none",t.style.position="absolute",t.style.top="0px",t.style.zIndex="1",t.style.background="rgba(9, 9, 9, 0.46)",t.style.color="#FFECEC",t.style.textAlign="center",t.style.width="100%",e.appendChild(t),this.scannerPausedUiElement=t},e.prototype.scanContext=function(e,t){var n=this;return this.stateManagerProxy.isPaused()?Promise.resolve(!1):this.qrcode.decodeAsync(this.canvasElement).then(function(t){return e(t.text,M.createFromQrcodeResult(t)),n.possiblyUpdateShaders(!0),!0}).catch(function(e){n.possiblyUpdateShaders(!1);var r=A.codeParseError(e);return t(r,C.createFrom(r)),!1})},e.prototype.foreverScan=function(e,t,n){var r=this;if(this.shouldScan&&this.renderedCamera){var o=this.renderedCamera.getSurface(),i=o.videoWidth/o.clientWidth,a=o.videoHeight/o.clientHeight;if(!this.qrRegion)throw"qrRegion undefined when localMediaStream is ready.";var s=this.qrRegion.width*i,c=this.qrRegion.height*a,u=this.qrRegion.x*i,l=this.qrRegion.y*a;this.context.drawImage(o,u,l,s,c,0,0,this.qrRegion.width,this.qrRegion.height);var h=function(){r.foreverScanTimeout=setTimeout(function(){r.foreverScan(e,t,n)},r.getTimeoutFps(e.fps))};this.scanContext(t,n).then(function(o){o||!0===e.disableFlip?h():(r.context.translate(r.context.canvas.width,0),r.context.scale(-1,1),r.scanContext(t,n).finally(function(){h()}))}).catch(function(e){r.logger.logError("Error happend while scanning context",e),h()})}},e.prototype.createVideoConstraints=function(e){if("string"==typeof e)return{deviceId:{exact:e}};if("object"==typeof e){var t="facingMode",n="deviceId",r={user:!0,environment:!0},o="exact",i=function(e){if(e in r)return!0;throw"config has invalid 'facingMode' value = "+"'".concat(e,"'")},a=Object.keys(e);if(1!==a.length)throw"'cameraIdOrConfig' object should have exactly 1 key,"+" if passed as an object, found ".concat(a.length," keys");var s=Object.keys(e)[0];if(s!==t&&s!==n)throw"Only '".concat(t,"' and '").concat(n,"' ")+" are supported for 'cameraIdOrConfig'";if(s===t){var c=e.facingMode;if("string"==typeof c){if(i(c))return{facingMode:c}}else if("object"==typeof c){if(o in c){if(i(c["".concat(o)]))return{facingMode:{exact:c["".concat(o)]}}}else throw"'facingMode' should be string or object with"+" ".concat(o," as key.")}else{var u=typeof c;throw"Invalid type of 'facingMode' = ".concat(u)}}else{var l=e.deviceId;if("string"==typeof l)return{deviceId:l};if("object"==typeof l){if(o in l)return{deviceId:{exact:l["".concat(o)]}};throw"'deviceId' should be string or object with"+" ".concat(o," as key.")}throw"Invalid type of 'deviceId' = ".concat(typeof l)}}var h=typeof e;throw"Invalid type of 'cameraIdOrConfig' = ".concat(h)},e.prototype.computeCanvasDrawConfig=function(e,t,n,r){if(e<=n&&t<=r)return{x:(n-e)/2,y:(r-t)/2,width:e,height:t};var o=e,i=t;return e>n&&(t=n/e*t,e=n),t>r&&(e=r/t*e,t=r),this.logger.log("Image downsampled from "+"".concat(o,"X").concat(i)+" to ".concat(e,"X").concat(t,".")),this.computeCanvasDrawConfig(e,t,n,r)},e.prototype.clearElement=function(){if(this.stateManagerProxy.isScanning())throw"Cannot clear while scan is ongoing, close it first.";var e=document.getElementById(this.elementId);e&&(e.innerHTML="")},e.prototype.possiblyUpdateShaders=function(e){this.qrMatch!==e&&(this.hasBorderShaders&&this.borderShaders&&this.borderShaders.length&&this.borderShaders.forEach(function(t){t.style.backgroundColor=e?$.BORDER_SHADER_MATCH_COLOR:$.BORDER_SHADER_DEFAULT_COLOR}),this.qrMatch=e)},e.prototype.possiblyCloseLastScanImageFile=function(){this.lastScanImageFile&&(URL.revokeObjectURL(this.lastScanImageFile),this.lastScanImageFile=null)},e.prototype.createCanvasElement=function(e,t,n){var r=document.createElement("canvas");return r.style.width="".concat(e,"px"),r.style.height="".concat(t,"px"),r.style.display="none",r.id=I(n)?"qr-canvas":n,r},e.prototype.getShadedRegionBounds=function(e,t,n){if(n.width>e||n.height>t)throw"'config.qrbox' dimensions should not be greater than the dimensions of the root HTML element.";return{x:(e-n.width)/2,y:(t-n.height)/2,width:n.width,height:n.height}},e.prototype.possiblyInsertShadingElement=function(e,t,n,r){if(!(t-r.width<1)&&!(n-r.height<1)){var o=document.createElement("div");o.style.position="absolute";var i=(t-r.width)/2,a=(n-r.height)/2;o.style.borderLeft="".concat(i,"px solid rgba(0, 0, 0, 0.48)"),o.style.borderRight="".concat(i,"px solid rgba(0, 0, 0, 0.48)"),o.style.borderTop="".concat(a,"px solid rgba(0, 0, 0, 0.48)"),o.style.borderBottom="".concat(a,"px solid rgba(0, 0, 0, 0.48)"),o.style.boxSizing="border-box",o.style.top="0px",o.style.bottom="0px",o.style.left="0px",o.style.right="0px",o.id="".concat($.SHADED_REGION_ELEMENT_ID),t-r.width<11||n-r.height<11?this.hasBorderShaders=!1:(this.insertShaderBorders(o,40,5,-5,null,0,!0),this.insertShaderBorders(o,40,5,-5,null,0,!1),this.insertShaderBorders(o,40,5,null,-5,0,!0),this.insertShaderBorders(o,40,5,null,-5,0,!1),this.insertShaderBorders(o,5,45,-5,null,-5,!0),this.insertShaderBorders(o,5,45,null,-5,-5,!0),this.insertShaderBorders(o,5,45,-5,null,-5,!1),this.insertShaderBorders(o,5,45,null,-5,-5,!1),this.hasBorderShaders=!0),e.append(o)}},e.prototype.insertShaderBorders=function(e,t,n,r,o,i,a){var s=document.createElement("div");s.style.position="absolute",s.style.backgroundColor=$.BORDER_SHADER_DEFAULT_COLOR,s.style.width="".concat(t,"px"),s.style.height="".concat(n,"px"),null!==r&&(s.style.top="".concat(r,"px")),null!==o&&(s.style.bottom="".concat(o,"px")),a?s.style.left="".concat(i,"px"):s.style.right="".concat(i,"px"),this.borderShaders||(this.borderShaders=[]),this.borderShaders.push(s),e.appendChild(s)},e.prototype.showPausedState=function(){if(!this.scannerPausedUiElement)throw"[internal error] scanner paused UI element not found";this.scannerPausedUiElement.style.display="block"},e.prototype.hidePausedState=function(){if(!this.scannerPausedUiElement)throw"[internal error] scanner paused UI element not found";this.scannerPausedUiElement.style.display="none"},e.prototype.getTimeoutFps=function(e){return 1e3/e},e}(),en="data:image/svg+xml;base64,",er=en+"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzNzEuNjQzIDM3MS42NDMiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDM3MS42NDMgMzcxLjY0MyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+PHBhdGggZD0iTTEwNS4wODQgMzguMjcxaDE2My43Njh2MjBIMTA1LjA4NHoiLz48cGF0aCBkPSJNMzExLjU5NiAxOTAuMTg5Yy03LjQ0MS05LjM0Ny0xOC40MDMtMTYuMjA2LTMyLjc0My0yMC41MjJWMzBjMC0xNi41NDItMTMuNDU4LTMwLTMwLTMwSDEyNS4wODRjLTE2LjU0MiAwLTMwIDEzLjQ1OC0zMCAzMHYxMjAuMTQzaC04LjI5NmMtMTYuNTQyIDAtMzAgMTMuNDU4LTMwIDMwdjEuMzMzYTI5LjgwNCAyOS44MDQgMCAwIDAgNC42MDMgMTUuOTM5Yy03LjM0IDUuNDc0LTEyLjEwMyAxNC4yMjEtMTIuMTAzIDI0LjA2MXYxLjMzM2MwIDkuODQgNC43NjMgMTguNTg3IDEyLjEwMyAyNC4wNjJhMjkuODEgMjkuODEgMCAwIDAtNC42MDMgMTUuOTM4djEuMzMzYzAgMTYuNTQyIDEzLjQ1OCAzMCAzMCAzMGg4LjMyNGMuNDI3IDExLjYzMSA3LjUwMyAyMS41ODcgMTcuNTM0IDI2LjE3Ny45MzEgMTAuNTAzIDQuMDg0IDMwLjE4NyAxNC43NjggNDUuNTM3YTkuOTg4IDkuOTg4IDAgMCAwIDguMjE2IDQuMjg4IDkuOTU4IDkuOTU4IDAgMCAwIDUuNzA0LTEuNzkzYzQuNTMzLTMuMTU1IDUuNjUtOS4zODggMi40OTUtMTMuOTIxLTYuNzk4LTkuNzY3LTkuNjAyLTIyLjYwOC0xMC43Ni0zMS40aDgyLjY4NWMuMjcyLjQxNC41NDUuODE4LjgxNSAxLjIxIDMuMTQyIDQuNTQxIDkuMzcyIDUuNjc5IDEzLjkxMyAyLjUzNCA0LjU0Mi0zLjE0MiA1LjY3Ny05LjM3MSAyLjUzNS0xMy45MTMtMTEuOTE5LTE3LjIyOS04Ljc4Ny0zNS44ODQgOS41ODEtNTcuMDEyIDMuMDY3LTIuNjUyIDEyLjMwNy0xMS43MzIgMTEuMjE3LTI0LjAzMy0uODI4LTkuMzQzLTcuMTA5LTE3LjE5NC0xOC42NjktMjMuMzM3YTkuODU3IDkuODU3IDAgMCAwLTEuMDYxLS40ODZjLS40NjYtLjE4Mi0xMS40MDMtNC41NzktOS43NDEtMTUuNzA2IDEuMDA3LTYuNzM3IDE0Ljc2OC04LjI3MyAyMy43NjYtNy42NjYgMjMuMTU2IDEuNTY5IDM5LjY5OCA3LjgwMyA0Ny44MzYgMTguMDI2IDUuNzUyIDcuMjI1IDcuNjA3IDE2LjYyMyA1LjY3MyAyOC43MzMtLjQxMyAyLjU4NS0uODI0IDUuMjQxLTEuMjQ1IDcuOTU5LTUuNzU2IDM3LjE5NC0xMi45MTkgODMuNDgzLTQ5Ljg3IDExNC42NjEtNC4yMjEgMy41NjEtNC43NTYgOS44Ny0xLjE5NCAxNC4wOTJhOS45OCA5Ljk4IDAgMCAwIDcuNjQ4IDMuNTUxIDkuOTU1IDkuOTU1IDAgMCAwIDYuNDQ0LTIuMzU4YzQyLjY3Mi0zNi4wMDUgNTAuODAyLTg4LjUzMyA1Ni43MzctMTI2Ljg4OC40MTUtMi42ODQuODIxLTUuMzA5IDEuMjI5LTcuODYzIDIuODM0LTE3LjcyMS0uNDU1LTMyLjY0MS05Ljc3Mi00NC4zNDV6bS0yMzIuMzA4IDQyLjYyYy01LjUxNCAwLTEwLTQuNDg2LTEwLTEwdi0xLjMzM2MwLTUuNTE0IDQuNDg2LTEwIDEwLTEwaDE1djIxLjMzM2gtMTV6bS0yLjUtNTIuNjY2YzAtNS41MTQgNC40ODYtMTAgMTAtMTBoNy41djIxLjMzM2gtNy41Yy01LjUxNCAwLTEwLTQuNDg2LTEwLTEwdi0xLjMzM3ptMTcuNSA5My45OTloLTcuNWMtNS41MTQgMC0xMC00LjQ4Ni0xMC0xMHYtMS4zMzNjMC01LjUxNCA0LjQ4Ni0xMCAxMC0xMGg3LjV2MjEuMzMzem0zMC43OTYgMjguODg3Yy01LjUxNCAwLTEwLTQuNDg2LTEwLTEwdi04LjI3MWg5MS40NTdjLS44NTEgNi42NjgtLjQzNyAxMi43ODcuNzMxIDE4LjI3MWgtODIuMTg4em03OS40ODItMTEzLjY5OGMtMy4xMjQgMjAuOTA2IDEyLjQyNyAzMy4xODQgMjEuNjI1IDM3LjA0IDUuNDQxIDIuOTY4IDcuNTUxIDUuNjQ3IDcuNzAxIDcuMTg4LjIxIDIuMTUtMi41NTMgNS42ODQtNC40NzcgNy4yNTEtLjQ4Mi4zNzgtLjkyOS44LTEuMzM1IDEuMjYxLTYuOTg3IDcuOTM2LTExLjk4MiAxNS41Mi0xNS40MzIgMjIuNjg4aC05Ny41NjRWMzBjMC01LjUxNCA0LjQ4Ni0xMCAxMC0xMGgxMjMuNzY5YzUuNTE0IDAgMTAgNC40ODYgMTAgMTB2MTM1LjU3OWMtMy4wMzItLjM4MS02LjE1LS42OTQtOS4zODktLjkxNC0yNS4xNTktMS42OTQtNDIuMzcgNy43NDgtNDQuODk4IDI0LjY2NnoiLz48cGF0aCBkPSJNMTc5LjEyOSA4My4xNjdoLTI0LjA2YTUgNSAwIDAgMC01IDV2MjQuMDYxYTUgNSAwIDAgMCA1IDVoMjQuMDZhNSA1IDAgMCAwIDUtNVY4OC4xNjdhNSA1IDAgMCAwLTUtNXpNMTcyLjYyOSAxNDIuODZoLTEyLjU2VjEzMC44YTUgNSAwIDEgMC0xMCAwdjE3LjA2MWE1IDUgMCAwIDAgNSA1aDE3LjU2YTUgNSAwIDEgMCAwLTEwLjAwMXpNMjE2LjU2OCA4My4xNjdoLTI0LjA2YTUgNSAwIDAgMC01IDV2MjQuMDYxYTUgNSAwIDAgMCA1IDVoMjQuMDZhNSA1IDAgMCAwIDUtNVY4OC4xNjdhNSA1IDAgMCAwLTUtNXptLTUgMjQuMDYxaC0xNC4wNlY5My4xNjdoMTQuMDZ2MTQuMDYxek0yMTEuNjY5IDEyNS45MzZIMTk3LjQxYTUgNSAwIDAgMC01IDV2MTQuMjU3YTUgNSAwIDAgMCA1IDVoMTQuMjU5YTUgNSAwIDAgMCA1LTV2LTE0LjI1N2E1IDUgMCAwIDAtNS01eiIvPjwvc3ZnPg==",eo=en+"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA1OS4wMTggNTkuMDE4IiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA1OS4wMTggNTkuMDE4IiB4bWw6c3BhY2U9InByZXNlcnZlIj48cGF0aCBkPSJtNTguNzQxIDU0LjgwOS01Ljk2OS02LjI0NGExMC43NCAxMC43NCAwIDAgMCAyLjgyLTcuMjVjMC01Ljk1My00Ljg0My0xMC43OTYtMTAuNzk2LTEwLjc5NlMzNCAzNS4zNjEgMzQgNDEuMzE0IDM4Ljg0MyA1Mi4xMSA0NC43OTYgNTIuMTFjMi40NDEgMCA0LjY4OC0uODI0IDYuNDk5LTIuMTk2bDYuMDAxIDYuMjc3YS45OTguOTk4IDAgMCAwIDEuNDE0LjAzMiAxIDEgMCAwIDAgLjAzMS0xLjQxNHpNMzYgNDEuMzE0YzAtNC44NSAzLjk0Ni04Ljc5NiA4Ljc5Ni04Ljc5NnM4Ljc5NiAzLjk0NiA4Ljc5NiA4Ljc5Ni0zLjk0NiA4Ljc5Ni04Ljc5NiA4Ljc5NlMzNiA0Ni4xNjQgMzYgNDEuMzE0ek0xMC40MzEgMTYuMDg4YzAgMy4wNyAyLjQ5OCA1LjU2OCA1LjU2OSA1LjU2OHM1LjU2OS0yLjQ5OCA1LjU2OS01LjU2OGMwLTMuMDcxLTIuNDk4LTUuNTY5LTUuNTY5LTUuNTY5cy01LjU2OSAyLjQ5OC01LjU2OSA1LjU2OXptOS4xMzggMGMwIDEuOTY4LTEuNjAyIDMuNTY4LTMuNTY5IDMuNTY4cy0zLjU2OS0xLjYwMS0zLjU2OS0zLjU2OCAxLjYwMi0zLjU2OSAzLjU2OS0zLjU2OSAzLjU2OSAxLjYwMSAzLjU2OSAzLjU2OXoiLz48cGF0aCBkPSJtMzAuODgyIDI4Ljk4NyA5LjE4LTEwLjA1NCAxMS4yNjIgMTAuMzIzYTEgMSAwIDAgMCAxLjM1MS0xLjQ3NWwtMTItMTFhMSAxIDAgMCAwLTEuNDE0LjA2M2wtOS43OTQgMTAuNzI3LTQuNzQzLTQuNzQzYTEuMDAzIDEuMDAzIDAgMCAwLTEuMzY4LS4wNDRMNi4zMzkgMzcuNzY4YTEgMSAwIDEgMCAxLjMyMiAxLjUwMWwxNi4zMTMtMTQuMzYyIDcuMzE5IDcuMzE4YS45OTkuOTk5IDAgMSAwIDEuNDE0LTEuNDE0bC0xLjgyNS0xLjgyNHoiLz48cGF0aCBkPSJNMzAgNDYuNTE4SDJ2LTQyaDU0djI4YTEgMSAwIDEgMCAyIDB2LTI5YTEgMSAwIDAgMC0xLTFIMWExIDEgMCAwIDAtMSAxdjQ0YTEgMSAwIDAgMCAxIDFoMjlhMSAxIDAgMSAwIDAtMnoiLz48L3N2Zz4=",ei=en+"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0NjAgNDYwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA0NjAgNDYwIiB4bWw6c3BhY2U9InByZXNlcnZlIj48cGF0aCBkPSJNMjMwIDBDMTAyLjk3NSAwIDAgMTAyLjk3NSAwIDIzMHMxMDIuOTc1IDIzMCAyMzAgMjMwIDIzMC0xMDIuOTc0IDIzMC0yMzBTMzU3LjAyNSAwIDIzMCAwem0zOC4zMzMgMzc3LjM2YzAgOC42NzYtNy4wMzQgMTUuNzEtMTUuNzEgMTUuNzFoLTQzLjEwMWMtOC42NzYgMC0xNS43MS03LjAzNC0xNS43MS0xNS43MVYyMDIuNDc3YzAtOC42NzYgNy4wMzMtMTUuNzEgMTUuNzEtMTUuNzFoNDMuMTAxYzguNjc2IDAgMTUuNzEgNy4wMzMgMTUuNzEgMTUuNzFWMzc3LjM2ek0yMzAgMTU3Yy0yMS41MzkgMC0zOS0xNy40NjEtMzktMzlzMTcuNDYxLTM5IDM5LTM5IDM5IDE3LjQ2MSAzOSAzOS0xNy40NjEgMzktMzkgMzl6Ii8+PC9zdmc+",ea=function(){function e(){}return e.createDefault=function(){return{hasPermission:!1,lastUsedCameraId:null}},e}(),es=function(){function e(){this.data=ea.createDefault();var t=localStorage.getItem(e.LOCAL_STORAGE_KEY);t?this.data=JSON.parse(t):this.reset()}return e.prototype.hasCameraPermissions=function(){return this.data.hasPermission},e.prototype.getLastUsedCameraId=function(){return this.data.lastUsedCameraId},e.prototype.setHasPermission=function(e){this.data.hasPermission=e,this.flush()},e.prototype.setLastUsedCameraId=function(e){this.data.lastUsedCameraId=e,this.flush()},e.prototype.resetLastUsedCameraId=function(){this.data.lastUsedCameraId=null,this.flush()},e.prototype.reset=function(){this.data=ea.createDefault(),this.flush()},e.prototype.flush=function(){localStorage.setItem(e.LOCAL_STORAGE_KEY,JSON.stringify(this.data))},e.LOCAL_STORAGE_KEY="HTML5_QRCODE_DATA",e}(),ec=function(){function e(){this.infoDiv=document.createElement("div")}return e.prototype.renderInto=function(e){this.infoDiv.style.position="absolute",this.infoDiv.style.top="10px",this.infoDiv.style.right="10px",this.infoDiv.style.zIndex="2",this.infoDiv.style.display="none",this.infoDiv.style.padding="5pt",this.infoDiv.style.border="1px solid #171717",this.infoDiv.style.fontSize="10pt",this.infoDiv.style.background="rgb(0 0 0 / 69%)",this.infoDiv.style.borderRadius="5px",this.infoDiv.style.textAlign="center",this.infoDiv.style.fontWeight="400",this.infoDiv.style.color="white",this.infoDiv.innerText=N.poweredBy();var t=document.createElement("a");t.innerText="ScanApp",t.href="https://scanapp.org",t.target="new",t.style.color="white",this.infoDiv.appendChild(t);var n=document.createElement("br"),r=document.createElement("br");this.infoDiv.appendChild(n),this.infoDiv.appendChild(r);var o=document.createElement("a");o.innerText=N.reportIssues(),o.href="https://github.com/mebjas/html5-qrcode/issues",o.target="new",o.style.color="white",this.infoDiv.appendChild(o),e.appendChild(this.infoDiv)},e.prototype.show=function(){this.infoDiv.style.display="block"},e.prototype.hide=function(){this.infoDiv.style.display="none"},e}(),eu=function(){function e(e,t){this.isShowingInfoIcon=!0,this.onTapIn=e,this.onTapOut=t,this.infoIcon=document.createElement("img")}return e.prototype.renderInto=function(e){var t=this;this.infoIcon.alt="Info icon",this.infoIcon.src=ei,this.infoIcon.style.position="absolute",this.infoIcon.style.top="4px",this.infoIcon.style.right="4px",this.infoIcon.style.opacity="0.6",this.infoIcon.style.cursor="pointer",this.infoIcon.style.zIndex="2",this.infoIcon.style.width="16px",this.infoIcon.style.height="16px",this.infoIcon.onmouseover=function(e){return t.onHoverIn()},this.infoIcon.onmouseout=function(e){return t.onHoverOut()},this.infoIcon.onclick=function(e){return t.onClick()},e.appendChild(this.infoIcon)},e.prototype.onHoverIn=function(){this.isShowingInfoIcon&&(this.infoIcon.style.opacity="1")},e.prototype.onHoverOut=function(){this.isShowingInfoIcon&&(this.infoIcon.style.opacity="0.6")},e.prototype.onClick=function(){this.isShowingInfoIcon?(this.isShowingInfoIcon=!1,this.onTapIn(),this.infoIcon.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAAQgAAAEIBarqQRAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAE1SURBVDiNfdI7S0NBEAXgLya1otFgpbYSbISAgpXYi6CmiH9KCAiChaVga6OiWPgfRDQ+0itaGVNosXtluWwcuMzePfM4M3sq8lbHBubwg1dc4m1E/J/N4ghDPOIsfk/4xiEao5KX0McFljN4C9d4QTPXuY99jP3DsIoDPGM6BY5i5yI5R7O4q+ImFkJY2DCh3cAH2klyB+9J1xUMMAG7eCh1a+Mr+k48b5diXrFVwwLuS+BJ9MfR7+G0FHOHhTHhnXNWS87VDF4pcnfQK4Ep7XScNLmPTZgURNKKYENYWDpzW1BhscS1WHS8CDgURFJQrWcoF3c13KKbgg1BYQfy8xZWEzTTw1QZbAoKu8FqJnktdu5hcVSHmchiILzzuaDQvjBzV2m8yohCE1jHfPx/xhU+y4G/D75ELlRJsSYAAAAASUVORK5CYII=",this.infoIcon.style.opacity="1"):(this.isShowingInfoIcon=!0,this.onTapOut(),this.infoIcon.src=ei,this.infoIcon.style.opacity="0.6")},e}(),el=function(){function e(){var e=this;this.infoDiv=new ec,this.infoIcon=new eu(function(){e.infoDiv.show()},function(){e.infoDiv.hide()})}return e.prototype.renderInto=function(e){this.infoDiv.renderInto(e),this.infoIcon.renderInto(e)},e}(),eh=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(c){return function(s){if(n)throw TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]1},e.prototype.isCameraScanRequired=function(){for(var t=0,n=this.supportedScanTypes;tt)throw"Max ".concat(t," values expected for ")+"supportedScanTypes";for(var n=0;n0&&o[o.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]20){var t=e.substring(0,8),n=e.length,r=e.substring(n-8,n);e="".concat(t,"....").concat(r)}var o=D.fileSelectionChooseAnother()+" - "+e;this.fileSelectionButton.innerText=o},e.prototype.setInitialValueToButton=function(){var e=D.fileSelectionChooseImage()+" - "+D.fileSelectionNoImageSelected();this.fileSelectionButton.innerText=e},e.prototype.getFileScanInputId=function(){return"html5-qrcode-private-filescan-input"},e.create=function(t,n,r){return new e(t,n,r)},e}(),eC=function(){function e(e){this.selectElement=eg.createElement("select",ef.CAMERA_SELECTION_SELECT_ID),this.cameras=e,this.options=[]}return e.prototype.render=function(e){var t=document.createElement("span");t.style.marginRight="10px";var n=this.cameras.length;if(0===n)throw Error("No cameras found");if(1===n)t.style.display="none";else{var r=D.selectCamera();t.innerText="".concat(r," (").concat(this.cameras.length,") ")}for(var o=1,i=0,a=this.cameras;i0?(e.removeChild(t),r.renderCameraSelection(n)):(r.setHeaderMessage(D.noCameraFound(),y.STATUS_WARNING),o())}).catch(function(e){r.persistedDataManager.setHasPermission(!1),n?n.disabled=!1:o(),r.setHeaderMessage(e,y.STATUS_WARNING),r.showHideScanTypeSwapLink(!0)})},e.prototype.createPermissionButton=function(e,t){var n=this,r=eg.createElement("button",this.getCameraPermissionButtonId());r.innerText=D.cameraPermissionTitle(),r.addEventListener("click",function(){r.disabled=!0,n.createCameraListUi(e,t,r)}),t.appendChild(r)},e.prototype.createPermissionsUi=function(e,t){var n=this;if(ep.isCameraScanType(this.currentScanType)&&this.persistedDataManager.hasCameraPermissions()){ed.hasPermissions().then(function(r){r?n.createCameraListUi(e,t):(n.persistedDataManager.setHasPermission(!1),n.createPermissionButton(e,t))}).catch(function(r){n.persistedDataManager.setHasPermission(!1),n.createPermissionButton(e,t)});return}this.createPermissionButton(e,t)},e.prototype.createSectionControlPanel=function(){var e=document.getElementById(this.getDashboardSectionId()),t=document.createElement("div");e.appendChild(t);var n=document.createElement("div");n.id=this.getDashboardSectionCameraScanRegionId(),n.style.display=ep.isCameraScanType(this.currentScanType)?"block":"none",t.appendChild(n);var r=document.createElement("div");r.style.textAlign="center",n.appendChild(r),this.scanTypeSelector.isCameraScanRequired()&&this.createPermissionsUi(n,r),this.renderFileScanUi(t)},e.prototype.renderFileScanUi=function(e){var t=ep.isFileScanType(this.currentScanType),n=this;this.fileSelectionUi=eM.create(e,t,function(e){if(!n.html5Qrcode)throw"html5Qrcode not defined";ep.isFileScanType(n.currentScanType)&&(n.setHeaderMessage(D.loadingImage()),n.html5Qrcode.scanFileV2(e,!0).then(function(e){n.resetHeaderMessage(),n.qrCodeSuccessCallback(e.decodedText,e)}).catch(function(e){n.setHeaderMessage(e,y.STATUS_WARNING),n.qrCodeErrorCallback(e,C.createFrom(e))}))})},e.prototype.renderCameraSelection=function(e){var t,n=this,r=this,o=document.getElementById(this.getDashboardSectionCameraScanRegionId());o.style.textAlign="center";var i=eE.create(o,!1),a=function(e){var t,r,o,a=e.zoomFeature();if(a.isSupported()){i.setOnCameraZoomValueChangeCallback(function(e){a.apply(e)});var s=1;n.config.defaultZoomValueIfSupported&&(s=n.config.defaultZoomValueIfSupported),t=s,r=a.min(),s=t>(o=a.max())?o:t",t.appendChild(this.cameraScanImage);return}this.cameraScanImage=new Image,this.cameraScanImage.onload=function(n){t.innerHTML="
",t.appendChild(e.cameraScanImage)},this.cameraScanImage.width=64,this.cameraScanImage.style.opacity="0.8",this.cameraScanImage.src=er,this.cameraScanImage.alt=D.cameraScanAltText()},e.prototype.insertFileScanImageToScanRegion=function(){var e=this,t=document.getElementById(this.getScanRegionId());if(this.fileScanImage){t.innerHTML="
",t.appendChild(this.fileScanImage);return}this.fileScanImage=new Image,this.fileScanImage.onload=function(n){t.innerHTML="
",t.appendChild(e.fileScanImage)},this.fileScanImage.width=64,this.fileScanImage.style.opacity="0.8",this.fileScanImage.src=eo,this.fileScanImage.alt=D.fileScanAltText()},e.prototype.clearScanRegion=function(){document.getElementById(this.getScanRegionId()).innerHTML=""},e.prototype.getDashboardSectionId=function(){return"".concat(this.elementId,"__dashboard_section")},e.prototype.getDashboardSectionCameraScanRegionId=function(){return"".concat(this.elementId,"__dashboard_section_csr")},e.prototype.getDashboardSectionSwapLinkId=function(){return ef.SCAN_TYPE_CHANGE_ANCHOR_ID},e.prototype.getScanRegionId=function(){return"".concat(this.elementId,"__scan_region")},e.prototype.getDashboardId=function(){return"".concat(this.elementId,"__dashboard")},e.prototype.getHeaderMessageContainerId=function(){return"".concat(this.elementId,"__header_message")},e.prototype.getCameraPermissionButtonId=function(){return ef.CAMERA_PERMISSION_BUTTON_ID},e.prototype.getCameraScanRegion=function(){return document.getElementById(this.getDashboardSectionCameraScanRegionId())},e.prototype.getDashboardSectionSwapLink=function(){return document.getElementById(this.getDashboardSectionSwapLinkId())},e.prototype.getHeaderMessageDiv=function(){return document.getElementById(this.getHeaderMessageContainerId())},e}()},93637:function(e,t,n){n.d(t,{E:function(){return i}});var r=n(10052),o=n(4012);function i(e,t){if(!(0,o.U)(e,{strict:!1}))throw new r.b({address:e});if(!(0,o.U)(t,{strict:!1}))throw new r.b({address:t});return e.toLowerCase()===t.toLowerCase()}},15566:function(e,t,n){n.d(t,{r:function(){return s}});var r=n(13169),o=n(89256),i=n(20556),a=n(59455);function s(e,t){return(0,r.w)(function(e){let t="string"==typeof e?(0,a.$G)(e):"string"==typeof e.raw?e.raw:(0,a.ci)(e.raw),n=(0,a.$G)(`\x19Ethereum Signed Message: +${(0,i.d)(t)}`);return(0,o.zo)([n,t])}(e),t)}},48790:function(e,t,n){n.d(t,{n:function(){return c}});var r=n(31669),o=n(93637),i=n(15566),a=n(69021);async function s({message:e,signature:t}){return(0,a.R)({hash:(0,i.r)(e),signature:t})}async function c({address:e,message:t,signature:n}){return(0,o.E)((0,r.K)(e),await s({message:t,signature:n}))}}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/7759.b32ff100e61b9e4e.js b/frontend/.next/static/chunks/7759.b32ff100e61b9e4e.js new file mode 100644 index 0000000..5cdbc57 --- /dev/null +++ b/frontend/.next/static/chunks/7759.b32ff100e61b9e4e.js @@ -0,0 +1,14 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7759],{37759:function(a,t,e){e.r(t),e.d(t,{PhSpinner:function(){return p}}),e(31498);var r=e(38157),Z=e(48567),l=e(54910),i=e(69709),h=e(78313),o=Object.defineProperty,M=Object.getOwnPropertyDescriptor,s=(a,t,e,r)=>{for(var Z,l=r>1?void 0:r?M(t,e):t,i=a.length-1;i>=0;i--)(Z=a[i])&&(l=(r?Z(t,e,l):Z(l))||l);return r&&l&&o(t,e,l),l};let p=class extends Z.oi{constructor(){super(...arguments),this.size="1em",this.weight="regular",this.color="currentColor",this.mirrored=!1}render(){var a;return(0,r.dy)` + ${p.weightsMap.get(null!=(a=this.weight)?a:"regular")} + `}};p.weightsMap=new Map([["thin",(0,r.YP)``],["light",(0,r.YP)``],["regular",(0,r.YP)``],["bold",(0,r.YP)``],["fill",(0,r.YP)``],["duotone",(0,r.YP)``]]),p.styles=(0,h.iv)` + :host { + display: contents; + } + `,s([(0,i.C)({type:String,reflect:!0})],p.prototype,"size",2),s([(0,i.C)({type:String,reflect:!0})],p.prototype,"weight",2),s([(0,i.C)({type:String,reflect:!0})],p.prototype,"color",2),s([(0,i.C)({type:Boolean,reflect:!0})],p.prototype,"mirrored",2),p=s([(0,l.M)("ph-spinner")],p)}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/7767.0aafbc22bca88e17.js b/frontend/.next/static/chunks/7767.0aafbc22bca88e17.js new file mode 100644 index 0000000..5362df5 --- /dev/null +++ b/frontend/.next/static/chunks/7767.0aafbc22bca88e17.js @@ -0,0 +1,997 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7767],{27767:function(e,t,o){o.r(t),o.d(t,{AppKitModal:function(){return es},W3mListWallet:function(){return eh},W3mModal:function(){return en},W3mModalBase:function(){return ea},W3mRouterContainer:function(){return em},W3mUsageExceededView:function(){return ec}});var r=o(31133),i=o(84927),a=o(32801),n=o(5688),s=o(89512),l=o(6943),c=o(35652),d=o(17766),u=o(86777),p=o(64369),h=o(60389);let b={isUnsupportedChainView:()=>"UnsupportedChain"===u.RouterController.state.view||"SwitchNetwork"===u.RouterController.state.view&&u.RouterController.state.history.includes("UnsupportedChain"),async safeClose(){if(this.isUnsupportedChainView()||await h.w.isSIWXCloseDisabled()){s.I.shake();return}("DataCapture"===u.RouterController.state.view||"DataCaptureOtpConfirm"===u.RouterController.state.view)&&p.ConnectionController.disconnect(),s.I.close()}};var w=o(52005),m=o(66909),g=o(41272),f=o(92413),y=o(84249),v=o(57116),x=o(11131),k=(0,x.iv)` + :host { + display: block; + border-radius: clamp(0px, ${({borderRadius:e})=>e["8"]}, 44px); + box-shadow: 0 0 0 1px ${({tokens:e})=>e.theme.foregroundPrimary}; + overflow: hidden; + } +`;let C=class extends r.oi{render(){return(0,r.dy)``}};C.styles=[y.ET,k],C=function(e,t,o,r){var i,a=arguments.length,n=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,o,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(n=(a<3?i(n):a>3?i(t,o,n):i(t,o))||n);return a>3&&n&&Object.defineProperty(t,o,n),n}([(0,v.M)("wui-card")],C),o(96277);var $=o(72723);o(74975),o(18360),o(5680);var S=(0,x.iv)` + :host { + width: 100%; + } + + :host > wui-flex { + width: 100%; + display: flex; + align-items: center; + justify-content: center; + gap: ${({spacing:e})=>e[2]}; + padding: ${({spacing:e})=>e[3]}; + border-radius: ${({borderRadius:e})=>e[6]}; + border: 1px solid ${({tokens:e})=>e.theme.borderPrimary}; + box-sizing: border-box; + background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; + box-shadow: 0px 0px 16px 0px rgba(0, 0, 0, 0.25); + color: ${({tokens:e})=>e.theme.textPrimary}; + } + + :host > wui-flex[data-type='info'] { + .icon-box { + background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; + + wui-icon { + color: ${({tokens:e})=>e.theme.iconDefault}; + } + } + } + :host > wui-flex[data-type='success'] { + .icon-box { + background-color: ${({tokens:e})=>e.core.backgroundSuccess}; + + wui-icon { + color: ${({tokens:e})=>e.core.borderSuccess}; + } + } + } + :host > wui-flex[data-type='warning'] { + .icon-box { + background-color: ${({tokens:e})=>e.core.backgroundWarning}; + + wui-icon { + color: ${({tokens:e})=>e.core.borderWarning}; + } + } + } + :host > wui-flex[data-type='error'] { + .icon-box { + background-color: ${({tokens:e})=>e.core.backgroundError}; + + wui-icon { + color: ${({tokens:e})=>e.core.borderError}; + } + } + } + + wui-flex { + width: 100%; + } + + wui-text { + word-break: break-word; + flex: 1; + } + + .close { + cursor: pointer; + color: ${({tokens:e})=>e.theme.iconDefault}; + } + + .icon-box { + height: 40px; + width: 40px; + border-radius: ${({borderRadius:e})=>e["2"]}; + background-color: var(--local-icon-bg-value); + } +`,R=function(e,t,o,r){var i,a=arguments.length,n=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,o,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(n=(a<3?i(n):a>3?i(t,o,n):i(t,o))||n);return a>3&&n&&Object.defineProperty(t,o,n),n};let I={info:"info",success:"checkmark",warning:"warningCircle",error:"warning"},O=class extends r.oi{constructor(){super(...arguments),this.message="",this.type="info"}render(){return(0,r.dy)` + + + + + + ${this.message} + + + + `}onClose(){$.AlertController.close()}};O.styles=[y.ET,S],R([(0,i.Cb)()],O.prototype,"message",void 0),R([(0,i.Cb)()],O.prototype,"type",void 0),O=R([(0,v.M)("wui-alertbar")],O);var P=(0,f.iv)` + :host { + display: block; + position: absolute; + top: ${({spacing:e})=>e["3"]}; + left: ${({spacing:e})=>e["4"]}; + right: ${({spacing:e})=>e["4"]}; + opacity: 0; + pointer-events: none; + } +`,W=function(e,t,o,r){var i,a=arguments.length,n=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,o,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(n=(a<3?i(n):a>3?i(t,o,n):i(t,o))||n);return a>3&&n&&Object.defineProperty(t,o,n),n};let z={info:{backgroundColor:"fg-350",iconColor:"fg-325",icon:"info"},success:{backgroundColor:"success-glass-reown-020",iconColor:"success-125",icon:"checkmark"},warning:{backgroundColor:"warning-glass-reown-020",iconColor:"warning-100",icon:"warningCircle"},error:{backgroundColor:"error-glass-reown-020",iconColor:"error-125",icon:"warning"}},A=class extends r.oi{constructor(){super(),this.unsubscribe=[],this.open=$.AlertController.state.open,this.onOpen(!0),this.unsubscribe.push($.AlertController.subscribeKey("open",e=>{this.open=e,this.onOpen(!1)}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){let{message:e,variant:t}=$.AlertController.state,o=z[t];return(0,r.dy)` + + `}onOpen(e){this.open?(this.animate([{opacity:0,transform:"scale(0.85)"},{opacity:1,transform:"scale(1)"}],{duration:150,fill:"forwards",easing:"ease"}),this.style.cssText="pointer-events: auto"):e||(this.animate([{opacity:1,transform:"scale(1)"},{opacity:0,transform:"scale(0.85)"}],{duration:150,fill:"forwards",easing:"ease"}),this.style.cssText="pointer-events: none")}};A.styles=P,W([(0,i.SB)()],A.prototype,"open",void 0),A=W([(0,f.Mo)("w3m-alertbar")],A);var E=o(63043),N=o(22472),B=o(31929);o(65451),o(23805);var T=(0,x.iv)` + button { + display: block; + display: flex; + align-items: center; + padding: ${({spacing:e})=>e[1]}; + transition: background-color ${({durations:e})=>e.lg} + ${({easings:e})=>e["ease-out-power-2"]}; + will-change: background-color; + border-radius: ${({borderRadius:e})=>e[32]}; + } + + wui-image { + border-radius: 100%; + } + + wui-text { + padding-left: ${({spacing:e})=>e[1]}; + } + + .left-icon-container, + .right-icon-container { + width: 24px; + height: 24px; + justify-content: center; + align-items: center; + } + + wui-icon { + color: ${({tokens:e})=>e.theme.iconDefault}; + } + + /* -- Sizes --------------------------------------------------- */ + button[data-size='lg'] { + height: 32px; + } + + button[data-size='md'] { + height: 28px; + } + + button[data-size='sm'] { + height: 24px; + } + + button[data-size='lg'] wui-image { + width: 24px; + height: 24px; + } + + button[data-size='md'] wui-image { + width: 20px; + height: 20px; + } + + button[data-size='sm'] wui-image { + width: 16px; + height: 16px; + } + + button[data-size='lg'] .left-icon-container { + width: 24px; + height: 24px; + } + + button[data-size='md'] .left-icon-container { + width: 20px; + height: 20px; + } + + button[data-size='sm'] .left-icon-container { + width: 16px; + height: 16px; + } + + /* -- Variants --------------------------------------------------------- */ + button[data-type='filled-dropdown'] { + background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; + } + + button[data-type='text-dropdown'] { + background-color: transparent; + } + + /* -- Focus states --------------------------------------------------- */ + button:focus-visible:enabled { + background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; + box-shadow: 0 0 0 4px ${({tokens:e})=>e.core.foregroundAccent040}; + } + + /* -- Hover & Active states ----------------------------------------------------------- */ + @media (hover: hover) and (pointer: fine) { + button:hover:enabled, + button:active:enabled { + background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; + } + } + + /* -- Disabled states --------------------------------------------------- */ + button:disabled { + background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; + opacity: 0.5; + } +`,D=function(e,t,o,r){var i,a=arguments.length,n=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,o,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(n=(a<3?i(n):a>3?i(t,o,n):i(t,o))||n);return a>3&&n&&Object.defineProperty(t,o,n),n};let j={lg:"lg-regular",md:"md-regular",sm:"sm-regular"},H={lg:"lg",md:"md",sm:"sm"},L=class extends r.oi{constructor(){super(...arguments),this.imageSrc="",this.text="",this.size="lg",this.type="text-dropdown",this.disabled=!1}render(){return(0,r.dy)``}textTemplate(){let e=j[this.size];return this.text?(0,r.dy)`${this.text}`:null}imageTemplate(){if(this.imageSrc)return(0,r.dy)``;let e=H[this.size];return(0,r.dy)` + + `}};L.styles=[y.ET,y.ZM,T],D([(0,i.Cb)()],L.prototype,"imageSrc",void 0),D([(0,i.Cb)()],L.prototype,"text",void 0),D([(0,i.Cb)()],L.prototype,"size",void 0),D([(0,i.Cb)()],L.prototype,"type",void 0),D([(0,i.Cb)({type:Boolean})],L.prototype,"disabled",void 0),L=D([(0,v.M)("wui-select")],L),o(60830),o(44732);var F=o(54946),V=(0,f.iv)` + :host { + height: 60px; + } + + :host > wui-flex { + box-sizing: border-box; + background-color: var(--local-header-background-color); + } + + wui-text { + background-color: var(--local-header-background-color); + } + + wui-flex.w3m-header-title { + transform: translateY(0); + opacity: 1; + } + + wui-flex.w3m-header-title[view-direction='prev'] { + animation: + slide-down-out 120ms forwards ${({easings:e})=>e["ease-out-power-2"]}, + slide-down-in 120ms forwards ${({easings:e})=>e["ease-out-power-2"]}; + animation-delay: 0ms, 200ms; + } + + wui-flex.w3m-header-title[view-direction='next'] { + animation: + slide-up-out 120ms forwards ${({easings:e})=>e["ease-out-power-2"]}, + slide-up-in 120ms forwards ${({easings:e})=>e["ease-out-power-2"]}; + animation-delay: 0ms, 200ms; + } + + wui-icon-button[data-hidden='true'] { + opacity: 0 !important; + pointer-events: none; + } + + @keyframes slide-up-out { + from { + transform: translateY(0px); + opacity: 1; + } + to { + transform: translateY(3px); + opacity: 0; + } + } + + @keyframes slide-up-in { + from { + transform: translateY(-3px); + opacity: 0; + } + to { + transform: translateY(0); + opacity: 1; + } + } + + @keyframes slide-down-out { + from { + transform: translateY(0px); + opacity: 1; + } + to { + transform: translateY(-3px); + opacity: 0; + } + } + + @keyframes slide-down-in { + from { + transform: translateY(3px); + opacity: 0; + } + to { + transform: translateY(0); + opacity: 1; + } + } +`,M=function(e,t,o,r){var i,a=arguments.length,n=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,o,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(n=(a<3?i(n):a>3?i(t,o,n):i(t,o))||n);return a>3&&n&&Object.defineProperty(t,o,n),n};let U=["SmartSessionList"],K={PayWithExchange:f.gR.tokens.theme.foregroundPrimary};function X(){let e=u.RouterController.state.data?.connector?.name,t=u.RouterController.state.data?.wallet?.name,o=u.RouterController.state.data?.network?.name,r=t??e,i=c.ConnectorController.getConnectors(),a=1===i.length&&i[0]?.id==="w3m-email",n=l.R.getAccountData()?.socialProvider;return{Connect:`Connect ${a?"Email":""} Wallet`,Create:"Create Wallet",ChooseAccountName:void 0,Account:void 0,AccountSettings:void 0,AllWallets:"All Wallets",ApproveTransaction:"Approve Transaction",BuyInProgress:"Buy",UsageExceeded:"Usage Exceeded",ConnectingExternal:r??"Connect Wallet",ConnectingWalletConnect:r??"WalletConnect",ConnectingWalletConnectBasic:"WalletConnect",ConnectingSiwe:"Sign In",Convert:"Convert",ConvertSelectToken:"Select token",ConvertPreview:"Preview Convert",Downloads:r?`Get ${r}`:"Downloads",EmailLogin:"Email Login",EmailVerifyOtp:"Confirm Email",EmailVerifyDevice:"Register Device",GetWallet:"Get a Wallet",Networks:"Choose Network",OnRampProviders:"Choose Provider",OnRampActivity:"Activity",OnRampTokenSelect:"Select Token",OnRampFiatSelect:"Select Currency",Pay:"How you pay",ProfileWallets:"Wallets",SwitchNetwork:o??"Switch Network",Transactions:"Activity",UnsupportedChain:"Switch Network",UpgradeEmailWallet:"Upgrade Your Wallet",UpdateEmailWallet:"Edit Email",UpdateEmailPrimaryOtp:"Confirm Current Email",UpdateEmailSecondaryOtp:"Confirm New Email",WhatIsABuy:"What is Buy?",RegisterAccountName:"Choose Name",RegisterAccountNameSuccess:"",WalletReceive:"Receive",WalletCompatibleNetworks:"Compatible Networks",Swap:"Swap",SwapSelectToken:"Select Token",SwapPreview:"Preview Swap",WalletSend:"Send",WalletSendPreview:"Review Send",WalletSendSelectToken:"Select Token",WalletSendConfirmed:"Confirmed",WhatIsANetwork:"What is a network?",WhatIsAWallet:"What is a Wallet?",ConnectWallets:"Connect Wallet",ConnectSocials:"All Socials",ConnectingSocial:n?n.charAt(0).toUpperCase()+n.slice(1):"Connect Social",ConnectingMultiChain:"Select Chain",ConnectingFarcaster:"Farcaster",SwitchActiveChain:"Switch Chain",SmartSessionCreated:void 0,SmartSessionList:"Smart Sessions",SIWXSignMessage:"Sign In",PayLoading:"Payment in Progress",DataCapture:"Profile",DataCaptureOtpConfirm:"Confirm Email",FundWallet:"Fund Wallet",PayWithExchange:"Deposit from Exchange",PayWithExchangeSelectAsset:"Select Asset",SmartAccountSettings:"Smart Account Settings"}}let Y=class extends r.oi{constructor(){super(),this.unsubscribe=[],this.heading=X()[u.RouterController.state.view],this.network=l.R.state.activeCaipNetwork,this.networkImage=E.f.getNetworkImage(this.network),this.showBack=!1,this.prevHistoryLength=1,this.view=u.RouterController.state.view,this.viewDirection="",this.unsubscribe.push(N.W.subscribeNetworkImages(()=>{this.networkImage=E.f.getNetworkImage(this.network)}),u.RouterController.subscribeKey("view",e=>{setTimeout(()=>{this.view=e,this.heading=X()[e]},F.b.ANIMATION_DURATIONS.HeaderText),this.onViewChange(),this.onHistoryChange()}),l.R.subscribeKey("activeCaipNetwork",e=>{this.network=e,this.networkImage=E.f.getNetworkImage(this.network)}))}disconnectCallback(){this.unsubscribe.forEach(e=>e())}render(){let e=K[u.RouterController.state.view]??f.gR.tokens.theme.backgroundPrimary;return this.style.setProperty("--local-header-background-color",e),(0,r.dy)` + + ${this.leftHeaderTemplate()} ${this.titleTemplate()} ${this.rightHeaderTemplate()} + + `}onWalletHelp(){B.X.sendEvent({type:"track",event:"CLICK_WALLET_HELP"}),u.RouterController.push("WhatIsAWallet")}async onClose(){await b.safeClose()}rightHeaderTemplate(){let e=n.OptionsController?.state?.features?.smartSessions;return"Account"===u.RouterController.state.view&&e?(0,r.dy)` + u.RouterController.push("SmartSessionList")} + data-testid="w3m-header-smart-sessions" + > + ${this.closeButtonTemplate()} + `:this.closeButtonTemplate()}closeButtonTemplate(){return(0,r.dy)` + + `}titleTemplate(){let e=U.includes(this.view);return(0,r.dy)` + + + ${this.heading} + + ${e?(0,r.dy)`Beta`:null} + + `}leftHeaderTemplate(){let{view:e}=u.RouterController.state,t="Connect"===e,o=n.OptionsController.state.enableEmbedded,i=n.OptionsController.state.enableNetworkSwitch;return"Account"===e&&i?(0,r.dy)``:this.showBack&&!("ApproveTransaction"===e||"ConnectingSiwe"===e||t&&o)?(0,r.dy)``:(0,r.dy)``}onNetworks(){this.isAllowedNetworkSwitch()&&(B.X.sendEvent({type:"track",event:"CLICK_NETWORKS"}),u.RouterController.push("Networks"))}isAllowedNetworkSwitch(){let e=l.R.getAllRequestedCaipNetworks(),t=!!e&&e.length>1,o=e?.find(({id:e})=>e===this.network?.id);return t||!o}onViewChange(){let{history:e}=u.RouterController.state,t=F.b.VIEW_DIRECTION.Next;e.length1&&!this.showBack&&t?(await t.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.showBack=!0,t.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"})):e.length<=1&&this.showBack&&t&&(await t.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.showBack=!1,t.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"}))}onGoBack(){u.RouterController.goBack()}};Y.styles=V,M([(0,i.SB)()],Y.prototype,"heading",void 0),M([(0,i.SB)()],Y.prototype,"network",void 0),M([(0,i.SB)()],Y.prototype,"networkImage",void 0),M([(0,i.SB)()],Y.prototype,"showBack",void 0),M([(0,i.SB)()],Y.prototype,"prevHistoryLength",void 0),M([(0,i.SB)()],Y.prototype,"view",void 0),M([(0,i.SB)()],Y.prototype,"viewDirection",void 0),Y=M([(0,f.Mo)("w3m-header")],Y),o(21793),o(1736);var _=(0,x.iv)` + :host { + display: flex; + align-items: center; + gap: ${({spacing:e})=>e[1]}; + padding: ${({spacing:e})=>e[2]} ${({spacing:e})=>e[3]} + ${({spacing:e})=>e[2]} ${({spacing:e})=>e[2]}; + border-radius: ${({borderRadius:e})=>e[20]}; + background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; + box-shadow: + 0px 0px 8px 0px rgba(0, 0, 0, 0.1), + inset 0 0 0 1px ${({tokens:e})=>e.theme.borderPrimary}; + max-width: 320px; + } + + wui-icon-box { + border-radius: ${({borderRadius:e})=>e.round} !important; + overflow: hidden; + } + + wui-loading-spinner { + padding: ${({spacing:e})=>e[1]}; + background-color: ${({tokens:e})=>e.core.foregroundAccent010}; + border-radius: ${({borderRadius:e})=>e.round} !important; + } +`,G=function(e,t,o,r){var i,a=arguments.length,n=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,o,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(n=(a<3?i(n):a>3?i(t,o,n):i(t,o))||n);return a>3&&n&&Object.defineProperty(t,o,n),n};let q=class extends r.oi{constructor(){super(...arguments),this.message="",this.variant="success"}render(){return(0,r.dy)` + ${this.templateIcon()} + ${this.message} + `}templateIcon(){return"loading"===this.variant?(0,r.dy)``:(0,r.dy)``}};q.styles=[y.ET,_],G([(0,i.Cb)()],q.prototype,"message",void 0),G([(0,i.Cb)()],q.prototype,"variant",void 0),q=G([(0,v.M)("wui-snackbar")],q);var Z=(0,r.iv)` + :host { + display: block; + position: absolute; + opacity: 0; + pointer-events: none; + top: 11px; + left: 50%; + width: max-content; + } +`,J=function(e,t,o,r){var i,a=arguments.length,n=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,o,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(n=(a<3?i(n):a>3?i(t,o,n):i(t,o))||n);return a>3&&n&&Object.defineProperty(t,o,n),n};let Q=class extends r.oi{constructor(){super(),this.unsubscribe=[],this.timeout=void 0,this.open=m.SnackController.state.open,this.unsubscribe.push(m.SnackController.subscribeKey("open",e=>{this.open=e,this.onOpen()}))}disconnectedCallback(){clearTimeout(this.timeout),this.unsubscribe.forEach(e=>e())}render(){let{message:e,variant:t}=m.SnackController.state;return(0,r.dy)` `}onOpen(){clearTimeout(this.timeout),this.open?(this.animate([{opacity:0,transform:"translateX(-50%) scale(0.85)"},{opacity:1,transform:"translateX(-50%) scale(1)"}],{duration:150,fill:"forwards",easing:"ease"}),this.timeout&&clearTimeout(this.timeout),m.SnackController.state.autoClose&&(this.timeout=setTimeout(()=>m.SnackController.hide(),2500))):this.animate([{opacity:1,transform:"translateX(-50%) scale(1)"},{opacity:0,transform:"translateX(-50%) scale(0.85)"}],{duration:150,fill:"forwards",easing:"ease"})}};Q.styles=Z,J([(0,i.SB)()],Q.prototype,"open",void 0),Q=J([(0,f.Mo)("w3m-snackbar")],Q),o(92815);var ee=o(34252);o(62942),o(77770);var et=(0,f.iv)` + :host { + z-index: ${({tokens:e})=>e.core.zIndex}; + display: block; + backface-visibility: hidden; + will-change: opacity; + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + pointer-events: none; + opacity: 0; + background-color: ${({tokens:e})=>e.theme.overlay}; + backdrop-filter: blur(0px); + transition: + opacity ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]}, + backdrop-filter ${({durations:e})=>e.lg} + ${({easings:e})=>e["ease-out-power-2"]}; + will-change: opacity; + } + + :host(.open) { + opacity: 1; + backdrop-filter: blur(8px); + } + + :host(.appkit-modal) { + position: relative; + pointer-events: unset; + background: none; + width: 100%; + opacity: 1; + } + + wui-card { + max-width: var(--apkt-modal-width); + width: 100%; + position: relative; + outline: none; + transform: translateY(4px); + box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.05); + transition: + transform ${({durations:e})=>e.lg} + ${({easings:e})=>e["ease-out-power-2"]}, + border-radius ${({durations:e})=>e.lg} + ${({easings:e})=>e["ease-out-power-1"]}, + background-color ${({durations:e})=>e.lg} + ${({easings:e})=>e["ease-out-power-1"]}, + box-shadow ${({durations:e})=>e.lg} + ${({easings:e})=>e["ease-out-power-1"]}; + will-change: border-radius, background-color, transform, box-shadow; + background-color: ${({tokens:e})=>e.theme.backgroundPrimary}; + padding: var(--local-modal-padding); + box-sizing: border-box; + } + + :host(.open) wui-card { + transform: translateY(0px); + } + + wui-card::before { + z-index: 1; + pointer-events: none; + content: ''; + position: absolute; + inset: 0; + border-radius: clamp(0px, var(--apkt-borderRadius-8), 44px); + transition: box-shadow ${({durations:e})=>e.lg} + ${({easings:e})=>e["ease-out-power-2"]}; + transition-delay: ${({durations:e})=>e.md}; + will-change: box-shadow; + } + + :host([data-mobile-fullscreen='true']) wui-card::before { + border-radius: 0px; + } + + :host([data-border='true']) wui-card::before { + box-shadow: inset 0px 0px 0px 4px ${({tokens:e})=>e.theme.foregroundSecondary}; + } + + :host([data-border='false']) wui-card::before { + box-shadow: inset 0px 0px 0px 1px ${({tokens:e})=>e.theme.borderPrimaryDark}; + } + + :host([data-border='true']) wui-card { + animation: + fade-in ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]}, + card-background-border var(--apkt-duration-dynamic) + ${({easings:e})=>e["ease-out-power-2"]}; + animation-fill-mode: backwards, both; + animation-delay: var(--apkt-duration-dynamic); + } + + :host([data-border='false']) wui-card { + animation: + fade-in ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]}, + card-background-default var(--apkt-duration-dynamic) + ${({easings:e})=>e["ease-out-power-2"]}; + animation-fill-mode: backwards, both; + animation-delay: 0s; + } + + :host(.appkit-modal) wui-card { + max-width: var(--apkt-modal-width); + } + + wui-card[shake='true'] { + animation: + fade-in ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]}, + w3m-shake ${({durations:e})=>e.xl} + ${({easings:e})=>e["ease-out-power-2"]}; + } + + wui-flex { + overflow-x: hidden; + overflow-y: auto; + display: flex; + align-items: center; + justify-content: center; + width: 100%; + height: 100%; + } + + @media (max-height: 700px) and (min-width: 431px) { + wui-flex { + align-items: flex-start; + } + + wui-card { + margin: var(--apkt-spacing-6) 0px; + } + } + + @media (max-width: 430px) { + :host([data-mobile-fullscreen='true']) { + height: 100dvh; + } + :host([data-mobile-fullscreen='true']) wui-flex { + align-items: stretch; + } + :host([data-mobile-fullscreen='true']) wui-card { + max-width: 100%; + height: 100%; + border-radius: 0; + border: none; + } + :host(:not([data-mobile-fullscreen='true'])) wui-flex { + align-items: flex-end; + } + + :host(:not([data-mobile-fullscreen='true'])) wui-card { + max-width: 100%; + border-bottom: none; + } + + :host(:not([data-mobile-fullscreen='true'])) wui-card[data-embedded='true'] { + border-bottom-left-radius: clamp(0px, var(--apkt-borderRadius-8), 44px); + border-bottom-right-radius: clamp(0px, var(--apkt-borderRadius-8), 44px); + } + + :host(:not([data-mobile-fullscreen='true'])) wui-card:not([data-embedded='true']) { + border-bottom-left-radius: 0px; + border-bottom-right-radius: 0px; + } + + wui-card[shake='true'] { + animation: w3m-shake 0.5s ${({easings:e})=>e["ease-out-power-2"]}; + } + } + + @keyframes fade-in { + 0% { + transform: scale(0.99) translateY(4px); + } + 100% { + transform: scale(1) translateY(0); + } + } + + @keyframes w3m-shake { + 0% { + transform: scale(1) rotate(0deg); + } + 20% { + transform: scale(1) rotate(-1deg); + } + 40% { + transform: scale(1) rotate(1.5deg); + } + 60% { + transform: scale(1) rotate(-1.5deg); + } + 80% { + transform: scale(1) rotate(1deg); + } + 100% { + transform: scale(1) rotate(0deg); + } + } + + @keyframes card-background-border { + from { + background-color: ${({tokens:e})=>e.theme.backgroundPrimary}; + } + to { + background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; + } + } + + @keyframes card-background-default { + from { + background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; + } + to { + background-color: ${({tokens:e})=>e.theme.backgroundPrimary}; + } + } +`,eo=function(e,t,o,r){var i,a=arguments.length,n=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,o,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(n=(a<3?i(n):a>3?i(t,o,n):i(t,o))||n);return a>3&&n&&Object.defineProperty(t,o,n),n};let er="scroll-lock",ei={PayWithExchange:"0",PayWithExchangeSelectAsset:"0"};class ea extends r.oi{constructor(){super(),this.unsubscribe=[],this.abortController=void 0,this.hasPrefetched=!1,this.enableEmbedded=n.OptionsController.state.enableEmbedded,this.open=s.I.state.open,this.caipAddress=l.R.state.activeCaipAddress,this.caipNetwork=l.R.state.activeCaipNetwork,this.shake=s.I.state.shake,this.filterByNamespace=c.ConnectorController.state.filterByNamespace,this.padding=f.gR.spacing[1],this.mobileFullScreen=n.OptionsController.state.enableMobileFullScreen,this.initializeTheming(),d.ApiController.prefetchAnalyticsConfig(),this.unsubscribe.push(s.I.subscribeKey("open",e=>e?this.onOpen():this.onClose()),s.I.subscribeKey("shake",e=>this.shake=e),l.R.subscribeKey("activeCaipNetwork",e=>this.onNewNetwork(e)),l.R.subscribeKey("activeCaipAddress",e=>this.onNewAddress(e)),n.OptionsController.subscribeKey("enableEmbedded",e=>this.enableEmbedded=e),c.ConnectorController.subscribeKey("filterByNamespace",e=>{this.filterByNamespace===e||l.R.getAccountData(e)?.caipAddress||(d.ApiController.fetchRecommendedWallets(),this.filterByNamespace=e)}),u.RouterController.subscribeKey("view",()=>{this.dataset.border=ee.g.hasFooter()?"true":"false",this.padding=ei[u.RouterController.state.view]??f.gR.spacing[1]}))}firstUpdated(){if(this.dataset.border=ee.g.hasFooter()?"true":"false",this.mobileFullScreen&&this.setAttribute("data-mobile-fullscreen","true"),this.caipAddress){if(this.enableEmbedded){s.I.close(),this.prefetch();return}this.onNewAddress(this.caipAddress)}this.open&&this.onOpen(),this.enableEmbedded&&this.prefetch()}disconnectedCallback(){this.unsubscribe.forEach(e=>e()),this.onRemoveKeyboardListener()}render(){return(this.style.setProperty("--local-modal-padding",this.padding),this.enableEmbedded)?(0,r.dy)`${this.contentTemplate()} + `:this.open?(0,r.dy)` + + ${this.contentTemplate()} + + + `:null}contentTemplate(){return(0,r.dy)` + + + + + + `}async onOverlayClick(e){e.target!==e.currentTarget||this.mobileFullScreen||await this.handleClose()}async handleClose(){await b.safeClose()}initializeTheming(){let{themeVariables:e,themeMode:t}=w.ThemeController.state,o=f.Hg.getColorTheme(t);(0,f.n)(e,o)}onClose(){this.open=!1,this.classList.remove("open"),this.onScrollUnlock(),m.SnackController.hide(),this.onRemoveKeyboardListener()}onOpen(){this.open=!0,this.classList.add("open"),this.onScrollLock(),this.onAddKeyboardListener()}onScrollLock(){let e=document.createElement("style");e.dataset.w3m=er,e.textContent=` + body { + touch-action: none; + overflow: hidden; + overscroll-behavior: contain; + } + w3m-modal { + pointer-events: auto; + } + `,document.head.appendChild(e)}onScrollUnlock(){let e=document.head.querySelector(`style[data-w3m="${er}"]`);e&&e.remove()}onAddKeyboardListener(){this.abortController=new AbortController;let e=this.shadowRoot?.querySelector("wui-card");e?.focus(),window.addEventListener("keydown",t=>{if("Escape"===t.key)this.handleClose();else if("Tab"===t.key){let{tagName:o}=t.target;!o||o.includes("W3M-")||o.includes("WUI-")||e?.focus()}},this.abortController)}onRemoveKeyboardListener(){this.abortController?.abort(),this.abortController=void 0}async onNewAddress(e){let t=l.R.state.isSwitchingNamespace,o="ProfileWallets"===u.RouterController.state.view;e||t||o||s.I.close(),await h.w.initializeIfEnabled(e),this.caipAddress=e,l.R.setIsSwitchingNamespace(!1)}onNewNetwork(e){let t=this.caipNetwork,o=t?.caipNetworkId?.toString(),r=e?.caipNetworkId?.toString(),i="UnsupportedChain"===u.RouterController.state.view,a=s.I.state.open,n=!1;this.enableEmbedded&&"SwitchNetwork"===u.RouterController.state.view&&(n=!0),o!==r&&g.nY.resetState(),a&&i&&(n=!0),n&&"SIWXSignMessage"!==u.RouterController.state.view&&u.RouterController.goBack(),this.caipNetwork=e}prefetch(){this.hasPrefetched||(d.ApiController.prefetch(),d.ApiController.fetchWalletsByPage({page:1}),this.hasPrefetched=!0)}}ea.styles=et,eo([(0,i.Cb)({type:Boolean})],ea.prototype,"enableEmbedded",void 0),eo([(0,i.SB)()],ea.prototype,"open",void 0),eo([(0,i.SB)()],ea.prototype,"caipAddress",void 0),eo([(0,i.SB)()],ea.prototype,"caipNetwork",void 0),eo([(0,i.SB)()],ea.prototype,"shake",void 0),eo([(0,i.SB)()],ea.prototype,"filterByNamespace",void 0),eo([(0,i.SB)()],ea.prototype,"padding",void 0),eo([(0,i.SB)()],ea.prototype,"mobileFullScreen",void 0);let en=class extends ea{};en=eo([(0,f.Mo)("w3m-modal")],en);let es=class extends ea{};es=eo([(0,f.Mo)("appkit-modal")],es),o(97585),o(4594);var el=(0,f.iv)` + .icon-box { + width: 64px; + height: 64px; + border-radius: ${({borderRadius:e})=>e[5]}; + background-color: ${({colors:e})=>e.semanticError010}; + } +`;let ec=class extends r.oi{constructor(){super()}render(){return(0,r.dy)` + + + + + + + The app isn't responding as expected + + + Try again or reach out to the app team for help. + + + + + Try Again + + + `}onTryAgainClick(){u.RouterController.goBack()}};ec.styles=el,ec=function(e,t,o,r){var i,a=arguments.length,n=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,o,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(n=(a<3?i(n):a>3?i(t,o,n):i(t,o))||n);return a>3&&n&&Object.defineProperty(t,o,n),n}([(0,f.Mo)("w3m-usage-exceeded-view")],ec);var ed=o(74897);o(97928);var eu=(0,f.iv)` + :host { + width: 100%; + } +`,ep=function(e,t,o,r){var i,a=arguments.length,n=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,o,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(n=(a<3?i(n):a>3?i(t,o,n):i(t,o))||n);return a>3&&n&&Object.defineProperty(t,o,n),n};let eh=class extends r.oi{constructor(){super(...arguments),this.hasImpressionSent=!1,this.walletImages=[],this.imageSrc="",this.name="",this.size="md",this.tabIdx=void 0,this.disabled=!1,this.showAllWallets=!1,this.loading=!1,this.loadingSpinnerColor="accent-100",this.rdnsId="",this.displayIndex=void 0,this.walletRank=void 0,this.namespaces=[]}connectedCallback(){super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback(),this.cleanupIntersectionObserver()}updated(e){super.updated(e),(e.has("name")||e.has("imageSrc")||e.has("walletRank"))&&(this.hasImpressionSent=!1),e.has("walletRank")&&this.walletRank&&!this.intersectionObserver&&this.setupIntersectionObserver()}setupIntersectionObserver(){this.intersectionObserver=new IntersectionObserver(e=>{e.forEach(e=>{!e.isIntersecting||this.loading||this.hasImpressionSent||this.sendImpressionEvent()})},{threshold:.1}),this.intersectionObserver.observe(this)}cleanupIntersectionObserver(){this.intersectionObserver&&(this.intersectionObserver.disconnect(),this.intersectionObserver=void 0)}sendImpressionEvent(){this.name&&!this.hasImpressionSent&&this.walletRank&&(this.hasImpressionSent=!0,(this.rdnsId||this.name)&&B.X.sendWalletImpressionEvent({name:this.name,walletRank:this.walletRank,rdnsId:this.rdnsId,view:u.RouterController.state.view,displayIndex:this.displayIndex}))}handleGetWalletNamespaces(){return Object.keys(ed.j.state.adapters).length>1?this.namespaces:[]}render(){return(0,r.dy)` + + `}};eh.styles=eu,ep([(0,i.Cb)({type:Array})],eh.prototype,"walletImages",void 0),ep([(0,i.Cb)()],eh.prototype,"imageSrc",void 0),ep([(0,i.Cb)()],eh.prototype,"name",void 0),ep([(0,i.Cb)()],eh.prototype,"size",void 0),ep([(0,i.Cb)()],eh.prototype,"tagLabel",void 0),ep([(0,i.Cb)()],eh.prototype,"tagVariant",void 0),ep([(0,i.Cb)()],eh.prototype,"walletIcon",void 0),ep([(0,i.Cb)()],eh.prototype,"tabIdx",void 0),ep([(0,i.Cb)({type:Boolean})],eh.prototype,"disabled",void 0),ep([(0,i.Cb)({type:Boolean})],eh.prototype,"showAllWallets",void 0),ep([(0,i.Cb)({type:Boolean})],eh.prototype,"loading",void 0),ep([(0,i.Cb)({type:String})],eh.prototype,"loadingSpinnerColor",void 0),ep([(0,i.Cb)()],eh.prototype,"rdnsId",void 0),ep([(0,i.Cb)()],eh.prototype,"displayIndex",void 0),ep([(0,i.Cb)()],eh.prototype,"walletRank",void 0),ep([(0,i.Cb)({type:Array})],eh.prototype,"namespaces",void 0),eh=ep([(0,f.Mo)("w3m-list-wallet")],eh);var eb=(0,f.iv)` + :host { + --local-duration-height: 0s; + --local-duration: ${({durations:e})=>e.lg}; + --local-transition: ${({easings:e})=>e["ease-out-power-2"]}; + } + + .container { + display: block; + overflow: hidden; + overflow: hidden; + position: relative; + height: var(--local-container-height); + transition: height var(--local-duration-height) var(--local-transition); + will-change: height, padding-bottom; + } + + .container[data-mobile-fullscreen='true'] { + overflow: scroll; + } + + .page { + position: absolute; + top: 0; + left: 0; + right: 0; + width: 100%; + height: auto; + width: inherit; + box-sizing: border-box; + display: flex; + flex-direction: column; + background-color: ${({tokens:e})=>e.theme.backgroundPrimary}; + border-bottom-left-radius: var(--local-border-bottom-radius); + border-bottom-right-radius: var(--local-border-bottom-radius); + transition: border-bottom-left-radius var(--local-duration) var(--local-transition); + } + + .page[data-mobile-fullscreen='true'] { + height: 100%; + } + + .page-content { + display: flex; + flex-direction: column; + min-height: 100%; + } + + .footer { + height: var(--apkt-footer-height); + } + + div.page[view-direction^='prev-'] .page-content { + animation: + slide-left-out var(--local-duration) forwards var(--local-transition), + slide-left-in var(--local-duration) forwards var(--local-transition); + animation-delay: 0ms, var(--local-duration, ${({durations:e})=>e.lg}); + } + + div.page[view-direction^='next-'] .page-content { + animation: + slide-right-out var(--local-duration) forwards var(--local-transition), + slide-right-in var(--local-duration) forwards var(--local-transition); + animation-delay: 0ms, var(--local-duration, ${({durations:e})=>e.lg}); + } + + @keyframes slide-left-out { + from { + transform: translateX(0px) scale(1); + opacity: 1; + filter: blur(0px); + } + to { + transform: translateX(8px) scale(0.99); + opacity: 0; + filter: blur(4px); + } + } + + @keyframes slide-left-in { + from { + transform: translateX(-8px) scale(0.99); + opacity: 0; + filter: blur(4px); + } + to { + transform: translateX(0) translateY(0) scale(1); + opacity: 1; + filter: blur(0px); + } + } + + @keyframes slide-right-out { + from { + transform: translateX(0px) scale(1); + opacity: 1; + filter: blur(0px); + } + to { + transform: translateX(-8px) scale(0.99); + opacity: 0; + filter: blur(4px); + } + } + + @keyframes slide-right-in { + from { + transform: translateX(8px) scale(0.99); + opacity: 0; + filter: blur(4px); + } + to { + transform: translateX(0) translateY(0) scale(1); + opacity: 1; + filter: blur(0px); + } + } +`,ew=function(e,t,o,r){var i,a=arguments.length,n=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,o,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(n=(a<3?i(n):a>3?i(t,o,n):i(t,o))||n);return a>3&&n&&Object.defineProperty(t,o,n),n};let em=class extends r.oi{constructor(){super(...arguments),this.resizeObserver=void 0,this.transitionDuration="0.15s",this.transitionFunction="",this.history="",this.view="",this.setView=void 0,this.viewDirection="",this.historyState="",this.previousHeight="0px",this.mobileFullScreen=n.OptionsController.state.enableMobileFullScreen,this.onViewportResize=()=>{this.updateContainerHeight()}}updated(e){if(e.has("history")){let e=this.history;""!==this.historyState&&this.historyState!==e&&this.onViewChange(e)}e.has("transitionDuration")&&this.style.setProperty("--local-duration",this.transitionDuration),e.has("transitionFunction")&&this.style.setProperty("--local-transition",this.transitionFunction)}firstUpdated(){this.transitionFunction&&this.style.setProperty("--local-transition",this.transitionFunction),this.style.setProperty("--local-duration",this.transitionDuration),this.historyState=this.history,this.resizeObserver=new ResizeObserver(e=>{for(let t of e)if(t.target===this.getWrapper()){let e=t.contentRect.height,o=parseFloat(getComputedStyle(document.documentElement).getPropertyValue("--apkt-footer-height")||"0");this.mobileFullScreen?(e=(window.visualViewport?.height||window.innerHeight)-this.getHeaderHeight()-o,this.style.setProperty("--local-border-bottom-radius","0px")):(e+=o,this.style.setProperty("--local-border-bottom-radius",o?"var(--apkt-borderRadius-5)":"0px")),this.style.setProperty("--local-container-height",`${e}px`),"0px"!==this.previousHeight&&this.style.setProperty("--local-duration-height",this.transitionDuration),this.previousHeight=`${e}px`}}),this.resizeObserver.observe(this.getWrapper()),this.updateContainerHeight(),window.addEventListener("resize",this.onViewportResize),window.visualViewport?.addEventListener("resize",this.onViewportResize)}disconnectedCallback(){let e=this.getWrapper();e&&this.resizeObserver&&this.resizeObserver.unobserve(e),window.removeEventListener("resize",this.onViewportResize),window.visualViewport?.removeEventListener("resize",this.onViewportResize)}render(){return(0,r.dy)` +
+
+
+ +
+
+
+ `}onViewChange(e){let t=e.split(",").filter(Boolean),o=this.historyState.split(",").filter(Boolean),r=o.length,i=t.length,a=t[t.length-1]||"",n=f.Hg.cssDurationToNumber(this.transitionDuration),s="";i>r?s="next":i{this.historyState=e,this.setView?.(a)},n),setTimeout(()=>{this.viewDirection=""},2*n)}getWrapper(){return this.shadowRoot?.querySelector("div.page")}updateContainerHeight(){let e=this.getWrapper();if(!e)return;let t=parseFloat(getComputedStyle(document.documentElement).getPropertyValue("--apkt-footer-height")||"0"),o=0;this.mobileFullScreen?(o=(window.visualViewport?.height||window.innerHeight)-this.getHeaderHeight()-t,this.style.setProperty("--local-border-bottom-radius","0px")):(o=e.getBoundingClientRect().height+t,this.style.setProperty("--local-border-bottom-radius",t?"var(--apkt-borderRadius-5)":"0px")),this.style.setProperty("--local-container-height",`${o}px`),"0px"!==this.previousHeight&&this.style.setProperty("--local-duration-height",this.transitionDuration),this.previousHeight=`${o}px`}getHeaderHeight(){return 60}};em.styles=[eb],ew([(0,i.Cb)({type:String})],em.prototype,"transitionDuration",void 0),ew([(0,i.Cb)({type:String})],em.prototype,"transitionFunction",void 0),ew([(0,i.Cb)({type:String})],em.prototype,"history",void 0),ew([(0,i.Cb)({type:String})],em.prototype,"view",void 0),ew([(0,i.Cb)({attribute:!1})],em.prototype,"setView",void 0),ew([(0,i.SB)()],em.prototype,"viewDirection",void 0),ew([(0,i.SB)()],em.prototype,"historyState",void 0),ew([(0,i.SB)()],em.prototype,"previousHeight",void 0),ew([(0,i.SB)()],em.prototype,"mobileFullScreen",void 0),em=ew([(0,f.Mo)("w3m-router-container")],em)},65451:function(e,t,o){var r=o(31133),i=o(84927),a=o(32801);o(74975);var n=o(84249),s=o(57116),l=o(11131),c=(0,l.iv)` + :host { + position: relative; + } + + button { + display: flex; + justify-content: center; + align-items: center; + background-color: transparent; + padding: ${({spacing:e})=>e[1]}; + } + + /* -- Colors --------------------------------------------------- */ + button[data-type='accent'] wui-icon { + color: ${({tokens:e})=>e.core.iconAccentPrimary}; + } + + button[data-type='neutral'][data-variant='primary'] wui-icon { + color: ${({tokens:e})=>e.theme.iconInverse}; + } + + button[data-type='neutral'][data-variant='secondary'] wui-icon { + color: ${({tokens:e})=>e.theme.iconDefault}; + } + + button[data-type='success'] wui-icon { + color: ${({tokens:e})=>e.core.iconSuccess}; + } + + button[data-type='error'] wui-icon { + color: ${({tokens:e})=>e.core.iconError}; + } + + /* -- Sizes --------------------------------------------------- */ + button[data-size='xs'] { + width: 16px; + height: 16px; + + border-radius: ${({borderRadius:e})=>e[1]}; + } + + button[data-size='sm'] { + width: 20px; + height: 20px; + border-radius: ${({borderRadius:e})=>e[1]}; + } + + button[data-size='md'] { + width: 24px; + height: 24px; + border-radius: ${({borderRadius:e})=>e[2]}; + } + + button[data-size='lg'] { + width: 28px; + height: 28px; + border-radius: ${({borderRadius:e})=>e[2]}; + } + + button[data-size='xs'] wui-icon { + width: 8px; + height: 8px; + } + + button[data-size='sm'] wui-icon { + width: 12px; + height: 12px; + } + + button[data-size='md'] wui-icon { + width: 16px; + height: 16px; + } + + button[data-size='lg'] wui-icon { + width: 20px; + height: 20px; + } + + /* -- Hover --------------------------------------------------- */ + @media (hover: hover) { + button[data-type='accent']:hover:enabled { + background-color: ${({tokens:e})=>e.core.foregroundAccent010}; + } + + button[data-variant='primary'][data-type='neutral']:hover:enabled { + background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; + } + + button[data-variant='secondary'][data-type='neutral']:hover:enabled { + background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; + } + + button[data-type='success']:hover:enabled { + background-color: ${({tokens:e})=>e.core.backgroundSuccess}; + } + + button[data-type='error']:hover:enabled { + background-color: ${({tokens:e})=>e.core.backgroundError}; + } + } + + /* -- Focus --------------------------------------------------- */ + button:focus-visible { + box-shadow: 0 0 0 4px ${({tokens:e})=>e.core.foregroundAccent020}; + } + + /* -- Properties --------------------------------------------------- */ + button[data-full-width='true'] { + width: 100%; + } + + :host([fullWidth]) { + width: 100%; + } + + button[disabled] { + opacity: 0.5; + cursor: not-allowed; + } +`,d=function(e,t,o,r){var i,a=arguments.length,n=a<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,t,o,r);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(n=(a<3?i(n):a>3?i(t,o,n):i(t,o))||n);return a>3&&n&&Object.defineProperty(t,o,n),n};let u=class extends r.oi{constructor(){super(...arguments),this.icon="card",this.variant="primary",this.type="accent",this.size="md",this.iconSize=void 0,this.fullWidth=!1,this.disabled=!1}render(){return(0,r.dy)``}};u.styles=[n.ET,n.ZM,c],d([(0,i.Cb)()],u.prototype,"icon",void 0),d([(0,i.Cb)()],u.prototype,"variant",void 0),d([(0,i.Cb)()],u.prototype,"type",void 0),d([(0,i.Cb)()],u.prototype,"size",void 0),d([(0,i.Cb)()],u.prototype,"iconSize",void 0),d([(0,i.Cb)({type:Boolean})],u.prototype,"fullWidth",void 0),d([(0,i.Cb)({type:Boolean})],u.prototype,"disabled",void 0),d([(0,s.M)("wui-icon-button")],u)}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/7846-92cc0999df4c62b4.js b/frontend/.next/static/chunks/7846-92cc0999df4c62b4.js new file mode 100644 index 0000000..e1c5452 --- /dev/null +++ b/frontend/.next/static/chunks/7846-92cc0999df4c62b4.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7846],{59196:function(t,e){"use strict";e.byteLength=function(t){var e=u(t),r=e[0],n=e[1];return(r+n)*3/4-n},e.toByteArray=function(t){var e,r,o=u(t),s=o[0],f=o[1],h=new i((s+f)*3/4-f),a=0,l=f>0?s-4:s;for(r=0;r>16&255,h[a++]=e>>8&255,h[a++]=255&e;return 2===f&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,h[a++]=255&e),1===f&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,h[a++]=e>>8&255,h[a++]=255&e),h},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],s=0,f=n-i;s>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return o.join("")}(t,s,s+16383>f?f:s+16383));return 1===i?o.push(r[(e=t[n-1])>>2]+r[e<<4&63]+"=="):2===i&&o.push(r[(e=(t[n-2]<<8)+t[n-1])>>10]+r[e>>4&63]+r[e<<2&63]+"="),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,f=o.length;s0)throw Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");-1===r&&(r=e);var n=r===e?0:4-r%4;return[r,n]}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},82957:function(t,e,r){"use strict";let n=r(59196),i=r(68848),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function s(t){if(t>2147483647)throw RangeError('The value "'+t+'" is invalid for option "size"');let e=new Uint8Array(t);return Object.setPrototypeOf(e,f.prototype),e}function f(t,e,r){if("number"==typeof t){if("string"==typeof e)throw TypeError('The "string" argument must be of type string. Received type number');return a(t)}return u(t,e,r)}function u(t,e,r){if("string"==typeof t)return function(t,e){if(("string"!=typeof e||""===e)&&(e="utf8"),!f.isEncoding(e))throw TypeError("Unknown encoding: "+e);let r=0|y(t,e),n=s(r),i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(N(t,Uint8Array)){let e=new Uint8Array(t);return c(e.buffer,e.byteOffset,e.byteLength)}return l(t)}(t);if(null==t)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(N(t,ArrayBuffer)||t&&N(t.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(N(t,SharedArrayBuffer)||t&&N(t.buffer,SharedArrayBuffer)))return c(t,e,r);if("number"==typeof t)throw TypeError('The "value" argument must not be of type number. Received type number');let n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return f.from(n,e,r);let i=function(t){var e;if(f.isBuffer(t)){let e=0|p(t.length),r=s(e);return 0===r.length||t.copy(r,0,0,e),r}return void 0!==t.length?"number"!=typeof t.length||(e=t.length)!=e?s(0):l(t):"Buffer"===t.type&&Array.isArray(t.data)?l(t.data):void 0}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return f.from(t[Symbol.toPrimitive]("string"),e,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function h(t){if("number"!=typeof t)throw TypeError('"size" argument must be of type number');if(t<0)throw RangeError('The value "'+t+'" is invalid for option "size"')}function a(t){return h(t),s(t<0?0:0|p(t))}function l(t){let e=t.length<0?0:0|p(t.length),r=s(e);for(let n=0;n=2147483647)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|t}function y(t,e){if(f.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||N(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);let r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return _(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return $(t).length;default:if(i)return n?-1:_(t).length;e=(""+e).toLowerCase(),i=!0}}function g(t,e,r){let i=!1;if((void 0===e||e<0)&&(e=0),e>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(e>>>=0)))return"";for(t||(t="utf8");;)switch(t){case"hex":return function(t,e,r){let n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);let i="";for(let n=e;n2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),(o=r=+r)!=o&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return -1;r=t.length-1}else if(r<0){if(!i)return -1;r=0}if("string"==typeof e&&(e=f.from(e,n)),f.isBuffer(e))return 0===e.length?-1:m(t,e,r,n,i);if("number"==typeof e)return(e&=255,"function"==typeof Uint8Array.prototype.indexOf)?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):m(t,[e],r,n,i);throw TypeError("val must be string, number or Buffer")}function m(t,e,r,n,i){let o,s=1,f=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return -1;s=2,f/=2,u/=2,r/=2}function h(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){let n=-1;for(o=r;of&&(r=f-u),o=r;o>=0;o--){let r=!0;for(let n=0;n239?4:e>223?3:e>191?2:1;if(i+s<=r){let r,n,f,u;switch(s){case 1:e<128&&(o=e);break;case 2:(192&(r=t[i+1]))==128&&(u=(31&e)<<6|63&r)>127&&(o=u);break;case 3:r=t[i+1],n=t[i+2],(192&r)==128&&(192&n)==128&&(u=(15&e)<<12|(63&r)<<6|63&n)>2047&&(u<55296||u>57343)&&(o=u);break;case 4:r=t[i+1],n=t[i+2],f=t[i+3],(192&r)==128&&(192&n)==128&&(192&f)==128&&(u=(15&e)<<18|(63&r)<<12|(63&n)<<6|63&f)>65535&&u<1114112&&(o=u)}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=s}return function(t){let e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);let r="",n=0;for(;nr)throw RangeError("Trying to access beyond buffer length")}function B(t,e,r,n,i,o){if(!f.isBuffer(t))throw TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw RangeError("Index out of range")}function v(t,e,r,n,i){x(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s,r}function A(t,e,r,n,i){x(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r+7]=o,o>>=8,t[r+6]=o,o>>=8,t[r+5]=o,o>>=8,t[r+4]=o;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=s,s>>=8,t[r+2]=s,s>>=8,t[r+1]=s,s>>=8,t[r]=s,r+8}function I(t,e,r,n,i,o){if(r+n>t.length||r<0)throw RangeError("Index out of range")}function U(t,e,r,n,o){return e=+e,r>>>=0,o||I(t,e,r,4,34028234663852886e22,-34028234663852886e22),i.write(t,e,r,n,23,4),r+4}function R(t,e,r,n,o){return e=+e,r>>>=0,o||I(t,e,r,8,17976931348623157e292,-17976931348623157e292),i.write(t,e,r,n,52,8),r+8}e.lW=f,e.h2=50,f.TYPED_ARRAY_SUPPORT=function(){try{let t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),f.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(f.prototype,"parent",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.buffer}}),Object.defineProperty(f.prototype,"offset",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.byteOffset}}),f.poolSize=8192,f.from=function(t,e,r){return u(t,e,r)},Object.setPrototypeOf(f.prototype,Uint8Array.prototype),Object.setPrototypeOf(f,Uint8Array),f.alloc=function(t,e,r){return(h(t),t<=0)?s(t):void 0!==e?"string"==typeof r?s(t).fill(e,r):s(t).fill(e):s(t)},f.allocUnsafe=function(t){return a(t)},f.allocUnsafeSlow=function(t){return a(t)},f.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==f.prototype},f.compare=function(t,e){if(N(t,Uint8Array)&&(t=f.from(t,t.offset,t.byteLength)),N(e,Uint8Array)&&(e=f.from(e,e.offset,e.byteLength)),!f.isBuffer(t)||!f.isBuffer(e))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;let r=t.length,n=e.length;for(let i=0,o=Math.min(r,n);in.length?(f.isBuffer(e)||(e=f.from(e)),e.copy(n,i)):Uint8Array.prototype.set.call(n,e,i);else if(f.isBuffer(e))e.copy(n,i);else throw TypeError('"list" argument must be an Array of Buffers');i+=e.length}return n},f.byteLength=y,f.prototype._isBuffer=!0,f.prototype.swap16=function(){let t=this.length;if(t%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;er&&(t+=" ... "),""},o&&(f.prototype[o]=f.prototype.inspect),f.prototype.compare=function(t,e,r,n,i){if(N(t,Uint8Array)&&(t=f.from(t,t.offset,t.byteLength)),!f.isBuffer(t))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return -1;if(e>=r)return 1;if(e>>>=0,r>>>=0,n>>>=0,i>>>=0,this===t)return 0;let o=i-n,s=r-e,u=Math.min(o,s),h=this.slice(n,i),a=t.slice(e,r);for(let t=0;t>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let c=this.length-e;if((void 0===r||r>c)&&(r=c),t.length>0&&(r<0||e<0)||e>this.length)throw RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let p=!1;for(;;)switch(n){case"hex":return function(t,e,r,n){let i;r=Number(r)||0;let o=t.length-r;n?(n=Number(n))>o&&(n=o):n=o;let s=e.length;for(n>s/2&&(n=s/2),i=0;i>8,i.push(r%256),i.push(n);return i}(t,this.length-a),this,a,l);default:if(p)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),p=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},f.prototype.slice=function(t,e){let r=this.length;t=~~t,e=void 0===e?r:~~e,t<0?(t+=r)<0&&(t=0):t>r&&(t=r),e<0?(e+=r)<0&&(e=0):e>r&&(e=r),e>>=0,e>>>=0,r||E(t,e,this.length);let n=this[t],i=1,o=0;for(;++o>>=0,e>>>=0,r||E(t,e,this.length);let n=this[t+--e],i=1;for(;e>0&&(i*=256);)n+=this[t+--e]*i;return n},f.prototype.readUint8=f.prototype.readUInt8=function(t,e){return t>>>=0,e||E(t,1,this.length),this[t]},f.prototype.readUint16LE=f.prototype.readUInt16LE=function(t,e){return t>>>=0,e||E(t,2,this.length),this[t]|this[t+1]<<8},f.prototype.readUint16BE=f.prototype.readUInt16BE=function(t,e){return t>>>=0,e||E(t,2,this.length),this[t]<<8|this[t+1]},f.prototype.readUint32LE=f.prototype.readUInt32LE=function(t,e){return t>>>=0,e||E(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},f.prototype.readUint32BE=f.prototype.readUInt32BE=function(t,e){return t>>>=0,e||E(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},f.prototype.readBigUInt64LE=F(function(t){L(t>>>=0,"offset");let e=this[t],r=this[t+7];(void 0===e||void 0===r)&&S(t,this.length-8);let n=e+256*this[++t]+65536*this[++t]+16777216*this[++t],i=this[++t]+256*this[++t]+65536*this[++t]+16777216*r;return BigInt(n)+(BigInt(i)<>>=0,"offset");let e=this[t],r=this[t+7];(void 0===e||void 0===r)&&S(t,this.length-8);let n=16777216*e+65536*this[++t]+256*this[++t]+this[++t],i=16777216*this[++t]+65536*this[++t]+256*this[++t]+r;return(BigInt(n)<>>=0,e>>>=0,r||E(t,e,this.length);let n=this[t],i=1,o=0;for(;++o=(i*=128)&&(n-=Math.pow(2,8*e)),n},f.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||E(t,e,this.length);let n=e,i=1,o=this[t+--n];for(;n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},f.prototype.readInt8=function(t,e){return(t>>>=0,e||E(t,1,this.length),128&this[t])?-((255-this[t]+1)*1):this[t]},f.prototype.readInt16LE=function(t,e){t>>>=0,e||E(t,2,this.length);let r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},f.prototype.readInt16BE=function(t,e){t>>>=0,e||E(t,2,this.length);let r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},f.prototype.readInt32LE=function(t,e){return t>>>=0,e||E(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},f.prototype.readInt32BE=function(t,e){return t>>>=0,e||E(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},f.prototype.readBigInt64LE=F(function(t){L(t>>>=0,"offset");let e=this[t],r=this[t+7];return(void 0===e||void 0===r)&&S(t,this.length-8),(BigInt(this[t+4]+256*this[t+5]+65536*this[t+6]+(r<<24))<>>=0,"offset");let e=this[t],r=this[t+7];return(void 0===e||void 0===r)&&S(t,this.length-8),(BigInt((e<<24)+65536*this[++t]+256*this[++t]+this[++t])<>>=0,e||E(t,4,this.length),i.read(this,t,!0,23,4)},f.prototype.readFloatBE=function(t,e){return t>>>=0,e||E(t,4,this.length),i.read(this,t,!1,23,4)},f.prototype.readDoubleLE=function(t,e){return t>>>=0,e||E(t,8,this.length),i.read(this,t,!0,52,8)},f.prototype.readDoubleBE=function(t,e){return t>>>=0,e||E(t,8,this.length),i.read(this,t,!1,52,8)},f.prototype.writeUintLE=f.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){let n=Math.pow(2,8*r)-1;B(this,t,e,r,n,0)}let i=1,o=0;for(this[e]=255&t;++o>>=0,r>>>=0,!n){let n=Math.pow(2,8*r)-1;B(this,t,e,r,n,0)}let i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},f.prototype.writeUint8=f.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||B(this,t,e,1,255,0),this[e]=255&t,e+1},f.prototype.writeUint16LE=f.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||B(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},f.prototype.writeUint16BE=f.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||B(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},f.prototype.writeUint32LE=f.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||B(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},f.prototype.writeUint32BE=f.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||B(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},f.prototype.writeBigUInt64LE=F(function(t,e=0){return v(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),f.prototype.writeBigUInt64BE=F(function(t,e=0){return A(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),f.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){let n=Math.pow(2,8*r-1);B(this,t,e,r,n-1,-n)}let i=0,o=1,s=0;for(this[e]=255&t;++i>0)-s&255;return e+r},f.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){let n=Math.pow(2,8*r-1);B(this,t,e,r,n-1,-n)}let i=r-1,o=1,s=0;for(this[e+i]=255&t;--i>=0&&(o*=256);)t<0&&0===s&&0!==this[e+i+1]&&(s=1),this[e+i]=(t/o>>0)-s&255;return e+r},f.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||B(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},f.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||B(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},f.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||B(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},f.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||B(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},f.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||B(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},f.prototype.writeBigInt64LE=F(function(t,e=0){return v(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),f.prototype.writeBigInt64BE=F(function(t,e=0){return A(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),f.prototype.writeFloatLE=function(t,e,r){return U(this,t,e,!0,r)},f.prototype.writeFloatBE=function(t,e,r){return U(this,t,e,!1,r)},f.prototype.writeDoubleLE=function(t,e,r){return R(this,t,e,!0,r)},f.prototype.writeDoubleBE=function(t,e,r){return R(this,t,e,!1,r)},f.prototype.copy=function(t,e,r,n){if(!f.isBuffer(t))throw TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw RangeError("Index out of range");if(n<0)throw RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function x(t,e,r,n,i,o){if(t>r||t3?0===e||e===BigInt(0)?`>= 0${i} and < 2${i} ** ${(o+1)*8}${i}`:`>= -(2${i} ** ${(o+1)*8-1}${i}) and < 2 ** ${(o+1)*8-1}${i}`:`>= ${e}${i} and <= ${r}${i}`,new C.ERR_OUT_OF_RANGE("value",n,t)}L(i,"offset"),(void 0===n[i]||void 0===n[i+o])&&S(i,n.length-(o+1))}function L(t,e){if("number"!=typeof t)throw new C.ERR_INVALID_ARG_TYPE(e,"number",t)}function S(t,e,r){if(Math.floor(t)!==t)throw L(t,r),new C.ERR_OUT_OF_RANGE(r||"offset","an integer",t);if(e<0)throw new C.ERR_BUFFER_OUT_OF_BOUNDS;throw new C.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${e}`,t)}O("ERR_BUFFER_OUT_OF_BOUNDS",function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),O("ERR_INVALID_ARG_TYPE",function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`},TypeError),O("ERR_OUT_OF_RANGE",function(t,e,r){let n=`The value of "${t}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>4294967296?i=T(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=T(i)),i+="n"),n+=` It must be ${e}. Received ${i}`},RangeError);let P=/[^+/0-9A-Za-z-_]/g;function _(t,e){let r;e=e||1/0;let n=t.length,i=null,o=[];for(let s=0;s55295&&r<57344){if(!i){if(r>56319||s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return o}function $(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(P,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function M(t,e,r,n){let i;for(i=0;i=e.length)&&!(i>=t.length);++i)e[i+r]=t[i];return i}function N(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}let k=function(){let t="0123456789abcdef",e=Array(256);for(let r=0;r<16;++r){let n=16*r;for(let i=0;i<16;++i)e[n+i]=t[r]+t[i]}return e}();function F(t){return"undefined"==typeof BigInt?j:t}function j(){throw Error("BigInt not supported")}},68848:function(t,e){e.read=function(t,e,r,n,i){var o,s,f=8*i-n-1,u=(1<>1,a=-7,l=r?i-1:0,c=r?-1:1,p=t[e+l];for(l+=c,o=p&(1<<-a)-1,p>>=-a,a+=f;a>0;o=256*o+t[e+l],l+=c,a-=8);for(s=o&(1<<-a)-1,o>>=-a,a+=n;a>0;s=256*s+t[e+l],l+=c,a-=8);if(0===o)o=1-h;else{if(o===u)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),o-=h}return(p?-1:1)*s*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var s,f,u,h=8*o-i-1,a=(1<>1,c=23===i?5960464477539062e-23:0,p=n?0:o-1,y=n?1:-1,g=e<0||0===e&&1/e<0?1:0;for(isNaN(e=Math.abs(e))||e===1/0?(f=isNaN(e)?1:0,s=a):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),s+l>=1?e+=c/u:e+=c*Math.pow(2,1-l),e*u>=2&&(s++,u/=2),s+l>=a?(f=0,s=a):s+l>=1?(f=(e*u-1)*Math.pow(2,i),s+=l):(f=e*Math.pow(2,l-1)*Math.pow(2,i),s=0));i>=8;t[r+p]=255&f,p+=y,f/=256,i-=8);for(s=s<0;t[r+p]=255&s,p+=y,s/=256,h-=8);t[r+p-y]|=128*g}},2894:function(t,e,r){"use strict";r.d(e,{R:function(){return f},m:function(){return s}});var n=r(18238),i=r(7989),o=r(11255),s=class extends i.F{#t;#e;#r;#n;constructor(t){super(),this.#t=t.client,this.mutationId=t.mutationId,this.#r=t.mutationCache,this.#e=[],this.state=t.state||f(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#e.includes(t)||(this.#e.push(t),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#e=this.#e.filter(e=>e!==t),this.scheduleGc(),this.#r.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#e.length||("pending"===this.state.status?this.scheduleGc():this.#r.remove(this))}continue(){return this.#n?.continue()??this.execute(this.state.variables)}async execute(t){let e=()=>{this.#i({type:"continue"})},r={client:this.#t,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#n=(0,o.Mz)({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(Error("No mutationFn found")),onFail:(t,e)=>{this.#i({type:"failed",failureCount:t,error:e})},onPause:()=>{this.#i({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#r.canRun(this)});let n="pending"===this.state.status,i=!this.#n.canStart();try{if(n)e();else{this.#i({type:"pending",variables:t,isPaused:i}),await this.#r.config.onMutate?.(t,this,r);let e=await this.options.onMutate?.(t,r);e!==this.state.context&&this.#i({type:"pending",context:e,variables:t,isPaused:i})}let o=await this.#n.start();return await this.#r.config.onSuccess?.(o,t,this.state.context,this,r),await this.options.onSuccess?.(o,t,this.state.context,r),await this.#r.config.onSettled?.(o,null,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(o,null,t,this.state.context,r),this.#i({type:"success",data:o}),o}catch(e){try{throw await this.#r.config.onError?.(e,t,this.state.context,this,r),await this.options.onError?.(e,t,this.state.context,r),await this.#r.config.onSettled?.(void 0,e,this.state.variables,this.state.context,this,r),await this.options.onSettled?.(void 0,e,t,this.state.context,r),e}finally{this.#i({type:"error",error:e})}}finally{this.#r.runNext(this)}}#i(t){this.state=(e=>{switch(t.type){case"failed":return{...e,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...e,isPaused:!0};case"continue":return{...e,isPaused:!1};case"pending":return{...e,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...e,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...e,data:void 0,error:t.error,failureCount:e.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}})(this.state),n.Vr.batch(()=>{this.#e.forEach(e=>{e.onMutationUpdate(t)}),this.#r.notify({mutation:this,type:"updated",action:t})})}};function f(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}},93184:function(t,e,r){"use strict";r.d(e,{e:function(){return u}});var n=r(72932),i=r(67348),o=r(39277),s=r(50550),f=r(44199);async function u(t,e){let{chainId:r,timeout:u=0,...h}=e,a=t.getClient({chainId:r}),l=(0,f.s)(a,i.e,"waitForTransactionReceipt"),c=await l({...h,timeout:u});if("reverted"===c.status){let t=(0,f.s)(a,o.f,"getTransaction"),{from:e,...r}=await t({hash:c.transactionHash}),i=(0,f.s)(a,s.R,"call"),u=await i({...r,account:e,data:r.input,gasPrice:"eip1559"!==r.type?r.gasPrice:void 0,maxFeePerGas:"eip1559"===r.type?r.maxFeePerGas:void 0,maxPriorityFeePerGas:"eip1559"===r.type?r.maxPriorityFeePerGas:void 0});throw Error(u?.data?(0,n.rR)(`0x${u.data.substring(138)}`):"unknown reason")}return{...c,chainId:a.chain.id}}},18470:function(t,e,r){"use strict";r.d(e,{n:function(){return s}});var n=r(50825),i=r(44199),o=r(18849);async function s(t,e){let r;let{account:s,chainId:f,connector:u,...h}=e;r="object"==typeof s&&s?.type==="local"?t.getClient({chainId:f}):await (0,o.e)(t,{account:s??void 0,assertChainId:!1,chainId:f,connector:u});let a=(0,i.s)(r,n.n,"writeContract");return await a({...h,...s?{account:s}:{},chain:f?{id:f}:null})}},44199:function(t,e,r){"use strict";function n(t,e,r){let n=t[e.name];if("function"==typeof n)return n;let i=t[r];return"function"==typeof i?i:r=>e(t,r)}r.d(e,{s:function(){return n}})}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/7857.7035f3d8540cb099.js b/frontend/.next/static/chunks/7857.7035f3d8540cb099.js new file mode 100644 index 0000000..1757961 --- /dev/null +++ b/frontend/.next/static/chunks/7857.7035f3d8540cb099.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7857],{70751:function(n,t,e){e.d(t,{v:function(){return c}});var u=e(82538),i=e(28332);function c(n){let{key:t="public",name:e="Public Client"}=n;return(0,u.e)({...n,key:t,name:e,type:"publicClient"}).extend(i.I)}},47857:function(n,t,e){e.d(t,{createPublicClient:function(){return u.v},defineChain:function(){return c.a},http:function(){return i.d}});var u=e(70751),i=e(79516),c=e(90328)}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/7895.60e7b58d352b820a.js b/frontend/.next/static/chunks/7895.60e7b58d352b820a.js new file mode 100644 index 0000000..9fc3497 --- /dev/null +++ b/frontend/.next/static/chunks/7895.60e7b58d352b820a.js @@ -0,0 +1,12 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7895],{74324:function(e,t,n){let r,a,i;n.d(t,{createBaseAccountSDK:function(){return o_}});var s=JSON.parse('{"u2":"@base-org/account","i8":"2.4.0"}');let o="https://rpc.wallet.coinbase.com",c=s.u2,u=s.i8;function l(e,t){let n;try{n=e()}catch(e){return}return{getItem:e=>{var r;let a=e=>null===e?null:JSON.parse(e,null==t?void 0:t.reviver),i=null!=(r=n.getItem(e))?r:null;return i instanceof Promise?i.then(a):a(i)},setItem:(e,r)=>n.setItem(e,JSON.stringify(r,null==t?void 0:t.replacer)),removeItem:e=>n.removeItem(e)}}let d=e=>t=>{try{let n=e(t);if(n instanceof Promise)return n;return{then:e=>d(e)(n),catch(e){return this}}}catch(e){return{then(e){return this},catch:t=>d(t)(e)}}},f=e=>{let t;let n=new Set,r=(e,r)=>{let a="function"==typeof e?e(t):e;if(!Object.is(a,t)){let e=t;t=(null!=r?r:"object"!=typeof a||null===a)?a:Object.assign({},t,a),n.forEach(n=>n(t,e))}},a=()=>t,i={setState:r,getState:a,getInitialState:()=>s,subscribe:e=>(n.add(e),()=>n.delete(e))},s=t=e(r,a,i);return i},p=e=>e?f(e):f,m=()=>({chains:[]}),h=()=>({keys:{}}),y=()=>({account:{}}),b=()=>({subAccount:void 0}),g=()=>({subAccountConfig:{}}),v=()=>({spendPermissions:[]}),w=()=>({config:{version:u}}),x=p((r=(...e)=>({...m(...e),...h(...e),...y(...e),...b(...e),...v(...e),...w(...e),...g(...e)}),a={name:"base-acc-sdk.store",storage:l(()=>localStorage),partialize:e=>({chains:e.chains,keys:e.keys,account:e.account,subAccount:e.subAccount,spendPermissions:e.spendPermissions,config:e.config})},(e,t,n)=>{let i,s={storage:l(()=>localStorage),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...a},o=!1,c=new Set,u=new Set,f=s.storage;if(!f)return r((...t)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),e(...t)},t,n);let p=()=>{let e=s.partialize({...t()});return f.setItem(s.name,{state:e,version:s.version})},m=n.setState;n.setState=(e,t)=>{m(e,t),p()};let h=r((...t)=>{e(...t),p()},t,n);n.getInitialState=()=>h;let y=()=>{var n,r;if(!f)return;o=!1,c.forEach(e=>{var n;return e(null!=(n=t())?n:h)});let a=(null==(r=s.onRehydrateStorage)?void 0:r.call(s,null!=(n=t())?n:h))||void 0;return d(f.getItem.bind(f))(s.name).then(e=>{if(e){if("number"!=typeof e.version||e.version===s.version)return[!1,e.state];if(s.migrate){let t=s.migrate(e.state,e.version);return t instanceof Promise?t.then(e=>[!0,e]):[!0,t]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}return[!1,void 0]}).then(n=>{var r;let[a,o]=n;if(e(i=s.merge(o,null!=(r=t())?r:h),!0),a)return p()}).then(()=>{null==a||a(i,void 0),i=t(),o=!0,u.forEach(e=>e(i))}).catch(e=>{null==a||a(void 0,e)})};return n.persist={setOptions:e=>{s={...s,...e},e.storage&&(f=e.storage)},clearStorage:()=>{null==f||f.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>y(),hasHydrated:()=>o,onHydrate:e=>(c.add(e),()=>{c.delete(e)}),onFinishHydration:e=>(u.add(e),()=>{u.delete(e)})},s.skipHydration||y(),i||h})),k={get:()=>x.getState().spendPermissions,set:e=>{x.setState({spendPermissions:e})},clear:()=>{x.setState({spendPermissions:[]})}},E={get:()=>x.getState().config,set:e=>{x.setState(t=>({config:{...t.config,...e}}))}},A={...x,subAccounts:{get:()=>x.getState().subAccount,set:e=>{x.setState(t=>({subAccount:t.subAccount?{...t.subAccount,...e}:{address:e.address,...e}}))},clear:()=>{x.setState({subAccount:void 0})}},subAccountsConfig:{get:()=>x.getState().subAccountConfig,set:e=>{x.setState(t=>({subAccountConfig:{...t.subAccountConfig,...e}}))},clear:()=>{x.setState({subAccountConfig:{}})}},spendPermissions:k,account:{get:()=>x.getState().account,set:e=>{x.setState(t=>({account:{...t.account,...e}}))},clear:()=>{x.setState({account:{}})}},chains:{get:()=>x.getState().chains,set:e=>{x.setState({chains:e})},clear:()=>{x.setState({chains:[]})}},keys:{get:e=>x.getState().keys[e],set:(e,t)=>{x.setState(n=>({keys:{...n.keys,[e]:t}}))},clear:()=>{x.setState({keys:{}})}},config:E},C=()=>new Promise((e,t)=>{if("undefined"==typeof window){t(Error("Telemetry is not supported in non-browser environments"));return}if(window.ClientAnalytics)return e();try{let t=document.createElement("script");t.textContent='!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.ClientAnalytics=t():e.ClientAnalytics=t()}(this,(function(){return(()=>{var e={792:e=>{var t={utf8:{stringToBytes:function(e){return t.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(t.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],n=0;n{var t,n;t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n={rotl:function(e,t){return e<>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&n.rotl(e,8)|4278255360&n.rotl(e,24);for(var t=0;t0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],n=0,r=0;n>>5]|=e[n]<<24-r%32;return t},wordsToBytes:function(e){for(var t=[],n=0;n<32*e.length;n+=8)t.push(e[n>>>5]>>>24-n%32&255);return t},bytesToHex:function(e){for(var t=[],n=0;n>>4).toString(16)),t.push((15&e[n]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],n=0;n>>6*(3-a)&63)):n.push("=");return n.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\\/]/gi,"");for(var n=[],r=0,i=0;r>>6-2*i);return n}},e.exports=n},335:e=>{function t(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}e.exports=function(e){return null!=e&&(t(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&t(e.slice(0,0))}(e)||!!e._isBuffer)}},762:(e,t,n)=>{var r,i,a,o,s;r=n(562),i=n(792).utf8,a=n(335),o=n(792).bin,(s=function(e,t){e.constructor==String?e=t&&"binary"===t.encoding?o.stringToBytes(e):i.stringToBytes(e):a(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||e.constructor===Uint8Array||(e=e.toString());for(var n=r.bytesToWords(e),c=8*e.length,u=1732584193,l=-271733879,d=-1732584194,p=271733878,m=0;m>>24)|4278255360&(n[m]<<24|n[m]>>>8);n[c>>>5]|=128<>>9<<4)]=c;var f=s._ff,v=s._gg,g=s._hh,b=s._ii;for(m=0;m>>0,l=l+w>>>0,d=d+y>>>0,p=p+T>>>0}return r.endian([u,l,d,p])})._ff=function(e,t,n,r,i,a,o){var s=e+(t&n|~t&r)+(i>>>0)+o;return(s<>>32-a)+t},s._gg=function(e,t,n,r,i,a,o){var s=e+(t&r|n&~r)+(i>>>0)+o;return(s<>>32-a)+t},s._hh=function(e,t,n,r,i,a,o){var s=e+(t^n^r)+(i>>>0)+o;return(s<>>32-a)+t},s._ii=function(e,t,n,r,i,a,o){var s=e+(n^(t|~r))+(i>>>0)+o;return(s<>>32-a)+t},s._blocksize=16,s._digestsize=16,e.exports=function(e,t){if(null==e)throw new Error("Illegal argument "+e);var n=r.wordsToBytes(s(e,t));return t&&t.asBytes?n:t&&t.asString?o.bytesToString(n):r.bytesToHex(n)}},2:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Perfume:()=>ze,incrementUjNavigation:()=>Le,markStep:()=>Re,markStepOnce:()=>qe});var r,i,a={isResourceTiming:!1,isElementTiming:!1,maxTime:3e4,reportOptions:{},enableNavigationTracking:!0},o=window,s=o.console,c=o.navigator,u=o.performance,l=function(){return c.deviceMemory},d=function(){return c.hardwareConcurrency},p="mark.",m=function(){return u&&!!u.getEntriesByType&&!!u.now&&!!u.mark},f="4g",v=!1,g={},b={value:0},h={value:{beacon:0,css:0,fetch:0,img:0,other:0,script:0,total:0,xmlhttprequest:0}},w={value:0},y={value:0},T={},k={isHidden:!1,didChange:!1},_=function(){k.isHidden=!1,document.hidden&&(k.isHidden=document.hidden,k.didChange=!0)},S=function(e,t){try{var n=new PerformanceObserver((function(e){t(e.getEntries())}));return n.observe({type:e,buffered:!0}),n}catch(e){s.warn("Perfume.js:",e)}return null},E=function(){return!!(d()&&d()<=4)||!!(l()&&l()<=4)},x=function(e,t){switch(e){case"slow-2g":case"2g":case"3g":return!0;default:return E()||t}},O=function(e){return parseFloat(e.toFixed(4))},j=function(e){return"number"!=typeof e?null:O(e/Math.pow(1024,2))},N=function(e,t,n,r,i){var s,u=function(){a.analyticsTracker&&(k.isHidden&&!["CLS","INP"].includes(e)||a.analyticsTracker({attribution:r,metricName:e,data:t,navigatorInformation:c?{deviceMemory:l()||0,hardwareConcurrency:d()||0,serviceWorkerStatus:"serviceWorker"in c?c.serviceWorker.controller?"controlled":"supported":"unsupported",isLowEndDevice:E(),isLowEndExperience:x(f,v)}:{},rating:n,navigationType:i}))};["CLS","INP"].includes(e)?u():(s=u,"requestIdleCallback"in o?o.requestIdleCallback(s,{timeout:3e3}):s())},I=function(e){e.forEach((function(e){if(!("self"!==e.name||e.startTime0&&(w.value+=t,y.value+=t)}}))};!function(e){e.instant="instant",e.quick="quick",e.moderate="moderate",e.slow="slow",e.unavoidable="unavoidable"}(r||(r={}));var P,M,B,C,D,A=((i={})[r.instant]={vitalsThresholds:[100,200],maxOutlierThreshold:1e4},i[r.quick]={vitalsThresholds:[200,500],maxOutlierThreshold:1e4},i[r.moderate]={vitalsThresholds:[500,1e3],maxOutlierThreshold:1e4},i[r.slow]={vitalsThresholds:[1e3,2e3],maxOutlierThreshold:1e4},i[r.unavoidable]={vitalsThresholds:[2e3,5e3],maxOutlierThreshold:2e4},i),L={RT:[100,200],TBT:[200,600],NTBT:[200,600]},U=function(e,t){return L[e]?t<=L[e][0]?"good":t<=L[e][1]?"needsImprovement":"poor":null},R=function(e,t,n){Object.keys(t).forEach((function(e){"number"==typeof t[e]&&(t[e]=O(t[e]))})),N(e,t,null,n||{})},q=function(e){var t=e.attribution,n=e.name,r=e.rating,i=e.value,o=e.navigationType;"FCP"===n&&(b.value=i),["FCP","LCP"].includes(n)&&!T[0]&&(T[0]=S("longtask",I)),"FID"===n&&setTimeout((function(){k.didChange||(q({attribution:t,name:"TBT",rating:U("TBT",w.value),value:w.value,navigationType:o}),R("dataConsumption",h.value))}),1e4);var s=O(i);s<=a.maxTime&&s>=0&&N(n,s,r,t,o)},F=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},z=function(e){if("loading"===document.readyState)return"loading";var t=F();if(t){if(e(t||100)-1)return n||i;if(n=n?i+">"+n:i,r.id)break;e=r.parentNode}}catch(e){}return n},Q=-1,W=function(){return Q},H=function(e){addEventListener("pageshow",(function(t){t.persisted&&(Q=t.timeStamp,e(t))}),!0)},V=function(){var e=F();return e&&e.activationStart||0},J=function(e,t){var n=F(),r="navigate";return W()>=0?r="back-forward-cache":n&&(r=document.prerendering||V()>0?"prerender":document.wasDiscarded?"restore":n.type.replace(/_/g,"-")),{name:e,value:void 0===t?-1:t,rating:"good",delta:0,entries:[],id:"v3-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},X=function(e,t,n){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var r=new PerformanceObserver((function(e){Promise.resolve().then((function(){t(e.getEntries())}))}));return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch(e){}},G=function(e,t){var n=function n(r){"pagehide"!==r.type&&"hidden"!==document.visibilityState||(e(r),t&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)},Z=function(e,t,n,r){var i,a;return function(o){t.value>=0&&(o||r)&&((a=t.value-(i||0))||void 0===i)&&(i=t.value,t.delta=a,t.rating=function(e,t){return e>t[1]?"poor":e>t[0]?"needs-improvement":"good"}(t.value,n),e(t))}},Y=function(e){requestAnimationFrame((function(){return requestAnimationFrame((function(){return e()}))}))},ee=function(e){document.prerendering?addEventListener("prerenderingchange",(function(){return e()}),!0):e()},te=-1,ne=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},re=function(e){"hidden"===document.visibilityState&&te>-1&&(te="visibilitychange"===e.type?e.timeStamp:0,ae())},ie=function(){addEventListener("visibilitychange",re,!0),addEventListener("prerenderingchange",re,!0)},ae=function(){removeEventListener("visibilitychange",re,!0),removeEventListener("prerenderingchange",re,!0)},oe=function(){return te<0&&(te=ne(),ie(),H((function(){setTimeout((function(){te=ne(),ie()}),0)}))),{get firstHiddenTime(){return te}}},se=function(e,t){t=t||{},ee((function(){var n,r=[1800,3e3],i=oe(),a=J("FCP"),o=X("paint",(function(e){e.forEach((function(e){"first-contentful-paint"===e.name&&(o.disconnect(),e.startTime=0&&M1e12?new Date:performance.now())-e.timeStamp;"pointerdown"==e.type?function(e,t){var n=function(){le(e,t),i()},r=function(){i()},i=function(){removeEventListener("pointerup",n,ce),removeEventListener("pointercancel",r,ce)};addEventListener("pointerup",n,ce),addEventListener("pointercancel",r,ce)}(t,e):le(t,e)}},me=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach((function(t){return e(t,pe,ce)}))},fe=0,ve=1/0,ge=0,be=function(e){e.forEach((function(e){e.interactionId&&(ve=Math.min(ve,e.interactionId),ge=Math.max(ge,e.interactionId),fe=ge?(ge-ve)/7+1:0)}))},he=function(){return D?fe:performance.interactionCount||0},we=0,ye=function(){return he()-we},Te=[],ke={},_e=function(e){var t=Te[Te.length-1],n=ke[e.interactionId];if(n||Te.length<10||e.duration>t.latency){if(n)n.entries.push(e),n.latency=Math.max(n.latency,e.duration);else{var r={id:e.interactionId,latency:e.duration,entries:[e]};ke[r.id]=r,Te.push(r)}Te.sort((function(e,t){return t.latency-e.latency})),Te.splice(10).forEach((function(e){delete ke[e.id]}))}},Se={},Ee=function e(t){document.prerendering?ee((function(){return e(t)})):"complete"!==document.readyState?addEventListener("load",(function(){return e(t)}),!0):setTimeout(t,0)},xe=function(e,t){t=t||{};var n=[800,1800],r=J("TTFB"),i=Z(e,r,n,t.reportAllChanges);Ee((function(){var a=F();if(a){var o=a.responseStart;if(o<=0||o>performance.now())return;r.value=Math.max(o-V(),0),r.entries=[a],i(!0),H((function(){r=J("TTFB",0),(i=Z(e,r,n,t.reportAllChanges))(!0)}))}}))},Oe=function(e){e.forEach((function(e){e.identifier&&q({attribution:{identifier:e.identifier},name:"ET",rating:null,value:e.startTime})}))},je=function(e){e.forEach((function(e){if(a.isResourceTiming&&R("resourceTiming",e),e.decodedBodySize&&e.initiatorType){var t=e.decodedBodySize/1e3;h.value[e.initiatorType]+=t,h.value.total+=t}}))},Ne=function(){!function(e,t){xe((function(e){!function(e){if(e.entries.length){var t=e.entries[0],n=t.activationStart||0,r=Math.max(t.domainLookupStart-n,0),i=Math.max(t.connectStart-n,0),a=Math.max(t.requestStart-n,0);e.attribution={waitingTime:r,dnsTime:i-r,connectionTime:a-i,requestTime:e.value-a,navigationEntry:t}}else e.attribution={waitingTime:0,dnsTime:0,connectionTime:0,requestTime:0}}(e),function(e){e.value>0&&q(e)}(e)}),t)}(0,a.reportOptions.ttfb),function(e,t){!function(e,t){t=t||{},ee((function(){var e,n=[.1,.25],r=J("CLS"),i=-1,a=0,o=[],s=function(e){i>-1&&function(e){!function(e){if(e.entries.length){var t=e.entries.reduce((function(e,t){return e&&e.value>t.value?e:t}));if(t&&t.sources&&t.sources.length){var n=(r=t.sources).find((function(e){return e.node&&1===e.node.nodeType}))||r[0];if(n)return void(e.attribution={largestShiftTarget:$(n.node),largestShiftTime:t.startTime,largestShiftValue:t.value,largestShiftSource:n,largestShiftEntry:t,loadState:z(t.startTime)})}}var r;e.attribution={}}(e),function(e){q(e)}(e)}(e)},c=function(t){t.forEach((function(t){if(!t.hadRecentInput){var n=o[0],i=o[o.length-1];a&&t.startTime-i.startTime<1e3&&t.startTime-n.startTime<5e3?(a+=t.value,o.push(t)):(a=t.value,o=[t]),a>r.value&&(r.value=a,r.entries=o,e())}}))},u=X("layout-shift",c);u&&(e=Z(s,r,n,t.reportAllChanges),se((function(t){i=t.value,r.value<0&&(r.value=0,e())})),G((function(){c(u.takeRecords()),e(!0)})),H((function(){a=0,i=-1,r=J("CLS",0),e=Z(s,r,n,t.reportAllChanges),Y((function(){return e()}))})))}))}(0,t)}(0,a.reportOptions.cls),function(e,t){se((function(e){!function(e){if(e.entries.length){var t=F(),n=e.entries[e.entries.length-1];if(t){var r=t.activationStart||0,i=Math.max(0,t.responseStart-r);return void(e.attribution={timeToFirstByte:i,firstByteToFCP:e.value-i,loadState:z(e.entries[0].startTime),navigationEntry:t,fcpEntry:n})}}e.attribution={timeToFirstByte:0,firstByteToFCP:e.value,loadState:z(W())}}(e),function(e){q(e)}(e)}),t)}(0,a.reportOptions.fcp),function(e,t){!function(e,t){t=t||{},ee((function(){var n,r=[100,300],i=oe(),a=J("FID"),o=function(e){e.startTime0&&(i.value=0,i.entries=[]),r(!0)})),H((function(){Te=[],we=he(),i=J("INP"),r=Z(e,i,n,t.reportAllChanges)})))}))}((function(t){!function(e){if(e.entries.length){var t=e.entries.sort((function(e,t){return t.duration-e.duration||t.processingEnd-t.processingStart-(e.processingEnd-e.processingStart)}))[0];e.attribution={eventTarget:$(t.target),eventType:t.name,eventTime:t.startTime,eventEntry:t,loadState:z(t.startTime)}}else e.attribution={}}(t),e(t)}),t)}((function(e){return q(e)}),a.reportOptions.inp),a.isResourceTiming&&S("resource",je),a.isElementTiming&&S("element",Oe)},Ie=function(e){var t="usageDetails"in e?e.usageDetails:{};R("storageEstimate",{quota:j(e.quota),usage:j(e.usage),caches:j(t.caches),indexedDB:j(t.indexedDB),serviceWorker:j(t.serviceWorkerRegistrations)})},Pe={finalMarkToStepsMap:{},startMarkToStepsMap:{},active:{},navigationSteps:{}},Me=function(e){delete Pe.active[e]},Be=function(){return Pe.navigationSteps},Ce=function(e){var t;return null!==(t=Be()[e])&&void 0!==t?t:{}},De=function(e,t,n){var r="step."+e,i=u.getEntriesByName(p+t).length>0;if(u.getEntriesByName(p+n).length>0&&a.steps){var o=A[a.steps[e].threshold],s=o.maxOutlierThreshold,c=o.vitalsThresholds;if(i){var l=u.measure(r,p+t,p+n),d=l.duration;if(d<=s){var m=function(e,t){return e<=t[0]?"good":e<=t[1]?"needsImprovement":"poor"}(d,c);d>=0&&(N("userJourneyStep",d,m,{stepName:e},void 0),u.measure("step.".concat(e,"_vitals_").concat(m),{start:l.startTime+l.duration,end:l.startTime+l.duration,detail:{type:"stepVital",duration:d}}))}}}},Ae=function(){var e=Be(),t=Pe.startMarkToStepsMap,n=Object.keys(e).length;if(0===n)return{};var r={},i=n-1,a=Ce(i);if(Object.keys(a).forEach((function(e){var n,i=null!==(n=t[e])&&void 0!==n?n:[];Object.keys(i).forEach((function(e){r[e]=!0}))})),n>1){var o=Ce(i-1);Object.keys(o).forEach((function(e){var n,i=null!==(n=t[e])&&void 0!==n?n:[];Object.keys(i).forEach((function(e){r[e]=!0}))}))}return r},Le=function(){var e,t=Object.keys(Pe.navigationSteps).length;Pe.navigationSteps[t]={};var n=Ae();null===(e=a.onMarkStep)||void 0===e||e.call(a,"",Object.keys(n))},Ue=function(e){var t,n,r,i,o,s,c;if(Pe.finalMarkToStepsMap[e]){!function(e){var t=Pe.navigationSteps,n=Pe.finalMarkToStepsMap,r=Object.keys(t).length;if(0!==r){var i=r-1,a=Ce(i);if(a&&n[e]){var o=n[e];o&&Object.keys(o).forEach((function(e){if(a[e]){var n=Ce(i)||{};n[e]=!1,t[i]=n}if(r>1){var o=i-1,s=Ce(o);s[e]&&(s[e]=!1,t[o]=s)}}))}}}(e);var u=Pe.finalMarkToStepsMap[e];Object.keys(u).forEach((function(t){var n=u[t];n.forEach(Me),Promise.all(n.map((function(n){return function(e,t,n,r){return new(n||(n=Promise))((function(e,t){function i(e){try{o(r.next(e))}catch(e){t(e)}}function a(e){try{o(r.throw(e))}catch(e){t(e)}}function o(t){var r;t.done?e(t.value):(r=t.value,r instanceof n?r:new n((function(e){e(r)}))).then(i,a)}o((r=r.apply(undefined,[])).next())}))}(0,0,void 0,(function(){return function(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&a[0]?r.return:a[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,a[1])).done)return i;switch(r=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,r=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]0?o:1)-1)||[])[r]=!0,i[s]=c,function(e){var t,n=null!==(t=Pe.startMarkToStepsMap[e])&&void 0!==t?t:[];Object.keys(n).forEach((function(e){Pe.active[e]||(Pe.active[e]=!0)}))}(e);if(a.enableNavigationTracking){var l=Ae();null===(t=a.onMarkStep)||void 0===t||t.call(a,e,Object.keys(l))}else null===(n=a.onMarkStep)||void 0===n||n.call(a,e,Object.keys(Pe.active))},Re=function(e){u.mark(p+e),Ue(e)},qe=function(e){0===u.getEntriesByName(p+e).length&&(u.mark(p+e),Ue(e))},Fe=0,ze=function(){function e(e){if(void 0===e&&(e={}),this.v="9.0.0-rc.3",a.analyticsTracker=e.analyticsTracker,a.isResourceTiming=!!e.resourceTiming,a.isElementTiming=!!e.elementTiming,a.maxTime=e.maxMeasureTime||a.maxTime,a.reportOptions=e.reportOptions||a.reportOptions,a.steps=e.steps,a.onMarkStep=e.onMarkStep,a.enableNavigationTracking=e.enableNavigationTracking,m()){"PerformanceObserver"in o&&Ne(),void 0!==document.hidden&&document.addEventListener("visibilitychange",_);var t=function(){if(!m())return{};var e=u.getEntriesByType("navigation")[0];if(!e)return{};var t=e.responseStart,n=e.responseEnd;return{fetchTime:n-e.fetchStart,workerTime:e.workerStart>0?n-e.workerStart:0,totalTime:n-e.requestStart,downloadTime:n-t,timeToFirstByte:t-e.requestStart,headerSize:e.transferSize-e.encodedBodySize||0,dnsLookupTime:e.domainLookupEnd-e.domainLookupStart,redirectTime:e.redirectEnd-e.redirectStart}}();R("navigationTiming",t),t.redirectTime&&q({attribution:{},name:"RT",rating:U("RT",t.redirectTime),value:t.redirectTime}),R("networkInformation",function(){if("connection"in c){var e=c.connection;return"object"!=typeof e?{}:(f=e.effectiveType,v=!!e.saveData,{downlink:e.downlink,effectiveType:e.effectiveType,rtt:e.rtt,saveData:!!e.saveData})}return{}}()),c&&c.storage&&"function"==typeof c.storage.estimate&&c.storage.estimate().then(Ie),a.steps&&a.steps&&(Pe.startMarkToStepsMap={},Pe.finalMarkToStepsMap={},Pe.active={},Pe.navigationSteps={},Object.entries(a.steps).forEach((function(e){var t,n,r=e[0],i=e[1].marks,a=i[0],o=i[1],s=null!==(n=Pe.startMarkToStepsMap[a])&&void 0!==n?n:{};if(s[r]=!0,Pe.startMarkToStepsMap[a]=s,Pe.finalMarkToStepsMap[o]){var c=Pe.finalMarkToStepsMap[o][a]||[];c.push(r),Pe.finalMarkToStepsMap[o][a]=c}else Pe.finalMarkToStepsMap[o]=((t={})[a]=[r],t)})))}}return e.prototype.start=function(e){m()&&!g[e]&&(g[e]=!0,u.mark("mark_".concat(e,"_start")))},e.prototype.end=function(e,t,n){if(void 0===t&&(t={}),void 0===n&&(n=!0),m()&&g[e]){u.mark("mark_".concat(e,"_end")),delete g[e];var r=function(e){u.measure(e,"mark_".concat(e,"_start"),"mark_".concat(e,"_end"));var t=u.getEntriesByName(e).pop();return t&&"measure"===t.entryType?t.duration:-1}(e);n&&R(e,O(r),t)}},e.prototype.endPaint=function(e,t){var n=this;setTimeout((function(){n.end(e,t)}))},e.prototype.clear=function(e){delete g[e],u.clearMarks&&(u.clearMarks("mark_".concat(e,"_start")),u.clearMarks("mark_".concat(e,"_end")))},e.prototype.markNTBT=function(){var e=this;this.start("ntbt"),y.value=0,clearTimeout(Fe),Fe=setTimeout((function(){e.end("ntbt",{},!1),q({attribution:{},name:"NTBT",rating:U("NTBT",y.value),value:y.value}),y.value=0}),2e3)},e}()},426:(e,t)=>{"use strict";Symbol.for("react.element"),Symbol.for("react.portal"),Symbol.for("react.fragment"),Symbol.for("react.strict_mode"),Symbol.for("react.profiler"),Symbol.for("react.provider"),Symbol.for("react.context"),Symbol.for("react.forward_ref"),Symbol.for("react.suspense"),Symbol.for("react.memo"),Symbol.for("react.lazy"),Symbol.iterator;var n={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},r=Object.assign,i={};function a(e,t,r){this.props=e,this.context=t,this.refs=i,this.updater=r||n}function o(){}function s(e,t,r){this.props=e,this.context=t,this.refs=i,this.updater=r||n}a.prototype.isReactComponent={},a.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},a.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},o.prototype=a.prototype;var c=s.prototype=new o;c.constructor=s,r(c,a.prototype),c.isPureReactComponent=!0;Array.isArray,Object.prototype.hasOwnProperty;var u={current:null};t.useCallback=function(e,t){return u.current.useCallback(e,t)},t.useEffect=function(e,t){return u.current.useEffect(e,t)},t.useRef=function(e){return u.current.useRef(e)}},784:(e,t,n)=>{"use strict";e.exports=n(426)},353:function(e,t,n){var r;!function(i,a){"use strict";var o="function",s="undefined",c="object",u="string",l="major",d="model",p="name",m="type",f="vendor",v="version",g="architecture",b="console",h="mobile",w="tablet",y="smarttv",T="wearable",k="embedded",_="Amazon",S="Apple",E="ASUS",x="BlackBerry",O="Browser",j="Chrome",N="Firefox",I="Google",P="Huawei",M="LG",B="Microsoft",C="Motorola",D="Opera",A="Samsung",L="Sharp",U="Sony",R="Xiaomi",q="Zebra",F="Facebook",z="Chromium OS",K="Mac OS",$=function(e){for(var t={},n=0;n0?2===s.length?typeof s[1]==o?this[s[0]]=s[1].call(this,l):this[s[0]]=s[1]:3===s.length?typeof s[1]!==o||s[1].exec&&s[1].test?this[s[0]]=l?l.replace(s[1],s[2]):a:this[s[0]]=l?s[1].call(this,l,s[2]):a:4===s.length&&(this[s[0]]=l?s[3].call(this,l.replace(s[1],s[2])):a):this[s]=l||a;d+=2}},J=function(e,t){for(var n in t)if(typeof t[n]===c&&t[n].length>0){for(var r=0;r2&&(e[d]="iPad",e[m]=w),e},this.getEngine=function(){var e={};return e[p]=a,e[v]=a,V.call(e,r,y.engine),e},this.getOS=function(){var e={};return e[p]=a,e[v]=a,V.call(e,r,y.os),T&&!e[p]&&b&&"Unknown"!=b.platform&&(e[p]=b.platform.replace(/chrome os/i,z).replace(/macos/i,K)),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return r},this.setUA=function(e){return r=typeof e===u&&e.length>350?H(e,350):e,this},this.setUA(r),this};Z.VERSION="1.0.35",Z.BROWSER=$([p,v,l]),Z.CPU=$([g]),Z.DEVICE=$([d,f,m,b,h,y,w,T,k]),Z.ENGINE=Z.OS=$([p,v]),typeof t!==s?(e.exports&&(t=e.exports=Z),t.UAParser=Z):n.amdO?(r=function(){return Z}.call(t,n,t,e))===a||(e.exports=r):typeof i!==s&&(i.UAParser=Z);var Y=typeof i!==s&&(i.jQuery||i.Zepto);if(Y&&!Y.ua){var ee=new Z;Y.ua=ee.getResult(),Y.ua.get=function(){return ee.getUA()},Y.ua.set=function(e){ee.setUA(e);var t=ee.getResult();for(var n in t)Y.ua[n]=t[n]}}}("object"==typeof window?window:this)}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var a=t[r]={exports:{}};return e[r].call(a.exports,a,a.exports,n),a.exports}n.amdO={},n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{ActionType:()=>f,AmplitudePlatformName:()=>g,AnalyticsEventImportance:()=>l,AnalyticsQueries:()=>e,AuthStatus:()=>b,ComponentType:()=>m,IThresholdTier:()=>Jt,MetricType:()=>d,PlatformName:()=>v,SessionActions:()=>h,SessionAutomatedEvents:()=>w,SessionRank:()=>y,SubjectType:()=>p,UserTypeCommerce:()=>c,UserTypeInsto:()=>i,UserTypeRetail:()=>t,UserTypeRetailBusinessBanking:()=>s,UserTypeRetailEmployeeInternal:()=>a,UserTypeRetailEmployeePersonal:()=>o,UserTypeWallet:()=>u,automatedEvents:()=>xn,automatedMappingConfig:()=>In,clearMarkEntry:()=>Vn,clearPerformanceMarkEntries:()=>Xn,config:()=>A,createEventConfig:()=>On,createNewSpan:()=>Ln,createNewTrace:()=>Un,device:()=>W,endPerfMark:()=>Jn,exposeExperiment:()=>wn,flushQueue:()=>or,generateUUID:()=>V,getAnalyticsHeaders:()=>sr,getReferrerData:()=>le,getTracingHeaders:()=>An,getTracingId:()=>Dn,getUrlHostname:()=>pe,getUrlParams:()=>me,getUrlPathname:()=>fe,getUserContext:()=>ar,identify:()=>Tn,identifyFlow:()=>xe,identity:()=>H,identityFlow:()=>Se,incrementUjNavigation:()=>an,init:()=>yn,initNextJsTrackPageview:()=>_n,initTrackPageview:()=>kn,isEventKeyFormatValid:()=>we,isSessionEnded:()=>pt,location:()=>re,logEvent:()=>$t,logMetric:()=>Ht,logPageView:()=>on,logTrace:()=>Rn,markNTBT:()=>tn,markStep:()=>nn,markStepOnce:()=>rn,onVisibilityChange:()=>ln,optIn:()=>En,optOut:()=>Sn,perfMark:()=>Wn,persistentData:()=>oe,postMessage:()=>K,recordSessionDuration:()=>pn,removeFromIdentifyFlow:()=>Ee,savePersistentData:()=>st,sendScheduledEvents:()=>Bt,setBreadcrumbs:()=>ie,setConfig:()=>U,setLocation:()=>ae,setPagePath:()=>ve,setPageview:()=>Kt,setPersistentData:()=>se,setSessionStart:()=>dt,setTime:()=>Ue,startPerfMark:()=>Hn,timeStone:()=>Le,useEventLogger:()=>Yn,useLogEventOnMount:()=>tr,usePerformanceMarks:()=>rr});let e=function(e){return e.fbclid="fbclid",e.gclid="gclid",e.msclkid="msclkid",e.ptclid="ptclid",e.ttclid="ttclid",e.utm_source="utm_source",e.utm_medium="utm_medium",e.utm_campaign="utm_campaign",e.utm_term="utm_term",e.utm_content="utm_content",e}({});const t=0,i=1,a=2,o=3,s=4,c=5,u=6;let l=function(e){return e.low="low",e.high="high",e}({}),d=function(e){return e.count="count",e.rate="rate",e.gauge="gauge",e.distribution="distribution",e.histogram="histogram",e}({}),p=function(e){return e.commerce_merchant="commerce_merchant",e.device="device",e.edp_fingerprint_id="edp_fingerprint_id",e.nft_user="nft_user",e.user="user",e.wallet_user="wallet_user",e.uuid="user_uuid",e}({}),m=function(e){return e.unknown="unknown",e.banner="banner",e.button="button",e.card="card",e.chart="chart",e.content_script="content_script",e.dropdown="dropdown",e.link="link",e.page="page",e.modal="modal",e.table="table",e.search_bar="search_bar",e.service_worker="service_worker",e.text="text",e.text_input="text_input",e.tray="tray",e.checkbox="checkbox",e.icon="icon",e}({}),f=function(e){return e.unknown="unknown",e.blur="blur",e.click="click",e.change="change",e.dismiss="dismiss",e.focus="focus",e.hover="hover",e.select="select",e.measurement="measurement",e.move="move",e.process="process",e.render="render",e.scroll="scroll",e.view="view",e.search="search",e.keyPress="keyPress",e}({}),v=function(e){return e.unknown="unknown",e.web="web",e.android="android",e.ios="ios",e.mobile_web="mobile_web",e.tablet_web="tablet_web",e.server="server",e.windows="windows",e.macos="macos",e.extension="extension",e}({}),g=function(e){return e.web="Web",e.ios="iOS",e.android="Android",e}({}),b=function(e){return e[e.notLoggedIn=0]="notLoggedIn",e[e.loggedIn=1]="loggedIn",e}({}),h=function(e){return e.ac="ac",e.af="af",e.ah="ah",e.al="al",e.am="am",e.ar="ar",e.as="as",e}({}),w=function(e){return e.pv="pv",e}({}),y=function(e){return e.xs="xs",e.s="s",e.m="m",e.l="l",e.xl="xl",e.xxl="xxl",e}({});const T="https://analytics-service-dev.cbhq.net",k=3e5,_=5e3,S="analytics-db",E="experiment-exposure-db",x="Analytics SDK:",O=Object.values(e),j="pageview",N="session_duration",I={navigationTiming:{eventName:"perf_navigation_timing"},redirectTime:{eventName:"perf_redirect_time"},RT:{eventName:"perf_redirect_time"},TTFB:{eventName:"perf_time_to_first_byte"},networkInformation:{eventName:"perf_network_information"},storageEstimate:{eventName:"perf_storage_estimate"},FCP:{eventName:"perf_first_contentful_paint"},FID:{eventName:"perf_first_input_delay"},LCP:{eventName:"perf_largest_contentful_paint"},CLS:{eventName:"perf_cumulative_layout_shift"},TBT:{eventName:"perf_total_blocking_time"},NTBT:{eventName:"perf_navigation_total_blocking_time"},INP:{eventName:"perf_interact_to_next_paint"},ET:{eventName:"perf_element_timing"},userJourneyStep:{eventName:"perf_user_journey_step"}},P="1",M="web";function B(){return B=Object.assign?Object.assign.bind():function(e){for(var t=1;t{console.error(x,e,t)},platform:v.unknown,projectName:"",ricTimeoutScheduleEvent:1e3,ricTimeoutSetDevice:500,showDebugLogging:!1,trackUserId:!1,version:null,apiEndpoint:T},D(T),{steps:{}}),L=[].reduce(((e,t)=>n=>e(t(n))),(e=>{if(!e.isProd)return e.isInternalApplication?(e.apiEndpoint="https://analytics-service-internal-dev.cbhq.net",B({},e,D(e.apiEndpoint))):e;const t=(e=>e.apiEndpoint?C.test(e.apiEndpoint)?e.apiEndpoint:`https://${e.apiEndpoint}`:e.isInternalApplication?"https://analytics-service-internal.cbhq.net":"https://as.coinbase.com")(e);return B({},e,{apiEndpoint:t},D(t))})),U=e=>{const{batchEventsThreshold:t,batchMetricsThreshold:n,batchTracesThreshold:r}=e,i=[t,n,r];for(const e of i)if((e||0)>30){console.warn("You are setting the threshhold for the batch limit to be greater than 30. This may cause request overload.");break}Object.assign(A,L(e))},R=[v.web,v.mobile_web,v.tablet_web];function q(){return"android"===A.platform}function F(){return"ios"===A.platform}function z(){return R.includes(A.platform)}function K(e){if(z()&&navigator&&"serviceWorker"in navigator&&navigator.serviceWorker.controller)try{navigator.serviceWorker.controller.postMessage(e)}catch(e){e instanceof Error&&A.onError(e)}}var $=n(353),Q=n.n($);const W={amplitudeOSName:null,amplitudeOSVersion:null,amplitudeDeviceModel:null,amplitudePlatform:null,browserName:null,browserMajor:null,osName:null,userAgent:null,width:null,height:null},H={countryCode:null,deviceId:null,device_os:null,isOptOut:!1,languageCode:null,locale:null,jwt:null,session_lcc_id:null,userAgent:null,userId:null},V=e=>e?(e^16*Math.random()>>e/4).toString(16):"10000000-1000-4000-8000-100000000000".replace(/[018]/g,V),J=()=>A.isAlwaysAuthed||!!H.userId,X=()=>{const e={};return H.countryCode&&(e.country_code=H.countryCode),e},G=()=>{const{platform:e}=A;if(e===v.web)switch(!0){case window.matchMedia("(max-width: 560px)").matches:return v.mobile_web;case window.matchMedia("(max-width: 1024px, min-width: 561px)").matches:return v.tablet_web}return e},Z=()=>{var e,t,n,r,i;z()?("requestIdleCallback"in window?window.requestIdleCallback(ne,{timeout:A.ricTimeoutSetDevice}):ne(),W.amplitudePlatform=g.web,W.userAgent=(null==(e=window)||null==(e=e.navigator)?void 0:e.userAgent)||null,ee({height:null!=(t=null==(n=window)?void 0:n.innerHeight)?t:null,width:null!=(r=null==(i=window)?void 0:i.innerWidth)?r:null})):F()?(W.amplitudePlatform=g.ios,W.userAgent=H.userAgent,W.userAgent&&ne()):q()&&(W.userAgent=H.userAgent,W.amplitudePlatform=g.android,W.userAgent&&ne())},Y=e=>{Object.assign(H,e),z()&&K({identity:{isAuthed:!!H.userId,locale:H.locale||null}})},ee=e=>{W.height=e.height,W.width=e.width},te=()=>{U({platform:G()}),z()&&K({config:{platform:A.platform}})},ne=()=>{var e;performance.mark&&performance.mark("ua_parser_start");const t=new(Q())(null!=(e=W.userAgent)?e:"").getResult();W.browserName=t.browser.name||null,W.browserMajor=t.browser.major||null,W.osName=t.os.name||null,W.amplitudeOSName=W.browserName,W.amplitudeOSVersion=W.browserMajor,W.amplitudeDeviceModel=W.osName,K({device:{browserName:W.browserName,osName:W.osName}}),performance.mark&&(performance.mark("ua_parser_end"),performance.measure("ua_parser","ua_parser_start","ua_parser_end"))},re={breadcrumbs:[],initialUAAData:{},pageKey:"",pageKeyRegex:{},pagePath:"",prevPageKey:"",prevPagePath:""};function ie(e){Object.assign(re,{breadcrumbs:e})}function ae(e){Object.assign(re,e)}const oe={eventId:0,sequenceNumber:0,sessionId:0,lastEventTime:0,sessionStart:0,sessionUUID:null,userId:null,ac:0,af:0,ah:0,al:0,am:0,ar:0,as:0,pv:0};function se(e){Object.assign(oe,e)}function ce(){var e,t;return null!=(e=null==(t=document)?void 0:t.referrer)?e:""}function ue(){return ue=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const e=ce();if(!e)return{};const t=new URL(e);return t.hostname===pe()?{}:{referrer:e,referring_domain:t.hostname}},de=()=>{const e=new URLSearchParams(me()),t={};return O.forEach((n=>{e.has(n)&&(t[n]=(e.get(n)||"").toLowerCase())})),t},pe=()=>{var e;return(null==(e=window)||null==(e=e.location)?void 0:e.hostname)||""},me=()=>{var e;return(null==(e=window)||null==(e=e.location)?void 0:e.search)||""},fe=()=>{var e;return(null==(e=window)||null==(e=e.location)?void 0:e.pathname)||""},ve=()=>{const e=A.overrideWindowLocation?re.pagePath:fe()+me();e&&e!==re.pagePath&&(e!==re.pagePath&&ge(),re.pagePath=e,re.pageKeyRegex&&Object.keys(re.pageKeyRegex).some((e=>{if(re.pageKeyRegex[e].test(re.pagePath))return re.pageKey=e,!0})))},ge=()=>{if(z()){const e=ce();if(!re.prevPagePath&&e){const t=new URL(e);if(t.hostname===pe())return void(re.prevPagePath=t.pathname)}}re.prevPagePath=re.pagePath,re.prevPageKey=re.pageKey},be=e=>{z()&&Object.assign(e,z()?(Object.keys(re.initialUAAData).length>0||(new URLSearchParams(me()),re.initialUAAData=ue({},(()=>{const e={};return O.forEach((t=>{oe[t]&&(e[t]=oe[t])})),e})(),de(),le())),re.initialUAAData):re.initialUAAData)},he=/^[a-zd]+(_[a-zd]+)*$/;function we(e){return he.test(e)}function ye(){return ye=Object.assign?Object.assign.bind():function(e){for(var t=1;t{ke.includes(e)&&delete Se[e]}))}function xe(e){var t;const n=Object.entries(e).reduce(((e,t)=>{const[n,r]=t;return!Te.includes(n)&&ke.includes(n)?we(n)?ye({},e,{[n]:r}):(A.onError(new Error("IdentityFlow property names must have snake case format"),{[n]:r}),e):e}),{});null!=(t=n.ujs)&&t.length&&(n.ujs=n.ujs.map((e=>`${_e}${e}`))),Object.assign(Se,n)}function Oe(){return A.platform!==v.unknown||(A.onError(new Error("SDK platform not initialized")),!1)}const je={eventsQueue:[],eventsScheduled:!1,metricsQueue:[],metricsScheduled:!1,tracesQueue:[],tracesScheduled:!1};function Ne(e){Object.assign(je,e)}const Ie={ac:0,af:0,ah:0,al:0,am:0,ar:0,as:0,pv:0,sqs:0},Pe={ac:20,af:5,ah:1,al:1,am:0,ar:10,as:20},Me={pv:25},Be={xs:0,s:1,m:1,l:2,xl:2,xxl:2},Ce=e=>e<15?y.xs:e<60?y.s:e<240?y.m:e<960?y.l:e<3840?y.xl:y.xxl,De=e=>{Object.assign(Ie,e)};function Ae(){return(new Date).getTime()}const Le={timeStart:Ae(),timeOnPagePath:0,timeOnPageKey:0,prevTimeOnPagePath:0,prevTimeOnPageKey:0,sessionDuration:0,sessionEnd:0,sessionStart:0,prevSessionDuration:0};function Ue(e){Object.assign(Le,e)}const Re=(e,t)=>t.some((t=>e instanceof t));let qe,Fe;const ze=new WeakMap,Ke=new WeakMap,$e=new WeakMap,Qe=new WeakMap,We=new WeakMap;let He={get(e,t,n){if(e instanceof IDBTransaction){if("done"===t)return Ke.get(e);if("objectStoreNames"===t)return e.objectStoreNames||$e.get(e);if("store"===t)return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return Je(e[t])},set:(e,t,n)=>(e[t]=n,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function Ve(e){return"function"==typeof e?(t=e)!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?(Fe||(Fe=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(t)?function(...e){return t.apply(Xe(this),e),Je(ze.get(this))}:function(...e){return Je(t.apply(Xe(this),e))}:function(e,...n){const r=t.call(Xe(this),e,...n);return $e.set(r,e.sort?e.sort():[e]),Je(r)}:(e instanceof IDBTransaction&&function(e){if(Ke.has(e))return;const t=new Promise(((t,n)=>{const r=()=>{e.removeEventListener("complete",i),e.removeEventListener("error",a),e.removeEventListener("abort",a)},i=()=>{t(),r()},a=()=>{n(e.error||new DOMException("AbortError","AbortError")),r()};e.addEventListener("complete",i),e.addEventListener("error",a),e.addEventListener("abort",a)}));Ke.set(e,t)}(e),Re(e,qe||(qe=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(e,He):e);var t}function Je(e){if(e instanceof IDBRequest)return function(e){const t=new Promise(((t,n)=>{const r=()=>{e.removeEventListener("success",i),e.removeEventListener("error",a)},i=()=>{t(Je(e.result)),r()},a=()=>{n(e.error),r()};e.addEventListener("success",i),e.addEventListener("error",a)}));return t.then((t=>{t instanceof IDBCursor&&ze.set(t,e)})).catch((()=>{})),We.set(t,e),t}(e);if(Qe.has(e))return Qe.get(e);const t=Ve(e);return t!==e&&(Qe.set(e,t),We.set(t,e)),t}const Xe=e=>We.get(e),Ge=["get","getKey","getAll","getAllKeys","count"],Ze=["put","add","delete","clear"],Ye=new Map;function et(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!=typeof t)return;if(Ye.get(t))return Ye.get(t);const n=t.replace(/FromIndex$/,""),r=t!==n,i=Ze.includes(n);if(!(n in(r?IDBIndex:IDBObjectStore).prototype)||!i&&!Ge.includes(n))return;const a=async function(e,...t){const a=this.transaction(e,i?"readwrite":"readonly");let o=a.store;return r&&(o=o.index(t.shift())),(await Promise.all([o[n](...t),i&&a.done]))[0]};return Ye.set(t,a),a}var tt;tt=He,He={...tt,get:(e,t,n)=>et(e,t)||tt.get(e,t,n),has:(e,t)=>!!et(e,t)||tt.has(e,t)};const nt={isReady:!1,idbKeyval:null};function rt(e){Object.assign(nt,e)}const it={},at=async e=>{if(!nt.idbKeyval)return Promise.resolve(null);try{return await nt.idbKeyval.get(e)}catch(e){return A.onError(new Error("IndexedDB:Get:InternalError")),Promise.resolve(null)}},ot=async(e,t)=>{if(nt.idbKeyval)try{await nt.idbKeyval.set(e,t)}catch(e){A.onError(new Error("IndexedDB:Set:InternalError"))}},st=()=>{"server"!==A.platform&&(se({sessionStart:Le.sessionStart,ac:Ie.ac,af:Ie.af,ah:Ie.ah,al:Ie.al,am:Ie.am,ar:Ie.ar,as:Ie.as,pv:Ie.pv}),H.userId&&se({userId:H.userId}),ot(S,oe))},ct="rgb(5,177,105)",ut=e=>{const{metricName:t,data:n}=e,r=e.importance||l.low;if(!A.showDebugLogging||!console)return;const i=`%c ${x}`,a=`color:${ct};font-size:11px;`,o=`Importance: ${r}`;console.group(i,a,t,o),n.forEach((e=>{e.event_type?console.log(e.event_type,e):console.log(e)})),console.groupEnd()},lt=e=>{const{metricName:t,data:n}=e,r=e.importance||l.low;if(!A.showDebugLogging||!console)return;const i=`color:${ct};font-size:11px;`,a=`%c ${x}`,o=`Importance: ${r}`;console.log(a,i,t,n,o)},dt=()=>{const e=Ae();oe.sessionId&&oe.lastEventTime&&oe.sessionUUID&&!pt(e)||(oe.sessionId=e,oe.sessionUUID=V(),Ue({sessionStart:e}),lt({metricName:"Started new session:",data:{persistentData:oe,timeStone:Le}})),oe.lastEventTime=e},pt=e=>e-oe.lastEventTime>18e5;function mt(){return mt=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var t;(e=>{switch(e.action){case f.click:Ie.ac+=1;break;case f.focus:Ie.af+=1;break;case f.hover:Ie.ah+=1;break;case f.move:Ie.am+=1;break;case f.scroll:Ie.al+=1;break;case f.search:Ie.ar+=1;break;case f.select:Ie.as+=1}})(t=e),t.event_type!==j?t.event_type===N&&((e=>{if(!e.session_rank)return;const t=e.session_rank;Object.values(h).forEach((e=>{Ie.sqs+=Ie[e]*Pe[e]})),Object.values(w).forEach((e=>{Ie.sqs+=Ie[e]*Me[e]})),Ie.sqs*=Be[t]})(t),Object.assign(t,Ie),De({ac:0,af:0,ah:0,al:0,am:0,ar:0,as:0,pv:0,sqs:0})):Ie.pv+=1;const n=e.event_type;delete e.event_type;const r=e.deviceId?e.deviceId:null,i=e.timestamp;return delete e.timestamp,se({eventId:oe.eventId+1}),se({sequenceNumber:oe.sequenceNumber+1}),dt(),st(),{device_id:H.deviceId||r||null,user_id:H.userId,timestamp:i,event_id:oe.eventId,session_id:oe.sessionId||-1,event_type:n,version_name:A.version||null,platform:W.amplitudePlatform,os_name:W.amplitudeOSName,os_version:W.amplitudeOSVersion,device_model:W.amplitudeDeviceModel,language:H.languageCode,event_properties:mt({},e,{session_uuid:oe.sessionUUID,height:W.height,width:W.width}),user_properties:X(),uuid:V(),library:{name:"@cbhq/client-analytics",version:"10.6.0"},sequence_number:oe.sequenceNumber,user_agent:W.userAgent||H.userAgent}},vt=e=>e.map((e=>ft(e)));function gt(){return gt=Object.assign?Object.assign.bind():function(e){for(var t=1;te.map((e=>(e=>{const t=e.tags||{},n=gt({authed:J()?"true":"false",platform:A.platform},t,{project_name:A.projectName,version_name:A.version||null});return{metric_name:e.metricName,page_path:e.pagePath||null,value:e.value,tags:n,type:e.metricType}})(e))),ht=e=>0!==je.metricsQueue.length&&(je.metricsQueue.length>=A.batchMetricsThreshold||(je.metricsScheduled||(je.metricsScheduled=!0,setTimeout((()=>{je.metricsScheduled=!1,e(bt(je.metricsQueue)),je.metricsQueue=[]}),A.batchMetricsPeriod)),!1)),wt=e=>0!==je.tracesQueue.length&&(je.tracesQueue.length>=A.batchTracesThreshold||(je.tracesScheduled||(je.tracesScheduled=!0,setTimeout((()=>{je.tracesScheduled=!1,e(je.tracesQueue),je.tracesQueue=[]}),A.batchTracesPeriod)),!1)),yt=e=>{var t;z()&&null!=(t=window)&&t.requestIdleCallback?window.requestIdleCallback(e,{timeout:A.ricTimeoutScheduleEvent}):(q()||F())&&A.interactionManager?A.interactionManager.runAfterInteractions(e):e()};function Tt(){return Tt=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{data:t,importance:n,isJSON:r,onError:i,url:a}=e,o=r?"application/json":kt,s=n||l.low,c=r?JSON.stringify(t):new URLSearchParams(t).toString();function u(){const e=new XMLHttpRequest;e.open("POST",a,!0),Object.keys(A.headers||{}).forEach((t=>{e.setRequestHeader(t,A.headers[t])})),e.setRequestHeader("Content-Type",kt),H.jwt&&e.setRequestHeader("authorization",`Bearer ${H.jwt}`),e.send(c)}if(!z()||r||!("sendBeacon"in navigator)||s!==l.low||A.headers&&0!==Object.keys(A.headers).length)if(z()&&!r)u();else{const e=Tt({},A.headers,{"Content-Type":o});H.jwt&&(e.Authorization=`Bearer ${H.jwt}`),fetch(a,{method:"POST",mode:"no-cors",headers:e,body:c}).catch((e=>{i(e,{context:"AnalyticsSDKApiError"})}))}else{const e=new Blob([c],{type:kt});try{navigator.sendBeacon.bind(navigator)(a,e)||u()}catch(e){console.error(e),u()}}};var St=n(762),Et=n.n(St);const xt=(e,t,n)=>{const r=e||"";return Et()("2"+r+t+n)};function Ot(){return Ot=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var n;e&&je.eventsQueue.push(e),nt.isReady&&(!A.trackUserId||H.userId?(t===l.high||(n=Mt,0!==je.eventsQueue.length&&(je.eventsQueue.length>=A.batchEventsThreshold||(je.eventsScheduled||(je.eventsScheduled=!0,setTimeout((()=>{je.eventsScheduled=!1,n(vt(je.eventsQueue)),je.eventsQueue=[]}),A.batchEventsPeriod)),0))))&&Bt():je.eventsQueue.length>10&&(A.trackUserId=!1,A.onError(new Error("userId not set in Logged-in"))))},Mt=(e,t=l.low)=>{if(H.isOptOut||0===e.length)return;let n;try{n=JSON.stringify(e)}catch(t){const r=e.map((e=>e.event_type)).join(", "),[i,a]=(e=>{try{const n=[];for(const r of e){const e=Ot({},r);r.event_properties&&(e.event_properties=Ot({},e.event_properties,{currentTarget:null,target:null,relatedTarget:null,_dispatchInstances:null,_targetInst:null,view:(t=r.event_properties.view,["string","number","boolean"].includes(typeof t)?r.event_properties.view:null)})),n.push(e)}return[!0,JSON.stringify(n)]}catch(e){return[!1,""]}var t})(e);if(!i)return void A.onError(new jt(t instanceof Error?t.message:"unknown"),{listEventType:r});n=a,A.onError(new Nt("Found DOM element reference"),{listEventType:r,stringifiedEventData:n})}const r=Ae().toString(),i=It({},{e:n,v:"2",upload_time:r},{client:A.amplitudeApiKey,checksum:xt(A.amplitudeApiKey,n,r)});_t({url:A.eventsEndpoint,data:i,importance:t,onError:A.onError}),ut({metricName:"Batch Events",data:e,importance:t})},Bt=()=>{Mt(vt(je.eventsQueue)),Ne({eventsQueue:[]})};function Ct(){return Ct=Object.assign?Object.assign.bind():function(e){for(var t=1;tDt.includes(e)?e:f.unknown,Ut=e=>At.includes(e)?e:m.unknown,Rt=(e,t,n)=>{const r={auth:J()?b.loggedIn:b.notLoggedIn,action:Lt(e),component_type:Ut(t),logging_id:n,platform:A.platform,project_name:A.projectName};return"number"==typeof H.userTypeEnum&&(r.user_type_enum=H.userTypeEnum),r},qt=e=>{const t=Ae();if(!e)return A.onError(new Error("missing logData")),Ct({},Rt(f.unknown,m.unknown),{locale:H.locale,session_lcc_id:H.session_lcc_id,timestamp:t,time_start:Le.timeStart});const n=Ct({},e,Rt(e.action,e.componentType,e.loggingId),{locale:H.locale,session_lcc_id:H.session_lcc_id,timestamp:t,time_start:Le.timeStart});return delete n.componentType,delete n.loggingId,n},Ft={blacklistRegex:[],isEnabled:!1};function zt(){return{page_key:re.pageKey,page_path:re.pagePath,prev_page_key:re.prevPageKey,prev_page_path:re.prevPagePath}}function Kt(e){Object.assign(Ft,e)}function $t(e,t,n=l.low){if(H.isOptOut)return;if(!Oe())return;const r=qt(t);!function(e){Ft.isEnabled&&(ve(),Object.assign(e,zt()))}(r),be(r),function(e){Object.keys(Se).length>0&&Object.assign(e,Se)}(r),r.has_double_fired=!1,r.event_type=e,n===l.high?Pt(r,n):yt((()=>{Pt(r)}))}function Qt(e,t=!1){t?_t({url:A.metricsEndPoint,data:{metrics:e},isJSON:!0,onError:A.onError}):yt((()=>{_t({url:A.metricsEndPoint,data:{metrics:e},isJSON:!0,onError:A.onError})})),ut({metricName:"Batch Metrics",data:e})}function Wt(){return Wt=Object.assign?Object.assign.bind():function(e){for(var t=1;t{null!=A&&A.onMarkStep&&A.onMarkStep(e,t),xe({ujs:t})};let Yt;const en={Perfume:()=>{},markStep:e=>{},markStepOnce:e=>{},incrementUjNavigation:()=>{}},tn=()=>{z()&&Yt&&Yt.markNTBT&&Yt.markNTBT()},nn=e=>{z()&&Yt&&en.markStep&&en.markStep(e)},rn=e=>{z()&&Yt&&en.markStepOnce&&en.markStepOnce(e)},an=()=>{z()&&Yt&&en.incrementUjNavigation&&en.incrementUjNavigation()};function on(e={callMarkNTBT:!0}){"unknown"!==A.platform&&(Ft.blacklistRegex.some((e=>e.test(fe())))||($t(j,{action:f.render,componentType:m.page}),e.callMarkNTBT&&tn()))}let sn=!1,cn=!1;const un=e=>{sn=!e.persisted},ln=(e,t="hidden",n=!1)=>{cn||(addEventListener("pagehide",un),addEventListener("beforeunload",(()=>{})),cn=!0),addEventListener("visibilitychange",(({timeStamp:n})=>{document.visibilityState===t&&e({timeStamp:n,isUnloading:sn})}),{capture:!0,once:n})},dn=36e3;function pn(){const e=pt(Ae());if(e&&(O.forEach((e=>{oe[e]&&delete oe[e]})),st()),!oe.lastEventTime||!Le.sessionStart||!e)return;const t=Math.round((oe.lastEventTime-Le.sessionStart)/1e3);if(t<1||t>dn)return;const n=Ce(t);$t(N,{action:f.measurement,componentType:m.page,session_duration:t,session_end:oe.lastEventTime,session_start:Le.sessionStart,session_rank:n})}function mn(){return mn=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const e=fn.shift();e&&e()},bn=()=>{const e=vn.shift();e&&e()};let hn={};function wn(e){const t=function(e){return{test_name:e.testName,group_name:e.group,subject_id:e.subjectId,exposed_at:Ae(),subject_type:e.subjectType,platform:A.platform}}(e);hn[e.testName]=hn[e.testName]||0,hn[e.testName]+k>Ae()?lt({metricName:`Event: exposeExperiment ${e.testName} not sent`,data:t}):(hn[e.testName]=Ae(),ot(E,hn),lt({metricName:`Event: exposeExperiment ${e.testName} sent`,data:t}),_t({url:A.exposureEndpoint,data:[t],onError:(t,n)=>{hn[e.testName]=0,ot(E,hn),A.onError(t,n)},isJSON:!0,importance:l.high}))}const yn=e=>{var t,r,i;U(e),z()&&(H.languageCode=(null==(t=navigator)?void 0:t.languages[0])||(null==(r=navigator)?void 0:r.language)||""),te(),(()=>{var e;if(z()&&null!=(e=window)&&e.indexedDB){const e=function(e,t,{blocked:n,upgrade:r,blocking:i,terminated:a}={}){const o=indexedDB.open(e,t),s=Je(o);return r&&o.addEventListener("upgradeneeded",(e=>{r(Je(o.result),e.oldVersion,e.newVersion,Je(o.transaction),e)})),n&&o.addEventListener("blocked",(e=>n(e.oldVersion,e.newVersion,e))),s.then((e=>{a&&e.addEventListener("close",(()=>a())),i&&e.addEventListener("versionchange",(e=>i(e.oldVersion,e.newVersion,e)))})).catch((()=>{})),s}("keyval-store",1,{upgrade(e){e.createObjectStore("keyval")}});rt({idbKeyval:{get:async t=>(await e).get("keyval",t),set:async(t,n)=>(await e).put("keyval",n,t),delete:async t=>(await e).delete("keyval",t),keys:async()=>(await e).getAllKeys("keyval")}})}else rt({idbKeyval:{get:async e=>new Promise((t=>{t(it[e])})),set:async(e,t)=>new Promise((n=>{it[e]=t,n(e)})),delete:async e=>new Promise((()=>{delete it[e]})),keys:async()=>new Promise((e=>{e(Object.keys(it))}))}})})(),lt({metricName:"Initialized Analytics:",data:{deviceId:H.deviceId}}),fn.push((()=>{Pt()})),(async()=>{const e=await at(S);rt({isReady:!0}),gn(),e&&(bn(),se({eventId:e.eventId||oe.eventId,sequenceNumber:e.sequenceNumber||oe.sequenceNumber,sessionId:e.sessionId||oe.sessionId,lastEventTime:e.lastEventTime||oe.lastEventTime,sessionUUID:e.sessionUUID||oe.sessionUUID}),function(e){se(mn({},function(e){const t={};return O.forEach((n=>{e[n]&&(t[n]=e[n])})),t}(e),de()))}(e),Ue({sessionStart:e.sessionStart||oe.sessionStart}),De({ac:e.ac||Ie.ac,af:e.af||Ie.af,ah:e.ah||Ie.ah,al:e.al||Ie.al,am:e.am||Ie.am,ar:e.ar||Ie.ar,as:e.as||Ie.as,pv:e.pv||Ie.pv}),A.trackUserId&&Y({userId:e.userId||H.userId}),pn(),lt({metricName:"Initialized Analytics IndexedDB:",data:e}))})(),async function(){at(E).then((e=>{hn=null!=e?e:{}})).catch((e=>{e instanceof Error&&A.onError(e)}))}(),Z(),z()&&(ln((()=>{se({lastEventTime:Ae()}),st(),Bt()}),"hidden"),ln((()=>{pn()}),"visible")),z()&&(i=()=>{var e,t,n,r;te(),ee({width:null!=(e=null==(t=window)?void 0:t.innerWidth)?e:null,height:null!=(n=null==(r=window)?void 0:r.innerHeight)?n:null})},addEventListener("resize",(()=>{requestAnimationFrame((()=>{i()}))}))),(()=>{if(z())try{const e=n(2);en.markStep=e.markStep,en.markStepOnce=e.markStepOnce,en.incrementUjNavigation=e.incrementUjNavigation,Yt=new e.Perfume({analyticsTracker:e=>{const{data:t,attribution:n,metricName:r,navigatorInformation:i,rating:a}=e,o=I[r],s=(null==n?void 0:n.category)||null;if(!o&&!s)return;const c=(null==i?void 0:i.deviceMemory)||0,u=(null==i?void 0:i.hardwareConcurrency)||0,l=(null==i?void 0:i.isLowEndDevice)||!1,p=(null==i?void 0:i.isLowEndExperience)||!1,v=(null==i?void 0:i.serviceWorkerStatus)||"unsupported",g=Vt({deviceMemory:c,hardwareConcurrency:u,isLowEndDevice:l,isLowEndExperience:p,serviceWorkerStatus:v},Gt),b={is_low_end_device:l,is_low_end_experience:p,page_key:re.pageKey||"",save_data:t.saveData||!1,service_worker:v,is_perf_metric:!0};if("navigationTiming"===r)t&&"number"==typeof t.redirectTime&&Ht({metricName:I.redirectTime.eventName,metricType:d.histogram,tags:b,value:t.redirectTime||0});else if("TTFB"===r)$t(o.eventName,Vt({action:f.measurement,componentType:m.page,duration:t||null,vitalsScore:a||null},g)),Ht({metricName:I.TTFB.eventName,metricType:d.histogram,tags:Vt({},b),value:t}),a&&Ht({metricName:`perf_web_vitals_ttfb_${a}`,metricType:d.count,tags:b,value:1});else if("networkInformation"===r)null!=t&&t.effectiveType&&(Gt=t,$t(o.eventName,{action:f.measurement,componentType:m.page,networkInformationDownlink:t.downlink,networkInformationEffectiveType:t.effectiveType,networkInformationRtt:t.rtt,networkInformationSaveData:t.saveData,navigatorDeviceMemory:c,navigatorHardwareConcurrency:u}));else if("storageEstimate"===r)$t(o.eventName,Vt({action:f.measurement,componentType:m.page},t,g)),Ht({metricName:"perf_storage_estimate_caches",metricType:d.histogram,tags:b,value:t.caches}),Ht({metricName:"perf_storage_estimate_indexed_db",metricType:d.histogram,tags:b,value:t.indexedDB});else if("CLS"===r)$t(o.eventName,Vt({action:f.measurement,componentType:m.page,score:100*t||null,vitalsScore:a||null},g)),a&&Ht({metricName:`perf_web_vitals_cls_${a}`,metricType:d.count,tags:b,value:1});else if("FID"===r){const e=(null==n?void 0:n.performanceEntry)||null,r=parseInt((null==e?void 0:e.processingStart)||"");$t(o.eventName,Vt({action:f.measurement,componentType:m.page,duration:t||null,processingStart:null!=e&&e.processingStart?r:null,startTime:null!=e&&e.startTime?parseInt(e.startTime):null,vitalsScore:a||null},g)),a&&Ht({metricName:`perf_web_vitals_fidVitals_${a}`,metricType:d.count,tags:b,value:1})}else"userJourneyStep"===r?($t("perf_user_journey_step",Vt({action:f.measurement,componentType:m.page,duration:t||null,rating:null!=a?a:null,step_name:(null==n?void 0:n.stepName)||""},g)),Ht({metricName:`user_journey_step.${A.projectName}.${A.platform}.${(null==n?void 0:n.stepName)||""}_vitals_${a}`,metricType:d.count,tags:b,value:1}),Ht({metricName:`user_journey_step.${A.projectName}.${A.platform}.${(null==n?void 0:n.stepName)||""}`,metricType:d.distribution,tags:b,value:t||null})):I[r]&&t&&($t(o.eventName,Vt({action:f.measurement,componentType:m.page,duration:t||null,vitalsScore:a||null},g)),a&&(Ht({metricName:`perf_web_vitals_${Xt(r)}_${a}`,metricType:d.count,tags:b,value:1}),"LCP"===r&&Ht({metricName:`perf_web_vitals_${Xt(r)}`,metricType:d.distribution,tags:b,value:t})))},maxMeasureTime:3e4,steps:A.steps,onMarkStep:Zt})}catch(e){e instanceof Error&&A.onError(e)}})()},Tn=e=>{Y(e),e.userAgent&&Z(),lt({metricName:"Identify:",data:{countryCode:H.countryCode,deviceId:H.deviceId,userId:H.userId}})},kn=({blacklistRegex:e,pageKeyRegex:t,browserHistory:n})=>{Kt({blacklistRegex:e||[],isEnabled:!0}),ae({pageKeyRegex:t}),on({callMarkNTBT:!1}),n.listen((()=>{on()}))},_n=({blacklistRegex:e,pageKeyRegex:t,nextJsRouter:n})=>{Kt({blacklistRegex:e||[],isEnabled:!0}),ae({pageKeyRegex:t}),on({callMarkNTBT:!1}),n.events.on("routeChangeComplete",(()=>{on()}))},Sn=()=>{Y({isOptOut:!0}),ot(S,{})},En=()=>{Y({isOptOut:!1})},xn={Button:{label:"cb_button",uuid:"e921a074-40e6-4371-8700-134d5cd633e6",componentType:m.button}};function On(e,t,n){return{componentName:e,actions:t,data:n}}function jn(){return jn=Object.assign?Object.assign.bind():function(e){for(var t=1;tNn(xn.Button,f.click,e),[f.hover]:e=>Nn(xn.Button,f.hover,e)}}};function Pn(e,t=!1){t?_t({url:A.tracesEndpoint,data:{traces:e},isJSON:!0,onError:A.onError}):yt((()=>{_t({url:A.tracesEndpoint,data:{traces:e},isJSON:!0,onError:A.onError})})),ut({metricName:"Batch Traces",data:e})}function Mn(){return Mn=Object.assign?Object.assign.bind():function(e){for(var t=1;t0}(e)&&(t&&function(e,t){e.forEach((e=>function(e,t){const n=Mn({},e.meta,t.meta),r={start:t.start?Cn(t.start):e.start,duration:t.duration?Cn(t.duration):e.duration};Object.assign(e,t,Mn({meta:n},r))}(e,t)))}(e,t),je.tracesQueue.push(e),wt(Pn)&&(Pn(je.tracesQueue),je.tracesQueue=[]))}function qn(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}function Fn(){return Fn=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(Qn,[n].map(qn));Qn=r}function Jn(e,t){if(!zn())return;const n=$n(e,"start",t);Qn[n]&&(Wn(e,"end",t),Vn(e,t))}function Xn(){zn()&&(performance.clearMarks(),Qn={})}var Gn=n(784);function Zn(){return Zn=Object.assign?Object.assign.bind():function(e){for(var t=1;t{r.current=t}),[t]),(0,Gn.useCallback)((t=>{$t(e,Zn({},r.current,t),n)}),[e,n])}function er(){return er=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const r=er({},t,{action:f.render});$t(e,r,n)}),[])}function nr(){return nr=Object.assign?Object.assign.bind():function(e){for(var t=1;tHn(e,t)),[e,t]),markEndPerf:(0,Gn.useCallback)((n=>Jn(e,nr({},t,n))),[e,t])}};function ir(){return ir=Object.assign?Object.assign.bind():function(e){for(var t=1;t{return null!=(n=t[1])&&""!==n?ir({},e,{[t[0]]:t[1]}):e;var n}),{})}async function or(){return new Promise((e=>{Mt(vt(je.eventsQueue)),Qt(bt(je.metricsQueue),!0),Pn(je.tracesQueue,!0),Ne({eventsQueue:[],metricsQueue:[],tracesQueue:[]}),e()}))}function sr(){return{"X-CB-Device-ID":H.deviceId||"unknown","X-CB-Is-Logged-In":H.userId?"true":"false","X-CB-Pagekey":re.pageKey||"unknown","X-CB-UJS":(e=Se.ujs,void 0===e||0===e.length?"":e.join(",")),"X-CB-Platform":A.platform||"unknown","X-CB-Project-Name":A.projectName||"unknown","X-CB-Session-UUID":oe.sessionUUID||"unknown","X-CB-Version-Name":A.version?String(A.version):"unknown"};var e}})(),r})()}));',t.type="text/javascript",document.head.appendChild(t),S(),document.head.removeChild(t),e()}catch{console.error("Failed to execute inlined telemetry script"),t()}}),S=()=>{if("undefined"!=typeof window){let e=A.config.get().deviceId??crypto?.randomUUID()??"";if(window.ClientAnalytics){let{init:t,identify:n,PlatformName:r}=window.ClientAnalytics;t({isProd:!0,amplitudeApiKey:"c66737ad47ec354ced777935b0af822e",platform:r.web,projectName:"base_account_sdk",showDebugLogging:!1,version:"1.0.0",apiEndpoint:"https://cca-lite.coinbase.com"}),n({deviceId:e}),A.config.set({deviceId:e})}}},P=[{inputs:[],stateMutability:"nonpayable",type:"constructor"},{inputs:[{name:"owner",type:"bytes"}],name:"AlreadyOwner",type:"error"},{inputs:[],name:"Initialized",type:"error"},{inputs:[{name:"owner",type:"bytes"}],name:"InvalidEthereumAddressOwner",type:"error"},{inputs:[{name:"key",type:"uint256"}],name:"InvalidNonceKey",type:"error"},{inputs:[{name:"owner",type:"bytes"}],name:"InvalidOwnerBytesLength",type:"error"},{inputs:[],name:"LastOwner",type:"error"},{inputs:[{name:"index",type:"uint256"}],name:"NoOwnerAtIndex",type:"error"},{inputs:[{name:"ownersRemaining",type:"uint256"}],name:"NotLastOwner",type:"error"},{inputs:[{name:"selector",type:"bytes4"}],name:"SelectorNotAllowed",type:"error"},{inputs:[],name:"Unauthorized",type:"error"},{inputs:[],name:"UnauthorizedCallContext",type:"error"},{inputs:[],name:"UpgradeFailed",type:"error"},{inputs:[{name:"index",type:"uint256"},{name:"expectedOwner",type:"bytes"},{name:"actualOwner",type:"bytes"}],name:"WrongOwnerAtIndex",type:"error"},{anonymous:!1,inputs:[{indexed:!0,name:"index",type:"uint256"},{indexed:!1,name:"owner",type:"bytes"}],name:"AddOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"index",type:"uint256"},{indexed:!1,name:"owner",type:"bytes"}],name:"RemoveOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"implementation",type:"address"}],name:"Upgraded",type:"event"},{stateMutability:"payable",type:"fallback"},{inputs:[],name:"REPLAYABLE_NONCE_KEY",outputs:[{name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"owner",type:"address"}],name:"addOwnerAddress",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"x",type:"bytes32"},{name:"y",type:"bytes32"}],name:"addOwnerPublicKey",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"functionSelector",type:"bytes4"}],name:"canSkipChainIdValidation",outputs:[{name:"",type:"bool"}],stateMutability:"pure",type:"function"},{inputs:[],name:"domainSeparator",outputs:[{name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"eip712Domain",outputs:[{name:"fields",type:"bytes1"},{name:"name",type:"string"},{name:"version",type:"string"},{name:"chainId",type:"uint256"},{name:"verifyingContract",type:"address"},{name:"salt",type:"bytes32"},{name:"extensions",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"entryPoint",outputs:[{name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{name:"target",type:"address"},{name:"value",type:"uint256"},{name:"data",type:"bytes"}],name:"execute",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{components:[{name:"target",type:"address"},{name:"value",type:"uint256"},{name:"data",type:"bytes"}],name:"calls",type:"tuple[]"}],name:"executeBatch",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{name:"calls",type:"bytes[]"}],name:"executeWithoutChainIdValidation",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{components:[{name:"sender",type:"address"},{name:"nonce",type:"uint256"},{name:"initCode",type:"bytes"},{name:"callData",type:"bytes"},{name:"callGasLimit",type:"uint256"},{name:"verificationGasLimit",type:"uint256"},{name:"preVerificationGas",type:"uint256"},{name:"maxFeePerGas",type:"uint256"},{name:"maxPriorityFeePerGas",type:"uint256"},{name:"paymasterAndData",type:"bytes"},{name:"signature",type:"bytes"}],name:"userOp",type:"tuple"}],name:"getUserOpHashWithoutChainId",outputs:[{name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"implementation",outputs:[{name:"$",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{name:"owners",type:"bytes[]"}],name:"initialize",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{name:"account",type:"address"}],name:"isOwnerAddress",outputs:[{name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{name:"account",type:"bytes"}],name:"isOwnerBytes",outputs:[{name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{name:"x",type:"bytes32"},{name:"y",type:"bytes32"}],name:"isOwnerPublicKey",outputs:[{name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{name:"hash",type:"bytes32"},{name:"signature",type:"bytes"}],name:"isValidSignature",outputs:[{name:"result",type:"bytes4"}],stateMutability:"view",type:"function"},{inputs:[],name:"nextOwnerIndex",outputs:[{name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"index",type:"uint256"}],name:"ownerAtIndex",outputs:[{name:"",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[],name:"ownerCount",outputs:[{name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"proxiableUUID",outputs:[{name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{name:"index",type:"uint256"},{name:"owner",type:"bytes"}],name:"removeLastOwner",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"index",type:"uint256"},{name:"owner",type:"bytes"}],name:"removeOwnerAtIndex",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"removedOwnersCount",outputs:[{name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"hash",type:"bytes32"}],name:"replaySafeHash",outputs:[{name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{name:"newImplementation",type:"address"},{name:"data",type:"bytes"}],name:"upgradeToAndCall",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{components:[{name:"sender",type:"address"},{name:"nonce",type:"uint256"},{name:"initCode",type:"bytes"},{name:"callData",type:"bytes"},{name:"callGasLimit",type:"uint256"},{name:"verificationGasLimit",type:"uint256"},{name:"preVerificationGas",type:"uint256"},{name:"maxFeePerGas",type:"uint256"},{name:"maxPriorityFeePerGas",type:"uint256"},{name:"paymasterAndData",type:"bytes"},{name:"signature",type:"bytes"}],name:"userOp",type:"tuple"},{name:"userOpHash",type:"bytes32"},{name:"missingAccountFunds",type:"uint256"}],name:"validateUserOp",outputs:[{name:"validationData",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{stateMutability:"payable",type:"receive"}],O=[{inputs:[{name:"implementation_",type:"address"}],stateMutability:"payable",type:"constructor"},{inputs:[],name:"OwnerRequired",type:"error"},{inputs:[{name:"owners",type:"bytes[]"},{name:"nonce",type:"uint256"}],name:"createAccount",outputs:[{name:"account",type:"address"}],stateMutability:"payable",type:"function"},{inputs:[{name:"owners",type:"bytes[]"},{name:"nonce",type:"uint256"}],name:"getAddress",outputs:[{name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"implementation",outputs:[{name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"initCodeHash",outputs:[{name:"",type:"bytes32"}],stateMutability:"view",type:"function"}],I={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901,unsupportedChain:4902}},T={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."},4902:{standard:"EIP-3085",message:"Unrecognized chain ID."}},B="Unspecified error message.";function U(e,t=B){if(e&&Number.isInteger(e)){let t=e.toString();if(j(T,t))return T[t].message;if(e>=-32099&&e<=-32e3)return"Unspecified server error."}return t}function _(e){return e&&"object"==typeof e&&!Array.isArray(e)?Object.assign({},e):e}function j(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function N(e,t){return"object"==typeof e&&null!==e&&t in e&&"string"==typeof e[t]}let R={rpc:{parse:e=>D(I.rpc.parse,e),invalidRequest:e=>D(I.rpc.invalidRequest,e),invalidParams:e=>D(I.rpc.invalidParams,e),methodNotFound:e=>D(I.rpc.methodNotFound,e),internal:e=>D(I.rpc.internal,e),server:e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw Error("Ethereum RPC Server errors must provide single object argument.");let{code:t}=e;if(!Number.isInteger(t)||t>-32005||t<-32099)throw Error('"code" must be an integer such that: -32099 <= code <= -32005');return D(t,e)},invalidInput:e=>D(I.rpc.invalidInput,e),resourceNotFound:e=>D(I.rpc.resourceNotFound,e),resourceUnavailable:e=>D(I.rpc.resourceUnavailable,e),transactionRejected:e=>D(I.rpc.transactionRejected,e),methodNotSupported:e=>D(I.rpc.methodNotSupported,e),limitExceeded:e=>D(I.rpc.limitExceeded,e)},provider:{userRejectedRequest:e=>F(I.provider.userRejectedRequest,e),unauthorized:e=>F(I.provider.unauthorized,e),unsupportedMethod:e=>F(I.provider.unsupportedMethod,e),disconnected:e=>F(I.provider.disconnected,e),chainDisconnected:e=>F(I.provider.chainDisconnected,e),unsupportedChain:e=>F(I.provider.unsupportedChain,e),custom:e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw Error("Ethereum Provider custom errors must provide single object argument.");let{code:t,message:n,data:r}=e;if(!n||"string"!=typeof n)throw Error('"message" must be a nonempty string');return new G(t,n,r)}}};function D(e,t){let[n,r]=M(t);return new L(e,n||U(e),r)}function F(e,t){let[n,r]=M(t);return new G(e,n||U(e),r)}function M(e){if(e){if("string"==typeof e)return[e];if("object"==typeof e&&!Array.isArray(e)){let{message:t,data:n}=e;if(t&&"string"!=typeof t)throw Error("Must specify string message.");return[t||void 0,n]}}return[]}class L extends Error{code;data;constructor(e,t,n){if(!Number.isInteger(e))throw Error('"code" must be an integer.');if(!t||"string"!=typeof t)throw Error('"message" must be a nonempty string.');super(t),this.code=e,void 0!==n&&(this.data=n)}}class G extends L{constructor(e,t,n){if(!(Number.isInteger(e)&&e>=1e3&&e<=4999))throw Error('"code" must be an integer such that: 1000 <= code <= 4999');super(e,t,n)}}function q(e){return"object"==typeof e&&null!==e&&"code"in e&&"data"in e&&-32090===e.code&&"object"==typeof e.data&&null!==e.data&&"type"in e.data&&"INSUFFICIENT_FUNDS"===e.data.type}function H(e){return"object"==typeof e&&null!==e&&"details"in e}function z(e,t,n){if(null==e)throw t??R.rpc.invalidParams({message:n??"value must be present",data:e})}function K(e,t){if(!Array.isArray(e))throw R.rpc.invalidParams({message:t??"value must be an array",data:e})}let V=`Base Account SDK requires the Cross-Origin-Opener-Policy header to not be set to 'same-origin'. This is to ensure that the SDK can communicate with the Base Account app. + +Please see https://docs.base.org/smart-wallet/quickstart#cross-origin-opener-policy for more information.`,{checkCrossOriginOpenerPolicy:Z,getCrossOriginOpenerPolicy:W}={getCrossOriginOpenerPolicy:()=>void 0===i?"undefined":i,checkCrossOriginOpenerPolicy:async()=>{if("undefined"==typeof window){i="non-browser-env";return}try{let e=`${window.location.origin}${window.location.pathname}`,t=await fetch(e,{method:"HEAD"});if(!t.ok)throw Error(`HTTP error! status: ${t.status}`);i=t.headers.get("Cross-Origin-Opener-Policy")??"null","same-origin"===i&&console.error(V)}catch(e){console.error("Error checking Cross-Origin-Opener-Policy:",e.message),i="error"}}};function J(e){if("function"!=typeof e)throw Error("toAccount is not a function")}var Y=n(2742),Q=n(17283),X=n(59455);function $(e,t,n){"undefined"!=typeof window&&window.ClientAnalytics&&window.ClientAnalytics?.logEvent(e,{...t,sdkVersion:u,sdkName:c,appName:A.config.get().metadata?.appName??"",appOrigin:window.location.origin},n)}(ec=ed||(ed={})).unknown="unknown",ec.banner="banner",ec.button="button",ec.card="card",ec.chart="chart",ec.content_script="content_script",ec.dropdown="dropdown",ec.link="link",ec.page="page",ec.modal="modal",ec.table="table",ec.search_bar="search_bar",ec.service_worker="service_worker",ec.text="text",ec.text_input="text_input",ec.tray="tray",ec.checkbox="checkbox",ec.icon="icon",(eu=ef||(ef={})).unknown="unknown",eu.blur="blur",eu.click="click",eu.change="change",eu.dismiss="dismiss",eu.focus="focus",eu.hover="hover",eu.select="select",eu.measurement="measurement",eu.move="move",eu.process="process",eu.render="render",eu.scroll="scroll",eu.view="view",eu.search="search",eu.keyPress="keyPress",eu.error="error",(el=ep||(ep={})).low="low",el.high="high";let ee=()=>{$("communicator.popup_setup.started",{action:ef.unknown,componentType:ed.unknown},ep.high)},et=()=>{$("communicator.popup_setup.completed",{action:ef.unknown,componentType:ed.unknown},ep.high)},en=()=>{$("communicator.popup_unload.received",{action:ef.unknown,componentType:ed.unknown},ep.high)},er=({dialogContext:e})=>{$(`dialog.${e}.shown`,{action:ef.render,componentType:ed.modal,dialogContext:e},ep.high)},ea=({dialogContext:e})=>{$(`dialog.${e}.dismissed`,{action:ef.dismiss,componentType:ed.modal,dialogContext:e},ep.high)},ei=({dialogContext:e,dialogAction:t})=>{$(`dialog.${e}.action_clicked`,{action:ef.click,componentType:ed.button,dialogContext:e,dialogAction:t},ep.high)},es=` +@font-face { + font-family: "BaseSans-Regular"; + src: url("data:font/woff2;charset=utf-8;base64,d09GMgABAAAAAJigAA8AAAACCywAAJg8AAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP0ZGVE0cGoIuG4L7BhzCdAZgAJIGEQgKg+k0gv4NC4p0AAE2AiQDlWQEIAWGfgeublsIz5EGVeP2TiXfSAJ0G0LBr7Zlqf6pcAA3dwBbquuITJr6o7y2YrpNHoSyAwBKe/rZ//////+/IlmMMf8PuQcEUUitMtva1oSQhGamQkxJxpSLWVScqgQ1RW16VovNJTZ2uagkVSeuNje11QubnvZpYVB7yUGi4thNqJYBdoegR2V9jiA4dEhCOgf3Va7muEqhcRKz0dDNOVV47+hxPO9qkzFCUg5glpCZxKbOGFxehX5nYwGEBZOQwyRFIY5oljSrLwkSIj35dugPRJKk8G3GwUgw06hpknM0qqcUdO/UkzLvviWielabhCp59zPCaOnnqLtK3qXfP4Jz+vAum7Q0/NuZGXK9lUJKTpCEJ7ENfKrSzrLJy8uqLLgUD5sssqscpk8OS7HhGv36H+Ct59wJukpOmwpgFOqL6vCNd0ISNjq/nA5E/OXNVV0dR7EKTAKiB1ZvW+tSlyr7EWdJ3qxDtA8codE8WQY4xkT9EJF26FGP+iQKnwv66klyovCkLwlr8Lxu3nv/5/MNMUKMiAhhDtdkGsM0RAwRI8QYaRhCUNgOUAO4Bi0u3DhL0aZoKaLFsXHublwTFwWef9oP2rlv3sxftRCxRCOKSDVvItZINGlFPFkmbqay38SW9hmQLI2pME5qCPQ47vfu8GC3f2SvxM2MUAmZO8ThjH049p2ZcUbGnTPWOHudo8vMLNEQRUvt3y9qA6U5Uu9ZONvHHhBR/BdN1Kcsoz6KD7j59iAmJA4eESNxvpq3Y6fp1ru163hU2GRzm8rmg0BhMJKgMIaf9nO3qg2ztI6m8ncflWgaGnQInYUqlufvbIecf9zg3KdoiqIpiqLnHzctBAhpSGNI+CSBCoxSmdVel2WMzJgqpdvlRLu9sTnXnnhOLGfKTLCJOTM9UWa8ezmfeyz//739L9vet2xVfdv8v/dtfXvfXldd46q+pW+rqhpVVXVV1biGGqPGGGOMMSIiRkSEOCIiIiIiIiKOIyJEHBHHETH/+Nz8/5kozOTkkPZ9M9uZRYC0pVwIQS5XK0nOJvA8lOVX3YrZypBnvvvmw25iURRFUTRNURRFURRFURRFURRF0TRNUzRN0TRN0/zRttoUsFC40OU9euRGFjGNjc8DAIWhNhWIqEFFnL7nFu2CjlFaJxxJRqf6Ung+Jvp73GVuoRtcHv8zeSKBU33dLOlWLJ0kBS4NEvIIaJvcM3ZuaDO0PkAHB26nUXSKoiiKorCiM7PySCWqIBxaeL2g/EBoVNGFPYv0QhLD6BUFa7FVDM8hh4gg8ggWk0GkW3K9iQBYnQnPTdjg3A60rt4SpU4u7oiFDsrYvgxqdHDejpIzYZgbzk8QuuLh/8fU3Bf+KRCpqkoCWRYOgAZ6Z5rQmDGR2/bhWlmYKohLc8ntExu5JXwnk4LxI3Dc4OHi4/9eZ9m+b3l93mMfUbzJKYRFQ1QlXco0TebrSbL0JXsjyd5bw4HXPtI6YPvIcDe3DiFVQLb3iLxBgC4dNk2KLk2ZpkxREncp6io8fL/sm+2zzdT+IY9D0m6/Y4Tb+s6iqZrfMxvuf9tUfXJvk9JjSEMeYnYhCoOwOIYhfWJUUa2kkNlJpML5EP/eVKu0P5sQZjyxnCmOds/xprjWpqAZcY3TaO585D3x+jeeuj+aGBIYUWAPxDGOwjgjW4Pf//+GJyFLEJQZZ5xG63XOmMhaQ53VznlFa3y22daGl256F+cXhBeFxoYXXhZfePD8O32lcfRutrIm2gQ7oUjxl7L8lWnl5GWsjrVZocNaAAtYi4twUQmBxeWB71Q+jf0X4QkWtlmSCs9F9QVYKjgMPC1YEQfHiQ1IA75IGACGQSXDpvfmW2GhW4TDy9KXWhTKEVQViiAk0uAR7iVCIrxEwlP9Tf+zRMPFdQxv5oIEg///pmZK8yodlcqgE4BywtDq/vc9azWnlY7kGdlbOg4NZKEs8O+WPP07CTSbOoxcSiiOX6QEN+t/J+H/fye5TqG9dlWtqrVWRESMyIsRI0bEWhVH3///6xjuE3wV5isP2bQlhMJa/PCAB7e9XrJlnx4vRqoCxJEeHtsI0x9/s5owdGxp17TXIikE8RSCxh6y+31+b1Pbj1sa9nZsapXA6RS3w2leokH/w4wAP/6mRgHw09uiJICffvQeEZQY/BH8E+WJYYuQkGD11BMhJcNy5oJw5Yrlxg3hzh3LQxgiXDhWhAjEGGOw5BSISJFYUWIQsWKx4oxHJEjAmiARoaHBmqgMMc8ClDkxSGKjw2RK5iCZm1JsyrIcyYqswGZl9iDZmxNoTuYrkm/pRNNFvZHyqUC0gupnpCx1EFOHqhHBggLBgJnAPGAJFElsNCDYJGVStElG0cRmItSr1aA7AqYxnAnd7KY4NcTHPZpvggwLTE5jQFCdzRz7ZK4J0n+yOBxfPLubEYQhClMafQx9v+JB6UbImj03AQYbTS6OWrJUJhSP0p/2es1yt0Omr7Egj5366fr4ua6v3dbt9Ruc/3R947/ZvnkHjg3y7lUgoL2UBP/MNpUuiyQu8YoquufZv6iCKqyOV+sY2sKGZqwbj8bn9uvFkxPI5wJN4YqTdR3cr39S/T4cB2JUjhcpltUvgRzIldzOJ3mQJ8XXdymUZumXYxErv47qa0tRnWmroa07s59NsWk3Q2f+HEC/bJfPh/PLFdHXxHmv5nfeueJkzg3Zs+zvMTCTf967JdTaNjTKjk5xsRvd5QGPed4r3vZnH/nrwvoTeZY4lfsvixW3mtfjU+A83xeuevacM9d5qon6fOTg/79PrhPLMWMcwa3bv3J36RZlxnBgAJ2KMoyFYTREKn+ZKsvGlEcUkroTk15wKDTCoMoIwHgRFQNDXIa8HgfEacoFAzxuOQ7CC3jkglmPV3om8ky0iIPACWPlXBxA16FBIDBeeJaRPVKUYhqoHSvO1VEgVUajSwqlmlIalK25HF6e7le5QsHuVNO9EEUGvScieDTMCFZkT4wSprN3PWQynglxJhmiQBMhZVkvQGCuhy3sGznDAIAvIckysxSNLSamjH8rL/iQ6kCmCWULlOP5La5Cs7pTIL3W4dKITAHf4EO4q5DGYsYTJxAmKicRJgvAnGZ4X3BH3jdqsaKPhrAlcd9II/pGQ57oVzQUSmFQLm+lopVwjzel0YxGq1ZiNdKcpfuGqsZq1tfw2zUtj7I82jLYr2C4PWYaWZ7sU0shbvISKvr5PPYncRCxIBcTsIcjEmiZi+j6+xZjUG3QSJJkOZ0oBjriBHZXeDFRTOILE8ls/Z1QmBmC1XFrmI7FjqdMACayJ1Eg7HQJdDV0dWgN4VgRHHE5ABPlwkwJvi3SNGU/lasiDqPyamkvpWzzBjsBryYXJNXRm2tksf66FHEGdBmprXMO/1yFsdTx4ATRRPEkkcqIE5HnoBB2PKcIq8ZzlSN8HCKVJBHWJzP1NxSViSkoDNOJZpubo9BJtAXOIPRT0X9kVclq8tUZa+iMJY1nT2BPZE5i7yWMRBxEHkXREryFuA1pTeFkz16JKs2eU2cambRkOYZ51DBJkZdkdOBO1AQu0xoxEcLlwSSBqtBzWJOQp2j/YPUah4IrAyPcIIRHuRyjYm79IrehQq6t9gjOo6A5WAlDn6G/Slwapo9gn6z1M9KX/NyrefcT219m/6T9N1+VuBqwus3JnHV46zL3MhVy1okYqZS3Xcm8i7xvbUEzwFWV2XeQ5F6iBJcLUUfaS0gcx2wRFtPjKKVzUzgM0nCXr5JMDXgZL8jbNiPYm2wRUCU4+QQoQ91iwHod68TgjVRIY/cPoxKynq70EPJKDlY+WP8/iJENKyo2DdZO0RFCRWl8qYaUyVu2HuXo8nyFlO7UrXuhigi9UUMhCoNpZKOmo7sejsnhitMeFwkw4jbF6eKNCUQeE6I3hF/ZyCJFXdBcy2HclbkniyIr5XDCacLlCrDJrYNzhmcQdHmIRFtGVnnvci45/f5axEx9ZsTly7CRjYpavpZsBLBW4871xpXwuoQwsnGRf67JdGbERWSYIk+XT4QhBZrEundut/S4Oy7OUn2eBVcfMACKZwtZ7vfPkikU8liT8fgJ5pPMqQKnI5sNt3bV9WYXwYCRCmnsJx3RJ0l+6/QvNvRMxawtzC4Ve/pNF9wma6m7xmLp3uXhEaPZS1FUrC1TzWgWUWglgRYfAJF3xGHMqRcDDrmxOBMSnoPnyRB33z8pwsi4oobUmtOoPmfI6dsqlqf6FaTnHQrVMCiFey0ybwY8BcJphGVwiQEUb5+AImiIJCpVoEz+stnFThmZ5E4N86YgEtlZrpMAyaHS6KGQgEAbv7A3kKrhuJCjbuekZkO95mq0dxThTHgj4YjVXu1K1PWIIag9EYMgwH0ZijiLLKJU4NcXx1Mn0CaKJlGNAIcDCHic5Z4StDNOHDZbv7+bRDOSrhiJiqUFgdtxi51Q7pTJTgfRP3jnYS57EIs1CW8ysRQSOk7m7p9jnJzgFFd83PHxxGcIp4ThMwUXE6dU7Um6wBbQywdbvtjyw5Y/tgKwFYjFERNm1a5XNt/KwddMfBXgEfF6P19vBIZYb/EKsmGvtlsHs+XFXT+ugvmLV07hpJyoQKWFFlnspNPOvvt2rlm7l9m0J0S8iAXrI96AQ2JiYmJiYmLiEdmal3VYUVKSJGl/JWzgCM7bBzojlGUlYKF0vU265E+2EO5klB3PUFBWMSOTWolpoaFoor5MkPQ+o6HQ6Cn1jcK8p1zf/YRhp1TgHVfurATSOreWKNSiPbLa8byeBD23wXWgdW5KdhHedfE2EVhUMJNDKaHcdLor9Imh3DvtcFL4Y17E00B5ZStaY9uaXDZpgKZvEZQWWXJKPeq0IL6r24RivS9KJYVHJYSovb2ndPFvOUyxNC5yeXqLW8iJswKBh0zx3z52tby6PyMqltMpj0zteLz4NqK7DmHRrSN3WD3G46yxswltmY2NwFA2nSDKgZ0E5DEBoia2rObDAAy4OTgcRC0G2k3EcdVx6veK9H6BhqHA7y3odv5qPTAUKppb7vWymulmK8NNz9UZ5jiQJkwI7CAgGWfJEzgo9yDmmkgT4PNBHqF2vDigI4wa1Xv17/28Vbquyn7/PLcDQ2HYy7B08iq8MdA4eUgQlpf5zvZaqBf15lCE0M6cNvZpEiAZ2F45nOBqF+dUbKHUUI6ne4MAYbiTVO3lqVfKb1ayIi5FXpcDlGlyjhzkw/MZmPmoh5QQiZDYcpOgDpXi/1NnChbIDPU5wLQ8scKEcyYn50pPz42BgbtUaTxkyOAjWzZfOXL4yZXLX74iAWabrb8yZQYwMxtoo40GOeywwYlIhCGZk0WGZllWGJNV+Z4i1dkqNtuzgyY7s0tSbuYmbe7mgcmlLKUppSoVfU2oCabWxNIxlKGMMiujZsip3MpVVPmVr7gKa5aSKq1SpTW/Fiir8qowv6qqihnd6DqwsPbVo8IQKQ1qjbIrwYlZoLkRJG+6WZugMZshWKeMxCutGYpJve3Mw28xpYiLzi/bdEFwn1ZxmiUMnnpvH8aVtrQW0e6ZDVGIx3ato8cXg9yY3yVwTMWfoZlZasK15xoRJu19atJdVE3aaQooW7py90yx2b0cRnPzQLBQ9HYIGRn2cTuDUU7mqC7QMta7GWFHwDrFdMaTcOwsxz9wFp3hDa95kR4xMURdxCne5kuXVot3fK/AUBFTYyTNwCHho0m3WELrjocfdeK8R76XC8sKb0xtLZNbrPCKR+W4yRFYr8cdWSVxbPijn5fJ7dmOHZjFHoTyqEnGo/iRX/s9m7fejl9nco980fKEe9ZO25rQGIkA8mLmLDUilOb3hTSBN5ZhC0Ppw8fWDJvl6bLWs0om0vNerrzWNo7vz22ZHyX5BJRxLb61CbxsxLC/f5mvCpm9CxpgTGm0mMU2ZFnhZmZoe6P4i3wiNZ1xall2cbaXQ86Jfv1ui0W+Kk5xF7+1CfzDjUdlRyiYgjb1nopTbRc0MOZlydBSGxnHwAhJUwDznPM7XDt5mXHPiztGft91q4ufPGYV8ntnHuOxMKEus9qnCt4NAkC+2EOcjJKkrO8V9zTVQBEfQC4jeS/RQnV12bAEfNhtdUrQOHvFgfxCMpQbaavfRzKKxDFTDhQebuPIyrNyoFCxIqVGLXIygcMhw8uTcy82JZhpiA9XPjuXa+2v0tRpHrJVh8XK5SMI2G7k5DKT7ct2NPJACAlHBetq03f4yQjYWor/KH89NyFNy6aAZfcCPXd/KIF6JBZmc5T156XLzGXJ6MrrokXOWYTZ8OxwfvkjfV6609pkows0w3++aaoWq81hGOyO+h91VBj9Q4+GbwdWiL4yGuSCYyG/BJvVEvDPNPPUi95/VtmyVu0ZmtjUTqqtrR1eiucax2SM5Dze5puIrOflYNPzPKDLhEOv3R+QCE6s+kYtThtQN9QWNv4pwg7GeX2ZlZuQjUN0+tJo0EhUQYT74ymt1oWww35CO+AP+pL6ZgkTZ3Wao8595eNLZjMLXf7QO+Lga81u4TXJUfseAUH/HUsQlPWkQjsn53QV0IokfPU5gcVDN5ey+5t/vund2zM6bridM6h2XdYc2rWHOxatInPllyuGRjh9IZYZl58tA2aPqPK1Vr4jdOa288nZZpQ7JVr4H9lus4hh34OJSGzsgMM+54OzceTY8RNo+nDGutrGPteGPgeE/1zbksih71QDck2qru1lzrsO3fCRj3u9a7IvUWQeivblx00HrgguaQaOhFNG90eTaTPiE1hZsmZF3DoqkHkvm96X74dPYlNQzL1amVzbtptuuJlbeG4gNT2/YNDl+QW7XZ5fkHRZPkP5+kcReN5h0kWyvX/e6p5gc8+NRL07spHCH+2Qx+WzOq7LbDniVvfiXkpoeJQHO8Z8SBxht2BXAhj2Jzm3n1Im7V6xn69XYgk4QIRv5rxFPj8O0co68Vyf//bCf8Fdw3aZ8cS8HAX5tR4zee2G0yXLKziJFiw3a1ETRLImUkmXNb/o1KSR2LTx660Fb7pEx70N2SQQlMaVbODmgGOQwr/lRE1Naqc4ZRbi6VjvlJin37FoOqdevRtc19fpT1/qnqn9a7tHFY9UqzpDo4lLkicwxZgdbr9cQCcL1RYpOzfhViLum2j+Hnr7rNbUcezQpcv7btFZt8+vKrMfwG8XH9DENOGzsdKbtETTVWkl6BjpCUxSzIwsRFY+FBM7HQcNJx2XKLdBHj1eA2j9GG2sFk4fnkLQJKZdoRCW0eXQY6bw6Be3zWpH2S6bfVUHeKfKLuRdIdxWSx49aXgT8KHhi8rvIQzms9Wgl3JkmrVAPwXDALqp6NfGsA66abA76rEfTJLcIyD2OFRj6qpzORp7s0x9OhT37VXoWOfVutBNcpUfkaoEq8FVJ1bjYKkZTRvzQ4rFHwcVj707OBPwdhdXInSbuJNg2oJsG3U7kO2ibo9sh5H7jLb0UDpluIKgmT4x+uSJAOBQmWiNQQRgp2FnNM+socVkyhyrmnpmqXIthgZ8WW3FNxaLAtcGHLOJ0KEdPfjPSVqMTgKwC5BtUnQpWD2btmzZtGnRIsWirkXLJP2yfHL8AkYsiAL6FAAAACwAgAmAGgBkAAAQFAQAwAwgCOAAAJDmvbEQSgEE221AWyelstEKZQgqgS17Ej9CG6DoT/ltRouXPH2bsuOGbsfK9G09wEGh4y1CwT5bvHuo4CIDCMJTw/imZd1CkGbc0X+fJB8VfwstEHU8nbbw/prowT8+QDElmOTENPMhPIH9OQwAY8EO+eTC1Th7grqzUhB/I1P+/I3cdwFOBijV1cHNzpc6XwlnuwudrXY2QLDwulnjduhXzAMbOs1tlEOFU1xSlYtN8eoOA+w8CNgeIvGjEgKjpnY+hnqUGC5KXJEuF23bJdl3IFBvylAZLiNltIyViTJZpsq0zCt1ZKeNV9uDOlFOm+lumh2D4PCme846TPbB1MXXp3yFqIH4JP8RF11Bj434iCvhEOiRndy7bVvxImrlRTeGPuoGbPiNuBXvhXvfwIzyVM/q0ZzssNlH5Vcqb+SwNJ2pDLqSJ5+Hc/lXeG4XoQ7qsBXatFHt2dGdHRtzHAKuLkEVuXdjU/sV4SF9YE4eRKDEp+LMDkVJ4f1PoJ05MGcPtuP3oN9kGHGc2FGjN9Wg2Mhtt2HbxjUPPOE2DFtBYFdh27IrOa97qTg45+w4N67GmJ2NPCR+O0x/mXMr0ZNELM3b1MpG1Fl31zhRqA4lMITwfGI9ewFaNvwzZrtnHbH8exZX+Lvw9NW3LWYvzO2H9S5cCgamDlK9FTIzok2VzzHx/kQbCYZI0Mr3sN4rIdGlYuJTlb8ScvMb59MEnj7zfC6chza9q1d/Hvky/H30h3/umz/OpVwXd+FEPVKVRRliMamNSkN9LpaDbA2WRweqpS6Yy9p0D8ORZ/l/4NsJ40YQ8nSWzTI8aDIqSy659mEfsseNVcQrJJwGjBxsL0R3XUw1ejDUQYu83qwQRIIkDC4y0IGUaE8HhEIkhYM8EQRFTlPBbx+BWhn+tSyXCpUNlx+gquaWmKKCHh7suwwjoEiFYNYLUCDaN7J7C6vmUgFUnIqg4gvR349ExWJcCTbVyzSJJCiVWFoiU3CsDfPyxG/ho23WoejWZMFlH14J+MbuKdOgjMrPh+CrCtNwxfZkUXRnqkyp2wzVszCYMSfzZIud10vRzY1qXpiOvBgHn3NT64jZwVZ5kySmxqOgbzXvdVjvs+9D9aFHrHYun+nXgMm0OvpteB/2jJaVtkzUmKTw870LUPiqSwL0d1/xEAke1Q06jlw3zEYA61w2Ir3G7KQ4JYNugXpEpR2YwArLWQ/wYz8s5CkFI0leRyjairkhOrLH821NEizyjCVWLXXTMg2rPGqNh631pFTjSgMyiWUb0jqr1vurjf5sk4bNHrbHjn2ec8CaY5ac8miK4nxWFz3setysXvs7f/SrxQBdieVDKnqGnjwUOgNpC8+faj7452LYUnbKOQkPjtCu12aD/tW0ZkvOIz0TYz3ObsDK3HBpPoS7iNmi/ri4taWB5TyzXussUmqZYFm1Qqg7anpwGCzUZj0dZcruDQ4JVsGlAEy51TgJQcmj4Ofqr1kE3xzWDpkbLmGoIy7VNk0myZJqQmmhTFRBGL95ptCU7lRXEUePHfRUmJs4Q80q8dJEPGFZc3viyQyl2U7JUVJVoLS4YbPfiAMDeQiEnz1VkZEpI47g7AB5bFN4xoH3Q6JY7VTT5eIiCW0dUXXC1EAa6HOapEqqIaXVsgXLEW0lMNgEhg7WZSLepw1qXp+/G112mm4fEqbzM6q7qtPVtLfH5YrWMLdA8wJ1VJ/Gl8RJNaM0VbbIuCxTbilV1KKHEOizScXw5VxEECO1Ahq9DlxEjwwnI9hKFQQNMSa7l1xGKMryIZn1IsSRazKku35uq48KArOpuFsizFNpYXXzQpJ19VSjyiQUzYTwZk4j6VWW9YnPGhl9QjBXj12TgQ/C0i5j2iqz6Ni9YiLUoFvGVPHmZc8ygVeJvpRtBDhCQdSjgp0H5cMgPI2v5kSIhBUek11XqFDo4mFsOUigHZHDdfWsbj1mjHds0eTdhqHqvA90JAyFA2h4IdOtFuXCdGjBnBzrhytcHpxG7EPsDGq6ajZKOMgLPwvseVivwsGprWFci0EgWSNXm2D4KZPRGsxfO/qiYWLnUrWQj+1EeAb9l9Yh3vF7Jaoo60gWWsO8XVO1ZWWLqxyKmimiCkSUjt0qKmsk6MeTa+M6LvPikN21Tbur9GYGjxhqRfZ4dPHzoNRF22K37yMi2L5ybdg8LCFAgy9qGrCVgV/d+RouxrozXm+C/kTDSfpKEDRy8rpYeEC1Dnr1KgPZeDLVrjsQ+f3TtIJ0wszCrDYpJu2atbhuyr/+88fyAGJhnCK8tnBpMIkmAxw8tCQ6QWZBlEUhfygkuxi3Nj0NMv5uf8my9FrKiujULNoLEkkpuACFOsdLy0VHmPmwVjJKVMg0hWxXy60qzvgT93/zDASBgCVgtcBgG1jZnHjySL/3ZzfjYxEpJJKwKZn9XSrqMalXd3QKM0aady60NbvEV2VaqBXKCmUFs55Fe0yGh78QlMvhliIGqsuC7PVcFiqeN5opodCSHG31djSKAfni6uKLWywMFItABqchMUzVGFio2Ad6cAjHfTh5OFu4nGSv05+FeRAtSJKBLFOW0opy+kOt2rTr0Kmr6j79rh69+vTn0dO7jWE8JjCJipbnT3+3cBKLackdy7FKrLu7NmNrrataPMh4ZHZiF0/tox256Ts/+Om6v2XyN1yIm5lHWMXOVXkgyicgFJE1YkhIycjN5y0qqCqmEhyR59AWsBQrFavW5hmoA7BDyAHQmX8EzQTjmWFhZWPn4OTiHvYhpgXhhYRFRMXEJSSlpKuMfFk5eQVFJThCj97hJjQKHB1bFDunKhGNT/69RdwlJKiy7icdSERzFqFwoQizItXka1Jy8xoU1fCoRsQ0MqZRUY2OSilRvDqypmQ1bJnSkpGtdkf1i9+6QjcFS9xD0R/06q+o/i3+7w+pS3cvudth65kq91eN1shK0tQs2jPnQajzio9fYFhs3ikFDxTqI4XytRoCkEFMCCzwMwg13CKih/oycDtOgcMxcEzqwb7JaAND0R2sT1PQwgq6gtxl+/IrNLbI8cknFDopKXsILgtvOG+kcfl6LTk2Ja54rWjUqFGpRuUse0rggAr1ehnLRfDMVn0jzkfeD1Th1KJBU9fyyPD1QR8rt+xqJWtzNmh0+iOv4xqK+DDjI/nYJz6tG6f45iR2VWOPV4dxjjruZOTNDbd878dJk1Va2Q25vMYvWOUXKcLTZBWdXWnaWTMZq6t6bLhmsAS339Wo7Z2130MJPb/l3W2TtpN2bwrIHst6ab2cp0kYBRuLZbmBiIjKYDfEMONMyJPUpmBqKLVuhjALsagei2WJpZZZbkW1UmWV1dZYa70NNtpks6222W6HndU+xAGH4giOOeGUM84676LLrsZ13PSdH/w0IclskQdW+RAQqhLqUjJyVa+qfoOGjaZxHlSr1XWda8sYbnSg6FBYRYzWGooyIKVmtInOiCOGHwlngtXMLKxs7BycXNzLRflkKSPitEqURLUIzygCOj1XQragBIvj9frEeBDeD1rDdH4QxAJlV0ENCCP2lpf7BdQf3yys/2ZT8q6dcGL1B8J9l/kA8jK0xzG+YrPE61KZS74wXRyoAtQCGgBNgJZgA70hommwpiGahgKGaRqBGIkYY8tYW8ZpGm/LBE0TbZlkx2SKKXZEfaVVS8xNbfZN1fAQoJ1lhoNGPz/jyItzvCQve8WrXjvjdaBkAQAAgAZ0CNo3LDZLuqXe7RLE8hErrFqpaZXV1lj77lJFStNk6lG2UOtsWb+LDdhok822Vtvs2G6HndUu+/bM73VgnzfsTwccdGj4MOCIpqOOOe6Ek07FGWouibMW581Fl111PW5U3Ixb5jvf+8GPfrpdh8KMRVL3EEUb/uD6es39batbEeYRVrFzzbshyAObeZ2PX0BQKCLfy2P6JeyUslemwzHYL58LlIqmNOl4mLY79XsMmmGjxvOkVtMneU6jBeUle614rNr8GiXSRnViwzUzoxlXzQe+6hDyMPB4HUsdLX7koMeOgv8HQ1SZYHNmFlY2dg5OLu5hH8Jd0MZCwjmiu2hGDHEJSanhNGYZzWXl5BUUleAIPXqrPmD9BgwaMlw1HYxCn7Gly93bunW1PtWkTPOBSYdeyGO+4Js/Y8Vcgdc3g0zMAxp/aaFuK8bjtm8J2Yl8vBZKtUgmS/XXpuSHmc4Sh3Qy6tLThb8JIzBnwLC0yxn7xJ1qvy89S0echGytnerg/JiPTcSUpqGwbuNxRkzdcGygjsGu7nFMfL/DENmeLkHp1fynBiH0ynteEoxFXT9I+Vr+B5anb3EBJlGoBIZn0nV3zUtD9IatheS/H5dgdFZWEGyiMvAXCjawqQm1N73m4sVrqbPOevVinyb2eZsb09bZkZlzoutt361x6dOnz4rCezI8zIQNHxzY3u1t6nh48qaDvxdMIP8vJ6J3rUFd4aW3U6uSiOXsZFZ4Nhuac7DT6hMtx/L9LnxCcKmZgcSuLeU8q+JBSq0l8u8kfro7GwBYuk05Y6HhN7TPOsF5nAFRc2sLiWIfOTpRNJsQdqYmwRmnG4HUEUvkLmgnjF2NdbtsygZEX2AmglWeVUQBR+CSuS0PvJUeVIJa90Ku8pkJmHzUUMrG4M17auJ2czdRWGMLxcCLBJIICx5dcMChQ8N7rXTnRvwVj4dewe7Esnx+gWtUFdQfLuxjoT6r5keqifKmEJrFY0N16Aomg6XLMaD9PBy1IhGP8cmxxE6kFKMT8U90oFSHPoXPrMhaI2684f4UD6/jqfNWgiZS6lSfUdS2t0dnH7XBDTWVci2LmYQIIqiABtkywWquj6Hu0VlRv6Yu44ghDjR8Fu841TSWaBg5fmUC3iDEQoxUUoe49WfKcYxkChEYhz5xhw6zwoL7GTHSKVRV3zZtMOUq79yxmfNhOAszMrOsFo/7XR/rNa+thcgfPexJnnnquozk2OZKmdas5POZW/UdvA6oMoaNlrXMad0vW/LWcl2vkC9Sb8ZfCsYRd/mxLUp4qQICWjPJSqkk9Whi3pADZ5Rad3S7OWSTUZuLM39Tzg3dVOBBZDGHPkhuoVdQOZyi5vRKO+a1gFK7X0RQTFbxqiQ7onb0A86RzqgPVUhwrcvyk4wBISNOfIK2bKn4KC9475hNcCxRU4tRxSp+5fzwiBlEtjuxqDn8nN9hP+9MdHtV0zKBn2v7YbL5JvaafwUtKcnIitUrwtoFbrXZE2KnN9Itxs8W9/Uc07Z2/MDjfutJH5kve9dCZYXLXoyegoRZ5nZtVnIpZ7tZwhjjbnE3V2wwPQhyDhwIgTtmBEXlxRnTnDR0yB56ft1jdaYtg34ykR4qjo4FqCNMmjkUJbFiL1Q1dK+PZJSKFpSDx7p4WkhYjLq5S0uKU4ncgXZcEgLETSTAcVEzVXU3hjAolG6dNu0Ol0+65WKwinN7trbxHLdxNEnQeCDpK6eycMoLpT1QTb1patlVYlyRP+WKnbli9nOuuvYcRWIvulGSsZaT1BWPhGYYvgw+myFRcv1KfKSBAhmLk8llXmKeR4d9YIGo2jaIxkw18YrAD0GzvcbK5CHpSCYlqlhmUL7l2VySneUSBHI9PCuTospHSSLtKXer+hiKJOohWaacxc1TfwkksrENmoHAzS1mt+u4ICa+hwJW3XRVXp4h0zKcagHxR10Z38irUa6Br8uZhCdMvqZUGcu9vyEw7n30XQ3DWT73UJsRLMrClf06BSU6xDWYdFOhH8MA3d41bQziQ5Ep04pQtpehdhAd8Y6BTP85SNLDv6Y6/IwjJ15jK4XQ1ODsGRucRNsLmeXdUBQPVC3Hr2MpVXgNiobDPpOkitgn3lwaLkAx0zke6ofyp5INMlU8IGpKfOHtQmhkaruTMC7gcWfpQQwgdGOmSI2rSYAMkdmcDPzCojyQUkhxZH8QXuzxXk/FrUEvtC7PMqahRBKXZIAjPLGiC1K+srkjJY/9SwXdbiw8EccNzYR3ZM64ccyP9WVy6JTCVXycajLWzzMdODwSC3tk/LhBmzWqjZnnsQ1bQvyPvKfZ0ON5UqvDZpjJuW12mUSf61q5CnkspBdpWypdrJYEjKwK3X7ZanYjAaIo4L1UmEgqLv5P8k3GKDkjQ0Fe0jbGbDcvGqs1EEKTB9eTvkT/ZsnpiZ4Izp5YEfh8sjSXotXrE6d2GBF7tbp+e8Vp9wmXzJ4fIy9qk5Cc2NrNM3n7dIGLOrZYs1pnoK6rDLquD6NltTMrqR00iRjsVR6xZ0zyhB6wEYboNuNfXOhESlibm02RZQ+wyyY641qIpyaBMCwMBgIQyKoljZFogNeXyoAcOFIVtbu77mZyjK7kqltvHlx4FpBZ3ikDm60Cphpu6EMf26Ps+N/SYVfpy2DkmEwJx9vttsCQXqk0kk31RX+AC0vY9soc8Dsgp05VC9MzAQfa4SyCeyEeQIDOkCHyL2ZOYQCiQq0kP5iB6xDabQ9c/ZjAW+raaBa06pTAvKyPcU6iEZ+jR2ol+fmQatsfh7BmjO0xXCxYX6CD5F4yH9Dye8RFsEsCPWgvBS92iUd7Q84vm1sSGH1okwRxlPC4pUNJD2bZwEwzwd4dkbhMJaYYIbD9W2EyMxnp8BTZGMq1z7Pbi9bgYF2XaEJjvyYhFKWBxRHZuXSEmZxemyKm2f4sAyStAyKQr67qXutE11TfDvZJq+OzTk3UrQ8rWcLqWQCcIhU21QWXEtazl18N5p7IzkQZNQdSgL2BQELveSwRlOVBvxsHI0bmKPlioCYAiDDxA0jNiKxR43ZYLBEI51wqIiXK5JnevaxKOc5DtEaWbWeWkd7tRX3iSGzMinwUCUZX9+NvfnHgzotYrvykZQjMkbvFEKaiDorBLBhPa429dkDk8sqGTas9e+2IfCgJYe1gjko47PQXI6kmT13UNTv+9cFXiyEC6Y/k9fGZ8y++YYigsbSDkkVtyraImbyL2f0C9tdg71A/jOA/5K6/Z7XVw1bNlKIdcyLKaFZLtnsScr2jm6r8Epa4VgSOvK/tBsCUex7TFGXzDXazqFWbduPoHZM8xvMm/rjllPiRtMYzv1M4mbRyr1Vdk87EjrGkCmq571UZ50RWA+a3RZU0HrXaZSNLsQm5BDF3b9WKVerXfWKRXx7HswZfuIqYDWJ5qw0vLEkPrsthb5DxajQuXeOL2NPEmqQKpfyQSyTDgHcXUw4zvkW+3D6T4CCpPRJIZCOStZ3ze8lrfW+Hb5E8mRbD3FHEfPExn9GNHW1PXlj3/qSvpOk5iL/hgdMbpBYK1hE4VNzUm/qZ3wJw1xqMEVJxxGc4XtIhIfWOX8QQlfBWK7uKXyh7L7nPKxVbzpXsGn1DYW9neWF3Dk4d3aGeowbag+tWTOxtdK9qLY9dCZzjKbIgmNpUhJGRgZRv345AUnFQ03xBWkhD47i+Iu2LbmbhYeVFsTmvm8bi8EQSRoCvt/rxAt9qhrAYYVExcXlJBSlpf7areSI2HKJCUEFAY5P4EdoAA8tbTXHLodtEHDHgs7OA0AaExFMpbLQA9PQELkQS3mSeiji9GrOjRqC9L6BN6fhJ6/FABJu3RmC4DhmEAEK4RmGY3iTaYhabsUWcfjxnpWixSUcdx8rnL+AE9OAfH8yJFoJtNNNmtu7i+vBQipl3S0ZQj3SeYJI/eGyWYqatKtJVpaGCQy6r3MumX1COw1ktFr33B9TELSqLiigpmhIzZ07PnzdJtoIAfuhi1Q3XBqRJquJ0u7R8FOJJZOiIOsMoeksZGIc1cpNhMmpRRvTfnZzcPKq8xtHaAEAEuAAyQQkm7RQ21rLpYOlVc9I8Qb4MrINSAEGiDSCoU1orrVAHQSowYofxI7QBFE+KNhwtMt30BGrHFfqOqekJRsBBoeMRUod9Nnr3UMFRBhCEp4bxJKduUXHPWM1znxpeWnRLQzvqeDqNsPlrogf/+GBLSYFgkhOtWIfY2LWewyEL/EE1M9GicHnubCKIl6k5FcoyQNCZPjjcebPzsXDDRgLfc2VGwCABYoUboD/UkyLfch+z2e3mXjNZUx8l2T7Cal6k9vkVMtO6miH95X9GXFgZ/9oECBUZpHFmJCMbD56jQsqIPk5tpPZdtT8SZayFKCax0UL2SzKb+qUa2OqJUCLUCC1CjzAishC5iGJEKaIcsQSxClEN7gOPgKfAC4gGRBOSdw0kRVD/9qsAUfg94hBiCAsl7SW9N+mcToMKPiutrqb7xgsqqCH/OmYwHm1CZ5hDlO7sUOjr9YiOamWroe/T+jZ2VudCP6tLoV/WS3pVV3dNb4f+FPQXuqGbuqVPd2tfg/5N6N+H/lPov4b+x27vjkkFPDBmAMZswwHGQsNrBIyBY/gIgbHZjJmqqZnJ0wDjqGma+XMWjItgXAHjOhi3wLgLxgMwHoPxDIyXYLwB4715fJ6F8RUYX4XxbRg/hPFzGL+F8WcY/5ydi20E9+4DAAgIMBCgMMEMDDgIkKBAgwELDvyFi5AgQ4EKDRZYYbv9OhxwwoALbnjuve8E8RVwQinokIVH+EX/GBqjIyKiKKlp6RllyVWsVLlshcrVatahzwgqukVr7nscj+KfeBZvoj06hDMyjmyeL6vPiKlRyZrt0dgRo6NUY6A21ldi6LF+pIxd48A4NtLGWQk5Fa3ZPBgPx49OUhfNbuje/sDg0PDI6FduTgobn5icmp6ZnZtfWFxaXlld27IVbWhHHR3oRANdu/dMaz5/J+ffAuaMVqYXD504d+XmylErV69dv/Gsc3PxpZeffeHl1+btd+T6R6bmlhdfy9d+/LP8z+//ktvvEGD3TGxdP4lPsEl6UpiUJvVJdzKeLEIbU5dL7aeMmIpzWdVN2/XTnWlj2p6eTAfT4fRx+jr9nJrRH9rrB4KhcCTa1ByLJ5KpdCabyxeKpXKlWmtpbWuvd3Q2urp7evu6kozh3Ye/LGaIz1vOilb9atDvNLe10XY1xv4OdaTjnGyis13octe62a4We5CqmhVIc9XrnLnbMFatCzmxF3eI00YfVulA4nCWyxB/tyeWvbPabsuretVtnpu6Xxu8GZIKlFFQBf26zV0yMxMc3EHylA49G6K93h5o9vRwFhZIvYiyWYMDmDcM2zxcCUuT9kuqzk2Hw34HhwvOKf0K7Q1SNv0mh0u7eq9qEz5ZzRFh1SV66tkJxamGU489rswd2Jv49DfWCzDRAKyZRW8W6MBu27KbkH/7qaezYDMbBYK3AUttq/OwdWmYGoIaE3hgnIHoMAPGm+m1AFiRZqHweA8SHqFzjNdUlQhWSKmIwZ6ZB5YMr0c6dNspeEgQMdsNsFU1VHcDZTGHHJUx/5A+2TeAQXokjRHS0ezFzJnHAiZ69Q1f9o16MJvFz9h3Q2qi9bYivfmSA5oicO8C9w2oRHd2HpyNMsp2mzCh01OepYCrSul1am2HRpbnHhMF7oWXhafrBv1vXV1EXUgYdzyVz1C3NEBtt108GDTzgH5uqLA4Ka0l37TY2DrNNqPTz+mcvmFow+L32Dl6EYPJplvnqy7KT1XtOoy3CUtr2LJU33oH6eAZ2uRCVmClFwztmy/22GLQF+u39Zu9wcWJfFNp6KaCCDMojpVb291NCEOxTNt87m3P1P1p33gqgG0WD08jYnGChImoo7PrJBaDHDV5pPjWI/LvR6AfK66OZrCs8dQBqLzJfDXbx90Izo3GVMKgAJdgL1a1YqtqLEk36gAobM0X9wyrYmbbME1VaVV/Gt/bBGDmgTX60BP0BJKgBETtly34FrsFVW5x7HmGYKl/30YEGIA1yGBCQ40kMtpotkKEklBQkIoSo5c449hTGc/BBIkcTZTMmc4Unspt4K3GNiFq/ULuoCZqzY7ROuENvXc+WKE93bA61kRiZ6QJ91P0yXA/02PybzFUhKclpt7et82LAAAAAAAAAIIgCEB8NsTlJ51/HEK8INJLgIGGCyEXQ0UjmUE6k3yzzFNpmTXW2awWSVkD6YZwd1Mjva+Ne1GDU2aWfuvHSKPhjM94s+JtPxPoZYBo4yWa5Lqbvunwv05dDCAhlLjGPZ4JiyHTELQsdRAF04CZEJl+yHXoZzDT9eqJiDhw4ZWC/UirmNXZbs9N8hLZ8Hvqz4WIRBsnEfEH6qnnmVpi2oPalC2CJAUBUyBh2KmReMTsUf38xVCjRYiipKalZ5QlV7FS5ZZYpVqN7fao16BJi9NaETUNrV+cJtWvh12MdOH7/dbrvYmE3Qk03AcCTHjSDWysiTW4klQfVuVU3nqkJzDRzOBUSiGWmkM5YtIblVLiZ576vR6c8Tp0BqTINN8BnVmC/6Bst4YSaQ+IpLvmjkf+8cwb7TpCdxPkeFh8REhRoEabfgawEHGYUB4BgUmKZliOh4BDwSIgo2GC0ow+UZ9fIBSJJVInZ5lcoVSpNVqd3mA0mS1Wm4urm7vdw9Ph5e3j6+fl2wwwUzAiRtLsm6x5NL/Wvw1to5EhBen1IFkK0raCtDaQJgYk2SD1FWwVnuBJDI9HlkIwMezSti6IH49kPx71NTmkIP1O9npQAX6DURbPVoHlUmZMwZjWV8WjG6XUpJ9PynqVLnbV/i+yzG5QNzXSDIVZMRZQmqOdHCvlFuMtU0Vsk63s1NrLQZ1fuDiihY+TzglwywMDPfLYCC98NCpeGWBspifL+EqeCRxCSmvydL1gR3byuSPYWhqzzfPEL4Y/YE+VaC4t8MbFauyiFUp/2WYiYjIe/PRn8DuSd0yfgmf92688ROH3iENIaliQdLOJO510Qkfmwy+b9ytlefRL59XjYINDDW2jnbQHin8atR84BBwFTgCngXPAReAKcB24RaTwYuTCYRqvauAX2AfDAlL8nno8/dJzwc9RbUn0JD3UXSez6bVqF8jvjI9zQf598eMeP93BsuNeI8lfu9ZtAbsQ9/YOjQYZvlrL/UaO8gOlvr64cFCNDQ0KAG1YfBgO9Py/EegDQ/9Z2Bs8DA3zDQV7MO8L/A1cJHgbFllIgc/h/6wDHEUF4f3B76goAtt/AIGFBhIuNIiIQoOJZPwQYv+/GXALItNm9HmcdnCzxA8EUHHBCkxeRz2CoCSETzuBmWI50/t+F95POAQ4IsPZDvrbVZDdBNidnz342BPoQ9+hbLj8GYD896WANCAdA6TKUmyBZb5Xo1adQ/7zSrvOcERM7CKLV4IyNCFRRBlNdDHGlMKUpjKrsi5bsycH0piWnM2V3MkfeZZ3+VqUCqmkHDAgOYpjg0757IAIMAWoqdymisKBmlp7cB4KMnUNAjK1BQcy9UksyNRvcKCm+XzYCwdmP6w9/OJI6VG2+5JjrLj02Ivj2uPNJ2Q2+bbzY7XV2WtO3iuUbCBJdSzBgsxyFQ5k1nMWHpNv29nm4xj5lJ19GbnPzjFPcE1zrgPyXTvXNUPvIPyWv8p/7dxzlQvBg5p7qT5xm3iEkk/ZefbhMvnz1LwHgY133LK/t/A78x1HhumHEDb6EkSG+BbwEZ/ic3xJfv0X558BpB/3a/JTnDlZkMosyYqsSXVqsicNaUlr7uSfvElH8VRa9uVYLuVVfqLryeEVUhGV/JmHogId6h6Y0MAIDY2OuLiTEhmRHVoc5aH10RxZl44FNXQ2FkM34n7ceRIH8Sr0Y3wJ/RwdoSJDL4RCJYCFyqIQByqoxz8GfYwxxwoUaJxxBwOWQEIJJwYCyaSRQTb5FFNONfU000YXfYwwAQ0689xhjXts85g9DnjFWz7yhQ98pkOQlDp0SUhikhBM5yUrBSlKRerSlr6MZS4roYSWs9wPUWeChVf0lNKUoaWqjObV1CjKVPVo4H9HnhCt7xCYyCq0sSM5QgMXFRFULN+1PEdWK59mHE6ur6IXLocz61V2RzFc2Kyqe1fCFWrV083Dje1qZliEO7vVzrQMD/arm2UVntCrn20dXhzWMMemqI+aqCskISif0xm9FHKFh7GQJyJ2Fp11BnQHYiCJnuklHMIpfYYpZkdO1MbUWFhYgYlFsTLmxLwojB0xP7ZFWVlpAvlGURhiffCABRwQAStgDewLG1jhFrJwCdfoBgRACGyiB5BG77CLXtEn+oZjFpyFZKFZWHiHRziHV7iHZ/wSDXEwbCMzpkdq/BDFUVJYio4lsSyWR2UsiH3xY9TFT7EutkdNbI0thWpmjAl5jA1FREZUREdMxEZEDI8RMTJGxegIjpAIjbAIj/rYHwfi59RMLdRKbdROHdRJXdRNPUiP/CgIc1ab9uiAytm2Ylvp2fZsR9F+RelQ7GHtqY7dpM+i/+vTALtHg9TPHrD7dMvu0gVt04Io2Zt+y1cuVam6muo01Fqn/YRva7ce/e6g4TN1/xNx1px5C7alEGmcBBOoTaSVQm8qg2m+Y5QmXYZM2XLMkKvALLOVMduo1k677LbHXgcddsRRv2txyhnnPPV8oKIKSsoqmr284PNH48l0Nr9+/Ub5UNaycvMam5pbKK2LOEGqpmU7rucHYRQnaZYXXT+M07ys236cV8dD3AKIMKGMexEpSpIMHJ5AJJEpVBqXxxcIRWKJVCZXKFVqjbZsGRA1SG1SBnFJK/8ZIRLG9quuuq6sgCRi2VRkvVQs0i8bOZ1NGn4WHst23C4pef99+U9YWzt7B0cnZxc0BovDE4gkMoVKozOYLDaHy+MLhGKJVCZXKP1hCBQGRyBRaAwWhycQSWQKlUZn8NWR737645+hT1ZeUVKlRp3D5aFZXvQFQpFYIpXJFUqVqtxodbYrtcZtinZQs9Nb0jF50MasQB0EtEgTduekMlQs5fNDMh5B00WBIsYmOCEJTRiCpfFCCB4hziyZzTjGIAOoDsFy4IVCCJZ9/3eyItXfSOtsd88LDJ4NuzRjSLiHRSGH2ZhQ9rH1B4qQHRc++hsujEKcBEk5iiVxmHMUs2ybuaRUawLjEdKCCp80Cs+tM7epNCcSpCH04ymOOGKyTmcivzvaY5ZtM5eUsiM+9CMNR4zYC0S4RRuXsOKmua7CjSl5IzvEAYIzjztZPkOkoCxcK4NXpqFkNpY944MMtiYkT2DpvX7vNNZ8DDSagopWKlNjcAjhBjpMOilfGIQxUJYbpo0PjSvkRcx/DJdTSmKQpdA8hAvc+JSU4YJjY0GwYd14CDJchDgaepnyEaN5nbyxl5SFntxBGd9s39pQYWKo6aQ356ZxssVYwjHcZAy0Pisu/AwWIkqCZN4pwC33sRR1CDF5vNdyZEyx1gh79DzmIvZ+c+1xSMCxeGsIO5T+Yyuw85UbL2mWQ0HBGtH4hSFP6u6nY5ph38vKkwRVCxWXuChbMyoRxhE23sU+HRs7GQtRXS5/hdDfvZ6xIuWiUo1mZz1CsPkNkxXspcuDR1FJos+PkY+MnV7ZZ+PK0rA0O2Vvs2MszX1T3+xgXnOf1DXbm9/aO42oTXUy++2S+clsiqu0fQ76dQ74aVxgYHR+3lJn55CV/gvra9R/JU4pqhcpmK8X52Ro4QqpOSpjngXwPRjHZbI3v2EpxGipCewZ+TIMBce0HYZhZO/qXobssdyrflf3WONAULlU7v57h7Rz0kDBf24D1ZGxEmjK99wHHe+CryRr0WjG3X8E9dx0q89rJdece+7R1PdwxCYJo7X80qt77pFNNKIiW59rXntzV0c58ZiqxuO56Z0fd3XE3g194WErkbM2vralVHMt0690nqvBiWUxgG1NYfMtvNfffNQhbWUv3Llf4YyZs2bPsV+acAgfZiLDiK69R9GIZfP4CVs4Jlwz3P27yS1qz4Hyti3vr91h+w73VN3O+uy/gd/eBvXHR8Wu2+24sG1BKsoK0lzGp5VUa2sKsHuvjWXz9EN+KZJo1JbqGU2l6Km5ErHTNszylW7lV8ZNwx3Mcuv6lkMLtjuSgxduEWf1CrkOIc3FdyGG8pSlHBVRK2pNu1EBFUKp5c4l7VZ+akeTOiulYiph4yZwqeBRphyFpFIsJweAwwvw8eqikh+dOnuo8BP/2QkV9EC53qfzQMCMBkjqR35kkiAYVMJBI909PL2Y3j6+fnSGTu8G39ipSsNmzdt36sqT/wnL+6bxp11QV6IeQb3qaovGNdWPMROmzJi7xoIlQ+pa9CLqTdJHSF8GRbFHe8sqyO/TzhphQPBYQi6Gisr/hMZTi6M2iU6iGO7pIBRJIUmMBAoTqbinE288tSgqWonc8w0viYbWrMUY5UhcP2rCTCHBuYhH6qVsmdggAUY10sD+3QYKFmCtjqtUObgFwqkbDj+OZ7ebdrYP/k6mnC622X82fuAn2hc2PqFsJXiC9Us5cuNTfhixxpfvMqwsf/QiAT1ryAd1CQJM4rY4wVYgatLeTVFC1PuEI7eEeA7Jn9iPhDV54RKz32EvB4T0xD4qHFlnRWlqYiXVpNLW5EqulNLVFBQhJQOL90fpK67GlbLiS1XjK6EmlLoSUZRmAcRId3MfJqUPAON4YMMU1Nh+L6sIYKzaL0JWXe4EbRo0VjLUtBxDp8+s7Fb4w3Wo9k2wFLDx9S4uaIHJqZX/E8CUj5QRBOgEl4OFdAcDNLAc6FB/RIAp/otB9poZwptj6yR4yjyc//fe9Erjn5AkprT61rA6XGfq4YHpq5Kezb35tGGtJfzLpCBqEBKkHjIN+QbjhNnChGDiMAgMAZOGKcKUYZowY1g4LB6WBaPAemBU2DTsFlwUjoBLwy/BveBZ8Cp4F3wYPg6fgi/CjxGMCA7RAyFBiCMgCHmEOQKD8EMsnA88//78abhJalXqrkyyDFmmWJ7/gOkP7ew6/ecUAOXNwUAjwyViwJDEaH9xF+njM3dE2ENImrnaeh6iCklZHw3yFQZgfDBBmBhMAga7NCvBNGYUDUshqEcshHfCB+BjcCoRhNsSrI4JNUqt3FqMTIpMljzPAflDLv9nUsyp7rV5s+hmTv2nxm/hSdIJ7sTyxOLk2onxydUT5ROZf5dqZpdeu+9frL3o335hhRRcQP755ZNLztlnETQ+p38de3twePD6IF8HsMeFomocJzsGisj+vf2N/bX9+f25fdr+5H7vftE+YT92X+xp8t6/vXd71/bge5AncU88Abj1Dv6bpZOh1NYCEFPLDDCB/PxAqp9IbdunC999z9He6R+6hVxgnIeuLBsOg6zQG4A/Qja2u9jLBfccUHPNvMP61rSmjb3rXZv4jM/a1Dd9rzeHBlq3rSlMZSfTmM6uZjGrPSxqUXtZwlL2tro17bcfQeRAgE12fqSAoUqNjxQkWPXqBaOZFuKrb40DwAUAuHAKw4dfAkFCkogRd5MEiDQwCCTSpGVSpCiLEmXZNGjKZcxYvnDhCkSLVyhFlnIUFI169GhCRdVs2rSWvQVJKAC4ioIHrRAQ2kiT1u6SSzqgeOmUJcukQlWoOnWZN2DYojHjVlBNWbNo0cYeQ5K7AG6M4ME9zFhs4sVrCz8B28SJewgC4hF58h4zZ24HBsYTWH52dwGC3fI9WOyReQbfd9FFv7Db+5ew+Lew+Hd+5We/+M3+AZHfwZKv/O8A+T3e86nv+9znfu6L/cr8LXvM+iSQf8AP0w3kP/CfnCJ6WybA/++vAkz+3UcVyJ8OsyMYv1i4EgIEmr+vFtTj34WEeY6wLP4qFtNpZy6Ceo178DxExvMDKbmxziKH6LgxYj++AVkDd5JgqYNonl6SSbQmS5ZCZ8opA4Zj6A/+Usv9YIOtdqq1yx677fWjn9Spt9/P38HxhfGgXx3SqMlvjjridzcEPVLR+RdQCHKEWkSG01ZcoZ6UrbZH3bBrr6Di3bNti5fH4UsOYB+adH6Fexggwv3CuikzbERkVQkICsMNSZPuppSm+tBcqvlg2nZW4b3bRUGuMDvzU57FKq1QYaVlB+ls1SG6C3ccoP8yYJP3GZNoeRkbRSLNSUyiIgeZdEWBehsYp8BYGba6DDj2ewB7AZqwmt/mDAEGyacLoSEGja50GmAEKkC7SqiJ94eg5FgKOAKUsEIAHWIxYElnwgZpHrPw5mJkN59cddZcybgSRqRBCWbOEh8OWQsAE+iVymLsFldeV0L5WDC4AJmcB9S4J+UqoBduVfMuTlOc3GUmWd/jGFY0564i8uOG5hlftgDwCnNA8BZBsYhOswIQwhWF6dt8OALaYSwedKH7ODOW3cHE8IN+0E6nfF5xJfRNCE86capKMYhKsFEI3cRbBu1TKtGVrpDcceKfMJ4EBDz5VqvSlNEcgZU0Q/md2J4sBIi/OSuuRUiEeZqejHxEAabquj14d3ZCXWknVh0SBfQc/xJD0hMm2uUpMNfQBydaWoaaHrVoDJbLlPFWXvjkc7Wd1IPvAEfG1c6s2uRxV7mVjbzAxfU9vsjzwRrwV4A4Ot6873uQJcEILvfYBkDN+l7hnSLW07szHQYINAavQA2BE1DXZWI4ZMDEyGwTRAMEqQrbklKBrgoKYWB6uoCLINAYvGpq/iE+YwdBIFJdkjXpKXfNDBgEKQMZU1XrTI2YfBygIN8IzbjIvsebn2DGicziVGOSaoi8GrtJMe+yyMZ2o7DL+KUcvIXcM19CRxAT7YoNTQcEp9IrYLaD4pIR67lELxDHGlifUAER6tFtYs+phQwZ31TKbsO5SUUKVNEzySPu8Ch337aiQvNaYi1NJyDZUuPrgfjlZQjCJmOGA5ExiFi2XaniIpKhFn0eKA2ZKaOQRsVESFodpNZvmaIjP/01266JYZx/nxRjtcNKScAA8dhU8O5sdV1oa0JED/fhukPe+8t2nE5TYphEQy/WtFe19cAymvH7FXcWTt1nD4Z3Wkg3/QyoF8rSfWKmnXm6mtilee+apxT3tJYb5vn83NP23KeE6wEDbClbr6+rQuFl1AYWuPd6V8az0Mp4iEZVF0oTI9j3yijllD6kLBDKAqGMhDK2QpVBylR27vdVnLQ9KnCWe7y6msGEF3g02EWCoUYLa7RoIYFWK6ro0bZylTBCssCuwzRv6jurXd3gCvVe7NVR5nZ/Lyw0nKGxxH14F2exhmiFrkkHVRkWdh+ADs4Ca9yiUWBouV+pjZyFceDFlLRVkhcXqoXrtf9rfW998zlFsA1DST4M+snX29OUFjnYtcjD+7ZPz+31tioL3AUhPioWfFFUVXg558jr6/5aQbUejIEJO1A+d9wt5eWFVG4e+mE0QDA/P4gLzprIoA54jwWvFztN6hKJLtzs4jtsnFBLFzc05DUJ9Jf/y4xFyBBQaR/VXvanlgkl+FCUeekryLdbnJ0uIK1GOJO8EFDycBF9v1AFUJJ9xVku500rusFrT9AyZqyT6iyTbJFviRInXD2LxoOVeLDOtjj2/xFPHjKvv+AVh1IE6kHjulPayttxNgonYXwu6ra52QsOW367pzsodNYEOForJl1ozRglsFtLoDj7L+O2a+V2SW6d8z8tpbrkDVUcylydDrHHOWPa6liftrZ3glbgH4KEaWUWx89jCRG6JWyxCNbMn1jqLiphMZB2RZg0rISoOFQeuE3essXR3IKgEEl4sdzicHQ/A+vah1u6PFbooidTGW6QsoTy6qC9gyqKHJ1FQllTDPE1zN3KT3syUUa0AmD5UBI0LFbCmWJjIB1/tnyFqtAVXILLnW4FnBvhVbyCuZZW5xG967u1PyxX+LevfHthAe0/Na+0zUHAdL8epNilHrYtEHGSk72IkY2yc5y8Diut3tucMg5WY1xG5NR2mx1xQLNfzrlxr8YBmnLS0UzxMpycfF36/ZzGHJRrkIh45UpqeiAmv0eCBEL1GisPGiXB1TzU4QaMwe92I1EHZfmKrNiQJudkugYXzp+GFwU1rHOtBCIFfCqOjp0TQtGahAmIk5i0TplTUC1MX2o59XUkzhWensTqnvuWe9IKZx2KI55yDuQYhRDp6wyKeF/QByer1ebuEMoMw3iRLKV+dqKkctIejQctap+V1FC6Q4NheBhbZnapibToTUHwCCxSybqDu5za9CzoNlu7RnBnMXei4JwVZ0QTFKfWkYwnYzHiCQ9HzpiGQi9Yzs40RoWNHQWgtt4aQJkJ02oDVO5gmLBTmSPCLMjfUYUi6B6VMduod9gIywWtXAL6RIoyf3sgBvqTNj1eFtDC43sf/hoZc3KjhdNGtDQ6eVcwlSgfRyvgzcQGhSqBawnm6Mm5tKAxV8geHMvqNtuEXC3MAlbzKQMwkNVCuRiijnWqJNap45HQx5LUrq+HKQIGmWJZMLjOtQIZmtjI+wiDQrEKFqfcH9GANAl3TRNwb0vL70oz+w61y+M/mp+7qWlqieSrGTNIVdCCRI2zdTVw3OPyaJR7A3N8LUQZvtE0aPuk+0m+qaQ3EvmXCm7ogk1C1lljIKOsMMM0HmSjUdHdf3CsstIBtziejYltarbw8ajuS6Jik6xWxHj6XLYegYSkRn32bAuOtEV5SCvhzfDrNSrIMLQU52qGhABmgGGRwwp6+G34m68OvUhV9L2v/0HTb1Zu5BR9ZEoj3/O6708zMs0flqpMclIxEE7xB0f5ZUq1ZWyPmKCQMZhBxgpTLYeE/PinUCa/JnHXrqYYCHBelC0hCqPNtR5eYEAvj1XUGuHqXTPuGXpNuMBJ0EEes8ZJx5OZjtYx2chAuzwrSqH/Rs9LXElbfXf+2opglvwHzE1P/wJh6qd9fTYyuAbef20xw61zfs99S3u7Fb8U6pa56FXLLumMBZOqUBztxx0eq8cwJZDRuGwXk6pByv3EvctSeiNee/TA6W7aN+8gR4S6J84LAgo/kyaIxEs4+4ophRL+Pwwk7uPQp5wcPVcCh6Mr7MEAX5hi+yBg8otaHjsFBIgn9YnlBtjFqEj4LbV9dWtVK14vgbWp6cJvhWWRk6I81oWWxNxUJvkYsfVvhkiWnMJi0jgdcNLnu0DMQh9/Bpx56OCEDQaCgdCpWb//xFlsKuluyldPj1r9t3+r/NuRk4ym7Mi9f3jNu7ZbXPc+R41mW8+ctfQWJ6UUnUvMLQp/F1f0nRuqEG36cfnvWPMixWtYkeWVV/JR/f8fnNl4CYsWtzarHpSEGKldP443V0NjOM2JMAkanKIfczMQOGURiuDt1iPhX0j1fxx737DP8PIAD8hpwYEG8/fUlAvt7wMgsbU4Bg46jcskoIEZmKSZJZkIqdeT4Hnpn4/Dv6hBP0wHUZIG/SSvsE/RBthg7vZwoYkcDhdf4mw9LovKTCagCBOeqGH6E0iLkcTeo1bA4jN4VRMg7JqWFn/QupgY/AAW2TOmcw2A3wlhDANfkEGZCakZ0vSQzneKuNO8TlGCT+f0OGL7uleP8ia+10EUFQK1kHZcURuaBZfEu8FBDEEa9DE/1RD4pUksRnek0V/xHvZxcjKAkA55QDFICoSdkXjSg4j/9ybe4MMw2oTR+h29wF/f+jcNCzstcBouomHJOv6nkP6n8fTa9M9JRDp6wJ+Pfp8OrUV1Yi5+h9JRhf3e4vuR/ro9kyYCTC4SNaAEEkpiR3EgOoADIRpRiL1gEpMk6F1Ny+GV0tlNqtkwtcrgHVvZuYyQP121Bp7CKyU8fbY8lodukc+RSIl8BWBt7wL8rEC01uAsl2Qje96JRAWfDIsgp6PQoMKL204CU5ISXjVkuIAGlXJ2mwNfZvNESeLshKPE5NNTS/3ZIh9IcLwQ7sLaqgdUk+ERxiyPBNOUlnBklrJZC/63WcRcPBGFuc66xM0MQ2PrQUqW3xDB9cQuN7ivwdUY89bf9mMq1mcwPQDfKU6vCNN6xGpZIXM1+ZADMClVZfIT54NkbgerD3r1keGXYYVVy1Q/IqYR8dWdKWKf4UjNhJ3iYxJ0fyFCduRmBp4DbIlu3UkLcEAMALiU0wF/KlVPgXu/BDI8sMTeRRJiD9tY2gZr/RuyubYhYUIpl87wUhBkCk0HXiTP+HBHieZ5Yk4IP/BZxtj+RPMHRdGPLXXWaDYSUxJ4MD7Ej0ST+d6zyRS5WQBRA3ObPkYmGz041CS8OXEEvpGqgDohwIBKjgr7JsK0nsemHRQj6VOskHPEy8iLFuLLJomavW8JdHmKo0x5xGtZGWqJy7IlhDqRNBU+Xi+F4nyjagJXFoddRj16yNj9Oy/L7rGG+ecPjA0ZGETn+SKgshQ7V0246IgZetQ7PGb2zBLCgMQcdAElMSX5lbeGTnzJSQKbT3JNK+8Tpv/9wpCA+HICNr9KHEUfTiZt9CsAaEl4fBtJQzKlF+OGQjMTQqeD4MQ2ygYd2eCGAasoPpexzoKgXIpJpG4ClCAKNQI23hMLOPgmkaB3SivgF5AFKqJ6LRBEjTfhUJENX/2S+wFT0Y14VrNn9t3cxFJVmDMx33knNwIqM97hvhiC/nN5fHjLk6ZHBk9RuvU47LPloMGLP9ikja5/04UKEWXi3PkxVZM1R4/DHdMI8h4AAi5BPoRdBxvx4IcUcIk6CIjc4cVsRY62PkroGG5KuwNAxXTIJpCLqTPUEgdcORx1ew4W8vrQVo8fvAr5NN2/Y5FNuOsBB63WBotLqKShinMJbJGmp8jqJ6Rc+RLSoo7M3JCymzXFXux9gSm6FapRfcbY0wdeKMX5aYhMWYjnJVIezYlVVtMC8YZ3A4QsQ77Tz8QbUFADDQBArPXNvFJI9o0cS4xGd6BbV6UM1rr6bzw3Ptspzdh8sCSrxRwpfIeUSNntozq8ZxBmPdkRVZ6cI1KcTfC9pBz2pKGTj5vOiz827EhwfP4iPzeiZDX+2Cdmks5X7fM2JLd8nbgShuoujeX9Rv8l8Waodi4GM2+fTTMr7HREX+KkRCklv41dTpIWpyUHKtmSAdHDNEmKJadKknxpl8iZga1Oki770+LMVK3uM+6geBWZYMLn2PvfD+ZV8KR9xFqw7e342fQ4jy9992OonFNxh5djiymPhXCfOms9OISUtpCpPe1R7iFGQiNhitQwksIOgDmaZYrzAvNShO8Y31KEBE7PS1zzrCLxdEDRCeYdn5q8zx02yKQ9OiDD9U0oYT9GgXMHthQMQfnv7+JWGtUimMiz5eRiz8kdp6MFq3sKT88HTr3oyPLjLkciLxuehPm7nGlN9iDtXWNL46FkTPU9uuHtGIjqe4mUCWq9cngqdw1JfXhEQg2fljC9GmwleeiCbKq3bpVcBOdXMHzEfjIEH/NNTFhsqmfP99g6O83G/5RmI4U+0xe4gg1vMzQk/slp0AdpUz88PfYHZHU8HETHR2GKDV7SpMHRSZTwRS+Nu9cTO5LL1xrrt7Aa02OhTmifbM8FOI7CUzyP3qIOqWM+YKuRKZ6o4AguQmPjPe4N0sAHmagmQtXIdC4EKozQbfNCDMARQ+J+8sSzHQj8G5KWIPsd6zPu7Ci23OuGUNr3EnNtleF0AI6C/kACzEZTFgmyf5VcF73JQhJaYSdheeaLFGJqkSkhBCW0fo+jdi3z30UaFBMGStvMW4HTT5OQsWtHMBKjO9lNSvquTX6YJhIlKwsrbrPFXYlQPuOuPC699mSUljyqwrlQNLnAZzqOuFMce95rhSwoUYQKKCfl5i2cjHFXw2gIng56kgNCsT/8S/Qqei2cKPo8fkHY+lxGGn02PfOtVxyFlCkfLZl9q8gPpFRDNVRANxCcqUOiKm56mBtFhIJrbEwajuL4AlwfgPq+Og9TrRHvYbyIFzDXMvSk8r468F86rbl8dbiwWsLOfb18Wtwb3S+q3soLQTPKUcizoPjSVE+uF/NW9o79QWk8KN8u2VLz1KhciCZ7U48QYWjqY2Pl4PwYhagGk7z/rIX1Ao7t88el3Xrad3PfmdJaXo71n9HMqOjj3bBV560dHppOD6VuQk3SdmbiXYRESIR8mYYYT8RoGPJkTLkmiF5w4fRqvsC2vIjORQR8qdei27yoWOSqUmvF2Oo0KkqxWSdF5PykQLFv9Ro3R3lWb3Mc02WUZpdwgALXuD5k757oK9ZhSFGl7FnG+xJWmaaa0kSfVlpwka9cnOLR0+4K8goTOEqAENi55IAAv1gurQ9/YT99BpRpvkBPBBks58t8sHw4ON6cBVUHmoh1JhGjLpK0iX3ioZ6ySJt7d1nbae2SoOVtC3XYCYssL9ZDSJlcD1+NrHKnJxUnEDqJnWXUvPJ4KHFWwUD+lcI7ECApRbUnStANoSbvEZWmIzPOC4HgUcWzrCrX1tRPAPdmoQLQqmKwIWLQIvu8wJIjc3aeOGaeel5Lt5BbfDxF7J2cqgxgF5SSBpS+0KBSTfF7kwsrRGWOfEgVElWQZuEw2x/twehokNrhb4wxnmNiIuwZt6Jo60bbIsiSfGldKCu0K7iPyoWOtArE/pxz9CyOCkTiQjtTqC223x8lXNZHKUbIsorGibLFmfCmYXFyZcrDsz0qItomoK+yLXdo15hzhEauTMjybjuf20dvopwMJObw+pPTapzTxwsCiuusVXoZwSjs19WuCXhWNDdN72FTFw+eg8kR+O+Y08kHgd52cpY3li+W901elrebiiXCVbe8/ZiWt52flsivuiU97OcrUN07Vqasu2zFyvrwqZJlA/CucFk8tcpX8adOCbL+kSpk3f2lEBUy6tRSTle453C5l8dlOyJd0V8xUUaVdLmdI9Dl5jqZwhzBLq+VHCnnSlfSQNxp7Nf6J6EAvaKUf6+u9grsTMt0Wlw4agFipWqlVm1HF/JYWCsPy3B746Xgs1GCEG+8gu5S/PhNZmXdtZWK6yqdYAlwdPkvKAR7FZne3H9v7s9W+JV23bn1g/nxErr89MLnZeryBzsYHZnLLaPxuwC16INVBghGoUTMZAcza3OtgiIgcwDR+OgIPwhADvRwgh+/5/1jeygkVoPVldogNTUdwdbH5sYCQ0uE8uvtEAvZD42qxMUFmjY73HinqqI5q7FcIKMsbH2Gpn6QWy1nJlpnmTdRRpZ76NuJFZU+5E7J9yeU8NqhkhXediXcbHsD02DRQMVS7tSN7QQ1sqFsVm2hr/ra3RGe7sSxlPxMXT0oFmsaknOVL3zHIkLTa7YAX5OFy0u324kSc9O3dc3lyCXLk7BaWdyiLey5ggx7yL25o99XtqZR7XUeChfD1gFR1du1PucsU7Ep4I92Rj7+d1lH3iWUBjLBL5mE83gfqwoOfuEGHiL5SnRTj+hmH5yMhZO9eK6UniRSH7q0W51UdGMIm3spyBoO8Xqoh11UPiizgCKtTazeG1wtbfBTeJD7VORDsAevVQYoKypulqKogKQiHiZ4IahuBEGHrab+HM5gCScGuhtv0F+hGBg4T8MuMsr/QiE/GAhE1JqqDK/QrsOtprsxi+6XAMxnHS06XUGWCZgRP+INmgCW9xvaDBUHhvuOABapBjhRdFozTUw+kRkTY4tMw8yyg/kmRsG/fzK8//tJ08nfTrBFxXNbXxZzHszXdrk7J0B8NLoczTqayW0Hk5EKy3mEbaJoADQ96B/F4vEyj64VQxuqoMG/yQa60PuHQk3rwu4pQe68NzMineXqnj8c52smUfr5NxYkapevdDVKzqwY8GbJBhiaouXirnX+d7DAWSdsvGLvjQ2F1GO4snHCRov+nLOjHV2D/OIQoOWwfZpx7SKNoaNtEmysTTK2Vri4thcUuba5uLu1FRXKgj4my5tEjMpLRaiEC7XTGNic7dvE0Fr+EgQ2kKIXmHRaMpDOhhqZmmfalj9Y6B6Ym88KJzYWm0pKnJcJmlxl41b3QhD8Gdmdnaeb6T4EAjHoij/R1a8pK/heyMXAUGMLVzdLC2/Pa6q62DG719BiYhJ1ho4N3+2YqV5+/6n6Tgcd8PpRjCOZGHnYbkRq6VUtROWnqqpnzHXujZHPeG1ddUaNEoW8Zvi9TZI1h+1dnwlW4mfOg7cVOeQhctZ0FmmIlAPCRVJEElgoN08EBMzT7eggiYVykOiWZkHNcv8hAaUUqN0xLd6IEm94PGV3NBVnSIkzUmdQ3Sjxo0n/XR45sKZO8vg7nKOQrBXrJtM0wOwPgh9Qk/MJ0T3egWlJ2JDym1x5+4ILIv8tz/95e0sPFqXm7RXs62qhLfAa0nwbuEG2IPfObbwRi6wPioquTArBZ0fFpfeEhBOCvX1T4/ywxcFCfgcSVP5Hc3d+bvZu3bdB3BDN6SDfzJx65g6+a1EOpc6YSBEeDD7QGvtw2AKfTwG+kHWWbZfB52JO+Th8YjUl+WZJcyo+K0r0+kNWxioN09lSwRaYvFmLU/jcR46Nm+f4QBwkfNgyLtV2FLkWbS+X85t2SD/XtiNoEeXuWXKbnfGj+wXsAC6KuJ6E205bFxV6OBNT00ZIqm6Mja9pTCLUtYG7SJV0+NZs1yP4dgEIgHwRftafUkiJRyJ9YQmVEU0nT/fwozoxgfrZ1yMIlVgYMhZe2JbSL/zs8wypKTUA20wipjeSsIENKekxNwoSaYXJ0VH5ybT8RHD+NSl82CIuFdUvyO32+jbn4XTjNlYhJvhwOqbWXdPkrm6C2oybLJQjXz4WiHdjbMr5FzvT8EuldpEPE/y9X//B7P7pDCJfDC8Oa3unDi0OgbSKjeMz7h+ZL46O8GFCON3frtBRC9vzkiBqIu+bFhvgXxbO77d/dkLoYGnh98G46floY4fv3cZWKhrutjt8DSe/O6H+ZWvgYtjuauKlseE0jaePLyZ2VLPYTueTbhnsxcYYzOISsgyv2flacsrhcKMca9eejd9ThMCN0Vi8faLRBMyHEuZobhM/1pDh8LKx8zemNvc4qH8cC0rudF6Ub7i9W+djFE2NOyceQq4j3MioCQxJqYkl3KwBAhASSU9ylPQy0s/1ht8wZP9xixQYAswkzOqnid43e5ZwdjXp6K/lZc7p8PQbgVhSJL5x1C8Knx62SAzDRQElPuiS8RTV9n4dToA2yxJWdjrzrNK7Q7n8z73Nj7guP6uMPXqal9/wvvEy+a3GQTCP2tvCSOHwHxz3OqlcazEymtmRph/z9H3zHyfbZ8qS2vk8K5zdRe8aQ869fqwfzZ5kl8+Wx4IrX6BlLLgpeih/Q32oAG2WDV/5y41t2F9vLpEf19Y+5r38rDLuaD+vYO54h7NnfKI86fbohat14vaO413HXWfsLu4u7p0AiwDC8z+VZhQD92jeYTjvqkW4Sym4sSwZbr93VtVLCvMxNPuqF/nxIkx9SBFsH47aS30yIkQAY72vIRICn/fZKrn5wfCjPqk+oBQOrWQPm74dKlC3RUWZ0lYr2PHTdJxAfR3RE3p6HZCL4vsF8Uflh3zKPfzKh+XxRyqefqkLP3YJv17MdVgBI64NYemR2KD0uLBqoDbo7oz1cSFzndeUIurxAtN0dnx5GRv+Fh0vUA+1LWGXHmdlWd3jcOZ6T9VX5YTj/Tyx/byE4/IyCu4XKP0nd3P+Db336IUlPFTE5wZjGnfLffYKRizWPaDWFRgJkSLSov380yPDSSAZ8p/8c+jUU0QUNTQlrTnOE5PmXwBtl7bkS9IIddHOchwUfD/EfM9rclf37vuUkmgX53jPLGirrD5PpkyggZm9PMGCKvEJsMw9nx2a/TgHHkJYLw7i8dm1Hul50t3VuztsvevD4zcIvJQgkT6IqszKiJbOvpR4QAKBAsyklzzRszK8lFlrPuysFA96dk/AgeTFx9R1nhfbBbj+XToYZXHhh3vw/3zW++Mha5giMk4RfD9yTi/66dWLdOt9B7UvOgLWX5WiRpDctJOvA42GkMozjrjK9a6/gLn8bxdItNc956VFjgGXolRONKoJeH80/hCsMqu6s6rCYZuURQLi50m/TvnaT6HDkOrVjgJ73dhoU5KUM1s/FzWXmIAQ30RHAetlgbIPU9OL+7MjR5F1TGsSNFLOgmLx28gK7+RMamrDO36QSOFOuQ5WIP4dDgpOiIJNwEzalEQouPS7B22zKTz7JKTxm5rdt1xd1b+SRR5Y1ExWDtwg+5cUXj0G+1Psax79dyFuhb5BGUO3GlsG6eTgkkCI5yZigGsLcpAt1otPaxL/PsvPCmx3vugME1M8XRHsskO/iwpV0cuYnN2zrNK7DFwgnyQUjj7DL72qepV/46gGeZm5ZHCIvKpf+EC+kHHkfaYrd1F9YVxsZy54iaE2Uh85eHqieWr7pJVka382fseAb8QeNV0jLXmkgtegZ8gjdvg/hxKKO9gmJwUXZMl8dVRcbAzPyEXDtxWHb2Xm9s2WVYgFaofySLAhAm2qbL0aaMu9HfcCw3CZ4fjMIv9AUAs2AbfKrv0H+8Ce2Eaxsi7aXHfyxjgx7JKPS2KL0EEUjP989Ok//pOmacQMEgAv7st0hIJ1pZ03tsJB1kYqqHWzc2G9v3kThw8ihoVkZ2JiNwPxIVlhwRn5PmG0u2cAad6Qw4vKD0fv4evLKtsre0XLHl5U9Wbn9S+on2ngIho6wSqS9qxZ/hGsBRs0pDSGGkrgfcxcXtbX3vQZcEN+/9krUnZX2DrbyssjydpI30/HlydfsE6sMzs9/3nvSPdBFbRw+XLGoCveMsbxqi9vnpAlZ54cxkQJZ17+YRhksqKcXO2p9MZ5oSWhv42/E6T5ZAfagBFk/cO7TewmJiomPwIfnR+F2cTef/MWRAgbg6d8SDSc7wz6kTARAE+eeWxxItVIzm9qPWBIuso1XhUYcp6geNkAoZjTkNP//gHwzwGv/H8QWN92hSP/hQMDYkefZq8bzE2MIrrHh2RE2JQw7sjO7yA8oq+HAutH1zzgql3IB9e8oN49gGhi7uJuibQwc6Q7mplLWTm5WVxpmzA1XTHQcafD6DpuRstV/kQbGCQCVo77aCxEWin0xNxlPmDSxHTV4bYyd6M7piaTT5RaUQ8qWs24g1+yCnbNxgfNJ0IRlGjtm8i1u6F+NbPHRPaymQ3GXlCwTUyktXcChHowMn9/Yvgbfv+JEZ9smBc7DVFPffNiDaS6Vr7DO7DGu+LWERhbzmY77gLfs7ab0Kb3dzv46iKnstPGgsVHgs6mjwIsVRCXGRKkxHJ2wrMBygnED5WaOrvsdeP2ySOhuR3B4LRIbwW0xDV1BV99Q2FzEZOEAWMbfv2rBCd9eDkVPGkICMjN9E1G+SbnZgYEZufedGtozsAUFgUGlhS6JjY3uSaWFAUGFBYSvSgNN90gLkmdgyedg0mJHYMnHYPgo7wKSSVHJfNtXPOnK7YwDdunic3vMpVzlEnK8mDwgLJL4R7xt16VQIk4ftQr0bSk2LTuFe9qaepjnyQTLV3sKu2mrW0mhdXx9i5yFYcbSlkQ3UpezI72v2qXbKJfqplzD3exMvFGJ8rGSDc7S7traZpJBejO0w2gJbYTZe9mozauR7tY24Y7pV4g7cCvxzra2kc6pF1wYIcURbeZOZQFyl+gtYIR83MR/CpszM9ON7/2Lpo+Z1s7Z4emJ+BdJSkt0L50zJvW1kNMaq9kSzPUHW+ZLcjg16/NU0df95c+pkCzetSKu4Pzqj/n1QS36eZ3QEiPKEB3zTsV5zH2S5guAFU01NJWM7vSXcPpW5OYlFqaFKNjlcy2yVRUzWV5W27/ipWbh558OrcFW6Q8UDwIhPfBm1/JNsv2ZT/dAqBmK9DFPbXkB0Ln6bZ0IMuw1J3z1GkujrMQPn2Ka85Pqdl6UFd/f7sWPXz1dfcf8BesPTe20NWysxARMOKk4WcWBTIUyGv6DrEFiX84K/pBPAjwoGcoVhQAK9H5OzKafHNk+C/P92ay0jl9N1c9fVdXAz0XV300HxA7tDikL4YmDZFQNJTwKkQDppfCDtbHyZYoP00dMzMNbXtzlvBhPvJkFTm9vfqmG64o2rOKIFJaDMqOjW9AMfq6eJboSfG0PEO0qbaWtYGpy01zAzMdvLmRuoatXu2YYNp4YQa5lYzLTFcSMeOd6I9OnskDfERS+yn94xRsJNqrt3hgWFAmLoRU7Be4KSoHk9dqi7F3NGWLRiha1rq5xRup1QOxtZMn3J8PT3N9vP8csNhlAeZHlwHzIyQ/Y2Hk4EYcFG+zFQfc34RHRNoxtfcTq24AvRXZpYXyisVFucXFivJOhVovnIOTZ1i9Z5iTA7APkOuTa36JaEQMzD1lgl9/mkXbvcp+xatv+P6RN4kYkZeKgM51tcZyXQ/MJGXODZsJpov+CWXZ588Jc6OvbcMQX+aqREuLQPthvYHO+ifW57w+u1Vk4shpSqLgd/Jb+TyH/SFxPJlEnhs5tBbdKEBbK5wHnf440dRZ5/UA466wP0fY4TrPfAjKPQg7CcZw7H4jf5wKKX+NMRvZ7pEPdxgeFVdFVbFuPW3+kQrpyBgUDVEyuySPCspiNZSOCrS6fslMUsnikhwqkMxqKBUVYCXx8qVQP9TRMVtmMBGHMRfpAwMTfj4UG9YVGzEUE9F1DKy+SEn/b8Xg5cm+bWD8di/y8muSxeyjbDwdP/ZmjhbxcSFcVjarWiqaSHZMW2MeKUMSOTZlXlVJqbbR8kJ7KI9N0kkVVUVX1c86u/gpMWZIcrZJxnc29xJoNKKjnGtje0I+jjtIM2v6GTLkEPNvZPAZ10xvdma8HzbYorZW6cVy4DYHjpICnf06AbpAT0yxgjCW+fI77rhO88/f/3XK33bK5/LeuHbmfqMahtp7U+S36J7QkZWR0OQ2kexvc87Nf5ulW9Hg67K1RdmmpKDuevpUcoo1XR9Q+gJ9PZbsEfRp4UXnxrlo7AbY8GUfRpLdgj4vbptWJetA9vdaZYt5BwUJx2WDrgVygkzxTtbioy7ZckjGRKfK3P08wnFidA0J+1/4dcrffkpyRR0vjLkUqpHKkJlWKYo0p7/FWXqnT9Vct/Rkzo5UR0w6JFN2+OPnmyfBP+a6pJSKzPibGSkxhc0BiTF4TwwhJpSc093YvDKRZEEnRnVoYJc+3q3DReW5SiDj4eTxXH+L+nTfXqXAZMo9U07Zd/Vcgpi4ymc1LnM+5dONsYgRqhGkNNvZtcs+p5P2pZAjv/aSBQR+7fKFPb52Id+cu0iz5C+YtrXLZZ+q6KmwsrOHYsK6YsKHYsO7vlt87f+6nHO31T4Ta5C2e+2FRhcCTIwDL+PPGrMECTtHBwRjEj4dlb+jTiV3OUqjkKrWI87hJU/y8Uc1SB7mHzoH0qk6hQ9kCv6OduRsxV4MQCoFrsdoG2Zxx1QURUQ15QomdBtb4Z0c0xracY5vJRJb8iOJdg67EZX42OXDUnblQFI8TlaidwXQFD0doQxUAyM2792VMy0mkmbBLmjzwKFWaaTXLmcpacjGq5240aS2xh8150rTuzE+DDBEh+q/OhoAqf2en/GjMj/h215Rhi1ZFQt3JlamCbpJx93SddKylN5RuX6pi9lBOpqm21y2dOP2qZTum4lc6nJ13eRKXv70am319HLSvUpiKkmbfAebwEyVxHyfM1ttPy2CCo3L8K1tt6ugA7nsX+/qsQrbWuXf2u/5HO5tfpy/aSIRQ4tDbb3RKJSmBsom2tpGQ8u6/c0dg6zOYXzR/AcF5cORDJ9r11f1a+EKFz5c1EbXbXo9rTVn+E5NiJz1wqGV6mNf9xpafGWhHpQzdCfmTwow2VIpUlLwyD5KoWoEk82TopjFJmRfFDIDB7Dt4miLPm6CleOSE1LBZdA9KOey7ychjftHKcdACl2F5fRmTrQ+rU9eXlwIbnmFpguztstbLFvgWKlA1F8jd9X4jp5SLCnIqCqT5hlafweB9FW6t5IhuS3BxtzEzM7MncKQjFQJ7a4+R3mupLpSyOed36gFvC8kMzwwJcUz3I139npz86O2YZf2r8j8yOlWjlr/16dmy3RUnC+pykPAWvpIBJ+y5Cwt5X7H/kL364TdfxfaT6nvp+Y5KZnfiv52Ue3RHgj50VK1K5P59fmszpvT5s+fPv9hzTH668dYW/ZWvIfYza+Mq3z0mGGLnmjEV5LF1FiPNXv0Uch8Hbh8ButAnM8gznNEZL808HCt5ErYTKguqE4g7jVL678ifT8r9Y3Hk9x+SrGiuNj3i14EMsKkr9J9DYygdFslcrWM6Fx83W65omuIp6QyLmyz4nDhAuaeP3veovH0RTfa7AvNDPI2QGGrkHBicDc23b0i+42QAJ70hmYFeevouS1CX4NzsntBaxf1/vU8EndOKUTLYS6jfbUV6bd88bHki/HEN+THxHZmCybF1ZVmYSt/PVYpwfnbNSuvc8SSC7ldNWyxwfqudKjh8l3vx3MRgzqM5fwVq7X4noz6/FvjrDsX8ekXKGcrvscgxfDyVaVchPnluMrboGn/g90Dv+lwv7gZz1x+7DcTFTzjty+P7WeoFr5od0mxvKxoiXNjfJU73eLKGcpZ2lm6u7S7lDeUx0Xma8flu0/vglr/ysLKgs0CnkKedy/Ik5nFGCNMKdOGgwAD4rmMpUmXLAd6HcqyC54OPB8ZcJ3gUcS+G7dYtfhJiL0S+d6oeG8oORRLzMYA5qTcD0Q6/7ht2MUDRSm1nG7wpzc0C+ebWeb+cxOMda1wT45jP4QWOSW4Y1oNCA4vkw+Z5dfaLsFnqdFmcOa7P6/qruVV8BTi3k7Etg5WbU3DVPNJ57BQJZ4cY6UCzV+kmssEsWZOB9AIvCucsEdlelJrjGOGkrwkt+PQD13jOkHg0dqJ0igR43iyr4ADcSGD+Ggz/4fMH3R0ocl+a7y3rB0xWOnWgz96OQc+Xmx32hom3TvX7uyUruSvJfmkhR6yExaXTU1yFvsdOLXcI5LHOLHwxMdq3jaGK/v+2mH9YN5l2MurjMPZYG61VUiL//7dff8W8IdI/an2XDlQntgjFd68zohvNCnaOmDZ324YPgB4E7uK5VTkv91YuBnkeX3DxcvTWaCWYkrkugwqM6EUOwV2TfwmXB+6TWXQShO3pb+82xr7nqV5vr/ffortXX12tUrWrqxlfN+0n1o9aiiw4G+MBeNpqt3m/Sk7k6mlwkOshRuyueO9+n/bkNaeH/1SFzU6DucBeamg/HD84eR16v1gHS+Ehtfd4JSX3FdeIi8zFw8OZ6zrFz6QKzwzMkDeClXxQGh4boXcTMiXscJVN57ipoKY+E5wiMvBCQfpVdhjLRGh1NplEKrAUSJVzV5Zu1ck41uAs0rThxR/E3YYdFNcUZYL929ulexJwRHOzmRIUo2UqcxwJbcxq4a/mr9MhsQlX/mJyHKarFcUk35D4q224lVZlSHDBHNrVAupDGIRxOQEqTMlYBWJg0QXxKzhUeUpVgZ/nezzJgfSQgYJnMN63Pao/1hqoQ/17rfdsaAOdz6BucY5tttbF/CN/Gn8xfZp648taVBFipufZo2BK0ME4xNEMiKaFWQSEjdLRZlCPPS92aWI9kOjeSVyyV26I//USYrIMs684oBIkUxzPIT6safgBNFSZF1WdALuWxE+FBPedSyX3WOUX2g/xTY2LpftPhVKgSn7V8/Azb6QzGCMuj76O+Irp3QAY5CLPLwl2as0YI0f/bndIHMu98Wgbuj4HTYocOc1PejFGjMfJF/otgue+alB56qZ/Md0auCeGtYbZpmot2qo+hyLbFlBADfAXBmmKJAB8F256qmzl5RR7XC8dIaScHT/IsBlIqNjL6tPhZIgsHrLO5+6j3cYvMdH+ppN4vFDv8vbkezpu3fgP32cJf923IhsJv5snCxzGnA4HZDyw/wbAKJlpBThBFZqZU8I2LHp1dkvzlQAgTz3wgiu0RW0NtAE91GxuvLb7o3GU+UzCOJ6+YuHtf0XEKM4pTmgGyga8/tlZ1vjeIQqGhYCMFFHhY+pOjkTfCOdDg6kJJUh73jxRTTI+6piitsUNIOdhwVrFdriv7+xOX4LsLx2sHUAVuYFqB0jUTw/nIuMN5IbAQv2e0FsAfDb3oKJbwGNAzY7J1f7ClOdTR3K3OW5Fncpfhnr5pk0Ow1HegZt57ri9Mm+eoYndg8ptSOGBgThV2IgSTZ1qakRS7Ifzv3UUJIl9d5XQwPCi4J/peMcAeO2FuiHX01WmmFKASEqIv9GqnBXXCiSww4dtjPhFYzz9Pxgbwm/6lZ7JdbLqNon+FpzGrZHOUB4WOEiOENNmEhlv0I+A6IBPgHemjc7TXL8p5+iwJKTHJXVR5eymF8xWT7ozsTqxMX5wcAEECExhjGsUYFLIZqjRX41X15wDv5Ns/a5AI8eiAa1zeDPDY08xnUE+QdSPjQf0g7Jl+YrBbYPSD4zPi8uaCQ0mKkBGBV7paXNpKV6eaakzqSkAVI51gkRVSPA36ZFSWO0Giucl6cyrLdSwU0tfBJwRTMD5rmSOM6Lqzl/GMOxdpdVnCAgADxYAmQLgq2wvVcjQOcxMHqmQAesc4zewiKXVlfSOot2ABHkmNvXFsepR9YwbCaQLvInoOI4qz9fILpn315X19zR3czc3uOaro3BXgubeA+ZqkbOT/bTfsoGyWXd6Tmj/aD12DXLzC5ZtsFrd+lP282qNH5cx4qh0lV0VCkjWXQpRNs4vaErhTQ5+KA4083D2NzFzdjUzd3MGLApC53WhGklwSXXn4OK44aR/AiUU5CFiMh3C2/T4I7ckoLuvCBzK+8jEUtRxyCbiOH82mwL5+s6Wi7W1yzcbDR13a1YK9NszENRFvoGqGtqqiD5OKUqVQDf1YWGO0aVgEyoTxCpQ7lx7JV0obFc+ZyZq7uZsYuHqZFkG5s7uoFOs5xSqkmpUsWYrg08U6KJtHvBCi/vulIH6+MUSxssPJIP6pmL1tzU045ycr6uC/XbusxM6thgmF+DpqRv0Ew+OFCa7WqL47oeRCaRZ4dNBYgVM8WsA53XYhW3kSkNfmzIbTTTG0PJ1el1z3kGmXcbelCimxG33dOU+N6FaKXBpdcPgmaaKMGQPC3/MEuMvpAoasjRNTu11szC0wi5vVYgucP5b7QsqiCOHBIkfO4qWfBi1msyVdjBKDV19o6ec1jqTWsLmueTfeWy1MlnRQUOWtmnGS069AgvqfVuKWNAREFcZ4i0rPMGJ/n/b6OAyqtd+bwPvU3NXwdVKkIVic46YqI6MkqkRyplX4eaG9/UXyI9VXuCZYOyxYZl3sjKvx4udB0RnpEPrex3c/PCyY+2/3CwFy4zFPp+He3lwlDAyUl1V3lB+UD5zS8LP3enaT/3F+BZoV2hJ59FIlIi/ILT4sJEwBBg9me6aF7PZFmv2M2VbBgghYRVBiOQN8VyWtJKbs3XiD8gr+euk9Zh0+HpEf7exOAwFAWNDCOGeGNIwXgkUIEI3/vmVkPd5oMzH/cvDBys9E3dzS2DB9jw4n+U/ojjweKHqv/jxAVjxd9XJYgLEc4uJZ8VEFeS2E+yTtqXABE0CclsVD5X1zLNyHK0Er+ynzFa7ixgz0VLQmkJd4fPH0Dn9s5d6BO/sDe/LzF6fhNchUEr+aJm5yP5Kqsi+ebmeCMV+SLn5yL5qoREmjucHN54ptf9jXMINdXyIcAzZez582ucnT/6koiHHk4OerR5A3RX6odTrVK4UBMnkbqI3hDPa4sKFhFx1ZyEpOJlTXqFjASZtURsrkqhkHvxVf80dow+78U0MzDXVVU7aCIxDQi63+sPE1nECoXV0DE3V4cMI5pXEYI2sDU3rq/UgyVF/WE1jcpfba9IHIgND7kuHH+jSLslTLimnM3qD3Jyz0d7sm3dmpCz99HA9bHPNNYqR9rYyHgnVWuyHQIHhEilvSI5pZvA0ZiX6u8gRXrm6/CenU7y1Z9WNhRIzqBdYFp4zrWoV5pyY9LFxTukQhfqekrd6SEDwTtMDD4MOF/qoOwwc6AgWi13P4FDeYeoSKF5D4iRsEcmrhIJTyoKMf9tAy1JO+lpsNKsGgKn1mVbuBBX4trgpqGILbHJdalCMjQ+fbgjiwbL1WxWrn3KSY6OKF8eELcO3W+34Y/TmtB0aUjp9QOGwm2nX2DZvwqRFBpg/dOOYckNgdbDYY3kcLXXoRUTrueAIyK5N2LMw/n+8vrCKGYm5WlGQrYVg4cGQ6pktzmPpFHMw/L0Jjy4MZUZl8eZoRLm61v6Yfh4sFXMdah5pkoUU4GvYnr8DzChc7oHqjqTVc4N5HNKavi2QJ3LuCnmibXLuKeM4g3t6IKRsArL00dJWz9XwgDYTU5DTVdqUz05xNPUDO7YFuXTaBDHlqHKyepe8PanZiRNd0bU/tnV+9thII/EPyuYmoKyPWtVT1Z68Q/yqai7v7s3OW58GHqZUFXxsaqSsLA4t83HdeccH/t2IGR8EBinSCYmjg9CLm/zsJ87y8t1/cTiHKG68mN1BeEydHw4Ma63F+QgJ6Djg8mJAamEOA8o6Q3ArrwhQScGEwm9fbg/MRHp0CmgPiqwfqJK/ggnx3XTPPuTE8aHJCaAiIkAYhIyMbSU/HITNVi0oG6WtBASKijJD6D9o4Tk3hwjMTnWBt15wMZ57So71w31OsCtordZua5eDxl3Jc+FPLW7bz82eWhU4kFyOSUhvpQCCHhY6GoDg6r00boL2c6EuiCDsJ20DQGh1WVewcsvajKRZxANrn497xgkW6bP0vtUrw4AFX3oLUenh5kucYt27j1DD9Z1iAHhWk1+eZdb8MIKn9BGGm4n0IBQl+1cd2GUPqiqNgCYZdeUFhclJjbUiLPc5iS3VD47yLx11edY6MamKsynqAz40yQGhwmE/t7uXittWJKm/EVypsfp/aPitHWapHtWERKBGWSbW+xuRsjjzdSchOEgWQxSiMlzjDxwg1Cpd5K6/CgicSyhqTsnt6knIa6uJzenrhuowKCHw4m5DcTwwpbueYl1qoXJxOKbi5WTIgua2hfO3ixL48mFxdxnWfGfS/pdsmu+xdtacza4ZdYcx9pXH90z2YT/gAXkKgkFuUHSC7/9VESI7zyQIwIW0+V5B30wvwJYTJ8A4Xk4QDjx02HVYdknPpoU8r+W/9qRUjTgixhaGgL/iN+Om7tQrz7IQE0dV5BqHODen4qVfUMuWzEfPaWPtIubpJWvrSluXrlfqYuutzXM2gBb6OjUjrNNVHVRdUKl4a1DkkcS/+dvhjVut6xqThou1xOBPbGxUUZIFjCHObp7oJm2LDgpcJsBqAvU2karKS9L5Lwd5/raR6s5UFzrkZX/2OM8wZ2g/B+vhyzjNuaH5fO/j4zhN8PXKbw4dPEoDxjd+67tfUEM0leOdhBHD+dQeREkHq8fP0Qc76xoRyRbkdAimYfT/1o2KG11FCraGqWuTecKdDFQxbEkiZgnf1VlJN/8fJtAP7ytXXp4BGXhrf3E994dHT6fycOrbESb38K0WOvKL6jYiwg0xy2s4jp+5mbqa9/2KuJVpgaNo6He+rp41k5QLxi9gS04mvqmyGNmpNaZNpLGRSHjMlPQYMqbFGC/V0XYvLcwz1eWjO1VQS24dzCzL18ouu+enY6emaOHqdnoKmFjONUqIFjh+3rOj3akEib2spxqO5jPak2pShPEDfo3XLWpsHiAHzAe8O9VITYhFqYfYLMXEbD6Bzt0h+25iOgLW/gINIgVCXugLS1dW1yt2DW70boadXXl4Bypa1FNS3/KNJcWE2f3HIWYdhy05jk9Q+3U0+M/72AX946CQrc2Vzf3tsKC+ZhgCqLIFzVPtGl+jq+JN3Kuge/UzM5b1t96J4METW191UZVLX3NAk2tn5r2yQGO18Jr8wZKqChbK6s4Ktue/N7B76rZqtuMPdVXUCXDMrI8st1l/LhTqZIKlbcB1yE2pYK14glDrEiFwNgM1LMbFaLL2BxiKSreV1ZzPdtQS1VOWIPaGzZ/FayxptQ3cRXyY5NX34zfL8wLkgtUaP9wXGJ3b39vYmLvMOS7J0AvuX+TPJidmDygZ3fHJce9oFRg+cpddD8yAv0aZObETwKJDi/nHZb85g7UdHQyxj6SrmXr/jEbMHNmGjyC2bsrtegU4OwmD4DvjHTposMBop8+wwHlAeiCY5lULAACEmCUCrJptHTbAHLvP/FrMb4uKu/Lzqrsf1/aLV7abap4WLnWnW+vFRdmnibtwBYg0zAOtPVwDjaV/C5Q8f/04vJ7+tiSgd/yj92VztsSi+hxBZUBygfiwZzTjA113U0twm/PngwLV/y1ide3sQ7QU1NxveTBO52/6VxnIbHs3QB16GUdtPC7TFD5dU8txcsW8s7c0/mtuYoVfMyV8eaN/41HfIJe+PG/t/ybd9xX317kYptdU4zvUg1n8V7DPmFRwuObH+0TUBbJ71c0Y6IPsqYFztAoyK5ZYiRFCqflc+24WyvOUvwlBrO6X8uRrMEmhmGsSku8lYuTJfFbEFT5bFoKDVgyfarLbt+4aL2i8s2rRNr7c0o2gda+NhG4c9pV1/SueHTPDH+Q9vp3Q33BrS04iX8313D4voMr+OcrzUvhUjj6d3KZWz5I4vyzBlm3PaTZg3rwPljxvhml7jleSgX6zgIaj9WKWUVMzGc/KxH3sWJWrOSlbJOqot+bJDE7J1eHRgcnV7vwYVl+aTZpW9n2Svsv2j+UkxsadY9JBjJ5Vvrehf6WEJPXIRc6smwF+ALsvigHR1c7SgzuFLXJJG0rE2+1aRUvyy/NdM/hoe2d3G0u2Di7268GkZVfTfZS0VuQ9BVXgQrIuVdLt2Epcsd4om6x3Gk1PYWSSuB4bsSuYnkV+QIfWWQOlXTx9nQuHDd75KyT53nS2lhL2tNuCeEryPJc/YMBe+cgNad5UfeYpG1ljWUZXpS3eTXpR8xFKbel+4Q2fDm86v70la9yGHtMb72j5VyT1sSmK2UlHhEhYDv1t52WyGH0/TV9mkHnS8u4iIY2vlnIF662yo8dfC+H7ilKywWzbL1bI5XDHQhIpAUp8IygA7Gj/iD2SRlEb3IyK5gIjBc9dSpvbb/0TVqBTUw8ZhVzE6MtpHPhB0FnoZ/KXScncCko0JFiUNjUM5CFAfmQ9k/j0YaPd6INPo52tEuPf8Z2rvEu/jlTXnzuZ7P22wyyX0XJuR8/MRd8prmOb+f5KMbT010mNDBG0hvLiHBnf8ML+95WkIasUHB4QiDtTd2XmOJ72MSn1XbjSBMk4dHgI63RD29aEF9azRTWUFhiFSl+fdnRolYaPNCsiXdrS9BRm2/MbywIEvQbU+OrsFBS0E6INJFGEh0seJLKlIlnpfuqYkWswSKCySzx6IpHRgbNeOTs3FCrFLvWOYtl3G2ImAvnhGKfdRRGROaCBD0tUGJi7qV5xjlg4bVdksTeauW3ReZ+mgOoXkSIVGjjErFfslRkzkcqPbU+EBGXoKNEYGnIPKNKZnlsDuK8Mo5E5njEuUsuYrL15YgisBUSvAsblMUeq6Eo+JsClQMYgp85pEdl3NUXFDykTmUya0fa9zetKpOeQDbqkHKVb1pTUum/6Vg9nWNi9Juqld80MaRx9dSNdctvileOZO2cV/5N/xV2gjby9nW3iljvbtdwrX0mPVUuiBBxyHm+PxuvVVexIIQAUXcI5qfrbTUKdhKIknKtVsEaJUFAnYrcGVDwTwuw/IOwEhmkHypVihiVeqbpwYEBlI1pdIiVAij8T/cfkkPBe2U0XnT45T8B+Lok93LB367IUcu3+zhY1FhBCKPxar9uP8OAhXK4fuCVmjaTqjF7JJitNAtqbr9jO/lnwzxL2aWRNeDeVKT3bbvbIMZvcnXy6y35wcAkaBk0iTpDNtGfcmcLf7UCFpMsJYiDO7I+4DUzx9uOZmbNE6YmDL6JKzHZB4i0qXkKISzMp5g/5qQJbN2aGRwELO/2ZCZl4+DSan9yiXLXTczd3C0Bc7Wls8u50jVmbg6YWdKisS4gckwxd72+HitnNwulrnEz02y8hHPQVQVmXVgju35Xc1WJCNHcFZ+fg/fCW17Jtsj2Zv+cO7ARl+uVa3mJaEL0zz0cNwgQdz0FUP8Ssa/7sJ1Lie3rf+q02ggbJ/5thFylhdRUh2/pJj0ThX5Pa7xJPakm1Xm1YHAWsHLehyQ4kbVbv5KAXAAbV9U20ADMoMULRRVNB6oz2hrVbfn5IWl2wgZwhEmutXN0b4zzPGHqFXOHbaLRBNKnSSM/XlP3msVzZeUQZeUiFWU7PtCgOAtCsusIMZnVQXvJf9MBD8ih5Mf7ZZOrZNGW63bmZOey/r5qcmljCyli2dHIxFrP0dTc0lhByv6hULdDXr1sSN8KG1tCj4SsYFqm1fUDl661lOaikkksIaXUWyCcCC6t/eXIjIzF5eMibwR/2GFUg/dT+1LQd6WpRV65onOlZ8rWDVI+3zjw/9fmqa9f95c9pkCyelSK+zaMTaGjLc4ZPd+n4JMsRAj+AMoAfa5r8MRAV9uJezH3Ta7F3FFnRW6Kns3Erz03ttTVsrMUETDe0NURBD7OwHggoP933QbKebjVF4MK/4sJ+6Iq8ekKAzCHwnfab5SNnfe15LmK2EulSJlr9NQTbvhK++kTSOW19Q4CPhduk6cZsqbIkwxBjDNMRpLDKVpeU5+2BGd3+AJjwtyVHSDmBtIxDCqGxAJy3pmsLDKZxxLpBoX/pgI31YEpphXiTUeSwlsdT/q6KTtOeuZQ6UAhYyn2Yn5Rlak8tj5BwOfMfjAHnd3YZJLTCQo2LkQUAVy2XIaTjTwB+6HYs6h7jggSpIq5wwGebZpsFBXNay8udCFQWlwIxYcnoAjt72t/LYXr25TvXIYhH5Q7Q0z3M7i5I7rvyeIcem3UVvk5oX6Nqk+KxF1YM3SpzqtZC/XNqb2cGgfNVAFcJqh6qwUU1pe2Mg0hyzyyT381sti+2elEQxiEQdhGhHU6l/Xfwq+9uF9mT1wXziV60omCgv2sF3hBXpmknKOc+Sau+bOiLVx9Q+q692NBApWHVnvSyTQPlTyhUB35WLezOxFEu6lndtuHgoaUDBQwcL+d3sHHv3q9SoihO0MeDn9/dnz6ZJaBG4wpLD4xqi4qSYQNhMX9hLgKts//hhESouqjCCkET1F7bELY9WKbGhO0SY3NWcs9Y7TxnqV5xF+b7ljfbhux0Tr3CnT+7AIMUw6hKcU/Et13PPouqt8rCX3U8v8xWj3E5pBA8V/b6J1wKE13t1NiK38VEbNBktvY571aNpvRERsB9uXHeSHofjG8NKwdkUpGP9VEAivHwspGC76/HbaGJSjY5/i/S5loiqnUTvUCXKn178zu7WfQq5MUM/3y/YwqdeWQFsbDuX1kCXRJfoOdsp3TR0xNSbfKYVPXtmd5/NADmnCBLq6pRT+gdmVrea37r0q4Au0I9QcRPTCvdl5COrWqOm0yITF9srpqrpSQi126g/W+s8TpHctRSR9PTEgbV7kr3sucX12eXwbctRU6+y8PeSpBleV6rXJxtpdHu7ig0uPXkQta3t7FGaWZcsVf/qlCwBWeS0UKT+ViL50XvOGl5768v6mokTrkqAjUh3alBGQioOODiYm9/b29iTqS2lP1SJbaKvBfU1PHVNuFTgwmE7p7u/uToZLJCBkG6ddLoYZ2drPd1ZmkF4s4jQJfVSm4TARkYigxgZxr4l1YARevCji4O6EEZOKfQo8Mn4zwIkAvCUnzyXYpxg0B1FvdQTlOLwh/6XsK4mEYOthDQQmoyWfskuWTFloCXNubxCzAL5SeTwcsWC6LCx0MrbR017h8b/r53i69DTZq8pPHu3oyROSRF+/oj2zWPP4fRuWdYP797K3HmnoRXnbIsaL8++62AjDXNR/uL4tjgphWWW/3/yx61zNC+d7jV742tH14KZk3jGqz4O2G0LlTUlqU1Hq6Wq9v2wvt5Qx5bebwkJ5v5g4dp/7GWP8KbDN1H6DsfyV0vZw+zdhi9OsrDH2aoYALS4iytjB2nby2MLeM58YjaQaSzCSWJaGd11imEJY+yrJ8aGcbSwWz1GuS/sTSi1m2QSzzIcsaRzvdFtDdK32bvNv0nXttn1J9N4uo6UXUj+6LPktZJ1nwCkRCO7qWO4RmPLans1jHBO7rpZSVduq1VHWUb38b6dvUFI8NSnTVtQ9Q3NsI3Ev0SUoX98R9OGRqxv9Cq41rV1jaYjitfCPakbQpJKONsl5TVGgcqRHTS0naO7KIqt5E06elTqm83sHb/JpoLV0P0LZKJY1+kjuSok9KH4GyO566W/077CV1g6IhxIjhZsi4HZ69raYtBuR/Zd2c5KJwHUlUHUm95hu1WozadKLaxoiU79Yjua3ewzxwQgVu85kKnni29Oz3mGI6xOUgqn7rObKXXlQexgD4bQaztEVNypPq4BaIIgdjapZLXU3eWzdssPd/dyuligP0uvOSbx7aCrA8VzROQkUX4iZ0J2X0vDOHKvY7wE5UXeVaDZWhUweVV3ptR7ft3FwUD7EVPB4V31VNr97z+CDvQ+B6lrImhbeF2FAWj4vt2lMa0NMe5WJzvW7Jqobm3eetEqqOPGekLapzNeve5JA0RpeDB/UHt/uUG5R3VZSUHvTvpChLKw1Xv02JfgNYlRLkZSqKkqasAGBQ2pRXdImGJUXw16NuVa0jp8b7M93qceR+qlQU7Bb+BE9BpgLckXr1M/BpP7jlLyC3gh9t/d8Rthv+ImQ/yOWmwZyWI9TYbjIit0peGmti2NVl/GxQRxclvqkBUwHlrqdJrSJ7wJhvQf+BAHsA8DM+VtZbZG5ey5D79DmvKB8VjBlyhmHUjzn6J95elryqYFgs5h4eIDQPJY8xNrC2Udwydc7uJvEUY5hhw1HcGEBRBziPfuSmyfeRYxQO2j02j2A/p11baPpPqf239P7G0un0a4RBa7WZa6O89daoddeIgz5GrEYjth/ErdOZv5NyWy9ia/iC+6vYdohZD1n9ynaOVb42ql+KuWUR8y3djCef76XOCRTbJ8lzMf0ErlfDAdNHdsOeFSmhYWa/pg9sWOx1y04BK2xfBgUpvbx1tK7kG5fZ7Fkv5iti6D/PIiulzu0rV7KcMZZ6DjGfdyJNirT9mFsHXFxb5LRfsJ6zrMfq+yP9luw+gFsgb9pLniKok8SlR833vp6Wxn1qwn1BY2X9A9/eUQRM/SVDOGuPwmq6RU3vBdbaufc0m5vq3gGBKlCgRz1vTN/ucWj4wnc9hMc+rOYMxeOoYgWvbGWWaZfVDlk8y08KjYQFdnG9L5RGm2Yew6xRNuwgZgwirD7po8xaZ8vIS4yFtV72yOVq7zPnYjEf/v8IM0xeNyraQhXJrn3qLYVcAOkS8dbQaravN3jZu8dQ0KqqjRS2Sk5FUcuHWi3d5qif9bR9XBSl9h2Hzc2Uiz5J7+eSp6MTqFZksYXymFVYKdXsKxeUxd2u/zrGtoP2UBttv9hmHzTNulen0Wb1zZ6tvKYa1BVJJ5d4f2rs13Sl6K3px/rWBlq3gC/LdYS79U9g3oN/gUC9bR0eUCAI2AgAc8ULAbCYmDcfVAFfiDl8E+ge39GI+aF7AodPwSYpawjMUNF80Lt68gVxbpBWt7t6B595GKR3A+KSgSdYOTxFFfMMrVKexYbnBRxiO5zjklFrIMB85c8TBOVvnsIxhwhTt7h2FjYxSWTyojIpZxjnIXIhhW3oCbt9B1LefcM/DAU5BWWDLj4dFS/KXAwWGoThHdLC6GQxUN7mCZHxRWRAWk46KBErrVTOIStnGcHjUx+lADnYnOeJFbOfJTkqIZBnmbmgKq0iLZsGzmypFOaONJQyOV+daXLDHlpZs02FeGuhmq6khWsrlL54JGIFz4wZ8qLgrwB47wtfyeS4EYIp6w0zNVEfLuvMTA4GbCdHGhTmKzHDd6AiW1Tcmw3samYlXGNbmYmOymaQww8mXWXO3G4YTXk8T8l5ObKcjehz4ZZBgJWlZ9mZKcsdFeR9aEi5pLd7sveY9uTWDEIXk8EkTVaNLP8Fs0ronlOBX1iDH7zMVKD8fNMmYRZK1tufwr9DhxIGDJbcz75hsYNu7kMeUe2JSiv+/rzJXrURYIl7zKrCESssD49FTniUbthsn48+aLfdT845o57BNKukuuA7Z513WauLLnnK6LorrtovzRur3XLDTemee2mxTBmmy5bFZKscM82QK0+BfIWKPFNslhKzzTVHo23KlJpnvhdeafoIDWMd1+tfnYKdg7MfQ+XmQfhoDBaHJxBJfPwCHX1xKSQsIiomLiEpJS0jK9fVbaigqKSsoqpGVtfQ1CrK/lhEj6JPP2GgvQ0bET56xozHlnaZNGXajFlz5u/T98dfr7zOgSMnWvKOG8G1z3xeMLz58IXlx1+AQEGCmypEKBx8h94UJlyESFGie+y5XXueOrBjvxtixIoTjyBBIimizE0pUqkRrZ+IJANZZjVlyZazGZevgAzfN4lyFSpVqVajVp16DYSPDYJHZOxz77wRoxakmUXWbbE27c24hVaHTl269ejVp9+AQUOGjRg1ZtyESVRTaKbNlNstdLfNmjNvgRbd9w0rVq1Zt+Guezbdt2XbAw898phucl+VwvfMd1Wr8p9WxWq1K1CqrPc++OgTHeVkk5uPQbfH6zM5AFGSFVXTjfCmmJb99R8YhPRu3sXNw4vGYCnohQTiEX38AoISCX/JRsXEJSSlpGn5CQneLcONCp6QNpyQcNx6PABEmGRT1GYeFTugbZeKJS+WEaoDSnZurSFod3O9wWgyW+jupdKkv0qT6DiDcWkWK1GqjJozJcYXJc2Ha900DlHE+3Njxk2YRDWFZtqMW+g+f7qfc/yci0+Wxt4RBFjS2yQYvVHba6TtmT0MT2CGWmu3B7h0NxsJz34tgTeuVhfa2bGiBWe1qnCerixYGhQz8mJLLC9hSVheaf1fDjm+gYbx2iDhhmoVXko7ufdBBCEHX1lJ/+vVtUB5J7dudxqtPkEi61uevxXMuU8WbhBVwVXehdvSCy0Cb5PYreziuXWQS7yf5m4/cp5fvasw5/sGE5t15IuAI7+gAZi/EfAAIjUE4TLExzTWuhvfYhNW8JQtHyfRxZqRN0y8Vn1QMPDn4uuJS3keO3mSxJ5Fj/IlkGcjz+vPbnrv/v0ijUJMTV16Knhr1CgH34hRFbyHlPp/vfp+BJbUycg65iY/8HOWR4tdwz/qrUcSyDFBPJZWAnM8bgZXRrvm8b+rIpB80XGyg5cqHr+b89HXp06+lcsrq905U9So/fZaojghbITFohKSPezfZ5ZnpNAzJGS0KVdYmI3oNc42pt3+IhDFwnAKQUpnke7xghOjpMHPSoxUEgQlViMkGb5xPJBAtEADR978daOC3UPz+0iZ3Y/lb/Zo5uXsl3c7X6Sqw5PNxfESfnOX/w9FRMGlYliAEIygGE6hEpIWocKGAcQmqMHQIzkAQTE8NICnAgAhGEExnPJ0vQo9hQWlT/tAygC9GYcR/YxsqppEj6QAEIIRFMMp1HsxlTEpNHHPrSkN0TsLump727KmLMWwCkWClG+VOoVcyR3XhyU7HKVJZb2h0vqYQg2IflGwiBjLaSorzh+reFQqdTMsCZsAQjCGE5KxSzoadcLA4pEms9omODzkxLDR2MCJGFggBCMohkvpGeJ4HMsMOB5t5D5wQwMbXTrxd83uiEZ/M+J45t4iSDp6M/QmyGgRWjHyjyAcDr+24qsVHF8uAS/f2sLld2UOfYA7DNjChs1d32q+6yvoGzwbPYBQL05R3KXh23B5Bv2+p6bHFC43+P84NW4xncptt3AzzpuvXgxmSltF/7O4mo+wKtKeRhWj6TUUZ+z10CDBLZrIfpmZ5dV85JSjJ8XtrbLKjfAsXYA2P6dpVSlbwGbajXkuWjhyuFo4TrNKxVsiv7q0LbsIV/68zaUw71X59WXD5jnGZ9/PIGNaHjWNLEsDQC4XjFFIFgwCJB3T3t527K03IHYWlrvsV6U3c3HwLqfxS3JoOBFCM1GUp0bjZnGUIfGARIkqkS8OkzYRZrInSqUjcSzadAtfvW5T8KozAYu2LVH+0IXgc/FDcZc8IAgdAkHeUIKLGlBOpeSbmRiW+qc9coGyIpCZZVkSOyCCstC0wWqVbY0pFfUYVD3f7wTQHgAHpsBBAEBZBODgEQhlQ9M02rp3srA5pxUvYzSOoIlKTVvxlCFQdXmtrIU6M23TVHXnxpybFR2q0n0oGtxUtrZLDQrx9VX8xWL2MQ1TqQ/dLnEbObO+tMox40BUNWblCpOi7bKmbV0AFHbZirNFCzOtBwGZTd32dTB53RcxFFjyCLV2PEsIu915+ZmaNkSyxlHXLzOkKfTNxHHI38JVhtawdFurteI9E7eSVO9nK4gSUgx3msEz1qCOpAhB0ZjbF6w5z7RVvThX0nYhtKQon2eZu1hmrcOB8RrPzrLotXhZc9RU2dTMaVVWSycJnKNhUUqOPNeC2PX6ployg2P53yvWtdRW18JNkgT08wtzVXM2OBXqyg9VnhwPGOw07JshDKrapPfl/JZ9U1UQv8muyogzfjq3zcXfBk5dUaandemo1Lpu+gfxRS0quGhm0MTixgxyGUTXdZZIb8fSeJ5iIbyL6xxlDU1z1Ondoq5WK/TiBmGFViZDOT9TXHjq9J/1n/df9F/2X2XX2eLqMYT6Bda7m7tPU7tesjePu86yzG/3v77fxWK6k+sviyhq2vJhA9bGk3/X5eN/AAAA") + format("woff2"); + font-weight: normal; + font-style: normal; + font-display: swap; +} +`,eo="BaseSans-Regular";var ec,eu,el,ed,ef,ep,em,eh,ey,eb,eg,ev,ew,ex,ek,eE,eA={},eC=[],eS=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,eP=Array.isArray;function eO(e,t){for(var n in t)e[n]=t[n];return e}function eI(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function eT(e,t,n){var r,a,i,s={};for(i in t)"key"==i?r=t[i]:"ref"==i?a=t[i]:s[i]=t[i];if(arguments.length>2&&(s.children=arguments.length>3?em.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(i in e.defaultProps)void 0===s[i]&&(s[i]=e.defaultProps[i]);return eB(e,s,r,a,null)}function eB(e,t,n,r,a){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==a?++ey:a,__i:-1,__u:0};return null==a&&null!=eh.vnode&&eh.vnode(i),i}function eU(e){return e.children}function e_(e,t){this.props=e,this.context=t}function ej(e,t){if(null==t)return e.__?ej(e.__,e.__i+1):null;for(var n;tt&&eb.sort(ew));eR.__r=0}function eD(e,t,n,r,a,i,s,o,c,u,l){var d,f,p,m,h,y=r&&r.__k||eC,b=t.length;for(n.__d=c,function(e,t,n){var r,a,i,s,o,c=t.length,u=n.length,l=u,d=0;for(e.__k=[],r=0;r0?eB(a.type,a.props,a.key,a.ref?a.ref:null,a.__v):a).__=e,a.__b=e.__b+1,i=null,-1!==(o=a.__i=function(e,t,n,r){var a=e.key,i=e.type,s=n-1,o=n+1,c=t[n];if(null===c||c&&a==c.key&&i===c.type&&0==(131072&c.__u))return n;if(r>(null!=c&&0==(131072&c.__u)?1:0))for(;s>=0||o=0){if((c=t[s])&&0==(131072&c.__u)&&a==c.key&&i===c.type)return s;s--}if(os?d--:d++,a.__u|=65536))):a=e.__k[r]=null;if(l)for(r=0;reZ("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:eZ("path",{d:"M0 2.014C0 1.58105 0 1.36457 0.0815779 1.19805C0.159686 1.03861 0.288611 0.909686 0.448049 0.831578C0.61457 0.75 0.831047 0.75 1.264 0.75H14.736C15.169 0.75 15.3854 0.75 15.552 0.831578C15.7114 0.909686 15.8403 1.03861 15.9184 1.19805C16 1.36457 16 1.58105 16 2.014V15.486C16 15.919 16 16.1354 15.9184 16.302C15.8403 16.4614 15.7114 16.5903 15.552 16.6684C15.3854 16.75 15.169 16.75 14.736 16.75H1.264C0.831047 16.75 0.61457 16.75 0.448049 16.6684C0.288611 16.5903 0.159686 16.4614 0.0815779 16.302C0 16.1354 0 15.919 0 15.486V2.014Z",fill:"blue"===e?"#0000FF":"#FFF"})});var eQ,eX,e$,e0,e1=0,e2=[],e3=eh,e6=e3.__b,e5=e3.__r,e4=e3.diffed,e7=e3.__c,e8=e3.unmount,e9=e3.__;function te(e,t){e3.__h&&e3.__h(eX,e,e1||t),e1=0;var n=eX.__H||(eX.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function tt(e){return e1=1,function(e,t,n){var r=te(eQ++,2);if(r.t=e,!r.__c&&(r.__=[tc(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=eX,!eX.u)){var a=function(e,t,n){if(!r.__c.__H)return!0;var a=r.__c.__H.__.filter(function(e){return!!e.__c});if(a.every(function(e){return!e.__N}))return!i||i.call(this,e,t,n);var s=!1;return a.forEach(function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(s=!0)}}),!(!s&&r.__c.props===e)&&(!i||i.call(this,e,t,n))};eX.u=!0;var i=eX.shouldComponentUpdate,s=eX.componentWillUpdate;eX.componentWillUpdate=function(e,t,n){if(this.__e){var r=i;i=void 0,a(e,t,n),i=r}s&&s.call(this,e,t,n)},eX.shouldComponentUpdate=a}return r.__N||r.__}(tc,e)}function tn(e,t){var n=te(eQ++,3);!e3.__s&&to(n.__H,t)&&(n.__=e,n.i=t,eX.__H.__h.push(n))}function tr(){for(var e;e=e2.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(ti),e.__H.__h.forEach(ts),e.__H.__h=[]}catch(t){e.__H.__h=[],e3.__e(t,e.__v)}}e3.__b=function(e){eX=null,e6&&e6(e)},e3.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),e9&&e9(e,t)},e3.__r=function(e){e5&&e5(e),eQ=0;var t=(eX=e.__c).__H;t&&(e$===eX?(t.__h=[],eX.__h=[],t.__.forEach(function(e){e.__N&&(e.__=e.__N),e.i=e.__N=void 0})):(t.__h.forEach(ti),t.__h.forEach(ts),t.__h=[],eQ=0)),e$=eX},e3.diffed=function(e){e4&&e4(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==e2.push(t)&&e0===e3.requestAnimationFrame||((e0=e3.requestAnimationFrame)||function(e){var t,n=function(){clearTimeout(r),ta&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);ta&&(t=requestAnimationFrame(n))})(tr)),t.__H.__.forEach(function(e){e.i&&(e.__H=e.i),e.i=void 0})),e$=eX=null},e3.__c=function(e,t){t.some(function(e){try{e.__h.forEach(ti),e.__h=e.__h.filter(function(e){return!e.__||ts(e)})}catch(n){t.some(function(e){e.__h&&(e.__h=[])}),t=[],e3.__e(n,e.__v)}}),e7&&e7(e,t)},e3.unmount=function(e){e8&&e8(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(e){try{ti(e)}catch(e){t=e}}),n.__H=void 0,t&&e3.__e(t,n.__v))};var ta="function"==typeof requestAnimationFrame;function ti(e){var t=eX,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),eX=t}function ts(e){var t=eX;e.__c=e.__(),eX=t}function to(e,t){return!e||e.length!==t.length||t.some(function(t,n){return t!==e[n]})}function tc(e,t){return"function"==typeof t?t(e):t}function tu(){return window.innerWidth<=600&&window.innerHeight>window.innerWidth}let tl=()=>{let[e,t]=tt(!1);return(tn(()=>{let e=()=>{t(tu())};return e(),window.addEventListener("resize",e),window.addEventListener("orientationchange",e),()=>{window.removeEventListener("resize",e),window.removeEventListener("orientationchange",e)}},[]),e)?eZ("div",{class:"-base-acc-sdk-dialog-handle-bar"}):null};class td{items=new Map;nextItemKey=0;root=null;constructor(){}attach(e){this.root=document.createElement("div"),this.root.className="-base-acc-sdk-dialog-root",e.appendChild(this.root),this.render()}presentItem(e){let t=this.nextItemKey++;this.items.set(t,e),this.render()}clear(){this.items.clear(),this.root&&eK(null,this.root)}render(){this.root&&eK(eZ("div",{children:eZ(tf,{children:Array.from(this.items.entries()).map(([e,t])=>eT(tp,{...t,key:e,handleClose:()=>{this.clear(),t.onClose?.()}}))})}),this.root)}}let tf=e=>{let[t,n]=tt(0),[r,a]=tt(!1),[i,s]=tt(0);return eZ("div",{class:eW("-base-acc-sdk-dialog-container"),children:[eZ("style",{children:'.-base-acc-sdk-css-reset{-webkit-font-smoothing:antialiased;pointer-events:auto !important}.-base-acc-sdk-css-reset .-base-acc-sdk-dialog-container{position:fixed;top:0;left:0;width:100%;height:100%;z-index:2147483647}.-base-acc-sdk-css-reset .-base-acc-sdk-dialog-container *{user-select:none;box-sizing:border-box}.-base-acc-sdk-css-reset .-base-acc-sdk-dialog-backdrop{position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.5);display:flex;align-items:center;justify-content:center;padding:20px}@media(max-width: 600px)and (orientation: portrait){.-base-acc-sdk-css-reset .-base-acc-sdk-dialog-backdrop{align-items:flex-end;justify-content:stretch;padding:0}}.-base-acc-sdk-css-reset .-base-acc-sdk-dialog{position:relative;z-index:2147483648}@media(max-width: 600px)and (orientation: portrait){.-base-acc-sdk-css-reset .-base-acc-sdk-dialog{width:100%}}.-base-acc-sdk-css-reset .-base-acc-sdk-dialog-instance{background:#fff;border-radius:12px;box-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 10px 10px -5px rgba(0,0,0,.04);width:380px;max-height:90vh;overflow:hidden;transform:scale(0.95);opacity:0;transition:all .2s ease-in-out}@media(max-width: 600px)and (orientation: portrait){.-base-acc-sdk-css-reset .-base-acc-sdk-dialog-instance{touch-action:pan-y;user-select:none}}.-base-acc-sdk-css-reset .-base-acc-sdk-dialog-instance-hidden{transform:scale(0.9);opacity:0}@media(max-width: 600px)and (orientation: portrait){.-base-acc-sdk-css-reset .-base-acc-sdk-dialog-instance-hidden{transform:translateY(100%)}}.-base-acc-sdk-css-reset .-base-acc-sdk-dialog-instance:not(.-base-acc-sdk-dialog-instance-hidden){transform:scale(1);opacity:1}@media(max-width: 600px)and (orientation: portrait){.-base-acc-sdk-css-reset .-base-acc-sdk-dialog-instance:not(.-base-acc-sdk-dialog-instance-hidden){transform:translateY(0)}}@media(max-width: 600px)and (orientation: portrait){.-base-acc-sdk-css-reset .-base-acc-sdk-dialog-instance{width:100%;max-width:100%;border-radius:20px 20px 0 0;box-shadow:0 -10px 25px rgba(0,0,0,.15);max-height:80vh;transform:translateY(0)}.-base-acc-sdk-css-reset .-base-acc-sdk-dialog-instance-hidden{transform:translateY(100%);opacity:1}.-base-acc-sdk-css-reset .-base-acc-sdk-dialog-instance:not(.-base-acc-sdk-dialog-instance-hidden){transform:translateY(0);opacity:1}}.-base-acc-sdk-css-reset .-base-acc-sdk-dialog-instance-header{display:flex;align-items:center;justify-content:space-between;padding:16px 20px 0 20px}@media(max-width: 600px)and (orientation: portrait){.-base-acc-sdk-css-reset .-base-acc-sdk-dialog-instance-header{padding:16px 20px 12px 20px}}.-base-acc-sdk-css-reset .-base-acc-sdk-dialog-instance-header-icon-and-title{display:flex;align-items:center;gap:8px}.-base-acc-sdk-css-reset .-base-acc-sdk-dialog-instance-header-icon-and-title-title{font-family:"BaseSans-Regular",sans-serif;font-size:14px;font-weight:400;color:#5b616e}.-base-acc-sdk-css-reset .-base-acc-sdk-dialog-instance-header-cblogo{width:32px;height:32px}.-base-acc-sdk-css-reset .-base-acc-sdk-dialog-instance-header-close{display:flex;align-items:center;justify-content:center;width:32px;height:32px;cursor:pointer;border-radius:6px;transition:background-color .2s}.-base-acc-sdk-css-reset .-base-acc-sdk-dialog-instance-header-close:hover{background-color:#f5f7f8}.-base-acc-sdk-css-reset .-base-acc-sdk-dialog-instance-header-close-icon{width:14px;height:14px}@media(max-width: 600px)and (orientation: portrait){.-base-acc-sdk-css-reset .-base-acc-sdk-dialog-instance-header-close-icon{display:none}}.-base-acc-sdk-css-reset .-base-acc-sdk-dialog-instance-content{padding:20px 20px 16px 20px;font-family:"BaseSans-Regular",sans-serif}@media(max-width: 600px)and (orientation: portrait){.-base-acc-sdk-css-reset .-base-acc-sdk-dialog-instance-content{padding:8px 20px 12px 20px}}.-base-acc-sdk-css-reset .-base-acc-sdk-dialog-instance-content-title{font-size:20px;font-weight:600;line-height:28px;color:#0a0b0d;margin-bottom:10px}.-base-acc-sdk-css-reset .-base-acc-sdk-dialog-instance-content-message{font-size:16px;font-weight:400;line-height:24px;color:#5b616e;margin-bottom:0}.-base-acc-sdk-css-reset .-base-acc-sdk-dialog-instance-actions{display:flex;padding:16px 20px 20px 20px;flex-direction:column}@media(max-width: 600px)and (orientation: portrait){.-base-acc-sdk-css-reset .-base-acc-sdk-dialog-instance-actions{padding:16px 20px calc(20px + env(safe-area-inset-bottom)) 20px;gap:6px}}.-base-acc-sdk-css-reset .-base-acc-sdk-dialog-instance-button{font-family:"BaseSans-Regular",sans-serif;font-size:16px;font-weight:500;line-height:24px;border:none;border-radius:12px;padding:16px 24px;cursor:pointer;transition:all .2s ease-in-out;width:100%;margin:4px 0}.-base-acc-sdk-css-reset .-base-acc-sdk-dialog-instance-button:disabled{opacity:.5;cursor:not-allowed}.-base-acc-sdk-css-reset .-base-acc-sdk-dialog-instance-button-primary{background-color:#0a0b0d;color:#fff}.-base-acc-sdk-css-reset .-base-acc-sdk-dialog-instance-button-primary:hover:not(:disabled){background-color:#1c1e20}.-base-acc-sdk-css-reset .-base-acc-sdk-dialog-instance-button-primary:active:not(:disabled){background-color:#2a2d31}.-base-acc-sdk-css-reset .-base-acc-sdk-dialog-instance-button-secondary{background-color:#eef0f3;color:#0a0b0d}.-base-acc-sdk-css-reset .-base-acc-sdk-dialog-instance-button-secondary:hover:not(:disabled){background-color:#e1e4e8}.-base-acc-sdk-css-reset .-base-acc-sdk-dialog-instance-button-secondary:active:not(:disabled){background-color:#d4d8dd}.-base-acc-sdk-css-reset .-base-acc-sdk-dialog-handle-bar{position:absolute;top:-16px;left:50%;transform:translateX(-50%);width:64px;height:4px;background-color:#d1d5db;border-radius:2px;opacity:0;animation:handleBarFadeIn .2s ease-in-out .2s forwards}@keyframes handleBarFadeIn{from{opacity:0}to{opacity:1}}'}),eZ("div",{class:"-base-acc-sdk-dialog-backdrop",onTouchStart:e=>{tu()&&(s(e.touches[0].clientY),a(!0))},onTouchMove:e=>{if(!r)return;let t=e.touches[0].clientY-i;t>0&&(n(t),e.preventDefault())},onTouchEnd:()=>{if(r){if(a(!1),t>100){let e=document.querySelector(".-base-acc-sdk-dialog-instance-header-close");e&&e.click()}else n(0)}},children:eZ("div",{class:"-base-acc-sdk-dialog",style:{transform:`translateY(${t}px)`,transition:r?"none":"transform 0.2s ease-out"},children:[eZ(tl,{}),e.children]})})]})},tp=({title:e,message:t,actionItems:n,handleClose:r})=>{var a,i,s;let[o,c]=tt(!0),[u,l]=tt(!0),[d,f]=tt(null);tn(()=>{let e=window.setTimeout(()=>{c(!1)},1);return()=>{window.clearTimeout(e)}},[]),tn(()=>{(async()=>{let e=A.account.get().accounts?.[0];e&&f(await eJ(e)),l(!1)})()},[]);let p=(a=()=>d?`Signed in as ${d}`:"Base Account",i=[d],to((s=te(eQ++,7)).__H,i)&&(s.__=a(),s.__H=i,s.__h=a),s.__);return eZ("div",{class:eW("-base-acc-sdk-dialog-instance",o&&"-base-acc-sdk-dialog-instance-hidden"),children:[eZ("div",{class:"-base-acc-sdk-dialog-instance-header",children:[eZ("div",{class:"-base-acc-sdk-dialog-instance-header-icon-and-title",children:[eZ(eY,{fill:"blue"}),!u&&eZ("div",{class:"-base-acc-sdk-dialog-instance-header-icon-and-title-title",children:p})]}),eZ("div",{class:"-base-acc-sdk-dialog-instance-header-close",onClick:r,children:eZ("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEzIDFMMSAxM20wLTEyTDEzIDEzIiBzdHJva2U9IiM5Q0EzQUYiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+PC9zdmc+",class:"-base-acc-sdk-dialog-instance-header-close-icon"})})]}),eZ("div",{class:"-base-acc-sdk-dialog-instance-content",children:[eZ("div",{class:"-base-acc-sdk-dialog-instance-content-title",children:e}),eZ("div",{class:"-base-acc-sdk-dialog-instance-content-message",children:t})]}),n&&n.length>0&&eZ("div",{class:"-base-acc-sdk-dialog-instance-actions",children:n.map((e,t)=>eZ("button",{class:eW("-base-acc-sdk-dialog-instance-button","primary"===e.variant&&"-base-acc-sdk-dialog-instance-button-primary","secondary"===e.variant&&"-base-acc-sdk-dialog-instance-button-secondary"),onClick:e.onClick,children:e.text},t))})]})},tm=null;function th(){if(!tm){let e=document.createElement("div");e.className="-base-acc-sdk-css-reset",document.body.appendChild(e),(tm=new td).attach(e)}return!function(){if(document.head.querySelector(`style[base-sdk-font="${eo}"]`))return;let e=document.createElement("style");e.setAttribute("base-sdk-font",eo),e.textContent=es,document.head.appendChild(e)}(),tm}class ty{metadata;preference;url;popup=null;listeners=new Map;constructor({url:e="https://keys.coinbase.com/connect",metadata:t,preference:n}){this.url=new URL(e),this.metadata=t,this.preference=n}postMessage=async e=>{(await this.waitForPopupLoaded()).postMessage(e,this.url.origin)};postRequestAndWaitForResponse=async e=>{let t=this.onMessage(({requestId:t})=>t===e.id);return this.postMessage(e),await t};onMessage=async e=>new Promise((t,n)=>{let r=n=>{if(n.origin!==this.url.origin)return;let a=n.data;e(a)&&(t(a),window.removeEventListener("message",r),this.listeners.delete(r))};window.addEventListener("message",r),this.listeners.set(r,{reject:n})});disconnect=()=>{var e;(e=this.popup)&&!e.closed&&e.close(),this.popup=null,this.listeners.forEach(({reject:e},t)=>{e(R.provider.userRejectedRequest("Request rejected")),window.removeEventListener("message",t)}),this.listeners.clear()};waitForPopupLoaded=async()=>this.popup&&!this.popup.closed?(this.popup.focus(),this.popup):(ee(),this.popup=await function(e){let t=(window.innerWidth-420)/2+window.screenX,n=(window.innerHeight-700)/2+window.screenY;function r(){let r=`wallet_${crypto.randomUUID()}`,a=window.open(e,r,`width=420, height=700, left=${t}, top=${n}`);return(a?.focus(),a)?a:null}(function(e){for(let[t,n]of Object.entries({sdkName:c,sdkVersion:u,origin:window.location.origin,coop:W()}))e.searchParams.has(t)||e.searchParams.append(t,n.toString())})(e);let a=r();return a?Promise.resolve(a):function(e){let t=A.config.get().metadata?.appName??"App",n=th();return new Promise((r,a)=>{er({dialogContext:"popup_blocked"}),n.presentItem({title:"{app} wants to continue in Base Account".replace("{app}",t),message:"This action requires your permission to open a new window.",onClose:()=>{ei({dialogContext:"popup_blocked",dialogAction:"cancel"}),a(R.rpc.internal("Popup window was blocked"))},actionItems:[{text:"Try again",variant:"primary",onClick:()=>{ei({dialogContext:"popup_blocked",dialogAction:"confirm"});let t=e();t?r(t):a(R.rpc.internal("Popup window was blocked")),n.clear()}},{text:"Cancel",variant:"secondary",onClick:()=>{ei({dialogContext:"popup_blocked",dialogAction:"cancel"}),a(R.rpc.internal("Popup window was blocked")),n.clear()}}]})})}(r)}(this.url),this.onMessage(({event:e})=>"PopupUnload"===e).then(()=>{this.disconnect(),en()}).catch(()=>{}),this.onMessage(({event:e})=>"PopupLoaded"===e).then(e=>{this.postMessage({requestId:e.id,data:{version:u,sdkName:c,metadata:this.metadata,preference:this.preference,location:window.location.toString()}})}).then(()=>{if(!this.popup)throw R.rpc.internal();return et(),this.popup}))}var tb=n(87336);class tg extends tb.v{}let tv=({method:e,correlationId:t})=>{$("provider.request.started",{action:ef.unknown,componentType:ed.unknown,method:e,signerType:"base-account",correlationId:t},ep.high)},tw=({method:e,correlationId:t,errorMessage:n})=>{$("provider.request.error",{action:ef.error,componentType:ed.unknown,method:e,signerType:"base-account",correlationId:t,errorMessage:n},ep.high)},tx=({method:e,correlationId:t})=>{$("provider.request.responded",{action:ef.unknown,componentType:ed.unknown,method:e,signerType:"base-account",correlationId:t},ep.high)},tk=e=>"message"in e&&"string"==typeof e.message?e.message:"",tE=e=>e;function tA(e){return Math.floor(e)}n(82957).lW;let tC=/^[0-9]*$/,tS=/^[a-f0-9]*$/;function tP(e){return tE(`0x${BigInt(e).toString(16)}`)}function tO(e){return e.startsWith("0x")||e.startsWith("0X")?e.slice(2):e}function tI(e,t=!1){if("string"==typeof e){let n=tO(e).toLowerCase();if(tS.test(n))return tE(t?`0x${n}`:n)}throw R.rpc.invalidParams(`"${String(e)}" is not a hexadecimal string`)}var tT=n(72932),tB=n(93637);let tU=({method:e,correlationId:t})=>{let n=A.subAccountsConfig.get();$("scw_signer.handshake.started",{action:ef.unknown,componentType:ed.unknown,method:e,correlationId:t,subAccountCreation:n?.creation,subAccountDefaultAccount:n?.defaultAccount,subAccountFunding:n?.funding},ep.high)},t_=({method:e,correlationId:t,errorMessage:n})=>{let r=A.subAccountsConfig.get();$("scw_signer.handshake.error",{action:ef.error,componentType:ed.unknown,method:e,correlationId:t,errorMessage:n,subAccountCreation:r?.creation,subAccountDefaultAccount:r?.defaultAccount,subAccountFunding:r?.funding},ep.high)},tj=({method:e,correlationId:t})=>{let n=A.subAccountsConfig.get();$("scw_signer.handshake.completed",{action:ef.unknown,componentType:ed.unknown,method:e,correlationId:t,subAccountCreation:n?.creation,subAccountDefaultAccount:n?.defaultAccount,subAccountFunding:n?.funding},ep.high)},tN=({method:e,correlationId:t})=>{let n=A.subAccountsConfig.get();$("scw_signer.request.started",{action:ef.unknown,componentType:ed.unknown,method:e,correlationId:t,subAccountCreation:n?.creation,subAccountDefaultAccount:n?.defaultAccount,subAccountFunding:n?.funding},ep.high)},tR=({method:e,correlationId:t,errorMessage:n})=>{let r=A.subAccountsConfig.get();$("scw_signer.request.error",{action:ef.error,componentType:ed.unknown,method:e,correlationId:t,errorMessage:n,subAccountCreation:r?.creation,subAccountDefaultAccount:r?.defaultAccount,subAccountFunding:r?.funding},ep.high)},tD=({method:e,correlationId:t})=>{let n=A.subAccountsConfig.get();$("scw_signer.request.completed",{action:ef.unknown,componentType:ed.unknown,method:e,correlationId:t,subAccountCreation:n?.creation,subAccountDefaultAccount:n?.defaultAccount,subAccountFunding:n?.funding},ep.high)},tF=({method:e,correlationId:t})=>{let n=A.subAccountsConfig.get();$("scw_sub_account.request.started",{action:ef.unknown,componentType:ed.unknown,method:e,correlationId:t,subAccountCreation:n?.creation,subAccountDefaultAccount:n?.defaultAccount,subAccountFunding:n?.funding},ep.high)},tM=({method:e,correlationId:t})=>{let n=A.subAccountsConfig.get();$("scw_sub_account.request.completed",{action:ef.unknown,componentType:ed.unknown,method:e,correlationId:t,subAccountCreation:n?.creation,subAccountDefaultAccount:n?.defaultAccount,subAccountFunding:n?.funding},ep.high)},tL=({method:e,correlationId:t,errorMessage:n})=>{let r=A.subAccountsConfig.get();$("scw_sub_account.request.error",{action:ef.error,componentType:ed.unknown,method:e,correlationId:t,errorMessage:n,subAccountCreation:r?.creation,subAccountDefaultAccount:r?.defaultAccount,subAccountFunding:r?.funding},ep.high)},tG=({method:e,correlationId:t})=>{let n=A.subAccountsConfig.get();$("scw_sub_account.add_owner.started",{action:ef.unknown,componentType:ed.unknown,method:e,correlationId:t,subAccountCreation:n?.creation,subAccountDefaultAccount:n?.defaultAccount,subAccountFunding:n?.funding},ep.high)},tq=({method:e,correlationId:t})=>{let n=A.subAccountsConfig.get();$("scw_sub_account.add_owner.completed",{action:ef.unknown,componentType:ed.unknown,method:e,correlationId:t,subAccountCreation:n?.creation,subAccountDefaultAccount:n?.defaultAccount,subAccountFunding:n?.funding},ep.high)},tH=({method:e,correlationId:t,errorMessage:n})=>{let r=A.subAccountsConfig.get();$("scw_sub_account.add_owner.error",{action:ef.error,componentType:ed.unknown,method:e,correlationId:t,errorMessage:n,subAccountCreation:r?.creation,subAccountDefaultAccount:r?.defaultAccount,subAccountFunding:r?.funding},ep.high)},tz=({method:e,correlationId:t})=>{let n=A.subAccountsConfig.get();$("scw_sub_account.insufficient_balance.error_handling.started",{action:ef.unknown,componentType:ed.unknown,method:e,correlationId:t,subAccountCreation:n?.creation,subAccountDefaultAccount:n?.defaultAccount,subAccountFunding:n?.funding},ep.high)},tK=({method:e,correlationId:t})=>{let n=A.subAccountsConfig.get();$("scw_sub_account.insufficient_balance.error_handling.completed",{action:ef.unknown,componentType:ed.unknown,method:e,correlationId:t,subAccountCreation:n?.creation,subAccountDefaultAccount:n?.defaultAccount,subAccountFunding:n?.funding},ep.high)},tV=({method:e,correlationId:t,errorMessage:n})=>{let r=A.subAccountsConfig.get();$("scw_sub_account.insufficient_balance.error_handling.error",{action:ef.error,componentType:ed.unknown,method:e,correlationId:t,errorMessage:n,subAccountCreation:r?.creation,subAccountDefaultAccount:r?.defaultAccount,subAccountFunding:r?.funding},ep.high)};var tZ=n(90328),tW=n(70751),tJ=n(79516),tY=n(82538),tQ=n(12363),tX=n(19775),t$=n(65704),t0=n(82645),t1=n(77911),t2=n(81544),t3=n(20010),t6=n(33591);class t5 extends t2.G{constructor({cause:e}){super("Smart Account is not deployed.",{cause:e,metaMessages:["This could arise when:","- No `factory`/`factoryData` or `initCode` properties are provided for Smart Account deployment.","- An incorrect `sender` address is provided."],name:"AccountNotDeployedError"})}}Object.defineProperty(t5,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa20/});class t4 extends t2.G{constructor({cause:e,data:t,message:n}={}){let r=n?.replace("execution reverted: ","")?.replace("execution reverted","");super(`Execution reverted ${r?`with reason: ${r}`:"for an unknown reason"}.`,{cause:e,name:"ExecutionRevertedError"}),Object.defineProperty(this,"data",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.data=t}}Object.defineProperty(t4,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32521}),Object.defineProperty(t4,"message",{enumerable:!0,configurable:!0,writable:!0,value:/execution reverted/});class t7 extends t2.G{constructor({cause:e}){super("Failed to send funds to beneficiary.",{cause:e,name:"FailedToSendToBeneficiaryError"})}}Object.defineProperty(t7,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa91/});class t8 extends t2.G{constructor({cause:e}){super("Gas value overflowed.",{cause:e,metaMessages:["This could arise when:","- one of the gas values exceeded 2**120 (uint120)"].filter(Boolean),name:"GasValuesOverflowError"})}}Object.defineProperty(t8,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa94/});class t9 extends t2.G{constructor({cause:e}){super("The `handleOps` function was called by the Bundler with a gas limit too low.",{cause:e,name:"HandleOpsOutOfGasError"})}}Object.defineProperty(t9,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa95/});class ne extends t2.G{constructor({cause:e,factory:t,factoryData:n,initCode:r}){super("Failed to simulate deployment for Smart Account.",{cause:e,metaMessages:["This could arise when:","- Invalid `factory`/`factoryData` or `initCode` properties are present","- Smart Account deployment execution ran out of gas (low `verificationGasLimit` value)","- Smart Account deployment execution reverted with an error\n",t&&`factory: ${t}`,n&&`factoryData: ${n}`,r&&`initCode: ${r}`].filter(Boolean),name:"InitCodeFailedError"})}}Object.defineProperty(ne,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa13/});class nt extends t2.G{constructor({cause:e,factory:t,factoryData:n,initCode:r}){super("Smart Account initialization implementation did not create an account.",{cause:e,metaMessages:["This could arise when:","- `factory`/`factoryData` or `initCode` properties are invalid","- Smart Account initialization implementation is incorrect\n",t&&`factory: ${t}`,n&&`factoryData: ${n}`,r&&`initCode: ${r}`].filter(Boolean),name:"InitCodeMustCreateSenderError"})}}Object.defineProperty(nt,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa15/});class nn extends t2.G{constructor({cause:e,factory:t,factoryData:n,initCode:r,sender:a}){super("Smart Account initialization implementation does not return the expected sender.",{cause:e,metaMessages:["This could arise when:","Smart Account initialization implementation does not return a sender address\n",t&&`factory: ${t}`,n&&`factoryData: ${n}`,r&&`initCode: ${r}`,a&&`sender: ${a}`].filter(Boolean),name:"InitCodeMustReturnSenderError"})}}Object.defineProperty(nn,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa14/});class nr extends t2.G{constructor({cause:e}){super("Smart Account does not have sufficient funds to execute the User Operation.",{cause:e,metaMessages:["This could arise when:","- the Smart Account does not have sufficient funds to cover the required prefund, or","- a Paymaster was not provided"].filter(Boolean),name:"InsufficientPrefundError"})}}Object.defineProperty(nr,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa21/});class na extends t2.G{constructor({cause:e}){super("Bundler attempted to call an invalid function on the EntryPoint.",{cause:e,name:"InternalCallOnlyError"})}}Object.defineProperty(na,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa92/});class ni extends t2.G{constructor({cause:e}){super("Bundler used an invalid aggregator for handling aggregated User Operations.",{cause:e,name:"InvalidAggregatorError"})}}Object.defineProperty(ni,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa96/});class ns extends t2.G{constructor({cause:e,nonce:t}){super("Invalid Smart Account nonce used for User Operation.",{cause:e,metaMessages:[t&&`nonce: ${t}`].filter(Boolean),name:"InvalidAccountNonceError"})}}Object.defineProperty(ns,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa25/});class no extends t2.G{constructor({cause:e}){super("Bundler has not set a beneficiary address.",{cause:e,name:"InvalidBeneficiaryError"})}}Object.defineProperty(no,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa90/});class nc extends t2.G{constructor({cause:e}){super("Invalid fields set on User Operation.",{cause:e,name:"InvalidFieldsError"})}}Object.defineProperty(nc,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32602});class nu extends t2.G{constructor({cause:e,paymasterAndData:t}){super("Paymaster properties provided are invalid.",{cause:e,metaMessages:["This could arise when:","- the `paymasterAndData` property is of an incorrect length\n",t&&`paymasterAndData: ${t}`].filter(Boolean),name:"InvalidPaymasterAndDataError"})}}Object.defineProperty(nu,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa93/});class nl extends t2.G{constructor({cause:e}){super("Paymaster deposit for the User Operation is too low.",{cause:e,metaMessages:["This could arise when:","- the Paymaster has deposited less than the expected amount via the `deposit` function"].filter(Boolean),name:"PaymasterDepositTooLowError"})}}Object.defineProperty(nl,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32508}),Object.defineProperty(nl,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa31/});class nd extends t2.G{constructor({cause:e}){super("The `validatePaymasterUserOp` function on the Paymaster reverted.",{cause:e,name:"PaymasterFunctionRevertedError"})}}Object.defineProperty(nd,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa33/});class nf extends t2.G{constructor({cause:e}){super("The Paymaster contract has not been deployed.",{cause:e,name:"PaymasterNotDeployedError"})}}Object.defineProperty(nf,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa30/});class np extends t2.G{constructor({cause:e}){super("UserOperation rejected because paymaster (or signature aggregator) is throttled/banned.",{cause:e,name:"PaymasterRateLimitError"})}}Object.defineProperty(np,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32504});class nm extends t2.G{constructor({cause:e}){super("UserOperation rejected because paymaster (or signature aggregator) is throttled/banned.",{cause:e,name:"PaymasterStakeTooLowError"})}}Object.defineProperty(nm,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32505});class nh extends t2.G{constructor({cause:e}){super("Paymaster `postOp` function reverted.",{cause:e,name:"PaymasterPostOpFunctionRevertedError"})}}Object.defineProperty(nh,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa50/});class ny extends t2.G{constructor({cause:e,factory:t,factoryData:n,initCode:r}){super("Smart Account has already been deployed.",{cause:e,metaMessages:["Remove the following properties and try again:",t&&"`factory`",n&&"`factoryData`",r&&"`initCode`"].filter(Boolean),name:"SenderAlreadyConstructedError"})}}Object.defineProperty(ny,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa10/});class nb extends t2.G{constructor({cause:e}){super("UserOperation rejected because account signature check failed (or paymaster signature, if the paymaster uses its data as signature).",{cause:e,name:"SignatureCheckFailedError"})}}Object.defineProperty(nb,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32507});class ng extends t2.G{constructor({cause:e}){super("The `validateUserOp` function on the Smart Account reverted.",{cause:e,name:"SmartAccountFunctionRevertedError"})}}Object.defineProperty(ng,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa23/});class nv extends t2.G{constructor({cause:e}){super("UserOperation rejected because account specified unsupported signature aggregator.",{cause:e,name:"UnsupportedSignatureAggregatorError"})}}Object.defineProperty(nv,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32506});class nw extends t2.G{constructor({cause:e}){super("User Operation expired.",{cause:e,metaMessages:["This could arise when:","- the `validAfter` or `validUntil` values returned from `validateUserOp` on the Smart Account are not satisfied"].filter(Boolean),name:"UserOperationExpiredError"})}}Object.defineProperty(nw,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa22/});class nx extends t2.G{constructor({cause:e}){super("Paymaster for User Operation expired.",{cause:e,metaMessages:["This could arise when:","- the `validAfter` or `validUntil` values returned from `validatePaymasterUserOp` on the Paymaster are not satisfied"].filter(Boolean),name:"UserOperationPaymasterExpiredError"})}}Object.defineProperty(nx,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa32/});class nk extends t2.G{constructor({cause:e}){super("Signature provided for the User Operation is invalid.",{cause:e,metaMessages:["This could arise when:","- the `signature` for the User Operation is incorrectly computed, and unable to be verified by the Smart Account"].filter(Boolean),name:"UserOperationSignatureError"})}}Object.defineProperty(nk,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa24/});class nE extends t2.G{constructor({cause:e}){super("Signature provided for the User Operation is invalid.",{cause:e,metaMessages:["This could arise when:","- the `signature` for the User Operation is incorrectly computed, and unable to be verified by the Paymaster"].filter(Boolean),name:"UserOperationPaymasterSignatureError"})}}Object.defineProperty(nE,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa34/});class nA extends t2.G{constructor({cause:e}){super("User Operation rejected by EntryPoint's `simulateValidation` during account creation or validation.",{cause:e,name:"UserOperationRejectedByEntryPointError"})}}Object.defineProperty(nA,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32500});class nC extends t2.G{constructor({cause:e}){super("User Operation rejected by Paymaster's `validatePaymasterUserOp`.",{cause:e,name:"UserOperationRejectedByPaymasterError"})}}Object.defineProperty(nC,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32501});class nS extends t2.G{constructor({cause:e}){super("User Operation rejected with op code validation error.",{cause:e,name:"UserOperationRejectedByOpCodeError"})}}Object.defineProperty(nS,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32502});class nP extends t2.G{constructor({cause:e}){super("UserOperation out of time-range: either wallet or paymaster returned a time-range, and it is already expired (or will expire soon).",{cause:e,name:"UserOperationOutOfTimeRangeError"})}}Object.defineProperty(nP,"code",{enumerable:!0,configurable:!0,writable:!0,value:-32503});class nO extends t2.G{constructor({cause:e}){super(`An error occurred while executing user operation: ${e?.shortMessage}`,{cause:e,name:"UnknownBundlerError"})}}class nI extends t2.G{constructor({cause:e}){super("User Operation verification gas limit exceeded.",{cause:e,metaMessages:["This could arise when:","- the gas used for verification exceeded the `verificationGasLimit`"].filter(Boolean),name:"VerificationGasLimitExceededError"})}}Object.defineProperty(nI,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa40/});class nT extends t2.G{constructor({cause:e}){super("User Operation verification gas limit is too low.",{cause:e,metaMessages:["This could arise when:","- the `verificationGasLimit` is too low to verify the User Operation"].filter(Boolean),name:"VerificationGasLimitTooLowError"})}}Object.defineProperty(nT,"message",{enumerable:!0,configurable:!0,writable:!0,value:/aa41/});var nB=n(63228),nU=n(29707);class n_ extends t2.G{constructor(e,{callData:t,callGasLimit:n,docsPath:r,factory:a,factoryData:i,initCode:s,maxFeePerGas:o,maxPriorityFeePerGas:c,nonce:u,paymaster:l,paymasterAndData:d,paymasterData:f,paymasterPostOpGasLimit:p,paymasterVerificationGasLimit:m,preVerificationGas:h,sender:y,signature:b,verificationGasLimit:g}){super(e.shortMessage,{cause:e,docsPath:r,metaMessages:[...e.metaMessages?[...e.metaMessages," "]:[],"Request Arguments:",(0,nB.xr)({callData:t,callGasLimit:n,factory:a,factoryData:i,initCode:s,maxFeePerGas:void 0!==o&&`${(0,nU.o)(o)} gwei`,maxPriorityFeePerGas:void 0!==c&&`${(0,nU.o)(c)} gwei`,nonce:u,paymaster:l,paymasterAndData:d,paymasterData:f,paymasterPostOpGasLimit:p,paymasterVerificationGasLimit:m,preVerificationGas:h,sender:y,signature:b,verificationGasLimit:g})].filter(Boolean),name:"UserOperationExecutionError"}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.cause=e}}class nj extends t2.G{constructor({hash:e}){super(`User Operation receipt with hash "${e}" could not be found. The User Operation may not have been processed yet.`,{name:"UserOperationReceiptNotFoundError"})}}class nN extends t2.G{constructor({hash:e}){super(`User Operation with hash "${e}" could not be found.`,{name:"UserOperationNotFoundError"})}}class nR extends t2.G{constructor({hash:e}){super(`Timed out while waiting for User Operation with hash "${e}" to be confirmed.`,{name:"WaitForUserOperationReceiptTimeoutError"})}}let nD=[t4,nc,nl,np,nm,nb,nv,nP,nA,nC,nS];function nF(e,{calls:t,docsPath:n,...r}){return new n_((()=>{let n=function(e,t){let n=(e.details||"").toLowerCase();if(t5.message.test(n))return new t5({cause:e});if(t7.message.test(n))return new t7({cause:e});if(t8.message.test(n))return new t8({cause:e});if(t9.message.test(n))return new t9({cause:e});if(ne.message.test(n))return new ne({cause:e,factory:t.factory,factoryData:t.factoryData,initCode:t.initCode});if(nt.message.test(n))return new nt({cause:e,factory:t.factory,factoryData:t.factoryData,initCode:t.initCode});if(nn.message.test(n))return new nn({cause:e,factory:t.factory,factoryData:t.factoryData,initCode:t.initCode,sender:t.sender});if(nr.message.test(n))return new nr({cause:e});if(na.message.test(n))return new na({cause:e});if(ns.message.test(n))return new ns({cause:e,nonce:t.nonce});if(ni.message.test(n))return new ni({cause:e});if(no.message.test(n))return new no({cause:e});if(nu.message.test(n))return new nu({cause:e});if(nl.message.test(n))return new nl({cause:e});if(nd.message.test(n))return new nd({cause:e});if(nf.message.test(n))return new nf({cause:e});if(nh.message.test(n))return new nh({cause:e});if(ng.message.test(n))return new ng({cause:e});if(ny.message.test(n))return new ny({cause:e,factory:t.factory,factoryData:t.factoryData,initCode:t.initCode});if(nw.message.test(n))return new nw({cause:e});if(nx.message.test(n))return new nx({cause:e});if(nE.message.test(n))return new nE({cause:e});if(nk.message.test(n))return new nk({cause:e});if(nI.message.test(n))return new nI({cause:e});if(nT.message.test(n))return new nT({cause:e});let r=e.walk(e=>nD.some(t=>t.code===e.code));if(r){if(r.code===t4.code)return new t4({cause:e,data:r.data,message:r.details});if(r.code===nc.code)return new nc({cause:e});if(r.code===nl.code)return new nl({cause:e});if(r.code===np.code)return new np({cause:e});if(r.code===nm.code)return new nm({cause:e});if(r.code===nb.code)return new nb({cause:e});if(r.code===nv.code)return new nv({cause:e});if(r.code===nP.code)return new nP({cause:e});if(r.code===nA.code)return new nA({cause:e});if(r.code===nC.code)return new nC({cause:e});if(r.code===nS.code)return new nS({cause:e})}return new nO({cause:e})}(e,r);if(t&&n instanceof t4){let e;let r=(n.walk(t=>{if("string"==typeof t.data||"string"==typeof t.data?.revertData||!(t instanceof t2.G)&&"string"==typeof t.message){let n=(t.data?.revertData||t.data||t.message).match?.(/(0x[A-Za-z0-9]*)/);if(n)return e=n[1],!0}return!1}),e),a=t?.filter(e=>e.abi);if(r&&a.length>0)return function(e){let{calls:t,revertData:n}=e,{abi:r,functionName:a,args:i,to:s}=(()=>{let e=t?.filter(e=>!!e.abi);if(1===e.length)return e[0];let r=e.filter(e=>{try{return!!(0,t6.p)({abi:e.abi,data:n})}catch{return!1}});return 1===r.length?r[0]:{abi:[],functionName:e.reduce((e,t)=>`${e?`${e} | `:""}${t.functionName}`,""),args:void 0,to:void 0}})(),o="0x"===n?new t3.Dk({functionName:a}):new t3.Lu({abi:r,data:n,functionName:a});return new t3.uq(o,{abi:r,args:i,contractAddress:s,functionName:a})}({calls:a,revertData:r})}return n})(),{docsPath:n,...r})}var nM=n(8796);function nL(e){var t;let n={};return void 0!==e.callData&&(n.callData=e.callData),void 0!==e.callGasLimit&&(n.callGasLimit=(0,X.eC)(e.callGasLimit)),void 0!==e.factory&&(n.factory=e.factory),void 0!==e.factoryData&&(n.factoryData=e.factoryData),void 0!==e.initCode&&(n.initCode=e.initCode),void 0!==e.maxFeePerGas&&(n.maxFeePerGas=(0,X.eC)(e.maxFeePerGas)),void 0!==e.maxPriorityFeePerGas&&(n.maxPriorityFeePerGas=(0,X.eC)(e.maxPriorityFeePerGas)),void 0!==e.nonce&&(n.nonce=(0,X.eC)(e.nonce)),void 0!==e.paymaster&&(n.paymaster=e.paymaster),void 0!==e.paymasterAndData&&(n.paymasterAndData=e.paymasterAndData||"0x"),void 0!==e.paymasterData&&(n.paymasterData=e.paymasterData),void 0!==e.paymasterPostOpGasLimit&&(n.paymasterPostOpGasLimit=(0,X.eC)(e.paymasterPostOpGasLimit)),void 0!==e.paymasterSignature&&(n.paymasterSignature=e.paymasterSignature),void 0!==e.paymasterVerificationGasLimit&&(n.paymasterVerificationGasLimit=(0,X.eC)(e.paymasterVerificationGasLimit)),void 0!==e.preVerificationGas&&(n.preVerificationGas=(0,X.eC)(e.preVerificationGas)),void 0!==e.sender&&(n.sender=e.sender),void 0!==e.signature&&(n.signature=e.signature),void 0!==e.verificationGasLimit&&(n.verificationGasLimit=(0,X.eC)(e.verificationGasLimit)),void 0!==e.authorization&&(n.eip7702Auth={address:(t=e.authorization).address,chainId:(0,X.eC)(t.chainId),nonce:(0,X.eC)(t.nonce),r:t.r?(0,X.eC)(BigInt(t.r),{size:32}):(0,nM.vk)("0x",{size:32}),s:t.s?(0,X.eC)(BigInt(t.s),{size:32}):(0,nM.vk)("0x",{size:32}),yParity:t.yParity?(0,X.eC)(t.yParity,{size:1}):(0,nM.vk)("0x",{size:32})}),n}var nG=n(89239),nq=n(6458),nH=n(89256);async function nz(e,t){let{chainId:n,entryPointAddress:r,context:a,...i}=t,s=nL(i),{paymasterPostOpGasLimit:o,paymasterVerificationGasLimit:c,...u}=await e.request({method:"pm_getPaymasterData",params:[{...s,callGasLimit:s.callGasLimit??"0x0",verificationGasLimit:s.verificationGasLimit??"0x0",preVerificationGas:s.preVerificationGas??"0x0"},r,(0,X.eC)(n),a]});return{...u,...o&&{paymasterPostOpGasLimit:(0,tT.y_)(o)},...c&&{paymasterVerificationGasLimit:(0,tT.y_)(c)}}}async function nK(e,t){let{chainId:n,entryPointAddress:r,context:a,...i}=t,s=nL(i),{paymasterPostOpGasLimit:o,paymasterVerificationGasLimit:c,...u}=await e.request({method:"pm_getPaymasterStubData",params:[{...s,callGasLimit:s.callGasLimit??"0x0",verificationGasLimit:s.verificationGasLimit??"0x0",preVerificationGas:s.preVerificationGas??"0x0"},r,(0,X.eC)(n),a]});return{...u,...o&&{paymasterPostOpGasLimit:(0,tT.y_)(o)},...c&&{paymasterVerificationGasLimit:(0,tT.y_)(c)}}}let nV=["factory","fees","gas","paymaster","nonce","signature","authorization"];async function nZ(e,t){let n;let{account:r=e.account,parameters:a=nV,stateOverride:i}=t;if(!r)throw new t$.o;let s=(0,tX.T)(r),o=t.paymaster??e?.paymaster,c="string"==typeof o?o:void 0,{getPaymasterStubData:u,getPaymasterData:l}=(()=>{if(!0===o)return{getPaymasterStubData:t=>(0,t0.s)(e,nK,"getPaymasterStubData")(t),getPaymasterData:t=>(0,t0.s)(e,nz,"getPaymasterData")(t)};if("object"==typeof o){let{getPaymasterStubData:e,getPaymasterData:t}=o;return{getPaymasterStubData:t&&e?e:t,getPaymasterData:t&&e?t:void 0}}return{getPaymasterStubData:void 0,getPaymasterData:void 0}})(),d=t.paymasterContext?t.paymasterContext:e?.paymasterContext,f={...t,paymaster:c,sender:s.address},[p,m,h,y,b]=await Promise.all([(async()=>t.calls?s.encodeCalls(t.calls.map(e=>e.abi?{data:(0,Q.R)(e),to:e.to,value:e.value}:e)):t.callData)(),(async()=>{if(!a.includes("factory"))return;if(t.initCode)return{initCode:t.initCode};if(t.factory&&t.factoryData)return{factory:t.factory,factoryData:t.factoryData};let{factory:e,factoryData:n}=await s.getFactoryArgs();return"0.6"===s.entryPoint.version?{initCode:e&&n?(0,nH.zo)([e,n]):void 0}:{factory:e,factoryData:n}})(),(async()=>{if(a.includes("fees")){if("bigint"==typeof t.maxFeePerGas&&"bigint"==typeof t.maxPriorityFeePerGas)return f;if(e?.userOperation?.estimateFeesPerGas){let t=await e.userOperation.estimateFeesPerGas({account:s,bundlerClient:e,userOperation:f});return{...f,...t}}try{let n=e.client??e,r=await (0,t0.s)(n,nq.X,"estimateFeesPerGas")({chain:n.chain,type:"eip1559"});return{maxFeePerGas:"bigint"==typeof t.maxFeePerGas?t.maxFeePerGas:BigInt(2n*r.maxFeePerGas),maxPriorityFeePerGas:"bigint"==typeof t.maxPriorityFeePerGas?t.maxPriorityFeePerGas:BigInt(2n*r.maxPriorityFeePerGas)}}catch{return}}})(),(async()=>{if(a.includes("nonce"))return"bigint"==typeof t.nonce?t.nonce:s.getNonce()})(),(async()=>{if(a.includes("authorization")){if("object"==typeof t.authorization)return t.authorization;if(s.authorization&&!await s.isDeployed())return{...await (0,nG.x)(s.client,s.authorization),r:"0xfffffffffffffffffffffffffffffff000000000000000000000000000000000",s:"0x7aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",yParity:1}}})()]);async function g(){return n||(e.chain?e.chain.id:n=await (0,t0.s)(e,tQ.L,"getChainId")({}))}void 0!==p&&(f.callData=p),void 0!==m&&(f={...f,...m}),void 0!==h&&(f={...f,...h}),void 0!==y&&(f.nonce=y),void 0!==b&&(f.authorization=b),a.includes("signature")&&(void 0!==t.signature?f.signature=t.signature:f.signature=await s.getStubSignature(f)),"0.6"!==s.entryPoint.version||f.initCode||(f.initCode="0x");let v=!1;if(a.includes("paymaster")&&u&&!c&&!t.paymasterAndData){let{isFinal:e=!1,sponsor:t,...n}=await u({chainId:await g(),entryPointAddress:s.entryPoint.address,context:d,...f});v=e,f={...f,...n}}if("0.6"!==s.entryPoint.version||f.paymasterAndData||(f.paymasterAndData="0x"),a.includes("gas")){if(s.userOperation?.estimateGas){let e=await s.userOperation.estimateGas(f);f={...f,...e}}if(void 0===f.callGasLimit||void 0===f.preVerificationGas||void 0===f.verificationGasLimit||f.paymaster&&void 0===f.paymasterPostOpGasLimit||f.paymaster&&void 0===f.paymasterVerificationGasLimit){let t=await (0,t0.s)(e,nW,"estimateUserOperationGas")({account:s,callGasLimit:0n,preVerificationGas:0n,verificationGasLimit:0n,stateOverride:i,...f.paymaster?{paymasterPostOpGasLimit:0n,paymasterVerificationGasLimit:0n}:{},...f});f={...f,callGasLimit:f.callGasLimit??t.callGasLimit,preVerificationGas:f.preVerificationGas??t.preVerificationGas,verificationGasLimit:f.verificationGasLimit??t.verificationGasLimit,paymasterPostOpGasLimit:f.paymasterPostOpGasLimit??t.paymasterPostOpGasLimit,paymasterVerificationGasLimit:f.paymasterVerificationGasLimit??t.paymasterVerificationGasLimit}}}if(a.includes("paymaster")&&l&&!c&&!t.paymasterAndData&&!v){let e=await l({chainId:await g(),entryPointAddress:s.entryPoint.address,context:d,...f});f={...f,...e}}return delete f.calls,delete f.parameters,delete f.paymasterContext,"string"!=typeof f.paymaster&&delete f.paymaster,f}async function nW(e,t){let{account:n=e.account,entryPointAddress:r,stateOverride:a}=t;if(!n&&!t.sender)throw new t$.o;let i=n?(0,tX.T)(n):void 0,s=(0,t1.mF)(a),o=i?await (0,t0.s)(e,nZ,"prepareUserOperation")({...t,parameters:["authorization","factory","nonce","paymaster","signature"]}):t;try{let t=[nL(o),r??i?.entryPoint?.address],n=await e.request({method:"eth_estimateUserOperationGas",params:s?[...t,s]:[...t]});return function(e){let t={};return e.callGasLimit&&(t.callGasLimit=BigInt(e.callGasLimit)),e.preVerificationGas&&(t.preVerificationGas=BigInt(e.preVerificationGas)),e.verificationGasLimit&&(t.verificationGasLimit=BigInt(e.verificationGasLimit)),e.paymasterPostOpGasLimit&&(t.paymasterPostOpGasLimit=BigInt(e.paymasterPostOpGasLimit)),e.paymasterVerificationGasLimit&&(t.paymasterVerificationGasLimit=BigInt(e.paymasterVerificationGasLimit)),t}(n)}catch(n){let e=t.calls;throw nF(n,{...o,...e?{calls:e}:{}})}}async function nJ(e,{hash:t}){let n=await e.request({method:"eth_getUserOperationByHash",params:[t]},{dedupe:!0});if(!n)throw new nN({hash:t});let{blockHash:r,blockNumber:a,entryPoint:i,transactionHash:s,userOperation:o}=n;return{blockHash:r,blockNumber:BigInt(a),entryPoint:i,transactionHash:s,userOperation:function(e){let t={...e};return e.callGasLimit&&(t.callGasLimit=BigInt(e.callGasLimit)),e.maxFeePerGas&&(t.maxFeePerGas=BigInt(e.maxFeePerGas)),e.maxPriorityFeePerGas&&(t.maxPriorityFeePerGas=BigInt(e.maxPriorityFeePerGas)),e.nonce&&(t.nonce=BigInt(e.nonce)),e.paymasterPostOpGasLimit&&(t.paymasterPostOpGasLimit=BigInt(e.paymasterPostOpGasLimit)),e.paymasterVerificationGasLimit&&(t.paymasterVerificationGasLimit=BigInt(e.paymasterVerificationGasLimit)),e.preVerificationGas&&(t.preVerificationGas=BigInt(e.preVerificationGas)),e.verificationGasLimit&&(t.verificationGasLimit=BigInt(e.verificationGasLimit)),t}(o)}}var nY=n(55668),nQ=n(13550);async function nX(e,{hash:t}){let n=await e.request({method:"eth_getUserOperationReceipt",params:[t]},{dedupe:!0});if(!n)throw new nj({hash:t});return function(e){let t={...e};return e.actualGasCost&&(t.actualGasCost=BigInt(e.actualGasCost)),e.actualGasUsed&&(t.actualGasUsed=BigInt(e.actualGasUsed)),e.logs&&(t.logs=e.logs.map(e=>(0,nY.U)(e))),e.receipt&&(t.receipt=(0,nQ.fA)(t.receipt)),t}(n)}async function n$(e,t){let{account:n=e.account,entryPointAddress:r}=t;if(!n&&!t.sender)throw new t$.o;let a=n?(0,tX.T)(n):void 0,i=a?await (0,t0.s)(e,nZ,"prepareUserOperation")(t):t,s=t.signature||await a?.signUserOperation?.(i),o=nL({...i,signature:s});try{return await e.request({method:"eth_sendUserOperation",params:[o,r??a?.entryPoint?.address]},{retryCount:0})}catch(n){let e=t.calls;throw nF(n,{...i,...e?{calls:e}:{},signature:s})}}var n0=n(36478),n1=n(41495),n2=n(31853);function n3(e){return{estimateUserOperationGas:t=>nW(e,t),getChainId:()=>(0,tQ.L)(e),getSupportedEntryPoints:()=>e.request({method:"eth_supportedEntryPoints"}),getUserOperation:t=>nJ(e,t),getUserOperationReceipt:t=>nX(e,t),prepareUserOperation:t=>nZ(e,t),sendUserOperation:t=>n$(e,t),waitForUserOperationReceipt:t=>(function(e,t){let{hash:n,pollingInterval:r=e.pollingInterval,retryCount:a,timeout:i=12e4}=t,s=0,o=(0,n2.P)(["waitForUserOperationReceipt",e.uid,n]);return new Promise((t,c)=>{let u=(0,n0.N7)(o,{resolve:t,reject:c},t=>{let o=e=>{l(),e(),u()},c=i?setTimeout(()=>o(()=>t.reject(new nR({hash:n}))),i):void 0,l=(0,n1.$)(async()=>{a&&s>=a&&(clearTimeout(c),o(()=>t.reject(new nR({hash:n}))));try{let r=await (0,t0.s)(e,nX,"getUserOperationReceipt")({hash:n});clearTimeout(c),o(()=>t.resolve(r))}catch(e){"UserOperationReceiptNotFoundError"!==e.name&&(clearTimeout(c),o(()=>t.reject(e)))}s++},{emitOnBegin:!0,interval:r});return l})})})(e,t)}}var n6=n(17467),n5=n(59069),n4=n(27481);let n7={block:(0,n5.G)({format:e=>({transactions:e.transactions?.map(e=>{if("string"==typeof e)return e;let t=n4.Tr(e);return"0x7e"===t.typeHex&&(t.isSystemTx=e.isSystemTx,t.mint=e.mint?tT.y_(e.mint):void 0,t.sourceHash=e.sourceHash,t.type="deposit"),t}),stateRoot:e.stateRoot})}),transaction:(0,n4.y_)({format(e){let t={};return"0x7e"===e.type&&(t.isSystemTx=e.isSystemTx,t.mint=e.mint?(0,tT.y_)(e.mint):void 0,t.sourceHash=e.sourceHash,t.type="deposit"),t}}),transactionReceipt:(0,nQ.dI)({format:e=>({l1GasPrice:e.l1GasPrice?(0,tT.y_)(e.l1GasPrice):null,l1GasUsed:e.l1GasUsed?(0,tT.y_)(e.l1GasUsed):null,l1Fee:e.l1Fee?(0,tT.y_)(e.l1Fee):null,l1FeeScalar:e.l1FeeScalar?Number(e.l1FeeScalar):null})})};var n8=n(81273);let n9={blockTime:2e3,contracts:n6.r,formatters:n7,serializers:n8.fE},re=(0,tZ.a)({...n9,id:8453,name:"Base",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.base.org"]}},blockExplorers:{default:{name:"Basescan",url:"https://basescan.org",apiUrl:"https://api.basescan.org/api"}},contracts:{...n9.contracts,disputeGameFactory:{1:{address:"0x43edB88C4B80fDD2AdFF2412A7BebF9dF42cB40e"}},l2OutputOracle:{1:{address:"0x56315b90c40730925ec5485cf004d835058518A0"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:5022},portal:{1:{address:"0x49048044D57e1C92A77f79988d21Fa8fAF74E97e",blockCreated:17482143}},l1StandardBridge:{1:{address:"0x3154Cf16ccdb4C6d922629664174b904d80F2C35",blockCreated:17482143}}},sourceId:1});({...re});let rt=(0,tZ.a)({id:43114,name:"Avalanche",blockTime:1700,nativeCurrency:{decimals:18,name:"Avalanche",symbol:"AVAX"},rpcUrls:{default:{http:["https://api.avax.network/ext/bc/C/rpc"]}},blockExplorers:{default:{name:"SnowTrace",url:"https://snowtrace.io",apiUrl:"https://api.snowtrace.io"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:11907934}}}),rn=(0,tZ.a)({id:42161,name:"Arbitrum One",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},blockTime:250,rpcUrls:{default:{http:["https://arb1.arbitrum.io/rpc"]}},blockExplorers:{default:{name:"Arbiscan",url:"https://arbiscan.io",apiUrl:"https://api.arbiscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:7654707}}}),rr=(0,tZ.a)({id:137,name:"Polygon",blockTime:2e3,nativeCurrency:{name:"POL",symbol:"POL",decimals:18},rpcUrls:{default:{http:["https://polygon-rpc.com"]}},blockExplorers:{default:{name:"PolygonScan",url:"https://polygonscan.com",apiUrl:"https://api.etherscan.io/v2/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:25770160}}}),ra=(0,tZ.a)({id:1,name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},blockTime:12e3,rpcUrls:{default:{http:["https://eth.merkle.io"]}},blockExplorers:{default:{name:"Etherscan",url:"https://etherscan.io",apiUrl:"https://api.etherscan.io/api"}},contracts:{ensUniversalResolver:{address:"0xeeeeeeee14d718c2b47d9923deab1335e144eeee",blockCreated:23085558},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}}),ri=(0,tZ.a)({id:56,name:"BNB Smart Chain",blockTime:750,nativeCurrency:{decimals:18,name:"BNB",symbol:"BNB"},rpcUrls:{default:{http:["https://56.rpc.thirdweb.com"]}},blockExplorers:{default:{name:"BscScan",url:"https://bscscan.com",apiUrl:"https://api.bscscan.com/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:15921452}}}),rs=(0,tZ.a)({...n9,id:7777777,name:"Zora",nativeCurrency:{decimals:18,name:"Ether",symbol:"ETH"},rpcUrls:{default:{http:["https://rpc.zora.energy"],webSocket:["wss://rpc.zora.energy"]}},blockExplorers:{default:{name:"Explorer",url:"https://explorer.zora.energy",apiUrl:"https://explorer.zora.energy/api"}},contracts:{...n9.contracts,l2OutputOracle:{1:{address:"0x9E6204F750cD866b299594e2aC9eA824E2e5f95c"}},multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:5882},portal:{1:{address:"0x1a0ad011913A150f69f6A19DF447A0CfD9551054"}},l1StandardBridge:{1:{address:"0x3e2Ea9B92B7E48A52296fD261dc26fd995284631"}}},sourceId:1}),ro=(0,tZ.a)({...n9,id:10,name:"OP Mainnet",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://mainnet.optimism.io"]}},blockExplorers:{default:{name:"Optimism Explorer",url:"https://optimistic.etherscan.io",apiUrl:"https://api-optimistic.etherscan.io/api"}},contracts:{...n9.contracts,disputeGameFactory:{1:{address:"0xe5965Ab5962eDc7477C8520243A95517CD252fA9"}},l2OutputOracle:{1:{address:"0xdfe97868233d1aa22e815a266982f2cf17685a27"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:4286263},portal:{1:{address:"0xbEb5Fc579115071764c7423A4f12eDde41f106Ed"}},l1StandardBridge:{1:{address:"0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1"}}},sourceId:1}),rc=(0,tZ.a)({...n9,id:84532,network:"base-sepolia",name:"Base Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.base.org"]}},blockExplorers:{default:{name:"Basescan",url:"https://sepolia.basescan.org",apiUrl:"https://api-sepolia.basescan.org/api"}},contracts:{...n9.contracts,disputeGameFactory:{11155111:{address:"0xd6E6dBf4F7EA0ac412fD8b65ED297e64BB7a06E1"}},l2OutputOracle:{11155111:{address:"0x84457ca9D0163FbC4bbfe4Dfbb20ba46e48DF254"}},portal:{11155111:{address:"0x49f53e41452c74589e85ca1677426ba426459e85",blockCreated:4446677}},l1StandardBridge:{11155111:{address:"0xfd0Bf71F60660E2f608ed56e1659C450eB113120",blockCreated:4446677}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1059647}},testnet:!0,sourceId:11155111});({...rc});let ru=(0,tZ.a)({id:11155111,name:"Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://11155111.rpc.thirdweb.com"]}},blockExplorers:{default:{name:"Etherscan",url:"https://sepolia.etherscan.io",apiUrl:"https://api-sepolia.etherscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:751532},ensUniversalResolver:{address:"0xeeeeeeee14d718c2b47d9923deab1335e144eeee",blockCreated:8928790}},testnet:!0}),rl=(0,tZ.a)({...n9,id:11155420,name:"OP Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.optimism.io"]}},blockExplorers:{default:{name:"Blockscout",url:"https://optimism-sepolia.blockscout.com",apiUrl:"https://optimism-sepolia.blockscout.com/api"}},contracts:{...n9.contracts,disputeGameFactory:{11155111:{address:"0x05F9613aDB30026FFd634f38e5C4dFd30a197Fa1"}},l2OutputOracle:{11155111:{address:"0x90E9c4f8a994a250F6aEfd61CAFb4F2e895D458F"}},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:1620204},portal:{11155111:{address:"0x16Fc5058F25648194471939df75CF27A2fdC48BC"}},l1StandardBridge:{11155111:{address:"0xFBb0621E0B23b5478B630BD55a5f21f67730B0F1"}}},testnet:!0,sourceId:11155111}),rd=p(()=>({})),rf=[re,rt,rn,rr,ra,ri,rs,ro,rc,ru,rl].reduce((e,t)=>(e.set(t.id,t),e),new Map);function rp(e){let t=rf.get(e);if(t?.rpcUrls?.default?.http?.[0])return t.rpcUrls.default.http[0]}function rm(e){e.forEach(e=>{var t;let n=e.rpcUrl;if(n||(n=rp(e.id)),!n)return;let r=(t=e.id,rf.get(t)),a=rh({chainId:e.id,rpcUrl:n,nativeCurrency:e.nativeCurrency,viemChain:r});ry(e.id,a)})}function rh(e){let{chainId:t,rpcUrl:n,nativeCurrency:r,viemChain:a}=e,i=function(e,t,n){let r=n?.viemChain,a=n?.nativeCurrency,i=a?.name??r?.name??"",s=a?.symbol??r?.nativeCurrency?.symbol??"",o=a?.decimal??r?.nativeCurrency?.decimals??18;return(0,tZ.a)({id:e,name:i,nativeCurrency:{name:i,symbol:s,decimals:o},rpcUrls:{default:{http:[t]}}})}(t,n,{viemChain:a,nativeCurrency:r}),s=(0,tW.v)({chain:i,transport:(0,tJ.d)(n)}),o=function(e){let{client:t,key:n="bundler",name:r="Bundler Client",paymaster:a,paymasterContext:i,transport:s,userOperation:o}=e;return Object.assign((0,tY.e)({...e,chain:e.chain??t?.chain,key:n,name:r,transport:s,type:"bundlerClient"}),{client:t,paymaster:a,paymasterContext:i,userOperation:o}).extend(n3)}({client:s,transport:(0,tJ.d)(n)});return{client:s,bundlerClient:o}}function ry(e,t){rd.setState(n=>({...n,[e]:{client:t.client,bundlerClient:t.bundlerClient}}))}function rb(e){let t=rd.getState()[e]?.client;if(t)return t;let n=function(e){let t=rp(e),n=rf.get(e);if(t)return rh({chainId:e,rpcUrl:t,viemChain:n})}(e);if(n)return ry(e,n),n.client}let rg=p(()=>({correlationIds:new Map})),rv={get:e=>rg.getState().correlationIds.get(e),set:(e,t)=>{rg.setState(n=>{let r=new Map(n.correlationIds);return r.set(e,t),{correlationIds:r}})},delete:e=>{rg.setState(t=>{let n=new Map(t.correlationIds);return n.delete(e),{correlationIds:n}})},clear:()=>{rg.setState({correlationIds:new Map})}};var rw=n(4012),rx=n(93610);function rk(e){if("object"!=typeof e||null===e)throw R.rpc.internal("sub account info is not an object");if(!("address"in e))throw R.rpc.internal("sub account is invalid");if("address"in e&&"string"==typeof e.address&&!(0,rw.U)(e.address))throw R.rpc.internal("sub account address is invalid");if("factory"in e&&"string"==typeof e.factory&&!(0,rw.U)(e.factory))throw R.rpc.internal("sub account factory address is invalid");if("factoryData"in e&&"string"==typeof e.factoryData&&!(0,rx.v)(e.factoryData))throw R.rpc.internal("sub account factory data is invalid")}async function rE(){return crypto.subtle.generateKey({name:"ECDH",namedCurve:"P-256"},!0,["deriveKey"])}async function rA(e,t){return crypto.subtle.deriveKey({name:"ECDH",public:t},e,{name:"AES-GCM",length:256},!1,["encrypt","decrypt"])}async function rC(e,t){let n=crypto.getRandomValues(new Uint8Array(12)),r=await crypto.subtle.encrypt({name:"AES-GCM",iv:n},e,new TextEncoder().encode(t));return{iv:n,cipherText:r}}async function rS(e,{iv:t,cipherText:n}){let r=await crypto.subtle.decrypt({name:"AES-GCM",iv:t},e,n);return new TextDecoder().decode(r)}function rP(e){switch(e){case"public":return"spki";case"private":return"pkcs8"}}async function rO(e,t){let n=rP(e);return[...new Uint8Array(await crypto.subtle.exportKey(n,t))].map(e=>e.toString(16).padStart(2,"0")).join("")}async function rI(e,t){let n=rP(e),r=new Uint8Array(t.match(/.{1,2}/g).map(e=>Number.parseInt(e,16))).buffer;return await crypto.subtle.importKey(n,new Uint8Array(r),{name:"ECDH",namedCurve:"P-256"},!0,"private"===e?["deriveKey"]:[])}async function rT(e,t){return rC(t,JSON.stringify(e,(e,t)=>t instanceof Error?{...t.code?{code:t.code}:{},message:t.message}:t))}async function rB(e,t){return JSON.parse(await rS(t,e))}async function rU(e,t){let n={...e,jsonrpc:"2.0",id:crypto.randomUUID()},r=await fetch(t,{method:"POST",body:JSON.stringify(n),mode:"cors",headers:{"Content-Type":"application/json","X-Cbw-Sdk-Version":u,"X-Cbw-Sdk-Platform":c}}),{result:a,error:i}=await r.json();if(i)throw i;return a}let r_="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0;function rj(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name}function rN(e){if(!Number.isSafeInteger(e)||e<0)throw Error("positive integer expected, got "+e)}function rR(e,...t){if(!rj(e))throw Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw Error("Uint8Array expected of length "+t+", got length="+e.length)}function rD(e){if("function"!=typeof e||"function"!=typeof e.create)throw Error("Hash should be wrapped by utils.createHasher");rN(e.outputLen),rN(e.blockLen)}function rF(e,t=!0){if(e.destroyed)throw Error("Hash instance has been destroyed");if(t&&e.finished)throw Error("Hash#digest() has already been called")}function rM(...e){for(let t=0;t>>t}let rq="function"==typeof Uint8Array.from([]).toHex&&"function"==typeof Uint8Array.fromHex,rH=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function rz(e){if(rR(e),rq)return e.toHex();let t="";for(let n=0;n=rK._0&&e<=rK._9?e-rK._0:e>=rK.A&&e<=rK.F?e-(rK.A-10):e>=rK.a&&e<=rK.f?e-(rK.a-10):void 0}function rZ(e){if("string"!=typeof e)throw Error("hex string expected, got "+typeof e);if(rq)return Uint8Array.fromHex(e);let t=e.length,n=t/2;if(t%2)throw Error("hex string expected, got unpadded hex of length "+t);let r=new Uint8Array(n);for(let t=0,a=0;te().update(rW(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function rX(e=32){if(r_&&"function"==typeof r_.getRandomValues)return r_.getRandomValues(new Uint8Array(e));if(r_&&"function"==typeof r_.randomBytes)return Uint8Array.from(r_.randomBytes(e));throw Error("crypto.getRandomValues must be defined")}class r$ extends rY{constructor(e,t,n,r){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=r,this.buffer=new Uint8Array(e),this.view=rL(this.buffer)}update(e){rF(this),rR(e=rW(e));let{view:t,buffer:n,blockLen:r}=this,a=e.length;for(let i=0;ir-i&&(this.process(n,0),i=0);for(let e=i;e>a&i),o=Number(n&i),c=r?4:0,u=r?0:4;e.setUint32(t+c,s,r),e.setUint32(t+u,o,r)}(n,r-8,BigInt(8*this.length),a),this.process(n,0);let s=rL(e),o=this.outputLen;if(o%4)throw Error("_sha2: outputLen should be aligned to 32bit");let c=o/4,u=this.get();if(c>u.length)throw Error("_sha2: outputLen bigger than state");for(let e=0;ee>>>n,r4=(e,t,n)=>e<<32-n|t>>>n,r7=(e,t,n)=>e>>>n|t<<32-n,r8=(e,t,n)=>e<<32-n|t>>>n,r9=(e,t,n)=>e<<64-n|t>>>n-32,ae=(e,t,n)=>e>>>n-32|t<<64-n;function at(e,t,n,r){let a=(t>>>0)+(r>>>0);return{h:e+n+(a/4294967296|0)|0,l:0|a}}let an=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0),ar=(e,t,n,r)=>t+n+r+(e/4294967296|0)|0,aa=(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0),ai=(e,t,n,r,a)=>t+n+r+a+(e/4294967296|0)|0,as=(e,t,n,r,a)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(a>>>0),ao=(e,t,n,r,a,i)=>t+n+r+a+i+(e/4294967296|0)|0,ac=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),au=new Uint32Array(64);class al extends r${constructor(e=32){super(64,e,8,!1),this.A=0|r0[0],this.B=0|r0[1],this.C=0|r0[2],this.D=0|r0[3],this.E=0|r0[4],this.F=0|r0[5],this.G=0|r0[6],this.H=0|r0[7]}get(){let{A:e,B:t,C:n,D:r,E:a,F:i,G:s,H:o}=this;return[e,t,n,r,a,i,s,o]}set(e,t,n,r,a,i,s,o){this.A=0|e,this.B=0|t,this.C=0|n,this.D=0|r,this.E=0|a,this.F=0|i,this.G=0|s,this.H=0|o}process(e,t){for(let n=0;n<16;n++,t+=4)au[n]=e.getUint32(t,!1);for(let e=16;e<64;e++){let t=au[e-15],n=au[e-2],r=rG(t,7)^rG(t,18)^t>>>3,a=rG(n,17)^rG(n,19)^n>>>10;au[e]=a+au[e-7]+r+au[e-16]|0}let{A:n,B:r,C:a,D:i,E:s,F:o,G:c,H:u}=this;for(let e=0;e<64;e++){var l,d,f,p;let t=u+(rG(s,6)^rG(s,11)^rG(s,25))+((l=s)&o^~l&c)+ac[e]+au[e]|0,m=(rG(n,2)^rG(n,13)^rG(n,22))+((d=n)&(f=r)^d&(p=a)^f&p)|0;u=c,c=o,o=s,s=i+t|0,i=a,a=r,r=n,n=t+m|0}n=n+this.A|0,r=r+this.B|0,a=a+this.C|0,i=i+this.D|0,s=s+this.E|0,o=o+this.F|0,c=c+this.G|0,u=u+this.H|0,this.set(n,r,a,i,s,o,c,u)}roundClean(){rM(au)}destroy(){this.set(0,0,0,0,0,0,0,0),rM(this.buffer)}}let ad=function(e,t=!1){let n=e.length,r=new Uint32Array(n),a=new Uint32Array(n);for(let i=0;i>r6&r3)}:{h:0|Number(e>>r6&r3),l:0|Number(e&r3)}}(e[i],t);[r[i],a[i]]=[n,s]}return[r,a]}(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))),af=ad[0],ap=ad[1],am=new Uint32Array(80),ah=new Uint32Array(80);class ay extends r${constructor(e=64){super(128,e,16,!1),this.Ah=0|r2[0],this.Al=0|r2[1],this.Bh=0|r2[2],this.Bl=0|r2[3],this.Ch=0|r2[4],this.Cl=0|r2[5],this.Dh=0|r2[6],this.Dl=0|r2[7],this.Eh=0|r2[8],this.El=0|r2[9],this.Fh=0|r2[10],this.Fl=0|r2[11],this.Gh=0|r2[12],this.Gl=0|r2[13],this.Hh=0|r2[14],this.Hl=0|r2[15]}get(){let{Ah:e,Al:t,Bh:n,Bl:r,Ch:a,Cl:i,Dh:s,Dl:o,Eh:c,El:u,Fh:l,Fl:d,Gh:f,Gl:p,Hh:m,Hl:h}=this;return[e,t,n,r,a,i,s,o,c,u,l,d,f,p,m,h]}set(e,t,n,r,a,i,s,o,c,u,l,d,f,p,m,h){this.Ah=0|e,this.Al=0|t,this.Bh=0|n,this.Bl=0|r,this.Ch=0|a,this.Cl=0|i,this.Dh=0|s,this.Dl=0|o,this.Eh=0|c,this.El=0|u,this.Fh=0|l,this.Fl=0|d,this.Gh=0|f,this.Gl=0|p,this.Hh=0|m,this.Hl=0|h}process(e,t){for(let n=0;n<16;n++,t+=4)am[n]=e.getUint32(t),ah[n]=e.getUint32(t+=4);for(let e=16;e<80;e++){let t=0|am[e-15],n=0|ah[e-15],r=r7(t,n,1)^r7(t,n,8)^r5(t,n,7),a=r8(t,n,1)^r8(t,n,8)^r4(t,n,7),i=0|am[e-2],s=0|ah[e-2],o=r7(i,s,19)^r9(i,s,61)^r5(i,s,6),c=aa(a,r8(i,s,19)^ae(i,s,61)^r4(i,s,6),ah[e-7],ah[e-16]),u=ai(c,r,o,am[e-7],am[e-16]);am[e]=0|u,ah[e]=0|c}let{Ah:n,Al:r,Bh:a,Bl:i,Ch:s,Cl:o,Dh:c,Dl:u,Eh:l,El:d,Fh:f,Fl:p,Gh:m,Gl:h,Hh:y,Hl:b}=this;for(let e=0;e<80;e++){let t=r7(l,d,14)^r7(l,d,18)^r9(l,d,41),g=r8(l,d,14)^r8(l,d,18)^ae(l,d,41),v=l&f^~l&m,w=as(b,g,d&p^~d&h,ap[e],ah[e]),x=ao(w,y,t,v,af[e],am[e]),k=0|w,E=r7(n,r,28)^r9(n,r,34)^r9(n,r,39),A=r8(n,r,28)^ae(n,r,34)^ae(n,r,39),C=n&a^n&s^a&s,S=r&i^r&o^i&o;y=0|m,b=0|h,m=0|f,h=0|p,f=0|l,p=0|d,({h:l,l:d}=at(0|c,0|u,0|x,0|k)),c=0|s,u=0|o,s=0|a,o=0|i,a=0|n,i=0|r;let P=an(k,A,S);n=ar(P,x,E,C),r=0|P}({h:n,l:r}=at(0|this.Ah,0|this.Al,0|n,0|r)),({h:a,l:i}=at(0|this.Bh,0|this.Bl,0|a,0|i)),({h:s,l:o}=at(0|this.Ch,0|this.Cl,0|s,0|o)),({h:c,l:u}=at(0|this.Dh,0|this.Dl,0|c,0|u)),({h:l,l:d}=at(0|this.Eh,0|this.El,0|l,0|d)),({h:f,l:p}=at(0|this.Fh,0|this.Fl,0|f,0|p)),({h:m,l:h}=at(0|this.Gh,0|this.Gl,0|m,0|h)),({h:y,l:b}=at(0|this.Hh,0|this.Hl,0|y,0|b)),this.set(n,r,a,i,s,o,c,u,l,d,f,p,m,h,y,b)}roundClean(){rM(am,ah)}destroy(){rM(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}class ab extends ay{constructor(){super(48),this.Ah=0|r1[0],this.Al=0|r1[1],this.Bh=0|r1[2],this.Bl=0|r1[3],this.Ch=0|r1[4],this.Cl=0|r1[5],this.Dh=0|r1[6],this.Dl=0|r1[7],this.Eh=0|r1[8],this.El=0|r1[9],this.Fh=0|r1[10],this.Fl=0|r1[11],this.Gh=0|r1[12],this.Gl=0|r1[13],this.Hh=0|r1[14],this.Hl=0|r1[15]}}let ag=rQ(()=>new al),av=rQ(()=>new ay),aw=rQ(()=>new ab);class ax extends rY{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,rD(e);let n=rW(t);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let r=this.blockLen,a=new Uint8Array(r);a.set(n.length>r?e.create().update(n).digest():n);for(let e=0;enew ax(e,t).update(n).digest();ak.create=(e,t)=>new ax(e,t);let aE=BigInt(0),aA=BigInt(1);function aC(e,t=""){if("boolean"!=typeof e)throw Error((t&&`"${t}"`)+"expected boolean, got type="+typeof e);return e}function aS(e,t,n=""){let r=rj(e),a=e?.length,i=void 0!==t;if(!r||i&&a!==t)throw Error((n&&`"${n}" `)+"expected Uint8Array"+(i?` of length ${t}`:"")+", got "+(r?`length=${a}`:`type=${typeof e}`));return e}function aP(e){let t=e.toString(16);return 1&t.length?"0"+t:t}function aO(e){if("string"!=typeof e)throw Error("hex string expected, got "+typeof e);return""===e?aE:BigInt("0x"+e)}function aI(e){return rR(e),aO(rz(Uint8Array.from(e).reverse()))}function aT(e,t){return rZ(e.toString(16).padStart(2*t,"0"))}function aB(e,t){return aT(e,t).reverse()}function aU(e,t,n){let r;if("string"==typeof t)try{r=rZ(t)}catch(t){throw Error(e+" must be hex string or Uint8Array, cause: "+t)}else if(rj(t))r=Uint8Array.from(t);else throw Error(e+" must be hex string or Uint8Array");let a=r.length;if("number"==typeof n&&a!==n)throw Error(e+" of length "+n+" expected, got "+a);return r}let a_=e=>"bigint"==typeof e&&aE<=e;function aj(e){let t;for(t=0;e>aE;e>>=aA,t+=1);return t}let aN=e=>(aA<r(e,t,!1)),Object.entries(n).forEach(([e,t])=>r(e,t,!0))}function aD(e){let t=new WeakMap;return(n,...r)=>{let a=t.get(n);if(void 0!==a)return a;let i=e(n,...r);return t.set(n,i),i}}let aF=BigInt(0),aM=BigInt(1),aL=BigInt(2),aG=BigInt(3),aq=BigInt(4),aH=BigInt(5),az=BigInt(7),aK=BigInt(8),aV=BigInt(9),aZ=BigInt(16);function aW(e,t){let n=e%t;return n>=aF?n:t+n}function aJ(e,t){if(e===aF)throw Error("invert: expected non-zero number");if(t<=aF)throw Error("invert: expected positive modulus, got "+t);let n=aW(e,t),r=t,a=aF,i=aM,s=aM,o=aF;for(;n!==aF;){let e=r/n,t=r%n,c=a-s*e,u=i-o*e;r=n,n=t,a=s,i=o,s=c,o=u}if(r!==aM)throw Error("invert: does not exist");return aW(a,t)}function aY(e,t,n){if(!e.eql(e.sqr(t),n))throw Error("Cannot find square root")}function aQ(e,t){let n=(e.ORDER+aM)/aq,r=e.pow(t,n);return aY(e,r,t),r}function aX(e,t){let n=(e.ORDER-aH)/aK,r=e.mul(t,aL),a=e.pow(r,n),i=e.mul(t,a),s=e.mul(e.mul(i,aL),a),o=e.mul(i,e.sub(s,e.ONE));return aY(e,o,t),o}function a$(e){if(e1e3)throw Error("Cannot find square root: probably non-prime P");if(1===n)return aQ;let i=a.pow(r,t),s=(t+aM)/aL;return function(e,r){if(e.is0(r))return r;if(1!==a2(e,r))throw Error("Cannot find square root");let a=n,o=e.mul(e.ONE,i),c=e.pow(r,t),u=e.pow(r,s);for(;!e.eql(c,e.ONE);){if(e.is0(c))return e.ZERO;let t=1,n=e.sqr(c);for(;!e.eql(n,e.ONE);)if(t++,n=e.sqr(n),t===a)throw Error("Cannot find square root");let r=aM<e.is0(n)?t:(r[a]=t,e.mul(t,n)),e.ONE),i=e.inv(a);return t.reduceRight((t,n,a)=>e.is0(n)?t:(r[a]=e.mul(t,r[a]),e.mul(t,n)),i),r}function a2(e,t){let n=(e.ORDER-aM)/aL,r=e.pow(t,n),a=e.eql(r,e.ONE),i=e.eql(r,e.ZERO),s=e.eql(r,e.neg(e.ONE));if(!a&&!i&&!s)throw Error("invalid Legendre symbol result");return a?1:i?0:-1}function a3(e,t){void 0!==t&&rN(t);let n=void 0!==t?t:e.toString(2).length;return{nBitLength:n,nByteLength:Math.ceil(n/8)}}function a6(e,t,n=!1,r={}){let a,i,s,o;if(e<=aF)throw Error("invalid field: expected ORDER > 0, got "+e);let c=!1;if("object"==typeof t&&null!=t){if(r.sqrt||n)throw Error("cannot specify opts in two arguments");t.BITS&&(i=t.BITS),t.sqrt&&(s=t.sqrt),"boolean"==typeof t.isLE&&(n=t.isLE),"boolean"==typeof t.modFromBytes&&(c=t.modFromBytes),o=t.allowedLengths}else"number"==typeof t&&(i=t),r.sqrt&&(s=r.sqrt);let{nBitLength:u,nByteLength:l}=a3(e,i);if(l>2048)throw Error("invalid field: expected ORDER of <= 2048 bytes");let d=Object.freeze({ORDER:e,isLE:n,BITS:u,BYTES:l,MASK:aN(u),ZERO:aF,ONE:aM,allowedLengths:o,create:t=>aW(t,e),isValid:t=>{if("bigint"!=typeof t)throw Error("invalid field element: expected bigint, got "+typeof t);return aF<=t&&te===aF,isValidNot0:e=>!d.is0(e)&&d.isValid(e),isOdd:e=>(e&aM)===aM,neg:t=>aW(-t,e),eql:(e,t)=>e===t,sqr:t=>aW(t*t,e),add:(t,n)=>aW(t+n,e),sub:(t,n)=>aW(t-n,e),mul:(t,n)=>aW(t*n,e),pow:(e,t)=>(function(e,t,n){if(naF;)n&aM&&(r=e.mul(r,a)),a=e.sqr(a),n>>=aM;return r})(d,e,t),div:(t,n)=>aW(t*aJ(n,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>aJ(t,e),sqrt:s||(t=>(!a&&(a=e%aq===aG?aQ:e%aK===aH?aX:e%aZ===aV?function(e){let t=a6(e),n=a$(e),r=n(t,t.neg(t.ONE)),a=n(t,r),i=n(t,t.neg(r)),s=(e+az)/aZ;return(e,t)=>{let n=e.pow(t,s),o=e.mul(n,r),c=e.mul(n,a),u=e.mul(n,i),l=e.eql(e.sqr(o),t),d=e.eql(e.sqr(c),t);n=e.cmov(n,o,l),o=e.cmov(u,c,d);let f=e.eql(e.sqr(o),t),p=e.cmov(n,o,f);return aY(e,p,t),p}}(e):a$(e)),a(d,t))),toBytes:e=>n?aB(e,l):aT(e,l),fromBytes:(t,r=!0)=>{if(o){if(!o.includes(t.length)||t.length>l)throw Error("Field.fromBytes: expected "+o+" bytes, got "+t.length);let e=new Uint8Array(l);e.set(t,n?0:e.length-t.length),t=e}if(t.length!==l)throw Error("Field.fromBytes: expected "+l+" bytes, got "+t.length);let a=n?aI(t):aO(rz(t));if(c&&(a=aW(a,e)),!r&&!d.isValid(a))throw Error("invalid field element: outside of range 0..ORDER");return a},invertBatch:e=>a1(d,e),cmov:(e,t,n)=>n?t:e});return Object.freeze(d)}function a5(e){if("bigint"!=typeof e)throw Error("field order must be bigint");return Math.ceil(e.toString(2).length/8)}function a4(e){let t=a5(e);return t+Math.ceil(t/2)}let a7=BigInt(0),a8=BigInt(1);function a9(e,t){let n=t.negate();return e?n:t}function ie(e,t){let n=a1(e.Fp,t.map(e=>e.Z));return t.map((t,r)=>e.fromAffine(t.toAffine(n[r])))}function it(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw Error("invalid window size, expected [1.."+t+"], got W="+e)}function ir(e,t){it(e,t);let n=Math.ceil(t/e)+1,r=2**(e-1),a=2**e;return{windows:n,windowSize:r,mask:aN(e),maxNumber:a,shiftBy:BigInt(e)}}function ia(e,t,n){let{windowSize:r,mask:a,maxNumber:i,shiftBy:s}=n,o=Number(e&a),c=e>>s;o>r&&(o-=i,c+=a8);let u=t*r,l=u+Math.abs(o)-1;return{nextN:c,offset:l,isZero:0===o,isNeg:o<0,isNegF:t%2!=0,offsetF:u}}let ii=new WeakMap,is=new WeakMap;function io(e){return is.get(e)||1}function ic(e){if(e!==a7)throw Error("invalid wNAF")}class iu{constructor(e,t){this.BASE=e.BASE,this.ZERO=e.ZERO,this.Fn=e.Fn,this.bits=t}_unsafeLadder(e,t,n=this.ZERO){let r=e;for(;t>a7;)t&a8&&(n=n.add(r)),r=r.double(),t>>=a8;return n}precomputeWindow(e,t){let{windows:n,windowSize:r}=ir(t,this.bits),a=[],i=e,s=i;for(let e=0;e(e[t]="function",e),{ORDER:"bigint",MASK:"bigint",BYTES:"number",BITS:"number"})),t}let id=(e,t)=>(e+(e>=0?t:-t)/iv)/t;function ip(e){if(!["compact","recovered","der"].includes(e))throw Error('Signature format must be "compact", "recovered", or "der"');return e}function im(e,t){let n={};for(let r of Object.keys(t))n[r]=void 0===e[r]?t[r]:e[r];return aC(n.lowS,"lowS"),aC(n.prehash,"prehash"),void 0!==n.format&&ip(n.format),n}class ih extends Error{constructor(e=""){super(e)}}let iy={Err:ih,_tlv:{encode:(e,t)=>{let{Err:n}=iy;if(e<0||e>256)throw new n("tlv.encode: wrong tag");if(1&t.length)throw new n("tlv.encode: unpadded data");let r=t.length/2,a=aP(r);if(a.length/2&128)throw new n("tlv.encode: long form length too big");let i=r>127?aP(a.length/2|128):"";return aP(e)+i+a+t},decode(e,t){let{Err:n}=iy,r=0;if(e<0||e>256)throw new n("tlv.encode: wrong tag");if(t.length<2||t[r++]!==e)throw new n("tlv.decode: wrong tlv");let a=t[r++],i=0;if(128&a){let e=127&a;if(!e)throw new n("tlv.decode(long): indefinite length not supported");if(e>4)throw new n("tlv.decode(long): byte length is too big");let s=t.subarray(r,r+e);if(s.length!==e)throw new n("tlv.decode: length bytes not complete");if(0===s[0])throw new n("tlv.decode(long): zero leftmost byte");for(let e of s)i=i<<8|e;if(r+=e,i<128)throw new n("tlv.decode(long): not minimal encoding")}else i=a;let s=t.subarray(r,r+i);if(s.length!==i)throw new n("tlv.decode: wrong value length");return{v:s,l:t.subarray(r+i)}}},_int:{encode(e){let{Err:t}=iy;if(e(function(e){let{CURVE:t,curveOpts:n,hash:r,ecdsaOpts:a}=function(e){let{CURVE:t,curveOpts:n}=function(e){let t={a:e.a,b:e.b,p:e.Fp.ORDER,n:e.n,h:e.h,Gx:e.Gx,Gy:e.Gy},n=e.Fp,r=e.allowedPrivateKeyLengths?Array.from(new Set(e.allowedPrivateKeyLengths.map(e=>Math.ceil(e/2)))):void 0,a={Fp:n,Fn:a6(t.n,{BITS:e.nBitLength,allowedLengths:r,modFromBytes:e.wrapPrivateKey}),allowInfinityPoint:e.allowInfinityPoint,endo:e.endo,isTorsionFree:e.isTorsionFree,clearCofactor:e.clearCofactor,fromBytes:e.fromBytes,toBytes:e.toBytes};return{CURVE:t,curveOpts:a}}(e),r={hmac:e.hmac,randomBytes:e.randomBytes,lowS:e.lowS,bits2int:e.bits2int,bits2int_modN:e.bits2int_modN};return{CURVE:t,curveOpts:n,hash:e.hash,ecdsaOpts:r}}(e);return function(e,t){let n=t.Point;return Object.assign({},t,{ProjectivePoint:n,CURVE:Object.assign({},e,a3(n.Fn.ORDER,n.Fn.BITS))})}(e,function(e,t,n={}){rD(t),aR(n,{},{hmac:"function",lowS:"boolean",randomBytes:"function",bits2int:"function",bits2int_modN:"function"});let r=n.randomBytes||rX,a=n.hmac||((e,...n)=>ak(t,e,rJ(...n))),{Fp:i,Fn:s}=e,{ORDER:o,BITS:c}=s,{keygen:u,getPublicKey:l,getSharedSecret:d,utils:f,lengths:p}=function(e,t={}){let{Fn:n}=e,r=t.randomBytes||rX,a=Object.assign(iA(e.Fp,n),{seed:a4(n.ORDER)});function i(e){try{return!!ik(n,e)}catch(e){return!1}}function s(e=r(a.seed)){return function(e,t,n=!1){let r=e.length,a=a5(t),i=a4(t);if(r<16||r1024)throw Error("expected "+i+"-1024 bytes of input, got "+r);let s=aW(n?aI(e):aO(rz(e)),t-aM)+aM;return n?aB(s,a):aT(s,a)}(aS(e,a.seed,"seed"),n.ORDER)}function o(t,r=!0){return e.BASE.multiply(ik(n,t)).toBytes(r)}function c(t){if("bigint"==typeof t)return!1;if(t instanceof e)return!0;let{secretKey:r,publicKey:i,publicKeyUncompressed:s}=a;if(n.allowedLengths||r===i)return;let o=aU("key",t).length;return o===i||o===s}return Object.freeze({getPublicKey:o,getSharedSecret:function(t,r,a=!0){if(!0===c(t))throw Error("first arg must be private key");if(!1===c(r))throw Error("second arg must be public key");let i=ik(n,t);return e.fromHex(r).multiply(i).toBytes(a)},keygen:function(e){let t=s(e);return{secretKey:t,publicKey:o(t)}},Point:e,utils:{isValidSecretKey:i,isValidPublicKey:function(t,n){let{publicKey:r,publicKeyUncompressed:i}=a;try{let a=t.length;if(!0===n&&a!==r||!1===n&&a!==i)return!1;return!!e.fromBytes(t)}catch(e){return!1}},randomSecretKey:s,isValidPrivateKey:i,randomPrivateKey:s,normPrivateKeyToScalar:e=>ik(n,e),precompute:(t=8,n=e.BASE)=>n.precompute(t,!1)},lengths:a})}(e,n),m={prehash:!1,lowS:"boolean"==typeof n.lowS&&n.lowS,format:void 0,extraEntropy:!1},h="compact";function y(e,t){if(!s.isValidNot0(t))throw Error(`invalid signature ${e}: out of range 1..Point.Fn.ORDER`);return t}class b{constructor(e,t,n){this.r=y("r",e),this.s=y("s",t),null!=n&&(this.recovery=n),Object.freeze(this)}static fromBytes(e,t=h){let n;if(!function(e,t){ip(t);let n=p.signature;aS(e,"compact"===t?n:"recovered"===t?n+1:void 0,`${t} signature`)}(e,t),"der"===t){let{r:t,s:n}=iy.toSig(aS(e));return new b(t,n)}"recovered"===t&&(n=e[0],t="compact",e=e.subarray(1));let r=s.BYTES,a=e.subarray(0,r),i=e.subarray(r,2*r);return new b(s.fromBytes(a),s.fromBytes(i),n)}static fromHex(e,t){return this.fromBytes(rZ(e),t)}addRecoveryBit(e){return new b(this.r,this.s,e)}recoverPublicKey(t){let n=i.ORDER,{r,s:a,recovery:c}=this;if(null==c||![0,1,2,3].includes(c))throw Error("recovery id invalid");if(o*iv1)throw Error("recovery id is ambiguous for h>1 curve");let u=2===c||3===c?r+o:r;if(!i.isValid(u))throw Error("recovery id 2 or 3 invalid");let l=i.toBytes(u),d=e.fromBytes(rJ(iE((1&c)==0),l)),f=s.inv(u),p=v(aU("msgHash",t)),m=s.create(-p*f),h=s.create(a*f),y=e.BASE.multiplyUnsafe(m).add(d.multiplyUnsafe(h));if(y.is0())throw Error("point at infinify");return y.assertValidity(),y}hasHighS(){return this.s>o>>ig}toBytes(e=h){if(ip(e),"der"===e)return rZ(iy.hexFromSig(this));let t=s.toBytes(this.r),n=s.toBytes(this.s);if("recovered"===e){if(null==this.recovery)throw Error("recovery bit must be present");return rJ(Uint8Array.of(this.recovery),t,n)}return rJ(t,n)}toHex(e){return rz(this.toBytes(e))}assertValidity(){}static fromCompact(e){return b.fromBytes(aU("sig",e),"compact")}static fromDER(e){return b.fromBytes(aU("sig",e),"der")}normalizeS(){return this.hasHighS()?new b(this.r,s.neg(this.s),this.recovery):this}toDERRawBytes(){return this.toBytes("der")}toDERHex(){return rz(this.toBytes("der"))}toCompactRawBytes(){return this.toBytes("compact")}toCompactHex(){return rz(this.toBytes("compact"))}}let g=n.bits2int||function(e){if(e.length>8192)throw Error("input is too large");let t=aO(rz(e)),n=8*e.length-c;return n>0?t>>BigInt(n):t},v=n.bits2int_modN||function(e){return s.create(g(e))},w=aN(c);function x(e){return!function(e,t,n,r){if(!(a_(t)&&a_(n)&&a_(r))||!(n<=t)||!(te in a))throw Error("sign() legacy options not supported");let{lowS:i,prehash:c,extraEntropy:u}=im(a,m),l=v(t=k(t,c)),d=ik(s,n),f=[x(d),x(l)];if(null!=u&&!1!==u){let e=!0===u?r(p.secretKey):u;f.push(aU("extraEntropy",e))}return{seed:rJ(...f),k2sig:function(t){let n=g(t);if(!s.isValidNot0(n))return;let r=s.inv(n),a=e.BASE.multiply(n).toAffine(),c=s.create(a.x);if(c===ib)return;let u=s.create(r*s.create(l+c*d));if(u===ib)return;let f=(a.x===c?0:2)|Number(a.y&ig),p=u;return i&&u>o>>ig&&(p=s.neg(u),f^=1),new b(c,p,f)}}}(n=aU("message",n),i,c);return(function(e,t,n){if("number"!=typeof e||e<2)throw Error("hashLen must be a number");if("number"!=typeof t||t<2)throw Error("qByteLen must be a number");if("function"!=typeof n)throw Error("hmacFn must be a function");let r=e=>new Uint8Array(e),a=e=>Uint8Array.of(e),i=r(e),s=r(e),o=0,c=()=>{i.fill(1),s.fill(0),o=0},u=(...e)=>n(s,i,...e),l=(e=r(0))=>{s=u(a(0),e),i=u(),0!==e.length&&(s=u(a(1),e),i=u())},d=()=>{if(o++>=1e3)throw Error("drbg: tried 1000 values");let e=0,n=[];for(;e{let n;for(c(),l(e);!(n=t(d()));)l();return c(),n}})(t.outputLen,s.BYTES,a)(u,l)},verify:function(t,n,r,a={}){let{lowS:i,prehash:o,format:c}=im(a,m);if(r=aU("publicKey",r),n=k(aU("message",n),o),"strict"in a)throw Error("options.strict was renamed to lowS");let u=void 0===c?function(e){let t;let n="string"==typeof e||rj(e),r=!n&&null!==e&&"object"==typeof e&&"bigint"==typeof e.r&&"bigint"==typeof e.s;if(!n&&!r)throw Error("invalid signature, expected Uint8Array, hex string or Signature instance");if(r)t=new b(e.r,e.s);else if(n){try{t=b.fromBytes(aU("sig",e),"der")}catch(e){if(!(e instanceof iy.Err))throw e}if(!t)try{t=b.fromBytes(aU("sig",e),"compact")}catch(e){return!1}}return!!t&&t}(t):b.fromBytes(aU("sig",t),c);if(!1===u)return!1;try{let t=e.fromBytes(r);if(i&&u.hasHighS())return!1;let{r:a,s:o}=u,c=v(n),l=s.inv(o),d=s.create(c*l),f=s.create(a*l),p=e.BASE.multiplyUnsafe(d).add(t.multiplyUnsafe(f));if(p.is0())return!1;return s.create(p.x)===a}catch(e){return!1}},recoverPublicKey:function(e,t,n={}){let{prehash:r}=im(n,m);return t=k(t,r),b.fromBytes(e,"recovered").recoverPublicKey(t).toBytes()},Signature:b,hash:t})}(function(e,t={}){let n=function(e,t,n={},r){if(void 0===r&&(r="edwards"===e),!t||"object"!=typeof t)throw Error(`expected valid ${e} CURVE object`);for(let e of["p","n","h"]){let n=t[e];if(!("bigint"==typeof n&&n>a7))throw Error(`CURVE.${e} must be positive bigint`)}let a=il(t.p,n.Fp,r),i=il(t.n,n.Fn,r);for(let n of["Gx","Gy","a","weierstrass"===e?"b":"d"])if(!a.isValid(t[n]))throw Error(`CURVE.${n} must be valid field element of CURVE.Fp`);return{CURVE:t=Object.freeze(Object.assign({},t)),Fp:a,Fn:i}}("weierstrass",e,t),{Fp:r,Fn:a}=n,i=n.CURVE,{h:s,n:o}=i;aR(t,{},{allowInfinityPoint:"boolean",clearCofactor:"function",isTorsionFree:"function",fromBytes:"function",toBytes:"function",endo:"object",wrapPrivateKey:"boolean"});let{endo:c}=t;if(c&&(!r.is0(i.a)||"bigint"!=typeof c.beta||!Array.isArray(c.basises)))throw Error('invalid endo: expected "beta": bigint and "basises": array');let u=iA(r,a);function l(){if(!r.isOdd)throw Error("compression is not supported: Field does not have .isOdd()")}let d=t.toBytes||function(e,t,n){let{x:a,y:i}=t.toAffine(),s=r.toBytes(a);return(aC(n,"isCompressed"),n)?(l(),rJ(iE(!r.isOdd(i)),s)):rJ(Uint8Array.of(4),s,r.toBytes(i))},f=t.fromBytes||function(e){aS(e,void 0,"Point");let{publicKey:t,publicKeyUncompressed:n}=u,a=e.length,i=e[0],s=e.subarray(1);if(a===t&&(2===i||3===i)){let e;let t=r.fromBytes(s);if(!r.isValid(t))throw Error("bad point: is not on curve, wrong x");let n=p(t);try{e=r.sqrt(n)}catch(e){throw Error("bad point: is not on curve, sqrt error"+(e instanceof Error?": "+e.message:""))}return l(),(1&i)==1!==r.isOdd(e)&&(e=r.neg(e)),{x:t,y:e}}if(a===n&&4===i){let e=r.BYTES,t=r.fromBytes(s.subarray(0,e)),n=r.fromBytes(s.subarray(e,2*e));if(!m(t,n))throw Error("bad point: is not on curve");return{x:t,y:n}}throw Error(`bad point: got length ${a}, expected compressed=${t} or uncompressed=${n}`)};function p(e){let t=r.sqr(e),n=r.mul(t,e);return r.add(r.add(n,r.mul(e,i.a)),i.b)}function m(e,t){let n=r.sqr(t),a=p(e);return r.eql(n,a)}if(!m(i.Gx,i.Gy))throw Error("bad curve params: generator point");let h=r.mul(r.pow(i.a,iw),ix),y=r.mul(r.sqr(i.b),BigInt(27));if(r.is0(r.add(h,y)))throw Error("bad curve params: a or b");function b(e,t,n=!1){if(!r.isValid(t)||n&&r.is0(t))throw Error(`bad point coordinate ${e}`);return t}function g(e){if(!(e instanceof E))throw Error("ProjectivePoint expected")}function v(e){if(!c||!c.basises)throw Error("no endo");return function(e,t,n){let[[r,a],[i,s]]=t,o=id(s*e,n),c=id(-a*e,n),u=e-o*r-c*i,l=-o*a-c*s,d=u=p||l=p)throw Error("splitScalar (endomorphism): failed, k="+e);return{k1neg:d,k1:u,k2neg:f,k2:l}}(e,c.basises,a.ORDER)}let w=aD((e,t)=>{let{X:n,Y:a,Z:i}=e;if(r.eql(i,r.ONE))return{x:n,y:a};let s=e.is0();null==t&&(t=s?r.ONE:r.inv(i));let o=r.mul(n,t),c=r.mul(a,t),u=r.mul(i,t);if(s)return{x:r.ZERO,y:r.ZERO};if(!r.eql(u,r.ONE))throw Error("invZ was invalid");return{x:o,y:c}}),x=aD(e=>{if(e.is0()){if(t.allowInfinityPoint&&!r.is0(e.Y))return;throw Error("bad point: ZERO")}let{x:n,y:a}=e.toAffine();if(!r.isValid(n)||!r.isValid(a))throw Error("bad point: x or y not field elements");if(!m(n,a))throw Error("bad point: equation left != right");if(!e.isTorsionFree())throw Error("bad point: not in prime-order subgroup");return!0});function k(e,t,n,a,i){return n=new E(r.mul(n.X,e),n.Y,n.Z),t=a9(a,t),n=a9(i,n),t.add(n)}class E{constructor(e,t,n){this.X=b("x",e),this.Y=b("y",t,!0),this.Z=b("z",n),Object.freeze(this)}static CURVE(){return i}static fromAffine(e){let{x:t,y:n}=e||{};if(!e||!r.isValid(t)||!r.isValid(n))throw Error("invalid affine point");if(e instanceof E)throw Error("projective point not allowed");return r.is0(t)&&r.is0(n)?E.ZERO:new E(t,n,r.ONE)}static fromBytes(e){let t=E.fromAffine(f(aS(e,void 0,"point")));return t.assertValidity(),t}static fromHex(e){return E.fromBytes(aU("pointHex",e))}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(e=8,t=!0){return C.createCache(this,e),t||this.multiply(iw),this}assertValidity(){x(this)}hasEvenY(){let{y:e}=this.toAffine();if(!r.isOdd)throw Error("Field doesn't support isOdd");return!r.isOdd(e)}equals(e){g(e);let{X:t,Y:n,Z:a}=this,{X:i,Y:s,Z:o}=e,c=r.eql(r.mul(t,o),r.mul(i,a)),u=r.eql(r.mul(n,o),r.mul(s,a));return c&&u}negate(){return new E(this.X,r.neg(this.Y),this.Z)}double(){let{a:e,b:t}=i,n=r.mul(t,iw),{X:a,Y:s,Z:o}=this,c=r.ZERO,u=r.ZERO,l=r.ZERO,d=r.mul(a,a),f=r.mul(s,s),p=r.mul(o,o),m=r.mul(a,s);return m=r.add(m,m),l=r.mul(a,o),l=r.add(l,l),c=r.mul(e,l),u=r.mul(n,p),u=r.add(c,u),c=r.sub(f,u),u=r.add(f,u),u=r.mul(c,u),c=r.mul(m,c),l=r.mul(n,l),p=r.mul(e,p),m=r.sub(d,p),m=r.mul(e,m),m=r.add(m,l),l=r.add(d,d),d=r.add(l,d),d=r.add(d,p),d=r.mul(d,m),u=r.add(u,d),p=r.mul(s,o),p=r.add(p,p),d=r.mul(p,m),c=r.sub(c,d),l=r.mul(p,f),l=r.add(l,l),new E(c,u,l=r.add(l,l))}add(e){g(e);let{X:t,Y:n,Z:a}=this,{X:s,Y:o,Z:c}=e,u=r.ZERO,l=r.ZERO,d=r.ZERO,f=i.a,p=r.mul(i.b,iw),m=r.mul(t,s),h=r.mul(n,o),y=r.mul(a,c),b=r.add(t,n),v=r.add(s,o);b=r.mul(b,v),v=r.add(m,h),b=r.sub(b,v),v=r.add(t,a);let w=r.add(s,c);return v=r.mul(v,w),w=r.add(m,y),v=r.sub(v,w),w=r.add(n,a),u=r.add(o,c),w=r.mul(w,u),u=r.add(h,y),w=r.sub(w,u),d=r.mul(f,v),u=r.mul(p,y),d=r.add(u,d),u=r.sub(h,d),d=r.add(h,d),l=r.mul(u,d),h=r.add(m,m),h=r.add(h,m),y=r.mul(f,y),v=r.mul(p,v),h=r.add(h,y),y=r.sub(m,y),y=r.mul(f,y),v=r.add(v,y),m=r.mul(h,v),l=r.add(l,m),m=r.mul(w,v),u=r.mul(b,u),u=r.sub(u,m),m=r.mul(b,h),d=r.mul(w,d),new E(u,l,d=r.add(d,m))}subtract(e){return this.add(e.negate())}is0(){return this.equals(E.ZERO)}multiply(e){let n,r;let{endo:i}=t;if(!a.isValidNot0(e))throw Error("invalid scalar: out of range");let s=e=>C.cached(this,e,e=>ie(E,e));if(i){let{k1neg:t,k1:a,k2neg:o,k2:c}=v(e),{p:u,f:l}=s(a),{p:d,f:f}=s(c);r=l.add(f),n=k(i.beta,u,d,t,o)}else{let{p:t,f:a}=s(e);n=t,r=a}return ie(E,[n,r])[0]}multiplyUnsafe(e){let{endo:n}=t;if(!a.isValid(e))throw Error("invalid scalar: out of range");if(e===ib||this.is0())return E.ZERO;if(e===ig)return this;if(C.hasCache(this))return this.multiply(e);if(!n)return C.unsafe(this,e);{let{k1neg:t,k1:r,k2neg:a,k2:i}=v(e),{p1:s,p2:o}=function(e,t,n,r){let a=t,i=e.ZERO,s=e.ZERO;for(;n>a7||r>a7;)n&a8&&(i=i.add(a)),r&a8&&(s=s.add(a)),a=a.double(),n>>=a8,r>>=a8;return{p1:i,p2:s}}(E,this,r,i);return k(n.beta,s,o,t,a)}}multiplyAndAddUnsafe(e,t,n){let r=this.multiplyUnsafe(t).add(e.multiplyUnsafe(n));return r.is0()?void 0:r}toAffine(e){return w(this,e)}isTorsionFree(){let{isTorsionFree:e}=t;return s===ig||(e?e(E,this):C.unsafe(this,o).is0())}clearCofactor(){let{clearCofactor:e}=t;return s===ig?this:e?e(E,this):this.multiplyUnsafe(s)}isSmallOrder(){return this.multiplyUnsafe(s).is0()}toBytes(e=!0){return aC(e,"isCompressed"),this.assertValidity(),d(E,this,e)}toHex(e=!0){return rz(this.toBytes(e))}toString(){return``}get px(){return this.X}get py(){return this.X}get pz(){return this.Z}toRawBytes(e=!0){return this.toBytes(e)}_setWindowSize(e){this.precompute(e)}static normalizeZ(e){return ie(E,e)}static msm(e,t){return function(e,t,n,r){!function(e,t){if(!Array.isArray(e))throw Error("array expected");e.forEach((e,n)=>{if(!(e instanceof t))throw Error("invalid point at index "+n)})}(n,e),function(e,t){if(!Array.isArray(e))throw Error("array of scalars expected");e.forEach((e,n)=>{if(!t.isValid(e))throw Error("invalid scalar at index "+n)})}(r,t);let a=n.length,i=r.length;if(a!==i)throw Error("arrays of points and scalars must have equal length");let s=e.ZERO,o=aj(BigInt(a)),c=1;o>12?c=o-3:o>4?c=o-2:o>0&&(c=2);let u=aN(c),l=Array(Number(u)+1).fill(s),d=Math.floor((t.BITS-1)/c)*c,f=s;for(let e=d;e>=0;e-=c){l.fill(s);for(let t=0;t>BigInt(e)&u);l[a]=l[a].add(n[t])}let t=s;for(let e=l.length-1,n=s;e>0;e--)n=n.add(l[e]),t=t.add(n);if(f=f.add(t),0!==e)for(let e=0;e{if(t.cause instanceof i_){if(t.cause.details)return t.cause.details;if(t.cause.shortMessage)return t.cause.shortMessage}return t.cause?.message?t.cause.message:t.details})(),r=t.cause instanceof i_&&t.cause.docsPath||t.docsPath,a=`https://oxlib.sh${r??""}`;super([e||"An error occurred.",...t.metaMessages?["",...t.metaMessages]:[],...n||r?["",n?`Details: ${n}`:void 0,r?`See: ${a}`:void 0]:[]].filter(e=>"string"==typeof e).join("\n"),t.cause?{cause:t.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:"ox@0.1.1"}),this.cause=t.cause,this.details=n,this.docs=a,this.docsPath=r,this.shortMessage=e}walk(e){return function e(t,n){return n?.(t)?t:t&&"object"==typeof t&&"cause"in t&&t.cause?e(t.cause,n):n?null:t}(this,e)}}function ij(e,t,n){return JSON.stringify(e,(e,n)=>"function"==typeof t?t(e,n):"bigint"==typeof n?n.toString()+"#__bigint":n,n)}function iN(e,t){if(iV(e)>t)throw new iY({givenSize:iV(e),maxSize:t})}function iR(e,t={}){let{dir:n,size:r=32}=t;if(0===r)return e;let a=e.replace("0x","");if(a.length>2*r)throw new iX({size:Math.ceil(a.length/2),targetSize:r,type:"Hex"});return`0x${a["right"===n?"padEnd":"padStart"](2*r,"0")}`}let iD=new TextEncoder,iF=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function iM(...e){return`0x${e.reduce((e,t)=>e+t.replace("0x",""),"")}`}function iL(e){return e instanceof Uint8Array?iG(e):Array.isArray(e)?iG(new Uint8Array(e)):e}function iG(e,t={}){let n="";for(let t=0;tn||i0&&t>iV(e)-1)throw new iQ({offset:t,position:"start",size:iV(e)})}(e,t);let i=`0x${e.replace("0x","").slice((t??0)*2,(n??e.length)*2)}`;return a&&function(e,t,n){if("number"==typeof t&&"number"==typeof n&&iV(e)!==n-t)throw new iQ({offset:n,position:"end",size:iV(e)})}(i,t,n),i}function iV(e){return Math.ceil((e.length-2)/2)}class iZ extends i_{constructor({max:e,min:t,signed:n,size:r,value:a}){super(`Number \`${a}\` is not in safe${r?` ${8*r}-bit`:""}${n?" signed":" unsigned"} integer range ${e?`(\`${t}\` to \`${e}\`)`:`(above \`${t}\`)`}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.IntegerOutOfRangeError"})}}class iW extends i_{constructor(e){super(`Value \`${"object"==typeof e?ij(e):e}\` of type \`${typeof e}\` is an invalid hex type.`,{metaMessages:['Hex types must be represented as `"0x${string}"`.']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexTypeError"})}}class iJ extends i_{constructor(e){super(`Value \`${e}\` is an invalid hex value.`,{metaMessages:['Hex values must start with `"0x"` and contain only hexadecimal characters (0-9, a-f, A-F).']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexValueError"})}}class iY extends i_{constructor({givenSize:e,maxSize:t}){super(`Size cannot exceed \`${t}\` bytes. Given size: \`${e}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeOverflowError"})}}class iQ extends i_{constructor({offset:e,position:t,size:n}){super(`Slice ${"start"===t?"starting":"ending"} at offset \`${e}\` is out-of-bounds (size: \`${n}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SliceOffsetOutOfBoundsError"})}}class iX extends i_{constructor({size:e,targetSize:t,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (\`${e}\`) exceeds padding size (\`${t}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeExceedsPaddingSizeError"})}}let i$={zero:48,nine:57,A:65,F:70,a:97,f:102};function i0(e){return e>=i$.zero&&e<=i$.nine?e-i$.zero:e>=i$.A&&e<=i$.F?e-(i$.A-10):e>=i$.a&&e<=i$.f?e-(i$.a-10):void 0}function i1(e){return e instanceof Uint8Array?e:"string"==typeof e?i3(e):i2(e)}function i2(e){return e instanceof Uint8Array?e:new Uint8Array(e)}function i3(e,t={}){let{size:n}=t,r=e;n&&(iN(e,n),r=iz(e,n));let a=r.slice(2);a.length%2&&(a=`0${a}`);let i=a.length/2,s=new Uint8Array(i);for(let e=0,t=0;e0&&t>i6(e)-1)throw new i9({offset:t,position:"start",size:i6(e)})}(e,t);let i=e.slice(t,n);return a&&function(e,t,n){if("number"==typeof t&&"number"==typeof n&&i6(e)!==n-t)throw new i9({offset:n,position:"end",size:i6(e)})}(i,t,n),i}function i4(e,t={}){let{size:n}=t;return void 0!==n&&function(e,t){if(i6(e)>t)throw new i8({givenSize:i6(e),maxSize:t})}(e,n),function(e,t={}){let{signed:n}=t;t.size&&iN(e,t.size);let r=BigInt(e);if(!n)return r;let a=(1n<<8n*BigInt((e.length-2)/2))-1n;return r<=a>>1n?r:r-a-1n}(iG(e,t),t)}class i7 extends i_{constructor(e){super(`Value \`${"object"==typeof e?ij(e):e}\` of type \`${typeof e}\` is an invalid Bytes value.`,{metaMessages:["Bytes values must be of type `Bytes`."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.InvalidBytesTypeError"})}}class i8 extends i_{constructor({givenSize:e,maxSize:t}){super(`Size cannot exceed \`${t}\` bytes. Given size: \`${e}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeOverflowError"})}}class i9 extends i_{constructor({offset:e,position:t,size:n}){super(`Slice ${"start"===t?"starting":"ending"} at offset \`${e}\` is out-of-bounds (size: \`${n}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SliceOffsetOutOfBoundsError"})}}function se(e,t={}){let{compressed:n}=t,{prefix:r,x:a,y:i}=e;if(!1===n||"bigint"==typeof a&&"bigint"==typeof i){if(4!==r)throw new sa({prefix:r,cause:new ss});return}if(!0===n||"bigint"==typeof a&&void 0===i){if(3!==r&&2!==r)throw new sa({prefix:r,cause:new si});return}throw new sr({publicKey:e})}function st(e){if(132!==e.length&&130!==e.length&&68!==e.length)throw new so({publicKey:e});return 130===e.length?{prefix:4,x:BigInt(iK(e,0,32)),y:BigInt(iK(e,32,64))}:132===e.length?{prefix:Number(iK(e,0,1)),x:BigInt(iK(e,1,33)),y:BigInt(iK(e,33,65))}:{prefix:Number(iK(e,0,1)),x:BigInt(iK(e,1,33))}}function sn(e,t={}){se(e);let{prefix:n,x:r,y:a}=e,{includePrefix:i=!0}=t;return iM(i?iq(n,{size:1}):"0x",iq(r,{size:32}),"bigint"==typeof a?iq(a,{size:32}):"0x")}class sr extends i_{constructor({publicKey:e}){super(`Value \`${ij(e)}\` is not a valid public key.`,{metaMessages:["Public key must contain:","- an `x` and `prefix` value (compressed)","- an `x`, `y`, and `prefix` value (uncompressed)"]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidError"})}}class sa extends i_{constructor({prefix:e,cause:t}){super(`Prefix "${e}" is invalid.`,{cause:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidPrefixError"})}}class si extends i_{constructor(){super("Prefix must be 2 or 3 for compressed public keys."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidCompressedPrefixError"})}}class ss extends i_{constructor(){super("Prefix must be 4 for uncompressed public keys."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidUncompressedPrefixError"})}}class so extends i_{constructor({publicKey:e}){super(`Value \`${e}\` is an invalid public key size.`,{metaMessages:["Expected: 33 bytes (compressed + prefix), 64 bytes (uncompressed) or 65 bytes (uncompressed + prefix).",`Received ${iV(iL(e))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"PublicKey.InvalidSerializedSizeError"})}}async function sc(e={}){let{extractable:t=!1}=e,n=await globalThis.crypto.subtle.generateKey({name:"ECDSA",namedCurve:"P-256"},t,["sign","verify"]),r=function(e){let t=(()=>{if(function(e,t={}){let{strict:n=!1}=t;try{return!function(e,t={}){let{strict:n=!1}=t;if(!e||"string"!=typeof e)throw new iW(e);if(n&&!/^0x[0-9a-fA-F]*$/.test(e)||!e.startsWith("0x"))throw new iJ(e)}(e,{strict:n}),!0}catch{return!1}}(e))return st(e);if(function(e){try{return!function(e){if(!(e instanceof Uint8Array)&&(!e||"object"!=typeof e||!("BYTES_PER_ELEMENT"in e)||1!==e.BYTES_PER_ELEMENT||"Uint8Array"!==e.constructor.name))throw new i7(e)}(e),!0}catch{return!1}}(e))return st(iG(e));let{prefix:t,x:n,y:r}=e;return"bigint"==typeof n&&"bigint"==typeof r?{prefix:t??4,x:n,y:r}:{prefix:t,x:n}})();return se(t),t}(new Uint8Array(await globalThis.crypto.subtle.exportKey("raw",n.publicKey)));return{privateKey:n.privateKey,publicKey:r}}async function su(e){let{payload:t,privateKey:n}=e,r=i2(new Uint8Array(await globalThis.crypto.subtle.sign({name:"ECDSA",hash:"SHA-256"},n,i1(t)))),a=i4(i5(r,0,32)),i=i4(i5(r,32,64));return i>iU.CURVE.n/2n&&(i=iU.CURVE.n-i),{r:a,s:i}}let sl=new TextDecoder,sd=Object.fromEntries(Array.from("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/").map((e,t)=>[t,e.charCodeAt(0)]));function sf(e,...t){if(!(e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name))throw Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw Error("Uint8Array expected of length "+t+", got length="+e.length)}function sp(e,t=!0){if(e.destroyed)throw Error("Hash instance has been destroyed");if(t&&e.finished)throw Error("Hash#digest() has already been called")}function sm(...e){for(let t=0;t>>t}function sb(e){return"string"==typeof e&&(e=function(e){if("string"!=typeof e)throw Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}(e)),sf(e),e}({...Object.fromEntries(Array.from("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/").map((e,t)=>[e.charCodeAt(0),t]))});class sg{}class sv extends sg{constructor(e,t,n,r){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=r,this.buffer=new Uint8Array(e),this.view=sh(this.buffer)}update(e){sp(this),sf(e=sb(e));let{view:t,buffer:n,blockLen:r}=this,a=e.length;for(let i=0;ir-i&&(this.process(n,0),i=0);for(let e=i;e>a&i),o=Number(n&i),c=r?4:0,u=r?0:4;e.setUint32(t+c,s,r),e.setUint32(t+u,o,r)}(n,r-8,BigInt(8*this.length),a),this.process(n,0);let s=sh(e),o=this.outputLen;if(o%4)throw Error("_sha2: outputLen should be aligned to 32bit");let c=o/4,u=this.get();if(c>u.length)throw Error("_sha2: outputLen bigger than state");for(let e=0;e>>3,a=sy(n,17)^sy(n,19)^n>>>10;sA[e]=a+sA[e-7]+r+sA[e-16]|0}let{A:n,B:r,C:a,D:i,E:s,F:o,G:c,H:u}=this;for(let e=0;e<64;e++){var l,d,f,p;let t=u+(sy(s,6)^sy(s,11)^sy(s,25))+((l=s)&o^~l&c)+sE[e]+sA[e]|0,m=(sy(n,2)^sy(n,13)^sy(n,22))+((d=n)&(f=r)^d&(p=a)^f&p)|0;u=c,c=o,o=s,s=i+t|0,i=a,a=r,r=n,n=t+m|0}n=n+this.A|0,r=r+this.B|0,a=a+this.C|0,i=i+this.D|0,s=s+this.E|0,o=o+this.F|0,c=c+this.G|0,u=u+this.H|0,this.set(n,r,a,i,s,o,c,u)}roundClean(){sm(sA)}destroy(){this.set(0,0,0,0,0,0,0,0),sm(this.buffer)}}let sS=function(e,t=!1){let n=e.length,r=new Uint32Array(n),a=new Uint32Array(n);for(let i=0;i>sk&sx)}:{h:0|Number(e>>sk&sx),l:0|Number(e&sx)}}(e[i],t);[r[i],a[i]]=[n,s]}return[r,a]}(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e)));sS[0],sS[1];let sP=function(e){let t=t=>e().update(sb(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}(()=>new sC);function sO(e,t={}){let{as:n="string"==typeof e?"Hex":"Bytes"}=t,r=sP(i1(e));return"Bytes"===n?r:iG(r)}Uint8Array.from([105,171,180,181,160,222,75,198,42,42,32,31,141,37,186,233]);let sI=2n**256n-1n;function sT(e){if(130!==e.length&&132!==e.length)throw new sB({signature:e});let t=BigInt(iK(e,0,32)),n=BigInt(iK(e,32,64)),r=(()=>{let t=Number(`0x${e.slice(130)}`);if(!Number.isNaN(t))try{return function(e){if(0===e||27===e)return 0;if(1===e||28===e)return 1;if(e>=35)return e%2==0?1:0;throw new sR({value:e})}(t)}catch{throw new sN({value:t})}})();return void 0===r?{r:t,s:n}:{r:t,s:n,yParity:r}}class sB extends i_{constructor({signature:e}){super(`Value \`${e}\` is an invalid signature size.`,{metaMessages:["Expected: 64 bytes or 65 bytes.",`Received ${iV(iL(e))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSerializedSizeError"})}}class sU extends i_{constructor({signature:e}){super(`Signature \`${ij(e)}\` is missing either an \`r\`, \`s\`, or \`yParity\` property.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.MissingPropertiesError"})}}class s_ extends i_{constructor({value:e}){super(`Value \`${e}\` is an invalid r value. r must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidRError"})}}class sj extends i_{constructor({value:e}){super(`Value \`${e}\` is an invalid s value. s must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSError"})}}class sN extends i_{constructor({value:e}){super(`Value \`${e}\` is an invalid y-parity value. Y-parity must be 0 or 1.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidYParityError"})}}class sR extends i_{constructor({value:e}){super(`Value \`${e}\` is an invalid v value. v must be 27, 28 or >=35.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidVError"})}}var sD=n(15566),sF=n(42727),sM=n(27600);let sL="activeId",sG=function(e,t){let n="undefined"!=typeof indexedDB?(0,sM.MT)(e,t):void 0;return{getItem:async e=>await (0,sM.U2)(e,n)||null,removeItem:async e=>(0,sM.IV)(e,n),setItem:async(e,t)=>(0,sM.t8)(e,t,n)}}("base-acc-sdk","keys");async function sq(){let e=await sc({extractable:!1}),t=iK(sn(e.publicKey),1);return await sG.setItem(t,e),await sG.setItem(sL,t),e}async function sH(){let e=await sG.getItem(sL);return e&&await sG.getItem(e)||null}async function sz(){let e=await sH();if(!e){let e=await sq(),t=iK(sn(e.publicKey),1);return await sG.setItem(t,e),await sG.setItem(sL,t),e}return e}async function sK(){let e=await sz(),t=iK(sn(e.publicKey),1),n=async t=>{let{payload:n,metadata:r}=function(e){let{challenge:t,crossOrigin:n,extraClientData:r,flag:a,origin:i,rpId:s,signCount:o,userVerification:c="required"}=e,u=function(e={}){let{flag:t=5,rpId:n=window.location.hostname,signCount:r=0}=e;return iM(sO(iH(n)),iq(t,{size:1}),iq(r,{size:4}))}({flag:a,rpId:s,signCount:o}),l=function(e){let{challenge:t,crossOrigin:n=!1,extraClientData:r,origin:a=window.location.origin}=e;return JSON.stringify({type:"webauthn.get",challenge:function(e,t={}){return function(e,t={}){let{pad:n=!0,url:r=!1}=t,a=new Uint8Array(4*Math.ceil(e.length/3));for(let t=0,n=0;n>18],a[t+1]=sd[r>>12&63],a[t+2]=sd[r>>6&63],a[t+3]=sd[63&r]}let i=e.length%3,s=4*Math.floor(e.length/3)+(i&&i+1),o=sl.decode(new Uint8Array(a.buffer,0,s));return n&&1===i&&(o+="=="),n&&2===i&&(o+="="),r&&(o=o.replaceAll("+","-").replaceAll("/","_")),o}(i3(e),t)}(t,{url:!0,pad:!1}),origin:a,crossOrigin:n,...r})}({challenge:t,crossOrigin:n,extraClientData:r,origin:i}),d=sO(iH(l)),f=l.indexOf('"challenge"'),p=l.indexOf('"type"'),m=iM(u,d);return{metadata:{authenticatorData:u,clientDataJSON:l,challengeIndex:f,typeIndex:p,userVerificationRequired:"required"===c},payload:m}}({challenge:t,origin:"https://keys.coinbase.com",userVerification:"preferred"});return{signature:function(e){!function(e,t={}){let{recovered:n}=t;if(void 0===e.r||void 0===e.s||n&&void 0===e.yParity)throw new sU({signature:e});if(e.r<0n||e.r>sI)throw new s_({value:e.r});if(e.s<0n||e.s>sI)throw new sj({value:e.s});if("number"==typeof e.yParity&&0!==e.yParity&&1!==e.yParity)throw new sN({value:e.yParity})}(e);let t=e.r,n=e.s;return iM(iq(t,{size:32}),iq(n,{size:32}),"number"==typeof e.yParity?iq(function(e){if(0===e)return 27;if(1===e)return 28;throw new sN({value:e})}(e.yParity),{size:1}):"0x")}(await su({payload:n,privateKey:e.privateKey})),raw:{},webauthn:r}};return{id:t,publicKey:t,sign:async({hash:e})=>n(e),signMessage:async({message:e})=>n((0,sD.r)(e)),signTypedData:async e=>n((0,sF.Jv)(e)),type:"webAuthn"}}async function sV(){return{account:await sK()}}let sZ={storageKey:"ownPrivateKey",keyType:"private"},sW={storageKey:"ownPublicKey",keyType:"public"},sJ={storageKey:"peerPublicKey",keyType:"public"};class sY{ownPrivateKey=null;ownPublicKey=null;peerPublicKey=null;sharedSecret=null;async getOwnPublicKey(){return await this.loadKeysIfNeeded(),this.ownPublicKey}async getSharedSecret(){return await this.loadKeysIfNeeded(),this.sharedSecret}async setPeerPublicKey(e){this.sharedSecret=null,this.peerPublicKey=e,await this.storeKey(sJ,e),await this.loadKeysIfNeeded()}async clear(){this.ownPrivateKey=null,this.ownPublicKey=null,this.peerPublicKey=null,this.sharedSecret=null,A.keys.clear()}async generateKeyPair(){let e=await rE();this.ownPrivateKey=e.privateKey,this.ownPublicKey=e.publicKey,await this.storeKey(sZ,e.privateKey),await this.storeKey(sW,e.publicKey)}async loadKeysIfNeeded(){null===this.ownPrivateKey&&(this.ownPrivateKey=await this.loadKey(sZ)),null===this.ownPublicKey&&(this.ownPublicKey=await this.loadKey(sW)),(null===this.ownPrivateKey||null===this.ownPublicKey)&&await this.generateKeyPair(),null===this.peerPublicKey&&(this.peerPublicKey=await this.loadKey(sJ)),null===this.sharedSecret&&null!==this.ownPrivateKey&&null!==this.peerPublicKey&&(this.sharedSecret=await rA(this.ownPrivateKey,this.peerPublicKey))}async loadKey(e){let t=A.keys.get(e.storageKey);return t?rI(e.keyType,t):null}async storeKey(e,t){let n=await rO(e.keyType,t);A.keys.set(e.storageKey,n)}}var sQ=n(69921),sX=n(13169);function s$(e,t){if("object"==typeof e&&null!==e)return t.split(/[.[\]]+/).filter(Boolean).reduce((e,t)=>{if("object"==typeof e&&null!==e)return e[t]},e)}var s0=n(88027);function s1(e){if(!Array.isArray(e.params))return null;switch(e.method){case"personal_sign":return e.params[1];case"eth_signTypedData_v4":return e.params[0];case"eth_signTransaction":case"eth_sendTransaction":case"wallet_sendCalls":return e.params[0]?.from;default:return null}}function s2(e){if(!e||!Array.isArray(e)||!e[0]?.chainId||"string"!=typeof e[0].chainId&&"number"!=typeof e[0].chainId)throw R.rpc.invalidParams()}function s3(e,t){let n={...e};if(t&&e.method.startsWith("wallet_")){let e=s$(n,"params.0.capabilities");if(void 0===e&&(e={}),"object"!=typeof e)throw R.rpc.invalidParams();e={...t,...e},n.params&&Array.isArray(n.params)&&(n.params[0]={...n.params[0],capabilities:e})}return n}async function s6(){let e=A.subAccountsConfig.get()??{},t={};if("on-connect"===e.creation){let{account:n}=e.toOwnerAccount?await e.toOwnerAccount():await sV();if(!n)throw R.provider.unauthorized("No owner account found");t.addSubAccount={account:{type:"create",keys:[{type:n.address?"address":"webauthn-p256",publicKey:n.address||n.publicKey}]}}}A.subAccountsConfig.set({...e,capabilities:t})}async function s5({client:e,id:t}){let n=await (0,s0.l)(e,{id:t});if("success"===n.status)return n.receipts?.[0].transactionHash;throw R.rpc.internal("failed to send transaction")}function s4({calls:e,from:t,chainId:n,capabilities:r}){let a=E.get().paymasterUrls,i={method:"wallet_sendCalls",params:[{version:"1.0",calls:e,chainId:(0,X.eC)(n),from:t,atomicRequired:!0,capabilities:r}]};return a?.[n]&&(i=s3(i,{paymasterService:{url:a?.[n]}})),i}async function s7(){let e=th();return await new Promise((t,n)=>{er({dialogContext:"sub_account_insufficient_balance"}),e.presentItem({title:"Insufficient spend permission",message:"Your spend permission's remaining balance cannot cover this transaction. Please use your primary account to complete this transaction.",onClose:()=>{ea({dialogContext:"sub_account_insufficient_balance"}),e.clear(),n(Error("User cancelled funding"))},actionItems:[{text:"Use primary account",variant:"primary",onClick:()=>{ei({dialogContext:"sub_account_insufficient_balance",dialogAction:"continue_in_popup"}),e.clear(),t("continue_popup")}},{text:"Cancel",variant:"secondary",onClick:()=>{ei({dialogContext:"sub_account_insufficient_balance",dialogAction:"cancel"}),e.clear(),n(Error("User cancelled funding"))}}]})})}function s8(e,t){let n=e.filter(e=>e!==t);return[t,...n]}function s9(e,t){return[...e.filter(e=>e!==t),t]}var oe=n(44659),ot=n(36826);function on(e){return btoa(String.fromCharCode(...new Uint8Array(e))).replaceAll("+","-").replaceAll("/","_").replace(/=+$/,"")}var or=n(87721),oa=n(30056),oi=n(20556),os=n(10846),oo=n(65531),oc=n(10052),ou=n(23251);let ol=[{inputs:[{name:"preOpGas",type:"uint256"},{name:"paid",type:"uint256"},{name:"validAfter",type:"uint48"},{name:"validUntil",type:"uint48"},{name:"targetSuccess",type:"bool"},{name:"targetResult",type:"bytes"}],name:"ExecutionResult",type:"error"},{inputs:[{name:"opIndex",type:"uint256"},{name:"reason",type:"string"}],name:"FailedOp",type:"error"},{inputs:[{name:"sender",type:"address"}],name:"SenderAddressResult",type:"error"},{inputs:[{name:"aggregator",type:"address"}],name:"SignatureValidationFailed",type:"error"},{inputs:[{components:[{name:"preOpGas",type:"uint256"},{name:"prefund",type:"uint256"},{name:"sigFailed",type:"bool"},{name:"validAfter",type:"uint48"},{name:"validUntil",type:"uint48"},{name:"paymasterContext",type:"bytes"}],name:"returnInfo",type:"tuple"},{components:[{name:"stake",type:"uint256"},{name:"unstakeDelaySec",type:"uint256"}],name:"senderInfo",type:"tuple"},{components:[{name:"stake",type:"uint256"},{name:"unstakeDelaySec",type:"uint256"}],name:"factoryInfo",type:"tuple"},{components:[{name:"stake",type:"uint256"},{name:"unstakeDelaySec",type:"uint256"}],name:"paymasterInfo",type:"tuple"}],name:"ValidationResult",type:"error"},{inputs:[{components:[{name:"preOpGas",type:"uint256"},{name:"prefund",type:"uint256"},{name:"sigFailed",type:"bool"},{name:"validAfter",type:"uint48"},{name:"validUntil",type:"uint48"},{name:"paymasterContext",type:"bytes"}],name:"returnInfo",type:"tuple"},{components:[{name:"stake",type:"uint256"},{name:"unstakeDelaySec",type:"uint256"}],name:"senderInfo",type:"tuple"},{components:[{name:"stake",type:"uint256"},{name:"unstakeDelaySec",type:"uint256"}],name:"factoryInfo",type:"tuple"},{components:[{name:"stake",type:"uint256"},{name:"unstakeDelaySec",type:"uint256"}],name:"paymasterInfo",type:"tuple"},{components:[{name:"aggregator",type:"address"},{components:[{name:"stake",type:"uint256"},{name:"unstakeDelaySec",type:"uint256"}],name:"stakeInfo",type:"tuple"}],name:"aggregatorInfo",type:"tuple"}],name:"ValidationResultWithAggregation",type:"error"},{anonymous:!1,inputs:[{indexed:!0,name:"userOpHash",type:"bytes32"},{indexed:!0,name:"sender",type:"address"},{indexed:!1,name:"factory",type:"address"},{indexed:!1,name:"paymaster",type:"address"}],name:"AccountDeployed",type:"event"},{anonymous:!1,inputs:[],name:"BeforeExecution",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"account",type:"address"},{indexed:!1,name:"totalDeposit",type:"uint256"}],name:"Deposited",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"aggregator",type:"address"}],name:"SignatureAggregatorChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"account",type:"address"},{indexed:!1,name:"totalStaked",type:"uint256"},{indexed:!1,name:"unstakeDelaySec",type:"uint256"}],name:"StakeLocked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"account",type:"address"},{indexed:!1,name:"withdrawTime",type:"uint256"}],name:"StakeUnlocked",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"account",type:"address"},{indexed:!1,name:"withdrawAddress",type:"address"},{indexed:!1,name:"amount",type:"uint256"}],name:"StakeWithdrawn",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"userOpHash",type:"bytes32"},{indexed:!0,name:"sender",type:"address"},{indexed:!0,name:"paymaster",type:"address"},{indexed:!1,name:"nonce",type:"uint256"},{indexed:!1,name:"success",type:"bool"},{indexed:!1,name:"actualGasCost",type:"uint256"},{indexed:!1,name:"actualGasUsed",type:"uint256"}],name:"UserOperationEvent",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"userOpHash",type:"bytes32"},{indexed:!0,name:"sender",type:"address"},{indexed:!1,name:"nonce",type:"uint256"},{indexed:!1,name:"revertReason",type:"bytes"}],name:"UserOperationRevertReason",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"account",type:"address"},{indexed:!1,name:"withdrawAddress",type:"address"},{indexed:!1,name:"amount",type:"uint256"}],name:"Withdrawn",type:"event"},{inputs:[],name:"SIG_VALIDATION_FAILED",outputs:[{name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"initCode",type:"bytes"},{name:"sender",type:"address"},{name:"paymasterAndData",type:"bytes"}],name:"_validateSenderAndPaymaster",outputs:[],stateMutability:"view",type:"function"},{inputs:[{name:"unstakeDelaySec",type:"uint32"}],name:"addStake",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{name:"account",type:"address"}],name:"balanceOf",outputs:[{name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"account",type:"address"}],name:"depositTo",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{name:"",type:"address"}],name:"deposits",outputs:[{name:"deposit",type:"uint112"},{name:"staked",type:"bool"},{name:"stake",type:"uint112"},{name:"unstakeDelaySec",type:"uint32"},{name:"withdrawTime",type:"uint48"}],stateMutability:"view",type:"function"},{inputs:[{name:"account",type:"address"}],name:"getDepositInfo",outputs:[{components:[{name:"deposit",type:"uint112"},{name:"staked",type:"bool"},{name:"stake",type:"uint112"},{name:"unstakeDelaySec",type:"uint32"},{name:"withdrawTime",type:"uint48"}],name:"info",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[{name:"sender",type:"address"},{name:"key",type:"uint192"}],name:"getNonce",outputs:[{name:"nonce",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{name:"initCode",type:"bytes"}],name:"getSenderAddress",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{name:"sender",type:"address"},{name:"nonce",type:"uint256"},{name:"initCode",type:"bytes"},{name:"callData",type:"bytes"},{name:"callGasLimit",type:"uint256"},{name:"verificationGasLimit",type:"uint256"},{name:"preVerificationGas",type:"uint256"},{name:"maxFeePerGas",type:"uint256"},{name:"maxPriorityFeePerGas",type:"uint256"},{name:"paymasterAndData",type:"bytes"},{name:"signature",type:"bytes"}],name:"userOp",type:"tuple"}],name:"getUserOpHash",outputs:[{name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{components:[{components:[{name:"sender",type:"address"},{name:"nonce",type:"uint256"},{name:"initCode",type:"bytes"},{name:"callData",type:"bytes"},{name:"callGasLimit",type:"uint256"},{name:"verificationGasLimit",type:"uint256"},{name:"preVerificationGas",type:"uint256"},{name:"maxFeePerGas",type:"uint256"},{name:"maxPriorityFeePerGas",type:"uint256"},{name:"paymasterAndData",type:"bytes"},{name:"signature",type:"bytes"}],name:"userOps",type:"tuple[]"},{name:"aggregator",type:"address"},{name:"signature",type:"bytes"}],name:"opsPerAggregator",type:"tuple[]"},{name:"beneficiary",type:"address"}],name:"handleAggregatedOps",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{name:"sender",type:"address"},{name:"nonce",type:"uint256"},{name:"initCode",type:"bytes"},{name:"callData",type:"bytes"},{name:"callGasLimit",type:"uint256"},{name:"verificationGasLimit",type:"uint256"},{name:"preVerificationGas",type:"uint256"},{name:"maxFeePerGas",type:"uint256"},{name:"maxPriorityFeePerGas",type:"uint256"},{name:"paymasterAndData",type:"bytes"},{name:"signature",type:"bytes"}],name:"ops",type:"tuple[]"},{name:"beneficiary",type:"address"}],name:"handleOps",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"key",type:"uint192"}],name:"incrementNonce",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"callData",type:"bytes"},{components:[{components:[{name:"sender",type:"address"},{name:"nonce",type:"uint256"},{name:"callGasLimit",type:"uint256"},{name:"verificationGasLimit",type:"uint256"},{name:"preVerificationGas",type:"uint256"},{name:"paymaster",type:"address"},{name:"maxFeePerGas",type:"uint256"},{name:"maxPriorityFeePerGas",type:"uint256"}],name:"mUserOp",type:"tuple"},{name:"userOpHash",type:"bytes32"},{name:"prefund",type:"uint256"},{name:"contextOffset",type:"uint256"},{name:"preOpGas",type:"uint256"}],name:"opInfo",type:"tuple"},{name:"context",type:"bytes"}],name:"innerHandleOp",outputs:[{name:"actualGasCost",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"",type:"address"},{name:"",type:"uint192"}],name:"nonceSequenceNumber",outputs:[{name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{components:[{name:"sender",type:"address"},{name:"nonce",type:"uint256"},{name:"initCode",type:"bytes"},{name:"callData",type:"bytes"},{name:"callGasLimit",type:"uint256"},{name:"verificationGasLimit",type:"uint256"},{name:"preVerificationGas",type:"uint256"},{name:"maxFeePerGas",type:"uint256"},{name:"maxPriorityFeePerGas",type:"uint256"},{name:"paymasterAndData",type:"bytes"},{name:"signature",type:"bytes"}],name:"op",type:"tuple"},{name:"target",type:"address"},{name:"targetCallData",type:"bytes"}],name:"simulateHandleOp",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{name:"sender",type:"address"},{name:"nonce",type:"uint256"},{name:"initCode",type:"bytes"},{name:"callData",type:"bytes"},{name:"callGasLimit",type:"uint256"},{name:"verificationGasLimit",type:"uint256"},{name:"preVerificationGas",type:"uint256"},{name:"maxFeePerGas",type:"uint256"},{name:"maxPriorityFeePerGas",type:"uint256"},{name:"paymasterAndData",type:"bytes"},{name:"signature",type:"bytes"}],name:"userOp",type:"tuple"}],name:"simulateValidation",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"unlockStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"withdrawAddress",type:"address"}],name:"withdrawStake",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{name:"withdrawAddress",type:"address"},{name:"withdrawAmount",type:"uint256"}],name:"withdrawTo",outputs:[],stateMutability:"nonpayable",type:"function"},{stateMutability:"payable",type:"receive"}];var od=n(75475),of=n(56570),op=n(28766),om=(n(16689),n(82061));function oh(e){let{address:t,data:n,signature:r,to:a="hex"}=e,i=(0,nH.SM)([(0,oa.E)([{type:"address"},{type:"bytes"},{type:"bytes"}],[t,n,r]),"0x6492649264926492649264926492649264926492649264926492649264926492"]);return"hex"===a?i:(0,oe.nr)(i)}async function oy(e){let{extend:t,nonceKeyManager:n=function(e){let{source:t}=e,n=new Map,r=new om.k(8192),a=new Map,i=({address:e,chainId:t})=>`${e}.${t}`;return{async consume({address:e,chainId:n,client:a}){let s=i({address:e,chainId:n}),o=this.get({address:e,chainId:n,client:a});this.increment({address:e,chainId:n});let c=await o;return await t.set({address:e,chainId:n},c),r.set(s,c),c},async increment({address:e,chainId:t}){let r=i({address:e,chainId:t}),a=n.get(r)??0;n.set(r,a+1)},async get({address:e,chainId:s,client:o}){let c=i({address:e,chainId:s}),u=a.get(c);return u||(u=(async()=>{try{let n=await t.get({address:e,chainId:s,client:o}),a=r.get(c)??0;if(a>0&&n<=a)return a+1;return r.delete(c),n}finally{this.reset({address:e,chainId:s})}})(),a.set(c,u)),(n.get(c)??0)+await u},reset({address:e,chainId:t}){let r=i({address:e,chainId:t});n.delete(r),a.delete(r)}}}({source:{get:()=>Date.now(),set(){}}}),...r}=e,a=!1,i=await e.getAddress();return{...t,...r,address:i,async getFactoryArgs(){return"isDeployed"in this&&await this.isDeployed()?{factory:void 0,factoryData:void 0}:e.getFactoryArgs()},async getNonce(t){let r=t?.key??BigInt(await n.consume({address:i,chainId:e.client.chain.id,client:e.client}));return e.getNonce?await e.getNonce({...t,key:r}):await (0,op.L)(e.client,{abi:(0,od.V)(["function getNonce(address, uint192) pure returns (uint256)"]),address:e.entryPoint.address,functionName:"getNonce",args:[i,r]})},isDeployed:async()=>!!a||(a=!!await (0,t0.s)(e.client,of.C,"getCode")({address:i})),...e.sign?{async sign(t){let[{factory:n,factoryData:r},a]=await Promise.all([this.getFactoryArgs(),e.sign(t)]);return n&&r?oh({address:n,data:r,signature:a}):a}}:{},async signMessage(t){let[{factory:n,factoryData:r},a]=await Promise.all([this.getFactoryArgs(),e.signMessage(t)]);return n&&r&&"0x7702"!==n?oh({address:n,data:r,signature:a}):a},async signTypedData(t){let[{factory:n,factoryData:r},a]=await Promise.all([this.getFactoryArgs(),e.signTypedData(t)]);return n&&r&&"0x7702"!==n?oh({address:n,data:r,signature:a}):a},type:"smart"}}function ob(e){let{authorization:t,factory:n,factoryData:r}=e;if("0x7702"===n||"0x7702000000000000000000000000000000000000"===n){if(!t)return"0x7702000000000000000000000000000000000000";let e=t.address;return(0,nH.zo)([e,r??"0x"])}return n?(0,nH.zo)([n,r??"0x"]):"0x"}function og(e){let{callGasLimit:t,callData:n,maxPriorityFeePerGas:r,maxFeePerGas:a,paymaster:i,paymasterData:s,paymasterPostOpGasLimit:o,paymasterSignature:c,paymasterVerificationGasLimit:u,sender:l,signature:d="0x",verificationGasLimit:f}=e,p=(0,nH.zo)([(0,nM.vk)((0,X.eC)(f||0n),{size:16}),(0,nM.vk)((0,X.eC)(t||0n),{size:16})]),m=ob(e),h=(0,nH.zo)([(0,nM.vk)((0,X.eC)(r||0n),{size:16}),(0,nM.vk)((0,X.eC)(a||0n),{size:16})]);return{accountGasLimits:p,callData:n,initCode:m,gasFees:h,nonce:e.nonce??0n,paymasterAndData:i?(0,nH.zo)([i,(0,nM.vk)((0,X.eC)(u||0n),{size:16}),(0,nM.vk)((0,X.eC)(o||0n),{size:16}),s||"0x",...c?[c]:[]]):"0x",preVerificationGas:e.preVerificationGas??0n,sender:l,signature:d}}let ov={PackedUserOperation:[{type:"address",name:"sender"},{type:"uint256",name:"nonce"},{type:"bytes",name:"initCode"},{type:"bytes",name:"callData"},{type:"bytes32",name:"accountGasLimits"},{type:"uint256",name:"preVerificationGas"},{type:"bytes32",name:"gasFees"},{type:"bytes",name:"paymasterAndData"}]};async function ow(e){let{owner:t,ownerIndex:n,address:r,client:a,factoryData:i}=e,s={abi:ol,address:"0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789",version:"0.6"},o={abi:O,address:"0xba5ed110efdba3d005bfc882d75358acbbb85842"};return oy({client:a,entryPoint:s,extend:{abi:P,factory:o},async decodeCalls(e){let t=(0,or.p)({abi:P,data:e});if("execute"===t.functionName)return[{to:t.args[0],value:t.args[1],data:t.args[2]}];if("executeBatch"===t.functionName)return t.args[0].map(e=>({to:e.target,value:e.value,data:e.data}));throw new t2.G(`unable to decode calls for "${t.functionName}"`)},encodeCalls:async e=>1===e.length?(0,Q.R)({abi:P,functionName:"execute",args:[e[0].to,e[0].value??BigInt(0),e[0].data??"0x"]}):(0,Q.R)({abi:P,functionName:"executeBatch",args:[e.map(e=>({data:e.data??"0x",target:e.to,value:e.value??BigInt(0)}))]}),getAddress:async()=>r,getFactoryArgs:async()=>({factory:o.address,factoryData:i}),getStubSignature:async()=>"webAuthn"===t.type?"0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000000170000000000000000000000000000000000000000000000000000000000000001949fc7c88032b9fcb5f6efc7a7b8c63668eae9871b765e23123bb473ff57aa831a7c0d9276168ebcc29f2875a0239cffdf2a9cd1c2007c5c77c071db9264df1d000000000000000000000000000000000000000000000000000000000000002549960de5880e8c687434170f6476605b8fe4aeb9a28632c7995cf3ba831d97630500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008a7b2274797065223a22776562617574686e2e676574222c226368616c6c656e6765223a2273496a396e6164474850596759334b7156384f7a4a666c726275504b474f716d59576f4d57516869467773222c226f726967696e223a2268747470733a2f2f7369676e2e636f696e626173652e636f6d222c2263726f73734f726967696e223a66616c73657d00000000000000000000000000000000000000000000":oE({ownerIndex:n,signature:"0xfffffffffffffffffffffffffffffff0000000000000000000000000000000007aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1c"}),async sign(e){let r=ok({address:await this.getAddress(),chainId:a.chain.id,hash:e.hash});return oE({ownerIndex:n,signature:await ox({hash:r,owner:t})})},async signMessage(e){let{message:r}=e,i=ok({address:await this.getAddress(),chainId:a.chain.id,hash:(0,sD.r)(r)});return oE({ownerIndex:n,signature:await ox({hash:i,owner:t})})},async signTypedData(e){let{domain:r,types:i,primaryType:s,message:o}=e,c=ok({address:await this.getAddress(),chainId:a.chain.id,hash:(0,sF.Jv)({domain:r,message:o,primaryType:s,types:i})});return oE({ownerIndex:n,signature:await ox({hash:c,owner:t})})},async signUserOperation(e){let{chainId:r=a.chain.id,...i}=e,o=await this.getAddress(),c=function(e){let{chainId:t,entryPointAddress:n,entryPointVersion:r}=e,a=e.userOperation,{authorization:i,callData:s="0x",callGasLimit:o,maxFeePerGas:c,maxPriorityFeePerGas:u,nonce:l,paymasterAndData:d="0x",preVerificationGas:f,sender:p,verificationGasLimit:m}=a;if("0.8"===r||"0.9"===r)return(0,sF.Jv)(function(e){let{chainId:t,entryPointAddress:n,userOperation:r}=e;return{types:ov,primaryType:"PackedUserOperation",domain:{name:"ERC4337",version:"1",chainId:t,verifyingContract:n},message:og(r)}}({chainId:t,entryPointAddress:n,userOperation:a}));let h=(()=>{if("0.6"===r){let e=ob({authorization:i,factory:a.initCode?.slice(0,42),factoryData:a.initCode?.slice(42)});return(0,oa.E)([{type:"address"},{type:"uint256"},{type:"bytes32"},{type:"bytes32"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"uint256"},{type:"bytes32"}],[p,l,(0,sX.w)(e),(0,sX.w)(s),o,m,f,c,u,(0,sX.w)(d)])}if("0.7"===r){let e=og(a);return(0,oa.E)([{type:"address"},{type:"uint256"},{type:"bytes32"},{type:"bytes32"},{type:"bytes32"},{type:"uint256"},{type:"bytes32"},{type:"bytes32"}],[e.sender,e.nonce,(0,sX.w)(e.initCode),(0,sX.w)(e.callData),e.accountGasLimits,e.preVerificationGas,e.gasFees,(0,sX.w)(e.paymasterAndData)])}throw Error(`entryPointVersion "${r}" not supported.`)})();return(0,sX.w)((0,oa.E)([{type:"bytes32"},{type:"address"},{type:"uint256"}],[(0,sX.w)(h),n,BigInt(t)]))}({chainId:r,entryPointAddress:s.address,entryPointVersion:s.version,userOperation:{...i,sender:o}});return oE({ownerIndex:n,signature:await ox({hash:c,owner:t})})},userOperation:{async estimateGas(e){if("webAuthn"===t.type)return{verificationGasLimit:BigInt(Math.max(Number(e.verificationGasLimit??BigInt(0)),8e5))}}}})}async function ox({hash:e,owner:t}){if("webAuthn"===t.type){let{signature:n,webauthn:r}=await t.sign({hash:e});return function({webauthn:e,signature:t}){let{r:n,s:r}=sT(t);return(0,oa.E)([{components:[{name:"authenticatorData",type:"bytes"},{name:"clientDataJSON",type:"bytes"},{name:"challengeIndex",type:"uint256"},{name:"typeIndex",type:"uint256"},{name:"r",type:"uint256"},{name:"s",type:"uint256"}],type:"tuple"}],[{authenticatorData:e.authenticatorData,clientDataJSON:(0,X.$G)(e.clientDataJSON),challengeIndex:BigInt(e.challengeIndex),typeIndex:BigInt(e.typeIndex),r:n,s:r}])}({signature:n,webauthn:r})}if(t.sign)return t.sign({hash:e});throw new t2.G("`owner` does not support raw sign.")}function ok({address:e,chainId:t,hash:n}){return(0,sF.Jv)({domain:{chainId:t,name:"Coinbase Smart Wallet",verifyingContract:e,version:"1"},types:{CoinbaseSmartWalletMessage:[{name:"hash",type:"bytes32"}]},primaryType:"CoinbaseSmartWalletMessage",message:{hash:n}})}function oE(e){let{ownerIndex:t=0}=e,n=(()=>{if(65!==(0,oi.d)(e.signature))return e.signature;let t=function(e){let{r:t,s:n}=os.secp256k1.Signature.fromCompact(e.slice(2,130)),r=Number(`0x${e.slice(130)}`),[a,i]=(()=>{if(0===r||1===r)return[void 0,r];if(27===r)return[BigInt(r),0];if(28===r)return[BigInt(r),1];throw Error("Invalid yParityOrV value")})();return void 0!==a?{r:(0,X.eC)(t,{size:32}),s:(0,X.eC)(n,{size:32}),v:a,yParity:i}:{r:(0,X.eC)(t,{size:32}),s:(0,X.eC)(n,{size:32}),yParity:i}}(e.signature);return function(e,t){if(e.length!==t.length)throw new oo.fs({expectedLength:e.length,givenLength:t.length});let n=[];for(let r=0;r{try{switch(e.method){case"wallet_addSubAccount":return c;case"eth_accounts":return[c.address];case"eth_coinbase":return c.address;case"net_version":return u.toString();case"eth_chainId":return(0,X.eC)(u);case"eth_sendTransaction":{K(e.params);let n=e.params[0];z(n.to,R.rpc.invalidParams("to is required"));let r={to:n.to,data:tI(n.data??"0x",!0),value:tI(n.value??"0x",!0),from:n.from??c.address},a=s4({calls:[r],chainId:u,from:r.from}),i=await d(a);return s5({client:t,id:i})}case"wallet_sendCalls":{let t;K(e.params);let n=s$(e.params[0],"chainId");if(!n)throw R.rpc.invalidParams("chainId is required");if(!(0,rx.v)(n))throw R.rpc.invalidParams("chainId must be a hex encoded integer");if(!e.params[0])throw R.rpc.invalidParams("params are required");if(!("calls"in e.params[0]))throw R.rpc.invalidParams("calls are required");let r={method:"wallet_prepareCalls",params:[{version:"1.0",calls:e.params[0].calls,chainId:n,from:c.address,capabilities:"capabilities"in e.params[0]?e.params[0].capabilities:{}}]};s&&(r=s3(r,{funding:[{type:"spendPermission",data:{autoApply:!0,sources:[s],preference:"PREFER_DIRECT_BALANCE"}}]}));let i=await d(r),o=await a.sign?.({hash:tT.rR(i.signatureRequest.hash)});if(!o)throw R.rpc.internal("signature not found");return t=(0,rx.v)(o)?{type:"secp256k1",data:{address:a.address,signature:o}}:{type:"webauthn",data:{signature:JSON.stringify(function({webauthn:e,signature:t,id:n}){let r=sT(t);return{id:n,rawId:on((0,oe.qX)(n)),response:{authenticatorData:on((0,oe.nr)(e.authenticatorData)),clientDataJSON:on((0,oe.qX)(e.clientDataJSON)),signature:on(function(e,t){let n=(0,oe.nr)((0,ot.f)((0,X.eC)(e))),r=(0,oe.nr)((0,ot.f)((0,X.eC)(t))),a=n.length,i=r.length,s=a+i+4,o=new Uint8Array(s+2);return o[0]=48,o[1]=s,o[2]=2,o[3]=a,o.set(n,4),o[a+4]=2,o[a+5]=i,o.set(r,a+6),o}(r.r,r.s))},type:JSON.parse(e.clientDataJSON).type}}({id:a.id??"1",...o})),publicKey:a.publicKey}},(await d({method:"wallet_sendPreparedCalls",params:[{version:"1.0",type:i.type,data:i.userOp,chainId:i.chainId,signature:t}]}))[0]}case"wallet_sendPreparedCalls":{K(e.params);let n=s$(e.params[0],"chainId");if(!n)throw R.rpc.invalidParams("chainId is required");if(!(0,rx.v)(n))throw R.rpc.invalidParams("chainId must be a hex encoded integer");return await t.request({method:"wallet_sendPreparedCalls",params:e.params})}case"wallet_prepareCalls":{K(e.params);let n=s$(e.params[0],"chainId");if(!n)throw R.rpc.invalidParams("chainId is required");if(!(0,rx.v)(n))throw R.rpc.invalidParams("chainId must be a hex encoded integer");if(!e.params[0])throw R.rpc.invalidParams("params are required");if(!s$(e.params[0],"calls"))throw R.rpc.invalidParams("calls are required");let r=e.params[0];return!o||!r.capabilities||"attribution"in r.capabilities||(r.capabilities.attribution=o),await t.request({method:"wallet_prepareCalls",params:[{...e.params[0],chainId:n}]})}case"personal_sign":{if(K(e.params),!(0,rx.v)(e.params[0]))throw R.rpc.invalidParams("message must be a hex encoded string");let t=(0,tT.rR)(e.params[0]);return l.signMessage({message:t})}case"eth_signTypedData_v4":{K(e.params);let t="string"==typeof e.params[1]?JSON.parse(e.params[1]):e.params[1];return l.signTypedData(t)}default:throw R.rpc.methodNotSupported()}}catch(e){if(H(e)){let t=function(e){try{let t=JSON.parse(e.details);return new L(t.code,t.message,t.data)}catch(e){return null}}(e);if(t)throw t}throw e}};return{request:d}}async function oC({address:e,client:t,publicKey:n,factory:r,factoryData:a}){if(!await (0,of.C)(t,{address:e})&&r&&a){let e=(0,or.p)({abi:O,data:a});if("createAccount"!==e.functionName)throw R.rpc.internal("unknown factory function");let[t]=e.args;return t.findIndex(e=>e.toLowerCase()===oS(n).toLowerCase())}let i=await (0,op.L)(t,{address:e,abi:P,functionName:"ownerCount"});for(let r=Number(i)-1;r>=0;r--){let a=await (0,op.L)(t,{address:e,abi:P,functionName:"ownerAtIndex",args:[BigInt(r)]}),i=oS(n);if(a.toLowerCase()===i.toLowerCase())return r}return -1}function oS(e){return(0,rw.U)(e)?(0,nM.vk)(e):e}async function oP(){let e=A.config.get().metadata?.appName??"App",t=th();return new Promise(n=>{er({dialogContext:"sub_account_add_owner"}),t.presentItem({title:`Re-authorize ${e}`,message:`${e} has lost access to your account. Please sign at the next step to re-authorize ${e}`,onClose:()=>{ea({dialogContext:"sub_account_add_owner"}),n("cancel")},actionItems:[{text:"Continue",variant:"primary",onClick:()=>{ei({dialogContext:"sub_account_add_owner",dialogAction:"confirm"}),t.clear(),n("authenticate")}},{text:"Not now",variant:"secondary",onClick:()=>{ei({dialogContext:"sub_account_add_owner",dialogAction:"cancel"}),t.clear(),n("cancel")}}]})})}async function oO({ownerAccount:e,globalAccountRequest:t,chainId:n}){let r=A.account.get(),a=A.subAccounts.get(),i=r.accounts?.find(e=>e.toLowerCase()!==a?.address.toLowerCase());z(i,R.provider.unauthorized("no global account")),z(r.chain?.id,R.provider.unauthorized("no chain id")),z(a?.address,R.provider.unauthorized("no sub account"));let s=[];if("local"===e.type&&e.address&&s.push({to:a.address,data:(0,Q.R)({abi:P,functionName:"addOwnerAddress",args:[e.address]}),value:(0,X.NC)(0)}),e.publicKey){let[t,n]=(0,Y.r)([{type:"bytes32"},{type:"bytes32"}],e.publicKey);s.push({to:a.address,data:(0,Q.R)({abi:P,functionName:"addOwnerPublicKey",args:[t,n]}),value:(0,X.NC)(0)})}let o={method:"wallet_sendCalls",params:[{version:"1",calls:s,chainId:(0,X.eC)(n),from:i}]};if("cancel"===await oP())throw R.provider.unauthorized("user cancelled");let c=await t(o),u=rb(r.chain.id);if(z(u,R.rpc.internal(`client not found for chainId ${r.chain.id}`)),"success"!==(await (0,s0.l)(u,{id:c})).status)throw R.rpc.internal("add owner call failed");let l=await oC({address:a.address,publicKey:"local"===e.type&&e.address?e.address:e.publicKey,client:u});if(-1===l)throw R.rpc.internal("failed to find owner index");return l}async function oI({request:e,globalAccountAddress:t,subAccountAddress:n,client:r,globalAccountRequest:a,chainId:i,prependCalls:s}){var o,c;let u;if("wallet_sendCalls"===e.method&&"object"==typeof(o=e.params)&&null!==o&&Array.isArray(o)&&o.length>0&&"object"==typeof o[0]&&null!==o[0]&&"calls"in o[0])u=e.params[0];else if("eth_sendTransaction"===e.method&&Array.isArray(c=e.params)&&1===c.length&&"object"==typeof c[0]&&null!==c[0]&&"to"in c[0])u=s4({calls:[e.params[0]],chainId:i,from:e.params[0].from}).params[0];else throw Error(`Could not get original call from ${e.method} request`);let l=[...s??[],{data:(0,Q.R)({abi:P,functionName:"executeBatch",args:[u.calls.map(e=>({target:e.to,value:(0,tT.y_)(e.value??"0x0"),data:e.data??"0x"}))]}),to:n,value:"0x0"}],d=s3({method:"wallet_sendCalls",params:[{...u,calls:l,from:t,version:"2.0.0",atomicRequired:!0}]},{spendPermissions:{request:{spender:n}}}),f=await a(d),p=f.id;return(f.capabilities?.spendPermissions&&k.set(f.capabilities.spendPermissions.permissions),"eth_sendTransaction"===e.method)?s5({client:r,id:p}):f}async function oT({globalAccountAddress:e,subAccountAddress:t,client:n,request:r,globalAccountRequest:a}){let i=n.chain?.id;z(i,R.rpc.internal("invalid chainId"));try{await s7()}catch{throw R.provider.userRejectedRequest({message:"User cancelled funding"})}return await oI({request:r,globalAccountAddress:e,subAccountAddress:t,client:n,globalAccountRequest:a,chainId:i})}class oB{communicator;keyManager;callback;accounts;chain;constructor(e){this.communicator=e.communicator,this.callback=e.callback,this.keyManager=new sY;let{account:t,chains:n}=A.getState();this.accounts=t.accounts??[],this.chain=t.chain??{id:e.metadata.appChainIds?.[0]??1},n&&rm(n)}get isConnected(){return this.accounts.length>0}async handshake(e){let t=rv.get(e);tU({method:e.method,correlationId:t});try{await this.communicator.waitForPopupLoaded?.();let n=await this.createRequestMessage({handshake:{method:e.method,params:e.params??[]}},t),r=await this.communicator.postRequestAndWaitForResponse(n);if("failure"in r.content)throw r.content.failure;let a=await rI("public",r.sender);await this.keyManager.setPeerPublicKey(a);let i=await this.decryptResponseMessage(r);this.handleResponse(e,i),tj({method:e.method,correlationId:t})}catch(n){throw t_({method:e.method,correlationId:t,errorMessage:tk(n)}),n}}async request(e){let t=rv.get(e);tN({method:e.method,correlationId:t});try{let n=await this._request(e);return tD({method:e.method,correlationId:t}),n}catch(n){throw tR({method:e.method,correlationId:t,errorMessage:tk(n)}),n}}async _request(e){if(0===this.accounts.length)switch(e.method){case"wallet_switchEthereumChain":s2(e.params),this.chain.id=Number(e.params[0].chainId);return;case"wallet_connect":{await this.communicator.waitForPopupLoaded?.(),await s6();let t=A.subAccountsConfig.get(),n=s3(e,t?.capabilities??{});return this.sendRequestToPopup(n)}case"wallet_sendCalls":case"wallet_sign":return this.sendRequestToPopup(e);default:throw R.provider.unauthorized()}if(this.shouldRequestUseSubAccountSigner(e)){let t=rv.get(e);tF({method:e.method,correlationId:t});try{let n=await this.sendRequestToSubAccountSigner(e);return tM({method:e.method,correlationId:t}),n}catch(n){throw tL({method:e.method,correlationId:t,errorMessage:tk(n)}),n}}switch(e.method){case"eth_requestAccounts":case"eth_accounts":{let e=A.subAccounts.get(),t=A.subAccountsConfig.get();return e?.address&&(this.accounts=t?.defaultAccount==="sub"?s8(this.accounts,e.address):s9(this.accounts,e.address)),this.callback?.("connect",{chainId:X.eC(this.chain.id)}),this.accounts}case"eth_coinbase":return this.accounts[0];case"net_version":return this.chain.id;case"eth_chainId":return(0,X.eC)(this.chain.id);case"wallet_getCapabilities":return this.handleGetCapabilitiesRequest(e);case"wallet_switchEthereumChain":return this.handleSwitchChainRequest(e);case"eth_ecRecover":case"personal_sign":case"wallet_sign":case"personal_ecRecover":case"eth_signTransaction":case"eth_sendTransaction":case"eth_signTypedData_v1":case"eth_signTypedData_v3":case"eth_signTypedData_v4":case"eth_signTypedData":case"wallet_addEthereumChain":case"wallet_watchAsset":case"wallet_sendCalls":case"wallet_showCallsStatus":case"wallet_grantPermissions":return this.sendRequestToPopup(e);case"wallet_connect":{await this.communicator.waitForPopupLoaded?.(),await s6();let t=A.subAccountsConfig.get(),n=s3(e,t?.capabilities??{}),r=await this.sendRequestToPopup(n);return this.callback?.("connect",{chainId:X.eC(this.chain.id)}),r}case"wallet_getSubAccounts":{let t=A.subAccounts.get();if(t?.address)return{subAccounts:[t]};if(!this.chain.rpcUrl)throw R.rpc.internal("No RPC URL set for chain");let n=await rU(e,this.chain.rpcUrl);if(K(n.subAccounts,"subAccounts"),n.subAccounts.length>0){rk(n.subAccounts[0]);let e=n.subAccounts[0];A.subAccounts.set({address:e.address,factory:e.factory,factoryData:e.factoryData})}return n}case"wallet_addSubAccount":return this.addSubAccount(e);case"coinbase_fetchPermissions":{!function(e){if("coinbase_fetchPermissions"!==e.method||void 0!==e.params){if("coinbase_fetchPermissions"===e.method&&Array.isArray(e.params)&&1===e.params.length&&"object"==typeof e.params[0]){if("string"!=typeof e.params[0].account||!e.params[0].chainId.startsWith("0x"))throw R.rpc.invalidParams("FetchPermissions - Invalid params: params[0].account must be a hex string");if("string"!=typeof e.params[0].chainId||!e.params[0].chainId.startsWith("0x"))throw R.rpc.invalidParams("FetchPermissions - Invalid params: params[0].chainId must be a hex string");if("string"!=typeof e.params[0].spender||!e.params[0].spender.startsWith("0x"))throw R.rpc.invalidParams("FetchPermissions - Invalid params: params[0].spender must be a hex string");return}throw R.rpc.invalidParams()}}(e);let t=function(e){if(void 0!==e.params)return e;let t=A.getState().account.accounts?.[0],n=A.getState().account.chain?.id,r=A.getState().subAccount?.address;if(!t||!r||!n)throw R.rpc.invalidParams("FetchPermissions - one or more of account, sub account, or chain id is missing, connect to sub account via wallet_connect first");return{method:"coinbase_fetchPermissions",params:[{account:t,chainId:(0,X.eC)(n),spender:r}]}}(e),n=await rU(t,o),r=(0,tT.ly)(t.params?.[0].chainId);return A.spendPermissions.set(n.permissions.map(e=>({...e,chainId:r}))),n}case"coinbase_fetchPermission":{let t=await rU(e,o);return t.permission&&t.permission.chainId&&A.spendPermissions.set([t.permission]),t}default:if(!this.chain.rpcUrl)throw R.rpc.internal("No RPC URL set for chain");return rU(e,this.chain.rpcUrl)}}async sendRequestToPopup(e){await this.communicator.waitForPopupLoaded?.();let t=await this.sendEncryptedRequest(e),n=await this.decryptResponseMessage(t);return this.handleResponse(e,n)}async handleResponse(e,t){let n=t.result;if("error"in n)throw n.error;switch(e.method){case"eth_requestAccounts":{let e=n.value;this.accounts=e,A.account.set({accounts:e,chain:this.chain}),this.callback?.("accountsChanged",e);break}case"wallet_connect":{let e=n.value,t=e.accounts.map(e=>e.address);this.accounts=t,A.account.set({accounts:t});let r=e.accounts.at(0),a=r?.capabilities;if(a?.subAccounts){let e=a?.subAccounts;K(e,"subAccounts"),rk(e[0]),A.subAccounts.set({address:e[0].address,factory:e[0].factory,factoryData:e[0].factoryData})}let i=A.subAccounts.get(),s=A.subAccountsConfig.get();i?.address&&(this.accounts=s?.defaultAccount==="sub"?s8(this.accounts,i.address):s9(this.accounts,i.address));let o=e?.accounts?.[0].capabilities?.spendPermissions;o&&"permissions"in o&&A.spendPermissions.set(o?.permissions),this.callback?.("accountsChanged",this.accounts);break}case"wallet_addSubAccount":{rk(n.value);let e=n.value;A.subAccounts.set(e);let t=A.subAccountsConfig.get();this.accounts=t?.defaultAccount==="sub"?s8(this.accounts,e.address):s9(this.accounts,e.address),this.callback?.("accountsChanged",this.accounts)}}return n.value}async cleanup(){let e=A.config.get().metadata;await this.keyManager.clear(),A.account.clear(),A.subAccounts.clear(),A.spendPermissions.clear(),A.chains.clear(),this.accounts=[],this.chain={id:e?.appChainIds?.[0]??1}}async handleSwitchChainRequest(e){s2(e.params);let t=function(e){if("number"==typeof e&&Number.isInteger(e))return tA(e);if("string"==typeof e){if(tC.test(e))return tA(Number(e));if(function(e){if("string"!=typeof e)return!1;let t=tO(e).toLowerCase();return tS.test(t)}(e))return tA(Number(BigInt(function(e,t=!1){let n=tI(e,!1);return n.length%2==1&&(n=tE(`0${n}`)),t?tE(`0x${n}`):n}(e,!0))))}throw R.rpc.invalidParams(`Not an integer: ${String(e)}`)}(e.params[0].chainId);if(this.updateChain(t))return null;let n=await this.sendRequestToPopup(e);return null===n&&this.updateChain(t),n}async handleGetCapabilitiesRequest(e){!function(e){if(!e||!Array.isArray(e)||1!==e.length&&2!==e.length||"string"!=typeof e[0]||!(0,rw.U)(e[0]))throw R.rpc.invalidParams();if(2===e.length){if(!Array.isArray(e[1]))throw R.rpc.invalidParams();for(let t of e[1])if("string"!=typeof t||!t.startsWith("0x"))throw R.rpc.invalidParams()}}(e.params);let t=e.params[0],n=e.params[1];if(!this.accounts.some(e=>(0,tB.E)(e,t)))throw R.provider.unauthorized("no active account found when getting capabilities");let r=A.getState().account.capabilities;if(!r)return{};if(!n||0===n.length)return r;let a=new Set(n.map(e=>(0,tT.ly)(e)));return Object.fromEntries(Object.entries(r).filter(([e])=>{try{let t=(0,tT.ly)(e);return a.has(t)}catch{return!1}}))}async sendEncryptedRequest(e){let t=await this.keyManager.getSharedSecret();if(!t)throw R.provider.unauthorized("No shared secret found when encrypting request");let n=await rT({action:e,chainId:this.chain.id},t),r=rv.get(e),a=await this.createRequestMessage({encrypted:n},r);return this.communicator.postRequestAndWaitForResponse(a)}async createRequestMessage(e,t){let n=await rO("public",await this.keyManager.getOwnPublicKey());return{id:crypto.randomUUID(),correlationId:t,sender:n,content:e,timestamp:new Date}}async decryptResponseMessage(e){let t=e.content;if("failure"in t)throw t.failure;let n=await this.keyManager.getSharedSecret();if(!n)throw R.provider.unauthorized("Invalid session: no shared secret found when decrypting response");let r=await rB(t.encrypted,n),a=r.data?.chains;if(a){let e=r.data?.nativeCurrencies,t=Object.entries(a).map(([t,n])=>{let r=e?.[Number(t)];return{id:Number(t),rpcUrl:n,...r?{nativeCurrency:r}:{}}});A.chains.set(t),this.updateChain(this.chain.id,t),rm(t)}let i=r.data?.capabilities;return i&&A.account.set({capabilities:i}),r}updateChain(e,t){let n=A.getState(),r=t??n.chains,a=r?.find(t=>t.id===e);return!!a&&(a!==this.chain&&(this.chain=a,A.account.set({chain:a}),this.callback?.("chainChanged",tP(a.id))),!0)}async addSubAccount(e){let t=A.getState().subAccount,n=A.subAccountsConfig.get();if(t?.address)return this.accounts=n?.defaultAccount==="sub"?s8(this.accounts,t.address):s9(this.accounts,t.address),this.callback?.("accountsChanged",this.accounts),t;if(await this.communicator.waitForPopupLoaded?.(),Array.isArray(e.params)&&e.params.length>0&&e.params[0].account&&"create"===e.params[0].account.type){let t;if(e.params[0].account.keys&&e.params[0].account.keys.length>0)t=e.params[0].account.keys;else{let e=A.subAccountsConfig.get()??{},{account:n}=e.toOwnerAccount?await e.toOwnerAccount():await sV();if(!n)throw R.provider.unauthorized("could not get subaccount owner account when adding sub account");t=[{type:n.address?"address":"webauthn-p256",publicKey:n.address||n.publicKey}]}e.params[0].account.keys=t}let r=await this.sendRequestToPopup(e);return rk(r),r}shouldRequestUseSubAccountSigner(e){let t=s1(e),n=A.subAccounts.get();return!!t&&t.toLowerCase()===n?.address.toLowerCase()}async sendRequestToSubAccountSigner(e){let t=A.subAccounts.get(),n=A.subAccountsConfig.get(),r=A.config.get();z(t?.address,R.provider.unauthorized("no active sub account when sending request to sub account signer"));let a=n?.toOwnerAccount?await n.toOwnerAccount():await sV();z(a?.account,R.provider.unauthorized("no active sub account owner when sending request to sub account signer")),void 0===s1(e)&&(e=function(e,t){if(!Array.isArray(e.params))throw R.rpc.invalidParams();let n=[...e.params];switch(e.method){case"eth_signTransaction":case"eth_sendTransaction":case"wallet_sendCalls":n[0].from=t;break;case"eth_signTypedData_v4":n[0]=t;break;case"personal_sign":n[1]=t}return{...e,params:n}}(e,t.address));let i=this.accounts.find(e=>e.toLowerCase()!==t.address.toLowerCase());z(i,R.provider.unauthorized("no global account found when sending request to sub account signer"));let s=function({attribution:e,dappOrigin:t}){if(e){if("auto"in e&&e.auto&&t)return(0,sQ.tP)((0,sX.w)((0,X.NC)(t)),0,16);if("dataSuffix"in e)return e.dataSuffix}}({attribution:r.preference?.attribution,dappOrigin:window.location.origin}),o="wallet_sendCalls"===e.method&&e.params?.[0]?.chainId,c=o?(0,tT.ly)(o):this.chain.id,u=rb(c);if(z(u,R.rpc.internal(`client not found for chainId ${c} when sending request to sub account signer`)),["eth_sendTransaction","wallet_sendCalls"].includes(e.method)){let n=A.subAccountsConfig.get();if(n?.funding==="spend-permissions"&&0===k.get().length)return await oI({request:e,globalAccountAddress:i,subAccountAddress:t.address,client:u,globalAccountRequest:this.sendRequestToPopup.bind(this),chainId:c})}let l="local"===a.account.type?a.account.address:a.account.publicKey,d=await oC({address:t.address,factory:t.factory,factoryData:t.factoryData,publicKey:l,client:u});if(-1===d){let t=rv.get(e);tG({method:e.method,correlationId:t});try{d=await oO({ownerAccount:a.account,globalAccountRequest:this.sendRequestToPopup.bind(this),chainId:c}),tq({method:e.method,correlationId:t})}catch(n){return tH({method:e.method,correlationId:t,errorMessage:tk(n)}),R.provider.unauthorized("failed to add sub account owner when sending request to sub account signer")}}let{request:f}=await oA({address:t.address,owner:a.account,client:u,factory:t.factory,factoryData:t.factoryData,parentAddress:i,attribution:s?{suffix:s}:void 0,ownerIndex:d});try{return await f(e)}catch(s){let n;let r=A.subAccountsConfig.get();if(r?.funding==="manual")throw s;if(H(s))n=JSON.parse(s.details);else if(q(s))n=s;else throw s;if(!(q(n)&&n.data)||!n.data)throw s;let a=rv.get(e);tz({method:e.method,correlationId:a});try{let r=await oT({errorData:n.data,globalAccountAddress:i,subAccountAddress:t.address,client:u,request:e,globalAccountRequest:this.request.bind(this)});return tK({method:e.method,correlationId:a}),r}catch(t){throw console.error(t),tV({method:e.method,correlationId:a,errorMessage:tk(t)}),s}}}}class oU extends tg{communicator;signer;constructor({metadata:e,preference:{walletUrl:t,...n}}){super(),this.communicator=new ty({url:t,metadata:e,preference:n}),this.signer=new oB({metadata:e,communicator:this.communicator,callback:this.emit.bind(this)})}async request(e){let t=crypto.randomUUID();rv.set(e,t),tv({method:e.method,correlationId:t});try{let n=await this._request(e);return tx({method:e.method,correlationId:t}),n}catch(n){throw tw({method:e.method,correlationId:t,errorMessage:tk(n)}),n}finally{rv.delete(e)}}async _request(e){try{if(!function(e){if(!e||"object"!=typeof e||Array.isArray(e))throw R.rpc.invalidParams({message:"Expected a single, non-array, object argument.",data:e});let{method:t,params:n}=e;if("string"!=typeof t||0===t.length)throw R.rpc.invalidParams({message:"'args.method' must be a non-empty string.",data:e});if(void 0!==n&&!Array.isArray(n)&&("object"!=typeof n||null===n))throw R.rpc.invalidParams({message:"'args.params' must be an object or array if provided.",data:e});switch(t){case"eth_sign":case"eth_signTypedData_v2":case"eth_subscribe":case"eth_unsubscribe":throw R.provider.unsupportedMethod()}}(e),!this.signer.isConnected)switch(e.method){case"eth_requestAccounts":await this.signer.handshake({method:"handshake"}),await s6(),await this.signer.request({method:"wallet_connect",params:[{version:"1",capabilities:{...A.subAccountsConfig.get()?.capabilities??{}}}]});break;case"wallet_connect":return await this.signer.handshake({method:"handshake"}),await this.signer.request(e);case"wallet_switchEthereumChain":break;case"wallet_sendCalls":case"wallet_sign":try{return await this.signer.handshake({method:"handshake"}),await this.signer.request(e)}finally{await this.signer.cleanup()}case"wallet_getCallsStatus":return await rU(e,o);case"eth_accounts":return[];case"net_version":return 1;case"eth_chainId":return tP(1);default:throw R.provider.unauthorized("Must call 'eth_requestAccounts' before other methods")}return await this.signer.request(e)}catch(t){let{code:e}=t;return e===I.provider.unauthorized&&await this.disconnect(),Promise.reject(function(e){let t=function(e,{shouldIncludeStack:t=!1}={}){var n,r;let a={};return e&&"object"==typeof e&&!Array.isArray(e)&&j(e,"code")&&Number.isInteger(n=e.code)&&(T[n.toString()]||(r=n)>=-32099&&r<=-32e3)?(a.code=e.code,e.message&&"string"==typeof e.message?(a.message=e.message,j(e,"data")&&(a.data=e.data)):(a.message=U(a.code),a.data={originalError:_(e)})):(a.code=I.rpc.internal,a.message=N(e,"message")?e.message:B,a.data={originalError:_(e)}),t&&(a.stack=N(e,"stack")?e.stack:void 0),a}(function(e){if("string"==typeof e)return{message:e,code:I.rpc.internal};if(void 0!==e.errorMessage){let t=e.errorMessage,n=e.errorCode??(t.match(/(denied|rejected)/i)?I.provider.userRejectedRequest:void 0);return{...e,message:t,code:n,data:{method:e.method}}}return e}(e),{shouldIncludeStack:!0}),n=new URL("https://docs.cloud.coinbase.com/wallet-sdk/docs/errors");return n.searchParams.set("version",u),n.searchParams.set("code",t.code.toString()),n.searchParams.set("message",t.message),{...t,docUrl:n.href}}(t))}}async disconnect(){await this.signer.cleanup(),rv.clear(),this.emit("disconnect",R.provider.disconnected("User initiated disconnection"))}isBaseAccount=!0}function o_(e){let t={metadata:{appName:e.appName||"App",appLogoUrl:e.appLogoUrl||"",appChainIds:e.appChainIds||[]},preference:e.preference??{},paymasterUrls:e.paymasterUrls};e.subAccounts?.toOwnerAccount&&J(e.subAccounts.toOwnerAccount),A.subAccountsConfig.set({toOwnerAccount:e.subAccounts?.toOwnerAccount,creation:e.subAccounts?.creation??"manual",defaultAccount:e.subAccounts?.defaultAccount??"universal",funding:e.subAccounts?.funding??"spend-permissions"}),A.config.set(t),A.persist.rehydrate(),Z(),function(e){if(e){if(e.attribution&&void 0!==e.attribution.auto&&void 0!==e.attribution.dataSuffix)throw Error("Attribution cannot contain both auto and dataSuffix properties");if(e.telemetry&&"boolean"!=typeof e.telemetry)throw Error("Telemetry must be a boolean")}}(t.preference),!1!==t.preference.telemetry&&C();let n=null,r={getProvider:()=>(n||(n=function(){let e=window.top?.ethereum??window.ethereum;return e?.isCoinbaseBrowser?e:null}()??new oU(t)),n),subAccount:{create:async e=>await r.getProvider()?.request({method:"wallet_addSubAccount",params:[{version:"1",account:e}]}),async get(){let e=A.subAccounts.get();if(e?.address)return e;let t=await r.getProvider()?.request({method:"wallet_connect",params:[{version:"1",capabilities:{}}]}),n=t.accounts[0].capabilities?.subAccounts;return Array.isArray(n)?n[0]:null},addOwner:async({address:e,publicKey:t,chainId:n})=>{let a=A.subAccounts.get(),i=A.account.get();z(i,Error("account does not exist")),z(a?.address,Error("subaccount does not exist"));let s=[];if(t){let[e,n]=(0,Y.r)([{type:"bytes32"},{type:"bytes32"}],t);s.push({to:a.address,data:(0,Q.R)({abi:P,functionName:"addOwnerPublicKey",args:[e,n]}),value:(0,X.NC)(0)})}return e&&s.push({to:a.address,data:(0,Q.R)({abi:P,functionName:"addOwnerAddress",args:[e]}),value:(0,X.NC)(0)}),await r.getProvider()?.request({method:"wallet_sendCalls",params:[{calls:s,chainId:X.NC(n),from:i.accounts?.[0],version:"1"}]})},setToOwnerAccount(e){J(e),A.subAccountsConfig.set({toOwnerAccount:e})}}};return r}},34557:function(e,t,n){n.d(t,{$:function(){return c}});var r=n(69921),a=n(36826),i=n(72932),s=n(13550),o=n(89361);async function c(e,t){async function n(t){if(t.endsWith(o.ny.slice(2))){let n=(0,a.f)((0,r.p5)(t,-64,-32)),s=(0,r.p5)(t,0,-64).slice(2).match(/.{1,64}/g),c=await Promise.all(s.map(t=>o.rC.slice(2)!==t?e.request({method:"eth_getTransactionReceipt",params:[`0x${t}`]},{dedupe:!0}):void 0)),u=c.some(e=>null===e)?100:c.every(e=>e?.status==="0x1")?200:c.every(e=>e?.status==="0x0")?500:600;return{atomic:!1,chainId:(0,i.ly)(n),receipts:c.filter(Boolean),status:u,version:"2.0.0"}}return e.request({method:"wallet_getCallsStatus",params:[t]})}let{atomic:c=!1,chainId:u,receipts:l,version:d="2.0.0",...f}=await n(t.id),[p,m]=(()=>{let e=f.status;return e>=100&&e<200?["pending",e]:e>=200&&e<300?["success",e]:e>=300&&e<700?["failure",e]:"CONFIRMED"===e?["success",200]:"PENDING"===e?["pending",100]:[void 0,e]})();return{...f,atomic:c,chainId:u?(0,i.ly)(u):void 0,receipts:l?.map(e=>({...e,blockNumber:i.y_(e.blockNumber),gasUsed:i.y_(e.gasUsed),status:s.ew[e.status]}))??[],statusCode:m,status:p,version:d}}},89239:function(e,t,n){n.d(t,{x:function(){return u}});var r=n(19775),a=n(65704),i=n(93637),s=n(82645),o=n(12363),c=n(16689);async function u(e,t){let{account:n=e.account,chainId:u,nonce:l}=t;if(!n)throw new a.o({docsPath:"/docs/eip7702/prepareAuthorization"});let d=(0,r.T)(n),f=(()=>{if(t.executor)return"self"===t.executor?t.executor:(0,r.T)(t.executor)})(),p={address:t.contractAddress??t.address,chainId:u,nonce:l};return void 0===p.chainId&&(p.chainId=e.chain?.id??await (0,s.s)(e,o.L,"getChainId")({})),void 0===p.nonce&&(p.nonce=await (0,s.s)(e,c.K,"getTransactionCount")({address:d.address,blockTag:"pending"}),("self"===f||f?.address&&(0,i.E)(f.address,d.address))&&(p.nonce+=1)),p}},89361:function(e,t,n){n.d(t,{ny:function(){return f},rC:function(){return p},s_:function(){return m}});var r=n(19775),a=n(81544),i=n(77014),s=n(17283),o=n(89256),c=n(72932),u=n(59455),l=n(93606),d=n(41709);let f="0x5792579257925792579257925792579257925792579257925792579257925792",p=(0,u.eC)(0,{size:32});async function m(e,t){let{account:n=e.account,capabilities:m,chain:h=e.chain,experimental_fallback:y,experimental_fallbackDelay:b=32,forceAtomic:g=!1,id:v,version:w="2.0.0"}=t,x=n?(0,r.T)(n):null,k=t.calls.map(e=>{let t=e.abi?(0,s.R)({abi:e.abi,functionName:e.functionName,args:e.args}):e.data;return{data:e.dataSuffix&&t?(0,o.zo)([t,e.dataSuffix]):t,to:e.to,value:e.value?(0,u.eC)(e.value):void 0}});try{let t=await e.request({method:"wallet_sendCalls",params:[{atomicRequired:g,calls:k,capabilities:m,chainId:(0,u.eC)(h.id),from:x?.address,id:v,version:w}]},{retryCount:0});if("string"==typeof t)return{id:t};return t}catch(n){if(y&&("MethodNotFoundRpcError"===n.name||"MethodNotSupportedRpcError"===n.name||"UnknownRpcError"===n.name||n.details.toLowerCase().includes("does not exist / is not available")||n.details.toLowerCase().includes("missing or invalid. request()")||n.details.toLowerCase().includes("did not match any variant of untagged enum")||n.details.toLowerCase().includes("account upgraded to unsupported contract")||n.details.toLowerCase().includes("eip-7702 not supported")||n.details.toLowerCase().includes("unsupported wc_ method")||n.details.toLowerCase().includes("feature toggled misconfigured")||n.details.toLowerCase().includes("jsonrpcengine: response has no error or result for request"))){if(m&&Object.values(m).some(e=>!e.optional)){let e="non-optional `capabilities` are not supported on fallback to `eth_sendTransaction`.";throw new i.vl(new a.G(e,{details:e}))}if(g&&k.length>1){let e="`forceAtomic` is not supported on fallback to `eth_sendTransaction`.";throw new i.r0(new a.G(e,{details:e}))}let t=[];for(let n of k){let r=(0,d.T)(e,{account:x,chain:h,data:n.data,to:n.to,value:n.value?(0,c.y_)(n.value):void 0});t.push(r),b>0&&await new Promise(e=>setTimeout(e,b))}let n=await Promise.allSettled(t);if(n.every(e=>"rejected"===e.status))throw n[0].reason;let r=n.map(e=>"fulfilled"===e.status?e.value:p);return{id:(0,o.zo)([...r,(0,u.eC)(h.id,{size:32}),f])}}throw(0,l.$)(n,{...t,account:x,chain:t.chain})}}},88027:function(e,t,n){n.d(t,{l:function(){return f}});var r=n(81544);class a extends r.G{constructor(e){super(`Call bundle failed with status: ${e.statusCode}`,{name:"BundleFailedError"}),Object.defineProperty(this,"result",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.result=e}}var i=n(82645),s=n(36478),o=n(41495),c=n(56921),u=n(49287),l=n(31853),d=n(34557);async function f(e,t){let n;let{id:r,pollingInterval:f=e.pollingInterval,status:m=({statusCode:e})=>200===e||e>=300,retryCount:h=4,retryDelay:y=({count:e})=>200*~~(1<{let s=(0,o.$)(async()=>{let o=e=>{clearTimeout(n),s(),e(),E()};try{let n=await (0,u.J)(async()=>{let t=await (0,i.s)(e,d.$,"getCallsStatus")({id:r});if(g&&"failure"===t.status)throw new a(t);return t},{retryCount:h,delay:y});if(!m(n))return;o(()=>t.resolve(n))}catch(e){o(()=>t.reject(e))}},{interval:f,emitOnBegin:!0});return s});return n=b?setTimeout(()=>{E(),clearTimeout(n),k(new p({id:r}))},b):void 0,await w}class p extends r.G{constructor({id:e}){super(`Timed out while waiting for call bundle with id "${e}" to be confirmed.`,{name:"WaitForCallsStatusTimeoutError"})}}},70751:function(e,t,n){n.d(t,{v:function(){return i}});var r=n(82538),a=n(28332);function i(e){let{key:t="public",name:n="Public Client"}=e;return(0,r.e)({...e,key:t,name:n,type:"publicClient"}).extend(a.I)}}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/790.2d212f48acdb6fec.js b/frontend/.next/static/chunks/790.2d212f48acdb6fec.js new file mode 100644 index 0000000..f0c54f3 --- /dev/null +++ b/frontend/.next/static/chunks/790.2d212f48acdb6fec.js @@ -0,0 +1,3 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[790],{78313:function(t,e,i){i.d(e,{ec:function(){return u},i1:function(){return d},iv:function(){return a}});let s=globalThis,r=s.ShadowRoot&&(void 0===s.ShadyCSS||s.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,n=Symbol(),l=new WeakMap;class o{constructor(t,e,i){if(this._$cssResult$=!0,i!==n)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(r&&void 0===t){let i=void 0!==e&&1===e.length;i&&(t=l.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&l.set(e,t))}return t}toString(){return this.cssText}}let h=t=>new o("string"==typeof t?t:t+"",void 0,n),a=(t,...e)=>new o(1===t.length?t[0]:e.reduce((e,i,s)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[s+1],t[0]),t,n),u=(t,e)=>{if(r)t.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(let i of e){let e=document.createElement("style"),r=s.litNonce;void 0!==r&&e.setAttribute("nonce",r),e.textContent=i.cssText,t.appendChild(e)}},d=r?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(let i of t.cssRules)e+=i.cssText;return h(e)})(t):t},54910:function(t,e,i){i.d(e,{M:function(){return s}});let s=t=>(e,i)=>{void 0!==i?i.addInitializer(()=>{customElements.define(t,e)}):customElements.define(t,e)}},69709:function(t,e,i){i.d(e,{C:function(){return _}});var s=i(31498),r=Object.defineProperty,n=Object.defineProperties,l=Object.getOwnPropertyDescriptors,o=Object.getOwnPropertySymbols,h=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable,u=(t,e,i)=>e in t?r(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,d=(t,e)=>{for(var i in e||(e={}))h.call(e,i)&&u(t,i,e[i]);if(o)for(var i of o(e))a.call(e,i)&&u(t,i,e[i]);return t},c=(t,e)=>n(t,l(e));let p={attribute:!0,type:String,converter:s.Ts,reflect:!1,hasChanged:s.Qu},$=(t=p,e,i)=>{let{kind:s,metadata:r}=i,n=globalThis.litPropertyMetadata.get(r);if(void 0===n&&globalThis.litPropertyMetadata.set(r,n=new Map),n.set(i.name,t),"accessor"===s){let{name:s}=i;return{set(i){let r=e.get.call(this);e.set.call(this,i),this.requestUpdate(s,r,t)},init(e){return void 0!==e&&this.P(s,void 0,t),e}}}if("setter"===s){let{name:s}=i;return function(i){let r=this[s];e.call(this,i),this.requestUpdate(s,r,t)}}throw Error("Unsupported decorator location: "+s)};function _(t){return(e,i)=>"object"==typeof i?$(t,e,i):((t,e,i)=>{let s=e.hasOwnProperty(i);return e.constructor.createProperty(i,s?c(d({},t),{wrapped:!0}):t),s?Object.getOwnPropertyDescriptor(e,i):void 0})(t,e,i)}},31498:function(t,e,i){i.d(e,{Qu:function(){return v},Ts:function(){return f},fl:function(){return y}});var s,r=i(78313);let{is:n,defineProperty:l,getOwnPropertyDescriptor:o,getOwnPropertyNames:h,getOwnPropertySymbols:a,getPrototypeOf:u}=Object,d=globalThis,c=d.trustedTypes,p=c?c.emptyScript:"",$=d.reactiveElementPolyfillSupport,_=(t,e)=>t,f={toAttribute(t,e){switch(e){case Boolean:t=t?p:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},v=(t,e)=>!n(t,e),A={attribute:!0,type:String,converter:f,reflect:!1,hasChanged:v};null!=Symbol.metadata||(Symbol.metadata=Symbol("metadata")),null!=d.litPropertyMetadata||(d.litPropertyMetadata=new WeakMap);class y extends HTMLElement{static addInitializer(t){var e;this._$Ei(),(null!=(e=this.l)?e:this.l=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=A){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){let i=Symbol(),s=this.getPropertyDescriptor(t,i,e);void 0!==s&&l(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){var s;let{get:r,set:n}=null!=(s=o(this.prototype,t))?s:{get(){return this[e]},set(t){this[e]=t}};return{get(){return null==r?void 0:r.call(this)},set(e){let s=null==r?void 0:r.call(this);n.call(this,e),this.requestUpdate(t,s,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){var e;return null!=(e=this.elementProperties.get(t))?e:A}static _$Ei(){if(this.hasOwnProperty(_("elementProperties")))return;let t=u(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(_("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(_("properties"))){let t=this.properties;for(let e of[...h(t),...a(t)])this.createProperty(e,t[e])}let t=this[Symbol.metadata];if(null!==t){let e=litPropertyMetadata.get(t);if(void 0!==e)for(let[t,i]of e)this.elementProperties.set(t,i)}for(let[t,e]of(this._$Eh=new Map,this.elementProperties)){let i=this._$Eu(t,e);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t))for(let i of new Set(t.flat(1/0).reverse()))e.unshift((0,r.i1)(i));else void 0!==t&&e.push((0,r.i1)(t));return e}static _$Eu(t,e){let i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),null==(t=this.constructor.l)||t.forEach(t=>t(this))}addController(t){var e,i;(null!=(e=this._$EO)?e:this._$EO=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&(null==(i=t.hostConnected)||i.call(t))}removeController(t){var e;null==(e=this._$EO)||e.delete(t)}_$E_(){let t=new Map;for(let e of this.constructor.elementProperties.keys())this.hasOwnProperty(e)&&(t.set(e,this[e]),delete this[e]);t.size>0&&(this._$Ep=t)}createRenderRoot(){var t;let e=null!=(t=this.shadowRoot)?t:this.attachShadow(this.constructor.shadowRootOptions);return(0,r.ec)(e,this.constructor.elementStyles),e}connectedCallback(){var t;null!=this.renderRoot||(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null==(t=this._$EO)||t.forEach(t=>{var e;return null==(e=t.hostConnected)?void 0:e.call(t)})}enableUpdating(t){}disconnectedCallback(){var t;null==(t=this._$EO)||t.forEach(t=>{var e;return null==(e=t.hostDisconnected)?void 0:e.call(t)})}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EC(t,e){var i;let s=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,s);if(void 0!==r&&!0===s.reflect){let n=((null==(i=s.converter)?void 0:i.toAttribute)!==void 0?s.converter:f).toAttribute(e,s.type);this._$Em=t,null==n?this.removeAttribute(r):this.setAttribute(r,n),this._$Em=null}}_$AK(t,e){var i;let s=this.constructor,r=s._$Eh.get(t);if(void 0!==r&&this._$Em!==r){let t=s.getPropertyOptions(r),n="function"==typeof t.converter?{fromAttribute:t.converter}:(null==(i=t.converter)?void 0:i.fromAttribute)!==void 0?t.converter:f;this._$Em=r,this[r]=n.fromAttribute(e,t.type),this._$Em=null}}requestUpdate(t,e,i){var s;if(void 0!==t){if(null!=i||(i=this.constructor.getPropertyOptions(t)),!(null!=(s=i.hasChanged)?s:v)(this[t],e))return;this.P(t,e,i)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(t,e,i){var s;this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$Em!==t&&(null!=(s=this._$Ej)?s:this._$Ej=new Set).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}let t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(null!=this.renderRoot||(this.renderRoot=this.createRenderRoot()),this._$Ep){for(let[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}let t=this.constructor.elementProperties;if(t.size>0)for(let[e,i]of t)!0!==i.wrapped||this._$AL.has(e)||void 0===this[e]||this.P(e,this[e],i)}let e=!1,i=this._$AL;try{(e=this.shouldUpdate(i))?(this.willUpdate(i),null==(t=this._$EO)||t.forEach(t=>{var e;return null==(e=t.hostUpdate)?void 0:e.call(t)}),this.update(i)):this._$EU()}catch(t){throw e=!1,this._$EU(),t}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;null==(e=this._$EO)||e.forEach(t=>{var e;return null==(e=t.hostUpdated)?void 0:e.call(t)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&(this._$Ej=this._$Ej.forEach(t=>this._$EC(t,this[t]))),this._$EU()}updated(t){}firstUpdated(t){}}y.elementStyles=[],y.shadowRootOptions={mode:"open"},y[_("elementProperties")]=new Map,y[_("finalized")]=new Map,null==$||$({ReactiveElement:y}),(null!=(s=d.reactiveElementVersions)?s:d.reactiveElementVersions=[]).push("2.0.4")},48567:function(t,e,i){i.d(e,{oi:function(){return o}});var s,r,n=i(31498),l=i(38157);class o extends n.fl{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t;let e=super.createRenderRoot();return null!=(t=this.renderOptions).renderBefore||(t.renderBefore=e.firstChild),e}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=(0,l.sY)(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null==(t=this._$Do)||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null==(t=this._$Do)||t.setConnected(!1)}render(){return l.Jb}}o._$litElement$=!0,o.finalized=!0,null==(s=globalThis.litElementHydrateSupport)||s.call(globalThis,{LitElement:o});let h=globalThis.litElementPolyfillSupport;null==h||h({LitElement:o}),(null!=(r=globalThis.litElementVersions)?r:globalThis.litElementVersions=[]).push("4.0.6")},38157:function(t,e,i){var s;i.d(e,{Jb:function(){return C},YP:function(){return P},dy:function(){return w},sY:function(){return V}});let r=globalThis,n=r.trustedTypes,l=n?n.createPolicy("lit-html",{createHTML:t=>t}):void 0,o="$lit$",h=`lit$${Math.random().toFixed(9).slice(2)}$`,a="?"+h,u=`<${a}>`,d=document,c=()=>d.createComment(""),p=t=>null===t||"object"!=typeof t&&"function"!=typeof t,$=Array.isArray,_=t=>$(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]),f=`[ +\f\r]`,v=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,A=/-->/g,y=/>/g,m=RegExp(`>|${f}(?:([^\\s"'>=/]+)(${f}*=${f}*(?:[^ +\f\r"'\`<>=]|("|')|))|$)`,"g"),g=/'/g,b=/"/g,E=/^(?:script|style|textarea|title)$/i,S=t=>(e,...i)=>({_$litType$:t,strings:e,values:i}),w=S(1),P=S(2),C=Symbol.for("lit-noChange"),U=Symbol.for("lit-nothing"),O=new WeakMap,x=d.createTreeWalker(d,129);function T(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==l?l.createHTML(e):e}let H=(t,e)=>{let i=t.length-1,s=[],r,n=2===e?"":"",l=v;for(let e=0;e"===d[0]?(l=null!=r?r:v,c=-1):void 0===d[1]?c=-2:(c=l.lastIndex-d[2].length,a=d[1],l=void 0===d[3]?m:'"'===d[3]?b:g):l===b||l===g?l=m:l===A||l===y?l=v:(l=m,r=void 0);let $=l===m&&t[e+1].startsWith("/>")?" ":"";n+=l===v?i+u:c>=0?(s.push(a),i.slice(0,c)+o+i.slice(c)+h+$):i+h+(-2===c?e:$)}return[T(t,n+(t[i]||"")+(2===e?"":"")),s]};class N{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let r=0,l=0,u=t.length-1,d=this.parts,[p,$]=H(t,e);if(this.el=N.createElement(p,i),x.currentNode=this.el.content,2===e){let t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(s=x.nextNode())&&d.length0){s.textContent=n?n.emptyScript:"";for(let i=0;i2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=U}_$AI(t,e=this,i,s){let r=this.strings,n=!1;if(void 0===r)(n=!p(t=M(this,t,e,0))||t!==this._$AH&&t!==C)&&(this._$AH=t);else{let s,l;let o=t;for(t=r[0],s=0;s{var s,r;let n=null!=(s=null==i?void 0:i.renderBefore)?s:e,l=n._$litPart$;if(void 0===l){let t=null!=(r=null==i?void 0:i.renderBefore)?r:null;n._$litPart$=l=new k(e.insertBefore(c(),t),t,void 0,null!=i?i:{})}return l._$AI(t),l}}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/7941.f53ba4396375d65a.js b/frontend/.next/static/chunks/7941.f53ba4396375d65a.js new file mode 100644 index 0000000..3e3d37b --- /dev/null +++ b/frontend/.next/static/chunks/7941.f53ba4396375d65a.js @@ -0,0 +1,14 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7941],{17941:function(t,e,r){r.r(e),r.d(e,{PhUser:function(){return n}}),r(31498);var a=r(38157),s=r(48567),i=r(54910),o=r(69709),h=r(78313),p=Object.defineProperty,c=Object.getOwnPropertyDescriptor,l=(t,e,r,a)=>{for(var s,i=a>1?void 0:a?c(e,r):e,o=t.length-1;o>=0;o--)(s=t[o])&&(i=(a?s(e,r,i):s(i))||i);return a&&i&&p(e,r,i),i};let n=class extends s.oi{constructor(){super(...arguments),this.size="1em",this.weight="regular",this.color="currentColor",this.mirrored=!1}render(){var t;return(0,a.dy)` + ${n.weightsMap.get(null!=(t=this.weight)?t:"regular")} + `}};n.weightsMap=new Map([["thin",(0,a.YP)``],["light",(0,a.YP)``],["regular",(0,a.YP)``],["bold",(0,a.YP)``],["fill",(0,a.YP)``],["duotone",(0,a.YP)``]]),n.styles=(0,h.iv)` + :host { + display: contents; + } + `,l([(0,o.C)({type:String,reflect:!0})],n.prototype,"size",2),l([(0,o.C)({type:String,reflect:!0})],n.prototype,"weight",2),l([(0,o.C)({type:String,reflect:!0})],n.prototype,"color",2),l([(0,o.C)({type:Boolean,reflect:!0})],n.prototype,"mirrored",2),n=l([(0,i.M)("ph-user")],n)}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/7cb1fa1f-e2a738e1ceae6d07.js b/frontend/.next/static/chunks/7cb1fa1f-e2a738e1ceae6d07.js new file mode 100644 index 0000000..18f57f6 --- /dev/null +++ b/frontend/.next/static/chunks/7cb1fa1f-e2a738e1ceae6d07.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[52],{61606:function(e,t,r){!function(e){"use strict";let t;var n,i,s,o,a,l,h,u,d,c,g,f,w,A,C,E,m,_,I,S,p,T,R=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},N=function(e){function t(t){var r,n,i,s,o=this.constructor,a=e.call(this,t)||this;return Object.defineProperty(a,"name",{value:o.name,enumerable:!1}),r=o.prototype,(n=Object.setPrototypeOf)?n(a,r):a.__proto__=r,void 0===i&&(i=a.constructor),(s=Error.captureStackTrace)&&s(a,i),a}return function(e,t){function r(){this.constructor=e}R(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}(t,e),t}(Error);class D extends N{constructor(e){super(e),this.message=e}getKind(){return this.constructor.kind}}D.kind="Exception";class y extends D{}y.kind="ArgumentException";class O extends D{}O.kind="IllegalArgumentException";class M{constructor(e){if(this.binarizer=e,null===e)throw new O("Binarizer must be non-null.")}getWidth(){return this.binarizer.getWidth()}getHeight(){return this.binarizer.getHeight()}getBlackRow(e,t){return this.binarizer.getBlackRow(e,t)}getBlackMatrix(){return(null===this.matrix||void 0===this.matrix)&&(this.matrix=this.binarizer.getBlackMatrix()),this.matrix}isCropSupported(){return this.binarizer.getLuminanceSource().isCropSupported()}crop(e,t,r,n){let i=this.binarizer.getLuminanceSource().crop(e,t,r,n);return new M(this.binarizer.createBinarizer(i))}isRotateSupported(){return this.binarizer.getLuminanceSource().isRotateSupported()}rotateCounterClockwise(){let e=this.binarizer.getLuminanceSource().rotateCounterClockwise();return new M(this.binarizer.createBinarizer(e))}rotateCounterClockwise45(){let e=this.binarizer.getLuminanceSource().rotateCounterClockwise45();return new M(this.binarizer.createBinarizer(e))}toString(){try{return this.getBlackMatrix().toString()}catch(e){return""}}}class B extends D{static getChecksumInstance(){return new B}}B.kind="ChecksumException";class b{constructor(e){this.source=e}getLuminanceSource(){return this.source}getWidth(){return this.source.getWidth()}getHeight(){return this.source.getHeight()}}class P{static arraycopy(e,t,r,n,i){for(;i--;)r[n++]=e[t++]}static currentTimeMillis(){return Date.now()}}class L extends D{}L.kind="IndexOutOfBoundsException";class F extends L{constructor(e,t){super(t),this.index=e,this.message=t}}F.kind="ArrayIndexOutOfBoundsException";class v{static fill(e,t){for(let r=0,n=e.length;rr)throw new O("fromIndex("+t+") > toIndex("+r+")");if(t<0)throw new F(t);if(r>e)throw new F(r)}static asList(...e){return e}static create(e,t,r){return Array.from({length:e}).map(e=>Array.from({length:t}).fill(r))}static createInt32Array(e,t,r){return Array.from({length:e}).map(e=>Int32Array.from({length:t}).fill(r))}static equals(e,t){if(!e||!t||!e.length||!t.length||e.length!==t.length)return!1;for(let r=0,n=e.length;r>1,o=r(t,e[s]);if(o>0)n=s+1;else{if(!(o<0))return s;i=s-1}}return-n-1}static numberComparator(e,t){return e-t}}class k{static numberOfTrailingZeros(e){let t;if(0===e)return 32;let r=31;return 0!=(t=e<<16)&&(r-=16,e=t),0!=(t=e<<8)&&(r-=8,e=t),0!=(t=e<<4)&&(r-=4,e=t),0!=(t=e<<2)&&(r-=2,e=t),r-(e<<1>>>31)}static numberOfLeadingZeros(e){if(0===e)return 32;let t=1;return e>>>16==0&&(t+=16,e<<=16),e>>>24==0&&(t+=8,e<<=8),e>>>28==0&&(t+=4,e<<=4),e>>>30==0&&(t+=2,e<<=2),t-=e>>>31}static toHexString(e){return e.toString(16)}static toBinaryString(e){return String(parseInt(String(e),2))}static bitCount(e){return e-=e>>>1&1431655765,e=(e=(858993459&e)+(e>>>2&858993459))+(e>>>4)&252645135,e+=e>>>8,63&(e+=e>>>16)}static truncDivision(e,t){return Math.trunc(e/t)}static parseInt(e,t){return parseInt(e,t)}}k.MIN_VALUE_32_BITS=-2147483648,k.MAX_VALUE=Number.MAX_SAFE_INTEGER;class x{constructor(e,t){void 0===e?(this.size=0,this.bits=new Int32Array(1)):(this.size=e,null==t?this.bits=x.makeArray(e):this.bits=t)}getSize(){return this.size}getSizeInBytes(){return Math.floor((this.size+7)/8)}ensureCapacity(e){if(e>32*this.bits.length){let t=x.makeArray(e);P.arraycopy(this.bits,0,t,0,this.bits.length),this.bits=t}}get(e){return(this.bits[Math.floor(e/32)]&1<<(31&e))!=0}set(e){this.bits[Math.floor(e/32)]|=1<<(31&e)}flip(e){this.bits[Math.floor(e/32)]^=1<<(31&e)}getNextSet(e){let t=this.size;if(e>=t)return t;let r=this.bits,n=Math.floor(e/32),i=r[n];i&=~((1<<(31&e))-1);let s=r.length;for(;0===i;){if(++n===s)return t;i=r[n]}let o=32*n+k.numberOfTrailingZeros(i);return o>t?t:o}getNextUnset(e){let t=this.size;if(e>=t)return t;let r=this.bits,n=Math.floor(e/32),i=~r[n];i&=~((1<<(31&e))-1);let s=r.length;for(;0===i;){if(++n===s)return t;i=~r[n]}let o=32*n+k.numberOfTrailingZeros(i);return o>t?t:o}setBulk(e,t){this.bits[Math.floor(e/32)]=t}setRange(e,t){if(tthis.size)throw new O;if(t===e)return;let r=Math.floor(e/32),n=Math.floor(--t/32),i=this.bits;for(let s=r;s<=n;s++){let o=s>r?0:31&e,a=(2<<(sthis.size)throw new O;if(t===e)return!0;let n=Math.floor(e/32),i=Math.floor(--t/32),s=this.bits;for(let o=n;o<=i;o++){let a=o>n?0:31&e,l=(2<<(o32)throw new O("Num bits must be between 0 and 32");this.ensureCapacity(this.size+t);for(let r=t;r>0;r--)this.appendBit((e>>r-1&1)==1)}appendBitArray(e){let t=e.size;this.ensureCapacity(this.size+t);for(let r=0;r>1&1431655765|(1431655765&r)<<1)>>2&858993459|(858993459&r)<<2)>>4&252645135|(252645135&r)<<4)>>8&16711935|(16711935&r)<<8)>>16&65535|(65535&r)<<16,e[t-i]=r}if(this.size!==32*r){let t=32*r-this.size,n=e[0]>>>t;for(let i=1;i>>t}e[r-1]=n}this.bits=e}static makeArray(e){return new Int32Array(Math.floor((e+31)/32))}equals(e){return e instanceof x&&this.size===e.size&&v.equals(this.bits,e.bits)}hashCode(){return 31*this.size+v.hashCode(this.bits)}toString(){let e="";for(let t=0,r=this.size;t=900)throw new U("incorect value");let t=H.VALUES_TO_ECI.get(e);if(void 0===t)throw new U("incorect value");return t}static getCharacterSetECIByName(e){let t=H.NAME_TO_ECI.get(e);if(void 0===t)throw new U("incorect value");return t}equals(e){return e instanceof H&&this.getName()===e.getName()}}H.VALUE_IDENTIFIER_TO_ECI=new Map,H.VALUES_TO_ECI=new Map,H.NAME_TO_ECI=new Map,H.Cp437=new H(w.Cp437,Int32Array.from([0,2]),"Cp437"),H.ISO8859_1=new H(w.ISO8859_1,Int32Array.from([1,3]),"ISO-8859-1","ISO88591","ISO8859_1"),H.ISO8859_2=new H(w.ISO8859_2,4,"ISO-8859-2","ISO88592","ISO8859_2"),H.ISO8859_3=new H(w.ISO8859_3,5,"ISO-8859-3","ISO88593","ISO8859_3"),H.ISO8859_4=new H(w.ISO8859_4,6,"ISO-8859-4","ISO88594","ISO8859_4"),H.ISO8859_5=new H(w.ISO8859_5,7,"ISO-8859-5","ISO88595","ISO8859_5"),H.ISO8859_6=new H(w.ISO8859_6,8,"ISO-8859-6","ISO88596","ISO8859_6"),H.ISO8859_7=new H(w.ISO8859_7,9,"ISO-8859-7","ISO88597","ISO8859_7"),H.ISO8859_8=new H(w.ISO8859_8,10,"ISO-8859-8","ISO88598","ISO8859_8"),H.ISO8859_9=new H(w.ISO8859_9,11,"ISO-8859-9","ISO88599","ISO8859_9"),H.ISO8859_10=new H(w.ISO8859_10,12,"ISO-8859-10","ISO885910","ISO8859_10"),H.ISO8859_11=new H(w.ISO8859_11,13,"ISO-8859-11","ISO885911","ISO8859_11"),H.ISO8859_13=new H(w.ISO8859_13,15,"ISO-8859-13","ISO885913","ISO8859_13"),H.ISO8859_14=new H(w.ISO8859_14,16,"ISO-8859-14","ISO885914","ISO8859_14"),H.ISO8859_15=new H(w.ISO8859_15,17,"ISO-8859-15","ISO885915","ISO8859_15"),H.ISO8859_16=new H(w.ISO8859_16,18,"ISO-8859-16","ISO885916","ISO8859_16"),H.SJIS=new H(w.SJIS,20,"SJIS","Shift_JIS"),H.Cp1250=new H(w.Cp1250,21,"Cp1250","windows-1250"),H.Cp1251=new H(w.Cp1251,22,"Cp1251","windows-1251"),H.Cp1252=new H(w.Cp1252,23,"Cp1252","windows-1252"),H.Cp1256=new H(w.Cp1256,24,"Cp1256","windows-1256"),H.UnicodeBigUnmarked=new H(w.UnicodeBigUnmarked,25,"UnicodeBigUnmarked","UTF-16BE","UnicodeBig"),H.UTF8=new H(w.UTF8,26,"UTF8","UTF-8"),H.ASCII=new H(w.ASCII,Int32Array.from([27,170]),"ASCII","US-ASCII"),H.Big5=new H(w.Big5,28,"Big5"),H.GB18030=new H(w.GB18030,29,"GB18030","GB2312","EUC_CN","GBK"),H.EUC_KR=new H(w.EUC_KR,30,"EUC_KR","EUC-KR");class G extends D{}G.kind="UnsupportedOperationException";class X{static decode(e,t){let r=this.encodingName(t);return this.customDecoder?this.customDecoder(e,r):"undefined"==typeof TextDecoder||this.shouldDecodeOnFallback(r)?this.decodeFallback(e,r):new TextDecoder(r).decode(e)}static shouldDecodeOnFallback(e){return!X.isBrowser()&&"ISO-8859-1"===e}static encode(e,t){let r=this.encodingName(t);return this.customEncoder?this.customEncoder(e,r):"undefined"==typeof TextEncoder?this.encodeFallback(e):new TextEncoder().encode(e)}static isBrowser(){return"undefined"!=typeof window&&"[object Window]"===({}).toString.call(window)}static encodingName(e){return"string"==typeof e?e:e.getName()}static encodingCharacterSet(e){return e instanceof H?e:H.getCharacterSetECIByName(e)}static decodeFallback(e,t){let r=this.encodingCharacterSet(t);if(X.isDecodeFallbackSupported(r)){let t="";for(let r=0,n=e.length;r3&&239===e[0]&&187===e[1]&&191===e[2];for(let t=0;t0?(128&r)==0?s=!1:o--:(128&r)!=0&&((64&r)==0?s=!1:(o++,(32&r)==0?a++:(o++,(16&r)==0?l++:(o++,(8&r)==0?h++:s=!1))))),n&&(r>127&&r<160?n=!1:r>159&&(r<192||215===r||247===r)&&A++),i&&(u>0?r<64||127===r||r>252?i=!1:u--:128===r||160===r||r>239?i=!1:r>160&&r<224?(d++,g=0,++c>f&&(f=c)):r>127?(u++,c=0,++g>w&&(w=g)):(c=0,g=0))}return(s&&o>0&&(s=!1),i&&u>0&&(i=!1),s&&(C||a+l+h>0))?W.UTF8:i&&(W.ASSUME_SHIFT_JIS||f>=3||w>=3)?W.SHIFT_JIS:n&&i?2===f&&2===d||10*A>=r?W.SHIFT_JIS:W.ISO88591:n?W.ISO88591:i?W.SHIFT_JIS:s?W.UTF8:W.PLATFORM_DEFAULT_ENCODING}static format(e,...t){let r=-1;return e.replace(/%(-)?(0?[0-9]+)?([.][0-9]+)?([#][0-9]+)?([scfpexd%])/g,function(e,n,i,s,o,a){let l;if("%%"===e)return"%";if(void 0===t[++r])return;e=s?parseInt(s.substr(1)):void 0;let h=o?parseInt(o.substr(1)):void 0;switch(a){case"s":l=t[r];break;case"c":l=t[r][0];break;case"f":l=parseFloat(t[r]).toFixed(e);break;case"p":l=parseFloat(t[r]).toPrecision(e);break;case"e":l=parseFloat(t[r]).toExponential(e);break;case"x":l=parseInt(t[r]).toString(h||16);break;case"d":l=parseFloat(parseInt(t[r],h||10).toPrecision(e)).toFixed(0)}l="object"==typeof l?JSON.stringify(l):(+l).toString(h);let u=parseInt(i),d=i&&i[0]+""=="0"?"0":" ";for(;l.lengths){if(-1===o)o=i-s;else if(i-s!==o)throw new O("row lengths do not match");s=i,a++}l++}else if(e.substring(l,l+t.length)===t)l+=t.length,n[i]=!0,i++;else if(e.substring(l,l+r.length)===r)l+=r.length,n[i]=!1,i++;else throw new O("illegal character encountered: "+e.substring(l));if(i>s){if(-1===o)o=i-s;else if(i-s!==o)throw new O("row lengths do not match");a++}let h=new Y(o,a);for(let e=0;e>>(31&e)&1)!=0}set(e,t){let r=t*this.rowSize+Math.floor(e/32);this.bits[r]|=1<<(31&e)&4294967295}unset(e,t){let r=t*this.rowSize+Math.floor(e/32);this.bits[r]&=~(1<<(31&e)&4294967295)}flip(e,t){let r=t*this.rowSize+Math.floor(e/32);this.bits[r]^=1<<(31&e)&4294967295}xor(e){if(this.width!==e.getWidth()||this.height!==e.getHeight()||this.rowSize!==e.getRowSize())throw new O("input matrix dimensions do not match");let t=new x(Math.floor(this.width/32)+1),r=this.rowSize,n=this.bits;for(let i=0,s=this.height;ithis.height||i>this.width)throw new O("The region must fit inside the matrix");let o=this.rowSize,a=this.bits;for(let r=t;ra&&(a=e),32*to){let e=31;for(;l>>>e==0;)e--;32*t+e>o&&(o=32*t+e)}}}return o=0&&0===t[r];)r--;if(r<0)return null;let n=Math.floor(r/e),i=32*Math.floor(r%e),s=t[r],o=31;for(;s>>>o==0;)o--;return i+=o,Int32Array.from([i,n])}getWidth(){return this.width}getHeight(){return this.height}getRowSize(){return this.rowSize}equals(e){return e instanceof Y&&this.width===e.width&&this.height===e.height&&this.rowSize===e.rowSize&&v.equals(this.bits,e.bits)}hashCode(){let e=this.width;return 31*(e=31*(e=31*(e=31*e+this.width)+this.height)+this.rowSize)+v.hashCode(this.bits)}toString(e="X ",t=" ",r="\n"){return this.buildToString(e,t,r)}buildToString(e,t,r){let n=new z;for(let i=0,s=this.height;i>K.LUMINANCE_SHIFT]++;let o=K.estimateBlackPoint(s);if(n<3)for(let e=0;e>K.LUMINANCE_SHIFT]++}}let s=K.estimateBlackPoint(i),o=e.getMatrix();for(let e=0;ei&&(n=s,i=e[s]),e[s]>r&&(r=e[s]);let s=0,o=0;for(let r=0;ro&&(s=r,o=i)}if(n>s){let e=n;n=s,s=e}if(s-n<=t/16)throw new Z;let a=s-1,l=-1;for(let t=s-1;t>n;t--){let i=t-n,o=i*i*(s-t)*(r-e[t]);o>l&&(a=t,l=o)}return a<=q.MINIMUM_DIMENSION&&r>=q.MINIMUM_DIMENSION){let n=e.getMatrix(),i=t>>q.BLOCK_SIZE_POWER;(t&q.BLOCK_SIZE_MASK)!=0&&i++;let s=r>>q.BLOCK_SIZE_POWER;(r&q.BLOCK_SIZE_MASK)!=0&&s++;let o=q.calculateBlackPoints(n,i,s,t,r),a=new Y(t,r);q.calculateThresholdForBlock(n,i,s,t,r,o,a),this.matrix=a}else this.matrix=super.getBlackMatrix();return this.matrix}createBinarizer(e){return new q(e)}static calculateThresholdForBlock(e,t,r,n,i,s,o){let a=i-q.BLOCK_SIZE,l=n-q.BLOCK_SIZE;for(let i=0;ia&&(h=a);let u=q.cap(i,2,r-3);for(let r=0;rl&&(i=l);let a=q.cap(r,2,t-3),d=0;for(let e=-2;e<=2;e++){let t=s[u+e];d+=t[a-2]+t[a-1]+t[a]+t[a+1]+t[a+2]}let c=d/25;q.thresholdBlock(e,i,h,c,n,o)}}}static cap(e,t,r){return er?r:e}static thresholdBlock(e,t,r,n,i,s){for(let o=0,a=r*i+t;os&&(r=s);for(let s=0;so&&(t=o);let l=0,h=255,u=0;for(let i=0,s=r*n+t;iu&&(u=r)}if(u-h>q.MIN_DYNAMIC_RANGE)for(i++,s+=n;i>2*q.BLOCK_SIZE_POWER;if(u-h<=q.MIN_DYNAMIC_RANGE&&(d=h/2,i>0&&s>0)){let e=(a[i-1][s]+2*a[i][s-1]+a[i-1][s-1])/4;h>10,n[r]=i}return n}getRow(e,t){if(e<0||e>=this.getHeight())throw new O("Requested row is outside the image: "+e);let r=this.getWidth(),n=e*r;return null===t?t=this.buffer.slice(n,n+r):(t.lengthnew $(e.deviceId,e.label))})}findDeviceById(e){return ee(this,void 0,void 0,function*(){let t=yield this.listVideoInputDevices();return t?t.find(t=>t.deviceId===e):null})}decodeFromInputVideoDevice(e,t){return ee(this,void 0,void 0,function*(){return yield this.decodeOnceFromVideoDevice(e,t)})}decodeOnceFromVideoDevice(e,t){return ee(this,void 0,void 0,function*(){return this.reset(),yield this.decodeOnceFromConstraints({video:e?{deviceId:{exact:e}}:{facingMode:"environment"}},t)})}decodeOnceFromConstraints(e,t){return ee(this,void 0,void 0,function*(){let r=yield navigator.mediaDevices.getUserMedia(e);return yield this.decodeOnceFromStream(r,t)})}decodeOnceFromStream(e,t){return ee(this,void 0,void 0,function*(){this.reset();let r=yield this.attachStreamToVideo(e,t);return yield this.decodeOnce(r)})}decodeFromInputVideoDeviceContinuously(e,t,r){return ee(this,void 0,void 0,function*(){return yield this.decodeFromVideoDevice(e,t,r)})}decodeFromVideoDevice(e,t,r){return ee(this,void 0,void 0,function*(){return yield this.decodeFromConstraints({video:e?{deviceId:{exact:e}}:{facingMode:"environment"}},t,r)})}decodeFromConstraints(e,t,r){return ee(this,void 0,void 0,function*(){let n=yield navigator.mediaDevices.getUserMedia(e);return yield this.decodeFromStream(n,t,r)})}decodeFromStream(e,t,r){return ee(this,void 0,void 0,function*(){this.reset();let n=yield this.attachStreamToVideo(e,t);return yield this.decodeContinuously(n,r)})}stopAsyncDecode(){this._stopAsyncDecode=!0}stopContinuousDecode(){this._stopContinuousDecode=!0}attachStreamToVideo(e,t){return ee(this,void 0,void 0,function*(){let r=this.prepareVideoElement(t);return this.addVideoSource(r,e),this.videoElement=r,this.stream=e,yield this.playVideoOnLoadAsync(r),r})}playVideoOnLoadAsync(e){return new Promise((t,r)=>this.playVideoOnLoad(e,()=>t()))}playVideoOnLoad(e,t){this.videoEndedListener=()=>this.stopStreams(),this.videoCanPlayListener=()=>this.tryPlayVideo(e),e.addEventListener("ended",this.videoEndedListener),e.addEventListener("canplay",this.videoCanPlayListener),e.addEventListener("playing",t),this.tryPlayVideo(e)}isVideoPlaying(e){return e.currentTime>0&&!e.paused&&!e.ended&&e.readyState>2}tryPlayVideo(e){return ee(this,void 0,void 0,function*(){if(this.isVideoPlaying(e)){console.warn("Trying to play video that is already playing.");return}try{yield e.play()}catch(e){console.warn("It was not possible to play the video.")}})}getMediaElement(e,t){let r=document.getElementById(e);if(!r)throw new y(`element with id '${e}' not found`);if(r.nodeName.toLowerCase()!==t.toLowerCase())throw new y(`element with id '${e}' must be an ${t} element`);return r}decodeFromImage(e,t){if(!e&&!t)throw new y("either imageElement with a src set or an url must be provided");return t&&!e?this.decodeFromImageUrl(t):this.decodeFromImageElement(e)}decodeFromVideo(e,t){if(!e&&!t)throw new y("Either an element with a src set or an URL must be provided");return t&&!e?this.decodeFromVideoUrl(t):this.decodeFromVideoElement(e)}decodeFromVideoContinuously(e,t,r){if(void 0===e&&void 0===t)throw new y("Either an element with a src set or an URL must be provided");return t&&!e?this.decodeFromVideoUrlContinuously(t,r):this.decodeFromVideoElementContinuously(e,r)}decodeFromImageElement(e){if(!e)throw new y("An image element must be provided.");this.reset();let t=this.prepareImageElement(e);return this.imageElement=t,this.isImageLoaded(t)?this.decodeOnce(t,!1,!0):this._decodeOnLoadImage(t)}decodeFromVideoElement(e){let t=this._decodeFromVideoElementSetup(e);return this._decodeOnLoadVideo(t)}decodeFromVideoElementContinuously(e,t){let r=this._decodeFromVideoElementSetup(e);return this._decodeOnLoadVideoContinuously(r,t)}_decodeFromVideoElementSetup(e){if(!e)throw new y("A video element must be provided.");this.reset();let t=this.prepareVideoElement(e);return this.videoElement=t,t}decodeFromImageUrl(e){if(!e)throw new y("An URL must be provided.");this.reset();let t=this.prepareImageElement();this.imageElement=t;let r=this._decodeOnLoadImage(t);return t.src=e,r}decodeFromVideoUrl(e){if(!e)throw new y("An URL must be provided.");this.reset();let t=this.prepareVideoElement(),r=this.decodeFromVideoElement(t);return t.src=e,r}decodeFromVideoUrlContinuously(e,t){if(!e)throw new y("An URL must be provided.");this.reset();let r=this.prepareVideoElement(),n=this.decodeFromVideoElementContinuously(r,t);return r.src=e,n}_decodeOnLoadImage(e){return new Promise((t,r)=>{this.imageLoadedListener=()=>this.decodeOnce(e,!1,!0).then(t,r),e.addEventListener("load",this.imageLoadedListener)})}_decodeOnLoadVideo(e){return ee(this,void 0,void 0,function*(){return yield this.playVideoOnLoadAsync(e),yield this.decodeOnce(e)})}_decodeOnLoadVideoContinuously(e,t){return ee(this,void 0,void 0,function*(){yield this.playVideoOnLoadAsync(e),this.decodeContinuously(e,t)})}isImageLoaded(e){return!!e.complete&&0!==e.naturalWidth}prepareImageElement(e){let t;return void 0===e&&((t=document.createElement("img")).width=200,t.height=200),"string"==typeof e&&(t=this.getMediaElement(e,"img")),e instanceof HTMLImageElement&&(t=e),t}prepareVideoElement(e){let t;return e||"undefined"==typeof document||((t=document.createElement("video")).width=200,t.height=200),"string"==typeof e&&(t=this.getMediaElement(e,"video")),e instanceof HTMLVideoElement&&(t=e),t.setAttribute("autoplay","true"),t.setAttribute("muted","true"),t.setAttribute("playsinline","true"),t}decodeOnce(e,t=!0,r=!0){this._stopAsyncDecode=!1;let n=(i,s)=>{if(this._stopAsyncDecode){s(new Z("Video stream has ended before any code could be detected.")),this._stopAsyncDecode=void 0;return}try{let t=this.decode(e);i(t)}catch(a){let e=t&&a instanceof Z,o=a instanceof B||a instanceof U;if(e||o&&r)return setTimeout(n,this._timeBetweenDecodingAttempts,i,s);s(a)}};return new Promise((e,t)=>n(e,t))}decodeContinuously(e,t){this._stopContinuousDecode=!1;let r=()=>{if(this._stopContinuousDecode){this._stopContinuousDecode=void 0;return}try{let n=this.decode(e);t(n,null),setTimeout(r,this.timeBetweenScansMillis)}catch(i){t(null,i);let e=i instanceof B||i instanceof U,n=i instanceof Z;(e||n)&&setTimeout(r,this._timeBetweenDecodingAttempts)}};r()}decode(e){let t=this.createBinaryBitmap(e);return this.decodeBitmap(t)}_isHTMLVideoElement(e){return 0!==e.videoWidth}drawFrameOnCanvas(e,t,r){t||(t={sx:0,sy:0,sWidth:e.videoWidth,sHeight:e.videoHeight,dx:0,dy:0,dWidth:e.videoWidth,dHeight:e.videoHeight}),r||(r=this.captureCanvasContext),r.drawImage(e,t.sx,t.sy,t.sWidth,t.sHeight,t.dx,t.dy,t.dWidth,t.dHeight)}drawImageOnCanvas(e,t,r=this.captureCanvasContext){t||(t={sx:0,sy:0,sWidth:e.naturalWidth,sHeight:e.naturalHeight,dx:0,dy:0,dWidth:e.naturalWidth,dHeight:e.naturalHeight}),r||(r=this.captureCanvasContext),r.drawImage(e,t.sx,t.sy,t.sWidth,t.sHeight,t.dx,t.dy,t.dWidth,t.dHeight)}createBinaryBitmap(e){return this.getCaptureCanvasContext(e),this._isHTMLVideoElement(e)?this.drawFrameOnCanvas(e):this.drawImageOnCanvas(e),new M(new q(new J(this.getCaptureCanvas(e))))}getCaptureCanvasContext(e){if(!this.captureCanvasContext){let t=this.getCaptureCanvas(e).getContext("2d");this.captureCanvasContext=t}return this.captureCanvasContext}getCaptureCanvas(e){if(!this.captureCanvas){let t=this.createCaptureCanvas(e);this.captureCanvas=t}return this.captureCanvas}decodeBitmap(e){return this.reader.decode(e,this._hints)}createCaptureCanvas(e){let t,r;if("undefined"==typeof document)return this._destroyCaptureCanvas(),null;let n=document.createElement("canvas");return void 0!==e&&(e instanceof HTMLVideoElement?(t=e.videoWidth,r=e.videoHeight):e instanceof HTMLImageElement&&(t=e.naturalWidth||e.width,r=e.naturalHeight||e.height)),n.style.width=t+"px",n.style.height=r+"px",n.width=t,n.height=r,n}stopStreams(){this.stream&&(this.stream.getVideoTracks().forEach(e=>e.stop()),this.stream=void 0),!1===this._stopAsyncDecode&&this.stopAsyncDecode(),!1===this._stopContinuousDecode&&this.stopContinuousDecode()}reset(){this.stopStreams(),this._destroyVideoElement(),this._destroyImageElement(),this._destroyCaptureCanvas()}_destroyVideoElement(){this.videoElement&&(void 0!==this.videoEndedListener&&this.videoElement.removeEventListener("ended",this.videoEndedListener),void 0!==this.videoPlayingEventListener&&this.videoElement.removeEventListener("playing",this.videoPlayingEventListener),void 0!==this.videoCanPlayListener&&this.videoElement.removeEventListener("loadedmetadata",this.videoCanPlayListener),this.cleanVideoSource(this.videoElement),this.videoElement=void 0)}_destroyImageElement(){this.imageElement&&(void 0!==this.imageLoadedListener&&this.imageElement.removeEventListener("load",this.imageLoadedListener),this.imageElement.src=void 0,this.imageElement.removeAttribute("src"),this.imageElement=void 0)}_destroyCaptureCanvas(){this.captureCanvasContext=void 0,this.captureCanvas=void 0}addVideoSource(e,t){try{e.srcObject=t}catch(r){e.src=URL.createObjectURL(t)}}cleanVideoSource(e){try{e.srcObject=null}catch(t){e.src=""}this.videoElement.removeAttribute("src")}}class er{constructor(e,t,r=null==t?0:8*t.length,n,i,s=P.currentTimeMillis()){this.text=e,this.rawBytes=t,this.numBits=r,this.resultPoints=n,this.format=i,this.timestamp=s,this.text=e,this.rawBytes=t,null==r?this.numBits=null==t?0:8*t.length:this.numBits=r,this.resultPoints=n,this.format=i,this.resultMetadata=null,null==s?this.timestamp=P.currentTimeMillis():this.timestamp=s}getText(){return this.text}getRawBytes(){return this.rawBytes}getNumBits(){return this.numBits}getResultPoints(){return this.resultPoints}getBarcodeFormat(){return this.format}getResultMetadata(){return this.resultMetadata}putMetadata(e,t){null===this.resultMetadata&&(this.resultMetadata=new Map),this.resultMetadata.set(e,t)}putAllMetadata(e){null!==e&&(null===this.resultMetadata?this.resultMetadata=e:this.resultMetadata=new Map(e))}addResultPoints(e){let t=this.resultPoints;if(null===t)this.resultPoints=e;else if(null!==e&&e.length>0){let r=Array(t.length+e.length);P.arraycopy(t,0,r,0,t.length),P.arraycopy(e,0,r,t.length,e.length),this.resultPoints=r}}getTimestamp(){return this.timestamp}toString(){return this.text}}(s=A||(A={}))[s.AZTEC=0]="AZTEC",s[s.CODABAR=1]="CODABAR",s[s.CODE_39=2]="CODE_39",s[s.CODE_93=3]="CODE_93",s[s.CODE_128=4]="CODE_128",s[s.DATA_MATRIX=5]="DATA_MATRIX",s[s.EAN_8=6]="EAN_8",s[s.EAN_13=7]="EAN_13",s[s.ITF=8]="ITF",s[s.MAXICODE=9]="MAXICODE",s[s.PDF_417=10]="PDF_417",s[s.QR_CODE=11]="QR_CODE",s[s.RSS_14=12]="RSS_14",s[s.RSS_EXPANDED=13]="RSS_EXPANDED",s[s.UPC_A=14]="UPC_A",s[s.UPC_E=15]="UPC_E",s[s.UPC_EAN_EXTENSION=16]="UPC_EAN_EXTENSION";var en=A;(o=C||(C={}))[o.OTHER=0]="OTHER",o[o.ORIENTATION=1]="ORIENTATION",o[o.BYTE_SEGMENTS=2]="BYTE_SEGMENTS",o[o.ERROR_CORRECTION_LEVEL=3]="ERROR_CORRECTION_LEVEL",o[o.ISSUE_NUMBER=4]="ISSUE_NUMBER",o[o.SUGGESTED_PRICE=5]="SUGGESTED_PRICE",o[o.POSSIBLE_COUNTRY=6]="POSSIBLE_COUNTRY",o[o.UPC_EAN_EXTENSION=7]="UPC_EAN_EXTENSION",o[o.PDF417_EXTRA_METADATA=8]="PDF417_EXTRA_METADATA",o[o.STRUCTURED_APPEND_SEQUENCE=9]="STRUCTURED_APPEND_SEQUENCE",o[o.STRUCTURED_APPEND_PARITY=10]="STRUCTURED_APPEND_PARITY";var ei=C;class es{constructor(e,t,r,n,i=-1,s=-1){this.rawBytes=e,this.text=t,this.byteSegments=r,this.ecLevel=n,this.structuredAppendSequenceNumber=i,this.structuredAppendParity=s,this.numBits=null==e?0:8*e.length}getRawBytes(){return this.rawBytes}getNumBits(){return this.numBits}setNumBits(e){this.numBits=e}getText(){return this.text}getByteSegments(){return this.byteSegments}getECLevel(){return this.ecLevel}getErrorsCorrected(){return this.errorsCorrected}setErrorsCorrected(e){this.errorsCorrected=e}getErasures(){return this.erasures}setErasures(e){this.erasures=e}getOther(){return this.other}setOther(e){this.other=e}hasStructuredAppend(){return this.structuredAppendParity>=0&&this.structuredAppendSequenceNumber>=0}getStructuredAppendParity(){return this.structuredAppendParity}getStructuredAppendSequenceNumber(){return this.structuredAppendSequenceNumber}}class eo{exp(e){return this.expTable[e]}log(e){if(0===e)throw new O;return this.logTable[e]}static addOrSubtract(e,t){return e^t}}class ea{constructor(e,t){if(0===t.length)throw new O;this.field=e;let r=t.length;if(r>1&&0===t[0]){let e=1;for(;er.length){let e=t;t=r,r=e}let n=new Int32Array(r.length),i=r.length-t.length;P.arraycopy(r,0,n,0,i);for(let e=i;e=e.getDegree()&&!n.isZero();){let i=n.getDegree()-e.getDegree(),o=t.multiply(n.getCoefficient(n.getDegree()),s),a=e.multiplyByMonomial(i,o),l=t.buildMonomial(i,o);r=r.addOrSubtract(l),n=n.addOrSubtract(a)}return[r,n]}toString(){let e="";for(let t=this.getDegree();t>=0;t--){let r=this.getCoefficient(t);if(0!==r){if(r<0?(e+=" - ",r=-r):e.length>0&&(e+=" + "),0===t||1!==r){let t=this.field.log(r);0===t?e+="1":1===t?e+="a":e+="a^"+t}0!==t&&(1===t?e+="x":e+="x^"+t)}}return e}}class el extends D{}el.kind="ArithmeticException";class eh extends eo{constructor(e,t,r){super(),this.primitive=e,this.size=t,this.generatorBase=r;let n=new Int32Array(t),i=1;for(let r=0;r=t&&(i^=e,i&=t-1);this.expTable=n;let s=new Int32Array(t);for(let e=0;e=(r/2|0);){let e=i,t=o;if(i=s,o=a,i.isZero())throw new eu("r_{i-1} was zero");s=e;let r=n.getZero(),l=i.getCoefficient(i.getDegree()),h=n.inverse(l);for(;s.getDegree()>=i.getDegree()&&!s.isZero();){let e=s.getDegree()-i.getDegree(),t=n.multiply(s.getCoefficient(s.getDegree()),h);r=r.addOrSubtract(n.buildMonomial(e,t)),s=s.addOrSubtract(i.multiplyByMonomial(e,t))}if(a=r.multiply(o).addOrSubtract(t),s.getDegree()>=i.getDegree())throw new ed("Division algorithm failed to reduce polynomial?")}let l=a.getCoefficient(0);if(0===l)throw new eu("sigmaTilde(0) was zero");let h=n.inverse(l);return[a.multiplyScalar(h),s.multiplyScalar(h)]}findErrorLocations(e){let t=e.getDegree();if(1===t)return Int32Array.from([e.getCoefficient(1)]);let r=new Int32Array(t),n=0,i=this.field;for(let s=1;s=this.ddata.getNbLayers()?(r=6,t=eh.AZTEC_DATA_6):8>=this.ddata.getNbLayers()?(r=8,t=eh.AZTEC_DATA_8):22>=this.ddata.getNbLayers()?(r=10,t=eh.AZTEC_DATA_10):(r=12,t=eh.AZTEC_DATA_12);let n=this.ddata.getNbDatablocks(),i=e.length/r;if(i1,u,u+r-1),u+=r-1;else for(let e=r-1;e>=0;--e)h[u++]=(t&1<=8?eg.readCode(e,t,8):eg.readCode(e,t,r)<<8-r}static convertBoolArrayToByteArray(e){let t=new Uint8Array((e.length+7)/8);for(let r=0;r","?","[","]","{","}","CTRL_UL"],eg.DIGIT_TABLE=["CTRL_PS"," ","0","1","2","3","4","5","6","7","8","9",",",".","CTRL_UL","CTRL_US"];class ef{constructor(){}static round(e){return e<=Number.MIN_SAFE_INTEGER?Number.MIN_SAFE_INTEGER:e>=Number.MAX_SAFE_INTEGER?Number.MAX_SAFE_INTEGER:e+(e<0?-.5:.5)|0}static distance(e,t,r,n){let i=e-r,s=t-n;return Math.sqrt(i*i+s*s)}static sum(e){let t=0;for(let r=0,n=e.length;r!==n;r++)t+=e[r];return t}}class ew{static floatToIntBits(e){return e}}ew.MAX_VALUE=Number.MAX_SAFE_INTEGER;class eA{constructor(e,t){this.x=e,this.y=t}getX(){return this.x}getY(){return this.y}equals(e){return e instanceof eA&&this.x===e.x&&this.y===e.y}hashCode(){return 31*ew.floatToIntBits(this.x)+ew.floatToIntBits(this.y)}toString(){return"("+this.x+","+this.y+")"}static orderBestPatterns(e){let t,r,n;let i=this.distance(e[0],e[1]),s=this.distance(e[1],e[2]),o=this.distance(e[0],e[2]);if(s>=i&&s>=o?(r=e[0],t=e[1],n=e[2]):o>=s&&o>=i?(r=e[1],t=e[0],n=e[2]):(r=e[2],t=e[0],n=e[1]),0>this.crossProductZ(t,r,n)){let e=t;t=n,n=e}e[0]=t,e[1]=r,e[2]=n}static distance(e,t){return ef.distance(e.x,e.y,t.x,t.y)}static crossProductZ(e,t,r){let n=t.x,i=t.y;return(r.x-n)*(e.y-i)-(r.y-i)*(e.x-n)}}class eC{constructor(e,t){this.bits=e,this.points=t}getBits(){return this.bits}getPoints(){return this.points}}class eE extends eC{constructor(e,t,r,n,i){super(e,t),this.compact=r,this.nbDatablocks=n,this.nbLayers=i}getNbLayers(){return this.nbLayers}getNbDatablocks(){return this.nbDatablocks}isCompact(){return this.compact}}class em{constructor(e,t,r,n){this.image=e,this.height=e.getHeight(),this.width=e.getWidth(),null==t&&(t=em.INIT_SIZE),null==r&&(r=e.getWidth()/2|0),null==n&&(n=e.getHeight()/2|0);let i=t/2|0;if(this.leftInit=r-i,this.rightInit=r+i,this.upInit=n-i,this.downInit=n+i,this.upInit<0||this.leftInit<0||this.downInit>=this.height||this.rightInit>=this.width)throw new Z}detect(){let e=this.leftInit,t=this.rightInit,r=this.upInit,n=this.downInit,i=!1,s=!0,o=!1,a=!1,l=!1,h=!1,u=!1,d=this.width,c=this.height;for(;s;){s=!1;let g=!0;for(;(g||!a)&&t=d){i=!0;break}let f=!0;for(;(f||!l)&&n=c){i=!0;break}let w=!0;for(;(w||!h)&&e>=0;)(w=this.containsBlackPoint(r,n,e,!1))?(e--,s=!0,h=!0):!h&&e--;if(e<0){i=!0;break}let A=!0;for(;(A||!u)&&r>=0;)(A=this.containsBlackPoint(e,t,r,!0))?(r--,s=!0,u=!0):!u&&r--;if(r<0){i=!0;break}s&&(o=!0)}if(!i&&o){let i=t-e,s=null;for(let t=1;null===s&&tr||o<-1||o>n)throw new Z;i=!1,-1===s?(t[e]=0,i=!0):s===r&&(t[e]=r-1,i=!0),-1===o?(t[e+1]=0,i=!0):o===n&&(t[e+1]=n-1,i=!0)}i=!0;for(let e=t.length-2;e>=0&&i;e-=2){let s=Math.floor(t[e]),o=Math.floor(t[e+1]);if(s<-1||s>r||o<-1||o>n)throw new Z;i=!1,-1===s?(t[e]=0,i=!0):s===r&&(t[e]=r-1,i=!0),-1===o?(t[e+1]=0,i=!0):o===n&&(t[e+1]=n-1,i=!0)}}}class eI{constructor(e,t,r,n,i,s,o,a,l){this.a11=e,this.a21=t,this.a31=r,this.a12=n,this.a22=i,this.a32=s,this.a13=o,this.a23=a,this.a33=l}static quadrilateralToQuadrilateral(e,t,r,n,i,s,o,a,l,h,u,d,c,g,f,w){let A=eI.quadrilateralToSquare(e,t,r,n,i,s,o,a);return eI.squareToQuadrilateral(l,h,u,d,c,g,f,w).times(A)}transformPoints(e){let t=e.length,r=this.a11,n=this.a12,i=this.a13,s=this.a21,o=this.a22,a=this.a23,l=this.a31,h=this.a32,u=this.a33;for(let d=0;d>1&127):(n<<=10,n+=(t>>2&992)+(t>>1&31))}let i=this.getCorrectedParameterData(n,this.compact);this.compact?(this.nbLayers=(i>>6)+1,this.nbDataBlocks=(63&i)+1):(this.nbLayers=(i>>11)+1,this.nbDataBlocks=(2047&i)+1)}getRotation(e,t){let r=0;e.forEach((e,n,i)=>{r=(r<<3)+((e>>t-2<<1)+(1&e))}),r=((1&r)<<11)+(r>>1);for(let e=0;e<4;e++)if(2>=k.bitCount(r^this.EXPECTED_CORNER_BITS[e]))return e;throw new Z}getCorrectedParameterData(e,t){let r,n;t?(r=7,n=2):(r=10,n=4);let i=r-n,s=new Int32Array(r);for(let t=r-1;t>=0;--t)s[t]=15&e,e>>=4;try{new ec(eh.AZTEC_PARAM).decode(s,i)}catch(e){throw new Z}let o=0;for(let e=0;e2){let r=this.distancePoint(l,e)*this.nbCenterLayers/(this.distancePoint(i,t)*(this.nbCenterLayers+2));if(r<.75||r>1.25||!this.isWhiteOrBlackRectangle(e,o,a,l))break}t=e,r=o,n=a,i=l,s=!s}if(5!==this.nbCenterLayers&&7!==this.nbCenterLayers)throw new Z;this.compact=5===this.nbCenterLayers;let o=new eA(t.getX()+.5,t.getY()-.5),a=new eA(r.getX()+.5,r.getY()+.5),l=new eA(n.getX()-.5,n.getY()+.5),h=new eA(i.getX()-.5,i.getY()-.5);return this.expandSquare([o,a,l,h],2*this.nbCenterLayers-3,2*this.nbCenterLayers)}getMatrixCenter(){let e,t,r,n;try{let i=new em(this.image).detect();e=i[0],t=i[1],r=i[2],n=i[3]}catch(o){let i=this.image.getWidth()/2,s=this.image.getHeight()/2;e=this.getFirstDifferent(new eT(i+7,s-7),!1,1,-1).toResultPoint(),t=this.getFirstDifferent(new eT(i+7,s+7),!1,1,1).toResultPoint(),r=this.getFirstDifferent(new eT(i-7,s+7),!1,-1,1).toResultPoint(),n=this.getFirstDifferent(new eT(i-7,s-7),!1,-1,-1).toResultPoint()}let i=ef.round((e.getX()+n.getX()+t.getX()+r.getX())/4),s=ef.round((e.getY()+n.getY()+t.getY()+r.getY())/4);try{let o=new em(this.image,15,i,s).detect();e=o[0],t=o[1],r=o[2],n=o[3]}catch(o){e=this.getFirstDifferent(new eT(i+7,s-7),!1,1,-1).toResultPoint(),t=this.getFirstDifferent(new eT(i+7,s+7),!1,1,1).toResultPoint(),r=this.getFirstDifferent(new eT(i-7,s+7),!1,-1,1).toResultPoint(),n=this.getFirstDifferent(new eT(i-7,s-7),!1,-1,-1).toResultPoint()}return new eT(i=ef.round((e.getX()+n.getX()+t.getX()+r.getX())/4),s=ef.round((e.getY()+n.getY()+t.getY()+r.getY())/4))}getMatrixCornerPoints(e){return this.expandSquare(e,2*this.nbCenterLayers,this.getDimension())}sampleGrid(e,t,r,n,i){let s=ep.getInstance(),o=this.getDimension(),a=o/2-this.nbCenterLayers,l=o/2+this.nbCenterLayers;return s.sampleGrid(e,o,o,a,a,l,a,l,l,a,l,t.getX(),t.getY(),r.getX(),r.getY(),n.getX(),n.getY(),i.getX(),i.getY())}sampleLine(e,t,r){let n=0,i=this.distanceResultPoint(e,t),s=i/r,o=e.getX(),a=e.getY(),l=s*(t.getX()-e.getX())/i,h=s*(t.getY()-e.getY())/i;for(let e=0;e.1&&u<.9?0:u<=.1===l?1:-1}getFirstDifferent(e,t,r,n){let i=e.getX()+r,s=e.getY()+n;for(;this.isValid(i,s)&&this.image.get(i,s)===t;)i+=r,s+=n;for(i-=r,s-=n;this.isValid(i,s)&&this.image.get(i,s)===t;)i+=r;for(i-=r;this.isValid(i,s)&&this.image.get(i,s)===t;)s+=n;return new eT(i,s-=n)}expandSquare(e,t,r){let n=r/(2*t),i=e[0].getX()-e[2].getX(),s=e[0].getY()-e[2].getY(),o=(e[0].getX()+e[2].getX())/2,a=(e[0].getY()+e[2].getY())/2,l=new eA(o+n*i,a+n*s),h=new eA(o-n*i,a-n*s);return i=e[1].getX()-e[3].getX(),s=e[1].getY()-e[3].getY(),[l,new eA((o=(e[1].getX()+e[3].getX())/2)+n*i,(a=(e[1].getY()+e[3].getY())/2)+n*s),h,new eA(o-n*i,a-n*s)]}isValid(e,t){return e>=0&&e0&&t{r.foundPossibleResultPoint(e)})}}reset(){}}class eD extends et{constructor(e=500){super(new eN,e)}}class ey{decode(e,t){try{return this.doDecode(e,t)}catch(r){if(t&&!0===t.get(V.TRY_HARDER)&&e.isRotateSupported()){let r=e.rotateCounterClockwise(),n=this.doDecode(r,t),i=n.getResultMetadata(),s=270;null!==i&&!0===i.get(ei.ORIENTATION)&&(s+=i.get(ei.ORIENTATION)%360),n.putMetadata(ei.ORIENTATION,s);let o=n.getResultPoints();if(null!==o){let e=r.getHeight();for(let t=0;t>(o?8:5));r=o?i:15;let l=Math.trunc(i/2);for(let o=0;o=i)break;try{s=e.getBlackRow(h,s)}catch(e){continue}for(let e=0;e<2;e++){if(1===e&&(s.reverse(),t&&!0===t.get(V.NEED_RESULT_POINT_CALLBACK))){let e=new Map;t.forEach((t,r)=>e.set(r,t)),e.delete(V.NEED_RESULT_POINT_CALLBACK),t=e}try{let r=this.decodeRow(h,s,t);if(1===e){r.putMetadata(ei.ORIENTATION,180);let e=r.getResultPoints();null!==e&&(e[0]=new eA(n-e[0].getX()-1,e[0].getY()),e[1]=new eA(n-e[1].getX()-1,e[1].getY()))}return r}catch(e){}}}throw new Z}static recordPattern(e,t,r){let n=r.length;for(let e=0;e=i)throw new Z;let s=!e.get(t),o=0,a=t;for(;a0&&n>=0;)e.get(--t)!==i&&(n--,i=!i);if(n>=0)throw new Z;ey.recordPattern(e,t+1,r)}static patternMatchVariance(e,t,r){let n=e.length,i=0,s=0;for(let r=0;rs?n-s:s-n;if(l>r)return Number.POSITIVE_INFINITY;a+=l}return a/i}}class eO extends ey{static findStartPattern(e){let t=e.getSize(),r=e.getNextSet(0),n=0,i=Int32Array.from([0,0,0,0,0,0]),s=r,o=!1;for(let a=r;a=0&&e.isRange(Math.max(0,s-(a-s)/2),s,!1))return Int32Array.from([s,a,r]);s+=i[0]+i[1],(i=i.slice(2,i.length-1))[n-1]=0,i[n]=0,n--}else n++;i[n]=1,o=!o}throw new Z}static decodeCode(e,t,r){ey.recordPattern(e,r,t);let n=eO.MAX_AVG_VARIANCE,i=-1;for(let e=0;e=0)return i;throw new Z}decodeRow(e,t,r){let n;let i=r&&!0===r.get(V.ASSUME_GS1),s=eO.findStartPattern(t),o=s[2],a=0,l=new Uint8Array(20);switch(l[a++]=o,o){case eO.CODE_START_A:n=eO.CODE_CODE_A;break;case eO.CODE_START_B:n=eO.CODE_CODE_B;break;case eO.CODE_START_C:n=eO.CODE_CODE_C;break;default:throw new U}let h=!1,u=!1,d="",c=s[0],g=s[1],f=Int32Array.from([0,0,0,0,0,0]),w=0,A=0,C=o,E=0,m=!0,_=!1,I=!1;for(;!h;){let e=u;switch(u=!1,w=A,A=eO.decodeCode(t,f,g),l[a++]=A,A!==eO.CODE_STOP&&(m=!0),A!==eO.CODE_STOP&&(C+=++E*A),c=g,g+=f.reduce((e,t)=>e+t,0),A){case eO.CODE_START_A:case eO.CODE_START_B:case eO.CODE_START_C:throw new U}switch(n){case eO.CODE_CODE_A:if(A<64)I===_?d+=String.fromCharCode(32+A):d+=String.fromCharCode(32+A+128),I=!1;else if(A<96)I===_?d+=String.fromCharCode(A-64):d+=String.fromCharCode(A+64),I=!1;else switch(A!==eO.CODE_STOP&&(m=!1),A){case eO.CODE_FNC_1:i&&(0===d.length?d+="]C1":d+="\x1d");break;case eO.CODE_FNC_2:case eO.CODE_FNC_3:break;case eO.CODE_FNC_4_A:!_&&I?(_=!0,I=!1):_&&I?(_=!1,I=!1):I=!0;break;case eO.CODE_SHIFT:u=!0,n=eO.CODE_CODE_B;break;case eO.CODE_CODE_B:n=eO.CODE_CODE_B;break;case eO.CODE_CODE_C:n=eO.CODE_CODE_C;break;case eO.CODE_STOP:h=!0}break;case eO.CODE_CODE_B:if(A<96)I===_?d+=String.fromCharCode(32+A):d+=String.fromCharCode(32+A+128),I=!1;else switch(A!==eO.CODE_STOP&&(m=!1),A){case eO.CODE_FNC_1:i&&(0===d.length?d+="]C1":d+="\x1d");break;case eO.CODE_FNC_2:case eO.CODE_FNC_3:break;case eO.CODE_FNC_4_B:!_&&I?(_=!0,I=!1):_&&I?(_=!1,I=!1):I=!0;break;case eO.CODE_SHIFT:u=!0,n=eO.CODE_CODE_A;break;case eO.CODE_CODE_A:n=eO.CODE_CODE_A;break;case eO.CODE_CODE_C:n=eO.CODE_CODE_C;break;case eO.CODE_STOP:h=!0}break;case eO.CODE_CODE_C:if(A<100)A<10&&(d+="0"),d+=A;else switch(A!==eO.CODE_STOP&&(m=!1),A){case eO.CODE_FNC_1:i&&(0===d.length?d+="]C1":d+="\x1d");break;case eO.CODE_CODE_A:n=eO.CODE_CODE_A;break;case eO.CODE_CODE_B:n=eO.CODE_CODE_B;break;case eO.CODE_STOP:h=!0}}e&&(n=n===eO.CODE_CODE_A?eO.CODE_CODE_B:eO.CODE_CODE_A)}let S=g-c;if(g=t.getNextUnset(g),!t.isRange(g,Math.min(t.getSize(),g+(g-c)/2),!1))throw new Z;if((C-=E*w)%103!==w)throw new B;let p=d.length;if(0===p)throw new Z;p>0&&m&&(d=n===eO.CODE_CODE_C?d.substring(0,p-2):d.substring(0,p-1));let T=(s[1]+s[0])/2,R=c+S/2,N=l.length,D=new Uint8Array(N);for(let e=0;en&&(i=t);n=i,t=0;let s=0,o=0;for(let i=0;in&&(o|=1<0;i++){let r=e[i];if(r>n&&(t--,2*r>=s))return -1}return o}}while(t>3);return -1}static patternToChar(e){for(let t=0;t="A"&&i<="Z")s=String.fromCharCode(i.charCodeAt(0)+32);else throw new U;break;case"$":if(i>="A"&&i<="Z")s=String.fromCharCode(i.charCodeAt(0)-64);else throw new U;break;case"%":if(i>="A"&&i<="E")s=String.fromCharCode(i.charCodeAt(0)-38);else if(i>="F"&&i<="J")s=String.fromCharCode(i.charCodeAt(0)-11);else if(i>="K"&&i<="O")s=String.fromCharCode(i.charCodeAt(0)+16);else if(i>="P"&&i<="T")s=String.fromCharCode(i.charCodeAt(0)+43);else if("U"===i)s="\0";else if("V"===i)s="@";else if("W"===i)s="`";else if("X"===i||"Y"===i||"Z"===i)s="\x7f";else throw new U;break;case"/":if(i>="A"&&i<="O")s=String.fromCharCode(i.charCodeAt(0)-32);else if("Z"===i)s=":";else throw new U}r+=s,n++}else r+=t}return r}}eM.ALPHABET_STRING="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%",eM.CHARACTER_ENCODINGS=[52,289,97,352,49,304,112,37,292,100,265,73,328,25,280,88,13,268,76,28,259,67,322,19,274,82,7,262,70,22,385,193,448,145,400,208,133,388,196,168,162,138,42],eM.ASTERISK_ENCODING=148;class eB extends ey{constructor(){super(...arguments),this.narrowLineWidth=-1}decodeRow(e,t,r){let n=this.decodeStart(t),i=this.decodeEnd(t),s=new z;eB.decodeMiddle(t,n[1],i[0],s);let o=s.toString(),a=null;null!=r&&(a=r.get(V.ALLOWED_LENGTHS)),null==a&&(a=eB.DEFAULT_ALLOWED_LENGTHS);let l=o.length,h=!1,u=0;for(let e of a){if(l===e){h=!0;break}e>u&&(u=e)}if(!h&&l>u&&(h=!0),!h)throw new U;return new er(o,null,0,[new eA(n[1],e),new eA(i[0],e)],en.ITF,new Date().getTime())}static decodeMiddle(e,t,r,n){let i=new Int32Array(10),s=new Int32Array(5),o=new Int32Array(5);for(i.fill(0),s.fill(0),o.fill(0);t0&&n>=0&&!e.get(n);n--)r--;if(0!==r)throw new Z}static skipWhiteSpace(e){let t=e.getSize(),r=e.getNextSet(0);if(r===t)throw new Z;return r}decodeEnd(e){e.reverse();try{let t,r=eB.skipWhiteSpace(e);try{t=eB.findGuardPattern(e,r,eB.END_PATTERN_REVERSED[0])}catch(n){n instanceof Z&&(t=eB.findGuardPattern(e,r,eB.END_PATTERN_REVERSED[1]))}this.validateQuietZone(e,t[0]);let n=t[0];return t[0]=e.getSize()-t[1],t[1]=e.getSize()-n,t}finally{e.reverse()}}static findGuardPattern(e,t,r){let n=r.length,i=new Int32Array(n),s=e.getSize(),o=!1,a=0,l=t;i.fill(0);for(let h=t;h=0)return r%10;throw new Z}}eB.PATTERNS=[Int32Array.from([1,1,2,2,1]),Int32Array.from([2,1,1,1,2]),Int32Array.from([1,2,1,1,2]),Int32Array.from([2,2,1,1,1]),Int32Array.from([1,1,2,1,2]),Int32Array.from([2,1,2,1,1]),Int32Array.from([1,2,2,1,1]),Int32Array.from([1,1,1,2,2]),Int32Array.from([2,1,1,2,1]),Int32Array.from([1,2,1,2,1]),Int32Array.from([1,1,3,3,1]),Int32Array.from([3,1,1,1,3]),Int32Array.from([1,3,1,1,3]),Int32Array.from([3,3,1,1,1]),Int32Array.from([1,1,3,1,3]),Int32Array.from([3,1,3,1,1]),Int32Array.from([1,3,3,1,1]),Int32Array.from([1,1,1,3,3]),Int32Array.from([3,1,1,3,1]),Int32Array.from([1,3,1,3,1])],eB.MAX_AVG_VARIANCE=.38,eB.MAX_INDIVIDUAL_VARIANCE=.5,eB.DEFAULT_ALLOWED_LENGTHS=[6,8,10,12,14],eB.START_PATTERN=Int32Array.from([1,1,1,1]),eB.END_PATTERN_REVERSED=[Int32Array.from([1,1,2]),Int32Array.from([1,1,3])];class eb extends ey{constructor(){super(...arguments),this.decodeRowStringBuffer=""}static findStartGuardPattern(e){let t,r=!1,n=0,i=Int32Array.from([0,0,0]);for(;!r;){i=Int32Array.from([0,0,0]);let s=(t=eb.findGuardPattern(e,n,!1,this.START_END_PATTERN,i))[0],o=s-((n=t[1])-s);o>=0&&(r=e.isRange(o,s,!1))}return t}static checkChecksum(e){return eb.checkStandardUPCEANChecksum(e)}static checkStandardUPCEANChecksum(e){let t=e.length;if(0===t)return!1;let r=parseInt(e.charAt(t-1),10);return eb.getStandardUPCEANChecksum(e.substring(0,t-1))===r}static getStandardUPCEANChecksum(e){let t=e.length,r=0;for(let n=t-1;n>=0;n-=2){let t=e.charAt(n).charCodeAt(0)-48;if(t<0||t>9)throw new U;r+=t}r*=3;for(let n=t-2;n>=0;n-=2){let t=e.charAt(n).charCodeAt(0)-48;if(t<0||t>9)throw new U;r+=t}return(1e3-r)%10}static decodeEnd(e,t){return eb.findGuardPattern(e,t,!1,eb.START_END_PATTERN,new Int32Array(eb.START_END_PATTERN.length).fill(0))}static findGuardPatternWithoutCounters(e,t,r,n){return this.findGuardPattern(e,t,r,n,new Int32Array(n.length))}static findGuardPattern(e,t,r,n,i){let s=e.getSize();t=r?e.getNextUnset(t):e.getNextSet(t);let o=0,a=t,l=n.length,h=r;for(let r=t;r=0)return s;throw new Z}}eb.MAX_AVG_VARIANCE=.48,eb.MAX_INDIVIDUAL_VARIANCE=.7,eb.START_END_PATTERN=Int32Array.from([1,1,1]),eb.MIDDLE_PATTERN=Int32Array.from([1,1,1,1,1]),eb.END_PATTERN=Int32Array.from([1,1,1,1,1,1]),eb.L_PATTERNS=[Int32Array.from([3,2,1,1]),Int32Array.from([2,2,2,1]),Int32Array.from([2,1,2,2]),Int32Array.from([1,4,1,1]),Int32Array.from([1,1,3,2]),Int32Array.from([1,2,3,1]),Int32Array.from([1,1,1,4]),Int32Array.from([1,3,1,2]),Int32Array.from([1,2,1,3]),Int32Array.from([3,1,1,2])];class eP{constructor(){this.CHECK_DIGIT_ENCODINGS=[24,20,18,17,12,6,3,10,9,5],this.decodeMiddleCounters=Int32Array.from([0,0,0,0]),this.decodeRowStringBuffer=""}decodeRow(e,t,r){let n=this.decodeRowStringBuffer,i=this.decodeMiddle(t,r,n),s=n.toString(),o=eP.parseExtensionString(s),a=new er(s,null,0,[new eA((r[0]+r[1])/2,e),new eA(i,e)],en.UPC_EAN_EXTENSION,new Date().getTime());return null!=o&&a.putAllMetadata(o),a}decodeMiddle(e,t,r){let n=this.decodeMiddleCounters;n[0]=0,n[1]=0,n[2]=0,n[3]=0;let i=e.getSize(),s=t[1],o=0;for(let t=0;t<5&&s=10&&(o|=1<<4-t),4!==t&&(s=e.getNextSet(s),s=e.getNextUnset(s))}if(5!==r.length)throw new Z;let a=this.determineCheckDigit(o);if(eP.extensionChecksum(r.toString())!==a)throw new Z;return s}static extensionChecksum(e){let t=e.length,r=0;for(let n=t-2;n>=0;n-=2)r+=e.charAt(n).charCodeAt(0)-48;r*=3;for(let n=t-1;n>=0;n-=2)r+=e.charAt(n).charCodeAt(0)-48;return(r*=3)%10}determineCheckDigit(e){for(let t=0;t<10;t++)if(e===this.CHECK_DIGIT_ENCODINGS[t])return t;throw new Z}static parseExtensionString(e){if(5!==e.length)return null;let t=eP.parseExtension5String(e);return null==t?null:new Map([[ei.SUGGESTED_PRICE,t]])}static parseExtension5String(e){let t;switch(e.charAt(0)){case"0":t="\xa3";break;case"5":t="$";break;case"9":switch(e){case"90000":return null;case"99991":return"0.00";case"99990":return"Used"}t="";break;default:t=""}let r=parseInt(e.substring(1)),n=(r/100).toString(),i=r%100;return t+n+"."+(i<10?"0"+i:i.toString())}}class eL{constructor(){this.decodeMiddleCounters=Int32Array.from([0,0,0,0]),this.decodeRowStringBuffer=""}decodeRow(e,t,r){let n=this.decodeRowStringBuffer,i=this.decodeMiddle(t,r,n),s=n.toString(),o=eL.parseExtensionString(s),a=new er(s,null,0,[new eA((r[0]+r[1])/2,e),new eA(i,e)],en.UPC_EAN_EXTENSION,new Date().getTime());return null!=o&&a.putAllMetadata(o),a}decodeMiddle(e,t,r){let n=this.decodeMiddleCounters;n[0]=0,n[1]=0,n[2]=0,n[3]=0;let i=e.getSize(),s=t[1],o=0;for(let t=0;t<2&&s=10&&(o|=1<<1-t),1!==t&&(s=e.getNextSet(s),s=e.getNextUnset(s))}if(2!==r.length||parseInt(r.toString())%4!==o)throw new Z;return s}static parseExtensionString(e){return 2!==e.length?null:new Map([[ei.ISSUE_NUMBER,parseInt(e)]])}}class eF{static decodeRow(e,t,r){let n=eb.findGuardPattern(t,r,!1,this.EXTENSION_START_PATTERN,new Int32Array(this.EXTENSION_START_PATTERN.length).fill(0));try{return new eP().decodeRow(e,t,n)}catch(r){return new eL().decodeRow(e,t,n)}}}eF.EXTENSION_START_PATTERN=Int32Array.from([1,1,2]);class ev extends eb{constructor(){super(),this.decodeRowStringBuffer="",ev.L_AND_G_PATTERNS=ev.L_PATTERNS.map(e=>Int32Array.from(e));for(let e=10;e<20;e++){let t=ev.L_PATTERNS[e-10],r=new Int32Array(t.length);for(let e=0;e=t.getSize()||!t.isRange(h,u,!1))throw new Z;let d=a.toString();if(d.length<8)throw new U;if(!ev.checkChecksum(d))throw new B;let c=(n[1]+n[0])/2,g=(l[1]+l[0])/2,f=this.getBarcodeFormat(),w=new er(d,null,0,[new eA(c,e),new eA(g,e)],f,new Date().getTime()),A=0;try{let r=eF.decodeRow(e,t,l[1]);w.putMetadata(ei.UPC_EAN_EXTENSION,r.getText()),w.putAllMetadata(r.getResultMetadata()),w.addResultPoints(r.getResultPoints()),A=r.getText().length}catch(e){}let C=null==r?null:r.get(V.ALLOWED_EAN_EXTENSIONS);if(null!=C){let e=!1;for(let t in C)if(A.toString()===t){e=!0;break}if(!e)throw new Z}return w}decodeEnd(e,t){return ev.findGuardPattern(e,t,!1,ev.START_END_PATTERN,new Int32Array(ev.START_END_PATTERN.length).fill(0))}static checkChecksum(e){return ev.checkStandardUPCEANChecksum(e)}static checkStandardUPCEANChecksum(e){let t=e.length;if(0===t)return!1;let r=parseInt(e.charAt(t-1),10);return ev.getStandardUPCEANChecksum(e.substring(0,t-1))===r}static getStandardUPCEANChecksum(e){let t=e.length,r=0;for(let n=t-1;n>=0;n-=2){let t=e.charAt(n).charCodeAt(0)-48;if(t<0||t>9)throw new U;r+=t}r*=3;for(let n=t-2;n>=0;n-=2){let t=e.charAt(n).charCodeAt(0)-48;if(t<0||t>9)throw new U;r+=t}return(1e3-r)%10}}class ek extends ev{constructor(){super(),this.decodeMiddleCounters=Int32Array.from([0,0,0,0])}decodeMiddle(e,t,r){let n=this.decodeMiddleCounters;n[0]=0,n[1]=0,n[2]=0,n[3]=0;let i=e.getSize(),s=t[1],o=0;for(let t=0;t<6&&s=10&&(o|=1<<5-t)}r=ek.determineFirstDigit(r,o),s=ev.findGuardPattern(e,s,!0,ev.MIDDLE_PATTERN,new Int32Array(ev.MIDDLE_PATTERN.length).fill(0))[1];for(let t=0;t<6&&se);n[0]=0,n[1]=0,n[2]=0,n[3]=0;let i=e.getSize(),s=t[1],o=0;for(let t=0;t<6&&s=10&&(o|=1<<5-t)}return{rowOffset:s,resultString:eU.determineNumSysAndCheckDigit(r,o)}}decodeEnd(e,t){return eU.findGuardPatternWithoutCounters(e,t,!0,eU.MIDDLE_END_PATTERN)}checkChecksum(e){return ev.checkChecksum(eU.convertUPCEtoUPCA(e))}static determineNumSysAndCheckDigit(e,t){for(let r=0;r<=1;r++)for(let n=0;n<10;n++)if(t===this.NUMSYS_AND_CHECK_DIGIT_PATTERNS[r][n])return String.fromCharCode(48+r)+e+String.fromCharCode(48+n);throw Z.getNotFoundInstance()}getBarcodeFormat(){return en.UPC_E}static convertUPCEtoUPCA(e){let t=e.slice(1,7).split("").map(e=>e.charCodeAt(0)),r=new z;r.append(e.charAt(0));let n=t[5];switch(n){case 0:case 1:case 2:r.appendChars(t,0,2),r.append(n),r.append("0000"),r.appendChars(t,2,3);break;case 3:r.appendChars(t,0,3),r.append("00000"),r.appendChars(t,3,2);break;case 4:r.appendChars(t,0,4),r.append("00000"),r.append(t[4]);break;default:r.appendChars(t,0,5),r.append("0000"),r.append(n)}return e.length>=8&&r.append(e.charAt(7)),r.toString()}}eU.MIDDLE_END_PATTERN=Int32Array.from([1,1,1,1,1,1]),eU.NUMSYS_AND_CHECK_DIGIT_PATTERNS=[Int32Array.from([56,52,50,49,44,38,35,42,41,37]),Int32Array.from([7,11,13,14,19,25,28,21,22,26])];class eH extends ey{constructor(e){super();let t=null==e?null:e.get(V.POSSIBLE_FORMATS),r=[];null==t?(r.push(new ek),r.push(new eV),r.push(new ex),r.push(new eU)):(t.indexOf(en.EAN_13)>-1&&r.push(new ek),t.indexOf(en.UPC_A)>-1&&r.push(new eV),t.indexOf(en.EAN_8)>-1&&r.push(new ex),t.indexOf(en.UPC_E)>-1&&r.push(new eU)),this.readers=r}decodeRow(e,t,r){for(let n of this.readers)try{let i=n.decodeRow(e,t,r),s=i.getBarcodeFormat()===en.EAN_13&&"0"===i.getText().charAt(0),o=null==r?null:r.get(V.POSSIBLE_FORMATS),a=null==o||o.includes(en.UPC_A);if(s&&a){let e=i.getRawBytes(),t=new er(i.getText().substring(1),e,e?e.length:null,i.getResultPoints(),en.UPC_A);return t.putAllMetadata(i.getResultMetadata()),t}return i}catch(e){}throw new Z}reset(){for(let e of this.readers)e.reset()}}class eG extends ey{constructor(){super(),this.decodeFinderCounters=new Int32Array(4),this.dataCharacterCounters=new Int32Array(8),this.oddRoundingErrors=[,,,,],this.evenRoundingErrors=[,,,,],this.oddCounts=Array(this.dataCharacterCounters.length/2),this.evenCounts=Array(this.dataCharacterCounters.length/2)}getDecodeFinderCounters(){return this.decodeFinderCounters}getDataCharacterCounters(){return this.dataCharacterCounters}getOddRoundingErrors(){return this.oddRoundingErrors}getEvenRoundingErrors(){return this.evenRoundingErrors}getOddCounts(){return this.oddCounts}getEvenCounts(){return this.evenCounts}parseFinderValue(e,t){for(let r=0;rn&&(n=t[i],r=i);e[r]++}static decrement(e,t){let r=0,n=t[0];for(let i=1;i=eG.MIN_FINDER_PATTERN_RATIO&&n<=eG.MAX_FINDER_PATTERN_RATIO){let t=Number.MAX_SAFE_INTEGER,r=Number.MIN_SAFE_INTEGER;for(let n of e)n>r&&(r=n),n=o-a-1&&(e-=ez.combins(n-l-(o-a),o-a-2)),o-a-1>1){let r=0;for(let e=n-l-(o-a-2);e>t;e--)r+=ez.combins(n-l-e-1,o-a-3);e-=r*(o-1-a)}else n-l>t&&e--;i+=e}n-=l}return i}static combins(e,t){let r,n;e-t>t?(n=t,r=e-t):(n=e-t,r=t);let i=1,s=1;for(let t=e;t>r;t--)i*=t,s<=n&&(i/=s,s++);for(;s<=n;)i/=s,s++;return i}}class eY{static buildBitArray(e){let t=2*e.length-1;null==e[e.length-1].getRightChar()&&(t-=1);let r=new x(12*t),n=0,i=e[0].getRightChar().getValue();for(let e=11;e>=0;--e)(i&1<=0;--e)(s&1<=0;--t)(e&1<10||r<0||r>10)throw new U;this.firstDigit=t,this.secondDigit=r}getFirstDigit(){return this.firstDigit}getSecondDigit(){return this.secondDigit}getValue(){return 10*this.firstDigit+this.secondDigit}isFirstDigitFNC1(){return this.firstDigit===ej.FNC1}isSecondDigitFNC1(){return this.secondDigit===ej.FNC1}isAnyFNC1(){return this.firstDigit===ej.FNC1||this.secondDigit===ej.FNC1}}ej.FNC1=10;class eJ{constructor(){}static parseFieldsInGeneralPurpose(e){if(!e)return null;if(e.length<2)throw new Z;let t=e.substring(0,2);for(let r of eJ.TWO_DIGIT_DATA_LENGTH)if(r[0]===t){if(r[1]===eJ.VARIABLE_LENGTH)return eJ.processVariableAI(2,r[2],e);return eJ.processFixedAI(2,r[1],e)}if(e.length<3)throw new Z;let r=e.substring(0,3);for(let t of eJ.THREE_DIGIT_DATA_LENGTH)if(t[0]===r){if(t[1]===eJ.VARIABLE_LENGTH)return eJ.processVariableAI(3,t[2],e);return eJ.processFixedAI(3,t[1],e)}for(let t of eJ.THREE_DIGIT_PLUS_DIGIT_DATA_LENGTH)if(t[0]===r){if(t[1]===eJ.VARIABLE_LENGTH)return eJ.processVariableAI(4,t[2],e);return eJ.processFixedAI(4,t[1],e)}if(e.length<4)throw new Z;let n=e.substring(0,4);for(let t of eJ.FOUR_DIGIT_DATA_LENGTH)if(t[0]===n){if(t[1]===eJ.VARIABLE_LENGTH)return eJ.processVariableAI(4,t[2],e);return eJ.processFixedAI(4,t[1],e)}throw new Z}static processFixedAI(e,t,r){if(r.lengththis.information.getSize())return e+4<=this.information.getSize();for(let t=e;tthis.information.getSize()){let t=this.extractNumericValueFromBitArray(e,4);return 0===t?new ej(this.information.getSize(),ej.FNC1,ej.FNC1):new ej(this.information.getSize(),t-1,ej.FNC1)}let t=this.extractNumericValueFromBitArray(e,7);return new ej(e+7,(t-8)/11,(t-8)%11)}extractNumericValueFromBitArray(e,t){return e$.extractNumericValueFromBitArray(this.information,e,t)}static extractNumericValueFromBitArray(e,t,r){let n=0;for(let i=0;ithis.information.getSize())return!1;let t=this.extractNumericValueFromBitArray(e,5);if(t>=5&&t<16)return!0;if(e+7>this.information.getSize())return!1;let r=this.extractNumericValueFromBitArray(e,7);if(r>=64&&r<116)return!0;if(e+8>this.information.getSize())return!1;let n=this.extractNumericValueFromBitArray(e,8);return n>=232&&n<253}decodeIsoIec646(e){let t,r=this.extractNumericValueFromBitArray(e,5);if(15===r)return new eq(e+5,eq.FNC1);if(r>=5&&r<15)return new eq(e+5,"0"+(r-5));let n=this.extractNumericValueFromBitArray(e,7);if(n>=64&&n<90)return new eq(e+7,""+(n+1));if(n>=90&&n<116)return new eq(e+7,""+(n+7));switch(this.extractNumericValueFromBitArray(e,8)){case 232:t="!";break;case 233:t='"';break;case 234:t="%";break;case 235:t="&";break;case 236:t="'";break;case 237:t="(";break;case 238:t=")";break;case 239:t="*";break;case 240:t="+";break;case 241:t=",";break;case 242:t="-";break;case 243:t=".";break;case 244:t="/";break;case 245:t=":";break;case 246:t=";";break;case 247:t="<";break;case 248:t="=";break;case 249:t=">";break;case 250:t="?";break;case 251:t="_";break;case 252:t=" ";break;default:throw new U}return new eq(e+8,t)}isStillAlpha(e){if(e+5>this.information.getSize())return!1;let t=this.extractNumericValueFromBitArray(e,5);if(t>=5&&t<16)return!0;if(e+6>this.information.getSize())return!1;let r=this.extractNumericValueFromBitArray(e,6);return r>=16&&r<63}decodeAlphanumeric(e){let t,r=this.extractNumericValueFromBitArray(e,5);if(15===r)return new eq(e+5,eq.FNC1);if(r>=5&&r<15)return new eq(e+5,"0"+(r-5));let n=this.extractNumericValueFromBitArray(e,6);if(n>=32&&n<58)return new eq(e+6,""+(n+33));switch(n){case 58:t="*";break;case 59:t=",";break;case 60:t="-";break;case 61:t=".";break;case 62:t="/";break;default:throw new ed("Decoding invalid alphanumeric value: "+n)}return new eq(e+6,t)}isAlphaTo646ToAlphaLatch(e){if(e+1>this.information.getSize())return!1;for(let t=0;t<5&&t+ethis.information.getSize())return!1;for(let t=e;tthis.information.getSize())return!1;for(let t=0;t<4&&t+e{t.forEach(t=>{e.getLeftChar().getValue()===t.getLeftChar().getValue()&&e.getRightChar().getValue()===t.getRightChar().getValue()&&e.getFinderPatter().getValue()===t.getFinderPatter().getValue()&&(r=!0)})}),r}}class ti extends eG{constructor(e){super(...arguments),this.pairs=Array(ti.MAX_PAIRS),this.rows=[],this.startEnd=[2],this.verbose=!0===e}decodeRow(e,t,r){this.pairs.length=0,this.startFromEven=!1;try{return ti.constructResult(this.decodeRow2pairs(e,t))}catch(e){this.verbose&&console.log(e)}return this.pairs.length=0,this.startFromEven=!0,ti.constructResult(this.decodeRow2pairs(e,t))}reset(){this.pairs.length=0,this.rows.length=0}decodeRow2pairs(e,t){let r,n=!1;for(;!n;)try{this.pairs.push(this.retrieveNextPair(t,this.pairs,e))}catch(e){if(e instanceof Z){if(!this.pairs.length)throw new Z;n=!0}}if(this.checkChecksum())return this.pairs;if(r=!!this.rows.length,this.storeRow(e,!1),r){let e=this.checkRowsBoolean(!1);if(null!=e||null!=(e=this.checkRowsBoolean(!0)))return e}throw new Z}checkRowsBoolean(e){if(this.rows.length>25)return this.rows.length=0,null;this.pairs.length=0,e&&(this.rows=this.rows.reverse());let t=null;try{t=this.checkRows([],0)}catch(e){this.verbose&&console.log(e)}return e&&(this.rows=this.rows.reverse()),t}checkRows(e,t){for(let r=t;rt.length)continue;let r=!0;for(let n=0;ne){i=t.isEquivalent(this.pairs);break}n=t.isEquivalent(this.pairs),r++}i||n||ti.isPartialRow(this.pairs,this.rows)||(this.rows.push(r,new tn(this.pairs,e,t)),this.removePartialRows(this.pairs,this.rows))}removePartialRows(e,t){for(let r of t)if(r.getPairs().length!==e.length){for(let t of r.getPairs())for(let r of e)if(tr.equals(t,r))break}}static isPartialRow(e,t){for(let r of t){let t=!0;for(let n of e){let e=!1;for(let t of r.getPairs())if(n.equals(t)){e=!0;break}if(!e){t=!1;break}}if(t)return!0}return!1}getRows(){return this.rows}static constructResult(e){let t=tt(eY.buildBitArray(e)).parseInformation(),r=e[0].getFinderPattern().getResultPoints(),n=e[e.length-1].getFinderPattern().getResultPoints();return new er(t,null,null,[r[0],r[1],n[0],n[1]],en.RSS_EXPANDED,null)}checkChecksum(){let e=this.pairs.get(0),t=e.getLeftChar(),r=e.getRightChar();if(null==r)return!1;let n=r.getChecksumPortion(),i=2;for(let e=1;e=0?r:this.isEmptyPair(t)?0:t[t.length-1].getFinderPattern().getStartEnd()[1];let o=t.length%2!=0;this.startFromEven&&(o=!o);let a=!1;for(;n=0&&!e.get(t);)t--;t++,n=this.startEnd[0]-t,i=t,s=this.startEnd[1]}else i=this.startEnd[0],n=(s=e.getNextUnset(this.startEnd[1]+1))-this.startEnd[1];let a=this.getDecodeFinderCounters();P.arraycopy(a,0,a,1,a.length-1),a[0]=n;try{o=this.parseFinderValue(a,ti.FINDER_PATTERNS)}catch(e){return null}return new eW(o,[i,s],i,s,t)}decodeDataCharacter(e,t,r,n){let i=this.getDataCharacterCounters();for(let e=0;e.3)throw new Z;let a=this.getOddCounts(),l=this.getEvenCounts(),h=this.getOddRoundingErrors(),u=this.getEvenRoundingErrors();for(let e=0;e8){if(t>8.7)throw new Z;r=8}let n=e/2;(1&e)==0?(a[n]=r,h[n]=t-r):(l[n]=r,u[n]=t-r)}this.adjustOddEvenCounts(17);let d=4*t.getValue()+(r?0:2)+(n?0:1)-1,c=0,g=0;for(let e=a.length-1;e>=0;e--){if(ti.isNotA1left(t,r,n)){let t=ti.WEIGHTS[d][2*e];g+=a[e]*t}c+=a[e]}let f=0;for(let e=l.length-1;e>=0;e--)if(ti.isNotA1left(t,r,n)){let t=ti.WEIGHTS[d][2*e+1];f+=l[e]*t}let w=g+f;if((1&c)!=0||c>13||c<4)throw new Z;let A=(13-c)/2,C=ti.SYMBOL_WIDEST[A],E=ez.getRSSvalue(a,C,!0),m=ez.getRSSvalue(l,9-C,!1);return new eX(E*ti.EVEN_TOTAL_SUBSET[A]+m+ti.GSUM[A],w)}static isNotA1left(e,t,r){return!(0==e.getValue()&&t&&r)}adjustOddEvenCounts(e){let t=ef.sum(new Int32Array(this.getOddCounts())),r=ef.sum(new Int32Array(this.getEvenCounts())),n=!1,i=!1;t>13?i=!0:t<4&&(n=!0);let s=!1,o=!1;r>13?o=!0:r<4&&(s=!0);let a=t+r-e,l=(1&t)==1,h=(1&r)==0;if(1==a){if(l){if(h)throw new Z;i=!0}else{if(!h)throw new Z;o=!0}}else if(-1==a){if(l){if(h)throw new Z;n=!0}else{if(!h)throw new Z;s=!0}}else if(0==a){if(l){if(!h)throw new Z;t1){for(let t of this.possibleRightPairs)if(t.getCount()>1&&to.checkChecksum(e,t))return to.constructResult(e,t)}throw new Z}static addOrTally(e,t){if(null==t)return;let r=!1;for(let n of e)if(n.getValue()===t.getValue()){n.incrementCount(),r=!0;break}r||e.push(t)}reset(){this.possibleLeftPairs.length=0,this.possibleRightPairs.length=0}static constructResult(e,t){let r=new String(4537077*e.getValue()+t.getValue()).toString(),n=new z;for(let e=13-r.length;e>0;e--)n.append("0");n.append(r);let i=0;for(let e=0;e<13;e++){let t=n.charAt(e).charCodeAt(0)-48;i+=(1&e)==0?3*t:t}10==(i=10-i%10)&&(i=0),n.append(i.toString());let s=e.getFinderPattern().getResultPoints(),o=t.getFinderPattern().getResultPoints();return new er(n.toString(),null,0,[s[0],s[1],o[0],o[1]],en.RSS_14,new Date().getTime())}static checkChecksum(e,t){let r=(e.getChecksumPortion()+16*t.getChecksumPortion())%79,n=9*e.getFinderPattern().getValue()+t.getFinderPattern().getValue();return n>72&&n--,n>8&&n--,r===n}decodePair(e,t,r,n){try{let i=this.findFinderPattern(e,t),s=this.parseFoundFinderPattern(e,r,t,i),o=null==n?null:n.get(V.NEED_RESULT_POINT_CALLBACK);if(null!=o){let n=(i[0]+i[1])/2;t&&(n=e.getSize()-1-n),o.foundPossibleResultPoint(new eA(n,r))}let a=this.decodeDataCharacter(e,s,!0),l=this.decodeDataCharacter(e,s,!1);return new ts(1597*a.getValue()+l.getValue(),a.getChecksumPortion()+4*l.getChecksumPortion(),s)}catch(e){return null}}decodeDataCharacter(e,t,r){let n=this.getDataCharacterCounters();for(let e=0;e8&&(r=8);let i=Math.floor(e/2);(1&e)==0?(o[i]=r,l[i]=t-r):(a[i]=r,h[i]=t-r)}this.adjustOddEvenCounts(r,i);let u=0,d=0;for(let e=o.length-1;e>=0;e--)d*=9,d+=o[e],u+=o[e];let c=0,g=0;for(let e=a.length-1;e>=0;e--)c*=9,c+=a[e],g+=a[e];let f=d+3*c;if(r){if((1&u)!=0||u>12||u<4)throw new Z;let e=(12-u)/2,t=to.OUTSIDE_ODD_WIDEST[e],r=ez.getRSSvalue(o,t,!1),n=ez.getRSSvalue(a,9-t,!0);return new eX(r*to.OUTSIDE_EVEN_TOTAL_SUBSET[e]+n+to.OUTSIDE_GSUM[e],f)}{if((1&g)!=0||g>10||g<4)throw new Z;let e=(10-g)/2,t=to.INSIDE_ODD_WIDEST[e],r=ez.getRSSvalue(o,t,!0);return new eX(ez.getRSSvalue(a,9-t,!1)*to.INSIDE_ODD_TOTAL_SUBSET[e]+r+to.INSIDE_GSUM[e],f)}}findFinderPattern(e,t){let r=this.getDecodeFinderCounters();r[0]=0,r[1]=0,r[2]=0,r[3]=0;let n=e.getSize(),i=!1,s=0;for(;s=0&&i!==e.get(s);)s--;s++;let o=n[0]-s,a=this.getDecodeFinderCounters(),l=new Int32Array(a.length);P.arraycopy(a,0,l,1,a.length-1),l[0]=o;let h=this.parseFinderValue(l,to.FINDER_PATTERNS),u=s,d=n[1];return r&&(u=e.getSize()-1-u,d=e.getSize()-1-d),new eW(h,[s,n[1]],u,d,t)}adjustOddEvenCounts(e,t){let r=ef.sum(new Int32Array(this.getOddCounts())),n=ef.sum(new Int32Array(this.getEvenCounts())),i=!1,s=!1,o=!1,a=!1;e?(r>12?s=!0:r<4&&(i=!0),n>12?a=!0:n<4&&(o=!0)):(r>11?s=!0:r<5&&(i=!0),n>10?a=!0:n<4&&(o=!0));let l=r+n-t,h=(1&r)==(e?1:0),u=(1&n)==1;if(1===l){if(h){if(u)throw new Z;s=!0}else{if(!u)throw new Z;a=!0}}else if(-1===l){if(h){if(u)throw new Z;i=!0}else{if(!u)throw new Z;o=!0}}else if(0===l){if(h){if(!u)throw new Z;re.reset())}}class tl extends et{constructor(e=500,t){super(new ta(t),e,t)}}class th{constructor(e,t,r){this.ecCodewords=e,this.ecBlocks=[t],r&&this.ecBlocks.push(r)}getECCodewords(){return this.ecCodewords}getECBlocks(){return this.ecBlocks}}class tu{constructor(e,t){this.count=e,this.dataCodewords=t}getCount(){return this.count}getDataCodewords(){return this.dataCodewords}}class td{constructor(e,t,r,n,i,s){this.versionNumber=e,this.symbolSizeRows=t,this.symbolSizeColumns=r,this.dataRegionSizeRows=n,this.dataRegionSizeColumns=i,this.ecBlocks=s;let o=0,a=s.getECCodewords();for(let e of s.getECBlocks())o+=e.getCount()*(e.getDataCodewords()+a);this.totalCodewords=o}getVersionNumber(){return this.versionNumber}getSymbolSizeRows(){return this.symbolSizeRows}getSymbolSizeColumns(){return this.symbolSizeColumns}getDataRegionSizeRows(){return this.dataRegionSizeRows}getDataRegionSizeColumns(){return this.dataRegionSizeColumns}getTotalCodewords(){return this.totalCodewords}getECBlocks(){return this.ecBlocks}static getVersionForDimensions(e,t){if((1&e)!=0||(1&t)!=0)throw new U;for(let r of td.VERSIONS)if(r.symbolSizeRows===e&&r.symbolSizeColumns===t)return r;throw new U}toString(){return""+this.versionNumber}static buildVersions(){return[new td(1,10,10,8,8,new th(5,new tu(1,3))),new td(2,12,12,10,10,new th(7,new tu(1,5))),new td(3,14,14,12,12,new th(10,new tu(1,8))),new td(4,16,16,14,14,new th(12,new tu(1,12))),new td(5,18,18,16,16,new th(14,new tu(1,18))),new td(6,20,20,18,18,new th(18,new tu(1,22))),new td(7,22,22,20,20,new th(20,new tu(1,30))),new td(8,24,24,22,22,new th(24,new tu(1,36))),new td(9,26,26,24,24,new th(28,new tu(1,44))),new td(10,32,32,14,14,new th(36,new tu(1,62))),new td(11,36,36,16,16,new th(42,new tu(1,86))),new td(12,40,40,18,18,new th(48,new tu(1,114))),new td(13,44,44,20,20,new th(56,new tu(1,144))),new td(14,48,48,22,22,new th(68,new tu(1,174))),new td(15,52,52,24,24,new th(42,new tu(2,102))),new td(16,64,64,14,14,new th(56,new tu(2,140))),new td(17,72,72,16,16,new th(36,new tu(4,92))),new td(18,80,80,18,18,new th(48,new tu(4,114))),new td(19,88,88,20,20,new th(56,new tu(4,144))),new td(20,96,96,22,22,new th(68,new tu(4,174))),new td(21,104,104,24,24,new th(56,new tu(6,136))),new td(22,120,120,18,18,new th(68,new tu(6,175))),new td(23,132,132,20,20,new th(62,new tu(8,163))),new td(24,144,144,22,22,new th(62,new tu(8,156),new tu(2,155))),new td(25,8,18,6,16,new th(7,new tu(1,5))),new td(26,8,32,6,14,new th(11,new tu(1,10))),new td(27,12,26,10,24,new th(14,new tu(1,16))),new td(28,12,36,10,16,new th(18,new tu(1,22))),new td(29,16,36,14,16,new th(24,new tu(1,32))),new td(30,16,48,14,22,new th(28,new tu(1,49)))]}}td.VERSIONS=td.buildVersions();class tc{constructor(e){let t=e.getHeight();if(t<8||t>144||(1&t)!=0)throw new U;this.version=tc.readVersion(e),this.mappingBitMatrix=this.extractDataRegion(e),this.readMappingMatrix=new Y(this.mappingBitMatrix.getWidth(),this.mappingBitMatrix.getHeight())}getVersion(){return this.version}static readVersion(e){let t=e.getHeight(),r=e.getWidth();return td.getVersionForDimensions(t,r)}readCodewords(){let e=new Int8Array(this.version.getTotalCodewords()),t=0,r=4,n=0,i=this.mappingBitMatrix.getHeight(),s=this.mappingBitMatrix.getWidth(),o=!1,a=!1,l=!1,h=!1;do if(r!==i||0!==n||o){if(r!==i-2||0!==n||(3&s)==0||a){if(r!==i+4||2!==n||(7&s)!=0||l){if(r!==i-2||0!==n||(7&s)!=4||h){do r=0&&!this.readMappingMatrix.get(n,r)&&(e[t++]=255&this.readUtah(r,n,i,s)),r-=2,n+=2;while(r>=0&&n=0&&n=0);r+=3,n+=1}else e[t++]=255&this.readCorner4(i,s),r-=2,n+=2,h=!0}else e[t++]=255&this.readCorner3(i,s),r-=2,n+=2,l=!0}else e[t++]=255&this.readCorner2(i,s),r-=2,n+=2,a=!0}else e[t++]=255&this.readCorner1(i,s),r-=2,n+=2,o=!0;while(r7?t-1:t;s[n].codewords[i]=e[h++]}if(h!==e.length)throw new O;return s}getNumDataCodewords(){return this.numDataCodewords}getCodewords(){return this.codewords}}class tf{constructor(e){this.bytes=e,this.byteOffset=0,this.bitOffset=0}getBitOffset(){return this.bitOffset}getByteOffset(){return this.byteOffset}readBits(e){if(e<1||e>32||e>this.available())throw new O(""+e);let t=0,r=this.bitOffset,n=this.byteOffset,i=this.bytes;if(r>0){let s=8-r,o=e>8-o<>a,e-=o,8===(r+=o)&&(r=0,n++)}if(e>0){for(;e>=8;)t=t<<8|255&i[n],n++,e-=8;if(e>0){let s=8-e;t=t<>s<>s,r+=e}}return this.bitOffset=r,this.byteOffset=n,t}available(){return 8*(this.bytes.length-this.byteOffset)-this.bitOffset}}(l=m||(m={}))[l.PAD_ENCODE=0]="PAD_ENCODE",l[l.ASCII_ENCODE=1]="ASCII_ENCODE",l[l.C40_ENCODE=2]="C40_ENCODE",l[l.TEXT_ENCODE=3]="TEXT_ENCODE",l[l.ANSIX12_ENCODE=4]="ANSIX12_ENCODE",l[l.EDIFACT_ENCODE=5]="EDIFACT_ENCODE",l[l.BASE256_ENCODE=6]="BASE256_ENCODE";class tw{static decode(e){let t=new tf(e),r=new z,n=new z,i=[],s=m.ASCII_ENCODE;do if(s===m.ASCII_ENCODE)s=this.decodeAsciiSegment(t,r,n);else{switch(s){case m.C40_ENCODE:this.decodeC40Segment(t,r);break;case m.TEXT_ENCODE:this.decodeTextSegment(t,r);break;case m.ANSIX12_ENCODE:this.decodeAnsiX12Segment(t,r);break;case m.EDIFACT_ENCODE:this.decodeEdifactSegment(t,r);break;case m.BASE256_ENCODE:this.decodeBase256Segment(t,r,i);break;default:throw new U}s=m.ASCII_ENCODE}while(s!==m.PAD_ENCODE&&t.available()>0);return n.length()>0&&r.append(n.toString()),new es(e,r.toString(),0===i.length?null:i,null)}static decodeAsciiSegment(e,t,r){let n=!1;do{let i=e.readBits(8);if(0===i)throw new U;if(i<=128){n&&(i+=128),t.append(String.fromCharCode(i-1));break}if(129===i)return m.PAD_ENCODE;if(i<=229){let e=i-130;e<10&&t.append("0"),t.append(""+e)}else switch(i){case 230:return m.C40_ENCODE;case 231:return m.BASE256_ENCODE;case 232:t.append("\x1d");break;case 233:case 234:case 241:break;case 235:n=!0;break;case 236:t.append("[)>\x1e05\x1d"),r.insert(0,"\x1e\x04");break;case 237:t.append("[)>\x1e06\x1d"),r.insert(0,"\x1e\x04");break;case 238:return m.ANSIX12_ENCODE;case 239:return m.TEXT_ENCODE;case 240:return m.EDIFACT_ENCODE;default:if(254!==i||0!==e.available())throw new U}}while(e.available()>0);return m.ASCII_ENCODE}static decodeC40Segment(e,t){let r=!1,n=[],i=0;do{if(8===e.available())return;let s=e.readBits(8);if(254===s)return;this.parseTwoBytes(s,e.readBits(8),n);for(let e=0;e<3;e++){let s=n[e];switch(i){case 0:if(s<3)i=s+1;else if(s0)}static decodeTextSegment(e,t){let r=!1,n=[],i=0;do{if(8===e.available())return;let s=e.readBits(8);if(254===s)return;this.parseTwoBytes(s,e.readBits(8),n);for(let e=0;e<3;e++){let s=n[e];switch(i){case 0:if(s<3)i=s+1;else if(s0)}static decodeAnsiX12Segment(e,t){let r=[];do{if(8===e.available())return;let n=e.readBits(8);if(254===n)return;this.parseTwoBytes(n,e.readBits(8),r);for(let e=0;e<3;e++){let n=r[e];switch(n){case 0:t.append("\r");break;case 1:t.append("*");break;case 2:t.append(">");break;case 3:t.append(" ");break;default:if(n<14)t.append(String.fromCharCode(n+44));else if(n<40)t.append(String.fromCharCode(n+51));else throw new U}}}while(e.available()>0)}static parseTwoBytes(e,t,r){let n=(e<<8)+t-1,i=Math.floor(n/1600);r[0]=i,n-=1600*i,i=Math.floor(n/40),r[1]=i,r[2]=n-40*i}static decodeEdifactSegment(e,t){do{if(16>=e.available())return;for(let r=0;r<4;r++){let r=e.readBits(6);if(31===r){let t=8-e.getBitOffset();8!==t&&e.readBits(t);return}(32&r)==0&&(r|=64),t.append(String.fromCharCode(r))}}while(e.available()>0)}static decodeBase256Segment(e,t,r){let n,i=1+e.getByteOffset(),s=this.unrandomize255State(e.readBits(8),i++);if((n=0===s?e.available()/8|0:s<250?s:250*(s-249)+this.unrandomize255State(e.readBits(8),i++))<0)throw new U;let o=new Uint8Array(n);for(let t=0;te.available())throw new U;o[t]=this.unrandomize255State(e.readBits(8),i++)}r.push(o);try{t.append(X.decode(o,W.ISO88591))}catch(e){throw new ed("Platform does not support required encoding: "+e.message)}}static unrandomize255State(e,t){let r=e-(149*t%255+1);return r>=0?r:r+256}}tw.C40_BASIC_SET_CHARS=["*","*","*"," ","0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],tw.C40_SHIFT2_SET_CHARS=["!",'"',"#","$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","?","@","[","\\","]","^","_"],tw.TEXT_BASIC_SET_CHARS=["*","*","*"," ","0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"],tw.TEXT_SHIFT2_SET_CHARS=tw.C40_SHIFT2_SET_CHARS,tw.TEXT_SHIFT3_SET_CHARS=["`","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","{","|","}","~","\x7f"];class tA{constructor(){this.rsDecoder=new ec(eh.DATA_MATRIX_FIELD_256)}decode(e){let t=new tc(e),r=t.getVersion(),n=t.readCodewords(),i=tg.getDataBlocks(n,r),s=0;for(let e of i)s+=e.getNumDataCodewords();let o=new Uint8Array(s),a=i.length;for(let e=0;eo&&(h=o,u[0]=t,u[1]=r,u[2]=n,u[3]=i),h>a&&(h=a,u[0]=r,u[1]=n,u[2]=i,u[3]=t),h>l&&(u[0]=n,u[1]=i,u[2]=t,u[3]=r),u}detectSolid2(e){let t=e[0],r=e[1],n=e[2],i=e[3],s=this.transitionsBetween(t,i),o=tC.shiftPoint(r,n,(s+1)*4),a=tC.shiftPoint(n,r,(s+1)*4);return this.transitionsBetween(o,t)this.transitionsBetween(a,u)+this.transitionsBetween(l,u)?h:u:h:this.isValid(u)?u:null}shiftToModuleCenter(e){let t,r,n=e[0],i=e[1],s=e[2],o=e[3],a=this.transitionsBetween(n,o)+1,l=this.transitionsBetween(s,o)+1,h=tC.shiftPoint(n,i,4*l),u=tC.shiftPoint(s,i,4*a);a=this.transitionsBetween(h,o)+1,l=this.transitionsBetween(u,o)+1,(1&a)==1&&(a+=1),(1&l)==1&&(l+=1);let d=(n.getX()+i.getX()+s.getX()+o.getX())/4,c=(n.getY()+i.getY()+s.getY()+o.getY())/4;return n=tC.moveAway(n,d,c),i=tC.moveAway(i,d,c),s=tC.moveAway(s,d,c),o=tC.moveAway(o,d,c),h=tC.shiftPoint(n,i,4*l),h=tC.shiftPoint(h,o,4*a),t=tC.shiftPoint(i,n,4*l),t=tC.shiftPoint(t,s,4*a),u=tC.shiftPoint(s,o,4*l),u=tC.shiftPoint(u,i,4*a),r=tC.shiftPoint(o,s,4*l),[h,t,u,r=tC.shiftPoint(r,n,4*a)]}isValid(e){return e.getX()>=0&&e.getX()0&&e.getY()Math.abs(i-r);if(o){let e=r;r=n,n=e,e=i,i=s,s=e}let a=Math.abs(i-r),l=Math.abs(s-n),h=-a/2,u=n0){if(t===s)break;t+=u,h-=a}}return c}}class tE{constructor(){this.decoder=new tA}decode(e,t=null){let r,n;if(null!=t&&t.has(V.PURE_BARCODE)){let t=tE.extractPureBits(e.getBlackMatrix());r=this.decoder.decode(t),n=tE.NO_POINTS}else{let t=new tC(e.getBlackMatrix()).detect();r=this.decoder.decode(t.getBits()),n=t.getPoints()}let i=r.getRawBytes(),s=new er(r.getText(),i,8*i.length,n,en.DATA_MATRIX,P.currentTimeMillis()),o=r.getByteSegments();null!=o&&s.putMetadata(ei.BYTE_SEGMENTS,o);let a=r.getECLevel();return null!=a&&s.putMetadata(ei.ERROR_CORRECTION_LEVEL,a),s}reset(){}static extractPureBits(e){let t=e.getTopLeftOnBit(),r=e.getBottomRightOnBit();if(null==t||null==r)throw new Z;let n=this.moduleSize(t,e),i=t[1],s=r[1],o=t[0],a=(r[0]-o+1)/n,l=(s-i+1)/n;if(a<=0||l<=0)throw new Z;let h=n/2;i+=h,o+=h;let u=new Y(a,l);for(let t=0;t=t_.FOR_BITS.size)throw new O;return t_.FOR_BITS.get(e)}}t_.FOR_BITS=new Map,t_.FOR_VALUE=new Map,t_.L=new t_(_.L,"L",1),t_.M=new t_(_.M,"M",0),t_.Q=new t_(_.Q,"Q",3),t_.H=new t_(_.H,"H",2);class tI{constructor(e){this.errorCorrectionLevel=t_.forBits(e>>3&3),this.dataMask=7&e}static numBitsDiffering(e,t){return k.bitCount(e^t)}static decodeFormatInformation(e,t){let r=tI.doDecodeFormatInformation(e,t);return null!==r?r:tI.doDecodeFormatInformation(e^tI.FORMAT_INFO_MASK_QR,t^tI.FORMAT_INFO_MASK_QR)}static doDecodeFormatInformation(e,t){let r=Number.MAX_SAFE_INTEGER,n=0;for(let i of tI.FORMAT_INFO_DECODE_LOOKUP){let s=i[0];if(s===e||s===t)return new tI(i[1]);let o=tI.numBitsDiffering(e,s);o40)throw new O;return tT.VERSIONS[e-1]}static decodeVersionInformation(e){let t=Number.MAX_SAFE_INTEGER,r=0;for(let n=0;n6&&(t.setRegion(e-11,0,3,6),t.setRegion(0,e-11,6,3)),t}toString(){return""+this.versionNumber}}tT.VERSION_DECODE_INFO=Int32Array.from([31892,34236,39577,42195,48118,51042,55367,58893,63784,68472,70749,76311,79154,84390,87683,92361,96236,102084,102881,110507,110734,117786,119615,126325,127568,133589,136944,141498,145311,150283,152622,158308,161089,167017]),tT.VERSIONS=[new tT(1,new Int32Array(0),new tS(7,new tp(1,19)),new tS(10,new tp(1,16)),new tS(13,new tp(1,13)),new tS(17,new tp(1,9))),new tT(2,Int32Array.from([6,18]),new tS(10,new tp(1,34)),new tS(16,new tp(1,28)),new tS(22,new tp(1,22)),new tS(28,new tp(1,16))),new tT(3,Int32Array.from([6,22]),new tS(15,new tp(1,55)),new tS(26,new tp(1,44)),new tS(18,new tp(2,17)),new tS(22,new tp(2,13))),new tT(4,Int32Array.from([6,26]),new tS(20,new tp(1,80)),new tS(18,new tp(2,32)),new tS(26,new tp(2,24)),new tS(16,new tp(4,9))),new tT(5,Int32Array.from([6,30]),new tS(26,new tp(1,108)),new tS(24,new tp(2,43)),new tS(18,new tp(2,15),new tp(2,16)),new tS(22,new tp(2,11),new tp(2,12))),new tT(6,Int32Array.from([6,34]),new tS(18,new tp(2,68)),new tS(16,new tp(4,27)),new tS(24,new tp(4,19)),new tS(28,new tp(4,15))),new tT(7,Int32Array.from([6,22,38]),new tS(20,new tp(2,78)),new tS(18,new tp(4,31)),new tS(18,new tp(2,14),new tp(4,15)),new tS(26,new tp(4,13),new tp(1,14))),new tT(8,Int32Array.from([6,24,42]),new tS(24,new tp(2,97)),new tS(22,new tp(2,38),new tp(2,39)),new tS(22,new tp(4,18),new tp(2,19)),new tS(26,new tp(4,14),new tp(2,15))),new tT(9,Int32Array.from([6,26,46]),new tS(30,new tp(2,116)),new tS(22,new tp(3,36),new tp(2,37)),new tS(20,new tp(4,16),new tp(4,17)),new tS(24,new tp(4,12),new tp(4,13))),new tT(10,Int32Array.from([6,28,50]),new tS(18,new tp(2,68),new tp(2,69)),new tS(26,new tp(4,43),new tp(1,44)),new tS(24,new tp(6,19),new tp(2,20)),new tS(28,new tp(6,15),new tp(2,16))),new tT(11,Int32Array.from([6,30,54]),new tS(20,new tp(4,81)),new tS(30,new tp(1,50),new tp(4,51)),new tS(28,new tp(4,22),new tp(4,23)),new tS(24,new tp(3,12),new tp(8,13))),new tT(12,Int32Array.from([6,32,58]),new tS(24,new tp(2,92),new tp(2,93)),new tS(22,new tp(6,36),new tp(2,37)),new tS(26,new tp(4,20),new tp(6,21)),new tS(28,new tp(7,14),new tp(4,15))),new tT(13,Int32Array.from([6,34,62]),new tS(26,new tp(4,107)),new tS(22,new tp(8,37),new tp(1,38)),new tS(24,new tp(8,20),new tp(4,21)),new tS(22,new tp(12,11),new tp(4,12))),new tT(14,Int32Array.from([6,26,46,66]),new tS(30,new tp(3,115),new tp(1,116)),new tS(24,new tp(4,40),new tp(5,41)),new tS(20,new tp(11,16),new tp(5,17)),new tS(24,new tp(11,12),new tp(5,13))),new tT(15,Int32Array.from([6,26,48,70]),new tS(22,new tp(5,87),new tp(1,88)),new tS(24,new tp(5,41),new tp(5,42)),new tS(30,new tp(5,24),new tp(7,25)),new tS(24,new tp(11,12),new tp(7,13))),new tT(16,Int32Array.from([6,26,50,74]),new tS(24,new tp(5,98),new tp(1,99)),new tS(28,new tp(7,45),new tp(3,46)),new tS(24,new tp(15,19),new tp(2,20)),new tS(30,new tp(3,15),new tp(13,16))),new tT(17,Int32Array.from([6,30,54,78]),new tS(28,new tp(1,107),new tp(5,108)),new tS(28,new tp(10,46),new tp(1,47)),new tS(28,new tp(1,22),new tp(15,23)),new tS(28,new tp(2,14),new tp(17,15))),new tT(18,Int32Array.from([6,30,56,82]),new tS(30,new tp(5,120),new tp(1,121)),new tS(26,new tp(9,43),new tp(4,44)),new tS(28,new tp(17,22),new tp(1,23)),new tS(28,new tp(2,14),new tp(19,15))),new tT(19,Int32Array.from([6,30,58,86]),new tS(28,new tp(3,113),new tp(4,114)),new tS(26,new tp(3,44),new tp(11,45)),new tS(26,new tp(17,21),new tp(4,22)),new tS(26,new tp(9,13),new tp(16,14))),new tT(20,Int32Array.from([6,34,62,90]),new tS(28,new tp(3,107),new tp(5,108)),new tS(26,new tp(3,41),new tp(13,42)),new tS(30,new tp(15,24),new tp(5,25)),new tS(28,new tp(15,15),new tp(10,16))),new tT(21,Int32Array.from([6,28,50,72,94]),new tS(28,new tp(4,116),new tp(4,117)),new tS(26,new tp(17,42)),new tS(28,new tp(17,22),new tp(6,23)),new tS(30,new tp(19,16),new tp(6,17))),new tT(22,Int32Array.from([6,26,50,74,98]),new tS(28,new tp(2,111),new tp(7,112)),new tS(28,new tp(17,46)),new tS(30,new tp(7,24),new tp(16,25)),new tS(24,new tp(34,13))),new tT(23,Int32Array.from([6,30,54,78,102]),new tS(30,new tp(4,121),new tp(5,122)),new tS(28,new tp(4,47),new tp(14,48)),new tS(30,new tp(11,24),new tp(14,25)),new tS(30,new tp(16,15),new tp(14,16))),new tT(24,Int32Array.from([6,28,54,80,106]),new tS(30,new tp(6,117),new tp(4,118)),new tS(28,new tp(6,45),new tp(14,46)),new tS(30,new tp(11,24),new tp(16,25)),new tS(30,new tp(30,16),new tp(2,17))),new tT(25,Int32Array.from([6,32,58,84,110]),new tS(26,new tp(8,106),new tp(4,107)),new tS(28,new tp(8,47),new tp(13,48)),new tS(30,new tp(7,24),new tp(22,25)),new tS(30,new tp(22,15),new tp(13,16))),new tT(26,Int32Array.from([6,30,58,86,114]),new tS(28,new tp(10,114),new tp(2,115)),new tS(28,new tp(19,46),new tp(4,47)),new tS(28,new tp(28,22),new tp(6,23)),new tS(30,new tp(33,16),new tp(4,17))),new tT(27,Int32Array.from([6,34,62,90,118]),new tS(30,new tp(8,122),new tp(4,123)),new tS(28,new tp(22,45),new tp(3,46)),new tS(30,new tp(8,23),new tp(26,24)),new tS(30,new tp(12,15),new tp(28,16))),new tT(28,Int32Array.from([6,26,50,74,98,122]),new tS(30,new tp(3,117),new tp(10,118)),new tS(28,new tp(3,45),new tp(23,46)),new tS(30,new tp(4,24),new tp(31,25)),new tS(30,new tp(11,15),new tp(31,16))),new tT(29,Int32Array.from([6,30,54,78,102,126]),new tS(30,new tp(7,116),new tp(7,117)),new tS(28,new tp(21,45),new tp(7,46)),new tS(30,new tp(1,23),new tp(37,24)),new tS(30,new tp(19,15),new tp(26,16))),new tT(30,Int32Array.from([6,26,52,78,104,130]),new tS(30,new tp(5,115),new tp(10,116)),new tS(28,new tp(19,47),new tp(10,48)),new tS(30,new tp(15,24),new tp(25,25)),new tS(30,new tp(23,15),new tp(25,16))),new tT(31,Int32Array.from([6,30,56,82,108,134]),new tS(30,new tp(13,115),new tp(3,116)),new tS(28,new tp(2,46),new tp(29,47)),new tS(30,new tp(42,24),new tp(1,25)),new tS(30,new tp(23,15),new tp(28,16))),new tT(32,Int32Array.from([6,34,60,86,112,138]),new tS(30,new tp(17,115)),new tS(28,new tp(10,46),new tp(23,47)),new tS(30,new tp(10,24),new tp(35,25)),new tS(30,new tp(19,15),new tp(35,16))),new tT(33,Int32Array.from([6,30,58,86,114,142]),new tS(30,new tp(17,115),new tp(1,116)),new tS(28,new tp(14,46),new tp(21,47)),new tS(30,new tp(29,24),new tp(19,25)),new tS(30,new tp(11,15),new tp(46,16))),new tT(34,Int32Array.from([6,34,62,90,118,146]),new tS(30,new tp(13,115),new tp(6,116)),new tS(28,new tp(14,46),new tp(23,47)),new tS(30,new tp(44,24),new tp(7,25)),new tS(30,new tp(59,16),new tp(1,17))),new tT(35,Int32Array.from([6,30,54,78,102,126,150]),new tS(30,new tp(12,121),new tp(7,122)),new tS(28,new tp(12,47),new tp(26,48)),new tS(30,new tp(39,24),new tp(14,25)),new tS(30,new tp(22,15),new tp(41,16))),new tT(36,Int32Array.from([6,24,50,76,102,128,154]),new tS(30,new tp(6,121),new tp(14,122)),new tS(28,new tp(6,47),new tp(34,48)),new tS(30,new tp(46,24),new tp(10,25)),new tS(30,new tp(2,15),new tp(64,16))),new tT(37,Int32Array.from([6,28,54,80,106,132,158]),new tS(30,new tp(17,122),new tp(4,123)),new tS(28,new tp(29,46),new tp(14,47)),new tS(30,new tp(49,24),new tp(10,25)),new tS(30,new tp(24,15),new tp(46,16))),new tT(38,Int32Array.from([6,32,58,84,110,136,162]),new tS(30,new tp(4,122),new tp(18,123)),new tS(28,new tp(13,46),new tp(32,47)),new tS(30,new tp(48,24),new tp(14,25)),new tS(30,new tp(42,15),new tp(32,16))),new tT(39,Int32Array.from([6,26,54,82,110,138,166]),new tS(30,new tp(20,117),new tp(4,118)),new tS(28,new tp(40,47),new tp(7,48)),new tS(30,new tp(43,24),new tp(22,25)),new tS(30,new tp(10,15),new tp(67,16))),new tT(40,Int32Array.from([6,30,58,86,114,142,170]),new tS(30,new tp(19,118),new tp(6,119)),new tS(28,new tp(18,47),new tp(31,48)),new tS(30,new tp(34,24),new tp(34,25)),new tS(30,new tp(20,15),new tp(61,16)))],(u=I||(I={}))[u.DATA_MASK_000=0]="DATA_MASK_000",u[u.DATA_MASK_001=1]="DATA_MASK_001",u[u.DATA_MASK_010=2]="DATA_MASK_010",u[u.DATA_MASK_011=3]="DATA_MASK_011",u[u.DATA_MASK_100=4]="DATA_MASK_100",u[u.DATA_MASK_101=5]="DATA_MASK_101",u[u.DATA_MASK_110=6]="DATA_MASK_110",u[u.DATA_MASK_111=7]="DATA_MASK_111";class tR{constructor(e,t){this.value=e,this.isMasked=t}unmaskBitMatrix(e,t){for(let r=0;r(e+t&1)==0)],[I.DATA_MASK_001,new tR(I.DATA_MASK_001,(e,t)=>(1&e)==0)],[I.DATA_MASK_010,new tR(I.DATA_MASK_010,(e,t)=>t%3==0)],[I.DATA_MASK_011,new tR(I.DATA_MASK_011,(e,t)=>(e+t)%3==0)],[I.DATA_MASK_100,new tR(I.DATA_MASK_100,(e,t)=>(Math.floor(e/2)+Math.floor(t/3)&1)==0)],[I.DATA_MASK_101,new tR(I.DATA_MASK_101,(e,t)=>e*t%6==0)],[I.DATA_MASK_110,new tR(I.DATA_MASK_110,(e,t)=>e*t%6<3)],[I.DATA_MASK_111,new tR(I.DATA_MASK_111,(e,t)=>(e+t+e*t%3&1)==0)]]);class tN{constructor(e){let t=e.getHeight();if(t<21||(3&t)!=1)throw new U;this.bitMatrix=e}readFormatInformation(){if(null!==this.parsedFormatInfo&&void 0!==this.parsedFormatInfo)return this.parsedFormatInfo;let e=0;for(let t=0;t<6;t++)e=this.copyBit(t,8,e);e=this.copyBit(7,8,e),e=this.copyBit(8,8,e),e=this.copyBit(8,7,e);for(let t=5;t>=0;t--)e=this.copyBit(8,t,e);let t=this.bitMatrix.getHeight(),r=0,n=t-7;for(let e=t-1;e>=n;e--)r=this.copyBit(8,e,r);for(let e=t-8;e=0;t--)for(let i=e-9;i>=n;i--)r=this.copyBit(i,t,r);let i=tT.decodeVersionInformation(r);if(null!==i&&i.getDimensionForVersion()===e)return this.parsedVersion=i,i;r=0;for(let t=5;t>=0;t--)for(let i=e-9;i>=n;i--)r=this.copyBit(t,i,r);if(null!==(i=tT.decodeVersionInformation(r))&&i.getDimensionForVersion()===e)return this.parsedVersion=i,i;throw new U}copyBit(e,t,r){return(this.isMirror?this.bitMatrix.get(t,e):this.bitMatrix.get(e,t))?r<<1|1:r<<1}readCodewords(){let e=this.readFormatInformation(),t=this.readVersion(),r=tR.values.get(e.getDataMask()),n=this.bitMatrix.getHeight();r.unmaskBitMatrix(this.bitMatrix,n);let i=t.buildFunctionPattern(),s=!0,o=new Uint8Array(t.getTotalCodewords()),a=0,l=0,h=0;for(let e=n-1;e>0;e-=2){6===e&&e--;for(let t=0;t=0&&o[h].codewords.length!==l;)h--;h++;let u=l-n.getECCodewordsPerBlock(),d=0;for(let t=0;ti.available())e=ty.TERMINATOR;else{let t=i.readBits(4);e=ty.forBits(t)}switch(e){case ty.TERMINATOR:break;case ty.FNC1_FIRST_POSITION:case ty.FNC1_SECOND_POSITION:h=!0;break;case ty.STRUCTURED_APPEND:if(16>i.available())throw new U;a=i.readBits(8),l=i.readBits(8);break;case ty.ECI:let u=tO.parseECIValue(i);if(r=H.getCharacterSetECIByValue(u),null===r)throw new U;break;case ty.HANZI:let d=i.readBits(4),c=i.readBits(e.getCharacterCountBits(t));d===tO.GB2312_SUBSET&&tO.decodeHanziSegment(i,s,c);break;default:let g=i.readBits(e.getCharacterCountBits(t));switch(e){case ty.NUMERIC:tO.decodeNumericSegment(i,s,g);break;case ty.ALPHANUMERIC:tO.decodeAlphanumericSegment(i,s,g,h);break;case ty.BYTE:tO.decodeByteSegment(i,s,g,r,o,n);break;case ty.KANJI:tO.decodeKanjiSegment(i,s,g);break;default:throw new U}}}while(e!==ty.TERMINATOR)}catch(e){throw new U}return new es(e,s.toString(),0===o.length?null:o,null===r?null:r.toString(),a,l)}static decodeHanziSegment(e,t,r){if(13*r>e.available())throw new U;let n=new Uint8Array(2*r),i=0;for(;r>0;){let t=e.readBits(13),s=t/96<<8&4294967295|t%96;s<959?s+=41377:s+=42657,n[i]=s>>8&255,n[i+1]=255&s,i+=2,r--}try{t.append(X.decode(n,W.GB2312))}catch(e){throw new U(e)}}static decodeKanjiSegment(e,t,r){if(13*r>e.available())throw new U;let n=new Uint8Array(2*r),i=0;for(;r>0;){let t=e.readBits(13),s=t/192<<8&4294967295|t%192;s<7936?s+=33088:s+=49472,n[i]=s>>8,n[i+1]=s,i+=2,r--}try{t.append(X.decode(n,W.SHIFT_JIS))}catch(e){throw new U(e)}}static decodeByteSegment(e,t,r,n,i,s){let o;if(8*r>e.available())throw new U;let a=new Uint8Array(r);for(let t=0;t=tO.ALPHANUMERIC_CHARS.length)throw new U;return tO.ALPHANUMERIC_CHARS[e]}static decodeAlphanumericSegment(e,t,r,n){let i=t.length();for(;r>1;){if(11>e.available())throw new U;let n=e.readBits(11);t.append(tO.toAlphaNumericChar(Math.floor(n/45))),t.append(tO.toAlphaNumericChar(n%45)),r-=2}if(1===r){if(6>e.available())throw new U;t.append(tO.toAlphaNumericChar(e.readBits(6)))}if(n)for(let e=i;e=3;){if(10>e.available())throw new U;let n=e.readBits(10);if(n>=1e3)throw new U;t.append(tO.toAlphaNumericChar(Math.floor(n/100))),t.append(tO.toAlphaNumericChar(Math.floor(n/10)%10)),t.append(tO.toAlphaNumericChar(n%10)),r-=3}if(2===r){if(7>e.available())throw new U;let r=e.readBits(7);if(r>=100)throw new U;t.append(tO.toAlphaNumericChar(Math.floor(r/10))),t.append(tO.toAlphaNumericChar(r%10))}else if(1===r){if(4>e.available())throw new U;let r=e.readBits(4);if(r>=10)throw new U;t.append(tO.toAlphaNumericChar(r))}}static parseECIValue(e){let t=e.readBits(8);if((128&t)==0)return 127&t;if((192&t)==128)return(63&t)<<8&4294967295|e.readBits(8);if((224&t)==192)return(31&t)<<16&4294967295|e.readBits(16);throw new U}}tO.ALPHANUMERIC_CHARS="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",tO.GB2312_SUBSET=1;class tM{constructor(e){this.mirrored=e}isMirrored(){return this.mirrored}applyMirroredCorrection(e){if(!this.mirrored||null===e||e.length<3)return;let t=e[0];e[0]=e[2],e[2]=t}}class tB{constructor(){this.rsDecoder=new ec(eh.QR_CODE_FIELD_256)}decodeBooleanArray(e,t){return this.decodeBitMatrix(Y.parseFromBooleanArray(e),t)}decodeBitMatrix(e,t){let r=new tN(e),n=null;try{return this.decodeBitMatrixParser(r,t)}catch(e){n=e}try{r.remask(),r.setMirror(!0),r.readVersion(),r.readFormatInformation(),r.mirror();let e=this.decodeBitMatrixParser(r,t);return e.setOther(new tM(!0)),e}catch(e){if(null!==n)throw n;throw e}}decodeBitMatrixParser(e,t){let r=e.readVersion(),n=e.readFormatInformation().getErrorCorrectionLevel(),i=e.readCodewords(),s=tD.getDataBlocks(i,r,n),o=0;for(let e of s)o+=e.getNumDataCodewords();let a=new Uint8Array(o),l=0;for(let e of s){let t=e.getCodewords(),r=e.getNumDataCodewords();this.correctErrors(t,r);for(let e=0;e=r)return!1;return!0}crossCheckVertical(e,t,r,n){let i=this.image,s=i.getHeight(),o=this.crossCheckStateCount;o[0]=0,o[1]=0,o[2]=0;let a=e;for(;a>=0&&i.get(t,a)&&o[1]<=r;)o[1]++,a--;if(a<0||o[1]>r)return NaN;for(;a>=0&&!i.get(t,a)&&o[0]<=r;)o[0]++,a--;if(o[0]>r)return NaN;for(a=e+1;ar)return NaN;for(;ar||5*Math.abs(o[0]+o[1]+o[2]-n)>=2*n?NaN:this.foundPatternCross(o)?tP.centerFromEnd(o,a):NaN}handlePossibleCenter(e,t,r){let n=e[0]+e[1]+e[2],i=tP.centerFromEnd(e,r),s=this.crossCheckVertical(t,i,2*e[1],n);if(!isNaN(s)){let t=(e[0]+e[1]+e[2])/3;for(let e of this.possibleCenters)if(e.aboutEquals(t,s,i))return e.combineEstimate(s,i,t);let r=new tb(i,s,t);this.possibleCenters.push(r),null!==this.resultPointCallback&&void 0!==this.resultPointCallback&&this.resultPointCallback.foundPossibleResultPoint(r)}return null}}class tL extends eA{constructor(e,t,r,n){super(e,t),this.estimatedModuleSize=r,this.count=n,void 0===n&&(this.count=1)}getEstimatedModuleSize(){return this.estimatedModuleSize}getCount(){return this.count}aboutEquals(e,t,r){if(Math.abs(t-this.getY())<=e&&Math.abs(r-this.getX())<=e){let t=Math.abs(e-this.estimatedModuleSize);return t<=1||t<=this.estimatedModuleSize}return!1}combineEstimate(e,t,r){let n=this.count+1;return new tL((this.count*this.getX()+t)/n,(this.count*this.getY()+e)/n,(this.count*this.estimatedModuleSize+r)/n,n)}}class tF{constructor(e){this.bottomLeft=e[0],this.topLeft=e[1],this.topRight=e[2]}getBottomLeft(){return this.bottomLeft}getTopLeft(){return this.topLeft}getTopRight(){return this.topRight}}class tv{constructor(e,t){this.image=e,this.resultPointCallback=t,this.possibleCenters=[],this.crossCheckStateCount=new Int32Array(5),this.resultPointCallback=t}getImage(){return this.image}getPossibleCenters(){return this.possibleCenters}find(e){let t=null!=e&&void 0!==e.get(V.TRY_HARDER),r=null!=e&&void 0!==e.get(V.PURE_BARCODE),n=this.image,i=n.getHeight(),s=n.getWidth(),o=Math.floor(3*i/(4*tv.MAX_MODULES));(ol[2]&&(e+=t-l[2]-o,i=s-1)}}else{l[0]=l[2],l[1]=l[3],l[2]=l[4],l[3]=1,l[4]=0,t=3;continue}t=0,l[0]=0,l[1]=0,l[2]=0,l[3]=0,l[4]=0}else l[0]=l[2],l[1]=l[3],l[2]=l[4],l[3]=1,l[4]=0,t=3}else l[++t]++}else l[t]++;tv.foundPatternCross(l)&&!0===this.handlePossibleCenter(l,e,s,r)&&(o=l[0],this.hasSkipped&&(a=this.haveMultiplyConfirmedCenters()))}let h=this.selectBestPatterns();return eA.orderBestPatterns(h),new tF(h)}static centerFromEnd(e,t){return t-e[4]-e[3]-e[2]/2}static foundPatternCross(e){let t=0;for(let r=0;r<5;r++){let n=e[r];if(0===n)return!1;t+=n}if(t<7)return!1;let r=t/7,n=r/2;return Math.abs(r-e[0])=s&&t>=s&&o.get(t-s,e-s);)i[2]++,s++;if(e=s&&t>=s&&!o.get(t-s,e-s)&&i[1]<=r;)i[1]++,s++;if(er)return!1;for(;e>=s&&t>=s&&o.get(t-s,e-s)&&i[0]<=r;)i[0]++,s++;if(i[0]>r)return!1;let a=o.getHeight(),l=o.getWidth();for(s=1;e+s=a||t+s>=l)return!1;for(;e+s=a||t+s>=l||i[3]>=r)return!1;for(;e+s=r)&&Math.abs(i[0]+i[1]+i[2]+i[3]+i[4]-n)<2*n&&tv.foundPatternCross(i)}crossCheckVertical(e,t,r,n){let i=this.image,s=i.getHeight(),o=this.getCrossCheckStateCount(),a=e;for(;a>=0&&i.get(t,a);)o[2]++,a--;if(a<0)return NaN;for(;a>=0&&!i.get(t,a)&&o[1]<=r;)o[1]++,a--;if(a<0||o[1]>r)return NaN;for(;a>=0&&i.get(t,a)&&o[0]<=r;)o[0]++,a--;if(o[0]>r)return NaN;for(a=e+1;a=r)return NaN;for(;a=r||5*Math.abs(o[0]+o[1]+o[2]+o[3]+o[4]-n)>=2*n?NaN:tv.foundPatternCross(o)?tv.centerFromEnd(o,a):NaN}crossCheckHorizontal(e,t,r,n){let i=this.image,s=i.getWidth(),o=this.getCrossCheckStateCount(),a=e;for(;a>=0&&i.get(a,t);)o[2]++,a--;if(a<0)return NaN;for(;a>=0&&!i.get(a,t)&&o[1]<=r;)o[1]++,a--;if(a<0||o[1]>r)return NaN;for(;a>=0&&i.get(a,t)&&o[0]<=r;)o[0]++,a--;if(o[0]>r)return NaN;for(a=e+1;a=r)return NaN;for(;a=r||5*Math.abs(o[0]+o[1]+o[2]+o[3]+o[4]-n)>=n?NaN:tv.foundPatternCross(o)?tv.centerFromEnd(o,a):NaN}handlePossibleCenter(e,t,r,n){let i=e[0]+e[1]+e[2]+e[3]+e[4],s=tv.centerFromEnd(e,r),o=this.crossCheckVertical(t,Math.floor(s),e[2],i);if(!isNaN(o)&&!isNaN(s=this.crossCheckHorizontal(Math.floor(s),Math.floor(o),e[2],i))&&(!n||this.crossCheckDiagonal(Math.floor(o),Math.floor(s),e[2],i))){let e=i/7,t=!1,r=this.possibleCenters;for(let n=0,i=r.length;n=tv.CENTER_QUORUM){if(null!=e)return this.hasSkipped=!0,Math.floor((Math.abs(e.getX()-t.getX())-Math.abs(e.getY()-t.getY()))/2);e=t}return 0}haveMultiplyConfirmedCenters(){let e=0,t=0,r=this.possibleCenters.length;for(let r of this.possibleCenters)r.getCount()>=tv.CENTER_QUORUM&&(e++,t+=r.getEstimatedModuleSize());if(e<3)return!1;let n=t/r,i=0;for(let e of this.possibleCenters)i+=Math.abs(e.getEstimatedModuleSize()-n);return i<=.05*t}selectBestPatterns(){let e;let t=this.possibleCenters.length;if(t<3)throw new Z;let r=this.possibleCenters;if(t>3){let n=0,i=0;for(let e of this.possibleCenters){let t=e.getEstimatedModuleSize();n+=t,i+=t*t}e=n/t;let s=Math.sqrt(i/t-e*e);r.sort((t,r)=>{let n=Math.abs(r.getEstimatedModuleSize()-e),i=Math.abs(t.getEstimatedModuleSize()-e);return ni?1:0});let o=Math.max(.2*e,s);for(let t=0;t3;t++)Math.abs(r[t].getEstimatedModuleSize()-e)>o&&(r.splice(t,1),t--)}if(r.length>3){let t=0;for(let e of r)t+=e.getEstimatedModuleSize();e=t/r.length,r.sort((t,r)=>{if(r.getCount()!==t.getCount())return r.getCount()-t.getCount();{let n=Math.abs(r.getEstimatedModuleSize()-e),i=Math.abs(t.getEstimatedModuleSize()-e);return ni?-1:0}}),r.splice(3)}return[r[0],r[1],r[2]]}}tv.CENTER_QUORUM=2,tv.MIN_SKIP=3,tv.MAX_MODULES=57;class tk{constructor(e){this.image=e}getImage(){return this.image}getResultPointCallback(){return this.resultPointCallback}detect(e){this.resultPointCallback=null==e?null:e.get(V.NEED_RESULT_POINT_CALLBACK);let t=new tv(this.image,this.resultPointCallback).find(e);return this.processFinderPatternInfo(t)}processFinderPatternInfo(e){let t=e.getTopLeft(),r=e.getTopRight(),n=e.getBottomLeft(),i=this.calculateModuleSize(t,r,n);if(i<1)throw new Z("No pattern found in proccess finder.");let s=tk.computeDimension(t,r,n,i),o=tT.getProvisionalVersionForDimension(s),a=o.getDimensionForVersion()-7,l=null;if(o.getAlignmentPatternCenters().length>0){let e=r.getX()-t.getX()+n.getX(),s=r.getY()-t.getY()+n.getY(),o=1-3/a,h=Math.floor(t.getX()+o*(e-t.getX())),u=Math.floor(t.getY()+o*(s-t.getY()));for(let e=4;e<=16;e<<=1)try{l=this.findAlignmentInRegion(i,h,u,e);break}catch(e){if(!(e instanceof Z))throw e}}let h=tk.createTransform(t,r,n,l,s);return new eC(tk.sampleGrid(this.image,h,s),null===l?[n,t,r]:[n,t,r,l])}static createTransform(e,t,r,n,i){let s,o,a,l;let h=i-3.5;return null!==n?(s=n.getX(),o=n.getY(),l=a=h-3):(s=t.getX()-e.getX()+r.getX(),o=t.getY()-e.getY()+r.getY(),a=h,l=h),eI.quadrilateralToQuadrilateral(3.5,3.5,h,3.5,a,l,3.5,h,e.getX(),e.getY(),t.getX(),t.getY(),s,o,r.getX(),r.getY())}static sampleGrid(e,t,r){return ep.getInstance().sampleGridWithTransform(e,r,r,t)}static computeDimension(e,t,r,n){let i=Math.floor((ef.round(eA.distance(e,t)/n)+ef.round(eA.distance(e,r)/n))/2)+7;switch(3&i){case 0:i++;break;case 2:i--;break;case 3:throw new Z("Dimensions could be not found.")}return i}calculateModuleSize(e,t,r){return(this.calculateModuleSizeOneWay(e,t)+this.calculateModuleSizeOneWay(e,r))/2}calculateModuleSizeOneWay(e,t){let r=this.sizeOfBlackWhiteBlackRunBothWays(Math.floor(e.getX()),Math.floor(e.getY()),Math.floor(t.getX()),Math.floor(t.getY())),n=this.sizeOfBlackWhiteBlackRunBothWays(Math.floor(t.getX()),Math.floor(t.getY()),Math.floor(e.getX()),Math.floor(e.getY()));return isNaN(r)?n/7:isNaN(n)?r/7:(r+n)/14}sizeOfBlackWhiteBlackRunBothWays(e,t,r,n){let i=this.sizeOfBlackWhiteBlackRun(e,t,r,n),s=1,o=e-(r-e);o<0?(s=e/(e-o),o=0):o>=this.image.getWidth()&&(s=(this.image.getWidth()-1-e)/(o-e),o=this.image.getWidth()-1);let a=Math.floor(t-(n-t)*s);return s=1,a<0?(s=t/(t-a),a=0):a>=this.image.getHeight()&&(s=(this.image.getHeight()-1-t)/(a-t),a=this.image.getHeight()-1),o=Math.floor(e+(o-e)*s),(i+=this.sizeOfBlackWhiteBlackRun(e,t,o,a))-1}sizeOfBlackWhiteBlackRun(e,t,r,n){let i=Math.abs(n-t)>Math.abs(r-e);if(i){let i=e;e=t,t=i,i=r,r=n,n=i}let s=Math.abs(r-e),o=Math.abs(n-t),a=-s/2,l=e0){if(c===n)break;c+=h,a-=s}}return 2===u?ef.distance(r+l,n,e,t):NaN}findAlignmentInRegion(e,t,r,n){let i=Math.floor(n*e),s=Math.max(0,t-i),o=Math.min(this.image.getWidth()-1,t+i);if(o-s<3*e)throw new Z("Alignment top exceeds estimated module size.");let a=Math.max(0,r-i),l=Math.min(this.image.getHeight()-1,r+i);if(l-a<3*e)throw new Z("Alignment bottom exceeds estimated module size.");return new tP(this.image,s,a,o-s,l-a,e,this.resultPointCallback).find()}}class tx{constructor(){this.decoder=new tB}getDecoder(){return this.decoder}decode(e,t){let r,n;if(null!=t&&void 0!==t.get(V.PURE_BARCODE)){let i=tx.extractPureBits(e.getBlackMatrix());r=this.decoder.decodeBitMatrix(i,t),n=tx.NO_POINTS}else{let i=new tk(e.getBlackMatrix()).detect(t);r=this.decoder.decodeBitMatrix(i.getBits(),t),n=i.getPoints()}r.getOther() instanceof tM&&r.getOther().applyMirroredCorrection(n);let i=new er(r.getText(),r.getRawBytes(),void 0,n,en.QR_CODE,void 0),s=r.getByteSegments();null!==s&&i.putMetadata(ei.BYTE_SEGMENTS,s);let o=r.getECLevel();return null!==o&&i.putMetadata(ei.ERROR_CORRECTION_LEVEL,o),r.hasStructuredAppend()&&(i.putMetadata(ei.STRUCTURED_APPEND_SEQUENCE,r.getStructuredAppendSequenceNumber()),i.putMetadata(ei.STRUCTURED_APPEND_PARITY,r.getStructuredAppendParity())),i}reset(){}static extractPureBits(e){let t=e.getTopLeftOnBit(),r=e.getBottomRightOnBit();if(null===t||null===r)throw new Z;let n=this.moduleSize(t,e),i=t[1],s=r[1],o=t[0],a=r[0];if(o>=a||i>=s||s-i!=a-o&&(a=o+(s-i))>=e.getWidth())throw new Z;let l=Math.round((a-o+1)/n),h=Math.round((s-i+1)/n);if(l<=0||h<=0||h!==l)throw new Z;let u=Math.floor(n/2);i+=u;let d=(o+=u)+Math.floor((l-1)*n)-a;if(d>0){if(d>u)throw new Z;o-=d}let c=i+Math.floor((h-1)*n)-s;if(c>0){if(c>u)throw new Z;i-=c}let g=new Y(l,h);for(let t=0;t0;){let o=tH.findGuardPattern(e,i,--n,r,!1,s,l);if(null!=o)t=o;else{n++;break}}o[0]=new eA(t[0],n),o[1]=new eA(t[1],n),a=!0;break}}let h=n+1;if(a){let n=0,i=Int32Array.from([Math.trunc(o[0].getX()),Math.trunc(o[1].getX())]);for(;htH.SKIPPED_ROW_COUNT_MAX)break;n++}}h-=n+1,o[2]=new eA(i[0],h),o[3]=new eA(i[1],h)}return h-n0&&l++s?n-s:s-n;if(l>r)return 1/0;a+=l}return a/i}}tH.INDEXES_START_PATTERN=Int32Array.from([0,4,1,5]),tH.INDEXES_STOP_PATTERN=Int32Array.from([6,2,7,3]),tH.MAX_AVG_VARIANCE=.42,tH.MAX_INDIVIDUAL_VARIANCE=.8,tH.START_PATTERN=Int32Array.from([8,1,1,1,1,1,1,3]),tH.STOP_PATTERN=Int32Array.from([7,1,1,3,1,1,1,2,1]),tH.MAX_PIXEL_DRIFT=3,tH.MAX_PATTERN_DRIFT=5,tH.SKIPPED_ROW_COUNT_MAX=25,tH.ROW_STEP=5,tH.BARCODE_MIN_HEIGHT=10;class tG{constructor(e,t){if(0===t.length)throw new O;this.field=e;let r=t.length;if(r>1&&0===t[0]){let e=1;for(;er.length){let e=t;t=r,r=e}let n=new Int32Array(r.length),i=r.length-t.length;P.arraycopy(r,0,n,0,i);for(let e=i;e=0;t--){let r=this.getCoefficient(t);0!==r&&(r<0?(e.append(" - "),r=-r):e.length()>0&&e.append(" + "),(0===t||1!==r)&&e.append(r),0!==t&&(1===t?e.append("x"):(e.append("x^"),e.append(t))))}return e.toString()}}class tX{add(e,t){return(e+t)%this.modulus}subtract(e,t){return(this.modulus+e-t)%this.modulus}exp(e){return this.expTable[e]}log(e){if(0===e)throw new O;return this.logTable[e]}inverse(e){if(0===e)throw new el;return this.expTable[this.modulus-this.logTable[e]-1]}multiply(e,t){return 0===e||0===t?0:this.expTable[(this.logTable[e]+this.logTable[t])%(this.modulus-1)]}getSize(){return this.modulus}equals(e){return e===this}}class tW extends tX{constructor(e,t){super(),this.modulus=e,this.expTable=new Int32Array(e),this.logTable=new Int32Array(e);let r=1;for(let n=0;n0;e--){let r=n.evaluateAt(this.field.exp(e));i[t-e]=r,0!==r&&(s=!0)}if(!s)return 0;let o=this.field.getOne();if(null!=r)for(let t of r){let r=this.field.exp(e.length-1-t),n=new tG(this.field,new Int32Array([this.field.subtract(0,r),1]));o=o.multiply(n)}let a=new tG(this.field,i),l=this.runEuclideanAlgorithm(this.field.buildMonomial(t,1),a,t),h=l[0],u=l[1],d=this.findErrorLocations(h),c=this.findErrorMagnitudes(u,h,d);for(let t=0;t=Math.round(r/2);){let e=n,t=s;if(n=i,s=o,n.isZero())throw B.getChecksumInstance();i=e;let r=this.field.getZero(),a=n.getCoefficient(n.getDegree()),l=this.field.inverse(a);for(;i.getDegree()>=n.getDegree()&&!i.isZero();){let e=i.getDegree()-n.getDegree(),t=this.field.multiply(i.getCoefficient(i.getDegree()),l);r=r.add(this.field.buildMonomial(e,t)),i=i.subtract(n.multiplyByMonomial(e,t))}o=r.multiply(s).subtract(t).negative()}let a=o.getCoefficient(0);if(0===a)throw B.getChecksumInstance();let l=this.field.inverse(a);return[o.multiply(l),i.multiply(l)]}findErrorLocations(e){let t=e.getDegree(),r=new Int32Array(t),n=0;for(let i=1;i0){let t=r?this.topLeft:this.topRight,i=Math.trunc(t.getY()-e);i<0&&(i=0);let o=new eA(t.getX(),i);r?n=o:s=o}if(t>0){let e=r?this.bottomLeft:this.bottomRight,n=Math.trunc(e.getY()+t);n>=this.image.getHeight()&&(n=this.image.getHeight()-1);let s=new eA(e.getX(),n);r?i=s:o=s}return new tY(this.image,n,i,s,o)}getMinX(){return this.minX}getMaxX(){return this.maxX}getMinY(){return this.minY}getMaxY(){return this.maxY}getTopLeft(){return this.topLeft}getTopRight(){return this.topRight}getBottomLeft(){return this.bottomLeft}getBottomRight(){return this.bottomRight}}class tZ{constructor(e,t,r,n){this.columnCount=e,this.errorCorrectionLevel=n,this.rowCountUpperPart=t,this.rowCountLowerPart=r,this.rowCount=t+r}getColumnCount(){return this.columnCount}getErrorCorrectionLevel(){return this.errorCorrectionLevel}getRowCount(){return this.rowCount}getRowCountUpperPart(){return this.rowCountUpperPart}getRowCountLowerPart(){return this.rowCountLowerPart}}class tK{constructor(){this.buffer=""}static form(e,t){let r=-1;return e.replace(/%(-)?(0?[0-9]+)?([.][0-9]+)?([#][0-9]+)?([scfpexd%])/g,function(e,n,i,s,o,a){let l;if("%%"===e)return"%";if(void 0===t[++r])return;e=s?parseInt(s.substr(1)):void 0;let h=o?parseInt(o.substr(1)):void 0;switch(a){case"s":l=t[r];break;case"c":l=t[r][0];break;case"f":l=parseFloat(t[r]).toFixed(e);break;case"p":l=parseFloat(t[r]).toPrecision(e);break;case"e":l=parseFloat(t[r]).toExponential(e);break;case"x":l=parseInt(t[r]).toString(h||16);break;case"d":l=parseFloat(parseInt(t[r],h||10).toPrecision(e)).toFixed(0)}l="object"==typeof l?JSON.stringify(l):(+l).toString(h);let u=parseInt(i),d=i&&i[0]+""=="0"?"0":" ";for(;l.length=0&&null!=(t=this.codewords[n])||(n=this.imageRowToCodewordIndex(e)+r)r,getValue:()=>n};i.getValue()>e?(e=i.getValue(),(t=[]).push(i.getKey())):i.getValue()===e&&t.push(i.getKey())}return tV.toIntArray(t)}getConfidence(e){return this.values.get(e)}}class tj extends tq{constructor(e,t){super(e),this._isLeft=t}setRowNumbers(){for(let e of this.getCodewords())null!=e&&e.setRowNumberAsRowIndicatorColumn()}adjustCompleteIndicatorColumnRowNumbers(e){let t=this.getCodewords();this.setRowNumbers(),this.removeIncorrectCodewords(t,e);let r=this.getBoundingBox(),n=this._isLeft?r.getTopLeft():r.getTopRight(),i=this._isLeft?r.getBottomLeft():r.getBottomRight(),s=this.imageRowToCodewordIndex(Math.trunc(n.getY())),o=this.imageRowToCodewordIndex(Math.trunc(i.getY())),a=-1,l=1,h=0;for(let r=s;r=e.getRowCount()||i>r)t[r]=null;else{let e;let s=(e=l>2?(l-2)*i:i)>=r;for(let n=1;n<=e&&!s;n++)s=null!=t[r-n];s?t[r]=null:(a=n.getRowNumber(),h=1)}}}getRowHeights(){let e=this.getBarcodeMetadata();if(null==e)return null;this.adjustIncompleteIndicatorColumnRowNumbers(e);let t=new Int32Array(e.getRowCount());for(let e of this.getCodewords())if(null!=e){let r=e.getRowNumber();if(r>=t.length)continue;t[r]++}return t}adjustIncompleteIndicatorColumnRowNumbers(e){let t=this.getBoundingBox(),r=this._isLeft?t.getTopLeft():t.getTopRight(),n=this._isLeft?t.getBottomLeft():t.getBottomRight(),i=this.imageRowToCodewordIndex(Math.trunc(r.getY())),s=this.imageRowToCodewordIndex(Math.trunc(n.getY())),o=this.getCodewords(),a=-1;for(let t=i;t=e.getRowCount()?o[t]=null:a=r.getRowNumber())}}getBarcodeMetadata(){let e=this.getCodewords(),t=new tQ,r=new tQ,n=new tQ,i=new tQ;for(let s of e){if(null==s)continue;s.setRowNumberAsRowIndicatorColumn();let e=s.getValue()%30,o=s.getRowNumber();switch(this._isLeft||(o+=2),o%3){case 0:r.setValue(3*e+1);break;case 1:i.setValue(e/3),n.setValue(e%3);break;case 2:t.setValue(e+1)}}if(0===t.getValue().length||0===r.getValue().length||0===n.getValue().length||0===i.getValue().length||t.getValue()[0]<1||r.getValue()[0]+n.getValue()[0]tV.MAX_ROWS_IN_BARCODE)return null;let s=new tZ(t.getValue()[0],r.getValue()[0],n.getValue()[0],i.getValue()[0]);return this.removeIncorrectCodewords(e,s),s}removeIncorrectCodewords(e,t){for(let r=0;rt.getRowCount()){e[r]=null;continue}switch(this._isLeft||(s+=2),s%3){case 0:3*i+1!==t.getRowCountUpperPart()&&(e[r]=null);break;case 1:(Math.trunc(i/3)!==t.getErrorCorrectionLevel()||i%3!==t.getRowCountLowerPart())&&(e[r]=null);break;case 2:i+1!==t.getColumnCount()&&(e[r]=null)}}}isLeft(){return this._isLeft}toString(){return"IsLeft: "+this._isLeft+"\n"+super.toString()}}class tJ{constructor(e,t){this.ADJUST_ROW_NUMBER_SKIP=2,this.barcodeMetadata=e,this.barcodeColumnCount=e.getColumnCount(),this.boundingBox=t,this.detectionResultColumns=Array(this.barcodeColumnCount+2)}getDetectionResultColumns(){let e;this.adjustIndicatorColumnRowNumbers(this.detectionResultColumns[0]),this.adjustIndicatorColumnRowNumbers(this.detectionResultColumns[this.barcodeColumnCount+1]);let t=tV.MAX_CODEWORDS_IN_BARCODE;do e=t,t=this.adjustRowNumbersAndGetCount();while(t>0&&t0&&i0&&(o[0]=r[t-1],o[4]=i[t-1],o[5]=s[t-1]),t>1&&(o[8]=r[t-2],o[10]=i[t-2],o[11]=s[t-2]),t>=1;r=1&t,t1.RATIOS_TABLE[e]||(t1.RATIOS_TABLE[e]=Array(tV.BARS_IN_MODULE)),t1.RATIOS_TABLE[e][tV.BARS_IN_MODULE-n-1]=Math.fround(i/tV.MODULES_IN_CODEWORD)}}this.bSymbolTableReady=!0}static getDecodedValue(e){let t=t1.getDecodedCodewordValue(t1.sampleBitCounts(e));return -1!==t?t:t1.getClosestDecodedValue(e)}static sampleBitCounts(e){let t=ef.sum(e),r=new Int32Array(tV.BARS_IN_MODULE),n=0,i=0;for(let s=0;s1)for(let n=0;n=n)break}tArray(tV.BARS_IN_MODULE));class t2{constructor(){this.segmentCount=-1,this.fileSize=-1,this.timestamp=-1,this.checksum=-1}getSegmentIndex(){return this.segmentIndex}setSegmentIndex(e){this.segmentIndex=e}getFileId(){return this.fileId}setFileId(e){this.fileId=e}getOptionalData(){return this.optionalData}setOptionalData(e){this.optionalData=e}isLastSegment(){return this.lastSegment}setLastSegment(e){this.lastSegment=e}getSegmentCount(){return this.segmentCount}setSegmentCount(e){this.segmentCount=e}getSender(){return this.sender||null}setSender(e){this.sender=e}getAddressee(){return this.addressee||null}setAddressee(e){this.addressee=e}getFileName(){return this.fileName}setFileName(e){this.fileName=e}getFileSize(){return this.fileSize}setFileSize(e){this.fileSize=e}getChecksum(){return this.checksum}setChecksum(e){this.checksum=e}getTimestamp(){return this.timestamp}setTimestamp(e){this.timestamp=e}}class t0{static parseLong(e,t){return parseInt(e,t)}}class t8 extends D{}t8.kind="NullPointerException";class t3{writeBytes(e){this.writeBytesOffset(e,0,e.length)}writeBytesOffset(e,t,r){if(null==e)throw new t8;if(t<0||t>e.length||r<0||t+r>e.length||t+r<0)throw new L;if(0!==r)for(let n=0;n0&&this.grow(e)}grow(e){let t=this.buf.length<<1;if(t-e<0&&(t=e),t<0){if(e<0)throw new t6;t=k.MAX_VALUE}this.buf=v.copyOfUint8Array(this.buf,t)}write(e){this.ensureCapacity(this.count+1),this.buf[this.count]=e,this.count+=1}writeBytesOffset(e,t,r){if(t<0||t>e.length||r<0||t+r-e.length>0)throw new L;this.ensureCapacity(this.count+r),P.arraycopy(e,t,this.buf,this.count,r),this.count+=r}writeTo(e){e.writeBytesOffset(this.buf,0,this.count)}reset(){this.count=0}toByteArray(){return v.copyOfUint8Array(this.buf,this.count)}size(){return this.count}toString(e){return e?"string"==typeof e?this.toString_string(e):this.toString_number(e):this.toString_void()}toString_void(){return new String(this.buf).toString()}toString_string(e){return new String(this.buf).toString()}toString_number(e){return new String(this.buf).toString()}close(){}}function t7(){if("undefined"!=typeof window)return window.BigInt||null;if(void 0!==r.g)return r.g.BigInt||null;if("undefined"!=typeof self)return self.BigInt||null;throw Error("Can't search globals for BigInt!")}function t5(e){if(void 0===t&&(t=t7()),null===t)throw Error("BigInt is not supported!");return t(e)}(c=p||(p={}))[c.ALPHA=0]="ALPHA",c[c.LOWER=1]="LOWER",c[c.MIXED=2]="MIXED",c[c.PUNCT=3]="PUNCT",c[c.ALPHA_SHIFT=4]="ALPHA_SHIFT",c[c.PUNCT_SHIFT=5]="PUNCT_SHIFT";class t9{static decode(e,t){let r=new z(""),n=H.ISO8859_1;r.enableDecoding(n);let i=1,s=e[i++],o=new t2;for(;ie[0])throw U.getFormatInstance();let n=new Int32Array(t9.NUMBER_OF_SEQUENCE_CODEWORDS);for(let r=0;r0){for(let e=0;e<6;++e)s.write(Number(t5(a)>>t5(8*(5-e))));a=0,o=0}}n===t[0]&&u0){for(let e=0;e<6;++e)s.write(Number(t5(a)>>t5(8*(5-e))));a=0,o=0}}}return i.append(X.decode(s.toByteArray(),r)),n}static numericCompaction(e,t,r){let n=0,i=!1,s=new Int32Array(t9.MAX_NUMERIC_CODEWORDS);for(;t0&&(r.append(t9.decodeBase900toBase10(s,n)),n=0)}return t}static decodeBase900toBase10(e,t){let r=t5(0);for(let n=0;n@[\\]_`~!\r ,:\n-.$/\"|*()?{}'",t9.MIXED_CHARS="0123456789&\r ,:#-.$/+%*=^",t9.EXP900=t7()?function(){let e=[];e[0]=t5(1);let t=t5(900);e[1]=t;for(let r=2;r<16;r++)e[r]=e[r-1]*t;return e}():[],t9.NUMBER_OF_SEQUENCE_CODEWORDS=2;class re{constructor(){}static decode(e,t,r,n,i,s,o){let a,l=new tY(e,t,r,n,i),h=null,u=null;for(let r=!0;;r=!1){if(null!=t&&(h=re.getRowIndicatorColumn(e,l,t,!0,s,o)),null!=n&&(u=re.getRowIndicatorColumn(e,l,n,!1,s,o)),null==(a=re.merge(h,u)))throw Z.getNotFoundInstance();let i=a.getBoundingBox();if(r&&null!=i&&(i.getMinY()l.getMaxY()))l=i;else break}a.setBoundingBox(l);let d=a.getBarcodeColumnCount()+1;a.setDetectionResultColumn(0,h),a.setDetectionResultColumn(d,u);let c=null!=h;for(let t=1;t<=d;t++){let r,n=c?t:d-t;if(void 0!==a.getDetectionResultColumn(n))continue;r=0===n||n===d?new tj(l,0===n):new tq(l),a.setDetectionResultColumn(n,r);let i=-1,h=-1;for(let t=l.getMinY();t<=l.getMaxY();t++){if((i=re.getStartColumn(a,n,t,c))<0||i>l.getMaxX()){if(-1===h)continue;i=h}let u=re.detectCodeword(e,l.getMinX(),l.getMaxX(),c,i,t,s,o);null!=u&&(r.setCodeword(t,u),h=i,s=Math.min(s,u.getWidth()),o=Math.max(o,u.getWidth()))}}return re.createDecoderResult(a)}static merge(e,t){if(null==e&&null==t)return null;let r=re.getBarcodeMetadata(e,t);return null==r?null:new tJ(r,tY.merge(re.adjustBoundingBox(e),re.adjustBoundingBox(t)))}static adjustBoundingBox(e){if(null==e)return null;let t=e.getRowHeights();if(null==t)return null;let r=re.getMax(t),n=0;for(let e of t)if(n+=r-e,e>0)break;let i=e.getCodewords();for(let e=0;n>0&&null==i[e];e++)n--;let s=0;for(let e=t.length-1;e>=0&&(s+=r-t[e],!(t[e]>0));e--);for(let e=i.length-1;s>0&&null==i[e];e--)s--;return e.getBoundingBox().addMissingRows(n,s,e.isLeft())}static getMax(e){let t=-1;for(let r of e)t=Math.max(t,r);return t}static getBarcodeMetadata(e,t){let r,n;return null==e||null==(r=e.getBarcodeMetadata())?null==t?null:t.getBarcodeMetadata():null==t||null==(n=t.getBarcodeMetadata())?r:r.getColumnCount()!==n.getColumnCount()&&r.getErrorCorrectionLevel()!==n.getErrorCorrectionLevel()&&r.getRowCount()!==n.getRowCount()?null:r}static getRowIndicatorColumn(e,t,r,n,i,s){let o=new tj(t,n);for(let a=0;a<2;a++){let l=0===a?1:-1,h=Math.trunc(Math.trunc(r.getX()));for(let a=Math.trunc(Math.trunc(r.getY()));a<=t.getMaxY()&&a>=t.getMinY();a+=l){let t=re.detectCodeword(e,0,e.getWidth(),n,h,a,i,s);null!=t&&(o.setCodeword(a,t),h=n?t.getStartX():t.getEndX())}}return o}static adjustCodewordCount(e,t){let r=t[0][1],n=r.getValue(),i=e.getBarcodeColumnCount()*e.getBarcodeRowCount()-re.getNumberOfECCodeWords(e.getBarcodeECLevel());if(0===n.length){if(i<1||i>tV.MAX_CODEWORDS_IN_BARCODE)throw Z.getNotFoundInstance();r.setValue(i)}else n[0]!==i&&r.setValue(i)}static createDecoderResult(e){let t=re.createBarcodeMatrix(e);re.adjustCodewordCount(e,t);let r=[],n=new Int32Array(e.getBarcodeRowCount()*e.getBarcodeColumnCount()),i=[],s=[];for(let o=0;o0;){for(let e=0;eArray(e.getBarcodeColumnCount()+2));for(let e=0;e=0){if(n>=t.length)continue;t[n][r].setValue(e.getValue())}}}r++}return t}static isValidBarcodeColumn(e,t){return t>=0&&t<=e.getBarcodeColumnCount()+1}static getStartColumn(e,t,r,n){let i=n?1:-1,s=null;if(re.isValidBarcodeColumn(e,t-i)&&(s=e.getDetectionResultColumn(t-i).getCodeword(r)),null!=s)return n?s.getEndX():s.getStartX();if(null!=(s=e.getDetectionResultColumn(t).getCodewordNearby(r)))return n?s.getStartX():s.getEndX();if(re.isValidBarcodeColumn(e,t-i)&&(s=e.getDetectionResultColumn(t-i).getCodewordNearby(r)),null!=s)return n?s.getEndX():s.getStartX();let o=0;for(;re.isValidBarcodeColumn(e,t-i);){for(let r of(t-=i,e.getDetectionResultColumn(t).getCodewords()))if(null!=r)return(n?r.getEndX():r.getStartX())+i*o*(r.getEndX()-r.getStartX());o++}return n?e.getBoundingBox().getMinX():e.getBoundingBox().getMaxX()}static detectCodeword(e,t,r,n,i,s,o,a){let l;i=re.adjustCodewordStartColumn(e,t,r,n,i,s);let h=re.getModuleBitCount(e,t,r,n,i,s);if(null==h)return null;let u=ef.sum(h);if(n)l=i+u;else{for(let e=0;e=t)&&l=t:ore.CODEWORD_SKEW_SIZE)return i;o+=a}a=-a,n=!n}return o}static checkCodewordSkew(e,t,r){return t-re.CODEWORD_SKEW_SIZE<=e&&e<=r+re.CODEWORD_SKEW_SIZE}static decodeCodewords(e,t,r){if(0===e.length)throw U.getFormatInstance();let n=1<r/2+re.MAX_ERRORS||r<0||r>re.MAX_EC_CODEWORDS)throw B.getChecksumInstance();return re.errorCorrection.decode(e,r,t)}static verifyCodewordCount(e,t){if(e.length<4)throw U.getFormatInstance();let r=e[0];if(r>e.length)throw U.getFormatInstance();if(0===r){if(t>=1;return t}static getCodewordBucketNumber(e){return e instanceof Int32Array?this.getCodewordBucketNumber_Int32Array(e):this.getCodewordBucketNumber_number(e)}static getCodewordBucketNumber_number(e){return re.getCodewordBucketNumber(re.getBitCountForCodeword(e))}static getCodewordBucketNumber_Int32Array(e){return(e[0]-e[2]+e[4]-e[6]+9)%9}static toString(e){let t=new tK;for(let r=0;re)}static getMaxWidth(e,t){return null==e||null==t?0:Math.trunc(Math.abs(e.getX()-t.getX()))}static getMinWidth(e,t){return null==e||null==t?k.MAX_VALUE:Math.trunc(Math.abs(e.getX()-t.getX()))}static getMaxCodewordWidth(e){return Math.floor(Math.max(Math.max(rt.getMaxWidth(e[0],e[4]),rt.getMaxWidth(e[6],e[2])*tV.MODULES_IN_CODEWORD/tV.MODULES_IN_STOP_PATTERN),Math.max(rt.getMaxWidth(e[1],e[5]),rt.getMaxWidth(e[7],e[3])*tV.MODULES_IN_CODEWORD/tV.MODULES_IN_STOP_PATTERN)))}static getMinCodewordWidth(e){return Math.floor(Math.min(Math.min(rt.getMinWidth(e[0],e[4]),rt.getMinWidth(e[6],e[2])*tV.MODULES_IN_CODEWORD/tV.MODULES_IN_STOP_PATTERN),Math.min(rt.getMinWidth(e[1],e[5]),rt.getMinWidth(e[7],e[3])*tV.MODULES_IN_CODEWORD/tV.MODULES_IN_STOP_PATTERN)))}reset(){}}class rr extends D{}rr.kind="ReaderException";class rn{constructor(e,t){this.verbose=!0===e,t&&this.setHints(t)}decode(e,t){return t&&this.setHints(t),this.decodeInternal(e)}decodeWithState(e){return(null===this.readers||void 0===this.readers)&&this.setHints(null),this.decodeInternal(e)}setHints(e){this.hints=e;let t=null!=e&&!0===e.get(V.TRY_HARDER),r=null==e?null:e.get(V.POSSIBLE_FORMATS),n=[];if(null!=r){let i=r.some(e=>e===en.UPC_A||e===en.UPC_E||e===en.EAN_13||e===en.EAN_8||e===en.CODABAR||e===en.CODE_39||e===en.CODE_93||e===en.CODE_128||e===en.ITF||e===en.RSS_14||e===en.RSS_EXPANDED);i&&!t&&n.push(new ta(e,this.verbose)),r.includes(en.QR_CODE)&&n.push(new tx),r.includes(en.DATA_MATRIX)&&n.push(new tE),r.includes(en.AZTEC)&&n.push(new eN),r.includes(en.PDF_417)&&n.push(new rt),i&&t&&n.push(new ta(e,this.verbose))}0===n.length&&(t||n.push(new ta(e,this.verbose)),n.push(new tx),n.push(new tE),n.push(new eN),n.push(new rt),t&&n.push(new ta(e,this.verbose))),this.readers=n}reset(){if(null!==this.readers)for(let e of this.readers)e.reset()}decodeInternal(e){if(null===this.readers)throw new rr("No readers where selected, nothing can be read.");for(let t of this.readers)try{return t.decode(e,this.hints)}catch(e){if(e instanceof rr)continue}throw new Z("No MultiFormat Readers were able to detect the code.")}}class ri extends et{constructor(e=null,t=500){let r=new rn;r.setHints(e),super(r,t)}decodeBitmap(e){return this.reader.decodeWithState(e)}}class rs extends et{constructor(e=500){super(new rt,e)}}class ro extends et{constructor(e=500){super(new tx,e)}}(g=T||(T={}))[g.ERROR_CORRECTION=0]="ERROR_CORRECTION",g[g.CHARACTER_SET=1]="CHARACTER_SET",g[g.DATA_MATRIX_SHAPE=2]="DATA_MATRIX_SHAPE",g[g.MIN_SIZE=3]="MIN_SIZE",g[g.MAX_SIZE=4]="MAX_SIZE",g[g.MARGIN=5]="MARGIN",g[g.PDF417_COMPACT=6]="PDF417_COMPACT",g[g.PDF417_COMPACTION=7]="PDF417_COMPACTION",g[g.PDF417_DIMENSIONS=8]="PDF417_DIMENSIONS",g[g.AZTEC_LAYERS=9]="AZTEC_LAYERS",g[g.QR_VERSION=10]="QR_VERSION";var ra=T;class rl{constructor(e){this.field=e,this.cachedGenerators=[],this.cachedGenerators.push(new ea(e,Int32Array.from([1])))}buildGenerator(e){let t=this.cachedGenerators;if(e>=t.length){let r=t[t.length-1],n=this.field;for(let i=t.length;i<=e;i++){let e=r.multiply(new ea(n,Int32Array.from([1,n.exp(i-1+n.getGeneratorBase())])));t.push(e),r=e}}return t[e]}encode(e,t){if(0===t)throw new O("No error correction bytes");let r=e.length-t;if(r<=0)throw new O("No data bytes provided");let n=this.buildGenerator(t),i=new Int32Array(r);P.arraycopy(e,0,i,0,r);let s=new ea(this.field,i),o=(s=s.multiplyByMonomial(t,1)).divide(n)[1].getCoefficients(),a=t-o.length;for(let t=0;t=5&&(r+=rh.N1+(n-5)),n=1,o=i)}n>=5&&(r+=rh.N1+(n-5))}return r}}rh.N1=3,rh.N2=3,rh.N3=40,rh.N4=10;class ru{constructor(e,t){this.width=e,this.height=t;let r=Array(t);for(let n=0;n!==t;n++)r[n]=new Uint8Array(e);this.bytes=r}getHeight(){return this.height}getWidth(){return this.width}get(e,t){return this.bytes[t][e]}getArray(){return this.bytes}setNumber(e,t,r){this.bytes[t][e]=r}setBoolean(e,t,r){this.bytes[t][e]=r?1:0}clear(e){for(let t of this.bytes)v.fill(t,e)}equals(e){if(!(e instanceof ru)||this.width!==e.width||this.height!==e.height)return!1;for(let t=0,r=this.height;t>\n"),e.toString()}setMode(e){this.mode=e}setECLevel(e){this.ecLevel=e}setVersion(e){this.version=e}setMaskPattern(e){this.maskPattern=e}setMatrix(e){this.matrix=e}static isValidMaskPattern(e){return e>=0&&ee.getVersionNumber())return;let r=new x;rg.makeVersionInfoBits(e,r);let n=17;for(let e=0;e<6;++e)for(let i=0;i<3;++i){let s=r.get(n);n--,t.setBoolean(e,t.getHeight()-11+i,s),t.setBoolean(t.getHeight()-11+i,e,s)}}static embedDataBits(e,t,r){let n=0,i=-1,s=r.getWidth()-1,o=r.getHeight()-1;for(;s>0;){for(6===s&&(s-=1);o>=0&&o=r;)e^=t<e.getVersionNumber())return;let r=e.getVersionNumber()-1,n=rg.POSITION_ADJUSTMENT_PATTERN_COORDINATE_TABLE[r];for(let e=0,r=n.length;e!==r;e++){let i=n[e];if(i>=0)for(let e=0;e!==r;e++){let r=n[e];r>=0&&rg.isEmpty(t.get(r,i))&&rg.embedPositionAdjustmentPattern(r-2,i-2,t)}}}}rg.POSITION_DETECTION_PATTERN=Array.from([Int32Array.from([1,1,1,1,1,1,1]),Int32Array.from([1,0,0,0,0,0,1]),Int32Array.from([1,0,1,1,1,0,1]),Int32Array.from([1,0,1,1,1,0,1]),Int32Array.from([1,0,1,1,1,0,1]),Int32Array.from([1,0,0,0,0,0,1]),Int32Array.from([1,1,1,1,1,1,1])]),rg.POSITION_ADJUSTMENT_PATTERN=Array.from([Int32Array.from([1,1,1,1,1]),Int32Array.from([1,0,0,0,1]),Int32Array.from([1,0,1,0,1]),Int32Array.from([1,0,0,0,1]),Int32Array.from([1,1,1,1,1])]),rg.POSITION_ADJUSTMENT_PATTERN_COORDINATE_TABLE=Array.from([Int32Array.from([-1,-1,-1,-1,-1,-1,-1]),Int32Array.from([6,18,-1,-1,-1,-1,-1]),Int32Array.from([6,22,-1,-1,-1,-1,-1]),Int32Array.from([6,26,-1,-1,-1,-1,-1]),Int32Array.from([6,30,-1,-1,-1,-1,-1]),Int32Array.from([6,34,-1,-1,-1,-1,-1]),Int32Array.from([6,22,38,-1,-1,-1,-1]),Int32Array.from([6,24,42,-1,-1,-1,-1]),Int32Array.from([6,26,46,-1,-1,-1,-1]),Int32Array.from([6,28,50,-1,-1,-1,-1]),Int32Array.from([6,30,54,-1,-1,-1,-1]),Int32Array.from([6,32,58,-1,-1,-1,-1]),Int32Array.from([6,34,62,-1,-1,-1,-1]),Int32Array.from([6,26,46,66,-1,-1,-1]),Int32Array.from([6,26,48,70,-1,-1,-1]),Int32Array.from([6,26,50,74,-1,-1,-1]),Int32Array.from([6,30,54,78,-1,-1,-1]),Int32Array.from([6,30,56,82,-1,-1,-1]),Int32Array.from([6,30,58,86,-1,-1,-1]),Int32Array.from([6,34,62,90,-1,-1,-1]),Int32Array.from([6,28,50,72,94,-1,-1]),Int32Array.from([6,26,50,74,98,-1,-1]),Int32Array.from([6,30,54,78,102,-1,-1]),Int32Array.from([6,28,54,80,106,-1,-1]),Int32Array.from([6,32,58,84,110,-1,-1]),Int32Array.from([6,30,58,86,114,-1,-1]),Int32Array.from([6,34,62,90,118,-1,-1]),Int32Array.from([6,26,50,74,98,122,-1]),Int32Array.from([6,30,54,78,102,126,-1]),Int32Array.from([6,26,52,78,104,130,-1]),Int32Array.from([6,30,56,82,108,134,-1]),Int32Array.from([6,34,60,86,112,138,-1]),Int32Array.from([6,30,58,86,114,142,-1]),Int32Array.from([6,34,62,90,118,146,-1]),Int32Array.from([6,30,54,78,102,126,150]),Int32Array.from([6,24,50,76,102,128,154]),Int32Array.from([6,28,54,80,106,132,158]),Int32Array.from([6,32,58,84,110,136,162]),Int32Array.from([6,26,54,82,110,138,166]),Int32Array.from([6,30,58,86,114,142,170])]),rg.TYPE_INFO_COORDINATES=Array.from([Int32Array.from([8,0]),Int32Array.from([8,1]),Int32Array.from([8,2]),Int32Array.from([8,3]),Int32Array.from([8,4]),Int32Array.from([8,5]),Int32Array.from([8,7]),Int32Array.from([8,8]),Int32Array.from([7,8]),Int32Array.from([5,8]),Int32Array.from([4,8]),Int32Array.from([3,8]),Int32Array.from([2,8]),Int32Array.from([1,8]),Int32Array.from([0,8])]),rg.VERSION_INFO_POLY=7973,rg.TYPE_INFO_POLY=1335,rg.TYPE_INFO_MASK_PATTERN=21522;class rf{constructor(e,t){this.dataBytes=e,this.errorCorrectionBytes=t}getDataBytes(){return this.dataBytes}getErrorCorrectionBytes(){return this.errorCorrectionBytes}}class rw{constructor(){}static calculateMaskPenalty(e){return rh.applyMaskPenaltyRule1(e)+rh.applyMaskPenaltyRule2(e)+rh.applyMaskPenaltyRule3(e)+rh.applyMaskPenaltyRule4(e)}static encode(e,t,r=null){let n,i=rw.DEFAULT_BYTE_MODE_ENCODING,s=null!==r&&void 0!==r.get(ra.CHARACTER_SET);s&&(i=r.get(ra.CHARACTER_SET).toString());let o=this.chooseMode(e,i),a=new x;if(o===ty.BYTE&&(s||rw.DEFAULT_BYTE_MODE_ENCODING!==i)){let e=H.getCharacterSetECIByName(i);void 0!==e&&this.appendECI(e,a)}this.appendModeInfo(o,a);let l=new x;if(this.appendBytes(e,o,l,i),null!==r&&void 0!==r.get(ra.QR_VERSION)){let e=Number.parseInt(r.get(ra.QR_VERSION).toString(),10);n=tT.getVersionForNumber(e);let i=this.calculateBitsNeeded(o,a,l,n);if(!this.willFit(i,n,t))throw new rc("Data too big for requested version")}else n=this.recommendVersion(t,o,a,l);let h=new x;h.appendBitArray(a);let u=o===ty.BYTE?l.getSizeInBytes():e.length;this.appendLengthInfo(u,n,o,h),h.appendBitArray(l);let d=n.getECBlocksForLevel(t),c=n.getTotalCodewords()-d.getTotalECCodewords();this.terminateBits(c,h);let g=this.interleaveWithECBytes(h,n.getTotalCodewords(),c,d.getNumBlocks()),f=new rd;f.setECLevel(t),f.setMode(o),f.setVersion(n);let w=n.getDimensionForVersion(),A=new ru(w,w),C=this.chooseMaskPattern(g,t,n,A);return f.setMaskPattern(C),rg.buildMatrix(g,t,n,C,A),f.setMatrix(A),f}static recommendVersion(e,t,r,n){let i=this.calculateBitsNeeded(t,r,n,tT.getVersionForNumber(1)),s=this.chooseVersion(i,e),o=this.calculateBitsNeeded(t,r,n,s);return this.chooseVersion(o,e)}static calculateBitsNeeded(e,t,r,n){return t.getSize()+e.getCharacterCountBits(n)+r.getSize()}static getAlphanumericCode(e){return e159)&&(r<224||r>235))return!1}return!0}static chooseMaskPattern(e,t,r,n){let i=Number.MAX_SAFE_INTEGER,s=-1;for(let o=0;o=(e+7)/8}static terminateBits(e,t){let r=8*e;if(t.getSize()>r)throw new rc("data bits cannot fit in the QR Code"+t.getSize()+" > "+r);for(let e=0;e<4&&t.getSize()0)for(let e=n;e<8;e++)t.appendBit(!1);let i=e-t.getSizeInBytes();for(let e=0;e=r)throw new rc("Block ID too large");let o=e%r,a=r-o,l=Math.floor(e/r),h=Math.floor(t/r),u=h+1,d=l-h,c=l+1-u;if(d!==c)throw new rc("EC bytes mismatch");if(r!==a+o)throw new rc("RS blocks mismatch");if(e!==(h+d)*a+(u+c)*o)throw new rc("Total bytes mismatch");n=1<=0&&t<=9}static appendNumericBytes(e,t){let r=e.length,n=0;for(;n=33088&&n<=40956?i=n-33088:n>=57408&&n<=60351&&(i=n-49472),-1===i)throw new rc("Invalid byte sequence");let s=(i>>8)*192+(255&i);t.appendBits(s,13)}}static appendECI(e,t){t.appendBits(ty.ECI.getBits(),4),t.appendBits(e.getValue(),8)}}rw.ALPHANUMERIC_TABLE=Int32Array.from([-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,36,-1,-1,-1,37,38,-1,-1,-1,-1,39,40,-1,41,42,43,0,1,2,3,4,5,6,7,8,9,44,-1,-1,-1,-1,-1,-1,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,-1,-1,-1,-1,-1]),rw.DEFAULT_BYTE_MODE_ENCODING=H.UTF8.getName();class rA{write(e,t,r,n=null){if(0===e.length)throw new O("Found empty contents");if(t<0||r<0)throw new O("Requested dimensions are too small: "+t+"x"+r);let i=t_.L,s=rA.QUIET_ZONE_SIZE;null!==n&&(void 0!==n.get(ra.ERROR_CORRECTION)&&(i=t_.fromString(n.get(ra.ERROR_CORRECTION).toString())),void 0!==n.get(ra.MARGIN)&&(s=Number.parseInt(n.get(ra.MARGIN).toString(),10)));let o=rw.encode(e,i,n);return this.renderResult(o,t,r,s)}writeToDom(e,t,r,n,i=null){"string"==typeof e&&(e=document.querySelector(e));let s=this.write(t,r,n,i);e&&e.appendChild(s)}renderResult(e,t,r,n){let i=e.getMatrix();if(null===i)throw new ed;let s=i.getWidth(),o=i.getHeight(),a=s+2*n,l=o+2*n,h=Math.max(t,a),u=Math.max(r,l),d=Math.min(Math.floor(h/a),Math.floor(u/l)),c=Math.floor((h-s*d)/2),g=Math.floor((u-o*d)/2),f=this.createSVGElement(h,u);for(let e=0,t=g;et||i+o>r)throw new O("Crop rectangle does not fit within image data.");a&&this.reverseHorizontal(s,o)}getRow(e,t){if(e<0||e>=this.getHeight())throw new O("Requested row is outside the image: "+e);let r=this.getWidth();(null==t||t.length>16&255,s=r>>7&510,o=255&r;i[t]=(n+s+o)/4&255}this.luminances=i}else this.luminances=e;if(void 0===n&&(this.dataWidth=t),void 0===i&&(this.dataHeight=r),void 0===s&&(this.left=0),void 0===o&&(this.top=0),this.left+t>this.dataWidth||this.top+r>this.dataHeight)throw new O("Crop rectangle does not fit within image data.")}getRow(e,t){if(e<0||e>=this.getHeight())throw new O("Requested row is outside the image: "+e);let r=this.getWidth();(null==t||t.length"}}class rD extends rN{constructor(e,t,r){super(e,0,0),this.binaryShiftStart=t,this.binaryShiftByteCount=r}appendTo(e,t){for(let r=0;r62?e.appendBits(this.binaryShiftByteCount-31,16):0===r?e.appendBits(Math.min(this.binaryShiftByteCount,31),5):e.appendBits(this.binaryShiftByteCount-31,5)),e.appendBits(t[this.binaryShiftStart+r],8)}addBinaryShift(e,t){return new rD(this,e,t)}toString(){return"<"+this.binaryShiftStart+"::"+(this.binaryShiftStart+this.binaryShiftByteCount-1)+">"}}function ry(e,t,r){return new rN(e,t,r)}let rO=["UPPER","LOWER","DIGIT","MIXED","PUNCT"],rM=new rN(null,0,0),rB=[Int32Array.from([0,327708,327710,327709,656318]),Int32Array.from([590318,0,327710,327709,656318]),Int32Array.from([262158,590300,0,590301,932798]),Int32Array.from([327709,327708,656318,0,327710]),Int32Array.from([327711,656380,656382,656381,0])],rb=function(e){for(let t of e)v.fill(t,-1);return e[0][4]=0,e[1][4]=0,e[1][0]=28,e[3][4]=0,e[2][4]=0,e[2][0]=15,e}(v.createInt32Array(6,6));class rP{constructor(e,t,r,n){this.token=e,this.mode=t,this.binaryShiftByteCount=r,this.bitCount=n}getMode(){return this.mode}getToken(){return this.token}getBinaryShiftByteCount(){return this.binaryShiftByteCount}getBitCount(){return this.bitCount}latchAndAppend(e,t){let r=this.bitCount,n=this.token;if(e!==this.mode){let t=rB[this.mode][e];n=ry(n,65535&t,t>>16),r+=t>>16}let i=2===e?4:5;return new rP(n=ry(n,t,i),e,0,r+i)}shiftAndAppend(e,t){let r=this.token,n=2===this.mode?4:5;return r=ry(r,rb[this.mode][e],n),new rP(r=ry(r,t,5),this.mode,0,this.bitCount+n+5)}addBinaryShiftChar(e){let t=this.token,r=this.mode,n=this.bitCount;if(4===this.mode||2===this.mode){let e=rB[r][0];t=ry(t,65535&e,e>>16),n+=e>>16,r=0}let i=0===this.binaryShiftByteCount||31===this.binaryShiftByteCount?18:62===this.binaryShiftByteCount?9:8,s=new rP(t,r,this.binaryShiftByteCount+1,n+i);return 2078===s.binaryShiftByteCount&&(s=s.endBinaryShift(e+1)),s}endBinaryShift(e){if(0===this.binaryShiftByteCount)return this;let t=this.token;return new rP(t=new rD(t,e-this.binaryShiftByteCount,this.binaryShiftByteCount),this.mode,0,this.bitCount)}isBetterThanOrEqualTo(e){let t=this.bitCount+(rB[this.mode][e.mode]>>16);return this.binaryShiftByteCounte.binaryShiftByteCount&&e.binaryShiftByteCount>0&&(t+=10),t<=e.bitCount}toBitArray(e){let t=[];for(let r=this.endBinaryShift(e.length).token;null!==r;r=r.getPrevious())t.unshift(r);let r=new x;for(let n of t)n.appendTo(r,e);return r}toString(){return W.format("%s bits=%d bytes=%d",rO[this.mode],this.bitCount,this.binaryShiftByteCount)}static calculateBinaryShiftCost(e){return e.binaryShiftByteCount>62?21:e.binaryShiftByteCount>31?20:e.binaryShiftByteCount>0?10:0}}rP.INITIAL_STATE=new rP(rM,0,0,0);let rL=function(e){let t=W.getCharCode(" "),r=W.getCharCode("."),n=W.getCharCode(",");e[0][t]=1;let i=W.getCharCode("Z"),s=W.getCharCode("A");for(let t=s;t<=i;t++)e[0][t]=t-s+2;e[1][t]=1;let o=W.getCharCode("z"),a=W.getCharCode("a");for(let t=a;t<=o;t++)e[1][t]=t-a+2;e[2][t]=1;let l=W.getCharCode("9"),h=W.getCharCode("0");for(let t=h;t<=l;t++)e[2][t]=t-h+2;e[2][n]=12,e[2][r]=13;let u=["\0"," ","\x01","\x02","\x03","\x04","\x05","\x06","\x07","\b"," ","\n","\v","\f","\r","\x1b","\x1c","\x1d","\x1e","\x1f","@","\\","^","_","`","|","~","\x7f"];for(let t=0;t","?","[","]","{","}"];for(let t=0;t0&&(e[4][W.getCharCode(d[t])]=t);return e}(v.createInt32Array(5,256));class rF{constructor(e){this.text=e}encode(){let e=W.getCharCode(" "),t=W.getCharCode("\n"),r=rT.singletonList(rP.INITIAL_STATE);for(let n=0;n0?(r=rF.updateStateListForPair(r,n,i),n++):r=this.updateStateListForChar(r,n)}return rT.min(r,(e,t)=>e.getBitCount()-t.getBitCount()).toBitArray(this.text)}updateStateListForChar(e,t){let r=[];for(let n of e)this.updateStateForChar(n,t,r);return rF.simplifyStates(r)}updateStateForChar(e,t,r){let n=255&this.text[t],i=rL[e.getMode()][n]>0,s=null;for(let o=0;o<=4;o++){let a=rL[o][n];if(a>0){if(null==s&&(s=e.endBinaryShift(t)),!i||o===e.getMode()||2===o){let e=s.latchAndAppend(o,a);r.push(e)}if(!i&&rb[e.getMode()][o]>=0){let e=s.shiftAndAppend(o,a);r.push(e)}}}if(e.getBinaryShiftByteCount()>0||0===rL[e.getMode()][n]){let n=e.addBinaryShiftChar(t);r.push(n)}}static updateStateListForPair(e,t,r){let n=[];for(let i of e)this.updateStateForPair(i,t,r,n);return this.simplifyStates(n)}static updateStateForPair(e,t,r,n){let i=e.endBinaryShift(t);if(n.push(i.latchAndAppend(4,r)),4!==e.getMode()&&n.push(i.shiftAndAppend(4,r)),3===r||4===r){let e=i.latchAndAppend(2,16-r).latchAndAppend(2,1);n.push(e)}if(e.getBinaryShiftByteCount()>0){let r=e.addBinaryShiftChar(t).addBinaryShiftChar(t+1);n.push(r)}}static simplifyStates(e){let t=[];for(let r of e){let e=!0;for(let n of t){if(n.isBetterThanOrEqualTo(r)){e=!1;break}r.isBetterThanOrEqualTo(n)&&(t=t.filter(e=>e!==n))}e&&t.push(r)}return t}}class rv{constructor(){}static encodeBytes(e){return rv.encode(e,rv.DEFAULT_EC_PERCENT,rv.DEFAULT_AZTEC_LAYERS)}static encode(e,t,r){let n,i,s,o,a,l,h=new rF(e).encode(),u=k.truncDivision(h.getSize()*t,100)+11,d=h.getSize()+u;if(r!==rv.DEFAULT_AZTEC_LAYERS){if(n=r<0,(i=Math.abs(r))>(n?rv.MAX_NB_BITS_COMPACT:rv.MAX_NB_BITS))throw new O(W.format("Illegal value %s for layers",r));let e=(s=rv.totalBitsInLayer(i,n))-s%(o=rv.WORD_SIZE[i]);if((a=rv.stuffBits(h,o)).getSize()+u>e||n&&a.getSize()>64*o)throw new O("Data to large for user specified layer")}else{o=0,a=null;for(let e=0;;e++){if(e>rv.MAX_NB_BITS)throw new O("Data too large for an Aztec code");if(i=(n=e<=3)?e+1:e,d>(s=rv.totalBitsInLayer(i,n)))continue;(null==a||o!==rv.WORD_SIZE[i])&&(o=rv.WORD_SIZE[i],a=rv.stuffBits(h,o));let t=s-s%o;if(!(n&&a.getSize()>64*o)&&a.getSize()+u<=t)break}}let c=rv.generateCheckWords(a,s,o),g=a.getSize()/o,f=rv.generateModeMessage(n,i,g),w=(n?11:14)+4*i,A=new Int32Array(w);if(n){l=w;for(let e=0;e=n||e.get(s+r))&&(o|=1<{for(var i,o=a>1?void 0:a?p(e,r):e,l=t.length-1;l>=0;l--)(i=t[l])&&(o=(a?i(e,r,o):i(o))||o);return a&&o&&h(e,r,o),o};let L=class extends i.oi{constructor(){super(...arguments),this.size="1em",this.weight="regular",this.color="currentColor",this.mirrored=!1}render(){var t;return(0,a.dy)` + ${L.weightsMap.get(null!=(t=this.weight)?t:"regular")} + `}};L.weightsMap=new Map([["thin",(0,a.YP)``],["light",(0,a.YP)``],["regular",(0,a.YP)``],["bold",(0,a.YP)``],["fill",(0,a.YP)``],["duotone",(0,a.YP)``]]),L.styles=(0,s.iv)` + :host { + display: contents; + } + `,n([(0,l.C)({type:String,reflect:!0})],L.prototype,"size",2),n([(0,l.C)({type:String,reflect:!0})],L.prototype,"weight",2),n([(0,l.C)({type:String,reflect:!0})],L.prototype,"color",2),n([(0,l.C)({type:Boolean,reflect:!0})],L.prototype,"mirrored",2),L=n([(0,o.M)("ph-x")],L)}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/8145.869f872c68e4027f.js b/frontend/.next/static/chunks/8145.869f872c68e4027f.js new file mode 100644 index 0000000..f8aace5 --- /dev/null +++ b/frontend/.next/static/chunks/8145.869f872c68e4027f.js @@ -0,0 +1,14 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8145],{48145:function(t,e,r){r.r(e),r.d(e,{PhArrowClockwise:function(){return c}}),r(31498);var a=r(38157),o=r(48567),h=r(54910),i=r(69709),l=r(78313),s=Object.defineProperty,p=Object.getOwnPropertyDescriptor,n=(t,e,r,a)=>{for(var o,h=a>1?void 0:a?p(e,r):e,i=t.length-1;i>=0;i--)(o=t[i])&&(h=(a?o(e,r,h):o(h))||h);return a&&h&&s(e,r,h),h};let c=class extends o.oi{constructor(){super(...arguments),this.size="1em",this.weight="regular",this.color="currentColor",this.mirrored=!1}render(){var t;return(0,a.dy)` + ${c.weightsMap.get(null!=(t=this.weight)?t:"regular")} + `}};c.weightsMap=new Map([["thin",(0,a.YP)``],["light",(0,a.YP)``],["regular",(0,a.YP)``],["bold",(0,a.YP)``],["fill",(0,a.YP)``],["duotone",(0,a.YP)``]]),c.styles=(0,l.iv)` + :host { + display: contents; + } + `,n([(0,i.C)({type:String,reflect:!0})],c.prototype,"size",2),n([(0,i.C)({type:String,reflect:!0})],c.prototype,"weight",2),n([(0,i.C)({type:String,reflect:!0})],c.prototype,"color",2),n([(0,i.C)({type:Boolean,reflect:!0})],c.prototype,"mirrored",2),c=n([(0,h.M)("ph-arrow-clockwise")],c)}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/8213.ce0cd878f7af2dfc.js b/frontend/.next/static/chunks/8213.ce0cd878f7af2dfc.js new file mode 100644 index 0000000..2c25d18 --- /dev/null +++ b/frontend/.next/static/chunks/8213.ce0cd878f7af2dfc.js @@ -0,0 +1,14 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8213],{8213:function(t,e,r){r.r(e),r.d(e,{PhCaretUp:function(){return c}}),r(31498);var l=r(38157),a=r(48567),i=r(54910),o=r(69709),s=r(78313),p=Object.defineProperty,h=Object.getOwnPropertyDescriptor,n=(t,e,r,l)=>{for(var a,i=l>1?void 0:l?h(e,r):e,o=t.length-1;o>=0;o--)(a=t[o])&&(i=(l?a(e,r,i):a(i))||i);return l&&i&&p(e,r,i),i};let c=class extends a.oi{constructor(){super(...arguments),this.size="1em",this.weight="regular",this.color="currentColor",this.mirrored=!1}render(){var t;return(0,l.dy)` + ${c.weightsMap.get(null!=(t=this.weight)?t:"regular")} + `}};c.weightsMap=new Map([["thin",(0,l.YP)``],["light",(0,l.YP)``],["regular",(0,l.YP)``],["bold",(0,l.YP)``],["fill",(0,l.YP)``],["duotone",(0,l.YP)``]]),c.styles=(0,s.iv)` + :host { + display: contents; + } + `,n([(0,o.C)({type:String,reflect:!0})],c.prototype,"size",2),n([(0,o.C)({type:String,reflect:!0})],c.prototype,"weight",2),n([(0,o.C)({type:String,reflect:!0})],c.prototype,"color",2),n([(0,o.C)({type:Boolean,reflect:!0})],c.prototype,"mirrored",2),c=n([(0,i.M)("ph-caret-up")],c)}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/8257.85db10780638e796.js b/frontend/.next/static/chunks/8257.85db10780638e796.js new file mode 100644 index 0000000..8fbb0bb --- /dev/null +++ b/frontend/.next/static/chunks/8257.85db10780638e796.js @@ -0,0 +1,14 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8257],{38257:function(t,a,e){e.r(a),e.d(a,{PhArrowsDownUp:function(){return V}}),e(31498);var r=e(38157),l=e(48567),o=e(54910),i=e(69709),s=e(78313),h=Object.defineProperty,p=Object.getOwnPropertyDescriptor,n=(t,a,e,r)=>{for(var l,o=r>1?void 0:r?p(a,e):a,i=t.length-1;i>=0;i--)(l=t[i])&&(o=(r?l(a,e,o):l(o))||o);return r&&o&&h(a,e,o),o};let V=class extends l.oi{constructor(){super(...arguments),this.size="1em",this.weight="regular",this.color="currentColor",this.mirrored=!1}render(){var t;return(0,r.dy)` + ${V.weightsMap.get(null!=(t=this.weight)?t:"regular")} + `}};V.weightsMap=new Map([["thin",(0,r.YP)``],["light",(0,r.YP)``],["regular",(0,r.YP)``],["bold",(0,r.YP)``],["fill",(0,r.YP)``],["duotone",(0,r.YP)``]]),V.styles=(0,s.iv)` + :host { + display: contents; + } + `,n([(0,i.C)({type:String,reflect:!0})],V.prototype,"size",2),n([(0,i.C)({type:String,reflect:!0})],V.prototype,"weight",2),n([(0,i.C)({type:String,reflect:!0})],V.prototype,"color",2),n([(0,i.C)({type:Boolean,reflect:!0})],V.prototype,"mirrored",2),V=n([(0,o.M)("ph-arrows-down-up")],V)}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/8332-dfab188c89f6de1d.js b/frontend/.next/static/chunks/8332-dfab188c89f6de1d.js new file mode 100644 index 0000000..8a4ba14 --- /dev/null +++ b/frontend/.next/static/chunks/8332-dfab188c89f6de1d.js @@ -0,0 +1,4 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8332],{56570:function(e,t,r){r.d(t,{C:function(){return i}});var n=r(59455);async function i(e,{address:t,blockNumber:r,blockTag:i="latest"}){let a=void 0!==r?(0,n.eC)(r):void 0,s=await e.request({method:"eth_getCode",params:[t,a||i]},{dedupe:!!a});if("0x"!==s)return s}},28766:function(e,t,r){r.d(t,{L:function(){return u}});var n=r(65436),i=r(17283),a=r(34180),s=r(82645),o=r(50550);async function u(e,t){let{abi:r,address:u,args:c,functionName:l,...f}=t,d=(0,i.R)({abi:r,args:c,functionName:l});try{let{data:t}=await (0,s.s)(e,o.R,"call")({...f,data:d,to:u});return(0,n.k)({abi:r,args:c,functionName:l,data:t||"0x"})}catch(e){throw(0,a.S)(e,{abi:r,address:u,args:c,docsPath:"/docs/contract/readContract",functionName:l})}}},85631:function(e,t,r){r.d(t,{s:function(){return s}});var n=r(63228),i=r(13550),a=r(59455);async function s(e,{serializedTransaction:t,throwOnReceiptRevert:r,timeout:s}){let o=await e.request({method:"eth_sendRawTransactionSync",params:s?[t,(0,a.eC)(s)]:[t]},{retryCount:0}),u=(e.chain?.formatters?.transactionReceipt?.format||i.fA)(o);if("reverted"===u.status&&r)throw new n.A3({receipt:u});return u}},28332:function(e,t,r){r.d(t,{I:function(){return rT}});var n=r(98158),i=r(65436),a=r(17283),s=r(93627),o=r(36826),u=r(59455),c=r(81544),l=r(20010);function f(e){if(!(e instanceof c.G))return!1;let t=e.walk(e=>e instanceof l.Lu);return t instanceof l.Lu&&(t.data?.errorName==="HttpError"||t.data?.errorName==="ResolverError"||t.data?.errorName==="ResolverNotContract"||t.data?.errorName==="ResolverNotFound"||t.data?.errorName==="ReverseAddressMismatch"||t.data?.errorName==="UnsupportedResolverProfile")}var d=r(7143),p=r(89256),h=r(44659),m=r(13169),y=r(93610);function g(e){if(66!==e.length||0!==e.indexOf("[")||65!==e.indexOf("]"))return null;let t=`0x${e.slice(1,65)}`;return(0,y.v)(t)?t:null}function b(e){let t=new Uint8Array(32).fill(0);if(!e)return(0,u.ci)(t);let r=e.split(".");for(let e=r.length-1;e>=0;e-=1){let n=g(r[e]),i=n?(0,h.O0)(n):(0,m.w)((0,h.qX)(r[e]),"bytes");t=(0,m.w)((0,p.zo)([t,i]),"bytes")}return(0,u.ci)(t)}function w(e){let t=e.replace(/^\.|\.$/gm,"");if(0===t.length)return new Uint8Array(1);let r=new Uint8Array((0,h.qX)(t).byteLength+2),n=0,i=t.split(".");for(let e=0;e255){var a;t=(0,h.qX)((a=function(e){let t=new Uint8Array(32).fill(0);return e?g(e)||(0,m.w)((0,h.qX)(e)):(0,u.ci)(t)}(i[e]),`[${a.slice(2)}]`))}r[n]=t.length,r.set(t,n+1),n+=t.length+1}return r.byteLength!==n+1?r.slice(0,n+1):r}var v=r(82645),P=r(28766);async function x(e,t){let{blockNumber:r,blockTag:c,coinType:l,name:p,gatewayUrls:h,strict:m}=t,{chain:y}=e,g=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!y)throw Error("client chain not configured. universalResolverAddress is required.");return(0,s.L)({blockNumber:r,chain:y,contract:"ensUniversalResolver"})})(),x=y?.ensTlds;if(x&&!x.some(e=>p.endsWith(e)))return null;let E=null!=l?[b(p),BigInt(l)]:[b(p)];try{let t=(0,a.R)({abi:n.X$,functionName:"addr",args:E}),s={address:g,abi:n.k3,functionName:"resolveWithGateways",args:[(0,u.NC)(w(p)),t,h??[d.M]],blockNumber:r,blockTag:c},l=(0,v.s)(e,P.L,"readContract"),f=await l(s);if("0x"===f[0])return null;let m=(0,i.k)({abi:n.X$,args:E,functionName:"addr",data:f[0]});if("0x"===m||"0x00"===(0,o.f)(m))return null;return m}catch(e){if(m)throw e;if(f(e))return null;throw e}}class E extends c.G{constructor({data:e}){super("Unable to extract image from metadata. The metadata may be malformed or invalid.",{metaMessages:["- Metadata must be a JSON object with at least an `image`, `image_url` or `image_data` property.","",`Provided data: ${JSON.stringify(e)}`],name:"EnsAvatarInvalidMetadataError"})}}class A extends c.G{constructor({reason:e}){super(`ENS NFT avatar URI is invalid. ${e}`,{name:"EnsAvatarInvalidNftUriError"})}}class I extends c.G{constructor({uri:e}){super(`Unable to resolve ENS avatar URI "${e}". The URI may be malformed, invalid, or does not respond with a valid image.`,{name:"EnsAvatarUriResolutionError"})}}class N extends c.G{constructor({namespace:e}){super(`ENS NFT avatar namespace "${e}" is not supported. Must be "erc721" or "erc1155".`,{name:"EnsAvatarUnsupportedNamespaceError"})}}let C=/(?https?:\/\/[^/]*|ipfs:\/|ipns:\/|ar:\/)?(?\/)?(?ipfs\/|ipns\/)?(?[\w\-.]+)(?\/.*)?/,$=/^(Qm[1-9A-HJ-NP-Za-km-z]{44,}|b[A-Za-z2-7]{58,}|B[A-Z2-7]{58,}|z[1-9A-HJ-NP-Za-km-z]{48,}|F[0-9A-F]{50,})(\/(?[\w\-.]+))?(?\/.*)?$/,B=/^data:([a-zA-Z\-/+]*);base64,([^"].*)/,k=/^data:([a-zA-Z\-/+]*)?(;[a-zA-Z0-9].*?)?(,)/;async function R(e){try{let t=await fetch(e,{method:"HEAD"});if(200===t.status){let e=t.headers.get("content-type");return e?.startsWith("image/")}return!1}catch(t){if("object"==typeof t&&void 0!==t.response||!Object.hasOwn(globalThis,"Image"))return!1;return new Promise(t=>{let r=new Image;r.onload=()=>{t(!0)},r.onerror=()=>{t(!1)},r.src=e})}}function S(e,t){return e?e.endsWith("/")?e.slice(0,-1):e:t}function z({uri:e,gatewayUrls:t}){let r=B.test(e);if(r)return{uri:e,isOnChain:!0,isEncoded:r};let n=S(t?.ipfs,"https://ipfs.io"),i=S(t?.arweave,"https://arweave.net"),a=e.match(C),{protocol:s,subpath:o,target:u,subtarget:c=""}=a?.groups||{},l="ipns:/"===s||"ipns/"===o,f="ipfs:/"===s||"ipfs/"===o||$.test(e);if(e.startsWith("http")&&!l&&!f){let r=e;return t?.arweave&&(r=e.replace(/https:\/\/arweave.net/g,t?.arweave)),{uri:r,isOnChain:!1,isEncoded:!1}}if((l||f)&&u)return{uri:`${n}/${l?"ipns":"ipfs"}/${u}${c}`,isOnChain:!1,isEncoded:!1};if("ar:/"===s&&u)return{uri:`${i}/${u}${c||""}`,isOnChain:!1,isEncoded:!1};let d=e.replace(k,"");if(d.startsWith("e.json());return await U({gatewayUrls:e,uri:L(r)})}catch{throw new I({uri:t})}}async function U({gatewayUrls:e,uri:t}){let{uri:r,isOnChain:n}=z({uri:t,gatewayUrls:e});if(n||await R(r))return r;throw new I({uri:t})}async function T(e,{nft:t}){if("erc721"===t.namespace)return(0,P.L)(e,{address:t.contractAddress,abi:[{name:"tokenURI",type:"function",stateMutability:"view",inputs:[{name:"tokenId",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"tokenURI",args:[BigInt(t.tokenID)]});if("erc1155"===t.namespace)return(0,P.L)(e,{address:t.contractAddress,abi:[{name:"uri",type:"function",stateMutability:"view",inputs:[{name:"_id",type:"uint256"}],outputs:[{name:"",type:"string"}]}],functionName:"uri",args:[BigInt(t.tokenID)]});throw new N({namespace:t.namespace})}async function G(e,{gatewayUrls:t,record:r}){return/eip155:/i.test(r)?F(e,{gatewayUrls:t,record:r}):U({uri:r,gatewayUrls:t})}async function F(e,{gatewayUrls:t,record:r}){let n=function(e){let t=e;t.startsWith("did:nft:")&&(t=t.replace("did:nft:","").replace(/_/g,"/"));let[r,n,i]=t.split("/"),[a,s]=r.split(":"),[o,u]=n.split(":");if(!a||"eip155"!==a.toLowerCase())throw new A({reason:"Only EIP-155 supported"});if(!s)throw new A({reason:"Chain ID not found"});if(!u)throw new A({reason:"Contract address not found"});if(!i)throw new A({reason:"Token ID not found"});if(!o)throw new A({reason:"ERC namespace not found"});return{chainID:Number.parseInt(s,10),namespace:o.toLowerCase(),contractAddress:u,tokenID:i}}(r),{uri:i,isOnChain:a,isEncoded:s}=z({uri:await T(e,{nft:n}),gatewayUrls:t});if(a&&(i.includes("data:application/json;base64,")||i.startsWith("{")))return U({uri:L(JSON.parse(s?atob(i.replace("data:application/json;base64,","")):i)),gatewayUrls:t});let o=n.tokenID;return"erc1155"===n.namespace&&(o=o.replace("0x","").padStart(64,"0")),O({gatewayUrls:t,uri:i.replace(/(?:0x)?{id}/,o)})}async function _(e,t){let{blockNumber:r,blockTag:o,key:c,name:l,gatewayUrls:p,strict:h}=t,{chain:m}=e,y=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!m)throw Error("client chain not configured. universalResolverAddress is required.");return(0,s.L)({blockNumber:r,chain:m,contract:"ensUniversalResolver"})})(),g=m?.ensTlds;if(g&&!g.some(e=>l.endsWith(e)))return null;try{let t={address:y,abi:n.k3,args:[(0,u.NC)(w(l)),(0,a.R)({abi:n.nZ,functionName:"text",args:[b(l),c]}),p??[d.M]],functionName:"resolveWithGateways",blockNumber:r,blockTag:o},s=(0,v.s)(e,P.L,"readContract"),f=await s(t);if("0x"===f[0])return null;let h=(0,i.k)({abi:n.nZ,functionName:"text",data:f[0]});return""===h?null:h}catch(e){if(h)throw e;if(f(e))return null;throw e}}async function D(e,{blockNumber:t,blockTag:r,assetGatewayUrls:n,name:i,gatewayUrls:a,strict:s,universalResolverAddress:o}){let u=await (0,v.s)(e,_,"getEnsText")({blockNumber:t,blockTag:r,key:"avatar",name:i,universalResolverAddress:o,gatewayUrls:a,strict:s});if(!u)return null;try{return await G(e,{record:u,gatewayUrls:n})}catch{return null}}async function j(e,t){let{address:r,blockNumber:i,blockTag:a,coinType:o=60n,gatewayUrls:u,strict:c}=t,{chain:l}=e,p=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!l)throw Error("client chain not configured. universalResolverAddress is required.");return(0,s.L)({blockNumber:i,chain:l,contract:"ensUniversalResolver"})})();try{let t={address:p,abi:n.du,args:[r,o,u??[d.M]],functionName:"reverseWithGateways",blockNumber:i,blockTag:a},s=(0,v.s)(e,P.L,"readContract"),[c]=await s(t);return c||null}catch(e){if(c)throw e;if(f(e))return null;throw e}}async function M(e,t){let{blockNumber:r,blockTag:n,name:i}=t,{chain:a}=e,o=(()=>{if(t.universalResolverAddress)return t.universalResolverAddress;if(!a)throw Error("client chain not configured. universalResolverAddress is required.");return(0,s.L)({blockNumber:r,chain:a,contract:"ensUniversalResolver"})})(),c=a?.ensTlds;if(c&&!c.some(e=>i.endsWith(e)))throw Error(`${i} is not a valid ENS TLD (${c?.join(", ")}) for chain "${a.name}" (id: ${a.id}).`);let[l]=await (0,v.s)(e,P.L,"readContract")({address:o,abi:[{inputs:[{type:"bytes"}],name:"findResolver",outputs:[{type:"address"},{type:"bytes32"},{type:"uint256"}],stateMutability:"view",type:"function"}],functionName:"findResolver",args:[(0,u.NC)(w(i))],blockNumber:r,blockTag:n});return l}var q=r(50550),W=r(19775),V=r(14015),H=r(70878),Z=r(92614),Q=r(54605);async function Y(e,t){let{account:r=e.account,blockNumber:n,blockTag:i="latest",blobs:a,data:s,gas:o,gasPrice:c,maxFeePerBlobGas:l,maxFeePerGas:f,maxPriorityFeePerGas:d,to:p,value:h,...m}=t,y=r?(0,W.T)(r):void 0;try{(0,Q.F)(t);let r="bigint"==typeof n?(0,u.eC)(n):void 0,g=e.chain?.formatters?.transactionRequest?.format,b=(g||Z.tG)({...(0,H.K)(m,{format:g}),account:y,blobs:a,data:s,gas:o,gasPrice:c,maxFeePerBlobGas:l,maxFeePerGas:f,maxPriorityFeePerGas:d,to:p,value:h},"createAccessList"),w=await e.request({method:"eth_createAccessList",params:[b,r||i]});return{accessList:w.accessList,gasUsed:BigInt(w.gasUsed)}}catch(r){throw(0,V.P)(r,{...t,account:y,chain:e.chain})}}var K=r(46908);async function X(e){let t=(0,K.g)(e,{method:"eth_newBlockFilter"}),r=await e.request({method:"eth_newBlockFilter"});return{id:r,request:t(r),type:"block"}}var J=r(65531);class ee extends c.G{constructor(e){super(`Filter type "${e}" is not supported.`,{name:"FilterTypeNotSupportedError"})}}var et=r(45392),er=r(30056),en=r(7275),ei=r(64043);let ea="/docs/contract/encodeEventTopics";function es(e){let{abi:t,eventName:r,args:n}=e,i=t[0];if(r){let e=(0,ei.mE)({abi:t,name:r});if(!e)throw new J.mv(r,{docsPath:ea});i=e}if("event"!==i.type)throw new J.mv(void 0,{docsPath:ea});let a=(0,en.t)(i),s=(0,et.n)(a),o=[];if(n&&"inputs"in i){let e=i.inputs?.filter(e=>"indexed"in e&&e.indexed),t=Array.isArray(n)?n:Object.values(n).length>0?e?.map(e=>n[e.name])??[]:[];t.length>0&&(o=e?.map((e,r)=>Array.isArray(t[r])?t[r].map((n,i)=>eo({param:e,value:t[r][i]})):void 0!==t[r]&&null!==t[r]?eo({param:e,value:t[r]}):null)??[])}return[s,...o]}function eo({param:e,value:t}){if("string"===e.type||"bytes"===e.type)return(0,m.w)((0,h.O0)(t));if("tuple"===e.type||e.type.match(/^(.*)\[(\d+)?\]$/))throw new ee(e.type);return(0,er.E)([e],[t])}async function eu(e,t){let{address:r,abi:n,args:i,eventName:a,fromBlock:s,strict:o,toBlock:c}=t,l=(0,K.g)(e,{method:"eth_newFilter"}),f=a?es({abi:n,args:i,eventName:a}):void 0,d=await e.request({method:"eth_newFilter",params:[{address:r,fromBlock:"bigint"==typeof s?(0,u.eC)(s):s,toBlock:"bigint"==typeof c?(0,u.eC)(c):c,topics:f}]});return{abi:n,args:i,eventName:a,id:d,request:l(d),strict:!!o,type:"event"}}async function ec(e,{address:t,args:r,event:n,events:i,fromBlock:a,strict:s,toBlock:o}={}){let c=i??(n?[n]:void 0),l=(0,K.g)(e,{method:"eth_newFilter"}),f=[];c&&(f=[c.flatMap(e=>es({abi:[e],eventName:e.name,args:r}))],n&&(f=f[0]));let d=await e.request({method:"eth_newFilter",params:[{address:t,fromBlock:"bigint"==typeof a?(0,u.eC)(a):a,toBlock:"bigint"==typeof o?(0,u.eC)(o):o,...f.length?{topics:f}:{}}]});return{abi:c,args:r,eventName:n?n.name:void 0,fromBlock:a,id:d,request:l(d),strict:!!s,toBlock:o,type:"event"}}var el=r(13716),ef=r(34180),ed=r(8741);async function ep(e,t){let{abi:r,address:n,args:i,functionName:s,dataSuffix:o,...u}=t,c=(0,a.R)({abi:r,args:i,functionName:s});try{return await (0,v.s)(e,ed.Q,"estimateGas")({data:`${c}${o?o.replace("0x",""):""}`,to:n,...u})}catch(t){let e=u.account?(0,W.T)(u.account):void 0;throw(0,ef.S)(t,{abi:r,address:n,args:i,docsPath:"/docs/contract/estimateContractGas",functionName:s,sender:e?.address})}}var eh=r(6458),em=r(96174),ey=r(332),eg=r(32807);async function eb(e){return BigInt(await e.request({method:"eth_blobBaseFee"}))}var ew=r(74587),ev=r(13708),eP=r(72932);async function ex(e,{blockHash:t,blockNumber:r,blockTag:n="latest"}={}){let i;let a=void 0!==r?(0,u.eC)(r):void 0;return i=t?await e.request({method:"eth_getBlockTransactionCountByHash",params:[t]},{dedupe:!0}):await e.request({method:"eth_getBlockTransactionCountByNumber",params:[a||n]},{dedupe:!!a}),(0,eP.ly)(i)}var eE=r(12363),eA=r(56570),eI=r(42133),eN=r(55668);async function eC(e,{address:t,blockHash:r,fromBlock:n,toBlock:i,event:a,events:s,args:o,strict:c}={}){let l=s??(a?[a]:void 0),f=[];l&&(f=[l.flatMap(e=>es({abi:[e],eventName:e.name,args:s?void 0:o}))],a&&(f=f[0]));let d=(r?await e.request({method:"eth_getLogs",params:[{address:t,topics:f,blockHash:r}]}):await e.request({method:"eth_getLogs",params:[{address:t,topics:f,fromBlock:"bigint"==typeof n?(0,u.eC)(n):n,toBlock:"bigint"==typeof i?(0,u.eC)(i):i}]})).map(e=>(0,eN.U)(e));return l?(0,eI.h)({abi:l,args:o,logs:d,strict:c??!1}):d}async function e$(e,t){let{abi:r,address:n,args:i,blockHash:a,eventName:s,fromBlock:o,toBlock:u,strict:c}=t,l=s?(0,ei.mE)({abi:r,name:s}):void 0,f=l?void 0:r.filter(e=>"event"===e.type);return(0,v.s)(e,eC,"getLogs")({address:n,args:i,blockHash:a,event:l,events:f,fromBlock:o,toBlock:u,strict:c})}class eB extends c.G{constructor({address:e}){super(`No EIP-712 domain found on contract "${e}".`,{metaMessages:["Ensure that:",`- The contract is deployed at the address "${e}".`,"- `eip712Domain()` function exists on the contract.","- `eip712Domain()` function matches signature to ERC-5267 specification."],name:"Eip712DomainNotFoundError"})}}async function ek(e,t){let{address:r,factory:n,factoryData:i}=t;try{let[t,a,s,o,u,c,l]=await (0,v.s)(e,P.L,"readContract")({abi:eR,address:r,functionName:"eip712Domain",factory:n,factoryData:i});return{domain:{name:a,version:s,chainId:Number(o),verifyingContract:u,salt:c},extensions:l,fields:t}}catch(e){if("ContractFunctionExecutionError"===e.name&&"ContractFunctionZeroDataError"===e.cause.name)throw new eB({address:r});throw e}}let eR=[{inputs:[],name:"eip712Domain",outputs:[{name:"fields",type:"bytes1"},{name:"name",type:"string"},{name:"version",type:"string"},{name:"chainId",type:"uint256"},{name:"verifyingContract",type:"address"},{name:"salt",type:"bytes32"},{name:"extensions",type:"uint256[]"}],stateMutability:"view",type:"function"}];async function eS(e,{blockCount:t,blockNumber:r,blockTag:n="latest",rewardPercentiles:i}){var a;let s="bigint"==typeof r?(0,u.eC)(r):void 0;return{baseFeePerGas:(a=await e.request({method:"eth_feeHistory",params:[(0,u.eC)(t),s||n,i]},{dedupe:!!s})).baseFeePerGas.map(e=>BigInt(e)),gasUsedRatio:a.gasUsedRatio,oldestBlock:BigInt(a.oldestBlock),reward:a.reward?.map(e=>e.map(e=>BigInt(e)))}}var ez=r(18789);async function eL(e,{filter:t}){let r=t.strict??!1,n=(await t.request({method:"eth_getFilterLogs",params:[t.id]})).map(e=>(0,eN.U)(e));return t.abi?(0,eI.h)({abi:t.abi,logs:n,strict:r}):n}var eO=r(25283);async function eU(e,{address:t,blockNumber:r,blockTag:n,storageKeys:i}){var a;let s=void 0!==r?(0,u.eC)(r):void 0;return{...a=await e.request({method:"eth_getProof",params:[t,i,s||(n??"latest")]}),balance:a.balance?BigInt(a.balance):void 0,nonce:a.nonce?(0,eP.ly)(a.nonce):void 0,storageProof:a.storageProof?a.storageProof.map(e=>({...e,value:BigInt(e.value)})):void 0}}async function eT(e,{address:t,blockNumber:r,blockTag:n="latest",slot:i}){let a=void 0!==r?(0,u.eC)(r):void 0;return await e.request({method:"eth_getStorageAt",params:[t,i,a||n]})}var eG=r(39277);async function eF(e,{hash:t,transactionReceipt:r}){let[n,i]=await Promise.all([(0,v.s)(e,ev.z,"getBlockNumber")({}),t?(0,v.s)(e,eG.f,"getTransaction")({hash:t}):void 0]),a=r?.blockNumber||i?.blockNumber;return a?n-a+1n:0n}var e_=r(16689),eD=r(78526),ej=r(45434);async function eM(e,t){let{account:r,authorizationList:o,allowFailure:u=!0,blockNumber:f,blockOverrides:d,blockTag:p,stateOverride:h}=t,m=t.contracts,{batchSize:y=t.batchSize??1024,deployless:g=t.deployless??!1}="object"==typeof e.batch?.multicall?e.batch.multicall:{},b=(()=>{if(t.multicallAddress)return t.multicallAddress;if(g)return null;if(e.chain)return(0,s.L)({blockNumber:f,chain:e.chain,contract:"multicall3"});throw Error("client chain not configured. multicallAddress is required.")})(),w=[[]],x=0,E=0;for(let e=0;e0&&E>y&&w[x].length>0&&(x++,E=(e.length-2)/2,w[x]=[]),w[x]=[...w[x],{allowFailure:!0,callData:e,target:n}]}catch(a){let e=(0,ef.S)(a,{abi:t,address:n,args:i,docsPath:"/docs/contract/multicall",functionName:s,sender:r});if(!u)throw e;w[x]=[...w[x],{allowFailure:!0,callData:"0x",target:n}]}}let A=await Promise.allSettled(w.map(t=>(0,v.s)(e,P.L,"readContract")({...null===b?{code:ej.xd}:{address:b},abi:n.F8,account:r,args:[t],authorizationList:o,blockNumber:f,blockOverrides:d,blockTag:p,functionName:"aggregate3",stateOverride:h}))),I=[];for(let e=0;e{let t=e.account?(0,W.T)(e.account):void 0,r=e.abi?(0,a.R)(e):e.data,n={...e,account:t,data:e.dataSuffix?(0,p.zo)([r||"0x",e.dataSuffix]):r,from:e.from??t?.address};return(0,Q.F)(n),(0,Z.tG)(n)}),i=e.stateOverrides?(0,eZ.mF)(e.stateOverrides):void 0;t.push({blockOverrides:r,calls:n,stateOverrides:i})}let d="bigint"==typeof r?(0,u.eC)(r):void 0;return(await e.request({method:"eth_simulateV1",params:[{blockStateCalls:t,returnFullTransactions:o,traceTransfers:c,validation:f},d||n]})).map((e,t)=>({...(0,eH.Z)(e),calls:e.calls.map((e,r)=>{let{abi:n,args:a,functionName:o,to:u}=s[t].calls[r],c=e.error?.data??e.returnData,f=BigInt(e.gasUsed),d=e.logs?.map(e=>eN.U(e)),p="0x1"===e.status?"success":"failure",h=n&&"success"===p&&"0x"!==c?(0,i.k)({abi:n,data:c,functionName:o}):null,m=(()=>{let t;if("success"!==p&&(e.error?.data==="0x"?t=new J.wb:e.error&&(t=new l.VQ(e.error)),t))return(0,ef.S)(t,{abi:n??[],address:u??"0x",args:a,functionName:o??""})})();return{data:c,gasUsed:f,logs:d,status:p,..."success"===p?{result:h}:{error:m}}})}))}catch(t){let e=(0,eV.k)(t,{});if(e instanceof eW.cj)throw t;throw e}}var eY=r(67995),eK=r(99940),eX=r(19540),eJ=r(64289),e0=r(24658),e1=r(22496),e2=r(52250),e5=r(65759);function e6(e,t){if(tn(e)>t)throw new to({givenSize:tn(e),maxSize:t})}let e3={zero:48,nine:57,A:65,F:70,a:97,f:102};function e8(e){return e>=e3.zero&&e<=e3.nine?e-e3.zero:e>=e3.A&&e<=e3.F?e-(e3.A-10):e>=e3.a&&e<=e3.f?e-(e3.a-10):void 0}function e4(e,t={}){let{dir:r="left"}=t,n=0;for(let t=0;tthis.maxSize){let e=this.keys().next().value;e&&this.delete(e)}return this}}let td={checksum:new tf(8192)}.checksum,tp=/^0x[a-fA-F0-9]{40}$/;function th(e,t={}){let{strict:r=!0}=t;if(!tp.test(e))throw new tg({address:e,cause:new tb});if(r){if(e.toLowerCase()===e)return;if(tm(e)!==e)throw new tg({address:e,cause:new tw})}}function tm(e){if(td.has(e))return td.get(e);th(e,{strict:!1});let t=e.substring(2).toLowerCase(),r=tl(function(e,t={}){let{size:r}=t,n=tt.encode(e);return"number"==typeof r?(e6(n,r),function(e,t={}){let{dir:r,size:n=32}=t;if(0===n)return e;if(e.length>n)throw new tc({size:e.length,targetSize:n,type:"Bytes"});let i=new Uint8Array(n);for(let t=0;t>1]>>4>=8&&n[e]&&(n[e]=n[e].toUpperCase()),(15&r[e>>1])>=8&&n[e+1]&&(n[e+1]=n[e+1].toUpperCase());let i=`0x${n.join("")}`;return td.set(e,i),i}function ty(e,t={}){let{strict:r=!0}=t??{};try{return th(e,{strict:r}),!0}catch{return!1}}class tg extends e1.G{constructor({address:e,cause:t}){super(`Address "${e}" is invalid.`,{cause:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidAddressError"})}}class tb extends e1.G{constructor(){super("Address is not a 20 byte (40 hexadecimal character) value."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidInputError"})}}class tw extends e1.G{constructor(){super("Address does not match its checksum counterpart."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidChecksumError"})}}function tv(e){let t=!0,r="",n=0,i="",a=!1;for(let s=0;ss?"function"===e.type||"error"===e.type?tE(e)===e5.tP(t,0,4):"event"===e.type&&tA(e)===t:"name"in e&&e.name===t);if(0===o.length)throw new tN({name:t});if(1===o.length)return{...o[0],...a?{hash:tA(o[0])}:{}};for(let e of o)if("inputs"in e){if(!i||0===i.length){if(!e.inputs||0===e.inputs.length)return{...e,...a?{hash:tA(e)}:{}};continue}if(e.inputs&&0!==e.inputs.length&&e.inputs.length===i.length&&i.every((t,r)=>{let n="inputs"in e&&e.inputs[r];return!!n&&function e(t,r){let n=typeof t,i=r.type;switch(i){case"address":return ty(t,{strict:!1});case"bool":return"boolean"===n;case"function":case"string":return"string"===n;default:if("tuple"===i&&"components"in r)return Object.values(r.components).every((r,n)=>e(Object.values(t)[n],r));if(/^u?int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/.test(i))return"number"===n||"bigint"===n;if(/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/.test(i))return"string"===n||t instanceof Uint8Array;if(/[a-z]+[1-9]{0,3}(\[[0-9]{0,}\])+$/.test(i))return Array.isArray(t)&&t.every(t=>e(t,{...r,type:i.replace(/(\[[0-9]{0,}\])$/,"")}));return!1}}(t,n)})){if(n&&"inputs"in n&&n.inputs){let t=function e(t,r,n){for(let i in t){let a=t[i],s=r[i];if("tuple"===a.type&&"tuple"===s.type&&"components"in a&&"components"in s)return e(a.components,s.components,n[i]);let o=[a.type,s.type];if(o.includes("address")&&o.includes("bytes20")||(o.includes("address")&&o.includes("string")||o.includes("address")&&o.includes("bytes"))&&ty(n[i],{strict:!1}))return o}}(e.inputs,n.inputs,i);if(t)throw new tI({abiItem:e,type:t[0]},{abiItem:n,type:t[1]})}n=e}}let u=(()=>{if(n)return n;let[e,...t]=o;return{...e,overloads:t}})();if(!u)throw new tN({name:t});return{...u,...a?{hash:tA(u)}:{}}}function tE(...e){let t=(()=>{if(Array.isArray(e[0])){let[t,r]=e;return tx(t,r)}return e[0]})();return e5.tP(tA(t),0,4)}function tA(...e){let t=(()=>{if(Array.isArray(e[0])){let[t,r]=e;return tx(t,r)}return e[0]})();return"string"!=typeof t&&"hash"in t&&t.hash?t.hash:tl(e5.mL(function(...e){let t=(()=>{if(Array.isArray(e[0])){let[t,r]=e;return tx(t,r)}return e[0]})();return tv("string"==typeof t?t:e0.t(t))}(t)))}class tI extends e1.G{constructor(e,t){super("Found ambiguous types in overloaded ABI Items.",{metaMessages:[`\`${e.type}\` in \`${tv(e0.t(e.abiItem))}\`, and`,`\`${t.type}\` in \`${tv(e0.t(t.abiItem))}\``,"","These types encode differently and cannot be distinguished at runtime.","Remove one of the ambiguous items in the ABI."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.AmbiguityError"})}}class tN extends e1.G{constructor({name:e,data:t,type:r="item"}){super(`ABI ${r}${e?` with name "${e}"`:t?` with data "${t}"`:""} not found.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"AbiItem.NotFoundError"})}}var tC=r(97913),t$=r(95387);let tB=/^(.*)\[([0-9]*)\]$/,tk=/^bytes([1-9]|1[0-9]|2[0-9]|3[0-2])?$/,tR=/^(u?int)(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?$/,tS=2n**256n-1n;function tz(e){let t=0;for(let r=0;r=this.recursiveReadLimit)throw new tF({count:this.recursiveReadCount+1,limit:this.recursiveReadLimit})},assertPosition(e){if(e<0||e>this.bytes.length-1)throw new tG({length:this.bytes.length,position:e})},decrementPosition(e){if(e<0)throw new tT({offset:e});let t=this.position-e;this.assertPosition(t),this.position=t},getReadCount(e){return this.positionReadCount.get(e||this.position)||0},incrementPosition(e){if(e<0)throw new tT({offset:e});let t=this.position+e;this.assertPosition(t),this.position=t},inspectByte(e){let t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectBytes(e,t){let r=t??this.position;return this.assertPosition(r+e-1),this.bytes.subarray(r,r+e)},inspectUint8(e){let t=e??this.position;return this.assertPosition(t),this.bytes[t]},inspectUint16(e){let t=e??this.position;return this.assertPosition(t+1),this.dataView.getUint16(t)},inspectUint24(e){let t=e??this.position;return this.assertPosition(t+2),(this.dataView.getUint16(t)<<8)+this.dataView.getUint8(t+2)},inspectUint32(e){let t=e??this.position;return this.assertPosition(t+3),this.dataView.getUint32(t)},pushByte(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushBytes(e){this.assertPosition(this.position+e.length-1),this.bytes.set(e,this.position),this.position+=e.length},pushUint8(e){this.assertPosition(this.position),this.bytes[this.position]=e,this.position++},pushUint16(e){this.assertPosition(this.position+1),this.dataView.setUint16(this.position,e),this.position+=2},pushUint24(e){this.assertPosition(this.position+2),this.dataView.setUint16(this.position,e>>8),this.dataView.setUint8(this.position+2,255&e),this.position+=3},pushUint32(e){this.assertPosition(this.position+3),this.dataView.setUint32(this.position,e),this.position+=4},readByte(){this.assertReadLimit(),this._touch();let e=this.inspectByte();return this.position++,e},readBytes(e,t){this.assertReadLimit(),this._touch();let r=this.inspectBytes(e);return this.position+=t??e,r},readUint8(){this.assertReadLimit(),this._touch();let e=this.inspectUint8();return this.position+=1,e},readUint16(){this.assertReadLimit(),this._touch();let e=this.inspectUint16();return this.position+=2,e},readUint24(){this.assertReadLimit(),this._touch();let e=this.inspectUint24();return this.position+=3,e},readUint32(){this.assertReadLimit(),this._touch();let e=this.inspectUint32();return this.position+=4,e},get remaining(){return this.bytes.length-this.position},setPosition(e){let t=this.position;return this.assertPosition(e),this.position=e,()=>this.position=t},_touch(){if(this.recursiveReadLimit===Number.POSITIVE_INFINITY)return;let e=this.getReadCount();this.positionReadCount.set(this.position,e+1),e>0&&this.recursiveReadCount++}};class tT extends e1.G{constructor({offset:e}){super(`Offset \`${e}\` cannot be negative.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.NegativeOffsetError"})}}class tG extends e1.G{constructor({length:e,position:t}){super(`Position \`${t}\` is out of bounds (\`0 < position < ${e}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.PositionOutOfBoundsError"})}}class tF extends e1.G{constructor({count:e,limit:t}){super(`Recursive read limit of \`${t}\` exceeded (recursive read count: \`${e}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Cursor.RecursiveReadLimitExceededError"})}}function t_(e,t,r){let{checksumAddress:n=!1}=r??{};if(e.length!==t.length)throw new tH({expectedLength:e.length,givenLength:t.length});let i=tz(function({checksumAddress:e,parameters:t,values:r}){let n=[];for(let i=0;i0?e5.zo(t,e):t}}if(o)return{dynamic:!0,encoded:e}}return{dynamic:!1,encoded:e5.zo(...u.map(({encoded:e})=>e))}}(n,{checksumAddress:t,length:a,parameter:{...r,type:s}})}if("tuple"===r.type)return function(t,r){let{checksumAddress:n,parameter:i}=r,a=!1,s=[];for(let r=0;re))}}(n,{checksumAddress:t,parameter:r});if("address"===r.type)return function(e,t){let{checksum:r=!1}=t;return th(e,{strict:r}),{dynamic:!1,encoded:e5.Q_(e.toLowerCase())}}(n,{checksum:t});if("bool"===r.type)return function(e){if("boolean"!=typeof e)throw new e1.G(`Invalid boolean value: "${e}" (type: ${typeof e}). Expected: \`true\` or \`false\`.`);return{dynamic:!1,encoded:e5.Q_(e5.O3(e))}}(n);if(r.type.startsWith("uint")||r.type.startsWith("int")){let e=r.type.startsWith("int"),[,,t="256"]=tR.exec(r.type)??[];return function(e,{signed:t,size:r}){if("number"==typeof r){let n=2n**(BigInt(r)-(t?1n:0n))-1n,i=t?-n-1n:0n;if(e>n||e{if(Array.isArray(e[0])){let[t,r]=e;return[function(e){let t=e.find(e=>"constructor"===e.type);if(!t)throw new tN({name:"constructor"});return t}(t),r]}return e})(),{bytecode:n,args:i}=r;return e5.zo(n,t.inputs?.length&&i?.length?t_(t.inputs,i):"0x")}(tP("constructor(bytes, bytes)"),{bytecode:ej.NO,args:["0x6080604052348015600e575f80fd5b5061016d8061001c5f395ff3fe608060405234801561000f575f80fd5b5060043610610029575f3560e01c8063f8b2cb4f1461002d575b5f80fd5b610047600480360381019061004291906100db565b61005d565b604051610054919061011e565b60405180910390f35b5f8173ffffffffffffffffffffffffffffffffffffffff16319050919050565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6100aa82610081565b9050919050565b6100ba816100a0565b81146100c4575f80fd5b50565b5f813590506100d5816100b1565b92915050565b5f602082840312156100f0576100ef61007d565b5b5f6100fd848285016100c7565b91505092915050565b5f819050919050565b61011881610106565b82525050565b5f6020820190506101315f83018461010f565b9291505056fea26469706673582212203b9fe929fe995c7cf9887f0bdba8a36dd78e8b73f149b17d2d9ad7cd09d2dc6264736f6c634300081a0033",function(...e){let[t,r=[]]=(()=>{if(Array.isArray(e[0])){let[t,r,n]=e;return[tK(t,r,{args:n}),n]}let[t,r]=e;return[t,r]})(),{overloads:n}=t,i=n?tK([t,...n],t.name,{args:r}):t,a=tE(i),s=r.length>0?t_(i.inputs,r):void 0;return s?e5.zo(a,s):a}(tY("function getBalance(address)"),[f.address])]}):void 0,p=o?await Promise.all(t.calls.map(async t=>{if(!t.data&&!t.abi)return;let{accessList:r}=await Y(e,{account:f.address,...t,data:t.abi?(0,a.R)(t):t.data});return r.map(({address:e,storageKeys:t})=>t.length>0?e:null)})).then(e=>e.flat().filter(Boolean)):[],h=await eQ(e,{blockNumber:r,blockTag:n,blocks:[...o?[{calls:[{data:d}],stateOverrides:s},{calls:p.map((e,t)=>({abi:[tY("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[f.address],to:e,from:tX,nonce:t})),stateOverrides:[{address:tX,nonce:0}]}]:[],{calls:[...i,{}].map(e=>({...e,from:f?.address})),stateOverrides:s},...o?[{calls:[{data:d}]},{calls:p.map((e,t)=>({abi:[tY("function balanceOf(address) returns (uint256)")],functionName:"balanceOf",args:[f.address],to:e,from:tX,nonce:t})),stateOverrides:[{address:tX,nonce:0}]},{calls:p.map((e,t)=>({to:e,abi:[tY("function decimals() returns (uint256)")],functionName:"decimals",from:tX,nonce:t})),stateOverrides:[{address:tX,nonce:0}]},{calls:p.map((e,t)=>({to:e,abi:[tY("function tokenURI(uint256) returns (string)")],functionName:"tokenURI",args:[0n],from:tX,nonce:t})),stateOverrides:[{address:tX,nonce:0}]},{calls:p.map((e,t)=>({to:e,abi:[tY("function symbol() returns (string)")],functionName:"symbol",from:tX,nonce:t})),stateOverrides:[{address:tX,nonce:0}]}]:[]],traceTransfers:u,validation:l}),m=o?h[2]:h[0],[y,g,,b,w,v,P,x]=o?h:[],{calls:E,...A}=m,I=E.slice(0,-1)??[],N=[...y?.calls??[],...g?.calls??[]].map(e=>"success"===e.status?(0,eP.y_)(e.data):null),C=[...b?.calls??[],...w?.calls??[]].map(e=>"success"===e.status?(0,eP.y_)(e.data):null),$=(v?.calls??[]).map(e=>"success"===e.status?e.result:null),B=(x?.calls??[]).map(e=>"success"===e.status?e.result:null),k=(P?.calls??[]).map(e=>"success"===e.status?e.result:null),R=[];for(let[e,t]of C.entries()){let r=N[e];if("bigint"!=typeof t||"bigint"!=typeof r)continue;let n=$[e-1],i=B[e-1],a=k[e-1],s=0===e?{address:"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",decimals:18,symbol:"ETH"}:{address:p[e-1],decimals:a||n?Number(n??1):void 0,symbol:i??void 0};R.some(e=>e.token.address===s.address)||R.push({token:s,value:{pre:r,post:t,diff:t-r}})}return{assetChanges:R,block:A,results:I}}async function t0(e,t){let{abi:r,address:n,args:s,dataSuffix:o,functionName:u,...c}=t,l=c.account?(0,W.T)(c.account):e.account,f=(0,a.R)({abi:r,args:s,functionName:u});try{let{data:a}=await (0,v.s)(e,q.R,"call")({batch:!1,data:`${f}${o?o.replace("0x",""):""}`,to:n,...c,account:l}),d=(0,i.k)({abi:r,args:s,functionName:u,data:a||"0x"}),p=r.filter(e=>"name"in e&&e.name===t.functionName);return{result:d,request:{abi:p,address:n,args:s,dataSuffix:o,functionName:u,...c,account:l}}}catch(e){throw(0,ef.S)(e,{abi:r,address:n,args:s,docsPath:"/docs/contract/simulateContract",functionName:u,sender:l?.address})}}var t1=r(97638);let t2="0x6492649264926492649264926492649264926492649264926492649264926492";class t5 extends e1.G{constructor(e){super(`Value \`${e}\` is an invalid ERC-6492 wrapped signature.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureErc6492.InvalidWrappedSignatureError"})}}function t6(e,t={}){let{recovered:r}=t;if(void 0===e.r||void 0===e.s||r&&void 0===e.yParity)throw new t9({signature:e});if(e.r<0n||e.r>tS)throw new t7({value:e.r});if(e.s<0n||e.s>tS)throw new re({value:e.s});if("number"==typeof e.yParity&&0!==e.yParity&&1!==e.yParity)throw new rt({value:e.yParity})}function t3(e){if(130!==e.length&&132!==e.length)throw new t4({signature:e});let t=BigInt(e5.tP(e,0,32)),r=BigInt(e5.tP(e,32,64)),n=(()=>{let t=Number(`0x${e.slice(130)}`);if(!Number.isNaN(t))try{return t8(t)}catch{throw new rt({value:t})}})();return void 0===n?{r:t,s:r}:{r:t,s:r,yParity:n}}function t8(e){if(0===e||27===e)return 0;if(1===e||28===e)return 1;if(e>=35)return e%2==0?1:0;throw new rr({value:e})}class t4 extends e1.G{constructor({signature:e}){super(`Value \`${e}\` is an invalid signature size.`,{metaMessages:["Expected: 64 bytes or 65 bytes.",`Received ${e5.dp(e5.Dp(e))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSerializedSizeError"})}}class t9 extends e1.G{constructor({signature:e}){super(`Signature \`${e7.P(e)}\` is missing either an \`r\`, \`s\`, or \`yParity\` property.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.MissingPropertiesError"})}}class t7 extends e1.G{constructor({value:e}){super(`Value \`${e}\` is an invalid r value. r must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidRError"})}}class re extends e1.G{constructor({value:e}){super(`Value \`${e}\` is an invalid s value. s must be a positive integer less than 2^256.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSError"})}}class rt extends e1.G{constructor({value:e}){super(`Value \`${e}\` is an invalid y-parity value. Y-parity must be 0 or 1.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidYParityError"})}}class rr extends e1.G{constructor({value:e}){super(`Value \`${e}\` is an invalid v value. v must be 27, 28 or >=35.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidVError"})}}let rn=tj("(uint256 chainId, address delegation, uint256 nonce, uint8 yParity, uint256 r, uint256 s), address to, bytes data");function ri(e){if("string"==typeof e){if("0x8010801080108010801080108010801080108010801080108010801080108010"!==e5.tP(e,-32))throw new ra(e)}else t6(e.authorization)}class ra extends e1.G{constructor(e){super(`Value \`${e}\` is an invalid ERC-8010 wrapped signature.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SignatureErc8010.InvalidWrappedSignatureError"})}}var rs=r(23010),ro=r(31669),ru=r(93637),rc=r(55834);async function rl({address:e,authorization:t,signature:r}){return(0,ru.E)((0,ro.K)(e),await (0,rc.z)({authorization:t,signature:r}))}var rf=r(69021),rd=r(10846);async function rp(e,t){let{address:r,hash:n,erc6492VerifierAddress:i=t.universalSignatureVerifierAddress??e.chain?.contracts?.erc6492Verifier?.address,multicallAddress:a=t.multicallAddress??e.chain?.contracts?.multicall3?.address}=t,s=(()=>{let e=t.signature;return(0,y.v)(e)?e:"object"==typeof e&&"r"in e&&"s"in e?function({r:e,s:t,to:r="hex",v:n,yParity:i}){let a=(()=>{if(0===i||1===i)return i;if(n&&(27n===n||28n===n||n>=35n))return n%2n===0n?1:0;throw Error("Invalid `v` or `yParity` value")})(),s=`0x${new rd.secp256k1.Signature((0,eP.y_)(e),(0,eP.y_)(t)).toCompactHex()}${0===a?"1b":"1c"}`;return"hex"===r?s:(0,h.nr)(s)}(e):(0,u.ci)(e)})();try{if(function(e){try{return ri(e),!0}catch{return!1}}(s))return await rh(e,{...t,multicallAddress:a,signature:s});return await rm(e,{...t,verifierAddress:i,signature:s})}catch(e){try{if((0,ru.E)((0,ro.K)(r),await (0,rf.R)({hash:n,signature:s})))return!0}catch{}if(e instanceof rg)return!1;throw e}}async function rh(e,t){let{address:r,blockNumber:i,blockTag:s,hash:o,multicallAddress:c}=t,{authorization:l,data:f,signature:d,to:h}=function(e){ri(e);let t=e5.He(e5.tP(e,-64,-32)),r=e5.tP(e,-t-64,-64),n=e5.tP(e,0,-t-64),[i,a,s]=function(e,t,r={}){let{as:n="Array",checksumAddress:i=!1}=r,a="string"==typeof t?tr(t):t,s=function(e,{recursiveReadLimit:t=8192}={}){let r=Object.create(tU);return r.bytes=e,r.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength),r.positionReadCount=new Map,r.recursiveReadLimit=t,r}(a);if(0===tn(a)&&e.length>0)throw new tq;if(tn(a)&&32>tn(a))throw new tM({data:"string"==typeof t?t:e5.xv(t),parameters:e,size:tn(a)});let o=0,u="Array"===n?[]:{};for(let t=0;t!e),o=s?[]:{},u=0;if(tO(r)){let n=a+ti(t.readBytes(32));for(let a=0;a1||n[0]>1)throw new ts(n);return!!n[0]}(t.readBytes(32),{size:32}),32];if(r.type.startsWith("bytes"))return function(e,t,{staticPosition:r}){let[n,i]=t.type.split("bytes");if(!i){let t=ti(e.readBytes(32));e.setPosition(r+t);let n=ti(e.readBytes(32));if(0===n)return e.setPosition(r+32),["0x",32];let i=e.readBytes(n);return e.setPosition(r+32),[e5.xv(i),32]}return[e5.xv(e.readBytes(Number.parseInt(i,10),32)),32]}(t,r,{staticPosition:a});if(r.type.startsWith("uint")||r.type.startsWith("int"))return function(e,t){let r=t.type.startsWith("int"),n=Number.parseInt(t.type.split("int")[1]||"256",10),i=e.readBytes(32);return[n>48?function(e,t={}){let{size:r}=t;void 0!==r&&e6(e,r);let n=e5.xv(e,t);return e5.Gh(n,t)}(i,{signed:r}):ti(i,{signed:r}),32]}(t,r);if("string"===r.type)return function(e,{staticPosition:t}){let r=ti(e.readBytes(32));e.setPosition(t+r);let n=ti(e.readBytes(32));if(0===n)return e.setPosition(t+32),["",32];let i=function(e,t={}){let{size:r}=t,n=e;return void 0!==r&&(e6(n,r),n=e4(n,{dir:"right"})),te.decode(n)}(ta(e.readBytes(n,32)));return e.setPosition(t+32),[i,32]}(t,{staticPosition:a});throw new tQ(r.type)}(s,r,{checksumAddress:i,staticPosition:0});o+=c,"Array"===n?u.push(a):u[r.name??t]=a}return u}(rn,r);return{authorization:function(e,t={}){return"string"==typeof e.chainId?function(e){let{address:t,chainId:r,nonce:n}=e,i=function(e){if(void 0!==e.r&&void 0!==e.s)return function(e){let t=(()=>"string"==typeof e?t3(e):e instanceof Uint8Array?t3(e5.xv(e)):"string"==typeof e.r?function(e){let t=(()=>{let t=e.v?Number(e.v):void 0,r=e.yParity?Number(e.yParity):void 0;if("number"==typeof t&&"number"!=typeof r&&(r=t8(t)),"number"!=typeof r)throw new rt({value:e.yParity});return r})();return{r:BigInt(e.r),s:BigInt(e.s),yParity:t}}(e):e.v?{r:e.r,s:e.s,yParity:t8(e.v)}:{r:e.r,s:e.s,...void 0!==e.yParity?{yParity:e.yParity}:{}})();return t6(t),t}(e)}(e);return{address:t,chainId:Number(r),nonce:BigInt(n),...i}}(e):{...e,...t.signature}}({address:i.delegation,chainId:Number(i.chainId),nonce:i.nonce,yParity:i.yParity,r:i.r,s:i.s}),signature:n,...s&&"0x"!==s?{data:s,to:a}:{}}}(t.signature);if(await (0,eA.C)(e,{address:r,blockNumber:i,blockTag:s})===(0,p.SM)(["0xef0100",l.address]))return await ry(e,{address:r,blockNumber:i,blockTag:s,hash:o,signature:d});let m={address:l.address,chainId:Number(l.chainId),nonce:Number(l.nonce),r:(0,u.eC)(l.r,{size:32}),s:(0,u.eC)(l.s,{size:32}),yParity:l.yParity};if(!await rl({address:r,authorization:m}))throw new rg;let y=await (0,v.s)(e,P.L,"readContract")({...c?{address:c}:{code:ej.xd},authorizationList:[m],abi:n.F8,blockNumber:i,blockTag:"pending",functionName:"aggregate3",args:[[...f?[{allowFailure:!0,target:h??r,callData:f}]:[],{allowFailure:!0,target:r,callData:(0,a.R)({abi:n._A,functionName:"isValidSignature",args:[o,d]})}]]}),g=y[y.length-1]?.returnData;if(g?.startsWith("0x1626ba7e"))return!0;throw new rg}async function rm(e,t){let{address:r,factory:i,factoryData:s,hash:o,signature:u,verifierAddress:c,...f}=t,d=await (async()=>!i&&!s||function(e){try{return!function(e){if(e5.tP(e,-32)!==t2)throw new t5(e)}(e),!0}catch{return!1}}(u)?u:function(e){let{data:t,signature:r,to:n}=e;return e5.zo(t_(tj("address, bytes, bytes"),[n,t,r]),t2)}({data:s,signature:u,to:i}))(),p=c?{to:c,data:(0,a.R)({abi:n.MR,functionName:"isValidSig",args:[r,o,d]}),...f}:{data:(0,rs.w)({abi:n.MR,args:[r,o,d],bytecode:ej.de}),...f},{data:h}=await (0,v.s)(e,q.R,"call")(p).catch(e=>{if(e instanceof l.cg)throw new rg;throw e});if((0,eP.XA)(h??"0x0"))return!0;throw new rg}async function ry(e,t){let{address:r,blockNumber:i,blockTag:a,hash:s,signature:o}=t;if((await (0,v.s)(e,P.L,"readContract")({address:r,abi:n._A,args:[s,o],blockNumber:i,blockTag:a,functionName:"isValidSignature"}).catch(e=>{if(e instanceof l.uq)throw new rg;throw e})).startsWith("0x1626ba7e"))return!0;throw new rg}class rg extends Error{}var rb=r(15566);async function rw(e,{address:t,message:r,factory:n,factoryData:i,signature:a,...s}){let o=(0,rb.r)(r);return(0,v.s)(e,rp,"verifyHash")({address:t,factory:n,factoryData:i,hash:o,signature:a,...s})}var rv=r(42727);async function rP(e,t){let{address:r,factory:n,factoryData:i,signature:a,message:s,primaryType:o,types:u,domain:c,...l}=t,f=(0,rv.Jv)({message:s,primaryType:o,types:u,domain:c});return(0,v.s)(e,rp,"verifyHash")({address:r,factory:n,factoryData:i,hash:f,signature:a,...l})}var rx=r(67348),rE=r(99376),rA=r(36478),rI=r(41495),rN=r(31853),rC=r(77014),r$=r(27964),rB=r(1337);let rk=/^(?:(?[a-zA-Z][a-zA-Z0-9+-.]*):\/\/)?(?[a-zA-Z0-9+-.]*(?::[0-9]{1,5})?) (?:wants you to sign in with your Ethereum account:\n)(?
0x[a-fA-F0-9]{40})\n\n(?:(?.*)\n\n)?/,rR=/(?:URI: (?.+))\n(?:Version: (?.+))\n(?:Chain ID: (?\d+))\n(?:Nonce: (?[a-zA-Z0-9]+))\n(?:Issued At: (?.+))(?:\nExpiration Time: (?.+))?(?:\nNot Before: (?.+))?(?:\nRequest ID: (?.+))?/;var rS=r(4012);async function rz(e,t){let{address:r,domain:n,message:i,nonce:a,scheme:s,signature:o,time:u=new Date,...c}=t,l=function(e){let{scheme:t,statement:r,...n}=e.match(rk)?.groups??{},{chainId:i,expirationTime:a,issuedAt:s,notBefore:o,requestId:u,...c}=e.match(rR)?.groups??{},l=e.split("Resources:")[1]?.split("\n- ").slice(1);return{...n,...c,...i?{chainId:Number(i)}:{},...a?{expirationTime:new Date(a)}:{},...s?{issuedAt:new Date(s)}:{},...o?{notBefore:new Date(o)}:{},...u?{requestId:u}:{},...l?{resources:l}:{},...t?{scheme:t}:{},...r?{statement:r}:{}}}(i);if(!l.address||!function(e){let{address:t,domain:r,message:n,nonce:i,scheme:a,time:s=new Date}=e;if(r&&n.domain!==r||i&&n.nonce!==i||a&&n.scheme!==a||n.expirationTime&&s>=n.expirationTime||n.notBefore&&s(0,q.R)(e,t),createAccessList:t=>Y(e,t),createBlockFilter:()=>X(e),createContractEventFilter:t=>eu(e,t),createEventFilter:t=>ec(e,t),createPendingTransactionFilter:()=>(0,el.W)(e),estimateContractGas:t=>ep(e,t),estimateGas:t=>(0,ed.Q)(e,t),getBalance:t=>(0,eg.s)(e,t),getBlobBaseFee:()=>eb(e),getBlock:t=>(0,ew.Q)(e,t),getBlockNumber:t=>(0,ev.z)(e,t),getBlockTransactionCount:t=>ex(e,t),getBytecode:t=>(0,eA.C)(e,t),getChainId:()=>(0,eE.L)(e),getCode:t=>(0,eA.C)(e,t),getContractEvents:t=>e$(e,t),getEip712Domain:t=>ek(e,t),getEnsAddress:t=>x(e,t),getEnsAvatar:t=>D(e,t),getEnsName:t=>j(e,t),getEnsResolver:t=>M(e,t),getEnsText:t=>_(e,t),getFeeHistory:t=>eS(e,t),estimateFeesPerGas:t=>(0,eh.X)(e,t),getFilterChanges:t=>(0,ez.K)(e,t),getFilterLogs:t=>eL(e,t),getGasPrice:()=>(0,eO.o)(e),getLogs:t=>eC(e,t),getProof:t=>eU(e,t),estimateMaxPriorityFeePerGas:t=>(0,em._)(e,t),fillTransaction:t=>(0,ey.b)(e,t),getStorageAt:t=>eT(e,t),getTransaction:t=>(0,eG.f)(e,t),getTransactionConfirmations:t=>eF(e,t),getTransactionCount:t=>(0,e_.K)(e,t),getTransactionReceipt:t=>(0,eD.a)(e,t),multicall:t=>eM(e,t),prepareTransactionRequest:t=>(0,rL.ZE)(e,t),readContract:t=>(0,P.L)(e,t),sendRawTransaction:t=>(0,rO.p)(e,t),sendRawTransactionSync:t=>(0,rU.s)(e,t),simulate:t=>eQ(e,t),simulateBlocks:t=>eQ(e,t),simulateCalls:t=>tJ(e,t),simulateContract:t=>t0(e,t),verifyHash:t=>rp(e,t),verifyMessage:t=>rw(e,t),verifySiweMessage:t=>rz(e,t),verifyTypedData:t=>rP(e,t),uninstallFilter:t=>(0,t1.W)(e,t),waitForTransactionReceipt:t=>(0,rx.e)(e,t),watchBlocks:t=>(function(e,{blockTag:t=e.experimental_blockTag??"latest",emitMissed:r=!1,emitOnBegin:n=!1,onBlock:i,onError:a,includeTransactions:s,poll:o,pollingInterval:u=e.pollingInterval}){let c,l,f,d;let p=void 0!==o?o:"webSocket"!==e.transport.type&&"ipc"!==e.transport.type&&("fallback"!==e.transport.type||"webSocket"!==e.transport.transports[0].config.type&&"ipc"!==e.transport.transports[0].config.type),h=s??!1;return p?(()=>{let s=(0,rN.P)(["watchBlocks",e.uid,t,r,n,h,u]);return(0,rA.N7)(s,{onBlock:i,onError:a},i=>(0,rI.$)(async()=>{try{let n=await (0,v.s)(e,ew.Q,"getBlock")({blockTag:t,includeTransactions:h});if(null!==n.number&&c?.number!=null){if(n.number===c.number)return;if(n.number-c.number>1&&r)for(let t=c?.number+1n;tc.number)&&(i.onBlock(n,c),c=n)}catch(e){i.onError?.(e)}},{emitOnBegin:n,interval:u}))})():(l=!0,f=!0,d=()=>l=!1,(async()=>{try{n&&(0,v.s)(e,ew.Q,"getBlock")({blockTag:t,includeTransactions:h}).then(e=>{l&&f&&(i(e,void 0),f=!1)}).catch(a);let r=(()=>{if("fallback"===e.transport.type){let t=e.transport.transports.find(e=>"webSocket"===e.config.type||"ipc"===e.config.type);return t?t.value:e.transport}return e.transport})(),{unsubscribe:s}=await r.subscribe({params:["newHeads"],async onData(t){if(!l)return;let r=await (0,v.s)(e,ew.Q,"getBlock")({blockNumber:t.result?.number,includeTransactions:h}).catch(()=>{});l&&(i(r,c),f=!1,c=r)},onError(e){a?.(e)}});d=s,l||d()}catch(e){a?.(e)}})(),()=>d())})(e,t),watchBlockNumber:t=>(0,rE.q)(e,t),watchContractEvent:t=>(function(e,t){let{abi:r,address:n,args:i,batch:a=!0,eventName:s,fromBlock:o,onError:u,onLogs:c,poll:l,pollingInterval:f=e.pollingInterval,strict:d}=t;return(void 0!==l?l:"bigint"==typeof o||"webSocket"!==e.transport.type&&"ipc"!==e.transport.type&&("fallback"!==e.transport.type||"webSocket"!==e.transport.transports[0].config.type&&"ipc"!==e.transport.transports[0].config.type))?(()=>{let t=d??!1,l=(0,rN.P)(["watchContractEvent",n,i,a,e.uid,s,f,t,o]);return(0,rA.N7)(l,{onLogs:c,onError:u},u=>{let c,l;void 0!==o&&(c=o-1n);let d=!1,p=(0,rI.$)(async()=>{if(!d){try{l=await (0,v.s)(e,eu,"createContractEventFilter")({abi:r,address:n,args:i,eventName:s,strict:t,fromBlock:o})}catch{}d=!0;return}try{let o;if(l)o=await (0,v.s)(e,ez.K,"getFilterChanges")({filter:l});else{let a=await (0,v.s)(e,ev.z,"getBlockNumber")({});o=c&&c{l&&await (0,v.s)(e,t1.W,"uninstallFilter")({filter:l}),p()}})})():(()=>{let t=(0,rN.P)(["watchContractEvent",n,i,a,e.uid,s,f,d??!1]),o=!0,l=()=>o=!1;return(0,rA.N7)(t,{onLogs:c,onError:u},t=>((async()=>{try{let a=(()=>{if("fallback"===e.transport.type){let t=e.transport.transports.find(e=>"webSocket"===e.config.type||"ipc"===e.config.type);return t?t.value:e.transport}return e.transport})(),u=s?es({abi:r,eventName:s,args:i}):[],{unsubscribe:c}=await a.subscribe({params:["logs",{address:n,topics:u}],onData(e){if(!o)return;let n=e.result;try{let{eventName:e,args:i}=(0,r$.F)({abi:r,data:n.data,topics:n.topics,strict:d}),a=(0,eN.U)(n,{args:i,eventName:e});t.onLogs([a])}catch(a){let e,r;if(a instanceof J.SM||a instanceof J.Gy){if(d)return;e=a.abiItem.name,r=a.abiItem.inputs?.some(e=>!("name"in e&&e.name))}let i=(0,eN.U)(n,{args:r?[]:{},eventName:e});t.onLogs([i])}},onError(e){t.onError?.(e)}});l=c,o||l()}catch(e){u?.(e)}})(),()=>l()))})()})(e,t),watchEvent:t=>(function(e,{address:t,args:r,batch:n=!0,event:i,events:a,fromBlock:s,onError:o,onLogs:u,poll:c,pollingInterval:l=e.pollingInterval,strict:f}){let d,p;let h=void 0!==c?c:"bigint"==typeof s||"webSocket"!==e.transport.type&&"ipc"!==e.transport.type&&("fallback"!==e.transport.type||"webSocket"!==e.transport.transports[0].config.type&&"ipc"!==e.transport.transports[0].config.type),m=f??!1;return h?(()=>{let c=(0,rN.P)(["watchEvent",t,r,n,e.uid,i,l,s]);return(0,rA.N7)(c,{onLogs:u,onError:o},o=>{let u,c;void 0!==s&&(u=s-1n);let f=!1,d=(0,rI.$)(async()=>{if(!f){try{c=await (0,v.s)(e,ec,"createEventFilter")({address:t,args:r,event:i,events:a,strict:m,fromBlock:s})}catch{}f=!0;return}try{let s;if(c)s=await (0,v.s)(e,ez.K,"getFilterChanges")({filter:c});else{let n=await (0,v.s)(e,ev.z,"getBlockNumber")({});s=u&&u!==n?await (0,v.s)(e,eC,"getLogs")({address:t,args:r,event:i,events:a,fromBlock:u+1n,toBlock:n}):[],u=n}if(0===s.length)return;if(n)o.onLogs(s);else for(let e of s)o.onLogs([e])}catch(e){c&&e instanceof rC.yR&&(f=!1),o.onError?.(e)}},{emitOnBegin:!0,interval:l});return async()=>{c&&await (0,v.s)(e,t1.W,"uninstallFilter")({filter:c}),d()}})})():(d=!0,p=()=>d=!1,(async()=>{try{let n=(()=>{if("fallback"===e.transport.type){let t=e.transport.transports.find(e=>"webSocket"===e.config.type||"ipc"===e.config.type);return t?t.value:e.transport}return e.transport})(),s=a??(i?[i]:void 0),c=[];s&&(c=[s.flatMap(e=>es({abi:[e],eventName:e.name,args:r}))],i&&(c=c[0]));let{unsubscribe:l}=await n.subscribe({params:["logs",{address:t,topics:c}],onData(e){if(!d)return;let t=e.result;try{let{eventName:e,args:r}=(0,r$.F)({abi:s??[],data:t.data,topics:t.topics,strict:m}),n=(0,eN.U)(t,{args:r,eventName:e});u([n])}catch(i){let e,r;if(i instanceof J.SM||i instanceof J.Gy){if(f)return;e=i.abiItem.name,r=i.abiItem.inputs?.some(e=>!("name"in e&&e.name))}let n=(0,eN.U)(t,{args:r?[]:{},eventName:e});u([n])}},onError(e){o?.(e)}});p=l,d||p()}catch(e){o?.(e)}})(),()=>p())})(e,t),watchPendingTransactions:t=>(0,rB.O)(e,t)}}},87721:function(e,t,r){r.d(t,{p:function(){return u}});var n=r(65531),i=r(69921),a=r(10464),s=r(2742),o=r(7275);function u(e){let{abi:t,data:r}=e,u=(0,i.tP)(r,0,4),c=t.find(e=>"function"===e.type&&u===(0,a.C)((0,o.t)(e)));if(!c)throw new n.eF(u,{docsPath:"/docs/contract/decodeFunctionData"});return{functionName:c.name,args:"inputs"in c&&c.inputs&&c.inputs.length>0?(0,s.r)(c.inputs,(0,i.tP)(r,4)):void 0}}},7143:function(e,t,r){r.d(t,{w:function(){return y},M:function(){return m}});var n=r(98158),i=r(55246),a=r(87721),s=r(65531),o=r(89256),u=r(10464),c=r(30056),l=r(7275),f=r(64043);let d="/docs/contract/encodeErrorResult";function p(e){let{abi:t,errorName:r,args:n}=e,i=t[0];if(r){let e=(0,f.mE)({abi:t,args:n,name:r});if(!e)throw new s.MS(r,{docsPath:d});i=e}if("error"!==i.type)throw new s.MS(void 0,{docsPath:d});let a=(0,l.t)(i),p=(0,u.C)(a),h="0x";if(n&&n.length>0){if(!i.inputs)throw new s.Zh(i.name,{docsPath:d});h=(0,c.E)(i.inputs,n)}return(0,o.SM)([p,h])}let h="/docs/contract/encodeFunctionResult",m="x-batch-gateway:true";async function y(e){let{data:t,ccipRequest:r}=e,{args:[o]}=(0,a.p)({abi:n.Yi,data:t}),u=[],l=[];return await Promise.all(o.map(async(e,t)=>{try{l[t]=e.urls.includes(m)?await y({data:e.data,ccipRequest:r}):await r(e),u[t]=!1}catch(e){u[t]=!0,l[t]="HttpRequestError"===e.name&&e.status?p({abi:n.Yi,errorName:"HttpError",args:[e.status,e.shortMessage]}):p({abi:[i.Up],errorName:"Error",args:["shortMessage"in e?e.shortMessage:e.message]})}})),function(e){let{abi:t,functionName:r,result:n}=e,i=t[0];if(r){let e=(0,f.mE)({abi:t,name:r});if(!e)throw new s.xL(r,{docsPath:h});i=e}if("function"!==i.type)throw new s.xL(void 0,{docsPath:h});if(!i.outputs)throw new s.MX(i.name,{docsPath:h});let a=(()=>{if(0===i.outputs.length)return[];if(1===i.outputs.length)return[n];if(Array.isArray(n))return n;throw new s.hn(n)})();return(0,c.E)(i.outputs,a)}({abi:n.Yi,functionName:"query",result:[u,l]})}},15566:function(e,t,r){r.d(t,{r:function(){return o}});var n=r(13169),i=r(89256),a=r(20556),s=r(59455);function o(e,t){return(0,n.w)(function(e){let t="string"==typeof e?(0,s.$G)(e):"string"==typeof e.raw?e.raw:(0,s.ci)(e.raw),r=(0,s.$G)(`\x19Ethereum Signed Message: +${(0,a.d)(t)}`);return(0,i.zo)([r,t])}(e),t)}},42727:function(e,t,r){r.d(t,{Jv:function(){return u}});var n=r(30056),i=r(89256),a=r(59455),s=r(13169),o=r(99493);function u(e){let{domain:t={},message:r,primaryType:n}=e,a={EIP712Domain:(0,o.cj)({domain:t}),...e.types};(0,o.iC)({domain:t,message:r,primaryType:n,types:a});let u=["0x1901"];return t&&u.push(function({domain:e,types:t}){return c({data:e,primaryType:"EIP712Domain",types:t})}({domain:t,types:a})),"EIP712Domain"!==n&&u.push(c({data:r,primaryType:n,types:a})),(0,s.w)((0,i.zo)(u))}function c({data:e,primaryType:t,types:r}){let i=function e({data:t,primaryType:r,types:i}){let o=[{type:"bytes32"}],u=[function({primaryType:e,types:t}){let r=(0,a.NC)(function({primaryType:e,types:t}){let r="",n=function e({primaryType:t,types:r},n=new Set){let i=t.match(/^\w*/u),a=i?.[0];if(n.has(a)||void 0===r[a])return n;for(let t of(n.add(a),r[a]))e({primaryType:t.type,types:r},n);return n}({primaryType:e,types:t});for(let i of(n.delete(e),[e,...Array.from(n).sort()]))r+=`${i}(${t[i].map(({name:e,type:t})=>`${t} ${e}`).join(",")})`;return r}({primaryType:e,types:t}));return(0,s.w)(r)}({primaryType:r,types:i})];for(let c of i[r]){let[r,l]=function t({types:r,name:i,type:o,value:u}){if(void 0!==r[o])return[{type:"bytes32"},(0,s.w)(e({data:u,primaryType:o,types:r}))];if("bytes"===o)return[{type:"bytes32"},(0,s.w)(u)];if("string"===o)return[{type:"bytes32"},(0,s.w)((0,a.NC)(u))];if(o.lastIndexOf("]")===o.length-1){let e=o.slice(0,o.lastIndexOf("[")),a=u.map(n=>t({name:i,type:e,types:r,value:n}));return[{type:"bytes32"},(0,s.w)((0,n.E)(a.map(([e])=>e),a.map(([,e])=>e)))]}return[{type:o},u]}({types:i,name:c.name,type:c.type,value:t[c.name]});o.push(r),u.push(l)}return(0,n.E)(o,u)}({data:e,primaryType:t,types:r});return(0,s.w)(i)}},99493:function(e,t,r){r.d(t,{cj:function(){return y},H6:function(){return h},iC:function(){return m}});var n=r(65531),i=r(10052),a=r(31853),s=r(81544);class o extends s.G{constructor({domain:e}){super(`Invalid domain "${(0,a.P)(e)}".`,{metaMessages:["Must be a valid EIP-712 domain."]})}}class u extends s.G{constructor({primaryType:e,types:t}){super(`Invalid primary type \`${e}\` must be one of \`${JSON.stringify(Object.keys(t))}\`.`,{docsPath:"/api/glossary/Errors#typeddatainvalidprimarytypeerror",metaMessages:["Check that the primary type is a key in `types`."]})}}class c extends s.G{constructor({type:e}){super(`Struct type "${e}" is invalid.`,{metaMessages:["Struct type must not be a Solidity type."],name:"InvalidStructTypeError"})}}var l=r(4012),f=r(20556),d=r(59455),p=r(23251);function h(e){let{domain:t,message:r,primaryType:n,types:i}=e,s=(e,t)=>{let r={...t};for(let t of e){let{name:e,type:n}=t;"address"===n&&(r[e]=r[e].toLowerCase())}return r},o=i.EIP712Domain&&t?s(i.EIP712Domain,t):{},u=(()=>{if("EIP712Domain"!==n)return s(i[n],r)})();return(0,a.P)({domain:o,message:u,primaryType:n,types:i})}function m(e){let{domain:t,message:r,primaryType:a,types:s}=e,h=(e,t)=>{for(let r of e){let{name:e,type:a}=r,o=t[e],u=a.match(p.lh);if(u&&("number"==typeof o||"bigint"==typeof o)){let[e,t,r]=u;(0,d.eC)(o,{signed:"int"===t,size:Number.parseInt(r,10)/8})}if("address"===a&&"string"==typeof o&&!(0,l.U)(o))throw new i.b({address:o});let m=a.match(p.eL);if(m){let[e,t]=m;if(t&&(0,f.d)(o)!==Number.parseInt(t,10))throw new n.KY({expectedSize:Number.parseInt(t,10),givenSize:(0,f.d)(o)})}let y=s[a];y&&(function(e){if("address"===e||"bool"===e||"string"===e||e.startsWith("bytes")||e.startsWith("uint")||e.startsWith("int"))throw new c({type:e})}(a),h(y,o))}};if(s.EIP712Domain&&t){if("object"!=typeof t)throw new o({domain:t});h(s.EIP712Domain,t)}if("EIP712Domain"!==a){if(s[a])h(s[a],r);else throw new u({primaryType:a,types:s})}}function y({domain:e}){return["string"==typeof e?.name&&{name:"name",type:"string"},e?.version&&{name:"version",type:"string"},("number"==typeof e?.chainId||"bigint"==typeof e?.chainId)&&{name:"chainId",type:"uint256"},e?.verifyingContract&&{name:"verifyingContract",type:"address"},e?.salt&&{name:"salt",type:"bytes32"}].filter(Boolean)}}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/8389-28bc469300c20f51.js b/frontend/.next/static/chunks/8389-28bc469300c20f51.js new file mode 100644 index 0000000..2696d34 --- /dev/null +++ b/frontend/.next/static/chunks/8389-28bc469300c20f51.js @@ -0,0 +1,7071 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8389],{12238:function(e,t,r){"use strict";function i(){return(null===r.g||void 0===r.g?void 0:r.g.crypto)||(null===r.g||void 0===r.g?void 0:r.g.msCrypto)||{}}function n(){let e=i();return e.subtle||e.webkitSubtle}Object.defineProperty(t,"__esModule",{value:!0}),t.isBrowserCryptoAvailable=t.getSubtleCrypto=t.getBrowerCrypto=void 0,t.getBrowerCrypto=i,t.getSubtleCrypto=n,t.isBrowserCryptoAvailable=function(){return!!i()&&!!n()}},33531:function(e,t,r){"use strict";var i=r(40257);function n(){return"undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product}function o(){return void 0!==i&&void 0!==i.versions&&void 0!==i.versions.node}Object.defineProperty(t,"__esModule",{value:!0}),t.isBrowser=t.isNode=t.isReactNative=void 0,t.isReactNative=n,t.isNode=o,t.isBrowser=function(){return!n()&&!o()}},13303:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let i=r(33509);i.__exportStar(r(12238),t),i.__exportStar(r(33531),t)},16854:function(e){"use strict";e.exports=function(){throw Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}},15133:function(e,t,r){"use strict";r.d(t,{Ep:function(){return U},Fd:function(){return D},Rt:function(){return L},jI:function(){return $}});var i=r(97435),n=r.n(i),o=r(80577);let s={level:"info"},a="custom_context";var l=Object.defineProperty,c=(e,t,r)=>t in e?l(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,d=(e,t,r)=>c(e,"symbol"!=typeof t?t+"":t,r);class u{constructor(e){d(this,"nodeValue"),d(this,"sizeInBytes"),d(this,"next"),this.nodeValue=e,this.sizeInBytes=new TextEncoder().encode(this.nodeValue).length,this.next=null}get value(){return this.nodeValue}get size(){return this.sizeInBytes}}class h{constructor(e){d(this,"lengthInNodes"),d(this,"sizeInBytes"),d(this,"head"),d(this,"tail"),d(this,"maxSizeInBytes"),this.head=null,this.tail=null,this.lengthInNodes=0,this.maxSizeInBytes=e,this.sizeInBytes=0}append(e){let t=new u(e);if(t.size>this.maxSizeInBytes)throw Error(`[LinkedList] Value too big to insert into list: ${e} with size ${t.size}`);for(;this.size+t.size>this.maxSizeInBytes;)this.shift();this.head?this.tail&&(this.tail.next=t):this.head=t,this.tail=t,this.lengthInNodes++,this.sizeInBytes+=t.size}shift(){if(!this.head)return;let e=this.head;this.head=this.head.next,this.head||(this.tail=null),this.lengthInNodes--,this.sizeInBytes-=e.size}toArray(){let e=[],t=this.head;for(;null!==t;)e.push(t.value),t=t.next;return e}get length(){return this.lengthInNodes}get size(){return this.sizeInBytes}toOrderedArray(){return Array.from(this)}[Symbol.iterator](){let e=this.head;return{next:()=>{if(!e)return{done:!0,value:null};let t=e.value;return e=e.next,{done:!1,value:t}}}}}var p=Object.defineProperty,f=(e,t,r)=>t in e?p(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,g=(e,t,r)=>f(e,"symbol"!=typeof t?t+"":t,r);class m{constructor(e,t=1024e3){g(this,"logs"),g(this,"level"),g(this,"levelValue"),g(this,"MAX_LOG_SIZE_IN_BYTES"),this.level=e??"error",this.levelValue=i.levels.values[this.level],this.MAX_LOG_SIZE_IN_BYTES=t,this.logs=new h(this.MAX_LOG_SIZE_IN_BYTES)}forwardToConsole(e,t){t===i.levels.values.error?console.error(e):t===i.levels.values.warn?console.warn(e):t===i.levels.values.debug?console.debug(e):t===i.levels.values.trace?console.trace(e):console.log(e)}appendToLogs(e){this.logs.append((0,o.u)({timestamp:new Date().toISOString(),log:e}));let t="string"==typeof e?JSON.parse(e).level:e.level;t>=this.levelValue&&this.forwardToConsole(e,t)}getLogs(){return this.logs}clearLogs(){this.logs=new h(this.MAX_LOG_SIZE_IN_BYTES)}getLogArray(){return Array.from(this.logs)}logsToBlob(e){let t=this.getLogArray();return t.push((0,o.u)({extraMetadata:e})),new Blob(t,{type:"application/json"})}}var y=Object.defineProperty,w=(e,t,r)=>t in e?y(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,b=(e,t,r)=>w(e,"symbol"!=typeof t?t+"":t,r);class v{constructor(e,t=1024e3){b(this,"baseChunkLogger"),this.baseChunkLogger=new m(e,t)}write(e){this.baseChunkLogger.appendToLogs(e)}getLogs(){return this.baseChunkLogger.getLogs()}clearLogs(){this.baseChunkLogger.clearLogs()}getLogArray(){return this.baseChunkLogger.getLogArray()}logsToBlob(e){return this.baseChunkLogger.logsToBlob(e)}downloadLogsBlobInBrowser(e){let t=URL.createObjectURL(this.logsToBlob(e)),r=document.createElement("a");r.href=t,r.download=`walletconnect-logs-${new Date().toISOString()}.txt`,document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(t)}}var C=Object.defineProperty,E=(e,t,r)=>t in e?C(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,x=(e,t,r)=>E(e,"symbol"!=typeof t?t+"":t,r);class _{constructor(e,t=1024e3){x(this,"baseChunkLogger"),this.baseChunkLogger=new m(e,t)}write(e){this.baseChunkLogger.appendToLogs(e)}getLogs(){return this.baseChunkLogger.getLogs()}clearLogs(){this.baseChunkLogger.clearLogs()}getLogArray(){return this.baseChunkLogger.getLogArray()}logsToBlob(e){return this.baseChunkLogger.logsToBlob(e)}}var A=Object.defineProperty,S=Object.defineProperties,I=Object.getOwnPropertyDescriptors,N=Object.getOwnPropertySymbols,k=Object.prototype.hasOwnProperty,R=Object.prototype.propertyIsEnumerable,O=(e,t,r)=>t in e?A(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,T=(e,t)=>{for(var r in t||(t={}))k.call(t,r)&&O(e,r,t[r]);if(N)for(var r of N(t))R.call(t,r)&&O(e,r,t[r]);return e},P=(e,t)=>S(e,I(t));function $(e){return P(T({},e),{level:e?.level||s.level})}function D(e,t=a){return e[t]||""}function U(e,t,r=a){let i=function(e,t,r=a){let i=D(e,r);return i.trim()?`${i}/${t}`:t}(e,t,r);return function(e,t,r=a){return e[r]=t,e}(e.child({context:i}),i,r)}function L(e){return"u">typeof e.loggerOverride&&"string"!=typeof e.loggerOverride?{logger:e.loggerOverride,chunkLoggerController:null}:"u">typeof window?function(e){var t,r;let i=new v(null==(t=e.opts)?void 0:t.level,e.maxSizeInBytes);return{logger:n()(P(T({},e.opts),{level:"trace",browser:P(T({},null==(r=e.opts)?void 0:r.browser),{write:e=>i.write(e)})})),chunkLoggerController:i}}(e):function(e){var t;let r=new _(null==(t=e.opts)?void 0:t.level,e.maxSizeInBytes);return{logger:n()(P(T({},e.opts),{level:"trace"}),r),chunkLoggerController:r}}(e)}},80577:function(e,t,r){"use strict";r.d(t,{D:function(){return o},u:function(){return s}});let i=e=>JSON.stringify(e,(e,t)=>"bigint"==typeof t?t.toString()+"n":t),n=e=>JSON.parse(e.replace(/([\[:])?(\d{17,}|(?:[9](?:[1-9]07199254740991|0[1-9]7199254740991|00[8-9]199254740991|007[2-9]99254740991|007199[3-9]54740991|0071992[6-9]4740991|00719925[5-9]740991|007199254[8-9]40991|0071992547[5-9]0991|00719925474[1-9]991|00719925474099[2-9])))([,\}\]])/g,'$1"$2n"$3'),(e,t)=>"string"==typeof t&&t.match(/^\d+n$/)?BigInt(t.substring(0,t.length-1)):t);function o(e){if("string"!=typeof e)throw Error(`Cannot safe json parse value of type ${typeof e}`);try{return n(e)}catch(t){return e}}function s(e){return"string"==typeof e?e:i(e)||""}},70213:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let i=r(33509);i.__exportStar(r(12658),t),i.__exportStar(r(75127),t)},12658:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ONE_THOUSAND=t.ONE_HUNDRED=void 0,t.ONE_HUNDRED=100,t.ONE_THOUSAND=1e3},75127:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ONE_YEAR=t.FOUR_WEEKS=t.THREE_WEEKS=t.TWO_WEEKS=t.ONE_WEEK=t.THIRTY_DAYS=t.SEVEN_DAYS=t.FIVE_DAYS=t.THREE_DAYS=t.ONE_DAY=t.TWENTY_FOUR_HOURS=t.TWELVE_HOURS=t.SIX_HOURS=t.THREE_HOURS=t.ONE_HOUR=t.SIXTY_MINUTES=t.THIRTY_MINUTES=t.TEN_MINUTES=t.FIVE_MINUTES=t.ONE_MINUTE=t.SIXTY_SECONDS=t.THIRTY_SECONDS=t.TEN_SECONDS=t.FIVE_SECONDS=t.ONE_SECOND=void 0,t.ONE_SECOND=1,t.FIVE_SECONDS=5,t.TEN_SECONDS=10,t.THIRTY_SECONDS=30,t.SIXTY_SECONDS=60,t.ONE_MINUTE=t.SIXTY_SECONDS,t.FIVE_MINUTES=5*t.ONE_MINUTE,t.TEN_MINUTES=10*t.ONE_MINUTE,t.THIRTY_MINUTES=30*t.ONE_MINUTE,t.SIXTY_MINUTES=60*t.ONE_MINUTE,t.ONE_HOUR=t.SIXTY_MINUTES,t.THREE_HOURS=3*t.ONE_HOUR,t.SIX_HOURS=6*t.ONE_HOUR,t.TWELVE_HOURS=12*t.ONE_HOUR,t.TWENTY_FOUR_HOURS=24*t.ONE_HOUR,t.ONE_DAY=t.TWENTY_FOUR_HOURS,t.THREE_DAYS=3*t.ONE_DAY,t.FIVE_DAYS=5*t.ONE_DAY,t.SEVEN_DAYS=7*t.ONE_DAY,t.THIRTY_DAYS=30*t.ONE_DAY,t.ONE_WEEK=t.SEVEN_DAYS,t.TWO_WEEKS=2*t.ONE_WEEK,t.THREE_WEEKS=3*t.ONE_WEEK,t.FOUR_WEEKS=4*t.ONE_WEEK,t.ONE_YEAR=365*t.ONE_DAY},40537:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let i=r(33509);i.__exportStar(r(78627),t),i.__exportStar(r(59854),t),i.__exportStar(r(3205),t),i.__exportStar(r(70213),t)},3205:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(33509).__exportStar(r(71146),t)},71146:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IWatch=void 0;class r{}t.IWatch=r},68353:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromMiliseconds=t.toMiliseconds=void 0;let i=r(70213);t.toMiliseconds=function(e){return e*i.ONE_THOUSAND},t.fromMiliseconds=function(e){return Math.floor(e/i.ONE_THOUSAND)}},86029:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.delay=void 0,t.delay=function(e){return new Promise(t=>{setTimeout(()=>{t(!0)},e)})}},78627:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let i=r(33509);i.__exportStar(r(86029),t),i.__exportStar(r(68353),t)},59854:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Watch=void 0;class r{constructor(){this.timestamps=new Map}start(e){if(this.timestamps.has(e))throw Error(`Watch already started for label: ${e}`);this.timestamps.set(e,{started:Date.now()})}stop(e){let t=this.get(e);if(void 0!==t.elapsed)throw Error(`Watch already stopped for label: ${e}`);let r=Date.now()-t.started;this.timestamps.set(e,{started:t.started,elapsed:r})}get(e){let t=this.timestamps.get(e);if(void 0===t)throw Error(`No timestamp found for label: ${e}`);return t}elapsed(e){let t=this.get(e);return t.elapsed||Date.now()-t.started}}t.Watch=r,t.default=r},76454:function(e,t){"use strict";function r(e){let t;return"undefined"!=typeof window&&void 0!==window[e]&&(t=window[e]),t}function i(e){let t=r(e);if(!t)throw Error(`${e} is not defined in Window`);return t}Object.defineProperty(t,"__esModule",{value:!0}),t.getLocalStorage=t.getLocalStorageOrThrow=t.getCrypto=t.getCryptoOrThrow=t.getLocation=t.getLocationOrThrow=t.getNavigator=t.getNavigatorOrThrow=t.getDocument=t.getDocumentOrThrow=t.getFromWindowOrThrow=t.getFromWindow=void 0,t.getFromWindow=r,t.getFromWindowOrThrow=i,t.getDocumentOrThrow=function(){return i("document")},t.getDocument=function(){return r("document")},t.getNavigatorOrThrow=function(){return i("navigator")},t.getNavigator=function(){return r("navigator")},t.getLocationOrThrow=function(){return i("location")},t.getLocation=function(){return r("location")},t.getCryptoOrThrow=function(){return i("crypto")},t.getCrypto=function(){return r("crypto")},t.getLocalStorageOrThrow=function(){return i("localStorage")},t.getLocalStorage=function(){return r("localStorage")}},3897:function(e,t,r){"use strict";t.D=void 0;let i=r(76454);t.D=function(){let e,t,r;try{e=i.getDocumentOrThrow(),t=i.getLocationOrThrow()}catch(e){return null}function n(...t){let r=e.getElementsByTagName("meta");for(let e=0;ei.getAttribute(e)).filter(e=>!!e&&t.includes(e));if(n.length&&n){let e=i.getAttribute("content");if(e)return e}}return""}let o=((r=n("name","og:site_name","og:title","twitter:title"))||(r=e.title),r),s=n("description","og:description","twitter:description","keywords");return{description:s,url:t.origin,icons:function(){let r=e.getElementsByTagName("link"),i=[];for(let e=0;e-1){let e=n.getAttribute("href");if(e){if(-1===e.toLowerCase().indexOf("https:")&&-1===e.toLowerCase().indexOf("http:")&&0!==e.indexOf("//")){let r=t.protocol+"//"+t.host;if(0===e.indexOf("/"))r+=e;else{let i=t.pathname.split("/");i.pop(),r+=i.join("/")+"/"+e}i.push(r)}else if(0===e.indexOf("//")){let r=t.protocol+e;i.push(r)}else i.push(e)}}}return i}(),name:o}}},9440:function(e,t,r){let i=r(25003);function n(e,t,r){let i=e[t]+e[r],n=e[t+1]+e[r+1];i>=4294967296&&n++,e[t]=i,e[t+1]=n}function o(e,t,r,i){let n=e[t]+r;r<0&&(n+=4294967296);let o=e[t+1]+i;n>=4294967296&&o++,e[t]=n,e[t+1]=o}function s(e,t){return e[t]^e[t+1]<<8^e[t+2]<<16^e[t+3]<<24}function a(e,t,r,i,s,a){let l=u[s],c=u[s+1],h=u[a],p=u[a+1];n(d,e,t),o(d,e,l,c);let f=d[i]^d[e],g=d[i+1]^d[e+1];d[i]=g,d[i+1]=f,n(d,r,i),f=d[t]^d[r],g=d[t+1]^d[r+1],d[t]=f>>>24^g<<8,d[t+1]=g>>>24^f<<8,n(d,e,t),o(d,e,h,p),f=d[i]^d[e],g=d[i+1]^d[e+1],d[i]=f>>>16^g<<16,d[i+1]=g>>>16^f<<16,n(d,r,i),f=d[t]^d[r],g=d[t+1]^d[r+1],d[t]=g>>>31^f<<1,d[t+1]=f>>>31^g<<1}let l=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),c=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3].map(function(e){return 2*e})),d=new Uint32Array(32),u=new Uint32Array(32);function h(e,t){let r=0;for(r=0;r<16;r++)d[r]=e.h[r],d[r+16]=l[r];for(d[24]=d[24]^e.t,d[25]=d[25]^e.t/4294967296,t&&(d[28]=~d[28],d[29]=~d[29]),r=0;r<32;r++)u[r]=s(e.b,4*r);for(r=0;r<12;r++)a(0,8,16,24,c[16*r+0],c[16*r+1]),a(2,10,18,26,c[16*r+2],c[16*r+3]),a(4,12,20,28,c[16*r+4],c[16*r+5]),a(6,14,22,30,c[16*r+6],c[16*r+7]),a(0,10,20,30,c[16*r+8],c[16*r+9]),a(2,12,22,24,c[16*r+10],c[16*r+11]),a(4,14,16,26,c[16*r+12],c[16*r+13]),a(6,8,18,28,c[16*r+14],c[16*r+15]);for(r=0;r<16;r++)e.h[r]=e.h[r]^d[r]^d[r+16]}let p=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);function f(e,t,r,i){if(0===e||e>64)throw Error("Illegal output length, expected 0 < length <= 64");if(t&&t.length>64)throw Error("Illegal key, expected Uint8Array with 0 < length <= 64");if(r&&16!==r.length)throw Error("Illegal salt, expected Uint8Array with length is 16");if(i&&16!==i.length)throw Error("Illegal personal, expected Uint8Array with length is 16");let n={b:new Uint8Array(128),h:new Uint32Array(16),t:0,c:0,outlen:e};p.fill(0),p[0]=e,t&&(p[1]=t.length),p[2]=1,p[3]=1,r&&p.set(r,32),i&&p.set(i,48);for(let e=0;e<16;e++)n.h[e]=l[e]^s(p,4*e);return t&&(g(n,t),n.c=128),n}function g(e,t){for(let r=0;r>2]>>8*(3&r);return t}function y(e,t,r,n,o){r=r||64,e=i.normalizeInput(e),n&&(n=i.normalizeInput(n)),o&&(o=i.normalizeInput(o));let s=f(r,t,n,o);return g(s,e),m(s)}e.exports={blake2b:y,blake2bHex:function(e,t,r,n,o){let s=y(e,t,r,n,o);return i.toHex(s)},blake2bInit:f,blake2bUpdate:g,blake2bFinal:m}},55437:function(e,t,r){let i=r(25003);function n(e,t,r,i,n,s){l[e]=l[e]+l[t]+n,l[i]=o(l[i]^l[e],16),l[r]=l[r]+l[i],l[t]=o(l[t]^l[r],12),l[e]=l[e]+l[t]+s,l[i]=o(l[i]^l[e],8),l[r]=l[r]+l[i],l[t]=o(l[t]^l[r],7)}function o(e,t){return e>>>t^e<<32-t}let s=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),a=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0]),l=new Uint32Array(16),c=new Uint32Array(16);function d(e,t){let r=0;for(r=0;r<8;r++)l[r]=e.h[r],l[r+8]=s[r];for(l[12]^=e.t,l[13]^=e.t/4294967296,t&&(l[14]=~l[14]),r=0;r<16;r++){var i,o;c[r]=(i=e.b)[o=4*r]^i[o+1]<<8^i[o+2]<<16^i[o+3]<<24}for(r=0;r<10;r++)n(0,4,8,12,c[a[16*r+0]],c[a[16*r+1]]),n(1,5,9,13,c[a[16*r+2]],c[a[16*r+3]]),n(2,6,10,14,c[a[16*r+4]],c[a[16*r+5]]),n(3,7,11,15,c[a[16*r+6]],c[a[16*r+7]]),n(0,5,10,15,c[a[16*r+8]],c[a[16*r+9]]),n(1,6,11,12,c[a[16*r+10]],c[a[16*r+11]]),n(2,7,8,13,c[a[16*r+12]],c[a[16*r+13]]),n(3,4,9,14,c[a[16*r+14]],c[a[16*r+15]]);for(r=0;r<8;r++)e.h[r]^=l[r]^l[r+8]}function u(e,t){if(!(e>0&&e<=32))throw Error("Incorrect output length, should be in [1, 32]");let r=t?t.length:0;if(t&&!(r>0&&r<=32))throw Error("Incorrect key length, should be in [1, 32]");let i={h:new Uint32Array(s),b:new Uint8Array(64),c:0,t:0,outlen:e};return i.h[0]^=16842752^r<<8^e,r>0&&(h(i,t),i.c=64),i}function h(e,t){for(let r=0;r>2]>>8*(3&r)&255;return t}function f(e,t,r){r=r||32,e=i.normalizeInput(e);let n=u(r,t);return h(n,e),p(n)}e.exports={blake2s:f,blake2sHex:function(e,t,r){let n=f(e,t,r);return i.toHex(n)},blake2sInit:u,blake2sUpdate:h,blake2sFinal:p}},84041:function(e,t,r){let i=r(9440),n=r(55437);e.exports={blake2b:i.blake2b,blake2bHex:i.blake2bHex,blake2bInit:i.blake2bInit,blake2bUpdate:i.blake2bUpdate,blake2bFinal:i.blake2bFinal,blake2s:n.blake2s,blake2sHex:n.blake2sHex,blake2sInit:n.blake2sInit,blake2sUpdate:n.blake2sUpdate,blake2sFinal:n.blake2sFinal}},25003:function(e){function t(e){return(4294967296+e).toString(16).substring(1)}e.exports={normalizeInput:function(e){let t;if(e instanceof Uint8Array)t=e;else if("string"==typeof e)t=new TextEncoder().encode(e);else throw Error("Input must be an string, Buffer or Uint8Array");return t},toHex:function(e){return Array.prototype.map.call(e,function(e){return(e<16?"0":"")+e.toString(16)}).join("")},debugPrint:function(e,r,i){let n="\n"+e+" = ";for(let o=0;o-1};function a(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function l(e){return"string"!=typeof e&&(e=String(e)),e}function c(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return i.iterable&&(t[Symbol.iterator]=function(){return t}),t}function d(e){this.map={},e instanceof d?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){if(2!=e.length)throw TypeError("Headers constructor: expected name/value pair to be length 2, found"+e.length);this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function u(e){if(!e._noBody){if(e.bodyUsed)return Promise.reject(TypeError("Already read"));e.bodyUsed=!0}}function h(e){return new Promise(function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}})}function p(e){var t=new FileReader,r=h(t);return t.readAsArrayBuffer(e),r}function f(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function g(){return this.bodyUsed=!1,this._initBody=function(e){if(this.bodyUsed=this.bodyUsed,this._bodyInit=e,e){if("string"==typeof e)this._bodyText=e;else if(i.blob&&Blob.prototype.isPrototypeOf(e))this._bodyBlob=e;else if(i.formData&&FormData.prototype.isPrototypeOf(e))this._bodyFormData=e;else if(i.searchParams&&URLSearchParams.prototype.isPrototypeOf(e))this._bodyText=e.toString();else{var t;i.arrayBuffer&&i.blob&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=f(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):i.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(e)||s(e))?this._bodyArrayBuffer=f(e):this._bodyText=e=Object.prototype.toString.call(e)}}else this._noBody=!0,this._bodyText="";!this.headers.get("content-type")&&("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):i.searchParams&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i.blob&&(this.blob=function(){var e=u(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(!this._bodyFormData)return Promise.resolve(new Blob([this._bodyText]));throw Error("could not read FormData body as blob")}),this.arrayBuffer=function(){if(this._bodyArrayBuffer)return u(this)||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer));if(i.blob)return this.blob().then(p);throw Error("could not read as ArrayBuffer")},this.text=function(){var e,t,r,i,n,o=u(this);if(o)return o;if(this._bodyBlob)return e=this._bodyBlob,r=h(t=new FileReader),n=(i=/charset=([A-Za-z0-9_-]+)/.exec(e.type))?i[1]:"utf-8",t.readAsText(e,n),r;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=Array(t.length),i=0;i-1?n:i),this.mode=r.mode||this.mode||null,this.signal=r.signal||this.signal||function(){if("AbortController"in t)return new AbortController().signal}(),this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&o)throw TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(o),("GET"===this.method||"HEAD"===this.method)&&("no-store"===r.cache||"no-cache"===r.cache)){var s=/([?&])_=[^&]*/;s.test(this.url)?this.url=this.url.replace(s,"$1_="+new Date().getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+new Date().getTime()}}function w(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var r=e.split("="),i=r.shift().replace(/\+/g," "),n=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(i),decodeURIComponent(n))}}),t}function b(e,t){if(!(this instanceof b))throw TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.status<200||this.status>599)throw RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new d(t.headers),this.url=t.url||"",this._initBody(e)}y.prototype.clone=function(){return new y(this,{body:this._bodyInit})},g.call(y.prototype),g.call(b.prototype),b.prototype.clone=function(){return new b(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new d(this.headers),url:this.url})},b.error=function(){var e=new b(null,{status:200,statusText:""});return e.ok=!1,e.status=0,e.type="error",e};var v=[301,302,303,307,308];b.redirect=function(e,t){if(-1===v.indexOf(t))throw RangeError("Invalid status code");return new b(null,{status:t,headers:{location:e}})},e.DOMException=t.DOMException;try{new e.DOMException}catch(t){e.DOMException=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function C(r,n){return new Promise(function(o,s){var c=new y(r,n);if(c.signal&&c.signal.aborted)return s(new e.DOMException("Aborted","AbortError"));var u=new XMLHttpRequest;function h(){u.abort()}if(u.onload=function(){var e,t,r={statusText:u.statusText,headers:(e=u.getAllResponseHeaders()||"",t=new d,e.replace(/\r?\n[\t ]+/g," ").split("\r").map(function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e}).forEach(function(e){var r=e.split(":"),i=r.shift().trim();if(i){var n=r.join(":").trim();try{t.append(i,n)}catch(e){console.warn("Response "+e.message)}}}),t)};0===c.url.indexOf("file://")&&(u.status<200||u.status>599)?r.status=200:r.status=u.status,r.url="responseURL"in u?u.responseURL:r.headers.get("X-Request-URL");var i="response"in u?u.response:u.responseText;setTimeout(function(){o(new b(i,r))},0)},u.onerror=function(){setTimeout(function(){s(TypeError("Network request failed"))},0)},u.ontimeout=function(){setTimeout(function(){s(TypeError("Network request timed out"))},0)},u.onabort=function(){setTimeout(function(){s(new e.DOMException("Aborted","AbortError"))},0)},u.open(c.method,function(e){try{return""===e&&t.location.href?t.location.href:e}catch(t){return e}}(c.url),!0),"include"===c.credentials?u.withCredentials=!0:"omit"===c.credentials&&(u.withCredentials=!1),"responseType"in u&&(i.blob?u.responseType="blob":i.arrayBuffer&&(u.responseType="arraybuffer")),n&&"object"==typeof n.headers&&!(n.headers instanceof d||t.Headers&&n.headers instanceof t.Headers)){var p=[];Object.getOwnPropertyNames(n.headers).forEach(function(e){p.push(a(e)),u.setRequestHeader(e,l(n.headers[e]))}),c.headers.forEach(function(e,t){-1===p.indexOf(t)&&u.setRequestHeader(t,e)})}else c.headers.forEach(function(e,t){u.setRequestHeader(t,e)});c.signal&&(c.signal.addEventListener("abort",h),u.onreadystatechange=function(){4===u.readyState&&c.signal.removeEventListener("abort",h)}),u.send(void 0===c._bodyInit?null:c._bodyInit)})}C.polyfill=!0,t.fetch||(t.fetch=C,t.Headers=d,t.Request=y,t.Response=b),e.Headers=d,e.Request=y,e.Response=b,e.fetch=C,Object.defineProperty(e,"__esModule",{value:!0})})({}),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var o=i.fetch?i:n;(t=o.fetch).default=o.fetch,t.fetch=o.fetch,t.Headers=o.Headers,t.Request=o.Request,t.Response=o.Response,e.exports=t},71096:function(e){var t;t=function(){"use strict";var e="millisecond",t="second",r="minute",i="hour",n="week",o="month",s="quarter",a="year",l="date",c="Invalid Date",d=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,u=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,h=function(e,t,r){var i=String(e);return!i||i.length>=t?e:""+Array(t+1-i.length).join(r)+e},p="en",f={};f[p]={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],r=e%100;return"["+e+(t[(r-20)%10]||t[r]||"th")+"]"}};var g="$isDayjsObject",m=function(e){return e instanceof v||!(!e||!e[g])},y=function e(t,r,i){var n;if(!t)return p;if("string"==typeof t){var o=t.toLowerCase();f[o]&&(n=o),r&&(f[o]=r,n=o);var s=t.split("-");if(!n&&s.length>1)return e(s[0])}else{var a=t.name;f[a]=t,n=a}return!i&&n&&(p=n),n||!i&&p},w=function(e,t){if(m(e))return e.clone();var r="object"==typeof t?t:{};return r.date=e,r.args=arguments,new v(r)},b={s:h,z:function(e){var t=-e.utcOffset(),r=Math.abs(t);return(t<=0?"+":"-")+h(Math.floor(r/60),2,"0")+":"+h(r%60,2,"0")},m:function e(t,r){if(t.date()0,m<=g.r||!g.r){m<=1&&f>0&&(g=h[f-1]);var y=u[g.l];a&&(m=a(""+m)),c="string"==typeof y?y.replace("%d",m):y(m,i,g.l,d);break}}if(i)return c;var w=d?u.future:u.past;return"function"==typeof w?w(c):w.replace("%s",c)},i.to=function(e,t){return o(e,t,this,!0)},i.from=function(e,t){return o(e,t,this)};var s=function(e){return e.$u?r.utc():r()};i.toNow=function(e){return this.to(s(this),e)},i.fromNow=function(e){return this.from(s(this),e)}}},e.exports=t()},96961:function(e){var t;t=function(){return function(e,t,r){r.updateLocale=function(e,t){var i=r.Ls[e];if(i)return(t?Object.keys(t):[]).forEach(function(e){i[e]=t[e]}),i}}},e.exports=t()},46946:function(e){"use strict";var t={single_source_shortest_paths:function(e,r,i){var n,o,s,a,l,c,d,u={},h={};h[r]=0;var p=t.PriorityQueue.make();for(p.push(r,0);!p.empty();)for(s in o=(n=p.pop()).value,a=n.cost,l=e[o]||{})l.hasOwnProperty(s)&&(c=a+l[s],d=h[s],(void 0===h[s]||d>c)&&(h[s]=c,p.push(s,c),u[s]=o));if(void 0!==i&&void 0===h[i])throw Error(["Could not find a path from ",r," to ",i,"."].join(""));return u},extract_shortest_path_from_predecessor_list:function(e,t){for(var r=[],i=t;i;)r.push(i),e[i],i=e[i];return r.reverse(),r},find_path:function(e,r,i){var n=t.single_source_shortest_paths(e,r,i);return t.extract_shortest_path_from_predecessor_list(n,i)},PriorityQueue:{make:function(e){var r,i=t.PriorityQueue,n={};for(r in e=e||{},i)i.hasOwnProperty(r)&&(n[r]=i[r]);return n.queue=[],n.sorter=e.sorter||i.default_sorter,n},default_sorter:function(e,t){return e.cost-t.cost},push:function(e,t){this.queue.push({value:e,cost:t}),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};e.exports=t},8878:function(e){"use strict";e.exports=function(e){for(var t=[],r=e.length,i=0;i=55296&&n<=56319&&r>i+1){var o=e.charCodeAt(i+1);o>=56320&&o<=57343&&(n=(n-55296)*1024+o-56320+65536,i+=1)}if(n<128){t.push(n);continue}if(n<2048){t.push(n>>6|192),t.push(63&n|128);continue}if(n<55296||n>=57344&&n<65536){t.push(n>>12|224),t.push(n>>6&63|128),t.push(63&n|128);continue}if(n>=65536&&n<=1114111){t.push(n>>18|240),t.push(n>>12&63|128),t.push(n>>6&63|128),t.push(63&n|128);continue}t.push(239,191,189)}return new Uint8Array(t).buffer}},77625:function(e){"use strict";var t=Object.prototype.hasOwnProperty,r="~";function i(){}function n(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function o(e,t,i,o,s){if("function"!=typeof i)throw TypeError("The listener must be a function");var a=new n(i,o||e,s),l=r?r+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],a]:e._events[l].push(a):(e._events[l]=a,e._eventsCount++),e}function s(e,t){0==--e._eventsCount?e._events=new i:delete e._events[t]}function a(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(r=!1)),a.prototype.eventNames=function(){var e,i,n=[];if(0===this._eventsCount)return n;for(i in e=this._events)t.call(e,i)&&n.push(r?i.slice(1):i);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(e)):n},a.prototype.listeners=function(e){var t=r?r+e:e,i=this._events[t];if(!i)return[];if(i.fn)return[i.fn];for(var n=0,o=i.length,s=Array(o);n0&&s.length>n&&!s.warned){s.warned=!0;var n,o,s,c=Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=s.length,console&&console.warn&&console.warn(c)}return e}function d(){if(!this.fired)return(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0==arguments.length)?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function u(e,t,r){var i={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},n=d.bind(i);return n.listener=r,i.wrapFn=n,n}function h(e,t,r){var i=e._events;if(void 0===i)return[];var n=i[t];return void 0===n?[]:"function"==typeof n?r?[n.listener||n]:[n]:r?function(e){for(var t=Array(e.length),r=0;r0&&(s=t[0]),s instanceof Error)throw s;var s,a=Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var l=o[e];if(void 0===l)return!1;if("function"==typeof l)i(l,this,t);else for(var c=l.length,d=f(l,c),r=0;r=0;o--)if(r[o]===t||r[o].listener===t){s=r[o].listener,n=o;break}if(n<0)return this;0===n?r.shift():function(e,t){for(;t+1=0;i--)this.removeListener(e,t[i]);return this},o.prototype.listeners=function(e){return h(this,e,!0)},o.prototype.rawListeners=function(e){return h(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},o.prototype.listenerCount=p,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},35819:function(e,t,r){let i=r(64888),n=r(82216),o=r(962),s=r(35623);function a(e,t,r,o,s){let a=[].slice.call(arguments,1),l=a.length,c="function"==typeof a[l-1];if(!c&&!i())throw Error("Callback required as last argument");if(c){if(l<2)throw Error("Too few arguments provided");2===l?(s=r,r=t,t=o=void 0):3===l&&(t.getContext&&void 0===s?(s=o,o=void 0):(s=o,o=r,r=t,t=void 0))}else{if(l<1)throw Error("Too few arguments provided");return 1===l?(r=t,t=o=void 0):2!==l||t.getContext||(o=r,r=t,t=void 0),new Promise(function(i,s){try{let s=n.create(r,o);i(e(s,t,o))}catch(e){s(e)}})}try{let i=n.create(r,o);s(null,e(i,t,o))}catch(e){s(e)}}t.create=n.create,t.toCanvas=a.bind(null,o.render),t.toDataURL=a.bind(null,o.renderToDataURL),t.toString=a.bind(null,function(e,t,r){return s.render(e,r)})},64888:function(e){e.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},14691:function(e,t,r){let i=r(62415).getSymbolSize;t.getRowColCoords=function(e){if(1===e)return[];let t=Math.floor(e/7)+2,r=i(e),n=145===r?26:2*Math.ceil((r-13)/(2*t-2)),o=[r-7];for(let e=1;e>>7-e%8&1)==1},put:function(e,t){for(let r=0;r>>t-r-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(e){let t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},e.exports=t},55526:function(e){function t(e){if(!e||e<1)throw Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}t.prototype.set=function(e,t,r,i){let n=e*this.size+t;this.data[n]=r,i&&(this.reservedBit[n]=!0)},t.prototype.get=function(e,t){return this.data[e*this.size+t]},t.prototype.xor=function(e,t,r){this.data[e*this.size+t]^=r},t.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]},e.exports=t},48153:function(e,t,r){let i=r(8878),n=r(17956);function o(e){this.mode=n.BYTE,"string"==typeof e&&(e=i(e)),this.data=new Uint8Array(e)}o.getBitsLength=function(e){return 8*e},o.prototype.getLength=function(){return this.data.length},o.prototype.getBitsLength=function(){return o.getBitsLength(this.data.length)},o.prototype.write=function(e){for(let t=0,r=this.data.length;t=0&&e.bit<4},t.from=function(e,r){if(t.isValid(e))return e;try{return function(e){if("string"!=typeof e)throw Error("Param is not a string");switch(e.toLowerCase()){case"l":case"low":return t.L;case"m":case"medium":return t.M;case"q":case"quartile":return t.Q;case"h":case"high":return t.H;default:throw Error("Unknown EC Level: "+e)}}(e)}catch(e){return r}}},44086:function(e,t,r){let i=r(62415).getSymbolSize;t.getPositions=function(e){let t=i(e);return[[0,0],[t-7,0],[0,t-7]]}},27433:function(e,t,r){let i=r(62415),n=i.getBCHDigit(1335);t.getEncodedBits=function(e,t){let r=e.bit<<3|t,o=r<<10;for(;i.getBCHDigit(o)-n>=0;)o^=1335<=33088&&r<=40956)r-=33088;else if(r>=57408&&r<=60351)r-=49472;else throw Error("Invalid SJIS character: "+this.data[t]+"\nMake sure your charset is UTF-8");r=(r>>>8&255)*192+(255&r),e.put(r,13)}},e.exports=o},24483:function(e,t){t.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};let r={N1:3,N2:3,N3:40,N4:10};t.isValid=function(e){return null!=e&&""!==e&&!isNaN(e)&&e>=0&&e<=7},t.from=function(e){return t.isValid(e)?parseInt(e,10):void 0},t.getPenaltyN1=function(e){let t=e.size,i=0,n=0,o=0,s=null,a=null;for(let l=0;l=5&&(i+=r.N1+(n-5)),s=t,n=1),(t=e.get(c,l))===a?o++:(o>=5&&(i+=r.N1+(o-5)),a=t,o=1)}n>=5&&(i+=r.N1+(n-5)),o>=5&&(i+=r.N1+(o-5))}return i},t.getPenaltyN2=function(e){let t=e.size,i=0;for(let r=0;r=10&&(1488===n||93===n)&&i++,o=o<<1&2047|e.get(s,r),s>=10&&(1488===o||93===o)&&i++}return i*r.N3},t.getPenaltyN4=function(e){let t=0,i=e.data.length;for(let r=0;r=1&&t<10?e.ccBits[0]:t<27?e.ccBits[1]:e.ccBits[2]},t.getBestModeForData=function(e){return n.testNumeric(e)?t.NUMERIC:n.testAlphanumeric(e)?t.ALPHANUMERIC:n.testKanji(e)?t.KANJI:t.BYTE},t.toString=function(e){if(e&&e.id)return e.id;throw Error("Invalid mode")},t.isValid=function(e){return e&&e.bit&&e.ccBits},t.from=function(e,r){if(t.isValid(e))return e;try{return function(e){if("string"!=typeof e)throw Error("Param is not a string");switch(e.toLowerCase()){case"numeric":return t.NUMERIC;case"alphanumeric":return t.ALPHANUMERIC;case"kanji":return t.KANJI;case"byte":return t.BYTE;default:throw Error("Unknown mode: "+e)}}(e)}catch(e){return r}}},51687:function(e,t,r){let i=r(17956);function n(e){this.mode=i.NUMERIC,this.data=e.toString()}n.getBitsLength=function(e){return 10*Math.floor(e/3)+(e%3?e%3*3+1:0)},n.prototype.getLength=function(){return this.data.length},n.prototype.getBitsLength=function(){return n.getBitsLength(this.data.length)},n.prototype.write=function(e){let t,r;for(t=0;t+3<=this.data.length;t+=3)r=parseInt(this.data.substr(t,3),10),e.put(r,10);let i=this.data.length-t;i>0&&(r=parseInt(this.data.substr(t),10),e.put(r,3*i+1))},e.exports=n},46413:function(e,t,r){let i=r(63384);t.mul=function(e,t){let r=new Uint8Array(e.length+t.length-1);for(let n=0;n=0;){let e=r[0];for(let n=0;n>i&1)==1,i<6?e.set(i,8,n,!0):i<8?e.set(i+1,8,n,!0):e.set(o-15+i,8,n,!0),i<8?e.set(8,o-i-1,n,!0):i<9?e.set(8,15-i-1+1,n,!0):e.set(8,15-i-1,n,!0);e.set(o-8,8,1,!0)}t.create=function(e,t){let r,p;if(void 0===e||""===e)throw Error("No input text");let y=n.M;return void 0!==t&&(y=n.from(t.errorCorrectionLevel,n.M),r=h.from(t.version),p=c.from(t.maskPattern),t.toSJISFunc&&i.setToSJISFunction(t.toSJISFunc)),function(e,t,r,n){let p;if(Array.isArray(e))p=g.fromArray(e);else if("string"==typeof e){let i=t;if(!i){let t=g.rawSplit(e);i=h.getBestVersionForData(t,r)}p=g.fromString(e,i||40)}else throw Error("Invalid data");let y=h.getBestVersionForData(p,r);if(!y)throw Error("The amount of data is too big to be stored in a QR Code");if(t){if(t=0&&t<=6&&(0===i||6===i)||i>=0&&i<=6&&(0===t||6===t)||t>=2&&t<=4&&i>=2&&i<=4?e.set(n+t,o+i,!0,!0):e.set(n+t,o+i,!1,!0))}}(b,t),function(e){let t=e.size;for(let r=8;r=7&&function(e,t){let r,i,n;let o=e.size,s=h.getEncodedBits(t);for(let t=0;t<18;t++)r=Math.floor(t/3),i=t%3+o-8-3,n=(s>>t&1)==1,e.set(r,i,n,!0),e.set(i,r,n,!0)}(b,t),function(e,t){let r=e.size,i=-1,n=r-1,o=7,s=0;for(let a=r-1;a>0;a-=2)for(6===a&&a--;;){for(let r=0;r<2;r++)if(!e.isReserved(n,a-r)){let i=!1;s>>o&1)==1),e.set(n,a-r,i),-1==--o&&(s++,o=7)}if((n+=i)<0||r<=n){n-=i,i=-i;break}}}(b,w),isNaN(n)&&(n=c.getBestMask(b,m.bind(null,b,r))),c.applyMask(n,b),m(b,r,n),{modules:b,version:t,errorCorrectionLevel:r,maskPattern:n,segments:p}}(e,r,y,p)}},24011:function(e,t,r){let i=r(46413);function n(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}n.prototype.initialize=function(e){this.degree=e,this.genPoly=i.generateECPolynomial(this.degree)},n.prototype.encode=function(e){if(!this.genPoly)throw Error("Encoder not initialized");let t=new Uint8Array(e.length+this.degree);t.set(e);let r=i.mod(t,this.genPoly),n=this.degree-r.length;if(n>0){let e=new Uint8Array(this.degree);return e.set(r,n),e}return r},e.exports=n},80581:function(e,t){let r="[0-9]+",i="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+",n="(?:(?![A-Z0-9 $%*+\\-./:]|"+(i=i.replace(/u/g,"\\u"))+")(?:.|[\r\n]))+";t.KANJI=RegExp(i,"g"),t.BYTE_KANJI=RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),t.BYTE=RegExp(n,"g"),t.NUMERIC=RegExp(r,"g"),t.ALPHANUMERIC=RegExp("[A-Z $%*+\\-./:]+","g");let o=RegExp("^"+i+"$"),s=RegExp("^"+r+"$"),a=RegExp("^[A-Z0-9 $%*+\\-./:]+$");t.testKanji=function(e){return o.test(e)},t.testNumeric=function(e){return s.test(e)},t.testAlphanumeric=function(e){return a.test(e)}},89940:function(e,t,r){let i=r(17956),n=r(51687),o=r(87111),s=r(48153),a=r(78514),l=r(80581),c=r(62415),d=r(46946);function u(e){return unescape(encodeURIComponent(e)).length}function h(e,t,r){let i;let n=[];for(;null!==(i=e.exec(r));)n.push({data:i[0],index:i.index,mode:t,length:i[0].length});return n}function p(e){let t,r;let n=h(l.NUMERIC,i.NUMERIC,e),o=h(l.ALPHANUMERIC,i.ALPHANUMERIC,e);return c.isKanjiModeEnabled()?(t=h(l.BYTE,i.BYTE,e),r=h(l.KANJI,i.KANJI,e)):(t=h(l.BYTE_KANJI,i.BYTE,e),r=[]),n.concat(o,t,r).sort(function(e,t){return e.index-t.index}).map(function(e){return{data:e.data,mode:e.mode,length:e.length}})}function f(e,t){switch(t){case i.NUMERIC:return n.getBitsLength(e);case i.ALPHANUMERIC:return o.getBitsLength(e);case i.KANJI:return a.getBitsLength(e);case i.BYTE:return s.getBitsLength(e)}}function g(e,t){let r;let l=i.getBestModeForData(e);if((r=i.from(t,l))!==i.BYTE&&r.bit=0?e[e.length-1]:null;return r&&r.mode===t.mode?e[e.length-1].data+=t.data:e.push(t),e},[]))},t.rawSplit=function(e){return t.fromArray(p(e,c.isKanjiModeEnabled()))}},62415:function(e,t){let r;let i=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];t.getSymbolSize=function(e){if(!e)throw Error('"version" cannot be null or undefined');if(e<1||e>40)throw Error('"version" should be in range from 1 to 40');return 4*e+17},t.getSymbolTotalCodewords=function(e){return i[e]},t.getBCHDigit=function(e){let t=0;for(;0!==e;)t++,e>>>=1;return t},t.setToSJISFunction=function(e){if("function"!=typeof e)throw Error('"toSJISFunc" is not a valid function.');r=e},t.isKanjiModeEnabled=function(){return void 0!==r},t.toSJIS=function(e){return r(e)}},96623:function(e,t){t.isValid=function(e){return!isNaN(e)&&e>=1&&e<=40}},33379:function(e,t,r){let i=r(62415),n=r(79386),o=r(29947),s=r(17956),a=r(96623),l=i.getBCHDigit(7973);function c(e,t){return s.getCharCountIndicator(e,t)+4}t.from=function(e,t){return a.isValid(e)?parseInt(e,10):t},t.getCapacity=function(e,t,r){if(!a.isValid(e))throw Error("Invalid QR Code version");void 0===r&&(r=s.BYTE);let o=(i.getSymbolTotalCodewords(e)-n.getTotalCodewordsCount(e,t))*8;if(r===s.MIXED)return o;let l=o-c(r,e);switch(r){case s.NUMERIC:return Math.floor(l/10*3);case s.ALPHANUMERIC:return Math.floor(l/11*2);case s.KANJI:return Math.floor(l/13);case s.BYTE:default:return Math.floor(l/8)}},t.getBestVersionForData=function(e,r){let i;let n=o.from(r,o.M);if(Array.isArray(e)){if(e.length>1)return function(e,r){for(let i=1;i<=40;i++)if(function(e,t){let r=0;return e.forEach(function(e){let i=c(e.mode,t);r+=i+e.getBitsLength()}),r}(e,i)<=t.getCapacity(i,r,s.MIXED))return i}(e,n);if(0===e.length)return 1;i=e[0]}else i=e;return function(e,r,i){for(let n=1;n<=40;n++)if(r<=t.getCapacity(n,i,e))return n}(i.mode,i.getLength(),n)},t.getEncodedBits=function(e){if(!a.isValid(e)||e<7)throw Error("Invalid QR Code version");let t=e<<12;for(;i.getBCHDigit(t)-l>=0;)t^=7973<':"",u="0&&c>0&&e[l-1]||(i+=s?o("M",c+r,.5+d+r):o("m",n,0),n=0,s=!1),c+1',h=''+d+u+"\n";return"function"==typeof r&&r(null,h),h}},87220:function(e,t){function r(e){if("number"==typeof e&&(e=e.toString()),"string"!=typeof e)throw Error("Color should be defined as hex string");let t=e.slice().replace("#","").split("");if(t.length<3||5===t.length||t.length>8)throw Error("Invalid hex color: "+e);(3===t.length||4===t.length)&&(t=Array.prototype.concat.apply([],t.map(function(e){return[e,e]}))),6===t.length&&t.push("F","F");let r=parseInt(t.join(""),16);return{r:r>>24&255,g:r>>16&255,b:r>>8&255,a:255&r,hex:"#"+t.slice(0,6).join("")}}t.getOptions=function(e){e||(e={}),e.color||(e.color={});let t=void 0===e.margin||null===e.margin||e.margin<0?4:e.margin,i=e.width&&e.width>=21?e.width:void 0,n=e.scale||4;return{width:i,scale:i?4:n,margin:t,color:{dark:r(e.color.dark||"#000000ff"),light:r(e.color.light||"#ffffffff")},type:e.type,rendererOpts:e.rendererOpts||{}}},t.getScale=function(e,t){return t.width&&t.width>=e+2*t.margin?t.width/(e+2*t.margin):t.scale},t.getImageWidth=function(e,r){let i=t.getScale(e,r);return Math.floor((e+2*r.margin)*i)},t.qrToImageData=function(e,r,i){let n=r.modules.size,o=r.modules.data,s=t.getScale(n,i),a=Math.floor((n+2*i.margin)*s),l=i.margin*s,c=[i.color.light,i.color.dark];for(let t=0;t=l&&r>=l&&t-1?u:0,e.charCodeAt(p+1)){case 100:case 102:if(d>=l||null==r[d])break;u=l||null==r[d])break;u=l||void 0===r[d])break;u",u=p+2,p++;break}c+=n(r[d]),u=p+2,p++;break;case 115:if(d>=l)break;ut.indexOf(i)&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,i=Object.getOwnPropertySymbols(e);nt.indexOf(i[n])&&Object.prototype.propertyIsEnumerable.call(e,i[n])&&(r[i[n]]=e[i[n]]);return r}function a(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s}function l(e,t){return function(r,i){t(r,i,e)}}function c(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function d(e,t,r,i){return new(r||(r=Promise))(function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(s,a)}l((i=i.apply(e,t||[])).next())})}function u(e,t){var r,i,n,o,s={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw TypeError("Generator is already executing.");for(;s;)try{if(r=1,i&&(n=2&o[0]?i.return:o[0]?i.throw||((n=i.return)&&n.call(i),0):i.next)&&!(n=n.call(i,o[1])).done)return n;switch(i=0,n&&(o=[2&o[0],n.value]),o[0]){case 0:case 1:n=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,i=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(n=(n=s.trys).length>0&&n[n.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!n||o[1]>n[0]&&o[1]=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var i,n,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(i=o.next()).done;)s.push(i.value)}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return s}function m(){for(var e=[],t=0;t1||a(e,t)})})}function a(e,t){try{var r;(r=n[e](t)).value instanceof w?Promise.resolve(r.value.v).then(l,c):d(o[0][2],r)}catch(e){d(o[0][3],e)}}function l(e){a("next",e)}function c(e){a("throw",e)}function d(e,t){e(t),o.shift(),o.length&&a(o[0][0],o[0][1])}}function v(e){var t,r;return t={},i("next"),i("throw",function(e){throw e}),i("return"),t[Symbol.iterator]=function(){return this},t;function i(i,n){t[i]=e[i]?function(t){return(r=!r)?{value:w(e[i](t)),done:"return"===i}:n?n(t):t}:n}}function C(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=f(e),t={},i("next"),i("throw"),i("return"),t[Symbol.asyncIterator]=function(){return this},t);function i(r){t[r]=e[r]&&function(t){return new Promise(function(i,n){!function(e,t,r,i){Promise.resolve(i).then(function(t){e({value:t,done:r})},t)}(i,n,(t=e[r](t)).done,t.value)})}}}function E(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function x(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function _(e){return e&&e.__esModule?e:{default:e}}function A(e,t){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return t.get(e)}function S(e,t,r){if(!t.has(e))throw TypeError("attempted to set private field on non-instance");return t.set(e,r),r}},50911:function(e){e.exports={style:{fontFamily:"'__Inter_f367f3', '__Inter_Fallback_f367f3'",fontStyle:"normal"},className:"__className_f367f3"}},97435:function(e,t,r){"use strict";let i=r(95172);e.exports=d;let n=function(){function e(e){return void 0!==e&&e}try{if("undefined"!=typeof globalThis)return globalThis;return Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch(t){return e(self)||e(window)||e(this)||{}}}().console||{};function o(e,t){return"silent"===e?1/0:t.levels.values[e]}let s=Symbol("pino.logFuncs"),a=Symbol("pino.hierarchy"),l={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function c(e,t){let r={logger:t,parent:e[a]};t[a]=r}function d(e){var t,r;(e=e||{}).browser=e.browser||{};let i=e.browser.transmit;if(i&&"function"!=typeof i.send)throw Error("pino: transmit option must have a send function");let a=e.browser.write||n;e.browser.write&&(e.browser.asObject=!0);let f=e.serializers||{},g=Array.isArray(t=e.browser.serialize)?t.filter(function(e){return"!stdSerializers.err"!==e}):!0===t&&Object.keys(f),m=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(m=!1);let v=Object.keys(e.customLevels||{}),C=["error","fatal","warn","info","debug","trace"].concat(v);"function"==typeof a&&C.forEach(function(e){a[e]=a}),(!1===e.enabled||e.browser.disabled)&&(e.level="silent");let E=e.level||"info",x=Object.create(a);x.log||(x.log=y),function(e,t,r){let i={};t.forEach(e=>{i[e]=r[e]?r[e]:n[e]||n[l[e]||"log"]||y}),e[s]=i}(x,C,a),c({},x),Object.defineProperty(x,"levelVal",{get:function(){return o(this.level,this)}}),Object.defineProperty(x,"level",{get:function(){return this._level},set:function(e){if("silent"!==e&&!this.levels.values[e])throw Error("unknown level "+e);this._level=e,u(this,_,x,"error"),u(this,_,x,"fatal"),u(this,_,x,"warn"),u(this,_,x,"info"),u(this,_,x,"debug"),u(this,_,x,"trace"),v.forEach(e=>{u(this,_,x,e)})}});let _={transmit:i,serialize:g,asObject:e.browser.asObject,asObjectBindingsOnly:e.browser.asObjectBindingsOnly,formatters:e.browser.formatters,levels:C,timestamp:"function"==typeof(r=e).timestamp?r.timestamp:!1===r.timestamp?w:b,messageKey:e.messageKey||"msg",onChild:e.onChild||y};function A(t,r,n){if(!r)throw Error("missing bindings for child Pino");n=n||{},g&&r.serializers&&(n.serializers=r.serializers);let o=n.serializers;if(g&&o){var s=Object.assign({},f,o),a=!0===e.browser.serialize?Object.keys(s):g;delete r.serializers,h([r],a,s,this._stdErrSerialize)}function l(e){this._childLevel=(0|e._childLevel)+1,this.bindings=r,s&&(this.serializers=s,this._serialize=a),i&&(this._logEvent=p([].concat(e._logEvent.bindings,r)))}l.prototype=this;let d=new l(this);return c(this,d),d.child=function(...e){return A.call(this,t,...e)},d.level=n.level||this.level,t.onChild(d),d}return x.levels=function(e){let t=e.customLevels||{};return{values:Object.assign({},d.levels.values,t),labels:Object.assign({},d.levels.labels,function(e){let t={};return Object.keys(e).forEach(function(r){t[e[r]]=r}),t}(t))}}(e),x.level=E,x.isLevelEnabled=function(e){return!!this.levels.values[e]&&this.levels.values[e]>=this.levels.values[this.level]},x.setMaxListeners=x.getMaxListeners=x.emit=x.addListener=x.on=x.prependListener=x.once=x.prependOnceListener=x.removeListener=x.removeAllListeners=x.listeners=x.listenerCount=x.eventNames=x.write=x.flush=y,x.serializers=f,x._serialize=g,x._stdErrSerialize=m,x.child=function(...e){return A.call(this,_,...e)},i&&(x._logEvent=p()),x}function u(e,t,r,l){var c,d;if(Object.defineProperty(e,l,{value:o(e.level,r)>o(l,r)?y:r[s][l],writable:!0,enumerable:!0,configurable:!0}),e[l]===y){if(!t.transmit)return;let i=o(t.transmit.level||e.level,r);if(o(l,r)e}=o.formatters||{},l=r.slice(),c=l[0],d={},u=(0|e._childLevel)+1;if(u<1&&(u=1),n&&(d.time=n),s?Object.assign(d,s(t,e.levels.values[t])):d.level=e.levels.values[t],o.asObjectBindingsOnly){if(null!==c&&"object"==typeof c)for(;u--&&"object"==typeof l[0];)Object.assign(d,l.shift());return[a(d),...l]}if(null!==c&&"object"==typeof c){for(;u--&&"object"==typeof l[0];)Object.assign(d,l.shift());c=l.length?i(l.shift(),l):void 0}else"string"==typeof c&&(c=i(l.shift(),l));return void 0!==c&&(d[o.messageKey]=c),[a(d)]}(this,l,a,s,t)):c.apply(d,a),t.transmit){let i=t.transmit.level||e._level,n=o(i,r),c=o(l,r);if(c-1&&i in r&&(e[n][i]=r[i](e[n][i]))}function p(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function f(e){let t={type:e.constructor.name,msg:e.message,stack:e.stack};for(let r in e)void 0===t[r]&&(t[r]=e[r]);return t}function g(){return{}}function m(e){return e}function y(){}function w(){return!1}function b(){return Date.now()}d.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}},d.stdSerializers={mapHttpRequest:g,mapHttpResponse:g,wrapRequestSerializer:m,wrapResponseSerializer:m,wrapErrorSerializer:m,req:g,res:g,err:f,errWithCause:f},d.stdTimeFunctions=Object.assign({},{nullTime:w,epochTime:b,unixTime:function(){return Math.round(Date.now()/1e3)},isoTime:function(){return new Date(Date.now()).toISOString()}}),e.exports.default=d,e.exports.pino=d},82500:function(e,t,r){"use strict";r.d(t,{C:function(){return s}});var i=r(93511);let n={attribute:!0,type:String,converter:i.Ts,reflect:!1,hasChanged:i.Qu},o=(e=n,t,r)=>{let{kind:i,metadata:o}=r,s=globalThis.litPropertyMetadata.get(o);if(void 0===s&&globalThis.litPropertyMetadata.set(o,s=new Map),"setter"===i&&((e=Object.create(e)).wrapped=!0),s.set(r.name,e),"accessor"===i){let{name:i}=r;return{set(r){let n=t.get.call(this);t.set.call(this,r),this.requestUpdate(i,n,e)},init(t){return void 0!==t&&this.C(i,void 0,e,t),t}}}if("setter"===i){let{name:i}=r;return function(r){let n=this[i];t.call(this,r),this.requestUpdate(i,n,e)}}throw Error("Unsupported decorator location: "+i)};function s(e){return(t,r)=>"object"==typeof r?o(e,t,r):((e,t,r)=>{let i=t.hasOwnProperty(r);return t.constructor.createProperty(r,e),i?Object.getOwnPropertyDescriptor(t,r):void 0})(e,t,r)}},704:function(e,t,r){"use strict";r.d(t,{S:function(){return n}});var i=r(82500);function n(e){return(0,i.C)({...e,state:!0,attribute:!1})}},93511:function(e,t,r){"use strict";r.d(t,{fl:function(){return S},iv:function(){return c},Ts:function(){return x},Qu:function(){return _},$m:function(){return l}});let i=globalThis,n=i.ShadowRoot&&(void 0===i.ShadyCSS||i.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,o=Symbol(),s=new WeakMap;class a{constructor(e,t,r){if(this._$cssResult$=!0,r!==o)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o,t=this.t;if(n&&void 0===e){let r=void 0!==t&&1===t.length;r&&(e=s.get(t)),void 0===e&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&s.set(t,e))}return e}toString(){return this.cssText}}let l=e=>new a("string"==typeof e?e:e+"",void 0,o),c=(e,...t)=>new a(1===e.length?e[0]:t.reduce((t,r,i)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw Error("Value passed to 'css' function must be a 'css' function result: "+e+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+e[i+1],e[0]),e,o),d=(e,t)=>{if(n)e.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let r of t){let t=document.createElement("style"),n=i.litNonce;void 0!==n&&t.setAttribute("nonce",n),t.textContent=r.cssText,e.appendChild(t)}},u=n?e=>e:e=>e instanceof CSSStyleSheet?(e=>{let t="";for(let r of e.cssRules)t+=r.cssText;return l(t)})(e):e,{is:h,defineProperty:p,getOwnPropertyDescriptor:f,getOwnPropertyNames:g,getOwnPropertySymbols:m,getPrototypeOf:y}=Object,w=globalThis,b=w.trustedTypes,v=b?b.emptyScript:"",C=w.reactiveElementPolyfillSupport,E=(e,t)=>e,x={toAttribute(e,t){switch(t){case Boolean:e=e?v:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let r=e;switch(t){case Boolean:r=null!==e;break;case Number:r=null===e?null:Number(e);break;case Object:case Array:try{r=JSON.parse(e)}catch(e){r=null}}return r}},_=(e,t)=>!h(e,t),A={attribute:!0,type:String,converter:x,reflect:!1,useDefault:!1,hasChanged:_};Symbol.metadata??=Symbol("metadata"),w.litPropertyMetadata??=new WeakMap;class S extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=A){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){let r=Symbol(),i=this.getPropertyDescriptor(e,r,t);void 0!==i&&p(this.prototype,e,i)}}static getPropertyDescriptor(e,t,r){let{get:i,set:n}=f(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};return{get:i,set(t){let o=i?.call(this);n?.call(this,t),this.requestUpdate(e,o,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??A}static _$Ei(){if(this.hasOwnProperty(E("elementProperties")))return;let e=y(this);e.finalize(),void 0!==e.l&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(E("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(E("properties"))){let e=this.properties;for(let t of[...g(e),...m(e)])this.createProperty(t,e[t])}let e=this[Symbol.metadata];if(null!==e){let t=litPropertyMetadata.get(e);if(void 0!==t)for(let[e,r]of t)this.elementProperties.set(e,r)}for(let[e,t]of(this._$Eh=new Map,this.elementProperties)){let r=this._$Eu(e,t);void 0!==r&&this._$Eh.set(r,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let t=[];if(Array.isArray(e))for(let r of new Set(e.flat(1/0).reverse()))t.unshift(u(r));else void 0!==e&&t.push(u(e));return t}static _$Eu(e,t){let r=t.attribute;return!1===r?void 0:"string"==typeof r?r:"string"==typeof e?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map;for(let t of this.constructor.elementProperties.keys())this.hasOwnProperty(t)&&(e.set(t,this[t]),delete this[t]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return d(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,r){this._$AK(e,r)}_$ET(e,t){let r=this.constructor.elementProperties.get(e),i=this.constructor._$Eu(e,r);if(void 0!==i&&!0===r.reflect){let n=(void 0!==r.converter?.toAttribute?r.converter:x).toAttribute(t,r.type);this._$Em=e,null==n?this.removeAttribute(i):this.setAttribute(i,n),this._$Em=null}}_$AK(e,t){let r=this.constructor,i=r._$Eh.get(e);if(void 0!==i&&this._$Em!==i){let e=r.getPropertyOptions(i),n="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:x;this._$Em=i;let o=n.fromAttribute(t,e.type);this[i]=o??this._$Ej?.get(i)??o,this._$Em=null}}requestUpdate(e,t,r){if(void 0!==e){let i=this.constructor,n=this[e];if(!(((r??=i.getPropertyOptions(e)).hasChanged??_)(n,t)||r.useDefault&&r.reflect&&n===this._$Ej?.get(e)&&!this.hasAttribute(i._$Eu(e,r))))return;this.C(e,t,r)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(e,t,{useDefault:r,reflect:i,wrapped:n},o){r&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,o??t??this[e]),!0!==n||void 0!==o)||(this._$AL.has(e)||(this.hasUpdated||r||(t=void 0),this._$AL.set(e,t)),!0===i&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[e,t]of this._$Ep)this[e]=t;this._$Ep=void 0}let e=this.constructor.elementProperties;if(e.size>0)for(let[t,r]of e){let{wrapped:e}=r,i=this[t];!0!==e||this._$AL.has(t)||void 0===i||this.C(t,void 0,r,i)}}let e=!1,t=this._$AL;try{(e=this.shouldUpdate(t))?(this.willUpdate(t),this._$EO?.forEach(e=>e.hostUpdate?.()),this.update(t)):this._$EM()}catch(t){throw e=!1,this._$EM(),t}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(e){}firstUpdated(e){}}S.elementStyles=[],S.shadowRootOptions={mode:"open"},S[E("elementProperties")]=new Map,S[E("finalized")]=new Map,C?.({ReactiveElement:S}),(w.reactiveElementVersions??=[]).push("2.1.1")},74892:function(e,t,r){"use strict";let i;r.d(t,{K:function(){return eO}});var n=r(23317),o=r(82538);let s=e=>(t,r,i)=>{let n=i.subscribe;return i.subscribe=(e,t,r)=>{let o=e;if(t){let n=(null==r?void 0:r.equalityFn)||Object.is,s=e(i.getState());o=r=>{let i=e(r);if(!n(s,i)){let e=s;t(s=i,e)}},(null==r?void 0:r.fireImmediately)&&t(s,s)}return n(o)},e(t,r,i)},a=e=>t=>{try{let r=e(t);if(r instanceof Promise)return r;return{then:e=>a(e)(r),catch(e){return this}}}catch(e){return{then(e){return this},catch:t=>a(t)(e)}}},l=(e,t)=>(r,i,n)=>{let o,s={storage:function(e,t){let r;try{r=e()}catch(e){return}return{getItem:e=>{var t;let i=e=>null===e?null:JSON.parse(e,void 0),n=null!=(t=r.getItem(e))?t:null;return n instanceof Promise?n.then(i):i(n)},setItem:(e,t)=>r.setItem(e,JSON.stringify(t,void 0)),removeItem:e=>r.removeItem(e)}}(()=>localStorage),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},l=!1,c=new Set,d=new Set,u=s.storage;if(!u)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),r(...e)},i,n);let h=()=>{let e=s.partialize({...i()});return u.setItem(s.name,{state:e,version:s.version})},p=n.setState;n.setState=(e,t)=>{p(e,t),h()};let f=e((...e)=>{r(...e),h()},i,n);n.getInitialState=()=>f;let g=()=>{var e,t;if(!u)return;l=!1,c.forEach(e=>{var t;return e(null!=(t=i())?t:f)});let n=(null==(t=s.onRehydrateStorage)?void 0:t.call(s,null!=(e=i())?e:f))||void 0;return a(u.getItem.bind(u))(s.name).then(e=>{if(e){if("number"!=typeof e.version||e.version===s.version)return[!1,e.state];if(s.migrate)return[!0,s.migrate(e.state,e.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}return[!1,void 0]}).then(e=>{var t;let[n,a]=e;if(r(o=s.merge(a,null!=(t=i())?t:f),!0),n)return h()}).then(()=>{null==n||n(o,void 0),o=i(),l=!0,d.forEach(e=>e(o))}).catch(e=>{null==n||n(void 0,e)})};return n.persist={setOptions:e=>{s={...s,...e},e.storage&&(u=e.storage)},clearStorage:()=>{null==u||u.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>g(),hasHydrated:()=>l,onHydrate:e=>(c.add(e),()=>{c.delete(e)}),onFinishHydration:e=>(d.add(e),()=>{d.delete(e)})},s.skipHydration||g(),o||f},c=e=>{let t;let r=new Set,i=(e,i)=>{let n="function"==typeof e?e(t):e;if(!Object.is(n,t)){let e=t;t=(null!=i?i:"object"!=typeof n||null===n)?n:Object.assign({},t,n),r.forEach(r=>r(t,e))}},n=()=>t,o={setState:i,getState:n,getInitialState:()=>s,subscribe:e=>(r.add(e),()=>r.delete(e))},s=t=e(i,n,o);return o},d=e=>e?c(e):c;var u=r(31669),h=r(77014),p=r(39504),f=r(49287),g=r(59455),m=r(13102),y=r(14478),w=r(53738);function b(e={}){let t,r,i,n;let{shimDisconnect:o=!0,unstable_shimAsyncInject:s}=e;function a(){let t=e.target;if("function"==typeof t){let e=t();if(e)return e}return"object"==typeof t?t:"string"==typeof t?{...v[t]??{id:t,name:`${t[0].toUpperCase()}${t.slice(1)}`,provider:`is${t[0].toUpperCase()}${t.slice(1)}`}}:{id:"injected",name:"Injected",provider:e=>e?.ethereum}}return(0,w.K)(l=>({get icon(){return a().icon},get id(){return a().id},get name(){return a().name},type:b.type,async setup(){let r=await this.getProvider();r?.on&&e.target&&(i||(i=this.onConnect.bind(this),r.on("connect",i)),t||(t=this.onAccountsChanged.bind(this),r.on("accountsChanged",t)))},async connect({chainId:s,isReconnecting:a,withCapabilities:c}={}){let d=await this.getProvider();if(!d)throw new y.M;let p=[];if(a)p=await this.getAccounts().catch(()=>[]);else if(o)try{let e=await d.request({method:"wallet_requestPermissions",params:[{eth_accounts:{}}]});(p=e[0]?.caveats?.[0]?.value?.map(e=>u.K(e))).length>0&&(p=await this.getAccounts())}catch(e){if(e.code===h.ab.code)throw new h.ab(e);if(e.code===h.pT.code)throw e}try{p?.length||a||(p=(await d.request({method:"eth_requestAccounts"})).map(e=>(0,u.K)(e))),i&&(d.removeListener("connect",i),i=void 0),t||(t=this.onAccountsChanged.bind(this),d.on("accountsChanged",t)),r||(r=this.onChainChanged.bind(this),d.on("chainChanged",r)),n||(n=this.onDisconnect.bind(this),d.on("disconnect",n));let f=await this.getChainId();if(s&&f!==s){let e=await this.switchChain({chainId:s}).catch(e=>{if(e.code===h.ab.code)throw e;return{id:f}});f=e?.id??f}return o&&await l.storage?.removeItem(`${this.id}.disconnected`),e.target||await l.storage?.setItem("injected.connected",!0),{accounts:c?p.map(e=>({address:e,capabilities:{}})):p,chainId:f}}catch(e){if(e.code===h.ab.code)throw new h.ab(e);if(e.code===h.pT.code)throw new h.pT(e);throw e}},async disconnect(){let t=await this.getProvider();if(!t)throw new y.M;r&&(t.removeListener("chainChanged",r),r=void 0),n&&(t.removeListener("disconnect",n),n=void 0),i||(i=this.onConnect.bind(this),t.on("connect",i));try{await (0,p.F)(()=>t.request({method:"wallet_revokePermissions",params:[{eth_accounts:{}}]}),{timeout:100})}catch{}o&&await l.storage?.setItem(`${this.id}.disconnected`,!0),e.target||await l.storage?.removeItem("injected.connected")},async getAccounts(){let e=await this.getProvider();if(!e)throw new y.M;return(await e.request({method:"eth_accounts"})).map(e=>(0,u.K)(e))},async getChainId(){let e=await this.getProvider();if(!e)throw new y.M;return Number(await e.request({method:"eth_chainId"}))},async getProvider(){let e;if("undefined"==typeof window)return;let t=a();return(e="function"==typeof t.provider?t.provider(window):"string"==typeof t.provider?C(window,t.provider):t.provider)&&!e.removeListener&&("off"in e&&"function"==typeof e.off?e.removeListener=e.off:e.removeListener=()=>{}),e},async isAuthorized(){try{if(o&&await l.storage?.getItem(`${this.id}.disconnected`)||!e.target&&!await l.storage?.getItem("injected.connected"))return!1;if(!await this.getProvider()){if(void 0!==s&&!1!==s){let e=async()=>("undefined"!=typeof window&&window.removeEventListener("ethereum#initialized",e),!!await this.getProvider()),t="number"==typeof s?s:1e3;if(await Promise.race([..."undefined"!=typeof window?[new Promise(t=>window.addEventListener("ethereum#initialized",()=>t(e()),{once:!0}))]:[],new Promise(r=>setTimeout(()=>r(e()),t))]))return!0}throw new y.M}return!!(await (0,f.J)(()=>this.getAccounts())).length}catch{return!1}},async switchChain({addEthereumChainParameter:e,chainId:t}){let r=await this.getProvider();if(!r)throw new y.M;let i=l.chains.find(e=>e.id===t);if(!i)throw new h.x3(new m.X4);let n=new Promise(e=>{let r=i=>{"chainId"in i&&i.chainId===t&&(l.emitter.off("change",r),e())};l.emitter.on("change",r)});try{return await Promise.all([r.request({method:"wallet_switchEthereumChain",params:[{chainId:(0,g.eC)(t)}]}).then(async()=>{await this.getChainId()===t&&l.emitter.emit("change",{chainId:t})}),n]),i}catch(o){if(4902===o.code||o?.data?.originalError?.code===4902)try{let o,s;let{default:a,...c}=i.blockExplorers??{};e?.blockExplorerUrls?o=e.blockExplorerUrls:a&&(o=[a.url,...Object.values(c).map(e=>e.url)]),s=e?.rpcUrls?.length?e.rpcUrls:[i.rpcUrls.default?.http[0]??""];let d={blockExplorerUrls:o,chainId:(0,g.eC)(t),chainName:e?.chainName??i.name,iconUrls:e?.iconUrls,nativeCurrency:e?.nativeCurrency??i.nativeCurrency,rpcUrls:s};return await Promise.all([r.request({method:"wallet_addEthereumChain",params:[d]}).then(async()=>{if(await this.getChainId()===t)l.emitter.emit("change",{chainId:t});else throw new h.ab(Error("User rejected switch after adding network."))}),n]),i}catch(e){throw new h.ab(e)}if(o.code===h.ab.code)throw new h.ab(o);throw new h.x3(o)}},async onAccountsChanged(e){if(0===e.length)this.onDisconnect();else if(l.emitter.listenerCount("connect")){let e=(await this.getChainId()).toString();this.onConnect({chainId:e}),o&&await l.storage?.removeItem(`${this.id}.disconnected`)}else l.emitter.emit("change",{accounts:e.map(e=>(0,u.K)(e))})},onChainChanged(e){let t=Number(e);l.emitter.emit("change",{chainId:t})},async onConnect(e){let o=await this.getAccounts();if(0===o.length)return;let s=Number(e.chainId);l.emitter.emit("connect",{accounts:o,chainId:s});let a=await this.getProvider();a&&(i&&(a.removeListener("connect",i),i=void 0),t||(t=this.onAccountsChanged.bind(this),a.on("accountsChanged",t)),r||(r=this.onChainChanged.bind(this),a.on("chainChanged",r)),n||(n=this.onDisconnect.bind(this),a.on("disconnect",n)))},async onDisconnect(e){let t=await this.getProvider();e&&1013===e.code&&t&&(await this.getAccounts()).length||(l.emitter.emit("disconnect"),t&&(r&&(t.removeListener("chainChanged",r),r=void 0),n&&(t.removeListener("disconnect",n),n=void 0),i||(i=this.onConnect.bind(this),t.on("connect",i))))}}))}b.type="injected";let v={coinbaseWallet:{id:"coinbaseWallet",name:"Coinbase Wallet",provider:e=>e?.coinbaseWalletExtension?e.coinbaseWalletExtension:C(e,"isCoinbaseWallet")},metaMask:{id:"metaMask",name:"MetaMask",provider:e=>C(e,e=>{if(!e.isMetaMask||e.isBraveWallet&&!e._events&&!e._state)return!1;for(let t of["isApexWallet","isAvalanche","isBitKeep","isBlockWallet","isKuCoinWallet","isMathWallet","isOkxWallet","isOKExWallet","isOneInchIOSWallet","isOneInchAndroidWallet","isOpera","isPhantom","isPortal","isRabby","isTokenPocket","isTokenary","isUniswapWallet","isZerion"])if(e[t])return!1;return!0})},phantom:{id:"phantom",name:"Phantom",provider:e=>e?.phantom?.ethereum?e.phantom?.ethereum:C(e,"isPhantom")}};function C(e,t){function r(e){return"function"==typeof t?t(e):"string"!=typeof t||e[t]}let i=e.ethereum;return i?.providers?i.providers.find(e=>r(e)):i&&r(i)?i:void 0}var E=r(87336);class x{constructor(e){Object.defineProperty(this,"uid",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"_emitter",{enumerable:!0,configurable:!0,writable:!0,value:new E.v})}on(e,t){this._emitter.on(e,t)}once(e,t){this._emitter.once(e,t)}off(e,t){this._emitter.off(e,t)}emit(e,...t){let r=t[0];this._emitter.emit(e,{uid:this.uid,...r})}listenerCount(e){return this._emitter.listenerCount(e)}}function _(e,t){return JSON.parse(e,(e,r)=>{let i=r;return i?.__type==="bigint"&&(i=BigInt(i.value)),i?.__type==="Map"&&(i=new Map(i.value)),t?.(e,i)??i})}function A(e,t){return e.slice(0,t).join(".")||"."}function S(e,t){let{length:r}=e;for(let i=0;i{let i=r;return"bigint"==typeof i&&(i={__type:"bigint",value:r.toString()}),i instanceof Map&&(i={__type:"Map",value:Array.from(r.entries())}),t?.(e,i)??i},i),r??void 0)}let N={getItem:()=>null,setItem:()=>{},removeItem:()=>{}},k=256;var R=r(19676),O=r(1337),T=r(44199),P=r(52123);let $=[];function D(e){let t=[...e.state.connections.values()];return"reconnecting"===e.state.status||(0,P.v)($,t)?$:($=t,t)}var U=r(20148),L=r(70550),M=r(18849);async function B(e,t){let r;let{account:i,connector:n,...o}=t;return r="object"==typeof i&&"local"===i.type?e.getClient():await (0,M.e)(e,{account:i,connector:n}),(0,T.s)(r,L.l,"signMessage")({...o,...i?{account:i}:{}})}var j=r(34467);async function F(e,t){let{account:r,chainId:i,...o}=t,s=r??(0,n.B)(e).address,a=e.getClient({chainId:i});return(0,T.s)(a,j.ZE,"prepareTransactionRequest")({...o,...s?{account:s}:{}})}var W=r(41709);async function z(e,t){let r;let{account:i,chainId:n,connector:o,...s}=t;r="object"==typeof i&&i?.type==="local"?e.getClient({chainId:n}):await (0,M.e)(e,{account:i??void 0,assertChainId:!1,chainId:n,connector:o});let a=(0,T.s)(r,W.T,"sendTransaction");return await a({...s,...i?{account:i}:{},chain:n?{id:n}:null,gas:s.gas??void 0})}var H=r(93184),q=r(18470),V=r(8741);async function K(e,t){let r;let{chainId:i,connector:n,...o}=t;r=t.account?t.account:(await (0,M.e)(e,{account:t.account,assertChainId:!1,chainId:i,connector:n})).account;let s=e.getClient({chainId:i});return(0,T.s)(s,V.Q,"estimateGas")({...o,account:r})}var Z=r(54026);async function G(e,t){let r;if((r="function"==typeof t.connector?e._internal.connectors.setup(t.connector):t.connector).uid===e.state.current)throw new m.wi;try{e.setState(e=>({...e,status:"connecting"})),r.emitter.emit("message",{type:"connecting"});let{connector:i,...n}=t,o=await r.connect(n);return r.emitter.off("connect",e._internal.events.connect),r.emitter.on("change",e._internal.events.change),r.emitter.on("disconnect",e._internal.events.disconnect),await e.storage?.setItem("recentConnectorId",r.id),e.setState(e=>({...e,connections:new Map(e.connections).set(r.uid,{accounts:n.withCapabilities?o.accounts.map(e=>"object"==typeof e?e.address:e):o.accounts,chainId:o.chainId,connector:r}),current:r.uid,status:"connected"})),{accounts:n.withCapabilities?o.accounts.map(e=>"object"==typeof e?e:{address:e,capabilities:{}}):o.accounts,chainId:o.chainId}}catch(t){throw e.setState(e=>({...e,status:e.current?"connected":"disconnected"})),t}}async function Y(e,t){let{addEthereumChainParameter:r,chainId:i}=t,n=e.state.connections.get(t.connector?.uid??e.state.current);if(n){let e=n.connector;if(!e.switchChain)throw new y.O({connector:e});return await e.switchChain({addEthereumChainParameter:r,chainId:i})}let o=e.chains.find(e=>e.id===i);if(!o)throw new m.X4;return e.setState(e=>({...e,chainId:i})),o}var J=r(32807);async function X(e,t){let{address:r,blockNumber:i,blockTag:n,chainId:o}=t,s=e.getClient({chainId:o}),a=(0,T.s)(s,J.s,"getBalance"),l=await a(i?{address:r,blockNumber:i}:{address:r,blockTag:n}),c=e.chains.find(e=>e.id===o)??s.chain;return{decimals:c.nativeCurrency.decimals,symbol:c.nativeCurrency.symbol,value:l}}async function Q(e,t={}){let r;if(t.connector)r=t.connector;else{let{connections:t,current:i}=e.state,n=t.get(i);r=n?.connector}let i=e.state.connections;r&&(await r.disconnect(),r.emitter.off("change",e._internal.events.change),r.emitter.off("disconnect",e._internal.events.disconnect),r.emitter.on("connect",e._internal.events.connect),i.delete(r.uid)),e.setState(e=>{if(0===i.size)return{...e,connections:new Map,current:null,status:"disconnected"};let t=i.values().next().value;return{...e,connections:new Map(i),current:t.connector.uid}});{let t=e.state.current;if(!t)return;let r=e.state.connections.get(t)?.connector;if(!r)return;await e.storage?.setItem("recentConnectorId",r.id)}}var ee=r(81544);class et extends ee.G{constructor({value:e}){super(`Number \`${e}\` is not a valid decimal number.`,{name:"InvalidDecimalNumberError"})}}var er=r(39502),ei=r(42935),en=r(44649),eo=r(68903),es=r(84710),ea=r(88200),el=r(53357),ec=r(36801),ed=r(5688),eu=r(22472),eh=r(6943),ep=r(52921),ef=r(31182),eg=r(54090),em=r(43291),ey=r(72723),ew=r(60389),eb=r(35652),ev=r(65653),eC=r(78008);r(68642);var eE=r(39365);function ex(e){let t,r,i,n,o,s,a;let l=e.isNewChainsStale??!0;return(0,w.K)(c=>({id:"walletConnect",name:"WalletConnect",type:ex.type,provider:e.universalProvider,async setup(){let e=await this.getProvider().catch(()=>null);e&&(n||(n=this.onConnect.bind(this),e.on("connect",n)),s||(s=this.onSessionDelete.bind(this),e.on("session_delete",s)))},async connect({...e}={}){try{let t=eh.R.getCaipNetworks(),l=await this.getProvider();if(!l)throw new y.M;o||(o=this.onDisplayUri,l.on("display_uri",o));let c=await this.isChainsStale();l.session&&c&&await l.disconnect();let d=ed.OptionsController.state.universalProviderConfigOverride;if(!l.session||c){let r=eE.s.createNamespaces(t,d);await l.connect({optionalNamespaces:r,..."pairingTopic"in e?{pairingTopic:e.pairingTopic}:{}}),this.setRequestedChainsIds(t.map(e=>Number(e.id)))}let u=await this.getAccounts(),h=await this.getChainId(),p=l.session?.namespaces?.eip155?.chains,f=p?.some(e=>Number(e.split(":")[1])===h),g=1;f?g=h:p?.[0]&&(g=Number(p[0].split(":")[1])),o&&(l.removeListener("display_uri",o),o=void 0),n&&(l.removeListener("connect",n),n=void 0),r||(r=this.onAccountsChanged.bind(this),l.on("accountsChanged",r)),i||(i=this.onChainChanged.bind(this),l.on("chainChanged",i)),a||(a=this.onDisconnect.bind(this),l.on("disconnect",a)),s||(s=this.onSessionDelete.bind(this),l.on("session_delete",s));let m=d?.defaultChain;return l.setDefaultChain(m??`eip155:${g}`),{accounts:u,chainId:g}}catch(e){if(/(user rejected|connection request reset)/i.test(e?.message))throw new h.ab(e);throw e}},async disconnect(){let e=await this.getProvider();try{await e?.disconnect()}catch(e){if(!/No matching key/i.test(e.message))throw e}finally{i&&(e?.removeListener("chainChanged",i),i=void 0),a&&(e?.removeListener("disconnect",a),a=void 0),n||(n=this.onConnect.bind(this),e?.on("connect",n)),r&&(e?.removeListener("accountsChanged",r),r=void 0),s&&(e?.removeListener("session_delete",s),s=void 0),this.setRequestedChainsIds([])}},async getAccounts(){let e=await this.getProvider();if(!e?.session?.namespaces)return[];let t=e?.session?.namespaces[en.b.CHAIN.EVM]?.accounts,r=t?.map(e=>e.split(":")[2])??[],i=new Set;return r.filter(e=>{let t=e?.toLowerCase();return!i.has(t)&&(i.add(t),!0)})},async getProvider({chainId:r}={}){t||(t=e.universalProvider,t?.events.setMaxListeners(Number.POSITIVE_INFINITY));let i=ec.M.getActiveNamespace(),n=eh.R.getActiveCaipNetwork()?.id;if(r&&n!==r&&i){let e=ec.M.getStoredActiveCaipNetworkId(),t=i?eh.R.getCaipNetworks(i):[],r=t?.find(t=>t.id===e);r&&r.chainNamespace===en.b.CHAIN.EVM&&await this.switchChain?.({chainId:Number(r.id)})}return t},async getChainId(){let e=eh.R.getActiveCaipNetwork(en.b.CHAIN.EVM)?.id;if(e)return e;let t=await this.getProvider(),r=t.session?.namespaces[en.b.CHAIN.EVM]?.chains?.[0],i=eh.R.getCaipNetworks().find(e=>e.id===r);return i?.id},async isAuthorized(){try{let[e,t]=await Promise.all([this.getAccounts(),this.getProvider()]);if(!e.length)return!1;if(await this.isChainsStale()&&t.session)return await t.disconnect().catch(()=>{}),!1;return!0}catch{return!1}},async switchChain({addEthereumChainParameter:e,chainId:t}){let r=await this.getProvider();if(!r)throw new y.M;let i=eh.R.getCaipNetworks().find(e=>e.id===t);if(!i)throw new h.x3(new m.X4);try{await r.request({method:"wallet_switchEthereumChain",params:[{chainId:(0,g.eC)(t)}]}),i?.caipNetworkId&&r.setDefaultChain(i?.caipNetworkId),c.emitter.emit("change",{chainId:Number(t)});let e=await this.getRequestedChainsIds();return this.setRequestedChainsIds([...e,t]),{...i,id:i.id}}catch(n){if(/(?:user rejected)/iu.test(n.message))throw new h.ab(n);try{let n;n=e?.blockExplorerUrls?e.blockExplorerUrls:i.blockExplorers?.default.url?[i.blockExplorers?.default.url]:[];let o=i.rpcUrls?.chainDefault?.http||[],s={blockExplorerUrls:n,chainId:(0,g.eC)(t),chainName:i.name,iconUrls:e?.iconUrls,nativeCurrency:i.nativeCurrency,rpcUrls:o};await r.request({method:"wallet_addEthereumChain",params:[s]});let a=await this.getRequestedChainsIds();return this.setRequestedChainsIds([...a,t]),{...i,id:i.id}}catch(e){throw new h.ab(e)}}},onAccountsChanged(e){0===e.length?this.onDisconnect():c.emitter.emit("change",{accounts:e.map(e=>(0,u.K)(e))})},onChainChanged(e){let t=Number(e);c.emitter.emit("change",{chainId:t})},onConnect(e){this.setRequestedChainsIds(eh.R.getCaipNetworks().map(e=>Number(e.id)))},async onDisconnect(e){this.setRequestedChainsIds([]),c.emitter.emit("disconnect");let t=await this.getProvider();r&&(t.removeListener("accountsChanged",r),r=void 0),i&&(t.removeListener("chainChanged",i),i=void 0),a&&(t.removeListener("disconnect",a),a=void 0),s&&(t.removeListener("session_delete",s),s=void 0),n||(n=this.onConnect.bind(this),t.on("connect",n))},onDisplayUri(e){c.emitter.emit("message",{type:"display_uri",data:e})},onSessionDelete(){this.onDisconnect()},getNamespaceChainsIds(){if(!t?.session?.namespaces)return[];let e=t?.session?.namespaces[en.b.CHAIN.EVM]?.accounts;return e?.map(e=>Number.parseInt(e.split(":")[1]??""))??[]},async getRequestedChainsIds(){return[...new Set(await c.storage?.getItem(this.requestedChainsStorageKey)??[])]},async isChainsStale(){if(!l)return!1;let e=c.chains.map(e=>e.id),t=this.getNamespaceChainsIds();if(t.length&&!t.some(t=>e.includes(t)))return!1;let r=await this.getRequestedChainsIds();return!e.every(e=>r.includes(Number(e)))},async setRequestedChainsIds(e){await c.storage?.setItem(this.requestedChainsStorageKey,e)},get requestedChainsStorageKey(){return`${this.id}.requestedChains`}}))}ex.type="walletConnect";var e_=r(69887),eA=r(55543);let eS=(0,e_.sj)({pendingTransactions:0}),eI={state:eS,subscribeKey:(e,t)=>(0,eA.VW)(eS,e,t),increase(e){eS[e]+=1},decrease(e){eS[e]-=1},reset(e){eS[e]=0}};async function eN(e){if(el.j.isSafeApp()){let{safe:t}=await r.e(3326).then(r.bind(r,33326));if(t&&!e.some(e=>"safe"===e.type))return t()}return null}async function ek(e){try{let{baseAccount:t}=await r.e(3326).then(r.bind(r,33326));if(t&&!e.some(e=>"baseAccount"===e.id))return t()}catch(e){console.error("Failed to import Coinbase Wallet SDK:",e)}return null}let eR={enable:!1,pollingInterval:3e4};class eO extends ea.q{constructor(e){let t=ef.f.extendCaipNetworks(e.networks,{projectId:e.projectId,customNetworkImageUrls:{},customRpcUrls:e.customRpcUrls});super(),this.balancePromises={},this.namespace=en.b.CHAIN.EVM,this.adapterType=en.b.ADAPTER_TYPES.WAGMI,this.projectId=e.projectId,this.pendingTransactionsFilter={...eR,...e.pendingTransactionsFilter??{}},this.createConfig({...e,networks:t}),this.checkChainId()}construct(e){this.checkChainId(),this.setupWatchers()}async getAccounts(e){let t=this.getWagmiConnector(e.id);if(!t)return{accounts:[]};if(t.id===en.b.CONNECTOR_ID.AUTH){let e=await t.getProvider();if(!e?.user)return{accounts:[]};let{address:r,accounts:i}=e.user;return Promise.resolve({accounts:(i||[{address:r,type:"eoa"}]).map(e=>el.j.createAccount("eip155",e.address,e.type))})}let{addresses:r,address:i}=(0,n.B)(this.wagmiConfig);return Promise.resolve({accounts:[...new Set(r||[i])].map(e=>el.j.createAccount("eip155",e||"","eoa"))})}checkChainId(){let{chainId:e}=(0,n.B)(this.wagmiConfig);e&&this.emit("switchNetwork",{chainId:e})}getWagmiConnector(e){return this.wagmiConfig.connectors.find(t=>t.id===e)}createConfig(e){this.wagmiChains=e.networks.filter(e=>e.chainNamespace===en.b.CHAIN.EVM);let t={},r=[...e.connectors??[]];this.wagmiChains.forEach(r=>{let i=e.transports?.[r.id],n=ef.f.getCaipNetworkId(r);i?t[r.id]=ef.f.extendWagmiTransports(r,e.projectId,i):t[r.id]=ef.f.getViemTransport(r,e.projectId,e.customRpcUrls?.[n])}),this.wagmiConfig=function(e){let t;let{multiInjectedProviderDiscovery:r=!0,storage:n=function(e){let{deserialize:t=_,key:r="wagmi",serialize:i=I,storage:n=N}=e;function o(e){return e instanceof Promise?e.then(e=>e).catch(()=>null):e}return{...n,key:r,async getItem(e,i){let s=n.getItem(`${r}.${e}`),a=await o(s);return a?t(a)??null:i??null},async setItem(e,t){let s=`${r}.${e}`;null===t?await o(n.removeItem(s)):await o(n.setItem(s,i(t)))},async removeItem(e){await o(n.removeItem(`${r}.${e}`))}}}({storage:function(){let e="undefined"!=typeof window&&window.localStorage?window.localStorage:N;return{getItem:t=>e.getItem(t),removeItem(t){e.removeItem(t)},setItem(t,r){try{e.setItem(t,r)}catch{}}}}()}),syncConnectedChain:a=!0,ssr:c=!1,...u}=e,h="undefined"!=typeof window&&r?function(){let e=new Set,t=[],r=()=>(function(e){if("undefined"==typeof window)return;let t=t=>e(t.detail);return window.addEventListener("eip6963:announceProvider",t),window.dispatchEvent(new CustomEvent("eip6963:requestProvider")),()=>window.removeEventListener("eip6963:announceProvider",t)})(r=>{t.some(({info:e})=>e.uuid===r.info.uuid)||(t=[...t,r],e.forEach(e=>e(t,{added:[r]})))}),i=r();return{_listeners:()=>e,clear(){e.forEach(e=>e([],{removed:[...t]})),t=[]},destroy(){this.clear(),e.clear(),i?.()},findProvider:({rdns:e})=>t.find(t=>t.info.rdns===e),getProviders:()=>t,reset(){this.clear(),i?.(),i=r()},subscribe:(r,{emitImmediately:i}={})=>(e.add(r),i&&r(t,{added:t}),()=>e.delete(r))}}():void 0,p=d(()=>u.chains),f=d(()=>{let e=[],t=new Set;for(let r of u.connectors??[]){let i=g(r);if(e.push(i),!c&&i.rdns)for(let e of"string"==typeof i.rdns?[i.rdns]:i.rdns)t.add(e)}if(!c&&h)for(let r of h.getProviders())t.has(r.info.rdns)||e.push(g(y(r)));return e});function g(e){let t=new x(function(e=11){if(!i||k+e>512){i="",k=0;for(let e=0;e<256;e++)i+=(256+256*Math.random()|0).toString(16).substring(1)}return i.substring(k,k+++e)}()),r={...e({emitter:t,chains:p.getState(),storage:n,transports:u.transports}),emitter:t,uid:t.uid};return t.on("connect",O),r.setup?.(),r}function y(e){let{info:t}=e,r=e.provider;return b({target:{...t,id:t.rdns,provider:r}})}let w=new Map;function v(){return{chainId:p.getState()[0].id,connections:new Map,current:null,status:"disconnected"}}let C="0.0.0-canary-";t=R.i.startsWith(C)?Number.parseInt(R.i.replace(C,""),10):Number.parseInt(R.i.split(".")[0]??"0",10);let E=d(s(n?l(v,{migrate(e,r){if(r===t)return e;let i=v(),n=A(e,i.chainId);return{...i,chainId:n}},name:"store",partialize:e=>({connections:{__type:"Map",value:Array.from(e.connections.entries()).map(([e,t])=>{let{id:r,name:i,type:n,uid:o}=t.connector;return[e,{...t,connector:{id:r,name:i,type:n,uid:o}}]})},chainId:e.chainId,current:e.current}),merge(e,t){"object"==typeof e&&e&&"status"in e&&delete e.status;let r=A(e,t.chainId);return{...t,...e,chainId:r}},skipHydration:c,storage:n,version:t}):v));function A(e,t){return e&&"object"==typeof e&&"chainId"in e&&"number"==typeof e.chainId&&p.getState().some(t=>t.id===e.chainId)?e.chainId:t}function S(e){E.setState(t=>{let r=t.connections.get(e.uid);return r?{...t,connections:new Map(t.connections).set(e.uid,{accounts:e.accounts??r.accounts,chainId:e.chainId??r.chainId,connector:r.connector})}:t})}function O(e){"connecting"!==E.getState().status&&"reconnecting"!==E.getState().status&&E.setState(t=>{let r=f.getState().find(t=>t.uid===e.uid);return r?(r.emitter.listenerCount("connect")&&r.emitter.off("connect",S),r.emitter.listenerCount("change")||r.emitter.on("change",S),r.emitter.listenerCount("disconnect")||r.emitter.on("disconnect",T),{...t,connections:new Map(t.connections).set(e.uid,{accounts:e.accounts,chainId:e.chainId,connector:r}),current:e.uid,status:"connected"}):t})}function T(e){E.setState(t=>{let r=t.connections.get(e.uid);if(r){let e=r.connector;e.emitter.listenerCount("change")&&r.connector.emitter.off("change",S),e.emitter.listenerCount("disconnect")&&r.connector.emitter.off("disconnect",T),e.emitter.listenerCount("connect")||r.connector.emitter.on("connect",O)}if(t.connections.delete(e.uid),0===t.connections.size)return{...t,connections:new Map,current:null,status:"disconnected"};let i=t.connections.values().next().value;return{...t,connections:new Map(t.connections),current:i.connector.uid}})}return E.setState(v()),a&&E.subscribe(({connections:e,current:t})=>t?e.get(t)?.chainId:void 0,e=>{if(p.getState().some(t=>t.id===e))return E.setState(t=>({...t,chainId:e??t.chainId}))}),h?.subscribe(e=>{let t=new Set,r=new Set;for(let e of f.getState())if(t.add(e.id),e.rdns)for(let t of"string"==typeof e.rdns?[e.rdns]:e.rdns)r.add(t);let i=[];for(let n of e){if(r.has(n.info.rdns))continue;let e=g(y(n));t.has(e.id)||i.push(e)}(!n||E.persist.hasHydrated())&&f.setState(e=>[...e,...i],!0)}),{get chains(){return p.getState()},get connectors(){return f.getState()},storage:n,getClient:function(e={}){let t;let r=e.chainId??E.getState().chainId,i=p.getState().find(e=>e.id===r);if(e.chainId&&!i)throw new m.X4;{let e=w.get(E.getState().chainId);if(e&&!i)return e;if(!i)throw new m.X4}{let e=w.get(r);if(e)return e}if(u.client)t=u.client({chain:i});else{let e=i.id,r=p.getState().map(e=>e.id),n={};for(let[t,i]of Object.entries(u))if("chains"!==t&&"client"!==t&&"connectors"!==t&&"transports"!==t){if("object"==typeof i){if(e in i)n[t]=i[e];else{if(r.some(e=>e in i))continue;n[t]=i}}else n[t]=i}t=(0,o.e)({...n,chain:i,batch:n.batch??{multicall:!0},transport:t=>u.transports[e]({...t,connectors:f})})}return w.set(r,t),t},get state(){return E.getState()},setState(e){let t;t="function"==typeof e?e(E.getState()):e;let r=v();"object"!=typeof t&&(t=r),Object.keys(r).some(e=>!(e in t))&&(t=r),E.setState(t,!0)},subscribe:(e,t,r)=>E.subscribe(e,t,r?{...r,fireImmediately:r.emitImmediately}:void 0),_internal:{mipd:h,async revalidate(){let e=E.getState(),t=e.connections,r=e.current;for(let[,e]of t){let i=e.connector;i.isAuthorized&&await i.isAuthorized()||(t.delete(i.uid),r!==i.uid||(r=null))}E.setState(e=>({...e,connections:t,current:r}))},store:E,ssr:!!c,syncConnectedChain:a,transports:u.transports,chains:{setState(e){let t="function"==typeof e?e(p.getState()):e;if(0!==t.length)return p.setState(t,!0)},subscribe:e=>p.subscribe(e)},connectors:{providerDetailToConnector:y,setup:g,setState:e=>f.setState("function"==typeof e?e(f.getState()):e,!0),subscribe:e=>f.subscribe(e)},events:{change:S,connect:O,disconnect:T}}}}({...e,chains:this.wagmiChains,connectors:r,transports:t})}setupWatchPendingTransactions(){if(!this.pendingTransactionsFilter.enable||this.unwatchPendingTransactions)return;this.unwatchPendingTransactions=function(e,t){let r,i;let{syncConnectedChain:n=e._internal.syncConnectedChain,...o}=t,s=t=>{r&&r();let i=e.getClient({chainId:t});return r=(0,T.s)(i,O.O,"watchPendingTransactions")(o)},a=s(t.chainId);return n&&!t.chainId&&(i=e.subscribe(({chainId:e})=>e,async e=>s(e))),()=>{a?.(),i?.()}}(this.wagmiConfig,{pollingInterval:this.pendingTransactionsFilter.pollingInterval,onError:()=>{},onTransactions:()=>{this.emit("pendingTransactions"),eI.increase("pendingTransactions")}});let e=eI.subscribeKey("pendingTransactions",t=>{t>=en.b.LIMITS.PENDING_TRANSACTIONS&&(this.unwatchPendingTransactions?.(),e())})}setupWatchers(){!function(e,t){let{onChange:r}=t;e.subscribe(()=>D(e),r,{equalityFn:P.v})}(this.wagmiConfig,{onChange:e=>{this.clearConnections(),this.addConnection(...e.map(e=>{let t=this.getCaipNetworks().find(t=>t.id===e.chainId),r=e.connector.id===en.b.CONNECTOR_ID.AUTH;return{accounts:e.accounts.map(e=>({address:this.toChecksummedAddress(e)})),caipNetwork:t,connectorId:e.connector.id,auth:r?{name:ec.M.getConnectedSocialProvider(),username:ec.M.getConnectedSocialUsername()}:void 0}}))}}),(0,U.Y)(this.wagmiConfig,{onChange:(e,t)=>{if("disconnected"===e.status&&t.address&&this.emit("disconnect"),e?.chainId&&e?.chainId!==t?.chainId&&this.emit("switchNetwork",{chainId:e.chainId}),"connected"===e.status){let r=e.address!==t?.address,i=e.connector.id!==t.connector?.id,n="connected"!==t.status;(r||i||n)&&(this.setupWatchPendingTransactions(),this.handleAccountChanged({address:e.address,chainId:e.chainId,connector:e.connector}))}}})}async addThirdPartyConnectors(){let e=[],{enableCoinbase:t}=ed.OptionsController.state||{};if(!1!==t){let t=await ek(this.wagmiConfig.connectors);t&&e.push(t)}let r=await eN(this.wagmiConfig.connectors);r&&e.push(r),await Promise.all(e.map(e=>{let t=this.configureInternalConnector(e);return this.addWagmiConnector(t)}))}addWagmiConnectors(){let e=[];!1!==ed.OptionsController.state.enableInjected&&e.push(b({shimDisconnect:!0}));let{features:t,remoteFeatures:r,projectId:i,enableAuthLogger:n}=ed.OptionsController.state,o=r?.email??t?.email??!0,s=r?.socials??t?.socials,a=Array.isArray(s)&&s?.length>0;(o||a)&&e.push(function(e){let t,r,i=[];function n(e){let t=eh.R.getCaipNetworks(en.b.CHAIN.EVM),r=Number(eo.p.parseEvmChainId(e));if(!t.some(t=>String(t.id)===String(e))){let e=eh.R.getActiveCaipNetwork(en.b.CHAIN.EVM)?.id||t[0]?.id;e&&Number.isInteger(Number(e))&&(r=Number(e))}if(!r)throw Error("ChainId not found in networks");return r}async function o(r={}){let o=(t||(t=eC.D.getInstance({projectId:e.options.projectId,chainId:em.eq()?.caipNetworkId,enableLogger:e.options.enableAuthLogger,onTimeout:e=>{"iframe_load_failed"===e?ey.AlertController.open(ev.j.ALERT_ERRORS.IFRAME_LOAD_FAILED,"error"):"iframe_request_timeout"===e?ey.AlertController.open(ev.j.ALERT_ERRORS.IFRAME_REQUEST_TIMEOUT,"error"):"unverified_domain"===e&&ey.AlertController.open(ev.j.ALERT_ERRORS.UNVERIFIED_DOMAIN,"error")},abortController:ev.j.EmbeddedWalletAbortController,getActiveCaipNetwork:e=>(0,em.eq)(e),getCaipNetworks:e=>eh.R.getCaipNetworks(e)})),t),s=r.chainId;if(r.isReconnecting){let t=eo.p.parseEvmChainId(o.getLastUsedChainId()||""),r=e.chains?.[0].id;if(!(s=t||r))throw Error("ChainId not found in provider")}let a=(0,em.r9)("eip155"),{address:l,chainId:c,accounts:d}=await ew.w.authConnectorAuthenticate({authConnector:o,chainId:s,preferredAccountType:a,socialUri:r.socialUri,chainNamespace:en.b.CHAIN.EVM});i=d?.map(e=>e.address)||[l];let u=n(c);return{accounts:i,account:l,chainId:u,chain:{id:u,unsupported:!1}}}return(0,w.K)(t=>({id:en.b.CONNECTOR_ID.AUTH,name:en.b.CONNECTOR_NAMES.AUTH,type:"AUTH",chain:en.b.CHAIN.EVM,async connect(e={}){if(r){let t=await r;return{accounts:e.withCapabilities?t.accounts.map(e=>({address:e,capabilities:{}})):t.accounts,chainId:t.chainId}}r||(r=new Promise(t=>{t(o(e))}));let t=await r;return r=void 0,{accounts:e.withCapabilities?t.accounts.map(e=>({address:e,capabilities:{}})):t.accounts,chainId:t.chainId}},async disconnect(){let e=await this.getProvider();await e.disconnect()},getAccounts:()=>i?.length?(t.emitter.emit("change",{accounts:i}),Promise.resolve(i)):Promise.resolve([]),async getProvider(){return this.provider||(this.provider=eC.D.getInstance({projectId:e.options.projectId,chainId:em.eq()?.caipNetworkId,enableLogger:e.options.enableAuthLogger,abortController:ev.j.EmbeddedWalletAbortController,onTimeout:e=>{"iframe_load_failed"===e?ey.AlertController.open(ev.j.ALERT_ERRORS.IFRAME_LOAD_FAILED,"error"):"iframe_request_timeout"===e?ey.AlertController.open(ev.j.ALERT_ERRORS.IFRAME_REQUEST_TIMEOUT,"error"):"unverified_domain"===e&&ey.AlertController.open(ev.j.ALERT_ERRORS.UNVERIFIED_DOMAIN,"error")},getActiveCaipNetwork:e=>(0,em.eq)(e),getCaipNetworks:e=>eh.R.getCaipNetworks(e)})),Promise.resolve(this.provider)},async getChainId(){let e=await this.getProvider(),{chainId:t}=await e.getChainId();return n(t)},async isAuthorized(){let e=eh.R.state.activeChain===en.b.CHAIN.EVM;return(!en.b.AUTH_CONNECTOR_SUPPORTED_CHAINS.some(e=>eb.ConnectorController.getConnectorId(e)===en.b.CONNECTOR_ID.AUTH)||!!e)&&Promise.resolve((await this.getProvider()).getLoginEmailUsed())},async switchChain({chainId:e}){try{let r=t.chains.find(t=>t.id===e);if(!r)throw new h.x3(Error("chain not found on connector."));let n=await this.getProvider(),o=(0,em.r9)("eip155"),s=await n.connect({chainId:e,preferredAccountType:o});return i=s?.accounts?.map(e=>e.address)||[s.address],t.emitter.emit("change",{chainId:Number(e),accounts:i}),r}catch(e){if(e instanceof Error)throw new h.x3(e);throw e}},onAccountsChanged(e){0===e.length?this.onDisconnect():t.emitter.emit("change",{accounts:e.map(u.K)})},onChainChanged(e){let r=Number(e);t.emitter.emit("change",{chainId:r})},async onDisconnect(e){let t=await this.getProvider();await t.disconnect()}}))}({chains:this.wagmiChains,options:{projectId:i,enableAuthLogger:n}})),e.forEach(e=>{this.configureInternalConnector(e)})}configureInternalConnector(e){let t=this.wagmiConfig._internal.connectors.setup(e);return this.wagmiConfig._internal.connectors.setState(e=>[...e,t]),t}async handleAccountChanged({address:e,chainId:t,connector:r}){if(!this.namespace)throw Error("WagmiAdapter:handleAccountChanged - namespace is required");let i=await r.getProvider().catch(()=>void 0);this.emit("accountChanged",{address:this.toChecksummedAddress(e),chainId:t,connector:{id:r.id,name:es.C.ConnectorNamesMap[r.id]??r.name,imageId:es.C.ConnectorImageIds[r.id],type:es.C.ConnectorTypesMap[r.type]??"EXTERNAL",info:r.id===en.b.CONNECTOR_ID.INJECTED?void 0:{rdns:r.id},provider:i,chain:this.namespace,chains:[]}})}async signMessage(e){try{return{signature:await B(this.wagmiConfig,{message:e.message,account:e.address})}}catch(e){throw Error("WagmiAdapter:signMessage - Sign message failed")}}async sendTransaction(e){let{chainId:t,address:r}=(0,n.B)(this.wagmiConfig),i=this.wagmiChains?.find(e=>e.id===t),o={account:r,to:e.to,value:Number.isNaN(Number(e.value))?BigInt(0):BigInt(e.value),gas:e.gas?BigInt(e.gas):void 0,gasPrice:e.gasPrice?BigInt(e.gasPrice):void 0,data:e.data,chain:i,type:"legacy",parameters:["nonce"]};await F(this.wagmiConfig,o);let s=await z(this.wagmiConfig,o);return await (0,H.e)(this.wagmiConfig,{hash:s,timeout:25e3}),{hash:s}}async writeContract(e){let{caipNetwork:t,...r}=e,i=Number(eo.p.caipNetworkIdToNumber(t.caipNetworkId)),n=this.wagmiChains?.find(e=>e.id===i);return{hash:await (0,q.n)(this.wagmiConfig,{chain:n,address:r.tokenAddress,account:r.fromAddress,abi:r.abi,functionName:r.method,args:r.args,__mode:"prepared"})}}async estimateGas(e){try{return{gas:await K(this.wagmiConfig,{account:e.address,to:e.to,data:e.data,type:"legacy"})}}catch(e){throw Error("WagmiAdapter:estimateGas - error estimating gas")}}parseUnits(e){return function(e,t){if(!/^(-?)([0-9]*)\.?([0-9]*)$/.test(e))throw new et({value:e});let[r,i="0"]=e.split("."),n=r.startsWith("-");if(n&&(r=r.slice(1)),i=i.replace(/(0+)$/,""),0===t)1===Math.round(Number(`.${i}`))&&(r=`${BigInt(r)+1n}`),i="";else if(i.length>t){let[e,n,o]=[i.slice(0,t-1),i.slice(t-1,t),i.slice(t)],s=Math.round(Number(`${n}.${o}`));(i=s>9?`${BigInt(e)+BigInt(1)}0`.padStart(e.length+1,"0"):`${e}${s}`).length>t&&(i=i.slice(1),r=`${BigInt(r)+1n}`),i=i.slice(0,t)}else i=i.padEnd(t,"0");return BigInt(`${n?"-":""}${r}${i}`)}(e.value,e.decimals)}formatUnits(e){return(0,er.b)(e.value,e.decimals)}async addWagmiConnector(e){let t;if(!this.namespace)throw Error("WagmiAdapter:addWagmiConnector - namespace is required");let{enableEIP6963:r}=ed.OptionsController.state||{};if(e.type===en.b.CONNECTOR_ID.INJECTED&&!1===r||e.id===en.b.CONNECTOR_ID.AUTH||e.id===en.b.CONNECTOR_ID.WALLET_CONNECT)return;e.id!==en.b.CONNECTOR_ID.BASE_ACCOUNT&&(t=await e.getProvider().catch(()=>void 0));let i=eu.W.state.connectorImages;this.addConnector({id:e.id,explorerId:es.C.ConnectorExplorerIds[e.id]??es.C.ConnectorExplorerIds[e.name],imageUrl:i?.[e.id]??e.icon,name:es.C.ConnectorNamesMap[e.id]??e.name,imageId:es.C.ConnectorImageIds[e.id],type:es.C.ConnectorTypesMap[e.type]??"EXTERNAL",info:e.id===en.b.CONNECTOR_ID.INJECTED?void 0:{rdns:e.id},provider:t,chain:this.namespace,chains:[]})}async syncConnectors(){!function(e,t){let{onChange:r}=t;e._internal.connectors.subscribe((e,t)=>{r(Object.values(e),t)})}(this.wagmiConfig,{onChange:e=>{e.forEach(e=>this.addWagmiConnector(e))}}),this.addWagmiConnectors(),await Promise.all(this.wagmiConfig.connectors.map(e=>this.addWagmiConnector(e))),await this.addThirdPartyConnectors()}async syncConnections(){let e=this.connectors.filter(e=>{let{hasDisconnected:t,hasConnected:r}=eg.g.getConnectorStorageInfo(e.id,this.namespace);return!t&&r}).map(e=>this.getWagmiConnector(e.id)).filter(Boolean);await (0,Z.G)(this.wagmiConfig,{connectors:e})}async syncConnection(e){let{id:t,chainId:r}=e,i=D(this.wagmiConfig).find(e=>e.connector.id===t),n=this.getWagmiConnector(t),o=await n?.getProvider();if(el.j.isSafeApp()&&t===en.b.CONNECTOR_ID.SAFE&&!i?.accounts.length){let e=this.getWagmiConnector("safe");if(e){let t=await G(this.wagmiConfig,{connector:e,chainId:Number(r)}),n=await e.getProvider();return{chainId:Number(r),address:this.toChecksummedAddress(t.accounts[0]),provider:n,type:i?.connector.type?.toUpperCase(),id:i?.connector.id}}}return{chainId:Number(i?.chainId),address:this.toChecksummedAddress(i?.accounts[0]),provider:o,type:i?.connector.type?.toUpperCase(),id:i?.connector.id}}async connectWalletConnect(e){try{let t=this.getWalletConnectConnector();await t.authenticate();let r=this.getWagmiConnector("walletConnect");if(!r)throw Error("UniversalAdapter:connectWalletConnect - connector not found");let i=await G(this.wagmiConfig,{connector:r,chainId:e?Number(e):void 0});return i.chainId!==Number(e)&&await Y(this.wagmiConfig,{chainId:i.chainId}),{clientId:await t.provider.client.core.crypto.getClientId()}}catch(e){if(e instanceof h.ab||ei.jD.isUserRejectedRequestError(e))throw new ei.ab(e);throw e}}async connect(e){try{let{id:t,address:r,provider:i,type:n,info:o,chainId:s,socialUri:a}=e,l=this.getWagmiConnector(t);if(!l)throw Error("connectionControllerClient:connectExternal - connector is undefined");i&&o&&l.id===en.b.CONNECTOR_ID.EIP6963&&l.setEip6963Wallet?.({provider:i,info:o});let c=this.wagmiConfig.state?.connections?.get(l.uid);if(c){await this.wagmiConfig.storage?.setItem("recentConnectorId",l.id);let e=[...c.accounts].sort((e,t)=>eg.g.isLowerCaseMatch(e,r)?-1:eg.g.isLowerCaseMatch(t,r)?1:0);return this.wagmiConfig?.setState(t=>({...t,connections:new Map(t.connections).set(l.uid,{accounts:e,chainId:c.chainId,connector:c.connector}),current:l.uid,status:"connected"})),{address:this.toChecksummedAddress(e[0]),chainId:c.chainId,provider:i,type:n,id:t}}let d=await G(this.wagmiConfig,{connector:l,chainId:s?Number(s):void 0,socialUri:a}),u=i??await l.getProvider();return{address:this.toChecksummedAddress(d.accounts[0]),chainId:d.chainId,provider:u,type:n,id:t}}catch(e){if(e instanceof h.ab||ei.jD.isUserRejectedRequestError(e))throw new ei.ab(e);throw e}}get connections(){return Array.from(this.wagmiConfig.state.connections.values()).map(e=>({accounts:e.accounts.map(e=>({address:this.toChecksummedAddress(e)})),connectorId:e.connector.id}))}async reconnect(e){let{id:t}=e,r=this.getWagmiConnector(t);if(!r)throw Error("connectionControllerClient:connectExternal - connector is undefined");await (0,Z.G)(this.wagmiConfig,{connectors:[r]})}async getBalance(e){let t=e.address,r=this.getCaipNetworks().find(t=>t.id===e.chainId);if(!t)return Promise.resolve({balance:"0.00",symbol:"ETH"});if(r&&this.wagmiConfig){let t=`${r.caipNetworkId}:${e.address}`,i=this.balancePromises[t];if(i)return i;let n=ec.M.getNativeBalanceCacheForCaipAddress(t);return n?{balance:n.balance,symbol:n.symbol}:(this.balancePromises[t]=new Promise(async i=>{try{let n=Number(e.chainId),o=await X(this.wagmiConfig,{address:e.address,chainId:n,token:e.tokens?.[r.caipNetworkId]?.address});ec.M.updateNativeBalanceCache({caipAddress:t,balance:o.formatted,symbol:o.symbol,timestamp:Date.now()}),i({balance:o.formatted,symbol:o.symbol})}catch(e){console.warn("Appkit:WagmiAdapter:getBalance - Error getting balance",e),i({balance:"0.00",symbol:"ETH"})}}).finally(()=>{delete this.balancePromises[t]}),this.balancePromises[t]||{balance:"0.00",symbol:"ETH"})}return{balance:"",symbol:""}}getWalletConnectProvider(){return this.getWagmiConnector("walletConnect")?.provider}async disconnect(e){if(e.id){let t=this.getWagmiConnector(e.id),r=D(this.wagmiConfig).find(t=>eg.g.isLowerCaseMatch(t.connector.id,e.id));return(await Q(this.wagmiConfig,{connector:t}),!1===ed.OptionsController.state.enableReconnect&&this.deleteConnection(e.id),r)?{connections:[{accounts:r.accounts.map(e=>({address:this.toChecksummedAddress(e)})),connectorId:r.connector.id}]}:{connections:[]}}return this.disconnectAll()}async disconnectAll(){let e=D(this.wagmiConfig),t=await Promise.allSettled(e.map(async e=>{let t=this.getWagmiConnector(e.connector.id);return t&&await Q(this.wagmiConfig,{connector:t}),e}));return this.wagmiConfig.state.connections.clear(),{connections:t.filter(e=>"fulfilled"===e.status).map(({value:e})=>({accounts:e.accounts.map(e=>({address:this.toChecksummedAddress(e)})),connectorId:e.connector.id}))}}async switchNetwork(e){let{caipNetwork:t}=e,r=this.wagmiConfig.chains.find(e=>e.id.toString()===t.id.toString());if(!r)throw Error("connectionControllerClient:switchNetwork - wagmiChain is undefined");let{name:i,nativeCurrency:n,rpcUrls:o,blockExplorers:s,id:a}=r,l=t.rpcUrls?.chainDefault?.http?.[0]??o.default.http[0]??"",c=s?.default.url??t.blockExplorers?.default?.url??"",d=n??t.nativeCurrency,u=i??t.name;await Y(this.wagmiConfig,{chainId:a,addEthereumChainParameter:{chainName:u,nativeCurrency:d,rpcUrls:[l],blockExplorerUrls:[c]}}),await super.switchNetwork(e)}async getCapabilities(e){if(!this.wagmiConfig)throw Error("connectionControllerClient:getCapabilities - wagmiConfig is undefined");let t=D(this.wagmiConfig)[0],r=t?this.getWagmiConnector(t.connector.id):null;if(!r)throw Error("connectionControllerClient:getCapabilities - connector is undefined");let i=await r.getProvider();if(!i)throw Error("connectionControllerClient:getCapabilities - provider is undefined");return await i.request({method:"wallet_getCapabilities",params:[e]})}async grantPermissions(e){if(!this.wagmiConfig)throw Error("connectionControllerClient:grantPermissions - wagmiConfig is undefined");let t=D(this.wagmiConfig)[0],r=t?this.getWagmiConnector(t.connector.id):null;if(!r)throw Error("connectionControllerClient:grantPermissions - connector is undefined");let i=await r.getProvider();if(!i)throw Error("connectionControllerClient:grantPermissions - provider is undefined");return i.request({method:"wallet_grantPermissions",params:e})}async revokePermissions(e){if(!this.wagmiConfig)throw Error("connectionControllerClient:revokePermissions - wagmiConfig is undefined");let t=D(this.wagmiConfig)[0],r=t?this.getWagmiConnector(t.connector.id):null;if(!r)throw Error("connectionControllerClient:revokePermissions - connector is undefined");let i=await r.getProvider();if(!i)throw Error("connectionControllerClient:revokePermissions - provider is undefined");return i.request({method:"wallet_revokePermissions",params:e})}async walletGetAssets(e){if(!this.wagmiConfig)throw Error("connectionControllerClient:walletGetAssets - wagmiConfig is undefined");let t=D(this.wagmiConfig)[0],r=t?this.getWagmiConnector(t.connector.id):null;if(!r)throw Error("connectionControllerClient:walletGetAssets - connector is undefined");let i=await r.getProvider();if(!i)throw Error("connectionControllerClient:walletGetAssets - provider is undefined");return i.request({method:"wallet_getAssets",params:[e]})}setAuthProvider(e){if(!this.namespace)throw Error("WagmiAdapter:setAuthProvider - namespace is required");this.addConnector({id:en.b.CONNECTOR_ID.AUTH,type:"AUTH",name:en.b.CONNECTOR_NAMES.AUTH,provider:e,imageId:es.C.ConnectorImageIds[en.b.CONNECTOR_ID.AUTH],chain:this.namespace,chains:[]})}async setUniversalProvider(e){e.on("connect",()=>{let e=D(this.wagmiConfig),t=this.getWagmiConnector("walletConnect");if(t&&!e.find(e=>e.connector.id===t.id)){if("eip155"===eh.R.state.activeChain)return;(0,Z.G)(this.wagmiConfig,{connectors:[t]})}});let t=ex({universalProvider:e});return this.configureInternalConnector(t),this.addConnector(new ep.z({provider:e,caipNetworks:this.getCaipNetworks(),namespace:"eip155"})),Promise.resolve()}toChecksummedAddress(e){return(0,u.x)(e.toLowerCase())}}},44649:function(e,t,r){"use strict";r.d(t,{b:function(){return n}});var i=r(40257);let n={WC_NAME_SUFFIX:".reown.id",WC_NAME_SUFFIX_LEGACY:".wcn.id",BLOCKCHAIN_API_RPC_URL:"https://rpc.walletconnect.org",PULSE_API_URL:"https://pulse.walletconnect.org",W3M_API_URL:"https://api.web3modal.org",CONNECTOR_ID:{WALLET_CONNECT:"walletConnect",INJECTED:"injected",WALLET_STANDARD:"announced",COINBASE:"coinbaseWallet",COINBASE_SDK:"coinbaseWalletSDK",BASE_ACCOUNT:"baseAccount",SAFE:"safe",LEDGER:"ledger",OKX:"okx",EIP6963:"eip6963",AUTH:"AUTH"},CONNECTOR_NAMES:{AUTH:"Auth"},AUTH_CONNECTOR_SUPPORTED_CHAINS:["eip155","solana"],LIMITS:{PENDING_TRANSACTIONS:99},CHAIN:{EVM:"eip155",SOLANA:"solana",POLKADOT:"polkadot",BITCOIN:"bip122",TON:"ton"},CHAIN_NAME_MAP:{eip155:"EVM Networks",solana:"Solana",polkadot:"Polkadot",bip122:"Bitcoin",cosmos:"Cosmos",sui:"Sui",stacks:"Stacks",ton:"TON"},ADAPTER_TYPES:{BITCOIN:"bitcoin",SOLANA:"solana",WAGMI:"wagmi",ETHERS:"ethers",ETHERS5:"ethers5",TON:"ton"},USDT_CONTRACT_ADDRESSES:["0xdac17f958d2ee523a2206206994597c13d831ec7","0xc2132d05d31c914a87c6611c10748aeb04b58e8f","0x9702230a8ea53601f5cd2dc00fdbc13d4df4a8c7","0x919C1c267BC06a7039e03fcc2eF738525769109c","0x48065fbBE25f71C9282ddf5e1cD6D6A887483D5e","0x55d398326f99059fF775485246999027B3197955","0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9"],SOLANA_SPL_TOKEN_ADDRESSES:{SOL:"So11111111111111111111111111111111111111112"},HTTP_STATUS_CODES:{SERVER_ERROR:500,TOO_MANY_REQUESTS:429,SERVICE_UNAVAILABLE:503,FORBIDDEN:403},UNSUPPORTED_NETWORK_NAME:"Unknown Network",SECURE_SITE_SDK_ORIGIN:(void 0!==i&&void 0!==i.env?i.env.NEXT_PUBLIC_SECURE_SITE_ORIGIN:void 0)||"https://secure.walletconnect.org",REMOTE_FEATURES_ALERTS:{MULTI_WALLET_NOT_ENABLED:{DEFAULT:{displayMessage:"Multi-Wallet Not Enabled",debugMessage:"Multi-wallet support is not enabled. Please enable it in your AppKit configuration at cloud.reown.com."},CONNECTIONS_HOOK:{displayMessage:"Multi-Wallet Not Enabled",debugMessage:"Multi-wallet support is not enabled. Please enable it in your AppKit configuration at cloud.reown.com to use the useAppKitConnections hook."},CONNECTION_HOOK:{displayMessage:"Multi-Wallet Not Enabled",debugMessage:"Multi-wallet support is not enabled. Please enable it in your AppKit configuration at cloud.reown.com to use the useAppKitConnection hook."}},HEADLESS_NOT_ENABLED:{DEFAULT:{displayMessage:"",debugMessage:"Headless support is not enabled. Please enable it with the features.headless option in the AppKit configuration and make sure your current plan supports it."}}},IS_DEVELOPMENT:void 0!==i&&!1,DEFAULT_ALLOWED_ANCESTORS:["http://localhost:*","https://localhost:*","http://127.0.0.1:*","https://127.0.0.1:*","https://*.pages.dev","https://*.vercel.app","https://*.ngrok-free.app","https://secure-mobile.walletconnect.com","https://secure-mobile.walletconnect.org"],METMASK_CONNECTOR_NAME:"MetaMask",TRUST_CONNECTOR_NAME:"Trust Wallet",SOLFLARE_CONNECTOR_NAME:"Solflare",PHANTOM_CONNECTOR_NAME:"Phantom",COIN98_CONNECTOR_NAME:"Coin98",MAGIC_EDEN_CONNECTOR_NAME:"Magic Eden",BACKPACK_CONNECTOR_NAME:"Backpack",BITGET_CONNECTOR_NAME:"Bitget Wallet",FRONTIER_CONNECTOR_NAME:"Frontier",XVERSE_CONNECTOR_NAME:"Xverse Wallet",LEATHER_CONNECTOR_NAME:"Leather",OKX_CONNECTOR_NAME:"OKX Wallet",BINANCE_CONNECTOR_NAME:"Binance Wallet",EIP155:"eip155",ADD_CHAIN_METHOD:"wallet_addEthereumChain",EIP6963_ANNOUNCE_EVENT:"eip6963:announceProvider",EIP6963_REQUEST_EVENT:"eip6963:requestProvider",CONNECTOR_RDNS_MAP:{coinbaseWallet:"com.coinbase.wallet",coinbaseWalletSDK:"com.coinbase.wallet"},CONNECTOR_TYPE_EXTERNAL:"EXTERNAL",CONNECTOR_TYPE_WALLET_CONNECT:"WALLET_CONNECT",CONNECTOR_TYPE_INJECTED:"INJECTED",CONNECTOR_TYPE_ANNOUNCED:"ANNOUNCED",CONNECTOR_TYPE_AUTH:"AUTH",CONNECTOR_TYPE_MULTI_CHAIN:"MULTI_CHAIN",CONNECTOR_TYPE_W3M_AUTH:"AUTH"}},41613:function(e,t,r){"use strict";r.d(t,{g:function(){return a}});let i=[{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"_to",type:"address"},{name:"_value",type:"uint256"}],outputs:[{name:"",type:"bool"}]},{type:"function",name:"transferFrom",stateMutability:"nonpayable",inputs:[{name:"_from",type:"address"},{name:"_to",type:"address"},{name:"_value",type:"uint256"}],outputs:[{name:"",type:"bool"}]}],n=[{type:"function",name:"approve",stateMutability:"nonpayable",inputs:[{name:"spender",type:"address"},{name:"amount",type:"uint256"}],outputs:[{type:"bool"}]}],o=[{type:"function",name:"transfer",stateMutability:"nonpayable",inputs:[{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[]},{type:"function",name:"transferFrom",stateMutability:"nonpayable",inputs:[{name:"sender",type:"address"},{name:"recipient",type:"address"},{name:"amount",type:"uint256"}],outputs:[{name:"",type:"bool"}]}];var s=r(44649);let a={getERC20Abi:e=>s.b.USDT_CONTRACT_ADDRESSES.includes(e)?o:i,getSwapAbi:()=>n}},41262:function(e,t,r){"use strict";r.d(t,{E:function(){return c}});var i=r(71096),n=r(70939),o=r(45721),s=r(96961);i.extend(o),i.extend(s);let a={...n,name:"en-web3-modal",relativeTime:{future:"in %s",past:"%s ago",s:"%d sec",m:"1 min",mm:"%d min",h:"1 hr",hh:"%d hrs",d:"1 d",dd:"%d d",M:"1 mo",MM:"%d mo",y:"1 yr",yy:"%d yr"}},l=["January","February","March","April","May","June","July","August","September","October","November","December"];i.locale("en-web3-modal",a);let c={getMonthNameByIndex:e=>l[e],getYear:(e=new Date().toISOString())=>i(e).year(),getRelativeDateFromNow:e=>i(e).locale("en-web3-modal").fromNow(!0),formatDate:(e,t="DD MMM")=>i(e).format(t)}},42935:function(e,t,r){"use strict";r.d(t,{ab:function(){return o},jD:function(){return i}});let i={RPC_ERROR_CODE:{USER_REJECTED_REQUEST:4001,USER_REJECTED_METHODS:5002,USER_REJECTED:5e3},PROVIDER_RPC_ERROR_NAME:{PROVIDER_RPC:"ProviderRpcError",USER_REJECTED_REQUEST:"UserRejectedRequestError"},isRpcProviderError(e){try{if("object"==typeof e&&null!==e){let t="string"==typeof e.message,r="number"==typeof e.code;return t&&r}return!1}catch{return!1}},isUserRejectedMessage:e=>e.toLowerCase().includes("user rejected")||e.toLowerCase().includes("user cancelled")||e.toLowerCase().includes("user canceled"),isUserRejectedRequestError(e){if(i.isRpcProviderError(e)){let t=e.code===i.RPC_ERROR_CODE.USER_REJECTED_REQUEST,r=e.code===i.RPC_ERROR_CODE.USER_REJECTED_METHODS;return t||r||i.isUserRejectedMessage(e.message)}return e instanceof Error&&i.isUserRejectedMessage(e.message)}};class n extends Error{constructor(e,t){super(t.message,{cause:e}),this.name=i.PROVIDER_RPC_ERROR_NAME.PROVIDER_RPC,this.code=t.code}}class o extends n{constructor(e){super(e,{code:i.RPC_ERROR_CODE.USER_REJECTED_REQUEST,message:"User rejected the request"}),this.name=i.PROVIDER_RPC_ERROR_NAME.USER_REJECTED_REQUEST}}},84905:function(e,t,r){"use strict";r.d(t,{g:function(){return i}});let i={isLowerCaseMatch:(e,t)=>e?.toLowerCase()===t?.toLowerCase()}},8330:function(e,t,r){"use strict";r.d(t,{U:function(){return i}});let i={URLS:{FAQ:"https://walletconnect.com/faq"}}},68903:function(e,t,r){"use strict";r.d(t,{F:function(){return o},p:function(){return n}});var i=r(44649);let n={caipNetworkIdToNumber:e=>e?Number(e.split(":")[1]):void 0,parseEvmChainId(e){return"string"==typeof e?this.caipNetworkIdToNumber(e):e},getNetworksByNamespace:(e,t)=>e?.filter(e=>e.chainNamespace===t)||[],getFirstNetworkByNamespace(e,t){return this.getNetworksByNamespace(e,t)[0]},getNetworkNameByCaipNetworkId(e,t){if(!t)return;let r=e.find(e=>e.caipNetworkId===t);if(r)return r.name;let[n]=t.split(":");return i.b.CHAIN_NAME_MAP?.[n]||void 0}},o=["eip155","solana","polkadot","bip122","cosmos","sui","stacks"]},23614:function(e,t,r){"use strict";r.d(t,{C:function(){return f}});var i="[big.js] ",n=i+"Invalid ",o=n+"decimal places",s=n+"rounding mode",a=i+"Division by zero",l={},c=void 0,d=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;function u(e,t,r,i){var n=e.c;if(r===c&&(r=e.constructor.RM),0!==r&&1!==r&&2!==r&&3!==r)throw Error(s);if(t<1)i=3===r&&(i||!!n[0])||0===t&&(1===r&&n[0]>=5||2===r&&(n[0]>5||5===n[0]&&(i||n[1]!==c))),n.length=1,i?(e.e=e.e-t+1,n[0]=1):n[0]=e.e=0;else if(t=5||2===r&&(n[t]>5||5===n[t]&&(i||n[t+1]!==c||1&n[t-1]))||3===r&&(i||!!n[0]),n.length=t,i){for(;++n[--t]>9;)if(n[t]=0,0===t){++e.e,n.unshift(1);break}}for(t=n.length;!n[--t];)n.pop()}return e}function h(e,t,r){var i=e.e,n=e.c.join(""),o=n.length;if(t)n=n.charAt(0)+(o>1?"."+n.slice(1):"")+(i<0?"e":"e+")+i;else if(i<0){for(;++i;)n="0"+n;n="0."+n}else if(i>0){if(++i>o)for(i-=o;i--;)n+="0";else i1&&(n=n.charAt(0)+"."+n.slice(1));return e.s<0&&r?"-"+n:n}l.abs=function(){var e=new this.constructor(this);return e.s=1,e},l.cmp=function(e){var t,r=this.c,i=(e=new this.constructor(e)).c,n=this.s,o=e.s,s=this.e,a=e.e;if(!r[0]||!i[0])return r[0]?n:i[0]?-o:0;if(n!=o)return n;if(t=n<0,s!=a)return s>a^t?1:-1;for(n=-1,o=(s=r.length)<(a=i.length)?s:a;++ni[n]^t?1:-1;return s==a?0:s>a^t?1:-1},l.div=function(e){var t=this.constructor,r=this.c,i=(e=new t(e)).c,n=this.s==e.s?1:-1,s=t.DP;if(s!==~~s||s<0||s>1e6)throw Error(o);if(!i[0])throw Error(a);if(!r[0])return e.s=n,e.c=[e.e=0],e;var l,d,h,p,f,g=i.slice(),m=l=i.length,y=r.length,w=r.slice(0,l),b=w.length,v=e,C=v.c=[],E=0,x=s+(v.e=this.e-e.e)+1;for(v.s=n,n=x<0?0:x,g.unshift(0);b++b?1:-1;else for(f=-1,p=0;++fw[f]?1:-1;break}if(p<0){for(d=b==l?i:g;b;){if(w[--b]x&&u(v,x,t.RM,w[0]!==c),v},l.eq=function(e){return 0===this.cmp(e)},l.gt=function(e){return this.cmp(e)>0},l.gte=function(e){return this.cmp(e)>-1},l.lt=function(e){return 0>this.cmp(e)},l.lte=function(e){return 1>this.cmp(e)},l.minus=l.sub=function(e){var t,r,i,n,o=this.constructor,s=this.s,a=(e=new o(e)).s;if(s!=a)return e.s=-a,this.plus(e);var l=this.c.slice(),c=this.e,d=e.c,u=e.e;if(!l[0]||!d[0])return d[0]?e.s=-a:l[0]?e=new o(this):e.s=1,e;if(s=c-u){for((n=s<0)?(s=-s,i=l):(u=c,i=d),i.reverse(),a=s;a--;)i.push(0);i.reverse()}else for(r=((n=l.length0)for(;a--;)l[t++]=0;for(a=t;r>s;){if(l[--r]0?(a=o,i=l):(t=-t,i=s),i.reverse();t--;)i.push(0);i.reverse()}for(s.length-l.length<0&&(i=l,l=s,s=i),t=l.length,r=0;t;s[t]%=10)r=(s[--t]=s[t]+l[t]+r)/10|0;for(r&&(s.unshift(r),++a),t=s.length;0===s[--t];)s.pop();return e.c=s,e.e=a,e},l.pow=function(e){var t=this,r=new t.constructor("1"),i=r,o=e<0;if(e!==~~e||e<-1e6||e>1e6)throw Error(n+"exponent");for(o&&(e=-e);1&e&&(i=i.times(t)),e>>=1;)t=t.times(t);return o?r.div(i):i},l.prec=function(e,t){if(e!==~~e||e<1||e>1e6)throw Error(n+"precision");return u(new this.constructor(this),e,t)},l.round=function(e,t){if(e===c)e=0;else if(e!==~~e||e<-1e6||e>1e6)throw Error(o);return u(new this.constructor(this),e+this.e+1,t)},l.sqrt=function(){var e,t,r,n=this.constructor,o=this.s,s=this.e,a=new n("0.5");if(!this.c[0])return new n(this);if(o<0)throw Error(i+"No square root");0===(o=Math.sqrt(+h(this,!0,!0)))||o===1/0?((t=this.c.join("")).length+s&1||(t+="0"),s=((s+1)/2|0)-(s<0||1&s),e=new n(((o=Math.sqrt(t))==1/0?"5e":(o=o.toExponential()).slice(0,o.indexOf("e")+1))+s)):e=new n(o+""),s=e.e+(n.DP+=4);do r=e,e=a.times(r.plus(this.div(r)));while(r.c.slice(0,s).join("")!==e.c.slice(0,s).join(""));return u(e,(n.DP-=4)+e.e+1,n.RM)},l.times=l.mul=function(e){var t,r=this.constructor,i=this.c,n=(e=new r(e)).c,o=i.length,s=n.length,a=this.e,l=e.e;if(e.s=this.s==e.s?1:-1,!i[0]||!n[0])return e.c=[e.e=0],e;for(e.e=a+l,oa;)s=t[l]+n[a]*i[l-a-1]+s,t[l--]=s%10,s=s/10|0;t[l]=s}for(s?++e.e:t.shift(),a=t.length;!t[--a];)t.pop();return e.c=t,e},l.toExponential=function(e,t){var r=this,i=r.c[0];if(e!==c){if(e!==~~e||e<0||e>1e6)throw Error(o);for(r=u(new r.constructor(r),++e,t);r.c.length1e6)throw Error(o);for(r=u(new r.constructor(r),e+r.e+1,t),e=e+r.e+1;r.c.length=e.PE,!!this.c[0])},l.toNumber=function(){var e=+h(this,!0,!0);if(!0===this.constructor.strict&&!this.eq(e.toString()))throw Error(i+"Imprecise conversion");return e},l.toPrecision=function(e,t){var r=this,i=r.constructor,o=r.c[0];if(e!==c){if(e!==~~e||e<1||e>1e6)throw Error(n+"precision");for(r=u(new i(r),e,t);r.c.length=i.PE,!!o)},l.valueOf=function(){var e=this.constructor;if(!0===e.strict)throw Error(i+"valueOf disallowed");return h(this,this.e<=e.NE||this.e>=e.PE,!0)};var p=function e(){function t(r){if(!(this instanceof t))return r===c?e():new t(r);if(r instanceof t)this.s=r.s,this.e=r.e,this.c=r.c.slice();else{if("string"!=typeof r){if(!0===t.strict&&"bigint"!=typeof r)throw TypeError(n+"value");r=0===r&&1/r<0?"-0":String(r)}!function(e,t){var r,i,o;if(!d.test(t))throw Error(n+"number");for(e.s="-"==t.charAt(0)?(t=t.slice(1),-1):1,(r=t.indexOf("."))>-1&&(t=t.replace(".","")),(i=t.search(/e/i))>0?(r<0&&(r=i),r+=+t.slice(i+1),t=t.substring(0,i)):r<0&&(r=t.length),o=t.length,i=0;i0&&"0"==t.charAt(--o););for(e.e=r-i-1,e.c=[],r=0;i<=o;)e.c[r++]=+t.charAt(i++)}}(this,r)}this.constructor=t}return t.prototype=l,t.DP=20,t.RM=1,t.NE=-7,t.PE=21,t.strict=!1,t.roundDown=0,t.roundHalfUp=1,t.roundHalfEven=2,t.roundUp=3,t}();let f={bigNumber:e=>new p(e||0),multiply(e,t){if(void 0===e||void 0===t)return new p(0);let r=new p(e),i=new p(t);return r.times(i)},toFixed:(e,t=2)=>void 0===e||""===e?new p(0).toFixed(t):new p(e).toFixed(t),formatNumberToLocalString:(e,t=2)=>void 0===e||""===e?"0.00":"number"==typeof e?e.toLocaleString("en-US",{maximumFractionDigits:t,minimumFractionDigits:t,roundingMode:"floor"}):parseFloat(e).toLocaleString("en-US",{maximumFractionDigits:t,minimumFractionDigits:t,roundingMode:"floor"}),parseLocalStringToNumber:e=>void 0===e||""===e?0:new p(e.replace(/,/gu,"")).toNumber()}},86988:function(e,t,r){"use strict";r.d(t,{u:function(){return i}});let i={validateCaipAddress(e){if(e.split(":")?.length!==3)throw Error("Invalid CAIP Address");return e},parseCaipAddress(e){let t=e.split(":");if(3!==t.length)throw Error(`Invalid CAIP-10 address: ${e}`);let[r,i,n]=t;if(!r||!i||!n)throw Error(`Invalid CAIP-10 address: ${e}`);return{chainNamespace:r,chainId:i,address:n}},parseCaipNetworkId(e){let t=e.split(":");if(2!==t.length)throw Error(`Invalid CAIP-2 network id: ${e}`);let[r,i]=t;if(!r||!i)throw Error(`Invalid CAIP-2 network id: ${e}`);return{chainNamespace:r,chainId:i}}}},84710:function(e,t,r){"use strict";r.d(t,{C:function(){return n}});var i=r(44649);let n={ConnectorExplorerIds:{[i.b.CONNECTOR_ID.COINBASE]:"fd20dc426fb37566d803205b19bbc1d4096b248ac04548e3cfb6b3a38bd033aa",[i.b.CONNECTOR_ID.COINBASE_SDK]:"fd20dc426fb37566d803205b19bbc1d4096b248ac04548e3cfb6b3a38bd033aa",[i.b.CONNECTOR_ID.BASE_ACCOUNT]:"fd20dc426fb37566d803205b19bbc1d4096b248ac04548e3cfb6b3a38bd033aa",[i.b.CONNECTOR_ID.SAFE]:"225affb176778569276e484e1b92637ad061b01e13a048b35a9d280c3b58970f",[i.b.CONNECTOR_ID.LEDGER]:"19177a98252e07ddfc9af2083ba8e07ef627cb6103467ffebb3f8f4205fd7927",[i.b.CONNECTOR_ID.OKX]:"971e689d0a5be527bac79629b4ee9b925e82208e5168b733496a09c0faed0709",[i.b.METMASK_CONNECTOR_NAME]:"c57ca95b47569778a828d19178114f4db188b89b763c899ba0be274e97267d96",[i.b.TRUST_CONNECTOR_NAME]:"4622a2b2d6af1c9844944291e5e7351a6aa24cd7b23099efac1b2fd875da31a0",[i.b.SOLFLARE_CONNECTOR_NAME]:"1ca0bdd4747578705b1939af023d120677c64fe6ca76add81fda36e350605e79",[i.b.PHANTOM_CONNECTOR_NAME]:"a797aa35c0fadbfc1a53e7f675162ed5226968b44a19ee3d24385c64d1d3c393",[i.b.COIN98_CONNECTOR_NAME]:"2a3c89040ac3b723a1972a33a125b1db11e258a6975d3a61252cd64e6ea5ea01",[i.b.MAGIC_EDEN_CONNECTOR_NAME]:"8b830a2b724a9c3fbab63af6f55ed29c9dfa8a55e732dc88c80a196a2ba136c6",[i.b.BACKPACK_CONNECTOR_NAME]:"2bd8c14e035c2d48f184aaa168559e86b0e3433228d3c4075900a221785019b0",[i.b.BITGET_CONNECTOR_NAME]:"38f5d18bd8522c244bdd70cb4a68e0e718865155811c043f052fb9f1c51de662",[i.b.FRONTIER_CONNECTOR_NAME]:"85db431492aa2e8672e93f4ea7acf10c88b97b867b0d373107af63dc4880f041",[i.b.XVERSE_CONNECTOR_NAME]:"2a87d74ae02e10bdd1f51f7ce6c4e1cc53cd5f2c0b6b5ad0d7b3007d2b13de7b",[i.b.LEATHER_CONNECTOR_NAME]:"483afe1df1df63daf313109971ff3ef8356ddf1cc4e45877d205eee0b7893a13",[i.b.OKX_CONNECTOR_NAME]:"971e689d0a5be527bac79629b4ee9b925e82208e5168b733496a09c0faed0709",[i.b.BINANCE_CONNECTOR_NAME]:"2fafea35bb471d22889ccb49c08d99dd0a18a37982602c33f696a5723934ba25"},NetworkImageIds:{1:"ba0ba0cd-17c6-4806-ad93-f9d174f17900",42161:"3bff954d-5cb0-47a0-9a23-d20192e74600",43114:"30c46e53-e989-45fb-4549-be3bd4eb3b00",56:"93564157-2e8e-4ce7-81df-b264dbee9b00",250:"06b26297-fe0c-4733-5d6b-ffa5498aac00",10:"ab9c186a-c52f-464b-2906-ca59d760a400",137:"41d04d42-da3b-4453-8506-668cc0727900",5e3:"e86fae9b-b770-4eea-e520-150e12c81100",295:"6a97d510-cac8-4e58-c7ce-e8681b044c00",11155111:"e909ea0a-f92a-4512-c8fc-748044ea6800",84532:"a18a7ecd-e307-4360-4746-283182228e00",1301:"4eeea7ef-0014-4649-5d1d-07271a80f600",130:"2257980a-3463-48c6-cbac-a42d2a956e00",10143:"0a728e83-bacb-46db-7844-948f05434900",100:"02b53f6a-e3d4-479e-1cb4-21178987d100",9001:"f926ff41-260d-4028-635e-91913fc28e00",324:"b310f07f-4ef7-49f3-7073-2a0a39685800",314:"5a73b3dd-af74-424e-cae0-0de859ee9400",4689:"34e68754-e536-40da-c153-6ef2e7188a00",1088:"3897a66d-40b9-4833-162f-a2c90531c900",1284:"161038da-44ae-4ec7-1208-0ea569454b00",1285:"f1d73bb6-5450-4e18-38f7-fb6484264a00",7777777:"845c60df-d429-4991-e687-91ae45791600",42220:"ab781bbc-ccc6-418d-d32d-789b15da1f00",8453:"7289c336-3981-4081-c5f4-efc26ac64a00",1313161554:"3ff73439-a619-4894-9262-4470c773a100",2020:"b8101fc0-9c19-4b6f-ec65-f6dfff106e00",2021:"b8101fc0-9c19-4b6f-ec65-f6dfff106e00",80094:"e329c2c9-59b0-4a02-83e4-212ff3779900",2741:"fc2427d1-5af9-4a9c-8da5-6f94627cd900","5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp":"a1b58899-f671-4276-6a5e-56ca5bd59700","4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z":"a1b58899-f671-4276-6a5e-56ca5bd59700",EtWTRABZaYq6iMfeYKouRu166VU2xqa1:"a1b58899-f671-4276-6a5e-56ca5bd59700","000000000019d6689c085ae165831e93":"0b4838db-0161-4ffe-022d-532bf03dba00","000000000933ea01ad0ee984209779ba":"39354064-d79b-420b-065d-f980c4b78200","00000008819873e925422c1ff0f99f7c":"b3406e4a-bbfc-44fb-e3a6-89673c78b700","-239":"20f673c0-095e-49b2-07cf-eb5049dcf600","-3":"20f673c0-095e-49b2-07cf-eb5049dcf600"},ConnectorImageIds:{[i.b.CONNECTOR_ID.COINBASE]:"0c2840c3-5b04-4c44-9661-fbd4b49e1800",[i.b.CONNECTOR_ID.COINBASE_SDK]:"0c2840c3-5b04-4c44-9661-fbd4b49e1800",[i.b.CONNECTOR_ID.BASE_ACCOUNT]:"bba2c8be-7fd1-463e-42b1-796ecb0ad200",[i.b.CONNECTOR_ID.SAFE]:"461db637-8616-43ce-035a-d89b8a1d5800",[i.b.CONNECTOR_ID.LEDGER]:"54a1aa77-d202-4f8d-0fb2-5d2bb6db0300",[i.b.CONNECTOR_ID.WALLET_CONNECT]:"ef1a1fcf-7fe8-4d69-bd6d-fda1345b4400",[i.b.CONNECTOR_ID.INJECTED]:"07ba87ed-43aa-4adf-4540-9e6a2b9cae00"},ConnectorNamesMap:{[i.b.CONNECTOR_ID.INJECTED]:"Browser Wallet",[i.b.CONNECTOR_ID.WALLET_CONNECT]:"WalletConnect",[i.b.CONNECTOR_ID.COINBASE]:"Coinbase",[i.b.CONNECTOR_ID.COINBASE_SDK]:"Coinbase",[i.b.CONNECTOR_ID.BASE_ACCOUNT]:"Base Account",[i.b.CONNECTOR_ID.LEDGER]:"Ledger",[i.b.CONNECTOR_ID.SAFE]:"Safe"},ConnectorTypesMap:{[i.b.CONNECTOR_ID.INJECTED]:"INJECTED",[i.b.CONNECTOR_ID.WALLET_CONNECT]:"WALLET_CONNECT",[i.b.CONNECTOR_ID.EIP6963]:"ANNOUNCED",[i.b.CONNECTOR_ID.AUTH]:"AUTH"},WalletConnectRpcChainIds:[1,5,11155111,10,420,42161,421613,137,80001,42220,1313161554,1313161555,56,97,43114,43113,100,8453,84531,7777777,999,324,280]}},61616:function(e,t,r){"use strict";r.d(t,{$U:function(){return s},Vk:function(){return n},mr:function(){return o},uJ:function(){return i}});let i={WALLET_ID:"@appkit/wallet_id",WALLET_NAME:"@appkit/wallet_name",SOLANA_WALLET:"@appkit/solana_wallet",SOLANA_CAIP_CHAIN:"@appkit/solana_caip_chain",ACTIVE_CAIP_NETWORK_ID:"@appkit/active_caip_network_id",CONNECTED_SOCIAL:"@appkit/connected_social",CONNECTED_SOCIAL_USERNAME:"@appkit-wallet/SOCIAL_USERNAME",RECENT_WALLETS:"@appkit/recent_wallets",RECENT_WALLET:"@appkit/recent_wallet",DEEPLINK_CHOICE:"WALLETCONNECT_DEEPLINK_CHOICE",ACTIVE_NAMESPACE:"@appkit/active_namespace",CONNECTED_NAMESPACES:"@appkit/connected_namespaces",CONNECTION_STATUS:"@appkit/connection_status",SIWX_AUTH_TOKEN:"@appkit/siwx-auth-token",SIWX_NONCE_TOKEN:"@appkit/siwx-nonce-token",TELEGRAM_SOCIAL_PROVIDER:"@appkit/social_provider",NATIVE_BALANCE_CACHE:"@appkit/native_balance_cache",PORTFOLIO_CACHE:"@appkit/portfolio_cache",ENS_CACHE:"@appkit/ens_cache",IDENTITY_CACHE:"@appkit/identity_cache",PREFERRED_ACCOUNT_TYPES:"@appkit/preferred_account_types",CONNECTIONS:"@appkit/connections",DISCONNECTED_CONNECTOR_IDS:"@appkit/disconnected_connector_ids",HISTORY_TRANSACTIONS_CACHE:"@appkit/history_transactions_cache",TOKEN_PRICE_CACHE:"@appkit/token_price_cache",RECENT_EMAILS:"@appkit/recent_emails",LATEST_APPKIT_VERSION:"@appkit/latest_version",TON_WALLETS_CACHE:"@appkit/ton_wallets_cache"};function n(e){if(!e)throw Error("Namespace is required for CONNECTED_CONNECTOR_ID");return`@appkit/${e}:connected_connector_id`}let o={setItem(e,t){s()&&void 0!==t&&localStorage.setItem(e,t)},getItem(e){if(s())return localStorage.getItem(e)||void 0},removeItem(e){s()&&localStorage.removeItem(e)},clear(){s()&&localStorage.clear()}};function s(){return"undefined"!=typeof window&&"undefined"!=typeof localStorage}},62714:function(e,t,r){"use strict";function i(e,t){let r=e?.["--apkt-accent"]??e?.["--w3m-accent"];return"light"===t?{"--w3m-accent":r||"hsla(231, 100%, 70%, 1)","--w3m-background":"#fff"}:{"--w3m-accent":r||"hsla(230, 100%, 67%, 1)","--w3m-background":"#202020"}}r.d(t,{t:function(){return i}})},88200:function(e,t,r){"use strict";r.d(t,{q:function(){return h}}),r(68642);var i=r(44649),n=r(42935),o=r(43291),s=r(53357),a=r(39365),l=r(6943),c=r(35652),d=r(76115);let u=[i.b.CONNECTOR_ID.AUTH,i.b.CONNECTOR_ID.WALLET_CONNECT];class h{constructor(e){this.availableConnectors=[],this.availableConnections=[],this.providerHandlers={},this.eventListeners=new Map,this.getCaipNetworks=e=>l.R.getCaipNetworks(e),this.getConnectorId=e=>c.ConnectorController.getConnectorId(e),e&&this.construct(e)}construct(e){this.projectId=e.projectId,this.namespace=e.namespace,this.adapterType=e.adapterType}get connectors(){return this.availableConnectors}get connections(){return this.availableConnections}get networks(){return this.getCaipNetworks(this.namespace)}onAuthConnected({accounts:e,chainId:t}){let r=this.getCaipNetworks().filter(e=>e.chainNamespace===this.namespace).find(e=>e.id.toString()===t?.toString());e&&r&&this.addConnection({connectorId:i.b.CONNECTOR_ID.AUTH,accounts:e,caipNetwork:r})}setAuthProvider(e){e.onConnect(this.onAuthConnected.bind(this)),e.onSocialConnected(this.onAuthConnected.bind(this)),this.addConnector({id:i.b.CONNECTOR_ID.AUTH,type:"AUTH",name:i.b.CONNECTOR_NAMES.AUTH,provider:e,imageId:void 0,chain:this.namespace,chains:[]})}addConnector(...e){let t=new Set;this.availableConnectors=[...e,...this.availableConnectors].filter(e=>!t.has(e.id)&&(t.add(e.id),!0)),this.emit("connectors",this.availableConnectors)}addConnection(...e){let t=new Set;this.availableConnections=[...e,...this.availableConnections].filter(e=>!t.has(e.connectorId.toLowerCase())&&(t.add(e.connectorId.toLowerCase()),!0)),this.emit("connections",this.availableConnections)}deleteConnection(e){this.availableConnections=this.availableConnections.filter(t=>t.connectorId.toLowerCase()!==e.toLowerCase()),this.emit("connections",this.availableConnections)}clearConnections(e=!1){this.availableConnections=[],e&&this.emit("connections",this.availableConnections)}setStatus(e,t){l.R.setAccountProp("status",e,t)}on(e,t){this.eventListeners.has(e)||this.eventListeners.set(e,new Set),this.eventListeners.get(e)?.add(t)}off(e,t){let r=this.eventListeners.get(e);r&&r.delete(t)}removeAllEventListeners(){this.eventListeners.forEach(e=>{e.clear()})}emit(e,t){let r=this.eventListeners.get(e);r&&r.forEach(e=>e(t))}async connectWalletConnect(e){try{let e=this.getWalletConnectConnector();return{clientId:(await e.connectWalletConnect()).clientId}}catch(e){if(a.s.isUserRejectedRequestError(e))throw new n.ab(e);throw e}}async switchNetwork(e){let{caipNetwork:t}=e,r=d.O.getProviderId(t.chainNamespace),i=d.O.getProvider(t.chainNamespace);if(!i)throw Error("Provider not found");if("WALLET_CONNECT"===r){i.setDefaultChain(t.caipNetworkId);return}if("AUTH"===r){let e=c.ConnectorController.getAuthConnector()?.provider;if(!e)throw Error("Auth provider not found");let r=(0,o.r9)(t.chainNamespace);await e.switchNetwork({chainId:t.caipNetworkId});let i=await e.getUser({chainId:t.caipNetworkId,preferredAccountType:r});this.emit("switchNetwork",i)}}getWalletConnectConnector(){let e=this.connectors.find(e=>"walletConnect"===e.id);if(!e)throw Error("WalletConnectConnector not found");return e}onConnect(e,t){if(e.length>0){let{address:r,chainId:i}=s.j.getAccount(e[0]),n=this.getCaipNetworks().filter(e=>e.chainNamespace===this.namespace).find(e=>e.id.toString()===i?.toString()),o=this.connectors.find(e=>e.id===t);r&&(this.emit("accountChanged",{address:r,chainId:i,connector:o}),this.addConnection({connectorId:t,accounts:e.map(e=>{let{address:t}=s.j.getAccount(e);return{address:t}}),caipNetwork:n}))}}onAccountsChanged(e,t,r=!0){if(e.length>0){let{address:r}=s.j.getAccount(e[0]),n=this.getConnection({connectorId:t,connections:this.connections,connectors:this.connectors});r&&this.getConnectorId(i.b.CHAIN.EVM)?.toLowerCase()===t.toLowerCase()&&this.emit("accountChanged",{address:r,chainId:n?.caipNetwork?.id,connector:n?.connector}),this.addConnection({connectorId:t,accounts:e.map(e=>{let{address:t}=s.j.getAccount(e);return{address:t}}),caipNetwork:n?.caipNetwork})}else r&&this.onDisconnect(t)}onDisconnect(e){this.removeProviderListeners(e),this.deleteConnection(e),this.getConnectorId(i.b.CHAIN.EVM)?.toLowerCase()===e.toLowerCase()&&this.emitFirstAvailableConnection(),0===this.connections.length&&this.emit("disconnect")}onChainChanged(e,t){let r="string"==typeof e&&e.startsWith("0x")?parseInt(e,16).toString():e.toString(),n=this.getConnection({connectorId:t,connections:this.connections,connectors:this.connectors}),o=this.getCaipNetworks().filter(e=>e.chainNamespace===this.namespace).find(e=>e.id.toString()===r);n&&this.addConnection({connectorId:t,accounts:n.accounts,caipNetwork:o}),this.getConnectorId(i.b.CHAIN.EVM)?.toLowerCase()===t.toLowerCase()&&this.emit("switchNetwork",{chainId:r})}listenProviderEvents(e,t){if(u.includes(e))return;let r=t=>this.onAccountsChanged(t,e),i=t=>this.onChainChanged(t,e),n=()=>this.onDisconnect(e);this.providerHandlers[e]||(t.on("disconnect",n),t.on("accountsChanged",r),t.on("chainChanged",i),this.providerHandlers[e]={provider:t,disconnect:n,accountsChanged:r,chainChanged:i})}removeProviderListeners(e){if(this.providerHandlers[e]){let{provider:t,disconnect:r,accountsChanged:i,chainChanged:n}=this.providerHandlers[e];t.removeListener("disconnect",r),t.removeListener("accountsChanged",i),t.removeListener("chainChanged",n),this.providerHandlers[e]=null}}emitFirstAvailableConnection(){let e=this.getConnection({connections:this.connections,connectors:this.connectors});if(e){let[t]=e.accounts;this.emit("accountChanged",{address:t?.address,chainId:e.caipNetwork?.id,connector:e.connector})}}getConnection({address:e,connectorId:t,connections:r,connectors:i}){if(t){let n=r.find(e=>e.connectorId.toLowerCase()===t.toLowerCase());if(!n)return null;let o=i.find(e=>e.id.toLowerCase()===n.connectorId.toLowerCase()),s=e?n.accounts.find(t=>t.address.toLowerCase()===e.toLowerCase()):n.accounts[0];return{...n,account:s,connector:o}}let n=r.find(e=>e.accounts.length>0&&i.some(t=>t.id.toLowerCase()===e.connectorId.toLowerCase()));if(n){let[e]=n.accounts,t=i.find(e=>e.id.toLowerCase()===n.connectorId.toLowerCase());return{...n,account:e,connector:t}}return null}}},52921:function(e,t,r){"use strict";r.d(t,{z:function(){return l}}),r(68642);var i=r(44649),n=r(60389),o=r(39365),s=r(6943),a=r(5688);class l{constructor({provider:e,namespace:t}){this.id=i.b.CONNECTOR_ID.WALLET_CONNECT,this.name="WalletConnect",this.type="WALLET_CONNECT",this.imageId="ef1a1fcf-7fe8-4d69-bd6d-fda1345b4400",this.getCaipNetworks=s.R.getCaipNetworks.bind(s.R),this.caipNetworks=this.getCaipNetworks(),this.provider=e,this.chain=t}get chains(){return this.getCaipNetworks()}async connectWalletConnect(){if(!await this.authenticate()){let e=this.getCaipNetworks(),t=a.OptionsController.state.universalProviderConfigOverride,r=o.s.createNamespaces(e,t);await this.provider.connect({optionalNamespaces:r})}return{clientId:await this.provider.client.core.crypto.getClientId(),session:this.provider.session}}async disconnect(){await this.provider.disconnect()}async authenticate(){let e=this.chains.map(e=>e.caipNetworkId);return n.w.universalProviderAuthenticate({universalProvider:this.provider,chains:e,methods:c})}}let c=["eth_accounts","eth_requestAccounts","eth_sendRawTransaction","eth_sign","eth_signTransaction","eth_signTypedData","eth_signTypedData_v3","eth_signTypedData_v4","eth_sendTransaction","personal_sign","wallet_switchEthereumChain","wallet_addEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode","wallet_getCallsStatus","wallet_sendCalls","wallet_getCapabilities","wallet_grantPermissions","wallet_revokePermissions","wallet_getAssets"]},74897:function(e,t,r){"use strict";r.d(t,{j:function(){return n}});let i={adapters:{}},n={state:i,initialize(e){i.adapters={...e}},get:e=>i.adapters[e]}},72723:function(e,t,r){"use strict";r.d(t,{AlertController:function(){return l}});var i=r(69887),n=r(55543),o=r(59388),s=r(5688);let a=(0,i.sj)({message:"",variant:"info",open:!1}),l=(0,o.P)({state:a,subscribeKey:(e,t)=>(0,n.VW)(a,e,t),open(e,t){let{debug:r}=s.OptionsController.state,{code:i,displayMessage:n,debugMessage:o}=e;n&&r&&(a.message=n,a.variant=t,a.open=!0),o&&console.error("function"==typeof o?o():o,i?{code:i}:void 0)},warn(e,t,r){a.open=!0,a.message=e,a.variant="warning",t&&console.warn(t,r)},close(){a.open=!1,a.message="",a.variant="info"}})},17766:function(e,t,r){"use strict";r.d(t,{ApiController:function(){return b}});var i=r(69887),n=r(55543),o=r(44649),s=r(63043),a=r(53357),l=r(39905),c=r(32704),d=r(36801),u=r(22472),h=r(6943),p=r(35652),f=r(31929),g=r(5688);let m=a.j.getApiUrl(),y=new l.V({baseUrl:m,clientId:null}),w=(0,i.sj)({promises:{},page:1,count:0,featured:[],allFeatured:[],recommended:[],allRecommended:[],wallets:[],filteredWallets:[],search:[],isAnalyticsEnabled:!1,excludedWallets:[],isFetchingRecommendedWallets:!1,explorerWallets:[],explorerFilteredWallets:[],plan:{tier:"none",hasExceededUsageLimit:!1,limits:{isAboveRpcLimit:!1,isAboveMauLimit:!1}}}),b={state:w,subscribeKey:(e,t)=>(0,n.VW)(w,e,t),_getSdkProperties(){let{projectId:e,sdkType:t,sdkVersion:r}=g.OptionsController.state;return{projectId:e,st:t||"appkit",sv:r||"html-wagmi-4.2.2"}},_filterOutExtensions:e=>g.OptionsController.state.isUniversalProvider?e.filter(e=>!!(e.mobile_link||e.desktop_link||e.webapp_link)):e,async _fetchWalletImage(e){let t=`${y.baseUrl}/getWalletImage/${e}`,r=await y.getBlob({path:t,params:b._getSdkProperties()});u.W.setWalletImage(e,URL.createObjectURL(r))},async _fetchNetworkImage(e){let t=`${y.baseUrl}/public/getAssetImage/${e}`,r=await y.getBlob({path:t,params:b._getSdkProperties()});u.W.setNetworkImage(e,URL.createObjectURL(r))},async _fetchConnectorImage(e){let t=`${y.baseUrl}/public/getAssetImage/${e}`,r=await y.getBlob({path:t,params:b._getSdkProperties()});u.W.setConnectorImage(e,URL.createObjectURL(r))},async _fetchCurrencyImage(e){let t=`${y.baseUrl}/public/getCurrencyImage/${e}`,r=await y.getBlob({path:t,params:b._getSdkProperties()});u.W.setCurrencyImage(e,URL.createObjectURL(r))},async _fetchTokenImage(e){let t=`${y.baseUrl}/public/getTokenImage/${e}`,r=await y.getBlob({path:t,params:b._getSdkProperties()});u.W.setTokenImage(e,URL.createObjectURL(r))},_filterWalletsByPlatform(e){let t=e.length,r=a.j.isMobile()?e?.filter(e=>!!e.mobile_link||!!e.webapp_link||Object.values(c.m).map(e=>e.id).includes(e.id)):e,i=t-r.length;return{filteredWallets:r,mobileFilteredOutWalletsLength:i}},fetchProjectConfig:async()=>(await y.get({path:"/appkit/v1/config",params:b._getSdkProperties()})).features,async fetchUsage(){try{let{tier:e,isAboveMauLimit:t,isAboveRpcLimit:r}=(await y.get({path:"/appkit/v1/project-limits",params:b._getSdkProperties()})).planLimits;b.state.plan={tier:e,hasExceededUsageLimit:"starter"===e&&(t||r),limits:{isAboveRpcLimit:r,isAboveMauLimit:t}}}catch(e){console.warn("Failed to fetch usage",e)}},async fetchAllowedOrigins(){try{let{allowedOrigins:e}=await y.get({path:"/projects/v1/origins",params:b._getSdkProperties()});return e}catch(e){if(e instanceof Error&&e.cause instanceof Response){let t=e.cause.status;if(t===o.b.HTTP_STATUS_CODES.TOO_MANY_REQUESTS)throw Error("RATE_LIMITED",{cause:e});if(t>=o.b.HTTP_STATUS_CODES.SERVER_ERROR&&t<600)throw Error("SERVER_ERROR",{cause:e})}return[]}},async fetchNetworkImages(){let e=h.R.getAllRequestedCaipNetworks(),t=e?.map(({assets:e})=>e?.imageId).filter(Boolean).filter(e=>!s.f.getNetworkImageById(e));t&&await Promise.allSettled(t.map(e=>b._fetchNetworkImage(e)))},async fetchConnectorImages(){let{connectors:e}=p.ConnectorController.state,t=e.map(({imageId:e})=>e).filter(Boolean);await Promise.allSettled(t.map(e=>b._fetchConnectorImage(e)))},async fetchCurrencyImages(e=[]){await Promise.allSettled(e.map(e=>b._fetchCurrencyImage(e)))},async fetchTokenImages(e=[]){await Promise.allSettled(e.map(e=>b._fetchTokenImage(e)))},async fetchWallets(e){let t=e.exclude??[];b._getSdkProperties().sv.startsWith("html-core-")&&t.push(...Object.values(c.m).map(e=>e.id));let r=await y.get({path:"/getWallets",params:{...b._getSdkProperties(),...e,page:String(e.page),entries:String(e.entries),include:e.include?.join(","),exclude:t.join(",")}}),{filteredWallets:i,mobileFilteredOutWalletsLength:n}=b._filterWalletsByPlatform(r?.data);return{data:i||[],count:r?.count,mobileFilteredOutWalletsLength:n}},async prefetchWalletRanks(){let e=p.ConnectorController.state.connectors;if(!e?.length)return;let t={page:1,entries:20,badge:"certified"};if(t.names=e.map(e=>e.name).join(","),h.R.state.activeChain===o.b.CHAIN.EVM){let r=[...e.flatMap(e=>e.connectors?.map(e=>e.info?.rdns)||[]),...e.map(e=>e.info?.rdns)].filter(e=>"string"==typeof e&&e.length>0);r.length&&(t.rdns=r.join(","))}let{data:r}=await b.fetchWallets(t);w.explorerWallets=r,p.ConnectorController.extendConnectorsWithExplorerWallets(r);let i=h.R.getRequestedCaipNetworkIds().join(",");w.explorerFilteredWallets=r.filter(e=>e.chains?.some(e=>i.includes(e)))},async fetchFeaturedWallets(){let{featuredWalletIds:e}=g.OptionsController.state;if(e?.length){let t={...b._getSdkProperties(),page:1,entries:e?.length??4,include:e},{data:r}=await b.fetchWallets(t),i=[...r].sort((t,r)=>e.indexOf(t.id)-e.indexOf(r.id)),n=i.map(e=>e.image_id).filter(Boolean);await Promise.allSettled(n.map(e=>b._fetchWalletImage(e))),w.featured=i,w.allFeatured=i}},async fetchRecommendedWallets(){try{w.isFetchingRecommendedWallets=!0;let{includeWalletIds:e,excludeWalletIds:t,featuredWalletIds:r}=g.OptionsController.state,i=[...t??[],...r??[]].filter(Boolean),n=h.R.getRequestedCaipNetworkIds().join(","),{data:o,count:s}=await b.fetchWallets({page:1,entries:4,include:e,exclude:i,chains:n}),a=d.M.getRecentWallets(),l=o.map(e=>e.image_id).filter(Boolean),c=a.map(e=>e.image_id).filter(Boolean);await Promise.allSettled([...l,...c].map(e=>b._fetchWalletImage(e))),w.recommended=o,w.allRecommended=o,w.count=s??0}catch{}finally{w.isFetchingRecommendedWallets=!1}},async fetchWalletsByPage({page:e}){let{includeWalletIds:t,excludeWalletIds:r,featuredWalletIds:i}=g.OptionsController.state,n=h.R.getRequestedCaipNetworkIds().join(","),o=[...w.recommended.map(({id:e})=>e),...r??[],...i??[]].filter(Boolean),{data:s,count:l,mobileFilteredOutWalletsLength:c}=await b.fetchWallets({page:e,entries:40,include:t,exclude:o,chains:n});w.mobileFilteredOutWalletsLength=c+(w.mobileFilteredOutWalletsLength??0);let d=s.slice(0,20).map(e=>e.image_id).filter(Boolean);await Promise.allSettled(d.map(e=>b._fetchWalletImage(e))),w.wallets=a.j.uniqueBy([...w.wallets,...b._filterOutExtensions(s)],"id").filter(e=>e.chains?.some(e=>n.includes(e))),w.count=l>w.count?l:w.count,w.page=e},async initializeExcludedWallets({ids:e}){let t={page:1,entries:e.length,include:e},{data:r}=await b.fetchWallets(t);r&&r.forEach(e=>{w.excludedWallets.push({rdns:e.rdns,name:e.name})})},async searchWallet({search:e,badge:t}){let{includeWalletIds:r,excludeWalletIds:i}=g.OptionsController.state,n=h.R.getRequestedCaipNetworkIds().join(",");w.search=[];let o={page:1,entries:100,search:e?.trim(),badge_type:t,include:r,exclude:i,chains:n},{data:s}=await b.fetchWallets(o);f.X.sendEvent({type:"track",event:"SEARCH_WALLET",properties:{badge:t??"",search:e??""}});let l=s.map(e=>e.image_id).filter(Boolean);await Promise.allSettled([...l.map(e=>b._fetchWalletImage(e)),a.j.wait(300)]),w.search=b._filterOutExtensions(s)},initPromise:(e,t)=>w.promises[e]||(w.promises[e]=t()),prefetch:({fetchConnectorImages:e=!0,fetchFeaturedWallets:t=!0,fetchRecommendedWallets:r=!0,fetchNetworkImages:i=!0,fetchWalletRanks:n=!0}={})=>Promise.allSettled([e&&b.initPromise("connectorImages",b.fetchConnectorImages),t&&b.initPromise("featuredWallets",b.fetchFeaturedWallets),r&&b.initPromise("recommendedWallets",b.fetchRecommendedWallets),i&&b.initPromise("networkImages",b.fetchNetworkImages),n&&b.initPromise("walletRanks",b.prefetchWalletRanks)].filter(Boolean)),prefetchAnalyticsConfig(){g.OptionsController.state.features?.analytics&&b.fetchAnalyticsConfig()},async fetchAnalyticsConfig(){try{let{isAnalyticsEnabled:e}=await y.get({path:"/getAnalyticsConfig",params:b._getSdkProperties()});g.OptionsController.setFeatures({analytics:e})}catch(e){g.OptionsController.setFeatures({analytics:!1})}},filterByNamespaces(e){if(!e?.length){w.featured=w.allFeatured,w.recommended=w.allRecommended;return}let t=h.R.getRequestedCaipNetworkIds().join(",");w.featured=w.allFeatured.filter(e=>e.chains?.some(e=>t.includes(e))),w.recommended=w.allRecommended.filter(e=>e.chains?.some(e=>t.includes(e))),w.filteredWallets=w.wallets.filter(e=>e.chains?.some(e=>t.includes(e)))},clearFilterByNamespaces(){w.filteredWallets=[]},setFilterByNamespace(e){if(!e){w.featured=w.allFeatured,w.recommended=w.allRecommended;return}let t=h.R.getRequestedCaipNetworkIds().join(",");w.featured=w.allFeatured.filter(e=>e.chains?.some(e=>t.includes(e))),w.recommended=w.allRecommended.filter(e=>e.chains?.some(e=>t.includes(e))),w.filteredWallets=w.wallets.filter(e=>e.chains?.some(e=>t.includes(e)))}}},22472:function(e,t,r){"use strict";r.d(t,{W:function(){return a}});var i=r(69887),n=r(55543),o=r(59388);let s=(0,i.sj)({walletImages:{},networkImages:{},chainImages:{},connectorImages:{},tokenImages:{},currencyImages:{}}),a=(0,o.P)({state:s,subscribeNetworkImages:e=>(0,i.Ld)(s.networkImages,()=>e(s.networkImages)),subscribeKey:(e,t)=>(0,n.VW)(s,e,t),subscribe:e=>(0,i.Ld)(s,()=>e(s)),setWalletImage(e,t){s.walletImages[e]=t},setNetworkImage(e,t){s.networkImages[e]=t},setChainImage(e,t){s.chainImages[e]=t},setConnectorImage(e,t){s.connectorImages={...s.connectorImages,[e]:t}},setTokenImage(e,t){s.tokenImages[e]=t},setCurrencyImage(e,t){s.currencyImages[e]=t}})},61704:function(e,t,r){"use strict";r.d(t,{L:function(){return f}});var i=r(69887),n=r(59712),o=r(53357),s=r(39905),a=r(36801),l=r(6943),c=r(5688),d=r(66909);let u={purchaseCurrencies:[{id:"2b92315d-eab7-5bef-84fa-089a131333f5",name:"USD Coin",symbol:"USDC",networks:[{name:"ethereum-mainnet",display_name:"Ethereum",chain_id:"1",contract_address:"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},{name:"polygon-mainnet",display_name:"Polygon",chain_id:"137",contract_address:"0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174"}]},{id:"2b92315d-eab7-5bef-84fa-089a131333f5",name:"Ether",symbol:"ETH",networks:[{name:"ethereum-mainnet",display_name:"Ethereum",chain_id:"1",contract_address:"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},{name:"polygon-mainnet",display_name:"Polygon",chain_id:"137",contract_address:"0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174"}]}],paymentCurrencies:[{id:"USD",payment_method_limits:[{id:"card",min:"10.00",max:"7500.00"},{id:"ach_bank_account",min:"10.00",max:"25000.00"}]},{id:"EUR",payment_method_limits:[{id:"card",min:"10.00",max:"7500.00"},{id:"ach_bank_account",min:"10.00",max:"25000.00"}]}]},h=o.j.getBlockchainApiUrl(),p=(0,i.sj)({clientId:null,api:new s.V({baseUrl:h,clientId:null}),supportedChains:{http:[],ws:[]}}),f={state:p,async get(e){let{st:t,sv:r}=f.getSdkProperties(),i=c.OptionsController.state.projectId,n={...e.params||{},st:t,sv:r,projectId:i};return p.api.get({...e,params:n})},getSdkProperties(){let{sdkType:e,sdkVersion:t}=c.OptionsController.state;return{st:e||"unknown",sv:t||"unknown"}},async isNetworkSupported(e){if(!e)return!1;try{p.supportedChains.http.length||await f.getSupportedNetworks()}catch(e){return!1}return p.supportedChains.http.includes(e)},async getSupportedNetworks(){try{let e=await f.get({path:"v1/supported-chains"});return p.supportedChains=e,e}catch{return p.supportedChains}},async fetchIdentity({address:e}){let t=a.M.getIdentityFromCacheForAddress(e);if(t)return t;let r=await f.get({path:`/v1/identity/${e}`,params:{sender:l.R.state.activeCaipAddress?o.j.getPlainAddress(l.R.state.activeCaipAddress):void 0}});return a.M.updateIdentityCache({address:e,identity:r,timestamp:Date.now()}),r},async fetchTransactions({account:e,cursor:t,signal:r,cache:i,chainId:n}){if(!await f.isNetworkSupported(l.R.state.activeCaipNetwork?.caipNetworkId))return{data:[],next:void 0};let o=a.M.getTransactionsCacheForAddress({address:e,chainId:n});if(o)return o;let s=await f.get({path:`/v1/account/${e}/history`,params:{cursor:t,chainId:n},signal:r,cache:i});return a.M.updateTransactionsCache({address:e,chainId:n,timestamp:Date.now(),transactions:s}),s},fetchSwapQuote:async({amount:e,userAddress:t,from:r,to:i,gasPrice:n})=>await f.isNetworkSupported(l.R.state.activeCaipNetwork?.caipNetworkId)?f.get({path:"/v1/convert/quotes",headers:{"Content-Type":"application/json"},params:{amount:e,userAddress:t,from:r,to:i,gasPrice:n}}):{quotes:[]},fetchSwapTokens:async({chainId:e})=>await f.isNetworkSupported(l.R.state.activeCaipNetwork?.caipNetworkId)?f.get({path:"/v1/convert/tokens",params:{chainId:e}}):{tokens:[]},getAddressBalance:async({caipNetworkId:e,address:t})=>p.api.post({path:`/v1?chainId=${e}&projectId=${c.OptionsController.state.projectId}`,body:{id:"1",jsonrpc:"2.0",method:"getAddressBalance",params:{address:t}}}).then(e=>e.result),async fetchTokenPrice({addresses:e}){if(!await f.isNetworkSupported(l.R.state.activeCaipNetwork?.caipNetworkId))return{fungibles:[]};let t=a.M.getTokenPriceCacheForAddresses(e);if(t)return t;let r=await p.api.post({path:"/v1/fungible/price",body:{currency:"usd",addresses:e,projectId:c.OptionsController.state.projectId},headers:{"Content-Type":"application/json"}});return a.M.updateTokenPriceCache({addresses:e,timestamp:Date.now(),tokenPrice:r}),r},fetchSwapAllowance:async({tokenAddress:e,userAddress:t})=>await f.isNetworkSupported(l.R.state.activeCaipNetwork?.caipNetworkId)?f.get({path:"/v1/convert/allowance",params:{tokenAddress:e,userAddress:t},headers:{"Content-Type":"application/json"}}):{allowance:"0"},async fetchGasPrice({chainId:e}){let{st:t,sv:r}=f.getSdkProperties();if(!await f.isNetworkSupported(l.R.state.activeCaipNetwork?.caipNetworkId))throw Error("Network not supported for Gas Price");return f.get({path:"/v1/convert/gas-price",headers:{"Content-Type":"application/json"},params:{chainId:e,st:t,sv:r}})},async generateSwapCalldata({amount:e,from:t,to:r,userAddress:i,disableEstimate:o}){if(!await f.isNetworkSupported(l.R.state.activeCaipNetwork?.caipNetworkId))throw Error("Network not supported for Swaps");return p.api.post({path:"/v1/convert/build-transaction",headers:{"Content-Type":"application/json"},body:{amount:e,eip155:{slippage:n.bq.CONVERT_SLIPPAGE_TOLERANCE},projectId:c.OptionsController.state.projectId,from:t,to:r,userAddress:i,disableEstimate:o}})},async generateApproveCalldata({from:e,to:t,userAddress:r}){let{st:i,sv:n}=f.getSdkProperties();if(!await f.isNetworkSupported(l.R.state.activeCaipNetwork?.caipNetworkId))throw Error("Network not supported for Swaps");return f.get({path:"/v1/convert/build-approve",headers:{"Content-Type":"application/json"},params:{userAddress:r,from:e,to:t,st:i,sv:n}})},async getBalance(e,t,r){let{st:i,sv:n}=f.getSdkProperties();if(!await f.isNetworkSupported(l.R.state.activeCaipNetwork?.caipNetworkId))return d.SnackController.showError("Token Balance Unavailable"),{balances:[]};let o=`${t}:${e}`,s=a.M.getBalanceCacheForCaipAddress(o);if(s)return s;let c=await f.get({path:`/v1/account/${e}/balance`,params:{currency:"usd",chainId:t,forceUpdate:r,st:i,sv:n}});return a.M.updateBalanceCache({caipAddress:o,balance:c,timestamp:Date.now()}),c},lookupEnsName:async e=>await f.isNetworkSupported(l.R.state.activeCaipNetwork?.caipNetworkId)?f.get({path:`/v1/profile/account/${e}`,params:{apiVersion:"2"}}):{addresses:{},attributes:[]},async reverseLookupEnsName({address:e}){if(!await f.isNetworkSupported(l.R.state.activeCaipNetwork?.caipNetworkId))return[];let t=l.R.getAccountData()?.address;return f.get({path:`/v1/profile/reverse/${e}`,params:{sender:t,apiVersion:"2"}})},getEnsNameSuggestions:async e=>await f.isNetworkSupported(l.R.state.activeCaipNetwork?.caipNetworkId)?f.get({path:`/v1/profile/suggestions/${e}`,params:{zone:"reown.id"}}):{suggestions:[]},registerEnsName:async({coinType:e,address:t,message:r,signature:i})=>await f.isNetworkSupported(l.R.state.activeCaipNetwork?.caipNetworkId)?p.api.post({path:"/v1/profile/account",body:{coin_type:e,address:t,message:r,signature:i},headers:{"Content-Type":"application/json"}}):{success:!1},generateOnRampURL:async({destinationWallets:e,partnerUserId:t,defaultNetwork:r,purchaseAmount:i,paymentAmount:n})=>await f.isNetworkSupported(l.R.state.activeCaipNetwork?.caipNetworkId)?(await p.api.post({path:"/v1/generators/onrampurl",params:{projectId:c.OptionsController.state.projectId},body:{destinationWallets:e,defaultNetwork:r,partnerUserId:t,defaultExperience:"buy",presetCryptoAmount:i,presetFiatAmount:n}})).url:"",async getOnrampOptions(){if(!await f.isNetworkSupported(l.R.state.activeCaipNetwork?.caipNetworkId))return{paymentCurrencies:[],purchaseCurrencies:[]};try{return await f.get({path:"/v1/onramp/options"})}catch(e){return u}},async getOnrampQuote({purchaseCurrency:e,paymentCurrency:t,amount:r,network:i}){try{if(!await f.isNetworkSupported(l.R.state.activeCaipNetwork?.caipNetworkId))return null;return await p.api.post({path:"/v1/onramp/quote",params:{projectId:c.OptionsController.state.projectId},body:{purchaseCurrency:e,paymentCurrency:t,amount:r,network:i}})}catch(e){return{networkFee:{amount:r,currency:t.id},paymentSubtotal:{amount:r,currency:t.id},paymentTotal:{amount:r,currency:t.id},purchaseAmount:{amount:r,currency:t.id},quoteId:"mocked-quote-id"}}},getSmartSessions:async e=>await f.isNetworkSupported(l.R.state.activeCaipNetwork?.caipNetworkId)?f.get({path:`/v1/sessions/${e}`}):[],revokeSmartSession:async(e,t,r)=>await f.isNetworkSupported(l.R.state.activeCaipNetwork?.caipNetworkId)?p.api.post({path:`/v1/sessions/${e}/revoke`,params:{projectId:c.OptionsController.state.projectId},body:{pci:t,signature:r}}):{success:!1},setClientId(e){p.clientId=e,p.api=new s.V({baseUrl:h,clientId:e})}}},6943:function(e,t,r){"use strict";r.d(t,{R:function(){return k}});var i=r(69887),n=r(55543),o=r(86988),s=r(44649),a=r(68903),l=r(63671),c=r(4786),d=r(98388),u=r(59712),h=r(53357),p=r(36801),f=r(59388),g=r(74897),m=r(64369),y=r(35652),w=r(31929),b=r(89512),v=r(5688),C=r(76115),E=r(96986),x=r(61347),_=r(66909);let A={currentTab:0,tokenBalance:[],smartAccountDeployed:!1,addressLabels:new Map,user:void 0,preferredAccountType:void 0},S={caipNetwork:void 0,supportsAllNetworks:!0,smartAccountEnabledNetworks:[]},I=(0,i.sj)({chains:(0,n.Yr)(),activeCaipAddress:void 0,activeChain:void 0,activeCaipNetwork:void 0,noAdapters:!1,universalAdapter:{connectionControllerClient:void 0},isSwitchingNamespace:!1}),N={state:I,subscribe:e=>(0,i.Ld)(I,()=>{e(I)}),subscribeKey:(e,t)=>(0,n.VW)(I,e,t),subscribeAccountStateProp(e,t,r){let i=r||I.activeChain;return i?(0,n.VW)(I.chains.get(i)?.accountState||{},e,t):()=>void 0},subscribeChainProp(e,t,r){let n;return(0,i.Ld)(I.chains,()=>{let i=r||I.activeChain;if(i){let r=I.chains.get(i)?.[e];n!==r&&(n=r,t(r))}})},initialize(e,t,r){let{chainId:n,namespace:o}=p.M.getActiveNetworkProps(),s=t?.find(e=>e.id.toString()===n?.toString()),a=e.find(e=>e?.namespace===o)||e?.[0],l=e.map(e=>e.namespace).filter(e=>void 0!==e),c=new Set(v.OptionsController.state.enableEmbedded?[...l]:[...t?.map(e=>e.chainNamespace)??[]]);e?.length!==0&&a||(I.noAdapters=!0),!I.noAdapters&&(I.activeChain=a?.namespace,I.activeCaipNetwork=s,k.setChainNetworkData(a?.namespace,{caipNetwork:s}),I.activeChain&&E.I.set({activeChain:a?.namespace})),c.forEach(e=>{let n=t?.filter(t=>t.chainNamespace===e),o=p.M.getPreferredAccountTypes()||{},s={...v.OptionsController.state.defaultAccountTypes,...o};k.state.chains.set(e,{namespace:e,networkState:(0,i.sj)({...S,caipNetwork:n?.[0]}),accountState:(0,i.sj)({...A,preferredAccountType:s[e]}),caipNetworks:n??[],...r}),k.setRequestedCaipNetworks(n??[],e)})},removeAdapter(e){if(I.activeChain===e){let t=Array.from(I.chains.entries()).find(([t])=>t!==e);if(t){let e=t[1]?.caipNetworks?.[0];e&&k.setActiveCaipNetwork(e)}}I.chains.delete(e)},addAdapter(e,{connectionControllerClient:t},r){if(!e.namespace)throw Error("ChainController:addAdapter - adapter must have a namespace");I.chains.set(e.namespace,{namespace:e.namespace,networkState:{...S,caipNetwork:r[0]},accountState:{...A},caipNetworks:r,connectionControllerClient:t}),k.setRequestedCaipNetworks(r?.filter(t=>t.chainNamespace===e.namespace)??[],e.namespace)},addNetwork(e){let t=I.chains.get(e.chainNamespace);if(t){let r=[...t.caipNetworks||[]];t.caipNetworks?.find(t=>t.id===e.id)||r.push(e),I.chains.set(e.chainNamespace,{...t,caipNetworks:r}),k.setRequestedCaipNetworks(r,e.chainNamespace),y.ConnectorController.filterByNamespace(e.chainNamespace,!0)}},removeNetwork(e,t){let r=I.chains.get(e);if(r){let i=I.activeCaipNetwork?.id===t,n=[...r.caipNetworks?.filter(e=>e.id!==t)||[]];i&&r?.caipNetworks?.[0]&&k.setActiveCaipNetwork(r.caipNetworks[0]),I.chains.set(e,{...r,caipNetworks:n}),k.setRequestedCaipNetworks(n||[],e),0===n.length&&y.ConnectorController.filterByNamespace(e,!1)}},setAdapterNetworkState(e,t){let r=I.chains.get(e);r&&(r.networkState={...r.networkState||S,...t},I.chains.set(e,r))},setChainAccountData(e,t,r=!0){if(!e)throw Error("Chain is required to update chain account data");let i=I.chains.get(e);if(i){let r={...i.accountState||A,...t};I.chains.set(e,{...i,accountState:r}),(1===I.chains.size||I.activeChain===e)&&t.caipAddress&&(I.activeCaipAddress=t.caipAddress)}},setChainNetworkData(e,t){if(!e)return;let r=I.chains.get(e);if(r){let i={...r.networkState||S,...t};I.chains.set(e,{...r,networkState:i})}},setAccountProp(e,t,r,i=!0){k.setChainAccountData(r,{[e]:t},i)},setActiveNamespace(e){I.activeChain=e;let t=e?I.chains.get(e):void 0,r=t?.networkState?.caipNetwork;r?.id&&e&&(I.activeCaipAddress=t?.accountState?.caipAddress,I.activeCaipNetwork=r,k.setChainNetworkData(e,{caipNetwork:r}),p.M.setActiveCaipNetworkId(r?.caipNetworkId),E.I.set({activeChain:e,selectedNetworkId:r?.caipNetworkId}))},setActiveCaipNetwork(e){if(!e)return;let t=I.activeChain===e.chainNamespace;t||k.setIsSwitchingNamespace(!0);let r=I.chains.get(e.chainNamespace);I.activeChain=e.chainNamespace,I.activeCaipNetwork=e,k.setChainNetworkData(e.chainNamespace,{caipNetwork:e});let i=r?.accountState?.address;if(i)I.activeCaipAddress=`${e.chainNamespace}:${e.id}:${i}`;else if(t&&I.activeCaipAddress){let{address:t}=o.u.parseCaipAddress(I.activeCaipAddress);i=t,I.activeCaipAddress=`${e.caipNetworkId}:${i}`}else I.activeCaipAddress=void 0;k.setChainAccountData(e.chainNamespace,{address:i,caipAddress:I.activeCaipAddress}),x.S.resetSend(),E.I.set({activeChain:I.activeChain,selectedNetworkId:I.activeCaipNetwork?.caipNetworkId}),p.M.setActiveCaipNetworkId(e.caipNetworkId),k.checkIfSupportedNetwork(e.chainNamespace)||!v.OptionsController.state.enableNetworkSwitch||v.OptionsController.state.allowUnsupportedChain||m.ConnectionController.state.wcBasic||k.showUnsupportedChainUI()},addCaipNetwork(e){if(!e)return;let t=I.chains.get(e.chainNamespace);t&&t?.caipNetworks?.push(e)},async switchActiveNamespace(e){if(!e)return;let t=e!==k.state.activeChain,r=k.getNetworkData(e)?.caipNetwork,i=k.getCaipNetworkByNamespace(e,r?.id);t&&i&&await k.switchActiveNetwork(i)},async switchActiveNetwork(e,{throwOnFailure:t=!1}={}){let r=k.state.activeChain;if(!r)throw Error("ChainController:switchActiveNetwork - namespace is required");let i="AUTH"===C.O.getProviderId(I.activeChain),n=k.getAccountData(r)?.address,o=s.b.AUTH_CONNECTOR_SUPPORTED_CHAINS.includes(e.chainNamespace);try{if(n&&e.chainNamespace===r||i&&o){let t=g.j.get(e.chainNamespace);if(!t)throw Error("Adapter not found");await t.switchNetwork({caipNetwork:e})}k.setActiveCaipNetwork(e)}catch(e){if(t)throw e}w.X.sendEvent({type:"track",event:"SWITCH_NETWORK",properties:{network:e.caipNetworkId}})},getConnectionControllerClient(e){let t=e||I.activeChain;if(!t)throw Error("Chain is required to get connection controller client");let r=I.chains.get(t);if(!r?.connectionControllerClient)throw Error("ConnectionController client not set");return r.connectionControllerClient},getNetworkProp(e,t){let r=I.chains.get(t)?.networkState;if(r)return r[e]},getRequestedCaipNetworks(e){let t=I.chains.get(e),{approvedCaipNetworkIds:r=[],requestedCaipNetworks:i=[]}=t?.networkState||{};return h.j.sortRequestedNetworks(r,i).filter(e=>e?.id)},getAllRequestedCaipNetworks(){let e=[];return I.chains.forEach(t=>{if(!t.namespace)throw Error("ChainController:getAllRequestedCaipNetworks - chainAdapter must have a namespace");let r=k.getRequestedCaipNetworks(t.namespace);e.push(...r)}),e},setRequestedCaipNetworks(e,t){k.setAdapterNetworkState(t,{requestedCaipNetworks:e});let r=Array.from(new Set(k.getAllRequestedCaipNetworks().map(e=>e.chainNamespace)));y.ConnectorController.filterByNamespaces(r)},getAllApprovedCaipNetworkIds(){let e=[];return I.chains.forEach(t=>{if(!t.namespace)throw Error("ChainController:getAllApprovedCaipNetworkIds - chainAdapter must have a namespace");let r=k.getApprovedCaipNetworkIds(t.namespace);e.push(...r)}),e},getActiveCaipNetwork:e=>e?I.chains.get(e)?.networkState?.caipNetwork:I.activeCaipNetwork,getActiveCaipAddress:()=>I.activeCaipAddress,getApprovedCaipNetworkIds(e){let t=I.chains.get(e);return t?.networkState?.approvedCaipNetworkIds||[]},setApprovedCaipNetworksData(e,t){k.setAdapterNetworkState(e,t)},checkIfSupportedNetwork(e,t){let r=t||I.activeCaipNetwork?.caipNetworkId,i=k.getRequestedCaipNetworks(e);return!i.length||i?.some(e=>e.caipNetworkId===r)},checkIfSupportedChainId(e){if(!I.activeChain)return!0;let t=k.getRequestedCaipNetworks(I.activeChain);return t?.some(t=>t.id===e)},checkIfSmartAccountEnabled(){let e=a.p.caipNetworkIdToNumber(I.activeCaipNetwork?.caipNetworkId);if(!I.activeChain||!e)return!1;let t=l.e.get(c.$0.SMART_ACCOUNT_ENABLED_NETWORKS)?.split(",")||[];return!!t?.includes(e.toString())},showUnsupportedChainUI(){b.I.open({view:"UnsupportedChain"})},checkIfNamesSupported(){let e=I.activeCaipNetwork;return!!(e?.chainNamespace&&u.bq.NAMES_SUPPORTED_CHAIN_NAMESPACES.includes(e.chainNamespace))},resetNetwork(e){k.setAdapterNetworkState(e,{approvedCaipNetworkIds:void 0,supportsAllNetworks:!0})},resetAccount(e){if(!e)throw Error("Chain is required to set account prop");let t=k.state.chains.get(e)?.accountState?.preferredAccountType,r=v.OptionsController.state.defaultAccountTypes[e];I.activeCaipAddress=void 0,k.setChainAccountData(e,{smartAccountDeployed:!1,currentTab:0,caipAddress:void 0,address:void 0,balance:void 0,balanceSymbol:void 0,profileName:void 0,profileImage:void 0,addressExplorerUrl:void 0,tokenBalance:[],connectedWalletInfo:void 0,preferredAccountType:r||t,socialProvider:void 0,socialWindow:void 0,farcasterUrl:void 0,user:void 0,status:"disconnected"}),y.ConnectorController.removeConnectorId(e)},setIsSwitchingNamespace(e){I.isSwitchingNamespace=e},getFirstCaipNetworkSupportsAuthConnector(){let e=[];if(I.chains.forEach(t=>{s.b.AUTH_CONNECTOR_SUPPORTED_CHAINS.find(e=>e===t.namespace)&&t.namespace&&e.push(t.namespace)}),e.length>0){let t=e[0];return t?I.chains.get(t)?.caipNetworks?.[0]:void 0}},getAccountData(e){let t=e||I.activeChain;if(t)return k.state.chains.get(t)?.accountState},getNetworkData(e){let t=e||I.activeChain;if(t)return k.state.chains.get(t)?.networkState},getCaipNetworkByNamespace(e,t){if(!e)return;let r=k.state.chains.get(e);return r?.caipNetworks?.find(e=>e.id.toString()===t?.toString())||r?.networkState?.caipNetwork||r?.caipNetworks?.[0]},getRequestedCaipNetworkIds(){let e=y.ConnectorController.state.filterByNamespace;return(e?[I.chains.get(e)]:Array.from(I.chains.values())).flatMap(e=>e?.caipNetworks||[]).map(e=>e.caipNetworkId)},getCaipNetworks:e=>e?k.getRequestedCaipNetworks(e):k.getAllRequestedCaipNetworks(),getCaipNetworkById:(e,t)=>N.getCaipNetworks(t).find(t=>t.id.toString()===e.toString()||t.caipNetworkId.toString()===e.toString()),setLastConnectedSIWECaipNetwork(e){I.lastConnectedSIWECaipNetwork=e},getLastConnectedSIWECaipNetwork:()=>I.lastConnectedSIWECaipNetwork,async fetchTokenBalance(e){let t=k.getAccountData();if(!t)return[];let r=k.state.activeCaipNetwork?.caipNetworkId,i=k.state.activeCaipNetwork?.chainNamespace,n=k.state.activeCaipAddress,o=n?h.j.getPlainAddress(n):void 0;if(k.setAccountProp("balanceLoading",!0,i),t.lastRetry&&!h.j.isAllowedRetry(t.lastRetry,30*u.bq.ONE_SEC_MS))return k.setAccountProp("balanceLoading",!1,i),[];try{if(o&&r&&i){let e=await d.Q.getMyTokensWithBalance();return k.setAccountProp("tokenBalance",e,i),k.setAccountProp("lastRetry",void 0,i),k.setAccountProp("balanceLoading",!1,i),e}}catch(t){k.setAccountProp("lastRetry",Date.now(),i),e?.(t),_.SnackController.showError("Token Balance Unavailable")}finally{k.setAccountProp("balanceLoading",!1,i)}return[]},isCaipNetworkDisabled(e){let t=e.chainNamespace,r=!!k.getAccountData(t)?.caipAddress,i=k.getAllApprovedCaipNetworkIds(),n=!1!==k.getNetworkProp("supportsAllNetworks",t),o=y.ConnectorController.getConnectorId(t),a=y.ConnectorController.getAuthConnector(),l=o===s.b.CONNECTOR_ID.AUTH&&a;return!!r&&!n&&!l&&!i?.includes(e.caipNetworkId)}},k=(0,f.P)(N)},64369:function(e,t,r){"use strict";let i;r.d(t,{ConnectionController:function(){return _}});var n=r(69887),o=r(55543),s=r(44649),a=r(86988),l=r(43291),c=r(8789),d=r(4786),u=r(6943),h=r(35652),p=r(31929),f=r(89512),g=r(86777),m=r(59712),y=r(53357),w=r(36801);let b={checkNamespaceConnectorId:(e,t)=>h.ConnectorController.getConnectorId(e)===t,isSocialProvider:e=>m.bq.DEFAULT_REMOTE_FEATURES.socials.includes(e),connectWalletConnect:({walletConnect:e,connector:t,closeModalOnConnect:r=!0,redirectViewOnModalClose:i="Connect",onOpen:n,onConnect:o})=>new Promise((s,l)=>{if(e&&h.ConnectorController.setActiveConnector(t),n?.(y.j.isMobile()&&e),i){let e=f.I.subscribeKey("open",t=>{t||(g.RouterController.state.view!==i&&g.RouterController.replace(i),e(),l(Error("Modal closed")))})}let c=u.R.subscribeKey("activeCaipAddress",e=>{e&&(o?.(),r&&f.I.close(),c(),s(a.u.parseCaipAddress(e)))})}),connectExternal:e=>new Promise((t,r)=>{let i=u.R.subscribeKey("activeCaipAddress",e=>{e&&(f.I.close(),i(),t(a.u.parseCaipAddress(e)))});_.connectExternal(e,e.chain).catch(()=>{i(),r(Error("Connection rejected"))})}),connectSocial({social:e,namespace:t,closeModalOnConnect:r=!0,onOpenFarcaster:i,onConnect:n}){let o;let l=!1,c=null,d=t||u.R.state.activeChain,g=u.R.subscribeKey("activeCaipAddress",e=>{e&&(r&&f.I.close(),g())});return new Promise((t,r)=>{async function g(i){if(i.data?.resultUri){if(i.origin===s.b.SECURE_SITE_SDK_ORIGIN){window.removeEventListener("message",g,!1);try{let n=h.ConnectorController.getAuthConnector(d);if(n&&!l){o&&o.close(),l=!0;let s=i.data.resultUri;p.X.sendEvent({type:"track",event:"SOCIAL_LOGIN_REQUEST_USER_DATA",properties:{provider:e}}),w.M.setConnectedSocialProvider(e),await _.connectExternal({id:n.id,type:n.type,socialUri:s},n.chain);let c=u.R.state.activeCaipAddress;if(!c){r(Error("Failed to connect"));return}t(a.u.parseCaipAddress(c)),p.X.sendEvent({type:"track",event:"SOCIAL_LOGIN_SUCCESS",properties:{provider:e}})}}catch(t){p.X.sendEvent({type:"track",event:"SOCIAL_LOGIN_ERROR",properties:{provider:e,message:y.j.parseError(t)}}),r(Error("Failed to connect"))}}else p.X.sendEvent({type:"track",event:"SOCIAL_LOGIN_ERROR",properties:{provider:e,message:"Untrusted Origin"}})}}!async function(){if(p.X.sendEvent({type:"track",event:"SOCIAL_LOGIN_STARTED",properties:{provider:e}}),"farcaster"===e){i?.();let t=f.I.subscribeKey("open",i=>{i||"farcaster"!==e||(r(Error("Popup closed")),n?.(),t())}),o=h.ConnectorController.getAuthConnector();if(o){let e=u.R.getAccountData(d);if(!e?.farcasterUrl)try{let{url:e}=await o.provider.getFarcasterUri();u.R.setAccountProp("farcasterUrl",e,d)}catch{r(Error("Failed to connect to farcaster"))}}}else{let t=h.ConnectorController.getAuthConnector();c=y.j.returnOpenHref(`${s.b.SECURE_SITE_SDK_ORIGIN}/loading`,"popupWindow","width=600,height=800,scrollbars=yes");try{if(t){let{uri:i}=await t.provider.getSocialRedirectUri({provider:e});if(c&&i){c.location.href=i,o=c;let e=setInterval(()=>{o?.closed&&!l&&(r(Error("Popup closed")),clearInterval(e))},1e3);window.addEventListener("message",g,!1)}else c?.close(),r(Error("Failed to initiate social connection"))}}catch{r(Error("Failed to initiate social connection")),c?.close()}}}()})},connectEmail:({closeModalOnConnect:e=!0,redirectViewOnModalClose:t="Connect",onOpen:r,onConnect:i})=>new Promise((n,o)=>{if(r?.(),t){let e=f.I.subscribeKey("open",r=>{r||(g.RouterController.state.view!==t&&g.RouterController.replace(t),e(),o(Error("Modal closed")))})}let s=u.R.subscribeKey("activeCaipAddress",t=>{t&&(i?.(),e&&f.I.close(),s(),n(a.u.parseCaipAddress(t)))})}),async updateEmail(){let e=w.M.getConnectedConnectorId(u.R.state.activeChain),t=h.ConnectorController.getAuthConnector();if(!t)throw Error("No auth connector found");if(e!==s.b.CONNECTOR_ID.AUTH)throw Error("Not connected to email or social");let r=t.provider.getEmail()??"";return await f.I.open({view:"UpdateEmailWallet",data:{email:r,redirectView:void 0}}),new Promise((e,i)=>{let n=setInterval(()=>{let i=t.provider.getEmail()??"";i!==r&&(f.I.close(),clearInterval(n),o(),e({email:i}))},1e3),o=f.I.subscribeKey("open",e=>{e||("Connect"!==g.RouterController.state.view&&g.RouterController.push("Connect"),clearInterval(n),o(),i(Error("Modal closed")))})})},canSwitchToSmartAccount:e=>u.R.checkIfSmartAccountEnabled()&&(0,l.r9)(e)===d.y_.ACCOUNT_TYPES.EOA};var v=r(59388),C=r(96986),E=r(70216);let x=(0,n.sj)({connections:new Map,recentConnections:new Map,isSwitchingConnection:!1,wcError:!1,wcFetchingUri:!1,buffering:!1,status:"disconnected"}),_=(0,v.P)({state:x,subscribe:e=>(0,n.Ld)(x,()=>e(x)),subscribeKey:(e,t)=>(0,o.VW)(x,e,t),_getClient:()=>x._client,setClient(e){x._client=(0,n.iH)(e)},initialize(e){let t=e.filter(e=>!!e.namespace).map(e=>e.namespace);_.syncStorageConnections(t)},syncStorageConnections(e){let t=w.M.getConnections();for(let r of e??Array.from(u.R.state.chains.keys())){let e=t[r]??[],i=new Map(x.recentConnections);i.set(r,e),x.recentConnections=i}},getConnections:e=>e?x.connections.get(e)??[]:[],hasAnyConnection:e=>Array.from(_.state.connections.values()).flatMap(e=>e).some(({connectorId:t})=>t===e),async connectWalletConnect({cache:e="auto"}={}){x.wcFetchingUri=!0;let t=y.j.isTelegram()||y.j.isSafari()&&y.j.isIos();if("always"===e||"auto"===e&&t){if(i){await i,i=void 0;return}if(!y.j.isPairingExpired(x?.wcPairingExpiry)){let e=x.wcUri;x.wcUri=e;return}i=_._getClient()?.connectWalletConnect?.().catch(()=>void 0),_.state.status="connecting",await i,i=void 0,x.wcPairingExpiry=void 0,_.state.status="connected"}else await _._getClient()?.connectWalletConnect?.()},async connectExternal(e,t,r=!0){let i=await _._getClient()?.connectExternal?.(e);r&&u.R.setActiveNamespace(t);let n=h.ConnectorController.state.allConnectors.find(t=>t.id===e?.id),o="AUTH"===e.type?"email":"browser";return p.X.sendEvent({type:"track",event:"CONNECT_SUCCESS",properties:{method:o,name:n?.name||"Unknown",view:g.RouterController.state.view,walletRank:n?.explorerWallet?.order}}),i},async reconnectExternal(e){await _._getClient()?.reconnectExternal?.(e);let t=e.chain||u.R.state.activeChain;t&&h.ConnectorController.setConnectorId(e.id,t)},async setPreferredAccountType(e,t){if(!t)return;f.I.setLoading(!0,u.R.state.activeChain);let r=h.ConnectorController.getAuthConnector();r&&(u.R.setAccountProp("preferredAccountType",e,t),await r.provider.setPreferredAccount(e),w.M.setPreferredAccountTypes(Object.entries(u.R.state.chains).reduce((e,[t,r])=>{let i=(0,l.r9)(t);return void 0!==i&&(e[t]=i),e},{})),await _.reconnectExternal(r),f.I.setLoading(!1,u.R.state.activeChain),p.X.sendEvent({type:"track",event:"SET_PREFERRED_ACCOUNT_TYPE",properties:{accountType:e,network:u.R.state.activeCaipNetwork?.caipNetworkId||""}}))},signMessage:async e=>_._getClient()?.signMessage(e),parseUnits:(e,t)=>_._getClient()?.parseUnits(e,t),formatUnits:(e,t)=>_._getClient()?.formatUnits(e,t),updateBalance:e=>_._getClient()?.updateBalance(e),sendTransaction:async e=>_._getClient()?.sendTransaction(e),getCapabilities:async e=>_._getClient()?.getCapabilities(e),grantPermissions:async e=>_._getClient()?.grantPermissions(e),walletGetAssets:async e=>_._getClient()?.walletGetAssets(e)??{},estimateGas:async e=>_._getClient()?.estimateGas(e),writeContract:async e=>_._getClient()?.writeContract(e),getEnsAddress:async e=>_._getClient()?.getEnsAddress(e),getEnsAvatar:async e=>_._getClient()?.getEnsAvatar(e),checkInstalled:e=>_._getClient()?.checkInstalled?.(e)||!1,resetWcConnection(){x.wcUri=void 0,x.wcPairingExpiry=void 0,x.wcLinking=void 0,x.recentWallet=void 0,x.wcFetchingUri=!1,x.status="disconnected",E.s.resetTransactions(),w.M.deleteWalletConnectDeepLink(),w.M.deleteRecentWallet(),C.I.set({connectingWallet:void 0})},resetUri(){x.wcUri=void 0,x.wcPairingExpiry=void 0,i=void 0,x.wcFetchingUri=!1,C.I.set({connectingWallet:void 0})},finalizeWcConnection(e){let{wcLinking:t,recentWallet:r}=_.state;t&&w.M.setWalletConnectDeepLink(t),r&&w.M.setAppKitRecent(r),e&&p.X.sendEvent({type:"track",event:"CONNECT_SUCCESS",address:e,properties:{method:t?"mobile":"qrcode",name:g.RouterController.state.data?.wallet?.name||"Unknown",view:g.RouterController.state.view,walletRank:r?.order}})},setWcBasic(e){x.wcBasic=e},setUri(e){x.wcUri=e,x.wcFetchingUri=!1,x.wcPairingExpiry=y.j.getPairingExpiry()},setWcLinking(e){x.wcLinking=e},setWcError(e){x.wcError=e,x.wcFetchingUri=!1,x.buffering=!1},setRecentWallet(e){x.recentWallet=e},setBuffering(e){x.buffering=e},setStatus(e){x.status=e},setIsSwitchingConnection(e){x.isSwitchingConnection=e},async disconnect({id:e,namespace:t,initialDisconnect:r}={}){try{await _._getClient()?.disconnect({id:e,chainNamespace:t,initialDisconnect:r})}catch(e){throw new v.g("Failed to disconnect","INTERNAL_SDK_ERROR",e)}},async disconnectConnector({id:e,namespace:t}){try{await _._getClient()?.disconnectConnector({id:e,namespace:t})}catch(e){throw new v.g("Failed to disconnect connector","INTERNAL_SDK_ERROR",e)}},setConnections(e,t){let r=new Map(x.connections);r.set(t,e),x.connections=r},async handleAuthAccountSwitch({address:e,namespace:t}){let r=u.R.getAccountData(t),i=r?.user?.accounts?.find(e=>"smartAccount"===e.type),n=i&&i.address.toLowerCase()===e.toLowerCase()&&b.canSwitchToSmartAccount(t)?"smartAccount":"eoa";await _.setPreferredAccountType(n,t)},async handleActiveConnection({connection:e,namespace:t,address:r}){let i=h.ConnectorController.getConnectorById(e.connectorId),n=e.connectorId===s.b.CONNECTOR_ID.AUTH;if(!i)throw Error(`No connector found for connection: ${e.connectorId}`);if(n)r&&await _.handleAuthAccountSwitch({address:r,namespace:t});else{let e=await _.connectExternal({id:i.id,type:i.type,provider:i.provider,address:r,chain:t},t);return e?.address}return r},async handleDisconnectedConnection({connection:e,namespace:t,address:r,closeModalOnConnect:i}){let n;let o=h.ConnectorController.getConnectorById(e.connectorId),a=e.auth?.name?.toLowerCase(),l=e.connectorId===s.b.CONNECTOR_ID.AUTH,c=e.connectorId===s.b.CONNECTOR_ID.WALLET_CONNECT;if(!o)throw Error(`No connector found for connection: ${e.connectorId}`);if(l){if(a&&b.isSocialProvider(a)){let{address:e}=await b.connectSocial({social:a,closeModalOnConnect:i,onOpenFarcaster(){f.I.open({view:"ConnectingFarcaster"})},onConnect(){g.RouterController.replace("ProfileWallets")}});n=e}else{let{address:e}=await b.connectEmail({closeModalOnConnect:i,onOpen(){f.I.open({view:"EmailLogin"})},onConnect(){g.RouterController.replace("ProfileWallets")}});n=e}}else if(c){let{address:e}=await b.connectWalletConnect({walletConnect:!0,connector:o,closeModalOnConnect:i,onOpen(e){let t=e?"AllWallets":"ConnectingWalletConnect";f.I.state.open?g.RouterController.push(t):f.I.open({view:t})},onConnect(){g.RouterController.replace("ProfileWallets")}});n=e}else{let e=await _.connectExternal({id:o.id,type:o.type,provider:o.provider,chain:t},t);e&&(n=e.address)}return l&&r&&await _.handleAuthAccountSwitch({address:r,namespace:t}),n},async switchConnection({connection:e,address:t,namespace:r,closeModalOnConnect:i,onChange:n}){let o;let s=u.R.getAccountData(r)?.caipAddress;if(s){let{address:e}=a.u.parseCaipAddress(s);o=e}let l=c.f.getConnectionStatus(e,r);switch(l){case"connected":case"active":{let i=await _.handleActiveConnection({connection:e,namespace:r,address:t});if(o&&i){let e=i.toLowerCase()!==o.toLowerCase();n?.({address:i,namespace:r,hasSwitchedAccount:e,hasSwitchedWallet:"active"===l})}break}case"disconnected":{let o=await _.handleDisconnectedConnection({connection:e,namespace:r,address:t,closeModalOnConnect:i});o&&n?.({address:o,namespace:r,hasSwitchedAccount:!0,hasSwitchedWallet:!0});break}default:throw Error(`Invalid connection status: ${l}`)}}})},35652:function(e,t,r){"use strict";r.d(t,{ConnectorController:function(){return C}});var i=r(69887),n=r(55543),o=r(68903),s=r(44649),a=r(62714),l=r(4786),c=r(43291),d=r(32704),u=r(36801),h=r(59388),p=r(17766),f=r(6943),g=r(5688),m=r(86777),y=r(52005);let w=Object.fromEntries(o.F.map(e=>[e,void 0])),b=Object.fromEntries(o.F.map(e=>[e,!0])),v=(0,i.sj)({allConnectors:[],connectors:[],activeConnector:void 0,filterByNamespace:void 0,activeConnectorIds:w,filterByNamespaceMap:b}),C=(0,h.P)({state:v,subscribe:e=>(0,i.Ld)(v,()=>{e(v)}),subscribeKey:(e,t)=>(0,n.VW)(v,e,t),initialize(e){e.forEach(e=>{let t=u.M.getConnectedConnectorId(e);t&&C.setConnectorId(t,e)})},setActiveConnector(e){e&&(v.activeConnector=(0,i.iH)(e))},setConnectors(e){e.filter(e=>!v.allConnectors.some(t=>t.id===e.id&&C.getConnectorName(t.name)===C.getConnectorName(e.name)&&t.chain===e.chain)).forEach(e=>{"MULTI_CHAIN"!==e.type&&v.allConnectors.push((0,i.iH)(e))});let t=C.getEnabledNamespaces(),r=C.getEnabledConnectors(t);v.connectors=C.mergeMultiChainConnectors(r)},filterByNamespaces(e){Object.keys(v.filterByNamespaceMap).forEach(e=>{v.filterByNamespaceMap[e]=!1}),e.forEach(e=>{v.filterByNamespaceMap[e]=!0}),C.updateConnectorsForEnabledNamespaces()},filterByNamespace(e,t){v.filterByNamespaceMap[e]=t,C.updateConnectorsForEnabledNamespaces()},updateConnectorsForEnabledNamespaces(){let e=C.getEnabledNamespaces(),t=C.getEnabledConnectors(e),r=C.areAllNamespacesEnabled();v.connectors=C.mergeMultiChainConnectors(t),r?p.ApiController.clearFilterByNamespaces():p.ApiController.filterByNamespaces(e)},getEnabledNamespaces:()=>Object.entries(v.filterByNamespaceMap).filter(([e,t])=>t).map(([e])=>e),getEnabledConnectors:e=>v.allConnectors.filter(t=>e.includes(t.chain)),areAllNamespacesEnabled:()=>Object.values(v.filterByNamespaceMap).every(e=>e),mergeMultiChainConnectors(e){let t=C.generateConnectorMapByName(e),r=[];return t.forEach(e=>{let t=e[0],i=t?.id===s.b.CONNECTOR_ID.AUTH;e.length>1&&t?r.push({name:t.name,imageUrl:t.imageUrl,imageId:t.imageId,connectors:[...e],type:i?"AUTH":"MULTI_CHAIN",chain:"eip155",id:t?.id||""}):t&&r.push(t)}),r},generateConnectorMapByName(e){let t=new Map;return e.forEach(e=>{let{name:r}=e,i=C.getConnectorName(r);if(!i)return;let n=t.get(i)||[];n.find(t=>t.chain===e.chain)||n.push(e),t.set(i,n)}),t},getConnectorName:e=>e&&({"Trust Wallet":"Trust"})[e]||e,getUniqueConnectorsByName(e){let t=[];return e.forEach(e=>{t.find(t=>t.chain===e.chain)||t.push(e)}),t},addConnector(e){if(e.id===s.b.CONNECTOR_ID.AUTH){let t=(0,i.CO)(g.OptionsController.state),r=y.ThemeController.getSnapshot().themeMode,n=y.ThemeController.getSnapshot().themeVariables;e?.provider?.syncDappData?.({metadata:t.metadata,sdkVersion:t.sdkVersion,projectId:t.projectId,sdkType:t.sdkType}),e?.provider?.syncTheme({themeMode:r,themeVariables:n,w3mThemeVariables:a.t(n,r)}),C.setConnectors([e])}else C.setConnectors([e])},getAuthConnector(e){let t=e||f.R.state.activeChain,r=v.connectors.find(e=>e.id===s.b.CONNECTOR_ID.AUTH);return r?r?.connectors?.length?r.connectors.find(e=>e.chain===t):r:void 0},getAnnouncedConnectorRdns:()=>v.connectors.filter(e=>"ANNOUNCED"===e.type).map(e=>e.info?.rdns),getConnectorById:e=>v.allConnectors.find(t=>t.id===e),getConnector({id:e,namespace:t}){let r=t||f.R.state.activeChain;return v.allConnectors.filter(e=>e.chain===r).find(t=>t.id===e||t.explorerId===e)},syncIfAuthConnector(e){if("AUTH"!==e.id)return;let t=(0,i.CO)(g.OptionsController.state),r=y.ThemeController.getSnapshot().themeMode,n=y.ThemeController.getSnapshot().themeVariables;e?.provider?.syncDappData?.({metadata:t.metadata,sdkVersion:t.sdkVersion,sdkType:t.sdkType,projectId:t.projectId}),e.provider.syncTheme({themeMode:r,themeVariables:n,w3mThemeVariables:(0,a.t)(n,r)})},getConnectorsByNamespace(e){let t=v.allConnectors.filter(t=>t.chain===e);return C.mergeMultiChainConnectors(t)},canSwitchToSmartAccount:e=>f.R.checkIfSmartAccountEnabled()&&(0,c.r9)(e)===l.y_.ACCOUNT_TYPES.EOA,selectWalletConnector(e){let t=m.RouterController.state.data?.redirectView,r=f.R.state.activeChain,i=r?C.getConnector({id:e.id,namespace:r}):void 0;d.R.handleMobileDeeplinkRedirect(i?.explorerId||e.id,f.R.state.activeChain),i?m.RouterController.push("ConnectingExternal",{connector:i,wallet:e,redirectView:t}):m.RouterController.push("ConnectingWalletConnect",{wallet:e,redirectView:t})},getConnectors:e=>e?C.getConnectorsByNamespace(e):C.mergeMultiChainConnectors(v.allConnectors),setFilterByNamespace(e){v.filterByNamespace=e,v.connectors=C.getConnectors(e),p.ApiController.setFilterByNamespace(e)},setConnectorId(e,t){e&&(v.activeConnectorIds={...v.activeConnectorIds,[t]:e},u.M.setConnectedConnectorId(t,e))},removeConnectorId(e){v.activeConnectorIds={...v.activeConnectorIds,[e]:void 0},u.M.deleteConnectedConnectorId(e)},getConnectorId(e){if(e)return v.activeConnectorIds[e]},isConnected:e=>e?!!v.activeConnectorIds[e]:Object.values(v.activeConnectorIds).some(e=>!!e),resetConnectorIds(){v.activeConnectorIds={...w}},extendConnectorsWithExplorerWallets(e){v.allConnectors.forEach(t=>{let r=e.find(e=>e.id===t.id||e.rdns&&e.rdns===t.info?.rdns);r&&(t.explorerWallet=r)});let t=C.getEnabledNamespaces(),r=C.getEnabledConnectors(t);v.connectors=C.mergeMultiChainConnectors(r)}})},12540:function(e,t,r){"use strict";r.d(t,{a:function(){return f}});var i=r(69887),n=r(55543);let o={convertEVMChainIdToCoinType(e){if(e>=2147483648)throw Error("Invalid chainId");return(2147483648|e)>>>0}};var s=r(36801),a=r(59388),l=r(61704),c=r(6943),d=r(64369),u=r(35652),h=r(86777);let p=(0,i.sj)({suggestions:[],loading:!1}),f=(0,a.P)({state:p,subscribe:e=>(0,i.Ld)(p,()=>e(p)),subscribeKey:(e,t)=>(0,n.VW)(p,e,t),async resolveName(e){try{return await l.L.lookupEnsName(e)}catch(e){throw Error(e?.reasons?.[0]?.description||"Error resolving name")}},async isNameRegistered(e){try{return await l.L.lookupEnsName(e),!0}catch{return!1}},async getSuggestions(e){try{p.loading=!0,p.suggestions=[];let t=await l.L.getEnsNameSuggestions(e);return p.suggestions=t.suggestions||[],p.suggestions}catch(e){throw Error(f.parseEnsApiError(e,"Error fetching name suggestions"))}finally{p.loading=!1}},async getNamesForAddress(e){try{if(!c.R.state.activeCaipNetwork)return[];let t=s.M.getEnsFromCacheForAddress(e);if(t)return t;let r=await l.L.reverseLookupEnsName({address:e});return s.M.updateEnsCache({address:e,ens:r,timestamp:Date.now()}),r}catch(e){throw Error(f.parseEnsApiError(e,"Error fetching names for address"))}},async registerName(e){let t=c.R.state.activeCaipNetwork,r=c.R.getAccountData(t?.chainNamespace)?.address,i=u.ConnectorController.getAuthConnector();if(!t)throw Error("Network not found");if(!r||!i)throw Error("Address or auth connector not found");p.loading=!0;try{let i=JSON.stringify({name:e,attributes:{},timestamp:Math.floor(Date.now()/1e3)});h.RouterController.pushTransactionStack({onCancel(){h.RouterController.replace("RegisterAccountName")}});let n=await d.ConnectionController.signMessage(i);p.loading=!1;let a=t.id;if(!a)throw Error("Network not found");let u=o.convertEVMChainIdToCoinType(Number(a));await l.L.registerEnsName({coinType:u,address:r,signature:n,message:i}),c.R.setAccountProp("profileName",e,t.chainNamespace),s.M.updateEnsCache({address:r,ens:[{name:e,registered_at:new Date().toISOString(),updated_at:void 0,addresses:{},attributes:[]}],timestamp:Date.now()}),h.RouterController.replace("RegisterAccountNameSuccess")}catch(r){let t=f.parseEnsApiError(r,`Error registering name ${e}`);throw h.RouterController.replace("RegisterAccountName"),Error(t)}finally{p.loading=!1}},validateName:e=>/^[a-zA-Z0-9-]{4,}$/u.test(e),parseEnsApiError:(e,t)=>e?.reasons?.[0]?.description||t})},31929:function(e,t,r){"use strict";r.d(t,{X:function(){return h}});var i=r(69887),n=r(53357),o=r(39905),s=r(6943),a=r(5688);let l=n.j.getAnalyticsUrl(),c=new o.V({baseUrl:l,clientId:null}),d=["MODAL_CREATED"],u=(0,i.sj)({timestamp:Date.now(),lastFlush:Date.now(),reportedErrors:{},data:{type:"track",event:"MODAL_CREATED"},pendingEvents:[],subscribedToVisibilityChange:!1,walletImpressions:[]}),h={state:u,subscribe:e=>(0,i.Ld)(u,()=>e(u)),getSdkProperties(){let{projectId:e,sdkType:t,sdkVersion:r}=a.OptionsController.state;return{projectId:e,st:t,sv:r||"html-wagmi-4.2.2"}},shouldFlushEvents(){let e=JSON.stringify(u.pendingEvents).length/1024>45,t=u.lastFlush+1e4{let t=e.props.event;return"WALLET_IMPRESSION_V2"!==t})}catch{return e}},_submitPendingEvents(){if(u.lastFlush=Date.now(),0!==u.pendingEvents.length||0!==u.walletImpressions.length)try{let e=h._transformPendingEventsForBatch(u.pendingEvents);u.walletImpressions.length&&e.push({eventId:n.j.getUUID(),url:window.location.href,domain:window.location.hostname,timestamp:Date.now(),props:{type:"track",event:"WALLET_IMPRESSION_V2",items:[...u.walletImpressions]}}),c.sendBeacon({path:"/batch",params:h.getSdkProperties(),body:e}),u.reportedErrors.FORBIDDEN=!1,u.pendingEvents=[],u.walletImpressions=[]}catch(e){u.reportedErrors.FORBIDDEN=!0}},subscribeToFlushTriggers(){u.subscribedToVisibilityChange||"undefined"==typeof document||(u.subscribedToVisibilityChange=!0,document?.addEventListener?.("visibilitychange",()=>{"hidden"===document.visibilityState&&h._submitPendingEvents()}),document?.addEventListener?.("freeze",()=>{h._submitPendingEvents()}),window?.addEventListener?.("pagehide",()=>{h._submitPendingEvents()}),setInterval(()=>{h._submitPendingEvents()},1e4))}}},9993:function(e,t,r){"use strict";r.d(t,{u:function(){return y}});var i=r(69887),n=r(55543),o=r(23614),s=r(43291),a=r(59712),l=r(53357),c=r(91409),d=r(61704),u=r(6943),h=r(31929),p=r(5688),f=r(66909);let g={paymentAsset:null,amount:null,tokenAmount:0,priceLoading:!1,error:null,exchanges:[],isLoading:!1,currentPayment:void 0,isPaymentInProgress:!1,paymentId:"",assets:[]},m=(0,i.sj)(g),y={state:m,subscribe:e=>(0,i.Ld)(m,()=>e(m)),subscribeKey:(e,t)=>(0,n.VW)(m,e,t),resetState(){Object.assign(m,{...g})},async getAssetsForNetwork(e){let t=(0,c.ec)(e),r=await y.getAssetsImageAndPrice(t),i=t.map(e=>{let t="native"===e.asset?(0,s.EO)():`${e.network}:${e.asset}`,i=r.find(e=>e.fungibles?.[0]?.address?.toLowerCase()===t.toLowerCase());return{...e,price:i?.fungibles?.[0]?.price||1,metadata:{...e.metadata,iconUrl:i?.fungibles?.[0]?.iconUrl}}});return m.assets=i,i},async getAssetsImageAndPrice(e){let t=e.map(e=>"native"===e.asset?(0,s.EO)():`${e.network}:${e.asset}`);return await Promise.all(t.map(e=>d.L.fetchTokenPrice({addresses:[e]})))},getTokenAmount(){if(!m?.paymentAsset?.price)throw Error("Cannot get token price");let e=o.C.bigNumber(m.amount??0).round(8),t=o.C.bigNumber(m.paymentAsset.price).round(8);return e.div(t).round(8).toNumber()},setAmount(e){m.amount=e,m.paymentAsset?.price&&(m.tokenAmount=y.getTokenAmount())},setPaymentAsset(e){m.paymentAsset=e},isPayWithExchangeEnabled:()=>p.OptionsController.state.remoteFeatures?.payWithExchange,isPayWithExchangeSupported:()=>y.isPayWithExchangeEnabled()&&u.R.state.activeCaipNetwork&&a.bq.PAY_WITH_EXCHANGE_SUPPORTED_CHAIN_NAMESPACES.includes(u.R.state.activeCaipNetwork.chainNamespace),async fetchExchanges(){try{let e=y.isPayWithExchangeSupported();if(!m.paymentAsset||!e){m.exchanges=[],m.isLoading=!1;return}m.isLoading=!0;let t=await (0,c.YK)({page:0,asset:(0,c.Us)(m.paymentAsset.network,m.paymentAsset.asset),amount:m.amount?.toString()??"0"});m.exchanges=t.exchanges.slice(0,2)}catch(e){throw f.SnackController.showError("Unable to get exchanges"),Error("Unable to get exchanges")}finally{m.isLoading=!1}},async getPayUrl(e,t){try{let r=Number(t.amount),i=await (0,c.kv)({exchangeId:e,asset:(0,c.Us)(t.network,t.asset),amount:r.toString(),recipient:`${t.network}:${t.recipient}`});return h.X.sendEvent({type:"track",event:"PAY_EXCHANGE_SELECTED",properties:{exchange:{id:e},configuration:{network:t.network,asset:t.asset,recipient:t.recipient,amount:r},currentPayment:{type:"exchange",exchangeId:e},source:"fund-from-exchange",headless:!1}}),i}catch(e){if(e instanceof Error&&e.message.includes("is not supported"))throw Error("Asset not supported");throw Error(e.message)}},async handlePayWithExchange(e){try{let t=u.R.getAccountData()?.address;if(!t)throw Error("No account connected");if(!m.paymentAsset)throw Error("No payment asset selected");let r=l.j.returnOpenHref("","popupWindow","scrollbar=yes,width=480,height=720");if(!r)throw Error("Could not create popup window");m.isPaymentInProgress=!0,m.paymentId=crypto.randomUUID(),m.currentPayment={type:"exchange",exchangeId:e};let{network:i,asset:n}=m.paymentAsset,o={network:i,asset:n,amount:m.tokenAmount,recipient:t},s=await y.getPayUrl(e,o);if(!s){try{r.close()}catch(e){console.error("Unable to close popup window",e)}throw Error("Unable to initiate payment")}m.currentPayment.sessionId=s.sessionId,m.currentPayment.status="IN_PROGRESS",m.currentPayment.exchangeId=e,r.location.href=s.url}catch(e){m.error="Unable to initiate payment",f.SnackController.showError(m.error)}},async waitUntilComplete({exchangeId:e,sessionId:t,paymentId:r,retries:i=20}){let n=await y.getBuyStatus(e,t,r);if("SUCCESS"===n.status||"FAILED"===n.status)return n;if(0===i)throw Error("Unable to get deposit status");return await new Promise(e=>{setTimeout(e,5e3)}),y.waitUntilComplete({exchangeId:e,sessionId:t,paymentId:r,retries:i-1})},async getBuyStatus(e,t,r){try{if(!m.currentPayment)throw Error("No current payment");let i=await (0,c.Cx)({sessionId:t,exchangeId:e});if(m.currentPayment.status=i.status,"SUCCESS"===i.status||"FAILED"===i.status){let e=u.R.getAccountData()?.address;m.currentPayment.result=i.txHash,m.isPaymentInProgress=!1,h.X.sendEvent({type:"track",event:"SUCCESS"===i.status?"PAY_SUCCESS":"PAY_ERROR",properties:{message:"FAILED"===i.status?l.j.parseError(m.error):void 0,source:"fund-from-exchange",paymentId:r,configuration:{network:m.paymentAsset?.network||"",asset:m.paymentAsset?.asset||"",recipient:e||"",amount:m.amount??0},currentPayment:{type:"exchange",exchangeId:m.currentPayment?.exchangeId,sessionId:m.currentPayment?.sessionId,result:i.txHash}}})}return i}catch(e){return{status:"UNKNOWN",txHash:""}}},reset(){m.currentPayment=void 0,m.isPaymentInProgress=!1,m.paymentId="",m.paymentAsset=null,m.amount=0,m.tokenAmount=0,m.priceLoading=!1,m.error=null,m.exchanges=[],m.isLoading=!1}}},89512:function(e,t,r){"use strict";r.d(t,{I:function(){return y}});var i=r(69887),n=r(55543),o=r(53357),s=r(4822),a=r(59388),l=r(17766),c=r(6943),d=r(64369),u=r(35652),h=r(31929),p=r(5688),f=r(96986),g=r(86777);let m=(0,i.sj)({loading:!1,loadingNamespaceMap:new Map,open:!1,shake:!1,namespace:void 0}),y=(0,a.P)({state:m,subscribe:e=>(0,i.Ld)(m,()=>e(m)),subscribeKey:(e,t)=>(0,n.VW)(m,e,t),async open(e){let t=e?.namespace,r=c.R.state.activeChain,i=t&&t!==r,n=c.R.getAccountData(e?.namespace)?.caipAddress,a=c.R.state.noAdapters;if(d.ConnectionController.state.wcBasic?l.ApiController.prefetch({fetchNetworkImages:!1,fetchConnectorImages:!1,fetchWalletRanks:!1}):await l.ApiController.prefetch(),u.ConnectorController.setFilterByNamespace(e?.namespace),y.setLoading(!0,t),t&&i){let e=c.R.getNetworkData(t)?.caipNetwork||c.R.getRequestedCaipNetworks(t)[0];e&&(a?(await c.R.switchActiveNetwork(e),g.RouterController.push("ConnectingWalletConnectBasic")):s.p.onSwitchNetwork({network:e,ignoreSwitchConfirmation:!0}))}else p.OptionsController.state.manualWCControl||a&&!n?o.j.isMobile()?g.RouterController.reset("AllWallets"):g.RouterController.reset("ConnectingWalletConnectBasic"):e?.view?g.RouterController.reset(e.view,e.data):n?g.RouterController.reset("Account"):g.RouterController.reset("Connect");m.open=!0,f.I.set({open:!0}),h.X.sendEvent({type:"track",event:"MODAL_OPEN",properties:{connected:!!n}})},close(){let e=p.OptionsController.state.enableEmbedded,t=!!c.R.state.activeCaipAddress;m.open&&h.X.sendEvent({type:"track",event:"MODAL_CLOSE",properties:{connected:t}}),m.open=!1,g.RouterController.reset("Connect"),y.clearLoading(),e?t?g.RouterController.replace("Account"):g.RouterController.push("Connect"):f.I.set({open:!1}),d.ConnectionController.resetUri()},setLoading(e,t){t&&m.loadingNamespaceMap.set(t,e),m.loading=e,f.I.set({loading:e})},clearLoading(){m.loadingNamespaceMap.clear(),m.loading=!1,f.I.set({loading:!1})},shake(){m.shake||(m.shake=!0,setTimeout(()=>{m.shake=!1},500))}})},28921:function(e,t,r){"use strict";r.d(t,{ph:function(){return m}});var i=r(69887),n=r(55543),o=r(44649),s=r(59712),a=r(59388),l=r(17766),c=r(61704),d=r(6943),u=r(5688);let h={id:"2b92315d-eab7-5bef-84fa-089a131333f5",name:"USD Coin",symbol:"USDC",networks:[{name:"ethereum-mainnet",display_name:"Ethereum",chain_id:"1",contract_address:"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"},{name:"polygon-mainnet",display_name:"Polygon",chain_id:"137",contract_address:"0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174"}]},p={id:"USD",payment_method_limits:[{id:"card",min:"10.00",max:"7500.00"},{id:"ach_bank_account",min:"10.00",max:"25000.00"}]},f={providers:s.gy,selectedProvider:null,error:null,purchaseCurrency:h,paymentCurrency:p,purchaseCurrencies:[h],paymentCurrencies:[],quotesLoading:!1},g=(0,i.sj)(f),m=(0,a.P)({state:g,subscribe:e=>(0,i.Ld)(g,()=>e(g)),subscribeKey:(e,t)=>(0,n.VW)(g,e,t),setSelectedProvider(e){if(e&&"meld"===e.name){let t=d.R.state.activeChain,r=t===o.b.CHAIN.SOLANA?"SOL":"USDC",i=t?d.R.state.chains.get(t)?.accountState?.address??"":"",n=new URL(e.url);n.searchParams.append("publicKey",s.a$),n.searchParams.append("destinationCurrencyCode",r),n.searchParams.append("walletAddress",i),n.searchParams.append("externalCustomerId",u.OptionsController.state.projectId),g.selectedProvider={...e,url:n.toString()}}else g.selectedProvider=e},setOnrampProviders(e){if(Array.isArray(e)&&e.every(e=>"string"==typeof e)){let t=s.gy.filter(t=>e.includes(t.name));g.providers=t}else g.providers=[]},setPurchaseCurrency(e){g.purchaseCurrency=e},setPaymentCurrency(e){g.paymentCurrency=e},setPurchaseAmount(e){m.state.purchaseAmount=e},setPaymentAmount(e){m.state.paymentAmount=e},async getAvailableCurrencies(){let e=await c.L.getOnrampOptions();g.purchaseCurrencies=e.purchaseCurrencies,g.paymentCurrencies=e.paymentCurrencies,g.paymentCurrency=e.paymentCurrencies[0]||p,g.purchaseCurrency=e.purchaseCurrencies[0]||h,await l.ApiController.fetchCurrencyImages(e.paymentCurrencies.map(e=>e.id)),await l.ApiController.fetchTokenImages(e.purchaseCurrencies.map(e=>e.symbol))},async getQuote(){g.quotesLoading=!0;try{let e=await c.L.getOnrampQuote({purchaseCurrency:g.purchaseCurrency,paymentCurrency:g.paymentCurrency,amount:g.paymentAmount?.toString()||"0",network:g.purchaseCurrency?.symbol});return g.quotesLoading=!1,g.purchaseAmount=Number(e?.purchaseAmount.amount),e}catch(e){return g.error=e.message,g.quotesLoading=!1,null}finally{g.quotesLoading=!1}},resetState(){g.selectedProvider=null,g.error=null,g.purchaseCurrency=h,g.paymentCurrency=p,g.purchaseCurrencies=[h],g.paymentCurrencies=[],g.paymentAmount=void 0,g.purchaseAmount=void 0,g.quotesLoading=!1}})},5688:function(e,t,r){"use strict";r.d(t,{OptionsController:function(){return c}});var i=r(69887),n=r(55543),o=r(59712),s=r(53357),a=r(95453);let l=(0,i.sj)({features:o.bq.DEFAULT_FEATURES,projectId:"",sdkType:"appkit",sdkVersion:"html-wagmi-undefined",defaultAccountTypes:o.bq.DEFAULT_ACCOUNT_TYPES,enableNetworkSwitch:!0,experimental_preferUniversalLinks:!1,remoteFeatures:{},enableMobileFullScreen:!1,coinbasePreference:"all"}),c={state:l,subscribeKey:(e,t)=>(0,n.VW)(l,e,t),setOptions(e){Object.assign(l,e)},setRemoteFeatures(e){if(!e)return;let t={...l.remoteFeatures,...e};l.remoteFeatures=t,l.remoteFeatures?.socials&&(l.remoteFeatures.socials=a.$.filterSocialsByPlatform(l.remoteFeatures.socials)),l.features?.pay&&(l.remoteFeatures.email=!1,l.remoteFeatures.socials=!1)},setFeatures(e){if(!e)return;l.features||(l.features=o.bq.DEFAULT_FEATURES);let t={...l.features,...e};l.features=t,l.features?.pay&&l.remoteFeatures&&(l.remoteFeatures.email=!1,l.remoteFeatures.socials=!1)},setProjectId(e){l.projectId=e},setCustomRpcUrls(e){l.customRpcUrls=e},setAllWallets(e){l.allWallets=e},setIncludeWalletIds(e){l.includeWalletIds=e},setExcludeWalletIds(e){l.excludeWalletIds=e},setFeaturedWalletIds(e){l.featuredWalletIds=e},setTokens(e){l.tokens=e},setTermsConditionsUrl(e){l.termsConditionsUrl=e},setPrivacyPolicyUrl(e){l.privacyPolicyUrl=e},setCustomWallets(e){l.customWallets=e},setIsSiweEnabled(e){l.isSiweEnabled=e},setIsUniversalProvider(e){l.isUniversalProvider=e},setSdkVersion(e){l.sdkVersion=e},setMetadata(e){l.metadata=e},setDisableAppend(e){l.disableAppend=e},setEIP6963Enabled(e){l.enableEIP6963=e},setDebug(e){l.debug=e},setEnableWalletGuide(e){l.enableWalletGuide=e},setEnableAuthLogger(e){l.enableAuthLogger=e},setEnableWallets(e){l.enableWallets=e},setPreferUniversalLinks(e){l.experimental_preferUniversalLinks=e},setSIWX(e){if(e)for(let[t,r]of Object.entries(o.bq.SIWX_DEFAULTS))e[t]??=r;l.siwx=e},setConnectMethodsOrder(e){l.features={...l.features,connectMethodsOrder:e}},setWalletFeaturesOrder(e){l.features={...l.features,walletFeaturesOrder:e}},setSocialsOrder(e){l.remoteFeatures={...l.remoteFeatures,socials:e}},setCollapseWallets(e){l.features={...l.features,collapseWallets:e}},setEnableEmbedded(e){l.enableEmbedded=e},setAllowUnsupportedChain(e){l.allowUnsupportedChain=e},setManualWCControl(e){l.manualWCControl=e},setEnableNetworkSwitch(e){l.enableNetworkSwitch=e},setEnableMobileFullScreen(e){l.enableMobileFullScreen=s.j.isMobile()&&e},setEnableReconnect(e){l.enableReconnect=e},setCoinbasePreference(e){l.coinbasePreference=e},setDefaultAccountTypes(e={}){Object.entries(e).forEach(([e,t])=>{t&&(l.defaultAccountTypes[e]=t)})},setUniversalProviderConfigOverride(e){l.universalProviderConfigOverride=e},getUniversalProviderConfigOverride:()=>l.universalProviderConfigOverride,getSnapshot:()=>(0,i.CO)(l)}},81341:function(e,t,r){"use strict";r.d(t,{M:function(){return s}});var i=r(69887),n=r(55543);let o=(0,i.sj)({isLegalCheckboxChecked:!1}),s={state:o,subscribe:e=>(0,i.Ld)(o,()=>e(o)),subscribeKey:(e,t)=>(0,n.VW)(o,e,t),setIsLegalCheckboxChecked(e){o.isLegalCheckboxChecked=e}}},76115:function(e,t,r){"use strict";r.d(t,{O:function(){return a}});var i=r(69887),n=r(55543);let o={eip155:void 0,solana:void 0,polkadot:void 0,bip122:void 0,cosmos:void 0,sui:void 0,stacks:void 0,ton:void 0},s=(0,i.sj)({providers:{...o},providerIds:{...o}}),a={state:s,subscribeKey:(e,t)=>(0,n.VW)(s,e,t),subscribe:e=>(0,i.Ld)(s,()=>{e(s)}),subscribeProviders:e=>(0,i.Ld)(s.providers,()=>e(s.providers)),setProvider(e,t){e&&t&&(s.providers[e]=(0,i.iH)(t))},getProvider(e){if(e)return s.providers[e]},setProviderId(e,t){t&&(s.providerIds[e]=t)},getProviderId(e){if(e)return s.providerIds[e]},reset(){s.providers={...o},s.providerIds={...o}},resetChain(e){s.providers[e]=void 0,s.providerIds[e]=void 0}}},96986:function(e,t,r){"use strict";r.d(t,{I:function(){return s}});var i=r(69887),n=r(55543);let o=(0,i.sj)({loading:!1,open:!1,selectedNetworkId:void 0,activeChain:void 0,initialized:!1,connectingWallet:void 0}),s={state:o,subscribe:e=>(0,i.Ld)(o,()=>e(o)),subscribeOpen:e=>(0,n.VW)(o,"open",e),set(e){Object.assign(o,{...o,...e})}}},86777:function(e,t,r){"use strict";r.d(t,{RouterController:function(){return p}});var i=r(69887),n=r(55543),o=r(59388),s=r(17766),a=r(6943),l=r(35652),c=r(89512),d=r(5688);let u=["ConnectingExternal","ConnectingMultiChain","ConnectingSocial","ConnectingFarcaster"],h=(0,i.sj)({view:"Connect",history:["Connect"],transactionStack:[]}),p=(0,o.P)({state:h,subscribeKey:(e,t)=>(0,n.VW)(h,e,t),pushTransactionStack(e){h.transactionStack.push(e)},popTransactionStack(e){let t=h.transactionStack.pop();if(!t)return;let{onSuccess:r,onError:i,onCancel:n}=t;switch(e){case"success":r?.();break;case"error":i?.(),p.goBack();break;case"cancel":n?.(),p.goBack()}},push(e,t){let r=e,i=t;s.ApiController.state.plan.hasExceededUsageLimit&&u.includes(e)&&(r="UsageExceeded",i=void 0),r!==h.view&&(h.view=r,h.history.push(r),h.data=i)},reset(e,t){h.view=e,h.history=[e],h.data=t},replace(e,t){h.history.at(-1)!==e&&(h.view=e,h.history[h.history.length-1]=e,h.data=t)},goBack(){let e=a.R.state.activeCaipAddress,t="ConnectingFarcaster"===p.state.view,r=!e&&t;if(h.history.length>1){h.history.pop();let[t]=h.history.slice(-1);t&&(e&&"Connect"===t?h.view="Account":h.view=t)}else c.I.close();h.data?.wallet&&(h.data.wallet=void 0),h.data?.redirectView&&(h.data.redirectView=void 0),setTimeout(()=>{if(r){a.R.setAccountProp("farcasterUrl",void 0,a.R.state.activeChain);let e=l.ConnectorController.getAuthConnector();e?.provider?.reload();let t=(0,i.CO)(d.OptionsController.state);e?.provider?.syncDappData?.({metadata:t.metadata,sdkVersion:t.sdkVersion,projectId:t.projectId,sdkType:t.sdkType})}},100)},goBackToIndex(e){if(h.history.length>1){h.history=h.history.slice(0,e+1);let[t]=h.history.slice(-1);t&&(h.view=t)}},goBackOrCloseModal(){p.state.history.length>1?p.goBack():c.I.close()}})},61347:function(e,t,r){"use strict";r.d(t,{S:function(){return E}});var i=r(69887),n=r(55543),o=r(42935),s=r(23614),a=r(44649),l=r(41613),c=r(4786),d=r(98388),u=r(43291),h=r(59712),p=r(53357),f=r(87280),g=r(59388),m=r(6943),y=r(64369),w=r(31929),b=r(86777),v=r(66909);let C=(0,i.sj)({tokenBalances:[],loading:!1}),E=(0,g.P)({state:C,subscribe:e=>(0,i.Ld)(C,()=>e(C)),subscribeKey:(e,t)=>(0,n.VW)(C,e,t),setToken(e){e&&(C.token=(0,i.iH)(e))},setTokenAmount(e){C.sendTokenAmount=e},setReceiverAddress(e){C.receiverAddress=e},setReceiverProfileImageUrl(e){C.receiverProfileImageUrl=e},setReceiverProfileName(e){C.receiverProfileName=e},setNetworkBalanceInUsd(e){C.networkBalanceInUSD=e},setLoading(e){C.loading=e},getSdkEventProperties:e=>({message:p.j.parseError(e),isSmartAccount:(0,u.r9)(m.R.state.activeChain)===c.y_.ACCOUNT_TYPES.SMART_ACCOUNT,token:C.token?.symbol||"",amount:C.sendTokenAmount??0,network:m.R.state.activeCaipNetwork?.caipNetworkId||""}),async sendToken(){try{switch(E.setLoading(!0),m.R.state.activeCaipNetwork?.chainNamespace){case"eip155":await E.sendEvmToken();return;case"solana":await E.sendSolanaToken();return;default:throw Error("Unsupported chain")}}catch(e){if(o.jD.isUserRejectedRequestError(e))throw new o.ab(e);throw e}finally{E.setLoading(!1)}},async sendEvmToken(){let e=m.R.state.activeChain;if(!e)throw Error("SendController:sendEvmToken - activeChainNamespace is required");let t=(0,u.r9)(e);if(!E.state.sendTokenAmount||!E.state.receiverAddress)throw Error("An amount and receiver address are required");if(!E.state.token)throw Error("A token is required");if(E.state.token?.address){w.X.sendEvent({type:"track",event:"SEND_INITIATED",properties:{isSmartAccount:t===c.y_.ACCOUNT_TYPES.SMART_ACCOUNT,token:E.state.token.address,amount:E.state.sendTokenAmount,network:m.R.state.activeCaipNetwork?.caipNetworkId||""}});let{hash:e}=await E.sendERC20Token({receiverAddress:E.state.receiverAddress,tokenAddress:E.state.token.address,sendTokenAmount:E.state.sendTokenAmount,decimals:E.state.token.quantity.decimals});e&&(C.hash=e)}else{w.X.sendEvent({type:"track",event:"SEND_INITIATED",properties:{isSmartAccount:t===c.y_.ACCOUNT_TYPES.SMART_ACCOUNT,token:E.state.token.symbol||"",amount:E.state.sendTokenAmount,network:m.R.state.activeCaipNetwork?.caipNetworkId||""}});let{hash:e}=await E.sendNativeToken({receiverAddress:E.state.receiverAddress,sendTokenAmount:E.state.sendTokenAmount,decimals:E.state.token.quantity.decimals});e&&(C.hash=e)}},async fetchTokenBalance(e){C.loading=!0;let t=m.R.state.activeChain,r=m.R.state.activeCaipNetwork?.caipNetworkId,i=m.R.state.activeCaipNetwork?.chainNamespace,n=m.R.getAccountData(t)?.caipAddress??m.R.state.activeCaipAddress,o=n?p.j.getPlainAddress(n):void 0;if(C.lastRetry&&!p.j.isAllowedRetry(C.lastRetry,30*h.bq.ONE_SEC_MS))return C.loading=!1,[];try{if(o&&r&&i){let e=await d.Q.getMyTokensWithBalance();return C.tokenBalances=e,C.lastRetry=void 0,e}}catch(t){C.lastRetry=Date.now(),e?.(t),v.SnackController.showError("Token Balance Unavailable")}finally{C.loading=!1}return[]},fetchNetworkBalance(){if(0===C.tokenBalances.length)return;let e=f.n.mapBalancesToSwapTokens(C.tokenBalances);if(!e)return;let t=e.find(e=>e.address===(0,u.EO)());t&&(C.networkBalanceInUSD=t?s.C.multiply(t.quantity.numeric,t.price).toString():"0")},async sendNativeToken(e){b.RouterController.pushTransactionStack({});let t=e.receiverAddress,r=m.R.getAccountData()?.address,i=y.ConnectionController.parseUnits(e.sendTokenAmount.toString(),Number(e.decimals)),n=await y.ConnectionController.sendTransaction({chainNamespace:a.b.CHAIN.EVM,to:t,address:r,data:"0x",value:i??BigInt(0)});return w.X.sendEvent({type:"track",event:"SEND_SUCCESS",properties:{isSmartAccount:(0,u.r9)("eip155")===c.y_.ACCOUNT_TYPES.SMART_ACCOUNT,token:E.state.token?.symbol||"",amount:e.sendTokenAmount,network:m.R.state.activeCaipNetwork?.caipNetworkId||"",hash:n||""}}),y.ConnectionController._getClient()?.updateBalance("eip155"),E.resetSend(),{hash:n}},async sendERC20Token(e){b.RouterController.pushTransactionStack({onSuccess(){b.RouterController.replace("Account")}});let t=y.ConnectionController.parseUnits(e.sendTokenAmount.toString(),Number(e.decimals)),r=m.R.getAccountData()?.address;if(r&&e.sendTokenAmount&&e.receiverAddress&&e.tokenAddress){let i=p.j.getPlainAddress(e.tokenAddress);if(!i)throw Error("SendController:sendERC20Token - tokenAddress is required");let n=await y.ConnectionController.writeContract({fromAddress:r,tokenAddress:i,args:[e.receiverAddress,t??BigInt(0)],method:"transfer",abi:l.g.getERC20Abi(i),chainNamespace:a.b.CHAIN.EVM});return w.X.sendEvent({type:"track",event:"SEND_SUCCESS",properties:{isSmartAccount:(0,u.r9)("eip155")===c.y_.ACCOUNT_TYPES.SMART_ACCOUNT,token:E.state.token?.symbol||"",amount:e.sendTokenAmount,network:m.R.state.activeCaipNetwork?.caipNetworkId||"",hash:n||""}}),E.resetSend(),{hash:n}}return{hash:void 0}},async sendSolanaToken(){let e;if(!E.state.sendTokenAmount||!E.state.receiverAddress)throw Error("An amount and receiver address are required");b.RouterController.pushTransactionStack({onSuccess(){b.RouterController.replace("Account")}}),E.state.token&&E.state.token.address!==h.bq.SOLANA_NATIVE_TOKEN_ADDRESS&&(e=p.j.isCaipAddress(E.state.token.address)?p.j.getPlainAddress(E.state.token.address):E.state.token.address);let t=await y.ConnectionController.sendTransaction({chainNamespace:"solana",tokenMint:e,to:E.state.receiverAddress,value:E.state.sendTokenAmount});t&&(C.hash=t),y.ConnectionController._getClient()?.updateBalance("solana"),w.X.sendEvent({type:"track",event:"SEND_SUCCESS",properties:{isSmartAccount:!1,token:E.state.token?.symbol||"",amount:E.state.sendTokenAmount,network:m.R.state.activeCaipNetwork?.caipNetworkId||"",hash:t||""}}),E.resetSend()},resetSend(){C.token=void 0,C.sendTokenAmount=void 0,C.receiverAddress=void 0,C.receiverProfileImageUrl=void 0,C.receiverProfileName=void 0,C.loading=!1,C.tokenBalances=[]}})},66909:function(e,t,r){"use strict";r.d(t,{SnackController:function(){return l}});var i=r(69887),n=r(55543),o=r(53357);let s=Object.freeze({message:"",variant:"success",svg:void 0,open:!1,autoClose:!0}),a=(0,i.sj)({...s}),l={state:a,subscribeKey:(e,t)=>(0,n.VW)(a,e,t),showLoading(e,t={}){this._showMessage({message:e,variant:"loading",...t})},showSuccess(e){this._showMessage({message:e,variant:"success"})},showSvg(e,t){this._showMessage({message:e,svg:t})},showError(e){let t=o.j.parseError(e);this._showMessage({message:t,variant:"error"})},hide(){a.message=s.message,a.variant=s.variant,a.svg=s.svg,a.open=s.open,a.autoClose=s.autoClose},_showMessage({message:e,svg:t,variant:r="success",autoClose:i=s.autoClose}){a.open?(a.open=!1,setTimeout(()=>{a.message=e,a.variant=r,a.svg=t,a.open=!0,a.autoClose=i},150)):(a.message=e,a.variant=r,a.svg=t,a.open=!0,a.autoClose=i)}}},52005:function(e,t,r){"use strict";r.d(t,{ThemeController:function(){return c}});var i=r(69887),n=r(62714),o=r(59388),s=r(35652);let a=(0,i.sj)({themeMode:"dark",themeVariables:{},w3mThemeVariables:void 0}),l={state:a,subscribe:e=>(0,i.Ld)(a,()=>e(a)),setThemeMode(e){a.themeMode=e;try{let t=s.ConnectorController.getAuthConnector();if(t){let r=l.getSnapshot().themeVariables;t.provider.syncTheme({themeMode:e,themeVariables:r,w3mThemeVariables:(0,n.t)(r,e)})}}catch{console.info("Unable to sync theme to auth connector")}},setThemeVariables(e){a.themeVariables={...a.themeVariables,...e};try{let e=s.ConnectorController.getAuthConnector();if(e){let t=l.getSnapshot().themeVariables;e.provider.syncTheme({themeVariables:t,w3mThemeVariables:(0,n.t)(a.themeVariables,a.themeMode)})}}catch{console.info("Unable to sync theme to auth connector")}},getSnapshot:()=>(0,i.CO)(a)},c=(0,o.P)(l)},7574:function(e,t,r){"use strict";r.d(t,{f:function(){return a}});var i=r(69887),n=r(55543),o=r(59388);let s=(0,i.sj)({message:"",open:!1,triggerRect:{width:0,height:0,top:0,left:0},variant:"shade"}),a=(0,o.P)({state:s,subscribe:e=>(0,i.Ld)(s,()=>e(s)),subscribeKey:(e,t)=>(0,n.VW)(s,e,t),showTooltip({message:e,triggerRect:t,variant:r}){s.open=!0,s.message=e,s.triggerRect=t,s.variant=r},hide(){s.open=!1,s.message="",s.triggerRect={width:0,height:0,top:0,left:0}}})},70216:function(e,t,r){"use strict";r.d(t,{s:function(){return p}});var i=r(69887),n=r(4786),o=r(43291),s=r(59388),a=r(61704),l=r(6943),c=r(31929),d=r(5688),u=r(66909);let h=(0,i.sj)({transactions:[],transactionsByYear:{},lastNetworkInView:void 0,loading:!1,empty:!1,next:void 0}),p=(0,s.P)({state:h,subscribe:e=>(0,i.Ld)(h,()=>e(h)),setLastNetworkInView(e){h.lastNetworkInView=e},async fetchTransactions(e){if(!e)throw Error("Transactions can't be fetched without an accountAddress");h.loading=!0;try{let t=await a.L.fetchTransactions({account:e,cursor:h.next,chainId:l.R.state.activeCaipNetwork?.caipNetworkId}),r=p.filterSpamTransactions(t.data),i=p.filterByConnectedChain(r),n=[...h.transactions,...i];h.loading=!1,h.transactions=n,h.transactionsByYear=p.groupTransactionsByYearAndMonth(h.transactionsByYear,i),h.empty=0===n.length,h.next=t.next?t.next:void 0}catch(r){let t=l.R.state.activeChain;c.X.sendEvent({type:"track",event:"ERROR_FETCH_TRANSACTIONS",properties:{address:e,projectId:d.OptionsController.state.projectId,cursor:h.next,isSmartAccount:(0,o.r9)(t)===n.y_.ACCOUNT_TYPES.SMART_ACCOUNT}}),u.SnackController.showError("Failed to fetch transactions"),h.loading=!1,h.empty=!0,h.next=void 0}},groupTransactionsByYearAndMonth:(e={},t=[])=>(t.forEach(t=>{let r=new Date(t.metadata.minedAt).getFullYear(),i=new Date(t.metadata.minedAt).getMonth(),n=e[r]??{},o=(n[i]??[]).filter(e=>e.id!==t.id);e[r]={...n,[i]:[...o,t].sort((e,t)=>new Date(t.metadata.minedAt).getTime()-new Date(e.metadata.minedAt).getTime())}}),e),filterSpamTransactions:e=>e.filter(e=>!e.transfers?.every(e=>e.nft_info?.flags.is_spam===!0)),filterByConnectedChain(e){let t=l.R.state.activeCaipNetwork?.caipNetworkId;return e.filter(e=>e.metadata.chain===t)},clearCursor(){h.next=void 0},resetTransactions(){h.transactions=[],h.transactionsByYear={},h.lastNetworkInView=void 0,h.loading=!1,h.empty=!1,h.next=void 0}},"API_ERROR")},63043:function(e,t,r){"use strict";r.d(t,{f:function(){return d}});var i=r(69887),n=r(44649),o=r(17766),s=r(22472),a=r(5688);let l={eip155:"ba0ba0cd-17c6-4806-ad93-f9d174f17900",solana:"a1b58899-f671-4276-6a5e-56ca5bd59700",polkadot:"",bip122:"0b4838db-0161-4ffe-022d-532bf03dba00",cosmos:"",sui:"",stacks:"",ton:"20f673c0-095e-49b2-07cf-eb5049dcf600"},c=(0,i.sj)({networkImagePromises:{}}),d={async fetchWalletImage(e){if(e)return await o.ApiController._fetchWalletImage(e),this.getWalletImageById(e)},async fetchNetworkImage(e){if(e)return this.getNetworkImageById(e)||(c.networkImagePromises[e]||(c.networkImagePromises[e]=o.ApiController._fetchNetworkImage(e)),await c.networkImagePromises[e],this.getNetworkImageById(e))},getWalletImageById(e){if(e)return s.W.state.walletImages[e]},getWalletImage:e=>e?.image_url?e?.image_url:e?.image_id?s.W.state.walletImages[e.image_id]:void 0,getNetworkImage:e=>e?.assets?.imageUrl?e?.assets?.imageUrl:e?.assets?.imageId?s.W.state.networkImages[e.assets.imageId]:void 0,getNetworkImageById(e){if(e)return s.W.state.networkImages[e]},getConnectorImage:e=>e?.imageUrl?e.imageUrl:e?.info?.icon?e.info.icon:e?.imageId?s.W.state.connectorImages[e.imageId]:void 0,getChainImage:e=>s.W.state.networkImages[l[e]],getTokenImage(e){if(e)return s.W.state.tokenImages[e]},getWalletImageUrl(e){if(!e)return"";let{projectId:t,sdkType:r,sdkVersion:i}=a.OptionsController.state,o=new URL(`${n.b.W3M_API_URL}/getWalletImage/${e}`);return o.searchParams.set("projectId",t),o.searchParams.set("st",r),o.searchParams.set("sv",i),o.toString()},getAssetImageUrl(e){if(!e)return"";let{projectId:t,sdkType:r,sdkVersion:i}=a.OptionsController.state,o=new URL(`${n.b.W3M_API_URL}/public/getAssetImage/${e}`);return o.searchParams.set("projectId",t),o.searchParams.set("st",r),o.searchParams.set("sv",i),o.toString()},getChainNamespaceImageUrl(e){return this.getAssetImageUrl(l[e])}}},98388:function(e,t,r){"use strict";let i;r.d(t,{Q:function(){return y}});var n=r(98158),o=r(39502),s=r(44649),a=r(86988),l=r(61704),c=r(6943),d=r(64369),u=r(35652);let h={createBalance(e,t){let r={name:e.metadata.name||"",symbol:e.metadata.symbol||"",decimals:e.metadata.decimals||0,value:e.metadata.value||0,price:e.metadata.price||0,iconUrl:e.metadata.iconUrl||""};return{name:r.name,symbol:r.symbol,chainId:t,address:"native"===e.address?void 0:this.convertAddressToCAIP10Address(e.address,t),value:r.value,price:r.price,quantity:{decimals:r.decimals.toString(),numeric:this.convertHexToBalance({hex:e.balance,decimals:r.decimals})},iconUrl:r.iconUrl}},convertHexToBalance:({hex:e,decimals:t})=>(0,o.b)(BigInt(e),t),convertAddressToCAIP10Address:(e,t)=>`${t}:${e}`,createCAIP2ChainId:(e,t)=>`${t}:${parseInt(e,16)}`,getChainIdHexFromCAIP2ChainId(e){let t=e.split(":");if(t.length<2||!t[1])return"0x0";let r=parseInt(t[1],10);return isNaN(r)?"0x0":`0x${r.toString(16)}`},isWalletGetAssetsResponse(e){return"object"==typeof e&&null!==e&&Object.values(e).every(e=>Array.isArray(e)&&e.every(e=>this.isValidAsset(e)))},isValidAsset:e=>"object"==typeof e&&null!==e&&"string"==typeof e.address&&"string"==typeof e.balance&&("ERC20"===e.type||"NATIVE"===e.type)&&"object"==typeof e.metadata&&null!==e.metadata&&"string"==typeof e.metadata.name&&"string"==typeof e.metadata.symbol&&"number"==typeof e.metadata.decimals&&"number"==typeof e.metadata.price&&"string"==typeof e.metadata.iconUrl};var p=r(36801),f=r(5688);async function g(){if(!i){let{createPublicClient:e,http:t,defineChain:n}=await Promise.all([r.e(846),r.e(8332),r.e(7857)]).then(r.bind(r,47857));i={createPublicClient:e,http:t,defineChain:n}}return i}let m={getBlockchainApiRpcUrl(e,t){let r=new URL("https://rpc.walletconnect.org/v1/");return r.searchParams.set("chainId",e),r.searchParams.set("projectId",t),r.toString()},async getViemChain(e){let{defineChain:t}=await g(),{chainId:r}=a.u.parseCaipNetworkId(e.caipNetworkId);return t({...e,id:Number(r)})},async createViemPublicClient(e){let{createPublicClient:t,http:r}=await g(),i=f.OptionsController.state.projectId,n=await m.getViemChain(e);if(!n)throw Error(`Chain ${e.caipNetworkId} not found in viem/chains`);return t({chain:n,transport:r(m.getBlockchainApiRpcUrl(e.caipNetworkId,i))})}},y={async getMyTokensWithBalance(e){let t=c.R.getAccountData()?.address,r=c.R.state.activeCaipNetwork,i=u.ConnectorController.getConnectorId("eip155")===s.b.CONNECTOR_ID.AUTH;if(!t||!r)return[];let n=`${r.caipNetworkId}:${t}`,o=p.M.getBalanceCacheForCaipAddress(n);if(o)return o.balances;if(r.chainNamespace===s.b.CHAIN.EVM&&i){let e=await this.getEIP155Balances(t,r);if(e)return this.filterLowQualityTokens(e)}let a=await l.L.getBalance(t,r.caipNetworkId,e);return this.filterLowQualityTokens(a.balances)},async getEIP155Balances(e,t){try{let r=h.getChainIdHexFromCAIP2ChainId(t.caipNetworkId),i=await d.ConnectionController.getCapabilities(e);if(!i?.[r]?.assetDiscovery?.supported)return null;let n=await d.ConnectionController.walletGetAssets({account:e,chainFilter:[r]});if(!h.isWalletGetAssetsResponse(n))return null;let o=(n[r]||[]).map(e=>h.createBalance(e,t.caipNetworkId));return p.M.updateBalanceCache({caipAddress:`${t.caipNetworkId}:${e}`,balance:{balances:o},timestamp:Date.now()}),o}catch(e){return null}},filterLowQualityTokens:e=>e.filter(e=>"0"!==e.quantity.decimals),async fetchERC20Balance({caipAddress:e,assetAddress:t,caipNetwork:r}){let i=await m.createViemPublicClient(r),{address:s}=a.u.parseCaipAddress(e),[{result:l},{result:c},{result:d},{result:u}]=await i.multicall({contracts:[{address:t,functionName:"name",args:[],abi:n.Wo},{address:t,functionName:"symbol",args:[],abi:n.Wo},{address:t,functionName:"balanceOf",args:[s],abi:n.Wo},{address:t,functionName:"decimals",args:[],abi:n.Wo}]});return{name:l,symbol:c,decimals:u,balance:d&&u?(0,o.b)(d,u):"0"}}}},43291:function(e,t,r){"use strict";r.d(t,{EO:function(){return o},eq:function(){return a},r9:function(){return s}});var i=r(6943),n=r(59712);function o(){let e=i.R.state.activeCaipNetwork?.chainNamespace||"eip155",t=i.R.state.activeCaipNetwork?.id||1,r=n.bq.NATIVE_TOKEN_ADDRESS[e];return`${e}:${t}:${r}`}function s(e){return i.R.getAccountData(e)?.preferredAccountType}function a(e){return e?i.R.state.chains.get(e)?.networkState?.caipNetwork:i.R.state.activeCaipNetwork}},8789:function(e,t,r){"use strict";r.d(t,{f:function(){return l}});var i=r(64369),n=r(35652),o=r(31929),s=r(5688),a=r(53357);let l={getConnectionStatus(e,t){let r=n.ConnectorController.state.activeConnectorIds[t],o=i.ConnectionController.getConnections(t);return r&&e.connectorId===r?"connected":o.some(t=>t.connectorId.toLowerCase()===e.connectorId.toLowerCase())?"active":"disconnected"},excludeConnectorAddressFromConnections:({connections:e,connectorId:t,addresses:r})=>e.map(e=>{if(t&&e.connectorId.toLowerCase()===t.toLowerCase()&&r){let t=e.accounts.filter(e=>!r.some(t=>t.toLowerCase()===e.address.toLowerCase()));return{...e,accounts:t}}return e}),excludeExistingConnections(e,t){let r=new Set(e);return t.filter(e=>!r.has(e.connectorId))},getConnectionsByConnectorId:(e,t)=>e.filter(e=>e.connectorId.toLowerCase()===t.toLowerCase()),getConnectionsData(e){let t=!!s.OptionsController.state.remoteFeatures?.multiWallet,r=n.ConnectorController.state.activeConnectorIds[e],o=i.ConnectionController.getConnections(e),a=(i.ConnectionController.state.recentConnections.get(e)??[]).filter(e=>n.ConnectorController.getConnectorById(e.connectorId)),c=l.excludeExistingConnections([...o.map(e=>e.connectorId),...r?[r]:[]],a);return t?{connections:o,recentConnections:c}:{connections:o.filter(e=>e.connectorId.toLowerCase()===r?.toLowerCase()),recentConnections:[]}},onConnectMobile(e){let t=i.ConnectionController.state.wcUri;if(e?.mobile_link&&t)try{i.ConnectionController.setWcError(!1);let{mobile_link:r,link_mode:n,name:o}=e,{redirect:l,redirectUniversalLink:c,href:d}=a.j.formatNativeUrl(r,t,n),u=a.j.isIframe()?"_top":"_self";i.ConnectionController.setWcLinking({name:o,href:d}),i.ConnectionController.setRecentWallet(e),s.OptionsController.state.experimental_preferUniversalLinks&&c?a.j.openHref(c,u):a.j.openHref(l,u)}catch(r){o.X.sendEvent({type:"track",event:"CONNECT_PROXY_ERROR",properties:{message:r instanceof Error?r.message:"Error parsing the deep link",uri:t,mobile_link:e.mobile_link,name:e.name}}),i.ConnectionController.setWcError(!0)}}}},65733:function(e,t,r){"use strict";r.d(t,{C:function(){return f}});var i=r(84905),n=r(44649),o=r(17766),s=r(6943),a=r(64369),l=r(35652),c=r(5688),d=r(53357),u=r(95453),h=r(36801),p=r(29095);let f={getConnectorsByType(e,t,r){let{customWallets:i}=c.OptionsController.state,n=h.M.getRecentWallets(),o=p.J.filterOutDuplicateWallets(t),s=p.J.filterOutDuplicateWallets(r),a=e.filter(e=>"MULTI_CHAIN"===e.type),l=e.filter(e=>"ANNOUNCED"===e.type),d=e.filter(e=>"INJECTED"===e.type);return{custom:i,recent:n,external:e.filter(e=>"EXTERNAL"===e.type),multiChain:a,announced:l,injected:d,recommended:o,featured:s}},showConnector(e){let t=e.info?.rdns,r=!!t&&o.ApiController.state.excludedWallets.some(e=>!!e.rdns&&e.rdns===t),n=!!e.name&&o.ApiController.state.excludedWallets.some(t=>i.g.isLowerCaseMatch(t.name,e.name));return!("INJECTED"===e.type&&("Browser Wallet"===e.name&&(!d.j.isMobile()||d.j.isMobile()&&!t&&!a.ConnectionController.checkInstalled())||r||n))&&("ANNOUNCED"!==e.type&&"EXTERNAL"!==e.type||!r&&!n)},getIsConnectedWithWC:()=>Array.from(s.R.state.chains.values()).some(e=>l.ConnectorController.getConnectorId(e.namespace)===n.b.CONNECTOR_ID.WALLET_CONNECT),getConnectorTypeOrder({recommended:e,featured:t,custom:r,recent:i,announced:n,injected:o,multiChain:s,external:a,overriddenConnectors:l=c.OptionsController.state.features?.connectorTypeOrder??[]}){let d=[{type:"walletConnect",isEnabled:!0},{type:"recent",isEnabled:i.length>0},{type:"injected",isEnabled:[...o,...n,...s].length>0},{type:"featured",isEnabled:t.length>0},{type:"custom",isEnabled:r&&r.length>0},{type:"external",isEnabled:a.length>0},{type:"recommended",isEnabled:e.length>0}].filter(e=>e.isEnabled),u=new Set(d.map(e=>e.type)),h=l.filter(e=>u.has(e)).map(e=>({type:e,isEnabled:!0})),p=d.filter(({type:e})=>!h.some(({type:t})=>t===e));return Array.from(new Set([...h,...p].map(({type:e})=>e)))},sortConnectorsByExplorerWallet:e=>[...e].sort((e,t)=>e.explorerWallet&&t.explorerWallet?(e.explorerWallet.order??0)-(t.explorerWallet.order??0):e.explorerWallet?-1:t.explorerWallet?1:0),getAuthName:({email:e,socialUsername:t,socialProvider:r})=>t?r&&"discord"===r&&t.endsWith("0")?t.slice(0,-1):t:e.length>30?`${e.slice(0,-3)}...`:e,async fetchProviderData(e){try{if("Browser Wallet"===e.name&&!d.j.isMobile()||e.id===n.b.CONNECTOR_ID.AUTH)return{accounts:[],chainId:void 0};let[t,r]=await Promise.all([e.provider?.request({method:"eth_accounts"}),e.provider?.request({method:"eth_chainId"}).then(e=>Number(e))]);return{accounts:t,chainId:r}}catch(t){return console.warn(`Failed to fetch provider data for ${e.name}`,t),{accounts:[],chainId:void 0}}},getFilteredCustomWallets(e){let t=h.M.getRecentWallets(),r=l.ConnectorController.state.connectors.map(e=>e.info?.rdns).filter(Boolean),i=t.map(e=>e.rdns).filter(Boolean),n=r.concat(i);if(n.includes("io.metamask.mobile")&&d.j.isMobile()){let e=n.indexOf("io.metamask.mobile");n[e]="io.metamask"}return e.filter(e=>!n.includes(String(e?.rdns)))},hasWalletConnector:e=>l.ConnectorController.state.connectors.some(t=>t.id===e.id||t.name===e.name),isWalletCompatibleWithCurrentChain(e){let t=s.R.state.activeChain;return!t||!e.chains||e.chains.some(e=>t===e.split(":")[0])},getFilteredRecentWallets(){return h.M.getRecentWallets().filter(e=>!p.J.isExcluded(e)).filter(e=>!this.hasWalletConnector(e)).filter(e=>this.isWalletCompatibleWithCurrentChain(e))},getCappedRecommendedWallets(e){let{connectors:t}=l.ConnectorController.state,{customWallets:r,featuredWalletIds:i}=c.OptionsController.state,n=t.find(e=>"walletConnect"===e.id),o=t.filter(e=>"INJECTED"===e.type||"ANNOUNCED"===e.type||"MULTI_CHAIN"===e.type);if(!n&&!o.length&&!r?.length)return[];let s=u.$.isEmailEnabled(),a=u.$.isSocialsEnabled(),d=o.filter(e=>"Browser Wallet"!==e.name&&"WalletConnect"!==e.name),h=i?.length||0,f=Math.max(0,4-(h+(r?.length||0)+(d.length||0)+(s?1:0)+(a?1:0)));return f<=0?[]:p.J.filterOutDuplicateWallets(e).slice(0,f)},processConnectorsByType(e,t=!0){let r=f.sortConnectorsByExplorerWallet([...e]);return t?r.filter(f.showConnector):r},connectorList(){let e=f.getConnectorsByType(l.ConnectorController.state.connectors,o.ApiController.state.recommended,o.ApiController.state.featured),t=this.processConnectorsByType(e.announced.filter(e=>"walletConnect"!==e.id)),r=this.processConnectorsByType(e.injected),i=this.processConnectorsByType(e.multiChain.filter(e=>"WalletConnect"!==e.name),!1),s=e.custom,a=e.recent,c=this.processConnectorsByType(e.external.filter(e=>e.id!==n.b.CONNECTOR_ID.COINBASE_SDK&&e.id!==n.b.CONNECTOR_ID.BASE_ACCOUNT)),u=e.recommended,h=e.featured,p=f.getConnectorTypeOrder({custom:s,recent:a,announced:t,injected:r,multiChain:i,recommended:u,featured:h,external:c}),g=l.ConnectorController.state.connectors.find(e=>"walletConnect"===e.id),m=d.j.isMobile(),y=[];for(let e of p)switch(e){case"walletConnect":!m&&g&&y.push({kind:"connector",subtype:"walletConnect",connector:g});break;case"recent":f.getFilteredRecentWallets().forEach(e=>y.push({kind:"wallet",subtype:"recent",wallet:e}));break;case"injected":i.forEach(e=>y.push({kind:"connector",subtype:"multiChain",connector:e})),t.forEach(e=>y.push({kind:"connector",subtype:"announced",connector:e})),r.forEach(e=>y.push({kind:"connector",subtype:"injected",connector:e}));break;case"featured":h.forEach(e=>y.push({kind:"wallet",subtype:"featured",wallet:e}));break;case"custom":f.getFilteredCustomWallets(s??[]).forEach(e=>y.push({kind:"wallet",subtype:"custom",wallet:e}));break;case"external":c.forEach(e=>y.push({kind:"connector",subtype:"external",connector:e}));break;case"recommended":f.getCappedRecommendedWallets(u).forEach(e=>y.push({kind:"wallet",subtype:"recommended",wallet:e}));break;default:console.warn(`Unknown connector type: ${e}`)}return y},hasInjectedConnectors:()=>l.ConnectorController.state.connectors.filter(e=>("INJECTED"===e.type||"ANNOUNCED"===e.type||"MULTI_CHAIN"===e.type)&&"Browser Wallet"!==e.name&&"WalletConnect"!==e.name).length}},59712:function(e,t,r){"use strict";r.d(t,{a$:function(){return l},bq:function(){return c},gy:function(){return a}});var i=r(44649),n=r(84710),o=r(40257);let s=(void 0!==o&&void 0!==o.env?o.env.NEXT_PUBLIC_SECURE_SITE_ORIGIN:void 0)||"https://secure.walletconnect.org",a=[{label:"Meld.io",name:"meld",feeRange:"1-2%",url:"https://meldcrypto.com",supportedChains:["eip155","solana"]}],l="WXETMuFUQmqqybHuRkSgxv:25B8LJHSfpG6LVjR2ytU5Cwh7Z4Sch2ocoU",c={FOUR_MINUTES_MS:24e4,TEN_SEC_MS:1e4,FIVE_SEC_MS:5e3,THREE_SEC_MS:3e3,ONE_SEC_MS:1e3,SECURE_SITE:s,SECURE_SITE_DASHBOARD:`${s}/dashboard`,SECURE_SITE_FAVICON:`${s}/images/favicon.png`,SOLANA_NATIVE_TOKEN_ADDRESS:"So11111111111111111111111111111111111111111",RESTRICTED_TIMEZONES:["ASIA/SHANGHAI","ASIA/URUMQI","ASIA/CHONGQING","ASIA/HARBIN","ASIA/KASHGAR","ASIA/MACAU","ASIA/HONG_KONG","ASIA/MACAO","ASIA/BEIJING","ASIA/HARBIN"],SWAP_SUGGESTED_TOKENS:["ETH","UNI","1INCH","AAVE","SOL","ADA","AVAX","DOT","LINK","NITRO","GAIA","MILK","TRX","NEAR","GNO","WBTC","DAI","WETH","USDC","USDT","ARB","BAL","BICO","CRV","ENS","MATIC","OP"],SWAP_POPULAR_TOKENS:["ETH","UNI","1INCH","AAVE","SOL","ADA","AVAX","DOT","LINK","NITRO","GAIA","MILK","TRX","NEAR","GNO","WBTC","DAI","WETH","USDC","USDT","ARB","BAL","BICO","CRV","ENS","MATIC","OP","METAL","DAI","CHAMP","WOLF","SALE","BAL","BUSD","MUST","BTCpx","ROUTE","HEX","WELT","amDAI","VSQ","VISION","AURUM","pSP","SNX","VC","LINK","CHP","amUSDT","SPHERE","FOX","GIDDY","GFC","OMEN","OX_OLD","DE","WNT"],SUGGESTED_TOKENS_BY_CHAIN:{"eip155:42161":["USD₮0"]},BALANCE_SUPPORTED_CHAINS:[i.b.CHAIN.EVM,i.b.CHAIN.SOLANA],SEND_PARAMS_SUPPORTED_CHAINS:[i.b.CHAIN.EVM],SWAP_SUPPORTED_NETWORKS:["eip155:1","eip155:42161","eip155:10","eip155:324","eip155:8453","eip155:56","eip155:137","eip155:100","eip155:43114","eip155:250","eip155:8217","eip155:1313161554"],NAMES_SUPPORTED_CHAIN_NAMESPACES:[i.b.CHAIN.EVM],ONRAMP_SUPPORTED_CHAIN_NAMESPACES:[i.b.CHAIN.EVM,i.b.CHAIN.SOLANA],PAY_WITH_EXCHANGE_SUPPORTED_CHAIN_NAMESPACES:[i.b.CHAIN.EVM,i.b.CHAIN.SOLANA],ACTIVITY_ENABLED_CHAIN_NAMESPACES:[i.b.CHAIN.EVM,i.b.CHAIN.TON],NATIVE_TOKEN_ADDRESS:{eip155:"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",solana:"So11111111111111111111111111111111111111111",polkadot:"0x",bip122:"0x",cosmos:"0x",sui:"0x",stacks:"0x",ton:"0x"},CONVERT_SLIPPAGE_TOLERANCE:1,CONNECT_LABELS:{MOBILE:"Open and continue in the wallet app",WEB:"Open and continue in the wallet app"},SEND_SUPPORTED_NAMESPACES:[i.b.CHAIN.EVM,i.b.CHAIN.SOLANA],DEFAULT_REMOTE_FEATURES:{swaps:["1inch"],onramp:["meld"],email:!0,socials:["google","x","discord","farcaster","github","apple","facebook"],activity:!0,reownBranding:!0,multiWallet:!1,emailCapture:!1,payWithExchange:!1,payments:!1,reownAuthentication:!1,headless:!1},DEFAULT_REMOTE_FEATURES_DISABLED:{email:!1,socials:!1,swaps:!1,onramp:!1,activity:!1,reownBranding:!1,emailCapture:!1,reownAuthentication:!1,headless:!1},DEFAULT_FEATURES:{receive:!0,send:!0,emailShowWallets:!0,connectorTypeOrder:["walletConnect","recent","injected","featured","custom","external","recommended"],analytics:!0,allWallets:!0,legalCheckbox:!1,smartSessions:!1,collapseWallets:!1,walletFeaturesOrder:["onramp","swaps","receive","send"],connectMethodsOrder:void 0,pay:!1,reownAuthentication:!1,headless:!1},DEFAULT_SOCIALS:["google","x","farcaster","discord","apple","github","facebook"],DEFAULT_ACCOUNT_TYPES:{bip122:"payment",eip155:"smartAccount",polkadot:"eoa",solana:"eoa",ton:"eoa"},ADAPTER_TYPES:{UNIVERSAL:"universal",SOLANA:"solana",WAGMI:"wagmi",ETHERS:"ethers",ETHERS5:"ethers5",BITCOIN:"bitcoin"},SIWX_DEFAULTS:{signOutOnDisconnect:!0},MANDATORY_WALLET_IDS_ON_MOBILE:[n.C.ConnectorExplorerIds[i.b.CONNECTOR_ID.COINBASE],n.C.ConnectorExplorerIds[i.b.CONNECTOR_ID.COINBASE_SDK],n.C.ConnectorExplorerIds[i.b.CONNECTOR_ID.BASE_ACCOUNT],n.C.ConnectorExplorerIds[i.b.SOLFLARE_CONNECTOR_NAME],n.C.ConnectorExplorerIds[i.b.PHANTOM_CONNECTOR_NAME],n.C.ConnectorExplorerIds[i.b.BINANCE_CONNECTOR_NAME]],DEFAULT_CONNECT_METHOD_ORDER:["email","social","wallet"]}},53357:function(e,t,r){"use strict";r.d(t,{j:function(){return s}});var i=r(44649),n=r(59712),o=r(36801);let s={getWindow(){if("undefined"!=typeof window)return window},isMobile(){return!!this.isClient()&&!!(window?.matchMedia&&"function"==typeof window.matchMedia&&window.matchMedia("(pointer:coarse)")?.matches||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent))},checkCaipNetwork:(e,t="")=>e?.caipNetworkId.toLocaleLowerCase().includes(t.toLowerCase()),isAndroid(){if(!this.isMobile())return!1;let e=window?.navigator.userAgent.toLowerCase();return s.isMobile()&&e.includes("android")},isIos(){if(!this.isMobile())return!1;let e=window?.navigator.userAgent.toLowerCase();return e.includes("iphone")||e.includes("ipad")},isSafari(){return!!this.isClient()&&(window?.navigator.userAgent.toLowerCase()).includes("safari")},isClient:()=>"undefined"!=typeof window,isPairingExpired:e=>!e||e-Date.now()<=n.bq.TEN_SEC_MS,isAllowedRetry:(e,t=n.bq.ONE_SEC_MS)=>Date.now()-e>=t,copyToClopboard(e){navigator.clipboard.writeText(e)},isIframe(){try{return window?.self!==window?.top}catch(e){return!1}},isSafeApp(){if(s.isClient()&&window.self!==window.top)try{let e=window?.location?.ancestorOrigins?.[0];if(e){let t=new URL(e),r=new URL("https://app.safe.global");return t.hostname===r.hostname}}catch{}return!1},getPairingExpiry:()=>Date.now()+n.bq.FOUR_MINUTES_MS,getNetworkId:e=>e?.split(":")[1],getPlainAddress:e=>e?.split(":")[2],wait:async e=>new Promise(t=>{setTimeout(t,e)}),debounce(e,t=500){let r;return(...i)=>{r&&clearTimeout(r),r=setTimeout(function(){e(...i)},t)}},isHttpUrl:e=>e.startsWith("http://")||e.startsWith("https://"),formatNativeUrl(e,t,r=null){if(s.isHttpUrl(e))return this.formatUniversalUrl(e,t);let i=e,n=r;i.includes("://")||(i=e.replaceAll("/","").replaceAll(":",""),i=`${i}://`),i.endsWith("/")||(i=`${i}/`),n&&!n?.endsWith("/")&&(n=`${n}/`),this.isTelegram()&&this.isAndroid()&&(t=encodeURIComponent(t));let o=encodeURIComponent(t);return{redirect:`${i}wc?uri=${o}`,redirectUniversalLink:n?`${n}wc?uri=${o}`:void 0,href:i}},formatUniversalUrl(e,t){if(!s.isHttpUrl(e))return this.formatNativeUrl(e,t);let r=e;r.endsWith("/")||(r=`${r}/`);let i=encodeURIComponent(t);return{redirect:`${r}wc?uri=${i}`,href:r}},getOpenTargetForPlatform(e){return"popupWindow"===e?e:this.isTelegram()?o.M.getTelegramSocialProvider()?"_top":"_blank":e},openHref(e,t,r){window?.open(e,this.getOpenTargetForPlatform(t),r||"noreferrer noopener")},returnOpenHref(e,t,r){return window?.open(e,this.getOpenTargetForPlatform(t),r||"noreferrer noopener")},isTelegram:()=>"undefined"!=typeof window&&(!!window.TelegramWebviewProxy||!!window.Telegram||!!window.TelegramWebviewProxyProto),isPWA(){if("undefined"==typeof window)return!1;let e=!!window?.matchMedia&&"function"==typeof window.matchMedia&&window.matchMedia("(display-mode: standalone)")?.matches,t=window?.navigator?.standalone;return!!(e||t)},preloadImage:async e=>Promise.race([new Promise((t,r)=>{let i=new Image;i.onload=t,i.onerror=r,i.crossOrigin="anonymous",i.src=e}),s.wait(2e3)]),parseBalance(e,t){let r="0.000";if("string"==typeof e){let t=Number(e);if(!isNaN(t)){let e=(Math.floor(1e3*t)/1e3).toFixed(3);e&&(r=e)}}let[i,n]=r.split("."),o=i||"0",s=n||"000";return{formattedText:`${o}.${s}${t?` ${t}`:""}`,value:o,decimals:s,symbol:t}},getApiUrl:()=>i.b.W3M_API_URL,getBlockchainApiUrl:()=>i.b.BLOCKCHAIN_API_RPC_URL,getAnalyticsUrl:()=>i.b.PULSE_API_URL,getUUID:()=>crypto?.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/gu,e=>{let t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}),parseError:e=>"string"==typeof e?e:"string"==typeof e?.issues?.[0]?.message?e.issues[0].message:e instanceof Error?e.message:"Unknown error",sortRequestedNetworks(e,t=[]){let r={};return t&&e&&(e.forEach((e,t)=>{r[e]=t}),t.sort((e,t)=>{let i=r[e.id],n=r[t.id];return void 0!==i&&void 0!==n?i-n:void 0!==i?-1:void 0!==n?1:0})),t},calculateBalance(e){let t=0;for(let r of e)t+=r.value??0;return t},formatTokenBalance(e){let[t,r]=e.toFixed(2).split(".");return{dollars:t,pennies:r}},isAddress(e,t="eip155"){switch(t){case"eip155":if(/^(?:0x)?[0-9a-f]{40}$/iu.test(e)&&(/^(?:0x)?[0-9a-f]{40}$/iu.test(e)||/^(?:0x)?[0-9A-F]{40}$/iu.test(e)))return!0;return!1;case"solana":return/[1-9A-HJ-NP-Za-km-z]{32,44}$/iu.test(e);default:return!1}},uniqueBy(e,t){let r=new Set;return e.filter(e=>{let i=e[t];return!r.has(i)&&(r.add(i),!0)})},generateSdkVersion(e,t,r){let i=0===e.length?n.bq.ADAPTER_TYPES.UNIVERSAL:e.map(e=>e.adapterType).join(",");return`${t}-${i}-${r}`},createAccount:(e,t,r,i,n)=>({namespace:e,address:t,type:r,publicKey:i,path:n}),isCaipAddress(e){if("string"!=typeof e)return!1;let t=e.split(":"),r=t[0];return 3===t.filter(Boolean).length&&r in i.b.CHAIN_NAME_MAP},getAccount:e=>e?"string"==typeof e?{address:e,chainId:void 0}:{address:e.address,chainId:e.chainId}:{address:void 0,chainId:void 0},isMac(){let e=window?.navigator.userAgent.toLowerCase();return e.includes("macintosh")&&!e.includes("safari")},formatTelegramSocialLoginUrl(e){let t=`--${encodeURIComponent(window?.location.href)}`,r="state=";if("auth.magic.link"===new URL(e).host){let i="provider_authorization_url=",n=e.substring(e.indexOf(i)+i.length),o=this.injectIntoUrl(decodeURIComponent(n),r,t);return e.replace(n,encodeURIComponent(o))}return this.injectIntoUrl(e,r,t)},injectIntoUrl(e,t,r){let i=e.indexOf(t);if(-1===i)throw Error(`${t} parameter not found in the URL: ${e}`);let n=e.indexOf("&",i),o=t.length,s=-1!==n?n:e.length,a=e.substring(0,i+o);return a+(e.substring(i+o,s)+r)+e.substring(n)}}},91409:function(e,t,r){"use strict";r.d(t,{Cx:function(){return d},Us:function(){return u},YK:function(){return l},ec:function(){return g},kv:function(){return c},r6:function(){return h},vE:function(){return p}});var i=r(86988),n=r(5688);let o={eip155:{native:{assetNamespace:"slip44",assetReference:"60"},defaultTokenNamespace:"erc20"},solana:{native:{assetNamespace:"slip44",assetReference:"501"},defaultTokenNamespace:"token"}};class s extends Error{}async function a(e,t){let r=function(){let{sdkType:e,sdkVersion:t,projectId:r}=n.OptionsController.getSnapshot(),i=new URL("https://rpc.walletconnect.org/v1/json-rpc");return i.searchParams.set("projectId",r),i.searchParams.set("st",e),i.searchParams.set("sv",t),i.searchParams.set("source","fund-wallet"),i.toString()}(),{projectId:i}=n.OptionsController.getSnapshot(),o={jsonrpc:"2.0",id:1,method:e,params:{...t||{},projectId:i}},a=await fetch(r,{method:"POST",body:JSON.stringify(o),headers:{"Content-Type":"application/json"}}),l=await a.json();if(l.error)throw new s(l.error.message);return l}async function l(e){return(await a("reown_getExchanges",e)).result}async function c(e){return(await a("reown_getExchangePayUrl",e)).result}async function d(e){return(await a("reown_getExchangeBuyStatus",e)).result}function u(e,t){let{chainNamespace:r,chainId:n}=i.u.parseCaipNetworkId(e),s=o[r];if(!s)throw Error(`Unsupported chain namespace for CAIP-19 formatting: ${r}`);let a=s.native.assetNamespace,l=s.native.assetReference;"native"!==t&&(a=s.defaultTokenNamespace,l=t);let c=`${r}:${n}`;return`${c}/${a}:${l}`}let h={network:"eip155:8453",asset:"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",metadata:{name:"USD Coin",symbol:"USDC",decimals:6}},p={network:"eip155:84532",asset:"0x036CbD53842c5426634e7929541eC2318f3dCF7e",metadata:{name:"USD Coin",symbol:"USDC",decimals:6}},f={ethereumETH:{network:"eip155:1",asset:"native",metadata:{name:"Ethereum",symbol:"ETH",decimals:18}},baseETH:{network:"eip155:8453",asset:"native",metadata:{name:"Ethereum",symbol:"ETH",decimals:18}},baseUSDC:h,baseSepoliaETH:{network:"eip155:84532",asset:"native",metadata:{name:"Ethereum",symbol:"ETH",decimals:18}},ethereumUSDC:{network:"eip155:1",asset:"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",metadata:{name:"USD Coin",symbol:"USDC",decimals:6}},arbitrumUSDC:{network:"eip155:42161",asset:"0xaf88d065e77c8cC2239327C5EDb3A432268e5831",metadata:{name:"USD Coin",symbol:"USDC",decimals:6}},polygonUSDC:{network:"eip155:137",asset:"0x2791bca1f2de4661ed88a30c99a7a9449aa84174",metadata:{name:"USD Coin",symbol:"USDC",decimals:6}},solanaUSDC:{network:"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",asset:"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",metadata:{name:"USD Coin",symbol:"USDC",decimals:6}},ethereumUSDT:{network:"eip155:1",asset:"0xdAC17F958D2ee523a2206206994597C13D831ec7",metadata:{name:"Tether USD",symbol:"USDT",decimals:6}},optimismUSDT:{network:"eip155:10",asset:"0x94b008aA00579c1307B0EF2c499aD98a8ce58e58",metadata:{name:"Tether USD",symbol:"USDT",decimals:6}},arbitrumUSDT:{network:"eip155:42161",asset:"0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9",metadata:{name:"Tether USD",symbol:"USDT",decimals:6}},polygonUSDT:{network:"eip155:137",asset:"0xc2132d05d31c914a87c6611c10748aeb04b58e8f",metadata:{name:"Tether USD",symbol:"USDT",decimals:6}},solanaUSDT:{network:"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",asset:"Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB",metadata:{name:"Tether USD",symbol:"USDT",decimals:6}},solanaSOL:{network:"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",asset:"native",metadata:{name:"Solana",symbol:"SOL",decimals:9}}};function g(e){return Object.values(f).filter(t=>t.network===e)}},39905:function(e,t,r){"use strict";async function i(...e){let t=await fetch(...e);if(!t.ok)throw Error(`HTTP status code: ${t.status}`,{cause:t});return t}r.d(t,{V:function(){return n}});class n{constructor({baseUrl:e,clientId:t}){this.baseUrl=e,this.clientId=t}async get({headers:e,signal:t,cache:r,...n}){let o=this.createUrl(n);return(await i(o,{method:"GET",headers:e,signal:t,cache:r})).json()}async getBlob({headers:e,signal:t,...r}){let n=this.createUrl(r);return(await i(n,{method:"GET",headers:e,signal:t})).blob()}async post({body:e,headers:t,signal:r,...n}){let o=this.createUrl(n);return(await i(o,{method:"POST",headers:t,body:e?JSON.stringify(e):void 0,signal:r})).json()}async put({body:e,headers:t,signal:r,...n}){let o=this.createUrl(n);return(await i(o,{method:"PUT",headers:t,body:e?JSON.stringify(e):void 0,signal:r})).json()}async delete({body:e,headers:t,signal:r,...n}){let o=this.createUrl(n);return(await i(o,{method:"DELETE",headers:t,body:e?JSON.stringify(e):void 0,signal:r})).json()}createUrl({path:e,params:t}){let r=new URL(e,this.baseUrl);return t&&Object.entries(t).forEach(([e,t])=>{t&&r.searchParams.append(e,t)}),this.clientId&&r.searchParams.append("clientId",this.clientId),r}sendBeacon({body:e,...t}){let r=this.createUrl(t);return navigator.sendBeacon(r.toString(),e?JSON.stringify(e):void 0)}}},32704:function(e,t,r){"use strict";r.d(t,{R:function(){return s},m:function(){return o}});var i=r(44649),n=r(6943);let o={PHANTOM:{id:"a797aa35c0fadbfc1a53e7f675162ed5226968b44a19ee3d24385c64d1d3c393",url:"https://phantom.app"},SOLFLARE:{id:"1ca0bdd4747578705b1939af023d120677c64fe6ca76add81fda36e350605e79",url:"https://solflare.com"},COINBASE:{id:"fd20dc426fb37566d803205b19bbc1d4096b248ac04548e3cfb6b3a38bd033aa",url:"https://go.cb-w.com"},BINANCE:{id:"2fafea35bb471d22889ccb49c08d99dd0a18a37982602c33f696a5723934ba25",appId:"yFK5FCqYprrXDiVFbhyRx7",deeplink:"bnc://app.binance.com/mp/app",url:"https://app.binance.com/en/download"}},s={handleMobileDeeplinkRedirect(e,t){let r=window.location.href,s=encodeURIComponent(r);if(e===o.PHANTOM.id&&!("phantom"in window)){let e=r.startsWith("https")?"https":"http",t=r.split("/")[2],i=encodeURIComponent(`${e}://${t}`);window.location.href=`${o.PHANTOM.url}/ul/browse/${s}?ref=${i}`}if(e!==o.SOLFLARE.id||"solflare"in window||(window.location.href=`${o.SOLFLARE.url}/ul/v1/browse/${s}?ref=${s}`),t!==i.b.CHAIN.SOLANA||e!==o.COINBASE.id||"coinbaseSolana"in window||(window.location.href=`${o.COINBASE.url}/dapp?cb_url=${s}`),t===i.b.CHAIN.BITCOIN&&e===o.BINANCE.id&&!("binancew3w"in window)){let e=n.R.state.activeCaipNetwork,t=window.btoa("/pages/browser/index"),r=window.btoa(`url=${s}&defaultChainId=${e?.id??1}`),i=new URL(o.BINANCE.deeplink);i.searchParams.set("appId",o.BINANCE.appId),i.searchParams.set("startPagePath",t),i.searchParams.set("startPageQuery",r);let a=new URL(o.BINANCE.url);a.searchParams.set("_dp",window.btoa(i.toString())),window.location.href=a.toString()}}}},4822:function(e,t,r){"use strict";r.d(t,{p:function(){return a}});var i=r(44649),n=r(6943),o=r(35652),s=r(86777);let a={onSwitchNetwork({network:e,ignoreSwitchConfirmation:t=!1}){let r=n.R.state.activeCaipNetwork,a=n.R.state.activeChain,l=s.RouterController.state.data;if(e.id===r?.id)return;let c=!!n.R.getAccountData(a)?.address,d=!!n.R.getAccountData(e.chainNamespace)?.address,u=e.chainNamespace!==a,h=o.ConnectorController.getConnectorId(a)===i.b.CONNECTOR_ID.AUTH,p=i.b.AUTH_CONNECTOR_SUPPORTED_CHAINS.find(t=>t===e.chainNamespace);t||h&&p?s.RouterController.push("SwitchNetwork",{...l,network:e}):c&&u&&!d?s.RouterController.push("SwitchActiveChain",{switchToChain:e.chainNamespace,navigateTo:"Connect",navigateWithReplace:!0,network:e}):s.RouterController.push("SwitchNetwork",{...l,network:e})}}},95453:function(e,t,r){"use strict";r.d(t,{$:function(){return s}});var i=r(5688),n=r(59712),o=r(53357);let s={getFeatureValue(e,t){let r=t?.[e];return void 0===r?n.bq.DEFAULT_FEATURES[e]:r},filterSocialsByPlatform(e){if(!e||!e.length)return e;let t=e;return o.j.isTelegram()&&(o.j.isIos()&&(t=t.filter(e=>"google"!==e)),o.j.isMac()&&(t=t.filter(e=>"x"!==e)),o.j.isAndroid()&&(t=t.filter(e=>!["facebook","x"].includes(e)))),o.j.isMobile()&&(t=t.filter(e=>"facebook"!==e)),t},isSocialsEnabled:()=>Array.isArray(i.OptionsController.state.features?.socials)&&i.OptionsController.state.features?.socials.length>0||Array.isArray(i.OptionsController.state.remoteFeatures?.socials)&&i.OptionsController.state.remoteFeatures?.socials.length>0,isEmailEnabled:()=>!!(i.OptionsController.state.features?.email||i.OptionsController.state.remoteFeatures?.email)}},60389:function(e,t,r){"use strict";r.d(t,{w:function(){return y}}),r(68642);var i=r(86988),n=r(44649),o=r(4786),s=r(6943),a=r(64369),l=r(35652),c=r(31929),d=r(89512),u=r(5688),h=r(86777),p=r(66909),f=r(43291),g=r(53357);let m=null,y={getSIWX:()=>u.OptionsController.state.siwx,async initializeIfEnabled(e=s.R.getActiveCaipAddress()){let t=u.OptionsController.state.siwx;if(!(t&&e))return;let[r,i,n]=e.split(":");if(s.R.checkIfSupportedNetwork(r,`${r}:${i}`))try{if(u.OptionsController.state.remoteFeatures?.emailCapture){let e=s.R.getAccountData(r)?.user;await d.I.open({view:"DataCapture",data:{email:e?.email??void 0}});return}if(m&&await m,(await t.getSessions(`${r}:${i}`,n)).length)return;await d.I.open({view:"SIWXSignMessage"})}catch(e){console.error("SIWXUtil:initializeIfEnabled",e),c.X.sendEvent({type:"track",event:"SIWX_AUTH_ERROR",properties:this.getSIWXEventProperties(e)}),await a.ConnectionController._getClient()?.disconnect().catch(console.error),h.RouterController.reset("Connect"),p.SnackController.showError("A problem occurred while trying initialize authentication")}},async isAuthenticated(e=s.R.getActiveCaipAddress()){if(!u.OptionsController.state.siwx||!e)return!0;let{chainNamespace:t,chainId:r,address:n}=i.u.parseCaipAddress(e),o=`${t}:${r}`;return(await y.getSessions({address:n,caipNetworkId:o})).length>0},async requestSignMessage(){let e=u.OptionsController.state.siwx,t=g.j.getPlainAddress(s.R.getActiveCaipAddress()),r=(0,f.eq)();if(!e)throw Error("SIWX is not enabled");if(!t)throw Error("No ActiveCaipAddress found");if(!r)throw Error("No ActiveCaipNetwork or client found");try{let i=await e.createMessage({chainId:r.caipNetworkId,accountAddress:t}),o=i.toString(),u="";e.signMessage?u=await e.signMessage({message:o,chainId:r.caipNetworkId,accountAddress:t}):(l.ConnectorController.getConnectorId(r.chainNamespace)===n.b.CONNECTOR_ID.AUTH&&h.RouterController.pushTransactionStack({}),u=await a.ConnectionController.signMessage(o)||""),await e.addSession({data:i,message:o,signature:u}),s.R.setLastConnectedSIWECaipNetwork(r),d.I.close(),c.X.sendEvent({type:"track",event:"SIWX_AUTH_SUCCESS",properties:this.getSIWXEventProperties()})}catch(e){d.I.state.open&&"ApproveTransaction"!==h.RouterController.state.view||await d.I.open({view:"SIWXSignMessage"}),p.SnackController.showError("Error signing message"),c.X.sendEvent({type:"track",event:"SIWX_AUTH_ERROR",properties:this.getSIWXEventProperties(e)}),console.error("SWIXUtil:requestSignMessage",e)}},async cancelSignMessage(){try{let e=this.getSIWX();if(e?.getRequired?.()){let t=s.R.getLastConnectedSIWECaipNetwork();if(t){let r=await e?.getSessions(t?.caipNetworkId,g.j.getPlainAddress(s.R.getActiveCaipAddress())||"");r&&r.length>0?await s.R.switchActiveNetwork(t):await a.ConnectionController.disconnect()}else await a.ConnectionController.disconnect()}else d.I.close();d.I.close(),c.X.sendEvent({event:"CLICK_CANCEL_SIWX",type:"track",properties:this.getSIWXEventProperties()})}catch(e){console.error("SIWXUtil:cancelSignMessage",e)}},async getAllSessions(){let e=this.getSIWX(),t=s.R.getAllRequestedCaipNetworks(),r=[];return await Promise.all(t.map(async t=>{let i=await e?.getSessions(t.caipNetworkId,g.j.getPlainAddress(s.R.getActiveCaipAddress())||"");i&&r.push(...i)})),r},async getSessions(e){let t=u.OptionsController.state.siwx,r=e?.address;if(!r){let e=s.R.getActiveCaipAddress();r=g.j.getPlainAddress(e)}let i=e?.caipNetworkId;if(!i){let e=s.R.getActiveCaipNetwork();i=e?.caipNetworkId}return t&&r&&i?t.getSessions(i,r):[]},async isSIWXCloseDisabled(){let e=this.getSIWX();if(e){let t="ApproveTransaction"===h.RouterController.state.view,r="SIWXSignMessage"===h.RouterController.state.view;if(t||r)return e.getRequired?.()&&0===(await this.getSessions()).length}return!1},async authConnectorAuthenticate({authConnector:e,chainId:t,socialUri:r,preferredAccountType:i,chainNamespace:o}){let a=y.getSIWX(),l=(0,f.eq)();if(!a||!o.includes(n.b.CHAIN.EVM)||u.OptionsController.state.remoteFeatures?.emailCapture){let n=await e.connect({chainId:t,socialUri:r,preferredAccountType:i});return{address:n.address,chainId:n.chainId,accounts:n.accounts}}let c=`${o}:${t}`,d=await a.createMessage({chainId:c,accountAddress:"<>"}),h={accountAddress:d.accountAddress,chainId:d.chainId,domain:d.domain,uri:d.uri,version:d.version,nonce:d.nonce,notBefore:d.notBefore,statement:d.statement,resources:d.resources,requestId:d.requestId,issuedAt:d.issuedAt,expirationTime:d.expirationTime,serializedMessage:d.toString()},p=await e.connect({chainId:t,socialUri:r,siwxMessage:h,preferredAccountType:i});if(h.accountAddress=p.address,h.serializedMessage=p.message||"",p.signature&&p.message){let e=y.addEmbeddedWalletSession(h,p.message,p.signature);await e}return s.R.setLastConnectedSIWECaipNetwork(l),{address:p.address,chainId:p.chainId,accounts:p.accounts}},async addEmbeddedWalletSession(e,t,r){if(m)return m;let i=y.getSIWX();return i?m=i.addSession({data:e,message:t,signature:r}).finally(()=>{m=null}):Promise.resolve()},async universalProviderAuthenticate({universalProvider:e,chains:t,methods:r}){let i=y.getSIWX(),n=(0,f.eq)(),o=new Set(t.map(e=>e.split(":")[0]));if(!i||1!==o.size||!o.has("eip155"))return!1;let a=await i.createMessage({chainId:f.eq()?.caipNetworkId||"",accountAddress:""}),l=await e.authenticate({nonce:a.nonce,domain:a.domain,uri:a.uri,exp:a.expirationTime,iat:a.issuedAt,nbf:a.notBefore,requestId:a.requestId,version:a.version,resources:a.resources,statement:a.statement,chainId:a.chainId,methods:r,chains:[a.chainId,...t.filter(e=>e!==a.chainId)]});p.SnackController.showLoading("Authenticating...",{autoClose:!1});let d={...l.session.peer.metadata,name:l.session.peer.metadata.name,icon:l.session.peer.metadata.icons?.[0],type:"WALLET_CONNECT"};if(s.R.setAccountProp("connectedWalletInfo",d,Array.from(o)[0]),l?.auths?.length){let t=l.auths.map(t=>{let r=e.client.formatAuthMessage({request:t.p,iss:t.p.iss});return{data:{...t.p,accountAddress:t.p.iss.split(":").slice(-1).join(""),chainId:t.p.iss.split(":").slice(2,4).join(":"),uri:t.p.aud??"",version:t.p.version||a.version,expirationTime:t.p.exp,issuedAt:t.p.iat,notBefore:t.p.nbf},message:r,signature:t.s.s,cacao:t}});try{await i.setSessions(t),n&&s.R.setLastConnectedSIWECaipNetwork(n),c.X.sendEvent({type:"track",event:"SIWX_AUTH_SUCCESS",properties:y.getSIWXEventProperties()})}catch(t){throw console.error("SIWX:universalProviderAuth - failed to set sessions",t),c.X.sendEvent({type:"track",event:"SIWX_AUTH_ERROR",properties:y.getSIWXEventProperties(t)}),await e.disconnect().catch(console.error),t}finally{p.SnackController.hide()}}return!0},getSIWXEventProperties(e){let t=s.R.state.activeChain;if(!t)throw Error("SIWXUtil:getSIWXEventProperties - namespace is required");return{network:s.R.state.activeCaipNetwork?.caipNetworkId||"",isSmartAccount:(0,f.r9)(t)===o.y_.ACCOUNT_TYPES.SMART_ACCOUNT,message:e?g.j.parseError(e):void 0}},async clearSessions(){let e=this.getSIWX();e&&await e.setSessions([])}}},5344:function(e,t,r){"use strict";r.d(t,{y0:function(){return f}});var i=r(69887),n=r(44649),o=r(6943),s=r(35652),a=r(31929),l=r(86777),c=r(66909),d=r(53357),u=r(36801);async function h(){l.RouterController.push("ConnectingFarcaster");let e=s.ConnectorController.getAuthConnector();if(e){let t=o.R.getAccountData();if(!t?.farcasterUrl)try{let{url:t}=await e.provider.getFarcasterUri();o.R.setAccountProp("farcasterUrl",t,o.R.state.activeChain)}catch(e){l.RouterController.goBack(),c.SnackController.showError(e)}}}async function p(e){l.RouterController.push("ConnectingSocial");let t=s.ConnectorController.getAuthConnector(),r=null;try{let s=setTimeout(()=>{throw Error("Social login timed out. Please try again.")},45e3);if(t&&e){if(d.j.isTelegram()||(r=function(){try{return d.j.returnOpenHref(`${n.b.SECURE_SITE_SDK_ORIGIN}/loading`,"popupWindow","width=600,height=800,scrollbars=yes")}catch(e){throw Error("Could not open social popup")}}()),r)o.R.setAccountProp("socialWindow",(0,i.iH)(r),o.R.state.activeChain);else if(!d.j.isTelegram())throw Error("Could not create social popup");let{uri:a}=await t.provider.getSocialRedirectUri({provider:e});if(!a)throw r?.close(),Error("Could not fetch the social redirect uri");if(r&&(r.location.href=a),d.j.isTelegram()){u.M.setTelegramSocialProvider(e);let t=d.j.formatTelegramSocialLoginUrl(a);d.j.openHref(t,"_top")}clearTimeout(s)}}catch(i){r?.close();let t=d.j.parseError(i);c.SnackController.showError(t),a.X.sendEvent({type:"track",event:"SOCIAL_LOGIN_ERROR",properties:{provider:e,message:t}})}}async function f(e){o.R.setAccountProp("socialProvider",e,o.R.state.activeChain),a.X.sendEvent({type:"track",event:"SOCIAL_LOGIN_STARTED",properties:{provider:e}}),"farcaster"===e?await h():await p(e)}},36801:function(e,t,r){"use strict";r.d(t,{M:function(){return o}});var i=r(61616),n=r(44649);let o={cacheExpiry:{portfolio:3e4,nativeBalance:3e4,ens:3e5,identity:3e5,transactionsHistory:15e3,tokenPrice:15e3,latestAppKitVersion:6048e5,tonWallets:864e5},isCacheExpired:(e,t)=>Date.now()-e>t,getActiveNetworkProps(){let e=o.getActiveNamespace(),t=o.getActiveCaipNetworkId(),r=t?t.split(":")[1]:void 0;return{namespace:e,caipNetworkId:t,chainId:r?isNaN(Number(r))?r:Number(r):void 0}},setWalletConnectDeepLink({name:e,href:t}){try{i.mr.setItem(i.uJ.DEEPLINK_CHOICE,JSON.stringify({href:t,name:e}))}catch{console.info("Unable to set WalletConnect deep link")}},getWalletConnectDeepLink(){try{let e=i.mr.getItem(i.uJ.DEEPLINK_CHOICE);if(e)return JSON.parse(e)}catch{console.info("Unable to get WalletConnect deep link")}},deleteWalletConnectDeepLink(){try{i.mr.removeItem(i.uJ.DEEPLINK_CHOICE)}catch{console.info("Unable to delete WalletConnect deep link")}},setActiveNamespace(e){try{i.mr.setItem(i.uJ.ACTIVE_NAMESPACE,e)}catch{console.info("Unable to set active namespace")}},setActiveCaipNetworkId(e){try{i.mr.setItem(i.uJ.ACTIVE_CAIP_NETWORK_ID,e),o.setActiveNamespace(e.split(":")[0])}catch{console.info("Unable to set active caip network id")}},getActiveCaipNetworkId(){try{return i.mr.getItem(i.uJ.ACTIVE_CAIP_NETWORK_ID)}catch{console.info("Unable to get active caip network id");return}},deleteActiveCaipNetworkId(){try{i.mr.removeItem(i.uJ.ACTIVE_CAIP_NETWORK_ID)}catch{console.info("Unable to delete active caip network id")}},deleteConnectedConnectorId(e){try{let t=(0,i.Vk)(e);i.mr.removeItem(t)}catch{console.info("Unable to delete connected connector id")}},setAppKitRecent(e){try{let t=o.getRecentWallets();t.find(t=>t.id===e.id)||(t.unshift(e),t.length>2&&t.pop(),i.mr.setItem(i.uJ.RECENT_WALLETS,JSON.stringify(t)),i.mr.setItem(i.uJ.RECENT_WALLET,JSON.stringify(e)))}catch{console.info("Unable to set AppKit recent")}},getRecentWallets(){try{let e=i.mr.getItem(i.uJ.RECENT_WALLETS);return e?JSON.parse(e):[]}catch{console.info("Unable to get AppKit recent")}return[]},getRecentWallet(){try{let e=i.mr.getItem(i.uJ.RECENT_WALLET);return e?JSON.parse(e):null}catch{console.info("Unable to get AppKit recent")}return null},deleteRecentWallet(){try{i.mr.removeItem(i.uJ.RECENT_WALLET)}catch{console.info("Unable to delete AppKit recent")}},setConnectedConnectorId(e,t){try{let r=(0,i.Vk)(e);i.mr.setItem(r,t)}catch{console.info("Unable to set Connected Connector Id")}},getActiveNamespace(){try{return i.mr.getItem(i.uJ.ACTIVE_NAMESPACE)}catch{console.info("Unable to get active namespace")}},getConnectedConnectorId(e){if(e)try{let t=(0,i.Vk)(e);return i.mr.getItem(t)}catch(t){console.info("Unable to get connected connector id in namespace",e)}},setConnectedSocialProvider(e){try{i.mr.setItem(i.uJ.CONNECTED_SOCIAL,e)}catch{console.info("Unable to set connected social provider")}},getConnectedSocialProvider(){try{return i.mr.getItem(i.uJ.CONNECTED_SOCIAL)}catch{console.info("Unable to get connected social provider")}},deleteConnectedSocialProvider(){try{i.mr.removeItem(i.uJ.CONNECTED_SOCIAL)}catch{console.info("Unable to delete connected social provider")}},getConnectedSocialUsername(){try{return i.mr.getItem(i.uJ.CONNECTED_SOCIAL_USERNAME)}catch{console.info("Unable to get connected social username")}},getStoredActiveCaipNetworkId(){let e=i.mr.getItem(i.uJ.ACTIVE_CAIP_NETWORK_ID);return e?.split(":")?.[1]},setConnectionStatus(e){try{i.mr.setItem(i.uJ.CONNECTION_STATUS,e)}catch{console.info("Unable to set connection status")}},getConnectionStatus(){try{return i.mr.getItem(i.uJ.CONNECTION_STATUS)}catch{return}},getConnectedNamespaces(){try{let e=i.mr.getItem(i.uJ.CONNECTED_NAMESPACES);if(!e?.length)return[];return e.split(",")}catch{return[]}},setConnectedNamespaces(e){try{let t=Array.from(new Set(e));i.mr.setItem(i.uJ.CONNECTED_NAMESPACES,t.join(","))}catch{console.info("Unable to set namespaces in storage")}},addConnectedNamespace(e){try{let t=o.getConnectedNamespaces();t.includes(e)||(t.push(e),o.setConnectedNamespaces(t))}catch{console.info("Unable to add connected namespace")}},removeConnectedNamespace(e){try{let t=o.getConnectedNamespaces(),r=t.indexOf(e);r>-1&&(t.splice(r,1),o.setConnectedNamespaces(t))}catch{console.info("Unable to remove connected namespace")}},getTelegramSocialProvider(){try{return i.mr.getItem(i.uJ.TELEGRAM_SOCIAL_PROVIDER)}catch{return console.info("Unable to get telegram social provider"),null}},setTelegramSocialProvider(e){try{i.mr.setItem(i.uJ.TELEGRAM_SOCIAL_PROVIDER,e)}catch{console.info("Unable to set telegram social provider")}},removeTelegramSocialProvider(){try{i.mr.removeItem(i.uJ.TELEGRAM_SOCIAL_PROVIDER)}catch{console.info("Unable to remove telegram social provider")}},getBalanceCache(){let e={};try{let t=i.mr.getItem(i.uJ.PORTFOLIO_CACHE);e=t?JSON.parse(t):{}}catch{console.info("Unable to get balance cache")}return e},removeAddressFromBalanceCache(e){try{let t=o.getBalanceCache();i.mr.setItem(i.uJ.PORTFOLIO_CACHE,JSON.stringify({...t,[e]:void 0}))}catch{console.info("Unable to remove address from balance cache",e)}},getBalanceCacheForCaipAddress(e){try{let t=o.getBalanceCache()[e];if(t&&!this.isCacheExpired(t.timestamp,this.cacheExpiry.portfolio))return t.balance;o.removeAddressFromBalanceCache(e)}catch{console.info("Unable to get balance cache for address",e)}},updateBalanceCache(e){try{let t=o.getBalanceCache();t[e.caipAddress]=e,i.mr.setItem(i.uJ.PORTFOLIO_CACHE,JSON.stringify(t))}catch{console.info("Unable to update balance cache",e)}},getNativeBalanceCache(){let e={};try{let t=i.mr.getItem(i.uJ.NATIVE_BALANCE_CACHE);e=t?JSON.parse(t):{}}catch{console.info("Unable to get balance cache")}return e},removeAddressFromNativeBalanceCache(e){try{let t=o.getBalanceCache();i.mr.setItem(i.uJ.NATIVE_BALANCE_CACHE,JSON.stringify({...t,[e]:void 0}))}catch{console.info("Unable to remove address from balance cache",e)}},getNativeBalanceCacheForCaipAddress(e){try{let t=o.getNativeBalanceCache()[e];if(t&&!this.isCacheExpired(t.timestamp,this.cacheExpiry.nativeBalance))return t;console.info("Discarding cache for address",e),o.removeAddressFromBalanceCache(e)}catch{console.info("Unable to get balance cache for address",e)}},updateNativeBalanceCache(e){try{let t=o.getNativeBalanceCache();t[e.caipAddress]=e,i.mr.setItem(i.uJ.NATIVE_BALANCE_CACHE,JSON.stringify(t))}catch{console.info("Unable to update balance cache",e)}},getEnsCache(){let e={};try{let t=i.mr.getItem(i.uJ.ENS_CACHE);e=t?JSON.parse(t):{}}catch{console.info("Unable to get ens name cache")}return e},getEnsFromCacheForAddress(e){try{let t=o.getEnsCache()[e];if(t&&!this.isCacheExpired(t.timestamp,this.cacheExpiry.ens))return t.ens;o.removeEnsFromCache(e)}catch{console.info("Unable to get ens name from cache",e)}},updateEnsCache(e){try{let t=o.getEnsCache();t[e.address]=e,i.mr.setItem(i.uJ.ENS_CACHE,JSON.stringify(t))}catch{console.info("Unable to update ens name cache",e)}},removeEnsFromCache(e){try{let t=o.getEnsCache();i.mr.setItem(i.uJ.ENS_CACHE,JSON.stringify({...t,[e]:void 0}))}catch{console.info("Unable to remove ens name from cache",e)}},getIdentityCache(){let e={};try{let t=i.mr.getItem(i.uJ.IDENTITY_CACHE);e=t?JSON.parse(t):{}}catch{console.info("Unable to get identity cache")}return e},getIdentityFromCacheForAddress(e){try{let t=o.getIdentityCache()[e];if(t&&!this.isCacheExpired(t.timestamp,this.cacheExpiry.identity))return t.identity;o.removeIdentityFromCache(e)}catch{console.info("Unable to get identity from cache",e)}},updateIdentityCache(e){try{let t=o.getIdentityCache();t[e.address]={identity:e.identity,timestamp:e.timestamp},i.mr.setItem(i.uJ.IDENTITY_CACHE,JSON.stringify(t))}catch{console.info("Unable to update identity cache",e)}},removeIdentityFromCache(e){try{let t=o.getIdentityCache();i.mr.setItem(i.uJ.IDENTITY_CACHE,JSON.stringify({...t,[e]:void 0}))}catch{console.info("Unable to remove identity from cache",e)}},getTonWalletsCache(){try{let e=i.mr.getItem(i.uJ.TON_WALLETS_CACHE),t=e?JSON.parse(e):void 0;if(t&&!this.isCacheExpired(t.timestamp,this.cacheExpiry.tonWallets))return t;o.removeTonWalletsCache()}catch{console.info("Unable to get ton wallets cache")}},updateTonWalletsCache(e){try{let t=o.getTonWalletsCache()||{timestamp:0,wallets:[]};t.timestamp=new Date().getTime(),t.wallets=e,i.mr.setItem(i.uJ.TON_WALLETS_CACHE,JSON.stringify(t))}catch{console.info("Unable to update ton wallets cache",e)}},removeTonWalletsCache(){try{i.mr.removeItem(i.uJ.TON_WALLETS_CACHE)}catch{console.info("Unable to remove ton wallets cache")}},clearAddressCache(){try{i.mr.removeItem(i.uJ.PORTFOLIO_CACHE),i.mr.removeItem(i.uJ.NATIVE_BALANCE_CACHE),i.mr.removeItem(i.uJ.ENS_CACHE),i.mr.removeItem(i.uJ.IDENTITY_CACHE),i.mr.removeItem(i.uJ.HISTORY_TRANSACTIONS_CACHE)}catch{console.info("Unable to clear address cache")}},setPreferredAccountTypes(e){try{i.mr.setItem(i.uJ.PREFERRED_ACCOUNT_TYPES,JSON.stringify(e))}catch{console.info("Unable to set preferred account types",e)}},getPreferredAccountTypes(){try{let e=i.mr.getItem(i.uJ.PREFERRED_ACCOUNT_TYPES);if(!e)return{};return JSON.parse(e)}catch{console.info("Unable to get preferred account types")}return{}},setConnections(e,t){try{let r=o.getConnections(),s=r[t]??[],a=new Map;for(let e of s)a.set(e.connectorId,{...e});for(let t of e){let e=a.get(t.connectorId),r=t.connectorId===n.b.CONNECTOR_ID.AUTH;if(e&&!r){let r=new Set(e.accounts.map(e=>e.address.toLowerCase())),i=t.accounts.filter(e=>!r.has(e.address.toLowerCase()));e.accounts.push(...i)}else a.set(t.connectorId,{...t})}let l={...r,[t]:Array.from(a.values())};i.mr.setItem(i.uJ.CONNECTIONS,JSON.stringify(l))}catch(e){console.error("Unable to sync connections to storage",e)}},getConnections(){try{let e=i.mr.getItem(i.uJ.CONNECTIONS);if(!e)return{};return JSON.parse(e)}catch(e){return console.error("Unable to get connections from storage",e),{}}},deleteAddressFromConnection({connectorId:e,address:t,namespace:r}){try{let n=o.getConnections(),s=n[r]??[],a=new Map(s.map(e=>[e.connectorId,e])),l=a.get(e);if(l){let r=l.accounts.filter(e=>e.address.toLowerCase()!==t.toLowerCase());0===r.length?a.delete(e):a.set(e,{...l,accounts:l.accounts.filter(e=>e.address.toLowerCase()!==t.toLowerCase())})}i.mr.setItem(i.uJ.CONNECTIONS,JSON.stringify({...n,[r]:Array.from(a.values())}))}catch{console.error(`Unable to remove address "${t}" from connector "${e}" in namespace "${r}"`)}},getDisconnectedConnectorIds(){try{let e=i.mr.getItem(i.uJ.DISCONNECTED_CONNECTOR_IDS);if(!e)return{};return JSON.parse(e)}catch{console.info("Unable to get disconnected connector ids")}return{}},addDisconnectedConnectorId(e,t){try{let r=o.getDisconnectedConnectorIds(),n=r[t]??[];n.push(e),i.mr.setItem(i.uJ.DISCONNECTED_CONNECTOR_IDS,JSON.stringify({...r,[t]:Array.from(new Set(n))}))}catch{console.error(`Unable to set disconnected connector id "${e}" for namespace "${t}"`)}},removeDisconnectedConnectorId(e,t){try{let r=o.getDisconnectedConnectorIds(),n=r[t]??[];n=n.filter(t=>t.toLowerCase()!==e.toLowerCase()),i.mr.setItem(i.uJ.DISCONNECTED_CONNECTOR_IDS,JSON.stringify({...r,[t]:Array.from(new Set(n))}))}catch{console.error(`Unable to remove disconnected connector id "${e}" for namespace "${t}"`)}},isConnectorDisconnected(e,t){try{return(o.getDisconnectedConnectorIds()[t]??[]).some(t=>t.toLowerCase()===e.toLowerCase())}catch{console.info(`Unable to get disconnected connector id "${e}" for namespace "${t}"`)}return!1},getTransactionsCache(){try{let e=i.mr.getItem(i.uJ.HISTORY_TRANSACTIONS_CACHE);return e?JSON.parse(e):{}}catch{console.info("Unable to get transactions cache")}return{}},getTransactionsCacheForAddress({address:e,chainId:t=""}){try{let r=o.getTransactionsCache(),i=r[e]?.[t];if(i&&!this.isCacheExpired(i.timestamp,this.cacheExpiry.transactionsHistory))return i.transactions;o.removeTransactionsCache({address:e,chainId:t})}catch{console.info("Unable to get transactions cache")}},updateTransactionsCache({address:e,chainId:t="",timestamp:r,transactions:n}){try{let s=o.getTransactionsCache();s[e]={...s[e],[t]:{timestamp:r,transactions:n}},i.mr.setItem(i.uJ.HISTORY_TRANSACTIONS_CACHE,JSON.stringify(s))}catch{console.info("Unable to update transactions cache",{address:e,chainId:t,timestamp:r,transactions:n})}},removeTransactionsCache({address:e,chainId:t}){try{let r=o.getTransactionsCache(),{[t]:n,...s}=r?.[e]||{};i.mr.setItem(i.uJ.HISTORY_TRANSACTIONS_CACHE,JSON.stringify({...r,[e]:s}))}catch{console.info("Unable to remove transactions cache",{address:e,chainId:t})}},getTokenPriceCache(){try{let e=i.mr.getItem(i.uJ.TOKEN_PRICE_CACHE);return e?JSON.parse(e):{}}catch{console.info("Unable to get token price cache")}return{}},getTokenPriceCacheForAddresses(e){try{let t=o.getTokenPriceCache()[e.join(",")];if(t&&!this.isCacheExpired(t.timestamp,this.cacheExpiry.tokenPrice))return t.tokenPrice;o.removeTokenPriceCache(e)}catch{console.info("Unable to get token price cache for addresses",e)}},updateTokenPriceCache(e){try{let t=o.getTokenPriceCache();t[e.addresses.join(",")]={timestamp:e.timestamp,tokenPrice:e.tokenPrice},i.mr.setItem(i.uJ.TOKEN_PRICE_CACHE,JSON.stringify(t))}catch{console.info("Unable to update token price cache",e)}},removeTokenPriceCache(e){try{let t=o.getTokenPriceCache();i.mr.setItem(i.uJ.TOKEN_PRICE_CACHE,JSON.stringify({...t,[e.join(",")]:void 0}))}catch{console.info("Unable to remove token price cache",e)}},getLatestAppKitVersion(){try{let e=this.getLatestAppKitVersionCache(),t=e?.version;if(t&&!this.isCacheExpired(e.timestamp,this.cacheExpiry.latestAppKitVersion))return t}catch{console.info("Unable to get latest AppKit version")}},getLatestAppKitVersionCache(){try{let e=i.mr.getItem(i.uJ.LATEST_APPKIT_VERSION);return e?JSON.parse(e):{}}catch{console.info("Unable to get latest AppKit version cache")}return{}},updateLatestAppKitVersion(e){try{let t=o.getLatestAppKitVersionCache();t.timestamp=e.timestamp,t.version=e.version,i.mr.setItem(i.uJ.LATEST_APPKIT_VERSION,JSON.stringify(t))}catch{console.info("Unable to update latest AppKit version on local storage",e)}}}},87280:function(e,t,r){"use strict";r.d(t,{n:function(){return l}});var i=r(61704),n=r(6943),o=r(64369),s=r(98388),a=r(43291);let l={async getTokenList(e){let t=await i.L.fetchSwapTokens({chainId:e});return t?.tokens?.map(e=>({...e,eip2612:!1,quantity:{decimals:"0",numeric:"0"},price:0,value:0}))||[]},async fetchGasPrice(){let e=n.R.state.activeCaipNetwork;if(!e)return null;try{if("solana"===e.chainNamespace){let e=(await o.ConnectionController?.estimateGas({chainNamespace:"solana"}))?.toString();return{standard:e,fast:e,instant:e}}return await i.L.fetchGasPrice({chainId:e.caipNetworkId})}catch{return null}},async fetchSwapAllowance({tokenAddress:e,userAddress:t,sourceTokenAmount:r,sourceTokenDecimals:n}){let s=await i.L.fetchSwapAllowance({tokenAddress:e,userAddress:t});if(s?.allowance&&r&&n){let e=o.ConnectionController.parseUnits(r,n)||0;return BigInt(s.allowance)>=e}return!1},async getMyTokensWithBalance(e){let t=await s.Q.getMyTokensWithBalance(e);return n.R.setAccountProp("tokenBalance",t,n.R.state.activeChain),this.mapBalancesToSwapTokens(t)},mapBalancesToSwapTokens:e=>e?.map(e=>({...e,address:e?.address?e.address:a.EO(),decimals:parseInt(e.quantity.decimals,10),logoUri:e.iconUrl,eip2612:!1}))||[],async handleSwapError(e){try{let t=e?.cause;if(!t?.json)return;let r=await t.json(),i=r?.reasons?.[0]?.description;if(i?.includes("insufficient liquidity"))return"Insufficient liquidity";return}catch{return}}}},39365:function(e,t,r){"use strict";r.d(t,{s:function(){return a}});var i=r(86988),n=r(12540);function o(e){try{return new URL(e)}catch{return null}}let s={ton:["ton_sendMessage","ton_signData"],solana:["solana_signMessage","solana_signTransaction","solana_requestAccounts","solana_getAccounts","solana_signAllTransactions","solana_signAndSendTransaction"],eip155:["eth_accounts","eth_requestAccounts","eth_sendRawTransaction","eth_sign","eth_signTransaction","eth_signTypedData","eth_signTypedData_v3","eth_signTypedData_v4","eth_sendTransaction","personal_sign","wallet_switchEthereumChain","wallet_addEthereumChain","wallet_getPermissions","wallet_requestPermissions","wallet_registerOnboarding","wallet_watchAsset","wallet_scanQRCode","wallet_getCallsStatus","wallet_showCallsStatus","wallet_sendCalls","wallet_getCapabilities","wallet_grantPermissions","wallet_revokePermissions","wallet_getAssets"],bip122:["sendTransfer","signMessage","signPsbt","getAccountAddresses"]},a={RPC_ERROR_CODE:{USER_REJECTED:5e3,USER_REJECTED_METHODS:5002},getMethodsByChainNamespace:e=>s[e]||[],createDefaultNamespace(e){return{methods:this.getMethodsByChainNamespace(e),events:["accountsChanged","chainChanged"],chains:[],rpcMap:{}}},applyNamespaceOverrides(e,t){if(!t)return{...e};let r={...e},i=new Set;if(t.methods&&Object.keys(t.methods).forEach(e=>i.add(e)),t.chains&&Object.keys(t.chains).forEach(e=>i.add(e)),t.events&&Object.keys(t.events).forEach(e=>i.add(e)),t.rpcMap&&Object.keys(t.rpcMap).forEach(e=>{let[t]=e.split(":");t&&i.add(t)}),i.forEach(e=>{r[e]||(r[e]=this.createDefaultNamespace(e))}),t.methods&&Object.entries(t.methods).forEach(([e,t])=>{r[e]&&(r[e].methods=t)}),t.chains&&Object.entries(t.chains).forEach(([e,t])=>{r[e]&&(r[e].chains=t)}),t.events&&Object.entries(t.events).forEach(([e,t])=>{r[e]&&(r[e].events=t)}),t.rpcMap){let e=new Set;Object.entries(t.rpcMap).forEach(([t,i])=>{let[n,o]=t.split(":");n&&o&&r[n]&&(r[n].rpcMap||(r[n].rpcMap={}),e.has(n)||(r[n].rpcMap={},e.add(n)),r[n].rpcMap[o]=i)})}return r},createNamespaces(e,t){let r=e.reduce((e,t)=>{let{id:r,chainNamespace:i,rpcUrls:n}=t,o=n.default.http[0];e[i]||(e[i]=this.createDefaultNamespace(i));let s=`${i}:${r}`,a=e[i];switch(a.chains.push(s),s){case"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp":a.chains.push("solana:4sGjMW1sUnHzSxGspuhpqLDx6wiyjNtZ");break;case"solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1":a.chains.push("solana:8E9rvCKLFQia2Y35HXjjpWzj8weVo44K")}return a?.rpcMap&&o&&(a.rpcMap[r]=o),e},{});return this.applyNamespaceOverrides(r,t)},resolveReownName:async e=>{let t=await n.a.resolveName(e),r=t?.addresses?Object.values(t.addresses):[];return r[0]?.address||!1},getChainsFromNamespaces:(e={})=>Object.values(e).flatMap(e=>Array.from(new Set([...e.chains||[],...e.accounts.map(e=>{let[t,r]=e.split(":");return`${t}:${r}`})]))),isSessionEventData:e=>"object"==typeof e&&null!==e&&"id"in e&&"topic"in e&&"params"in e&&"object"==typeof e.params&&null!==e.params&&"chainId"in e.params&&"event"in e.params&&"object"==typeof e.params.event&&null!==e.params.event,isUserRejectedRequestError(e){try{if("object"==typeof e&&null!==e){let t="number"==typeof e.code,r=t&&e.code===a.RPC_ERROR_CODE.USER_REJECTED_METHODS,i=t&&e.code===a.RPC_ERROR_CODE.USER_REJECTED;return r||i}return!1}catch{return!1}},isOriginAllowed(e,t,r){let i=[...t,...r];if(0===t.length)return!0;let n=o(e);if(!n)return i.some(t=>!t.includes("*")&&t===e);if("localhost"===n.hostname||"127.0.0.1"===n.hostname)return!0;for(let t of i)if(t.includes("*")){if(function(e,t,r){let i,n,o=r,s=o.indexOf("://");-1!==s&&(i=o.slice(0,s),o=o.slice(s+3));let a=o.indexOf("/");-1!==a&&(o=o.slice(0,a));let l=o,c=l.lastIndexOf(":");-1!==c&&(n=l.slice(c+1),l=l.slice(0,c));let d=l.split(".");for(let e of d)if(e.includes("*")&&"*"!==e)return!1;let u=e.protocol.replace(/:$/u,"");if(i&&i!==u||void 0!==n&&"*"!==n&&n!==e.port)return!1;let h=function(e){let t=e.indexOf("://");if(-1===t)return null;let r=e.slice(0,t),i=t+3,n=e.indexOf("/",i);-1===n&&(n=e.length);let o=e.slice(i,n),s=o.lastIndexOf(":");return -1===s?{scheme:r,host:o}:{scheme:r,host:o.slice(0,s),port:o.slice(s+1)}}(t),p=(h?h.host:e.hostname).split(".");if(d.length!==p.length)return!1;for(let e=d.length-1;e>=0;e-=1){let t=d[e],r=p[e];if("*"!==t&&t!==r)return!1}return!0}(n,e,t))return!0}else if(function(e,t){if(t.includes("://")){let r=o(t);return!!r&&r.origin===e}let{host:r,port:i}=function(e){let t=e.split("/"),r=t.length>0&&void 0!==t[0]?t[0]:"",i=r.lastIndexOf(":");return -1===i?{host:r}:{host:r.slice(0,i),port:r.slice(i+1)}}(t),n=e.indexOf("://");if(-1!==n){let t=n+3,o=e.indexOf("/",t);-1===o&&(o=e.length);let s=e.slice(t,o);return void 0!==i?`${r}:${i}`===s:r===s.split(":")[0]}let s=o(e);return!!s&&(void 0!==i?r===s.hostname&&i===(s.port||void 0):r===s.hostname)}(e,t))return!0;return!1},listenWcProvider({universalProvider:e,namespace:t,onConnect:r,onDisconnect:n,onAccountsChanged:o,onChainChanged:s,onDisplayUri:l}){r&&e.on("connect",()=>{r(a.getWalletConnectAccounts(e,t))}),n&&e.on("disconnect",()=>{n()}),o&&e.on("accountsChanged",r=>{try{let n=e.session?.namespaces?.[t]?.accounts||[],s=e.rpcProviders?.[t]?.getDefaultChain(),a=r.map(e=>{let r=n.find(r=>r.includes(`${t}:${s}:${e}`));if(!r)return;let{chainId:o,chainNamespace:a}=i.u.parseCaipAddress(r);return{address:e,chainId:o,chainNamespace:a}}).filter(e=>void 0!==e);a.length>0&&o(a)}catch(e){console.warn("Failed to parse accounts for namespace on accountsChanged event",t,r,e)}}),s&&e.on("chainChanged",e=>{s(e)}),l&&e.on("display_uri",e=>{l(e)})},getWalletConnectAccounts(e,t){let r=new Set,n=e?.session?.namespaces?.[t]?.accounts?.map(e=>i.u.parseCaipAddress(e)).filter(({address:e})=>!r.has(e.toLowerCase())&&(r.add(e.toLowerCase()),!0));return n&&n.length>0?n:[]}}},29095:function(e,t,r){"use strict";r.d(t,{J:function(){return h}});var i=r(84905),n=r(17766),o=r(64369),s=r(35652),a=r(5688),l=r(65733),c=r(59712),d=r(53357),u=r(36801);let h={filterOutDuplicatesByRDNS(e){let t=a.OptionsController.state.enableEIP6963?s.ConnectorController.state.connectors:[],r=u.M.getRecentWallets(),i=t.map(e=>e.info?.rdns).filter(Boolean),n=r.map(e=>e.rdns).filter(Boolean),o=i.concat(n);if(o.includes("io.metamask.mobile")&&d.j.isMobile()){let e=o.indexOf("io.metamask.mobile");o[e]="io.metamask"}return e.filter(e=>!(e?.rdns&&o.includes(String(e.rdns))||!e?.rdns&&t.some(t=>t.name===e.name)))},filterOutDuplicatesByIds(e){let t=s.ConnectorController.state.connectors.filter(e=>"ANNOUNCED"===e.type||"INJECTED"===e.type||"MULTI_CHAIN"===e.type),r=u.M.getRecentWallets(),i=t.map(e=>e.explorerId||e.explorerWallet?.id||e.id),n=r.map(e=>e.id),o=i.concat(n);return e.filter(e=>!o.includes(e?.id))},filterOutDuplicateWallets(e){let t=this.filterOutDuplicatesByRDNS(e);return this.filterOutDuplicatesByIds(t)},markWalletsAsInstalled(e){let{connectors:t}=s.ConnectorController.state,{featuredWalletIds:r}=a.OptionsController.state,i=t.filter(e=>"ANNOUNCED"===e.type).reduce((e,t)=>(t.info?.rdns&&(e[t.info.rdns]=!0),e),{});return e.map(e=>({...e,installed:!!e.rdns&&!!i[e.rdns??""]})).sort((e,t)=>{let i=Number(t.installed)-Number(e.installed);if(0!==i)return i;if(r?.length){let i=r.indexOf(e.id),n=r.indexOf(t.id);if(-1!==i&&-1!==n)return i-n;if(-1!==i)return -1;if(-1!==n)return 1}return 0})},getConnectOrderMethod(e,t){let r=e?.connectMethodsOrder||a.OptionsController.state.features?.connectMethodsOrder,i=t||s.ConnectorController.state.connectors;if(r)return r;let{injected:o,announced:d}=l.C.getConnectorsByType(i,n.ApiController.state.recommended,n.ApiController.state.featured),u=o.filter(l.C.showConnector),h=d.filter(l.C.showConnector);return u.length||h.length?["wallet","email","social"]:c.bq.DEFAULT_CONNECT_METHOD_ORDER},isExcluded(e){let t=!!e.rdns&&n.ApiController.state.excludedWallets.some(t=>t.rdns===e.rdns),r=!!e.name&&n.ApiController.state.excludedWallets.some(t=>i.g.isLowerCaseMatch(t.name,e.name));return t||r},markWalletsWithDisplayIndex:e=>e.map((e,t)=>({...e,display_index:t})),filterWalletsByWcSupport:e=>o.ConnectionController.state.wcBasic?e.filter(e=>e.supports_wc):d.j.isMobile()?e.filter(e=>e.supports_wc||c.bq.MANDATORY_WALLET_IDS_ON_MOBILE.includes(e.id)):e,getWalletConnectWallets(e){let t=[...n.ApiController.state.featured,...n.ApiController.state.recommended];n.ApiController.state.filteredWallets?.length>0?t.push(...n.ApiController.state.filteredWallets):t.push(...e);let r=d.j.uniqueBy(t,"id"),i=h.markWalletsAsInstalled(r),o=h.filterWalletsByWcSupport(i);return h.markWalletsWithDisplayIndex(o)}}},59388:function(e,t,r){"use strict";r.d(t,{g:function(){return h},P:function(){return f}});var i=r(69887),n=r(55543),o=r(53357),s=r(39905),a=r(5688);let l=Object.freeze({enabled:!0,events:[]}),c=new s.V({baseUrl:o.j.getAnalyticsUrl(),clientId:null}),d=(0,i.sj)({...l}),u={state:d,subscribeKey:(e,t)=>(0,n.VW)(d,e,t),async sendError(e,t){if(!d.enabled)return;let r=Date.now();if(d.events.filter(e=>r-new Date(e.properties.timestamp||"").getTime()<6e4).length>=5)return;let i={type:"error",event:t,properties:{errorType:e.name,errorMessage:e.message,stackTrace:e.stack,timestamp:new Date().toISOString()}};d.events.push(i);try{if("undefined"==typeof window)return;let{projectId:r,sdkType:i,sdkVersion:n}=a.OptionsController.state;await c.post({path:"/e",params:{projectId:r,st:i,sv:n||"html-wagmi-4.2.2"},body:{eventId:o.j.getUUID(),url:window.location.href,domain:window.location.hostname,timestamp:new Date().toISOString(),props:{type:"error",event:t,errorType:e.name,errorMessage:e.message,stackTrace:e.stack}}})}catch{}},enable(){d.enabled=!0},disable(){d.enabled=!1},clearEvents(){d.events=[]}};class h extends Error{constructor(e,t,r){super(e),this.originalName="AppKitError",this.name="AppKitError",this.category=t,this.originalError=r,r&&r instanceof Error&&(this.originalName=r.name),Object.setPrototypeOf(this,h.prototype);let i=!1;if(r instanceof Error&&"string"==typeof r.stack&&r.stack){let e=r.stack,t=e.indexOf("\n");if(t>-1){let r=e.substring(t+1);this.stack=`${this.name}: ${this.message} +${r}`,i=!0}}i||(Error.captureStackTrace?Error.captureStackTrace(this,h):this.stack||(this.stack=`${this.name}: ${this.message}`))}}function p(e,t){let r="";try{r=e instanceof Error?e.message:"string"==typeof e?e:"object"==typeof e&&null!==e?0===Object.keys(e).length?"Unknown error":e?.message||JSON.stringify(e):String(e)}catch(e){r="Unknown error",console.error("Error parsing error message",e)}let i=e instanceof h?e:new h(r,t,e);throw u.sendError(i,i.category),i}function f(e,t="INTERNAL_SDK_ERROR"){let r={};return Object.keys(e).forEach(i=>{let n=e[i];if("function"==typeof n){let e=n;e="AsyncFunction"===n.constructor.name?async(...e)=>{try{return await n(...e)}catch(e){return p(e,t)}}:(...e)=>{try{return n(...e)}catch(e){return p(e,t)}},r[i]=e}else r[i]=n}),r}},2789:function(e,t,r){"use strict";r.r(t),r.d(t,{AppKitAccountButton:function(){return x},AppKitButton:function(){return N},AppKitConnectButton:function(){return D},AppKitNetworkButton:function(){return H},W3mAccountButton:function(){return E},W3mAccountSettingsView:function(){return es},W3mAccountView:function(){return eq},W3mAllWalletsView:function(){return tT},W3mButton:function(){return I},W3mChooseAccountNameView:function(){return rD},W3mConnectButton:function(){return $},W3mConnectView:function(){return t8},W3mConnectWalletsView:function(){return rH},W3mConnectingExternalView:function(){return rd},W3mConnectingMultiChainView:function(){return rp},W3mConnectingWcBasicView:function(){return rO},W3mConnectingWcView:function(){return rk},W3mDownloadsView:function(){return rU},W3mFooter:function(){return V.M},W3mFundWalletView:function(){return tt},W3mGetWalletView:function(){return rL},W3mNetworkButton:function(){return z},W3mNetworkSwitchView:function(){return rY},W3mNetworksView:function(){return r3},W3mProfileWalletsView:function(){return e7},W3mRouter:function(){return q.A},W3mSIWXSignMessageView:function(){return im},W3mSwitchActiveChainView:function(){return r8},W3mUnsupportedChainView:function(){return ir},W3mWalletCompatibleNetworksView:function(){return il},W3mWhatIsANetworkView:function(){return r7},W3mWhatIsAWalletView:function(){return rF}});var i=r(31133),n=r(84927),o=r(32801),s=r(5688),a=r(6943),l=r(22472),c=r(63043),d=r(53357),u=r(89512),h=r(92413);r(74975),r(23805),r(21793),r(18360),r(5680);var p=r(84249),f=r(3874),g=r(57116);r(48682);var m=r(11131),y=(0,m.iv)` + :host { + display: block; + } + + button { + border-radius: ${({borderRadius:e})=>e["20"]}; + background: ${({tokens:e})=>e.theme.foregroundPrimary}; + display: flex; + gap: ${({spacing:e})=>e[1]}; + padding: ${({spacing:e})=>e[1]}; + color: ${({tokens:e})=>e.theme.textSecondary}; + border-radius: ${({borderRadius:e})=>e[16]}; + height: 32px; + transition: box-shadow ${({durations:e})=>e.lg} + ${({easings:e})=>e["ease-out-power-2"]}; + will-change: box-shadow; + } + + button wui-flex.avatar-container { + width: 28px; + height: 24px; + position: relative; + + wui-flex.network-image-container { + position: absolute; + bottom: 0px; + right: 0px; + width: 12px; + height: 12px; + } + + wui-flex.network-image-container wui-icon { + background: ${({tokens:e})=>e.theme.foregroundPrimary}; + } + + wui-avatar { + width: 24px; + min-width: 24px; + height: 24px; + } + + wui-icon { + width: 12px; + height: 12px; + } + } + + wui-image, + wui-icon { + border-radius: ${({borderRadius:e})=>e[16]}; + } + + wui-text { + white-space: nowrap; + } + + button wui-flex.balance-container { + height: 100%; + border-radius: ${({borderRadius:e})=>e[16]}; + padding-left: ${({spacing:e})=>e[1]}; + padding-right: ${({spacing:e})=>e[1]}; + background: ${({tokens:e})=>e.theme.foregroundSecondary}; + color: ${({tokens:e})=>e.theme.textPrimary}; + transition: background-color ${({durations:e})=>e.lg} + ${({easings:e})=>e["ease-out-power-2"]}; + will-change: background-color; + } + + /* -- Hover & Active states ----------------------------------------------------------- */ + button:hover:enabled, + button:focus-visible:enabled, + button:active:enabled { + box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.2); + + wui-flex.balance-container { + background: ${({tokens:e})=>e.theme.foregroundTertiary}; + } + } + + /* -- Disabled states --------------------------------------------------- */ + button:disabled wui-text, + button:disabled wui-flex.avatar-container { + opacity: 0.3; + } +`,w=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let b=class extends i.oi{constructor(){super(...arguments),this.networkSrc=void 0,this.avatarSrc=void 0,this.balance=void 0,this.isUnsupportedChain=void 0,this.disabled=!1,this.loading=!1,this.address="",this.profileName="",this.charsStart=4,this.charsEnd=6}render(){return(0,i.dy)` + + `}imageTemplate(){let e=this.networkSrc?(0,i.dy)``:(0,i.dy)` `;return(0,i.dy)` + + + ${e} + `}addressTemplate(){return(0,i.dy)` + ${this.address?f.H.getTruncateString({string:this.profileName||this.address,charsStart:this.profileName?18:this.charsStart,charsEnd:this.profileName?0:this.charsEnd,truncate:this.profileName?"end":"middle"}):null} + `}balanceTemplate(){if(this.balance){let e=this.loading?(0,i.dy)``:(0,i.dy)` ${this.balance}`;return(0,i.dy)`${e}`}return null}};b.styles=[p.ET,p.ZM,y],w([(0,n.Cb)()],b.prototype,"networkSrc",void 0),w([(0,n.Cb)()],b.prototype,"avatarSrc",void 0),w([(0,n.Cb)()],b.prototype,"balance",void 0),w([(0,n.Cb)({type:Boolean})],b.prototype,"isUnsupportedChain",void 0),w([(0,n.Cb)({type:Boolean})],b.prototype,"disabled",void 0),w([(0,n.Cb)({type:Boolean})],b.prototype,"loading",void 0),w([(0,n.Cb)()],b.prototype,"address",void 0),w([(0,n.Cb)()],b.prototype,"profileName",void 0),w([(0,n.Cb)()],b.prototype,"charsStart",void 0),w([(0,n.Cb)()],b.prototype,"charsEnd",void 0),b=w([(0,g.M)("wui-account-button")],b);var v=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};class C extends i.oi{constructor(){super(...arguments),this.unsubscribe=[],this.disabled=!1,this.balance="show",this.charsStart=4,this.charsEnd=6,this.namespace=void 0,this.isSupported=!!s.OptionsController.state.allowUnsupportedChain||!a.R.state.activeChain||a.R.checkIfSupportedNetwork(a.R.state.activeChain)}connectedCallback(){super.connectedCallback(),this.setAccountData(a.R.getAccountData(this.namespace)),this.setNetworkData(a.R.getNetworkData(this.namespace))}firstUpdated(){let e=this.namespace;e?this.unsubscribe.push(a.R.subscribeChainProp("accountState",e=>{this.setAccountData(e)},e),a.R.subscribeChainProp("networkState",t=>{this.setNetworkData(t),this.isSupported=a.R.checkIfSupportedNetwork(e,t?.caipNetwork?.caipNetworkId)},e)):this.unsubscribe.push(l.W.subscribeNetworkImages(()=>{this.networkImage=c.f.getNetworkImage(this.network)}),a.R.subscribeKey("activeCaipAddress",e=>{this.caipAddress=e}),a.R.subscribeChainProp("accountState",e=>{this.setAccountData(e)}),a.R.subscribeKey("activeCaipNetwork",e=>{this.network=e,this.networkImage=c.f.getNetworkImage(e),this.isSupported=!e?.chainNamespace||a.R.checkIfSupportedNetwork(e?.chainNamespace),this.fetchNetworkImage(e)}))}updated(){this.fetchNetworkImage(this.network)}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){if(!a.R.state.activeChain)return null;let e="show"===this.balance,t="string"!=typeof this.balanceVal,{formattedText:r}=d.j.parseBalance(this.balanceVal,this.balanceSymbol);return(0,i.dy)` + + + `}onClick(){this.isSupported||s.OptionsController.state.allowUnsupportedChain?u.I.open({namespace:this.namespace}):u.I.open({view:"UnsupportedChain"})}async fetchNetworkImage(e){e?.assets?.imageId&&(this.networkImage=await c.f.fetchNetworkImage(e?.assets?.imageId))}setAccountData(e){e&&(this.caipAddress=e.caipAddress,this.balanceVal=e.balance,this.balanceSymbol=e.balanceSymbol,this.profileName=e.profileName,this.profileImage=e.profileImage)}setNetworkData(e){e&&(this.network=e.caipNetwork,this.networkImage=c.f.getNetworkImage(e.caipNetwork))}}v([(0,n.Cb)({type:Boolean})],C.prototype,"disabled",void 0),v([(0,n.Cb)()],C.prototype,"balance",void 0),v([(0,n.Cb)()],C.prototype,"charsStart",void 0),v([(0,n.Cb)()],C.prototype,"charsEnd",void 0),v([(0,n.Cb)()],C.prototype,"namespace",void 0),v([(0,n.SB)()],C.prototype,"caipAddress",void 0),v([(0,n.SB)()],C.prototype,"balanceVal",void 0),v([(0,n.SB)()],C.prototype,"balanceSymbol",void 0),v([(0,n.SB)()],C.prototype,"profileName",void 0),v([(0,n.SB)()],C.prototype,"profileImage",void 0),v([(0,n.SB)()],C.prototype,"network",void 0),v([(0,n.SB)()],C.prototype,"networkImage",void 0),v([(0,n.SB)()],C.prototype,"isSupported",void 0);let E=class extends C{};E=v([(0,h.Mo)("w3m-account-button")],E);let x=class extends C{};x=v([(0,h.Mo)("appkit-account-button")],x);var _=(0,i.iv)` + :host { + display: block; + width: max-content; + } +`,A=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};class S extends i.oi{constructor(){super(...arguments),this.unsubscribe=[],this.disabled=!1,this.balance=void 0,this.size=void 0,this.label=void 0,this.loadingLabel=void 0,this.charsStart=4,this.charsEnd=6,this.namespace=void 0}firstUpdated(){this.caipAddress=this.namespace?a.R.getAccountData(this.namespace)?.caipAddress:a.R.state.activeCaipAddress,this.namespace?this.unsubscribe.push(a.R.subscribeChainProp("accountState",e=>{this.caipAddress=e?.caipAddress},this.namespace)):this.unsubscribe.push(a.R.subscribeKey("activeCaipAddress",e=>this.caipAddress=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return this.caipAddress?(0,i.dy)` + + + `:(0,i.dy)` + + `}}S.styles=_,A([(0,n.Cb)({type:Boolean})],S.prototype,"disabled",void 0),A([(0,n.Cb)()],S.prototype,"balance",void 0),A([(0,n.Cb)()],S.prototype,"size",void 0),A([(0,n.Cb)()],S.prototype,"label",void 0),A([(0,n.Cb)()],S.prototype,"loadingLabel",void 0),A([(0,n.Cb)()],S.prototype,"charsStart",void 0),A([(0,n.Cb)()],S.prototype,"charsEnd",void 0),A([(0,n.Cb)()],S.prototype,"namespace",void 0),A([(0,n.SB)()],S.prototype,"caipAddress",void 0);let I=class extends S{};I=A([(0,h.Mo)("w3m-button")],I);let N=class extends S{};N=A([(0,h.Mo)("appkit-button")],N);var k=(0,m.iv)` + :host { + position: relative; + display: block; + } + + button { + border-radius: ${({borderRadius:e})=>e[2]}; + } + + button[data-size='sm'] { + padding: ${({spacing:e})=>e[2]}; + } + + button[data-size='md'] { + padding: ${({spacing:e})=>e[3]}; + } + + button[data-size='lg'] { + padding: ${({spacing:e})=>e[4]}; + } + + button[data-variant='primary'] { + background: ${({tokens:e})=>e.core.backgroundAccentPrimary}; + } + + button[data-variant='secondary'] { + background: ${({tokens:e})=>e.core.foregroundAccent010}; + } + + button:hover:enabled { + border-radius: ${({borderRadius:e})=>e[3]}; + } + + button:disabled { + cursor: not-allowed; + } + + button[data-loading='true'] { + cursor: not-allowed; + } + + button[data-loading='true'][data-size='sm'] { + border-radius: ${({borderRadius:e})=>e[32]}; + padding: ${({spacing:e})=>e[2]} ${({spacing:e})=>e[3]}; + } + + button[data-loading='true'][data-size='md'] { + border-radius: ${({borderRadius:e})=>e[20]}; + padding: ${({spacing:e})=>e[3]} ${({spacing:e})=>e[4]}; + } + + button[data-loading='true'][data-size='lg'] { + border-radius: ${({borderRadius:e})=>e[16]}; + padding: ${({spacing:e})=>e[4]} ${({spacing:e})=>e[5]}; + } +`,R=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let O=class extends i.oi{constructor(){super(...arguments),this.size="md",this.variant="primary",this.loading=!1,this.text="Connect Wallet"}render(){return(0,i.dy)` + + `}contentTemplate(){let e={primary:"invert",secondary:"accent-primary"};return this.loading?(0,i.dy)``:(0,i.dy)` + ${this.text} + `}};O.styles=[p.ET,p.ZM,k],R([(0,n.Cb)()],O.prototype,"size",void 0),R([(0,n.Cb)()],O.prototype,"variant",void 0),R([(0,n.Cb)({type:Boolean})],O.prototype,"loading",void 0),R([(0,n.Cb)()],O.prototype,"text",void 0),O=R([(0,g.M)("wui-connect-button")],O);var T=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};class P extends i.oi{constructor(){super(),this.unsubscribe=[],this.size="md",this.label="Connect Wallet",this.loadingLabel="Connecting...",this.open=u.I.state.open,this.loading=this.namespace?u.I.state.loadingNamespaceMap.get(this.namespace):u.I.state.loading,this.unsubscribe.push(u.I.subscribe(e=>{this.open=e.open,this.loading=this.namespace?e.loadingNamespaceMap.get(this.namespace):e.loading}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return(0,i.dy)` + + ${this.loading?this.loadingLabel:this.label} + + `}onClick(){this.open?u.I.close():this.loading||u.I.open({view:"Connect",namespace:this.namespace})}}T([(0,n.Cb)()],P.prototype,"size",void 0),T([(0,n.Cb)()],P.prototype,"label",void 0),T([(0,n.Cb)()],P.prototype,"loadingLabel",void 0),T([(0,n.Cb)()],P.prototype,"namespace",void 0),T([(0,n.SB)()],P.prototype,"open",void 0),T([(0,n.SB)()],P.prototype,"loading",void 0);let $=class extends P{};$=T([(0,h.Mo)("w3m-connect-button")],$);let D=class extends P{};D=T([(0,h.Mo)("appkit-connect-button")],D);var U=r(31929);r(1736);var L=(0,m.iv)` + :host { + display: block; + } + + button { + border-radius: ${({borderRadius:e})=>e[32]}; + display: flex; + gap: ${({spacing:e})=>e[1]}; + padding: ${({spacing:e})=>e[1]} ${({spacing:e})=>e[2]} + ${({spacing:e})=>e[1]} ${({spacing:e})=>e[1]}; + background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; + } + + button:disabled { + opacity: 0.5; + cursor: not-allowed; + } + + @media (hover: hover) { + button:hover:enabled { + background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; + } + } + + button[data-size='sm'] > wui-icon-box, + button[data-size='sm'] > wui-image { + width: 16px; + height: 16px; + } + + button[data-size='md'] > wui-icon-box, + button[data-size='md'] > wui-image { + width: 20px; + height: 20px; + } + + button[data-size='lg'] > wui-icon-box, + button[data-size='lg'] > wui-image { + width: 24px; + height: 24px; + } + + wui-image, + wui-icon-box { + border-radius: ${({borderRadius:e})=>e[32]}; + } +`,M=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let B=class extends i.oi{constructor(){super(...arguments),this.imageSrc=void 0,this.isUnsupportedChain=void 0,this.disabled=!1,this.size="lg"}render(){return(0,i.dy)` + + `}visualTemplate(){return this.isUnsupportedChain?(0,i.dy)` `:this.imageSrc?(0,i.dy)``:(0,i.dy)` `}};B.styles=[p.ET,p.ZM,L],M([(0,n.Cb)()],B.prototype,"imageSrc",void 0),M([(0,n.Cb)({type:Boolean})],B.prototype,"isUnsupportedChain",void 0),M([(0,n.Cb)({type:Boolean})],B.prototype,"disabled",void 0),M([(0,n.Cb)()],B.prototype,"size",void 0),B=M([(0,g.M)("wui-network-button")],B);var j=(0,i.iv)` + :host { + display: block; + width: max-content; + } +`,F=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};class W extends i.oi{constructor(){super(),this.unsubscribe=[],this.disabled=!1,this.network=a.R.state.activeCaipNetwork,this.networkImage=c.f.getNetworkImage(this.network),this.caipAddress=a.R.state.activeCaipAddress,this.loading=u.I.state.loading,this.isSupported=!!s.OptionsController.state.allowUnsupportedChain||!a.R.state.activeChain||a.R.checkIfSupportedNetwork(a.R.state.activeChain),this.unsubscribe.push(l.W.subscribeNetworkImages(()=>{this.networkImage=c.f.getNetworkImage(this.network)}),a.R.subscribeKey("activeCaipAddress",e=>{this.caipAddress=e}),a.R.subscribeKey("activeCaipNetwork",e=>{this.network=e,this.networkImage=c.f.getNetworkImage(e),this.isSupported=!e?.chainNamespace||a.R.checkIfSupportedNetwork(e.chainNamespace),c.f.fetchNetworkImage(e?.assets?.imageId)}),u.I.subscribeKey("loading",e=>this.loading=e))}firstUpdated(){c.f.fetchNetworkImage(this.network?.assets?.imageId)}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){let e=!this.network||a.R.checkIfSupportedNetwork(this.network.chainNamespace);return(0,i.dy)` + + ${this.getLabel()} + + + `}getLabel(){return this.network?this.isSupported||s.OptionsController.state.allowUnsupportedChain?this.network.name:"Switch Network":this.label?this.label:this.caipAddress?"Unknown Network":"Select Network"}onClick(){this.loading||(U.X.sendEvent({type:"track",event:"CLICK_NETWORKS"}),u.I.open({view:"Networks"}))}}W.styles=j,F([(0,n.Cb)({type:Boolean})],W.prototype,"disabled",void 0),F([(0,n.Cb)({type:String})],W.prototype,"label",void 0),F([(0,n.SB)()],W.prototype,"network",void 0),F([(0,n.SB)()],W.prototype,"networkImage",void 0),F([(0,n.SB)()],W.prototype,"caipAddress",void 0),F([(0,n.SB)()],W.prototype,"loading",void 0),F([(0,n.SB)()],W.prototype,"isSupported",void 0);let z=class extends W{};z=F([(0,h.Mo)("w3m-network-button")],z);let H=class extends W{};H=F([(0,h.Mo)("appkit-network-button")],H);var q=r(77770),V=r(62942),K=r(44649),Z=r(35652),G=r(59712),Y=r(66909),J=r(86777),X=r(64369);r(96277),r(29158),r(53774),r(98629);var Q=(0,m.iv)` + :host { + display: block; + } + + button { + width: 100%; + display: flex; + align-items: center; + justify-content: space-between; + gap: ${({spacing:e})=>e[4]}; + padding: ${({spacing:e})=>e[3]}; + border-radius: ${({borderRadius:e})=>e[4]}; + background-color: ${({tokens:e})=>e.core.foregroundAccent010}; + } + + wui-flex > wui-icon { + padding: ${({spacing:e})=>e[2]}; + color: ${({tokens:e})=>e.theme.textInvert}; + background-color: ${({tokens:e})=>e.core.backgroundAccentPrimary}; + border-radius: ${({borderRadius:e})=>e[2]}; + align-items: center; + } + + @media (hover: hover) { + button:hover:enabled { + background-color: ${({tokens:e})=>e.core.foregroundAccent020}; + } + } +`,ee=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let et=class extends i.oi{constructor(){super(...arguments),this.label="",this.description="",this.icon="wallet"}render(){return(0,i.dy)` + + `}};et.styles=[p.ET,p.ZM,Q],ee([(0,n.Cb)()],et.prototype,"label",void 0),ee([(0,n.Cb)()],et.prototype,"description",void 0),ee([(0,n.Cb)()],et.prototype,"icon",void 0),et=ee([(0,g.M)("wui-notice-card")],et),r(44732);var er=r(36801),ei=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let en=class extends i.oi{constructor(){super(),this.unsubscribe=[],this.socialProvider=er.M.getConnectedSocialProvider(),this.socialUsername=er.M.getConnectedSocialUsername(),this.namespace=a.R.state.activeChain,this.unsubscribe.push(a.R.subscribeKey("activeChain",e=>{this.namespace=e}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){let e=Z.ConnectorController.getConnectorId(this.namespace),t=Z.ConnectorController.getAuthConnector();if(!t||e!==K.b.CONNECTOR_ID.AUTH)return this.style.cssText="display: none",null;let r=t.provider.getEmail()??"";return r||this.socialUsername?(0,i.dy)` + {this.onGoToUpdateEmail(r,this.socialProvider)}} + > + ${this.getAuthName(r)} + + `:(this.style.cssText="display: none",null)}onGoToUpdateEmail(e,t){t||J.RouterController.push("UpdateEmailWallet",{email:e,redirectView:"Account"})}getAuthName(e){return this.socialUsername?"discord"===this.socialProvider&&this.socialUsername.endsWith("0")?this.socialUsername.slice(0,-1):this.socialUsername:e.length>30?`${e.slice(0,-3)}...`:e}};ei([(0,n.SB)()],en.prototype,"namespace",void 0),en=ei([(0,h.Mo)("w3m-account-auth-button")],en);var eo=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let es=class extends i.oi{constructor(){super(),this.usubscribe=[],this.networkImages=l.W.state.networkImages,this.address=a.R.getAccountData()?.address,this.profileImage=a.R.getAccountData()?.profileImage,this.profileName=a.R.getAccountData()?.profileName,this.network=a.R.state.activeCaipNetwork,this.disconnecting=!1,this.remoteFeatures=s.OptionsController.state.remoteFeatures,this.usubscribe.push(a.R.subscribeChainProp("accountState",e=>{e&&(this.address=e.address,this.profileImage=e.profileImage,this.profileName=e.profileName)}),a.R.subscribeKey("activeCaipNetwork",e=>{e?.id&&(this.network=e)}),s.OptionsController.subscribeKey("remoteFeatures",e=>{this.remoteFeatures=e}))}disconnectedCallback(){this.usubscribe.forEach(e=>e())}render(){if(!this.address)throw Error("w3m-account-settings-view: No account provided");let e=this.networkImages[this.network?.assets?.imageId??""];return(0,i.dy)` + + + + + + ${h.Hg.getTruncateString({string:this.address,charsStart:4,charsEnd:6,truncate:"middle"})} + + + + + + + + ${this.authCardTemplate()} + + + + ${this.network?.name??"Unknown"} + + + ${this.smartAccountSettingsTemplate()} ${this.chooseNameButtonTemplate()} + + Disconnect + + + + `}chooseNameButtonTemplate(){let e=this.network?.chainNamespace,t=Z.ConnectorController.getConnectorId(e),r=Z.ConnectorController.getAuthConnector();return a.R.checkIfNamesSupported()&&r&&t===K.b.CONNECTOR_ID.AUTH&&!this.profileName?(0,i.dy)` + + Choose account name + + `:null}authCardTemplate(){let e=Z.ConnectorController.getConnectorId(this.network?.chainNamespace),t=Z.ConnectorController.getAuthConnector(),{origin:r}=location;return!t||e!==K.b.CONNECTOR_ID.AUTH||r.includes(G.bq.SECURE_SITE)?null:(0,i.dy)` + + `}isAllowedNetworkSwitch(){let e=a.R.getAllRequestedCaipNetworks(),t=!!e&&e.length>1,r=e?.find(({id:e})=>e===this.network?.id);return t||!r}onCopyAddress(){try{this.address&&(d.j.copyToClopboard(this.address),Y.SnackController.showSuccess("Address copied"))}catch{Y.SnackController.showError("Failed to copy")}}smartAccountSettingsTemplate(){let e=this.network?.chainNamespace,t=a.R.checkIfSmartAccountEnabled(),r=Z.ConnectorController.getConnectorId(e);return Z.ConnectorController.getAuthConnector()&&r===K.b.CONNECTOR_ID.AUTH&&t?(0,i.dy)` + + Smart Account Settings + + `:null}onChooseName(){J.RouterController.push("ChooseAccountName")}onNetworks(){this.isAllowedNetworkSwitch()&&J.RouterController.push("Networks")}async onDisconnect(){try{this.disconnecting=!0;let e=this.network?.chainNamespace,t=X.ConnectionController.getConnections(e).length>0,r=e&&Z.ConnectorController.state.activeConnectorIds[e],i=this.remoteFeatures?.multiWallet;await X.ConnectionController.disconnect(i?{id:r,namespace:e}:{}),t&&i&&(J.RouterController.push("ProfileWallets"),Y.SnackController.showSuccess("Wallet deleted"))}catch{U.X.sendEvent({type:"track",event:"DISCONNECT_ERROR",properties:{message:"Failed to disconnect"}}),Y.SnackController.showError("Failed to disconnect")}finally{this.disconnecting=!1}}onGoToUpgradeView(){U.X.sendEvent({type:"track",event:"EMAIL_UPGRADE_FROM_MODAL"}),J.RouterController.push("UpgradeEmailWallet")}onSmartAccountSettings(){J.RouterController.push("SmartAccountSettings")}};eo([(0,n.SB)()],es.prototype,"address",void 0),eo([(0,n.SB)()],es.prototype,"profileImage",void 0),eo([(0,n.SB)()],es.prototype,"profileName",void 0),eo([(0,n.SB)()],es.prototype,"network",void 0),eo([(0,n.SB)()],es.prototype,"disconnecting",void 0),eo([(0,n.SB)()],es.prototype,"remoteFeatures",void 0),es=eo([(0,h.Mo)("w3m-account-settings-view")],es);var ea=r(9993),el=r(43291);r(97585),r(4594);var ec=(0,m.iv)` + :host { + flex: 1; + height: 100%; + } + + button { + width: 100%; + height: 100%; + display: inline-flex; + align-items: center; + padding: ${({spacing:e})=>e[1]} ${({spacing:e})=>e[2]}; + column-gap: ${({spacing:e})=>e[1]}; + color: ${({tokens:e})=>e.theme.textSecondary}; + border-radius: ${({borderRadius:e})=>e[20]}; + background-color: transparent; + transition: background-color ${({durations:e})=>e.lg} + ${({easings:e})=>e["ease-out-power-2"]}; + will-change: background-color; + } + + /* -- Hover & Active states ----------------------------------------------------------- */ + button[data-active='true'] { + color: ${({tokens:e})=>e.theme.textPrimary}; + background-color: ${({tokens:e})=>e.theme.foregroundTertiary}; + } + + button:hover:enabled:not([data-active='true']), + button:active:enabled:not([data-active='true']) { + wui-text, + wui-icon { + color: ${({tokens:e})=>e.theme.textPrimary}; + } + } +`,ed=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let eu={lg:"lg-regular",md:"md-regular",sm:"sm-regular"},eh={lg:"md",md:"sm",sm:"sm"},ep=class extends i.oi{constructor(){super(...arguments),this.icon="mobile",this.size="md",this.label="",this.active=!1}render(){return(0,i.dy)` + + `}};ep.styles=[p.ET,p.ZM,ec],ed([(0,n.Cb)()],ep.prototype,"icon",void 0),ed([(0,n.Cb)()],ep.prototype,"size",void 0),ed([(0,n.Cb)()],ep.prototype,"label",void 0),ed([(0,n.Cb)({type:Boolean})],ep.prototype,"active",void 0),ep=ed([(0,g.M)("wui-tab-item")],ep);var ef=(0,m.iv)` + :host { + display: inline-flex; + align-items: center; + background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; + border-radius: ${({borderRadius:e})=>e[32]}; + padding: ${({spacing:e})=>e["01"]}; + box-sizing: border-box; + } + + :host([data-size='sm']) { + height: 26px; + } + + :host([data-size='md']) { + height: 36px; + } +`,eg=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let em=class extends i.oi{constructor(){super(...arguments),this.tabs=[],this.onTabChange=()=>null,this.size="md",this.activeTab=0}render(){return this.dataset.size=this.size,this.tabs.map((e,t)=>{let r=t===this.activeTab;return(0,i.dy)` + this.onTabClick(t)} + icon=${e.icon} + size=${this.size} + label=${e.label} + ?active=${r} + data-active=${r} + data-testid="tab-${e.label?.toLowerCase()}" + > + `})}onTabClick(e){this.activeTab=e,this.onTabChange(e)}};em.styles=[p.ET,p.ZM,ef],eg([(0,n.Cb)({type:Array})],em.prototype,"tabs",void 0),eg([(0,n.Cb)()],em.prototype,"onTabChange",void 0),eg([(0,n.Cb)()],em.prototype,"size",void 0),eg([(0,n.SB)()],em.prototype,"activeTab",void 0),em=eg([(0,g.M)("wui-tabs")],em),r(60830);var ey=(0,m.iv)` + button { + display: flex; + align-items: center; + height: 40px; + padding: ${({spacing:e})=>e[2]}; + border-radius: ${({borderRadius:e})=>e[4]}; + column-gap: ${({spacing:e})=>e[1]}; + background-color: transparent; + transition: background-color ${({durations:e})=>e.lg} + ${({easings:e})=>e["ease-out-power-2"]}; + will-change: background-color; + } + + wui-image, + .icon-box { + width: ${({spacing:e})=>e[6]}; + height: ${({spacing:e})=>e[6]}; + border-radius: ${({borderRadius:e})=>e[4]}; + } + + wui-text { + flex: 1; + } + + .icon-box { + position: relative; + } + + .icon-box[data-active='true'] { + background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; + } + + .circle { + position: absolute; + left: 16px; + top: 15px; + width: 8px; + height: 8px; + background-color: ${({tokens:e})=>e.core.textSuccess}; + box-shadow: 0 0 0 2px ${({tokens:e})=>e.theme.foregroundPrimary}; + border-radius: 50%; + } + + /* -- Hover & Active states ----------------------------------------------------------- */ + @media (hover: hover) { + button:hover:enabled, + button:active:enabled { + background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; + } + } +`,ew=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let eb=class extends i.oi{constructor(){super(...arguments),this.address="",this.profileName="",this.alt="",this.imageSrc="",this.icon=void 0,this.iconSize="md",this.loading=!1,this.charsStart=4,this.charsEnd=6}render(){return(0,i.dy)` + + `}leftImageTemplate(){let e=this.icon?(0,i.dy)``:(0,i.dy)``;return(0,i.dy)` + + ${e} + + + `}textTemplate(){return(0,i.dy)` + + ${f.H.getTruncateString({string:this.profileName||this.address,charsStart:this.profileName?16:this.charsStart,charsEnd:this.profileName?0:this.charsEnd,truncate:this.profileName?"end":"middle"})} + + `}rightImageTemplate(){return(0,i.dy)``}};eb.styles=[p.ET,p.ZM,ey],ew([(0,n.Cb)()],eb.prototype,"address",void 0),ew([(0,n.Cb)()],eb.prototype,"profileName",void 0),ew([(0,n.Cb)()],eb.prototype,"alt",void 0),ew([(0,n.Cb)()],eb.prototype,"imageSrc",void 0),ew([(0,n.Cb)()],eb.prototype,"icon",void 0),ew([(0,n.Cb)()],eb.prototype,"iconSize",void 0),ew([(0,n.Cb)({type:Boolean})],eb.prototype,"loading",void 0),ew([(0,n.Cb)({type:Number})],eb.prototype,"charsStart",void 0),ew([(0,n.Cb)({type:Number})],eb.prototype,"charsEnd",void 0),eb=ew([(0,g.M)("wui-wallet-switch")],eb);var ev=r(4786),eC=(0,h.iv)` + wui-icon-link { + margin-right: calc(${({spacing:e})=>e["8"]} * -1); + } + + wui-notice-card { + margin-bottom: ${({spacing:e})=>e["1"]}; + } + + wui-list-item > wui-text { + flex: 1; + } + + w3m-transactions-view { + max-height: 200px; + } + + .balance-container { + display: inline; + } + + .tab-content-container { + height: 300px; + overflow-y: auto; + overflow-x: hidden; + scrollbar-width: none; + } + + .symbol { + transform: translateY(-2px); + } + + .tab-content-container::-webkit-scrollbar { + display: none; + } + + .account-button { + width: auto; + border: none; + display: flex; + align-items: center; + justify-content: center; + gap: ${({spacing:e})=>e["3"]}; + height: 48px; + padding: ${({spacing:e})=>e["2"]}; + padding-right: ${({spacing:e})=>e["3"]}; + box-shadow: inset 0 0 0 1px ${({tokens:e})=>e.theme.foregroundPrimary}; + background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; + border-radius: ${({borderRadius:e})=>e[6]}; + transition: background-color ${({durations:e})=>e.lg} + ${({easings:e})=>e["ease-out-power-2"]}; + } + + .account-button:hover { + background-color: ${({tokens:e})=>e.core.glass010}; + } + + .avatar-container { + position: relative; + } + + wui-avatar.avatar { + width: 32px; + height: 32px; + box-shadow: 0 0 0 2px ${({tokens:e})=>e.core.glass010}; + } + + wui-wallet-switch { + margin-top: ${({spacing:e})=>e["2"]}; + } + + wui-avatar.network-avatar { + width: 16px; + height: 16px; + position: absolute; + left: 100%; + top: 100%; + transform: translate(-75%, -75%); + box-shadow: 0 0 0 2px ${({tokens:e})=>e.core.glass010}; + } + + .account-links { + display: flex; + justify-content: space-between; + align-items: center; + } + + .account-links wui-flex { + cursor: pointer; + display: flex; + align-items: center; + justify-content: center; + flex: 1; + background: red; + align-items: center; + justify-content: center; + height: 48px; + padding: 10px; + flex: 1 0 0; + border-radius: var(--XS, 16px); + border: 1px solid var(--dark-accent-glass-010, rgba(71, 161, 255, 0.1)); + background: var(--dark-accent-glass-010, rgba(71, 161, 255, 0.1)); + transition: + background-color ${({durations:e})=>e.md} + ${({easings:e})=>e["ease-out-power-1"]}, + opacity ${({durations:e})=>e.md} ${({easings:e})=>e["ease-out-power-1"]}; + will-change: background-color, opacity; + } + + .account-links wui-flex:hover { + background: var(--dark-accent-glass-015, rgba(71, 161, 255, 0.15)); + } + + .account-links wui-flex wui-icon { + width: var(--S, 20px); + height: var(--S, 20px); + } + + .account-links wui-flex wui-icon svg path { + stroke: #667dff; + } +`,eE=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let ex=class extends i.oi{constructor(){super(),this.unsubscribe=[],this.caipAddress=a.R.getAccountData()?.caipAddress,this.address=d.j.getPlainAddress(a.R.getAccountData()?.caipAddress),this.profileImage=a.R.getAccountData()?.profileImage,this.profileName=a.R.getAccountData()?.profileName,this.disconnecting=!1,this.balance=a.R.getAccountData()?.balance,this.balanceSymbol=a.R.getAccountData()?.balanceSymbol,this.features=s.OptionsController.state.features,this.remoteFeatures=s.OptionsController.state.remoteFeatures,this.namespace=a.R.state.activeChain,this.activeConnectorIds=Z.ConnectorController.state.activeConnectorIds,this.unsubscribe.push(a.R.subscribeChainProp("accountState",e=>{this.address=d.j.getPlainAddress(e?.caipAddress),this.caipAddress=e?.caipAddress,this.balance=e?.balance,this.balanceSymbol=e?.balanceSymbol,this.profileName=e?.profileName,this.profileImage=e?.profileImage}),s.OptionsController.subscribeKey("features",e=>this.features=e),s.OptionsController.subscribeKey("remoteFeatures",e=>this.remoteFeatures=e),Z.ConnectorController.subscribeKey("activeConnectorIds",e=>{this.activeConnectorIds=e}),a.R.subscribeKey("activeChain",e=>this.namespace=e),a.R.subscribeKey("activeCaipNetwork",e=>{e?.chainNamespace&&(this.namespace=e?.chainNamespace)}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){if(!this.caipAddress||!this.namespace)return null;let e=this.activeConnectorIds[this.namespace],t=e?Z.ConnectorController.getConnectorById(e):void 0,r=c.f.getConnectorImage(t),{value:n,decimals:s,symbol:a}=d.j.parseBalance(this.balance,this.balanceSymbol);return(0,i.dy)` + + +
+ ${n} + .${s} + ${a} +
+ ${this.explorerBtnTemplate()} +
+ + + ${this.authCardTemplate()} + ${this.orderedFeaturesTemplate()} ${this.activityTemplate()} + + Disconnect + + `}fundWalletTemplate(){if(!this.namespace)return null;let e=G.bq.ONRAMP_SUPPORTED_CHAIN_NAMESPACES.includes(this.namespace),t=!!this.features?.receive,r=this.remoteFeatures?.onramp&&e,n=ea.u.isPayWithExchangeEnabled();return r||t||n?(0,i.dy)` + + Fund wallet + + `:null}orderedFeaturesTemplate(){return(this.features?.walletFeaturesOrder||G.bq.DEFAULT_FEATURES.walletFeaturesOrder).map(e=>{switch(e){case"onramp":return this.fundWalletTemplate();case"swaps":return this.swapsTemplate();case"send":return this.sendTemplate();default:return null}})}activityTemplate(){return this.namespace&&this.remoteFeatures?.activity&&G.bq.ACTIVITY_ENABLED_CHAIN_NAMESPACES.includes(this.namespace)?(0,i.dy)` + Activity + `:null}swapsTemplate(){let e=this.remoteFeatures?.swaps,t=a.R.state.activeChain===K.b.CHAIN.EVM;return e&&t?(0,i.dy)` + + Swap + + `:null}sendTemplate(){let e=this.features?.send,t=a.R.state.activeChain;if(!t)throw Error("SendController:sendTemplate - namespace is required");let r=G.bq.SEND_SUPPORTED_NAMESPACES.includes(t);return e&&r?(0,i.dy)` + + Send + + `:null}authCardTemplate(){let e=a.R.state.activeChain;if(!e)throw Error("AuthCardTemplate:authCardTemplate - namespace is required");let t=Z.ConnectorController.getConnectorId(e),r=Z.ConnectorController.getAuthConnector(),{origin:n}=location;return!r||t!==K.b.CONNECTOR_ID.AUTH||n.includes(G.bq.SECURE_SITE)?null:(0,i.dy)` + + `}handleClickFundWallet(){J.RouterController.push("FundWallet")}handleClickSwap(){J.RouterController.push("Swap")}handleClickSend(){J.RouterController.push("WalletSend")}explorerBtnTemplate(){return a.R.getAccountData()?.addressExplorerUrl?(0,i.dy)` + + + Block Explorer + + + `:null}onTransactions(){U.X.sendEvent({type:"track",event:"CLICK_TRANSACTIONS",properties:{isSmartAccount:(0,el.r9)(a.R.state.activeChain)===ev.y_.ACCOUNT_TYPES.SMART_ACCOUNT}}),J.RouterController.push("Transactions")}async onDisconnect(){try{this.disconnecting=!0;let e=X.ConnectionController.getConnections(this.namespace).length>0,t=this.namespace&&Z.ConnectorController.state.activeConnectorIds[this.namespace],r=this.remoteFeatures?.multiWallet;await X.ConnectionController.disconnect(r?{id:t,namespace:this.namespace}:{}),e&&r&&(J.RouterController.push("ProfileWallets"),Y.SnackController.showSuccess("Wallet deleted"))}catch{U.X.sendEvent({type:"track",event:"DISCONNECT_ERROR",properties:{message:"Failed to disconnect"}}),Y.SnackController.showError("Failed to disconnect")}finally{this.disconnecting=!1}}onExplorer(){let e=a.R.getAccountData()?.addressExplorerUrl;e&&d.j.openHref(e,"_blank")}onGoToUpgradeView(){U.X.sendEvent({type:"track",event:"EMAIL_UPGRADE_FROM_MODAL"}),J.RouterController.push("UpgradeEmailWallet")}onGoToProfileWalletsView(){J.RouterController.push("ProfileWallets")}};ex.styles=eC,eE([(0,n.SB)()],ex.prototype,"caipAddress",void 0),eE([(0,n.SB)()],ex.prototype,"address",void 0),eE([(0,n.SB)()],ex.prototype,"profileImage",void 0),eE([(0,n.SB)()],ex.prototype,"profileName",void 0),eE([(0,n.SB)()],ex.prototype,"disconnecting",void 0),eE([(0,n.SB)()],ex.prototype,"balance",void 0),eE([(0,n.SB)()],ex.prototype,"balanceSymbol",void 0),eE([(0,n.SB)()],ex.prototype,"features",void 0),eE([(0,n.SB)()],ex.prototype,"remoteFeatures",void 0),eE([(0,n.SB)()],ex.prototype,"namespace",void 0),eE([(0,n.SB)()],ex.prototype,"activeConnectorIds",void 0),ex=eE([(0,h.Mo)("w3m-account-default-widget")],ex);var e_=r(65733),eA=(0,m.iv)` + span { + font-weight: 500; + font-size: 38px; + color: ${({tokens:e})=>e.theme.textPrimary}; + line-height: 38px; + letter-spacing: -2%; + text-align: center; + font-family: var(--apkt-fontFamily-regular); + } + + .pennies { + color: ${({tokens:e})=>e.theme.textSecondary}; + } +`,eS=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let eI=class extends i.oi{constructor(){super(...arguments),this.dollars="0",this.pennies="00"}render(){return(0,i.dy)`$${this.dollars}.${this.pennies}`}};eI.styles=[p.ET,eA],eS([(0,n.Cb)()],eI.prototype,"dollars",void 0),eS([(0,n.Cb)()],eI.prototype,"pennies",void 0),eI=eS([(0,g.M)("wui-balance")],eI);var eN=(0,m.iv)` + :host { + display: inline-flex; + justify-content: center; + align-items: center; + position: relative; + } + + wui-icon { + position: absolute; + width: 12px !important; + height: 4px !important; + } + + /* -- Variants --------------------------------------------------------- */ + :host([data-variant='fill']) { + background-color: ${({colors:e})=>e.neutrals100}; + } + + :host([data-variant='shade']) { + background-color: ${({colors:e})=>e.neutrals900}; + } + + :host([data-variant='fill']) > wui-text { + color: ${({colors:e})=>e.black}; + } + + :host([data-variant='shade']) > wui-text { + color: ${({colors:e})=>e.white}; + } + + :host([data-variant='fill']) > wui-icon { + color: ${({colors:e})=>e.neutrals100}; + } + + :host([data-variant='shade']) > wui-icon { + color: ${({colors:e})=>e.neutrals900}; + } + + /* -- Sizes --------------------------------------------------------- */ + :host([data-size='sm']) { + padding: ${({spacing:e})=>e[1]} ${({spacing:e})=>e[2]}; + border-radius: ${({borderRadius:e})=>e[2]}; + } + + :host([data-size='md']) { + padding: ${({spacing:e})=>e[2]} ${({spacing:e})=>e[3]}; + border-radius: ${({borderRadius:e})=>e[3]}; + } + + /* -- Placements --------------------------------------------------------- */ + wui-icon[data-placement='top'] { + bottom: 0px; + left: 50%; + transform: translate(-50%, 95%); + } + + wui-icon[data-placement='bottom'] { + top: 0; + left: 50%; + transform: translate(-50%, -95%) rotate(180deg); + } + + wui-icon[data-placement='right'] { + top: 50%; + left: 0; + transform: translate(-65%, -50%) rotate(90deg); + } + + wui-icon[data-placement='left'] { + top: 50%; + right: 0%; + transform: translate(65%, -50%) rotate(270deg); + } +`,ek=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let eR={sm:"sm-regular",md:"md-regular"},eO=class extends i.oi{constructor(){super(...arguments),this.placement="top",this.variant="fill",this.size="md",this.message=""}render(){return this.dataset.variant=this.variant,this.dataset.size=this.size,(0,i.dy)` + ${this.message}`}};eO.styles=[p.ET,p.ZM,eN],ek([(0,n.Cb)()],eO.prototype,"placement",void 0),ek([(0,n.Cb)()],eO.prototype,"variant",void 0),ek([(0,n.Cb)()],eO.prototype,"size",void 0),ek([(0,n.Cb)()],eO.prototype,"message",void 0),eO=ek([(0,g.M)("wui-tooltip")],eO);var eT=r(34252);r(20225);var eP=(0,i.iv)` + :host { + width: 100%; + max-height: 280px; + overflow: scroll; + scrollbar-width: none; + } + + :host::-webkit-scrollbar { + display: none; + } +`;let e$=class extends i.oi{render(){return(0,i.dy)``}};e$.styles=eP,e$=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s}([(0,h.Mo)("w3m-account-activity-widget")],e$),r(80675);var eD=(0,m.iv)` + :host { + width: 100%; + } + + button { + width: 100%; + display: flex; + justify-content: space-between; + align-items: center; + gap: ${({spacing:e})=>e[4]}; + padding: ${({spacing:e})=>e[4]}; + background-color: transparent; + border-radius: ${({borderRadius:e})=>e[4]}; + } + + wui-text { + max-width: 174px; + } + + .tag-container { + width: fit-content; + } + + @media (hover: hover) { + button:hover:enabled { + background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; + } + } +`,eU=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let eL=class extends i.oi{constructor(){super(...arguments),this.icon="card",this.text="",this.description="",this.tag=void 0,this.disabled=!1}render(){return(0,i.dy)` + + `}};eL.styles=[p.ET,p.ZM,eD],eU([(0,n.Cb)()],eL.prototype,"icon",void 0),eU([(0,n.Cb)()],eL.prototype,"text",void 0),eU([(0,n.Cb)()],eL.prototype,"description",void 0),eU([(0,n.Cb)()],eL.prototype,"tag",void 0),eU([(0,n.Cb)({type:Boolean})],eL.prototype,"disabled",void 0),eL=eU([(0,g.M)("wui-list-description")],eL),r(79207);var eM=(0,i.iv)` + :host { + width: 100%; + } + + wui-flex { + width: 100%; + } + + .contentContainer { + max-height: 280px; + overflow: scroll; + scrollbar-width: none; + } + + .contentContainer::-webkit-scrollbar { + display: none; + } +`,eB=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let ej=class extends i.oi{constructor(){super(),this.unsubscribe=[],this.tokenBalance=a.R.getAccountData()?.tokenBalance,this.remoteFeatures=s.OptionsController.state.remoteFeatures,this.unsubscribe.push(a.R.subscribeChainProp("accountState",e=>{this.tokenBalance=e?.tokenBalance}),s.OptionsController.subscribeKey("remoteFeatures",e=>{this.remoteFeatures=e}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return(0,i.dy)`${this.tokenTemplate()}`}tokenTemplate(){return this.tokenBalance&&this.tokenBalance?.length>0?(0,i.dy)` + ${this.tokenItemTemplate()} + `:(0,i.dy)` + ${this.onRampTemplate()} + `}onRampTemplate(){return this.remoteFeatures?.onramp?(0,i.dy)``:(0,i.dy)``}tokenItemTemplate(){return this.tokenBalance?.map(e=>i.dy``)}onReceiveClick(){J.RouterController.push("WalletReceive")}onBuyClick(){U.X.sendEvent({type:"track",event:"SELECT_BUY_CRYPTO",properties:{isSmartAccount:(0,el.r9)(a.R.state.activeChain)===ev.y_.ACCOUNT_TYPES.SMART_ACCOUNT}}),J.RouterController.push("OnRampProviders")}};ej.styles=eM,eB([(0,n.SB)()],ej.prototype,"tokenBalance",void 0),eB([(0,n.SB)()],ej.prototype,"remoteFeatures",void 0),ej=eB([(0,h.Mo)("w3m-account-tokens-widget")],ej),r(32567),r(92815);var eF=(0,h.iv)` + wui-flex { + width: 100%; + } + + wui-promo { + position: absolute; + top: -32px; + } + + wui-profile-button { + margin-top: calc(-1 * ${({spacing:e})=>e["4"]}); + } + + wui-promo + wui-profile-button { + margin-top: ${({spacing:e})=>e["4"]}; + } + + wui-tabs { + width: 100%; + } + + .contentContainer { + height: 280px; + } + + .contentContainer > wui-icon-box { + width: 40px; + height: 40px; + border-radius: ${({borderRadius:e})=>e["3"]}; + } + + .contentContainer > .textContent { + width: 65%; + } +`,eW=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let ez=class extends i.oi{constructor(){super(...arguments),this.unsubscribe=[],this.network=a.R.state.activeCaipNetwork,this.profileName=a.R.getAccountData()?.profileName,this.address=a.R.getAccountData()?.address,this.currentTab=a.R.getAccountData()?.currentTab,this.tokenBalance=a.R.getAccountData()?.tokenBalance,this.features=s.OptionsController.state.features,this.namespace=a.R.state.activeChain,this.activeConnectorIds=Z.ConnectorController.state.activeConnectorIds,this.remoteFeatures=s.OptionsController.state.remoteFeatures}firstUpdated(){a.R.fetchTokenBalance(),this.unsubscribe.push(a.R.subscribeChainProp("accountState",e=>{e?.address?(this.address=e.address,this.profileName=e.profileName,this.currentTab=e.currentTab,this.tokenBalance=e.tokenBalance):u.I.close()}),Z.ConnectorController.subscribeKey("activeConnectorIds",e=>{this.activeConnectorIds=e}),a.R.subscribeKey("activeChain",e=>this.namespace=e),a.R.subscribeKey("activeCaipNetwork",e=>this.network=e),s.OptionsController.subscribeKey("features",e=>this.features=e),s.OptionsController.subscribeKey("remoteFeatures",e=>this.remoteFeatures=e)),this.watchSwapValues()}disconnectedCallback(){this.unsubscribe.forEach(e=>e()),clearInterval(this.watchTokenBalance)}render(){if(!this.address)throw Error("w3m-account-features-widget: No account provided");if(!this.namespace)return null;let e=this.activeConnectorIds[this.namespace],t=e?Z.ConnectorController.getConnectorById(e):void 0,{icon:r,iconSize:n}=this.getAuthData();return(0,i.dy)` + + + + ${this.tokenBalanceTemplate()} + + ${this.orderedWalletFeatures()} ${this.tabsTemplate()} ${this.listContentTemplate()} + `}orderedWalletFeatures(){let e=this.features?.walletFeaturesOrder||G.bq.DEFAULT_FEATURES.walletFeaturesOrder;if(e.every(e=>"send"===e||"receive"===e?!this.features?.[e]:"swaps"!==e&&"onramp"!==e||!this.remoteFeatures?.[e]))return null;let t=[...new Set(e.map(e=>"receive"===e||"onramp"===e?"fund":e))];return(0,i.dy)` + ${t.map(e=>{switch(e){case"fund":return this.fundWalletTemplate();case"swaps":return this.swapsTemplate();case"send":return this.sendTemplate();default:return null}})} + `}fundWalletTemplate(){if(!this.namespace)return null;let e=G.bq.ONRAMP_SUPPORTED_CHAIN_NAMESPACES.includes(this.namespace),t=this.features?.receive,r=this.remoteFeatures?.onramp&&e,n=ea.u.isPayWithExchangeEnabled();return r||t||n?(0,i.dy)` + + + + + + `:null}swapsTemplate(){let e=this.remoteFeatures?.swaps,t=a.R.state.activeChain===K.b.CHAIN.EVM;return e&&t?(0,i.dy)` + + + + + + `:null}sendTemplate(){let e=this.features?.send,t=a.R.state.activeChain,r=G.bq.SEND_SUPPORTED_NAMESPACES.includes(t);return e&&r?(0,i.dy)` + + + + + + `:null}watchSwapValues(){this.watchTokenBalance=setInterval(()=>a.R.fetchTokenBalance(e=>this.onTokenBalanceError(e)),1e4)}onTokenBalanceError(e){e instanceof Error&&e.cause instanceof Response&&e.cause.status===K.b.HTTP_STATUS_CODES.SERVICE_UNAVAILABLE&&clearInterval(this.watchTokenBalance)}listContentTemplate(){return 0===this.currentTab?(0,i.dy)``:1===this.currentTab?(0,i.dy)``:(0,i.dy)``}tokenBalanceTemplate(){if(this.tokenBalance&&this.tokenBalance?.length>=0){let e=d.j.calculateBalance(this.tokenBalance),{dollars:t="0",pennies:r="00"}=d.j.formatTokenBalance(e);return(0,i.dy)``}return(0,i.dy)``}tabsTemplate(){let e=eT.g.getTabsByNamespace(a.R.state.activeChain);return 0===e.length?null:(0,i.dy)``}onTabChange(e){a.R.setAccountProp("currentTab",e,this.namespace)}onFundWalletClick(){J.RouterController.push("FundWallet")}onSwapClick(){this.network?.caipNetworkId&&!G.bq.SWAP_SUPPORTED_NETWORKS.includes(this.network?.caipNetworkId)?J.RouterController.push("UnsupportedChain",{swapUnsupportedChain:!0}):(U.X.sendEvent({type:"track",event:"OPEN_SWAP",properties:{network:this.network?.caipNetworkId||"",isSmartAccount:(0,el.r9)(a.R.state.activeChain)===ev.y_.ACCOUNT_TYPES.SMART_ACCOUNT}}),J.RouterController.push("Swap"))}getAuthData(){let e=er.M.getConnectedSocialProvider(),t=er.M.getConnectedSocialUsername(),r=Z.ConnectorController.getAuthConnector(),i=r?.provider.getEmail()??"";return{name:e_.C.getAuthName({email:i,socialUsername:t,socialProvider:e}),icon:e??"mail",iconSize:e?"xl":"md"}}onGoToProfileWalletsView(){J.RouterController.push("ProfileWallets")}onSendClick(){U.X.sendEvent({type:"track",event:"OPEN_SEND",properties:{network:this.network?.caipNetworkId||"",isSmartAccount:(0,el.r9)(a.R.state.activeChain)===ev.y_.ACCOUNT_TYPES.SMART_ACCOUNT}}),J.RouterController.push("WalletSend")}};ez.styles=eF,eW([(0,n.SB)()],ez.prototype,"watchTokenBalance",void 0),eW([(0,n.SB)()],ez.prototype,"network",void 0),eW([(0,n.SB)()],ez.prototype,"profileName",void 0),eW([(0,n.SB)()],ez.prototype,"address",void 0),eW([(0,n.SB)()],ez.prototype,"currentTab",void 0),eW([(0,n.SB)()],ez.prototype,"tokenBalance",void 0),eW([(0,n.SB)()],ez.prototype,"features",void 0),eW([(0,n.SB)()],ez.prototype,"namespace",void 0),eW([(0,n.SB)()],ez.prototype,"activeConnectorIds",void 0),eW([(0,n.SB)()],ez.prototype,"remoteFeatures",void 0),ez=eW([(0,h.Mo)("w3m-account-wallet-features-widget")],ez);var eH=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let eq=class extends i.oi{constructor(){super(),this.unsubscribe=[],this.namespace=a.R.state.activeChain,this.unsubscribe.push(a.R.subscribeKey("activeChain",e=>{this.namespace=e}))}render(){if(!this.namespace)return null;let e=Z.ConnectorController.getConnectorId(this.namespace),t=Z.ConnectorController.getAuthConnector();return(0,i.dy)` + ${t&&e===K.b.CONNECTOR_ID.AUTH?this.walletFeaturesTemplate():this.defaultTemplate()} + `}walletFeaturesTemplate(){return(0,i.dy)``}defaultTemplate(){return(0,i.dy)``}};eH([(0,n.SB)()],eq.prototype,"namespace",void 0),eq=eH([(0,h.Mo)("w3m-account-view")],eq);var eV=r(89906),eK=r(86988),eZ=r(8789);r(4308),r(43465);var eG=(0,m.iv)` + wui-image { + width: 24px; + height: 24px; + border-radius: ${({borderRadius:e})=>e[2]}; + } + + wui-image, + .icon-box { + width: 32px; + height: 32px; + border-radius: ${({borderRadius:e})=>e[2]}; + } + + wui-icon:not(.custom-icon, .icon-badge) { + cursor: pointer; + } + + .icon-box { + position: relative; + border-radius: ${({borderRadius:e})=>e[2]}; + background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; + } + + .icon-badge { + position: absolute; + top: 18px; + left: 23px; + z-index: 3; + background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; + border: 2px solid ${({tokens:e})=>e.theme.backgroundPrimary}; + border-radius: 50%; + padding: ${({spacing:e})=>e["01"]}; + } + + .icon-badge { + width: 8px; + height: 8px; + } +`,eY=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let eJ=class extends i.oi{constructor(){super(...arguments),this.address="",this.profileName="",this.content=[],this.alt="",this.imageSrc="",this.icon=void 0,this.iconSize="md",this.iconBadge=void 0,this.iconBadgeSize="md",this.buttonVariant="neutral-primary",this.enableMoreButton=!1,this.charsStart=4,this.charsEnd=6}render(){return(0,i.dy)` + + ${this.topTemplate()} ${this.bottomTemplate()} + + `}topTemplate(){return(0,i.dy)` + + ${this.imageOrIconTemplate()} + + + ${this.enableMoreButton?(0,i.dy)``:null} + + `}bottomTemplate(){return(0,i.dy)` ${this.contentTemplate()} `}imageOrIconTemplate(){return this.icon?(0,i.dy)` + + + + + ${this.iconBadge?(0,i.dy)``:null} + + + `:(0,i.dy)` + + + + `}contentTemplate(){return 0===this.content.length?null:(0,i.dy)` + + ${this.content.map(e=>this.labelAndTagTemplate(e))} + + `}labelAndTagTemplate({address:e,profileName:t,label:r,description:n,enableButton:o,buttonType:s,buttonLabel:a,buttonVariant:l,tagVariant:c,tagLabel:d,alignItems:u="flex-end"}){return(0,i.dy)` + + + ${r?(0,i.dy)`${r}`:null} + + + + ${f.H.getTruncateString({string:t||e,charsStart:t?16:this.charsStart,charsEnd:t?0:this.charsEnd,truncate:t?"end":"middle"})} + + + ${c&&d?(0,i.dy)`${d}`:null} + + + ${n?(0,i.dy)`${n}`:null} + + + ${o?this.buttonTemplate({buttonType:s,buttonLabel:a,buttonVariant:l}):null} + + `}buttonTemplate({buttonType:e,buttonLabel:t,buttonVariant:r}){return(0,i.dy)` + + ${t} + + `}dispatchDisconnectEvent(){this.dispatchEvent(new CustomEvent("disconnect",{bubbles:!0,composed:!0}))}dispatchSwitchEvent(){this.dispatchEvent(new CustomEvent("switch",{bubbles:!0,composed:!0}))}dispatchExternalLinkEvent(){this.dispatchEvent(new CustomEvent("externalLink",{bubbles:!0,composed:!0}))}dispatchMoreButtonEvent(){this.dispatchEvent(new CustomEvent("more",{bubbles:!0,composed:!0}))}dispatchCopyEvent(){this.dispatchEvent(new CustomEvent("copy",{bubbles:!0,composed:!0}))}};eJ.styles=[p.ET,p.ZM,eG],eY([(0,n.Cb)()],eJ.prototype,"address",void 0),eY([(0,n.Cb)()],eJ.prototype,"profileName",void 0),eY([(0,n.Cb)({type:Array})],eJ.prototype,"content",void 0),eY([(0,n.Cb)()],eJ.prototype,"alt",void 0),eY([(0,n.Cb)()],eJ.prototype,"imageSrc",void 0),eY([(0,n.Cb)()],eJ.prototype,"icon",void 0),eY([(0,n.Cb)()],eJ.prototype,"iconSize",void 0),eY([(0,n.Cb)()],eJ.prototype,"iconBadge",void 0),eY([(0,n.Cb)()],eJ.prototype,"iconBadgeSize",void 0),eY([(0,n.Cb)()],eJ.prototype,"buttonVariant",void 0),eY([(0,n.Cb)({type:Boolean})],eJ.prototype,"enableMoreButton",void 0),eY([(0,n.Cb)({type:Number})],eJ.prototype,"charsStart",void 0),eY([(0,n.Cb)({type:Number})],eJ.prototype,"charsEnd",void 0),eJ=eY([(0,g.M)("wui-active-profile-wallet-item")],eJ),r(92374);var eX=(0,m.iv)` + wui-image, + .icon-box { + width: 32px; + height: 32px; + border-radius: ${({borderRadius:e})=>e[2]}; + } + + .right-icon { + cursor: pointer; + } + + .icon-box { + position: relative; + background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; + } + + .icon-badge { + position: absolute; + top: 18px; + left: 23px; + z-index: 3; + background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; + border: 2px solid ${({tokens:e})=>e.theme.backgroundPrimary}; + border-radius: 50%; + padding: ${({spacing:e})=>e["01"]}; + } + + .icon-badge { + width: 8px; + height: 8px; + } +`,eQ=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let e0=class extends i.oi{constructor(){super(...arguments),this.address="",this.profileName="",this.alt="",this.buttonLabel="",this.buttonVariant="accent-primary",this.imageSrc="",this.icon=void 0,this.iconSize="md",this.iconBadgeSize="md",this.rightIcon="signOut",this.rightIconSize="md",this.loading=!1,this.charsStart=4,this.charsEnd=6}render(){return(0,i.dy)` + + ${this.imageOrIconTemplate()} ${this.labelAndDescriptionTemplate()} + ${this.buttonActionTemplate()} + + `}imageOrIconTemplate(){return this.icon?(0,i.dy)` + + + + + ${this.iconBadge?(0,i.dy)``:null} + + + `:(0,i.dy)``}labelAndDescriptionTemplate(){return(0,i.dy)` + + + ${f.H.getTruncateString({string:this.profileName||this.address,charsStart:this.profileName?16:this.charsStart,charsEnd:this.profileName?0:this.charsEnd,truncate:this.profileName?"end":"middle"})} + + + `}buttonActionTemplate(){return(0,i.dy)` + + + ${this.buttonLabel} + + + + + `}handleButtonClick(){this.dispatchEvent(new CustomEvent("buttonClick",{bubbles:!0,composed:!0}))}handleIconClick(){this.dispatchEvent(new CustomEvent("iconClick",{bubbles:!0,composed:!0}))}};e0.styles=[p.ET,p.ZM,eX],eQ([(0,n.Cb)()],e0.prototype,"address",void 0),eQ([(0,n.Cb)()],e0.prototype,"profileName",void 0),eQ([(0,n.Cb)()],e0.prototype,"alt",void 0),eQ([(0,n.Cb)()],e0.prototype,"buttonLabel",void 0),eQ([(0,n.Cb)()],e0.prototype,"buttonVariant",void 0),eQ([(0,n.Cb)()],e0.prototype,"imageSrc",void 0),eQ([(0,n.Cb)()],e0.prototype,"icon",void 0),eQ([(0,n.Cb)()],e0.prototype,"iconSize",void 0),eQ([(0,n.Cb)()],e0.prototype,"iconBadge",void 0),eQ([(0,n.Cb)()],e0.prototype,"iconBadgeSize",void 0),eQ([(0,n.Cb)()],e0.prototype,"rightIcon",void 0),eQ([(0,n.Cb)()],e0.prototype,"rightIconSize",void 0),eQ([(0,n.Cb)({type:Boolean})],e0.prototype,"loading",void 0),eQ([(0,n.Cb)({type:Number})],e0.prototype,"charsStart",void 0),eQ([(0,n.Cb)({type:Number})],e0.prototype,"charsEnd",void 0),e0=eQ([(0,g.M)("wui-inactive-profile-wallet-item")],e0),r(39203);var e1=r(54090);let e2={getAuthData(e){let t=e.connectorId===K.b.CONNECTOR_ID.AUTH;if(!t)return{isAuth:!1,icon:void 0,iconSize:void 0,name:void 0};let r=e?.auth?.name??er.M.getConnectedSocialProvider(),i=e?.auth?.username??er.M.getConnectedSocialUsername(),n=Z.ConnectorController.getAuthConnector(),o=n?.provider.getEmail()??"";return{isAuth:!0,icon:r??"mail",iconSize:r?"xl":"md",name:t?e_.C.getAuthName({email:o,socialUsername:i,socialProvider:r}):void 0}}};var e3=(0,h.iv)` + :host { + --connect-scroll--top-opacity: 0; + --connect-scroll--bottom-opacity: 0; + } + + .balance-amount { + flex: 1; + } + + .wallet-list { + scrollbar-width: none; + overflow-y: scroll; + overflow-x: hidden; + transition: opacity ${({easings:e})=>e["ease-out-power-1"]} + ${({durations:e})=>e.md}; + will-change: opacity; + mask-image: linear-gradient( + to bottom, + rgba(0, 0, 0, calc(1 - var(--connect-scroll--top-opacity))) 0px, + rgba(200, 200, 200, calc(1 - var(--connect-scroll--top-opacity))) 1px, + black 40px, + black calc(100% - 40px), + rgba(155, 155, 155, calc(1 - var(--connect-scroll--bottom-opacity))) calc(100% - 1px), + rgba(0, 0, 0, calc(1 - var(--connect-scroll--bottom-opacity))) 100% + ); + } + + .active-wallets { + background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; + border-radius: ${({borderRadius:e})=>e["4"]}; + } + + .active-wallets-box { + height: 330px; + } + + .empty-wallet-list-box { + height: 400px; + } + + .empty-box { + width: 100%; + padding: ${({spacing:e})=>e["4"]}; + background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; + border-radius: ${({borderRadius:e})=>e["4"]}; + } + + wui-separator { + margin: ${({spacing:e})=>e["2"]} 0 ${({spacing:e})=>e["2"]} 0; + } + + .active-connection { + padding: ${({spacing:e})=>e["2"]}; + } + + .recent-connection { + padding: ${({spacing:e})=>e["2"]} 0 ${({spacing:e})=>e["2"]} 0; + } + + @media (max-width: 430px) { + .active-wallets-box, + .empty-wallet-list-box { + height: auto; + max-height: clamp(360px, 470px, 80vh); + } + } +`,e5=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let e4={ADDRESS_DISPLAY:{START:4,END:6},BADGE:{SIZE:"md",ICON:"lightbulb"},SCROLL_THRESHOLD:50,OPACITY_RANGE:[0,1]},e6={eip155:"ethereum",solana:"solana",bip122:"bitcoin",ton:"ton"},e8=[{namespace:"eip155",icon:e6.eip155,label:"EVM"},{namespace:"solana",icon:e6.solana,label:"Solana"},{namespace:"bip122",icon:e6.bip122,label:"Bitcoin"},{namespace:"ton",icon:e6.ton,label:"Ton"}],e9={eip155:{title:"Add EVM Wallet",description:"Add your first EVM wallet"},solana:{title:"Add Solana Wallet",description:"Add your first Solana wallet"},bip122:{title:"Add Bitcoin Wallet",description:"Add your first Bitcoin wallet"},ton:{title:"Add TON Wallet",description:"Add your first TON wallet"}},e7=class extends i.oi{constructor(){super(),this.unsubscribers=[],this.currentTab=0,this.namespace=a.R.state.activeChain,this.namespaces=Array.from(a.R.state.chains.keys()),this.caipAddress=void 0,this.profileName=void 0,this.activeConnectorIds=Z.ConnectorController.state.activeConnectorIds,this.lastSelectedAddress="",this.lastSelectedConnectorId="",this.isSwitching=!1,this.caipNetwork=a.R.state.activeCaipNetwork,this.user=a.R.getAccountData()?.user,this.remoteFeatures=s.OptionsController.state.remoteFeatures,this.currentTab=this.namespace?this.namespaces.indexOf(this.namespace):0,this.caipAddress=a.R.getAccountData(this.namespace)?.caipAddress,this.profileName=a.R.getAccountData(this.namespace)?.profileName,this.unsubscribers.push(X.ConnectionController.subscribeKey("connections",()=>this.onConnectionsChange()),X.ConnectionController.subscribeKey("recentConnections",()=>this.requestUpdate()),Z.ConnectorController.subscribeKey("activeConnectorIds",e=>{this.activeConnectorIds=e}),a.R.subscribeKey("activeCaipNetwork",e=>this.caipNetwork=e),a.R.subscribeChainProp("accountState",e=>{this.user=e?.user}),s.OptionsController.subscribeKey("remoteFeatures",e=>this.remoteFeatures=e)),this.chainListener=a.R.subscribeChainProp("accountState",e=>{this.caipAddress=e?.caipAddress,this.profileName=e?.profileName},this.namespace)}disconnectedCallback(){this.unsubscribers.forEach(e=>e()),this.resizeObserver?.disconnect(),this.removeScrollListener(),this.chainListener?.()}firstUpdated(){let e=this.shadowRoot?.querySelector(".wallet-list");if(!e)return;let t=()=>this.updateScrollOpacity(e);requestAnimationFrame(t),e.addEventListener("scroll",t),this.resizeObserver=new ResizeObserver(t),this.resizeObserver.observe(e),t()}render(){let e=this.namespace;if(!e)throw Error("Namespace is not set");return(0,i.dy)` + + ${this.renderTabs()} ${this.renderHeader(e)} ${this.renderConnections(e)} + ${this.renderAddConnectionButton(e)} + + `}renderTabs(){let e=this.namespaces.map(e=>e8.find(t=>t.namespace===e)).filter(Boolean);return e.length>1?(0,i.dy)` + this.handleTabChange(e)} + .activeTab=${this.currentTab} + .tabs=${e} + > + `:null}renderHeader(e){let t=this.getActiveConnections(e).flatMap(({accounts:e})=>e).length+(this.caipAddress?1:0);return(0,i.dy)` + + + ${t>1?"Wallets":"Wallet"} + + ${t} + + X.ConnectionController.disconnect({namespace:e})} + ?disabled=${!this.hasAnyConnections(e)} + data-testid="disconnect-all-button" + > + Disconnect All + + + `}renderConnections(e){let t=this.hasAnyConnections(e);return(0,i.dy)` + + ${t?this.renderActiveConnections(e):this.renderEmptyState(e)} + + `}renderActiveConnections(e){let t=this.getActiveConnections(e),r=this.activeConnectorIds[e],n=this.getPlainAddress();return(0,i.dy)` + ${n||r||t.length>0?(0,i.dy)` + ${this.renderActiveProfile(e)} ${this.renderActiveConnectionsList(e)} + `:null} + ${this.renderRecentConnections(e)} + `}renderActiveProfile(e){let t=this.activeConnectorIds[e];if(!t)return null;let{connections:r}=eZ.f.getConnectionsData(e),n=Z.ConnectorController.getConnectorById(t),o=c.f.getConnectorImage(n),s=this.getPlainAddress();if(!s)return null;let a=e===K.b.CHAIN.BITCOIN,l=e2.getAuthData({connectorId:t,accounts:[]}),d=this.getActiveConnections(e).flatMap(e=>e.accounts).length>0,u=r.find(e=>e.connectorId===t),h=u?.accounts.filter(e=>!e1.g.isLowerCaseMatch(e.address,s));return(0,i.dy)` + + this.handleCopyAddress(s)} + @disconnect=${()=>this.handleDisconnect(e,t)} + @switch=${()=>{a&&u&&h?.[0]&&this.handleSwitchWallet(u,h[0].address,e)}} + @externalLink=${()=>this.handleExternalLink(s)} + @more=${()=>this.handleMore()} + data-testid="wui-active-profile-wallet-item" + > + ${d?(0,i.dy)``:null} + + `}renderActiveConnectionsList(e){let t=this.getActiveConnections(e);return 0===t.length?null:(0,i.dy)` + + ${this.renderConnectionList(t,!1,e)} + + `}renderRecentConnections(e){let{recentConnections:t}=eZ.f.getConnectionsData(e);return 0===t.flatMap(e=>e.accounts).length?null:(0,i.dy)` + + RECENTLY CONNECTED + + ${this.renderConnectionList(t,!0,e)} + + + `}renderConnectionList(e,t,r){return e.filter(e=>e.accounts.length>0).map((e,n)=>{let o=Z.ConnectorController.getConnectorById(e.connectorId),s=c.f.getConnectorImage(o)??"",a=e2.getAuthData(e);return e.accounts.map((o,l)=>{let c=this.isAccountLoading(e.connectorId,o.address);return(0,i.dy)` + + ${0!==n||0!==l?(0,i.dy)``:null} + this.handleSwitchWallet(e,o.address,r)} + @iconClick=${()=>this.handleWalletAction({connection:e,address:o.address,isRecentConnection:t,namespace:r})} + > + + `})})}renderAddConnectionButton(e){if(!this.isMultiWalletEnabled()&&this.caipAddress||!this.hasAnyConnections(e))return null;let{title:t}=this.getChainLabelInfo(e);return(0,i.dy)` + this.handleAddConnection(e)} + data-testid="add-connection-button" + > + ${t} + + `}renderEmptyState(e){let{title:t,description:r}=this.getChainLabelInfo(e);return(0,i.dy)` + + + + + + No wallet connected + ${r} + + + this.handleAddConnection(e)} + data-testid="empty-state-button" + icon="plus" + > + ${t} + + + + `}handleTabChange(e){let t=this.namespaces[e];t&&(this.chainListener?.(),this.currentTab=this.namespaces.indexOf(t),this.namespace=t,this.caipAddress=a.R.getAccountData(t)?.caipAddress,this.profileName=a.R.getAccountData(t)?.profileName,this.chainListener=a.R.subscribeChainProp("accountState",e=>{this.caipAddress=e?.caipAddress},t))}async handleSwitchWallet(e,t,r){try{this.isSwitching=!0,this.lastSelectedConnectorId=e.connectorId,this.lastSelectedAddress=t,this.caipNetwork?.chainNamespace!==r&&e?.caipNetwork&&(Z.ConnectorController.setFilterByNamespace(r),await a.R.switchActiveNetwork(e?.caipNetwork)),await X.ConnectionController.switchConnection({connection:e,address:t,namespace:r,closeModalOnConnect:!1,onChange({hasSwitchedAccount:e,hasSwitchedWallet:t}){t?Y.SnackController.showSuccess("Wallet switched"):e&&Y.SnackController.showSuccess("Account switched")}})}catch(e){Y.SnackController.showError("Failed to switch wallet")}finally{this.isSwitching=!1}}handleWalletAction(e){let{connection:t,address:r,isRecentConnection:i,namespace:n}=e;i?(er.M.deleteAddressFromConnection({connectorId:t.connectorId,address:r,namespace:n}),X.ConnectionController.syncStorageConnections(),Y.SnackController.showSuccess("Wallet deleted")):this.handleDisconnect(n,t.connectorId)}async handleDisconnect(e,t){try{await X.ConnectionController.disconnect({id:t,namespace:e}),Y.SnackController.showSuccess("Wallet disconnected")}catch{Y.SnackController.showError("Failed to disconnect wallet")}}handleCopyAddress(e){d.j.copyToClopboard(e),Y.SnackController.showSuccess("Address copied")}handleMore(){J.RouterController.push("AccountSettings")}handleExternalLink(e){let t=this.caipNetwork?.blockExplorers?.default.url;t&&d.j.openHref(`${t}/address/${e}`,"_blank")}handleAddConnection(e){Z.ConnectorController.setFilterByNamespace(e),J.RouterController.push("Connect",{addWalletForNamespace:e})}getChainLabelInfo(e){return e9[e]??{title:"Add Wallet",description:"Add your first wallet"}}isSmartAccount(e){if(!this.namespace)return!1;let t=this.user?.accounts?.find(e=>"smartAccount"===e.type);return!!t&&!!e&&e1.g.isLowerCaseMatch(t.address,e)}getPlainAddress(){return this.caipAddress?d.j.getPlainAddress(this.caipAddress):void 0}getActiveConnections(e){let t=this.activeConnectorIds[e],{connections:r}=eZ.f.getConnectionsData(e),[i]=r.filter(e=>e1.g.isLowerCaseMatch(e.connectorId,t));if(!t)return r;let n=e===K.b.CHAIN.BITCOIN,{address:o}=this.caipAddress?eK.u.parseCaipAddress(this.caipAddress):{},s=[...o?[o]:[]];return n&&i&&(s=i.accounts.map(e=>e.address)||[]),eZ.f.excludeConnectorAddressFromConnections({connectorId:t,addresses:s,connections:r})}hasAnyConnections(e){let t=this.getActiveConnections(e),{recentConnections:r}=eZ.f.getConnectionsData(e);return!!this.caipAddress||t.length>0||r.length>0}isAccountLoading(e,t){return e1.g.isLowerCaseMatch(this.lastSelectedConnectorId,e)&&e1.g.isLowerCaseMatch(this.lastSelectedAddress,t)&&this.isSwitching}getProfileContent(e){let{address:t,connections:r,connectorId:i,namespace:n}=e,[o]=r.filter(e=>e1.g.isLowerCaseMatch(e.connectorId,i));if(n===K.b.CHAIN.BITCOIN&&o?.accounts.every(e=>"string"==typeof e.type))return this.getBitcoinProfileContent(o.accounts,t);let s=e2.getAuthData({connectorId:i,accounts:[]});return[{address:t,tagLabel:"Active",tagVariant:"success",enableButton:!0,profileName:this.profileName,buttonType:"disconnect",buttonLabel:"Disconnect",buttonVariant:"neutral-secondary",...s.isAuth?{description:this.isSmartAccount(t)?"Smart Account":"EOA Account"}:{}}]}getBitcoinProfileContent(e,t){let r=e.length>1,i=this.getPlainAddress();return e.map(e=>{let n=e1.g.isLowerCaseMatch(e.address,i),o="PAYMENT";return"ordinal"===e.type&&(o="ORDINALS"),{address:e.address,tagLabel:e1.g.isLowerCaseMatch(e.address,t)?"Active":void 0,tagVariant:e1.g.isLowerCaseMatch(e.address,t)?"success":void 0,enableButton:!0,...r?{label:o,alignItems:"flex-end",buttonType:n?"disconnect":"switch",buttonLabel:n?"Disconnect":"Switch",buttonVariant:n?"neutral-secondary":"accent-secondary"}:{alignItems:"center",buttonType:"disconnect",buttonLabel:"Disconnect",buttonVariant:"neutral-secondary"}}})}removeScrollListener(){let e=this.shadowRoot?.querySelector(".wallet-list");e&&e.removeEventListener("scroll",()=>this.handleConnectListScroll())}handleConnectListScroll(){let e=this.shadowRoot?.querySelector(".wallet-list");e&&this.updateScrollOpacity(e)}isMultiWalletEnabled(){return!!this.remoteFeatures?.multiWallet}updateScrollOpacity(e){e.style.setProperty("--connect-scroll--top-opacity",h.kj.interpolate([0,e4.SCROLL_THRESHOLD],e4.OPACITY_RANGE,e.scrollTop).toString()),e.style.setProperty("--connect-scroll--bottom-opacity",h.kj.interpolate([0,e4.SCROLL_THRESHOLD],e4.OPACITY_RANGE,e.scrollHeight-e.scrollTop-e.offsetHeight).toString())}onConnectionsChange(){if(this.isMultiWalletEnabled()&&this.namespace){let{connections:e}=eZ.f.getConnectionsData(this.namespace);0===e.length&&J.RouterController.reset("ProfileWallets")}this.requestUpdate()}};e7.styles=e3,e5([(0,n.SB)()],e7.prototype,"currentTab",void 0),e5([(0,n.SB)()],e7.prototype,"namespace",void 0),e5([(0,n.SB)()],e7.prototype,"namespaces",void 0),e5([(0,n.SB)()],e7.prototype,"caipAddress",void 0),e5([(0,n.SB)()],e7.prototype,"profileName",void 0),e5([(0,n.SB)()],e7.prototype,"activeConnectorIds",void 0),e5([(0,n.SB)()],e7.prototype,"lastSelectedAddress",void 0),e5([(0,n.SB)()],e7.prototype,"lastSelectedConnectorId",void 0),e5([(0,n.SB)()],e7.prototype,"isSwitching",void 0),e5([(0,n.SB)()],e7.prototype,"caipNetwork",void 0),e5([(0,n.SB)()],e7.prototype,"user",void 0),e5([(0,n.SB)()],e7.prototype,"remoteFeatures",void 0),e7=e5([(0,h.Mo)("w3m-profile-wallets-view")],e7);var te=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let tt=class extends i.oi{constructor(){super(),this.unsubscribe=[],this.activeCaipNetwork=a.R.state.activeCaipNetwork,this.features=s.OptionsController.state.features,this.remoteFeatures=s.OptionsController.state.remoteFeatures,this.exchangesLoading=ea.u.state.isLoading,this.exchanges=ea.u.state.exchanges,this.unsubscribe.push(s.OptionsController.subscribeKey("features",e=>this.features=e),s.OptionsController.subscribeKey("remoteFeatures",e=>this.remoteFeatures=e),a.R.subscribeKey("activeCaipNetwork",e=>{this.activeCaipNetwork=e,this.setDefaultPaymentAsset()}),ea.u.subscribeKey("isLoading",e=>this.exchangesLoading=e),ea.u.subscribeKey("exchanges",e=>this.exchanges=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}async firstUpdated(){ea.u.isPayWithExchangeSupported()&&(await this.setDefaultPaymentAsset(),await ea.u.fetchExchanges())}render(){return(0,i.dy)` + + ${this.onrampTemplate()} ${this.receiveTemplate()} ${this.depositFromExchangeTemplate()} + + `}async setDefaultPaymentAsset(){if(!this.activeCaipNetwork)return;let e=await ea.u.getAssetsForNetwork(this.activeCaipNetwork.caipNetworkId),t=e.find(e=>"USDC"===e.metadata.symbol)||e[0];t&&ea.u.setPaymentAsset(t)}onrampTemplate(){if(!this.activeCaipNetwork)return null;let e=this.remoteFeatures?.onramp,t=G.bq.ONRAMP_SUPPORTED_CHAIN_NAMESPACES.includes(this.activeCaipNetwork.chainNamespace);return e&&t?(0,i.dy)` + + Buy crypto + + `:null}depositFromExchangeTemplate(){return this.activeCaipNetwork&&ea.u.isPayWithExchangeSupported()?(0,i.dy)` + + Deposit from exchange + + `:null}receiveTemplate(){return this.features?.receive?(0,i.dy)` + + Receive funds + + `:null}onBuyCrypto(){J.RouterController.push("OnRampProviders")}onReceive(){J.RouterController.push("WalletReceive")}onDepositFromExchange(){ea.u.reset(),J.RouterController.push("PayWithExchange",{redirectView:J.RouterController.state.data?.redirectView})}};te([(0,n.SB)()],tt.prototype,"activeCaipNetwork",void 0),te([(0,n.SB)()],tt.prototype,"features",void 0),te([(0,n.SB)()],tt.prototype,"remoteFeatures",void 0),te([(0,n.SB)()],tt.prototype,"exchangesLoading",void 0),te([(0,n.SB)()],tt.prototype,"exchanges",void 0),tt=te([(0,h.Mo)("w3m-fund-wallet-view")],tt);var tr=r(7226),ti=(0,m.iv)` + :host { + display: flex; + align-items: center; + justify-content: center; + } + + label { + position: relative; + display: inline-block; + user-select: none; + transition: + background-color ${({durations:e})=>e.lg} + ${({easings:e})=>e["ease-out-power-2"]}, + color ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]}, + border ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]}, + box-shadow ${({durations:e})=>e.lg} + ${({easings:e})=>e["ease-out-power-2"]}, + width ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]}, + height ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]}, + transform ${({durations:e})=>e.lg} + ${({easings:e})=>e["ease-out-power-2"]}, + opacity ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]}; + will-change: background-color, color, border, box-shadow, width, height, transform, opacity; + } + + input { + width: 0; + height: 0; + opacity: 0; + } + + span { + position: absolute; + cursor: pointer; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: ${({colors:e})=>e.neutrals300}; + border-radius: ${({borderRadius:e})=>e.round}; + border: 1px solid transparent; + will-change: border; + transition: + background-color ${({durations:e})=>e.lg} + ${({easings:e})=>e["ease-out-power-2"]}, + color ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]}, + border ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]}, + box-shadow ${({durations:e})=>e.lg} + ${({easings:e})=>e["ease-out-power-2"]}, + width ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]}, + height ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]}, + transform ${({durations:e})=>e.lg} + ${({easings:e})=>e["ease-out-power-2"]}, + opacity ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]}; + will-change: background-color, color, border, box-shadow, width, height, transform, opacity; + } + + span:before { + content: ''; + position: absolute; + background-color: ${({colors:e})=>e.white}; + border-radius: 50%; + } + + /* -- Sizes --------------------------------------------------------- */ + label[data-size='lg'] { + width: 48px; + height: 32px; + } + + label[data-size='md'] { + width: 40px; + height: 28px; + } + + label[data-size='sm'] { + width: 32px; + height: 22px; + } + + label[data-size='lg'] > span:before { + height: 24px; + width: 24px; + left: 4px; + top: 3px; + } + + label[data-size='md'] > span:before { + height: 20px; + width: 20px; + left: 4px; + top: 3px; + } + + label[data-size='sm'] > span:before { + height: 16px; + width: 16px; + left: 3px; + top: 2px; + } + + /* -- Focus states --------------------------------------------------- */ + input:focus-visible:not(:checked) + span, + input:focus:not(:checked) + span { + border: 1px solid ${({tokens:e})=>e.core.iconAccentPrimary}; + background-color: ${({tokens:e})=>e.theme.textTertiary}; + box-shadow: 0px 0px 0px 4px rgba(9, 136, 240, 0.2); + } + + input:focus-visible:checked + span, + input:focus:checked + span { + border: 1px solid ${({tokens:e})=>e.core.iconAccentPrimary}; + box-shadow: 0px 0px 0px 4px rgba(9, 136, 240, 0.2); + } + + /* -- Checked states --------------------------------------------------- */ + input:checked + span { + background-color: ${({tokens:e})=>e.core.iconAccentPrimary}; + } + + label[data-size='lg'] > input:checked + span:before { + transform: translateX(calc(100% - 9px)); + } + + label[data-size='md'] > input:checked + span:before { + transform: translateX(calc(100% - 9px)); + } + + label[data-size='sm'] > input:checked + span:before { + transform: translateX(calc(100% - 7px)); + } + + /* -- Hover states ------------------------------------------------------- */ + label:hover > input:not(:checked):not(:disabled) + span { + background-color: ${({colors:e})=>e.neutrals400}; + } + + label:hover > input:checked:not(:disabled) + span { + background-color: ${({colors:e})=>e.accent080}; + } + + /* -- Disabled state --------------------------------------------------- */ + label:has(input:disabled) { + pointer-events: none; + user-select: none; + } + + input:not(:checked):disabled + span { + background-color: ${({colors:e})=>e.neutrals700}; + } + + input:checked:disabled + span { + background-color: ${({colors:e})=>e.neutrals700}; + } + + input:not(:checked):disabled + span::before { + background-color: ${({colors:e})=>e.neutrals400}; + } + + input:checked:disabled + span::before { + background-color: ${({tokens:e})=>e.theme.textTertiary}; + } +`,tn=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let to=class extends i.oi{constructor(){super(...arguments),this.inputElementRef=(0,tr.V)(),this.checked=!1,this.disabled=!1,this.size="md"}render(){return(0,i.dy)` + + `}dispatchChangeEvent(){this.dispatchEvent(new CustomEvent("switchChange",{detail:this.inputElementRef.value?.checked,bubbles:!0,composed:!0}))}};to.styles=[p.ET,p.ZM,ti],tn([(0,n.Cb)({type:Boolean})],to.prototype,"checked",void 0),tn([(0,n.Cb)({type:Boolean})],to.prototype,"disabled",void 0),tn([(0,n.Cb)()],to.prototype,"size",void 0),to=tn([(0,g.M)("wui-toggle")],to);var ts=(0,m.iv)` + :host { + height: auto; + } + + :host > wui-flex { + height: 100%; + display: flex; + align-items: center; + justify-content: center; + column-gap: ${({spacing:e})=>e["2"]}; + padding: ${({spacing:e})=>e["2"]} ${({spacing:e})=>e["3"]}; + background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; + border-radius: ${({borderRadius:e})=>e["4"]}; + box-shadow: inset 0 0 0 1px ${({tokens:e})=>e.theme.foregroundPrimary}; + transition: background-color ${({durations:e})=>e.lg} + ${({easings:e})=>e["ease-out-power-2"]}; + will-change: background-color; + cursor: pointer; + } + + wui-switch { + pointer-events: none; + } +`,ta=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let tl=class extends i.oi{constructor(){super(...arguments),this.checked=!1}render(){return(0,i.dy)` + + + + + `}handleToggleChange(e){e.stopPropagation(),this.checked=e.detail,this.dispatchSwitchEvent()}dispatchSwitchEvent(){this.dispatchEvent(new CustomEvent("certifiedSwitchChange",{detail:this.checked,bubbles:!0,composed:!0}))}};tl.styles=[p.ET,p.ZM,ts],ta([(0,n.Cb)({type:Boolean})],tl.prototype,"checked",void 0),tl=ta([(0,g.M)("wui-certified-switch")],tl),r(4163);var tc=(0,m.iv)` + :host { + position: relative; + display: inline-block; + width: 100%; + } + + wui-icon { + position: absolute; + top: 50%; + transform: translateY(-50%); + right: ${({spacing:e})=>e[3]}; + color: ${({tokens:e})=>e.theme.iconDefault}; + cursor: pointer; + padding: ${({spacing:e})=>e[2]}; + background-color: transparent; + border-radius: ${({borderRadius:e})=>e[4]}; + transition: background-color ${({durations:e})=>e.lg} + ${({easings:e})=>e["ease-out-power-2"]}; + } + + @media (hover: hover) { + wui-icon:hover { + background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; + } + } +`,td=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let tu=class extends i.oi{constructor(){super(...arguments),this.inputComponentRef=(0,tr.V)(),this.inputValue=""}render(){return(0,i.dy)` + + ${this.inputValue?(0,i.dy)``:null} + + `}onInputChange(e){this.inputValue=e.detail||""}clearValue(){let e=this.inputComponentRef.value,t=e?.inputElementRef.value;t&&(t.value="",this.inputValue="",t.focus(),t.dispatchEvent(new Event("input")))}};tu.styles=[p.ET,tc],td([(0,n.Cb)()],tu.prototype,"inputValue",void 0),tu=td([(0,g.M)("wui-search-bar")],tu);var th=r(17766),tp=r(29095),tf=r(24348);r(42653);var tg=(0,m.iv)` + :host { + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + height: 104px; + width: 104px; + row-gap: ${({spacing:e})=>e[2]}; + background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; + border-radius: ${({borderRadius:e})=>e[5]}; + position: relative; + } + + wui-shimmer[data-type='network'] { + border: none; + -webkit-clip-path: var(--apkt-path-network); + clip-path: var(--apkt-path-network); + } + + svg { + position: absolute; + width: 48px; + height: 54px; + z-index: 1; + } + + svg > path { + stroke: ${({tokens:e})=>e.theme.foregroundSecondary}; + stroke-width: 1px; + } + + @media (max-width: 350px) { + :host { + width: 100%; + } + } +`,tm=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let ty=class extends i.oi{constructor(){super(...arguments),this.type="wallet"}render(){return(0,i.dy)` + ${this.shimmerTemplate()} + + `}shimmerTemplate(){return"network"===this.type?(0,i.dy)` + ${tf.W}`:(0,i.dy)``}};ty.styles=[p.ET,p.ZM,tg],tm([(0,n.Cb)()],ty.prototype,"type",void 0),ty=tm([(0,g.M)("wui-card-select-loader")],ty);var tw=(0,i.iv)` + :host { + display: grid; + width: inherit; + height: inherit; + } +`,tb=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let tv=class extends i.oi{render(){return this.style.cssText=` + grid-template-rows: ${this.gridTemplateRows}; + grid-template-columns: ${this.gridTemplateColumns}; + justify-items: ${this.justifyItems}; + align-items: ${this.alignItems}; + justify-content: ${this.justifyContent}; + align-content: ${this.alignContent}; + column-gap: ${this.columnGap&&`var(--apkt-spacing-${this.columnGap})`}; + row-gap: ${this.rowGap&&`var(--apkt-spacing-${this.rowGap})`}; + gap: ${this.gap&&`var(--apkt-spacing-${this.gap})`}; + padding-top: ${this.padding&&f.H.getSpacingStyles(this.padding,0)}; + padding-right: ${this.padding&&f.H.getSpacingStyles(this.padding,1)}; + padding-bottom: ${this.padding&&f.H.getSpacingStyles(this.padding,2)}; + padding-left: ${this.padding&&f.H.getSpacingStyles(this.padding,3)}; + margin-top: ${this.margin&&f.H.getSpacingStyles(this.margin,0)}; + margin-right: ${this.margin&&f.H.getSpacingStyles(this.margin,1)}; + margin-bottom: ${this.margin&&f.H.getSpacingStyles(this.margin,2)}; + margin-left: ${this.margin&&f.H.getSpacingStyles(this.margin,3)}; + `,(0,i.dy)``}};tv.styles=[p.ET,tw],tb([(0,n.Cb)()],tv.prototype,"gridTemplateRows",void 0),tb([(0,n.Cb)()],tv.prototype,"gridTemplateColumns",void 0),tb([(0,n.Cb)()],tv.prototype,"justifyItems",void 0),tb([(0,n.Cb)()],tv.prototype,"alignItems",void 0),tb([(0,n.Cb)()],tv.prototype,"justifyContent",void 0),tb([(0,n.Cb)()],tv.prototype,"alignContent",void 0),tb([(0,n.Cb)()],tv.prototype,"columnGap",void 0),tb([(0,n.Cb)()],tv.prototype,"rowGap",void 0),tb([(0,n.Cb)()],tv.prototype,"gap",void 0),tb([(0,n.Cb)()],tv.prototype,"padding",void 0),tb([(0,n.Cb)()],tv.prototype,"margin",void 0),tv=tb([(0,g.M)("wui-grid")],tv),r(80843),r(40511);var tC=(0,h.iv)` + button { + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + cursor: pointer; + width: 104px; + row-gap: ${({spacing:e})=>e["2"]}; + padding: ${({spacing:e})=>e["3"]} ${({spacing:e})=>e["0"]}; + background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; + border-radius: clamp(0px, ${({borderRadius:e})=>e["4"]}, 20px); + transition: + color ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-1"]}, + background-color ${({durations:e})=>e.lg} + ${({easings:e})=>e["ease-out-power-1"]}, + border-radius ${({durations:e})=>e.lg} + ${({easings:e})=>e["ease-out-power-1"]}; + will-change: background-color, color, border-radius; + outline: none; + border: none; + } + + button > wui-flex > wui-text { + color: ${({tokens:e})=>e.theme.textPrimary}; + max-width: 86px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + justify-content: center; + } + + button > wui-flex > wui-text.certified { + max-width: 66px; + } + + @media (hover: hover) and (pointer: fine) { + button:hover:enabled { + background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; + } + } + + button:disabled > wui-flex > wui-text { + color: ${({tokens:e})=>e.core.glass010}; + } + + [data-selected='true'] { + background-color: ${({colors:e})=>e.accent020}; + } + + @media (hover: hover) and (pointer: fine) { + [data-selected='true']:hover:enabled { + background-color: ${({colors:e})=>e.accent010}; + } + } + + [data-selected='true']:active:enabled { + background-color: ${({colors:e})=>e.accent010}; + } + + @media (max-width: 350px) { + button { + width: 100%; + } + } +`,tE=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let tx=class extends i.oi{constructor(){super(),this.observer=new IntersectionObserver(()=>void 0),this.visible=!1,this.imageSrc=void 0,this.imageLoading=!1,this.isImpressed=!1,this.explorerId="",this.walletQuery="",this.certified=!1,this.displayIndex=0,this.wallet=void 0,this.observer=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting?(this.visible=!0,this.fetchImageSrc(),this.sendImpressionEvent()):this.visible=!1})},{threshold:.01})}firstUpdated(){this.observer.observe(this)}disconnectedCallback(){this.observer.disconnect()}render(){let e=this.wallet?.badge_type==="certified";return(0,i.dy)` + + `}imageTemplate(){return(this.visible||this.imageSrc)&&!this.imageLoading?(0,i.dy)` + + + `:this.shimmerTemplate()}shimmerTemplate(){return(0,i.dy)``}async fetchImageSrc(){this.wallet&&(this.imageSrc=c.f.getWalletImage(this.wallet),this.imageSrc||(this.imageLoading=!0,this.imageSrc=await c.f.fetchWalletImage(this.wallet.image_id),this.imageLoading=!1))}sendImpressionEvent(){this.wallet&&!this.isImpressed&&(this.isImpressed=!0,U.X.sendWalletImpressionEvent({name:this.wallet.name,walletRank:this.wallet.order,explorerId:this.explorerId,view:J.RouterController.state.view,query:this.walletQuery,certified:this.certified,displayIndex:this.displayIndex}))}};tx.styles=tC,tE([(0,n.SB)()],tx.prototype,"visible",void 0),tE([(0,n.SB)()],tx.prototype,"imageSrc",void 0),tE([(0,n.SB)()],tx.prototype,"imageLoading",void 0),tE([(0,n.SB)()],tx.prototype,"isImpressed",void 0),tE([(0,n.Cb)()],tx.prototype,"explorerId",void 0),tE([(0,n.Cb)()],tx.prototype,"walletQuery",void 0),tE([(0,n.Cb)()],tx.prototype,"certified",void 0),tE([(0,n.Cb)()],tx.prototype,"displayIndex",void 0),tE([(0,n.Cb)({type:Object})],tx.prototype,"wallet",void 0),tx=tE([(0,h.Mo)("w3m-all-wallets-list-item")],tx);var t_=(0,h.iv)` + wui-grid { + max-height: clamp(360px, 400px, 80vh); + overflow: scroll; + scrollbar-width: none; + grid-auto-rows: min-content; + grid-template-columns: repeat(auto-fill, 104px); + } + + :host([data-mobile-fullscreen='true']) wui-grid { + max-height: none; + } + + @media (max-width: 350px) { + wui-grid { + grid-template-columns: repeat(2, 1fr); + } + } + + wui-grid[data-scroll='false'] { + overflow: hidden; + } + + wui-grid::-webkit-scrollbar { + display: none; + } + + w3m-all-wallets-list-item { + opacity: 0; + animation-duration: ${({durations:e})=>e.xl}; + animation-timing-function: ${({easings:e})=>e["ease-inout-power-2"]}; + animation-name: fade-in; + animation-fill-mode: forwards; + } + + @keyframes fade-in { + from { + opacity: 0; + } + to { + opacity: 1; + } + } + + wui-loading-spinner { + padding-top: ${({spacing:e})=>e["4"]}; + padding-bottom: ${({spacing:e})=>e["4"]}; + justify-content: center; + grid-column: 1 / span 4; + } +`,tA=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let tS="local-paginator",tI=class extends i.oi{constructor(){super(),this.unsubscribe=[],this.paginationObserver=void 0,this.loading=!th.ApiController.state.wallets.length,this.wallets=th.ApiController.state.wallets,this.mobileFullScreen=s.OptionsController.state.enableMobileFullScreen,this.unsubscribe.push(th.ApiController.subscribeKey("wallets",e=>this.wallets=e))}firstUpdated(){this.initialFetch(),this.createPaginationObserver()}disconnectedCallback(){this.unsubscribe.forEach(e=>e()),this.paginationObserver?.disconnect()}render(){return this.mobileFullScreen&&this.setAttribute("data-mobile-fullscreen","true"),(0,i.dy)` + + ${this.loading?this.shimmerTemplate(16):this.walletsTemplate()} + ${this.paginationLoaderTemplate()} + + `}async initialFetch(){this.loading=!0;let e=this.shadowRoot?.querySelector("wui-grid");e&&(await th.ApiController.fetchWalletsByPage({page:1}),await e.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.loading=!1,e.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"}))}shimmerTemplate(e,t){return[...Array(e)].map(()=>(0,i.dy)` + + `)}walletsTemplate(){return tp.J.getWalletConnectWallets(this.wallets).map((e,t)=>(0,i.dy)` + this.onConnectWallet(e)} + .wallet=${e} + explorerId=${e.id} + certified=${"certified"===this.badge} + displayIndex=${t} + > + `)}paginationLoaderTemplate(){let{wallets:e,recommended:t,featured:r,count:i,mobileFilteredOutWalletsLength:n}=th.ApiController.state,o=window.innerWidth<352?3:4,s=e.length+t.length,a=Math.ceil(s/o)*o-s+o;return(a-=e.length?r.length%o:0,0===i&&r.length>0)?null:0===i||[...r,...e,...t].length{if(e?.isIntersecting&&!this.loading){let{page:e,count:t,wallets:r}=th.ApiController.state;r.length=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let tR=class extends i.oi{constructor(){super(...arguments),this.prevQuery="",this.prevBadge=void 0,this.loading=!0,this.mobileFullScreen=s.OptionsController.state.enableMobileFullScreen,this.query=""}render(){return this.mobileFullScreen&&this.setAttribute("data-mobile-fullscreen","true"),this.onSearch(),this.loading?(0,i.dy)``:this.walletsTemplate()}async onSearch(){(this.query.trim()!==this.prevQuery.trim()||this.badge!==this.prevBadge)&&(this.prevQuery=this.query,this.prevBadge=this.badge,this.loading=!0,await th.ApiController.searchWallet({search:this.query,badge:this.badge}),this.loading=!1)}walletsTemplate(){let{search:e}=th.ApiController.state,t=tp.J.markWalletsAsInstalled(e),r=tp.J.filterWalletsByWcSupport(t);return r.length?(0,i.dy)` + + ${r.map((e,t)=>(0,i.dy)` + this.onConnectWallet(e)} + .wallet=${e} + data-testid="wallet-search-item-${e.id}" + explorerId=${e.id} + certified=${"certified"===this.badge} + walletQuery=${this.query} + displayIndex=${t} + > + `)} + + `:(0,i.dy)` + + + + No Wallet found + + + `}onConnectWallet(e){Z.ConnectorController.selectWalletConnector(e)}};tR.styles=tN,tk([(0,n.SB)()],tR.prototype,"loading",void 0),tk([(0,n.SB)()],tR.prototype,"mobileFullScreen",void 0),tk([(0,n.Cb)()],tR.prototype,"query",void 0),tk([(0,n.Cb)()],tR.prototype,"badge",void 0),tR=tk([(0,h.Mo)("w3m-all-wallets-search")],tR);var tO=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let tT=class extends i.oi{constructor(){super(...arguments),this.search="",this.badge=void 0,this.onDebouncedSearch=d.j.debounce(e=>{this.search=e})}render(){let e=this.search.length>=2;return(0,i.dy)` + + + + ${this.qrButtonTemplate()} + + ${e||this.badge?(0,i.dy)``:(0,i.dy)``} + `}onInputChange(e){this.onDebouncedSearch(e.detail)}onCertifiedSwitchChange(e){e.detail?(this.badge="certified",Y.SnackController.showSvg("Only WalletConnect certified",{icon:"walletConnectBrown",iconColor:"accent-100"})):this.badge=void 0}qrButtonTemplate(){return d.j.isMobile()?(0,i.dy)` + + `:null}onWalletConnectQr(){J.RouterController.push("ConnectingWalletConnect")}};tO([(0,n.SB)()],tT.prototype,"search",void 0),tO([(0,n.SB)()],tT.prototype,"badge",void 0),tT=tO([(0,h.Mo)("w3m-all-wallets-view")],tT);var tP=r(704),t$=r(81341),tD=(0,m.iv)` + button { + display: flex; + gap: ${({spacing:e})=>e[1]}; + padding: ${({spacing:e})=>e[4]}; + width: 100%; + background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; + border-radius: ${({borderRadius:e})=>e[4]}; + justify-content: center; + align-items: center; + } + + :host([data-size='sm']) button { + padding: ${({spacing:e})=>e[2]}; + border-radius: ${({borderRadius:e})=>e[2]}; + } + + :host([data-size='md']) button { + padding: ${({spacing:e})=>e[3]}; + border-radius: ${({borderRadius:e})=>e[3]}; + } + + button:hover { + background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; + } + + button:disabled { + opacity: 0.5; + } +`,tU=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let tL=class extends i.oi{constructor(){super(...arguments),this.text="",this.disabled=!1,this.size="lg",this.icon="copy",this.tabIdx=void 0}render(){this.dataset.size=this.size;let e=`${this.size}-regular`;return(0,i.dy)` + + `}};tL.styles=[p.ET,p.ZM,tD],tU([(0,n.Cb)()],tL.prototype,"text",void 0),tU([(0,n.Cb)({type:Boolean})],tL.prototype,"disabled",void 0),tU([(0,n.Cb)()],tL.prototype,"size",void 0),tU([(0,n.Cb)()],tL.prototype,"icon",void 0),tU([(0,n.Cb)()],tL.prototype,"tabIdx",void 0),tL=tU([(0,g.M)("wui-list-button")],tL),r(63957);var tM=r(88578),tB=r(72723);r(7861);var tj=r(65653),tF=(0,h.iv)` + wui-separator { + margin: ${({spacing:e})=>e["3"]} calc(${({spacing:e})=>e["3"]} * -1); + width: calc(100% + ${({spacing:e})=>e["3"]} * 2); + } + + wui-email-input { + width: 100%; + } + + form { + width: 100%; + display: block; + position: relative; + } + + wui-icon-link, + wui-loading-spinner { + position: absolute; + top: 50%; + transform: translateY(-50%); + } + + wui-icon-link { + right: ${({spacing:e})=>e["2"]}; + } + + wui-loading-spinner { + right: ${({spacing:e})=>e["3"]}; + } + + wui-text { + margin: ${({spacing:e})=>e["2"]} ${({spacing:e})=>e["3"]} + ${({spacing:e})=>e["0"]} ${({spacing:e})=>e["3"]}; + } +`,tW=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let tz=class extends i.oi{constructor(){super(),this.unsubscribe=[],this.formRef=(0,tr.V)(),this.email="",this.loading=!1,this.error="",this.remoteFeatures=s.OptionsController.state.remoteFeatures,this.hasExceededUsageLimit=th.ApiController.state.plan.hasExceededUsageLimit,this.unsubscribe.push(s.OptionsController.subscribeKey("remoteFeatures",e=>{this.remoteFeatures=e}),th.ApiController.subscribeKey("plan",e=>this.hasExceededUsageLimit=e.hasExceededUsageLimit))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}firstUpdated(){this.formRef.value?.addEventListener("keydown",e=>{"Enter"===e.key&&this.onSubmitEmail(e)})}render(){let e=X.ConnectionController.hasAnyConnection(K.b.CONNECTOR_ID.AUTH);return(0,i.dy)` +
+ + + + ${this.submitButtonTemplate()}${this.loadingTemplate()} + +
+ ${this.templateError()} + `}submitButtonTemplate(){return!this.loading&&this.email.length>3?(0,i.dy)` + + + `:null}loadingTemplate(){return this.loading?(0,i.dy)``:null}templateError(){return this.error?(0,i.dy)`${this.error}`:null}onEmailInputChange(e){this.email=e.detail.trim(),this.error=""}async onSubmitEmail(e){if(!eT.g.isValidEmail(this.email)){tB.AlertController.open({displayMessage:tj.j.ALERT_WARNINGS.INVALID_EMAIL.displayMessage},"warning");return}if(!K.b.AUTH_CONNECTOR_SUPPORTED_CHAINS.find(e=>e===a.R.state.activeChain)){let e=a.R.getFirstCaipNetworkSupportsAuthConnector();if(e){J.RouterController.push("SwitchNetwork",{network:e});return}}try{if(this.loading)return;this.loading=!0,e.preventDefault();let t=Z.ConnectorController.getAuthConnector();if(!t)throw Error("w3m-email-login-widget: Auth connector not found");let{action:r}=await t.provider.connectEmail({email:this.email});if(U.X.sendEvent({type:"track",event:"EMAIL_SUBMITTED"}),"VERIFY_OTP"===r)U.X.sendEvent({type:"track",event:"EMAIL_VERIFICATION_CODE_SENT"}),J.RouterController.push("EmailVerifyOtp",{email:this.email});else if("VERIFY_DEVICE"===r)J.RouterController.push("EmailVerifyDevice",{email:this.email});else if("CONNECT"===r){let e=this.remoteFeatures?.multiWallet;await X.ConnectionController.connectExternal(t,a.R.state.activeChain),e?(J.RouterController.replace("ProfileWallets"),Y.SnackController.showSuccess("New Wallet Added")):J.RouterController.replace("Account")}}catch(t){let e=d.j.parseError(t);e?.includes("Invalid email")?this.error="Invalid email. Try again.":Y.SnackController.showError(t)}finally{this.loading=!1}}onFocusEvent(){U.X.sendEvent({type:"track",event:"EMAIL_LOGIN_SELECTED"})}};tz.styles=tF,tW([(0,n.Cb)()],tz.prototype,"tabIdx",void 0),tW([(0,n.SB)()],tz.prototype,"email",void 0),tW([(0,n.SB)()],tz.prototype,"loading",void 0),tW([(0,n.SB)()],tz.prototype,"error",void 0),tW([(0,n.SB)()],tz.prototype,"remoteFeatures",void 0),tW([(0,n.SB)()],tz.prototype,"hasExceededUsageLimit",void 0),tz=tW([(0,h.Mo)("w3m-email-login-widget")],tz),r(34041);var tH=r(5344);r(15834),r(84793);var tq=(0,m.iv)` + :host { + display: block; + width: 100%; + } + + button { + width: 100%; + height: 52px; + display: flex; + align-items: center; + justify-content: center; + background: ${({tokens:e})=>e.theme.foregroundPrimary}; + border-radius: ${({borderRadius:e})=>e[4]}; + } + + @media (hover: hover) { + button:hover:enabled { + background: ${({tokens:e})=>e.theme.foregroundSecondary}; + } + } + + button:disabled { + cursor: not-allowed; + opacity: 0.5; + } +`,tV=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let tK=class extends i.oi{constructor(){super(...arguments),this.logo="google",this.disabled=!1,this.tabIdx=void 0}render(){return(0,i.dy)` + + `}};tK.styles=[p.ET,p.ZM,tq],tV([(0,n.Cb)()],tK.prototype,"logo",void 0),tV([(0,n.Cb)({type:Boolean})],tK.prototype,"disabled",void 0),tV([(0,n.Cb)()],tK.prototype,"tabIdx",void 0),tK=tV([(0,g.M)("wui-logo-select")],tK);var tZ=r(55),tG=(0,h.iv)` + wui-separator { + margin: ${({spacing:e})=>e["3"]} calc(${({spacing:e})=>e["3"]} * -1) + ${({spacing:e})=>e["3"]} calc(${({spacing:e})=>e["3"]} * -1); + width: calc(100% + ${({spacing:e})=>e["3"]} * 2); + } +`,tY=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let tJ=class extends i.oi{constructor(){super(),this.unsubscribe=[],this.walletGuide="get-started",this.tabIdx=void 0,this.connectors=Z.ConnectorController.state.connectors,this.remoteFeatures=s.OptionsController.state.remoteFeatures,this.authConnector=this.connectors.find(e=>"AUTH"===e.type),this.isPwaLoading=!1,this.hasExceededUsageLimit=th.ApiController.state.plan.hasExceededUsageLimit,this.unsubscribe.push(Z.ConnectorController.subscribeKey("connectors",e=>{this.connectors=e,this.authConnector=this.connectors.find(e=>"AUTH"===e.type)}),s.OptionsController.subscribeKey("remoteFeatures",e=>this.remoteFeatures=e),th.ApiController.subscribeKey("plan",e=>this.hasExceededUsageLimit=e.hasExceededUsageLimit))}connectedCallback(){super.connectedCallback(),this.handlePwaFrameLoad()}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return(0,i.dy)` + + ${this.topViewTemplate()}${this.bottomViewTemplate()} + + `}topViewTemplate(){let e="explore"===this.walletGuide,t=this.remoteFeatures?.socials;return!t&&e?(t=G.bq.DEFAULT_SOCIALS,this.renderTopViewContent(t)):t?this.renderTopViewContent(t):null}renderTopViewContent(e){return 2===e.length?(0,i.dy)` + ${e.slice(0,2).map(e=>(0,i.dy)`{this.onSocialClick(e)}} + logo=${e} + tabIdx=${(0,o.o)(this.tabIdx)} + ?disabled=${this.isPwaLoading||this.hasConnection()} + >`)} + `:(0,i.dy)` {this.onSocialClick(e[0])}} + size="lg" + icon=${(0,o.o)(e[0])} + text=${`Continue with ${h.Hg.capitalize(e[0])}`} + tabIdx=${(0,o.o)(this.tabIdx)} + ?disabled=${this.isPwaLoading||this.hasConnection()} + >`}bottomViewTemplate(){let e=this.remoteFeatures?.socials,t="explore"===this.walletGuide;return(this.authConnector&&e&&0!==e.length||!t||(e=G.bq.DEFAULT_SOCIALS),!e||e.length<=2)?null:e&&e.length>6?(0,i.dy)` + ${e.slice(1,5).map(e=>(0,i.dy)`{this.onSocialClick(e)}} + logo=${e} + tabIdx=${(0,o.o)(this.tabIdx)} + ?focusable=${void 0!==this.tabIdx&&this.tabIdx>=0} + ?disabled=${this.isPwaLoading||this.hasConnection()} + >`)} + + `:e?(0,i.dy)` + ${e.slice(1,e.length).map(e=>(0,i.dy)`{this.onSocialClick(e)}} + logo=${e} + tabIdx=${(0,o.o)(this.tabIdx)} + ?focusable=${void 0!==this.tabIdx&&this.tabIdx>=0} + ?disabled=${this.isPwaLoading||this.hasConnection()} + >`)} + `:null}onMoreSocialsClick(){J.RouterController.push("ConnectSocials")}async onSocialClick(e){if(this.hasExceededUsageLimit){J.RouterController.push("UsageExceeded");return}if(!K.b.AUTH_CONNECTOR_SUPPORTED_CHAINS.find(e=>e===a.R.state.activeChain)){let e=a.R.getFirstCaipNetworkSupportsAuthConnector();if(e){J.RouterController.push("SwitchNetwork",{network:e});return}}e&&await (0,tH.y0)(e)}async handlePwaFrameLoad(){if(d.j.isPWA()){this.isPwaLoading=!0;try{this.authConnector?.provider instanceof tZ.S&&await this.authConnector.provider.init()}catch(e){tB.AlertController.open({displayMessage:"Error loading embedded wallet in PWA",debugMessage:e.message},"error")}finally{this.isPwaLoading=!1}}}hasConnection(){return X.ConnectionController.hasAnyConnection(K.b.CONNECTOR_ID.AUTH)}};tJ.styles=tG,tY([(0,n.Cb)()],tJ.prototype,"walletGuide",void 0),tY([(0,n.Cb)()],tJ.prototype,"tabIdx",void 0),tY([(0,n.SB)()],tJ.prototype,"connectors",void 0),tY([(0,n.SB)()],tJ.prototype,"remoteFeatures",void 0),tY([(0,n.SB)()],tJ.prototype,"authConnector",void 0),tY([(0,n.SB)()],tJ.prototype,"isPwaLoading",void 0),tY([(0,n.SB)()],tJ.prototype,"hasExceededUsageLimit",void 0),tJ=tY([(0,h.Mo)("w3m-social-login-widget")],tJ),r(97928);var tX=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let tQ=class extends i.oi{constructor(){super(),this.unsubscribe=[],this.tabIdx=void 0,this.connectors=Z.ConnectorController.state.connectors,this.count=th.ApiController.state.count,this.filteredCount=th.ApiController.state.filteredWallets.length,this.isFetchingRecommendedWallets=th.ApiController.state.isFetchingRecommendedWallets,this.unsubscribe.push(Z.ConnectorController.subscribeKey("connectors",e=>this.connectors=e),th.ApiController.subscribeKey("count",e=>this.count=e),th.ApiController.subscribeKey("filteredWallets",e=>this.filteredCount=e.length),th.ApiController.subscribeKey("isFetchingRecommendedWallets",e=>this.isFetchingRecommendedWallets=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){let e=this.connectors.find(e=>"walletConnect"===e.id),{allWallets:t}=s.OptionsController.state;if(!e||"HIDE"===t||"ONLY_MOBILE"===t&&!d.j.isMobile())return null;let r=th.ApiController.state.featured.length,n=this.count+r,a=this.filteredCount>0?this.filteredCount:n<10?n:10*Math.floor(n/10),l=`${a}`;this.filteredCount>0?l=`${this.filteredCount}`:a + `}onAllWallets(){U.X.sendEvent({type:"track",event:"CLICK_ALL_WALLETS"}),J.RouterController.push("AllWallets",{redirectView:J.RouterController.state.data?.redirectView})}};tX([(0,n.Cb)()],tQ.prototype,"tabIdx",void 0),tX([(0,n.SB)()],tQ.prototype,"connectors",void 0),tX([(0,n.SB)()],tQ.prototype,"count",void 0),tX([(0,n.SB)()],tQ.prototype,"filteredCount",void 0),tX([(0,n.SB)()],tQ.prototype,"isFetchingRecommendedWallets",void 0),tQ=tX([(0,h.Mo)("w3m-all-wallets-widget")],tQ);var t0=(0,h.iv)` + :host { + margin-top: ${({spacing:e})=>e["1"]}; + } + wui-separator { + margin: ${({spacing:e})=>e["3"]} calc(${({spacing:e})=>e["3"]} * -1) + ${({spacing:e})=>e["2"]} calc(${({spacing:e})=>e["3"]} * -1); + width: calc(100% + ${({spacing:e})=>e["3"]} * 2); + } +`,t1=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let t2=class extends i.oi{constructor(){super(),this.unsubscribe=[],this.explorerWallets=th.ApiController.state.explorerWallets,this.connections=X.ConnectionController.state.connections,this.connectorImages=l.W.state.connectorImages,this.loadingTelegram=!1,this.unsubscribe.push(X.ConnectionController.subscribeKey("connections",e=>this.connections=e),l.W.subscribeKey("connectorImages",e=>this.connectorImages=e),th.ApiController.subscribeKey("explorerFilteredWallets",e=>{this.explorerWallets=e?.length?e:th.ApiController.state.explorerWallets}),th.ApiController.subscribeKey("explorerWallets",e=>{this.explorerWallets?.length||(this.explorerWallets=e)})),d.j.isTelegram()&&d.j.isIos()&&(this.loadingTelegram=!X.ConnectionController.state.wcUri,this.unsubscribe.push(X.ConnectionController.subscribeKey("wcUri",e=>this.loadingTelegram=!e)))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return(0,i.dy)` + ${this.connectorListTemplate()} + `}connectorListTemplate(){return e_.C.connectorList().map((e,t)=>"connector"===e.kind?this.renderConnector(e,t):this.renderWallet(e,t))}getConnectorNamespaces(e){return"walletConnect"===e.subtype?[]:"multiChain"===e.subtype?e.connector.connectors?.map(e=>e.chain)||[]:[e.connector.chain]}renderConnector(e,t){let r,n;let s=e.connector,a=c.f.getConnectorImage(s)||this.connectorImages[s?.imageId??""],l=(this.connections.get(s.chain)??[]).some(e=>e1.g.isLowerCaseMatch(e.connectorId,s.id));"walletConnect"===e.subtype?(r="qr code",n="accent"):"injected"===e.subtype||"announced"===e.subtype?(r=l?"connected":"installed",n=l?"info":"success"):(r=void 0,n=void 0);let d=X.ConnectionController.hasAnyConnection(K.b.CONNECTOR_ID.WALLET_CONNECT),u=("walletConnect"===e.subtype||"external"===e.subtype)&&d;return(0,i.dy)` + this.onClickConnector(e)} + tabIdx=${(0,o.o)(this.tabIdx)} + ?disabled=${u} + rdnsId=${(0,o.o)(s.explorerWallet?.rdns||void 0)} + walletRank=${(0,o.o)(s.explorerWallet?.order)} + .namespaces=${this.getConnectorNamespaces(e)} + > + + `}onClickConnector(e){let t=J.RouterController.state.data?.redirectView;if("walletConnect"===e.subtype){Z.ConnectorController.setActiveConnector(e.connector),d.j.isMobile()?J.RouterController.push("AllWallets"):J.RouterController.push("ConnectingWalletConnect",{redirectView:t});return}if("multiChain"===e.subtype){Z.ConnectorController.setActiveConnector(e.connector),J.RouterController.push("ConnectingMultiChain",{redirectView:t});return}if("injected"===e.subtype){Z.ConnectorController.setActiveConnector(e.connector),J.RouterController.push("ConnectingExternal",{connector:e.connector,redirectView:t,wallet:e.connector.explorerWallet});return}if("announced"===e.subtype){if("walletConnect"===e.connector.id){d.j.isMobile()?J.RouterController.push("AllWallets"):J.RouterController.push("ConnectingWalletConnect",{redirectView:t});return}J.RouterController.push("ConnectingExternal",{connector:e.connector,redirectView:t,wallet:e.connector.explorerWallet});return}J.RouterController.push("ConnectingExternal",{connector:e.connector,redirectView:t})}renderWallet(e,t){let r=e.wallet,n=c.f.getWalletImage(r),s=X.ConnectionController.hasAnyConnection(K.b.CONNECTOR_ID.WALLET_CONNECT),a=this.loadingTelegram,l="recent"===e.subtype?"recent":void 0,d="recent"===e.subtype?"info":void 0;return(0,i.dy)` + this.onClickWallet(e)} + size="sm" + data-testid=${`wallet-selector-${r.id}`} + tabIdx=${(0,o.o)(this.tabIdx)} + ?loading=${a} + ?disabled=${s} + rdnsId=${(0,o.o)(r.rdns||void 0)} + walletRank=${(0,o.o)(r.order)} + tagLabel=${(0,o.o)(l)} + .tagVariant=${d} + > + + `}onClickWallet(e){let t=J.RouterController.state.data?.redirectView,r=a.R.state.activeChain;if("featured"===e.subtype){Z.ConnectorController.selectWalletConnector(e.wallet);return}if("recent"===e.subtype){if(this.loadingTelegram)return;Z.ConnectorController.selectWalletConnector(e.wallet);return}if("custom"===e.subtype){if(this.loadingTelegram)return;J.RouterController.push("ConnectingWalletConnect",{wallet:e.wallet,redirectView:t});return}if(this.loadingTelegram)return;let i=r?Z.ConnectorController.getConnector({id:e.wallet.id,namespace:r}):void 0;i?J.RouterController.push("ConnectingExternal",{connector:i,redirectView:t}):J.RouterController.push("ConnectingWalletConnect",{wallet:e.wallet,redirectView:t})}};t2.styles=t0,t1([(0,n.Cb)({type:Number})],t2.prototype,"tabIdx",void 0),t1([(0,n.SB)()],t2.prototype,"explorerWallets",void 0),t1([(0,n.SB)()],t2.prototype,"connections",void 0),t1([(0,n.SB)()],t2.prototype,"connectorImages",void 0),t1([(0,n.SB)()],t2.prototype,"loadingTelegram",void 0),t2=t1([(0,h.Mo)("w3m-connector-list")],t2);var t3=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let t5=class extends i.oi{constructor(){super(...arguments),this.tabIdx=void 0}render(){return(0,i.dy)` + + + + + `}};t3([(0,n.Cb)()],t5.prototype,"tabIdx",void 0),t5=t3([(0,h.Mo)("w3m-wallet-login-list")],t5);var t4=(0,h.iv)` + :host { + --connect-scroll--top-opacity: 0; + --connect-scroll--bottom-opacity: 0; + --connect-mask-image: none; + } + + .connect { + max-height: clamp(360px, 470px, 80vh); + scrollbar-width: none; + overflow-y: scroll; + overflow-x: hidden; + transition: opacity ${({durations:e})=>e.lg} + ${({easings:e})=>e["ease-out-power-2"]}; + will-change: opacity; + mask-image: var(--connect-mask-image); + } + + .guide { + transition: opacity ${({durations:e})=>e.lg} + ${({easings:e})=>e["ease-out-power-2"]}; + will-change: opacity; + } + + .connect::-webkit-scrollbar { + display: none; + } + + .all-wallets { + flex-flow: column; + } + + .connect.disabled, + .guide.disabled { + opacity: 0.3; + pointer-events: none; + user-select: none; + } + + wui-separator { + margin: ${({spacing:e})=>e["3"]} calc(${({spacing:e})=>e["3"]} * -1); + width: calc(100% + ${({spacing:e})=>e["3"]} * 2); + } +`,t6=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let t8=class extends i.oi{constructor(){super(),this.unsubscribe=[],this.connectors=Z.ConnectorController.state.connectors,this.authConnector=this.connectors.find(e=>"AUTH"===e.type),this.features=s.OptionsController.state.features,this.remoteFeatures=s.OptionsController.state.remoteFeatures,this.enableWallets=s.OptionsController.state.enableWallets,this.noAdapters=a.R.state.noAdapters,this.walletGuide="get-started",this.checked=t$.M.state.isLegalCheckboxChecked,this.isEmailEnabled=this.remoteFeatures?.email&&!a.R.state.noAdapters,this.isSocialEnabled=this.remoteFeatures?.socials&&this.remoteFeatures.socials.length>0&&!a.R.state.noAdapters,this.isAuthEnabled=this.checkIfAuthEnabled(this.connectors),this.unsubscribe.push(Z.ConnectorController.subscribeKey("connectors",e=>{this.connectors=e,this.authConnector=this.connectors.find(e=>"AUTH"===e.type),this.isAuthEnabled=this.checkIfAuthEnabled(this.connectors)}),s.OptionsController.subscribeKey("features",e=>{this.features=e}),s.OptionsController.subscribeKey("remoteFeatures",e=>{this.remoteFeatures=e,this.setEmailAndSocialEnableCheck(this.noAdapters,this.remoteFeatures)}),s.OptionsController.subscribeKey("enableWallets",e=>this.enableWallets=e),a.R.subscribeKey("noAdapters",e=>this.setEmailAndSocialEnableCheck(e,this.remoteFeatures)),t$.M.subscribeKey("isLegalCheckboxChecked",e=>this.checked=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e()),this.resizeObserver?.disconnect();let e=this.shadowRoot?.querySelector(".connect");e?.removeEventListener("scroll",this.handleConnectListScroll.bind(this))}firstUpdated(){let e=this.shadowRoot?.querySelector(".connect");e&&(requestAnimationFrame(this.handleConnectListScroll.bind(this)),e?.addEventListener("scroll",this.handleConnectListScroll.bind(this)),this.resizeObserver=new ResizeObserver(()=>{this.handleConnectListScroll()}),this.resizeObserver?.observe(e),this.handleConnectListScroll())}render(){let{termsConditionsUrl:e,privacyPolicyUrl:t}=s.OptionsController.state,r=s.OptionsController.state.features?.legalCheckbox,n=!!(e||t)&&!!r&&"get-started"===this.walletGuide&&!this.checked,o=s.OptionsController.state.enableWalletGuide,a=this.enableWallets,l=this.isSocialEnabled||this.authConnector;return(0,i.dy)` + + ${this.legalCheckboxTemplate()} + + + ${this.renderConnectMethod(n?-1:void 0)} + + + ${this.reownBrandingTemplate()} + + `}reownBrandingTemplate(){return eT.g.hasFooter()||!this.remoteFeatures?.reownBranding?null:(0,i.dy)``}setEmailAndSocialEnableCheck(e,t){this.isEmailEnabled=t?.email&&!e,this.isSocialEnabled=t?.socials&&t.socials.length>0&&!e,this.remoteFeatures=t,this.noAdapters=e}checkIfAuthEnabled(e){let t=e.filter(e=>e.type===tM.b.CONNECTOR_TYPE_AUTH).map(e=>e.chain);return K.b.AUTH_CONNECTOR_SUPPORTED_CHAINS.some(e=>t.includes(e))}renderConnectMethod(e){let t=tp.J.getConnectOrderMethod(this.features,this.connectors);return(0,i.dy)`${t.map((t,r)=>{switch(t){case"email":return(0,i.dy)`${this.emailTemplate(e)} ${this.separatorTemplate(r,"email")}`;case"social":return(0,i.dy)`${this.socialListTemplate(e)} + ${this.separatorTemplate(r,"social")}`;case"wallet":return(0,i.dy)`${this.walletListTemplate(e)} + ${this.separatorTemplate(r,"wallet")}`;default:return null}})}`}checkMethodEnabled(e){switch(e){case"wallet":return this.enableWallets;case"social":return this.isSocialEnabled&&this.isAuthEnabled;case"email":return this.isEmailEnabled&&this.isAuthEnabled;default:return null}}checkIsThereNextMethod(e){let t=tp.J.getConnectOrderMethod(this.features,this.connectors)[e+1];return t?this.checkMethodEnabled(t)?t:this.checkIsThereNextMethod(e+1):void 0}separatorTemplate(e,t){let r=this.checkIsThereNextMethod(e),n="explore"===this.walletGuide;switch(t){case"wallet":return this.enableWallets&&r&&!n?(0,i.dy)``:null;case"email":return this.isAuthEnabled&&this.isEmailEnabled&&"social"!==r&&r?(0,i.dy)``:null;case"social":return this.isAuthEnabled&&this.isSocialEnabled&&"email"!==r&&r?(0,i.dy)``:null;default:return null}}emailTemplate(e){return this.isEmailEnabled&&this.isAuthEnabled?(0,i.dy)``:null}socialListTemplate(e){return this.isSocialEnabled&&this.isAuthEnabled?(0,i.dy)``:null}walletListTemplate(e){let t=this.enableWallets,r=this.features?.emailShowWallets===!1,n=this.features?.collapseWallets;return t?(d.j.isTelegram()&&(d.j.isSafari()||d.j.isIos())&&X.ConnectionController.connectWalletConnect().catch(e=>({})),"explore"===this.walletGuide)?null:this.isAuthEnabled&&(this.isEmailEnabled||this.isSocialEnabled)&&(r||n)?(0,i.dy)``:(0,i.dy)``:null}legalCheckboxTemplate(){return"explore"===this.walletGuide?null:(0,i.dy)``}handleConnectListScroll(){let e=this.shadowRoot?.querySelector(".connect");e&&(e.scrollHeight>470?(e.style.setProperty("--connect-mask-image",`linear-gradient( + to bottom, + rgba(0, 0, 0, calc(1 - var(--connect-scroll--top-opacity))) 0px, + rgba(200, 200, 200, calc(1 - var(--connect-scroll--top-opacity))) 1px, + black 100px, + black calc(100% - 100px), + rgba(155, 155, 155, calc(1 - var(--connect-scroll--bottom-opacity))) calc(100% - 1px), + rgba(0, 0, 0, calc(1 - var(--connect-scroll--bottom-opacity))) 100% + )`),e.style.setProperty("--connect-scroll--top-opacity",h.kj.interpolate([0,50],[0,1],e.scrollTop).toString()),e.style.setProperty("--connect-scroll--bottom-opacity",h.kj.interpolate([0,50],[0,1],e.scrollHeight-e.scrollTop-e.offsetHeight).toString())):(e.style.setProperty("--connect-mask-image","none"),e.style.setProperty("--connect-scroll--top-opacity","0"),e.style.setProperty("--connect-scroll--bottom-opacity","0")))}onContinueWalletClick(){J.RouterController.push("ConnectWallets")}};t8.styles=t4,t6([(0,tP.S)()],t8.prototype,"connectors",void 0),t6([(0,tP.S)()],t8.prototype,"authConnector",void 0),t6([(0,tP.S)()],t8.prototype,"features",void 0),t6([(0,tP.S)()],t8.prototype,"remoteFeatures",void 0),t6([(0,tP.S)()],t8.prototype,"enableWallets",void 0),t6([(0,tP.S)()],t8.prototype,"noAdapters",void 0),t6([(0,n.Cb)()],t8.prototype,"walletGuide",void 0),t6([(0,tP.S)()],t8.prototype,"checked",void 0),t6([(0,tP.S)()],t8.prototype,"isEmailEnabled",void 0),t6([(0,tP.S)()],t8.prototype,"isSocialEnabled",void 0),t6([(0,tP.S)()],t8.prototype,"isAuthEnabled",void 0),t8=t6([(0,h.Mo)("w3m-connect-view")],t8);var t9=r(42935),t7=r(59388),re=r(52005);r(51437),r(87302);var rt=(0,m.iv)` + wui-flex { + width: 100%; + height: 52px; + box-sizing: border-box; + background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; + border-radius: ${({borderRadius:e})=>e[5]}; + padding-left: ${({spacing:e})=>e[3]}; + padding-right: ${({spacing:e})=>e[3]}; + display: flex; + align-items: center; + justify-content: space-between; + gap: ${({spacing:e})=>e[6]}; + } + + wui-text { + color: ${({tokens:e})=>e.theme.textSecondary}; + } + + wui-icon { + width: 12px; + height: 12px; + } +`,rr=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let ri=class extends i.oi{constructor(){super(...arguments),this.disabled=!1,this.label="",this.buttonLabel=""}render(){return(0,i.dy)` + + ${this.label} + + ${this.buttonLabel} + + + + `}};ri.styles=[p.ET,p.ZM,rt],rr([(0,n.Cb)({type:Boolean})],ri.prototype,"disabled",void 0),rr([(0,n.Cb)()],ri.prototype,"label",void 0),rr([(0,n.Cb)()],ri.prototype,"buttonLabel",void 0),ri=rr([(0,g.M)("wui-cta-button")],ri);var rn=(0,h.iv)` + :host { + display: block; + padding: 0 ${({spacing:e})=>e["5"]} ${({spacing:e})=>e["5"]}; + } +`,ro=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let rs=class extends i.oi{constructor(){super(...arguments),this.wallet=void 0}render(){if(!this.wallet)return this.style.display="none",null;let{name:e,app_store:t,play_store:r,chrome_store:n,homepage:o}=this.wallet,s=d.j.isMobile(),a=d.j.isIos(),l=d.j.isAndroid(),c=[t,r,o,n].filter(Boolean).length>1,u=h.Hg.getTruncateString({string:e,charsStart:12,charsEnd:0,truncate:"end"});return c&&!s?(0,i.dy)` + J.RouterController.push("Downloads",{wallet:this.wallet})} + > + `:!c&&o?(0,i.dy)` + + `:t&&a?(0,i.dy)` + + `:r&&l?(0,i.dy)` + + `:(this.style.display="none",null)}onAppStore(){this.wallet?.app_store&&d.j.openHref(this.wallet.app_store,"_blank")}onPlayStore(){this.wallet?.play_store&&d.j.openHref(this.wallet.play_store,"_blank")}onHomePage(){this.wallet?.homepage&&d.j.openHref(this.wallet.homepage,"_blank")}};rs.styles=[rn],ro([(0,n.Cb)({type:Object})],rs.prototype,"wallet",void 0),rs=ro([(0,h.Mo)("w3m-mobile-download-links")],rs);var ra=(0,h.iv)` + @keyframes shake { + 0% { + transform: translateX(0); + } + 25% { + transform: translateX(3px); + } + 50% { + transform: translateX(-3px); + } + 75% { + transform: translateX(3px); + } + 100% { + transform: translateX(0); + } + } + + wui-flex:first-child:not(:only-child) { + position: relative; + } + + wui-wallet-image { + width: 56px; + height: 56px; + } + + wui-loading-thumbnail { + position: absolute; + } + + wui-icon-box { + position: absolute; + right: calc(${({spacing:e})=>e["1"]} * -1); + bottom: calc(${({spacing:e})=>e["1"]} * -1); + opacity: 0; + transform: scale(0.5); + transition-property: opacity, transform; + transition-duration: ${({durations:e})=>e.lg}; + transition-timing-function: ${({easings:e})=>e["ease-out-power-2"]}; + will-change: opacity, transform; + } + + wui-text[align='center'] { + width: 100%; + padding: 0px ${({spacing:e})=>e["4"]}; + } + + [data-error='true'] wui-icon-box { + opacity: 1; + transform: scale(1); + } + + [data-error='true'] > wui-flex:first-child { + animation: shake 250ms ${({easings:e})=>e["ease-out-power-2"]} both; + } + + [data-retry='false'] wui-link { + display: none; + } + + [data-retry='true'] wui-link { + display: block; + opacity: 1; + } + + w3m-mobile-download-links { + padding: 0px; + width: 100%; + } +`,rl=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};class rc extends i.oi{constructor(){super(),this.wallet=J.RouterController.state.data?.wallet,this.connector=J.RouterController.state.data?.connector,this.timeout=void 0,this.secondaryBtnIcon="refresh",this.onConnect=void 0,this.onRender=void 0,this.onAutoConnect=void 0,this.isWalletConnect=!0,this.unsubscribe=[],this.imageSrc=c.f.getConnectorImage(this.connector)??c.f.getWalletImage(this.wallet),this.name=this.wallet?.name??this.connector?.name??"Wallet",this.isRetrying=!1,this.uri=X.ConnectionController.state.wcUri,this.error=X.ConnectionController.state.wcError,this.ready=!1,this.showRetry=!1,this.label=void 0,this.secondaryBtnLabel="Try again",this.secondaryLabel="Accept connection request in the wallet",this.isLoading=!1,this.isMobile=!1,this.onRetry=void 0,this.unsubscribe.push(X.ConnectionController.subscribeKey("wcUri",e=>{this.uri=e,this.isRetrying&&this.onRetry&&(this.isRetrying=!1,this.onConnect?.())}),X.ConnectionController.subscribeKey("wcError",e=>this.error=e)),(d.j.isTelegram()||d.j.isSafari())&&d.j.isIos()&&X.ConnectionController.state.wcUri&&this.onConnect?.()}firstUpdated(){this.onAutoConnect?.(),this.showRetry=!this.onAutoConnect}disconnectedCallback(){this.unsubscribe.forEach(e=>e()),X.ConnectionController.setWcError(!1),clearTimeout(this.timeout)}render(){this.onRender?.(),this.onShowRetry();let e=this.error?"Connection can be declined if a previous request is still active":this.secondaryLabel,t="";return this.label?t=this.label:(t=`Continue in ${this.name}`,this.error&&(t="Connection declined")),(0,i.dy)` + + + + + ${this.error?null:this.loaderTemplate()} + + + + + + + ${t} + + ${e} + + + ${this.secondaryBtnLabel?(0,i.dy)` + + + ${this.secondaryBtnLabel} + + `:null} + + + ${this.isWalletConnect?(0,i.dy)` + + + Copy link + + + `:null} + + + + `}onShowRetry(){if(this.error&&!this.showRetry){this.showRetry=!0;let e=this.shadowRoot?.querySelector("wui-button");e?.animate([{opacity:0},{opacity:1}],{fill:"forwards",easing:"ease"})}}onTryAgain(){X.ConnectionController.setWcError(!1),this.onRetry?(this.isRetrying=!0,this.onRetry?.()):this.onConnect?.()}loaderTemplate(){let e=re.ThemeController.state.themeVariables["--w3m-border-radius-master"],t=e?parseInt(e.replace("px",""),10):4;return(0,i.dy)``}onCopyUri(){try{this.uri&&(d.j.copyToClopboard(this.uri),Y.SnackController.showSuccess("Link copied"))}catch{Y.SnackController.showError("Failed to copy")}}}rc.styles=ra,rl([(0,n.SB)()],rc.prototype,"isRetrying",void 0),rl([(0,n.SB)()],rc.prototype,"uri",void 0),rl([(0,n.SB)()],rc.prototype,"error",void 0),rl([(0,n.SB)()],rc.prototype,"ready",void 0),rl([(0,n.SB)()],rc.prototype,"showRetry",void 0),rl([(0,n.SB)()],rc.prototype,"label",void 0),rl([(0,n.SB)()],rc.prototype,"secondaryBtnLabel",void 0),rl([(0,n.SB)()],rc.prototype,"secondaryLabel",void 0),rl([(0,n.SB)()],rc.prototype,"isLoading",void 0),rl([(0,n.Cb)({type:Boolean})],rc.prototype,"isMobile",void 0),rl([(0,n.Cb)()],rc.prototype,"onRetry",void 0);let rd=class extends rc{constructor(){if(super(),this.externalViewUnsubscribe=[],this.connectionsByNamespace=X.ConnectionController.getConnections(this.connector?.chain),this.hasMultipleConnections=this.connectionsByNamespace.length>0,this.remoteFeatures=s.OptionsController.state.remoteFeatures,this.currentActiveConnectorId=Z.ConnectorController.state.activeConnectorIds[this.connector?.chain],!this.connector)throw Error("w3m-connecting-view: No connector provided");let e=this.connector?.chain;this.isAlreadyConnected(this.connector)&&(this.secondaryBtnLabel=void 0,this.label=`This account is already linked, change your account in ${this.connector.name}`,this.secondaryLabel=`To link a new account, open ${this.connector.name} and switch to the account you want to link`),U.X.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.connector.name??"Unknown",platform:"browser",displayIndex:this.wallet?.display_index,walletRank:this.wallet?.order,view:J.RouterController.state.view}}),this.onConnect=this.onConnectProxy.bind(this),this.onAutoConnect=this.onConnectProxy.bind(this),this.isWalletConnect=!1,this.externalViewUnsubscribe.push(Z.ConnectorController.subscribeKey("activeConnectorIds",t=>{let r=t[e],i=this.remoteFeatures?.multiWallet,{redirectView:n}=J.RouterController.state.data??{};r!==this.currentActiveConnectorId&&(this.hasMultipleConnections&&i?(J.RouterController.replace("ProfileWallets"),Y.SnackController.showSuccess("New Wallet Added")):n?J.RouterController.replace(n):u.I.close())}),X.ConnectionController.subscribeKey("connections",this.onConnectionsChange.bind(this)))}disconnectedCallback(){this.externalViewUnsubscribe.forEach(e=>e())}async onConnectProxy(){try{if(this.error=!1,this.connector){if(this.isAlreadyConnected(this.connector))return;this.connector.id===K.b.CONNECTOR_ID.COINBASE_SDK&&this.error||await X.ConnectionController.connectExternal(this.connector,this.connector.chain)}}catch(e){e instanceof t7.g&&e.originalName===t9.jD.PROVIDER_RPC_ERROR_NAME.USER_REJECTED_REQUEST?U.X.sendEvent({type:"track",event:"USER_REJECTED",properties:{message:e.message}}):U.X.sendEvent({type:"track",event:"CONNECT_ERROR",properties:{message:e?.message??"Unknown"}}),this.error=!0}}onConnectionsChange(e){if(this.connector?.chain&&e.get(this.connector.chain)&&this.isAlreadyConnected(this.connector)){let t=e.get(this.connector.chain)??[],r=this.remoteFeatures?.multiWallet;if(0===t.length)J.RouterController.replace("Connect");else{let e=eZ.f.getConnectionsByConnectorId(this.connectionsByNamespace,this.connector.id).flatMap(e=>e.accounts),i=eZ.f.getConnectionsByConnectorId(t,this.connector.id).flatMap(e=>e.accounts);0===i.length?this.hasMultipleConnections&&r?(J.RouterController.replace("ProfileWallets"),Y.SnackController.showSuccess("Wallet deleted")):u.I.close():!e.every(e=>i.some(t=>e1.g.isLowerCaseMatch(e.address,t.address)))&&r&&J.RouterController.replace("ProfileWallets")}}}isAlreadyConnected(e){return!!e&&this.connectionsByNamespace.some(t=>e1.g.isLowerCaseMatch(t.connectorId,e.id))}};rd=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s}([(0,h.Mo)("w3m-connecting-external-view")],rd);var ru=(0,i.iv)` + wui-flex, + wui-list-wallet { + width: 100%; + } +`,rh=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let rp=class extends i.oi{constructor(){super(),this.unsubscribe=[],this.activeConnector=Z.ConnectorController.state.activeConnector,this.unsubscribe.push(Z.ConnectorController.subscribeKey("activeConnector",e=>this.activeConnector=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return(0,i.dy)` + + + + + + + Select Chain for ${this.activeConnector?.name} + + Select which chain to connect to your multi chain wallet + + + ${this.networksTemplate()} + + + `}networksTemplate(){return this.activeConnector?.connectors?.map((e,t)=>e.name?i.dy` + this.onConnector(e)} + size="sm" + data-testid="wui-list-chain-${e.chain}" + rdnsId=${e.explorerWallet?.rdns} + > + `:null)}onConnector(e){let t=this.activeConnector?.connectors?.find(t=>t.chain===e.chain),r=J.RouterController.state.data?.redirectView;if(!t){Y.SnackController.showError("Failed to find connector");return}"walletConnect"===t.id?d.j.isMobile()?J.RouterController.push("AllWallets"):J.RouterController.push("ConnectingWalletConnect",{redirectView:r}):J.RouterController.push("ConnectingExternal",{connector:t,redirectView:r,wallet:this.activeConnector?.explorerWallet})}};rp.styles=ru,rh([(0,n.SB)()],rp.prototype,"activeConnector",void 0),rp=rh([(0,h.Mo)("w3m-connecting-multi-chain-view")],rp);var rf=r(31182),rg=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let rm=class extends i.oi{constructor(){super(...arguments),this.platformTabs=[],this.unsubscribe=[],this.platforms=[],this.onSelectPlatfrom=void 0}disconnectCallback(){this.unsubscribe.forEach(e=>e())}render(){let e=this.generateTabs();return(0,i.dy)` + + + + `}generateTabs(){let e=this.platforms.map(e=>"browser"===e?{label:"Browser",icon:"extension",platform:"browser"}:"mobile"===e?{label:"Mobile",icon:"mobile",platform:"mobile"}:"qrcode"===e?{label:"Mobile",icon:"mobile",platform:"qrcode"}:"web"===e?{label:"Webapp",icon:"browser",platform:"web"}:"desktop"===e?{label:"Desktop",icon:"desktop",platform:"desktop"}:{label:"Browser",icon:"extension",platform:"unsupported"});return this.platformTabs=e.map(({platform:e})=>e),e}onTabChange(e){let t=this.platformTabs[e];t&&this.onSelectPlatfrom?.(t)}};rg([(0,n.Cb)({type:Array})],rm.prototype,"platforms",void 0),rg([(0,n.Cb)()],rm.prototype,"onSelectPlatfrom",void 0),rm=rg([(0,h.Mo)("w3m-connecting-header")],rm);let ry=class extends rc{constructor(){if(super(),!this.wallet)throw Error("w3m-connecting-wc-browser: No wallet provided");this.onConnect=this.onConnectProxy.bind(this),this.onAutoConnect=this.onConnectProxy.bind(this),U.X.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"browser",displayIndex:this.wallet?.display_index,walletRank:this.wallet.order,view:J.RouterController.state.view}})}async onConnectProxy(){try{this.error=!1;let{connectors:e}=Z.ConnectorController.state,t=e.find(e=>"ANNOUNCED"===e.type&&e.info?.rdns===this.wallet?.rdns||"INJECTED"===e.type||e.name===this.wallet?.name);if(t)await X.ConnectionController.connectExternal(t,t.chain);else throw Error("w3m-connecting-wc-browser: No connector found");u.I.close()}catch(e){e instanceof t7.g&&e.originalName===t9.jD.PROVIDER_RPC_ERROR_NAME.USER_REJECTED_REQUEST?U.X.sendEvent({type:"track",event:"USER_REJECTED",properties:{message:e.message}}):U.X.sendEvent({type:"track",event:"CONNECT_ERROR",properties:{message:e?.message??"Unknown"}}),this.error=!0}}};ry=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s}([(0,h.Mo)("w3m-connecting-wc-browser")],ry);let rw=class extends rc{constructor(){if(super(),!this.wallet)throw Error("w3m-connecting-wc-desktop: No wallet provided");this.onConnect=this.onConnectProxy.bind(this),this.onRender=this.onRenderProxy.bind(this),U.X.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"desktop",displayIndex:this.wallet?.display_index,walletRank:this.wallet.order,view:J.RouterController.state.view}})}onRenderProxy(){!this.ready&&this.uri&&(this.ready=!0,this.onConnect?.())}onConnectProxy(){if(this.wallet?.desktop_link&&this.uri)try{this.error=!1;let{desktop_link:e,name:t}=this.wallet,{redirect:r,href:i}=d.j.formatNativeUrl(e,this.uri);X.ConnectionController.setWcLinking({name:t,href:i}),X.ConnectionController.setRecentWallet(this.wallet),d.j.openHref(r,"_blank")}catch{this.error=!0}}};rw=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s}([(0,h.Mo)("w3m-connecting-wc-desktop")],rw);var rb=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let rv=class extends rc{constructor(){if(super(),this.btnLabelTimeout=void 0,this.redirectDeeplink=void 0,this.redirectUniversalLink=void 0,this.target=void 0,this.preferUniversalLinks=s.OptionsController.state.experimental_preferUniversalLinks,this.isLoading=!0,this.onConnect=()=>{eZ.f.onConnectMobile(this.wallet)},!this.wallet)throw Error("w3m-connecting-wc-mobile: No wallet provided");this.secondaryBtnLabel="Open",this.secondaryLabel=G.bq.CONNECT_LABELS.MOBILE,this.secondaryBtnIcon="externalLink",this.onHandleURI(),this.unsubscribe.push(X.ConnectionController.subscribeKey("wcUri",()=>{this.onHandleURI()})),U.X.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"mobile",displayIndex:this.wallet?.display_index,walletRank:this.wallet.order,view:J.RouterController.state.view}})}disconnectedCallback(){super.disconnectedCallback(),clearTimeout(this.btnLabelTimeout)}onHandleURI(){this.isLoading=!this.uri,!this.ready&&this.uri&&(this.ready=!0,this.onConnect?.())}onTryAgain(){X.ConnectionController.setWcError(!1),this.onConnect?.()}};rb([(0,n.SB)()],rv.prototype,"redirectDeeplink",void 0),rb([(0,n.SB)()],rv.prototype,"redirectUniversalLink",void 0),rb([(0,n.SB)()],rv.prototype,"target",void 0),rb([(0,n.SB)()],rv.prototype,"preferUniversalLinks",void 0),rb([(0,n.SB)()],rv.prototype,"isLoading",void 0),rv=rb([(0,h.Mo)("w3m-connecting-wc-mobile")],rv),r(930);var rC=(0,h.iv)` + wui-shimmer { + width: 100%; + aspect-ratio: 1 / 1; + border-radius: ${({borderRadius:e})=>e[4]}; + } + + wui-qr-code { + opacity: 0; + animation-duration: ${({durations:e})=>e.xl}; + animation-timing-function: ${({easings:e})=>e["ease-out-power-2"]}; + animation-name: fade-in; + animation-fill-mode: forwards; + } + + @keyframes fade-in { + from { + opacity: 0; + } + to { + opacity: 1; + } + } +`,rE=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let rx=class extends rc{constructor(){super(),this.basic=!1}firstUpdated(){this.basic||U.X.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet?.name??"WalletConnect",platform:"qrcode",displayIndex:this.wallet?.display_index,walletRank:this.wallet?.order,view:J.RouterController.state.view}})}disconnectedCallback(){super.disconnectedCallback(),this.unsubscribe?.forEach(e=>e())}render(){return this.onRenderProxy(),(0,i.dy)` + + ${this.qrCodeTemplate()} + Scan this QR Code with your phone + ${this.copyTemplate()} + + + `}onRenderProxy(){!this.ready&&this.uri&&(this.ready=!0)}qrCodeTemplate(){if(!this.uri||!this.ready)return null;let e=this.wallet?this.wallet.name:void 0;X.ConnectionController.setWcLinking(void 0),X.ConnectionController.setRecentWallet(this.wallet);let t=re.ThemeController.state.themeVariables["--apkt-qr-color"]??re.ThemeController.state.themeVariables["--w3m-qr-color"];return(0,i.dy)` `}copyTemplate(){let e=!this.uri||!this.ready;return(0,i.dy)` + Copy link + + `}};rx.styles=rC,rE([(0,n.Cb)({type:Boolean})],rx.prototype,"basic",void 0),rx=rE([(0,h.Mo)("w3m-connecting-wc-qrcode")],rx);let r_=class extends i.oi{constructor(){if(super(),this.wallet=J.RouterController.state.data?.wallet,!this.wallet)throw Error("w3m-connecting-wc-unsupported: No wallet provided");U.X.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"browser",displayIndex:this.wallet?.display_index,walletRank:this.wallet?.order,view:J.RouterController.state.view}})}render(){return(0,i.dy)` + + + + Not Detected + + + + `}};r_=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s}([(0,h.Mo)("w3m-connecting-wc-unsupported")],r_);var rA=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let rS=class extends rc{constructor(){if(super(),this.isLoading=!0,!this.wallet)throw Error("w3m-connecting-wc-web: No wallet provided");this.onConnect=this.onConnectProxy.bind(this),this.secondaryBtnLabel="Open",this.secondaryLabel=G.bq.CONNECT_LABELS.MOBILE,this.secondaryBtnIcon="externalLink",this.updateLoadingState(),this.unsubscribe.push(X.ConnectionController.subscribeKey("wcUri",()=>{this.updateLoadingState()})),U.X.sendEvent({type:"track",event:"SELECT_WALLET",properties:{name:this.wallet.name,platform:"web",displayIndex:this.wallet?.display_index,walletRank:this.wallet?.order,view:J.RouterController.state.view}})}updateLoadingState(){this.isLoading=!this.uri}onConnectProxy(){if(this.wallet?.webapp_link&&this.uri)try{this.error=!1;let{webapp_link:e,name:t}=this.wallet,{redirect:r,href:i}=d.j.formatUniversalUrl(e,this.uri);X.ConnectionController.setWcLinking({name:t,href:i}),X.ConnectionController.setRecentWallet(this.wallet),d.j.openHref(r,"_blank")}catch{this.error=!0}}};rA([(0,n.SB)()],rS.prototype,"isLoading",void 0),rS=rA([(0,h.Mo)("w3m-connecting-wc-web")],rS);var rI=(0,h.iv)` + :host([data-mobile-fullscreen='true']) { + height: 100%; + display: flex; + flex-direction: column; + } + + :host([data-mobile-fullscreen='true']) wui-ux-by-reown { + margin-top: auto; + } +`,rN=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let rk=class extends i.oi{constructor(){super(),this.wallet=J.RouterController.state.data?.wallet,this.unsubscribe=[],this.platform=void 0,this.platforms=[],this.isSiwxEnabled=!!s.OptionsController.state.siwx,this.remoteFeatures=s.OptionsController.state.remoteFeatures,this.displayBranding=!0,this.basic=!1,this.determinePlatforms(),this.initializeConnection(),this.unsubscribe.push(s.OptionsController.subscribeKey("remoteFeatures",e=>this.remoteFeatures=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return s.OptionsController.state.enableMobileFullScreen&&this.setAttribute("data-mobile-fullscreen","true"),(0,i.dy)` + ${this.headerTemplate()} +
${this.platformTemplate()}
+ ${this.reownBrandingTemplate()} + `}reownBrandingTemplate(){return this.remoteFeatures?.reownBranding&&this.displayBranding?(0,i.dy)``:null}async initializeConnection(e=!1){if("browser"!==this.platform&&(!s.OptionsController.state.manualWCControl||e))try{let{wcPairingExpiry:t,status:r}=X.ConnectionController.state,{redirectView:i}=J.RouterController.state.data??{};if(e||s.OptionsController.state.enableEmbedded||d.j.isPairingExpired(t)||"connecting"===r){let e=X.ConnectionController.getConnections(a.R.state.activeChain),t=this.remoteFeatures?.multiWallet,r=e.length>0;await X.ConnectionController.connectWalletConnect({cache:"never"}),this.isSiwxEnabled||(r&&t?(J.RouterController.replace("ProfileWallets"),Y.SnackController.showSuccess("New Wallet Added")):i?J.RouterController.replace(i):u.I.close())}}catch(e){if(e instanceof Error&&e.message.includes("An error occurred when attempting to switch chain")&&!s.OptionsController.state.enableNetworkSwitch&&a.R.state.activeChain){a.R.setActiveCaipNetwork(rf.f.getUnsupportedNetwork(`${a.R.state.activeChain}:${a.R.state.activeCaipNetwork?.id}`)),a.R.showUnsupportedChainUI();return}e instanceof t7.g&&e.originalName===t9.jD.PROVIDER_RPC_ERROR_NAME.USER_REJECTED_REQUEST?U.X.sendEvent({type:"track",event:"USER_REJECTED",properties:{message:e.message}}):U.X.sendEvent({type:"track",event:"CONNECT_ERROR",properties:{message:e?.message??"Unknown"}}),X.ConnectionController.setWcError(!0),Y.SnackController.showError(e.message??"Connection error"),X.ConnectionController.resetWcConnection(),J.RouterController.goBack()}}determinePlatforms(){if(!this.wallet){this.platforms.push("qrcode"),this.platform="qrcode";return}if(this.platform)return;let{mobile_link:e,desktop_link:t,webapp_link:r,injected:i,rdns:n}=this.wallet,o=i?.map(({injected_id:e})=>e).filter(Boolean),l=[...n?[n]:o??[]],c=!s.OptionsController.state.isUniversalProvider&&l.length,u=X.ConnectionController.checkInstalled(l),h=c&&u,p=t&&!d.j.isMobile();h&&!a.R.state.noAdapters&&this.platforms.push("browser"),e&&this.platforms.push(d.j.isMobile()?"mobile":"qrcode"),r&&this.platforms.push("web"),p&&this.platforms.push("desktop"),h||!c||a.R.state.noAdapters||this.platforms.push("unsupported"),this.platform=this.platforms[0]}platformTemplate(){switch(this.platform){case"browser":return(0,i.dy)``;case"web":return(0,i.dy)``;case"desktop":return(0,i.dy)` + this.initializeConnection(!0)}> + + `;case"mobile":return(0,i.dy)` + this.initializeConnection(!0)}> + + `;case"qrcode":return(0,i.dy)``;default:return(0,i.dy)``}}headerTemplate(){return this.platforms.length>1?(0,i.dy)` + + + `:null}async onSelectPlatform(e){let t=this.shadowRoot?.querySelector("div");t&&(await t.animate([{opacity:1},{opacity:0}],{duration:200,fill:"forwards",easing:"ease"}).finished,this.platform=e,t.animate([{opacity:0},{opacity:1}],{duration:200,fill:"forwards",easing:"ease"}))}};rk.styles=rI,rN([(0,n.SB)()],rk.prototype,"platform",void 0),rN([(0,n.SB)()],rk.prototype,"platforms",void 0),rN([(0,n.SB)()],rk.prototype,"isSiwxEnabled",void 0),rN([(0,n.SB)()],rk.prototype,"remoteFeatures",void 0),rN([(0,n.Cb)({type:Boolean})],rk.prototype,"displayBranding",void 0),rN([(0,n.Cb)({type:Boolean})],rk.prototype,"basic",void 0),rk=rN([(0,h.Mo)("w3m-connecting-wc-view")],rk);var rR=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let rO=class extends i.oi{constructor(){super(),this.unsubscribe=[],this.isMobile=d.j.isMobile(),this.remoteFeatures=s.OptionsController.state.remoteFeatures,this.unsubscribe.push(s.OptionsController.subscribeKey("remoteFeatures",e=>this.remoteFeatures=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){if(this.isMobile){let{featured:e,recommended:t}=th.ApiController.state,{customWallets:r}=s.OptionsController.state,n=er.M.getRecentWallets(),o=e.length||t.length||r?.length||n.length;return(0,i.dy)` + ${o?(0,i.dy)``:null} + + `}return(0,i.dy)` + + + + + + ${this.reownBrandingTemplate()} `}reownBrandingTemplate(){return this.remoteFeatures?.reownBranding?(0,i.dy)` + + `:null}};rR([(0,n.SB)()],rO.prototype,"isMobile",void 0),rR([(0,n.SB)()],rO.prototype,"remoteFeatures",void 0),rO=rR([(0,h.Mo)("w3m-connecting-wc-basic-view")],rO);var rT=r(8330),rP=(0,i.iv)` + .continue-button-container { + width: 100%; + } +`,r$=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let rD=class extends i.oi{constructor(){super(...arguments),this.loading=!1}render(){return(0,i.dy)` + + ${this.onboardingTemplate()} ${this.buttonsTemplate()} + {d.j.openHref(rT.U.URLS.FAQ,"_blank")}} + > + Learn more about names + + + + `}onboardingTemplate(){return(0,i.dy)` + + + + + + Choose your account name + + + Finally say goodbye to 0x addresses, name your account to make it easier to exchange + assets + + + `}buttonsTemplate(){return(0,i.dy)` + Choose name + + `}handleContinue(){J.RouterController.push("RegisterAccountName"),U.X.sendEvent({type:"track",event:"OPEN_ENS_FLOW",properties:{isSmartAccount:(0,el.r9)(a.R.state.activeChain)===ev.y_.ACCOUNT_TYPES.SMART_ACCOUNT}})}};rD.styles=rP,r$([(0,n.SB)()],rD.prototype,"loading",void 0),rD=r$([(0,h.Mo)("w3m-choose-account-name-view")],rD);let rU=class extends i.oi{constructor(){super(...arguments),this.wallet=J.RouterController.state.data?.wallet}render(){if(!this.wallet)throw Error("w3m-downloads-view");return(0,i.dy)` + + ${this.chromeTemplate()} ${this.iosTemplate()} ${this.androidTemplate()} + ${this.homepageTemplate()} + + `}chromeTemplate(){return this.wallet?.chrome_store?(0,i.dy)` + Chrome Extension + `:null}iosTemplate(){return this.wallet?.app_store?(0,i.dy)` + iOS App + `:null}androidTemplate(){return this.wallet?.play_store?(0,i.dy)` + Android App + `:null}homepageTemplate(){return this.wallet?.homepage?(0,i.dy)` + + Website + + `:null}openStore(e){e.href&&this.wallet&&(U.X.sendEvent({type:"track",event:"GET_WALLET",properties:{name:this.wallet.name,walletRank:this.wallet.order,explorerId:this.wallet.id,type:e.type}}),d.j.openHref(e.href,"_blank"))}onChromeStore(){this.wallet?.chrome_store&&this.openStore({href:this.wallet.chrome_store,type:"chrome_store"})}onAppStore(){this.wallet?.app_store&&this.openStore({href:this.wallet.app_store,type:"app_store"})}onPlayStore(){this.wallet?.play_store&&this.openStore({href:this.wallet.play_store,type:"play_store"})}onHomePage(){this.wallet?.homepage&&this.openStore({href:this.wallet.homepage,type:"homepage"})}};rU=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s}([(0,h.Mo)("w3m-downloads-view")],rU);let rL=class extends i.oi{render(){return(0,i.dy)` + + ${this.recommendedWalletsTemplate()} + {d.j.openHref("https://walletconnect.com/explorer?type=wallet","_blank")}} + > + + `}recommendedWalletsTemplate(){let{recommended:e,featured:t}=th.ApiController.state,{customWallets:r}=s.OptionsController.state;return[...t,...r??[],...e].slice(0,4).map((e,t)=>(0,i.dy)` + {this.onWalletClick(e)}} + > + `)}onWalletClick(e){U.X.sendEvent({type:"track",event:"GET_WALLET",properties:{name:e.name,walletRank:void 0,explorerId:e.id,type:"homepage"}}),d.j.openHref(e.homepage??"https://walletconnect.com/explorer","_blank")}};rL=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s}([(0,h.Mo)("w3m-get-wallet-view")],rL),r(62346);var rM=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let rB=class extends i.oi{constructor(){super(...arguments),this.data=[]}render(){return(0,i.dy)` + + ${this.data.map(e=>(0,i.dy)` + + + ${e.images.map(e=>(0,i.dy)``)} + + + + ${e.title} + ${e.text} + + `)} + + `}};rM([(0,n.Cb)({type:Array})],rB.prototype,"data",void 0),rB=rM([(0,h.Mo)("w3m-help-widget")],rB);let rj=[{images:["login","profile","lock"],title:"One login for all of web3",text:"Log in to any app by connecting your wallet. Say goodbye to countless passwords!"},{images:["defi","nft","eth"],title:"A home for your digital assets",text:"A wallet lets you store, send and receive digital assets like cryptocurrencies and NFTs."},{images:["browser","noun","dao"],title:"Your gateway to a new web",text:"With your wallet, you can explore and interact with DeFi, NFTs, DAOs, and much more."}],rF=class extends i.oi{render(){return(0,i.dy)` + + + + + Get a wallet + + + `}onGetWallet(){U.X.sendEvent({type:"track",event:"CLICK_GET_WALLET_HELP"}),J.RouterController.push("GetWallet")}};rF=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s}([(0,h.Mo)("w3m-what-is-a-wallet-view")],rF);var rW=(0,h.iv)` + wui-flex { + max-height: clamp(360px, 540px, 80vh); + overflow: scroll; + scrollbar-width: none; + transition: opacity ${({durations:e})=>e.lg} + ${({easings:e})=>e["ease-out-power-2"]}; + will-change: opacity; + } + wui-flex::-webkit-scrollbar { + display: none; + } + wui-flex.disabled { + opacity: 0.3; + pointer-events: none; + user-select: none; + } +`,rz=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let rH=class extends i.oi{constructor(){super(),this.unsubscribe=[],this.checked=t$.M.state.isLegalCheckboxChecked,this.unsubscribe.push(t$.M.subscribeKey("isLegalCheckboxChecked",e=>{this.checked=e}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){let{termsConditionsUrl:e,privacyPolicyUrl:t}=s.OptionsController.state,r=s.OptionsController.state.features?.legalCheckbox,n=!!(e||t)&&!!r,a=n&&!this.checked;return(0,i.dy)` + + + + + `}};rH.styles=rW,rz([(0,n.SB)()],rH.prototype,"checked",void 0),rH=rz([(0,h.Mo)("w3m-connect-wallets-view")],rH);var rq=r(60389),rV=(0,m.iv)` + :host { + display: block; + width: 120px; + height: 120px; + } + + svg { + width: 120px; + height: 120px; + fill: none; + stroke: transparent; + stroke-linecap: round; + } + + use { + stroke: ${e=>e.colors.accent100}; + stroke-width: 2px; + stroke-dasharray: 54, 118; + stroke-dashoffset: 172; + animation: dash 1s linear infinite; + } + + @keyframes dash { + to { + stroke-dashoffset: 0px; + } + } +`;let rK=class extends i.oi{render(){return(0,i.dy)` + + + + + `}};rK.styles=[p.ET,rV],rK=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s}([(0,g.M)("wui-loading-hexagon")],rK),r(10005);var rZ=(0,i.iv)` + @keyframes shake { + 0% { + transform: translateX(0); + } + 25% { + transform: translateX(3px); + } + 50% { + transform: translateX(-3px); + } + 75% { + transform: translateX(3px); + } + 100% { + transform: translateX(0); + } + } + + wui-flex:first-child:not(:only-child) { + position: relative; + } + + wui-loading-hexagon { + position: absolute; + } + + wui-icon-box { + position: absolute; + right: 4px; + bottom: 0; + opacity: 0; + transform: scale(0.5); + z-index: 1; + } + + wui-button { + display: none; + } + + [data-error='true'] wui-icon-box { + opacity: 1; + transform: scale(1); + } + + [data-error='true'] > wui-flex:first-child { + animation: shake 250ms cubic-bezier(0.36, 0.07, 0.19, 0.97) both; + } + + wui-button[data-retry='true'] { + display: block; + opacity: 1; + } +`,rG=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let rY=class extends i.oi{constructor(){super(),this.network=J.RouterController.state.data?.network,this.unsubscribe=[],this.showRetry=!1,this.error=!1}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}firstUpdated(){this.onSwitchNetwork()}render(){if(!this.network)throw Error("w3m-network-switch-view: No network provided");this.onShowRetry();let e=this.getLabel(),t=this.getSubLabel();return(0,i.dy)` + + + + + ${this.error?null:(0,i.dy)``} + + + + + + ${e} + ${t} + + + + + Try again + + + `}getSubLabel(){let e=Z.ConnectorController.getConnectorId(a.R.state.activeChain);return Z.ConnectorController.getAuthConnector()&&e===K.b.CONNECTOR_ID.AUTH?"":this.error?"Switch can be declined if chain is not supported by a wallet or previous request is still active":"Accept connection request in your wallet"}getLabel(){let e=Z.ConnectorController.getConnectorId(a.R.state.activeChain);return Z.ConnectorController.getAuthConnector()&&e===K.b.CONNECTOR_ID.AUTH?`Switching to ${this.network?.name??"Unknown"} network...`:this.error?"Switch declined":"Approve in wallet"}onShowRetry(){if(this.error&&!this.showRetry){this.showRetry=!0;let e=this.shadowRoot?.querySelector("wui-button");e?.animate([{opacity:0},{opacity:1}],{fill:"forwards",easing:"ease"})}}async onSwitchNetwork(){try{this.error=!1,a.R.state.activeChain!==this.network?.chainNamespace&&a.R.setIsSwitchingNamespace(!0),this.network&&(await a.R.switchActiveNetwork(this.network),await rq.w.isAuthenticated()&&J.RouterController.goBack())}catch(e){this.error=!0}}};rY.styles=rZ,rG([(0,n.SB)()],rY.prototype,"showRetry",void 0),rG([(0,n.SB)()],rY.prototype,"error",void 0),rY=rG([(0,h.Mo)("w3m-network-switch-view")],rY);var rJ=r(4822);r(64349);var rX=(0,m.iv)` + :host { + width: 100%; + } + + button { + display: flex; + align-items: center; + justify-content: space-between; + padding: ${({spacing:e})=>e[3]}; + width: 100%; + background-color: transparent; + border-radius: ${({borderRadius:e})=>e[4]}; + } + + wui-text { + text-transform: capitalize; + } + + @media (hover: hover) { + button:hover:enabled { + background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; + } + } + + button:disabled { + opacity: 0.5; + cursor: not-allowed; + } +`,rQ=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let r0=class extends i.oi{constructor(){super(...arguments),this.imageSrc=void 0,this.name="Ethereum",this.disabled=!1}render(){return(0,i.dy)` + + `}imageTemplate(){return this.imageSrc?(0,i.dy)``:(0,i.dy)``}};r0.styles=[p.ET,p.ZM,rX],rQ([(0,n.Cb)()],r0.prototype,"imageSrc",void 0),rQ([(0,n.Cb)()],r0.prototype,"name",void 0),rQ([(0,n.Cb)()],r0.prototype,"tabIdx",void 0),rQ([(0,n.Cb)({type:Boolean})],r0.prototype,"disabled",void 0),r0=rQ([(0,g.M)("wui-list-network")],r0);var r1=(0,i.iv)` + .container { + max-height: 360px; + overflow: auto; + } + + .container::-webkit-scrollbar { + display: none; + } +`,r2=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let r3=class extends i.oi{constructor(){super(),this.unsubscribe=[],this.network=a.R.state.activeCaipNetwork,this.requestedCaipNetworks=a.R.getCaipNetworks(),this.search="",this.onDebouncedSearch=d.j.debounce(e=>{this.search=e},100),this.unsubscribe.push(l.W.subscribeNetworkImages(()=>this.requestUpdate()),a.R.subscribeKey("activeCaipNetwork",e=>this.network=e),a.R.subscribe(()=>{this.requestedCaipNetworks=a.R.getAllRequestedCaipNetworks()}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return(0,i.dy)` + ${this.templateSearchInput()} + + ${this.networksTemplate()} + + `}templateSearchInput(){return(0,i.dy)` + + + + `}onInputChange(e){this.onDebouncedSearch(e.detail)}networksTemplate(){let e=a.R.getAllApprovedCaipNetworkIds(),t=d.j.sortRequestedNetworks(e,this.requestedCaipNetworks);return this.search?this.filteredNetworks=t?.filter(e=>e?.name?.toLowerCase().includes(this.search.toLowerCase())):this.filteredNetworks=t,this.filteredNetworks?.map(e=>i.dy` + this.onSwitchNetwork(e)} + .disabled=${a.R.isCaipNetworkDisabled(e)} + data-testid=${`w3m-network-switch-${e.name??e.id}`} + > + `)}onSwitchNetwork(e){rJ.p.onSwitchNetwork({network:e})}};r3.styles=r1,r2([(0,n.SB)()],r3.prototype,"network",void 0),r2([(0,n.SB)()],r3.prototype,"requestedCaipNetworks",void 0),r2([(0,n.SB)()],r3.prototype,"filteredNetworks",void 0),r2([(0,n.SB)()],r3.prototype,"search",void 0),r3=r2([(0,h.Mo)("w3m-networks-view")],r3);var r5=(0,h.iv)` + @keyframes shake { + 0% { + transform: translateX(0); + } + 25% { + transform: translateX(3px); + } + 50% { + transform: translateX(-3px); + } + 75% { + transform: translateX(3px); + } + 100% { + transform: translateX(0); + } + } + + wui-flex:first-child:not(:only-child) { + position: relative; + } + + wui-loading-thumbnail { + position: absolute; + } + + wui-visual { + border-radius: calc( + ${({borderRadius:e})=>e["1"]} * 9 - ${({borderRadius:e})=>e["3"]} + ); + position: relative; + overflow: hidden; + } + + wui-visual::after { + content: ''; + display: block; + width: 100%; + height: 100%; + position: absolute; + inset: 0; + border-radius: calc( + ${({borderRadius:e})=>e["1"]} * 9 - ${({borderRadius:e})=>e["3"]} + ); + box-shadow: inset 0 0 0 1px ${({tokens:e})=>e.core.glass010}; + } + + wui-icon-box { + position: absolute; + right: calc(${({spacing:e})=>e["1"]} * -1); + bottom: calc(${({spacing:e})=>e["1"]} * -1); + opacity: 0; + transform: scale(0.5); + transition: + opacity ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]}, + transform ${({durations:e})=>e.lg} + ${({easings:e})=>e["ease-out-power-2"]}; + will-change: opacity, transform; + } + + wui-text[align='center'] { + width: 100%; + padding: 0px ${({spacing:e})=>e["4"]}; + } + + [data-error='true'] wui-icon-box { + opacity: 1; + transform: scale(1); + } + + [data-error='true'] > wui-flex:first-child { + animation: shake 250ms ${({easings:e})=>e["ease-out-power-2"]} both; + } + + [data-retry='false'] wui-link { + display: none; + } + + [data-retry='true'] wui-link { + display: block; + opacity: 1; + } + + wui-link { + padding: ${({spacing:e})=>e["01"]} ${({spacing:e})=>e["2"]}; + } + + .capitalize { + text-transform: capitalize; + } +`,r4=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let r6={eip155:"eth",solana:"solana",bip122:"bitcoin",polkadot:void 0},r8=class extends i.oi{constructor(){super(...arguments),this.unsubscribe=[],this.switchToChain=J.RouterController.state.data?.switchToChain,this.caipNetwork=J.RouterController.state.data?.network,this.activeChain=a.R.state.activeChain}firstUpdated(){this.unsubscribe.push(a.R.subscribeKey("activeChain",e=>this.activeChain=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){let e=this.switchToChain?K.b.CHAIN_NAME_MAP[this.switchToChain]:"supported";if(!this.switchToChain)return null;let t=K.b.CHAIN_NAME_MAP[this.switchToChain];return(0,i.dy)` + + + + + Switch to ${t} + + Connected wallet doesn't support connecting to ${e} chain. You + need to connect with a different wallet. + + + Switch + + + `}async switchActiveChain(){this.switchToChain&&(a.R.setIsSwitchingNamespace(!0),Z.ConnectorController.setFilterByNamespace(this.switchToChain),this.caipNetwork?await a.R.switchActiveNetwork(this.caipNetwork):a.R.setActiveNamespace(this.switchToChain),J.RouterController.reset("Connect"))}};r8.styles=r5,r4([(0,n.Cb)()],r8.prototype,"activeChain",void 0),r8=r4([(0,h.Mo)("w3m-switch-active-chain-view")],r8);let r9=[{images:["network","layers","system"],title:"The system’s nuts and bolts",text:"A network is what brings the blockchain to life, as this technical infrastructure allows apps to access the ledger and smart contract services."},{images:["noun","defiAlt","dao"],title:"Designed for different uses",text:"Each network is designed differently, and may therefore suit certain apps and experiences."}],r7=class extends i.oi{render(){return(0,i.dy)` + + + {d.j.openHref("https://ethereum.org/en/developers/docs/networks/","_blank")}} + > + Learn more + + + + `}};r7=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s}([(0,h.Mo)("w3m-what-is-a-network-view")],r7);var ie=(0,i.iv)` + :host > wui-flex { + max-height: clamp(360px, 540px, 80vh); + overflow: scroll; + scrollbar-width: none; + } + + :host > wui-flex::-webkit-scrollbar { + display: none; + } +`,it=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let ir=class extends i.oi{constructor(){super(),this.swapUnsupportedChain=J.RouterController.state.data?.swapUnsupportedChain,this.unsubscribe=[],this.disconnecting=!1,this.remoteFeatures=s.OptionsController.state.remoteFeatures,this.unsubscribe.push(l.W.subscribeNetworkImages(()=>this.requestUpdate()),s.OptionsController.subscribeKey("remoteFeatures",e=>{this.remoteFeatures=e}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return(0,i.dy)` + + + ${this.descriptionTemplate()} + + + ${this.networksTemplate()} + + + + + Disconnect + + + + `}descriptionTemplate(){return this.swapUnsupportedChain?(0,i.dy)` + + The swap feature doesn’t support your current network. Switch to an available option to + continue. + + `:(0,i.dy)` + + This app doesn’t support your current network. Switch to an available option to continue. + + `}networksTemplate(){let e=a.R.getAllRequestedCaipNetworks(),t=a.R.getAllApprovedCaipNetworkIds(),r=d.j.sortRequestedNetworks(t,e);return(this.swapUnsupportedChain?r.filter(e=>G.bq.SWAP_SUPPORTED_NETWORKS.includes(e.caipNetworkId)):r).map(e=>(0,i.dy)` + this.onSwitchNetwork(e)} + > + + `)}async onDisconnect(){try{this.disconnecting=!0;let e=a.R.state.activeChain,t=X.ConnectionController.getConnections(e).length>0,r=e&&Z.ConnectorController.state.activeConnectorIds[e],i=this.remoteFeatures?.multiWallet;await X.ConnectionController.disconnect(i?{id:r,namespace:e}:{}),t&&i&&(J.RouterController.push("ProfileWallets"),Y.SnackController.showSuccess("Wallet deleted"))}catch{U.X.sendEvent({type:"track",event:"DISCONNECT_ERROR",properties:{message:"Failed to disconnect"}}),Y.SnackController.showError("Failed to disconnect")}finally{this.disconnecting=!1}}async onSwitchNetwork(e){let t=a.R.getActiveCaipAddress(),r=a.R.getAllApprovedCaipNetworkIds(),i=(a.R.getNetworkProp("supportsAllNetworks",e.chainNamespace),J.RouterController.state.data);t?r?.includes(e.caipNetworkId)?await a.R.switchActiveNetwork(e):J.RouterController.push("SwitchNetwork",{...i,network:e}):t||(a.R.setActiveCaipNetwork(e),J.RouterController.push("Connect"))}};ir.styles=ie,it([(0,n.SB)()],ir.prototype,"disconnecting",void 0),it([(0,n.SB)()],ir.prototype,"remoteFeatures",void 0),ir=it([(0,h.Mo)("w3m-unsupported-chain-view")],ir);var ii=(0,m.iv)` + wui-flex { + width: 100%; + display: flex; + align-items: center; + justify-content: center; + gap: ${({spacing:e})=>e[2]}; + border-radius: ${({borderRadius:e})=>e[4]}; + padding: ${({spacing:e})=>e[3]}; + } + + /* -- Types --------------------------------------------------------- */ + wui-flex[data-type='info'] { + color: ${({tokens:e})=>e.theme.textSecondary}; + background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; + } + + wui-flex[data-type='success'] { + color: ${({tokens:e})=>e.core.textSuccess}; + background-color: ${({tokens:e})=>e.core.backgroundSuccess}; + } + + wui-flex[data-type='error'] { + color: ${({tokens:e})=>e.core.textError}; + background-color: ${({tokens:e})=>e.core.backgroundError}; + } + + wui-flex[data-type='warning'] { + color: ${({tokens:e})=>e.core.textWarning}; + background-color: ${({tokens:e})=>e.core.backgroundWarning}; + } + + wui-flex[data-type='info'] wui-icon-box { + background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; + } + + wui-flex[data-type='success'] wui-icon-box { + background-color: ${({tokens:e})=>e.core.backgroundSuccess}; + } + + wui-flex[data-type='error'] wui-icon-box { + background-color: ${({tokens:e})=>e.core.backgroundError}; + } + + wui-flex[data-type='warning'] wui-icon-box { + background-color: ${({tokens:e})=>e.core.backgroundWarning}; + } + + wui-text { + flex: 1; + } +`,io=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let is=class extends i.oi{constructor(){super(...arguments),this.icon="externalLink",this.text="",this.type="info"}render(){return(0,i.dy)` + + + ${this.text} + + `}};is.styles=[p.ET,p.ZM,ii],io([(0,n.Cb)()],is.prototype,"icon",void 0),io([(0,n.Cb)()],is.prototype,"text",void 0),io([(0,n.Cb)()],is.prototype,"type",void 0),is=io([(0,g.M)("wui-banner")],is);var ia=(0,i.iv)` + :host > wui-flex { + max-height: clamp(360px, 540px, 80vh); + overflow: scroll; + scrollbar-width: none; + } + + :host > wui-flex::-webkit-scrollbar { + display: none; + } +`;let il=class extends i.oi{constructor(){super(),this.unsubscribe=[]}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return(0,i.dy)` + + ${this.networkTemplate()} + `}networkTemplate(){let e=a.R.getAllRequestedCaipNetworks(),t=a.R.getAllApprovedCaipNetworkIds(),r=a.R.state.activeCaipNetwork,n=a.R.checkIfSmartAccountEnabled(),s=d.j.sortRequestedNetworks(t,e);if(n&&(0,el.r9)(r?.chainNamespace)===ev.y_.ACCOUNT_TYPES.SMART_ACCOUNT){if(!r)return null;s=[r]}return s.filter(e=>e.chainNamespace===r?.chainNamespace).map(e=>(0,i.dy)` + + + `)}};il.styles=ia,il=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s}([(0,h.Mo)("w3m-wallet-compatible-networks-view")],il);var ic=(0,m.iv)` + :host { + display: flex; + justify-content: center; + align-items: center; + width: 56px; + height: 56px; + box-shadow: 0 0 0 8px ${({tokens:e})=>e.theme.borderPrimary}; + border-radius: ${({borderRadius:e})=>e[4]}; + overflow: hidden; + } + + :host([data-border-radius-full='true']) { + border-radius: 50px; + } + + wui-icon { + width: 32px; + height: 32px; + } +`,id=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let iu=class extends i.oi{render(){return this.dataset.borderRadiusFull=this.borderRadiusFull?"true":"false",(0,i.dy)`${this.templateVisual()}`}templateVisual(){return this.imageSrc?(0,i.dy)``:(0,i.dy)``}};iu.styles=[p.ET,ic],id([(0,n.Cb)()],iu.prototype,"imageSrc",void 0),id([(0,n.Cb)()],iu.prototype,"alt",void 0),id([(0,n.Cb)({type:Boolean})],iu.prototype,"borderRadiusFull",void 0),iu=id([(0,g.M)("wui-visual-thumbnail")],iu);var ih=(0,h.iv)` + :host { + display: flex; + justify-content: center; + gap: ${({spacing:e})=>e["4"]}; + } + + wui-visual-thumbnail:nth-child(1) { + z-index: 1; + } +`;let ip=class extends i.oi{constructor(){super(...arguments),this.dappImageUrl=s.OptionsController.state.metadata?.icons,this.walletImageUrl=a.R.getAccountData()?.connectedWalletInfo?.icon}firstUpdated(){let e=this.shadowRoot?.querySelectorAll("wui-visual-thumbnail");e?.[0]&&this.createAnimation(e[0],"translate(18px)"),e?.[1]&&this.createAnimation(e[1],"translate(-18px)")}render(){return(0,i.dy)` + + + `}createAnimation(e,t){e.animate([{transform:"translateX(0px)"},{transform:t}],{duration:1600,easing:"cubic-bezier(0.56, 0, 0.48, 1)",direction:"alternate",iterations:1/0})}};ip.styles=ih,ip=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s}([(0,h.Mo)("w3m-siwx-sign-message-thumbnails")],ip);var ig=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let im=class extends i.oi{constructor(){super(...arguments),this.dappName=s.OptionsController.state.metadata?.name,this.isCancelling=!1,this.isSigning=!1}render(){return(0,i.dy)` + + + + + ${this.dappName??"Dapp"} needs to connect to your wallet + + + Sign this message to prove you own this wallet and proceed. Canceling will disconnect + you. + + + + ${this.isCancelling?"Cancelling...":"Cancel"} + + + ${this.isSigning?"Signing...":"Sign"} + + + `}async onSign(){this.isSigning=!0;try{await rq.w.requestSignMessage()}catch(e){if(e instanceof Error&&e.message.includes("OTP is required")){Y.SnackController.showError({message:"Something went wrong. We need to verify your account again."}),J.RouterController.replace("DataCapture");return}throw e}finally{this.isSigning=!1}}async onCancel(){this.isCancelling=!0,await rq.w.cancelSignMessage().finally(()=>this.isCancelling=!1)}};ig([(0,n.SB)()],im.prototype,"isCancelling",void 0),ig([(0,n.SB)()],im.prototype,"isSigning",void 0),im=ig([(0,h.Mo)("w3m-siwx-sign-message-view")],im)},62942:function(e,t,r){"use strict";r.d(t,{M:function(){return u}});var i=r(31133),n=r(84927),o=r(86777),s=r(31929),a=r(92413);r(88239),r(5867);var l=r(34252),c=(0,a.iv)` + :host { + display: block; + } + + div.container { + position: absolute; + bottom: 0; + left: 0; + right: 0; + overflow: hidden; + height: auto; + display: block; + } + + div.container[status='hide'] { + animation: fade-out; + animation-duration: var(--apkt-duration-dynamic); + animation-timing-function: ${({easings:e})=>e["ease-out-power-2"]}; + animation-fill-mode: both; + animation-delay: 0s; + } + + div.container[status='show'] { + animation: fade-in; + animation-duration: var(--apkt-duration-dynamic); + animation-timing-function: ${({easings:e})=>e["ease-out-power-2"]}; + animation-fill-mode: both; + animation-delay: var(--apkt-duration-dynamic); + } + + @keyframes fade-in { + from { + opacity: 0; + filter: blur(6px); + } + to { + opacity: 1; + filter: blur(0px); + } + } + + @keyframes fade-out { + from { + opacity: 1; + filter: blur(0px); + } + to { + opacity: 0; + filter: blur(6px); + } + } +`,d=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let u=class extends i.oi{constructor(){super(...arguments),this.resizeObserver=void 0,this.unsubscribe=[],this.status="hide",this.view=o.RouterController.state.view}firstUpdated(){this.status=l.g.hasFooter()?"show":"hide",this.unsubscribe.push(o.RouterController.subscribeKey("view",e=>{this.view=e,this.status=l.g.hasFooter()?"show":"hide","hide"===this.status&&document.documentElement.style.setProperty("--apkt-footer-height","0px")})),this.resizeObserver=new ResizeObserver(e=>{for(let t of e)if(t.target===this.getWrapper()){let e=`${t.contentRect.height}px`;document.documentElement.style.setProperty("--apkt-footer-height",e)}}),this.resizeObserver.observe(this.getWrapper())}render(){return(0,i.dy)` +
${this.templatePageContainer()}
+ `}templatePageContainer(){return l.g.hasFooter()?(0,i.dy)` ${this.templateFooter()}`:null}templateFooter(){switch(this.view){case"Networks":return this.templateNetworksFooter();case"Connect":case"ConnectWallets":case"OnRampFiatSelect":case"OnRampTokenSelect":return(0,i.dy)``;case"OnRampProviders":return(0,i.dy)``;default:return null}}templateNetworksFooter(){return(0,i.dy)` + + Your connected wallet may not support some of the networks available for this dApp + + + + What is a network + + `}onNetworkHelp(){s.X.sendEvent({type:"track",event:"CLICK_NETWORK_HELP"}),o.RouterController.push("WhatIsANetwork")}getWrapper(){return this.shadowRoot?.querySelector("div.container")}};u.styles=[c],d([(0,n.SB)()],u.prototype,"status",void 0),d([(0,n.SB)()],u.prototype,"view",void 0),u=d([(0,a.Mo)("w3m-footer")],u)},77770:function(e,t,r){"use strict";r.d(t,{A:function(){return c}});var i=r(31133),n=r(84927),o=r(86777),s=r(92413);r(62942);var a=(0,s.iv)` + :host { + display: block; + width: inherit; + } +`,l=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let c=class extends i.oi{constructor(){super(),this.unsubscribe=[],this.viewState=o.RouterController.state.view,this.history=o.RouterController.state.history.join(","),this.unsubscribe.push(o.RouterController.subscribeKey("view",()=>{this.history=o.RouterController.state.history.join(","),document.documentElement.style.setProperty("--apkt-duration-dynamic","var(--apkt-durations-lg)")}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e()),document.documentElement.style.setProperty("--apkt-duration-dynamic","0s")}render(){return(0,i.dy)`${this.templatePageContainer()}`}templatePageContainer(){return(0,i.dy)`{this.viewState=o.RouterController.state.view}} + > + ${this.viewTemplate(this.viewState)} + `}viewTemplate(e){switch(e){case"AccountSettings":return(0,i.dy)``;case"Account":return(0,i.dy)``;case"AllWallets":return(0,i.dy)``;case"ApproveTransaction":return(0,i.dy)``;case"BuyInProgress":return(0,i.dy)``;case"ChooseAccountName":return(0,i.dy)``;case"Connect":default:return(0,i.dy)``;case"Create":return(0,i.dy)``;case"ConnectingWalletConnect":return(0,i.dy)``;case"ConnectingWalletConnectBasic":return(0,i.dy)``;case"ConnectingExternal":return(0,i.dy)``;case"ConnectingSiwe":return(0,i.dy)``;case"ConnectWallets":return(0,i.dy)``;case"ConnectSocials":return(0,i.dy)``;case"ConnectingSocial":return(0,i.dy)``;case"DataCapture":return(0,i.dy)``;case"DataCaptureOtpConfirm":return(0,i.dy)``;case"Downloads":return(0,i.dy)``;case"EmailLogin":return(0,i.dy)``;case"EmailVerifyOtp":return(0,i.dy)``;case"EmailVerifyDevice":return(0,i.dy)``;case"GetWallet":return(0,i.dy)``;case"Networks":return(0,i.dy)``;case"SwitchNetwork":return(0,i.dy)``;case"ProfileWallets":return(0,i.dy)``;case"Transactions":return(0,i.dy)``;case"OnRampProviders":return(0,i.dy)``;case"OnRampTokenSelect":return(0,i.dy)``;case"OnRampFiatSelect":return(0,i.dy)``;case"UpgradeEmailWallet":return(0,i.dy)``;case"UpdateEmailWallet":return(0,i.dy)``;case"UpdateEmailPrimaryOtp":return(0,i.dy)``;case"UpdateEmailSecondaryOtp":return(0,i.dy)``;case"UnsupportedChain":return(0,i.dy)``;case"Swap":return(0,i.dy)``;case"SwapSelectToken":return(0,i.dy)``;case"SwapPreview":return(0,i.dy)``;case"WalletSend":return(0,i.dy)``;case"WalletSendSelectToken":return(0,i.dy)``;case"WalletSendPreview":return(0,i.dy)``;case"WalletSendConfirmed":return(0,i.dy)``;case"WhatIsABuy":return(0,i.dy)``;case"WalletReceive":return(0,i.dy)``;case"WalletCompatibleNetworks":return(0,i.dy)``;case"WhatIsAWallet":return(0,i.dy)``;case"ConnectingMultiChain":return(0,i.dy)``;case"WhatIsANetwork":return(0,i.dy)``;case"ConnectingFarcaster":return(0,i.dy)``;case"SwitchActiveChain":return(0,i.dy)``;case"RegisterAccountName":return(0,i.dy)``;case"RegisterAccountNameSuccess":return(0,i.dy)``;case"SmartSessionCreated":return(0,i.dy)``;case"SmartSessionList":return(0,i.dy)``;case"SIWXSignMessage":return(0,i.dy)``;case"Pay":return(0,i.dy)``;case"PayLoading":return(0,i.dy)``;case"FundWallet":return(0,i.dy)``;case"PayWithExchange":return(0,i.dy)``;case"PayWithExchangeSelectAsset":return(0,i.dy)``;case"UsageExceeded":return(0,i.dy)``;case"SmartAccountSettings":return(0,i.dy)``}}};c.styles=[a],l([(0,n.SB)()],c.prototype,"viewState",void 0),l([(0,n.SB)()],c.prototype,"history",void 0),c=l([(0,s.Mo)("w3m-router")],c)},20225:function(e,t,r){"use strict";var i,n,o=r(31133),s=r(84927),a=r(41262),l=r(6943),c=r(70216),d=r(53357),u=r(86777),h=r(5688),p=r(31929),f=r(43291),g=r(92413);r(96277),r(92374),r(51437),r(44732);var m=r(32801);r(18360);var y=r(84249);(i=n||(n={})).approve="approved",i.bought="bought",i.borrow="borrowed",i.burn="burnt",i.cancel="canceled",i.claim="claimed",i.deploy="deployed",i.deposit="deposited",i.execute="executed",i.mint="minted",i.receive="received",i.repay="repaid",i.send="sent",i.sell="sold",i.stake="staked",i.trade="swapped",i.unstake="unstaked",i.withdraw="withdrawn";var w=r(57116);r(74975),r(23805),r(1736);var b=r(11131),v=(0,b.iv)` + :host > wui-flex { + display: flex; + justify-content: center; + align-items: center; + position: relative; + width: 40px; + height: 40px; + box-shadow: inset 0 0 0 1px ${({tokens:e})=>e.core.glass010}; + background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; + } + + :host([data-no-images='true']) > wui-flex { + background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; + border-radius: ${({borderRadius:e})=>e[3]} !important; + } + + :host > wui-flex wui-image { + display: block; + } + + :host > wui-flex, + :host > wui-flex wui-image, + .swap-images-container, + .swap-images-container.nft, + wui-image.nft { + border-top-left-radius: var(--local-left-border-radius); + border-top-right-radius: var(--local-right-border-radius); + border-bottom-left-radius: var(--local-left-border-radius); + border-bottom-right-radius: var(--local-right-border-radius); + } + + .swap-images-container { + position: relative; + width: 40px; + height: 40px; + overflow: hidden; + } + + .swap-images-container wui-image:first-child { + position: absolute; + width: 40px; + height: 40px; + top: 0; + left: 0%; + clip-path: inset(0px calc(50% + 2px) 0px 0%); + } + + .swap-images-container wui-image:last-child { + clip-path: inset(0px 0px 0px calc(50% + 2px)); + } + + .swap-fallback-container { + position: absolute; + inset: 0; + width: 40px; + height: 40px; + display: flex; + align-items: center; + justify-content: center; + } + + .swap-fallback-container.first { + clip-path: inset(0px calc(50% + 2px) 0px 0%); + } + + .swap-fallback-container.last { + clip-path: inset(0px 0px 0px calc(50% + 2px)); + } + + wui-flex.status-box { + position: absolute; + right: 0; + bottom: 0; + transform: translate(20%, 20%); + border-radius: ${({borderRadius:e})=>e[4]}; + background-color: ${({tokens:e})=>e.theme.backgroundPrimary}; + box-shadow: 0 0 0 2px ${({tokens:e})=>e.theme.backgroundPrimary}; + overflow: hidden; + width: 16px; + height: 16px; + } +`,C=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let E=class extends o.oi{constructor(){super(...arguments),this.images=[],this.secondImage={type:void 0,url:""},this.failedImageUrls=new Set}handleImageError(e){return t=>{t.stopPropagation(),this.failedImageUrls.add(e),this.requestUpdate()}}render(){let[e,t]=this.images;this.images.length||(this.dataset.noImages="true");let r=e?.type==="NFT",i=t?.url?"NFT"===t.type:r;return this.style.cssText=` + --local-left-border-radius: ${r?"var(--apkt-borderRadius-3)":"var(--apkt-borderRadius-5)"}; + --local-right-border-radius: ${i?"var(--apkt-borderRadius-3)":"var(--apkt-borderRadius-5)"}; + `,(0,o.dy)` ${this.templateVisual()} ${this.templateIcon()} `}templateVisual(){let[e,t]=this.images;return 2===this.images.length&&(e?.url||t?.url)?this.renderSwapImages(e,t):e?.url&&!this.failedImageUrls.has(e.url)?this.renderSingleImage(e):e?.type==="NFT"?this.renderPlaceholderIcon("nftPlaceholder"):this.renderPlaceholderIcon("coinPlaceholder")}renderSwapImages(e,t){return(0,o.dy)`
+ ${e?.url?this.renderImageOrFallback(e,"first",!0):null} + ${t?.url?this.renderImageOrFallback(t,"last",!0):null} +
`}renderSingleImage(e){return this.renderImageOrFallback(e,void 0,!1)}renderImageOrFallback(e,t,r=!1){return e.url?this.failedImageUrls.has(e.url)?r&&t?this.renderFallbackIconInContainer(t):this.renderFallbackIcon():(0,o.dy)``:null}renderFallbackIconInContainer(e){return(0,o.dy)`
${this.renderFallbackIcon()}
`}renderFallbackIcon(){return(0,o.dy)``}renderPlaceholderIcon(e){return(0,o.dy)``}templateIcon(){let e,t="accent-primary";return(e=this.getIcon(),this.status&&(t=this.getStatusColor()),e)?(0,o.dy)` + + + + `:null}getDirectionIcon(){switch(this.direction){case"in":return"arrowBottom";case"out":return"arrowTop";default:return}}getIcon(){return this.onlyDirectionIcon?this.getDirectionIcon():"trade"===this.type?"swapHorizontal":"approve"===this.type?"checkmark":"cancel"===this.type?"close":this.getDirectionIcon()}getStatusColor(){switch(this.status){case"confirmed":return"success";case"failed":return"error";case"pending":return"inverse";default:return"accent-primary"}}};E.styles=[v],C([(0,s.Cb)()],E.prototype,"type",void 0),C([(0,s.Cb)()],E.prototype,"status",void 0),C([(0,s.Cb)()],E.prototype,"direction",void 0),C([(0,s.Cb)({type:Boolean})],E.prototype,"onlyDirectionIcon",void 0),C([(0,s.Cb)({type:Array})],E.prototype,"images",void 0),C([(0,s.Cb)({type:Object})],E.prototype,"secondImage",void 0),C([(0,s.SB)()],E.prototype,"failedImageUrls",void 0),E=C([(0,w.M)("wui-transaction-visual")],E);var x=(0,b.iv)` + :host { + width: 100%; + } + + :host > wui-flex:first-child { + align-items: center; + column-gap: ${({spacing:e})=>e[2]}; + padding: ${({spacing:e})=>e[1]} ${({spacing:e})=>e[2]}; + width: 100%; + } + + :host > wui-flex:first-child wui-text:nth-child(1) { + text-transform: capitalize; + } + + wui-transaction-visual { + width: 40px; + height: 40px; + } + + wui-flex { + flex: 1; + } + + :host wui-flex wui-flex { + overflow: hidden; + } + + :host .description-container wui-text span { + word-break: break-all; + } + + :host .description-container wui-text { + overflow: hidden; + } + + :host .description-separator-icon { + margin: 0px 6px; + } + + :host wui-text > span { + overflow: hidden; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 1; + } +`,_=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let A=class extends o.oi{constructor(){super(...arguments),this.type="approve",this.onlyDirectionIcon=!1,this.images=[]}render(){return(0,o.dy)` + + + + + ${n[this.type]||this.type} + + + ${this.templateDescription()} ${this.templateSecondDescription()} + + + ${this.date} + + `}templateDescription(){let e=this.descriptions?.[0];return e?(0,o.dy)` + + ${e} + + `:null}templateSecondDescription(){let e=this.descriptions?.[1];return e?(0,o.dy)` + + + ${e} + + `:null}};A.styles=[y.ET,x],_([(0,s.Cb)()],A.prototype,"type",void 0),_([(0,s.Cb)({type:Array})],A.prototype,"descriptions",void 0),_([(0,s.Cb)()],A.prototype,"date",void 0),_([(0,s.Cb)({type:Boolean})],A.prototype,"onlyDirectionIcon",void 0),_([(0,s.Cb)()],A.prototype,"status",void 0),_([(0,s.Cb)()],A.prototype,"direction",void 0),_([(0,s.Cb)({type:Array})],A.prototype,"images",void 0),A=_([(0,w.M)("wui-transaction-list-item")],A),r(42653),r(5680);var S=(0,b.iv)` + wui-flex { + position: relative; + display: inline-flex; + justify-content: center; + align-items: center; + } + + wui-image { + border-radius: ${({borderRadius:e})=>e[128]}; + } + + .fallback-icon { + color: ${({tokens:e})=>e.theme.iconInverse}; + border-radius: ${({borderRadius:e})=>e[3]}; + background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; + } + + .direction-icon, + .status-image { + position: absolute; + right: 0; + bottom: 0; + border-radius: ${({borderRadius:e})=>e[128]}; + border: 2px solid ${({tokens:e})=>e.theme.backgroundPrimary}; + } + + .direction-icon { + padding: ${({spacing:e})=>e["01"]}; + color: ${({tokens:e})=>e.core.iconSuccess}; + + background-color: color-mix( + in srgb, + ${({tokens:e})=>e.core.textSuccess} 30%, + ${({tokens:e})=>e.theme.backgroundPrimary} 70% + ); + } + + /* -- Sizes --------------------------------------------------- */ + :host([data-size='sm']) > wui-image:not(.status-image), + :host([data-size='sm']) > wui-flex { + width: 24px; + height: 24px; + } + + :host([data-size='lg']) > wui-image:not(.status-image), + :host([data-size='lg']) > wui-flex { + width: 40px; + height: 40px; + } + + :host([data-size='sm']) .fallback-icon { + height: 16px; + width: 16px; + padding: ${({spacing:e})=>e[1]}; + } + + :host([data-size='lg']) .fallback-icon { + height: 32px; + width: 32px; + padding: ${({spacing:e})=>e[1]}; + } + + :host([data-size='sm']) .direction-icon, + :host([data-size='sm']) .status-image { + transform: translate(40%, 30%); + } + + :host([data-size='lg']) .direction-icon, + :host([data-size='lg']) .status-image { + transform: translate(40%, 10%); + } + + :host([data-size='sm']) .status-image { + height: 14px; + width: 14px; + } + + :host([data-size='lg']) .status-image { + height: 20px; + width: 20px; + } + + /* -- Crop effects --------------------------------------------------- */ + .swap-crop-left-image, + .swap-crop-right-image { + position: absolute; + top: 0; + bottom: 0; + } + + .swap-crop-left-image { + left: 0; + clip-path: inset(0px calc(50% + 1.5px) 0px 0%); + } + + .swap-crop-right-image { + right: 0; + clip-path: inset(0px 0px 0px calc(50% + 1.5px)); + } +`,I=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let N={sm:"xxs",lg:"md"},k=class extends o.oi{constructor(){super(...arguments),this.type="approve",this.size="lg",this.statusImageUrl="",this.images=[]}render(){return(0,o.dy)`${this.templateVisual()} ${this.templateIcon()}`}templateVisual(){switch(this.dataset.size=this.size,this.type){case"trade":return this.swapTemplate();case"fiat":return this.fiatTemplate();case"unknown":return this.unknownTemplate();default:return this.tokenTemplate()}}swapTemplate(){let[e,t]=this.images;return 2===this.images.length&&(e||t)?(0,o.dy)` + + + `:e?(0,o.dy)``:null}fiatTemplate(){return(0,o.dy)``}unknownTemplate(){return(0,o.dy)``}tokenTemplate(){let[e]=this.images;return e?(0,o.dy)` `:(0,o.dy)``}templateIcon(){return this.statusImageUrl?(0,o.dy)``:(0,o.dy)``}getTemplateIcon(){return"trade"===this.type?"arrowClockWise":"arrowBottom"}};k.styles=[S],I([(0,s.Cb)()],k.prototype,"type",void 0),I([(0,s.Cb)()],k.prototype,"size",void 0),I([(0,s.Cb)()],k.prototype,"statusImageUrl",void 0),I([(0,s.Cb)({type:Array})],k.prototype,"images",void 0),k=I([(0,w.M)("wui-transaction-thumbnail")],k);var R=(0,b.iv)` + :host > wui-flex:first-child { + gap: ${({spacing:e})=>e[2]}; + padding: ${({spacing:e})=>e[3]}; + width: 100%; + } + + wui-flex { + display: flex; + flex: 1; + } +`;let O=class extends o.oi{render(){return(0,o.dy)` + + + + + + + + + `}};O.styles=[y.ET,R],O=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s}([(0,w.M)("wui-transaction-list-item-loader")],O);var T=r(4786),P=(0,g.iv)` + :host { + min-height: 100%; + } + + .group-container[last-group='true'] { + padding-bottom: ${({spacing:e})=>e["3"]}; + } + + .contentContainer { + height: 280px; + } + + .contentContainer > wui-icon-box { + width: 40px; + height: 40px; + border-radius: ${({borderRadius:e})=>e["3"]}; + } + + .contentContainer > .textContent { + width: 65%; + } + + .emptyContainer { + height: 100%; + } +`,$=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let D="last-transaction",U=class extends o.oi{constructor(){super(),this.unsubscribe=[],this.paginationObserver=void 0,this.page="activity",this.caipAddress=l.R.state.activeCaipAddress,this.transactionsByYear=c.s.state.transactionsByYear,this.loading=c.s.state.loading,this.empty=c.s.state.empty,this.next=c.s.state.next,c.s.clearCursor(),this.unsubscribe.push(l.R.subscribeKey("activeCaipAddress",e=>{e&&this.caipAddress!==e&&(c.s.resetTransactions(),c.s.fetchTransactions(e)),this.caipAddress=e}),l.R.subscribeKey("activeCaipNetwork",()=>{this.updateTransactionView()}),c.s.subscribe(e=>{this.transactionsByYear=e.transactionsByYear,this.loading=e.loading,this.empty=e.empty,this.next=e.next}))}firstUpdated(){this.updateTransactionView(),this.createPaginationObserver()}updated(){this.setPaginationObserver()}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){return(0,o.dy)` ${this.empty?null:this.templateTransactionsByYear()} + ${this.loading?this.templateLoading():null} + ${!this.loading&&this.empty?this.templateEmpty():null}`}updateTransactionView(){c.s.resetTransactions(),this.caipAddress&&c.s.fetchTransactions(d.j.getPlainAddress(this.caipAddress))}templateTransactionsByYear(){return Object.keys(this.transactionsByYear).sort().reverse().map(e=>{let t=parseInt(e,10),r=Array(12).fill(null).map((e,r)=>({groupTitle:g.AI.getTransactionGroupTitle(t,r),transactions:this.transactionsByYear[t]?.[r]})).filter(({transactions:e})=>e).reverse();return r.map(({groupTitle:e,transactions:t},i)=>{let n=i===r.length-1;return t?(0,o.dy)` + + + + ${e} + + + + ${this.templateTransactions(t,n)} + + + `:null})})}templateRenderTransaction(e,t){let{date:r,descriptions:i,direction:n,images:s,status:a,type:l,transfers:c,isAllNFT:d}=this.getTransactionListItemProps(e);return(0,o.dy)` + + `}templateTransactions(e,t){return e.map((r,i)=>{let n=t&&i===e.length-1;return(0,o.dy)`${this.templateRenderTransaction(r,n)}`})}emptyStateActivity(){return(0,o.dy)` + + + No Transactions yet + Start trading on dApps
+ to grow your wallet!
+
+
`}emptyStateAccount(){return(0,o.dy)` + + + No activity yet + Your next transactions will appear here + + Trade + `}templateEmpty(){return"account"===this.page?(0,o.dy)`${this.emptyStateAccount()}`:(0,o.dy)`${this.emptyStateActivity()}`}templateLoading(){return"activity"===this.page?(0,o.dy)` + + + + + ${Array(7).fill((0,o.dy)` `).map(e=>e)} + + `:null}onReceiveClick(){u.RouterController.push("WalletReceive")}createPaginationObserver(){let{projectId:e}=h.OptionsController.state;this.paginationObserver=new IntersectionObserver(([t])=>{t?.isIntersecting&&!this.loading&&(c.s.fetchTransactions(d.j.getPlainAddress(this.caipAddress)),p.X.sendEvent({type:"track",event:"LOAD_MORE_TRANSACTIONS",properties:{address:d.j.getPlainAddress(this.caipAddress),projectId:e,cursor:this.next,isSmartAccount:(0,f.r9)(l.R.state.activeChain)===T.y_.ACCOUNT_TYPES.SMART_ACCOUNT}}))},{}),this.setPaginationObserver()}setPaginationObserver(){this.paginationObserver?.disconnect();let e=this.shadowRoot?.querySelector(`#${D}`);e&&this.paginationObserver?.observe(e)}getTransactionListItemProps(e){let t=a.E.formatDate(e?.metadata?.minedAt),r=g.AI.mergeTransfers(e?.transfers||[]),i=g.AI.getTransactionDescriptions(e,r),n=r?.[0],o=!!n&&r?.every(e=>!!e.nft_info),s=g.AI.getTransactionImages(r);return{date:t,direction:n?.direction,descriptions:i,isAllNFT:o,images:s,status:e.metadata?.status,transfers:r,type:e.metadata?.operationType}}};U.styles=P,$([(0,s.Cb)()],U.prototype,"page",void 0),$([(0,s.SB)()],U.prototype,"caipAddress",void 0),$([(0,s.SB)()],U.prototype,"transactionsByYear",void 0),$([(0,s.SB)()],U.prototype,"loading",void 0),$([(0,s.SB)()],U.prototype,"empty",void 0),$([(0,s.SB)()],U.prototype,"next",void 0),$([(0,g.Mo)("w3m-activity-list")],U)},34041:function(e,t,r){"use strict";var i=r(31133),n=r(84927),o=r(81341),s=r(5688),a=r(92413),l=r(32801),c=r(7226);r(74975),r(18360);var d=r(84249),u=r(57116),h=r(11131),p=(0,h.iv)` + label { + display: inline-flex; + align-items: center; + cursor: pointer; + user-select: none; + column-gap: ${({spacing:e})=>e[2]}; + } + + label > input[type='checkbox'] { + height: 0; + width: 0; + opacity: 0; + position: absolute; + } + + label > span { + display: flex; + align-items: center; + justify-content: center; + height: 100%; + width: 100%; + border: 1px solid ${({colors:e})=>e.neutrals400}; + color: ${({colors:e})=>e.white}; + background-color: transparent; + will-change: border-color, background-color; + } + + label > span > wui-icon { + opacity: 0; + will-change: opacity; + } + + label > input[type='checkbox']:checked + span > wui-icon { + color: ${({colors:e})=>e.white}; + } + + label > input[type='checkbox']:not(:checked) > span > wui-icon { + color: ${({colors:e})=>e.neutrals900}; + } + + label > input[type='checkbox']:checked + span > wui-icon { + opacity: 1; + } + + /* -- Sizes --------------------------------------------------- */ + label[data-size='lg'] > span { + width: 24px; + height: 24px; + min-width: 24px; + min-height: 24px; + border-radius: ${({borderRadius:e})=>e[10]}; + } + + label[data-size='md'] > span { + width: 20px; + height: 20px; + min-width: 20px; + min-height: 20px; + border-radius: ${({borderRadius:e})=>e[2]}; + } + + label[data-size='sm'] > span { + width: 16px; + height: 16px; + min-width: 16px; + min-height: 16px; + border-radius: ${({borderRadius:e})=>e[1]}; + } + + /* -- Focus states --------------------------------------------------- */ + label > input[type='checkbox']:focus-visible + span, + label > input[type='checkbox']:focus + span { + border: 1px solid ${({tokens:e})=>e.core.borderAccentPrimary}; + box-shadow: 0px 0px 0px 4px rgba(9, 136, 240, 0.2); + } + + /* -- Checked states --------------------------------------------------- */ + label > input[type='checkbox']:checked + span { + background-color: ${({tokens:e})=>e.core.iconAccentPrimary}; + border: 1px solid transparent; + } + + /* -- Hover states --------------------------------------------------- */ + input[type='checkbox']:not(:checked):not(:disabled) + span:hover { + border: 1px solid ${({colors:e})=>e.neutrals700}; + background-color: ${({colors:e})=>e.neutrals800}; + box-shadow: none; + } + + input[type='checkbox']:checked:not(:disabled) + span:hover { + border: 1px solid transparent; + background-color: ${({colors:e})=>e.accent080}; + box-shadow: none; + } + + /* -- Disabled state --------------------------------------------------- */ + label > input[type='checkbox']:checked:disabled + span { + border: 1px solid transparent; + opacity: 0.3; + } + + label > input[type='checkbox']:not(:checked):disabled + span { + border: 1px solid ${({colors:e})=>e.neutrals700}; + } + + label:has(input[type='checkbox']:disabled) { + cursor: auto; + } + + label > input[type='checkbox']:disabled + span { + cursor: not-allowed; + } +`,f=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let g={lg:"md",md:"sm",sm:"sm"},m=class extends i.oi{constructor(){super(...arguments),this.inputElementRef=(0,c.V)(),this.checked=void 0,this.disabled=!1,this.size="md"}render(){let e=g[this.size];return(0,i.dy)` + + `}dispatchChangeEvent(){this.dispatchEvent(new CustomEvent("checkboxChange",{detail:this.inputElementRef.value?.checked,bubbles:!0,composed:!0}))}};m.styles=[d.ET,p],f([(0,n.Cb)({type:Boolean})],m.prototype,"checked",void 0),f([(0,n.Cb)({type:Boolean})],m.prototype,"disabled",void 0),f([(0,n.Cb)()],m.prototype,"size",void 0),m=f([(0,u.M)("wui-checkbox")],m),r(44732);var y=(0,a.iv)` + :host { + display: flex; + align-items: center; + justify-content: center; + } + wui-checkbox { + padding: ${({spacing:e})=>e["3"]}; + } + a { + text-decoration: none; + color: ${({tokens:e})=>e.theme.textSecondary}; + font-weight: 500; + } +`,w=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let b=class extends i.oi{constructor(){super(),this.unsubscribe=[],this.checked=o.M.state.isLegalCheckboxChecked,this.unsubscribe.push(o.M.subscribeKey("isLegalCheckboxChecked",e=>{this.checked=e}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){let{termsConditionsUrl:e,privacyPolicyUrl:t}=s.OptionsController.state,r=s.OptionsController.state.features?.legalCheckbox;return(e||t)&&r?(0,i.dy)` + + + I agree to our ${this.termsTemplate()} ${this.andTemplate()} ${this.privacyTemplate()} + + + `:null}andTemplate(){let{termsConditionsUrl:e,privacyPolicyUrl:t}=s.OptionsController.state;return e&&t?"and":""}termsTemplate(){let{termsConditionsUrl:e}=s.OptionsController.state;return e?(0,i.dy)`terms of service`:null}privacyTemplate(){let{privacyPolicyUrl:e}=s.OptionsController.state;return e?(0,i.dy)`privacy policy`:null}onCheckboxChange(){o.M.setIsLegalCheckboxChecked(!this.checked)}};b.styles=[y],w([(0,n.SB)()],b.prototype,"checked",void 0),w([(0,a.Mo)("w3m-legal-checkbox")],b)},88239:function(e,t,r){"use strict";var i=r(31133),n=r(84927),o=r(5688),s=r(92413);r(96277),r(44732),r(63957);var a=(0,s.iv)` + :host wui-ux-by-reown { + padding-top: 0; + } + + :host wui-ux-by-reown.branding-only { + padding-top: ${({spacing:e})=>e["3"]}; + } + + a { + text-decoration: none; + color: ${({tokens:e})=>e.core.textAccentPrimary}; + font-weight: 500; + } +`,l=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let c=class extends i.oi{constructor(){super(),this.unsubscribe=[],this.remoteFeatures=o.OptionsController.state.remoteFeatures,this.unsubscribe.push(o.OptionsController.subscribeKey("remoteFeatures",e=>this.remoteFeatures=e))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){let{termsConditionsUrl:e,privacyPolicyUrl:t}=o.OptionsController.state,r=o.OptionsController.state.features?.legalCheckbox;return(e||t)&&!r?(0,i.dy)` + + + + By connecting your wallet, you agree to our
+ ${this.termsTemplate()} ${this.andTemplate()} ${this.privacyTemplate()} +
+
+ ${this.reownBrandingTemplate()} +
+ `:(0,i.dy)` + ${this.reownBrandingTemplate(!0)} + `}andTemplate(){let{termsConditionsUrl:e,privacyPolicyUrl:t}=o.OptionsController.state;return e&&t?"and":""}termsTemplate(){let{termsConditionsUrl:e}=o.OptionsController.state;return e?(0,i.dy)`Terms of Service`:null}privacyTemplate(){let{privacyPolicyUrl:e}=o.OptionsController.state;return e?(0,i.dy)`Privacy Policy`:null}reownBrandingTemplate(e=!1){return this.remoteFeatures?.reownBranding?e?(0,i.dy)``:(0,i.dy)``:null}};c.styles=[a],l([(0,n.SB)()],c.prototype,"remoteFeatures",void 0),l([(0,s.Mo)("w3m-legal-footer")],c)},5867:function(e,t,r){"use strict";var i=r(31133),n=r(5688),o=r(31929),s=r(43291),a=r(6943),l=r(86777),c=r(92413);r(96277),r(4594),r(51437),r(44732);var d=r(4786),u=(0,i.iv)``;let h=class extends i.oi{render(){let{termsConditionsUrl:e,privacyPolicyUrl:t}=n.OptionsController.state;return e||t?(0,i.dy)` + + + We work with the best providers to give you the lowest fees and best support. More options + coming soon! + + + ${this.howDoesItWorkTemplate()} + + `:null}howDoesItWorkTemplate(){return(0,i.dy)` + + How does it work? + `}onWhatIsBuy(){o.X.sendEvent({type:"track",event:"SELECT_WHAT_IS_A_BUY",properties:{isSmartAccount:(0,s.r9)(a.R.state.activeChain)===d.y_.ACCOUNT_TYPES.SMART_ACCOUNT}}),l.RouterController.push("WhatIsABuy")}};h.styles=[u],function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);o>3&&s&&Object.defineProperty(t,r,s)}([(0,c.Mo)("w3m-onramp-providers-footer")],h)},32567:function(e,t,r){"use strict";var i=r(31133),n=r(84927),o=r(7574),s=r(86777),a=r(89512),l=r(92413),c=(0,i.iv)` + :host { + width: 100%; + display: block; + } +`,d=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let u=class extends i.oi{constructor(){super(),this.unsubscribe=[],this.text="",this.open=o.f.state.open,this.unsubscribe.push(s.RouterController.subscribeKey("view",()=>{o.f.hide()}),a.I.subscribeKey("open",e=>{e||o.f.hide()}),o.f.subscribeKey("open",e=>{this.open=e}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e()),o.f.hide()}render(){return(0,i.dy)` +
+ ${this.renderChildren()} +
+ `}renderChildren(){return(0,i.dy)` `}onMouseEnter(){let e=this.getBoundingClientRect();if(!this.open){let t=document.querySelector("w3m-modal"),r={width:e.width,height:e.height,left:e.left,top:e.top};if(t){let i=t.getBoundingClientRect();r.left=e.left-(window.innerWidth-i.width)/2,r.top=e.top-(window.innerHeight-i.height)/2}o.f.showTooltip({message:this.text,triggerRect:r,variant:"shade"})}}onMouseLeave(e){this.contains(e.relatedTarget)||o.f.hide()}};u.styles=[c],d([(0,n.Cb)()],u.prototype,"text",void 0),d([(0,n.SB)()],u.prototype,"open",void 0),d([(0,l.Mo)("w3m-tooltip-trigger")],u)},92815:function(e,t,r){"use strict";var i=r(31133),n=r(84927),o=r(7574),s=r(92413);r(96277),r(4594),r(44732);var a=(0,s.iv)` + :host { + pointer-events: none; + } + + :host > wui-flex { + display: var(--w3m-tooltip-display); + opacity: var(--w3m-tooltip-opacity); + padding: 9px ${({spacing:e})=>e["3"]} 10px ${({spacing:e})=>e["3"]}; + border-radius: ${({borderRadius:e})=>e["3"]}; + color: ${({tokens:e})=>e.theme.backgroundPrimary}; + position: absolute; + top: var(--w3m-tooltip-top); + left: var(--w3m-tooltip-left); + transform: translate(calc(-50% + var(--w3m-tooltip-parent-width)), calc(-100% - 8px)); + max-width: calc(var(--apkt-modal-width) - ${({spacing:e})=>e["5"]}); + transition: opacity ${({durations:e})=>e.lg} + ${({easings:e})=>e["ease-out-power-2"]}; + will-change: opacity; + opacity: 0; + animation-duration: ${({durations:e})=>e.xl}; + animation-timing-function: ${({easings:e})=>e["ease-out-power-2"]}; + animation-name: fade-in; + animation-fill-mode: forwards; + } + + :host([data-variant='shade']) > wui-flex { + background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; + } + + :host([data-variant='shade']) > wui-flex > wui-text { + color: ${({tokens:e})=>e.theme.textSecondary}; + } + + :host([data-variant='fill']) > wui-flex { + background-color: ${({tokens:e})=>e.theme.textPrimary}; + border: none; + } + + wui-icon { + position: absolute; + width: 12px !important; + height: 4px !important; + color: ${({tokens:e})=>e.theme.foregroundPrimary}; + } + + wui-icon[data-placement='top'] { + bottom: 0px; + left: 50%; + transform: translate(-50%, 95%); + } + + wui-icon[data-placement='bottom'] { + top: 0; + left: 50%; + transform: translate(-50%, -95%) rotate(180deg); + } + + wui-icon[data-placement='right'] { + top: 50%; + left: 0; + transform: translate(-65%, -50%) rotate(90deg); + } + + wui-icon[data-placement='left'] { + top: 50%; + right: 0%; + transform: translate(65%, -50%) rotate(270deg); + } + + @keyframes fade-in { + from { + opacity: 0; + } + to { + opacity: 1; + } + } +`,l=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let c=class extends i.oi{constructor(){super(),this.unsubscribe=[],this.open=o.f.state.open,this.message=o.f.state.message,this.triggerRect=o.f.state.triggerRect,this.variant=o.f.state.variant,this.unsubscribe.push(o.f.subscribe(e=>{this.open=e.open,this.message=e.message,this.triggerRect=e.triggerRect,this.variant=e.variant}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){this.dataset.variant=this.variant;let e=this.triggerRect.top,t=this.triggerRect.left;return this.style.cssText=` + --w3m-tooltip-top: ${e}px; + --w3m-tooltip-left: ${t}px; + --w3m-tooltip-parent-width: ${this.triggerRect.width/2}px; + --w3m-tooltip-display: ${this.open?"flex":"none"}; + --w3m-tooltip-opacity: ${this.open?1:0}; + `,(0,i.dy)` + + ${this.message} + `}};c.styles=[a],l([(0,n.SB)()],c.prototype,"open",void 0),l([(0,n.SB)()],c.prototype,"message",void 0),l([(0,n.SB)()],c.prototype,"triggerRect",void 0),l([(0,n.SB)()],c.prototype,"variant",void 0),l([(0,s.Mo)("w3m-tooltip")],c)},54946:function(e,t,r){"use strict";r.d(t,{b:function(){return n}});var i=r(40257);let n={ACCOUNT_TABS:[{label:"Tokens"},{label:"Activity"}],SECURE_SITE_ORIGIN:(void 0!==i&&void 0!==i.env?i.env.NEXT_PUBLIC_SECURE_SITE_ORIGIN:void 0)||"https://secure.walletconnect.org",VIEW_DIRECTION:{Next:"next",Prev:"prev"},ANIMATION_DURATIONS:{HeaderText:120,ModalHeight:150,ViewTransition:150},VIEWS_WITH_LEGAL_FOOTER:["Connect","ConnectWallets","OnRampTokenSelect","OnRampFiatSelect","OnRampProviders"],VIEWS_WITH_DEFAULT_FOOTER:["Networks"]}},34252:function(e,t,r){"use strict";r.d(t,{g:function(){return a}});var i=r(44649),n=r(5688),o=r(86777),s=r(54946);let a={getTabsByNamespace:e=>e&&e===i.b.CHAIN.EVM?n.OptionsController.state.remoteFeatures?.activity===!1?s.b.ACCOUNT_TABS.filter(e=>"Activity"!==e.label):s.b.ACCOUNT_TABS:[],isValidReownName:e=>/^[a-zA-Z0-9]+$/gu.test(e),isValidEmail:e=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/gu.test(e),validateReownName:e=>e.replace(/\^/gu,"").toLowerCase().replace(/[^a-zA-Z0-9]/gu,""),hasFooter(){let e=o.RouterController.state.view;if(s.b.VIEWS_WITH_LEGAL_FOOTER.includes(e)){let{termsConditionsUrl:e,privacyPolicyUrl:t}=n.OptionsController.state,r=n.OptionsController.state.features?.legalCheckbox;return(!!e||!!t)&&!r}return s.b.VIEWS_WITH_DEFAULT_FOOTER.includes(e)}}},92413:function(e,t,r){"use strict";r.d(t,{kj:function(){return i},AI:function(){return c},Hg:function(){return o.H},iv:function(){return u.iv},Mo:function(){return d.M},n:function(){return n.n},Hs:function(){return n.Hs},R:function(){return n.R},gR:function(){return u.gR}});let i={interpolate(e,t,r){if(2!==e.length||2!==t.length)throw Error("inputRange and outputRange must be an array of length 2");let i=e[0]||0,n=e[1]||0,o=t[0]||0,s=t[1]||0;return rn?s:(s-o)/(n-i)*(r-i)+o}};var n=r(84249),o=r(3874),s=r(41262);let a=["receive","deposit","borrow","claim"],l=["withdraw","repay","burn"],c={getTransactionGroupTitle(e,t){let r=s.E.getYear(),i=s.E.getMonthNameByIndex(t);return e===r?i:`${i} ${e}`},getTransactionImages(e){let[t]=e;return e?.length>1?e.map(e=>this.getTransactionImage(e)):[this.getTransactionImage(t)]},getTransactionImage:e=>({type:c.getTransactionTransferTokenType(e),url:c.getTransactionImageURL(e)}),getTransactionImageURL(e){let t;let r=!!e?.nft_info,i=!!e?.fungible_info;return e&&r?t=e?.nft_info?.content?.preview?.url:e&&i&&(t=e?.fungible_info?.icon?.url),t},getTransactionTransferTokenType:e=>e?.fungible_info?"FUNGIBLE":e?.nft_info?"NFT":void 0,getTransactionDescriptions(e,t){let r=e?.metadata?.operationType,i=t||e?.transfers,n=i&&i.length>0,s=i&&i.length>1,c=n&&i.every(e=>!!e?.fungible_info),[d,u]=i||[],h=this.getTransferDescription(d);if(this.getTransferDescription(u),!n)return("send"===r||"receive"===r)&&c?[h=o.H.getTruncateString({string:e?.metadata.sentFrom,charsStart:4,charsEnd:6,truncate:"middle"}),o.H.getTruncateString({string:e?.metadata.sentTo,charsStart:4,charsEnd:6,truncate:"middle"})]:[e.metadata.status];if(s)return i?.map(e=>this.getTransferDescription(e));let p="";return a.includes(r)?p="+":l.includes(r)&&(p="-"),[h=p.concat(h)]},getTransferDescription(e){let t="";return e&&(e?.nft_info?t=e?.nft_info?.name||"-":e?.fungible_info&&(t=this.getFungibleTransferDescription(e)||"-")),t},getFungibleTransferDescription(e){return e?[this.getQuantityFixedValue(e?.quantity.numeric),e?.fungible_info?.symbol].join(" ").trim():null},mergeTransfers(e){if(e?.length<=1)return e;let t=this.filterGasFeeTransfers(e).reduce((e,t)=>{let r=t?.fungible_info?.name,i=e.find(({fungible_info:e,direction:i})=>r&&r===e?.name&&i===t.direction);if(i){let e=Number(i.quantity.numeric)+Number(t.quantity.numeric);i.quantity.numeric=e.toString(),i.value=(i.value||0)+(t.value||0)}else e.push(t);return e},[]),r=t;return t.length>2&&(r=t.sort((e,t)=>(t.value||0)-(e.value||0)).slice(0,2)),r=r.sort((e,t)=>"out"===e.direction&&"in"===t.direction?-1:"in"===e.direction&&"out"===t.direction?1:0)},filterGasFeeTransfers(e){let t=e?.reduce((e,t)=>{let r=t?.fungible_info?.name;return r&&(e[r]||(e[r]=[]),e[r].push(t)),e},{}),r=[];return Object.values(t??{}).forEach(e=>{if(1===e.length){let t=e[0];t&&r.push(t)}else{let t=e.filter(e=>"in"===e.direction),i=e.filter(e=>"out"===e.direction);if(1===t.length&&1===i.length){let n=t[0],o=i[0],s=!1;if(n&&o){let e=Number(n.quantity.numeric),t=Number(o.quantity.numeric);t<.1*e?(r.push(n),s=!0):e<.1*t&&(r.push(o),s=!0)}s||r.push(...e)}else{let t=this.filterGasFeesFromTokenGroup(e);r.push(...t)}}}),e?.forEach(e=>{e?.fungible_info?.name||r.push(e)}),r},filterGasFeesFromTokenGroup(e){if(e.length<=1)return e;let t=e?.map(e=>Number(e.quantity.numeric)),r=Math.max(...t);if(Math.min(...t)<.01*r)return e?.filter(e=>Number(e.quantity.numeric)>=.01*r);let i=e?.filter(e=>"in"===e.direction),n=e?.filter(e=>"out"===e.direction);if(1===i.length&&1===n.length){let e=i[0],t=n[0];if(e&&t){let r=Number(e.quantity.numeric),i=Number(t.quantity.numeric);if(i<.1*r)return[e];if(r<.1*i)return[t]}}return e},getQuantityFixedValue:e=>e?parseFloat(e).toFixed(3):null};var d=r(57116);r(2460);var u=r(11131)},97585:function(e,t,r){"use strict";r(98629)},7861:function(e,t,r){"use strict";var i=r(31133),n=r(84927),o=r(32801);r(74975),r(18360);var s=r(84249),a=r(57116);r(4163);var l=(0,i.iv)` + :host { + position: relative; + display: inline-block; + width: 100%; + } +`,c=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let d=class extends i.oi{constructor(){super(...arguments),this.disabled=!1}render(){return(0,i.dy)` + + ${this.templateError()} + `}templateError(){return this.errorMessage?(0,i.dy)`${this.errorMessage}`:null}};d.styles=[s.ET,l],c([(0,n.Cb)()],d.prototype,"errorMessage",void 0),c([(0,n.Cb)({type:Boolean})],d.prototype,"disabled",void 0),c([(0,n.Cb)()],d.prototype,"value",void 0),c([(0,n.Cb)()],d.prototype,"tabIdx",void 0),c([(0,a.M)("wui-email-input")],d)},96277:function(e,t,r){"use strict";r(5680)},92374:function(e,t,r){"use strict";r(1736)},29158:function(e,t,r){"use strict";r(4308)},4594:function(e,t,r){"use strict";r(74975)},64349:function(e,t,r){"use strict";r(4163)},51437:function(e,t,r){"use strict";var i=r(31133),n=r(84927);r(74975),r(18360);var o=r(84249),s=r(57116),a=r(11131),l=(0,a.iv)` + button { + border: none; + background: transparent; + height: 20px; + padding: ${({spacing:e})=>e[2]}; + column-gap: ${({spacing:e})=>e[1]}; + border-radius: ${({borderRadius:e})=>e[1]}; + padding: 0 ${({spacing:e})=>e[1]}; + border-radius: ${({spacing:e})=>e[1]}; + } + + /* -- Variants --------------------------------------------------------- */ + button[data-variant='accent'] { + color: ${({tokens:e})=>e.core.textAccentPrimary}; + } + + button[data-variant='secondary'] { + color: ${({tokens:e})=>e.theme.textSecondary}; + } + + /* -- Focus states --------------------------------------------------- */ + button:focus-visible:enabled { + box-shadow: 0px 0px 0px 4px rgba(9, 136, 240, 0.2); + } + + button[data-variant='accent']:focus-visible:enabled { + background-color: ${({tokens:e})=>e.core.foregroundAccent010}; + } + + button[data-variant='secondary']:focus-visible:enabled { + background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; + } + + /* -- Hover & Active states ----------------------------------------------------------- */ + button[data-variant='accent']:hover:enabled { + background-color: ${({tokens:e})=>e.core.foregroundAccent010}; + } + + button[data-variant='secondary']:hover:enabled { + background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; + } + + button[data-variant='accent']:focus-visible { + background-color: ${({tokens:e})=>e.core.foregroundAccent010}; + } + + button[data-variant='secondary']:focus-visible { + background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; + box-shadow: 0px 0px 0px 4px rgba(9, 136, 240, 0.2); + } + + button[disabled] { + opacity: 0.5; + cursor: not-allowed; + } +`,c=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let d={sm:"sm-medium",md:"md-medium"},u={accent:"accent-primary",secondary:"secondary"},h=class extends i.oi{constructor(){super(...arguments),this.size="md",this.disabled=!1,this.variant="accent",this.icon=void 0}render(){return(0,i.dy)` + + `}iconTemplate(){return this.icon?(0,i.dy)``:null}};h.styles=[o.ET,o.ZM,l],c([(0,n.Cb)()],h.prototype,"size",void 0),c([(0,n.Cb)({type:Boolean})],h.prototype,"disabled",void 0),c([(0,n.Cb)()],h.prototype,"variant",void 0),c([(0,n.Cb)()],h.prototype,"icon",void 0),c([(0,s.M)("wui-link")],h)},53774:function(e,t,r){"use strict";var i=r(31133),n=r(84927),o=r(32801);r(21793),r(18360);var s=r(84249),a=r(57116),l=r(11131),c=(0,l.iv)` + :host { + width: 100%; + } + + button { + display: flex; + align-items: center; + justify-content: space-between; + padding: ${({spacing:e})=>e[3]}; + width: 100%; + background-color: ${({tokens:e})=>e.theme.backgroundPrimary}; + border-radius: ${({borderRadius:e})=>e[4]}; + transition: + background-color ${({durations:e})=>e.lg} + ${({easings:e})=>e["ease-out-power-2"]}, + scale ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]}; + will-change: background-color, scale; + } + + wui-text { + text-transform: capitalize; + } + + wui-image { + color: ${({tokens:e})=>e.theme.textPrimary}; + } + + @media (hover: hover) { + button:hover:enabled { + background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; + } + } + + button:disabled { + opacity: 0.5; + cursor: not-allowed; + } +`,d=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let u=class extends i.oi{constructor(){super(...arguments),this.imageSrc="google",this.loading=!1,this.disabled=!1,this.rightIcon=!0,this.rounded=!1,this.fullSize=!1}render(){return this.dataset.rounded=this.rounded?"true":"false",(0,i.dy)` + + `}templateLeftIcon(){return this.icon?(0,i.dy)``:(0,i.dy)``}templateRightIcon(){return this.rightIcon?this.loading?(0,i.dy)``:(0,i.dy)``:null}};u.styles=[s.ET,s.ZM,c],d([(0,n.Cb)()],u.prototype,"imageSrc",void 0),d([(0,n.Cb)()],u.prototype,"icon",void 0),d([(0,n.Cb)()],u.prototype,"iconColor",void 0),d([(0,n.Cb)({type:Boolean})],u.prototype,"loading",void 0),d([(0,n.Cb)()],u.prototype,"tabIdx",void 0),d([(0,n.Cb)({type:Boolean})],u.prototype,"disabled",void 0),d([(0,n.Cb)({type:Boolean})],u.prototype,"rightIcon",void 0),d([(0,n.Cb)({type:Boolean})],u.prototype,"rounded",void 0),d([(0,n.Cb)({type:Boolean})],u.prototype,"fullSize",void 0),d([(0,a.M)("wui-list-item")],u)},15834:function(e,t,r){"use strict";var i=r(31133),n=r(84927),o=r(32801);r(18360);var s=r(84249),a=r(57116);r(84793);var l=r(11131),c=(0,l.iv)` + :host { + width: 100%; + } + + button { + display: flex; + align-items: center; + justify-content: space-between; + padding: ${({spacing:e})=>e[3]}; + width: 100%; + background-color: transparent; + border-radius: ${({borderRadius:e})=>e[4]}; + } + + wui-text { + text-transform: capitalize; + } + + @media (hover: hover) { + button:hover:enabled { + background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; + } + } + + button:disabled { + opacity: 0.5; + cursor: not-allowed; + } +`,d=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let u=class extends i.oi{constructor(){super(...arguments),this.logo="google",this.name="Continue with google",this.disabled=!1}render(){return(0,i.dy)` + + `}};u.styles=[s.ET,s.ZM,c],d([(0,n.Cb)()],u.prototype,"logo",void 0),d([(0,n.Cb)()],u.prototype,"name",void 0),d([(0,n.Cb)()],u.prototype,"tabIdx",void 0),d([(0,n.Cb)({type:Boolean})],u.prototype,"disabled",void 0),d([(0,a.M)("wui-list-social")],u)},79207:function(e,t,r){"use strict";var i=r(31133),n=r(84927),o=r(23614);r(74975),r(23805),r(18360),r(5680);var s=r(84249),a=r(57116),l=r(11131),c=(0,l.iv)` + :host { + width: 100%; + } + + button { + padding: ${({spacing:e})=>e[3]}; + display: flex; + gap: ${({spacing:e})=>e[3]}; + justify-content: space-between; + width: 100%; + border-radius: ${({borderRadius:e})=>e[4]}; + background-color: transparent; + } + + @media (hover: hover) { + button:hover:enabled { + background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; + } + } + + button:focus-visible:enabled { + background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; + box-shadow: 0 0 0 4px ${({tokens:e})=>e.core.foregroundAccent040}; + } + + button[data-clickable='false'] { + pointer-events: none; + background-color: transparent; + } + + wui-image, + wui-icon { + width: ${({spacing:e})=>e[10]}; + height: ${({spacing:e})=>e[10]}; + } + + wui-image { + border-radius: ${({borderRadius:e})=>e[16]}; + } + + .token-name-container { + flex: 1; + } +`,d=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let u=class extends i.oi{constructor(){super(...arguments),this.tokenName="",this.tokenImageUrl="",this.tokenValue=0,this.tokenAmount="0.0",this.tokenCurrency="",this.clickable=!1}render(){return(0,i.dy)` + + `}visualTemplate(){return this.tokenName&&this.tokenImageUrl?(0,i.dy)``:(0,i.dy)``}};u.styles=[s.ET,s.ZM,c],d([(0,n.Cb)()],u.prototype,"tokenName",void 0),d([(0,n.Cb)()],u.prototype,"tokenImageUrl",void 0),d([(0,n.Cb)({type:Number})],u.prototype,"tokenValue",void 0),d([(0,n.Cb)()],u.prototype,"tokenAmount",void 0),d([(0,n.Cb)()],u.prototype,"tokenCurrency",void 0),d([(0,n.Cb)({type:Boolean})],u.prototype,"clickable",void 0),d([(0,a.M)("wui-list-token")],u)},97928:function(e,t,r){"use strict";var i=r(31133),n=r(84927),o=r(32801);r(74975),r(18360),r(1736);var s=r(84249),a=r(57116);r(43465);var l=r(11131),c=(0,l.iv)` + :host { + position: relative; + border-radius: ${({borderRadius:e})=>e[2]}; + width: 40px; + height: 40px; + overflow: hidden; + background: ${({tokens:e})=>e.theme.foregroundPrimary}; + display: flex; + justify-content: center; + align-items: center; + flex-wrap: wrap; + column-gap: ${({spacing:e})=>e[1]}; + padding: ${({spacing:e})=>e[1]}; + } + + :host > wui-wallet-image { + width: 14px; + height: 14px; + border-radius: 2px; + } +`,d=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let u=class extends i.oi{constructor(){super(...arguments),this.walletImages=[]}render(){let e=this.walletImages.length<4;return(0,i.dy)`${this.walletImages.slice(0,4).map(({src:e,walletName:t})=>(0,i.dy)` + + `)} + ${e?[...Array(4-this.walletImages.length)].map(()=>(0,i.dy)` `):null} `}};u.styles=[s.ET,c],d([(0,n.Cb)({type:Array})],u.prototype,"walletImages",void 0),u=d([(0,a.M)("wui-all-wallets-image")],u),r(80675);var h=(0,l.iv)` + :host { + width: 100%; + } + + button { + column-gap: ${({spacing:e})=>e[2]}; + padding: ${({spacing:e})=>e[3]}; + width: 100%; + background-color: transparent; + border-radius: ${({borderRadius:e})=>e[4]}; + color: ${({tokens:e})=>e.theme.textPrimary}; + } + + button > wui-wallet-image { + background: ${({tokens:e})=>e.theme.foregroundSecondary}; + } + + button > wui-text:nth-child(2) { + display: flex; + flex: 1; + } + + button:hover:enabled { + background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; + } + + button[data-all-wallets='true'] { + background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; + } + + button[data-all-wallets='true']:hover:enabled { + background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; + } + + button:focus-visible:enabled { + background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; + box-shadow: 0 0 0 4px ${({tokens:e})=>e.core.foregroundAccent020}; + } + + button:disabled { + background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; + opacity: 0.5; + cursor: not-allowed; + } + + button:disabled > wui-tag { + background-color: ${({tokens:e})=>e.core.glass010}; + color: ${({tokens:e})=>e.theme.foregroundTertiary}; + } + + wui-flex.namespace-icon { + width: 16px; + height: 16px; + border-radius: ${({borderRadius:e})=>e.round}; + background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; + box-shadow: 0 0 0 2px ${({tokens:e})=>e.theme.backgroundPrimary}; + transition: box-shadow var(--apkt-durations-lg) var(--apkt-easings-ease-out-power-2); + } + + button:hover:enabled wui-flex.namespace-icon { + box-shadow: 0 0 0 2px ${({tokens:e})=>e.theme.foregroundPrimary}; + } + + wui-flex.namespace-icon > wui-icon { + width: 10px; + height: 10px; + } + + wui-flex.namespace-icon:not(:first-child) { + margin-left: -4px; + } +`,p=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let f={eip155:"ethereum",solana:"solana",bip122:"bitcoin",polkadot:void 0,cosmos:void 0,sui:void 0,stacks:void 0,ton:"ton"},g=class extends i.oi{constructor(){super(...arguments),this.walletImages=[],this.imageSrc="",this.name="",this.size="md",this.tabIdx=void 0,this.namespaces=[],this.disabled=!1,this.showAllWallets=!1,this.loading=!1,this.loadingSpinnerColor="accent-100"}render(){return this.dataset.size=this.size,(0,i.dy)` + + `}templateNamespaces(){return this.namespaces?.length?(0,i.dy)` + ${this.namespaces.map((e,t)=>(0,i.dy)` + + `)} + `:null}templateAllWallets(){return this.showAllWallets&&this.imageSrc?(0,i.dy)` `:this.showAllWallets&&this.walletIcon?(0,i.dy)` `:null}templateWalletImage(){return!this.showAllWallets&&this.imageSrc?(0,i.dy)``:this.showAllWallets||this.imageSrc?null:(0,i.dy)``}templateStatus(){return this.loading?(0,i.dy)``:this.tagLabel&&this.tagVariant?(0,i.dy)`${this.tagLabel}`:null}};g.styles=[s.ET,s.ZM,h],p([(0,n.Cb)({type:Array})],g.prototype,"walletImages",void 0),p([(0,n.Cb)()],g.prototype,"imageSrc",void 0),p([(0,n.Cb)()],g.prototype,"name",void 0),p([(0,n.Cb)()],g.prototype,"size",void 0),p([(0,n.Cb)()],g.prototype,"tagLabel",void 0),p([(0,n.Cb)()],g.prototype,"tagVariant",void 0),p([(0,n.Cb)()],g.prototype,"walletIcon",void 0),p([(0,n.Cb)()],g.prototype,"tabIdx",void 0),p([(0,n.Cb)({type:Array})],g.prototype,"namespaces",void 0),p([(0,n.Cb)({type:Boolean})],g.prototype,"disabled",void 0),p([(0,n.Cb)({type:Boolean})],g.prototype,"showAllWallets",void 0),p([(0,n.Cb)({type:Boolean})],g.prototype,"loading",void 0),p([(0,n.Cb)({type:String})],g.prototype,"loadingSpinnerColor",void 0),p([(0,a.M)("wui-list-wallet")],g)},81255:function(e,t,r){"use strict";r(21793)},87302:function(e,t,r){"use strict";var i=r(31133),n=r(84927),o=r(84249),s=r(57116),a=r(11131),l=(0,a.iv)` + :host { + display: block; + width: 100px; + height: 100px; + } + + svg { + width: 100px; + height: 100px; + } + + rect { + fill: none; + stroke: ${e=>e.colors.accent100}; + stroke-width: 3px; + stroke-linecap: round; + animation: dash 1s linear infinite; + } + + @keyframes dash { + to { + stroke-dashoffset: 0px; + } + } +`,c=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let d=class extends i.oi{constructor(){super(...arguments),this.radius=36}render(){return this.svgLoaderTemplate()}svgLoaderTemplate(){let e=this.radius>50?50:this.radius,t=36-e;return(0,i.dy)` + + + + `}};d.styles=[o.ET,l],c([(0,n.Cb)({type:Number})],d.prototype,"radius",void 0),c([(0,s.M)("wui-loading-thumbnail")],d)},10005:function(e,t,r){"use strict";var i=r(31133),n=r(84927);let o=(0,i.YP)` + +`;var s=r(24348);let a=(0,i.YP)` + + + +`;r(74975),r(23805);var l=r(84249),c=r(57116),d=r(11131),u=(0,d.iv)` + :host { + position: relative; + border-radius: inherit; + display: flex; + justify-content: center; + align-items: center; + width: var(--local-width); + height: var(--local-height); + } + + :host([data-round='true']) { + background: ${({tokens:e})=>e.theme.foregroundPrimary}; + border-radius: 100%; + outline: 1px solid ${({tokens:e})=>e.core.glass010}; + } + + svg { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 1; + } + + svg > path { + stroke: var(--local-stroke); + } + + wui-image { + width: 100%; + height: 100%; + -webkit-clip-path: var(--local-path); + clip-path: var(--local-path); + background: ${({tokens:e})=>e.theme.foregroundPrimary}; + } + + wui-icon { + transform: translateY(-5%); + width: var(--local-icon-size); + height: var(--local-icon-size); + } +`,h=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let p=class extends i.oi{constructor(){super(...arguments),this.size="md",this.name="uknown",this.networkImagesBySize={sm:a,md:s.W,lg:o},this.selected=!1,this.round=!1}render(){return this.round?(this.dataset.round="true",this.style.cssText=` + --local-width: var(--apkt-spacing-10); + --local-height: var(--apkt-spacing-10); + --local-icon-size: var(--apkt-spacing-4); + `):this.style.cssText=` + + --local-path: var(--apkt-path-network-${this.size}); + --local-width: var(--apkt-width-network-${this.size}); + --local-height: var(--apkt-height-network-${this.size}); + --local-icon-size: var(--apkt-spacing-${({sm:"4",md:"6",lg:"10"})[this.size]}); + `,(0,i.dy)`${this.templateVisual()} ${this.svgTemplate()} `}svgTemplate(){return this.round?null:this.networkImagesBySize[this.size]}templateVisual(){return this.imageSrc?(0,i.dy)``:(0,i.dy)``}};p.styles=[l.ET,u],h([(0,n.Cb)()],p.prototype,"size",void 0),h([(0,n.Cb)()],p.prototype,"name",void 0),h([(0,n.Cb)({type:Object})],p.prototype,"networkImagesBySize",void 0),h([(0,n.Cb)()],p.prototype,"imageSrc",void 0),h([(0,n.Cb)({type:Boolean})],p.prototype,"selected",void 0),h([(0,n.Cb)({type:Boolean})],p.prototype,"round",void 0),h([(0,c.M)("wui-network-image")],p)},930:function(e,t,r){"use strict";var i=r(31133),n=r(84927);r(74975),r(23805),r(5680);var o=r(35819);function s(e,t,r){return e!==t&&(e-t<0?t-e:e-t)<=r+.1}let a={generate({uri:e,size:t,logoSize:r,padding:n=8,dotColor:a="var(--apkt-colors-black)"}){let l=[],c=function(e,t){let r=Array.prototype.slice.call(o.create(e,{errorCorrectionLevel:"Q"}).modules.data,0),i=Math.sqrt(r.length);return r.reduce((e,t,r)=>(r%i==0?e.push([t]):e[e.length-1].push(t))&&e,[])}(e,0),d=(t-2*n)/c.length,u=[{x:0,y:0},{x:1,y:0},{x:0,y:1}];u.forEach(({x:e,y:t})=>{let r=(c.length-7)*d*e+n,o=(c.length-7)*d*t+n;for(let e=0;e + `)}});let h=Math.floor((r+25)/d),p=c.length/2-h/2,f=c.length/2+h/2-1,g=[];c.forEach((e,t)=>{e.forEach((e,r)=>{!c[t][r]||t<7&&r<7||t>c.length-8&&r<7||t<7&&r>c.length-8||t>p&&tp&&r{m[e]?m[e]?.push(t):m[e]=[t]}),Object.entries(m).map(([e,t])=>{let r=t.filter(e=>t.every(t=>!s(e,t,d)));return[Number(e),r]}).forEach(([e,t])=>{t.forEach(t=>{l.push((0,i.YP)``)})}),Object.entries(m).filter(([e,t])=>t.length>1).map(([e,t])=>{let r=t.filter(e=>t.some(t=>s(e,t,d)));return[Number(e),r]}).map(([e,t])=>{t.sort((e,t)=>et.some(t=>s(e,t,d)));t?t.push(e):r.push([e])}return[e,r.map(e=>[e[0],e[e.length-1]])]}).forEach(([e,t])=>{t.forEach(([t,r])=>{l.push((0,i.YP)` + + `)})}),l}};var l=r(84249),c=r(57116),d=r(11131),u=(0,d.iv)` + :host { + position: relative; + user-select: none; + display: block; + overflow: hidden; + aspect-ratio: 1 / 1; + width: 100%; + height: 100%; + background-color: ${({colors:e})=>e.white}; + border: 1px solid ${({tokens:e})=>e.theme.borderPrimary}; + } + + :host { + border-radius: ${({borderRadius:e})=>e[4]}; + display: flex; + align-items: center; + justify-content: center; + } + + :host([data-clear='true']) > wui-icon { + display: none; + } + + svg:first-child, + wui-image, + wui-icon { + position: absolute; + top: 50%; + left: 50%; + transform: translateY(-50%) translateX(-50%); + background-color: ${({tokens:e})=>e.theme.backgroundPrimary}; + box-shadow: inset 0 0 0 4px ${({tokens:e})=>e.theme.backgroundPrimary}; + border-radius: ${({borderRadius:e})=>e[6]}; + } + + wui-image { + width: 25%; + height: 25%; + border-radius: ${({borderRadius:e})=>e[2]}; + } + + wui-icon { + width: 100%; + height: 100%; + color: #3396ff !important; + transform: translateY(-50%) translateX(-50%) scale(0.25); + } + + wui-icon > svg { + width: inherit; + height: inherit; + } +`,h=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let p=class extends i.oi{constructor(){super(...arguments),this.uri="",this.size=500,this.theme="dark",this.imageSrc=void 0,this.alt=void 0,this.arenaClear=void 0,this.farcaster=void 0}render(){return this.dataset.theme=this.theme,this.dataset.clear=String(this.arenaClear),(0,i.dy)` + ${this.templateVisual()} ${this.templateSvg()} + `}templateSvg(){return(0,i.YP)` + + ${a.generate({uri:this.uri,size:this.size,logoSize:this.arenaClear?0:this.size/4})} + + `}templateVisual(){return this.imageSrc?(0,i.dy)``:this.farcaster?(0,i.dy)``:(0,i.dy)``}};p.styles=[l.ET,u],h([(0,n.Cb)()],p.prototype,"uri",void 0),h([(0,n.Cb)({type:Number})],p.prototype,"size",void 0),h([(0,n.Cb)()],p.prototype,"theme",void 0),h([(0,n.Cb)()],p.prototype,"imageSrc",void 0),h([(0,n.Cb)()],p.prototype,"alt",void 0),h([(0,n.Cb)({type:Boolean})],p.prototype,"arenaClear",void 0),h([(0,n.Cb)({type:Boolean})],p.prototype,"farcaster",void 0),h([(0,c.M)("wui-qr-code")],p)},39203:function(e,t,r){"use strict";var i=r(31133),n=r(84927);r(18360);var o=r(84249),s=r(57116),a=r(11131),l=(0,a.iv)` + :host { + position: relative; + display: flex; + width: 100%; + height: 1px; + background-color: ${({tokens:e})=>e.theme.borderPrimary}; + justify-content: center; + align-items: center; + } + + :host > wui-text { + position: absolute; + padding: 0px 8px; + background-color: ${({tokens:e})=>e.theme.backgroundPrimary}; + transition: background-color ${({durations:e})=>e.lg} + ${({easings:e})=>e["ease-out-power-2"]}; + will-change: background-color; + } +`,c=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let d=class extends i.oi{constructor(){super(...arguments),this.text=""}render(){return(0,i.dy)`${this.template()}`}template(){return this.text?(0,i.dy)`${this.text}`:null}};d.styles=[o.ET,l],c([(0,n.Cb)()],d.prototype,"text",void 0),c([(0,s.M)("wui-separator")],d)},80843:function(e,t,r){"use strict";r(42653)},60830:function(e,t,r){"use strict";r(80675)},44732:function(e,t,r){"use strict";r(18360)},63957:function(e,t,r){"use strict";var i=r(31133);r(74975),r(18360),r(5680);var n=r(84249),o=r(57116),s=r(11131),a=(0,s.iv)` + .reown-logo { + height: 24px; + } + + a { + text-decoration: none; + cursor: pointer; + color: ${({tokens:e})=>e.theme.textSecondary}; + } + + a:hover { + opacity: 0.9; + } +`;let l=class extends i.oi{render(){return(0,i.dy)` + + + UX by + + + + `}};l.styles=[n.ET,n.ZM,a],function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);o>3&&s&&Object.defineProperty(t,r,s)}([(0,o.M)("wui-ux-by-reown")],l)},62346:function(e,t,r){"use strict";var i=r(31133),n=r(84927),o=r(51001);let s=(0,i.YP)` + + + + + + + + + + + +`,a=(0,i.YP)` + + + + + + + + `,l=(0,i.YP)` + + + + + + + + + + + + + + + + `,c=(0,i.YP)` + + + + + + + + + + + + +`,d=(0,i.YP)` + + + + + + + + + + + + + `,u=(0,i.YP)` + + + + + + + + + + + + + + + `,h=(0,i.YP)` + + + + + + + + + +`,p=(0,i.YP)` + + + + + +`,f=(0,i.YP)` + + + + + + + + + + + + + + + + +`,g=(0,i.YP)` + + + + + +`,m=(0,i.YP)` + + + + + + + + + + `,y=(0,i.YP)` + + + + + + + + + + + + + + + + + + + + + + + + + + + + +`,w=(0,i.YP)` + + + + + + + + + + + + + + + +`,b=(0,i.YP)` + + + + + + + + + + `,v=(0,i.YP)` + + + + + + + + +`,C=(0,i.YP)` + + + + + + + + + + + + +`,E=(0,i.YP)` + + + + + + + + + + + + + + + + + + +`,x=(0,i.YP)` + + + + + + + + + + + + + + + `,_=(0,i.YP)` + + + + + + + + + + + + + + + + + `,A=(0,i.YP)` + + + + + + + + + + + + + + `;var S=r(84249),I=r(57116),N=(0,i.iv)` + :host { + display: block; + width: var(--local-size); + height: var(--local-size); + } + + :host svg { + width: 100%; + height: 100%; + } +`,k=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let R={browser:a,dao:l,defi:c,defiAlt:d,eth:u,layers:p,lock:g,login:m,network:w,nft:b,noun:v,profile:x,system:A,meld:y,onrampCard:C,google:h,pencil:E,lightbulb:f,solana:_,ton:o.i,bitcoin:s},O=class extends i.oi{constructor(){super(...arguments),this.name="browser",this.size="md"}render(){return this.style.cssText=` + --local-size: var(--apkt-visual-size-${this.size}); + `,(0,i.dy)`${R[this.name]}`}};O.styles=[S.ET,N],k([(0,n.Cb)()],O.prototype,"name",void 0),k([(0,n.Cb)()],O.prototype,"size",void 0),k([(0,I.M)("wui-visual")],O)},40511:function(e,t,r){"use strict";r(43465)},24348:function(e,t,r){"use strict";r.d(t,{W:function(){return n}});var i=r(31133);let n=(0,i.YP)` + +`},51001:function(e,t,r){"use strict";r.d(t,{i:function(){return n}});var i=r(31133);let n=(0,i.YP)` + + + +`},74975:function(e,t,r){"use strict";var i=r(31133),n=r(84927),o=r(81997);let s=Symbol.for(""),a=e=>{if(e?.r===s)return e?._$litStatic$},l=e=>({_$litStatic$:e,r:s}),c=new Map,d=e=>(t,...r)=>{let i,n;let o=r.length,s=[],l=[],d,u=0,h=!1;for(;u + + + + + + + + + + + + + +`,p=(0,i.YP)` + + + + + + + + + + + + + +`,f=(0,i.YP)` + + + +`,g=(0,i.YP)` + + + + + + + + + + + + + + + + + + + +`,m=(0,i.YP)` + +`,y=(0,i.YP)` + + + + + + + + + + +`,w=(0,i.YP)` + + +`,b=(0,i.YP)` + +`,v=(0,i.YP)` + + + + + + + + + + + + + + + +`,C=(0,i.YP)` + + + + +`,E=(0,i.YP)` + + + + + + + + + + + + + +`,x=(0,i.YP)` + + + + +`,_=(0,i.YP)` + + + + +`,A=(0,i.YP)` + + + + + + + + + + + + +`,S=(0,i.YP)` + + + +`,I=(0,i.YP)` + + + + + + + + + + + + + + +`;var N=r(51001);let k=(0,i.YP)` + + + + + + + + + + + + + +`,R=(0,i.YP)` + +`,O=(0,i.YP)` + + + +`,T=(0,i.YP)` + + + +`,P=(0,i.YP)` + + + + + + + + + + + +`,$=(0,i.YP)` + + + + + + +`,D=(0,i.YP)` + + + + + + + +`;var U=r(11131),L=r(84249),M=r(57116),B=(0,i.iv)` + :host { + display: flex; + justify-content: center; + align-items: center; + aspect-ratio: 1 / 1; + color: var(--local-color); + width: var(--local-width); + } + + svg { + height: inherit; + width: inherit; + object-fit: contain; + object-position: center; + } +`,j=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let F={add:"ph-plus",allWallets:"ph-dots-three",arrowBottom:"ph-arrow-down",arrowBottomCircle:"ph-arrow-circle-down",arrowClockWise:"ph-arrow-clockwise",arrowLeft:"ph-arrow-left",arrowRight:"ph-arrow-right",arrowTop:"ph-arrow-up",arrowTopRight:"ph-arrow-up-right",bank:"ph-bank",bin:"ph-trash",browser:"ph-browser",card:"ph-credit-card",checkmark:"ph-check",checkmarkBold:"ph-check",chevronBottom:"ph-caret-down",chevronLeft:"ph-caret-left",chevronRight:"ph-caret-right",chevronTop:"ph-caret-up",clock:"ph-clock",close:"ph-x",coinPlaceholder:"ph-circle-half",compass:"ph-compass",copy:"ph-copy",desktop:"ph-desktop",dollar:"ph-currency-dollar",download:"ph-vault",exclamationCircle:"ph-warning-circle",extension:"ph-puzzle-piece",externalLink:"ph-arrow-square-out",filters:"ph-funnel-simple",helpCircle:"ph-question",id:"ph-identification-card",image:"ph-image",info:"ph-info",lightbulb:"ph-lightbulb",mail:"ph-envelope",mobile:"ph-device-mobile",more:"ph-dots-three",networkPlaceholder:"ph-globe",nftPlaceholder:"ph-image",plus:"ph-plus",power:"ph-power",qrCode:"ph-qr-code",questionMark:"ph-question",refresh:"ph-arrow-clockwise",recycleHorizontal:"ph-arrows-clockwise",search:"ph-magnifying-glass",sealCheck:"ph-seal-check",send:"ph-paper-plane-right",signOut:"ph-sign-out",spinner:"ph-spinner",swapHorizontal:"ph-arrows-left-right",swapVertical:"ph-arrows-down-up",threeDots:"ph-dots-three",user:"ph-user",verify:"ph-seal-check",verifyFilled:"ph-seal-check",wallet:"ph-wallet",warning:"ph-warning",warningCircle:"ph-warning-circle",appStore:"",apple:"",bitcoin:"",chromeStore:"",cursor:"",discord:"",ethereum:"",etherscan:"",facebook:"",farcaster:"",github:"",google:"",playStore:"",reown:"",solana:"",ton:"",telegram:"",twitch:"",twitterIcon:"",twitter:"",walletConnect:"",walletConnectBrown:"",walletConnectLightBrown:"",x:""},W={"ph-arrow-circle-down":()=>Promise.all([r.e(790),r.e(2656)]).then(r.bind(r,72656)),"ph-arrow-clockwise":()=>Promise.all([r.e(790),r.e(8145)]).then(r.bind(r,48145)),"ph-arrow-down":()=>Promise.all([r.e(790),r.e(1222)]).then(r.bind(r,61222)),"ph-arrow-left":()=>Promise.all([r.e(790),r.e(851)]).then(r.bind(r,60851)),"ph-arrow-right":()=>Promise.all([r.e(790),r.e(3529)]).then(r.bind(r,3529)),"ph-arrow-square-out":()=>Promise.all([r.e(790),r.e(2080)]).then(r.bind(r,92080)),"ph-arrows-down-up":()=>Promise.all([r.e(790),r.e(8257)]).then(r.bind(r,38257)),"ph-arrows-left-right":()=>Promise.all([r.e(790),r.e(4156)]).then(r.bind(r,44156)),"ph-arrow-up":()=>Promise.all([r.e(790),r.e(2103)]).then(r.bind(r,92103)),"ph-arrow-up-right":()=>Promise.all([r.e(790),r.e(4278)]).then(r.bind(r,74278)),"ph-arrows-clockwise":()=>Promise.all([r.e(790),r.e(687)]).then(r.bind(r,40687)),"ph-bank":()=>Promise.all([r.e(790),r.e(2381)]).then(r.bind(r,32381)),"ph-browser":()=>Promise.all([r.e(790),r.e(5370)]).then(r.bind(r,65370)),"ph-caret-down":()=>Promise.all([r.e(790),r.e(4653)]).then(r.bind(r,74653)),"ph-caret-left":()=>Promise.all([r.e(790),r.e(7550)]).then(r.bind(r,27550)),"ph-caret-right":()=>Promise.all([r.e(790),r.e(4324)]).then(r.bind(r,4324)),"ph-caret-up":()=>Promise.all([r.e(790),r.e(8213)]).then(r.bind(r,8213)),"ph-check":()=>Promise.all([r.e(790),r.e(5957)]).then(r.bind(r,25957)),"ph-circle-half":()=>Promise.all([r.e(790),r.e(4792)]).then(r.bind(r,64792)),"ph-clock":()=>Promise.all([r.e(790),r.e(7107)]).then(r.bind(r,67107)),"ph-compass":()=>Promise.all([r.e(790),r.e(1414)]).then(r.bind(r,11414)),"ph-copy":()=>Promise.all([r.e(790),r.e(3631)]).then(r.bind(r,83631)),"ph-credit-card":()=>Promise.all([r.e(790),r.e(3869)]).then(r.bind(r,43869)),"ph-currency-dollar":()=>Promise.all([r.e(790),r.e(7076)]).then(r.bind(r,17076)),"ph-desktop":()=>Promise.all([r.e(790),r.e(8426)]).then(r.bind(r,18426)),"ph-device-mobile":()=>Promise.all([r.e(790),r.e(9984)]).then(r.bind(r,9984)),"ph-dots-three":()=>Promise.all([r.e(790),r.e(4931)]).then(r.bind(r,4931)),"ph-vault":()=>Promise.all([r.e(790),r.e(2464)]).then(r.bind(r,32464)),"ph-envelope":()=>Promise.all([r.e(790),r.e(5988)]).then(r.bind(r,65988)),"ph-funnel-simple":()=>Promise.all([r.e(790),r.e(1078)]).then(r.bind(r,21078)),"ph-globe":()=>Promise.all([r.e(790),r.e(8592)]).then(r.bind(r,98592)),"ph-identification-card":()=>Promise.all([r.e(790),r.e(3124)]).then(r.bind(r,23124)),"ph-image":()=>Promise.all([r.e(790),r.e(5857)]).then(r.bind(r,75857)),"ph-info":()=>Promise.all([r.e(790),r.e(1086)]).then(r.bind(r,71086)),"ph-lightbulb":()=>Promise.all([r.e(790),r.e(5851)]).then(r.bind(r,45851)),"ph-magnifying-glass":()=>Promise.all([r.e(790),r.e(3314)]).then(r.bind(r,83314)),"ph-paper-plane-right":()=>Promise.all([r.e(790),r.e(169)]).then(r.bind(r,70169)),"ph-plus":()=>Promise.all([r.e(790),r.e(131)]).then(r.bind(r,50131)),"ph-power":()=>Promise.all([r.e(790),r.e(3664)]).then(r.bind(r,53664)),"ph-puzzle-piece":()=>Promise.all([r.e(790),r.e(3298)]).then(r.bind(r,33298)),"ph-qr-code":()=>Promise.all([r.e(790),r.e(6554)]).then(r.bind(r,86554)),"ph-question":()=>Promise.all([r.e(790),r.e(375)]).then(r.bind(r,50375)),"ph-question-circle":()=>Promise.all([r.e(790),r.e(5779)]).then(r.bind(r,35779)),"ph-seal-check":()=>Promise.all([r.e(790),r.e(9365)]).then(r.bind(r,63049)),"ph-sign-out":()=>Promise.all([r.e(790),r.e(8406)]).then(r.bind(r,98406)),"ph-spinner":()=>Promise.all([r.e(790),r.e(7759)]).then(r.bind(r,37759)),"ph-trash":()=>Promise.all([r.e(790),r.e(9504)]).then(r.bind(r,49504)),"ph-user":()=>Promise.all([r.e(790),r.e(7941)]).then(r.bind(r,17941)),"ph-wallet":()=>Promise.all([r.e(790),r.e(6792)]).then(r.bind(r,76792)),"ph-warning":()=>Promise.all([r.e(790),r.e(8971)]).then(r.bind(r,8971)),"ph-warning-circle":()=>Promise.all([r.e(790),r.e(2947)]).then(r.bind(r,2947)),"ph-x":()=>Promise.all([r.e(790),r.e(8022)]).then(r.bind(r,98022))},z={appStore:h,apple:p,bitcoin:f,chromeStore:g,cursor:m,discord:y,ethereum:w,etherscan:b,facebook:v,farcaster:C,github:E,google:x,playStore:_,reown:A,solana:S,ton:N.i,telegram:I,twitch:k,twitter:D,twitterIcon:R,walletConnect:O,walletConnectInvert:T,walletConnectBrown:$,walletConnectLightBrown:P,x:D},H={"accent-primary":U.gR.tokens.core.iconAccentPrimary,"accent-certified":U.gR.tokens.core.iconAccentCertified,default:U.gR.tokens.theme.iconDefault,success:U.gR.tokens.core.iconSuccess,error:U.gR.tokens.core.iconError,warning:U.gR.tokens.core.iconWarning,inverse:U.gR.tokens.theme.iconInverse},q=class extends i.oi{constructor(){super(...arguments),this.size="md",this.name="copy",this.weight="bold",this.color="inherit"}render(){this.style.cssText=` + --local-width: ${"inherit"===this.size?"inherit":`var(--apkt-spacing-${({xxs:"2",xs:"3",sm:"3",md:"4",mdl:"5",lg:"5",xl:"6",xxl:"7",inherit:"inherit"})[this.size]})`}; + --local-color: ${"inherit"===this.color?"inherit":H[this.color]} + `;let e=F[this.name];if(e&&""!==e){let t=W[e];t&&t();let r=l(e);return u`<${r} size=${({xxs:"0.5em",xs:"0.75em",sm:"0.75em",md:"1em",mdl:"1.25em",lg:"1.25em",xl:"1.5em",xxl:"1.75em"})[this.size]} weight="${this.weight}">`}return z[this.name]||u``}};q.styles=[L.ET,B],j([(0,n.Cb)()],q.prototype,"size",void 0),j([(0,n.Cb)()],q.prototype,"name",void 0),j([(0,n.Cb)()],q.prototype,"weight",void 0),j([(0,n.Cb)()],q.prototype,"color",void 0),j([(0,M.M)("wui-icon")],q)},23805:function(e,t,r){"use strict";var i=r(31133),n=r(84927),o=r(32801),s=r(84249),a=r(57116),l=r(11131),c=(0,l.iv)` + :host { + display: block; + width: var(--local-width); + height: var(--local-height); + } + + img { + display: block; + width: 100%; + height: 100%; + object-fit: cover; + object-position: center center; + border-radius: inherit; + user-select: none; + user-drag: none; + -webkit-user-drag: none; + -khtml-user-drag: none; + -moz-user-drag: none; + -o-user-drag: none; + } + + :host([data-boxed='true']) { + width: 40px; + height: 40px; + display: flex; + align-items: center; + justify-content: center; + background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; + border-radius: ${({borderRadius:e})=>e[2]}; + } + + :host([data-boxed='true']) img { + width: 20px; + height: 20px; + border-radius: ${({borderRadius:e})=>e[16]}; + } + + :host([data-full='true']) img { + width: 100%; + height: 100%; + } + + :host([data-boxed='true']) wui-icon { + width: 20px; + height: 20px; + } + + :host([data-icon='error']) { + background-color: ${({tokens:e})=>e.core.backgroundError}; + } + + :host([data-rounded='true']) { + border-radius: ${({borderRadius:e})=>e[16]}; + } +`,d=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let u=class extends i.oi{constructor(){super(...arguments),this.src="./path/to/image.jpg",this.alt="Image",this.size=void 0,this.boxed=!1,this.rounded=!1,this.fullSize=!1}render(){let e={inherit:"inherit",xxs:"2",xs:"3",sm:"4",md:"4",mdl:"5",lg:"5",xl:"6",xxl:"7","3xl":"8","4xl":"9","5xl":"10"};return(this.style.cssText=` + --local-width: ${this.size?`var(--apkt-spacing-${e[this.size]});`:"100%"}; + --local-height: ${this.size?`var(--apkt-spacing-${e[this.size]});`:"100%"}; + `,this.dataset.boxed=this.boxed?"true":"false",this.dataset.rounded=this.rounded?"true":"false",this.dataset.full=this.fullSize?"true":"false",this.dataset.icon=this.iconColor||"inherit",this.icon)?(0,i.dy)` `:this.logo?(0,i.dy)` `:(0,i.dy)`${this.alt}`}handleImageError(){this.dispatchEvent(new CustomEvent("onLoadError",{bubbles:!0,composed:!0}))}};u.styles=[s.ET,c],d([(0,n.Cb)()],u.prototype,"src",void 0),d([(0,n.Cb)()],u.prototype,"logo",void 0),d([(0,n.Cb)()],u.prototype,"icon",void 0),d([(0,n.Cb)()],u.prototype,"iconColor",void 0),d([(0,n.Cb)()],u.prototype,"alt",void 0),d([(0,n.Cb)()],u.prototype,"size",void 0),d([(0,n.Cb)({type:Boolean})],u.prototype,"boxed",void 0),d([(0,n.Cb)({type:Boolean})],u.prototype,"rounded",void 0),d([(0,n.Cb)({type:Boolean})],u.prototype,"fullSize",void 0),d([(0,a.M)("wui-image")],u)},21793:function(e,t,r){"use strict";var i=r(31133),n=r(84927),o=r(11131),s=r(84249),a=r(57116),l=(0,i.iv)` + :host { + display: flex; + } + + :host([data-size='sm']) > svg { + width: 12px; + height: 12px; + } + + :host([data-size='md']) > svg { + width: 16px; + height: 16px; + } + + :host([data-size='lg']) > svg { + width: 24px; + height: 24px; + } + + :host([data-size='xl']) > svg { + width: 32px; + height: 32px; + } + + svg { + animation: rotate 1.4s linear infinite; + color: var(--local-color); + } + + :host([data-size='md']) > svg > circle { + stroke-width: 6px; + } + + :host([data-size='sm']) > svg > circle { + stroke-width: 8px; + } + + @keyframes rotate { + 100% { + transform: rotate(360deg); + } + } +`,c=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let d=class extends i.oi{constructor(){super(...arguments),this.color="primary",this.size="lg"}render(){let e={primary:o.gR.tokens.theme.textPrimary,secondary:o.gR.tokens.theme.textSecondary,tertiary:o.gR.tokens.theme.textTertiary,invert:o.gR.tokens.theme.textInvert,error:o.gR.tokens.core.textError,warning:o.gR.tokens.core.textWarning,"accent-primary":o.gR.tokens.core.textAccentPrimary};return this.style.cssText=` + --local-color: ${"inherit"===this.color?"inherit":e[this.color]}; + `,this.dataset.size=this.size,(0,i.dy)` + + `}};d.styles=[s.ET,l],c([(0,n.Cb)()],d.prototype,"color",void 0),c([(0,n.Cb)()],d.prototype,"size",void 0),c([(0,a.M)("wui-loading-spinner")],d)},42653:function(e,t,r){"use strict";var i=r(31133),n=r(84927),o=r(57116),s=r(11131),a=(0,s.iv)` + :host { + display: block; + background: linear-gradient( + 90deg, + ${({tokens:e})=>e.theme.foregroundPrimary} 0%, + ${({tokens:e})=>e.theme.foregroundSecondary} 50%, + ${({tokens:e})=>e.theme.foregroundPrimary} 100% + ); + background-size: 200% 100%; + animation: shimmer 2s linear infinite; + border-radius: ${({borderRadius:e})=>e[2]}; + } + + :host([data-rounded='true']) { + border-radius: ${({borderRadius:e})=>e[16]}; + } + + @keyframes shimmer { + 0% { + background-position: 100% 0; + } + 100% { + background-position: -100% 0; + } + } +`,l=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let c=class extends i.oi{constructor(){super(...arguments),this.width="",this.height="",this.variant="default",this.rounded=!1}render(){return this.style.cssText=` + width: ${this.width}; + height: ${this.height}; + `,this.dataset.rounded=this.rounded?"true":"false",(0,i.dy)``}};c.styles=[a],l([(0,n.Cb)()],c.prototype,"width",void 0),l([(0,n.Cb)()],c.prototype,"height",void 0),l([(0,n.Cb)()],c.prototype,"variant",void 0),l([(0,n.Cb)({type:Boolean})],c.prototype,"rounded",void 0),l([(0,o.M)("wui-shimmer")],c)},18360:function(e,t,r){"use strict";var i=r(31133),n=r(84927),o=r(89906),s=r(11131),a=r(84249),l=r(57116),c=(0,s.iv)` + slot { + width: 100%; + display: inline-block; + font-style: normal; + overflow: inherit; + text-overflow: inherit; + text-align: var(--local-align); + color: var(--local-color); + } + + .wui-line-clamp-1 { + overflow: hidden; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 1; + } + + .wui-line-clamp-2 { + overflow: hidden; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; + } + + /* -- Headings --------------------------------------------------- */ + .wui-font-h1-regular-mono { + font-size: ${({textSize:e})=>e.h1}; + line-height: ${({typography:e})=>e["h1-regular-mono"].lineHeight}; + letter-spacing: ${({typography:e})=>e["h1-regular-mono"].letterSpacing}; + font-weight: ${({fontWeight:e})=>e.regular}; + font-family: ${({fontFamily:e})=>e.mono}; + } + + .wui-font-h1-regular { + font-size: ${({textSize:e})=>e.h1}; + line-height: ${({typography:e})=>e["h1-regular"].lineHeight}; + letter-spacing: ${({typography:e})=>e["h1-regular"].letterSpacing}; + font-weight: ${({fontWeight:e})=>e.regular}; + font-family: ${({fontFamily:e})=>e.regular}; + font-feature-settings: + 'liga' off, + 'clig' off; + } + + .wui-font-h1-medium { + font-size: ${({textSize:e})=>e.h1}; + line-height: ${({typography:e})=>e["h1-medium"].lineHeight}; + letter-spacing: ${({typography:e})=>e["h1-medium"].letterSpacing}; + font-weight: ${({fontWeight:e})=>e.medium}; + font-family: ${({fontFamily:e})=>e.regular}; + font-feature-settings: + 'liga' off, + 'clig' off; + } + + .wui-font-h2-regular-mono { + font-size: ${({textSize:e})=>e.h2}; + line-height: ${({typography:e})=>e["h2-regular-mono"].lineHeight}; + letter-spacing: ${({typography:e})=>e["h2-regular-mono"].letterSpacing}; + font-weight: ${({fontWeight:e})=>e.regular}; + font-family: ${({fontFamily:e})=>e.mono}; + } + + .wui-font-h2-regular { + font-size: ${({textSize:e})=>e.h2}; + line-height: ${({typography:e})=>e["h2-regular"].lineHeight}; + letter-spacing: ${({typography:e})=>e["h2-regular"].letterSpacing}; + font-weight: ${({fontWeight:e})=>e.regular}; + font-family: ${({fontFamily:e})=>e.regular}; + font-feature-settings: + 'liga' off, + 'clig' off; + } + + .wui-font-h2-medium { + font-size: ${({textSize:e})=>e.h2}; + line-height: ${({typography:e})=>e["h2-medium"].lineHeight}; + letter-spacing: ${({typography:e})=>e["h2-medium"].letterSpacing}; + font-weight: ${({fontWeight:e})=>e.medium}; + font-family: ${({fontFamily:e})=>e.regular}; + font-feature-settings: + 'liga' off, + 'clig' off; + } + + .wui-font-h3-regular-mono { + font-size: ${({textSize:e})=>e.h3}; + line-height: ${({typography:e})=>e["h3-regular-mono"].lineHeight}; + letter-spacing: ${({typography:e})=>e["h3-regular-mono"].letterSpacing}; + font-weight: ${({fontWeight:e})=>e.regular}; + font-family: ${({fontFamily:e})=>e.mono}; + } + + .wui-font-h3-regular { + font-size: ${({textSize:e})=>e.h3}; + line-height: ${({typography:e})=>e["h3-regular"].lineHeight}; + letter-spacing: ${({typography:e})=>e["h3-regular"].letterSpacing}; + font-weight: ${({fontWeight:e})=>e.regular}; + font-family: ${({fontFamily:e})=>e.regular}; + font-feature-settings: + 'liga' off, + 'clig' off; + } + + .wui-font-h3-medium { + font-size: ${({textSize:e})=>e.h3}; + line-height: ${({typography:e})=>e["h3-medium"].lineHeight}; + letter-spacing: ${({typography:e})=>e["h3-medium"].letterSpacing}; + font-weight: ${({fontWeight:e})=>e.medium}; + font-family: ${({fontFamily:e})=>e.regular}; + font-feature-settings: + 'liga' off, + 'clig' off; + } + + .wui-font-h4-regular-mono { + font-size: ${({textSize:e})=>e.h4}; + line-height: ${({typography:e})=>e["h4-regular-mono"].lineHeight}; + letter-spacing: ${({typography:e})=>e["h4-regular-mono"].letterSpacing}; + font-weight: ${({fontWeight:e})=>e.regular}; + font-family: ${({fontFamily:e})=>e.mono}; + } + + .wui-font-h4-regular { + font-size: ${({textSize:e})=>e.h4}; + line-height: ${({typography:e})=>e["h4-regular"].lineHeight}; + letter-spacing: ${({typography:e})=>e["h4-regular"].letterSpacing}; + font-weight: ${({fontWeight:e})=>e.regular}; + font-family: ${({fontFamily:e})=>e.regular}; + font-feature-settings: + 'liga' off, + 'clig' off; + } + + .wui-font-h4-medium { + font-size: ${({textSize:e})=>e.h4}; + line-height: ${({typography:e})=>e["h4-medium"].lineHeight}; + letter-spacing: ${({typography:e})=>e["h4-medium"].letterSpacing}; + font-weight: ${({fontWeight:e})=>e.medium}; + font-family: ${({fontFamily:e})=>e.regular}; + font-feature-settings: + 'liga' off, + 'clig' off; + } + + .wui-font-h5-regular-mono { + font-size: ${({textSize:e})=>e.h5}; + line-height: ${({typography:e})=>e["h5-regular-mono"].lineHeight}; + letter-spacing: ${({typography:e})=>e["h5-regular-mono"].letterSpacing}; + font-weight: ${({fontWeight:e})=>e.regular}; + font-family: ${({fontFamily:e})=>e.mono}; + } + + .wui-font-h5-regular { + font-size: ${({textSize:e})=>e.h5}; + line-height: ${({typography:e})=>e["h5-regular"].lineHeight}; + letter-spacing: ${({typography:e})=>e["h5-regular"].letterSpacing}; + font-weight: ${({fontWeight:e})=>e.regular}; + font-family: ${({fontFamily:e})=>e.regular}; + font-feature-settings: + 'liga' off, + 'clig' off; + } + + .wui-font-h5-medium { + font-size: ${({textSize:e})=>e.h5}; + line-height: ${({typography:e})=>e["h5-medium"].lineHeight}; + letter-spacing: ${({typography:e})=>e["h5-medium"].letterSpacing}; + font-weight: ${({fontWeight:e})=>e.medium}; + font-family: ${({fontFamily:e})=>e.regular}; + font-feature-settings: + 'liga' off, + 'clig' off; + } + + .wui-font-h6-regular-mono { + font-size: ${({textSize:e})=>e.h6}; + line-height: ${({typography:e})=>e["h6-regular-mono"].lineHeight}; + letter-spacing: ${({typography:e})=>e["h6-regular-mono"].letterSpacing}; + font-weight: ${({fontWeight:e})=>e.regular}; + font-family: ${({fontFamily:e})=>e.mono}; + } + + .wui-font-h6-regular { + font-size: ${({textSize:e})=>e.h6}; + line-height: ${({typography:e})=>e["h6-regular"].lineHeight}; + letter-spacing: ${({typography:e})=>e["h6-regular"].letterSpacing}; + font-weight: ${({fontWeight:e})=>e.regular}; + font-family: ${({fontFamily:e})=>e.regular}; + font-feature-settings: + 'liga' off, + 'clig' off; + } + + .wui-font-h6-medium { + font-size: ${({textSize:e})=>e.h6}; + line-height: ${({typography:e})=>e["h6-medium"].lineHeight}; + letter-spacing: ${({typography:e})=>e["h6-medium"].letterSpacing}; + font-weight: ${({fontWeight:e})=>e.medium}; + font-family: ${({fontFamily:e})=>e.regular}; + font-feature-settings: + 'liga' off, + 'clig' off; + } + + .wui-font-lg-regular-mono { + font-size: ${({textSize:e})=>e.large}; + line-height: ${({typography:e})=>e["lg-regular-mono"].lineHeight}; + letter-spacing: ${({typography:e})=>e["lg-regular-mono"].letterSpacing}; + font-weight: ${({fontWeight:e})=>e.regular}; + font-family: ${({fontFamily:e})=>e.mono}; + } + + .wui-font-lg-regular { + font-size: ${({textSize:e})=>e.large}; + line-height: ${({typography:e})=>e["lg-regular"].lineHeight}; + letter-spacing: ${({typography:e})=>e["lg-regular"].letterSpacing}; + font-weight: ${({fontWeight:e})=>e.regular}; + font-family: ${({fontFamily:e})=>e.regular}; + font-feature-settings: + 'liga' off, + 'clig' off; + } + + .wui-font-lg-medium { + font-size: ${({textSize:e})=>e.large}; + line-height: ${({typography:e})=>e["lg-medium"].lineHeight}; + letter-spacing: ${({typography:e})=>e["lg-medium"].letterSpacing}; + font-weight: ${({fontWeight:e})=>e.medium}; + font-family: ${({fontFamily:e})=>e.regular}; + font-feature-settings: + 'liga' off, + 'clig' off; + } + + .wui-font-md-regular-mono { + font-size: ${({textSize:e})=>e.medium}; + line-height: ${({typography:e})=>e["md-regular-mono"].lineHeight}; + letter-spacing: ${({typography:e})=>e["md-regular-mono"].letterSpacing}; + font-weight: ${({fontWeight:e})=>e.regular}; + font-family: ${({fontFamily:e})=>e.mono}; + } + + .wui-font-md-regular { + font-size: ${({textSize:e})=>e.medium}; + line-height: ${({typography:e})=>e["md-regular"].lineHeight}; + letter-spacing: ${({typography:e})=>e["md-regular"].letterSpacing}; + font-weight: ${({fontWeight:e})=>e.regular}; + font-family: ${({fontFamily:e})=>e.regular}; + font-feature-settings: + 'liga' off, + 'clig' off; + } + + .wui-font-md-medium { + font-size: ${({textSize:e})=>e.medium}; + line-height: ${({typography:e})=>e["md-medium"].lineHeight}; + letter-spacing: ${({typography:e})=>e["md-medium"].letterSpacing}; + font-weight: ${({fontWeight:e})=>e.medium}; + font-family: ${({fontFamily:e})=>e.regular}; + font-feature-settings: + 'liga' off, + 'clig' off; + } + + .wui-font-sm-regular-mono { + font-size: ${({textSize:e})=>e.small}; + line-height: ${({typography:e})=>e["sm-regular-mono"].lineHeight}; + letter-spacing: ${({typography:e})=>e["sm-regular-mono"].letterSpacing}; + font-weight: ${({fontWeight:e})=>e.regular}; + font-family: ${({fontFamily:e})=>e.mono}; + } + + .wui-font-sm-regular { + font-size: ${({textSize:e})=>e.small}; + line-height: ${({typography:e})=>e["sm-regular"].lineHeight}; + letter-spacing: ${({typography:e})=>e["sm-regular"].letterSpacing}; + font-weight: ${({fontWeight:e})=>e.regular}; + font-family: ${({fontFamily:e})=>e.regular}; + font-feature-settings: + 'liga' off, + 'clig' off; + } + + .wui-font-sm-medium { + font-size: ${({textSize:e})=>e.small}; + line-height: ${({typography:e})=>e["sm-medium"].lineHeight}; + letter-spacing: ${({typography:e})=>e["sm-medium"].letterSpacing}; + font-weight: ${({fontWeight:e})=>e.medium}; + font-family: ${({fontFamily:e})=>e.regular}; + font-feature-settings: + 'liga' off, + 'clig' off; + } +`,d=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let u={primary:s.gR.tokens.theme.textPrimary,secondary:s.gR.tokens.theme.textSecondary,tertiary:s.gR.tokens.theme.textTertiary,invert:s.gR.tokens.theme.textInvert,error:s.gR.tokens.core.textError,warning:s.gR.tokens.core.textWarning,"accent-primary":s.gR.tokens.core.textAccentPrimary},h=class extends i.oi{constructor(){super(...arguments),this.variant="md-regular",this.color="inherit",this.align="left",this.lineClamp=void 0,this.display="inline-flex"}render(){let e={[`wui-font-${this.variant}`]:!0,[`wui-line-clamp-${this.lineClamp}`]:!!this.lineClamp};return this.style.cssText=` + display: ${this.display}; + --local-align: ${this.align}; + --local-color: ${"inherit"===this.color?"inherit":u[this.color??"primary"]}; + `,(0,i.dy)``}};h.styles=[a.ET,c],d([(0,n.Cb)()],h.prototype,"variant",void 0),d([(0,n.Cb)()],h.prototype,"color",void 0),d([(0,n.Cb)()],h.prototype,"align",void 0),d([(0,n.Cb)()],h.prototype,"lineClamp",void 0),d([(0,n.Cb)()],h.prototype,"display",void 0),d([(0,l.M)("wui-text")],h)},48682:function(e,t,r){"use strict";var i=r(31133),n=r(84927);r(23805);var o=r(84249),s=r(3874),a=r(57116),l=r(11131),c=(0,l.iv)` + :host { + display: block; + width: var(--local-width); + height: var(--local-height); + border-radius: ${({borderRadius:e})=>e[16]}; + overflow: hidden; + position: relative; + } + + :host([data-variant='generated']) { + --mixed-local-color-1: var(--local-color-1); + --mixed-local-color-2: var(--local-color-2); + --mixed-local-color-3: var(--local-color-3); + --mixed-local-color-4: var(--local-color-4); + --mixed-local-color-5: var(--local-color-5); + } + + :host([data-variant='generated']) { + background: radial-gradient( + var(--local-radial-circle), + #fff 0.52%, + var(--mixed-local-color-5) 31.25%, + var(--mixed-local-color-3) 51.56%, + var(--mixed-local-color-2) 65.63%, + var(--mixed-local-color-1) 82.29%, + var(--mixed-local-color-4) 100% + ); + } + + :host([data-variant='default']) { + background: radial-gradient( + 75.29% 75.29% at 64.96% 24.36%, + #fff 0.52%, + #f5ccfc 31.25%, + #dba4f5 51.56%, + #9a8ee8 65.63%, + #6493da 82.29%, + #6ebdea 100% + ); + } +`,d=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let u=class extends i.oi{constructor(){super(...arguments),this.imageSrc=void 0,this.alt=void 0,this.address=void 0,this.size="xl"}render(){let e={inherit:"inherit",xxs:"3",xs:"5",sm:"6",md:"8",mdl:"8",lg:"10",xl:"16",xxl:"20"};return this.style.cssText=` + --local-width: var(--apkt-spacing-${e[this.size??"xl"]}); + --local-height: var(--apkt-spacing-${e[this.size??"xl"]}); + `,(0,i.dy)`${this.visualTemplate()}`}visualTemplate(){if(this.imageSrc)return this.dataset.variant="image",(0,i.dy)``;if(this.address){this.dataset.variant="generated";let e=s.H.generateAvatarColors(this.address);return this.style.cssText+=` + ${e}`,null}return this.dataset.variant="default",null}};u.styles=[o.ET,c],d([(0,n.Cb)()],u.prototype,"imageSrc",void 0),d([(0,n.Cb)()],u.prototype,"alt",void 0),d([(0,n.Cb)()],u.prototype,"address",void 0),d([(0,n.Cb)()],u.prototype,"size",void 0),d([(0,a.M)("wui-avatar")],u)},98629:function(e,t,r){"use strict";var i=r(31133),n=r(84927);r(74975),r(21793),r(18360);var o=r(84249),s=r(57116),a=r(11131),l=(0,a.iv)` + :host { + width: var(--local-width); + } + + button { + width: var(--local-width); + white-space: nowrap; + column-gap: ${({spacing:e})=>e[2]}; + transition: + scale ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-1"]}, + background-color ${({durations:e})=>e.lg} + ${({easings:e})=>e["ease-out-power-2"]}, + border-radius ${({durations:e})=>e.lg} + ${({easings:e})=>e["ease-out-power-1"]}; + will-change: scale, background-color, border-radius; + cursor: pointer; + } + + /* -- Sizes --------------------------------------------------- */ + button[data-size='sm'] { + border-radius: ${({borderRadius:e})=>e[2]}; + padding: 0 ${({spacing:e})=>e[2]}; + height: 28px; + } + + button[data-size='md'] { + border-radius: ${({borderRadius:e})=>e[3]}; + padding: 0 ${({spacing:e})=>e[4]}; + height: 38px; + } + + button[data-size='lg'] { + border-radius: ${({borderRadius:e})=>e[4]}; + padding: 0 ${({spacing:e})=>e[5]}; + height: 48px; + } + + /* -- Variants --------------------------------------------------------- */ + button[data-variant='accent-primary'] { + background-color: ${({tokens:e})=>e.core.backgroundAccentPrimary}; + color: ${({tokens:e})=>e.theme.textInvert}; + } + + button[data-variant='accent-secondary'] { + background-color: ${({tokens:e})=>e.core.foregroundAccent010}; + color: ${({tokens:e})=>e.core.textAccentPrimary}; + } + + button[data-variant='neutral-primary'] { + background-color: ${({tokens:e})=>e.theme.backgroundInvert}; + color: ${({tokens:e})=>e.theme.textInvert}; + } + + button[data-variant='neutral-secondary'] { + background-color: transparent; + border: 1px solid ${({tokens:e})=>e.theme.borderSecondary}; + color: ${({tokens:e})=>e.theme.textPrimary}; + } + + button[data-variant='neutral-tertiary'] { + background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; + color: ${({tokens:e})=>e.theme.textPrimary}; + } + + button[data-variant='error-primary'] { + background-color: ${({tokens:e})=>e.core.textError}; + color: ${({tokens:e})=>e.theme.textInvert}; + } + + button[data-variant='error-secondary'] { + background-color: ${({tokens:e})=>e.core.backgroundError}; + color: ${({tokens:e})=>e.core.textError}; + } + + button[data-variant='shade'] { + background: var(--wui-color-gray-glass-002); + color: var(--wui-color-fg-200); + border: none; + box-shadow: inset 0 0 0 1px var(--wui-color-gray-glass-005); + } + + /* -- Focus states --------------------------------------------------- */ + button[data-size='sm']:focus-visible:enabled { + border-radius: 28px; + } + + button[data-size='md']:focus-visible:enabled { + border-radius: 38px; + } + + button[data-size='lg']:focus-visible:enabled { + border-radius: 48px; + } + button[data-variant='shade']:focus-visible:enabled { + background: var(--wui-color-gray-glass-005); + box-shadow: + inset 0 0 0 1px var(--wui-color-gray-glass-010), + 0 0 0 4px var(--wui-color-gray-glass-002); + } + + /* -- Hover & Active states ----------------------------------------------------------- */ + @media (hover: hover) { + button[data-size='sm']:hover:enabled { + border-radius: 28px; + } + + button[data-size='md']:hover:enabled { + border-radius: 38px; + } + + button[data-size='lg']:hover:enabled { + border-radius: 48px; + } + + button[data-variant='shade']:hover:enabled { + background: var(--wui-color-gray-glass-002); + } + + button[data-variant='shade']:active:enabled { + background: var(--wui-color-gray-glass-005); + } + } + + button[data-size='sm']:active:enabled { + border-radius: 28px; + } + + button[data-size='md']:active:enabled { + border-radius: 38px; + } + + button[data-size='lg']:active:enabled { + border-radius: 48px; + } + + /* -- Disabled states --------------------------------------------------- */ + button:disabled { + opacity: 0.3; + } +`,c=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let d={lg:"lg-regular-mono",md:"md-regular-mono",sm:"sm-regular-mono"},u={lg:"md",md:"md",sm:"sm"},h=class extends i.oi{constructor(){super(...arguments),this.size="lg",this.disabled=!1,this.fullWidth=!1,this.loading=!1,this.variant="accent-primary"}render(){this.style.cssText=` + --local-width: ${this.fullWidth?"100%":"auto"}; + `;let e=this.textVariant??d[this.size];return(0,i.dy)` + + `}loadingTemplate(){if(this.loading){let e=u[this.size],t="neutral-primary"===this.variant||"accent-primary"===this.variant?"invert":"primary";return(0,i.dy)``}return null}};h.styles=[o.ET,o.ZM,l],c([(0,n.Cb)()],h.prototype,"size",void 0),c([(0,n.Cb)({type:Boolean})],h.prototype,"disabled",void 0),c([(0,n.Cb)({type:Boolean})],h.prototype,"fullWidth",void 0),c([(0,n.Cb)({type:Boolean})],h.prototype,"loading",void 0),c([(0,n.Cb)()],h.prototype,"variant",void 0),c([(0,n.Cb)()],h.prototype,"textVariant",void 0),c([(0,s.M)("wui-button")],h)},1736:function(e,t,r){"use strict";var i=r(31133),n=r(84927),o=r(32801);r(74975);var s=r(84249),a=r(57116),l=r(11131),c=(0,l.iv)` + :host { + display: inline-flex; + justify-content: center; + align-items: center; + border-radius: ${({borderRadius:e})=>e[2]}; + padding: ${({spacing:e})=>e[1]} !important; + background-color: ${({tokens:e})=>e.theme.backgroundPrimary}; + position: relative; + } + + :host([data-padding='2']) { + padding: ${({spacing:e})=>e[2]} !important; + } + + :host:after { + content: ''; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + border-radius: ${({borderRadius:e})=>e[2]}; + } + + :host > wui-icon { + z-index: 10; + } + + /* -- Colors --------------------------------------------------- */ + :host([data-color='accent-primary']) { + color: ${({tokens:e})=>e.core.iconAccentPrimary}; + } + + :host([data-color='accent-primary']):after { + background-color: ${({tokens:e})=>e.core.foregroundAccent010}; + } + + :host([data-color='default']), + :host([data-color='secondary']) { + color: ${({tokens:e})=>e.theme.iconDefault}; + } + + :host([data-color='default']):after { + background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; + } + + :host([data-color='secondary']):after { + background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; + } + + :host([data-color='success']) { + color: ${({tokens:e})=>e.core.iconSuccess}; + } + + :host([data-color='success']):after { + background-color: ${({tokens:e})=>e.core.backgroundSuccess}; + } + + :host([data-color='error']) { + color: ${({tokens:e})=>e.core.iconError}; + } + + :host([data-color='error']):after { + background-color: ${({tokens:e})=>e.core.backgroundError}; + } + + :host([data-color='warning']) { + color: ${({tokens:e})=>e.core.iconWarning}; + } + + :host([data-color='warning']):after { + background-color: ${({tokens:e})=>e.core.backgroundWarning}; + } + + :host([data-color='inverse']) { + color: ${({tokens:e})=>e.theme.iconInverse}; + } + + :host([data-color='inverse']):after { + background-color: transparent; + } +`,d=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let u=class extends i.oi{constructor(){super(...arguments),this.icon="copy",this.size="md",this.padding="1",this.color="default"}render(){return this.dataset.padding=this.padding,this.dataset.color=this.color,(0,i.dy)` + + `}};u.styles=[s.ET,s.ZM,c],d([(0,n.Cb)()],u.prototype,"icon",void 0),d([(0,n.Cb)()],u.prototype,"size",void 0),d([(0,n.Cb)()],u.prototype,"padding",void 0),d([(0,n.Cb)()],u.prototype,"color",void 0),d([(0,a.M)("wui-icon-box")],u)},4308:function(e,t,r){"use strict";var i=r(31133),n=r(84927);r(74975);var o=r(84249),s=r(57116),a=r(11131),l=(0,a.iv)` + button { + background-color: transparent; + padding: ${({spacing:e})=>e[1]}; + } + + button:focus-visible { + box-shadow: 0 0 0 4px ${({tokens:e})=>e.core.foregroundAccent020}; + } + + button[data-variant='accent']:hover:enabled, + button[data-variant='accent']:focus-visible { + background-color: ${({tokens:e})=>e.core.foregroundAccent010}; + } + + button[data-variant='primary']:hover:enabled, + button[data-variant='primary']:focus-visible, + button[data-variant='secondary']:hover:enabled, + button[data-variant='secondary']:focus-visible { + background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; + } + + button[data-size='xs'] > wui-icon { + width: 8px; + height: 8px; + } + + button[data-size='sm'] > wui-icon { + width: 12px; + height: 12px; + } + + button[data-size='xs'], + button[data-size='sm'] { + border-radius: ${({borderRadius:e})=>e[1]}; + } + + button[data-size='md'], + button[data-size='lg'] { + border-radius: ${({borderRadius:e})=>e[2]}; + } + + button[data-size='md'] > wui-icon { + width: 16px; + height: 16px; + } + + button[data-size='lg'] > wui-icon { + width: 20px; + height: 20px; + } + + button:disabled { + background-color: transparent; + cursor: not-allowed; + opacity: 0.5; + } + + button:hover:not(:disabled) { + background-color: var(--wui-color-accent-glass-015); + } + + button:focus-visible:not(:disabled) { + background-color: var(--wui-color-accent-glass-015); + box-shadow: + inset 0 0 0 1px var(--wui-color-accent-100), + 0 0 0 4px var(--wui-color-accent-glass-020); + } +`,c=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let d=class extends i.oi{constructor(){super(...arguments),this.size="md",this.disabled=!1,this.icon="copy",this.iconColor="default",this.variant="accent"}render(){return(0,i.dy)` + + `}};d.styles=[o.ET,o.ZM,l],c([(0,n.Cb)()],d.prototype,"size",void 0),c([(0,n.Cb)({type:Boolean})],d.prototype,"disabled",void 0),c([(0,n.Cb)()],d.prototype,"icon",void 0),c([(0,n.Cb)()],d.prototype,"iconColor",void 0),c([(0,n.Cb)()],d.prototype,"variant",void 0),c([(0,s.M)("wui-icon-link")],d)},4163:function(e,t,r){"use strict";var i=r(31133),n=r(84927),o=r(32801),s=r(7226);r(74975),r(18360);var a=r(84249),l=r(57116),c=r(11131),d=(0,c.iv)` + :host { + position: relative; + width: 100%; + display: inline-flex; + flex-direction: column; + gap: ${({spacing:e})=>e[3]}; + color: ${({tokens:e})=>e.theme.textPrimary}; + caret-color: ${({tokens:e})=>e.core.textAccentPrimary}; + } + + .wui-input-text-container { + position: relative; + display: flex; + } + + input { + width: 100%; + border-radius: ${({borderRadius:e})=>e[4]}; + color: inherit; + background: transparent; + border: 1px solid ${({tokens:e})=>e.theme.borderPrimary}; + caret-color: ${({tokens:e})=>e.core.textAccentPrimary}; + padding: ${({spacing:e})=>e[3]} ${({spacing:e})=>e[3]} + ${({spacing:e})=>e[3]} ${({spacing:e})=>e[10]}; + font-size: ${({textSize:e})=>e.large}; + line-height: ${({typography:e})=>e["lg-regular"].lineHeight}; + letter-spacing: ${({typography:e})=>e["lg-regular"].letterSpacing}; + font-weight: ${({fontWeight:e})=>e.regular}; + font-family: ${({fontFamily:e})=>e.regular}; + } + + input[data-size='lg'] { + padding: ${({spacing:e})=>e[4]} ${({spacing:e})=>e[3]} + ${({spacing:e})=>e[4]} ${({spacing:e})=>e[10]}; + } + + @media (hover: hover) and (pointer: fine) { + input:hover:enabled { + border: 1px solid ${({tokens:e})=>e.theme.borderSecondary}; + } + } + + input:disabled { + cursor: unset; + border: 1px solid ${({tokens:e})=>e.theme.borderPrimary}; + } + + input::placeholder { + color: ${({tokens:e})=>e.theme.textSecondary}; + } + + input:focus:enabled { + border: 1px solid ${({tokens:e})=>e.theme.borderSecondary}; + background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; + -webkit-box-shadow: 0px 0px 0px 4px ${({tokens:e})=>e.core.foregroundAccent040}; + -moz-box-shadow: 0px 0px 0px 4px ${({tokens:e})=>e.core.foregroundAccent040}; + box-shadow: 0px 0px 0px 4px ${({tokens:e})=>e.core.foregroundAccent040}; + } + + div.wui-input-text-container:has(input:disabled) { + opacity: 0.5; + } + + wui-icon.wui-input-text-left-icon { + position: absolute; + top: 50%; + transform: translateY(-50%); + pointer-events: none; + left: ${({spacing:e})=>e[4]}; + color: ${({tokens:e})=>e.theme.iconDefault}; + } + + button.wui-input-text-submit-button { + position: absolute; + top: 50%; + transform: translateY(-50%); + right: ${({spacing:e})=>e[3]}; + width: 24px; + height: 24px; + border: none; + background: transparent; + border-radius: ${({borderRadius:e})=>e[2]}; + color: ${({tokens:e})=>e.core.textAccentPrimary}; + } + + button.wui-input-text-submit-button:disabled { + opacity: 1; + } + + button.wui-input-text-submit-button.loading wui-icon { + animation: spin 1s linear infinite; + } + + button.wui-input-text-submit-button:hover { + background: ${({tokens:e})=>e.core.foregroundAccent010}; + } + + input:has(+ .wui-input-text-submit-button) { + padding-right: ${({spacing:e})=>e[12]}; + } + + input[type='number'] { + -moz-appearance: textfield; + } + + input[type='search']::-webkit-search-decoration, + input[type='search']::-webkit-search-cancel-button, + input[type='search']::-webkit-search-results-button, + input[type='search']::-webkit-search-results-decoration { + -webkit-appearance: none; + } + + /* -- Keyframes --------------------------------------------------- */ + @keyframes spin { + from { + transform: rotate(0deg); + } + to { + transform: rotate(360deg); + } + } +`,u=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let h=class extends i.oi{constructor(){super(...arguments),this.inputElementRef=(0,s.V)(),this.disabled=!1,this.loading=!1,this.placeholder="",this.type="text",this.value="",this.size="md"}render(){return(0,i.dy)`
+ ${this.templateLeftIcon()} + + ${this.templateSubmitButton()} + +
+ ${this.templateError()} ${this.templateWarning()}`}templateLeftIcon(){return this.icon?(0,i.dy)``:null}templateSubmitButton(){return this.onSubmit?(0,i.dy)``:null}templateError(){return this.errorText?(0,i.dy)`${this.errorText}`:null}templateWarning(){return this.warningText?(0,i.dy)`${this.warningText}`:null}dispatchInputChangeEvent(){this.dispatchEvent(new CustomEvent("inputChange",{detail:this.inputElementRef.value?.value,bubbles:!0,composed:!0}))}};h.styles=[a.ET,a.ZM,d],u([(0,n.Cb)()],h.prototype,"icon",void 0),u([(0,n.Cb)({type:Boolean})],h.prototype,"disabled",void 0),u([(0,n.Cb)({type:Boolean})],h.prototype,"loading",void 0),u([(0,n.Cb)()],h.prototype,"placeholder",void 0),u([(0,n.Cb)()],h.prototype,"type",void 0),u([(0,n.Cb)()],h.prototype,"value",void 0),u([(0,n.Cb)()],h.prototype,"errorText",void 0),u([(0,n.Cb)()],h.prototype,"warningText",void 0),u([(0,n.Cb)()],h.prototype,"onSubmit",void 0),u([(0,n.Cb)()],h.prototype,"size",void 0),u([(0,n.Cb)({attribute:!1})],h.prototype,"onKeyDown",void 0),u([(0,l.M)("wui-input-text")],h)},84793:function(e,t,r){"use strict";var i=r(31133),n=r(84927);r(74975);var o=r(84249),s=r(57116),a=r(11131),l=(0,a.iv)` + :host { + display: flex; + justify-content: center; + align-items: center; + width: 40px; + height: 40px; + border-radius: ${({borderRadius:e})=>e["20"]}; + overflow: hidden; + } + + wui-icon { + width: 100%; + height: 100%; + } +`,c=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let d=class extends i.oi{constructor(){super(...arguments),this.logo="google"}render(){return(0,i.dy)` `}};d.styles=[o.ET,l],c([(0,n.Cb)()],d.prototype,"logo",void 0),c([(0,s.M)("wui-logo")],d)},80675:function(e,t,r){"use strict";var i=r(31133),n=r(84927);r(74975),r(18360);var o=r(84249),s=r(57116),a=r(11131),l=(0,a.iv)` + :host { + display: flex; + justify-content: center; + align-items: center; + gap: ${({spacing:e})=>e[1]}; + text-transform: uppercase; + white-space: nowrap; + } + + :host([data-variant='accent']) { + background-color: ${({tokens:e})=>e.core.foregroundAccent010}; + color: ${({tokens:e})=>e.core.textAccentPrimary}; + } + + :host([data-variant='info']) { + background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; + color: ${({tokens:e})=>e.theme.textSecondary}; + } + + :host([data-variant='success']) { + background-color: ${({tokens:e})=>e.core.backgroundSuccess}; + color: ${({tokens:e})=>e.core.textSuccess}; + } + + :host([data-variant='warning']) { + background-color: ${({tokens:e})=>e.core.backgroundWarning}; + color: ${({tokens:e})=>e.core.textWarning}; + } + + :host([data-variant='error']) { + background-color: ${({tokens:e})=>e.core.backgroundError}; + color: ${({tokens:e})=>e.core.textError}; + } + + :host([data-variant='certified']) { + background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; + color: ${({tokens:e})=>e.theme.textSecondary}; + } + + :host([data-size='md']) { + height: 30px; + padding: 0 ${({spacing:e})=>e[2]}; + border-radius: ${({borderRadius:e})=>e[2]}; + } + + :host([data-size='sm']) { + height: 20px; + padding: 0 ${({spacing:e})=>e[1]}; + border-radius: ${({borderRadius:e})=>e[1]}; + } +`,c=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let d=class extends i.oi{constructor(){super(...arguments),this.variant="accent",this.size="md",this.icon=void 0}render(){this.dataset.variant=this.variant,this.dataset.size=this.size;let e="md"===this.size?"md-medium":"sm-medium",t="md"===this.size?"md":"sm";return(0,i.dy)` + ${this.icon?(0,i.dy)``:null} + + + + `}};d.styles=[o.ET,l],c([(0,n.Cb)()],d.prototype,"variant",void 0),c([(0,n.Cb)()],d.prototype,"size",void 0),c([(0,n.Cb)()],d.prototype,"icon",void 0),c([(0,s.M)("wui-tag")],d)},43465:function(e,t,r){"use strict";var i=r(31133),n=r(84927);r(74975),r(23805);var o=r(84249),s=r(57116);r(1736);var a=r(11131),l=(0,a.iv)` + :host { + position: relative; + background-color: ${({tokens:e})=>e.theme.foregroundTertiary}; + display: flex; + justify-content: center; + align-items: center; + border-radius: inherit; + border-radius: var(--local-border-radius); + } + + :host([data-image='true']) { + background-color: transparent; + } + + :host > wui-flex { + overflow: hidden; + border-radius: inherit; + border-radius: var(--local-border-radius); + } + + :host([data-size='sm']) { + width: 32px; + height: 32px; + } + + :host([data-size='md']) { + width: 40px; + height: 40px; + } + + :host([data-size='lg']) { + width: 56px; + height: 56px; + } + + :host([name='Extension'])::after { + border: 1px solid ${({colors:e})=>e.accent010}; + } + + :host([data-wallet-icon='allWallets'])::after { + border: 1px solid ${({colors:e})=>e.accent010}; + } + + wui-icon[data-parent-size='inherit'] { + width: 75%; + height: 75%; + align-items: center; + } + + wui-icon { + color: ${({tokens:e})=>e.theme.iconDefault}; + } + + wui-icon[data-parent-size='sm'] { + width: 24px; + height: 24px; + } + + wui-icon[data-parent-size='md'] { + width: 32px; + height: 32px; + } + + :host > wui-icon-box { + position: absolute; + overflow: hidden; + right: -1px; + bottom: -2px; + z-index: 1; + border: 2px solid ${({tokens:e})=>e.theme.backgroundPrimary}; + padding: 1px; + } +`,c=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let d=class extends i.oi{constructor(){super(...arguments),this.size="md",this.name="",this.installed=!1,this.badgeSize="xs"}render(){let e="1";return"lg"===this.size?e="4":"md"===this.size?e="2":"sm"===this.size&&(e="1"),this.style.cssText=` + --local-border-radius: var(--apkt-borderRadius-${e}); + `,this.dataset.size=this.size,this.imageSrc&&(this.dataset.image="true"),this.walletIcon&&(this.dataset.walletIcon=this.walletIcon),(0,i.dy)` + ${this.templateVisual()} + `}templateVisual(){return this.imageSrc?(0,i.dy)``:this.walletIcon?(0,i.dy)``:(0,i.dy)``}};d.styles=[o.ET,l],c([(0,n.Cb)()],d.prototype,"size",void 0),c([(0,n.Cb)()],d.prototype,"name",void 0),c([(0,n.Cb)()],d.prototype,"imageSrc",void 0),c([(0,n.Cb)()],d.prototype,"walletIcon",void 0),c([(0,n.Cb)({type:Boolean})],d.prototype,"installed",void 0),c([(0,n.Cb)()],d.prototype,"badgeSize",void 0),c([(0,s.M)("wui-wallet-image")],d)},5680:function(e,t,r){"use strict";var i=r(31133),n=r(84927),o=r(84249),s=r(3874),a=r(57116),l=(0,i.iv)` + :host { + display: flex; + width: inherit; + height: inherit; + box-sizing: border-box; + } +`,c=function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s};let d=class extends i.oi{render(){return this.style.cssText=` + flex-direction: ${this.flexDirection}; + flex-wrap: ${this.flexWrap}; + flex-basis: ${this.flexBasis}; + flex-grow: ${this.flexGrow}; + flex-shrink: ${this.flexShrink}; + align-items: ${this.alignItems}; + justify-content: ${this.justifyContent}; + column-gap: ${this.columnGap&&`var(--apkt-spacing-${this.columnGap})`}; + row-gap: ${this.rowGap&&`var(--apkt-spacing-${this.rowGap})`}; + gap: ${this.gap&&`var(--apkt-spacing-${this.gap})`}; + padding-top: ${this.padding&&s.H.getSpacingStyles(this.padding,0)}; + padding-right: ${this.padding&&s.H.getSpacingStyles(this.padding,1)}; + padding-bottom: ${this.padding&&s.H.getSpacingStyles(this.padding,2)}; + padding-left: ${this.padding&&s.H.getSpacingStyles(this.padding,3)}; + margin-top: ${this.margin&&s.H.getSpacingStyles(this.margin,0)}; + margin-right: ${this.margin&&s.H.getSpacingStyles(this.margin,1)}; + margin-bottom: ${this.margin&&s.H.getSpacingStyles(this.margin,2)}; + margin-left: ${this.margin&&s.H.getSpacingStyles(this.margin,3)}; + width: ${this.width}; + `,(0,i.dy)``}};d.styles=[o.ET,l],c([(0,n.Cb)()],d.prototype,"flexDirection",void 0),c([(0,n.Cb)()],d.prototype,"flexWrap",void 0),c([(0,n.Cb)()],d.prototype,"flexBasis",void 0),c([(0,n.Cb)()],d.prototype,"flexGrow",void 0),c([(0,n.Cb)()],d.prototype,"flexShrink",void 0),c([(0,n.Cb)()],d.prototype,"alignItems",void 0),c([(0,n.Cb)()],d.prototype,"justifyContent",void 0),c([(0,n.Cb)()],d.prototype,"columnGap",void 0),c([(0,n.Cb)()],d.prototype,"rowGap",void 0),c([(0,n.Cb)()],d.prototype,"gap",void 0),c([(0,n.Cb)()],d.prototype,"padding",void 0),c([(0,n.Cb)()],d.prototype,"margin",void 0),c([(0,n.Cb)()],d.prototype,"width",void 0),c([(0,a.M)("wui-flex")],d)},2460:function(e,t,r){"use strict";r.d(t,{TV:function(){return i},W2:function(){return n}});let i={core:{backgroundAccentPrimary:"#0988F0",backgroundAccentCertified:"#C7B994",backgroundWalletKit:"#FFB800",backgroundAppKit:"#FF573B",backgroundCloud:"#0988F0",backgroundDocumentation:"#008847",backgroundSuccess:"rgba(48, 164, 107, 0.20)",backgroundError:"rgba(223, 74, 52, 0.20)",backgroundWarning:"rgba(243, 161, 63, 0.20)",textAccentPrimary:"#0988F0",textAccentCertified:"#C7B994",textWalletKit:"#FFB800",textAppKit:"#FF573B",textCloud:"#0988F0",textDocumentation:"#008847",textSuccess:"#30A46B",textError:"#DF4A34",textWarning:"#F3A13F",borderAccentPrimary:"#0988F0",borderSecondary:"#C7B994",borderSuccess:"#30A46B",borderError:"#DF4A34",borderWarning:"#F3A13F",foregroundAccent010:"rgba(9, 136, 240, 0.1)",foregroundAccent020:"rgba(9, 136, 240, 0.2)",foregroundAccent040:"rgba(9, 136, 240, 0.4)",foregroundAccent060:"rgba(9, 136, 240, 0.6)",foregroundSecondary020:"rgba(199, 185, 148, 0.2)",foregroundSecondary040:"rgba(199, 185, 148, 0.4)",foregroundSecondary060:"rgba(199, 185, 148, 0.6)",iconAccentPrimary:"#0988F0",iconAccentCertified:"#C7B994",iconSuccess:"#30A46B",iconError:"#DF4A34",iconWarning:"#F3A13F",glass010:"rgba(255, 255, 255, 0.1)",zIndex:"9999"},dark:{overlay:"rgba(0, 0, 0, 0.50)",backgroundPrimary:"#202020",backgroundInvert:"#FFFFFF",textPrimary:"#FFFFFF",textSecondary:"#9A9A9A",textTertiary:"#BBBBBB",textInvert:"#202020",borderPrimary:"#2A2A2A",borderPrimaryDark:"#363636",borderSecondary:"#4F4F4F",foregroundPrimary:"#252525",foregroundSecondary:"#2A2A2A",foregroundTertiary:"#363636",iconDefault:"#9A9A9A",iconInverse:"#FFFFFF"},light:{overlay:"rgba(230 , 230, 230, 0.5)",backgroundPrimary:"#FFFFFF",borderPrimaryDark:"#E9E9E9",backgroundInvert:"#202020",textPrimary:"#202020",textSecondary:"#9A9A9A",textTertiary:"#6C6C6C",textInvert:"#FFFFFF",borderPrimary:"#E9E9E9",borderSecondary:"#D0D0D0",foregroundPrimary:"#F3F3F3",foregroundSecondary:"#E9E9E9",foregroundTertiary:"#D0D0D0",iconDefault:"#9A9A9A",iconInverse:"#202020"}},n={colors:{black:"#202020",white:"#FFFFFF",white010:"rgba(255, 255, 255, 0.1)",accent010:"rgba(9, 136, 240, 0.1)",accent020:"rgba(9, 136, 240, 0.2)",accent030:"rgba(9, 136, 240, 0.3)",accent040:"rgba(9, 136, 240, 0.4)",accent050:"rgba(9, 136, 240, 0.5)",accent060:"rgba(9, 136, 240, 0.6)",accent070:"rgba(9, 136, 240, 0.7)",accent080:"rgba(9, 136, 240, 0.8)",accent090:"rgba(9, 136, 240, 0.9)",accent100:"rgba(9, 136, 240, 1.0)",accentSecondary010:"rgba(199, 185, 148, 0.1)",accentSecondary020:"rgba(199, 185, 148, 0.2)",accentSecondary030:"rgba(199, 185, 148, 0.3)",accentSecondary040:"rgba(199, 185, 148, 0.4)",accentSecondary050:"rgba(199, 185, 148, 0.5)",accentSecondary060:"rgba(199, 185, 148, 0.6)",accentSecondary070:"rgba(199, 185, 148, 0.7)",accentSecondary080:"rgba(199, 185, 148, 0.8)",accentSecondary090:"rgba(199, 185, 148, 0.9)",accentSecondary100:"rgba(199, 185, 148, 1.0)",productWalletKit:"#FFB800",productAppKit:"#FF573B",productCloud:"#0988F0",productDocumentation:"#008847",neutrals050:"#F6F6F6",neutrals100:"#F3F3F3",neutrals200:"#E9E9E9",neutrals300:"#D0D0D0",neutrals400:"#BBB",neutrals500:"#9A9A9A",neutrals600:"#6C6C6C",neutrals700:"#4F4F4F",neutrals800:"#363636",neutrals900:"#2A2A2A",neutrals1000:"#252525",semanticSuccess010:"rgba(48, 164, 107, 0.1)",semanticSuccess020:"rgba(48, 164, 107, 0.2)",semanticSuccess030:"rgba(48, 164, 107, 0.3)",semanticSuccess040:"rgba(48, 164, 107, 0.4)",semanticSuccess050:"rgba(48, 164, 107, 0.5)",semanticSuccess060:"rgba(48, 164, 107, 0.6)",semanticSuccess070:"rgba(48, 164, 107, 0.7)",semanticSuccess080:"rgba(48, 164, 107, 0.8)",semanticSuccess090:"rgba(48, 164, 107, 0.9)",semanticSuccess100:"rgba(48, 164, 107, 1.0)",semanticError010:"rgba(223, 74, 52, 0.1)",semanticError020:"rgba(223, 74, 52, 0.2)",semanticError030:"rgba(223, 74, 52, 0.3)",semanticError040:"rgba(223, 74, 52, 0.4)",semanticError050:"rgba(223, 74, 52, 0.5)",semanticError060:"rgba(223, 74, 52, 0.6)",semanticError070:"rgba(223, 74, 52, 0.7)",semanticError080:"rgba(223, 74, 52, 0.8)",semanticError090:"rgba(223, 74, 52, 0.9)",semanticError100:"rgba(223, 74, 52, 1.0)",semanticWarning010:"rgba(243, 161, 63, 0.1)",semanticWarning020:"rgba(243, 161, 63, 0.2)",semanticWarning030:"rgba(243, 161, 63, 0.3)",semanticWarning040:"rgba(243, 161, 63, 0.4)",semanticWarning050:"rgba(243, 161, 63, 0.5)",semanticWarning060:"rgba(243, 161, 63, 0.6)",semanticWarning070:"rgba(243, 161, 63, 0.7)",semanticWarning080:"rgba(243, 161, 63, 0.8)",semanticWarning090:"rgba(243, 161, 63, 0.9)",semanticWarning100:"rgba(243, 161, 63, 1.0)"},fontFamily:{regular:"KHTeka",mono:"KHTekaMono"},fontWeight:{regular:"400",medium:"500"},textSize:{h1:"50px",h2:"44px",h3:"38px",h4:"32px",h5:"26px",h6:"20px",large:"16px",medium:"14px",small:"12px"},typography:{"h1-regular-mono":{lineHeight:"50px",letterSpacing:"-3px"},"h1-regular":{lineHeight:"50px",letterSpacing:"-1px"},"h1-medium":{lineHeight:"50px",letterSpacing:"-0.84px"},"h2-regular-mono":{lineHeight:"44px",letterSpacing:"-2.64px"},"h2-regular":{lineHeight:"44px",letterSpacing:"-0.88px"},"h2-medium":{lineHeight:"44px",letterSpacing:"-0.88px"},"h3-regular-mono":{lineHeight:"38px",letterSpacing:"-2.28px"},"h3-regular":{lineHeight:"38px",letterSpacing:"-0.76px"},"h3-medium":{lineHeight:"38px",letterSpacing:"-0.76px"},"h4-regular-mono":{lineHeight:"32px",letterSpacing:"-1.92px"},"h4-regular":{lineHeight:"32px",letterSpacing:"-0.32px"},"h4-medium":{lineHeight:"32px",letterSpacing:"-0.32px"},"h5-regular-mono":{lineHeight:"26px",letterSpacing:"-1.56px"},"h5-regular":{lineHeight:"26px",letterSpacing:"-0.26px"},"h5-medium":{lineHeight:"26px",letterSpacing:"-0.26px"},"h6-regular-mono":{lineHeight:"20px",letterSpacing:"-1.2px"},"h6-regular":{lineHeight:"20px",letterSpacing:"-0.6px"},"h6-medium":{lineHeight:"20px",letterSpacing:"-0.6px"},"lg-regular-mono":{lineHeight:"16px",letterSpacing:"-0.96px"},"lg-regular":{lineHeight:"18px",letterSpacing:"-0.16px"},"lg-medium":{lineHeight:"18px",letterSpacing:"-0.16px"},"md-regular-mono":{lineHeight:"14px",letterSpacing:"-0.84px"},"md-regular":{lineHeight:"16px",letterSpacing:"-0.14px"},"md-medium":{lineHeight:"16px",letterSpacing:"-0.14px"},"sm-regular-mono":{lineHeight:"12px",letterSpacing:"-0.72px"},"sm-regular":{lineHeight:"14px",letterSpacing:"-0.12px"},"sm-medium":{lineHeight:"14px",letterSpacing:"-0.12px"}},tokens:{core:i.core,theme:i.dark},borderRadius:{1:"4px",2:"8px",10:"10px",3:"12px",4:"16px",6:"24px",5:"20px",8:"32px",16:"64px",20:"80px",32:"128px",64:"256px",128:"512px",round:"9999px"},spacing:{0:"0px","01":"2px",1:"4px",2:"8px",3:"12px",4:"16px",5:"20px",6:"24px",7:"28px",8:"32px",9:"36px",10:"40px",12:"48px",14:"56px",16:"64px",20:"80px",32:"128px",64:"256px"},durations:{xl:"400ms",lg:"200ms",md:"125ms",sm:"75ms"},easings:{"ease-out-power-2":"cubic-bezier(0.23, 0.09, 0.08, 1.13)","ease-out-power-1":"cubic-bezier(0.12, 0.04, 0.2, 1.06)","ease-in-power-2":"cubic-bezier(0.92, -0.13, 0.77, 0.91)","ease-in-power-1":"cubic-bezier(0.88, -0.06, 0.8, 0.96)","ease-inout-power-2":"cubic-bezier(0.77, 0.09, 0.23, 1.13)","ease-inout-power-1":"cubic-bezier(0.88, 0.04, 0.12, 1.06)"}}},11131:function(e,t,r){"use strict";r.d(t,{e5:function(){return a},gR:function(){return l},iv:function(){return c}});var i=r(31133),n=r(2460);let o="--apkt";function s(e){if(!e)return{};let t={};return t["font-family"]=e["--apkt-font-family"]??e["--w3m-font-family"]??"KHTeka",t.accent=e["--apkt-accent"]??e["--w3m-accent"]??"#0988F0",t["color-mix"]=e["--apkt-color-mix"]??e["--w3m-color-mix"]??"#000",t["color-mix-strength"]=e["--apkt-color-mix-strength"]??e["--w3m-color-mix-strength"]??0,t["font-size-master"]=e["--apkt-font-size-master"]??e["--w3m-font-size-master"]??"10px",t["border-radius-master"]=e["--apkt-border-radius-master"]??e["--w3m-border-radius-master"]??"4px",void 0!==e["--apkt-z-index"]?t["z-index"]=e["--apkt-z-index"]:void 0!==e["--w3m-z-index"]&&(t["z-index"]=e["--w3m-z-index"]),t}let a={createCSSVariables(e){let t={},r={};return!function e(t,r,i=""){for(let[n,s]of Object.entries(t)){let t=i?`${i}-${n}`:n;s&&"object"==typeof s&&Object.keys(s).length?(r[n]={},e(s,r[n],t)):"string"==typeof s&&(r[n]=`${o}-${t}`)}}(e,t),!function e(t,r){for(let[i,n]of Object.entries(t))n&&"object"==typeof n?(r[i]={},e(n,r[i])):"string"==typeof n&&(r[i]=`var(${n})`)}(t,r),{cssVariables:t,cssVariablesVarPrefix:r}},assignCSSVariables(e,t){let r={};return!function e(t,i,n){for(let[s,a]of Object.entries(t)){let t=n?`${n}-${s}`:s,l=i[s];a&&"object"==typeof a?e(a,l,t):"string"==typeof l&&(r[`${o}-${t}`]=l)}}(e,t),r},createRootStyles(e,t){let r={...n.W2,tokens:{...n.W2.tokens,theme:"light"===e?n.TV.light:n.TV.dark}},{cssVariables:i}=a.createCSSVariables(r),o=a.assignCSSVariables(i,r),s=a.generateW3MVariables(t),l=a.generateW3MOverrides(t),c=a.generateScaledVariables(t),d=a.generateBaseVariables(o),u={...o,...d,...s,...l,...c},h=a.applyColorMixToVariables(t,u),p=Object.entries({...u,...h}).map(([e,t])=>`${e}:${t.replace("/[:;{}]/g","")};`).join("");return`:root {${p}}`},generateW3MVariables(e){if(!e)return{};let t=s(e),r={};return r["--w3m-font-family"]=t["font-family"],r["--w3m-accent"]=t.accent,r["--w3m-color-mix"]=t["color-mix"],r["--w3m-color-mix-strength"]=`${t["color-mix-strength"]}%`,r["--w3m-font-size-master"]=t["font-size-master"],r["--w3m-border-radius-master"]=t["border-radius-master"],r},generateW3MOverrides(e){if(!e)return{};let t=s(e),r={};if(e["--apkt-accent"]||e["--w3m-accent"]){let e=t.accent;r["--apkt-tokens-core-iconAccentPrimary"]=e,r["--apkt-tokens-core-borderAccentPrimary"]=e,r["--apkt-tokens-core-textAccentPrimary"]=e,r["--apkt-tokens-core-backgroundAccentPrimary"]=e}return(e["--apkt-font-family"]||e["--w3m-font-family"])&&(r["--apkt-fontFamily-regular"]=t["font-family"]),void 0!==t["z-index"]&&(r["--apkt-tokens-core-zIndex"]=`${t["z-index"]}`),r},generateScaledVariables(e){if(!e)return{};let t=s(e),r={};if(e["--apkt-font-size-master"]||e["--w3m-font-size-master"]){let e=parseFloat(t["font-size-master"].replace("px",""));r["--apkt-textSize-h1"]=`${5*Number(e)}px`,r["--apkt-textSize-h2"]=`${4.4*Number(e)}px`,r["--apkt-textSize-h3"]=`${3.8*Number(e)}px`,r["--apkt-textSize-h4"]=`${3.2*Number(e)}px`,r["--apkt-textSize-h5"]=`${2.6*Number(e)}px`,r["--apkt-textSize-h6"]=`${2*Number(e)}px`,r["--apkt-textSize-large"]=`${1.6*Number(e)}px`,r["--apkt-textSize-medium"]=`${1.4*Number(e)}px`,r["--apkt-textSize-small"]=`${1.2*Number(e)}px`}if(e["--apkt-border-radius-master"]||e["--w3m-border-radius-master"]){let e=parseFloat(t["border-radius-master"].replace("px",""));r["--apkt-borderRadius-1"]=`${Number(e)}px`,r["--apkt-borderRadius-2"]=`${2*Number(e)}px`,r["--apkt-borderRadius-3"]=`${3*Number(e)}px`,r["--apkt-borderRadius-4"]=`${4*Number(e)}px`,r["--apkt-borderRadius-5"]=`${5*Number(e)}px`,r["--apkt-borderRadius-6"]=`${6*Number(e)}px`,r["--apkt-borderRadius-8"]=`${8*Number(e)}px`,r["--apkt-borderRadius-16"]=`${16*Number(e)}px`,r["--apkt-borderRadius-20"]=`${20*Number(e)}px`,r["--apkt-borderRadius-32"]=`${32*Number(e)}px`,r["--apkt-borderRadius-64"]=`${64*Number(e)}px`,r["--apkt-borderRadius-128"]=`${128*Number(e)}px`}return r},generateColorMixCSS(e,t){if(!e?.["--w3m-color-mix"]||!e["--w3m-color-mix-strength"])return"";let r=e["--w3m-color-mix"],i=e["--w3m-color-mix-strength"];if(!i||0===i)return"";let n=Object.keys(t||{}).filter(e=>{let t=e.includes("-tokens-core-background")||e.includes("-tokens-core-text")||e.includes("-tokens-core-border")||e.includes("-tokens-core-foreground")||e.includes("-tokens-core-icon")||e.includes("-tokens-theme-background")||e.includes("-tokens-theme-text")||e.includes("-tokens-theme-border")||e.includes("-tokens-theme-foreground")||e.includes("-tokens-theme-icon"),r=e.includes("-borderRadius-")||e.includes("-spacing-")||e.includes("-textSize-")||e.includes("-fontFamily-")||e.includes("-fontWeight-")||e.includes("-typography-")||e.includes("-duration-")||e.includes("-ease-")||e.includes("-path-")||e.includes("-width-")||e.includes("-height-")||e.includes("-visual-size-")||e.includes("-modal-width")||e.includes("-cover");return t&&!r});if(0===n.length)return"";let o=n.map(e=>{let n=t?.[e]||"";return n.includes("color-mix")||n.startsWith("#")||n.startsWith("rgb")?`${e}: color-mix(in srgb, ${r} ${i}%, ${n});`:`${e}: color-mix(in srgb, ${r} ${i}%, var(${e}-base, ${n}));`}).join("");return` @supports (background: color-mix(in srgb, white 50%, black)) { + :root { + ${o} + } + }`},generateBaseVariables(e){let t={},r=e["--apkt-tokens-theme-backgroundPrimary"];r&&(t["--apkt-tokens-theme-backgroundPrimary-base"]=r);let i=e["--apkt-tokens-core-backgroundAccentPrimary"];return i&&(t["--apkt-tokens-core-backgroundAccentPrimary-base"]=i),t},applyColorMixToVariables(e,t){let r={};t?.["--apkt-tokens-theme-backgroundPrimary"]&&(r["--apkt-tokens-theme-backgroundPrimary"]="var(--apkt-tokens-theme-backgroundPrimary-base)"),t?.["--apkt-tokens-core-backgroundAccentPrimary"]&&(r["--apkt-tokens-core-backgroundAccentPrimary"]="var(--apkt-tokens-core-backgroundAccentPrimary-base)");let i=s(e),n=i["color-mix"],o=i["color-mix-strength"];if(!o||0===o)return r;let a=Object.keys(t||{}).filter(e=>{let t=e.includes("-tokens-core-background")||e.includes("-tokens-core-text")||e.includes("-tokens-core-border")||e.includes("-tokens-core-foreground")||e.includes("-tokens-core-icon")||e.includes("-tokens-theme-background")||e.includes("-tokens-theme-text")||e.includes("-tokens-theme-border")||e.includes("-tokens-theme-foreground")||e.includes("-tokens-theme-icon")||e.includes("-tokens-theme-overlay"),r=e.includes("-borderRadius-")||e.includes("-spacing-")||e.includes("-textSize-")||e.includes("-fontFamily-")||e.includes("-fontWeight-")||e.includes("-typography-")||e.includes("-duration-")||e.includes("-ease-")||e.includes("-path-")||e.includes("-width-")||e.includes("-height-")||e.includes("-visual-size-")||e.includes("-modal-width")||e.includes("-cover");return t&&!r});return 0===a.length||a.forEach(e=>{let i=t?.[e]||"";e.endsWith("-base")||("--apkt-tokens-theme-backgroundPrimary"===e||"--apkt-tokens-core-backgroundAccentPrimary"===e?r[e]=`color-mix(in srgb, ${n} ${o}%, var(${e}-base))`:i.includes("color-mix")||i.startsWith("#")||i.startsWith("rgb")?r[e]=`color-mix(in srgb, ${n} ${o}%, ${i})`:r[e]=`color-mix(in srgb, ${n} ${o}%, var(${e}-base, ${i}))`)}),r}},{cssVariablesVarPrefix:l}=a.createCSSVariables(n.W2);function c(e,...t){return(0,i.iv)(e,...t.map(e=>"function"==typeof e?(0,i.$m)(e(l)):(0,i.$m)(e)))}},84249:function(e,t,r){"use strict";let i,n,o,s,a;r.d(t,{ET:function(){return m},Hs:function(){return p},R:function(){return f},ZM:function(){return y},n:function(){return h}});var l=r(31133),c=r(11131);let d={"KHTeka-500-woff2":"https://fonts.reown.com/KHTeka-Medium.woff2","KHTeka-400-woff2":"https://fonts.reown.com/KHTeka-Regular.woff2","KHTeka-300-woff2":"https://fonts.reown.com/KHTeka-Light.woff2","KHTekaMono-400-woff2":"https://fonts.reown.com/KHTekaMono-Regular.woff2","KHTeka-500-woff":"https://fonts.reown.com/KHTeka-Light.woff","KHTeka-400-woff":"https://fonts.reown.com/KHTeka-Regular.woff","KHTeka-300-woff":"https://fonts.reown.com/KHTeka-Light.woff","KHTekaMono-400-woff":"https://fonts.reown.com/KHTekaMono-Regular.woff"};function u(e,t="dark"){i&&document.head.removeChild(i),(i=document.createElement("style")).textContent=c.e5.createRootStyles(t,e),document.head.appendChild(i)}function h(e,t="dark"){if(a=e,n=document.createElement("style"),o=document.createElement("style"),s=document.createElement("style"),n.textContent=g(e).core.cssText,o.textContent=g(e).dark.cssText,s.textContent=g(e).light.cssText,document.head.appendChild(n),document.head.appendChild(o),document.head.appendChild(s),u(e,t),p(t),!(e?.["--apkt-font-family"]||e?.["--w3m-font-family"]))for(let[e,t]of Object.entries(d)){let r=document.createElement("link");r.rel="preload",r.href=t,r.as="font",r.type=e.includes("woff2")?"font/woff2":"font/woff",r.crossOrigin="anonymous",document.head.appendChild(r)}p(t)}function p(e="dark"){o&&s&&i&&("light"===e?(u(a,e),o.removeAttribute("media"),s.media="enabled"):(u(a,e),s.removeAttribute("media"),o.media="enabled"))}function f(e){if(a=e,n&&o&&s){n.textContent=g(e).core.cssText,o.textContent=g(e).dark.cssText,s.textContent=g(e).light.cssText;let t=e?.["--apkt-font-family"]||e?.["--w3m-font-family"];t&&(n.textContent=n.textContent?.replace("font-family: KHTeka",`font-family: ${t}`),o.textContent=o.textContent?.replace("font-family: KHTeka",`font-family: ${t}`),s.textContent=s.textContent?.replace("font-family: KHTeka",`font-family: ${t}`))}i&&u(e,s?.media==="enabled"?"light":"dark")}function g(e){let t=!!(e?.["--apkt-font-family"]||e?.["--w3m-font-family"]);return{core:(0,l.iv)` + ${t?(0,l.iv)``:(0,l.iv)` + @font-face { + font-family: 'KHTeka'; + src: + url(${(0,l.$m)(d["KHTeka-400-woff2"])}) format('woff2'), + url(${(0,l.$m)(d["KHTeka-400-woff"])}) format('woff'); + font-weight: 400; + font-style: normal; + font-display: swap; + } + + @font-face { + font-family: 'KHTeka'; + src: + url(${(0,l.$m)(d["KHTeka-300-woff2"])}) format('woff2'), + url(${(0,l.$m)(d["KHTeka-300-woff"])}) format('woff'); + font-weight: 300; + font-style: normal; + } + + @font-face { + font-family: 'KHTekaMono'; + src: + url(${(0,l.$m)(d["KHTekaMono-400-woff2"])}) format('woff2'), + url(${(0,l.$m)(d["KHTekaMono-400-woff"])}) format('woff'); + font-weight: 400; + font-style: normal; + } + + @font-face { + font-family: 'KHTeka'; + src: + url(${(0,l.$m)(d["KHTeka-400-woff2"])}) format('woff2'), + url(${(0,l.$m)(d["KHTeka-400-woff"])}) format('woff'); + font-weight: 400; + font-style: normal; + } + `} + + @keyframes w3m-shake { + 0% { + transform: scale(1) rotate(0deg); + } + 20% { + transform: scale(1) rotate(-1deg); + } + 40% { + transform: scale(1) rotate(1.5deg); + } + 60% { + transform: scale(1) rotate(-1.5deg); + } + 80% { + transform: scale(1) rotate(1deg); + } + 100% { + transform: scale(1) rotate(0deg); + } + } + @keyframes w3m-iframe-fade-out { + 0% { + opacity: 1; + } + 100% { + opacity: 0; + } + } + @keyframes w3m-iframe-zoom-in { + 0% { + transform: translateY(50px); + opacity: 0; + } + 100% { + transform: translateY(0px); + opacity: 1; + } + } + @keyframes w3m-iframe-zoom-in-mobile { + 0% { + transform: scale(0.95); + opacity: 0; + } + 100% { + transform: scale(1); + opacity: 1; + } + } + :root { + --apkt-modal-width: 370px; + + --apkt-visual-size-inherit: inherit; + --apkt-visual-size-sm: 40px; + --apkt-visual-size-md: 55px; + --apkt-visual-size-lg: 80px; + + --apkt-path-network-sm: path( + 'M15.4 2.1a5.21 5.21 0 0 1 5.2 0l11.61 6.7a5.21 5.21 0 0 1 2.61 4.52v13.4c0 1.87-1 3.59-2.6 4.52l-11.61 6.7c-1.62.93-3.6.93-5.22 0l-11.6-6.7a5.21 5.21 0 0 1-2.61-4.51v-13.4c0-1.87 1-3.6 2.6-4.52L15.4 2.1Z' + ); + + --apkt-path-network-md: path( + 'M43.4605 10.7248L28.0485 1.61089C25.5438 0.129705 22.4562 0.129705 19.9515 1.61088L4.53951 10.7248C2.03626 12.2051 0.5 14.9365 0.5 17.886V36.1139C0.5 39.0635 2.03626 41.7949 4.53951 43.2752L19.9515 52.3891C22.4562 53.8703 25.5438 53.8703 28.0485 52.3891L43.4605 43.2752C45.9637 41.7949 47.5 39.0635 47.5 36.114V17.8861C47.5 14.9365 45.9637 12.2051 43.4605 10.7248Z' + ); + + --apkt-path-network-lg: path( + 'M78.3244 18.926L50.1808 2.45078C45.7376 -0.150261 40.2624 -0.150262 35.8192 2.45078L7.6756 18.926C3.23322 21.5266 0.5 26.3301 0.5 31.5248V64.4752C0.5 69.6699 3.23322 74.4734 7.6756 77.074L35.8192 93.5492C40.2624 96.1503 45.7376 96.1503 50.1808 93.5492L78.3244 77.074C82.7668 74.4734 85.5 69.6699 85.5 64.4752V31.5248C85.5 26.3301 82.7668 21.5266 78.3244 18.926Z' + ); + + --apkt-width-network-sm: 36px; + --apkt-width-network-md: 48px; + --apkt-width-network-lg: 86px; + + --apkt-duration-dynamic: 0ms; + --apkt-height-network-sm: 40px; + --apkt-height-network-md: 54px; + --apkt-height-network-lg: 96px; + } + `,dark:(0,l.iv)` + :root { + } + `,light:(0,l.iv)` + :root { + } + `}}let m=(0,l.iv)` + div, + span, + iframe, + a, + img, + form, + button, + label, + *::after, + *::before { + margin: 0; + padding: 0; + box-sizing: border-box; + font-style: normal; + text-rendering: optimizeSpeed; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + -webkit-tap-highlight-color: transparent; + backface-visibility: hidden; + } + + :host { + font-family: var(--apkt-fontFamily-regular); + } +`,y=(0,l.iv)` + button, + a { + cursor: pointer; + display: flex; + justify-content: center; + align-items: center; + position: relative; + + will-change: background-color, color, border, box-shadow, width, height, transform, opacity; + outline: none; + border: none; + text-decoration: none; + transition: + background-color var(--apkt-durations-lg) var(--apkt-easings-ease-out-power-2), + color var(--apkt-durations-lg) var(--apkt-easings-ease-out-power-2), + border var(--apkt-durations-lg) var(--apkt-easings-ease-out-power-2), + box-shadow var(--apkt-durations-lg) var(--apkt-easings-ease-out-power-2), + width var(--apkt-durations-lg) var(--apkt-easings-ease-out-power-2), + height var(--apkt-durations-lg) var(--apkt-easings-ease-out-power-2), + transform var(--apkt-durations-lg) var(--apkt-easings-ease-out-power-2), + opacity var(--apkt-durations-lg) var(--apkt-easings-ease-out-power-2), + scale var(--apkt-durations-lg) var(--apkt-easings-ease-out-power-2), + border-radius var(--apkt-durations-lg) var(--apkt-easings-ease-out-power-2); + will-change: + background-color, color, border, box-shadow, width, height, transform, opacity, scale, + border-radius; + } + + a:active:not([disabled]), + button:active:not([disabled]) { + scale: 0.975; + transform-origin: center; + } + + button:disabled { + cursor: default; + } + + input { + border: none; + outline: none; + appearance: none; + } +`},3874:function(e,t,r){"use strict";r.d(t,{H:function(){return i}});let i={getSpacingStyles:(e,t)=>Array.isArray(e)?e[t]?`var(--apkt-spacing-${e[t]})`:void 0:"string"==typeof e?`var(--apkt-spacing-${e})`:void 0,getFormattedDate:e=>new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric"}).format(e),formatCurrency(e=0,t={}){let r=Number(e);return isNaN(r)?"$0.00":new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:2,maximumFractionDigits:2,...t}).format(r)},getHostName(e){try{return new URL(e).hostname}catch(e){return""}},getTruncateString:({string:e,charsStart:t,charsEnd:r,truncate:i})=>e.length<=t+r?e:"end"===i?`${e.substring(0,t)}...`:"start"===i?`...${e.substring(e.length-r)}`:`${e.substring(0,Math.floor(t))}...${e.substring(e.length-Math.floor(r))}`,generateAvatarColors(e){let t=e.toLowerCase().replace(/^0x/iu,"").replace(/[^a-f0-9]/gu,"").substring(0,6).padEnd(6,"0"),r=this.hexToRgb(t),i=getComputedStyle(document.documentElement).getPropertyValue("--w3m-border-radius-master"),n=100-3*Number(i?.replace("px","")),o=`${n}% ${n}% at 65% 40%`,s=[];for(let e=0;e<5;e+=1){let t=this.tintColor(r,.15*e);s.push(`rgb(${t[0]}, ${t[1]}, ${t[2]})`)}return` + --local-color-1: ${s[0]}; + --local-color-2: ${s[1]}; + --local-color-3: ${s[2]}; + --local-color-4: ${s[3]}; + --local-color-5: ${s[4]}; + --local-radial-circle: ${o} + `},hexToRgb(e){let t=parseInt(e,16);return[t>>16&255,t>>8&255,255&t]},tintColor(e,t){let[r,i,n]=e;return[Math.round(r+(255-r)*t),Math.round(i+(255-i)*t),Math.round(n+(255-n)*t)]},isNumber:e=>/^[0-9]+$/u.test(e),getColorTheme:e=>e||("undefined"!=typeof window&&window.matchMedia&&"function"==typeof window.matchMedia?window.matchMedia("(prefers-color-scheme: dark)")?.matches?"dark":"light":"dark"),splitBalance(e){let t=e.split(".");return 2===t.length?[t[0],t[1]]:["0","00"]},roundNumber:(e,t,r)=>e.toString().length>=t?Number(e).toFixed(r):e,cssDurationToNumber:e=>e.endsWith("s")?1e3*Number(e.replace("s","")):e.endsWith("ms")?Number(e.replace("ms","")):0,maskInput({value:e,decimals:t,integers:r}){if("."===(e=e.replace(",",".")))return"0.";let[i="",n]=e.split(".").map(e=>e.replace(/[^0-9]/gu,"")),o=r?i.substring(0,r):i,s=2===o.length?String(Number(o)):o,a="number"==typeof t?n?.substring(0,t):n;return("string"==typeof a&&("number"!=typeof t||t>0)?[s,a].join("."):s)??""},capitalize:e=>e?e.charAt(0).toUpperCase()+e.slice(1):""}},57116:function(e,t,r){"use strict";function i(e){return function(t){return"function"==typeof t?(customElements.get(e)||customElements.define(e,t),t):function(e,t){let{kind:r,elements:i}=t;return{kind:r,elements:i,finisher(t){customElements.get(e)||customElements.define(e,t)}}}(e,t)}}r.d(t,{M:function(){return i}})},31182:function(e,t,r){"use strict";r.d(t,{f:function(){return y}});var i=r(79516),n=r(78125),o=r(77014),s=r(33457),a=r(24250);function l(e,t={}){let{key:r="fallback",name:i="Fallback",rank:n=!1,shouldThrow:o=c,retryCount:l,retryDelay:d}=t;return({chain:t,pollingInterval:c=4e3,timeout:u,...h})=>{let p=e,f=()=>{},g=(0,a.q)({key:r,name:i,async request({method:e,params:r}){let i;let n=async(s=0)=>{let a=p[s]({...h,chain:t,retryCount:0,timeout:u});try{let t=await a.request({method:e,params:r});return f({method:e,params:r,response:t,transport:a,status:"success"}),t}catch(l){if(f({error:l,method:e,params:r,transport:a,status:"error"}),o(l)||s===p.length-1||!(i??=p.slice(s+1).some(r=>{let{include:i,exclude:n}=r({chain:t}).config.methods||{};return i?i.includes(e):!n||!n.includes(e)})))throw l;return n(s+1)}};return n()},retryCount:l,retryDelay:d,type:"fallback"},{onResponse:e=>f=e,transports:p.map(e=>e({chain:t,retryCount:0}))});if(n){let e="object"==typeof n?n:{};!function({chain:e,interval:t=4e3,onTransports:r,ping:i,sampleCount:n=10,timeout:o=1e3,transports:a,weights:l={}}){let{stability:c=.7,latency:d=.3}=l,u=[],h=async()=>{let l=await Promise.all(a.map(async t=>{let r,n;let s=t({chain:e,retryCount:0,timeout:o}),a=Date.now();try{await (i?i({transport:s}):s.request({method:"net_listening"})),n=1}catch{n=0}finally{r=Date.now()}return{latency:r-a,success:n}}));u.push(l),u.length>n&&u.shift();let p=Math.max(...u.map(e=>Math.max(...e.map(({latency:e})=>e))));r(a.map((e,t)=>{let r=u.map(e=>e[t].latency),i=r.reduce((e,t)=>e+t,0)/r.length,n=u.map(e=>e[t].success),o=n.reduce((e,t)=>e+t,0)/n.length;return 0===o?[0,t]:[d*(1-i/p)+c*o,t]}).sort((e,t)=>t[0]-e[0]).map(([,e])=>a[e])),await (0,s.D)(t),h()};h()}({chain:t,interval:e.interval??c,onTransports:e=>p=e,ping:e.ping,sampleCount:e.sampleCount,timeout:e.timeout,transports:p,weights:e.weights})}return g}}function c(e){return!!("code"in e&&"number"==typeof e.code&&(e.code===o.KB.code||e.code===o.ab.code||n.M_.nodeMessage.test(e.message)||5e3===e.code))}var d=r(44649),u=r(36801),h=r(6943),p=r(88578);d.b.CONNECTOR_ID.COINBASE,d.b.CONNECTOR_ID.COINBASE_SDK,d.b.CONNECTOR_ID.BASE_ACCOUNT,d.b.CONNECTOR_ID.SAFE,d.b.CONNECTOR_ID.LEDGER,d.b.CONNECTOR_ID.OKX,p.b.METMASK_CONNECTOR_NAME,p.b.TRUST_CONNECTOR_NAME,p.b.SOLFLARE_CONNECTOR_NAME,p.b.PHANTOM_CONNECTOR_NAME,p.b.COIN98_CONNECTOR_NAME,p.b.MAGIC_EDEN_CONNECTOR_NAME,p.b.BACKPACK_CONNECTOR_NAME,p.b.BITGET_CONNECTOR_NAME,p.b.FRONTIER_CONNECTOR_NAME,p.b.XVERSE_CONNECTOR_NAME,p.b.LEATHER_CONNECTOR_NAME,p.b.OKX_CONNECTOR_NAME,p.b.BINANCE_CONNECTOR_NAME;let f={1:"ba0ba0cd-17c6-4806-ad93-f9d174f17900",42161:"3bff954d-5cb0-47a0-9a23-d20192e74600",43114:"30c46e53-e989-45fb-4549-be3bd4eb3b00",56:"93564157-2e8e-4ce7-81df-b264dbee9b00",250:"06b26297-fe0c-4733-5d6b-ffa5498aac00",10:"ab9c186a-c52f-464b-2906-ca59d760a400",137:"41d04d42-da3b-4453-8506-668cc0727900",5e3:"e86fae9b-b770-4eea-e520-150e12c81100",295:"6a97d510-cac8-4e58-c7ce-e8681b044c00",11155111:"e909ea0a-f92a-4512-c8fc-748044ea6800",84532:"a18a7ecd-e307-4360-4746-283182228e00",1301:"4eeea7ef-0014-4649-5d1d-07271a80f600",130:"2257980a-3463-48c6-cbac-a42d2a956e00",10143:"0a728e83-bacb-46db-7844-948f05434900",100:"02b53f6a-e3d4-479e-1cb4-21178987d100",9001:"f926ff41-260d-4028-635e-91913fc28e00",324:"b310f07f-4ef7-49f3-7073-2a0a39685800",314:"5a73b3dd-af74-424e-cae0-0de859ee9400",4689:"34e68754-e536-40da-c153-6ef2e7188a00",1088:"3897a66d-40b9-4833-162f-a2c90531c900",1284:"161038da-44ae-4ec7-1208-0ea569454b00",1285:"f1d73bb6-5450-4e18-38f7-fb6484264a00",7777777:"845c60df-d429-4991-e687-91ae45791600",42220:"ab781bbc-ccc6-418d-d32d-789b15da1f00",8453:"7289c336-3981-4081-c5f4-efc26ac64a00",1313161554:"3ff73439-a619-4894-9262-4470c773a100",2020:"b8101fc0-9c19-4b6f-ec65-f6dfff106e00",2021:"b8101fc0-9c19-4b6f-ec65-f6dfff106e00",80094:"e329c2c9-59b0-4a02-83e4-212ff3779900",2741:"fc2427d1-5af9-4a9c-8da5-6f94627cd900","5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp":"a1b58899-f671-4276-6a5e-56ca5bd59700","4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z":"a1b58899-f671-4276-6a5e-56ca5bd59700",EtWTRABZaYq6iMfeYKouRu166VU2xqa1:"a1b58899-f671-4276-6a5e-56ca5bd59700","000000000019d6689c085ae165831e93":"0b4838db-0161-4ffe-022d-532bf03dba00","000000000933ea01ad0ee984209779ba":"39354064-d79b-420b-065d-f980c4b78200","00000008819873e925422c1ff0f99f7c":"b3406e4a-bbfc-44fb-e3a6-89673c78b700","-239":"20f673c0-095e-49b2-07cf-eb5049dcf600","-3":"20f673c0-095e-49b2-07cf-eb5049dcf600"};function g(e,t){let r=new URL("https://rpc.walletconnect.org/v1/");return r.searchParams.set("chainId",e),r.searchParams.set("projectId",t),r.toString()}d.b.CONNECTOR_ID.COINBASE,d.b.CONNECTOR_ID.COINBASE_SDK,d.b.CONNECTOR_ID.BASE_ACCOUNT,d.b.CONNECTOR_ID.SAFE,d.b.CONNECTOR_ID.LEDGER,d.b.CONNECTOR_ID.WALLET_CONNECT,d.b.CONNECTOR_ID.INJECTED,d.b.CONNECTOR_ID.INJECTED,d.b.CONNECTOR_ID.WALLET_CONNECT,d.b.CONNECTOR_ID.COINBASE,d.b.CONNECTOR_ID.COINBASE_SDK,d.b.CONNECTOR_ID.BASE_ACCOUNT,d.b.CONNECTOR_ID.LEDGER,d.b.CONNECTOR_ID.SAFE,d.b.CONNECTOR_ID.INJECTED,d.b.CONNECTOR_ID.WALLET_CONNECT,d.b.CONNECTOR_ID.EIP6963,d.b.CONNECTOR_ID.AUTH,p.b.CONNECTOR_TYPE_AUTH;let m=["near:mainnet","solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp","eip155:1101","eip155:56","eip155:42161","eip155:7777777","eip155:59144","eip155:324","solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1","eip155:5000","solana:4sgjmw1sunhzsxgspuhpqldx6wiyjntz","eip155:80084","eip155:5003","eip155:100","eip155:8453","eip155:42220","eip155:1313161555","eip155:17000","eip155:1","eip155:300","eip155:1313161554","eip155:1329","eip155:84532","eip155:421614","eip155:11155111","eip155:8217","eip155:43114","solana:4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z","eip155:999999999","eip155:11155420","eip155:80002","eip155:97","eip155:43113","eip155:137","eip155:10","eip155:1301","eip155:80094","eip155:80069","eip155:560048","eip155:31","eip155:2818","eip155:57054","eip155:911867","eip155:534351","eip155:1112","eip155:534352","eip155:1111","eip155:146","eip155:130","eip155:1284","eip155:30","eip155:2810","bip122:000000000019d6689c085ae165831e93","bip122:000000000933ea01ad0ee984209779ba"],y={extendRpcUrlWithProjectId(e,t){let r=!1;try{r="rpc.walletconnect.org"===new URL(e).host}catch(e){r=!1}if(r){let r=new URL(e);return r.searchParams.has("projectId")||r.searchParams.set("projectId",t),r.toString()}return e},isCaipNetwork:e=>"chainNamespace"in e&&"caipNetworkId"in e,getChainNamespace(e){return this.isCaipNetwork(e)?e.chainNamespace:d.b.CHAIN.EVM},getCaipNetworkId(e){return this.isCaipNetwork(e)?e.caipNetworkId:`${d.b.CHAIN.EVM}:${e.id}`},getDefaultRpcUrl(e,t,r){let i=e.rpcUrls?.default?.http?.[0];return m.includes(t)?g(t,r):i||""},extendCaipNetwork(e,{customNetworkImageUrls:t,projectId:r,customRpcUrls:i}){let n=this.getChainNamespace(e),o=this.getCaipNetworkId(e),s=e.rpcUrls?.default?.http?.[0],a=this.getDefaultRpcUrl(e,o,r),l=e?.rpcUrls?.chainDefault?.http?.[0]||s,c=i?.[o]?.map(e=>e.url)||[],d=[...c,...a?[a]:[]],u=[...c];return l&&!u.includes(l)&&u.push(l),{...e,chainNamespace:n,caipNetworkId:o,assets:{imageId:f[e.id],imageUrl:t?.[e.id]},rpcUrls:{...e.rpcUrls,default:{http:d},chainDefault:{http:u}}}},extendCaipNetworks:(e,{customNetworkImageUrls:t,projectId:r,customRpcUrls:i})=>e.map(e=>y.extendCaipNetwork(e,{customNetworkImageUrls:t,customRpcUrls:i,projectId:r})),getViemTransport(e,t,r){let n=[];return r?.forEach(e=>{n.push(i.d(e.url,e.config))}),m.includes(e.caipNetworkId)&&n.push((0,i.d)(g(e.caipNetworkId,t),{fetchOptions:{headers:{"Content-Type":"text/plain"}}})),e?.rpcUrls?.default?.http?.forEach(e=>{n.push(i.d(e))}),l(n)},extendWagmiTransports(e,t,r){if(m.includes(e.caipNetworkId)){let n=this.getDefaultRpcUrl(e,e.caipNetworkId,t);return l([r,(0,i.d)(n)])}return r},getUnsupportedNetwork:e=>({id:e.split(":")[1],caipNetworkId:e,name:d.b.UNSUPPORTED_NETWORK_NAME,chainNamespace:e.split(":")[0],nativeCurrency:{name:"",decimals:0,symbol:""},rpcUrls:{default:{http:[]}}}),getCaipNetworkFromStorage(e){let t=u.M.getActiveCaipNetworkId(),r=h.R.getAllRequestedCaipNetworks(),i=Array.from(h.R.state.chains?.keys()||[]),n=t?.split(":")[0],o=!!n&&i.includes(n),s=r?.find(e=>e.caipNetworkId===t);return o&&!s&&t?this.getUnsupportedNetwork(t):s||e||r?.[0]}}},88578:function(e,t,r){"use strict";r.d(t,{b:function(){return i}});let i={METMASK_CONNECTOR_NAME:"MetaMask",TRUST_CONNECTOR_NAME:"Trust Wallet",SOLFLARE_CONNECTOR_NAME:"Solflare",PHANTOM_CONNECTOR_NAME:"Phantom",COIN98_CONNECTOR_NAME:"Coin98",MAGIC_EDEN_CONNECTOR_NAME:"Magic Eden",BACKPACK_CONNECTOR_NAME:"Backpack",BITGET_CONNECTOR_NAME:"Bitget Wallet",FRONTIER_CONNECTOR_NAME:"Frontier",XVERSE_CONNECTOR_NAME:"Xverse Wallet",LEATHER_CONNECTOR_NAME:"Leather",OKX_CONNECTOR_NAME:"OKX Wallet",BINANCE_CONNECTOR_NAME:"Binance Wallet",EIP155:r(44649).b.CHAIN.EVM,ADD_CHAIN_METHOD:"wallet_addEthereumChain",EIP6963_ANNOUNCE_EVENT:"eip6963:announceProvider",EIP6963_REQUEST_EVENT:"eip6963:requestProvider",CONNECTOR_RDNS_MAP:{coinbaseWallet:"com.coinbase.wallet",coinbaseWalletSDK:"com.coinbase.wallet"},CONNECTOR_TYPE_EXTERNAL:"EXTERNAL",CONNECTOR_TYPE_WALLET_CONNECT:"WALLET_CONNECT",CONNECTOR_TYPE_INJECTED:"INJECTED",CONNECTOR_TYPE_ANNOUNCED:"ANNOUNCED",CONNECTOR_TYPE_AUTH:"AUTH",CONNECTOR_TYPE_MULTI_CHAIN:"MULTI_CHAIN",CONNECTOR_TYPE_W3M_AUTH:"AUTH",getSDKVersionWarningMessage:(e,t)=>` + @@@@@@@ @@@@@@@@@@@@@@@@@@ + @@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@ + @@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@ + @@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@ + @@@@@@@@@@@@@@@ @@@@@@@@@@@@@@ @@@@@@@@@@@ + @@@@@@@@@@@@@@@ @@@@@@@@@@@@@ @@@@@@@@@@@@ + @@@@@@@@@@@@@@@ @@@@@@@@@@@@@ @@@@@@@@@@@@@ + @@@@@@@@@@@@@@@ @@@@@@@@@@@@ @@@@@@@@@@@@@ + @@@@@@ @@@@@@ @@@@@@@@@@@ @@@@@@@@@@@@@@ + @@@@@@ @@@@@@ @@@@@@@@@@@ @@@@@@@@@@@@@@@ + @@@@@@@@@@@@@@@ @@@@@@@@@@ @@@@@@@@@@@@@@@ + @@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@ + @@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@@ + @@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@ + @@@@@ @@@@@@@@@@@@@@@@@@ + +AppKit SDK version ${e} is outdated. Latest version is ${t}. Please update to the latest version for bug fixes and new features. + +Changelog: https://github.com/reown-com/appkit/releases +NPM Registry: https://www.npmjs.com/package/@reown/appkit`}},65653:function(e,t,r){"use strict";r.d(t,{j:function(){return o}});var i=r(61616),n=r(5688);let o={EmbeddedWalletAbortController:new AbortController,UniversalProviderErrors:{UNAUTHORIZED_DOMAIN_NOT_ALLOWED:{message:"Unauthorized: origin not allowed",alertErrorKey:"ORIGIN_NOT_ALLOWED"},JWT_VALIDATION_ERROR:{message:"JWT validation error: JWT Token is not yet valid",alertErrorKey:"JWT_TOKEN_NOT_VALID"},INVALID_KEY:{message:"Unauthorized: invalid key",alertErrorKey:"INVALID_PROJECT_ID"}},ALERT_ERRORS:{SWITCH_NETWORK_NOT_FOUND:{code:"APKT001",displayMessage:"Network Not Found",debugMessage:"The specified network is not recognized. Please ensure it is included in the `networks` array of your `createAppKit` configuration."},ORIGIN_NOT_ALLOWED:{code:"APKT002",displayMessage:"Invalid App Configuration",debugMessage:()=>`The origin ${(0,i.$U)()?window.origin:"unknown"} is not in your allow list. Please update your allowed domains at https://dashboard.reown.com. [PID: ${n.OptionsController.state.projectId}]`},IFRAME_LOAD_FAILED:{code:"APKT003",displayMessage:"Network Error: Wallet Load Failed",debugMessage:()=>"Failed to load the embedded wallet. This may be due to network issues or server downtime. Please check your network connection and try again shortly. Contact support if the issue persists."},IFRAME_REQUEST_TIMEOUT:{code:"APKT004",displayMessage:"Wallet Request Timeout",debugMessage:()=>"The request to the embedded wallet timed out. Please check your network connection and try again shortly. Contact support if the issue persists."},UNVERIFIED_DOMAIN:{code:"APKT005",displayMessage:"Unverified Domain",debugMessage:()=>"Embedded wallet load failed. Ensure your domain is verified in https://dashboard.reown.com."},JWT_TOKEN_NOT_VALID:{code:"APKT006",displayMessage:"Session Expired",debugMessage:"Your session is invalid or expired. Please check your system’s date and time settings, then reconnect."},INVALID_PROJECT_ID:{code:"APKT007",displayMessage:"Invalid Project ID",debugMessage:"The specified project ID is invalid. Please visit https://dashboard.reown.com to obtain a valid project ID."},PROJECT_ID_NOT_CONFIGURED:{code:"APKT008",displayMessage:"Project ID Missing",debugMessage:"No project ID is configured. You can create and configure a project ID at https://dashboard.reown.com."},SERVER_ERROR_APP_CONFIGURATION:{code:"APKT009",displayMessage:"Server Error",debugMessage:e=>`Unable to fetch App Configuration. ${e}. Please check your network connection and try again shortly. Contact support if the issue persists.`},RATE_LIMITED_APP_CONFIGURATION:{code:"APKT010",displayMessage:"Rate Limited",debugMessage:"You have been rate limited while retrieving App Configuration. Please wait a few minutes and try again. Contact support if the issue persists."}},ALERT_WARNINGS:{LOCAL_CONFIGURATION_IGNORED:{debugMessage:e=>`[Reown Config Notice] ${e}`},INACTIVE_NAMESPACE_NOT_CONNECTED:{code:"APKTW001",displayMessage:"Inactive Namespace Not Connected",debugMessage:(e,t)=>`An error occurred while connecting an inactive namespace ${e}: "${t}"`},INVALID_EMAIL:{code:"APKTW002",displayMessage:"Invalid Email Address",debugMessage:"Please enter a valid email address"}}}},54090:function(e,t,r){"use strict";r.d(t,{g:function(){return l}});var i=r(44649),n=r(6943),o=r(35652),s=r(36801),a=r(88578);let l={getCaipTokens(e){if(!e)return;let t={};return Object.entries(e).forEach(([e,r])=>{t[`${a.b.EIP155}:${e}`]=r}),t},isLowerCaseMatch:(e,t)=>e?.toLowerCase()===t?.toLowerCase(),getActiveNamespaceConnectedToAuth(){let e=n.R.state.activeChain;return i.b.AUTH_CONNECTOR_SUPPORTED_CHAINS.find(t=>o.ConnectorController.getConnectorId(t)===i.b.CONNECTOR_ID.AUTH&&t===e)},withRetry({conditionFn:e,intervalMs:t,maxRetries:r}){let i=0;return new Promise(n=>{async function o(){return(i+=1,await e())?n(!0):i>=r?n(!1):(setTimeout(o,t),null)}o()})},userChainIdToChainNamespace(e){if("number"==typeof e)return i.b.CHAIN.EVM;let[t]=e.split(":");return t},getOtherAuthNamespaces:e=>e?i.b.AUTH_CONNECTOR_SUPPORTED_CHAINS.filter(t=>t!==e):[],getConnectorStorageInfo(e,t){let r=s.M.getConnections()[t]??[];return{hasDisconnected:s.M.isConnectorDisconnected(e,t),hasConnected:r.some(t=>l.isLowerCaseMatch(t.connectorId,e))}}}},4786:function(e,t,r){"use strict";r.d(t,{$0:function(){return a},Dr:function(){return n},jd:function(){return o},y_:function(){return l},zN:function(){return s}});var i=r(40257);let n=(void 0!==i&&void 0!==i.env?i.env.NEXT_PUBLIC_SECURE_SITE_SDK_URL:void 0)||"https://secure.walletconnect.org/sdk",o=(void 0!==i&&void 0!==i.env?i.env.NEXT_PUBLIC_DEFAULT_LOG_LEVEL:void 0)||"error",s=(void 0!==i&&void 0!==i.env?i.env.NEXT_PUBLIC_SECURE_SITE_SDK_VERSION:void 0)||"4",a={APP_EVENT_KEY:"@w3m-app/",FRAME_EVENT_KEY:"@w3m-frame/",RPC_METHOD_KEY:"RPC_",STORAGE_KEY:"@appkit-wallet/",SESSION_TOKEN_KEY:"SESSION_TOKEN_KEY",EMAIL_LOGIN_USED_KEY:"EMAIL_LOGIN_USED_KEY",LAST_USED_CHAIN_KEY:"LAST_USED_CHAIN_KEY",LAST_EMAIL_LOGIN_TIME:"LAST_EMAIL_LOGIN_TIME",EMAIL:"EMAIL",PREFERRED_ACCOUNT_TYPE:"PREFERRED_ACCOUNT_TYPE",SMART_ACCOUNT_ENABLED:"SMART_ACCOUNT_ENABLED",SMART_ACCOUNT_ENABLED_NETWORKS:"SMART_ACCOUNT_ENABLED_NETWORKS",SOCIAL_USERNAME:"SOCIAL_USERNAME",APP_SWITCH_NETWORK:"@w3m-app/SWITCH_NETWORK",APP_CONNECT_EMAIL:"@w3m-app/CONNECT_EMAIL",APP_CONNECT_DEVICE:"@w3m-app/CONNECT_DEVICE",APP_CONNECT_OTP:"@w3m-app/CONNECT_OTP",APP_CONNECT_SOCIAL:"@w3m-app/CONNECT_SOCIAL",APP_GET_SOCIAL_REDIRECT_URI:"@w3m-app/GET_SOCIAL_REDIRECT_URI",APP_GET_USER:"@w3m-app/GET_USER",APP_SIGN_OUT:"@w3m-app/SIGN_OUT",APP_IS_CONNECTED:"@w3m-app/IS_CONNECTED",APP_GET_CHAIN_ID:"@w3m-app/GET_CHAIN_ID",APP_RPC_REQUEST:"@w3m-app/RPC_REQUEST",APP_UPDATE_EMAIL:"@w3m-app/UPDATE_EMAIL",APP_UPDATE_EMAIL_PRIMARY_OTP:"@w3m-app/UPDATE_EMAIL_PRIMARY_OTP",APP_UPDATE_EMAIL_SECONDARY_OTP:"@w3m-app/UPDATE_EMAIL_SECONDARY_OTP",APP_AWAIT_UPDATE_EMAIL:"@w3m-app/AWAIT_UPDATE_EMAIL",APP_SYNC_THEME:"@w3m-app/SYNC_THEME",APP_SYNC_DAPP_DATA:"@w3m-app/SYNC_DAPP_DATA",APP_GET_SMART_ACCOUNT_ENABLED_NETWORKS:"@w3m-app/GET_SMART_ACCOUNT_ENABLED_NETWORKS",APP_INIT_SMART_ACCOUNT:"@w3m-app/INIT_SMART_ACCOUNT",APP_SET_PREFERRED_ACCOUNT:"@w3m-app/SET_PREFERRED_ACCOUNT",APP_CONNECT_FARCASTER:"@w3m-app/CONNECT_FARCASTER",APP_GET_FARCASTER_URI:"@w3m-app/GET_FARCASTER_URI",APP_RELOAD:"@w3m-app/RELOAD",APP_RPC_ABORT:"@w3m-app/RPC_ABORT",FRAME_SWITCH_NETWORK_ERROR:"@w3m-frame/SWITCH_NETWORK_ERROR",FRAME_SWITCH_NETWORK_SUCCESS:"@w3m-frame/SWITCH_NETWORK_SUCCESS",FRAME_CONNECT_EMAIL_ERROR:"@w3m-frame/CONNECT_EMAIL_ERROR",FRAME_CONNECT_EMAIL_SUCCESS:"@w3m-frame/CONNECT_EMAIL_SUCCESS",FRAME_CONNECT_DEVICE_ERROR:"@w3m-frame/CONNECT_DEVICE_ERROR",FRAME_CONNECT_DEVICE_SUCCESS:"@w3m-frame/CONNECT_DEVICE_SUCCESS",FRAME_CONNECT_OTP_SUCCESS:"@w3m-frame/CONNECT_OTP_SUCCESS",FRAME_CONNECT_OTP_ERROR:"@w3m-frame/CONNECT_OTP_ERROR",FRAME_CONNECT_SOCIAL_SUCCESS:"@w3m-frame/CONNECT_SOCIAL_SUCCESS",FRAME_CONNECT_SOCIAL_ERROR:"@w3m-frame/CONNECT_SOCIAL_ERROR",FRAME_CONNECT_FARCASTER_SUCCESS:"@w3m-frame/CONNECT_FARCASTER_SUCCESS",FRAME_CONNECT_FARCASTER_ERROR:"@w3m-frame/CONNECT_FARCASTER_ERROR",FRAME_GET_FARCASTER_URI_SUCCESS:"@w3m-frame/GET_FARCASTER_URI_SUCCESS",FRAME_GET_FARCASTER_URI_ERROR:"@w3m-frame/GET_FARCASTER_URI_ERROR",FRAME_GET_SOCIAL_REDIRECT_URI_SUCCESS:"@w3m-frame/GET_SOCIAL_REDIRECT_URI_SUCCESS",FRAME_GET_SOCIAL_REDIRECT_URI_ERROR:"@w3m-frame/GET_SOCIAL_REDIRECT_URI_ERROR",FRAME_GET_USER_SUCCESS:"@w3m-frame/GET_USER_SUCCESS",FRAME_GET_USER_ERROR:"@w3m-frame/GET_USER_ERROR",FRAME_SIGN_OUT_SUCCESS:"@w3m-frame/SIGN_OUT_SUCCESS",FRAME_SIGN_OUT_ERROR:"@w3m-frame/SIGN_OUT_ERROR",FRAME_IS_CONNECTED_SUCCESS:"@w3m-frame/IS_CONNECTED_SUCCESS",FRAME_IS_CONNECTED_ERROR:"@w3m-frame/IS_CONNECTED_ERROR",FRAME_GET_CHAIN_ID_SUCCESS:"@w3m-frame/GET_CHAIN_ID_SUCCESS",FRAME_GET_CHAIN_ID_ERROR:"@w3m-frame/GET_CHAIN_ID_ERROR",FRAME_RPC_REQUEST_SUCCESS:"@w3m-frame/RPC_REQUEST_SUCCESS",FRAME_RPC_REQUEST_ERROR:"@w3m-frame/RPC_REQUEST_ERROR",FRAME_SESSION_UPDATE:"@w3m-frame/SESSION_UPDATE",FRAME_UPDATE_EMAIL_SUCCESS:"@w3m-frame/UPDATE_EMAIL_SUCCESS",FRAME_UPDATE_EMAIL_ERROR:"@w3m-frame/UPDATE_EMAIL_ERROR",FRAME_UPDATE_EMAIL_PRIMARY_OTP_SUCCESS:"@w3m-frame/UPDATE_EMAIL_PRIMARY_OTP_SUCCESS",FRAME_UPDATE_EMAIL_PRIMARY_OTP_ERROR:"@w3m-frame/UPDATE_EMAIL_PRIMARY_OTP_ERROR",FRAME_UPDATE_EMAIL_SECONDARY_OTP_SUCCESS:"@w3m-frame/UPDATE_EMAIL_SECONDARY_OTP_SUCCESS",FRAME_UPDATE_EMAIL_SECONDARY_OTP_ERROR:"@w3m-frame/UPDATE_EMAIL_SECONDARY_OTP_ERROR",FRAME_SYNC_THEME_SUCCESS:"@w3m-frame/SYNC_THEME_SUCCESS",FRAME_SYNC_THEME_ERROR:"@w3m-frame/SYNC_THEME_ERROR",FRAME_SYNC_DAPP_DATA_SUCCESS:"@w3m-frame/SYNC_DAPP_DATA_SUCCESS",FRAME_SYNC_DAPP_DATA_ERROR:"@w3m-frame/SYNC_DAPP_DATA_ERROR",FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_SUCCESS:"@w3m-frame/GET_SMART_ACCOUNT_ENABLED_NETWORKS_SUCCESS",FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_ERROR:"@w3m-frame/GET_SMART_ACCOUNT_ENABLED_NETWORKS_ERROR",FRAME_INIT_SMART_ACCOUNT_SUCCESS:"@w3m-frame/INIT_SMART_ACCOUNT_SUCCESS",FRAME_INIT_SMART_ACCOUNT_ERROR:"@w3m-frame/INIT_SMART_ACCOUNT_ERROR",FRAME_SET_PREFERRED_ACCOUNT_SUCCESS:"@w3m-frame/SET_PREFERRED_ACCOUNT_SUCCESS",FRAME_SET_PREFERRED_ACCOUNT_ERROR:"@w3m-frame/SET_PREFERRED_ACCOUNT_ERROR",FRAME_READY:"@w3m-frame/READY",FRAME_RELOAD_SUCCESS:"@w3m-frame/RELOAD_SUCCESS",FRAME_RELOAD_ERROR:"@w3m-frame/RELOAD_ERROR",FRAME_RPC_ABORT_SUCCESS:"@w3m-frame/RPC_ABORT_SUCCESS",FRAME_RPC_ABORT_ERROR:"@w3m-frame/RPC_ABORT_ERROR",RPC_RESPONSE_TYPE_ERROR:"RPC_RESPONSE_ERROR",RPC_RESPONSE_TYPE_TX:"RPC_RESPONSE_TRANSACTION_HASH",RPC_RESPONSE_TYPE_OBJECT:"RPC_RESPONSE_OBJECT"},l={SAFE_RPC_METHODS:["eth_accounts","eth_blockNumber","eth_call","eth_chainId","eth_estimateGas","eth_feeHistory","eth_gasPrice","eth_getAccount","eth_getBalance","eth_getBlockByHash","eth_getBlockByNumber","eth_getBlockReceipts","eth_getBlockTransactionCountByHash","eth_getBlockTransactionCountByNumber","eth_getCode","eth_getFilterChanges","eth_getFilterLogs","eth_getLogs","eth_getProof","eth_getStorageAt","eth_getTransactionByBlockHashAndIndex","eth_getTransactionByBlockNumberAndIndex","eth_getTransactionByHash","eth_getTransactionCount","eth_getTransactionReceipt","eth_getUncleCountByBlockHash","eth_getUncleCountByBlockNumber","eth_maxPriorityFeePerGas","eth_newBlockFilter","eth_newFilter","eth_newPendingTransactionFilter","eth_sendRawTransaction","eth_syncing","eth_uninstallFilter","wallet_getCapabilities","wallet_getCallsStatus","eth_getUserOperationReceipt","eth_estimateUserOperationGas","eth_getUserOperationByHash","eth_supportedEntryPoints","wallet_getAssets"],NOT_SAFE_RPC_METHODS:["personal_sign","eth_signTypedData_v4","eth_sendTransaction","solana_signMessage","solana_signTransaction","solana_signAllTransactions","solana_signAndSendTransaction","wallet_sendCalls","wallet_grantPermissions","wallet_revokePermissions","eth_sendUserOperation"],GET_CHAIN_ID:"eth_chainId",RPC_METHOD_NOT_ALLOWED_MESSAGE:"Requested RPC call is not allowed",RPC_METHOD_NOT_ALLOWED_UI_MESSAGE:"Action not allowed",ACCOUNT_TYPES:{EOA:"eoa",SMART_ACCOUNT:"smartAccount"}}},92764:function(e,t,r){"use strict";r.d(t,{$:function(){return s}});let i={transactionHash:/^0x(?:[A-Fa-f0-9]{64})$/u,signedMessage:/^0x(?:[a-fA-F0-9]{62,})$/u};var n=r(4786),o=r(63671);let s={checkIfAllowedToTriggerEmail(){let e=o.e.get(n.$0.LAST_EMAIL_LOGIN_TIME);if(e){let t=Date.now()-Number(e);if(t<3e4)throw Error(`Please try again after ${Math.ceil((3e4-t)/1e3)} seconds`)}},getTimeToNextEmailLogin(){let e=o.e.get(n.$0.LAST_EMAIL_LOGIN_TIME);if(e){let t=Date.now()-Number(e);if(t<3e4)return Math.ceil((3e4-t)/1e3)}return 0},checkIfRequestExists:e=>n.y_.NOT_SAFE_RPC_METHODS.includes(e.method)||n.y_.SAFE_RPC_METHODS.includes(e.method),getResponseType:e=>"string"==typeof e&&(e?.match(i.transactionHash)||e?.match(i.signedMessage))?n.$0.RPC_RESPONSE_TYPE_TX:n.$0.RPC_RESPONSE_TYPE_OBJECT,checkIfRequestIsSafe:e=>n.y_.SAFE_RPC_METHODS.includes(e.method),isClient:"undefined"!=typeof window}},55:function(e,t,r){"use strict";let i;r.d(t,{S:function(){return rx}});var n,o,s,a,l,c,d,u=r(86988),h=r(44649),p=r(4786),f=r(92764);(n=a||(a={})).assertEqual=e=>e,n.assertIs=function(e){},n.assertNever=function(e){throw Error()},n.arrayToEnum=e=>{let t={};for(let r of e)t[r]=r;return t},n.getValidEnumValues=e=>{let t=n.objectKeys(e).filter(t=>"number"!=typeof e[e[t]]),r={};for(let i of t)r[i]=e[i];return n.objectValues(r)},n.objectValues=e=>n.objectKeys(e).map(function(t){return e[t]}),n.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{let t=[];for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t},n.find=(e,t)=>{for(let r of e)if(t(r))return r},n.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&isFinite(e)&&Math.floor(e)===e,n.joinValues=function(e,t=" | "){return e.map(e=>"string"==typeof e?`'${e}'`:e).join(t)},n.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t,(l||(l={})).mergeShapes=(e,t)=>({...e,...t});let g=a.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),m=e=>{switch(typeof e){case"undefined":return g.undefined;case"string":return g.string;case"number":return isNaN(e)?g.nan:g.number;case"boolean":return g.boolean;case"function":return g.function;case"bigint":return g.bigint;case"symbol":return g.symbol;case"object":if(Array.isArray(e))return g.array;if(null===e)return g.null;if(e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch)return g.promise;if("undefined"!=typeof Map&&e instanceof Map)return g.map;if("undefined"!=typeof Set&&e instanceof Set)return g.set;if("undefined"!=typeof Date&&e instanceof Date)return g.date;return g.object;default:return g.unknown}},y=a.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class w extends Error{constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){let t=e||function(e){return e.message},r={_errors:[]},i=e=>{for(let n of e.issues)if("invalid_union"===n.code)n.unionErrors.map(i);else if("invalid_return_type"===n.code)i(n.returnTypeError);else if("invalid_arguments"===n.code)i(n.argumentsError);else if(0===n.path.length)r._errors.push(t(n));else{let e=r,i=0;for(;ie.message){let t={},r=[];for(let i of this.issues)i.path.length>0?(t[i.path[0]]=t[i.path[0]]||[],t[i.path[0]].push(e(i))):r.push(e(i));return{formErrors:r,fieldErrors:t}}get formErrors(){return this.flatten()}}w.create=e=>new w(e);let b=(e,t)=>{let r;switch(e.code){case y.invalid_type:r=e.received===g.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case y.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,a.jsonStringifyReplacer)}`;break;case y.unrecognized_keys:r=`Unrecognized key(s) in object: ${a.joinValues(e.keys,", ")}`;break;case y.invalid_union:r="Invalid input";break;case y.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${a.joinValues(e.options)}`;break;case y.invalid_enum_value:r=`Invalid enum value. Expected ${a.joinValues(e.options)}, received '${e.received}'`;break;case y.invalid_arguments:r="Invalid function arguments";break;case y.invalid_return_type:r="Invalid function return type";break;case y.invalid_date:r="Invalid date";break;case y.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:a.assertNever(e.validation):r="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case y.too_small:r="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case y.too_big:r="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case y.custom:r="Invalid input";break;case y.invalid_intersection_types:r="Intersection results could not be merged";break;case y.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case y.not_finite:r="Number must be finite";break;default:r=t.defaultError,a.assertNever(e)}return{message:r}},v=b;function C(){return v}let E=e=>{let{data:t,path:r,errorMaps:i,issueData:n}=e,o=[...r,...n.path||[]],s={...n,path:o},a="";for(let e of i.filter(e=>!!e).slice().reverse())a=e(s,{data:t,defaultError:a}).message;return{...n,path:o,message:n.message||a}};function x(e,t){let r=E({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,C(),b].filter(e=>!!e)});e.common.issues.push(r)}class _{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){let r=[];for(let i of t){if("aborted"===i.status)return A;"dirty"===i.status&&e.dirty(),r.push(i.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,t){let r=[];for(let e of t)r.push({key:await e.key,value:await e.value});return _.mergeObjectSync(e,r)}static mergeObjectSync(e,t){let r={};for(let i of t){let{key:t,value:n}=i;if("aborted"===t.status||"aborted"===n.status)return A;"dirty"===t.status&&e.dirty(),"dirty"===n.status&&e.dirty(),"__proto__"!==t.value&&(void 0!==n.value||i.alwaysSet)&&(r[t.value]=n.value)}return{status:e.value,value:r}}}let A=Object.freeze({status:"aborted"}),S=e=>({status:"dirty",value:e}),I=e=>({status:"valid",value:e}),N=e=>"aborted"===e.status,k=e=>"dirty"===e.status,R=e=>"valid"===e.status,O=e=>"undefined"!=typeof Promise&&e instanceof Promise;(o=c||(c={})).errToObj=e=>"string"==typeof e?{message:e}:e||{},o.toString=e=>"string"==typeof e?e:null==e?void 0:e.message;class T{constructor(e,t,r,i){this._cachedPath=[],this.parent=e,this.data=t,this._path=r,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}let P=(e,t)=>{if(R(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let t=new w(e.common.issues);return this._error=t,this._error}}};function $(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:i,description:n}=e;if(t&&(r||i))throw Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return t?{errorMap:t,description:n}:{errorMap:(e,t)=>"invalid_type"!==e.code?{message:t.defaultError}:void 0===t.data?{message:null!=i?i:t.defaultError}:{message:null!=r?r:t.defaultError},description:n}}class D{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return m(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:m(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new _,ctx:{common:e.parent.common,data:e.data,parsedType:m(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(O(t))throw Error("Synchronous parse encountered promise.");return t}_parseAsync(e){return Promise.resolve(this._parse(e))}parse(e,t){let r=this.safeParse(e,t);if(r.success)return r.data;throw r.error}safeParse(e,t){var r;let i={common:{issues:[],async:null!==(r=null==t?void 0:t.async)&&void 0!==r&&r,contextualErrorMap:null==t?void 0:t.errorMap},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:m(e)},n=this._parseSync({data:e,path:i.path,parent:i});return P(i,n)}async parseAsync(e,t){let r=await this.safeParseAsync(e,t);if(r.success)return r.data;throw r.error}async safeParseAsync(e,t){let r={common:{issues:[],contextualErrorMap:null==t?void 0:t.errorMap,async:!0},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:m(e)},i=this._parse({data:e,path:r.path,parent:r});return P(r,await (O(i)?i:Promise.resolve(i)))}refine(e,t){let r=e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t;return this._refinement((t,i)=>{let n=e(t),o=()=>i.addIssue({code:y.custom,...r(t)});return"undefined"!=typeof Promise&&n instanceof Promise?n.then(e=>!!e||(o(),!1)):!!n||(o(),!1)})}refinement(e,t){return this._refinement((r,i)=>!!e(r)||(i.addIssue("function"==typeof t?t(r,i):t),!1))}_refinement(e){return new eb({schema:this,typeName:d.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return ev.create(this,this._def)}nullable(){return eC.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return er.create(this,this._def)}promise(){return ew.create(this,this._def)}or(e){return en.create([this,e],this._def)}and(e){return ea.create(this,e,this._def)}transform(e){return new eb({...$(this._def),schema:this,typeName:d.ZodEffects,effect:{type:"transform",transform:e}})}default(e){return new eE({...$(this._def),innerType:this,defaultValue:"function"==typeof e?e:()=>e,typeName:d.ZodDefault})}brand(){return new eS({typeName:d.ZodBranded,type:this,...$(this._def)})}catch(e){return new ex({...$(this._def),innerType:this,catchValue:"function"==typeof e?e:()=>e,typeName:d.ZodCatch})}describe(e){return new this.constructor({...this._def,description:e})}pipe(e){return eI.create(this,e)}readonly(){return eN.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}let U=/^c[^\s-]{8,}$/i,L=/^[a-z][a-z0-9]*$/,M=/^[0-9A-HJKMNP-TV-Z]{26}$/,B=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,j=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,F=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,W=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,z=e=>e.precision?e.offset?RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}Z$`):0===e.precision?e.offset?RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):e.offset?RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");class H extends D{_parse(e){let t;if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==g.string){let t=this._getOrReturnCtx(e);return x(t,{code:y.invalid_type,expected:g.string,received:t.parsedType}),A}let r=new _;for(let s of this._def.checks)if("min"===s.kind)e.data.lengths.value&&(x(t=this._getOrReturnCtx(e,t),{code:y.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if("length"===s.kind){let i=e.data.length>s.value,n=e.data.lengthe.test(t),{validation:t,code:y.invalid_string,...c.errToObj(r)})}_addCheck(e){return new H({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...c.errToObj(e)})}url(e){return this._addCheck({kind:"url",...c.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...c.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...c.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...c.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...c.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...c.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...c.errToObj(e)})}datetime(e){var t;return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,offset:null!==(t=null==e?void 0:e.offset)&&void 0!==t&&t,...c.errToObj(null==e?void 0:e.message)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...c.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:null==t?void 0:t.position,...c.errToObj(null==t?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...c.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...c.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...c.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...c.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...c.errToObj(t)})}nonempty(e){return this.min(1,c.errToObj(e))}trim(){return new H({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new H({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new H({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>"datetime"===e.kind)}get isEmail(){return!!this._def.checks.find(e=>"email"===e.kind)}get isURL(){return!!this._def.checks.find(e=>"url"===e.kind)}get isEmoji(){return!!this._def.checks.find(e=>"emoji"===e.kind)}get isUUID(){return!!this._def.checks.find(e=>"uuid"===e.kind)}get isCUID(){return!!this._def.checks.find(e=>"cuid"===e.kind)}get isCUID2(){return!!this._def.checks.find(e=>"cuid2"===e.kind)}get isULID(){return!!this._def.checks.find(e=>"ulid"===e.kind)}get isIP(){return!!this._def.checks.find(e=>"ip"===e.kind)}get minLength(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value{var t;return new H({checks:[],typeName:d.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...$(e)})};class q extends D{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){let t;if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==g.number){let t=this._getOrReturnCtx(e);return x(t,{code:y.invalid_type,expected:g.number,received:t.parsedType}),A}let r=new _;for(let i of this._def.checks)"int"===i.kind?a.isInteger(e.data)||(x(t=this._getOrReturnCtx(e,t),{code:y.invalid_type,expected:"integer",received:"float",message:i.message}),r.dirty()):"min"===i.kind?(i.inclusive?e.datai.value:e.data>=i.value)&&(x(t=this._getOrReturnCtx(e,t),{code:y.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),r.dirty()):"multipleOf"===i.kind?0!==function(e,t){let r=(e.toString().split(".")[1]||"").length,i=(t.toString().split(".")[1]||"").length,n=r>i?r:i;return parseInt(e.toFixed(n).replace(".",""))%parseInt(t.toFixed(n).replace(".",""))/Math.pow(10,n)}(e.data,i.value)&&(x(t=this._getOrReturnCtx(e,t),{code:y.not_multiple_of,multipleOf:i.value,message:i.message}),r.dirty()):"finite"===i.kind?Number.isFinite(e.data)||(x(t=this._getOrReturnCtx(e,t),{code:y.not_finite,message:i.message}),r.dirty()):a.assertNever(i);return{status:r.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,c.toString(t))}gt(e,t){return this.setLimit("min",e,!1,c.toString(t))}lte(e,t){return this.setLimit("max",e,!0,c.toString(t))}lt(e,t){return this.setLimit("max",e,!1,c.toString(t))}setLimit(e,t,r,i){return new q({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:c.toString(i)}]})}_addCheck(e){return new q({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:c.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:c.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:c.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:c.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:c.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:c.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:c.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:c.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:c.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value"int"===e.kind||"multipleOf"===e.kind&&a.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let r of this._def.checks){if("finite"===r.kind||"int"===r.kind||"multipleOf"===r.kind)return!0;"min"===r.kind?(null===t||r.value>t)&&(t=r.value):"max"===r.kind&&(null===e||r.valuenew q({checks:[],typeName:d.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1,...$(e)});class V extends D{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){let t;if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==g.bigint){let t=this._getOrReturnCtx(e);return x(t,{code:y.invalid_type,expected:g.bigint,received:t.parsedType}),A}let r=new _;for(let i of this._def.checks)"min"===i.kind?(i.inclusive?e.datai.value:e.data>=i.value)&&(x(t=this._getOrReturnCtx(e,t),{code:y.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),r.dirty()):"multipleOf"===i.kind?e.data%i.value!==BigInt(0)&&(x(t=this._getOrReturnCtx(e,t),{code:y.not_multiple_of,multipleOf:i.value,message:i.message}),r.dirty()):a.assertNever(i);return{status:r.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,c.toString(t))}gt(e,t){return this.setLimit("min",e,!1,c.toString(t))}lte(e,t){return this.setLimit("max",e,!0,c.toString(t))}lt(e,t){return this.setLimit("max",e,!1,c.toString(t))}setLimit(e,t,r,i){return new V({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:c.toString(i)}]})}_addCheck(e){return new V({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:c.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:c.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:c.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:c.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:c.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value{var t;return new V({checks:[],typeName:d.ZodBigInt,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...$(e)})};class K extends D{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==g.boolean){let t=this._getOrReturnCtx(e);return x(t,{code:y.invalid_type,expected:g.boolean,received:t.parsedType}),A}return I(e.data)}}K.create=e=>new K({typeName:d.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1,...$(e)});class Z extends D{_parse(e){let t;if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==g.date){let t=this._getOrReturnCtx(e);return x(t,{code:y.invalid_type,expected:g.date,received:t.parsedType}),A}if(isNaN(e.data.getTime()))return x(this._getOrReturnCtx(e),{code:y.invalid_date}),A;let r=new _;for(let i of this._def.checks)"min"===i.kind?e.data.getTime()i.value&&(x(t=this._getOrReturnCtx(e,t),{code:y.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):a.assertNever(i);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Z({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:c.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:c.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.valuenew Z({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:d.ZodDate,...$(e)});class G extends D{_parse(e){if(this._getType(e)!==g.symbol){let t=this._getOrReturnCtx(e);return x(t,{code:y.invalid_type,expected:g.symbol,received:t.parsedType}),A}return I(e.data)}}G.create=e=>new G({typeName:d.ZodSymbol,...$(e)});class Y extends D{_parse(e){if(this._getType(e)!==g.undefined){let t=this._getOrReturnCtx(e);return x(t,{code:y.invalid_type,expected:g.undefined,received:t.parsedType}),A}return I(e.data)}}Y.create=e=>new Y({typeName:d.ZodUndefined,...$(e)});class J extends D{_parse(e){if(this._getType(e)!==g.null){let t=this._getOrReturnCtx(e);return x(t,{code:y.invalid_type,expected:g.null,received:t.parsedType}),A}return I(e.data)}}J.create=e=>new J({typeName:d.ZodNull,...$(e)});class X extends D{constructor(){super(...arguments),this._any=!0}_parse(e){return I(e.data)}}X.create=e=>new X({typeName:d.ZodAny,...$(e)});class Q extends D{constructor(){super(...arguments),this._unknown=!0}_parse(e){return I(e.data)}}Q.create=e=>new Q({typeName:d.ZodUnknown,...$(e)});class ee extends D{_parse(e){let t=this._getOrReturnCtx(e);return x(t,{code:y.invalid_type,expected:g.never,received:t.parsedType}),A}}ee.create=e=>new ee({typeName:d.ZodNever,...$(e)});class et extends D{_parse(e){if(this._getType(e)!==g.undefined){let t=this._getOrReturnCtx(e);return x(t,{code:y.invalid_type,expected:g.void,received:t.parsedType}),A}return I(e.data)}}et.create=e=>new et({typeName:d.ZodVoid,...$(e)});class er extends D{_parse(e){let{ctx:t,status:r}=this._processInputParams(e),i=this._def;if(t.parsedType!==g.array)return x(t,{code:y.invalid_type,expected:g.array,received:t.parsedType}),A;if(null!==i.exactLength){let e=t.data.length>i.exactLength.value,n=t.data.lengthi.maxLength.value&&(x(t,{code:y.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),t.common.async)return Promise.all([...t.data].map((e,r)=>i.type._parseAsync(new T(t,e,t.path,r)))).then(e=>_.mergeArray(r,e));let n=[...t.data].map((e,r)=>i.type._parseSync(new T(t,e,t.path,r)));return _.mergeArray(r,n)}get element(){return this._def.type}min(e,t){return new er({...this._def,minLength:{value:e,message:c.toString(t)}})}max(e,t){return new er({...this._def,maxLength:{value:e,message:c.toString(t)}})}length(e,t){return new er({...this._def,exactLength:{value:e,message:c.toString(t)}})}nonempty(e){return this.min(1,e)}}er.create=(e,t)=>new er({type:e,minLength:null,maxLength:null,exactLength:null,typeName:d.ZodArray,...$(t)});class ei extends D{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;let e=this._def.shape(),t=a.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==g.object){let t=this._getOrReturnCtx(e);return x(t,{code:y.invalid_type,expected:g.object,received:t.parsedType}),A}let{status:t,ctx:r}=this._processInputParams(e),{shape:i,keys:n}=this._getCached(),o=[];if(!(this._def.catchall instanceof ee&&"strip"===this._def.unknownKeys))for(let e in r.data)n.includes(e)||o.push(e);let s=[];for(let e of n){let t=i[e],n=r.data[e];s.push({key:{status:"valid",value:e},value:t._parse(new T(r,n,r.path,e)),alwaysSet:e in r.data})}if(this._def.catchall instanceof ee){let e=this._def.unknownKeys;if("passthrough"===e)for(let e of o)s.push({key:{status:"valid",value:e},value:{status:"valid",value:r.data[e]}});else if("strict"===e)o.length>0&&(x(r,{code:y.unrecognized_keys,keys:o}),t.dirty());else if("strip"===e);else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let e=this._def.catchall;for(let t of o){let i=r.data[t];s.push({key:{status:"valid",value:t},value:e._parse(new T(r,i,r.path,t)),alwaysSet:t in r.data})}}return r.common.async?Promise.resolve().then(async()=>{let e=[];for(let t of s){let r=await t.key;e.push({key:r,value:await t.value,alwaysSet:t.alwaysSet})}return e}).then(e=>_.mergeObjectSync(t,e)):_.mergeObjectSync(t,s)}get shape(){return this._def.shape()}strict(e){return c.errToObj,new ei({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,r)=>{var i,n,o,s;let a=null!==(o=null===(n=(i=this._def).errorMap)||void 0===n?void 0:n.call(i,t,r).message)&&void 0!==o?o:r.defaultError;return"unrecognized_keys"===t.code?{message:null!==(s=c.errToObj(e).message)&&void 0!==s?s:a}:{message:a}}}:{}})}strip(){return new ei({...this._def,unknownKeys:"strip"})}passthrough(){return new ei({...this._def,unknownKeys:"passthrough"})}extend(e){return new ei({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new ei({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:d.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new ei({...this._def,catchall:e})}pick(e){let t={};return a.objectKeys(e).forEach(r=>{e[r]&&this.shape[r]&&(t[r]=this.shape[r])}),new ei({...this._def,shape:()=>t})}omit(e){let t={};return a.objectKeys(this.shape).forEach(r=>{e[r]||(t[r]=this.shape[r])}),new ei({...this._def,shape:()=>t})}deepPartial(){return function e(t){if(t instanceof ei){let r={};for(let i in t.shape){let n=t.shape[i];r[i]=ev.create(e(n))}return new ei({...t._def,shape:()=>r})}return t instanceof er?new er({...t._def,type:e(t.element)}):t instanceof ev?ev.create(e(t.unwrap())):t instanceof eC?eC.create(e(t.unwrap())):t instanceof el?el.create(t.items.map(t=>e(t))):t}(this)}partial(e){let t={};return a.objectKeys(this.shape).forEach(r=>{let i=this.shape[r];e&&!e[r]?t[r]=i:t[r]=i.optional()}),new ei({...this._def,shape:()=>t})}required(e){let t={};return a.objectKeys(this.shape).forEach(r=>{if(e&&!e[r])t[r]=this.shape[r];else{let e=this.shape[r];for(;e instanceof ev;)e=e._def.innerType;t[r]=e}}),new ei({...this._def,shape:()=>t})}keyof(){return eg(a.objectKeys(this.shape))}}ei.create=(e,t)=>new ei({shape:()=>e,unknownKeys:"strip",catchall:ee.create(),typeName:d.ZodObject,...$(t)}),ei.strictCreate=(e,t)=>new ei({shape:()=>e,unknownKeys:"strict",catchall:ee.create(),typeName:d.ZodObject,...$(t)}),ei.lazycreate=(e,t)=>new ei({shape:e,unknownKeys:"strip",catchall:ee.create(),typeName:d.ZodObject,...$(t)});class en extends D{_parse(e){let{ctx:t}=this._processInputParams(e),r=this._def.options;if(t.common.async)return Promise.all(r.map(async e=>{let r={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:r}),ctx:r}})).then(function(e){for(let t of e)if("valid"===t.result.status)return t.result;for(let r of e)if("dirty"===r.result.status)return t.common.issues.push(...r.ctx.common.issues),r.result;let r=e.map(e=>new w(e.ctx.common.issues));return x(t,{code:y.invalid_union,unionErrors:r}),A});{let e;let i=[];for(let n of r){let r={...t,common:{...t.common,issues:[]},parent:null},o=n._parseSync({data:t.data,path:t.path,parent:r});if("valid"===o.status)return o;"dirty"!==o.status||e||(e={result:o,ctx:r}),r.common.issues.length&&i.push(r.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;let n=i.map(e=>new w(e));return x(t,{code:y.invalid_union,unionErrors:n}),A}}get options(){return this._def.options}}en.create=(e,t)=>new en({options:e,typeName:d.ZodUnion,...$(t)});let eo=e=>{if(e instanceof ep)return eo(e.schema);if(e instanceof eb)return eo(e.innerType());if(e instanceof ef)return[e.value];if(e instanceof em)return e.options;if(e instanceof ey)return Object.keys(e.enum);if(e instanceof eE)return eo(e._def.innerType);if(e instanceof Y)return[void 0];else if(e instanceof J)return[null];else return null};class es extends D{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==g.object)return x(t,{code:y.invalid_type,expected:g.object,received:t.parsedType}),A;let r=this.discriminator,i=t.data[r],n=this.optionsMap.get(i);return n?t.common.async?n._parseAsync({data:t.data,path:t.path,parent:t}):n._parseSync({data:t.data,path:t.path,parent:t}):(x(t,{code:y.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),A)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,r){let i=new Map;for(let r of t){let t=eo(r.shape[e]);if(!t)throw Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let n of t){if(i.has(n))throw Error(`Discriminator property ${String(e)} has duplicate value ${String(n)}`);i.set(n,r)}}return new es({typeName:d.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:i,...$(r)})}}class ea extends D{_parse(e){let{status:t,ctx:r}=this._processInputParams(e),i=(e,i)=>{if(N(e)||N(i))return A;let n=function e(t,r){let i=m(t),n=m(r);if(t===r)return{valid:!0,data:t};if(i===g.object&&n===g.object){let i=a.objectKeys(r),n=a.objectKeys(t).filter(e=>-1!==i.indexOf(e)),o={...t,...r};for(let i of n){let n=e(t[i],r[i]);if(!n.valid)return{valid:!1};o[i]=n.data}return{valid:!0,data:o}}if(i===g.array&&n===g.array){if(t.length!==r.length)return{valid:!1};let i=[];for(let n=0;ni(e,t)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}ea.create=(e,t,r)=>new ea({left:e,right:t,typeName:d.ZodIntersection,...$(r)});class el extends D{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==g.array)return x(r,{code:y.invalid_type,expected:g.array,received:r.parsedType}),A;if(r.data.lengththis._def.items.length&&(x(r,{code:y.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());let i=[...r.data].map((e,t)=>{let i=this._def.items[t]||this._def.rest;return i?i._parse(new T(r,e,r.path,t)):null}).filter(e=>!!e);return r.common.async?Promise.all(i).then(e=>_.mergeArray(t,e)):_.mergeArray(t,i)}get items(){return this._def.items}rest(e){return new el({...this._def,rest:e})}}el.create=(e,t)=>{if(!Array.isArray(e))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new el({items:e,typeName:d.ZodTuple,rest:null,...$(t)})};class ec extends D{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==g.object)return x(r,{code:y.invalid_type,expected:g.object,received:r.parsedType}),A;let i=[],n=this._def.keyType,o=this._def.valueType;for(let e in r.data)i.push({key:n._parse(new T(r,e,r.path,e)),value:o._parse(new T(r,r.data[e],r.path,e))});return r.common.async?_.mergeObjectAsync(t,i):_.mergeObjectSync(t,i)}get element(){return this._def.valueType}static create(e,t,r){return new ec(t instanceof D?{keyType:e,valueType:t,typeName:d.ZodRecord,...$(r)}:{keyType:H.create(),valueType:e,typeName:d.ZodRecord,...$(t)})}}class ed extends D{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==g.map)return x(r,{code:y.invalid_type,expected:g.map,received:r.parsedType}),A;let i=this._def.keyType,n=this._def.valueType,o=[...r.data.entries()].map(([e,t],o)=>({key:i._parse(new T(r,e,r.path,[o,"key"])),value:n._parse(new T(r,t,r.path,[o,"value"]))}));if(r.common.async){let e=new Map;return Promise.resolve().then(async()=>{for(let r of o){let i=await r.key,n=await r.value;if("aborted"===i.status||"aborted"===n.status)return A;("dirty"===i.status||"dirty"===n.status)&&t.dirty(),e.set(i.value,n.value)}return{status:t.value,value:e}})}{let e=new Map;for(let r of o){let i=r.key,n=r.value;if("aborted"===i.status||"aborted"===n.status)return A;("dirty"===i.status||"dirty"===n.status)&&t.dirty(),e.set(i.value,n.value)}return{status:t.value,value:e}}}}ed.create=(e,t,r)=>new ed({valueType:t,keyType:e,typeName:d.ZodMap,...$(r)});class eu extends D{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==g.set)return x(r,{code:y.invalid_type,expected:g.set,received:r.parsedType}),A;let i=this._def;null!==i.minSize&&r.data.sizei.maxSize.value&&(x(r,{code:y.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),t.dirty());let n=this._def.valueType;function o(e){let r=new Set;for(let i of e){if("aborted"===i.status)return A;"dirty"===i.status&&t.dirty(),r.add(i.value)}return{status:t.value,value:r}}let s=[...r.data.values()].map((e,t)=>n._parse(new T(r,e,r.path,t)));return r.common.async?Promise.all(s).then(e=>o(e)):o(s)}min(e,t){return new eu({...this._def,minSize:{value:e,message:c.toString(t)}})}max(e,t){return new eu({...this._def,maxSize:{value:e,message:c.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}eu.create=(e,t)=>new eu({valueType:e,minSize:null,maxSize:null,typeName:d.ZodSet,...$(t)});class eh extends D{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==g.function)return x(t,{code:y.invalid_type,expected:g.function,received:t.parsedType}),A;function r(e,r){return E({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,C(),b].filter(e=>!!e),issueData:{code:y.invalid_arguments,argumentsError:r}})}function i(e,r){return E({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,C(),b].filter(e=>!!e),issueData:{code:y.invalid_return_type,returnTypeError:r}})}let n={errorMap:t.common.contextualErrorMap},o=t.data;if(this._def.returns instanceof ew){let e=this;return I(async function(...t){let s=new w([]),a=await e._def.args.parseAsync(t,n).catch(e=>{throw s.addIssue(r(t,e)),s}),l=await Reflect.apply(o,this,a);return await e._def.returns._def.type.parseAsync(l,n).catch(e=>{throw s.addIssue(i(l,e)),s})})}{let e=this;return I(function(...t){let s=e._def.args.safeParse(t,n);if(!s.success)throw new w([r(t,s.error)]);let a=Reflect.apply(o,this,s.data),l=e._def.returns.safeParse(a,n);if(!l.success)throw new w([i(a,l.error)]);return l.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new eh({...this._def,args:el.create(e).rest(Q.create())})}returns(e){return new eh({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,r){return new eh({args:e||el.create([]).rest(Q.create()),returns:t||Q.create(),typeName:d.ZodFunction,...$(r)})}}class ep extends D{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}ep.create=(e,t)=>new ep({getter:e,typeName:d.ZodLazy,...$(t)});class ef extends D{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return x(t,{received:t.data,code:y.invalid_literal,expected:this._def.value}),A}return{status:"valid",value:e.data}}get value(){return this._def.value}}function eg(e,t){return new em({values:e,typeName:d.ZodEnum,...$(t)})}ef.create=(e,t)=>new ef({value:e,typeName:d.ZodLiteral,...$(t)});class em extends D{_parse(e){if("string"!=typeof e.data){let t=this._getOrReturnCtx(e),r=this._def.values;return x(t,{expected:a.joinValues(r),received:t.parsedType,code:y.invalid_type}),A}if(-1===this._def.values.indexOf(e.data)){let t=this._getOrReturnCtx(e),r=this._def.values;return x(t,{received:t.data,code:y.invalid_enum_value,options:r}),A}return I(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(e){return em.create(e)}exclude(e){return em.create(this.options.filter(t=>!e.includes(t)))}}em.create=eg;class ey extends D{_parse(e){let t=a.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==g.string&&r.parsedType!==g.number){let e=a.objectValues(t);return x(r,{expected:a.joinValues(e),received:r.parsedType,code:y.invalid_type}),A}if(-1===t.indexOf(e.data)){let e=a.objectValues(t);return x(r,{received:r.data,code:y.invalid_enum_value,options:e}),A}return I(e.data)}get enum(){return this._def.values}}ey.create=(e,t)=>new ey({values:e,typeName:d.ZodNativeEnum,...$(t)});class ew extends D{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);return t.parsedType!==g.promise&&!1===t.common.async?(x(t,{code:y.invalid_type,expected:g.promise,received:t.parsedType}),A):I((t.parsedType===g.promise?t.data:Promise.resolve(t.data)).then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}}ew.create=(e,t)=>new ew({type:e,typeName:d.ZodPromise,...$(t)});class eb extends D{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===d.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:r}=this._processInputParams(e),i=this._def.effect||null,n={addIssue:e=>{x(r,e),e.fatal?t.abort():t.dirty()},get path(){return r.path}};if(n.addIssue=n.addIssue.bind(n),"preprocess"===i.type){let e=i.transform(r.data,n);return r.common.issues.length?{status:"dirty",value:r.data}:r.common.async?Promise.resolve(e).then(e=>this._def.schema._parseAsync({data:e,path:r.path,parent:r})):this._def.schema._parseSync({data:e,path:r.path,parent:r})}if("refinement"===i.type){let e=e=>{let t=i.refinement(e,n);if(r.common.async)return Promise.resolve(t);if(t instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1!==r.common.async)return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(r=>"aborted"===r.status?A:("dirty"===r.status&&t.dirty(),e(r.value).then(()=>({status:t.value,value:r.value}))));{let i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return"aborted"===i.status?A:("dirty"===i.status&&t.dirty(),e(i.value),{status:t.value,value:i.value})}}if("transform"===i.type){if(!1!==r.common.async)return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(e=>R(e)?Promise.resolve(i.transform(e.value,n)).then(e=>({status:t.value,value:e})):e);{let e=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!R(e))return e;let o=i.transform(e.value,n);if(o instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:o}}}a.assertNever(i)}}eb.create=(e,t,r)=>new eb({schema:e,typeName:d.ZodEffects,effect:t,...$(r)}),eb.createWithPreprocess=(e,t,r)=>new eb({schema:t,effect:{type:"preprocess",transform:e},typeName:d.ZodEffects,...$(r)});class ev extends D{_parse(e){return this._getType(e)===g.undefined?I(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ev.create=(e,t)=>new ev({innerType:e,typeName:d.ZodOptional,...$(t)});class eC extends D{_parse(e){return this._getType(e)===g.null?I(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}eC.create=(e,t)=>new eC({innerType:e,typeName:d.ZodNullable,...$(t)});class eE extends D{_parse(e){let{ctx:t}=this._processInputParams(e),r=t.data;return t.parsedType===g.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}eE.create=(e,t)=>new eE({innerType:e,typeName:d.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...$(t)});class ex extends D{_parse(e){let{ctx:t}=this._processInputParams(e),r={...t,common:{...t.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return O(i)?i.then(e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new w(r.common.issues)},input:r.data})})):{status:"valid",value:"valid"===i.status?i.value:this._def.catchValue({get error(){return new w(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}ex.create=(e,t)=>new ex({innerType:e,typeName:d.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...$(t)});class e_ extends D{_parse(e){if(this._getType(e)!==g.nan){let t=this._getOrReturnCtx(e);return x(t,{code:y.invalid_type,expected:g.nan,received:t.parsedType}),A}return{status:"valid",value:e.data}}}e_.create=e=>new e_({typeName:d.ZodNaN,...$(e)});let eA=Symbol("zod_brand");class eS extends D{_parse(e){let{ctx:t}=this._processInputParams(e),r=t.data;return this._def.type._parse({data:r,path:t.path,parent:t})}unwrap(){return this._def.type}}class eI extends D{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{let e=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return"aborted"===e.status?A:"dirty"===e.status?(t.dirty(),S(e.value)):this._def.out._parseAsync({data:e.value,path:r.path,parent:r})})();{let e=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return"aborted"===e.status?A:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:r.path,parent:r})}}static create(e,t){return new eI({in:e,out:t,typeName:d.ZodPipeline})}}class eN extends D{_parse(e){let t=this._def.innerType._parse(e);return R(t)&&(t.value=Object.freeze(t.value)),t}}eN.create=(e,t)=>new eN({innerType:e,typeName:d.ZodReadonly,...$(t)});let ek=(e,t={},r)=>e?X.create().superRefine((i,n)=>{var o,s;if(!e(i)){let e="function"==typeof t?t(i):"string"==typeof t?{message:t}:t,a=null===(s=null!==(o=e.fatal)&&void 0!==o?o:r)||void 0===s||s;n.addIssue({code:"custom",..."string"==typeof e?{message:e}:e,fatal:a})}}):X.create(),eR={object:ei.lazycreate};(s=d||(d={})).ZodString="ZodString",s.ZodNumber="ZodNumber",s.ZodNaN="ZodNaN",s.ZodBigInt="ZodBigInt",s.ZodBoolean="ZodBoolean",s.ZodDate="ZodDate",s.ZodSymbol="ZodSymbol",s.ZodUndefined="ZodUndefined",s.ZodNull="ZodNull",s.ZodAny="ZodAny",s.ZodUnknown="ZodUnknown",s.ZodNever="ZodNever",s.ZodVoid="ZodVoid",s.ZodArray="ZodArray",s.ZodObject="ZodObject",s.ZodUnion="ZodUnion",s.ZodDiscriminatedUnion="ZodDiscriminatedUnion",s.ZodIntersection="ZodIntersection",s.ZodTuple="ZodTuple",s.ZodRecord="ZodRecord",s.ZodMap="ZodMap",s.ZodSet="ZodSet",s.ZodFunction="ZodFunction",s.ZodLazy="ZodLazy",s.ZodLiteral="ZodLiteral",s.ZodEnum="ZodEnum",s.ZodEffects="ZodEffects",s.ZodNativeEnum="ZodNativeEnum",s.ZodOptional="ZodOptional",s.ZodNullable="ZodNullable",s.ZodDefault="ZodDefault",s.ZodCatch="ZodCatch",s.ZodPromise="ZodPromise",s.ZodBranded="ZodBranded",s.ZodPipeline="ZodPipeline",s.ZodReadonly="ZodReadonly";let eO=H.create,eT=q.create,eP=e_.create,e$=V.create,eD=K.create,eU=Z.create,eL=G.create,eM=Y.create,eB=J.create,ej=X.create,eF=Q.create,eW=ee.create,ez=et.create,eH=er.create,eq=ei.create,eV=ei.strictCreate,eK=en.create,eZ=es.create,eG=ea.create,eY=el.create,eJ=ec.create,eX=ed.create,eQ=eu.create,e0=eh.create,e1=ep.create,e2=ef.create,e3=em.create,e5=ey.create,e4=ew.create,e6=eb.create,e8=ev.create,e9=eC.create,e7=eb.createWithPreprocess,te=eI.create;var tt=Object.freeze({__proto__:null,defaultErrorMap:b,setErrorMap:function(e){v=e},getErrorMap:C,makeIssue:E,EMPTY_PATH:[],addIssueToContext:x,ParseStatus:_,INVALID:A,DIRTY:S,OK:I,isAborted:N,isDirty:k,isValid:R,isAsync:O,get util(){return a},get objectUtil(){return l},ZodParsedType:g,getParsedType:m,ZodType:D,ZodString:H,ZodNumber:q,ZodBigInt:V,ZodBoolean:K,ZodDate:Z,ZodSymbol:G,ZodUndefined:Y,ZodNull:J,ZodAny:X,ZodUnknown:Q,ZodNever:ee,ZodVoid:et,ZodArray:er,ZodObject:ei,ZodUnion:en,ZodDiscriminatedUnion:es,ZodIntersection:ea,ZodTuple:el,ZodRecord:ec,ZodMap:ed,ZodSet:eu,ZodFunction:eh,ZodLazy:ep,ZodLiteral:ef,ZodEnum:em,ZodNativeEnum:ey,ZodPromise:ew,ZodEffects:eb,ZodTransformer:eb,ZodOptional:ev,ZodNullable:eC,ZodDefault:eE,ZodCatch:ex,ZodNaN:e_,BRAND:eA,ZodBranded:eS,ZodPipeline:eI,ZodReadonly:eN,custom:ek,Schema:D,ZodSchema:D,late:eR,get ZodFirstPartyTypeKind(){return d},coerce:{string:e=>H.create({...e,coerce:!0}),number:e=>q.create({...e,coerce:!0}),boolean:e=>K.create({...e,coerce:!0}),bigint:e=>V.create({...e,coerce:!0}),date:e=>Z.create({...e,coerce:!0})},any:ej,array:eH,bigint:e$,boolean:eD,date:eU,discriminatedUnion:eZ,effect:e6,enum:e3,function:e0,instanceof:(e,t={message:`Input not instance of ${e.name}`})=>ek(t=>t instanceof e,t),intersection:eG,lazy:e1,literal:e2,map:eX,nan:eP,nativeEnum:e5,never:eW,null:eB,nullable:e9,number:eT,object:eq,oboolean:()=>eD().optional(),onumber:()=>eT().optional(),optional:e8,ostring:()=>eO().optional(),pipeline:te,preprocess:e7,promise:e4,record:eJ,set:eQ,strictObject:eV,string:eO,symbol:eL,transformer:e6,tuple:eY,undefined:eM,union:eK,unknown:eF,void:ez,NEVER:A,ZodIssueCode:y,quotelessJson:e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),ZodError:w});let tr=tt.object({message:tt.string()});function ti(e){return tt.literal(p.$0[e])}let tn=tt.object({serializedMessage:tt.string().optional(),accountAddress:tt.string(),chainId:tt.string(),notBefore:tt.string().optional(),domain:tt.string(),uri:tt.string(),version:tt.string(),nonce:tt.string(),statement:tt.string().optional(),resources:tt.array(tt.string()).optional(),requestId:tt.string().optional(),issuedAt:tt.string().optional(),expirationTime:tt.string().optional()});tt.object({accessList:tt.array(tt.string()),blockHash:tt.string().nullable(),blockNumber:tt.string().nullable(),chainId:tt.string().or(tt.number()),from:tt.string(),gas:tt.string(),hash:tt.string(),input:tt.string().nullable(),maxFeePerGas:tt.string(),maxPriorityFeePerGas:tt.string(),nonce:tt.string(),r:tt.string(),s:tt.string(),to:tt.string(),transactionIndex:tt.string().nullable(),type:tt.string(),v:tt.string(),value:tt.string()});let to=tt.object({chainId:tt.string().or(tt.number()),rpcUrl:tt.optional(tt.string())}),ts=tt.object({email:tt.string().email()}),ta=tt.object({otp:tt.string()}),tl=tt.object({uri:tt.string(),preferredAccountType:tt.optional(tt.string()),chainId:tt.optional(tt.string().or(tt.number())),siwxMessage:tt.optional(tn),rpcUrl:tt.optional(tt.string())}),tc=tt.object({chainId:tt.optional(tt.string().or(tt.number())),preferredAccountType:tt.optional(tt.string()),socialUri:tt.optional(tt.string()),siwxMessage:tt.optional(tn),rpcUrl:tt.optional(tt.string())}),td=tt.object({provider:tt.enum(["google","github","apple","facebook","x","discord"])}),tu=tt.object({email:tt.string().email()}),th=tt.object({otp:tt.string()}),tp=tt.object({otp:tt.string()}),tf=tt.object({themeMode:tt.optional(tt.enum(["light","dark"])),themeVariables:tt.optional(tt.record(tt.string(),tt.string().or(tt.number()))),w3mThemeVariables:tt.optional(tt.record(tt.string(),tt.string()))}),tg=tt.object({metadata:tt.object({name:tt.string(),description:tt.string(),url:tt.string(),icons:tt.array(tt.string())}).optional(),sdkVersion:tt.string().optional(),sdkType:tt.string().optional(),projectId:tt.string()}),tm=tt.object({type:tt.string()}),ty=tt.object({action:tt.enum(["VERIFY_DEVICE","VERIFY_OTP","CONNECT"])}),tw=tt.object({url:tt.string()}),tb=tt.object({userName:tt.string()}),tv=tt.object({email:tt.string().optional().nullable(),address:tt.string(),chainId:tt.string().or(tt.number()),accounts:tt.array(tt.object({address:tt.string(),type:tt.enum([p.y_.ACCOUNT_TYPES.EOA,p.y_.ACCOUNT_TYPES.SMART_ACCOUNT])})).optional(),userName:tt.string().optional().nullable(),preferredAccountType:tt.optional(tt.string()),signature:tt.string().optional(),message:tt.string().optional(),siwxMessage:tt.optional(tn)}),tC=tt.object({action:tt.enum(["VERIFY_PRIMARY_OTP","VERIFY_SECONDARY_OTP"])}),tE=tt.object({email:tt.string().email().optional().nullable(),address:tt.string(),chainId:tt.string().or(tt.number()),smartAccountDeployed:tt.optional(tt.boolean()),accounts:tt.array(tt.object({address:tt.string(),type:tt.enum([p.y_.ACCOUNT_TYPES.EOA,p.y_.ACCOUNT_TYPES.SMART_ACCOUNT])})).optional(),preferredAccountType:tt.optional(tt.string()),signature:tt.string().optional(),message:tt.string().optional(),siwxMessage:tt.optional(tn)}),tx=tt.object({uri:tt.string()}),t_=tt.object({isConnected:tt.boolean()}),tA=tt.object({chainId:tt.string().or(tt.number())}),tS=tt.object({chainId:tt.string().or(tt.number())}),tI=tt.object({newEmail:tt.string().email()}),tN=tt.object({smartAccountEnabledNetworks:tt.array(tt.number())});tt.object({address:tt.string(),isDeployed:tt.boolean()});let tk=tt.object({version:tt.string().optional()}),tR=tt.object({type:tt.string(),address:tt.string()}),tO=tt.any(),tT=tt.object({method:tt.literal("eth_accounts")}),tP=tt.object({method:tt.literal("eth_blockNumber")}),t$=tt.object({method:tt.literal("eth_call"),params:tt.array(tt.any())}),tD=tt.object({method:tt.literal("eth_chainId")}),tU=tt.object({method:tt.literal("eth_estimateGas"),params:tt.array(tt.any())}),tL=tt.object({method:tt.literal("eth_feeHistory"),params:tt.array(tt.any())}),tM=tt.object({method:tt.literal("eth_gasPrice")}),tB=tt.object({method:tt.literal("eth_getAccount"),params:tt.array(tt.any())}),tj=tt.object({method:tt.literal("eth_getBalance"),params:tt.array(tt.any())}),tF=tt.object({method:tt.literal("eth_getBlockByHash"),params:tt.array(tt.any())}),tW=tt.object({method:tt.literal("eth_getBlockByNumber"),params:tt.array(tt.any())}),tz=tt.object({method:tt.literal("eth_getBlockReceipts"),params:tt.array(tt.any())}),tH=tt.object({method:tt.literal("eth_getBlockTransactionCountByHash"),params:tt.array(tt.any())}),tq=tt.object({method:tt.literal("eth_getBlockTransactionCountByNumber"),params:tt.array(tt.any())}),tV=tt.object({method:tt.literal("eth_getCode"),params:tt.array(tt.any())}),tK=tt.object({method:tt.literal("eth_getFilterChanges"),params:tt.array(tt.any())}),tZ=tt.object({method:tt.literal("eth_getFilterLogs"),params:tt.array(tt.any())}),tG=tt.object({method:tt.literal("eth_getLogs"),params:tt.array(tt.any())}),tY=tt.object({method:tt.literal("eth_getProof"),params:tt.array(tt.any())}),tJ=tt.object({method:tt.literal("eth_getStorageAt"),params:tt.array(tt.any())}),tX=tt.object({method:tt.literal("eth_getTransactionByBlockHashAndIndex"),params:tt.array(tt.any())}),tQ=tt.object({method:tt.literal("eth_getTransactionByBlockNumberAndIndex"),params:tt.array(tt.any())}),t0=tt.object({method:tt.literal("eth_getTransactionByHash"),params:tt.array(tt.any())}),t1=tt.object({method:tt.literal("eth_getTransactionCount"),params:tt.array(tt.any())}),t2=tt.object({method:tt.literal("eth_getTransactionReceipt"),params:tt.array(tt.any())}),t3=tt.object({method:tt.literal("eth_getUncleCountByBlockHash"),params:tt.array(tt.any())}),t5=tt.object({method:tt.literal("eth_getUncleCountByBlockNumber"),params:tt.array(tt.any())}),t4=tt.object({method:tt.literal("eth_maxPriorityFeePerGas")}),t6=tt.object({method:tt.literal("eth_newBlockFilter")}),t8=tt.object({method:tt.literal("eth_newFilter"),params:tt.array(tt.any())}),t9=tt.object({method:tt.literal("eth_newPendingTransactionFilter")}),t7=tt.object({method:tt.literal("eth_sendRawTransaction"),params:tt.array(tt.any())}),re=tt.object({method:tt.literal("eth_syncing"),params:tt.array(tt.any())}),rt=tt.object({method:tt.literal("eth_uninstallFilter"),params:tt.array(tt.any())}),rr=tt.object({method:tt.literal("personal_sign"),params:tt.array(tt.any())}),ri=tt.object({method:tt.literal("eth_signTypedData_v4"),params:tt.array(tt.any())}),rn=tt.object({method:tt.literal("eth_sendTransaction"),params:tt.array(tt.any())}),ro=tt.object({method:tt.literal("solana_signMessage"),params:tt.object({message:tt.string(),pubkey:tt.string()})}),rs=tt.object({method:tt.literal("solana_signTransaction"),params:tt.object({transaction:tt.string()})}),ra=tt.object({method:tt.literal("solana_signAllTransactions"),params:tt.object({transactions:tt.array(tt.string())})}),rl=tt.object({method:tt.literal("solana_signAndSendTransaction"),params:tt.object({transaction:tt.string(),options:tt.object({skipPreflight:tt.boolean().optional(),preflightCommitment:tt.enum(["processed","confirmed","finalized","recent","single","singleGossip","root","max"]).optional(),maxRetries:tt.number().optional(),minContextSlot:tt.number().optional()}).optional()})}),rc=tt.object({method:tt.literal("wallet_sendCalls"),params:tt.array(tt.object({chainId:tt.string().or(tt.number()).optional(),from:tt.string().optional(),version:tt.string().optional(),capabilities:tt.any().optional(),calls:tt.array(tt.object({to:tt.string().startsWith("0x"),data:tt.string().startsWith("0x").optional(),value:tt.string().optional()}))}))}),rd=tt.object({method:tt.literal("wallet_getCallsStatus"),params:tt.array(tt.string())}),ru=tt.object({method:tt.literal("wallet_getCapabilities"),params:tt.array(tt.string().or(tt.number()).optional()).optional()}),rh=tt.object({method:tt.literal("wallet_grantPermissions"),params:tt.array(tt.any())}),rp=tt.object({method:tt.literal("wallet_revokePermissions"),params:tt.any()}),rf=tt.object({method:tt.literal("wallet_getAssets"),params:tt.any()}),rg=tt.object({token:tt.string()}),rm=tt.object({id:tt.string().optional()}),ry={appEvent:rm.extend({type:ti("APP_SWITCH_NETWORK"),payload:to}).or(rm.extend({type:ti("APP_CONNECT_EMAIL"),payload:ts})).or(rm.extend({type:ti("APP_CONNECT_DEVICE")})).or(rm.extend({type:ti("APP_CONNECT_OTP"),payload:ta})).or(rm.extend({type:ti("APP_CONNECT_SOCIAL"),payload:tl})).or(rm.extend({type:ti("APP_GET_FARCASTER_URI")})).or(rm.extend({type:ti("APP_CONNECT_FARCASTER")})).or(rm.extend({type:ti("APP_GET_USER"),payload:tt.optional(tc)})).or(rm.extend({type:ti("APP_GET_SOCIAL_REDIRECT_URI"),payload:td})).or(rm.extend({type:ti("APP_SIGN_OUT")})).or(rm.extend({type:ti("APP_IS_CONNECTED"),payload:tt.optional(rg)})).or(rm.extend({type:ti("APP_GET_CHAIN_ID")})).or(rm.extend({type:ti("APP_GET_SMART_ACCOUNT_ENABLED_NETWORKS")})).or(rm.extend({type:ti("APP_INIT_SMART_ACCOUNT")})).or(rm.extend({type:ti("APP_SET_PREFERRED_ACCOUNT"),payload:tm})).or(rm.extend({type:ti("APP_RPC_REQUEST"),payload:rr.or(rf).or(tT).or(tP).or(t$).or(tD).or(tU).or(tL).or(tM).or(tB).or(tj).or(tF).or(tW).or(tz).or(tH).or(tq).or(tV).or(tK).or(tZ).or(tG).or(tY).or(tJ).or(tX).or(tQ).or(t0).or(t1).or(t2).or(t3).or(t5).or(t4).or(t6).or(t8).or(t9).or(t7).or(re).or(rt).or(rr).or(ri).or(rn).or(ro).or(rs).or(ra).or(rl).or(rd).or(rc).or(ru).or(rh).or(rp).and(tt.object({chainId:tt.string().or(tt.number()).optional(),chainNamespace:tt.enum(["eip155","solana","polkadot","bip122","cosmos"]).optional(),rpcUrl:tt.string().optional()}))})).or(rm.extend({type:ti("APP_UPDATE_EMAIL"),payload:tu})).or(rm.extend({type:ti("APP_UPDATE_EMAIL_PRIMARY_OTP"),payload:th})).or(rm.extend({type:ti("APP_UPDATE_EMAIL_SECONDARY_OTP"),payload:tp})).or(rm.extend({type:ti("APP_SYNC_THEME"),payload:tf})).or(rm.extend({type:ti("APP_SYNC_DAPP_DATA"),payload:tg})).or(rm.extend({type:ti("APP_RELOAD")})).or(rm.extend({type:ti("APP_RPC_ABORT")})),frameEvent:rm.extend({type:ti("FRAME_SWITCH_NETWORK_ERROR"),payload:tr}).or(rm.extend({type:ti("FRAME_SWITCH_NETWORK_SUCCESS"),payload:tS})).or(rm.extend({type:ti("FRAME_CONNECT_EMAIL_SUCCESS"),payload:ty})).or(rm.extend({type:ti("FRAME_CONNECT_EMAIL_ERROR"),payload:tr})).or(rm.extend({type:ti("FRAME_GET_FARCASTER_URI_SUCCESS"),payload:tw})).or(rm.extend({type:ti("FRAME_GET_FARCASTER_URI_ERROR"),payload:tr})).or(rm.extend({type:ti("FRAME_CONNECT_FARCASTER_SUCCESS"),payload:tb})).or(rm.extend({type:ti("FRAME_CONNECT_FARCASTER_ERROR"),payload:tr})).or(rm.extend({type:ti("FRAME_CONNECT_OTP_ERROR"),payload:tr})).or(rm.extend({type:ti("FRAME_CONNECT_OTP_SUCCESS")})).or(rm.extend({type:ti("FRAME_CONNECT_DEVICE_ERROR"),payload:tr})).or(rm.extend({type:ti("FRAME_CONNECT_DEVICE_SUCCESS")})).or(rm.extend({type:ti("FRAME_CONNECT_SOCIAL_SUCCESS"),payload:tv})).or(rm.extend({type:ti("FRAME_CONNECT_SOCIAL_ERROR"),payload:tr})).or(rm.extend({type:ti("FRAME_GET_USER_ERROR"),payload:tr})).or(rm.extend({type:ti("FRAME_GET_USER_SUCCESS"),payload:tE})).or(rm.extend({type:ti("FRAME_GET_SOCIAL_REDIRECT_URI_ERROR"),payload:tr})).or(rm.extend({type:ti("FRAME_GET_SOCIAL_REDIRECT_URI_SUCCESS"),payload:tx})).or(rm.extend({type:ti("FRAME_SIGN_OUT_ERROR"),payload:tr})).or(rm.extend({type:ti("FRAME_SIGN_OUT_SUCCESS")})).or(rm.extend({type:ti("FRAME_IS_CONNECTED_ERROR"),payload:tr})).or(rm.extend({type:ti("FRAME_IS_CONNECTED_SUCCESS"),payload:t_})).or(rm.extend({type:ti("FRAME_GET_CHAIN_ID_ERROR"),payload:tr})).or(rm.extend({type:ti("FRAME_GET_CHAIN_ID_SUCCESS"),payload:tA})).or(rm.extend({type:ti("FRAME_RPC_REQUEST_ERROR"),payload:tr})).or(rm.extend({type:ti("FRAME_RPC_REQUEST_SUCCESS"),payload:tO})).or(rm.extend({type:ti("FRAME_SESSION_UPDATE"),payload:rg})).or(rm.extend({type:ti("FRAME_UPDATE_EMAIL_ERROR"),payload:tr})).or(rm.extend({type:ti("FRAME_UPDATE_EMAIL_SUCCESS"),payload:tC})).or(rm.extend({type:ti("FRAME_UPDATE_EMAIL_PRIMARY_OTP_ERROR"),payload:tr})).or(rm.extend({type:ti("FRAME_UPDATE_EMAIL_PRIMARY_OTP_SUCCESS")})).or(rm.extend({type:ti("FRAME_UPDATE_EMAIL_SECONDARY_OTP_ERROR"),payload:tr})).or(rm.extend({type:ti("FRAME_UPDATE_EMAIL_SECONDARY_OTP_SUCCESS"),payload:tI})).or(rm.extend({type:ti("FRAME_SYNC_THEME_ERROR"),payload:tr})).or(rm.extend({type:ti("FRAME_SYNC_THEME_SUCCESS")})).or(rm.extend({type:ti("FRAME_SYNC_DAPP_DATA_ERROR"),payload:tr})).or(rm.extend({type:ti("FRAME_SYNC_DAPP_DATA_SUCCESS")})).or(rm.extend({type:ti("FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_SUCCESS"),payload:tN})).or(rm.extend({type:ti("FRAME_GET_SMART_ACCOUNT_ENABLED_NETWORKS_ERROR"),payload:tr})).or(rm.extend({type:ti("FRAME_INIT_SMART_ACCOUNT_ERROR"),payload:tr})).or(rm.extend({type:ti("FRAME_SET_PREFERRED_ACCOUNT_SUCCESS"),payload:tR})).or(rm.extend({type:ti("FRAME_SET_PREFERRED_ACCOUNT_ERROR"),payload:tr})).or(rm.extend({type:ti("FRAME_READY"),payload:tk})).or(rm.extend({type:ti("FRAME_RELOAD_ERROR"),payload:tr})).or(rm.extend({type:ti("FRAME_RELOAD_SUCCESS")}))};var rw=r(63671);function rb(e,t={}){return"string"==typeof t?.type&&t?.type?.includes(e)}class rv{constructor({projectId:e,isAppClient:t=!1,chainId:r="eip155:1",enableLogger:i=!0,enableCloudAuthAccount:n=!1,rpcUrl:o=h.b.BLOCKCHAIN_API_RPC_URL}){if(this.iframe=null,this.iframeIsReady=!1,this.initFrame=()=>{let e=document.getElementById("w3m-iframe");this.iframe&&!e&&document.body.appendChild(this.iframe)},this.events={registerFrameEventHandler:(e,t,r)=>{function i({data:r}){if(!rb(p.$0.FRAME_EVENT_KEY,r))return;let n=ry.frameEvent.safeParse(r);if(!n.success){console.warn("W3mFrame: invalid frame event",n.error.message);return}n.data?.id===e&&(t(n.data),window.removeEventListener("message",i))}f.$.isClient&&(window.addEventListener("message",i),r.addEventListener("abort",()=>{window.removeEventListener("message",i)}))},onFrameEvent:e=>{f.$.isClient&&window.addEventListener("message",({data:t})=>{if(!rb(p.$0.FRAME_EVENT_KEY,t))return;let r=ry.frameEvent.safeParse(t);r.success?e(r.data):console.warn("W3mFrame: invalid frame event",r.error.message)})},onAppEvent:e=>{f.$.isClient&&window.addEventListener("message",({data:t})=>{if(!rb(p.$0.APP_EVENT_KEY,t))return;let r=ry.appEvent.safeParse(t);r.success||console.warn("W3mFrame: invalid app event",r.error.message),e(t)})},postAppEvent:e=>{if(f.$.isClient){if(!this.iframe?.contentWindow)throw Error("W3mFrame: iframe is not set");this.iframe.contentWindow.postMessage(e,"*")}},postFrameEvent:e=>{if(f.$.isClient){if(!parent)throw Error("W3mFrame: parent is not set");parent.postMessage(e,"*")}}},this.projectId=e,this.frameLoadPromise=new Promise((e,t)=>{this.frameLoadPromiseResolver={resolve:e,reject:t}}),this.rpcUrl=o,t&&(this.frameLoadPromise=new Promise((e,t)=>{this.frameLoadPromiseResolver={resolve:e,reject:t}}),f.$.isClient)){let t=document.createElement("iframe");t.id="w3m-iframe",t.src=function({projectId:e,chainId:t,enableLogger:r,rpcUrl:i=h.b.BLOCKCHAIN_API_RPC_URL,enableCloudAuthAccount:n=!1}){let o=new URL(p.Dr);o.searchParams.set("projectId",e),o.searchParams.set("chainId",String(t)),o.searchParams.set("version",p.zN),o.searchParams.set("enableLogger",String(r)),o.searchParams.set("rpcUrl",i);let s=rw.e.get("dapp_smart_account_version");return s&&("v6"===s||"v7"===s)&&(console.warn(">> AppKit - Forcing smart account version",s),o.searchParams.set("smartAccountVersion",s)),n&&o.searchParams.set("enableCloudAuthAccount","true"),o.toString()}({projectId:e,chainId:r,enableLogger:i,rpcUrl:this.rpcUrl,enableCloudAuthAccount:n}),t.name="w3m-secure-iframe",t.style.position="fixed",t.style.zIndex="999999",t.style.display="none",t.style.border="none",t.style.animationDelay="0s, 50ms",t.style.borderBottomLeftRadius="clamp(0px, var(--apkt-borderRadius-8), 44px)",t.style.borderBottomRightRadius="clamp(0px, var(--apkt-borderRadius-8), 44px)",this.iframe=t,this.iframe.onerror=()=>{this.frameLoadPromiseResolver?.reject("Unable to load email login dependency")},this.events.onFrameEvent(e=>{"@w3m-frame/READY"===e.type&&(this.iframeIsReady=!0,this.frameLoadPromiseResolver?.resolve(void 0))})}}get networks(){return Object.assign({},...["eip155:1","eip155:5","eip155:11155111","eip155:10","eip155:420","eip155:42161","eip155:421613","eip155:137","eip155:80001","eip155:42220","eip155:1313161554","eip155:1313161555","eip155:56","eip155:97","eip155:43114","eip155:43113","eip155:324","eip155:280","eip155:100","eip155:8453","eip155:84531","eip155:84532","eip155:7777777","eip155:999","solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp","solana:4uhcVJyU9pJkvQyS88uRDiswHXSCkY3z","solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1"].map(e=>({[e]:{rpcUrl:`${this.rpcUrl}/v1/?chainId=${e}&projectId=${this.projectId}`,chainId:e}})))}}var rC=r(15133);class rE{constructor(e){let t=(0,rC.jI)({level:p.jd}),{logger:r,chunkLoggerController:i}=(0,rC.Rt)({opts:t});this.logger=(0,rC.Ep)(r,this.constructor.name),this.chunkLoggerController=i,"undefined"!=typeof window&&this.chunkLoggerController?.downloadLogsBlobInBrowser&&(window.downloadAppKitLogsBlob||(window.downloadAppKitLogsBlob={}),window.downloadAppKitLogsBlob.sdk=()=>{this.chunkLoggerController?.downloadLogsBlobInBrowser&&this.chunkLoggerController.downloadLogsBlobInBrowser({projectId:e})})}}class rx{constructor({projectId:e,chainId:t,enableLogger:r=!0,onTimeout:i,abortController:n,getActiveCaipNetwork:o,getCaipNetworks:s,enableCloudAuthAccount:a,metadata:l,sdkVersion:c,sdkType:d}){this.openRpcRequests=new Map,this.isInitialized=!1,r&&(this.w3mLogger=new rE(e)),this.abortController=n,this.getActiveCaipNetwork=o,this.getCaipNetworks=s;let u=this.getRpcUrl(t);this.projectId=e,this.sdkVersion=c,this.sdkType=d,this.metadata=l,this.w3mFrame=new rv({projectId:e,isAppClient:!0,chainId:t,enableLogger:r,rpcUrl:u,enableCloudAuthAccount:a}),this.onTimeout=i,this.getLoginEmailUsed()&&this.createFrame()}async createFrame(){this.w3mFrame.initFrame(),this.initPromise=new Promise(e=>{this.w3mFrame.events.onFrameEvent(t=>{t.type===p.$0.FRAME_READY&&setTimeout(()=>{e()},500)})}),await this.initPromise,await this.syncDappData({metadata:this.metadata,projectId:this.projectId,sdkVersion:this.sdkVersion,sdkType:this.sdkType}),await this.getSmartAccountEnabledNetworks(),this.isInitialized=!0,this.initPromise=void 0}async init(){if(!this.isInitialized){if(this.initPromise){await this.initPromise;return}await this.createFrame()}}getLoginEmailUsed(){return!!rw.e.get(p.$0.EMAIL_LOGIN_USED_KEY)}getEmail(){return rw.e.get(p.$0.EMAIL)}getUsername(){return rw.e.get(p.$0.SOCIAL_USERNAME)}async reload(){try{await this.appEvent({type:p.$0.APP_RELOAD})}catch(e){throw this.w3mLogger?.logger.error({error:e},"Error reloading iframe"),e}}async connectEmail(e){try{f.$.checkIfAllowedToTriggerEmail(),await this.init();let t=await this.appEvent({type:p.$0.APP_CONNECT_EMAIL,payload:e});return this.setNewLastEmailLoginTime(),t}catch(e){throw this.w3mLogger?.logger.error({error:e},"Error connecting email"),e}}async connectDevice(){try{return this.appEvent({type:p.$0.APP_CONNECT_DEVICE})}catch(e){throw this.w3mLogger?.logger.error({error:e},"Error connecting device"),e}}async connectOtp(e){try{return this.appEvent({type:p.$0.APP_CONNECT_OTP,payload:e})}catch(e){throw this.w3mLogger?.logger.error({error:e},"Error connecting otp"),e}}async isConnected(){try{if(!this.getLoginEmailUsed())return{isConnected:!1};let e=await this.appEvent({type:p.$0.APP_IS_CONNECTED});return e?.isConnected||this.deleteAuthLoginCache(),e}catch(e){throw this.deleteAuthLoginCache(),this.w3mLogger?.logger.error({error:e},"Error checking connection"),e}}async getChainId(){try{let e=await this.appEvent({type:p.$0.APP_GET_CHAIN_ID});return this.setLastUsedChainId(e.chainId),e}catch(e){throw this.w3mLogger?.logger.error({error:e},"Error getting chain id"),e}}async getSocialRedirectUri(e){try{return await this.init(),this.appEvent({type:p.$0.APP_GET_SOCIAL_REDIRECT_URI,payload:e})}catch(e){throw this.w3mLogger?.logger.error({error:e},"Error getting social redirect uri"),e}}async updateEmail(e){try{let t=await this.appEvent({type:p.$0.APP_UPDATE_EMAIL,payload:e});return this.setNewLastEmailLoginTime(),t}catch(e){throw this.w3mLogger?.logger.error({error:e},"Error updating email"),e}}async updateEmailPrimaryOtp(e){try{return this.appEvent({type:p.$0.APP_UPDATE_EMAIL_PRIMARY_OTP,payload:e})}catch(e){throw this.w3mLogger?.logger.error({error:e},"Error updating email primary otp"),e}}async updateEmailSecondaryOtp(e){try{let t=await this.appEvent({type:p.$0.APP_UPDATE_EMAIL_SECONDARY_OTP,payload:e});return this.setLoginSuccess(t.newEmail),t}catch(e){throw this.w3mLogger?.logger.error({error:e},"Error updating email secondary otp"),e}}async syncTheme(e){try{return this.appEvent({type:p.$0.APP_SYNC_THEME,payload:e})}catch(e){throw this.w3mLogger?.logger.error({error:e},"Error syncing theme"),e}}async syncDappData(e){try{return this.appEvent({type:p.$0.APP_SYNC_DAPP_DATA,payload:e})}catch(e){throw this.w3mLogger?.logger.error({error:e},"Error syncing dapp data"),e}}async getSmartAccountEnabledNetworks(){try{let e=await this.appEvent({type:p.$0.APP_GET_SMART_ACCOUNT_ENABLED_NETWORKS});return this.persistSmartAccountEnabledNetworks(e.smartAccountEnabledNetworks),e}catch(e){throw this.persistSmartAccountEnabledNetworks([]),this.w3mLogger?.logger.error({error:e},"Error getting smart account enabled networks"),e}}async setPreferredAccount(e){try{return this.appEvent({type:p.$0.APP_SET_PREFERRED_ACCOUNT,payload:{type:e}})}catch(e){throw this.w3mLogger?.logger.error({error:e},"Error setting preferred account"),e}}async connect(e){if(e?.socialUri)try{await this.init();let t=this.getRpcUrl(e.chainId),r=await this.appEvent({type:p.$0.APP_CONNECT_SOCIAL,payload:{uri:e.socialUri,preferredAccountType:e.preferredAccountType,chainId:e.chainId,siwxMessage:e.siwxMessage,rpcUrl:t}});return r.userName&&this.setSocialLoginSuccess(r.userName),this.setLoginSuccess(r.email),this.setLastUsedChainId(r.chainId),this.user=r,r}catch(e){throw this.w3mLogger?.logger.error({error:e},"Error connecting social"),e}else try{let t=e?.chainId||this.getLastUsedChainId()||1,r=await this.getUser({chainId:t,preferredAccountType:e?.preferredAccountType,siwxMessage:e?.siwxMessage,rpcUrl:this.getRpcUrl(t)});return this.setLoginSuccess(r.email),this.setLastUsedChainId(r.chainId),this.user=r,r}catch(e){throw this.w3mLogger?.logger.error({error:e},"Error connecting"),e}}async getUser(e){try{await this.init();let t=e?.chainId||this.getLastUsedChainId()||1,r=await this.appEvent({type:p.$0.APP_GET_USER,payload:{...e,chainId:t,rpcUrl:this.getRpcUrl(t)}});return this.user=r,r}catch(e){throw this.w3mLogger?.logger.error({error:e},"Error connecting"),e}}async connectSocial({uri:e,chainId:t,preferredAccountType:r}){try{await this.init();let i=this.getRpcUrl(t),n=await this.appEvent({type:p.$0.APP_CONNECT_SOCIAL,payload:{uri:e,chainId:t,rpcUrl:i,preferredAccountType:r}});return n.userName&&this.setSocialLoginSuccess(n.userName),n}catch(e){throw this.w3mLogger?.logger.error({error:e},"Error connecting social"),e}}async getFarcasterUri(){try{return await this.init(),await this.appEvent({type:p.$0.APP_GET_FARCASTER_URI})}catch(e){throw this.w3mLogger?.logger.error({error:e},"Error getting farcaster uri"),e}}async connectFarcaster(){try{let e=await this.appEvent({type:p.$0.APP_CONNECT_FARCASTER});return e.userName&&this.setSocialLoginSuccess(e.userName),e}catch(e){throw this.w3mLogger?.logger.error({error:e},"Error connecting farcaster"),e}}async switchNetwork({chainId:e}){try{let t=this.getRpcUrl(e),r=await this.appEvent({type:p.$0.APP_SWITCH_NETWORK,payload:{chainId:e,rpcUrl:t}});return this.setLastUsedChainId(r.chainId),r}catch(e){throw this.w3mLogger?.logger.error({error:e},"Error switching network"),e}}async disconnect(){try{return this.deleteAuthLoginCache(),await new Promise(async e=>{let t=setTimeout(()=>{e()},3e3);await this.appEvent({type:p.$0.APP_SIGN_OUT}),clearTimeout(t),e()})}catch(e){throw this.w3mLogger?.logger.error({error:e},"Error disconnecting"),e}}async request(e){try{if(p.y_.GET_CHAIN_ID===e.method)return this.getLastUsedChainId();let t=e.chainNamespace||"eip155",r=this.getActiveCaipNetwork(t)?.id;e.chainNamespace=t,e.chainId=r,e.rpcUrl=this.getRpcUrl(r),this.rpcRequestHandler?.(e);let i=await this.appEvent({type:p.$0.APP_RPC_REQUEST,payload:e});return this.rpcSuccessHandler?.(i,e),i}catch(t){throw this.rpcErrorHandler?.(t,e),this.w3mLogger?.logger.error({error:t},"Error requesting"),t}}onRpcRequest(e){this.rpcRequestHandler=e}onRpcSuccess(e){this.rpcSuccessHandler=e}onRpcError(e){this.rpcErrorHandler=e}onIsConnected(e){this.w3mFrame.events.onFrameEvent(t=>{t.type===p.$0.FRAME_IS_CONNECTED_SUCCESS&&t.payload.isConnected&&e()})}onNotConnected(e){this.w3mFrame.events.onFrameEvent(t=>{t.type===p.$0.FRAME_IS_CONNECTED_ERROR&&e(),t.type!==p.$0.FRAME_IS_CONNECTED_SUCCESS||t.payload.isConnected||e()})}onConnect(e){this.w3mFrame.events.onFrameEvent(t=>{t.type===p.$0.FRAME_GET_USER_SUCCESS&&e(t.payload)})}onSocialConnected(e){this.w3mFrame.events.onFrameEvent(t=>{t.type===p.$0.FRAME_CONNECT_SOCIAL_SUCCESS&&e(t.payload)})}async getCapabilities(){try{return await this.request({method:"wallet_getCapabilities"})||{}}catch{return{}}}onSetPreferredAccount(e){this.w3mFrame.events.onFrameEvent(t=>{t.type===p.$0.FRAME_SET_PREFERRED_ACCOUNT_SUCCESS?e(t.payload):t.type===p.$0.FRAME_SET_PREFERRED_ACCOUNT_ERROR&&e({type:p.y_.ACCOUNT_TYPES.EOA})})}getAvailableChainIds(){return Object.keys(this.w3mFrame.networks)}async rejectRpcRequests(){try{await Promise.all(Array.from(this.openRpcRequests.values()).map(async({abortController:e,method:t})=>{p.y_.SAFE_RPC_METHODS.includes(t)||e.abort(),await this.appEvent({type:p.$0.APP_RPC_ABORT})})),this.openRpcRequests.clear()}catch(e){this.w3mLogger?.logger.error({error:e},"Error aborting RPC request")}}async appEvent(e){let t,r;function i(e){return e.replace("@w3m-app/","")}let n=[p.$0.APP_SYNC_DAPP_DATA,p.$0.APP_SYNC_THEME,p.$0.APP_SET_PREFERRED_ACCOUNT],o=i(e.type);return this.w3mFrame.iframeIsReady||n.includes(e.type)||(r=setTimeout(()=>{this.onTimeout?.("iframe_load_failed"),this.abortController.abort()},2e4)),await this.w3mFrame.frameLoadPromise,clearTimeout(r),[p.$0.APP_CONNECT_EMAIL,p.$0.APP_CONNECT_DEVICE,p.$0.APP_CONNECT_OTP,p.$0.APP_CONNECT_SOCIAL,p.$0.APP_GET_SOCIAL_REDIRECT_URI].map(i).includes(o)&&(t=setTimeout(()=>{this.onTimeout?.("iframe_request_timeout"),this.abortController.abort()},12e4)),new Promise((i,n)=>{let s=Math.random().toString(36).substring(7);this.w3mLogger?.logger.info?.({event:e,id:s},"Sending app event"),this.w3mFrame.events.postAppEvent({...e,id:s});let a=new AbortController;"RPC_REQUEST"===o&&this.openRpcRequests.set(s,{...e.payload,abortController:a}),a.signal.addEventListener("abort",()=>{"RPC_REQUEST"===o?n(Error("Request was aborted")):"GET_FARCASTER_URI"!==o&&n(Error("Something went wrong"))});let l=(e,a)=>{e.id===s&&(a?.logger.info?.({framEvent:e,id:s},"Received frame response"),this.openRpcRequests.delete(e.id),e.type===`@w3m-frame/${o}_SUCCESS`?(t&&clearTimeout(t),r&&clearTimeout(r),"payload"in e&&i(e.payload),i(void 0)):e.type===`@w3m-frame/${o}_ERROR`&&(t&&clearTimeout(t),r&&clearTimeout(r),"payload"in e&&n(Error(e.payload?.message||"An error occurred")),n(Error("An error occurred"))))};this.w3mFrame.events.registerFrameEventHandler(s,e=>l(e,this.w3mLogger),this.abortController.signal)})}setNewLastEmailLoginTime(){rw.e.set(p.$0.LAST_EMAIL_LOGIN_TIME,Date.now().toString())}setSocialLoginSuccess(e){rw.e.set(p.$0.SOCIAL_USERNAME,e)}setLoginSuccess(e){e&&rw.e.set(p.$0.EMAIL,e),rw.e.set(p.$0.EMAIL_LOGIN_USED_KEY,"true"),rw.e.delete(p.$0.LAST_EMAIL_LOGIN_TIME)}deleteAuthLoginCache(){rw.e.delete(p.$0.EMAIL_LOGIN_USED_KEY),rw.e.delete(p.$0.EMAIL),rw.e.delete(p.$0.LAST_USED_CHAIN_KEY),rw.e.delete(p.$0.SOCIAL_USERNAME)}setLastUsedChainId(e){e&&rw.e.set(p.$0.LAST_USED_CHAIN_KEY,String(e))}getLastUsedChainId(){let e=rw.e.get(p.$0.LAST_USED_CHAIN_KEY)??void 0,t=Number(e);return isNaN(t)?e:t}persistSmartAccountEnabledNetworks(e){rw.e.set(p.$0.SMART_ACCOUNT_ENABLED_NETWORKS,e.join(","))}getRpcUrl(e){let t=void 0===e?void 0:"eip155";"string"==typeof e&&(t=e.includes(":")?u.u.parseCaipNetworkId(e)?.chainNamespace:Number.isInteger(Number(e))?"eip155":"solana");let r=this.getCaipNetworks(t),i=e?r.find(t=>String(t.id)===String(e)||t.caipNetworkId===e):r[0];return i?.rpcUrls.default.http?.[0]}}},63671:function(e,t,r){"use strict";r.d(t,{e:function(){return o}});var i=r(4786),n=r(92764);let o={set(e,t){n.$.isClient&&localStorage.setItem(`${i.$0.STORAGE_KEY}${e}`,t)},get:e=>n.$.isClient?localStorage.getItem(`${i.$0.STORAGE_KEY}${e}`):null,delete(e,t){n.$.isClient&&(t?localStorage.removeItem(e):localStorage.removeItem(`${i.$0.STORAGE_KEY}${e}`))}}},87038:function(e,t,r){"use strict";let i;r.d(t,{Vd:function(){return ef},cz:function(){return eg}});var n=r(53357),o=r(44649),s=r(62714),a=r(60389),l=r(43291),c=r(35652),d=r(31929),u=r(86777),h=r(64369),p=r(96986),f=r(17766),g=r(59712),m=r(5688),y=r(6943),w=r(52005),b=r(36801),v=r(72723),C=r(76115),E=r(54090),x=r(88578),_=r(65653),A=r(92764),S=r(4786),I=r(78008),N=r(68642),k=r(86988),R=r(68903),O=r(61704),T=r(12540),P=r(63043),$=r(8789),D=r(65733),U=r(28921),L=r(89512),M=r(61347),B=r(39365),j=r(74897),F=r(66909),W=r(29095),z=r(92413),H=r(91409);let q={TOKEN_ADDRESSES_BY_SYMBOL:{USDC:{8453:H.r6.asset,84532:H.vE.asset}},getTokenSymbolByAddress(e){if(!e)return;let[t]=Object.entries(q.TOKEN_ADDRESSES_BY_SYMBOL).find(([t,r])=>Object.values(r).includes(e))??[];return t}};var V=r(31182),K=r(15133);let Z={createLogger(e,t="error"){let r=(0,K.jI)({level:t}),{logger:i}=(0,K.Rt)({opts:r});return i.error=(...t)=>{for(let r of t)if(r instanceof Error){e(r,...t);return}e(void 0,...t)},i}};var G=r(13057),Y=r(59455),J=r(88200),X=r(52921);let Q={ERROR_CODE_UNRECOGNIZED_CHAIN_ID:4902,ERROR_CODE_DEFAULT:5e3,ERROR_INVALID_CHAIN_ID:32603};class ee extends J.q{async setUniversalProvider(e){if(!this.namespace)throw Error("UniversalAdapter:setUniversalProvider - namespace is required");return this.addConnector(new X.z({provider:e,caipNetworks:this.getCaipNetworks(),namespace:this.namespace})),Promise.resolve()}async connect(e){return Promise.resolve({id:"WALLET_CONNECT",type:"WALLET_CONNECT",chainId:Number(e.chainId),provider:this.provider,address:""})}async disconnect(){try{let e=this.getWalletConnectConnector();await e.disconnect(),this.emit("disconnect")}catch(e){console.warn("UniversalAdapter:disconnect - error",e)}return{connections:[]}}syncConnections(){return Promise.resolve()}async getAccounts({namespace:e}){let t=this.provider;return Promise.resolve({accounts:(t?.session?.namespaces?.[e]?.accounts?.map(e=>{let[,,t]=e.split(":");return t}).filter((e,t,r)=>r.indexOf(e)===t)||[]).map(t=>n.j.createAccount(e,t,"bip122"===e?"payment":"eoa"))})}async syncConnectors(){return Promise.resolve()}async getBalance(e){if(!(e.caipNetwork&&g.bq.BALANCE_SUPPORTED_CHAINS.includes(e.caipNetwork?.chainNamespace))||e.caipNetwork?.testnet)return{balance:"0.00",symbol:e.caipNetwork?.nativeCurrency.symbol||""};let t=y.R.getAccountData();if(t?.balanceLoading&&e.chainId===y.R.state.activeCaipNetwork?.id)return{balance:t?.balance||"0.00",symbol:t?.balanceSymbol||""};let r=(await y.R.fetchTokenBalance()).find(t=>t.chainId===`${e.caipNetwork?.chainNamespace}:${e.chainId}`&&t.symbol===e.caipNetwork?.nativeCurrency.symbol);return{balance:r?.quantity.numeric||"0.00",symbol:r?.symbol||e.caipNetwork?.nativeCurrency.symbol||""}}async signMessage(e){let{provider:t,message:r,address:i}=e;if(!t)throw Error("UniversalAdapter:signMessage - provider is undefined");return{signature:y.R.state.activeCaipNetwork?.chainNamespace===o.b.CHAIN.SOLANA?(await t.request({method:"solana_signMessage",params:{message:G.Z.encode(new TextEncoder().encode(r)),pubkey:i}},y.R.state.activeCaipNetwork?.caipNetworkId)).signature:await t.request({method:"personal_sign",params:[r,i]},y.R.state.activeCaipNetwork?.caipNetworkId)}}async estimateGas(){return Promise.resolve({gas:BigInt(0)})}async sendTransaction(){return Promise.resolve({hash:""})}walletGetAssets(e){return Promise.resolve({})}async writeContract(){return Promise.resolve({hash:""})}emitFirstAvailableConnection(){}parseUnits(){return 0n}formatUnits(){return"0"}async getCapabilities(){return Promise.resolve({})}async grantPermissions(){return Promise.resolve({})}async revokePermissions(){return Promise.resolve("0x")}async syncConnection(){return Promise.resolve({id:"WALLET_CONNECT",type:"WALLET_CONNECT",chainId:1,provider:this.provider,address:""})}async switchNetwork(e){let{caipNetwork:t}=e,r=this.getWalletConnectConnector();if(t.chainNamespace===o.b.CHAIN.EVM)try{await r.provider?.request({method:"wallet_switchEthereumChain",params:[{chainId:Y.NC(t.id)}]})}catch(e){if(e.code===Q.ERROR_CODE_UNRECOGNIZED_CHAIN_ID||e.code===Q.ERROR_INVALID_CHAIN_ID||e.code===Q.ERROR_CODE_DEFAULT||e?.data?.originalError?.code===Q.ERROR_CODE_UNRECOGNIZED_CHAIN_ID)try{await r.provider?.request({method:"wallet_addEthereumChain",params:[{chainId:Y.NC(t.id),rpcUrls:[t?.rpcUrls.chainDefault?.http],chainName:t.name,nativeCurrency:t.nativeCurrency,blockExplorerUrls:[t.blockExplorers?.default.url]}]})}catch(e){throw Error("Chain is not supported")}}r.provider.setDefaultChain(t.caipNetworkId)}getWalletConnectProvider(){let e=this.connectors.find(e=>"WALLET_CONNECT"===e.type);return e?.provider}}let et=["email","socials","swaps","onramp","activity","reownBranding","multiWallet","emailCapture","payWithExchange","payments","reownAuthentication","headless"],er={email:{apiFeatureName:"social_login",localFeatureName:"email",returnType:!1,isLegacy:!1,isAvailableOnBasic:!1,processApi:e=>{if(!e?.config)return!1;let t=e.config;return!!e.isEnabled&&t.includes("email")},processFallback:e=>void 0===e?g.bq.DEFAULT_REMOTE_FEATURES.email:!!e},socials:{apiFeatureName:"social_login",localFeatureName:"socials",returnType:!1,isLegacy:!1,isAvailableOnBasic:!1,processApi:e=>{if(!e?.config)return!1;let t=e.config;return!!e.isEnabled&&t.length>0&&t.filter(e=>"email"!==e)},processFallback:e=>void 0===e?g.bq.DEFAULT_REMOTE_FEATURES.socials:"boolean"==typeof e?!!e&&g.bq.DEFAULT_REMOTE_FEATURES.socials:e},swaps:{apiFeatureName:"swap",localFeatureName:"swaps",returnType:!1,isLegacy:!1,isAvailableOnBasic:!1,processApi:e=>{if(!e?.config)return!1;let t=e.config;return!!e.isEnabled&&t.length>0&&t},processFallback:e=>void 0===e?g.bq.DEFAULT_REMOTE_FEATURES.swaps:"boolean"==typeof e?!!e&&g.bq.DEFAULT_REMOTE_FEATURES.swaps:e},onramp:{apiFeatureName:"onramp",localFeatureName:"onramp",returnType:!1,isLegacy:!1,isAvailableOnBasic:!1,processApi:e=>{if(!e?.config)return!1;let t=e.config;return!!e.isEnabled&&t.length>0&&t},processFallback:e=>void 0===e?g.bq.DEFAULT_REMOTE_FEATURES.onramp:"boolean"==typeof e?!!e&&g.bq.DEFAULT_REMOTE_FEATURES.onramp:e},activity:{apiFeatureName:"activity",localFeatureName:"history",returnType:!1,isLegacy:!0,isAvailableOnBasic:!1,processApi:e=>!!e.isEnabled,processFallback:e=>void 0===e?g.bq.DEFAULT_REMOTE_FEATURES.activity:!!e},reownBranding:{apiFeatureName:"reown_branding",localFeatureName:"reownBranding",returnType:!1,isLegacy:!1,isAvailableOnBasic:!1,processApi:e=>!!e.isEnabled,processFallback:e=>void 0===e?g.bq.DEFAULT_REMOTE_FEATURES.reownBranding:!!e},emailCapture:{apiFeatureName:"email_capture",localFeatureName:"emailCapture",returnType:!1,isLegacy:!1,isAvailableOnBasic:!1,processApi:e=>e.isEnabled&&(e.config??[]),processFallback:e=>!1},multiWallet:{apiFeatureName:"multi_wallet",localFeatureName:"multiWallet",returnType:!1,isLegacy:!1,isAvailableOnBasic:!1,processApi:e=>!!e.isEnabled,processFallback:()=>g.bq.DEFAULT_REMOTE_FEATURES.multiWallet},payWithExchange:{apiFeatureName:"fund_from_exchange",localFeatureName:"payWithExchange",returnType:!1,isLegacy:!1,isAvailableOnBasic:!1,processApi:e=>!!e.isEnabled,processFallback:()=>g.bq.DEFAULT_REMOTE_FEATURES.payWithExchange},payments:{apiFeatureName:"payments",localFeatureName:"payments",returnType:!1,isLegacy:!1,isAvailableOnBasic:!1,processApi:e=>!!e.isEnabled,processFallback:()=>g.bq.DEFAULT_REMOTE_FEATURES.payments},reownAuthentication:{apiFeatureName:"reown_authentication",localFeatureName:"reownAuthentication",returnType:!1,isLegacy:!1,isAvailableOnBasic:!1,processApi:e=>!!e.isEnabled,processFallback:e=>void 0===e?g.bq.DEFAULT_REMOTE_FEATURES.reownAuthentication:!!e},headless:{apiFeatureName:"headless",localFeatureName:"headless",returnType:!1,isLegacy:!1,isAvailableOnBasic:!1,processApi:e=>!!e.isEnabled,processFallback:()=>g.bq.DEFAULT_REMOTE_FEATURES.headless}},ei={localSettingsOverridden:new Set,getApiConfig:(e,t)=>t?.find(t=>t.id===e),addWarning(e,t){if(void 0!==e){let e=er[t],r=e.isLegacy?`"features.${e.localFeatureName}" (now "${t}")`:`"features.${t}"`;this.localSettingsOverridden.add(r)}},processFeature(e,t,r,i,n){let o=er[e],s=t[o.localFeatureName];if(n&&!o.isAvailableOnBasic)return!1;if(i){let t=this.getApiConfig(o.apiFeatureName,r);return t?.config===null?this.processFallbackFeature(e,s):!!t?.config&&(void 0!==s&&this.addWarning(s,e),this.processApiFeature(e,t))}return this.processFallbackFeature(e,s)},processApiFeature:(e,t)=>er[e].processApi(t),processFallbackFeature:(e,t)=>er[e].processFallback(t),async fetchRemoteFeatures(e){let t=e.basic??!1,r=e.features||{};this.localSettingsOverridden.clear();let i=null,n=!1;try{n=null!=(i=await f.ApiController.fetchProjectConfig())}catch(e){console.warn("[Reown Config] Failed to fetch remote project configuration. Using local/default values.",e)}let o=n&&!t?g.bq.DEFAULT_REMOTE_FEATURES:g.bq.DEFAULT_REMOTE_FEATURES_DISABLED;try{for(let e of et){let s=this.processFeature(e,r,i,n,t);Object.assign(o,{[e]:s})}}catch(e){return console.warn("[Reown Config] Failed to process the configuration from Cloud. Using default values.",e),g.bq.DEFAULT_REMOTE_FEATURES}if(n&&this.localSettingsOverridden.size>0){let e=`Your local configuration for ${Array.from(this.localSettingsOverridden).join(", ")} was ignored because a remote configuration was successfully fetched. Please manage these features via your project dashboard on dashboard.reown.com.`;v.AlertController.open({debugMessage:_.j.ALERT_WARNINGS.LOCAL_CONFIGURATION_IGNORED.debugMessage(e)},"warning")}return o}};class en{constructor(e){this.chainNamespaces=[],this.features={},this.remoteFeatures={},this.reportedAlertErrors={},this.getCaipNetwork=(e,t)=>{if(e){let r=y.R.getCaipNetworks(e)?.find(e=>e.id===t);if(r)return r;let i=y.R.getNetworkData(e)?.caipNetwork;if(i)return i;let n=y.R.getRequestedCaipNetworks(e);return n.filter(t=>t.chainNamespace===e)?.[0]}return y.R.state.activeCaipNetwork||this.defaultCaipNetwork},this.getCaipNetworkId=()=>{let e=this.getCaipNetwork();if(e)return e.id},this.getCaipNetworks=e=>y.R.getCaipNetworks(e),this.getActiveChainNamespace=()=>y.R.state.activeChain,this.setRequestedCaipNetworks=(e,t)=>{y.R.setRequestedCaipNetworks(e,t)},this.getApprovedCaipNetworkIds=()=>y.R.getAllApprovedCaipNetworkIds(),this.getCaipAddress=e=>y.R.state.activeChain!==e&&e?y.R.state.chains.get(e)?.accountState?.caipAddress:y.R.state.activeCaipAddress,this.setClientId=e=>{O.L.setClientId(e)},this.getProvider=e=>C.O.getProvider(e),this.getProviderType=e=>C.O.getProviderId(e),this.getPreferredAccountType=e=>(0,l.r9)(e),this.setCaipAddress=(e,t,r=!1)=>{y.R.setAccountProp("caipAddress",e,t,r),y.R.setAccountProp("address",n.j.getPlainAddress(e),t,r)},this.setBalance=(e,t,r)=>{y.R.setAccountProp("balance",e,r),y.R.setAccountProp("balanceSymbol",t,r)},this.setProfileName=(e,t)=>{y.R.setAccountProp("profileName",e,t)},this.setProfileImage=(e,t)=>{y.R.setAccountProp("profileImage",e,t)},this.setUser=(e,t)=>{y.R.setAccountProp("user",e,t)},this.resetAccount=e=>{y.R.resetAccount(e)},this.setCaipNetwork=e=>{y.R.setActiveCaipNetwork(e)},this.setCaipNetworkOfNamespace=(e,t)=>{y.R.setChainNetworkData(t,{caipNetwork:e})},this.setStatus=(e,t)=>{y.R.setAccountProp("status",e,t),c.ConnectorController.isConnected()?b.M.setConnectionStatus("connected"):b.M.setConnectionStatus("disconnected")},this.getAddressByChainNamespace=e=>y.R.getAccountData(e)?.address,this.setConnectors=e=>{let t=[...c.ConnectorController.state.allConnectors,...e];c.ConnectorController.setConnectors(t)},this.setConnections=(e,t)=>{b.M.setConnections(e,t),h.ConnectionController.setConnections(e,t)},this.fetchIdentity=e=>O.L.fetchIdentity(e),this.getReownName=e=>T.a.getNamesForAddress(e),this.getConnectors=()=>c.ConnectorController.getConnectors(),this.getConnectorImage=e=>P.f.getConnectorImage(e),this.getConnections=e=>this.remoteFeatures.multiWallet?$.f.getConnectionsData(e).connections:(v.AlertController.open(o.b.REMOTE_FEATURES_ALERTS.MULTI_WALLET_NOT_ENABLED.DEFAULT,"info"),[]),this.getRecentConnections=e=>this.remoteFeatures.multiWallet?$.f.getConnectionsData(e).recentConnections:(v.AlertController.open(o.b.REMOTE_FEATURES_ALERTS.MULTI_WALLET_NOT_ENABLED.DEFAULT,"info"),[]),this.switchConnection=async e=>{if(!this.remoteFeatures.multiWallet){v.AlertController.open(o.b.REMOTE_FEATURES_ALERTS.MULTI_WALLET_NOT_ENABLED.DEFAULT,"info");return}await h.ConnectionController.switchConnection(e)},this.deleteConnection=e=>{if(!this.remoteFeatures.multiWallet){v.AlertController.open(o.b.REMOTE_FEATURES_ALERTS.MULTI_WALLET_NOT_ENABLED.DEFAULT,"info");return}b.M.deleteAddressFromConnection(e),h.ConnectionController.syncStorageConnections()},this.setConnectedWalletInfo=(e,t)=>{let r=C.O.getProviderId(t),i=e?{...e,type:r}:void 0;y.R.setAccountProp("connectedWalletInfo",i,t)},this.getIsConnectedState=()=>!!y.R.state.activeCaipAddress,this.addAddressLabel=(e,t,r)=>{let i=y.R.getAccountData(r)?.addressLabels||{};y.R.setAccountProp("addressLabels",{...i,[e]:t},r)},this.removeAddressLabel=(e,t)=>{let r=y.R.getAccountData(t)?.addressLabels||{};y.R.setAccountProp("addressLabels",{...r,[e]:void 0},t)},this.getAddress=e=>{let t=e||y.R.state.activeChain;return y.R.getAccountData(t)?.address},this.resetNetwork=e=>{y.R.resetNetwork(e)},this.addConnector=e=>{c.ConnectorController.addConnector(e)},this.resetWcConnection=()=>{h.ConnectionController.resetWcConnection()},this.setAddressExplorerUrl=(e,t)=>{y.R.setAccountProp("addressExplorerUrl",e,t)},this.setSmartAccountDeployed=(e,t)=>{y.R.setAccountProp("smartAccountDeployed",e,t)},this.setPreferredAccountType=(e,t)=>{y.R.setAccountProp("preferredAccountType",e,t)},this.setEIP6963Enabled=e=>{m.OptionsController.setEIP6963Enabled(e)},this.handleUnsafeRPCRequest=()=>{this.isOpen()?this.isTransactionStackEmpty()||this.redirect("ApproveTransaction"):this.open({view:"ApproveTransaction"})},this.options=e,this.version=e.sdkVersion,this.caipNetworks=this.extendCaipNetworks(e),this.chainNamespaces=this.getChainNamespacesSet(e.adapters,this.caipNetworks),this.defaultCaipNetwork=this.extendDefaultCaipNetwork(e),this.chainAdapters=this.createAdapters(e.adapters),this.readyPromise=this.initialize(e)}getChainNamespacesSet(e,t){let r=e?.map(e=>e.namespace).filter(e=>!!e);return r?.length?[...new Set(r)]:[...new Set(t?.map(e=>e.chainNamespace))]}async initialize(e){if(this.initializeProjectSettings(e),this.initControllers(e),await this.initChainAdapters(),this.sendInitializeEvent(e),e.features?.headless&&!D.C.hasInjectedConnectors()&&f.ApiController.prefetch({fetchNetworkImages:!1,fetchConnectorImages:!1,fetchWalletRanks:!1,fetchRecommendedWallets:!0}),m.OptionsController.state.enableReconnect?(await this.syncExistingConnection(),await this.syncAdapterConnections()):await this.unSyncExistingConnection(),e.basic||e.manualWCControl||(this.remoteFeatures=await ei.fetchRemoteFeatures(e)),await f.ApiController.fetchUsage(),m.OptionsController.setRemoteFeatures(this.remoteFeatures),this.remoteFeatures.onramp&&U.ph.setOnrampProviders(this.remoteFeatures.onramp),(m.OptionsController.state.remoteFeatures?.email||Array.isArray(m.OptionsController.state.remoteFeatures?.socials)&&m.OptionsController.state.remoteFeatures?.socials.length>0)&&await this.checkAllowedOrigins(),m.OptionsController.state.features?.reownAuthentication||m.OptionsController.state.remoteFeatures?.reownAuthentication){let{ReownAuthentication:e}=await r.e(3520).then(r.bind(r,63520)),t=m.OptionsController.state.siwx;t instanceof e||(t&&console.warn("ReownAuthentication option is enabled, SIWX configuration will be overridden."),m.OptionsController.setSIWX(new e))}}async openSend(e){let t=e.namespace||y.R.state.activeChain,r=this.getCaipAddress(t),i=this.getCaipNetwork(t)?.id;if(!r)throw Error("openSend: caipAddress not found");if(i?.toString()!==e.chainId.toString()){let r=y.R.getCaipNetworkById(e.chainId,t);if(!r)throw Error(`openSend: caipNetwork with chainId ${e.chainId} not found`);await this.switchNetwork(r,{throwOnFailure:!0})}try{let t=q.getTokenSymbolByAddress(e.assetAddress);t&&await f.ApiController.fetchTokenImages([t])}catch{}return await L.I.open({view:"WalletSend",data:{send:e}}),new Promise((e,t)=>{let r=M.S.subscribeKey("hash",t=>{t&&(n(),e({hash:t}))}),i=L.I.subscribe(e=>{e.open||(n(),t(Error("Modal closed")))}),n=this.createCleanupHandler([r,i])})}toModalOptions(){return{isSwap:function(e){return e?.view==="Swap"},isSend:function(e){return e?.view==="WalletSend"}}}async checkAllowedOrigins(){try{let e=await f.ApiController.fetchAllowedOrigins();if(!n.j.isClient())return;let t=window.location.origin;B.s.isOriginAllowed(t,e,o.b.DEFAULT_ALLOWED_ANCESTORS)||v.AlertController.open(_.j.ALERT_ERRORS.ORIGIN_NOT_ALLOWED,"error")}catch(e){if(!(e instanceof Error))return;switch(e.message){case"RATE_LIMITED":v.AlertController.open(_.j.ALERT_ERRORS.RATE_LIMITED_APP_CONFIGURATION,"error");break;case"SERVER_ERROR":{let t=e.cause instanceof Error?e.cause:e;v.AlertController.open({displayMessage:_.j.ALERT_ERRORS.SERVER_ERROR_APP_CONFIGURATION.displayMessage,debugMessage:_.j.ALERT_ERRORS.SERVER_ERROR_APP_CONFIGURATION.debugMessage(t.message)},"error")}}}}createCleanupHandler(e){return()=>{e.forEach(e=>{try{e()}catch{}})}}sendInitializeEvent(e){let{...t}=e;delete t.adapters,delete t.universalProvider,d.X.sendEvent({type:"track",event:"INITIALIZE",properties:{...t,networks:e.networks.map(e=>e.id),siweConfig:{options:e.siweConfig?.options||{}}}})}initControllers(e){this.initializeOptionsController(e),this.initializeChainController(e),this.initializeThemeController(e),this.initializeConnectionController(e),this.initializeConnectorController()}initAdapterController(){j.j.initialize(this.chainAdapters)}initializeThemeController(e){e.themeMode&&w.ThemeController.setThemeMode(e.themeMode),e.themeVariables&&w.ThemeController.setThemeVariables(e.themeVariables)}initializeChainController(e){if(!this.connectionControllerClient)throw Error("ConnectionControllerClient must be set");y.R.initialize(e.adapters??[],this.caipNetworks,{connectionControllerClient:this.connectionControllerClient});let t=this.getDefaultNetwork();t&&y.R.setActiveCaipNetwork(t)}initializeConnectionController(e){h.ConnectionController.initialize(e.adapters??[]),h.ConnectionController.setWcBasic(e.basic??!1)}initializeConnectorController(){c.ConnectorController.initialize(this.chainNamespaces)}initializeProjectSettings(e){m.OptionsController.setProjectId(e.projectId),m.OptionsController.setSdkVersion(e.sdkVersion)}initializeOptionsController(e){m.OptionsController.setDebug(!1!==e.debug),m.OptionsController.setEnableWalletGuide(!1!==e.enableWalletGuide),m.OptionsController.setEnableWallets(!1!==e.enableWallets),m.OptionsController.setEIP6963Enabled(!1!==e.enableEIP6963),m.OptionsController.setEnableNetworkSwitch(!1!==e.enableNetworkSwitch),m.OptionsController.setEnableReconnect(!1!==e.enableReconnect),m.OptionsController.setEnableMobileFullScreen(!0===e.enableMobileFullScreen),m.OptionsController.setCoinbasePreference(e.coinbasePreference),m.OptionsController.setEnableAuthLogger(!1!==e.enableAuthLogger),m.OptionsController.setCustomRpcUrls(e.customRpcUrls),m.OptionsController.setEnableEmbedded(e.enableEmbedded),m.OptionsController.setAllWallets(e.allWallets),m.OptionsController.setIncludeWalletIds(e.includeWalletIds),m.OptionsController.setExcludeWalletIds(e.excludeWalletIds),m.OptionsController.setFeaturedWalletIds(e.featuredWalletIds),m.OptionsController.setTokens(e.tokens),m.OptionsController.setTermsConditionsUrl(e.termsConditionsUrl),m.OptionsController.setPrivacyPolicyUrl(e.privacyPolicyUrl),m.OptionsController.setCustomWallets(e.customWallets),m.OptionsController.setFeatures(e.features),m.OptionsController.setAllowUnsupportedChain(e.allowUnsupportedChain),m.OptionsController.setUniversalProviderConfigOverride(e.universalProviderConfigOverride),m.OptionsController.setPreferUniversalLinks(e.experimental_preferUniversalLinks),m.OptionsController.setDefaultAccountTypes(e.defaultAccountTypes);let t=this.getDefaultMetaData();if(!e.metadata&&t&&(e.metadata=t),m.OptionsController.setMetadata(e.metadata),m.OptionsController.setDisableAppend(e.disableAppend),m.OptionsController.setEnableEmbedded(e.enableEmbedded),m.OptionsController.setSIWX(e.siwx),this.features=m.OptionsController.state.features??{},!e.projectId){v.AlertController.open(_.j.ALERT_ERRORS.PROJECT_ID_NOT_CONFIGURED,"error");return}if(e.adapters?.find(e=>e.namespace===o.b.CHAIN.EVM)&&e.siweConfig){if(e.siwx)throw Error("Cannot set both `siweConfig` and `siwx` options");m.OptionsController.setSIWX(e.siweConfig.mapToSIWX())}}getDefaultMetaData(){return n.j.isClient()?{name:document.getElementsByTagName("title")?.[0]?.textContent||"",description:document.querySelector('meta[property="og:description"]')?.content||"",url:window.location.origin,icons:[document.querySelector('link[rel~="icon"]')?.href||""]}:null}setUnsupportedNetwork(e){let t=this.getActiveChainNamespace();if(t){let r=V.f.getUnsupportedNetwork(`${t}:${e}`);y.R.setActiveCaipNetwork(r)}}getDefaultNetwork(){return V.f.getCaipNetworkFromStorage(this.defaultCaipNetwork)}extendCaipNetwork(e,t){return V.f.extendCaipNetwork(e,{customNetworkImageUrls:t.chainImages,projectId:t.projectId})}extendCaipNetworks(e){return V.f.extendCaipNetworks(e.networks,{customNetworkImageUrls:e.chainImages,customRpcUrls:e.customRpcUrls,projectId:e.projectId})}extendDefaultCaipNetwork(e){let t=e.networks.find(t=>t.id===e.defaultNetwork?.id);return t?V.f.extendCaipNetwork(t,{customNetworkImageUrls:e.chainImages,customRpcUrls:e.customRpcUrls,projectId:e.projectId}):void 0}async disconnectConnector(e,t){try{this.setLoading(!0,e);let r={connections:[]},i=this.getAdapter(e);return(y.R.state.chains.get(e)?.accountState?.caipAddress||!m.OptionsController.state.enableReconnect)&&i?.disconnect&&(r=await i.disconnect({id:t})),this.setLoading(!1,e),r}catch(t){throw this.setLoading(!1,e),Error(`Failed to disconnect chains: ${t.message}`)}}createClients(){this.connectionControllerClient={connectWalletConnect:async()=>{let e=y.R.state.activeChain,t=this.getAdapter(e),r=this.getCaipNetwork(e)?.id,i=h.ConnectionController.getConnections(e),n=this.remoteFeatures.multiWallet,o=i.length>0;if(!t)throw Error("Adapter not found");let s=await t.connectWalletConnect(r);o&&n||this.close(),this.setClientId(s?.clientId||null),b.M.setConnectedNamespaces([...y.R.state.chains.keys()]),await this.syncWalletConnectAccount(),await a.w.initializeIfEnabled()},connectExternal:async e=>{let t=await this.onConnectExternal(e);return await this.connectInactiveNamespaces(e,t),t?{address:t.address}:void 0},reconnectExternal:async({id:e,info:t,type:r,provider:i})=>{let n=y.R.state.activeChain,o=this.getAdapter(n);if(!n)throw Error("reconnectExternal: namespace not found");if(!o)throw Error("reconnectExternal: adapter not found");o?.reconnect&&(await o?.reconnect({id:e,info:t,type:r,provider:i,chainId:this.getCaipNetwork()?.id}),b.M.addConnectedNamespace(n),this.syncConnectedWalletInfo(n))},disconnectConnector:async e=>{await this.disconnectConnector(e.namespace,e.id)},disconnect:async e=>{let{id:t,chainNamespace:r,initialDisconnect:i}=e||{},n=r||y.R.state.activeChain,s=c.ConnectorController.getConnectorId(n),l=t===o.b.CONNECTOR_ID.AUTH||s===o.b.CONNECTOR_ID.AUTH,u=t===o.b.CONNECTOR_ID.WALLET_CONNECT||s===o.b.CONNECTOR_ID.WALLET_CONNECT;try{let e=Array.from(y.R.state.chains.keys()),n=r?[r]:e;(u||l)&&(n=e);let o=n.map(async e=>{let r=c.ConnectorController.getConnectorId(e),n=await this.disconnectConnector(e,t||r);n&&(l&&b.M.deleteConnectedSocialProvider(),n.connections.forEach(t=>{b.M.addDisconnectedConnectorId(t.connectorId,e)})),i&&this.onDisconnectNamespace({chainNamespace:e,closeModal:!1})}),s=await Promise.allSettled(o);M.S.resetSend(),h.ConnectionController.resetWcConnection(),a.w.getSIWX()?.signOutOnDisconnect&&await a.w.clearSessions(),c.ConnectorController.setFilterByNamespace(void 0),h.ConnectionController.syncStorageConnections();let p=s.filter(e=>"rejected"===e.status);if(p.length>0)throw Error(p.map(e=>e.reason.message).join(", "));d.X.sendEvent({type:"track",event:"DISCONNECT_SUCCESS",properties:{namespace:r||"all"}})}catch(e){throw Error(`Failed to disconnect chains: ${e.message}`)}},checkInstalled:e=>e?e.some(e=>!!window.ethereum?.[String(e)]):!!window.ethereum,signMessage:async e=>{let t=y.R.state.activeChain,r=this.getAdapter(y.R.state.activeChain);if(!t)throw Error("signMessage: namespace not found");if(!r)throw Error("signMessage: adapter not found");let i=this.getAddress(t);if(!i)throw Error("signMessage: address not found");let n=await r?.signMessage({message:e,address:i,provider:C.O.getProvider(t)});return n?.signature||""},sendTransaction:async e=>{let t=e.chainNamespace;if(!t)throw Error("sendTransaction: namespace not found");if(g.bq.SEND_SUPPORTED_NAMESPACES.includes(t)){let r=this.getAdapter(t);if(!r)throw Error("sendTransaction: adapter not found");let i=C.O.getProvider(t),n=await r?.sendTransaction({...e,caipNetwork:this.getCaipNetwork(),provider:i});return n?.hash||""}return""},estimateGas:async e=>{let t=e.chainNamespace;if(t===o.b.CHAIN.EVM){let r=this.getAdapter(t);if(!r)throw Error("estimateGas: adapter is required but got undefined");let i=C.O.getProvider(t),n=this.getCaipNetwork();if(!n)throw Error("estimateGas: caipNetwork is required but got undefined");let o=await r?.estimateGas({...e,provider:i,caipNetwork:n});return o?.gas||0n}return 0n},getEnsAvatar:async()=>{let e=y.R.state.activeChain;if(!e)throw Error("getEnsAvatar: namespace is required but got undefined");let t=this.getAddress(e);if(!t)throw Error("getEnsAvatar: address not found");await this.syncIdentity({address:t,chainId:Number(this.getCaipNetwork()?.id),chainNamespace:e});let r=y.R.getAccountData();return r?.profileImage||!1},getEnsAddress:async e=>await B.s.resolveReownName(e),writeContract:async e=>{let t=y.R.state.activeChain,r=this.getAdapter(t);if(!t)throw Error("writeContract: namespace is required but got undefined");if(!r)throw Error("writeContract: adapter is required but got undefined");let i=this.getCaipNetwork(),n=this.getCaipAddress(),o=C.O.getProvider(t);if(!i||!n)throw Error("writeContract: caipNetwork or caipAddress is required but got undefined");let s=await r?.writeContract({...e,caipNetwork:i,provider:o,caipAddress:n});return s?.hash},parseUnits:(e,t)=>{let r=this.getAdapter(y.R.state.activeChain);if(!r)throw Error("parseUnits: adapter is required but got undefined");return r?.parseUnits({value:e,decimals:t})??0n},formatUnits:(e,t)=>{let r=this.getAdapter(y.R.state.activeChain);if(!r)throw Error("formatUnits: adapter is required but got undefined");return r?.formatUnits({value:e,decimals:t})??"0"},getCapabilities:async e=>{let t=this.getAdapter(y.R.state.activeChain);if(!t)throw Error("getCapabilities: adapter is required but got undefined");return await t?.getCapabilities(e)},grantPermissions:async e=>{let t=this.getAdapter(y.R.state.activeChain);if(!t)throw Error("grantPermissions: adapter is required but got undefined");return await t?.grantPermissions(e)},revokePermissions:async e=>{let t=this.getAdapter(y.R.state.activeChain);if(!t)throw Error("revokePermissions: adapter is required but got undefined");return t?.revokePermissions?await t.revokePermissions(e):"0x"},walletGetAssets:async e=>{let t=this.getAdapter(y.R.state.activeChain);if(!t)throw Error("walletGetAssets: adapter is required but got undefined");return await t?.walletGetAssets(e)??{}},updateBalance:e=>{let t=this.getAddress(e),r=this.getCaipNetwork(e);r&&t&&this.updateNativeBalance(t,r?.id,e)}},h.ConnectionController.setClient(this.connectionControllerClient)}async onConnectExternal(e){let t=y.R.state.activeChain,r=e.chain||t,i=this.getAdapter(r),n=!0;if(e.type===x.b.CONNECTOR_TYPE_AUTH&&o.b.AUTH_CONNECTOR_SUPPORTED_CHAINS.some(e=>c.ConnectorController.getConnectorId(e)===o.b.CONNECTOR_ID.AUTH)&&e.chain!==t&&(n=!1),e.chain&&e.chain!==t&&!e.caipNetwork){let t=this.getCaipNetworks().find(t=>t.chainNamespace===e.chain);t&&n&&this.setCaipNetwork(t)}if(!r)throw Error("connectExternal: namespace not found");if(!i)throw Error("connectExternal: adapter not found");let s=this.getCaipNetwork(r),a=e.caipNetwork||s,l=await i.connect({id:e.id,address:e.address,info:e.info,type:e.type,provider:e.provider,socialUri:e.socialUri,chainId:e.caipNetwork?.id||s?.id,rpcUrl:e.caipNetwork?.rpcUrls?.default?.http?.[0]||s?.rpcUrls?.default?.http?.[0]});if(l)return b.M.addConnectedNamespace(r),this.syncProvider({...l,chainNamespace:r}),this.setStatus("connected",r),this.syncConnectedWalletInfo(r),b.M.removeDisconnectedConnectorId(e.id,r),{address:l.address,connectedCaipNetwork:a}}async connectInactiveNamespaces(e,t){let r=e.type===x.b.CONNECTOR_TYPE_AUTH,i=E.g.getOtherAuthNamespaces(t?.connectedCaipNetwork?.chainNamespace),n=y.R.state.activeCaipNetwork,o=this.getAdapter(n?.chainNamespace);r&&(await Promise.all(i.map(async t=>{try{let r=C.O.getProvider(t),i=this.getCaipNetwork(t),n=this.getAdapter(t);await n?.connect({...e,provider:r,socialUri:void 0,chainId:i?.id,rpcUrl:i?.rpcUrls?.default?.http?.[0]})&&(b.M.addConnectedNamespace(t),b.M.removeDisconnectedConnectorId(e.id,t),this.setStatus("connected",t),this.syncConnectedWalletInfo(t))}catch(e){v.AlertController.warn(_.j.ALERT_WARNINGS.INACTIVE_NAMESPACE_NOT_CONNECTED.displayMessage,_.j.ALERT_WARNINGS.INACTIVE_NAMESPACE_NOT_CONNECTED.debugMessage(t,e instanceof Error?e.message:void 0),_.j.ALERT_WARNINGS.INACTIVE_NAMESPACE_NOT_CONNECTED.code)}})),n&&await o?.switchNetwork({caipNetwork:n}))}getApprovedCaipNetworksData(){if(C.O.getProviderId(y.R.state.activeChain)===x.b.CONNECTOR_TYPE_WALLET_CONNECT){let e=this.universalProvider?.session?.namespaces;return{supportsAllNetworks:this.universalProvider?.session?.peer?.metadata.name==="MetaMask Wallet",approvedCaipNetworkIds:this.getChainsFromNamespaces(e)}}return{supportsAllNetworks:!0,approvedCaipNetworkIds:[]}}async switchCaipNetwork(e){let t=e.chainNamespace;if(this.getAddressByChainNamespace(e.chainNamespace)){let r=C.O.getProviderId(t);if(e.chainNamespace===y.R.state.activeChain){let r=this.getAdapter(t);await r?.switchNetwork({caipNetwork:e})}else if(this.setCaipNetwork(e),r===x.b.CONNECTOR_TYPE_WALLET_CONNECT)this.syncWalletConnectAccount();else{let r=this.getAddressByChainNamespace(t);r&&this.syncAccount({address:r,chainId:e.id,chainNamespace:t})}}else this.setCaipNetwork(e)}getChainsFromNamespaces(e={}){return Object.values(e).flatMap(e=>Array.from(new Set([...e.chains||[],...e.accounts.map(e=>{let{chainId:t,chainNamespace:r}=k.u.parseCaipAddress(e);return`${r}:${t}`})])))}createAdapters(e){return this.createClients(),this.chainNamespaces.reduce((t,r)=>{let i=e?.find(e=>e.namespace===r);return i?(i.construct({namespace:r,projectId:this.options?.projectId,networks:this.caipNetworks?.filter(({chainNamespace:e})=>e===r)}),t[r]=i):t[r]=new ee({namespace:r,networks:this.getCaipNetworks()}),t},{})}async initChainAdapter(e){this.onConnectors(e),this.listenAdapter(e);let t=this.getAdapter(e);if(!t)throw Error("adapter not found");await t.syncConnectors(),await this.createUniversalProviderForAdapter(e)}async initChainAdapters(){await Promise.all(this.chainNamespaces.map(async e=>{await this.initChainAdapter(e)})),this.initAdapterController()}onConnectors(e){let t=this.getAdapter(e);t?.on("connectors",this.setConnectors.bind(this))}listenAdapter(e){let t=this.getAdapter(e);if(!t)return;let r=b.M.getConnectionStatus();!1===m.OptionsController.state.enableReconnect?this.setStatus("disconnected",e):"connected"===r?this.setStatus("connecting",e):("disconnected"===r&&b.M.clearAddressCache(),this.setStatus(r,e)),t.on("switchNetwork",({address:t,chainId:r})=>{let i=this.getCaipNetworks().find(e=>e.id.toString()===r.toString()||e.caipNetworkId.toString()===r.toString()),n=y.R.state.activeChain===e,o=y.R.state.chains.get(e)?.accountState?.address;if(i){let r=n&&t?t:o;r&&this.syncAccount({address:r,chainId:i.id,chainNamespace:e})}else this.setUnsupportedNetwork(r)}),t.on("disconnect",()=>{let t=this.remoteFeatures.multiWallet,r=Array.from(h.ConnectionController.state.connections.values()).flat();this.onDisconnectNamespace({chainNamespace:e,closeModal:!t||0===r.length})}),t.on("connections",t=>{this.setConnections(t,e)}),t.on("pendingTransactions",()=>{let t=this.getAddress(e),r=y.R.state.activeCaipNetwork;t&&r?.id&&this.updateNativeBalance(t,r.id,r.chainNamespace)}),t.on("accountChanged",({address:t,chainId:r,connector:i})=>{this.handlePreviousConnectorConnection(i);let n=y.R.state.activeChain===e;i?.provider&&(this.syncProvider({id:i.id,type:i.type,provider:i?.provider,chainNamespace:e}),this.syncConnectedWalletInfo(e));let o=y.R.getNetworkData(e)?.caipNetwork?.id,s=r||o;n&&s?this.syncAccount({address:t,chainId:s,chainNamespace:e}):!n&&s?(this.syncAccountInfo(t,s,e),this.syncBalance({address:t,chainId:s,chainNamespace:e})):this.syncAccountInfo(t,r,e),b.M.addConnectedNamespace(e)})}async handlePreviousConnectorConnection(e){let t=e?.chain,r=e?.id,i=c.ConnectorController.getConnectorId(t),n=m.OptionsController.state.remoteFeatures?.multiWallet,o=i!==r,s=t&&r&&i&&o&&!n;try{s&&await h.ConnectionController.disconnect({id:i,namespace:t})}catch(e){console.warn("Error disconnecting previous connector",e)}}async createUniversalProviderForAdapter(e){await this.getUniversalProvider(),this.universalProvider&&await this.chainAdapters?.[e]?.setUniversalProvider?.(this.universalProvider)}async syncExistingConnection(){await Promise.allSettled(this.chainNamespaces.map(e=>this.syncNamespaceConnection(e)))}async unSyncExistingConnection(){try{await Promise.allSettled(this.chainNamespaces.map(e=>h.ConnectionController.disconnect({namespace:e,initialDisconnect:!0})))}catch(e){console.error("Error disconnecting existing connections:",e)}}async reconnectWalletConnect(){await this.syncWalletConnectAccount();let e=this.getAddress();this.getCaipAddress()||b.M.deleteRecentWallet();let t=b.M.getRecentWallet();d.X.sendEvent({type:"track",event:"CONNECT_SUCCESS",address:e,properties:{method:n.j.isMobile()?"mobile":"qrcode",name:t?.name||"Unknown",reconnect:!0,view:u.RouterController.state.view,walletRank:t?.order}})}async syncNamespaceConnection(e){try{e===o.b.CHAIN.EVM&&n.j.isSafeApp()&&c.ConnectorController.setConnectorId(o.b.CONNECTOR_ID.SAFE,e);let t=c.ConnectorController.getConnectorId(e);switch(this.setStatus("connecting",e),t){case o.b.CONNECTOR_ID.WALLET_CONNECT:await this.reconnectWalletConnect();break;case o.b.CONNECTOR_ID.AUTH:break;default:await this.syncAdapterConnection(e)}}catch(t){console.warn("AppKit couldn't sync existing connection",t),this.setStatus("disconnected",e)}}onDisconnectNamespace(e){let{chainNamespace:t,closeModal:r}=e||{};y.R.resetAccount(t),y.R.resetNetwork(t),b.M.removeConnectedNamespace(t);let i=Array.from(y.R.state.chains.keys());(t?[t]:i).forEach(e=>b.M.addDisconnectedConnectorId(c.ConnectorController.getConnectorId(e)||"",e)),c.ConnectorController.removeConnectorId(t),C.O.resetChain(t),this.setUser(null,t),this.setStatus("disconnected",t),this.setConnectedWalletInfo(null,t),!1!==r&&L.I.close()}async syncAdapterConnections(){await Promise.allSettled(this.chainNamespaces.map(e=>{let t=this.getAdapter(e),r=this.getCaipAddress(e),i=this.getCaipNetwork(e);return t?.syncConnections({connectToFirstConnector:!r,caipNetwork:i})}))}async syncAdapterConnection(e){let t=this.getAdapter(e),r=this.getCaipNetwork(e),i=c.ConnectorController.getConnectorId(e),n=c.ConnectorController.getConnectors(e).find(e=>e.id===i);try{if(!t||!n)throw Error(`Adapter or connector not found for namespace ${e}`);if(!r?.id)throw Error("CaipNetwork not found");let i=await t?.syncConnection({namespace:e,id:n.id,chainId:r.id,rpcUrl:r?.rpcUrls?.default?.http?.[0]});i?(this.syncProvider({...i,chainNamespace:e}),await this.syncAccount({...i,chainNamespace:e}),this.setStatus("connected",e),d.X.sendEvent({type:"track",event:"CONNECT_SUCCESS",address:i.address,properties:{method:"browser",name:n.info?.name||n.name||"Unknown",reconnect:!0,view:u.RouterController.state.view,walletRank:n?.explorerWallet?.order}})):this.setStatus("disconnected",e)}catch(t){this.onDisconnectNamespace({chainNamespace:e,closeModal:!1})}}async syncWalletConnectAccount(){let e=Object.keys(this.universalProvider?.session?.namespaces||{}),t=this.chainNamespaces.map(async t=>{let r=this.getAdapter(t);if(!r)return;let i=this.universalProvider?.session?.namespaces?.[t]?.accounts||[],n=y.R.state.activeCaipNetwork?.id,s=i.find(e=>{let{chainId:t}=k.u.parseCaipAddress(e);return t===n?.toString()})||i[0];if(s){let e=k.u.validateCaipAddress(s),{chainId:i,address:n}=k.u.parseCaipAddress(e);if(C.O.setProviderId(t,x.b.CONNECTOR_TYPE_WALLET_CONNECT),this.caipNetworks&&y.R.state.activeCaipNetwork&&r.namespace!==o.b.CHAIN.EVM){let e=r.getWalletConnectProvider({caipNetworks:this.getCaipNetworks(),provider:this.universalProvider,activeCaipNetwork:y.R.state.activeCaipNetwork});C.O.setProvider(t,e)}else C.O.setProvider(t,this.universalProvider);c.ConnectorController.setConnectorId(o.b.CONNECTOR_ID.WALLET_CONNECT,t),b.M.addConnectedNamespace(t),await this.syncAccount({address:n,chainId:i,chainNamespace:t})}else e.includes(t)&&this.setStatus("disconnected",t);let a=this.getApprovedCaipNetworksData();this.syncConnectedWalletInfo(t),y.R.setApprovedCaipNetworksData(t,{approvedCaipNetworkIds:a.approvedCaipNetworkIds,supportsAllNetworks:a.supportsAllNetworks})});await Promise.all(t)}syncProvider({type:e,provider:t,id:r,chainNamespace:i}){C.O.setProviderId(i,e),C.O.setProvider(i,t),c.ConnectorController.setConnectorId(r,i)}async syncAccount(e){let t=e.chainNamespace===y.R.state.activeChain,r=y.R.getCaipNetworkByNamespace(e.chainNamespace,e.chainId),{address:i,chainId:n,chainNamespace:s}=e,{chainId:a}=b.M.getActiveNetworkProps(),l=r?.id||a,c=y.R.state.activeCaipNetwork?.name===o.b.UNSUPPORTED_NETWORK_NAME,d=y.R.getNetworkProp("supportsAllNetworks",s);if(this.setStatus("connected",s),(!c||d)&&l){let e=this.getCaipNetworks().find(e=>e.id.toString()===l.toString()),a=this.getCaipNetworks().find(e=>e.chainNamespace===s);if(!d&&!e&&!a){let t=this.getApprovedCaipNetworkIds()||[],r=t.find(e=>k.u.parseCaipNetworkId(e)?.chainId===l.toString()),i=t.find(e=>k.u.parseCaipNetworkId(e)?.chainNamespace===s);e=this.getCaipNetworks().find(e=>e.caipNetworkId===r),a=this.getCaipNetworks().find(e=>e.caipNetworkId===i||"deprecatedCaipNetworkId"in e&&e.deprecatedCaipNetworkId===i)}let c=e||a;c?.chainNamespace===y.R.state.activeChain?m.OptionsController.state.enableNetworkSwitch&&!m.OptionsController.state.allowUnsupportedChain&&y.R.state.activeCaipNetwork?.name===o.b.UNSUPPORTED_NETWORK_NAME?y.R.showUnsupportedChainUI():this.setCaipNetwork(c):!t&&r&&this.setCaipNetworkOfNamespace(r,s),this.syncConnectedWalletInfo(s);let u=this.getAddress(s);E.g.isLowerCaseMatch(i,u)||this.syncAccountInfo(i,c?.id,s),t?await this.syncBalance({address:i,chainId:c?.id,chainNamespace:s}):await this.syncBalance({address:i,chainId:r?.id,chainNamespace:s}),this.syncIdentity({address:i,chainId:n,chainNamespace:s})}}async syncAccountInfo(e,t,r){let i=this.getCaipAddress(r),n=t||i?.split(":")[1];if(!n)return;let o=`${r}:${n}:${e}`;this.setCaipAddress(o,r,!0),await this.syncIdentity({address:e,chainId:n,chainNamespace:r})}async syncReownName(e,t){try{let r=await this.getReownName(e);if(r[0]){let e=r[0];this.setProfileName(e.name,t)}else this.setProfileName(null,t)}catch{this.setProfileName(null,t)}}syncConnectedWalletInfo(e){let t=c.ConnectorController.getConnectorId(e),r=C.O.getProviderId(e);if(r===x.b.CONNECTOR_TYPE_ANNOUNCED||r===x.b.CONNECTOR_TYPE_INJECTED){if(t){let r=this.getConnectors().find(e=>{let r=e.id===t,i=e.info?.rdns===t,n=e.connectors?.some(e=>e.id===t||e.info?.rdns===t);return r||i||!!n});if(r){let{info:t,name:i,imageUrl:n}=r,o=n||this.getConnectorImage(r);this.setConnectedWalletInfo({name:i,icon:o,...t},e)}}}else if(r===x.b.CONNECTOR_TYPE_WALLET_CONNECT){let t=C.O.getProvider(e);t?.session&&this.setConnectedWalletInfo({...t.session.peer.metadata,name:t.session.peer.metadata.name,icon:t.session.peer.metadata.icons?.[0]},e)}else if(t&&(t===o.b.CONNECTOR_ID.COINBASE_SDK||t===o.b.CONNECTOR_ID.COINBASE)){let r=this.getConnectors().find(e=>e.id===t),i=r?.name||"Coinbase Wallet",n=r?.imageUrl||this.getConnectorImage(r),o=r?.info;this.setConnectedWalletInfo({...o,name:i,icon:n},e)}}async syncBalance(e){R.p.getNetworksByNamespace(this.getCaipNetworks(),e.chainNamespace).find(t=>t.id.toString()===e.chainId?.toString())&&e.chainId&&await this.updateNativeBalance(e.address,e.chainId,e.chainNamespace)}async ready(){await this.readyPromise}async updateNativeBalance(e,t,r){let i=this.getAdapter(r),n=y.R.getCaipNetworkByNamespace(r,t);if(i){let o=await i.getBalance({address:e,chainId:t,caipNetwork:n,tokens:this.options.tokens});return this.setBalance(o.balance,o.symbol,r),o}}async initializeUniversalAdapter(){let e=Z.createLogger((e,...t)=>{e&&this.handleAlertError(e),console.error(...t)}),t={projectId:this.options?.projectId,metadata:{name:this.options?.metadata?this.options?.metadata.name:"",description:this.options?.metadata?this.options?.metadata.description:"",url:this.options?.metadata?this.options?.metadata.url:"",icons:this.options?.metadata?this.options?.metadata.icons:[""]},logger:e};m.OptionsController.setManualWCControl(!!this.options?.manualWCControl),this.universalProvider=this.options.universalProvider??await N.Z.init(t);let r=this.universalProvider.disconnect.bind(this.universalProvider);this.universalProvider.disconnect=async()=>{try{return await r()}catch(e){if(e instanceof Error&&e.message.includes("Missing or invalid. Record was recently deleted"))return;throw e}},!1===m.OptionsController.state.enableReconnect&&this.universalProvider.session&&await this.universalProvider.disconnect(),this.listenWalletConnect()}listenWalletConnect(){this.universalProvider&&this.chainNamespaces.forEach(e=>{B.s.listenWcProvider({universalProvider:this.universalProvider,namespace:e,onDisplayUri:e=>{h.ConnectionController.setUri(e)},onConnect:e=>{let{address:t}=n.j.getAccount(e[0]);h.ConnectionController.finalizeWcConnection(t)},onDisconnect:()=>{y.R.state.noAdapters&&this.resetAccount(e),h.ConnectionController.resetWcConnection()},onChainChanged:t=>{let r=y.R.state.activeChain,i=r&&c.ConnectorController.state.activeConnectorIds[r]===o.b.CONNECTOR_ID.WALLET_CONNECT;if(r===e&&(y.R.state.noAdapters||i)){let e=this.getCaipNetworks().find(e=>e.id.toString()===t.toString()||e.caipNetworkId.toString()===t.toString()),r=this.getCaipNetwork();if(!e){this.setUnsupportedNetwork(t);return}r?.id.toString()!==e?.id.toString()&&r?.chainNamespace===e?.chainNamespace&&this.setCaipNetwork(e)}},onAccountsChanged:t=>{let r=y.R.state.activeChain,i=r&&c.ConnectorController.state.activeConnectorIds[r]===o.b.CONNECTOR_ID.WALLET_CONNECT;if(r===e&&(y.R.state.noAdapters||i)){let e=t?.[0];e&&this.syncAccount({address:e.address,chainId:e.chainId,chainNamespace:e.chainNamespace})}}})})}createUniversalProvider(){return!this.universalProviderInitPromise&&n.j.isClient()&&this.options?.projectId&&(this.universalProviderInitPromise=this.initializeUniversalAdapter()),this.universalProviderInitPromise}async getUniversalProvider(){if(!this.universalProvider)try{await this.createUniversalProvider()}catch(e){d.X.sendEvent({type:"error",event:"INTERNAL_SDK_ERROR",properties:{errorType:"UniversalProviderInitError",errorMessage:e instanceof Error?e.message:"Unknown",uncaught:!1}}),console.error("AppKit:getUniversalProvider - Cannot create provider",e)}return this.universalProvider}getDisabledCaipNetworks(){let e=y.R.getAllApprovedCaipNetworkIds(),t=y.R.getAllRequestedCaipNetworks();return n.j.sortRequestedNetworks(e,t).filter(e=>y.R.isCaipNetworkDisabled(e))}handleAlertError(e){let[t,r]=Object.entries(_.j.UniversalProviderErrors).find(([,{message:t}])=>e.message.includes(t))??[],{message:i,alertErrorKey:n}=r??{};if(t&&i&&!this.reportedAlertErrors[t]){let e=_.j.ALERT_ERRORS[n];e&&(v.AlertController.open(e,"error"),this.reportedAlertErrors[t]=!0)}}getAdapter(e){if(e)return this.chainAdapters?.[e]}createAdapter(e){if(!e)return;let t=e.namespace;t&&(this.createClients(),e.namespace=t,e.construct({namespace:t,projectId:this.options?.projectId,networks:this.caipNetworks?.filter(({chainNamespace:e})=>e===t)}),this.chainNamespaces.includes(t)||this.chainNamespaces.push(t),this.chainAdapters&&(this.chainAdapters[t]=e))}async open(e){await this.injectModalUi(),e?.uri&&h.ConnectionController.setUri(e.uri);let{isSwap:t,isSend:r}=this.toModalOptions();return t(e)?L.I.open({...e,data:{swap:e.arguments}}):r(e)&&e.arguments?this.openSend(e.arguments):L.I.open(e)}async close(){await this.injectModalUi(),L.I.close()}setLoading(e,t){L.I.setLoading(e,t)}async disconnect(e){await h.ConnectionController.disconnect({namespace:e})}getSIWX(){return m.OptionsController.state.siwx}getError(){return""}getChainId(){return y.R.state.activeCaipNetwork?.id}async switchNetwork(e,{throwOnFailure:t=!1}={}){let r=this.getCaipNetworks().find(t=>t.id===e.id);if(!r){v.AlertController.open(_.j.ALERT_ERRORS.SWITCH_NETWORK_NOT_FOUND,"error");return}await y.R.switchActiveNetwork(r,{throwOnFailure:t})}getWalletProvider(){return y.R.state.activeChain?C.O.state.providers[y.R.state.activeChain]:null}getWalletProviderType(){return C.O.getProviderId(y.R.state.activeChain)}subscribeProviders(e){return C.O.subscribeProviders(e)}getThemeMode(){return w.ThemeController.state.themeMode}getThemeVariables(){return w.ThemeController.state.themeVariables}setThemeMode(e){w.ThemeController.setThemeMode(e),(0,z.Hs)(w.ThemeController.state.themeMode)}setTermsConditionsUrl(e){m.OptionsController.setTermsConditionsUrl(e)}setPrivacyPolicyUrl(e){m.OptionsController.setPrivacyPolicyUrl(e)}setThemeVariables(e){w.ThemeController.setThemeVariables(e),(0,z.R)(w.ThemeController.state.themeVariables)}subscribeTheme(e){return w.ThemeController.subscribe(e)}subscribeConnections(e){return this.remoteFeatures.multiWallet?h.ConnectionController.subscribe(e):(v.AlertController.open(o.b.REMOTE_FEATURES_ALERTS.MULTI_WALLET_NOT_ENABLED.DEFAULT,"info"),()=>void 0)}getWalletInfo(e){if(e)return y.R.state.chains.get(e)?.accountState?.connectedWalletInfo;let t=y.R.getAccountData();return t?.connectedWalletInfo}getAccount(e){let t=e||y.R.state.activeChain,r=c.ConnectorController.getAuthConnector(t),i=y.R.getAccountData(t),s=b.M.getConnectedConnectorId(y.R.state.activeChain),a=h.ConnectionController.getConnections(t);if(!t)throw Error("AppKit:getAccount - namespace is required");let d=a.flatMap(e=>e.accounts.map(({address:e,type:r,publicKey:i})=>n.j.createAccount(t,e,r||"eoa",i)));if(i)return{allAccounts:d,caipAddress:i.caipAddress,address:n.j.getPlainAddress(i.caipAddress),isConnected:!!i.caipAddress,status:i.status,embeddedWalletInfo:r&&s===o.b.CONNECTOR_ID.AUTH?{user:i.user?{...i.user,username:b.M.getConnectedSocialUsername()}:void 0,authProvider:i.socialProvider||"email",accountType:(0,l.r9)(t),isSmartAccountDeployed:!!i.smartAccountDeployed}:void 0}}subscribeAccount(e,t){let r=()=>{let r=this.getAccount(t);r&&e(r)};t?y.R.subscribeChainProp("accountState",r,t):y.R.subscribe(r),c.ConnectorController.subscribe(r)}subscribeNetwork(e){return y.R.subscribe(({activeCaipNetwork:t})=>{e({caipNetwork:t,chainId:t?.id,caipNetworkId:t?.caipNetworkId})})}subscribeWalletInfo(e,t){return t?y.R.subscribeChainProp("accountState",t=>e(t?.connectedWalletInfo),t):y.R.subscribeChainProp("accountState",t=>e(t?.connectedWalletInfo))}subscribeShouldUpdateToAddress(e){y.R.subscribeChainProp("accountState",t=>e(t?.shouldUpdateToAddress))}subscribeCaipNetworkChange(e){y.R.subscribeKey("activeCaipNetwork",e)}getState(){return p.I.state}getRemoteFeatures(){return m.OptionsController.state.remoteFeatures}subscribeState(e){return p.I.subscribe(e)}subscribeRemoteFeatures(e){return m.OptionsController.subscribeKey("remoteFeatures",e)}showErrorMessage(e){F.SnackController.showError(e)}showSuccessMessage(e){F.SnackController.showSuccess(e)}getEvent(){return{...d.X.state}}subscribeEvents(e){return d.X.subscribe(e)}replace(e){u.RouterController.replace(e)}redirect(e){u.RouterController.push(e)}popTransactionStack(e){u.RouterController.popTransactionStack(e)}isOpen(){return L.I.state.open}isTransactionStackEmpty(){return 0===u.RouterController.state.transactionStack.length}static getInstance(){return this.instance}updateFeatures(e){m.OptionsController.setFeatures(e)}updateRemoteFeatures(e){m.OptionsController.setRemoteFeatures(e)}updateOptions(e){let t={...m.OptionsController.state||{},...e};m.OptionsController.setOptions(t)}setConnectMethodsOrder(e){m.OptionsController.setConnectMethodsOrder(e)}setWalletFeaturesOrder(e){m.OptionsController.setWalletFeaturesOrder(e)}setCollapseWallets(e){m.OptionsController.setCollapseWallets(e)}setSocialsOrder(e){m.OptionsController.setSocialsOrder(e)}getConnectMethodsOrder(){return W.J.getConnectOrderMethod(m.OptionsController.state.features,c.ConnectorController.getConnectors())}addNetwork(e,t){if(this.chainAdapters&&!this.chainAdapters[e])throw Error(`Adapter for namespace ${e} doesn't exist`);let r=this.extendCaipNetwork(t,this.options);this.getCaipNetworks().find(e=>e.id===r.id)||y.R.addNetwork(r)}removeNetwork(e,t){if(this.chainAdapters&&!this.chainAdapters[e])throw Error(`Adapter for namespace ${e} doesn't exist`);this.getCaipNetworks().find(e=>e.id===t)&&y.R.removeNetwork(e,t)}}let eo=!1;class es extends en{async onAuthProviderConnected(e){let t=E.g.userChainIdToChainNamespace(e?.chainId);if(e.message&&e.signature&&e.siwxMessage&&await a.w.addEmbeddedWalletSession({chainId:e.siwxMessage.chainId,accountAddress:e.address,notBefore:e.siwxMessage.notBefore,statement:e.siwxMessage.statement,resources:e.siwxMessage.resources,requestId:e.siwxMessage.requestId,issuedAt:e.siwxMessage.issuedAt,domain:e.siwxMessage.domain,uri:e.siwxMessage.uri,version:e.siwxMessage.version,nonce:e.siwxMessage.nonce},e.message,e.signature),!t)throw Error("AppKit:onAuthProviderConnected - namespace is required");let r=t===o.b.CHAIN.EVM?`eip155:${e.chainId}:${e.address}`:`${e.chainId}:${e.address}`,i=m.OptionsController.state.defaultAccountTypes[t],n=(0,l.r9)(t),s=e.preferredAccountType||n||i;this.setCaipAddress(r,t);let{signature:c,siwxMessage:d,message:u,...h}=e,p=y.R.getAccountData(t);this.setUser({...p?.user||{},...h},t),this.setSmartAccountDeployed(!!e.smartAccountDeployed,t),this.setPreferredAccountType(s,t),await Promise.all([this.syncAuthConnectorTheme(this.authProvider),this.syncAccount({address:e.address,chainId:e.chainId,chainNamespace:t})]),this.setLoading(!1,t)}setupAuthConnectorListeners(e){e.onRpcRequest(t=>{A.$.checkIfRequestExists(t)?A.$.checkIfRequestIsSafe(t)||this.handleUnsafeRPCRequest():(this.open(),console.error(S.y_.RPC_METHOD_NOT_ALLOWED_MESSAGE,{method:t.method}),setTimeout(()=>{this.showErrorMessage(S.y_.RPC_METHOD_NOT_ALLOWED_UI_MESSAGE)},300),e.rejectRpcRequests())}),e.onRpcError(()=>{this.isOpen()&&(this.isTransactionStackEmpty()?this.close():this.popTransactionStack("error"))}),e.onRpcSuccess((e,t)=>{let r=A.$.checkIfRequestIsSafe(t),i=this.getAddress(),n=y.R.state.activeCaipNetwork;r||(i&&n?.id&&this.updateNativeBalance(i,n.id,n.chainNamespace),this.isTransactionStackEmpty()?this.close():this.popTransactionStack("success"))}),e.onNotConnected(()=>{let e=y.R.state.activeChain;if(!e)throw Error("AppKit:onNotConnected - namespace is required");c.ConnectorController.getConnectorId(e)===o.b.CONNECTOR_ID.AUTH&&(this.setCaipAddress(null,e),this.setLoading(!1,e))}),e.onConnect(this.onAuthProviderConnected.bind(this)),e.onSocialConnected(this.onAuthProviderConnected.bind(this)),e.onSetPreferredAccount(({address:e,type:t})=>{let r=y.R.state.activeChain;if(!r)throw Error("AppKit:onSetPreferredAccount - namespace is required");e&&this.setPreferredAccountType(t,r)})}async syncAuthConnectorTheme(e){if(!e)return;let t=w.ThemeController.getSnapshot();await e.syncTheme({themeMode:t.themeMode,themeVariables:t.themeVariables,w3mThemeVariables:(0,s.t)(t.themeVariables,t.themeMode)})}async syncAuthConnector(e,t){let r=o.b.AUTH_CONNECTOR_SUPPORTED_CHAINS.includes(t),i=t===y.R.state.activeChain;if(!r)return;this.setLoading(!0,t);let n=e.getLoginEmailUsed();this.setLoading(n,t),n&&this.setStatus("connecting",t);let s=e.getEmail(),a=e.getUsername(),l=y.R.getAccountData(t)?.user||{};this.setUser({...l,username:a,email:s},t),this.setupAuthConnectorListeners(e);let{isConnected:h}=await e.isConnected();if(t&&r&&i){if(h&&this.connectionControllerClient?.connectExternal){await e.init(),await this.syncAuthConnectorTheme(e),await this.connectionControllerClient?.connectExternal({id:o.b.CONNECTOR_ID.AUTH,info:{name:o.b.CONNECTOR_ID.AUTH},type:x.b.CONNECTOR_TYPE_AUTH,provider:e,chainId:y.R.getNetworkData(t)?.caipNetwork?.id,chain:t}),this.setStatus("connected",t);let r=b.M.getConnectedSocialProvider();r?d.X.sendEvent({type:"track",event:"SOCIAL_LOGIN_SUCCESS",address:this.getAddress(),properties:{provider:r,reconnect:!0}}):d.X.sendEvent({type:"track",event:"CONNECT_SUCCESS",address:this.getAddress(),properties:{method:"email",name:this.universalProvider?.session?.peer?.metadata?.name||"Unknown",reconnect:!0,view:u.RouterController.state.view,walletRank:void 0}})}else c.ConnectorController.getConnectorId(t)===o.b.CONNECTOR_ID.AUTH&&(this.setStatus("disconnected",t),b.M.removeConnectedNamespace(t))}this.setLoading(!1,t)}async checkExistingTelegramSocialConnection(e){try{if(!n.j.isTelegram())return;let t=b.M.getTelegramSocialProvider();if(!t||!n.j.isClient())return;let r=new URL(window.location.href).searchParams.get("result_uri");if(!r)return;t&&y.R.setAccountProp("socialProvider",t,e),await this.authProvider?.init();let i=c.ConnectorController.getAuthConnector();t&&i&&(this.setLoading(!0,e),await h.ConnectionController.connectExternal({id:i.id,type:i.type,socialUri:r},i.chain),b.M.setConnectedSocialProvider(t),b.M.removeTelegramSocialProvider(),d.X.sendEvent({type:"track",event:"SOCIAL_LOGIN_SUCCESS",properties:{provider:t}}))}catch(t){this.setLoading(!1,e),console.error("checkExistingSTelegramocialConnection error",t)}try{let e=new URL(window.location.href);e.searchParams.delete("result_uri"),window.history.replaceState({},document.title,e.toString())}catch(e){console.error("tma social login failed",e)}}createAuthProvider(e){if(!o.b.AUTH_CONNECTOR_SUPPORTED_CHAINS.includes(e))return;let t=this.remoteFeatures?.email,r=Array.isArray(this.remoteFeatures?.socials)&&this.remoteFeatures.socials.length>0,i=E.g.getActiveNamespaceConnectedToAuth()||e;!this.authProvider&&this.options?.projectId&&(t||r)&&(this.authProvider=I.D.getInstance({projectId:this.options.projectId,enableLogger:this.options.enableAuthLogger,chainId:this.getCaipNetwork(i)?.caipNetworkId,abortController:_.j.EmbeddedWalletAbortController,onTimeout:e=>{"iframe_load_failed"===e?v.AlertController.open(_.j.ALERT_ERRORS.IFRAME_LOAD_FAILED,"error"):"iframe_request_timeout"===e?v.AlertController.open(_.j.ALERT_ERRORS.IFRAME_REQUEST_TIMEOUT,"error"):"unverified_domain"===e&&v.AlertController.open(_.j.ALERT_ERRORS.UNVERIFIED_DOMAIN,"error")},getActiveCaipNetwork:e=>(0,l.eq)(e),getCaipNetworks:e=>y.R.getCaipNetworks(e)}),p.I.subscribeOpen(e=>{!e&&this.isTransactionStackEmpty()&&this.authProvider?.rejectRpcRequests()}));let n=e===y.R.state.activeChain&&m.OptionsController.state.enableReconnect;!1===m.OptionsController.state.enableReconnect?this.syncAuthConnectorTheme(this.authProvider):this.authProvider&&n&&(this.syncAuthConnector(this.authProvider,e),this.checkExistingTelegramSocialConnection(e))}createAuthProviderForAdapter(e){this.createAuthProvider(e),this.authProvider&&this.chainAdapters?.[e]?.setAuthProvider?.(this.authProvider)}initControllers(e){super.initControllers(e),this.options.excludeWalletIds&&f.ApiController.initializeExcludedWallets({ids:this.options.excludeWalletIds})}async switchCaipNetwork(e){if(!e)return;let t=y.R.state.activeChain,r=e.chainNamespace,i=this.getAddressByChainNamespace(r);if(r===t&&y.R.getAccountData(r)?.caipAddress){let t=this.getAdapter(r);await t?.switchNetwork({caipNetwork:e}),this.setCaipNetwork(e)}else{let n=C.O.getProviderId(t)===x.b.CONNECTOR_TYPE_AUTH,s=C.O.getProviderId(r),a=s===x.b.CONNECTOR_TYPE_AUTH,l=o.b.AUTH_CONNECTOR_SUPPORTED_CHAINS.includes(r);if(!r)throw Error("AppKit:switchCaipNetwork - networkNamespace is required");if((n&&void 0===s||a)&&l)try{if(y.R.state.activeChain=e.chainNamespace,i){let t=this.getAdapter(r);await t?.switchNetwork({caipNetwork:e})}else await this.connectionControllerClient?.connectExternal?.({id:o.b.CONNECTOR_ID.AUTH,provider:this.authProvider,chain:r,chainId:e.id,type:x.b.CONNECTOR_TYPE_AUTH,caipNetwork:e});this.setCaipNetwork(e)}catch(i){let t=this.getAdapter(r);await t?.switchNetwork({caipNetwork:e})}else if(s===x.b.CONNECTOR_TYPE_WALLET_CONNECT){if(!y.R.state.noAdapters){let t=this.getAdapter(r);await t?.switchNetwork({caipNetwork:e})}this.setCaipNetwork(e),this.syncWalletConnectAccount()}else this.setCaipNetwork(e),i&&this.syncAccount({address:i,chainId:e.id,chainNamespace:r})}}async initialize(e){await super.initialize(e),this.chainNamespaces?.forEach(e=>{this.createAuthProviderForAdapter(e)}),await this.injectModalUi(),p.I.set({initialized:!0})}async syncIdentity({address:e,chainId:t,chainNamespace:r}){let i=`${r}:${t}`,n=this.caipNetworks?.find(e=>e.caipNetworkId===i);if(n?.testnet){this.setProfileName(null,r),this.setProfileImage(null,r);return}let s=c.ConnectorController.getConnectorId(r)===o.b.CONNECTOR_ID.AUTH;try{let{name:t,avatar:i}=await this.fetchIdentity({address:e});!t&&s?await this.syncReownName(e,r):(this.setProfileName(t,r),this.setProfileImage(i,r))}catch{1!==t&&this.setProfileImage(null,r)}}syncConnectedWalletInfo(e){let t=C.O.getProviderId(e);if(t===x.b.CONNECTOR_TYPE_AUTH){let r=this.authProvider;if(r){let i=b.M.getConnectedSocialProvider()??"email",n=r.getEmail()??r.getUsername();this.setConnectedWalletInfo({name:t,identifier:n,social:i},e)}}else super.syncConnectedWalletInfo(e)}async injectModalUi(){if(n.j.isClient()&&!eo)try{let e={...g.bq.DEFAULT_FEATURES,...this.options.features},t=this.remoteFeatures;if(await this.loadModalComponents(e,t),n.j.isClient()&&!document.querySelector("w3m-modal")){let e=document.createElement("w3m-modal");m.OptionsController.state.disableAppend||m.OptionsController.state.enableEmbedded||document.body.insertAdjacentElement("beforeend",e)}eo=!0}catch(e){console.error("Error injecting modal UI:",e)}}async loadModalComponents(e,t){if(!n.j.isClient())return;let i=[];(t.email||t.socials&&t.socials.length>0)&&i.push(r.e(7354).then(r.bind(r,77354))),t.email&&i.push(r.e(2094).then(r.bind(r,22094))),t.socials&&i.push(r.e(8867).then(r.bind(r,8867))),t.swaps&&t.swaps.length>0&&i.push(Promise.all([r.e(1272),r.e(2523)]).then(r.bind(r,62523))),e.send&&i.push(Promise.all([r.e(1272),r.e(6985)]).then(r.bind(r,76985))),e.receive&&i.push(r.e(4893).then(r.bind(r,94893))),t.onramp&&t.onramp.length>0&&i.push(r.e(4319).then(r.bind(r,84319))),t.payWithExchange&&i.push(r.e(2420).then(r.bind(r,62420))),t.activity&&i.push(r.e(3227).then(r.bind(r,23227))),(e.pay||t.payments)&&i.push(r.e(70).then(r.bind(r,90070))),t.emailCapture&&i.push(r.e(9018).then(r.bind(r,9018))),await Promise.all([...i,Promise.resolve().then(r.bind(r,2789)),Promise.all([r.e(1272),r.e(7767)]).then(r.bind(r,27767))])}}var ea=r(2265);let el=new Set(["children","localName","ref","style","className"]),ec=new WeakMap,ed=(e,t,r,i,n)=>{let o,s;let a=n?.[t];void 0===a?(e[t]=r,null==r&&t in HTMLElement.prototype&&e.removeAttribute(t)):r!==i&&(void 0===(o=ec.get(e))&&ec.set(e,o=new Map),s=o.get(a),void 0!==r?void 0===s?(o.set(a,s={handleEvent:r}),e.addEventListener(a,s)):s.handleEvent=r:void 0!==s&&(o.delete(a),e.removeEventListener(a,s)))},eu=({react:e,tagName:t,elementClass:r,events:i,displayName:n})=>{let o=new Set(Object.keys(i??{})),s=e.forwardRef((n,s)=>{let a=e.useRef(new Map),l=e.useRef(null),c={},d={};for(let[e,t]of Object.entries(n))el.has(e)?c["className"===e?"class":e]=t:o.has(e)||e in r.prototype?d[e]=t:c[e]=t;return e.useLayoutEffect(()=>{if(null===l.current)return;let e=new Map;for(let t in d)ed(l.current,t,n[t],a.current.get(t),i),a.current.delete(t),e.set(t,n[t]);for(let[e,t]of a.current)ed(l.current,e,void 0,t,i);a.current=e}),e.useLayoutEffect(()=>{l.current?.removeAttribute("defer-hydration")},[]),c.suppressHydrationWarning=!0,e.createElement(t,{...c,ref:e.useCallback(e=>{l.current=e,"function"==typeof s?s(e):null!==s&&(s.current=e)},[s])})});return s.displayName=n??r.name,s};var eh=r(2789);eu({tagName:"appkit-button",elementClass:eh.AppKitButton,react:ea}),eu({tagName:"appkit-network-button",elementClass:eh.AppKitNetworkButton,react:ea}),eu({tagName:"appkit-connect-button",elementClass:eh.AppKitConnectButton,react:ea}),eu({tagName:"appkit-account-button",elementClass:eh.AppKitAccountButton,react:ea});let ep=null;function ef({children:e,...t}){return ep||(ep=eg(t)),e}function eg(e){return i||(i=new es({...e,sdkVersion:n.j.generateSdkVersion(e.adapters??[],"react","1.8.15")})),i}},78008:function(e,t,r){"use strict";r.d(t,{D:function(){return o}});var i=r(5688),n=r(55);class o{constructor(){}static getInstance({projectId:e,chainId:t,enableLogger:r,onTimeout:s,abortController:a,getActiveCaipNetwork:l,getCaipNetworks:c}){let{metadata:d,sdkVersion:u,sdkType:h}=i.OptionsController.getSnapshot();return o.instance||(o.instance=new n.S({projectId:e,chainId:t,enableLogger:r,onTimeout:s,abortController:a,getActiveCaipNetwork:l,getCaipNetworks:c,enableCloudAuthAccount:!!i.OptionsController.state.remoteFeatures?.emailCapture,metadata:d,sdkVersion:u,sdkType:h})),o.instance}}},21623:function(e,t,r){"use strict";r.d(t,{S:function(){return g}});var i=r(45345),n=r(21733),o=r(18238),s=r(24112),a=class extends s.l{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,r){let o=t.queryKey,s=t.queryHash??(0,i.Rm)(o,t),a=this.get(s);return a||(a=new n.A({client:e,queryKey:o,queryHash:s,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(o)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){o.Vr.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,i._x)(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>(0,i._x)(e,t)):t}notify(e){o.Vr.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){o.Vr.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){o.Vr.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},l=r(2894),c=class extends s.l{constructor(e={}){super(),this.config=e,this.#t=new Set,this.#r=new Map,this.#i=0}#t;#r;#i;build(e,t,r){let i=new l.m({client:e,mutationCache:this,mutationId:++this.#i,options:e.defaultMutationOptions(t),state:r});return this.add(i),i}add(e){this.#t.add(e);let t=d(e);if("string"==typeof t){let r=this.#r.get(t);r?r.push(e):this.#r.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#t.delete(e)){let t=d(e);if("string"==typeof t){let r=this.#r.get(t);if(r){if(r.length>1){let t=r.indexOf(e);-1!==t&&r.splice(t,1)}else r[0]===e&&this.#r.delete(t)}}}this.notify({type:"removed",mutation:e})}canRun(e){let t=d(e);if("string"!=typeof t)return!0;{let r=this.#r.get(t),i=r?.find(e=>"pending"===e.state.status);return!i||i===e}}runNext(e){let t=d(e);if("string"!=typeof t)return Promise.resolve();{let r=this.#r.get(t)?.find(t=>t!==e&&t.state.isPaused);return r?.continue()??Promise.resolve()}}clear(){o.Vr.batch(()=>{this.#t.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#t.clear(),this.#r.clear()})}getAll(){return Array.from(this.#t)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,i.X7)(t,e))}findAll(e={}){return this.getAll().filter(t=>(0,i.X7)(e,t))}notify(e){o.Vr.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return o.Vr.batch(()=>Promise.all(e.map(e=>e.continue().catch(i.ZT))))}};function d(e){return e.options.scope?.id}var u=r(87045),h=r(57853);function p(e){return{onFetch:(t,r)=>{let n=t.options,o=t.fetchOptions?.meta?.fetchMore?.direction,s=t.state.data?.pages||[],a=t.state.data?.pageParams||[],l={pages:[],pageParams:[]},c=0,d=async()=>{let r=!1,d=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(t.signal.aborted?r=!0:t.signal.addEventListener("abort",()=>{r=!0}),t.signal)})},u=(0,i.cG)(t.options,t.fetchOptions),h=async(e,n,o)=>{if(r)return Promise.reject();if(null==n&&e.pages.length)return Promise.resolve(e);let s=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:n,direction:o?"backward":"forward",meta:t.options.meta};return d(e),e})(),a=await u(s),{maxPages:l}=t.options,c=o?i.Ht:i.VX;return{pages:c(e.pages,a,l),pageParams:c(e.pageParams,n,l)}};if(o&&s.length){let e="backward"===o,t={pages:s,pageParams:a},r=(e?function(e,{pages:t,pageParams:r}){return t.length>0?e.getPreviousPageParam?.(t[0],t,r[0],r):void 0}:f)(n,t);l=await h(t,r,e)}else{let t=e??s.length;do{let e=0===c?a[0]??n.initialPageParam:f(n,l);if(c>0&&null==e)break;l=await h(l,e),c++}while(ct.options.persister?.(d,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r):t.fetchFn=d}}}function f(e,{pages:t,pageParams:r}){let i=t.length-1;return t.length>0?e.getNextPageParam(t[i],t,r[i],r):void 0}var g=class{#n;#o;#s;#a;#l;#c;#d;#u;constructor(e={}){this.#n=e.queryCache||new a,this.#o=e.mutationCache||new c,this.#s=e.defaultOptions||{},this.#a=new Map,this.#l=new Map,this.#c=0}mount(){this.#c++,1===this.#c&&(this.#d=u.j.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#n.onFocus())}),this.#u=h.N.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#n.onOnline())}))}unmount(){this.#c--,0===this.#c&&(this.#d?.(),this.#d=void 0,this.#u?.(),this.#u=void 0)}isFetching(e){return this.#n.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#o.findAll({...e,status:"pending"}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#n.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),r=this.#n.build(this,t),n=r.state.data;return void 0===n?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime((0,i.KC)(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return this.#n.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,r){let n=this.defaultQueryOptions({queryKey:e}),o=this.#n.get(n.queryHash),s=o?.state.data,a=(0,i.SE)(t,s);if(void 0!==a)return this.#n.build(this,n).setData(a,{...r,manual:!0})}setQueriesData(e,t,r){return o.Vr.batch(()=>this.#n.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,r)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#n.get(t.queryHash)?.state}removeQueries(e){let t=this.#n;o.Vr.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let r=this.#n;return o.Vr.batch(()=>(r.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){let r={revert:!0,...t};return Promise.all(o.Vr.batch(()=>this.#n.findAll(e).map(e=>e.cancel(r)))).then(i.ZT).catch(i.ZT)}invalidateQueries(e,t={}){return o.Vr.batch(()=>(this.#n.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType==="none")?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t))}refetchQueries(e,t={}){let r={...t,cancelRefetch:t.cancelRefetch??!0};return Promise.all(o.Vr.batch(()=>this.#n.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,r);return r.throwOnError||(t=t.catch(i.ZT)),"paused"===e.state.fetchStatus?Promise.resolve():t}))).then(i.ZT)}fetchQuery(e){let t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);let r=this.#n.build(this,t);return r.isStaleByTime((0,i.KC)(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(i.ZT).catch(i.ZT)}fetchInfiniteQuery(e){return e.behavior=p(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(i.ZT).catch(i.ZT)}ensureInfiniteQueryData(e){return e.behavior=p(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return h.N.isOnline()?this.#o.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#n}getMutationCache(){return this.#o}getDefaultOptions(){return this.#s}setDefaultOptions(e){this.#s=e}setQueryDefaults(e,t){this.#a.set((0,i.Ym)(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#a.values()],r={};return t.forEach(t=>{(0,i.to)(e,t.queryKey)&&Object.assign(r,t.defaultOptions)}),r}setMutationDefaults(e,t){this.#l.set((0,i.Ym)(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#l.values()],r={};return t.forEach(t=>{(0,i.to)(e,t.mutationKey)&&Object.assign(r,t.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#s.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=(0,i.Rm)(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===i.CN&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#s.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#n.clear(),this.#o.clear()}}},53738:function(e,t,r){"use strict";function i(e){return e}r.d(t,{K:function(){return i}})},14478:function(e,t,r){"use strict";r.d(t,{M:function(){return n},O:function(){return o}});var i=r(26129);class n extends i.G{constructor(){super("Provider not found."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"ProviderNotFoundError"})}}class o extends i.G{constructor({connector:e}){super(`"${e.name}" does not support programmatic chain switching.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"SwitchChainNotSupportedError"})}}},68642:function(e,t,r){"use strict";let i;r.d(t,{Z:function(){return wS}});var n={};r.r(n),r.d(n,{identity:function(){return sn}});var o={};r.r(o),r.d(o,{base2:function(){return so}});var s={};r.r(s),r.d(s,{base8:function(){return ss}});var a={};r.r(a),r.d(a,{base10:function(){return sa}});var l={};r.r(l),r.d(l,{base16:function(){return sl},base16upper:function(){return sc}});var c={};r.r(c),r.d(c,{base32:function(){return sd},base32hex:function(){return sf},base32hexpad:function(){return sm},base32hexpadupper:function(){return sy},base32hexupper:function(){return sg},base32pad:function(){return sh},base32padupper:function(){return sp},base32upper:function(){return su},base32z:function(){return sw}});var d={};r.r(d),r.d(d,{base36:function(){return sb},base36upper:function(){return sv}});var u={};r.r(u),r.d(u,{base58btc:function(){return sC},base58flickr:function(){return sE}});var h={};r.r(h),r.d(h,{base64:function(){return sx},base64pad:function(){return s_},base64url:function(){return sA},base64urlpad:function(){return sS}});var p={};r.r(p),r.d(p,{base256emoji:function(){return sR}});var f={};r.r(f),r.d(f,{sha256:function(){return sz},sha512:function(){return sH}});var g={};r.r(g),r.d(g,{identity:function(){return sq}});var m={};r.r(m),r.d(m,{code:function(){return sK},decode:function(){return sG},encode:function(){return sZ},name:function(){return sV}});var y={};r.r(y),r.d(y,{code:function(){return sQ},decode:function(){return s1},encode:function(){return s0},name:function(){return sX}});var w=r(55445),b=r(40537);class v{}class C extends v{constructor(e){super()}}let E=b.FIVE_SECONDS,x="heartbeat_pulse";class _ extends C{constructor(e){super(e),this.events=new w.EventEmitter,this.interval=E,this.interval=e?.interval||E}static async init(e){let t=new _(e);return await t.init(),t}async init(){await this.initialize()}stop(){clearInterval(this.intervalRef)}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async initialize(){this.intervalRef=setInterval(()=>this.pulse(),(0,b.toMiliseconds)(this.interval))}pulse(){this.events.emit(x)}}let A=/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,S=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,I=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/;function N(e,t){if("__proto__"===e||"constructor"===e&&t&&"object"==typeof t&&"prototype"in t){console.warn(`[destr] Dropping "${e}" key to prevent prototype pollution.`);return}return t}function k(e,t={}){if("string"!=typeof e)return e;if('"'===e[0]&&'"'===e[e.length-1]&&-1===e.indexOf("\\"))return e.slice(1,-1);let r=e.trim();if(r.length<=9)switch(r.toLowerCase()){case"true":return!0;case"false":return!1;case"undefined":return;case"null":return null;case"nan":return Number.NaN;case"infinity":return Number.POSITIVE_INFINITY;case"-infinity":return Number.NEGATIVE_INFINITY}if(!I.test(e)){if(t.strict)throw SyntaxError("[destr] Invalid JSON");return e}try{if(A.test(e)||S.test(e)){if(t.strict)throw Error("[destr] Possible prototype pollution");return JSON.parse(e,N)}return JSON.parse(e)}catch(r){if(t.strict)throw r;return e}}var R=r(82957).lW;function O(e,...t){try{var r;return(r=e(...t))&&"function"==typeof r.then?r:Promise.resolve(r)}catch(e){return Promise.reject(e)}}function T(e){if(function(e){let t=typeof e;return null===e||"object"!==t&&"function"!==t}(e))return String(e);if(function(e){let t=Object.getPrototypeOf(e);return!t||t.isPrototypeOf(Object)}(e)||Array.isArray(e))return JSON.stringify(e);if("function"==typeof e.toJSON)return T(e.toJSON());throw Error("[unstorage] Cannot stringify value!")}let P="base64:";function $(e){return e&&e.split("?")[0]?.replace(/[/\\]/g,":").replace(/:+/g,":").replace(/^:|:$/g,"")||""}function D(e){return(e=$(e))?e+":":""}let U=()=>{let e=new Map;return{name:"memory",getInstance:()=>e,hasItem:t=>e.has(t),getItem:t=>e.get(t)??null,getItemRaw:t=>e.get(t)??null,setItem(t,r){e.set(t,r)},setItemRaw(t,r){e.set(t,r)},removeItem(t){e.delete(t)},getKeys:()=>[...e.keys()],clear(){e.clear()},dispose(){e.clear()}}};function L(e,t,r){return e.watch?e.watch((e,i)=>t(e,r+i)):()=>{}}async function M(e){"function"==typeof e.dispose&&await O(e.dispose)}var B=r(27600),j=r(80577),F=(e={})=>{let t;let r=e.base&&e.base.length>0?`${e.base}:`:"",i=e=>r+e;return e.dbName&&e.storeName&&(t=(0,B.MT)(e.dbName,e.storeName)),{name:"idb-keyval",options:e,hasItem:async e=>!(typeof await (0,B.U2)(i(e),t)>"u"),getItem:async e=>await (0,B.U2)(i(e),t)??null,setItem:(e,r)=>(0,B.t8)(i(e),r,t),removeItem:e=>(0,B.IV)(i(e),t),getKeys:()=>(0,B.XP)(t),clear:()=>(0,B.ZH)(t)}};class W{constructor(){this.indexedDb=function(e={}){let t={mounts:{"":e.driver||U()},mountpoints:[""],watching:!1,watchListeners:[],unwatch:{}},r=e=>{for(let r of t.mountpoints)if(e.startsWith(r))return{base:r,relativeKey:e.slice(r.length),driver:t.mounts[r]};return{base:"",relativeKey:e,driver:t.mounts[""]}},i=(e,r)=>t.mountpoints.filter(t=>t.startsWith(e)||r&&e.startsWith(t)).map(r=>({relativeBase:e.length>r.length?e.slice(r.length):void 0,mountpoint:r,driver:t.mounts[r]})),n=(e,r)=>{if(t.watching)for(let i of(r=$(r),t.watchListeners))i(e,r)},o=async()=>{if(!t.watching)for(let e in t.watching=!0,t.mounts)t.unwatch[e]=await L(t.mounts[e],n,e)},s=async()=>{if(t.watching){for(let e in t.unwatch)await t.unwatch[e]();t.unwatch={},t.watching=!1}},a=(e,t,i)=>{let n=new Map,o=e=>{let t=n.get(e.base);return t||(t={driver:e.driver,base:e.base,items:[]},n.set(e.base,t)),t};for(let i of e){let e="string"==typeof i,n=$(e?i:i.key),s=e?void 0:i.value,a=e||!i.options?t:{...t,...i.options},l=r(n);o(l).items.push({key:n,value:s,relativeKey:l.relativeKey,options:a})}return Promise.all([...n.values()].map(e=>i(e))).then(e=>e.flat())},l={hasItem(e,t={}){let{relativeKey:i,driver:n}=r(e=$(e));return O(n.hasItem,i,t)},getItem(e,t={}){let{relativeKey:i,driver:n}=r(e=$(e));return O(n.getItem,i,t).then(e=>k(e))},getItems:(e,t={})=>a(e,t,e=>e.driver.getItems?O(e.driver.getItems,e.items.map(e=>({key:e.relativeKey,options:e.options})),t).then(t=>t.map(t=>({key:function(...e){return $(e.join(":"))}(e.base,t.key),value:k(t.value)}))):Promise.all(e.items.map(t=>O(e.driver.getItem,t.relativeKey,t.options).then(e=>({key:t.key,value:k(e)}))))),getItemRaw(e,t={}){let{relativeKey:i,driver:n}=r(e=$(e));return n.getItemRaw?O(n.getItemRaw,i,t):O(n.getItem,i,t).then(e=>{var t;return"string"==typeof e&&e.startsWith(P)?(t=e.slice(P.length),globalThis.Buffer?R.from(t,"base64"):Uint8Array.from(globalThis.atob(t),e=>e.codePointAt(0))):e})},async setItem(e,t,i={}){if(void 0===t)return l.removeItem(e);let{relativeKey:o,driver:s}=r(e=$(e));s.setItem&&(await O(s.setItem,o,T(t),i),s.watch||n("update",e))},async setItems(e,t){await a(e,t,async e=>{if(e.driver.setItems)return O(e.driver.setItems,e.items.map(e=>({key:e.relativeKey,value:T(e.value),options:e.options})),t);e.driver.setItem&&await Promise.all(e.items.map(t=>O(e.driver.setItem,t.relativeKey,T(t.value),t.options)))})},async setItemRaw(e,t,i={}){if(void 0===t)return l.removeItem(e,i);let{relativeKey:o,driver:s}=r(e=$(e));if(s.setItemRaw)await O(s.setItemRaw,o,t,i);else{if(!s.setItem)return;await O(s.setItem,o,"string"==typeof t?t:P+(globalThis.Buffer?R.from(t).toString("base64"):globalThis.btoa(String.fromCodePoint(...t))),i)}s.watch||n("update",e)},async removeItem(e,t={}){"boolean"==typeof t&&(t={removeMeta:t});let{relativeKey:i,driver:o}=r(e=$(e));o.removeItem&&(await O(o.removeItem,i,t),(t.removeMeta||t.removeMata)&&await O(o.removeItem,i+"$",t),o.watch||n("remove",e))},async getMeta(e,t={}){"boolean"==typeof t&&(t={nativeOnly:t});let{relativeKey:i,driver:n}=r(e=$(e)),o=Object.create(null);if(n.getMeta&&Object.assign(o,await O(n.getMeta,i,t)),!t.nativeOnly){let e=await O(n.getItem,i+"$",t).then(e=>k(e));e&&"object"==typeof e&&("string"==typeof e.atime&&(e.atime=new Date(e.atime)),"string"==typeof e.mtime&&(e.mtime=new Date(e.mtime)),Object.assign(o,e))}return o},setMeta(e,t,r={}){return this.setItem(e+"$",t,r)},removeMeta(e,t={}){return this.removeItem(e+"$",t)},async getKeys(e,t={}){let r=i(e=D(e),!0),n=[],o=[],s=!0;for(let e of r){for(let r of(e.driver.flags?.maxDepth||(s=!1),await O(e.driver.getKeys,e.relativeBase,t))){let t=e.mountpoint+$(r);n.some(e=>t.startsWith(e))||o.push(t)}n=[e.mountpoint,...n.filter(t=>!t.startsWith(e.mountpoint))]}let a=void 0!==t.maxDepth&&!s;return o.filter(r=>{var i;return(!a||function(e,t){if(void 0===t)return!0;let r=0,i=e.indexOf(":");for(;i>-1;)r++,i=e.indexOf(":",i+1);return r<=t}(r,t.maxDepth))&&((i=e)?r.startsWith(i)&&"$"!==r[r.length-1]:"$"!==r[r.length-1])})},async clear(e,t={}){e=D(e),await Promise.all(i(e,!1).map(async e=>e.driver.clear?O(e.driver.clear,e.relativeBase,t):e.driver.removeItem?Promise.all((await e.driver.getKeys(e.relativeBase||"",t)).map(r=>e.driver.removeItem(r,t))):void 0))},async dispose(){await Promise.all(Object.values(t.mounts).map(e=>M(e)))},watch:async e=>(await o(),t.watchListeners.push(e),async()=>{t.watchListeners=t.watchListeners.filter(t=>t!==e),0===t.watchListeners.length&&await s()}),async unwatch(){t.watchListeners=[],await s()},mount(e,r){if((e=D(e))&&t.mounts[e])throw Error(`already mounted at ${e}`);return e&&(t.mountpoints.push(e),t.mountpoints.sort((e,t)=>t.length-e.length)),t.mounts[e]=r,t.watching&&Promise.resolve(L(r,n,e)).then(r=>{t.unwatch[e]=r}).catch(console.error),l},async unmount(e,r=!0){(e=D(e))&&t.mounts[e]&&(t.watching&&e in t.unwatch&&(t.unwatch[e]?.(),delete t.unwatch[e]),r&&await M(t.mounts[e]),t.mountpoints=t.mountpoints.filter(t=>t!==e),delete t.mounts[e])},getMount(e=""){let t=r(e=$(e)+":");return{driver:t.driver,base:t.base}},getMounts:(e="",t={})=>i(e=$(e),t.parents).map(e=>({driver:e.driver,base:e.mountpoint})),keys:(e,t={})=>l.getKeys(e,t),get:(e,t={})=>l.getItem(e,t),set:(e,t,r={})=>l.setItem(e,t,r),has:(e,t={})=>l.hasItem(e,t),del:(e,t={})=>l.removeItem(e,t),remove:(e,t={})=>l.removeItem(e,t)};return l}({driver:F({dbName:"WALLET_CONNECT_V2_INDEXED_DB",storeName:"keyvaluestorage"})})}async getKeys(){return this.indexedDb.getKeys()}async getEntries(){return(await this.indexedDb.getItems(await this.indexedDb.getKeys())).map(e=>[e.key,e.value])}async getItem(e){let t=await this.indexedDb.getItem(e);if(null!==t)return t}async setItem(e,t){await this.indexedDb.setItem(e,(0,j.u)(t))}async removeItem(e){await this.indexedDb.removeItem(e)}}var z="u">typeof globalThis?globalThis:"u">typeof window?window:"u">typeof r.g?r.g:"u">typeof self?self:{},H={exports:{}};function q(e){var t;return[e[0],(0,j.D)(null!=(t=e[1])?t:"")]}!function(){function e(){}e.prototype.getItem=function(e){return this.hasOwnProperty(e)?String(this[e]):null},e.prototype.setItem=function(e,t){this[e]=String(t)},e.prototype.removeItem=function(e){delete this[e]},e.prototype.clear=function(){let e=this;Object.keys(e).forEach(function(t){e[t]=void 0,delete e[t]})},e.prototype.key=function(e){return e=e||0,Object.keys(this)[e]},e.prototype.__defineGetter__("length",function(){return Object.keys(this).length}),"u">typeof z&&z.localStorage?H.exports=z.localStorage:"u">typeof window&&window.localStorage?H.exports=window.localStorage:H.exports=new e}();class V{constructor(){this.localStorage=H.exports}async getKeys(){return Object.keys(this.localStorage)}async getEntries(){return Object.entries(this.localStorage).map(q)}async getItem(e){let t=this.localStorage.getItem(e);if(null!==t)return(0,j.D)(t)}async setItem(e,t){this.localStorage.setItem(e,(0,j.u)(t))}async removeItem(e){this.localStorage.removeItem(e)}}let K=async(e,t,r)=>{let i="wc_storage_version",n=await t.getItem(i);if(n&&n>=1){r(t);return}let o=await e.getKeys();if(!o.length){r(t);return}let s=[];for(;o.length;){let r=o.shift();if(!r)continue;let i=r.toLowerCase();if(i.includes("wc@")||i.includes("walletconnect")||i.includes("wc_")||i.includes("wallet_connect")){let i=await e.getItem(r);await t.setItem(r,i),s.push(r)}}await t.setItem(i,1),r(t),Z(e,s)},Z=async(e,t)=>{t.length&&t.forEach(async t=>{await e.removeItem(t)})};class G{constructor(){this.initialized=!1,this.setInitialized=e=>{this.storage=e,this.initialized=!0};let e=new V;this.storage=e;try{let t=new W;K(e,t,this.setInitialized)}catch{this.initialized=!0}}async getKeys(){return await this.initialize(),this.storage.getKeys()}async getEntries(){return await this.initialize(),this.storage.getEntries()}async getItem(e){return await this.initialize(),this.storage.getItem(e)}async setItem(e,t){return await this.initialize(),this.storage.setItem(e,t)}async removeItem(e){return await this.initialize(),this.storage.removeItem(e)}async initialize(){this.initialized||await new Promise(e=>{let t=setInterval(()=>{this.initialized&&(clearInterval(t),e())},20)})}}var Y=r(15133),J=Object.defineProperty,X=(e,t,r)=>t in e?J(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Q=(e,t,r)=>X(e,"symbol"!=typeof t?t+"":t,r);class ee extends v{constructor(e){super(),this.opts=e,Q(this,"protocol","wc"),Q(this,"version",2)}}var et=Object.defineProperty,er=(e,t,r)=>t in e?et(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ei=(e,t,r)=>er(e,"symbol"!=typeof t?t+"":t,r);class en extends v{constructor(e,t){super(),this.core=e,this.logger=t,ei(this,"records",new Map)}}class eo{constructor(e,t){this.logger=e,this.core=t}}class es extends v{constructor(e,t){super(),this.relayer=e,this.logger=t}}class ea extends v{constructor(e){super()}}class el{constructor(e,t,r,i){this.core=e,this.logger=t,this.name=r}}class ec extends v{constructor(e,t){super(),this.relayer=e,this.logger=t}}class ed extends v{constructor(e,t){super(),this.core=e,this.logger=t}}class eu{constructor(e,t,r){this.core=e,this.logger=t,this.store=r}}class eh{constructor(e,t){this.projectId=e,this.logger=t}}class ep{constructor(e,t,r){this.core=e,this.logger=t,this.telemetryEnabled=r}}var ef=Object.defineProperty,eg=(e,t,r)=>t in e?ef(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,em=(e,t,r)=>eg(e,"symbol"!=typeof t?t+"":t,r);class ey{constructor(e){this.opts=e,em(this,"protocol","wc"),em(this,"version",2)}}class ew{constructor(e){this.client=e}}function eb(e,...t){if(!(e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name))throw Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw Error("Uint8Array expected of length "+t+", got length="+e.length)}function ev(e,t=!0){if(e.destroyed)throw Error("Hash instance has been destroyed");if(t&&e.finished)throw Error("Hash#digest() has already been called")}let eC="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0,eE=e=>new DataView(e.buffer,e.byteOffset,e.byteLength);function ex(e){return"string"==typeof e&&(e=function(e){if("string"!=typeof e)throw Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array(new TextEncoder().encode(e))}(e)),eb(e),e}class e_{clone(){return this._cloneInto()}}function eA(e=32){if(eC&&"function"==typeof eC.getRandomValues)return eC.getRandomValues(new Uint8Array(e));if(eC&&"function"==typeof eC.randomBytes)return eC.randomBytes(e);throw Error("crypto.getRandomValues must be defined")}class eS extends e_{constructor(e,t,r,i){super(),this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=i,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=eE(this.buffer)}update(e){ev(this);let{view:t,buffer:r,blockLen:i}=this,n=(e=ex(e)).length;for(let o=0;oi-o&&(this.process(r,0),o=0);for(let e=o;e>n&o),a=Number(r&o),l=i?4:0,c=i?0:4;e.setUint32(t+l,s,i),e.setUint32(t+c,a,i)})(r,i-8,BigInt(8*this.length),n),this.process(r,0);let s=eE(e),a=this.outputLen;if(a%4)throw Error("_sha2: outputLen should be aligned to 32bit");let l=a/4,c=this.get();if(l>c.length)throw Error("_sha2: outputLen bigger than state");for(let e=0;e>eN&eI)}:{h:0|Number(e>>eN&eI),l:0|Number(e&eI)}}(e[n],t);[r[n],i[n]]=[o,s]}return[r,i]},shrSH:(e,t,r)=>e>>>r,shrSL:(e,t,r)=>e<<32-r|t>>>r,rotrSH:(e,t,r)=>e>>>r|t<<32-r,rotrSL:(e,t,r)=>e<<32-r|t>>>r,rotrBH:(e,t,r)=>e<<64-r|t>>>r-32,rotrBL:(e,t,r)=>e>>>r-32|t<<64-r,add:function(e,t,r,i){let n=(t>>>0)+(i>>>0);return{h:e+r+(n/4294967296|0)|0,l:0|n}},add3L:(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0),add3H:(e,t,r,i)=>t+r+i+(e/4294967296|0)|0,add4L:(e,t,r,i)=>(e>>>0)+(t>>>0)+(r>>>0)+(i>>>0),add4H:(e,t,r,i,n)=>t+r+i+n+(e/4294967296|0)|0,add5H:(e,t,r,i,n,o)=>t+r+i+n+o+(e/4294967296|0)|0,add5L:(e,t,r,i,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(i>>>0)+(n>>>0)},[eR,eO]=ek.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))),eT=new Uint32Array(80),eP=new Uint32Array(80);class e$ extends eS{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){let{Ah:e,Al:t,Bh:r,Bl:i,Ch:n,Cl:o,Dh:s,Dl:a,Eh:l,El:c,Fh:d,Fl:u,Gh:h,Gl:p,Hh:f,Hl:g}=this;return[e,t,r,i,n,o,s,a,l,c,d,u,h,p,f,g]}set(e,t,r,i,n,o,s,a,l,c,d,u,h,p,f,g){this.Ah=0|e,this.Al=0|t,this.Bh=0|r,this.Bl=0|i,this.Ch=0|n,this.Cl=0|o,this.Dh=0|s,this.Dl=0|a,this.Eh=0|l,this.El=0|c,this.Fh=0|d,this.Fl=0|u,this.Gh=0|h,this.Gl=0|p,this.Hh=0|f,this.Hl=0|g}process(e,t){for(let r=0;r<16;r++,t+=4)eT[r]=e.getUint32(t),eP[r]=e.getUint32(t+=4);for(let e=16;e<80;e++){let t=0|eT[e-15],r=0|eP[e-15],i=ek.rotrSH(t,r,1)^ek.rotrSH(t,r,8)^ek.shrSH(t,r,7),n=ek.rotrSL(t,r,1)^ek.rotrSL(t,r,8)^ek.shrSL(t,r,7),o=0|eT[e-2],s=0|eP[e-2],a=ek.rotrSH(o,s,19)^ek.rotrBH(o,s,61)^ek.shrSH(o,s,6),l=ek.rotrSL(o,s,19)^ek.rotrBL(o,s,61)^ek.shrSL(o,s,6),c=ek.add4L(n,l,eP[e-7],eP[e-16]),d=ek.add4H(c,i,a,eT[e-7],eT[e-16]);eT[e]=0|d,eP[e]=0|c}let{Ah:r,Al:i,Bh:n,Bl:o,Ch:s,Cl:a,Dh:l,Dl:c,Eh:d,El:u,Fh:h,Fl:p,Gh:f,Gl:g,Hh:m,Hl:y}=this;for(let e=0;e<80;e++){let t=ek.rotrSH(d,u,14)^ek.rotrSH(d,u,18)^ek.rotrBH(d,u,41),w=ek.rotrSL(d,u,14)^ek.rotrSL(d,u,18)^ek.rotrBL(d,u,41),b=d&h^~d&f,v=u&p^~u&g,C=ek.add5L(y,w,v,eO[e],eP[e]),E=ek.add5H(C,m,t,b,eR[e],eT[e]),x=0|C,_=ek.rotrSH(r,i,28)^ek.rotrBH(r,i,34)^ek.rotrBH(r,i,39),A=ek.rotrSL(r,i,28)^ek.rotrBL(r,i,34)^ek.rotrBL(r,i,39),S=r&n^r&s^n&s,I=i&o^i&a^o&a;m=0|f,y=0|g,f=0|h,g=0|p,h=0|d,p=0|u,({h:d,l:u}=ek.add(0|l,0|c,0|E,0|x)),l=0|s,c=0|a,s=0|n,a=0|o,n=0|r,o=0|i;let N=ek.add3L(x,A,I);r=ek.add3H(N,E,_,S),i=0|N}({h:r,l:i}=ek.add(0|this.Ah,0|this.Al,0|r,0|i)),({h:n,l:o}=ek.add(0|this.Bh,0|this.Bl,0|n,0|o)),({h:s,l:a}=ek.add(0|this.Ch,0|this.Cl,0|s,0|a)),({h:l,l:c}=ek.add(0|this.Dh,0|this.Dl,0|l,0|c)),({h:d,l:u}=ek.add(0|this.Eh,0|this.El,0|d,0|u)),({h:h,l:p}=ek.add(0|this.Fh,0|this.Fl,0|h,0|p)),({h:f,l:g}=ek.add(0|this.Gh,0|this.Gl,0|f,0|g)),({h:m,l:y}=ek.add(0|this.Hh,0|this.Hl,0|m,0|y)),this.set(r,i,n,o,s,a,l,c,d,u,h,p,f,g,m,y)}roundClean(){eT.fill(0),eP.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}let eD=function(e){let t=t=>e().update(ex(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}(()=>new e$),eU=BigInt(0),eL=BigInt(1),eM=BigInt(2);function eB(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name}function ej(e){if(!eB(e))throw Error("Uint8Array expected")}function eF(e,t){if("boolean"!=typeof t)throw Error(e+" boolean expected, got "+t)}let eW=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function ez(e){ej(e);let t="";for(let r=0;r=eq._0&&e<=eq._9?e-eq._0:e>=eq.A&&e<=eq.F?e-(eq.A-10):e>=eq.a&&e<=eq.f?e-(eq.a-10):void 0}function eK(e){if("string"!=typeof e)throw Error("hex string expected, got "+typeof e);let t=e.length,r=t/2;if(t%2)throw Error("hex string expected, got unpadded hex of length "+t);let i=new Uint8Array(r);for(let t=0,n=0;t"bigint"==typeof e&&eU<=e;function e0(e,t,r,i){if(!(eQ(t)&&eQ(r)&&eQ(i))||!(r<=t)||!(t(eM<"bigint"==typeof e,function:e=>"function"==typeof e,boolean:e=>"boolean"==typeof e,string:e=>"string"==typeof e,stringOrUint8Array:e=>"string"==typeof e||eB(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>"function"==typeof e&&Number.isSafeInteger(e.outputLen)};function e3(e,t,r={}){let i=(t,r,i)=>{let n=e2[r];if("function"!=typeof n)throw Error("invalid validator function");let o=e[t];if(!(i&&void 0===o)&&!n(o,e))throw Error("param "+String(t)+" is invalid. Expected "+r+", got "+o)};for(let[e,r]of Object.entries(t))i(e,r,!1);for(let[e,t]of Object.entries(r))i(e,t,!0);return e}function e5(e){let t=new WeakMap;return(r,...i)=>{let n=t.get(r);if(void 0!==n)return n;let o=e(r,...i);return t.set(r,o),o}}let e4=BigInt(0),e6=BigInt(1),e8=BigInt(2),e9=BigInt(3),e7=BigInt(4),te=BigInt(5),tt=BigInt(8);function tr(e,t){let r=e%t;return r>=e4?r:t+r}function ti(e,t,r){let i=e;for(;t-- >e4;)i*=i,i%=r;return i}function tn(e,t){if(e===e4)throw Error("invert: expected non-zero number");if(t<=e4)throw Error("invert: expected positive modulus, got "+t);let r=tr(e,t),i=t,n=e4,o=e6;for(;r!==e4;){let e=i/r,t=i%r,s=n-o*e;i=r,r=t,n=o,o=s}if(i!==e6)throw Error("invert: does not exist");return tr(n,t)}let to=(e,t)=>(tr(e,t)&e6)===e6,ts=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function ta(e,t){let r=void 0!==t?t:e.toString(2).length;return{nBitLength:r,nByteLength:Math.ceil(r/8)}}function tl(e,t,r=!1,i={}){let n;if(e<=e4)throw Error("invalid field: expected ORDER > 0, got "+e);let{nBitLength:o,nByteLength:s}=ta(e,t);if(s>2048)throw Error("invalid field: expected ORDER of <= 2048 bytes");let a=Object.freeze({ORDER:e,isLE:r,BITS:o,BYTES:s,MASK:e1(o),ZERO:e4,ONE:e6,create:t=>tr(t,e),isValid:t=>{if("bigint"!=typeof t)throw Error("invalid field element: expected bigint, got "+typeof t);return e4<=t&&te===e4,isOdd:e=>(e&e6)===e6,neg:t=>tr(-t,e),eql:(e,t)=>e===t,sqr:t=>tr(t*t,e),add:(t,r)=>tr(t+r,e),sub:(t,r)=>tr(t-r,e),mul:(t,r)=>tr(t*r,e),pow:(e,t)=>(function(e,t,r){if(re4;)r&e6&&(i=e.mul(i,n)),n=e.sqr(n),r>>=e6;return i})(a,e,t),div:(t,r)=>tr(t*tn(r,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>tn(t,e),sqrt:i.sqrt||(t=>(n||(n=function(e){if(e%e7===e9){let t=(e+e6)/e7;return function(e,r){let i=e.pow(r,t);if(!e.eql(e.sqr(i),r))throw Error("Cannot find square root");return i}}if(e%tt===te){let t=(e-te)/tt;return function(e,r){let i=e.mul(r,e8),n=e.pow(i,t),o=e.mul(r,n),s=e.mul(e.mul(o,e8),n),a=e.mul(o,e.sub(s,e.ONE));if(!e.eql(e.sqr(a),r))throw Error("Cannot find square root");return a}}return function(e){let t,r,i;let n=(e-e6)/e8;for(t=e-e6,r=0;t%e8===e4;t/=e8,r++);for(i=e8;ie4;)t&e6&&(i=i*e%r),e=e*e%r,t>>=e6;return i}(i,n,e)!==e-e6;i++)if(i>1e3)throw Error("Cannot find square root: likely non-prime P");if(1===r){let t=(e+e6)/e7;return function(e,r){let i=e.pow(r,t);if(!e.eql(e.sqr(i),r))throw Error("Cannot find square root");return i}}let o=(t+e6)/e8;return function(e,s){if(e.pow(s,n)===e.neg(e.ONE))throw Error("Cannot find square root");let a=r,l=e.pow(e.mul(e.ONE,i),t),c=e.pow(s,o),d=e.pow(s,t);for(;!e.eql(d,e.ONE);){if(e.eql(d,e.ZERO))return e.ZERO;let t=1;for(let r=e.sqr(d);t(function(e,t){let r=Array(t.length),i=t.reduce((t,i,n)=>e.is0(i)?t:(r[n]=t,e.mul(t,i)),e.ONE),n=e.inv(i);return t.reduceRight((t,i,n)=>e.is0(i)?t:(r[n]=e.mul(t,r[n]),e.mul(t,i)),n),r})(a,e),cmov:(e,t,r)=>r?t:e,toBytes:e=>r?eY(e,s):eG(e,s),fromBytes:e=>{if(e.length!==s)throw Error("Field.fromBytes: expected "+s+" bytes, got "+e.length);return r?eZ(e):eH(ez(e))}});return Object.freeze(a)}let tc=BigInt(0),td=BigInt(1);function tu(e,t){let r=t.negate();return e?r:t}function th(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw Error("invalid window size, expected [1.."+t+"], got W="+e)}function tp(e,t){return th(e,t),{windows:Math.ceil(t/e)+1,windowSize:2**(e-1)}}let tf=new WeakMap,tg=new WeakMap;function tm(e){return tg.get(e)||1}let ty=BigInt(0),tw=BigInt(1),tb=BigInt(2),tv=BigInt(8),tC={zip215:!0};BigInt(0),BigInt(1);let tE=BigInt("57896044618658097711785492504343953926634992332820282019728792003956564819949"),tx=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");BigInt(0);let t_=BigInt(1),tA=BigInt(2);BigInt(3);let tS=BigInt(5),tI=BigInt(8),tN=tl(tE,void 0,!0),tk=function(e){var t;let r=function(e){let t=(e3(e.Fp,ts.reduce((e,t)=>(e[t]="function",e),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"})),e3(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...ta(e.n,e.nBitLength),...e,p:e.Fp.ORDER}));return e3(e,{hash:"function",a:"bigint",d:"bigint",randomBytes:"function"},{adjustScalarBytes:"function",domain:"function",uvRatio:"function",mapToCurve:"function"}),Object.freeze({...t})}(e),{Fp:i,n:n,prehash:o,hash:s,randomBytes:a,nByteLength:l,h:c}=r,d=tb<{try{return{isValid:!0,value:i.sqrt(e*i.inv(t))}}catch{return{isValid:!1,value:ty}}}),f=r.adjustScalarBytes||(e=>e),g=r.domain||((e,t,r)=>{if(eF("phflag",r),t.length||r)throw Error("Contexts/pre-hash are not supported");return e});function m(e,t){e0("coordinate "+e,t,ty,d)}function y(e){if(!(e instanceof v))throw Error("ExtendedPoint expected")}let w=e5((e,t)=>{let{ex:r,ey:n,ez:o}=e,s=e.is0();null==t&&(t=s?tv:i.inv(o));let a=u(r*t),l=u(n*t),c=u(o*t);if(s)return{x:ty,y:tw};if(c!==tw)throw Error("invZ was invalid");return{x:a,y:l}}),b=e5(e=>{let{a:t,d:i}=r;if(e.is0())throw Error("bad point: ZERO");let{ex:n,ey:o,ez:s,et:a}=e,l=u(n*n),c=u(o*o),d=u(s*s),h=u(d*d),p=u(l*t);if(u(d*u(p+c))!==u(h+u(i*u(l*c))))throw Error("bad point: equation left != right (1)");if(u(n*o)!==u(s*a))throw Error("bad point: equation left != right (2)");return!0});class v{constructor(e,t,r,i){this.ex=e,this.ey=t,this.ez=r,this.et=i,m("x",e),m("y",t),m("z",r),m("t",i),Object.freeze(this)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static fromAffine(e){if(e instanceof v)throw Error("extended point not allowed");let{x:t,y:r}=e||{};return m("x",t),m("y",r),new v(t,r,tw,u(t*r))}static normalizeZ(e){let t=i.invertBatch(e.map(e=>e.ez));return e.map((e,r)=>e.toAffine(t[r])).map(v.fromAffine)}static msm(e,t){return function(e,t,r,i){if(function(e,t){if(!Array.isArray(e))throw Error("array expected");e.forEach((e,r)=>{if(!(e instanceof t))throw Error("invalid point at index "+r)})}(r,e),function(e,t){if(!Array.isArray(e))throw Error("array of scalars expected");e.forEach((e,r)=>{if(!t.isValid(e))throw Error("invalid scalar at index "+r)})}(i,t),r.length!==i.length)throw Error("arrays of points and scalars must have equal length");let n=e.ZERO,o=function(e){let t;for(t=0;e>eU;e>>=eL,t+=1);return t}(BigInt(r.length)),s=o>12?o-3:o>4?o-2:o?2:1,a=(1<=0;e-=s){l.fill(n);for(let t=0;t>BigInt(e)&BigInt(a));l[n]=l[n].add(r[t])}let t=n;for(let e=l.length-1,r=n;e>0;e--)r=r.add(l[e]),t=t.add(r);if(d=d.add(t),0!==e)for(let e=0;e1!==tm(e),unsafeLadder(e,t,r=v.ZERO){let i=e;for(;t>tc;)t&td&&(r=r.add(i)),i=i.double(),t>>=td;return r},precomputeWindow(e,r){let{windows:i,windowSize:n}=tp(r,t),o=[],s=e,a=s;for(let e=0;e>=d,n>o&&(n-=c,i+=td);let u=t+Math.abs(n)-1,h=e%2!=0,p=n<0;0===n?a=a.add(tu(h,r[t])):s=s.add(tu(p,r[u]))}return{p:s,f:a}},wNAFUnsafe(e,r,i,n=v.ZERO){let{windows:o,windowSize:s}=tp(e,t),a=BigInt(2**e-1),l=2**e,c=BigInt(e);for(let e=0;e>=c,o>s&&(o-=l,i+=td),0===o)continue;let d=r[t+Math.abs(o)-1];o<0&&(d=d.negate()),n=n.add(d)}return n},getPrecomputes(e,t,r){let i=tf.get(t);return i||(i=this.precomputeWindow(t,e),1!==e&&tf.set(t,r(i))),i},wNAFCached(e,t,r){let i=tm(e);return this.wNAF(i,this.getPrecomputes(i,e,r),t)},wNAFCachedUnsafe(e,t,r,i){let n=tm(e);return 1===n?this.unsafeLadder(e,t,i):this.wNAFUnsafe(n,this.getPrecomputes(n,e,r),t,i)},setWindowSize(e,r){th(r,t),tg.set(e,r),tf.delete(e)}});function _(e){let t=i.BYTES;e=eJ("private key",e,t);let r=eJ("hashed private key",s(e),2*t),o=f(r.slice(0,t)),a=r.slice(t,2*t),l=tr(eZ(o),n),c=C.multiply(l),d=c.toRawBytes();return{head:o,prefix:a,scalar:l,point:c,pointBytes:d}}function A(e=new Uint8Array,...t){return tr(eZ(s(g(eX(...t),eJ("context",e),!!o))),n)}return C._setWindowSize(8),{CURVE:r,getPublicKey:function(e){return _(e).pointBytes},sign:function(e,t,r={}){e=eJ("message",e),o&&(e=o(e));let{prefix:s,scalar:a,pointBytes:l}=_(t),c=A(r.context,s,e),d=C.multiply(c).toRawBytes(),u=tr(c+A(r.context,d,l,e)*a,n);return e0("signature.s",u,ty,n),eJ("result",eX(d,eY(u,i.BYTES)),2*i.BYTES)},verify:function(e,t,r,n=tC){let s,a,l;let{context:c,zip215:d}=n,u=i.BYTES;e=eJ("signature",e,2*u),t=eJ("message",t),r=eJ("publicKey",r,u),void 0!==d&&eF("zip215",d),o&&(t=o(t));let h=eZ(e.slice(u,2*u));try{s=v.fromHex(r,d),a=v.fromHex(e.slice(0,u),d),l=C.multiplyUnsafe(h)}catch{return!1}if(!d&&s.isSmallOrder())return!1;let p=A(c,a.toRawBytes(),s.toRawBytes(),t);return a.add(s.multiplyUnsafe(p)).subtract(l).clearCofactor().equals(v.ZERO)},ExtendedPoint:v,utils:{getExtendedPublicKey:_,randomPrivateKey:()=>a(i.BYTES),precompute:(e=8,t=v.BASE)=>(t._setWindowSize(e),t.multiply(BigInt(3)),t)}}}({a:BigInt(-1),d:BigInt("37095705934669439343138083508754565189542113879843219016388785533085940283555"),Fp:tN,n:BigInt("7237005577332262213973186563042994240857116359379907606001950938285454250989"),h:tI,Gx:BigInt("15112221349535400772501151409588531511454012693041857206046113283949847762202"),Gy:BigInt("46316835694926478169428394003475163141307993866256225615783033603165251855960"),hash:eD,randomBytes:eA,adjustScalarBytes:function(e){return e[0]&=248,e[31]&=127,e[31]|=64,e},uvRatio:function(e,t){let r=tr(t*t*t,tE),i=function(e){let t=BigInt(10),r=BigInt(20),i=BigInt(40),n=BigInt(80),o=e*e%tE*e%tE,s=ti(o,tA,tE)*o%tE,a=ti(s,t_,tE)*e%tE,l=ti(a,tS,tE)*a%tE,c=ti(l,t,tE)*l%tE,d=ti(c,r,tE)*c%tE,u=ti(d,i,tE)*d%tE,h=ti(u,n,tE)*u%tE,p=ti(h,n,tE)*u%tE,f=ti(p,t,tE)*l%tE;return{pow_p_5_8:ti(f,tA,tE)*e%tE,b2:o}}(e*tr(r*r*t,tE)).pow_p_5_8,n=tr(e*r*i,tE),o=tr(t*n*n,tE),s=n,a=tr(n*tx,tE),l=o===e,c=o===tr(-e,tE),d=o===tr(-e*tx,tE);return l&&(n=s),(c||d)&&(n=a),to(n,tE)&&(n=tr(-n,tE)),{isValid:l||c,value:n}}}),tR="base64url",tO="utf8",tT="utf8",tP="base58btc";function t$(e){return null!=globalThis.Buffer?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e}function tD(e=0){return null!=globalThis.Buffer&&null!=globalThis.Buffer.allocUnsafe?t$(globalThis.Buffer.allocUnsafe(e)):new Uint8Array(e)}function tU(e,t){t||(t=e.reduce((e,t)=>e+t.length,0));let r=tD(t),i=0;for(let t of e)r.set(t,i),i+=t.length;return t$(r)}var tL=function(e,t){if(e.length>=255)throw TypeError("Alphabet too long");for(var r=new Uint8Array(256),i=0;i>>0,s=new Uint8Array(o);e[t];){var d=r[e.charCodeAt(t)];if(255===d)return;for(var u=0,h=o-1;(0!==d||u>>0,s[h]=d%256>>>0,d=d/256>>>0;if(0!==d)throw Error("Non-zero carry");n=u,t++}if(" "!==e[t]){for(var p=o-n;p!==o&&0===s[p];)p++;for(var f=new Uint8Array(i+(o-p)),g=i;p!==o;)f[g++]=s[p++];return f}}}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw TypeError("Expected Uint8Array");if(0===t.length)return"";for(var r=0,i=0,n=0,o=t.length;n!==o&&0===t[n];)n++,r++;for(var s=(o-n)*d+1>>>0,c=new Uint8Array(s);n!==o;){for(var u=t[n],h=0,p=s-1;(0!==u||h>>0,c[p]=u%a>>>0,u=u/a>>>0;if(0!==u)throw Error("Non-zero carry");i=h,n++}for(var f=s-i;f!==s&&0===c[f];)f++;for(var g=l.repeat(r);f{if(e instanceof Uint8Array&&"Uint8Array"===e.constructor.name)return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw Error("Unknown type, must be binary type")},tB=e=>new TextEncoder().encode(e),tj=e=>new TextDecoder().decode(e);class tF{constructor(e,t,r){this.name=e,this.prefix=t,this.baseEncode=r}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class tW{constructor(e,t,r){if(this.name=e,this.prefix=t,void 0===t.codePointAt(0))throw Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=r}decode(e){if("string"==typeof e){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(e){return tH(this,e)}}class tz{constructor(e){this.decoders=e}or(e){return tH(this,e)}decode(e){let t=e[0],r=this.decoders[t];if(r)return r.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}let tH=(e,t)=>new tz({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class tq{constructor(e,t,r,i){this.name=e,this.prefix=t,this.baseEncode=r,this.baseDecode=i,this.encoder=new tF(e,t,r),this.decoder=new tW(e,t,i)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}let tV=({name:e,prefix:t,encode:r,decode:i})=>new tq(e,t,r,i),tK=({prefix:e,name:t,alphabet:r})=>{let{encode:i,decode:n}=tL(r,t);return tV({prefix:e,name:t,encode:i,decode:e=>tM(n(e))})},tZ=(e,t,r,i)=>{let n={};for(let e=0;e=8&&(a-=8,s[c++]=255&l>>a)}if(a>=r||255&l<<8-a)throw SyntaxError("Unexpected end of data");return s},tG=(e,t,r)=>{let i="="===t[t.length-1],n=(1<r;)s-=r,o+=t[n&a>>s];if(s&&(o+=t[n&a<tV({prefix:t,name:e,encode:e=>tG(e,i,r),decode:t=>tZ(t,i,r,e)});var tJ=Object.freeze({__proto__:null,identity:tV({prefix:"\0",name:"identity",encode:e=>tj(e),decode:e=>tB(e)})}),tX=Object.freeze({__proto__:null,base2:tY({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1})}),tQ=Object.freeze({__proto__:null,base8:tY({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3})}),t0=Object.freeze({__proto__:null,base10:tK({prefix:"9",name:"base10",alphabet:"0123456789"})}),t1=Object.freeze({__proto__:null,base16:tY({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),base16upper:tY({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4})});let t2=tY({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),t3=tY({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),t5=tY({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),t4=tY({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),t6=tY({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),t8=tY({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5});var t9=Object.freeze({__proto__:null,base32:t2,base32upper:t3,base32pad:t5,base32padupper:t4,base32hex:t6,base32hexupper:t8,base32hexpad:tY({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),base32hexpadupper:tY({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),base32z:tY({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5})}),t7=Object.freeze({__proto__:null,base36:tK({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),base36upper:tK({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"})}),re=Object.freeze({__proto__:null,base58btc:tK({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),base58flickr:tK({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"})});let rt=tY({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6});var rr=Object.freeze({__proto__:null,base64:rt,base64pad:tY({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),base64url:tY({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),base64urlpad:tY({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6})});let ri=Array.from("\uD83D\uDE80\uD83E\uDE90☄\uD83D\uDEF0\uD83C\uDF0C\uD83C\uDF11\uD83C\uDF12\uD83C\uDF13\uD83C\uDF14\uD83C\uDF15\uD83C\uDF16\uD83C\uDF17\uD83C\uDF18\uD83C\uDF0D\uD83C\uDF0F\uD83C\uDF0E\uD83D\uDC09☀\uD83D\uDCBB\uD83D\uDDA5\uD83D\uDCBE\uD83D\uDCBF\uD83D\uDE02❤\uD83D\uDE0D\uD83E\uDD23\uD83D\uDE0A\uD83D\uDE4F\uD83D\uDC95\uD83D\uDE2D\uD83D\uDE18\uD83D\uDC4D\uD83D\uDE05\uD83D\uDC4F\uD83D\uDE01\uD83D\uDD25\uD83E\uDD70\uD83D\uDC94\uD83D\uDC96\uD83D\uDC99\uD83D\uDE22\uD83E\uDD14\uD83D\uDE06\uD83D\uDE44\uD83D\uDCAA\uD83D\uDE09☺\uD83D\uDC4C\uD83E\uDD17\uD83D\uDC9C\uD83D\uDE14\uD83D\uDE0E\uD83D\uDE07\uD83C\uDF39\uD83E\uDD26\uD83C\uDF89\uD83D\uDC9E✌✨\uD83E\uDD37\uD83D\uDE31\uD83D\uDE0C\uD83C\uDF38\uD83D\uDE4C\uD83D\uDE0B\uD83D\uDC97\uD83D\uDC9A\uD83D\uDE0F\uD83D\uDC9B\uD83D\uDE42\uD83D\uDC93\uD83E\uDD29\uD83D\uDE04\uD83D\uDE00\uD83D\uDDA4\uD83D\uDE03\uD83D\uDCAF\uD83D\uDE48\uD83D\uDC47\uD83C\uDFB6\uD83D\uDE12\uD83E\uDD2D❣\uD83D\uDE1C\uD83D\uDC8B\uD83D\uDC40\uD83D\uDE2A\uD83D\uDE11\uD83D\uDCA5\uD83D\uDE4B\uD83D\uDE1E\uD83D\uDE29\uD83D\uDE21\uD83E\uDD2A\uD83D\uDC4A\uD83E\uDD73\uD83D\uDE25\uD83E\uDD24\uD83D\uDC49\uD83D\uDC83\uD83D\uDE33✋\uD83D\uDE1A\uD83D\uDE1D\uD83D\uDE34\uD83C\uDF1F\uD83D\uDE2C\uD83D\uDE43\uD83C\uDF40\uD83C\uDF37\uD83D\uDE3B\uD83D\uDE13⭐✅\uD83E\uDD7A\uD83C\uDF08\uD83D\uDE08\uD83E\uDD18\uD83D\uDCA6✔\uD83D\uDE23\uD83C\uDFC3\uD83D\uDC90☹\uD83C\uDF8A\uD83D\uDC98\uD83D\uDE20☝\uD83D\uDE15\uD83C\uDF3A\uD83C\uDF82\uD83C\uDF3B\uD83D\uDE10\uD83D\uDD95\uD83D\uDC9D\uD83D\uDE4A\uD83D\uDE39\uD83D\uDDE3\uD83D\uDCAB\uD83D\uDC80\uD83D\uDC51\uD83C\uDFB5\uD83E\uDD1E\uD83D\uDE1B\uD83D\uDD34\uD83D\uDE24\uD83C\uDF3C\uD83D\uDE2B⚽\uD83E\uDD19☕\uD83C\uDFC6\uD83E\uDD2B\uD83D\uDC48\uD83D\uDE2E\uD83D\uDE46\uD83C\uDF7B\uD83C\uDF43\uD83D\uDC36\uD83D\uDC81\uD83D\uDE32\uD83C\uDF3F\uD83E\uDDE1\uD83C\uDF81⚡\uD83C\uDF1E\uD83C\uDF88❌✊\uD83D\uDC4B\uD83D\uDE30\uD83E\uDD28\uD83D\uDE36\uD83E\uDD1D\uD83D\uDEB6\uD83D\uDCB0\uD83C\uDF53\uD83D\uDCA2\uD83E\uDD1F\uD83D\uDE41\uD83D\uDEA8\uD83D\uDCA8\uD83E\uDD2C✈\uD83C\uDF80\uD83C\uDF7A\uD83E\uDD13\uD83D\uDE19\uD83D\uDC9F\uD83C\uDF31\uD83D\uDE16\uD83D\uDC76\uD83E\uDD74▶➡❓\uD83D\uDC8E\uD83D\uDCB8⬇\uD83D\uDE28\uD83C\uDF1A\uD83E\uDD8B\uD83D\uDE37\uD83D\uDD7A⚠\uD83D\uDE45\uD83D\uDE1F\uD83D\uDE35\uD83D\uDC4E\uD83E\uDD32\uD83E\uDD20\uD83E\uDD27\uD83D\uDCCC\uD83D\uDD35\uD83D\uDC85\uD83E\uDDD0\uD83D\uDC3E\uD83C\uDF52\uD83D\uDE17\uD83E\uDD11\uD83C\uDF0A\uD83E\uDD2F\uD83D\uDC37☎\uD83D\uDCA7\uD83D\uDE2F\uD83D\uDC86\uD83D\uDC46\uD83C\uDFA4\uD83D\uDE47\uD83C\uDF51❄\uD83C\uDF34\uD83D\uDCA3\uD83D\uDC38\uD83D\uDC8C\uD83D\uDCCD\uD83E\uDD40\uD83E\uDD22\uD83D\uDC45\uD83D\uDCA1\uD83D\uDCA9\uD83D\uDC50\uD83D\uDCF8\uD83D\uDC7B\uD83E\uDD10\uD83E\uDD2E\uD83C\uDFBC\uD83E\uDD75\uD83D\uDEA9\uD83C\uDF4E\uD83C\uDF4A\uD83D\uDC7C\uD83D\uDC8D\uD83D\uDCE3\uD83E\uDD42"),rn=ri.reduce((e,t,r)=>(e[r]=t,e),[]),ro=ri.reduce((e,t,r)=>(e[t.codePointAt(0)]=r,e),[]);var rs=Object.freeze({__proto__:null,base256emoji:tV({prefix:"\uD83D\uDE80",name:"base256emoji",encode:function(e){return e.reduce((e,t)=>e+=rn[t],"")},decode:function(e){let t=[];for(let r of e){let e=ro[r.codePointAt(0)];if(void 0===e)throw Error(`Non-base256emoji character: ${r}`);t.push(e)}return new Uint8Array(t)}})});function ra(e,t){var r,i=0,t=t||0,n=0,o=t,s=e.length;do{if(o>=s)throw ra.bytes=0,RangeError("Could not decode varint");r=e[o++],i+=n<28?(127&r)<=128);return ra.bytes=o-t,i}var rl=function e(t,r,i){r=r||[],i=i||0;for(var n=i;t>=2147483648;)r[i++]=255&t|128,t/=128;for(;-128&t;)r[i++]=255&t|128,t>>>=7;return r[i]=0|t,e.bytes=i-n+1,r};let rc=(e,t,r=0)=>(rl(e,t,r),t),rd=e=>e<128?1:e<16384?2:e<2097152?3:e<268435456?4:e<34359738368?5:e<4398046511104?6:e<562949953421312?7:e<72057594037927940?8:e<0x7fffffffffffffff?9:10,ru=(e,t)=>{let r=t.byteLength,i=rd(e),n=i+rd(r),o=new Uint8Array(n+r);return rc(e,o,0),rc(r,o,i),o.set(t,n),new rh(e,r,t,o)};class rh{constructor(e,t,r,i){this.code=e,this.size=t,this.digest=r,this.bytes=i}}let rp=({name:e,code:t,encode:r})=>new rf(e,t,r);class rf{constructor(e,t,r){this.name=e,this.code=t,this.encode=r}digest(e){if(e instanceof Uint8Array){let t=this.encode(e);return t instanceof Uint8Array?ru(this.code,t):t.then(e=>ru(this.code,e))}throw Error("Unknown type, must be binary type")}}let rg=e=>async t=>new Uint8Array(await crypto.subtle.digest(e,t));var rm=Object.freeze({__proto__:null,sha256:rp({name:"sha2-256",code:18,encode:rg("SHA-256")}),sha512:rp({name:"sha2-512",code:19,encode:rg("SHA-512")})}),ry=Object.freeze({__proto__:null,identity:{code:0,name:"identity",encode:tM,digest:e=>ru(0,tM(e))}});new TextEncoder,new TextDecoder;let rw={...tJ,...tX,...tQ,...t0,...t1,...t9,...t7,...re,...rr,...rs};function rb(e,t,r,i){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:r},decoder:{decode:i}}}({...rm,...ry});let rv=rb("utf8","u",e=>"u"+new TextDecoder("utf8").decode(e),e=>new TextEncoder().encode(e.substring(1))),rC=rb("ascii","a",e=>{let t="a";for(let r=0;r{let t=tD((e=e.substring(1)).length);for(let r=0;r{if(t.cause instanceof rz){if(t.cause.details)return t.cause.details;if(t.cause.shortMessage)return t.cause.shortMessage}return t.cause&&"details"in t.cause&&"string"==typeof t.cause.details?t.cause.details:t.cause?.message?t.cause.message:t.details})(),i=t.cause instanceof rz&&t.cause.docsPath||t.docsPath,n=`https://oxlib.sh${i??""}`;super([e||"An error occurred.",...t.metaMessages?["",...t.metaMessages]:[],...r||i?["",r?`Details: ${r}`:void 0,i?`See: ${n}`:void 0]:[]].filter(e=>"string"==typeof e).join("\n"),t.cause?{cause:t.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docs",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"cause",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:"ox@0.1.1"}),this.cause=t.cause,this.details=r,this.docs=n,this.docsPath=i,this.shortMessage=e}walk(e){return function e(t,r){return r?.(t)?t:t&&"object"==typeof t&&"cause"in t&&t.cause?e(t.cause,r):r?null:t}(this,e)}}function rH(e,t){if(rQ(e)>t)throw new r3({givenSize:rQ(e),maxSize:t})}function rq(e,t={}){let{dir:r,size:i=32}=t;if(0===i)return e;let n=e.replace("0x","");if(n.length>2*i)throw new r4({size:Math.ceil(n.length/2),targetSize:i,type:"Hex"});return`0x${n["right"===r?"padEnd":"padStart"](2*i,"0")}`}function rV(e,t,r){return JSON.stringify(e,(e,r)=>"function"==typeof t?t(e,r):"bigint"==typeof r?r.toString()+"#__bigint":r,r)}let rK=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function rZ(e){return e instanceof Uint8Array?rG(e):Array.isArray(e)?rG(new Uint8Array(e)):e}function rG(e,t={}){let r="";for(let t=0;tr||o0&&t>rQ(e)-1)throw new r5({offset:t,position:"start",size:rQ(e)})}(e,t);let o=`0x${e.replace("0x","").slice((t??0)*2,(r??e.length)*2)}`;return n&&function(e,t,r){if("number"==typeof t&&"number"==typeof r&&rQ(e)!==r-t)throw new r5({offset:r,position:"end",size:rQ(e)})}(o,t,r),o}function rQ(e){return Math.ceil((e.length-2)/2)}class r0 extends rz{constructor({max:e,min:t,signed:r,size:i,value:n}){super(`Number \`${n}\` is not in safe${i?` ${8*i}-bit`:""}${r?" signed":" unsigned"} integer range ${e?`(\`${t}\` to \`${e}\`)`:`(above \`${t}\`)`}`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.IntegerOutOfRangeError"})}}class r1 extends rz{constructor(e){super(`Value \`${"object"==typeof e?rV(e):e}\` of type \`${typeof e}\` is an invalid hex type.`,{metaMessages:['Hex types must be represented as `"0x${string}"`.']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexTypeError"})}}class r2 extends rz{constructor(e){super(`Value \`${e}\` is an invalid hex value.`,{metaMessages:['Hex values must start with `"0x"` and contain only hexadecimal characters (0-9, a-f, A-F).']}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.InvalidHexValueError"})}}class r3 extends rz{constructor({givenSize:e,maxSize:t}){super(`Size cannot exceed \`${t}\` bytes. Given size: \`${e}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeOverflowError"})}}class r5 extends rz{constructor({offset:e,position:t,size:r}){super(`Slice ${"start"===t?"starting":"ending"} at offset \`${e}\` is out-of-bounds (size: \`${r}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SliceOffsetOutOfBoundsError"})}}class r4 extends rz{constructor({size:e,targetSize:t,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (\`${e}\`) exceeds padding size (\`${t}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Hex.SizeExceedsPaddingSizeError"})}}class r6 extends rz{constructor({signature:e}){super(`Value \`${e}\` is an invalid signature size.`,{metaMessages:["Expected: 64 bytes or 65 bytes.",`Received ${rQ(rZ(e))} bytes.`]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidSerializedSizeError"})}}class r8 extends rz{constructor({value:e}){super(`Value \`${e}\` is an invalid y-parity value. Y-parity must be 0 or 1.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidYParityError"})}}class r9 extends rz{constructor({value:e}){super(`Value \`${e}\` is an invalid v value. v must be 27, 28 or >=35.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Signature.InvalidVError"})}}let r7="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0;function ie(e){if(!Number.isSafeInteger(e)||e<0)throw Error("positive integer expected, got "+e)}function it(e,...t){if(!(e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name))throw Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw Error("Uint8Array expected of length "+t+", got length="+e.length)}function ir(e,t=!0){if(e.destroyed)throw Error("Hash instance has been destroyed");if(t&&e.finished)throw Error("Hash#digest() has already been called")}function ii(e,t){it(e);let r=t.outputLen;if(e.length>>t}let il=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0]?e=>e:function(e){for(let r=0;r>>8&65280|t>>>24&255}return e};function ic(e){return"string"==typeof e&&(e=function(e){if("string"!=typeof e)throw Error("string expected");return new Uint8Array(new TextEncoder().encode(e))}(e)),it(e),e}class id{}function iu(e){let t=t=>e().update(ic(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function ih(e=32){if(r7&&"function"==typeof r7.getRandomValues)return r7.getRandomValues(new Uint8Array(e));if(r7&&"function"==typeof r7.randomBytes)return Uint8Array.from(r7.randomBytes(e));throw Error("crypto.getRandomValues must be defined")}class ip extends id{constructor(e,t,r,i){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=i,this.buffer=new Uint8Array(e),this.view=is(this.buffer)}update(e){ir(this),it(e=ic(e));let{view:t,buffer:r,blockLen:i}=this,n=e.length;for(let o=0;oi-o&&(this.process(r,0),o=0);for(let e=o;e>n&o),a=Number(r&o),l=i?4:0,c=i?0:4;e.setUint32(t+l,s,i),e.setUint32(t+c,a,i)}(r,i-8,BigInt(8*this.length),n),this.process(r,0);let s=is(e),a=this.outputLen;if(a%4)throw Error("_sha2: outputLen should be aligned to 32bit");let l=a/4,c=this.get();if(l>c.length)throw Error("_sha2: outputLen bigger than state");for(let e=0;e>iy&im)}:{h:0|Number(e>>iy&im),l:0|Number(e&im)}}(e[o],t);[i[o],n[o]]=[r,s]}return[i,n]}let ib=(e,t,r)=>e<>>32-r,iv=(e,t,r)=>t<>>32-r,iC=(e,t,r)=>t<>>64-r,iE=(e,t,r)=>e<>>64-r,ix=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),i_=new Uint32Array(64);class iA extends ip{constructor(e=32){super(64,e,8,!1),this.A=0|ig[0],this.B=0|ig[1],this.C=0|ig[2],this.D=0|ig[3],this.E=0|ig[4],this.F=0|ig[5],this.G=0|ig[6],this.H=0|ig[7]}get(){let{A:e,B:t,C:r,D:i,E:n,F:o,G:s,H:a}=this;return[e,t,r,i,n,o,s,a]}set(e,t,r,i,n,o,s,a){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|i,this.E=0|n,this.F=0|o,this.G=0|s,this.H=0|a}process(e,t){for(let r=0;r<16;r++,t+=4)i_[r]=e.getUint32(t,!1);for(let e=16;e<64;e++){let t=i_[e-15],r=i_[e-2],i=ia(t,7)^ia(t,18)^t>>>3,n=ia(r,17)^ia(r,19)^r>>>10;i_[e]=n+i_[e-7]+i+i_[e-16]|0}let{A:r,B:i,C:n,D:o,E:s,F:a,G:l,H:c}=this;for(let e=0;e<64;e++){var d,u,h,p;let t=c+(ia(s,6)^ia(s,11)^ia(s,25))+((d=s)&a^~d&l)+ix[e]+i_[e]|0,f=(ia(r,2)^ia(r,13)^ia(r,22))+((u=r)&(h=i)^u&(p=n)^h&p)|0;c=l,l=a,a=s,s=o+t|0,o=n,n=i,i=r,r=t+f|0}r=r+this.A|0,i=i+this.B|0,n=n+this.C|0,o=o+this.D|0,s=s+this.E|0,a=a+this.F|0,l=l+this.G|0,c=c+this.H|0,this.set(r,i,n,o,s,a,l,c)}roundClean(){io(i_)}destroy(){this.set(0,0,0,0,0,0,0,0),io(this.buffer)}}let iS=iw(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e)));iS[0],iS[1];let iI=iu(()=>new iA);class iN extends id{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,function(e){if("function"!=typeof e||"function"!=typeof e.create)throw Error("Hash should be wrapped by utils.createHasher");ie(e.outputLen),ie(e.blockLen)}(e);let r=ic(t);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let i=this.blockLen,n=new Uint8Array(i);n.set(r.length>i?e.create().update(r).digest():r);for(let e=0;enew iN(e,t).update(r).digest();ik.create=(e,t)=>new iN(e,t);let iR=BigInt(0),iO=BigInt(1);function iT(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name}function iP(e){if(!iT(e))throw Error("Uint8Array expected")}function i$(e,t){if("boolean"!=typeof t)throw Error(e+" boolean expected, got "+t)}function iD(e){let t=e.toString(16);return 1&t.length?"0"+t:t}function iU(e){if("string"!=typeof e)throw Error("hex string expected, got "+typeof e);return""===e?iR:BigInt("0x"+e)}let iL="function"==typeof Uint8Array.from([]).toHex&&"function"==typeof Uint8Array.fromHex,iM=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function iB(e){if(iP(e),iL)return e.toHex();let t="";for(let r=0;r=ij._0&&e<=ij._9?e-ij._0:e>=ij.A&&e<=ij.F?e-(ij.A-10):e>=ij.a&&e<=ij.f?e-(ij.a-10):void 0}function iW(e){if("string"!=typeof e)throw Error("hex string expected, got "+typeof e);if(iL)return Uint8Array.fromHex(e);let t=e.length,r=t/2;if(t%2)throw Error("hex string expected, got unpadded hex of length "+t);let i=new Uint8Array(r);for(let t=0,n=0;t"bigint"==typeof e&&iR<=e;function iY(e,t,r){return iG(e)&&iG(t)&&iG(r)&&t<=e&&e(iO<new Uint8Array(e),i0=e=>Uint8Array.from(e),i1={bigint:e=>"bigint"==typeof e,function:e=>"function"==typeof e,boolean:e=>"boolean"==typeof e,string:e=>"string"==typeof e,stringOrUint8Array:e=>"string"==typeof e||iT(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>"function"==typeof e&&Number.isSafeInteger(e.outputLen)};function i2(e,t,r={}){let i=(t,r,i)=>{let n=i1[r];if("function"!=typeof n)throw Error("invalid validator function");let o=e[t];if((!i||void 0!==o)&&!n(o,e))throw Error("param "+String(t)+" is invalid. Expected "+r+", got "+o)};for(let[e,r]of Object.entries(t))i(e,r,!1);for(let[e,t]of Object.entries(r))i(e,t,!0);return e}function i3(e){let t=new WeakMap;return(r,...i)=>{let n=t.get(r);if(void 0!==n)return n;let o=e(r,...i);return t.set(r,o),o}}let i5=BigInt(0),i4=BigInt(1),i6=BigInt(2),i8=BigInt(3),i9=BigInt(4),i7=BigInt(5),ne=BigInt(8);function nt(e,t){let r=e%t;return r>=i5?r:t+r}function nr(e,t,r){let i=e;for(;t-- >i5;)i*=i,i%=r;return i}function ni(e,t){if(e===i5)throw Error("invert: expected non-zero number");if(t<=i5)throw Error("invert: expected positive modulus, got "+t);let r=nt(e,t),i=t,n=i5,o=i4,s=i4,a=i5;for(;r!==i5;){let e=i/r,t=i%r,l=n-s*e,c=o-a*e;i=r,r=t,n=s,o=a,s=l,a=c}if(i!==i4)throw Error("invert: does not exist");return nt(n,t)}function nn(e,t){let r=(e.ORDER+i4)/i9,i=e.pow(t,r);if(!e.eql(e.sqr(i),t))throw Error("Cannot find square root");return i}function no(e,t){let r=(e.ORDER-i7)/ne,i=e.mul(t,i6),n=e.pow(i,r),o=e.mul(t,n),s=e.mul(e.mul(o,i6),n),a=e.mul(o,e.sub(s,e.ONE));if(!e.eql(e.sqr(a),t))throw Error("Cannot find square root");return a}let ns=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function na(e,t,r=!1){let i=Array(t.length).fill(r?e.ZERO:void 0),n=t.reduce((t,r,n)=>e.is0(r)?t:(i[n]=t,e.mul(t,r)),e.ONE),o=e.inv(n);return t.reduceRight((t,r,n)=>e.is0(r)?t:(i[n]=e.mul(t,i[n]),e.mul(t,r)),o),i}function nl(e,t){let r=(e.ORDER-i4)/i6,i=e.pow(t,r),n=e.eql(i,e.ONE),o=e.eql(i,e.ZERO),s=e.eql(i,e.neg(e.ONE));if(!n&&!o&&!s)throw Error("invalid Legendre symbol result");return n?1:o?0:-1}function nc(e,t){void 0!==t&&ie(t);let r=void 0!==t?t:e.toString(2).length;return{nBitLength:r,nByteLength:Math.ceil(r/8)}}function nd(e,t,r=!1,i={}){let n;if(e<=i5)throw Error("invalid field: expected ORDER > 0, got "+e);let{nBitLength:o,nByteLength:s}=nc(e,t);if(s>2048)throw Error("invalid field: expected ORDER of <= 2048 bytes");let a=Object.freeze({ORDER:e,isLE:r,BITS:o,BYTES:s,MASK:iX(o),ZERO:i5,ONE:i4,create:t=>nt(t,e),isValid:t=>{if("bigint"!=typeof t)throw Error("invalid field element: expected bigint, got "+typeof t);return i5<=t&&te===i5,isOdd:e=>(e&i4)===i4,neg:t=>nt(-t,e),eql:(e,t)=>e===t,sqr:t=>nt(t*t,e),add:(t,r)=>nt(t+r,e),sub:(t,r)=>nt(t-r,e),mul:(t,r)=>nt(t*r,e),pow:(e,t)=>(function(e,t,r){if(ri5;)r&i4&&(i=e.mul(i,n)),n=e.sqr(n),r>>=i4;return i})(a,e,t),div:(t,r)=>nt(t*ni(r,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>ni(t,e),sqrt:i.sqrt||(t=>(!n&&(n=e%i9===i8?nn:e%ne===i7?no:function(e){if(e1e3)throw Error("Cannot find square root: probably non-prime P");if(1===r)return nn;let o=n.pow(i,t),s=(t+i4)/i6;return function(e,i){if(e.is0(i))return i;if(1!==nl(e,i))throw Error("Cannot find square root");let n=r,a=e.mul(e.ONE,o),l=e.pow(i,t),c=e.pow(i,s);for(;!e.eql(l,e.ONE);){if(e.is0(l))return e.ZERO;let t=1,r=e.sqr(l);for(;!e.eql(r,e.ONE);)if(t++,r=e.sqr(r),t===n)throw Error("Cannot find square root");let i=i4<r?iV(e,s):iq(e,s),fromBytes:e=>{if(e.length!==s)throw Error("Field.fromBytes: expected "+s+" bytes, got "+e.length);return r?iH(e):iz(e)},invertBatch:e=>na(a,e),cmov:(e,t,r)=>r?t:e});return Object.freeze(a)}function nu(e){if("bigint"!=typeof e)throw Error("field order must be bigint");return Math.ceil(e.toString(2).length/8)}function nh(e){let t=nu(e);return t+Math.ceil(t/2)}let np=BigInt(0),nf=BigInt(1);function ng(e,t){let r=t.negate();return e?r:t}function nm(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw Error("invalid window size, expected [1.."+t+"], got W="+e)}function ny(e,t){nm(e,t);let r=Math.ceil(t/e)+1,i=2**(e-1),n=2**e;return{windows:r,windowSize:i,mask:iX(e),maxNumber:n,shiftBy:BigInt(e)}}function nw(e,t,r){let{windowSize:i,mask:n,maxNumber:o,shiftBy:s}=r,a=Number(e&n),l=e>>s;a>i&&(a-=o,l+=nf);let c=t*i,d=c+Math.abs(a)-1;return{nextN:l,offset:d,isZero:0===a,isNeg:a<0,isNegF:t%2!=0,offsetF:c}}let nb=new WeakMap,nv=new WeakMap;function nC(e){return nv.get(e)||1}function nE(e){return i2(e.Fp,ns.reduce((e,t)=>(e[t]="function",e),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"})),i2(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...nc(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}function nx(e){void 0!==e.lowS&&i$("lowS",e.lowS),void 0!==e.prehash&&i$("prehash",e.prehash)}class n_ extends Error{constructor(e=""){super(e)}}let nA={Err:n_,_tlv:{encode:(e,t)=>{let{Err:r}=nA;if(e<0||e>256)throw new r("tlv.encode: wrong tag");if(1&t.length)throw new r("tlv.encode: unpadded data");let i=t.length/2,n=iD(i);if(n.length/2&128)throw new r("tlv.encode: long form length too big");let o=i>127?iD(n.length/2|128):"";return iD(e)+o+n+t},decode(e,t){let{Err:r}=nA,i=0;if(e<0||e>256)throw new r("tlv.encode: wrong tag");if(t.length<2||t[i++]!==e)throw new r("tlv.decode: wrong tlv");let n=t[i++],o=0;if(128&n){let e=127&n;if(!e)throw new r("tlv.decode(long): indefinite length not supported");if(e>4)throw new r("tlv.decode(long): byte length is too big");let s=t.subarray(i,i+e);if(s.length!==e)throw new r("tlv.decode: length bytes not complete");if(0===s[0])throw new r("tlv.decode(long): zero leftmost byte");for(let e of s)o=o<<8|e;if(i+=e,o<128)throw new r("tlv.decode(long): not minimal encoding")}else o=n;let s=t.subarray(i,i+o);if(s.length!==o)throw new r("tlv.decode: wrong value length");return{v:s,l:t.subarray(i+o)}}},_int:{encode(e){let{Err:t}=nA;if(e(e+t/n$)/t,nU=nd(nR,void 0,void 0,{sqrt:function(e){let t=BigInt(3),r=BigInt(6),i=BigInt(11),n=BigInt(22),o=BigInt(23),s=BigInt(44),a=BigInt(88),l=e*e*e%nR,c=l*l*e%nR,d=nr(c,t,nR)*c%nR,u=nr(d,t,nR)*c%nR,h=nr(u,n$,nR)*l%nR,p=nr(h,i,nR)*h%nR,f=nr(p,n,nR)*p%nR,g=nr(f,s,nR)*f%nR,m=nr(g,a,nR)*g%nR,y=nr(m,s,nR)*f%nR,w=nr(y,t,nR)*c%nR,b=nr(w,o,nR)*p%nR,v=nr(b,r,nR)*l%nR,C=nr(v,n$,nR);if(!nU.eql(nU.sqr(C),e))throw Error("Cannot find square root");return C}}),nL=function(e,t){let r=t=>(function(e){let t=function(e){let t=nE(e);return i2(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}(e),{Fp:r,n:i,nByteLength:n,nBitLength:o}=t,s=r.BYTES+1,a=2*r.BYTES+1;function l(e){return nt(e,i)}let{ProjectivePoint:c,normPrivateKeyToScalar:d,weierstrassEquation:u,isWithinCurveOrder:h}=function(e){var t;let r=function(e){let t=nE(e);i2(t,{a:"field",b:"field"},{allowInfinityPoint:"boolean",allowedPrivateKeyLengths:"array",clearCofactor:"function",fromBytes:"function",isTorsionFree:"function",toBytes:"function",wrapPrivateKey:"boolean"});let{endo:r,Fp:i,a:n}=t;if(r){if(!i.eql(n,i.ZERO))throw Error("invalid endo: CURVE.a must be 0");if("object"!=typeof r||"bigint"!=typeof r.beta||"function"!=typeof r.splitScalar)throw Error('invalid endo: expected "beta": bigint and "splitScalar": function')}return Object.freeze({...t})}(e),{Fp:i}=r,n=nd(r.n,r.nBitLength),o=r.toBytes||((e,t,r)=>{let n=t.toAffine();return iZ(Uint8Array.from([4]),i.toBytes(n.x),i.toBytes(n.y))}),s=r.fromBytes||(e=>{let t=e.subarray(1);return{x:i.fromBytes(t.subarray(0,i.BYTES)),y:i.fromBytes(t.subarray(i.BYTES,2*i.BYTES))}});function a(e){let{a:t,b:n}=r,o=i.sqr(e),s=i.mul(o,e);return i.add(i.add(s,i.mul(e,t)),n)}function l(e,t){let r=i.sqr(t),n=a(e);return i.eql(r,n)}if(!l(r.Gx,r.Gy))throw Error("bad curve params: generator point");let c=i.mul(i.pow(r.a,nN),nk),d=i.mul(i.sqr(r.b),BigInt(27));if(i.is0(i.add(c,d)))throw Error("bad curve params: a or b");function u(e){let t;let{allowedPrivateKeyLengths:i,nByteLength:n,wrapPrivateKey:o,n:s}=r;if(i&&"bigint"!=typeof e){if(iT(e)&&(e=iB(e)),"string"!=typeof e||!i.includes(e.length))throw Error("invalid private key");e=e.padStart(2*n,"0")}try{t="bigint"==typeof e?e:iz(iK("private key",e,n))}catch(t){throw Error("invalid private key, expected hex or "+n+" bytes, got "+typeof e)}return o&&(t=nt(t,s)),iJ("private key",t,nI,s),t}function h(e){if(!(e instanceof g))throw Error("ProjectivePoint expected")}let p=i3((e,t)=>{let{px:r,py:n,pz:o}=e;if(i.eql(o,i.ONE))return{x:r,y:n};let s=e.is0();null==t&&(t=s?i.ONE:i.inv(o));let a=i.mul(r,t),l=i.mul(n,t),c=i.mul(o,t);if(s)return{x:i.ZERO,y:i.ZERO};if(!i.eql(c,i.ONE))throw Error("invZ was invalid");return{x:a,y:l}}),f=i3(e=>{if(e.is0()){if(r.allowInfinityPoint&&!i.is0(e.py))return;throw Error("bad point: ZERO")}let{x:t,y:n}=e.toAffine();if(!i.isValid(t)||!i.isValid(n))throw Error("bad point: x or y not FE");if(!l(t,n))throw Error("bad point: equation left != right");if(!e.isTorsionFree())throw Error("bad point: not in prime-order subgroup");return!0});class g{constructor(e,t,r){if(null==e||!i.isValid(e))throw Error("x required");if(null==t||!i.isValid(t)||i.is0(t))throw Error("y required");if(null==r||!i.isValid(r))throw Error("z required");this.px=e,this.py=t,this.pz=r,Object.freeze(this)}static fromAffine(e){let{x:t,y:r}=e||{};if(!e||!i.isValid(t)||!i.isValid(r))throw Error("invalid affine point");if(e instanceof g)throw Error("projective point not allowed");let n=e=>i.eql(e,i.ZERO);return n(t)&&n(r)?g.ZERO:new g(t,r,i.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(e){let t=na(i,e.map(e=>e.pz));return e.map((e,r)=>e.toAffine(t[r])).map(g.fromAffine)}static fromHex(e){let t=g.fromAffine(s(iK("pointHex",e)));return t.assertValidity(),t}static fromPrivateKey(e){return g.BASE.multiply(u(e))}static msm(e,t){return function(e,t,r,i){!function(e,t){if(!Array.isArray(e))throw Error("array expected");e.forEach((e,r)=>{if(!(e instanceof t))throw Error("invalid point at index "+r)})}(r,e),function(e,t){if(!Array.isArray(e))throw Error("array of scalars expected");e.forEach((e,r)=>{if(!t.isValid(e))throw Error("invalid scalar at index "+r)})}(i,t);let n=r.length,o=i.length;if(n!==o)throw Error("arrays of points and scalars must have equal length");let s=e.ZERO,a=function(e){let t;for(t=0;e>iR;e>>=iO,t+=1);return t}(BigInt(n)),l=1;a>12?l=a-3:a>4?l=a-2:a>0&&(l=2);let c=iX(l),d=Array(Number(c)+1).fill(s),u=Math.floor((t.BITS-1)/l)*l,h=s;for(let e=u;e>=0;e-=l){d.fill(s);for(let t=0;t>BigInt(e)&c);d[n]=d[n].add(r[t])}let t=s;for(let e=d.length-1,r=s;e>0;e--)r=r.add(d[e]),t=t.add(r);if(h=h.add(t),0!==e)for(let e=0;enS||c>nS;)a&nI&&(d=d.add(h)),c&nI&&(u=u.add(h)),h=h.double(),a>>=nI,c>>=nI;return s&&(d=d.negate()),l&&(u=u.negate()),u=new g(i.mul(u.px,t.beta),u.py,u.pz),d.add(u)}multiply(e){let t,n;let{endo:o,n:s}=r;if(iJ("scalar",e,nI,s),o){let{k1neg:r,k1:s,k2neg:a,k2:l}=o.splitScalar(e),{p:c,f:d}=this.wNAF(s),{p:u,f:h}=this.wNAF(l);c=w.constTimeNegate(r,c),u=w.constTimeNegate(a,u),u=new g(i.mul(u.px,o.beta),u.py,u.pz),t=c.add(u),n=d.add(h)}else{let{p:r,f:i}=this.wNAF(e);t=r,n=i}return g.normalizeZ([t,n])[0]}multiplyAndAddUnsafe(e,t,r){let i=g.BASE,n=(e,t)=>t!==nS&&t!==nI&&e.equals(i)?e.multiply(t):e.multiplyUnsafe(t),o=n(this,t).add(n(e,r));return o.is0()?void 0:o}toAffine(e){return p(this,e)}isTorsionFree(){let{h:e,isTorsionFree:t}=r;if(e===nI)return!0;if(t)return t(g,this);throw Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){let{h:e,clearCofactor:t}=r;return e===nI?this:t?t(g,this):this.multiplyUnsafe(r.h)}toRawBytes(e=!0){return i$("isCompressed",e),this.assertValidity(),o(g,this,e)}toHex(e=!0){return i$("isCompressed",e),iB(this.toRawBytes(e))}}g.BASE=new g(r.Gx,r.Gy,i.ONE),g.ZERO=new g(i.ZERO,i.ONE,i.ZERO);let{endo:m,nBitLength:y}=r,w=(t=m?Math.ceil(y/2):y,{constTimeNegate:ng,hasPrecomputes:e=>1!==nC(e),unsafeLadder(e,t,r=g.ZERO){let i=e;for(;t>np;)t&nf&&(r=r.add(i)),i=i.double(),t>>=nf;return r},precomputeWindow(e,r){let{windows:i,windowSize:n}=ny(r,t),o=[],s=e,a=s;for(let e=0;eiz(e.slice(t,r));class f{constructor(e,t,r){iJ("r",e,nI,i),iJ("s",t,nI,i),this.r=e,this.s=t,null!=r&&(this.recovery=r),Object.freeze(this)}static fromCompact(e){return new f(p(e=iK("compactSignature",e,2*n),0,n),p(e,n,2*n))}static fromDER(e){let{r:t,s:r}=nA.toSig(iK("DER",e));return new f(t,r)}assertValidity(){}addRecoveryBit(e){return new f(this.r,this.s,e)}recoverPublicKey(e){let{r:n,s:o,recovery:s}=this,a=y(iK("msgHash",e));if(null==s||![0,1,2,3].includes(s))throw Error("recovery id invalid");let d=2===s||3===s?n+t.n:n;if(d>=r.ORDER)throw Error("recovery id 2 or 3 invalid");let u=(1&s)==0?"02":"03",h=c.fromHex(u+iB(iq(d,r.BYTES))),p=ni(d,i),f=l(-a*p),g=l(o*p),m=c.BASE.multiplyAndAddUnsafe(h,f,g);if(!m)throw Error("point at infinify");return m.assertValidity(),m}hasHighS(){return this.s>i>>nI}normalizeS(){return this.hasHighS()?new f(this.r,l(-this.s),this.recovery):this}toDERRawBytes(){return iW(this.toDERHex())}toDERHex(){return nA.hexFromSig(this)}toCompactRawBytes(){return iW(this.toCompactHex())}toCompactHex(){return iB(iq(this.r,n))+iB(iq(this.s,n))}}function g(e){if("bigint"==typeof e)return!1;if(e instanceof c)return!0;let i=iK("key",e).length,o=r.BYTES,s=o+1;if(!t.allowedPrivateKeyLengths&&n!==s)return i===s||i===2*o+1}let m=t.bits2int||function(e){if(e.length>8192)throw Error("input is too large");let t=iz(e),r=8*e.length-o;return r>0?t>>BigInt(r):t},y=t.bits2int_modN||function(e){return l(m(e))},w=iX(o);function b(e){return iJ("num < 2^"+o,e,nS,w),iq(e,n)}let v={lowS:t.lowS,prehash:!1},C={lowS:t.lowS,prehash:!1};return c.BASE._setWindowSize(8),{CURVE:t,getPublicKey:function(e,t=!0){return c.fromPrivateKey(e).toRawBytes(t)},getSharedSecret:function(e,t,r=!0){if(!0===g(e))throw Error("first arg must be private key");if(!1===g(t))throw Error("second arg must be public key");return c.fromHex(t).multiply(d(e)).toRawBytes(r)},sign:function(e,n,o=v){let{seed:s,k2sig:a}=function(e,n,o=v){if(["recovered","canonical"].some(e=>e in o))throw Error("sign() legacy options not supported");let{hash:s,randomBytes:a}=t,{lowS:u,prehash:p,extraEntropy:g}=o;null==u&&(u=!0),e=iK("msgHash",e),nx(o),p&&(e=iK("prehashed msgHash",s(e)));let w=y(e),C=d(n),E=[b(C),b(w)];if(null!=g&&!1!==g){let e=!0===g?a(r.BYTES):g;E.push(iK("extraEntropy",e))}return{seed:iZ(...E),k2sig:function(e){let t=m(e);if(!h(t))return;let r=ni(t,i),n=c.BASE.multiply(t).toAffine(),o=l(n.x);if(o===nS)return;let s=l(r*l(w+o*C));if(s===nS)return;let a=(n.x===o?0:2)|Number(n.y&nI),d=s;if(u&&s>i>>nI)d=s>i>>nI?l(-s):s,a^=1;return new f(o,d,a)}}}(e,n,o);return(function(e,t,r){if("number"!=typeof e||e<2)throw Error("hashLen must be a number");if("number"!=typeof t||t<2)throw Error("qByteLen must be a number");if("function"!=typeof r)throw Error("hmacFn must be a function");let i=iQ(e),n=iQ(e),o=0,s=()=>{i.fill(1),n.fill(0),o=0},a=(...e)=>r(n,i,...e),l=(e=iQ(0))=>{n=a(i0([0]),e),i=a(),0!==e.length&&(n=a(i0([1]),e),i=a())},c=()=>{if(o++>=1e3)throw Error("drbg: tried 1000 values");let e=0,r=[];for(;e{let r;for(s(),l(e);!(r=t(c()));)l();return s(),r}})(t.hash.outputLen,t.nByteLength,t.hmac)(s,a)},verify:function(e,r,n,o=C){let s,a;r=iK("msgHash",r),n=iK("publicKey",n);let{lowS:d,prehash:u,format:h}=o;if(nx(o),"strict"in o)throw Error("options.strict was renamed to lowS");if(void 0!==h&&"compact"!==h&&"der"!==h)throw Error("format must be compact or der");let p="string"==typeof e||iT(e),g=!p&&!h&&"object"==typeof e&&null!==e&&"bigint"==typeof e.r&&"bigint"==typeof e.s;if(!p&&!g)throw Error("invalid signature, expected Uint8Array, hex string or Signature instance");try{if(g&&(a=new f(e.r,e.s)),p){try{"compact"!==h&&(a=f.fromDER(e))}catch(e){if(!(e instanceof nA.Err))throw e}a||"der"===h||(a=f.fromCompact(e))}s=c.fromHex(n)}catch(e){return!1}if(!a||d&&a.hasHighS())return!1;u&&(r=t.hash(r));let{r:m,s:w}=a,b=y(r),v=ni(w,i),E=l(b*v),x=l(m*v),_=c.BASE.multiplyAndAddUnsafe(s,E,x)?.toAffine();return!!_&&l(_.x)===m},ProjectivePoint:c,Signature:f,utils:{isValidPrivateKey(e){try{return d(e),!0}catch(e){return!1}},normPrivateKeyToScalar:d,randomPrivateKey:()=>{let e=nh(t.n);return function(e,t,r=!1){let i=e.length,n=nu(t),o=nh(t);if(i<16||i1024)throw Error("expected "+o+"-1024 bytes of input, got "+i);let s=nt(r?iH(e):iz(e),t-i4)+i4;return r?iV(s,n):iq(s,n)}(t.randomBytes(e),t.n)},precompute:(e=8,t=c.BASE)=>(t._setWindowSize(e),t.multiply(BigInt(3)),t)}}})({...e,hash:t,hmac:(e,...r)=>ik(t,e,function(...e){let t=0;for(let r=0;r{let t=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-nP*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),n=BigInt("0x100000000000000000000000000000000"),o=nD(t*e,nO),s=nD(-r*e,nO),a=nt(e-o*t-s*i,nO),l=nt(-o*r-s*t,nO),c=a>n,d=l>n;if(c&&(a=nO-a),d&&(l=nO-l),a>n||l>n)throw Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:c,k1:a,k2neg:d,k2:l}}}},iI),nM={zero:48,nine:57,A:65,F:70,a:97,f:102};function nB(e){return e>=nM.zero&&e<=nM.nine?e-nM.zero:e>=nM.A&&e<=nM.F?e-(nM.A-10):e>=nM.a&&e<=nM.f?e-(nM.a-10):void 0}let nj=new TextEncoder;class nF extends rz{constructor(e){super(`Value \`${"object"==typeof e?rV(e):e}\` of type \`${typeof e}\` is an invalid Bytes value.`,{metaMessages:["Bytes values must be of type `Bytes`."]}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.InvalidBytesTypeError"})}}class nW extends rz{constructor({givenSize:e,maxSize:t}){super(`Size cannot exceed \`${t}\` bytes. Given size: \`${e}\` bytes.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeOverflowError"})}}class nz extends rz{constructor({size:e,targetSize:t,type:r}){super(`${r.charAt(0).toUpperCase()}${r.slice(1).toLowerCase()} size (\`${e}\`) exceeds padding size (\`${t}\`).`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Bytes.SizeExceedsPaddingSizeError"})}}class nH extends Map{constructor(e){super(),Object.defineProperty(this,"maxSize",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.maxSize=e}get(e){let t=super.get(e);return super.has(e)&&void 0!==t&&(this.delete(e),super.set(e,t)),t}set(e,t){if(super.set(e,t),this.maxSize&&this.size>this.maxSize){let e=this.keys().next().value;e&&this.delete(e)}return this}}let nq={checksum:new nH(8192)}.checksum,nV=BigInt(0),nK=BigInt(1),nZ=BigInt(2),nG=BigInt(7),nY=BigInt(256),nJ=BigInt(113),nX=[],nQ=[],n0=[];for(let e=0,t=nK,r=1,i=0;e<24;e++){[r,i]=[i,(2*r+3*i)%5],nX.push(2*(5*i+r)),nQ.push((e+1)*(e+2)/2%64);let n=nV;for(let e=0;e<7;e++)(t=(t<>nG)*nJ)%nY)&nZ&&(n^=nK<<(nK<r>32?iC(e,t,r):ib(e,t,r),n4=(e,t,r)=>r>32?iE(e,t,r):iv(e,t,r);class n6 extends id{constructor(e,t,r,i=!1,n=24){var o;if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=e,this.suffix=t,this.outputLen=r,this.enableXOF=i,this.rounds=n,ie(r),!(0=r&&this.keccak();let o=Math.min(r-this.posOut,n-i);e.set(t.subarray(this.posOut,this.posOut+o),i),this.posOut+=o,i+=o}return e}xofInto(e){if(!this.enableXOF)throw Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return ie(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(ii(e,this),this.finished)throw Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,io(this.state)}_cloneInto(e){let{blockLen:t,suffix:r,outputLen:i,rounds:n,enableXOF:o}=this;return e||(e=new n6(t,r,i,o,n)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=n,e.suffix=r,e.outputLen=i,e.enableXOF=o,e.destroyed=this.destroyed,e}}let n8=iu(()=>new n6(136,1,32));function n9(e,t={}){let{as:r="string"==typeof e?"Hex":"Bytes"}=t,i=n8(e instanceof Uint8Array?e:"string"==typeof e?function(e,t={}){let{size:r}=t,i=e;r&&(rH(e,r),i=rJ(e,r));let n=i.slice(2);n.length%2&&(n=`0${n}`);let o=n.length/2,s=new Uint8Array(o);for(let e=0,t=0;et)throw new nW({givenSize:e.length,maxSize:t})}(i,r),function(e,t={}){let{dir:r,size:i=32}=t;if(0===i)return e;if(e.length>i)throw new nz({size:e.length,targetSize:i,type:"Bytes"});let n=new Uint8Array(i);for(let t=0;t>1]>>4>=8&&i[e]&&(i[e]=i[e].toUpperCase()),(15&r[e>>1])>=8&&i[e+1]&&(i[e+1]=i[e+1].toUpperCase());let n=`0x${i.join("")}`;return nq.set(e,n),n}class oc extends rz{constructor({address:e,cause:t}){super(`Address "${e}" is invalid.`,{cause:t}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidAddressError"})}}class od extends rz{constructor(){super("Address is not a 20 byte (40 hexadecimal character) value."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidInputError"})}}class ou extends rz{constructor(){super("Address does not match its checksum counterpart."),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"Address.InvalidChecksumError"})}}var oh=r(13057);function op(e){return`${e<0?"-":""}0x${Math.abs(e).toString(16).padStart(2,"0")}`}class of{constructor(e,t){this.type=e,this.data=t}}class og extends Error{constructor(e){super(e),Object.setPrototypeOf(this,Object.create(og.prototype)),Object.defineProperty(this,"name",{configurable:!0,enumerable:!1,value:og.name})}}function om(e,t,r){e.setUint32(t,Math.floor(r/4294967296)),e.setUint32(t+4,r)}function oy(e,t){return 4294967296*e.getInt32(t)+e.getUint32(t+4)}let ow={type:-1,encode:function(e){return e instanceof Date?function({sec:e,nsec:t}){if(e>=0&&t>=0&&e<=17179869183){if(0===t&&e<=4294967295){let t=new Uint8Array(4);return new DataView(t.buffer).setUint32(0,e),t}{let r=e/4294967296,i=new Uint8Array(8),n=new DataView(i.buffer);return n.setUint32(0,t<<2|3&r),n.setUint32(4,4294967295&e),i}}{let r=new Uint8Array(12),i=new DataView(r.buffer);return i.setUint32(0,t),om(i,4,e),r}}(function(e){let t=e.getTime(),r=Math.floor(t/1e3),i=(t-1e3*r)*1e6,n=Math.floor(i/1e9);return{sec:r+n,nsec:i-1e9*n}}(e)):null},decode:function(e){let t=function(e){let t=new DataView(e.buffer,e.byteOffset,e.byteLength);switch(e.byteLength){case 4:return{sec:t.getUint32(0),nsec:0};case 8:{let e=t.getUint32(0);return{sec:(3&e)*4294967296+t.getUint32(4),nsec:e>>>2}}case 12:return{sec:oy(t,4),nsec:t.getUint32(0)};default:throw new og(`Unrecognized data size for timestamp (expected 4, 8, or 12): ${e.length}`)}}(e);return new Date(1e3*t.sec+t.nsec/1e6)}};class ob{constructor(){this.builtInEncoders=[],this.builtInDecoders=[],this.encoders=[],this.decoders=[],this.register(ow)}register({type:e,encode:t,decode:r}){if(e>=0)this.encoders[e]=t,this.decoders[e]=r;else{let i=-1-e;this.builtInEncoders[i]=t,this.builtInDecoders[i]=r}}tryToEncode(e,t){for(let r=0;r65535&&(r-=65536,o.push(r>>>10&1023|55296),r=56320|1023&r),o.push(r)}else o.push(t);o.length>=4096&&(s+=String.fromCharCode(...o),o.length=0)}return o.length>0&&(s+=String.fromCharCode(...o)),s}let oE=new TextDecoder;function ox(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e instanceof ArrayBuffer||"undefined"!=typeof SharedArrayBuffer&&e instanceof SharedArrayBuffer?new Uint8Array(e):Uint8Array.from(e)}class o_{constructor(e=16,t=16){this.hit=0,this.miss=0,this.maxKeyLength=e,this.maxLengthPerKey=t,this.caches=[];for(let e=0;e0&&e<=this.maxKeyLength}find(e,t,r){let i=this.caches[r-1];e:for(let n of i){let i=n.bytes;for(let n=0;n=this.maxLengthPerKey?r[Math.random()*r.length|0]=i:r.push(i)}decode(e,t,r){let i=this.find(e,t,r);if(null!=i)return this.hit++,i;this.miss++;let n=oC(e,t,r),o=Uint8Array.prototype.slice.call(e,t,t+r);return this.store(o,n),n}}let oA="array",oS="map_key",oI="map_value",oN=e=>{if("string"==typeof e||"number"==typeof e)return e;throw new og("The type of key must be string or number but "+typeof e)};class ok{constructor(){this.stack=[],this.stackHeadPosition=-1}get length(){return this.stackHeadPosition+1}top(){return this.stack[this.stackHeadPosition]}pushArrayState(e){let t=this.getUninitializedStateFromPool();t.type=oA,t.position=0,t.size=e,t.array=Array(e)}pushMapState(e){let t=this.getUninitializedStateFromPool();t.type=oS,t.readCount=0,t.size=e,t.map={}}getUninitializedStateFromPool(){return this.stackHeadPosition++,this.stackHeadPosition===this.stack.length&&this.stack.push({type:void 0,size:0,array:void 0,position:0,readCount:0,map:void 0,key:null}),this.stack[this.stackHeadPosition]}release(e){if(this.stack[this.stackHeadPosition]!==e)throw Error("Invalid stack state. Released state is not on top of the stack.");e.type===oA&&(e.size=0,e.array=void 0,e.position=0,e.type=void 0),(e.type===oS||e.type===oI)&&(e.size=0,e.map=void 0,e.readCount=0,e.type=void 0),this.stackHeadPosition--}reset(){this.stack.length=0,this.stackHeadPosition=-1}}let oR=new DataView(new ArrayBuffer(0)),oO=new Uint8Array(oR.buffer);try{oR.getInt8(0)}catch(e){if(!(e instanceof RangeError))throw Error("This module is not supported in the current JavaScript engine because DataView does not throw RangeError on out-of-bounds access")}let oT=RangeError("Insufficient data"),oP=new o_;class o${constructor(e){this.totalPos=0,this.pos=0,this.view=oR,this.bytes=oO,this.headByte=-1,this.stack=new ok,this.entered=!1,this.extensionCodec=e?.extensionCodec??ob.defaultCodec,this.context=e?.context,this.useBigInt64=e?.useBigInt64??!1,this.rawStrings=e?.rawStrings??!1,this.maxStrLength=e?.maxStrLength??4294967295,this.maxBinLength=e?.maxBinLength??4294967295,this.maxArrayLength=e?.maxArrayLength??4294967295,this.maxMapLength=e?.maxMapLength??4294967295,this.maxExtLength=e?.maxExtLength??4294967295,this.keyDecoder=e?.keyDecoder!==void 0?e.keyDecoder:oP,this.mapKeyConverter=e?.mapKeyConverter??oN}clone(){return new o$({extensionCodec:this.extensionCodec,context:this.context,useBigInt64:this.useBigInt64,rawStrings:this.rawStrings,maxStrLength:this.maxStrLength,maxBinLength:this.maxBinLength,maxArrayLength:this.maxArrayLength,maxMapLength:this.maxMapLength,maxExtLength:this.maxExtLength,keyDecoder:this.keyDecoder})}reinitializeState(){this.totalPos=0,this.headByte=-1,this.stack.reset()}setBuffer(e){let t=ox(e);this.bytes=t,this.view=new DataView(t.buffer,t.byteOffset,t.byteLength),this.pos=0}appendBuffer(e){if(-1!==this.headByte||this.hasRemaining(1)){let t=this.bytes.subarray(this.pos),r=ox(e),i=new Uint8Array(t.length+r.length);i.set(t),i.set(r,t.length),this.setBuffer(i)}else this.setBuffer(e)}hasRemaining(e){return this.view.byteLength-this.pos>=e}createExtraByteError(e){let{view:t,pos:r}=this;return RangeError(`Extra ${t.byteLength-r} of ${t.byteLength} byte(s) found at buffer[${e}]`)}decode(e){if(this.entered)return this.clone().decode(e);try{this.entered=!0,this.reinitializeState(),this.setBuffer(e);let t=this.doDecodeSync();if(this.hasRemaining(1))throw this.createExtraByteError(this.pos);return t}finally{this.entered=!1}}*decodeMulti(e){if(this.entered){let t=this.clone();yield*t.decodeMulti(e);return}try{for(this.entered=!0,this.reinitializeState(),this.setBuffer(e);this.hasRemaining(1);)yield this.doDecodeSync()}finally{this.entered=!1}}async decodeAsync(e){if(this.entered)return this.clone().decodeAsync(e);try{let t;this.entered=!0;let r=!1;for await(let i of e){if(r)throw this.entered=!1,this.createExtraByteError(this.totalPos);this.appendBuffer(i);try{t=this.doDecodeSync(),r=!0}catch(e){if(!(e instanceof RangeError))throw e}this.totalPos+=this.pos}if(r){if(this.hasRemaining(1))throw this.createExtraByteError(this.totalPos);return t}let{headByte:i,pos:n,totalPos:o}=this;throw RangeError(`Insufficient data in parsing ${op(i)} at ${o} (${n} in the current buffer)`)}finally{this.entered=!1}}decodeArrayStream(e){return this.decodeMultiAsync(e,!0)}decodeStream(e){return this.decodeMultiAsync(e,!1)}async *decodeMultiAsync(e,t){if(this.entered){let r=this.clone();yield*r.decodeMultiAsync(e,t);return}try{this.entered=!0;let r=t,i=-1;for await(let n of e){if(t&&0===i)throw this.createExtraByteError(this.totalPos);this.appendBuffer(n),r&&(i=this.readArraySize(),r=!1,this.complete());try{for(;yield this.doDecodeSync(),0!=--i;);}catch(e){if(!(e instanceof RangeError))throw e}this.totalPos+=this.pos}}finally{this.entered=!1}}doDecodeSync(){t:for(;;){let e;let t=this.readHeadByte();if(t>=224)e=t-256;else if(t<192){if(t<128)e=t;else if(t<144){let r=t-128;if(0!==r){this.pushMapState(r),this.complete();continue}e={}}else if(t<160){let r=t-144;if(0!==r){this.pushArrayState(r),this.complete();continue}e=[]}else{let r=t-160;e=this.decodeString(r,0)}}else if(192===t)e=null;else if(194===t)e=!1;else if(195===t)e=!0;else if(202===t)e=this.readF32();else if(203===t)e=this.readF64();else if(204===t)e=this.readU8();else if(205===t)e=this.readU16();else if(206===t)e=this.readU32();else if(207===t)e=this.useBigInt64?this.readU64AsBigInt():this.readU64();else if(208===t)e=this.readI8();else if(209===t)e=this.readI16();else if(210===t)e=this.readI32();else if(211===t)e=this.useBigInt64?this.readI64AsBigInt():this.readI64();else if(217===t){let t=this.lookU8();e=this.decodeString(t,1)}else if(218===t){let t=this.lookU16();e=this.decodeString(t,2)}else if(219===t){let t=this.lookU32();e=this.decodeString(t,4)}else if(220===t){let t=this.readU16();if(0!==t){this.pushArrayState(t),this.complete();continue}e=[]}else if(221===t){let t=this.readU32();if(0!==t){this.pushArrayState(t),this.complete();continue}e=[]}else if(222===t){let t=this.readU16();if(0!==t){this.pushMapState(t),this.complete();continue}e={}}else if(223===t){let t=this.readU32();if(0!==t){this.pushMapState(t),this.complete();continue}e={}}else if(196===t){let t=this.lookU8();e=this.decodeBinary(t,1)}else if(197===t){let t=this.lookU16();e=this.decodeBinary(t,2)}else if(198===t){let t=this.lookU32();e=this.decodeBinary(t,4)}else if(212===t)e=this.decodeExtension(1,0);else if(213===t)e=this.decodeExtension(2,0);else if(214===t)e=this.decodeExtension(4,0);else if(215===t)e=this.decodeExtension(8,0);else if(216===t)e=this.decodeExtension(16,0);else if(199===t){let t=this.lookU8();e=this.decodeExtension(t,1)}else if(200===t){let t=this.lookU16();e=this.decodeExtension(t,2)}else if(201===t){let t=this.lookU32();e=this.decodeExtension(t,4)}else throw new og(`Unrecognized type byte: ${op(t)}`);this.complete();let r=this.stack;for(;r.length>0;){let t=r.top();if(t.type===oA){if(t.array[t.position]=e,t.position++,t.position===t.size)e=t.array,r.release(t);else continue t}else if(t.type===oS){if("__proto__"===e)throw new og("The key __proto__ is not allowed");t.key=this.mapKeyConverter(e),t.type=oI;continue t}else if(t.map[t.key]=e,t.readCount++,t.readCount===t.size)e=t.map,r.release(t);else{t.key=null,t.type=oS;continue t}}return e}}readHeadByte(){return -1===this.headByte&&(this.headByte=this.readU8()),this.headByte}complete(){this.headByte=-1}readArraySize(){let e=this.readHeadByte();switch(e){case 220:return this.readU16();case 221:return this.readU32();default:if(e<160)return e-144;throw new og(`Unrecognized array type byte: ${op(e)}`)}}pushMapState(e){if(e>this.maxMapLength)throw new og(`Max length exceeded: map length (${e}) > maxMapLengthLength (${this.maxMapLength})`);this.stack.pushMapState(e)}pushArrayState(e){if(e>this.maxArrayLength)throw new og(`Max length exceeded: array length (${e}) > maxArrayLength (${this.maxArrayLength})`);this.stack.pushArrayState(e)}decodeString(e,t){return!this.rawStrings||this.stateIsMapKey()?this.decodeUtf8String(e,t):this.decodeBinary(e,t)}decodeUtf8String(e,t){let r;if(e>this.maxStrLength)throw new og(`Max length exceeded: UTF-8 byte length (${e}) > maxStrLength (${this.maxStrLength})`);if(this.bytes.byteLength200?function(e,t,r){let i=e.subarray(t,t+r);return oE.decode(i)}(n,i,e):oC(n,i,e)}return this.pos+=t+e,r}stateIsMapKey(){return this.stack.length>0&&this.stack.top().type===oS}decodeBinary(e,t){if(e>this.maxBinLength)throw new og(`Max length exceeded: bin length (${e}) > maxBinLength (${this.maxBinLength})`);if(!this.hasRemaining(e+t))throw oT;let r=this.pos+t,i=this.bytes.subarray(r,r+e);return this.pos+=t+e,i}decodeExtension(e,t){if(e>this.maxExtLength)throw new og(`Max length exceeded: ext length (${e}) > maxExtLength (${this.maxExtLength})`);let r=this.view.getInt8(this.pos+t),i=this.decodeBinary(e,t+1);return this.extensionCodec.decode(i,r,this.context)}lookU8(){return this.view.getUint8(this.pos)}lookU16(){return this.view.getUint16(this.pos)}lookU32(){return this.view.getUint32(this.pos)}readU8(){let e=this.view.getUint8(this.pos);return this.pos++,e}readI8(){let e=this.view.getInt8(this.pos);return this.pos++,e}readU16(){let e=this.view.getUint16(this.pos);return this.pos+=2,e}readI16(){let e=this.view.getInt16(this.pos);return this.pos+=2,e}readU32(){let e=this.view.getUint32(this.pos);return this.pos+=4,e}readI32(){let e=this.view.getInt32(this.pos);return this.pos+=4,e}readU64(){var e,t;let r=(e=this.view,t=this.pos,4294967296*e.getUint32(t)+e.getUint32(t+4));return this.pos+=8,r}readI64(){let e=oy(this.view,this.pos);return this.pos+=8,e}readU64AsBigInt(){let e=this.view.getBigUint64(this.pos);return this.pos+=8,e}readI64AsBigInt(){let e=this.view.getBigInt64(this.pos);return this.pos+=8,e}readF32(){let e=this.view.getFloat32(this.pos);return this.pos+=4,e}readF64(){let e=this.view.getFloat64(this.pos);return this.pos+=8,e}}class oD{constructor(e){this.entered=!1,this.extensionCodec=e?.extensionCodec??ob.defaultCodec,this.context=e?.context,this.useBigInt64=e?.useBigInt64??!1,this.maxDepth=e?.maxDepth??100,this.initialBufferSize=e?.initialBufferSize??2048,this.sortKeys=e?.sortKeys??!1,this.forceFloat32=e?.forceFloat32??!1,this.ignoreUndefined=e?.ignoreUndefined??!1,this.forceIntegerToFloat=e?.forceIntegerToFloat??!1,this.pos=0,this.view=new DataView(new ArrayBuffer(this.initialBufferSize)),this.bytes=new Uint8Array(this.view.buffer)}clone(){return new oD({extensionCodec:this.extensionCodec,context:this.context,useBigInt64:this.useBigInt64,maxDepth:this.maxDepth,initialBufferSize:this.initialBufferSize,sortKeys:this.sortKeys,forceFloat32:this.forceFloat32,ignoreUndefined:this.ignoreUndefined,forceIntegerToFloat:this.forceIntegerToFloat})}reinitializeState(){this.pos=0}encodeSharedRef(e){if(this.entered)return this.clone().encodeSharedRef(e);try{return this.entered=!0,this.reinitializeState(),this.doEncode(e,1),this.bytes.subarray(0,this.pos)}finally{this.entered=!1}}encode(e){if(this.entered)return this.clone().encode(e);try{return this.entered=!0,this.reinitializeState(),this.doEncode(e,1),this.bytes.slice(0,this.pos)}finally{this.entered=!1}}doEncode(e,t){if(t>this.maxDepth)throw Error(`Too deep objects in depth ${t}`);null==e?this.encodeNil():"boolean"==typeof e?this.encodeBoolean(e):"number"==typeof e?this.forceIntegerToFloat?this.encodeNumberAsFloat(e):this.encodeNumber(e):"string"==typeof e?this.encodeString(e):this.useBigInt64&&"bigint"==typeof e?this.encodeBigInt64(e):this.encodeObject(e,t)}ensureBufferSizeToWrite(e){let t=this.pos+e;this.view.byteLength=0?e<128?this.writeU8(e):e<256?(this.writeU8(204),this.writeU8(e)):e<65536?(this.writeU8(205),this.writeU16(e)):e<4294967296?(this.writeU8(206),this.writeU32(e)):this.useBigInt64?this.encodeNumberAsFloat(e):(this.writeU8(207),this.writeU64(e)):e>=-32?this.writeU8(224|e+32):e>=-128?(this.writeU8(208),this.writeI8(e)):e>=-32768?(this.writeU8(209),this.writeI16(e)):e>=-2147483648?(this.writeU8(210),this.writeI32(e)):this.useBigInt64?this.encodeNumberAsFloat(e):(this.writeU8(211),this.writeI64(e)):this.encodeNumberAsFloat(e)}encodeNumberAsFloat(e){this.forceFloat32?(this.writeU8(202),this.writeF32(e)):(this.writeU8(203),this.writeF64(e))}encodeBigInt64(e){e>=BigInt(0)?(this.writeU8(207),this.writeBigUint64(e)):(this.writeU8(211),this.writeBigInt64(e))}writeStringHeader(e){if(e<32)this.writeU8(160+e);else if(e<256)this.writeU8(217),this.writeU8(e);else if(e<65536)this.writeU8(218),this.writeU16(e);else if(e<4294967296)this.writeU8(219),this.writeU32(e);else throw Error(`Too long string: ${e} bytes in UTF-8`)}encodeString(e){var t,r,i;let n=function(e){let t=e.length,r=0,i=0;for(;i=55296&&n<=56319&&i50?ov.encodeInto(t,r.subarray(i)):function(e,t,r){let i=e.length,n=r,o=0;for(;o>6&31|192;else{if(r>=55296&&r<=56319&&o>12&15|224:(t[n++]=r>>18&7|240,t[n++]=r>>12&63|128),t[n++]=r>>6&63|128}t[n++]=63&r|128}}(t,r,i),this.pos+=n}encodeObject(e,t){let r=this.extensionCodec.tryToEncode(e,this.context);if(null!=r)this.encodeExtension(r);else if(Array.isArray(e))this.encodeArray(e,t);else if(ArrayBuffer.isView(e))this.encodeBinary(e);else if("object"==typeof e)this.encodeMap(e,t);else throw Error(`Unrecognized object: ${Object.prototype.toString.apply(e)}`)}encodeBinary(e){let t=e.byteLength;if(t<256)this.writeU8(196),this.writeU8(t);else if(t<65536)this.writeU8(197),this.writeU16(t);else if(t<4294967296)this.writeU8(198),this.writeU32(t);else throw Error(`Too large binary: ${t}`);let r=ox(e);this.writeU8a(r)}encodeArray(e,t){let r=e.length;if(r<16)this.writeU8(144+r);else if(r<65536)this.writeU8(220),this.writeU16(r);else if(r<4294967296)this.writeU8(221),this.writeU32(r);else throw Error(`Too large array: ${r}`);for(let r of e)this.doEncode(r,t+1)}countWithoutUndefined(e,t){let r=0;for(let i of t)void 0!==e[i]&&r++;return r}encodeMap(e,t){let r=Object.keys(e);this.sortKeys&&r.sort();let i=this.ignoreUndefined?this.countWithoutUndefined(e,r):r.length;if(i<16)this.writeU8(128+i);else if(i<65536)this.writeU8(222),this.writeU16(i);else if(i<4294967296)this.writeU8(223),this.writeU32(i);else throw Error(`Too large map object: ${i}`);for(let i of r){let r=e[i];this.ignoreUndefined&&void 0===r||(this.encodeString(i),this.doEncode(r,t+1))}}encodeExtension(e){if("function"==typeof e.data){let t=e.data(this.pos+6),r=t.length;if(r>=4294967296)throw Error(`Too large extension object: ${r}`);this.writeU8(201),this.writeU32(r),this.writeI8(e.type),this.writeU8a(t);return}let t=e.data.length;if(1===t)this.writeU8(212);else if(2===t)this.writeU8(213);else if(4===t)this.writeU8(214);else if(8===t)this.writeU8(215);else if(16===t)this.writeU8(216);else if(t<256)this.writeU8(199),this.writeU8(t);else if(t<65536)this.writeU8(200),this.writeU16(t);else if(t<4294967296)this.writeU8(201),this.writeU32(t);else throw Error(`Too large extension object: ${t}`);this.writeI8(e.type),this.writeU8a(e.data)}writeU8(e){this.ensureBufferSizeToWrite(1),this.view.setUint8(this.pos,e),this.pos++}writeU8a(e){let t=e.length;this.ensureBufferSizeToWrite(t),this.bytes.set(e,this.pos),this.pos+=t}writeI8(e){this.ensureBufferSizeToWrite(1),this.view.setInt8(this.pos,e),this.pos++}writeU16(e){this.ensureBufferSizeToWrite(2),this.view.setUint16(this.pos,e),this.pos+=2}writeI16(e){this.ensureBufferSizeToWrite(2),this.view.setInt16(this.pos,e),this.pos+=2}writeU32(e){this.ensureBufferSizeToWrite(4),this.view.setUint32(this.pos,e),this.pos+=4}writeI32(e){this.ensureBufferSizeToWrite(4),this.view.setInt32(this.pos,e),this.pos+=4}writeF32(e){this.ensureBufferSizeToWrite(4),this.view.setFloat32(this.pos,e),this.pos+=4}writeF64(e){this.ensureBufferSizeToWrite(8),this.view.setFloat64(this.pos,e),this.pos+=8}writeU64(e){var t,r;this.ensureBufferSizeToWrite(8),t=this.view,r=this.pos,t.setUint32(r,e/4294967296),t.setUint32(r+4,e),this.pos+=8}writeI64(e){this.ensureBufferSizeToWrite(8),om(this.view,this.pos,e),this.pos+=8}writeBigUint64(e){this.ensureBufferSizeToWrite(8),this.view.setBigUint64(this.pos,e),this.pos+=8}writeBigInt64(e){this.ensureBufferSizeToWrite(8),this.view.setBigInt64(this.pos,e),this.pos+=8}}function oU(e,t){return!!Array.isArray(t)&&(0===t.length||(e?t.every(e=>"string"==typeof e):t.every(e=>Number.isSafeInteger(e))))}function oL(e,t){if("string"!=typeof t)throw Error(`${e}: string expected`);return!0}function oM(e){if(!Number.isSafeInteger(e))throw Error(`invalid integer: ${e}`)}function oB(e){if(!Array.isArray(e))throw Error("array expected")}function oj(e,t){if(!oU(!0,t))throw Error(`${e}: array of strings expected`)}function oF(...e){let t=e=>e,r=(e,t)=>r=>e(t(r));return{encode:e.map(e=>e.encode).reduceRight(r,t),decode:e.map(e=>e.decode).reduce(r,t)}}function oW(e){let t="string"==typeof e?e.split(""):e,r=t.length;oj("alphabet",t);let i=new Map(t.map((e,t)=>[e,t]));return{encode:i=>(oB(i),i.map(i=>{if(!Number.isSafeInteger(i)||i<0||i>=r)throw Error(`alphabet.encode: digit index outside alphabet "${i}". Allowed: ${e}`);return t[i]})),decode:t=>(oB(t),t.map(t=>{oL("alphabet.decode",t);let r=i.get(t);if(void 0===r)throw Error(`Unknown letter: "${t}". Allowed: ${e}`);return r}))}}function oz(e=""){return oL("join",e),{encode:t=>(oj("join.decode",t),t.join(e)),decode:t=>(oL("join.decode",t),t.split(e))}}let oH=(e,t)=>0===t?e:oH(t,e%t),oq=(e,t)=>e+(t-oH(e,t)),oV=(()=>{let e=[];for(let t=0;t<40;t++)e.push(2**t);return e})();function oK(e,t,r,i){if(oB(e),t<=0||t>32)throw Error(`convertRadix2: wrong from=${t}`);if(r<=0||r>32)throw Error(`convertRadix2: wrong to=${r}`);if(oq(t,r)>32)throw Error(`convertRadix2: carry overflow from=${t} to=${r} carryBits=${oq(t,r)}`);let n=0,o=0,s=oV[t],a=oV[r]-1,l=[];for(let i of e){if(oM(i),i>=s)throw Error(`convertRadix2: invalid data word=${i} from=${t}`);if(n=n<32)throw Error(`convertRadix2: carry overflow pos=${o} from=${t}`);for(o+=t;o>=r;o-=r)l.push((n>>o-r&a)>>>0);let e=oV[o];if(void 0===e)throw Error("invalid carry");n&=e-1}if(n=n<=t)throw Error("Excess padding");if(!i&&n>0)throw Error(`Non-zero padding: ${n}`);return i&&o>0&&l.push(n>>>0),l}let oZ=oF(function(e,t=!1){if(oM(5),e>32)throw Error("radix2: bits should be in (0..32]");if(oq(8,e)>32||oq(e,8)>32)throw Error("radix2: carry overflow");return{encode:r=>{var i;if(!((i=r)instanceof Uint8Array||ArrayBuffer.isView(i)&&"Uint8Array"===i.constructor.name))throw Error("radix2.encode input should be Uint8Array");return oK(Array.from(r),8,e,!t)},decode:r=>((function(e,t){if(!oU(!1,t))throw Error(`${e}: array of numbers expected`)})("radix2.decode",r),Uint8Array.from(oK(r,e,8,t)))}}(5),oW("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"),function(e,t="="){return oM(5),oL("padding",t),{encode(e){for(oj("padding.encode",e);5*e.length%8;)e.push(t);return e},decode(r){oj("padding.decode",r);let i=r.length;if(i*e%8)throw Error("padding: invalid, string should have whole number of bytes");for(;i>0&&r[i-1]===t;i--)if((i-1)*e%8==0)throw Error("padding: invalid, string has too much padding");return r.slice(0,i)}}}(5),oz("")),oG=("function"==typeof Uint8Array.from([]).toBase64&&Uint8Array.fromBase64,[996825010,642813549,513874426,1027748829,705979059]);function oY(e){return null!=globalThis.Buffer?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e}function oJ(e=0){return null!=globalThis.Buffer&&null!=globalThis.Buffer.allocUnsafe?oY(globalThis.Buffer.allocUnsafe(e)):new Uint8Array(e)}function oX(e,t){t||(t=e.reduce((e,t)=>e+t.length,0));let r=oJ(t),i=0;for(let t of e)r.set(t,i),i+=t.length;return oY(r)}"function"==typeof Uint8Array.from([]).toHex&&"function"==typeof Uint8Array.fromHex||function(e){if("function"!=typeof e)throw Error("function expected")}(e=>{if("string"!=typeof e||e.length%2!=0)throw TypeError(`hex.decode: expected string, got ${typeof e} with length ${e.length}`);return e.toLowerCase()});var oQ=function(e,t){if(e.length>=255)throw TypeError("Alphabet too long");for(var r=new Uint8Array(256),i=0;i>>0,s=new Uint8Array(o);e[t];){var d=r[e.charCodeAt(t)];if(255===d)return;for(var u=0,h=o-1;(0!==d||u>>0,s[h]=d%256>>>0,d=d/256>>>0;if(0!==d)throw Error("Non-zero carry");n=u,t++}if(" "!==e[t]){for(var p=o-n;p!==o&&0===s[p];)p++;for(var f=new Uint8Array(i+(o-p)),g=i;p!==o;)f[g++]=s[p++];return f}}}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw TypeError("Expected Uint8Array");if(0===t.length)return"";for(var r=0,i=0,n=0,o=t.length;n!==o&&0===t[n];)n++,r++;for(var s=(o-n)*d+1>>>0,c=new Uint8Array(s);n!==o;){for(var u=t[n],h=0,p=s-1;(0!==u||h>>0,c[p]=u%a>>>0,u=u/a>>>0;if(0!==u)throw Error("Non-zero carry");i=h,n++}for(var f=s-i;f!==s&&0===c[f];)f++;for(var g=l.repeat(r);f{if(e===t)return!0;if(e.byteLength!==t.byteLength)return!1;for(let r=0;r{if(e instanceof Uint8Array&&"Uint8Array"===e.constructor.name)return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw Error("Unknown type, must be binary type")},o2=e=>new TextEncoder().encode(e),o3=e=>new TextDecoder().decode(e);class o5{constructor(e,t,r){this.name=e,this.prefix=t,this.baseEncode=r}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class o4{constructor(e,t,r){if(this.name=e,this.prefix=t,void 0===t.codePointAt(0))throw Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=r}decode(e){if("string"==typeof e){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(e){return o8(this,e)}}class o6{constructor(e){this.decoders=e}or(e){return o8(this,e)}decode(e){let t=e[0],r=this.decoders[t];if(r)return r.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}let o8=(e,t)=>new o6({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class o9{constructor(e,t,r,i){this.name=e,this.prefix=t,this.baseEncode=r,this.baseDecode=i,this.encoder=new o5(e,t,r),this.decoder=new o4(e,t,i)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}let o7=({name:e,prefix:t,encode:r,decode:i})=>new o9(e,t,r,i),se=({prefix:e,name:t,alphabet:r})=>{let{encode:i,decode:n}=oQ(r,t);return o7({prefix:e,name:t,encode:i,decode:e=>o1(n(e))})},st=(e,t,r,i)=>{let n={};for(let e=0;e=8&&(a-=8,s[c++]=255&l>>a)}if(a>=r||255&l<<8-a)throw SyntaxError("Unexpected end of data");return s},sr=(e,t,r)=>{let i="="===t[t.length-1],n=(1<r;)s-=r,o+=t[n&a>>s];if(s&&(o+=t[n&a<o7({prefix:t,name:e,encode:e=>sr(e,i,r),decode:t=>st(t,i,r,e)}),sn=o7({prefix:"\0",name:"identity",encode:e=>o3(e),decode:e=>o2(e)}),so=si({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1}),ss=si({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3}),sa=se({prefix:"9",name:"base10",alphabet:"0123456789"}),sl=si({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),sc=si({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4}),sd=si({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),su=si({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),sh=si({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),sp=si({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),sf=si({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),sg=si({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5}),sm=si({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),sy=si({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),sw=si({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5}),sb=se({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),sv=se({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"}),sC=se({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),sE=se({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"}),sx=si({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6}),s_=si({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),sA=si({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),sS=si({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6}),sI=Array.from("\uD83D\uDE80\uD83E\uDE90☄\uD83D\uDEF0\uD83C\uDF0C\uD83C\uDF11\uD83C\uDF12\uD83C\uDF13\uD83C\uDF14\uD83C\uDF15\uD83C\uDF16\uD83C\uDF17\uD83C\uDF18\uD83C\uDF0D\uD83C\uDF0F\uD83C\uDF0E\uD83D\uDC09☀\uD83D\uDCBB\uD83D\uDDA5\uD83D\uDCBE\uD83D\uDCBF\uD83D\uDE02❤\uD83D\uDE0D\uD83E\uDD23\uD83D\uDE0A\uD83D\uDE4F\uD83D\uDC95\uD83D\uDE2D\uD83D\uDE18\uD83D\uDC4D\uD83D\uDE05\uD83D\uDC4F\uD83D\uDE01\uD83D\uDD25\uD83E\uDD70\uD83D\uDC94\uD83D\uDC96\uD83D\uDC99\uD83D\uDE22\uD83E\uDD14\uD83D\uDE06\uD83D\uDE44\uD83D\uDCAA\uD83D\uDE09☺\uD83D\uDC4C\uD83E\uDD17\uD83D\uDC9C\uD83D\uDE14\uD83D\uDE0E\uD83D\uDE07\uD83C\uDF39\uD83E\uDD26\uD83C\uDF89\uD83D\uDC9E✌✨\uD83E\uDD37\uD83D\uDE31\uD83D\uDE0C\uD83C\uDF38\uD83D\uDE4C\uD83D\uDE0B\uD83D\uDC97\uD83D\uDC9A\uD83D\uDE0F\uD83D\uDC9B\uD83D\uDE42\uD83D\uDC93\uD83E\uDD29\uD83D\uDE04\uD83D\uDE00\uD83D\uDDA4\uD83D\uDE03\uD83D\uDCAF\uD83D\uDE48\uD83D\uDC47\uD83C\uDFB6\uD83D\uDE12\uD83E\uDD2D❣\uD83D\uDE1C\uD83D\uDC8B\uD83D\uDC40\uD83D\uDE2A\uD83D\uDE11\uD83D\uDCA5\uD83D\uDE4B\uD83D\uDE1E\uD83D\uDE29\uD83D\uDE21\uD83E\uDD2A\uD83D\uDC4A\uD83E\uDD73\uD83D\uDE25\uD83E\uDD24\uD83D\uDC49\uD83D\uDC83\uD83D\uDE33✋\uD83D\uDE1A\uD83D\uDE1D\uD83D\uDE34\uD83C\uDF1F\uD83D\uDE2C\uD83D\uDE43\uD83C\uDF40\uD83C\uDF37\uD83D\uDE3B\uD83D\uDE13⭐✅\uD83E\uDD7A\uD83C\uDF08\uD83D\uDE08\uD83E\uDD18\uD83D\uDCA6✔\uD83D\uDE23\uD83C\uDFC3\uD83D\uDC90☹\uD83C\uDF8A\uD83D\uDC98\uD83D\uDE20☝\uD83D\uDE15\uD83C\uDF3A\uD83C\uDF82\uD83C\uDF3B\uD83D\uDE10\uD83D\uDD95\uD83D\uDC9D\uD83D\uDE4A\uD83D\uDE39\uD83D\uDDE3\uD83D\uDCAB\uD83D\uDC80\uD83D\uDC51\uD83C\uDFB5\uD83E\uDD1E\uD83D\uDE1B\uD83D\uDD34\uD83D\uDE24\uD83C\uDF3C\uD83D\uDE2B⚽\uD83E\uDD19☕\uD83C\uDFC6\uD83E\uDD2B\uD83D\uDC48\uD83D\uDE2E\uD83D\uDE46\uD83C\uDF7B\uD83C\uDF43\uD83D\uDC36\uD83D\uDC81\uD83D\uDE32\uD83C\uDF3F\uD83E\uDDE1\uD83C\uDF81⚡\uD83C\uDF1E\uD83C\uDF88❌✊\uD83D\uDC4B\uD83D\uDE30\uD83E\uDD28\uD83D\uDE36\uD83E\uDD1D\uD83D\uDEB6\uD83D\uDCB0\uD83C\uDF53\uD83D\uDCA2\uD83E\uDD1F\uD83D\uDE41\uD83D\uDEA8\uD83D\uDCA8\uD83E\uDD2C✈\uD83C\uDF80\uD83C\uDF7A\uD83E\uDD13\uD83D\uDE19\uD83D\uDC9F\uD83C\uDF31\uD83D\uDE16\uD83D\uDC76\uD83E\uDD74▶➡❓\uD83D\uDC8E\uD83D\uDCB8⬇\uD83D\uDE28\uD83C\uDF1A\uD83E\uDD8B\uD83D\uDE37\uD83D\uDD7A⚠\uD83D\uDE45\uD83D\uDE1F\uD83D\uDE35\uD83D\uDC4E\uD83E\uDD32\uD83E\uDD20\uD83E\uDD27\uD83D\uDCCC\uD83D\uDD35\uD83D\uDC85\uD83E\uDDD0\uD83D\uDC3E\uD83C\uDF52\uD83D\uDE17\uD83E\uDD11\uD83C\uDF0A\uD83E\uDD2F\uD83D\uDC37☎\uD83D\uDCA7\uD83D\uDE2F\uD83D\uDC86\uD83D\uDC46\uD83C\uDFA4\uD83D\uDE47\uD83C\uDF51❄\uD83C\uDF34\uD83D\uDCA3\uD83D\uDC38\uD83D\uDC8C\uD83D\uDCCD\uD83E\uDD40\uD83E\uDD22\uD83D\uDC45\uD83D\uDCA1\uD83D\uDCA9\uD83D\uDC50\uD83D\uDCF8\uD83D\uDC7B\uD83E\uDD10\uD83E\uDD2E\uD83C\uDFBC\uD83E\uDD75\uD83D\uDEA9\uD83C\uDF4E\uD83C\uDF4A\uD83D\uDC7C\uD83D\uDC8D\uD83D\uDCE3\uD83E\uDD42"),sN=sI.reduce((e,t,r)=>(e[r]=t,e),[]),sk=sI.reduce((e,t,r)=>(e[t.codePointAt(0)]=r,e),[]),sR=o7({prefix:"\uD83D\uDE80",name:"base256emoji",encode:function(e){return e.reduce((e,t)=>e+=sN[t],"")},decode:function(e){let t=[];for(let r of e){let e=sk[r.codePointAt(0)];if(void 0===e)throw Error(`Non-base256emoji character: ${r}`);t.push(e)}return new Uint8Array(t)}});var sO=function e(t,r,i){r=r||[];for(var n=i=i||0;t>=2147483648;)r[i++]=255&t|128,t/=128;for(;-128&t;)r[i++]=255&t|128,t>>>=7;return r[i]=0|t,e.bytes=i-n+1,r},sT=function e(t,r){var i,n=0,r=r||0,o=0,s=r,a=t.length;do{if(s>=a)throw e.bytes=0,RangeError("Could not decode varint");i=t[s++],n+=o<28?(127&i)<=128);return e.bytes=s-r,n};let sP=(e,t=0)=>[sT(e,t),sT.bytes],s$=(e,t,r=0)=>(sO(e,t,r),t),sD=e=>e<128?1:e<16384?2:e<2097152?3:e<268435456?4:e<34359738368?5:e<4398046511104?6:e<562949953421312?7:e<72057594037927940?8:e<0x7fffffffffffffff?9:10,sU=(e,t)=>{let r=t.byteLength,i=sD(e),n=i+sD(r),o=new Uint8Array(n+r);return s$(e,o,0),s$(r,o,i),o.set(t,n),new sB(e,r,t,o)},sL=e=>{let t=o1(e),[r,i]=sP(t),[n,o]=sP(t.subarray(i)),s=t.subarray(i+o);if(s.byteLength!==n)throw Error("Incorrect length");return new sB(r,n,s,t)},sM=(e,t)=>e===t||e.code===t.code&&e.size===t.size&&o0(e.bytes,t.bytes);class sB{constructor(e,t,r,i){this.code=e,this.size=t,this.digest=r,this.bytes=i}}let sj=({name:e,code:t,encode:r})=>new sF(e,t,r);class sF{constructor(e,t,r){this.name=e,this.code=t,this.encode=r}digest(e){if(e instanceof Uint8Array){let t=this.encode(e);return t instanceof Uint8Array?sU(this.code,t):t.then(e=>sU(this.code,e))}throw Error("Unknown type, must be binary type")}}let sW=e=>async t=>new Uint8Array(await crypto.subtle.digest(e,t)),sz=sj({name:"sha2-256",code:18,encode:sW("SHA-256")}),sH=sj({name:"sha2-512",code:19,encode:sW("SHA-512")}),sq={code:0,name:"identity",encode:o1,digest:e=>sU(0,o1(e))},sV="raw",sK=85,sZ=e=>o1(e),sG=e=>o1(e),sY=new TextEncoder,sJ=new TextDecoder,sX="json",sQ=512,s0=e=>sY.encode(JSON.stringify(e)),s1=e=>JSON.parse(sJ.decode(e));class s2{constructor(e,t,r,i){this.code=t,this.version=e,this.multihash=r,this.bytes=i,this.byteOffset=i.byteOffset,this.byteLength=i.byteLength,this.asCID=this,this._baseCache=new Map,Object.defineProperties(this,{byteOffset:at,byteLength:at,code:ae,version:ae,multihash:ae,bytes:ae,_baseCache:at,asCID:at})}toV0(){if(0===this.version)return this;{let{code:e,multihash:t}=this;if(e!==s6)throw Error("Cannot convert a non dag-pb CID to CIDv0");if(t.code!==s8)throw Error("Cannot convert non sha2-256 multihash CID to CIDv0");return s2.createV0(t)}}toV1(){switch(this.version){case 0:{let{code:e,digest:t}=this.multihash,r=sU(e,t);return s2.createV1(this.code,r)}case 1:return this;default:throw Error(`Can not convert CID version ${this.version} to version 0. This is a bug please report`)}}equals(e){return e&&this.code===e.code&&this.version===e.version&&sM(this.multihash,e.multihash)}toString(e){let{bytes:t,version:r,_baseCache:i}=this;return 0===r?s5(t,i,e||sC.encoder):s4(t,i,e||sd.encoder)}toJSON(){return{code:this.code,version:this.version,hash:this.multihash.bytes}}get[Symbol.toStringTag](){return"CID"}[Symbol.for("nodejs.util.inspect.custom")](){return"CID("+this.toString()+")"}static isCID(e){return ar(/^0\.0/,ai),!!(e&&(e[s7]||e.asCID===e))}get toBaseEncodedString(){throw Error("Deprecated, use .toString()")}get codec(){throw Error('"codec" property is deprecated, use integer "code" property instead')}get buffer(){throw Error("Deprecated .buffer property, use .bytes to get Uint8Array instead")}get multibaseName(){throw Error('"multibaseName" property is deprecated')}get prefix(){throw Error('"prefix" property is deprecated')}static asCID(e){if(e instanceof s2)return e;if(null!=e&&e.asCID===e){let{version:t,code:r,multihash:i,bytes:n}=e;return new s2(t,r,i,n||s9(t,r,i.bytes))}if(null==e||!0!==e[s7])return null;{let{version:t,multihash:r,code:i}=e,n=sL(r);return s2.create(t,i,n)}}static create(e,t,r){if("number"!=typeof t)throw Error("String codecs are no longer supported");switch(e){case 0:if(t===s6)return new s2(e,t,r,r.bytes);throw Error(`Version 0 CID must use dag-pb (code: ${s6}) block encoding`);case 1:{let i=s9(e,t,r.bytes);return new s2(e,t,r,i)}default:throw Error("Invalid version")}}static createV0(e){return s2.create(0,s6,e)}static createV1(e,t){return s2.create(1,e,t)}static decode(e){let[t,r]=s2.decodeFirst(e);if(r.length)throw Error("Incorrect length");return t}static decodeFirst(e){let t=s2.inspectBytes(e),r=t.size-t.multihashSize,i=o1(e.subarray(r,r+t.multihashSize));if(i.byteLength!==t.multihashSize)throw Error("Incorrect length");let n=i.subarray(t.multihashSize-t.digestSize),o=new sB(t.multihashCode,t.digestSize,n,i);return[0===t.version?s2.createV0(o):s2.createV1(t.codec,o),e.subarray(t.size)]}static inspectBytes(e){let t=0,r=()=>{let[r,i]=sP(e.subarray(t));return t+=i,r},i=r(),n=s6;if(18===i?(i=0,t=0):1===i&&(n=r()),0!==i&&1!==i)throw RangeError(`Invalid CID version ${i}`);let o=t,s=r(),a=r(),l=t+a;return{version:i,codec:n,multihashCode:s,digestSize:a,multihashSize:l-o,size:l}}static parse(e,t){let[r,i]=s3(e,t),n=s2.decode(i);return n._baseCache.set(r,e),n}}let s3=(e,t)=>{switch(e[0]){case"Q":return[sC.prefix,(t||sC).decode(`${sC.prefix}${e}`)];case sC.prefix:return[sC.prefix,(t||sC).decode(e)];case sd.prefix:return[sd.prefix,(t||sd).decode(e)];default:if(null==t)throw Error("To parse non base32 or base58btc encoded CID multibase decoder must be provided");return[e[0],t.decode(e)]}},s5=(e,t,r)=>{let{prefix:i}=r;if(i!==sC.prefix)throw Error(`Cannot string encode V0 in ${r.name} encoding`);let n=t.get(i);if(null!=n)return n;{let n=r.encode(e).slice(1);return t.set(i,n),n}},s4=(e,t,r)=>{let{prefix:i}=r,n=t.get(i);if(null!=n)return n;{let n=r.encode(e);return t.set(i,n),n}},s6=112,s8=18,s9=(e,t,r)=>{let i=sD(e),n=i+sD(t),o=new Uint8Array(n+r.byteLength);return s$(e,o,0),s$(t,o,i),o.set(r,n),o},s7=Symbol.for("@ipld/js-cid/CID"),ae={writable:!1,configurable:!1,enumerable:!0},at={writable:!1,enumerable:!1,configurable:!1},ar=(e,t)=>{if(e.test("0.0.0-dev"))console.warn(t);else throw Error(t)},ai=`CID.isCID(v) is deprecated and will be removed in the next major release. +Following code pattern: + +if (CID.isCID(value)) { + doSomethingWithCID(value) +} + +Is replaced with: + +const cid = CID.asCID(value) +if (cid) { + // Make sure to use cid instead of value + doSomethingWithCID(cid) +} +`,an={...n,...o,...s,...a,...l,...c,...d,...u,...h,...p};function ao(e,t,r,i){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:r},decoder:{decode:i}}}({...f,...g});let as=ao("utf8","u",e=>"u"+new TextDecoder("utf8").decode(e),e=>new TextEncoder().encode(e.substring(1))),aa=ao("ascii","a",e=>{let t="a";for(let r=0;r{let t=oJ((e=e.substring(1)).length);for(let r=0;rt in e?ay(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,a_=(e,t)=>{for(var r in t||(t={}))aC.call(t,r)&&ax(e,r,t[r]);if(av)for(var r of av(t))aE.call(t,r)&&ax(e,r,t[r]);return e},aA=(e,t)=>aw(e,ab(t)),aS=(e,t,r)=>ax(e,"symbol"!=typeof t?t+"":t,r);let aI={reactNative:"react-native",node:"node",browser:"browser",unknown:"unknown"};function aN(){return"u">typeof ap&&"u">typeof ap.versions&&"u">typeof ap.versions.node}function ak(){return!(0,rF.getDocument)()&&!!(0,rF.getNavigator)()&&"ReactNative"===navigator.product}function aR(){return!aN()&&!!(0,rF.getNavigator)()&&!!(0,rF.getDocument)()}function aO(){return ak()?aI.reactNative:aN()?aI.node:aR()?aI.browser:aI.unknown}function aT(){var e;try{return ak()&&"u">typeof global&&"u">typeof(null==global?void 0:global.Application)?null==(e=global.Application)?void 0:e.applicationId:void 0}catch{return}}function aP(){return(0,rW.D)()||{name:"",description:"",url:"",icons:[""]}}function a$(e,t,r){let i=function(){if(aO()===aI.reactNative&&"u">typeof global&&"u">typeof(null==global?void 0:global.Platform)){let{OS:e,Version:t}=global.Platform;return[e,t].join("-")}let e="undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product?new rL:"undefined"!=typeof navigator?function(e){var t=""!==e&&rB.reduce(function(t,r){var i=r[0],n=r[1];if(t)return t;var o=n.exec(e);return!!o&&[i,o]},!1);if(!t)return null;var r=t[0],i=t[1];if("searchbot"===r)return new rU;var n=i[1]&&i[1].split(".").join("_").split("_").slice(0,3);n?n.length<3&&(n=rT(rT([],n,!0),function(e){for(var t=[],r=0;rt.includes(e)).length===e.length}function aU(e){return Object.fromEntries(e.entries())}function aL(e){return new Map(Object.entries(e))}function aM(e=b.FIVE_MINUTES,t){let r,i,n,o;let s=(0,b.toMiliseconds)(e||b.FIVE_MINUTES);return{resolve:e=>{n&&r&&(clearTimeout(n),r(e),o=Promise.resolve(e))},reject:e=>{n&&i&&(clearTimeout(n),i(e))},done:()=>new Promise((e,a)=>{if(o)return e(o);n=setTimeout(()=>{let e=Error(t);o=Promise.reject(e),a(e)},s),r=e,i=a})}}function aB(e,t,r){return new Promise(async(i,n)=>{let o=setTimeout(()=>n(Error(r)),t);try{let t=await e;i(t)}catch(e){n(e)}clearTimeout(o)})}function aj(e,t){if("string"==typeof t&&t.startsWith(`${e}:`))return t;if("topic"===e.toLowerCase()){if("string"!=typeof t)throw Error('Value must be "string" for expirer target type: topic');return`topic:${t}`}if("id"===e.toLowerCase()){if("number"!=typeof t)throw Error('Value must be "number" for expirer target type: id');return`id:${t}`}throw Error(`Unknown expirer target type: ${e}`)}function aF(e){let[t,r]=e.split(":"),i={id:void 0,topic:void 0};if("topic"===t&&"string"==typeof r)i.topic=r;else if("id"===t&&Number.isInteger(Number(r)))i.id=Number(r);else throw Error(`Invalid target, expected id:number or topic:string, got ${t}:${r}`);return i}function aW(e,t){return(0,b.fromMiliseconds)((t||Date.now())+(0,b.toMiliseconds)(e))}function az(e){return Date.now()>=(0,b.toMiliseconds)(e)}function aH(e,t){return`${e}${t?`:${t}`:""}`}function aq(e=[],t=[]){return[...new Set([...e,...t])]}async function aV({id:e,topic:t,wcDeepLink:r}){var i;try{if(!r)return;let n="string"==typeof r?JSON.parse(r):r,o=n?.href;if("string"!=typeof o)return;let s=function(e,t,r){let i=`requestId=${t}&sessionTopic=${r}`;e.endsWith("/")&&(e=e.slice(0,-1));let n=`${e}`;if(e.startsWith("https://t.me")){let t=e.includes("?")?"&startapp=":"?startapp=";n=`${n}${t}${function(e,t=!1){let r=af.from(e).toString("base64");return t?r.replace(/[=]/g,""):r}(i,!0)}`}else n=`${n}/wc?${i}`;return n}(o,e,t),a=aO();if(a===aI.browser){let e;if(!(null!=(i=(0,rF.getDocument)())&&i.hasFocus())){console.warn("Document does not have focus, skipping deeplink.");return}e="_self",function(){try{return window.self!==window.top}catch{return!1}}()?e="_top":("u">typeof window&&(!!window.TelegramWebviewProxy||!!window.Telegram||!!window.TelegramWebviewProxyProto)||s.startsWith("https://")||s.startsWith("http://"))&&(e="_blank"),window.open(s,e,"noreferrer noopener")}else a===aI.reactNative&&"u">typeof(null==global?void 0:global.Linking)&&await global.Linking.openURL(s)}catch(e){console.error(e)}}async function aK(e,t){let r="";try{if(aR()&&(r=localStorage.getItem(t)))return r;r=await e.getItem(t)}catch(e){console.error(e)}return r}function aZ(e,t){if(!e.includes(t))return null;let r=e.split(/([&,?,=])/),i=r.indexOf(t);return r[i+2]}function aG(){return"u">typeof crypto&&null!=crypto&&crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/gu,e=>{let t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}function aY(){return"u">typeof ap&&"true"===ap.env.IS_VITEST}function aJ(e){return af.from(e,"base64").toString("utf-8")}class aX{constructor({limit:e}){aS(this,"limit"),aS(this,"set"),this.limit=e,this.set=new Set}add(e){if(!this.set.has(e)){if(this.set.size>=this.limit){let e=this.set.values().next().value;e&&this.set.delete(e)}this.set.add(e)}}has(e){return this.set.has(e)}}let aQ=BigInt(4294967296-1),a0=BigInt(32);function a1(e,t=!1){return t?{h:Number(e&aQ),l:Number(e>>a0&aQ)}:{h:0|Number(e>>a0&aQ),l:0|Number(e&aQ)}}function a2(e,t=!1){let r=e.length,i=new Uint32Array(r),n=new Uint32Array(r);for(let o=0;oe>>>r,a5=(e,t,r)=>e<<32-r|t>>>r,a4=(e,t,r)=>e>>>r|t<<32-r,a6=(e,t,r)=>e<<32-r|t>>>r,a8=(e,t,r)=>e<<64-r|t>>>r-32,a9=(e,t,r)=>e>>>r-32|t<<64-r,a7=(e,t)=>t,le=(e,t)=>e,lt=(e,t,r)=>e<>>32-r,lr=(e,t,r)=>t<>>32-r,li=(e,t,r)=>t<>>64-r,ln=(e,t,r)=>e<>>64-r;function lo(e,t,r,i){let n=(t>>>0)+(i>>>0);return{h:e+r+(n/4294967296|0)|0,l:0|n}}let ls=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0),la=(e,t,r,i)=>t+r+i+(e/4294967296|0)|0,ll=(e,t,r,i)=>(e>>>0)+(t>>>0)+(r>>>0)+(i>>>0),lc=(e,t,r,i,n)=>t+r+i+n+(e/4294967296|0)|0,ld=(e,t,r,i,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(i>>>0)+(n>>>0),lu=(e,t,r,i,n,o)=>t+r+i+n+o+(e/4294967296|0)|0,lh="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0;function lp(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name}function lf(e){if(!Number.isSafeInteger(e)||e<0)throw Error("positive integer expected, got "+e)}function lg(e,...t){if(!lp(e))throw Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw Error("Uint8Array expected of length "+t+", got length="+e.length)}function lm(e){if("function"!=typeof e||"function"!=typeof e.create)throw Error("Hash should be wrapped by utils.createHasher");lf(e.outputLen),lf(e.blockLen)}function ly(e,t=!0){if(e.destroyed)throw Error("Hash instance has been destroyed");if(t&&e.finished)throw Error("Hash#digest() has already been called")}function lw(e,t){lg(e);let r=t.outputLen;if(e.length>>t}let lx=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0];function l_(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}let lA=lx?e=>e:e=>l_(e),lS=lx?e=>e:function(e){for(let t=0;tt.toString(16).padStart(2,"0"));function lk(e){if(lg(e),lI)return e.toHex();let t="";for(let r=0;r=lR._0&&e<=lR._9?e-lR._0:e>=lR.A&&e<=lR.F?e-(lR.A-10):e>=lR.a&&e<=lR.f?e-(lR.a-10):void 0}function lT(e){if("string"!=typeof e)throw Error("hex string expected, got "+typeof e);if(lI)return Uint8Array.fromHex(e);let t=e.length,r=t/2;if(t%2)throw Error("hex string expected, got unpadded hex of length "+t);let i=new Uint8Array(r);for(let t=0,n=0;te().update(l$(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function lM(e=32){if(lh&&"function"==typeof lh.getRandomValues)return lh.getRandomValues(new Uint8Array(e));if(lh&&"function"==typeof lh.randomBytes)return Uint8Array.from(lh.randomBytes(e));throw Error("crypto.getRandomValues must be defined")}let lB=BigInt(0),lj=BigInt(1),lF=BigInt(2),lW=BigInt(7),lz=BigInt(256),lH=BigInt(113),lq=[],lV=[],lK=[];for(let e=0,t=lj,r=1,i=0;e<24;e++){[r,i]=[i,(2*r+3*i)%5],lq.push(2*(5*i+r)),lV.push((e+1)*(e+2)/2%64);let n=lB;for(let e=0;e<7;e++)(t=(t<>lW)*lH)%lz)&lF&&(n^=lj<<(lj<r>32?li(e,t,r):lt(e,t,r),lX=(e,t,r)=>r>32?ln(e,t,r):lr(e,t,r);class lQ extends lU{constructor(e,t,r,i=!1,n=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=e,this.suffix=t,this.outputLen=r,this.enableXOF=i,this.rounds=n,lf(r),!(0=r&&this.keccak();let o=Math.min(r-this.posOut,n-i);e.set(t.subarray(this.posOut,this.posOut+o),i),this.posOut+=o,i+=o}return e}xofInto(e){if(!this.enableXOF)throw Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return lf(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(lw(e,this),this.finished)throw Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,lv(this.state)}_cloneInto(e){let{blockLen:t,suffix:r,outputLen:i,rounds:n,enableXOF:o}=this;return e||(e=new lQ(t,r,i,o,n)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=n,e.suffix=r,e.outputLen=i,e.enableXOF=o,e.destroyed=this.destroyed,e}}let l0=lL(()=>new lQ(136,1,32));class l1 extends lU{constructor(e,t,r,i){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=i,this.buffer=new Uint8Array(e),this.view=lC(this.buffer)}update(e){ly(this),lg(e=l$(e));let{view:t,buffer:r,blockLen:i}=this,n=e.length;for(let o=0;oi-o&&(this.process(r,0),o=0);for(let e=o;e>n&o),a=Number(r&o),l=i?4:0,c=i?0:4;e.setUint32(t+l,s,i),e.setUint32(t+c,a,i)})(r,i-8,BigInt(8*this.length),n),this.process(r,0);let s=lC(e),a=this.outputLen;if(a%4)throw Error("_sha2: outputLen should be aligned to 32bit");let l=a/4,c=this.get();if(l>c.length)throw Error("_sha2: outputLen bigger than state");for(let e=0;e>>3,n=lE(r,17)^lE(r,19)^r>>>10;l6[e]=n+l6[e-7]+i+l6[e-16]|0}let{A:r,B:i,C:n,D:o,E:s,F:a,G:l,H:c}=this;for(let e=0;e<64;e++){var d,u,h,p;let t=c+(lE(s,6)^lE(s,11)^lE(s,25))+((d=s)&a^~d&l)+l4[e]+l6[e]|0,f=(lE(r,2)^lE(r,13)^lE(r,22))+((u=r)&(h=i)^u&(p=n)^h&p)|0;c=l,l=a,a=s,s=o+t|0,o=n,n=i,i=r,r=t+f|0}r=r+this.A|0,i=i+this.B|0,n=n+this.C|0,o=o+this.D|0,s=s+this.E|0,a=a+this.F|0,l=l+this.G|0,c=c+this.H|0,this.set(r,i,n,o,s,a,l,c)}roundClean(){lv(l6)}destroy(){this.set(0,0,0,0,0,0,0,0),lv(this.buffer)}}let l9=a2(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(e=>BigInt(e))),l7=l9[0],ce=l9[1],ct=new Uint32Array(80),cr=new Uint32Array(80);class ci extends l1{constructor(e=64){super(128,e,16,!1),this.Ah=0|l5[0],this.Al=0|l5[1],this.Bh=0|l5[2],this.Bl=0|l5[3],this.Ch=0|l5[4],this.Cl=0|l5[5],this.Dh=0|l5[6],this.Dl=0|l5[7],this.Eh=0|l5[8],this.El=0|l5[9],this.Fh=0|l5[10],this.Fl=0|l5[11],this.Gh=0|l5[12],this.Gl=0|l5[13],this.Hh=0|l5[14],this.Hl=0|l5[15]}get(){let{Ah:e,Al:t,Bh:r,Bl:i,Ch:n,Cl:o,Dh:s,Dl:a,Eh:l,El:c,Fh:d,Fl:u,Gh:h,Gl:p,Hh:f,Hl:g}=this;return[e,t,r,i,n,o,s,a,l,c,d,u,h,p,f,g]}set(e,t,r,i,n,o,s,a,l,c,d,u,h,p,f,g){this.Ah=0|e,this.Al=0|t,this.Bh=0|r,this.Bl=0|i,this.Ch=0|n,this.Cl=0|o,this.Dh=0|s,this.Dl=0|a,this.Eh=0|l,this.El=0|c,this.Fh=0|d,this.Fl=0|u,this.Gh=0|h,this.Gl=0|p,this.Hh=0|f,this.Hl=0|g}process(e,t){for(let r=0;r<16;r++,t+=4)ct[r]=e.getUint32(t),cr[r]=e.getUint32(t+=4);for(let e=16;e<80;e++){let t=0|ct[e-15],r=0|cr[e-15],i=a4(t,r,1)^a4(t,r,8)^a3(t,r,7),n=a6(t,r,1)^a6(t,r,8)^a5(t,r,7),o=0|ct[e-2],s=0|cr[e-2],a=a4(o,s,19)^a8(o,s,61)^a3(o,s,6),l=ll(n,a6(o,s,19)^a9(o,s,61)^a5(o,s,6),cr[e-7],cr[e-16]),c=lc(l,i,a,ct[e-7],ct[e-16]);ct[e]=0|c,cr[e]=0|l}let{Ah:r,Al:i,Bh:n,Bl:o,Ch:s,Cl:a,Dh:l,Dl:c,Eh:d,El:u,Fh:h,Fl:p,Gh:f,Gl:g,Hh:m,Hl:y}=this;for(let e=0;e<80;e++){let t=a4(d,u,14)^a4(d,u,18)^a8(d,u,41),w=a6(d,u,14)^a6(d,u,18)^a9(d,u,41),b=d&h^~d&f,v=ld(y,w,u&p^~u&g,ce[e],cr[e]),C=lu(v,m,t,b,l7[e],ct[e]),E=0|v,x=a4(r,i,28)^a8(r,i,34)^a8(r,i,39),_=a6(r,i,28)^a9(r,i,34)^a9(r,i,39),A=r&n^r&s^n&s,S=i&o^i&a^o&a;m=0|f,y=0|g,f=0|h,g=0|p,h=0|d,p=0|u,({h:d,l:u}=lo(0|l,0|c,0|C,0|E)),l=0|s,c=0|a,s=0|n,a=0|o,n=0|r,o=0|i;let I=ls(E,_,S);r=la(I,C,x,A),i=0|I}({h:r,l:i}=lo(0|this.Ah,0|this.Al,0|r,0|i)),({h:n,l:o}=lo(0|this.Bh,0|this.Bl,0|n,0|o)),({h:s,l:a}=lo(0|this.Ch,0|this.Cl,0|s,0|a)),({h:l,l:c}=lo(0|this.Dh,0|this.Dl,0|l,0|c)),({h:d,l:u}=lo(0|this.Eh,0|this.El,0|d,0|u)),({h,l:p}=lo(0|this.Fh,0|this.Fl,0|h,0|p)),({h:f,l:g}=lo(0|this.Gh,0|this.Gl,0|f,0|g)),({h:m,l:y}=lo(0|this.Hh,0|this.Hl,0|m,0|y)),this.set(r,i,n,o,s,a,l,c,d,u,h,p,f,g,m,y)}roundClean(){lv(ct,cr)}destroy(){lv(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}class cn extends ci{constructor(){super(48),this.Ah=0|l3[0],this.Al=0|l3[1],this.Bh=0|l3[2],this.Bl=0|l3[3],this.Ch=0|l3[4],this.Cl=0|l3[5],this.Dh=0|l3[6],this.Dl=0|l3[7],this.Eh=0|l3[8],this.El=0|l3[9],this.Fh=0|l3[10],this.Fl=0|l3[11],this.Gh=0|l3[12],this.Gl=0|l3[13],this.Hh=0|l3[14],this.Hl=0|l3[15]}}let co=Uint32Array.from([573645204,4230739756,2673172387,3360449730,596883563,1867755857,2520282905,1497426621,2519219938,2827943907,3193839141,1401305490,721525244,746961066,246885852,2177182882]);class cs extends ci{constructor(){super(32),this.Ah=0|co[0],this.Al=0|co[1],this.Bh=0|co[2],this.Bl=0|co[3],this.Ch=0|co[4],this.Cl=0|co[5],this.Dh=0|co[6],this.Dl=0|co[7],this.Eh=0|co[8],this.El=0|co[9],this.Fh=0|co[10],this.Fl=0|co[11],this.Gh=0|co[12],this.Gl=0|co[13],this.Hh=0|co[14],this.Hl=0|co[15]}}let ca=lL(()=>new l8),cl=lL(()=>new ci),cc=lL(()=>new cn),cd=lL(()=>new cs),cu=Uint8Array.from([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9]),ch=Uint32Array.from([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),cp=new Uint32Array(32);function cf(e,t,r,i,n,o){let s=n[o],a=n[o+1],l=cp[2*e],c=cp[2*e+1],d=cp[2*t],u=cp[2*t+1],h=cp[2*r],p=cp[2*r+1],f=cp[2*i],g=cp[2*i+1],m=ls(l,d,s);c=la(m,c,u,a),l=0|m,({Dh:g,Dl:f}={Dh:g^c,Dl:f^l}),({Dh:g,Dl:f}={Dh:a7(g,f),Dl:le(g)}),({h:p,l:h}=lo(p,h,g,f)),({Bh:u,Bl:d}={Bh:u^p,Bl:d^h}),({Bh:u,Bl:d}={Bh:a4(u,d,24),Bl:a6(u,d,24)}),cp[2*e]=l,cp[2*e+1]=c,cp[2*t]=d,cp[2*t+1]=u,cp[2*r]=h,cp[2*r+1]=p,cp[2*i]=f,cp[2*i+1]=g}function cg(e,t,r,i,n,o){let s=n[o],a=n[o+1],l=cp[2*e],c=cp[2*e+1],d=cp[2*t],u=cp[2*t+1],h=cp[2*r],p=cp[2*r+1],f=cp[2*i],g=cp[2*i+1],m=ls(l,d,s);c=la(m,c,u,a),l=0|m,({Dh:g,Dl:f}={Dh:g^c,Dl:f^l}),({Dh:g,Dl:f}={Dh:a4(g,f,16),Dl:a6(g,f,16)}),({h:p,l:h}=lo(p,h,g,f)),({Bh:u,Bl:d}={Bh:u^p,Bl:d^h}),({Bh:u,Bl:d}={Bh:a8(u,d,63),Bl:a9(u,d,63)}),cp[2*e]=l,cp[2*e+1]=c,cp[2*t]=d,cp[2*t+1]=u,cp[2*r]=h,cp[2*r+1]=p,cp[2*i]=f,cp[2*i+1]=g}class cm extends lU{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,this.length=0,this.pos=0,lf(e),lf(t),this.blockLen=e,this.outputLen=t,this.buffer=new Uint8Array(e),this.buffer32=lb(this.buffer)}update(e){ly(this),lg(e=l$(e));let{blockLen:t,buffer:r,buffer32:i}=this,n=e.length,o=e.byteOffset,s=e.buffer;for(let a=0;ai[t]=lA(e))}digest(){let{buffer:e,outputLen:t}=this;this.digestInto(e);let r=e.slice(0,t);return this.destroy(),r}_cloneInto(e){let{buffer:t,length:r,finished:i,destroyed:n,outputLen:o,pos:s}=this;return e||(e=new this.constructor({dkLen:o})),e.set(...this.get()),e.buffer.set(t),e.destroyed=n,e.finished=i,e.length=r,e.pos=s,e.outputLen=o,e}clone(){return this._cloneInto()}}class cy extends cm{constructor(e={}){let t=void 0===e.dkLen?64:e.dkLen;super(128,t),this.v0l=0|ch[0],this.v0h=0|ch[1],this.v1l=0|ch[2],this.v1h=0|ch[3],this.v2l=0|ch[4],this.v2h=0|ch[5],this.v3l=0|ch[6],this.v3h=0|ch[7],this.v4l=0|ch[8],this.v4h=0|ch[9],this.v5l=0|ch[10],this.v5h=0|ch[11],this.v6l=0|ch[12],this.v6h=0|ch[13],this.v7l=0|ch[14],this.v7h=0|ch[15],function(e,t={},r,i,n){if(lf(64),e<0||e>64)throw Error("outputLen bigger than keyLen");let{key:o,salt:s,personalization:a}=t;if(void 0!==o&&(o.length<1||o.length>64))throw Error("key length must be undefined or 1.."+r);if(void 0!==s&&16!==s.length)throw Error("salt must be undefined or 16");if(void 0!==a&&16!==a.length)throw Error("personalization must be undefined or 16")}(t,e,64,0,0);let{key:r,personalization:i,salt:n}=e,o=0;if(void 0!==r&&(o=(r=l$(r)).length),this.v0l^=this.outputLen|o<<8|16842752,void 0!==n){let e=lb(n=l$(n));this.v4l^=lA(e[0]),this.v4h^=lA(e[1]),this.v5l^=lA(e[2]),this.v5h^=lA(e[3])}if(void 0!==i){let e=lb(i=l$(i));this.v6l^=lA(e[0]),this.v6h^=lA(e[1]),this.v7l^=lA(e[2]),this.v7h^=lA(e[3])}if(void 0!==r){let e=new Uint8Array(this.blockLen);e.set(r),this.update(e)}}get(){let{v0l:e,v0h:t,v1l:r,v1h:i,v2l:n,v2h:o,v3l:s,v3h:a,v4l:l,v4h:c,v5l:d,v5h:u,v6l:h,v6h:p,v7l:f,v7h:g}=this;return[e,t,r,i,n,o,s,a,l,c,d,u,h,p,f,g]}set(e,t,r,i,n,o,s,a,l,c,d,u,h,p,f,g){this.v0l=0|e,this.v0h=0|t,this.v1l=0|r,this.v1h=0|i,this.v2l=0|n,this.v2h=0|o,this.v3l=0|s,this.v3h=0|a,this.v4l=0|l,this.v4h=0|c,this.v5l=0|d,this.v5h=0|u,this.v6l=0|h,this.v6h=0|p,this.v7l=0|f,this.v7h=0|g}compress(e,t,r){this.get().forEach((e,t)=>cp[t]=e),cp.set(ch,16);let{h:i,l:n}=a1(BigInt(this.length));cp[24]=ch[8]^n,cp[25]=ch[9]^i,r&&(cp[28]=~cp[28],cp[29]=~cp[29]);let o=0;for(let r=0;r<12;r++)cf(0,4,8,12,e,t+2*cu[o++]),cg(0,4,8,12,e,t+2*cu[o++]),cf(1,5,9,13,e,t+2*cu[o++]),cg(1,5,9,13,e,t+2*cu[o++]),cf(2,6,10,14,e,t+2*cu[o++]),cg(2,6,10,14,e,t+2*cu[o++]),cf(3,7,11,15,e,t+2*cu[o++]),cg(3,7,11,15,e,t+2*cu[o++]),cf(0,5,10,15,e,t+2*cu[o++]),cg(0,5,10,15,e,t+2*cu[o++]),cf(1,6,11,12,e,t+2*cu[o++]),cg(1,6,11,12,e,t+2*cu[o++]),cf(2,7,8,13,e,t+2*cu[o++]),cg(2,7,8,13,e,t+2*cu[o++]),cf(3,4,9,14,e,t+2*cu[o++]),cg(3,4,9,14,e,t+2*cu[o++]);this.v0l^=cp[0]^cp[16],this.v0h^=cp[1]^cp[17],this.v1l^=cp[2]^cp[18],this.v1h^=cp[3]^cp[19],this.v2l^=cp[4]^cp[20],this.v2h^=cp[5]^cp[21],this.v3l^=cp[6]^cp[22],this.v3h^=cp[7]^cp[23],this.v4l^=cp[8]^cp[24],this.v4h^=cp[9]^cp[25],this.v5l^=cp[10]^cp[26],this.v5h^=cp[11]^cp[27],this.v6l^=cp[12]^cp[28],this.v6h^=cp[13]^cp[29],this.v7l^=cp[14]^cp[30],this.v7h^=cp[15]^cp[31],lv(cp)}destroy(){this.destroyed=!0,lv(this.buffer32),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}let cw=function(e){let t=(t,r)=>e(r).update(l$(t)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t}(e=>new cy(e));function cb(e){let t=`Ethereum Signed Message: +${e.length}`,r=new TextEncoder().encode(t+e);return"0x"+af.from(l0(r)).toString("hex")}async function cv(e,t,r,i,n,o){switch(r.t){case"eip191":return await function(e,t,r){let i=function(e){if(130!==e.length&&132!==e.length)throw new r6({signature:e});let t=BigInt(rX(e,0,32)),r=BigInt(rX(e,32,64)),i=(()=>{let t=Number(`0x${e.slice(130)}`);if(!Number.isNaN(t))try{return function(e){if(0===e||27===e)return 0;if(1===e||28===e)return 1;if(e>=35)return e%2==0?1:0;throw new r9({value:e})}(t)}catch{throw new r8({value:t})}})();return void 0===i?{r:t,s:r}:{r:t,s:r,yParity:i}}(r);return(function(e,t={}){let r=n9(`0x${(function(e,t={}){n7(e);let{prefix:r,x:i,y:n}=e,{includePrefix:o=!0}=t;return function(...e){return`0x${e.reduce((e,t)=>e+t.replace("0x",""),"")}`}(o?rY(r,{size:1}):"0x",rY(i,{size:32}),"bigint"==typeof n?rY(n,{size:32}):"0x")})(e).slice(4)}`).substring(26);return function(e,t={}){let{checksum:r=!1}=t;return(oa(e),r)?ol(e):e}(`0x${r}`,t)})(function(e){let{payload:t,signature:r}=e,{r:i,s:n,yParity:o}=r;return function(e){let t=(()=>{if(function(e,t={}){let{strict:r=!1}=t;try{return!function(e,t={}){let{strict:r=!1}=t;if(!e||"string"!=typeof e)throw new r1(e);if(r&&!/^0x[0-9a-fA-F]*$/.test(e)||!e.startsWith("0x"))throw new r2(e)}(e,{strict:r}),!0}catch{return!1}}(e))return oe(e);if(function(e){try{return!function(e){if(!(e instanceof Uint8Array)&&(!e||"object"!=typeof e||!("BYTES_PER_ELEMENT"in e)||1!==e.BYTES_PER_ELEMENT||"Uint8Array"!==e.constructor.name))throw new nF(e)}(e),!0}catch{return!1}}(e))return oe(rG(e));let{prefix:t,x:r,y:i}=e;return"bigint"==typeof r&&"bigint"==typeof i?{prefix:t??4,x:r,y:i}:{prefix:t,x:r}})();return n7(t),t}(new nL.Signature(BigInt(i),BigInt(n)).addRecoveryBit(o).recoverPublicKey(rZ(t).substring(2)))}({payload:cb(t),signature:i})).toLowerCase()===e.toLowerCase()}(e,t,r.s);case"eip1271":return await cC(e,t,r.s,i,n,o);default:throw Error(`verifySignature failed: Attempted to verify CacaoSignature with unknown type: ${r.t}`)}}async function cC(e,t,r,i,n,o){let s=ag(i);if(!s.namespace||!s.reference)throw Error(`isValidEip1271Signature failed: chainId must be in CAIP-2 format, received: ${i}`);try{let s="0x1626ba7e",a=r.substring(2),l=(a.length/2).toString(16).padStart(64,"0"),c=(t.startsWith("0x")?t:cb(t)).substring(2),d=await fetch(`${o||"https://rpc.walletconnect.org/v1"}/?chainId=${i}&projectId=${n}`,{headers:{"Content-Type":"application/json"},method:"POST",body:JSON.stringify({id:Date.now()+Math.floor(1e3*Math.random()),jsonrpc:"2.0",method:"eth_call",params:[{to:e,data:s+c+"0000000000000000000000000000000000000000000000000000000000000040"+l+a},"latest"]})}),{result:u}=await d.json();return!!u&&u.slice(0,s.length).toLowerCase()===s.toLowerCase()}catch(e){return console.error("isValidEip1271Signature: ",e),!1}}function cE(e){let t=new Uint8Array(ca(function(e){if(e instanceof Uint8Array)return e;if(Array.isArray(e))return new Uint8Array(e);if("object"==typeof e&&null!=e&&e.data)return new Uint8Array(Object.values(e.data));if("object"==typeof e&&e)return new Uint8Array(Object.values(e));throw Error("getNearUint8ArrayFromBytes: Unexpected result type from bytes array")}(e)));return oh.Z.encode(t)}function cx(e){var t;let r=(t=af.from(e,"base64"),new o$(void 0).decode(t)).txn;if(!r)throw Error("Invalid signed transaction: missing 'txn' field");let i=new oD(void 0).encodeSharedRef(r),n=af.from("TX"),o=cd(af.concat([n,af.from(i)]));return oZ.encode(o).replace(/=+$/,"")}function c_(e){let t=[],r=BigInt(e);for(;r>=BigInt(128);)t.push(Number(r&BigInt(127)|BigInt(128))),r>>=BigInt(7);return t.push(Number(r)),af.from(t)}var cA=Object.defineProperty,cS=Object.defineProperties,cI=Object.getOwnPropertyDescriptors,cN=Object.getOwnPropertySymbols,ck=Object.prototype.hasOwnProperty,cR=Object.prototype.propertyIsEnumerable,cO=(e,t,r)=>t in e?cA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,cT=(e,t)=>{for(var r in t||(t={}))ck.call(t,r)&&cO(e,r,t[r]);if(cN)for(var r of cN(t))cR.call(t,r)&&cO(e,r,t[r]);return e},cP=(e,t)=>cS(e,cI(t));let c$="did:pkh:",cD={eip155:"Ethereum",solana:"Solana",bip122:"Bitcoin"},cU=e=>e?cD[e]||e:"",cL=e=>e?.split(":"),cM=e=>{let t=e&&cL(e);if(t)return e.includes(c$)?t[3]:t[1]},cB=e=>{let t=e&&cL(e);if(t)return e.includes(c$)?t[2]:t[0]},cj=e=>{let t=e&&cL(e);if(t)return t[2]+":"+t[3]},cF=e=>{let t=e&&cL(e);if(t)return t.pop()};async function cW(e){let{cacao:t,projectId:r}=e,{s:i,p:n}=t,o=cz(n,n.iss),s=cF(n.iss);return await cv(s,o,i,cj(n.iss),r)}let cz=(e,t)=>{let r=cB(t);if(!r)throw Error("Invalid issuer: "+t);let i=`${e.domain} wants you to sign in with your ${cU(r)} account:`,n=cF(t);if(!e.aud&&!e.uri)throw Error("Either `aud` or `uri` is required to construct the message");let o=e.statement||void 0,s=`URI: ${e.aud||e.uri}`,a=`Version: ${e.version}`,l=`Chain ID: ${cM(t)}`,c=`Nonce: ${e.nonce}`,d=`Issued At: ${e.iat}`,u=e.exp?`Expiration Time: ${e.exp}`:void 0,h=e.nbf?`Not Before: ${e.nbf}`:void 0,p=e.requestId?`Request ID: ${e.requestId}`:void 0,f=e.resources?`Resources:${e.resources.map(e=>` +- ${e}`).join("")}`:void 0,g=cG(e.resources);return g&&(o=function(e="",t){cH(t);let r="I further authorize the stated URI to perform the following actions on my behalf: ";if(e.includes(r))return e;let i=[],n=0;Object.keys(t.att).forEach(e=>{let r=Object.keys(t.att[e]).map(e=>({ability:e.split("/")[0],action:e.split("/")[1]}));r.sort((e,t)=>e.action.localeCompare(t.action));let o={};r.forEach(e=>{o[e.ability]||(o[e.ability]=[]),o[e.ability].push(e.action)});let s=Object.keys(o).map(t=>(n++,`(${n}) '${t}': '${o[t].join("', '")}' for '${e}'.`));i.push(s.join(", ").replace(".,","."))});let o=i.join(" "),s=`${r}${o}`;return`${e?e+" ":""}${s}`}(o,cV(g))),[i,n,"",o,"",s,a,l,c,d,u,h,p,f].filter(e=>null!=e).join(` +`)};function cH(e){if(!e)throw Error("No recap provided, value is undefined");if(!e.att)throw Error("No `att` property found");let t=Object.keys(e.att);if(!(null!=t&&t.length))throw Error("No resources found in `att` property");t.forEach(t=>{let r=e.att[t];if(Array.isArray(r)||"object"!=typeof r)throw Error(`Resource must be an object: ${t}`);if(!Object.keys(r).length)throw Error(`Resource object is empty: ${t}`);Object.keys(r).forEach(e=>{let t=r[e];if(!Array.isArray(t))throw Error(`Ability limits ${e} must be an array of objects, found: ${t}`);if(!t.length)throw Error(`Value of ${e} is empty array, must be an array with objects`);t.forEach(t=>{if("object"!=typeof t)throw Error(`Ability limits (${e}) must be an array of objects, found: ${t}`)})})})}function cq(e){return cH(e),`urn:recap:${af.from(JSON.stringify(e)).toString("base64").replace(/=/g,"")}`}function cV(e){var t;let r=(t=e.replace("urn:recap:",""),JSON.parse(af.from(t,"base64").toString("utf-8")));return cH(r),r}function cK(e){var t;let r=cV(e);cH(r);let i=null==(t=r.att)?void 0:t.eip155;return i?Object.keys(i).map(e=>e.split("/")[1]):[]}function cZ(e){let t=cV(e);cH(t);let r=[];return Object.values(t.att).forEach(e=>{Object.values(e).forEach(e=>{var t;null!=(t=e?.[0])&&t.chains&&r.push(e[0].chains)})}),[...new Set(r.flat())]}function cG(e){if(!e)return;let t=e?.[e.length-1];return t&&t.includes("urn:recap:")?t:void 0}function cY(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name}function cJ(e){if("boolean"!=typeof e)throw Error(`boolean expected, not ${e}`)}function cX(e){if(!Number.isSafeInteger(e)||e<0)throw Error("positive integer expected, got "+e)}function cQ(e,...t){if(!cY(e))throw Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw Error("Uint8Array expected of length "+t+", got length="+e.length)}function c0(e,t=!0){if(e.destroyed)throw Error("Hash instance has been destroyed");if(t&&e.finished)throw Error("Hash#digest() has already been called")}function c1(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function c2(...e){for(let t=0;t>n&o),a=Number(r&o),l=i?4:0,c=i?0:4;e.setUint32(t+l,s,i),e.setUint32(t+c,a,i)}function c8(e){return Uint8Array.from(e)}let c9=e=>Uint8Array.from(e.split("").map(e=>e.charCodeAt(0))),c7=c9("expand 16-byte k"),de=c9("expand 32-byte k"),dt=c1(c7),dr=c1(de);function di(e,t){return e<>>32-t}function dn(e){return e.byteOffset%4==0}let ds=4294967296-1,da=new Uint32Array,dl=(e,t)=>255&e[t++]|(255&e[t++])<<8;class dc{constructor(e){this.blockLen=16,this.outputLen=16,this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.pos=0,this.finished=!1,cQ(e=c5(e),32);let t=dl(e,0),r=dl(e,2),i=dl(e,4),n=dl(e,6),o=dl(e,8),s=dl(e,10),a=dl(e,12),l=dl(e,14);this.r[0]=8191&t,this.r[1]=(t>>>13|r<<3)&8191,this.r[2]=(r>>>10|i<<6)&7939,this.r[3]=(i>>>7|n<<9)&8191,this.r[4]=(n>>>4|o<<12)&255,this.r[5]=o>>>1&8190,this.r[6]=(o>>>14|s<<2)&8191,this.r[7]=(s>>>11|a<<5)&8065,this.r[8]=(a>>>8|l<<8)&8191,this.r[9]=l>>>5&127;for(let t=0;t<8;t++)this.pad[t]=dl(e,16+2*t)}process(e,t,r=!1){let{h:i,r:n}=this,o=n[0],s=n[1],a=n[2],l=n[3],c=n[4],d=n[5],u=n[6],h=n[7],p=n[8],f=n[9],g=dl(e,t+0),m=dl(e,t+2),y=dl(e,t+4),w=dl(e,t+6),b=dl(e,t+8),v=dl(e,t+10),C=dl(e,t+12),E=dl(e,t+14),x=i[0]+(8191&g),_=i[1]+((g>>>13|m<<3)&8191),A=i[2]+((m>>>10|y<<6)&8191),S=i[3]+((y>>>7|w<<9)&8191),I=i[4]+((w>>>4|b<<12)&8191),N=i[5]+(b>>>1&8191),k=i[6]+((b>>>14|v<<2)&8191),R=i[7]+((v>>>11|C<<5)&8191),O=i[8]+((C>>>8|E<<8)&8191),T=i[9]+(E>>>5|(r?0:2048)),P=0,$=0+x*o+5*f*_+5*p*A+5*h*S+5*u*I;P=$>>>13,$&=8191,$+=5*d*N+5*c*k+5*l*R+5*a*O+5*s*T,P+=$>>>13,$&=8191;let D=P+x*s+_*o+5*f*A+5*p*S+5*h*I;P=D>>>13,D&=8191,D+=5*u*N+5*d*k+5*c*R+5*l*O+5*a*T,P+=D>>>13,D&=8191;let U=P+x*a+_*s+A*o+5*f*S+5*p*I;P=U>>>13,U&=8191,U+=5*h*N+5*u*k+5*d*R+5*c*O+5*l*T,P+=U>>>13,U&=8191;let L=P+x*l+_*a+A*s+S*o+5*f*I;P=L>>>13,L&=8191,L+=5*p*N+5*h*k+5*u*R+5*d*O+5*c*T,P+=L>>>13,L&=8191;let M=P+x*c+_*l+A*a+S*s+I*o;P=M>>>13,M&=8191,M+=5*f*N+5*p*k+5*h*R+5*u*O+5*d*T,P+=M>>>13,M&=8191;let B=P+x*d+_*c+A*l+S*a+I*s;P=B>>>13,B&=8191,B+=N*o+5*f*k+5*p*R+5*h*O+5*u*T,P+=B>>>13,B&=8191;let j=P+x*u+_*d+A*c+S*l+I*a;P=j>>>13,j&=8191,j+=N*s+k*o+5*f*R+5*p*O+5*h*T,P+=j>>>13,j&=8191;let F=P+x*h+_*u+A*d+S*c+I*l;P=F>>>13,F&=8191,F+=N*a+k*s+R*o+5*f*O+5*p*T,P+=F>>>13,F&=8191;let W=P+x*p+_*h+A*u+S*d+I*c;P=W>>>13,W&=8191,W+=N*l+k*a+R*s+O*o+5*f*T,P+=W>>>13,W&=8191;let z=P+x*f+_*p+A*h+S*u+I*d;P=z>>>13,z&=8191,z+=N*c+k*l+R*a+O*s+T*o,P+=z>>>13,z&=8191,$=8191&(P=(P=(P<<2)+P|0)+$|0),P>>>=13,D+=P,i[0]=$,i[1]=D,i[2]=U,i[3]=L,i[4]=M,i[5]=B,i[6]=j,i[7]=F,i[8]=W,i[9]=z}finalize(){let{h:e,pad:t}=this,r=new Uint16Array(10),i=e[1]>>>13;e[1]&=8191;for(let t=2;t<10;t++)e[t]+=i,i=e[t]>>>13,e[t]&=8191;e[0]+=5*i,i=e[0]>>>13,e[0]&=8191,e[1]+=i,i=e[1]>>>13,e[1]&=8191,e[2]+=i,r[0]=e[0]+5,i=r[0]>>>13,r[0]&=8191;for(let t=1;t<10;t++)r[t]=e[t]+i,i=r[t]>>>13,r[t]&=8191;r[9]-=8192;let n=(1^i)-1;for(let e=0;e<10;e++)r[e]&=n;n=~n;for(let t=0;t<10;t++)e[t]=e[t]&n|r[t];e[0]=(e[0]|e[1]<<13)&65535,e[1]=(e[1]>>>3|e[2]<<10)&65535,e[2]=(e[2]>>>6|e[3]<<7)&65535,e[3]=(e[3]>>>9|e[4]<<4)&65535,e[4]=(e[4]>>>12|e[5]<<1|e[6]<<14)&65535,e[5]=(e[6]>>>2|e[7]<<11)&65535,e[6]=(e[7]>>>5|e[8]<<8)&65535,e[7]=(e[8]>>>8|e[9]<<5)&65535;let o=e[0]+t[0];e[0]=65535&o;for(let r=1;r<8;r++)o=(e[r]+t[r]|0)+(o>>>16)|0,e[r]=65535&o;c2(r)}update(e){c0(this),cQ(e=c5(e));let{buffer:t,blockLen:r}=this,i=e.length;for(let n=0;n>>0,e[n++]=r[t]>>>8;return e}digest(){let{buffer:e,outputLen:t}=this;this.digestInto(e);let r=e.slice(0,t);return this.destroy(),r}}let dd=function(e){let t=(t,r)=>e(r).update(c5(t)).digest(),r=e(new Uint8Array(32));return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t}(e=>new dc(e)),du=function(e,t){let{allowShortKeys:r,extendNonceFn:i,counterLength:n,counterRight:o,rounds:s}=function(e,t){if(null==t||"object"!=typeof t)throw Error("options must be defined");return Object.assign(e,t)}({allowShortKeys:!1,counterLength:8,counterRight:!1,rounds:20},t);if("function"!=typeof e)throw Error("core must be a function");return cX(n),cX(s),cJ(o),cJ(r),(t,a,l,c,d=0)=>{cQ(t),cQ(a),cQ(l);let u=l.length;if(void 0===c&&(c=new Uint8Array(u)),cQ(c),cX(d),d<0||d>=ds)throw Error("arx: counter overflow");if(c.length=ds)throw Error("arx: counter overflow");let g=Math.min(64,l-f);if(u&&64===g){let e=f/4;if(f%4!=0)throw Error("arx: invalid block position");for(let t=0,r;t<16;t++)p[r=e+t]=h[r]^d[t];f+=64;continue}for(let e=0,t;e{e.update(t);let r=t.length%16;r&&e.update(dh.subarray(r))},df=new Uint8Array(32);function dg(e,t,r,i,n){let o=e(t,r,df),s=dd.create(o);n&&dp(s,n),dp(s,i);let a=function(e,t,r){cJ(r);let i=new Uint8Array(16),n=new DataView(i.buffer,i.byteOffset,i.byteLength);return c6(n,0,BigInt(t),r),c6(n,8,BigInt(e),r),i}(i.length,n?n.length:0,!0);s.update(a);let l=s.digest();return c2(o,a),l}let dm=((e,t)=>{function r(i,...n){if(cQ(i),!c3)throw Error("Non little-endian hardware is not yet supported");if(void 0!==e.nonceLength){let t=n[0];if(!t)throw Error("nonce / iv required");e.varSizeNonce?cQ(t):cQ(t,e.nonceLength)}let o=e.tagLength;o&&void 0!==n[1]&&cQ(n[1]);let s=t(i,...n),a=(e,t)=>{if(void 0!==t){if(2!==e)throw Error("cipher output not supported");cQ(t)}},l=!1;return{encrypt(e,t){if(l)throw Error("cannot encrypt() twice with same key + nonce");return l=!0,cQ(e),a(s.encrypt.length,t),s.encrypt(e,t)},decrypt(e,t){if(cQ(e),o&&e.lengthi?e.create().update(r).digest():r);for(let e=0;enew dy(e,t).update(r).digest();dw.create=(e,t)=>new dy(e,t);let db=Uint8Array.from([0]),dv=Uint8Array.of(),dC=(e,t,r,i,n)=>{var o;return function(e,t,r,i=32){lm(e),lf(i);let n=e.outputLen;if(i>255*n)throw Error("Length should be <= 255*HashLen");let o=Math.ceil(i/n);void 0===r&&(r=dv);let s=new Uint8Array(o*n),a=dw.create(e,t),l=a._cloneInto(),c=new Uint8Array(a.outputLen);for(let e=0;e"bigint"==typeof e&&dE<=e;function dP(e,t,r,i){if(!(dT(t)&&dT(r)&&dT(i))||!(r<=t)||!(tdE;e>>=dx,t+=1);return t}let dD=e=>(dx<i(e,t,!1)),Object.entries(r).forEach(([e,t])=>i(e,t,!0))}function dL(e){let t=new WeakMap;return(r,...i)=>{let n=t.get(r);if(void 0!==n)return n;let o=e(r,...i);return t.set(r,o),o}}let dM=BigInt(0),dB=BigInt(1),dj=BigInt(2),dF=BigInt(3),dW=BigInt(4),dz=BigInt(5),dH=BigInt(7),dq=BigInt(8),dV=BigInt(9),dK=BigInt(16);function dZ(e,t){let r=e%t;return r>=dM?r:t+r}function dG(e,t,r){let i=e;for(;t-- >dM;)i*=i,i%=r;return i}function dY(e,t){if(e===dM)throw Error("invert: expected non-zero number");if(t<=dM)throw Error("invert: expected positive modulus, got "+t);let r=dZ(e,t),i=t,n=dM,o=dB;for(;r!==dM;){let e=i/r,t=i%r,s=n-o*e;i=r,r=t,n=o,o=s}if(i!==dB)throw Error("invert: does not exist");return dZ(n,t)}function dJ(e,t,r){if(!e.eql(e.sqr(t),r))throw Error("Cannot find square root")}function dX(e,t){let r=(e.ORDER+dB)/dW,i=e.pow(t,r);return dJ(e,i,t),i}function dQ(e,t){let r=(e.ORDER-dz)/dq,i=e.mul(t,dj),n=e.pow(i,r),o=e.mul(t,n),s=e.mul(e.mul(o,dj),n),a=e.mul(o,e.sub(s,e.ONE));return dJ(e,a,t),a}function d0(e){if(e1e3)throw Error("Cannot find square root: probably non-prime P");if(1===r)return dX;let o=n.pow(i,t),s=(t+dB)/dj;return function(e,i){if(e.is0(i))return i;if(1!==d3(e,i))throw Error("Cannot find square root");let n=r,a=e.mul(e.ONE,o),l=e.pow(i,t),c=e.pow(i,s);for(;!e.eql(l,e.ONE);){if(e.is0(l))return e.ZERO;let t=1,r=e.sqr(l);for(;!e.eql(r,e.ONE);)if(t++,r=e.sqr(r),t===n)throw Error("Cannot find square root");let i=dB<e.is0(r)?t:(i[n]=t,e.mul(t,r)),e.ONE),o=e.inv(n);return t.reduceRight((t,r,n)=>e.is0(r)?t:(i[n]=e.mul(t,i[n]),e.mul(t,r)),o),i}function d3(e,t){let r=(e.ORDER-dB)/dj,i=e.pow(t,r),n=e.eql(i,e.ONE),o=e.eql(i,e.ZERO),s=e.eql(i,e.neg(e.ONE));if(!n&&!o&&!s)throw Error("invalid Legendre symbol result");return n?1:o?0:-1}function d5(e,t){void 0!==t&&lf(t);let r=void 0!==t?t:e.toString(2).length;return{nBitLength:r,nByteLength:Math.ceil(r/8)}}function d4(e,t,r=!1,i={}){let n;if(e<=dM)throw Error("invalid field: expected ORDER > 0, got "+e);let o,s,a=!1,l;if("object"==typeof t&&null!=t){if(i.sqrt||r)throw Error("cannot specify opts in two arguments");t.BITS&&(o=t.BITS),t.sqrt&&(s=t.sqrt),"boolean"==typeof t.isLE&&(r=t.isLE),"boolean"==typeof t.modFromBytes&&(a=t.modFromBytes),l=t.allowedLengths}else"number"==typeof t&&(o=t),i.sqrt&&(s=i.sqrt);let{nBitLength:c,nByteLength:d}=d5(e,o);if(d>2048)throw Error("invalid field: expected ORDER of <= 2048 bytes");let u=Object.freeze({ORDER:e,isLE:r,BITS:c,BYTES:d,MASK:dD(c),ZERO:dM,ONE:dB,allowedLengths:l,create:t=>dZ(t,e),isValid:t=>{if("bigint"!=typeof t)throw Error("invalid field element: expected bigint, got "+typeof t);return dM<=t&&te===dM,isValidNot0:e=>!u.is0(e)&&u.isValid(e),isOdd:e=>(e&dB)===dB,neg:t=>dZ(-t,e),eql:(e,t)=>e===t,sqr:t=>dZ(t*t,e),add:(t,r)=>dZ(t+r,e),sub:(t,r)=>dZ(t-r,e),mul:(t,r)=>dZ(t*r,e),pow:(e,t)=>(function(e,t,r){if(rdM;)r&dB&&(i=e.mul(i,n)),n=e.sqr(n),r>>=dB;return i})(u,e,t),div:(t,r)=>dZ(t*dY(r,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>dY(t,e),sqrt:s||(t=>(n||(n=e%dW===dF?dX:e%dq===dz?dQ:e%dK===dV?function(e){let t=d4(e),r=d0(e),i=r(t,t.neg(t.ONE)),n=r(t,i),o=r(t,t.neg(i)),s=(e+dH)/dK;return(e,t)=>{let r=e.pow(t,s),a=e.mul(r,i),l=e.mul(r,n),c=e.mul(r,o),d=e.eql(e.sqr(a),t),u=e.eql(e.sqr(l),t);r=e.cmov(r,a,d),a=e.cmov(c,l,u);let h=e.eql(e.sqr(a),t),p=e.cmov(r,a,h);return dJ(e,p,t),p}}(e):d0(e)),n(u,t))),toBytes:e=>r?dR(e,d):dk(e,d),fromBytes:(t,i=!0)=>{if(l){if(!l.includes(t.length)||t.length>d)throw Error("Field.fromBytes: expected "+l+" bytes, got "+t.length);let e=new Uint8Array(d);e.set(t,r?0:e.length-t.length),t=e}if(t.length!==d)throw Error("Field.fromBytes: expected "+d+" bytes, got "+t.length);let n=r?dN(t):dI(lk(t));if(a&&(n=dZ(n,e)),!i&&!u.isValid(n))throw Error("invalid field element: outside of range 0..ORDER");return n},invertBatch:e=>d2(u,e),cmov:(e,t,r)=>r?t:e});return Object.freeze(u)}function d6(e){if("bigint"!=typeof e)throw Error("field order must be bigint");return Math.ceil(e.toString(2).length/8)}function d8(e){let t=d6(e);return t+Math.ceil(t/2)}let d9=BigInt(0),d7=BigInt(1);function ue(e,t){let r=t.negate();return e?r:t}function ut(e,t){let r=d2(e.Fp,t.map(e=>e.Z));return t.map((t,i)=>e.fromAffine(t.toAffine(r[i])))}function ur(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw Error("invalid window size, expected [1.."+t+"], got W="+e)}function ui(e,t){ur(e,t);let r=Math.ceil(t/e)+1,i=2**(e-1),n=2**e;return{windows:r,windowSize:i,mask:dD(e),maxNumber:n,shiftBy:BigInt(e)}}function un(e,t,r){let{windowSize:i,mask:n,maxNumber:o,shiftBy:s}=r,a=Number(e&n),l=e>>s;a>i&&(a-=o,l+=d7);let c=t*i;return{nextN:l,offset:c+Math.abs(a)-1,isZero:0===a,isNeg:a<0,isNegF:t%2!=0,offsetF:c}}let uo=new WeakMap,us=new WeakMap;function ua(e){return us.get(e)||1}function ul(e){if(e!==d9)throw Error("invalid wNAF")}class uc{constructor(e,t){this.BASE=e.BASE,this.ZERO=e.ZERO,this.Fn=e.Fn,this.bits=t}_unsafeLadder(e,t,r=this.ZERO){let i=e;for(;t>d9;)t&d7&&(r=r.add(i)),i=i.double(),t>>=d7;return r}precomputeWindow(e,t){let{windows:r,windowSize:i}=ui(t,this.bits),n=[],o=e,s=o;for(let e=0;e(e[t]="function",e),{ORDER:"bigint",MASK:"bigint",BYTES:"number",BITS:"number"})),t}BigInt(0),BigInt(1),BigInt(2),BigInt(8),lP("HashToScalar-");let uu=BigInt(0),uh=BigInt(1),up=BigInt(2),uf=BigInt(1),ug=BigInt(2),um=BigInt(3),uy=BigInt(5),uw=BigInt(8),ub=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed");function uv(e){return e[0]&=248,e[31]&=127,e[31]|=64,e}let uC=d4({p:ub,n:BigInt("0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed"),h:uw,a:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec"),d:BigInt("0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3"),Gx:BigInt("0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a"),Gy:BigInt("0x6666666666666666666666666666666666666666666666666666666666666658")}.p,{isLE:!0}),uE=(()=>{let e=uC.ORDER;return function(e){let{P:t,type:r,adjustScalarBytes:i,powPminus2:n,randomBytes:o}=(dU(e,{adjustScalarBytes:"function",powPminus2:"function"}),Object.freeze({...e})),s="x25519"===r;if(!s&&"x448"!==r)throw Error("invalid type");let a=o||lM,l=s?255:448,c=s?32:56,d=BigInt(s?9:5),u=BigInt(s?121665:39081),h=s?up**BigInt(254):up**BigInt(447),p=h+(s?BigInt(8)*up**BigInt(251)-uh:BigInt(4)*up**BigInt(445)-uh)+uh,f=e=>dZ(e,t),g=dR(f(d),c);function m(e,r){let o=function(e,r){dP("u",e,uu,t),dP("scalar",r,h,p);let i=uh,o=uu,s=e,a=uh,c=uu;for(let t=BigInt(l-1);t>=uu;t--){let n=r>>t&uh;c^=n,({x_2:i,x_3:s}=w(c,i,s)),({x_2:o,x_3:a}=w(c,o,a)),c=n;let l=i+o,d=f(l*l),h=i-o,p=f(h*h),g=d-p,m=s+a,y=f((s-a)*l),b=f(m*h),v=y+b,C=y-b;s=f(v*v),a=f(e*f(C*C)),i=f(d*p),o=f(g*(d+f(u*g)))}return{x_2:i,x_3:s}=w(c,i,s),{x_2:o,x_3:a}=w(c,o,a),f(i*n(o))}(function(e){let t=dO("u coordinate",e,c);return s&&(t[31]&=127),f(dN(t))}(r),dN(i(dO("scalar",e,c))));if(o===uu)throw Error("invalid private or public key received");return dR(f(o),c)}function y(e){return m(e,g)}function w(e,t,r){let i=f(e*(t-r));return{x_2:t=f(t-i),x_3:r=f(r+i)}}let b={secretKey:c,publicKey:c,seed:c},v=(e=a(c))=>(lg(e,b.seed),e);return{keygen:function(e){let t=v(e);return{secretKey:t,publicKey:y(t)}},getSharedSecret:(e,t)=>m(e,t),getPublicKey:e=>y(e),scalarMult:m,scalarMultBase:y,utils:{randomSecretKey:v,randomPrivateKey:v},GuBytes:g.slice(),lengths:b}}({P:e,type:"x25519",powPminus2:t=>{let{pow_p_5_8:r,b2:i}=function(e){let t=BigInt(10),r=BigInt(20),i=BigInt(40),n=BigInt(80),o=e*e%ub*e%ub,s=dG(o,ug,ub)*o%ub,a=dG(s,uf,ub)*e%ub,l=dG(a,uy,ub)*a%ub,c=dG(l,t,ub)*l%ub,d=dG(c,r,ub)*c%ub,u=dG(d,i,ub)*d%ub,h=dG(u,n,ub)*u%ub,p=dG(h,n,ub)*u%ub,f=dG(p,t,ub)*l%ub;return{pow_p_5_8:dG(f,ug,ub)*e%ub,b2:o}}(t);return dZ(dG(r,um,e)*i,e)},adjustScalarBytes:uv})})(),ux=(e,t)=>(e+(e>=0?t:-t)/uR)/t;function u_(e){if(!["compact","recovered","der"].includes(e))throw Error('Signature format must be "compact", "recovered", or "der"');return e}function uA(e,t){let r={};for(let i of Object.keys(t))r[i]=void 0===e[i]?t[i]:e[i];return d_(r.lowS,"lowS"),d_(r.prehash,"prehash"),void 0!==r.format&&u_(r.format),r}class uS extends Error{constructor(e=""){super(e)}}let uI={Err:uS,_tlv:{encode:(e,t)=>{let{Err:r}=uI;if(e<0||e>256)throw new r("tlv.encode: wrong tag");if(1&t.length)throw new r("tlv.encode: unpadded data");let i=t.length/2,n=dS(i);if(n.length/2&128)throw new r("tlv.encode: long form length too big");let o=i>127?dS(n.length/2|128):"";return dS(e)+o+n+t},decode(e,t){let{Err:r}=uI,i=0;if(e<0||e>256)throw new r("tlv.encode: wrong tag");if(t.length<2||t[i++]!==e)throw new r("tlv.decode: wrong tlv");let n=t[i++],o=0;if(128&n){let e=127&n;if(!e)throw new r("tlv.decode(long): indefinite length not supported");if(e>4)throw new r("tlv.decode(long): byte length is too big");let s=t.subarray(i,i+e);if(s.length!==e)throw new r("tlv.decode: length bytes not complete");if(0===s[0])throw new r("tlv.decode(long): zero leftmost byte");for(let e of s)o=o<<8|e;if(i+=e,o<128)throw new r("tlv.decode(long): not minimal encoding")}else o=n;let s=t.subarray(i,i+o);if(s.length!==o)throw new r("tlv.decode: wrong value length");return{v:s,l:t.subarray(i+o)}}},_int:{encode(e){let{Err:t}=uI;if(e(function(e){let{CURVE:t,curveOpts:r,hash:i,ecdsaOpts:n}=function(e){let{CURVE:t,curveOpts:r}=function(e){let t={a:e.a,b:e.b,p:e.Fp.ORDER,n:e.n,h:e.h,Gx:e.Gx,Gy:e.Gy},r=e.Fp,i=e.allowedPrivateKeyLengths?Array.from(new Set(e.allowedPrivateKeyLengths.map(e=>Math.ceil(e/2)))):void 0,n={Fp:r,Fn:d4(t.n,{BITS:e.nBitLength,allowedLengths:i,modFromBytes:e.wrapPrivateKey}),allowInfinityPoint:e.allowInfinityPoint,endo:e.endo,isTorsionFree:e.isTorsionFree,clearCofactor:e.clearCofactor,fromBytes:e.fromBytes,toBytes:e.toBytes};return{CURVE:t,curveOpts:n}}(e),i={hmac:e.hmac,randomBytes:e.randomBytes,lowS:e.lowS,bits2int:e.bits2int,bits2int_modN:e.bits2int_modN};return{CURVE:t,curveOpts:r,hash:e.hash,ecdsaOpts:i}}(e);return function(e,t){let r=t.Point;return Object.assign({},t,{ProjectivePoint:r,CURVE:Object.assign({},e,d5(r.Fn.ORDER,r.Fn.BITS))})}(e,function(e,t,r={}){lm(t),dU(r,{},{hmac:"function",lowS:"boolean",randomBytes:"function",bits2int:"function",bits2int_modN:"function"});let i=r.randomBytes||lM,n=r.hmac||((e,...r)=>dw(t,e,lD(...r))),{Fp:o,Fn:s}=e,{ORDER:a,BITS:l}=s,{keygen:c,getPublicKey:d,getSharedSecret:u,utils:h,lengths:p}=function(e,t={}){let{Fn:r}=e,i=t.randomBytes||lM,n=Object.assign(uD(e.Fp,r),{seed:d8(r.ORDER)});function o(e){try{return!!uP(r,e)}catch{return!1}}function s(e=i(n.seed)){return function(e,t,r=!1){let i=e.length,n=d6(t),o=d8(t);if(i<16||i1024)throw Error("expected "+o+"-1024 bytes of input, got "+i);let s=dZ(r?dN(e):dI(lk(e)),t-dB)+dB;return r?dR(s,n):dk(s,n)}(dA(e,n.seed,"seed"),r.ORDER)}function a(t,i=!0){return e.BASE.multiply(uP(r,t)).toBytes(i)}function l(t){if("bigint"==typeof t)return!1;if(t instanceof e)return!0;let{secretKey:i,publicKey:o,publicKeyUncompressed:s}=n;if(r.allowedLengths||i===o)return;let a=dO("key",t).length;return a===o||a===s}return Object.freeze({getPublicKey:a,getSharedSecret:function(t,i,n=!0){if(!0===l(t))throw Error("first arg must be private key");if(!1===l(i))throw Error("second arg must be public key");let o=uP(r,t);return e.fromHex(i).multiply(o).toBytes(n)},keygen:function(e){let t=s(e);return{secretKey:t,publicKey:a(t)}},Point:e,utils:{isValidSecretKey:o,isValidPublicKey:function(t,r){let{publicKey:i,publicKeyUncompressed:o}=n;try{let n=t.length;return(!0!==r||n===i)&&(!1!==r||n===o)&&!!e.fromBytes(t)}catch{return!1}},randomSecretKey:s,isValidPrivateKey:o,randomPrivateKey:s,normPrivateKeyToScalar:e=>uP(r,e),precompute:(t=8,r=e.BASE)=>r.precompute(t,!1)},lengths:n})}(e,r),f={prehash:!1,lowS:"boolean"==typeof r.lowS&&r.lowS,format:void 0,extraEntropy:!1},g="compact";function m(e,t){if(!s.isValidNot0(t))throw Error(`invalid signature ${e}: out of range 1..Point.Fn.ORDER`);return t}class y{constructor(e,t,r){this.r=m("r",e),this.s=m("s",t),null!=r&&(this.recovery=r),Object.freeze(this)}static fromBytes(e,t=g){let r;if(!function(e,t){u_(t);let r=p.signature;dA(e,"compact"===t?r:"recovered"===t?r+1:void 0,`${t} signature`)}(e,t),"der"===t){let{r:t,s:r}=uI.toSig(dA(e));return new y(t,r)}"recovered"===t&&(r=e[0],t="compact",e=e.subarray(1));let i=s.BYTES,n=e.subarray(0,i),o=e.subarray(i,2*i);return new y(s.fromBytes(n),s.fromBytes(o),r)}static fromHex(e,t){return this.fromBytes(lT(e),t)}addRecoveryBit(e){return new y(this.r,this.s,e)}recoverPublicKey(t){let r=o.ORDER,{r:i,s:n,recovery:l}=this;if(null==l||![0,1,2,3].includes(l))throw Error("recovery id invalid");if(a*uR1)throw Error("recovery id is ambiguous for h>1 curve");let c=2===l||3===l?i+a:i;if(!o.isValid(c))throw Error("recovery id 2 or 3 invalid");let d=o.toBytes(c),u=e.fromBytes(lD(u$((1&l)==0),d)),h=s.inv(c),p=b(dO("msgHash",t)),f=s.create(-p*h),g=s.create(n*h),m=e.BASE.multiplyUnsafe(f).add(u.multiplyUnsafe(g));if(m.is0())throw Error("point at infinify");return m.assertValidity(),m}hasHighS(){return this.s>a>>uk}toBytes(e=g){if(u_(e),"der"===e)return lT(uI.hexFromSig(this));let t=s.toBytes(this.r),r=s.toBytes(this.s);if("recovered"===e){if(null==this.recovery)throw Error("recovery bit must be present");return lD(Uint8Array.of(this.recovery),t,r)}return lD(t,r)}toHex(e){return lk(this.toBytes(e))}assertValidity(){}static fromCompact(e){return y.fromBytes(dO("sig",e),"compact")}static fromDER(e){return y.fromBytes(dO("sig",e),"der")}normalizeS(){return this.hasHighS()?new y(this.r,s.neg(this.s),this.recovery):this}toDERRawBytes(){return this.toBytes("der")}toDERHex(){return lk(this.toBytes("der"))}toCompactRawBytes(){return this.toBytes("compact")}toCompactHex(){return lk(this.toBytes("compact"))}}let w=r.bits2int||function(e){if(e.length>8192)throw Error("input is too large");let t=dI(lk(e)),r=8*e.length-l;return r>0?t>>BigInt(r):t},b=r.bits2int_modN||function(e){return s.create(w(e))},v=dD(l);function C(e){return dP("num < 2^"+l,e,uN,v),s.toBytes(e)}function E(e,r){return dA(e,void 0,"message"),r?dA(t(e),void 0,"prehashed message"):e}return Object.freeze({keygen:c,getPublicKey:d,getSharedSecret:u,utils:h,lengths:p,Point:e,sign:function(r,o,l={}){let{seed:c,k2sig:d}=function(t,r,n){if(["recovered","canonical"].some(e=>e in n))throw Error("sign() legacy options not supported");let{lowS:o,prehash:l,extraEntropy:c}=uA(n,f),d=b(t=E(t,l)),u=uP(s,r),h=[C(u),C(d)];if(null!=c&&!1!==c){let e=!0===c?i(p.secretKey):c;h.push(dO("extraEntropy",e))}return{seed:lD(...h),k2sig:function(t){let r=w(t);if(!s.isValidNot0(r))return;let i=s.inv(r),n=e.BASE.multiply(r).toAffine(),l=s.create(n.x);if(l===uN)return;let c=s.create(i*s.create(d+l*u));if(c===uN)return;let h=(n.x===l?0:2)|Number(n.y&uk),p=c;return o&&c>a>>uk&&(p=s.neg(c),h^=1),new y(l,p,h)}}}(r=dO("message",r),o,l);return(function(e,t,r){if("number"!=typeof e||e<2)throw Error("hashLen must be a number");if("number"!=typeof t||t<2)throw Error("qByteLen must be a number");if("function"!=typeof r)throw Error("hmacFn must be a function");let i=e=>new Uint8Array(e),n=e=>Uint8Array.of(e),o=i(e),s=i(e),a=0,l=()=>{o.fill(1),s.fill(0),a=0},c=(...e)=>r(s,o,...e),d=(e=i(0))=>{s=c(n(0),e),o=c(),0!==e.length&&(s=c(n(1),e),o=c())},u=()=>{if(a++>=1e3)throw Error("drbg: tried 1000 values");let e=0,r=[];for(;e{let r;for(l(),d(e);!(r=t(u()));)d();return l(),r}})(t.outputLen,s.BYTES,n)(c,d)},verify:function(t,r,i,n={}){let{lowS:o,prehash:a,format:l}=uA(n,f);if(i=dO("publicKey",i),r=E(dO("message",r),a),"strict"in n)throw Error("options.strict was renamed to lowS");let c=void 0===l?function(e){let t;let r="string"==typeof e||lp(e),i=!r&&null!==e&&"object"==typeof e&&"bigint"==typeof e.r&&"bigint"==typeof e.s;if(!r&&!i)throw Error("invalid signature, expected Uint8Array, hex string or Signature instance");if(i)t=new y(e.r,e.s);else if(r){try{t=y.fromBytes(dO("sig",e),"der")}catch(e){if(!(e instanceof uI.Err))throw e}if(!t)try{t=y.fromBytes(dO("sig",e),"compact")}catch{return!1}}return t||!1}(t):y.fromBytes(dO("sig",t),l);if(!1===c)return!1;try{let t=e.fromBytes(i);if(o&&c.hasHighS())return!1;let{r:n,s:a}=c,l=b(r),d=s.inv(a),u=s.create(l*d),h=s.create(n*d),p=e.BASE.multiplyUnsafe(u).add(t.multiplyUnsafe(h));return!p.is0()&&s.create(p.x)===n}catch{return!1}},recoverPublicKey:function(e,t,r={}){let{prehash:i}=uA(r,f);return t=E(t,i),y.fromBytes(e,"recovered").recoverPublicKey(t).toBytes()},Signature:y,hash:t})}(function(e,t={}){let r=function(e,t,r={},i){if(void 0===i&&(i="edwards"===e),!t||"object"!=typeof t)throw Error(`expected valid ${e} CURVE object`);for(let e of["p","n","h"]){let r=t[e];if(!("bigint"==typeof r&&r>d9))throw Error(`CURVE.${e} must be positive bigint`)}let n=ud(t.p,r.Fp,i),o=ud(t.n,r.Fn,i);for(let r of["Gx","Gy","a","weierstrass"===e?"b":"d"])if(!n.isValid(t[r]))throw Error(`CURVE.${r} must be valid field element of CURVE.Fp`);return{CURVE:t=Object.freeze(Object.assign({},t)),Fp:n,Fn:o}}("weierstrass",e,t),{Fp:i,Fn:n}=r,o=r.CURVE,{h:s,n:a}=o;dU(t,{},{allowInfinityPoint:"boolean",clearCofactor:"function",isTorsionFree:"function",fromBytes:"function",toBytes:"function",endo:"object",wrapPrivateKey:"boolean"});let{endo:l}=t;if(l&&(!i.is0(o.a)||"bigint"!=typeof l.beta||!Array.isArray(l.basises)))throw Error('invalid endo: expected "beta": bigint and "basises": array');let c=uD(i,n);function d(){if(!i.isOdd)throw Error("compression is not supported: Field does not have .isOdd()")}let u=t.toBytes||function(e,t,r){let{x:n,y:o}=t.toAffine(),s=i.toBytes(n);return(d_(r,"isCompressed"),r)?(d(),lD(u$(!i.isOdd(o)),s)):lD(Uint8Array.of(4),s,i.toBytes(o))},h=t.fromBytes||function(e){dA(e,void 0,"Point");let{publicKey:t,publicKeyUncompressed:r}=c,n=e.length,o=e[0],s=e.subarray(1);if(n===t&&(2===o||3===o)){let e;let t=i.fromBytes(s);if(!i.isValid(t))throw Error("bad point: is not on curve, wrong x");let r=p(t);try{e=i.sqrt(r)}catch(e){throw Error("bad point: is not on curve, sqrt error"+(e instanceof Error?": "+e.message:""))}return d(),(1&o)==1!==i.isOdd(e)&&(e=i.neg(e)),{x:t,y:e}}if(n===r&&4===o){let e=i.BYTES,t=i.fromBytes(s.subarray(0,e)),r=i.fromBytes(s.subarray(e,2*e));if(!f(t,r))throw Error("bad point: is not on curve");return{x:t,y:r}}throw Error(`bad point: got length ${n}, expected compressed=${t} or uncompressed=${r}`)};function p(e){let t=i.sqr(e),r=i.mul(t,e);return i.add(i.add(r,i.mul(e,o.a)),o.b)}function f(e,t){let r=i.sqr(t),n=p(e);return i.eql(r,n)}if(!f(o.Gx,o.Gy))throw Error("bad curve params: generator point");let g=i.mul(i.pow(o.a,uO),uT),m=i.mul(i.sqr(o.b),BigInt(27));if(i.is0(i.add(g,m)))throw Error("bad curve params: a or b");function y(e,t,r=!1){if(!i.isValid(t)||r&&i.is0(t))throw Error(`bad point coordinate ${e}`);return t}function w(e){if(!(e instanceof x))throw Error("ProjectivePoint expected")}function b(e){if(!l||!l.basises)throw Error("no endo");return function(e,t,r){let[[i,n],[o,s]]=t,a=ux(s*e,r),l=ux(-n*e,r),c=e-a*i-l*o,d=-a*n-l*s,u=c=p||d=p)throw Error("splitScalar (endomorphism): failed, k="+e);return{k1neg:u,k1:c,k2neg:h,k2:d}}(e,l.basises,n.ORDER)}let v=dL((e,t)=>{let{X:r,Y:n,Z:o}=e;if(i.eql(o,i.ONE))return{x:r,y:n};let s=e.is0();null==t&&(t=s?i.ONE:i.inv(o));let a=i.mul(r,t),l=i.mul(n,t),c=i.mul(o,t);if(s)return{x:i.ZERO,y:i.ZERO};if(!i.eql(c,i.ONE))throw Error("invZ was invalid");return{x:a,y:l}}),C=dL(e=>{if(e.is0()){if(t.allowInfinityPoint&&!i.is0(e.Y))return;throw Error("bad point: ZERO")}let{x:r,y:n}=e.toAffine();if(!i.isValid(r)||!i.isValid(n))throw Error("bad point: x or y not field elements");if(!f(r,n))throw Error("bad point: equation left != right");if(!e.isTorsionFree())throw Error("bad point: not in prime-order subgroup");return!0});function E(e,t,r,n,o){return r=new x(i.mul(r.X,e),r.Y,r.Z),t=ue(n,t),r=ue(o,r),t.add(r)}class x{constructor(e,t,r){this.X=y("x",e),this.Y=y("y",t,!0),this.Z=y("z",r),Object.freeze(this)}static CURVE(){return o}static fromAffine(e){let{x:t,y:r}=e||{};if(!e||!i.isValid(t)||!i.isValid(r))throw Error("invalid affine point");if(e instanceof x)throw Error("projective point not allowed");return i.is0(t)&&i.is0(r)?x.ZERO:new x(t,r,i.ONE)}static fromBytes(e){let t=x.fromAffine(h(dA(e,void 0,"point")));return t.assertValidity(),t}static fromHex(e){return x.fromBytes(dO("pointHex",e))}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(e=8,t=!0){return A.createCache(this,e),t||this.multiply(uO),this}assertValidity(){C(this)}hasEvenY(){let{y:e}=this.toAffine();if(!i.isOdd)throw Error("Field doesn't support isOdd");return!i.isOdd(e)}equals(e){w(e);let{X:t,Y:r,Z:n}=this,{X:o,Y:s,Z:a}=e,l=i.eql(i.mul(t,a),i.mul(o,n)),c=i.eql(i.mul(r,a),i.mul(s,n));return l&&c}negate(){return new x(this.X,i.neg(this.Y),this.Z)}double(){let{a:e,b:t}=o,r=i.mul(t,uO),{X:n,Y:s,Z:a}=this,l=i.ZERO,c=i.ZERO,d=i.ZERO,u=i.mul(n,n),h=i.mul(s,s),p=i.mul(a,a),f=i.mul(n,s);return f=i.add(f,f),d=i.mul(n,a),d=i.add(d,d),l=i.mul(e,d),c=i.mul(r,p),c=i.add(l,c),l=i.sub(h,c),c=i.add(h,c),c=i.mul(l,c),l=i.mul(f,l),d=i.mul(r,d),p=i.mul(e,p),f=i.sub(u,p),f=i.mul(e,f),f=i.add(f,d),d=i.add(u,u),u=i.add(d,u),u=i.add(u,p),u=i.mul(u,f),c=i.add(c,u),p=i.mul(s,a),p=i.add(p,p),u=i.mul(p,f),l=i.sub(l,u),d=i.mul(p,h),d=i.add(d,d),new x(l,c,d=i.add(d,d))}add(e){w(e);let{X:t,Y:r,Z:n}=this,{X:s,Y:a,Z:l}=e,c=i.ZERO,d=i.ZERO,u=i.ZERO,h=o.a,p=i.mul(o.b,uO),f=i.mul(t,s),g=i.mul(r,a),m=i.mul(n,l),y=i.add(t,r),b=i.add(s,a);y=i.mul(y,b),b=i.add(f,g),y=i.sub(y,b),b=i.add(t,n);let v=i.add(s,l);return b=i.mul(b,v),v=i.add(f,m),b=i.sub(b,v),v=i.add(r,n),c=i.add(a,l),v=i.mul(v,c),c=i.add(g,m),v=i.sub(v,c),u=i.mul(h,b),c=i.mul(p,m),u=i.add(c,u),c=i.sub(g,u),u=i.add(g,u),d=i.mul(c,u),g=i.add(f,f),g=i.add(g,f),m=i.mul(h,m),b=i.mul(p,b),g=i.add(g,m),m=i.sub(f,m),m=i.mul(h,m),b=i.add(b,m),f=i.mul(g,b),d=i.add(d,f),f=i.mul(v,b),c=i.mul(y,c),c=i.sub(c,f),f=i.mul(y,g),u=i.mul(v,u),new x(c,d,u=i.add(u,f))}subtract(e){return this.add(e.negate())}is0(){return this.equals(x.ZERO)}multiply(e){let r,i;let{endo:o}=t;if(!n.isValidNot0(e))throw Error("invalid scalar: out of range");let s=e=>A.cached(this,e,e=>ut(x,e));if(o){let{k1neg:t,k1:n,k2neg:a,k2:l}=b(e),{p:c,f:d}=s(n),{p:u,f:h}=s(l);i=d.add(h),r=E(o.beta,c,u,t,a)}else{let{p:t,f:n}=s(e);r=t,i=n}return ut(x,[r,i])[0]}multiplyUnsafe(e){let{endo:r}=t;if(!n.isValid(e))throw Error("invalid scalar: out of range");if(e===uN||this.is0())return x.ZERO;if(e===uk)return this;if(A.hasCache(this))return this.multiply(e);if(!r)return A.unsafe(this,e);{let{k1neg:t,k1:i,k2neg:n,k2:o}=b(e),{p1:s,p2:a}=function(e,t,r,i){let n=t,o=e.ZERO,s=e.ZERO;for(;r>d9||i>d9;)r&d7&&(o=o.add(n)),i&d7&&(s=s.add(n)),n=n.double(),r>>=d7,i>>=d7;return{p1:o,p2:s}}(x,this,i,o);return E(r.beta,s,a,t,n)}}multiplyAndAddUnsafe(e,t,r){let i=this.multiplyUnsafe(t).add(e.multiplyUnsafe(r));return i.is0()?void 0:i}toAffine(e){return v(this,e)}isTorsionFree(){let{isTorsionFree:e}=t;return s===uk||(e?e(x,this):A.unsafe(this,a).is0())}clearCofactor(){let{clearCofactor:e}=t;return s===uk?this:e?e(x,this):this.multiplyUnsafe(s)}isSmallOrder(){return this.multiplyUnsafe(s).is0()}toBytes(e=!0){return d_(e,"isCompressed"),this.assertValidity(),u(x,this,e)}toHex(e=!0){return lk(this.toBytes(e))}toString(){return``}get px(){return this.X}get py(){return this.X}get pz(){return this.Z}toRawBytes(e=!0){return this.toBytes(e)}_setWindowSize(e){this.precompute(e)}static normalizeZ(e){return ut(x,e)}static msm(e,t){return function(e,t,r,i){(function(e,t){if(!Array.isArray(e))throw Error("array expected");e.forEach((e,r)=>{if(!(e instanceof t))throw Error("invalid point at index "+r)})})(r,e),function(e,t){if(!Array.isArray(e))throw Error("array of scalars expected");e.forEach((e,r)=>{if(!t.isValid(e))throw Error("invalid scalar at index "+r)})}(i,t);let n=r.length,o=i.length;if(n!==o)throw Error("arrays of points and scalars must have equal length");let s=e.ZERO,a=d$(BigInt(n)),l=1;a>12?l=a-3:a>4?l=a-2:a>0&&(l=2);let c=dD(l),d=Array(Number(c)+1).fill(s),u=Math.floor((t.BITS-1)/l)*l,h=s;for(let e=u;e>=0;e-=l){d.fill(s);for(let t=0;t>BigInt(e)&c);d[n]=d[n].add(r[t])}let t=s;for(let e=d.length-1,r=s;e>0;e--)r=r.add(d[e]),t=t.add(r);if(h=h.add(t),0!==e)for(let e=0;e"u")throw Error("missing sender public key");if(typeof e?.receiverPublicKey>"u")throw Error("missing receiver public key")}return{type:t,senderPublicKey:e?.senderPublicKey,receiverPublicKey:e?.receiverPublicKey}}function u5(e){return 1===e.type&&"string"==typeof e.senderPublicKey&&"string"==typeof e.receiverPublicKey}function u4(e){return e?.relay||{protocol:"irn"}}function u6(e){let t=au[e];if(typeof t>"u")throw Error(`Relay Protocol not supported: ${e}`);return t}var u8=Object.defineProperty,u9=Object.defineProperties,u7=Object.getOwnPropertyDescriptors,he=Object.getOwnPropertySymbols,ht=Object.prototype.hasOwnProperty,hr=Object.prototype.propertyIsEnumerable,hi=(e,t,r)=>t in e?u8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,hn=(e,t)=>{for(var r in t||(t={}))ht.call(t,r)&&hi(e,r,t[r]);if(he)for(var r of he(t))hr.call(t,r)&&hi(e,r,t[r]);return e},ho=(e,t)=>u9(e,u7(t));function hs(e){var t;if(!e.includes("wc:")){let t=aJ(e);null!=t&&t.includes("wc:")&&(e=t)}let r=(e=(e=e.includes("wc://")?e.replace("wc://",""):e).includes("wc:")?e.replace("wc:",""):e).indexOf(":"),i=-1!==e.indexOf("?")?e.indexOf("?"):void 0,n=e.substring(0,r),o=e.substring(r+1,i).split("@"),s=Object.fromEntries(new URLSearchParams("u">typeof i?e.substring(i):"").entries()),a="string"==typeof s.methods?s.methods.split(","):void 0;return{protocol:n,topic:(t=o[0]).startsWith("//")?t.substring(2):t,version:parseInt(o[1],10),symKey:s.symKey,relay:function(e,t="-"){let r={},i="relay"+t;return Object.keys(e).forEach(t=>{if(t.startsWith(i)){let n=t.replace(i,""),o=e[t];r[n]=o}}),r}(s),methods:a,expiryTimestamp:s.expiryTimestamp?parseInt(s.expiryTimestamp,10):void 0}}function ha(e){let t=new URLSearchParams;return Object.entries(hn(hn(ho(hn({},function(e,t="-"){let r={};return Object.keys(e).forEach(i=>{e[i]&&(r["relay"+t+i]=e[i])}),r}(e.relay)),{symKey:e.symKey}),e.expiryTimestamp&&{expiryTimestamp:e.expiryTimestamp.toString()}),e.methods&&{methods:e.methods.join(",")})).sort(([e],[t])=>e.localeCompare(t)).forEach(([e,r])=>{void 0!==r&&t.append(e,String(r))}),`${e.protocol}:${e.topic}@${e.version}?${t}`}function hl(e,t,r){return`${e}?wc_ev=${r}&topic=${t}`}var hc=Object.defineProperty,hd=Object.defineProperties,hu=Object.getOwnPropertyDescriptors,hh=Object.getOwnPropertySymbols,hp=Object.prototype.hasOwnProperty,hf=Object.prototype.propertyIsEnumerable,hg=(e,t,r)=>t in e?hc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,hm=(e,t)=>{for(var r in t||(t={}))hp.call(t,r)&&hg(e,r,t[r]);if(hh)for(var r of hh(t))hf.call(t,r)&&hg(e,r,t[r]);return e},hy=(e,t)=>hd(e,hu(t));function hw(e){let t=[];return e.forEach(e=>{let[r,i]=e.split(":");t.push(`${r}:${i}`)}),t}function hb(e){let t=[];return Object.values(e).forEach(e=>{t.push(...hw(e.accounts))}),[...new Set(t)]}function hv(e){return e.includes(":")}function hC(e){return hv(e)?e.split(":")[0]:e}function hE(e){var t,r,i;let n={};if(!hk(e))return n;for(let[o,s]of Object.entries(e)){let e=hv(o)?[o]:s.chains,a=s.methods||[],l=s.events||[],c=hC(o);n[c]=hy(hm({},n[c]),{chains:aq(e,null==(t=n[c])?void 0:t.chains),methods:aq(a,null==(r=n[c])?void 0:r.methods),events:aq(l,null==(i=n[c])?void 0:i.events)})}return n}function hx(e,t){let r=function(e){let t={};return e?.forEach(e=>{var r;let[i,n]=e.split(":");t[i]||(t[i]={accounts:[],chains:[],events:[],methods:[]}),t[i].accounts.push(e),null==(r=t[i].chains)||r.push(`${i}:${n}`)}),t}(t=t.map(e=>e.replace("did:pkh:","")));for(let[t,i]of Object.entries(r))i.methods?i.methods=aq(i.methods,e):i.methods=e,i.events=["chainChanged","accountsChanged"];return r}let h_={INVALID_METHOD:{message:"Invalid method.",code:1001},INVALID_EVENT:{message:"Invalid event.",code:1002},INVALID_UPDATE_REQUEST:{message:"Invalid update request.",code:1003},INVALID_EXTEND_REQUEST:{message:"Invalid extend request.",code:1004},INVALID_SESSION_SETTLE_REQUEST:{message:"Invalid session settle request.",code:1005},UNAUTHORIZED_METHOD:{message:"Unauthorized method.",code:3001},UNAUTHORIZED_EVENT:{message:"Unauthorized event.",code:3002},UNAUTHORIZED_UPDATE_REQUEST:{message:"Unauthorized update request.",code:3003},UNAUTHORIZED_EXTEND_REQUEST:{message:"Unauthorized extend request.",code:3004},USER_REJECTED:{message:"User rejected.",code:5e3},USER_REJECTED_CHAINS:{message:"User rejected chains.",code:5001},USER_REJECTED_METHODS:{message:"User rejected methods.",code:5002},USER_REJECTED_EVENTS:{message:"User rejected events.",code:5003},UNSUPPORTED_CHAINS:{message:"Unsupported chains.",code:5100},UNSUPPORTED_METHODS:{message:"Unsupported methods.",code:5101},UNSUPPORTED_EVENTS:{message:"Unsupported events.",code:5102},UNSUPPORTED_ACCOUNTS:{message:"Unsupported accounts.",code:5103},UNSUPPORTED_NAMESPACE_KEY:{message:"Unsupported namespace key.",code:5104},USER_DISCONNECTED:{message:"User disconnected.",code:6e3},SESSION_SETTLEMENT_FAILED:{message:"Session settlement failed.",code:7e3},WC_METHOD_UNSUPPORTED:{message:"Unsupported wc_ method.",code:10001}},hA={NOT_INITIALIZED:{message:"Not initialized.",code:1},NO_MATCHING_KEY:{message:"No matching key.",code:2},RESTORE_WILL_OVERRIDE:{message:"Restore will override.",code:3},RESUBSCRIBED:{message:"Resubscribed.",code:4},MISSING_OR_INVALID:{message:"Missing or invalid.",code:5},EXPIRED:{message:"Expired.",code:6},UNKNOWN_TYPE:{message:"Unknown type.",code:7},MISMATCHED_TOPIC:{message:"Mismatched topic.",code:8},NON_CONFORMING_NAMESPACES:{message:"Non conforming namespaces.",code:9}};function hS(e,t){let{message:r,code:i}=hA[e];return{message:t?`${r} ${t}`:r,code:i}}function hI(e,t){let{message:r,code:i}=h_[e];return{message:t?`${r} ${t}`:r,code:i}}function hN(e,t){return!!Array.isArray(e)&&(!("u">typeof t)||!e.length||e.every(t))}function hk(e){return Object.getPrototypeOf(e)===Object.prototype&&Object.keys(e).length}function hR(e){return typeof e>"u"}function hO(e,t){return!!(t&&hR(e))||"string"==typeof e&&!!e.trim().length}function hT(e,t){return!!(t&&hR(e))||"number"==typeof e&&!isNaN(e)}function hP(e){return!!(hO(e,!1)&&e.includes(":"))&&2===e.split(":").length}function h$(e){let t=!0;return hN(e)?e.length&&(t=e.every(e=>hO(e,!1))):t=!1,t}function hD(e,t){let r=null;return Object.values(e).forEach(e=>{var i;let n;if(r)return;let o=(i=`${t}, namespace`,n=null,h$(e?.methods)?h$(e?.events)||(n=hI("UNSUPPORTED_EVENTS",`${i}, events should be an array of strings or empty array for no events`)):n=hI("UNSUPPORTED_METHODS",`${i}, methods should be an array of strings or empty array for no methods`),n);o&&(r=o)}),r}function hU(e,t){let r=null;if(e&&hk(e)){let i;let n=hD(e,t);n&&(r=n);let o=(i=null,Object.values(e).forEach(e=>{var r,n;let o;if(i)return;let s=(r=e?.accounts,n=`${t} namespace`,o=null,hN(r)?r.forEach(e=>{o||function(e){if(hO(e,!1)&&e.includes(":")){let t=e.split(":");if(3===t.length){let e=t[0]+":"+t[1];return!!t[2]&&hP(e)}}return!1}(e)||(o=hI("UNSUPPORTED_ACCOUNTS",`${n}, account ${e} should be a string and conform to "namespace:chainId:address" format`))}):o=hI("UNSUPPORTED_ACCOUNTS",`${n}, accounts should be an array of strings conforming to "namespace:chainId:address" format`),o);s&&(i=s)}),i);o&&(r=o)}else r=hS("MISSING_OR_INVALID",`${t}, namespaces should be an object with data`);return r}function hL(e){return hO(e.protocol,!0)}function hM(e){return"u">typeof e}function hB(e,t){return!(!hP(t)||!hb(e).includes(t))}function hj(e,t,r){let i=null,n=function(e){let t={};return Object.keys(e).forEach(r=>{var i;r.includes(":")?t[r]=e[r]:null==(i=e[r].chains)||i.forEach(i=>{t[i]={methods:e[r].methods,events:e[r].events}})}),t}(e),o=function(e){let t={};return Object.keys(e).forEach(r=>{if(r.includes(":"))t[r]=e[r];else{let i=hw(e[r].accounts);i?.forEach(i=>{t[i]={accounts:e[r].accounts.filter(e=>e.includes(`${i}:`)),methods:e[r].methods,events:e[r].events}})}}),t}(t),s=Object.keys(n),a=Object.keys(o),l=hF(Object.keys(e)),c=hF(Object.keys(t)),d=l.filter(e=>!c.includes(e));return d.length&&(i=hS("NON_CONFORMING_NAMESPACES",`${r} namespaces keys don't satisfy requiredNamespaces. + Required: ${d.toString()} + Received: ${Object.keys(t).toString()}`)),aD(s,a)||(i=hS("NON_CONFORMING_NAMESPACES",`${r} namespaces chains don't satisfy required namespaces. + Required: ${s.toString()} + Approved: ${a.toString()}`)),Object.keys(t).forEach(e=>{if(!e.includes(":")||i)return;let n=hw(t[e].accounts);n.includes(e)||(i=hS("NON_CONFORMING_NAMESPACES",`${r} namespaces accounts don't satisfy namespace accounts for ${e} + Required: ${e} + Approved: ${n.toString()}`))}),s.forEach(e=>{i||(aD(n[e].methods,o[e].methods)?aD(n[e].events,o[e].events)||(i=hS("NON_CONFORMING_NAMESPACES",`${r} namespaces events don't satisfy namespace events for ${e}`)):i=hS("NON_CONFORMING_NAMESPACES",`${r} namespaces methods don't satisfy namespace methods for ${e}`))}),i}function hF(e){return[...new Set(e.map(e=>e.includes(":")?e.split(":")[0]:e))]}function hW(){let e=aO();return new Promise(t=>{switch(e){case aI.browser:t(aR()&&navigator?.onLine);break;case aI.reactNative:t(hz());break;case aI.node:default:t(!0)}})}async function hz(){if(ak()&&"u">typeof global&&null!=global&&global.NetInfo){let e=await (null==global?void 0:global.NetInfo.fetch());return e?.isConnected}return!0}let hH={};class hq{static get(e){return hH[e]}static set(e,t){hH[e]=t}static delete(e){delete hH[e]}}function hV(e){return new Uint8Array(e.replace(/^0x/,"").match(/.{1,2}/g).map(e=>parseInt(e,16)))}function hK({logger:e,name:t}){let r="string"==typeof e?(0,Y.Rt)({opts:{level:e,name:t}}).logger:e;return r.level="string"==typeof e?e:e.level,r}let hZ="INTERNAL_ERROR",hG="SERVER_ERROR",hY=[-32700,-32600,-32601,-32602,-32603],hJ={PARSE_ERROR:{code:-32700,message:"Parse error"},INVALID_REQUEST:{code:-32600,message:"Invalid Request"},METHOD_NOT_FOUND:{code:-32601,message:"Method not found"},INVALID_PARAMS:{code:-32602,message:"Invalid params"},[hZ]:{code:-32603,message:"Internal error"},[hG]:{code:-32e3,message:"Server error"}};function hX(e){return Object.keys(hJ).includes(e)?hJ[e]:hJ[hG]}function hQ(e,t,r){return e.message.includes("getaddrinfo ENOTFOUND")||e.message.includes("connect ECONNREFUSED")?Error(`Unavailable ${r} RPC url at ${t}`):e}var h0=r(13303);function h1(e=3){return Date.now()*Math.pow(10,e)+Math.floor(Math.random()*Math.pow(10,e))}function h2(e=6){return BigInt(h1(e))}function h3(e,t,r){return{id:r||h1(),jsonrpc:"2.0",method:e,params:t}}function h5(e,t){return{id:e,jsonrpc:"2.0",result:t}}function h4(e,t,r){var i,n,o;return{id:e,jsonrpc:"2.0",error:void 0===(i=t)?hX(hZ):("string"==typeof i&&(i=Object.assign(Object.assign({},hX(hG)),{message:i})),void 0!==r&&(i.data=r),n=i.code,hY.includes(n)&&(o=i.code,i=Object.values(hJ).find(e=>e.code===o)||hJ[hG]),i)}}class h6{}class h8 extends h6{constructor(){super()}}class h9 extends h8{constructor(e){super()}}function h7(e,t){let r=function(e){let t=e.match(RegExp(/^\w+:/,"gi"));if(t&&t.length)return t[0]}(e);return void 0!==r&&new RegExp(t).test(r)}function pe(e){return h7(e,"^https?:")}function pt(e){return h7(e,"^wss?:")}function pr(e){return"object"==typeof e&&"id"in e&&"jsonrpc"in e&&"2.0"===e.jsonrpc}function pi(e){return pr(e)&&"method"in e}function pn(e){return pr(e)&&(po(e)||ps(e))}function po(e){return"result"in e}function ps(e){return"error"in e}class pa extends h9{constructor(e){super(e),this.events=new w.EventEmitter,this.hasRegisteredEventListeners=!1,this.connection=this.setConnection(e),this.connection.connected&&this.registerEventListeners()}async connect(e=this.connection){await this.open(e)}async disconnect(){await this.close()}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async request(e,t){return this.requestStrict(h3(e.method,e.params||[],e.id||h2().toString()),t)}async requestStrict(e,t){return new Promise(async(r,i)=>{if(!this.connection.connected)try{await this.open()}catch(e){i(e)}this.events.on(`${e.id}`,e=>{ps(e)?i(e.error):r(e.result)});try{await this.connection.send(e,t)}catch(e){i(e)}})}setConnection(e=this.connection){return e}onPayload(e){this.events.emit("payload",e),pn(e)?this.events.emit(`${e.id}`,e):this.events.emit("message",{type:e.method,data:e.params})}onClose(e){e&&3e3===e.code&&this.events.emit("error",Error(`WebSocket connection closed abnormally with code: ${e.code} ${e.reason?`(${e.reason})`:""}`)),this.events.emit("disconnect")}async open(e=this.connection){this.connection===e&&this.connection.connected||(this.connection.connected&&this.close(),"string"==typeof e&&(await this.connection.open(e),e=this.connection),this.connection=this.setConnection(e),await this.connection.open(),this.registerEventListeners(),this.events.emit("connect"))}async close(){await this.connection.close()}registerEventListeners(){this.hasRegisteredEventListeners||(this.connection.on("payload",e=>this.onPayload(e)),this.connection.on("close",e=>this.onClose(e)),this.connection.on("error",e=>this.events.emit("error",e)),this.connection.on("register_error",e=>this.onClose()),this.hasRegisteredEventListeners=!0)}}let pl=()=>"u">typeof WebSocket||"u">typeof r.g&&"u">typeof r.g.WebSocket||"u">typeof window&&"u">typeof window.WebSocket||"u">typeof self&&"u">typeof self.WebSocket,pc=e=>e.split("?")[0],pd="u">typeof WebSocket?WebSocket:"u">typeof r.g&&"u">typeof r.g.WebSocket?r.g.WebSocket:"u">typeof window&&"u">typeof window.WebSocket?window.WebSocket:"u">typeof self&&"u">typeof self.WebSocket?self.WebSocket:r(16854);class pu{constructor(e){if(this.url=e,this.events=new w.EventEmitter,this.registering=!1,!pt(e))throw Error(`Provided URL is not compatible with WebSocket connection: ${e}`);this.url=e}get connected(){return"u">typeof this.socket}get connecting(){return this.registering}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async open(e=this.url){await this.register(e)}async close(){return new Promise((e,t)=>{if(typeof this.socket>"u"){t(Error("Connection already closed"));return}this.socket.onclose=t=>{this.onClose(t),e()},this.socket.close()})}async send(e){typeof this.socket>"u"&&(this.socket=await this.register());try{this.socket.send((0,j.u)(e))}catch(t){this.onError(e.id,t)}}register(e=this.url){if(!pt(e))throw Error(`Provided URL is not compatible with WebSocket connection: ${e}`);if(this.registering){let e=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=e||this.events.listenerCount("open")>=e)&&this.events.setMaxListeners(e+1),new Promise((e,t)=>{this.events.once("register_error",e=>{this.resetMaxListeners(),t(e)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.socket>"u")return t(Error("WebSocket connection is missing or invalid"));e(this.socket)})})}return this.url=e,this.registering=!0,new Promise((t,r)=>{let i=(0,h0.isReactNative)()?void 0:{rejectUnauthorized:!RegExp("wss?://localhost(:d{2,5})?").test(e)},n=new pd(e,[],i);pl()?n.onerror=e=>{r(this.emitError(e.error))}:n.on("error",e=>{r(this.emitError(e))}),n.onopen=()=>{this.onOpen(n),t(n)}})}onOpen(e){e.onmessage=e=>this.onPayload(e),e.onclose=e=>this.onClose(e),this.socket=e,this.registering=!1,this.events.emit("open")}onClose(e){this.socket=void 0,this.registering=!1,this.events.emit("close",e)}onPayload(e){if(typeof e.data>"u")return;let t="string"==typeof e.data?(0,j.D)(e.data):e.data;this.events.emit("payload",t)}onError(e,t){let r=this.parseError(t),i=h4(e,r.message||r.toString());this.events.emit("payload",i)}parseError(e,t=this.url){return hQ(e,pc(t),"WS")}resetMaxListeners(){this.events.getMaxListeners()>10&&this.events.setMaxListeners(10)}emitError(e){let t=this.parseError(Error(e?.message||`WebSocket connection failed for host: ${pc(this.url)}`));return this.events.emit("register_error",t),t}}var ph=r(82957).lW,pp=r(40257);let pf="core",pg=`wc@2:${pf}:`,pm={logger:"error"},py={database:":memory:"},pw="client_ed25519_seed",pb=b.ONE_DAY,pv=b.SIX_HOURS,pC="wss://relay.walletconnect.org",pE={message:"relayer_message",message_ack:"relayer_message_ack",connect:"relayer_connect",disconnect:"relayer_disconnect",error:"relayer_error",connection_stalled:"relayer_connection_stalled",publish:"relayer_publish"},px={payload:"payload",connect:"connect",disconnect:"disconnect",error:"error"},p_="2.23.0",pA={link_mode:"link_mode",relay:"relay"},pS={inbound:"inbound",outbound:"outbound"},pI="WALLETCONNECT_LINK_MODE_APPS",pN={created:"subscription_created",deleted:"subscription_deleted",sync:"subscription_sync",resubscribed:"subscription_resubscribed"},pk=(b.FIVE_SECONDS,{wc_pairingDelete:{req:{ttl:b.ONE_DAY,prompt:!1,tag:1e3},res:{ttl:b.ONE_DAY,prompt:!1,tag:1001}},wc_pairingPing:{req:{ttl:b.THIRTY_SECONDS,prompt:!1,tag:1002},res:{ttl:b.THIRTY_SECONDS,prompt:!1,tag:1003}},unregistered_method:{req:{ttl:b.ONE_DAY,prompt:!1,tag:0},res:{ttl:b.ONE_DAY,prompt:!1,tag:0}}}),pR={create:"pairing_create",expire:"pairing_expire",delete:"pairing_delete",ping:"pairing_ping"},pO={created:"history_created",updated:"history_updated",deleted:"history_deleted",sync:"history_sync"},pT={created:"expirer_created",deleted:"expirer_deleted",expired:"expirer_expired",sync:"expirer_sync"},pP="https://verify.walletconnect.org",p$=`${pP}/v3`,pD=["https://verify.walletconnect.com",pP],pU={pairing_started:"pairing_started",pairing_uri_validation_success:"pairing_uri_validation_success",pairing_uri_not_expired:"pairing_uri_not_expired",store_new_pairing:"store_new_pairing",subscribing_pairing_topic:"subscribing_pairing_topic",subscribe_pairing_topic_success:"subscribe_pairing_topic_success",existing_pairing:"existing_pairing",pairing_not_expired:"pairing_not_expired",emit_inactive_pairing:"emit_inactive_pairing",emit_session_proposal:"emit_session_proposal"},pL={no_internet_connection:"no_internet_connection",malformed_pairing_uri:"malformed_pairing_uri",active_pairing_already_exists:"active_pairing_already_exists",subscribe_pairing_topic_failure:"subscribe_pairing_topic_failure",pairing_expired:"pairing_expired",proposal_listener_not_found:"proposal_listener_not_found"},pM={session_approve_started:"session_approve_started",session_namespaces_validation_success:"session_namespaces_validation_success",subscribing_session_topic:"subscribing_session_topic",subscribe_session_topic_success:"subscribe_session_topic_success",session_approve_publish_success:"session_approve_publish_success",store_session:"store_session",session_request_response_started:"session_request_response_started",session_request_response_validation_success:"session_request_response_validation_success",session_request_response_publish_started:"session_request_response_publish_started"},pB={no_internet_connection:"no_internet_connection",proposal_expired:"proposal_expired",subscribe_session_topic_failure:"subscribe_session_topic_failure",session_approve_namespace_validation_failure:"session_approve_namespace_validation_failure",proposal_not_found:"proposal_not_found",session_request_response_validation_failure:"session_request_response_validation_failure",session_request_response_publish_failure:"session_request_response_publish_failure"},pj={authenticated_session_approve_started:"authenticated_session_approve_started",create_authenticated_session_topic:"create_authenticated_session_topic",cacaos_verified:"cacaos_verified",store_authenticated_session:"store_authenticated_session",subscribing_authenticated_session_topic:"subscribing_authenticated_session_topic",subscribe_authenticated_session_topic_success:"subscribe_authenticated_session_topic_success",publishing_authenticated_session_approve:"publishing_authenticated_session_approve"},pF={no_internet_connection:"no_internet_connection",invalid_cacao:"invalid_cacao",subscribe_authenticated_session_topic_failure:"subscribe_authenticated_session_topic_failure",authenticated_session_approve_publish_failure:"authenticated_session_approve_publish_failure",authenticated_session_pending_request_not_found:"authenticated_session_pending_request_not_found"};var pW=function(e,t){if(e.length>=255)throw TypeError("Alphabet too long");for(var r=new Uint8Array(256),i=0;i>>0,s=new Uint8Array(o);e[t];){var d=r[e.charCodeAt(t)];if(255===d)return;for(var u=0,h=o-1;(0!==d||u>>0,s[h]=d%256>>>0,d=d/256>>>0;if(0!==d)throw Error("Non-zero carry");n=u,t++}if(" "!==e[t]){for(var p=o-n;p!==o&&0===s[p];)p++;for(var f=new Uint8Array(i+(o-p)),g=i;p!==o;)f[g++]=s[p++];return f}}}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw TypeError("Expected Uint8Array");if(0===t.length)return"";for(var r=0,i=0,n=0,o=t.length;n!==o&&0===t[n];)n++,r++;for(var s=(o-n)*d+1>>>0,c=new Uint8Array(s);n!==o;){for(var u=t[n],h=0,p=s-1;(0!==u||h>>0,c[p]=u%a>>>0,u=u/a>>>0;if(0!==u)throw Error("Non-zero carry");i=h,n++}for(var f=s-i;f!==s&&0===c[f];)f++;for(var g=l.repeat(r);f{if(e instanceof Uint8Array&&"Uint8Array"===e.constructor.name)return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw Error("Unknown type, must be binary type")},pH=e=>new TextEncoder().encode(e),pq=e=>new TextDecoder().decode(e);class pV{constructor(e,t,r){this.name=e,this.prefix=t,this.baseEncode=r}encode(e){if(e instanceof Uint8Array)return`${this.prefix}${this.baseEncode(e)}`;throw Error("Unknown type, must be binary type")}}class pK{constructor(e,t,r){if(this.name=e,this.prefix=t,void 0===t.codePointAt(0))throw Error("Invalid prefix character");this.prefixCodePoint=t.codePointAt(0),this.baseDecode=r}decode(e){if("string"==typeof e){if(e.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(e)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(e.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(e){return pG(this,e)}}class pZ{constructor(e){this.decoders=e}or(e){return pG(this,e)}decode(e){let t=e[0],r=this.decoders[t];if(r)return r.decode(e);throw RangeError(`Unable to decode multibase string ${JSON.stringify(e)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}}let pG=(e,t)=>new pZ({...e.decoders||{[e.prefix]:e},...t.decoders||{[t.prefix]:t}});class pY{constructor(e,t,r,i){this.name=e,this.prefix=t,this.baseEncode=r,this.baseDecode=i,this.encoder=new pV(e,t,r),this.decoder=new pK(e,t,i)}encode(e){return this.encoder.encode(e)}decode(e){return this.decoder.decode(e)}}let pJ=({name:e,prefix:t,encode:r,decode:i})=>new pY(e,t,r,i),pX=({prefix:e,name:t,alphabet:r})=>{let{encode:i,decode:n}=pW(r,t);return pJ({prefix:e,name:t,encode:i,decode:e=>pz(n(e))})},pQ=(e,t,r,i)=>{let n={};for(let e=0;e=8&&(a-=8,s[c++]=255&l>>a)}if(a>=r||255&l<<8-a)throw SyntaxError("Unexpected end of data");return s},p0=(e,t,r)=>{let i="="===t[t.length-1],n=(1<r;)s-=r,o+=t[n&a>>s];if(s&&(o+=t[n&a<pJ({prefix:t,name:e,encode:e=>p0(e,i,r),decode:t=>pQ(t,i,r,e)});var p2=Object.freeze({__proto__:null,identity:pJ({prefix:"\0",name:"identity",encode:e=>pq(e),decode:e=>pH(e)})}),p3=Object.freeze({__proto__:null,base2:p1({prefix:"0",name:"base2",alphabet:"01",bitsPerChar:1})}),p5=Object.freeze({__proto__:null,base8:p1({prefix:"7",name:"base8",alphabet:"01234567",bitsPerChar:3})}),p4=Object.freeze({__proto__:null,base10:pX({prefix:"9",name:"base10",alphabet:"0123456789"})}),p6=Object.freeze({__proto__:null,base16:p1({prefix:"f",name:"base16",alphabet:"0123456789abcdef",bitsPerChar:4}),base16upper:p1({prefix:"F",name:"base16upper",alphabet:"0123456789ABCDEF",bitsPerChar:4})});let p8=p1({prefix:"b",name:"base32",alphabet:"abcdefghijklmnopqrstuvwxyz234567",bitsPerChar:5}),p9=p1({prefix:"B",name:"base32upper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",bitsPerChar:5}),p7=p1({prefix:"c",name:"base32pad",alphabet:"abcdefghijklmnopqrstuvwxyz234567=",bitsPerChar:5}),fe=p1({prefix:"C",name:"base32padupper",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",bitsPerChar:5}),ft=p1({prefix:"v",name:"base32hex",alphabet:"0123456789abcdefghijklmnopqrstuv",bitsPerChar:5}),fr=p1({prefix:"V",name:"base32hexupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV",bitsPerChar:5});var fi=Object.freeze({__proto__:null,base32:p8,base32upper:p9,base32pad:p7,base32padupper:fe,base32hex:ft,base32hexupper:fr,base32hexpad:p1({prefix:"t",name:"base32hexpad",alphabet:"0123456789abcdefghijklmnopqrstuv=",bitsPerChar:5}),base32hexpadupper:p1({prefix:"T",name:"base32hexpadupper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUV=",bitsPerChar:5}),base32z:p1({prefix:"h",name:"base32z",alphabet:"ybndrfg8ejkmcpqxot1uwisza345h769",bitsPerChar:5})}),fn=Object.freeze({__proto__:null,base36:pX({prefix:"k",name:"base36",alphabet:"0123456789abcdefghijklmnopqrstuvwxyz"}),base36upper:pX({prefix:"K",name:"base36upper",alphabet:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"})}),fo=Object.freeze({__proto__:null,base58btc:pX({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"}),base58flickr:pX({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"})});let fs=p1({prefix:"m",name:"base64",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bitsPerChar:6});var fa=Object.freeze({__proto__:null,base64:fs,base64pad:p1({prefix:"M",name:"base64pad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",bitsPerChar:6}),base64url:p1({prefix:"u",name:"base64url",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",bitsPerChar:6}),base64urlpad:p1({prefix:"U",name:"base64urlpad",alphabet:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",bitsPerChar:6})});let fl=Array.from("\uD83D\uDE80\uD83E\uDE90☄\uD83D\uDEF0\uD83C\uDF0C\uD83C\uDF11\uD83C\uDF12\uD83C\uDF13\uD83C\uDF14\uD83C\uDF15\uD83C\uDF16\uD83C\uDF17\uD83C\uDF18\uD83C\uDF0D\uD83C\uDF0F\uD83C\uDF0E\uD83D\uDC09☀\uD83D\uDCBB\uD83D\uDDA5\uD83D\uDCBE\uD83D\uDCBF\uD83D\uDE02❤\uD83D\uDE0D\uD83E\uDD23\uD83D\uDE0A\uD83D\uDE4F\uD83D\uDC95\uD83D\uDE2D\uD83D\uDE18\uD83D\uDC4D\uD83D\uDE05\uD83D\uDC4F\uD83D\uDE01\uD83D\uDD25\uD83E\uDD70\uD83D\uDC94\uD83D\uDC96\uD83D\uDC99\uD83D\uDE22\uD83E\uDD14\uD83D\uDE06\uD83D\uDE44\uD83D\uDCAA\uD83D\uDE09☺\uD83D\uDC4C\uD83E\uDD17\uD83D\uDC9C\uD83D\uDE14\uD83D\uDE0E\uD83D\uDE07\uD83C\uDF39\uD83E\uDD26\uD83C\uDF89\uD83D\uDC9E✌✨\uD83E\uDD37\uD83D\uDE31\uD83D\uDE0C\uD83C\uDF38\uD83D\uDE4C\uD83D\uDE0B\uD83D\uDC97\uD83D\uDC9A\uD83D\uDE0F\uD83D\uDC9B\uD83D\uDE42\uD83D\uDC93\uD83E\uDD29\uD83D\uDE04\uD83D\uDE00\uD83D\uDDA4\uD83D\uDE03\uD83D\uDCAF\uD83D\uDE48\uD83D\uDC47\uD83C\uDFB6\uD83D\uDE12\uD83E\uDD2D❣\uD83D\uDE1C\uD83D\uDC8B\uD83D\uDC40\uD83D\uDE2A\uD83D\uDE11\uD83D\uDCA5\uD83D\uDE4B\uD83D\uDE1E\uD83D\uDE29\uD83D\uDE21\uD83E\uDD2A\uD83D\uDC4A\uD83E\uDD73\uD83D\uDE25\uD83E\uDD24\uD83D\uDC49\uD83D\uDC83\uD83D\uDE33✋\uD83D\uDE1A\uD83D\uDE1D\uD83D\uDE34\uD83C\uDF1F\uD83D\uDE2C\uD83D\uDE43\uD83C\uDF40\uD83C\uDF37\uD83D\uDE3B\uD83D\uDE13⭐✅\uD83E\uDD7A\uD83C\uDF08\uD83D\uDE08\uD83E\uDD18\uD83D\uDCA6✔\uD83D\uDE23\uD83C\uDFC3\uD83D\uDC90☹\uD83C\uDF8A\uD83D\uDC98\uD83D\uDE20☝\uD83D\uDE15\uD83C\uDF3A\uD83C\uDF82\uD83C\uDF3B\uD83D\uDE10\uD83D\uDD95\uD83D\uDC9D\uD83D\uDE4A\uD83D\uDE39\uD83D\uDDE3\uD83D\uDCAB\uD83D\uDC80\uD83D\uDC51\uD83C\uDFB5\uD83E\uDD1E\uD83D\uDE1B\uD83D\uDD34\uD83D\uDE24\uD83C\uDF3C\uD83D\uDE2B⚽\uD83E\uDD19☕\uD83C\uDFC6\uD83E\uDD2B\uD83D\uDC48\uD83D\uDE2E\uD83D\uDE46\uD83C\uDF7B\uD83C\uDF43\uD83D\uDC36\uD83D\uDC81\uD83D\uDE32\uD83C\uDF3F\uD83E\uDDE1\uD83C\uDF81⚡\uD83C\uDF1E\uD83C\uDF88❌✊\uD83D\uDC4B\uD83D\uDE30\uD83E\uDD28\uD83D\uDE36\uD83E\uDD1D\uD83D\uDEB6\uD83D\uDCB0\uD83C\uDF53\uD83D\uDCA2\uD83E\uDD1F\uD83D\uDE41\uD83D\uDEA8\uD83D\uDCA8\uD83E\uDD2C✈\uD83C\uDF80\uD83C\uDF7A\uD83E\uDD13\uD83D\uDE19\uD83D\uDC9F\uD83C\uDF31\uD83D\uDE16\uD83D\uDC76\uD83E\uDD74▶➡❓\uD83D\uDC8E\uD83D\uDCB8⬇\uD83D\uDE28\uD83C\uDF1A\uD83E\uDD8B\uD83D\uDE37\uD83D\uDD7A⚠\uD83D\uDE45\uD83D\uDE1F\uD83D\uDE35\uD83D\uDC4E\uD83E\uDD32\uD83E\uDD20\uD83E\uDD27\uD83D\uDCCC\uD83D\uDD35\uD83D\uDC85\uD83E\uDDD0\uD83D\uDC3E\uD83C\uDF52\uD83D\uDE17\uD83E\uDD11\uD83C\uDF0A\uD83E\uDD2F\uD83D\uDC37☎\uD83D\uDCA7\uD83D\uDE2F\uD83D\uDC86\uD83D\uDC46\uD83C\uDFA4\uD83D\uDE47\uD83C\uDF51❄\uD83C\uDF34\uD83D\uDCA3\uD83D\uDC38\uD83D\uDC8C\uD83D\uDCCD\uD83E\uDD40\uD83E\uDD22\uD83D\uDC45\uD83D\uDCA1\uD83D\uDCA9\uD83D\uDC50\uD83D\uDCF8\uD83D\uDC7B\uD83E\uDD10\uD83E\uDD2E\uD83C\uDFBC\uD83E\uDD75\uD83D\uDEA9\uD83C\uDF4E\uD83C\uDF4A\uD83D\uDC7C\uD83D\uDC8D\uD83D\uDCE3\uD83E\uDD42"),fc=fl.reduce((e,t,r)=>(e[r]=t,e),[]),fd=fl.reduce((e,t,r)=>(e[t.codePointAt(0)]=r,e),[]);var fu=Object.freeze({__proto__:null,base256emoji:pJ({prefix:"\uD83D\uDE80",name:"base256emoji",encode:function(e){return e.reduce((e,t)=>e+=fc[t],"")},decode:function(e){let t=[];for(let r of e){let e=fd[r.codePointAt(0)];if(void 0===e)throw Error(`Non-base256emoji character: ${r}`);t.push(e)}return new Uint8Array(t)}})});function fh(e,t){var r,i=0,t=t||0,n=0,o=t,s=e.length;do{if(o>=s)throw fh.bytes=0,RangeError("Could not decode varint");r=e[o++],i+=n<28?(127&r)<=128);return fh.bytes=o-t,i}var fp=function e(t,r,i){r=r||[],i=i||0;for(var n=i;t>=2147483648;)r[i++]=255&t|128,t/=128;for(;-128&t;)r[i++]=255&t|128,t>>>=7;return r[i]=0|t,e.bytes=i-n+1,r};let ff=(e,t,r=0)=>(fp(e,t,r),t),fg=e=>e<128?1:e<16384?2:e<2097152?3:e<268435456?4:e<34359738368?5:e<4398046511104?6:e<562949953421312?7:e<72057594037927940?8:e<0x7fffffffffffffff?9:10,fm=(e,t)=>{let r=t.byteLength,i=fg(e),n=i+fg(r),o=new Uint8Array(n+r);return ff(e,o,0),ff(r,o,i),o.set(t,n),new fy(e,r,t,o)};class fy{constructor(e,t,r,i){this.code=e,this.size=t,this.digest=r,this.bytes=i}}let fw=({name:e,code:t,encode:r})=>new fb(e,t,r);class fb{constructor(e,t,r){this.name=e,this.code=t,this.encode=r}digest(e){if(e instanceof Uint8Array){let t=this.encode(e);return t instanceof Uint8Array?fm(this.code,t):t.then(e=>fm(this.code,e))}throw Error("Unknown type, must be binary type")}}let fv=e=>async t=>new Uint8Array(await crypto.subtle.digest(e,t));var fC=Object.freeze({__proto__:null,sha256:fw({name:"sha2-256",code:18,encode:fv("SHA-256")}),sha512:fw({name:"sha2-512",code:19,encode:fv("SHA-512")})}),fE=Object.freeze({__proto__:null,identity:{code:0,name:"identity",encode:pz,digest:e=>fm(0,pz(e))}});new TextEncoder,new TextDecoder;let fx={...p2,...p3,...p5,...p4,...p6,...fi,...fn,...fo,...fa,...fu};function f_(e){return null!=globalThis.Buffer?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e}function fA(e,t,r,i){return{name:e,prefix:t,encoder:{name:e,prefix:t,encode:r},decoder:{decode:i}}}({...fC,...fE});let fS=fA("utf8","u",e=>"u"+new TextDecoder("utf8").decode(e),e=>new TextEncoder().encode(e.substring(1))),fI=fA("ascii","a",e=>{let t="a";for(let r=0;r{let t=function(e=0){return null!=globalThis.Buffer&&null!=globalThis.Buffer.allocUnsafe?f_(globalThis.Buffer.allocUnsafe(e)):new Uint8Array(e)}((e=e.substring(1)).length);for(let r=0;rt in e?fk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,fO=(e,t,r)=>fR(e,"symbol"!=typeof t?t+"":t,r);class fT{constructor(e,t){this.core=e,this.logger=t,fO(this,"keychain",new Map),fO(this,"name","keychain"),fO(this,"version","0.3"),fO(this,"initialized",!1),fO(this,"storagePrefix",pg),fO(this,"init",async()=>{if(!this.initialized){let e=await this.getKeyChain();"u">typeof e&&(this.keychain=e),this.initialized=!0}}),fO(this,"has",e=>(this.isInitialized(),this.keychain.has(e))),fO(this,"set",async(e,t)=>{this.isInitialized(),this.keychain.set(e,t),await this.persist()}),fO(this,"get",e=>{this.isInitialized();let t=this.keychain.get(e);if(typeof t>"u"){let{message:t}=hS("NO_MATCHING_KEY",`${this.name}: ${e}`);throw Error(t)}return t}),fO(this,"del",async e=>{this.isInitialized(),this.keychain.delete(e),await this.persist()}),this.core=e,this.logger=(0,Y.Ep)(t,this.name)}get context(){return(0,Y.Fd)(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}async setKeyChain(e){await this.core.storage.setItem(this.storageKey,aU(e))}async getKeyChain(){let e=await this.core.storage.getItem(this.storageKey);return"u">typeof e?aL(e):void 0}async persist(){await this.setKeyChain(this.keychain)}isInitialized(){if(!this.initialized){let{message:e}=hS("NOT_INITIALIZED",this.name);throw Error(e)}}}var fP=Object.defineProperty,f$=(e,t,r)=>t in e?fP(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,fD=(e,t,r)=>f$(e,"symbol"!=typeof t?t+"":t,r);class fU{constructor(e,t,r){this.core=e,this.logger=t,fD(this,"name","crypto"),fD(this,"keychain"),fD(this,"randomSessionIdentifier",uG()),fD(this,"initialized",!1),fD(this,"clientId"),fD(this,"init",async()=>{this.initialized||(await this.keychain.init(),this.initialized=!0)}),fD(this,"hasKeys",e=>(this.isInitialized(),this.keychain.has(e))),fD(this,"getClientId",async()=>{if(this.isInitialized(),this.clientId)return this.clientId;let e=rI(rk(await this.getClientSeed()).publicKey);return this.clientId=e,e}),fD(this,"generateKeyPair",()=>{this.isInitialized();let e=function(){let e=uE.utils.randomPrivateKey(),t=uE.getPublicKey(e);return{privateKey:ad(e,uq),publicKey:ad(t,uq)}}();return this.setPrivateKey(e.publicKey,e.privateKey)}),fD(this,"signJWT",async e=>{this.isInitialized();let t=rk(await this.getClientSeed()),r=this.randomSessionIdentifier;return await rR(r,e,pb,t)}),fD(this,"generateSharedKey",(e,t,r)=>{var i;this.isInitialized();let n=(i=this.getPrivateKey(e),ad(dC(ca,uE.getSharedSecret(ac(i,uq),ac(t,uq)),void 0,void 0,32),uq));return this.setSymKey(n,r)}),fD(this,"setSymKey",async(e,t)=>{this.isInitialized();let r=t||uY(e);return await this.keychain.set(r,e),r}),fD(this,"deleteKeyPair",async e=>{this.isInitialized(),await this.keychain.del(e)}),fD(this,"deleteSymKey",async e=>{this.isInitialized(),await this.keychain.del(e)}),fD(this,"encode",async(e,t,r)=>{this.isInitialized();let i=u3(r),n=(0,j.u)(t);if(2===i.type)return function(e,t){let r=ac("2",uH),i=lM(12),n=u1({type:r,sealed:ac(e,uZ),iv:i});return t===uK?uQ(n):n}(n,r?.encoding);if(u5(i)){let t=i.senderPublicKey,r=i.receiverPublicKey;e=await this.generateSharedKey(t,r)}let o=this.getSymKey(e),{type:s,senderPublicKey:a}=i;return function(e){var t;let r=(t="u">typeof e.type?e.type:0,ac(`${t}`,uH));if(1===uX(r)&&typeof e.senderPublicKey>"u")throw Error("Missing sender public key for type 1 envelope");let i="u">typeof e.senderPublicKey?ac(e.senderPublicKey,uq):void 0,n="u">typeof e.iv?ac(e.iv,uq):lM(12),o=u1({type:r,sealed:dm(ac(e.symKey,uq),n).encrypt(ac(e.message,uZ)),iv:n,senderPublicKey:i});return e.encoding===uK?uQ(o):o}({type:s,symKey:o,message:n,senderPublicKey:a,encoding:r?.encoding})}),fD(this,"decode",async(e,t,r)=>{this.isInitialized();let i=function(e,t){let r=u2({encoded:e,encoding:t?.encoding});return u3({type:uX(r.type),senderPublicKey:"u">typeof r.senderPublicKey?ad(r.senderPublicKey,uq):void 0,receiverPublicKey:t?.receiverPublicKey})}(t,r);if(2===i.type){let e=function(e,t){let{sealed:r}=u2({encoded:e,encoding:t});return ad(r,uZ)}(t,r?.encoding);return(0,j.D)(e)}if(u5(i)){let t=i.receiverPublicKey,r=i.senderPublicKey;e=await this.generateSharedKey(t,r)}try{let i=this.getSymKey(e),n=function(e){let t=ac(e.symKey,uq),{sealed:r,iv:i}=u2({encoded:e.encoded,encoding:e.encoding}),n=dm(t,i).decrypt(r);if(null===n)throw Error("Failed to decrypt");return ad(n,uZ)}({symKey:i,encoded:t,encoding:r?.encoding});return(0,j.D)(n)}catch(t){this.logger.error(`Failed to decode message from topic: '${e}', clientId: '${await this.getClientId()}'`),this.logger.error(t)}}),fD(this,"getPayloadType",(e,t=uV)=>uX(u2({encoded:e,encoding:t}).type)),fD(this,"getPayloadSenderPublicKey",(e,t=uV)=>{let r=u2({encoded:e,encoding:t});return r.senderPublicKey?ad(r.senderPublicKey,uq):void 0}),this.core=e,this.logger=(0,Y.Ep)(t,this.name),this.keychain=r||new fT(this.core,this.logger)}get context(){return(0,Y.Fd)(this.logger)}async setPrivateKey(e,t){return await this.keychain.set(e,t),e}getPrivateKey(e){return this.keychain.get(e)}async getClientSeed(){let e="";try{e=this.keychain.get(pw)}catch{e=uG(),await this.keychain.set(pw,e)}return function(e,t="utf8"){let r=fN[t];if(!r)throw Error(`Unsupported encoding "${t}"`);return("utf8"===t||"utf-8"===t)&&null!=globalThis.Buffer&&null!=globalThis.Buffer.from?f_(globalThis.Buffer.from(e,"utf-8")):r.decoder.decode(`${r.prefix}${e}`)}(e,"base16")}getSymKey(e){return this.keychain.get(e)}isInitialized(){if(!this.initialized){let{message:e}=hS("NOT_INITIALIZED",this.name);throw Error(e)}}}var fL=Object.defineProperty,fM=Object.defineProperties,fB=Object.getOwnPropertyDescriptors,fj=Object.getOwnPropertySymbols,fF=Object.prototype.hasOwnProperty,fW=Object.prototype.propertyIsEnumerable,fz=(e,t,r)=>t in e?fL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,fH=(e,t)=>{for(var r in t||(t={}))fF.call(t,r)&&fz(e,r,t[r]);if(fj)for(var r of fj(t))fW.call(t,r)&&fz(e,r,t[r]);return e},fq=(e,t)=>fM(e,fB(t)),fV=(e,t,r)=>fz(e,"symbol"!=typeof t?t+"":t,r);class fK extends eo{constructor(e,t){super(e,t),this.logger=e,this.core=t,fV(this,"messages",new Map),fV(this,"messagesWithoutClientAck",new Map),fV(this,"name","messages"),fV(this,"version","0.3"),fV(this,"initialized",!1),fV(this,"storagePrefix",pg),fV(this,"init",async()=>{if(!this.initialized){this.logger.trace("Initialized");try{let e=await this.getRelayerMessages();"u">typeof e&&(this.messages=e);let t=await this.getRelayerMessagesWithoutClientAck();"u">typeof t&&(this.messagesWithoutClientAck=t),this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",size:this.messages.size})}catch(e){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(e)}finally{this.initialized=!0}}}),fV(this,"set",async(e,t,r)=>{this.isInitialized();let i=uJ(t),n=this.messages.get(e);if(typeof n>"u"&&(n={}),"u">typeof n[i])return i;if(n[i]=t,this.messages.set(e,n),r===pS.inbound){let r=this.messagesWithoutClientAck.get(e)||{};this.messagesWithoutClientAck.set(e,fq(fH({},r),{[i]:t}))}return await this.persist(),i}),fV(this,"get",e=>{this.isInitialized();let t=this.messages.get(e);return typeof t>"u"&&(t={}),t}),fV(this,"getWithoutAck",e=>{this.isInitialized();let t={};for(let r of e){let e=this.messagesWithoutClientAck.get(r)||{};t[r]=Object.values(e)}return t}),fV(this,"has",(e,t)=>(this.isInitialized(),"u">typeof this.get(e)[uJ(t)])),fV(this,"ack",async(e,t)=>{this.isInitialized();let r=this.messagesWithoutClientAck.get(e);if(typeof r>"u")return;let i=uJ(t);delete r[i],0===Object.keys(r).length?this.messagesWithoutClientAck.delete(e):this.messagesWithoutClientAck.set(e,r),await this.persist()}),fV(this,"del",async e=>{this.isInitialized(),this.messages.delete(e),this.messagesWithoutClientAck.delete(e),await this.persist()}),this.logger=(0,Y.Ep)(e,this.name),this.core=t}get context(){return(0,Y.Fd)(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get storageKeyWithoutClientAck(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name+"_withoutClientAck"}async setRelayerMessages(e){await this.core.storage.setItem(this.storageKey,aU(e))}async setRelayerMessagesWithoutClientAck(e){await this.core.storage.setItem(this.storageKeyWithoutClientAck,aU(e))}async getRelayerMessages(){let e=await this.core.storage.getItem(this.storageKey);return"u">typeof e?aL(e):void 0}async getRelayerMessagesWithoutClientAck(){let e=await this.core.storage.getItem(this.storageKeyWithoutClientAck);return"u">typeof e?aL(e):void 0}async persist(){await this.setRelayerMessages(this.messages),await this.setRelayerMessagesWithoutClientAck(this.messagesWithoutClientAck)}isInitialized(){if(!this.initialized){let{message:e}=hS("NOT_INITIALIZED",this.name);throw Error(e)}}}var fZ=Object.defineProperty,fG=Object.defineProperties,fY=Object.getOwnPropertyDescriptors,fJ=Object.getOwnPropertySymbols,fX=Object.prototype.hasOwnProperty,fQ=Object.prototype.propertyIsEnumerable,f0=(e,t,r)=>t in e?fZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,f1=(e,t)=>{for(var r in t||(t={}))fX.call(t,r)&&f0(e,r,t[r]);if(fJ)for(var r of fJ(t))fQ.call(t,r)&&f0(e,r,t[r]);return e},f2=(e,t)=>fG(e,fY(t)),f3=(e,t,r)=>f0(e,"symbol"!=typeof t?t+"":t,r);class f5 extends es{constructor(e,t){super(e,t),this.relayer=e,this.logger=t,f3(this,"events",new w.EventEmitter),f3(this,"name","publisher"),f3(this,"queue",new Map),f3(this,"publishTimeout",(0,b.toMiliseconds)(b.ONE_MINUTE)),f3(this,"initialPublishTimeout",(0,b.toMiliseconds)(15*b.ONE_SECOND)),f3(this,"needsTransportRestart",!1),f3(this,"publish",async(e,t,r)=>{var i,n,o,s,a;this.logger.debug("Publishing Payload"),this.logger.trace({type:"method",method:"publish",params:{topic:e,message:t,opts:r}});let l=r?.ttl||pv,c=r?.prompt||!1,d=r?.tag||0,u=r?.id||h2().toString(),h=u6(u4().protocol),p={id:u,method:r?.publishMethod||h.publish,params:f1({topic:e,message:t,ttl:l,prompt:c,tag:d,attestation:r?.attestation},r?.tvf)},f=`Failed to publish payload, please try again. id:${u} tag:${d}`;try{hR(null==(i=p.params)?void 0:i.prompt)&&(null==(n=p.params)||delete n.prompt),hR(null==(o=p.params)?void 0:o.tag)&&(null==(s=p.params)||delete s.tag);let a=new Promise(async e=>{let t=({id:r})=>{var i;(null==(i=p.id)?void 0:i.toString())===r.toString()&&(this.removeRequestFromQueue(r),this.relayer.events.removeListener(pE.publish,t),e())};this.relayer.events.on(pE.publish,t);let i=aB(new Promise((e,t)=>{this.rpcPublish(p,r).then(e).catch(e=>{this.logger.warn(e,e?.message),t(e)})}),this.initialPublishTimeout,`Failed initial publish, retrying.... id:${u} tag:${d}`);try{await i,this.events.removeListener(pE.publish,t)}catch(e){this.queue.set(u,{request:p,opts:r,attempt:1}),this.logger.warn(e,e?.message)}});this.logger.trace({type:"method",method:"publish",params:{id:u,topic:e,message:t,opts:r}}),await aB(a,this.publishTimeout,f)}catch(e){if(this.logger.debug("Failed to Publish Payload"),this.logger.error(e),null!=(a=r?.internal)&&a.throwOnFailedPublish)throw e}finally{this.queue.delete(u)}}),f3(this,"publishCustom",async e=>{var t,r,i,n,o;this.logger.debug("Publishing custom payload"),this.logger.trace({type:"method",method:"publishCustom",params:e});let{payload:s,opts:a={}}=e,{attestation:l,tvf:c,publishMethod:d,prompt:u,tag:h,ttl:p=b.FIVE_MINUTES}=a,f=a.id||h2().toString(),g=u6(u4().protocol),m=d||g.publish,y={id:f,method:m,params:f1(f2(f1({},s),{ttl:p,prompt:u,tag:h,attestation:l}),c)},w=`Failed to publish custom payload, please try again. id:${f} tag:${h}`;try{hR(null==(t=y.params)?void 0:t.prompt)&&(null==(r=y.params)||delete r.prompt),hR(null==(i=y.params)?void 0:i.tag)&&(null==(n=y.params)||delete n.tag);let e=new Promise(async e=>{let t=({id:r})=>{var i;(null==(i=y.id)?void 0:i.toString())===r.toString()&&(this.removeRequestFromQueue(r),this.relayer.events.removeListener(pE.publish,t),e())};this.relayer.events.on(pE.publish,t);let r=aB(new Promise((e,t)=>{this.rpcPublish(y,a).then(e).catch(e=>{this.logger.warn(e,e?.message),t(e)})}),this.initialPublishTimeout,`Failed initial custom payload publish, retrying.... method:${m} id:${f} tag:${h}`);try{await r,this.events.removeListener(pE.publish,t)}catch(e){this.queue.set(f,{request:y,opts:a,attempt:1}),this.logger.warn(e,e?.message)}});this.logger.trace({type:"method",method:"publish",params:{id:f,payload:s,opts:a}}),await aB(e,this.publishTimeout,w)}catch(e){if(this.logger.debug("Failed to Publish Payload"),this.logger.error(e),null!=(o=a?.internal)&&o.throwOnFailedPublish)throw e}finally{this.queue.delete(f)}}),f3(this,"on",(e,t)=>{this.events.on(e,t)}),f3(this,"once",(e,t)=>{this.events.once(e,t)}),f3(this,"off",(e,t)=>{this.events.off(e,t)}),f3(this,"removeListener",(e,t)=>{this.events.removeListener(e,t)}),this.relayer=e,this.logger=(0,Y.Ep)(t,this.name),this.registerEventListeners()}get context(){return(0,Y.Fd)(this.logger)}async rpcPublish(e,t){this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"message",direction:"outgoing",request:e});let r=await this.relayer.request(e);return this.relayer.events.emit(pE.publish,f1(f1({},e),t)),this.logger.debug("Successfully Published Payload"),r}removeRequestFromQueue(e){this.queue.delete(e)}checkQueue(){this.queue.forEach(async(e,t)=>{var r;let i=e.attempt+1;this.queue.set(t,f2(f1({},e),{attempt:i})),this.logger.warn({},`Publisher: queue->publishing: ${e.request.id}, tag: ${null==(r=e.request.params)?void 0:r.tag}, attempt: ${i}`),await this.rpcPublish(e.request,e.opts),this.logger.warn({},`Publisher: queue->published: ${e.request.id}`)})}registerEventListeners(){this.relayer.core.heartbeat.on(x,()=>{if(this.needsTransportRestart){this.needsTransportRestart=!1,this.relayer.events.emit(pE.connection_stalled);return}this.checkQueue()}),this.relayer.on(pE.message_ack,e=>{this.removeRequestFromQueue(e.id.toString())})}}var f4=Object.defineProperty,f6=(e,t,r)=>t in e?f4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,f8=(e,t,r)=>f6(e,"symbol"!=typeof t?t+"":t,r);class f9{constructor(){f8(this,"map",new Map),f8(this,"set",(e,t)=>{let r=this.get(e);this.exists(e,t)||this.map.set(e,[...r,t])}),f8(this,"get",e=>this.map.get(e)||[]),f8(this,"exists",(e,t)=>this.get(e).includes(t)),f8(this,"delete",(e,t)=>{if(typeof t>"u"){this.map.delete(e);return}if(!this.map.has(e))return;let r=this.get(e);if(!this.exists(e,t))return;let i=r.filter(e=>e!==t);if(!i.length){this.map.delete(e);return}this.map.set(e,i)}),f8(this,"clear",()=>{this.map.clear()})}get topics(){return Array.from(this.map.keys())}}var f7=Object.defineProperty,ge=Object.defineProperties,gt=Object.getOwnPropertyDescriptors,gr=Object.getOwnPropertySymbols,gi=Object.prototype.hasOwnProperty,gn=Object.prototype.propertyIsEnumerable,go=(e,t,r)=>t in e?f7(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,gs=(e,t)=>{for(var r in t||(t={}))gi.call(t,r)&&go(e,r,t[r]);if(gr)for(var r of gr(t))gn.call(t,r)&&go(e,r,t[r]);return e},ga=(e,t)=>ge(e,gt(t)),gl=(e,t,r)=>go(e,"symbol"!=typeof t?t+"":t,r);class gc extends ec{constructor(e,t){super(e,t),this.relayer=e,this.logger=t,gl(this,"subscriptions",new Map),gl(this,"topicMap",new f9),gl(this,"events",new w.EventEmitter),gl(this,"name","subscription"),gl(this,"version","0.3"),gl(this,"pending",new Map),gl(this,"cached",[]),gl(this,"initialized",!1),gl(this,"storagePrefix",pg),gl(this,"subscribeTimeout",(0,b.toMiliseconds)(b.ONE_MINUTE)),gl(this,"initialSubscribeTimeout",(0,b.toMiliseconds)(15*b.ONE_SECOND)),gl(this,"clientId"),gl(this,"batchSubscribeTopicsLimit",500),gl(this,"init",async()=>{this.initialized||(this.logger.trace("Initialized"),this.registerEventListeners(),await this.restore()),this.initialized=!0}),gl(this,"subscribe",async(e,t)=>{var r;this.isInitialized(),this.logger.debug("Subscribing Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:e,opts:t}});try{let i=u4(t),n={topic:e,relay:i,transportType:t?.transportType};null!=(r=t?.internal)&&r.skipSubscribe||this.pending.set(e,n);let o=await this.rpcSubscribe(e,i,t);return"string"==typeof o&&(this.onSubscribe(o,n),this.logger.debug("Successfully Subscribed Topic"),this.logger.trace({type:"method",method:"subscribe",params:{topic:e,opts:t}})),o}catch(e){throw this.logger.debug("Failed to Subscribe Topic"),this.logger.error(e),e}}),gl(this,"unsubscribe",async(e,t)=>{this.isInitialized(),"u">typeof t?.id?await this.unsubscribeById(e,t.id,t):await this.unsubscribeByTopic(e,t)}),gl(this,"isSubscribed",e=>new Promise(t=>{t(this.topicMap.topics.includes(e))})),gl(this,"isKnownTopic",e=>new Promise(t=>{t(this.topicMap.topics.includes(e)||this.pending.has(e)||this.cached.some(t=>t.topic===e))})),gl(this,"on",(e,t)=>{this.events.on(e,t)}),gl(this,"once",(e,t)=>{this.events.once(e,t)}),gl(this,"off",(e,t)=>{this.events.off(e,t)}),gl(this,"removeListener",(e,t)=>{this.events.removeListener(e,t)}),gl(this,"start",async()=>{await this.onConnect()}),gl(this,"stop",async()=>{await this.onDisconnect()}),gl(this,"restart",async()=>{await this.restore(),await this.onRestart()}),gl(this,"checkPending",async()=>{if(0===this.pending.size&&(!this.initialized||!this.relayer.connected))return;let e=[];this.pending.forEach(t=>{e.push(t)}),await this.batchSubscribe(e)}),gl(this,"registerEventListeners",()=>{this.relayer.core.heartbeat.on(x,async()=>{await this.checkPending()}),this.events.on(pN.created,async e=>{let t=pN.created;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),await this.persist()}),this.events.on(pN.deleted,async e=>{let t=pN.deleted;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),await this.persist()})}),this.relayer=e,this.logger=(0,Y.Ep)(t,this.name),this.clientId=""}get context(){return(0,Y.Fd)(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.relayer.core.customStoragePrefix+"//"+this.name}get length(){return this.subscriptions.size}get ids(){return Array.from(this.subscriptions.keys())}get values(){return Array.from(this.subscriptions.values())}get topics(){return this.topicMap.topics}get hasAnyTopics(){return this.topicMap.topics.length>0||this.pending.size>0||this.cached.length>0||this.subscriptions.size>0}hasSubscription(e,t){let r=!1;try{r=this.getSubscription(e).topic===t}catch{}return r}reset(){this.cached=[],this.initialized=!0}onDisable(){this.values.length>0&&(this.cached=this.values),this.subscriptions.clear(),this.topicMap.clear()}async unsubscribeByTopic(e,t){let r=this.topicMap.get(e);await Promise.all(r.map(async r=>await this.unsubscribeById(e,r,t)))}async unsubscribeById(e,t,r){this.logger.debug("Unsubscribing Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:t,opts:r}});try{let i=u4(r);await this.restartToComplete({topic:e,id:t,relay:i}),await this.rpcUnsubscribe(e,t,i);let n=hI("USER_DISCONNECTED",`${this.name}, ${e}`);await this.onUnsubscribe(e,t,n),this.logger.debug("Successfully Unsubscribed Topic"),this.logger.trace({type:"method",method:"unsubscribe",params:{topic:e,id:t,opts:r}})}catch(e){throw this.logger.debug("Failed to Unsubscribe Topic"),this.logger.error(e),e}}async rpcSubscribe(e,t,r){var i,n;let o=await this.getSubscriptionId(e);if(null!=(i=r?.internal)&&i.skipSubscribe)return o;r&&r?.transportType!==pA.relay||await this.restartToComplete({topic:e,id:e,relay:t});let s={method:u6(t.protocol).subscribe,params:{topic:e}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:s});let a=null==(n=r?.internal)?void 0:n.throwOnFailedPublish;try{if(r?.transportType===pA.link_mode)return setTimeout(()=>{(this.relayer.connected||this.relayer.connecting)&&this.relayer.request(s).catch(e=>this.logger.warn(e))},(0,b.toMiliseconds)(b.ONE_SECOND)),o;let t=new Promise(async t=>{let r=i=>{i.topic===e&&(this.events.removeListener(pN.created,r),t(i.id))};this.events.on(pN.created,r);try{let i=await aB(new Promise((e,t)=>{this.relayer.request(s).catch(e=>{this.logger.warn(e,e?.message),t(e)}).then(e)}),this.initialSubscribeTimeout,`Subscribing to ${e} failed, please try again`);this.events.removeListener(pN.created,r),t(i)}catch{}}),i=await aB(t,this.subscribeTimeout,`Subscribing to ${e} failed, please try again`);if(!i&&a)throw Error(`Subscribing to ${e} failed, please try again`);return i?o:null}catch(e){if(this.logger.debug("Outgoing Relay Subscribe Payload stalled"),this.relayer.events.emit(pE.connection_stalled),a)throw e}return null}async rpcBatchSubscribe(e){if(!e.length)return;let t={method:u6(e[0].relay.protocol).batchSubscribe,params:{topics:e.map(e=>e.topic)}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:t});try{await await aB(new Promise(e=>{this.relayer.request(t).catch(e=>this.logger.warn(e)).then(e)}),this.subscribeTimeout,"rpcBatchSubscribe failed, please try again")}catch{this.relayer.events.emit(pE.connection_stalled)}}async rpcBatchFetchMessages(e){let t;if(!e.length)return;let r={method:u6(e[0].relay.protocol).batchFetchMessages,params:{topics:e.map(e=>e.topic)}};this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:r});try{t=await await aB(new Promise((e,t)=>{this.relayer.request(r).catch(e=>{this.logger.warn(e),t(e)}).then(e)}),this.subscribeTimeout,"rpcBatchFetchMessages failed, please try again")}catch{this.relayer.events.emit(pE.connection_stalled)}return t}rpcUnsubscribe(e,t,r){let i={method:u6(r.protocol).unsubscribe,params:{topic:e,id:t}};return this.logger.debug("Outgoing Relay Payload"),this.logger.trace({type:"payload",direction:"outgoing",request:i}),this.relayer.request(i)}onSubscribe(e,t){this.setSubscription(e,ga(gs({},t),{id:e})),this.pending.delete(t.topic)}onBatchSubscribe(e){e.length&&e.forEach(e=>{this.setSubscription(e.id,gs({},e)),this.pending.delete(e.topic)})}async onUnsubscribe(e,t,r){this.events.removeAllListeners(t),this.hasSubscription(t,e)&&this.deleteSubscription(t,r),await this.relayer.messages.del(e)}async setRelayerSubscriptions(e){await this.relayer.core.storage.setItem(this.storageKey,e)}async getRelayerSubscriptions(){return await this.relayer.core.storage.getItem(this.storageKey)}setSubscription(e,t){this.logger.debug("Setting subscription"),this.logger.trace({type:"method",method:"setSubscription",id:e,subscription:t}),this.addSubscription(e,t)}addSubscription(e,t){this.subscriptions.set(e,gs({},t)),this.topicMap.set(t.topic,e),this.events.emit(pN.created,t)}getSubscription(e){this.logger.debug("Getting subscription"),this.logger.trace({type:"method",method:"getSubscription",id:e});let t=this.subscriptions.get(e);if(!t){let{message:t}=hS("NO_MATCHING_KEY",`${this.name}: ${e}`);throw Error(t)}return t}deleteSubscription(e,t){this.logger.debug("Deleting subscription"),this.logger.trace({type:"method",method:"deleteSubscription",id:e,reason:t});let r=this.getSubscription(e);this.subscriptions.delete(e),this.topicMap.delete(r.topic,e),this.events.emit(pN.deleted,ga(gs({},r),{reason:t}))}async persist(){await this.setRelayerSubscriptions(this.values),this.events.emit(pN.sync)}async onRestart(){if(this.cached.length){let e=[...this.cached],t=Math.ceil(this.cached.length/this.batchSubscribeTopicsLimit);for(let r=0;r"u"||!e.length)return;if(this.subscriptions.size&&!e.every(e=>{var t;return e.topic===(null==(t=this.subscriptions.get(e.id))?void 0:t.topic)})){let{message:e}=hS("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),this.logger.error(`${this.name}: ${JSON.stringify(this.values)}`),Error(e)}this.cached=e,this.logger.debug(`Successfully Restored subscriptions for ${this.name}`),this.logger.trace({type:"method",method:"restore",subscriptions:this.values})}catch(e){this.logger.debug(`Failed to Restore subscriptions for ${this.name}`),this.logger.error(e)}}async batchSubscribe(e){e.length&&(await this.rpcBatchSubscribe(e),this.onBatchSubscribe(await Promise.all(e.map(async e=>ga(gs({},e),{id:await this.getSubscriptionId(e.topic)})))))}async batchFetchMessages(e){var t;if(!e.length)return;this.logger.trace(`Fetching batch messages for ${e.length} subscriptions`);let r=await this.rpcBatchFetchMessages(e);r&&r.messages&&(await (t=(0,b.toMiliseconds)(b.ONE_SECOND),new Promise(e=>setTimeout(e,t))),await this.relayer.handleBatchMessageEvents(r.messages))}async onConnect(){await this.restart(),this.reset()}onDisconnect(){this.onDisable()}isInitialized(){if(!this.initialized){let{message:e}=hS("NOT_INITIALIZED",this.name);throw Error(e)}}async restartToComplete(e){this.relayer.connected||this.relayer.connecting||(this.cached.push(e),await this.relayer.transportOpen())}async getClientId(){return this.clientId||(this.clientId=await this.relayer.core.crypto.getClientId()),this.clientId}async getSubscriptionId(e){return uJ(e+await this.getClientId())}}var gd=Object.defineProperty,gu=Object.getOwnPropertySymbols,gh=Object.prototype.hasOwnProperty,gp=Object.prototype.propertyIsEnumerable,gf=(e,t,r)=>t in e?gd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,gg=(e,t)=>{for(var r in t||(t={}))gh.call(t,r)&&gf(e,r,t[r]);if(gu)for(var r of gu(t))gp.call(t,r)&&gf(e,r,t[r]);return e},gm=(e,t,r)=>gf(e,"symbol"!=typeof t?t+"":t,r);class gy extends ea{constructor(e){var t;super(e),gm(this,"protocol","wc"),gm(this,"version",2),gm(this,"core"),gm(this,"logger"),gm(this,"events",new w.EventEmitter),gm(this,"provider"),gm(this,"messages"),gm(this,"subscriber"),gm(this,"publisher"),gm(this,"name","relayer"),gm(this,"transportExplicitlyClosed",!1),gm(this,"initialized",!1),gm(this,"connectionAttemptInProgress",!1),gm(this,"relayUrl"),gm(this,"projectId"),gm(this,"packageName"),gm(this,"bundleId"),gm(this,"hasExperiencedNetworkDisruption",!1),gm(this,"pingTimeout"),gm(this,"heartBeatTimeout",(0,b.toMiliseconds)(b.THIRTY_SECONDS+b.FIVE_SECONDS)),gm(this,"reconnectTimeout"),gm(this,"connectPromise"),gm(this,"reconnectInProgress",!1),gm(this,"requestsInFlight",[]),gm(this,"connectTimeout",(0,b.toMiliseconds)(15*b.ONE_SECOND)),gm(this,"request",async e=>{var t,r;this.logger.debug("Publishing Request Payload");let i=e.id||h2().toString();await this.toEstablishConnection();try{this.logger.trace({id:i,method:e.method,topic:null==(t=e.params)?void 0:t.topic},"relayer.request - publishing...");let n=`${i}:${(null==(r=e.params)?void 0:r.tag)||""}`;this.requestsInFlight.push(n);let o=await this.provider.request(e);return this.requestsInFlight=this.requestsInFlight.filter(e=>e!==n),o}catch(e){throw this.logger.debug(`Failed to Publish Request: ${i}`),e}}),gm(this,"resetPingTimeout",()=>{aN()&&(clearTimeout(this.pingTimeout),this.pingTimeout=setTimeout(()=>{var e,t,r,i;try{this.logger.debug({},"pingTimeout: Connection stalled, terminating..."),null==(i=null==(r=null==(t=null==(e=this.provider)?void 0:e.connection)?void 0:t.socket)?void 0:r.terminate)||i.call(r)}catch(e){this.logger.warn(e,e?.message)}},this.heartBeatTimeout))}),gm(this,"onPayloadHandler",e=>{this.onProviderPayload(e),this.resetPingTimeout()}),gm(this,"onConnectHandler",()=>{this.logger.warn({},"Relayer connected \uD83D\uDEDC"),this.startPingTimeout(),this.events.emit(pE.connect)}),gm(this,"onDisconnectHandler",()=>{this.logger.warn({},"Relayer disconnected \uD83D\uDED1"),this.requestsInFlight=[],this.onProviderDisconnect()}),gm(this,"onProviderErrorHandler",e=>{this.logger.fatal(`Fatal socket error: ${e.message}`),this.events.emit(pE.error,e),this.logger.fatal("Fatal socket error received, closing transport"),this.transportClose()}),gm(this,"registerProviderListeners",()=>{this.provider.on(px.payload,this.onPayloadHandler),this.provider.on(px.connect,this.onConnectHandler),this.provider.on(px.disconnect,this.onDisconnectHandler),this.provider.on(px.error,this.onProviderErrorHandler)}),this.core=e.core,this.logger=hK({logger:null!=(t=e.logger)?t:"error",name:this.name}),this.messages=new fK(this.logger,e.core),this.subscriber=new gc(this,this.logger),this.publisher=new f5(this,this.logger),this.projectId=e?.projectId,this.relayUrl=e?.relayUrl||pC,ak()&&"u">typeof global&&"u">typeof(null==global?void 0:global.Platform)&&(null==global?void 0:global.Platform.OS)==="android"?this.packageName=aT():ak()&&"u">typeof global&&"u">typeof(null==global?void 0:global.Platform)&&(null==global?void 0:global.Platform.OS)==="ios"&&(this.bundleId=aT()),this.provider={}}async init(){this.logger.trace("Initialized"),this.registerEventListeners(),await Promise.all([this.messages.init(),this.subscriber.init()]),this.initialized=!0,this.transportOpen().catch(e=>this.logger.warn(e,e?.message))}get context(){return(0,Y.Fd)(this.logger)}get connected(){var e,t,r;return(null==(r=null==(t=null==(e=this.provider)?void 0:e.connection)?void 0:t.socket)?void 0:r.readyState)===1}get connecting(){var e,t,r;return(null==(r=null==(t=null==(e=this.provider)?void 0:e.connection)?void 0:t.socket)?void 0:r.readyState)===0||void 0!==this.connectPromise}async publish(e,t,r){this.isInitialized(),await this.publisher.publish(e,t,r),await this.recordMessageEvent({topic:e,message:t,publishedAt:Date.now(),transportType:pA.relay},pS.outbound)}async publishCustom(e){this.isInitialized(),await this.publisher.publishCustom(e)}async subscribe(e,t){var r,i,n;this.isInitialized(),null!=t&&t.transportType&&t?.transportType!=="relay"||await this.toEstablishConnection();let o=typeof(null==(r=t?.internal)?void 0:r.throwOnFailedPublish)>"u"||(null==(i=t?.internal)?void 0:i.throwOnFailedPublish),s=(null==(n=this.subscriber.topicMap.get(e))?void 0:n[0])||"",a,l=t=>{t.topic===e&&(this.subscriber.off(pN.created,l),a())};return await Promise.all([new Promise(e=>{a=e,this.subscriber.on(pN.created,l)}),new Promise(async(r,i)=>{s=await this.subscriber.subscribe(e,gg({internal:{throwOnFailedPublish:o}},t)).catch(e=>{o&&i(e)})||s,r()})]),s}async unsubscribe(e,t){this.isInitialized(),await this.subscriber.unsubscribe(e,t)}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async transportDisconnect(){this.provider.disconnect&&(this.hasExperiencedNetworkDisruption||this.connected)?await aB(this.provider.disconnect(),2e3,"provider.disconnect()").catch(()=>this.onProviderDisconnect()):this.onProviderDisconnect()}async transportClose(){this.transportExplicitlyClosed=!0,await this.transportDisconnect()}async transportOpen(e){if(!this.subscriber.hasAnyTopics){this.logger.info("Starting WS connection skipped because the client has no topics to work with.");return}if(this.connectPromise?(this.logger.debug({},"Waiting for existing connection attempt to resolve..."),await this.connectPromise,this.logger.debug({},"Existing connection attempt resolved")):(this.connectPromise=new Promise(async(t,r)=>{await this.connect(e).then(t).catch(r).finally(()=>{this.connectPromise=void 0})}),await this.connectPromise),!this.connected)throw Error(`Couldn't establish socket connection to the relay server: ${this.relayUrl}`)}async restartTransport(e){this.logger.debug({},"Restarting transport..."),this.connectionAttemptInProgress||(this.relayUrl=e||this.relayUrl,await this.confirmOnlineStateOrThrow(),await this.transportClose(),await this.transportOpen())}async confirmOnlineStateOrThrow(){if(!await hW())throw Error("No internet connection detected. Please restart your network and try again.")}async handleBatchMessageEvents(e){if(e?.length===0){this.logger.trace("Batch message events is empty. Ignoring...");return}let t=e.sort((e,t)=>e.publishedAt-t.publishedAt);for(let e of(this.logger.debug(`Batch of ${t.length} message events sorted`),t))try{await this.onMessageEvent(e)}catch(e){this.logger.warn(e,"Error while processing batch message event: "+e?.message)}this.logger.trace(`Batch of ${t.length} message events processed`)}async onLinkMessageEvent(e,t){let{topic:r}=e;if(!t.sessionExists){let e=aW(b.FIVE_MINUTES);await this.core.pairing.pairings.set(r,{topic:r,expiry:e,relay:{protocol:"irn"},active:!1})}this.events.emit(pE.message,e),await this.recordMessageEvent(e,pS.inbound)}async connect(e){await this.confirmOnlineStateOrThrow(),e&&e!==this.relayUrl&&(this.relayUrl=e,await this.transportDisconnect()),this.connectionAttemptInProgress=!0,this.transportExplicitlyClosed=!1;let t=1;for(;t<6;){try{if(this.transportExplicitlyClosed)break;this.logger.debug({},`Connecting to ${this.relayUrl}, attempt: ${t}...`),await this.createProvider(),await new Promise(async(e,t)=>{let r=()=>{t(Error("Connection interrupted while trying to connect"))};this.provider.once(px.disconnect,r),await aB(new Promise((e,t)=>{this.provider.connect().then(e).catch(t)}),this.connectTimeout,`Socket stalled when trying to connect to ${this.relayUrl}`).catch(e=>{t(e)}).finally(()=>{this.provider.off(px.disconnect,r),clearTimeout(this.reconnectTimeout)}),await new Promise(async(e,r)=>{let i=()=>{t(Error("Connection interrupted while trying to subscribe"))};this.provider.once(px.disconnect,i),await this.subscriber.start().then(e).catch(r).finally(()=>{this.provider.off(px.disconnect,i)})}),this.hasExperiencedNetworkDisruption=!1,e()})}catch(e){await this.subscriber.stop(),this.logger.warn({},e.message),this.hasExperiencedNetworkDisruption=!0}finally{this.connectionAttemptInProgress=!1}if(this.connected){this.logger.debug({},`Connected to ${this.relayUrl} successfully on attempt: ${t}`);break}await new Promise(e=>setTimeout(e,(0,b.toMiliseconds)(1*t))),t++}}startPingTimeout(){var e,t,r,i,n;if(aN())try{null!=(t=null==(e=this.provider)?void 0:e.connection)&&t.socket&&(null==(n=null==(i=null==(r=this.provider)?void 0:r.connection)?void 0:i.socket)||n.on("ping",()=>{this.resetPingTimeout()})),this.resetPingTimeout()}catch(e){this.logger.warn(e,e?.message)}}async createProvider(){this.provider.connection&&this.unregisterProviderListeners();let e=await this.core.crypto.signJWT(this.relayUrl);this.provider=new pa(new pu(function({protocol:e,version:t,relayUrl:r,sdkVersion:i,auth:n,projectId:o,useOnCloseEvent:s,bundleId:a,packageName:l}){let c=r.split("?"),d=a$(e,t,i),u=function(e,t){let r=new URLSearchParams(e);return Object.entries(t).sort(([e],[t])=>e.localeCompare(t)).forEach(([e,t])=>{null!=t&&r.set(e,String(t))}),r.toString()}(c[1]||"",{auth:n,ua:d,projectId:o,useOnCloseEvent:s||void 0,packageName:l||void 0,bundleId:a||void 0});return c[0]+"?"+u}({sdkVersion:p_,protocol:this.protocol,version:this.version,relayUrl:this.relayUrl,projectId:this.projectId,auth:e,useOnCloseEvent:!0,bundleId:this.bundleId,packageName:this.packageName}))),this.registerProviderListeners()}async recordMessageEvent(e,t){let{topic:r,message:i}=e;await this.messages.set(r,i,t)}async shouldIgnoreMessageEvent(e){let{topic:t,message:r}=e;if(!r||0===r.length)return this.logger.warn(`Ignoring invalid/empty message: ${r}`),!0;if(!await this.subscriber.isKnownTopic(t))return this.logger.warn(`Ignoring message for unknown topic ${t}`),!0;let i=this.messages.has(t,r);return i&&this.logger.warn(`Ignoring duplicate message: ${r}`),i}async onProviderPayload(e){if(this.logger.debug("Incoming Relay Payload"),this.logger.trace({type:"payload",direction:"incoming",payload:e}),pi(e)){if(!e.method.endsWith("_subscription"))return;let t=e.params,{topic:r,message:i,publishedAt:n,attestation:o}=t.data,s={topic:r,message:i,publishedAt:n,transportType:pA.relay,attestation:o};this.logger.debug("Emitting Relayer Payload"),this.logger.trace(gg({type:"event",event:t.id},s)),this.events.emit(t.id,s),await this.acknowledgePayload(e),await this.onMessageEvent(s)}else pn(e)&&this.events.emit(pE.message_ack,e)}async onMessageEvent(e){await this.shouldIgnoreMessageEvent(e)||(await this.recordMessageEvent(e,pS.inbound),this.events.emit(pE.message,e))}async acknowledgePayload(e){let t=h5(e.id,!0);await this.provider.connection.send(t)}unregisterProviderListeners(){this.provider.off(px.payload,this.onPayloadHandler),this.provider.off(px.connect,this.onConnectHandler),this.provider.off(px.disconnect,this.onDisconnectHandler),this.provider.off(px.error,this.onProviderErrorHandler),clearTimeout(this.pingTimeout)}async registerEventListeners(){let e=await hW();(function(e){switch(aO()){case aI.browser:!ak()&&aR()&&(window.addEventListener("online",()=>e(!0)),window.addEventListener("offline",()=>e(!1)));break;case aI.reactNative:ak()&&"u">typeof global&&null!=global&&global.NetInfo&&global?.NetInfo.addEventListener(t=>e(t?.isConnected));case aI.node:}})(async t=>{e!==t&&(e=t,t?await this.transportOpen().catch(e=>this.logger.error(e,e?.message)):(this.hasExperiencedNetworkDisruption=!0,await this.transportDisconnect(),this.transportExplicitlyClosed=!1))}),this.core.heartbeat.on(x,async()=>{var e;if(!this.transportExplicitlyClosed&&!this.connected&&(!(aR()&&(0,rF.getDocument)())||(null==(e=(0,rF.getDocument)())?void 0:e.visibilityState)==="visible"))try{await this.confirmOnlineStateOrThrow(),await this.transportOpen()}catch(e){this.logger.warn(e,e?.message)}})}async onProviderDisconnect(){clearTimeout(this.pingTimeout),this.events.emit(pE.disconnect),this.connectionAttemptInProgress=!1,!this.reconnectInProgress&&(this.reconnectInProgress=!0,await this.subscriber.stop(),this.subscriber.hasAnyTopics&&(this.transportExplicitlyClosed||(this.reconnectTimeout=setTimeout(async()=>{await this.transportOpen().catch(e=>this.logger.error(e,e?.message)),this.reconnectTimeout=void 0,this.reconnectInProgress=!1},(0,b.toMiliseconds)(.1)))))}isInitialized(){if(!this.initialized){let{message:e}=hS("NOT_INITIALIZED",this.name);throw Error(e)}}async toEstablishConnection(){if(await this.confirmOnlineStateOrThrow(),!this.connected){if(this.connectPromise){await this.connectPromise;return}await this.connect()}}}function gw(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function gb(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}let gv="[object Arguments]",gC="[object Object]";function gE(){}function gx(e){if(!e||"object"!=typeof e)return!1;let t=Object.getPrototypeOf(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&"[object Object]"===Object.prototype.toString.call(e)}var g_=Object.defineProperty,gA=Object.getOwnPropertySymbols,gS=Object.prototype.hasOwnProperty,gI=Object.prototype.propertyIsEnumerable,gN=(e,t,r)=>t in e?g_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,gk=(e,t)=>{for(var r in t||(t={}))gS.call(t,r)&&gN(e,r,t[r]);if(gA)for(var r of gA(t))gI.call(t,r)&&gN(e,r,t[r]);return e},gR=(e,t,r)=>gN(e,"symbol"!=typeof t?t+"":t,r);class gO extends el{constructor(e,t,r,i=pg,n){super(e,t,r,i),this.core=e,this.logger=t,this.name=r,gR(this,"map",new Map),gR(this,"version","0.3"),gR(this,"cached",[]),gR(this,"initialized",!1),gR(this,"getKey"),gR(this,"storagePrefix",pg),gR(this,"recentlyDeleted",[]),gR(this,"recentlyDeletedLimit",200),gR(this,"init",async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(e=>{var t;this.getKey&&null!==e&&!hR(e)?this.map.set(this.getKey(e),e):(null==(t=e?.proposer)?void 0:t.publicKey)?this.map.set(e.id,e):e?.topic&&this.map.set(e.topic,e)}),this.cached=[],this.initialized=!0)}),gR(this,"set",async(e,t)=>{this.isInitialized(),this.map.has(e)?await this.update(e,t):(this.logger.debug("Setting value"),this.logger.trace({type:"method",method:"set",key:e,value:t}),this.map.set(e,t),await this.persist())}),gR(this,"get",e=>(this.isInitialized(),this.logger.debug("Getting value"),this.logger.trace({type:"method",method:"get",key:e}),this.getData(e))),gR(this,"getAll",e=>(this.isInitialized(),e?this.values.filter(t=>Object.keys(e).every(r=>(function e(t,r,i,n,o,s,a){let l=a(t,r,i,n,o,s);if(void 0!==l)return l;if(typeof t==typeof r)switch(typeof t){case"bigint":case"string":case"boolean":case"symbol":case"undefined":case"function":return t===r;case"number":return t===r||Object.is(t,r)}return function t(r,i,n,o){if(Object.is(r,i))return!0;let s=gb(r),a=gb(i);if(s===gv&&(s=gC),a===gv&&(a=gC),s!==a)return!1;switch(s){case"[object String]":return r.toString()===i.toString();case"[object Number]":{let e=r.valueOf(),t=i.valueOf();return e===t||Number.isNaN(e)&&Number.isNaN(t)}case"[object Boolean]":case"[object Date]":case"[object Symbol]":return Object.is(r.valueOf(),i.valueOf());case"[object RegExp]":return r.source===i.source&&r.flags===i.flags;case"[object Function]":return r===i}let l=(n=n??new Map).get(r),c=n.get(i);if(null!=l&&null!=c)return l===i;n.set(r,i),n.set(i,r);try{switch(s){case"[object Map]":if(r.size!==i.size)return!1;for(let[t,s]of r.entries())if(!i.has(t)||!e(s,i.get(t),t,r,i,n,o))return!1;return!0;case"[object Set]":{if(r.size!==i.size)return!1;let t=Array.from(r.values()),s=Array.from(i.values());for(let a=0;ae(l,t,void 0,r,i,n,o));if(-1===c)return!1;s.splice(c,1)}return!0}case"[object Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":case"[object BigUint64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object BigInt64Array]":case"[object Float32Array]":case"[object Float64Array]":if("u">typeof ph&&ph.isBuffer(r)!==ph.isBuffer(i)||r.length!==i.length)return!1;for(let t=0;t{this.isInitialized(),this.logger.debug("Updating value"),this.logger.trace({type:"method",method:"update",key:e,update:t});let r=gk(gk({},this.getData(e)),t);this.map.set(e,r),await this.persist()}),gR(this,"delete",async(e,t)=>{this.isInitialized(),this.map.has(e)&&(this.logger.debug("Deleting value"),this.logger.trace({type:"method",method:"delete",key:e,reason:t}),this.map.delete(e),this.addToRecentlyDeleted(e),await this.persist())}),this.logger=(0,Y.Ep)(t,this.name),this.storagePrefix=i,this.getKey=n}get context(){return(0,Y.Fd)(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get length(){return this.map.size}get keys(){return Array.from(this.map.keys())}get values(){return Array.from(this.map.values())}addToRecentlyDeleted(e){this.recentlyDeleted.push(e),this.recentlyDeleted.length>=this.recentlyDeletedLimit&&this.recentlyDeleted.splice(0,this.recentlyDeletedLimit/2)}async setDataStore(e){await this.core.storage.setItem(this.storageKey,e)}async getDataStore(){return await this.core.storage.getItem(this.storageKey)}getData(e){let t=this.map.get(e);if(!t){if(this.recentlyDeleted.includes(e)){let{message:t}=hS("MISSING_OR_INVALID",`Record was recently deleted - ${this.name}: ${e}`);throw this.logger.error(t),Error(t)}let{message:t}=hS("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.error(t),Error(t)}return t}async persist(){await this.setDataStore(this.values)}async restore(){try{let e=await this.getDataStore();if(typeof e>"u"||!e.length)return;if(this.map.size){let{message:e}=hS("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),Error(e)}this.cached=e,this.logger.debug(`Successfully Restored value for ${this.name}`),this.logger.trace({type:"method",method:"restore",value:this.values})}catch(e){this.logger.debug(`Failed to Restore value for ${this.name}`),this.logger.error(e)}}isInitialized(){if(!this.initialized){let{message:e}=hS("NOT_INITIALIZED",this.name);throw Error(e)}}}var gT=Object.defineProperty,gP=(e,t,r)=>t in e?gT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,g$=(e,t,r)=>gP(e,"symbol"!=typeof t?t+"":t,r);class gD{constructor(e,t){this.core=e,this.logger=t,g$(this,"name","pairing"),g$(this,"version","0.3"),g$(this,"events",new w),g$(this,"pairings"),g$(this,"initialized",!1),g$(this,"storagePrefix",pg),g$(this,"ignoredPayloadTypes",[1]),g$(this,"registeredMethods",[]),g$(this,"init",async()=>{this.initialized||(await this.pairings.init(),await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.initialized=!0,this.logger.trace("Initialized"))}),g$(this,"register",({methods:e})=>{this.isInitialized(),this.registeredMethods=[...new Set([...this.registeredMethods,...e])]}),g$(this,"create",async e=>{this.isInitialized();let t=uG(),r=await this.core.crypto.setSymKey(t),i=aW(b.FIVE_MINUTES),n={protocol:"irn"},o={topic:r,expiry:i,relay:n,active:!1,methods:e?.methods},s=ha({protocol:this.core.protocol,version:this.core.version,topic:r,symKey:t,relay:n,expiryTimestamp:i,methods:e?.methods});return this.events.emit(pR.create,o),this.core.expirer.set(r,i),await this.pairings.set(r,o),await this.core.relayer.subscribe(r,{transportType:e?.transportType,internal:e?.internal}),{topic:r,uri:s}}),g$(this,"pair",async e=>{let t;this.isInitialized();let r=this.core.eventClient.createEvent({properties:{topic:e?.uri,trace:[pU.pairing_started]}});this.isValidPair(e,r);let{topic:i,symKey:n,relay:o,expiryTimestamp:s,methods:a}=hs(e.uri);if(r.props.properties.topic=i,r.addTrace(pU.pairing_uri_validation_success),r.addTrace(pU.pairing_uri_not_expired),this.pairings.keys.includes(i)){if(t=this.pairings.get(i),r.addTrace(pU.existing_pairing),t.active)throw r.setError(pL.active_pairing_already_exists),Error(`Pairing already exists: ${i}. Please try again with a new connection URI.`);r.addTrace(pU.pairing_not_expired)}let l=s||aW(b.FIVE_MINUTES),c={topic:i,relay:o,expiry:l,active:!1,methods:a};this.core.expirer.set(i,l),await this.pairings.set(i,c),r.addTrace(pU.store_new_pairing),e.activatePairing&&await this.activate({topic:i}),this.events.emit(pR.create,c),r.addTrace(pU.emit_inactive_pairing),this.core.crypto.keychain.has(i)||await this.core.crypto.setSymKey(n,i),r.addTrace(pU.subscribing_pairing_topic);try{await this.core.relayer.confirmOnlineStateOrThrow()}catch{r.setError(pL.no_internet_connection)}try{await this.core.relayer.subscribe(i,{relay:o})}catch(e){throw r.setError(pL.subscribe_pairing_topic_failure),e}return r.addTrace(pU.subscribe_pairing_topic_success),c}),g$(this,"activate",async({topic:e})=>{this.isInitialized();let t=aW(b.FIVE_MINUTES);this.core.expirer.set(e,t),await this.pairings.update(e,{active:!0,expiry:t})}),g$(this,"ping",async e=>{this.isInitialized(),await this.isValidPing(e),this.logger.warn("ping() is deprecated and will be removed in the next major release.");let{topic:t}=e;if(this.pairings.keys.includes(t)){let e=await this.sendRequest(t,"wc_pairingPing",{}),{done:r,resolve:i,reject:n}=aM();this.events.once(aH("pairing_ping",e),({error:e})=>{e?n(e):i()}),await r()}}),g$(this,"updateExpiry",async({topic:e,expiry:t})=>{this.isInitialized(),await this.pairings.update(e,{expiry:t})}),g$(this,"updateMetadata",async({topic:e,metadata:t})=>{this.isInitialized(),await this.pairings.update(e,{peerMetadata:t})}),g$(this,"getPairings",()=>(this.isInitialized(),this.pairings.values)),g$(this,"disconnect",async e=>{this.isInitialized(),await this.isValidDisconnect(e);let{topic:t}=e;this.pairings.keys.includes(t)&&(await this.sendRequest(t,"wc_pairingDelete",hI("USER_DISCONNECTED")),await this.deletePairing(t))}),g$(this,"formatUriFromPairing",e=>{this.isInitialized();let{topic:t,relay:r,expiry:i,methods:n}=e,o=this.core.crypto.keychain.get(t);return ha({protocol:this.core.protocol,version:this.core.version,topic:t,symKey:o,relay:r,expiryTimestamp:i,methods:n})}),g$(this,"sendRequest",async(e,t,r)=>{let i=h3(t,r),n=await this.core.crypto.encode(e,i),o=pk[t].req;return this.core.history.set(e,i),this.core.relayer.publish(e,n,o),i.id}),g$(this,"sendResult",async(e,t,r)=>{let i=h5(e,r),n=await this.core.crypto.encode(t,i),o=pk[(await this.core.history.get(t,e)).request.method].res;await this.core.relayer.publish(t,n,o),await this.core.history.resolve(i)}),g$(this,"sendError",async(e,t,r)=>{let i=h4(e,r),n=await this.core.crypto.encode(t,i),o=(await this.core.history.get(t,e)).request.method,s=pk[o]?pk[o].res:pk.unregistered_method.res;await this.core.relayer.publish(t,n,s),await this.core.history.resolve(i)}),g$(this,"deletePairing",async(e,t)=>{await this.core.relayer.unsubscribe(e),await Promise.all([this.pairings.delete(e,hI("USER_DISCONNECTED")),this.core.crypto.deleteSymKey(e),t?Promise.resolve():this.core.expirer.del(e)])}),g$(this,"cleanup",async()=>{let e=this.pairings.getAll().filter(e=>az(e.expiry));await Promise.all(e.map(e=>this.deletePairing(e.topic)))}),g$(this,"onRelayEventRequest",async e=>{let{topic:t,payload:r}=e;switch(r.method){case"wc_pairingPing":return await this.onPairingPingRequest(t,r);case"wc_pairingDelete":return await this.onPairingDeleteRequest(t,r);default:return await this.onUnknownRpcMethodRequest(t,r)}}),g$(this,"onRelayEventResponse",async e=>{let{topic:t,payload:r}=e,i=(await this.core.history.get(t,r.id)).request.method;return"wc_pairingPing"===i?this.onPairingPingResponse(t,r):this.onUnknownRpcMethodResponse(i)}),g$(this,"onPairingPingRequest",async(e,t)=>{let{id:r}=t;try{this.isValidPing({topic:e}),await this.sendResult(r,e,!0),this.events.emit(pR.ping,{id:r,topic:e})}catch(t){await this.sendError(r,e,t),this.logger.error(t)}}),g$(this,"onPairingPingResponse",(e,t)=>{let{id:r}=t;setTimeout(()=>{po(t)?this.events.emit(aH("pairing_ping",r),{}):ps(t)&&this.events.emit(aH("pairing_ping",r),{error:t.error})},500)}),g$(this,"onPairingDeleteRequest",async(e,t)=>{let{id:r}=t;try{this.isValidDisconnect({topic:e}),await this.deletePairing(e),this.events.emit(pR.delete,{id:r,topic:e})}catch(t){await this.sendError(r,e,t),this.logger.error(t)}}),g$(this,"onUnknownRpcMethodRequest",async(e,t)=>{let{id:r,method:i}=t;try{if(this.registeredMethods.includes(i))return;let t=hI("WC_METHOD_UNSUPPORTED",i);await this.sendError(r,e,t),this.logger.error(t)}catch(t){await this.sendError(r,e,t),this.logger.error(t)}}),g$(this,"onUnknownRpcMethodResponse",e=>{this.registeredMethods.includes(e)||this.logger.error(hI("WC_METHOD_UNSUPPORTED",e))}),g$(this,"isValidPair",(e,t)=>{var r;if(!hM(e)){let{message:r}=hS("MISSING_OR_INVALID",`pair() params: ${e}`);throw t.setError(pL.malformed_pairing_uri),Error(r)}if(!function(e){function t(e){try{return"u">typeof new URL(e)}catch{return!1}}try{if(hO(e,!1)){if(t(e))return!0;let r=aJ(e);return t(r)}}catch{}return!1}(e.uri)){let{message:r}=hS("MISSING_OR_INVALID",`pair() uri: ${e.uri}`);throw t.setError(pL.malformed_pairing_uri),Error(r)}let i=hs(e?.uri);if(!(null!=(r=i?.relay)&&r.protocol)){let{message:e}=hS("MISSING_OR_INVALID","pair() uri#relay-protocol");throw t.setError(pL.malformed_pairing_uri),Error(e)}if(!(null!=i&&i.symKey)){let{message:e}=hS("MISSING_OR_INVALID","pair() uri#symKey");throw t.setError(pL.malformed_pairing_uri),Error(e)}if(null!=i&&i.expiryTimestamp&&(0,b.toMiliseconds)(i?.expiryTimestamp){if(!hM(e)){let{message:t}=hS("MISSING_OR_INVALID",`ping() params: ${e}`);throw Error(t)}let{topic:t}=e;await this.isValidPairingTopic(t)}),g$(this,"isValidDisconnect",async e=>{if(!hM(e)){let{message:t}=hS("MISSING_OR_INVALID",`disconnect() params: ${e}`);throw Error(t)}let{topic:t}=e;await this.isValidPairingTopic(t)}),g$(this,"isValidPairingTopic",async e=>{if(!hO(e,!1)){let{message:t}=hS("MISSING_OR_INVALID",`pairing topic should be a string: ${e}`);throw Error(t)}if(!this.pairings.keys.includes(e)){let{message:t}=hS("NO_MATCHING_KEY",`pairing topic doesn't exist: ${e}`);throw Error(t)}if(az(this.pairings.get(e).expiry)){await this.deletePairing(e);let{message:t}=hS("EXPIRED",`pairing topic: ${e}`);throw Error(t)}}),this.core=e,this.logger=(0,Y.Ep)(t,this.name),this.pairings=new gO(this.core,this.logger,this.name,this.storagePrefix)}get context(){return(0,Y.Fd)(this.logger)}isInitialized(){if(!this.initialized){let{message:e}=hS("NOT_INITIALIZED",this.name);throw Error(e)}}registerRelayerEvents(){this.core.relayer.on(pE.message,async e=>{let{topic:t,message:r,transportType:i}=e;if(this.pairings.keys.includes(t)&&i!==pA.link_mode&&!this.ignoredPayloadTypes.includes(this.core.crypto.getPayloadType(r)))try{let e=await this.core.crypto.decode(t,r);pi(e)?(this.core.history.set(t,e),await this.onRelayEventRequest({topic:t,payload:e})):pn(e)&&(await this.core.history.resolve(e),await this.onRelayEventResponse({topic:t,payload:e}),this.core.history.delete(t,e.id)),await this.core.relayer.messages.ack(t,r)}catch(e){this.logger.error(e)}})}registerExpirerEvents(){this.core.expirer.on(pT.expired,async e=>{let{topic:t}=aF(e.target);t&&this.pairings.keys.includes(t)&&(await this.deletePairing(t,!0),this.events.emit(pR.expire,{topic:t}))})}}var gU=Object.defineProperty,gL=(e,t,r)=>t in e?gU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,gM=(e,t,r)=>gL(e,"symbol"!=typeof t?t+"":t,r);class gB extends en{constructor(e,t){super(e,t),this.core=e,this.logger=t,gM(this,"records",new Map),gM(this,"events",new w.EventEmitter),gM(this,"name","history"),gM(this,"version","0.3"),gM(this,"cached",[]),gM(this,"initialized",!1),gM(this,"storagePrefix",pg),gM(this,"init",async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(e=>this.records.set(e.id,e)),this.cached=[],this.registerEventListeners(),this.initialized=!0)}),gM(this,"set",(e,t,r)=>{if(this.isInitialized(),this.logger.debug("Setting JSON-RPC request history record"),this.logger.trace({type:"method",method:"set",topic:e,request:t,chainId:r}),this.records.has(t.id))return;let i={id:t.id,topic:e,request:{method:t.method,params:t.params||null},chainId:r,expiry:aW(b.THIRTY_DAYS)};this.records.set(i.id,i),this.persist(),this.events.emit(pO.created,i)}),gM(this,"resolve",async e=>{if(this.isInitialized(),this.logger.debug("Updating JSON-RPC response history record"),this.logger.trace({type:"method",method:"update",response:e}),!this.records.has(e.id))return;let t=await this.getRecord(e.id);typeof t.response>"u"&&(t.response=ps(e)?{error:e.error}:{result:e.result},this.records.set(t.id,t),this.persist(),this.events.emit(pO.updated,t))}),gM(this,"get",async(e,t)=>(this.isInitialized(),this.logger.debug("Getting record"),this.logger.trace({type:"method",method:"get",topic:e,id:t}),await this.getRecord(t))),gM(this,"delete",(e,t)=>{this.isInitialized(),this.logger.debug("Deleting record"),this.logger.trace({type:"method",method:"delete",id:t}),this.values.forEach(r=>{r.topic!==e||"u">typeof t&&r.id!==t||(this.records.delete(r.id),this.events.emit(pO.deleted,r))}),this.persist()}),gM(this,"exists",async(e,t)=>(this.isInitialized(),!!this.records.has(t)&&(await this.getRecord(t)).topic===e)),gM(this,"on",(e,t)=>{this.events.on(e,t)}),gM(this,"once",(e,t)=>{this.events.once(e,t)}),gM(this,"off",(e,t)=>{this.events.off(e,t)}),gM(this,"removeListener",(e,t)=>{this.events.removeListener(e,t)}),this.logger=(0,Y.Ep)(t,this.name)}get context(){return(0,Y.Fd)(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get size(){return this.records.size}get keys(){return Array.from(this.records.keys())}get values(){return Array.from(this.records.values())}get pending(){let e=[];return this.values.forEach(t=>{if("u">typeof t.response)return;let r={topic:t.topic,request:h3(t.request.method,t.request.params,t.id),chainId:t.chainId};return e.push(r)}),e}async setJsonRpcRecords(e){await this.core.storage.setItem(this.storageKey,e)}async getJsonRpcRecords(){return await this.core.storage.getItem(this.storageKey)}getRecord(e){this.isInitialized();let t=this.records.get(e);if(!t){let{message:t}=hS("NO_MATCHING_KEY",`${this.name}: ${e}`);throw Error(t)}return t}async persist(){await this.setJsonRpcRecords(this.values),this.events.emit(pO.sync)}async restore(){try{let e=await this.getJsonRpcRecords();if(typeof e>"u"||!e.length)return;if(this.records.size){let{message:e}=hS("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),Error(e)}this.cached=e,this.logger.debug(`Successfully Restored records for ${this.name}`),this.logger.trace({type:"method",method:"restore",records:this.values})}catch(e){this.logger.debug(`Failed to Restore records for ${this.name}`),this.logger.error(e)}}registerEventListeners(){this.events.on(pO.created,e=>{let t=pO.created;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e})}),this.events.on(pO.updated,e=>{let t=pO.updated;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e})}),this.events.on(pO.deleted,e=>{let t=pO.deleted;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,record:e})}),this.core.heartbeat.on(x,()=>{this.cleanup()})}cleanup(){try{this.isInitialized();let e=!1;this.records.forEach(t=>{(0,b.toMiliseconds)(t.expiry||0)-Date.now()<=0&&(this.logger.info(`Deleting expired history log: ${t.id}`),this.records.delete(t.id),this.events.emit(pO.deleted,t,!1),e=!0)}),e&&this.persist()}catch(e){this.logger.warn(e)}}isInitialized(){if(!this.initialized){let{message:e}=hS("NOT_INITIALIZED",this.name);throw Error(e)}}}var gj=Object.defineProperty,gF=(e,t,r)=>t in e?gj(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,gW=(e,t,r)=>gF(e,"symbol"!=typeof t?t+"":t,r);class gz extends ed{constructor(e,t){super(e,t),this.core=e,this.logger=t,gW(this,"expirations",new Map),gW(this,"events",new w.EventEmitter),gW(this,"name","expirer"),gW(this,"version","0.3"),gW(this,"cached",[]),gW(this,"initialized",!1),gW(this,"storagePrefix",pg),gW(this,"init",async()=>{this.initialized||(this.logger.trace("Initialized"),await this.restore(),this.cached.forEach(e=>this.expirations.set(e.target,e)),this.cached=[],this.registerEventListeners(),this.initialized=!0)}),gW(this,"has",e=>{try{let t=this.formatTarget(e);return"u">typeof this.getExpiration(t)}catch{return!1}}),gW(this,"set",(e,t)=>{this.isInitialized();let r=this.formatTarget(e),i={target:r,expiry:t};this.expirations.set(r,i),this.checkExpiry(r,i),this.events.emit(pT.created,{target:r,expiration:i})}),gW(this,"get",e=>{this.isInitialized();let t=this.formatTarget(e);return this.getExpiration(t)}),gW(this,"del",e=>{if(this.isInitialized(),this.has(e)){let t=this.formatTarget(e),r=this.getExpiration(t);this.expirations.delete(t),this.events.emit(pT.deleted,{target:t,expiration:r})}}),gW(this,"on",(e,t)=>{this.events.on(e,t)}),gW(this,"once",(e,t)=>{this.events.once(e,t)}),gW(this,"off",(e,t)=>{this.events.off(e,t)}),gW(this,"removeListener",(e,t)=>{this.events.removeListener(e,t)}),this.logger=(0,Y.Ep)(t,this.name)}get context(){return(0,Y.Fd)(this.logger)}get storageKey(){return this.storagePrefix+this.version+this.core.customStoragePrefix+"//"+this.name}get length(){return this.expirations.size}get keys(){return Array.from(this.expirations.keys())}get values(){return Array.from(this.expirations.values())}formatTarget(e){if("string"==typeof e)return aj("topic",e);if("number"==typeof e)return aj("id",e);let{message:t}=hS("UNKNOWN_TYPE",`Target type: ${typeof e}`);throw Error(t)}async setExpirations(e){await this.core.storage.setItem(this.storageKey,e)}async getExpirations(){return await this.core.storage.getItem(this.storageKey)}async persist(){await this.setExpirations(this.values),this.events.emit(pT.sync)}async restore(){try{let e=await this.getExpirations();if(typeof e>"u"||!e.length)return;if(this.expirations.size){let{message:e}=hS("RESTORE_WILL_OVERRIDE",this.name);throw this.logger.error(e),Error(e)}this.cached=e,this.logger.debug(`Successfully Restored expirations for ${this.name}`),this.logger.trace({type:"method",method:"restore",expirations:this.values})}catch(e){this.logger.debug(`Failed to Restore expirations for ${this.name}`),this.logger.error(e)}}getExpiration(e){let t=this.expirations.get(e);if(!t){let{message:t}=hS("NO_MATCHING_KEY",`${this.name}: ${e}`);throw this.logger.warn(t),Error(t)}return t}checkExpiry(e,t){let{expiry:r}=t;(0,b.toMiliseconds)(r)-Date.now()<=0&&this.expire(e,t)}expire(e,t){this.expirations.delete(e),this.events.emit(pT.expired,{target:e,expiration:t})}checkExpirations(){this.core.relayer.connected&&this.expirations.forEach((e,t)=>this.checkExpiry(t,e))}registerEventListeners(){this.core.heartbeat.on(x,()=>this.checkExpirations()),this.events.on(pT.created,e=>{let t=pT.created;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()}),this.events.on(pT.expired,e=>{let t=pT.expired;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()}),this.events.on(pT.deleted,e=>{let t=pT.deleted;this.logger.info(`Emitting ${t}`),this.logger.debug({type:"event",event:t,data:e}),this.persist()})}isInitialized(){if(!this.initialized){let{message:e}=hS("NOT_INITIALIZED",this.name);throw Error(e)}}}var gH=Object.defineProperty,gq=(e,t,r)=>t in e?gH(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,gV=(e,t,r)=>gq(e,"symbol"!=typeof t?t+"":t,r);class gK extends eu{constructor(e,t,r){super(e,t,r),this.core=e,this.logger=t,this.store=r,gV(this,"name","verify-api"),gV(this,"abortController"),gV(this,"isDevEnv"),gV(this,"verifyUrlV3",p$),gV(this,"storagePrefix",pg),gV(this,"version",2),gV(this,"publicKey"),gV(this,"fetchPromise"),gV(this,"init",async()=>{var e;this.isDevEnv||(this.publicKey=await this.store.getItem(this.storeKey),this.publicKey&&(0,b.toMiliseconds)(null==(e=this.publicKey)?void 0:e.expiresAt){if(!aR()||this.isDevEnv)return;let t=window.location.origin,{id:r,decryptedId:i}=e,n=`${this.verifyUrlV3}/attestation?projectId=${this.core.projectId}&origin=${t}&id=${r}&decryptedId=${i}`;try{let e=(0,rF.getDocument)(),t=this.startAbortTimer(5*b.ONE_SECOND),i=await new Promise((i,o)=>{let s=()=>{window.removeEventListener("message",l),e.body.removeChild(a),o("attestation aborted")};this.abortController.signal.addEventListener("abort",s);let a=e.createElement("iframe");a.src=n,a.style.display="none",a.addEventListener("error",s,{signal:this.abortController.signal});let l=n=>{if(n.data&&"string"==typeof n.data)try{let o=JSON.parse(n.data);if("verify_attestation"===o.type){if(rN(o.attestation).payload.id!==r)return;clearInterval(t),e.body.removeChild(a),this.abortController.signal.removeEventListener("abort",s),window.removeEventListener("message",l),i(null===o.attestation?"":o.attestation)}}catch(e){this.logger.warn(e)}};e.body.appendChild(a),window.addEventListener("message",l,{signal:this.abortController.signal})});return this.logger.debug(i,"jwt attestation"),i}catch(e){this.logger.warn(e)}return""}),gV(this,"resolve",async e=>{if(this.isDevEnv)return"";let{attestationId:t,hash:r,encryptedId:i}=e;if(""===t){this.logger.debug("resolve: attestationId is empty, skipping");return}if(t){if(rN(t).payload.id!==i)return;let e=await this.isValidJwtAttestation(t);if(e){if(!e.isVerified){this.logger.warn("resolve: jwt attestation: origin url not verified");return}return e}}if(!r)return;let n=this.getVerifyUrl(e?.verifyUrl);return this.fetchAttestation(r,n)}),gV(this,"fetchAttestation",async(e,t)=>{this.logger.debug(`resolving attestation: ${e} from url: ${t}`);let r=this.startAbortTimer(5*b.ONE_SECOND),i=await fetch(`${t}/attestation/${e}?v2Supported=true`,{signal:this.abortController.signal});return clearTimeout(r),200===i.status?await i.json():void 0}),gV(this,"getVerifyUrl",e=>{let t=e||pP;return pD.includes(t)||(this.logger.info(`verify url: ${t}, not included in trusted list, assigning default: ${pP}`),t=pP),t}),gV(this,"fetchPublicKey",async()=>{try{this.logger.debug(`fetching public key from: ${this.verifyUrlV3}`);let e=this.startAbortTimer(b.FIVE_SECONDS),t=await fetch(`${this.verifyUrlV3}/public-key`,{signal:this.abortController.signal});return clearTimeout(e),await t.json()}catch(e){this.logger.warn(e)}}),gV(this,"persistPublicKey",async e=>{this.logger.debug(e,"persisting public key to local storage"),await this.store.setItem(this.storeKey,e),this.publicKey=e}),gV(this,"removePublicKey",async()=>{this.logger.debug("removing verify v2 public key from storage"),await this.store.removeItem(this.storeKey),this.publicKey=void 0}),gV(this,"isValidJwtAttestation",async e=>{let t=await this.getPublicKey();try{if(t)return this.validateAttestation(e,t)}catch(e){this.logger.error(e),this.logger.warn("error validating attestation")}let r=await this.fetchAndPersistPublicKey();try{if(r)return this.validateAttestation(e,r)}catch(e){this.logger.error(e),this.logger.warn("error validating attestation")}}),gV(this,"getPublicKey",async()=>this.publicKey?this.publicKey:await this.fetchAndPersistPublicKey()),gV(this,"fetchAndPersistPublicKey",async()=>{if(this.fetchPromise)return await this.fetchPromise,this.publicKey;this.fetchPromise=new Promise(async e=>{let t=await this.fetchPublicKey();t&&(await this.persistPublicKey(t),e(t))});let e=await this.fetchPromise;return this.fetchPromise=void 0,e}),gV(this,"validateAttestation",(e,t)=>{let r=function(e,t){let[r,i,n]=e.split("."),o=af.from(u0(n),"base64");if(64!==o.length)throw Error("Invalid signature length");let s=o.slice(0,32),a=o.slice(32,64),l=ca(`${r}.${i}`),c=function(e){let t=af.from(e.x,"base64"),r=af.from(e.y,"base64");return oX([new Uint8Array([4]),t,r])}(t);if(!uz.verify(oX([s,a]),l,c))throw Error("Invalid signature");return rN(e).payload}(e,t.publicKey),i={hasExpired:(0,b.toMiliseconds)(r.exp)this.abortController.abort(),(0,b.toMiliseconds)(e))}}var gZ=Object.defineProperty,gG=(e,t,r)=>t in e?gZ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,gY=(e,t,r)=>gG(e,"symbol"!=typeof t?t+"":t,r);class gJ extends eh{constructor(e,t){super(e,t),this.projectId=e,this.logger=t,gY(this,"context","echo"),gY(this,"registerDeviceToken",async e=>{let{clientId:t,token:r,notificationType:i,enableEncrypted:n=!1}=e,o=`https://echo.walletconnect.com/${this.projectId}/clients`;await fetch(o,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({client_id:t,type:i,token:r,always_raw:n})})}),this.logger=(0,Y.Ep)(t,this.context)}}var gX=Object.defineProperty,gQ=Object.getOwnPropertySymbols,g0=Object.prototype.hasOwnProperty,g1=Object.prototype.propertyIsEnumerable,g2=(e,t,r)=>t in e?gX(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,g3=(e,t)=>{for(var r in t||(t={}))g0.call(t,r)&&g2(e,r,t[r]);if(gQ)for(var r of gQ(t))g1.call(t,r)&&g2(e,r,t[r]);return e},g5=(e,t,r)=>g2(e,"symbol"!=typeof t?t+"":t,r);class g4 extends ep{constructor(e,t,r=!0){super(e,t,r),this.core=e,this.logger=t,g5(this,"context","event-client"),g5(this,"storagePrefix",pg),g5(this,"storageVersion",.1),g5(this,"events",new Map),g5(this,"shouldPersist",!1),g5(this,"init",async()=>{if(!aY())try{let e={eventId:aG(),timestamp:Date.now(),domain:this.getAppDomain(),props:{event:"INIT",type:"",properties:{client_id:await this.core.crypto.getClientId(),user_agent:a$(this.core.relayer.protocol,this.core.relayer.version,p_)}}};await this.sendEvent([e])}catch(e){this.logger.warn(e)}}),g5(this,"createEvent",e=>{let{event:t="ERROR",type:r="",properties:{topic:i,trace:n}}=e,o=aG(),s=this.core.projectId||"",a=g3({eventId:o,timestamp:Date.now(),props:{event:t,type:r,properties:{topic:i,trace:n}},bundleId:s,domain:this.getAppDomain()},this.setMethods(o));return this.telemetryEnabled&&(this.events.set(o,a),this.shouldPersist=!0),a}),g5(this,"getEvent",e=>{let{eventId:t,topic:r}=e;if(t)return this.events.get(t);let i=Array.from(this.events.values()).find(e=>e.props.properties.topic===r);if(i)return g3(g3({},i),this.setMethods(i.eventId))}),g5(this,"deleteEvent",e=>{let{eventId:t}=e;this.events.delete(t),this.shouldPersist=!0}),g5(this,"setEventListeners",()=>{this.core.heartbeat.on(x,async()=>{this.shouldPersist&&await this.persist(),this.events.forEach(e=>{(0,b.fromMiliseconds)(Date.now())-(0,b.fromMiliseconds)(e.timestamp)>86400&&(this.events.delete(e.eventId),this.shouldPersist=!0)})})}),g5(this,"setMethods",e=>({addTrace:t=>this.addTrace(e,t),setError:t=>this.setError(e,t)})),g5(this,"addTrace",(e,t)=>{let r=this.events.get(e);r&&(r.props.properties.trace.push(t),this.events.set(e,r),this.shouldPersist=!0)}),g5(this,"setError",(e,t)=>{let r=this.events.get(e);r&&(r.props.type=t,r.timestamp=Date.now(),this.events.set(e,r),this.shouldPersist=!0)}),g5(this,"persist",async()=>{await this.core.storage.setItem(this.storageKey,Array.from(this.events.values())),this.shouldPersist=!1}),g5(this,"restore",async()=>{try{let e=await this.core.storage.getItem(this.storageKey)||[];if(!e.length)return;e.forEach(e=>{this.events.set(e.eventId,g3(g3({},e),this.setMethods(e.eventId)))})}catch(e){this.logger.warn(e)}}),g5(this,"submit",async()=>{if(!this.telemetryEnabled||0===this.events.size)return;let e=[];for(let[t,r]of this.events)r.props.type&&e.push(r);if(0!==e.length)try{if((await this.sendEvent(e)).ok)for(let t of e)this.events.delete(t.eventId),this.shouldPersist=!0}catch(e){this.logger.warn(e)}}),g5(this,"sendEvent",async e=>{let t=this.getAppDomain()?"":"&sp=desktop";return await fetch(`https://pulse.walletconnect.org/batch?projectId=${this.core.projectId}&st=events_sdk&sv=js-${p_}${t}`,{method:"POST",body:JSON.stringify(e)})}),g5(this,"getAppDomain",()=>aP().url),this.logger=(0,Y.Ep)(t,this.context),this.telemetryEnabled=r,r?this.restore().then(async()=>{await this.submit(),this.setEventListeners()}):this.persist()}get storageKey(){return this.storagePrefix+this.storageVersion+this.core.customStoragePrefix+"//"+this.context}}var g6=Object.defineProperty,g8=Object.getOwnPropertySymbols,g9=Object.prototype.hasOwnProperty,g7=Object.prototype.propertyIsEnumerable,me=(e,t,r)=>t in e?g6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,mt=(e,t)=>{for(var r in t||(t={}))g9.call(t,r)&&me(e,r,t[r]);if(g8)for(var r of g8(t))g7.call(t,r)&&me(e,r,t[r]);return e},mr=(e,t,r)=>me(e,"symbol"!=typeof t?t+"":t,r);class mi extends ee{constructor(e){var t;super(e),mr(this,"protocol","wc"),mr(this,"version",2),mr(this,"name",pf),mr(this,"relayUrl"),mr(this,"projectId"),mr(this,"customStoragePrefix"),mr(this,"events",new w.EventEmitter),mr(this,"logger"),mr(this,"heartbeat"),mr(this,"relayer"),mr(this,"crypto"),mr(this,"storage"),mr(this,"history"),mr(this,"expirer"),mr(this,"pairing"),mr(this,"verify"),mr(this,"echoClient"),mr(this,"linkModeSupportedApps"),mr(this,"eventClient"),mr(this,"initialized",!1),mr(this,"logChunkController"),mr(this,"on",(e,t)=>this.events.on(e,t)),mr(this,"once",(e,t)=>this.events.once(e,t)),mr(this,"off",(e,t)=>this.events.off(e,t)),mr(this,"removeListener",(e,t)=>this.events.removeListener(e,t)),mr(this,"dispatchEnvelope",({topic:e,message:t,sessionExists:r})=>{if(!e||!t)return;let i={topic:e,message:t,publishedAt:Date.now(),transportType:pA.link_mode};this.relayer.onLinkMessageEvent(i,{sessionExists:r})});let r=this.getGlobalCore(e?.customStoragePrefix);if(r)try{return this.customStoragePrefix=r.customStoragePrefix,this.logger=r.logger,this.heartbeat=r.heartbeat,this.crypto=r.crypto,this.history=r.history,this.expirer=r.expirer,this.storage=r.storage,this.relayer=r.relayer,this.pairing=r.pairing,this.verify=r.verify,this.echoClient=r.echoClient,this.linkModeSupportedApps=r.linkModeSupportedApps,this.eventClient=r.eventClient,this.initialized=r.initialized,this.logChunkController=r.logChunkController,r}catch(e){console.warn("Failed to copy global core",e)}this.projectId=e?.projectId,this.relayUrl=e?.relayUrl||pC,this.customStoragePrefix=null!=e&&e.customStoragePrefix?`:${e.customStoragePrefix}`:"";let i=(0,Y.jI)({level:"string"==typeof e?.logger&&e.logger?e.logger:pm.logger,name:pf}),{logger:n,chunkLoggerController:o}=(0,Y.Rt)({opts:i,maxSizeInBytes:e?.maxLogBlobSizeInBytes,loggerOverride:e?.logger});this.logChunkController=o,null!=(t=this.logChunkController)&&t.downloadLogsBlobInBrowser&&(window.downloadLogsBlobInBrowser=async()=>{var e,t;null!=(e=this.logChunkController)&&e.downloadLogsBlobInBrowser&&(null==(t=this.logChunkController)||t.downloadLogsBlobInBrowser({clientId:await this.crypto.getClientId()}))}),this.logger=(0,Y.Ep)(n,this.name),this.heartbeat=new _,this.crypto=new fU(this,this.logger,e?.keychain),this.history=new gB(this,this.logger),this.expirer=new gz(this,this.logger),this.storage=null!=e&&e.storage?e.storage:new G(mt(mt({},py),e?.storageOptions)),this.relayer=new gy({core:this,logger:this.logger,relayUrl:this.relayUrl,projectId:this.projectId}),this.pairing=new gD(this,this.logger),this.verify=new gK(this,this.logger,this.storage),this.echoClient=new gJ(this.projectId||"",this.logger),this.linkModeSupportedApps=[],this.eventClient=new g4(this,this.logger,e?.telemetryEnabled),this.setGlobalCore(this)}static async init(e){let t=new mi(e);await t.initialize();let r=await t.crypto.getClientId();return await t.storage.setItem("WALLETCONNECT_CLIENT_ID",r),t}get context(){return(0,Y.Fd)(this.logger)}async start(){this.initialized||await this.initialize()}async getLogsBlob(){var e;return null==(e=this.logChunkController)?void 0:e.logsToBlob({clientId:await this.crypto.getClientId()})}async addLinkModeSupportedApp(e){this.linkModeSupportedApps.includes(e)||(this.linkModeSupportedApps.push(e),await this.storage.setItem(pI,this.linkModeSupportedApps))}async initialize(){this.logger.trace("Initialized");try{await this.crypto.init(),await this.history.init(),await this.expirer.init(),await this.relayer.init(),await this.heartbeat.init(),await this.pairing.init(),this.linkModeSupportedApps=await this.storage.getItem(pI)||[],this.initialized=!0,this.logger.info("Core Initialization Success")}catch(e){throw this.logger.warn(e,`Core Initialization Failure at epoch ${Date.now()}`),this.logger.error(e.message),e}}getGlobalCore(e=""){try{if(this.isGlobalCoreDisabled())return;let t=`_walletConnectCore_${e}`,r=`${t}_count`;return globalThis[r]=(globalThis[r]||0)+1,globalThis[r]>1&&console.warn(`WalletConnect Core is already initialized. This is probably a mistake and can lead to unexpected behavior. Init() was called ${globalThis[r]} times.`),globalThis[t]}catch(e){console.warn("Failed to get global WalletConnect core",e);return}}setGlobalCore(e){var t;try{if(this.isGlobalCoreDisabled())return;let r=`_walletConnectCore_${(null==(t=e.opts)?void 0:t.customStoragePrefix)||""}`;globalThis[r]=e}catch(e){console.warn("Failed to set global WalletConnect core",e)}}isGlobalCoreDisabled(){try{return"u">typeof pp&&"true"===pp.env.DISABLE_GLOBAL_CORE}catch{return!0}}}let mn="client",mo=`wc@2:${mn}:`,ms={name:mn,logger:"error"},ma="WALLETCONNECT_DEEPLINK_CHOICE",ml="Proposal expired",mc=b.SEVEN_DAYS,md={wc_sessionPropose:{req:{ttl:b.FIVE_MINUTES,prompt:!0,tag:1100},res:{ttl:b.FIVE_MINUTES,prompt:!1,tag:1101},reject:{ttl:b.FIVE_MINUTES,prompt:!1,tag:1120},autoReject:{ttl:b.FIVE_MINUTES,prompt:!1,tag:1121}},wc_sessionSettle:{req:{ttl:b.FIVE_MINUTES,prompt:!1,tag:1102},res:{ttl:b.FIVE_MINUTES,prompt:!1,tag:1103}},wc_sessionUpdate:{req:{ttl:b.ONE_DAY,prompt:!1,tag:1104},res:{ttl:b.ONE_DAY,prompt:!1,tag:1105}},wc_sessionExtend:{req:{ttl:b.ONE_DAY,prompt:!1,tag:1106},res:{ttl:b.ONE_DAY,prompt:!1,tag:1107}},wc_sessionRequest:{req:{ttl:b.FIVE_MINUTES,prompt:!0,tag:1108},res:{ttl:b.FIVE_MINUTES,prompt:!1,tag:1109}},wc_sessionEvent:{req:{ttl:b.FIVE_MINUTES,prompt:!0,tag:1110},res:{ttl:b.FIVE_MINUTES,prompt:!1,tag:1111}},wc_sessionDelete:{req:{ttl:b.ONE_DAY,prompt:!1,tag:1112},res:{ttl:b.ONE_DAY,prompt:!1,tag:1113}},wc_sessionPing:{req:{ttl:b.ONE_DAY,prompt:!1,tag:1114},res:{ttl:b.ONE_DAY,prompt:!1,tag:1115}},wc_sessionAuthenticate:{req:{ttl:b.ONE_HOUR,prompt:!0,tag:1116},res:{ttl:b.ONE_HOUR,prompt:!1,tag:1117},reject:{ttl:b.FIVE_MINUTES,prompt:!1,tag:1118},autoReject:{ttl:b.FIVE_MINUTES,prompt:!1,tag:1119}}},mu={min:b.FIVE_MINUTES,max:b.SEVEN_DAYS},mh={idle:"IDLE",active:"ACTIVE"},mp={eth_sendTransaction:{key:""},eth_sendRawTransaction:{key:""},wallet_sendCalls:{key:""},solana_signTransaction:{key:"signature"},solana_signAllTransactions:{key:"transactions"},solana_signAndSendTransaction:{key:"signature"},sui_signAndExecuteTransaction:{key:"digest"},sui_signTransaction:{key:""},hedera_signAndExecuteTransaction:{key:"transactionId"},hedera_executeTransaction:{key:"transactionId"},near_signTransaction:{key:""},near_signTransactions:{key:""},tron_signTransaction:{key:"txID"},xrpl_signTransaction:{key:""},xrpl_signTransactionFor:{key:""},algo_signTxn:{key:""},sendTransfer:{key:"txid"},stacks_stxTransfer:{key:"txId"},polkadot_signTransaction:{key:""},cosmos_signDirect:{key:""}},mf=["wc_sessionPropose","wc_sessionRequest","wc_authRequest","wc_sessionAuthenticate"],mg="wc@1.5:auth:",mm=`${mg}:PUB_KEY`;var my=Object.defineProperty,mw=Object.defineProperties,mb=Object.getOwnPropertyDescriptors,mv=Object.getOwnPropertySymbols,mC=Object.prototype.hasOwnProperty,mE=Object.prototype.propertyIsEnumerable,mx=(e,t,r)=>t in e?my(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,m_=(e,t)=>{for(var r in t||(t={}))mC.call(t,r)&&mx(e,r,t[r]);if(mv)for(var r of mv(t))mE.call(t,r)&&mx(e,r,t[r]);return e},mA=(e,t)=>mw(e,mb(t)),mS=(e,t,r)=>mx(e,"symbol"!=typeof t?t+"":t,r);class mI extends ew{constructor(e){super(e),mS(this,"name","engine"),mS(this,"events",new w),mS(this,"initialized",!1),mS(this,"requestQueue",{state:mh.idle,queue:[]}),mS(this,"sessionRequestQueue",{state:mh.idle,queue:[]}),mS(this,"emittedSessionRequests",new aX({limit:500})),mS(this,"requestQueueDelay",b.ONE_SECOND),mS(this,"expectedPairingMethodMap",new Map),mS(this,"recentlyDeletedMap",new Map),mS(this,"recentlyDeletedLimit",200),mS(this,"relayMessageCache",[]),mS(this,"pendingSessions",new Map),mS(this,"init",async()=>{this.initialized||(await this.cleanup(),this.registerRelayerEvents(),this.registerExpirerEvents(),this.registerPairingEvents(),await this.registerLinkModeListeners(),this.client.core.pairing.register({methods:Object.keys(md)}),this.initialized=!0,setTimeout(async()=>{await this.processPendingMessageEvents(),this.sessionRequestQueue.queue=this.getPendingSessionRequests(),this.processSessionRequestQueue()},(0,b.toMiliseconds)(this.requestQueueDelay)))}),mS(this,"connect",async e=>{var t;this.isInitialized(),await this.confirmOnlineStateOrThrow();let r=mA(m_({},e),{requiredNamespaces:e.requiredNamespaces||{},optionalNamespaces:e.optionalNamespaces||{}});await this.isValidConnect(r),r.optionalNamespaces=function(e,t){var r,i,n,o,s,a;let l=hE(e),c=hE(t),d={};for(let e of Object.keys(l).concat(Object.keys(c)))d[e]={chains:aq(null==(r=l[e])?void 0:r.chains,null==(i=c[e])?void 0:i.chains),methods:aq(null==(n=l[e])?void 0:n.methods,null==(o=c[e])?void 0:o.methods),events:aq(null==(s=l[e])?void 0:s.events,null==(a=c[e])?void 0:a.events)};return d}(r.requiredNamespaces,r.optionalNamespaces),r.requiredNamespaces={};let{pairingTopic:i,requiredNamespaces:n,optionalNamespaces:o,sessionProperties:s,scopedProperties:a,relays:l,authentication:c,walletPay:d}=r,u=(null==(t=c?.[0])?void 0:t.ttl)||md.wc_sessionPropose.req.ttl||b.FIVE_MINUTES;this.validateRequestExpiry(u);let h=i,p,f=!1;try{if(h){let e=this.client.core.pairing.pairings.get(h);this.client.logger.warn("connect() with existing pairing topic is deprecated and will be removed in the next major release."),f=e.active}}catch(e){throw this.client.logger.error(`connect() -> pairing.get(${h}) failed`),e}if(!h||!f){let{topic:e,uri:t}=await this.client.core.pairing.create({internal:{skipSubscribe:!0}});h=e,p=t}if(!h){let{message:e}=hS("NO_MATCHING_KEY",`connect() pairing topic: ${h}`);throw Error(e)}let g=await this.client.core.crypto.generateKeyPair(),m=aW(u),y=m_(mA(m_(m_({requiredNamespaces:n,optionalNamespaces:o,relays:l??[{protocol:"irn"}],proposer:{publicKey:g,metadata:this.client.metadata},expiryTimestamp:m,pairingTopic:h},s&&{sessionProperties:s}),a&&{scopedProperties:a}),{id:h1()}),(c||d)&&{requests:{authentication:c?.map(e=>{let{domain:t,chains:r,nonce:i,uri:n,exp:o,nbf:s,type:a,statement:l,requestId:c,resources:d,signatureTypes:u}=e;return{domain:t,chains:r,nonce:i,type:a??"caip122",aud:n,version:"1",iat:new Date().toISOString(),exp:o,nbf:s,statement:l,requestId:c,resources:d,signatureTypes:u}}),walletPay:d}}),w=aH("session_connect",y.id),{reject:v,resolve:C,done:E}=aM(u,ml),x=({id:e})=>{e===y.id&&(this.client.events.off("proposal_expire",x),this.pendingSessions.delete(y.id),this.events.emit(w,{error:{message:ml,code:0}}))};return this.client.events.on("proposal_expire",x),this.events.once(w,({error:e,session:t})=>{this.client.events.off("proposal_expire",x),e?v(e):t&&C(t)}),await this.setProposal(y.id,y),await this.sendProposeSession({proposal:y,publishOpts:{internal:{throwOnFailedPublish:!0},tvf:{correlationId:y.id}}}).catch(e=>{throw this.deleteProposal(y.id),e}),{uri:p,approval:E}}),mS(this,"pair",async e=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{return await this.client.core.pairing.pair(e)}catch(e){throw this.client.logger.error("pair() failed"),e}}),mS(this,"approve",async e=>{var t,r,i;let n=this.client.core.eventClient.createEvent({properties:{topic:null==(t=e?.id)?void 0:t.toString(),trace:[pM.session_approve_started]}});try{this.isInitialized(),await this.confirmOnlineStateOrThrow()}catch(e){throw n.setError(pB.no_internet_connection),e}try{await this.isValidProposalId(e?.id)}catch(t){throw this.client.logger.error(`approve() -> proposal.get(${e?.id}) failed`),n.setError(pB.proposal_not_found),t}try{await this.isValidApprove(e)}catch(e){throw this.client.logger.error("approve() -> isValidApprove() failed"),n.setError(pB.session_approve_namespace_validation_failure),e}let{id:o,relayProtocol:s,namespaces:a,sessionProperties:l,scopedProperties:c,sessionConfig:d,proposalRequestsResponses:u}=e,h=this.client.proposal.get(o);this.client.core.eventClient.deleteEvent({eventId:n.eventId});let{pairingTopic:p,proposer:f,requiredNamespaces:g,optionalNamespaces:m}=h,y=null==(r=this.client.core.eventClient)?void 0:r.getEvent({topic:p});y||(y=null==(i=this.client.core.eventClient)?void 0:i.createEvent({type:pM.session_approve_started,properties:{topic:p,trace:[pM.session_approve_started,pM.session_namespaces_validation_success]}}));let w=await this.client.core.crypto.generateKeyPair(),b=f.publicKey,v=await this.client.core.crypto.generateSharedKey(w,b),C=mA(m_(m_(m_({relay:{protocol:s??"irn"},namespaces:a,controller:{publicKey:w,metadata:this.client.metadata},expiry:aW(mc)},l&&{sessionProperties:l}),c&&{scopedProperties:c}),d&&{sessionConfig:d}),{proposalRequestsResponses:u}),E=pA.relay;y.addTrace(pM.subscribing_session_topic);try{await this.client.core.relayer.subscribe(v,{transportType:E,internal:{skipSubscribe:!0}})}catch(e){throw y.setError(pB.subscribe_session_topic_failure),e}y.addTrace(pM.subscribe_session_topic_success);let x=mA(m_({},C),{topic:v,requiredNamespaces:g,optionalNamespaces:m,pairingTopic:p,acknowledged:!1,self:C.controller,peer:{publicKey:f.publicKey,metadata:f.metadata},controller:w,transportType:pA.relay,authentication:u?.authentication,walletPayResult:u?.walletPay});await this.client.session.set(v,x),y.addTrace(pM.store_session);try{await this.sendApproveSession({sessionTopic:v,proposal:h,pairingProposalResponse:{relay:{protocol:s??"irn"},responderPublicKey:w},sessionSettleRequest:C,publishOpts:{internal:{throwOnFailedPublish:!0},tvf:m_({correlationId:o},this.getTVFApproveParams(x))}}),y.addTrace(pM.session_approve_publish_success)}catch(e){throw this.client.logger.error(e),this.client.session.delete(v,hI("USER_DISCONNECTED")),await this.client.core.relayer.unsubscribe(v),e}return this.client.core.eventClient.deleteEvent({eventId:y.eventId}),await this.client.core.pairing.updateMetadata({topic:p,metadata:f.metadata}),await this.deleteProposal(o),await this.client.core.pairing.activate({topic:p}),await this.setExpiry(v,aW(mc)),{topic:v,acknowledged:()=>Promise.resolve(this.client.session.get(v))}}),mS(this,"reject",async e=>{let t;this.isInitialized(),await this.confirmOnlineStateOrThrow();try{await this.isValidReject(e)}catch(e){throw this.client.logger.error("reject() -> isValidReject() failed"),e}let{id:r,reason:i}=e;try{t=this.client.proposal.get(r).pairingTopic}catch(e){throw this.client.logger.error(`reject() -> proposal.get(${r}) failed`),e}t&&await this.sendError({id:r,topic:t,error:i,rpcOpts:md.wc_sessionPropose.reject}),await this.deleteProposal(r)}),mS(this,"update",async e=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{await this.isValidUpdate(e)}catch(e){throw this.client.logger.error("update() -> isValidUpdate() failed"),e}let{topic:t,namespaces:r}=e,{done:i,resolve:n,reject:o}=aM(b.FIVE_MINUTES,"Session update request expired without receiving any acknowledgement"),s=h1(),a=h2().toString(),l=this.client.session.get(t).namespaces;return this.events.once(aH("session_update",s),({error:e})=>{e?o(e):n()}),await this.client.session.update(t,{namespaces:r}),await this.sendRequest({topic:t,method:"wc_sessionUpdate",params:{namespaces:r},throwOnFailedPublish:!0,clientRpcId:s,relayRpcId:a}).catch(e=>{this.client.logger.error(e),this.client.session.update(t,{namespaces:l}),o(e)}),{acknowledged:i}}),mS(this,"extend",async e=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{await this.isValidExtend(e)}catch(e){throw this.client.logger.error("extend() -> isValidExtend() failed"),e}let{topic:t}=e,r=h1(),{done:i,resolve:n,reject:o}=aM(b.FIVE_MINUTES,"Session extend request expired without receiving any acknowledgement");return this.events.once(aH("session_extend",r),({error:e})=>{e?o(e):n()}),await this.setExpiry(t,aW(mc)),this.sendRequest({topic:t,method:"wc_sessionExtend",params:{},clientRpcId:r,throwOnFailedPublish:!0}).catch(e=>{o(e)}),{acknowledged:i}}),mS(this,"request",async e=>{this.isInitialized();try{await this.isValidRequest(e)}catch(e){throw this.client.logger.error("request() -> isValidRequest() failed"),e}let{chainId:t,request:r,topic:i,expiry:n=md.wc_sessionRequest.req.ttl}=e,o=this.client.session.get(i);o?.transportType===pA.relay&&await this.confirmOnlineStateOrThrow();let s=h1(),a=h2().toString(),{done:l,resolve:c,reject:d}=aM(n,"Request expired. Please try again.");this.events.once(aH("session_request",s),({error:e,result:t})=>{e?d(e):c(t)});let u="wc_sessionRequest",h=this.getAppLinkIfEnabled(o.peer.metadata,o.transportType);if(h)return await this.sendRequest({clientRpcId:s,relayRpcId:a,topic:i,method:u,params:{request:mA(m_({},r),{expiryTimestamp:aW(n)}),chainId:t},expiry:n,throwOnFailedPublish:!0,appLink:h}).catch(e=>d(e)),this.client.events.emit("session_request_sent",{topic:i,request:r,chainId:t,id:s}),await l();let p={request:mA(m_({},r),{expiryTimestamp:aW(n)}),chainId:t};return await Promise.all([new Promise(async e=>{await this.sendRequest({clientRpcId:s,relayRpcId:a,topic:i,method:u,params:p,expiry:n,throwOnFailedPublish:!0,tvf:this.getTVFParams(s,p)}).catch(e=>d(e)),this.client.events.emit("session_request_sent",{topic:i,request:r,chainId:t,id:s}),e()}),new Promise(async e=>{var t;if(!(null!=(t=o.sessionConfig)&&t.disableDeepLink)){let e=await aK(this.client.core.storage,ma);await aV({id:s,topic:i,wcDeepLink:e})}e()}),l()]).then(e=>e[2])}),mS(this,"respond",async e=>{var t,r;this.isInitialized();let i=this.client.core.eventClient.createEvent({properties:{topic:e?.topic||(null==(r=null==(t=e?.response)?void 0:t.id)?void 0:r.toString()),trace:[pM.session_request_response_started]}});try{await this.isValidRespond(e)}catch(e){throw i.addTrace(e?.message),i.setError(pB.session_request_response_validation_failure),e}i.addTrace(pM.session_request_response_validation_success);let{topic:n,response:o}=e,{id:s}=o,a=this.client.session.get(n);a.transportType===pA.relay&&await this.confirmOnlineStateOrThrow();let l=this.getAppLinkIfEnabled(a.peer.metadata,a.transportType);try{i.addTrace(pM.session_request_response_publish_started),po(o)?await this.sendResult({id:s,topic:n,result:o.result,throwOnFailedPublish:!0,appLink:l}):ps(o)&&await this.sendError({id:s,topic:n,error:o.error,appLink:l}),this.cleanupAfterResponse(e)}catch(e){throw i.addTrace(e?.message),i.setError(pB.session_request_response_publish_failure),e}}),mS(this,"ping",async e=>{this.isInitialized(),await this.confirmOnlineStateOrThrow();try{await this.isValidPing(e)}catch(e){throw this.client.logger.error("ping() -> isValidPing() failed"),e}let{topic:t}=e;if(this.client.session.keys.includes(t)){let e=h1(),r=h2().toString(),{done:i,resolve:n,reject:o}=aM(b.FIVE_MINUTES,"Ping request expired without receiving any acknowledgement");this.events.once(aH("session_ping",e),({error:e})=>{e?o(e):n()}),await Promise.all([this.sendRequest({topic:t,method:"wc_sessionPing",params:{},throwOnFailedPublish:!0,clientRpcId:e,relayRpcId:r}),i()])}else this.client.core.pairing.pairings.keys.includes(t)&&(this.client.logger.warn("ping() on pairing topic is deprecated and will be removed in the next major release."),await this.client.core.pairing.ping({topic:t}))}),mS(this,"emit",async e=>{this.isInitialized(),await this.confirmOnlineStateOrThrow(),await this.isValidEmit(e);let{topic:t,event:r,chainId:i}=e,n=h2().toString(),o=h1();await this.sendRequest({topic:t,method:"wc_sessionEvent",params:{event:r,chainId:i},throwOnFailedPublish:!0,relayRpcId:n,clientRpcId:o})}),mS(this,"disconnect",async e=>{this.isInitialized(),await this.confirmOnlineStateOrThrow(),await this.isValidDisconnect(e);let{topic:t}=e;if(this.client.session.keys.includes(t))await this.sendRequest({topic:t,method:"wc_sessionDelete",params:hI("USER_DISCONNECTED"),throwOnFailedPublish:!0}),await this.deleteSession({topic:t,emitEvent:!1});else if(this.client.core.pairing.pairings.keys.includes(t))await this.client.core.pairing.disconnect({topic:t});else{let{message:e}=hS("MISMATCHED_TOPIC",`Session or pairing topic not found: ${t}`);throw Error(e)}}),mS(this,"find",e=>(this.isInitialized(),this.client.session.getAll().filter(t=>(function(e,t){let{requiredNamespaces:r}=t,i=Object.keys(e.namespaces),n=Object.keys(r),o=!0;return!!aD(n,i)&&(i.forEach(t=>{let{accounts:i,methods:n,events:s}=e.namespaces[t],a=hw(i),l=r[t];aD(am(t,l),a)&&aD(l.methods,n)&&aD(l.events,s)||(o=!1)}),o)})(t,e)))),mS(this,"getPendingSessionRequests",()=>this.client.pendingRequest.getAll()),mS(this,"authenticate",async(e,t)=>{var r,i,n;let o;this.isInitialized(),this.isValidAuthenticate(e);let s=t&&this.client.core.linkModeSupportedApps.includes(t)&&(null==(r=this.client.metadata.redirect)?void 0:r.linkMode),a=s?pA.link_mode:pA.relay;a===pA.relay&&await this.confirmOnlineStateOrThrow();let{chains:l,statement:c="",uri:d,domain:u,nonce:h,type:p,exp:f,nbf:g,methods:m=[],expiry:y}=e,w=[...e.resources||[]],{topic:b,uri:v}=await this.client.core.pairing.create({methods:["wc_sessionAuthenticate"],transportType:a});this.client.logger.info({message:"Generated new pairing",pairing:{topic:b,uri:v}});let C=await this.client.core.crypto.generateKeyPair(),E=uY(C);if(await Promise.all([this.client.auth.authKeys.set(mm,{responseTopic:E,publicKey:C}),this.client.auth.pairingTopics.set(E,{topic:E,pairingTopic:b})]),await this.client.core.relayer.subscribe(E,{transportType:a}),this.client.logger.info(`sending request to new pairing topic: ${b}`),m.length>0){let{namespace:e}=ag(l[0]),t=cq(function(e,t,r,i={}){return r?.sort((e,t)=>e.localeCompare(t)),{att:{[e]:function(e,t,r={}){return Object.assign({},...(t=t?.sort((e,t)=>e.localeCompare(t))).map(t=>({[`${e}/${t}`]:[r]})))}(t,r,i)}}}(e,"request",m));cG(w)&&(i=t,n=w.pop(),t=cq(function(e,t){cH(e),cH(t);let r=Object.keys(e.att).concat(Object.keys(t.att)).sort((e,t)=>e.localeCompare(t)),i={att:{}};return r.forEach(r=>{var n,o;Object.keys((null==(n=e.att)?void 0:n[r])||{}).concat(Object.keys((null==(o=t.att)?void 0:o[r])||{})).sort((e,t)=>e.localeCompare(t)).forEach(n=>{var o,s;i.att[r]=cP(cT({},i.att[r]),{[n]:(null==(o=e.att[r])?void 0:o[n])||(null==(s=t.att[r])?void 0:s[n])})})}),i}(cV(i),cV(n)))),w.push(t)}let x=y&&y>md.wc_sessionAuthenticate.req.ttl?y:md.wc_sessionAuthenticate.req.ttl,_={authPayload:{type:p??"caip122",chains:l,statement:c,aud:d,domain:u,version:"1",nonce:h,iat:new Date().toISOString(),exp:f,nbf:g,resources:w},requester:{publicKey:C,metadata:this.client.metadata},expiryTimestamp:aW(x)},A={requiredNamespaces:{},optionalNamespaces:{eip155:{chains:l,methods:[...new Set(["personal_sign",...m])],events:["chainChanged","accountsChanged"]}},relays:[{protocol:"irn"}],pairingTopic:b,proposer:{publicKey:C,metadata:this.client.metadata},expiryTimestamp:aW(md.wc_sessionPropose.req.ttl),id:h1()},{done:S,resolve:I,reject:N}=aM(x,"Request expired"),k=h1(),R=aH("session_connect",A.id),O=aH("session_request",k),T=async({error:e,session:t})=>{this.events.off(O,P),e?N(e):t&&I({session:t})},P=async e=>{var r,i,n;let o;if(await this.deletePendingAuthRequest(k,{message:"fulfilled",code:0}),e.error){let t=hI("WC_METHOD_UNSUPPORTED","wc_sessionAuthenticate");return e.error.code===t.code?void 0:(this.events.off(R,T),N(e.error.message))}await this.deleteProposal(A.id),this.events.off(R,T);let{cacaos:s,responder:l}=e.result,c=[],d=[];for(let e of s){await cW({cacao:e,projectId:this.client.core.projectId})||(this.client.logger.error(e,"Signature verification failed"),N(hI("SESSION_SETTLEMENT_FAILED","Signature verification failed")));let{p:t}=e,r=cG(t.resources),i=[cj(t.iss)],n=cF(t.iss);if(r){let e=cK(r),t=cZ(r);c.push(...e),i.push(...t)}for(let e of i)d.push(`${e}:${n}`)}let u=await this.client.core.crypto.generateSharedKey(C,l.publicKey);c.length>0&&(o={topic:u,acknowledged:!0,self:{publicKey:C,metadata:this.client.metadata},peer:l,controller:l.publicKey,expiry:aW(mc),requiredNamespaces:{},optionalNamespaces:{},relay:{protocol:"irn"},pairingTopic:b,namespaces:hx([...new Set(c)],[...new Set(d)]),transportType:a},await this.client.core.relayer.subscribe(u,{transportType:a}),await this.client.session.set(u,o),b&&await this.client.core.pairing.updateMetadata({topic:b,metadata:l.metadata}),o=this.client.session.get(u)),null!=(r=this.client.metadata.redirect)&&r.linkMode&&null!=(i=l.metadata.redirect)&&i.linkMode&&null!=(n=l.metadata.redirect)&&n.universal&&t&&(this.client.core.addLinkModeSupportedApp(l.metadata.redirect.universal),this.client.session.update(u,{transportType:pA.link_mode})),I({auths:s,session:o})};this.events.once(R,T),this.events.once(O,P);try{if(s){let e=h3("wc_sessionAuthenticate",_,k);this.client.core.history.set(b,e);let r=await this.client.core.crypto.encode("",e,{type:2,encoding:uK});o=hl(t,b,r)}else await Promise.all([this.sendRequest({topic:b,method:"wc_sessionAuthenticate",params:_,expiry:e.expiry,throwOnFailedPublish:!0,clientRpcId:k}),this.sendRequest({topic:b,method:"wc_sessionPropose",params:A,expiry:md.wc_sessionPropose.req.ttl,throwOnFailedPublish:!0,clientRpcId:A.id})])}catch(e){throw this.events.off(R,T),this.events.off(O,P),e}return await this.setProposal(A.id,A),await this.setAuthRequest(k,{request:mA(m_({},_),{verifyContext:{}}),pairingTopic:b,transportType:a}),{uri:o??v,response:S}}),mS(this,"approveSessionAuthenticate",async e=>{let t;let{id:r,auths:i}=e,n=this.client.core.eventClient.createEvent({properties:{topic:r.toString(),trace:[pj.authenticated_session_approve_started]}});try{this.isInitialized()}catch(e){throw n.setError(pF.no_internet_connection),e}let o=this.getPendingAuthRequest(r);if(!o)throw n.setError(pF.authenticated_session_pending_request_not_found),Error(`Could not find pending auth request with id ${r}`);let s=o.transportType||pA.relay;s===pA.relay&&await this.confirmOnlineStateOrThrow();let a=o.requester.publicKey,l=await this.client.core.crypto.generateKeyPair(),c=uY(a),d={type:1,receiverPublicKey:a,senderPublicKey:l},u=[],h=[];for(let e of i){if(!await cW({cacao:e,projectId:this.client.core.projectId})){n.setError(pF.invalid_cacao);let e=hI("SESSION_SETTLEMENT_FAILED","Signature verification failed");throw await this.sendError({id:r,topic:c,error:e,encodeOpts:d}),Error(e.message)}n.addTrace(pj.cacaos_verified);let{p:t}=e,i=cG(t.resources),o=[cj(t.iss)],s=cF(t.iss);if(i){let e=cK(i),t=cZ(i);u.push(...e),o.push(...t)}for(let e of o)h.push(`${e}:${s}`)}let p=await this.client.core.crypto.generateSharedKey(l,a);if(n.addTrace(pj.create_authenticated_session_topic),u?.length>0){t={topic:p,acknowledged:!0,self:{publicKey:l,metadata:this.client.metadata},peer:{publicKey:a,metadata:o.requester.metadata},controller:a,expiry:aW(mc),authentication:i,requiredNamespaces:{},optionalNamespaces:{},relay:{protocol:"irn"},pairingTopic:o.pairingTopic,namespaces:hx([...new Set(u)],[...new Set(h)]),transportType:s},n.addTrace(pj.subscribing_authenticated_session_topic);try{await this.client.core.relayer.subscribe(p,{transportType:s})}catch(e){throw n.setError(pF.subscribe_authenticated_session_topic_failure),e}n.addTrace(pj.subscribe_authenticated_session_topic_success),await this.client.session.set(p,t),n.addTrace(pj.store_authenticated_session),await this.client.core.pairing.updateMetadata({topic:o.pairingTopic,metadata:o.requester.metadata})}n.addTrace(pj.publishing_authenticated_session_approve);try{await this.sendResult({topic:c,id:r,result:{cacaos:i,responder:{publicKey:l,metadata:this.client.metadata}},encodeOpts:d,throwOnFailedPublish:!0,appLink:this.getAppLinkIfEnabled(o.requester.metadata,s)})}catch(e){throw n.setError(pF.authenticated_session_approve_publish_failure),e}return await this.client.auth.requests.delete(r,{message:"fulfilled",code:0}),await this.client.core.pairing.activate({topic:o.pairingTopic}),this.client.core.eventClient.deleteEvent({eventId:n.eventId}),{session:t}}),mS(this,"rejectSessionAuthenticate",async e=>{this.isInitialized();let{id:t,reason:r}=e,i=this.getPendingAuthRequest(t);if(!i)throw Error(`Could not find pending auth request with id ${t}`);i.transportType===pA.relay&&await this.confirmOnlineStateOrThrow();let n=i.requester.publicKey,o=await this.client.core.crypto.generateKeyPair(),s=uY(n);await this.sendError({id:t,topic:s,error:r,encodeOpts:{type:1,receiverPublicKey:n,senderPublicKey:o},rpcOpts:md.wc_sessionAuthenticate.reject,appLink:this.getAppLinkIfEnabled(i.requester.metadata,i.transportType)}),await this.client.auth.requests.delete(t,{message:"rejected",code:0}),await this.deleteProposal(t)}),mS(this,"formatAuthMessage",e=>{this.isInitialized();let{request:t,iss:r}=e;return cz(t,r)}),mS(this,"processRelayMessageCache",()=>{setTimeout(async()=>{if(0!==this.relayMessageCache.length)for(;this.relayMessageCache.length>0;)try{let e=this.relayMessageCache.shift();e&&await this.onRelayMessage(e)}catch(e){this.client.logger.error(e)}},50)}),mS(this,"cleanupDuplicatePairings",async e=>{if(e.pairingTopic)try{let t=this.client.core.pairing.pairings.get(e.pairingTopic),r=this.client.core.pairing.pairings.getAll().filter(r=>{var i,n;return(null==(i=r.peerMetadata)?void 0:i.url)&&(null==(n=r.peerMetadata)?void 0:n.url)===e.peer.metadata.url&&r.topic&&r.topic!==t.topic});if(0===r.length)return;this.client.logger.info(`Cleaning up ${r.length} duplicate pairing(s)`),await Promise.all(r.map(e=>this.client.core.pairing.disconnect({topic:e.topic}))),this.client.logger.info("Duplicate pairings clean up finished")}catch(e){this.client.logger.error(e)}}),mS(this,"deleteSession",async e=>{var t;let{topic:r,expirerHasDeleted:i=!1,emitEvent:n=!0,id:o=0}=e,{self:s}=this.client.session.get(r);await this.client.core.relayer.unsubscribe(r),await this.client.session.delete(r,hI("USER_DISCONNECTED")),this.addToRecentlyDeleted(r,"session"),this.client.core.crypto.keychain.has(s.publicKey)&&await this.client.core.crypto.deleteKeyPair(s.publicKey),this.client.core.crypto.keychain.has(r)&&await this.client.core.crypto.deleteSymKey(r),i||this.client.core.expirer.del(r),this.client.core.storage.removeItem(ma).catch(e=>this.client.logger.warn(e)),r===(null==(t=this.sessionRequestQueue.queue[0])?void 0:t.topic)&&(this.sessionRequestQueue.state=mh.idle),await Promise.all(this.getPendingSessionRequests().filter(e=>e.topic===r).map(e=>this.deletePendingSessionRequest(e.id,hI("USER_DISCONNECTED")))),n&&this.client.events.emit("session_delete",{id:o,topic:r})}),mS(this,"deleteProposal",async(e,t)=>{if(t)try{let t=this.client.proposal.get(e),r=this.client.core.eventClient.getEvent({topic:t.pairingTopic});r?.setError(pB.proposal_expired)}catch{}await Promise.all([this.client.proposal.delete(e,hI("USER_DISCONNECTED")),t?Promise.resolve():this.client.core.expirer.del(e)]),this.addToRecentlyDeleted(e,"proposal")}),mS(this,"deletePendingSessionRequest",async(e,t,r=!1)=>{await Promise.all([this.client.pendingRequest.delete(e,t),r?Promise.resolve():this.client.core.expirer.del(e)]),this.addToRecentlyDeleted(e,"request"),this.sessionRequestQueue.queue=this.sessionRequestQueue.queue.filter(t=>t.id!==e),r&&(this.sessionRequestQueue.state=mh.idle,this.client.events.emit("session_request_expire",{id:e}))}),mS(this,"deletePendingAuthRequest",async(e,t,r=!1)=>{await Promise.all([this.client.auth.requests.delete(e,t),r?Promise.resolve():this.client.core.expirer.del(e)])}),mS(this,"setExpiry",async(e,t)=>{this.client.session.keys.includes(e)&&(this.client.core.expirer.set(e,t),await this.client.session.update(e,{expiry:t}))}),mS(this,"setProposal",async(e,t)=>{this.client.core.expirer.set(e,aW(md.wc_sessionPropose.req.ttl)),await this.client.proposal.set(e,t)}),mS(this,"setAuthRequest",async(e,t)=>{let{request:r,pairingTopic:i,transportType:n=pA.relay}=t;this.client.core.expirer.set(e,r.expiryTimestamp),await this.client.auth.requests.set(e,{authPayload:r.authPayload,requester:r.requester,expiryTimestamp:r.expiryTimestamp,id:e,pairingTopic:i,verifyContext:r.verifyContext,transportType:n})}),mS(this,"setPendingSessionRequest",async e=>{let{id:t,topic:r,params:i,verifyContext:n}=e,o=i.request.expiryTimestamp||aW(md.wc_sessionRequest.req.ttl);this.client.core.expirer.set(t,o),await this.client.pendingRequest.set(t,{id:t,topic:r,params:i,verifyContext:n})}),mS(this,"sendRequest",async e=>{let t,r;let{topic:i,method:n,params:o,expiry:s,relayRpcId:a,clientRpcId:l,throwOnFailedPublish:c,appLink:d,tvf:u,publishOpts:h={}}=e,p=h3(n,o,l),f=!!d;try{let e=f?uK:uV;t=await this.client.core.crypto.encode(i,p,{encoding:e})}catch(e){throw await this.cleanup(),this.client.logger.error(`sendRequest() -> core.crypto.encode() for topic ${i} failed`),e}if(mf.includes(n)){let e=uJ(JSON.stringify(p)),i=uJ(t);r=await this.client.core.verify.register({id:i,decryptedId:e})}let g=m_(m_({},md[n].req),h);if(g.attestation=r,s&&(g.ttl=s),a&&(g.id=a),this.client.core.history.set(i,p),f){let e=hl(d,i,t);await global.Linking.openURL(e,this.client.name)}else g.tvf=mA(m_({},u),{correlationId:p.id}),c?(g.internal=mA(m_({},g.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(i,t,g)):this.client.core.relayer.publish(i,t,g).catch(e=>this.client.logger.error(e));return p.id}),mS(this,"sendProposeSession",async e=>{let{proposal:t,publishOpts:r}=e,i=h3("wc_sessionPropose",t,t.id);this.client.core.history.set(t.pairingTopic,i);let n=await this.client.core.crypto.encode(t.pairingTopic,i,{encoding:uV}),o=uJ(JSON.stringify(i)),s=uJ(n),a=await this.client.core.verify.register({id:s,decryptedId:o});await this.client.core.relayer.publishCustom({payload:{pairingTopic:t.pairingTopic,sessionProposal:n},opts:mA(m_({},r),{publishMethod:"wc_proposeSession",attestation:a})})}),mS(this,"sendApproveSession",async e=>{let{sessionTopic:t,pairingProposalResponse:r,proposal:i,sessionSettleRequest:n,publishOpts:o}=e,s=h5(i.id,r),a=await this.client.core.crypto.encode(i.pairingTopic,s,{encoding:uV}),l=h3("wc_sessionSettle",n,o?.id),c=await this.client.core.crypto.encode(t,l,{encoding:uV});this.client.core.history.set(t,l),await this.client.core.relayer.publishCustom({payload:{sessionTopic:t,pairingTopic:i.pairingTopic,sessionProposalResponse:a,sessionSettlementRequest:c},opts:mA(m_({},o),{publishMethod:"wc_approveSession"})})}),mS(this,"sendResult",async e=>{let t,r,i;let{id:n,topic:o,result:s,throwOnFailedPublish:a,encodeOpts:l,appLink:c}=e,d=h5(n,s),u=c&&"u">typeof(null==global?void 0:global.Linking);try{let e=u?uK:uV;t=await this.client.core.crypto.encode(o,d,mA(m_({},l||{}),{encoding:e}))}catch(e){throw await this.cleanup(),this.client.logger.error(`sendResult() -> core.crypto.encode() for topic ${o} failed`),e}try{let e=(r=await this.client.core.history.get(o,n)).request;try{i=this.getTVFParams(n,e.params,s)}catch(e){this.client.logger.warn(`sendResult() -> getTVFParams() failed: ${e?.message}`)}}catch(e){throw this.client.logger.error(`sendResult() -> history.get(${o}, ${n}) failed`),e}if(u){let e=hl(c,o,t);await global.Linking.openURL(e,this.client.name)}else{let e=md[r.request.method].res;e.tvf=mA(m_({},i),{correlationId:n}),a?(e.internal=mA(m_({},e.internal),{throwOnFailedPublish:!0}),await this.client.core.relayer.publish(o,t,e)):this.client.core.relayer.publish(o,t,e).catch(e=>this.client.logger.error(e))}await this.client.core.history.resolve(d)}),mS(this,"sendError",async e=>{let t,r;let{id:i,topic:n,error:o,encodeOpts:s,rpcOpts:a,appLink:l}=e,c=h4(i,o),d=l&&"u">typeof(null==global?void 0:global.Linking);try{let e=d?uK:uV;t=await this.client.core.crypto.encode(n,c,mA(m_({},s||{}),{encoding:e}))}catch(e){throw await this.cleanup(),this.client.logger.error(`sendError() -> core.crypto.encode() for topic ${n} failed`),e}try{r=await this.client.core.history.get(n,i)}catch(e){throw this.client.logger.error(`sendError() -> history.get(${n}, ${i}) failed`),e}if(d){let e=hl(l,n,t);await global.Linking.openURL(e,this.client.name)}else{let e=r.request.method,i=a||md[e].res;this.client.core.relayer.publish(n,t,i)}await this.client.core.history.resolve(c)}),mS(this,"cleanup",async()=>{let e=[],t=[];this.client.session.getAll().forEach(t=>{let r=!1;az(t.expiry)&&(r=!0),this.client.core.crypto.keychain.has(t.topic)||(r=!0),r&&e.push(t.topic)}),this.client.proposal.getAll().forEach(e=>{az(e.expiryTimestamp)&&t.push(e.id)}),await Promise.all([...e.map(e=>this.deleteSession({topic:e})),...t.map(e=>this.deleteProposal(e))])}),mS(this,"onProviderMessageEvent",async e=>{!this.initialized||this.relayMessageCache.length>0?this.relayMessageCache.push(e):await this.onRelayMessage(e)}),mS(this,"onRelayEventRequest",async e=>{this.requestQueue.queue.push(e),await this.processRequestsQueue()}),mS(this,"processRequestsQueue",async()=>{if(this.requestQueue.state===mh.active){this.client.logger.info("Request queue already active, skipping...");return}for(this.client.logger.info(`Request queue starting with ${this.requestQueue.queue.length} requests`);this.requestQueue.queue.length>0;){this.requestQueue.state=mh.active;let e=this.requestQueue.queue.shift();if(e)try{await this.processRequest(e)}catch(e){this.client.logger.warn(e)}}this.requestQueue.state=mh.idle}),mS(this,"processRequest",async e=>{let{topic:t,payload:r,attestation:i,transportType:n,encryptedId:o}=e,s=r.method;if(!this.shouldIgnorePairingRequest({topic:t,requestMethod:s}))switch(s){case"wc_sessionPropose":return await this.onSessionProposeRequest({topic:t,payload:r,attestation:i,encryptedId:o});case"wc_sessionSettle":return await this.onSessionSettleRequest(t,r);case"wc_sessionUpdate":return await this.onSessionUpdateRequest(t,r);case"wc_sessionExtend":return await this.onSessionExtendRequest(t,r);case"wc_sessionPing":return await this.onSessionPingRequest(t,r);case"wc_sessionDelete":return await this.onSessionDeleteRequest(t,r);case"wc_sessionRequest":return await this.onSessionRequest({topic:t,payload:r,attestation:i,encryptedId:o,transportType:n});case"wc_sessionEvent":return await this.onSessionEventRequest(t,r);case"wc_sessionAuthenticate":return await this.onSessionAuthenticateRequest({topic:t,payload:r,attestation:i,encryptedId:o,transportType:n});default:return this.client.logger.info(`Unsupported request method ${s}`)}}),mS(this,"onRelayEventResponse",async e=>{let{topic:t,payload:r,transportType:i}=e,n=(await this.client.core.history.get(t,r.id)).request.method;switch(n){case"wc_sessionPropose":return this.onSessionProposeResponse(t,r,i);case"wc_sessionSettle":return this.onSessionSettleResponse(t,r);case"wc_sessionUpdate":return this.onSessionUpdateResponse(t,r);case"wc_sessionExtend":return this.onSessionExtendResponse(t,r);case"wc_sessionPing":return this.onSessionPingResponse(t,r);case"wc_sessionRequest":return this.onSessionRequestResponse(t,r);case"wc_sessionAuthenticate":return this.onSessionAuthenticateResponse(t,r);default:return this.client.logger.info(`Unsupported response method ${n}`)}}),mS(this,"onRelayEventUnknownPayload",e=>{let{topic:t}=e,{message:r}=hS("MISSING_OR_INVALID",`Decoded payload on topic ${t} is not identifiable as a JSON-RPC request or a response.`);throw Error(r)}),mS(this,"shouldIgnorePairingRequest",e=>{let{topic:t,requestMethod:r}=e,i=this.expectedPairingMethodMap.get(t);return!(!i||i.includes(r))&&!!(i.includes("wc_sessionAuthenticate")&&this.client.events.listenerCount("session_authenticate")>0)}),mS(this,"onSessionProposeRequest",async e=>{let{topic:t,payload:r,attestation:i,encryptedId:n}=e,{params:o,id:s}=r;try{let e=this.client.core.eventClient.getEvent({topic:t});0===this.client.events.listenerCount("session_proposal")&&(console.warn("No listener for session_proposal event"),e?.setError(pL.proposal_listener_not_found)),this.isValidConnect(m_({},r.params));let a=o.expiryTimestamp||aW(md.wc_sessionPropose.req.ttl),l=m_({id:s,pairingTopic:t,expiryTimestamp:a,attestation:i,encryptedId:n},o);await this.setProposal(s,l);let c=await this.getVerifyContext({attestationId:i,hash:uJ(JSON.stringify(r)),encryptedId:n,metadata:l.proposer.metadata});e?.addTrace(pU.emit_session_proposal),this.client.events.emit("session_proposal",{id:s,params:l,verifyContext:c})}catch(e){await this.sendError({id:s,topic:t,error:e,rpcOpts:md.wc_sessionPropose.autoReject}),this.client.logger.error(e)}}),mS(this,"onSessionProposeResponse",async(e,t,r)=>{let{id:i}=t;if(po(t)){let{result:n}=t;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",result:n});let o=this.client.proposal.get(i);this.client.logger.trace({type:"method",method:"onSessionProposeResponse",proposal:o});let s=o.proposer.publicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",selfPublicKey:s});let a=n.responderPublicKey;this.client.logger.trace({type:"method",method:"onSessionProposeResponse",peerPublicKey:a});let l=await this.client.core.crypto.generateSharedKey(s,a);this.pendingSessions.set(i,{sessionTopic:l,pairingTopic:e,proposalId:i,publicKey:s});let c=await this.client.core.relayer.subscribe(l,{transportType:r});this.client.logger.trace({type:"method",method:"onSessionProposeResponse",subscriptionId:c}),await this.client.core.pairing.activate({topic:e})}else if(ps(t)){await this.deleteProposal(i);let e=aH("session_connect",i);if(0===this.events.listenerCount(e))throw Error(`emitting ${e} without any listeners, 954`);this.events.emit(e,{error:t.error})}}),mS(this,"onSessionSettleRequest",async(e,t)=>{let{id:r,params:i}=t;try{this.isValidSessionSettleRequest(i);let{relay:r,controller:n,expiry:o,namespaces:s,sessionProperties:a,scopedProperties:l,sessionConfig:c,proposalRequestsResponses:d}=t.params,u=[...this.pendingSessions.values()].find(t=>t.sessionTopic===e);if(!u)return this.client.logger.error(`Pending session not found for topic ${e}`);let h=this.client.proposal.get(u.proposalId),p=mA(m_(m_(m_({topic:e,relay:r,expiry:o,namespaces:s,acknowledged:!0,pairingTopic:u.pairingTopic,requiredNamespaces:h.requiredNamespaces,optionalNamespaces:h.optionalNamespaces,controller:n.publicKey,self:{publicKey:u.publicKey,metadata:this.client.metadata},peer:{publicKey:n.publicKey,metadata:n.metadata}},a&&{sessionProperties:a}),l&&{scopedProperties:l}),c&&{sessionConfig:c}),{transportType:pA.relay,authentication:d?.authentication,walletPayResult:d?.walletPay});await this.client.session.set(p.topic,p),await this.setExpiry(p.topic,p.expiry),await this.client.core.pairing.updateMetadata({topic:u.pairingTopic,metadata:p.peer.metadata}),this.pendingSessions.delete(u.proposalId),this.deleteProposal(u.proposalId,!1),this.cleanupDuplicatePairings(p),await this.sendResult({id:t.id,topic:e,throwOnFailedPublish:!0,result:!0}),this.client.events.emit("session_connect",{session:p}),this.events.emit(aH("session_connect",u.proposalId),{session:p})}catch(t){await this.sendError({id:r,topic:e,error:t}),this.client.logger.error(t)}}),mS(this,"onSessionSettleResponse",async(e,t)=>{let{id:r}=t;po(t)?(await this.client.session.update(e,{acknowledged:!0}),this.events.emit(aH("session_approve",r),{})):ps(t)&&(await this.client.session.delete(e,hI("USER_DISCONNECTED")),this.events.emit(aH("session_approve",r),{error:t.error}))}),mS(this,"onSessionUpdateRequest",async(e,t)=>{let{params:r,id:i}=t;try{let t=`${e}_session_update`,n=hq.get(t);if(n&&this.isRequestOutOfSync(n,i)){this.client.logger.warn(`Discarding out of sync request - ${i}`),this.sendError({id:i,topic:e,error:hI("INVALID_UPDATE_REQUEST")});return}this.isValidUpdate(m_({topic:e},r));try{hq.set(t,i),await this.client.session.update(e,{namespaces:r.namespaces}),await this.sendResult({id:i,topic:e,result:!0})}catch(e){throw hq.delete(t),e}this.client.events.emit("session_update",{id:i,topic:e,params:r})}catch(t){await this.sendError({id:i,topic:e,error:t}),this.client.logger.error(t)}}),mS(this,"isRequestOutOfSync",(e,t)=>t.toString().slice(0,-3){let{id:r}=t,i=aH("session_update",r);if(0===this.events.listenerCount(i))throw Error(`emitting ${i} without any listeners`);po(t)?this.events.emit(aH("session_update",r),{}):ps(t)&&this.events.emit(aH("session_update",r),{error:t.error})}),mS(this,"onSessionExtendRequest",async(e,t)=>{let{id:r}=t;try{this.isValidExtend({topic:e}),await this.setExpiry(e,aW(mc)),await this.sendResult({id:r,topic:e,result:!0}),this.client.events.emit("session_extend",{id:r,topic:e})}catch(t){await this.sendError({id:r,topic:e,error:t}),this.client.logger.error(t)}}),mS(this,"onSessionExtendResponse",(e,t)=>{let{id:r}=t,i=aH("session_extend",r);if(0===this.events.listenerCount(i))throw Error(`emitting ${i} without any listeners`);po(t)?this.events.emit(aH("session_extend",r),{}):ps(t)&&this.events.emit(aH("session_extend",r),{error:t.error})}),mS(this,"onSessionPingRequest",async(e,t)=>{let{id:r}=t;try{this.isValidPing({topic:e}),await this.sendResult({id:r,topic:e,result:!0,throwOnFailedPublish:!0}),this.client.events.emit("session_ping",{id:r,topic:e})}catch(t){await this.sendError({id:r,topic:e,error:t}),this.client.logger.error(t)}}),mS(this,"onSessionPingResponse",(e,t)=>{let{id:r}=t,i=aH("session_ping",r);setTimeout(()=>{if(0===this.events.listenerCount(i))throw Error(`emitting ${i} without any listeners 2176`);po(t)?this.events.emit(aH("session_ping",r),{}):ps(t)&&this.events.emit(aH("session_ping",r),{error:t.error})},500)}),mS(this,"onSessionDeleteRequest",async(e,t)=>{let{id:r}=t;try{await this.isValidDisconnect({topic:e,reason:t.params}),this.cleanupPendingSentRequestsForTopic({topic:e,error:hI("USER_DISCONNECTED")}),await this.deleteSession({topic:e,id:r})}catch(e){this.client.logger.error(e)}}),mS(this,"onSessionRequest",async e=>{var t,r,i;let{topic:n,payload:o,attestation:s,encryptedId:a,transportType:l}=e,{id:c,params:d}=o;try{await this.isValidRequest(m_({topic:n},d));let e=this.client.session.get(n),o=await this.getVerifyContext({attestationId:s,hash:uJ(JSON.stringify(h3("wc_sessionRequest",d,c))),encryptedId:a,metadata:e.peer.metadata,transportType:l}),u={id:c,topic:n,params:d,verifyContext:o};await this.setPendingSessionRequest(u),l===pA.link_mode&&null!=(t=e.peer.metadata.redirect)&&t.universal&&this.client.core.addLinkModeSupportedApp(null==(r=e.peer.metadata.redirect)?void 0:r.universal),null!=(i=this.client.signConfig)&&i.disableRequestQueue?this.emitSessionRequest(u):(this.addSessionRequestToSessionRequestQueue(u),this.processSessionRequestQueue())}catch(e){await this.sendError({id:c,topic:n,error:e}),this.client.logger.error(e)}}),mS(this,"onSessionRequestResponse",(e,t)=>{let{id:r}=t,i=aH("session_request",r);if(0===this.events.listenerCount(i))throw Error(`emitting ${i} without any listeners`);po(t)?this.events.emit(aH("session_request",r),{result:t.result}):ps(t)&&this.events.emit(aH("session_request",r),{error:t.error})}),mS(this,"onSessionEventRequest",async(e,t)=>{let{id:r,params:i}=t;try{let t=`${e}_session_event_${i.event.name}`,n=hq.get(t);if(n&&this.isRequestOutOfSync(n,r)){this.client.logger.info(`Discarding out of sync request - ${r}`);return}this.isValidEmit(m_({topic:e},i)),this.client.events.emit("session_event",{id:r,topic:e,params:i}),hq.set(t,r)}catch(t){await this.sendError({id:r,topic:e,error:t}),this.client.logger.error(t)}}),mS(this,"onSessionAuthenticateResponse",(e,t)=>{let{id:r}=t;this.client.logger.trace({type:"method",method:"onSessionAuthenticateResponse",topic:e,payload:t}),po(t)?this.events.emit(aH("session_request",r),{result:t.result}):ps(t)&&this.events.emit(aH("session_request",r),{error:t.error})}),mS(this,"onSessionAuthenticateRequest",async e=>{var t;let{topic:r,payload:i,attestation:n,encryptedId:o,transportType:s}=e;try{let{requester:e,authPayload:a,expiryTimestamp:l}=i.params,c=await this.getVerifyContext({attestationId:n,hash:uJ(JSON.stringify(i)),encryptedId:o,metadata:e.metadata,transportType:s}),d={requester:e,pairingTopic:r,id:i.id,authPayload:a,verifyContext:c,expiryTimestamp:l};await this.setAuthRequest(i.id,{request:d,pairingTopic:r,transportType:s}),s===pA.link_mode&&null!=(t=e.metadata.redirect)&&t.universal&&this.client.core.addLinkModeSupportedApp(e.metadata.redirect.universal),this.client.events.emit("session_authenticate",{topic:r,params:i.params,id:i.id,verifyContext:c})}catch(o){this.client.logger.error(o);let e=i.params.requester.publicKey,t=await this.client.core.crypto.generateKeyPair(),n=this.getAppLinkIfEnabled(i.params.requester.metadata,s);await this.sendError({id:i.id,topic:r,error:o,encodeOpts:{type:1,receiverPublicKey:e,senderPublicKey:t},rpcOpts:md.wc_sessionAuthenticate.autoReject,appLink:n})}}),mS(this,"addSessionRequestToSessionRequestQueue",e=>{this.sessionRequestQueue.queue.push(e)}),mS(this,"cleanupAfterResponse",e=>{this.deletePendingSessionRequest(e.response.id,{message:"fulfilled",code:0}),setTimeout(()=>{this.sessionRequestQueue.state=mh.idle,this.processSessionRequestQueue()},(0,b.toMiliseconds)(this.requestQueueDelay))}),mS(this,"cleanupPendingSentRequestsForTopic",({topic:e,error:t})=>{let r=this.client.core.history.pending;r.length>0&&r.filter(t=>t.topic===e&&"wc_sessionRequest"===t.request.method).forEach(e=>{this.events.emit(aH("session_request",e.request.id),{error:t})})}),mS(this,"processSessionRequestQueue",()=>{if(this.sessionRequestQueue.state===mh.active){this.client.logger.info("session request queue is already active.");return}let e=this.sessionRequestQueue.queue[0];if(!e){this.client.logger.info("session request queue is empty.");return}try{this.emitSessionRequest(e)}catch(e){this.client.logger.error(e)}}),mS(this,"emitSessionRequest",e=>{if(this.emittedSessionRequests.has(e.id)){this.client.logger.warn({id:e.id},`Skipping emitting \`session_request\` event for duplicate request. id: ${e.id}`);return}this.sessionRequestQueue.state=mh.active,this.emittedSessionRequests.add(e.id),this.client.events.emit("session_request",e)}),mS(this,"onPairingCreated",e=>{if(e.methods&&this.expectedPairingMethodMap.set(e.topic,e.methods),e.active)return;let t=this.client.proposal.getAll().find(t=>t.pairingTopic===e.topic);t&&this.onSessionProposeRequest({topic:e.topic,payload:h3("wc_sessionPropose",mA(m_({},t),{requiredNamespaces:t.requiredNamespaces,optionalNamespaces:t.optionalNamespaces,relays:t.relays,proposer:t.proposer,sessionProperties:t.sessionProperties,scopedProperties:t.scopedProperties}),t.id),attestation:t.attestation,encryptedId:t.encryptedId})}),mS(this,"isValidConnect",async e=>{let t;if(!hM(e)){let{message:t}=hS("MISSING_OR_INVALID",`connect() params: ${JSON.stringify(e)}`);throw Error(t)}let{pairingTopic:r,requiredNamespaces:i,optionalNamespaces:n,sessionProperties:o,scopedProperties:s,relays:a}=e;if(hR(r)||await this.isValidPairingTopic(r),t=!1,a?a&&hN(a)&&a.length&&a.forEach(e=>{t=hL(e)}):t=!0,!t){let{message:e}=hS("MISSING_OR_INVALID",`connect() relays: ${a}`);throw Error(e)}if(i&&!hR(i)&&0!==hk(i)){let e="requiredNamespaces are deprecated and are automatically assigned to optionalNamespaces";["fatal","error","silent"].includes(this.client.logger.level)?console.warn(e):this.client.logger.warn(e),this.validateNamespaces(i,"requiredNamespaces")}if(n&&!hR(n)&&0!==hk(n)&&this.validateNamespaces(n,"optionalNamespaces"),o&&!hR(o)&&this.validateSessionProps(o,"sessionProperties"),s&&!hR(s)){this.validateSessionProps(s,"scopedProperties");let e=Object.keys(i||{}).concat(Object.keys(n||{}));if(!Object.keys(s).every(t=>e.includes(t.split(":")[0])))throw Error(`Scoped properties must be a subset of required/optional namespaces, received: ${JSON.stringify(s)}, required/optional namespaces: ${JSON.stringify(e)}`)}}),mS(this,"validateNamespaces",(e,t)=>{let r=function(e,t,r){let i=null;if(e&&hk(e)){let n;let o=hD(e,t);o&&(i=o);let s=(n=null,Object.entries(e).forEach(([e,i])=>{var o,s;let a;if(n)return;let l=(o=am(e,i),s=`${t} ${r}`,a=null,hN(o)&&o.length?o.forEach(e=>{a||hP(e)||(a=hI("UNSUPPORTED_CHAINS",`${s}, chain ${e} should be a string and conform to "namespace:chainId" format`))}):hP(e)||(a=hI("UNSUPPORTED_CHAINS",`${s}, chains must be defined as "namespace:chainId" e.g. "eip155:1": {...} in the namespace key OR as an array of CAIP-2 chainIds e.g. eip155: { chains: ["eip155:1", "eip155:5"] }`)),a);l&&(n=l)}),n);s&&(i=s)}else i=hS("MISSING_OR_INVALID",`${t}, ${r} should be an object with data`);return i}(e,"connect()",t);if(r)throw Error(r.message)}),mS(this,"isValidApprove",async e=>{if(!hM(e))throw Error(hS("MISSING_OR_INVALID",`approve() params: ${e}`).message);let{id:t,namespaces:r,relayProtocol:i,sessionProperties:n,scopedProperties:o}=e;this.checkRecentlyDeleted(t),await this.isValidProposalId(t);let s=this.client.proposal.get(t),a=hU(r,"approve()");if(a)throw Error(a.message);let l=hj(s.requiredNamespaces,r,"approve()");if(l)throw Error(l.message);if(!hO(i,!0)){let{message:e}=hS("MISSING_OR_INVALID",`approve() relayProtocol: ${i}`);throw Error(e)}if(n&&!hR(n)&&this.validateSessionProps(n,"sessionProperties"),o&&!hR(o)){this.validateSessionProps(o,"scopedProperties");let e=new Set(Object.keys(r));if(!Object.keys(o).every(t=>e.has(t.split(":")[0])))throw Error(`Scoped properties must be a subset of approved namespaces, received: ${JSON.stringify(o)}, approved namespaces: ${Array.from(e).join(", ")}`)}}),mS(this,"isValidReject",async e=>{if(!hM(e)){let{message:t}=hS("MISSING_OR_INVALID",`reject() params: ${e}`);throw Error(t)}let{id:t,reason:r}=e;if(this.checkRecentlyDeleted(t),await this.isValidProposalId(t),!r||"object"!=typeof r||!r.code||!hT(r.code,!1)||!r.message||!hO(r.message,!1)){let{message:e}=hS("MISSING_OR_INVALID",`reject() reason: ${JSON.stringify(r)}`);throw Error(e)}}),mS(this,"isValidSessionSettleRequest",e=>{let t;if(!hM(e)){let{message:t}=hS("MISSING_OR_INVALID",`onSessionSettleRequest() params: ${e}`);throw Error(t)}let{relay:r,controller:i,namespaces:n,expiry:o}=e;if(!hL(r)){let{message:e}=hS("MISSING_OR_INVALID","onSessionSettleRequest() relay protocol should be a string");throw Error(e)}let s=(t=null,hO(i?.publicKey,!1)||(t=hS("MISSING_OR_INVALID","onSessionSettleRequest() controller public key should be a string")),t);if(s)throw Error(s.message);let a=hU(n,"onSessionSettleRequest()");if(a)throw Error(a.message);if(az(o)){let{message:e}=hS("EXPIRED","onSessionSettleRequest()");throw Error(e)}}),mS(this,"isValidUpdate",async e=>{if(!hM(e)){let{message:t}=hS("MISSING_OR_INVALID",`update() params: ${e}`);throw Error(t)}let{topic:t,namespaces:r}=e;this.checkRecentlyDeleted(t),await this.isValidSessionTopic(t);let i=this.client.session.get(t),n=hU(r,"update()");if(n)throw Error(n.message);let o=hj(i.requiredNamespaces,r,"update()");if(o)throw Error(o.message)}),mS(this,"isValidExtend",async e=>{if(!hM(e)){let{message:t}=hS("MISSING_OR_INVALID",`extend() params: ${e}`);throw Error(t)}let{topic:t}=e;this.checkRecentlyDeleted(t),await this.isValidSessionTopic(t)}),mS(this,"isValidRequest",async e=>{var t;if(!hM(e)){let{message:t}=hS("MISSING_OR_INVALID",`request() params: ${e}`);throw Error(t)}let{topic:r,request:i,chainId:n,expiry:o}=e;this.checkRecentlyDeleted(r),await this.isValidSessionTopic(r);let{namespaces:s}=this.client.session.get(r);if(!hB(s,n)){let{message:e}=hS("MISSING_OR_INVALID",`request() chainId: ${n}`);throw Error(e)}if(hR(i)||!hO(i.method,!1)){let{message:e}=hS("MISSING_OR_INVALID",`request() ${JSON.stringify(i)}`);throw Error(e)}if(!(hO(t=i.method,!1)&&(function(e,t){let r=[];return Object.values(e).forEach(e=>{hw(e.accounts).includes(t)&&r.push(...e.methods)}),r})(s,n).includes(t))){let{message:e}=hS("MISSING_OR_INVALID",`request() method: ${i.method}`);throw Error(e)}this.validateRequestExpiry(o)}),mS(this,"isValidRespond",async e=>{var t;if(!hM(e)){let{message:t}=hS("MISSING_OR_INVALID",`respond() params: ${e}`);throw Error(t)}let{topic:r,response:i}=e;try{await this.isValidSessionTopic(r)}catch(r){throw null!=(t=e?.response)&&t.id&&this.cleanupAfterResponse(e),r}if(hR(i)||hR(i.result)&&hR(i.error)||!hT(i.id,!1)||!hO(i.jsonrpc,!1)){let{message:e}=hS("MISSING_OR_INVALID",`respond() response: ${JSON.stringify(i)}`);throw Error(e)}let n=this.client.pendingRequest.get(i.id);if(n.topic!==r){let{message:e}=hS("MISMATCHED_TOPIC",`Request response topic mismatch. reqId: ${i.id}, expected topic: ${n.topic}, received topic: ${r}`);throw Error(e)}}),mS(this,"isValidPing",async e=>{if(!hM(e)){let{message:t}=hS("MISSING_OR_INVALID",`ping() params: ${e}`);throw Error(t)}let{topic:t}=e;await this.isValidSessionOrPairingTopic(t)}),mS(this,"isValidEmit",async e=>{var t;if(!hM(e)){let{message:t}=hS("MISSING_OR_INVALID",`emit() params: ${e}`);throw Error(t)}let{topic:r,event:i,chainId:n}=e;await this.isValidSessionTopic(r);let{namespaces:o}=this.client.session.get(r);if(!hB(o,n)){let{message:e}=hS("MISSING_OR_INVALID",`emit() chainId: ${n}`);throw Error(e)}if(hR(i)||!hO(i.name,!1)){let{message:e}=hS("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(i)}`);throw Error(e)}if(!(hO(t=i.name,!1)&&(function(e,t){let r=[];return Object.values(e).forEach(e=>{hw(e.accounts).includes(t)&&r.push(...e.events)}),r})(o,n).includes(t))){let{message:e}=hS("MISSING_OR_INVALID",`emit() event: ${JSON.stringify(i)}`);throw Error(e)}}),mS(this,"isValidDisconnect",async e=>{if(!hM(e)){let{message:t}=hS("MISSING_OR_INVALID",`disconnect() params: ${e}`);throw Error(t)}let{topic:t}=e;await this.isValidSessionOrPairingTopic(t)}),mS(this,"isValidAuthenticate",e=>{let{chains:t,uri:r,domain:i,nonce:n}=e;if(!Array.isArray(t)||0===t.length)throw Error("chains is required and must be a non-empty array");if(!hO(r,!1))throw Error("uri is required parameter");if(!hO(i,!1))throw Error("domain is required parameter");if(!hO(n,!1))throw Error("nonce is required parameter");if([...new Set(t.map(e=>ag(e).namespace))].length>1)throw Error("Multi-namespace requests are not supported. Please request single namespace only.");let{namespace:o}=ag(t[0]);if("eip155"!==o)throw Error("Only eip155 namespace is supported for authenticated sessions. Please use .connect() for non-eip155 chains.")}),mS(this,"getVerifyContext",async e=>{let{attestationId:t,hash:r,encryptedId:i,metadata:n,transportType:o}=e,s={verified:{verifyUrl:n.verifyUrl||pP,validation:"UNKNOWN",origin:n.url||""}};try{if(o===pA.link_mode){let e=this.getAppLinkIfEnabled(n,o);return s.verified.validation=e&&new URL(e).origin===new URL(n.url).origin?"VALID":"INVALID",s}let e=await this.client.core.verify.resolve({attestationId:t,hash:r,encryptedId:i,verifyUrl:n.verifyUrl});e&&(s.verified.origin=e.origin,s.verified.isScam=e.isScam,s.verified.validation=e.origin===new URL(n.url).origin?"VALID":"INVALID")}catch(e){this.client.logger.warn(e)}return this.client.logger.debug(`Verify context: ${JSON.stringify(s)}`),s}),mS(this,"validateSessionProps",(e,t)=>{Object.values(e).forEach((r,i)=>{if(null==r){let{message:n}=hS("MISSING_OR_INVALID",`${t} must contain an existing value for each key. Received: ${r} for key ${Object.keys(e)[i]}`);throw Error(n)}})}),mS(this,"getPendingAuthRequest",e=>{let t=this.client.auth.requests.get(e);return"object"==typeof t?t:void 0}),mS(this,"addToRecentlyDeleted",(e,t)=>{if(this.recentlyDeletedMap.set(e,t),this.recentlyDeletedMap.size>=this.recentlyDeletedLimit){let e=0,t=this.recentlyDeletedLimit/2;for(let r of this.recentlyDeletedMap.keys()){if(e++>=t)break;this.recentlyDeletedMap.delete(r)}}}),mS(this,"checkRecentlyDeleted",e=>{let t=this.recentlyDeletedMap.get(e);if(t){let{message:r}=hS("MISSING_OR_INVALID",`Record was recently deleted - ${t}: ${e}`);throw Error(r)}}),mS(this,"isLinkModeEnabled",(e,t)=>{var r,i,n,o,s,a,l,c,d;return!!e&&t===pA.link_mode&&(null==(i=null==(r=this.client.metadata)?void 0:r.redirect)?void 0:i.linkMode)===!0&&(null==(o=null==(n=this.client.metadata)?void 0:n.redirect)?void 0:o.universal)!==void 0&&(null==(a=null==(s=this.client.metadata)?void 0:s.redirect)?void 0:a.universal)!==""&&(null==(l=e?.redirect)?void 0:l.universal)!==void 0&&(null==(c=e?.redirect)?void 0:c.universal)!==""&&(null==(d=e?.redirect)?void 0:d.linkMode)===!0&&this.client.core.linkModeSupportedApps.includes(e.redirect.universal)&&"u">typeof(null==global?void 0:global.Linking)}),mS(this,"getAppLinkIfEnabled",(e,t)=>{var r;return this.isLinkModeEnabled(e,t)?null==(r=e?.redirect)?void 0:r.universal:void 0}),mS(this,"handleLinkModeMessage",({url:e})=>{if(!e||!e.includes("wc_ev")||!e.includes("topic"))return;let t=aZ(e,"topic")||"",r=decodeURIComponent(aZ(e,"wc_ev")||""),i=this.client.session.keys.includes(t);i&&this.client.session.update(t,{transportType:pA.link_mode}),this.client.core.dispatchEnvelope({topic:t,message:r,sessionExists:i})}),mS(this,"registerLinkModeListeners",async()=>{var e;if(aY()||ak()&&null!=(e=this.client.metadata.redirect)&&e.linkMode){let e=null==global?void 0:global.Linking;if("u">typeof e){e.addEventListener("url",this.handleLinkModeMessage,this.client.name);let t=await e.getInitialURL();t&&setTimeout(()=>{this.handleLinkModeMessage({url:t})},50)}}}),mS(this,"getTVFApproveParams",e=>{try{let t=hb(e.namespaces),r=function(e){let t=[];return Object.values(e).forEach(e=>{t.push(...e.methods)}),[...new Set(t)]}(e.namespaces),i=function(e){let t=[];return Object.values(e).forEach(e=>{t.push(...e.events)}),[...new Set(t)]}(e.namespaces),n=e.sessionProperties,o=e.scopedProperties;return{approvedChains:t,approvedMethods:r,approvedEvents:i,sessionProperties:n,scopedProperties:o}}catch(e){return this.client.logger.warn(e,"Error getting TVF approve params"),{}}}),mS(this,"getTVFParams",(e,t,r)=>{var i,n,o;if(!(null!=(i=t.request)&&i.method))return{};let s={correlationId:e,rpcMethods:[t.request.method],chainId:t.chainId};try{let e=this.extractTxHashesFromResult(t.request,r);s.txHashes=e,s.contractAddresses=this.isValidContractData(t.request.params)?[null==(o=null==(n=t.request.params)?void 0:n[0])?void 0:o.to]:[]}catch(e){this.client.logger.warn(e,"Error getting TVF params")}return s}),mS(this,"isValidContractData",e=>{var t;if(!e)return!1;try{let r=e?.data||(null==(t=e?.[0])?void 0:t.data);if(!r.startsWith("0x"))return!1;let i=r.slice(2);return!!/^[0-9a-fA-F]*$/.test(i)&&i.length%2==0}catch{}return!1}),mS(this,"extractTxHashesFromResult",(e,t)=>{var r;try{if(!t)return[];let i=e.method,n=mp[i];if("sui_signTransaction"===i)return[function(e){let t=new Uint8Array(af.from(e,"base64")),r=Array.from("TransactionData::").map(e=>e.charCodeAt(0)),i=new Uint8Array(r.length+t.length);i.set(r),i.set(t,r.length);let n=cw(i,{dkLen:32});return oh.Z.encode(n)}(t.transactionBytes)];if("near_signTransaction"===i)return[cE(t)];if("near_signTransactions"===i)return t.map(e=>cE(e));if("xrpl_signTransactionFor"===i||"xrpl_signTransaction"===i)return[null==(r=t.tx_json)?void 0:r.hash];if("polkadot_signTransaction"===i)return[function(e){let t=Uint8Array.from(af.from(e.signature,"hex")),r=function({publicKey:e,signature:t,payload:r}){var i,n;let o=hV(r.method),s=128|parseInt((null==(i=r.version)?void 0:i.toString())||"4"),a=function(e){let t=oh.Z.decode(e)[0];return 42===t?0:60===t?2:1}(r.address),l="00"===r.era?new Uint8Array([0]):hV(r.era);if(1!==l.length&&2!==l.length)throw Error("Invalid era length");let c=parseInt(r.nonce,16),d=new Uint8Array([255&c,c>>8&255]),u=new Uint8Array([0,...e,a,...t,...l,...d,...function(e){if(e>BigInt(8)&BigInt(255))])}if(e>BigInt(8)&BigInt(255)),Number(t>>BigInt(16)&BigInt(255)),Number(t>>BigInt(24)&BigInt(255))])}throw Error("BigInt compact encoding not supported > 2^30")}(BigInt(`0x${(n=r.tip).startsWith("0x")?n.slice(2):n}`)),...o]);return new Uint8Array([...function(e){if(e<64)return new Uint8Array([e<<2]);if(e<16384){let t=e<<2|1;return new Uint8Array([255&t,t>>8&255])}if(e<1073741824){let t=e<<2|2;return new Uint8Array([255&t,t>>8&255,t>>16&255,t>>24&255])}throw Error("Compact encoding > 2^30 not supported")}(u.length+1),s,...u])}({publicKey:function(e){let t=oh.Z.decode(e);if(t.length<33)throw Error("Too short to contain a public key");return t.slice(1,33)}(e.transaction.address),signature:t,payload:e.transaction});return function(e){let t=hV(e),r=(0,ah.blake2b)(t,void 0,32);return"0x"+af.from(r).toString("hex")}(af.from(r).toString("hex"))}({transaction:e.params.transactionPayload,signature:t.signature})];if("algo_signTxn"===i)return hN(t)?t.map(e=>cx(e)):[cx(t)];if("cosmos_signDirect"===i)return[function(e){let t=af.from(e.signed.bodyBytes,"base64"),r=af.from(e.signed.authInfoBytes,"base64"),i=af.from(e.signature.signature,"base64"),n=[];n.push(af.from([10])),n.push(c_(t.length)),n.push(t),n.push(af.from([18])),n.push(c_(r.length)),n.push(r),n.push(af.from([26])),n.push(c_(i.length)),n.push(i);let o=ca(af.concat(n));return af.from(o).toString("hex").toUpperCase()}(t)];if("wallet_sendCalls"===i)return function(e){var t,r;let i=[];try{if("string"==typeof e)return i.push(e),i;if("object"!=typeof e)return i;null!=e&&e.id&&i.push(e.id);let n=null==(r=null==(t=e?.capabilities)?void 0:t.caip345)?void 0:r.transactionHashes;n&&i.push(...n)}catch(e){console.warn("getWalletSendCallsHashes failed: ",e)}return i}(t);if("string"==typeof t)return[t];let o=t[n.key];if(hN(o))return"solana_signAllTransactions"===i?o.map(e=>(function(e){let t=atob(e),r=new Uint8Array(t.length);for(let e=0;e{this.onProviderMessageEvent(e)})}async onRelayMessage(e){let{topic:t,message:r,attestation:i,transportType:n}=e,{publicKey:o}=this.client.auth.authKeys.keys.includes(mm)?this.client.auth.authKeys.get(mm):{responseTopic:void 0,publicKey:void 0};try{let e=await this.client.core.crypto.decode(t,r,{receiverPublicKey:o,encoding:n===pA.link_mode?uK:uV});pi(e)?(this.client.core.history.set(t,e),await this.onRelayEventRequest({topic:t,payload:e,attestation:i,transportType:n,encryptedId:uJ(r)})):pn(e)?(await this.client.core.history.resolve(e),await this.onRelayEventResponse({topic:t,payload:e,transportType:n}),this.client.core.history.delete(t,e.id)):(this.client.logger.error(`onRelayMessage() -> unknown payload: ${JSON.stringify(e)}`),await this.onRelayEventUnknownPayload({topic:t,payload:e,transportType:n})),await this.client.core.relayer.messages.ack(t,r)}catch(e){this.client.logger.error(`onRelayMessage() -> failed to process an inbound message: ${r}`),this.client.logger.error(e)}}registerExpirerEvents(){this.client.core.expirer.on(pT.expired,async e=>{let{topic:t,id:r}=aF(e.target);return r&&this.client.pendingRequest.keys.includes(r)?await this.deletePendingSessionRequest(r,hS("EXPIRED"),!0):r&&this.client.auth.requests.keys.includes(r)?await this.deletePendingAuthRequest(r,hS("EXPIRED"),!0):void(t?this.client.session.keys.includes(t)&&(await this.deleteSession({topic:t,expirerHasDeleted:!0}),this.client.events.emit("session_expire",{topic:t})):r&&(await this.deleteProposal(r,!0),this.client.events.emit("proposal_expire",{id:r})))})}registerPairingEvents(){this.client.core.pairing.events.on(pR.create,e=>this.onPairingCreated(e)),this.client.core.pairing.events.on(pR.delete,e=>{this.addToRecentlyDeleted(e.topic,"pairing")})}isValidPairingTopic(e){if(!hO(e,!1)){let{message:t}=hS("MISSING_OR_INVALID",`pairing topic should be a string: ${e}`);throw Error(t)}if(!this.client.core.pairing.pairings.keys.includes(e)){let{message:t}=hS("NO_MATCHING_KEY",`pairing topic doesn't exist: ${e}`);throw Error(t)}if(az(this.client.core.pairing.pairings.get(e).expiry)){let{message:t}=hS("EXPIRED",`pairing topic: ${e}`);throw Error(t)}}async isValidSessionTopic(e){if(!hO(e,!1)){let{message:t}=hS("MISSING_OR_INVALID",`session topic should be a string: ${e}`);throw Error(t)}if(this.checkRecentlyDeleted(e),!this.client.session.keys.includes(e)){let{message:t}=hS("NO_MATCHING_KEY",`session topic doesn't exist: ${e}`);throw Error(t)}if(az(this.client.session.get(e).expiry)){await this.deleteSession({topic:e});let{message:t}=hS("EXPIRED",`session topic: ${e}`);throw Error(t)}if(!this.client.core.crypto.keychain.has(e)){let{message:t}=hS("MISSING_OR_INVALID",`session topic does not exist in keychain: ${e}`);throw await this.deleteSession({topic:e}),Error(t)}}async isValidSessionOrPairingTopic(e){if(this.checkRecentlyDeleted(e),this.client.session.keys.includes(e))await this.isValidSessionTopic(e);else if(this.client.core.pairing.pairings.keys.includes(e))this.isValidPairingTopic(e);else if(hO(e,!1)){let{message:t}=hS("NO_MATCHING_KEY",`session or pairing topic doesn't exist: ${e}`);throw Error(t)}else{let{message:t}=hS("MISSING_OR_INVALID",`session or pairing topic should be a string: ${e}`);throw Error(t)}}async isValidProposalId(e){if("number"!=typeof e){let{message:t}=hS("MISSING_OR_INVALID",`proposal id should be a number: ${e}`);throw Error(t)}if(!this.client.proposal.keys.includes(e)){let{message:t}=hS("NO_MATCHING_KEY",`proposal id doesn't exist: ${e}`);throw Error(t)}if(az(this.client.proposal.get(e).expiryTimestamp)){await this.deleteProposal(e);let{message:t}=hS("EXPIRED",`proposal id: ${e}`);throw Error(t)}}validateRequestExpiry(e){if(e&&(!hT(e,!1)||!(e<=mu.max)||!(e>=mu.min))){let{message:t}=hS("MISSING_OR_INVALID",`request() expiry: ${e}. Expiry must be a number (in seconds) between ${mu.min} and ${mu.max}`);throw Error(t)}}}class mN extends gO{constructor(e,t){super(e,t,"proposal",mo),this.core=e,this.logger=t}}class mk extends gO{constructor(e,t){super(e,t,"session",mo),this.core=e,this.logger=t}}class mR extends gO{constructor(e,t){super(e,t,"request",mo,e=>e.id),this.core=e,this.logger=t}}class mO extends gO{constructor(e,t){super(e,t,"authKeys",mg,()=>mm),this.core=e,this.logger=t}}class mT extends gO{constructor(e,t){super(e,t,"pairingTopics",mg),this.core=e,this.logger=t}}class mP extends gO{constructor(e,t){super(e,t,"requests",mg,e=>e.id),this.core=e,this.logger=t}}var m$=Object.defineProperty,mD=(e,t,r)=>t in e?m$(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,mU=(e,t,r)=>mD(e,"symbol"!=typeof t?t+"":t,r);class mL{constructor(e,t){this.core=e,this.logger=t,mU(this,"authKeys"),mU(this,"pairingTopics"),mU(this,"requests"),this.authKeys=new mO(this.core,this.logger),this.pairingTopics=new mT(this.core,this.logger),this.requests=new mP(this.core,this.logger)}async init(){await this.authKeys.init(),await this.pairingTopics.init(),await this.requests.init()}}var mM=Object.defineProperty,mB=(e,t,r)=>t in e?mM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,mj=(e,t,r)=>mB(e,"symbol"!=typeof t?t+"":t,r);class mF extends ey{constructor(e){super(e),mj(this,"protocol","wc"),mj(this,"version",2),mj(this,"name",ms.name),mj(this,"metadata"),mj(this,"core"),mj(this,"logger"),mj(this,"events",new w.EventEmitter),mj(this,"engine"),mj(this,"session"),mj(this,"proposal"),mj(this,"pendingRequest"),mj(this,"auth"),mj(this,"signConfig"),mj(this,"on",(e,t)=>this.events.on(e,t)),mj(this,"once",(e,t)=>this.events.once(e,t)),mj(this,"off",(e,t)=>this.events.off(e,t)),mj(this,"removeListener",(e,t)=>this.events.removeListener(e,t)),mj(this,"removeAllListeners",e=>this.events.removeAllListeners(e)),mj(this,"connect",async e=>{try{return await this.engine.connect(e)}catch(e){throw this.logger.error(e.message),e}}),mj(this,"pair",async e=>{try{return await this.engine.pair(e)}catch(e){throw this.logger.error(e.message),e}}),mj(this,"approve",async e=>{try{return await this.engine.approve(e)}catch(e){throw this.logger.error(e.message),e}}),mj(this,"reject",async e=>{try{return await this.engine.reject(e)}catch(e){throw this.logger.error(e.message),e}}),mj(this,"update",async e=>{try{return await this.engine.update(e)}catch(e){throw this.logger.error(e.message),e}}),mj(this,"extend",async e=>{try{return await this.engine.extend(e)}catch(e){throw this.logger.error(e.message),e}}),mj(this,"request",async e=>{try{return await this.engine.request(e)}catch(e){throw this.logger.error(e.message),e}}),mj(this,"respond",async e=>{try{return await this.engine.respond(e)}catch(e){throw this.logger.error(e.message),e}}),mj(this,"ping",async e=>{try{return await this.engine.ping(e)}catch(e){throw this.logger.error(e.message),e}}),mj(this,"emit",async e=>{try{return await this.engine.emit(e)}catch(e){throw this.logger.error(e.message),e}}),mj(this,"disconnect",async e=>{try{return await this.engine.disconnect(e)}catch(e){throw this.logger.error(e.message),e}}),mj(this,"find",e=>{try{return this.engine.find(e)}catch(e){throw this.logger.error(e.message),e}}),mj(this,"getPendingSessionRequests",()=>{try{return this.engine.getPendingSessionRequests()}catch(e){throw this.logger.error(e.message),e}}),mj(this,"authenticate",async(e,t)=>{try{return await this.engine.authenticate(e,t)}catch(e){throw this.logger.error(e.message),e}}),mj(this,"formatAuthMessage",e=>{try{return this.engine.formatAuthMessage(e)}catch(e){throw this.logger.error(e.message),e}}),mj(this,"approveSessionAuthenticate",async e=>{try{return await this.engine.approveSessionAuthenticate(e)}catch(e){throw this.logger.error(e.message),e}}),mj(this,"rejectSessionAuthenticate",async e=>{try{return await this.engine.rejectSessionAuthenticate(e)}catch(e){throw this.logger.error(e.message),e}}),this.name=e?.name||ms.name,this.metadata=function(e){var t,r;let i=aP();try{return null!=e&&e.url&&i.url&&new URL(e.url).host!==new URL(i.url).host&&(console.warn(`The configured WalletConnect 'metadata.url':${e.url} differs from the actual page url:${i.url}. This is probably unintended and can lead to issues.`),e.url=i.url),null!=(t=e?.icons)&&t.length&&e.icons.length>0&&(e.icons=e.icons.filter(e=>""!==e)),aA(a_(a_({},i),e),{url:e?.url||i.url,name:e?.name||i.name,description:e?.description||i.description,icons:null!=(r=e?.icons)&&r.length&&e.icons.length>0?e.icons:i.icons})}catch(t){return console.warn("Error populating app metadata",t),e||i}}(e?.metadata),this.signConfig=e?.signConfig;let t=hK({logger:e?.logger||ms.logger,name:this.name});this.logger=t,this.core=e?.core||new mi(e),this.session=new mk(this.core,this.logger),this.proposal=new mN(this.core,this.logger),this.pendingRequest=new mR(this.core,this.logger),this.engine=new mI(this),this.auth=new mL(this.core,this.logger)}static async init(e){let t=new mF(e);return await t.initialize(),t}get context(){return(0,Y.Fd)(this.logger)}get pairing(){return this.core.pairing.pairings}async initialize(){this.logger.trace("Initialized");try{await this.core.start(),await this.session.init(),await this.proposal.init(),await this.pendingRequest.init(),await this.auth.init(),await this.engine.init(),this.logger.info("SignClient Initialization Success")}catch(e){throw this.logger.info("SignClient Initialization Failure"),this.logger.error(e.message),e}}}var mW=r(80751),mz=r.n(mW),mH=Object.defineProperty,mq=Object.defineProperties,mV=Object.getOwnPropertyDescriptors,mK=Object.getOwnPropertySymbols,mZ=Object.prototype.hasOwnProperty,mG=Object.prototype.propertyIsEnumerable,mY=(e,t,r)=>t in e?mH(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,mJ=(e,t)=>{for(var r in t||(t={}))mZ.call(t,r)&&mY(e,r,t[r]);if(mK)for(var r of mK(t))mG.call(t,r)&&mY(e,r,t[r]);return e},mX=(e,t)=>mq(e,mV(t));let mQ={headers:{Accept:"application/json","Content-Type":"application/json"},method:"POST"};class m0{constructor(e,t=!1){if(this.url=e,this.disableProviderPing=t,this.events=new w.EventEmitter,this.isAvailable=!1,this.registering=!1,!pe(e))throw Error(`Provided URL is not compatible with HTTP connection: ${e}`);this.url=e,this.disableProviderPing=t}get connected(){return this.isAvailable}get connecting(){return this.registering}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}off(e,t){this.events.off(e,t)}removeListener(e,t){this.events.removeListener(e,t)}async open(e=this.url){await this.register(e)}async close(){if(!this.isAvailable)throw Error("Connection already closed");this.onClose()}async send(e){this.isAvailable||await this.register();try{let t=(0,j.u)(e),r=await (await mz()(this.url,mX(mJ({},mQ),{body:t}))).json();this.onPayload({data:r})}catch(t){this.onError(e.id,t)}}async register(e=this.url){if(!pe(e))throw Error(`Provided URL is not compatible with HTTP connection: ${e}`);if(this.registering){let e=this.events.getMaxListeners();return(this.events.listenerCount("register_error")>=e||this.events.listenerCount("open")>=e)&&this.events.setMaxListeners(e+1),new Promise((e,t)=>{this.events.once("register_error",e=>{this.resetMaxListeners(),t(e)}),this.events.once("open",()=>{if(this.resetMaxListeners(),typeof this.isAvailable>"u")return t(Error("HTTP connection is missing or invalid"));e()})})}this.url=e,this.registering=!0;try{if(!this.disableProviderPing){let t=(0,j.u)({id:1,jsonrpc:"2.0",method:"test",params:[]});await mz()(e,mX(mJ({},mQ),{body:t}))}this.onOpen()}catch(t){let e=this.parseError(t);throw this.events.emit("register_error",e),this.onClose(),e}}onOpen(){this.isAvailable=!0,this.registering=!1,this.events.emit("open")}onClose(){this.isAvailable=!1,this.registering=!1,this.events.emit("close")}onPayload(e){if(typeof e.data>"u")return;let t="string"==typeof e.data?(0,j.D)(e.data):e.data;this.events.emit("payload",t)}onError(e,t){let r=this.parseError(t),i=h4(e,r.message||r.toString());this.events.emit("payload",i)}parseError(e,t=this.url){return hQ(e,t,"HTTP")}resetMaxListeners(){this.events.getMaxListeners()>10&&this.events.setMaxListeners(10)}}var m1=r(82957).lW;function m2(e){return null==e||"object"!=typeof e&&"function"!=typeof e}function m3(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function m5(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}let m4="[object String]",m6="[object Number]",m8="[object Boolean]",m9="[object Arguments]";function m7(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function ye(e,t,r,i=new Map,n){let o=n?.(e,t,r,i);if(null!=o)return o;if(m2(e))return e;if(i.has(e))return i.get(e);if(Array.isArray(e)){let t=Array(e.length);i.set(e,t);for(let o=0;otypeof m1&&m1.isBuffer(e))return e.subarray();if(m7(e)){let t=new(Object.getPrototypeOf(e)).constructor(e.length);i.set(e,t);for(let o=0;otypeof SharedArrayBuffer&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){let t=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return i.set(e,t),yt(t,e,r,i,n),t}if("u">typeof File&&e instanceof File){let t=new File([e],e.name,{type:e.type});return i.set(e,t),yt(t,e,r,i,n),t}if(e instanceof Blob){let t=new Blob([e],{type:e.type});return i.set(e,t),yt(t,e,r,i,n),t}if(e instanceof Error){let t=new e.constructor;return i.set(e,t),t.message=e.message,t.name=e.name,t.stack=e.stack,t.cause=e.cause,yt(t,e,r,i,n),t}if("object"==typeof e&&function(e){switch(m5(e)){case m9:case"[object Array]":case"[object ArrayBuffer]":case"[object DataView]":case m8:case"[object Date]":case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Map]":case m6:case"[object Object]":case"[object RegExp]":case"[object Set]":case m4:case"[object Symbol]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return!0;default:return!1}}(e)){let t=Object.create(Object.getPrototypeOf(e));return i.set(e,t),yt(t,e,r,i,n),t}return e}function yt(e,t,r=e,i,n){let o=[...Object.keys(t),...m3(t)];for(let s=0;s{let o=void 0;if(null!=o)return o;if("object"==typeof e)switch(Object.prototype.toString.call(e)){case m6:case m4:case m8:{let t=new e.constructor(e?.valueOf());return yt(t,e),t}case m9:{let t={};return yt(t,e),t.length=e.length,t[Symbol.iterator]=e[Symbol.iterator],t}default:return}},ye(e,void 0,e,new Map,t)}function yi(e){return null!==e&&"object"==typeof e&&"[object Arguments]"===m5(e)}function yn(e){return"object"==typeof e&&null!==e}function yo(){}let ys="error",ya="universal_provider",yl=`wc@2:${ya}:`,yc="https://rpc.walletconnect.org/v1/",yd="generic",yu=`${yc}bundler`,yh="call_status",yp="default_chain_changed";var yf=Object.defineProperty,yg=Object.defineProperties,ym=Object.getOwnPropertyDescriptors,yy=Object.getOwnPropertySymbols,yw=Object.prototype.hasOwnProperty,yb=Object.prototype.propertyIsEnumerable,yv=(e,t,r)=>t in e?yf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,yC=(e,t)=>{for(var r in t||(t={}))yw.call(t,r)&&yv(e,r,t[r]);if(yy)for(var r of yy(t))yb.call(t,r)&&yv(e,r,t[r]);return e},yE=(e,t)=>yg(e,ym(t));function yx(e,t,r){var i;let n=ag(e);return(null==(i=t.rpcMap)?void 0:i[n.reference])||`${yc}?chainId=${n.namespace}:${n.reference}&projectId=${r}`}function y_(e){return e.map(e=>`${e.split(":")[0]}:${e.split(":")[1]}`)}function yA(e){return Object.fromEntries(Object.entries(e).filter(([e,t])=>{var r,i;return(null==(r=t?.chains)?void 0:r.length)&&(null==(i=t?.chains)?void 0:i.length)>0}))}function yS(e={},t={}){return function(e,...t){return function(e,...t){let r=t.slice(0,-1),i=t[t.length-1],n=e;for(let e=0;etypeof SharedArrayBuffer&&e instanceof SharedArrayBuffer)return e.slice(0);let t=Object.getPrototypeOf(e),r=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new r(e);if(e instanceof RegExp){let t=new r(e);return t.lastIndex=e.lastIndex,t}if(e instanceof DataView)return new r(e.buffer.slice(0));if(e instanceof Error){let t=new r(e.message);return t.stack=e.stack,t.name=e.name,t.cause=e.cause,t}return"u">typeof File&&e instanceof File?new r([e],e.name,{type:e.type,lastModified:e.lastModified}):"object"==typeof e?Object.assign(Object.create(t),e):e}(n.get(r));if(n.set(r,t),Array.isArray(r)){r=r.slice();for(let e=0;etypeof m1&&m1.isBuffer(l)&&(l=yr(l)),Array.isArray(l)){if("object"==typeof c&&null!=c){let e=[],t=Reflect.ownKeys(c);for(let r=0;ryO[e],yP=(e,t)=>{yO[e]=t};var y$=Object.defineProperty,yD=Object.getOwnPropertySymbols,yU=Object.prototype.hasOwnProperty,yL=Object.prototype.propertyIsEnumerable,yM=(e,t,r)=>t in e?y$(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,yB=(e,t)=>{for(var r in t||(t={}))yU.call(t,r)&&yM(e,r,t[r]);if(yD)for(var r of yD(t))yL.call(t,r)&&yM(e,r,t[r]);return e};let yj="eip155",yF=["atomic","flow-control","paymasterService","sessionKeys","auxiliaryFunds"],yW=e=>e&&e.startsWith("0x")?BigInt(e).toString(10):e,yz=e=>e&&e.startsWith("0x")?e:`0x${BigInt(e).toString(16)}`,yH=e=>Object.keys(e).filter(e=>yF.includes(e)).reduce((t,r)=>(t[r]=yq(e[r]),t),{}),yq=e=>"string"==typeof e&&function(e){try{let t=JSON.parse(e);return"object"==typeof t&&null!==t&&!Array.isArray(t)}catch{return!1}}(e)?JSON.parse(e):e,yV=(e,t,r)=>{let{sessionProperties:i={},scopedProperties:n={}}=e,o={};if(!hk(n)&&!hk(i))return;let s=yH(i);for(let e of r){let r=yW(e);if(!r)continue;o[yz(r)]=s;let i=n?.[`${yj}:${r}`];if(i){let e=i?.[`${yj}:${r}:${t}`];o[yz(r)]=yB(yB({},o[yz(r)]),yH(e||i))}}for(let[e,t]of Object.entries(o))0===Object.keys(t).length&&delete o[e];return Object.keys(o).length>0?o:void 0};var yK=Object.defineProperty,yZ=(e,t,r)=>t in e?yK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,yG=(e,t,r)=>yZ(e,"symbol"!=typeof t?t+"":t,r);class yY{constructor(e){yG(this,"storage"),this.storage=e}async getItem(e){return await this.storage.getItem(e)}async setItem(e,t){return await this.storage.setItem(e,t)}async removeItem(e){return await this.storage.removeItem(e)}static getStorage(e){return i||(i=new yY(e)),i}}var yJ=Object.defineProperty,yX=Object.defineProperties,yQ=Object.getOwnPropertyDescriptors,y0=Object.getOwnPropertySymbols,y1=Object.prototype.hasOwnProperty,y2=Object.prototype.propertyIsEnumerable,y3=(e,t,r)=>t in e?yJ(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,y5=(e,t)=>{for(var r in t||(t={}))y1.call(t,r)&&y3(e,r,t[r]);if(y0)for(var r of y0(t))y2.call(t,r)&&y3(e,r,t[r]);return e},y4=(e,t)=>yX(e,yQ(t));async function y6(e,t){let r;let i=ag(e.result.capabilities.caip345.caip2),n=e.result.capabilities.caip345.transactionHashes,o=await Promise.allSettled(n.map(e=>y8(i.reference,e,t))),s=o.filter(e=>"fulfilled"===e.status).map(e=>e.value).filter(e=>e);o.filter(e=>"rejected"===e.status).forEach(e=>console.warn("Failed to fetch transaction receipt:",e.reason));let a=!s.length||s.some(e=>!e),l=s.every(e=>e?.status==="0x1"),c=s.every(e=>e?.status==="0x0"),d=s.some(e=>e?.status==="0x0");return a?r=100:l?r=200:c?r=500:d&&(r=600),{id:e.result.id,version:e.request.version,atomic:e.request.atomicRequired,chainId:e.request.chainId,capabilities:e.result.capabilities,receipts:s,status:r}}async function y8(e,t,r){return await r(parseInt(e)).request(h3("eth_getTransactionReceipt",[t]))}async function y9({sendCalls:e,storage:t}){let r=await t.getItem(yh);await t.setItem(yh,y4(y5({},r),{[e.result.id]:{request:e.request,result:e.result,expiry:aW(86400)}}))}async function y7({resultId:e,storage:t}){let r=await t.getItem(yh);if(r){for(let i in delete r[e],await t.setItem(yh,r),r)az(r[i].expiry)&&delete r[i];await t.setItem(yh,r)}}async function we({resultId:e,storage:t}){let r=await t.getItem(yh),i=r?.[e];if(i&&!az(i.expiry))return i;await y7({resultId:e,storage:t})}var wt=Object.defineProperty,wr=Object.defineProperties,wi=Object.getOwnPropertyDescriptors,wn=Object.getOwnPropertySymbols,wo=Object.prototype.hasOwnProperty,ws=Object.prototype.propertyIsEnumerable,wa=(e,t,r)=>t in e?wt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,wl=(e,t)=>{for(var r in t||(t={}))wo.call(t,r)&&wa(e,r,t[r]);if(wn)for(var r of wn(t))ws.call(t,r)&&wa(e,r,t[r]);return e},wc=(e,t)=>wr(e,wi(t)),wd=(e,t,r)=>wa(e,"symbol"!=typeof t?t+"":t,r);class wu{constructor(e){wd(this,"name","eip155"),wd(this,"client"),wd(this,"chainId"),wd(this,"namespace"),wd(this,"httpProviders"),wd(this,"events"),wd(this,"storage"),this.namespace=e.namespace,this.events=yT("events"),this.client=yT("client"),this.httpProviders=this.createHttpProviders(),this.chainId=parseInt(this.getDefaultChain()),this.storage=yY.getStorage(this.client.core.storage)}async request(e){switch(e.request.method){case"eth_requestAccounts":case"eth_accounts":return this.getAccounts();case"wallet_switchEthereumChain":return await this.handleSwitchChain(e);case"eth_chainId":return parseInt(this.getDefaultChain());case"wallet_getCapabilities":return await this.getCapabilities(e);case"wallet_getCallsStatus":return await this.getCallStatus(e);case"wallet_sendCalls":return await this.sendCalls(e)}return this.namespace.methods.includes(e.request.method)?await this.client.request(e):this.getHttpProvider().request(e.request)}updateNamespace(e){this.namespace=Object.assign(this.namespace,e)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(parseInt(e),t);let r=this.chainId;this.chainId=parseInt(e),this.events.emit(yp,{currentCaipChainId:`${this.name}:${e}`,previousCaipChainId:`${this.name}:${r}`})}requestAccounts(){return this.getAccounts()}getDefaultChain(){if(this.chainId)return this.chainId.toString();if(this.namespace.defaultChain)return this.namespace.defaultChain;let e=this.namespace.chains[0];if(!e)throw Error("ChainId not found");return e.split(":")[1]}createHttpProvider(e,t){let r=t||yx(`${this.name}:${e}`,this.namespace,this.client.core.projectId);if(!r)throw Error(`No RPC url provided for chainId: ${e}`);return new pa(new m0(r,yT("disableProviderPing")))}setHttpProvider(e,t){let r=this.createHttpProvider(e,t);r&&(this.httpProviders[e]=r)}createHttpProviders(){let e={};return this.namespace.chains.forEach(t=>{var r;let i=parseInt(t.includes(":")?t.split(":")[1]:t);e[i]=this.createHttpProvider(i,null==(r=this.namespace.rpcMap)?void 0:r[t])}),e}getAccounts(){let e=this.namespace.accounts;return e?[...new Set(e.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}getHttpProvider(e){let t=e||this.chainId;return this.httpProviders[t]||(this.httpProviders=wc(wl({},this.httpProviders),{[t]:this.createHttpProvider(t)}),this.httpProviders[t])}async handleSwitchChain(e){var t,r;let i=e.request.params?null==(t=e.request.params[0])?void 0:t.chainId:"0x0",n=parseInt(i=i.startsWith("0x")?i:`0x${i}`,16);if(this.isChainApproved(n))this.setDefaultChain(`${n}`);else if(this.namespace.methods.includes("wallet_switchEthereumChain"))await this.client.request({topic:e.topic,request:{method:e.request.method,params:[{chainId:i}]},chainId:null==(r=this.namespace.chains)?void 0:r[0]}),this.setDefaultChain(`${n}`);else throw Error(`Failed to switch to chain 'eip155:${n}'. The chain is not approved or the wallet does not support 'wallet_switchEthereumChain' method.`);return null}isChainApproved(e){return this.namespace.chains.includes(`${this.name}:${e}`)}async getCapabilities(e){var t,r,i,n,o;let s;let a=null==(r=null==(t=e.request)?void 0:t.params)?void 0:r[0],l=(null==(n=null==(i=e.request)?void 0:i.params)?void 0:n[1])||[];if(!a)throw Error("Missing address parameter in `wallet_getCapabilities` request");let c=this.client.session.get(e.topic),d=(null==(o=c?.sessionProperties)?void 0:o.capabilities)||{},u=`${a}${l.join(",")}`,h=d?.[u];if(h)return h;try{s=yV(c,a,l)}catch(e){console.warn("Failed to extract capabilities from session",e)}if(s)return s;let p=await this.client.request(e);try{await this.client.session.update(e.topic,{sessionProperties:wc(wl({},c.sessionProperties||{}),{capabilities:wc(wl({},d||{}),{[u]:p})})})}catch(e){console.warn("Failed to update session with capabilities",e)}return p}async getCallStatus(e){var t,r,i;let n=this.client.session.get(e.topic),o=null==(t=n.sessionProperties)?void 0:t.bundler_name;if(o){let t=this.getBundlerUrl(e.chainId,o);try{return await this.getUserOperationReceipt(t,e)}catch(e){console.warn("Failed to fetch call status from bundler",e,t)}}let s=null==(r=n.sessionProperties)?void 0:r.bundler_url;if(s)try{return await this.getUserOperationReceipt(s,e)}catch(e){console.warn("Failed to fetch call status from custom bundler",e,s)}let a=await we({resultId:null==(i=e.request.params)?void 0:i[0],storage:this.storage});if(a)try{return await y6(a,this.getHttpProvider.bind(this))}catch(e){console.warn("Failed to fetch call status from stored send calls",e,a)}if(this.namespace.methods.includes(e.request.method))return await this.client.request(e);throw Error("Fetching call status not approved by the wallet.")}async getUserOperationReceipt(e,t){var r;let i=new URL(e),n=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(h3("eth_getUserOperationReceipt",[null==(r=t.request.params)?void 0:r[0]]))});if(!n.ok)throw Error(`Failed to fetch user operation receipt - ${n.status}`);return await n.json()}getBundlerUrl(e,t){return`${yu}?projectId=${this.client.core.projectId}&chainId=${e}&bundler=${t}`}async sendCalls(e){var t,r,i;let n=await this.client.request(e),o=null==(t=e.request.params)?void 0:t[0],s=n?.id,a=n?.capabilities||{},l=null==(r=a?.caip345)?void 0:r.caip2,c=null==(i=a?.caip345)?void 0:i.transactionHashes;return s&&l&&null!=c&&c.length&&await y9({sendCalls:{request:o,result:n},storage:this.storage}),n}}var wh=Object.defineProperty,wp=(e,t,r)=>t in e?wh(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,wf=(e,t,r)=>wp(e,"symbol"!=typeof t?t+"":t,r);class wg{constructor(e){wf(this,"name",yd),wf(this,"client"),wf(this,"httpProviders"),wf(this,"events"),wf(this,"namespace"),wf(this,"chainId"),this.namespace=e.namespace,this.events=yT("events"),this.client=yT("client"),this.chainId=this.getDefaultChain(),this.name=this.getNamespaceName(),this.httpProviders=this.createHttpProviders()}updateNamespace(e){this.namespace.chains=[...new Set((this.namespace.chains||[]).concat(e.chains||[]))],this.namespace.accounts=[...new Set((this.namespace.accounts||[]).concat(e.accounts||[]))],this.namespace.methods=[...new Set((this.namespace.methods||[]).concat(e.methods||[]))],this.namespace.events=[...new Set((this.namespace.events||[]).concat(e.events||[]))],this.httpProviders=this.createHttpProviders()}requestAccounts(){return this.getAccounts()}request(e){return this.namespace.methods.includes(e.request.method)?this.client.request(e):this.getHttpProvider(e.chainId).request(e.request)}setDefaultChain(e,t){this.httpProviders[e]||this.setHttpProvider(e,t);let r=this.chainId;this.chainId=e,this.events.emit(yp,{currentCaipChainId:`${this.name}:${e}`,previousCaipChainId:`${this.name}:${r}`})}getDefaultChain(){if(this.chainId)return this.chainId;if(this.namespace.defaultChain)return this.namespace.defaultChain;let e=this.namespace.chains[0];if(!e)throw Error("ChainId not found");return e.split(":")[1]}getNamespaceName(){let e=this.namespace.chains[0];if(!e)throw Error("ChainId not found");return ag(e).namespace}getAccounts(){let e=this.namespace.accounts;return e?[...new Set(e.filter(e=>e.split(":")[1]===this.chainId.toString()).map(e=>e.split(":")[2]))]:[]}createHttpProviders(){var e,t;let r={};return null==(t=null==(e=this.namespace)?void 0:e.accounts)||t.forEach(e=>{var t,i;let n=ag(e),o=null==(i=null==(t=this.namespace)?void 0:t.rpcMap)?void 0:i[`${n.namespace}:${n.reference}`];r[n.reference]=this.createHttpProvider(e,o)}),r}getHttpProvider(e){let t=ag(e).reference,r=this.httpProviders[t];if(typeof r>"u")throw Error(`JSON-RPC provider for ${e} not found`);return r}setHttpProvider(e,t){let r=this.createHttpProvider(e,t);r&&(this.httpProviders[e]=r)}createHttpProvider(e,t){let r=t||yx(e,this.namespace,this.client.core.projectId);if(!r)throw Error(`No RPC url provided for chainId: ${e}`);return new pa(new m0(r,yT("disableProviderPing")))}}var wm=Object.defineProperty,wy=Object.defineProperties,ww=Object.getOwnPropertyDescriptors,wb=Object.getOwnPropertySymbols,wv=Object.prototype.hasOwnProperty,wC=Object.prototype.propertyIsEnumerable,wE=(e,t,r)=>t in e?wm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,wx=(e,t)=>{for(var r in t||(t={}))wv.call(t,r)&&wE(e,r,t[r]);if(wb)for(var r of wb(t))wC.call(t,r)&&wE(e,r,t[r]);return e},w_=(e,t)=>wy(e,ww(t)),wA=(e,t,r)=>wE(e,"symbol"!=typeof t?t+"":t,r);class wS{constructor(e){var t,r;wA(this,"client"),wA(this,"namespaces"),wA(this,"optionalNamespaces"),wA(this,"sessionProperties"),wA(this,"scopedProperties"),wA(this,"events",new w),wA(this,"rpcProviders",{}),wA(this,"session"),wA(this,"providerOpts"),wA(this,"logger"),wA(this,"uri"),wA(this,"disableProviderPing",!1),wA(this,"connectParams"),this.providerOpts=e,this.logger=hK({logger:null!=(t=e.logger)?t:ys,name:null!=(r=this.providerOpts.name)?r:ya}),this.disableProviderPing=e?.disableProviderPing||!1}static async init(e){let t=new wS(e);return await t.initialize(),t}async request(e,t,r){let[i,n]=this.validateChain(t);if(!this.session)throw Error("Please call connect() before request()");return await this.getProvider(i).request({request:wx({},e),chainId:`${i}:${n}`,topic:this.session.topic,expiry:r})}sendAsync(e,t,r,i){let n=new Date().getTime();this.request(e,r,i).then(e=>t(null,h5(n,e))).catch(e=>t(e,void 0))}async enable(){if(!this.client)throw Error("Sign Client not initialized");return this.session||await this.connect({namespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties,scopedProperties:this.scopedProperties}),await this.requestAccounts()}async disconnect(){var e;if(!this.session)throw Error("Please call connect() before enable()");await this.client.disconnect({topic:null==(e=this.session)?void 0:e.topic,reason:hI("USER_DISCONNECTED")}),await this.cleanup()}async connect(e){if(!this.client)throw Error("Sign Client not initialized");if(this.connectParams=e,this.setNamespaces(e),this.cleanupPendingPairings(),!e.skipPairing)return await this.pair(e.pairingTopic)}async authenticate(e,t){if(!this.client)throw Error("Sign Client not initialized");this.setNamespaces(e),await this.cleanupPendingPairings();let{uri:r,response:i}=await this.client.authenticate(e,t);r&&(this.uri=r,this.events.emit("display_uri",r));let n=await i();if(this.session=n.session,this.session){let e=yk(this.session.namespaces);this.namespaces=yS(this.namespaces,e),await this.persist("namespaces",this.namespaces),this.onConnect()}return n}on(e,t){this.events.on(e,t)}once(e,t){this.events.once(e,t)}removeListener(e,t){this.events.removeListener(e,t)}off(e,t){this.events.off(e,t)}get isWalletConnect(){return!0}async pair(e){var t,r;let{uri:i,approval:n}=await this.client.connect({pairingTopic:e,requiredNamespaces:this.namespaces,optionalNamespaces:this.optionalNamespaces,sessionProperties:this.sessionProperties,scopedProperties:this.scopedProperties,authentication:null==(t=this.connectParams)?void 0:t.authentication,walletPay:null==(r=this.connectParams)?void 0:r.walletPay});i&&(this.uri=i,this.events.emit("display_uri",i));let o=await n();this.session=o;let s=yk(o.namespaces);return this.namespaces=yS(this.namespaces,s),await this.persist("namespaces",this.namespaces),await this.persist("optionalNamespaces",this.optionalNamespaces),this.onConnect(),this.session}setDefaultChain(e,t){try{if(!this.session)return;let[r,i]=this.validateChain(e);this.getProvider(r).setDefaultChain(i,t)}catch(e){if(!/Please call connect/.test(e.message))throw e}}async cleanupPendingPairings(e={}){try{this.logger.info("Cleaning up inactive pairings...");let t=this.client.pairing.getAll();if(!hN(t))return;for(let r of t)e.deletePairings?this.client.core.expirer.set(r.topic,0):await this.client.core.relayer.subscriber.unsubscribe(r.topic);this.logger.info(`Inactive pairings cleared: ${t.length}`)}catch(e){this.logger.warn(e,"Failed to cleanup pending pairings")}}abortPairingAttempt(){this.logger.warn("abortPairingAttempt is deprecated. This is now a no-op.")}async checkStorage(){this.namespaces=await this.getFromStore("namespaces")||{},this.optionalNamespaces=await this.getFromStore("optionalNamespaces")||{},this.session&&this.createProviders()}async initialize(){this.logger.trace("Initialized"),await this.createClient(),await this.checkStorage(),this.registerEventListeners()}async createClient(){var e,t;if(this.client=this.providerOpts.client||await mF.init({core:this.providerOpts.core,logger:this.providerOpts.logger||ys,relayUrl:this.providerOpts.relayUrl||"wss://relay.walletconnect.org",projectId:this.providerOpts.projectId,metadata:this.providerOpts.metadata,storageOptions:this.providerOpts.storageOptions,storage:this.providerOpts.storage,name:this.providerOpts.name,customStoragePrefix:this.providerOpts.customStoragePrefix,telemetryEnabled:this.providerOpts.telemetryEnabled}),this.providerOpts.session)try{this.session=this.client.session.get(this.providerOpts.session.topic)}catch(r){throw this.logger.error(r,"Failed to get session"),Error(`The provided session: ${null==(t=null==(e=this.providerOpts)?void 0:e.session)?void 0:t.topic} doesn't exist in the Sign client`)}else{let e=this.client.session.getAll();this.session=e[0]}this.logger.trace("SignClient Initialized")}createProviders(){if(!this.client)throw Error("Sign Client not initialized");if(!this.session)throw Error("Session not initialized. Please call connect() before enable()");let e=[...new Set(Object.keys(this.session.namespaces).map(e=>hC(e)))];yP("client",this.client),yP("events",this.events),yP("disableProviderPing",this.disableProviderPing),e.forEach(e=>{if(!this.session)return;let t=function(e,t){let r=Object.keys(t.namespaces).filter(t=>t.includes(e));if(!r.length)return[];let i=[];return r.forEach(e=>{let r=t.namespaces[e].accounts;i.push(...r)}),i}(e,this.session);if(t?.length===0)return;let r=y_(t),i=w_(wx({},yS(this.namespaces,this.optionalNamespaces)[e]),{accounts:t,chains:r});"eip155"===e?this.rpcProviders[e]=new wu({namespace:i}):this.rpcProviders[e]=new wg({namespace:i})})}registerEventListeners(){if(typeof this.client>"u")throw Error("Sign Client is not initialized");this.client.on("session_ping",e=>{var t;let{topic:r}=e;r===(null==(t=this.session)?void 0:t.topic)&&this.events.emit("session_ping",e)}),this.client.on("session_event",e=>{var t;let{params:r,topic:i}=e;if(i!==(null==(t=this.session)?void 0:t.topic))return;let{event:n}=r;if("accountsChanged"===n.name){let e=n.data;e&&hN(e)&&this.events.emit("accountsChanged",e.map(yN))}else if("chainChanged"===n.name){let e=r.chainId,t=r.event.data,i=hC(e),n=yR(e)!==yR(t)?`${i}:${yR(t)}`:e;this.onChainChanged({currentCaipChainId:n})}else this.events.emit(n.name,n.data);this.events.emit("session_event",e)}),this.client.on("session_update",({topic:e,params:t})=>{var r,i;if(e!==(null==(r=this.session)?void 0:r.topic))return;let{namespaces:n}=t,o=null==(i=this.client)?void 0:i.session.get(e);this.session=w_(wx({},o),{namespaces:n}),this.onSessionUpdate(),this.events.emit("session_update",{topic:e,params:t})}),this.client.on("session_delete",async e=>{var t;e.topic===(null==(t=this.session)?void 0:t.topic)&&(await this.cleanup(),this.events.emit("session_delete",e),this.events.emit("disconnect",w_(wx({},hI("USER_DISCONNECTED")),{data:e.topic})))}),this.on(yp,e=>{this.onChainChanged(w_(wx({},e),{internal:!0}))})}getProvider(e){return this.rpcProviders[e]||this.rpcProviders[yd]}onSessionUpdate(){Object.keys(this.rpcProviders).forEach(e=>{var t;this.getProvider(e).updateNamespace(null==(t=this.session)?void 0:t.namespaces[e])})}setNamespaces(e){let{namespaces:t={},optionalNamespaces:r={},sessionProperties:i,scopedProperties:n}=e;this.optionalNamespaces=yS(t,r),this.sessionProperties=i,this.scopedProperties=n}validateChain(e){let[t,r]=e?.split(":")||["",""];if(!this.namespaces||!Object.keys(this.namespaces).length)return[t,r];if(t&&!Object.keys(this.namespaces||{}).map(e=>hC(e)).includes(t))throw Error(`Namespace '${t}' is not configured. Please call connect() first with namespace config.`);if(t&&r)return[t,r];let i=hC(Object.keys(this.namespaces)[0]),n=this.rpcProviders[i].getDefaultChain();return[i,n]}async requestAccounts(){let[e]=this.validateChain();return await this.getProvider(e).requestAccounts()}async onChainChanged({currentCaipChainId:e,previousCaipChainId:t,internal:r=!1}){if(!this.namespaces)return;let[i,n]=this.validateChain(e);n&&(this.updateNamespaceChain(i,n),r?(this.events.emit("chainChanged",n),this.emitAccountsChangedOnChainChange({namespace:i,currentCaipChainId:e,previousCaipChainId:t})):this.getProvider(i).setDefaultChain(n),await this.persist("namespaces",this.namespaces))}emitAccountsChangedOnChainChange({namespace:e,currentCaipChainId:t,previousCaipChainId:r}){var i,n;try{if(r===t)return;let o=null==(n=null==(i=this.session)?void 0:i.namespaces[e])?void 0:n.accounts;if(!o)return;let s=o.filter(e=>e.includes(`${t}:`)).map(yN);if(!hN(s))return;this.events.emit("accountsChanged",s)}catch(e){this.logger.warn(e,"Failed to emit accountsChanged on chain change")}}updateNamespaceChain(e,t){if(!this.namespaces)return;let r=this.namespaces[e]?e:`${e}:${t}`;this.namespaces[r]?this.namespaces[r]&&(this.namespaces[r].defaultChain=t):this.namespaces[r]={chains:[],methods:[],events:[],defaultChain:t}}onConnect(){this.createProviders(),this.events.emit("connect",{session:this.session})}async cleanup(){this.connectParams=void 0,this.namespaces=void 0,this.optionalNamespaces=void 0,this.sessionProperties=void 0,await this.deleteFromStore("namespaces"),await this.deleteFromStore("optionalNamespaces"),await this.deleteFromStore("sessionProperties"),this.session=void 0,this.cleanupPendingPairings({deletePairings:!0}),await this.cleanupStorage()}async persist(e,t){var r;let i=(null==(r=this.session)?void 0:r.topic)||"";await this.client.core.storage.setItem(`${yl}/${e}${i}`,t)}async getFromStore(e){var t;let r=(null==(t=this.session)?void 0:t.topic)||"";return await this.client.core.storage.getItem(`${yl}/${e}${r}`)}async deleteFromStore(e){var t;let r=(null==(t=this.session)?void 0:t.topic)||"";await this.client.core.storage.removeItem(`${yl}/${e}${r}`)}async cleanupStorage(){var e;try{if((null==(e=this.client)?void 0:e.session.length)>0)return;for(let e of(await this.client.core.storage.getKeys()))e.startsWith(yl)&&await this.client.core.storage.removeItem(e)}catch(e){this.logger.warn(e,"Failed to cleanup storage")}}}},13057:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var i=function(e){if(e.length>=255)throw TypeError("Alphabet too long");let t=new Uint8Array(256);for(let e=0;e>>0,c=new Uint8Array(l);for(;o255)return;let n=t[i];if(255===n)return;let s=0;for(let e=l-1;(0!==n||s>>0,c[e]=n%256>>>0,n=n/256>>>0;if(0!==n)throw Error("Non-zero carry");a=s,o++}let d=l-a;for(;d!==l&&0===c[d];)d++;let u=new Uint8Array(s+(l-d)),h=s;for(;d!==l;)u[h++]=c[d++];return u}return{encode:function(t){if(t instanceof Uint8Array||(ArrayBuffer.isView(t)?t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Array.isArray(t)&&(t=Uint8Array.from(t))),!(t instanceof Uint8Array))throw TypeError("Expected Uint8Array");if(0===t.length)return"";let n=0,s=0,a=0,l=t.length;for(;a!==l&&0===t[a];)a++,n++;let c=(l-a)*o+1>>>0,d=new Uint8Array(c);for(;a!==l;){let e=t[a],i=0;for(let t=c-1;(0!==e||i>>0,d[t]=e%r>>>0,e=e/r>>>0;if(0!==e)throw Error("Non-zero carry");s=i,a++}let u=c-s;for(;u!==c&&0===d[u];)u++;let h=i.repeat(n);for(;u{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>r(e.error)})}function o(e,t){let r=indexedDB.open(e);r.onupgradeneeded=()=>r.result.createObjectStore(t);let i=n(r);return(e,r)=>i.then(i=>r(i.transaction(t,e).objectStore(t)))}function s(){return i||(i=o("keyval-store","keyval")),i}function a(e,t=s()){return t("readonly",t=>n(t.get(e)))}function l(e,t,r=s()){return r("readwrite",r=>(r.put(t,e),n(r.transaction)))}function c(e,t=s()){return t("readwrite",t=>(t.delete(e),n(t.transaction)))}function d(e=s()){return e("readwrite",e=>(e.clear(),n(e.transaction)))}function u(e=s()){return e("readonly",e=>{var t;if(e.getAllKeys)return n(e.getAllKeys());let r=[];return(t=e=>r.push(e.key),e.openCursor().onsuccess=function(){this.result&&(t(this.result),this.result.continue())},n(e.transaction)).then(()=>r)})}r.d(t,{IV:function(){return c},MT:function(){return o},U2:function(){return a},XP:function(){return u},ZH:function(){return d},t8:function(){return l}})},42216:function(e,t,r){"use strict";r.d(t,{XM:function(){return n},Xe:function(){return o},pX:function(){return i}});let i={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},n=e=>(...t)=>({_$litDirective$:e,values:t});class o{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,t,r){this._$Ct=e,this._$AM=t,this._$Ci=r}_$AS(e,t){return this.update(e,t)}update(e,t){return this.render(...t)}}},81997:function(e,t,r){"use strict";r.d(t,{Jb:function(){return I},Ld:function(){return N},YP:function(){return A},_$LH:function(){return W},cV:function(){return S},dy:function(){return _},sY:function(){return H}});let i=globalThis,n=i.trustedTypes,o=n?n.createPolicy("lit-html",{createHTML:e=>e}):void 0,s="$lit$",a=`lit$${Math.random().toFixed(9).slice(2)}$`,l="?"+a,c=`<${l}>`,d=document,u=()=>d.createComment(""),h=e=>null===e||"object"!=typeof e&&"function"!=typeof e,p=Array.isArray,f=e=>p(e)||"function"==typeof e?.[Symbol.iterator],g="[ \n\f\r]",m=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,y=/-->/g,w=/>/g,b=RegExp(`>|${g}(?:([^\\s"'>=/]+)(${g}*=${g}*(?:[^ +\f\r"'\`<>=]|("|')|))|$)`,"g"),v=/'/g,C=/"/g,E=/^(?:script|style|textarea|title)$/i,x=e=>(t,...r)=>({_$litType$:e,strings:t,values:r}),_=x(1),A=x(2),S=x(3),I=Symbol.for("lit-noChange"),N=Symbol.for("lit-nothing"),k=new WeakMap,R=d.createTreeWalker(d,129);function O(e,t){if(!p(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==o?o.createHTML(t):t}let T=(e,t)=>{let r=e.length-1,i=[],n,o=2===t?"":3===t?"":"",l=m;for(let t=0;t"===u[0]?(l=n??m,h=-1):void 0===u[1]?h=-2:(h=l.lastIndex-u[2].length,d=u[1],l=void 0===u[3]?b:'"'===u[3]?C:v):l===C||l===v?l=b:l===y||l===w?l=m:(l=b,n=void 0);let f=l===b&&e[t+1].startsWith("/>")?" ":"";o+=l===m?r+c:h>=0?(i.push(d),r.slice(0,h)+s+r.slice(h)+a+f):r+a+(-2===h?t:f)}return[O(e,o+(e[r]||"")+(2===t?"":3===t?"":"")),i]};class P{constructor({strings:e,_$litType$:t},r){let i;this.parts=[];let o=0,c=0,d=e.length-1,h=this.parts,[p,f]=T(e,t);if(this.el=P.createElement(p,r),R.currentNode=this.el.content,2===t||3===t){let e=this.el.content.firstChild;e.replaceWith(...e.childNodes)}for(;null!==(i=R.nextNode())&&h.length0){i.textContent=n?n.emptyScript:"";for(let r=0;r2||""!==r[0]||""!==r[1]?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=N}_$AI(e,t=this,r,i){let n=this.strings,o=!1;if(void 0===n)(o=!h(e=$(this,e,t,0))||e!==this._$AH&&e!==I)&&(this._$AH=e);else{let i,s;let a=e;for(e=n[0],i=0;i{let i=r?.renderBefore??t,n=i._$litPart$;if(void 0===n){let e=r?.renderBefore??null;i._$litPart$=n=new U(t.insertBefore(u(),e),e,void 0,r??{})}return n._$AI(e),n}},84927:function(e,t,r){"use strict";r.d(t,{Cb:function(){return i.C},SB:function(){return n.S}});var i=r(82500),n=r(704)},89906:function(e,t,r){"use strict";r.d(t,{$:function(){return o}});var i=r(81997),n=r(42216);let o=(0,n.XM)(class extends n.Xe{constructor(e){if(super(e),e.type!==n.pX.ATTRIBUTE||"class"!==e.name||e.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter(t=>e[t]).join(" ")+" "}update(e,[t]){if(void 0===this.st){for(let r in this.st=new Set,void 0!==e.strings&&(this.nt=new Set(e.strings.join(" ").split(/\s/).filter(e=>""!==e))),t)t[r]&&!this.nt?.has(r)&&this.st.add(r);return this.render(t)}let r=e.element.classList;for(let e of this.st)e in t||(r.remove(e),this.st.delete(e));for(let e in t){let i=!!t[e];i===this.st.has(e)||this.nt?.has(e)||(i?(r.add(e),this.st.add(e)):(r.remove(e),this.st.delete(e)))}return i.Jb}})},32801:function(e,t,r){"use strict";r.d(t,{o:function(){return n}});var i=r(81997);let n=e=>e??i.Ld},7226:function(e,t,r){"use strict";r.d(t,{V:function(){return f},i:function(){return y}});var i=r(81997);let{I:n}=i._$LH,o=e=>void 0===e.strings;var s=r(42216);let a=(e,t)=>{let r=e._$AN;if(void 0===r)return!1;for(let e of r)e._$AO?.(t,!1),a(e,t);return!0},l=e=>{let t,r;do{if(void 0===(t=e._$AM))break;(r=t._$AN).delete(e),e=t}while(0===r?.size)},c=e=>{for(let t;t=e._$AM;e=t){let r=t._$AN;if(void 0===r)t._$AN=r=new Set;else if(r.has(e))break;r.add(e),h(t)}};function d(e){void 0!==this._$AN?(l(this),this._$AM=e,c(this)):this._$AM=e}function u(e,t=!1,r=0){let i=this._$AH,n=this._$AN;if(void 0!==n&&0!==n.size){if(t){if(Array.isArray(i))for(let e=r;e{e.type==s.pX.CHILD&&(e._$AP??=u,e._$AQ??=d)};class p extends s.Xe{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,r){super._$AT(e,t,r),c(this),this.isConnected=e._$AU}_$AO(e,t=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),t&&(a(this,e),l(this))}setValue(e){if(o(this._$Ct))this._$Ct._$AI(e,this);else{let t=[...this._$Ct._$AH];t[this._$Ci]=e,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}}let f=()=>new g;class g{}let m=new WeakMap,y=(0,s.XM)(class extends p{render(e){return i.Ld}update(e,[t]){let r=t!==this.G;return r&&void 0!==this.G&&this.rt(void 0),(r||this.lt!==this.ct)&&(this.G=t,this.ht=e.options?.host,this.rt(this.ct=e.element)),i.Ld}rt(e){if(this.isConnected||(e=void 0),"function"==typeof this.G){let t=this.ht??globalThis,r=m.get(t);void 0===r&&(r=new WeakMap,m.set(t,r)),void 0!==r.get(this.G)&&this.G.call(this.ht,void 0),r.set(this.G,e),void 0!==e&&this.G.call(this.ht,e)}else this.G.value=e}get lt(){return"function"==typeof this.G?m.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}})},31133:function(e,t,r){"use strict";r.d(t,{oi:function(){return s},iv:function(){return i.iv},dy:function(){return n.dy},YP:function(){return n.YP},$m:function(){return i.$m}});var i=r(93511),n=r(81997);let o=globalThis;class s extends i.fl{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=(0,n.sY)(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return n.Jb}}s._$litElement$=!0,s.finalized=!0,o.litElementHydrateSupport?.({LitElement:s});let a=o.litElementPolyfillSupport;a?.({LitElement:s}),(o.litElementVersions??=[]).push("4.2.1")},69887:function(e,t,r){"use strict";r.d(t,{sj:function(){return I},iH:function(){return R},CO:function(){return k},Ld:function(){return N},WX:function(){return O}});let i=Symbol(),n=Symbol(),o=(e,t)=>new Proxy(e,t),s=Object.getPrototypeOf,a=new WeakMap,l=e=>e&&(a.has(e)?a.get(e):s(e)===Object.prototype||s(e)===Array.prototype),c=e=>Object.values(Object.getOwnPropertyDescriptors(e)).some(e=>!e.configurable&&!e.writable),d=e=>{if(Array.isArray(e))return Array.from(e);let t=Object.getOwnPropertyDescriptors(e);return Object.values(t).forEach(e=>{e.configurable=!0}),Object.create(s(e),t)},u=(e,t)=>{let r={f:t},o=!1,s=(t,i)=>{if(!o){let n=r.a.get(e);if(n||(n={},r.a.set(e,n)),"w"===t)n.w=!0;else{let e=n[t];e||(e=new Set,n[t]=e),e.add(i)}}},a=()=>{o=!0,r.a.delete(e)},l={get:(t,i)=>i===n?e:(s("k",i),p(Reflect.get(t,i),r.a,r.c,r.t)),has:(e,t)=>t===i?(a(),!0):(s("h",t),Reflect.has(e,t)),getOwnPropertyDescriptor:(e,t)=>(s("o",t),Reflect.getOwnPropertyDescriptor(e,t)),ownKeys:e=>(s("w"),Reflect.ownKeys(e))};return t&&(l.set=l.deleteProperty=()=>!1),[l,r]},h=e=>e[n]||e,p=(e,t,r,i)=>{if(!l(e))return e;let n=i&&i.get(e);if(!n){let t=h(e);n=c(t)?[t,d(t)]:[t],null==i||i.set(e,n)}let[s,a]=n,p=r&&r.get(s);return(!p||!!a!==p[1].f)&&((p=u(s,!!a))[1].p=o(a||s,p[0]),r&&r.set(s,p)),p[1].a=t,p[1].c=r,p[1].t=i,p[1].p},f=e=>l(e)&&e[n]||null,g=(e,t=!0)=>{a.set(e,t)},m=e=>"object"==typeof e&&null!==e,y=(e,t)=>{let r=v.get(e);if((null==r?void 0:r[0])===t)return r[1];let i=Array.isArray(e)?[]:Object.create(Object.getPrototypeOf(e));return g(i,!0),v.set(e,[t,i]),Reflect.ownKeys(e).forEach(t=>{if(Object.getOwnPropertyDescriptor(i,t))return;let r=Reflect.get(e,t),{enumerable:n}=Reflect.getOwnPropertyDescriptor(e,t),o={value:r,enumerable:n,configurable:!0};if(b.has(r))g(r,!1);else if(w.has(r)){let[e,t]=w.get(r);o.value=y(e,t())}Object.defineProperty(i,t,o)}),Object.preventExtensions(i)},w=new WeakMap,b=new WeakSet,v=new WeakMap,C=[1],E=new WeakMap,x=Object.is,_=(e,t)=>new Proxy(e,t),A=e=>m(e)&&!b.has(e)&&(Array.isArray(e)||!(Symbol.iterator in e))&&!(e instanceof WeakMap)&&!(e instanceof WeakSet)&&!(e instanceof Error)&&!(e instanceof Number)&&!(e instanceof Date)&&!(e instanceof String)&&!(e instanceof RegExp)&&!(e instanceof ArrayBuffer)&&!(e instanceof Promise),S=(e,t,r,i)=>({deleteProperty(e,t){let n=Reflect.get(e,t);r(t);let o=Reflect.deleteProperty(e,t);return o&&i(["delete",[t],n]),o},set(n,o,s,a){let l=!e()&&Reflect.has(n,o),c=Reflect.get(n,o,a);if(l&&(x(c,s)||E.has(s)&&x(c,E.get(s))))return!0;r(o),m(s)&&(s=f(s)||s);let d=!w.has(s)&&A(s)?I(s):s;return t(o,d),Reflect.set(n,o,d,a),i(["set",[o],s,c]),!0}});function I(e={}){if(!m(e))throw Error("object required");let t=E.get(e);if(t)return t;let r=C[0],i=new Set,n=(e,t=++C[0])=>{r!==t&&(o=r=t,i.forEach(r=>r(e,t)))},o=r,s=e=>(t,r)=>{let i=[...t];i[1]=[e,...i[1]],n(i,r)},a=new Map,l=!0,c=_(e,S(()=>l,(e,t)=>{let r=!b.has(t)&&w.get(t);if(r){if(a.has(e))throw Error("prop listener already exists");if(i.size){let t=r[2](s(e));a.set(e,[r,t])}else a.set(e,[r])}},e=>{var t;let r=a.get(e);r&&(a.delete(e),null==(t=r[1])||t.call(r))},n));E.set(e,c);let d=[e,(e=C[0])=>(o!==e&&(o=e,a.forEach(([t])=>{let i=t[1](e);i>r&&(r=i)})),r),e=>(i.add(e),1===i.size&&a.forEach(([e,t],r)=>{if(t)throw Error("remove already exists");let i=e[2](s(r));a.set(r,[e,i])}),()=>{i.delete(e),0===i.size&&a.forEach(([e,t],r)=>{t&&(t(),a.set(r,[e]))})})];return w.set(c,d),Reflect.ownKeys(e).forEach(t=>{let r=Object.getOwnPropertyDescriptor(e,t);"value"in r&&r.writable&&(c[t]=e[t])}),l=!1,c}function N(e,t,r){let i;let n=w.get(e);n||console.warn("Please use proxy object");let o=[],s=n[2],a=!1,l=s(e=>{if(o.push(e),r){t(o.splice(0));return}i||(i=Promise.resolve().then(()=>{i=void 0,a&&t(o.splice(0))}))});return a=!0,()=>{a=!1,l()}}function k(e){let t=w.get(e);t||console.warn("Please use proxy object");let[r,i]=t;return y(r,i())}function R(e){return b.add(e),e}function O(){return{proxyStateMap:w,refSet:b,snapCache:v,versionHolder:C,proxyCache:E}}},55543:function(e,t,r){"use strict";r.d(t,{VW:function(){return n},Yr:function(){return l}});var i=r(69887);function n(e,t,r,n){let o=e[t];return(0,i.Ld)(e,()=>{let i=e[t];Object.is(o,i)||r(o=i)},n)}Symbol();let{proxyStateMap:o,snapCache:s}=(0,i.WX)(),a=e=>o.has(e);function l(e){let t=[],r=0,n=new Map,o=new WeakMap,l=()=>{let e=s.get(d),t=null==e?void 0:e[1];if(t&&!o.has(t)){let e=new Map(n);o.set(t,e)}},c=e=>o.get(e)||n;if(e){if("function"!=typeof e[Symbol.iterator])throw TypeError("proxyMap:\n initial state must be iterable\n tip: structure should be [[key, value]]");for(let[i,o]of e)n.set(i,r),t[r++]=o}let d={data:t,index:r,epoch:0,get size(){return a(this)||l(),c(this).size},get(e){let t=c(this).get(e);if(void 0===t){this.epoch;return}return this.data[t]},has(e){let t=c(this);return this.epoch,t.has(e)},set(e,t){if(!a(this))throw Error("Cannot perform mutations on a snapshot");let r=n.get(e);return void 0===r?(n.set(e,this.index),this.data[this.index++]=t):this.data[r]=t,this.epoch++,this},delete(e){if(!a(this))throw Error("Cannot perform mutations on a snapshot");let t=n.get(e);return void 0!==t&&(delete this.data[t],n.delete(e),this.epoch++,!0)},clear(){if(!a(this))throw Error("Cannot perform mutations on a snapshot");this.data.length=0,this.index=0,this.epoch++,n.clear()},forEach(e){this.epoch,c(this).forEach((t,r)=>{e(this.data[t],r,this)})},*entries(){for(let[e,t]of(this.epoch,c(this)))yield[e,this.data[t]]},*keys(){for(let e of(this.epoch,c(this).keys()))yield e},*values(){for(let e of(this.epoch,c(this).values()))yield this.data[e]},[Symbol.iterator](){return this.entries()},get[Symbol.toStringTag](){return"Map"},toJSON(){return new Map(this.entries())}},u=(0,i.sj)(d);return Object.defineProperties(u,{size:{enumerable:!1},index:{enumerable:!1},epoch:{enumerable:!1},data:{enumerable:!1},toJSON:{enumerable:!1}}),Object.seal(u),u}let{proxyStateMap:c,snapCache:d}=(0,i.WX)()},85784:function(e,t,r){"use strict";r.d(t,{i:function(){return I}});var i=r(17467);async function n(e,t){return BigInt(await e.request({method:"eth_gasPrice",params:[t]}))}async function o(e,t){return BigInt(await e.request({method:"eth_maxPriorityFeePerGas",params:[t]}))}var s=r(72932),a=r(59069),l=r(27481),c=r(92614),d=r(36826);function u(e){return 0===e||0n===e||null==e||"0"===e||""===e||"string"==typeof e&&("0x"===(0,d.f)(e).toLowerCase()||"0x00"===(0,d.f)(e).toLowerCase())}function h(e){return"cip64"===e.type||void 0!==e.maxFeePerGas&&void 0!==e.maxPriorityFeePerGas&&!u(e.feeCurrency)}let p={block:(0,a.G)({format:e=>({transactions:e.transactions?.map(e=>"string"==typeof e?e:{...l.Tr(e),...e.gatewayFee?{gatewayFee:s.y_(e.gatewayFee),gatewayFeeRecipient:e.gatewayFeeRecipient}:{},feeCurrency:e.feeCurrency})})}),transaction:(0,l.y_)({format(e){if("0x7e"===e.type)return{isSystemTx:e.isSystemTx,mint:e.mint?(0,s.y_)(e.mint):void 0,sourceHash:e.sourceHash,type:"deposit"};let t={feeCurrency:e.feeCurrency};return"0x7b"===e.type?t.type="cip64":("0x7c"===e.type&&(t.type="cip42"),t.gatewayFee=e.gatewayFee?(0,s.y_)(e.gatewayFee):null,t.gatewayFeeRecipient=e.gatewayFeeRecipient),t}}),transactionRequest:(0,c.iy)({format(e){let t={};return e.feeCurrency&&(t.feeCurrency=e.feeCurrency),h(e)&&(t.type="0x7b"),t}})};var f=r(75018),g=r(10052),m=r(81544),y=r(35586),w=r(78125),b=r(81273),v=r(4012),C=r(89256),E=r(59455),x=r(70044),_=r(14791),A=r(81723);let S=f.zL,I={blockTime:1e3,contracts:i.r,formatters:p,serializers:{transaction:function(e,t){return h(e)?function(e,t){!function(e){let{chainId:t,maxPriorityFeePerGas:r,gasPrice:i,maxFeePerGas:n,to:o,feeCurrency:s}=e;if(t<=0)throw new y.hJ({chainId:t});if(o&&!(0,v.U)(o))throw new g.b({address:o});if(i)throw new m.G("`gasPrice` is not a valid CIP-64 Transaction attribute.");if(!u(n)&&n>S)throw new w.Hh({maxFeePerGas:n});if(!u(r)&&!u(n)&&r>n)throw new w.cs({maxFeePerGas:n,maxPriorityFeePerGas:r});if(!u(s)&&!(0,v.U)(s))throw new m.G("`feeCurrency` MUST be a token address for CIP-64 transactions.");if(u(s))throw new m.G("`feeCurrency` must be provided for CIP-64 transactions.")}(e);let{chainId:r,gas:i,nonce:n,to:o,value:s,maxFeePerGas:a,maxPriorityFeePerGas:l,accessList:c,feeCurrency:d,data:h}=e,p=[(0,E.NC)(r),n?(0,E.NC)(n):"0x",l?(0,E.NC)(l):"0x",a?(0,E.NC)(a):"0x",i?(0,E.NC)(i):"0x",o??"0x",s?(0,E.NC)(s):"0x",h??"0x",(0,_.g)(c),d,...(0,A.d)(e,t)];return(0,C.SM)(["0x7b",(0,x.LV)(p)])}(e,t):(0,b.DO)(e,t)}},fees:{estimateFeesPerGas:async e=>{if(!e.request?.feeCurrency)return null;let[t,r]=await Promise.all([n(e.client,e.request.feeCurrency),o(e.client,e.request.feeCurrency)]);return{maxFeePerGas:e.multiply(t-r)+r,maxPriorityFeePerGas:r}}}}},51702:function(e,t,r){"use strict";r.d(t,{D:function(){return n}});var i=r(85784);let n=(0,r(90328).a)({...i.i,id:42220,name:"Celo",nativeCurrency:{decimals:18,name:"CELO",symbol:"CELO"},rpcUrls:{default:{http:["https://forno.celo.org"]}},blockExplorers:{default:{name:"Celo Explorer",url:"https://celoscan.io",apiUrl:"https://api.celoscan.io/api"}},contracts:{multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:13112599}},testnet:!1})},50250:function(e,t,r){"use strict";r.d(t,{$:function(){return n}});var i=r(85784);let n=(0,r(90328).a)({...i.i,id:44787,name:"Alfajores",nativeCurrency:{decimals:18,name:"CELO",symbol:"A-CELO"},rpcUrls:{default:{http:["https://alfajores-forno.celo-testnet.org"]}},blockExplorers:{default:{name:"Celo Alfajores Explorer",url:"https://celo-alfajores.blockscout.com",apiUrl:"https://celo-alfajores.blockscout.com/api"}},contracts:{...i.i.contracts,multicall3:{address:"0xcA11bde05977b3631167028862bE2a173976CA11",blockCreated:14569001},portal:{17e3:{address:"0x82527353927d8D069b3B452904c942dA149BA381",blockCreated:2411324}},disputeGameFactory:{17e3:{address:"0xE28AAdcd9883746c0e5068F58f9ea06027b214cb",blockCreated:2411324}},l2OutputOracle:{17e3:{address:"0x4a2635e9e4f6e45817b1D402ac4904c1d1752438",blockCreated:2411324}},l1StandardBridge:{17e3:{address:"0xD1B0E0581973c9eB7f886967A606b9441A897037",blockCreated:2411324}}},testnet:!0})},79516:function(e,t,r){"use strict";r.d(t,{d:function(){return u}});var i=r(17057),n=r(81544);class o extends n.G{constructor(){super("No URL was provided to the Transport. Please provide a valid RPC URL to the Transport.",{docsPath:"/docs/clients/intro",name:"UrlRequiredError"})}}var s=r(43226),a=r(39504),l=r(31853);let c={current:0,take(){return this.current++},reset(){this.current=0}};var d=r(24250);function u(e,t={}){let{batch:r,fetchFn:n,fetchOptions:u,key:h="http",methods:p,name:f="HTTP JSON-RPC",onFetchRequest:g,onFetchResponse:m,retryDelay:y,raw:w}=t;return({chain:b,retryCount:v,timeout:C})=>{let{batchSize:E=1e3,wait:x=0}="object"==typeof r?r:{},_=t.retryCount??v,A=C??t.timeout??1e4,S=e||b?.rpcUrls.default.http[0];if(!S)throw new o;let I=function(e,t={}){return{async request(r){let{body:n,fetchFn:o=t.fetchFn??fetch,onRequest:s=t.onRequest,onResponse:d=t.onResponse,timeout:u=t.timeout??1e4}=r,h={...t.fetchOptions??{},...r.fetchOptions??{}},{headers:p,method:f,signal:g}=h;try{let t;let r=await (0,a.F)(async({signal:t})=>{let r={...h,body:Array.isArray(n)?(0,l.P)(n.map(e=>({jsonrpc:"2.0",id:e.id??c.take(),...e}))):(0,l.P)({jsonrpc:"2.0",id:n.id??c.take(),...n}),headers:{"Content-Type":"application/json",...p},method:f||"POST",signal:g||(u>0?t:null)},i=new Request(e,r),a=await s?.(i,r)??{...r,url:e};return await o(a.url??e,a)},{errorInstance:new i.W5({body:n,url:e}),timeout:u,signal:!0});if(d&&await d(r),r.headers.get("Content-Type")?.startsWith("application/json"))t=await r.json();else{t=await r.text();try{t=JSON.parse(t||"{}")}catch(e){if(r.ok)throw e;t={error:t}}}if(!r.ok)throw new i.Gg({body:n,details:(0,l.P)(t.error)||r.statusText,headers:r.headers,status:r.status,url:e});return t}catch(t){if(t instanceof i.Gg||t instanceof i.W5)throw t;throw new i.Gg({body:n,cause:t,url:e})}}}}(S,{fetchFn:n,fetchOptions:u,onRequest:g,onResponse:m,timeout:A});return(0,d.q)({key:h,methods:p,name:f,async request({method:e,params:t}){let n={method:e,params:t},{schedule:o}=(0,s.S)({id:S,wait:x,shouldSplitBatch:e=>e.length>E,fn:e=>I.request({body:e}),sort:(e,t)=>e.id-t.id}),a=async e=>r?o(e):[await I.request({body:e})],[{error:l,result:c}]=await a(n);if(w)return{error:l,result:c};if(l)throw new i.bs({body:n,error:l,url:S});return c},retryCount:_,retryDelay:y,timeout:A,type:"http"},{fetchOptions:u,url:S})}}},17467:function(e,t,r){"use strict";r.d(t,{r:function(){return i}});let i={gasPriceOracle:{address:"0x420000000000000000000000000000000000000F"},l1Block:{address:"0x4200000000000000000000000000000000000015"},l2CrossDomainMessenger:{address:"0x4200000000000000000000000000000000000007"},l2Erc721Bridge:{address:"0x4200000000000000000000000000000000000014"},l2StandardBridge:{address:"0x4200000000000000000000000000000000000010"},l2ToL1MessagePasser:{address:"0x4200000000000000000000000000000000000016"}}},81273:function(e,t,r){"use strict";r.d(t,{DO:function(){return c},fE:function(){return d}});var i=r(10052),n=r(4012),o=r(89256),s=r(59455),a=r(70044),l=r(81723);function c(e,t){return"deposit"===e.type||void 0!==e.sourceHash?function(e){!function(e){let{from:t,to:r}=e;if(t&&!(0,n.U)(t))throw new i.b({address:t});if(r&&!(0,n.U)(r))throw new i.b({address:r})}(e);let{sourceHash:t,data:r,from:l,gas:c,isSystemTx:d,mint:u,to:h,value:p}=e,f=[t,l,h??"0x",u?(0,s.NC)(u):"0x",p?(0,s.NC)(p):"0x",c?(0,s.NC)(c):"0x",d?"0x1":"0x",r??"0x"];return(0,o.SM)(["0x7e",(0,a.LV)(f)])}(e):(0,l.D)(e,t)}let d={transaction:c}},90328:function(e,t,r){"use strict";function i(e){return{formatters:void 0,fees:void 0,serializers:void 0,...e}}r.d(t,{a:function(){return i}})},39504:function(e,t,r){"use strict";function i(e,{errorInstance:t=Error("timed out"),timeout:r,signal:i}){return new Promise((n,o)=>{(async()=>{let s;try{let a=new AbortController;r>0&&(s=setTimeout(()=>{i?a.abort():o(t)},r)),n(await e({signal:a?.signal||null}))}catch(e){e?.name==="AbortError"&&o(t),o(e)}finally{clearTimeout(s)}})()})}r.d(t,{F:function(){return i}})},14791:function(e,t,r){"use strict";r.d(t,{g:function(){return s}});var i=r(10052),n=r(63228),o=r(4012);function s(e){if(!e||0===e.length)return[];let t=[];for(let r=0;rp.zL)throw new w.Hh({maxFeePerGas:i});if(r&&i&&r>i)throw new w.cs({maxFeePerGas:i,maxPriorityFeePerGas:r})}var _=r(90683),A=r(14791);function S(e,t){let r=(0,_.l)(e);return"eip1559"===r?function(e,t){let{chainId:r,gas:i,nonce:o,to:s,value:a,maxFeePerGas:l,maxPriorityFeePerGas:d,accessList:h,data:p}=e;x(e);let f=(0,A.g)(h),g=[(0,n.eC)(r),o?(0,n.eC)(o):"0x",d?(0,n.eC)(d):"0x",l?(0,n.eC)(l):"0x",i?(0,n.eC)(i):"0x",s??"0x",a?(0,n.eC)(a):"0x",p??"0x",f,...I(e,t)];return(0,c.SM)(["0x02",(0,u.LV)(g)])}(e,t):"eip2930"===r?function(e,t){let{chainId:r,gas:i,data:o,nonce:s,to:a,value:l,accessList:d,gasPrice:h}=e;!function(e){let{chainId:t,maxPriorityFeePerGas:r,gasPrice:i,maxFeePerGas:n,to:o}=e;if(t<=0)throw new y.hJ({chainId:t});if(o&&!(0,b.U)(o))throw new f.b({address:o});if(r||n)throw new g.G("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");if(i&&i>p.zL)throw new w.Hh({maxFeePerGas:i})}(e);let m=(0,A.g)(d),v=[(0,n.eC)(r),s?(0,n.eC)(s):"0x",h?(0,n.eC)(h):"0x",i?(0,n.eC)(i):"0x",a??"0x",l?(0,n.eC)(l):"0x",o??"0x",m,...I(e,t)];return(0,c.SM)(["0x01",(0,u.LV)(v)])}(e,t):"eip4844"===r?function(e,t){let{chainId:r,gas:i,nonce:d,to:p,value:f,maxFeePerBlobGas:g,maxFeePerGas:y,maxPriorityFeePerGas:w,accessList:b,data:_}=e;!function(e){let{blobVersionedHashes:t}=e;if(t){if(0===t.length)throw new m.RX;for(let e of t){let t=(0,v.d)(e),r=(0,E.ly)((0,C.tP)(e,0,1));if(32!==t)throw new m.xd({hash:e,size:t});if(r!==h.l)throw new m.cJ({hash:e,version:r})}}x(e)}(e);let S=e.blobVersionedHashes,N=e.sidecars;if(e.blobs&&(void 0===S||void 0===N)){let t="string"==typeof e.blobs[0]?e.blobs:e.blobs.map(e=>(0,n.ci)(e)),r=e.kzg,i=(0,o.P)({blobs:t,kzg:r});if(void 0===S&&(S=(0,a.C)({commitments:i})),void 0===N){let e=(0,s.y)({blobs:t,commitments:i,kzg:r});N=(0,l.j)({blobs:t,commitments:i,proofs:e})}}let k=(0,A.g)(b),R=[(0,n.eC)(r),d?(0,n.eC)(d):"0x",w?(0,n.eC)(w):"0x",y?(0,n.eC)(y):"0x",i?(0,n.eC)(i):"0x",p??"0x",f?(0,n.eC)(f):"0x",_??"0x",k,g?(0,n.eC)(g):"0x",S??[],...I(e,t)],O=[],T=[],P=[];if(N)for(let e=0;ep.zL)throw new w.Hh({maxFeePerGas:i})}(e);let m=[a?(0,n.eC)(a):"0x",h?(0,n.eC)(h):"0x",o?(0,n.eC)(o):"0x",l??"0x",c?(0,n.eC)(c):"0x",s??"0x"];if(t){let e=(()=>{if(t.v>=35n)return(t.v-35n)/2n>0?t.v:27n+(35n===t.v?0n:1n);if(r>0)return BigInt(2*r)+BigInt(35n+t.v-27n);let e=27n+(27n===t.v?0n:1n);if(t.v!==e)throw new i.vl({v:t.v});return e})(),o=(0,d.f)(t.r),s=(0,d.f)(t.s);m=[...m,(0,n.eC)(e),"0x00"===o?"0x":o,"0x00"===s?"0x":s]}else r>0&&(m=[...m,(0,n.eC)(r),"0x","0x"]);return(0,u.LV)(m)}(e,t)}function I(e,t){let r=t??e,{v:i,yParity:o}=r;if(void 0===r.r||void 0===r.s||void 0===i&&void 0===o)return[];let s=(0,d.f)(r.r),a=(0,d.f)(r.s);return["number"==typeof o?o?(0,n.eC)(1):"0x":0n===i?"0x":1n===i?(0,n.eC)(1):27n===i?"0x":(0,n.eC)(1),"0x00"===s?"0x":s,"0x00"===a?"0x":a]}}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/8406.3b5b9d57e237e264.js b/frontend/.next/static/chunks/8406.3b5b9d57e237e264.js new file mode 100644 index 0000000..67f1c2a --- /dev/null +++ b/frontend/.next/static/chunks/8406.3b5b9d57e237e264.js @@ -0,0 +1,14 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8406],{98406:function(t,a,e){e.r(a),e.d(a,{PhSignOut:function(){return c}}),e(31498);var r=e(38157),h=e(48567),i=e(54910),l=e(69709),o=e(78313),s=Object.defineProperty,p=Object.getOwnPropertyDescriptor,n=(t,a,e,r)=>{for(var h,i=r>1?void 0:r?p(a,e):a,l=t.length-1;l>=0;l--)(h=t[l])&&(i=(r?h(a,e,i):h(i))||i);return r&&i&&s(a,e,i),i};let c=class extends h.oi{constructor(){super(...arguments),this.size="1em",this.weight="regular",this.color="currentColor",this.mirrored=!1}render(){var t;return(0,r.dy)` + ${c.weightsMap.get(null!=(t=this.weight)?t:"regular")} + `}};c.weightsMap=new Map([["thin",(0,r.YP)``],["light",(0,r.YP)``],["regular",(0,r.YP)``],["bold",(0,r.YP)``],["fill",(0,r.YP)``],["duotone",(0,r.YP)``]]),c.styles=(0,o.iv)` + :host { + display: contents; + } + `,n([(0,l.C)({type:String,reflect:!0})],c.prototype,"size",2),n([(0,l.C)({type:String,reflect:!0})],c.prototype,"weight",2),n([(0,l.C)({type:String,reflect:!0})],c.prototype,"color",2),n([(0,l.C)({type:Boolean,reflect:!0})],c.prototype,"mirrored",2),c=n([(0,i.M)("ph-sign-out")],c)}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/8426.3f6fba98a8b37036.js b/frontend/.next/static/chunks/8426.3f6fba98a8b37036.js new file mode 100644 index 0000000..2161cfe --- /dev/null +++ b/frontend/.next/static/chunks/8426.3f6fba98a8b37036.js @@ -0,0 +1,14 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8426],{18426:function(t,e,a){a.r(e),a.d(e,{PhDesktop:function(){return V}}),a(31498);var r=a(38157),h=a(48567),o=a(54910),H=a(69709),i=a(78313),s=Object.defineProperty,p=Object.getOwnPropertyDescriptor,l=(t,e,a,r)=>{for(var h,o=r>1?void 0:r?p(e,a):e,H=t.length-1;H>=0;H--)(h=t[H])&&(o=(r?h(e,a,o):h(o))||o);return r&&o&&s(e,a,o),o};let V=class extends h.oi{constructor(){super(...arguments),this.size="1em",this.weight="regular",this.color="currentColor",this.mirrored=!1}render(){var t;return(0,r.dy)` + ${V.weightsMap.get(null!=(t=this.weight)?t:"regular")} + `}};V.weightsMap=new Map([["thin",(0,r.YP)``],["light",(0,r.YP)``],["regular",(0,r.YP)``],["bold",(0,r.YP)``],["fill",(0,r.YP)``],["duotone",(0,r.YP)``]]),V.styles=(0,i.iv)` + :host { + display: contents; + } + `,l([(0,H.C)({type:String,reflect:!0})],V.prototype,"size",2),l([(0,H.C)({type:String,reflect:!0})],V.prototype,"weight",2),l([(0,H.C)({type:String,reflect:!0})],V.prototype,"color",2),l([(0,H.C)({type:Boolean,reflect:!0})],V.prototype,"mirrored",2),V=l([(0,o.M)("ph-desktop")],V)}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/846-581a3df87add5941.js b/frontend/.next/static/chunks/846-581a3df87add5941.js new file mode 100644 index 0000000..9cc08b9 --- /dev/null +++ b/frontend/.next/static/chunks/846-581a3df87add5941.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[846],{10846:function(t,e,r){r.d(e,{secp256k1:function(){return tA}});var n=r(10058),i=r(61714);class o extends i.kb{constructor(t,e){super(),this.finished=!1,this.destroyed=!1,(0,i.z3)(t);let r=(0,i.O0)(e);if(this.iHash=t.create(),"function"!=typeof this.iHash.update)throw Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let n=this.blockLen,o=new Uint8Array(n);o.set(r.length>n?t.create().update(r).digest():r);for(let t=0;tnew o(t,e).update(r).digest();l.create=(t,e)=>new o(t,e);let f=BigInt(0),s=BigInt(1);function a(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&"Uint8Array"===t.constructor.name}function u(t){if(!a(t))throw Error("Uint8Array expected")}function d(t,e){if("boolean"!=typeof e)throw Error(t+" boolean expected, got "+e)}function h(t){let e=t.toString(16);return 1&e.length?"0"+e:e}function c(t){if("string"!=typeof t)throw Error("hex string expected, got "+typeof t);return""===t?f:BigInt("0x"+t)}let g="function"==typeof Uint8Array.from([]).toHex&&"function"==typeof Uint8Array.fromHex,p=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function y(t){if(u(t),g)return t.toHex();let e="";for(let r=0;r=m._0&&t<=m._9?t-m._0:t>=m.A&&t<=m.F?t-(m.A-10):t>=m.a&&t<=m.f?t-(m.a-10):void 0}function E(t){if("string"!=typeof t)throw Error("hex string expected, got "+typeof t);if(g)return Uint8Array.fromHex(t);let e=t.length,r=e/2;if(e%2)throw Error("hex string expected, got unpadded hex of length "+e);let n=new Uint8Array(r);for(let e=0,i=0;e"bigint"==typeof t&&f<=t;function I(t,e,r){return O(t)&&O(e)&&O(r)&&e<=t&&t(s<new Uint8Array(t),H=t=>Uint8Array.from(t),z={bigint:t=>"bigint"==typeof t,function:t=>"function"==typeof t,boolean:t=>"boolean"==typeof t,string:t=>"string"==typeof t,stringOrUint8Array:t=>"string"==typeof t||a(t),isSafeInteger:t=>Number.isSafeInteger(t),array:t=>Array.isArray(t),field:(t,e)=>e.Fp.isValid(t),hash:t=>"function"==typeof t&&Number.isSafeInteger(t.outputLen)};function U(t,e,r={}){let n=(e,r,n)=>{let i=z[r];if("function"!=typeof i)throw Error("invalid validator function");let o=t[e];if((!n||void 0!==o)&&!i(o,t))throw Error("param "+String(e)+" is invalid. Expected "+r+", got "+o)};for(let[t,r]of Object.entries(e))n(t,r,!1);for(let[t,e]of Object.entries(r))n(t,e,!0);return t}function P(t){let e=new WeakMap;return(r,...n)=>{let i=e.get(r);if(void 0!==i)return i;let o=t(r,...n);return e.set(r,o),o}}let Z=BigInt(0),F=BigInt(1),L=BigInt(2),C=BigInt(3),k=BigInt(4),_=BigInt(5),T=BigInt(8);function V(t,e){let r=t%e;return r>=Z?r:e+r}function j(t,e,r){let n=t;for(;e-- >Z;)n*=n,n%=r;return n}function D(t,e){if(t===Z)throw Error("invert: expected non-zero number");if(e<=Z)throw Error("invert: expected positive modulus, got "+e);let r=V(t,e),n=e,i=Z,o=F,l=F,f=Z;for(;r!==Z;){let t=n/r,e=n%r,s=i-l*t,a=o-f*t;n=r,r=e,i=l,o=f,l=s,f=a}if(n!==F)throw Error("invert: does not exist");return V(i,e)}function K(t,e){let r=(t.ORDER+F)/k,n=t.pow(e,r);if(!t.eql(t.sqr(n),e))throw Error("Cannot find square root");return n}function Y(t,e){let r=(t.ORDER-_)/T,n=t.mul(e,L),i=t.pow(n,r),o=t.mul(e,i),l=t.mul(t.mul(o,L),i),f=t.mul(o,t.sub(l,t.ONE));if(!t.eql(t.sqr(f),e))throw Error("Cannot find square root");return f}let M=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function W(t,e,r=!1){let n=Array(e.length).fill(r?t.ZERO:void 0),i=e.reduce((e,r,i)=>t.is0(r)?e:(n[i]=e,t.mul(e,r)),t.ONE),o=t.inv(i);return e.reduceRight((e,r,i)=>t.is0(r)?e:(n[i]=t.mul(e,n[i]),t.mul(e,r)),o),n}function G(t,e){let r=(t.ORDER-F)/L,n=t.pow(e,r),i=t.eql(n,t.ONE),o=t.eql(n,t.ZERO),l=t.eql(n,t.neg(t.ONE));if(!i&&!o&&!l)throw Error("invalid Legendre symbol result");return i?1:o?0:-1}function $(t,e){void 0!==e&&(0,i.k8)(e);let r=void 0!==e?e:t.toString(2).length;return{nBitLength:r,nByteLength:Math.ceil(r/8)}}function J(t,e,r=!1,n={}){let i;if(t<=Z)throw Error("invalid field: expected ORDER > 0, got "+t);let{nBitLength:o,nByteLength:l}=$(t,e);if(l>2048)throw Error("invalid field: expected ORDER of <= 2048 bytes");let f=Object.freeze({ORDER:t,isLE:r,BITS:o,BYTES:l,MASK:q(o),ZERO:Z,ONE:F,create:e=>V(e,t),isValid:e=>{if("bigint"!=typeof e)throw Error("invalid field element: expected bigint, got "+typeof e);return Z<=e&&et===Z,isOdd:t=>(t&F)===F,neg:e=>V(-e,t),eql:(t,e)=>t===e,sqr:e=>V(e*e,t),add:(e,r)=>V(e+r,t),sub:(e,r)=>V(e-r,t),mul:(e,r)=>V(e*r,t),pow:(t,e)=>(function(t,e,r){if(rZ;)r&F&&(n=t.mul(n,i)),i=t.sqr(i),r>>=F;return n})(f,t,e),div:(e,r)=>V(e*D(r,t),t),sqrN:t=>t*t,addN:(t,e)=>t+e,subN:(t,e)=>t-e,mulN:(t,e)=>t*e,inv:e=>D(e,t),sqrt:n.sqrt||(e=>(!i&&(i=t%k===C?K:t%T===_?Y:function(t){if(t1e3)throw Error("Cannot find square root: probably non-prime P");if(1===r)return K;let o=i.pow(n,e),l=(e+F)/L;return function(t,n){if(t.is0(n))return n;if(1!==G(t,n))throw Error("Cannot find square root");let i=r,f=t.mul(t.ONE,o),s=t.pow(n,e),a=t.pow(n,l);for(;!t.eql(s,t.ONE);){if(t.is0(s))return t.ZERO;let e=1,r=t.sqr(s);for(;!t.eql(r,t.ONE);)if(e++,r=t.sqr(r),e===i)throw Error("Cannot find square root");let n=F<r?x(t,l):B(t,l),fromBytes:t=>{if(t.length!==l)throw Error("Field.fromBytes: expected "+l+" bytes, got "+t.length);return r?v(t):b(t)},invertBatch:t=>W(f,t),cmov:(t,e,r)=>r?e:t});return Object.freeze(f)}function Q(t){if("bigint"!=typeof t)throw Error("field order must be bigint");return Math.ceil(t.toString(2).length/8)}function X(t){let e=Q(t);return e+Math.ceil(e/2)}let tt=BigInt(0),te=BigInt(1);function tr(t,e){let r=e.negate();return t?r:e}function tn(t,e){if(!Number.isSafeInteger(t)||t<=0||t>e)throw Error("invalid window size, expected [1.."+e+"], got W="+t)}function ti(t,e){tn(t,e);let r=Math.ceil(e/t)+1,n=2**(t-1),i=2**t;return{windows:r,windowSize:n,mask:q(t),maxNumber:i,shiftBy:BigInt(t)}}function to(t,e,r){let{windowSize:n,mask:i,maxNumber:o,shiftBy:l}=r,f=Number(t&i),s=t>>l;f>n&&(f-=o,s+=te);let a=e*n,u=a+Math.abs(f)-1;return{nextN:s,offset:u,isZero:0===f,isNeg:f<0,isNegF:e%2!=0,offsetF:a}}let tl=new WeakMap,tf=new WeakMap;function ts(t){return tf.get(t)||1}function ta(t){return U(t.Fp,M.reduce((t,e)=>(t[e]="function",t),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"})),U(t,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...$(t.n,t.nBitLength),...t,p:t.Fp.ORDER})}function tu(t){void 0!==t.lowS&&d("lowS",t.lowS),void 0!==t.prehash&&d("prehash",t.prehash)}class td extends Error{constructor(t=""){super(t)}}let th={Err:td,_tlv:{encode:(t,e)=>{let{Err:r}=th;if(t<0||t>256)throw new r("tlv.encode: wrong tag");if(1&e.length)throw new r("tlv.encode: unpadded data");let n=e.length/2,i=h(n);if(i.length/2&128)throw new r("tlv.encode: long form length too big");let o=n>127?h(i.length/2|128):"";return h(t)+o+i+e},decode(t,e){let{Err:r}=th,n=0;if(t<0||t>256)throw new r("tlv.encode: wrong tag");if(e.length<2||e[n++]!==t)throw new r("tlv.decode: wrong tlv");let i=e[n++],o=0;if(128&i){let t=127&i;if(!t)throw new r("tlv.decode(long): indefinite length not supported");if(t>4)throw new r("tlv.decode(long): byte length is too big");let l=e.subarray(n,n+t);if(l.length!==t)throw new r("tlv.decode: length bytes not complete");if(0===l[0])throw new r("tlv.decode(long): zero leftmost byte");for(let t of l)o=o<<8|t;if(n+=t,o<128)throw new r("tlv.decode(long): not minimal encoding")}else o=i;let l=e.subarray(n,n+o);if(l.length!==o)throw new r("tlv.decode: wrong value length");return{v:l,l:e.subarray(n+o)}}},_int:{encode(t){let{Err:e}=th;if(t(t+e/tv)/e,tx=J(tm,void 0,void 0,{sqrt:function(t){let e=BigInt(3),r=BigInt(6),n=BigInt(11),i=BigInt(22),o=BigInt(23),l=BigInt(44),f=BigInt(88),s=t*t*t%tm,a=s*s*t%tm,u=j(a,e,tm)*a%tm,d=j(u,e,tm)*a%tm,h=j(d,tv,tm)*s%tm,c=j(h,n,tm)*h%tm,g=j(c,i,tm)*c%tm,p=j(g,l,tm)*g%tm,y=j(p,f,tm)*p%tm,m=j(y,l,tm)*g%tm,w=j(m,e,tm)*a%tm,E=j(w,o,tm)*c%tm,b=j(E,r,tm)*s%tm,v=j(b,tv,tm);if(!tx.eql(tx.sqr(v),t))throw Error("Cannot find square root");return v}}),tA=function(t,e){let r=e=>(function(t){let e=function(t){let e=ta(t);return U(e,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...e})}(t),{Fp:r,n:n,nByteLength:i,nBitLength:o}=e,l=r.BYTES+1,u=2*r.BYTES+1;function h(t){return V(t,n)}let{ProjectivePoint:c,normPrivateKeyToScalar:g,weierstrassEquation:p,isWithinCurveOrder:m}=function(t){var e;let r=function(t){let e=ta(t);U(e,{a:"field",b:"field"},{allowInfinityPoint:"boolean",allowedPrivateKeyLengths:"array",clearCofactor:"function",fromBytes:"function",isTorsionFree:"function",toBytes:"function",wrapPrivateKey:"boolean"});let{endo:r,Fp:n,a:i}=e;if(r){if(!n.eql(i,n.ZERO))throw Error("invalid endo: CURVE.a must be 0");if("object"!=typeof r||"bigint"!=typeof r.beta||"function"!=typeof r.splitScalar)throw Error('invalid endo: expected "beta": bigint and "splitScalar": function')}return Object.freeze({...e})}(t),{Fp:n}=r,i=J(r.n,r.nBitLength),o=r.toBytes||((t,e,r)=>{let i=e.toAffine();return S(Uint8Array.from([4]),n.toBytes(i.x),n.toBytes(i.y))}),l=r.fromBytes||(t=>{let e=t.subarray(1);return{x:n.fromBytes(e.subarray(0,n.BYTES)),y:n.fromBytes(e.subarray(n.BYTES,2*n.BYTES))}});function u(t){let{a:e,b:i}=r,o=n.sqr(t),l=n.mul(o,t);return n.add(n.add(l,n.mul(t,e)),i)}function h(t,e){let r=n.sqr(e),i=u(t);return n.eql(r,i)}if(!h(r.Gx,r.Gy))throw Error("bad curve params: generator point");let c=n.mul(n.pow(r.a,tp),ty),g=n.mul(n.sqr(r.b),BigInt(27));if(n.is0(n.add(c,g)))throw Error("bad curve params: a or b");function p(t){let e;let{allowedPrivateKeyLengths:n,nByteLength:i,wrapPrivateKey:o,n:l}=r;if(n&&"bigint"!=typeof t){if(a(t)&&(t=y(t)),"string"!=typeof t||!n.includes(t.length))throw Error("invalid private key");t=t.padStart(2*i,"0")}try{e="bigint"==typeof t?t:b(A("private key",t,i))}catch(e){throw Error("invalid private key, expected hex or "+i+" bytes, got "+typeof t)}return o&&(e=V(e,l)),R("private key",e,tg,l),e}function m(t){if(!(t instanceof v))throw Error("ProjectivePoint expected")}let w=P((t,e)=>{let{px:r,py:i,pz:o}=t;if(n.eql(o,n.ONE))return{x:r,y:i};let l=t.is0();null==e&&(e=l?n.ONE:n.inv(o));let f=n.mul(r,e),s=n.mul(i,e),a=n.mul(o,e);if(l)return{x:n.ZERO,y:n.ZERO};if(!n.eql(a,n.ONE))throw Error("invZ was invalid");return{x:f,y:s}}),E=P(t=>{if(t.is0()){if(r.allowInfinityPoint&&!n.is0(t.py))return;throw Error("bad point: ZERO")}let{x:e,y:i}=t.toAffine();if(!n.isValid(e)||!n.isValid(i))throw Error("bad point: x or y not FE");if(!h(e,i))throw Error("bad point: equation left != right");if(!t.isTorsionFree())throw Error("bad point: not in prime-order subgroup");return!0});class v{constructor(t,e,r){if(null==t||!n.isValid(t))throw Error("x required");if(null==e||!n.isValid(e)||n.is0(e))throw Error("y required");if(null==r||!n.isValid(r))throw Error("z required");this.px=t,this.py=e,this.pz=r,Object.freeze(this)}static fromAffine(t){let{x:e,y:r}=t||{};if(!t||!n.isValid(e)||!n.isValid(r))throw Error("invalid affine point");if(t instanceof v)throw Error("projective point not allowed");let i=t=>n.eql(t,n.ZERO);return i(e)&&i(r)?v.ZERO:new v(e,r,n.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(t){let e=W(n,t.map(t=>t.pz));return t.map((t,r)=>t.toAffine(e[r])).map(v.fromAffine)}static fromHex(t){let e=v.fromAffine(l(A("pointHex",t)));return e.assertValidity(),e}static fromPrivateKey(t){return v.BASE.multiply(p(t))}static msm(t,e){return function(t,e,r,n){!function(t,e){if(!Array.isArray(t))throw Error("array expected");t.forEach((t,r)=>{if(!(t instanceof e))throw Error("invalid point at index "+r)})}(r,t),function(t,e){if(!Array.isArray(t))throw Error("array of scalars expected");t.forEach((t,r)=>{if(!e.isValid(t))throw Error("invalid scalar at index "+r)})}(n,e);let i=r.length,o=n.length;if(i!==o)throw Error("arrays of points and scalars must have equal length");let l=t.ZERO,a=function(t){let e;for(e=0;t>f;t>>=s,e+=1);return e}(BigInt(i)),u=1;a>12?u=a-3:a>4?u=a-2:a>0&&(u=2);let d=q(u),h=Array(Number(d)+1).fill(l),c=Math.floor((e.BITS-1)/u)*u,g=l;for(let t=c;t>=0;t-=u){h.fill(l);for(let e=0;e>BigInt(t)&d);h[i]=h[i].add(r[e])}let e=l;for(let t=h.length-1,r=l;t>0;t--)r=r.add(h[t]),e=e.add(r);if(g=g.add(e),0!==t)for(let t=0;ttc||a>tc;)f&tg&&(u=u.add(h)),a&tg&&(d=d.add(h)),h=h.double(),f>>=tg,a>>=tg;return l&&(u=u.negate()),s&&(d=d.negate()),d=new v(n.mul(d.px,e.beta),d.py,d.pz),u.add(d)}multiply(t){let e,i;let{endo:o,n:l}=r;if(R("scalar",t,tg,l),o){let{k1neg:r,k1:l,k2neg:f,k2:s}=o.splitScalar(t),{p:a,f:u}=this.wNAF(l),{p:d,f:h}=this.wNAF(s);a=O.constTimeNegate(r,a),d=O.constTimeNegate(f,d),d=new v(n.mul(d.px,o.beta),d.py,d.pz),e=a.add(d),i=u.add(h)}else{let{p:r,f:n}=this.wNAF(t);e=r,i=n}return v.normalizeZ([e,i])[0]}multiplyAndAddUnsafe(t,e,r){let n=v.BASE,i=(t,e)=>e!==tc&&e!==tg&&t.equals(n)?t.multiply(e):t.multiplyUnsafe(e),o=i(this,e).add(i(t,r));return o.is0()?void 0:o}toAffine(t){return w(this,t)}isTorsionFree(){let{h:t,isTorsionFree:e}=r;if(t===tg)return!0;if(e)return e(v,this);throw Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){let{h:t,clearCofactor:e}=r;return t===tg?this:e?e(v,this):this.multiplyUnsafe(r.h)}toRawBytes(t=!0){return d("isCompressed",t),this.assertValidity(),o(v,this,t)}toHex(t=!0){return d("isCompressed",t),y(this.toRawBytes(t))}}v.BASE=new v(r.Gx,r.Gy,n.ONE),v.ZERO=new v(n.ZERO,n.ONE,n.ZERO);let{endo:B,nBitLength:x}=r,O=(e=B?Math.ceil(x/2):x,{constTimeNegate:tr,hasPrecomputes:t=>1!==ts(t),unsafeLadder(t,e,r=v.ZERO){let n=t;for(;e>tt;)e&te&&(r=r.add(n)),n=n.double(),e>>=te;return r},precomputeWindow(t,r){let{windows:n,windowSize:i}=ti(r,e),o=[],l=t,f=l;for(let t=0;tb(t.slice(e,r));class O{constructor(t,e,r){R("r",t,tg,n),R("s",e,tg,n),this.r=t,this.s=e,null!=r&&(this.recovery=r),Object.freeze(this)}static fromCompact(t){return new O(w(t=A("compactSignature",t,2*i),0,i),w(t,i,2*i))}static fromDER(t){let{r:e,s:r}=th.toSig(A("DER",t));return new O(e,r)}assertValidity(){}addRecoveryBit(t){return new O(this.r,this.s,t)}recoverPublicKey(t){let{r:i,s:o,recovery:l}=this,f=L(A("msgHash",t));if(null==l||![0,1,2,3].includes(l))throw Error("recovery id invalid");let s=2===l||3===l?i+e.n:i;if(s>=r.ORDER)throw Error("recovery id 2 or 3 invalid");let a=(1&l)==0?"02":"03",u=c.fromHex(a+y(B(s,r.BYTES))),d=D(s,n),g=h(-f*d),p=h(o*d),m=c.BASE.multiplyAndAddUnsafe(u,g,p);if(!m)throw Error("point at infinify");return m.assertValidity(),m}hasHighS(){return this.s>n>>tg}normalizeS(){return this.hasHighS()?new O(this.r,h(-this.s),this.recovery):this}toDERRawBytes(){return E(this.toDERHex())}toDERHex(){return th.hexFromSig(this)}toCompactRawBytes(){return E(this.toCompactHex())}toCompactHex(){return y(B(this.r,i))+y(B(this.s,i))}}function z(t){if("bigint"==typeof t)return!1;if(t instanceof c)return!0;let n=A("key",t).length,o=r.BYTES,l=o+1;if(!e.allowedPrivateKeyLengths&&i!==l)return n===l||n===2*o+1}let Z=e.bits2int||function(t){if(t.length>8192)throw Error("input is too large");let e=b(t),r=8*t.length-o;return r>0?e>>BigInt(r):e},L=e.bits2int_modN||function(t){return h(Z(t))},C=q(o);function k(t){return R("num < 2^"+o,t,tc,C),B(t,i)}let _={lowS:e.lowS,prehash:!1},T={lowS:e.lowS,prehash:!1};return c.BASE._setWindowSize(8),{CURVE:e,getPublicKey:function(t,e=!0){return c.fromPrivateKey(t).toRawBytes(e)},getSharedSecret:function(t,e,r=!0){if(!0===z(t))throw Error("first arg must be private key");if(!1===z(e))throw Error("second arg must be public key");return c.fromHex(e).multiply(g(t)).toRawBytes(r)},sign:function(t,i,o=_){let{seed:l,k2sig:f}=function(t,i,o=_){if(["recovered","canonical"].some(t=>t in o))throw Error("sign() legacy options not supported");let{hash:l,randomBytes:f}=e,{lowS:s,prehash:a,extraEntropy:u}=o;null==s&&(s=!0),t=A("msgHash",t),tu(o),a&&(t=A("prehashed msgHash",l(t)));let d=L(t),p=g(i),y=[k(p),k(d)];if(null!=u&&!1!==u){let t=!0===u?f(r.BYTES):u;y.push(A("extraEntropy",t))}return{seed:S(...y),k2sig:function(t){let e=Z(t);if(!m(e))return;let r=D(e,n),i=c.BASE.multiply(e).toAffine(),o=h(i.x);if(o===tc)return;let l=h(r*h(d+o*p));if(l===tc)return;let f=(i.x===o?0:2)|Number(i.y&tg),a=l;if(s&&l>n>>tg)a=l>n>>tg?h(-l):l,f^=1;return new O(o,a,f)}}}(t,i,o);return(function(t,e,r){if("number"!=typeof t||t<2)throw Error("hashLen must be a number");if("number"!=typeof e||e<2)throw Error("qByteLen must be a number");if("function"!=typeof r)throw Error("hmacFn must be a function");let n=N(t),i=N(t),o=0,l=()=>{n.fill(1),i.fill(0),o=0},f=(...t)=>r(i,n,...t),s=(t=N(0))=>{i=f(H([0]),t),n=f(),0!==t.length&&(i=f(H([1]),t),n=f())},a=()=>{if(o++>=1e3)throw Error("drbg: tried 1000 values");let t=0,r=[];for(;t{let r;for(l(),s(t);!(r=e(a()));)s();return l(),r}})(e.hash.outputLen,e.nByteLength,e.hmac)(l,f)},verify:function(t,r,i,o=T){let l,f;r=A("msgHash",r),i=A("publicKey",i);let{lowS:s,prehash:u,format:d}=o;if(tu(o),"strict"in o)throw Error("options.strict was renamed to lowS");if(void 0!==d&&"compact"!==d&&"der"!==d)throw Error("format must be compact or der");let g="string"==typeof t||a(t),p=!g&&!d&&"object"==typeof t&&null!==t&&"bigint"==typeof t.r&&"bigint"==typeof t.s;if(!g&&!p)throw Error("invalid signature, expected Uint8Array, hex string or Signature instance");try{if(p&&(f=new O(t.r,t.s)),g){try{"compact"!==d&&(f=O.fromDER(t))}catch(t){if(!(t instanceof th.Err))throw t}f||"der"===d||(f=O.fromCompact(t))}l=c.fromHex(i)}catch(t){return!1}if(!f||s&&f.hasHighS())return!1;u&&(r=e.hash(r));let{r:y,s:m}=f,w=L(r),E=D(m,n),b=h(w*E),v=h(y*E),B=c.BASE.multiplyAndAddUnsafe(l,b,v)?.toAffine();return!!B&&h(B.x)===y},ProjectivePoint:c,Signature:O,utils:{isValidPrivateKey(t){try{return g(t),!0}catch(t){return!1}},normPrivateKeyToScalar:g,randomPrivateKey:()=>{let t=X(e.n);return function(t,e,r=!1){let n=t.length,i=Q(e),o=X(e);if(n<16||n1024)throw Error("expected "+o+"-1024 bytes of input, got "+n);let l=V(r?v(t):b(t),e-F)+F;return r?x(l,i):B(l,i)}(e.randomBytes(t),e.n)},precompute:(t=8,e=c.BASE)=>(e._setWindowSize(t),e.multiply(BigInt(3)),e)}}})({...t,hash:e,hmac:(t,...r)=>l(e,t,(0,i.eV)(...r)),randomBytes:i.O6});return{...r(e),create:r}}({a:tE,b:BigInt(7),Fp:tx,n:tw,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:t=>{let e=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-tb*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),n=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),i=BigInt("0x100000000000000000000000000000000"),o=tB(e*t,tw),l=tB(-r*t,tw),f=V(t-o*e-l*n,tw),s=V(-o*r-l*e,tw),a=f>i,u=s>i;if(a&&(f=tw-f),u&&(s=tw-s),f>i||s>i)throw Error("splitScalar: Endomorphism failed, k="+t);return{k1neg:a,k1:f,k2neg:u,k2:s}}}},n.JQ)}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/851.25eeddf2d58e27ae.js b/frontend/.next/static/chunks/851.25eeddf2d58e27ae.js new file mode 100644 index 0000000..00b579b --- /dev/null +++ b/frontend/.next/static/chunks/851.25eeddf2d58e27ae.js @@ -0,0 +1,14 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[851],{60851:function(t,e,r){r.r(e),r.d(e,{PhArrowLeft:function(){return c}}),r(31498);var l=r(38157),a=r(48567),o=r(54910),i=r(69709),s=r(78313),h=Object.defineProperty,p=Object.getOwnPropertyDescriptor,n=(t,e,r,l)=>{for(var a,o=l>1?void 0:l?p(e,r):e,i=t.length-1;i>=0;i--)(a=t[i])&&(o=(l?a(e,r,o):a(o))||o);return l&&o&&h(e,r,o),o};let c=class extends a.oi{constructor(){super(...arguments),this.size="1em",this.weight="regular",this.color="currentColor",this.mirrored=!1}render(){var t;return(0,l.dy)` + ${c.weightsMap.get(null!=(t=this.weight)?t:"regular")} + `}};c.weightsMap=new Map([["thin",(0,l.YP)``],["light",(0,l.YP)``],["regular",(0,l.YP)``],["bold",(0,l.YP)``],["fill",(0,l.YP)``],["duotone",(0,l.YP)``]]),c.styles=(0,s.iv)` + :host { + display: contents; + } + `,n([(0,i.C)({type:String,reflect:!0})],c.prototype,"size",2),n([(0,i.C)({type:String,reflect:!0})],c.prototype,"weight",2),n([(0,i.C)({type:String,reflect:!0})],c.prototype,"color",2),n([(0,i.C)({type:Boolean,reflect:!0})],c.prototype,"mirrored",2),c=n([(0,o.M)("ph-arrow-left")],c)}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/8592.f05cc9e6663ab7b0.js b/frontend/.next/static/chunks/8592.f05cc9e6663ab7b0.js new file mode 100644 index 0000000..de9553f --- /dev/null +++ b/frontend/.next/static/chunks/8592.f05cc9e6663ab7b0.js @@ -0,0 +1,14 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8592],{98592:function(a,t,e){e.r(t),e.d(t,{PhGlobe:function(){return M}}),e(31498);var h=e(38157),r=e(48567),Z=e(54910),A=e(69709),o=e(78313),i=Object.defineProperty,H=Object.getOwnPropertyDescriptor,s=(a,t,e,h)=>{for(var r,Z=h>1?void 0:h?H(t,e):t,A=a.length-1;A>=0;A--)(r=a[A])&&(Z=(h?r(t,e,Z):r(Z))||Z);return h&&Z&&i(t,e,Z),Z};let M=class extends r.oi{constructor(){super(...arguments),this.size="1em",this.weight="regular",this.color="currentColor",this.mirrored=!1}render(){var a;return(0,h.dy)` + ${M.weightsMap.get(null!=(a=this.weight)?a:"regular")} + `}};M.weightsMap=new Map([["thin",(0,h.YP)``],["light",(0,h.YP)``],["regular",(0,h.YP)``],["bold",(0,h.YP)``],["fill",(0,h.YP)``],["duotone",(0,h.YP)``]]),M.styles=(0,o.iv)` + :host { + display: contents; + } + `,s([(0,A.C)({type:String,reflect:!0})],M.prototype,"size",2),s([(0,A.C)({type:String,reflect:!0})],M.prototype,"weight",2),s([(0,A.C)({type:String,reflect:!0})],M.prototype,"color",2),s([(0,A.C)({type:Boolean,reflect:!0})],M.prototype,"mirrored",2),M=s([(0,Z.M)("ph-globe")],M)}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/8867.d44333fb28d367ff.js b/frontend/.next/static/chunks/8867.d44333fb28d367ff.js new file mode 100644 index 0000000..d55fb16 --- /dev/null +++ b/frontend/.next/static/chunks/8867.d44333fb28d367ff.js @@ -0,0 +1,250 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8867],{8867:function(e,t,i){i.r(t),i.d(t,{W3mConnectSocialsView:function(){return x},W3mConnectingFarcasterView:function(){return W},W3mConnectingSocialView:function(){return _}});var o=i(31133),r=i(84927),n=i(32801),s=i(81341),a=i(5688),l=i(92413);i(96277),i(34041);var c=i(35652),d=i(17766),u=i(86777),h=i(59712),p=i(72723),m=i(5344),w=i(53357);i(15834);var g=i(55),v=(0,l.iv)` + :host { + margin-top: ${({spacing:e})=>e["1"]}; + } + wui-separator { + margin: ${({spacing:e})=>e["3"]} calc(${({spacing:e})=>e["3"]} * -1) + ${({spacing:e})=>e["2"]} calc(${({spacing:e})=>e["3"]} * -1); + width: calc(100% + ${({spacing:e})=>e["3"]} * 2); + } +`,f=function(e,t,i,o){var r,n=arguments.length,s=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,i,s):r(t,i))||s);return n>3&&s&&Object.defineProperty(t,i,s),s};let C=class extends o.oi{constructor(){super(),this.unsubscribe=[],this.tabIdx=void 0,this.connectors=c.ConnectorController.state.connectors,this.authConnector=this.connectors.find(e=>"AUTH"===e.type),this.remoteFeatures=a.OptionsController.state.remoteFeatures,this.isPwaLoading=!1,this.hasExceededUsageLimit=d.ApiController.state.plan.hasExceededUsageLimit,this.unsubscribe.push(c.ConnectorController.subscribeKey("connectors",e=>{this.connectors=e,this.authConnector=this.connectors.find(e=>"AUTH"===e.type)}),a.OptionsController.subscribeKey("remoteFeatures",e=>this.remoteFeatures=e))}connectedCallback(){super.connectedCallback(),this.handlePwaFrameLoad()}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){let e=this.remoteFeatures?.socials||[],t=!!this.authConnector,i=e?.length,r="ConnectSocials"===u.RouterController.state.view;return t&&i||r?(r&&!i&&(e=h.bq.DEFAULT_SOCIALS),(0,o.dy)` + ${e.map(e=>(0,o.dy)`{this.onSocialClick(e)}} + data-testid=${`social-selector-${e}`} + name=${e} + logo=${e} + ?disabled=${this.isPwaLoading} + >`)} + `):null}async onSocialClick(e){if(this.hasExceededUsageLimit){u.RouterController.push("UsageExceeded");return}e&&await (0,m.y0)(e)}async handlePwaFrameLoad(){if(w.j.isPWA()){this.isPwaLoading=!0;try{this.authConnector?.provider instanceof g.S&&await this.authConnector.provider.init()}catch(e){p.AlertController.open({displayMessage:"Error loading embedded wallet in PWA",debugMessage:e.message},"error")}finally{this.isPwaLoading=!1}}}};C.styles=v,f([(0,r.Cb)()],C.prototype,"tabIdx",void 0),f([(0,r.SB)()],C.prototype,"connectors",void 0),f([(0,r.SB)()],C.prototype,"authConnector",void 0),f([(0,r.SB)()],C.prototype,"remoteFeatures",void 0),f([(0,r.SB)()],C.prototype,"isPwaLoading",void 0),f([(0,r.SB)()],C.prototype,"hasExceededUsageLimit",void 0),C=f([(0,l.Mo)("w3m-social-login-list")],C);var y=(0,l.iv)` + wui-flex { + max-height: clamp(360px, 540px, 80vh); + overflow: scroll; + scrollbar-width: none; + transition: opacity ${({durations:e})=>e.md} + ${({easings:e})=>e["ease-out-power-1"]}; + will-change: opacity; + } + + wui-flex::-webkit-scrollbar { + display: none; + } + + wui-flex.disabled { + opacity: 0.3; + pointer-events: none; + user-select: none; + } +`,b=function(e,t,i,o){var r,n=arguments.length,s=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,i,s):r(t,i))||s);return n>3&&s&&Object.defineProperty(t,i,s),s};let x=class extends o.oi{constructor(){super(),this.unsubscribe=[],this.checked=s.M.state.isLegalCheckboxChecked,this.unsubscribe.push(s.M.subscribeKey("isLegalCheckboxChecked",e=>{this.checked=e}))}disconnectedCallback(){this.unsubscribe.forEach(e=>e())}render(){let{termsConditionsUrl:e,privacyPolicyUrl:t}=a.OptionsController.state,i=a.OptionsController.state.features?.legalCheckbox,r=!!(e||t)&&!!i&&!this.checked;return(0,o.dy)` + + + + + `}};x.styles=y,b([(0,r.SB)()],x.prototype,"checked",void 0),x=b([(0,l.Mo)("w3m-connect-socials-view")],x);var S=i(6943),$=i(64369),P=i(31929),E=i(36801),k=i(66909),R=i(89512),O=i(52005);i(92374),i(87302),i(84793),i(44732);var L=i(65653),I=i(54946),A=(0,l.iv)` + wui-logo { + width: 80px; + height: 80px; + border-radius: ${({borderRadius:e})=>e["8"]}; + } + @keyframes shake { + 0% { + transform: translateX(0); + } + 25% { + transform: translateX(3px); + } + 50% { + transform: translateX(-3px); + } + 75% { + transform: translateX(3px); + } + 100% { + transform: translateX(0); + } + } + wui-flex:first-child:not(:only-child) { + position: relative; + } + wui-loading-thumbnail { + position: absolute; + } + wui-icon-box { + position: absolute; + right: calc(${({spacing:e})=>e["1"]} * -1); + bottom: calc(${({spacing:e})=>e["1"]} * -1); + opacity: 0; + transform: scale(0.5); + transition: all ${({easings:e})=>e["ease-out-power-2"]} + ${({durations:e})=>e.lg}; + } + wui-text[align='center'] { + width: 100%; + padding: 0px ${({spacing:e})=>e["4"]}; + } + [data-error='true'] wui-icon-box { + opacity: 1; + transform: scale(1); + } + [data-error='true'] > wui-flex:first-child { + animation: shake 250ms ${({easings:e})=>e["ease-out-power-2"]} both; + } + .capitalize { + text-transform: capitalize; + } +`,T=function(e,t,i,o){var r,n=arguments.length,s=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,i,s):r(t,i))||s);return n>3&&s&&Object.defineProperty(t,i,s),s};let _=class extends o.oi{constructor(){super(),this.unsubscribe=[],this.socialProvider=S.R.getAccountData()?.socialProvider,this.socialWindow=S.R.getAccountData()?.socialWindow,this.error=!1,this.connecting=!1,this.message="Connect in the provider window",this.remoteFeatures=a.OptionsController.state.remoteFeatures,this.address=S.R.getAccountData()?.address,this.connectionsByNamespace=$.ConnectionController.getConnections(S.R.state.activeChain),this.hasMultipleConnections=this.connectionsByNamespace.length>0,this.authConnector=c.ConnectorController.getAuthConnector(),this.handleSocialConnection=async e=>{if(e.data?.resultUri){if(e.origin===I.b.SECURE_SITE_ORIGIN){window.removeEventListener("message",this.handleSocialConnection,!1);try{if(this.authConnector&&!this.connecting){this.connecting=!0;let t=this.parseURLError(e.data.resultUri);if(t){this.handleSocialError(t);return}this.closeSocialWindow(),this.updateMessage();let i=e.data.resultUri;this.socialProvider&&P.X.sendEvent({type:"track",event:"SOCIAL_LOGIN_REQUEST_USER_DATA",properties:{provider:this.socialProvider}}),await $.ConnectionController.connectExternal({id:this.authConnector.id,type:this.authConnector.type,socialUri:i},this.authConnector.chain),this.socialProvider&&(E.M.setConnectedSocialProvider(this.socialProvider),P.X.sendEvent({type:"track",event:"SOCIAL_LOGIN_SUCCESS",properties:{provider:this.socialProvider}}))}}catch(e){this.error=!0,this.updateMessage(),this.socialProvider&&P.X.sendEvent({type:"track",event:"SOCIAL_LOGIN_ERROR",properties:{provider:this.socialProvider,message:w.j.parseError(e)}})}}else u.RouterController.goBack(),k.SnackController.showError("Untrusted Origin"),this.socialProvider&&P.X.sendEvent({type:"track",event:"SOCIAL_LOGIN_ERROR",properties:{provider:this.socialProvider,message:"Untrusted Origin"}})}},L.j.EmbeddedWalletAbortController.signal.addEventListener("abort",()=>{this.closeSocialWindow()}),this.unsubscribe.push(S.R.subscribeChainProp("accountState",e=>{if(e&&(this.socialProvider=e.socialProvider,e.socialWindow&&(this.socialWindow=e.socialWindow),e.address)){let t=this.remoteFeatures?.multiWallet;e.address!==this.address&&(this.hasMultipleConnections&&t?(u.RouterController.replace("ProfileWallets"),k.SnackController.showSuccess("New Wallet Added"),this.address=e.address):(R.I.state.open||a.OptionsController.state.enableEmbedded)&&R.I.close())}}),a.OptionsController.subscribeKey("remoteFeatures",e=>{this.remoteFeatures=e})),this.authConnector&&this.connectSocial()}disconnectedCallback(){this.unsubscribe.forEach(e=>e()),window.removeEventListener("message",this.handleSocialConnection,!1),S.R.state.activeCaipAddress||!this.socialProvider||this.connecting||P.X.sendEvent({type:"track",event:"SOCIAL_LOGIN_CANCELED",properties:{provider:this.socialProvider}}),this.closeSocialWindow()}render(){return(0,o.dy)` + + + + ${this.error?null:this.loaderTemplate()} + + + + Log in with + ${this.socialProvider??"Social"} + ${this.message} + + `}loaderTemplate(){let e=O.ThemeController.state.themeVariables["--w3m-border-radius-master"],t=e?parseInt(e.replace("px",""),10):4;return(0,o.dy)``}parseURLError(e){try{let t="error=",i=e.indexOf(t);if(-1===i)return null;return e.substring(i+t.length)}catch{return null}}connectSocial(){let e=setInterval(()=>{this.socialWindow?.closed&&(this.connecting||"ConnectingSocial"!==u.RouterController.state.view||u.RouterController.goBack(),clearInterval(e))},1e3);window.addEventListener("message",this.handleSocialConnection,!1)}updateMessage(){this.error?this.message="Something went wrong":this.connecting?this.message="Retrieving user data":this.message="Connect in the provider window"}handleSocialError(e){this.error=!0,this.updateMessage(),this.socialProvider&&P.X.sendEvent({type:"track",event:"SOCIAL_LOGIN_ERROR",properties:{provider:this.socialProvider,message:e}}),this.closeSocialWindow()}closeSocialWindow(){this.socialWindow&&(this.socialWindow.close(),S.R.setAccountProp("socialWindow",void 0,S.R.state.activeChain))}};_.styles=A,T([(0,r.SB)()],_.prototype,"socialProvider",void 0),T([(0,r.SB)()],_.prototype,"socialWindow",void 0),T([(0,r.SB)()],_.prototype,"error",void 0),T([(0,r.SB)()],_.prototype,"connecting",void 0),T([(0,r.SB)()],_.prototype,"message",void 0),T([(0,r.SB)()],_.prototype,"remoteFeatures",void 0),_=T([(0,l.Mo)("w3m-connecting-social-view")],_),i(97585),i(4594),i(930),i(80843);var U=(0,l.iv)` + wui-shimmer { + width: 100%; + aspect-ratio: 1 / 1; + border-radius: ${({borderRadius:e})=>e[4]}; + } + + wui-qr-code { + opacity: 0; + animation-duration: ${({durations:e})=>e.xl}; + animation-timing-function: ${({easings:e})=>e["ease-out-power-2"]}; + animation-name: fade-in; + animation-fill-mode: forwards; + } + + wui-logo { + width: 80px; + height: 80px; + border-radius: ${({borderRadius:e})=>e["8"]}; + } + + wui-flex:first-child:not(:only-child) { + position: relative; + } + + wui-loading-thumbnail { + position: absolute; + } + + wui-icon-box { + position: absolute; + right: calc(${({spacing:e})=>e["1"]} * -1); + bottom: calc(${({spacing:e})=>e["1"]} * -1); + opacity: 0; + transform: scale(0.5); + transition: + opacity ${({durations:e})=>e.lg} ${({easings:e})=>e["ease-out-power-2"]}, + transform ${({durations:e})=>e.lg} + ${({easings:e})=>e["ease-out-power-2"]}; + will-change: opacity, transform; + } + + @keyframes fade-in { + from { + opacity: 0; + } + to { + opacity: 1; + } + } +`,F=function(e,t,i,o){var r,n=arguments.length,s=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,i,s):r(t,i))||s);return n>3&&s&&Object.defineProperty(t,i,s),s};let W=class extends o.oi{constructor(){super(),this.unsubscribe=[],this.timeout=void 0,this.socialProvider=S.R.getAccountData()?.socialProvider,this.uri=S.R.getAccountData()?.farcasterUrl,this.ready=!1,this.loading=!1,this.remoteFeatures=a.OptionsController.state.remoteFeatures,this.authConnector=c.ConnectorController.getAuthConnector(),this.forceUpdate=()=>{this.requestUpdate()},this.unsubscribe.push(S.R.subscribeChainProp("accountState",e=>{this.socialProvider=e?.socialProvider,this.uri=e?.farcasterUrl,this.connectFarcaster()}),a.OptionsController.subscribeKey("remoteFeatures",e=>{this.remoteFeatures=e})),window.addEventListener("resize",this.forceUpdate)}disconnectedCallback(){super.disconnectedCallback(),clearTimeout(this.timeout),window.removeEventListener("resize",this.forceUpdate),!S.R.state.activeCaipAddress&&this.socialProvider&&(this.uri||this.loading)&&P.X.sendEvent({type:"track",event:"SOCIAL_LOGIN_CANCELED",properties:{provider:this.socialProvider}})}render(){return this.onRenderProxy(),(0,o.dy)`${this.platformTemplate()}`}platformTemplate(){return w.j.isMobile()?(0,o.dy)`${this.mobileTemplate()}`:(0,o.dy)`${this.desktopTemplate()}`}desktopTemplate(){return this.loading?(0,o.dy)`${this.loadingTemplate()}`:(0,o.dy)`${this.qrTemplate()}`}qrTemplate(){return(0,o.dy)` + ${this.qrCodeTemplate()} + + Scan this QR Code with your phone + ${this.copyTemplate()} + `}loadingTemplate(){return(0,o.dy)` + + + + ${this.loaderTemplate()} + + + + + Loading user data + + + Please wait a moment while we load your data. + + + + `}mobileTemplate(){return(0,o.dy)` + + + ${this.loaderTemplate()} + + + + Continue in Farcaster + Accept connection request in the app + ${this.mobileLinkTemplate()} + `}loaderTemplate(){let e=O.ThemeController.state.themeVariables["--w3m-border-radius-master"],t=e?parseInt(e.replace("px",""),10):4;return(0,o.dy)``}async connectFarcaster(){if(this.authConnector)try{await this.authConnector?.provider.connectFarcaster(),this.socialProvider&&(E.M.setConnectedSocialProvider(this.socialProvider),P.X.sendEvent({type:"track",event:"SOCIAL_LOGIN_REQUEST_USER_DATA",properties:{provider:this.socialProvider}})),this.loading=!0;let e=$.ConnectionController.getConnections(this.authConnector.chain).length>0;await $.ConnectionController.connectExternal(this.authConnector,this.authConnector.chain);let t=this.remoteFeatures?.multiWallet;this.socialProvider&&P.X.sendEvent({type:"track",event:"SOCIAL_LOGIN_SUCCESS",properties:{provider:this.socialProvider}}),this.loading=!1,e&&t?(u.RouterController.replace("ProfileWallets"),k.SnackController.showSuccess("New Wallet Added")):R.I.close()}catch(e){this.socialProvider&&P.X.sendEvent({type:"track",event:"SOCIAL_LOGIN_ERROR",properties:{provider:this.socialProvider,message:w.j.parseError(e)}}),u.RouterController.goBack(),k.SnackController.showError(e)}}mobileLinkTemplate(){return(0,o.dy)`{this.uri&&w.j.openHref(this.uri,"_blank")}} + > + Open farcaster`}onRenderProxy(){!this.ready&&this.uri&&(this.timeout=setTimeout(()=>{this.ready=!0},200))}qrCodeTemplate(){if(!this.uri||!this.ready)return null;let e=this.getBoundingClientRect().width-40,t=O.ThemeController.state.themeVariables["--apkt-qr-color"]??O.ThemeController.state.themeVariables["--w3m-qr-color"];return(0,o.dy)` `}copyTemplate(){let e=!this.uri||!this.ready;return(0,o.dy)` + + Copy link + `}onCopyUri(){try{this.uri&&(w.j.copyToClopboard(this.uri),k.SnackController.showSuccess("Link copied"))}catch{k.SnackController.showError("Failed to copy")}}};W.styles=U,F([(0,r.SB)()],W.prototype,"socialProvider",void 0),F([(0,r.SB)()],W.prototype,"uri",void 0),F([(0,r.SB)()],W.prototype,"ready",void 0),F([(0,r.SB)()],W.prototype,"loading",void 0),F([(0,r.SB)()],W.prototype,"remoteFeatures",void 0),W=F([(0,l.Mo)("w3m-connecting-farcaster-view")],W)}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/8971.b53a598d17200600.js b/frontend/.next/static/chunks/8971.b53a598d17200600.js new file mode 100644 index 0000000..d11121f --- /dev/null +++ b/frontend/.next/static/chunks/8971.b53a598d17200600.js @@ -0,0 +1,14 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8971],{8971:function(a,t,e){e.r(t),e.d(t,{PhWarning:function(){return Z}}),e(31498);var r=e(38157),h=e(48567),i=e(54910),o=e(69709),s=e(78313),l=Object.defineProperty,n=Object.getOwnPropertyDescriptor,p=(a,t,e,r)=>{for(var h,i=r>1?void 0:r?n(t,e):t,o=a.length-1;o>=0;o--)(h=a[o])&&(i=(r?h(t,e,i):h(i))||i);return r&&i&&l(t,e,i),i};let Z=class extends h.oi{constructor(){super(...arguments),this.size="1em",this.weight="regular",this.color="currentColor",this.mirrored=!1}render(){var a;return(0,r.dy)` + ${Z.weightsMap.get(null!=(a=this.weight)?a:"regular")} + `}};Z.weightsMap=new Map([["thin",(0,r.YP)``],["light",(0,r.YP)``],["regular",(0,r.YP)``],["bold",(0,r.YP)``],["fill",(0,r.YP)``],["duotone",(0,r.YP)``]]),Z.styles=(0,s.iv)` + :host { + display: contents; + } + `,p([(0,o.C)({type:String,reflect:!0})],Z.prototype,"size",2),p([(0,o.C)({type:String,reflect:!0})],Z.prototype,"weight",2),p([(0,o.C)({type:String,reflect:!0})],Z.prototype,"color",2),p([(0,o.C)({type:Boolean,reflect:!0})],Z.prototype,"mirrored",2),Z=p([(0,i.M)("ph-warning")],Z)}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/9018.a2df5c7e623e3337.js b/frontend/.next/static/chunks/9018.a2df5c7e623e3337.js new file mode 100644 index 0000000..f3be837 --- /dev/null +++ b/frontend/.next/static/chunks/9018.a2df5c7e623e3337.js @@ -0,0 +1,376 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9018],{20287:function(e,t,i){i.d(t,{z:function(){return d}});var r=i(61616),o=i(44649),n=i(17766),a=i(61704),s=i(6943),l=i(43291),c=i(68903);class u{constructor(e){this.getNonce=e.getNonce}async createMessage(e){let t={accountAddress:e.accountAddress,chainId:e.chainId,version:"1",domain:"undefined"==typeof document?"Unknown Domain":document.location.host,uri:"undefined"==typeof document?"Unknown URI":document.location.href,resources:this.resources,nonce:await this.getNonce(e),issuedAt:this.stringifyDate(new Date),statement:void 0,expirationTime:void 0,notBefore:void 0};return Object.assign(t,{toString:()=>this.stringify(t)})}stringify(e){let t=this.getNetworkName(e.chainId);return[`${e.domain} wants you to sign in with your ${t} account:`,e.accountAddress,e.statement?` +${e.statement} +`:"",`URI: ${e.uri}`,`Version: ${e.version}`,`Chain ID: ${e.chainId}`,`Nonce: ${e.nonce}`,e.issuedAt&&`Issued At: ${e.issuedAt}`,e.expirationTime&&`Expiration Time: ${e.expirationTime}`,e.notBefore&&`Not Before: ${e.notBefore}`,e.requestId&&`Request ID: ${e.requestId}`,e.resources?.length&&e.resources.reduce((e,t)=>`${e} +- ${t}`,"Resources:")].filter(e=>"string"==typeof e).join("\n").trim()}getNetworkName(e){let t=s.R.getAllRequestedCaipNetworks();return c.p.getNetworkNameByCaipNetworkId(t,e)}stringifyDate(e){return e.toISOString()}}class d{constructor(e={}){this.otpUuid=null,this.listeners={sessionChanged:[]},this.localAuthStorageKey=e.localAuthStorageKey||r.uJ.SIWX_AUTH_TOKEN,this.localNonceStorageKey=e.localNonceStorageKey||r.uJ.SIWX_NONCE_TOKEN,this.required=e.required??!0,this.messenger=new u({getNonce:this.getNonce.bind(this)})}async createMessage(e){return this.messenger.createMessage(e)}async addSession(e){let t=await this.request({method:"POST",key:"authenticate",body:{data:e.data,message:e.message,signature:e.signature,clientId:this.getClientId(),walletInfo:this.getWalletInfo()},headers:["nonce","otp"]});this.setStorageToken(t.token,this.localAuthStorageKey),this.emit("sessionChanged",e),this.setAppKitAccountUser(function(e){let t=e.split(".");if(3!==t.length)throw Error("Invalid token");let i=t[1];if("string"!=typeof i)throw Error("Invalid token");let r=i.replace(/-/gu,"+").replace(/_/gu,"/");return JSON.parse(atob(r.padEnd(r.length+(4-r.length%4)%4,"=")))}(t.token)),this.otpUuid=null}async getSessions(e,t){try{if(!this.getStorageToken(this.localAuthStorageKey))return[];let i=await this.request({method:"GET",key:"me",query:{},headers:["auth"]});if(!i)return[];let r=i.address.toLowerCase()===t.toLowerCase(),o=i.caip2Network===e;if(!r||!o)return[];let n={data:{accountAddress:i.address,chainId:i.caip2Network},message:"",signature:""};return this.emit("sessionChanged",n),this.setAppKitAccountUser(i),[n]}catch{return[]}}async revokeSession(e,t){return Promise.resolve(this.clearStorageTokens())}async setSessions(e){if(0===e.length)this.clearStorageTokens();else{let t=e.find(e=>e.data.chainId===l.eq()?.caipNetworkId)||e[0];await this.addSession(t)}}getRequired(){return this.required}async getSessionAccount(){if(!this.getStorageToken(this.localAuthStorageKey))throw Error("Not authenticated");return this.request({method:"GET",key:"me",body:void 0,query:{includeAppKitAccount:!0},headers:["auth"]})}async setSessionAccountMetadata(e=null){if(!this.getStorageToken(this.localAuthStorageKey))throw Error("Not authenticated");return this.request({method:"PUT",key:"account-metadata",body:{metadata:e},headers:["auth"]})}on(e,t){return this.listeners[e].push(t),()=>{this.listeners[e]=this.listeners[e].filter(e=>e!==t)}}removeAllListeners(){Object.keys(this.listeners).forEach(e=>{this.listeners[e]=[]})}async requestEmailOtp({email:e,account:t}){let i=await this.request({method:"POST",key:"otp",body:{email:e,account:t}});return this.otpUuid=i.uuid,this.messenger.resources=[`email:${e}`],i}confirmEmailOtp({code:e}){return this.request({method:"PUT",key:"otp",body:{code:e},headers:["otp"]})}async request({method:e,key:t,query:i,body:r,headers:n}){let{projectId:a,st:s,sv:l}=this.getSDKProperties(),c=new URL(`${o.b.W3M_API_URL}/auth/v1/${String(t)}`);c.searchParams.set("projectId",a),c.searchParams.set("st",s),c.searchParams.set("sv",l),i&&Object.entries(i).forEach(([e,t])=>c.searchParams.set(e,String(t)));let u=await fetch(c,{method:e,body:r?JSON.stringify(r):void 0,headers:Array.isArray(n)?n.reduce((e,t)=>{switch(t){case"nonce":e["x-nonce-jwt"]=`Bearer ${this.getStorageToken(this.localNonceStorageKey)}`;break;case"auth":e.Authorization=`Bearer ${this.getStorageToken(this.localAuthStorageKey)}`;break;case"otp":this.otpUuid&&(e["x-otp"]=this.otpUuid)}return e},{}):void 0});if(!u.ok)throw Error(await u.text());return u.headers.get("content-type")?.includes("application/json")?u.json():null}getStorageToken(e){return r.mr.getItem(e)}setStorageToken(e,t){r.mr.setItem(t,e)}clearStorageTokens(){this.otpUuid=null,r.mr.removeItem(this.localAuthStorageKey),r.mr.removeItem(this.localNonceStorageKey),this.emit("sessionChanged",void 0)}async getNonce(){let{nonce:e,token:t}=await this.request({method:"GET",key:"nonce"});return this.setStorageToken(t,this.localNonceStorageKey),e}getClientId(){return a.L.state.clientId}getWalletInfo(){let e=s.R.getAccountData()?.connectedWalletInfo;if(!e)return;if("social"in e&&"identifier"in e)return{type:"social",social:e.social,identifier:e.identifier};let{name:t,icon:i}=e,r="unknown";switch(e.type){case"EXTERNAL":case"INJECTED":case"ANNOUNCED":r="extension";break;case"WALLET_CONNECT":r="walletconnect";break;default:r="unknown"}return{type:r,name:t,icon:i}}getSDKProperties(){return n.ApiController._getSdkProperties()}emit(e,t){this.listeners[e].forEach(e=>e(t))}setAppKitAccountUser(e){let{email:t}=e;t&&Object.values(o.b.CHAIN).forEach(e=>{s.R.setAccountProp("user",{email:t},e)})}}},9018:function(e,t,i){i.r(t),i.d(t,{W3mDataCaptureOtpConfirmView:function(){return b},W3mDataCaptureView:function(){return k},W3mEmailSuffixesWidget:function(){return c},W3mRecentEmailsWidget:function(){return h}});var r=i(31133),o=i(84927),n=i(92413),a=(0,r.iv)` + .email-sufixes { + display: flex; + flex-direction: row; + gap: var(--wui-spacing-3xs); + overflow-x: auto; + max-width: 100%; + margin-top: var(--wui-spacing-s); + margin-bottom: calc(-1 * var(--wui-spacing-m)); + padding-bottom: var(--wui-spacing-m); + margin-left: calc(-1 * var(--wui-spacing-m)); + margin-right: calc(-1 * var(--wui-spacing-m)); + padding-left: var(--wui-spacing-m); + padding-right: var(--wui-spacing-m); + + &::-webkit-scrollbar { + display: none; + } + } +`,s=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let l=["@gmail.com","@outlook.com","@yahoo.com","@hotmail.com","@aol.com","@icloud.com","@zoho.com"],c=class extends r.oi{constructor(){super(...arguments),this.email=""}render(){let e=l.filter(this.filter.bind(this)).map(this.item.bind(this));return 0===e.length?null:(0,r.dy)``}filter(e){if(!this.email)return!1;let t=this.email.split("@");if(t.length<2)return!0;let i=t.pop();return e.includes(i)&&e!==`@${i}`}item(e){return(0,r.dy)`{let t=this.email.split("@");t.length>1&&t.pop();let i=t[0]+e;this.dispatchEvent(new CustomEvent("change",{detail:i,bubbles:!0,composed:!0}))}} + >${e}`}};c.styles=[a],s([(0,o.Cb)()],c.prototype,"email",void 0),c=s([(0,n.Mo)("w3m-email-suffixes-widget")],c);var u=(0,r.iv)` + .recent-emails { + display: flex; + flex-direction: column; + padding: var(--wui-spacing-s) 0; + border-top: 1px solid var(--wui-color-gray-glass-005); + border-bottom: 1px solid var(--wui-color-gray-glass-005); + } + + .recent-emails-heading { + margin-bottom: var(--wui-spacing-s); + } + + .recent-emails-list-item { + --wui-color-gray-glass-002: transparent; + } +`,d=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let h=class extends r.oi{constructor(){super(...arguments),this.emails=[]}render(){return 0===this.emails.length?null:(0,r.dy)`
+ Recently used emails + ${this.emails.map(this.item.bind(this))} +
`}item(e){return(0,r.dy)`{this.dispatchEvent(new CustomEvent("select",{detail:e,bubbles:!0,composed:!0}))}} + ?chevron=${!0} + icon="mail" + iconVariant="overlay" + class="recent-emails-list-item" + > + ${e} + `}};h.styles=[u],d([(0,o.Cb)()],h.prototype,"emails",void 0),h=d([(0,n.Mo)("w3m-recent-emails-widget")],h);var p=i(5688),m=i(86777),g=i(6943),f=i(66909),w=i(20287),y=i(55499),v=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let b=class extends y.m{constructor(){super(...arguments),this.siwx=p.OptionsController.state.siwx,this.onOtpSubmit=async e=>{await this.siwx.confirmEmailOtp({code:e}),m.RouterController.replace("SIWXSignMessage")},this.onOtpResend=async e=>{let t=g.R.getAccountData();if(!t?.caipAddress)throw Error("No account data found");await this.siwx.requestEmailOtp({email:e,account:t.caipAddress})}}connectedCallback(){this.siwx&&this.siwx instanceof w.z||f.SnackController.showError("ReownAuthentication is not initialized."),super.connectedCallback()}shouldSubmitOnOtpChange(){return this.otp.length===y.m.OTP_LENGTH}};v([(0,o.SB)()],b.prototype,"siwx",void 0),b=v([(0,n.Mo)("w3m-data-capture-otp-confirm-view")],b);var x=i(61616),S=(0,r.iv)` + .hero { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + gap: var(--wui-spacing-3xs); + + transition-property: margin, height; + transition-duration: var(--wui-duration-md); + transition-timing-function: var(--wui-ease-out-power-1); + margin-top: -100px; + + &[data-state='loading'] { + margin-top: 0px; + } + + position: relative; + &:after { + content: ''; + position: absolute; + bottom: 0; + height: 252px; + width: 360px; + background: radial-gradient( + 96.11% 53.95% at 50% 51.28%, + transparent 0%, + color-mix(in srgb, var(--wui-color-bg-100) 5%, transparent) 49%, + color-mix(in srgb, var(--wui-color-bg-100) 65%, transparent) 99.43% + ); + } + } + + .hero-main-icon { + width: 176px; + transition-property: background-color; + transition-duration: var(--wui-duration-lg); + transition-timing-function: var(--wui-ease-out-power-1); + + &[data-state='loading'] { + width: 56px; + } + } + + .hero-row { + display: flex; + flex-direction: row; + align-items: center; + justify-content: center; + gap: var(--wui-spacing-3xs); + flex-wrap: nowrap; + min-width: fit-content; + + &:nth-child(1) { + transform: translateX(-30px); + } + + &:nth-child(2) { + transform: translateX(30px); + } + + &:nth-child(4) { + transform: translateX(40px); + } + + transition-property: height; + transition-duration: var(--wui-duration-md); + transition-timing-function: var(--wui-ease-out-power-1); + height: 68px; + + &[data-state='loading'] { + height: 0px; + } + } + + .hero-row-icon { + opacity: 0.1; + transition-property: opacity; + transition-duration: var(--wui-duration-md); + transition-timing-function: var(--wui-ease-out-power-1); + + &[data-state='loading'] { + opacity: 0; + } + } +`,$=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let k=class extends r.oi{constructor(){super(...arguments),this.email=m.RouterController.state.data?.email??g.R.getAccountData()?.user?.email??"",this.address=g.R.getAccountData()?.address??"",this.loading=!1,this.appName=p.OptionsController.state.metadata?.name??"AppKit",this.siwx=p.OptionsController.state.siwx,this.isRequired=Array.isArray(p.OptionsController.state.remoteFeatures?.emailCapture)&&p.OptionsController.state.remoteFeatures?.emailCapture.includes("required"),this.recentEmails=this.getRecentEmails()}connectedCallback(){this.siwx&&this.siwx instanceof w.z||f.SnackController.showError("ReownAuthentication is not initialized. Please contact support."),super.connectedCallback()}firstUpdated(){this.loading=!1,this.recentEmails=this.getRecentEmails(),this.email&&this.onSubmit()}render(){return(0,r.dy)` + + ${this.hero()} ${this.paragraph()} ${this.emailInput()} ${this.recentEmailsWidget()} + ${this.footerActions()} + + `}hero(){return(0,r.dy)` +
+ ${this.heroRow(["id","mail","wallet","x","solana","qrCode"])} + ${this.heroRow(["mail","farcaster","wallet","discord","mobile","qrCode"])} +
+ ${this.heroIcon("github")} ${this.heroIcon("bank")} + + + ${this.heroIcon("id")} ${this.heroIcon("card")} +
+ ${this.heroRow(["google","id","github","verify","apple","mobile"])} +
+ `}heroRow(e){return(0,r.dy)` +
+ ${e.map(this.heroIcon.bind(this))} +
+ `}heroIcon(e){return(0,r.dy)` + + + `}paragraph(){return this.loading?(0,r.dy)` + We are verifying your account with email + ${this.email} and address + + ${n.Hg.getTruncateString({string:this.address,charsEnd:4,charsStart:4,truncate:"middle"})} , please wait a moment. + `:this.isRequired?(0,r.dy)` + + ${this.appName} requires your email for authentication. + + `:(0,r.dy)` + + + ${this.appName} would like to collect your email. + + + + Don't worry, it's optional—you can skip this step. + + + `}emailInput(){if(this.loading)return null;let e=e=>{this.email=e.detail};return(0,r.dy)` + + {"Enter"===e.key&&this.onSubmit()}} + > + + + + `}recentEmailsWidget(){return 0===this.recentEmails.length||this.loading?null:(0,r.dy)` + {this.email=e.detail,this.onSubmit()}} + > + `}footerActions(){return(0,r.dy)` + + ${this.isRequired?null:(0,r.dy)`Skip this step`} + + + Continue + + + `}async onSubmit(){if(!(this.siwx instanceof w.z)){f.SnackController.showError("ReownAuthentication is not initialized. Please contact support.");return}let e=g.R.getActiveCaipAddress();if(!e)throw Error("Account is not connected.");if(!this.isValidEmail(this.email)){f.SnackController.showError("Please provide a valid email.");return}try{this.loading=!0;let t=await this.siwx.requestEmailOtp({email:this.email,account:e});this.pushRecentEmail(this.email),null===t.uuid?m.RouterController.replace("SIWXSignMessage"):m.RouterController.replace("DataCaptureOtpConfirm",{email:this.email})}catch(e){f.SnackController.showError("Failed to send email OTP"),this.loading=!1}}onSkip(){m.RouterController.replace("SIWXSignMessage")}getRecentEmails(){let e=x.mr.getItem(x.uJ.RECENT_EMAILS);return(e?e.split(","):[]).filter(this.isValidEmail.bind(this)).slice(0,3)}pushRecentEmail(e){let t=Array.from(new Set([e,...this.getRecentEmails()])).slice(0,3);x.mr.setItem(x.uJ.RECENT_EMAILS,t.join(","))}isValidEmail(e){return/^\S+@\S+\.\S+$/u.test(e)}};k.styles=[S],$([(0,o.SB)()],k.prototype,"email",void 0),$([(0,o.SB)()],k.prototype,"address",void 0),$([(0,o.SB)()],k.prototype,"loading",void 0),$([(0,o.SB)()],k.prototype,"appName",void 0),$([(0,o.SB)()],k.prototype,"siwx",void 0),$([(0,o.SB)()],k.prototype,"isRequired",void 0),$([(0,o.SB)()],k.prototype,"recentEmails",void 0),k=$([(0,n.Mo)("w3m-data-capture-view")],k)},55499:function(e,t,i){i.d(t,{m:function(){return k}});var r,o=i(31133),n=i(84927),a=i(86777),s=i(35652),l=i(53357),c=i(66909),u=i(92413);i(96277),i(51437),i(81255),i(5680);var d=i(84249),h=i(3874),p=i(57116),m=i(11131),g=(0,m.iv)` + :host { + position: relative; + display: inline-block; + } + + input { + width: 48px; + height: 48px; + background: ${({tokens:e})=>e.theme.foregroundPrimary}; + border-radius: ${({borderRadius:e})=>e[4]}; + border: 1px solid ${({tokens:e})=>e.theme.borderPrimary}; + font-family: ${({fontFamily:e})=>e.regular}; + font-size: ${({textSize:e})=>e.large}; + line-height: 18px; + letter-spacing: -0.16px; + text-align: center; + color: ${({tokens:e})=>e.theme.textPrimary}; + caret-color: ${({tokens:e})=>e.core.textAccentPrimary}; + transition: + background-color ${({durations:e})=>e.lg} + ${({easings:e})=>e["ease-out-power-2"]}, + border-color ${({durations:e})=>e.lg} + ${({easings:e})=>e["ease-out-power-2"]}, + box-shadow ${({durations:e})=>e.lg} + ${({easings:e})=>e["ease-out-power-2"]}; + will-change: background-color, border-color, box-shadow; + box-sizing: border-box; + -webkit-appearance: none; + -moz-appearance: textfield; + padding: ${({spacing:e})=>e[4]}; + } + + input::-webkit-outer-spin-button, + input::-webkit-inner-spin-button { + -webkit-appearance: none; + margin: 0; + } + + input[type='number'] { + -moz-appearance: textfield; + } + + input:disabled { + cursor: not-allowed; + opacity: 0.5; + } + + input:focus-visible:enabled { + background-color: transparent; + border: 1px solid ${({tokens:e})=>e.theme.borderSecondary}; + box-shadow: 0px 0px 0px 4px ${({tokens:e})=>e.core.foregroundAccent040}; + } +`,f=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let w=class extends o.oi{constructor(){super(...arguments),this.disabled=!1,this.value=""}render(){return(0,o.dy)` `}};w.styles=[d.ET,d.ZM,g],f([(0,n.Cb)({type:Boolean})],w.prototype,"disabled",void 0),f([(0,n.Cb)({type:String})],w.prototype,"value",void 0),w=f([(0,p.M)("wui-input-numeric")],w);var y=(0,o.iv)` + :host { + position: relative; + display: block; + } +`,v=function(e,t,i,r){var o,n=arguments.length,a=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,i,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let b=class extends o.oi{constructor(){super(...arguments),this.length=6,this.otp="",this.values=Array.from({length:this.length}).map(()=>""),this.numerics=[],this.shouldInputBeEnabled=e=>this.values.slice(0,e).every(e=>""!==e),this.handleKeyDown=(e,t)=>{let i=e.target,r=this.getInputElement(i);if(!r)return;["ArrowLeft","ArrowRight","Shift","Delete"].includes(e.key)&&e.preventDefault();let o=r.selectionStart;switch(e.key){case"ArrowLeft":o&&r.setSelectionRange(o+1,o+1),this.focusInputField("prev",t);break;case"ArrowRight":case"Shift":this.focusInputField("next",t);break;case"Delete":case"Backspace":""===r.value?this.focusInputField("prev",t):this.updateInput(r,t,"")}},this.focusInputField=(e,t)=>{if("next"===e){let e=t+1;if(!this.shouldInputBeEnabled(e))return;let i=this.numerics[e-1?e:t],r=i?this.getInputElement(i):void 0;r&&r.focus()}}}firstUpdated(){this.otp&&(this.values=this.otp.split(""));let e=this.shadowRoot?.querySelectorAll("wui-input-numeric");e&&(this.numerics=Array.from(e)),this.numerics[0]?.focus()}render(){return(0,o.dy)` + + ${Array.from({length:this.length}).map((e,t)=>(0,o.dy)` + this.handleInput(e,t)} + @click=${e=>this.selectInput(e)} + @keydown=${e=>this.handleKeyDown(e,t)} + .disabled=${!this.shouldInputBeEnabled(t)} + .value=${this.values[t]||""} + > + + `)} + + `}updateInput(e,t,i){let r=this.numerics[t],o=e||(r?this.getInputElement(r):void 0);o&&(o.value=i,this.values=this.values.map((e,r)=>r===t?i:e))}selectInput(e){let t=e.target;if(t){let e=this.getInputElement(t);e?.select()}}handleInput(e,t){let i=e.target,r=this.getInputElement(i);if(r){let i=r.value;"insertFromPaste"===e.inputType?this.handlePaste(r,i,t):h.H.isNumber(i)&&e.data?(this.updateInput(r,t,e.data),this.focusInputField("next",t)):this.updateInput(r,t,"")}this.dispatchInputChangeEvent()}handlePaste(e,t,i){let r=t[0];if(r&&h.H.isNumber(r)){this.updateInput(e,i,r);let o=t.substring(1);if(i+1=0;s--)(o=e[s])&&(a=(n<3?o(a):n>3?o(t,i,a):o(t,i))||a);return n>3&&a&&Object.defineProperty(t,i,a),a};let k=r=class extends o.oi{firstUpdated(){this.startOTPTimeout()}disconnectedCallback(){clearTimeout(this.OTPTimeout)}constructor(){super(),this.loading=!1,this.timeoutTimeLeft=x.$.getTimeToNextEmailLogin(),this.error="",this.otp="",this.email=a.RouterController.state.data?.email,this.authConnector=s.ConnectorController.getAuthConnector()}render(){if(!this.email)throw Error("w3m-email-otp-widget: No email provided");let e=!!this.timeoutTimeLeft,t=this.getFooterLabels(e);return(0,o.dy)` + + + + The code expires in 20 minutes + + ${this.loading?(0,o.dy)``:(0,o.dy)` + + ${this.error?(0,o.dy)` + + ${this.error}. Try Again + + `:null} + `} + + + ${t.title} + + ${t.action} + + + + `}startOTPTimeout(){this.timeoutTimeLeft=x.$.getTimeToNextEmailLogin(),this.OTPTimeout=setInterval(()=>{this.timeoutTimeLeft>0?this.timeoutTimeLeft=x.$.getTimeToNextEmailLogin():clearInterval(this.OTPTimeout)},1e3)}async onOtpInputChange(e){try{!this.loading&&(this.otp=e.detail,this.shouldSubmitOnOtpChange()&&(this.loading=!0,await this.onOtpSubmit?.(this.otp)))}catch(e){this.error=l.j.parseError(e),this.loading=!1}}async onResendCode(){try{if(this.onOtpResend){if(!this.loading&&!this.timeoutTimeLeft){if(this.error="",this.otp="",!s.ConnectorController.getAuthConnector()||!this.email)throw Error("w3m-email-otp-widget: Unable to resend email");this.loading=!0,await this.onOtpResend(this.email),this.startOTPTimeout(),c.SnackController.showSuccess("Code email resent")}}else this.onStartOver&&this.onStartOver()}catch(e){c.SnackController.showError(e)}finally{this.loading=!1}}getFooterLabels(e){return this.onStartOver?{title:"Something wrong?",action:`Try again ${e?`in ${this.timeoutTimeLeft}s`:""}`}:{title:"Didn't receive it?",action:`Resend ${e?`in ${this.timeoutTimeLeft}s`:"Code"}`}}shouldSubmitOnOtpChange(){return this.authConnector&&this.otp.length===r.OTP_LENGTH}};k.OTP_LENGTH=6,k.styles=S,$([(0,n.SB)()],k.prototype,"loading",void 0),$([(0,n.SB)()],k.prototype,"timeoutTimeLeft",void 0),$([(0,n.SB)()],k.prototype,"error",void 0),k=r=$([(0,u.Mo)("w3m-email-otp-widget")],k)}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/9334-6fd6bff2dc1eb0eb.js b/frontend/.next/static/chunks/9334-6fd6bff2dc1eb0eb.js new file mode 100644 index 0000000..e561080 --- /dev/null +++ b/frontend/.next/static/chunks/9334-6fd6bff2dc1eb0eb.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9334],{24369:function(e,t,r){var s=r(2265),n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=s.useState,u=s.useEffect,o=s.useLayoutEffect,a=s.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!n(e,r)}catch(e){return!0}}var l="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var r=t(),s=i({inst:{value:r,getSnapshot:t}}),n=s[0].inst,l=s[1];return o(function(){n.value=r,n.getSnapshot=t,c(n)&&l({inst:n})},[e,r,t]),u(function(){return c(n)&&l({inst:n}),e(function(){c(n)&&l({inst:n})})},[e]),a(r),r};t.useSyncExternalStore=void 0!==s.useSyncExternalStore?s.useSyncExternalStore:l},92860:function(e,t,r){var s=r(2265),n=r(82558),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},u=n.useSyncExternalStore,o=s.useRef,a=s.useEffect,c=s.useMemo,l=s.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,r,s,n){var h=o(null);if(null===h.current){var d={hasValue:!1,value:null};h.current=d}else d=h.current;var f=u(e,(h=c(function(){function e(e){if(!a){if(a=!0,u=e,e=s(e),void 0!==n&&d.hasValue){var t=d.value;if(n(t,e))return o=t}return o=e}if(t=o,i(u,e))return t;var r=s(e);return void 0!==n&&n(t,r)?(u=e,t):(u=e,o=r)}var u,o,a=!1,c=void 0===r?null:r;return[function(){return e(t())},null===c?void 0:function(){return e(c())}]},[t,r,s,n]))[0],h[1]);return a(function(){d.hasValue=!0,d.value=f},[f]),l(f),f}},82558:function(e,t,r){e.exports=r(24369)},35195:function(e,t,r){e.exports=r(92860)},27534:function(e,t,r){r.d(t,{OP:function(){return o},if:function(){return n},kq:function(){return i}});var s=r(45345);function n(e,t){return(0,s.Q$)(e,t)}function i(e){return JSON.stringify(e,(e,t)=>!function(e){if(!u(e))return!1;let t=e.constructor;if(void 0===t)return!0;let r=t.prototype;return!!(u(r)&&r.hasOwnProperty("isPrototypeOf"))}(t)?"bigint"==typeof t?t.toString():t:Object.keys(t).sort().reduce((e,r)=>(e[r]=t[r],e),{}))}function u(e){return"[object Object]"===Object.prototype.toString.call(e)}function o(e){let{_defaulted:t,behavior:r,gcTime:s,initialData:n,initialDataUpdatedAt:i,maxPages:u,meta:o,networkMode:a,queryFn:c,queryHash:l,queryKey:h,queryKeyHashFn:d,retry:f,retryDelay:p,structuralSharing:y,getPreviousPageParam:v,getNextPageParam:b,initialPageParam:R,_optimisticResults:g,enabled:m,notifyOnChangeProps:Q,placeholderData:S,refetchInterval:O,refetchIntervalInBackground:I,refetchOnMount:C,refetchOnReconnect:E,refetchOnWindowFocus:w,retryOnMount:x,select:T,staleTime:k,suspense:P,throwOnError:F,config:j,connector:D,query:N,..._}=e;return _}},44005:function(e,t,r){function s(e){return e.state.chainId}r.d(t,{x:function(){return u}});var n=r(2265),i=r(12364);function u(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,i.Z)(e);return(0,n.useSyncExternalStore)(e=>(function(e,t){let{onChange:r}=t;return e.subscribe(e=>e.chainId,r)})(t,{onChange:e}),()=>s(t),()=>s(t))}},12364:function(e,t,r){r.d(t,{Z:function(){return c}});var s=r(2265),n=r(78749),i=r(26129);let u=()=>"wagmi@3.1.0";class o extends i.G{constructor(){super(...arguments),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WagmiError"})}get docsBaseUrl(){return"https://wagmi.sh/react"}get version(){return u()}}class a extends o{constructor(){super("`useConfig` must be used within `WagmiProvider`.",{docsPath:"/api/WagmiProvider"}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"WagmiProviderNotFoundError"})}}function c(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=null!==(e=t.config)&&void 0!==e?e:(0,s.useContext)(n.V);if(!r)throw new a;return r}},21843:function(e,t,r){r.d(t,{R:function(){return l}});var s=r(20148),n=r(23317),i=r(12364),u=r(52123),o=r(2265),a=r(35195);let c=e=>"object"==typeof e&&!Array.isArray(e);function l(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=(0,i.Z)(e);return function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:u.v,n=(0,o.useRef)([]),i=(0,a.useSyncExternalStoreWithSelector)(e,t,r,e=>e,(e,t)=>{if(c(e)&&c(t)&&n.current.length){for(let r of n.current)if(!s(e[r],t[r]))return!1;return!0}return s(e,t)});return(0,o.useMemo)(()=>{if(c(i)){let e={...i},t={};for(let[r,s]of Object.entries(e))t={...t,[r]:{configurable:!1,enumerable:!0,get:()=>(n.current.includes(r)||n.current.push(r),s)}};return Object.defineProperties(e,t),e}return i},[i])}(e=>(0,s.Y)(t,{onChange:e}),()=>(0,n.B)(t))}},97074:function(e,t,r){let s;r.d(t,{aM:function(){return k}});var n=r(87045),i=r(18238),u=r(21733),o=r(24112),a=r(16803),c=r(45345),l=r(84554),h=class extends o.l{constructor(e,t){super(),this.options=t,this.#e=e,this.#t=null,this.#r=(0,a.O)(),this.bindMethods(),this.setOptions(t)}#e;#s=void 0;#n=void 0;#i=void 0;#u;#o;#r;#t;#a;#c;#l;#h;#d;#f;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#s.addObserver(this),d(this.#s,this.options)?this.#y():this.updateResult(),this.#v())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return f(this.#s,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return f(this.#s,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#R(),this.#s.removeObserver(this)}setOptions(e){let t=this.options,r=this.#s;if(this.options=this.#e.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof(0,c.Nc)(this.options.enabled,this.#s))throw Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#g(),this.#s.setOptions(this.options),t._defaulted&&!(0,c.VS)(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#s,observer:this});let s=this.hasListeners();s&&p(this.#s,r,this.options,t)&&this.#y(),this.updateResult(),s&&(this.#s!==r||(0,c.Nc)(this.options.enabled,this.#s)!==(0,c.Nc)(t.enabled,this.#s)||(0,c.KC)(this.options.staleTime,this.#s)!==(0,c.KC)(t.staleTime,this.#s))&&this.#m();let n=this.#Q();s&&(this.#s!==r||(0,c.Nc)(this.options.enabled,this.#s)!==(0,c.Nc)(t.enabled,this.#s)||n!==this.#f)&&this.#S(n)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),r=this.createResult(t,e);return(0,c.VS)(this.getCurrentResult(),r)||(this.#i=r,this.#o=this.options,this.#u=this.#s.state),r}getCurrentResult(){return this.#i}trackResult(e,t){return new Proxy(e,{get:(e,r)=>(this.trackProp(r),t?.(r),"promise"!==r||(this.trackProp("data"),this.options.experimental_prefetchInRender||"pending"!==this.#r.status||this.#r.reject(Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(e,r))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#s}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),r=this.#e.getQueryCache().build(this.#e,t);return r.fetch().then(()=>this.createResult(r,t))}fetch(e){return this.#y({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#i))}#y(e){this.#g();let t=this.#s.fetch(this.options,e);return e?.throwOnError||(t=t.catch(c.ZT)),t}#m(){this.#b();let e=(0,c.KC)(this.options.staleTime,this.#s);if(c.sk||this.#i.isStale||!(0,c.PN)(e))return;let t=(0,c.Kp)(this.#i.dataUpdatedAt,e);this.#h=l.mr.setTimeout(()=>{this.#i.isStale||this.updateResult()},t+1)}#Q(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#s):this.options.refetchInterval)??!1}#S(e){this.#R(),this.#f=e,!c.sk&&!1!==(0,c.Nc)(this.options.enabled,this.#s)&&(0,c.PN)(this.#f)&&0!==this.#f&&(this.#d=l.mr.setInterval(()=>{(this.options.refetchIntervalInBackground||n.j.isFocused())&&this.#y()},this.#f))}#v(){this.#m(),this.#S(this.#Q())}#b(){this.#h&&(l.mr.clearTimeout(this.#h),this.#h=void 0)}#R(){this.#d&&(l.mr.clearInterval(this.#d),this.#d=void 0)}createResult(e,t){let r;let s=this.#s,n=this.options,i=this.#i,o=this.#u,l=this.#o,h=e!==s?e.state:this.#n,{state:f}=e,v={...f},b=!1;if(t._optimisticResults){let r=this.hasListeners(),i=!r&&d(e,t),o=r&&p(e,s,t,n);(i||o)&&(v={...v,...(0,u.z)(f.data,e.options)}),"isRestoring"===t._optimisticResults&&(v.fetchStatus="idle")}let{error:R,errorUpdatedAt:g,status:m}=v;r=v.data;let Q=!1;if(void 0!==t.placeholderData&&void 0===r&&"pending"===m){let e;i?.isPlaceholderData&&t.placeholderData===l?.placeholderData?(e=i.data,Q=!0):e="function"==typeof t.placeholderData?t.placeholderData(this.#l?.state.data,this.#l):t.placeholderData,void 0!==e&&(m="success",r=(0,c.oE)(i?.data,e,t),b=!0)}if(t.select&&void 0!==r&&!Q){if(i&&r===o?.data&&t.select===this.#a)r=this.#c;else try{this.#a=t.select,r=t.select(r),r=(0,c.oE)(i?.data,r,t),this.#c=r,this.#t=null}catch(e){this.#t=e}}this.#t&&(R=this.#t,r=this.#c,g=Date.now(),m="error");let S="fetching"===v.fetchStatus,O="pending"===m,I="error"===m,C=O&&S,E=void 0!==r,w={status:m,fetchStatus:v.fetchStatus,isPending:O,isSuccess:"success"===m,isError:I,isInitialLoading:C,isLoading:C,data:r,dataUpdatedAt:v.dataUpdatedAt,error:R,errorUpdatedAt:g,failureCount:v.fetchFailureCount,failureReason:v.fetchFailureReason,errorUpdateCount:v.errorUpdateCount,isFetched:v.dataUpdateCount>0||v.errorUpdateCount>0,isFetchedAfterMount:v.dataUpdateCount>h.dataUpdateCount||v.errorUpdateCount>h.errorUpdateCount,isFetching:S,isRefetching:S&&!O,isLoadingError:I&&!E,isPaused:"paused"===v.fetchStatus,isPlaceholderData:b,isRefetchError:I&&E,isStale:y(e,t),refetch:this.refetch,promise:this.#r,isEnabled:!1!==(0,c.Nc)(t.enabled,e)};if(this.options.experimental_prefetchInRender){let t=e=>{"error"===w.status?e.reject(w.error):void 0!==w.data&&e.resolve(w.data)},r=()=>{t(this.#r=w.promise=(0,a.O)())},n=this.#r;switch(n.status){case"pending":e.queryHash===s.queryHash&&t(n);break;case"fulfilled":("error"===w.status||w.data!==n.value)&&r();break;case"rejected":("error"!==w.status||w.error!==n.reason)&&r()}}return w}updateResult(){let e=this.#i,t=this.createResult(this.#s,this.options);this.#u=this.#s.state,this.#o=this.options,void 0!==this.#u.data&&(this.#l=this.#s),(0,c.VS)(t,e)||(this.#i=t,this.#O({listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,r="function"==typeof t?t():t;if("all"===r||!r&&!this.#p.size)return!0;let s=new Set(r??this.#p);return this.options.throwOnError&&s.add("error"),Object.keys(this.#i).some(t=>this.#i[t]!==e[t]&&s.has(t))})()}))}#g(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#s)return;let t=this.#s;this.#s=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#v()}#O(e){i.Vr.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#i)}),this.#e.getQueryCache().notify({query:this.#s,type:"observerResultsUpdated"})})}};function d(e,t){return!1!==(0,c.Nc)(t.enabled,e)&&void 0===e.state.data&&!("error"===e.state.status&&!1===t.retryOnMount)||void 0!==e.state.data&&f(e,t,t.refetchOnMount)}function f(e,t,r){if(!1!==(0,c.Nc)(t.enabled,e)&&"static"!==(0,c.KC)(t.staleTime,e)){let s="function"==typeof r?r(e):r;return"always"===s||!1!==s&&y(e,t)}return!1}function p(e,t,r,s){return(e!==t||!1===(0,c.Nc)(s.enabled,e))&&(!r.suspense||"error"!==e.state.status)&&y(e,r)}function y(e,t){return!1!==(0,c.Nc)(t.enabled,e)&&e.isStaleByTime((0,c.KC)(t.staleTime,e))}var v=r(2265),b=r(29827);r(57437);var R=v.createContext((s=!1,{clearReset:()=>{s=!1},reset:()=>{s=!0},isReset:()=>s})),g=()=>v.useContext(R),m=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&!t.isReset()&&(e.retryOnMount=!1)},Q=e=>{v.useEffect(()=>{e.clearReset()},[e])},S=e=>{let{result:t,errorResetBoundary:r,throwOnError:s,query:n,suspense:i}=e;return t.isError&&!r.isReset()&&!t.isFetching&&n&&(i&&void 0===t.data||(0,c.L3)(s,[t.error,n]))},O=v.createContext(!1),I=()=>v.useContext(O);O.Provider;var C=e=>{if(e.suspense){let t=e=>"static"===e?e:Math.max(e??1e3,1e3),r=e.staleTime;e.staleTime="function"==typeof r?(...e)=>t(r(...e)):t(r),"number"==typeof e.gcTime&&(e.gcTime=Math.max(e.gcTime,1e3))}},E=(e,t)=>e.isLoading&&e.isFetching&&!t,w=(e,t)=>e?.suspense&&t.isPending,x=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()}),T=r(27534);function k(e){let t=function(e,t,r){var s,n,u,o,a;let l=I(),h=g(),d=(0,b.NL)(r),f=d.defaultQueryOptions(e);null===(n=d.getDefaultOptions().queries)||void 0===n||null===(s=n._experimental_beforeQuery)||void 0===s||s.call(n,f),f._optimisticResults=l?"isRestoring":"optimistic",C(f),m(f,h),Q(h);let p=!d.getQueryCache().get(f.queryHash),[y]=v.useState(()=>new t(d,f)),R=y.getOptimisticResult(f),O=!l&&!1!==e.subscribed;if(v.useSyncExternalStore(v.useCallback(e=>{let t=O?y.subscribe(i.Vr.batchCalls(e)):c.ZT;return y.updateResult(),t},[y,O]),()=>y.getCurrentResult(),()=>y.getCurrentResult()),v.useEffect(()=>{y.setOptions(f)},[f,y]),w(f,R))throw x(f,y,h);if(S({result:R,errorResetBoundary:h,throwOnError:f.throwOnError,query:d.getQueryCache().get(f.queryHash),suspense:f.suspense}))throw R.error;if(null===(o=d.getDefaultOptions().queries)||void 0===o||null===(u=o._experimental_afterQuery)||void 0===u||u.call(o,f,R),f.experimental_prefetchInRender&&!c.sk&&E(R,l)){let e=p?x(f,y,h):null===(a=d.getQueryCache().get(f.queryHash))||void 0===a?void 0:a.promise;null==e||e.catch(c.ZT).finally(()=>{y.updateResult()})}return f.notifyOnChangeProps?R:y.trackResult(R)}({...e,queryKeyHashFn:T.kq},h,void 0);return t.queryKey=e.queryKey,t}}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/9365.33fd392ca47b0dac.js b/frontend/.next/static/chunks/9365.33fd392ca47b0dac.js new file mode 100644 index 0000000..eac61af --- /dev/null +++ b/frontend/.next/static/chunks/9365.33fd392ca47b0dac.js @@ -0,0 +1,14 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9365],{63049:function(c,s,t){t.r(s),t.d(s,{PhSealCheck:function(){return S}}),t(31498);var e=t(38157),r=t(48567),l=t(54910),C=t(69709),a=t(78313),i=Object.defineProperty,o=Object.getOwnPropertyDescriptor,h=(c,s,t,e)=>{for(var r,l=e>1?void 0:e?o(s,t):s,C=c.length-1;C>=0;C--)(r=c[C])&&(l=(e?r(s,t,l):r(l))||l);return e&&l&&i(s,t,l),l};let S=class extends r.oi{constructor(){super(...arguments),this.size="1em",this.weight="regular",this.color="currentColor",this.mirrored=!1}render(){var c;return(0,e.dy)` + ${S.weightsMap.get(null!=(c=this.weight)?c:"regular")} + `}};S.weightsMap=new Map([["thin",(0,e.YP)``],["light",(0,e.YP)``],["regular",(0,e.YP)``],["bold",(0,e.YP)``],["fill",(0,e.YP)``],["duotone",(0,e.YP)``]]),S.styles=(0,a.iv)` + :host { + display: contents; + } + `,h([(0,C.C)({type:String,reflect:!0})],S.prototype,"size",2),h([(0,C.C)({type:String,reflect:!0})],S.prototype,"weight",2),h([(0,C.C)({type:String,reflect:!0})],S.prototype,"color",2),h([(0,C.C)({type:Boolean,reflect:!0})],S.prototype,"mirrored",2),S=h([(0,l.M)("ph-seal-check")],S)}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/9504.e446f47ea8377b76.js b/frontend/.next/static/chunks/9504.e446f47ea8377b76.js new file mode 100644 index 0000000..8e19af3 --- /dev/null +++ b/frontend/.next/static/chunks/9504.e446f47ea8377b76.js @@ -0,0 +1,14 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9504],{49504:function(a,t,e){e.r(t),e.d(t,{PhTrash:function(){return l}}),e(31498);var r=e(38157),h=e(48567),V=e(54910),H=e(69709),i=e(78313),o=Object.defineProperty,s=Object.getOwnPropertyDescriptor,p=(a,t,e,r)=>{for(var h,V=r>1?void 0:r?s(t,e):t,H=a.length-1;H>=0;H--)(h=a[H])&&(V=(r?h(t,e,V):h(V))||V);return r&&V&&o(t,e,V),V};let l=class extends h.oi{constructor(){super(...arguments),this.size="1em",this.weight="regular",this.color="currentColor",this.mirrored=!1}render(){var a;return(0,r.dy)` + ${l.weightsMap.get(null!=(a=this.weight)?a:"regular")} + `}};l.weightsMap=new Map([["thin",(0,r.YP)``],["light",(0,r.YP)``],["regular",(0,r.YP)``],["bold",(0,r.YP)``],["fill",(0,r.YP)``],["duotone",(0,r.YP)``]]),l.styles=(0,i.iv)` + :host { + display: contents; + } + `,p([(0,H.C)({type:String,reflect:!0})],l.prototype,"size",2),p([(0,H.C)({type:String,reflect:!0})],l.prototype,"weight",2),p([(0,H.C)({type:String,reflect:!0})],l.prototype,"color",2),p([(0,H.C)({type:Boolean,reflect:!0})],l.prototype,"mirrored",2),l=p([(0,V.M)("ph-trash")],l)}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/9696-5b6c7fdaabd5dd98.js b/frontend/.next/static/chunks/9696-5b6c7fdaabd5dd98.js new file mode 100644 index 0000000..ed2cabd --- /dev/null +++ b/frontend/.next/static/chunks/9696-5b6c7fdaabd5dd98.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9696],{10052:function(t,e,n){n.d(e,{b:function(){return i}});var r=n(81544);class i extends r.G{constructor({address:t}){super(`Address "${t}" is invalid.`,{metaMessages:["- Address must be a hex value of 20 bytes (40 hex characters).","- Address must match its checksum counterpart."],name:"InvalidAddressError"})}}},81544:function(t,e,n){n.d(e,{G:function(){return o}});let r="2.42.1",i={getDocsUrl:({docsBaseUrl:t,docsPath:e="",docsSlug:n})=>e?`${t??"https://viem.sh"}${e}${n?`#${n}`:""}`:void 0,version:`viem@${r}`};class o extends Error{constructor(t,e={}){let n=e.cause instanceof o?e.cause.details:e.cause?.message?e.cause.message:e.details,s=e.cause instanceof o&&e.cause.docsPath||e.docsPath,u=i.getDocsUrl?.({...e,docsPath:s});super([t||"An error occurred.","",...e.metaMessages?[...e.metaMessages,""]:[],...u?[`Docs: ${u}`]:[],...n?[`Details: ${n}`]:[],...i.version?[`Version: ${i.version}`]:[]].join("\n"),e.cause?{cause:e.cause}:void 0),Object.defineProperty(this,"details",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"docsPath",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"metaMessages",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"shortMessage",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"version",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:"BaseError"}),this.details=n,this.docsPath=s,this.metaMessages=e.metaMessages,this.name=e.name??this.name,this.shortMessage=t,this.version=r}walk(t){return function t(e,n){return n?.(e)?e:e&&"object"==typeof e&&"cause"in e&&void 0!==e.cause?t(e.cause,n):n?null:e}(this,t)}}},47116:function(t,e,n){n.d(e,{$s:function(){return o},W_:function(){return s},mV:function(){return i}});var r=n(81544);class i extends r.G{constructor({offset:t,position:e,size:n}){super(`Slice ${"start"===e?"starting":"ending"} at offset "${t}" is out-of-bounds (size: ${n}).`,{name:"SliceOffsetOutOfBoundsError"})}}class o extends r.G{constructor({size:t,targetSize:e,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} size (${t}) exceeds padding size (${e}).`,{name:"SizeExceedsPaddingSizeError"})}}class s extends r.G{constructor({size:t,targetSize:e,type:n}){super(`${n.charAt(0).toUpperCase()}${n.slice(1).toLowerCase()} is expected to be ${e} ${n} long, but is ${t} ${n} long.`,{name:"InvalidBytesLengthError"})}}},63152:function(t,e,n){n.d(e,{Cd:function(){return s},J5:function(){return i},M6:function(){return u},yr:function(){return o}});var r=n(81544);class i extends r.G{constructor({max:t,min:e,signed:n,size:r,value:i}){super(`Number "${i}" is not in safe ${r?`${8*r}-bit ${n?"signed":"unsigned"} `:""}integer range ${t?`(${e} to ${t})`:`(above ${e})`}`,{name:"IntegerOutOfRangeError"})}}class o extends r.G{constructor(t){super(`Bytes value "${t}" is not a valid boolean. The bytes array must contain a single byte of either a 0 or 1 value.`,{name:"InvalidBytesBooleanError"})}}class s extends r.G{constructor(t){super(`Hex value "${t}" is not a valid boolean. The hex value must be "0x0" (false) or "0x1" (true).`,{name:"InvalidHexBooleanError"})}}class u extends r.G{constructor({givenSize:t,maxSize:e}){super(`Size cannot exceed ${e} bytes. Given size: ${t} bytes.`,{name:"SizeOverflowError"})}}},31669:function(t,e,n){n.d(e,{K:function(){return a},x:function(){return c}});var r=n(10052),i=n(44659),o=n(13169),s=n(82061),u=n(4012);let f=new s.k(8192);function c(t,e){if(f.has(`${t}.${e}`))return f.get(`${t}.${e}`);let n=e?`${e}${t.toLowerCase()}`:t.substring(2).toLowerCase(),r=(0,o.w)((0,i.qX)(n),"bytes"),s=(e?n.substring(`${e}0x`.length):n).split("");for(let t=0;t<40;t+=2)r[t>>1]>>4>=8&&s[t]&&(s[t]=s[t].toUpperCase()),(15&r[t>>1])>=8&&s[t+1]&&(s[t+1]=s[t+1].toUpperCase());let u=`0x${s.join("")}`;return f.set(`${t}.${e}`,u),u}function a(t,e){if(!(0,u.U)(t,{strict:!1}))throw new r.b({address:t});return c(t,e)}},4012:function(t,e,n){n.d(e,{U:function(){return u}});var r=n(82061),i=n(31669);let o=/^0x[a-fA-F0-9]{40}$/,s=new r.k(8192);function u(t,e){let{strict:n=!0}=e??{},r=`${t}.${n}`;if(s.has(r))return s.get(r);let u=!!o.test(t)&&(t.toLowerCase()===t||!n||(0,i.x)(t)===t);return s.set(r,u),u}},89256:function(t,e,n){function r(t){return"string"==typeof t[0]?i(t):function(t){let e=0;for(let n of t)e+=n.length;let n=new Uint8Array(e),r=0;for(let e of t)n.set(e,r),r+=e.length;return n}(t)}function i(t){return`0x${t.reduce((t,e)=>t+e.replace("0x",""),"")}`}n.d(e,{SM:function(){return i},zo:function(){return r}})},93610:function(t,e,n){n.d(e,{v:function(){return r}});function r(t,{strict:e=!0}={}){return!!t&&"string"==typeof t&&(e?/^0x[0-9a-fA-F]*$/.test(t):t.startsWith("0x"))}},8796:function(t,e,n){n.d(e,{gc:function(){return o},vk:function(){return i}});var r=n(47116);function i(t,{dir:e,size:n=32}={}){return"string"==typeof t?o(t,{dir:e,size:n}):function(t,{dir:e,size:n=32}={}){if(null===n)return t;if(t.length>n)throw new r.$s({size:t.length,targetSize:n,type:"bytes"});let i=new Uint8Array(n);for(let r=0;r2*n)throw new r.$s({size:Math.ceil(i.length/2),targetSize:n,type:"hex"});return`0x${i["right"===e?"padEnd":"padStart"](2*n,"0")}`}},20556:function(t,e,n){n.d(e,{d:function(){return i}});var r=n(93610);function i(t){return(0,r.v)(t,{strict:!1})?Math.ceil((t.length-2)/2):t.length}},36826:function(t,e,n){n.d(e,{f:function(){return r}});function r(t,{dir:e="left"}={}){let n="string"==typeof t?t.replace("0x",""):t,r=0;for(let t=0;te)throw new r.M6({givenSize:(0,i.d)(t),maxSize:e})}function f(t,e={}){let{signed:n}=e;e.size&&u(t,{size:e.size});let r=BigInt(t);if(!n)return r;let i=(t.length-2)/2;return r<=(1n<<8n*BigInt(i)-1n)-1n?r:r-BigInt(`0x${"f".padStart(2*i,"f")}`)-1n}function c(t,e={}){let n=t;if(e.size&&(u(n,{size:e.size}),n=(0,o.f)(n)),"0x00"===(0,o.f)(n))return!1;if("0x01"===(0,o.f)(n))return!0;throw new r.Cd(n)}function a(t,e={}){return Number(f(t,e))}function l(t,e={}){let n=(0,s.nr)(t);return e.size&&(u(n,{size:e.size}),n=(0,o.f)(n,{dir:"right"})),new TextDecoder().decode(n)}},44659:function(t,e,n){n.d(e,{O0:function(){return c},nr:function(){return h},qX:function(){return d}});var r=n(81544),i=n(93610),o=n(8796),s=n(72932),u=n(59455);let f=new TextEncoder;function c(t,e={}){return"number"==typeof t||"bigint"==typeof t?h((0,u.eC)(t,e)):"boolean"==typeof t?function(t,e={}){let n=new Uint8Array(1);return(n[0]=Number(t),"number"==typeof e.size)?((0,s.Yf)(n,{size:e.size}),(0,o.vk)(n,{size:e.size})):n}(t,e):(0,i.v)(t)?h(t,e):d(t,e)}let a={zero:48,nine:57,A:65,F:70,a:97,f:102};function l(t){return t>=a.zero&&t<=a.nine?t-a.zero:t>=a.A&&t<=a.F?t-(a.A-10):t>=a.a&&t<=a.f?t-(a.a-10):void 0}function h(t,e={}){let n=t;e.size&&((0,s.Yf)(n,{size:e.size}),n=(0,o.vk)(n,{dir:"right",size:e.size}));let i=n.slice(2);i.length%2&&(i=`0${i}`);let u=i.length/2,f=new Uint8Array(u);for(let t=0,e=0;te.toString(16).padStart(2,"0"));function u(t,e={}){return"number"==typeof t||"bigint"==typeof t?a(t,e):"string"==typeof t?h(t,e):"boolean"==typeof t?f(t,e):c(t,e)}function f(t,e={}){let n=`0x${Number(t)}`;return"number"==typeof e.size?((0,o.Yf)(n,{size:e.size}),(0,i.vk)(n,{size:e.size})):n}function c(t,e={}){let n="";for(let e=0;en||uthis.maxSize){let t=this.keys().next().value;t&&this.delete(t)}return this}}},69021:function(t,e,n){n.d(e,{R:function(){return l}});var r=n(31669),i=n(13169),o=n(93610),s=n(20556),u=n(72932),f=n(59455);async function c({hash:t,signature:e}){let r=(0,o.v)(t)?t:(0,f.NC)(t),{secp256k1:i}=await Promise.all([n.e(58),n.e(846)]).then(n.bind(n,10846)),c=(()=>{if("object"==typeof e&&"r"in e&&"s"in e){let{r:t,s:n,v:r,yParity:o}=e,s=a(Number(o??r));return new i.Signature((0,u.y_)(t),(0,u.y_)(n)).addRecoveryBit(s)}let t=(0,o.v)(e)?e:(0,f.NC)(e);if(65!==(0,s.d)(t))throw Error("invalid signature length");let n=a((0,u.ly)(`0x${t.slice(130)}`));return i.Signature.fromCompact(t.substring(2,130)).addRecoveryBit(n)})().recoverPublicKey(r.substring(2)).toHex(!1);return`0x${c}`}function a(t){if(0===t||1===t)return t;if(27===t)return 0;if(28===t)return 1;throw Error("Invalid yParityOrV value")}async function l({hash:t,signature:e}){return function(t){let e=(0,i.w)(`0x${t.substring(4)}`).substring(26);return(0,r.x)(`0x${e}`)}(await c({hash:t,signature:e}))}},42802:function(t,e,n){n.d(e,{$p:function(){return l},EP:function(){return h},FL:function(){return a},Fn:function(){return v},IH:function(){return b},Iq:function(){return u},NI:function(){return s},Ou:function(){return c},SD:function(){return g},Vl:function(){return o},Xb:function(){return w},ac:function(){return y},gm:function(){return d},m_:function(){return f},mk:function(){return p},pp:function(){return x},u8:function(){return m},zP:function(){return $}});let r=BigInt(4294967296-1),i=BigInt(32);function o(t,e=!1){let n=t.length,o=new Uint32Array(n),s=new Uint32Array(n);for(let u=0;u>i&r)}:{h:0|Number(t>>i&r),l:0|Number(t&r)}}(t[u],e);[o[u],s[u]]=[n,f]}return[o,s]}let s=(t,e,n)=>t>>>n,u=(t,e,n)=>t<<32-n|e>>>n,f=(t,e,n)=>t>>>n|e<<32-n,c=(t,e,n)=>t<<32-n|e>>>n,a=(t,e,n)=>t<<64-n|e>>>n-32,l=(t,e,n)=>t>>>n-32|e<<64-n,h=(t,e,n)=>t<>>32-n,d=(t,e,n)=>e<>>32-n,g=(t,e,n)=>e<>>64-n,p=(t,e,n)=>t<>>64-n;function b(t,e,n,r){let i=(e>>>0)+(r>>>0);return{h:t+n+(i/4294967296|0)|0,l:0|i}}let y=(t,e,n)=>(t>>>0)+(e>>>0)+(n>>>0),v=(t,e,n,r)=>e+n+r+(t/4294967296|0)|0,w=(t,e,n,r)=>(t>>>0)+(e>>>0)+(n>>>0)+(r>>>0),m=(t,e,n,r,i)=>e+n+r+i+(t/4294967296|0)|0,$=(t,e,n,r,i)=>(t>>>0)+(e>>>0)+(n>>>0)+(r>>>0)+(i>>>0),x=(t,e,n,r,i,o)=>e+n+r+i+o+(t/4294967296|0)|0},52250:function(t,e,n){n.d(e,{fr:function(){return m}});var r=n(42802),i=n(61714);let o=BigInt(0),s=BigInt(1),u=BigInt(2),f=BigInt(7),c=BigInt(256),a=BigInt(113),l=[],h=[],d=[];for(let t=0,e=s,n=1,r=0;t<24;t++){[n,r]=[r,(2*n+3*r)%5],l.push(2*(5*r+n)),h.push((t+1)*(t+2)/2%64);let i=o;for(let t=0;t<7;t++)(e=(e<>f)*a)%c)&u&&(i^=s<<(s<n>32?(0,r.SD)(t,e,n):(0,r.EP)(t,e,n),v=(t,e,n)=>n>32?(0,r.mk)(t,e,n):(0,r.gm)(t,e,n);class w extends i.kb{constructor(t,e,n,r=!1,o=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=t,this.suffix=e,this.outputLen=n,this.enableXOF=r,this.rounds=o,(0,i.k8)(n),!(0=n&&this.keccak();let o=Math.min(n-this.posOut,i-r);t.set(e.subarray(this.posOut,this.posOut+o),r),this.posOut+=o,r+=o}return t}xofInto(t){if(!this.enableXOF)throw Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return(0,i.k8)(t),this.xofInto(new Uint8Array(t))}digestInto(t){if((0,i.eB)(t,this),this.finished)throw Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,(0,i.ru)(this.state)}_cloneInto(t){let{blockLen:e,suffix:n,outputLen:r,rounds:i,enableXOF:o}=this;return t||(t=new w(e,n,r,o,i)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=i,t.suffix=n,t.outputLen=r,t.enableXOF=o,t.destroyed=this.destroyed,t}}let m=(0,i.V1)(()=>new w(136,1,32))},61714:function(t,e,n){n.d(e,{kb:function(){return b},gk:function(){return o},$h:function(){return u},z3:function(){return s},k8:function(){return i},eB:function(){return f},ru:function(){return a},eV:function(){return p},V1:function(){return y},GL:function(){return l},O6:function(){return v},np:function(){return h},Ux:function(){return d},O0:function(){return g},Jq:function(){return c}});let r="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0;function i(t){if(!Number.isSafeInteger(t)||t<0)throw Error("positive integer expected, got "+t)}function o(t,...e){if(!(t instanceof Uint8Array||ArrayBuffer.isView(t)&&"Uint8Array"===t.constructor.name))throw Error("Uint8Array expected");if(e.length>0&&!e.includes(t.length))throw Error("Uint8Array expected of length "+e+", got length="+t.length)}function s(t){if("function"!=typeof t||"function"!=typeof t.create)throw Error("Hash should be wrapped by utils.createHasher");i(t.outputLen),i(t.blockLen)}function u(t,e=!0){if(t.destroyed)throw Error("Hash instance has been destroyed");if(e&&t.finished)throw Error("Hash#digest() has already been called")}function f(t,e){o(t);let n=e.outputLen;if(t.length>>e}let d=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0]?t=>t:function(t){for(let n=0;n>>8&65280|e>>>24&255}return t};function g(t){return"string"==typeof t&&(t=function(t){if("string"!=typeof t)throw Error("string expected");return new Uint8Array(new TextEncoder().encode(t))}(t)),o(t),t}function p(...t){let e=0;for(let n=0;nt().update(g(e)).digest(),n=t();return e.outputLen=n.outputLen,e.blockLen=n.blockLen,e.create=()=>t(),e}function v(t=32){if(r&&"function"==typeof r.getRandomValues)return r.getRandomValues(new Uint8Array(t));if(r&&"function"==typeof r.randomBytes)return Uint8Array.from(r.randomBytes(t));throw Error("crypto.getRandomValues must be defined")}}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/9984.9143581f48043503.js b/frontend/.next/static/chunks/9984.9143581f48043503.js new file mode 100644 index 0000000..d80df7e --- /dev/null +++ b/frontend/.next/static/chunks/9984.9143581f48043503.js @@ -0,0 +1,14 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9984],{9984:function(t,e,r){r.r(e),r.d(e,{PhDeviceMobile:function(){return V}}),r(31498);var a=r(38157),h=r(48567),i=r(54910),o=r(69709),s=r(78313),H=Object.defineProperty,l=Object.getOwnPropertyDescriptor,p=(t,e,r,a)=>{for(var h,i=a>1?void 0:a?l(e,r):e,o=t.length-1;o>=0;o--)(h=t[o])&&(i=(a?h(e,r,i):h(i))||i);return a&&i&&H(e,r,i),i};let V=class extends h.oi{constructor(){super(...arguments),this.size="1em",this.weight="regular",this.color="currentColor",this.mirrored=!1}render(){var t;return(0,a.dy)` + ${V.weightsMap.get(null!=(t=this.weight)?t:"regular")} + `}};V.weightsMap=new Map([["thin",(0,a.YP)``],["light",(0,a.YP)``],["regular",(0,a.YP)``],["bold",(0,a.YP)``],["fill",(0,a.YP)``],["duotone",(0,a.YP)``]]),V.styles=(0,s.iv)` + :host { + display: contents; + } + `,p([(0,o.C)({type:String,reflect:!0})],V.prototype,"size",2),p([(0,o.C)({type:String,reflect:!0})],V.prototype,"weight",2),p([(0,o.C)({type:String,reflect:!0})],V.prototype,"color",2),p([(0,o.C)({type:Boolean,reflect:!0})],V.prototype,"mirrored",2),V=p([(0,i.M)("ph-device-mobile")],V)}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/app/_not-found/page-2ad85929c0b183a6.js b/frontend/.next/static/chunks/app/_not-found/page-2ad85929c0b183a6.js new file mode 100644 index 0000000..9834c5f --- /dev/null +++ b/frontend/.next/static/chunks/app/_not-found/page-2ad85929c0b183a6.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7409],{67589:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_not-found/page",function(){return n(83634)}])},83634:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return s}}),n(47043);let i=n(57437);n(2265);let o={fontFamily:'system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"',height:"100vh",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},l={display:"inline-block"},r={display:"inline-block",margin:"0 20px 0 0",padding:"0 23px 0 0",fontSize:24,fontWeight:500,verticalAlign:"top",lineHeight:"49px"},d={fontSize:14,fontWeight:400,lineHeight:"49px",margin:0};function s(){return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("title",{children:"404: This page could not be found."}),(0,i.jsx)("div",{style:o,children:(0,i.jsxs)("div",{children:[(0,i.jsx)("style",{dangerouslySetInnerHTML:{__html:"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}),(0,i.jsx)("h1",{className:"next-error-h1",style:r,children:"404"}),(0,i.jsx)("div",{style:l,children:(0,i.jsx)("h2",{style:d,children:"This page could not be found."})})]})})]})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}},function(e){e.O(0,[2971,2117,1744],function(){return e(e.s=67589)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/app/admin/disputes/page-5acf569624362b32.js b/frontend/.next/static/chunks/app/admin/disputes/page-5acf569624362b32.js new file mode 100644 index 0000000..a404958 --- /dev/null +++ b/frontend/.next/static/chunks/app/admin/disputes/page-5acf569624362b32.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1435],{37383:function(e,t,s){Promise.resolve().then(s.bind(s,38690))},38690:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return h}});var n=s(57437),i=s(2265),r=s(21843),d=s(80014),a=s(80432),o=s(8517),l=s(54506),c=s(33145);function u(e){let{evidence:t}=e,s=t.evidenceHash.startsWith("0x")?null:(0,o.k8)(t.evidenceHash),i=2===t.evidenceType,r=3===t.evidenceType;return(0,n.jsxs)("div",{className:"p-4 bg-gray-50 border border-gray-200 rounded-lg",children:[(0,n.jsxs)("div",{className:"flex justify-between items-start mb-3",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("h4",{className:"font-semibold text-gray-800",children:(0,o.gJ)(t.evidenceType)}),(0,n.jsxs)("p",{className:"text-sm text-gray-600 mt-1",children:["Submitted by ",t.submittedBy.slice(0,6),"...",t.submittedBy.slice(-4)]})]}),(0,n.jsx)("span",{className:"text-xs text-gray-500",children:(0,l.Z)(new Date(1e3*Number(t.timestamp)),{addSuffix:!0})})]}),t.description&&(0,n.jsx)("p",{className:"text-gray-700 mb-3",children:t.description}),s&&(0,n.jsxs)("div",{className:"mt-4",children:[i&&(0,n.jsx)("div",{className:"relative w-full h-64 bg-gray-100 rounded-lg overflow-hidden",children:(0,n.jsx)(c.default,{src:s,alt:"Evidence",fill:!0,className:"object-contain",onError:e=>{e.target.style.display="none"}})}),r&&(0,n.jsx)("video",{src:s,controls:!0,className:"w-full rounded-lg",children:"Your browser does not support the video tag."}),!i&&!r&&(0,n.jsxs)("a",{href:s,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700",children:["View Evidence",(0,n.jsx)("svg",{className:"ml-2 w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})})]})]}),(0,n.jsxs)("div",{className:"mt-3 text-xs text-gray-500",children:["Evidence ID: ",t.evidenceId.toString(),t.evidenceHash&&(0,n.jsxs)("span",{className:"ml-2 font-mono",children:["Hash: ",t.evidenceHash.slice(0,16),"..."]})]})]})}var m=s(2398);function x(e){let{disputeId:t}=e,{address:s}=(0,r.R)(),{dispute:o,isLoading:l}=(0,d.$I)(t),{evidence:c,isLoading:x}=(0,d.bC)(t),{votes:p,isLoading:g}=(0,d.Cz)(t),{resolveDisputeManually:h,submitVote:b,hash:v}=(0,d.nz)(),[f,y]=(0,i.useState)(!0),[j,N]=(0,i.useState)(100),[I,w]=(0,i.useState)(""),[k,D]=(0,i.useState)(!1),{isLoading:T,isSuccess:C}=(0,m.A)({hash:v}),E=async()=>{if(o&&!k){D(!0);try{await h(t,f,BigInt(j))}catch(e){console.error("Resolution error:",e),D(!1)}}},S=async()=>{if(!I.trim()){alert("Please provide a justification for your vote");return}try{await b(t,f,BigInt(j),I)}catch(e){console.error("Vote error:",e)}};if(l||!o)return(0,n.jsx)("div",{className:"p-6 bg-white rounded-lg shadow-md",children:(0,n.jsxs)("div",{className:"animate-pulse space-y-4",children:[(0,n.jsx)("div",{className:"h-6 bg-gray-200 rounded w-1/4"}),(0,n.jsx)("div",{className:"h-32 bg-gray-200 rounded"})]})});if(o.isResolved)return(0,n.jsxs)("div",{className:"p-6 bg-white rounded-lg shadow-md",children:[(0,n.jsxs)("h2",{className:"text-2xl font-bold text-gray-800 mb-4",children:["Dispute #",o.disputeId.toString()]}),(0,n.jsxs)("div",{className:"p-4 bg-gray-50 rounded-lg",children:[(0,n.jsx)("p",{className:"text-lg font-semibold",children:"Status: Resolved"}),(0,n.jsxs)("p",{className:"text-gray-700 mt-2",children:["Refund: ",o.refundApproved?"".concat(Number(o.refundPercentage),"% approved"):"Denied"]}),(0,n.jsxs)("p",{className:"text-sm text-gray-600 mt-2",children:["Resolved by: ",o.resolvedBy.slice(0,6),"...",o.resolvedBy.slice(-4)]})]})]});let P=o.resolutionType===a.Jm.PendingVote;return(0,n.jsx)("div",{className:"space-y-6",children:(0,n.jsxs)("div",{className:"p-6 bg-white rounded-lg shadow-md",children:[(0,n.jsxs)("h2",{className:"text-2xl font-bold text-gray-800 mb-4",children:["Dispute #",o.disputeId.toString()]}),(0,n.jsxs)("div",{className:"grid grid-cols-2 gap-4 mb-6",children:[(0,n.jsxs)("div",{className:"p-4 bg-gray-50 rounded-lg",children:[(0,n.jsx)("p",{className:"text-sm text-gray-600",children:"Booking ID"}),(0,n.jsx)("p",{className:"text-lg font-semibold",children:o.bookingId.toString()})]}),(0,n.jsxs)("div",{className:"p-4 bg-gray-50 rounded-lg",children:[(0,n.jsx)("p",{className:"text-sm text-gray-600",children:"Escrow ID"}),(0,n.jsx)("p",{className:"text-lg font-semibold",children:o.escrowId.toString()})]})]}),(0,n.jsxs)("div",{className:"mb-6",children:[(0,n.jsx)("h3",{className:"text-lg font-semibold text-gray-800 mb-2",children:"Reason"}),(0,n.jsx)("p",{className:"text-gray-700 p-4 bg-gray-50 rounded-lg",children:o.reason})]}),c&&c.length>0&&(0,n.jsxs)("div",{className:"mb-6",children:[(0,n.jsx)("h3",{className:"text-lg font-semibold text-gray-800 mb-4",children:"Evidence"}),(0,n.jsx)("div",{className:"space-y-4",children:c.map(e=>(0,n.jsx)(u,{evidence:e},e.evidenceId.toString()))})]}),P&&p&&p.length>0&&(0,n.jsxs)("div",{className:"mb-6",children:[(0,n.jsxs)("h3",{className:"text-lg font-semibold text-gray-800 mb-4",children:["Votes (",p.length,")"]}),(0,n.jsx)("div",{className:"space-y-2",children:p.map((e,t)=>(0,n.jsx)("div",{className:"p-3 bg-gray-50 rounded-lg",children:(0,n.jsxs)("div",{className:"flex justify-between items-start",children:[(0,n.jsxs)("div",{children:[(0,n.jsxs)("p",{className:"font-medium",children:[e.voter.slice(0,6),"...",e.voter.slice(-4)]}),(0,n.jsx)("p",{className:"text-sm text-gray-600 mt-1",children:e.justification})]}),(0,n.jsx)("span",{className:"px-2 py-1 rounded text-xs ".concat(e.supportsRefund?"bg-green-100 text-green-800":"bg-red-100 text-red-800"),children:e.supportsRefund?"Refund":"Deny"})]})},t))})]}),P?(0,n.jsxs)("div",{className:"p-4 bg-blue-50 border border-blue-200 rounded-lg",children:[(0,n.jsx)("h3",{className:"text-lg font-semibold text-gray-800 mb-4",children:"Submit Vote"}),(0,n.jsxs)("div",{className:"space-y-4",children:[(0,n.jsx)("div",{children:(0,n.jsxs)("label",{className:"flex items-center space-x-2",children:[(0,n.jsx)("input",{type:"checkbox",checked:f,onChange:e=>y(e.target.checked),className:"rounded"}),(0,n.jsx)("span",{children:"Support refund"})]})}),(0,n.jsxs)("div",{children:[(0,n.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Refund Percentage (if approved)"}),(0,n.jsx)("input",{type:"number",min:"0",max:"100",value:j,onChange:e=>N(Number(e.target.value)),className:"w-full px-4 py-2 border border-gray-300 rounded-lg"})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Justification *"}),(0,n.jsx)("textarea",{value:I,onChange:e=>w(e.target.value),rows:3,className:"w-full px-4 py-2 border border-gray-300 rounded-lg",placeholder:"Explain your vote..."})]}),(0,n.jsx)("button",{onClick:S,disabled:T||!I.trim(),className:"px-6 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 disabled:bg-gray-400",children:T?"Submitting...":"Submit Vote"})]})]}):(0,n.jsxs)("div",{className:"p-4 bg-yellow-50 border border-yellow-200 rounded-lg",children:[(0,n.jsx)("h3",{className:"text-lg font-semibold text-gray-800 mb-4",children:"Manual Resolution"}),(0,n.jsxs)("div",{className:"space-y-4",children:[(0,n.jsx)("div",{children:(0,n.jsxs)("label",{className:"flex items-center space-x-2",children:[(0,n.jsx)("input",{type:"checkbox",checked:f,onChange:e=>y(e.target.checked),className:"rounded"}),(0,n.jsx)("span",{children:"Approve refund"})]})}),(0,n.jsxs)("div",{children:[(0,n.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Refund Percentage (0-100)"}),(0,n.jsx)("input",{type:"number",min:"0",max:"100",value:j,onChange:e=>N(Number(e.target.value)),className:"w-full px-4 py-2 border border-gray-300 rounded-lg"})]}),(0,n.jsx)("button",{onClick:E,disabled:k||T,className:"px-6 py-2 bg-yellow-600 text-white rounded-lg hover:bg-yellow-700 disabled:bg-gray-400",children:k||T?"Resolving...":"Resolve Dispute"})]})]})]})})}var p=s(89416),g=s(44005);function h(){let{address:e,isConnected:t}=(0,r.R)(),s=(0,g.x)(),[d,o]=(0,i.useState)(""),[l,c]=(0,i.useState)(null),u=44787===s?a.$Y.alfajores:a.$Y.celo,{data:m}=(0,p.u)({address:u,abi:a.aT,functionName:"moderators",args:e?[e]:void 0,query:{enabled:!!e&&!!u}});return t?!1===m?(0,n.jsx)("div",{className:"container mx-auto px-4 py-8",children:(0,n.jsx)("div",{className:"max-w-2xl mx-auto",children:(0,n.jsxs)("div",{className:"p-6 bg-red-50 border border-red-200 rounded-lg text-center",children:[(0,n.jsx)("h2",{className:"text-xl font-semibold text-red-800 mb-2",children:"Access Denied"}),(0,n.jsx)("p",{className:"text-red-700",children:"You are not authorized to access this admin panel."})]})})}):(0,n.jsx)("div",{className:"container mx-auto px-4 py-8",children:(0,n.jsxs)("div",{className:"max-w-6xl mx-auto",children:[(0,n.jsxs)("div",{className:"mb-8",children:[(0,n.jsx)("h1",{className:"text-3xl font-bold text-gray-800 mb-4",children:"Admin Dispute Panel"}),(0,n.jsx)("p",{className:"text-gray-600",children:"Review and resolve disputes"})]}),(0,n.jsx)("div",{className:"mb-6",children:(0,n.jsxs)("div",{className:"flex gap-4",children:[(0,n.jsx)("input",{type:"number",placeholder:"Enter Dispute ID",value:d,onChange:e=>o(e.target.value),className:"flex-1 px-4 py-2 border border-gray-300 rounded-lg"}),(0,n.jsx)("button",{onClick:()=>{d&&c(BigInt(d))},className:"px-6 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700",children:"Load Dispute"})]})}),l&&(0,n.jsx)(x,{disputeId:l}),!l&&(0,n.jsx)("div",{className:"p-6 bg-gray-50 border border-gray-200 rounded-lg text-center",children:(0,n.jsx)("p",{className:"text-gray-600",children:"Enter a dispute ID to view details"})})]})}):(0,n.jsx)("div",{className:"container mx-auto px-4 py-8",children:(0,n.jsx)("div",{className:"max-w-2xl mx-auto",children:(0,n.jsxs)("div",{className:"p-6 bg-yellow-50 border border-yellow-200 rounded-lg text-center",children:[(0,n.jsx)("h2",{className:"text-xl font-semibold text-yellow-800 mb-2",children:"Wallet Not Connected"}),(0,n.jsx)("p",{className:"text-yellow-700",children:"Please connect your wallet to access the admin panel."})]})})})}},80432:function(e,t,s){"use strict";s.d(t,{$Y:function(){return a},Jm:function(){return i},aT:function(){return d}});var n,i,r=s(40257);let d=["event DisputeFiled(uint256 indexed disputeId, uint256 indexed escrowId, uint256 indexed bookingId, address filedBy, address opposingParty, string reason, uint8 resolutionType)","event EvidenceSubmitted(uint256 indexed evidenceId, uint256 indexed disputeId, address submittedBy, uint8 evidenceType, bytes evidenceHash)","event CheckInRecorded(uint256 indexed bookingId, uint256 checkInTime, address verifiedBy)","event CheckOutRecorded(uint256 indexed bookingId, uint256 checkOutTime, address verifiedBy)","event AutomatedResolution(uint256 indexed disputeId, bool refundApproved, uint256 refundPercentage, string reason)","event VoteSubmitted(uint256 indexed disputeId, address indexed voter, bool supportsRefund, uint256 weight)","event DisputeResolved(uint256 indexed disputeId, address resolvedBy, bool refundApproved, uint256 refundPercentage, uint8 resolutionType)","function fileDispute(uint256 escrowId, uint256 bookingId, string memory reason, bytes memory evidenceHash, uint8 evidenceType) external returns (uint256)","function submitEvidence(uint256 disputeId, uint8 evidenceType, bytes memory evidenceHash, string memory description) external","function recordCheckIn(uint256 bookingId, uint256 checkInTime) external","function recordCheckOut(uint256 bookingId, uint256 checkOutTime) external","function submitVote(uint256 disputeId, bool supportsRefund, uint256 refundPercentage, string memory justification) external","function resolveDisputeManually(uint256 disputeId, bool refundApproved, uint256 refundPercentage) external","function getDispute(uint256 disputeId) external view returns (tuple(uint256 disputeId, uint256 escrowId, uint256 bookingId, address filedBy, address opposingParty, string reason, bytes primaryEvidenceHash, uint256 filedAt, uint8 resolutionType, bool isResolved, address resolvedBy, uint256 resolvedAt, bool refundApproved, uint256 refundPercentage))","function getDisputeEvidence(uint256 disputeId) external view returns (tuple(uint256 evidenceId, uint256 disputeId, address submittedBy, uint8 evidenceType, bytes evidenceHash, uint256 timestamp, string description)[])","function getCheckInData(uint256 bookingId) external view returns (tuple(uint256 bookingId, uint256 checkInTime, uint256 checkOutTime, bool checkedIn, bool checkedOut, address verifiedBy))","function getDisputeVotes(uint256 disputeId) external view returns (tuple(address voter, bool supportsRefund, uint256 weight, uint256 timestamp, string justification)[])","function getDisputeByEscrowId(uint256 escrowId) external view returns (tuple(uint256 disputeId, uint256 escrowId, uint256 bookingId, address filedBy, address opposingParty, string reason, bytes primaryEvidenceHash, uint256 filedAt, uint8 resolutionType, bool isResolved, address resolvedBy, uint256 resolvedAt, bool refundApproved, uint256 refundPercentage))"],a={alfajores:r.env.NEXT_PUBLIC_DISPUTE_RESOLUTION_ADDRESS_ALFAJORES||"",celo:r.env.NEXT_PUBLIC_DISPUTE_RESOLUTION_ADDRESS_CELO||""};(n=i||(i={}))[n.Automated=0]="Automated",n[n.PendingVote=1]="PendingVote",n[n.Manual=2]="Manual"},80014:function(e,t,s){"use strict";s.d(t,{$I:function(){return l},Cz:function(){return u},bC:function(){return c},nz:function(){return o}});var n=s(21843),i=s(6115),r=s(89416),d=s(80432),a=s(44005);function o(){let{address:e}=(0,n.R)(),t=(0,a.x)(),{writeContract:s,data:r,isPending:o,error:l}=(0,i.S)(),c=44787===t?d.$Y.alfajores:d.$Y.celo;return{fileDispute:async(e,t,n,i,r)=>s({address:c,abi:d.aT,functionName:"fileDispute",args:[e,t,n,i,r]}),submitEvidence:async(e,t,n,i)=>s({address:c,abi:d.aT,functionName:"submitEvidence",args:[e,t,n,i]}),recordCheckIn:async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:BigInt(Math.floor(Date.now()/1e3));return s({address:c,abi:d.aT,functionName:"recordCheckIn",args:[e,t]})},recordCheckOut:async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:BigInt(Math.floor(Date.now()/1e3));return s({address:c,abi:d.aT,functionName:"recordCheckOut",args:[e,t]})},submitVote:async(e,t,n,i)=>s({address:c,abi:d.aT,functionName:"submitVote",args:[e,t,n,i]}),resolveDisputeManually:async(e,t,n)=>s({address:c,abi:d.aT,functionName:"resolveDisputeManually",args:[e,t,n]}),hash:r,isPending:o,error:l}}function l(e){let t=44787===(0,a.x)()?d.$Y.alfajores:d.$Y.celo,{data:s,isLoading:n,error:i}=(0,r.u)({address:t,abi:d.aT,functionName:"getDispute",args:e?[e]:void 0,query:{enabled:!!e}});return{dispute:s,isLoading:n,error:i}}function c(e){let t=44787===(0,a.x)()?d.$Y.alfajores:d.$Y.celo,{data:s,isLoading:n,error:i}=(0,r.u)({address:t,abi:d.aT,functionName:"getDisputeEvidence",args:e?[e]:void 0,query:{enabled:!!e}});return{evidence:s,isLoading:n,error:i}}function u(e){let t=44787===(0,a.x)()?d.$Y.alfajores:d.$Y.celo,{data:s,isLoading:n,error:i}=(0,r.u)({address:t,abi:d.aT,functionName:"getDisputeVotes",args:e?[e]:void 0,query:{enabled:!!e}});return{votes:s,isLoading:n,error:i}}},8517:function(e,t,s){"use strict";s.d(t,{O_:function(){return a},VO:function(){return o},gJ:function(){return u},k8:function(){return l},kq:function(){return i},mC:function(){return c}});var n,i,r=s(82957).lW,d=s(40257);async function a(e,t){let s=new FormData;s.append("file",e);try{let e=await fetch("/api/ipfs/upload",{method:"POST",body:s});if(!e.ok)throw Error("Failed to upload to IPFS");return(await e.json()).hash}catch(e){throw console.error("IPFS upload error:",e),e}}function o(e){return"0x"+r.from(e).toString("hex").slice(0,64)}function l(e){let t=d.env.NEXT_PUBLIC_IPFS_GATEWAY||"https://ipfs.io/ipfs/";return"".concat(t).concat(e)}function c(e,t,s){if(!s||0===s.trim().length)return{valid:!1,error:"Evidence description is required"};if(2===e||3===e||4===e){if(!t)return{valid:!1,error:"File is required for this evidence type"};if(t.size>10485760)return{valid:!1,error:"File size exceeds 10MB limit"};if(2===e&&t.type.startsWith("image/")&&!["image/jpeg","image/png","image/webp","image/gif"].includes(t.type))return{valid:!1,error:"Invalid image format. Allowed: JPEG, PNG, WebP, GIF"};if(3===e&&t.type.startsWith("video/")&&!["video/mp4","video/webm","video/quicktime"].includes(t.type))return{valid:!1,error:"Invalid video format. Allowed: MP4, WebM, QuickTime"}}return{valid:!0}}function u(e){return({0:"Check-in Timestamp",1:"Check-out Timestamp",2:"Image",3:"Video",4:"Document",5:"Location Data",6:"Other"})[e]||"Unknown"}(n=i||(i={}))[n.CheckInTimestamp=0]="CheckInTimestamp",n[n.CheckOutTimestamp=1]="CheckOutTimestamp",n[n.Image=2]="Image",n[n.Video=3]="Video",n[n.Document=4]="Document",n[n.LocationData=5]="LocationData",n[n.Other=6]="Other"}},function(e){e.O(0,[9696,58,642,9334,7846,4506,249,2971,2117,1744],function(){return e(e.s=37383)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/app/booking/[spotId]/page-0a7ad3c86813496b.js b/frontend/.next/static/chunks/app/booking/[spotId]/page-0a7ad3c86813496b.js new file mode 100644 index 0000000..6b3bb1c --- /dev/null +++ b/frontend/.next/static/chunks/app/booking/[spotId]/page-0a7ad3c86813496b.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8568],{3801:function(e,s,t){Promise.resolve().then(t.bind(t,8843))},8843:function(e,s,t){"use strict";t.r(s),t.d(s,{default:function(){return u}});var r=t(57437),a=t(2265),n=t(35475),l=t(45562);function i(e){let{spot:s,onSelect:t}=e,[n,l]=(0,a.useState)(null),[i,o]=(0,a.useState)("09:00"),[c,d]=(0,a.useState)("17:00"),m=()=>{if(!i||!c)return 0;let e=parseInt(i.split(":")[0]),s=parseInt(c.split(":")[0]);return(s>e?s-e:24-e+s)||1};return(0,r.jsxs)("div",{className:"space-y-6",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Select Date *"}),(0,r.jsx)("div",{className:"border border-gray-300 rounded-lg p-4",children:(0,r.jsx)("input",{type:"date",min:new Date().toISOString().split("T")[0],value:n?n.toISOString().split("T")[0]:"",onChange:e=>l(e.target.value?new Date(e.target.value):null),className:"w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500",required:!0})})]}),(0,r.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Start Time *"}),(0,r.jsx)("input",{type:"time",value:i,onChange:e=>o(e.target.value),className:"w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500",required:!0})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"End Time *"}),(0,r.jsx)("input",{type:"time",value:c,onChange:e=>d(e.target.value),min:i,className:"w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500",required:!0})]})]}),n&&i&&c&&(0,r.jsx)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4",children:(0,r.jsxs)("div",{className:"flex justify-between items-center",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-sm text-gray-600",children:"Duration"}),(0,r.jsxs)("p",{className:"text-lg font-semibold",children:[m()," hour(s)"]})]}),(0,r.jsxs)("div",{className:"text-right",children:[(0,r.jsx)("p",{className:"text-sm text-gray-600",children:"Estimated Cost"}),(0,r.jsxs)("p",{className:"text-lg font-semibold text-blue-600",children:[(()=>{let e=m();return(parseFloat(s.pricePerHour)*e).toFixed(2)})()," cUSD"]})]})]})}),(0,r.jsx)("div",{className:"flex justify-end",children:(0,r.jsx)("button",{onClick:()=>{if(!n){alert("Please select a date");return}t(n,i,c)},disabled:!n||!i||!c,className:"px-6 py-3 bg-blue-600 text-white rounded-lg hover:bg-blue-700 disabled:bg-gray-400 disabled:cursor-not-allowed transition-colors",children:"Continue to Summary"})})]})}function o(e){let{spot:s,selectedDate:t,startTime:n,endTime:l,onBack:i,onConfirm:o,userAddress:c}=e,{createBooking:d,loading:m,error:x}=function(){let[e,s]=(0,a.useState)(!1),[t,r]=(0,a.useState)(null);return{createBooking:(0,a.useCallback)(async(e,t)=>{s(!0),r(null);try{await new Promise(e=>setTimeout(e,2e3));let e="booking_".concat(Date.now()),s="0x".concat(Math.random().toString(16).substring(2,66));return{success:!0,bookingId:e,transactionHash:s}}catch(s){let e=s.message||"Failed to create booking";return r(e),{success:!1,error:e}}finally{s(!1)}},[]),loading:e,error:t}}(),[u,g]=(0,a.useState)(!1),h=(()=>{let e=parseInt(n.split(":")[0]),s=parseInt(l.split(":")[0]);return s>e?s-e:24-e+s||1})(),b=parseFloat(s.pricePerHour)*h,p=.05*b,j=b+p,f=async()=>{g(!0);try{let e={spotId:s.id,date:t.toISOString(),startTime:n,endTime:l,hours:h,totalCost:j.toString()};(await d(e,c)).success&&o()}catch(e){console.error("Booking error:",e)}finally{g(!1)}};return(0,r.jsxs)("div",{className:"space-y-6",children:[(0,r.jsx)("h3",{className:"text-xl font-semibold",children:"Booking Summary"}),(0,r.jsx)("div",{className:"border border-gray-200 rounded-lg p-4",children:(0,r.jsxs)("div",{className:"space-y-3",children:[(0,r.jsxs)("div",{className:"flex justify-between",children:[(0,r.jsx)("span",{className:"text-gray-600",children:"Location:"}),(0,r.jsx)("span",{className:"font-medium",children:s.location})]}),(0,r.jsxs)("div",{className:"flex justify-between",children:[(0,r.jsx)("span",{className:"text-gray-600",children:"Date:"}),(0,r.jsx)("span",{className:"font-medium",children:t.toLocaleDateString()})]}),(0,r.jsxs)("div",{className:"flex justify-between",children:[(0,r.jsx)("span",{className:"text-gray-600",children:"Time:"}),(0,r.jsxs)("span",{className:"font-medium",children:[n," - ",l]})]}),(0,r.jsxs)("div",{className:"flex justify-between",children:[(0,r.jsx)("span",{className:"text-gray-600",children:"Duration:"}),(0,r.jsxs)("span",{className:"font-medium",children:[h," hour(s)"]})]})]})}),(0,r.jsxs)("div",{className:"border border-gray-200 rounded-lg p-4",children:[(0,r.jsx)("h4",{className:"font-semibold mb-3",children:"Cost Breakdown"}),(0,r.jsxs)("div",{className:"space-y-2",children:[(0,r.jsxs)("div",{className:"flex justify-between text-gray-700",children:[(0,r.jsxs)("span",{children:["Subtotal (",h," hrs \xd7 ",s.pricePerHour," cUSD/hr):"]}),(0,r.jsxs)("span",{children:[b.toFixed(2)," cUSD"]})]}),(0,r.jsxs)("div",{className:"flex justify-between text-gray-700",children:[(0,r.jsx)("span",{children:"Service Fee (5%):"}),(0,r.jsxs)("span",{children:[p.toFixed(2)," cUSD"]})]}),(0,r.jsxs)("div",{className:"border-t pt-2 mt-2 flex justify-between text-lg font-bold",children:[(0,r.jsx)("span",{children:"Total:"}),(0,r.jsxs)("span",{className:"text-blue-600",children:[j.toFixed(2)," cUSD"]})]})]})]}),x&&(0,r.jsx)("div",{className:"p-4 bg-red-50 border border-red-200 rounded-lg text-red-700",children:x}),(0,r.jsxs)("div",{className:"flex gap-4",children:[(0,r.jsx)("button",{onClick:i,disabled:u||m,className:"flex-1 px-6 py-3 border border-gray-300 rounded-lg hover:bg-gray-50 disabled:opacity-50",children:"Back"}),(0,r.jsx)("button",{onClick:f,disabled:u||m,className:"flex-1 px-6 py-3 bg-blue-600 text-white rounded-lg hover:bg-blue-700 disabled:bg-gray-400 disabled:cursor-not-allowed transition-colors",children:u||m?"Processing...":"Confirm Booking"})]})]})}t(21005);var c=t(72081);function d(e){let{bookingId:s,spot:t,signature:a,userAddress:n}=e;return(0,r.jsxs)("div",{className:"bg-white rounded-lg shadow-lg p-8 text-center",children:[(0,r.jsxs)("div",{className:"mb-6",children:[(0,r.jsx)("div",{className:"w-16 h-16 bg-green-100 rounded-full flex items-center justify-center mx-auto mb-4",children:(0,r.jsx)("svg",{className:"w-8 h-8 text-green-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}),(0,r.jsx)("h2",{className:"text-3xl font-bold text-gray-900 mb-2",children:"Booking Confirmed!"}),(0,r.jsx)("p",{className:"text-gray-600",children:"Your parking spot has been successfully booked"})]}),(0,r.jsx)("div",{className:"mb-6",children:(0,r.jsx)(c.Z,{bookingId:s,spotId:t.id,spotLocation:t.location,signature:a,signerAddress:n})}),(0,r.jsxs)("div",{className:"border-t pt-6 space-y-3",children:[(0,r.jsxs)("div",{className:"flex justify-between",children:[(0,r.jsx)("span",{className:"text-gray-600",children:"Booking ID:"}),(0,r.jsx)("span",{className:"font-medium break-all text-right ml-4",children:s})]}),(0,r.jsxs)("div",{className:"flex justify-between",children:[(0,r.jsx)("span",{className:"text-gray-600",children:"Spot Location:"}),(0,r.jsx)("span",{className:"font-medium text-right ml-4",children:t.location})]}),n&&(0,r.jsxs)("div",{className:"flex justify-between",children:[(0,r.jsx)("span",{className:"text-gray-600",children:"Booked By:"}),(0,r.jsx)("span",{className:"font-medium text-right ml-4 break-all text-xs",children:n})]})]}),(0,r.jsxs)("div",{className:"mt-8 flex flex-col sm:flex-row gap-4 justify-center",children:[(0,r.jsx)("button",{onClick:()=>window.location.href="/bookings",className:"px-6 py-3 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors",children:"View Booking History"}),(0,r.jsx)("button",{onClick:()=>window.print(),className:"px-6 py-3 border border-gray-300 rounded-lg hover:bg-gray-50 transition-colors",children:"Save Receipt"})]})]})}function m(e){let{spot:s,userAddress:t}=e,[n,l]=(0,a.useState)("select-time"),[c,m]=(0,a.useState)(null),[x,u]=(0,a.useState)(""),[g,h]=(0,a.useState)(""),[b,p]=(0,a.useState)(null),[j,f]=(0,a.useState)(null),[y,N]=(0,a.useState)(null),v=async()=>{if(!c||!x||!g){N("Please select date and time");return}l("confirming"),N(null);try{await new Promise(e=>setTimeout(e,2e3));let e="booking_".concat(Date.now()),s="0x"+Array.from({length:64},()=>Math.floor(16*Math.random()).toString(16)).join("");p(e),f(s),l("confirmed")}catch(e){N(e.message||"Failed to create booking"),l("summary")}};return"confirmed"===n&&b?(0,r.jsx)(d,{bookingId:b,spot:s,signature:j||void 0,userAddress:t}):(0,r.jsxs)("div",{className:"bg-white rounded-lg shadow-lg p-6",children:[(0,r.jsx)("h2",{className:"text-2xl font-semibold mb-6",children:"Book Parking Spot"}),y&&(0,r.jsx)("div",{className:"mb-4 p-4 bg-red-50 border border-red-200 rounded-lg text-red-700",children:y}),"select-time"===n&&(0,r.jsx)(i,{spot:s,onSelect:(e,s,t)=>{m(e),u(s),h(t),l("summary")}}),"summary"===n&&c&&(0,r.jsx)(o,{spot:s,selectedDate:c,startTime:x,endTime:g,onBack:()=>{l("select-time"),N(null)},onConfirm:v,userAddress:t}),"confirming"===n&&(0,r.jsxs)("div",{className:"text-center py-12",children:[(0,r.jsx)("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto mb-4"}),(0,r.jsx)("p",{className:"text-lg text-gray-600",children:"Processing your booking..."}),(0,r.jsx)("p",{className:"text-sm text-gray-500 mt-2",children:"Please confirm the transaction in your wallet"})]})]})}function x(e){let{spot:s}=e;return(0,r.jsxs)("div",{className:"bg-white rounded-lg shadow-lg overflow-hidden mb-6",children:[(0,r.jsx)("div",{className:"w-full h-64 bg-gray-200 flex items-center justify-center",children:s.images&&s.images.length>0?(0,r.jsxs)("span",{className:"text-gray-500",children:["Image: ",s.images[0]]}):(0,r.jsx)("span",{className:"text-gray-400",children:"No image available"})}),(0,r.jsxs)("div",{className:"p-6",children:[(0,r.jsx)("h1",{className:"text-3xl font-bold mb-4",children:s.location}),(0,r.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"text-4xl font-bold text-blue-600",children:s.pricePerHour}),(0,r.jsx)("span",{className:"text-gray-500 ml-2",children:"cUSD/hour"})]}),(0,r.jsx)("span",{className:"px-4 py-2 rounded-full text-sm font-medium ".concat(s.isAvailable?"bg-green-100 text-green-800":"bg-red-100 text-red-800"),children:s.isAvailable?"Available":"Unavailable"})]}),(0,r.jsx)("p",{className:"text-gray-700 mb-4",children:s.description}),(0,r.jsxs)("div",{className:"border-t pt-4 text-sm text-gray-500",children:[(0,r.jsxs)("p",{children:["Owner: ",s.owner]}),(0,r.jsxs)("p",{children:["Spot ID: #",s.id]})]})]})]})}function u(){let e=(0,n.useParams)().spotId,[s,t]=(0,a.useState)(!1),[i,o]=(0,a.useState)(null),[c,d]=(0,a.useState)(null),[u,g]=(0,a.useState)(!0);(0,a.useEffect)(()=>{h()},[e]);let h=async()=>{g(!0);try{d({id:e,location:"123 Main St, San Francisco, CA",pricePerHour:"2.50",images:["QmExample1","QmExample2"],description:"Convenient street parking near downtown",owner:"0x123...",isAvailable:!0})}catch(e){console.error("Error fetching spot:",e)}finally{g(!1)}};return u?(0,r.jsx)("main",{className:"min-h-screen p-8 bg-gray-50",children:(0,r.jsx)("div",{className:"max-w-4xl mx-auto",children:(0,r.jsx)(BookingLoading,{})})}):error||!c?(0,r.jsx)("main",{className:"min-h-screen p-8 bg-gray-50",children:(0,r.jsx)("div",{className:"max-w-4xl mx-auto",children:(0,r.jsxs)("div",{className:"text-center py-12",children:[(0,r.jsx)("p",{className:"text-red-600 mb-2",children:"Error loading spot"}),(0,r.jsx)("p",{className:"text-sm text-gray-500",children:error||"Spot not found"})]})})}):s?(0,r.jsx)(BookingErrorBoundary,{children:(0,r.jsx)("main",{className:"min-h-screen p-8 bg-gray-50",children:(0,r.jsxs)("div",{className:"max-w-4xl mx-auto",children:[(0,r.jsx)(x,{spot:c}),(0,r.jsx)(m,{spot:c,userAddress:i})]})})}):(0,r.jsx)("main",{className:"min-h-screen p-8 bg-gray-50",children:(0,r.jsxs)("div",{className:"max-w-4xl mx-auto",children:[(0,r.jsx)(x,{spot:c}),(0,r.jsxs)("div",{className:"mt-8 bg-white rounded-lg shadow p-8 text-center",children:[(0,r.jsx)("p",{className:"text-lg text-gray-600 mb-6",children:"Please connect your wallet to book this parking spot"}),(0,r.jsx)(l.Z,{onConnect:e=>{o(e),t(!0)}})]})]})})}},45562:function(e,s,t){"use strict";t.d(s,{Z:function(){return a}});var r=t(57437);function a(e){let{onConnect:s}=e,t=async()=>{s("0x1234567890123456789012345678901234567890")};return(0,r.jsx)("button",{onClick:t,className:"px-6 py-3 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors",children:"Connect Wallet"})}},72081:function(e,s,t){"use strict";t.d(s,{Z:function(){return i}});var r=t(57437),a=t(2265),n=t(35398),l=t(41960);function i(e){let{bookingId:s,spotId:t,spotLocation:i,signature:o,signerAddress:c,timestamp:d,onSave:m}=e,[x,u]=(0,a.useState)(!1),g=(0,a.useMemo)(()=>(0,l.CS)(s,t,i,o,c,d),[s,t,i,o,c,d]);return(0,r.jsxs)("div",{className:"bg-white rounded-lg shadow-lg p-6 md:p-8 text-center max-w-sm mx-auto w-full",children:[(0,r.jsx)("h3",{className:"text-xl font-semibold mb-4",children:"Your Booking QR Code"}),(0,r.jsx)("p",{className:"text-sm text-gray-600 mb-6",children:"Show this QR code at the parking location for access"}),(0,r.jsx)("div",{className:"bg-gray-50 rounded-lg p-4 md:p-6 inline-block mb-6 w-full flex justify-center",children:(0,r.jsx)("div",{className:"bg-white p-4 rounded-lg inline-block border-2 border-gray-300",children:(0,r.jsx)(n.ZP,{id:"qr-code-canvas",value:g,size:200,level:"H",includeMargin:!0,className:"w-full h-auto"})})}),(0,r.jsxs)("div",{className:"space-y-3",children:[(0,r.jsxs)("div",{className:"text-sm text-gray-600",children:[(0,r.jsxs)("p",{children:["Booking ID: ",(0,r.jsx)("span",{className:"font-mono font-medium break-all",children:s})]}),o&&(0,r.jsxs)("p",{className:"mt-2 text-xs text-green-600 flex items-center justify-center gap-1",children:[(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4",viewBox:"0 0 20 20",fill:"currentColor",children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})}),"Digitally Signed"]})]}),(0,r.jsxs)("div",{className:"flex flex-col sm:flex-row gap-3 justify-center pt-4",children:[(0,r.jsx)("button",{onClick:()=>{u(!0);let e=document.getElementById("qr-code-canvas");if(e){let t=e.toDataURL("image/png"),r=document.createElement("a");r.download="booking-".concat(s,"-qr.png"),r.href=t,r.click()}u(!1),m&&m()},disabled:x,className:"px-6 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 disabled:bg-gray-400 transition-colors w-full sm:w-auto",children:x?"Downloading...":"Save QR Code"}),(0,r.jsx)("button",{onClick:()=>window.print(),className:"px-6 py-2 border border-gray-300 rounded-lg hover:bg-gray-50 transition-colors w-full sm:w-auto",children:"Print"})]})]})]})}},41960:function(e,s,t){"use strict";t.d(s,{CS:function(){return a},hV:function(){return n},yR:function(){return l}});var r=t(48790);function a(e,s,t,r,a,n){return JSON.stringify({bookingId:e,spotId:s,location:t,timestamp:n||Date.now(),type:"parking_access",signature:r,signerAddress:a})}function n(e){try{let s=JSON.parse(e);if(!s.bookingId||!s.spotId||!s.type)return null;return s}catch(e){return null}}async function l(e,s){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:48;if(Date.now()-e.timestamp>36e5*t)return{valid:!1,error:"QR code expired"};if(e.signature&&s){var a,n;if(!e.signerAddress||e.signerAddress.toLowerCase()!==s.toLowerCase())return{valid:!1,error:"Signer address mismatch"};let t=(a=e.bookingId,n=e.timestamp,"Access Request for Booking: ".concat(a,"\nTimestamp: ").concat(n));try{if(!await (0,r.n)({address:s,message:t,signature:e.signature}))return{valid:!1,error:"Invalid signature"}}catch(e){return{valid:!1,error:"Signature verification failed"}}}else if(s)return{valid:!1,error:"Missing signature"};return{valid:!0}}},21005:function(){}},function(e){e.O(0,[7360,9696,3676,2971,2117,1744],function(){return e(e.s=3801)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/app/bookings/page-89d0871cb1841d6f.js b/frontend/.next/static/chunks/app/bookings/page-89d0871cb1841d6f.js new file mode 100644 index 0000000..20bafd4 --- /dev/null +++ b/frontend/.next/static/chunks/app/bookings/page-89d0871cb1841d6f.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5926],{82506:function(e,t,s){Promise.resolve().then(s.bind(s,498))},498:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return d}});var n=s(57437),a=s(2265),r=s(45562),i=s(72081);function l(e){let{booking:t}=e,[s,r]=(0,a.useState)(!1);return(0,n.jsxs)("div",{className:"bg-white border border-gray-200 rounded-lg p-6 hover:shadow-lg transition-shadow",children:[(0,n.jsxs)("div",{className:"flex justify-between items-start mb-4",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("h3",{className:"text-lg font-semibold",children:t.spotLocation}),(0,n.jsxs)("p",{className:"text-sm text-gray-500",children:["Booking #",t.id.slice(-8)]})]}),(0,n.jsx)("span",{className:"px-3 py-1 rounded-full text-xs font-medium ".concat((e=>{switch(e){case"confirmed":case"active":return"bg-green-100 text-green-800";case"pending":return"bg-yellow-100 text-yellow-800";case"completed":return"bg-blue-100 text-blue-800";case"cancelled":return"bg-red-100 text-red-800";default:return"bg-gray-100 text-gray-800"}})(t.status)),children:t.status})]}),(0,n.jsxs)("div",{className:"space-y-2 mb-4",children:[(0,n.jsxs)("div",{className:"flex justify-between text-sm",children:[(0,n.jsx)("span",{className:"text-gray-600",children:"Date:"}),(0,n.jsx)("span",{className:"font-medium",children:new Date(t.date).toLocaleDateString()})]}),(0,n.jsxs)("div",{className:"flex justify-between text-sm",children:[(0,n.jsx)("span",{className:"text-gray-600",children:"Time:"}),(0,n.jsxs)("span",{className:"font-medium",children:[t.startTime," - ",t.endTime]})]}),(0,n.jsxs)("div",{className:"flex justify-between text-sm",children:[(0,n.jsx)("span",{className:"text-gray-600",children:"Cost:"}),(0,n.jsxs)("span",{className:"font-medium text-blue-600",children:[t.totalCost," cUSD"]})]}),t.transactionHash&&(0,n.jsxs)("div",{className:"flex justify-between text-xs",children:[(0,n.jsx)("span",{className:"text-gray-500",children:"TX:"}),(0,n.jsxs)("span",{className:"font-mono text-gray-500",children:[t.transactionHash.slice(0,10),"..."]})]})]}),(0,n.jsxs)("div",{className:"flex gap-2 pt-4 border-t",children:[(0,n.jsxs)("button",{onClick:()=>r(!s),className:"flex-1 px-4 py-2 text-sm bg-blue-100 text-blue-700 rounded-lg hover:bg-blue-200 transition-colors",children:[s?"Hide":"Show"," QR Code"]}),(0,n.jsx)("button",{onClick:()=>window.location.href="/booking/".concat(t.spotId),className:"px-4 py-2 text-sm border border-gray-300 rounded-lg hover:bg-gray-50 transition-colors",children:"View Details"})]}),s&&(0,n.jsx)("div",{className:"mt-4 pt-4 border-t text-center",children:(0,n.jsx)("div",{className:"flex justify-center",children:(0,n.jsx)(i.Z,{bookingId:t.id,spotId:t.spotId,spotLocation:t.spotLocation,signature:t.signature,signerAddress:t.signerAddress,timestamp:new Date(t.date).getTime()})})})]})}function o(e){let{filter:t,onFilterChange:s,searchQuery:a,onSearchChange:r}=e;return(0,n.jsx)("div",{className:"bg-white rounded-lg shadow p-4 mb-6",children:(0,n.jsxs)("div",{className:"flex flex-col md:flex-row gap-4",children:[(0,n.jsx)("div",{className:"flex-1",children:(0,n.jsx)("input",{type:"text",placeholder:"Search bookings...",value:a,onChange:e=>r(e.target.value),className:"w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500"})}),(0,n.jsx)("div",{className:"flex gap-2",children:["all","pending","active","completed"].map(e=>(0,n.jsx)("button",{onClick:()=>s(e),className:"px-4 py-2 rounded-lg text-sm font-medium transition-colors ".concat(t===e?"bg-blue-600 text-white":"bg-gray-100 text-gray-700 hover:bg-gray-200"),children:e.charAt(0).toUpperCase()+e.slice(1)},e))})]})})}function c(e){let{userAddress:t}=e,[s,r]=(0,a.useState)([]),[i,c]=(0,a.useState)(!0),[d,u]=(0,a.useState)("all"),[x,m]=(0,a.useState)("");(0,a.useEffect)(()=>{g()},[t]);let g=async()=>{c(!0);try{await new Promise(e=>setTimeout(e,1e3));let e=[{id:"booking_123456789",spotId:"spot_1",spotLocation:"123 Main St, San Francisco, CA",date:new Date().toISOString(),startTime:"10:00",endTime:"14:00",totalCost:"15.00",status:"confirmed",signature:"0x789...signature",signerAddress:t||"0x123...user",transactionHash:"0xabc...tx"},{id:"booking_987654321",spotId:"spot_2",spotLocation:"456 Market St, San Francisco, CA",date:new Date(Date.now()-864e5).toISOString(),startTime:"09:00",endTime:"11:00",totalCost:"10.00",status:"completed",signature:"0x456...signature",signerAddress:t||"0x123...user",transactionHash:"0xdef...tx"}];r(e)}catch(e){console.error("Failed to fetch bookings:",e)}finally{c(!1)}},h=s.filter(e=>{if("all"!==d&&e.status!==d)return!1;if(x){let t=x.toLowerCase();return e.spotLocation.toLowerCase().includes(t)||e.id.toLowerCase().includes(t)}return!0});return i?(0,n.jsx)("div",{className:"text-center py-12",children:"Loading bookings..."}):(0,n.jsxs)("div",{children:[(0,n.jsx)(o,{filter:d,onFilterChange:u,searchQuery:x,onSearchChange:m}),0===h.length?(0,n.jsxs)("div",{className:"bg-white rounded-lg shadow p-12 text-center",children:[(0,n.jsx)("p",{className:"text-gray-600 mb-4",children:"No bookings found"}),(0,n.jsx)("p",{className:"text-sm text-gray-500",children:"all"===d?"You haven't made any bookings yet.":"No ".concat(d," bookings found.")})]}):(0,n.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:h.map(e=>(0,n.jsx)(l,{booking:e},e.id))})]})}function d(){let[e,t]=(0,a.useState)(!1),[s,i]=(0,a.useState)(null);return e?(0,n.jsx)("main",{className:"min-h-screen p-8 bg-gray-50",children:(0,n.jsxs)("div",{className:"max-w-6xl mx-auto",children:[(0,n.jsx)("h1",{className:"text-4xl font-bold mb-6",children:"Booking History"}),(0,n.jsx)(c,{userAddress:s})]})}):(0,n.jsx)("main",{className:"min-h-screen p-8 bg-gray-50",children:(0,n.jsxs)("div",{className:"max-w-6xl mx-auto",children:[(0,n.jsx)("h1",{className:"text-4xl font-bold mb-4",children:"Booking History"}),(0,n.jsxs)("div",{className:"bg-white rounded-lg shadow p-8 text-center",children:[(0,n.jsx)("p",{className:"text-lg text-gray-600 mb-6",children:"Please connect your wallet to view your booking history"}),(0,n.jsx)(r.Z,{onConnect:e=>{i(e),t(!0)}})]})]})})}},45562:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});var n=s(57437);function a(e){let{onConnect:t}=e,s=async()=>{t("0x1234567890123456789012345678901234567890")};return(0,n.jsx)("button",{onClick:s,className:"px-6 py-3 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors",children:"Connect Wallet"})}},72081:function(e,t,s){"use strict";s.d(t,{Z:function(){return l}});var n=s(57437),a=s(2265),r=s(35398),i=s(41960);function l(e){let{bookingId:t,spotId:s,spotLocation:l,signature:o,signerAddress:c,timestamp:d,onSave:u}=e,[x,m]=(0,a.useState)(!1),g=(0,a.useMemo)(()=>(0,i.CS)(t,s,l,o,c,d),[t,s,l,o,c,d]);return(0,n.jsxs)("div",{className:"bg-white rounded-lg shadow-lg p-6 md:p-8 text-center max-w-sm mx-auto w-full",children:[(0,n.jsx)("h3",{className:"text-xl font-semibold mb-4",children:"Your Booking QR Code"}),(0,n.jsx)("p",{className:"text-sm text-gray-600 mb-6",children:"Show this QR code at the parking location for access"}),(0,n.jsx)("div",{className:"bg-gray-50 rounded-lg p-4 md:p-6 inline-block mb-6 w-full flex justify-center",children:(0,n.jsx)("div",{className:"bg-white p-4 rounded-lg inline-block border-2 border-gray-300",children:(0,n.jsx)(r.ZP,{id:"qr-code-canvas",value:g,size:200,level:"H",includeMargin:!0,className:"w-full h-auto"})})}),(0,n.jsxs)("div",{className:"space-y-3",children:[(0,n.jsxs)("div",{className:"text-sm text-gray-600",children:[(0,n.jsxs)("p",{children:["Booking ID: ",(0,n.jsx)("span",{className:"font-mono font-medium break-all",children:t})]}),o&&(0,n.jsxs)("p",{className:"mt-2 text-xs text-green-600 flex items-center justify-center gap-1",children:[(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4",viewBox:"0 0 20 20",fill:"currentColor",children:(0,n.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})}),"Digitally Signed"]})]}),(0,n.jsxs)("div",{className:"flex flex-col sm:flex-row gap-3 justify-center pt-4",children:[(0,n.jsx)("button",{onClick:()=>{m(!0);let e=document.getElementById("qr-code-canvas");if(e){let s=e.toDataURL("image/png"),n=document.createElement("a");n.download="booking-".concat(t,"-qr.png"),n.href=s,n.click()}m(!1),u&&u()},disabled:x,className:"px-6 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 disabled:bg-gray-400 transition-colors w-full sm:w-auto",children:x?"Downloading...":"Save QR Code"}),(0,n.jsx)("button",{onClick:()=>window.print(),className:"px-6 py-2 border border-gray-300 rounded-lg hover:bg-gray-50 transition-colors w-full sm:w-auto",children:"Print"})]})]})]})}},41960:function(e,t,s){"use strict";s.d(t,{CS:function(){return a},hV:function(){return r},yR:function(){return i}});var n=s(48790);function a(e,t,s,n,a,r){return JSON.stringify({bookingId:e,spotId:t,location:s,timestamp:r||Date.now(),type:"parking_access",signature:n,signerAddress:a})}function r(e){try{let t=JSON.parse(e);if(!t.bookingId||!t.spotId||!t.type)return null;return t}catch(e){return null}}async function i(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:48;if(Date.now()-e.timestamp>36e5*s)return{valid:!1,error:"QR code expired"};if(e.signature&&t){var a,r;if(!e.signerAddress||e.signerAddress.toLowerCase()!==t.toLowerCase())return{valid:!1,error:"Signer address mismatch"};let s=(a=e.bookingId,r=e.timestamp,"Access Request for Booking: ".concat(a,"\nTimestamp: ").concat(r));try{if(!await (0,n.n)({address:t,message:s,signature:e.signature}))return{valid:!1,error:"Invalid signature"}}catch(e){return{valid:!1,error:"Signature verification failed"}}}else if(t)return{valid:!1,error:"Missing signature"};return{valid:!0}}}},function(e){e.O(0,[9696,3676,2971,2117,1744],function(){return e(e.s=82506)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/app/disputes/page-ce8d4ec2a082dd0d.js b/frontend/.next/static/chunks/app/disputes/page-ce8d4ec2a082dd0d.js new file mode 100644 index 0000000..5b93a7d --- /dev/null +++ b/frontend/.next/static/chunks/app/disputes/page-ce8d4ec2a082dd0d.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2110],{83183:function(e,t,n){Promise.resolve().then(n.bind(n,75295))},75295:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return x}});var i=n(57437),s=n(2265),r=n(21843),a=n(54506),o=n(80432);function d(e){let{isResolved:t,refundApproved:n,resolutionType:s,refundPercentage:r}=e;if(t){if(n){let e=void 0!==r?Number(r):100;return(0,i.jsxs)("span",{className:"px-3 py-1 bg-green-100 text-green-800 rounded-full text-xs font-medium",children:["Resolved - ",e,"% Refund Approved"]})}return(0,i.jsx)("span",{className:"px-3 py-1 bg-red-100 text-red-800 rounded-full text-xs font-medium",children:"Resolved - Refund Denied"})}switch(s){case o.Jm.Automated:return(0,i.jsx)("span",{className:"px-3 py-1 bg-blue-100 text-blue-800 rounded-full text-xs font-medium",children:"Automated Review"});case o.Jm.PendingVote:return(0,i.jsx)("span",{className:"px-3 py-1 bg-yellow-100 text-yellow-800 rounded-full text-xs font-medium",children:"Pending Vote"});case o.Jm.Manual:return(0,i.jsx)("span",{className:"px-3 py-1 bg-orange-100 text-orange-800 rounded-full text-xs font-medium",children:"Manual Review"});default:return(0,i.jsx)("span",{className:"px-3 py-1 bg-gray-100 text-gray-800 rounded-full text-xs font-medium",children:"Unknown"})}}function u(e){let{dispute:t,onClick:n}=e;return(0,i.jsxs)("div",{onClick:n,className:"p-6 bg-white border border-gray-200 rounded-lg shadow-sm hover:shadow-md transition-shadow cursor-pointer ".concat(n?"cursor-pointer":""),children:[(0,i.jsxs)("div",{className:"flex justify-between items-start mb-4",children:[(0,i.jsxs)("div",{children:[(0,i.jsxs)("h3",{className:"text-lg font-semibold text-gray-800",children:["Dispute #",t.disputeId.toString()]}),(0,i.jsxs)("p",{className:"text-sm text-gray-600 mt-1",children:["Booking #",t.bookingId.toString()," • Escrow #",t.escrowId.toString()]})]}),(0,i.jsx)(d,{isResolved:t.isResolved,refundApproved:t.isResolved?t.refundApproved:null,resolutionType:t.resolutionType,refundPercentage:t.refundPercentage})]}),(0,i.jsx)("div",{className:"mb-4",children:(0,i.jsx)("p",{className:"text-gray-700 line-clamp-2",children:t.reason})}),(0,i.jsxs)("div",{className:"flex justify-between items-center text-sm text-gray-600",children:[(0,i.jsxs)("div",{children:[(0,i.jsxs)("p",{children:["Filed by: ",(0,i.jsxs)("span",{className:"font-medium",children:[t.filedBy.slice(0,6),"...",t.filedBy.slice(-4)]})]}),(0,i.jsxs)("p",{className:"mt-1",children:["Filed ",(0,a.Z)(new Date(1e3*Number(t.filedAt)),{addSuffix:!0})]})]}),t.isResolved&&t.resolvedAt>0n&&(0,i.jsxs)("div",{className:"text-right",children:[(0,i.jsx)("p",{className:"font-medium",children:"Resolved"}),(0,i.jsx)("p",{className:"text-xs mt-1",children:(0,a.Z)(new Date(1e3*Number(t.resolvedAt)),{addSuffix:!0})})]})]})]})}var l=n(44005);function c(e){let{escrowIds:t}=e,{address:n}=(0,r.R)(),a=(0,l.x)(),[d,c]=(0,s.useState)([]),[m,h]=(0,s.useState)(!0),[p,f]=(0,s.useState)(null),x=44787===a?o.$Y.alfajores:o.$Y.celo;if((0,s.useEffect)(()=>{(async()=>{if(!n||!x){h(!1);return}h(!0);try{c([])}catch(e){console.error("Error loading disputes:",e)}finally{h(!1)}})()},[n,x]),m)return(0,i.jsx)("div",{className:"p-6 bg-white rounded-lg shadow-md",children:(0,i.jsxs)("div",{className:"animate-pulse space-y-4",children:[(0,i.jsx)("div",{className:"h-6 bg-gray-200 rounded w-1/4"}),(0,i.jsx)("div",{className:"h-32 bg-gray-200 rounded"}),(0,i.jsx)("div",{className:"h-32 bg-gray-200 rounded"})]})});if(0===d.length)return(0,i.jsxs)("div",{className:"p-6 bg-white rounded-lg shadow-md",children:[(0,i.jsx)("h2",{className:"text-2xl font-bold text-gray-800 mb-4",children:"Dispute History"}),(0,i.jsxs)("div",{className:"text-center py-12",children:[(0,i.jsx)("p",{className:"text-gray-600",children:"No disputes found"}),(0,i.jsx)("p",{className:"text-sm text-gray-500 mt-2",children:"Disputes you file or are involved in will appear here"})]})]});let g=d.filter(e=>!e.isResolved),b=d.filter(e=>e.isResolved);return(0,i.jsxs)("div",{className:"space-y-6",children:[(0,i.jsxs)("div",{className:"flex justify-between items-center",children:[(0,i.jsx)("h2",{className:"text-2xl font-bold text-gray-800",children:"Dispute History"}),(0,i.jsxs)("div",{className:"text-sm text-gray-600",children:[g.length," active, ",b.length," resolved"]})]}),g.length>0&&(0,i.jsxs)("div",{children:[(0,i.jsx)("h3",{className:"text-lg font-semibold text-gray-700 mb-4",children:"Active Disputes"}),(0,i.jsx)("div",{className:"space-y-4",children:g.map(e=>(0,i.jsx)(u,{dispute:e,onClick:()=>f(e)},e.disputeId.toString()))})]}),b.length>0&&(0,i.jsxs)("div",{children:[(0,i.jsx)("h3",{className:"text-lg font-semibold text-gray-700 mb-4",children:"Resolved Disputes"}),(0,i.jsx)("div",{className:"space-y-4",children:b.map(e=>(0,i.jsx)(u,{dispute:e,onClick:()=>f(e)},e.disputeId.toString()))})]}),p&&(0,i.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 p-4",children:(0,i.jsxs)("div",{className:"bg-white rounded-lg max-w-2xl w-full max-h-[90vh] overflow-y-auto p-6",children:[(0,i.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,i.jsx)("h3",{className:"text-xl font-bold",children:"Dispute Details"}),(0,i.jsx)("button",{onClick:()=>f(null),className:"text-gray-500 hover:text-gray-700",children:"✕"})]}),(0,i.jsx)(u,{dispute:p})]})})]})}var m=n(80014),h=n(8517),p=n(2398);function f(e){let{escrowId:t,bookingId:n,onSuccess:a,onCancel:o}=e,{address:d}=(0,r.R)(),{fileDispute:u,hash:l,isPending:c}=(0,m.nz)(),[f,x]=(0,s.useState)(""),[g,b]=(0,s.useState)(h.kq.Other),[v,y]=(0,s.useState)(null),[j,N]=(0,s.useState)(""),[w,I]=(0,s.useState)(!1),[k,D]=(0,s.useState)(null),{isLoading:C,isSuccess:S}=(0,p.A)({hash:l}),R=async e=>{if(e.preventDefault(),D(null),!d){D("Please connect your wallet");return}if(!f.trim()){D("Please provide a reason for the dispute");return}try{let e="0x0000000000000000000000000000000000000000000000000000000000000000";if(v){I(!0);let t=await (0,h.O_)(v,g);e=(0,h.VO)(t),I(!1)}else(g===h.kq.CheckInTimestamp||g===h.kq.CheckOutTimestamp)&&(e="0x"+BigInt(Math.floor(Date.now()/1e3)).toString(16).padStart(64,"0"));await u(t,n,f,e,g)}catch(e){D(e.message||"Failed to file dispute"),I(!1)}};return S?(0,i.jsxs)("div",{className:"p-6 bg-green-50 border border-green-200 rounded-lg",children:[(0,i.jsx)("h3",{className:"text-lg font-semibold text-green-800 mb-2",children:"Dispute Filed Successfully"}),(0,i.jsx)("p",{className:"text-green-700",children:"Your dispute has been filed and is being reviewed."}),a&&(0,i.jsx)("button",{onClick:()=>a(BigInt(0)),className:"mt-4 text-green-600 underline",children:"View Dispute"})]}):(0,i.jsxs)("form",{onSubmit:R,className:"space-y-6 p-6 bg-white rounded-lg shadow-md",children:[(0,i.jsx)("h2",{className:"text-2xl font-bold text-gray-800",children:"File a Dispute"}),k&&(0,i.jsx)("div",{className:"p-4 bg-red-50 border border-red-200 rounded-lg",children:(0,i.jsx)("p",{className:"text-red-800",children:k})}),(0,i.jsxs)("div",{children:[(0,i.jsxs)("label",{htmlFor:"reason",className:"block text-sm font-medium text-gray-700 mb-2",children:["Reason for Dispute ",(0,i.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,i.jsx)("textarea",{id:"reason",value:f,onChange:e=>x(e.target.value),rows:4,className:"w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent",placeholder:"Describe the issue with this booking...",required:!0})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)("label",{htmlFor:"evidenceType",className:"block text-sm font-medium text-gray-700 mb-2",children:"Evidence Type"}),(0,i.jsx)("select",{id:"evidenceType",value:g,onChange:e=>b(Number(e.target.value)),className:"w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:Object.values(h.kq).filter(e=>!isNaN(Number(e))).map(e=>(0,i.jsx)("option",{value:e,children:(0,h.gJ)(Number(e))},e))})]}),(g===h.kq.Image||g===h.kq.Video||g===h.kq.Document)&&(0,i.jsxs)("div",{children:[(0,i.jsx)("label",{htmlFor:"evidenceFile",className:"block text-sm font-medium text-gray-700 mb-2",children:"Upload Evidence"}),(0,i.jsx)("input",{id:"evidenceFile",type:"file",onChange:e=>{if(e.target.files&&e.target.files[0]){let t=e.target.files[0],n=(0,h.mC)(g,t,j);if(!n.valid){D(n.error||"Invalid evidence");return}y(t),D(null)}},accept:g===h.kq.Image?"image/*":g===h.kq.Video?"video/*":"application/pdf,application/msword,.doc,.docx",className:"w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent"}),v&&(0,i.jsxs)("p",{className:"mt-2 text-sm text-gray-600",children:["Selected: ",v.name," (",(v.size/1024/1024).toFixed(2)," MB)"]})]}),(0,i.jsxs)("div",{children:[(0,i.jsx)("label",{htmlFor:"evidenceDescription",className:"block text-sm font-medium text-gray-700 mb-2",children:"Evidence Description"}),(0,i.jsx)("textarea",{id:"evidenceDescription",value:j,onChange:e=>N(e.target.value),rows:3,className:"w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent",placeholder:"Describe what this evidence shows..."})]}),(0,i.jsxs)("div",{className:"flex gap-4",children:[(0,i.jsx)("button",{type:"submit",disabled:c||C||w||!d,className:"flex-1 px-6 py-3 bg-blue-600 text-white rounded-lg hover:bg-blue-700 disabled:bg-gray-400 disabled:cursor-not-allowed font-medium",children:w?"Uploading Evidence...":c||C?"Filing Dispute...":"File Dispute"}),o&&(0,i.jsx)("button",{type:"button",onClick:o,className:"px-6 py-3 bg-gray-200 text-gray-700 rounded-lg hover:bg-gray-300 font-medium",children:"Cancel"})]})]})}function x(){let{address:e,isConnected:t}=(0,r.R)(),[n,a]=(0,s.useState)(!1),[o,d]=(0,s.useState)(null),[u,l]=(0,s.useState)(null);return t?(0,i.jsx)("div",{className:"container mx-auto px-4 py-8",children:(0,i.jsxs)("div",{className:"max-w-4xl mx-auto",children:[(0,i.jsxs)("div",{className:"flex justify-between items-center mb-8",children:[(0,i.jsx)("h1",{className:"text-3xl font-bold text-gray-800",children:"Dispute Resolution"}),(0,i.jsx)("button",{onClick:()=>a(!0),className:"px-6 py-3 bg-blue-600 text-white rounded-lg hover:bg-blue-700 font-medium",children:"File New Dispute"})]}),n&&(0,i.jsxs)("div",{className:"mb-8",children:[(0,i.jsxs)("div",{className:"mb-4",children:[(0,i.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Escrow ID"}),(0,i.jsx)("input",{type:"number",placeholder:"Enter escrow ID",onChange:e=>d(e.target.value?BigInt(e.target.value):null),className:"w-full px-4 py-2 border border-gray-300 rounded-lg"})]}),(0,i.jsxs)("div",{className:"mb-4",children:[(0,i.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Booking ID"}),(0,i.jsx)("input",{type:"number",placeholder:"Enter booking ID",onChange:e=>l(e.target.value?BigInt(e.target.value):null),className:"w-full px-4 py-2 border border-gray-300 rounded-lg"})]}),o&&u&&(0,i.jsx)(f,{escrowId:o,bookingId:u,onSuccess:()=>{a(!1),d(null),l(null)},onCancel:()=>{a(!1),d(null),l(null)}})]}),(0,i.jsx)(c,{})]})}):(0,i.jsx)("div",{className:"container mx-auto px-4 py-8",children:(0,i.jsx)("div",{className:"max-w-2xl mx-auto",children:(0,i.jsxs)("div",{className:"p-6 bg-yellow-50 border border-yellow-200 rounded-lg text-center",children:[(0,i.jsx)("h2",{className:"text-xl font-semibold text-yellow-800 mb-2",children:"Wallet Not Connected"}),(0,i.jsx)("p",{className:"text-yellow-700",children:"Please connect your wallet to view and file disputes."})]})})})}},80432:function(e,t,n){"use strict";n.d(t,{$Y:function(){return o},Jm:function(){return s},aT:function(){return a}});var i,s,r=n(40257);let a=["event DisputeFiled(uint256 indexed disputeId, uint256 indexed escrowId, uint256 indexed bookingId, address filedBy, address opposingParty, string reason, uint8 resolutionType)","event EvidenceSubmitted(uint256 indexed evidenceId, uint256 indexed disputeId, address submittedBy, uint8 evidenceType, bytes evidenceHash)","event CheckInRecorded(uint256 indexed bookingId, uint256 checkInTime, address verifiedBy)","event CheckOutRecorded(uint256 indexed bookingId, uint256 checkOutTime, address verifiedBy)","event AutomatedResolution(uint256 indexed disputeId, bool refundApproved, uint256 refundPercentage, string reason)","event VoteSubmitted(uint256 indexed disputeId, address indexed voter, bool supportsRefund, uint256 weight)","event DisputeResolved(uint256 indexed disputeId, address resolvedBy, bool refundApproved, uint256 refundPercentage, uint8 resolutionType)","function fileDispute(uint256 escrowId, uint256 bookingId, string memory reason, bytes memory evidenceHash, uint8 evidenceType) external returns (uint256)","function submitEvidence(uint256 disputeId, uint8 evidenceType, bytes memory evidenceHash, string memory description) external","function recordCheckIn(uint256 bookingId, uint256 checkInTime) external","function recordCheckOut(uint256 bookingId, uint256 checkOutTime) external","function submitVote(uint256 disputeId, bool supportsRefund, uint256 refundPercentage, string memory justification) external","function resolveDisputeManually(uint256 disputeId, bool refundApproved, uint256 refundPercentage) external","function getDispute(uint256 disputeId) external view returns (tuple(uint256 disputeId, uint256 escrowId, uint256 bookingId, address filedBy, address opposingParty, string reason, bytes primaryEvidenceHash, uint256 filedAt, uint8 resolutionType, bool isResolved, address resolvedBy, uint256 resolvedAt, bool refundApproved, uint256 refundPercentage))","function getDisputeEvidence(uint256 disputeId) external view returns (tuple(uint256 evidenceId, uint256 disputeId, address submittedBy, uint8 evidenceType, bytes evidenceHash, uint256 timestamp, string description)[])","function getCheckInData(uint256 bookingId) external view returns (tuple(uint256 bookingId, uint256 checkInTime, uint256 checkOutTime, bool checkedIn, bool checkedOut, address verifiedBy))","function getDisputeVotes(uint256 disputeId) external view returns (tuple(address voter, bool supportsRefund, uint256 weight, uint256 timestamp, string justification)[])","function getDisputeByEscrowId(uint256 escrowId) external view returns (tuple(uint256 disputeId, uint256 escrowId, uint256 bookingId, address filedBy, address opposingParty, string reason, bytes primaryEvidenceHash, uint256 filedAt, uint8 resolutionType, bool isResolved, address resolvedBy, uint256 resolvedAt, bool refundApproved, uint256 refundPercentage))"],o={alfajores:r.env.NEXT_PUBLIC_DISPUTE_RESOLUTION_ADDRESS_ALFAJORES||"",celo:r.env.NEXT_PUBLIC_DISPUTE_RESOLUTION_ADDRESS_CELO||""};(i=s||(s={}))[i.Automated=0]="Automated",i[i.PendingVote=1]="PendingVote",i[i.Manual=2]="Manual"},80014:function(e,t,n){"use strict";n.d(t,{$I:function(){return u},Cz:function(){return c},bC:function(){return l},nz:function(){return d}});var i=n(21843),s=n(6115),r=n(89416),a=n(80432),o=n(44005);function d(){let{address:e}=(0,i.R)(),t=(0,o.x)(),{writeContract:n,data:r,isPending:d,error:u}=(0,s.S)(),l=44787===t?a.$Y.alfajores:a.$Y.celo;return{fileDispute:async(e,t,i,s,r)=>n({address:l,abi:a.aT,functionName:"fileDispute",args:[e,t,i,s,r]}),submitEvidence:async(e,t,i,s)=>n({address:l,abi:a.aT,functionName:"submitEvidence",args:[e,t,i,s]}),recordCheckIn:async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:BigInt(Math.floor(Date.now()/1e3));return n({address:l,abi:a.aT,functionName:"recordCheckIn",args:[e,t]})},recordCheckOut:async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:BigInt(Math.floor(Date.now()/1e3));return n({address:l,abi:a.aT,functionName:"recordCheckOut",args:[e,t]})},submitVote:async(e,t,i,s)=>n({address:l,abi:a.aT,functionName:"submitVote",args:[e,t,i,s]}),resolveDisputeManually:async(e,t,i)=>n({address:l,abi:a.aT,functionName:"resolveDisputeManually",args:[e,t,i]}),hash:r,isPending:d,error:u}}function u(e){let t=44787===(0,o.x)()?a.$Y.alfajores:a.$Y.celo,{data:n,isLoading:i,error:s}=(0,r.u)({address:t,abi:a.aT,functionName:"getDispute",args:e?[e]:void 0,query:{enabled:!!e}});return{dispute:n,isLoading:i,error:s}}function l(e){let t=44787===(0,o.x)()?a.$Y.alfajores:a.$Y.celo,{data:n,isLoading:i,error:s}=(0,r.u)({address:t,abi:a.aT,functionName:"getDisputeEvidence",args:e?[e]:void 0,query:{enabled:!!e}});return{evidence:n,isLoading:i,error:s}}function c(e){let t=44787===(0,o.x)()?a.$Y.alfajores:a.$Y.celo,{data:n,isLoading:i,error:s}=(0,r.u)({address:t,abi:a.aT,functionName:"getDisputeVotes",args:e?[e]:void 0,query:{enabled:!!e}});return{votes:n,isLoading:i,error:s}}},8517:function(e,t,n){"use strict";n.d(t,{O_:function(){return o},VO:function(){return d},gJ:function(){return c},k8:function(){return u},kq:function(){return s},mC:function(){return l}});var i,s,r=n(82957).lW,a=n(40257);async function o(e,t){let n=new FormData;n.append("file",e);try{let e=await fetch("/api/ipfs/upload",{method:"POST",body:n});if(!e.ok)throw Error("Failed to upload to IPFS");return(await e.json()).hash}catch(e){throw console.error("IPFS upload error:",e),e}}function d(e){return"0x"+r.from(e).toString("hex").slice(0,64)}function u(e){let t=a.env.NEXT_PUBLIC_IPFS_GATEWAY||"https://ipfs.io/ipfs/";return"".concat(t).concat(e)}function l(e,t,n){if(!n||0===n.trim().length)return{valid:!1,error:"Evidence description is required"};if(2===e||3===e||4===e){if(!t)return{valid:!1,error:"File is required for this evidence type"};if(t.size>10485760)return{valid:!1,error:"File size exceeds 10MB limit"};if(2===e&&t.type.startsWith("image/")&&!["image/jpeg","image/png","image/webp","image/gif"].includes(t.type))return{valid:!1,error:"Invalid image format. Allowed: JPEG, PNG, WebP, GIF"};if(3===e&&t.type.startsWith("video/")&&!["video/mp4","video/webm","video/quicktime"].includes(t.type))return{valid:!1,error:"Invalid video format. Allowed: MP4, WebM, QuickTime"}}return{valid:!0}}function c(e){return({0:"Check-in Timestamp",1:"Check-out Timestamp",2:"Image",3:"Video",4:"Document",5:"Location Data",6:"Other"})[e]||"Unknown"}(i=s||(s={}))[i.CheckInTimestamp=0]="CheckInTimestamp",i[i.CheckOutTimestamp=1]="CheckOutTimestamp",i[i.Image=2]="Image",i[i.Video=3]="Video",i[i.Document=4]="Document",i[i.LocationData=5]="LocationData",i[i.Other=6]="Other"},28766:function(e,t,n){"use strict";n.d(t,{L:function(){return d}});var i=n(65436),s=n(17283),r=n(34180),a=n(82645),o=n(50550);async function d(e,t){let{abi:n,address:d,args:u,functionName:l,...c}=t,m=(0,s.R)({abi:n,args:u,functionName:l});try{let{data:t}=await (0,a.s)(e,o.R,"call")({...c,data:m,to:d});return(0,i.k)({abi:n,args:u,functionName:l,data:t||"0x"})}catch(e){throw(0,r.S)(e,{abi:n,address:d,args:u,docsPath:"/docs/contract/readContract",functionName:l})}}},89416:function(e,t,n){"use strict";n.d(t,{u:function(){return u}});var i=n(28766),s=n(44199),r=n(27534),a=n(97074),o=n(44005),d=n(12364);function u(){var e,t,n;let u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{abi:l,address:c,functionName:m,query:h={}}=u,p=u.code,f=(0,d.Z)(u),x=(0,o.x)({config:f}),g=function(e,t={}){return{async queryFn({queryKey:n}){let r=t.abi;if(!r)throw Error("abi is required");let{functionName:a,scopeKey:o,...d}=n[1],u=(()=>{let e=n[1];if(e.address)return{address:e.address};if(e.code)return{code:e.code};throw Error("address or code is required")})();if(!a)throw Error("functionName is required");return function(e,t){let{chainId:n,...r}=t,a=e.getClient({chainId:n});return(0,s.s)(a,i.L,"readContract")(r)}(e,{abi:r,functionName:a,args:d.args,...u,...d})},queryKey:function(e={}){let{abi:t,...n}=e;return["readContract",(0,r.OP)(n)]}(t)}}(f,{...u,chainId:null!==(e=u.chainId)&&void 0!==e?e:x}),b=!!((c||p)&&l&&m&&(null===(t=h.enabled)||void 0===t||t));return(0,a.aM)({...h,...g,enabled:b,structuralSharing:null!==(n=h.structuralSharing)&&void 0!==n?n:r.if})}},2398:function(e,t,n){"use strict";n.d(t,{A:function(){return d}});var i=n(93184),s=n(27534),r=n(97074),a=n(44005),o=n(12364);function d(){var e,t;let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{hash:d,query:u={}}=n,l=(0,o.Z)(n),c=(0,a.x)({config:l}),m=function(e,t={}){return{async queryFn({queryKey:n}){let{hash:s,...r}=n[1];if(!s)throw Error("hash is required");return(0,i.e)(e,{...r,onReplaced:t.onReplaced,hash:s})},queryKey:function(e={}){let{onReplaced:t,...n}=e;return["waitForTransactionReceipt",(0,s.OP)(n)]}(t)}}(l,{...n,chainId:null!==(e=n.chainId)&&void 0!==e?e:c}),h=!!(d&&(null===(t=u.enabled)||void 0===t||t));return(0,r.aM)({...u,...m,enabled:h})}},6115:function(e,t,n){"use strict";n.d(t,{S:function(){return m}});var i=n(2265),s=n(2894),r=n(18238),a=n(24112),o=n(45345),d=class extends a.l{#e;#t=void 0;#n;#i;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#s()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),(0,o.VS)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,o.Ym)(t.mutationKey)!==(0,o.Ym)(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#s(),this.#r(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#s(),this.#r()}mutate(e,t){return this.#i=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#s(){let e=this.#n?.state??(0,s.R)();this.#t={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#r(e){r.Vr.batch(()=>{if(this.#i&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,i={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};e?.type==="success"?(this.#i.onSuccess?.(e.data,t,n,i),this.#i.onSettled?.(e.data,null,t,n,i)):e?.type==="error"&&(this.#i.onError?.(e.error,t,n,i),this.#i.onSettled?.(void 0,e.error,t,n,i))}this.listeners.forEach(e=>{e(this.#t)})})}},u=n(29827),l=n(18470),c=n(12364);function m(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=(e=(0,c.Z)(t),{mutationFn:t=>(0,l.n)(e,t),mutationKey:["writeContract"]}),s=function(e,t){let n=(0,u.NL)(void 0),[s]=i.useState(()=>new d(n,e));i.useEffect(()=>{s.setOptions(e)},[s,e]);let a=i.useSyncExternalStore(i.useCallback(e=>s.subscribe(r.Vr.batchCalls(e)),[s]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),l=i.useCallback((e,t)=>{s.mutate(e,t).catch(o.ZT)},[s]);if(a.error&&(0,o.L3)(s.options.throwOnError,[a.error]))throw a.error;return{...a,mutate:l,mutateAsync:a.mutate}}({...t.mutation,...n});return{...s,mutate:s.mutate,mutateAsync:s.mutateAsync,writeContract:s.mutate,writeContractAsync:s.mutateAsync}}}},function(e){e.O(0,[9696,58,642,9334,7846,4506,2971,2117,1744],function(){return e(e.s=83183)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/app/layout-8b00abf3f0a7a18b.js b/frontend/.next/static/chunks/app/layout-8b00abf3f0a7a18b.js new file mode 100644 index 0000000..d9f824b --- /dev/null +++ b/frontend/.next/static/chunks/app/layout-8b00abf3f0a7a18b.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3185],{74495:function(n,e,i){Promise.resolve().then(i.bind(i,6038)),Promise.resolve().then(i.t.bind(i,50911,23)),Promise.resolve().then(i.t.bind(i,47960,23))},6038:function(n,e,i){"use strict";i.d(e,{AppKitProvider:function(){return _}});var o=i(57437),t=i(87038),r=i(74892),c=i(50250),s=i(51702),l=i(78749),a=i(21623),u=i(29827);let d=i(40257).env.NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID||"",f=new r.K({networks:[c.$,s.D],projectId:d}),w={name:"CarIn",description:"Decentralized parking spot booking on Celo",url:window.location.origin,icons:["".concat(window.location.origin,"/icon.png")]},h={adapters:[f],networks:[c.$,s.D],projectId:d,metadata:w,features:{analytics:!0,email:!1,socials:[]},themeMode:"light",defaultNetwork:c.$},p=new a.S;function _(n){let{children:e}=n;return(0,o.jsx)(l.F,{config:f.wagmiConfig,children:(0,o.jsx)(u.aH,{client:p,children:(0,o.jsx)(t.Vd,{...h,children:e})})})}},47960:function(){}},function(n){n.O(0,[8944,9696,58,642,7846,7077,8389,2971,2117,1744],function(){return n(n.s=74495)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/app/owner/page-df7b011f2f5c9bf9.js b/frontend/.next/static/chunks/app/owner/page-df7b011f2f5c9bf9.js new file mode 100644 index 0000000..dca9edb --- /dev/null +++ b/frontend/.next/static/chunks/app/owner/page-df7b011f2f5c9bf9.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4948],{23596:function(e,t,s){Promise.resolve().then(s.bind(s,33633))},33633:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return y}});var a=s(57437),r=s(2265),l=s(45562);function n(e){let{spot:t,onEdit:s,onDelete:r,onToggleAvailability:l}=e;return(0,a.jsxs)("div",{className:"border border-gray-200 rounded-lg p-4 hover:shadow-lg transition-shadow",children:[(0,a.jsx)("div",{className:"w-full h-48 bg-gray-200 rounded-lg mb-4 flex items-center justify-center",children:t.images.length>0?(0,a.jsxs)("span",{className:"text-gray-500 text-sm",children:["Image: ",t.images[0]]}):(0,a.jsx)("span",{className:"text-gray-400",children:"No image"})}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("h3",{className:"font-semibold text-lg truncate",children:t.location}),(0,a.jsx)("p",{className:"text-gray-600 text-sm line-clamp-2",children:t.description}),(0,a.jsxs)("div",{className:"flex items-center justify-between pt-2",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-2xl font-bold text-blue-600",children:t.pricePerHour}),(0,a.jsx)("span",{className:"text-gray-500 text-sm ml-1",children:"cUSD/hr"})]}),(0,a.jsx)("span",{className:"px-3 py-1 rounded-full text-xs font-medium ".concat(t.isAvailable?"bg-green-100 text-green-800":"bg-red-100 text-red-800"),children:t.isAvailable?"Available":"Unavailable"})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between text-sm text-gray-600 pt-2 border-t",children:[(0,a.jsxs)("span",{children:[t.totalBookings," bookings"]}),(0,a.jsxs)("span",{className:"font-semibold",children:[t.totalEarnings," cUSD earned"]})]})]}),(0,a.jsxs)("div",{className:"flex gap-2 mt-4 pt-4 border-t",children:[(0,a.jsx)("button",{onClick:()=>l(t.id),className:"flex-1 px-3 py-2 text-sm rounded-lg transition-colors ".concat(t.isAvailable?"bg-red-100 text-red-700 hover:bg-red-200":"bg-green-100 text-green-700 hover:bg-green-200"),children:t.isAvailable?"Deactivate":"Activate"}),(0,a.jsx)("button",{onClick:()=>s(t),className:"px-3 py-2 text-sm bg-blue-100 text-blue-700 rounded-lg hover:bg-blue-200 transition-colors",children:"Edit"}),(0,a.jsx)("button",{onClick:()=>r(t.id),className:"px-3 py-2 text-sm bg-red-100 text-red-700 rounded-lg hover:bg-red-200 transition-colors",children:"Remove"})]})]})}function i(e){let{spot:t,onClose:s,onUpdated:l}=e,[n,i]=(0,r.useState)({pricePerHour:t.pricePerHour,description:t.description,isAvailable:t.isAvailable}),[o,d]=(0,r.useState)(!1),c=async e=>{e.preventDefault(),d(!0);try{console.log("Updating spot:",t.id,n),await new Promise(e=>setTimeout(e,1e3)),alert("Spot updated successfully!"),l()}catch(e){console.error("Error updating spot:",e),alert("Failed to update spot")}finally{d(!1)}};return(0,a.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:(0,a.jsxs)("div",{className:"bg-white rounded-lg p-6 max-w-md w-full mx-4",children:[(0,a.jsxs)("div",{className:"flex justify-between items-center mb-4",children:[(0,a.jsx)("h2",{className:"text-xl font-semibold",children:"Edit Parking Spot"}),(0,a.jsx)("button",{onClick:s,className:"text-gray-400 hover:text-gray-600",children:"✕"})]}),(0,a.jsxs)("form",{onSubmit:c,className:"space-y-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Price Per Hour (cUSD)"}),(0,a.jsx)("input",{type:"number",step:"0.01",min:"0",required:!0,value:n.pricePerHour,onChange:e=>i(t=>({...t,pricePerHour:e.target.value})),className:"w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Description"}),(0,a.jsx)("textarea",{rows:4,value:n.description,onChange:e=>i(t=>({...t,description:e.target.value})),className:"w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500"})]}),(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)("input",{type:"checkbox",id:"isAvailable",checked:n.isAvailable,onChange:e=>i(t=>({...t,isAvailable:e.target.checked})),className:"rounded border-gray-300 text-blue-600 focus:ring-blue-500"}),(0,a.jsx)("label",{htmlFor:"isAvailable",className:"ml-2 text-sm text-gray-700",children:"Available for booking"})]}),(0,a.jsxs)("div",{className:"flex gap-3 pt-4",children:[(0,a.jsx)("button",{type:"button",onClick:s,className:"flex-1 px-4 py-2 border border-gray-300 rounded-lg hover:bg-gray-50",children:"Cancel"}),(0,a.jsx)("button",{type:"submit",disabled:o,className:"flex-1 px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 disabled:bg-gray-400",children:o?"Saving...":"Save Changes"})]})]})]})})}function o(e){let{address:t,refreshTrigger:s}=e,[l,o]=(0,r.useState)([]),[d,c]=(0,r.useState)(!0),[x,m]=(0,r.useState)(null);(0,r.useEffect)(()=>{g()},[t,s]);let g=async()=>{c(!0);try{o([{id:1,location:"123 Main St, San Francisco, CA",pricePerHour:"2.50",isAvailable:!0,totalBookings:45,totalEarnings:"125.50",images:["QmExample1","QmExample2"],description:"Convenient street parking near downtown"}])}catch(e){console.error("Error fetching spots:",e)}finally{c(!1)}},u=e=>{m(e)},h=async e=>{if(confirm("Are you sure you want to remove this spot?"))try{console.log("Deactivating spot:",e),await new Promise(e=>setTimeout(e,1e3)),o(t=>t.filter(t=>t.id!==e)),alert("Spot removed successfully")}catch(e){console.error("Error removing spot:",e),alert("Failed to remove spot")}},b=async e=>{try{console.log("Toggling availability for spot:",e),await new Promise(e=>setTimeout(e,1e3)),o(t=>t.map(t=>t.id===e?{...t,isAvailable:!t.isAvailable}:t))}catch(e){console.error("Error toggling availability:",e),alert("Failed to update availability")}};return d?(0,a.jsx)("div",{className:"text-center py-8",children:"Loading your spots..."}):(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex justify-between items-center mb-6",children:[(0,a.jsx)("h2",{className:"text-2xl font-semibold",children:"My Parking Spots"}),(0,a.jsxs)("div",{className:"text-sm text-gray-600",children:["Total: ",l.length," spot(s)"]})]}),0===l.length?(0,a.jsxs)("div",{className:"text-center py-12 bg-gray-50 rounded-lg",children:[(0,a.jsx)("p",{className:"text-gray-600 mb-4",children:"You haven't listed any spots yet."}),(0,a.jsx)("p",{className:"text-sm text-gray-500",children:"List your first spot to start earning!"})]}):(0,a.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:l.map(e=>(0,a.jsx)(n,{spot:e,onEdit:u,onDelete:h,onToggleAvailability:b},e.id))}),x&&(0,a.jsx)(i,{spot:x,onClose:()=>m(null),onUpdated:()=>{m(null),g()}})]})}function d(e){let{address:t}=e,[s,l]=(0,r.useState)(null),[n,i]=(0,r.useState)(!0),[o,d]=(0,r.useState)(!1);(0,r.useEffect)(()=>{c()},[t]);let c=async()=>{i(!0);try{l({totalEarnings:"342.50",pendingEarnings:"87.25",withdrawnEarnings:"255.25",transactions:[{id:"1",date:"2024-12-03T10:30:00Z",spotId:1,spotLocation:"123 Main St",amount:"12.50",status:"released",bookingId:101},{id:"2",date:"2024-12-03T08:15:00Z",spotId:1,spotLocation:"123 Main St",amount:"25.00",status:"pending",bookingId:102},{id:"3",date:"2024-12-02T15:45:00Z",spotId:1,spotLocation:"123 Main St",amount:"18.75",status:"withdrawn",bookingId:99}]})}catch(e){console.error("Error fetching earnings:",e)}finally{i(!1)}},x=async()=>{if(!s||0>=parseFloat(s.pendingEarnings)){alert("No pending earnings to withdraw");return}d(!0);try{console.log("Withdrawing earnings:",s.pendingEarnings),await new Promise(e=>setTimeout(e,2e3)),alert("Successfully withdrew ".concat(s.pendingEarnings," cUSD")),c()}catch(e){console.error("Error withdrawing earnings:",e),alert("Failed to withdraw earnings")}finally{d(!1)}};return n?(0,a.jsx)("div",{className:"text-center py-8",children:"Loading earnings data..."}):s?(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{className:"flex justify-between items-center",children:[(0,a.jsx)("h2",{className:"text-2xl font-semibold",children:"Earnings Summary"}),(0,a.jsx)("button",{onClick:x,disabled:o||0>=parseFloat(s.pendingEarnings),className:"px-6 py-2 bg-green-600 text-white rounded-lg hover:bg-green-700 disabled:bg-gray-400 disabled:cursor-not-allowed",children:o?"Withdrawing...":"Withdraw ".concat(s.pendingEarnings," cUSD")})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[(0,a.jsxs)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-6",children:[(0,a.jsx)("div",{className:"text-sm text-blue-600 font-medium mb-1",children:"Total Earnings"}),(0,a.jsxs)("div",{className:"text-3xl font-bold text-blue-900",children:[s.totalEarnings," ",(0,a.jsx)("span",{className:"text-lg",children:"cUSD"})]})]}),(0,a.jsxs)("div",{className:"bg-yellow-50 border border-yellow-200 rounded-lg p-6",children:[(0,a.jsx)("div",{className:"text-sm text-yellow-600 font-medium mb-1",children:"Pending"}),(0,a.jsxs)("div",{className:"text-3xl font-bold text-yellow-900",children:[s.pendingEarnings," ",(0,a.jsx)("span",{className:"text-lg",children:"cUSD"})]})]}),(0,a.jsxs)("div",{className:"bg-green-50 border border-green-200 rounded-lg p-6",children:[(0,a.jsx)("div",{className:"text-sm text-green-600 font-medium mb-1",children:"Withdrawn"}),(0,a.jsxs)("div",{className:"text-3xl font-bold text-green-900",children:[s.withdrawnEarnings," ",(0,a.jsx)("span",{className:"text-lg",children:"cUSD"})]})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-lg font-semibold mb-4",children:"Transaction History"}),(0,a.jsx)("div",{className:"overflow-x-auto",children:(0,a.jsxs)("table",{className:"min-w-full divide-y divide-gray-200",children:[(0,a.jsx)("thead",{className:"bg-gray-50",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Date"}),(0,a.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Spot"}),(0,a.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Booking ID"}),(0,a.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Amount"}),(0,a.jsx)("th",{className:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider",children:"Status"})]})}),(0,a.jsx)("tbody",{className:"bg-white divide-y divide-gray-200",children:s.transactions.map(e=>(0,a.jsxs)("tr",{children:[(0,a.jsx)("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-900",children:new Date(e.date).toLocaleDateString()}),(0,a.jsx)("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-900",children:e.spotLocation}),(0,a.jsxs)("td",{className:"px-6 py-4 whitespace-nowrap text-sm text-gray-500",children:["#",e.bookingId]}),(0,a.jsxs)("td",{className:"px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900",children:[e.amount," cUSD"]}),(0,a.jsx)("td",{className:"px-6 py-4 whitespace-nowrap",children:(0,a.jsx)("span",{className:"px-2 inline-flex text-xs leading-5 font-semibold rounded-full ".concat("withdrawn"===e.status?"bg-green-100 text-green-800":"released"===e.status?"bg-blue-100 text-blue-800":"bg-yellow-100 text-yellow-800"),children:e.status})})]},e.id))})]})})]})]}):(0,a.jsx)("div",{className:"text-center py-8",children:"No earnings data available"})}function c(e){let{onLocationSelect:t,selectedLocation:s}=e,[l,n]=(0,r.useState)(""),[i,o]=(0,r.useState)(!1),d=async()=>{if(l.trim()){o(!0);try{t(37.7749+(Math.random()-.5)*.1,-122.4194+(Math.random()-.5)*.1,l)}catch(e){console.error("Error searching location:",e)}finally{o(!1)}}},c=()=>{d()};return(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("input",{type:"text",value:l,onChange:e=>n(e.target.value),onKeyPress:e=>"Enter"===e.key&&d(),className:"flex-1 px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent",placeholder:"Search address or click to pick on map"}),(0,a.jsx)("button",{type:"button",onClick:c,className:"px-4 py-2 bg-gray-100 text-gray-700 rounded-lg hover:bg-gray-200",children:"\uD83D\uDCCD Pick on Map"})]}),(0,a.jsx)("div",{className:"w-full h-64 bg-gray-200 rounded-lg flex items-center justify-center cursor-pointer hover:bg-gray-300 transition-colors",onClick:c,children:(0,a.jsx)("p",{className:"text-gray-500",children:"Click to select location on map"})})]})}function x(e){let{onImageUploaded:t}=e,[s,l]=(0,r.useState)(!1),[n,i]=(0,r.useState)(null),o=async e=>{var s;let a=null===(s=e.target.files)||void 0===s?void 0:s[0];if(!a)return;if(!a.type.startsWith("image/")){alert("Please select an image file");return}let r=new FileReader;r.onloadend=()=>{i(r.result)},r.readAsDataURL(a),l(!0);try{await new Promise(e=>setTimeout(e,2e3));let s="Qm".concat(Math.random().toString(36).substring(2,15)).concat(Math.random().toString(36).substring(2,15));t(s),i(null),e.target.value=""}catch(e){console.error("Error uploading to IPFS:",e),alert("Failed to upload image. Please try again.")}finally{l(!1)}};return(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsx)("div",{className:"flex items-center justify-center w-full",children:(0,a.jsxs)("label",{className:"flex flex-col items-center justify-center w-full h-32 border-2 border-gray-300 border-dashed rounded-lg cursor-pointer bg-gray-50 hover:bg-gray-100",children:[(0,a.jsx)("div",{className:"flex flex-col items-center justify-center pt-5 pb-6",children:s?(0,a.jsx)("div",{className:"text-blue-600",children:"Uploading to IPFS..."}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("svg",{className:"w-10 h-10 mb-3 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})}),(0,a.jsxs)("p",{className:"mb-2 text-sm text-gray-500",children:[(0,a.jsx)("span",{className:"font-semibold",children:"Click to upload"})," or drag and drop"]}),(0,a.jsx)("p",{className:"text-xs text-gray-500",children:"PNG, JPG, GIF up to 10MB"})]})}),(0,a.jsx)("input",{type:"file",className:"hidden",accept:"image/*",onChange:o,disabled:s})]})}),n&&(0,a.jsx)("div",{className:"mt-4",children:(0,a.jsx)("img",{src:n,alt:"Preview",className:"max-w-xs rounded-lg"})})]})}function m(e){let{address:t,onSpotCreated:s}=e,[l,n]=(0,r.useState)({location:"",latitude:0,longitude:0,pricePerHour:"",description:"",images:[],availabilityStart:"00:00",availabilityEnd:"23:59",monday:!0,tuesday:!0,wednesday:!0,thursday:!0,friday:!0,saturday:!0,sunday:!0}),[i,o]=(0,r.useState)(!1),d=async e=>{e.preventDefault(),o(!0);try{console.log("Listing spot:",l),await new Promise(e=>setTimeout(e,2e3)),alert("Spot listed successfully!"),s(),n({location:"",latitude:0,longitude:0,pricePerHour:"",description:"",images:[],availabilityStart:"00:00",availabilityEnd:"23:59",monday:!0,tuesday:!0,wednesday:!0,thursday:!0,friday:!0,saturday:!0,sunday:!0})}catch(e){console.error("Error listing spot:",e),alert("Failed to list spot. Please try again.")}finally{o(!1)}};return(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-2xl font-semibold mb-6",children:"List New Parking Spot"}),(0,a.jsxs)("form",{onSubmit:d,className:"space-y-6",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Location *"}),(0,a.jsx)(c,{onLocationSelect:(e,t,s)=>{n(a=>({...a,latitude:e,longitude:t,location:s}))},selectedLocation:l.location}),l.location&&(0,a.jsxs)("p",{className:"mt-2 text-sm text-gray-600",children:[l.location," (",l.latitude.toFixed(6),", ",l.longitude.toFixed(6),")"]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Price Per Hour (cUSD) *"}),(0,a.jsx)("input",{type:"number",step:"0.01",min:"0",required:!0,value:l.pricePerHour,onChange:e=>n(t=>({...t,pricePerHour:e.target.value})),className:"w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent",placeholder:"e.g., 2.50"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Availability Schedule"}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4 mb-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-xs text-gray-600 mb-1",children:"Start Time"}),(0,a.jsx)("input",{type:"time",value:l.availabilityStart,onChange:e=>n(t=>({...t,availabilityStart:e.target.value})),className:"w-full px-4 py-2 border border-gray-300 rounded-lg"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-xs text-gray-600 mb-1",children:"End Time"}),(0,a.jsx)("input",{type:"time",value:l.availabilityEnd,onChange:e=>n(t=>({...t,availabilityEnd:e.target.value})),className:"w-full px-4 py-2 border border-gray-300 rounded-lg"})]})]}),(0,a.jsx)("div",{className:"grid grid-cols-7 gap-2",children:["monday","tuesday","wednesday","thursday","friday","saturday","sunday"].map(e=>(0,a.jsxs)("label",{className:"flex items-center space-x-2 cursor-pointer",children:[(0,a.jsx)("input",{type:"checkbox",checked:l[e],onChange:t=>n(s=>({...s,[e]:t.target.checked})),className:"rounded border-gray-300 text-blue-600 focus:ring-blue-500"}),(0,a.jsx)("span",{className:"text-xs text-gray-700 capitalize",children:e.slice(0,3)})]},e))})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Spot Images (IPFS)"}),(0,a.jsx)(x,{onImageUploaded:e=>{n(t=>({...t,images:[...t.images,e]}))}}),l.images.length>0&&(0,a.jsxs)("div",{className:"mt-4",children:[(0,a.jsxs)("p",{className:"text-sm text-gray-600 mb-2",children:["Uploaded ",l.images.length," image(s)"]}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:l.images.map((e,t)=>(0,a.jsxs)("span",{className:"px-2 py-1 bg-gray-100 rounded text-xs",children:[e.slice(0,10),"..."]},t))})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Description"}),(0,a.jsx)("textarea",{rows:4,value:l.description,onChange:e=>n(t=>({...t,description:e.target.value})),className:"w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent",placeholder:"Describe your parking spot, nearby landmarks, accessibility, etc."})]}),(0,a.jsx)("div",{className:"flex justify-end",children:(0,a.jsx)("button",{type:"submit",disabled:i||!l.location||!l.pricePerHour,className:"px-6 py-3 bg-blue-600 text-white rounded-lg hover:bg-blue-700 disabled:bg-gray-400 disabled:cursor-not-allowed transition-colors",children:i?"Listing Spot...":"List Spot"})})]})]})}function g(e){let{address:t}=e,[s,l]=(0,r.useState)(null),[n,i]=(0,r.useState)(!0);(0,r.useEffect)(()=>{o()},[t]);let o=async()=>{i(!0);try{l({totalSpots:3,activeSpots:2,totalBookings:127,totalRevenue:"342.50",averageBookingDuration:"2.5 hours",bookingsByDay:[{day:"Mon",count:18},{day:"Tue",count:22},{day:"Wed",count:20},{day:"Thu",count:25},{day:"Fri",count:28},{day:"Sat",count:14},{day:"Sun",count:10}],revenueByMonth:[{month:"Oct",amount:"89.50"},{month:"Nov",amount:"165.25"},{month:"Dec",amount:"87.75"}]})}catch(e){console.error("Error fetching statistics:",e)}finally{i(!1)}};if(n)return(0,a.jsx)("div",{className:"text-center py-8",children:"Loading statistics..."});if(!s)return(0,a.jsx)("div",{className:"text-center py-8",children:"No statistics available"});let d=Math.max(...s.bookingsByDay.map(e=>e.count)),c=Math.max(...s.revenueByMonth.map(e=>parseFloat(e.amount)));return(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsx)("h2",{className:"text-2xl font-semibold",children:"Booking Statistics & Analytics"}),(0,a.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[(0,a.jsxs)("div",{className:"bg-white border border-gray-200 rounded-lg p-4",children:[(0,a.jsx)("div",{className:"text-sm text-gray-600 mb-1",children:"Total Spots"}),(0,a.jsx)("div",{className:"text-2xl font-bold",children:s.totalSpots})]}),(0,a.jsxs)("div",{className:"bg-white border border-gray-200 rounded-lg p-4",children:[(0,a.jsx)("div",{className:"text-sm text-gray-600 mb-1",children:"Active Spots"}),(0,a.jsx)("div",{className:"text-2xl font-bold text-green-600",children:s.activeSpots})]}),(0,a.jsxs)("div",{className:"bg-white border border-gray-200 rounded-lg p-4",children:[(0,a.jsx)("div",{className:"text-sm text-gray-600 mb-1",children:"Total Bookings"}),(0,a.jsx)("div",{className:"text-2xl font-bold",children:s.totalBookings})]}),(0,a.jsxs)("div",{className:"bg-white border border-gray-200 rounded-lg p-4",children:[(0,a.jsx)("div",{className:"text-sm text-gray-600 mb-1",children:"Total Revenue"}),(0,a.jsxs)("div",{className:"text-2xl font-bold text-blue-600",children:[s.totalRevenue," cUSD"]})]})]}),(0,a.jsxs)("div",{className:"bg-white border border-gray-200 rounded-lg p-6",children:[(0,a.jsx)("h3",{className:"text-lg font-semibold mb-4",children:"Bookings by Day of Week"}),(0,a.jsx)("div",{className:"flex items-end justify-between h-64 gap-2",children:s.bookingsByDay.map(e=>(0,a.jsxs)("div",{className:"flex-1 flex flex-col items-center",children:[(0,a.jsx)("div",{className:"relative w-full h-full flex items-end",children:(0,a.jsx)("div",{className:"w-full bg-blue-500 rounded-t transition-all hover:bg-blue-600",style:{height:"".concat(e.count/d*100,"%"),minHeight:e.count>0?"4px":"0"},title:"".concat(e.count," bookings")})}),(0,a.jsx)("div",{className:"mt-2 text-xs text-gray-600",children:e.day}),(0,a.jsx)("div",{className:"text-xs font-medium",children:e.count})]},e.day))})]}),(0,a.jsxs)("div",{className:"bg-white border border-gray-200 rounded-lg p-6",children:[(0,a.jsx)("h3",{className:"text-lg font-semibold mb-4",children:"Revenue by Month"}),(0,a.jsx)("div",{className:"flex items-end justify-between h-64 gap-4",children:s.revenueByMonth.map(e=>(0,a.jsxs)("div",{className:"flex-1 flex flex-col items-center",children:[(0,a.jsx)("div",{className:"relative w-full h-full flex items-end",children:(0,a.jsx)("div",{className:"w-full bg-green-500 rounded-t transition-all hover:bg-green-600",style:{height:"".concat(parseFloat(e.amount)/c*100,"%"),minHeight:parseFloat(e.amount)>0?"4px":"0"},title:"".concat(e.amount," cUSD")})}),(0,a.jsx)("div",{className:"mt-2 text-xs text-gray-600",children:e.month}),(0,a.jsxs)("div",{className:"text-xs font-medium",children:[e.amount," cUSD"]})]},e.month))})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{className:"bg-white border border-gray-200 rounded-lg p-6",children:[(0,a.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Average Booking Duration"}),(0,a.jsx)("div",{className:"text-3xl font-bold text-purple-600",children:s.averageBookingDuration})]}),(0,a.jsxs)("div",{className:"bg-white border border-gray-200 rounded-lg p-6",children:[(0,a.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Booking Rate"}),(0,a.jsx)("div",{className:"text-3xl font-bold text-orange-600",children:(s.totalBookings/s.totalSpots).toFixed(1)}),(0,a.jsx)("div",{className:"text-sm text-gray-600 mt-1",children:"bookings per spot"})]})]})]})}var u=s(791),h=s(41960);function b(e){let{onScanSuccess:t,onScanError:s,expectedSigner:l}=e,[n,i]=(0,r.useState)(null),[o,d]=(0,r.useState)("idle"),[c,x]=(0,r.useState)(null),m=(0,r.useRef)(null);(0,r.useEffect)(()=>{m.current&&m.current.clear().catch(console.error);let e=new u.wF("qr-reader-container",{fps:10,qrbox:{width:250,height:250},aspectRatio:1},!1);return m.current=e,e.render(async a=>{try{e.pause(!0)}catch(e){console.warn("Failed to pause scanner",e)}i(a),d("validating");let r=(0,h.hV)(a);if(!r){d("invalid"),x("Invalid QR Code format"),s&&s("Invalid QR Code format");return}let n=await (0,h.yR)(r,l);n.valid?(d("valid"),t(r)):(d("invalid"),x(n.error||"Validation failed"),s&&s(n.error||"Validation failed"))},e=>{}),()=>{m.current&&m.current.clear().catch(console.error)}},[t,s,l]);let g=()=>{i(null),d("idle"),x(null),m.current&&m.current.resume()};return(0,a.jsxs)("div",{className:"w-full max-w-md mx-auto p-4 bg-white rounded-lg shadow",children:[(0,a.jsx)("h3",{className:"text-lg font-semibold mb-4 text-center",children:"Scan Booking QR Code"}),(0,a.jsx)("div",{id:"qr-reader-container",className:"w-full overflow-hidden rounded-lg"}),"validating"===o&&(0,a.jsxs)("div",{className:"text-center py-4",children:[(0,a.jsx)("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600 mx-auto mb-2"}),(0,a.jsx)("p",{className:"text-blue-600",children:"Verifying..."})]}),"valid"===o&&(0,a.jsxs)("div",{className:"text-center py-4 bg-green-50 rounded-lg mt-4 border border-green-200",children:[(0,a.jsxs)("div",{className:"text-green-600 text-xl font-bold mb-2 flex items-center justify-center gap-2",children:[(0,a.jsx)("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),"Access Granted"]}),(0,a.jsx)("p",{className:"text-sm text-gray-600",children:"Valid Booking Found"}),(0,a.jsx)("button",{onClick:g,className:"mt-4 px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700 transition-colors",children:"Scan Another"})]}),"invalid"===o&&(0,a.jsxs)("div",{className:"text-center py-4 bg-red-50 rounded-lg mt-4 border border-red-200",children:[(0,a.jsxs)("div",{className:"text-red-600 text-xl font-bold mb-2 flex items-center justify-center gap-2",children:[(0,a.jsx)("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),"Access Denied"]}),(0,a.jsx)("p",{className:"text-sm text-red-500 font-medium",children:c}),(0,a.jsx)("button",{onClick:g,className:"mt-4 px-4 py-2 bg-gray-600 text-white rounded hover:bg-gray-700 transition-colors",children:"Try Again"})]})]})}function p(e){let{address:t}=e,[s,l]=(0,r.useState)("spots"),[n,i]=(0,r.useState)(0),[c,x]=(0,r.useState)(null);return(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"mb-8",children:[(0,a.jsx)("h1",{className:"text-4xl font-bold mb-2",children:"Owner Dashboard"}),(0,a.jsx)("p",{className:"text-gray-600",children:"Manage your parking spots, view earnings, and track bookings"}),(0,a.jsxs)("p",{className:"text-sm text-gray-500 mt-2",children:["Connected: ",t.slice(0,6),"...",t.slice(-4)]})]}),(0,a.jsxs)("div",{className:"bg-white rounded-lg shadow mb-6",children:[(0,a.jsx)("div",{className:"border-b border-gray-200 overflow-x-auto",children:(0,a.jsxs)("nav",{className:"flex -mb-px",children:[(0,a.jsx)("button",{onClick:()=>l("spots"),className:"px-6 py-4 text-sm font-medium whitespace-nowrap ".concat("spots"===s?"border-b-2 border-blue-500 text-blue-600":"text-gray-500 hover:text-gray-700"),children:"My Spots"}),(0,a.jsx)("button",{onClick:()=>l("list"),className:"px-6 py-4 text-sm font-medium whitespace-nowrap ".concat("list"===s?"border-b-2 border-blue-500 text-blue-600":"text-gray-500 hover:text-gray-700"),children:"List New Spot"}),(0,a.jsx)("button",{onClick:()=>l("earnings"),className:"px-6 py-4 text-sm font-medium whitespace-nowrap ".concat("earnings"===s?"border-b-2 border-blue-500 text-blue-600":"text-gray-500 hover:text-gray-700"),children:"Earnings"}),(0,a.jsx)("button",{onClick:()=>l("statistics"),className:"px-6 py-4 text-sm font-medium whitespace-nowrap ".concat("statistics"===s?"border-b-2 border-blue-500 text-blue-600":"text-gray-500 hover:text-gray-700"),children:"Statistics"}),(0,a.jsx)("button",{onClick:()=>l("scan"),className:"px-6 py-4 text-sm font-medium whitespace-nowrap ".concat("scan"===s?"border-b-2 border-blue-500 text-blue-600":"text-gray-500 hover:text-gray-700"),children:"Scan QR"})]})}),(0,a.jsxs)("div",{className:"p-6",children:["spots"===s&&(0,a.jsx)(o,{address:t,refreshTrigger:n}),"list"===s&&(0,a.jsx)(m,{address:t,onSpotCreated:()=>{i(e=>e+1),l("spots")}}),"earnings"===s&&(0,a.jsx)(d,{address:t}),"statistics"===s&&(0,a.jsx)(g,{address:t}),"scan"===s&&(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)("h2",{className:"text-xl font-semibold mb-6",children:"Verify Booking Access"}),(0,a.jsx)("div",{className:"w-full max-w-lg mb-6",children:(0,a.jsx)(b,{onScanSuccess:e=>{console.log("Scanned:",e),x({valid:!0,message:"Valid Booking Found!",data:e})},onScanError:e=>{e&&!e.includes("No QR code found")&&x({valid:!1,message:e})}})}),c&&(0,a.jsxs)("div",{className:"p-4 rounded-lg border ".concat(c.valid?"bg-green-50 border-green-200":"bg-red-50 border-red-200"," w-full max-w-lg"),children:[(0,a.jsxs)("div",{className:"flex items-center mb-2",children:[(0,a.jsx)("div",{className:"w-3 h-3 rounded-full mr-2 ".concat(c.valid?"bg-green-500":"bg-red-500")}),(0,a.jsx)("h3",{className:"font-bold ".concat(c.valid?"text-green-800":"text-red-800"),children:c.valid?"Access Granted":"Access Denied"})]}),(0,a.jsx)("p",{className:"text-sm ".concat(c.valid?"text-green-700":"text-red-700"),children:c.message}),c.valid&&c.data&&(0,a.jsxs)("div",{className:"mt-3 text-sm text-green-800 border-t border-green-200 pt-2",children:[(0,a.jsxs)("p",{children:[(0,a.jsx)("strong",{children:"Booking ID:"})," ",c.data.bookingId]}),(0,a.jsxs)("p",{children:[(0,a.jsx)("strong",{children:"Spot ID:"})," ",c.data.spotId]}),(0,a.jsxs)("p",{children:[(0,a.jsx)("strong",{children:"Time:"})," ",new Date(c.data.timestamp).toLocaleString()]})]}),(0,a.jsx)("button",{onClick:()=>x(null),className:"mt-4 text-sm underline text-gray-600 hover:text-gray-900",children:"Scan Another"})]})]})]})]})]})}function y(){let[e,t]=(0,r.useState)(!1),[s,n]=(0,r.useState)(null);return e?(0,a.jsx)("main",{className:"min-h-screen p-8 bg-gray-50",children:(0,a.jsx)("div",{className:"max-w-6xl mx-auto",children:(0,a.jsx)(p,{address:s})})}):(0,a.jsx)("main",{className:"min-h-screen p-8 bg-gray-50",children:(0,a.jsxs)("div",{className:"max-w-6xl mx-auto",children:[(0,a.jsx)("h1",{className:"text-4xl font-bold mb-4",children:"Owner Dashboard"}),(0,a.jsxs)("div",{className:"bg-white rounded-lg shadow p-8 text-center",children:[(0,a.jsx)("p",{className:"text-lg text-gray-600 mb-6",children:"Please connect your wallet to access the owner dashboard"}),(0,a.jsx)(l.Z,{onConnect:e=>{n(e),t(!0)}})]})]})})}},45562:function(e,t,s){"use strict";s.d(t,{Z:function(){return r}});var a=s(57437);function r(e){let{onConnect:t}=e,s=async()=>{t("0x1234567890123456789012345678901234567890")};return(0,a.jsx)("button",{onClick:s,className:"px-6 py-3 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors",children:"Connect Wallet"})}},41960:function(e,t,s){"use strict";s.d(t,{CS:function(){return r},hV:function(){return l},yR:function(){return n}});var a=s(48790);function r(e,t,s,a,r,l){return JSON.stringify({bookingId:e,spotId:t,location:s,timestamp:l||Date.now(),type:"parking_access",signature:a,signerAddress:r})}function l(e){try{let t=JSON.parse(e);if(!t.bookingId||!t.spotId||!t.type)return null;return t}catch(e){return null}}async function n(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:48;if(Date.now()-e.timestamp>36e5*s)return{valid:!1,error:"QR code expired"};if(e.signature&&t){var r,l;if(!e.signerAddress||e.signerAddress.toLowerCase()!==t.toLowerCase())return{valid:!1,error:"Signer address mismatch"};let s=(r=e.bookingId,l=e.timestamp,"Access Request for Booking: ".concat(r,"\nTimestamp: ").concat(l));try{if(!await (0,a.n)({address:t,message:s,signature:e.signature}))return{valid:!1,error:"Invalid signature"}}catch(e){return{valid:!1,error:"Signature verification failed"}}}else if(t)return{valid:!1,error:"Missing signature"};return{valid:!0}}}},function(e){e.O(0,[52,9696,7656,2971,2117,1744],function(){return e(e.s=23596)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/app/page-0cfe101c9af1b51e.js b/frontend/.next/static/chunks/app/page-0cfe101c9af1b51e.js new file mode 100644 index 0000000..2be6a5d --- /dev/null +++ b/frontend/.next/static/chunks/app/page-0cfe101c9af1b51e.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1931],{98727:function(e,t,s){Promise.resolve().then(s.bind(s,73032))},73032:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return m}});var n=s(57437),a=s(2265),r=s(30166);function i(e){let{currentView:t,onViewChange:s}=e;return(0,n.jsxs)("div",{className:"flex bg-white rounded-lg shadow-lg overflow-hidden border border-gray-200",children:[(0,n.jsxs)("button",{onClick:()=>s("map"),className:"px-4 py-2 flex items-center gap-2 transition-colors ".concat("map"===t?"bg-blue-600 text-white":"bg-white text-gray-700 hover:bg-gray-50"),children:[(0,n.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 20l-5.447-2.724A1 1 0 013 16.382V5.618a1 1 0 011.447-.894L9 7m0 13l6-3m-6 3V7m6 10l4.553 2.276A1 1 0 0021 18.382V7.618a1 1 0 00-.553-.894L15 4m0 13V4m0 0L9 7"})}),(0,n.jsx)("span",{className:"font-medium",children:"Map"})]}),(0,n.jsxs)("button",{onClick:()=>s("list"),className:"px-4 py-2 flex items-center gap-2 transition-colors border-l border-gray-200 ".concat("list"===t?"bg-blue-600 text-white":"bg-white text-gray-700 hover:bg-gray-50"),children:[(0,n.jsx)("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 10h16M4 14h16M4 18h16"})}),(0,n.jsx)("span",{className:"font-medium",children:"List"})]})]})}var l=s(27648),o=s(43781);function c(e){let{spots:t,userLocation:s,onSpotClick:a}=e,r=[...t].sort((e,t)=>s&&e.coordinates&&t.coordinates?(0,o.cL)(s,e.coordinates)-(0,o.cL)(s,t.coordinates):0);return 0===t.length?(0,n.jsxs)("div",{className:"text-center py-12 bg-gray-50 rounded-lg",children:[(0,n.jsx)("p",{className:"text-gray-600",children:"No parking spots found"}),(0,n.jsx)("p",{className:"text-sm text-gray-500 mt-2",children:"Try adjusting your filters"})]}):(0,n.jsx)("div",{className:"space-y-4",children:r.map(e=>{let t=s&&e.coordinates?(0,o.Bb)((0,o.cL)(s,e.coordinates)):null;return(0,n.jsx)("div",{className:"bg-white rounded-lg shadow-md p-4 hover:shadow-lg transition-shadow cursor-pointer border border-gray-200",onClick:()=>null==a?void 0:a(e),children:(0,n.jsxs)("div",{className:"flex flex-col md:flex-row gap-4",children:[(0,n.jsx)("div",{className:"w-full md:w-32 h-32 bg-gray-200 rounded-lg flex-shrink-0 flex items-center justify-center",children:e.images&&e.images.length>0?(0,n.jsx)("span",{className:"text-gray-500 text-xs",children:"Image available"}):(0,n.jsx)("span",{className:"text-gray-400 text-xs",children:"No image"})}),(0,n.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,n.jsxs)("div",{className:"flex items-start justify-between gap-2 mb-2",children:[(0,n.jsxs)("h3",{className:"font-semibold text-lg text-gray-900 truncate",children:["Spot #",e.id]}),(0,n.jsx)("span",{className:"px-2 py-1 rounded-full text-xs font-medium whitespace-nowrap ".concat(e.isAvailable?"bg-green-100 text-green-800":"bg-red-100 text-red-800"),children:e.isAvailable?"Available":"Unavailable"})]}),(0,n.jsx)("p",{className:"text-sm text-gray-600 mb-2 truncate",children:e.location}),e.description&&(0,n.jsx)("p",{className:"text-sm text-gray-700 mb-3 line-clamp-2",children:e.description}),(0,n.jsxs)("div",{className:"flex items-center justify-between flex-wrap gap-2",children:[(0,n.jsxs)("div",{className:"flex items-center gap-4",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("span",{className:"text-xl font-bold text-blue-600",children:e.pricePerHour}),(0,n.jsx)("span",{className:"text-gray-500 text-sm ml-1",children:"cUSD/hr"})]}),t&&(0,n.jsxs)("div",{className:"text-sm text-gray-600",children:[(0,n.jsxs)("svg",{className:"w-4 h-4 inline mr-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z"}),(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 11a3 3 0 11-6 0 3 3 0 016 0z"})]}),t," away"]})]}),(0,n.jsx)(l.default,{href:"/booking/".concat(e.id),className:"px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 transition-colors text-sm font-medium",onClick:e=>e.stopPropagation(),children:"View Details"})]})]})]})},e.id)})})}var d=s(97130),x=s(96567);let u=(0,r.default)(()=>Promise.all([s.e(4212),s.e(319)]).then(s.bind(s,60319)),{loadableGenerated:{webpack:()=>[60319]},ssr:!1,loading:()=>(0,n.jsx)("div",{className:"w-full h-[600px] flex items-center justify-center bg-gray-100",children:(0,n.jsxs)("div",{className:"text-center",children:[(0,n.jsx)("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto mb-4"}),(0,n.jsx)("p",{className:"text-gray-600",children:"Loading map..."})]})})});function m(){let[e,t]=(0,a.useState)("map"),{spots:s,loading:r}=(0,d.j)(),{location:l}=(0,x.Z)(),o=e=>{window.location.href="/booking/".concat(e.id)};return(0,n.jsxs)("main",{className:"min-h-screen",children:[(0,n.jsx)("div",{className:"bg-white border-b border-gray-200 sticky top-0 z-50",children:(0,n.jsx)("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-4",children:(0,n.jsxs)("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("h1",{className:"text-3xl font-bold text-gray-900",children:"CarIn"}),(0,n.jsx)("p",{className:"text-gray-600 mt-1",children:"Decentralized parking spot booking on Celo blockchain"})]}),(0,n.jsx)(i,{currentView:e,onViewChange:t})]})})}),(0,n.jsx)("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-6",children:"map"===e?(0,n.jsx)("div",{className:"h-[calc(100vh-200px)] min-h-[600px]",children:(0,n.jsx)(u,{onSpotClick:o})}):(0,n.jsx)("div",{children:r?(0,n.jsxs)("div",{className:"text-center py-12",children:[(0,n.jsx)("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto mb-4"}),(0,n.jsx)("p",{className:"text-gray-600",children:"Loading parking spots..."})]}):(0,n.jsx)(c,{spots:s,userLocation:l,onSpotClick:o})})})]})}},96567:function(e,t,s){"use strict";s.d(t,{Z:function(){return a}});var n=s(2265);function a(){let[e,t]=(0,n.useState)({location:null,loading:!1,error:null,permissionDenied:!1}),s=(0,n.useCallback)(()=>{if(!navigator.geolocation){t({location:null,loading:!1,error:{code:0,message:"Geolocation is not supported by this browser"},permissionDenied:!1});return}t(e=>({...e,loading:!0,error:null})),navigator.geolocation.getCurrentPosition(e=>{t({location:{lat:e.coords.latitude,lng:e.coords.longitude},loading:!1,error:null,permissionDenied:!1})},e=>{t({location:null,loading:!1,error:{code:e.code,message:e.message},permissionDenied:1===e.code})},{enableHighAccuracy:!0,timeout:1e4,maximumAge:6e4})},[]);return(0,n.useEffect)(()=>{},[s]),{...e,getCurrentPosition:s}}},97130:function(e,t,s){"use strict";s.d(t,{j:function(){return a}});var n=s(2265);function a(){let[e,t]=(0,n.useState)({spots:[],loading:!1,error:null,lastFetch:null}),s=(0,n.useCallback)(async()=>{t(e=>({...e,loading:!0,error:null}));try{await new Promise(e=>setTimeout(e,500)),t({spots:[{id:1,location:"123 Main St, San Francisco, CA",coordinates:{lat:37.7749,lng:-122.4194},pricePerHour:"2.50",isAvailable:!0,owner:"0x123...",images:[],description:"Convenient street parking near downtown"},{id:2,location:"456 Market St, San Francisco, CA",coordinates:{lat:37.7849,lng:-122.4094},pricePerHour:"3.00",isAvailable:!0,owner:"0x456...",images:[],description:"Premium parking spot in financial district"},{id:3,location:"789 Mission St, San Francisco, CA",coordinates:{lat:37.7649,lng:-122.4294},pricePerHour:"1.75",isAvailable:!1,owner:"0x789...",images:[],description:"Affordable parking option"}],loading:!1,error:null,lastFetch:Date.now()})}catch(e){t(t=>({...t,loading:!1,error:e.message||"Failed to fetch parking spots"}))}},[]),a=(0,n.useCallback)(()=>{s()},[s]);(0,n.useEffect)(()=>{s()},[s]);let r=(0,n.useCallback)(()=>!e.lastFetch||Date.now()-e.lastFetch>3e4,[e.lastFetch]);return(0,n.useEffect)(()=>{if(r()&&!e.loading){let e=setInterval(()=>{r()&&s()},3e4);return()=>clearInterval(e)}},[r,e.loading,s]),{spots:e.spots,loading:e.loading,error:e.error,refresh:a}}},43781:function(e,t,s){"use strict";function n(e,t){let s=a(t.lat-e.lat),n=a(t.lng-e.lng),r=Math.sin(s/2)*Math.sin(s/2)+Math.cos(a(e.lat))*Math.cos(a(t.lat))*Math.sin(n/2)*Math.sin(n/2);return 2*Math.atan2(Math.sqrt(r),Math.sqrt(1-r))*6371}function a(e){return e*Math.PI/180}function r(e){return e<1?"".concat(Math.round(1e3*e),"m"):"".concat(e.toFixed(1),"km")}s.d(t,{Bb:function(){return r},cL:function(){return n}})}},function(e){e.O(0,[1288,2971,2117,1744],function(){return e(e.s=98727)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/app/rewards/history/page-97bf340a3dd6c427.js b/frontend/.next/static/chunks/app/rewards/history/page-97bf340a3dd6c427.js new file mode 100644 index 0000000..a6e9150 --- /dev/null +++ b/frontend/.next/static/chunks/app/rewards/history/page-97bf340a3dd6c427.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4356],{72823:function(e,r,t){Promise.resolve().then(t.bind(t,19500))},19500:function(e,r,t){"use strict";t.r(r),t.d(r,{default:function(){return c}});var a=t(57437),n=t(21843),s=t(45562),i=t(82070),l=t(54506);let o=e=>{try{return(0,l.Z)(new Date(1e3*e),{addSuffix:!0})}catch(n){let r=Math.floor(Date.now()/1e3-e);if(r<60)return"".concat(r," seconds ago");let t=Math.floor(r/60);if(t<60)return"".concat(t," minutes ago");let a=Math.floor(t/60);if(a<24)return"".concat(a," hours ago");return"".concat(Math.floor(a/24)," days ago")}};function d(){let{reports:e,loading:r}=(0,i.Hs)(),{referrals:t,loading:n}=(0,i.MB)(),s=e=>{switch(e){case 0:return(0,a.jsx)("span",{className:"px-2 py-1 bg-yellow-100 text-yellow-800 rounded text-xs",children:"Pending"});case 1:return(0,a.jsx)("span",{className:"px-2 py-1 bg-green-100 text-green-800 rounded text-xs",children:"Approved"});case 2:return(0,a.jsx)("span",{className:"px-2 py-1 bg-red-100 text-red-800 rounded text-xs",children:"Rejected"});case 3:return(0,a.jsx)("span",{className:"px-2 py-1 bg-blue-100 text-blue-800 rounded text-xs",children:"Claimed"});default:return(0,a.jsx)("span",{className:"px-2 py-1 bg-gray-100 text-gray-800 rounded text-xs",children:"Unknown"})}};return r||n?(0,a.jsxs)("div",{className:"bg-white rounded-lg shadow p-8 text-center",children:[(0,a.jsx)("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-500 mx-auto"}),(0,a.jsx)("p",{className:"mt-4 text-gray-600",children:"Loading history..."})]}):(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{className:"bg-white rounded-lg shadow p-6",children:[(0,a.jsx)("h2",{className:"text-xl font-semibold mb-4",children:"Report History"}),0===e.length?(0,a.jsx)("p",{className:"text-gray-600",children:"No reports submitted yet"}):(0,a.jsx)("div",{className:"space-y-4",children:e.map(e=>(0,a.jsxs)("div",{className:"border rounded p-4",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between mb-2",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("p",{className:"font-semibold",children:["Spot #",e.spotId]}),(0,a.jsx)("p",{className:"text-sm text-gray-600",children:e.reason})]}),s(e.claimStatus)]}),(0,a.jsxs)("div",{className:"flex items-center justify-between text-sm text-gray-500 mt-2",children:[(0,a.jsx)("span",{children:o(e.timestamp)}),"0.0"!==e.rewardAmount&&(0,a.jsxs)("span",{className:"font-semibold text-green-600",children:["+",e.rewardAmount," CARIN"]})]})]},e.reportId))})]}),(0,a.jsxs)("div",{className:"bg-white rounded-lg shadow p-6",children:[(0,a.jsx)("h2",{className:"text-xl font-semibold mb-4",children:"Referral History"}),0===t.length?(0,a.jsx)("p",{className:"text-gray-600",children:"No referrals created yet"}):(0,a.jsx)("div",{className:"space-y-4",children:t.map(e=>(0,a.jsxs)("div",{className:"border rounded p-4",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between mb-2",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("p",{className:"font-semibold",children:["Spot #",e.spotId]}),(0,a.jsxs)("p",{className:"text-sm text-gray-600",children:["Referred: ",e.referee.slice(0,6),"...",e.referee.slice(-4)]})]}),s(e.claimStatus)]}),(0,a.jsxs)("div",{className:"flex items-center justify-between text-sm text-gray-500 mt-2",children:[(0,a.jsx)("span",{children:o(e.timestamp)}),"0.0"!==e.rewardAmount&&(0,a.jsxs)("span",{className:"font-semibold text-green-600",children:["+",e.rewardAmount," CARIN"]})]})]},e.referralHash))})]})]})}function c(){let{isConnected:e}=(0,n.R)();return e?(0,a.jsx)("div",{className:"container mx-auto px-4 py-8",children:(0,a.jsxs)("div",{className:"max-w-4xl mx-auto",children:[(0,a.jsx)("h1",{className:"text-3xl font-bold mb-6",children:"Reward History"}),(0,a.jsx)(d,{})]})}):(0,a.jsx)("div",{className:"container mx-auto px-4 py-8",children:(0,a.jsxs)("div",{className:"max-w-4xl mx-auto",children:[(0,a.jsx)("h1",{className:"text-3xl font-bold mb-6",children:"Reward History"}),(0,a.jsxs)("div",{className:"bg-white rounded-lg shadow p-8 text-center",children:[(0,a.jsx)("p",{className:"text-gray-600 mb-4",children:"Please connect your wallet to view your reward history"}),(0,a.jsx)(s.Z,{})]})]})})}},45562:function(e,r,t){"use strict";t.d(r,{Z:function(){return n}});var a=t(57437);function n(e){let{onConnect:r}=e,t=async()=>{r("0x1234567890123456789012345678901234567890")};return(0,a.jsx)("button",{onClick:t,className:"px-6 py-3 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors",children:"Connect Wallet"})}},64856:function(e,r,t){"use strict";t.d(r,{E4:function(){return n},FM:function(){return d}});var a,n,s=t(12809),i=t(40257);let l=["function submitInaccuracyReport(uint256 spotId, string memory reason, bytes memory evidenceHash) external","function createReferral(address referee, uint256 spotId) external","function claimReward(uint8 rewardType) external","function claimAllRewards() external","function getPendingRewards(address user) external view returns (uint256)","function getPendingRewardByType(address user, uint8 rewardType) external view returns (uint256)","function reports(uint256 reportId) external view returns (tuple(uint256 reportId, uint256 spotId, address reporter, string reason, bytes evidenceHash, uint256 timestamp, bool isValid, uint8 claimStatus, uint256 rewardAmount))","function referrals(bytes32 referralHash) external view returns (tuple(address referrer, address referee, uint256 spotId, uint256 timestamp, bool isActive, uint256 rewardAmount, uint8 claimStatus))","function userReports(address user) external view returns (uint256[] memory)","function userReferrals(address user) external view returns (bytes32[] memory)","function inaccuracyReportReward() external view returns (uint256)","function spotShareReward() external view returns (uint256)","function referralReward() external view returns (uint256)","event ReportSubmitted(uint256 indexed reportId, uint256 indexed spotId, address indexed reporter, string reason)","event ReferralCreated(bytes32 indexed referralHash, address indexed referrer, address indexed referee, uint256 spotId)","event RewardClaimed(address indexed user, uint8 rewardType, uint256 amount, uint256 timestamp)"];(a=n||(n={}))[a.InaccuracyReport=0]="InaccuracyReport",a[a.SpotShare=1]="SpotShare",a[a.Referral=2]="Referral",a[a.CommunityContribution=3]="CommunityContribution";let o={alfajores:i.env.NEXT_PUBLIC_REWARDS_MANAGER_ADDRESS_ALFAJORES||"",celo:i.env.NEXT_PUBLIC_REWARDS_MANAGER_ADDRESS_CELO||""};function d(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"alfajores",t=o[r];if(!t)throw Error("RewardsManager address not configured for ".concat(r));return new s.CH(t,l,e)}},82070:function(e,r,t){"use strict";t.d(r,{Hs:function(){return m},MB:function(){return f},tb:function(){return u}});var a=t(2265),n=t(21843),s=t(53882),i=t(13577),l=t(41662),o=t(9478),d=t(64856),c=t(40257);function u(){let{address:e,isConnected:r}=(0,n.R)(),t=(0,s.t)(),{data:o}=(0,i.p)(),[u,m]=(0,a.useState)(null),[f,x]=(0,a.useState)(!1),[p,w]=(0,a.useState)(null),h=(0,a.useCallback)(async()=>{if(!e||!t||!r){m(null);return}try{x(!0),w(null);let r="alfajores",a=c.env.NEXT_PUBLIC_REWARDS_TOKEN_ADDRESS_ALFAJORES,n=c.env.NEXT_PUBLIC_REWARDS_MANAGER_ADDRESS_ALFAJORES;if(!a||!n)throw Error("Rewards contracts not configured");let s=(0,d.getRewardsTokenContract)(t,r),i=await s.balanceOf(e),o=(0,d.FM)(t,r),u=await o.getPendingRewards(e),f=await o.getPendingRewardByType(e,d.E4.InaccuracyReport),p=await o.getPendingRewardByType(e,d.E4.SpotShare),h=await o.getPendingRewardByType(e,d.E4.Referral),y=await o.getPendingRewardByType(e,d.E4.CommunityContribution);m({balance:l.dF(i),pendingTotal:l.dF(u),pendingByType:{inaccuracyReport:l.dF(f),spotShare:l.dF(p),referral:l.dF(h),communityContribution:l.dF(y)}})}catch(e){console.error("Error loading rewards balance:",e),w(e instanceof Error?e.message:"Failed to load rewards")}finally{x(!1)}},[e,t,r]);(0,a.useEffect)(()=>{h()},[h]);let y=(0,a.useCallback)(async r=>{if(!o||!e)throw Error("Wallet not connected");try{x(!0),w(null);let e=(0,d.FM)(o,"alfajores"),t=await e.claimReward(r);await t.wait(),await h()}catch(e){throw console.error("Error claiming reward:",e),w(e instanceof Error?e.message:"Failed to claim reward"),e}finally{x(!1)}},[o,e,h]),b=(0,a.useCallback)(async()=>{if(!o||!e)throw Error("Wallet not connected");try{x(!0),w(null);let e=(0,d.FM)(o,"alfajores"),r=await e.claimAllRewards();await r.wait(),await h()}catch(e){throw console.error("Error claiming all rewards:",e),w(e instanceof Error?e.message:"Failed to claim rewards"),e}finally{x(!1)}},[o,e,h]);return{balance:u,loading:f,error:p,loadBalance:h,claimReward:y,claimAllRewards:b}}function m(){let{address:e,isConnected:r}=(0,n.R)(),t=(0,s.t)(),{data:c}=(0,i.p)(),[u,m]=(0,a.useState)([]),[f,x]=(0,a.useState)(!1),p=(0,a.useCallback)(async()=>{if(!e||!t||!r){m([]);return}try{x(!0);let r=(0,d.FM)(t,"alfajores"),a=await r.userReports(e),n=await Promise.all(a.map(e=>r.reports(e)));m(n.map((e,r)=>({reportId:Number(a[r]),spotId:Number(e.spotId),reason:e.reason,timestamp:Number(e.timestamp),isValid:e.isValid,claimStatus:Number(e.claimStatus),rewardAmount:l.dF(e.rewardAmount)})))}catch(e){console.error("Error loading reports:",e)}finally{x(!1)}},[e,t,r]);return(0,a.useEffect)(()=>{p()},[p]),{reports:u,loading:f,submitReport:(0,a.useCallback)(async(r,t,a)=>{if(!c||!e)throw Error("Wallet not connected");try{x(!0);let e=(0,d.FM)(c,"alfajores"),n=o.Y0(a),s=await e.submitInaccuracyReport(r,t,n);await s.wait(),await p()}catch(e){throw console.error("Error submitting report:",e),e}finally{x(!1)}},[c,e,p]),loadReports:p}}function f(){let{address:e,isConnected:r}=(0,n.R)(),t=(0,s.t)(),{data:o}=(0,i.p)(),[c,u]=(0,a.useState)([]),[m,f]=(0,a.useState)(!1),x=(0,a.useCallback)(async()=>{if(!e||!t||!r){u([]);return}try{f(!0);let r=(0,d.FM)(t,"alfajores"),a=await r.userReferrals(e),n=await Promise.all(a.map(e=>r.referrals(e)));u(n.map((e,r)=>({referralHash:a[r],referee:e.referee,spotId:Number(e.spotId),timestamp:Number(e.timestamp),isActive:e.isActive,rewardAmount:l.dF(e.rewardAmount),claimStatus:Number(e.claimStatus)})))}catch(e){console.error("Error loading referrals:",e)}finally{f(!1)}},[e,t,r]);return(0,a.useEffect)(()=>{x()},[x]),{referrals:c,loading:m,createReferral:(0,a.useCallback)(async(r,t)=>{if(!o||!e)throw Error("Wallet not connected");try{f(!0);let e=(0,d.FM)(o,"alfajores"),a=await e.createReferral(r,t);await a.wait(),await x()}catch(e){throw console.error("Error creating referral:",e),e}finally{f(!1)}},[o,e,x]),loadReferrals:x}}}},function(e){e.O(0,[9696,58,642,846,8332,9334,4506,7077,6130,2971,2117,1744],function(){return e(e.s=72823)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/app/rewards/page-10bb5e0a8a5cc8bd.js b/frontend/.next/static/chunks/app/rewards/page-10bb5e0a8a5cc8bd.js new file mode 100644 index 0000000..81683b6 --- /dev/null +++ b/frontend/.next/static/chunks/app/rewards/page-10bb5e0a8a5cc8bd.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4195],{88109:function(e,r,t){Promise.resolve().then(t.bind(t,56767))},56767:function(e,r,t){"use strict";t.r(r),t.d(r,{default:function(){return o}});var a=t(57437),n=t(82070),s=t(64856),i=t(21843),l=t(45562);function o(){let{address:e,isConnected:r}=(0,i.R)(),{balance:t,loading:o,error:d,claimReward:c,claimAllRewards:u}=(0,n.tb)();if(!r)return(0,a.jsx)("div",{className:"container mx-auto px-4 py-8",children:(0,a.jsxs)("div",{className:"max-w-2xl mx-auto",children:[(0,a.jsx)("h1",{className:"text-3xl font-bold mb-6",children:"Rewards Dashboard"}),(0,a.jsxs)("div",{className:"bg-white rounded-lg shadow p-8 text-center",children:[(0,a.jsx)("p",{className:"text-gray-600 mb-4",children:"Please connect your wallet to view your rewards"}),(0,a.jsx)(l.Z,{})]})]})});let m=async e=>{try{await c(e),alert("Reward claimed successfully!")}catch(e){alert("Failed to claim reward: ".concat(e instanceof Error?e.message:"Unknown error"))}},p=async()=>{try{await u(),alert("All rewards claimed successfully!")}catch(e){alert("Failed to claim rewards: ".concat(e instanceof Error?e.message:"Unknown error"))}};return(0,a.jsx)("div",{className:"container mx-auto px-4 py-8",children:(0,a.jsxs)("div",{className:"max-w-4xl mx-auto",children:[(0,a.jsx)("h1",{className:"text-3xl font-bold mb-6",children:"Rewards Dashboard"}),d&&(0,a.jsx)("div",{className:"bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded mb-4",children:d}),o?(0,a.jsxs)("div",{className:"bg-white rounded-lg shadow p-8 text-center",children:[(0,a.jsx)("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-500 mx-auto"}),(0,a.jsx)("p",{className:"mt-4 text-gray-600",children:"Loading rewards..."})]}):t?(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{className:"bg-white rounded-lg shadow p-6",children:[(0,a.jsx)("h2",{className:"text-xl font-semibold mb-4",children:"Your Rewards Balance"}),(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm text-gray-600",children:"Total Balance"}),(0,a.jsxs)("p",{className:"text-3xl font-bold text-blue-600",children:[t.balance," CARIN"]})]}),(0,a.jsxs)("div",{className:"text-right",children:[(0,a.jsx)("p",{className:"text-sm text-gray-600",children:"Pending Rewards"}),(0,a.jsxs)("p",{className:"text-2xl font-semibold text-green-600",children:[t.pendingTotal," CARIN"]})]})]})]}),(0,a.jsxs)("div",{className:"bg-white rounded-lg shadow p-6",children:[(0,a.jsx)("h2",{className:"text-xl font-semibold mb-4",children:"Pending Rewards Breakdown"}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{className:"border rounded p-4",children:[(0,a.jsx)("p",{className:"text-sm text-gray-600 mb-1",children:"Inaccuracy Reports"}),(0,a.jsxs)("p",{className:"text-lg font-semibold",children:[t.pendingByType.inaccuracyReport," CARIN"]}),parseFloat(t.pendingByType.inaccuracyReport)>0&&(0,a.jsx)("button",{onClick:()=>m(s.E4.InaccuracyReport),className:"mt-2 px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600",children:"Claim"})]}),(0,a.jsxs)("div",{className:"border rounded p-4",children:[(0,a.jsx)("p",{className:"text-sm text-gray-600 mb-1",children:"Spot Shares"}),(0,a.jsxs)("p",{className:"text-lg font-semibold",children:[t.pendingByType.spotShare," CARIN"]}),parseFloat(t.pendingByType.spotShare)>0&&(0,a.jsx)("button",{onClick:()=>m(s.E4.SpotShare),className:"mt-2 px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600",children:"Claim"})]}),(0,a.jsxs)("div",{className:"border rounded p-4",children:[(0,a.jsx)("p",{className:"text-sm text-gray-600 mb-1",children:"Referrals"}),(0,a.jsxs)("p",{className:"text-lg font-semibold",children:[t.pendingByType.referral," CARIN"]}),parseFloat(t.pendingByType.referral)>0&&(0,a.jsx)("button",{onClick:()=>m(s.E4.Referral),className:"mt-2 px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600",children:"Claim"})]}),(0,a.jsxs)("div",{className:"border rounded p-4",children:[(0,a.jsx)("p",{className:"text-sm text-gray-600 mb-1",children:"Community Contributions"}),(0,a.jsxs)("p",{className:"text-lg font-semibold",children:[t.pendingByType.communityContribution," CARIN"]}),parseFloat(t.pendingByType.communityContribution)>0&&(0,a.jsx)("button",{onClick:()=>m(s.E4.CommunityContribution),className:"mt-2 px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600",children:"Claim"})]})]})]}),parseFloat(t.pendingTotal)>0&&(0,a.jsx)("div",{className:"bg-white rounded-lg shadow p-6",children:(0,a.jsxs)("button",{onClick:p,className:"w-full px-6 py-3 bg-green-500 text-white rounded-lg hover:bg-green-600 font-semibold",children:["Claim All Pending Rewards (",t.pendingTotal," CARIN)"]})})]}):(0,a.jsx)("div",{className:"bg-white rounded-lg shadow p-8 text-center",children:(0,a.jsx)("p",{className:"text-gray-600",children:"No rewards data available"})})]})})}},45562:function(e,r,t){"use strict";t.d(r,{Z:function(){return n}});var a=t(57437);function n(e){let{onConnect:r}=e,t=async()=>{r("0x1234567890123456789012345678901234567890")};return(0,a.jsx)("button",{onClick:t,className:"px-6 py-3 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors",children:"Connect Wallet"})}},64856:function(e,r,t){"use strict";t.d(r,{E4:function(){return n},FM:function(){return d}});var a,n,s=t(12809),i=t(40257);let l=["function submitInaccuracyReport(uint256 spotId, string memory reason, bytes memory evidenceHash) external","function createReferral(address referee, uint256 spotId) external","function claimReward(uint8 rewardType) external","function claimAllRewards() external","function getPendingRewards(address user) external view returns (uint256)","function getPendingRewardByType(address user, uint8 rewardType) external view returns (uint256)","function reports(uint256 reportId) external view returns (tuple(uint256 reportId, uint256 spotId, address reporter, string reason, bytes evidenceHash, uint256 timestamp, bool isValid, uint8 claimStatus, uint256 rewardAmount))","function referrals(bytes32 referralHash) external view returns (tuple(address referrer, address referee, uint256 spotId, uint256 timestamp, bool isActive, uint256 rewardAmount, uint8 claimStatus))","function userReports(address user) external view returns (uint256[] memory)","function userReferrals(address user) external view returns (bytes32[] memory)","function inaccuracyReportReward() external view returns (uint256)","function spotShareReward() external view returns (uint256)","function referralReward() external view returns (uint256)","event ReportSubmitted(uint256 indexed reportId, uint256 indexed spotId, address indexed reporter, string reason)","event ReferralCreated(bytes32 indexed referralHash, address indexed referrer, address indexed referee, uint256 spotId)","event RewardClaimed(address indexed user, uint8 rewardType, uint256 amount, uint256 timestamp)"];(a=n||(n={}))[a.InaccuracyReport=0]="InaccuracyReport",a[a.SpotShare=1]="SpotShare",a[a.Referral=2]="Referral",a[a.CommunityContribution=3]="CommunityContribution";let o={alfajores:i.env.NEXT_PUBLIC_REWARDS_MANAGER_ADDRESS_ALFAJORES||"",celo:i.env.NEXT_PUBLIC_REWARDS_MANAGER_ADDRESS_CELO||""};function d(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"alfajores",t=o[r];if(!t)throw Error("RewardsManager address not configured for ".concat(r));return new s.CH(t,l,e)}},82070:function(e,r,t){"use strict";t.d(r,{Hs:function(){return m},MB:function(){return p},tb:function(){return u}});var a=t(2265),n=t(21843),s=t(53882),i=t(13577),l=t(41662),o=t(9478),d=t(64856),c=t(40257);function u(){let{address:e,isConnected:r}=(0,n.R)(),t=(0,s.t)(),{data:o}=(0,i.p)(),[u,m]=(0,a.useState)(null),[p,x]=(0,a.useState)(!1),[w,f]=(0,a.useState)(null),h=(0,a.useCallback)(async()=>{if(!e||!t||!r){m(null);return}try{x(!0),f(null);let r="alfajores",a=c.env.NEXT_PUBLIC_REWARDS_TOKEN_ADDRESS_ALFAJORES,n=c.env.NEXT_PUBLIC_REWARDS_MANAGER_ADDRESS_ALFAJORES;if(!a||!n)throw Error("Rewards contracts not configured");let s=(0,d.getRewardsTokenContract)(t,r),i=await s.balanceOf(e),o=(0,d.FM)(t,r),u=await o.getPendingRewards(e),p=await o.getPendingRewardByType(e,d.E4.InaccuracyReport),w=await o.getPendingRewardByType(e,d.E4.SpotShare),h=await o.getPendingRewardByType(e,d.E4.Referral),b=await o.getPendingRewardByType(e,d.E4.CommunityContribution);m({balance:l.dF(i),pendingTotal:l.dF(u),pendingByType:{inaccuracyReport:l.dF(p),spotShare:l.dF(w),referral:l.dF(h),communityContribution:l.dF(b)}})}catch(e){console.error("Error loading rewards balance:",e),f(e instanceof Error?e.message:"Failed to load rewards")}finally{x(!1)}},[e,t,r]);(0,a.useEffect)(()=>{h()},[h]);let b=(0,a.useCallback)(async r=>{if(!o||!e)throw Error("Wallet not connected");try{x(!0),f(null);let e=(0,d.FM)(o,"alfajores"),t=await e.claimReward(r);await t.wait(),await h()}catch(e){throw console.error("Error claiming reward:",e),f(e instanceof Error?e.message:"Failed to claim reward"),e}finally{x(!1)}},[o,e,h]),y=(0,a.useCallback)(async()=>{if(!o||!e)throw Error("Wallet not connected");try{x(!0),f(null);let e=(0,d.FM)(o,"alfajores"),r=await e.claimAllRewards();await r.wait(),await h()}catch(e){throw console.error("Error claiming all rewards:",e),f(e instanceof Error?e.message:"Failed to claim rewards"),e}finally{x(!1)}},[o,e,h]);return{balance:u,loading:p,error:w,loadBalance:h,claimReward:b,claimAllRewards:y}}function m(){let{address:e,isConnected:r}=(0,n.R)(),t=(0,s.t)(),{data:c}=(0,i.p)(),[u,m]=(0,a.useState)([]),[p,x]=(0,a.useState)(!1),w=(0,a.useCallback)(async()=>{if(!e||!t||!r){m([]);return}try{x(!0);let r=(0,d.FM)(t,"alfajores"),a=await r.userReports(e),n=await Promise.all(a.map(e=>r.reports(e)));m(n.map((e,r)=>({reportId:Number(a[r]),spotId:Number(e.spotId),reason:e.reason,timestamp:Number(e.timestamp),isValid:e.isValid,claimStatus:Number(e.claimStatus),rewardAmount:l.dF(e.rewardAmount)})))}catch(e){console.error("Error loading reports:",e)}finally{x(!1)}},[e,t,r]);return(0,a.useEffect)(()=>{w()},[w]),{reports:u,loading:p,submitReport:(0,a.useCallback)(async(r,t,a)=>{if(!c||!e)throw Error("Wallet not connected");try{x(!0);let e=(0,d.FM)(c,"alfajores"),n=o.Y0(a),s=await e.submitInaccuracyReport(r,t,n);await s.wait(),await w()}catch(e){throw console.error("Error submitting report:",e),e}finally{x(!1)}},[c,e,w]),loadReports:w}}function p(){let{address:e,isConnected:r}=(0,n.R)(),t=(0,s.t)(),{data:o}=(0,i.p)(),[c,u]=(0,a.useState)([]),[m,p]=(0,a.useState)(!1),x=(0,a.useCallback)(async()=>{if(!e||!t||!r){u([]);return}try{p(!0);let r=(0,d.FM)(t,"alfajores"),a=await r.userReferrals(e),n=await Promise.all(a.map(e=>r.referrals(e)));u(n.map((e,r)=>({referralHash:a[r],referee:e.referee,spotId:Number(e.spotId),timestamp:Number(e.timestamp),isActive:e.isActive,rewardAmount:l.dF(e.rewardAmount),claimStatus:Number(e.claimStatus)})))}catch(e){console.error("Error loading referrals:",e)}finally{p(!1)}},[e,t,r]);return(0,a.useEffect)(()=>{x()},[x]),{referrals:c,loading:m,createReferral:(0,a.useCallback)(async(r,t)=>{if(!o||!e)throw Error("Wallet not connected");try{p(!0);let e=(0,d.FM)(o,"alfajores"),a=await e.createReferral(r,t);await a.wait(),await x()}catch(e){throw console.error("Error creating referral:",e),e}finally{p(!1)}},[o,e,x]),loadReferrals:x}}}},function(e){e.O(0,[9696,58,642,846,8332,9334,7077,6130,2971,2117,1744],function(){return e(e.s=88109)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/d0deef33.0379166a4ec23470.js b/frontend/.next/static/chunks/d0deef33.0379166a4ec23470.js new file mode 100644 index 0000000..1e9ff97 --- /dev/null +++ b/frontend/.next/static/chunks/d0deef33.0379166a4ec23470.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4212],{60759:function(t,i){!function(t){"use strict";function i(t){var i,e,n,o;for(e=1,n=arguments.length;e0?Math.floor(t):Math.ceil(t)};function W(t,i,e){return t instanceof j?t:z(t)?new j(t[0],t[1]):null==t?t:"object"==typeof t&&"x"in t&&"y"in t?new j(t.x,t.y):new j(t,i,e)}function F(t,i){if(t)for(var e=i?[t,i]:t,n=0,o=e.length;n=this.min.x&&e.x<=this.max.x&&i.y>=this.min.y&&e.y<=this.max.y},intersects:function(t){t=U(t);var i=this.min,e=this.max,n=t.min,o=t.max,s=o.x>=i.x&&n.x<=e.x,r=o.y>=i.y&&n.y<=e.y;return s&&r},overlaps:function(t){t=U(t);var i=this.min,e=this.max,n=t.min,o=t.max,s=o.x>i.x&&n.xi.y&&n.y=n.lat&&e.lat<=o.lat&&i.lng>=n.lng&&e.lng<=o.lng},intersects:function(t){t=q(t);var i=this._southWest,e=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>=i.lat&&n.lat<=e.lat,r=o.lng>=i.lng&&n.lng<=e.lng;return s&&r},overlaps:function(t){t=q(t);var i=this._southWest,e=this._northEast,n=t.getSouthWest(),o=t.getNorthEast(),s=o.lat>i.lat&&n.lati.lng&&n.lng1,tS=function(){var t=!1;try{var i=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",v,i),window.removeEventListener("testPassiveEventSupport",v,i)}catch(t){}return t}(),tE=!!document.createElement("canvas").getContext,tk=!!(document.createElementNS&&te("svg").createSVGRect),tO=!!tk&&((u=document.createElement("div")).innerHTML="","http://www.w3.org/2000/svg"===(u.firstChild&&u.firstChild.namespaceURI)),tA=!tk&&function(){try{var t=document.createElement("div");t.innerHTML='';var i=t.firstChild;return i.style.behavior="url(#default#VML)",i&&"object"==typeof i.adj}catch(t){return!1}}();function tB(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var tI={ie:ts,ielt9:tr,edge:ta,webkit:th,android:tl,android23:tu,androidStock:t_,opera:td,chrome:tp,gecko:tm,safari:tf,phantom:tg,opera12:tv,win:ty,ie3d:tx,webkit3d:tw,gecko3d:tb,any3d:tP,mobile:tL,mobileWebkit:tL&&th,mobileWebkit3d:tL&&tw,msPointer:tT,pointer:tM,touch:tC,touchNative:tz,mobileOpera:tL&&td,mobileGecko:tL&&tm,retina:tZ,passiveEvents:tS,canvas:tE,svg:tk,vml:tA,inlineSvg:tO,mac:0===navigator.platform.indexOf("Mac"),linux:0===navigator.platform.indexOf("Linux")},tR=tI.msPointer?"MSPointerDown":"pointerdown",tN=tI.msPointer?"MSPointerMove":"pointermove",tD=tI.msPointer?"MSPointerUp":"pointerup",tj=tI.msPointer?"MSPointerCancel":"pointercancel",tH={touchstart:tR,touchmove:tN,touchend:tD,touchcancel:tj},tW={touchstart:function(t,i){i.MSPOINTER_TYPE_TOUCH&&i.pointerType===i.MSPOINTER_TYPE_TOUCH&&iL(i),tK(t,i)},touchmove:tK,touchend:tK,touchcancel:tK},tF={},tU=!1;function tV(t){tF[t.pointerId]=t}function tq(t){tF[t.pointerId]&&(tF[t.pointerId]=t)}function tG(t){delete tF[t.pointerId]}function tK(t,i){if(i.pointerType!==(i.MSPOINTER_TYPE_MOUSE||"mouse")){for(var e in i.touches=[],tF)i.touches.push(tF[e]);i.changedTouches=[i],t(i)}}var tY=ii(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),tX=ii(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),tJ="webkitTransition"===tX||"OTransition"===tX?tX+"End":"transitionend";function t$(t){return"string"==typeof t?document.getElementById(t):t}function tQ(t,i){var e=t.style[i]||t.currentStyle&&t.currentStyle[i];if((!e||"auto"===e)&&document.defaultView){var n=document.defaultView.getComputedStyle(t,null);e=n?n[i]:null}return"auto"===e?null:e}function t0(t,i,e){var n=document.createElement(t);return n.className=i||"",e&&e.appendChild(n),n}function t1(t){var i=t.parentNode;i&&i.removeChild(t)}function t2(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function t3(t){var i=t.parentNode;i&&i.lastChild!==t&&i.appendChild(t)}function t5(t){var i=t.parentNode;i&&i.firstChild!==t&&i.insertBefore(t,i.firstChild)}function t8(t,i){if(void 0!==t.classList)return t.classList.contains(i);var e=t6(t);return e.length>0&&RegExp("(^|\\s)"+i+"(\\s|$)").test(e)}function t9(t,i){if(void 0!==t.classList)for(var e=w(i),n=0,o=e.length;n0?2*window.devicePixelRatio:1;function iZ(t){return tI.edge?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/iC:t.deltaY&&1===t.deltaMode?-(20*t.deltaY):t.deltaY&&2===t.deltaMode?-(60*t.deltaY):t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&32765>Math.abs(t.detail)?-(20*t.detail):t.detail?-(t.detail/32765*60):0}function iS(t,i){var e=i.relatedTarget;if(!e)return!0;try{for(;e&&e!==t;)e=e.parentNode}catch(t){return!1}return e!==t}var iE=D.extend({run:function(t,i,e,n){this.stop(),this._el=t,this._inProgress=!0,this._duration=e||.25,this._easeOutPower=1/Math.max(n||.5,.2),this._startPos=is(t),this._offset=i.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=B(this._animate,this),this._step()},_step:function(t){var i=+new Date-this._startTime,e=1e3*this._duration;ithis.options.maxZoom))?this.setZoom(t):this},panInsideBounds:function(t,i){this._enforcingBounds=!0;var e=this.getCenter(),n=this._limitCenter(e,this._zoom,q(t));return e.equals(n)||this.panTo(n,i),this._enforcingBounds=!1,this},panInside:function(t,i){var e=W((i=i||{}).paddingTopLeft||i.padding||[0,0]),n=W(i.paddingBottomRight||i.padding||[0,0]),o=this.project(this.getCenter()),s=this.project(t),r=this.getPixelBounds(),a=U([r.min.add(e),r.max.subtract(n)]),h=a.getSize();if(!a.contains(s)){this._enforcingBounds=!0;var l=s.subtract(a.getCenter()),u=a.extend(s).getSize().subtract(h);o.x+=l.x<0?-u.x:u.x,o.y+=l.y<0?-u.y:u.y,this.panTo(this.unproject(o),i),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=i({animate:!1,pan:!0},!0===t?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var n=this.getSize(),o=e.divideBy(2).round(),s=n.divideBy(2).round(),r=o.subtract(s);return r.x||r.y?(t.animate&&t.pan?this.panBy(r):(t.pan&&this._rawPanBy(r),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(d(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:n})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=i({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=d(this._handleGeolocationResponse,this),n=d(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,n,t):navigator.geolocation.getCurrentPosition(e,n,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){if(this._container._leaflet_id){var i=t.code,e=t.message||(1===i?"permission denied":2===i?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:i,message:"Geolocation error: "+e+"."})}},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var i=new G(t.coords.latitude,t.coords.longitude),e=i.toBounds(2*t.coords.accuracy),n=this._locateOptions;if(n.setView){var o=this.getBoundsZoom(e);this.setView(i,n.maxZoom?Math.min(o,n.maxZoom):o)}var s={latlng:i,bounds:e,timestamp:t.timestamp};for(var r in t.coords)"number"==typeof t.coords[r]&&(s[r]=t.coords[r]);this.fire("locationfound",s)}},addHandler:function(t,i){if(!i)return this;var e=this[t]=new i(this);return this._handlers.push(e),this.options[t]&&e.enable(),this},remove:function(){var t;if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(t){this._container._leaflet_id=void 0,this._containerId=void 0}for(t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),t1(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(I(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)t1(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,i){var e=t0("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),i||this._mapPane);return t&&(this._panes[t]=e),e},getCenter:function(){return(this._checkIfLoaded(),this._lastCenter&&!this._moved())?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new V(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,i,e){t=q(t),e=W(e||[0,0]);var n=this.getZoom()||0,o=this.getMinZoom(),s=this.getMaxZoom(),r=t.getNorthWest(),a=t.getSouthEast(),h=this.getSize().subtract(e),l=U(this.project(a,n),this.project(r,n)).getSize(),u=tI.any3d?this.options.zoomSnap:1,c=h.x/l.x,_=h.y/l.y;return n=this.getScaleZoom(i?Math.max(c,_):Math.min(c,_),n),u&&(n=u/100*Math.round(n/(u/100)),n=i?Math.ceil(n/u)*u:Math.floor(n/u)*u),Math.max(o,Math.min(s,n))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new j(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,i){var e=this._getTopLeftPoint(t,i);return new F(e,e.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,i){var e=this.options.crs;return i=void 0===i?this._zoom:i,e.scale(t)/e.scale(i)},getScaleZoom:function(t,i){var e=this.options.crs;i=void 0===i?this._zoom:i;var n=e.zoom(t*e.scale(i));return isNaN(n)?1/0:n},project:function(t,i){return i=void 0===i?this._zoom:i,this.options.crs.latLngToPoint(K(t),i)},unproject:function(t,i){return i=void 0===i?this._zoom:i,this.options.crs.pointToLatLng(W(t),i)},layerPointToLatLng:function(t){var i=W(t).add(this.getPixelOrigin());return this.unproject(i)},latLngToLayerPoint:function(t){return this.project(K(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(K(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(q(t))},distance:function(t,i){return this.options.crs.distance(K(t),K(i))},containerPointToLayerPoint:function(t){return W(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return W(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var i=this.containerPointToLayerPoint(W(t));return this.layerPointToLatLng(i)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(K(t)))},mouseEventToContainerPoint:function(t){return iz(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var i=this._container=t$(t);if(i){if(i._leaflet_id)throw Error("Map container is already initialized.")}else throw Error("Map container not found.");id(i,"scroll",this._onScroll,this),this._containerId=m(i)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&tI.any3d,t9(t,"leaflet-container"+(tI.touch?" leaflet-touch":"")+(tI.retina?" leaflet-retina":"")+(tI.ielt9?" leaflet-oldie":"")+(tI.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var i=tQ(t,"position");"absolute"!==i&&"relative"!==i&&"fixed"!==i&&"sticky"!==i&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),io(this._mapPane,new j(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(t9(t.markerPane,"leaflet-zoom-hide"),t9(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,i,e){io(this._mapPane,new j(0,0));var n=!this._loaded;this._loaded=!0,i=this._limitZoom(i),this.fire("viewprereset");var o=this._zoom!==i;this._moveStart(o,e)._move(t,i)._moveEnd(o),this.fire("viewreset"),n&&this.fire("load")},_moveStart:function(t,i){return t&&this.fire("zoomstart"),i||this.fire("movestart"),this},_move:function(t,i,e,n){void 0===i&&(i=this._zoom);var o=this._zoom!==i;return this._zoom=i,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),n?e&&e.pinch&&this.fire("zoom",e):((o||e&&e.pinch)&&this.fire("zoom",e),this.fire("move",e)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return I(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){io(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={},this._targets[m(this._container)]=this;var i=t?im:id;i(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&i(window,"resize",this._onResize,this),tI.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){I(this._resizeRequest),this._resizeRequest=B(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,i){for(var e,n=[],o="mouseout"===i||"mouseover"===i,s=t.target||t.srcElement,r=!1;s;){if((e=this._targets[m(s)])&&("click"===i||"preclick"===i)&&this._draggableMoved(e)){r=!0;break}if(e&&e.listens(i,!0)&&(o&&!iS(s,t)||(n.push(e),o))||s===this._container)break;s=s.parentNode}return!n.length&&!r&&!o&&this.listens(i,!0)&&(n=[this]),n},_isClickDisabled:function(t){for(;t&&t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},_handleDOMEvent:function(t){var i=t.target||t.srcElement;if(!(!this._loaded||i._leaflet_disable_events||"click"===t.type&&this._isClickDisabled(i))){var e=t.type;"mousedown"===e&&il(i),this._fireDOMEvent(t,e)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,n){if("click"===t.type){var o=i({},t);o.type="preclick",this._fireDOMEvent(o,o.type,n)}var s=this._findEventTargets(t,e);if(n){for(var r=[],a=0;a=Math.abs(r.x)&&1>=Math.abs(r.y)?t:this.unproject(n.add(r),i)},_limitOffset:function(t,i){if(!i)return t;var e=this.getPixelBounds(),n=new F(e.min.add(t),e.max.add(t));return t.add(this._getBoundsOffset(n,i))},_getBoundsOffset:function(t,i,e){var n=U(this.project(i.getNorthEast(),e),this.project(i.getSouthWest(),e)),o=n.min.subtract(t.min),s=n.max.subtract(t.max);return new j(this._rebound(o.x,-s.x),this._rebound(o.y,-s.y))},_rebound:function(t,i){return t+i>0?Math.round(t-i)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(i))},_limitZoom:function(t){var i=this.getMinZoom(),e=this.getMaxZoom(),n=tI.any3d?this.options.zoomSnap:1;return n&&(t=Math.round(t/n)*n),Math.max(i,Math.min(e,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){t7(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,i){var e=this._getCenterOffset(t)._trunc();return!!(!0===(i&&i.animate)||this.getSize().contains(e))&&(this.panBy(e,i),!0)},_createAnimProxy:function(){var t=this._proxy=t0("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(t){var i=this._proxy.style[tY];ie(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),i===this._proxy.style[tY]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){t1(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),i=this.getZoom();ie(this._proxy,this.project(t,i),this.getZoomScale(i,1))},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,i,e){if(this._animatingZoom)return!0;if(e=e||{},!this._zoomAnimated||!1===e.animate||this._nothingToAnimate()||Math.abs(i-this._zoom)>this.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(i),o=this._getCenterOffset(t)._divideBy(1-1/n);return!!(!0===e.animate||this.getSize().contains(o))&&(B(function(){this._moveStart(!0,e.noMoveStart||!1)._animateZoom(t,i,!0)},this),!0)},_animateZoom:function(t,i,e,n){this._mapPane&&(e&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=i,t9(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:i,noUpdate:n}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(d(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&t7(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}}),iO=R.extend({options:{position:"topright"},initialize:function(t){b(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var i=this._map;return i&&i.removeControl(this),this.options.position=t,i&&i.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var i=this._container=this.onAdd(t),e=this.getPosition(),n=t._controlCorners[e];return t9(i,"leaflet-control"),-1!==e.indexOf("bottom")?n.insertBefore(i,n.firstChild):n.appendChild(i),this._map.on("unload",this.remove,this),this},remove:function(){return this._map&&(t1(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null),this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}}),iA=function(t){return new iO(t)};ik.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},i="leaflet-",e=this._controlContainer=t0("div",i+"control-container",this._container);function n(n,o){t[n+o]=t0("div",i+n+" "+i+o,e)}n("top","left"),n("top","right"),n("bottom","left"),n("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)t1(this._controlCorners[t]);t1(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var iB=iO.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,i,e,n){return e1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=i&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var i=this._getLayer(m(t.target)),e=i.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;e&&this._map.fire(e,i)},_createRadioElement:function(t,i){var e=document.createElement("div");return e.innerHTML='",e.firstChild},_addItem:function(t){var i,e=document.createElement("label"),n=this._map.hasLayer(t.layer);t.overlay?((i=document.createElement("input")).type="checkbox",i.className="leaflet-control-layers-selector",i.defaultChecked=n):i=this._createRadioElement("leaflet-base-layers_"+m(this),n),this._layerControlInputs.push(i),i.layerId=m(t.layer),id(i,"click",this._onInputClick,this);var o=document.createElement("span");o.innerHTML=" "+t.name;var s=document.createElement("span");return e.appendChild(s),s.appendChild(i),s.appendChild(o),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(e),this._checkDisabledLayers(),e},_onInputClick:function(){if(!this._preventClick){var t,i,e=this._layerControlInputs,n=[],o=[];this._handlingClick=!0;for(var s=e.length-1;s>=0;s--)t=e[s],i=this._getLayer(t.layerId).layer,t.checked?n.push(i):t.checked||o.push(i);for(s=0;s=0;o--)t=e[o],i=this._getLayer(t.layerId).layer,t.disabled=void 0!==i.options.minZoom&&ni.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var t=this._section;this._preventClick=!0,id(t,"click",iL),this.expand();var i=this;setTimeout(function(){im(t,"click",iL),i._preventClick=!1})}}),iI=iO.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(t){var i="leaflet-control-zoom",e=t0("div",i+" leaflet-bar"),n=this.options;return this._zoomInButton=this._createButton(n.zoomInText,n.zoomInTitle,i+"-in",e,this._zoomIn),this._zoomOutButton=this._createButton(n.zoomOutText,n.zoomOutTitle,i+"-out",e,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),e},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,i,e,n,o){var s=t0("a",e,n);return s.innerHTML=t,s.href="#",s.title=i,s.setAttribute("role","button"),s.setAttribute("aria-label",i),iP(s),id(s,"click",iT),id(s,"click",o,this),id(s,"click",this._refocusOnMap,this),s},_updateDisabled:function(){var t=this._map,i="leaflet-disabled";t7(this._zoomInButton,i),t7(this._zoomOutButton,i),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||t._zoom===t.getMinZoom())&&(t9(this._zoomOutButton,i),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||t._zoom===t.getMaxZoom())&&(t9(this._zoomInButton,i),this._zoomInButton.setAttribute("aria-disabled","true"))}});ik.mergeOptions({zoomControl:!0}),ik.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new iI,this.addControl(this.zoomControl))});var iR=iO.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var i="leaflet-control-scale",e=t0("div",i),n=this.options;return this._addScales(n,i+"-line",e),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),e},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,i,e){t.metric&&(this._mScale=t0("div",i,e)),t.imperial&&(this._iScale=t0("div",i,e))},_update:function(){var t=this._map,i=t.getSize().y/2,e=t.distance(t.containerPointToLatLng([0,i]),t.containerPointToLatLng([this.options.maxWidth,i]));this._updateScales(e)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var i=this._getRoundNum(t);this._updateScale(this._mScale,i<1e3?i+" m":i/1e3+" km",i/t)},_updateImperial:function(t){var i,e,n,o=3.2808399*t;o>5280?(i=o/5280,e=this._getRoundNum(i),this._updateScale(this._iScale,e+" mi",e/i)):(n=this._getRoundNum(o),this._updateScale(this._iScale,n+" ft",n/o))},_updateScale:function(t,i,e){t.style.width=Math.round(this.options.maxWidth*e)+"px",t.innerHTML=i},_getRoundNum:function(t){var i=Math.pow(10,(Math.floor(t)+"").length-1),e=t/i;return i*(e=e>=10?10:e>=5?5:e>=3?3:e>=2?2:1)}}),iN=iO.extend({options:{position:"bottomright",prefix:''+(tI.inlineSvg?' ':"")+"Leaflet"},initialize:function(t){b(this,t),this._attributions={}},onAdd:function(t){for(var i in t.attributionControl=this,this._container=t0("div","leaflet-control-attribution"),iP(this._container),t._layers)t._layers[i].getAttribution&&this.addAttribution(t._layers[i].getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container},onRemove:function(t){t.off("layeradd",this._addAttribution,this)},_addAttribution:function(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",function(){this.removeAttribution(t.layer.getAttribution())},this))},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t&&(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update()),this},removeAttribution:function(t){return t&&this._attributions[t]&&(this._attributions[t]--,this._update()),this},_update:function(){if(this._map){var t=[];for(var i in this._attributions)this._attributions[i]&&t.push(i);var e=[];this.options.prefix&&e.push(this.options.prefix),t.length&&e.push(t.join(", ")),this._container.innerHTML=e.join(' ')}}});ik.mergeOptions({attributionControl:!0}),ik.addInitHook(function(){this.options.attributionControl&&new iN().addTo(this)}),iO.Layers=iB,iO.Zoom=iI,iO.Scale=iR,iO.Attribution=iN,iA.layers=function(t,i,e){return new iB(t,i,e)},iA.zoom=function(t){return new iI(t)},iA.scale=function(t){return new iR(t)},iA.attribution=function(t){return new iN(t)};var iD=R.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled&&(this._enabled=!1,this.removeHooks()),this},enabled:function(){return!!this._enabled}});iD.addTo=function(t,i){return t.addHandler(i,this),this};var ij=tI.touch?"touchstart mousedown":"mousedown",iH=D.extend({options:{clickTolerance:3},initialize:function(t,i,e,n){b(this,n),this._element=t,this._dragStartTarget=i||t,this._preventOutline=e},enable:function(){this._enabled||(id(this._dragStartTarget,ij,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(iH._dragging===this&&this.finishDrag(!0),im(this._dragStartTarget,ij,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(!(!this._enabled||(this._moved=!1,t8(this._element,"leaflet-zoom-anim")))){if(t.touches&&1!==t.touches.length){iH._dragging===this&&this.finishDrag();return}if(!iH._dragging&&!t.shiftKey&&(1===t.which||1===t.button||t.touches)&&(iH._dragging=this,this._preventOutline&&il(this._element),ia(),e(),!this._moving)){this.fire("down");var i=t.touches?t.touches[0]:t,n=ic(this._element);this._startPoint=new j(i.clientX,i.clientY),this._startPos=is(this._element),this._parentScale=i_(n);var o="mousedown"===t.type;id(document,o?"mousemove":"touchmove",this._onMove,this),id(document,o?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(t){if(this._enabled){if(t.touches&&t.touches.length>1){this._moved=!0;return}var i=t.touches&&1===t.touches.length?t.touches[0]:t,e=new j(i.clientX,i.clientY)._subtract(this._startPoint);!e.x&&!e.y||Math.abs(e.x)+Math.abs(e.y)l&&(r=a,l=h);l>n&&(e[r]=1,t(i,e,n,o,r),t(i,e,n,r,s))}(t,n,i,0,e-1);var o,s=[];for(o=0;oi&&(e.push(t[n]),o=n);return oi.max.x&&(e|=2),t.yi.max.y&&(e|=8),e}function iX(t,i,e,n){var o,s=i.x,r=i.y,a=e.x-s,h=e.y-r,l=a*a+h*h;return l>0&&((o=((t.x-s)*a+(t.y-r)*h)/l)>1?(s=e.x,r=e.y):o>0&&(s+=a*o,r+=h*o)),a=t.x-s,h=t.y-r,n?a*a+h*h:new j(s,r)}function iJ(t){return!z(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function i$(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),iJ(t)}function iQ(t,i){if(!t||0===t.length)throw Error("latlngs not passed");iJ(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var e,n,o,s,r,a,h,l,u=K([0,0]),c=q(t);c.getNorthWest().distanceTo(c.getSouthWest())*c.getNorthEast().distanceTo(c.getNorthWest())<1700&&(u=iU(t));var _=t.length,d=[];for(e=0;e<_;e++){var p=K(t[e]);d.push(i.project(K([p.lat-u.lat,p.lng-u.lng])))}for(e=0,n=0;e<_-1;e++)n+=d[e].distanceTo(d[e+1])/2;if(0===n)l=d[0];else for(e=0,s=0;e<_-1;e++)if(r=d[e],a=d[e+1],(s+=o=r.distanceTo(a))>n){h=(s-n)/o,l=[a.x-h*(a.x-r.x),a.y-h*(a.y-r.y)];break}var m=i.unproject(W(l));return K([m.lat+u.lat,m.lng+u.lng])}var i0={project:function(t){return new j(t.lng,t.lat)},unproject:function(t){return new G(t.y,t.x)},bounds:new F([-180,-90],[180,90])},i1={R:6378137,R_MINOR:6356752.314245179,bounds:new F([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var i=Math.PI/180,e=this.R,n=t.lat*i,o=this.R_MINOR/e,s=Math.sqrt(1-o*o),r=s*Math.sin(n);return n=-e*Math.log(Math.max(Math.tan(Math.PI/4-n/2)/Math.pow((1-r)/(1+r),s/2),1e-10)),new j(t.lng*i*e,n)},unproject:function(t){for(var i,e=180/Math.PI,n=this.R,o=this.R_MINOR/n,s=Math.sqrt(1-o*o),r=Math.exp(-t.y/n),a=Math.PI/2-2*Math.atan(r),h=0,l=.1;h<15&&Math.abs(l)>1e-7;h++)l=Math.PI/2-2*Math.atan(r*(i=Math.pow((1-(i=s*Math.sin(a)))/(1+i),s/2)))-a,a+=l;return new G(a*e,t.x*e/n)}},i2=i({},X,{code:"EPSG:3395",projection:i1,transformation:Q(c=.5/(Math.PI*i1.R),.5,-c,.5)}),i3=i({},X,{code:"EPSG:4326",projection:i0,transformation:Q(1/180,1,-1/180,.5)}),i5=i({},Y,{projection:i0,transformation:Q(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,i){var e=i.lng-t.lng,n=i.lat-t.lat;return Math.sqrt(e*e+n*n)},infinite:!0});Y.Earth=X,Y.EPSG3395=i2,Y.EPSG3857=tt,Y.EPSG900913=ti,Y.EPSG4326=i3,Y.Simple=i5;var i8=D.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[m(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[m(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var i=t.target;if(i.hasLayer(this)){if(this._map=i,this._zoomAnimated=i._zoomAnimated,this.getEvents){var e=this.getEvents();i.on(e,this),this.once("remove",function(){i.off(e,this)},this)}this.onAdd(i),this.fire("add"),i.fire("layeradd",{layer:this})}}});ik.include({addLayer:function(t){if(!t._layerAdd)throw Error("The provided object is not a Layer.");var i=m(t);return this._layers[i]||(this._layers[i]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t)),this},removeLayer:function(t){var i=m(t);return this._layers[i]&&(this._loaded&&t.onRemove(this),delete this._layers[i],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null),this},hasLayer:function(t){return m(t) in this._layers},eachLayer:function(t,i){for(var e in this._layers)t.call(i,this._layers[e]);return this},_addLayers:function(t){t=t?z(t)?t:[t]:[];for(var i=0,e=t.length;ithis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()=2&&i[0]instanceof G&&i[0].equals(i[e-1])&&i.pop(),i},_setLatLngs:function(t){es.prototype._setLatLngs.call(this,t),iJ(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return iJ(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,i=this.options.weight,e=new j(i,i);if(t=new F(t.min.subtract(e),t.max.add(e)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t)){if(this.options.noClip){this._parts=this._rings;return}for(var n,o=0,s=this._rings.length;ot.y!=n.y>t.y&&t.x<(n.x-e.x)*(t.y-e.y)/(n.y-e.y)+e.x&&(l=!l);return l||es.prototype._containsPoint.call(this,t,!0)}}),ea=i7.extend({initialize:function(t,i){b(this,i),this._layers={},t&&this.addData(t)},addData:function(t){var i,e,n,o=z(t)?t:t.features;if(o){for(i=0,e=o.length;i0&&o.push(o[0].slice()),o}function ep(t,e){return t.feature?i({},t.feature,{geometry:e}):em(e)}function em(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}var ef={toGeoJSON:function(t){return ep(this,{type:"Point",coordinates:e_(this.getLatLng(),t)})}};function eg(t,i){return new ea(t,i)}ei.include(ef),eo.include(ef),en.include(ef),es.include({toGeoJSON:function(t){var i=!iJ(this._latlngs),e=ed(this._latlngs,i?1:0,!1,t);return ep(this,{type:(i?"Multi":"")+"LineString",coordinates:e})}}),er.include({toGeoJSON:function(t){var i=!iJ(this._latlngs),e=i&&!iJ(this._latlngs[0]),n=ed(this._latlngs,e?2:i?1:0,!0,t);return i||(n=[n]),ep(this,{type:(e?"Multi":"")+"Polygon",coordinates:n})}}),i9.include({toMultiPoint:function(t){var i=[];return this.eachLayer(function(e){i.push(e.toGeoJSON(t).geometry.coordinates)}),ep(this,{type:"MultiPoint",coordinates:i})},toGeoJSON:function(t){var i=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===i)return this.toMultiPoint(t);var e="GeometryCollection"===i,n=[];return(this.eachLayer(function(i){if(i.toGeoJSON){var o=i.toGeoJSON(t);if(e)n.push(o.geometry);else{var s=em(o);"FeatureCollection"===s.type?n.push.apply(n,s.features):n.push(s)}}}),e)?ep(this,{geometries:n,type:"GeometryCollection"}):{type:"FeatureCollection",features:n}}});var ev=i8.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,i,e){this._url=t,this._bounds=q(i),b(this,e)},onAdd:function(){!this._image&&(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(t9(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){t1(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},bringToFront:function(){return this._map&&t3(this._image),this},bringToBack:function(){return this._map&&t5(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=q(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t="IMG"===this._url.tagName,i=this._image=t?this._url:t0("img");if(t9(i,"leaflet-image-layer"),this._zoomAnimated&&t9(i,"leaflet-zoom-animated"),this.options.className&&t9(i,this.options.className),i.onselectstart=v,i.onmousemove=v,i.onload=d(this.fire,this,"load"),i.onerror=d(this._overlayOnError,this,"error"),(this.options.crossOrigin||""===this.options.crossOrigin)&&(i.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t){this._url=i.src;return}i.src=this._url,i.alt=this.options.alt},_animateZoom:function(t){var i=this._map.getZoomScale(t.zoom),e=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;ie(this._image,e,i)},_reset:function(){var t=this._image,i=new F(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),e=i.getSize();io(t,i.min),t.style.width=e.x+"px",t.style.height=e.y+"px"},_updateOpacity:function(){it(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)},getCenter:function(){return this._bounds.getCenter()}}),ey=ev.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var t="VIDEO"===this._url.tagName,i=this._image=t?this._url:t0("video");if(t9(i,"leaflet-image-layer"),this._zoomAnimated&&t9(i,"leaflet-zoom-animated"),this.options.className&&t9(i,this.options.className),i.onselectstart=v,i.onmousemove=v,i.onloadeddata=d(this.fire,this,"load"),t){for(var e=i.getElementsByTagName("source"),n=[],o=0;o0?n:[i.src];return}z(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(i.style,"objectFit")&&(i.style.objectFit="fill"),i.autoplay=!!this.options.autoplay,i.loop=!!this.options.loop,i.muted=!!this.options.muted,i.playsInline=!!this.options.playsInline;for(var s=0;so?(i.height=o+"px",t9(t,s)):t7(t,s),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var i=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),e=this._getAnchor();io(this._container,i.add(e))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var t=this._map,i=parseInt(tQ(this._container,"marginBottom"),10)||0,e=this._container.offsetHeight+i,n=this._containerWidth,o=new j(this._containerLeft,-e-this._containerBottom);o._add(is(this._container));var s=t.layerPointToContainerPoint(o),r=W(this.options.autoPanPadding),a=W(this.options.autoPanPaddingTopLeft||r),h=W(this.options.autoPanPaddingBottomRight||r),l=t.getSize(),u=0,c=0;s.x+n+h.x>l.x&&(u=s.x+n-l.x+h.x),s.x-u-a.x<0&&(u=s.x-a.x),s.y+e+h.y>l.y&&(c=s.y+e-l.y+h.y),s.y-c-a.y<0&&(c=s.y-a.y),(u||c)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([u,c]))}},_getAnchor:function(){return W(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});ik.mergeOptions({closePopupOnClick:!0}),ik.include({openPopup:function(t,i,e){return this._initOverlay(eb,t,i,e).openOn(this),this},closePopup:function(t){return t=arguments.length?t:this._popup,t&&t.close(),this}}),i8.include({bindPopup:function(t,i){return this._popup=this._initOverlay(eb,this._popup,t,i),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t){return this._popup&&(this instanceof i7||(this._popup._source=this),this._popup._prepareOpen(t||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){if(this._popup&&this._map){iT(t);var i=t.layer||t.target;if(this._popup._source===i&&!(i instanceof ee)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng);return}this._popup._source=i,this.openPopup(t.latlng)}},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var eP=ew.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){ew.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(t){ew.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var t=ew.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=t0("div",t),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+m(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var i,e,n=this._map,o=this._container,s=n.latLngToContainerPoint(n.getCenter()),r=n.layerPointToContainerPoint(t),a=this.options.direction,h=o.offsetWidth,l=o.offsetHeight,u=W(this.options.offset),c=this._getAnchor();"top"===a?(i=h/2,e=l):"bottom"===a?(i=h/2,e=0):("center"===a?i=h/2:"right"===a?i=0:"left"===a?i=h:r.xthis.options.maxZoom||en&&this._retainParent(o,s,r,n))},_retainChildren:function(t,i,e,n){for(var o=2*t;o<2*t+2;o++)for(var s=2*i;s<2*i+2;s++){var r=new j(o,s);r.z=e+1;var a=this._tileCoordsToKey(r),h=this._tiles[a];if(h&&h.active){h.retain=!0;continue}h&&h.loaded&&(h.retain=!0),e+1this.options.maxZoom||void 0!==this.options.minZoom&&o1){this._setView(t,e);return}for(var c=o.min.y;c<=o.max.y;c++)for(var _=o.min.x;_<=o.max.x;_++){var d=new j(_,c);if(d.z=this._tileZoom,this._isValidTile(d)){var p=this._tiles[this._tileCoordsToKey(d)];p?p.current=!0:r.push(d)}}if(r.sort(function(t,i){return t.distanceTo(s)-i.distanceTo(s)}),0!==r.length){this._loading||(this._loading=!0,this.fire("loading"));var m=document.createDocumentFragment();for(_=0;_e.max.x)||!i.wrapLat&&(t.ye.max.y))return!1}if(!this.options.bounds)return!0;var n=this._tileCoordsToBounds(t);return q(this.options.bounds).overlaps(n)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var i=this._map,e=this.getTileSize(),n=t.scaleBy(e),o=n.add(e);return[i.unproject(n,t.z),i.unproject(o,t.z)]},_tileCoordsToBounds:function(t){var i=this._tileCoordsToNwSe(t),e=new V(i[0],i[1]);return this.options.noWrap||(e=this._map.wrapLatLngBounds(e)),e},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var i=t.split(":"),e=new j(+i[0],+i[1]);return e.z=+i[2],e},_removeTile:function(t){var i=this._tiles[t];i&&(t1(i.el),delete this._tiles[t],this.fire("tileunload",{tile:i.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){t9(t,"leaflet-tile");var i=this.getTileSize();t.style.width=i.x+"px",t.style.height=i.y+"px",t.onselectstart=v,t.onmousemove=v,tI.ielt9&&this.options.opacity<1&&it(t,this.options.opacity)},_addTile:function(t,i){var e=this._getTilePos(t),n=this._tileCoordsToKey(t),o=this.createTile(this._wrapCoords(t),d(this._tileReady,this,t));this._initTile(o),this.createTile.length<2&&B(d(this._tileReady,this,t,null,o)),io(o,e),this._tiles[n]={el:o,coords:t,current:!0},i.appendChild(o),this.fire("tileloadstart",{tile:o,coords:t})},_tileReady:function(t,i,e){i&&this.fire("tileerror",{error:i,tile:e,coords:t});var n=this._tileCoordsToKey(t);(e=this._tiles[n])&&(e.loaded=+new Date,this._map._fadeAnimated?(it(e.el,0),I(this._fadeFrame),this._fadeFrame=B(this._updateOpacity,this)):(e.active=!0,this._pruneTiles()),i||(t9(e.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:e.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),tI.ielt9||!this._map._fadeAnimated?B(this._pruneTiles,this):setTimeout(d(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var i=new j(this._wrapX?g(t.x,this._wrapX):t.x,this._wrapY?g(t.y,this._wrapY):t.y);return i.z=t.z,i},_pxBoundsToTileRange:function(t){var i=this.getTileSize();return new F(t.min.unscaleBy(i).floor(),t.max.unscaleBy(i).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}}),eM=eT.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(t,i){this._url=t,(i=b(this,i)).detectRetina&&tI.retina&&i.maxZoom>0?(i.tileSize=Math.floor(i.tileSize/2),i.zoomReverse?(i.zoomOffset--,i.minZoom=Math.min(i.maxZoom,i.minZoom+1)):(i.zoomOffset++,i.maxZoom=Math.max(i.minZoom,i.maxZoom-1)),i.minZoom=Math.max(0,i.minZoom)):i.zoomReverse?i.minZoom=Math.min(i.maxZoom,i.minZoom):i.maxZoom=Math.max(i.minZoom,i.maxZoom),"string"==typeof i.subdomains&&(i.subdomains=i.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(t,i){return this._url===t&&void 0===i&&(i=!0),this._url=t,i||this.redraw(),this},createTile:function(t,i){var e=document.createElement("img");return id(e,"load",d(this._tileOnLoad,this,i,e)),id(e,"error",d(this._tileOnError,this,i,e)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(e.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),"string"==typeof this.options.referrerPolicy&&(e.referrerPolicy=this.options.referrerPolicy),e.alt="",e.src=this.getTileUrl(t),e},getTileUrl:function(t){var e={r:tI.retina?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var n=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=n),e["-y"]=n}return M(this._url,i(e,this.options))},_tileOnLoad:function(t,i){tI.ielt9?setTimeout(d(t,this,null,i),0):t(null,i)},_tileOnError:function(t,i,e){var n=this.options.errorTileUrl;n&&i.getAttribute("src")!==n&&(i.src=n),t(e,i)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,i=this.options.maxZoom,e=this.options.zoomReverse,n=this.options.zoomOffset;return e&&(t=i-t),t+n},_getSubdomain:function(t){var i=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[i]},_abortLoading:function(){var t,i;for(t in this._tiles)if(this._tiles[t].coords.z!==this._tileZoom&&((i=this._tiles[t].el).onload=v,i.onerror=v,!i.complete)){i.src=Z;var e=this._tiles[t].coords;t1(i),delete this._tiles[t],this.fire("tileabort",{tile:i,coords:e})}},_removeTile:function(t){var i=this._tiles[t];if(i)return i.el.setAttribute("src",Z),eT.prototype._removeTile.call(this,t)},_tileReady:function(t,i,e){if(this._map&&(!e||e.getAttribute("src")!==Z))return eT.prototype._tileReady.call(this,t,i,e)}});function ez(t,i){return new eM(t,i)}var eC=eM.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,e){this._url=t;var n=i({},this.defaultWmsParams);for(var o in e)o in this.options||(n[o]=e[o]);var s=(e=b(this,e)).detectRetina&&tI.retina?2:1,r=this.getTileSize();n.width=r.x*s,n.height=r.y*s,this.wmsParams=n},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var i=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[i]=this._crs.code,eM.prototype.onAdd.call(this,t)},getTileUrl:function(t){var i=this._tileCoordsToNwSe(t),e=this._crs,n=U(e.project(i[0]),e.project(i[1])),o=n.min,s=n.max,r=(this._wmsVersion>=1.3&&this._crs===i3?[o.y,o.x,s.y,s.x]:[o.x,o.y,s.x,s.y]).join(","),a=eM.prototype.getTileUrl.call(this,t);return a+P(this.wmsParams,a,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+r},setParams:function(t,e){return i(this.wmsParams,t),e||this.redraw(),this}});eM.WMS=eC,ez.wms=function(t,i){return new eC(t,i)};var eZ=i8.extend({options:{padding:.1},initialize:function(t){b(this,t),m(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),t9(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,i){var e=this._map.getZoomScale(i,this._zoom),n=this._map.getSize().multiplyBy(.5+this.options.padding),o=this._map.project(this._center,i),s=n.multiplyBy(-e).add(o).subtract(this._map._getNewPixelOrigin(t,i));tI.any3d?ie(this._container,s,e):io(this._container,s)},_reset:function(){for(var t in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,i=this._map.getSize(),e=this._map.containerPointToLayerPoint(i.multiplyBy(-t)).round();this._bounds=new F(e,e.add(i.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),eS=eZ.extend({options:{tolerance:0},getEvents:function(){var t=eZ.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){eZ.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");id(t,"mousemove",this._onMouseMove,this),id(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),id(t,"mouseout",this._handleMouseOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")},_destroyContainer:function(){I(this._redrawRequest),delete this._ctx,t1(this._container),im(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var t in this._redrawBounds=null,this._layers)this._layers[t]._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){eZ.prototype._update.call(this);var t=this._bounds,i=this._container,e=t.getSize(),n=tI.retina?2:1;io(i,t.min),i.width=n*e.x,i.height=n*e.y,i.style.width=e.x+"px",i.style.height=e.y+"px",tI.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){eZ.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[m(t)]=t;var i=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=i),this._drawLast=i,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var i=t._order,e=i.next,n=i.prev;e?e.prev=n:this._drawLast=n,n?n.next=e:this._drawFirst=e,delete t._order,delete this._layers[m(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if("string"==typeof t.options.dashArray){var i,e,n=t.options.dashArray.split(/[, ]+/),o=[];for(e=0;e')}}catch(t){}return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),eO=tI.vml?ek:te,eA=eZ.extend({_initContainer:function(){this._container=eO("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=eO("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){t1(this._container),im(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!this._map._animatingZoom||!this._bounds){eZ.prototype._update.call(this);var t=this._bounds,i=t.getSize(),e=this._container;this._svgSize&&this._svgSize.equals(i)||(this._svgSize=i,e.setAttribute("width",i.x),e.setAttribute("height",i.y)),io(e,t.min),e.setAttribute("viewBox",[t.min.x,t.min.y,i.x,i.y].join(" ")),this.fire("update")}},_initPath:function(t){var i=t._path=eO("path");t.options.className&&t9(i,t.options.className),t.options.interactive&&t9(i,"leaflet-interactive"),this._updateStyle(t),this._layers[m(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){t1(t._path),t.removeInteractiveTarget(t._path),delete this._layers[m(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var i=t._path,e=t.options;i&&(e.stroke?(i.setAttribute("stroke",e.color),i.setAttribute("stroke-opacity",e.opacity),i.setAttribute("stroke-width",e.weight),i.setAttribute("stroke-linecap",e.lineCap),i.setAttribute("stroke-linejoin",e.lineJoin),e.dashArray?i.setAttribute("stroke-dasharray",e.dashArray):i.removeAttribute("stroke-dasharray"),e.dashOffset?i.setAttribute("stroke-dashoffset",e.dashOffset):i.removeAttribute("stroke-dashoffset")):i.setAttribute("stroke","none"),e.fill?(i.setAttribute("fill",e.fillColor||e.color),i.setAttribute("fill-opacity",e.fillOpacity),i.setAttribute("fill-rule",e.fillRule||"evenodd")):i.setAttribute("fill","none"))},_updatePoly:function(t,i){this._setPath(t,tn(t._parts,i))},_updateCircle:function(t){var i=t._point,e=Math.max(Math.round(t._radius),1),n=Math.max(Math.round(t._radiusY),1)||e,o="a"+e+","+n+" 0 1,0 ",s=t._empty()?"M0 0":"M"+(i.x-e)+","+i.y+o+2*e+",0 "+o+-(2*e)+",0 ";this._setPath(t,s)},_setPath:function(t,i){t._path.setAttribute("d",i)},_bringToFront:function(t){t3(t._path)},_bringToBack:function(t){t5(t._path)}});function eB(t){return tI.svg||tI.vml?new eA(t):null}tI.vml&&eA.include({_initContainer:function(){this._container=t0("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(eZ.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var i=t._container=ek("shape");t9(i,"leaflet-vml-shape "+(this.options.className||"")),i.coordsize="1 1",t._path=ek("path"),i.appendChild(t._path),this._updateStyle(t),this._layers[m(t)]=t},_addPath:function(t){var i=t._container;this._container.appendChild(i),t.options.interactive&&t.addInteractiveTarget(i)},_removePath:function(t){var i=t._container;t1(i),t.removeInteractiveTarget(i),delete this._layers[m(t)]},_updateStyle:function(t){var i=t._stroke,e=t._fill,n=t.options,o=t._container;o.stroked=!!n.stroke,o.filled=!!n.fill,n.stroke?(i||(i=t._stroke=ek("stroke")),o.appendChild(i),i.weight=n.weight+"px",i.color=n.color,i.opacity=n.opacity,n.dashArray?i.dashStyle=z(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):i.dashStyle="",i.endcap=n.lineCap.replace("butt","flat"),i.joinstyle=n.lineJoin):i&&(o.removeChild(i),t._stroke=null),n.fill?(e||(e=t._fill=ek("fill")),o.appendChild(e),e.color=n.fillColor||n.color,e.opacity=n.fillOpacity):e&&(o.removeChild(e),t._fill=null)},_updateCircle:function(t){var i=t._point.round(),e=Math.round(t._radius),n=Math.round(t._radiusY||e);this._setPath(t,t._empty()?"M0 0":"AL "+i.x+","+i.y+" "+e+","+n+" 0,23592600")},_setPath:function(t,i){t._path.v=i},_bringToFront:function(t){t3(t._container)},_bringToBack:function(t){t5(t._container)}}),ik.include({getRenderer:function(t){var i=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return i||(i=this._renderer=this._createRenderer()),this.hasLayer(i)||this.addLayer(i),i},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var i=this._paneRenderers[t];return void 0===i&&(i=this._createRenderer({pane:t}),this._paneRenderers[t]=i),i},_createRenderer:function(t){return this.options.preferCanvas&&eE(t)||eB(t)}});var eI=er.extend({initialize:function(t,i){er.prototype.initialize.call(this,this._boundsToLatLngs(t),i)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=q(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});eA.create=eO,eA.pointsToPath=tn,ea.geometryToLayer=eh,ea.coordsToLatLng=eu,ea.coordsToLatLngs=ec,ea.latLngToCoords=e_,ea.latLngsToCoords=ed,ea.getFeature=ep,ea.asFeature=em,ik.mergeOptions({boxZoom:!0});var eR=iD.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){id(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){im(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){t1(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),e(),ia(),this._startPoint=this._map.mouseEventToContainerPoint(t),id(document,{contextmenu:iT,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=t0("div","leaflet-zoom-box",this._container),t9(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var i=new F(this._point,this._startPoint),e=i.getSize();io(this._box,i.min),this._box.style.width=e.x+"px",this._box.style.height=e.y+"px"},_finish:function(){this._moved&&(t1(this._box),t7(this._container,"leaflet-crosshair")),n(),ih(),im(document,{contextmenu:iT,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if((1===t.which||1===t.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(d(this._resetState,this),0);var i=new V(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(i).fire("boxzoomend",{boxZoomBounds:i})}},_onKeyDown:function(t){27===t.keyCode&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});ik.addInitHook("addHandler","boxZoom",eR),ik.mergeOptions({doubleClickZoom:!0});var eN=iD.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var i=this._map,e=i.getZoom(),n=i.options.zoomDelta,o=t.originalEvent.shiftKey?e-n:e+n;"center"===i.options.doubleClickZoom?i.setZoom(o):i.setZoomAround(t.containerPoint,o)}});ik.addInitHook("addHandler","doubleClickZoom",eN),ik.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var eD=iD.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new iH(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))}t9(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){t7(this._map._container,"leaflet-grab"),t7(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var i=q(this._map.options.maxBounds);this._offsetLimit=U(this._map.latLngToContainerPoint(i.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(i.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var i=this._lastTime=+new Date,e=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(e),this._times.push(i),this._prunePositions(i)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),i=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=i.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,i){return t-(t-i)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var t=this._draggable._newPos.subtract(this._draggable._startPos),i=this._offsetLimit;t.xi.max.x&&(t.x=this._viscousLimit(t.x,i.max.x)),t.y>i.max.y&&(t.y=this._viscousLimit(t.y,i.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,i=Math.round(t/2),e=this._initialWorldOffset,n=this._draggable._newPos.x,o=(n-i+e)%t+i-e,s=(n+i+e)%t-i-e;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=Math.abs(o+e)0?o:-o))-i;this._delta=0,this._startTime=null,s&&("center"===t.options.scrollWheelZoom?t.setZoom(i+s):t.setZoomAround(this._lastMousePos,i+s))}});ik.addInitHook("addHandler","scrollWheelZoom",eH),ik.mergeOptions({tapHold:tI.touchNative&&tI.safari&&tI.mobile,tapTolerance:15});var eW=iD.extend({addHooks:function(){id(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){im(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(clearTimeout(this._holdTimeout),1===t.touches.length){var i=t.touches[0];this._startPos=this._newPos=new j(i.clientX,i.clientY),this._holdTimeout=setTimeout(d(function(){this._cancel(),this._isTapValid()&&(id(document,"touchend",iL),id(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",i))},this),600),id(document,"touchend touchcancel contextmenu",this._cancel,this),id(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function t(){im(document,"touchend",iL),im(document,"touchend touchcancel",t)},_cancel:function(){clearTimeout(this._holdTimeout),im(document,"touchend touchcancel contextmenu",this._cancel,this),im(document,"touchmove",this._onMove,this)},_onMove:function(t){var i=t.touches[0];this._newPos=new j(i.clientX,i.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(t,i){var e=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,screenX:i.screenX,screenY:i.screenY,clientX:i.clientX,clientY:i.clientY});e._simulated=!0,i.target.dispatchEvent(e)}});ik.addInitHook("addHandler","tapHold",eW),ik.mergeOptions({touchZoom:tI.touch,bounceAtZoomLimits:!0});var eF=iD.extend({addHooks:function(){t9(this._map._container,"leaflet-touch-zoom"),id(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){t7(this._map._container,"leaflet-touch-zoom"),im(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var i=this._map;if(t.touches&&2===t.touches.length&&!i._animatingZoom&&!this._zooming){var e=i.mouseEventToContainerPoint(t.touches[0]),n=i.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=i.getSize()._divideBy(2),this._startLatLng=i.containerPointToLatLng(this._centerPoint),"center"!==i.options.touchZoom&&(this._pinchStartLatLng=i.containerPointToLatLng(e.add(n)._divideBy(2))),this._startDist=e.distanceTo(n),this._startZoom=i.getZoom(),this._moved=!1,this._zooming=!0,i._stop(),id(document,"touchmove",this._onTouchMove,this),id(document,"touchend touchcancel",this._onTouchEnd,this),iL(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var i=this._map,e=i.mouseEventToContainerPoint(t.touches[0]),n=i.mouseEventToContainerPoint(t.touches[1]),o=e.distanceTo(n)/this._startDist;if(this._zoom=i.getScaleZoom(o,this._startZoom),!i.options.bounceAtZoomLimits&&(this._zoomi.getMaxZoom()&&o>1)&&(this._zoom=i._limitZoom(this._zoom)),"center"===i.options.touchZoom){if(this._center=this._startLatLng,1===o)return}else{var s=e._add(n)._divideBy(2)._subtract(this._centerPoint);if(1===o&&0===s.x&&0===s.y)return;this._center=i.unproject(i.project(this._pinchStartLatLng,this._zoom).subtract(s),this._zoom)}this._moved||(i._moveStart(!0,!1),this._moved=!0),I(this._animRequest);var r=d(i._move,i,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=B(r,this,!0),iL(t)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,I(this._animRequest),im(document,"touchmove",this._onTouchMove,this),im(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});ik.addInitHook("addHandler","touchZoom",eF),ik.BoxZoom=eR,ik.DoubleClickZoom=eN,ik.Drag=eD,ik.Keyboard=ej,ik.ScrollWheelZoom=eH,ik.TapHold=eW,ik.TouchZoom=eF,t.Bounds=F,t.Browser=tI,t.CRS=Y,t.Canvas=eS,t.Circle=eo,t.CircleMarker=en,t.Class=R,t.Control=iO,t.DivIcon=eL,t.DivOverlay=ew,t.DomEvent={__proto__:null,on:id,off:im,stopPropagation:iw,disableScrollPropagation:ib,disableClickPropagation:iP,preventDefault:iL,stop:iT,getPropagationPath:iM,getMousePosition:iz,getWheelDelta:iZ,isExternalTarget:iS,addListener:id,removeListener:im},t.DomUtil={__proto__:null,TRANSFORM:tY,TRANSITION:tX,TRANSITION_END:tJ,get:t$,getStyle:tQ,create:t0,remove:t1,empty:t2,toFront:t3,toBack:t5,hasClass:t8,addClass:t9,removeClass:t7,setClass:t4,getClass:t6,setOpacity:it,testProp:ii,setTransform:ie,setPosition:io,getPosition:is,get disableTextSelection(){return e},get enableTextSelection(){return n},disableImageDrag:ia,enableImageDrag:ih,preventOutline:il,restoreOutline:iu,getSizedParentNode:ic,getScale:i_},t.Draggable=iH,t.Evented=D,t.FeatureGroup=i7,t.GeoJSON=ea,t.GridLayer=eT,t.Handler=iD,t.Icon=i4,t.ImageOverlay=ev,t.LatLng=G,t.LatLngBounds=V,t.Layer=i8,t.LayerGroup=i9,t.LineUtil={__proto__:null,simplify:iV,pointToSegmentDistance:iq,closestPointOnSegment:function(t,i,e){return iX(t,i,e)},clipSegment:iG,_getEdgeIntersection:iK,_getBitCode:iY,_sqClosestPointOnSegment:iX,isFlat:iJ,_flat:i$,polylineCenter:iQ},t.Map=ik,t.Marker=ei,t.Mixin={Events:N},t.Path=ee,t.Point=j,t.PolyUtil={__proto__:null,clipPolygon:iW,polygonCenter:iF,centroid:iU},t.Polygon=er,t.Polyline=es,t.Popup=eb,t.PosAnimation=iE,t.Projection={__proto__:null,LonLat:i0,Mercator:i1,SphericalMercator:J},t.Rectangle=eI,t.Renderer=eZ,t.SVG=eA,t.SVGOverlay=ex,t.TileLayer=eM,t.Tooltip=eP,t.Transformation=$,t.Util={__proto__:null,extend:i,create:_,bind:d,get lastId(){return p},stamp:m,throttle:f,wrapNum:g,falseFn:v,formatNum:y,trim:x,splitWords:w,setOptions:b,getParamString:P,template:M,isArray:z,indexOf:C,emptyImageUrl:Z,requestFn:O,cancelFn:A,requestAnimFrame:B,cancelAnimFrame:I},t.VideoOverlay=ey,t.bind=d,t.bounds=U,t.canvas=eE,t.circle=function(t,i,e){return new eo(t,i,e)},t.circleMarker=function(t,i){return new en(t,i)},t.control=iA,t.divIcon=function(t){return new eL(t)},t.extend=i,t.featureGroup=function(t,i){return new i7(t,i)},t.geoJSON=eg,t.geoJson=eg,t.gridLayer=function(t){return new eT(t)},t.icon=function(t){return new i4(t)},t.imageOverlay=function(t,i,e){return new ev(t,i,e)},t.latLng=K,t.latLngBounds=q,t.layerGroup=function(t,i){return new i9(t,i)},t.map=function(t,i){return new ik(t,i)},t.marker=function(t,i){return new ei(t,i)},t.point=W,t.polygon=function(t,i){return new er(t,i)},t.polyline=function(t,i){return new es(t,i)},t.popup=function(t,i){return new eb(t,i)},t.rectangle=function(t,i){return new eI(t,i)},t.setOptions=b,t.stamp=m,t.svg=eB,t.svgOverlay=function(t,i,e){return new ex(t,i,e)},t.tileLayer=ez,t.tooltip=function(t,i){return new eP(t,i)},t.transformation=Q,t.version="1.9.4",t.videoOverlay=function(t,i,e){return new ey(t,i,e)};var eU=window.L;t.noConflict=function(){return window.L=eU,this},window.L=t}(i)}}]); \ No newline at end of file diff --git a/frontend/.next/static/chunks/fd9d1056-76ef4ce4d9db9dd9.js b/frontend/.next/static/chunks/fd9d1056-76ef4ce4d9db9dd9.js new file mode 100644 index 0000000..52f6e74 --- /dev/null +++ b/frontend/.next/static/chunks/fd9d1056-76ef4ce4d9db9dd9.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2971],{84417:function(e,t,n){var r,l=n(2265),a=n(71767),o={usingClientEntryPoint:!1,Events:null,Dispatcher:{current:null}};function i(e){var t="https://react.dev/errors/"+e;if(1p||(e.current=d[p],d[p]=null,p--)}function g(e,t){d[++p]=e.current,e.current=t}var y=Symbol.for("react.element"),v=Symbol.for("react.portal"),b=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),S=Symbol.for("react.provider"),C=Symbol.for("react.consumer"),E=Symbol.for("react.context"),x=Symbol.for("react.forward_ref"),z=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),L=Symbol.for("react.scope");Symbol.for("react.debug_trace_mode");var T=Symbol.for("react.offscreen"),F=Symbol.for("react.legacy_hidden"),M=Symbol.for("react.cache");Symbol.for("react.tracing_marker");var O=Symbol.iterator;function R(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=O&&e[O]||e["@@iterator"])?e:null}var D=m(null),A=m(null),I=m(null),U=m(null),B={$$typeof:E,_currentValue:null,_currentValue2:null,_threadCount:0,Provider:null,Consumer:null};function V(e,t){switch(g(I,t),g(A,e),g(D,null),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)&&(t=t.namespaceURI)?s2(t):0;break;default:if(t=(e=8===e?t.parentNode:t).tagName,e=e.namespaceURI)t=s3(e=s2(e),t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}h(D),g(D,t)}function Q(){h(D),h(A),h(I)}function $(e){null!==e.memoizedState&&g(U,e);var t=D.current,n=s3(t,e.type);t!==n&&(g(A,e),g(D,n))}function j(e){A.current===e&&(h(D),h(A)),U.current===e&&(h(U),B._currentValue=null)}var W=a.unstable_scheduleCallback,H=a.unstable_cancelCallback,q=a.unstable_shouldYield,K=a.unstable_requestPaint,Y=a.unstable_now,X=a.unstable_getCurrentPriorityLevel,G=a.unstable_ImmediatePriority,Z=a.unstable_UserBlockingPriority,J=a.unstable_NormalPriority,ee=a.unstable_LowPriority,et=a.unstable_IdlePriority,en=a.log,er=a.unstable_setDisableYieldValue,el=null,ea=null;function eo(e){if("function"==typeof en&&er(e),ea&&"function"==typeof ea.setStrictMode)try{ea.setStrictMode(el,e)}catch(e){}}var ei=Math.clz32?Math.clz32:function(e){return 0==(e>>>=0)?32:31-(eu(e)/es|0)|0},eu=Math.log,es=Math.LN2,ec=128,ef=4194304;function ed(e){var t=42&e;if(0!==t)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194176&e;case 4194304:case 8388608:case 16777216:case 33554432:return 62914560&e;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function ep(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,l=e.suspendedLanes;e=e.pingedLanes;var a=134217727&n;return 0!==a?0!=(n=a&~l)?r=ed(n):0!=(e&=a)&&(r=ed(e)):0!=(n&=~l)?r=ed(n):0!==e&&(r=ed(e)),0===r?0:0!==t&&t!==r&&0==(t&l)&&((l=r&-r)>=(e=t&-t)||32===l&&0!=(4194176&e))?t:r}function em(e,t){return e.errorRecoveryDisabledLanes&t?0:0!=(e=-536870913&e.pendingLanes)?e:536870912&e?536870912:0}function eh(){var e=ec;return 0==(4194176&(ec<<=1))&&(ec=128),e}function eg(){var e=ef;return 0==(62914560&(ef<<=1))&&(ef=4194304),e}function ey(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ev(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-ei(t);e.entangledLanes|=t,e.entanglements[r]=1073741824|e.entanglements[r]|4194218&n}function eb(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-ei(n),l=1<l||u[r]!==s[l]){var c="\n"+u[r].replace(" at new "," at ");return e.displayName&&c.includes("")&&(c=c.replace("",e.displayName)),c}while(1<=r&&0<=l);break}}}finally{eG=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?eX(n):""}function eJ(e){try{var t="";do t+=function(e){switch(e.tag){case 26:case 27:case 5:return eX(e.type);case 16:return eX("Lazy");case 13:return eX("Suspense");case 19:return eX("SuspenseList");case 0:case 2:case 15:return e=eZ(e.type,!1);case 11:return e=eZ(e.type.render,!1);case 1:return e=eZ(e.type,!0);default:return""}}(e),e=e.return;while(e);return t}catch(e){return"\nError generating stack: "+e.message+"\n"+e.stack}}var e0=Symbol.for("react.client.reference");function e1(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function e2(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function e3(e){e._valueTracker||(e._valueTracker=function(e){var t=e2(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var l=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(e){r=""+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function e4(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=e2(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function e6(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}var e8=/[\n"\\]/g;function e5(e){return e.replace(e8,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function e7(e,t,n,r,l,a,o,i){e.name="",null!=o&&"function"!=typeof o&&"symbol"!=typeof o&&"boolean"!=typeof o?e.type=o:e.removeAttribute("type"),null!=t?"number"===o?(0===t&&""===e.value||e.value!=t)&&(e.value=""+e1(t)):e.value!==""+e1(t)&&(e.value=""+e1(t)):"submit"!==o&&"reset"!==o||e.removeAttribute("value"),null!=t?te(e,o,e1(t)):null!=n?te(e,o,e1(n)):null!=r&&e.removeAttribute("value"),null==l&&null!=a&&(e.defaultChecked=!!a),null!=l&&(e.checked=l&&"function"!=typeof l&&"symbol"!=typeof l),null!=i&&"function"!=typeof i&&"symbol"!=typeof i&&"boolean"!=typeof i?e.name=""+e1(i):e.removeAttribute("name")}function e9(e,t,n,r,l,a,o,i){if(null!=a&&"function"!=typeof a&&"symbol"!=typeof a&&"boolean"!=typeof a&&(e.type=a),null!=t||null!=n){if(!("submit"!==a&&"reset"!==a||null!=t))return;n=null!=n?""+e1(n):"",t=null!=t?""+e1(t):n,i||t===e.value||(e.value=t),e.defaultValue=t}r="function"!=typeof(r=null!=r?r:l)&&"symbol"!=typeof r&&!!r,e.checked=i?e.checked:!!r,e.defaultChecked=!!r,null!=o&&"function"!=typeof o&&"symbol"!=typeof o&&"boolean"!=typeof o&&(e.name=o)}function te(e,t,n){"number"===t&&e6(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}var tt=Array.isArray;function tn(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l"+t.valueOf().toString()+"",t=iX.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}}var to=ta;"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction&&(to=function(e,t){return MSApp.execUnsafeLocalFunction(function(){return ta(e,t)})});var ti=to;function tu(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType){n.nodeValue=t;return}}e.textContent=t}var ts=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function tc(e,t,n){var r=0===t.indexOf("--");null==n||"boolean"==typeof n||""===n?r?e.setProperty(t,""):"float"===t?e.cssFloat="":e[t]="":r?e.setProperty(t,n):"number"!=typeof n||0===n||ts.has(t)?"float"===t?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function tf(e,t,n){if(null!=t&&"object"!=typeof t)throw Error(i(62));if(e=e.style,null!=n){for(var r in n)!n.hasOwnProperty(r)||null!=t&&t.hasOwnProperty(r)||(0===r.indexOf("--")?e.setProperty(r,""):"float"===r?e.cssFloat="":e[r]="");for(var l in t)r=t[l],t.hasOwnProperty(l)&&n[l]!==r&&tc(e,l,r)}else for(var a in t)t.hasOwnProperty(a)&&tc(e,a,t[a])}function td(e){if(-1===e.indexOf("-"))return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var tp=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),tm=null;function th(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var tg=null,ty=null;function tv(e){var t=eO(e);if(t&&(e=t.stateNode)){var n=eD(e);switch(e=t.stateNode,t.type){case"input":if(e7(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+e5(""+t)+'"][type="radio"]'),t=0;t>=o,l-=o,tj=1<<32-ei(t)+l|n<h?(g=f,f=null):g=f.sibling;var y=p(l,f,i[h],u);if(null===y){null===f&&(f=g);break}e&&f&&null===y.alternate&&t(l,f),o=a(y,o,h),null===c?s=y:c.sibling=y,c=y,f=g}if(h===i.length)return n(l,f),tZ&&tH(l,h),s;if(null===f){for(;hg?(y=h,h=null):y=h.sibling;var b=p(l,h,v.value,s);if(null===b){null===h&&(h=y);break}e&&h&&null===b.alternate&&t(l,h),o=a(b,o,g),null===f?c=b:f.sibling=b,f=b,h=y}if(v.done)return n(l,h),tZ&&tH(l,g),c;if(null===h){for(;!v.done;g++,v=u.next())null!==(v=d(l,v.value,s))&&(o=a(v,o,g),null===f?c=v:f.sibling=v,f=v);return tZ&&tH(l,g),c}for(h=r(l,h);!v.done;g++,v=u.next())null!==(v=m(h,l,g,v.value,s))&&(e&&null!==v.alternate&&h.delete(null===v.key?g:v.key),o=a(v,o,g),null===f?c=v:f.sibling=v,f=v);return e&&h.forEach(function(e){return t(l,e)}),tZ&&tH(l,g),c}(s,c,f,h);if("function"==typeof f.then)return u(s,c,nJ(f),h);if(f.$$typeof===E)return u(s,c,ai(s,f,h),h);n1(s,f)}return"string"==typeof f&&""!==f||"number"==typeof f?(f=""+f,null!==c&&6===c.tag?(n(s,c.sibling),(c=l(c,f)).return=s):(n(s,c),(c=i_(f,s.mode,h)).return=s),o(s=c)):n(s,c)}(u,s,c,f),nG=null,u}}var n4=n3(!0),n6=n3(!1),n8=m(null),n5=m(0);function n7(e,t){g(n5,e=oz),g(n8,t),oz=e|t.baseLanes}function n9(){g(n5,oz),g(n8,n8.current)}function re(){oz=n5.current,h(n8),h(n5)}var rt=m(null),rn=null;function rr(e){var t=e.alternate;g(ri,1&ri.current),g(rt,e),null===rn&&(null===t||null!==n8.current?rn=e:null!==t.memoizedState&&(rn=e))}function rl(e){if(22===e.tag){if(g(ri,ri.current),g(rt,e),null===rn){var t=e.alternate;null!==t&&null!==t.memoizedState&&(rn=e)}}else ra(e)}function ra(){g(ri,ri.current),g(rt,rt.current)}function ro(e){h(rt),rn===e&&(rn=null),h(ri)}var ri=m(0);function ru(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var rs=s.ReactCurrentDispatcher,rc=s.ReactCurrentBatchConfig,rf=0,rd=null,rp=null,rm=null,rh=!1,rg=!1,ry=!1,rv=0,rb=0,rk=null,rw=0;function rS(){throw Error(i(321))}function rC(e,t){if(null===t)return!1;for(var n=0;na?a:8;var o=rc.transition,i={_callbacks:new Set};rc.transition=i,lf(e,!1,t,n);try{var u=l();if(null!==u&&"object"==typeof u&&"function"==typeof u.then){av(i,u);var s,c,f=(s=[],c={status:"pending",value:null,reason:null,then:function(e){s.push(e)}},u.then(function(){c.status="fulfilled",c.value=r;for(var e=0;e title"))),sG(l,n,r),l[eE]=e,eI(l),n=l;break e;case"link":var a=cE("link","href",t).get(n+(r.href||""));if(a){for(var o=0;o",e=e.removeChild(e.firstChild);break;case"select":e="string"==typeof r.is?l.createElement("select",{is:r.is}):l.createElement("select"),r.multiple?e.multiple=!0:r.size&&(e.size=r.size);break;default:e="string"==typeof r.is?l.createElement(n,{is:r.is}):l.createElement(n)}}e[eE]=t,e[ex]=r;e:for(l=t.child;null!==l;){if(5===l.tag||6===l.tag)e.appendChild(l.stateNode);else if(4!==l.tag&&27!==l.tag&&null!==l.child){l.child.return=l,l=l.child;continue}if(l===t)break;for(;null===l.sibling;){if(null===l.return||l.return===t)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}switch(t.stateNode=e,sG(e,n,r),n){case"button":case"input":case"select":case"textarea":e=!!r.autoFocus;break;case"img":e=!0;break;default:e=!1}e&&aC(t)}}return aP(t),t.flags&=-16777217,null;case 6:if(e&&null!=t.stateNode)e.memoizedProps!==r&&aC(t);else{if("string"!=typeof r&&null===t.stateNode)throw Error(i(166));if(e=I.current,t9(t)){e:{if(e=t.stateNode,n=t.memoizedProps,e[eE]=t,(r=e.nodeValue!==n)&&null!==(l=tX))switch(l.tag){case 3:if(l=0!=(1&l.mode),sq(e.nodeValue,n,l),l){e=!1;break e}break;case 27:case 5:var a=0!=(1&l.mode);if(!0!==l.memoizedProps.suppressHydrationWarning&&sq(e.nodeValue,n,a),a){e=!1;break e}}e=r}e&&aC(t)}else(e=s1(e).createTextNode(r))[eE]=t,t.stateNode=e}return aP(t),null;case 13:if(ro(t),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(tZ&&null!==tG&&0!=(1&t.mode)&&0==(128&t.flags))ne(),nt(),t.flags|=384,l=!1;else if(l=t9(t),null!==r&&null!==r.dehydrated){if(null===e){if(!l)throw Error(i(318));if(!(l=null!==(l=t.memoizedState)?l.dehydrated:null))throw Error(i(317));l[eE]=t}else nt(),0==(128&t.flags)&&(t.memoizedState=null),t.flags|=4;aP(t),l=!1}else null!==tJ&&(o0(tJ),tJ=null),l=!0;if(!l)return 256&t.flags?t:null}if(0!=(128&t.flags))return t.lanes=n,t;return n=null!==r,e=null!==e&&null!==e.memoizedState,n&&(r=t.child,l=null,null!==r.alternate&&null!==r.alternate.memoizedState&&null!==r.alternate.memoizedState.cachePool&&(l=r.alternate.memoizedState.cachePool.pool),a=null,null!==r.memoizedState&&null!==r.memoizedState.cachePool&&(a=r.memoizedState.cachePool.pool),a!==l&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),ax(t,t.updateQueue),aP(t),null;case 4:return Q(),null===e&&sA(t.stateNode.containerInfo),aP(t),null;case 10:return an(t.type._context),aP(t),null;case 19:if(h(ri),null===(l=t.memoizedState))return aP(t),null;if(r=0!=(128&t.flags),null===(a=l.rendering)){if(r)az(l,!1);else{if(0!==oP||null!==e&&0!=(128&e.flags))for(e=t.child;null!==e;){if(null!==(a=ru(e))){for(t.flags|=128,az(l,!1),e=a.updateQueue,t.updateQueue=e,ax(t,e),t.subtreeFlags=0,e=n,n=t.child;null!==n;)ix(n,e),n=n.sibling;return g(ri,1&ri.current|2),t.child}e=e.sibling}null!==l.tail&&Y()>oI&&(t.flags|=128,r=!0,az(l,!1),t.lanes=4194304)}}else{if(!r){if(null!==(e=ru(a))){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,ax(t,e),az(l,!0),null===l.tail&&"hidden"===l.tailMode&&!a.alternate&&!tZ)return aP(t),null}else 2*Y()-l.renderingStartTime>oI&&536870912!==n&&(t.flags|=128,r=!0,az(l,!1),t.lanes=4194304)}l.isBackwards?(a.sibling=t.child,t.child=a):(null!==(e=l.last)?e.sibling=a:t.child=a,l.last=a)}if(null!==l.tail)return t=l.tail,l.rendering=t,l.tail=t.sibling,l.renderingStartTime=Y(),t.sibling=null,e=ri.current,g(ri,r?1&e|2:1&e),t;return aP(t),null;case 22:case 23:return ro(t),re(),r=null!==t.memoizedState,null!==e?null!==e.memoizedState!==r&&(t.flags|=8192):r&&(t.flags|=8192),r&&0!=(1&t.mode)?0!=(536870912&n)&&0==(128&t.flags)&&(aP(t),6&t.subtreeFlags&&(t.flags|=8192)):aP(t),null!==(n=t.updateQueue)&&ax(t,n.retryQueue),n=null,null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),r=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),null!==e&&h(ab),null;case 24:return n=null,null!==e&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),an(ad),aP(t),null;case 25:return null}throw Error(i(156,t.tag))}(t.alternate,t,oz);if(null!==n){ow=n;return}if(null!==(t=t.sibling)){ow=t;return}ow=t=e}while(null!==t);0===oP&&(oP=5)}function is(e,t,n,r,l){var a=ek,o=ov.transition;try{ov.transition=null,ek=2,function(e,t,n,r,l,a){do id();while(null!==oj);if(0!=(6&ob))throw Error(i(327));var o,u=e.finishedWork,s=e.finishedLanes;if(null!==u){if(e.finishedWork=null,e.finishedLanes=0,u===e.current)throw Error(i(177));e.callbackNode=null,e.callbackPriority=0,e.cancelPendingCommit=null;var c=u.lanes|u.childLanes;if(function(e,t,n){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.entangledLanes&=t,e.errorRecoveryDisabledLanes&=t,e.shellSuspendCounter=0,t=e.entanglements;for(var l=e.expirationTimes,a=e.hiddenUpdates;0r&&(l=r,r=a,a=l),l=si(n,a);var o=si(n,r);l&&o&&(1!==e.rangeCount||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&((t=t.createRange()).setStart(l.node,l.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;nn?32:n;n=ov.transition;var l=ek;try{if(ov.transition=null,ek=r,null===oj)var a=!1;else{r=oq,oq=null;var o=oj,u=oW;if(oj=null,oW=0,0!=(6&ob))throw Error(i(331));var s=ob;if(ob|=4,of(o.current),ol(o,o.current,u,r),ob=s,nb(!1),ea&&"function"==typeof ea.onPostCommitFiberRoot)try{ea.onPostCommitFiberRoot(el,o)}catch(e){}a=!0}return a}finally{ek=l,ov.transition=n,ic(e,t)}}return!1}function ip(e,t,n){t=lL(e,t=lP(n,t),2),null!==(e=nO(e,t,2))&&(o2(e,2),nv(e))}function im(e,t,n){if(3===e.tag)ip(e,e,n);else for(;null!==t;){if(3===t.tag){ip(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===oQ||!oQ.has(r))){e=lT(t,e=lP(n,e),2),null!==(t=nO(t,e,2))&&(o2(t,2),nv(t));break}}t=t.return}}function ih(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new om;var l=new Set;r.set(t,l)}else void 0===(l=r.get(t))&&(l=new Set,r.set(t,l));l.has(n)||(ox=!0,l.add(n),e=ig.bind(null,e,t,n),t.then(e,e))}function ig(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,2&ob?oR=!0:4&ob&&(oD=!0),ik(),ok===e&&(oS&n)===n&&(4===oP||3===oP&&(62914560&oS)===oS&&300>Y()-oA?0==(2&ob)&&o5(e,0):oT|=n),nv(e)}function iy(e,t){0===t&&(t=0==(1&e.mode)?2:eg()),null!==(e=ns(e,t))&&(o2(e,t),nv(e))}function iv(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),iy(e,n)}function ib(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;null!==l&&(n=l.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}null!==r&&r.delete(t),iy(e,n)}function ik(){if(50=uH),uY=!1;function uX(e,t){switch(e){case"keyup":return -1!==uj.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function uG(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var uZ=!1,uJ={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function u0(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!uJ[e.type]:"textarea"===t}function u1(e,t,n,r){tb(r),0<(t=sV(t,"onChange")).length&&(n=new i3("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var u2=null,u3=null;function u4(e){sM(e,0)}function u6(e){if(e4(eR(e)))return e}function u8(e,t){if("change"===e)return t}var u5=!1;if(e$){if(e$){var u7="oninput"in document;if(!u7){var u9=document.createElement("div");u9.setAttribute("oninput","return;"),u7="function"==typeof u9.oninput}r=u7}else r=!1;u5=r&&(!document.documentMode||9=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=so(r)}}function su(){for(var e=window,t=e6();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(n)e=t.contentWindow;else break;t=e6(e.document)}return t}function ss(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var sc=e$&&"documentMode"in document&&11>=document.documentMode,sf=null,sd=null,sp=null,sm=!1;function sh(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;sm||null==sf||sf!==e6(r)||(r="selectionStart"in(r=sf)&&ss(r)?{start:r.selectionStart,end:r.selectionEnd}:{anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},sp&&nQ(sp,r)||(sp=r,0<(r=sV(sd,"onSelect")).length&&(t=new i3("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=sf)))}function sg(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var sy={animationend:sg("Animation","AnimationEnd"),animationiteration:sg("Animation","AnimationIteration"),animationstart:sg("Animation","AnimationStart"),transitionend:sg("Transition","TransitionEnd")},sv={},sb={};function sk(e){if(sv[e])return sv[e];if(!sy[e])return e;var t,n=sy[e];for(t in n)if(n.hasOwnProperty(t)&&t in sb)return sv[e]=n[t];return e}e$&&(sb=document.createElement("div").style,"AnimationEvent"in window||(delete sy.animationend.animation,delete sy.animationiteration.animation,delete sy.animationstart.animation),"TransitionEvent"in window||delete sy.transitionend.transition);var sw=sk("animationend"),sS=sk("animationiteration"),sC=sk("animationstart"),sE=sk("transitionend"),sx=new Map,sz="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll scrollEnd toggle touchMove waiting wheel".split(" ");function sP(e,t){sx.set(e,t),eV(t,[e])}for(var sN=0;sN title"):null)}var cz=null;function cP(){}function cN(){if(this.count--,0===this.count){if(this.stylesheets)cL(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var c_=null;function cL(e,t){e.stylesheets=null,null!==e.unsuspend&&(e.count++,c_=new Map,t.forEach(cT,e),c_=null,cN.call(e))}function cT(e,t){if(!(4&t.state.loading)){var n=c_.get(e);if(n)var r=n.get(null);else{n=new Map,c_.set(e,n);for(var l=e.querySelectorAll("link[data-precedence],style[data-precedence]"),a=0;a
); } + + diff --git a/frontend/components/booking/BookingErrorBoundary.tsx b/frontend/components/booking/BookingErrorBoundary.tsx index 8c699c0..2d35fc0 100644 --- a/frontend/components/booking/BookingErrorBoundary.tsx +++ b/frontend/components/booking/BookingErrorBoundary.tsx @@ -48,3 +48,5 @@ export class BookingErrorBoundary extends Component { } + + diff --git a/frontend/components/booking/BookingFilters.tsx b/frontend/components/booking/BookingFilters.tsx index 865fb0f..fdf72ba 100644 --- a/frontend/components/booking/BookingFilters.tsx +++ b/frontend/components/booking/BookingFilters.tsx @@ -49,3 +49,5 @@ export default function BookingFilters({ } + + diff --git a/frontend/components/booking/BookingFlow.tsx b/frontend/components/booking/BookingFlow.tsx index cba3863..d342afb 100644 --- a/frontend/components/booking/BookingFlow.tsx +++ b/frontend/components/booking/BookingFlow.tsx @@ -120,3 +120,5 @@ export default function BookingFlow({ spot, userAddress }: BookingFlowProps) { ); } + + diff --git a/frontend/components/booking/BookingFormValidation.tsx b/frontend/components/booking/BookingFormValidation.tsx index 8e0a79e..c185745 100644 --- a/frontend/components/booking/BookingFormValidation.tsx +++ b/frontend/components/booking/BookingFormValidation.tsx @@ -29,3 +29,5 @@ export default function BookingFormValidation({ } + + diff --git a/frontend/components/booking/BookingNotification.tsx b/frontend/components/booking/BookingNotification.tsx index f4c12a7..73ff1ca 100644 --- a/frontend/components/booking/BookingNotification.tsx +++ b/frontend/components/booking/BookingNotification.tsx @@ -59,3 +59,5 @@ export default function BookingNotification({ } + + diff --git a/frontend/components/booking/BookingReceipt.tsx b/frontend/components/booking/BookingReceipt.tsx index 62fad7d..92864f5 100644 --- a/frontend/components/booking/BookingReceipt.tsx +++ b/frontend/components/booking/BookingReceipt.tsx @@ -88,3 +88,5 @@ export default function BookingReceipt({ booking }: BookingReceiptProps) { } + + diff --git a/frontend/components/booking/BookingStatusBadge.tsx b/frontend/components/booking/BookingStatusBadge.tsx index d8365f7..d16baa6 100644 --- a/frontend/components/booking/BookingStatusBadge.tsx +++ b/frontend/components/booking/BookingStatusBadge.tsx @@ -38,3 +38,5 @@ export default function BookingStatusBadge({ status, size = "md" }: BookingStatu } + + diff --git a/frontend/components/booking/BookingSummary.tsx b/frontend/components/booking/BookingSummary.tsx index 135e4cf..30d7016 100644 --- a/frontend/components/booking/BookingSummary.tsx +++ b/frontend/components/booking/BookingSummary.tsx @@ -139,3 +139,5 @@ export default function BookingSummary({ } + + diff --git a/frontend/components/booking/DateTimePicker.tsx b/frontend/components/booking/DateTimePicker.tsx index c1926ae..e08e235 100644 --- a/frontend/components/booking/DateTimePicker.tsx +++ b/frontend/components/booking/DateTimePicker.tsx @@ -118,3 +118,5 @@ export default function DateTimePicker({ spot, onSelect }: DateTimePickerProps) } + + diff --git a/frontend/components/booking/ErrorHandler.tsx b/frontend/components/booking/ErrorHandler.tsx index c166fe0..30789e8 100644 --- a/frontend/components/booking/ErrorHandler.tsx +++ b/frontend/components/booking/ErrorHandler.tsx @@ -44,3 +44,5 @@ export default function ErrorHandler({ error, onRetry, onDismiss }: ErrorHandler } + + diff --git a/frontend/components/booking/LoadingStates.tsx b/frontend/components/booking/LoadingStates.tsx index fe03ef6..2672a64 100644 --- a/frontend/components/booking/LoadingStates.tsx +++ b/frontend/components/booking/LoadingStates.tsx @@ -56,3 +56,5 @@ export function SpotsLoading() { } + + diff --git a/frontend/components/booking/QRCodeDisplay.tsx b/frontend/components/booking/QRCodeDisplay.tsx index 692104f..5bcaa40 100644 --- a/frontend/components/booking/QRCodeDisplay.tsx +++ b/frontend/components/booking/QRCodeDisplay.tsx @@ -102,3 +102,5 @@ export default function QRCodeDisplay({ ); } + + diff --git a/frontend/components/booking/README.md b/frontend/components/booking/README.md index 7d5268f..88abfda 100644 --- a/frontend/components/booking/README.md +++ b/frontend/components/booking/README.md @@ -62,3 +62,5 @@ All components are prepared for: - IPFS for images + + diff --git a/frontend/components/booking/SpotAvailabilityChecker.tsx b/frontend/components/booking/SpotAvailabilityChecker.tsx index bcac68e..9a65fd9 100644 --- a/frontend/components/booking/SpotAvailabilityChecker.tsx +++ b/frontend/components/booking/SpotAvailabilityChecker.tsx @@ -79,3 +79,5 @@ export default function SpotAvailabilityChecker({ } + + diff --git a/frontend/components/booking/SpotDetails.tsx b/frontend/components/booking/SpotDetails.tsx index d853566..28aa3ad 100644 --- a/frontend/components/booking/SpotDetails.tsx +++ b/frontend/components/booking/SpotDetails.tsx @@ -58,3 +58,5 @@ export default function SpotDetails({ spot }: SpotDetailsProps) { } + + diff --git a/frontend/components/booking/TransactionStatus.tsx b/frontend/components/booking/TransactionStatus.tsx index 856988e..0c5a6f5 100644 --- a/frontend/components/booking/TransactionStatus.tsx +++ b/frontend/components/booking/TransactionStatus.tsx @@ -78,3 +78,5 @@ export default function TransactionStatus({ } + + diff --git a/frontend/components/disputes/AdminDisputePanel.tsx b/frontend/components/disputes/AdminDisputePanel.tsx index 039687e..875d08a 100644 --- a/frontend/components/disputes/AdminDisputePanel.tsx +++ b/frontend/components/disputes/AdminDisputePanel.tsx @@ -230,3 +230,5 @@ export default function AdminDisputePanel({ disputeId }: AdminDisputePanelProps) } + + diff --git a/frontend/components/disputes/CheckInOut.tsx b/frontend/components/disputes/CheckInOut.tsx index 31944d5..c70dabf 100644 --- a/frontend/components/disputes/CheckInOut.tsx +++ b/frontend/components/disputes/CheckInOut.tsx @@ -121,3 +121,5 @@ export default function CheckInOut({ bookingId, isOwner = false }: CheckInOutPro } + + diff --git a/frontend/components/disputes/DisputeHistory.tsx b/frontend/components/disputes/DisputeHistory.tsx index 2711769..b47f2a2 100644 --- a/frontend/components/disputes/DisputeHistory.tsx +++ b/frontend/components/disputes/DisputeHistory.tsx @@ -136,3 +136,5 @@ export default function DisputeHistory({ escrowIds }: DisputeHistoryProps) { } + + diff --git a/frontend/components/disputes/EvidenceDisplay.tsx b/frontend/components/disputes/EvidenceDisplay.tsx index 2c7af2c..97cf38e 100644 --- a/frontend/components/disputes/EvidenceDisplay.tsx +++ b/frontend/components/disputes/EvidenceDisplay.tsx @@ -103,3 +103,5 @@ export default function EvidenceDisplay({ evidence }: EvidenceDisplayProps) { } + + diff --git a/frontend/components/disputes/FileDisputeForm.tsx b/frontend/components/disputes/FileDisputeForm.tsx index 784ef44..c73788c 100644 --- a/frontend/components/disputes/FileDisputeForm.tsx +++ b/frontend/components/disputes/FileDisputeForm.tsx @@ -199,3 +199,5 @@ export default function FileDisputeForm({ escrowId, bookingId, onSuccess, onCanc } + + diff --git a/frontend/components/map/MapContainer.tsx b/frontend/components/map/MapContainer.tsx index a25fbc1..5805b62 100644 --- a/frontend/components/map/MapContainer.tsx +++ b/frontend/components/map/MapContainer.tsx @@ -71,3 +71,5 @@ export default function MapContainer({ } + + diff --git a/frontend/components/map/MapControls.tsx b/frontend/components/map/MapControls.tsx index e772b30..827767a 100644 --- a/frontend/components/map/MapControls.tsx +++ b/frontend/components/map/MapControls.tsx @@ -135,3 +135,5 @@ export default function MapControls({ onCenterChange }: MapControlsProps) { } + + diff --git a/frontend/components/map/MapFilters.tsx b/frontend/components/map/MapFilters.tsx index 9fa34b2..008da99 100644 --- a/frontend/components/map/MapFilters.tsx +++ b/frontend/components/map/MapFilters.tsx @@ -133,3 +133,5 @@ export default function MapFilters({ } + + diff --git a/frontend/components/map/MapSearch.tsx b/frontend/components/map/MapSearch.tsx index 7f053ef..72ca0c2 100644 --- a/frontend/components/map/MapSearch.tsx +++ b/frontend/components/map/MapSearch.tsx @@ -101,3 +101,5 @@ export default function MapSearch({ } + + diff --git a/frontend/components/map/MarkerCluster.tsx b/frontend/components/map/MarkerCluster.tsx index 1b17538..2ba2151 100644 --- a/frontend/components/map/MarkerCluster.tsx +++ b/frontend/components/map/MarkerCluster.tsx @@ -62,3 +62,5 @@ export default function MarkerCluster({ markers }: MarkerClusterProps) { } + + diff --git a/frontend/components/map/README.md b/frontend/components/map/README.md index 8e71fee..1dc65d7 100644 --- a/frontend/components/map/README.md +++ b/frontend/components/map/README.md @@ -202,3 +202,5 @@ The map integration is prepared for smart contract integration: Part of the CarIn parking platform. + + diff --git a/frontend/components/map/SpotInfoWindow.tsx b/frontend/components/map/SpotInfoWindow.tsx index ec5dfea..4e16d05 100644 --- a/frontend/components/map/SpotInfoWindow.tsx +++ b/frontend/components/map/SpotInfoWindow.tsx @@ -56,3 +56,5 @@ export default function SpotInfoWindow({ spot }: SpotInfoWindowProps) { } + + diff --git a/frontend/components/map/SpotList.tsx b/frontend/components/map/SpotList.tsx index 74e2506..122d640 100644 --- a/frontend/components/map/SpotList.tsx +++ b/frontend/components/map/SpotList.tsx @@ -146,3 +146,5 @@ export default function SpotList({ } + + diff --git a/frontend/components/map/ViewToggle.tsx b/frontend/components/map/ViewToggle.tsx index ded5f96..4882535 100644 --- a/frontend/components/map/ViewToggle.tsx +++ b/frontend/components/map/ViewToggle.tsx @@ -68,3 +68,5 @@ export default function ViewToggle({ } + + diff --git a/frontend/components/owner/EarningsSummary.tsx b/frontend/components/owner/EarningsSummary.tsx index b2db042..c52b5e3 100644 --- a/frontend/components/owner/EarningsSummary.tsx +++ b/frontend/components/owner/EarningsSummary.tsx @@ -209,3 +209,5 @@ export default function EarningsSummary({ address }: EarningsSummaryProps) { } + + diff --git a/frontend/components/owner/EditSpotModal.tsx b/frontend/components/owner/EditSpotModal.tsx index 8e1fb12..fc70041 100644 --- a/frontend/components/owner/EditSpotModal.tsx +++ b/frontend/components/owner/EditSpotModal.tsx @@ -123,3 +123,5 @@ export default function EditSpotModal({ spot, onClose, onUpdated }: EditSpotModa } + + diff --git a/frontend/components/owner/ImageUpload.tsx b/frontend/components/owner/ImageUpload.tsx index 3447948..2ab792f 100644 --- a/frontend/components/owner/ImageUpload.tsx +++ b/frontend/components/owner/ImageUpload.tsx @@ -87,3 +87,5 @@ export default function ImageUpload({ onImageUploaded }: ImageUploadProps) { } + + diff --git a/frontend/components/owner/ListSpotForm.tsx b/frontend/components/owner/ListSpotForm.tsx index 9ed2927..98a558d 100644 --- a/frontend/components/owner/ListSpotForm.tsx +++ b/frontend/components/owner/ListSpotForm.tsx @@ -218,3 +218,5 @@ export default function ListSpotForm({ address, onSpotCreated }: ListSpotFormPro } + + diff --git a/frontend/components/owner/MapPicker.tsx b/frontend/components/owner/MapPicker.tsx index ac8a86e..ea30b55 100644 --- a/frontend/components/owner/MapPicker.tsx +++ b/frontend/components/owner/MapPicker.tsx @@ -67,3 +67,5 @@ export default function MapPicker({ onLocationSelect, selectedLocation }: MapPic } + + diff --git a/frontend/components/owner/OwnerDashboard.tsx b/frontend/components/owner/OwnerDashboard.tsx index 0b6bca4..d48ef5c 100644 --- a/frontend/components/owner/OwnerDashboard.tsx +++ b/frontend/components/owner/OwnerDashboard.tsx @@ -189,3 +189,5 @@ export default function OwnerDashboard({ address }: OwnerDashboardProps) { ); } + + diff --git a/frontend/components/owner/README.md b/frontend/components/owner/README.md index c2541d8..bfe4951 100644 --- a/frontend/components/owner/README.md +++ b/frontend/components/owner/README.md @@ -49,3 +49,5 @@ All components are ready to be integrated with: All owner features require wallet connection. The dashboard checks for connected wallet before rendering owner features. + + diff --git a/frontend/components/owner/SpotCard.tsx b/frontend/components/owner/SpotCard.tsx index 4c6c8e1..6c14c10 100644 --- a/frontend/components/owner/SpotCard.tsx +++ b/frontend/components/owner/SpotCard.tsx @@ -92,3 +92,5 @@ export default function SpotCard({ } + + diff --git a/frontend/components/owner/SpotsList.tsx b/frontend/components/owner/SpotsList.tsx index c2ca4e4..33eefcb 100644 --- a/frontend/components/owner/SpotsList.tsx +++ b/frontend/components/owner/SpotsList.tsx @@ -140,3 +140,5 @@ export default function SpotsList({ address, refreshTrigger }: SpotsListProps) { } + + diff --git a/frontend/components/owner/Statistics.tsx b/frontend/components/owner/Statistics.tsx index 0f332b7..7a39022 100644 --- a/frontend/components/owner/Statistics.tsx +++ b/frontend/components/owner/Statistics.tsx @@ -158,3 +158,5 @@ export default function Statistics({ address }: StatisticsProps) { } + + diff --git a/frontend/components/rewards/README.md b/frontend/components/rewards/README.md index 8b7d0dd..f698386 100644 --- a/frontend/components/rewards/README.md +++ b/frontend/components/rewards/README.md @@ -68,3 +68,5 @@ All components use the `useRewards` hooks from `@/lib/hooks/useRewards`: Components use Tailwind CSS and follow the design system used throughout the CarIn application. + + diff --git a/frontend/components/rewards/ReferralShare.tsx b/frontend/components/rewards/ReferralShare.tsx index 81b9f8b..b9a961d 100644 --- a/frontend/components/rewards/ReferralShare.tsx +++ b/frontend/components/rewards/ReferralShare.tsx @@ -144,3 +144,5 @@ export default function ReferralShare({ spotId }: ReferralShareProps) { } + + diff --git a/frontend/components/rewards/ReportForm.tsx b/frontend/components/rewards/ReportForm.tsx index 88e049e..e827b43 100644 --- a/frontend/components/rewards/ReportForm.tsx +++ b/frontend/components/rewards/ReportForm.tsx @@ -127,10 +127,12 @@ export default function ReportForm({ spotId, onSuccess, onCancel }: ReportFormPr

- * After submission, your report will be reviewed. If validated, you will receive {100} CARIN tokens as a reward. + * After submission, your report will be reviewed. If validated, you will receive {300} CARIN tokens as a reward.

); } + + diff --git a/frontend/components/rewards/RewardHistory.tsx b/frontend/components/rewards/RewardHistory.tsx index 77e1035..ac8272d 100644 --- a/frontend/components/rewards/RewardHistory.tsx +++ b/frontend/components/rewards/RewardHistory.tsx @@ -83,7 +83,7 @@ export default function RewardHistory() { {/* Referrals History */}
-

Referral History

+

Referral Histories

{referrals.length === 0 ? (

No referrals created yet

) : ( diff --git a/frontend/lib/config/map.ts b/frontend/lib/config/map.ts index 995f4bc..0a029c7 100644 --- a/frontend/lib/config/map.ts +++ b/frontend/lib/config/map.ts @@ -41,3 +41,5 @@ export function hasGoogleMapsApiKey(): boolean { } + + diff --git a/frontend/lib/contracts/bookingIntegration.ts b/frontend/lib/contracts/bookingIntegration.ts index 7bd63d5..ad7abca 100644 --- a/frontend/lib/contracts/bookingIntegration.ts +++ b/frontend/lib/contracts/bookingIntegration.ts @@ -96,3 +96,5 @@ export async function getUserBookings( } + + diff --git a/frontend/lib/contracts/disputeResolution.ts b/frontend/lib/contracts/disputeResolution.ts index ce82f3b..008d3cb 100644 --- a/frontend/lib/contracts/disputeResolution.ts +++ b/frontend/lib/contracts/disputeResolution.ts @@ -84,3 +84,5 @@ export interface Vote { } + + diff --git a/frontend/lib/contracts/parkingSpot.ts b/frontend/lib/contracts/parkingSpot.ts index 2b61832..7445ca8 100644 --- a/frontend/lib/contracts/parkingSpot.ts +++ b/frontend/lib/contracts/parkingSpot.ts @@ -26,3 +26,5 @@ export function getParkingSpotContract( } + + diff --git a/frontend/lib/contracts/paymentEscrow.ts b/frontend/lib/contracts/paymentEscrow.ts index 415d22a..ff6418d 100644 --- a/frontend/lib/contracts/paymentEscrow.ts +++ b/frontend/lib/contracts/paymentEscrow.ts @@ -25,3 +25,5 @@ export function getPaymentEscrowContract( } + + diff --git a/frontend/lib/contracts/rewardsManager.ts b/frontend/lib/contracts/rewardsManager.ts index 70018e5..0716fc2 100644 --- a/frontend/lib/contracts/rewardsManager.ts +++ b/frontend/lib/contracts/rewardsManager.ts @@ -59,3 +59,5 @@ export function calculateReferralHash( } + + diff --git a/frontend/lib/contracts/rewardsToken.ts b/frontend/lib/contracts/rewardsToken.ts index 6c08e3b..08fae0c 100644 --- a/frontend/lib/contracts/rewardsToken.ts +++ b/frontend/lib/contracts/rewardsToken.ts @@ -34,3 +34,5 @@ export function getRewardsTokenContract( } + + diff --git a/frontend/lib/hooks/useBookingHistory.ts b/frontend/lib/hooks/useBookingHistory.ts index b520772..5dc1248 100644 --- a/frontend/lib/hooks/useBookingHistory.ts +++ b/frontend/lib/hooks/useBookingHistory.ts @@ -56,3 +56,5 @@ export function useBookingHistory(userAddress: string) { } + + diff --git a/frontend/lib/hooks/useBookingTransaction.ts b/frontend/lib/hooks/useBookingTransaction.ts index 1a9b48a..9f77fcd 100644 --- a/frontend/lib/hooks/useBookingTransaction.ts +++ b/frontend/lib/hooks/useBookingTransaction.ts @@ -64,3 +64,5 @@ export function useBookingTransaction() { } + + diff --git a/frontend/lib/hooks/useBookingValidation.ts b/frontend/lib/hooks/useBookingValidation.ts index 883cd14..ae20c5c 100644 --- a/frontend/lib/hooks/useBookingValidation.ts +++ b/frontend/lib/hooks/useBookingValidation.ts @@ -68,3 +68,5 @@ export function useBookingValidation() { } + + diff --git a/frontend/lib/hooks/useGeolocation.ts b/frontend/lib/hooks/useGeolocation.ts index d478416..40f377d 100644 --- a/frontend/lib/hooks/useGeolocation.ts +++ b/frontend/lib/hooks/useGeolocation.ts @@ -88,3 +88,5 @@ export function useGeolocation() { } + + diff --git a/frontend/lib/hooks/useParkingSpot.ts b/frontend/lib/hooks/useParkingSpot.ts index fb71ce9..d0de941 100644 --- a/frontend/lib/hooks/useParkingSpot.ts +++ b/frontend/lib/hooks/useParkingSpot.ts @@ -116,3 +116,5 @@ export function useParkingSpot() { } + + diff --git a/frontend/lib/hooks/useParkingSpots.ts b/frontend/lib/hooks/useParkingSpots.ts index 5b2e374..15e3964 100644 --- a/frontend/lib/hooks/useParkingSpots.ts +++ b/frontend/lib/hooks/useParkingSpots.ts @@ -129,3 +129,5 @@ export function useParkingSpots() { } + + diff --git a/frontend/lib/hooks/usePaymentEscrow.ts b/frontend/lib/hooks/usePaymentEscrow.ts index e742044..d6e92dd 100644 --- a/frontend/lib/hooks/usePaymentEscrow.ts +++ b/frontend/lib/hooks/usePaymentEscrow.ts @@ -68,3 +68,5 @@ export function usePaymentEscrow() { } + + diff --git a/frontend/lib/hooks/useRewards.ts b/frontend/lib/hooks/useRewards.ts index 48aa77a..b09760e 100644 --- a/frontend/lib/hooks/useRewards.ts +++ b/frontend/lib/hooks/useRewards.ts @@ -350,3 +350,5 @@ export function useReferrals() { } + + diff --git a/frontend/lib/hooks/useSpotAvailability.ts b/frontend/lib/hooks/useSpotAvailability.ts index 28e46a9..f6ee19c 100644 --- a/frontend/lib/hooks/useSpotAvailability.ts +++ b/frontend/lib/hooks/useSpotAvailability.ts @@ -74,3 +74,5 @@ export function useSpotAvailability(spots: ParkingSpot[]) { } + + diff --git a/frontend/lib/hooks/useSpotDetails.ts b/frontend/lib/hooks/useSpotDetails.ts index 5a47792..c5646e5 100644 --- a/frontend/lib/hooks/useSpotDetails.ts +++ b/frontend/lib/hooks/useSpotDetails.ts @@ -61,3 +61,5 @@ export function useSpotDetails(spotId: string) { } + + diff --git a/frontend/lib/hooks/useTransactionStatus.ts b/frontend/lib/hooks/useTransactionStatus.ts index 0190e62..6d79aa1 100644 --- a/frontend/lib/hooks/useTransactionStatus.ts +++ b/frontend/lib/hooks/useTransactionStatus.ts @@ -51,3 +51,5 @@ export function useTransactionStatus(): UseTransactionStatusReturn { } + + diff --git a/frontend/lib/hooks/useWalletBooking.ts b/frontend/lib/hooks/useWalletBooking.ts index 5b77d33..6715df0 100644 --- a/frontend/lib/hooks/useWalletBooking.ts +++ b/frontend/lib/hooks/useWalletBooking.ts @@ -103,3 +103,5 @@ export function useWalletBooking() { } + + diff --git a/frontend/lib/ipfs.ts b/frontend/lib/ipfs.ts index 2c5bdc2..0ba6f0e 100644 --- a/frontend/lib/ipfs.ts +++ b/frontend/lib/ipfs.ts @@ -76,3 +76,5 @@ export function getIPFSGatewayURL(hash: string): string { } + + diff --git a/frontend/lib/utils/bookingCalculations.ts b/frontend/lib/utils/bookingCalculations.ts index 71bcf84..4f5cd74 100644 --- a/frontend/lib/utils/bookingCalculations.ts +++ b/frontend/lib/utils/bookingCalculations.ts @@ -76,3 +76,5 @@ export function isBookingInFuture(date: Date, startTime: string): boolean { } + + diff --git a/frontend/lib/utils/distance.ts b/frontend/lib/utils/distance.ts index c66303c..fdf282e 100644 --- a/frontend/lib/utils/distance.ts +++ b/frontend/lib/utils/distance.ts @@ -61,3 +61,5 @@ export function isWithinRadius( } + + diff --git a/frontend/lib/utils/errorMessages.ts b/frontend/lib/utils/errorMessages.ts index 388d499..b6f639f 100644 --- a/frontend/lib/utils/errorMessages.ts +++ b/frontend/lib/utils/errorMessages.ts @@ -46,3 +46,5 @@ export function getErrorMessage(error: any): string { } + + diff --git a/frontend/lib/utils/geocoding.ts b/frontend/lib/utils/geocoding.ts index 981fcb4..eabbf9d 100644 --- a/frontend/lib/utils/geocoding.ts +++ b/frontend/lib/utils/geocoding.ts @@ -177,3 +177,5 @@ async function reverseGeocodeWithGoogle( } + + diff --git a/frontend/lib/utils/qrCodeGenerator.ts b/frontend/lib/utils/qrCodeGenerator.ts index 2e10486..9c254b6 100644 --- a/frontend/lib/utils/qrCodeGenerator.ts +++ b/frontend/lib/utils/qrCodeGenerator.ts @@ -111,3 +111,5 @@ export async function validateQRCodeData( return { valid: true }; } + + diff --git a/frontend/next-env.d.ts b/frontend/next-env.d.ts new file mode 100644 index 0000000..40c3d68 --- /dev/null +++ b/frontend/next-env.d.ts @@ -0,0 +1,5 @@ +/// +/// + +// NOTE: This file should not be edited +// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information. diff --git a/frontend/next.config.js b/frontend/next.config.js index b7f16a7..7d92e44 100644 --- a/frontend/next.config.js +++ b/frontend/next.config.js @@ -16,3 +16,5 @@ const nextConfig = { module.exports = nextConfig; + + diff --git a/frontend/postcss.config.js b/frontend/postcss.config.js index ea59b8f..a435474 100644 --- a/frontend/postcss.config.js +++ b/frontend/postcss.config.js @@ -6,3 +6,5 @@ module.exports = { }; + + diff --git a/frontend/tailwind.config.ts b/frontend/tailwind.config.ts index 98a7f48..3c885cc 100644 --- a/frontend/tailwind.config.ts +++ b/frontend/tailwind.config.ts @@ -19,3 +19,5 @@ const config: Config = { export default config; + + diff --git a/frontend/tsconfig.json b/frontend/tsconfig.json index fd91399..2b90f0d 100644 --- a/frontend/tsconfig.json +++ b/frontend/tsconfig.json @@ -27,3 +27,5 @@ } + + diff --git a/smartcontracts/.solhint.json b/smartcontracts/.solhint.json index 6684139..a92b25a 100644 --- a/smartcontracts/.solhint.json +++ b/smartcontracts/.solhint.json @@ -9,3 +9,5 @@ } + + diff --git a/smartcontracts/CHANGELOG.md b/smartcontracts/CHANGELOG.md index ab08b56..e0599b6 100644 --- a/smartcontracts/CHANGELOG.md +++ b/smartcontracts/CHANGELOG.md @@ -30,3 +30,5 @@ All notable changes to the CarIn smart contracts will be documented in this file - Booking System + + diff --git a/smartcontracts/README.md b/smartcontracts/README.md index a463c1c..2efe40e 100644 --- a/smartcontracts/README.md +++ b/smartcontracts/README.md @@ -48,3 +48,5 @@ npm run deploy:alfajores - Access control for sensitive operations + + diff --git a/smartcontracts/config/celo-tokens.js b/smartcontracts/config/celo-tokens.js index 316a081..01b89d6 100644 --- a/smartcontracts/config/celo-tokens.js +++ b/smartcontracts/config/celo-tokens.js @@ -20,3 +20,5 @@ module.exports = { }; + + diff --git a/smartcontracts/config/rewards-config.js b/smartcontracts/config/rewards-config.js index 4a6422e..ef97f98 100644 --- a/smartcontracts/config/rewards-config.js +++ b/smartcontracts/config/rewards-config.js @@ -42,3 +42,5 @@ module.exports = { }; + + diff --git a/smartcontracts/docs/REWARDS_SYSTEM.md b/smartcontracts/docs/REWARDS_SYSTEM.md index 77b5974..5978a57 100644 --- a/smartcontracts/docs/REWARDS_SYSTEM.md +++ b/smartcontracts/docs/REWARDS_SYSTEM.md @@ -147,3 +147,5 @@ npm test ``` + + diff --git a/smartcontracts/hardhat.config.js b/smartcontracts/hardhat.config.js index 51ff94f..305fb90 100644 --- a/smartcontracts/hardhat.config.js +++ b/smartcontracts/hardhat.config.js @@ -39,3 +39,5 @@ module.exports = { }; + + diff --git a/smartcontracts/scripts/deploy-escrow.js b/smartcontracts/scripts/deploy-escrow.js index f3821ac..3c0be62 100644 --- a/smartcontracts/scripts/deploy-escrow.js +++ b/smartcontracts/scripts/deploy-escrow.js @@ -26,3 +26,5 @@ main() }); + + diff --git a/smartcontracts/scripts/deploy-rewards.js b/smartcontracts/scripts/deploy-rewards.js index 39625d2..50ec359 100644 --- a/smartcontracts/scripts/deploy-rewards.js +++ b/smartcontracts/scripts/deploy-rewards.js @@ -80,3 +80,5 @@ main() }); + + diff --git a/smartcontracts/scripts/deploy.js b/smartcontracts/scripts/deploy.js index fc55dcd..1882bb6 100644 --- a/smartcontracts/scripts/deploy.js +++ b/smartcontracts/scripts/deploy.js @@ -32,3 +32,5 @@ main() }); + + diff --git a/smartcontracts/scripts/setup-dispute-resolution.js b/smartcontracts/scripts/setup-dispute-resolution.js index 0966570..6671eba 100644 --- a/smartcontracts/scripts/setup-dispute-resolution.js +++ b/smartcontracts/scripts/setup-dispute-resolution.js @@ -83,3 +83,5 @@ main() }); + + diff --git a/smartcontracts/scripts/verify-escrow.js b/smartcontracts/scripts/verify-escrow.js index 3fa4d7b..d961247 100644 --- a/smartcontracts/scripts/verify-escrow.js +++ b/smartcontracts/scripts/verify-escrow.js @@ -28,3 +28,5 @@ main() }); + + diff --git a/smartcontracts/scripts/verify.js b/smartcontracts/scripts/verify.js index 37cf60f..71dd5b2 100644 --- a/smartcontracts/scripts/verify.js +++ b/smartcontracts/scripts/verify.js @@ -42,3 +42,5 @@ main() }); + + diff --git a/smartcontracts/test/DisputeResolution.EdgeCases.test.js b/smartcontracts/test/DisputeResolution.EdgeCases.test.js index 1d622ae..bb5592a 100644 --- a/smartcontracts/test/DisputeResolution.EdgeCases.test.js +++ b/smartcontracts/test/DisputeResolution.EdgeCases.test.js @@ -129,3 +129,5 @@ describe("DisputeResolution Edge Cases", function () { }); + + diff --git a/smartcontracts/test/PaymentEscrow.AutomaticRelease.test.js b/smartcontracts/test/PaymentEscrow.AutomaticRelease.test.js index 8526b13..c9c5eb1 100644 --- a/smartcontracts/test/PaymentEscrow.AutomaticRelease.test.js +++ b/smartcontracts/test/PaymentEscrow.AutomaticRelease.test.js @@ -55,3 +55,5 @@ describe("PaymentEscrow - Automatic Release", function () { }); + + diff --git a/smartcontracts/test/PaymentEscrow.Dispute.test.js b/smartcontracts/test/PaymentEscrow.Dispute.test.js index 65a8778..b29ab81 100644 --- a/smartcontracts/test/PaymentEscrow.Dispute.test.js +++ b/smartcontracts/test/PaymentEscrow.Dispute.test.js @@ -36,3 +36,5 @@ describe("PaymentEscrow - Dispute Resolution", function () { }); + + diff --git a/smartcontracts/test/PaymentEscrow.ERC20.test.js b/smartcontracts/test/PaymentEscrow.ERC20.test.js index 7528766..bc2f620 100644 --- a/smartcontracts/test/PaymentEscrow.ERC20.test.js +++ b/smartcontracts/test/PaymentEscrow.ERC20.test.js @@ -46,3 +46,5 @@ describe("PaymentEscrow - ERC20 Token Support", function () { }); + + diff --git a/smartcontracts/test/PaymentEscrow.EdgeCases.test.js b/smartcontracts/test/PaymentEscrow.EdgeCases.test.js index 2e25326..900c17f 100644 --- a/smartcontracts/test/PaymentEscrow.EdgeCases.test.js +++ b/smartcontracts/test/PaymentEscrow.EdgeCases.test.js @@ -49,3 +49,5 @@ describe("PaymentEscrow - Edge Cases", function () { }); + + diff --git a/smartcontracts/test/PaymentEscrow.EscrowCreation.test.js b/smartcontracts/test/PaymentEscrow.EscrowCreation.test.js index b201e27..7fb70b6 100644 --- a/smartcontracts/test/PaymentEscrow.EscrowCreation.test.js +++ b/smartcontracts/test/PaymentEscrow.EscrowCreation.test.js @@ -62,3 +62,5 @@ describe("PaymentEscrow - Escrow Creation", function () { }); + + diff --git a/smartcontracts/test/PaymentEscrow.Expiration.test.js b/smartcontracts/test/PaymentEscrow.Expiration.test.js index 7a18203..044fe3c 100644 --- a/smartcontracts/test/PaymentEscrow.Expiration.test.js +++ b/smartcontracts/test/PaymentEscrow.Expiration.test.js @@ -38,3 +38,5 @@ describe("PaymentEscrow - Expiration Handling", function () { }); + + diff --git a/smartcontracts/test/PaymentEscrow.Integration.test.js b/smartcontracts/test/PaymentEscrow.Integration.test.js index 7eab302..aee0ed2 100644 --- a/smartcontracts/test/PaymentEscrow.Integration.test.js +++ b/smartcontracts/test/PaymentEscrow.Integration.test.js @@ -51,3 +51,5 @@ describe("PaymentEscrow - Integration Tests", function () { }); + + diff --git a/smartcontracts/test/PaymentEscrow.PartialRefund.test.js b/smartcontracts/test/PaymentEscrow.PartialRefund.test.js index 16afe97..ef9dba8 100644 --- a/smartcontracts/test/PaymentEscrow.PartialRefund.test.js +++ b/smartcontracts/test/PaymentEscrow.PartialRefund.test.js @@ -38,3 +38,5 @@ describe("PaymentEscrow - Partial Refund", function () { }); + + diff --git a/smartcontracts/test/PaymentEscrow.Release.test.js b/smartcontracts/test/PaymentEscrow.Release.test.js index 3660819..c86c7da 100644 --- a/smartcontracts/test/PaymentEscrow.Release.test.js +++ b/smartcontracts/test/PaymentEscrow.Release.test.js @@ -56,3 +56,5 @@ describe("PaymentEscrow - Release and Refund", function () { }); + + diff --git a/smartcontracts/test/PaymentEscrow.Security.test.js b/smartcontracts/test/PaymentEscrow.Security.test.js index 7a5cbc2..b20d324 100644 --- a/smartcontracts/test/PaymentEscrow.Security.test.js +++ b/smartcontracts/test/PaymentEscrow.Security.test.js @@ -46,3 +46,5 @@ describe("PaymentEscrow - Security Tests", function () { }); + + diff --git a/smartcontracts/test/RewardsIntegration.test.js b/smartcontracts/test/RewardsIntegration.test.js index b1c3d03..1ff3d90 100644 --- a/smartcontracts/test/RewardsIntegration.test.js +++ b/smartcontracts/test/RewardsIntegration.test.js @@ -145,3 +145,5 @@ describe("Rewards System Integration", function () { }); + + diff --git a/smartcontracts/test/RewardsManager.test.js b/smartcontracts/test/RewardsManager.test.js index 8e08277..768a37e 100644 --- a/smartcontracts/test/RewardsManager.test.js +++ b/smartcontracts/test/RewardsManager.test.js @@ -237,3 +237,5 @@ describe("RewardsManager", function () { }); + + diff --git a/smartcontracts/test/RewardsToken.test.js b/smartcontracts/test/RewardsToken.test.js index 5dd4225..4cb840a 100644 --- a/smartcontracts/test/RewardsToken.test.js +++ b/smartcontracts/test/RewardsToken.test.js @@ -169,3 +169,5 @@ describe("RewardsToken", function () { }); + + diff --git a/smartcontracts/test/helpers/testHelpers.js b/smartcontracts/test/helpers/testHelpers.js index 2360d93..76e0d94 100644 --- a/smartcontracts/test/helpers/testHelpers.js +++ b/smartcontracts/test/helpers/testHelpers.js @@ -42,3 +42,5 @@ module.exports = { }; + + diff --git a/smartcontracts/test/mocks/MockERC20.sol b/smartcontracts/test/mocks/MockERC20.sol index bb6f8f7..d9fd715 100644 --- a/smartcontracts/test/mocks/MockERC20.sol +++ b/smartcontracts/test/mocks/MockERC20.sol @@ -18,3 +18,5 @@ contract MockERC20 is ERC20 { } + + From 15cfc8c72285abdc213cb548b70274e7a3e21298 Mon Sep 17 00:00:00 2001 From: Uchechukwu <105205124+Uchechukwu-Ekezie@users.noreply.github.com> Date: Tue, 23 Dec 2025 13:35:08 -0800 Subject: [PATCH 39/93] Delete DISPUTE_RESOLUTION_SUMMARY.md --- DISPUTE_RESOLUTION_SUMMARY.md | 136 ---------------------------------- 1 file changed, 136 deletions(-) delete mode 100644 DISPUTE_RESOLUTION_SUMMARY.md diff --git a/DISPUTE_RESOLUTION_SUMMARY.md b/DISPUTE_RESOLUTION_SUMMARY.md deleted file mode 100644 index 39ab103..0000000 --- a/DISPUTE_RESOLUTION_SUMMARY.md +++ /dev/null @@ -1,136 +0,0 @@ -# Dispute Resolution System Implementation Summary - -## Overview - -This implementation provides a comprehensive dispute resolution system for the CarIn parking platform, featuring automated resolution based on on-chain timestamps and evidence, manual moderation, and voting mechanisms for complex disputes. - -## ✅ Acceptance Criteria Met - -### Smart Contracts -- ✅ **Dispute Resolution Smart Contract Logic**: Created `DisputeResolution.sol` with comprehensive dispute handling -- ✅ **Dispute Filing Functionality**: Implemented `fileDispute()` with evidence submission -- ✅ **Evidence Submission**: Support for multiple evidence types (images, videos, documents, timestamps) with IPFS integration -- ✅ **Automated Refund Logic**: Automated resolution based on timestamps (no-show, late check-in, early check-out) -- ✅ **Dispute Status Tracking**: Complete status tracking with resolution types (Automated, PendingVote, Manual) - -### Frontend -- ✅ **Dispute UI for Users**: Complete dispute filing form with evidence upload -- ✅ **Admin/Moderator Interface**: Admin panel for reviewing and resolving disputes -- ✅ **Dispute History and Status Display**: History component with filtering and detailed views -- ✅ **Evidence Display**: Component for viewing evidence (images, videos, documents) - -### Testing & Documentation -- ✅ **Tests for Dispute Scenarios**: Comprehensive test suite covering all scenarios -- ✅ **Documentation**: Complete documentation for smart contracts and frontend components - -## 📁 Files Created - -### Smart Contracts -- `smartcontracts/contracts/DisputeResolution.sol` - Main dispute resolution contract -- `smartcontracts/config/dispute-config.js` - Configuration parameters -- `smartcontracts/scripts/deploy-dispute-resolution.js` - Deployment script -- `smartcontracts/test/DisputeResolution.test.js` - Unit tests -- `smartcontracts/test/DisputeResolution.Integration.test.js` - Integration tests -- `smartcontracts/docs/DISPUTE_RESOLUTION.md` - Documentation - -### Frontend Components -- `frontend/components/disputes/FileDisputeForm.tsx` - Dispute filing form -- `frontend/components/disputes/DisputeCard.tsx` - Dispute card display -- `frontend/components/disputes/DisputeHistory.tsx` - Dispute history list -- `frontend/components/disputes/EvidenceDisplay.tsx` - Evidence viewer -- `frontend/components/disputes/CheckInOut.tsx` - Check-in/check-out component -- `frontend/components/disputes/AdminDisputePanel.tsx` - Admin moderation panel -- `frontend/components/disputes/DisputeStatusBadge.tsx` - Status badge -- `frontend/components/disputes/DisputeFilters.tsx` - Filter component -- `frontend/components/disputes/README.md` - Component documentation - -### Frontend Pages & Routes -- `frontend/app/disputes/page.tsx` - Main disputes page -- `frontend/app/admin/disputes/page.tsx` - Admin disputes page -- `frontend/app/api/ipfs/upload/route.ts` - IPFS upload API route - -### Frontend Utilities & Hooks -- `frontend/lib/contracts/disputeResolution.ts` - Contract ABI and types -- `frontend/lib/hooks/useDisputeResolution.ts` - React hooks for disputes -- `frontend/lib/utils/evidenceHandler.ts` - Evidence handling utilities -- `frontend/lib/utils/disputeCalculations.ts` - Calculation utilities - -## 🔑 Key Features - -### Automated Resolution -- **No-show Detection**: Automatic refund if check-in doesn't occur within 1 hour -- **Late Check-in**: Calculates refund percentage based on lateness (1% per minute, max 50%) -- **Early Check-out**: Partial refund for unused time (max 30%) - -### Evidence System -- Multiple evidence types supported -- IPFS integration for decentralized storage -- Hash verification on-chain -- Image, video, and document support - -### Voting Mechanism -- Authorized voter system -- Configurable thresholds (default: 80% for auto-resolution, 3 minimum votes) -- Weighted voting support (extensible to token-based) - -### Manual Resolution -- Moderator access control -- Full or partial refund approval -- Detailed evidence review - -## 🔧 Configuration - -Key configuration parameters: -- `maxResolutionTime`: 7 days -- `lateCheckInThreshold`: 30 minutes -- `noShowThreshold`: 1 hour -- `autoRefundThreshold`: 80% -- `minVotesForResolution`: 3 - -## 🚀 Deployment - -1. Deploy contracts: - ```bash - npm run deploy:dispute:alfajores - ``` - -2. Set environment variables: - - `NEXT_PUBLIC_DISPUTE_RESOLUTION_ADDRESS_ALFAJORES` - - `PAYMENT_ESCROW_ADDRESS` - - `PARKING_SPOT_ADDRESS` - -3. Add moderators and authorized voters via contract functions - -## 📊 Test Coverage - -- Unit tests for all contract functions -- Integration tests for complete workflows -- Edge case testing -- Gas optimization verification - -## 🔒 Security Features - -- Reentrancy protection -- Access control with roles -- IPFS hash verification -- On-chain timestamp validation -- Pausable contract functionality - -## 📝 Next Steps - -1. Deploy to testnet and verify contracts -2. Set up IPFS service (Pinata/Infura) -3. Configure moderator addresses -4. Test complete user flows -5. Add oracle integration for external verification (optional) - -## 🎯 Technical Notes - -- Evidence hashes stored on-chain, full evidence on IPFS -- Timestamps and check-in data used for automated decisions -- Voting mechanism extensible for complex disputes -- Oracle integration ready for external evidence verification - - - - From 20ddc4b565f73937378fcedfd1979a35930637c4 Mon Sep 17 00:00:00 2001 From: Uchechukwu <105205124+Uchechukwu-Ekezie@users.noreply.github.com> Date: Tue, 23 Dec 2025 13:35:23 -0800 Subject: [PATCH 40/93] Delete REWARDS_SYSTEM_SUMMARY.md --- REWARDS_SYSTEM_SUMMARY.md | 113 -------------------------------------- 1 file changed, 113 deletions(-) delete mode 100644 REWARDS_SYSTEM_SUMMARY.md diff --git a/REWARDS_SYSTEM_SUMMARY.md b/REWARDS_SYSTEM_SUMMARY.md deleted file mode 100644 index 285349e..0000000 --- a/REWARDS_SYSTEM_SUMMARY.md +++ /dev/null @@ -1,113 +0,0 @@ -# Token Rewards System Implementation Summary - -## Overview - -This feature implements a comprehensive token rewards system for the CarIn parking platform, allowing users to earn CARIN tokens for reporting inaccuracies, sharing spots, and making referrals. - -## Implementation Details - -### Smart Contracts - -1. **RewardsToken.sol** - - ERC20 token with governance support (ERC20Votes) - - Minting controlled by RewardsManager - - Burnable and pausable - - Maximum supply cap support - -2. **RewardsManager.sol** - - Manages reward distribution - - Handles report submission and validation - - Tracks referrals and spot sharing - - Implements anti-gaming mechanisms - - Supports oracle integration - -### Frontend Components - -1. **Rewards Dashboard** (`/rewards`) - - Display total balance and pending rewards - - Breakdown by reward type - - Claim individual or all rewards - -2. **Reward History** (`/rewards/history`) - - View all reports submitted - - View all referrals created - - Track claim status - -3. **Report Form Component** - - Submit inaccuracy reports - - Include evidence (IPFS hash or URL) - - Validation and error handling - -4. **Referral Share Component** - - Generate referral links - - Create referrals manually - - Share spots with friends - -### Key Features - -- **Anti-Gaming Mechanisms** - - Cooldown periods for reports, referrals, and claims - - Oracle validation for reports - - Configurable limits per user - -- **Reward Types** - - Inaccuracy Reports: 100 CARIN - - Spot Sharing: 50 CARIN - - Referrals: 25 CARIN - - Community Contributions: Variable - -- **Gas Optimization** - - Batch claiming available - - Efficient storage packing - - Custom errors for gas savings - -### Testing - -- Comprehensive unit tests for RewardsToken -- Comprehensive unit tests for RewardsManager -- Integration tests for end-to-end flows -- Gas optimization tests - -### Documentation - -- Complete system documentation -- Usage examples -- Configuration guide -- Security considerations - -## Deployment - -Contracts can be deployed using: -```bash -npm run deploy:rewards:alfajores -``` - -## Environment Variables Required - -``` -NEXT_PUBLIC_REWARDS_TOKEN_ADDRESS_ALFAJORES= -NEXT_PUBLIC_REWARDS_MANAGER_ADDRESS_ALFAJORES= -PARKING_SPOT_ADDRESS= -``` - -## Next Steps - -1. Deploy contracts to testnet -2. Configure oracle for report validation -3. Set up IPFS for evidence storage -4. Integrate with ParkingSpot contract events -5. Add referral tracking in booking flow - -## Acceptance Criteria Status - -✅ Design token rewards smart contract -✅ Implement reward distribution logic -✅ Create reporting mechanism for inaccurate spots -✅ Add spot sharing/referral rewards -✅ Implement reward claiming functionality -✅ Create rewards dashboard for users -✅ Add reward history and balance display -✅ Integrate with governance token (ERC20Votes) -✅ Write tests for reward logic -✅ Document reward criteria and amounts - From 6bb667fa5d8759a15129530712034898734d9ca7 Mon Sep 17 00:00:00 2001 From: Uchechukwu <105205124+Uchechukwu-Ekezie@users.noreply.github.com> Date: Tue, 23 Dec 2025 13:35:46 -0800 Subject: [PATCH 41/93] Delete BOOKING_SYSTEM_SUMMARY.md --- BOOKING_SYSTEM_SUMMARY.md | 83 --------------------------------------- 1 file changed, 83 deletions(-) delete mode 100644 BOOKING_SYSTEM_SUMMARY.md diff --git a/BOOKING_SYSTEM_SUMMARY.md b/BOOKING_SYSTEM_SUMMARY.md deleted file mode 100644 index ff79a81..0000000 --- a/BOOKING_SYSTEM_SUMMARY.md +++ /dev/null @@ -1,83 +0,0 @@ -# Booking System Implementation Summary - -## ✅ All Acceptance Criteria Met - -### Core Features -- ✅ Booking flow component/route (`/booking/[spotId]`) -- ✅ Display spot details (location, price, images, availability) -- ✅ Date and time picker for booking selection -- ✅ Booking summary with total cost breakdown -- ✅ Wallet connection check before booking -- ✅ Transaction signing integration ready (AppKit) -- ✅ Booking confirmation after successful transaction -- ✅ Booking history page (`/bookings`) -- ✅ Graceful error handling -- ✅ Loading states during transaction processing -- ✅ QR code display for spot access after booking - -### Technical Implementation -- ✅ React components with TypeScript -- ✅ Date/time selection with validation -- ✅ QR code generation using qrcode.react -- ✅ PaymentEscrow contract integration hooks -- ✅ Transaction status tracking -- ✅ Comprehensive error handling -- ✅ Responsive design with Tailwind CSS - -## 📦 Components Created (15+) - -### Booking Flow -1. BookingFlow - Main orchestrator -2. DateTimePicker - Date/time selection -3. BookingSummary - Cost breakdown -4. BookingConfirmation - Success page - -### Display & UI -5. SpotDetails - Spot information display -6. BookingCard - Booking history cards -7. BookingStatusBadge - Status indicators -8. QRCodeDisplay - QR code with download -9. BookingReceipt - Printable receipt - -### Utilities -10. TransactionStatus - Transaction states -11. ErrorHandler - Error display -12. LoadingStates - Loading components -13. BookingFilters - Search and filter -14. BookingNotification - Toast notifications -15. SpotAvailabilityChecker - Availability validation -16. BookingErrorBoundary - Error boundary - -## 🔧 Hooks & Utilities - -- useBookingTransaction - Create bookings -- useBookingValidation - Validate inputs -- useBookingHistory - Fetch bookings -- useWalletBooking - Wallet integration -- useTransactionStatus - Track transactions -- useSpotDetails - Fetch spot info -- bookingCalculations - Cost calculations -- qrCodeGenerator - QR code utilities -- errorMessages - Error handling -- bookingIntegration - Contract integration - -## 📝 Commits (20 total) - -All commits are logical, well-organized, and ready for integration. - -## 🚀 Ready for Integration - -Components are prepared for: -- Reown AppKit wallet connection -- ParkingSpot smart contract -- PaymentEscrow contract -- Real-time availability checks - -## Next Steps - -1. Connect to deployed smart contracts -2. Integrate Reown AppKit for wallet connection -3. Connect PaymentEscrow for payments -4. Test full booking flow -5. Deploy to testnet - From f696ccf5972f37fd1d99ae4c4de5de4347b5c92e Mon Sep 17 00:00:00 2001 From: "dev.uche" Date: Fri, 26 Dec 2025 22:01:52 +0100 Subject: [PATCH 42/93] feat: implement new directory structure --- README.md | 51 ++++++++++++++++++++++++++++++++++++++++ frontend/.nvmrc | 1 + frontend/.prettierignore | 3 +++ frontend/.prettierrc | 7 ++++++ frontend/jest.config.js | 5 +--- frontend/jest.setup.js | 1 + frontend/jsconfig.json | 8 +++++++ frontend/package.json | 4 ++++ frontend/tsconfig.json | 19 +++++---------- 9 files changed, 82 insertions(+), 17 deletions(-) create mode 100644 README.md create mode 100644 frontend/.nvmrc create mode 100644 frontend/.prettierignore create mode 100644 frontend/.prettierrc create mode 100644 frontend/jest.setup.js create mode 100644 frontend/jsconfig.json diff --git a/README.md b/README.md new file mode 100644 index 0000000..587f6eb --- /dev/null +++ b/README.md @@ -0,0 +1,51 @@ +# CarIn + +Welcome to CarIn, a decentralized solution for finding and booking parking spots. This README provides the necessary details to get the project up and running on your local machine. + +## Project Structure + +- **/frontend**: Contains the Next.js application. +- **/smart-contracts**: Holds the Solidity smart contracts. + +## Prerequisites + +- **Node.js**: Version `18.17.0` or higher. +- **npm**: Version `9.0.0` or higher. + +## Getting Started + +To begin, clone the repository and install the required dependencies for both the frontend and smart contracts. + +### Frontend Setup + +Navigate to the `frontend` directory and run the following commands: + +```bash +npm install +npm run dev +``` + +### Smart Contracts Setup + +In the `smart-contracts` directory, set up your environment by creating a `.env` file with the required variables (e.g., `PRIVATE_KEY`, `MUMBAI_RPC_URL`). Then, run: + +```bash +npm install +npx hardhat compile +``` + +## Available Scripts + +### Frontend + +- `npm run dev`: Starts the development server. +- `npm run build`: Builds the application for production. +- `npm run start`: Runs the production build. +- `npm run lint`: Lints the codebase. + +### Smart Contracts + +- `npx hardhat test`: Executes the test suite. +- `npx hardhat deploy --network mumbai`: Deploys contracts to the Mumbai testnet. + +By following these instructions, you'll have a fully functional local environment for both the frontend and smart contracts. \ No newline at end of file diff --git a/frontend/.nvmrc b/frontend/.nvmrc new file mode 100644 index 0000000..39d00c0 --- /dev/null +++ b/frontend/.nvmrc @@ -0,0 +1 @@ +18.17.0 \ No newline at end of file diff --git a/frontend/.prettierignore b/frontend/.prettierignore new file mode 100644 index 0000000..5e353c5 --- /dev/null +++ b/frontend/.prettierignore @@ -0,0 +1,3 @@ +.next +node_modules +package-lock.json \ No newline at end of file diff --git a/frontend/.prettierrc b/frontend/.prettierrc new file mode 100644 index 0000000..0c91675 --- /dev/null +++ b/frontend/.prettierrc @@ -0,0 +1,7 @@ +{ + "semi": true, + "singleQuote": true, + "trailingComma": "es5", + "arrowParens": "always", + "printWidth": 80 +} \ No newline at end of file diff --git a/frontend/jest.config.js b/frontend/jest.config.js index 5ffa5a5..a714176 100644 --- a/frontend/jest.config.js +++ b/frontend/jest.config.js @@ -4,7 +4,4 @@ module.exports = { moduleNameMapper: { '^@/(.*)$': '/$1', }, - transform: { - '^.+\\.tsx?$': 'ts-jest', - }, -}; +}; \ No newline at end of file diff --git a/frontend/jest.setup.js b/frontend/jest.setup.js new file mode 100644 index 0000000..331666c --- /dev/null +++ b/frontend/jest.setup.js @@ -0,0 +1 @@ +import '@testing-library/jest-dom'; \ No newline at end of file diff --git a/frontend/jsconfig.json b/frontend/jsconfig.json new file mode 100644 index 0000000..e3b9775 --- /dev/null +++ b/frontend/jsconfig.json @@ -0,0 +1,8 @@ +{ + "compilerOptions": { + "baseUrl": ".", + "paths": { + "@/*": ["./*"] + } + } +} \ No newline at end of file diff --git a/frontend/package.json b/frontend/package.json index 12b4129..92daa62 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -3,6 +3,10 @@ "version": "1.0.0", "description": "Frontend application for CarIn - Decentralized parking spot booking", "private": true, + "engines": { + "node": ">=18.0.0", + "npm": ">=9.0.0" + }, "scripts": { "dev": "next dev", "build": "next build", diff --git a/frontend/tsconfig.json b/frontend/tsconfig.json index 2b90f0d..2b808f3 100644 --- a/frontend/tsconfig.json +++ b/frontend/tsconfig.json @@ -1,31 +1,24 @@ { "compilerOptions": { - "target": "ES2020", + "target": "es5", "lib": ["dom", "dom.iterable", "esnext"], "allowJs": true, "skipLibCheck": true, "strict": true, + "forceConsistentCasingInFileNames": true, "noEmit": true, "esModuleInterop": true, "module": "esnext", - "moduleResolution": "bundler", + "moduleResolution": "node", "resolveJsonModule": true, "isolatedModules": true, "jsx": "preserve", "incremental": true, - "plugins": [ - { - "name": "next" - } - ], + "baseUrl": ".", "paths": { "@/*": ["./*"] } }, - "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], + "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"], "exclude": ["node_modules"] -} - - - - +} \ No newline at end of file From 0a7b99bec7f669d4eeb7c16487c8c63a43510acb Mon Sep 17 00:00:00 2001 From: "dev.uche" Date: Fri, 26 Dec 2025 22:02:34 +0100 Subject: [PATCH 43/93] docs: add SECURITY.md --- SECURITY.md | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 SECURITY.md diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..bf0ba2c --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,11 @@ +# Security Policy + +## Reporting a Vulnerability + +If you discover a security vulnerability, please report it to us as soon as possible. We appreciate your efforts to disclose your findings responsibly. + +To report a vulnerability, please email us at [security@example.com](mailto:security@example.com). We will acknowledge your email within 48 hours and will work with you to resolve the issue. + +We kindly ask you not to disclose the vulnerability publicly until we have had a chance to address it. We will do our best to resolve the issue as quickly as possible and will keep you updated on our progress. + +Thank you for helping to keep our project secure. \ No newline at end of file From 99b896eed8a761c495a8e88080900c13f577e572 Mon Sep 17 00:00:00 2001 From: "dev.uche" Date: Fri, 26 Dec 2025 22:03:01 +0100 Subject: [PATCH 44/93] docs: add CODE_OF_CONDUCT.md --- CODE_OF_CONDUCT.md | 76 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 CODE_OF_CONDUCT.md diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..29c3f7f --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,76 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our community include: + +* Demonstrating empathy and kindness toward other people +* Being respectful of differing opinions, viewpoints, and experiences +* Giving and gracefully accepting constructive feedback +* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience +* Focusing on what is best not just for us as individuals, but for the overall community + +Examples of unacceptable behavior include: + +* The use of sexualized language or imagery, and sexual attention or advances of any kind +* Trolling, insulting or derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or email address, without their explicit permission +* Other conduct which could reasonably be considered inappropriate in a professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at [INSERT CONTACT METHOD]. All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series of actions. + +**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interaction in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within the community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0, available at [https://www.contributor-covenant.org/version/2/0/code_of_conduct.html][v2.0]. + +[homepage]: https://www.contributor-covenant.org +[v2.0]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html From ef4de5a85aa34330b934c27ae9b7fcac346dd90d Mon Sep 17 00:00:00 2001 From: "dev.uche" Date: Fri, 26 Dec 2025 22:03:24 +0100 Subject: [PATCH 45/93] docs: add CONTRIBUTING.md --- CONTRIBUTING.md | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..93630f6 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,37 @@ +# Contributing to CarIn + +First off, thank you for considering contributing to CarIn! It's people like you that make CarIn such a great tool. + +## Where do I go from here? + +If you've noticed a bug or have a question, [search the issue tracker](https://github.com/search?q=repo%3Auser%2Frepo+is%3Aissue+label%3Abug) to see if someone else has already created a ticket. If not, go ahead and [make one](https://github.com/user/repo/issues/new)! + +## Fork & create a branch + +If you're going to be working on a bug or feature, please fork the repository and create a new branch. This will make it easier to review and merge your changes. + +## Get the code + +```bash +git clone https://github.com/your-username/CarIn.git +cd CarIn +git checkout -b my-new-feature +``` + +## Run the tests + +```bash +npm test +``` + +## Submit a pull request + +When you're ready to submit a pull request, please make sure to do the following: + +* Run the tests and make sure they all pass. +* Update the documentation if you've made any changes to the API. +* Make sure your code is formatted correctly. + +## Code of Conduct + +By participating in this project, you agree to abide by the [Code of Conduct](CODE_OF_CONDUCT.md). From 821b59aa1f69dc183c083eac45435ad307a18e1a Mon Sep 17 00:00:00 2001 From: "dev.uche" Date: Fri, 26 Dec 2025 22:03:39 +0100 Subject: [PATCH 46/93] docs: add LICENSE --- LICENSE | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..5cdd3ee --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 CarIn + +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. From be8f43eb8ed7217d507df390263cca84d6cb6fdd Mon Sep 17 00:00:00 2001 From: "dev.uche" Date: Fri, 26 Dec 2025 22:04:04 +0100 Subject: [PATCH 47/93] docs: add PULL_REQUEST_TEMPLATE.md --- .github/PULL_REQUEST_TEMPLATE.md | 38 ++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/PULL_REQUEST_TEMPLATE.md diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..863e6da --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,38 @@ +## Description + +Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. + +Fixes # (issue) + +## Type of change + +Please delete options that are not relevant. + +- [ ] Bug fix (non-breaking change which fixes an issue) +- [ ] New feature (non-breaking change which adds functionality) +- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) +- [ ] This change requires a documentation update + +## How Has This Been Tested? + +Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration + +- [ ] Test A +- [ ] Test B + +**Test Configuration**: +* Firmware version: +* Hardware: +* Toolchain: +* SDK: + +## Checklist: + +- [ ] My code follows the style guidelines of this project +- [ ] I have performed a self-review of my own code +- [ ] I have commented my code, particularly in hard-to-understand areas +- [ ] I have made corresponding changes to the documentation +- [ ] My changes generate no new warnings +- [ ] I have added tests that prove my fix is effective or that my feature works +- [ ] New and existing unit tests pass locally with my changes +- [ ] Any dependent changes have been merged and published in downstream modules From 823bd26be42d84da3f747baf81c803a23cddb9b3 Mon Sep 17 00:00:00 2001 From: "dev.uche" Date: Fri, 26 Dec 2025 22:04:31 +0100 Subject: [PATCH 48/93] docs: add bug_report.md --- .github/ISSUE_TEMPLATE/bug_report.md | 38 ++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..dd84ea7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,38 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: '' +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Desktop (please complete the following information):** + - OS: [e.g. iOS] + - Browser [e.g. chrome, safari] + - Version [e.g. 22] + +**Smartphone (please complete the following information):** + - Device: [e.g. iPhone6] + - OS: [e.g. iOS8.1] + - Browser [e.g. stock browser, safari] + - Version [e.g. 22] + +**Additional context** +Add any other context about the problem here. From 7d19a0726555add08f722ec43d032760df83b8d8 Mon Sep 17 00:00:00 2001 From: "dev.uche" Date: Fri, 26 Dec 2025 22:04:47 +0100 Subject: [PATCH 49/93] docs: add feature_request.md --- .github/ISSUE_TEMPLATE/feature_request.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..bbcbbe7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: '' +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. From a885f4c06cf8f840e0c0664005936af6fd310f66 Mon Sep 17 00:00:00 2001 From: "dev.uche" Date: Fri, 26 Dec 2025 22:05:26 +0100 Subject: [PATCH 50/93] feat: add next.config.js --- frontend/next.config.js | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/frontend/next.config.js b/frontend/next.config.js index 7d92e44..dc07dc6 100644 --- a/frontend/next.config.js +++ b/frontend/next.config.js @@ -2,19 +2,9 @@ const nextConfig = { reactStrictMode: true, swcMinify: true, - webpack: (config) => { - config.resolve.fallback = { - ...config.resolve.fallback, - fs: false, - net: false, - tls: false, - }; - return config; + images: { + domains: ['ipfs.io'], }, }; module.exports = nextConfig; - - - - From 2dccf99dd67f925c624a81f5ea7cf98acb4b7131 Mon Sep 17 00:00:00 2001 From: "dev.uche" Date: Fri, 26 Dec 2025 22:05:40 +0100 Subject: [PATCH 51/93] feat: add tailwind.config.js --- frontend/tailwind.config.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 frontend/tailwind.config.js diff --git a/frontend/tailwind.config.js b/frontend/tailwind.config.js new file mode 100644 index 0000000..e32841a --- /dev/null +++ b/frontend/tailwind.config.js @@ -0,0 +1,12 @@ +/** @type {import('tailwindcss').Config} */ +module.exports = { + content: [ + './app/**/*.{js,ts,jsx,tsx,mdx}', + './pages/**/*.{js,ts,jsx,tsx,mdx}', + './components/**/*.{js,ts,jsx,tsx,mdx}', + ], + theme: { + extend: {}, + }, + plugins: [], +}; From 6fdb0ffd1b3862340ee06ea04788d10a97e29cf5 Mon Sep 17 00:00:00 2001 From: "dev.uche" Date: Fri, 26 Dec 2025 22:05:53 +0100 Subject: [PATCH 52/93] feat: add postcss.config.js --- frontend/postcss.config.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/frontend/postcss.config.js b/frontend/postcss.config.js index a435474..12a703d 100644 --- a/frontend/postcss.config.js +++ b/frontend/postcss.config.js @@ -4,7 +4,3 @@ module.exports = { autoprefixer: {}, }, }; - - - - From 959b5bed480ec712bac5b6a1ed0c0f437c62f1ab Mon Sep 17 00:00:00 2001 From: "dev.uche" Date: Fri, 26 Dec 2025 22:06:07 +0100 Subject: [PATCH 53/93] feat: add .env.example --- frontend/.env.example | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/frontend/.env.example b/frontend/.env.example index b537f83..95e2479 100644 --- a/frontend/.env.example +++ b/frontend/.env.example @@ -1,15 +1 @@ -# WalletConnect / Reown AppKit Configuration -NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID=your_walletconnect_project_id_here - -# Celo Network Configuration -NEXT_PUBLIC_CELO_RPC_URL=https://alfajores-forno.celo-testnet.org -NEXT_PUBLIC_CELO_MAINNET_RPC_URL=https://forno.celo.org - -# Contract Addresses (update after deployment) -NEXT_PUBLIC_PARKING_SPOT_CONTRACT_ADDRESS= -NEXT_PUBLIC_PAYMENT_ESCROW_CONTRACT_ADDRESS= - -# IPFS Configuration (optional) -NEXT_PUBLIC_IPFS_GATEWAY=https://ipfs.io/ipfs/ -NEXT_PUBLIC_PINATA_JWT= -NEXT_PUBLIC_NFT_STORAGE_TOKEN= +NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID= From db3bce48a79338e014a524a7f80f97474059d127 Mon Sep 17 00:00:00 2001 From: "dev.uche" Date: Fri, 26 Dec 2025 22:06:22 +0100 Subject: [PATCH 54/93] feat: add .gitignore --- frontend/.gitignore | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 frontend/.gitignore diff --git a/frontend/.gitignore b/frontend/.gitignore new file mode 100644 index 0000000..1437c53 --- /dev/null +++ b/frontend/.gitignore @@ -0,0 +1,34 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.pnp +.pnp.js + +# testing +/coverage + +# next.js +/.next/ +/out/ + +# production +/build + +# misc +.DS_Store +*.pem + +# debug +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# local env files +.env.local +.env.development.local +.env.test.local +.env.production.local + +# vercel +.vercel From a1a0a4a1cf6b090c2c5f17802b3d34ef3907db7f Mon Sep 17 00:00:00 2001 From: "dev.uche" Date: Fri, 26 Dec 2025 22:07:58 +0100 Subject: [PATCH 55/93] feat: add next-env.d.ts --- frontend/next-env.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/next-env.d.ts b/frontend/next-env.d.ts index 40c3d68..4f11a03 100644 --- a/frontend/next-env.d.ts +++ b/frontend/next-env.d.ts @@ -2,4 +2,4 @@ /// // NOTE: This file should not be edited -// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information. +// see https://nextjs.org/docs/basic-features/typescript for more information. From 8f9bcc74af4859084bff86b09dd0a15295d7118a Mon Sep 17 00:00:00 2001 From: "dev.uche" Date: Fri, 26 Dec 2025 22:08:55 +0100 Subject: [PATCH 56/93] feat: add .editorconfig --- .editorconfig | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..c6c8b36 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,9 @@ +root = true + +[*] +indent_style = space +indent_size = 2 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true From 7838f1af61e2fcd6226d373bd79824757b1d5426 Mon Sep 17 00:00:00 2001 From: "dev.uche" Date: Sat, 27 Dec 2025 02:51:38 +0100 Subject: [PATCH 57/93] style: add globals.css --- frontend/styles/globals.css | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 frontend/styles/globals.css diff --git a/frontend/styles/globals.css b/frontend/styles/globals.css new file mode 100644 index 0000000..fd81e88 --- /dev/null +++ b/frontend/styles/globals.css @@ -0,0 +1,27 @@ +@tailwind base; +@tailwind components; +@tailwind utilities; + +:root { + --foreground-rgb: 0, 0, 0; + --background-start-rgb: 214, 219, 220; + --background-end-rgb: 255, 255, 255; +} + +@media (prefers-color-scheme: dark) { + :root { + --foreground-rgb: 255, 255, 255; + --background-start-rgb: 0, 0, 0; + --background-end-rgb: 0, 0, 0; + } +} + +body { + color: rgb(var(--foreground-rgb)); + background: linear-gradient( + to bottom, + transparent, + rgb(var(--background-end-rgb)) + ) + rgb(var(--background-start-rgb)); +} From e134cc859cc8e3436ef843e9ae5cd3dcf06b27c0 Mon Sep 17 00:00:00 2001 From: "dev.uche" Date: Sat, 27 Dec 2025 02:55:11 +0100 Subject: [PATCH 58/93] style: add Home.module.css --- frontend/styles/Home.module.css | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 frontend/styles/Home.module.css diff --git a/frontend/styles/Home.module.css b/frontend/styles/Home.module.css new file mode 100644 index 0000000..cca6319 --- /dev/null +++ b/frontend/styles/Home.module.css @@ -0,0 +1,8 @@ +.main { + display: flex; + flex-direction: column; + justify-content: space-between; + align-items: center; + padding: 6rem; + min-height: 100vh; +} From 15e01176b66333f69c887919ac36a34cd02668bb Mon Sep 17 00:00:00 2001 From: "dev.uche" Date: Sat, 27 Dec 2025 02:58:11 +0100 Subject: [PATCH 59/93] feat: add _app.tsx --- frontend/pages/_app.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 frontend/pages/_app.tsx diff --git a/frontend/pages/_app.tsx b/frontend/pages/_app.tsx new file mode 100644 index 0000000..f3f9628 --- /dev/null +++ b/frontend/pages/_app.tsx @@ -0,0 +1,8 @@ +import '../styles/globals.css'; +import type { AppProps } from 'next/app'; + +function MyApp({ Component, pageProps }: AppProps) { + return ; +} + +export default MyApp; From 89994250d67fcb2934acd09ef14d5880d54a6338 Mon Sep 17 00:00:00 2001 From: "dev.uche" Date: Sat, 27 Dec 2025 03:01:11 +0100 Subject: [PATCH 60/93] feat: add _document.tsx --- frontend/pages/_document.tsx | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 frontend/pages/_document.tsx diff --git a/frontend/pages/_document.tsx b/frontend/pages/_document.tsx new file mode 100644 index 0000000..e1e9cbb --- /dev/null +++ b/frontend/pages/_document.tsx @@ -0,0 +1,13 @@ +import { Html, Head, Main, NextScript } from 'next/document'; + +export default function Document() { + return ( + + + +
+ + + + ); +} From 4c76ced241d8ac1d7febe3a7bb03d147507a8d58 Mon Sep 17 00:00:00 2001 From: "dev.uche" Date: Sat, 27 Dec 2025 03:08:28 +0100 Subject: [PATCH 61/93] feat: add index.tsx --- frontend/pages/index.tsx | 69 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 frontend/pages/index.tsx diff --git a/frontend/pages/index.tsx b/frontend/pages/index.tsx new file mode 100644 index 0000000..de2ca73 --- /dev/null +++ b/frontend/pages/index.tsx @@ -0,0 +1,69 @@ +import Head from 'next/head'; +import Image from 'next/image'; +import styles from '../styles/Home.module.css'; + +export default function Home() { + return ( + + ); +} From f7921746b3b9bc78e076152797a45b6bdafad613 Mon Sep 17 00:00:00 2001 From: "dev.uche" Date: Sat, 27 Dec 2025 03:12:19 +0100 Subject: [PATCH 62/93] feat: add hello api route --- frontend/pages/api/hello.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 frontend/pages/api/hello.ts diff --git a/frontend/pages/api/hello.ts b/frontend/pages/api/hello.ts new file mode 100644 index 0000000..89e4d6b --- /dev/null +++ b/frontend/pages/api/hello.ts @@ -0,0 +1,13 @@ +// Next.js API route support: https://nextjs.org/docs/api-routes/introduction +import type { NextApiRequest, NextApiResponse } from 'next'; + +type Data = { + name: string; +}; + +export default function handler( + req: NextApiRequest, + res: NextApiResponse +) { + res.status(200).json({ name: 'John Doe' }); +} From 342c9813ffe44a43726ffb84c4f139d3db260b36 Mon Sep 17 00:00:00 2001 From: "dev.uche" Date: Sat, 27 Dec 2025 03:12:53 +0100 Subject: [PATCH 63/93] feat: add favicon and vercel logo --- frontend/public/favicon.ico | 0 frontend/public/vercel.svg | 3 +++ 2 files changed, 3 insertions(+) create mode 100644 frontend/public/favicon.ico create mode 100644 frontend/public/vercel.svg diff --git a/frontend/public/favicon.ico b/frontend/public/favicon.ico new file mode 100644 index 0000000..e69de29 diff --git a/frontend/public/vercel.svg b/frontend/public/vercel.svg new file mode 100644 index 0000000..ca2379c --- /dev/null +++ b/frontend/public/vercel.svg @@ -0,0 +1,3 @@ + + + From ab0c3f6747c1dd6766d09cb091e7cb93e58105a1 Mon Sep 17 00:00:00 2001 From: "dev.uche" Date: Sat, 27 Dec 2025 03:15:05 +0100 Subject: [PATCH 64/93] feat: add Header and Footer components --- frontend/components/Footer.tsx | 9 +++++++++ frontend/components/Header.tsx | 15 +++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 frontend/components/Footer.tsx create mode 100644 frontend/components/Header.tsx diff --git a/frontend/components/Footer.tsx b/frontend/components/Footer.tsx new file mode 100644 index 0000000..09f9b4a --- /dev/null +++ b/frontend/components/Footer.tsx @@ -0,0 +1,9 @@ +const Footer = () => { + return ( +
+

© 2022

+
+ ); +}; + +export default Footer; diff --git a/frontend/components/Header.tsx b/frontend/components/Header.tsx new file mode 100644 index 0000000..5fe51da --- /dev/null +++ b/frontend/components/Header.tsx @@ -0,0 +1,15 @@ +import Link from 'next/link'; + +const Header = () => { + return ( +
+ +
+ ); +}; + +export default Header; From f74560df6e1cb17480d423e299b2e67c5efe9ee4 Mon Sep 17 00:00:00 2001 From: "dev.uche" Date: Sat, 27 Dec 2025 03:23:49 +0100 Subject: [PATCH 65/93] feat: add Layout component --- frontend/components/Layout.tsx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 frontend/components/Layout.tsx diff --git a/frontend/components/Layout.tsx b/frontend/components/Layout.tsx new file mode 100644 index 0000000..f782e90 --- /dev/null +++ b/frontend/components/Layout.tsx @@ -0,0 +1,14 @@ +import Header from './Header'; +import Footer from './Footer'; + +const Layout = ({ children }) => { + return ( + <> +
+
{children}
+
+ + ); +}; + +export default Layout; From 4e8989b3416a89b408fea46a0fa83d3d01e067af Mon Sep 17 00:00:00 2001 From: "dev.uche" Date: Sat, 27 Dec 2025 03:24:48 +0100 Subject: [PATCH 66/93] feat: use Layout component in _app.tsx --- frontend/pages/_app.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/frontend/pages/_app.tsx b/frontend/pages/_app.tsx index f3f9628..82d3850 100644 --- a/frontend/pages/_app.tsx +++ b/frontend/pages/_app.tsx @@ -1,8 +1,13 @@ import '../styles/globals.css'; import type { AppProps } from 'next/app'; +import Layout from '../components/Layout'; function MyApp({ Component, pageProps }: AppProps) { - return ; + return ( + + + + ); } export default MyApp; From f70fa6879407da4e04d60da0b03cc11b11cb154c Mon Sep 17 00:00:00 2001 From: "dev.uche" Date: Sat, 27 Dec 2025 03:34:51 +0100 Subject: [PATCH 67/93] feat: add constants --- frontend/constants/index.ts | 1 + 1 file changed, 1 insertion(+) create mode 100644 frontend/constants/index.ts diff --git a/frontend/constants/index.ts b/frontend/constants/index.ts new file mode 100644 index 0000000..f3f91ff --- /dev/null +++ b/frontend/constants/index.ts @@ -0,0 +1 @@ +export const SITE_NAME = 'CarIn'; From 5afbd0c1dd548217bd46c6ae7efe79b7fe847576 Mon Sep 17 00:00:00 2001 From: Uchechukwu <105205124+Uchechukwu-Ekezie@users.noreply.github.com> Date: Sat, 27 Dec 2025 18:51:09 +0100 Subject: [PATCH 68/93] update --- frontend/APPKIT_SETUP.md | 2 +- smartcontracts/README.md | 2 +- smartcontracts/README_ESCROW.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/APPKIT_SETUP.md b/frontend/APPKIT_SETUP.md index ce6ab85..d614ace 100644 --- a/frontend/APPKIT_SETUP.md +++ b/frontend/APPKIT_SETUP.md @@ -5,7 +5,7 @@ This guide explains how to set up Reown AppKit (formerly WalletConnect) for the ## Prerequisites - Node.js 18+ installed -- A WalletConnect Cloud account (free at https://cloud.reown.com) +- A WalletConnect Cloud account (free at https://c ## Setup Steps diff --git a/smartcontracts/README.md b/smartcontracts/README.md index 2efe40e..aaa2533 100644 --- a/smartcontracts/README.md +++ b/smartcontracts/README.md @@ -1,6 +1,6 @@ # CarIn Smart Contracts -Smart contracts for the CarIn decentralized parking spot booking platform on Celo blockchain. +Smart contracts for the CarIn blockchain. ## Contracts diff --git a/smartcontracts/README_ESCROW.md b/smartcontracts/README_ESCROW.md index 422a87c..75d2742 100644 --- a/smartcontracts/README_ESCROW.md +++ b/smartcontracts/README_ESCROW.md @@ -6,7 +6,7 @@ Enhanced payment escrow contract for CarIn parking platform with comprehensive f ✅ **Multi-Token Support**: Native CELO, cUSD, and cEUR ✅ **Automatic Releases**: Time-based automatic escrow release -✅ **Partial Refunds**: Split refunds between payer and payee +✅ **Partial Refunds**: Split refunds ✅ **Dispute Resolution**: On-chain dispute filing and resolution ✅ **Expiration Handling**: Automatic refund for expired escrows ✅ **Security**: Reentrancy guards and SafeERC20 From 94a03d721f54aeffc3bbd0788a63804f4233b3fc Mon Sep 17 00:00:00 2001 From: Uchechukwu <105205124+Uchechukwu-Ekezie@users.noreply.github.com> Date: Sat, 27 Dec 2025 18:52:21 +0100 Subject: [PATCH 69/93] test --- frontend/.env.example | 2 +- frontend/APPKIT_SETUP.md | 2 +- frontend/README.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/.env.example b/frontend/.env.example index b537f83..9bb8161 100644 --- a/frontend/.env.example +++ b/frontend/.env.example @@ -3,7 +3,7 @@ NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID=your_walletconnect_project_id_here # Celo Network Configuration NEXT_PUBLIC_CELO_RPC_URL=https://alfajores-forno.celo-testnet.org -NEXT_PUBLIC_CELO_MAINNET_RPC_URL=https://forno.celo.org +NEXT_PUBLIC_CELO_MAINNET_Rorg # Contract Addresses (update after deployment) NEXT_PUBLIC_PARKING_SPOT_CONTRACT_ADDRESS= diff --git a/frontend/APPKIT_SETUP.md b/frontend/APPKIT_SETUP.md index d614ace..85f796c 100644 --- a/frontend/APPKIT_SETUP.md +++ b/frontend/APPKIT_SETUP.md @@ -13,7 +13,7 @@ This guide explains how to set up Reown AppKit (formerly WalletConnect) for the 1. Go to [Reown Cloud](https://cloud.reown.com) and sign in (or create an account) 2. Create a new project or select an existing one -3. Copy your **Project ID** from the project dashboard +3. ### 2. Configure Environment Variables diff --git a/frontend/README.md b/frontend/README.md index 3b11d08..00e3b9a 100644 --- a/frontend/README.md +++ b/frontend/README.md @@ -2,7 +2,7 @@ Frontend application for CarIn - Decentralized parking spot booking platform. -## Tech Stack +## - **Framework**: Next.js 14 with App Router - **Language**: TypeScript From 3e7ad9503ffe24fb2feef75acf00aeb2970f23cb Mon Sep 17 00:00:00 2001 From: Uchechukwu <105205124+Uchechukwu-Ekezie@users.noreply.github.com> Date: Sun, 28 Dec 2025 20:04:05 +0100 Subject: [PATCH 70/93] update the app wallet connect feature --- frontend/components/rewards/ReferralShare.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/components/rewards/ReferralShare.tsx b/frontend/components/rewards/ReferralShare.tsx index b9a961d..d1ae12b 100644 --- a/frontend/components/rewards/ReferralShare.tsx +++ b/frontend/components/rewards/ReferralShare.tsx @@ -65,7 +65,7 @@ export default function ReferralShare({ spotId }: ReferralShareProps) { if (!isConnected) { return (
- Please connect your wallet to share spots + Please connect your wallet to share s
); } From 45a4b7808b83ba83e43b9e0f73041df6d7df9b25 Mon Sep 17 00:00:00 2001 From: Uchechukwu <105205124+Uchechukwu-Ekezie@users.noreply.github.com> Date: Sun, 28 Dec 2025 20:05:28 +0100 Subject: [PATCH 71/93] neat --- frontend/APPKIT_SETUP.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/frontend/APPKIT_SETUP.md b/frontend/APPKIT_SETUP.md index 85f796c..b2c62c2 100644 --- a/frontend/APPKIT_SETUP.md +++ b/frontend/APPKIT_SETUP.md @@ -15,8 +15,6 @@ This guide explains how to set up Reown AppKit (formerly WalletConnect) for the 2. Create a new project or select an existing one 3. -### 2. Configure Environment Variables - Create a `.env.local` file in the `frontend/` directory: ```bash From c92cad49764f67c81719394ea817276246343339 Mon Sep 17 00:00:00 2001 From: Uchechukwu <105205124+Uchechukwu-Ekezie@users.noreply.github.com> Date: Thu, 1 Jan 2026 22:07:46 +0100 Subject: [PATCH 72/93] update --- frontend/APPKIT_SETUP.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/frontend/APPKIT_SETUP.md b/frontend/APPKIT_SETUP.md index b2c62c2..4ace9c5 100644 --- a/frontend/APPKIT_SETUP.md +++ b/frontend/APPKIT_SETUP.md @@ -18,8 +18,7 @@ This guide explains how to set up Reown AppKit (formerly WalletConnect) for the Create a `.env.local` file in the `frontend/` directory: ```bash -# WalletConnect / Reown AppKit Configuration -NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID=your_project_id_here +# WalletConnect / Reown AppONNECT_PROJECT_ID=your_project_id_here # Celo Network Configuration NEXT_PUBLIC_CELO_RPC_URL=https://alfajores-forno.celo-testnet.org From 503d95f902f373a5a371c904cce72c74d55df7e2 Mon Sep 17 00:00:00 2001 From: Uchechukwu <105205124+Uchechukwu-Ekezie@users.noreply.github.com> Date: Thu, 1 Jan 2026 22:08:34 +0100 Subject: [PATCH 73/93] hel --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 93630f6..d036bae 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,6 +1,6 @@ # Contributing to CarIn -First off, thank you for considering contributing to CarIn! It's people like you that make CarIn such a great tool. +First off, thank you for considering contributing to CarInt tool. ## Where do I go from here? From d5648e5f206b03625d17827b30826bd1c9a56342 Mon Sep 17 00:00:00 2001 From: Uchechukwu <105205124+Uchechukwu-Ekezie@users.noreply.github.com> Date: Thu, 1 Jan 2026 22:09:06 +0100 Subject: [PATCH 74/93] update --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d036bae..44f4ac4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,7 +4,7 @@ First off, thank you for considering contributing to CarInt tool. ## Where do I go from here? -If you've noticed a bug or have a question, [search the issue tracker](https://github.com/search?q=repo%3Auser%2Frepo+is%3Aissue+label%3Abug) to see if someone else has already created a ticket. If not, go ahead and [make one](https://github.com/user/repo/issues/new)! +If you've noticed a bug or have a question, [search the issue tracker](https://github.com/search?q=repo%3Auser%2Frepo+is%3Aissue+label%3Abug) to see if someone else has already created a ticket. no If not, go ahead and [make one](https://github.com/user/repo/issues/new)! ## Fork & create a branch From adfc21e95ec082bd148b80331fc597baa2af3090 Mon Sep 17 00:00:00 2001 From: Uchechukwu <105205124+Uchechukwu-Ekezie@users.noreply.github.com> Date: Sun, 11 Jan 2026 20:23:11 +0100 Subject: [PATCH 75/93] Delete LICENSE --- LICENSE | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 LICENSE diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 5cdd3ee..0000000 --- a/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2023 CarIn - -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. From 171ea12a300974d340ecd477ef1fb810020834a7 Mon Sep 17 00:00:00 2001 From: Uchechukwu <105205124+Uchechukwu-Ekezie@users.noreply.github.com> Date: Sun, 11 Jan 2026 20:25:09 +0100 Subject: [PATCH 76/93] Update README.md --- smartcontracts/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/smartcontracts/README.md b/smartcontracts/README.md index aaa2533..59232d7 100644 --- a/smartcontracts/README.md +++ b/smartcontracts/README.md @@ -2,6 +2,8 @@ Smart contracts for the CarIn blockchain. +adding more functionality and updates on solidarity + ## Contracts - **ParkingSpot.sol** - Manages parking spot listings, bookings, and ownership From 140572c3b31b6580d5b77c4da57124174c806bf4 Mon Sep 17 00:00:00 2001 From: "dev.uche" Date: Mon, 12 Jan 2026 17:18:23 +0100 Subject: [PATCH 77/93] fix: add @react-native-async-storage/async-storage dependency for MetaMask SDK compatibility --- frontend/package-lock.json | 3218 +++++------------------------------- frontend/package.json | 1 + 2 files changed, 381 insertions(+), 2838 deletions(-) diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 6cad079..98c1f0f 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -8,6 +8,7 @@ "name": "carin-frontend", "version": "1.0.0", "dependencies": { + "@react-native-async-storage/async-storage": "^2.2.0", "@reown/appkit": "^1.8.15", "@reown/appkit-adapter-wagmi": "^1.8.15", "@tanstack/react-query": "^5.0.0", @@ -40,6 +41,10 @@ "tailwindcss": "^3.3.0", "ts-jest": "^29.4.6", "typescript": "^5.0.0" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=9.0.0" } }, "node_modules/@adraffy/ens-normalize": { @@ -648,40 +653,6 @@ "zod": "^3.24.4" } }, - "node_modules/@coinbase/wallet-sdk": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/@coinbase/wallet-sdk/-/wallet-sdk-4.3.6.tgz", - "integrity": "sha512-4q8BNG1ViL4mSAAvPAtpwlOs1gpC+67eQtgIwNvT3xyeyFFd+guwkc8bcX5rTmQhXpqnhzC4f0obACbP9CqMSA==", - "license": "Apache-2.0", - "optional": true, - "peer": true, - "dependencies": { - "@noble/hashes": "1.4.0", - "clsx": "1.2.1", - "eventemitter3": "5.0.1", - "idb-keyval": "6.2.1", - "ox": "0.6.9", - "preact": "10.24.2", - "viem": "^2.27.2", - "zustand": "5.0.3" - } - }, - "node_modules/@ecies/ciphers": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/@ecies/ciphers/-/ciphers-0.2.5.tgz", - "integrity": "sha512-GalEZH4JgOMHYYcYmVqnFirFsjZHeoGMDt9IxEnM9F7GRUUyUksJ7Ou53L83WHJq3RWKD3AcBpo0iQh0oMpf8A==", - "license": "MIT", - "optional": true, - "peer": true, - "engines": { - "bun": ">=1", - "deno": ">=2", - "node": ">=16" - }, - "peerDependencies": { - "@noble/ciphers": "^1.0.0" - } - }, "node_modules/@emnapi/core": { "version": "1.7.1", "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.7.1.tgz", @@ -803,80 +774,6 @@ "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, - "node_modules/@ethereumjs/common": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/@ethereumjs/common/-/common-3.2.0.tgz", - "integrity": "sha512-pksvzI0VyLgmuEF2FA/JR/4/y6hcPq8OUail3/AvycBaW1d5VSauOZzqGvJ3RTmR4MU35lWE8KseKOsEhrFRBA==", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "@ethereumjs/util": "^8.1.0", - "crc-32": "^1.2.0" - } - }, - "node_modules/@ethereumjs/rlp": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@ethereumjs/rlp/-/rlp-4.0.1.tgz", - "integrity": "sha512-tqsQiBQDQdmPWE1xkkBq4rlSW5QZpLOUJ5RJh2/9fug+q9tnUhuZoVLk7s0scUIKTOzEtR72DFBXI4WiZcMpvw==", - "license": "MPL-2.0", - "optional": true, - "peer": true, - "bin": { - "rlp": "bin/rlp" - }, - "engines": { - "node": ">=14" - } - }, - "node_modules/@ethereumjs/tx": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/@ethereumjs/tx/-/tx-4.2.0.tgz", - "integrity": "sha512-1nc6VO4jtFd172BbSnTnDQVr9IYBFl1y4xPzZdtkrkKIncBCkdbgfdRV+MiTkJYAtTxvV12GRZLqBFT1PNK6Yw==", - "license": "MPL-2.0", - "optional": true, - "peer": true, - "dependencies": { - "@ethereumjs/common": "^3.2.0", - "@ethereumjs/rlp": "^4.0.1", - "@ethereumjs/util": "^8.1.0", - "ethereum-cryptography": "^2.0.0" - }, - "engines": { - "node": ">=14" - } - }, - "node_modules/@ethereumjs/util": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/@ethereumjs/util/-/util-8.1.0.tgz", - "integrity": "sha512-zQ0IqbdX8FZ9aw11vP+dZkKDkS+kgIvQPHnSAXzP9pLu+Rfu3D3XEeLbicvoXJTYnhZiPmsZUxgdzXwNKxRPbA==", - "license": "MPL-2.0", - "optional": true, - "peer": true, - "dependencies": { - "@ethereumjs/rlp": "^4.0.1", - "ethereum-cryptography": "^2.0.0", - "micro-ftch": "^0.3.1" - }, - "engines": { - "node": ">=14" - } - }, - "node_modules/@gemini-wallet/core": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@gemini-wallet/core/-/core-0.3.2.tgz", - "integrity": "sha512-Z4aHi3ECFf5oWYWM3F1rW83GJfB9OvhBYPTmb5q+VyK3uvzvS48lwo+jwh2eOoCRWEuT/crpb9Vwp2QaS5JqgQ==", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "@metamask/rpc-errors": "7.0.2", - "eventemitter3": "5.0.1" - }, - "peerDependencies": { - "viem": ">=2.0.0" - } - }, "node_modules/@humanwhocodes/config-array": { "version": "0.13.0", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz", @@ -1746,815 +1643,352 @@ "@lit-labs/ssr-dom-shim": "^1.4.0" } }, - "node_modules/@metamask/json-rpc-engine": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/@metamask/json-rpc-engine/-/json-rpc-engine-8.0.2.tgz", - "integrity": "sha512-IoQPmql8q7ABLruW7i4EYVHWUbF74yrp63bRuXV5Zf9BQwcn5H9Ww1eLtROYvI1bUXwOiHZ6qT5CWTrDc/t/AA==", + "node_modules/@msgpack/msgpack": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@msgpack/msgpack/-/msgpack-3.1.2.tgz", + "integrity": "sha512-JEW4DEtBzfe8HvUYecLU9e6+XJnKDlUAIve8FvPzF3Kzs6Xo/KuZkZJsDH0wJXl/qEZbeeE7edxDNY3kMs39hQ==", "license": "ISC", - "optional": true, - "peer": true, - "dependencies": { - "@metamask/rpc-errors": "^6.2.1", - "@metamask/safe-event-emitter": "^3.0.0", - "@metamask/utils": "^8.3.0" - }, "engines": { - "node": ">=16.0.0" + "node": ">= 18" } }, - "node_modules/@metamask/json-rpc-engine/node_modules/@metamask/rpc-errors": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/@metamask/rpc-errors/-/rpc-errors-6.4.0.tgz", - "integrity": "sha512-1ugFO1UoirU2esS3juZanS/Fo8C8XYocCuBpfZI5N7ECtoG+zu0wF+uWZASik6CkO6w9n/Iebt4iI4pT0vptpg==", + "node_modules/@napi-rs/wasm-runtime": { + "version": "0.2.12", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-0.2.12.tgz", + "integrity": "sha512-ZVWUcfwY4E/yPitQJl481FjFo3K22D6qF0DuFH6Y/nbnE11GY5uguDxZMGXPQ8WQ0128MXQD7TnfHyK4oWoIJQ==", + "dev": true, "license": "MIT", "optional": true, - "peer": true, "dependencies": { - "@metamask/utils": "^9.0.0", - "fast-safe-stringify": "^2.0.6" - }, - "engines": { - "node": ">=16.0.0" + "@emnapi/core": "^1.4.3", + "@emnapi/runtime": "^1.4.3", + "@tybys/wasm-util": "^0.10.0" } }, - "node_modules/@metamask/json-rpc-engine/node_modules/@metamask/rpc-errors/node_modules/@metamask/utils": { - "version": "9.3.0", - "resolved": "https://registry.npmjs.org/@metamask/utils/-/utils-9.3.0.tgz", - "integrity": "sha512-w8CVbdkDrVXFJbfBSlDfafDR6BAkpDmv1bC1UJVCoVny5tW2RKAdn9i68Xf7asYT4TnUhl/hN4zfUiKQq9II4g==", - "license": "ISC", - "optional": true, - "peer": true, - "dependencies": { - "@ethereumjs/tx": "^4.2.0", - "@metamask/superstruct": "^3.1.0", - "@noble/hashes": "^1.3.1", - "@scure/base": "^1.1.3", - "@types/debug": "^4.1.7", - "debug": "^4.3.4", - "pony-cause": "^2.1.10", - "semver": "^7.5.4", - "uuid": "^9.0.1" - }, - "engines": { - "node": ">=16.0.0" - } + "node_modules/@next/env": { + "version": "14.2.33", + "resolved": "https://registry.npmjs.org/@next/env/-/env-14.2.33.tgz", + "integrity": "sha512-CgVHNZ1fRIlxkLhIX22flAZI/HmpDaZ8vwyJ/B0SDPTBuLZ1PJ+DWMjCHhqnExfmSQzA/PbZi8OAc7PAq2w9IA==", + "license": "MIT" }, - "node_modules/@metamask/json-rpc-engine/node_modules/@metamask/utils": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/@metamask/utils/-/utils-8.5.0.tgz", - "integrity": "sha512-I6bkduevXb72TIM9q2LRO63JSsF9EXduh3sBr9oybNX2hNNpr/j1tEjXrsG0Uabm4MJ1xkGAQEMwifvKZIkyxQ==", - "license": "ISC", - "optional": true, - "peer": true, + "node_modules/@next/eslint-plugin-next": { + "version": "14.2.33", + "resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-14.2.33.tgz", + "integrity": "sha512-DQTJFSvlB+9JilwqMKJ3VPByBNGxAGFTfJ7BuFj25cVcbBy7jm88KfUN+dngM4D3+UxZ8ER2ft+WH9JccMvxyg==", + "dev": true, + "license": "MIT", "dependencies": { - "@ethereumjs/tx": "^4.2.0", - "@metamask/superstruct": "^3.0.0", - "@noble/hashes": "^1.3.1", - "@scure/base": "^1.1.3", - "@types/debug": "^4.1.7", - "debug": "^4.3.4", - "pony-cause": "^2.1.10", - "semver": "^7.5.4", - "uuid": "^9.0.1" - }, - "engines": { - "node": ">=16.0.0" + "glob": "10.3.10" } }, - "node_modules/@metamask/json-rpc-engine/node_modules/uuid": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", - "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" + "node_modules/@next/swc-darwin-arm64": { + "version": "14.2.33", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.2.33.tgz", + "integrity": "sha512-HqYnb6pxlsshoSTubdXKu15g3iivcbsMXg4bYpjL2iS/V6aQot+iyF4BUc2qA/J/n55YtvE4PHMKWBKGCF/+wA==", + "cpu": [ + "arm64" ], "license": "MIT", "optional": true, - "peer": true, - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "node_modules/@metamask/json-rpc-middleware-stream": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@metamask/json-rpc-middleware-stream/-/json-rpc-middleware-stream-7.0.2.tgz", - "integrity": "sha512-yUdzsJK04Ev98Ck4D7lmRNQ8FPioXYhEUZOMS01LXW8qTvPGiRVXmVltj2p4wrLkh0vW7u6nv0mNl5xzC5Qmfg==", - "license": "ISC", - "optional": true, - "peer": true, - "dependencies": { - "@metamask/json-rpc-engine": "^8.0.2", - "@metamask/safe-event-emitter": "^3.0.0", - "@metamask/utils": "^8.3.0", - "readable-stream": "^3.6.2" - }, + "os": [ + "darwin" + ], "engines": { - "node": ">=16.0.0" + "node": ">= 10" } }, - "node_modules/@metamask/json-rpc-middleware-stream/node_modules/@metamask/utils": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/@metamask/utils/-/utils-8.5.0.tgz", - "integrity": "sha512-I6bkduevXb72TIM9q2LRO63JSsF9EXduh3sBr9oybNX2hNNpr/j1tEjXrsG0Uabm4MJ1xkGAQEMwifvKZIkyxQ==", - "license": "ISC", + "node_modules/@next/swc-darwin-x64": { + "version": "14.2.33", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-14.2.33.tgz", + "integrity": "sha512-8HGBeAE5rX3jzKvF593XTTFg3gxeU4f+UWnswa6JPhzaR6+zblO5+fjltJWIZc4aUalqTclvN2QtTC37LxvZAA==", + "cpu": [ + "x64" + ], + "license": "MIT", "optional": true, - "peer": true, - "dependencies": { - "@ethereumjs/tx": "^4.2.0", - "@metamask/superstruct": "^3.0.0", - "@noble/hashes": "^1.3.1", - "@scure/base": "^1.1.3", - "@types/debug": "^4.1.7", - "debug": "^4.3.4", - "pony-cause": "^2.1.10", - "semver": "^7.5.4", - "uuid": "^9.0.1" - }, + "os": [ + "darwin" + ], "engines": { - "node": ">=16.0.0" + "node": ">= 10" } }, - "node_modules/@metamask/json-rpc-middleware-stream/node_modules/uuid": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", - "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" + "node_modules/@next/swc-linux-arm64-gnu": { + "version": "14.2.33", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.2.33.tgz", + "integrity": "sha512-JXMBka6lNNmqbkvcTtaX8Gu5by9547bukHQvPoLe9VRBx1gHwzf5tdt4AaezW85HAB3pikcvyqBToRTDA4DeLw==", + "cpu": [ + "arm64" ], "license": "MIT", "optional": true, - "peer": true, - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "node_modules/@metamask/object-multiplex": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@metamask/object-multiplex/-/object-multiplex-2.1.0.tgz", - "integrity": "sha512-4vKIiv0DQxljcXwfpnbsXcfa5glMj5Zg9mqn4xpIWqkv6uJ2ma5/GtUfLFSxhlxnR8asRMv8dDmWya1Tc1sDFA==", - "license": "ISC", - "optional": true, - "peer": true, - "dependencies": { - "once": "^1.4.0", - "readable-stream": "^3.6.2" - }, + "os": [ + "linux" + ], "engines": { - "node": "^16.20 || ^18.16 || >=20" + "node": ">= 10" } }, - "node_modules/@metamask/onboarding": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@metamask/onboarding/-/onboarding-1.0.1.tgz", - "integrity": "sha512-FqHhAsCI+Vacx2qa5mAFcWNSrTcVGMNjzxVgaX8ECSny/BJ9/vgXP9V7WF/8vb9DltPeQkxr+Fnfmm6GHfmdTQ==", + "node_modules/@next/swc-linux-arm64-musl": { + "version": "14.2.33", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.2.33.tgz", + "integrity": "sha512-Bm+QulsAItD/x6Ih8wGIMfRJy4G73tu1HJsrccPW6AfqdZd0Sfm5Imhgkgq2+kly065rYMnCOxTBvmvFY1BKfg==", + "cpu": [ + "arm64" + ], "license": "MIT", "optional": true, - "peer": true, - "dependencies": { - "bowser": "^2.9.0" + "os": [ + "linux" + ], + "engines": { + "node": ">= 10" } }, - "node_modules/@metamask/providers": { - "version": "16.1.0", - "resolved": "https://registry.npmjs.org/@metamask/providers/-/providers-16.1.0.tgz", - "integrity": "sha512-znVCvux30+3SaUwcUGaSf+pUckzT5ukPRpcBmy+muBLC0yaWnBcvDqGfcsw6CBIenUdFrVoAFa8B6jsuCY/a+g==", + "node_modules/@next/swc-linux-x64-gnu": { + "version": "14.2.33", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.2.33.tgz", + "integrity": "sha512-FnFn+ZBgsVMbGDsTqo8zsnRzydvsGV8vfiWwUo1LD8FTmPTdV+otGSWKc4LJec0oSexFnCYVO4hX8P8qQKaSlg==", + "cpu": [ + "x64" + ], "license": "MIT", "optional": true, - "peer": true, - "dependencies": { - "@metamask/json-rpc-engine": "^8.0.1", - "@metamask/json-rpc-middleware-stream": "^7.0.1", - "@metamask/object-multiplex": "^2.0.0", - "@metamask/rpc-errors": "^6.2.1", - "@metamask/safe-event-emitter": "^3.1.1", - "@metamask/utils": "^8.3.0", - "detect-browser": "^5.2.0", - "extension-port-stream": "^3.0.0", - "fast-deep-equal": "^3.1.3", - "is-stream": "^2.0.0", - "readable-stream": "^3.6.2", - "webextension-polyfill": "^0.10.0" - }, + "os": [ + "linux" + ], "engines": { - "node": "^18.18 || >=20" + "node": ">= 10" } }, - "node_modules/@metamask/providers/node_modules/@metamask/rpc-errors": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/@metamask/rpc-errors/-/rpc-errors-6.4.0.tgz", - "integrity": "sha512-1ugFO1UoirU2esS3juZanS/Fo8C8XYocCuBpfZI5N7ECtoG+zu0wF+uWZASik6CkO6w9n/Iebt4iI4pT0vptpg==", + "node_modules/@next/swc-linux-x64-musl": { + "version": "14.2.33", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.2.33.tgz", + "integrity": "sha512-345tsIWMzoXaQndUTDv1qypDRiebFxGYx9pYkhwY4hBRaOLt8UGfiWKr9FSSHs25dFIf8ZqIFaPdy5MljdoawA==", + "cpu": [ + "x64" + ], "license": "MIT", "optional": true, - "peer": true, - "dependencies": { - "@metamask/utils": "^9.0.0", - "fast-safe-stringify": "^2.0.6" - }, + "os": [ + "linux" + ], "engines": { - "node": ">=16.0.0" + "node": ">= 10" } }, - "node_modules/@metamask/providers/node_modules/@metamask/rpc-errors/node_modules/@metamask/utils": { - "version": "9.3.0", - "resolved": "https://registry.npmjs.org/@metamask/utils/-/utils-9.3.0.tgz", - "integrity": "sha512-w8CVbdkDrVXFJbfBSlDfafDR6BAkpDmv1bC1UJVCoVny5tW2RKAdn9i68Xf7asYT4TnUhl/hN4zfUiKQq9II4g==", - "license": "ISC", + "node_modules/@next/swc-win32-arm64-msvc": { + "version": "14.2.33", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.2.33.tgz", + "integrity": "sha512-nscpt0G6UCTkrT2ppnJnFsYbPDQwmum4GNXYTeoTIdsmMydSKFz9Iny2jpaRupTb+Wl298+Rh82WKzt9LCcqSQ==", + "cpu": [ + "arm64" + ], + "license": "MIT", "optional": true, - "peer": true, - "dependencies": { - "@ethereumjs/tx": "^4.2.0", - "@metamask/superstruct": "^3.1.0", - "@noble/hashes": "^1.3.1", - "@scure/base": "^1.1.3", - "@types/debug": "^4.1.7", - "debug": "^4.3.4", - "pony-cause": "^2.1.10", - "semver": "^7.5.4", - "uuid": "^9.0.1" - }, + "os": [ + "win32" + ], "engines": { - "node": ">=16.0.0" + "node": ">= 10" } }, - "node_modules/@metamask/providers/node_modules/@metamask/utils": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/@metamask/utils/-/utils-8.5.0.tgz", - "integrity": "sha512-I6bkduevXb72TIM9q2LRO63JSsF9EXduh3sBr9oybNX2hNNpr/j1tEjXrsG0Uabm4MJ1xkGAQEMwifvKZIkyxQ==", - "license": "ISC", + "node_modules/@next/swc-win32-ia32-msvc": { + "version": "14.2.33", + "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.2.33.tgz", + "integrity": "sha512-pc9LpGNKhJ0dXQhZ5QMmYxtARwwmWLpeocFmVG5Z0DzWq5Uf0izcI8tLc+qOpqxO1PWqZ5A7J1blrUIKrIFc7Q==", + "cpu": [ + "ia32" + ], + "license": "MIT", "optional": true, - "peer": true, - "dependencies": { - "@ethereumjs/tx": "^4.2.0", - "@metamask/superstruct": "^3.0.0", - "@noble/hashes": "^1.3.1", - "@scure/base": "^1.1.3", - "@types/debug": "^4.1.7", - "debug": "^4.3.4", - "pony-cause": "^2.1.10", - "semver": "^7.5.4", - "uuid": "^9.0.1" - }, + "os": [ + "win32" + ], "engines": { - "node": ">=16.0.0" + "node": ">= 10" } }, - "node_modules/@metamask/providers/node_modules/uuid": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", - "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" + "node_modules/@next/swc-win32-x64-msvc": { + "version": "14.2.33", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.2.33.tgz", + "integrity": "sha512-nOjfZMy8B94MdisuzZo9/57xuFVLHJaDj5e/xrduJp9CV2/HrfxTRH2fbyLe+K9QT41WBLUd4iXX3R7jBp0EUg==", + "cpu": [ + "x64" ], "license": "MIT", "optional": true, - "peer": true, - "bin": { - "uuid": "dist/bin/uuid" + "os": [ + "win32" + ], + "engines": { + "node": ">= 10" } }, - "node_modules/@metamask/rpc-errors": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/@metamask/rpc-errors/-/rpc-errors-7.0.2.tgz", - "integrity": "sha512-YYYHsVYd46XwY2QZzpGeU4PSdRhHdxnzkB8piWGvJW2xbikZ3R+epAYEL4q/K8bh9JPTucsUdwRFnACor1aOYw==", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "@metamask/utils": "^11.0.1", - "fast-safe-stringify": "^2.0.6" - }, - "engines": { - "node": "^18.20 || ^20.17 || >=22" - } - }, - "node_modules/@metamask/safe-event-emitter": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@metamask/safe-event-emitter/-/safe-event-emitter-3.1.2.tgz", - "integrity": "sha512-5yb2gMI1BDm0JybZezeoX/3XhPDOtTbcFvpTXM9kxsoZjPZFh4XciqRbpD6N86HYZqWDhEaKUDuOyR0sQHEjMA==", - "license": "ISC", - "optional": true, - "peer": true, + "node_modules/@noble/ciphers": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@noble/ciphers/-/ciphers-1.3.0.tgz", + "integrity": "sha512-2I0gnIVPtfnMw9ee9h1dJG7tp81+8Ob3OJb3Mv37rx5L40/b0i7djjCVvGOVqc9AEIQyvyu1i6ypKdFw8R8gQw==", + "license": "MIT", "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/@metamask/sdk": { - "version": "0.33.1", - "resolved": "https://registry.npmjs.org/@metamask/sdk/-/sdk-0.33.1.tgz", - "integrity": "sha512-1mcOQVGr9rSrVcbKPNVzbZ8eCl1K0FATsYH3WJ/MH4WcZDWGECWrXJPNMZoEAkLxWiMe8jOQBumg2pmcDa9zpQ==", - "optional": true, - "peer": true, - "dependencies": { - "@babel/runtime": "^7.26.0", - "@metamask/onboarding": "^1.0.1", - "@metamask/providers": "16.1.0", - "@metamask/sdk-analytics": "0.0.5", - "@metamask/sdk-communication-layer": "0.33.1", - "@metamask/sdk-install-modal-web": "0.32.1", - "@paulmillr/qr": "^0.2.1", - "bowser": "^2.9.0", - "cross-fetch": "^4.0.0", - "debug": "4.3.4", - "eciesjs": "^0.4.11", - "eth-rpc-errors": "^4.0.3", - "eventemitter2": "^6.4.9", - "obj-multiplex": "^1.0.0", - "pump": "^3.0.0", - "readable-stream": "^3.6.2", - "socket.io-client": "^4.5.1", - "tslib": "^2.6.0", - "util": "^0.12.4", - "uuid": "^8.3.2" + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" } }, - "node_modules/@metamask/sdk-analytics": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/@metamask/sdk-analytics/-/sdk-analytics-0.0.5.tgz", - "integrity": "sha512-fDah+keS1RjSUlC8GmYXvx6Y26s3Ax1U9hGpWb6GSY5SAdmTSIqp2CvYy6yW0WgLhnYhW+6xERuD0eVqV63QIQ==", + "node_modules/@noble/curves": { + "version": "1.9.7", + "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.9.7.tgz", + "integrity": "sha512-gbKGcRUYIjA3/zCCNaWDciTMFI0dCkvou3TL8Zmy5Nc7sJ47a0jtOeZoTaMxkuqRo9cRhjOdZJXegxYE5FN/xw==", "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "openapi-fetch": "^0.13.5" - } - }, - "node_modules/@metamask/sdk-install-modal-web": { - "version": "0.32.1", - "resolved": "https://registry.npmjs.org/@metamask/sdk-install-modal-web/-/sdk-install-modal-web-0.32.1.tgz", - "integrity": "sha512-MGmAo6qSjf1tuYXhCu2EZLftq+DSt5Z7fsIKr2P+lDgdTPWgLfZB1tJKzNcwKKOdf6q9Qmmxn7lJuI/gq5LrKw==", - "optional": true, - "peer": true, "dependencies": { - "@paulmillr/qr": "^0.2.1" + "@noble/hashes": "1.8.0" + }, + "engines": { + "node": "^14.21.3 || >=16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" } }, - "node_modules/@metamask/sdk/node_modules/@metamask/sdk-communication-layer": { - "version": "0.33.1", - "resolved": "https://registry.npmjs.org/@metamask/sdk-communication-layer/-/sdk-communication-layer-0.33.1.tgz", - "integrity": "sha512-0bI9hkysxcfbZ/lk0T2+aKVo1j0ynQVTuB3sJ5ssPWlz+Z3VwveCkP1O7EVu1tsVVCb0YV5WxK9zmURu2FIiaA==", - "optional": true, - "peer": true, - "dependencies": { - "@metamask/sdk-analytics": "0.0.5", - "bufferutil": "^4.0.8", - "date-fns": "^2.29.3", - "debug": "4.3.4", - "utf-8-validate": "^5.0.2", - "uuid": "^8.3.2" + "node_modules/@noble/curves/node_modules/@noble/hashes": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.8.0.tgz", + "integrity": "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A==", + "license": "MIT", + "engines": { + "node": "^14.21.3 || >=16" }, - "peerDependencies": { - "cross-fetch": "^4.0.0", - "eciesjs": "*", - "eventemitter2": "^6.4.9", - "readable-stream": "^3.6.2", - "socket.io-client": "^4.5.1" + "funding": { + "url": "https://paulmillr.com/funding/" } }, - "node_modules/@metamask/sdk/node_modules/cross-fetch": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-4.1.0.tgz", - "integrity": "sha512-uKm5PU+MHTootlWEY+mZ4vvXoCn4fLQxT9dSc1sXVMSFkINTJVN8cAQROpwcKm8bJ/c7rgZVIBWzH5T78sNZZw==", + "node_modules/@noble/hashes": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", + "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", "license": "MIT", "optional": true, - "peer": true, - "dependencies": { - "node-fetch": "^2.7.0" + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://paulmillr.com/funding/" } }, - "node_modules/@metamask/sdk/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, "license": "MIT", - "optional": true, - "peer": true, "dependencies": { - "ms": "2.1.2" + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" }, "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } + "node": ">= 8" } }, - "node_modules/@metamask/sdk/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "license": "MIT", - "optional": true, - "peer": true - }, - "node_modules/@metamask/sdk/node_modules/tslib": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "license": "0BSD", - "optional": true, - "peer": true - }, - "node_modules/@metamask/superstruct": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@metamask/superstruct/-/superstruct-3.2.1.tgz", - "integrity": "sha512-fLgJnDOXFmuVlB38rUN5SmU7hAFQcCjrg3Vrxz67KTY7YHFnSNEKvX4avmEBdOI0yTCxZjwMCFEqsC8k2+Wd3g==", + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, "license": "MIT", - "optional": true, - "peer": true, "engines": { - "node": ">=16.0.0" + "node": ">= 8" } }, - "node_modules/@metamask/utils": { - "version": "11.8.1", - "resolved": "https://registry.npmjs.org/@metamask/utils/-/utils-11.8.1.tgz", - "integrity": "sha512-DIbsNUyqWLFgqJlZxi1OOCMYvI23GqFCvNJAtzv8/WXWzJfnJnvp1M24j7VvUe3URBi3S86UgQ7+7aWU9p/cnQ==", - "license": "ISC", - "optional": true, - "peer": true, - "dependencies": { - "@ethereumjs/tx": "^4.2.0", - "@metamask/superstruct": "^3.1.0", - "@noble/hashes": "^1.3.1", - "@scure/base": "^1.1.3", - "@types/debug": "^4.1.7", - "@types/lodash": "^4.17.20", - "debug": "^4.3.4", - "lodash": "^4.17.21", - "pony-cause": "^2.1.10", - "semver": "^7.5.4", - "uuid": "^9.0.1" + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" }, "engines": { - "node": "^18.18 || ^20.14 || >=22" + "node": ">= 8" } }, - "node_modules/@metamask/utils/node_modules/uuid": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", - "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" - ], + "node_modules/@nolyfill/is-core-module": { + "version": "1.0.39", + "resolved": "https://registry.npmjs.org/@nolyfill/is-core-module/-/is-core-module-1.0.39.tgz", + "integrity": "sha512-nn5ozdjYQpUCZlWGuxcJY/KpxkWQs4DcbMCmKojjyrYDEAGy4Ce19NN4v5MduafTwJlbKc99UA8YhSVqq9yPZA==", + "dev": true, "license": "MIT", - "optional": true, - "peer": true, - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "node_modules/@msgpack/msgpack": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@msgpack/msgpack/-/msgpack-3.1.2.tgz", - "integrity": "sha512-JEW4DEtBzfe8HvUYecLU9e6+XJnKDlUAIve8FvPzF3Kzs6Xo/KuZkZJsDH0wJXl/qEZbeeE7edxDNY3kMs39hQ==", - "license": "ISC", "engines": { - "node": ">= 18" + "node": ">=12.4.0" } }, - "node_modules/@napi-rs/wasm-runtime": { - "version": "0.2.12", - "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-0.2.12.tgz", - "integrity": "sha512-ZVWUcfwY4E/yPitQJl481FjFo3K22D6qF0DuFH6Y/nbnE11GY5uguDxZMGXPQ8WQ0128MXQD7TnfHyK4oWoIJQ==", - "dev": true, + "node_modules/@phosphor-icons/webcomponents": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@phosphor-icons/webcomponents/-/webcomponents-2.1.5.tgz", + "integrity": "sha512-JcvQkZxvcX2jK+QCclm8+e8HXqtdFW9xV4/kk2aL9Y3dJA2oQVt+pzbv1orkumz3rfx4K9mn9fDoMr1He1yr7Q==", "license": "MIT", - "optional": true, "dependencies": { - "@emnapi/core": "^1.4.3", - "@emnapi/runtime": "^1.4.3", - "@tybys/wasm-util": "^0.10.0" + "lit": "^3" } }, - "node_modules/@next/env": { - "version": "14.2.33", - "resolved": "https://registry.npmjs.org/@next/env/-/env-14.2.33.tgz", - "integrity": "sha512-CgVHNZ1fRIlxkLhIX22flAZI/HmpDaZ8vwyJ/B0SDPTBuLZ1PJ+DWMjCHhqnExfmSQzA/PbZi8OAc7PAq2w9IA==", - "license": "MIT" - }, - "node_modules/@next/eslint-plugin-next": { - "version": "14.2.33", - "resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-14.2.33.tgz", - "integrity": "sha512-DQTJFSvlB+9JilwqMKJ3VPByBNGxAGFTfJ7BuFj25cVcbBy7jm88KfUN+dngM4D3+UxZ8ER2ft+WH9JccMvxyg==", + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", "dev": true, "license": "MIT", - "dependencies": { - "glob": "10.3.10" - } - }, - "node_modules/@next/swc-darwin-arm64": { - "version": "14.2.33", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.2.33.tgz", - "integrity": "sha512-HqYnb6pxlsshoSTubdXKu15g3iivcbsMXg4bYpjL2iS/V6aQot+iyF4BUc2qA/J/n55YtvE4PHMKWBKGCF/+wA==", - "cpu": [ - "arm64" - ], - "license": "MIT", "optional": true, - "os": [ - "darwin" - ], "engines": { - "node": ">= 10" + "node": ">=14" } }, - "node_modules/@next/swc-darwin-x64": { - "version": "14.2.33", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-14.2.33.tgz", - "integrity": "sha512-8HGBeAE5rX3jzKvF593XTTFg3gxeU4f+UWnswa6JPhzaR6+zblO5+fjltJWIZc4aUalqTclvN2QtTC37LxvZAA==", - "cpu": [ - "x64" - ], + "node_modules/@pkgr/core": { + "version": "0.2.9", + "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.2.9.tgz", + "integrity": "sha512-QNqXyfVS2wm9hweSYD2O7F0G06uurj9kZ96TRQE5Y9hU7+tgdZwIkbAKc5Ocy1HxEY2kuDQa6cQ1WRs/O5LFKA==", + "dev": true, "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], "engines": { - "node": ">= 10" + "node": "^12.20.0 || ^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/pkgr" } }, - "node_modules/@next/swc-linux-arm64-gnu": { - "version": "14.2.33", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.2.33.tgz", - "integrity": "sha512-JXMBka6lNNmqbkvcTtaX8Gu5by9547bukHQvPoLe9VRBx1gHwzf5tdt4AaezW85HAB3pikcvyqBToRTDA4DeLw==", - "cpu": [ - "arm64" - ], + "node_modules/@popperjs/core": { + "version": "2.11.8", + "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz", + "integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==", "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/popperjs" } }, - "node_modules/@next/swc-linux-arm64-musl": { - "version": "14.2.33", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.2.33.tgz", - "integrity": "sha512-Bm+QulsAItD/x6Ih8wGIMfRJy4G73tu1HJsrccPW6AfqdZd0Sfm5Imhgkgq2+kly065rYMnCOxTBvmvFY1BKfg==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" + "node_modules/@react-leaflet/core": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@react-leaflet/core/-/core-2.1.0.tgz", + "integrity": "sha512-Qk7Pfu8BSarKGqILj4x7bCSZ1pjuAPZ+qmRwH5S7mDS91VSbVVsJSrW4qA+GPrro8t69gFYVMWb1Zc4yFmPiVg==", + "license": "Hippocratic-2.1", + "peerDependencies": { + "leaflet": "^1.9.0", + "react": "^18.0.0", + "react-dom": "^18.0.0" } }, - "node_modules/@next/swc-linux-x64-gnu": { - "version": "14.2.33", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.2.33.tgz", - "integrity": "sha512-FnFn+ZBgsVMbGDsTqo8zsnRzydvsGV8vfiWwUo1LD8FTmPTdV+otGSWKc4LJec0oSexFnCYVO4hX8P8qQKaSlg==", - "cpu": [ - "x64" - ], + "node_modules/@react-native-async-storage/async-storage": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@react-native-async-storage/async-storage/-/async-storage-2.2.0.tgz", + "integrity": "sha512-gvRvjR5JAaUZF8tv2Kcq/Gbt3JHwbKFYfmb445rhOj6NUMx3qPLixmDx5pZAyb9at1bYvJ4/eTUipU5aki45xw==", "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-linux-x64-musl": { - "version": "14.2.33", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.2.33.tgz", - "integrity": "sha512-345tsIWMzoXaQndUTDv1qypDRiebFxGYx9pYkhwY4hBRaOLt8UGfiWKr9FSSHs25dFIf8ZqIFaPdy5MljdoawA==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-win32-arm64-msvc": { - "version": "14.2.33", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.2.33.tgz", - "integrity": "sha512-nscpt0G6UCTkrT2ppnJnFsYbPDQwmum4GNXYTeoTIdsmMydSKFz9Iny2jpaRupTb+Wl298+Rh82WKzt9LCcqSQ==", - "cpu": [ - "arm64" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-win32-ia32-msvc": { - "version": "14.2.33", - "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.2.33.tgz", - "integrity": "sha512-pc9LpGNKhJ0dXQhZ5QMmYxtARwwmWLpeocFmVG5Z0DzWq5Uf0izcI8tLc+qOpqxO1PWqZ5A7J1blrUIKrIFc7Q==", - "cpu": [ - "ia32" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-win32-x64-msvc": { - "version": "14.2.33", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.2.33.tgz", - "integrity": "sha512-nOjfZMy8B94MdisuzZo9/57xuFVLHJaDj5e/xrduJp9CV2/HrfxTRH2fbyLe+K9QT41WBLUd4iXX3R7jBp0EUg==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@noble/ciphers": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@noble/ciphers/-/ciphers-1.3.0.tgz", - "integrity": "sha512-2I0gnIVPtfnMw9ee9h1dJG7tp81+8Ob3OJb3Mv37rx5L40/b0i7djjCVvGOVqc9AEIQyvyu1i6ypKdFw8R8gQw==", - "license": "MIT", - "engines": { - "node": "^14.21.3 || >=16" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/@noble/curves": { - "version": "1.9.7", - "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.9.7.tgz", - "integrity": "sha512-gbKGcRUYIjA3/zCCNaWDciTMFI0dCkvou3TL8Zmy5Nc7sJ47a0jtOeZoTaMxkuqRo9cRhjOdZJXegxYE5FN/xw==", - "license": "MIT", - "dependencies": { - "@noble/hashes": "1.8.0" - }, - "engines": { - "node": "^14.21.3 || >=16" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/@noble/curves/node_modules/@noble/hashes": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.8.0.tgz", - "integrity": "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A==", - "license": "MIT", - "engines": { - "node": "^14.21.3 || >=16" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/@noble/hashes": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", - "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", - "license": "MIT", - "optional": true, - "engines": { - "node": ">= 16" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nolyfill/is-core-module": { - "version": "1.0.39", - "resolved": "https://registry.npmjs.org/@nolyfill/is-core-module/-/is-core-module-1.0.39.tgz", - "integrity": "sha512-nn5ozdjYQpUCZlWGuxcJY/KpxkWQs4DcbMCmKojjyrYDEAGy4Ce19NN4v5MduafTwJlbKc99UA8YhSVqq9yPZA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12.4.0" - } - }, - "node_modules/@paulmillr/qr": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/@paulmillr/qr/-/qr-0.2.1.tgz", - "integrity": "sha512-IHnV6A+zxU7XwmKFinmYjUcwlyK9+xkG3/s9KcQhI9BjQKycrJ1JRO+FbNYPwZiPKW3je/DR0k7w8/gLa5eaxQ==", - "deprecated": "The package is now available as \"qr\": npm install qr", - "license": "(MIT OR Apache-2.0)", - "optional": true, - "peer": true, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/@phosphor-icons/webcomponents": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@phosphor-icons/webcomponents/-/webcomponents-2.1.5.tgz", - "integrity": "sha512-JcvQkZxvcX2jK+QCclm8+e8HXqtdFW9xV4/kk2aL9Y3dJA2oQVt+pzbv1orkumz3rfx4K9mn9fDoMr1He1yr7Q==", - "license": "MIT", - "dependencies": { - "lit": "^3" - } - }, - "node_modules/@pkgjs/parseargs": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", - "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", - "dev": true, - "license": "MIT", - "optional": true, - "engines": { - "node": ">=14" - } - }, - "node_modules/@pkgr/core": { - "version": "0.2.9", - "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.2.9.tgz", - "integrity": "sha512-QNqXyfVS2wm9hweSYD2O7F0G06uurj9kZ96TRQE5Y9hU7+tgdZwIkbAKc5Ocy1HxEY2kuDQa6cQ1WRs/O5LFKA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.20.0 || ^14.18.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/pkgr" - } - }, - "node_modules/@popperjs/core": { - "version": "2.11.8", - "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz", - "integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==", - "license": "MIT", - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/popperjs" - } - }, - "node_modules/@react-leaflet/core": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@react-leaflet/core/-/core-2.1.0.tgz", - "integrity": "sha512-Qk7Pfu8BSarKGqILj4x7bCSZ1pjuAPZ+qmRwH5S7mDS91VSbVVsJSrW4qA+GPrro8t69gFYVMWb1Zc4yFmPiVg==", - "license": "Hippocratic-2.1", - "peerDependencies": { - "leaflet": "^1.9.0", - "react": "^18.0.0", - "react-dom": "^18.0.0" + "dependencies": { + "merge-options": "^3.0.4" + }, + "peerDependencies": { + "react-native": "^0.0.0-0 || >=0.65 <1.0" } }, "node_modules/@reown/appkit": { @@ -2913,14 +2347,6 @@ "@sinonjs/commons": "^3.0.1" } }, - "node_modules/@socket.io/component-emitter": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@socket.io/component-emitter/-/component-emitter-3.1.2.tgz", - "integrity": "sha512-9BCxFwvbGg/RsZK9tjXd8s4UcwR0MWeFQ1XEKIQVVvAGJyINdrqKMcTRyLoK8Rse1GjzLV9cwjWV1olXRWEXVA==", - "license": "MIT", - "optional": true, - "peer": true - }, "node_modules/@solana-program/system": { "version": "0.8.1", "resolved": "https://registry.npmjs.org/@solana-program/system/-/system-0.8.1.tgz", @@ -3894,17 +3320,6 @@ "@types/node": "*" } }, - "node_modules/@types/debug": { - "version": "4.1.12", - "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.12.tgz", - "integrity": "sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "@types/ms": "*" - } - }, "node_modules/@types/geojson": { "version": "7946.0.16", "resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.16.tgz", @@ -3965,22 +3380,6 @@ "@types/geojson": "*" } }, - "node_modules/@types/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-FOvQ0YPD5NOfPgMzJihoT+Za5pdkDJWcbpuj1DjaKZIr/gxodQjY/uWEFlTNqW2ugXHUiL8lRQgw63dzKHZdeQ==", - "license": "MIT", - "optional": true, - "peer": true - }, - "node_modules/@types/ms": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@types/ms/-/ms-2.1.0.tgz", - "integrity": "sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==", - "license": "MIT", - "optional": true, - "peer": true - }, "node_modules/@types/node": { "version": "20.19.25", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.25.tgz", @@ -4002,14 +3401,14 @@ "version": "15.7.15", "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.15.tgz", "integrity": "sha512-F6bEyamV9jKGAFBEmlQnesRPGOQqS2+Uwi0Em15xenOxHaf2hv6L8YCVn3rPdPJOiJfPiCnLIRyvwVaqMY3MIw==", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/@types/react": { "version": "18.3.27", "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.27.tgz", "integrity": "sha512-cisd7gxkzjBKU2GgdYrTdtQx1SORymWyaAFhaxQPK9bYO9ot3Y5OikQRvY0VYQtvwjeQnizCINJAenh/V7MK2w==", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "@types/prop-types": "*", @@ -4629,946 +4028,78 @@ "mipd": "0.0.7", "zustand": "5.0.0" }, - "funding": { - "url": "https://github.com/sponsors/wevm" - }, - "peerDependencies": { - "@tanstack/query-core": ">=5.0.0", - "typescript": ">=5.7.3", - "viem": "2.x" - }, - "peerDependenciesMeta": { - "@tanstack/query-core": { - "optional": true - }, - "typescript": { - "optional": true - } - } - }, - "node_modules/@wagmi/core/node_modules/zustand": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/zustand/-/zustand-5.0.0.tgz", - "integrity": "sha512-LE+VcmbartOPM+auOjCCLQOsQ05zUTp8RkgwRzefUk+2jISdMMFnxvyTjA4YNWr5ZGXYbVsEMZosttuxUBkojQ==", - "license": "MIT", - "engines": { - "node": ">=12.20.0" - }, - "peerDependencies": { - "@types/react": ">=18.0.0", - "immer": ">=9.0.6", - "react": ">=18.0.0", - "use-sync-external-store": ">=1.2.0" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - }, - "immer": { - "optional": true - }, - "react": { - "optional": true - }, - "use-sync-external-store": { - "optional": true - } - } - }, - "node_modules/@wallet-standard/base": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@wallet-standard/base/-/base-1.1.0.tgz", - "integrity": "sha512-DJDQhjKmSNVLKWItoKThJS+CsJQjR9AOBOirBVT1F9YpRyC9oYHE+ZnSf8y8bxUphtKqdQMPVQ2mHohYdRvDVQ==", - "license": "Apache-2.0", - "engines": { - "node": ">=16" - } - }, - "node_modules/@wallet-standard/wallet": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@wallet-standard/wallet/-/wallet-1.1.0.tgz", - "integrity": "sha512-Gt8TnSlDZpAl+RWOOAB/kuvC7RpcdWAlFbHNoi4gsXsfaWa1QCT6LBcfIYTPdOZC9OVZUDwqGuGAcqZejDmHjg==", - "license": "Apache-2.0", - "dependencies": { - "@wallet-standard/base": "^1.1.0" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/@walletconnect/core": { - "version": "2.23.0", - "resolved": "https://registry.npmjs.org/@walletconnect/core/-/core-2.23.0.tgz", - "integrity": "sha512-W++xuXf+AsMPrBWn1It8GheIbCTp1ynTQP+aoFB86eUwyCtSiK7UQsn/+vJZdwElrn+Ptp2A0RqQx2onTMVHjQ==", - "license": "SEE LICENSE IN LICENSE.md", - "dependencies": { - "@walletconnect/heartbeat": "1.2.2", - "@walletconnect/jsonrpc-provider": "1.0.14", - "@walletconnect/jsonrpc-types": "1.0.4", - "@walletconnect/jsonrpc-utils": "1.0.8", - "@walletconnect/jsonrpc-ws-connection": "1.0.16", - "@walletconnect/keyvaluestorage": "1.1.1", - "@walletconnect/logger": "3.0.0", - "@walletconnect/relay-api": "1.0.11", - "@walletconnect/relay-auth": "1.1.0", - "@walletconnect/safe-json": "1.0.2", - "@walletconnect/time": "1.0.2", - "@walletconnect/types": "2.23.0", - "@walletconnect/utils": "2.23.0", - "@walletconnect/window-getters": "1.0.1", - "es-toolkit": "1.39.3", - "events": "3.3.0", - "uint8arrays": "3.1.1" - }, - "engines": { - "node": ">=18.20.8" - } - }, - "node_modules/@walletconnect/core/node_modules/@walletconnect/keyvaluestorage": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@walletconnect/keyvaluestorage/-/keyvaluestorage-1.1.1.tgz", - "integrity": "sha512-V7ZQq2+mSxAq7MrRqDxanTzu2RcElfK1PfNYiaVnJgJ7Q7G7hTVwF8voIBx92qsRyGHZihrwNPHuZd1aKkd0rA==", - "license": "MIT", - "dependencies": { - "@walletconnect/safe-json": "^1.0.1", - "idb-keyval": "^6.2.1", - "unstorage": "^1.9.0" - }, - "peerDependencies": { - "@react-native-async-storage/async-storage": "1.x" - }, - "peerDependenciesMeta": { - "@react-native-async-storage/async-storage": { - "optional": true - } - } - }, - "node_modules/@walletconnect/core/node_modules/chokidar": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", - "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", - "license": "MIT", - "dependencies": { - "readdirp": "^4.0.1" - }, - "engines": { - "node": ">= 14.16.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/@walletconnect/core/node_modules/readdirp": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", - "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", - "license": "MIT", - "engines": { - "node": ">= 14.18.0" - }, - "funding": { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/@walletconnect/core/node_modules/unstorage": { - "version": "1.17.3", - "resolved": "https://registry.npmjs.org/unstorage/-/unstorage-1.17.3.tgz", - "integrity": "sha512-i+JYyy0DoKmQ3FximTHbGadmIYb8JEpq7lxUjnjeB702bCPum0vzo6oy5Mfu0lpqISw7hCyMW2yj4nWC8bqJ3Q==", - "license": "MIT", - "dependencies": { - "anymatch": "^3.1.3", - "chokidar": "^4.0.3", - "destr": "^2.0.5", - "h3": "^1.15.4", - "lru-cache": "^10.4.3", - "node-fetch-native": "^1.6.7", - "ofetch": "^1.5.1", - "ufo": "^1.6.1" - }, - "peerDependencies": { - "@azure/app-configuration": "^1.8.0", - "@azure/cosmos": "^4.2.0", - "@azure/data-tables": "^13.3.0", - "@azure/identity": "^4.6.0", - "@azure/keyvault-secrets": "^4.9.0", - "@azure/storage-blob": "^12.26.0", - "@capacitor/preferences": "^6.0.3 || ^7.0.0", - "@deno/kv": ">=0.9.0", - "@netlify/blobs": "^6.5.0 || ^7.0.0 || ^8.1.0 || ^9.0.0 || ^10.0.0", - "@planetscale/database": "^1.19.0", - "@upstash/redis": "^1.34.3", - "@vercel/blob": ">=0.27.1", - "@vercel/functions": "^2.2.12 || ^3.0.0", - "@vercel/kv": "^1.0.1", - "aws4fetch": "^1.0.20", - "db0": ">=0.2.1", - "idb-keyval": "^6.2.1", - "ioredis": "^5.4.2", - "uploadthing": "^7.4.4" - }, - "peerDependenciesMeta": { - "@azure/app-configuration": { - "optional": true - }, - "@azure/cosmos": { - "optional": true - }, - "@azure/data-tables": { - "optional": true - }, - "@azure/identity": { - "optional": true - }, - "@azure/keyvault-secrets": { - "optional": true - }, - "@azure/storage-blob": { - "optional": true - }, - "@capacitor/preferences": { - "optional": true - }, - "@deno/kv": { - "optional": true - }, - "@netlify/blobs": { - "optional": true - }, - "@planetscale/database": { - "optional": true - }, - "@upstash/redis": { - "optional": true - }, - "@vercel/blob": { - "optional": true - }, - "@vercel/functions": { - "optional": true - }, - "@vercel/kv": { - "optional": true - }, - "aws4fetch": { - "optional": true - }, - "db0": { - "optional": true - }, - "idb-keyval": { - "optional": true - }, - "ioredis": { - "optional": true - }, - "uploadthing": { - "optional": true - } - } - }, - "node_modules/@walletconnect/environment": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@walletconnect/environment/-/environment-1.0.1.tgz", - "integrity": "sha512-T426LLZtHj8e8rYnKfzsw1aG6+M0BT1ZxayMdv/p8yM0MU+eJDISqNY3/bccxRr4LrF9csq02Rhqt08Ibl0VRg==", - "license": "MIT", - "dependencies": { - "tslib": "1.14.1" - } - }, - "node_modules/@walletconnect/ethereum-provider": { - "version": "2.21.1", - "resolved": "https://registry.npmjs.org/@walletconnect/ethereum-provider/-/ethereum-provider-2.21.1.tgz", - "integrity": "sha512-SSlIG6QEVxClgl1s0LMk4xr2wg4eT3Zn/Hb81IocyqNSGfXpjtawWxKxiC5/9Z95f1INyBD6MctJbL/R1oBwIw==", - "deprecated": "Reliability and performance improvements. See: https://github.com/WalletConnect/walletconnect-monorepo/releases", - "license": "Apache-2.0", - "optional": true, - "peer": true, - "dependencies": { - "@reown/appkit": "1.7.8", - "@walletconnect/jsonrpc-http-connection": "1.0.8", - "@walletconnect/jsonrpc-provider": "1.0.14", - "@walletconnect/jsonrpc-types": "1.0.4", - "@walletconnect/jsonrpc-utils": "1.0.8", - "@walletconnect/keyvaluestorage": "1.1.1", - "@walletconnect/sign-client": "2.21.1", - "@walletconnect/types": "2.21.1", - "@walletconnect/universal-provider": "2.21.1", - "@walletconnect/utils": "2.21.1", - "events": "3.3.0" - } - }, - "node_modules/@walletconnect/ethereum-provider/node_modules/@noble/ciphers": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@noble/ciphers/-/ciphers-1.2.1.tgz", - "integrity": "sha512-rONPWMC7PeExE077uLE4oqWrZ1IvAfz3oH9LibVAcVCopJiA9R62uavnbEzdkVmJYI6M6Zgkbeb07+tWjlq2XA==", - "license": "MIT", - "optional": true, - "peer": true, - "engines": { - "node": "^14.21.3 || >=16" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/@walletconnect/ethereum-provider/node_modules/@noble/curves": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.8.1.tgz", - "integrity": "sha512-warwspo+UYUPep0Q+vtdVB4Ugn8GGQj8iyB3gnRWsztmUHTI3S1nhdiWNsPUGL0vud7JlRRk1XEu7Lq1KGTnMQ==", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "@noble/hashes": "1.7.1" - }, - "engines": { - "node": "^14.21.3 || >=16" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/@walletconnect/ethereum-provider/node_modules/@noble/hashes": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.7.1.tgz", - "integrity": "sha512-B8XBPsn4vT/KJAGqDzbwztd+6Yte3P4V7iafm24bxgDe/mlRuK6xmWPuCNrKt2vDafZ8MfJLlchDG/vYafQEjQ==", - "license": "MIT", - "optional": true, - "peer": true, - "engines": { - "node": "^14.21.3 || >=16" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/@walletconnect/ethereum-provider/node_modules/@reown/appkit": { - "version": "1.7.8", - "resolved": "https://registry.npmjs.org/@reown/appkit/-/appkit-1.7.8.tgz", - "integrity": "sha512-51kTleozhA618T1UvMghkhKfaPcc9JlKwLJ5uV+riHyvSoWPKPRIa5A6M1Wano5puNyW0s3fwywhyqTHSilkaA==", - "license": "Apache-2.0", - "optional": true, - "peer": true, - "dependencies": { - "@reown/appkit-common": "1.7.8", - "@reown/appkit-controllers": "1.7.8", - "@reown/appkit-pay": "1.7.8", - "@reown/appkit-polyfills": "1.7.8", - "@reown/appkit-scaffold-ui": "1.7.8", - "@reown/appkit-ui": "1.7.8", - "@reown/appkit-utils": "1.7.8", - "@reown/appkit-wallet": "1.7.8", - "@walletconnect/types": "2.21.0", - "@walletconnect/universal-provider": "2.21.0", - "bs58": "6.0.0", - "valtio": "1.13.2", - "viem": ">=2.29.0" - } - }, - "node_modules/@walletconnect/ethereum-provider/node_modules/@reown/appkit-common": { - "version": "1.7.8", - "resolved": "https://registry.npmjs.org/@reown/appkit-common/-/appkit-common-1.7.8.tgz", - "integrity": "sha512-ridIhc/x6JOp7KbDdwGKY4zwf8/iK8EYBl+HtWrruutSLwZyVi5P8WaZa+8iajL6LcDcDF7LoyLwMTym7SRuwQ==", - "license": "Apache-2.0", - "optional": true, - "peer": true, - "dependencies": { - "big.js": "6.2.2", - "dayjs": "1.11.13", - "viem": ">=2.29.0" - } - }, - "node_modules/@walletconnect/ethereum-provider/node_modules/@reown/appkit-controllers": { - "version": "1.7.8", - "resolved": "https://registry.npmjs.org/@reown/appkit-controllers/-/appkit-controllers-1.7.8.tgz", - "integrity": "sha512-IdXlJlivrlj6m63VsGLsjtPHHsTWvKGVzWIP1fXZHVqmK+rZCBDjCi9j267Rb9/nYRGHWBtlFQhO8dK35WfeDA==", - "license": "Apache-2.0", - "optional": true, - "peer": true, - "dependencies": { - "@reown/appkit-common": "1.7.8", - "@reown/appkit-wallet": "1.7.8", - "@walletconnect/universal-provider": "2.21.0", - "valtio": "1.13.2", - "viem": ">=2.29.0" - } - }, - "node_modules/@walletconnect/ethereum-provider/node_modules/@reown/appkit-controllers/node_modules/@walletconnect/core": { - "version": "2.21.0", - "resolved": "https://registry.npmjs.org/@walletconnect/core/-/core-2.21.0.tgz", - "integrity": "sha512-o6R7Ua4myxR8aRUAJ1z3gT9nM+jd2B2mfamu6arzy1Cc6vi10fIwFWb6vg3bC8xJ6o9H3n/cN5TOW3aA9Y1XVw==", - "license": "Apache-2.0", - "optional": true, - "peer": true, - "dependencies": { - "@walletconnect/heartbeat": "1.2.2", - "@walletconnect/jsonrpc-provider": "1.0.14", - "@walletconnect/jsonrpc-types": "1.0.4", - "@walletconnect/jsonrpc-utils": "1.0.8", - "@walletconnect/jsonrpc-ws-connection": "1.0.16", - "@walletconnect/keyvaluestorage": "1.1.1", - "@walletconnect/logger": "2.1.2", - "@walletconnect/relay-api": "1.0.11", - "@walletconnect/relay-auth": "1.1.0", - "@walletconnect/safe-json": "1.0.2", - "@walletconnect/time": "1.0.2", - "@walletconnect/types": "2.21.0", - "@walletconnect/utils": "2.21.0", - "@walletconnect/window-getters": "1.0.1", - "es-toolkit": "1.33.0", - "events": "3.3.0", - "uint8arrays": "3.1.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@walletconnect/ethereum-provider/node_modules/@reown/appkit-controllers/node_modules/@walletconnect/sign-client": { - "version": "2.21.0", - "resolved": "https://registry.npmjs.org/@walletconnect/sign-client/-/sign-client-2.21.0.tgz", - "integrity": "sha512-z7h+PeLa5Au2R591d/8ZlziE0stJvdzP9jNFzFolf2RG/OiXulgFKum8PrIyXy+Rg2q95U9nRVUF9fWcn78yBA==", - "deprecated": "Reliability and performance improvements. See: https://github.com/WalletConnect/walletconnect-monorepo/releases", - "license": "Apache-2.0", - "optional": true, - "peer": true, - "dependencies": { - "@walletconnect/core": "2.21.0", - "@walletconnect/events": "1.0.1", - "@walletconnect/heartbeat": "1.2.2", - "@walletconnect/jsonrpc-utils": "1.0.8", - "@walletconnect/logger": "2.1.2", - "@walletconnect/time": "1.0.2", - "@walletconnect/types": "2.21.0", - "@walletconnect/utils": "2.21.0", - "events": "3.3.0" - } - }, - "node_modules/@walletconnect/ethereum-provider/node_modules/@reown/appkit-controllers/node_modules/@walletconnect/types": { - "version": "2.21.0", - "resolved": "https://registry.npmjs.org/@walletconnect/types/-/types-2.21.0.tgz", - "integrity": "sha512-ll+9upzqt95ZBWcfkOszXZkfnpbJJ2CmxMfGgE5GmhdxxxCcO5bGhXkI+x8OpiS555RJ/v/sXJYMSOLkmu4fFw==", - "license": "Apache-2.0", - "optional": true, - "peer": true, - "dependencies": { - "@walletconnect/events": "1.0.1", - "@walletconnect/heartbeat": "1.2.2", - "@walletconnect/jsonrpc-types": "1.0.4", - "@walletconnect/keyvaluestorage": "1.1.1", - "@walletconnect/logger": "2.1.2", - "events": "3.3.0" - } - }, - "node_modules/@walletconnect/ethereum-provider/node_modules/@reown/appkit-controllers/node_modules/@walletconnect/universal-provider": { - "version": "2.21.0", - "resolved": "https://registry.npmjs.org/@walletconnect/universal-provider/-/universal-provider-2.21.0.tgz", - "integrity": "sha512-mtUQvewt+X0VBQay/xOJBvxsB3Xsm1lTwFjZ6WUwSOTR1X+FNb71hSApnV5kbsdDIpYPXeQUbGt2se1n5E5UBg==", - "deprecated": "Reliability and performance improvements. See: https://github.com/WalletConnect/walletconnect-monorepo/releases", - "license": "Apache-2.0", - "optional": true, - "peer": true, - "dependencies": { - "@walletconnect/events": "1.0.1", - "@walletconnect/jsonrpc-http-connection": "1.0.8", - "@walletconnect/jsonrpc-provider": "1.0.14", - "@walletconnect/jsonrpc-types": "1.0.4", - "@walletconnect/jsonrpc-utils": "1.0.8", - "@walletconnect/keyvaluestorage": "1.1.1", - "@walletconnect/logger": "2.1.2", - "@walletconnect/sign-client": "2.21.0", - "@walletconnect/types": "2.21.0", - "@walletconnect/utils": "2.21.0", - "es-toolkit": "1.33.0", - "events": "3.3.0" - } - }, - "node_modules/@walletconnect/ethereum-provider/node_modules/@reown/appkit-controllers/node_modules/@walletconnect/utils": { - "version": "2.21.0", - "resolved": "https://registry.npmjs.org/@walletconnect/utils/-/utils-2.21.0.tgz", - "integrity": "sha512-zfHLiUoBrQ8rP57HTPXW7rQMnYxYI4gT9yTACxVW6LhIFROTF6/ytm5SKNoIvi4a5nX5dfXG4D9XwQUCu8Ilig==", - "license": "Apache-2.0", - "optional": true, - "peer": true, - "dependencies": { - "@noble/ciphers": "1.2.1", - "@noble/curves": "1.8.1", - "@noble/hashes": "1.7.1", - "@walletconnect/jsonrpc-utils": "1.0.8", - "@walletconnect/keyvaluestorage": "1.1.1", - "@walletconnect/relay-api": "1.0.11", - "@walletconnect/relay-auth": "1.1.0", - "@walletconnect/safe-json": "1.0.2", - "@walletconnect/time": "1.0.2", - "@walletconnect/types": "2.21.0", - "@walletconnect/window-getters": "1.0.1", - "@walletconnect/window-metadata": "1.0.1", - "bs58": "6.0.0", - "detect-browser": "5.3.0", - "query-string": "7.1.3", - "uint8arrays": "3.1.0", - "viem": "2.23.2" - } - }, - "node_modules/@walletconnect/ethereum-provider/node_modules/@reown/appkit-controllers/node_modules/@walletconnect/utils/node_modules/viem": { - "version": "2.23.2", - "resolved": "https://registry.npmjs.org/viem/-/viem-2.23.2.tgz", - "integrity": "sha512-NVmW/E0c5crMOtbEAqMF0e3NmvQykFXhLOc/CkLIXOlzHSA6KXVz3CYVmaKqBF8/xtjsjHAGjdJN3Ru1kFJLaA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/wevm" - } - ], - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "@noble/curves": "1.8.1", - "@noble/hashes": "1.7.1", - "@scure/bip32": "1.6.2", - "@scure/bip39": "1.5.4", - "abitype": "1.0.8", - "isows": "1.0.6", - "ox": "0.6.7", - "ws": "8.18.0" - }, - "peerDependencies": { - "typescript": ">=5.0.4" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@walletconnect/ethereum-provider/node_modules/@reown/appkit-pay": { - "version": "1.7.8", - "resolved": "https://registry.npmjs.org/@reown/appkit-pay/-/appkit-pay-1.7.8.tgz", - "integrity": "sha512-OSGQ+QJkXx0FEEjlpQqIhT8zGJKOoHzVnyy/0QFrl3WrQTjCzg0L6+i91Ad5Iy1zb6V5JjqtfIFpRVRWN4M3pw==", - "license": "Apache-2.0", - "optional": true, - "peer": true, - "dependencies": { - "@reown/appkit-common": "1.7.8", - "@reown/appkit-controllers": "1.7.8", - "@reown/appkit-ui": "1.7.8", - "@reown/appkit-utils": "1.7.8", - "lit": "3.3.0", - "valtio": "1.13.2" - } - }, - "node_modules/@walletconnect/ethereum-provider/node_modules/@reown/appkit-polyfills": { - "version": "1.7.8", - "resolved": "https://registry.npmjs.org/@reown/appkit-polyfills/-/appkit-polyfills-1.7.8.tgz", - "integrity": "sha512-W/kq786dcHHAuJ3IV2prRLEgD/2iOey4ueMHf1sIFjhhCGMynMkhsOhQMUH0tzodPqUgAC494z4bpIDYjwWXaA==", - "license": "Apache-2.0", - "optional": true, - "peer": true, - "dependencies": { - "buffer": "6.0.3" - } - }, - "node_modules/@walletconnect/ethereum-provider/node_modules/@reown/appkit-scaffold-ui": { - "version": "1.7.8", - "resolved": "https://registry.npmjs.org/@reown/appkit-scaffold-ui/-/appkit-scaffold-ui-1.7.8.tgz", - "integrity": "sha512-RCeHhAwOrIgcvHwYlNWMcIDibdI91waaoEYBGw71inE0kDB8uZbE7tE6DAXJmDkvl0qPh+DqlC4QbJLF1FVYdQ==", - "license": "Apache-2.0", - "optional": true, - "peer": true, - "dependencies": { - "@reown/appkit-common": "1.7.8", - "@reown/appkit-controllers": "1.7.8", - "@reown/appkit-ui": "1.7.8", - "@reown/appkit-utils": "1.7.8", - "@reown/appkit-wallet": "1.7.8", - "lit": "3.3.0" - } - }, - "node_modules/@walletconnect/ethereum-provider/node_modules/@reown/appkit-ui": { - "version": "1.7.8", - "resolved": "https://registry.npmjs.org/@reown/appkit-ui/-/appkit-ui-1.7.8.tgz", - "integrity": "sha512-1hjCKjf6FLMFzrulhl0Y9Vb9Fu4royE+SXCPSWh4VhZhWqlzUFc7kutnZKx8XZFVQH4pbBvY62SpRC93gqoHow==", - "license": "Apache-2.0", - "optional": true, - "peer": true, - "dependencies": { - "@reown/appkit-common": "1.7.8", - "@reown/appkit-controllers": "1.7.8", - "@reown/appkit-wallet": "1.7.8", - "lit": "3.3.0", - "qrcode": "1.5.3" - } - }, - "node_modules/@walletconnect/ethereum-provider/node_modules/@reown/appkit-utils": { - "version": "1.7.8", - "resolved": "https://registry.npmjs.org/@reown/appkit-utils/-/appkit-utils-1.7.8.tgz", - "integrity": "sha512-8X7UvmE8GiaoitCwNoB86pttHgQtzy4ryHZM9kQpvjQ0ULpiER44t1qpVLXNM4X35O0v18W0Dk60DnYRMH2WRw==", - "license": "Apache-2.0", - "optional": true, - "peer": true, - "dependencies": { - "@reown/appkit-common": "1.7.8", - "@reown/appkit-controllers": "1.7.8", - "@reown/appkit-polyfills": "1.7.8", - "@reown/appkit-wallet": "1.7.8", - "@walletconnect/logger": "2.1.2", - "@walletconnect/universal-provider": "2.21.0", - "valtio": "1.13.2", - "viem": ">=2.29.0" - }, - "peerDependencies": { - "valtio": "1.13.2" - } - }, - "node_modules/@walletconnect/ethereum-provider/node_modules/@reown/appkit-utils/node_modules/@walletconnect/core": { - "version": "2.21.0", - "resolved": "https://registry.npmjs.org/@walletconnect/core/-/core-2.21.0.tgz", - "integrity": "sha512-o6R7Ua4myxR8aRUAJ1z3gT9nM+jd2B2mfamu6arzy1Cc6vi10fIwFWb6vg3bC8xJ6o9H3n/cN5TOW3aA9Y1XVw==", - "license": "Apache-2.0", - "optional": true, - "peer": true, - "dependencies": { - "@walletconnect/heartbeat": "1.2.2", - "@walletconnect/jsonrpc-provider": "1.0.14", - "@walletconnect/jsonrpc-types": "1.0.4", - "@walletconnect/jsonrpc-utils": "1.0.8", - "@walletconnect/jsonrpc-ws-connection": "1.0.16", - "@walletconnect/keyvaluestorage": "1.1.1", - "@walletconnect/logger": "2.1.2", - "@walletconnect/relay-api": "1.0.11", - "@walletconnect/relay-auth": "1.1.0", - "@walletconnect/safe-json": "1.0.2", - "@walletconnect/time": "1.0.2", - "@walletconnect/types": "2.21.0", - "@walletconnect/utils": "2.21.0", - "@walletconnect/window-getters": "1.0.1", - "es-toolkit": "1.33.0", - "events": "3.3.0", - "uint8arrays": "3.1.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@walletconnect/ethereum-provider/node_modules/@reown/appkit-utils/node_modules/@walletconnect/sign-client": { - "version": "2.21.0", - "resolved": "https://registry.npmjs.org/@walletconnect/sign-client/-/sign-client-2.21.0.tgz", - "integrity": "sha512-z7h+PeLa5Au2R591d/8ZlziE0stJvdzP9jNFzFolf2RG/OiXulgFKum8PrIyXy+Rg2q95U9nRVUF9fWcn78yBA==", - "deprecated": "Reliability and performance improvements. See: https://github.com/WalletConnect/walletconnect-monorepo/releases", - "license": "Apache-2.0", - "optional": true, - "peer": true, - "dependencies": { - "@walletconnect/core": "2.21.0", - "@walletconnect/events": "1.0.1", - "@walletconnect/heartbeat": "1.2.2", - "@walletconnect/jsonrpc-utils": "1.0.8", - "@walletconnect/logger": "2.1.2", - "@walletconnect/time": "1.0.2", - "@walletconnect/types": "2.21.0", - "@walletconnect/utils": "2.21.0", - "events": "3.3.0" - } - }, - "node_modules/@walletconnect/ethereum-provider/node_modules/@reown/appkit-utils/node_modules/@walletconnect/types": { - "version": "2.21.0", - "resolved": "https://registry.npmjs.org/@walletconnect/types/-/types-2.21.0.tgz", - "integrity": "sha512-ll+9upzqt95ZBWcfkOszXZkfnpbJJ2CmxMfGgE5GmhdxxxCcO5bGhXkI+x8OpiS555RJ/v/sXJYMSOLkmu4fFw==", - "license": "Apache-2.0", - "optional": true, - "peer": true, - "dependencies": { - "@walletconnect/events": "1.0.1", - "@walletconnect/heartbeat": "1.2.2", - "@walletconnect/jsonrpc-types": "1.0.4", - "@walletconnect/keyvaluestorage": "1.1.1", - "@walletconnect/logger": "2.1.2", - "events": "3.3.0" - } - }, - "node_modules/@walletconnect/ethereum-provider/node_modules/@reown/appkit-utils/node_modules/@walletconnect/universal-provider": { - "version": "2.21.0", - "resolved": "https://registry.npmjs.org/@walletconnect/universal-provider/-/universal-provider-2.21.0.tgz", - "integrity": "sha512-mtUQvewt+X0VBQay/xOJBvxsB3Xsm1lTwFjZ6WUwSOTR1X+FNb71hSApnV5kbsdDIpYPXeQUbGt2se1n5E5UBg==", - "deprecated": "Reliability and performance improvements. See: https://github.com/WalletConnect/walletconnect-monorepo/releases", - "license": "Apache-2.0", - "optional": true, - "peer": true, - "dependencies": { - "@walletconnect/events": "1.0.1", - "@walletconnect/jsonrpc-http-connection": "1.0.8", - "@walletconnect/jsonrpc-provider": "1.0.14", - "@walletconnect/jsonrpc-types": "1.0.4", - "@walletconnect/jsonrpc-utils": "1.0.8", - "@walletconnect/keyvaluestorage": "1.1.1", - "@walletconnect/logger": "2.1.2", - "@walletconnect/sign-client": "2.21.0", - "@walletconnect/types": "2.21.0", - "@walletconnect/utils": "2.21.0", - "es-toolkit": "1.33.0", - "events": "3.3.0" - } - }, - "node_modules/@walletconnect/ethereum-provider/node_modules/@reown/appkit-utils/node_modules/@walletconnect/utils": { - "version": "2.21.0", - "resolved": "https://registry.npmjs.org/@walletconnect/utils/-/utils-2.21.0.tgz", - "integrity": "sha512-zfHLiUoBrQ8rP57HTPXW7rQMnYxYI4gT9yTACxVW6LhIFROTF6/ytm5SKNoIvi4a5nX5dfXG4D9XwQUCu8Ilig==", - "license": "Apache-2.0", - "optional": true, - "peer": true, - "dependencies": { - "@noble/ciphers": "1.2.1", - "@noble/curves": "1.8.1", - "@noble/hashes": "1.7.1", - "@walletconnect/jsonrpc-utils": "1.0.8", - "@walletconnect/keyvaluestorage": "1.1.1", - "@walletconnect/relay-api": "1.0.11", - "@walletconnect/relay-auth": "1.1.0", - "@walletconnect/safe-json": "1.0.2", - "@walletconnect/time": "1.0.2", - "@walletconnect/types": "2.21.0", - "@walletconnect/window-getters": "1.0.1", - "@walletconnect/window-metadata": "1.0.1", - "bs58": "6.0.0", - "detect-browser": "5.3.0", - "query-string": "7.1.3", - "uint8arrays": "3.1.0", - "viem": "2.23.2" - } - }, - "node_modules/@walletconnect/ethereum-provider/node_modules/@reown/appkit-utils/node_modules/@walletconnect/utils/node_modules/viem": { - "version": "2.23.2", - "resolved": "https://registry.npmjs.org/viem/-/viem-2.23.2.tgz", - "integrity": "sha512-NVmW/E0c5crMOtbEAqMF0e3NmvQykFXhLOc/CkLIXOlzHSA6KXVz3CYVmaKqBF8/xtjsjHAGjdJN3Ru1kFJLaA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/wevm" - } - ], - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "@noble/curves": "1.8.1", - "@noble/hashes": "1.7.1", - "@scure/bip32": "1.6.2", - "@scure/bip39": "1.5.4", - "abitype": "1.0.8", - "isows": "1.0.6", - "ox": "0.6.7", - "ws": "8.18.0" - }, - "peerDependencies": { - "typescript": ">=5.0.4" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@walletconnect/ethereum-provider/node_modules/@reown/appkit-wallet": { - "version": "1.7.8", - "resolved": "https://registry.npmjs.org/@reown/appkit-wallet/-/appkit-wallet-1.7.8.tgz", - "integrity": "sha512-kspz32EwHIOT/eg/ZQbFPxgXq0B/olDOj3YMu7gvLEFz4xyOFd/wgzxxAXkp5LbG4Cp++s/elh79rVNmVFdB9A==", - "license": "Apache-2.0", - "optional": true, - "peer": true, - "dependencies": { - "@reown/appkit-common": "1.7.8", - "@reown/appkit-polyfills": "1.7.8", - "@walletconnect/logger": "2.1.2", - "zod": "3.22.4" - } - }, - "node_modules/@walletconnect/ethereum-provider/node_modules/@reown/appkit/node_modules/@walletconnect/core": { - "version": "2.21.0", - "resolved": "https://registry.npmjs.org/@walletconnect/core/-/core-2.21.0.tgz", - "integrity": "sha512-o6R7Ua4myxR8aRUAJ1z3gT9nM+jd2B2mfamu6arzy1Cc6vi10fIwFWb6vg3bC8xJ6o9H3n/cN5TOW3aA9Y1XVw==", - "license": "Apache-2.0", - "optional": true, - "peer": true, - "dependencies": { - "@walletconnect/heartbeat": "1.2.2", - "@walletconnect/jsonrpc-provider": "1.0.14", - "@walletconnect/jsonrpc-types": "1.0.4", - "@walletconnect/jsonrpc-utils": "1.0.8", - "@walletconnect/jsonrpc-ws-connection": "1.0.16", - "@walletconnect/keyvaluestorage": "1.1.1", - "@walletconnect/logger": "2.1.2", - "@walletconnect/relay-api": "1.0.11", - "@walletconnect/relay-auth": "1.1.0", - "@walletconnect/safe-json": "1.0.2", - "@walletconnect/time": "1.0.2", - "@walletconnect/types": "2.21.0", - "@walletconnect/utils": "2.21.0", - "@walletconnect/window-getters": "1.0.1", - "es-toolkit": "1.33.0", - "events": "3.3.0", - "uint8arrays": "3.1.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/@walletconnect/ethereum-provider/node_modules/@reown/appkit/node_modules/@walletconnect/sign-client": { - "version": "2.21.0", - "resolved": "https://registry.npmjs.org/@walletconnect/sign-client/-/sign-client-2.21.0.tgz", - "integrity": "sha512-z7h+PeLa5Au2R591d/8ZlziE0stJvdzP9jNFzFolf2RG/OiXulgFKum8PrIyXy+Rg2q95U9nRVUF9fWcn78yBA==", - "deprecated": "Reliability and performance improvements. See: https://github.com/WalletConnect/walletconnect-monorepo/releases", - "license": "Apache-2.0", - "optional": true, - "peer": true, - "dependencies": { - "@walletconnect/core": "2.21.0", - "@walletconnect/events": "1.0.1", - "@walletconnect/heartbeat": "1.2.2", - "@walletconnect/jsonrpc-utils": "1.0.8", - "@walletconnect/logger": "2.1.2", - "@walletconnect/time": "1.0.2", - "@walletconnect/types": "2.21.0", - "@walletconnect/utils": "2.21.0", - "events": "3.3.0" - } - }, - "node_modules/@walletconnect/ethereum-provider/node_modules/@reown/appkit/node_modules/@walletconnect/types": { - "version": "2.21.0", - "resolved": "https://registry.npmjs.org/@walletconnect/types/-/types-2.21.0.tgz", - "integrity": "sha512-ll+9upzqt95ZBWcfkOszXZkfnpbJJ2CmxMfGgE5GmhdxxxCcO5bGhXkI+x8OpiS555RJ/v/sXJYMSOLkmu4fFw==", - "license": "Apache-2.0", - "optional": true, - "peer": true, - "dependencies": { - "@walletconnect/events": "1.0.1", - "@walletconnect/heartbeat": "1.2.2", - "@walletconnect/jsonrpc-types": "1.0.4", - "@walletconnect/keyvaluestorage": "1.1.1", - "@walletconnect/logger": "2.1.2", - "events": "3.3.0" - } - }, - "node_modules/@walletconnect/ethereum-provider/node_modules/@reown/appkit/node_modules/@walletconnect/universal-provider": { - "version": "2.21.0", - "resolved": "https://registry.npmjs.org/@walletconnect/universal-provider/-/universal-provider-2.21.0.tgz", - "integrity": "sha512-mtUQvewt+X0VBQay/xOJBvxsB3Xsm1lTwFjZ6WUwSOTR1X+FNb71hSApnV5kbsdDIpYPXeQUbGt2se1n5E5UBg==", - "deprecated": "Reliability and performance improvements. See: https://github.com/WalletConnect/walletconnect-monorepo/releases", - "license": "Apache-2.0", - "optional": true, - "peer": true, - "dependencies": { - "@walletconnect/events": "1.0.1", - "@walletconnect/jsonrpc-http-connection": "1.0.8", - "@walletconnect/jsonrpc-provider": "1.0.14", - "@walletconnect/jsonrpc-types": "1.0.4", - "@walletconnect/jsonrpc-utils": "1.0.8", - "@walletconnect/keyvaluestorage": "1.1.1", - "@walletconnect/logger": "2.1.2", - "@walletconnect/sign-client": "2.21.0", - "@walletconnect/types": "2.21.0", - "@walletconnect/utils": "2.21.0", - "es-toolkit": "1.33.0", - "events": "3.3.0" - } - }, - "node_modules/@walletconnect/ethereum-provider/node_modules/@reown/appkit/node_modules/@walletconnect/utils": { - "version": "2.21.0", - "resolved": "https://registry.npmjs.org/@walletconnect/utils/-/utils-2.21.0.tgz", - "integrity": "sha512-zfHLiUoBrQ8rP57HTPXW7rQMnYxYI4gT9yTACxVW6LhIFROTF6/ytm5SKNoIvi4a5nX5dfXG4D9XwQUCu8Ilig==", - "license": "Apache-2.0", - "optional": true, - "peer": true, - "dependencies": { - "@noble/ciphers": "1.2.1", - "@noble/curves": "1.8.1", - "@noble/hashes": "1.7.1", - "@walletconnect/jsonrpc-utils": "1.0.8", - "@walletconnect/keyvaluestorage": "1.1.1", - "@walletconnect/relay-api": "1.0.11", - "@walletconnect/relay-auth": "1.1.0", - "@walletconnect/safe-json": "1.0.2", - "@walletconnect/time": "1.0.2", - "@walletconnect/types": "2.21.0", - "@walletconnect/window-getters": "1.0.1", - "@walletconnect/window-metadata": "1.0.1", - "bs58": "6.0.0", - "detect-browser": "5.3.0", - "query-string": "7.1.3", - "uint8arrays": "3.1.0", - "viem": "2.23.2" - } - }, - "node_modules/@walletconnect/ethereum-provider/node_modules/@reown/appkit/node_modules/@walletconnect/utils/node_modules/viem": { - "version": "2.23.2", - "resolved": "https://registry.npmjs.org/viem/-/viem-2.23.2.tgz", - "integrity": "sha512-NVmW/E0c5crMOtbEAqMF0e3NmvQykFXhLOc/CkLIXOlzHSA6KXVz3CYVmaKqBF8/xtjsjHAGjdJN3Ru1kFJLaA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/wevm" - } - ], - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "@noble/curves": "1.8.1", - "@noble/hashes": "1.7.1", - "@scure/bip32": "1.6.2", - "@scure/bip39": "1.5.4", - "abitype": "1.0.8", - "isows": "1.0.6", - "ox": "0.6.7", - "ws": "8.18.0" - }, + "funding": { + "url": "https://github.com/sponsors/wevm" + }, "peerDependencies": { - "typescript": ">=5.0.4" + "@tanstack/query-core": ">=5.0.0", + "typescript": ">=5.7.3", + "viem": "2.x" }, "peerDependenciesMeta": { + "@tanstack/query-core": { + "optional": true + }, "typescript": { "optional": true } } }, - "node_modules/@walletconnect/ethereum-provider/node_modules/@scure/bip32": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.6.2.tgz", - "integrity": "sha512-t96EPDMbtGgtb7onKKqxRLfE5g05k7uHnHRM2xdE6BP/ZmxaLtPek4J4KfVn/90IQNrU1IOAqMgiDtUdtbe3nw==", + "node_modules/@wagmi/core/node_modules/zustand": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/zustand/-/zustand-5.0.0.tgz", + "integrity": "sha512-LE+VcmbartOPM+auOjCCLQOsQ05zUTp8RkgwRzefUk+2jISdMMFnxvyTjA4YNWr5ZGXYbVsEMZosttuxUBkojQ==", "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "@noble/curves": "~1.8.1", - "@noble/hashes": "~1.7.1", - "@scure/base": "~1.2.2" + "engines": { + "node": ">=12.20.0" }, - "funding": { - "url": "https://paulmillr.com/funding/" + "peerDependencies": { + "@types/react": ">=18.0.0", + "immer": ">=9.0.6", + "react": ">=18.0.0", + "use-sync-external-store": ">=1.2.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "immer": { + "optional": true + }, + "react": { + "optional": true + }, + "use-sync-external-store": { + "optional": true + } } }, - "node_modules/@walletconnect/ethereum-provider/node_modules/@scure/bip39": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.5.4.tgz", - "integrity": "sha512-TFM4ni0vKvCfBpohoh+/lY05i9gRbSwXWngAsF4CABQxoaOHijxuaZ2R6cStDQ5CHtHO9aGJTr4ksVJASRRyMA==", - "license": "MIT", - "optional": true, - "peer": true, + "node_modules/@wallet-standard/base": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@wallet-standard/base/-/base-1.1.0.tgz", + "integrity": "sha512-DJDQhjKmSNVLKWItoKThJS+CsJQjR9AOBOirBVT1F9YpRyC9oYHE+ZnSf8y8bxUphtKqdQMPVQ2mHohYdRvDVQ==", + "license": "Apache-2.0", + "engines": { + "node": ">=16" + } + }, + "node_modules/@wallet-standard/wallet": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@wallet-standard/wallet/-/wallet-1.1.0.tgz", + "integrity": "sha512-Gt8TnSlDZpAl+RWOOAB/kuvC7RpcdWAlFbHNoi4gsXsfaWa1QCT6LBcfIYTPdOZC9OVZUDwqGuGAcqZejDmHjg==", + "license": "Apache-2.0", "dependencies": { - "@noble/hashes": "~1.7.1", - "@scure/base": "~1.2.4" + "@wallet-standard/base": "^1.1.0" }, - "funding": { - "url": "https://paulmillr.com/funding/" + "engines": { + "node": ">=16" } }, - "node_modules/@walletconnect/ethereum-provider/node_modules/@walletconnect/core": { - "version": "2.21.1", - "resolved": "https://registry.npmjs.org/@walletconnect/core/-/core-2.21.1.tgz", - "integrity": "sha512-Tp4MHJYcdWD846PH//2r+Mu4wz1/ZU/fr9av1UWFiaYQ2t2TPLDiZxjLw54AAEpMqlEHemwCgiRiAmjR1NDdTQ==", - "license": "Apache-2.0", - "optional": true, - "peer": true, + "node_modules/@walletconnect/core": { + "version": "2.23.0", + "resolved": "https://registry.npmjs.org/@walletconnect/core/-/core-2.23.0.tgz", + "integrity": "sha512-W++xuXf+AsMPrBWn1It8GheIbCTp1ynTQP+aoFB86eUwyCtSiK7UQsn/+vJZdwElrn+Ptp2A0RqQx2onTMVHjQ==", + "license": "SEE LICENSE IN LICENSE.md", "dependencies": { "@walletconnect/heartbeat": "1.2.2", "@walletconnect/jsonrpc-provider": "1.0.14", @@ -5576,29 +4107,27 @@ "@walletconnect/jsonrpc-utils": "1.0.8", "@walletconnect/jsonrpc-ws-connection": "1.0.16", "@walletconnect/keyvaluestorage": "1.1.1", - "@walletconnect/logger": "2.1.2", + "@walletconnect/logger": "3.0.0", "@walletconnect/relay-api": "1.0.11", "@walletconnect/relay-auth": "1.1.0", "@walletconnect/safe-json": "1.0.2", "@walletconnect/time": "1.0.2", - "@walletconnect/types": "2.21.1", - "@walletconnect/utils": "2.21.1", + "@walletconnect/types": "2.23.0", + "@walletconnect/utils": "2.23.0", "@walletconnect/window-getters": "1.0.1", - "es-toolkit": "1.33.0", + "es-toolkit": "1.39.3", "events": "3.3.0", - "uint8arrays": "3.1.0" + "uint8arrays": "3.1.1" }, "engines": { - "node": ">=18" + "node": ">=18.20.8" } }, - "node_modules/@walletconnect/ethereum-provider/node_modules/@walletconnect/keyvaluestorage": { + "node_modules/@walletconnect/core/node_modules/@walletconnect/keyvaluestorage": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/@walletconnect/keyvaluestorage/-/keyvaluestorage-1.1.1.tgz", "integrity": "sha512-V7ZQq2+mSxAq7MrRqDxanTzu2RcElfK1PfNYiaVnJgJ7Q7G7hTVwF8voIBx92qsRyGHZihrwNPHuZd1aKkd0rA==", "license": "MIT", - "optional": true, - "peer": true, "dependencies": { "@walletconnect/safe-json": "^1.0.1", "idb-keyval": "^6.2.1", @@ -5613,311 +4142,26 @@ } } }, - "node_modules/@walletconnect/ethereum-provider/node_modules/@walletconnect/logger": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@walletconnect/logger/-/logger-2.1.2.tgz", - "integrity": "sha512-aAb28I3S6pYXZHQm5ESB+V6rDqIYfsnHaQyzFbwUUBFY4H0OXx/YtTl8lvhUNhMMfb9UxbwEBS253TlXUYJWSw==", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "@walletconnect/safe-json": "^1.0.2", - "pino": "7.11.0" - } - }, - "node_modules/@walletconnect/ethereum-provider/node_modules/@walletconnect/sign-client": { - "version": "2.21.1", - "resolved": "https://registry.npmjs.org/@walletconnect/sign-client/-/sign-client-2.21.1.tgz", - "integrity": "sha512-QaXzmPsMnKGV6tc4UcdnQVNOz4zyXgarvdIQibJ4L3EmLat73r5ZVl4c0cCOcoaV7rgM9Wbphgu5E/7jNcd3Zg==", - "deprecated": "Reliability and performance improvements. See: https://github.com/WalletConnect/walletconnect-monorepo/releases", - "license": "Apache-2.0", - "optional": true, - "peer": true, - "dependencies": { - "@walletconnect/core": "2.21.1", - "@walletconnect/events": "1.0.1", - "@walletconnect/heartbeat": "1.2.2", - "@walletconnect/jsonrpc-utils": "1.0.8", - "@walletconnect/logger": "2.1.2", - "@walletconnect/time": "1.0.2", - "@walletconnect/types": "2.21.1", - "@walletconnect/utils": "2.21.1", - "events": "3.3.0" - } - }, - "node_modules/@walletconnect/ethereum-provider/node_modules/@walletconnect/types": { - "version": "2.21.1", - "resolved": "https://registry.npmjs.org/@walletconnect/types/-/types-2.21.1.tgz", - "integrity": "sha512-UeefNadqP6IyfwWC1Yi7ux+ljbP2R66PLfDrDm8izmvlPmYlqRerJWJvYO4t0Vvr9wrG4Ko7E0c4M7FaPKT/sQ==", - "license": "Apache-2.0", - "optional": true, - "peer": true, - "dependencies": { - "@walletconnect/events": "1.0.1", - "@walletconnect/heartbeat": "1.2.2", - "@walletconnect/jsonrpc-types": "1.0.4", - "@walletconnect/keyvaluestorage": "1.1.1", - "@walletconnect/logger": "2.1.2", - "events": "3.3.0" - } - }, - "node_modules/@walletconnect/ethereum-provider/node_modules/@walletconnect/universal-provider": { - "version": "2.21.1", - "resolved": "https://registry.npmjs.org/@walletconnect/universal-provider/-/universal-provider-2.21.1.tgz", - "integrity": "sha512-Wjx9G8gUHVMnYfxtasC9poGm8QMiPCpXpbbLFT+iPoQskDDly8BwueWnqKs4Mx2SdIAWAwuXeZ5ojk5qQOxJJg==", - "deprecated": "Reliability and performance improvements. See: https://github.com/WalletConnect/walletconnect-monorepo/releases", - "license": "Apache-2.0", - "optional": true, - "peer": true, - "dependencies": { - "@walletconnect/events": "1.0.1", - "@walletconnect/jsonrpc-http-connection": "1.0.8", - "@walletconnect/jsonrpc-provider": "1.0.14", - "@walletconnect/jsonrpc-types": "1.0.4", - "@walletconnect/jsonrpc-utils": "1.0.8", - "@walletconnect/keyvaluestorage": "1.1.1", - "@walletconnect/logger": "2.1.2", - "@walletconnect/sign-client": "2.21.1", - "@walletconnect/types": "2.21.1", - "@walletconnect/utils": "2.21.1", - "es-toolkit": "1.33.0", - "events": "3.3.0" - } - }, - "node_modules/@walletconnect/ethereum-provider/node_modules/@walletconnect/utils": { - "version": "2.21.1", - "resolved": "https://registry.npmjs.org/@walletconnect/utils/-/utils-2.21.1.tgz", - "integrity": "sha512-VPZvTcrNQCkbGOjFRbC24mm/pzbRMUq2DSQoiHlhh0X1U7ZhuIrzVtAoKsrzu6rqjz0EEtGxCr3K1TGRqDG4NA==", - "license": "Apache-2.0", - "optional": true, - "peer": true, - "dependencies": { - "@noble/ciphers": "1.2.1", - "@noble/curves": "1.8.1", - "@noble/hashes": "1.7.1", - "@walletconnect/jsonrpc-utils": "1.0.8", - "@walletconnect/keyvaluestorage": "1.1.1", - "@walletconnect/relay-api": "1.0.11", - "@walletconnect/relay-auth": "1.1.0", - "@walletconnect/safe-json": "1.0.2", - "@walletconnect/time": "1.0.2", - "@walletconnect/types": "2.21.1", - "@walletconnect/window-getters": "1.0.1", - "@walletconnect/window-metadata": "1.0.1", - "bs58": "6.0.0", - "detect-browser": "5.3.0", - "query-string": "7.1.3", - "uint8arrays": "3.1.0", - "viem": "2.23.2" - } - }, - "node_modules/@walletconnect/ethereum-provider/node_modules/@walletconnect/utils/node_modules/viem": { - "version": "2.23.2", - "resolved": "https://registry.npmjs.org/viem/-/viem-2.23.2.tgz", - "integrity": "sha512-NVmW/E0c5crMOtbEAqMF0e3NmvQykFXhLOc/CkLIXOlzHSA6KXVz3CYVmaKqBF8/xtjsjHAGjdJN3Ru1kFJLaA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/wevm" - } - ], - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "@noble/curves": "1.8.1", - "@noble/hashes": "1.7.1", - "@scure/bip32": "1.6.2", - "@scure/bip39": "1.5.4", - "abitype": "1.0.8", - "isows": "1.0.6", - "ox": "0.6.7", - "ws": "8.18.0" - }, - "peerDependencies": { - "typescript": ">=5.0.4" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@walletconnect/ethereum-provider/node_modules/abitype": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/abitype/-/abitype-1.0.8.tgz", - "integrity": "sha512-ZeiI6h3GnW06uYDLx0etQtX/p8E24UaHHBj57RSjK7YBFe7iuVn07EDpOeP451D06sF27VOz9JJPlIKJmXgkEg==", - "license": "MIT", - "optional": true, - "peer": true, - "funding": { - "url": "https://github.com/sponsors/wevm" - }, - "peerDependencies": { - "typescript": ">=5.0.4", - "zod": "^3 >=3.22.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - }, - "zod": { - "optional": true - } - } - }, - "node_modules/@walletconnect/ethereum-provider/node_modules/chokidar": { + "node_modules/@walletconnect/core/node_modules/chokidar": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", - "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "readdirp": "^4.0.1" - }, - "engines": { - "node": ">= 14.16.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/@walletconnect/ethereum-provider/node_modules/es-toolkit": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/es-toolkit/-/es-toolkit-1.33.0.tgz", - "integrity": "sha512-X13Q/ZSc+vsO1q600bvNK4bxgXMkHcf//RxCmYDaRY5DAcT+eoXjY5hoAPGMdRnWQjvyLEcyauG3b6hz76LNqg==", - "license": "MIT", - "optional": true, - "peer": true, - "workspaces": [ - "docs", - "benchmarks" - ] - }, - "node_modules/@walletconnect/ethereum-provider/node_modules/isows": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/isows/-/isows-1.0.6.tgz", - "integrity": "sha512-lPHCayd40oW98/I0uvgaHKWCSvkzY27LjWLbtzOm64yQ+G3Q5npjjbdppU65iZXkK1Zt+kH9pfegli0AYfwYYw==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/wevm" - } - ], - "license": "MIT", - "optional": true, - "peer": true, - "peerDependencies": { - "ws": "*" - } - }, - "node_modules/@walletconnect/ethereum-provider/node_modules/on-exit-leak-free": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/on-exit-leak-free/-/on-exit-leak-free-0.2.0.tgz", - "integrity": "sha512-dqaz3u44QbRXQooZLTUKU41ZrzYrcvLISVgbrzbyCMxpmSLJvZ3ZamIJIZ29P6OhZIkNIQKosdeM6t1LYbA9hg==", - "license": "MIT", - "optional": true, - "peer": true - }, - "node_modules/@walletconnect/ethereum-provider/node_modules/ox": { - "version": "0.6.7", - "resolved": "https://registry.npmjs.org/ox/-/ox-0.6.7.tgz", - "integrity": "sha512-17Gk/eFsFRAZ80p5eKqv89a57uXjd3NgIf1CaXojATPBuujVc/fQSVhBeAU9JCRB+k7J50WQAyWTxK19T9GgbA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/wevm" - } - ], - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "@adraffy/ens-normalize": "^1.10.1", - "@noble/curves": "^1.6.0", - "@noble/hashes": "^1.5.0", - "@scure/bip32": "^1.5.0", - "@scure/bip39": "^1.4.0", - "abitype": "^1.0.6", - "eventemitter3": "5.0.1" - }, - "peerDependencies": { - "typescript": ">=5.4.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@walletconnect/ethereum-provider/node_modules/pino": { - "version": "7.11.0", - "resolved": "https://registry.npmjs.org/pino/-/pino-7.11.0.tgz", - "integrity": "sha512-dMACeu63HtRLmCG8VKdy4cShCPKaYDR4youZqoSWLxl5Gu99HUw8bw75thbPv9Nip+H+QYX8o3ZJbTdVZZ2TVg==", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "atomic-sleep": "^1.0.0", - "fast-redact": "^3.0.0", - "on-exit-leak-free": "^0.2.0", - "pino-abstract-transport": "v0.5.0", - "pino-std-serializers": "^4.0.0", - "process-warning": "^1.0.0", - "quick-format-unescaped": "^4.0.3", - "real-require": "^0.1.0", - "safe-stable-stringify": "^2.1.0", - "sonic-boom": "^2.2.1", - "thread-stream": "^0.15.1" - }, - "bin": { - "pino": "bin.js" - } - }, - "node_modules/@walletconnect/ethereum-provider/node_modules/pino-abstract-transport": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/pino-abstract-transport/-/pino-abstract-transport-0.5.0.tgz", - "integrity": "sha512-+KAgmVeqXYbTtU2FScx1XS3kNyfZ5TrXY07V96QnUSFqo2gAqlvmaxH67Lj7SWazqsMabf+58ctdTcBgnOLUOQ==", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "duplexify": "^4.1.2", - "split2": "^4.0.0" - } - }, - "node_modules/@walletconnect/ethereum-provider/node_modules/pino-std-serializers": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/pino-std-serializers/-/pino-std-serializers-4.0.0.tgz", - "integrity": "sha512-cK0pekc1Kjy5w9V2/n+8MkZwusa6EyyxfeQCB799CQRhRt/CqYKiWs5adeu8Shve2ZNffvfC/7J64A2PJo1W/Q==", - "license": "MIT", - "optional": true, - "peer": true - }, - "node_modules/@walletconnect/ethereum-provider/node_modules/process-warning": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/process-warning/-/process-warning-1.0.0.tgz", - "integrity": "sha512-du4wfLyj4yCZq1VupnVSZmRsPJsNuxoDQFdCFHLaYiEbFBD7QE0a+I4D7hOxrVnh78QE/YipFAj9lXHiXocV+Q==", - "license": "MIT", - "optional": true, - "peer": true - }, - "node_modules/@walletconnect/ethereum-provider/node_modules/proxy-compare": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/proxy-compare/-/proxy-compare-2.6.0.tgz", - "integrity": "sha512-8xuCeM3l8yqdmbPoYeLbrAXCBWu19XEYc5/F28f5qOaoAIMyfmBUkl5axiK+x9olUvRlcekvnm98AP9RDngOIw==", + "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", "license": "MIT", - "optional": true, - "peer": true + "dependencies": { + "readdirp": "^4.0.1" + }, + "engines": { + "node": ">= 14.16.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } }, - "node_modules/@walletconnect/ethereum-provider/node_modules/readdirp": { + "node_modules/@walletconnect/core/node_modules/readdirp": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", "license": "MIT", - "optional": true, - "peer": true, "engines": { "node": ">= 14.18.0" }, @@ -5926,57 +4170,11 @@ "url": "https://paulmillr.com/funding/" } }, - "node_modules/@walletconnect/ethereum-provider/node_modules/real-require": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/real-require/-/real-require-0.1.0.tgz", - "integrity": "sha512-r/H9MzAWtrv8aSVjPCMFpDMl5q66GqtmmRkRjpHTsp4zBAa+snZyiQNlMONiUmEJcsnaw0wCauJ2GWODr/aFkg==", - "license": "MIT", - "optional": true, - "peer": true, - "engines": { - "node": ">= 12.13.0" - } - }, - "node_modules/@walletconnect/ethereum-provider/node_modules/sonic-boom": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-2.8.0.tgz", - "integrity": "sha512-kuonw1YOYYNOve5iHdSahXPOK49GqwA+LZhI6Wz/l0rP57iKyXXIHaRagOBHAPmGwJC6od2Z9zgvZ5loSgMlVg==", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "atomic-sleep": "^1.0.0" - } - }, - "node_modules/@walletconnect/ethereum-provider/node_modules/thread-stream": { - "version": "0.15.2", - "resolved": "https://registry.npmjs.org/thread-stream/-/thread-stream-0.15.2.tgz", - "integrity": "sha512-UkEhKIg2pD+fjkHQKyJO3yoIvAP3N6RlNFt2dUhcS1FGvCD1cQa1M/PGknCLFIyZdtJOWQjejp7bdNqmN7zwdA==", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "real-require": "^0.1.0" - } - }, - "node_modules/@walletconnect/ethereum-provider/node_modules/uint8arrays": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/uint8arrays/-/uint8arrays-3.1.0.tgz", - "integrity": "sha512-ei5rfKtoRO8OyOIor2Rz5fhzjThwIHJZ3uyDPnDHTXbP0aMQ1RN/6AI5B5d9dBxJOU+BvOAk7ZQ1xphsX8Lrog==", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "multiformats": "^9.4.2" - } - }, - "node_modules/@walletconnect/ethereum-provider/node_modules/unstorage": { + "node_modules/@walletconnect/core/node_modules/unstorage": { "version": "1.17.3", "resolved": "https://registry.npmjs.org/unstorage/-/unstorage-1.17.3.tgz", "integrity": "sha512-i+JYyy0DoKmQ3FximTHbGadmIYb8JEpq7lxUjnjeB702bCPum0vzo6oy5Mfu0lpqISw7hCyMW2yj4nWC8bqJ3Q==", "license": "MIT", - "optional": true, - "peer": true, "dependencies": { "anymatch": "^3.1.3", "chokidar": "^4.0.3", @@ -6068,77 +4266,13 @@ } } }, - "node_modules/@walletconnect/ethereum-provider/node_modules/use-sync-external-store": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz", - "integrity": "sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==", - "license": "MIT", - "optional": true, - "peer": true, - "peerDependencies": { - "react": "^16.8.0 || ^17.0.0 || ^18.0.0" - } - }, - "node_modules/@walletconnect/ethereum-provider/node_modules/valtio": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/valtio/-/valtio-1.13.2.tgz", - "integrity": "sha512-Qik0o+DSy741TmkqmRfjq+0xpZBXi/Y6+fXZLn0xNF1z/waFMbE3rkivv5Zcf9RrMUp6zswf2J7sbh2KBlba5A==", + "node_modules/@walletconnect/environment": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@walletconnect/environment/-/environment-1.0.1.tgz", + "integrity": "sha512-T426LLZtHj8e8rYnKfzsw1aG6+M0BT1ZxayMdv/p8yM0MU+eJDISqNY3/bccxRr4LrF9csq02Rhqt08Ibl0VRg==", "license": "MIT", - "optional": true, - "peer": true, "dependencies": { - "derive-valtio": "0.1.0", - "proxy-compare": "2.6.0", - "use-sync-external-store": "1.2.0" - }, - "engines": { - "node": ">=12.20.0" - }, - "peerDependencies": { - "@types/react": ">=16.8", - "react": ">=16.8" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - }, - "react": { - "optional": true - } - } - }, - "node_modules/@walletconnect/ethereum-provider/node_modules/ws": { - "version": "8.18.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", - "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", - "license": "MIT", - "optional": true, - "peer": true, - "engines": { - "node": ">=10.0.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": ">=5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, - "node_modules/@walletconnect/ethereum-provider/node_modules/zod": { - "version": "3.22.4", - "resolved": "https://registry.npmjs.org/zod/-/zod-3.22.4.tgz", - "integrity": "sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==", - "license": "MIT", - "optional": true, - "peer": true, - "funding": { - "url": "https://github.com/sponsors/colinhacks" + "tslib": "1.14.1" } }, "node_modules/@walletconnect/events": { @@ -7332,7 +5466,7 @@ "version": "1.0.7", "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "possible-typed-array-names": "^1.0.0" @@ -7635,14 +5769,6 @@ "base-x": "^3.0.2" } }, - "node_modules/bowser": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/bowser/-/bowser-2.13.1.tgz", - "integrity": "sha512-OHawaAbjwx6rqICCKgSG0SAnT05bzd7ppyKLVUITZpANBaaMFBAsaNkto3LoQ31tyFP5kNujE8Cdx85G9VzOkw==", - "license": "MIT", - "optional": true, - "peer": true - }, "node_modules/brace-expansion": { "version": "1.1.12", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", @@ -7771,7 +5897,6 @@ "hasInstallScript": true, "license": "MIT", "optional": true, - "peer": true, "dependencies": { "node-gyp-build": "^4.3.0" }, @@ -7794,7 +5919,7 @@ "version": "1.0.8", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz", "integrity": "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "call-bind-apply-helpers": "^1.0.0", @@ -7827,7 +5952,7 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "call-bind-apply-helpers": "^1.0.2", @@ -8150,28 +6275,6 @@ "integrity": "sha512-+W7VmiVINB+ywl1HGXJXmrqkOhpKrIiVZV6tQuV54ZyQC7MMuBt81Vc336GMLoHBq5hV/F9eXgt5Mnx0Rha5Fg==", "license": "MIT" }, - "node_modules/core-util-is": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", - "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", - "license": "MIT", - "optional": true, - "peer": true - }, - "node_modules/crc-32": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/crc-32/-/crc-32-1.2.2.tgz", - "integrity": "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ==", - "license": "Apache-2.0", - "optional": true, - "peer": true, - "bin": { - "crc32": "bin/crc32.njs" - }, - "engines": { - "node": ">=0.8" - } - }, "node_modules/cross-fetch": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.2.0.tgz", @@ -8232,7 +6335,7 @@ "version": "3.2.3", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz", "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/damerau-levenshtein": { @@ -8331,7 +6434,7 @@ "version": "4.4.3", "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "ms": "^2.1.3" @@ -8354,17 +6457,6 @@ "node": ">=0.10.0" } }, - "node_modules/decode-uri-component": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz", - "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==", - "license": "MIT", - "optional": true, - "peer": true, - "engines": { - "node": ">=0.10" - } - }, "node_modules/dedent": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.7.0.tgz", @@ -8401,7 +6493,7 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "es-define-property": "^1.0.0", @@ -8462,17 +6554,6 @@ "node": ">=0.4.0" } }, - "node_modules/derive-valtio": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/derive-valtio/-/derive-valtio-0.1.0.tgz", - "integrity": "sha512-OCg2UsLbXK7GmmpzMXhYkdO64vhJ1ROUUGaTFyHjVwEdMEcTTRj7W1TxLbSBxdY8QLBPCcp66MTyaSy0RpO17A==", - "license": "MIT", - "optional": true, - "peer": true, - "peerDependencies": { - "valtio": "*" - } - }, "node_modules/destr": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/destr/-/destr-2.0.5.tgz", @@ -8543,20 +6624,6 @@ "node": ">= 0.4" } }, - "node_modules/duplexify": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-4.1.3.tgz", - "integrity": "sha512-M3BmBhwJRZsSx38lZyhE53Csddgzl5R7xGJNk7CVddZD6CcmwMCH8J+7AprIrQKH7TonKxaCjcv27Qmf+sQ+oA==", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "end-of-stream": "^1.4.1", - "inherits": "^2.0.3", - "readable-stream": "^3.1.1", - "stream-shift": "^1.0.2" - } - }, "node_modules/eastasianwidth": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", @@ -8564,39 +6631,6 @@ "dev": true, "license": "MIT" }, - "node_modules/eciesjs": { - "version": "0.4.16", - "resolved": "https://registry.npmjs.org/eciesjs/-/eciesjs-0.4.16.tgz", - "integrity": "sha512-dS5cbA9rA2VR4Ybuvhg6jvdmp46ubLn3E+px8cG/35aEDNclrqoCjg6mt0HYZ/M+OoESS3jSkCrqk1kWAEhWAw==", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "@ecies/ciphers": "^0.2.4", - "@noble/ciphers": "^1.3.0", - "@noble/curves": "^1.9.7", - "@noble/hashes": "^1.8.0" - }, - "engines": { - "bun": ">=1", - "deno": ">=2", - "node": ">=16" - } - }, - "node_modules/eciesjs/node_modules/@noble/hashes": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.8.0.tgz", - "integrity": "sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A==", - "license": "MIT", - "optional": true, - "peer": true, - "engines": { - "node": "^14.21.3 || >=16" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, "node_modules/electron-to-chromium": { "version": "1.5.264", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.264.tgz", @@ -8639,74 +6673,6 @@ "once": "^1.4.0" } }, - "node_modules/engine.io-client": { - "version": "6.6.3", - "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-6.6.3.tgz", - "integrity": "sha512-T0iLjnyNWahNyv/lcjS2y4oE358tVS/SYQNxYXGAJ9/GLgH4VCvOQ/mhTjqU88mLZCQgiG8RIegFHYCdVC+j5w==", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "@socket.io/component-emitter": "~3.1.0", - "debug": "~4.3.1", - "engine.io-parser": "~5.2.1", - "ws": "~8.17.1", - "xmlhttprequest-ssl": "~2.1.1" - } - }, - "node_modules/engine.io-client/node_modules/debug": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", - "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/engine.io-client/node_modules/ws": { - "version": "8.17.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz", - "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==", - "license": "MIT", - "optional": true, - "peer": true, - "engines": { - "node": ">=10.0.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": ">=5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, - "node_modules/engine.io-parser": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.2.3.tgz", - "integrity": "sha512-HqD3yTBfnBxIrbnM1DoD6Pcq8NECnh8d4As1Qgh0z5Gg3jRRIqijury0CL3ghu/edArpUYiYqQiDUQBIs4np3Q==", - "license": "MIT", - "optional": true, - "peer": true, - "engines": { - "node": ">=10.0.0" - } - }, "node_modules/error-ex": { "version": "1.3.4", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.4.tgz", @@ -9424,100 +7390,19 @@ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=4.0" - } - }, - "node_modules/esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/eth-rpc-errors": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/eth-rpc-errors/-/eth-rpc-errors-4.0.3.tgz", - "integrity": "sha512-Z3ymjopaoft7JDoxZcEb3pwdGh7yiYMhOwm2doUt6ASXlMavpNlK6Cre0+IMl2VSGyEU9rkiperQhp5iRxn5Pg==", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "fast-safe-stringify": "^2.0.6" - } - }, - "node_modules/ethereum-cryptography": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ethereum-cryptography/-/ethereum-cryptography-2.2.1.tgz", - "integrity": "sha512-r/W8lkHSiTLxUxW8Rf3u4HGB0xQweG2RyETjywylKZSzLWoWAijRz8WCuOtJ6wah+avllXBqZuk29HCCvhEIRg==", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "@noble/curves": "1.4.2", - "@noble/hashes": "1.4.0", - "@scure/bip32": "1.4.0", - "@scure/bip39": "1.3.0" - } - }, - "node_modules/ethereum-cryptography/node_modules/@noble/curves": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.4.2.tgz", - "integrity": "sha512-TavHr8qycMChk8UwMld0ZDRvatedkzWfH8IiaeGCfymOP5i0hSCozz9vHOL0nkwk7HRMlFnAiKpS2jrUmSybcw==", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "@noble/hashes": "1.4.0" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/ethereum-cryptography/node_modules/@scure/base": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.9.tgz", - "integrity": "sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg==", - "license": "MIT", - "optional": true, - "peer": true, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/ethereum-cryptography/node_modules/@scure/bip32": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@scure/bip32/-/bip32-1.4.0.tgz", - "integrity": "sha512-sVUpc0Vq3tXCkDGYVWGIZTRfnvu8LoTDaev7vbwh0omSvVORONr960MQWdKqJDCReIEmTj3PAr73O3aoxz7OPg==", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "@noble/curves": "~1.4.0", - "@noble/hashes": "~1.4.0", - "@scure/base": "~1.1.6" - }, - "funding": { - "url": "https://paulmillr.com/funding/" + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" } }, - "node_modules/ethereum-cryptography/node_modules/@scure/bip39": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.3.0.tgz", - "integrity": "sha512-disdg7gHuTDZtY+ZdkmLpPCk7fxZSu3gBiEGuoC1XYxv9cGx3Z6cpTggCgW6odSOOIXCiDjuGejW+aJKCY/pIQ==", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "@noble/hashes": "~1.4.0", - "@scure/base": "~1.1.6" - }, - "funding": { - "url": "https://paulmillr.com/funding/" + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.10.0" } }, "node_modules/ethers": { @@ -9620,14 +7505,6 @@ } } }, - "node_modules/eventemitter2": { - "version": "6.4.9", - "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-6.4.9.tgz", - "integrity": "sha512-JEPTiaOt9f04oa6NOkc4aH+nVp5I3wEjpHbIPqfgCdD5v5bUzy7xQqwcVO2aDQgOWhI28da57HksMrzK9HlRxg==", - "license": "MIT", - "optional": true, - "peer": true - }, "node_modules/eventemitter3": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", @@ -9702,21 +7579,6 @@ "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, - "node_modules/extension-port-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/extension-port-stream/-/extension-port-stream-3.0.0.tgz", - "integrity": "sha512-an2S5quJMiy5bnZKEf6AkfH/7r8CzHvhchU40gxN+OM6HPhe7Z9T1FUychcf2M9PpPOO0Hf7BAEfJkw2TDIBDw==", - "license": "ISC", - "optional": true, - "peer": true, - "dependencies": { - "readable-stream": "^3.6.2 || ^4.4.2", - "webextension-polyfill": ">=0.10.0 <1.0" - }, - "engines": { - "node": ">=12.0.0" - } - }, "node_modules/eyes": { "version": "0.1.8", "resolved": "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz", @@ -9736,7 +7598,7 @@ "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/fast-glob": { @@ -9783,17 +7645,6 @@ "dev": true, "license": "MIT" }, - "node_modules/fast-redact": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/fast-redact/-/fast-redact-3.5.0.tgz", - "integrity": "sha512-dwsoQlS7h9hMeYUq1W++23NDcBLV4KqONnITDV9DjfS3q1SgDGVrBdvvTLUotWtPSD7asWDV9/CmsZPy8Hf70A==", - "license": "MIT", - "optional": true, - "peer": true, - "engines": { - "node": ">=6" - } - }, "node_modules/fast-safe-stringify": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz", @@ -9807,14 +7658,6 @@ "license": "MIT", "optional": true }, - "node_modules/fastestsmallesttextencoderdecoder": { - "version": "1.0.22", - "resolved": "https://registry.npmjs.org/fastestsmallesttextencoderdecoder/-/fastestsmallesttextencoderdecoder-1.0.22.tgz", - "integrity": "sha512-Pb8d48e+oIuY4MaM64Cd7OW1gt4nxCHs7/ddPPZ/Ic3sg8yVGM7O9wDvZ7us6ScaUupzM+pfBolwtYhN1IxBIw==", - "license": "CC0-1.0", - "optional": true, - "peer": true - }, "node_modules/fastq": { "version": "1.19.1", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz", @@ -9861,17 +7704,6 @@ "node": ">=8" } }, - "node_modules/filter-obj": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/filter-obj/-/filter-obj-1.1.0.tgz", - "integrity": "sha512-8rXg1ZnX7xzy2NGDVkBVaAy+lSlPNwad13BtgSlLuxfIslyt5Vg64U7tFcCt4WS1R0hvtnQybT/IyCkGZ3DpXQ==", - "license": "MIT", - "optional": true, - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", @@ -9936,7 +7768,7 @@ "version": "0.3.5", "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.5.tgz", "integrity": "sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "is-callable": "^1.2.7" @@ -10063,7 +7895,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/generator-function/-/generator-function-2.0.1.tgz", "integrity": "sha512-SFdFmIJi+ybC0vjlHN0ZGVGHc3lgE0DxPAT0djjVg+kjOnSqclqmj0KQ7ykTOLP6YxoqOvuAODGdcHJn+43q3g==", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -10368,7 +8200,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "es-define-property": "^1.0.0" @@ -10582,7 +8414,7 @@ "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "devOptional": true, + "dev": true, "license": "ISC" }, "node_modules/internal-slot": { @@ -10609,24 +8441,6 @@ "url": "https://github.com/sponsors/brc-dd" } }, - "node_modules/is-arguments": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.2.0.tgz", - "integrity": "sha512-7bVbi0huj/wrIAOzb8U1aszg9kdi3KN/CyU19CTI7tAoZYEZoL9yCDXpbXN+uPsuWnP02cyug1gleqq+TU+YCA==", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "call-bound": "^1.0.2", - "has-tostringtag": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-array-buffer": { "version": "3.0.5", "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.5.tgz", @@ -10739,7 +8553,7 @@ "version": "1.2.7", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -10848,7 +8662,7 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.1.2.tgz", "integrity": "sha512-upqt1SkGkODW9tsGNG5mtXTXtECizwtS2kA161M+gJPc1xdb/Ax629af6YrTwcOeQHbewrPNlE5Dx7kzvXTizA==", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "call-bound": "^1.0.4", @@ -10940,11 +8754,20 @@ "node": ">=8" } }, + "node_modules/is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/is-regex": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.2.1.tgz", "integrity": "sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "call-bound": "^1.0.2", @@ -11005,7 +8828,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -11053,7 +8876,7 @@ "version": "1.1.15", "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.15.tgz", "integrity": "sha512-p3EcsicXjit7SaskXHs1hA91QxgTw46Fv6EFKKGS5DRFLD8yKnohjF3hxoju94b/OcMZoQukzpPpBE9uLVKzgQ==", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "which-typed-array": "^1.1.16" @@ -12705,14 +10528,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "license": "MIT", - "optional": true, - "peer": true - }, "node_modules/lodash.memoize": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", @@ -12800,6 +10615,18 @@ "is-buffer": "~1.1.6" } }, + "node_modules/merge-options": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/merge-options/-/merge-options-3.0.4.tgz", + "integrity": "sha512-2Sug1+knBjkaMsMgf1ctR1Ujx+Ayku4EdJN4Z+C2+JzoeF7A3OZ9KM2GY0CpQS51NR61LTurMJrRKPhSs3ZRTQ==", + "license": "MIT", + "dependencies": { + "is-plain-obj": "^2.1.0" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", @@ -12817,14 +10644,6 @@ "node": ">= 8" } }, - "node_modules/micro-ftch": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/micro-ftch/-/micro-ftch-0.3.1.tgz", - "integrity": "sha512-/0LLxhzP0tfiR5hcQebtudP56gUurs2CLkGarnCiB/OqEyUFQ6U3paQi/tgLv0hBJYt2rnr9MNpxz4fiiugstg==", - "license": "MIT", - "optional": true, - "peer": true - }, "node_modules/micromatch": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", @@ -13107,7 +10926,6 @@ "integrity": "sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ==", "license": "MIT", "optional": true, - "peer": true, "bin": { "node-gyp-build": "bin.js", "node-gyp-build-optional": "optional.js", @@ -13166,63 +10984,6 @@ "node": ">=8" } }, - "node_modules/obj-multiplex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/obj-multiplex/-/obj-multiplex-1.0.0.tgz", - "integrity": "sha512-0GNJAOsHoBHeNTvl5Vt6IWnpUEcc3uSRxzBri7EDyIcMgYvnY2JL2qdeV5zTMjWQX5OHcD5amcW2HFfDh0gjIA==", - "license": "ISC", - "optional": true, - "peer": true, - "dependencies": { - "end-of-stream": "^1.4.0", - "once": "^1.4.0", - "readable-stream": "^2.3.3" - } - }, - "node_modules/obj-multiplex/node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", - "license": "MIT", - "optional": true, - "peer": true - }, - "node_modules/obj-multiplex/node_modules/readable-stream": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", - "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/obj-multiplex/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "license": "MIT", - "optional": true, - "peer": true - }, - "node_modules/obj-multiplex/node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, "node_modules/object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", @@ -13400,25 +11161,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/openapi-fetch": { - "version": "0.13.8", - "resolved": "https://registry.npmjs.org/openapi-fetch/-/openapi-fetch-0.13.8.tgz", - "integrity": "sha512-yJ4QKRyNxE44baQ9mY5+r/kAzZ8yXMemtNAOFwOzRXJscdjSxxzWSNlyBAr+o5JjkUw9Lc3W7OIoca0cY3PYnQ==", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "openapi-typescript-helpers": "^0.0.15" - } - }, - "node_modules/openapi-typescript-helpers": { - "version": "0.0.15", - "resolved": "https://registry.npmjs.org/openapi-typescript-helpers/-/openapi-typescript-helpers-0.0.15.tgz", - "integrity": "sha512-opyTPaunsklCBpTK8JGef6mfPhLSnyy5a0IN9vKtx3+4aExf+KxEqYwIy3hqkedXIB97u357uLMJsOnm3GVjsw==", - "license": "MIT", - "optional": true, - "peer": true - }, "node_modules/optionator": { "version": "0.9.4", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", @@ -13822,17 +11564,6 @@ "node": ">=10.13.0" } }, - "node_modules/pony-cause": { - "version": "2.1.11", - "resolved": "https://registry.npmjs.org/pony-cause/-/pony-cause-2.1.11.tgz", - "integrity": "sha512-M7LhCsdNbNgiLYiP4WjsfLUuFmCfnjdF6jKe2R9NKl4WFN+HZPGHJZ9lnLP7f9ZnKe3U9nuWD0szirmj+migUg==", - "license": "0BSD", - "optional": true, - "peer": true, - "engines": { - "node": ">=12.0.0" - } - }, "node_modules/porto": { "version": "0.2.37", "resolved": "https://registry.npmjs.org/porto/-/porto-0.2.37.tgz", @@ -13979,7 +11710,7 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz", "integrity": "sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -14204,14 +11935,6 @@ "dev": true, "license": "MIT" }, - "node_modules/process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", - "license": "MIT", - "optional": true, - "peer": true - }, "node_modules/process-warning": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/process-warning/-/process-warning-5.0.0.tgz", @@ -14316,26 +12039,6 @@ "react": "^16.8.0 || ^17.0.0 || ^18.0.0" } }, - "node_modules/query-string": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/query-string/-/query-string-7.1.3.tgz", - "integrity": "sha512-hh2WYhq4fi8+b+/2Kg9CEge4fDPvHS534aOOvOZeQ3+Vf2mCFsaFBYj0i+iXcAq6I9Vzp5fjMFBlONvayDC1qg==", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "decode-uri-component": "^0.2.2", - "filter-obj": "^1.1.0", - "split-on-first": "^1.0.0", - "strict-uri-encode": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/queue-microtask": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", @@ -14477,22 +12180,6 @@ "pify": "^2.3.0" } }, - "node_modules/readable-stream": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/readdirp": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", @@ -14825,7 +12512,7 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.1.0.tgz", "integrity": "sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw==", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "call-bound": "^1.0.2", @@ -14895,7 +12582,7 @@ "version": "1.2.2", "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "define-data-property": "^1.1.4", @@ -15068,76 +12755,6 @@ "integrity": "sha512-MseHyi2+E/hBRqdOi5COy6wZ7j7DxXRz9NkseavNYSvvWC06D8a5cidVZX3tcG5eCW3NIyVU4zT63hw0Q486jw==", "license": "MIT" }, - "node_modules/socket.io-client": { - "version": "4.8.1", - "resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-4.8.1.tgz", - "integrity": "sha512-hJVXfu3E28NmzGk8o1sHhN3om52tRvwYeidbj7xKy2eIIse5IoKX3USlS6Tqt3BHAtflLIkCQBkzVrEEfWUyYQ==", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "@socket.io/component-emitter": "~3.1.0", - "debug": "~4.3.2", - "engine.io-client": "~6.6.1", - "socket.io-parser": "~4.2.4" - }, - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/socket.io-client/node_modules/debug": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", - "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/socket.io-parser": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.4.tgz", - "integrity": "sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew==", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "@socket.io/component-emitter": "~3.1.0", - "debug": "~4.3.1" - }, - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/socket.io-parser/node_modules/debug": { - "version": "4.3.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", - "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "ms": "^2.1.3" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, "node_modules/sonic-boom": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-4.2.0.tgz", @@ -15177,17 +12794,6 @@ "source-map": "^0.6.0" } }, - "node_modules/split-on-first": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/split-on-first/-/split-on-first-1.1.0.tgz", - "integrity": "sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw==", - "license": "MIT", - "optional": true, - "peer": true, - "engines": { - "node": ">=6" - } - }, "node_modules/split2": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz", @@ -15265,14 +12871,6 @@ "stream-chain": "^2.2.5" } }, - "node_modules/stream-shift": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.3.tgz", - "integrity": "sha512-76ORR0DO1o1hlKwTbi/DM3EXWGf3ZJYO8cXX5RJwnul2DEg2oyoZyjLNoQM8WsvZiFKCRfC1O0J7iCvie3RZmQ==", - "license": "MIT", - "optional": true, - "peer": true - }, "node_modules/streamsearch": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/streamsearch/-/streamsearch-1.1.0.tgz", @@ -15281,28 +12879,6 @@ "node": ">=10.0.0" } }, - "node_modules/strict-uri-encode": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz", - "integrity": "sha512-QwiXZgpRcKkhTj2Scnn++4PKtWsH0kpzZ62L2R6c/LUVYv7hVnZqcg2+sMuT6R7Jusu1vviK/MFsu6kNJfWlEQ==", - "license": "MIT", - "optional": true, - "peer": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "safe-buffer": "~5.2.0" - } - }, "node_modules/string-length": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", @@ -16120,7 +13696,7 @@ "version": "5.9.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", - "devOptional": true, + "dev": true, "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", @@ -16283,7 +13859,6 @@ "hasInstallScript": true, "license": "MIT", "optional": true, - "peer": true, "dependencies": { "node-gyp-build": "^4.3.0" }, @@ -16291,26 +13866,11 @@ "node": ">=6.14.2" } }, - "node_modules/util": { - "version": "0.12.5", - "resolved": "https://registry.npmjs.org/util/-/util-0.12.5.tgz", - "integrity": "sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==", - "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "inherits": "^2.0.3", - "is-arguments": "^1.0.4", - "is-generator-function": "^1.0.7", - "is-typed-array": "^1.1.3", - "which-typed-array": "^1.1.2" - } - }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/uuid": { @@ -16565,14 +14125,6 @@ "loose-envify": "^1.0.0" } }, - "node_modules/webextension-polyfill": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/webextension-polyfill/-/webextension-polyfill-0.10.0.tgz", - "integrity": "sha512-c5s35LgVa5tFaHhrZDnr3FpQpjj1BB+RXhLTYUxGqBVN460HkbM8TBtEqdXWbpTKfzwCcjAZVF7zXCYSKtcp9g==", - "license": "MPL-2.0", - "optional": true, - "peer": true - }, "node_modules/webidl-conversions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", @@ -16682,7 +14234,7 @@ "version": "1.1.19", "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.19.tgz", "integrity": "sha512-rEvr90Bck4WZt9HHFC4DJMsjvu7x+r6bImz0/BrbWb7A2djJ8hnZMrWnHo9F8ssv0OMErasDhftrfROTyqSDrw==", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "available-typed-arrays": "^1.0.7", @@ -16862,16 +14414,6 @@ } } }, - "node_modules/xmlhttprequest-ssl": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-2.1.2.tgz", - "integrity": "sha512-TEU+nJVUUnA4CYJFLvK5X9AOeH4KvDvhIfm0vV1GaQRtchnG0hgK5p8hw/xjv8cunWYCsiPCSDzObPyhEwq3KQ==", - "optional": true, - "peer": true, - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/y18n": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", diff --git a/frontend/package.json b/frontend/package.json index 92daa62..493d0d8 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -15,6 +15,7 @@ "test": "jest" }, "dependencies": { + "@react-native-async-storage/async-storage": "^2.2.0", "@reown/appkit": "^1.8.15", "@reown/appkit-adapter-wagmi": "^1.8.15", "@tanstack/react-query": "^5.0.0", From 1261b1e4a8d4af0c39a3bdde5ebcdb03703da136 Mon Sep 17 00:00:00 2001 From: "dev.uche" Date: Mon, 12 Jan 2026 17:22:19 +0100 Subject: [PATCH 78/93] feat: update Header with modern design, navigation menu, and wallet integration --- frontend/components/Header.tsx | 91 ++++++++++++++++++++++++++++++++-- 1 file changed, 86 insertions(+), 5 deletions(-) diff --git a/frontend/components/Header.tsx b/frontend/components/Header.tsx index 5fe51da..b94b458 100644 --- a/frontend/components/Header.tsx +++ b/frontend/components/Header.tsx @@ -1,12 +1,93 @@ +'use client'; + import Link from 'next/link'; +import { useAccount } from 'wagmi'; const Header = () => { + const { address, isConnected } = useAccount(); + return ( -
-
+ +
+
); } From 753aebedc7cd2094c9fe3c006f853fc9b32a3bf7 Mon Sep 17 00:00:00 2001 From: "dev.uche" Date: Mon, 12 Jan 2026 17:23:33 +0100 Subject: [PATCH 80/93] feat: update Footer with comprehensive links, social media, and modern design --- frontend/components/Footer.tsx | 145 ++++++++++++++++++++++++++++++++- 1 file changed, 143 insertions(+), 2 deletions(-) diff --git a/frontend/components/Footer.tsx b/frontend/components/Footer.tsx index 09f9b4a..c5f2fbc 100644 --- a/frontend/components/Footer.tsx +++ b/frontend/components/Footer.tsx @@ -1,7 +1,148 @@ +import Link from 'next/link'; + const Footer = () => { + const currentYear = new Date().getFullYear(); + return ( -