ETH Price: $2,816.42 (+8.53%)
 

Overview

TokenID

4000000024

Total Transfers

-

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0x8e84aD39...CfbdFd4c1
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
JBTiered721Delegate

Compiler Version
v0.8.16+commit.07a7930e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2022-11-07
*/

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.16;

// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

enum JBBallotState {
  Active,
  Approved,
  Failed
}

interface IJBFundingCycleBallot is IERC165 {
  function duration() external view returns (uint256);

  function stateOf(
    uint256 _projectId,
    uint256 _configuration,
    uint256 _start
  ) external view returns (JBBallotState);
}

/** 
  @member number The funding cycle number for the cycle's project. Each funding cycle has a number that is an increment of the cycle that directly preceded it. Each project's first funding cycle has a number of 1.
  @member configuration The timestamp when the parameters for this funding cycle were configured. This value will stay the same for subsequent funding cycles that roll over from an originally configured cycle.
  @member basedOn The `configuration` of the funding cycle that was active when this cycle was created.
  @member start The timestamp marking the moment from which the funding cycle is considered active. It is a unix timestamp measured in seconds.
  @member duration The number of seconds the funding cycle lasts for, after which a new funding cycle will start. A duration of 0 means that the funding cycle will stay active until the project owner explicitly issues a reconfiguration, at which point a new funding cycle will immediately start with the updated properties. If the duration is greater than 0, a project owner cannot make changes to a funding cycle's parameters while it is active – any proposed changes will apply to the subsequent cycle. If no changes are proposed, a funding cycle rolls over to another one with the same properties but new `start` timestamp and a discounted `weight`.
  @member weight A fixed point number with 18 decimals that contracts can use to base arbitrary calculations on. For example, payment terminals can use this to determine how many tokens should be minted when a payment is received.
  @member discountRate A percent by how much the `weight` of the subsequent funding cycle should be reduced, if the project owner hasn't configured the subsequent funding cycle with an explicit `weight`. If it's 0, each funding cycle will have equal weight. If the number is 90%, the next funding cycle will have a 10% smaller weight. This weight is out of `JBConstants.MAX_DISCOUNT_RATE`.
  @member ballot An address of a contract that says whether a proposed reconfiguration should be accepted or rejected. It can be used to create rules around how a project owner can change funding cycle parameters over time.
  @member metadata Extra data that can be associated with a funding cycle.
*/
struct JBFundingCycle {
  uint256 number;
  uint256 configuration;
  uint256 basedOn;
  uint256 start;
  uint256 duration;
  uint256 weight;
  uint256 discountRate;
  IJBFundingCycleBallot ballot;
  uint256 metadata;
}

/** 
  @member allowSetTerminals A flag indicating if setting terminals should be allowed during this funding cycle.
  @member allowSetController A flag indicating if setting a new controller should be allowed during this funding cycle.
  @member pauseTransfers A flag indicating if the project token transfer functionality should be paused during the funding cycle.
*/
struct JBGlobalFundingCycleMetadata {
  bool allowSetTerminals;
  bool allowSetController;
  bool pauseTransfers;
}

/** 
  @member global Data used globally in non-migratable ecosystem contracts.
  @member reservedRate The reserved rate of the funding cycle. This number is a percentage calculated out of `JBConstants.MAX_RESERVED_RATE`.
  @member redemptionRate The redemption rate of the funding cycle. This number is a percentage calculated out of `JBConstants.MAX_REDEMPTION_RATE`.
  @member ballotRedemptionRate The redemption rate to use during an active ballot of the funding cycle. This number is a percentage calculated out of `JBConstants.MAX_REDEMPTION_RATE`.
  @member pausePay A flag indicating if the pay functionality should be paused during the funding cycle.
  @member pauseDistributions A flag indicating if the distribute functionality should be paused during the funding cycle.
  @member pauseRedeem A flag indicating if the redeem functionality should be paused during the funding cycle.
  @member pauseBurn A flag indicating if the burn functionality should be paused during the funding cycle.
  @member allowMinting A flag indicating if minting tokens should be allowed during this funding cycle.
  @member allowTerminalMigration A flag indicating if migrating terminals should be allowed during this funding cycle.
  @member allowControllerMigration A flag indicating if migrating controllers should be allowed during this funding cycle.
  @member holdFees A flag indicating if fees should be held during this funding cycle.
  @member preferClaimedTokenOverride A flag indicating if claimed tokens should always be prefered to unclaimed tokens when minting.
  @member useTotalOverflowForRedemptions A flag indicating if redemptions should use the project's balance held in all terminals instead of the project's local terminal balance from which the redemption is being fulfilled.
  @member useDataSourceForPay A flag indicating if the data source should be used for pay transactions during this funding cycle.
  @member useDataSourceForRedeem A flag indicating if the data source should be used for redeem transactions during this funding cycle.
  @member dataSource The data source to use during this funding cycle.
  @member metadata Metadata of the metadata, up to uint8 in size.
*/
struct JBFundingCycleMetadata {
  JBGlobalFundingCycleMetadata global;
  uint256 reservedRate;
  uint256 redemptionRate;
  uint256 ballotRedemptionRate;
  bool pausePay;
  bool pauseDistributions;
  bool pauseRedeem;
  bool pauseBurn;
  bool allowMinting;
  bool allowTerminalMigration;
  bool allowControllerMigration;
  bool holdFees;
  bool preferClaimedTokenOverride;
  bool useTotalOverflowForRedemptions;
  bool useDataSourceForPay;
  bool useDataSourceForRedeem;
  address dataSource;
  uint256 metadata;
}

/**
  @notice
  Global constants used across Juicebox contracts.
*/
library JBConstants {
  uint256 public constant MAX_RESERVED_RATE = 10_000;
  uint256 public constant MAX_REDEMPTION_RATE = 10_000;
  uint256 public constant MAX_DISCOUNT_RATE = 1_000_000_000;
  uint256 public constant SPLITS_TOTAL_PERCENT = 1_000_000_000;
  uint256 public constant MAX_FEE = 1_000_000_000;
  uint256 public constant MAX_FEE_DISCOUNT = 1_000_000_000;
}

library JBGlobalFundingCycleMetadataResolver {
  function setTerminalsAllowed(uint8 _data) internal pure returns (bool) {
    return (_data & 1) == 1;
  }

  function setControllerAllowed(uint8 _data) internal pure returns (bool) {
    return ((_data >> 1) & 1) == 1;
  }

  function transfersPaused(uint8 _data) internal pure returns (bool) {
    return ((_data >> 2) & 1) == 1;
  }

  /**
    @notice
    Pack the global funding cycle metadata.

    @param _metadata The metadata to validate and pack.

    @return packed The packed uint256 of all global metadata params. The first 8 bits specify the version.
  */
  function packFundingCycleGlobalMetadata(JBGlobalFundingCycleMetadata memory _metadata)
    internal
    pure
    returns (uint256 packed)
  {
    // allow set terminals in bit 0.
    if (_metadata.allowSetTerminals) packed |= 1;
    // allow set controller in bit 1.
    if (_metadata.allowSetController) packed |= 1 << 1;
    // pause transfers in bit 2.
    if (_metadata.pauseTransfers) packed |= 1 << 2;
  }

  /**
    @notice
    Expand the global funding cycle metadata.

    @param _packedMetadata The packed metadata to expand.

    @return metadata The global metadata object.
  */
  function expandMetadata(uint8 _packedMetadata)
    internal
    pure
    returns (JBGlobalFundingCycleMetadata memory metadata)
  {
    return
      JBGlobalFundingCycleMetadata(
        setTerminalsAllowed(_packedMetadata),
        setControllerAllowed(_packedMetadata),
        transfersPaused(_packedMetadata)
      );
  }
}

library JBFundingCycleMetadataResolver {
  function global(JBFundingCycle memory _fundingCycle)
    internal
    pure
    returns (JBGlobalFundingCycleMetadata memory)
  {
    return JBGlobalFundingCycleMetadataResolver.expandMetadata(uint8(_fundingCycle.metadata >> 8));
  }

  function reservedRate(JBFundingCycle memory _fundingCycle) internal pure returns (uint256) {
    return uint256(uint16(_fundingCycle.metadata >> 24));
  }

  function redemptionRate(JBFundingCycle memory _fundingCycle) internal pure returns (uint256) {
    // Redemption rate is a number 0-10000. It's inverse was stored so the most common case of 100% results in no storage needs.
    return JBConstants.MAX_REDEMPTION_RATE - uint256(uint16(_fundingCycle.metadata >> 40));
  }

  function ballotRedemptionRate(JBFundingCycle memory _fundingCycle)
    internal
    pure
    returns (uint256)
  {
    // Redemption rate is a number 0-10000. It's inverse was stored so the most common case of 100% results in no storage needs.
    return JBConstants.MAX_REDEMPTION_RATE - uint256(uint16(_fundingCycle.metadata >> 56));
  }

  function payPaused(JBFundingCycle memory _fundingCycle) internal pure returns (bool) {
    return ((_fundingCycle.metadata >> 72) & 1) == 1;
  }

  function distributionsPaused(JBFundingCycle memory _fundingCycle) internal pure returns (bool) {
    return ((_fundingCycle.metadata >> 73) & 1) == 1;
  }

  function redeemPaused(JBFundingCycle memory _fundingCycle) internal pure returns (bool) {
    return ((_fundingCycle.metadata >> 74) & 1) == 1;
  }

  function burnPaused(JBFundingCycle memory _fundingCycle) internal pure returns (bool) {
    return ((_fundingCycle.metadata >> 75) & 1) == 1;
  }

  function mintingAllowed(JBFundingCycle memory _fundingCycle) internal pure returns (bool) {
    return ((_fundingCycle.metadata >> 76) & 1) == 1;
  }

  function terminalMigrationAllowed(JBFundingCycle memory _fundingCycle)
    internal
    pure
    returns (bool)
  {
    return ((_fundingCycle.metadata >> 77) & 1) == 1;
  }

  function controllerMigrationAllowed(JBFundingCycle memory _fundingCycle)
    internal
    pure
    returns (bool)
  {
    return ((_fundingCycle.metadata >> 78) & 1) == 1;
  }

  function shouldHoldFees(JBFundingCycle memory _fundingCycle) internal pure returns (bool) {
    return ((_fundingCycle.metadata >> 79) & 1) == 1;
  }

  function preferClaimedTokenOverride(JBFundingCycle memory _fundingCycle)
    internal
    pure
    returns (bool)
  {
    return ((_fundingCycle.metadata >> 80) & 1) == 1;
  }

  function useTotalOverflowForRedemptions(JBFundingCycle memory _fundingCycle)
    internal
    pure
    returns (bool)
  {
    return ((_fundingCycle.metadata >> 81) & 1) == 1;
  }

  function useDataSourceForPay(JBFundingCycle memory _fundingCycle) internal pure returns (bool) {
    return (_fundingCycle.metadata >> 82) & 1 == 1;
  }

  function useDataSourceForRedeem(JBFundingCycle memory _fundingCycle)
    internal
    pure
    returns (bool)
  {
    return (_fundingCycle.metadata >> 83) & 1 == 1;
  }

  function dataSource(JBFundingCycle memory _fundingCycle) internal pure returns (address) {
    return address(uint160(_fundingCycle.metadata >> 84));
  }

  function metadata(JBFundingCycle memory _fundingCycle) internal pure returns (uint256) {
    return uint256(uint8(_fundingCycle.metadata >> 244));
  }

  /**
    @notice
    Pack the funding cycle metadata.

    @param _metadata The metadata to validate and pack.

    @return packed The packed uint256 of all metadata params. The first 8 bits specify the version.
  */
  function packFundingCycleMetadata(JBFundingCycleMetadata memory _metadata)
    internal
    pure
    returns (uint256 packed)
  {
    // version 1 in the bits 0-7 (8 bits).
    packed = 1;
    // global metadta in bits 8-23 (16 bits).
    packed |=
      JBGlobalFundingCycleMetadataResolver.packFundingCycleGlobalMetadata(_metadata.global) <<
      8;
    // reserved rate in bits 24-39 (16 bits).
    packed |= _metadata.reservedRate << 24;
    // redemption rate in bits 40-55 (16 bits).
    // redemption rate is a number 0-10000. Store the reverse so the most common case of 100% results in no storage needs.
    packed |= (JBConstants.MAX_REDEMPTION_RATE - _metadata.redemptionRate) << 40;
    // ballot redemption rate rate in bits 56-71 (16 bits).
    // ballot redemption rate is a number 0-10000. Store the reverse so the most common case of 100% results in no storage needs.
    packed |= (JBConstants.MAX_REDEMPTION_RATE - _metadata.ballotRedemptionRate) << 56;
    // pause pay in bit 72.
    if (_metadata.pausePay) packed |= 1 << 72;
    // pause tap in bit 73.
    if (_metadata.pauseDistributions) packed |= 1 << 73;
    // pause redeem in bit 74.
    if (_metadata.pauseRedeem) packed |= 1 << 74;
    // pause burn in bit 75.
    if (_metadata.pauseBurn) packed |= 1 << 75;
    // allow minting in bit 76.
    if (_metadata.allowMinting) packed |= 1 << 76;
    // allow terminal migration in bit 77.
    if (_metadata.allowTerminalMigration) packed |= 1 << 77;
    // allow controller migration in bit 78.
    if (_metadata.allowControllerMigration) packed |= 1 << 78;
    // hold fees in bit 79.
    if (_metadata.holdFees) packed |= 1 << 79;
    // prefer claimed token override in bit 80.
    if (_metadata.preferClaimedTokenOverride) packed |= 1 << 80;
    // useTotalOverflowForRedemptions in bit 81.
    if (_metadata.useTotalOverflowForRedemptions) packed |= 1 << 81;
    // use pay data source in bit 82.
    if (_metadata.useDataSourceForPay) packed |= 1 << 82;
    // use redeem data source in bit 83.
    if (_metadata.useDataSourceForRedeem) packed |= 1 << 83;
    // data source address in bits 84-243.
    packed |= uint256(uint160(address(_metadata.dataSource))) << 84;
    // metadata in bits 244-252 (8 bits).
    packed |= _metadata.metadata << 244;
  }

  /**
    @notice
    Expand the funding cycle metadata.

    @param _fundingCycle The funding cycle having its metadata expanded.

    @return metadata The metadata object.
  */
  function expandMetadata(JBFundingCycle memory _fundingCycle)
    internal
    pure
    returns (JBFundingCycleMetadata memory)
  {
    return
      JBFundingCycleMetadata(
        global(_fundingCycle),
        reservedRate(_fundingCycle),
        redemptionRate(_fundingCycle),
        ballotRedemptionRate(_fundingCycle),
        payPaused(_fundingCycle),
        distributionsPaused(_fundingCycle),
        redeemPaused(_fundingCycle),
        burnPaused(_fundingCycle),
        mintingAllowed(_fundingCycle),
        terminalMigrationAllowed(_fundingCycle),
        controllerMigrationAllowed(_fundingCycle),
        shouldHoldFees(_fundingCycle),
        preferClaimedTokenOverride(_fundingCycle),
        useTotalOverflowForRedemptions(_fundingCycle),
        useDataSourceForPay(_fundingCycle),
        useDataSourceForRedeem(_fundingCycle),
        dataSource(_fundingCycle),
        metadata(_fundingCycle)
      );
  }
}

// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

/* 
  @member token The token the payment was made in.
  @member value The amount of tokens that was paid, as a fixed point number.
  @member decimals The number of decimals included in the value fixed point number.
  @member currency The expected currency of the value.
**/
struct JBTokenAmount {
  address token;
  uint256 value;
  uint256 decimals;
  uint256 currency;
}

/** 
  @member payer The address from which the payment originated.
  @member projectId The ID of the project for which the payment was made.
  @member currentFundingCycleConfiguration The configuration of the funding cycle during which the payment is being made.
  @member amount The amount of the payment. Includes the token being paid, the value, the number of decimals included, and the currency of the amount.
  @member forwardedAmount The amount of the payment that is being sent to the delegate. Includes the token being paid, the value, the number of decimals included, and the currency of the amount.
  @member projectTokenCount The number of project tokens minted for the beneficiary.
  @member beneficiary The address to which the tokens were minted.
  @member preferClaimedTokens A flag indicating whether the request prefered to mint project tokens into the beneficiaries wallet rather than leaving them unclaimed. This is only possible if the project has an attached token contract.
  @member memo The memo that is being emitted alongside the payment.
  @member metadata Extra data to send to the delegate.
*/
struct JBDidPayData {
  address payer;
  uint256 projectId;
  uint256 currentFundingCycleConfiguration;
  JBTokenAmount amount;
  JBTokenAmount forwardedAmount;
  uint256 projectTokenCount;
  address beneficiary;
  bool preferClaimedTokens;
  string memo;
  bytes metadata;
}

/**
  @title
  Pay delegate

  @notice
  Delegate called after JBTerminal.pay(..) logic completion (if passed by the funding cycle datasource)

  @dev
  Adheres to:
  IERC165 for adequate interface integration
*/
interface IJBPayDelegate is IERC165 {
  /**
    @notice
    This function is called by JBPaymentTerminal.pay(..), after the execution of its logic

    @dev
    Critical business logic should be protected by an appropriate access control
    
    @param _data the data passed by the terminal, as a JBDidPayData struct:
                  address payer;
                  uint256 projectId;
                  uint256 currentFundingCycleConfiguration;
                  JBTokenAmount amount;
                  JBTokenAmount forwardedAmount;
                  uint256 projectTokenCount;
                  address beneficiary;
                  bool preferClaimedTokens;
                  string memo;
                  bytes metadata;
  */
  function didPay(JBDidPayData calldata _data) external payable;
}

/** 
 @member delegate A delegate contract to use for subsequent calls.
 @member amount The amount to send to the delegate.
*/
struct JBPayDelegateAllocation {
  IJBPayDelegate delegate;
  uint256 amount;
}

interface IJBPaymentTerminal is IERC165 {
  function acceptsToken(address _token, uint256 _projectId) external view returns (bool);

  function currencyForToken(address _token) external view returns (uint256);

  function decimalsForToken(address _token) external view returns (uint256);

  // Return value must be a fixed point number with 18 decimals.
  function currentEthOverflowOf(uint256 _projectId) external view returns (uint256);

  function pay(
    uint256 _projectId,
    uint256 _amount,
    address _token,
    address _beneficiary,
    uint256 _minReturnedTokens,
    bool _preferClaimedTokens,
    string calldata _memo,
    bytes calldata _metadata
  ) external payable returns (uint256 beneficiaryTokenCount);

  function addToBalanceOf(
    uint256 _projectId,
    uint256 _amount,
    address _token,
    string calldata _memo,
    bytes calldata _metadata
  ) external payable;
}

/** 
  @member terminal The terminal that is facilitating the payment.
  @member payer The address from which the payment originated.
  @member amount The amount of the payment. Includes the token being paid, the value, the number of decimals included, and the currency of the amount.
  @member projectId The ID of the project being paid.
  @member currentFundingCycleConfiguration The configuration of the funding cycle during which the payment is being made.
  @member beneficiary The specified address that should be the beneficiary of anything that results from the payment.
  @member weight The weight of the funding cycle during which the payment is being made.
  @member reservedRate The reserved rate of the funding cycle during which the payment is being made.
  @member memo The memo that was sent alongside the payment.
  @member metadata Extra data provided by the payer.
*/
struct JBPayParamsData {
  IJBPaymentTerminal terminal;
  address payer;
  JBTokenAmount amount;
  uint256 projectId;
  uint256 currentFundingCycleConfiguration;
  address beneficiary;
  uint256 weight;
  uint256 reservedRate;
  string memo;
  bytes metadata;
}

/** 
  @member terminal The terminal that is facilitating the redemption.
  @member holder The holder of the tokens being redeemed.
  @member projectId The ID of the project whos tokens are being redeemed.
  @member currentFundingCycleConfiguration The configuration of the funding cycle during which the redemption is being made.
  @member tokenCount The proposed number of tokens being redeemed, as a fixed point number with 18 decimals.
  @member totalSupply The total supply of tokens used in the calculation, as a fixed point number with 18 decimals.
  @member overflow The amount of overflow used in the reclaim amount calculation.
  @member reclaimAmount The amount that should be reclaimed by the redeemer using the protocol's standard bonding curve redemption formula. Includes the token being reclaimed, the reclaim value, the number of decimals included, and the currency of the reclaim amount.
  @member useTotalOverflow If overflow across all of a project's terminals is being used when making redemptions.
  @member redemptionRate The redemption rate of the funding cycle during which the redemption is being made.
  @member memo The proposed memo that is being emitted alongside the redemption.
  @member metadata Extra data provided by the redeemer.
*/
struct JBRedeemParamsData {
  IJBPaymentTerminal terminal;
  address holder;
  uint256 projectId;
  uint256 currentFundingCycleConfiguration;
  uint256 tokenCount;
  uint256 totalSupply;
  uint256 overflow;
  JBTokenAmount reclaimAmount;
  bool useTotalOverflow;
  uint256 redemptionRate;
  string memo;
  bytes metadata;
}

/** 
  @member holder The holder of the tokens being redeemed.
  @member projectId The ID of the project with which the redeemed tokens are associated.
  @member currentFundingCycleConfiguration The configuration of the funding cycle during which the redemption is being made.
  @member projectTokenCount The number of project tokens being redeemed.
  @member reclaimedAmount The amount reclaimed from the treasury. Includes the token being reclaimed, the value, the number of decimals included, and the currency of the amount.
  @member forwardedAmount The amount of the payment that is being sent to the delegate. Includes the token being paid, the value, the number of decimals included, and the currency of the amount.
  @member beneficiary The address to which the reclaimed amount will be sent.
  @member memo The memo that is being emitted alongside the redemption.
  @member metadata Extra data to send to the delegate.
*/
struct JBDidRedeemData {
  address holder;
  uint256 projectId;
  uint256 currentFundingCycleConfiguration;
  uint256 projectTokenCount;
  JBTokenAmount reclaimedAmount;
  JBTokenAmount forwardedAmount;
  address payable beneficiary;
  string memo;
  bytes metadata;
}

/**
  @title
  Redemption delegate

  @notice
  Delegate called after JBTerminal.redeemTokensOf(..) logic completion (if passed by the funding cycle datasource)

  @dev
  Adheres to:
  IERC165 for adequate interface integration
*/
interface IJBRedemptionDelegate is IERC165 {
  /**
    @notice
    This function is called by JBPaymentTerminal.redeemTokensOf(..), after the execution of its logic

    @dev
    Critical business logic should be protected by an appropriate access control
    
    @param _data the data passed by the terminal, as a JBDidRedeemData struct:
                address holder;
                uint256 projectId;
                uint256 currentFundingCycleConfiguration;
                uint256 projectTokenCount;
                JBTokenAmount reclaimedAmount;
                JBTokenAmount forwardedAmount;
                address payable beneficiary;
                string memo;
                bytes metadata;
  */
  function didRedeem(JBDidRedeemData calldata _data) external payable;
}

/** 
 @member delegate A delegate contract to use for subsequent calls.
 @member amount The amount to send to the delegate.
*/
struct JBRedemptionDelegateAllocation {
  IJBRedemptionDelegate delegate;
  uint256 amount;
}

/**
  @title
  Datasource

  @notice
  The datasource is called by JBPaymentTerminal on pay and redemption, and provide an extra layer of logic to use 
  a custom weight, a custom memo and/or a pay/redeem delegate

  @dev
  Adheres to:
  IERC165 for adequate interface integration
*/
interface IJBFundingCycleDataSource is IERC165 {
  /**
    @notice
    The datasource implementation for JBPaymentTerminal.pay(..)

    @param _data the data passed to the data source in terminal.pay(..), as a JBPayParamsData struct:
                  IJBPaymentTerminal terminal;
                  address payer;
                  JBTokenAmount amount;
                  uint256 projectId;
                  uint256 currentFundingCycleConfiguration;
                  address beneficiary;
                  uint256 weight;
                  uint256 reservedRate;
                  string memo;
                  bytes metadata;

    @return weight the weight to use to override the funding cycle weight
    @return memo the memo to override the pay(..) memo
    @return delegateAllocations The amount to send to delegates instead of adding to the local balance.
  */
  function payParams(JBPayParamsData calldata _data)
    external
    returns (
      uint256 weight,
      string memory memo,
      JBPayDelegateAllocation[] memory delegateAllocations
    );

  /**
    @notice
    The datasource implementation for JBPaymentTerminal.redeemTokensOf(..)

    @param _data the data passed to the data source in terminal.redeemTokensOf(..), as a JBRedeemParamsData struct:
                    IJBPaymentTerminal terminal;
                    address holder;
                    uint256 projectId;
                    uint256 currentFundingCycleConfiguration;
                    uint256 tokenCount;
                    uint256 totalSupply;
                    uint256 overflow;
                    JBTokenAmount reclaimAmount;
                    bool useTotalOverflow;
                    uint256 redemptionRate;
                    uint256 ballotRedemptionRate;
                    string memo;
                    bytes metadata;

    @return reclaimAmount The amount to claim, overriding the terminal logic.
    @return memo The memo to override the redeemTokensOf(..) memo.
    @return delegateAllocations The amount to send to delegates instead of adding to the beneficiary.
  */
  function redeemParams(JBRedeemParamsData calldata _data)
    external
    returns (
      uint256 reclaimAmount,
      string memory memo,
      JBRedemptionDelegateAllocation[] memory delegateAllocations
    );
}

/// @notice Emitted when the result overflows uint256.
error PRBMath__MulDivFixedPointOverflow(uint256 prod1);

/// @notice Emitted when the result overflows uint256.
error PRBMath__MulDivOverflow(uint256 prod1, uint256 denominator);

/// @notice Emitted when one of the inputs is type(int256).min.
error PRBMath__MulDivSignedInputTooSmall();

/// @notice Emitted when the intermediary absolute result overflows int256.
error PRBMath__MulDivSignedOverflow(uint256 rAbs);

/// @notice Emitted when the input is MIN_SD59x18.
error PRBMathSD59x18__AbsInputTooSmall();

/// @notice Emitted when ceiling a number overflows SD59x18.
error PRBMathSD59x18__CeilOverflow(int256 x);

/// @notice Emitted when one of the inputs is MIN_SD59x18.
error PRBMathSD59x18__DivInputTooSmall();

/// @notice Emitted when one of the intermediary unsigned results overflows SD59x18.
error PRBMathSD59x18__DivOverflow(uint256 rAbs);

/// @notice Emitted when the input is greater than 133.084258667509499441.
error PRBMathSD59x18__ExpInputTooBig(int256 x);

/// @notice Emitted when the input is greater than 192.
error PRBMathSD59x18__Exp2InputTooBig(int256 x);

/// @notice Emitted when flooring a number underflows SD59x18.
error PRBMathSD59x18__FloorUnderflow(int256 x);

/// @notice Emitted when converting a basic integer to the fixed-point format overflows SD59x18.
error PRBMathSD59x18__FromIntOverflow(int256 x);

/// @notice Emitted when converting a basic integer to the fixed-point format underflows SD59x18.
error PRBMathSD59x18__FromIntUnderflow(int256 x);

/// @notice Emitted when the product of the inputs is negative.
error PRBMathSD59x18__GmNegativeProduct(int256 x, int256 y);

/// @notice Emitted when multiplying the inputs overflows SD59x18.
error PRBMathSD59x18__GmOverflow(int256 x, int256 y);

/// @notice Emitted when the input is less than or equal to zero.
error PRBMathSD59x18__LogInputTooSmall(int256 x);

/// @notice Emitted when one of the inputs is MIN_SD59x18.
error PRBMathSD59x18__MulInputTooSmall();

/// @notice Emitted when the intermediary absolute result overflows SD59x18.
error PRBMathSD59x18__MulOverflow(uint256 rAbs);

/// @notice Emitted when the intermediary absolute result overflows SD59x18.
error PRBMathSD59x18__PowuOverflow(uint256 rAbs);

/// @notice Emitted when the input is negative.
error PRBMathSD59x18__SqrtNegativeInput(int256 x);

/// @notice Emitted when the calculating the square root overflows SD59x18.
error PRBMathSD59x18__SqrtOverflow(int256 x);

/// @notice Emitted when addition overflows UD60x18.
error PRBMathUD60x18__AddOverflow(uint256 x, uint256 y);

/// @notice Emitted when ceiling a number overflows UD60x18.
error PRBMathUD60x18__CeilOverflow(uint256 x);

/// @notice Emitted when the input is greater than 133.084258667509499441.
error PRBMathUD60x18__ExpInputTooBig(uint256 x);

/// @notice Emitted when the input is greater than 192.
error PRBMathUD60x18__Exp2InputTooBig(uint256 x);

/// @notice Emitted when converting a basic integer to the fixed-point format format overflows UD60x18.
error PRBMathUD60x18__FromUintOverflow(uint256 x);

/// @notice Emitted when multiplying the inputs overflows UD60x18.
error PRBMathUD60x18__GmOverflow(uint256 x, uint256 y);

/// @notice Emitted when the input is less than 1.
error PRBMathUD60x18__LogInputTooSmall(uint256 x);

/// @notice Emitted when the calculating the square root overflows UD60x18.
error PRBMathUD60x18__SqrtOverflow(uint256 x);

/// @notice Emitted when subtraction underflows UD60x18.
error PRBMathUD60x18__SubUnderflow(uint256 x, uint256 y);

/// @dev Common mathematical functions used in both PRBMathSD59x18 and PRBMathUD60x18. Note that this shared library
/// does not always assume the signed 59.18-decimal fixed-point or the unsigned 60.18-decimal fixed-point
/// representation. When it does not, it is explicitly mentioned in the NatSpec documentation.
library PRBMath {
    /// STRUCTS ///

    struct SD59x18 {
        int256 value;
    }

    struct UD60x18 {
        uint256 value;
    }

    /// STORAGE ///

    /// @dev How many trailing decimals can be represented.
    uint256 internal constant SCALE = 1e18;

    /// @dev Largest power of two divisor of SCALE.
    uint256 internal constant SCALE_LPOTD = 262144;

    /// @dev SCALE inverted mod 2^256.
    uint256 internal constant SCALE_INVERSE =
        78156646155174841979727994598816262306175212592076161876661_508869554232690281;

    /// FUNCTIONS ///

    /// @notice Calculates the binary exponent of x using the binary fraction method.
    /// @dev Has to use 192.64-bit fixed-point numbers.
    /// See https://ethereum.stackexchange.com/a/96594/24693.
    /// @param x The exponent as an unsigned 192.64-bit fixed-point number.
    /// @return result The result as an unsigned 60.18-decimal fixed-point number.
    function exp2(uint256 x) internal pure returns (uint256 result) {
        unchecked {
            // Start from 0.5 in the 192.64-bit fixed-point format.
            result = 0x800000000000000000000000000000000000000000000000;

            // Multiply the result by root(2, 2^-i) when the bit at position i is 1. None of the intermediary results overflows
            // because the initial result is 2^191 and all magic factors are less than 2^65.
            if (x & 0x8000000000000000 > 0) {
                result = (result * 0x16A09E667F3BCC909) >> 64;
            }
            if (x & 0x4000000000000000 > 0) {
                result = (result * 0x1306FE0A31B7152DF) >> 64;
            }
            if (x & 0x2000000000000000 > 0) {
                result = (result * 0x1172B83C7D517ADCE) >> 64;
            }
            if (x & 0x1000000000000000 > 0) {
                result = (result * 0x10B5586CF9890F62A) >> 64;
            }
            if (x & 0x800000000000000 > 0) {
                result = (result * 0x1059B0D31585743AE) >> 64;
            }
            if (x & 0x400000000000000 > 0) {
                result = (result * 0x102C9A3E778060EE7) >> 64;
            }
            if (x & 0x200000000000000 > 0) {
                result = (result * 0x10163DA9FB33356D8) >> 64;
            }
            if (x & 0x100000000000000 > 0) {
                result = (result * 0x100B1AFA5ABCBED61) >> 64;
            }
            if (x & 0x80000000000000 > 0) {
                result = (result * 0x10058C86DA1C09EA2) >> 64;
            }
            if (x & 0x40000000000000 > 0) {
                result = (result * 0x1002C605E2E8CEC50) >> 64;
            }
            if (x & 0x20000000000000 > 0) {
                result = (result * 0x100162F3904051FA1) >> 64;
            }
            if (x & 0x10000000000000 > 0) {
                result = (result * 0x1000B175EFFDC76BA) >> 64;
            }
            if (x & 0x8000000000000 > 0) {
                result = (result * 0x100058BA01FB9F96D) >> 64;
            }
            if (x & 0x4000000000000 > 0) {
                result = (result * 0x10002C5CC37DA9492) >> 64;
            }
            if (x & 0x2000000000000 > 0) {
                result = (result * 0x1000162E525EE0547) >> 64;
            }
            if (x & 0x1000000000000 > 0) {
                result = (result * 0x10000B17255775C04) >> 64;
            }
            if (x & 0x800000000000 > 0) {
                result = (result * 0x1000058B91B5BC9AE) >> 64;
            }
            if (x & 0x400000000000 > 0) {
                result = (result * 0x100002C5C89D5EC6D) >> 64;
            }
            if (x & 0x200000000000 > 0) {
                result = (result * 0x10000162E43F4F831) >> 64;
            }
            if (x & 0x100000000000 > 0) {
                result = (result * 0x100000B1721BCFC9A) >> 64;
            }
            if (x & 0x80000000000 > 0) {
                result = (result * 0x10000058B90CF1E6E) >> 64;
            }
            if (x & 0x40000000000 > 0) {
                result = (result * 0x1000002C5C863B73F) >> 64;
            }
            if (x & 0x20000000000 > 0) {
                result = (result * 0x100000162E430E5A2) >> 64;
            }
            if (x & 0x10000000000 > 0) {
                result = (result * 0x1000000B172183551) >> 64;
            }
            if (x & 0x8000000000 > 0) {
                result = (result * 0x100000058B90C0B49) >> 64;
            }
            if (x & 0x4000000000 > 0) {
                result = (result * 0x10000002C5C8601CC) >> 64;
            }
            if (x & 0x2000000000 > 0) {
                result = (result * 0x1000000162E42FFF0) >> 64;
            }
            if (x & 0x1000000000 > 0) {
                result = (result * 0x10000000B17217FBB) >> 64;
            }
            if (x & 0x800000000 > 0) {
                result = (result * 0x1000000058B90BFCE) >> 64;
            }
            if (x & 0x400000000 > 0) {
                result = (result * 0x100000002C5C85FE3) >> 64;
            }
            if (x & 0x200000000 > 0) {
                result = (result * 0x10000000162E42FF1) >> 64;
            }
            if (x & 0x100000000 > 0) {
                result = (result * 0x100000000B17217F8) >> 64;
            }
            if (x & 0x80000000 > 0) {
                result = (result * 0x10000000058B90BFC) >> 64;
            }
            if (x & 0x40000000 > 0) {
                result = (result * 0x1000000002C5C85FE) >> 64;
            }
            if (x & 0x20000000 > 0) {
                result = (result * 0x100000000162E42FF) >> 64;
            }
            if (x & 0x10000000 > 0) {
                result = (result * 0x1000000000B17217F) >> 64;
            }
            if (x & 0x8000000 > 0) {
                result = (result * 0x100000000058B90C0) >> 64;
            }
            if (x & 0x4000000 > 0) {
                result = (result * 0x10000000002C5C860) >> 64;
            }
            if (x & 0x2000000 > 0) {
                result = (result * 0x1000000000162E430) >> 64;
            }
            if (x & 0x1000000 > 0) {
                result = (result * 0x10000000000B17218) >> 64;
            }
            if (x & 0x800000 > 0) {
                result = (result * 0x1000000000058B90C) >> 64;
            }
            if (x & 0x400000 > 0) {
                result = (result * 0x100000000002C5C86) >> 64;
            }
            if (x & 0x200000 > 0) {
                result = (result * 0x10000000000162E43) >> 64;
            }
            if (x & 0x100000 > 0) {
                result = (result * 0x100000000000B1721) >> 64;
            }
            if (x & 0x80000 > 0) {
                result = (result * 0x10000000000058B91) >> 64;
            }
            if (x & 0x40000 > 0) {
                result = (result * 0x1000000000002C5C8) >> 64;
            }
            if (x & 0x20000 > 0) {
                result = (result * 0x100000000000162E4) >> 64;
            }
            if (x & 0x10000 > 0) {
                result = (result * 0x1000000000000B172) >> 64;
            }
            if (x & 0x8000 > 0) {
                result = (result * 0x100000000000058B9) >> 64;
            }
            if (x & 0x4000 > 0) {
                result = (result * 0x10000000000002C5D) >> 64;
            }
            if (x & 0x2000 > 0) {
                result = (result * 0x1000000000000162E) >> 64;
            }
            if (x & 0x1000 > 0) {
                result = (result * 0x10000000000000B17) >> 64;
            }
            if (x & 0x800 > 0) {
                result = (result * 0x1000000000000058C) >> 64;
            }
            if (x & 0x400 > 0) {
                result = (result * 0x100000000000002C6) >> 64;
            }
            if (x & 0x200 > 0) {
                result = (result * 0x10000000000000163) >> 64;
            }
            if (x & 0x100 > 0) {
                result = (result * 0x100000000000000B1) >> 64;
            }
            if (x & 0x80 > 0) {
                result = (result * 0x10000000000000059) >> 64;
            }
            if (x & 0x40 > 0) {
                result = (result * 0x1000000000000002C) >> 64;
            }
            if (x & 0x20 > 0) {
                result = (result * 0x10000000000000016) >> 64;
            }
            if (x & 0x10 > 0) {
                result = (result * 0x1000000000000000B) >> 64;
            }
            if (x & 0x8 > 0) {
                result = (result * 0x10000000000000006) >> 64;
            }
            if (x & 0x4 > 0) {
                result = (result * 0x10000000000000003) >> 64;
            }
            if (x & 0x2 > 0) {
                result = (result * 0x10000000000000001) >> 64;
            }
            if (x & 0x1 > 0) {
                result = (result * 0x10000000000000001) >> 64;
            }

            // We're doing two things at the same time:
            //
            //   1. Multiply the result by 2^n + 1, where "2^n" is the integer part and the one is added to account for
            //      the fact that we initially set the result to 0.5. This is accomplished by subtracting from 191
            //      rather than 192.
            //   2. Convert the result to the unsigned 60.18-decimal fixed-point format.
            //
            // This works because 2^(191-ip) = 2^ip / 2^191, where "ip" is the integer part "2^n".
            result *= SCALE;
            result >>= (191 - (x >> 64));
        }
    }

    /// @notice Finds the zero-based index of the first one in the binary representation of x.
    /// @dev See the note on msb in the "Find First Set" Wikipedia article https://en.wikipedia.org/wiki/Find_first_set
    /// @param x The uint256 number for which to find the index of the most significant bit.
    /// @return msb The index of the most significant bit as an uint256.
    function mostSignificantBit(uint256 x) internal pure returns (uint256 msb) {
        if (x >= 2**128) {
            x >>= 128;
            msb += 128;
        }
        if (x >= 2**64) {
            x >>= 64;
            msb += 64;
        }
        if (x >= 2**32) {
            x >>= 32;
            msb += 32;
        }
        if (x >= 2**16) {
            x >>= 16;
            msb += 16;
        }
        if (x >= 2**8) {
            x >>= 8;
            msb += 8;
        }
        if (x >= 2**4) {
            x >>= 4;
            msb += 4;
        }
        if (x >= 2**2) {
            x >>= 2;
            msb += 2;
        }
        if (x >= 2**1) {
            // No need to shift x any more.
            msb += 1;
        }
    }

    /// @notice Calculates floor(x*y÷denominator) with full precision.
    ///
    /// @dev Credit to Remco Bloemen under MIT license https://xn--2-umb.com/21/muldiv.
    ///
    /// Requirements:
    /// - The denominator cannot be zero.
    /// - The result must fit within uint256.
    ///
    /// Caveats:
    /// - This function does not work with fixed-point numbers.
    ///
    /// @param x The multiplicand as an uint256.
    /// @param y The multiplier as an uint256.
    /// @param denominator The divisor as an uint256.
    /// @return result The result as an uint256.
    function mulDiv(
        uint256 x,
        uint256 y,
        uint256 denominator
    ) internal pure returns (uint256 result) {
        // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
        // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
        // variables such that product = prod1 * 2^256 + prod0.
        uint256 prod0; // Least significant 256 bits of the product
        uint256 prod1; // Most significant 256 bits of the product
        assembly {
            let mm := mulmod(x, y, not(0))
            prod0 := mul(x, y)
            prod1 := sub(sub(mm, prod0), lt(mm, prod0))
        }

        // Handle non-overflow cases, 256 by 256 division.
        if (prod1 == 0) {
            unchecked {
                result = prod0 / denominator;
            }
            return result;
        }

        // Make sure the result is less than 2^256. Also prevents denominator == 0.
        if (prod1 >= denominator) {
            revert PRBMath__MulDivOverflow(prod1, denominator);
        }

        ///////////////////////////////////////////////
        // 512 by 256 division.
        ///////////////////////////////////////////////

        // Make division exact by subtracting the remainder from [prod1 prod0].
        uint256 remainder;
        assembly {
            // Compute remainder using mulmod.
            remainder := mulmod(x, y, denominator)

            // Subtract 256 bit number from 512 bit number.
            prod1 := sub(prod1, gt(remainder, prod0))
            prod0 := sub(prod0, remainder)
        }

        // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.
        // See https://cs.stackexchange.com/q/138556/92363.
        unchecked {
            // Does not overflow because the denominator cannot be zero at this stage in the function.
            uint256 lpotdod = denominator & (~denominator + 1);
            assembly {
                // Divide denominator by lpotdod.
                denominator := div(denominator, lpotdod)

                // Divide [prod1 prod0] by lpotdod.
                prod0 := div(prod0, lpotdod)

                // Flip lpotdod such that it is 2^256 / lpotdod. If lpotdod is zero, then it becomes one.
                lpotdod := add(div(sub(0, lpotdod), lpotdod), 1)
            }

            // Shift in bits from prod1 into prod0.
            prod0 |= prod1 * lpotdod;

            // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
            // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
            // four bits. That is, denominator * inv = 1 mod 2^4.
            uint256 inverse = (3 * denominator) ^ 2;

            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works
            // in modular arithmetic, doubling the correct bits in each step.
            inverse *= 2 - denominator * inverse; // inverse mod 2^8
            inverse *= 2 - denominator * inverse; // inverse mod 2^16
            inverse *= 2 - denominator * inverse; // inverse mod 2^32
            inverse *= 2 - denominator * inverse; // inverse mod 2^64
            inverse *= 2 - denominator * inverse; // inverse mod 2^128
            inverse *= 2 - denominator * inverse; // inverse mod 2^256

            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
            // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
            // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
            // is no longer required.
            result = prod0 * inverse;
            return result;
        }
    }

    /// @notice Calculates floor(x*y÷1e18) with full precision.
    ///
    /// @dev Variant of "mulDiv" with constant folding, i.e. in which the denominator is always 1e18. Before returning the
    /// final result, we add 1 if (x * y) % SCALE >= HALF_SCALE. Without this, 6.6e-19 would be truncated to 0 instead of
    /// being rounded to 1e-18.  See "Listing 6" and text above it at https://accu.org/index.php/journals/1717.
    ///
    /// Requirements:
    /// - The result must fit within uint256.
    ///
    /// Caveats:
    /// - The body is purposely left uncommented; see the NatSpec comments in "PRBMath.mulDiv" to understand how this works.
    /// - It is assumed that the result can never be type(uint256).max when x and y solve the following two equations:
    ///     1. x * y = type(uint256).max * SCALE
    ///     2. (x * y) % SCALE >= SCALE / 2
    ///
    /// @param x The multiplicand as an unsigned 60.18-decimal fixed-point number.
    /// @param y The multiplier as an unsigned 60.18-decimal fixed-point number.
    /// @return result The result as an unsigned 60.18-decimal fixed-point number.
    function mulDivFixedPoint(uint256 x, uint256 y) internal pure returns (uint256 result) {
        uint256 prod0;
        uint256 prod1;
        assembly {
            let mm := mulmod(x, y, not(0))
            prod0 := mul(x, y)
            prod1 := sub(sub(mm, prod0), lt(mm, prod0))
        }

        if (prod1 >= SCALE) {
            revert PRBMath__MulDivFixedPointOverflow(prod1);
        }

        uint256 remainder;
        uint256 roundUpUnit;
        assembly {
            remainder := mulmod(x, y, SCALE)
            roundUpUnit := gt(remainder, 499999999999999999)
        }

        if (prod1 == 0) {
            unchecked {
                result = (prod0 / SCALE) + roundUpUnit;
                return result;
            }
        }

        assembly {
            result := add(
                mul(
                    or(
                        div(sub(prod0, remainder), SCALE_LPOTD),
                        mul(sub(prod1, gt(remainder, prod0)), add(div(sub(0, SCALE_LPOTD), SCALE_LPOTD), 1))
                    ),
                    SCALE_INVERSE
                ),
                roundUpUnit
            )
        }
    }

    /// @notice Calculates floor(x*y÷denominator) with full precision.
    ///
    /// @dev An extension of "mulDiv" for signed numbers. Works by computing the signs and the absolute values separately.
    ///
    /// Requirements:
    /// - None of the inputs can be type(int256).min.
    /// - The result must fit within int256.
    ///
    /// @param x The multiplicand as an int256.
    /// @param y The multiplier as an int256.
    /// @param denominator The divisor as an int256.
    /// @return result The result as an int256.
    function mulDivSigned(
        int256 x,
        int256 y,
        int256 denominator
    ) internal pure returns (int256 result) {
        if (x == type(int256).min || y == type(int256).min || denominator == type(int256).min) {
            revert PRBMath__MulDivSignedInputTooSmall();
        }

        // Get hold of the absolute values of x, y and the denominator.
        uint256 ax;
        uint256 ay;
        uint256 ad;
        unchecked {
            ax = x < 0 ? uint256(-x) : uint256(x);
            ay = y < 0 ? uint256(-y) : uint256(y);
            ad = denominator < 0 ? uint256(-denominator) : uint256(denominator);
        }

        // Compute the absolute value of (x*y)÷denominator. The result must fit within int256.
        uint256 rAbs = mulDiv(ax, ay, ad);
        if (rAbs > uint256(type(int256).max)) {
            revert PRBMath__MulDivSignedOverflow(rAbs);
        }

        // Get the signs of x, y and the denominator.
        uint256 sx;
        uint256 sy;
        uint256 sd;
        assembly {
            sx := sgt(x, sub(0, 1))
            sy := sgt(y, sub(0, 1))
            sd := sgt(denominator, sub(0, 1))
        }

        // XOR over sx, sy and sd. This is checking whether there are one or three negative signs in the inputs.
        // If yes, the result should be negative.
        result = sx ^ sy ^ sd == 0 ? -int256(rAbs) : int256(rAbs);
    }

    /// @notice Calculates the square root of x, rounding down.
    /// @dev Uses the Babylonian method https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method.
    ///
    /// Caveats:
    /// - This function does not work with fixed-point numbers.
    ///
    /// @param x The uint256 number for which to calculate the square root.
    /// @return result The result as an uint256.
    function sqrt(uint256 x) internal pure returns (uint256 result) {
        if (x == 0) {
            return 0;
        }

        // Set the initial guess to the least power of two that is greater than or equal to sqrt(x).
        uint256 xAux = uint256(x);
        result = 1;
        if (xAux >= 0x100000000000000000000000000000000) {
            xAux >>= 128;
            result <<= 64;
        }
        if (xAux >= 0x10000000000000000) {
            xAux >>= 64;
            result <<= 32;
        }
        if (xAux >= 0x100000000) {
            xAux >>= 32;
            result <<= 16;
        }
        if (xAux >= 0x10000) {
            xAux >>= 16;
            result <<= 8;
        }
        if (xAux >= 0x100) {
            xAux >>= 8;
            result <<= 4;
        }
        if (xAux >= 0x10) {
            xAux >>= 4;
            result <<= 2;
        }
        if (xAux >= 0x8) {
            result <<= 1;
        }

        // The operations can never overflow because the result is max 2^127 when it enters this block.
        unchecked {
            result = (result + x / result) >> 1;
            result = (result + x / result) >> 1;
            result = (result + x / result) >> 1;
            result = (result + x / result) >> 1;
            result = (result + x / result) >> 1;
            result = (result + x / result) >> 1;
            result = (result + x / result) >> 1; // Seven iterations should be enough
            uint256 roundedDownResult = x / result;
            return result >= roundedDownResult ? roundedDownResult : result;
        }
    }
}

/** 
  @member duration The number of seconds the funding cycle lasts for, after which a new funding cycle will start. A duration of 0 means that the funding cycle will stay active until the project owner explicitly issues a reconfiguration, at which point a new funding cycle will immediately start with the updated properties. If the duration is greater than 0, a project owner cannot make changes to a funding cycle's parameters while it is active – any proposed changes will apply to the subsequent cycle. If no changes are proposed, a funding cycle rolls over to another one with the same properties but new `start` timestamp and a discounted `weight`.
  @member weight A fixed point number with 18 decimals that contracts can use to base arbitrary calculations on. For example, payment terminals can use this to determine how many tokens should be minted when a payment is received.
  @member discountRate A percent by how much the `weight` of the subsequent funding cycle should be reduced, if the project owner hasn't configured the subsequent funding cycle with an explicit `weight`. If it's 0, each funding cycle will have equal weight. If the number is 90%, the next funding cycle will have a 10% smaller weight. This weight is out of `JBConstants.MAX_DISCOUNT_RATE`.
  @member ballot An address of a contract that says whether a proposed reconfiguration should be accepted or rejected. It can be used to create rules around how a project owner can change funding cycle parameters over time.
*/
struct JBFundingCycleData {
  uint256 duration;
  uint256 weight;
  uint256 discountRate;
  IJBFundingCycleBallot ballot;
}

interface IJBFundingCycleStore {
  event Configure(
    uint256 indexed configuration,
    uint256 indexed projectId,
    JBFundingCycleData data,
    uint256 metadata,
    uint256 mustStartAtOrAfter,
    address caller
  );

  event Init(uint256 indexed configuration, uint256 indexed projectId, uint256 indexed basedOn);

  function latestConfigurationOf(uint256 _projectId) external view returns (uint256);

  function get(uint256 _projectId, uint256 _configuration)
    external
    view
    returns (JBFundingCycle memory);

  function latestConfiguredOf(uint256 _projectId)
    external
    view
    returns (JBFundingCycle memory fundingCycle, JBBallotState ballotState);

  function queuedOf(uint256 _projectId) external view returns (JBFundingCycle memory fundingCycle);

  function currentOf(uint256 _projectId) external view returns (JBFundingCycle memory fundingCycle);

  function currentBallotStateOf(uint256 _projectId) external view returns (JBBallotState);

  function configureFor(
    uint256 _projectId,
    JBFundingCycleData calldata _data,
    uint256 _metadata,
    uint256 _mustStartAtOrAfter
  ) external returns (JBFundingCycle memory fundingCycle);
}

// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol)

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721 is IERC165 {
    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
     */
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
     */
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /**
     * @dev Returns the number of tokens in ``owner``'s account.
     */
    function balanceOf(address owner) external view returns (uint256 balance);

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) external view returns (address owner);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes calldata data
    ) external;

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * The approval is cleared when the token is transferred.
     *
     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function approve(address to, uint256 tokenId) external;

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool _approved) external;

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
     *
     * See {setApprovalForAll}
     */
    function isApprovedForAll(address owner, address operator) external view returns (bool);
}

/** 
  @member content The metadata content.
  @member domain The domain within which the metadata applies.
*/
struct JBProjectMetadata {
  string content;
  uint256 domain;
}

interface IJBTokenUriResolver {
  function getUri(uint256 _projectId) external view returns (string memory tokenUri);
}

interface IJBProjects is IERC721 {
  event Create(
    uint256 indexed projectId,
    address indexed owner,
    JBProjectMetadata metadata,
    address caller
  );

  event SetMetadata(uint256 indexed projectId, JBProjectMetadata metadata, address caller);

  event SetTokenUriResolver(IJBTokenUriResolver indexed resolver, address caller);

  function count() external view returns (uint256);

  function metadataContentOf(uint256 _projectId, uint256 _domain)
    external
    view
    returns (string memory);

  function tokenUriResolver() external view returns (IJBTokenUriResolver);

  function createFor(address _owner, JBProjectMetadata calldata _metadata)
    external
    returns (uint256 projectId);

  function setMetadataOf(uint256 _projectId, JBProjectMetadata calldata _metadata) external;

  function setTokenUriResolver(IJBTokenUriResolver _newResolver) external;
}

interface IJBDirectory {
  event SetController(uint256 indexed projectId, address indexed controller, address caller);

  event AddTerminal(uint256 indexed projectId, IJBPaymentTerminal indexed terminal, address caller);

  event SetTerminals(uint256 indexed projectId, IJBPaymentTerminal[] terminals, address caller);

  event SetPrimaryTerminal(
    uint256 indexed projectId,
    address indexed token,
    IJBPaymentTerminal indexed terminal,
    address caller
  );

  event SetIsAllowedToSetFirstController(address indexed addr, bool indexed flag, address caller);

  function projects() external view returns (IJBProjects);

  function fundingCycleStore() external view returns (IJBFundingCycleStore);

  function controllerOf(uint256 _projectId) external view returns (address);

  function isAllowedToSetFirstController(address _address) external view returns (bool);

  function terminalsOf(uint256 _projectId) external view returns (IJBPaymentTerminal[] memory);

  function isTerminalOf(uint256 _projectId, IJBPaymentTerminal _terminal)
    external
    view
    returns (bool);

  function primaryTerminalOf(uint256 _projectId, address _token)
    external
    view
    returns (IJBPaymentTerminal);

  function setControllerOf(uint256 _projectId, address _controller) external;

  function setTerminalsOf(uint256 _projectId, IJBPaymentTerminal[] calldata _terminals) external;

  function setPrimaryTerminalOf(
    uint256 _projectId,
    address _token,
    IJBPaymentTerminal _terminal
  ) external;

  function setIsAllowedToSetFirstController(address _address, bool _flag) external;
}

interface IJB721Delegate {
  event SetBaseUri(string indexed baseUri, address caller);

  event SetContractUri(string indexed contractUri, address caller);

  event SetTokenUriResolver(IJBTokenUriResolver indexed newResolver, address caller);

  function projectId() external view returns (uint256);

  function directory() external view returns (IJBDirectory);

  function setBaseUri(string memory _baseUri) external;

  function setContractUri(string calldata _contractMetadataUri) external;

  function setTokenUriResolver(IJBTokenUriResolver _tokenUriResolver) external;
}

// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/ERC721.sol)

// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)

/**
 * @title ERC721 token receiver interface
 * @dev Interface for any contract that wants to support safeTransfers
 * from ERC721 asset contracts.
 */
interface IERC721Receiver {
    /**
     * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
     * by `operator` from `from`, this function is called.
     *
     * It must return its Solidity selector to confirm the token transfer.
     * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
     *
     * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)

/**
 * @title ERC-721 Non-Fungible Token Standard, optional metadata extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Metadata is IERC721 {
    /**
     * @dev Returns the token collection name.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the token collection symbol.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
     */
    function tokenURI(uint256 tokenId) external view returns (string memory);
}

// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly
                /// @solidity memory-safe-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
    uint8 private constant _ADDRESS_LENGTH = 20;

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _HEX_SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }

    /**
     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
     */
    function toHexString(address addr) internal pure returns (string memory) {
        return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
    }
}

// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

/**
 * @dev Doesn't track balances.
 *
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
 * the Metadata extension, but not including the Enumerable extension, which is available separately as
 * {ERC721Enumerable}.
 */
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
  using Address for address;
  using Strings for uint256;

  error ALEADY_MINTED();
  error APPROVE_TO_CALLER();
  error APPROVAL_TO_CURRENT_OWNER();
  error CALLER_NOT_OWNER_OR_APPROVED();
  error INVALID_TOKEN_ID();
  error INCORRECT_OWNER();
  error MINT_TO_ZERO();
  error TRANSFER_TO_NON_IMPLEMENTER();
  error TRANSFER_TO_ZERO_ADDRESS();

  // Token name
  string private _name;

  // Token symbol
  string private _symbol;

  // Mapping from token ID to owner address
  mapping(uint256 => address) internal _owners;

  // Mapping from token ID to approved address
  mapping(uint256 => address) private _tokenApprovals;

  // Mapping from owner to operator approvals
  mapping(address => mapping(address => bool)) private _operatorApprovals;

  /**
   * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
   */
  function _initialize(string memory name_, string memory symbol_) internal {
    _name = name_;
    _symbol = symbol_;
  }

  /**
   * @dev See {IERC165-supportsInterface}.
   */
  function supportsInterface(bytes4 interfaceId)
    public
    view
    virtual
    override(ERC165, IERC165)
    returns (bool)
  {
    return
      interfaceId == type(IERC721).interfaceId ||
      interfaceId == type(IERC721Metadata).interfaceId ||
      super.supportsInterface(interfaceId);
  }

  /**
    @dev Balance tracking to be overriden by childs
  */
  function balanceOf(address owner) external view virtual override returns (uint256 balance) {
    owner;
    return 0;
  }

  /**
   * @dev See {IERC721-ownerOf}.
   */
  function ownerOf(uint256 tokenId) public view virtual override returns (address) {
    address owner = _owners[tokenId];
    if (owner == address(0)) revert INVALID_TOKEN_ID();
    return owner;
  }

  /**
   * @dev See {IERC721Metadata-name}.
   */
  function name() public view virtual override returns (string memory) {
    return _name;
  }

  /**
   * @dev See {IERC721Metadata-symbol}.
   */
  function symbol() public view virtual override returns (string memory) {
    return _symbol;
  }

  /**
   * @dev See {IERC721Metadata-tokenURI}.
   */
  function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
    _requireMinted(tokenId);

    string memory baseURI = _baseURI();
    return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : '';
  }

  /**
   * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
   * token will be the concatenation of the `baseURI` and the `tokenId`. Empty
   * by default, can be overridden in child contracts.
   */
  function _baseURI() internal view virtual returns (string memory) {
    return '';
  }

  /**
   * @dev See {IERC721-approve}.
   */
  function approve(address to, uint256 tokenId) public virtual override {
    address owner = ERC721.ownerOf(tokenId);

    if (to == owner) revert APPROVAL_TO_CURRENT_OWNER();

    if (_msgSender() != owner && !isApprovedForAll(owner, _msgSender()))
      revert CALLER_NOT_OWNER_OR_APPROVED();

    _approve(to, tokenId);
  }

  /**
   * @dev See {IERC721-getApproved}.
   */
  function getApproved(uint256 tokenId) public view virtual override returns (address) {
    _requireMinted(tokenId);

    return _tokenApprovals[tokenId];
  }

  /**
   * @dev See {IERC721-setApprovalForAll}.
   */
  function setApprovalForAll(address operator, bool approved) public virtual override {
    _setApprovalForAll(_msgSender(), operator, approved);
  }

  /**
   * @dev See {IERC721-isApprovedForAll}.
   */
  function isApprovedForAll(address owner, address operator)
    public
    view
    virtual
    override
    returns (bool)
  {
    return _operatorApprovals[owner][operator];
  }

  /**
   * @dev See {IERC721-transferFrom}.
   */
  function transferFrom(
    address from,
    address to,
    uint256 tokenId
  ) public virtual override {
    //solhint-disable-next-line max-line-length
    if (!_isApprovedOrOwner(_msgSender(), tokenId)) revert CALLER_NOT_OWNER_OR_APPROVED();

    _transfer(from, to, tokenId);
  }

  /**
   * @dev See {IERC721-safeTransferFrom}.
   */
  function safeTransferFrom(
    address from,
    address to,
    uint256 tokenId
  ) public virtual override {
    safeTransferFrom(from, to, tokenId, '');
  }

  /**
   * @dev See {IERC721-safeTransferFrom}.
   */
  function safeTransferFrom(
    address from,
    address to,
    uint256 tokenId,
    bytes memory data
  ) public virtual override {
    if (!_isApprovedOrOwner(_msgSender(), tokenId)) revert CALLER_NOT_OWNER_OR_APPROVED();
    _safeTransfer(from, to, tokenId, data);
  }

  /**
   * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
   * are aware of the ERC721 protocol to prevent tokens from being forever locked.
   *
   * `data` is additional data, it has no specified format and it is sent in call to `to`.
   *
   * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
   * implement alternative mechanisms to perform token transfer, such as signature-based.
   *
   * Requirements:
   *
   * - `from` cannot be the zero address.
   * - `to` cannot be the zero address.
   * - `tokenId` token must exist and be owned by `from`.
   * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
   *
   * Emits a {Transfer} event.
   */
  function _safeTransfer(
    address from,
    address to,
    uint256 tokenId,
    bytes memory data
  ) internal virtual {
    _transfer(from, to, tokenId);
    if (!_checkOnERC721Received(from, to, tokenId, data)) revert TRANSFER_TO_NON_IMPLEMENTER();
  }

  /**
   * @dev Returns whether `tokenId` exists.
   *
   * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
   *
   * Tokens start existing when they are minted (`_mint`),
   * and stop existing when they are burned (`_burn`).
   */
  function _exists(uint256 tokenId) internal view virtual returns (bool) {
    return _owners[tokenId] != address(0);
  }

  /**
   * @dev Returns whether `spender` is allowed to manage `tokenId`.
   *
   * Requirements:
   *
   * - `tokenId` must exist.
   */
  function _isApprovedOrOwner(address spender, uint256 tokenId)
    internal
    view
    virtual
    returns (bool)
  {
    address owner = ERC721.ownerOf(tokenId);
    return (spender == owner ||
      isApprovedForAll(owner, spender) ||
      getApproved(tokenId) == spender);
  }

  /**
   * @dev Mints `tokenId` and transfers it to `to`.
   *
   * Requirements:
   *
   * - `tokenId` must not exist.
   * - `to` cannot be the zero address.
   *
   * Emits a {Transfer} event.
   */
  function _mint(address to, uint256 tokenId) internal virtual {
    if (to == address(0)) revert MINT_TO_ZERO();
    if (_exists(tokenId)) revert ALEADY_MINTED();

    _beforeTokenTransfer(address(0), to, tokenId);

    _owners[tokenId] = to;

    emit Transfer(address(0), to, tokenId);

    _afterTokenTransfer(address(0), to, tokenId);
  }

  /**
   * @dev Destroys `tokenId`.
   * The approval is cleared when the token is burned.
   *
   * Requirements:
   *
   * - `tokenId` must exist.
   *
   * Emits a {Transfer} event.
   */
  function _burn(uint256 tokenId) internal virtual {
    address owner = ERC721.ownerOf(tokenId);

    _beforeTokenTransfer(owner, address(0), tokenId);

    // Clear approvals
    _approve(address(0), tokenId);

    delete _owners[tokenId];

    emit Transfer(owner, address(0), tokenId);

    _afterTokenTransfer(owner, address(0), tokenId);
  }

  /**
   * @dev Transfers `tokenId` from `from` to `to`.
   *  As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
   *
   * Requirements:
   *
   * - `to` cannot be the zero address.
   * - `tokenId` token must be owned by `from`.
   *
   * Emits a {Transfer} event.
   */
  function _transfer(
    address from,
    address to,
    uint256 tokenId
  ) internal virtual {
    if (ERC721.ownerOf(tokenId) != from) revert INCORRECT_OWNER();
    if (to == address(0)) revert TRANSFER_TO_ZERO_ADDRESS();

    _beforeTokenTransfer(from, to, tokenId);

    // Clear approvals from the previous owner
    _approve(address(0), tokenId);

    _owners[tokenId] = to;

    emit Transfer(from, to, tokenId);

    _afterTokenTransfer(from, to, tokenId);
  }

  /**
   * @dev Approve `to` to operate on `tokenId`
   *
   * Emits an {Approval} event.
   */
  function _approve(address to, uint256 tokenId) internal virtual {
    _tokenApprovals[tokenId] = to;
    emit Approval(ERC721.ownerOf(tokenId), to, tokenId);
  }

  /**
   * @dev Approve `operator` to operate on all of `owner` tokens
   *
   * Emits an {ApprovalForAll} event.
   */
  function _setApprovalForAll(
    address owner,
    address operator,
    bool approved
  ) internal virtual {
    if (owner == operator) revert APPROVE_TO_CALLER();
    _operatorApprovals[owner][operator] = approved;
    emit ApprovalForAll(owner, operator, approved);
  }

  /**
   * @dev Reverts if the `tokenId` has not been minted yet.
   */
  function _requireMinted(uint256 tokenId) internal view virtual {
    if (!_exists(tokenId)) revert INVALID_TOKEN_ID();
  }

  /**
   * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
   * The call is not executed if the target address is not a contract.
   *
   * @param from address representing the previous owner of the given token ID
   * @param to target address that will receive the tokens
   * @param tokenId uint256 ID of the token to be transferred
   * @param data bytes optional data to send along with the call
   * @return bool whether the call correctly returned the expected magic value
   */
  function _checkOnERC721Received(
    address from,
    address to,
    uint256 tokenId,
    bytes memory data
  ) private returns (bool) {
    if (to.isContract()) {
      try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (
        bytes4 retval
      ) {
        return retval == IERC721Receiver.onERC721Received.selector;
      } catch (bytes memory reason) {
        if (reason.length == 0) {
          revert TRANSFER_TO_NON_IMPLEMENTER();
        } else {
          /// @solidity memory-safe-assembly
          assembly {
            revert(add(32, reason), mload(reason))
          }
        }
      }
    } else {
      return true;
    }
  }

  /**
   * @dev Hook that is called before any token transfer. This includes minting
   * and burning.
   *
   * Calling conditions:
   *
   * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
   * transferred to `to`.
   * - When `from` is zero, `tokenId` will be minted for `to`.
   * - When `to` is zero, ``from``'s `tokenId` will be burned.
   * - `from` and `to` are never both zero.
   *
   * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
   */
  function _beforeTokenTransfer(
    address from,
    address to,
    uint256 tokenId
  ) internal virtual {}

  /**
   * @dev Hook that is called after any transfer of tokens. This includes
   * minting and burning.
   *
   * Calling conditions:
   *
   * - when `from` and `to` are both non-zero.
   * - `from` and `to` are never both zero.
   *
   * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
   */
  function _afterTokenTransfer(
    address from,
    address to,
    uint256 tokenId
  ) internal virtual {}
}

/**
  @title 
  JB721Delegate

  @notice 
  Delegate that offers project contributors NFTs upon payment and the ability to redeem NFTs for treasury assets.

  @dev
  Adheres to -
  IJB721Delegate: General interface for the methods in this contract that interact with the blockchain's state according to the protocol's rules.
  IJBFundingCycleDataSource: Allows this contract to be attached to a funding cycle to have its methods called during regular protocol operations.
  IJBPayDelegate: Allows this contract to receive callbacks when a project receives a payment.
  IJBRedemptionDelegate: Allows this contract to receive callbacks when a token holder redeems.

  @dev
  Inherits from -
  ERC721: A standard definition for non-fungible tokens (NFTs).
*/
abstract contract JB721Delegate is
  IJB721Delegate,
  IJBFundingCycleDataSource,
  IJBPayDelegate,
  IJBRedemptionDelegate,
  ERC721
{
  //*********************************************************************//
  // --------------------------- custom errors ------------------------- //
  //*********************************************************************//

  error INVALID_PAYMENT_EVENT();
  error INVALID_REDEMPTION_EVENT();
  error UNAUTHORIZED();
  error UNEXPECTED_TOKEN_REDEEMED();
  error INVALID_REDEMPTION_METADATA();

  //*********************************************************************//
  // --------------- public immutable stored properties ---------------- //
  //*********************************************************************//

  /**
    @notice
    The ID of the project this contract's functionality applies to.
  */
  uint256 public override projectId;

  /**
    @notice
    The directory of terminals and controllers for projects.
  */
  IJBDirectory public override directory;

  //*********************************************************************//
  // ------------------------- external views -------------------------- //
  //*********************************************************************//

  /**
    @notice 
    Part of IJBFundingCycleDataSource, this function gets called when the project receives a payment. It will set itself as the delegate to get a callback from the terminal.

    @param _data The Juicebox standard project payment data.

    @return weight The weight that tokens should get minted in accordance with.
    @return memo The memo that should be forwarded to the event.
    @return delegateAllocations The amount to send to delegates instead of adding to the local balance.
  */
  function payParams(JBPayParamsData calldata _data)
    public
    view
    virtual
    override
    returns (
      uint256 weight,
      string memory memo,
      JBPayDelegateAllocation[] memory delegateAllocations
    )
  {
    // Forward the received weight and memo, and use this contract as a pay delegate.
    weight = _data.weight;
    memo = _data.memo;
    delegateAllocations = new JBPayDelegateAllocation[](1);
    delegateAllocations[0] = JBPayDelegateAllocation(this, 0);
  }

  /**
    @notice 
    Part of IJBFundingCycleDataSource, this function gets called when a project's token holders redeem.

    @param _data The Juicebox standard project redemption data.

    @return reclaimAmount The amount that should be reclaimed from the treasury.
    @return memo The memo that should be forwarded to the event.
    @return delegateAllocations The amount to send to delegates instead of adding to the beneficiary.
  */
  function redeemParams(JBRedeemParamsData calldata _data)
    public
    view
    virtual
    override
    returns (
      uint256 reclaimAmount,
      string memory memo,
      JBRedemptionDelegateAllocation[] memory delegateAllocations
    )
  {
    // Make sure fungible project tokens aren't being redeemed too.
    if (_data.tokenCount > 0) revert UNEXPECTED_TOKEN_REDEEMED();

    // Check the 4 bytes interfaceId and handle the case where the metadata was not intended for this contract
    // Skip 32 bytes reserved for generic extension parameters.
    if (
      _data.metadata.length < 36 ||
      bytes4(_data.metadata[32:36]) != type(IJB721Delegate).interfaceId
    ) {
      revert INVALID_REDEMPTION_METADATA();
    }

    // Set the only delegate allocation to be a callback to this contract.
    delegateAllocations = new JBRedemptionDelegateAllocation[](1);
    delegateAllocations[0] = JBRedemptionDelegateAllocation(this, 0);

    // Decode the metadata
    (, , uint256[] memory _decodedTokenIds) = abi.decode(
      _data.metadata,
      (bytes32, bytes4, uint256[])
    );

    // Get a reference to the redemption rate of the provided tokens.
    uint256 _redemptionWeight = _redemptionWeightOf(_decodedTokenIds, _data);

    // Get a reference to the total redemption weight.
    uint256 _total = _totalRedemptionWeight(_data);

    // Get a reference to the linear proportion.
    uint256 _base = PRBMath.mulDiv(_data.overflow, _redemptionWeight, _total);

    // These conditions are all part of the same curve. Edge conditions are separated because fewer operation are necessary.
    if (_data.redemptionRate == JBConstants.MAX_REDEMPTION_RATE)
      return (_base, _data.memo, delegateAllocations);

    // Return the weighted overflow, and this contract as the delegate so that tokens can be deleted.
    return (
      PRBMath.mulDiv(
        _base,
        _data.redemptionRate +
          PRBMath.mulDiv(
            _redemptionWeight,
            JBConstants.MAX_REDEMPTION_RATE - _data.redemptionRate,
            _total
          ),
        JBConstants.MAX_REDEMPTION_RATE
      ),
      _data.memo,
      delegateAllocations
    );
  }

  //*********************************************************************//
  // -------------------------- public views --------------------------- //
  //*********************************************************************//

  /**
    @notice
    Indicates if this contract adheres to the specified interface.

    @dev
    See {IERC165-supportsInterface}.

    @param _interfaceId The ID of the interface to check for adherence to.
  */
  function supportsInterface(bytes4 _interfaceId)
    public
    view
    virtual
    override(ERC721, IERC165)
    returns (bool)
  {
    return
      _interfaceId == type(IJB721Delegate).interfaceId ||
      _interfaceId == type(IJBFundingCycleDataSource).interfaceId ||
      _interfaceId == type(IJBPayDelegate).interfaceId ||
      _interfaceId == type(IJBRedemptionDelegate).interfaceId ||
      super.supportsInterface(_interfaceId);
  }

  //*********************************************************************//
  // -------------------------- constructor ---------------------------- //
  //*********************************************************************//

  /**
    @param _projectId The ID of the project this contract's functionality applies to.
    @param _directory The directory of terminals and controllers for projects.
    @param _name The name of the token.
    @param _symbol The symbol that the token should be represented by.
  */
  function _initialize(
    uint256 _projectId,
    IJBDirectory _directory,
    string memory _name,
    string memory _symbol
  ) internal {
    ERC721._initialize(_name, _symbol);

    projectId = _projectId;
    directory = _directory;
  }

  //*********************************************************************//
  // ---------------------- external transactions ---------------------- //
  //*********************************************************************//

  /**
    @notice 
    Part of IJBPayDelegate, this function gets called when the project receives a payment. It will mint an NFT to the contributor (_data.beneficiary) if conditions are met.

    @dev 
    This function will revert if the contract calling is not one of the project's terminals. 

    @param _data The Juicebox standard project payment data.
  */
  function didPay(JBDidPayData calldata _data) external payable virtual override {
    uint256 _projectId = projectId;

    // Make sure the caller is a terminal of the project, and the call is being made on behalf of an interaction with the correct project.
    if (
      msg.value != 0 ||
      !directory.isTerminalOf(_projectId, IJBPaymentTerminal(msg.sender)) ||
      _data.projectId != _projectId
    ) revert INVALID_PAYMENT_EVENT();

    // Process the payment.
    _processPayment(_data);
  }

  /**
    @notice
    Part of IJBRedeemDelegate, this function gets called when the token holder redeems. It will burn the specified NFTs to reclaim from the treasury to the _data.beneficiary.

    @dev
    This function will revert if the contract calling is not one of the project's terminals.

    @param _data The Juicebox standard project redemption data.
  */
  function didRedeem(JBDidRedeemData calldata _data) external payable virtual override {
    // Make sure the caller is a terminal of the project, and the call is being made on behalf of an interaction with the correct project.
    if (
      msg.value != 0 ||
      !directory.isTerminalOf(projectId, IJBPaymentTerminal(msg.sender)) ||
      _data.projectId != projectId
    ) revert INVALID_REDEMPTION_EVENT();

    // Check the 4 bytes interfaceId and handle the case where the metadata was not intended for this contract
    // Skip 32 bytes reserved for generic extension parameters.
    if (
      _data.metadata.length < 36 ||
      bytes4(_data.metadata[32:36]) != type(IJB721Delegate).interfaceId
    ) revert INVALID_REDEMPTION_METADATA();

    // Decode the metadata.
    (, , uint256[] memory _decodedTokenIds) = abi.decode(
      _data.metadata,
      (bytes32, bytes4, uint256[])
    );

    // Get a reference to the number of token IDs being checked.
    uint256 _numberOfTokenIds = _decodedTokenIds.length;

    // Keep a reference to the token ID being iterated on.
    uint256 _tokenId;

    // Iterate through all tokens, burning them if the owner is correct.
    for (uint256 _i; _i < _numberOfTokenIds; ) {
      // Set the token's ID.
      _tokenId = _decodedTokenIds[_i];

      // Make sure the token's owner is correct.
      if (_owners[_tokenId] != _data.holder) revert UNAUTHORIZED();

      // Burn the token.
      _burn(_tokenId);

      unchecked {
        ++_i;
      }
    }

    // Call the hook.
    _didBurn(_decodedTokenIds);
  }

  //*********************************************************************//
  // ---------------------- internal transactions ---------------------- //
  //*********************************************************************//

  /** 
    @notice
    Process a received payment.

    @param _data The Juicebox standard project payment data.
  */
  function _processPayment(JBDidPayData calldata _data) internal virtual {
    _data; // Prevents unused var compiler and natspec complaints.
  }

  /** 
    @notice
    A function that will run when tokens are burned via redemption.

    @param _tokenIds The IDs of the tokens that were burned.
  */
  function _didBurn(uint256[] memory _tokenIds) internal virtual {
    _tokenIds;
  }

  /** 
    @notice
    The cumulative weight the given token IDs have in redemptions compared to the `totalRedemptionWeight`. 

    @param _tokenIds The IDs of the tokens to get the cumulative redemption weight of.
    @param _data The Juicebox standard project redemption data.

    @return The weight.
  */
  function _redemptionWeightOf(uint256[] memory _tokenIds, JBRedeemParamsData calldata _data)
    internal
    view
    virtual
    returns (uint256)
  {
    _tokenIds; // Prevents unused var compiler and natspec complaints.
    _data; // Prevents unused var compiler and natspec complaints.
    return 0;
  }

  /** 
    @notice
    The cumulative weight that all token IDs have in redemptions. 

    @param _data The Juicebox standard project redemption data.

    @return The total weight.
  */
  function _totalRedemptionWeight(JBRedeemParamsData calldata _data)
    internal
    view
    virtual
    returns (uint256)
  {
    _data; // Prevents unused var compiler and natspec complaints.
    return 0;
  }
}

interface IJBPriceFeed {
  function currentPrice(uint256 _targetDecimals) external view returns (uint256);
}

interface IJBPrices {
  event AddFeed(uint256 indexed currency, uint256 indexed base, IJBPriceFeed feed);

  function feedFor(uint256 _currency, uint256 _base) external view returns (IJBPriceFeed);

  function priceFor(
    uint256 _currency,
    uint256 _base,
    uint256 _decimals
  ) external view returns (uint256);

  function addFeedFor(
    uint256 _currency,
    uint256 _base,
    IJBPriceFeed _priceFeed
  ) external;
}

/**
  @member contributionFloor The minimum contribution to qualify for this tier.
  @member lockedUntil The time up to which this tier cannot be removed or paused.
  @member initialQuantity The initial `remainingAllowance` value when the tier was set.
  @member votingUnits The amount of voting significance to give this tier compared to others.
  @memver reservedRate The number of minted tokens needed in the tier to allow for minting another reserved token.
  @member reservedRateBeneficiary The beneificary of the reserved tokens for this tier.
  @member encodedIPFSUri The URI to use for each token within the tier.
  @member allowManualMint A flag indicating if the contract's owner can mint from this tier on demand.
  @member shouldUseBeneficiaryAsDefault A flag indicating if the `reservedTokenBeneficiary` should be stored as the default beneficiary for all tiers.
  @member transfersPausable A flag indicating if transfers from this tier can be pausable. 
*/
struct JB721TierParams {
  uint80 contributionFloor;
  uint48 lockedUntil;
  uint40 initialQuantity;
  uint16 votingUnits;
  uint16 reservedRate;
  address reservedTokenBeneficiary;
  bytes32 encodedIPFSUri;
  bool allowManualMint;
  bool shouldUseBeneficiaryAsDefault;
  bool transfersPausable;
}

/**
  @member tiers The tiers to set.
  @member currency The currency that the tier contribution floors are denoted in.
  @member decimals The number of decimals included in the tier contribution floor fixed point numbers.
  @member prices A contract that exposes price feeds that can be used to resolved the value of a contributions that are sent in different currencies. Set to the zero address if payments must be made in `currency`.
*/
struct JB721PricingParams {
  JB721TierParams[] tiers;
  uint256 currency;
  uint256 decimals;
  IJBPrices prices;
}

/** 
  @member tierId The ID of the tier to mint within.
  @member count The number of reserved tokens to mint. 
*/
struct JBTiered721MintReservesForTiersData {
  uint256 tierId;
  uint256 count;
}

/** 
  @member tierIds The IDs of the tier to mint within.
  @member beneficiary The beneficiary to mint for. 
*/
struct JBTiered721MintForTiersData {
  uint16[] tierIds;
  address beneficiary;
}

/**
  @member id The tier's ID.
  @member contributionFloor The minimum contribution to qualify for this tier.
  @member lockedUntil The time up to which this tier cannot be removed or paused.
  @member remainingQuantity Remaining number of tokens in this tier. Together with idCeiling this enables for consecutive, increasing token ids to be issued to contributors.
  @member initialQuantity The initial `remainingAllowance` value when the tier was set.
  @member votingUnits The amount of voting significance to give this tier compared to others.
  @member reservedRate The number of minted tokens needed in the tier to allow for minting another reserved token.
  @member reservedRateBeneficiary The beneificary of the reserved tokens for this tier.
  @member encodedIPFSUri The URI to use for each token within the tier.
  @member allowManualMint A flag indicating if the contract's owner can mint from this tier on demand.
  @member transfersPausable A flag indicating if transfers from this tier can be pausable. 
*/
struct JB721Tier {
  uint256 id;
  uint256 contributionFloor;
  uint256 lockedUntil;
  uint256 remainingQuantity;
  uint256 initialQuantity;
  uint256 votingUnits;
  uint256 reservedRate;
  address reservedTokenBeneficiary;
  bytes32 encodedIPFSUri;
  bool allowManualMint;
  bool transfersPausable;
}

/** 
  @member lockReservedTokenChanges A flag indicating if reserved tokens can change over time by adding new tiers with a reserved rate.
  @member lockVotingUnitChanges A flag indicating if voting unit expectations can change over time by adding new tiers with voting units.
  @member lockManualMintingChanges A flag indicating if manual minting expectations can change over time by adding new tiers with manual minting.
*/
struct JBTiered721Flags {
  bool lockReservedTokenChanges;
  bool lockVotingUnitChanges;
  bool lockManualMintingChanges;
}

interface IJBTiered721DelegateStore {
  event CleanTiers(address indexed nft, address caller);

  function totalSupply(address _nft) external view returns (uint256);

  function balanceOf(address _nft, address _owner) external view returns (uint256);

  function maxTierIdOf(address _nft) external view returns (uint256);

  function tiers(
    address _nft,
    uint256 _startingSortIndex,
    uint256 _size
  ) external view returns (JB721Tier[] memory tiers);

  function tier(address _nft, uint256 _id) external view returns (JB721Tier memory tier);

  function tierBalanceOf(
    address _nft,
    address _owner,
    uint256 _tier
  ) external view returns (uint256);

  function tierOfTokenId(address _nft, uint256 _tokenId)
    external
    view
    returns (JB721Tier memory tier);

  function tierIdOfToken(uint256 _tokenId) external pure returns (uint256);

  function encodedIPFSUriOf(address _nft, uint256 _tierId) external view returns (bytes32);

  function firstOwnerOf(address _nft, uint256 _tokenId) external view returns (address);

  function redemptionWeightOf(address _nft, uint256[] memory _tokenIds)
    external
    view
    returns (uint256 weight);

  function totalRedemptionWeight(address _nft) external view returns (uint256 weight);

  function numberOfReservedTokensOutstandingFor(address _nft, uint256 _tierId)
    external
    view
    returns (uint256);

  function numberOfReservesMintedFor(address _nft, uint256 _tierId) external view returns (uint256);

  function numberOfBurnedFor(address _nft, uint256 _tierId) external view returns (uint256);

  function isTierRemoved(address _nft, uint256 _tierId) external view returns (bool);

  function flagsOf(address _nft) external view returns (JBTiered721Flags memory);

  function votingUnitsOf(address _nft, address _account) external view returns (uint256 units);

  function tierVotingUnitsOf(
    address _nft,
    address _account,
    uint256 _tierId
  ) external view returns (uint256 units);

  function defaultReservedTokenBeneficiaryOf(address _nft) external view returns (address);

  function reservedTokenBeneficiaryOf(address _nft, uint256 _tierId)
    external
    view
    returns (address);

  function baseUriOf(address _nft) external view returns (string memory);

  function contractUriOf(address _nft) external view returns (string memory);

  function tokenUriResolverOf(address _nft) external view returns (IJBTokenUriResolver);

  function encodedTierIPFSUriOf(address _nft, uint256 _tokenId) external view returns (bytes32);

  function recordAddTiers(JB721TierParams[] memory _tierData)
    external
    returns (uint256[] memory tierIds);

  function recordMintReservesFor(uint256 _tierId, uint256 _count)
    external
    returns (uint256[] memory tokenIds);

  function recordMintBestAvailableTier(uint256 _amount)
    external
    returns (
      uint256 tokenId,
      uint256 tierId,
      uint256 leftoverAmount
    );

  function recordBurn(uint256[] memory _tokenIds) external;

  function recordSetDefaultReservedTokenBeneficiary(address _beneficiary) external;

  function recordMint(
    uint256 _amount,
    uint16[] calldata _tierIds,
    bool _isManualMint
  ) external returns (uint256[] memory tokenIds, uint256 leftoverAmount);

  function recordTransferForTier(
    uint256 _tierId,
    address _from,
    address _to
  ) external;

  function recordRemoveTierIds(uint256[] memory _tierIds) external;

  function recordSetFirstOwnerOf(uint256 _tokenId, address _owner) external;

  function recordSetBaseUri(string memory _uri) external;

  function recordSetContractUri(string memory _uri) external;

  function recordSetTokenUriResolver(IJBTokenUriResolver _resolver) external;

  function recordFlags(JBTiered721Flags calldata _flag) external;

  function cleanTiers(address _nft) external;
}

interface IJBTiered721Delegate is IJB721Delegate {
  event Mint(
    uint256 indexed tokenId,
    uint256 indexed tierId,
    address indexed beneficiary,
    uint256 totalAmountContributed,
    address caller
  );

  event MintReservedToken(
    uint256 indexed tokenId,
    uint256 indexed tierId,
    address indexed beneficiary,
    address caller
  );

  event AddTier(uint256 indexed tierId, JB721TierParams data, address caller);

  event RemoveTier(uint256 indexed tierId, address caller);

  event SetDefaultReservedTokenBeneficiary(address indexed beneficiary, address caller);

  function codeOrigin() external view returns (address);

  function store() external view returns (IJBTiered721DelegateStore);

  function fundingCycleStore() external view returns (IJBFundingCycleStore);

  function prices() external view returns (IJBPrices);

  function pricingCurrency() external view returns (uint256);

  function pricingDecimals() external view returns (uint256);

  function contractURI() external view returns (string memory);

  function creditsOf(address _address) external view returns (uint256);

  function firstOwnerOf(uint256 _tokenId) external view returns (address);

  function adjustTiers(JB721TierParams[] memory _tierDataToAdd, uint256[] memory _tierIdsToRemove)
    external;

  function mintReservesFor(JBTiered721MintReservesForTiersData[] memory _mintReservesForTiersData)
    external;

  function mintReservesFor(uint256 _tierId, uint256 _count) external;

  function mintFor(JBTiered721MintForTiersData[] memory _mintForTiersData) external;

  function mintFor(uint16[] calldata _tierIds, address _beneficiary)
    external
    returns (uint256[] memory tokenIds);

  function setDefaultReservedTokenBeneficiary(address _beneficiary) external;

  function initialize(
    uint256 _projectId,
    IJBDirectory _directory,
    string memory _name,
    string memory _symbol,
    IJBFundingCycleStore _fundingCycleStore,
    string memory _baseUri,
    IJBTokenUriResolver _tokenUriResolver,
    string memory _contractUri,
    JB721PricingParams memory _pricing,
    IJBTiered721DelegateStore _store,
    JBTiered721Flags memory _flags
  ) external;
}

/**
  
  @notice
  Utilities to decode an IPFS hash.

  @dev
  This is fairly gas intensive, due to multiple nested loops, onchain 
  IPFS hash decoding is therefore not advised (storing them as a string,
  in that use-case, *might* be more efficient).

*/
library JBIpfsDecoder {
  //*********************************************************************//
  // ------------------- internal constant properties ------------------ //
  //*********************************************************************//

  /**
    @notice
    Just a kind reminder to our readers

    @dev
    Used in base58ToString
  */
  bytes internal constant _ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';

  function decode(string memory _baseUri, bytes32 _hexString)
    external
    pure
    returns (string memory)
  {
    // Concatenate the hex string with the fixed IPFS hash part (0x12 and 0x20)
    bytes memory completeHexString = abi.encodePacked(bytes2(0x1220), _hexString);

    // Convert the hex string to a hash
    string memory ipfsHash = _toBase58(completeHexString);

    // Concatenate with the base URI
    return string(abi.encodePacked(_baseUri, ipfsHash));
  }

  /**
    @notice
    Convert a hex string to base58

    @notice 
    Written by Martin Ludfall - Licence: MIT
  */
  function _toBase58(bytes memory _source) private pure returns (string memory) {
    if (_source.length == 0) return new string(0);

    uint8[] memory digits = new uint8[](46); // hash size with the prefix

    digits[0] = 0;

    uint8 digitlength = 1;
    uint256 _sourceLength = _source.length;

    for (uint256 i; i < _sourceLength; ) {
      uint256 carry = uint8(_source[i]);

      for (uint256 j; j < digitlength; ) {
        carry += uint256(digits[j]) << 8; // mul 256
        digits[j] = uint8(carry % 58);
        carry = carry / 58;

        unchecked {
          ++j;
        }
      }

      while (carry > 0) {
        digits[digitlength] = uint8(carry % 58);
        unchecked {
          ++digitlength;
        }
        carry = carry / 58;
      }

      unchecked {
        ++i;
      }
    }
    return string(_toAlphabet(_reverse(_truncate(digits, digitlength))));
  }

  function _truncate(uint8[] memory _array, uint8 _length) private pure returns (uint8[] memory) {
    uint8[] memory output = new uint8[](_length);
    for (uint256 i; i < _length; ) {
      output[i] = _array[i];

      unchecked {
        ++i;
      }
    }
    return output;
  }

  function _reverse(uint8[] memory _input) private pure returns (uint8[] memory) {
    uint256 _inputLength = _input.length;
    uint8[] memory output = new uint8[](_inputLength);
    for (uint256 i; i < _inputLength; ) {
      unchecked {
        output[i] = _input[_input.length - 1 - i];
        ++i;
      }
    }
    return output;
  }

  function _toAlphabet(uint8[] memory _indices) private pure returns (bytes memory) {
    uint256 _indicesLength = _indices.length;
    bytes memory output = new bytes(_indicesLength);
    for (uint256 i; i < _indicesLength; ) {
      output[i] = _ALPHABET[_indices[i]];

      unchecked {
        ++i;
      }
    }
    return output;
  }
}

/** 
  @member pauseTransfers A flag indicating if the token transfer functionality should be paused during the funding cycle.
  @member pauseMintingReserves A flag indicating if voting unit expectations can change over time by adding new tiers with voting units.
*/
struct JBTiered721FundingCycleMetadata {
  bool pauseTransfers;
  bool pauseMintingReserves;
}

library JBTiered721FundingCycleMetadataResolver {
  function transfersPaused(uint256 _data) internal pure returns (bool) {
    return (_data & 1) == 1;
  }

  function mintingReservesPaused(uint256 _data) internal pure returns (bool) {
    return ((_data >> 1) & 1) == 1;
  }

  /**
    @notice
    Pack the tiered 721 funding cycle metadata.

    @param _metadata The metadata to validate and pack.

    @return packed The packed uint256 of all tiered 721 metadata params.
  */
  function packFundingCycleGlobalMetadata(JBTiered721FundingCycleMetadata memory _metadata)
    internal
    pure
    returns (uint256 packed)
  {
    // pause transfers in bit 0.
    if (_metadata.pauseTransfers) packed |= 1;
    // pause mint reserves in bit 2.
    if (_metadata.pauseMintingReserves) packed |= 1 << 1;
  }

  /**
    @notice
    Expand the tiered 721 funding cycle metadata.

    @param _packedMetadata The packed metadata to expand.

    @return metadata The tiered 721 metadata object.
  */
  function expandMetadata(uint8 _packedMetadata)
    internal
    pure
    returns (JBTiered721FundingCycleMetadata memory metadata)
  {
    return
      JBTiered721FundingCycleMetadata(
        transfersPaused(_packedMetadata),
        mintingReservesPaused(_packedMetadata)
      );
  }
}

/**
  @title
  JBTiered721Delegate

  @notice
  Delegate that offers project contributors NFTs with tiered price floors upon payment and the ability to redeem NFTs for treasury assets based based on price floor.

  @dev
  Adheres to -
  IJBTiered721Delegate: General interface for the methods in this contract that interact with the blockchain's state according to the protocol's rules.

  @dev
  Inherits from -
  JB721Delegate: A generic NFT delegate.
  Votes: A helper for voting balance snapshots.
  Ownable: Includes convenience functionality for checking a message sender's permissions before executing certain transactions.
*/
contract JBTiered721Delegate is IJBTiered721Delegate, JB721Delegate, Ownable {
  //*********************************************************************//
  // --------------------------- custom errors ------------------------- //
  //*********************************************************************//

  error NOT_AVAILABLE();
  error OVERSPENDING();
  error PRICING_RESOLVER_CHANGES_PAUSED();
  error RESERVED_TOKEN_MINTING_PAUSED();
  error TRANSFERS_PAUSED();

  //*********************************************************************//
  // --------------------- public stored properties -------------------- //
  //*********************************************************************//

  /**
    @notice
    The address of the origin 'JBTiered721Delegate', used to check in the init if the contract is the original or not
  */
  address public override codeOrigin;

  /**
    @notice
    The contract that stores and manages the NFT's data.
  */
  IJBTiered721DelegateStore public override store;

  /**
    @notice
    The contract storing all funding cycle configurations.
  */
  IJBFundingCycleStore public override fundingCycleStore;

  /**
    @notice
    The contract that exposes price feeds.
  */
  IJBPrices public override prices;

  /** 
    @notice
    The currency that is accepted when minting tier NFTs. 
  */
  uint256 public override pricingCurrency;

  /** 
    @notice
    The currency that is accepted when minting tier NFTs. 
  */
  uint256 public override pricingDecimals;

  /** 
    @notice
    The amount that each address has paid that has not yet contribute to the minting of an NFT. 

    _address The address to which the credits belong.
  */
  mapping(address => uint256) public override creditsOf;

  //*********************************************************************//
  // ------------------------- external views -------------------------- //
  //*********************************************************************//

  /**
    @notice
    The first owner of each token ID, which corresponds to the address that originally contributed to the project to receive the NFT.

    @param _tokenId The ID of the token to get the first owner of.

    @return The first owner of the token.
  */
  function firstOwnerOf(uint256 _tokenId) external view override returns (address) {
    // Get a reference to the first owner.
    address _storedFirstOwner = store.firstOwnerOf(address(this), _tokenId);

    // If the stored first owner is set, return it.
    if (_storedFirstOwner != address(0)) return _storedFirstOwner;

    // Otherwise, the first owner must be the current owner.
    return _owners[_tokenId];
  }

  //*********************************************************************//
  // -------------------------- public views --------------------------- //
  //*********************************************************************//

  /** 
    @notice 
    The total number of tokens owned by the given owner across all tiers. 

    @param _owner The address to check the balance of.

    @return balance The number of tokens owners by the owner across all tiers.
  */
  function balanceOf(address _owner) public view override returns (uint256 balance) {
    return store.balanceOf(address(this), _owner);
  }

  /** 
    @notice
    The metadata URI of the provided token ID.

    @dev
    Defer to the tokenUriResolver if set, otherwise, use the tokenUri set with the token's tier.

    @param _tokenId The ID of the token to get the tier URI for. 

    @return The token URI corresponding with the tier or the tokenUriResolver URI.
  */
  function tokenURI(uint256 _tokenId) public view override returns (string memory) {
    // A token without an owner doesn't have a URI.
    if (_owners[_tokenId] == address(0)) return '';

    // Get a reference to the URI resolver.
    IJBTokenUriResolver _resolver = store.tokenUriResolverOf(address(this));

    // If a token URI resolver is provided, use it to resolve the token URI.
    if (address(_resolver) != address(0)) return _resolver.getUri(_tokenId);

    // Return the token URI for the token's tier.
    return
      JBIpfsDecoder.decode(
        store.baseUriOf(address(this)),
        store.encodedTierIPFSUriOf(address(this), _tokenId)
      );
  }

  /** 
    @notice
    Returns the URI where contract metadata can be found. 

    @return The contract's metadata URI.
  */
  function contractURI() external view override returns (string memory) {
    return store.contractUriOf(address(this));
  }

  /**
    @notice
    Indicates if this contract adheres to the specified interface.

    @dev
    See {IERC165-supportsInterface}.

    @param _interfaceId The ID of the interface to check for adherence to.
  */
  function supportsInterface(bytes4 _interfaceId) public view override returns (bool) {
    return
      _interfaceId == type(IJBTiered721Delegate).interfaceId ||
      super.supportsInterface(_interfaceId);
  }

  //*********************************************************************//
  // -------------------------- constructor ---------------------------- //
  //*********************************************************************//

  constructor() {
    codeOrigin = address(this);
  }

  /**
    @param _projectId The ID of the project this contract's functionality applies to.
    @param _directory The directory of terminals and controllers for projects.
    @param _name The name of the token.
    @param _symbol The symbol that the token should be represented by.
    @param _fundingCycleStore A contract storing all funding cycle configurations.
    @param _baseUri A URI to use as a base for full token URIs.
    @param _tokenUriResolver A contract responsible for resolving the token URI for each token ID.
    @param _contractUri A URI where contract metadata can be found. 
    @param _pricing The tier pricing according to which token distribution will be made. Must be passed in order of contribution floor, with implied increasing value.
    @param _store A contract that stores the NFT's data.
    @param _flags A set of flags that help define how this contract works.
  */
  function initialize(
    uint256 _projectId,
    IJBDirectory _directory,
    string memory _name,
    string memory _symbol,
    IJBFundingCycleStore _fundingCycleStore,
    string memory _baseUri,
    IJBTokenUriResolver _tokenUriResolver,
    string memory _contractUri,
    JB721PricingParams memory _pricing,
    IJBTiered721DelegateStore _store,
    JBTiered721Flags memory _flags
  ) public override {
    // Make the original un-initializable.
    if (address(this) == codeOrigin) revert();

    // Stop re-initialization.
    if (address(store) != address(0)) revert();

    // Initialize the superclass.
    JB721Delegate._initialize(_projectId, _directory, _name, _symbol);

    fundingCycleStore = _fundingCycleStore;
    store = _store;
    pricingCurrency = _pricing.currency;
    pricingDecimals = _pricing.decimals;
    prices = _pricing.prices;

    // Store the base URI if provided.
    if (bytes(_baseUri).length != 0) _store.recordSetBaseUri(_baseUri);

    // Set the contract URI if provided.
    if (bytes(_contractUri).length != 0) _store.recordSetContractUri(_contractUri);

    // Set the token URI resolver if provided.
    if (_tokenUriResolver != IJBTokenUriResolver(address(0)))
      _store.recordSetTokenUriResolver(_tokenUriResolver);

    // Record adding the provided tiers.
    if (_pricing.tiers.length > 0) _store.recordAddTiers(_pricing.tiers);

    // Set the flags if needed.
    if (
      _flags.lockReservedTokenChanges ||
      _flags.lockVotingUnitChanges ||
      _flags.lockManualMintingChanges
    ) _store.recordFlags(_flags);

    // Transfer ownership to the initializer.
    _transferOwnership(msg.sender);
  }

  //*********************************************************************//
  // ---------------------- external transactions ---------------------- //
  //*********************************************************************//

  /** 
    @notice
    Mint reserved tokens within the tier for the provided value.

    @param _mintReservesForTiersData Contains information about how many reserved tokens to mint for each tier.
  */
  function mintReservesFor(JBTiered721MintReservesForTiersData[] calldata _mintReservesForTiersData)
    external
    override
  {
    // Keep a reference to the number of tiers there are to mint reserves for.
    uint256 _numberOfTiers = _mintReservesForTiersData.length;

    for (uint256 _i; _i < _numberOfTiers; ) {
      // Get a reference to the data being iterated on.
      JBTiered721MintReservesForTiersData memory _data = _mintReservesForTiersData[_i];

      // Mint for the tier.
      mintReservesFor(_data.tierId, _data.count);

      unchecked {
        ++_i;
      }
    }
  }

  /** 
    @notice
    Mint tokens within the tier for the provided beneficiaries.

    @param _mintForTiersData Contains information about how who to mint tokens for from each tier.
  */
  function mintFor(JBTiered721MintForTiersData[] calldata _mintForTiersData)
    external
    override
    onlyOwner
  {
    // Keep a reference to the number of beneficiaries there are to mint for.
    uint256 _numberOfBeneficiaries = _mintForTiersData.length;

    for (uint256 _i; _i < _numberOfBeneficiaries; ) {
      // Get a reference to the data being iterated on.
      JBTiered721MintForTiersData calldata _data = _mintForTiersData[_i];

      // Mint for the tier.
      mintFor(_data.tierIds, _data.beneficiary);

      unchecked {
        ++_i;
      }
    }
  }

  /** 
    @notice
    Adjust the tiers mintable through this contract, adhering to any locked tier constraints. 

    @dev
    Only the contract's owner can adjust the tiers.

    @param _tiersToAdd An array of tier data to add.
    @param _tierIdsToRemove An array of tier IDs to remove.
  */
  function adjustTiers(JB721TierParams[] calldata _tiersToAdd, uint256[] calldata _tierIdsToRemove)
    external
    override
    onlyOwner
  {
    // Get a reference to the number of tiers being added.
    uint256 _numberOfTiersToAdd = _tiersToAdd.length;

    // Get a reference to the number of tiers being removed.
    uint256 _numberOfTiersToRemove = _tierIdsToRemove.length;

    // Remove the tiers.
    if (_numberOfTiersToRemove != 0) {
      // Record the removed tiers.
      store.recordRemoveTierIds(_tierIdsToRemove);

      // Emit events for each removed tier.
      for (uint256 _i; _i < _numberOfTiersToRemove; ) {
        emit RemoveTier(_tierIdsToRemove[_i], msg.sender);
        unchecked {
          ++_i;
        }
      }
    }

    // Add the tiers.
    if (_numberOfTiersToAdd != 0) {
      // Record the added tiers in the store.
      uint256[] memory _tierIdsAdded = store.recordAddTiers(_tiersToAdd);

      // Emit events for each added tier.
      for (uint256 _i; _i < _numberOfTiersToAdd; ) {
        emit AddTier(_tierIdsAdded[_i], _tiersToAdd[_i], msg.sender);
        unchecked {
          ++_i;
        }
      }
    }
  }

  /** 
    @notice
    Sets the beneficiary of the reserved tokens for tiers where a specific beneficiary isn't set. 

    @dev
    Only the contract's owner can set the default reserved token beneficiary.

    @param _beneficiary The default beneficiary of the reserved tokens.
  */
  function setDefaultReservedTokenBeneficiary(address _beneficiary) external override onlyOwner {
    // Set the beneficiary.
    store.recordSetDefaultReservedTokenBeneficiary(_beneficiary);

    emit SetDefaultReservedTokenBeneficiary(_beneficiary, msg.sender);
  }

  /**
    @notice
    Set a base token URI.

    @dev
    Only the contract's owner can set the base URI.

    @param _baseUri The new base URI.
  */
  function setBaseUri(string calldata _baseUri) external override onlyOwner {
    // Store the new value.
    store.recordSetBaseUri(_baseUri);

    emit SetBaseUri(_baseUri, msg.sender);
  }

  /**
    @notice
    Set a contract metadata URI to contain opensea-style metadata.

    @dev
    Only the contract's owner can set the contract URI.

    @param _contractUri The new contract URI.
  */
  function setContractUri(string calldata _contractUri) external override onlyOwner {
    // Store the new value.
    store.recordSetContractUri(_contractUri);

    emit SetContractUri(_contractUri, msg.sender);
  }

  /**
    @notice
    Set a token URI resolver.

    @dev
    Only the contract's owner can set the token URI resolver.

    @param _tokenUriResolver The new URI resolver.
  */
  function setTokenUriResolver(IJBTokenUriResolver _tokenUriResolver) external override onlyOwner {
    // Store the new value.
    store.recordSetTokenUriResolver(_tokenUriResolver);

    emit SetTokenUriResolver(_tokenUriResolver, msg.sender);
  }

  //*********************************************************************//
  // ----------------------- public transactions ----------------------- //
  //*********************************************************************//

  /** 
    @notice
    Mint reserved tokens within the tier for the provided value.

    @param _tierId The ID of the tier to mint within.
    @param _count The number of reserved tokens to mint. 
  */
  function mintReservesFor(uint256 _tierId, uint256 _count) public override {
    // Get a reference to the project's current funding cycle.
    JBFundingCycle memory _fundingCycle = fundingCycleStore.currentOf(projectId);

    // Minting reserves must not be paused.
    if (
      JBTiered721FundingCycleMetadataResolver.mintingReservesPaused(
        (JBFundingCycleMetadataResolver.metadata(_fundingCycle))
      )
    ) revert RESERVED_TOKEN_MINTING_PAUSED();

    // Record the minted reserves for the tier.
    uint256[] memory _tokenIds = store.recordMintReservesFor(_tierId, _count);

    // Keep a reference to the reserved token beneficiary.
    address _reservedTokenBeneficiary = store.reservedTokenBeneficiaryOf(address(this), _tierId);

    // Keep a reference to the token ID being iterated on.
    uint256 _tokenId;

    for (uint256 _i; _i < _count; ) {
      // Set the token ID.
      _tokenId = _tokenIds[_i];

      // Mint the token.
      _mint(_reservedTokenBeneficiary, _tokenId);

      emit MintReservedToken(_tokenId, _tierId, _reservedTokenBeneficiary, msg.sender);

      unchecked {
        ++_i;
      }
    }
  }

  /** 
    @notice
    Manually mint NFTs from tiers.

    @param _tierIds The IDs of the tiers to mint from.
    @param _beneficiary The address to mint to. 

    @return tokenIds The IDs of the newly minted tokens.
  */
  function mintFor(uint16[] calldata _tierIds, address _beneficiary)
    public
    override
    onlyOwner
    returns (uint256[] memory tokenIds)
  {
    // Record the mint. The returned token IDs correspond to the tiers passed in.
    (tokenIds, ) = store.recordMint(
      type(uint256).max, // force the mint.
      _tierIds,
      true // manual mint
    );

    // Keep a reference to the number of tokens being minted.
    uint256 _numberOfTokens = _tierIds.length;

    // Keep a reference to the token ID being iterated on.
    uint256 _tokenId;

    for (uint256 _i; _i < _numberOfTokens; ) {
      // Set the token ID.
      _tokenId = tokenIds[_i];

      // Mint the token.
      _mint(_beneficiary, _tokenId);

      emit Mint(_tokenId, _tierIds[_i], _beneficiary, 0, msg.sender);

      unchecked {
        ++_i;
      }
    }
  }

  //*********************************************************************//
  // ------------------------ internal functions ----------------------- //
  //*********************************************************************//

  /**
    @notice
    Mints for a given contribution to the beneficiary.

    @param _data The Juicebox standard project contribution data.
  */
  function _processPayment(JBDidPayData calldata _data) internal override {
    // Normalize the currency.
    uint256 _value;
    if (_data.amount.currency == pricingCurrency) _value = _data.amount.value;
    else if (prices != IJBPrices(address(0)))
      _value = PRBMath.mulDiv(
        _data.amount.value,
        10**pricingDecimals,
        prices.priceFor(_data.amount.currency, pricingCurrency, _data.amount.decimals)
      );
    else return;

    // Keep a reference to the amount of credits the beneficiary already has.
    uint256 _credits = creditsOf[_data.beneficiary];

    // Set the leftover amount as the initial value, including any credits the beneficiary might already have.
    uint256 _leftoverAmount = _value;

    // If the payer is the beneficiary, combine the credits with the paid amount
    // if not, then we keep track of the credits that were unused
    uint256 _stashedCredits;
    if (_data.payer == _data.beneficiary) {
      unchecked { _leftoverAmount += _credits; }
    } else _stashedCredits = _credits;
    
    // Keep a reference to a flag indicating if a mint is expected from discretionary funds. Defaults to false, meaning to mint is not expected.
    bool _expectMintFromExtraFunds;

    // Keep a reference to the flag indicating if the transaction should revert if all provided funds aren't spent. Defaults to false, meaning only a minimum payment is enforced.
    bool _dontOverspend;

    // Skip the first 32 bytes which are used by the JB protocol to pass the paying project's ID when paying from a JBSplit.
    // Skip another 32 bytes reserved for generic extension parameters.
    // Check the 4 bytes interfaceId to verify the metadata is intended for this contract.
    if (
      _data.metadata.length > 68 &&
      bytes4(_data.metadata[64:68]) == type(IJB721Delegate).interfaceId
    ) {
      // Keep a reference to the flag indicating if the transaction should not mint anything.
      bool _dontMint;

      // Keep a reference to the the specific tier IDs to mint.
      uint16[] memory _tierIdsToMint;

      // Decode the metadata.
      (, , , _dontMint, _expectMintFromExtraFunds, _dontOverspend, _tierIdsToMint) = abi.decode(
        _data.metadata,
        (bytes32, bytes32, bytes4, bool, bool, bool, uint16[])
      );

      // Don't mint if not desired.
      if (_dontMint) {
        // Store credits.
        unchecked { creditsOf[_data.beneficiary] = _leftoverAmount + _stashedCredits; }

        // Return instead of minting.
        return;
      }

      // Mint tiers if they were specified.
      if (_tierIdsToMint.length != 0)
        _leftoverAmount = _mintAll(_leftoverAmount, _tierIdsToMint, _data.beneficiary);
    }

    // If there are funds leftover, mint the best available with it.
    if (_leftoverAmount != 0) {
      _leftoverAmount = _mintBestAvailableTier(
        _leftoverAmount,
        _data.beneficiary,
        _expectMintFromExtraFunds
      );

      if (_leftoverAmount != 0) {
        // Make sure there are no leftover funds after minting if not expected.
        if (_dontOverspend) revert OVERSPENDING();

        // Increment the leftover amount.
        unchecked { creditsOf[_data.beneficiary] = _leftoverAmount + _stashedCredits; }
      } else if (_credits != _stashedCredits) creditsOf[_data.beneficiary] = _stashedCredits;
    } else if (_credits != _stashedCredits) creditsOf[_data.beneficiary] = _stashedCredits;
  }

  /** 
    @notice
    A function that will run when tokens are burned via redemption.

    @param _tokenIds The IDs of the tokens that were burned.
  */
  function _didBurn(uint256[] memory _tokenIds) internal override {
    // Add to burned counter.
    store.recordBurn(_tokenIds);
  }

  /** 
    @notice
    Mints a token in the best available tier.

    @param _amount The amount to base the mint on.
    @param _beneficiary The address to mint for.
    @param _expectMint A flag indicating if a mint was expected.

    @return  leftoverAmount The amount leftover after the mint.
  */
  function _mintBestAvailableTier(
    uint256 _amount,
    address _beneficiary,
    bool _expectMint
  ) internal returns (uint256 leftoverAmount) {
    // Keep a reference to the token ID.
    uint256 _tokenId;

    // Keep a reference to the tier ID.
    uint256 _tierId;

    // Record the mint.
    (_tokenId, _tierId, leftoverAmount) = store.recordMintBestAvailableTier(_amount);

    // If there's no best tier, return or revert.
    if (_tokenId == 0) {
      // Make sure a mint was not expected.
      if (_expectMint) revert NOT_AVAILABLE();
      return leftoverAmount;
    }

    // Mint the tokens.
    _mint(_beneficiary, _tokenId);

    emit Mint(_tokenId, _tierId, _beneficiary, _amount - leftoverAmount, msg.sender);
  }

  /** 
    @notice
    Mints a token in all provided tiers.

    @param _amount The amount to base the mints on. All mints' price floors must fit in this amount.
    @param _mintTierIds An array of tier IDs that are intended to be minted.
    @param _beneficiary The address to mint for.

    @return leftoverAmount The amount leftover after the mint.
  */
  function _mintAll(
    uint256 _amount,
    uint16[] memory _mintTierIds,
    address _beneficiary
  ) internal returns (uint256 leftoverAmount) {
    // Keep a reference to the token ID.
    uint256[] memory _tokenIds;

    // Record the mint. The returned token IDs correspond to the tiers passed in.
    (_tokenIds, leftoverAmount) = store.recordMint(
      _amount,
      _mintTierIds,
      false // Not a manual mint
    );

    // Get a reference to the number of mints.
    uint256 _mintsLength = _tokenIds.length;

    // Keep a reference to the token ID being iterated on.
    uint256 _tokenId;

    // Loop through each token ID and mint.
    for (uint256 _i; _i < _mintsLength; ) {
      // Get a reference to the tier being iterated on.
      _tokenId = _tokenIds[_i];

      // Mint the tokens.
      _mint(_beneficiary, _tokenId);

      emit Mint(_tokenId, _mintTierIds[_i], _beneficiary, _amount, msg.sender);

      unchecked {
        ++_i;
      }
    }
  }

  /** 
    @notice
    The cumulative weight the given token IDs have in redemptions compared to the `_totalRedemptionWeight`. 

    @param _tokenIds The IDs of the tokens to get the cumulative redemption weight of.

    @return The weight.
  */
  function _redemptionWeightOf(uint256[] memory _tokenIds, JBRedeemParamsData calldata)
    internal
    view
    virtual
    override
    returns (uint256)
  {
    return store.redemptionWeightOf(address(this), _tokenIds);
  }

  /** 
    @notice
    The cumulative weight that all token IDs have in redemptions. 

    @return The total weight.
  */
  function _totalRedemptionWeight(JBRedeemParamsData calldata)
    internal
    view
    virtual
    override
    returns (uint256)
  {
    return store.totalRedemptionWeight(address(this));
  }

  /**
    @notice
    User the hook to register the first owner if it's not yet registered.

    @param _from The address where the transfer is originating.
    @param _to The address to which the transfer is being made.
    @param _tokenId The ID of the token being transferred.
  */
  function _beforeTokenTransfer(
    address _from,
    address _to,
    uint256 _tokenId
  ) internal virtual override {
    // Transferred must not be paused when not minting or burning.
    if (_from != address(0)) {
      // Get a reference to the tier.
      JB721Tier memory _tier = store.tierOfTokenId(address(this), _tokenId);

      // Transfers from the tier must be pausable.
      if (_tier.transfersPausable) {
        // Get a reference to the project's current funding cycle.
        JBFundingCycle memory _fundingCycle = fundingCycleStore.currentOf(projectId);

        if (
          _to != address(0) &&
          JBTiered721FundingCycleMetadataResolver.transfersPaused(
            (JBFundingCycleMetadataResolver.metadata(_fundingCycle))
          )
        ) revert TRANSFERS_PAUSED();
      }

      // If there's no stored first owner, and the transfer isn't originating from the zero address as expected for mints, store the first owner.
      if (store.firstOwnerOf(address(this), _tokenId) == address(0))
        store.recordSetFirstOwnerOf(_tokenId, _from);
    }

    super._beforeTokenTransfer(_from, _to, _tokenId);
  }

  /**
    @notice
    Transfer voting units after the transfer of a token.

    @param _from The address where the transfer is originating.
    @param _to The address to which the transfer is being made.
    @param _tokenId The ID of the token being transferred.
   */
  function _afterTokenTransfer(
    address _from,
    address _to,
    uint256 _tokenId
  ) internal virtual override {
    // Get a reference to the tier.
    JB721Tier memory _tier = store.tierOfTokenId(address(this), _tokenId);

    // Record the transfer.
    store.recordTransferForTier(_tier.id, _from, _to);

    // Handle any other accounting (ex. account for governance voting units)
    _afterTokenTransferAccounting(_from, _to, _tokenId, _tier);

    super._afterTokenTransfer(_from, _to, _tokenId);
  }

  /**
    @notice 
    Custom hook to handle token/tier accounting, this way we can reuse the '_tier' instead of fetching it again.

    @param _from The account to transfer voting units from.
    @param _to The account to transfer voting units to.
    @param _tokenId The ID of the token for which voting units are being transferred.
    @param _tier The tier the token ID is part of.
  */
  function _afterTokenTransferAccounting(
    address _from,
    address _to,
    uint256 _tokenId,
    JB721Tier memory _tier
  ) internal virtual {
    _from; // Prevents unused var compiler and natspec complaints.
    _to;
    _tokenId;
    _tier;
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ALEADY_MINTED","type":"error"},{"inputs":[],"name":"APPROVAL_TO_CURRENT_OWNER","type":"error"},{"inputs":[],"name":"APPROVE_TO_CALLER","type":"error"},{"inputs":[],"name":"CALLER_NOT_OWNER_OR_APPROVED","type":"error"},{"inputs":[],"name":"INCORRECT_OWNER","type":"error"},{"inputs":[],"name":"INVALID_PAYMENT_EVENT","type":"error"},{"inputs":[],"name":"INVALID_REDEMPTION_EVENT","type":"error"},{"inputs":[],"name":"INVALID_REDEMPTION_METADATA","type":"error"},{"inputs":[],"name":"INVALID_TOKEN_ID","type":"error"},{"inputs":[],"name":"MINT_TO_ZERO","type":"error"},{"inputs":[],"name":"NOT_AVAILABLE","type":"error"},{"inputs":[],"name":"OVERSPENDING","type":"error"},{"inputs":[{"internalType":"uint256","name":"prod1","type":"uint256"},{"internalType":"uint256","name":"denominator","type":"uint256"}],"name":"PRBMath__MulDivOverflow","type":"error"},{"inputs":[],"name":"PRICING_RESOLVER_CHANGES_PAUSED","type":"error"},{"inputs":[],"name":"RESERVED_TOKEN_MINTING_PAUSED","type":"error"},{"inputs":[],"name":"TRANSFERS_PAUSED","type":"error"},{"inputs":[],"name":"TRANSFER_TO_NON_IMPLEMENTER","type":"error"},{"inputs":[],"name":"TRANSFER_TO_ZERO_ADDRESS","type":"error"},{"inputs":[],"name":"UNAUTHORIZED","type":"error"},{"inputs":[],"name":"UNEXPECTED_TOKEN_REDEEMED","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tierId","type":"uint256"},{"components":[{"internalType":"uint80","name":"contributionFloor","type":"uint80"},{"internalType":"uint48","name":"lockedUntil","type":"uint48"},{"internalType":"uint40","name":"initialQuantity","type":"uint40"},{"internalType":"uint16","name":"votingUnits","type":"uint16"},{"internalType":"uint16","name":"reservedRate","type":"uint16"},{"internalType":"address","name":"reservedTokenBeneficiary","type":"address"},{"internalType":"bytes32","name":"encodedIPFSUri","type":"bytes32"},{"internalType":"bool","name":"allowManualMint","type":"bool"},{"internalType":"bool","name":"shouldUseBeneficiaryAsDefault","type":"bool"},{"internalType":"bool","name":"transfersPausable","type":"bool"}],"indexed":false,"internalType":"struct JB721TierParams","name":"data","type":"tuple"},{"indexed":false,"internalType":"address","name":"caller","type":"address"}],"name":"AddTier","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"tierId","type":"uint256"},{"indexed":true,"internalType":"address","name":"beneficiary","type":"address"},{"indexed":false,"internalType":"uint256","name":"totalAmountContributed","type":"uint256"},{"indexed":false,"internalType":"address","name":"caller","type":"address"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"tierId","type":"uint256"},{"indexed":true,"internalType":"address","name":"beneficiary","type":"address"},{"indexed":false,"internalType":"address","name":"caller","type":"address"}],"name":"MintReservedToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tierId","type":"uint256"},{"indexed":false,"internalType":"address","name":"caller","type":"address"}],"name":"RemoveTier","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"string","name":"baseUri","type":"string"},{"indexed":false,"internalType":"address","name":"caller","type":"address"}],"name":"SetBaseUri","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"string","name":"contractUri","type":"string"},{"indexed":false,"internalType":"address","name":"caller","type":"address"}],"name":"SetContractUri","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"beneficiary","type":"address"},{"indexed":false,"internalType":"address","name":"caller","type":"address"}],"name":"SetDefaultReservedTokenBeneficiary","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract IJBTokenUriResolver","name":"newResolver","type":"address"},{"indexed":false,"internalType":"address","name":"caller","type":"address"}],"name":"SetTokenUriResolver","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"components":[{"internalType":"uint80","name":"contributionFloor","type":"uint80"},{"internalType":"uint48","name":"lockedUntil","type":"uint48"},{"internalType":"uint40","name":"initialQuantity","type":"uint40"},{"internalType":"uint16","name":"votingUnits","type":"uint16"},{"internalType":"uint16","name":"reservedRate","type":"uint16"},{"internalType":"address","name":"reservedTokenBeneficiary","type":"address"},{"internalType":"bytes32","name":"encodedIPFSUri","type":"bytes32"},{"internalType":"bool","name":"allowManualMint","type":"bool"},{"internalType":"bool","name":"shouldUseBeneficiaryAsDefault","type":"bool"},{"internalType":"bool","name":"transfersPausable","type":"bool"}],"internalType":"struct JB721TierParams[]","name":"_tiersToAdd","type":"tuple[]"},{"internalType":"uint256[]","name":"_tierIdsToRemove","type":"uint256[]"}],"name":"adjustTiers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"balance","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"codeOrigin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"creditsOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"payer","type":"address"},{"internalType":"uint256","name":"projectId","type":"uint256"},{"internalType":"uint256","name":"currentFundingCycleConfiguration","type":"uint256"},{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"decimals","type":"uint256"},{"internalType":"uint256","name":"currency","type":"uint256"}],"internalType":"struct JBTokenAmount","name":"amount","type":"tuple"},{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"decimals","type":"uint256"},{"internalType":"uint256","name":"currency","type":"uint256"}],"internalType":"struct JBTokenAmount","name":"forwardedAmount","type":"tuple"},{"internalType":"uint256","name":"projectTokenCount","type":"uint256"},{"internalType":"address","name":"beneficiary","type":"address"},{"internalType":"bool","name":"preferClaimedTokens","type":"bool"},{"internalType":"string","name":"memo","type":"string"},{"internalType":"bytes","name":"metadata","type":"bytes"}],"internalType":"struct JBDidPayData","name":"_data","type":"tuple"}],"name":"didPay","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"holder","type":"address"},{"internalType":"uint256","name":"projectId","type":"uint256"},{"internalType":"uint256","name":"currentFundingCycleConfiguration","type":"uint256"},{"internalType":"uint256","name":"projectTokenCount","type":"uint256"},{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"decimals","type":"uint256"},{"internalType":"uint256","name":"currency","type":"uint256"}],"internalType":"struct JBTokenAmount","name":"reclaimedAmount","type":"tuple"},{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"decimals","type":"uint256"},{"internalType":"uint256","name":"currency","type":"uint256"}],"internalType":"struct JBTokenAmount","name":"forwardedAmount","type":"tuple"},{"internalType":"address payable","name":"beneficiary","type":"address"},{"internalType":"string","name":"memo","type":"string"},{"internalType":"bytes","name":"metadata","type":"bytes"}],"internalType":"struct JBDidRedeemData","name":"_data","type":"tuple"}],"name":"didRedeem","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"directory","outputs":[{"internalType":"contract IJBDirectory","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"firstOwnerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fundingCycleStore","outputs":[{"internalType":"contract IJBFundingCycleStore","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"contract IJBDirectory","name":"_directory","type":"address"},{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"contract IJBFundingCycleStore","name":"_fundingCycleStore","type":"address"},{"internalType":"string","name":"_baseUri","type":"string"},{"internalType":"contract IJBTokenUriResolver","name":"_tokenUriResolver","type":"address"},{"internalType":"string","name":"_contractUri","type":"string"},{"components":[{"components":[{"internalType":"uint80","name":"contributionFloor","type":"uint80"},{"internalType":"uint48","name":"lockedUntil","type":"uint48"},{"internalType":"uint40","name":"initialQuantity","type":"uint40"},{"internalType":"uint16","name":"votingUnits","type":"uint16"},{"internalType":"uint16","name":"reservedRate","type":"uint16"},{"internalType":"address","name":"reservedTokenBeneficiary","type":"address"},{"internalType":"bytes32","name":"encodedIPFSUri","type":"bytes32"},{"internalType":"bool","name":"allowManualMint","type":"bool"},{"internalType":"bool","name":"shouldUseBeneficiaryAsDefault","type":"bool"},{"internalType":"bool","name":"transfersPausable","type":"bool"}],"internalType":"struct JB721TierParams[]","name":"tiers","type":"tuple[]"},{"internalType":"uint256","name":"currency","type":"uint256"},{"internalType":"uint256","name":"decimals","type":"uint256"},{"internalType":"contract IJBPrices","name":"prices","type":"address"}],"internalType":"struct JB721PricingParams","name":"_pricing","type":"tuple"},{"internalType":"contract IJBTiered721DelegateStore","name":"_store","type":"address"},{"components":[{"internalType":"bool","name":"lockReservedTokenChanges","type":"bool"},{"internalType":"bool","name":"lockVotingUnitChanges","type":"bool"},{"internalType":"bool","name":"lockManualMintingChanges","type":"bool"}],"internalType":"struct JBTiered721Flags","name":"_flags","type":"tuple"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint16[]","name":"tierIds","type":"uint16[]"},{"internalType":"address","name":"beneficiary","type":"address"}],"internalType":"struct JBTiered721MintForTiersData[]","name":"_mintForTiersData","type":"tuple[]"}],"name":"mintFor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16[]","name":"_tierIds","type":"uint16[]"},{"internalType":"address","name":"_beneficiary","type":"address"}],"name":"mintFor","outputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"tierId","type":"uint256"},{"internalType":"uint256","name":"count","type":"uint256"}],"internalType":"struct JBTiered721MintReservesForTiersData[]","name":"_mintReservesForTiersData","type":"tuple[]"}],"name":"mintReservesFor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tierId","type":"uint256"},{"internalType":"uint256","name":"_count","type":"uint256"}],"name":"mintReservesFor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"contract IJBPaymentTerminal","name":"terminal","type":"address"},{"internalType":"address","name":"payer","type":"address"},{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"decimals","type":"uint256"},{"internalType":"uint256","name":"currency","type":"uint256"}],"internalType":"struct JBTokenAmount","name":"amount","type":"tuple"},{"internalType":"uint256","name":"projectId","type":"uint256"},{"internalType":"uint256","name":"currentFundingCycleConfiguration","type":"uint256"},{"internalType":"address","name":"beneficiary","type":"address"},{"internalType":"uint256","name":"weight","type":"uint256"},{"internalType":"uint256","name":"reservedRate","type":"uint256"},{"internalType":"string","name":"memo","type":"string"},{"internalType":"bytes","name":"metadata","type":"bytes"}],"internalType":"struct JBPayParamsData","name":"_data","type":"tuple"}],"name":"payParams","outputs":[{"internalType":"uint256","name":"weight","type":"uint256"},{"internalType":"string","name":"memo","type":"string"},{"components":[{"internalType":"contract IJBPayDelegate","name":"delegate","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct JBPayDelegateAllocation[]","name":"delegateAllocations","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"prices","outputs":[{"internalType":"contract IJBPrices","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pricingCurrency","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pricingDecimals","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"projectId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"contract IJBPaymentTerminal","name":"terminal","type":"address"},{"internalType":"address","name":"holder","type":"address"},{"internalType":"uint256","name":"projectId","type":"uint256"},{"internalType":"uint256","name":"currentFundingCycleConfiguration","type":"uint256"},{"internalType":"uint256","name":"tokenCount","type":"uint256"},{"internalType":"uint256","name":"totalSupply","type":"uint256"},{"internalType":"uint256","name":"overflow","type":"uint256"},{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"decimals","type":"uint256"},{"internalType":"uint256","name":"currency","type":"uint256"}],"internalType":"struct JBTokenAmount","name":"reclaimAmount","type":"tuple"},{"internalType":"bool","name":"useTotalOverflow","type":"bool"},{"internalType":"uint256","name":"redemptionRate","type":"uint256"},{"internalType":"string","name":"memo","type":"string"},{"internalType":"bytes","name":"metadata","type":"bytes"}],"internalType":"struct JBRedeemParamsData","name":"_data","type":"tuple"}],"name":"redeemParams","outputs":[{"internalType":"uint256","name":"reclaimAmount","type":"uint256"},{"internalType":"string","name":"memo","type":"string"},{"components":[{"internalType":"contract IJBRedemptionDelegate","name":"delegate","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct JBRedemptionDelegateAllocation[]","name":"delegateAllocations","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","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":"string","name":"_baseUri","type":"string"}],"name":"setBaseUri","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_contractUri","type":"string"}],"name":"setContractUri","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_beneficiary","type":"address"}],"name":"setDefaultReservedTokenBeneficiary","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IJBTokenUriResolver","name":"_tokenUriResolver","type":"address"}],"name":"setTokenUriResolver","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"store","outputs":[{"internalType":"contract IJBTiered721DelegateStore","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"_interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b506200001d3362000035565b600880546001600160a01b0319163017905562000087565b600780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b61492880620000976000396000f3fe6080604052600436106102465760003560e01c8063715018a611610139578063c41c2f24116100b6578063da9ee8b71161007a578063da9ee8b7146106d0578063df487e26146106e3578063e8a3d48514610703578063e985e9c514610718578063f2fde38b14610738578063f5a38e631461075857600080fd5b8063c41c2f2414610630578063c87b56dd14610650578063ccb4807b14610670578063d3419bf314610690578063d46cf171146106b057600080fd5b8063a22cb465116100fd578063a22cb46514610581578063a51cfd18146105a1578063aa4fb15b146105d0578063b88d4fde146105f0578063bb52b6e41461061057600080fd5b8063715018a6146104f95780638da5cb5b1461050e57806395d89b411461052c578063975057e714610541578063a0bcfc7f1461056157600080fd5b806336c1a93b116101c7578063557e71551161018b578063557e7155146104565780636352211e1461047657806364640c1e146104965780636ac6d941146104ac57806370a08231146104d957600080fd5b806336c1a93b146103ca5780633fafa127146103ea57806342842e0e146104005780634ecba6251461042057806354c6d1f51461043657600080fd5b806323b872dd1161020e57806323b872dd1461031c5780632407497e1461033c578063245a45b51461035c5780632a596e53146103975780632b13c58f146103b757600080fd5b806301ffc9a71461024b57806306fdde0314610280578063081812fc146102a2578063095ea7b3146102da5780631d153ca4146102fc575b600080fd5b34801561025757600080fd5b5061026b610266366004613116565b610778565b60405190151581526020015b60405180910390f35b34801561028c57600080fd5b506102956107a3565b6040516102779190613183565b3480156102ae57600080fd5b506102c26102bd366004613196565b610835565b6040516001600160a01b039091168152602001610277565b3480156102e657600080fd5b506102fa6102f53660046131d4565b61085c565b005b34801561030857600080fd5b506008546102c2906001600160a01b031681565b34801561032857600080fd5b506102fa610337366004613200565b6108e8565b34801561034857600080fd5b506102fa610357366004613241565b61091a565b34801561036857600080fd5b50610389610377366004613241565b600e6020526000908152604090205481565b604051908152602001610277565b3480156103a357600080fd5b506102fa6103b236600461325e565b6109c3565b6102fa6103c53660046132eb565b610a1c565b3480156103d657600080fd5b506102fa6103e536600461336a565b610bf6565b3480156103f657600080fd5b5061038960055481565b34801561040c57600080fd5b506102fa61041b366004613200565b610c58565b34801561042c57600080fd5b50610389600d5481565b34801561044257600080fd5b506102c2610451366004613196565b610c73565b34801561046257600080fd5b50600a546102c2906001600160a01b031681565b34801561048257600080fd5b506102c2610491366004613196565b610d1f565b3480156104a257600080fd5b50610389600c5481565b3480156104b857600080fd5b506104cc6104c73660046133ab565b610d55565b604051610277919061343c565b3480156104e557600080fd5b506103896104f4366004613241565b610e9b565b34801561050557600080fd5b506102fa610f11565b34801561051a57600080fd5b506007546001600160a01b03166102c2565b34801561053857600080fd5b50610295610f25565b34801561054d57600080fd5b506009546102c2906001600160a01b031681565b34801561056d57600080fd5b506102fa61057c36600461344f565b610f34565b34801561058d57600080fd5b506102fa61059c3660046134c7565b610fef565b3480156105ad57600080fd5b506105c16105bc3660046132eb565b610ffe565b60405161027793929190613500565b3480156105dc57600080fd5b506102fa6105eb366004613572565b61125d565b3480156105fc57600080fd5b506102fa61060b3660046136d0565b61147a565b34801561061c57600080fd5b506102fa61062b3660046139d1565b6114ad565b34801561063c57600080fd5b506006546102c2906001600160a01b031681565b34801561065c57600080fd5b5061029561066b366004613196565b611793565b34801561067c57600080fd5b506102fa61068b36600461344f565b6119f1565b34801561069c57600080fd5b50600b546102c2906001600160a01b031681565b3480156106bc57600080fd5b506105c16106cb366004613b0a565b611aa4565b6102fa6106de366004613b45565b611b87565b3480156106ef57600080fd5b506102fa6106fe366004613241565b611c3e565b34801561070f57600080fd5b50610295611ce0565b34801561072457600080fd5b5061026b610733366004613b80565b611d56565b34801561074457600080fd5b506102fa610753366004613241565b611d84565b34801561076457600080fd5b506102fa610773366004613bae565b611e02565b60006001600160e01b03198216631e68505960e31b148061079d575061079d82611fe5565b92915050565b6060600080546107b290613c48565b80601f01602080910402602001604051908101604052809291908181526020018280546107de90613c48565b801561082b5780601f106108005761010080835404028352916020019161082b565b820191906000526020600020905b81548152906001019060200180831161080e57829003601f168201915b5050505050905090565b60006108408261205b565b506000908152600360205260409020546001600160a01b031690565b600061086782610d1f565b9050806001600160a01b0316836001600160a01b03160361089b5760405163133f8be960e01b815260040160405180910390fd5b336001600160a01b038216148015906108bb57506108b98133611d56565b155b156108d95760405163e5fa0e3560e01b815260040160405180910390fd5b6108e38383612090565b505050565b6108f233826120fe565b61090f5760405163e5fa0e3560e01b815260040160405180910390fd5b6108e383838361215d565b610922612236565b60095460405163036129cb60e61b81526001600160a01b0383811660048301529091169063d84a72c090602401600060405180830381600087803b15801561096957600080fd5b505af115801561097d573d6000803e3d6000fd5b50506040513381526001600160a01b03841692507fe7784d93cfbfa4408e19577e6cc0436f4dbb51214b70e100905dfce9def88c1691506020015b60405180910390a250565b8060005b81811015610a165760008484838181106109e3576109e3613c7c565b9050604002018036038101906109f99190613c92565b9050610a0d8160000151826020015161125d565b506001016109c7565b50505050565b34151580610a9e5750600654600554604051636e49181f60e01b815260048101919091523360248201526001600160a01b0390911690636e49181f90604401602060405180830381865afa158015610a78573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a9c9190613ceb565b155b80610aaf5750600554816020013514155b15610acd57604051633efca5c360e11b815260040160405180910390fd5b6024610add6101c0830183613d08565b90501080610b21575063b3bcbb7960e01b610afc6101c0830183613d08565b610b0b91602491602091613d4e565b610b1491613d78565b6001600160e01b03191614155b15610b3f57604051632a84050f60e01b815260040160405180910390fd5b6000610b4f6101c0830183613d08565b810190610b5c9190613da8565b925050506000815190506000805b82811015610bec57838181518110610b8457610b84613c7c565b60200260200101519150846000016020810190610ba19190613241565b6000838152600260205260409020546001600160a01b03908116911614610bdb5760405163075fd2b160e01b815260040160405180910390fd5b610be482612290565b600101610b6a565b50610a1683612311565b610bfe612236565b8060005b81811015610a165736848483818110610c1d57610c1d613c7c565b9050602002810190610c2f9190613e56565b9050610c4e610c3e8280613e76565b6104c76040850160208601613241565b5050600101610c02565b6108e38383836040518060200160405280600081525061147a565b6009546040516308ed6c0160e41b81523060048201526024810183905260009182916001600160a01b0390911690638ed6c01090604401602060405180830381865afa158015610cc7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ceb9190613eca565b90506001600160a01b03811615610d025792915050565b50506000908152600260205260409020546001600160a01b031690565b6000818152600260205260408120546001600160a01b03168061079d5760405163b49aa3b560e01b815260040160405180910390fd5b6060610d5f612236565b60095460405163eaa19ab360e01b81526001600160a01b039091169063eaa19ab390610d98906000199088908890600190600401613ee7565b6000604051808303816000875af1158015610db7573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610ddf9190810190613faa565b509050826000805b82811015610e9157838181518110610e0157610e01613c7c565b60200260200101519150610e158583612376565b846001600160a01b0316878783818110610e3157610e31613c7c565b9050602002016020810190610e469190613ff0565b604080516000815233602082015261ffff929092169185917f598baf7bf150ca2f42be9e9f8f55e81d45f5715c3ff22bf46d697fabec7f31d6910160405180910390a4600101610de7565b5050509392505050565b600954604051633de222bb60e21b81523060048201526001600160a01b038381166024830152600092169063f7888aec906044015b602060405180830381865afa158015610eed573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079d919061400b565b610f19612236565b610f236000612440565b565b6060600180546107b290613c48565b610f3c612236565b6009546040516331315e5960e11b81526001600160a01b0390911690636262bcb290610f6e9085908590600401614024565b600060405180830381600087803b158015610f8857600080fd5b505af1158015610f9c573d6000803e3d6000fd5b505050508181604051610fb0929190614053565b604051908190038120338252907f7bc9110d5de090dd59e07912d2b93a5a27ac70a60c8d8e324db4f9ee8b8b5c13906020015b60405180910390a25050565b610ffa338383612492565b5050565b6000606080608084013515611026576040516309f82f1b60e31b815260040160405180910390fd5b60246110366101c0860186613d08565b9050108061107a575063b3bcbb7960e01b6110556101c0860186613d08565b61106491602491602091613d4e565b61106d91613d78565b6001600160e01b03191614155b1561109857604051632a84050f60e01b815260040160405180910390fd5b60408051600180825281830190925290816020015b60408051808201909152600080825260208201528152602001906001900390816110ad5790505090506040518060400160405280306001600160a01b0316815260200160008152508160008151811061110857611108613c7c565b602090810291909101015260006111236101c0860186613d08565b8101906111309190613da8565b9250505060006111408287612531565b9050600061114d876125a5565b905060006111608860c0013584846125d6565b9050612710886101800135036111cb578061117f6101a08a018a613d08565b8782828080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250969d50919b5091995061125698505050505050505050565b611201816111ea856111e46101808d0135612710614079565b866125d6565b6111f9906101808c013561408c565b6127106125d6565b61120f6101a08a018a613d08565b8782828080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250969d50919b509199505050505050505050505b9193909250565b600a546005546040516321d1336160e11b815260048101919091526000916001600160a01b0316906343a266c29060240161012060405180830381865afa1580156112ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112d0919061409f565b61010081015190915060f51c6001908116036112ff57604051631d2c125760e31b815260040160405180910390fd5b600954604051635d53f40760e11b815260048101859052602481018490526000916001600160a01b03169063baa7e80e906044016000604051808303816000875af1158015611352573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261137a919081019061411f565b6009546040516304db994760e21b8152306004820152602481018790529192506000916001600160a01b039091169063136e651c90604401602060405180830381865afa1580156113cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113f39190613eca565b90506000805b858110156114715783818151811061141357611413613c7c565b602002602001015191506114278383612376565b6040513381526001600160a01b03841690889084907f031e1988c95a91ec4d655ff63a8f87a80bc9daf28d95ae10ee08c0022cfb5c8b9060200160405180910390a46001016113f9565b50505050505050565b61148433836120fe565b6114a15760405163e5fa0e3560e01b815260040160405180910390fd5b610a16848484846126a2565b6008546001600160a01b031630036114c457600080fd5b6009546001600160a01b0316156114da57600080fd5b6114e68b8b8b8b6126d6565b600a80546001600160a01b03808a166001600160a01b031992831617909255600980548584169083161790556020850151600c556040850151600d556060850151600b805491909316911617905585511561159a576040516331315e5960e11b81526001600160a01b03831690636262bcb290611567908990600401613183565b600060405180830381600087803b15801561158157600080fd5b505af1158015611595573d6000803e3d6000fd5b505050505b8351156116005760405163d67b78fd60e01b81526001600160a01b0383169063d67b78fd906115cd908790600401613183565b600060405180830381600087803b1580156115e757600080fd5b505af11580156115fb573d6000803e3d6000fd5b505050505b6001600160a01b0385161561166b5760405163036129cb60e61b81526001600160a01b03868116600483015283169063d84a72c090602401600060405180830381600087803b15801561165257600080fd5b505af1158015611666573d6000803e3d6000fd5b505050505b825151156116e957825160405163eadd8b3760e01b81526001600160a01b0384169163eadd8b37916116a09190600401614153565b6000604051808303816000875af11580156116bf573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526116e7919081019061411f565b505b8051806116f7575080602001515b80611703575080604001515b1561177d576040805163cdb0af6d60e01b815282511515600482015260208301511515602482015290820151151560448201526001600160a01b0383169063cdb0af6d90606401600060405180830381600087803b15801561176457600080fd5b505af1158015611778573d6000803e3d6000fd5b505050505b61178633612440565b5050505050505050505050565b6000818152600260205260409020546060906001600160a01b03166117c657505060408051602081019091526000815290565b600954604051630fab094760e01b81523060048201526000916001600160a01b031690630fab094790602401602060405180830381865afa15801561180f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118339190613eca565b90506001600160a01b038116156118b857604051636d02a25560e11b8152600481018490526001600160a01b0382169063da0544aa90602401600060405180830381865afa158015611889573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526118b1919081019061422c565b9392505050565b60095460405163f682eeaf60e01b81523060048201527387e9dae24682d79b6451932146dec60b5ec88c1b9163030cecc7916001600160a01b039091169063f682eeaf90602401600060405180830381865afa15801561191c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611944919081019061422c565b600954604051630c8df17160e41b8152306004820152602481018890526001600160a01b039091169063c8df171090604401602060405180830381865afa158015611993573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119b7919061400b565b6040518363ffffffff1660e01b81526004016119d49291906142a2565b600060405180830381865af4158015611889573d6000803e3d6000fd5b6119f9612236565b60095460405163d67b78fd60e01b81526001600160a01b039091169063d67b78fd90611a2b9085908590600401614024565b600060405180830381600087803b158015611a4557600080fd5b505af1158015611a59573d6000803e3d6000fd5b505050508181604051611a6d929190614053565b604051908190038120338252907fd36dc0c1a06103fdcaf15f3f6fb797d1a97997514c78de073640c8b5005454b890602001610fe3565b610120810135606080611abb610160850185613d08565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092945060019250611afb915050565b604051908082528060200260200182016040528015611b4057816020015b6040805180820190915260008082526020820152815260200190600190039081611b195790505b5090506040518060400160405280306001600160a01b03168152602001600081525081600081518110611b7557611b75613c7c565b60200260200101819052509193909250565b60055434151580611c085750600654604051636e49181f60e01b8152600481018390523360248201526001600160a01b0390911690636e49181f90604401602060405180830381865afa158015611be2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c069190613ceb565b155b80611c17575080826020013514155b15611c35576040516331c57b1b60e21b815260040160405180910390fd5b610ffa82612709565b611c46612236565b6009546040516317161f7d60e01b81526001600160a01b038381166004830152909116906317161f7d90602401600060405180830381600087803b158015611c8d57600080fd5b505af1158015611ca1573d6000803e3d6000fd5b50506040513381526001600160a01b03841692507fab0014d4c7a642a02a31b303a318908c22b0fb2001f107278fc6076b4c671b6591506020016109b8565b600954604051630155619b60e71b81523060048201526060916001600160a01b03169063aab0cd8090602401600060405180830381865afa158015611d29573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611d51919081019061422c565b905090565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205460ff1690565b611d8c612236565b6001600160a01b038116611df65760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b611dff81612440565b50565b611e0a612236565b82818015611eda576009546040516320512ba160e01b81526001600160a01b03909116906320512ba190611e4490879087906004016142c4565b600060405180830381600087803b158015611e5e57600080fd5b505af1158015611e72573d6000803e3d6000fd5b5050505060005b81811015611ed857848482818110611e9357611e93613c7c565b60405133815260209182029390930135927f832d89d991be5351d793c20faf4b7dd44f8aa9ce39e3cb160c6317de6fbba72992500160405180910390a2600101611e79565b505b8115611fdd5760095460405163eadd8b3760e01b81526000916001600160a01b03169063eadd8b3790611f13908a908a906004016143da565b6000604051808303816000875af1158015611f32573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611f5a919081019061411f565b905060005b83811015611fda57818181518110611f7957611f79613c7c565b60200260200101517f85b5b4c4e44e342c8dac3c3a5364494d455043decb9f4bb8e7e0a3020d22fed4898984818110611fb457611fb4613c7c565b9050610140020133604051611fca92919061441d565b60405180910390a2600101611f5f565b50505b505050505050565b60006001600160e01b0319821663b3bcbb7960e01b148061201657506001600160e01b031982166371700c6960e01b145b8061203157506001600160e01b0319821663da9ee8b760e01b145b8061204c57506001600160e01b03198216632b13c58f60e01b145b8061079d575061079d82612a2f565b6000818152600260205260409020546001600160a01b0316611dff5760405163b49aa3b560e01b815260040160405180910390fd5b600081815260036020526040902080546001600160a01b0319166001600160a01b03841690811790915581906120c582610d1f565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60008061210a83610d1f565b9050806001600160a01b0316846001600160a01b0316148061213157506121318185611d56565b806121555750836001600160a01b031661214a84610835565b6001600160a01b0316145b949350505050565b826001600160a01b031661217082610d1f565b6001600160a01b0316146121975760405163a195bc5360e01b815260040160405180910390fd5b6001600160a01b0382166121be57604051632c95542760e01b815260040160405180910390fd5b6121c9838383612a7f565b6121d4600082612090565b60008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a46108e3838383612cac565b6007546001600160a01b03163314610f235760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401611ded565b600061229b82610d1f565b90506122a981600084612a7f565b6122b4600083612090565b60008281526002602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a4610ffa81600084612cac565b6009546040516386bc2be360e01b81526001600160a01b03909116906386bc2be39061234190849060040161343c565b600060405180830381600087803b15801561235b57600080fd5b505af115801561236f573d6000803e3d6000fd5b5050505050565b6001600160a01b03821661239d57604051633904578f60e11b815260040160405180910390fd5b6000818152600260205260409020546001600160a01b0316156123d357604051632eb5f0c360e21b815260040160405180910390fd5b6123df60008383612a7f565b60008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4610ffa60008383612cac565b600780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b0316036124c4576040516306f8139d60e11b815260040160405180910390fd5b6001600160a01b03838116600081815260046020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b60095460405163051330b560e21b81526000916001600160a01b03169063144cc2d4906125649030908790600401614445565b602060405180830381865afa158015612581573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118b1919061400b565b600954604051631572f24960e11b81523060048201526000916001600160a01b031690632ae5e49290602401610ed0565b60008080600019858709858702925082811083820303915050806000036126105783828161260657612606614469565b04925050506118b1565b83811061263a57604051631dcf306360e21b81526004810182905260248101859052604401611ded565b600084868809600260036001881981018916988990049182028318808302840302808302840302808302840302808302840302808302840302918202909203026000889003889004909101858311909403939093029303949094049190911702949350505050565b6126ad84848461215d565b6126b984848484612d99565b610a16576040516336f57c1b60e11b815260040160405180910390fd5b6126e08282612e9b565b5050600591909155600680546001600160a01b0319166001600160a01b03909216919091179055565b600c5460009060c083013503612724575060808101356127da565b600b546001600160a01b031615610ffa57600d546127d79060808401359061274d90600a614563565b600b54600c54604051635268657960e11b815260c08801356004820152602481019190915260a087013560448201526001600160a01b039091169063a4d0caf290606401602060405180830381865afa1580156127ae573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127d2919061400b565b6125d6565b90505b6000600e816127f16101a086016101808701613241565b6001600160a01b031681526020810191909152604001600090812054915082906128236101a086016101808701613241565b6001600160a01b03166128396020870187613241565b6001600160a01b0316036128505790820190612853565b50815b60008060446128666101e0890189613d08565b90501180156128aa575063b3bcbb7960e01b6128866101e0890189613d08565b61289591604491604091613d4e565b61289e91613d78565b6001600160e01b031916145b1561294a57600060606128c16101e08a018a613d08565b8101906128ce919061456f565b919950975090955093505083159150612921905057858501600e60006128fc6101a08d016101808e01613241565b6001600160a01b03168152602081019190915260400160002055505050505050505050565b80511561294757612944868261293f6101a08d016101808e01613241565b612eb4565b95505b50505b83156129ee5761296c846129666101a08a016101808b01613241565b84612ff6565b935083156129cb57801561299357604051631b57826960e21b815260040160405180910390fd5b838301600e60006129ac6101a08b016101808c01613241565b6001600160a01b03168152602081019190915260400160002055611471565b8285146129e95782600e60006129ac6101a08b016101808c01613241565b611471565b8285146114715782600e6000612a0c6101a08b016101808c01613241565b6001600160a01b0316815260208101919091526040016000205550505050505050565b60006001600160e01b031982166380ac58cd60e01b1480612a6057506001600160e01b03198216635b5e139f60e01b145b8061079d57506301ffc9a760e01b6001600160e01b031983161461079d565b6001600160a01b038316156108e35760095460405163b67cb04760e01b8152306004820152602481018390526000916001600160a01b03169063b67cb0479060440161016060405180830381865afa158015612adf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b039190614666565b905080610140015115612bc857600a546005546040516321d1336160e11b815260048101919091526000916001600160a01b0316906343a266c29060240161012060405180830381865afa158015612b5f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b83919061409f565b90506001600160a01b03841615801590612ba8575061010081015160f41c6001908116145b15612bc6576040516318cdaf9760e01b815260040160405180910390fd5b505b6009546040516308ed6c0160e41b8152306004820152602481018490526000916001600160a01b031690638ed6c01090604401602060405180830381865afa158015612c18573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c3c9190613eca565b6001600160a01b031603610a1657600954604051638cec7d3960e01b8152600481018490526001600160a01b03868116602483015290911690638cec7d3990604401600060405180830381600087803b158015612c9857600080fd5b505af1158015611fda573d6000803e3d6000fd5b60095460405163b67cb04760e01b8152306004820152602481018390526000916001600160a01b03169063b67cb0479060440161016060405180830381865afa158015612cfd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d219190614666565b60095481516040516330b157e560e21b815260048101919091526001600160a01b038781166024830152868116604483015292935091169063c2c55f9490606401600060405180830381600087803b158015612d7c57600080fd5b505af1158015612d90573d6000803e3d6000fd5b50505050610a16565b60006001600160a01b0384163b15612e9057604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612ddd903390899088908890600401614708565b6020604051808303816000875af1925050508015612e18575060408051601f3d908101601f19168201909252612e1591810190614745565b60015b612e76573d808015612e46576040519150601f19603f3d011682016040523d82523d6000602084013e612e4b565b606091505b508051600003612e6e576040516336f57c1b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612155565b506001949350505050565b6000612ea783826147a8565b5060016108e382826147a8565b60095460405163eaa19ab360e01b81526000916060916001600160a01b039091169063eaa19ab390612eee90889088908790600401614867565b6000604051808303816000875af1158015612f0d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052612f359190810190613faa565b81519093509091506000805b82811015612feb57838181518110612f5b57612f5b613c7c565b60200260200101519150612f6f8683612376565b856001600160a01b0316878281518110612f8b57612f8b613c7c565b602002602001015161ffff16837f598baf7bf150ca2f42be9e9f8f55e81d45f5715c3ff22bf46d697fabec7f31d68b33604051612fdb9291909182526001600160a01b0316602082015260400190565b60405180910390a4600101612f41565b505050509392505050565b60095460405163879791f360e01b815260048101859052600091829182916001600160a01b03169063879791f3906024016060604051808303816000875af1158015613046573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061306a91906148c4565b9450909250905060008290036130a057831561309957604051630e5313df60e41b815260040160405180910390fd5b50506118b1565b6130aa8583612376565b6001600160a01b03851681837f598baf7bf150ca2f42be9e9f8f55e81d45f5715c3ff22bf46d697fabec7f31d66130e1878b614079565b604080519182523360208301520160405180910390a450509392505050565b6001600160e01b031981168114611dff57600080fd5b60006020828403121561312857600080fd5b81356118b181613100565b60005b8381101561314e578181015183820152602001613136565b50506000910152565b6000815180845261316f816020860160208601613133565b601f01601f19169290920160200192915050565b6020815260006118b16020830184613157565b6000602082840312156131a857600080fd5b5035919050565b6001600160a01b0381168114611dff57600080fd5b80356131cf816131af565b919050565b600080604083850312156131e757600080fd5b82356131f2816131af565b946020939093013593505050565b60008060006060848603121561321557600080fd5b8335613220816131af565b92506020840135613230816131af565b929592945050506040919091013590565b60006020828403121561325357600080fd5b81356118b1816131af565b6000806020838503121561327157600080fd5b82356001600160401b038082111561328857600080fd5b818501915085601f83011261329c57600080fd5b8135818111156132ab57600080fd5b8660208260061b85010111156132c057600080fd5b60209290920196919550909350505050565b60006101e082840312156132e557600080fd5b50919050565b6000602082840312156132fd57600080fd5b81356001600160401b0381111561331357600080fd5b612155848285016132d2565b60008083601f84011261333157600080fd5b5081356001600160401b0381111561334857600080fd5b6020830191508360208260051b850101111561336357600080fd5b9250929050565b6000806020838503121561337d57600080fd5b82356001600160401b0381111561339357600080fd5b61339f8582860161331f565b90969095509350505050565b6000806000604084860312156133c057600080fd5b83356001600160401b038111156133d657600080fd5b6133e28682870161331f565b90945092505060208401356133f6816131af565b809150509250925092565b600081518084526020808501945080840160005b8381101561343157815187529582019590820190600101613415565b509495945050505050565b6020815260006118b16020830184613401565b6000806020838503121561346257600080fd5b82356001600160401b038082111561347957600080fd5b818501915085601f83011261348d57600080fd5b81358181111561349c57600080fd5b8660208285010111156132c057600080fd5b8015158114611dff57600080fd5b80356131cf816134ae565b600080604083850312156134da57600080fd5b82356134e5816131af565b915060208301356134f5816134ae565b809150509250929050565b8381526000602060608184015261351a6060840186613157565b83810360408581019190915285518083528387019284019060005b8181101561356357845180516001600160a01b03168452860151868401529385019391830191600101613535565b50909998505050505050505050565b6000806040838503121561358557600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b604051608081016001600160401b03811182821017156135cc576135cc613594565b60405290565b60405161014081016001600160401b03811182821017156135cc576135cc613594565b60405161012081016001600160401b03811182821017156135cc576135cc613594565b60405161016081016001600160401b03811182821017156135cc576135cc613594565b604051601f8201601f191681016001600160401b038111828210171561366357613663613594565b604052919050565b60006001600160401b0382111561368457613684613594565b50601f01601f191660200190565b60006136a56136a08461366b565b61363b565b90508281528383830111156136b957600080fd5b828260208301376000602084830101529392505050565b600080600080608085870312156136e657600080fd5b84356136f1816131af565b93506020850135613701816131af565b92506040850135915060608501356001600160401b0381111561372357600080fd5b8501601f8101871361373457600080fd5b61374387823560208401613692565b91505092959194509250565b600082601f83011261376057600080fd5b6118b183833560208501613692565b60006001600160401b0382111561378857613788613594565b5060051b60200190565b803569ffffffffffffffffffff811681146131cf57600080fd5b803565ffffffffffff811681146131cf57600080fd5b803564ffffffffff811681146131cf57600080fd5b803561ffff811681146131cf57600080fd5b600060808083850312156137fc57600080fd5b6138046135aa565b915082356001600160401b0381111561381c57600080fd5b8301601f8101851361382d57600080fd5b8035602061383d6136a08361376f565b828152610140928302840182019282820191908985111561385d57600080fd5b948301945b8486101561392c5780868b03121561387a5760008081fd5b6138826135d2565b61388b87613792565b81526138988588016137ac565b8582015260406138a98189016137c2565b9082015260606138ba8882016137d7565b908201526138c98789016137d7565b8882015260a06138da8189016131c4565b9082015260c0878101359082015260e06138f58189016134bc565b908201526101006139078882016134bc565b908201526101206139198882016134bc565b9082015283529485019491830191613862565b50865250858101359085015250505060408083013590820152613951606083016131c4565b606082015292915050565b60006060828403121561396e57600080fd5b604051606081018181106001600160401b038211171561399057613990613594565b60405290508082356139a1816134ae565b815260208301356139b1816134ae565b602082015260408301356139c4816134ae565b6040919091015292915050565b60008060008060008060008060008060006101a08c8e0312156139f357600080fd5b8b359a50613a0360208d016131c4565b99506001600160401b038060408e01351115613a1e57600080fd5b613a2e8e60408f01358f0161374f565b99508060608e01351115613a4157600080fd5b613a518e60608f01358f0161374f565b9850613a5f60808e016131c4565b97508060a08e01351115613a7257600080fd5b613a828e60a08f01358f0161374f565b9650613a9060c08e016131c4565b95508060e08e01351115613aa357600080fd5b613ab38e60e08f01358f0161374f565b9450806101008e01351115613ac757600080fd5b50613ad98d6101008e01358e016137e9565b9250613ae86101208d016131c4565b9150613af88d6101408e0161395c565b90509295989b509295989b9093969950565b600060208284031215613b1c57600080fd5b81356001600160401b03811115613b3257600080fd5b82016101a081850312156118b157600080fd5b600060208284031215613b5757600080fd5b81356001600160401b03811115613b6d57600080fd5b820161020081850312156118b157600080fd5b60008060408385031215613b9357600080fd5b8235613b9e816131af565b915060208301356134f5816131af565b60008060008060408587031215613bc457600080fd5b84356001600160401b0380821115613bdb57600080fd5b818701915087601f830112613bef57600080fd5b813581811115613bfe57600080fd5b88602061014083028501011115613c1457600080fd5b602092830196509450908601359080821115613c2f57600080fd5b50613c3c8782880161331f565b95989497509550505050565b600181811c90821680613c5c57607f821691505b6020821081036132e557634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b600060408284031215613ca457600080fd5b604051604081018181106001600160401b0382111715613cc657613cc6613594565b604052823581526020928301359281019290925250919050565b80516131cf816134ae565b600060208284031215613cfd57600080fd5b81516118b1816134ae565b6000808335601e19843603018112613d1f57600080fd5b8301803591506001600160401b03821115613d3957600080fd5b60200191503681900382131561336357600080fd5b60008085851115613d5e57600080fd5b83861115613d6b57600080fd5b5050820193919092039150565b6001600160e01b03198135818116916004851015613da05780818660040360031b1b83161692505b505092915050565b600080600060608486031215613dbd57600080fd5b83359250602080850135613dd081613100565b925060408501356001600160401b03811115613deb57600080fd5b8501601f81018713613dfc57600080fd5b8035613e0a6136a08261376f565b81815260059190911b82018301908381019089831115613e2957600080fd5b928401925b82841015613e4757833582529284019290840190613e2e565b80955050505050509250925092565b60008235603e19833603018112613e6c57600080fd5b9190910192915050565b6000808335601e19843603018112613e8d57600080fd5b8301803591506001600160401b03821115613ea757600080fd5b6020019150600581901b360382131561336357600080fd5b80516131cf816131af565b600060208284031215613edc57600080fd5b81516118b1816131af565b84815260606020808301829052908201849052600090859060808401835b87811015613f2c5761ffff613f19856137d7565b1682529282019290820190600101613f05565b50809350505050821515604083015295945050505050565b600082601f830112613f5557600080fd5b81516020613f656136a08361376f565b82815260059290921b84018101918181019086841115613f8457600080fd5b8286015b84811015613f9f5780518352918301918301613f88565b509695505050505050565b60008060408385031215613fbd57600080fd5b82516001600160401b03811115613fd357600080fd5b613fdf85828601613f44565b925050602083015190509250929050565b60006020828403121561400257600080fd5b6118b1826137d7565b60006020828403121561401d57600080fd5b5051919050565b60208152816020820152818360408301376000818301604090810191909152601f909201601f19160101919050565b8183823760009101908152919050565b634e487b7160e01b600052601160045260246000fd5b8181038181111561079d5761079d614063565b8082018082111561079d5761079d614063565b600061012082840312156140b257600080fd5b6140ba6135f5565b825181526020830151602082015260408301516040820152606083015160608201526080830151608082015260a083015160a082015260c083015160c082015261410660e08401613ebf565b60e0820152610100928301519281019290925250919050565b60006020828403121561413157600080fd5b81516001600160401b0381111561414757600080fd5b61215584828501613f44565b602080825282518282018190526000919060409081850190868401855b8281101561421f578151805169ffffffffffffffffffff1685528681015165ffffffffffff16878601528581015164ffffffffff168686015260608082015161ffff908116918701919091526080808301519091169086015260a0808201516001600160a01b03169086015260c0808201519086015260e08082015115159086015261010080820151151590860152610120908101511515908501526101409093019290850190600101614170565b5091979650505050505050565b60006020828403121561423e57600080fd5b81516001600160401b0381111561425457600080fd5b8201601f8101841361426557600080fd5b80516142736136a08261366b565b81815285602083850101111561428857600080fd5b614299826020830160208601613133565b95945050505050565b6040815260006142b56040830185613157565b90508260208301529392505050565b6020808252810182905260006001600160fb1b038311156142e457600080fd5b8260051b80856040850137919091016040019392505050565b61431a8261430a83613792565b69ffffffffffffffffffff169052565b614326602082016137ac565b65ffffffffffff16602083015261433f604082016137c2565b64ffffffffff166040830152614357606082016137d7565b61ffff16606083015261436c608082016137d7565b61ffff16608083015261438160a082016131c4565b6001600160a01b031660a083015260c081810135908301526143a560e082016134bc565b151560e08301526101006143ba8282016134bc565b1515908301526101206143ce8282016134bc565b80151584830152610a16565b6020808252810182905260008360408301825b85811015614413576143ff82846142fd565b6101409283019291909101906001016143ed565b5095945050505050565b610160810161442c82856142fd565b6001600160a01b03929092166101409190910152919050565b6001600160a01b038316815260406020820181905260009061215590830184613401565b634e487b7160e01b600052601260045260246000fd5b600181815b808511156144ba5781600019048211156144a0576144a0614063565b808516156144ad57918102915b93841c9390800290614484565b509250929050565b6000826144d15750600161079d565b816144de5750600061079d565b81600181146144f457600281146144fe5761451a565b600191505061079d565b60ff84111561450f5761450f614063565b50506001821b61079d565b5060208310610133831016604e8410600b841016171561453d575081810a61079d565b614547838361447f565b806000190482111561455b5761455b614063565b029392505050565b60006118b183836144c2565b600080600080600080600060e0888a03121561458a57600080fd5b87359650602080890135965060408901356145a481613100565b955060608901356145b4816134ae565b945060808901356145c4816134ae565b935060a08901356145d4816134ae565b925060c08901356001600160401b038111156145ef57600080fd5b8901601f81018b1361460057600080fd5b803561460e6136a08261376f565b81815260059190911b8201830190838101908d83111561462d57600080fd5b928401925b8284101561465257614643846137d7565b82529284019290840190614632565b809550505050505092959891949750929550565b6000610160828403121561467957600080fd5b614681613618565b825181526020830151602082015260408301516040820152606083015160608201526080830151608082015260a083015160a082015260c083015160c08201526146cd60e08401613ebf565b60e082015261010083810151908201526101206146eb818501613ce0565b908201526101406146fd848201613ce0565b908201529392505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061473b90830184613157565b9695505050505050565b60006020828403121561475757600080fd5b81516118b181613100565b601f8211156108e357600081815260208120601f850160051c810160208610156147895750805b601f850160051c820191505b81811015611fdd57828155600101614795565b81516001600160401b038111156147c1576147c1613594565b6147d5816147cf8454613c48565b84614762565b602080601f83116001811461480a57600084156147f25750858301515b600019600386901b1c1916600185901b178555611fdd565b600085815260208120601f198616915b828110156148395788860151825594840194600190910190840161481a565b50858210156148575787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6000606082018583526020606081850152818651808452608086019150828801935060005b818110156148ac57845161ffff168352938301939183019160010161488c565b50508093505050508215156040830152949350505050565b6000806000606084860312156148d957600080fd5b835192506020840151915060408401519050925092509256fea2646970667358221220e5129db4159b86468e429faf03c71c5a272db0792e4849874d6bf1834c5761ed64736f6c63430008100033

Deployed Bytecode

0x6080604052600436106102465760003560e01c8063715018a611610139578063c41c2f24116100b6578063da9ee8b71161007a578063da9ee8b7146106d0578063df487e26146106e3578063e8a3d48514610703578063e985e9c514610718578063f2fde38b14610738578063f5a38e631461075857600080fd5b8063c41c2f2414610630578063c87b56dd14610650578063ccb4807b14610670578063d3419bf314610690578063d46cf171146106b057600080fd5b8063a22cb465116100fd578063a22cb46514610581578063a51cfd18146105a1578063aa4fb15b146105d0578063b88d4fde146105f0578063bb52b6e41461061057600080fd5b8063715018a6146104f95780638da5cb5b1461050e57806395d89b411461052c578063975057e714610541578063a0bcfc7f1461056157600080fd5b806336c1a93b116101c7578063557e71551161018b578063557e7155146104565780636352211e1461047657806364640c1e146104965780636ac6d941146104ac57806370a08231146104d957600080fd5b806336c1a93b146103ca5780633fafa127146103ea57806342842e0e146104005780634ecba6251461042057806354c6d1f51461043657600080fd5b806323b872dd1161020e57806323b872dd1461031c5780632407497e1461033c578063245a45b51461035c5780632a596e53146103975780632b13c58f146103b757600080fd5b806301ffc9a71461024b57806306fdde0314610280578063081812fc146102a2578063095ea7b3146102da5780631d153ca4146102fc575b600080fd5b34801561025757600080fd5b5061026b610266366004613116565b610778565b60405190151581526020015b60405180910390f35b34801561028c57600080fd5b506102956107a3565b6040516102779190613183565b3480156102ae57600080fd5b506102c26102bd366004613196565b610835565b6040516001600160a01b039091168152602001610277565b3480156102e657600080fd5b506102fa6102f53660046131d4565b61085c565b005b34801561030857600080fd5b506008546102c2906001600160a01b031681565b34801561032857600080fd5b506102fa610337366004613200565b6108e8565b34801561034857600080fd5b506102fa610357366004613241565b61091a565b34801561036857600080fd5b50610389610377366004613241565b600e6020526000908152604090205481565b604051908152602001610277565b3480156103a357600080fd5b506102fa6103b236600461325e565b6109c3565b6102fa6103c53660046132eb565b610a1c565b3480156103d657600080fd5b506102fa6103e536600461336a565b610bf6565b3480156103f657600080fd5b5061038960055481565b34801561040c57600080fd5b506102fa61041b366004613200565b610c58565b34801561042c57600080fd5b50610389600d5481565b34801561044257600080fd5b506102c2610451366004613196565b610c73565b34801561046257600080fd5b50600a546102c2906001600160a01b031681565b34801561048257600080fd5b506102c2610491366004613196565b610d1f565b3480156104a257600080fd5b50610389600c5481565b3480156104b857600080fd5b506104cc6104c73660046133ab565b610d55565b604051610277919061343c565b3480156104e557600080fd5b506103896104f4366004613241565b610e9b565b34801561050557600080fd5b506102fa610f11565b34801561051a57600080fd5b506007546001600160a01b03166102c2565b34801561053857600080fd5b50610295610f25565b34801561054d57600080fd5b506009546102c2906001600160a01b031681565b34801561056d57600080fd5b506102fa61057c36600461344f565b610f34565b34801561058d57600080fd5b506102fa61059c3660046134c7565b610fef565b3480156105ad57600080fd5b506105c16105bc3660046132eb565b610ffe565b60405161027793929190613500565b3480156105dc57600080fd5b506102fa6105eb366004613572565b61125d565b3480156105fc57600080fd5b506102fa61060b3660046136d0565b61147a565b34801561061c57600080fd5b506102fa61062b3660046139d1565b6114ad565b34801561063c57600080fd5b506006546102c2906001600160a01b031681565b34801561065c57600080fd5b5061029561066b366004613196565b611793565b34801561067c57600080fd5b506102fa61068b36600461344f565b6119f1565b34801561069c57600080fd5b50600b546102c2906001600160a01b031681565b3480156106bc57600080fd5b506105c16106cb366004613b0a565b611aa4565b6102fa6106de366004613b45565b611b87565b3480156106ef57600080fd5b506102fa6106fe366004613241565b611c3e565b34801561070f57600080fd5b50610295611ce0565b34801561072457600080fd5b5061026b610733366004613b80565b611d56565b34801561074457600080fd5b506102fa610753366004613241565b611d84565b34801561076457600080fd5b506102fa610773366004613bae565b611e02565b60006001600160e01b03198216631e68505960e31b148061079d575061079d82611fe5565b92915050565b6060600080546107b290613c48565b80601f01602080910402602001604051908101604052809291908181526020018280546107de90613c48565b801561082b5780601f106108005761010080835404028352916020019161082b565b820191906000526020600020905b81548152906001019060200180831161080e57829003601f168201915b5050505050905090565b60006108408261205b565b506000908152600360205260409020546001600160a01b031690565b600061086782610d1f565b9050806001600160a01b0316836001600160a01b03160361089b5760405163133f8be960e01b815260040160405180910390fd5b336001600160a01b038216148015906108bb57506108b98133611d56565b155b156108d95760405163e5fa0e3560e01b815260040160405180910390fd5b6108e38383612090565b505050565b6108f233826120fe565b61090f5760405163e5fa0e3560e01b815260040160405180910390fd5b6108e383838361215d565b610922612236565b60095460405163036129cb60e61b81526001600160a01b0383811660048301529091169063d84a72c090602401600060405180830381600087803b15801561096957600080fd5b505af115801561097d573d6000803e3d6000fd5b50506040513381526001600160a01b03841692507fe7784d93cfbfa4408e19577e6cc0436f4dbb51214b70e100905dfce9def88c1691506020015b60405180910390a250565b8060005b81811015610a165760008484838181106109e3576109e3613c7c565b9050604002018036038101906109f99190613c92565b9050610a0d8160000151826020015161125d565b506001016109c7565b50505050565b34151580610a9e5750600654600554604051636e49181f60e01b815260048101919091523360248201526001600160a01b0390911690636e49181f90604401602060405180830381865afa158015610a78573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a9c9190613ceb565b155b80610aaf5750600554816020013514155b15610acd57604051633efca5c360e11b815260040160405180910390fd5b6024610add6101c0830183613d08565b90501080610b21575063b3bcbb7960e01b610afc6101c0830183613d08565b610b0b91602491602091613d4e565b610b1491613d78565b6001600160e01b03191614155b15610b3f57604051632a84050f60e01b815260040160405180910390fd5b6000610b4f6101c0830183613d08565b810190610b5c9190613da8565b925050506000815190506000805b82811015610bec57838181518110610b8457610b84613c7c565b60200260200101519150846000016020810190610ba19190613241565b6000838152600260205260409020546001600160a01b03908116911614610bdb5760405163075fd2b160e01b815260040160405180910390fd5b610be482612290565b600101610b6a565b50610a1683612311565b610bfe612236565b8060005b81811015610a165736848483818110610c1d57610c1d613c7c565b9050602002810190610c2f9190613e56565b9050610c4e610c3e8280613e76565b6104c76040850160208601613241565b5050600101610c02565b6108e38383836040518060200160405280600081525061147a565b6009546040516308ed6c0160e41b81523060048201526024810183905260009182916001600160a01b0390911690638ed6c01090604401602060405180830381865afa158015610cc7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ceb9190613eca565b90506001600160a01b03811615610d025792915050565b50506000908152600260205260409020546001600160a01b031690565b6000818152600260205260408120546001600160a01b03168061079d5760405163b49aa3b560e01b815260040160405180910390fd5b6060610d5f612236565b60095460405163eaa19ab360e01b81526001600160a01b039091169063eaa19ab390610d98906000199088908890600190600401613ee7565b6000604051808303816000875af1158015610db7573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610ddf9190810190613faa565b509050826000805b82811015610e9157838181518110610e0157610e01613c7c565b60200260200101519150610e158583612376565b846001600160a01b0316878783818110610e3157610e31613c7c565b9050602002016020810190610e469190613ff0565b604080516000815233602082015261ffff929092169185917f598baf7bf150ca2f42be9e9f8f55e81d45f5715c3ff22bf46d697fabec7f31d6910160405180910390a4600101610de7565b5050509392505050565b600954604051633de222bb60e21b81523060048201526001600160a01b038381166024830152600092169063f7888aec906044015b602060405180830381865afa158015610eed573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079d919061400b565b610f19612236565b610f236000612440565b565b6060600180546107b290613c48565b610f3c612236565b6009546040516331315e5960e11b81526001600160a01b0390911690636262bcb290610f6e9085908590600401614024565b600060405180830381600087803b158015610f8857600080fd5b505af1158015610f9c573d6000803e3d6000fd5b505050508181604051610fb0929190614053565b604051908190038120338252907f7bc9110d5de090dd59e07912d2b93a5a27ac70a60c8d8e324db4f9ee8b8b5c13906020015b60405180910390a25050565b610ffa338383612492565b5050565b6000606080608084013515611026576040516309f82f1b60e31b815260040160405180910390fd5b60246110366101c0860186613d08565b9050108061107a575063b3bcbb7960e01b6110556101c0860186613d08565b61106491602491602091613d4e565b61106d91613d78565b6001600160e01b03191614155b1561109857604051632a84050f60e01b815260040160405180910390fd5b60408051600180825281830190925290816020015b60408051808201909152600080825260208201528152602001906001900390816110ad5790505090506040518060400160405280306001600160a01b0316815260200160008152508160008151811061110857611108613c7c565b602090810291909101015260006111236101c0860186613d08565b8101906111309190613da8565b9250505060006111408287612531565b9050600061114d876125a5565b905060006111608860c0013584846125d6565b9050612710886101800135036111cb578061117f6101a08a018a613d08565b8782828080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250969d50919b5091995061125698505050505050505050565b611201816111ea856111e46101808d0135612710614079565b866125d6565b6111f9906101808c013561408c565b6127106125d6565b61120f6101a08a018a613d08565b8782828080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250969d50919b509199505050505050505050505b9193909250565b600a546005546040516321d1336160e11b815260048101919091526000916001600160a01b0316906343a266c29060240161012060405180830381865afa1580156112ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112d0919061409f565b61010081015190915060f51c6001908116036112ff57604051631d2c125760e31b815260040160405180910390fd5b600954604051635d53f40760e11b815260048101859052602481018490526000916001600160a01b03169063baa7e80e906044016000604051808303816000875af1158015611352573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261137a919081019061411f565b6009546040516304db994760e21b8152306004820152602481018790529192506000916001600160a01b039091169063136e651c90604401602060405180830381865afa1580156113cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113f39190613eca565b90506000805b858110156114715783818151811061141357611413613c7c565b602002602001015191506114278383612376565b6040513381526001600160a01b03841690889084907f031e1988c95a91ec4d655ff63a8f87a80bc9daf28d95ae10ee08c0022cfb5c8b9060200160405180910390a46001016113f9565b50505050505050565b61148433836120fe565b6114a15760405163e5fa0e3560e01b815260040160405180910390fd5b610a16848484846126a2565b6008546001600160a01b031630036114c457600080fd5b6009546001600160a01b0316156114da57600080fd5b6114e68b8b8b8b6126d6565b600a80546001600160a01b03808a166001600160a01b031992831617909255600980548584169083161790556020850151600c556040850151600d556060850151600b805491909316911617905585511561159a576040516331315e5960e11b81526001600160a01b03831690636262bcb290611567908990600401613183565b600060405180830381600087803b15801561158157600080fd5b505af1158015611595573d6000803e3d6000fd5b505050505b8351156116005760405163d67b78fd60e01b81526001600160a01b0383169063d67b78fd906115cd908790600401613183565b600060405180830381600087803b1580156115e757600080fd5b505af11580156115fb573d6000803e3d6000fd5b505050505b6001600160a01b0385161561166b5760405163036129cb60e61b81526001600160a01b03868116600483015283169063d84a72c090602401600060405180830381600087803b15801561165257600080fd5b505af1158015611666573d6000803e3d6000fd5b505050505b825151156116e957825160405163eadd8b3760e01b81526001600160a01b0384169163eadd8b37916116a09190600401614153565b6000604051808303816000875af11580156116bf573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526116e7919081019061411f565b505b8051806116f7575080602001515b80611703575080604001515b1561177d576040805163cdb0af6d60e01b815282511515600482015260208301511515602482015290820151151560448201526001600160a01b0383169063cdb0af6d90606401600060405180830381600087803b15801561176457600080fd5b505af1158015611778573d6000803e3d6000fd5b505050505b61178633612440565b5050505050505050505050565b6000818152600260205260409020546060906001600160a01b03166117c657505060408051602081019091526000815290565b600954604051630fab094760e01b81523060048201526000916001600160a01b031690630fab094790602401602060405180830381865afa15801561180f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118339190613eca565b90506001600160a01b038116156118b857604051636d02a25560e11b8152600481018490526001600160a01b0382169063da0544aa90602401600060405180830381865afa158015611889573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526118b1919081019061422c565b9392505050565b60095460405163f682eeaf60e01b81523060048201527387e9dae24682d79b6451932146dec60b5ec88c1b9163030cecc7916001600160a01b039091169063f682eeaf90602401600060405180830381865afa15801561191c573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611944919081019061422c565b600954604051630c8df17160e41b8152306004820152602481018890526001600160a01b039091169063c8df171090604401602060405180830381865afa158015611993573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119b7919061400b565b6040518363ffffffff1660e01b81526004016119d49291906142a2565b600060405180830381865af4158015611889573d6000803e3d6000fd5b6119f9612236565b60095460405163d67b78fd60e01b81526001600160a01b039091169063d67b78fd90611a2b9085908590600401614024565b600060405180830381600087803b158015611a4557600080fd5b505af1158015611a59573d6000803e3d6000fd5b505050508181604051611a6d929190614053565b604051908190038120338252907fd36dc0c1a06103fdcaf15f3f6fb797d1a97997514c78de073640c8b5005454b890602001610fe3565b610120810135606080611abb610160850185613d08565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092945060019250611afb915050565b604051908082528060200260200182016040528015611b4057816020015b6040805180820190915260008082526020820152815260200190600190039081611b195790505b5090506040518060400160405280306001600160a01b03168152602001600081525081600081518110611b7557611b75613c7c565b60200260200101819052509193909250565b60055434151580611c085750600654604051636e49181f60e01b8152600481018390523360248201526001600160a01b0390911690636e49181f90604401602060405180830381865afa158015611be2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c069190613ceb565b155b80611c17575080826020013514155b15611c35576040516331c57b1b60e21b815260040160405180910390fd5b610ffa82612709565b611c46612236565b6009546040516317161f7d60e01b81526001600160a01b038381166004830152909116906317161f7d90602401600060405180830381600087803b158015611c8d57600080fd5b505af1158015611ca1573d6000803e3d6000fd5b50506040513381526001600160a01b03841692507fab0014d4c7a642a02a31b303a318908c22b0fb2001f107278fc6076b4c671b6591506020016109b8565b600954604051630155619b60e71b81523060048201526060916001600160a01b03169063aab0cd8090602401600060405180830381865afa158015611d29573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611d51919081019061422c565b905090565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205460ff1690565b611d8c612236565b6001600160a01b038116611df65760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b611dff81612440565b50565b611e0a612236565b82818015611eda576009546040516320512ba160e01b81526001600160a01b03909116906320512ba190611e4490879087906004016142c4565b600060405180830381600087803b158015611e5e57600080fd5b505af1158015611e72573d6000803e3d6000fd5b5050505060005b81811015611ed857848482818110611e9357611e93613c7c565b60405133815260209182029390930135927f832d89d991be5351d793c20faf4b7dd44f8aa9ce39e3cb160c6317de6fbba72992500160405180910390a2600101611e79565b505b8115611fdd5760095460405163eadd8b3760e01b81526000916001600160a01b03169063eadd8b3790611f13908a908a906004016143da565b6000604051808303816000875af1158015611f32573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611f5a919081019061411f565b905060005b83811015611fda57818181518110611f7957611f79613c7c565b60200260200101517f85b5b4c4e44e342c8dac3c3a5364494d455043decb9f4bb8e7e0a3020d22fed4898984818110611fb457611fb4613c7c565b9050610140020133604051611fca92919061441d565b60405180910390a2600101611f5f565b50505b505050505050565b60006001600160e01b0319821663b3bcbb7960e01b148061201657506001600160e01b031982166371700c6960e01b145b8061203157506001600160e01b0319821663da9ee8b760e01b145b8061204c57506001600160e01b03198216632b13c58f60e01b145b8061079d575061079d82612a2f565b6000818152600260205260409020546001600160a01b0316611dff5760405163b49aa3b560e01b815260040160405180910390fd5b600081815260036020526040902080546001600160a01b0319166001600160a01b03841690811790915581906120c582610d1f565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60008061210a83610d1f565b9050806001600160a01b0316846001600160a01b0316148061213157506121318185611d56565b806121555750836001600160a01b031661214a84610835565b6001600160a01b0316145b949350505050565b826001600160a01b031661217082610d1f565b6001600160a01b0316146121975760405163a195bc5360e01b815260040160405180910390fd5b6001600160a01b0382166121be57604051632c95542760e01b815260040160405180910390fd5b6121c9838383612a7f565b6121d4600082612090565b60008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a46108e3838383612cac565b6007546001600160a01b03163314610f235760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401611ded565b600061229b82610d1f565b90506122a981600084612a7f565b6122b4600083612090565b60008281526002602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a4610ffa81600084612cac565b6009546040516386bc2be360e01b81526001600160a01b03909116906386bc2be39061234190849060040161343c565b600060405180830381600087803b15801561235b57600080fd5b505af115801561236f573d6000803e3d6000fd5b5050505050565b6001600160a01b03821661239d57604051633904578f60e11b815260040160405180910390fd5b6000818152600260205260409020546001600160a01b0316156123d357604051632eb5f0c360e21b815260040160405180910390fd5b6123df60008383612a7f565b60008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4610ffa60008383612cac565b600780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b0316036124c4576040516306f8139d60e11b815260040160405180910390fd5b6001600160a01b03838116600081815260046020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b60095460405163051330b560e21b81526000916001600160a01b03169063144cc2d4906125649030908790600401614445565b602060405180830381865afa158015612581573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118b1919061400b565b600954604051631572f24960e11b81523060048201526000916001600160a01b031690632ae5e49290602401610ed0565b60008080600019858709858702925082811083820303915050806000036126105783828161260657612606614469565b04925050506118b1565b83811061263a57604051631dcf306360e21b81526004810182905260248101859052604401611ded565b600084868809600260036001881981018916988990049182028318808302840302808302840302808302840302808302840302808302840302918202909203026000889003889004909101858311909403939093029303949094049190911702949350505050565b6126ad84848461215d565b6126b984848484612d99565b610a16576040516336f57c1b60e11b815260040160405180910390fd5b6126e08282612e9b565b5050600591909155600680546001600160a01b0319166001600160a01b03909216919091179055565b600c5460009060c083013503612724575060808101356127da565b600b546001600160a01b031615610ffa57600d546127d79060808401359061274d90600a614563565b600b54600c54604051635268657960e11b815260c08801356004820152602481019190915260a087013560448201526001600160a01b039091169063a4d0caf290606401602060405180830381865afa1580156127ae573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127d2919061400b565b6125d6565b90505b6000600e816127f16101a086016101808701613241565b6001600160a01b031681526020810191909152604001600090812054915082906128236101a086016101808701613241565b6001600160a01b03166128396020870187613241565b6001600160a01b0316036128505790820190612853565b50815b60008060446128666101e0890189613d08565b90501180156128aa575063b3bcbb7960e01b6128866101e0890189613d08565b61289591604491604091613d4e565b61289e91613d78565b6001600160e01b031916145b1561294a57600060606128c16101e08a018a613d08565b8101906128ce919061456f565b919950975090955093505083159150612921905057858501600e60006128fc6101a08d016101808e01613241565b6001600160a01b03168152602081019190915260400160002055505050505050505050565b80511561294757612944868261293f6101a08d016101808e01613241565b612eb4565b95505b50505b83156129ee5761296c846129666101a08a016101808b01613241565b84612ff6565b935083156129cb57801561299357604051631b57826960e21b815260040160405180910390fd5b838301600e60006129ac6101a08b016101808c01613241565b6001600160a01b03168152602081019190915260400160002055611471565b8285146129e95782600e60006129ac6101a08b016101808c01613241565b611471565b8285146114715782600e6000612a0c6101a08b016101808c01613241565b6001600160a01b0316815260208101919091526040016000205550505050505050565b60006001600160e01b031982166380ac58cd60e01b1480612a6057506001600160e01b03198216635b5e139f60e01b145b8061079d57506301ffc9a760e01b6001600160e01b031983161461079d565b6001600160a01b038316156108e35760095460405163b67cb04760e01b8152306004820152602481018390526000916001600160a01b03169063b67cb0479060440161016060405180830381865afa158015612adf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b039190614666565b905080610140015115612bc857600a546005546040516321d1336160e11b815260048101919091526000916001600160a01b0316906343a266c29060240161012060405180830381865afa158015612b5f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b83919061409f565b90506001600160a01b03841615801590612ba8575061010081015160f41c6001908116145b15612bc6576040516318cdaf9760e01b815260040160405180910390fd5b505b6009546040516308ed6c0160e41b8152306004820152602481018490526000916001600160a01b031690638ed6c01090604401602060405180830381865afa158015612c18573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c3c9190613eca565b6001600160a01b031603610a1657600954604051638cec7d3960e01b8152600481018490526001600160a01b03868116602483015290911690638cec7d3990604401600060405180830381600087803b158015612c9857600080fd5b505af1158015611fda573d6000803e3d6000fd5b60095460405163b67cb04760e01b8152306004820152602481018390526000916001600160a01b03169063b67cb0479060440161016060405180830381865afa158015612cfd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d219190614666565b60095481516040516330b157e560e21b815260048101919091526001600160a01b038781166024830152868116604483015292935091169063c2c55f9490606401600060405180830381600087803b158015612d7c57600080fd5b505af1158015612d90573d6000803e3d6000fd5b50505050610a16565b60006001600160a01b0384163b15612e9057604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612ddd903390899088908890600401614708565b6020604051808303816000875af1925050508015612e18575060408051601f3d908101601f19168201909252612e1591810190614745565b60015b612e76573d808015612e46576040519150601f19603f3d011682016040523d82523d6000602084013e612e4b565b606091505b508051600003612e6e576040516336f57c1b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612155565b506001949350505050565b6000612ea783826147a8565b5060016108e382826147a8565b60095460405163eaa19ab360e01b81526000916060916001600160a01b039091169063eaa19ab390612eee90889088908790600401614867565b6000604051808303816000875af1158015612f0d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052612f359190810190613faa565b81519093509091506000805b82811015612feb57838181518110612f5b57612f5b613c7c565b60200260200101519150612f6f8683612376565b856001600160a01b0316878281518110612f8b57612f8b613c7c565b602002602001015161ffff16837f598baf7bf150ca2f42be9e9f8f55e81d45f5715c3ff22bf46d697fabec7f31d68b33604051612fdb9291909182526001600160a01b0316602082015260400190565b60405180910390a4600101612f41565b505050509392505050565b60095460405163879791f360e01b815260048101859052600091829182916001600160a01b03169063879791f3906024016060604051808303816000875af1158015613046573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061306a91906148c4565b9450909250905060008290036130a057831561309957604051630e5313df60e41b815260040160405180910390fd5b50506118b1565b6130aa8583612376565b6001600160a01b03851681837f598baf7bf150ca2f42be9e9f8f55e81d45f5715c3ff22bf46d697fabec7f31d66130e1878b614079565b604080519182523360208301520160405180910390a450509392505050565b6001600160e01b031981168114611dff57600080fd5b60006020828403121561312857600080fd5b81356118b181613100565b60005b8381101561314e578181015183820152602001613136565b50506000910152565b6000815180845261316f816020860160208601613133565b601f01601f19169290920160200192915050565b6020815260006118b16020830184613157565b6000602082840312156131a857600080fd5b5035919050565b6001600160a01b0381168114611dff57600080fd5b80356131cf816131af565b919050565b600080604083850312156131e757600080fd5b82356131f2816131af565b946020939093013593505050565b60008060006060848603121561321557600080fd5b8335613220816131af565b92506020840135613230816131af565b929592945050506040919091013590565b60006020828403121561325357600080fd5b81356118b1816131af565b6000806020838503121561327157600080fd5b82356001600160401b038082111561328857600080fd5b818501915085601f83011261329c57600080fd5b8135818111156132ab57600080fd5b8660208260061b85010111156132c057600080fd5b60209290920196919550909350505050565b60006101e082840312156132e557600080fd5b50919050565b6000602082840312156132fd57600080fd5b81356001600160401b0381111561331357600080fd5b612155848285016132d2565b60008083601f84011261333157600080fd5b5081356001600160401b0381111561334857600080fd5b6020830191508360208260051b850101111561336357600080fd5b9250929050565b6000806020838503121561337d57600080fd5b82356001600160401b0381111561339357600080fd5b61339f8582860161331f565b90969095509350505050565b6000806000604084860312156133c057600080fd5b83356001600160401b038111156133d657600080fd5b6133e28682870161331f565b90945092505060208401356133f6816131af565b809150509250925092565b600081518084526020808501945080840160005b8381101561343157815187529582019590820190600101613415565b509495945050505050565b6020815260006118b16020830184613401565b6000806020838503121561346257600080fd5b82356001600160401b038082111561347957600080fd5b818501915085601f83011261348d57600080fd5b81358181111561349c57600080fd5b8660208285010111156132c057600080fd5b8015158114611dff57600080fd5b80356131cf816134ae565b600080604083850312156134da57600080fd5b82356134e5816131af565b915060208301356134f5816134ae565b809150509250929050565b8381526000602060608184015261351a6060840186613157565b83810360408581019190915285518083528387019284019060005b8181101561356357845180516001600160a01b03168452860151868401529385019391830191600101613535565b50909998505050505050505050565b6000806040838503121561358557600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b604051608081016001600160401b03811182821017156135cc576135cc613594565b60405290565b60405161014081016001600160401b03811182821017156135cc576135cc613594565b60405161012081016001600160401b03811182821017156135cc576135cc613594565b60405161016081016001600160401b03811182821017156135cc576135cc613594565b604051601f8201601f191681016001600160401b038111828210171561366357613663613594565b604052919050565b60006001600160401b0382111561368457613684613594565b50601f01601f191660200190565b60006136a56136a08461366b565b61363b565b90508281528383830111156136b957600080fd5b828260208301376000602084830101529392505050565b600080600080608085870312156136e657600080fd5b84356136f1816131af565b93506020850135613701816131af565b92506040850135915060608501356001600160401b0381111561372357600080fd5b8501601f8101871361373457600080fd5b61374387823560208401613692565b91505092959194509250565b600082601f83011261376057600080fd5b6118b183833560208501613692565b60006001600160401b0382111561378857613788613594565b5060051b60200190565b803569ffffffffffffffffffff811681146131cf57600080fd5b803565ffffffffffff811681146131cf57600080fd5b803564ffffffffff811681146131cf57600080fd5b803561ffff811681146131cf57600080fd5b600060808083850312156137fc57600080fd5b6138046135aa565b915082356001600160401b0381111561381c57600080fd5b8301601f8101851361382d57600080fd5b8035602061383d6136a08361376f565b828152610140928302840182019282820191908985111561385d57600080fd5b948301945b8486101561392c5780868b03121561387a5760008081fd5b6138826135d2565b61388b87613792565b81526138988588016137ac565b8582015260406138a98189016137c2565b9082015260606138ba8882016137d7565b908201526138c98789016137d7565b8882015260a06138da8189016131c4565b9082015260c0878101359082015260e06138f58189016134bc565b908201526101006139078882016134bc565b908201526101206139198882016134bc565b9082015283529485019491830191613862565b50865250858101359085015250505060408083013590820152613951606083016131c4565b606082015292915050565b60006060828403121561396e57600080fd5b604051606081018181106001600160401b038211171561399057613990613594565b60405290508082356139a1816134ae565b815260208301356139b1816134ae565b602082015260408301356139c4816134ae565b6040919091015292915050565b60008060008060008060008060008060006101a08c8e0312156139f357600080fd5b8b359a50613a0360208d016131c4565b99506001600160401b038060408e01351115613a1e57600080fd5b613a2e8e60408f01358f0161374f565b99508060608e01351115613a4157600080fd5b613a518e60608f01358f0161374f565b9850613a5f60808e016131c4565b97508060a08e01351115613a7257600080fd5b613a828e60a08f01358f0161374f565b9650613a9060c08e016131c4565b95508060e08e01351115613aa357600080fd5b613ab38e60e08f01358f0161374f565b9450806101008e01351115613ac757600080fd5b50613ad98d6101008e01358e016137e9565b9250613ae86101208d016131c4565b9150613af88d6101408e0161395c565b90509295989b509295989b9093969950565b600060208284031215613b1c57600080fd5b81356001600160401b03811115613b3257600080fd5b82016101a081850312156118b157600080fd5b600060208284031215613b5757600080fd5b81356001600160401b03811115613b6d57600080fd5b820161020081850312156118b157600080fd5b60008060408385031215613b9357600080fd5b8235613b9e816131af565b915060208301356134f5816131af565b60008060008060408587031215613bc457600080fd5b84356001600160401b0380821115613bdb57600080fd5b818701915087601f830112613bef57600080fd5b813581811115613bfe57600080fd5b88602061014083028501011115613c1457600080fd5b602092830196509450908601359080821115613c2f57600080fd5b50613c3c8782880161331f565b95989497509550505050565b600181811c90821680613c5c57607f821691505b6020821081036132e557634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b600060408284031215613ca457600080fd5b604051604081018181106001600160401b0382111715613cc657613cc6613594565b604052823581526020928301359281019290925250919050565b80516131cf816134ae565b600060208284031215613cfd57600080fd5b81516118b1816134ae565b6000808335601e19843603018112613d1f57600080fd5b8301803591506001600160401b03821115613d3957600080fd5b60200191503681900382131561336357600080fd5b60008085851115613d5e57600080fd5b83861115613d6b57600080fd5b5050820193919092039150565b6001600160e01b03198135818116916004851015613da05780818660040360031b1b83161692505b505092915050565b600080600060608486031215613dbd57600080fd5b83359250602080850135613dd081613100565b925060408501356001600160401b03811115613deb57600080fd5b8501601f81018713613dfc57600080fd5b8035613e0a6136a08261376f565b81815260059190911b82018301908381019089831115613e2957600080fd5b928401925b82841015613e4757833582529284019290840190613e2e565b80955050505050509250925092565b60008235603e19833603018112613e6c57600080fd5b9190910192915050565b6000808335601e19843603018112613e8d57600080fd5b8301803591506001600160401b03821115613ea757600080fd5b6020019150600581901b360382131561336357600080fd5b80516131cf816131af565b600060208284031215613edc57600080fd5b81516118b1816131af565b84815260606020808301829052908201849052600090859060808401835b87811015613f2c5761ffff613f19856137d7565b1682529282019290820190600101613f05565b50809350505050821515604083015295945050505050565b600082601f830112613f5557600080fd5b81516020613f656136a08361376f565b82815260059290921b84018101918181019086841115613f8457600080fd5b8286015b84811015613f9f5780518352918301918301613f88565b509695505050505050565b60008060408385031215613fbd57600080fd5b82516001600160401b03811115613fd357600080fd5b613fdf85828601613f44565b925050602083015190509250929050565b60006020828403121561400257600080fd5b6118b1826137d7565b60006020828403121561401d57600080fd5b5051919050565b60208152816020820152818360408301376000818301604090810191909152601f909201601f19160101919050565b8183823760009101908152919050565b634e487b7160e01b600052601160045260246000fd5b8181038181111561079d5761079d614063565b8082018082111561079d5761079d614063565b600061012082840312156140b257600080fd5b6140ba6135f5565b825181526020830151602082015260408301516040820152606083015160608201526080830151608082015260a083015160a082015260c083015160c082015261410660e08401613ebf565b60e0820152610100928301519281019290925250919050565b60006020828403121561413157600080fd5b81516001600160401b0381111561414757600080fd5b61215584828501613f44565b602080825282518282018190526000919060409081850190868401855b8281101561421f578151805169ffffffffffffffffffff1685528681015165ffffffffffff16878601528581015164ffffffffff168686015260608082015161ffff908116918701919091526080808301519091169086015260a0808201516001600160a01b03169086015260c0808201519086015260e08082015115159086015261010080820151151590860152610120908101511515908501526101409093019290850190600101614170565b5091979650505050505050565b60006020828403121561423e57600080fd5b81516001600160401b0381111561425457600080fd5b8201601f8101841361426557600080fd5b80516142736136a08261366b565b81815285602083850101111561428857600080fd5b614299826020830160208601613133565b95945050505050565b6040815260006142b56040830185613157565b90508260208301529392505050565b6020808252810182905260006001600160fb1b038311156142e457600080fd5b8260051b80856040850137919091016040019392505050565b61431a8261430a83613792565b69ffffffffffffffffffff169052565b614326602082016137ac565b65ffffffffffff16602083015261433f604082016137c2565b64ffffffffff166040830152614357606082016137d7565b61ffff16606083015261436c608082016137d7565b61ffff16608083015261438160a082016131c4565b6001600160a01b031660a083015260c081810135908301526143a560e082016134bc565b151560e08301526101006143ba8282016134bc565b1515908301526101206143ce8282016134bc565b80151584830152610a16565b6020808252810182905260008360408301825b85811015614413576143ff82846142fd565b6101409283019291909101906001016143ed565b5095945050505050565b610160810161442c82856142fd565b6001600160a01b03929092166101409190910152919050565b6001600160a01b038316815260406020820181905260009061215590830184613401565b634e487b7160e01b600052601260045260246000fd5b600181815b808511156144ba5781600019048211156144a0576144a0614063565b808516156144ad57918102915b93841c9390800290614484565b509250929050565b6000826144d15750600161079d565b816144de5750600061079d565b81600181146144f457600281146144fe5761451a565b600191505061079d565b60ff84111561450f5761450f614063565b50506001821b61079d565b5060208310610133831016604e8410600b841016171561453d575081810a61079d565b614547838361447f565b806000190482111561455b5761455b614063565b029392505050565b60006118b183836144c2565b600080600080600080600060e0888a03121561458a57600080fd5b87359650602080890135965060408901356145a481613100565b955060608901356145b4816134ae565b945060808901356145c4816134ae565b935060a08901356145d4816134ae565b925060c08901356001600160401b038111156145ef57600080fd5b8901601f81018b1361460057600080fd5b803561460e6136a08261376f565b81815260059190911b8201830190838101908d83111561462d57600080fd5b928401925b8284101561465257614643846137d7565b82529284019290840190614632565b809550505050505092959891949750929550565b6000610160828403121561467957600080fd5b614681613618565b825181526020830151602082015260408301516040820152606083015160608201526080830151608082015260a083015160a082015260c083015160c08201526146cd60e08401613ebf565b60e082015261010083810151908201526101206146eb818501613ce0565b908201526101406146fd848201613ce0565b908201529392505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061473b90830184613157565b9695505050505050565b60006020828403121561475757600080fd5b81516118b181613100565b601f8211156108e357600081815260208120601f850160051c810160208610156147895750805b601f850160051c820191505b81811015611fdd57828155600101614795565b81516001600160401b038111156147c1576147c1613594565b6147d5816147cf8454613c48565b84614762565b602080601f83116001811461480a57600084156147f25750858301515b600019600386901b1c1916600185901b178555611fdd565b600085815260208120601f198616915b828110156148395788860151825594840194600190910190840161481a565b50858210156148575787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6000606082018583526020606081850152818651808452608086019150828801935060005b818110156148ac57845161ffff168352938301939183019160010161488c565b50508093505050508215156040830152949350505050565b6000806000606084860312156148d957600080fd5b835192506020840151915060408401519050925092509256fea2646970667358221220e5129db4159b86468e429faf03c71c5a272db0792e4849874d6bf1834c5761ed64736f6c63430008100033

Libraries Used


Deployed Bytecode Sourcemap

123468:26373:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;128348:213;;;;;;;;;;-1:-1:-1;128348:213:0;;;;;:::i;:::-;;:::i;:::-;;;661:14:1;;654:22;636:41;;624:2;609:18;128348:213:0;;;;;;;;84358:94;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;85712:161::-;;;;;;;;;;-1:-1:-1;85712:161:0;;;;;:::i;:::-;;:::i;:::-;;;-1:-1:-1;;;;;1902:32:1;;;1884:51;;1872:2;1857:18;85712:161:0;1738:203:1;85320:334:0;;;;;;;;;;-1:-1:-1;85320:334:0;;;;;:::i;:::-;;:::i;:::-;;124329:34;;;;;;;;;;-1:-1:-1;124329:34:0;;;;-1:-1:-1;;;;;124329:34:0;;;86394:293;;;;;;;;;;-1:-1:-1;86394:293:0;;;;;:::i;:::-;;:::i;136398:252::-;;;;;;;;;;-1:-1:-1;136398:252:0;;;;;:::i;:::-;;:::i;125212:53::-;;;;;;;;;;-1:-1:-1;125212:53:0;;;;;:::i;:::-;;;;;;;;;;;;;;;;;3680:25:1;;;3668:2;3653:18;125212:53:0;3534:177:1;131934:609:0;;;;;;;;;;-1:-1:-1;131934:609:0;;;;;:::i;:::-;;:::i;103411:1612::-;;;;;;:::i;:::-;;:::i;132743:592::-;;;;;;;;;;-1:-1:-1;132743:592:0;;;;;:::i;:::-;;:::i;96085:33::-;;;;;;;;;;;;;;;;86750:165;;;;;;;;;;-1:-1:-1;86750:165:0;;;;;:::i;:::-;;:::i;124984:39::-;;;;;;;;;;;;;;;;125781:427;;;;;;;;;;-1:-1:-1;125781:427:0;;;;;:::i;:::-;;:::i;124594:54::-;;;;;;;;;;-1:-1:-1;124594:54:0;;;;-1:-1:-1;;;;;124594:54:0;;;84097:202;;;;;;;;;;-1:-1:-1;84097:202:0;;;;;:::i;:::-;;:::i;124851:39::-;;;;;;;;;;;;;;;;138512:875;;;;;;;;;;-1:-1:-1;138512:875:0;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;126691:140::-;;;;;;;;;;-1:-1:-1;126691:140:0;;;;;:::i;:::-;;:::i;18785:103::-;;;;;;;;;;;;;:::i;18137:87::-;;;;;;;;;;-1:-1:-1;18210:6:0;;-1:-1:-1;;;;;18210:6:0;18137:87;;84513:98;;;;;;;;;;;;;:::i;124454:47::-;;;;;;;;;;-1:-1:-1;124454:47:0;;;;-1:-1:-1;;;;;124454:47:0;;;135576:194;;;;;;;;;;-1:-1:-1;135576:194:0;;;;;:::i;:::-;;:::i;85937:149::-;;;;;;;;;;-1:-1:-1;85937:149:0;;;;;:::i;:::-;;:::i;97974:2232::-;;;;;;;;;;-1:-1:-1;97974:2232:0;;;;;:::i;:::-;;:::i;:::-;;;;;;;;;:::i;137098:1177::-;;;;;;;;;;-1:-1:-1;137098:1177:0;;;;;:::i;:::-;;:::i;86978:280::-;;;;;;;;;;-1:-1:-1;86978:280:0;;;;;:::i;:::-;;:::i;129773:1714::-;;;;;;;;;;-1:-1:-1;129773:1714:0;;;;;:::i;:::-;;:::i;96213:38::-;;;;;;;;;;-1:-1:-1;96213:38:0;;;;-1:-1:-1;;;;;96213:38:0;;;127177:682;;;;;;;;;;-1:-1:-1;127177:682:0;;;;;:::i;:::-;;:::i;135988:218::-;;;;;;;;;;-1:-1:-1;135988:218:0;;;;;:::i;:::-;;:::i;124725:32::-;;;;;;;;;;-1:-1:-1;124725:32:0;;;;-1:-1:-1;;;;;124725:32:0;;;97011:505;;;;;;;;;;-1:-1:-1;97011:505:0;;;;;:::i;:::-;;:::i;102517:513::-;;;;;;:::i;:::-;;:::i;135141:270::-;;;;;;;;;;-1:-1:-1;135141:270:0;;;;;:::i;:::-;;:::i;127996:124::-;;;;;;;;;;;;;:::i;86149:186::-;;;;;;;;;;-1:-1:-1;86149:186:0;;;;;:::i;:::-;;:::i;19043:201::-;;;;;;;;;;-1:-1:-1;19043:201:0;;;;;:::i;:::-;;:::i;133646:1196::-;;;;;;;;;;-1:-1:-1;133646:1196:0;;;;;:::i;:::-;;:::i;128348:213::-;128426:4;-1:-1:-1;;;;;;128453:54:0;;-1:-1:-1;;;128453:54:0;;:102;;;128518:37;128542:12;128518:23;:37::i;:::-;128439:116;128348:213;-1:-1:-1;;128348:213:0:o;84358:94::-;84412:13;84441:5;84434:12;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;84358:94;:::o;85712:161::-;85788:7;85804:23;85819:7;85804:14;:23::i;:::-;-1:-1:-1;85843:24:0;;;;:15;:24;;;;;;-1:-1:-1;;;;;85843:24:0;;85712:161::o;85320:334::-;85397:13;85413:23;85428:7;85413:14;:23::i;:::-;85397:39;;85455:5;-1:-1:-1;;;;;85449:11:0;:2;-1:-1:-1;;;;;85449:11:0;;85445:51;;85469:27;;-1:-1:-1;;;85469:27:0;;;;;;;;;;;85445:51;16926:10;-1:-1:-1;;;;;85509:21:0;;;;;;:63;;-1:-1:-1;85535:37:0;85552:5;16926:10;86149:186;:::i;85535:37::-;85534:38;85509:63;85505:113;;;85588:30;;-1:-1:-1;;;85588:30:0;;;;;;;;;;;85505:113;85627:21;85636:2;85640:7;85627:8;:21::i;:::-;85390:264;85320:334;;:::o;86394:293::-;86564:41;16926:10;86597:7;86564:18;:41::i;:::-;86559:85;;86614:30;;-1:-1:-1;;;86614:30:0;;;;;;;;;;;86559:85;86653:28;86663:4;86669:2;86673:7;86653:9;:28::i;136398:252::-;18023:13;:11;:13::i;:::-;136530:5:::1;::::0;:50:::1;::::0;-1:-1:-1;;;136530:50:0;;-1:-1:-1;;;;;1902:32:1;;;136530:50:0::1;::::0;::::1;1884:51:1::0;136530:5:0;;::::1;::::0;:31:::1;::::0;1857:18:1;;136530:50:0::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;-1:-1:-1::0;;136594:50:0::1;::::0;136633:10:::1;1884:51:1::0;;-1:-1:-1;;;;;136594:50:0;::::1;::::0;-1:-1:-1;136594:50:0::1;::::0;-1:-1:-1;1872:2:1;1857:18;136594:50:0::1;;;;;;;;136398:252:::0;:::o;131934:609::-;132176:25;132151:22;132217:321;132239:14;132234:2;:19;132217:321;;;132323:48;132374:25;;132400:2;132374:29;;;;;;;:::i;:::-;;;;;;132323:80;;;;;;;;;;:::i;:::-;;;132443:42;132459:5;:12;;;132473:5;:11;;;132443:15;:42::i;:::-;-1:-1:-1;132517:4:0;;132217:321;;;;132064:479;131934:609;;:::o;103411:1612::-;103655:9;:14;;;:91;;-1:-1:-1;103681:9:0;;103704;;103681:65;;-1:-1:-1;;;103681:65:0;;;;;24446:25:1;;;;103734:10:0;24487:18:1;;;24480:60;-1:-1:-1;;;;;103681:9:0;;;;:22;;24419:18:1;;103681:65:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;103680:66;103655:91;:130;;;;103776:9;;103757:5;:15;;;:28;;103655:130;103643:183;;;103800:26;;-1:-1:-1;;;103800:26:0;;;;;;;;;;;103643:183;104048:2;104024:14;;;;:5;:14;:::i;:::-;:21;;:26;:102;;;-1:-1:-1;;;;104068:14:0;;;;:5;:14;:::i;:::-;:21;;104086:2;;104083;;104068:21;:::i;:::-;104061:29;;;:::i;:::-;-1:-1:-1;;;;;;104061:65:0;;;104024:102;104012:158;;;104141:29;;-1:-1:-1;;;104141:29:0;;;;;;;;;;;104012:158;104213:33;104269:14;;;;:5;:14;:::i;:::-;104250:77;;;;;;;:::i;:::-;104208:119;;;;104402:25;104430:16;:23;104402:51;;104522:16;104626:10;104621:339;104643:17;104638:2;:22;104621:339;;;104714:16;104731:2;104714:20;;;;;;;;:::i;:::-;;;;;;;104703:31;;104820:5;:12;;;;;;;;;;:::i;:::-;104799:17;;;;:7;:17;;;;;;-1:-1:-1;;;;;104799:17:0;;;:33;;;104795:60;;104841:14;;-1:-1:-1;;;104841:14:0;;;;;;;;;;;104795:60;104892:15;104898:8;104892:5;:15::i;:::-;104939:4;;104621:339;;;;104991:26;105000:16;104991:8;:26::i;132743:592::-;18023:13;:11;:13::i;:::-;132983:17;132950:30:::1;133016:314;133038:22;133033:2;:27;133016:314;;;133130:42;133175:17;;133193:2;133175:21;;;;;;;:::i;:::-;;;;;;;;;;;;:::i;:::-;133130:66:::0;-1:-1:-1;133236:41:0::1;133244:13;133130:66:::0;;133244:13:::1;:::i;:::-;133259:17;::::0;;;::::1;::::0;::::1;;:::i;133236:41::-;-1:-1:-1::0;;133309:4:0::1;;133016:314;;86750:165:::0;86870:39;86887:4;86893:2;86897:7;86870:39;;;;;;;;;;;;:16;:39::i;125781:427::-;125941:5;;:43;;-1:-1:-1;;;125941:43:0;;125968:4;125941:43;;;28312:51:1;28379:18;;;28372:34;;;125853:7:0;;;;-1:-1:-1;;;;;125941:5:0;;;;:18;;28285::1;;125941:43:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;125913:71;-1:-1:-1;;;;;;126050:31:0;;;126046:61;;126090:17;125781:427;-1:-1:-1;;125781:427:0:o;126046:61::-;-1:-1:-1;;126185:17:0;;;;:7;:17;;;;;;-1:-1:-1;;;;;126185:17:0;;125781:427::o;84097:202::-;84169:7;84201:16;;;:7;:16;;;;;;-1:-1:-1;;;;;84201:16:0;;84224:50;;84256:18;;-1:-1:-1;;;84256:18:0;;;;;;;;;;;138512:875;138634:25;18023:13;:11;:13::i;:::-;138769:5:::1;::::0;:113:::1;::::0;-1:-1:-1;;;138769:113:0;;-1:-1:-1;;;;;138769:5:0;;::::1;::::0;:16:::1;::::0;:113:::1;::::0;-1:-1:-1;;138794:17:0;138839:8;;;;138769:5;;:113:::1;;;:::i;:::-;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;::::0;;::::1;-1:-1:-1::0;;138769:113:0::1;::::0;::::1;;::::0;::::1;::::0;;;::::1;::::0;::::1;:::i;:::-;-1:-1:-1::0;138754:128:0;-1:-1:-1;138980:8:0;138954:23:::1;::::0;139089:293:::1;139111:15;139106:2;:20;139089:293;;;139178:8;139187:2;139178:12;;;;;;;;:::i;:::-;;;;;;;139167:23;;139227:29;139233:12;139247:8;139227:5;:29::i;:::-;139301:12;-1:-1:-1::0;;;;;139272:57:0::1;139287:8;;139296:2;139287:12;;;;;;;:::i;:::-;;;;;;;;;;;;;;:::i;:::-;139272:57;::::0;;139315:1:::1;24446:25:1::0;;139318:10:0::1;24502:2:1::0;24487:18;;24480:60;139272:57:0::1;::::0;;;::::1;::::0;139277:8;;139272:57:::1;::::0;24419:18:1;139272:57:0::1;;;;;;;139361:4;;139089:293;;;;138664:723;;138512:875:::0;;;;;:::o;126691:140::-;126787:5;;:38;;-1:-1:-1;;;126787:38:0;;126811:4;126787:38;;;31485:34:1;-1:-1:-1;;;;;31555:15:1;;;31535:18;;;31528:43;126756:15:0;;126787:5;;:15;;31420:18:1;;126787:38:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;18785:103::-;18023:13;:11;:13::i;:::-;18850:30:::1;18877:1;18850:18;:30::i;:::-;18785:103::o:0;84513:98::-;84569:13;84598:7;84591:14;;;;;:::i;135576:194::-;18023:13;:11;:13::i;:::-;135686:5:::1;::::0;:32:::1;::::0;-1:-1:-1;;;135686:32:0;;-1:-1:-1;;;;;135686:5:0;;::::1;::::0;:22:::1;::::0;:32:::1;::::0;135709:8;;;;135686:32:::1;;;:::i;:::-;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;135743:8;;135732:32;;;;;;;:::i;:::-;;::::0;;;;::::1;::::0;;135753:10:::1;1884:51:1::0;;135732:32:0;::::1;::::0;1872:2:1;1857:18;135732:32:0::1;;;;;;;;135576:194:::0;;:::o;85937:149::-;86028:52;16926:10;86061:8;86071;86028:18;:52::i;:::-;85937:149;;:::o;97974:2232::-;98102:21;98132:18;;98309:16;;;;:20;98305:60;;98338:27;;-1:-1:-1;;;98338:27:0;;;;;;;;;;;98305:60;98587:2;98563:14;;;;:5;:14;:::i;:::-;:21;;:26;:102;;;-1:-1:-1;;;;98607:14:0;;;;:5;:14;:::i;:::-;:21;;98625:2;;98622;;98607:21;:::i;:::-;98600:29;;;:::i;:::-;-1:-1:-1;;;;;;98600:65:0;;;98563:102;98551:175;;;98689:29;;-1:-1:-1;;;98689:29:0;;;;;;;;;;;98551:175;98832:39;;;98869:1;98832:39;;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;;;;;;;98832:39:0;;;;;;;;;;;;;;;98810:61;;98903:39;;;;;;;;98934:4;-1:-1:-1;;;;;98903:39:0;;;;;98940:1;98903:39;;;98878:19;98898:1;98878:22;;;;;;;;:::i;:::-;;;;;;;;;;:64;98984:33;99040:14;;;;:5;:14;:::i;:::-;99021:77;;;;;;;:::i;:::-;98979:119;;;;99178:25;99206:44;99226:16;99244:5;99206:19;:44::i;:::-;99178:72;;99315:14;99332:29;99355:5;99332:22;:29::i;:::-;99315:46;;99420:13;99436:57;99451:5;:14;;;99467:17;99486:6;99436:14;:57::i;:::-;99420:73;;7135:6;99632:5;:20;;;:55;99628:115;;99704:5;99711:10;;;;:5;:10;:::i;:::-;99723:19;99696:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;99696:47:0;;-1:-1:-1;99696:47:0;;-1:-1:-1;99696:47:0;;-1:-1:-1;99696:47:0;;-1:-1:-1;;;;;;;;;99696:47:0;99628:115;99871:275;99896:5;99946:149;99975:17;100007:54;100041:20;;;;7135:6;100007:54;:::i;:::-;100076:6;99946:14;:149::i;:::-;99912:183;;:20;;;;:183;:::i;:::-;7135:6;99871:14;:275::i;:::-;100155:10;;;;:5;:10;:::i;:::-;100174:19;99855:345;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;99855:345:0;;-1:-1:-1;99855:345:0;;-1:-1:-1;99855:345:0;;-1:-1:-1;;;;;;;;;;97974:2232:0;;;;;;:::o;137098:1177::-;137281:17;;137309:9;;137281:38;;-1:-1:-1;;;137281:38:0;;;;;3680:25:1;;;;137243:35:0;;-1:-1:-1;;;;;137281:17:0;;:27;;3653:18:1;;137281:38:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;12419:22;;;;;;-1:-1:-1;121739:10:0;;121748:1;121738:16;;;121737:23;137373:195;;137537:31;;-1:-1:-1;;;137537:31:0;;;;;;;;;;;137373:195;137655:5;;:44;;-1:-1:-1;;;137655:44:0;;;;;34351:25:1;;;34392:18;;;34385:34;;;137626:26:0;;-1:-1:-1;;;;;137655:5:0;;:27;;34324:18:1;;137655:44:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;137655:44:0;;;;;;;;;;;;:::i;:::-;137804:5;;:56;;-1:-1:-1;;;137804:56:0;;137845:4;137804:56;;;28312:51:1;28379:18;;;28372:34;;;137626:73:0;;-1:-1:-1;137768:33:0;;-1:-1:-1;;;;;137804:5:0;;;;:32;;28285:18:1;;137804:56:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;137768:92;;137929:16;137959:10;137954:316;137976:6;137971:2;:11;137954:316;;;138034:9;138044:2;138034:13;;;;;;;;:::i;:::-;;;;;;;138023:24;;138084:42;138090:25;138117:8;138084:5;:42::i;:::-;138142:75;;138206:10;1884:51:1;;-1:-1:-1;;;;;138142:75:0;;;138170:7;;138160:8;;138142:75;;1872:2:1;1857:18;138142:75:0;;;;;;;138249:4;;137954:316;;;;137172:1103;;;;137098:1177;;:::o;86978:280::-;87127:41;16926:10;87160:7;87127:18;:41::i;:::-;87122:85;;87177:30;;-1:-1:-1;;;87177:30:0;;;;;;;;;;;87122:85;87214:38;87228:4;87234:2;87238:7;87247:4;87214:13;:38::i;129773:1714::-;130264:10;;-1:-1:-1;;;;;130264:10:0;130255:4;130247:27;130243:41;;130276:8;;;130243:41;130337:5;;-1:-1:-1;;;;;130337:5:0;130329:28;130325:42;;130359:8;;;130325:42;130411:65;130437:10;130449;130461:5;130468:7;130411:25;:65::i;:::-;130485:17;:38;;-1:-1:-1;;;;;130485:38:0;;;-1:-1:-1;;;;;;130485:38:0;;;;;;;130530:5;:14;;;;;;;;;;;130569:17;;;;130551:15;:35;130611:17;;;;130593:15;:35;130644:15;;;;130635:6;:24;;;;;;;;;;;130712:22;;:27;130708:66;;130741:33;;-1:-1:-1;;;130741:33:0;;-1:-1:-1;;;;;130741:23:0;;;;;:33;;130765:8;;130741:33;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;130708:66;130829:26;;:31;130825:78;;130862:41;;-1:-1:-1;;;130862:41:0;;-1:-1:-1;;;;;130862:27:0;;;;;:41;;130890:12;;130862:41;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;130825:78;-1:-1:-1;;;;;130964:52:0;;;130960:116;;131025:51;;-1:-1:-1;;;131025:51:0;;-1:-1:-1;;;;;1902:32:1;;;131025:51:0;;;1884::1;131025:32:0;;;;;1857:18:1;;131025:51:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;130960:116;131131:14;;:21;:25;131127:68;;131180:14;;131158:37;;-1:-1:-1;;;131158:37:0;;-1:-1:-1;;;;;131158:21:0;;;;;:37;;131180:14;131158:37;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;131158:37:0;;;;;;;;;;;;:::i;:::-;;131127:68;131249:31;;;:70;;;131291:6;:28;;;131249:70;:112;;;;131330:6;:31;;;131249:112;131237:158;;;131369:26;;;-1:-1:-1;;;131369:26:0;;37274:13:1;;37267:21;37260:29;131369:26:0;;;37242:48:1;37360:4;37348:17;;37342:24;37335:32;37328:40;37306:20;;;37299:70;37427:17;;;37421:24;37414:32;37407:40;37385:20;;;37378:70;-1:-1:-1;;;;;131369:18:0;;;;;37215::1;;131369:26:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;131237:158;131451:30;131470:10;131451:18;:30::i;:::-;129773:1714;;;;;;;;;;;:::o;127177:682::-;127351:1;127322:17;;;:7;:17;;;;;;127243:13;;-1:-1:-1;;;;;127322:17:0;127318:46;;-1:-1:-1;;127355:9:0;;;;;;;;;-1:-1:-1;127355:9:0;;;127177:682::o;127318:46::-;127450:5;;:39;;-1:-1:-1;;;127450:39:0;;127483:4;127450:39;;;1884:51:1;127418:29:0;;-1:-1:-1;;;;;127450:5:0;;:24;;1857:18:1;;127450:39:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;127418:71;-1:-1:-1;;;;;;127580:32:0;;;127576:71;;127621:26;;-1:-1:-1;;;127621:26:0;;;;;3680:25:1;;;-1:-1:-1;;;;;127621:16:0;;;;;3653:18:1;;127621:26:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;127621:26:0;;;;;;;;;;;;:::i;:::-;127614:33;127177:682;-1:-1:-1;;;127177:682:0:o;127576:71::-;127752:5;;:30;;-1:-1:-1;;;127752:30:0;;127776:4;127752:30;;;1884:51:1;127721:13:0;;:20;;-1:-1:-1;;;;;127752:5:0;;;;:15;;1857:18:1;;127752:30:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;127752:30:0;;;;;;;;;;;;:::i;:::-;127793:5;;:51;;-1:-1:-1;;;127793:51:0;;127828:4;127793:51;;;28312::1;28379:18;;;28372:34;;;-1:-1:-1;;;;;127793:5:0;;;;:26;;28285:18:1;;127793:51:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;127721:132;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;135988:218;18023:13;:11;:13::i;:::-;136106:5:::1;::::0;:40:::1;::::0;-1:-1:-1;;;136106:40:0;;-1:-1:-1;;;;;136106:5:0;;::::1;::::0;:26:::1;::::0;:40:::1;::::0;136133:12;;;;136106:40:::1;;;:::i;:::-;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;136175:12;;136160:40;;;;;;;:::i;:::-;;::::0;;;;::::1;::::0;;136189:10:::1;1884:51:1::0;;136160:40:0;::::1;::::0;1872:2:1;1857:18;136160:40:0::1;1738:203:1::0;97011:505:0;97349:12;;;;97156:18;;97375:10;;;;97349:5;97375:10;:::i;:::-;97368:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;97368:17:0;;-1:-1:-1;97444:1:0;;-1:-1:-1;97414:32:0;;-1:-1:-1;;97414:32:0;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;;;;;;;97414:32:0;;;;;;;;;;;;;;;;97392:54;;97478:32;;;;;;;;97502:4;-1:-1:-1;;;;;97478:32:0;;;;;97508:1;97478:32;;;97453:19;97473:1;97453:22;;;;;;;;:::i;:::-;;;;;;:57;;;;97011:505;;;;;:::o;102517:513::-;102624:9;;102794;:14;;;:92;;-1:-1:-1;102820:9:0;;:66;;-1:-1:-1;;;102820:66:0;;;;;24446:25:1;;;102874:10:0;24487:18:1;;;24480:60;-1:-1:-1;;;;;102820:9:0;;;;:22;;24419:18:1;;102820:66:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;102819:67;102794:92;:132;;;;102916:10;102897:5;:15;;;:29;;102794:132;102782:182;;;102941:23;;-1:-1:-1;;;102941:23:0;;;;;;;;;;;102782:182;103002:22;103018:5;103002:15;:22::i;135141:270::-;18023:13;:11;:13::i;:::-;135271:5:::1;::::0;:60:::1;::::0;-1:-1:-1;;;135271:60:0;;-1:-1:-1;;;;;1902:32:1;;;135271:60:0::1;::::0;::::1;1884:51:1::0;135271:5:0;;::::1;::::0;:46:::1;::::0;1857:18:1;;135271:60:0::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;-1:-1:-1::0;;135345:60:0::1;::::0;135394:10:::1;1884:51:1::0;;-1:-1:-1;;;;;135345:60:0;::::1;::::0;-1:-1:-1;135345:60:0::1;::::0;-1:-1:-1;1872:2:1;1857:18;135345:60:0::1;1738:203:1::0;127996:124:0;128080:5;;:34;;-1:-1:-1;;;128080:34:0;;128108:4;128080:34;;;1884:51:1;128051:13:0;;-1:-1:-1;;;;;128080:5:0;;:19;;1857:18:1;;128080:34:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;128080:34:0;;;;;;;;;;;;:::i;:::-;128073:41;;127996:124;:::o;86149:186::-;-1:-1:-1;;;;;86294:25:0;;;86271:4;86294:25;;;:18;:25;;;;;;;;:35;;;;;;;;;;;;;;;86149:186::o;19043:201::-;18023:13;:11;:13::i;:::-;-1:-1:-1;;;;;19132:22:0;::::1;19124:73;;;::::0;-1:-1:-1;;;19124:73:0;;39091:2:1;19124:73:0::1;::::0;::::1;39073:21:1::0;39130:2;39110:18;;;39103:30;39169:34;39149:18;;;39142:62;-1:-1:-1;;;39220:18:1;;;39213:36;39266:19;;19124:73:0::1;;;;;;;;;19208:28;19227:8;19208:18;:28::i;:::-;19043:201:::0;:::o;133646:1196::-;18023:13;:11;:13::i;:::-;133887:11;134009:16;134071:27;;134067:351:::1;;134145:5;::::0;:43:::1;::::0;-1:-1:-1;;;134145:43:0;;-1:-1:-1;;;;;134145:5:0;;::::1;::::0;:25:::1;::::0;:43:::1;::::0;134171:16;;;;134145:43:::1;;;:::i;:::-;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;134249:10;134244:167;134266:22;134261:2;:27;134244:167;;;134319:16;;134336:2;134319:20;;;;;;;:::i;:::-;134308:44;::::0;134341:10:::1;1884:51:1::0;;134319:20:0::1;::::0;;::::1;::::0;;;::::1;;::::0;134308:44:::1;::::0;-1:-1:-1;1857:18:1;134308:44:0::1;;;;;;;134386:4;;134244:167;;;;134067:351;134453:24:::0;;134449:388:::1;;134568:5;::::0;:33:::1;::::0;-1:-1:-1;;;134568:33:0;;134535:30:::1;::::0;-1:-1:-1;;;;;134568:5:0::1;::::0;:20:::1;::::0;:33:::1;::::0;134589:11;;;;134568:33:::1;;;:::i;:::-;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;::::0;;::::1;-1:-1:-1::0;;134568:33:0::1;::::0;::::1;;::::0;::::1;::::0;;;::::1;::::0;::::1;:::i;:::-;134535:66;;134660:10;134655:175;134677:19;134672:2;:24;134655:175;;;134724:13;134738:2;134724:17;;;;;;;;:::i;:::-;;;;;;;134716:55;134743:11;;134755:2;134743:15;;;;;;;:::i;:::-;;;;;;134760:10;134716:55;;;;;;;:::i;:::-;;;;;;;;134805:4;;134655:175;;;;134479:358;134449:388;133790:1052;;133646:1196:::0;;;;:::o;100667:455::-;100795:4;-1:-1:-1;;;;;;100825:48:0;;-1:-1:-1;;;100825:48:0;;:118;;-1:-1:-1;;;;;;;100884:59:0;;-1:-1:-1;;;100884:59:0;100825:118;:177;;;-1:-1:-1;;;;;;;100954:48:0;;-1:-1:-1;;;100954:48:0;100825:177;:243;;;-1:-1:-1;;;;;;;101013:55:0;;-1:-1:-1;;;101013:55:0;100825:243;:291;;;;101079:37;101103:12;101079:23;:37::i;91923:124::-;88726:4;88746:16;;;:7;:16;;;;;;-1:-1:-1;;;;;88746:16:0;91993:48;;92023:18;;-1:-1:-1;;;92023:18:0;;;;;;;;;;;91266:164;91337:24;;;;:15;:24;;;;;:29;;-1:-1:-1;;;;;;91337:29:0;-1:-1:-1;;;;;91337:29:0;;;;;;;;:24;;91387:23;91337:24;91387:14;:23::i;:::-;-1:-1:-1;;;;;91378:46:0;;;;;;;;;;;91266:164;;:::o;88933:291::-;89046:4;89062:13;89078:23;89093:7;89078:14;:23::i;:::-;89062:39;;89127:5;-1:-1:-1;;;;;89116:16:0;:7;-1:-1:-1;;;;;89116:16:0;;:59;;;;89143:32;89160:5;89167:7;89143:16;:32::i;:::-;89116:101;;;;89210:7;-1:-1:-1;;;;;89186:31:0;:20;89198:7;89186:11;:20::i;:::-;-1:-1:-1;;;;;89186:31:0;;89116:101;89108:110;88933:291;-1:-1:-1;;;;88933:291:0:o;90672:487::-;90809:4;-1:-1:-1;;;;;90782:31:0;:23;90797:7;90782:14;:23::i;:::-;-1:-1:-1;;;;;90782:31:0;;90778:61;;90822:17;;-1:-1:-1;;;90822:17:0;;;;;;;;;;;90778:61;-1:-1:-1;;;;;90850:16:0;;90846:55;;90875:26;;-1:-1:-1;;;90875:26:0;;;;;;;;;;;90846:55;90910:39;90931:4;90937:2;90941:7;90910:20;:39::i;:::-;91006:29;91023:1;91027:7;91006:8;:29::i;:::-;91044:16;;;;:7;:16;;;;;;:21;;-1:-1:-1;;;;;;91044:21:0;-1:-1:-1;;;;;91044:21:0;;;;;;;;;91079:27;;91044:16;;91079:27;;;;;;;91115:38;91135:4;91141:2;91145:7;91115:19;:38::i;18302:132::-;18210:6;;-1:-1:-1;;;;;18210:6:0;16926:10;18366:23;18358:68;;;;-1:-1:-1;;;18358:68:0;;42258:2:1;18358:68:0;;;42240:21:1;;;42277:18;;;42270:30;42336:34;42316:18;;;42309:62;42388:18;;18358:68:0;42056:356:1;90001:358:0;90057:13;90073:23;90088:7;90073:14;:23::i;:::-;90057:39;;90105:48;90126:5;90141:1;90145:7;90105:20;:48::i;:::-;90186:29;90203:1;90207:7;90186:8;:29::i;:::-;90231:16;;;;:7;:16;;;;;;90224:23;;-1:-1:-1;;;;;;90224:23:0;;;90261:36;90239:7;;90231:16;-1:-1:-1;;;;;90261:36:0;;;;;90231:16;;90261:36;90306:47;90326:5;90341:1;90345:7;90306:19;:47::i;143458:135::-;143560:5;;:27;;-1:-1:-1;;;143560:27:0;;-1:-1:-1;;;;;143560:5:0;;;;:16;;:27;;143577:9;;143560:27;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;143458:135;:::o;89442:352::-;-1:-1:-1;;;;;89514:16:0;;89510:43;;89539:14;;-1:-1:-1;;;89539:14:0;;;;;;;;;;;89510:43;88726:4;88746:16;;;:7;:16;;;;;;-1:-1:-1;;;;;88746:16:0;:30;89560:44;;89589:15;;-1:-1:-1;;;89589:15:0;;;;;;;;;;;89560:44;89613:45;89642:1;89646:2;89650:7;89613:20;:45::i;:::-;89667:16;;;;:7;:16;;;;;;:21;;-1:-1:-1;;;;;;89667:21:0;-1:-1:-1;;;;;89667:21:0;;;;;;;;89702:33;;89667:16;;;89702:33;;89667:16;;89702:33;89744:44;89772:1;89776:2;89780:7;89744:19;:44::i;19404:191::-;19497:6;;;-1:-1:-1;;;;;19514:17:0;;;-1:-1:-1;;;;;;19514:17:0;;;;;;;19547:40;;19497:6;;;19514:17;19497:6;;19547:40;;19478:16;;19547:40;19467:128;19404:191;:::o;91561:281::-;91694:8;-1:-1:-1;;;;;91685:17:0;:5;-1:-1:-1;;;;;91685:17:0;;91681:49;;91711:19;;-1:-1:-1;;;91711:19:0;;;;;;;;;;;91681:49;-1:-1:-1;;;;;91737:25:0;;;;;;;:18;:25;;;;;;;;:35;;;;;;;;;;;;;:46;;-1:-1:-1;;91737:46:0;;;;;;;;;;91795:41;;636::1;;;91795::0;;609:18:1;91795:41:0;;;;;;;91561:281;;;:::o;146317:233::-;146494:5;;:50;;-1:-1:-1;;;146494:50:0;;146468:7;;-1:-1:-1;;;;;146494:5:0;;:24;;:50;;146527:4;;146534:9;;146494:50;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;146684:200::-;146836:5;;:42;;-1:-1:-1;;;146836:42:0;;146872:4;146836:42;;;1884:51:1;146810:7:0;;-1:-1:-1;;;;;146836:5:0;;:27;;1857:18:1;;146836:42:0;1738:203:1;46985:4067:0;47101:14;;;-1:-1:-1;;47597:1:0;47594;47587:20;47637:1;47634;47630:9;47621:18;;47689:5;47685:2;47682:13;47674:5;47670:2;47666:14;47662:34;47653:43;;;47783:5;47792:1;47783:10;47779:143;;47856:11;47848:5;:19;;;;;:::i;:::-;;47839:28;;47897:13;;;;47779:143;48032:11;48023:5;:20;48019:103;;48067:43;;-1:-1:-1;;;48067:43:0;;;;;34351:25:1;;;34392:18;;;34385:34;;;34324:18;;48067:43:0;34177:248:1;48019:103:0;48364:17;48490:11;48487:1;48484;48477:25;49928:1;49909;49047;49032:12;;:16;;49017:32;;49158:25;;;;49909:15;;;49908:21;;50165;;;50161:25;;50150:36;50235:21;;;50231:25;;50220:36;50306:21;;;50302:25;;50291:36;50377:21;;;50373:25;;50362:36;50448:21;;;50444:25;;50433:36;50520:21;;;50516:25;;;50505:36;48999:15;49430;;;49426:29;;;49422:37;;;48599:20;;;48588:32;;;49552:15;;;;48643:21;;49265:19;;;;49543:24;;;;50990:15;;46985:4067;-1:-1:-1;;;;46985:4067:0:o;88101:265::-;88235:28;88245:4;88251:2;88255:7;88235:9;:28::i;:::-;88275:47;88298:4;88304:2;88308:7;88317:4;88275:22;:47::i;:::-;88270:90;;88331:29;;-1:-1:-1;;;88331:29:0;;;;;;;;;;;101654:251;101805:34;101824:5;101831:7;101805:18;:34::i;:::-;-1:-1:-1;;101848:9:0;:22;;;;101877:9;:22;;-1:-1:-1;;;;;;101877:22:0;-1:-1:-1;;;;;101877:22:0;;;;;;;;;101654:251::o;139777:3515::-;139938:15;;139888:14;;139913:21;;;;:40;139909:328;;-1:-1:-1;139964:18:0;;;;139909:328;;;139998:6;;-1:-1:-1;;;;;139998:6:0;:31;139994:243;;140105:15;;140047:171;;140072:18;;;;;140101:19;;:2;:19;:::i;:::-;140131:6;;140170:15;;140187:21;140131:78;-1:-1:-1;;;140131:78:0;;140147:21;;;;140131:78;;;44488:25:1;44529:18;;;44522:34;;;;140187:21:0;;;;44572:18:1;;;44565:34;-1:-1:-1;;;;;140131:6:0;;;;:15;;44461:18:1;;140131:78:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;140047:14;:171::i;:::-;140038:180;;139994:243;140324:16;140343:9;140324:16;140353:17;;;;;;;;:::i;:::-;-1:-1:-1;;;;;140343:28:0;;;;;;;;;;;;-1:-1:-1;140343:28:0;;;;;-1:-1:-1;140518:6:0;;140731:17;;;;;;;;:::i;:::-;-1:-1:-1;;;;;140716:32:0;:11;;;;:5;:11;:::i;:::-;-1:-1:-1;;;;;140716:32:0;;140712:128;;140771:27;;;;140712:128;;;-1:-1:-1;140832:8:0;140712:128;140999:30;;141573:2;141549:14;;;;:5;:14;:::i;:::-;:21;;:26;:102;;;;-1:-1:-1;;;;141593:14:0;;;;:5;:14;:::i;:::-;:21;;141611:2;;141608;;141593:21;:::i;:::-;141586:29;;;:::i;:::-;-1:-1:-1;;;;;;141586:65:0;;141549:102;141537:1005;;;141763:14;141853:30;142025:14;;;;:5;:14;:::i;:::-;142004:109;;;;;;;:::i;:::-;141925:188;;-1:-1:-1;141925:188:0;-1:-1:-1;141925:188:0;;-1:-1:-1;141925:188:0;-1:-1:-1;;142161:199:0;;;-1:-1:-1;142161:199:0;;-1:-1:-1;142161:199:0;142257:33;;;142226:9;:28;142236:17;;;;;;;;:::i;:::-;-1:-1:-1;;;;;142226:28:0;;;;;;;;;;;;-1:-1:-1;142226:28:0;:64;-1:-1:-1;;;;;;;;;139777:3515:0:o;142161:199::-;142419:21;;:26;142415:119;;142474:60;142483:15;142500:14;142516:17;;;;;;;;:::i;:::-;142474:8;:60::i;:::-;142456:78;;142415:119;141659:883;;141537:1005;142624:20;;142620:666;;142673:121;142706:15;142732:17;;;;;;;;:::i;:::-;142760:25;142673:22;:121::i;:::-;142655:139;-1:-1:-1;142809:20:0;;142805:388;;142927:14;142923:41;;;142950:14;;-1:-1:-1;;;142950:14:0;;;;;;;;;;;142923:41;143063:33;;;143032:9;:28;143042:17;;;;;;;;:::i;:::-;-1:-1:-1;;;;;143032:28:0;;;;;;;;;;;;-1:-1:-1;143032:28:0;:64;142620:666;;142805:388;143130:15;143118:8;:27;143114:79;;143178:15;143147:9;:28;143157:17;;;;;;;;:::i;143114:79::-;142620:666;;;143223:15;143211:8;:27;143207:79;;143271:15;143240:9;:28;143250:17;;;;;;;;:::i;:::-;-1:-1:-1;;;;;143240:28:0;;;;;;;;;;;;-1:-1:-1;143240:28:0;:46;139849:3443;;;;;;139777:3515;:::o;83538:309::-;83665:4;-1:-1:-1;;;;;;83695:40:0;;-1:-1:-1;;;83695:40:0;;:99;;-1:-1:-1;;;;;;;83746:48:0;;-1:-1:-1;;;83746:48:0;83695:99;:146;;;-1:-1:-1;;;;;;;;;;82053:40:0;;;83805:36;81944:157;147183:1176;-1:-1:-1;;;;;147384:19:0;;;147380:917;;147478:5;;:44;;-1:-1:-1;;;147478:44:0;;147506:4;147478:44;;;28312:51:1;28379:18;;;28372:34;;;147453:22:0;;-1:-1:-1;;;;;147478:5:0;;:19;;28285:18:1;;147478:44:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;147453:69;;147589:5;:23;;;147585:431;;;147731:17;;147759:9;;147731:38;;-1:-1:-1;;;147731:38:0;;;;;3680:25:1;;;;147693:35:0;;-1:-1:-1;;;;;147731:17:0;;:27;;3653:18:1;;147731:38:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;147693:76;-1:-1:-1;;;;;;147798:17:0;;;;;;:171;;-1:-1:-1;12419:22:0;;;;12445:3;12419:29;121629:1;121621:9;;;121620:16;147830:139;147782:224;;;147988:18;;-1:-1:-1;;;147988:18:0;;;;;;;;;;;147782:224;147614:402;147585:431;148177:5;;:43;;-1:-1:-1;;;148177:43:0;;148204:4;148177:43;;;28312:51:1;28379:18;;;28372:34;;;148232:1:0;;-1:-1:-1;;;;;148177:5:0;;:18;;28285::1;;148177:43:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;;;;;148177:57:0;;148173:116;;148245:5;;:44;;-1:-1:-1;;;148245:44:0;;;;;24446:25:1;;;-1:-1:-1;;;;;24507:32:1;;;24487:18;;;24480:60;148245:5:0;;;;:27;;24419:18:1;;148245:44:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;148642:528;148832:5;;:44;;-1:-1:-1;;;148832:44:0;;148860:4;148832:44;;;28312:51:1;28379:18;;;28372:34;;;148807:22:0;;-1:-1:-1;;;;;148832:5:0;;:19;;28285:18:1;;148832:44:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;148914:5;;148942:8;;148914:49;;-1:-1:-1;;;148914:49:0;;;;;47694:25:1;;;;-1:-1:-1;;;;;47793:15:1;;;47773:18;;;47766:43;47845:15;;;47825:18;;;47818:43;148942:8:0;;-1:-1:-1;148914:5:0;;;:27;;47667:18:1;;148914:49:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;149117:47;85320:334;92589:707;92725:4;-1:-1:-1;;;;;92742:13:0;;71738:19;:23;92738:553;;92772:71;;-1:-1:-1;;;92772:71:0;;-1:-1:-1;;;;;92772:36:0;;;;;:71;;16926:10;;92823:4;;92829:7;;92838:4;;92772:71;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;-1:-1:-1;92772:71:0;;;;;;;;-1:-1:-1;;92772:71:0;;;;;;;;;;;;:::i;:::-;;;92768:482;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;93009:6;:13;93026:1;93009:18;93005:236;;93049:29;;-1:-1:-1;;;93049:29:0;;;;;;;;;;;93005:236;93209:6;93203:13;93194:6;93190:2;93186:15;93179:38;92768:482;-1:-1:-1;;;;;;92904:51:0;-1:-1:-1;;;92904:51:0;;-1:-1:-1;92897:58:0;;92738:553;-1:-1:-1;93279:4:0;92589:707;;;;;;:::o;83350:124::-;83431:5;:13;83439:5;83431;:13;:::i;:::-;-1:-1:-1;83451:7:0;:17;83461:7;83451;:17;:::i;145045:1012::-;145391:5;;:95;;-1:-1:-1;;;145391:95:0;;145170:22;;145243:26;;-1:-1:-1;;;;;145391:5:0;;;;:16;;:95;;145416:7;;145432:12;;145170:22;;145391:95;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;145391:95:0;;;;;;;;;;;;:::i;:::-;145566:16;;145361:125;;-1:-1:-1;145361:125:0;;-1:-1:-1;145543:20:0;;145721:331;145743:12;145738:2;:17;145721:331;;;145836:9;145846:2;145836:13;;;;;;;;:::i;:::-;;;;;;;145825:24;;145887:29;145893:12;145907:8;145887:5;:29::i;:::-;145965:12;-1:-1:-1;;;;;145932:67:0;145947:12;145960:2;145947:16;;;;;;;;:::i;:::-;;;;;;;145932:67;;145937:8;145932:67;145979:7;145988:10;145932:67;;;;;;24446:25:1;;;-1:-1:-1;;;;;24507:32:1;24502:2;24487:18;;24480:60;24434:2;24419:18;;24245:301;145932:67:0;;;;;;;;146031:4;;145721:331;;;;145194:863;;;145045:1012;;;;;:::o;143910:762::-;144263:5;;:42;;-1:-1:-1;;;144263:42:0;;;;;3680:25:1;;;144037:22:0;;;;;;-1:-1:-1;;;;;144263:5:0;;:33;;3653:18:1;;144263:42:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;144225:80;-1:-1:-1;144225:80:0;;-1:-1:-1;144225:80:0;-1:-1:-1;144381:1:0;144369:13;;;144365:150;;144442:11;144438:39;;;144462:15;;-1:-1:-1;;;144462:15:0;;;;;;;;;;;144438:39;144486:21;;;;144365:150;144548:29;144554:12;144568:8;144548:5;:29::i;:::-;-1:-1:-1;;;;;144591:75:0;;144606:7;144596:8;144591:75;144629:24;144639:14;144629:7;:24;:::i;:::-;144591:75;;;24446:25:1;;;144655:10:0;24502:2:1;24487:18;;24480:60;24419:18;144591:75:0;;;;;;;144061:611;;143910:762;;;;;:::o;14:131:1:-;-1:-1:-1;;;;;;88:32:1;;78:43;;68:71;;135:1;132;125:12;150:245;208:6;261:2;249:9;240:7;236:23;232:32;229:52;;;277:1;274;267:12;229:52;316:9;303:23;335:30;359:5;335:30;:::i;688:250::-;773:1;783:113;797:6;794:1;791:13;783:113;;;873:11;;;867:18;854:11;;;847:39;819:2;812:10;783:113;;;-1:-1:-1;;930:1:1;912:16;;905:27;688:250::o;943:271::-;985:3;1023:5;1017:12;1050:6;1045:3;1038:19;1066:76;1135:6;1128:4;1123:3;1119:14;1112:4;1105:5;1101:16;1066:76;:::i;:::-;1196:2;1175:15;-1:-1:-1;;1171:29:1;1162:39;;;;1203:4;1158:50;;943:271;-1:-1:-1;;943:271:1:o;1219:220::-;1368:2;1357:9;1350:21;1331:4;1388:45;1429:2;1418:9;1414:18;1406:6;1388:45;:::i;1444:180::-;1503:6;1556:2;1544:9;1535:7;1531:23;1527:32;1524:52;;;1572:1;1569;1562:12;1524:52;-1:-1:-1;1595:23:1;;1444:180;-1:-1:-1;1444:180:1:o;1946:131::-;-1:-1:-1;;;;;2021:31:1;;2011:42;;2001:70;;2067:1;2064;2057:12;2082:134;2150:20;;2179:31;2150:20;2179:31;:::i;:::-;2082:134;;;:::o;2221:315::-;2289:6;2297;2350:2;2338:9;2329:7;2325:23;2321:32;2318:52;;;2366:1;2363;2356:12;2318:52;2405:9;2392:23;2424:31;2449:5;2424:31;:::i;:::-;2474:5;2526:2;2511:18;;;;2498:32;;-1:-1:-1;;;2221:315:1:o;2541:456::-;2618:6;2626;2634;2687:2;2675:9;2666:7;2662:23;2658:32;2655:52;;;2703:1;2700;2693:12;2655:52;2742:9;2729:23;2761:31;2786:5;2761:31;:::i;:::-;2811:5;-1:-1:-1;2868:2:1;2853:18;;2840:32;2881:33;2840:32;2881:33;:::i;:::-;2541:456;;2933:7;;-1:-1:-1;;;2987:2:1;2972:18;;;;2959:32;;2541:456::o;3002:275::-;3089:6;3142:2;3130:9;3121:7;3117:23;3113:32;3110:52;;;3158:1;3155;3148:12;3110:52;3197:9;3184:23;3216:31;3241:5;3216:31;:::i;3716:670::-;3857:6;3865;3918:2;3906:9;3897:7;3893:23;3889:32;3886:52;;;3934:1;3931;3924:12;3886:52;3974:9;3961:23;-1:-1:-1;;;;;4044:2:1;4036:6;4033:14;4030:34;;;4060:1;4057;4050:12;4030:34;4098:6;4087:9;4083:22;4073:32;;4143:7;4136:4;4132:2;4128:13;4124:27;4114:55;;4165:1;4162;4155:12;4114:55;4205:2;4192:16;4231:2;4223:6;4220:14;4217:34;;;4247:1;4244;4237:12;4217:34;4300:7;4295:2;4285:6;4282:1;4278:14;4274:2;4270:23;4266:32;4263:45;4260:65;;;4321:1;4318;4311:12;4260:65;4352:2;4344:11;;;;;4374:6;;-1:-1:-1;3716:670:1;;-1:-1:-1;;;;3716:670:1:o;4391:164::-;4459:5;4504:3;4495:6;4490:3;4486:16;4482:26;4479:46;;;4521:1;4518;4511:12;4479:46;-1:-1:-1;4543:6:1;4391:164;-1:-1:-1;4391:164:1:o;4560:372::-;4654:6;4707:2;4695:9;4686:7;4682:23;4678:32;4675:52;;;4723:1;4720;4713:12;4675:52;4763:9;4750:23;-1:-1:-1;;;;;4788:6:1;4785:30;4782:50;;;4828:1;4825;4818:12;4782:50;4851:75;4918:7;4909:6;4898:9;4894:22;4851:75;:::i;4937:403::-;5036:8;5046:6;5100:3;5093:4;5085:6;5081:17;5077:27;5067:55;;5118:1;5115;5108:12;5067:55;-1:-1:-1;5141:20:1;;-1:-1:-1;;;;;5173:30:1;;5170:50;;;5216:1;5213;5206:12;5170:50;5253:4;5245:6;5241:17;5229:29;;5313:3;5306:4;5296:6;5293:1;5289:14;5281:6;5277:27;5273:38;5270:47;5267:67;;;5330:1;5327;5320:12;5267:67;4937:403;;;;;:::o;5345:520::-;5478:6;5486;5539:2;5527:9;5518:7;5514:23;5510:32;5507:52;;;5555:1;5552;5545:12;5507:52;5595:9;5582:23;-1:-1:-1;;;;;5620:6:1;5617:30;5614:50;;;5660:1;5657;5650:12;5614:50;5699:106;5797:7;5788:6;5777:9;5773:22;5699:106;:::i;:::-;5824:8;;5673:132;;-1:-1:-1;5345:520:1;-1:-1:-1;;;;5345:520:1:o;6107:607::-;6201:6;6209;6217;6270:2;6258:9;6249:7;6245:23;6241:32;6238:52;;;6286:1;6283;6276:12;6238:52;6326:9;6313:23;-1:-1:-1;;;;;6351:6:1;6348:30;6345:50;;;6391:1;6388;6381:12;6345:50;6430:106;6528:7;6519:6;6508:9;6504:22;6430:106;:::i;:::-;6555:8;;-1:-1:-1;6404:132:1;-1:-1:-1;;6640:2:1;6625:18;;6612:32;6653:31;6612:32;6653:31;:::i;:::-;6703:5;6693:15;;;6107:607;;;;;:::o;6719:435::-;6772:3;6810:5;6804:12;6837:6;6832:3;6825:19;6863:4;6892:2;6887:3;6883:12;6876:19;;6929:2;6922:5;6918:14;6950:1;6960:169;6974:6;6971:1;6968:13;6960:169;;;7035:13;;7023:26;;7069:12;;;;7104:15;;;;6996:1;6989:9;6960:169;;;-1:-1:-1;7145:3:1;;6719:435;-1:-1:-1;;;;;6719:435:1:o;7159:261::-;7338:2;7327:9;7320:21;7301:4;7358:56;7410:2;7399:9;7395:18;7387:6;7358:56;:::i;7667:592::-;7738:6;7746;7799:2;7787:9;7778:7;7774:23;7770:32;7767:52;;;7815:1;7812;7805:12;7767:52;7855:9;7842:23;-1:-1:-1;;;;;7925:2:1;7917:6;7914:14;7911:34;;;7941:1;7938;7931:12;7911:34;7979:6;7968:9;7964:22;7954:32;;8024:7;8017:4;8013:2;8009:13;8005:27;7995:55;;8046:1;8043;8036:12;7995:55;8086:2;8073:16;8112:2;8104:6;8101:14;8098:34;;;8128:1;8125;8118:12;8098:34;8173:7;8168:2;8159:6;8155:2;8151:15;8147:24;8144:37;8141:57;;;8194:1;8191;8184:12;8264:118;8350:5;8343:13;8336:21;8329:5;8326:32;8316:60;;8372:1;8369;8362:12;8387:128;8452:20;;8481:28;8452:20;8481:28;:::i;8520:382::-;8585:6;8593;8646:2;8634:9;8625:7;8621:23;8617:32;8614:52;;;8662:1;8659;8652:12;8614:52;8701:9;8688:23;8720:31;8745:5;8720:31;:::i;:::-;8770:5;-1:-1:-1;8827:2:1;8812:18;;8799:32;8840:30;8799:32;8840:30;:::i;:::-;8889:7;8879:17;;;8520:382;;;;;:::o;9287:1062::-;9638:6;9627:9;9620:25;9601:4;9664:2;9702;9697;9686:9;9682:18;9675:30;9728:45;9769:2;9758:9;9754:18;9746:6;9728:45;:::i;:::-;9830:22;;;9792:2;9810:18;;;9803:50;;;;9902:13;;9924:22;;;10000:15;;;;9962;;;10033:1;10043:280;10057:6;10054:1;10051:13;10043:280;;;10116:13;;10158:9;;-1:-1:-1;;;;;10154:35:1;10142:48;;10230:11;;10224:18;10210:12;;;10203:40;10298:15;;;;10263:12;;;;10186:1;10072:9;10043:280;;;-1:-1:-1;10340:3:1;;9287:1062;-1:-1:-1;;;;;;;;;9287:1062:1:o;10354:248::-;10422:6;10430;10483:2;10471:9;10462:7;10458:23;10454:32;10451:52;;;10499:1;10496;10489:12;10451:52;-1:-1:-1;;10522:23:1;;;10592:2;10577:18;;;10564:32;;-1:-1:-1;10354:248:1:o;10607:127::-;10668:10;10663:3;10659:20;10656:1;10649:31;10699:4;10696:1;10689:15;10723:4;10720:1;10713:15;10739:253;10811:2;10805:9;10853:4;10841:17;;-1:-1:-1;;;;;10873:34:1;;10909:22;;;10870:62;10867:88;;;10935:18;;:::i;:::-;10971:2;10964:22;10739:253;:::o;10997:255::-;11069:2;11063:9;11111:6;11099:19;;-1:-1:-1;;;;;11133:34:1;;11169:22;;;11130:62;11127:88;;;11195:18;;:::i;11257:252::-;11329:2;11323:9;11371:3;11359:16;;-1:-1:-1;;;;;11390:34:1;;11426:22;;;11387:62;11384:88;;;11452:18;;:::i;11514:252::-;11586:2;11580:9;11628:3;11616:16;;-1:-1:-1;;;;;11647:34:1;;11683:22;;;11644:62;11641:88;;;11709:18;;:::i;11771:275::-;11842:2;11836:9;11907:2;11888:13;;-1:-1:-1;;11884:27:1;11872:40;;-1:-1:-1;;;;;11927:34:1;;11963:22;;;11924:62;11921:88;;;11989:18;;:::i;:::-;12025:2;12018:22;11771:275;;-1:-1:-1;11771:275:1:o;12051:186::-;12099:4;-1:-1:-1;;;;;12124:6:1;12121:30;12118:56;;;12154:18;;:::i;:::-;-1:-1:-1;12220:2:1;12199:15;-1:-1:-1;;12195:29:1;12226:4;12191:40;;12051:186::o;12242:336::-;12306:5;12335:52;12351:35;12379:6;12351:35;:::i;:::-;12335:52;:::i;:::-;12326:61;;12410:6;12403:5;12396:21;12450:3;12441:6;12436:3;12432:16;12429:25;12426:45;;;12467:1;12464;12457:12;12426:45;12516:6;12511:3;12504:4;12497:5;12493:16;12480:43;12570:1;12563:4;12554:6;12547:5;12543:18;12539:29;12532:40;12242:336;;;;;:::o;12583:794::-;12678:6;12686;12694;12702;12755:3;12743:9;12734:7;12730:23;12726:33;12723:53;;;12772:1;12769;12762:12;12723:53;12811:9;12798:23;12830:31;12855:5;12830:31;:::i;:::-;12880:5;-1:-1:-1;12937:2:1;12922:18;;12909:32;12950:33;12909:32;12950:33;:::i;:::-;13002:7;-1:-1:-1;13056:2:1;13041:18;;13028:32;;-1:-1:-1;13111:2:1;13096:18;;13083:32;-1:-1:-1;;;;;13127:30:1;;13124:50;;;13170:1;13167;13160:12;13124:50;13193:22;;13246:4;13238:13;;13234:27;-1:-1:-1;13224:55:1;;13275:1;13272;13265:12;13224:55;13298:73;13363:7;13358:2;13345:16;13340:2;13336;13332:11;13298:73;:::i;:::-;13288:83;;;12583:794;;;;;;;:::o;13382:221::-;13425:5;13478:3;13471:4;13463:6;13459:17;13455:27;13445:55;;13496:1;13493;13486:12;13445:55;13518:79;13593:3;13584:6;13571:20;13564:4;13556:6;13552:17;13518:79;:::i;13608:198::-;13683:4;-1:-1:-1;;;;;13708:6:1;13705:30;13702:56;;;13738:18;;:::i;:::-;-1:-1:-1;13783:1:1;13779:14;13795:4;13775:25;;13608:198::o;13811:175::-;13878:20;;13938:22;13927:34;;13917:45;;13907:73;;13976:1;13973;13966:12;13991:167;14058:20;;14118:14;14107:26;;14097:37;;14087:65;;14148:1;14145;14138:12;14163:165;14230:20;;14290:12;14279:24;;14269:35;;14259:63;;14318:1;14315;14308:12;14333:159;14400:20;;14460:6;14449:18;;14439:29;;14429:57;;14482:1;14479;14472:12;14497:2200;14562:5;14592:4;14633:2;14621:9;14616:3;14612:19;14608:28;14605:48;;;14649:1;14646;14639:12;14605:48;14671:22;;:::i;:::-;14662:31;;14729:9;14716:23;-1:-1:-1;;;;;14754:6:1;14751:30;14748:50;;;14794:1;14791;14784:12;14748:50;14817:22;;14870:4;14862:13;;14858:23;-1:-1:-1;14848:51:1;;14895:1;14892;14885:12;14848:51;14931:2;14918:16;14953:4;14977:75;14993:58;15048:2;14993:58;:::i;14977:75::-;15086:15;;;15148:6;15189:11;;;15181:20;;15177:29;;;15117:12;;;;15074:3;15218:15;;;15215:35;;;15246:1;15243;15236:12;15215:35;15270:11;;;;15290:1171;15306:6;15301:3;15298:15;15290:1171;;;15382:2;15376:3;15371;15367:13;15363:22;15360:112;;;15426:1;15455:2;15451;15444:14;15360:112;15500:22;;:::i;:::-;15551;15569:3;15551:22;:::i;:::-;15542:7;15535:39;15612:31;15639:2;15634:3;15630:12;15612:31;:::i;:::-;15607:2;15598:7;15594:16;15587:57;15667:2;15707:31;15734:2;15729:3;15725:12;15707:31;:::i;:::-;15689:16;;;15682:57;15762:2;15802:31;15820:12;;;15802:31;:::i;:::-;15784:16;;;15777:57;15872:31;15890:12;;;15872:31;:::i;:::-;15867:2;15858:7;15854:16;15847:57;15927:3;15968:32;15996:2;15991:3;15987:12;15968:32;:::i;:::-;15950:16;;;15943:58;16025:3;16080:13;;;16067:27;16048:17;;;16041:54;16119:3;16161:30;16177:13;;;16161:30;:::i;:::-;16142:17;;;16135:57;16216:3;16258:30;16274:13;;;16258:30;:::i;:::-;16239:17;;;16232:57;16313:3;16355:30;16371:13;;;16355:30;:::i;:::-;16336:17;;;16329:57;16399:20;;15323:12;;;;16439;;;;15290:1171;;;-1:-1:-1;16470:20:1;;-1:-1:-1;16535:18:1;;;16522:32;16506:14;;;16499:56;-1:-1:-1;;;16615:2:1;16600:18;;;16587:32;16571:14;;;16564:56;16652:38;16686:2;16671:18;;16652:38;:::i;:::-;16647:2;16640:5;16636:14;16629:62;14497:2200;;;;:::o;16702:757::-;16765:5;16813:4;16801:9;16796:3;16792:19;16788:30;16785:50;;;16831:1;16828;16821:12;16785:50;16864:2;16858:9;16906:4;16898:6;16894:17;16977:6;16965:10;16962:22;-1:-1:-1;;;;;16929:10:1;16926:34;16923:62;16920:88;;;16988:18;;:::i;:::-;17024:2;17017:22;17057:6;-1:-1:-1;17057:6:1;17087:23;;17119:30;17087:23;17119:30;:::i;:::-;17158:23;;17233:2;17218:18;;17205:32;17246:30;17205:32;17246:30;:::i;:::-;17304:2;17292:15;;17285:32;17369:2;17354:18;;17341:32;17382:30;17341:32;17382:30;:::i;:::-;17440:2;17428:15;;;;17421:32;16702:757;;-1:-1:-1;;16702:757:1:o;17464:1771::-;17835:6;17843;17851;17859;17867;17875;17883;17891;17899;17907;17915:7;17969:3;17957:9;17948:7;17944:23;17940:33;17937:53;;;17986:1;17983;17976:12;17937:53;18022:9;18009:23;17999:33;;18051:38;18085:2;18074:9;18070:18;18051:38;:::i;:::-;18041:48;;-1:-1:-1;;;;;18175:2:1;18169;18158:9;18154:18;18141:32;18138:40;18135:60;;;18191:1;18188;18181:12;18135:60;18214:76;18282:7;18275:2;18264:9;18260:18;18247:32;18236:9;18232:48;18214:76;:::i;:::-;18204:86;;18339:2;18333;18322:9;18318:18;18305:32;18302:40;18299:60;;;18355:1;18352;18345:12;18299:60;18378:76;18446:7;18439:2;18428:9;18424:18;18411:32;18400:9;18396:48;18378:76;:::i;:::-;18368:86;;18473:39;18507:3;18496:9;18492:19;18473:39;:::i;:::-;18463:49;;18562:2;18555:3;18544:9;18540:19;18527:33;18524:41;18521:61;;;18578:1;18575;18568:12;18521:61;18601:77;18670:7;18662:3;18651:9;18647:19;18634:33;18623:9;18619:49;18601:77;:::i;:::-;18591:87;;18697:39;18731:3;18720:9;18716:19;18697:39;:::i;:::-;18687:49;;18786:2;18779:3;18768:9;18764:19;18751:33;18748:41;18745:61;;;18802:1;18799;18792:12;18745:61;18825:77;18894:7;18886:3;18875:9;18871:19;18858:33;18847:9;18843:49;18825:77;:::i;:::-;18815:87;;18952:2;18945:3;18934:9;18930:19;18917:33;18914:41;18911:61;;;18968:1;18965;18958:12;18911:61;;18991:96;19079:7;19071:3;19060:9;19056:19;19043:33;19032:9;19028:49;18991:96;:::i;:::-;18981:106;;19106:39;19140:3;19129:9;19125:19;19106:39;:::i;:::-;19096:49;;19165:64;19221:7;19215:3;19204:9;19200:19;19165:64;:::i;:::-;19154:75;;17464:1771;;;;;;;;;;;;;;:::o;19695:395::-;19789:6;19842:2;19830:9;19821:7;19817:23;19813:32;19810:52;;;19858:1;19855;19848:12;19810:52;19898:9;19885:23;-1:-1:-1;;;;;19923:6:1;19920:30;19917:50;;;19963:1;19960;19953:12;19917:50;19986:22;;20042:3;20024:16;;;20020:26;20017:46;;;20059:1;20056;20049:12;21148:392;21239:6;21292:2;21280:9;21271:7;21267:23;21263:32;21260:52;;;21308:1;21305;21298:12;21260:52;21348:9;21335:23;-1:-1:-1;;;;;21373:6:1;21370:30;21367:50;;;21413:1;21410;21403:12;21367:50;21436:22;;21492:3;21474:16;;;21470:26;21467:46;;;21509:1;21506;21499:12;21545:388;21613:6;21621;21674:2;21662:9;21653:7;21649:23;21645:32;21642:52;;;21690:1;21687;21680:12;21642:52;21729:9;21716:23;21748:31;21773:5;21748:31;:::i;:::-;21798:5;-1:-1:-1;21855:2:1;21840:18;;21827:32;21868:33;21827:32;21868:33;:::i;21938:1012::-;22095:6;22103;22111;22119;22172:2;22160:9;22151:7;22147:23;22143:32;22140:52;;;22188:1;22185;22178:12;22140:52;22228:9;22215:23;-1:-1:-1;;;;;22298:2:1;22290:6;22287:14;22284:34;;;22314:1;22311;22304:12;22284:34;22352:6;22341:9;22337:22;22327:32;;22397:7;22390:4;22386:2;22382:13;22378:27;22368:55;;22419:1;22416;22409:12;22368:55;22459:2;22446:16;22485:2;22477:6;22474:14;22471:34;;;22501:1;22498;22491:12;22471:34;22561:7;22554:4;22544:6;22536;22532:19;22528:2;22524:28;22520:39;22517:52;22514:72;;;22582:1;22579;22572:12;22514:72;22613:4;22605:13;;;;-1:-1:-1;22637:6:1;-1:-1:-1;22681:20:1;;;22668:34;;22714:16;;;22711:36;;;22743:1;22740;22733:12;22711:36;;22782:108;22882:7;22871:8;22860:9;22856:24;22782:108;:::i;:::-;21938:1012;;;;-1:-1:-1;22909:8:1;-1:-1:-1;;;;21938:1012:1:o;22955:380::-;23034:1;23030:12;;;;23077;;;23098:61;;23152:4;23144:6;23140:17;23130:27;;23098:61;23205:2;23197:6;23194:14;23174:18;23171:38;23168:161;;23251:10;23246:3;23242:20;23239:1;23232:31;23286:4;23283:1;23276:15;23314:4;23311:1;23304:15;23576:127;23637:10;23632:3;23628:20;23625:1;23618:31;23668:4;23665:1;23658:15;23692:4;23689:1;23682:15;23708:532;23820:6;23873:2;23861:9;23852:7;23848:23;23844:32;23841:52;;;23889:1;23886;23879:12;23841:52;23922:2;23916:9;23964:2;23956:6;23952:15;24033:6;24021:10;24018:22;-1:-1:-1;;;;;23985:10:1;23982:34;23979:62;23976:88;;;24044:18;;:::i;:::-;24080:2;24073:22;24119:23;;24104:39;;24204:2;24189:18;;;24176:32;24159:15;;;24152:57;;;;-1:-1:-1;24111:6:1;23708:532;-1:-1:-1;23708:532:1:o;24551:132::-;24627:13;;24649:28;24627:13;24649:28;:::i;24688:245::-;24755:6;24808:2;24796:9;24787:7;24783:23;24779:32;24776:52;;;24824:1;24821;24814:12;24776:52;24856:9;24850:16;24875:28;24897:5;24875:28;:::i;24938:521::-;25015:4;25021:6;25081:11;25068:25;25175:2;25171:7;25160:8;25144:14;25140:29;25136:43;25116:18;25112:68;25102:96;;25194:1;25191;25184:12;25102:96;25221:33;;25273:20;;;-1:-1:-1;;;;;;25305:30:1;;25302:50;;;25348:1;25345;25338:12;25302:50;25381:4;25369:17;;-1:-1:-1;25412:14:1;25408:27;;;25398:38;;25395:58;;;25449:1;25446;25439:12;25464:331;25569:9;25580;25622:8;25610:10;25607:24;25604:44;;;25644:1;25641;25634:12;25604:44;25673:6;25663:8;25660:20;25657:40;;;25693:1;25690;25683:12;25657:40;-1:-1:-1;;25719:23:1;;;25764:25;;;;;-1:-1:-1;25464:331:1:o;25800:323::-;-1:-1:-1;;;;;;25920:19:1;;25996:11;;;;26027:1;26019:10;;26016:101;;;26104:2;26098;26091:3;26088:1;26084:11;26081:1;26077:19;26073:28;26069:2;26065:37;26061:46;26052:55;;26016:101;;;25800:323;;;;:::o;26128:1107::-;26229:6;26237;26245;26298:2;26286:9;26277:7;26273:23;26269:32;26266:52;;;26314:1;26311;26304:12;26266:52;26350:9;26337:23;26327:33;;26379:2;26431;26420:9;26416:18;26403:32;26444:30;26468:5;26444:30;:::i;:::-;26493:5;-1:-1:-1;26549:2:1;26534:18;;26521:32;-1:-1:-1;;;;;26565:30:1;;26562:50;;;26608:1;26605;26598:12;26562:50;26631:22;;26684:4;26676:13;;26672:27;-1:-1:-1;26662:55:1;;26713:1;26710;26703:12;26662:55;26749:2;26736:16;26772:75;26788:58;26843:2;26788:58;:::i;26772:75::-;26881:15;;;26963:1;26959:10;;;;26951:19;;26947:28;;;26912:12;;;;26987:19;;;26984:39;;;27019:1;27016;27009:12;26984:39;27043:11;;;;27063:142;27079:6;27074:3;27071:15;27063:142;;;27145:17;;27133:30;;27096:12;;;;27183;;;;27063:142;;;27224:5;27214:15;;;;;;;26128:1107;;;;;:::o;27240:344::-;27353:4;27411:11;27398:25;27505:2;27501:7;27490:8;27474:14;27470:29;27466:43;27446:18;27442:68;27432:96;;27524:1;27521;27514:12;27432:96;27545:33;;;;;27240:344;-1:-1:-1;;27240:344:1:o;27589:544::-;27681:4;27687:6;27747:11;27734:25;27841:2;27837:7;27826:8;27810:14;27806:29;27802:43;27782:18;27778:68;27768:96;;27860:1;27857;27850:12;27768:96;27887:33;;27939:20;;;-1:-1:-1;;;;;;27971:30:1;;27968:50;;;28014:1;28011;28004:12;27968:50;28047:4;28035:17;;-1:-1:-1;28098:1:1;28094:14;;;28078;28074:35;28064:46;;28061:66;;;28123:1;28120;28113:12;28417:138;28496:13;;28518:31;28496:13;28518:31;:::i;28560:251::-;28630:6;28683:2;28671:9;28662:7;28658:23;28654:32;28651:52;;;28699:1;28696;28689:12;28651:52;28731:9;28725:16;28750:31;28775:5;28750:31;:::i;28911:773::-;29171:25;;;29159:2;29215;29233:18;;;29226:30;;;29144:18;;;29291:22;;;29111:4;;29371:6;;29344:3;29329:19;;29111:4;29405:194;29419:6;29416:1;29413:13;29405:194;;;29511:6;29484:25;29502:6;29484:25;:::i;:::-;29480:38;29468:51;;29574:15;;;;29539:12;;;;29441:1;29434:9;29405:194;;;29409:3;29616;29608:11;;;;;29669:6;29662:14;29655:22;29650:2;29639:9;29635:18;29628:50;28911:773;;;;;;;:::o;29689:674::-;29754:5;29807:3;29800:4;29792:6;29788:17;29784:27;29774:55;;29825:1;29822;29815:12;29774:55;29854:6;29848:13;29880:4;29904:75;29920:58;29975:2;29920:58;:::i;29904:75::-;30013:15;;;30099:1;30095:10;;;;30083:23;;30079:32;;;30044:12;;;;30123:15;;;30120:35;;;30151:1;30148;30141:12;30120:35;30187:2;30179:6;30175:15;30199:135;30215:6;30210:3;30207:15;30199:135;;;30281:10;;30269:23;;30312:12;;;;30232;;30199:135;;;-1:-1:-1;30352:5:1;29689:674;-1:-1:-1;;;;;;29689:674:1:o;30368:424::-;30472:6;30480;30533:2;30521:9;30512:7;30508:23;30504:32;30501:52;;;30549:1;30546;30539:12;30501:52;30582:9;30576:16;-1:-1:-1;;;;;30607:6:1;30604:30;30601:50;;;30647:1;30644;30637:12;30601:50;30670:72;30734:7;30725:6;30714:9;30710:22;30670:72;:::i;:::-;30660:82;;;30782:2;30771:9;30767:18;30761:25;30751:35;;30368:424;;;;;:::o;30797:184::-;30855:6;30908:2;30896:9;30887:7;30883:23;30879:32;30876:52;;;30924:1;30921;30914:12;30876:52;30947:28;30965:9;30947:28;:::i;31582:184::-;31652:6;31705:2;31693:9;31684:7;31680:23;31676:32;31673:52;;;31721:1;31718;31711:12;31673:52;-1:-1:-1;31744:16:1;;31582:184;-1:-1:-1;31582:184:1:o;31771:390::-;31930:2;31919:9;31912:21;31969:6;31964:2;31953:9;31949:18;31942:34;32026:6;32018;32013:2;32002:9;31998:18;31985:48;32082:1;32053:22;;;32077:2;32049:31;;;32042:42;;;;32145:2;32124:15;;;-1:-1:-1;;32120:29:1;32105:45;32101:54;;31771:390;-1:-1:-1;31771:390:1:o;32166:273::-;32351:6;32343;32338:3;32325:33;32307:3;32377:16;;32402:13;;;32377:16;32166:273;-1:-1:-1;32166:273:1:o;32971:127::-;33032:10;33027:3;33023:20;33020:1;33013:31;33063:4;33060:1;33053:15;33087:4;33084:1;33077:15;33103:128;33170:9;;;33191:11;;;33188:37;;;33205:18;;:::i;33236:125::-;33301:9;;;33322:10;;;33319:36;;;33335:18;;:::i;33366:806::-;33466:6;33519:3;33507:9;33498:7;33494:23;33490:33;33487:53;;;33536:1;33533;33526:12;33487:53;33562:22;;:::i;:::-;33613:9;33607:16;33600:5;33593:31;33677:2;33666:9;33662:18;33656:25;33651:2;33644:5;33640:14;33633:49;33735:2;33724:9;33720:18;33714:25;33709:2;33702:5;33698:14;33691:49;33793:2;33782:9;33778:18;33772:25;33767:2;33760:5;33756:14;33749:49;33852:3;33841:9;33837:19;33831:26;33825:3;33818:5;33814:15;33807:51;33912:3;33901:9;33897:19;33891:26;33885:3;33878:5;33874:15;33867:51;33972:3;33961:9;33957:19;33951:26;33945:3;33938:5;33934:15;33927:51;34011:50;34056:3;34045:9;34041:19;34011:50;:::i;:::-;34005:3;33994:15;;33987:75;34081:3;34122:18;;;34116:25;34100:14;;;34093:49;;;;-1:-1:-1;33998:5:1;33366:806;-1:-1:-1;33366:806:1:o;34430:363::-;34525:6;34578:2;34566:9;34557:7;34553:23;34549:32;34546:52;;;34594:1;34591;34584:12;34546:52;34627:9;34621:16;-1:-1:-1;;;;;34652:6:1;34649:30;34646:50;;;34692:1;34689;34682:12;34646:50;34715:72;34779:7;34770:6;34759:9;34755:22;34715:72;:::i;35113:1910::-;35350:2;35402:21;;;35472:13;;35375:18;;;35494:22;;;35321:4;;35350:2;35535;;35553:18;;;;35594:15;;;35321:4;35637:1360;35651:6;35648:1;35645:13;35637:1360;;;35710:13;;35754:9;;34874:22;34863:34;34851:47;;35808:11;;;35802:18;34985:14;34974:26;35865:12;;;34962:39;35919:11;;;35913:18;35088:12;35077:24;35978:12;;;35065:37;36014:4;36059:11;;;36053:18;28892:6;28881:18;;;36118:12;;;28869:31;;;;36154:4;36199:11;;;36193:18;28881;;;36258:12;;;28869:31;36294:4;36339:11;;;36333:18;-1:-1:-1;;;;;1695:31:1;36399:12;;;1683:44;36435:4;36479:11;;;36473:18;36459:12;;;36452:40;36515:4;36560:11;;;36554:18;470:13;463:21;36617:12;;;451:34;36653:6;36700:11;;;36694:18;470:13;463:21;36757:12;;;451:34;36794:6;36841:12;;;36835:19;470:13;463:21;36899:13;;;451:34;36942:6;36933:16;;;;36972:15;;;;35673:1;35666:9;35637:1360;;;-1:-1:-1;37014:3:1;;35113:1910;-1:-1:-1;;;;;;;35113:1910:1:o;37743:648::-;37823:6;37876:2;37864:9;37855:7;37851:23;37847:32;37844:52;;;37892:1;37889;37882:12;37844:52;37925:9;37919:16;-1:-1:-1;;;;;37950:6:1;37947:30;37944:50;;;37990:1;37987;37980:12;37944:50;38013:22;;38066:4;38058:13;;38054:27;-1:-1:-1;38044:55:1;;38095:1;38092;38085:12;38044:55;38124:2;38118:9;38149:48;38165:31;38193:2;38165:31;:::i;38149:48::-;38220:2;38213:5;38206:17;38260:7;38255:2;38250;38246;38242:11;38238:20;38235:33;38232:53;;;38281:1;38278;38271:12;38232:53;38294:67;38358:2;38353;38346:5;38342:14;38337:2;38333;38329:11;38294:67;:::i;:::-;38380:5;37743:648;-1:-1:-1;;;;;37743:648:1:o;38585:299::-;38770:2;38759:9;38752:21;38733:4;38790:45;38831:2;38820:9;38816:18;38808:6;38790:45;:::i;:::-;38782:53;;38871:6;38866:2;38855:9;38851:18;38844:34;38585:299;;;;;:::o;39296:443::-;39485:2;39467:21;;;39504:18;;39497:34;;;-1:-1:-1;;;;;;39543:31:1;;39540:51;;;39587:1;39584;39577:12;39540:51;39621:6;39618:1;39614:14;39678:6;39670;39665:2;39654:9;39650:18;39637:48;39706:22;;;;39730:2;39702:31;;39296:443;-1:-1:-1;;;39296:443:1:o;39744:1215::-;39822:48;39866:3;39840:24;39858:5;39840:24;:::i;:::-;34874:22;34863:34;34851:47;;34798:106;39822:48;39899:35;39928:4;39921:5;39917:16;39899:35;:::i;:::-;34985:14;34974:26;39984:4;39975:14;;34962:39;40021:35;40050:4;40039:16;;40021:35;:::i;:::-;35088:12;35077:24;40108:4;40099:14;;35065:37;40145:35;40174:4;40163:16;;40145:35;:::i;:::-;28892:6;28881:18;40232:4;40223:14;;28869:31;40269:35;40298:4;40287:16;;40269:35;:::i;:::-;28892:6;28881:18;40356:4;40347:14;;28869:31;40393:36;40423:4;40412:16;;40393:36;:::i;:::-;-1:-1:-1;;;;;1695:31:1;40482:4;40473:14;;1683:44;40544:4;40533:16;;;40520:30;40504:14;;;40497:54;40582:33;40609:4;40598:16;;40582:33;:::i;:::-;470:13;463:21;40665:4;40656:14;;451:34;40690:6;40727:31;40743:14;;;40727:31;:::i;:::-;470:13;463:21;40799:12;;;451:34;40831:6;40868:31;40884:14;;;40868:31;:::i;:::-;470:13;;463:21;40940:12;;;451:34;40908:45;400:91;40964:702;41232:2;41244:21;;;41217:18;;41300:22;;;41184:4;41379:6;41353:2;41338:18;;41184:4;41413:227;41427:6;41424:1;41421:13;41413:227;;;41476:55;41527:3;41519:6;41476:55;:::i;:::-;41554:6;41615:15;;;;41580:12;;;;;41449:1;41442:9;41413:227;;;-1:-1:-1;41657:3:1;40964:702;-1:-1:-1;;;;;40964:702:1:o;41671:380::-;41901:3;41886:19;;41914:61;41890:9;41957:6;41914:61;:::i;:::-;-1:-1:-1;;;;;42012:32:1;;;;42006:3;41991:19;;;;41984:61;41671:380;;-1:-1:-1;41671:380:1:o;42417:358::-;-1:-1:-1;;;;;42624:32:1;;42606:51;;42693:2;42688;42673:18;;42666:30;;;-1:-1:-1;;42713:56:1;;42750:18;;42742:6;42713:56;:::i;42780:127::-;42841:10;42836:3;42832:20;42829:1;42822:31;42872:4;42869:1;42862:15;42896:4;42893:1;42886:15;42912:422;43001:1;43044:5;43001:1;43058:270;43079:7;43069:8;43066:21;43058:270;;;43138:4;43134:1;43130:6;43126:17;43120:4;43117:27;43114:53;;;43147:18;;:::i;:::-;43197:7;43187:8;43183:22;43180:55;;;43217:16;;;;43180:55;43296:22;;;;43256:15;;;;43058:270;;;43062:3;42912:422;;;;;:::o;43339:806::-;43388:5;43418:8;43408:80;;-1:-1:-1;43459:1:1;43473:5;;43408:80;43507:4;43497:76;;-1:-1:-1;43544:1:1;43558:5;;43497:76;43589:4;43607:1;43602:59;;;;43675:1;43670:130;;;;43582:218;;43602:59;43632:1;43623:10;;43646:5;;;43670:130;43707:3;43697:8;43694:17;43691:43;;;43714:18;;:::i;:::-;-1:-1:-1;;43770:1:1;43756:16;;43785:5;;43582:218;;43884:2;43874:8;43871:16;43865:3;43859:4;43856:13;43852:36;43846:2;43836:8;43833:16;43828:2;43822:4;43819:12;43815:35;43812:77;43809:159;;;-1:-1:-1;43921:19:1;;;43953:5;;43809:159;44000:34;44025:8;44019:4;44000:34;:::i;:::-;44070:6;44066:1;44062:6;44058:19;44049:7;44046:32;44043:58;;;44081:18;;:::i;:::-;44119:20;;43339:806;-1:-1:-1;;;43339:806:1:o;44150:131::-;44210:5;44239:36;44266:8;44260:4;44239:36;:::i;44610:1588::-;44737:6;44745;44753;44761;44769;44777;44785;44838:3;44826:9;44817:7;44813:23;44809:33;44806:53;;;44855:1;44852;44845:12;44806:53;44891:9;44878:23;44868:33;;44920:2;44969;44958:9;44954:18;44941:32;44931:42;;45023:2;45012:9;45008:18;44995:32;45036:30;45060:5;45036:30;:::i;:::-;45085:5;-1:-1:-1;45142:2:1;45127:18;;45114:32;45155:30;45114:32;45155:30;:::i;:::-;45204:7;-1:-1:-1;45263:3:1;45248:19;;45235:33;45277:30;45235:33;45277:30;:::i;:::-;45326:7;-1:-1:-1;45385:3:1;45370:19;;45357:33;45399:30;45357:33;45399:30;:::i;:::-;45448:7;-1:-1:-1;45506:3:1;45491:19;;45478:33;-1:-1:-1;;;;;45523:30:1;;45520:50;;;45566:1;45563;45556:12;45520:50;45589:22;;45642:4;45634:13;;45630:27;-1:-1:-1;45620:55:1;;45671:1;45668;45661:12;45620:55;45707:2;45694:16;45730:75;45746:58;45801:2;45746:58;:::i;45730:75::-;45839:15;;;45921:1;45917:10;;;;45909:19;;45905:28;;;45870:12;;;;45945:19;;;45942:39;;;45977:1;45974;45967:12;45942:39;46001:11;;;;46021:147;46037:6;46032:3;46029:15;46021:147;;;46103:22;46121:3;46103:22;:::i;:::-;46091:35;;46054:12;;;;46146;;;;46021:147;;;46187:5;46177:15;;;;;;;44610:1588;;;;;;;;;;:::o;46203:1005::-;46300:6;46353:3;46341:9;46332:7;46328:23;46324:33;46321:53;;;46370:1;46367;46360:12;46321:53;46396:22;;:::i;:::-;46447:9;46441:16;46434:5;46427:31;46511:2;46500:9;46496:18;46490:25;46485:2;46478:5;46474:14;46467:49;46569:2;46558:9;46554:18;46548:25;46543:2;46536:5;46532:14;46525:49;46627:2;46616:9;46612:18;46606:25;46601:2;46594:5;46590:14;46583:49;46686:3;46675:9;46671:19;46665:26;46659:3;46652:5;46648:15;46641:51;46746:3;46735:9;46731:19;46725:26;46719:3;46712:5;46708:15;46701:51;46806:3;46795:9;46791:19;46785:26;46779:3;46772:5;46768:15;46761:51;46845:50;46890:3;46879:9;46875:19;46845:50;:::i;:::-;46839:3;46828:15;;46821:75;46915:3;46956:18;;;46950:25;46934:14;;;46927:49;46995:3;47030:46;47057:18;;;47030:46;:::i;:::-;47014:14;;;47007:70;47096:3;47131:46;47158:18;;;47131:46;:::i;:::-;47115:14;;;47108:70;47119:5;46203:1005;-1:-1:-1;;;46203:1005:1:o;47872:489::-;-1:-1:-1;;;;;48141:15:1;;;48123:34;;48193:15;;48188:2;48173:18;;48166:43;48240:2;48225:18;;48218:34;;;48288:3;48283:2;48268:18;;48261:31;;;48066:4;;48309:46;;48335:19;;48327:6;48309:46;:::i;:::-;48301:54;47872:489;-1:-1:-1;;;;;;47872:489:1:o;48366:249::-;48435:6;48488:2;48476:9;48467:7;48463:23;48459:32;48456:52;;;48504:1;48501;48494:12;48456:52;48536:9;48530:16;48555:30;48579:5;48555:30;:::i;48746:545::-;48848:2;48843:3;48840:11;48837:448;;;48884:1;48909:5;48905:2;48898:17;48954:4;48950:2;48940:19;49024:2;49012:10;49008:19;49005:1;49001:27;48995:4;48991:38;49060:4;49048:10;49045:20;49042:47;;;-1:-1:-1;49083:4:1;49042:47;49138:2;49133:3;49129:12;49126:1;49122:20;49116:4;49112:31;49102:41;;49193:82;49211:2;49204:5;49201:13;49193:82;;;49256:17;;;49237:1;49226:13;49193:82;;49467:1352;49593:3;49587:10;-1:-1:-1;;;;;49612:6:1;49609:30;49606:56;;;49642:18;;:::i;:::-;49671:97;49761:6;49721:38;49753:4;49747:11;49721:38;:::i;:::-;49715:4;49671:97;:::i;:::-;49823:4;;49887:2;49876:14;;49904:1;49899:663;;;;50606:1;50623:6;50620:89;;;-1:-1:-1;50675:19:1;;;50669:26;50620:89;-1:-1:-1;;49424:1:1;49420:11;;;49416:24;49412:29;49402:40;49448:1;49444:11;;;49399:57;50722:81;;49869:944;;49899:663;48693:1;48686:14;;;48730:4;48717:18;;-1:-1:-1;;49935:20:1;;;50053:236;50067:7;50064:1;50061:14;50053:236;;;50156:19;;;50150:26;50135:42;;50248:27;;;;50216:1;50204:14;;;;50083:19;;50053:236;;;50057:3;50317:6;50308:7;50305:19;50302:201;;;50378:19;;;50372:26;-1:-1:-1;;50461:1:1;50457:14;;;50473:3;50453:24;50449:37;50445:42;50430:58;50415:74;;50302:201;-1:-1:-1;;;;;50549:1:1;50533:14;;;50529:22;50516:36;;-1:-1:-1;49467:1352:1:o;50824:796::-;51014:4;51062:2;51051:9;51047:18;51092:6;51081:9;51074:25;51118:2;51156;51151;51140:9;51136:18;51129:30;51179:6;51214;51208:13;51245:6;51237;51230:22;51283:3;51272:9;51268:19;51261:26;;51322:2;51314:6;51310:15;51296:29;;51343:1;51353:182;51367:6;51364:1;51361:13;51353:182;;;51432:13;;51447:6;51428:26;51416:39;;51510:15;;;;51475:12;;;;51389:1;51382:9;51353:182;;;51357:3;;51552;51544:11;;;;;51605:6;51598:14;51591:22;51586:2;51575:9;51571:18;51564:50;50824:796;;;;;;:::o;51625:306::-;51713:6;51721;51729;51782:2;51770:9;51761:7;51757:23;51753:32;51750:52;;;51798:1;51795;51788:12;51750:52;51827:9;51821:16;51811:26;;51877:2;51866:9;51862:18;51856:25;51846:35;;51921:2;51910:9;51906:18;51900:25;51890:35;;51625:306;;;;;:::o

Swarm Source

ipfs://e5129db4159b86468e429faf03c71c5a272db0792e4849874d6bf1834c5761ed
Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.