ETH Price: $3,412.42 (+3.52%)

Contract

0x5FfDc86FBd6B13156B4b9200870c5e44b64589Dd
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

Please try again later

Latest 1 internal transaction

Advanced mode:
Parent Transaction Hash Block From To
208318012024-09-26 2:28:5960 days ago1727317739  Contract Creation0 ETH
Loading...
Loading

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

Contract Name:
UniswapV3Pool

Compiler Version
v0.7.6+commit.7338295f

Optimization Enabled:
Yes with 800 runs

Other Settings:
default evmVersion, None license
File 1 of 31 : UniswapV3Pool.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity =0.7.6;

import './interfaces/IUniswapV3Pool.sol';

import './NoDelegateCall.sol';

import './libraries/LowGasSafeMath.sol';
import './libraries/SafeCast.sol';
import './libraries/Tick.sol';
import './libraries/TickBitmap.sol';
import './libraries/Position.sol';
import './libraries/Oracle.sol';

import './libraries/FullMath.sol';
import './libraries/FixedPoint128.sol';
import './libraries/TransferHelper.sol';
import './libraries/TickMath.sol';
import './libraries/LiquidityMath.sol';
import './libraries/SqrtPriceMath.sol';
import './libraries/SwapMath.sol';

import './interfaces/IUniswapV3PoolDeployer.sol';
import './interfaces/IUniswapV3Factory.sol';
import './interfaces/IERC20Minimal.sol';
import './interfaces/callback/IUniswapV3MintCallback.sol';
import './interfaces/callback/IUniswapV3SwapCallback.sol';
import './interfaces/callback/IUniswapV3FlashCallback.sol';

contract UniswapV3Pool is IUniswapV3Pool, NoDelegateCall {
    using LowGasSafeMath for uint256;
    using LowGasSafeMath for int256;
    using SafeCast for uint256;
    using SafeCast for int256;
    using Tick for mapping(int24 => Tick.Info);
    using TickBitmap for mapping(int16 => uint256);
    using Position for mapping(bytes32 => Position.Info);
    using Position for Position.Info;
    using Oracle for Oracle.Observation[65535];

    /// @inheritdoc IUniswapV3PoolImmutables
    address public immutable override factory;
    /// @inheritdoc IUniswapV3PoolImmutables
    address public immutable override token0;
    /// @inheritdoc IUniswapV3PoolImmutables
    address public immutable override token1;
    /// @inheritdoc IUniswapV3PoolImmutables
    uint24 public immutable override fee;

    /// @inheritdoc IUniswapV3PoolImmutables
    int24 public immutable override tickSpacing;

    /// @inheritdoc IUniswapV3PoolImmutables
    uint128 public immutable override maxLiquidityPerTick;

    struct Slot0 {
        // the current price
        uint160 sqrtPriceX96;
        // the current tick
        int24 tick;
        // the most-recently updated index of the observations array
        uint16 observationIndex;
        // the current maximum number of observations that are being stored
        uint16 observationCardinality;
        // the next maximum number of observations to store, triggered in observations.write
        uint16 observationCardinalityNext;
        // the current protocol fee as a percentage of the swap fee taken on withdrawal
        // represented as an integer denominator (1/x)%
        uint8 feeProtocol;
        // whether the pool is locked
        bool unlocked;
    }
    /// @inheritdoc IUniswapV3PoolState
    Slot0 public override slot0;

    /// @inheritdoc IUniswapV3PoolState
    uint256 public override feeGrowthGlobal0X128;
    /// @inheritdoc IUniswapV3PoolState
    uint256 public override feeGrowthGlobal1X128;

    // accumulated protocol fees in token0/token1 units
    struct ProtocolFees {
        uint128 token0;
        uint128 token1;
    }
    /// @inheritdoc IUniswapV3PoolState
    ProtocolFees public override protocolFees;

    /// @inheritdoc IUniswapV3PoolState
    uint128 public override liquidity;

    /// @inheritdoc IUniswapV3PoolState
    mapping(int24 => Tick.Info) public override ticks;
    /// @inheritdoc IUniswapV3PoolState
    mapping(int16 => uint256) public override tickBitmap;
    /// @inheritdoc IUniswapV3PoolState
    mapping(bytes32 => Position.Info) public override positions;
    /// @inheritdoc IUniswapV3PoolState
    Oracle.Observation[65535] public override observations;

    /// @dev Mutually exclusive reentrancy protection into the pool to/from a method. This method also prevents entrance
    /// to a function before the pool is initialized. The reentrancy guard is required throughout the contract because
    /// we use balance checks to determine the payment status of interactions such as mint, swap and flash.
    modifier lock() {
        require(slot0.unlocked, 'LOK');
        slot0.unlocked = false;
        _;
        slot0.unlocked = true;
    }

    /// @dev Prevents calling a function from anyone except the address returned by IUniswapV3Factory#owner()
    modifier onlyFactoryOwner() {
        require(msg.sender == IUniswapV3Factory(factory).owner());
        _;
    }

    constructor() {
        int24 _tickSpacing;
        (factory, token0, token1, fee, _tickSpacing) = IUniswapV3PoolDeployer(msg.sender).parameters();
        tickSpacing = _tickSpacing;

        maxLiquidityPerTick = Tick.tickSpacingToMaxLiquidityPerTick(_tickSpacing);
    }

    /// @dev Common checks for valid tick inputs.
    function checkTicks(int24 tickLower, int24 tickUpper) private pure {
        require(tickLower < tickUpper, 'TLU');
        require(tickLower >= TickMath.MIN_TICK, 'TLM');
        require(tickUpper <= TickMath.MAX_TICK, 'TUM');
    }

    /// @dev Returns the block timestamp truncated to 32 bits, i.e. mod 2**32. This method is overridden in tests.
    function _blockTimestamp() internal view virtual returns (uint32) {
        return uint32(block.timestamp); // truncation is desired
    }

    /// @dev Get the pool's balance of token0
    /// @dev This function is gas optimized to avoid a redundant extcodesize check in addition to the returndatasize
    /// check
    function balance0() private view returns (uint256) {
        (bool success, bytes memory data) =
            token0.staticcall(abi.encodeWithSelector(IERC20Minimal.balanceOf.selector, address(this)));
        require(success && data.length >= 32);
        return abi.decode(data, (uint256));
    }

    /// @dev Get the pool's balance of token1
    /// @dev This function is gas optimized to avoid a redundant extcodesize check in addition to the returndatasize
    /// check
    function balance1() private view returns (uint256) {
        (bool success, bytes memory data) =
            token1.staticcall(abi.encodeWithSelector(IERC20Minimal.balanceOf.selector, address(this)));
        require(success && data.length >= 32);
        return abi.decode(data, (uint256));
    }

    /// @inheritdoc IUniswapV3PoolDerivedState
    function snapshotCumulativesInside(int24 tickLower, int24 tickUpper)
        external
        view
        override
        noDelegateCall
        returns (
            int56 tickCumulativeInside,
            uint160 secondsPerLiquidityInsideX128,
            uint32 secondsInside
        )
    {
        checkTicks(tickLower, tickUpper);

        int56 tickCumulativeLower;
        int56 tickCumulativeUpper;
        uint160 secondsPerLiquidityOutsideLowerX128;
        uint160 secondsPerLiquidityOutsideUpperX128;
        uint32 secondsOutsideLower;
        uint32 secondsOutsideUpper;

        {
            Tick.Info storage lower = ticks[tickLower];
            Tick.Info storage upper = ticks[tickUpper];
            bool initializedLower;
            (tickCumulativeLower, secondsPerLiquidityOutsideLowerX128, secondsOutsideLower, initializedLower) = (
                lower.tickCumulativeOutside,
                lower.secondsPerLiquidityOutsideX128,
                lower.secondsOutside,
                lower.initialized
            );
            require(initializedLower);

            bool initializedUpper;
            (tickCumulativeUpper, secondsPerLiquidityOutsideUpperX128, secondsOutsideUpper, initializedUpper) = (
                upper.tickCumulativeOutside,
                upper.secondsPerLiquidityOutsideX128,
                upper.secondsOutside,
                upper.initialized
            );
            require(initializedUpper);
        }

        Slot0 memory _slot0 = slot0;

        if (_slot0.tick < tickLower) {
            return (
                tickCumulativeLower - tickCumulativeUpper,
                secondsPerLiquidityOutsideLowerX128 - secondsPerLiquidityOutsideUpperX128,
                secondsOutsideLower - secondsOutsideUpper
            );
        } else if (_slot0.tick < tickUpper) {
            uint32 time = _blockTimestamp();
            (int56 tickCumulative, uint160 secondsPerLiquidityCumulativeX128) =
                observations.observeSingle(
                    time,
                    0,
                    _slot0.tick,
                    _slot0.observationIndex,
                    liquidity,
                    _slot0.observationCardinality
                );
            return (
                tickCumulative - tickCumulativeLower - tickCumulativeUpper,
                secondsPerLiquidityCumulativeX128 -
                    secondsPerLiquidityOutsideLowerX128 -
                    secondsPerLiquidityOutsideUpperX128,
                time - secondsOutsideLower - secondsOutsideUpper
            );
        } else {
            return (
                tickCumulativeUpper - tickCumulativeLower,
                secondsPerLiquidityOutsideUpperX128 - secondsPerLiquidityOutsideLowerX128,
                secondsOutsideUpper - secondsOutsideLower
            );
        }
    }

    /// @inheritdoc IUniswapV3PoolDerivedState
    function observe(uint32[] calldata secondsAgos)
        external
        view
        override
        noDelegateCall
        returns (int56[] memory tickCumulatives, uint160[] memory secondsPerLiquidityCumulativeX128s)
    {
        return
            observations.observe(
                _blockTimestamp(),
                secondsAgos,
                slot0.tick,
                slot0.observationIndex,
                liquidity,
                slot0.observationCardinality
            );
    }

    /// @inheritdoc IUniswapV3PoolActions
    function increaseObservationCardinalityNext(uint16 observationCardinalityNext)
        external
        override
        lock
        noDelegateCall
    {
        uint16 observationCardinalityNextOld = slot0.observationCardinalityNext; // for the event
        uint16 observationCardinalityNextNew =
            observations.grow(observationCardinalityNextOld, observationCardinalityNext);
        slot0.observationCardinalityNext = observationCardinalityNextNew;
        if (observationCardinalityNextOld != observationCardinalityNextNew)
            emit IncreaseObservationCardinalityNext(observationCardinalityNextOld, observationCardinalityNextNew);
    }

    /// @inheritdoc IUniswapV3PoolActions
    /// @dev not locked because it initializes unlocked
    function initialize(uint160 sqrtPriceX96) external override {
        require(slot0.sqrtPriceX96 == 0, 'AI');

        int24 tick = TickMath.getTickAtSqrtRatio(sqrtPriceX96);

        (uint16 cardinality, uint16 cardinalityNext) = observations.initialize(_blockTimestamp());

        slot0 = Slot0({
            sqrtPriceX96: sqrtPriceX96,
            tick: tick,
            observationIndex: 0,
            observationCardinality: cardinality,
            observationCardinalityNext: cardinalityNext,
            feeProtocol: 0,
            unlocked: true
        });

        emit Initialize(sqrtPriceX96, tick);
    }

    struct ModifyPositionParams {
        // the address that owns the position
        address owner;
        // the lower and upper tick of the position
        int24 tickLower;
        int24 tickUpper;
        // any change in liquidity
        int128 liquidityDelta;
    }

    /// @dev Effect some changes to a position
    /// @param params the position details and the change to the position's liquidity to effect
    /// @return position a storage pointer referencing the position with the given owner and tick range
    /// @return amount0 the amount of token0 owed to the pool, negative if the pool should pay the recipient
    /// @return amount1 the amount of token1 owed to the pool, negative if the pool should pay the recipient
    function _modifyPosition(ModifyPositionParams memory params)
        private
        noDelegateCall
        returns (
            Position.Info storage position,
            int256 amount0,
            int256 amount1
        )
    {
        checkTicks(params.tickLower, params.tickUpper);

        Slot0 memory _slot0 = slot0; // SLOAD for gas optimization

        position = _updatePosition(
            params.owner,
            params.tickLower,
            params.tickUpper,
            params.liquidityDelta,
            _slot0.tick
        );

        if (params.liquidityDelta != 0) {
            if (_slot0.tick < params.tickLower) {
                // current tick is below the passed range; liquidity can only become in range by crossing from left to
                // right, when we'll need _more_ token0 (it's becoming more valuable) so user must provide it
                amount0 = SqrtPriceMath.getAmount0Delta(
                    TickMath.getSqrtRatioAtTick(params.tickLower),
                    TickMath.getSqrtRatioAtTick(params.tickUpper),
                    params.liquidityDelta
                );
            } else if (_slot0.tick < params.tickUpper) {
                // current tick is inside the passed range
                uint128 liquidityBefore = liquidity; // SLOAD for gas optimization

                // write an oracle entry
                (slot0.observationIndex, slot0.observationCardinality) = observations.write(
                    _slot0.observationIndex,
                    _blockTimestamp(),
                    _slot0.tick,
                    liquidityBefore,
                    _slot0.observationCardinality,
                    _slot0.observationCardinalityNext
                );

                amount0 = SqrtPriceMath.getAmount0Delta(
                    _slot0.sqrtPriceX96,
                    TickMath.getSqrtRatioAtTick(params.tickUpper),
                    params.liquidityDelta
                );
                amount1 = SqrtPriceMath.getAmount1Delta(
                    TickMath.getSqrtRatioAtTick(params.tickLower),
                    _slot0.sqrtPriceX96,
                    params.liquidityDelta
                );

                liquidity = LiquidityMath.addDelta(liquidityBefore, params.liquidityDelta);
            } else {
                // current tick is above the passed range; liquidity can only become in range by crossing from right to
                // left, when we'll need _more_ token1 (it's becoming more valuable) so user must provide it
                amount1 = SqrtPriceMath.getAmount1Delta(
                    TickMath.getSqrtRatioAtTick(params.tickLower),
                    TickMath.getSqrtRatioAtTick(params.tickUpper),
                    params.liquidityDelta
                );
            }
        }
    }

    /// @dev Gets and updates a position with the given liquidity delta
    /// @param owner the owner of the position
    /// @param tickLower the lower tick of the position's tick range
    /// @param tickUpper the upper tick of the position's tick range
    /// @param tick the current tick, passed to avoid sloads
    function _updatePosition(
        address owner,
        int24 tickLower,
        int24 tickUpper,
        int128 liquidityDelta,
        int24 tick
    ) private returns (Position.Info storage position) {
        position = positions.get(owner, tickLower, tickUpper);

        uint256 _feeGrowthGlobal0X128 = feeGrowthGlobal0X128; // SLOAD for gas optimization
        uint256 _feeGrowthGlobal1X128 = feeGrowthGlobal1X128; // SLOAD for gas optimization

        // if we need to update the ticks, do it
        bool flippedLower;
        bool flippedUpper;
        if (liquidityDelta != 0) {
            uint32 time = _blockTimestamp();
            (int56 tickCumulative, uint160 secondsPerLiquidityCumulativeX128) =
                observations.observeSingle(
                    time,
                    0,
                    slot0.tick,
                    slot0.observationIndex,
                    liquidity,
                    slot0.observationCardinality
                );

            flippedLower = ticks.update(
                tickLower,
                tick,
                liquidityDelta,
                _feeGrowthGlobal0X128,
                _feeGrowthGlobal1X128,
                secondsPerLiquidityCumulativeX128,
                tickCumulative,
                time,
                false,
                maxLiquidityPerTick
            );
            flippedUpper = ticks.update(
                tickUpper,
                tick,
                liquidityDelta,
                _feeGrowthGlobal0X128,
                _feeGrowthGlobal1X128,
                secondsPerLiquidityCumulativeX128,
                tickCumulative,
                time,
                true,
                maxLiquidityPerTick
            );

            if (flippedLower) {
                tickBitmap.flipTick(tickLower, tickSpacing);
            }
            if (flippedUpper) {
                tickBitmap.flipTick(tickUpper, tickSpacing);
            }
        }

        (uint256 feeGrowthInside0X128, uint256 feeGrowthInside1X128) =
            ticks.getFeeGrowthInside(tickLower, tickUpper, tick, _feeGrowthGlobal0X128, _feeGrowthGlobal1X128);

        position.update(liquidityDelta, feeGrowthInside0X128, feeGrowthInside1X128);

        // clear any tick data that is no longer needed
        if (liquidityDelta < 0) {
            if (flippedLower) {
                ticks.clear(tickLower);
            }
            if (flippedUpper) {
                ticks.clear(tickUpper);
            }
        }
    }

    /// @inheritdoc IUniswapV3PoolActions
    /// @dev noDelegateCall is applied indirectly via _modifyPosition
    function mint(
        address recipient,
        int24 tickLower,
        int24 tickUpper,
        uint128 amount,
        bytes calldata data
    ) external override lock returns (uint256 amount0, uint256 amount1) {
        require(amount > 0);
        (, int256 amount0Int, int256 amount1Int) =
            _modifyPosition(
                ModifyPositionParams({
                    owner: recipient,
                    tickLower: tickLower,
                    tickUpper: tickUpper,
                    liquidityDelta: int256(amount).toInt128()
                })
            );

        amount0 = uint256(amount0Int);
        amount1 = uint256(amount1Int);

        uint256 balance0Before;
        uint256 balance1Before;
        if (amount0 > 0) balance0Before = balance0();
        if (amount1 > 0) balance1Before = balance1();
        IUniswapV3MintCallback(msg.sender).uniswapV3MintCallback(amount0, amount1, data);
        if (amount0 > 0) require(balance0Before.add(amount0) <= balance0(), 'M0');
        if (amount1 > 0) require(balance1Before.add(amount1) <= balance1(), 'M1');

        emit Mint(msg.sender, recipient, tickLower, tickUpper, amount, amount0, amount1);
    }

    /// @inheritdoc IUniswapV3PoolActions
    function collect(
        address recipient,
        int24 tickLower,
        int24 tickUpper,
        uint128 amount0Requested,
        uint128 amount1Requested
    ) external override lock returns (uint128 amount0, uint128 amount1) {
        // we don't need to checkTicks here, because invalid positions will never have non-zero tokensOwed{0,1}
        Position.Info storage position = positions.get(msg.sender, tickLower, tickUpper);

        amount0 = amount0Requested > position.tokensOwed0 ? position.tokensOwed0 : amount0Requested;
        amount1 = amount1Requested > position.tokensOwed1 ? position.tokensOwed1 : amount1Requested;

        if (amount0 > 0) {
            position.tokensOwed0 -= amount0;
            TransferHelper.safeTransfer(token0, recipient, amount0);
        }
        if (amount1 > 0) {
            position.tokensOwed1 -= amount1;
            TransferHelper.safeTransfer(token1, recipient, amount1);
        }

        emit Collect(msg.sender, recipient, tickLower, tickUpper, amount0, amount1);
    }

    /// @inheritdoc IUniswapV3PoolActions
    /// @dev noDelegateCall is applied indirectly via _modifyPosition
    function burn(
        int24 tickLower,
        int24 tickUpper,
        uint128 amount
    ) external override lock returns (uint256 amount0, uint256 amount1) {
        (Position.Info storage position, int256 amount0Int, int256 amount1Int) =
            _modifyPosition(
                ModifyPositionParams({
                    owner: msg.sender,
                    tickLower: tickLower,
                    tickUpper: tickUpper,
                    liquidityDelta: -int256(amount).toInt128()
                })
            );

        amount0 = uint256(-amount0Int);
        amount1 = uint256(-amount1Int);

        if (amount0 > 0 || amount1 > 0) {
            (position.tokensOwed0, position.tokensOwed1) = (
                position.tokensOwed0 + uint128(amount0),
                position.tokensOwed1 + uint128(amount1)
            );
        }

        emit Burn(msg.sender, tickLower, tickUpper, amount, amount0, amount1);
    }

    struct SwapCache {
        // the protocol fee for the input token
        uint8 feeProtocol;
        // liquidity at the beginning of the swap
        uint128 liquidityStart;
        // the timestamp of the current block
        uint32 blockTimestamp;
        // the current value of the tick accumulator, computed only if we cross an initialized tick
        int56 tickCumulative;
        // the current value of seconds per liquidity accumulator, computed only if we cross an initialized tick
        uint160 secondsPerLiquidityCumulativeX128;
        // whether we've computed and cached the above two accumulators
        bool computedLatestObservation;
    }

    // the top level state of the swap, the results of which are recorded in storage at the end
    struct SwapState {
        // the amount remaining to be swapped in/out of the input/output asset
        int256 amountSpecifiedRemaining;
        // the amount already swapped out/in of the output/input asset
        int256 amountCalculated;
        // current sqrt(price)
        uint160 sqrtPriceX96;
        // the tick associated with the current price
        int24 tick;
        // the global fee growth of the input token
        uint256 feeGrowthGlobalX128;
        // amount of input token paid as protocol fee
        uint128 protocolFee;
        // the current liquidity in range
        uint128 liquidity;
    }

    struct StepComputations {
        // the price at the beginning of the step
        uint160 sqrtPriceStartX96;
        // the next tick to swap to from the current tick in the swap direction
        int24 tickNext;
        // whether tickNext is initialized or not
        bool initialized;
        // sqrt(price) for the next tick (1/0)
        uint160 sqrtPriceNextX96;
        // how much is being swapped in in this step
        uint256 amountIn;
        // how much is being swapped out
        uint256 amountOut;
        // how much fee is being paid in
        uint256 feeAmount;
    }

    /// @inheritdoc IUniswapV3PoolActions
    function swap(
        address recipient,
        bool zeroForOne,
        int256 amountSpecified,
        uint160 sqrtPriceLimitX96,
        bytes calldata data
    ) external override noDelegateCall returns (int256 amount0, int256 amount1) {
        require(amountSpecified != 0, 'AS');

        Slot0 memory slot0Start = slot0;

        require(slot0Start.unlocked, 'LOK');
        require(
            zeroForOne
                ? sqrtPriceLimitX96 < slot0Start.sqrtPriceX96 && sqrtPriceLimitX96 > TickMath.MIN_SQRT_RATIO
                : sqrtPriceLimitX96 > slot0Start.sqrtPriceX96 && sqrtPriceLimitX96 < TickMath.MAX_SQRT_RATIO,
            'SPL'
        );

        slot0.unlocked = false;

        SwapCache memory cache =
            SwapCache({
                liquidityStart: liquidity,
                blockTimestamp: _blockTimestamp(),
                feeProtocol: zeroForOne ? (slot0Start.feeProtocol % 16) : (slot0Start.feeProtocol >> 4),
                secondsPerLiquidityCumulativeX128: 0,
                tickCumulative: 0,
                computedLatestObservation: false
            });

        bool exactInput = amountSpecified > 0;

        SwapState memory state =
            SwapState({
                amountSpecifiedRemaining: amountSpecified,
                amountCalculated: 0,
                sqrtPriceX96: slot0Start.sqrtPriceX96,
                tick: slot0Start.tick,
                feeGrowthGlobalX128: zeroForOne ? feeGrowthGlobal0X128 : feeGrowthGlobal1X128,
                protocolFee: 0,
                liquidity: cache.liquidityStart
            });

        // continue swapping as long as we haven't used the entire input/output and haven't reached the price limit
        while (state.amountSpecifiedRemaining != 0 && state.sqrtPriceX96 != sqrtPriceLimitX96) {
            StepComputations memory step;

            step.sqrtPriceStartX96 = state.sqrtPriceX96;

            (step.tickNext, step.initialized) = tickBitmap.nextInitializedTickWithinOneWord(
                state.tick,
                tickSpacing,
                zeroForOne
            );

            // ensure that we do not overshoot the min/max tick, as the tick bitmap is not aware of these bounds
            if (step.tickNext < TickMath.MIN_TICK) {
                step.tickNext = TickMath.MIN_TICK;
            } else if (step.tickNext > TickMath.MAX_TICK) {
                step.tickNext = TickMath.MAX_TICK;
            }

            // get the price for the next tick
            step.sqrtPriceNextX96 = TickMath.getSqrtRatioAtTick(step.tickNext);

            // compute values to swap to the target tick, price limit, or point where input/output amount is exhausted
            (state.sqrtPriceX96, step.amountIn, step.amountOut, step.feeAmount) = SwapMath.computeSwapStep(
                state.sqrtPriceX96,
                (zeroForOne ? step.sqrtPriceNextX96 < sqrtPriceLimitX96 : step.sqrtPriceNextX96 > sqrtPriceLimitX96)
                    ? sqrtPriceLimitX96
                    : step.sqrtPriceNextX96,
                state.liquidity,
                state.amountSpecifiedRemaining,
                fee
            );

            if (exactInput) {
                state.amountSpecifiedRemaining -= (step.amountIn + step.feeAmount).toInt256();
                state.amountCalculated = state.amountCalculated.sub(step.amountOut.toInt256());
            } else {
                state.amountSpecifiedRemaining += step.amountOut.toInt256();
                state.amountCalculated = state.amountCalculated.add((step.amountIn + step.feeAmount).toInt256());
            }

            // if the protocol fee is on, calculate how much is owed, decrement feeAmount, and increment protocolFee
            if (cache.feeProtocol > 0) {
                uint256 delta = step.feeAmount / cache.feeProtocol;
                step.feeAmount -= delta;
                state.protocolFee += uint128(delta);
            }

            // update global fee tracker
            if (state.liquidity > 0)
                state.feeGrowthGlobalX128 += FullMath.mulDiv(step.feeAmount, FixedPoint128.Q128, state.liquidity);

            // shift tick if we reached the next price
            if (state.sqrtPriceX96 == step.sqrtPriceNextX96) {
                // if the tick is initialized, run the tick transition
                if (step.initialized) {
                    // check for the placeholder value, which we replace with the actual value the first time the swap
                    // crosses an initialized tick
                    if (!cache.computedLatestObservation) {
                        (cache.tickCumulative, cache.secondsPerLiquidityCumulativeX128) = observations.observeSingle(
                            cache.blockTimestamp,
                            0,
                            slot0Start.tick,
                            slot0Start.observationIndex,
                            cache.liquidityStart,
                            slot0Start.observationCardinality
                        );
                        cache.computedLatestObservation = true;
                    }
                    int128 liquidityNet =
                        ticks.cross(
                            step.tickNext,
                            (zeroForOne ? state.feeGrowthGlobalX128 : feeGrowthGlobal0X128),
                            (zeroForOne ? feeGrowthGlobal1X128 : state.feeGrowthGlobalX128),
                            cache.secondsPerLiquidityCumulativeX128,
                            cache.tickCumulative,
                            cache.blockTimestamp
                        );
                    // if we're moving leftward, we interpret liquidityNet as the opposite sign
                    // safe because liquidityNet cannot be type(int128).min
                    if (zeroForOne) liquidityNet = -liquidityNet;

                    state.liquidity = LiquidityMath.addDelta(state.liquidity, liquidityNet);
                }

                state.tick = zeroForOne ? step.tickNext - 1 : step.tickNext;
            } else if (state.sqrtPriceX96 != step.sqrtPriceStartX96) {
                // recompute unless we're on a lower tick boundary (i.e. already transitioned ticks), and haven't moved
                state.tick = TickMath.getTickAtSqrtRatio(state.sqrtPriceX96);
            }
        }

        // update tick and write an oracle entry if the tick change
        if (state.tick != slot0Start.tick) {
            (uint16 observationIndex, uint16 observationCardinality) =
                observations.write(
                    slot0Start.observationIndex,
                    cache.blockTimestamp,
                    slot0Start.tick,
                    cache.liquidityStart,
                    slot0Start.observationCardinality,
                    slot0Start.observationCardinalityNext
                );
            (slot0.sqrtPriceX96, slot0.tick, slot0.observationIndex, slot0.observationCardinality) = (
                state.sqrtPriceX96,
                state.tick,
                observationIndex,
                observationCardinality
            );
        } else {
            // otherwise just update the price
            slot0.sqrtPriceX96 = state.sqrtPriceX96;
        }

        // update liquidity if it changed
        if (cache.liquidityStart != state.liquidity) liquidity = state.liquidity;

        // update fee growth global and, if necessary, protocol fees
        // overflow is acceptable, protocol has to withdraw before it hits type(uint128).max fees
        if (zeroForOne) {
            feeGrowthGlobal0X128 = state.feeGrowthGlobalX128;
            if (state.protocolFee > 0) protocolFees.token0 += state.protocolFee;
        } else {
            feeGrowthGlobal1X128 = state.feeGrowthGlobalX128;
            if (state.protocolFee > 0) protocolFees.token1 += state.protocolFee;
        }

        (amount0, amount1) = zeroForOne == exactInput
            ? (amountSpecified - state.amountSpecifiedRemaining, state.amountCalculated)
            : (state.amountCalculated, amountSpecified - state.amountSpecifiedRemaining);

        // do the transfers and collect payment
        if (zeroForOne) {
            if (amount1 < 0) TransferHelper.safeTransfer(token1, recipient, uint256(-amount1));

            uint256 balance0Before = balance0();
            IUniswapV3SwapCallback(msg.sender).uniswapV3SwapCallback(amount0, amount1, data);
            require(balance0Before.add(uint256(amount0)) <= balance0(), 'IIA');
        } else {
            if (amount0 < 0) TransferHelper.safeTransfer(token0, recipient, uint256(-amount0));

            uint256 balance1Before = balance1();
            IUniswapV3SwapCallback(msg.sender).uniswapV3SwapCallback(amount0, amount1, data);
            require(balance1Before.add(uint256(amount1)) <= balance1(), 'IIA');
        }

        emit Swap(msg.sender, recipient, amount0, amount1, state.sqrtPriceX96, state.liquidity, state.tick);
        slot0.unlocked = true;
    }

    /// @inheritdoc IUniswapV3PoolActions
    function flash(
        address recipient,
        uint256 amount0,
        uint256 amount1,
        bytes calldata data
    ) external override lock noDelegateCall {
        uint128 _liquidity = liquidity;
        require(_liquidity > 0, 'L');

        uint256 fee0 = FullMath.mulDivRoundingUp(amount0, fee, 1e6);
        uint256 fee1 = FullMath.mulDivRoundingUp(amount1, fee, 1e6);
        uint256 balance0Before = balance0();
        uint256 balance1Before = balance1();

        if (amount0 > 0) TransferHelper.safeTransfer(token0, recipient, amount0);
        if (amount1 > 0) TransferHelper.safeTransfer(token1, recipient, amount1);

        IUniswapV3FlashCallback(msg.sender).uniswapV3FlashCallback(fee0, fee1, data);

        uint256 balance0After = balance0();
        uint256 balance1After = balance1();

        require(balance0Before.add(fee0) <= balance0After, 'F0');
        require(balance1Before.add(fee1) <= balance1After, 'F1');

        // sub is safe because we know balanceAfter is gt balanceBefore by at least fee
        uint256 paid0 = balance0After - balance0Before;
        uint256 paid1 = balance1After - balance1Before;

        if (paid0 > 0) {
            uint8 feeProtocol0 = slot0.feeProtocol % 16;
            uint256 fees0 = feeProtocol0 == 0 ? 0 : paid0 / feeProtocol0;
            if (uint128(fees0) > 0) protocolFees.token0 += uint128(fees0);
            feeGrowthGlobal0X128 += FullMath.mulDiv(paid0 - fees0, FixedPoint128.Q128, _liquidity);
        }
        if (paid1 > 0) {
            uint8 feeProtocol1 = slot0.feeProtocol >> 4;
            uint256 fees1 = feeProtocol1 == 0 ? 0 : paid1 / feeProtocol1;
            if (uint128(fees1) > 0) protocolFees.token1 += uint128(fees1);
            feeGrowthGlobal1X128 += FullMath.mulDiv(paid1 - fees1, FixedPoint128.Q128, _liquidity);
        }

        emit Flash(msg.sender, recipient, amount0, amount1, paid0, paid1);
    }

    /// @inheritdoc IUniswapV3PoolOwnerActions
    function setFeeProtocol(uint8 feeProtocol0, uint8 feeProtocol1) external override lock onlyFactoryOwner {
        require(
            (feeProtocol0 == 0 || (feeProtocol0 >= 4 && feeProtocol0 <= 10)) &&
                (feeProtocol1 == 0 || (feeProtocol1 >= 4 && feeProtocol1 <= 10))
        );
        uint8 feeProtocolOld = slot0.feeProtocol;
        slot0.feeProtocol = feeProtocol0 + (feeProtocol1 << 4);
        emit SetFeeProtocol(feeProtocolOld % 16, feeProtocolOld >> 4, feeProtocol0, feeProtocol1);
    }

    /// @inheritdoc IUniswapV3PoolOwnerActions
    function collectProtocol(
        address recipient,
        uint128 amount0Requested,
        uint128 amount1Requested
    ) external override lock onlyFactoryOwner returns (uint128 amount0, uint128 amount1) {
        amount0 = amount0Requested > protocolFees.token0 ? protocolFees.token0 : amount0Requested;
        amount1 = amount1Requested > protocolFees.token1 ? protocolFees.token1 : amount1Requested;

        if (amount0 > 0) {
            if (amount0 == protocolFees.token0) amount0--; // ensure that the slot is not cleared, for gas savings
            protocolFees.token0 -= amount0;
            TransferHelper.safeTransfer(token0, recipient, amount0);
        }
        if (amount1 > 0) {
            if (amount1 == protocolFees.token1) amount1--; // ensure that the slot is not cleared, for gas savings
            protocolFees.token1 -= amount1;
            TransferHelper.safeTransfer(token1, recipient, amount1);
        }

        emit CollectProtocol(msg.sender, recipient, amount0, amount1);
    }
}

File 2 of 31 : IUniswapV3Pool.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;

import './pool/IUniswapV3PoolImmutables.sol';
import './pool/IUniswapV3PoolState.sol';
import './pool/IUniswapV3PoolDerivedState.sol';
import './pool/IUniswapV3PoolActions.sol';
import './pool/IUniswapV3PoolOwnerActions.sol';
import './pool/IUniswapV3PoolEvents.sol';

/// @title The interface for a Uniswap V3 Pool
/// @notice A Uniswap pool facilitates swapping and automated market making between any two assets that strictly conform
/// to the ERC20 specification
/// @dev The pool interface is broken up into many smaller pieces
interface IUniswapV3Pool is
    IUniswapV3PoolImmutables,
    IUniswapV3PoolState,
    IUniswapV3PoolDerivedState,
    IUniswapV3PoolActions,
    IUniswapV3PoolOwnerActions,
    IUniswapV3PoolEvents
{

}

File 3 of 31 : NoDelegateCall.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity =0.7.6;

/// @title Prevents delegatecall to a contract
/// @notice Base contract that provides a modifier for preventing delegatecall to methods in a child contract
abstract contract NoDelegateCall {
    /// @dev The original address of this contract
    address private immutable original;

    constructor() {
        // Immutables are computed in the init code of the contract, and then inlined into the deployed bytecode.
        // In other words, this variable won't change when it's checked at runtime.
        original = address(this);
    }

    /// @dev Private method is used instead of inlining into modifier because modifiers are copied into each method,
    ///     and the use of immutable means the address bytes are copied in every place the modifier is used.
    function checkNotDelegateCall() private view {
        require(address(this) == original);
    }

    /// @notice Prevents delegatecall into the modified method
    modifier noDelegateCall() {
        checkNotDelegateCall();
        _;
    }
}

File 4 of 31 : LowGasSafeMath.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.7.0;

/// @title Optimized overflow and underflow safe math operations
/// @notice Contains methods for doing math operations that revert on overflow or underflow for minimal gas cost
library LowGasSafeMath {
    /// @notice Returns x + y, reverts if sum overflows uint256
    /// @param x The augend
    /// @param y The addend
    /// @return z The sum of x and y
    function add(uint256 x, uint256 y) internal pure returns (uint256 z) {
        require((z = x + y) >= x);
    }

    /// @notice Returns x - y, reverts if underflows
    /// @param x The minuend
    /// @param y The subtrahend
    /// @return z The difference of x and y
    function sub(uint256 x, uint256 y) internal pure returns (uint256 z) {
        require((z = x - y) <= x);
    }

    /// @notice Returns x * y, reverts if overflows
    /// @param x The multiplicand
    /// @param y The multiplier
    /// @return z The product of x and y
    function mul(uint256 x, uint256 y) internal pure returns (uint256 z) {
        require(x == 0 || (z = x * y) / x == y);
    }

    /// @notice Returns x + y, reverts if overflows or underflows
    /// @param x The augend
    /// @param y The addend
    /// @return z The sum of x and y
    function add(int256 x, int256 y) internal pure returns (int256 z) {
        require((z = x + y) >= x == (y >= 0));
    }

    /// @notice Returns x - y, reverts if overflows or underflows
    /// @param x The minuend
    /// @param y The subtrahend
    /// @return z The difference of x and y
    function sub(int256 x, int256 y) internal pure returns (int256 z) {
        require((z = x - y) <= x == (y >= 0));
    }
}

File 5 of 31 : SafeCast.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;

/// @title Safe casting methods
/// @notice Contains methods for safely casting between types
library SafeCast {
    /// @notice Cast a uint256 to a uint160, revert on overflow
    /// @param y The uint256 to be downcasted
    /// @return z The downcasted integer, now type uint160
    function toUint160(uint256 y) internal pure returns (uint160 z) {
        require((z = uint160(y)) == y);
    }

    /// @notice Cast a int256 to a int128, revert on overflow or underflow
    /// @param y The int256 to be downcasted
    /// @return z The downcasted integer, now type int128
    function toInt128(int256 y) internal pure returns (int128 z) {
        require((z = int128(y)) == y);
    }

    /// @notice Cast a uint256 to a int256, revert on overflow
    /// @param y The uint256 to be casted
    /// @return z The casted integer, now type int256
    function toInt256(uint256 y) internal pure returns (int256 z) {
        require(y < 2**255);
        z = int256(y);
    }
}

File 6 of 31 : Tick.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity >=0.5.0;

import './LowGasSafeMath.sol';
import './SafeCast.sol';

import './TickMath.sol';
import './LiquidityMath.sol';

/// @title Tick
/// @notice Contains functions for managing tick processes and relevant calculations
library Tick {
    using LowGasSafeMath for int256;
    using SafeCast for int256;

    // info stored for each initialized individual tick
    struct Info {
        // the total position liquidity that references this tick
        uint128 liquidityGross;
        // amount of net liquidity added (subtracted) when tick is crossed from left to right (right to left),
        int128 liquidityNet;
        // fee growth per unit of liquidity on the _other_ side of this tick (relative to the current tick)
        // only has relative meaning, not absolute — the value depends on when the tick is initialized
        uint256 feeGrowthOutside0X128;
        uint256 feeGrowthOutside1X128;
        // the cumulative tick value on the other side of the tick
        int56 tickCumulativeOutside;
        // the seconds per unit of liquidity on the _other_ side of this tick (relative to the current tick)
        // only has relative meaning, not absolute — the value depends on when the tick is initialized
        uint160 secondsPerLiquidityOutsideX128;
        // the seconds spent on the other side of the tick (relative to the current tick)
        // only has relative meaning, not absolute — the value depends on when the tick is initialized
        uint32 secondsOutside;
        // true iff the tick is initialized, i.e. the value is exactly equivalent to the expression liquidityGross != 0
        // these 8 bits are set to prevent fresh sstores when crossing newly initialized ticks
        bool initialized;
    }

    /// @notice Derives max liquidity per tick from given tick spacing
    /// @dev Executed within the pool constructor
    /// @param tickSpacing The amount of required tick separation, realized in multiples of `tickSpacing`
    ///     e.g., a tickSpacing of 3 requires ticks to be initialized every 3rd tick i.e., ..., -6, -3, 0, 3, 6, ...
    /// @return The max liquidity per tick
    function tickSpacingToMaxLiquidityPerTick(int24 tickSpacing) internal pure returns (uint128) {
        int24 minTick = (TickMath.MIN_TICK / tickSpacing) * tickSpacing;
        int24 maxTick = (TickMath.MAX_TICK / tickSpacing) * tickSpacing;
        uint24 numTicks = uint24((maxTick - minTick) / tickSpacing) + 1;
        return type(uint128).max / numTicks;
    }

    /// @notice Retrieves fee growth data
    /// @param self The mapping containing all tick information for initialized ticks
    /// @param tickLower The lower tick boundary of the position
    /// @param tickUpper The upper tick boundary of the position
    /// @param tickCurrent The current tick
    /// @param feeGrowthGlobal0X128 The all-time global fee growth, per unit of liquidity, in token0
    /// @param feeGrowthGlobal1X128 The all-time global fee growth, per unit of liquidity, in token1
    /// @return feeGrowthInside0X128 The all-time fee growth in token0, per unit of liquidity, inside the position's tick boundaries
    /// @return feeGrowthInside1X128 The all-time fee growth in token1, per unit of liquidity, inside the position's tick boundaries
    function getFeeGrowthInside(
        mapping(int24 => Tick.Info) storage self,
        int24 tickLower,
        int24 tickUpper,
        int24 tickCurrent,
        uint256 feeGrowthGlobal0X128,
        uint256 feeGrowthGlobal1X128
    ) internal view returns (uint256 feeGrowthInside0X128, uint256 feeGrowthInside1X128) {
        Info storage lower = self[tickLower];
        Info storage upper = self[tickUpper];

        // calculate fee growth below
        uint256 feeGrowthBelow0X128;
        uint256 feeGrowthBelow1X128;
        if (tickCurrent >= tickLower) {
            feeGrowthBelow0X128 = lower.feeGrowthOutside0X128;
            feeGrowthBelow1X128 = lower.feeGrowthOutside1X128;
        } else {
            feeGrowthBelow0X128 = feeGrowthGlobal0X128 - lower.feeGrowthOutside0X128;
            feeGrowthBelow1X128 = feeGrowthGlobal1X128 - lower.feeGrowthOutside1X128;
        }

        // calculate fee growth above
        uint256 feeGrowthAbove0X128;
        uint256 feeGrowthAbove1X128;
        if (tickCurrent < tickUpper) {
            feeGrowthAbove0X128 = upper.feeGrowthOutside0X128;
            feeGrowthAbove1X128 = upper.feeGrowthOutside1X128;
        } else {
            feeGrowthAbove0X128 = feeGrowthGlobal0X128 - upper.feeGrowthOutside0X128;
            feeGrowthAbove1X128 = feeGrowthGlobal1X128 - upper.feeGrowthOutside1X128;
        }

        feeGrowthInside0X128 = feeGrowthGlobal0X128 - feeGrowthBelow0X128 - feeGrowthAbove0X128;
        feeGrowthInside1X128 = feeGrowthGlobal1X128 - feeGrowthBelow1X128 - feeGrowthAbove1X128;
    }

    /// @notice Updates a tick and returns true if the tick was flipped from initialized to uninitialized, or vice versa
    /// @param self The mapping containing all tick information for initialized ticks
    /// @param tick The tick that will be updated
    /// @param tickCurrent The current tick
    /// @param liquidityDelta A new amount of liquidity to be added (subtracted) when tick is crossed from left to right (right to left)
    /// @param feeGrowthGlobal0X128 The all-time global fee growth, per unit of liquidity, in token0
    /// @param feeGrowthGlobal1X128 The all-time global fee growth, per unit of liquidity, in token1
    /// @param secondsPerLiquidityCumulativeX128 The all-time seconds per max(1, liquidity) of the pool
    /// @param time The current block timestamp cast to a uint32
    /// @param upper true for updating a position's upper tick, or false for updating a position's lower tick
    /// @param maxLiquidity The maximum liquidity allocation for a single tick
    /// @return flipped Whether the tick was flipped from initialized to uninitialized, or vice versa
    function update(
        mapping(int24 => Tick.Info) storage self,
        int24 tick,
        int24 tickCurrent,
        int128 liquidityDelta,
        uint256 feeGrowthGlobal0X128,
        uint256 feeGrowthGlobal1X128,
        uint160 secondsPerLiquidityCumulativeX128,
        int56 tickCumulative,
        uint32 time,
        bool upper,
        uint128 maxLiquidity
    ) internal returns (bool flipped) {
        Tick.Info storage info = self[tick];

        uint128 liquidityGrossBefore = info.liquidityGross;
        uint128 liquidityGrossAfter = LiquidityMath.addDelta(liquidityGrossBefore, liquidityDelta);

        require(liquidityGrossAfter <= maxLiquidity, 'LO');

        flipped = (liquidityGrossAfter == 0) != (liquidityGrossBefore == 0);

        if (liquidityGrossBefore == 0) {
            // by convention, we assume that all growth before a tick was initialized happened _below_ the tick
            if (tick <= tickCurrent) {
                info.feeGrowthOutside0X128 = feeGrowthGlobal0X128;
                info.feeGrowthOutside1X128 = feeGrowthGlobal1X128;
                info.secondsPerLiquidityOutsideX128 = secondsPerLiquidityCumulativeX128;
                info.tickCumulativeOutside = tickCumulative;
                info.secondsOutside = time;
            }
            info.initialized = true;
        }

        info.liquidityGross = liquidityGrossAfter;

        // when the lower (upper) tick is crossed left to right (right to left), liquidity must be added (removed)
        info.liquidityNet = upper
            ? int256(info.liquidityNet).sub(liquidityDelta).toInt128()
            : int256(info.liquidityNet).add(liquidityDelta).toInt128();
    }

    /// @notice Clears tick data
    /// @param self The mapping containing all initialized tick information for initialized ticks
    /// @param tick The tick that will be cleared
    function clear(mapping(int24 => Tick.Info) storage self, int24 tick) internal {
        delete self[tick];
    }

    /// @notice Transitions to next tick as needed by price movement
    /// @param self The mapping containing all tick information for initialized ticks
    /// @param tick The destination tick of the transition
    /// @param feeGrowthGlobal0X128 The all-time global fee growth, per unit of liquidity, in token0
    /// @param feeGrowthGlobal1X128 The all-time global fee growth, per unit of liquidity, in token1
    /// @param secondsPerLiquidityCumulativeX128 The current seconds per liquidity
    /// @param time The current block.timestamp
    /// @return liquidityNet The amount of liquidity added (subtracted) when tick is crossed from left to right (right to left)
    function cross(
        mapping(int24 => Tick.Info) storage self,
        int24 tick,
        uint256 feeGrowthGlobal0X128,
        uint256 feeGrowthGlobal1X128,
        uint160 secondsPerLiquidityCumulativeX128,
        int56 tickCumulative,
        uint32 time
    ) internal returns (int128 liquidityNet) {
        Tick.Info storage info = self[tick];
        info.feeGrowthOutside0X128 = feeGrowthGlobal0X128 - info.feeGrowthOutside0X128;
        info.feeGrowthOutside1X128 = feeGrowthGlobal1X128 - info.feeGrowthOutside1X128;
        info.secondsPerLiquidityOutsideX128 = secondsPerLiquidityCumulativeX128 - info.secondsPerLiquidityOutsideX128;
        info.tickCumulativeOutside = tickCumulative - info.tickCumulativeOutside;
        info.secondsOutside = time - info.secondsOutside;
        liquidityNet = info.liquidityNet;
    }
}

File 7 of 31 : TickBitmap.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity >=0.5.0;

import './BitMath.sol';

/// @title Packed tick initialized state library
/// @notice Stores a packed mapping of tick index to its initialized state
/// @dev The mapping uses int16 for keys since ticks are represented as int24 and there are 256 (2^8) values per word.
library TickBitmap {
    /// @notice Computes the position in the mapping where the initialized bit for a tick lives
    /// @param tick The tick for which to compute the position
    /// @return wordPos The key in the mapping containing the word in which the bit is stored
    /// @return bitPos The bit position in the word where the flag is stored
    function position(int24 tick) private pure returns (int16 wordPos, uint8 bitPos) {
        wordPos = int16(tick >> 8);
        bitPos = uint8(tick % 256);
    }

    /// @notice Flips the initialized state for a given tick from false to true, or vice versa
    /// @param self The mapping in which to flip the tick
    /// @param tick The tick to flip
    /// @param tickSpacing The spacing between usable ticks
    function flipTick(
        mapping(int16 => uint256) storage self,
        int24 tick,
        int24 tickSpacing
    ) internal {
        require(tick % tickSpacing == 0); // ensure that the tick is spaced
        (int16 wordPos, uint8 bitPos) = position(tick / tickSpacing);
        uint256 mask = 1 << bitPos;
        self[wordPos] ^= mask;
    }

    /// @notice Returns the next initialized tick contained in the same word (or adjacent word) as the tick that is either
    /// to the left (less than or equal to) or right (greater than) of the given tick
    /// @param self The mapping in which to compute the next initialized tick
    /// @param tick The starting tick
    /// @param tickSpacing The spacing between usable ticks
    /// @param lte Whether to search for the next initialized tick to the left (less than or equal to the starting tick)
    /// @return next The next initialized or uninitialized tick up to 256 ticks away from the current tick
    /// @return initialized Whether the next tick is initialized, as the function only searches within up to 256 ticks
    function nextInitializedTickWithinOneWord(
        mapping(int16 => uint256) storage self,
        int24 tick,
        int24 tickSpacing,
        bool lte
    ) internal view returns (int24 next, bool initialized) {
        int24 compressed = tick / tickSpacing;
        if (tick < 0 && tick % tickSpacing != 0) compressed--; // round towards negative infinity

        if (lte) {
            (int16 wordPos, uint8 bitPos) = position(compressed);
            // all the 1s at or to the right of the current bitPos
            uint256 mask = (1 << bitPos) - 1 + (1 << bitPos);
            uint256 masked = self[wordPos] & mask;

            // if there are no initialized ticks to the right of or at the current tick, return rightmost in the word
            initialized = masked != 0;
            // overflow/underflow is possible, but prevented externally by limiting both tickSpacing and tick
            next = initialized
                ? (compressed - int24(bitPos - BitMath.mostSignificantBit(masked))) * tickSpacing
                : (compressed - int24(bitPos)) * tickSpacing;
        } else {
            // start from the word of the next tick, since the current tick state doesn't matter
            (int16 wordPos, uint8 bitPos) = position(compressed + 1);
            // all the 1s at or to the left of the bitPos
            uint256 mask = ~((1 << bitPos) - 1);
            uint256 masked = self[wordPos] & mask;

            // if there are no initialized ticks to the left of the current tick, return leftmost in the word
            initialized = masked != 0;
            // overflow/underflow is possible, but prevented externally by limiting both tickSpacing and tick
            next = initialized
                ? (compressed + 1 + int24(BitMath.leastSignificantBit(masked) - bitPos)) * tickSpacing
                : (compressed + 1 + int24(type(uint8).max - bitPos)) * tickSpacing;
        }
    }
}

File 8 of 31 : Position.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity >=0.5.0;

import './FullMath.sol';
import './FixedPoint128.sol';
import './LiquidityMath.sol';

/// @title Position
/// @notice Positions represent an owner address' liquidity between a lower and upper tick boundary
/// @dev Positions store additional state for tracking fees owed to the position
library Position {
    // info stored for each user's position
    struct Info {
        // the amount of liquidity owned by this position
        uint128 liquidity;
        // fee growth per unit of liquidity as of the last update to liquidity or fees owed
        uint256 feeGrowthInside0LastX128;
        uint256 feeGrowthInside1LastX128;
        // the fees owed to the position owner in token0/token1
        uint128 tokensOwed0;
        uint128 tokensOwed1;
    }

    /// @notice Returns the Info struct of a position, given an owner and position boundaries
    /// @param self The mapping containing all user positions
    /// @param owner The address of the position owner
    /// @param tickLower The lower tick boundary of the position
    /// @param tickUpper The upper tick boundary of the position
    /// @return position The position info struct of the given owners' position
    function get(
        mapping(bytes32 => Info) storage self,
        address owner,
        int24 tickLower,
        int24 tickUpper
    ) internal view returns (Position.Info storage position) {
        position = self[keccak256(abi.encodePacked(owner, tickLower, tickUpper))];
    }

    /// @notice Credits accumulated fees to a user's position
    /// @param self The individual position to update
    /// @param liquidityDelta The change in pool liquidity as a result of the position update
    /// @param feeGrowthInside0X128 The all-time fee growth in token0, per unit of liquidity, inside the position's tick boundaries
    /// @param feeGrowthInside1X128 The all-time fee growth in token1, per unit of liquidity, inside the position's tick boundaries
    function update(
        Info storage self,
        int128 liquidityDelta,
        uint256 feeGrowthInside0X128,
        uint256 feeGrowthInside1X128
    ) internal {
        Info memory _self = self;

        uint128 liquidityNext;
        if (liquidityDelta == 0) {
            require(_self.liquidity > 0, 'NP'); // disallow pokes for 0 liquidity positions
            liquidityNext = _self.liquidity;
        } else {
            liquidityNext = LiquidityMath.addDelta(_self.liquidity, liquidityDelta);
        }

        // calculate accumulated fees
        uint128 tokensOwed0 =
            uint128(
                FullMath.mulDiv(
                    feeGrowthInside0X128 - _self.feeGrowthInside0LastX128,
                    _self.liquidity,
                    FixedPoint128.Q128
                )
            );
        uint128 tokensOwed1 =
            uint128(
                FullMath.mulDiv(
                    feeGrowthInside1X128 - _self.feeGrowthInside1LastX128,
                    _self.liquidity,
                    FixedPoint128.Q128
                )
            );

        // update the position
        if (liquidityDelta != 0) self.liquidity = liquidityNext;
        self.feeGrowthInside0LastX128 = feeGrowthInside0X128;
        self.feeGrowthInside1LastX128 = feeGrowthInside1X128;
        if (tokensOwed0 > 0 || tokensOwed1 > 0) {
            // overflow is acceptable, have to withdraw before you hit type(uint128).max fees
            self.tokensOwed0 += tokensOwed0;
            self.tokensOwed1 += tokensOwed1;
        }
    }
}

File 9 of 31 : Oracle.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity >=0.5.0;

/// @title Oracle
/// @notice Provides price and liquidity data useful for a wide variety of system designs
/// @dev Instances of stored oracle data, "observations", are collected in the oracle array
/// Every pool is initialized with an oracle array length of 1. Anyone can pay the SSTOREs to increase the
/// maximum length of the oracle array. New slots will be added when the array is fully populated.
/// Observations are overwritten when the full length of the oracle array is populated.
/// The most recent observation is available, independent of the length of the oracle array, by passing 0 to observe()
library Oracle {
    struct Observation {
        // the block timestamp of the observation
        uint32 blockTimestamp;
        // the tick accumulator, i.e. tick * time elapsed since the pool was first initialized
        int56 tickCumulative;
        // the seconds per liquidity, i.e. seconds elapsed / max(1, liquidity) since the pool was first initialized
        uint160 secondsPerLiquidityCumulativeX128;
        // whether or not the observation is initialized
        bool initialized;
    }

    /// @notice Transforms a previous observation into a new observation, given the passage of time and the current tick and liquidity values
    /// @dev blockTimestamp _must_ be chronologically equal to or greater than last.blockTimestamp, safe for 0 or 1 overflows
    /// @param last The specified observation to be transformed
    /// @param blockTimestamp The timestamp of the new observation
    /// @param tick The active tick at the time of the new observation
    /// @param liquidity The total in-range liquidity at the time of the new observation
    /// @return Observation The newly populated observation
    function transform(
        Observation memory last,
        uint32 blockTimestamp,
        int24 tick,
        uint128 liquidity
    ) private pure returns (Observation memory) {
        uint32 delta = blockTimestamp - last.blockTimestamp;
        return
            Observation({
                blockTimestamp: blockTimestamp,
                tickCumulative: last.tickCumulative + int56(tick) * delta,
                secondsPerLiquidityCumulativeX128: last.secondsPerLiquidityCumulativeX128 +
                    ((uint160(delta) << 128) / (liquidity > 0 ? liquidity : 1)),
                initialized: true
            });
    }

    /// @notice Initialize the oracle array by writing the first slot. Called once for the lifecycle of the observations array
    /// @param self The stored oracle array
    /// @param time The time of the oracle initialization, via block.timestamp truncated to uint32
    /// @return cardinality The number of populated elements in the oracle array
    /// @return cardinalityNext The new length of the oracle array, independent of population
    function initialize(Observation[65535] storage self, uint32 time)
        internal
        returns (uint16 cardinality, uint16 cardinalityNext)
    {
        self[0] = Observation({
            blockTimestamp: time,
            tickCumulative: 0,
            secondsPerLiquidityCumulativeX128: 0,
            initialized: true
        });
        return (1, 1);
    }

    /// @notice Writes an oracle observation to the array
    /// @dev Writable at most once per block. Index represents the most recently written element. cardinality and index must be tracked externally.
    /// If the index is at the end of the allowable array length (according to cardinality), and the next cardinality
    /// is greater than the current one, cardinality may be increased. This restriction is created to preserve ordering.
    /// @param self The stored oracle array
    /// @param index The index of the observation that was most recently written to the observations array
    /// @param blockTimestamp The timestamp of the new observation
    /// @param tick The active tick at the time of the new observation
    /// @param liquidity The total in-range liquidity at the time of the new observation
    /// @param cardinality The number of populated elements in the oracle array
    /// @param cardinalityNext The new length of the oracle array, independent of population
    /// @return indexUpdated The new index of the most recently written element in the oracle array
    /// @return cardinalityUpdated The new cardinality of the oracle array
    function write(
        Observation[65535] storage self,
        uint16 index,
        uint32 blockTimestamp,
        int24 tick,
        uint128 liquidity,
        uint16 cardinality,
        uint16 cardinalityNext
    ) internal returns (uint16 indexUpdated, uint16 cardinalityUpdated) {
        Observation memory last = self[index];

        // early return if we've already written an observation this block
        if (last.blockTimestamp == blockTimestamp) return (index, cardinality);

        // if the conditions are right, we can bump the cardinality
        if (cardinalityNext > cardinality && index == (cardinality - 1)) {
            cardinalityUpdated = cardinalityNext;
        } else {
            cardinalityUpdated = cardinality;
        }

        indexUpdated = (index + 1) % cardinalityUpdated;
        self[indexUpdated] = transform(last, blockTimestamp, tick, liquidity);
    }

    /// @notice Prepares the oracle array to store up to `next` observations
    /// @param self The stored oracle array
    /// @param current The current next cardinality of the oracle array
    /// @param next The proposed next cardinality which will be populated in the oracle array
    /// @return next The next cardinality which will be populated in the oracle array
    function grow(
        Observation[65535] storage self,
        uint16 current,
        uint16 next
    ) internal returns (uint16) {
        require(current > 0, 'I');
        // no-op if the passed next value isn't greater than the current next value
        if (next <= current) return current;
        // store in each slot to prevent fresh SSTOREs in swaps
        // this data will not be used because the initialized boolean is still false
        for (uint16 i = current; i < next; i++) self[i].blockTimestamp = 1;
        return next;
    }

    /// @notice comparator for 32-bit timestamps
    /// @dev safe for 0 or 1 overflows, a and b _must_ be chronologically before or equal to time
    /// @param time A timestamp truncated to 32 bits
    /// @param a A comparison timestamp from which to determine the relative position of `time`
    /// @param b From which to determine the relative position of `time`
    /// @return bool Whether `a` is chronologically <= `b`
    function lte(
        uint32 time,
        uint32 a,
        uint32 b
    ) private pure returns (bool) {
        // if there hasn't been overflow, no need to adjust
        if (a <= time && b <= time) return a <= b;

        uint256 aAdjusted = a > time ? a : a + 2**32;
        uint256 bAdjusted = b > time ? b : b + 2**32;

        return aAdjusted <= bAdjusted;
    }

    /// @notice Fetches the observations beforeOrAt and atOrAfter a target, i.e. where [beforeOrAt, atOrAfter] is satisfied.
    /// The result may be the same observation, or adjacent observations.
    /// @dev The answer must be contained in the array, used when the target is located within the stored observation
    /// boundaries: older than the most recent observation and younger, or the same age as, the oldest observation
    /// @param self The stored oracle array
    /// @param time The current block.timestamp
    /// @param target The timestamp at which the reserved observation should be for
    /// @param index The index of the observation that was most recently written to the observations array
    /// @param cardinality The number of populated elements in the oracle array
    /// @return beforeOrAt The observation recorded before, or at, the target
    /// @return atOrAfter The observation recorded at, or after, the target
    function binarySearch(
        Observation[65535] storage self,
        uint32 time,
        uint32 target,
        uint16 index,
        uint16 cardinality
    ) private view returns (Observation memory beforeOrAt, Observation memory atOrAfter) {
        uint256 l = (index + 1) % cardinality; // oldest observation
        uint256 r = l + cardinality - 1; // newest observation
        uint256 i;
        while (true) {
            i = (l + r) / 2;

            beforeOrAt = self[i % cardinality];

            // we've landed on an uninitialized tick, keep searching higher (more recently)
            if (!beforeOrAt.initialized) {
                l = i + 1;
                continue;
            }

            atOrAfter = self[(i + 1) % cardinality];

            bool targetAtOrAfter = lte(time, beforeOrAt.blockTimestamp, target);

            // check if we've found the answer!
            if (targetAtOrAfter && lte(time, target, atOrAfter.blockTimestamp)) break;

            if (!targetAtOrAfter) r = i - 1;
            else l = i + 1;
        }
    }

    /// @notice Fetches the observations beforeOrAt and atOrAfter a given target, i.e. where [beforeOrAt, atOrAfter] is satisfied
    /// @dev Assumes there is at least 1 initialized observation.
    /// Used by observeSingle() to compute the counterfactual accumulator values as of a given block timestamp.
    /// @param self The stored oracle array
    /// @param time The current block.timestamp
    /// @param target The timestamp at which the reserved observation should be for
    /// @param tick The active tick at the time of the returned or simulated observation
    /// @param index The index of the observation that was most recently written to the observations array
    /// @param liquidity The total pool liquidity at the time of the call
    /// @param cardinality The number of populated elements in the oracle array
    /// @return beforeOrAt The observation which occurred at, or before, the given timestamp
    /// @return atOrAfter The observation which occurred at, or after, the given timestamp
    function getSurroundingObservations(
        Observation[65535] storage self,
        uint32 time,
        uint32 target,
        int24 tick,
        uint16 index,
        uint128 liquidity,
        uint16 cardinality
    ) private view returns (Observation memory beforeOrAt, Observation memory atOrAfter) {
        // optimistically set before to the newest observation
        beforeOrAt = self[index];

        // if the target is chronologically at or after the newest observation, we can early return
        if (lte(time, beforeOrAt.blockTimestamp, target)) {
            if (beforeOrAt.blockTimestamp == target) {
                // if newest observation equals target, we're in the same block, so we can ignore atOrAfter
                return (beforeOrAt, atOrAfter);
            } else {
                // otherwise, we need to transform
                return (beforeOrAt, transform(beforeOrAt, target, tick, liquidity));
            }
        }

        // now, set before to the oldest observation
        beforeOrAt = self[(index + 1) % cardinality];
        if (!beforeOrAt.initialized) beforeOrAt = self[0];

        // ensure that the target is chronologically at or after the oldest observation
        require(lte(time, beforeOrAt.blockTimestamp, target), 'OLD');

        // if we've reached this point, we have to binary search
        return binarySearch(self, time, target, index, cardinality);
    }

    /// @dev Reverts if an observation at or before the desired observation timestamp does not exist.
    /// 0 may be passed as `secondsAgo' to return the current cumulative values.
    /// If called with a timestamp falling between two observations, returns the counterfactual accumulator values
    /// at exactly the timestamp between the two observations.
    /// @param self The stored oracle array
    /// @param time The current block timestamp
    /// @param secondsAgo The amount of time to look back, in seconds, at which point to return an observation
    /// @param tick The current tick
    /// @param index The index of the observation that was most recently written to the observations array
    /// @param liquidity The current in-range pool liquidity
    /// @param cardinality The number of populated elements in the oracle array
    /// @return tickCumulative The tick * time elapsed since the pool was first initialized, as of `secondsAgo`
    /// @return secondsPerLiquidityCumulativeX128 The time elapsed / max(1, liquidity) since the pool was first initialized, as of `secondsAgo`
    function observeSingle(
        Observation[65535] storage self,
        uint32 time,
        uint32 secondsAgo,
        int24 tick,
        uint16 index,
        uint128 liquidity,
        uint16 cardinality
    ) internal view returns (int56 tickCumulative, uint160 secondsPerLiquidityCumulativeX128) {
        if (secondsAgo == 0) {
            Observation memory last = self[index];
            if (last.blockTimestamp != time) last = transform(last, time, tick, liquidity);
            return (last.tickCumulative, last.secondsPerLiquidityCumulativeX128);
        }

        uint32 target = time - secondsAgo;

        (Observation memory beforeOrAt, Observation memory atOrAfter) =
            getSurroundingObservations(self, time, target, tick, index, liquidity, cardinality);

        if (target == beforeOrAt.blockTimestamp) {
            // we're at the left boundary
            return (beforeOrAt.tickCumulative, beforeOrAt.secondsPerLiquidityCumulativeX128);
        } else if (target == atOrAfter.blockTimestamp) {
            // we're at the right boundary
            return (atOrAfter.tickCumulative, atOrAfter.secondsPerLiquidityCumulativeX128);
        } else {
            // we're in the middle
            uint32 observationTimeDelta = atOrAfter.blockTimestamp - beforeOrAt.blockTimestamp;
            uint32 targetDelta = target - beforeOrAt.blockTimestamp;
            return (
                beforeOrAt.tickCumulative +
                    ((atOrAfter.tickCumulative - beforeOrAt.tickCumulative) / observationTimeDelta) *
                    targetDelta,
                beforeOrAt.secondsPerLiquidityCumulativeX128 +
                    uint160(
                        (uint256(
                            atOrAfter.secondsPerLiquidityCumulativeX128 - beforeOrAt.secondsPerLiquidityCumulativeX128
                        ) * targetDelta) / observationTimeDelta
                    )
            );
        }
    }

    /// @notice Returns the accumulator values as of each time seconds ago from the given time in the array of `secondsAgos`
    /// @dev Reverts if `secondsAgos` > oldest observation
    /// @param self The stored oracle array
    /// @param time The current block.timestamp
    /// @param secondsAgos Each amount of time to look back, in seconds, at which point to return an observation
    /// @param tick The current tick
    /// @param index The index of the observation that was most recently written to the observations array
    /// @param liquidity The current in-range pool liquidity
    /// @param cardinality The number of populated elements in the oracle array
    /// @return tickCumulatives The tick * time elapsed since the pool was first initialized, as of each `secondsAgo`
    /// @return secondsPerLiquidityCumulativeX128s The cumulative seconds / max(1, liquidity) since the pool was first initialized, as of each `secondsAgo`
    function observe(
        Observation[65535] storage self,
        uint32 time,
        uint32[] memory secondsAgos,
        int24 tick,
        uint16 index,
        uint128 liquidity,
        uint16 cardinality
    ) internal view returns (int56[] memory tickCumulatives, uint160[] memory secondsPerLiquidityCumulativeX128s) {
        require(cardinality > 0, 'I');

        tickCumulatives = new int56[](secondsAgos.length);
        secondsPerLiquidityCumulativeX128s = new uint160[](secondsAgos.length);
        for (uint256 i = 0; i < secondsAgos.length; i++) {
            (tickCumulatives[i], secondsPerLiquidityCumulativeX128s[i]) = observeSingle(
                self,
                time,
                secondsAgos[i],
                tick,
                index,
                liquidity,
                cardinality
            );
        }
    }
}

File 10 of 31 : FullMath.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.4.0;

/// @title Contains 512-bit math functions
/// @notice Facilitates multiplication and division that can have overflow of an intermediate value without any loss of precision
/// @dev Handles "phantom overflow" i.e., allows multiplication and division where an intermediate value overflows 256 bits
library FullMath {
    /// @notice Calculates floor(a×b÷denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
    /// @param a The multiplicand
    /// @param b The multiplier
    /// @param denominator The divisor
    /// @return result The 256-bit result
    /// @dev Credit to Remco Bloemen under MIT license https://xn--2-umb.com/21/muldiv
    function mulDiv(
        uint256 a,
        uint256 b,
        uint256 denominator
    ) internal pure returns (uint256 result) {
        // 512-bit multiply [prod1 prod0] = a * b
        // Compute the product mod 2**256 and mod 2**256 - 1
        // then 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(a, b, not(0))
            prod0 := mul(a, b)
            prod1 := sub(sub(mm, prod0), lt(mm, prod0))
        }

        // Handle non-overflow cases, 256 by 256 division
        if (prod1 == 0) {
            require(denominator > 0);
            assembly {
                result := div(prod0, denominator)
            }
            return result;
        }

        // Make sure the result is less than 2**256.
        // Also prevents denominator == 0
        require(denominator > prod1);

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

        // Make division exact by subtracting the remainder from [prod1 prod0]
        // Compute remainder using mulmod
        uint256 remainder;
        assembly {
            remainder := mulmod(a, b, denominator)
        }
        // Subtract 256 bit number from 512 bit number
        assembly {
            prod1 := sub(prod1, gt(remainder, prod0))
            prod0 := sub(prod0, remainder)
        }

        // Factor powers of two out of denominator
        // Compute largest power of two divisor of denominator.
        // Always >= 1.
        uint256 twos = -denominator & denominator;
        // Divide denominator by power of two
        assembly {
            denominator := div(denominator, twos)
        }

        // Divide [prod1 prod0] by the factors of two
        assembly {
            prod0 := div(prod0, twos)
        }
        // Shift in bits from prod1 into prod0. For this we need
        // to flip `twos` such that it is 2**256 / twos.
        // If twos is zero, then it becomes one
        assembly {
            twos := add(div(sub(0, twos), twos), 1)
        }
        prod0 |= prod1 * twos;

        // 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
        // correct for four bits. That is, denominator * inv = 1 mod 2**4
        uint256 inv = (3 * denominator) ^ 2;
        // Now use 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.
        inv *= 2 - denominator * inv; // inverse mod 2**8
        inv *= 2 - denominator * inv; // inverse mod 2**16
        inv *= 2 - denominator * inv; // inverse mod 2**32
        inv *= 2 - denominator * inv; // inverse mod 2**64
        inv *= 2 - denominator * inv; // inverse mod 2**128
        inv *= 2 - denominator * inv; // 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 precoditions 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 * inv;
        return result;
    }

    /// @notice Calculates ceil(a×b÷denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
    /// @param a The multiplicand
    /// @param b The multiplier
    /// @param denominator The divisor
    /// @return result The 256-bit result
    function mulDivRoundingUp(
        uint256 a,
        uint256 b,
        uint256 denominator
    ) internal pure returns (uint256 result) {
        result = mulDiv(a, b, denominator);
        if (mulmod(a, b, denominator) > 0) {
            require(result < type(uint256).max);
            result++;
        }
    }
}

File 11 of 31 : FixedPoint128.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.4.0;

/// @title FixedPoint128
/// @notice A library for handling binary fixed point numbers, see https://en.wikipedia.org/wiki/Q_(number_format)
library FixedPoint128 {
    uint256 internal constant Q128 = 0x100000000000000000000000000000000;
}

File 12 of 31 : TransferHelper.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.6.0;

import '../interfaces/IERC20Minimal.sol';

/// @title TransferHelper
/// @notice Contains helper methods for interacting with ERC20 tokens that do not consistently return true/false
library TransferHelper {
    /// @notice Transfers tokens from msg.sender to a recipient
    /// @dev Calls transfer on token contract, errors with TF if transfer fails
    /// @param token The contract address of the token which will be transferred
    /// @param to The recipient of the transfer
    /// @param value The value of the transfer
    function safeTransfer(
        address token,
        address to,
        uint256 value
    ) internal {
        (bool success, bytes memory data) =
            token.call(abi.encodeWithSelector(IERC20Minimal.transfer.selector, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), 'TF');
    }
}

File 13 of 31 : TickMath.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;

/// @title Math library for computing sqrt prices from ticks and vice versa
/// @notice Computes sqrt price for ticks of size 1.0001, i.e. sqrt(1.0001^tick) as fixed point Q64.96 numbers. Supports
/// prices between 2**-128 and 2**128
library TickMath {
    /// @dev The minimum tick that may be passed to #getSqrtRatioAtTick computed from log base 1.0001 of 2**-128
    int24 internal constant MIN_TICK = -887272;
    /// @dev The maximum tick that may be passed to #getSqrtRatioAtTick computed from log base 1.0001 of 2**128
    int24 internal constant MAX_TICK = -MIN_TICK;

    /// @dev The minimum value that can be returned from #getSqrtRatioAtTick. Equivalent to getSqrtRatioAtTick(MIN_TICK)
    uint160 internal constant MIN_SQRT_RATIO = 4295128739;
    /// @dev The maximum value that can be returned from #getSqrtRatioAtTick. Equivalent to getSqrtRatioAtTick(MAX_TICK)
    uint160 internal constant MAX_SQRT_RATIO = 1461446703485210103287273052203988822378723970342;

    /// @notice Calculates sqrt(1.0001^tick) * 2^96
    /// @dev Throws if |tick| > max tick
    /// @param tick The input tick for the above formula
    /// @return sqrtPriceX96 A Fixed point Q64.96 number representing the sqrt of the ratio of the two assets (token1/token0)
    /// at the given tick
    function getSqrtRatioAtTick(int24 tick) internal pure returns (uint160 sqrtPriceX96) {
        uint256 absTick = tick < 0 ? uint256(-int256(tick)) : uint256(int256(tick));
        require(absTick <= uint256(MAX_TICK), 'T');

        uint256 ratio = absTick & 0x1 != 0 ? 0xfffcb933bd6fad37aa2d162d1a594001 : 0x100000000000000000000000000000000;
        if (absTick & 0x2 != 0) ratio = (ratio * 0xfff97272373d413259a46990580e213a) >> 128;
        if (absTick & 0x4 != 0) ratio = (ratio * 0xfff2e50f5f656932ef12357cf3c7fdcc) >> 128;
        if (absTick & 0x8 != 0) ratio = (ratio * 0xffe5caca7e10e4e61c3624eaa0941cd0) >> 128;
        if (absTick & 0x10 != 0) ratio = (ratio * 0xffcb9843d60f6159c9db58835c926644) >> 128;
        if (absTick & 0x20 != 0) ratio = (ratio * 0xff973b41fa98c081472e6896dfb254c0) >> 128;
        if (absTick & 0x40 != 0) ratio = (ratio * 0xff2ea16466c96a3843ec78b326b52861) >> 128;
        if (absTick & 0x80 != 0) ratio = (ratio * 0xfe5dee046a99a2a811c461f1969c3053) >> 128;
        if (absTick & 0x100 != 0) ratio = (ratio * 0xfcbe86c7900a88aedcffc83b479aa3a4) >> 128;
        if (absTick & 0x200 != 0) ratio = (ratio * 0xf987a7253ac413176f2b074cf7815e54) >> 128;
        if (absTick & 0x400 != 0) ratio = (ratio * 0xf3392b0822b70005940c7a398e4b70f3) >> 128;
        if (absTick & 0x800 != 0) ratio = (ratio * 0xe7159475a2c29b7443b29c7fa6e889d9) >> 128;
        if (absTick & 0x1000 != 0) ratio = (ratio * 0xd097f3bdfd2022b8845ad8f792aa5825) >> 128;
        if (absTick & 0x2000 != 0) ratio = (ratio * 0xa9f746462d870fdf8a65dc1f90e061e5) >> 128;
        if (absTick & 0x4000 != 0) ratio = (ratio * 0x70d869a156d2a1b890bb3df62baf32f7) >> 128;
        if (absTick & 0x8000 != 0) ratio = (ratio * 0x31be135f97d08fd981231505542fcfa6) >> 128;
        if (absTick & 0x10000 != 0) ratio = (ratio * 0x9aa508b5b7a84e1c677de54f3e99bc9) >> 128;
        if (absTick & 0x20000 != 0) ratio = (ratio * 0x5d6af8dedb81196699c329225ee604) >> 128;
        if (absTick & 0x40000 != 0) ratio = (ratio * 0x2216e584f5fa1ea926041bedfe98) >> 128;
        if (absTick & 0x80000 != 0) ratio = (ratio * 0x48a170391f7dc42444e8fa2) >> 128;

        if (tick > 0) ratio = type(uint256).max / ratio;

        // this divides by 1<<32 rounding up to go from a Q128.128 to a Q128.96.
        // we then downcast because we know the result always fits within 160 bits due to our tick input constraint
        // we round up in the division so getTickAtSqrtRatio of the output price is always consistent
        sqrtPriceX96 = uint160((ratio >> 32) + (ratio % (1 << 32) == 0 ? 0 : 1));
    }

    /// @notice Calculates the greatest tick value such that getRatioAtTick(tick) <= ratio
    /// @dev Throws in case sqrtPriceX96 < MIN_SQRT_RATIO, as MIN_SQRT_RATIO is the lowest value getRatioAtTick may
    /// ever return.
    /// @param sqrtPriceX96 The sqrt ratio for which to compute the tick as a Q64.96
    /// @return tick The greatest tick for which the ratio is less than or equal to the input ratio
    function getTickAtSqrtRatio(uint160 sqrtPriceX96) internal pure returns (int24 tick) {
        // second inequality must be < because the price can never reach the price at the max tick
        require(sqrtPriceX96 >= MIN_SQRT_RATIO && sqrtPriceX96 < MAX_SQRT_RATIO, 'R');
        uint256 ratio = uint256(sqrtPriceX96) << 32;

        uint256 r = ratio;
        uint256 msb = 0;

        assembly {
            let f := shl(7, gt(r, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF))
            msb := or(msb, f)
            r := shr(f, r)
        }
        assembly {
            let f := shl(6, gt(r, 0xFFFFFFFFFFFFFFFF))
            msb := or(msb, f)
            r := shr(f, r)
        }
        assembly {
            let f := shl(5, gt(r, 0xFFFFFFFF))
            msb := or(msb, f)
            r := shr(f, r)
        }
        assembly {
            let f := shl(4, gt(r, 0xFFFF))
            msb := or(msb, f)
            r := shr(f, r)
        }
        assembly {
            let f := shl(3, gt(r, 0xFF))
            msb := or(msb, f)
            r := shr(f, r)
        }
        assembly {
            let f := shl(2, gt(r, 0xF))
            msb := or(msb, f)
            r := shr(f, r)
        }
        assembly {
            let f := shl(1, gt(r, 0x3))
            msb := or(msb, f)
            r := shr(f, r)
        }
        assembly {
            let f := gt(r, 0x1)
            msb := or(msb, f)
        }

        if (msb >= 128) r = ratio >> (msb - 127);
        else r = ratio << (127 - msb);

        int256 log_2 = (int256(msb) - 128) << 64;

        assembly {
            r := shr(127, mul(r, r))
            let f := shr(128, r)
            log_2 := or(log_2, shl(63, f))
            r := shr(f, r)
        }
        assembly {
            r := shr(127, mul(r, r))
            let f := shr(128, r)
            log_2 := or(log_2, shl(62, f))
            r := shr(f, r)
        }
        assembly {
            r := shr(127, mul(r, r))
            let f := shr(128, r)
            log_2 := or(log_2, shl(61, f))
            r := shr(f, r)
        }
        assembly {
            r := shr(127, mul(r, r))
            let f := shr(128, r)
            log_2 := or(log_2, shl(60, f))
            r := shr(f, r)
        }
        assembly {
            r := shr(127, mul(r, r))
            let f := shr(128, r)
            log_2 := or(log_2, shl(59, f))
            r := shr(f, r)
        }
        assembly {
            r := shr(127, mul(r, r))
            let f := shr(128, r)
            log_2 := or(log_2, shl(58, f))
            r := shr(f, r)
        }
        assembly {
            r := shr(127, mul(r, r))
            let f := shr(128, r)
            log_2 := or(log_2, shl(57, f))
            r := shr(f, r)
        }
        assembly {
            r := shr(127, mul(r, r))
            let f := shr(128, r)
            log_2 := or(log_2, shl(56, f))
            r := shr(f, r)
        }
        assembly {
            r := shr(127, mul(r, r))
            let f := shr(128, r)
            log_2 := or(log_2, shl(55, f))
            r := shr(f, r)
        }
        assembly {
            r := shr(127, mul(r, r))
            let f := shr(128, r)
            log_2 := or(log_2, shl(54, f))
            r := shr(f, r)
        }
        assembly {
            r := shr(127, mul(r, r))
            let f := shr(128, r)
            log_2 := or(log_2, shl(53, f))
            r := shr(f, r)
        }
        assembly {
            r := shr(127, mul(r, r))
            let f := shr(128, r)
            log_2 := or(log_2, shl(52, f))
            r := shr(f, r)
        }
        assembly {
            r := shr(127, mul(r, r))
            let f := shr(128, r)
            log_2 := or(log_2, shl(51, f))
            r := shr(f, r)
        }
        assembly {
            r := shr(127, mul(r, r))
            let f := shr(128, r)
            log_2 := or(log_2, shl(50, f))
        }

        int256 log_sqrt10001 = log_2 * 255738958999603826347141; // 128.128 number

        int24 tickLow = int24((log_sqrt10001 - 3402992956809132418596140100660247210) >> 128);
        int24 tickHi = int24((log_sqrt10001 + 291339464771989622907027621153398088495) >> 128);

        tick = tickLow == tickHi ? tickLow : getSqrtRatioAtTick(tickHi) <= sqrtPriceX96 ? tickHi : tickLow;
    }
}

File 14 of 31 : LiquidityMath.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;

/// @title Math library for liquidity
library LiquidityMath {
    /// @notice Add a signed liquidity delta to liquidity and revert if it overflows or underflows
    /// @param x The liquidity before change
    /// @param y The delta by which liquidity should be changed
    /// @return z The liquidity delta
    function addDelta(uint128 x, int128 y) internal pure returns (uint128 z) {
        if (y < 0) {
            require((z = x - uint128(-y)) < x, 'LS');
        } else {
            require((z = x + uint128(y)) >= x, 'LA');
        }
    }
}

File 15 of 31 : SqrtPriceMath.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity >=0.5.0;

import './LowGasSafeMath.sol';
import './SafeCast.sol';

import './FullMath.sol';
import './UnsafeMath.sol';
import './FixedPoint96.sol';

/// @title Functions based on Q64.96 sqrt price and liquidity
/// @notice Contains the math that uses square root of price as a Q64.96 and liquidity to compute deltas
library SqrtPriceMath {
    using LowGasSafeMath for uint256;
    using SafeCast for uint256;

    /// @notice Gets the next sqrt price given a delta of token0
    /// @dev Always rounds up, because in the exact output case (increasing price) we need to move the price at least
    /// far enough to get the desired output amount, and in the exact input case (decreasing price) we need to move the
    /// price less in order to not send too much output.
    /// The most precise formula for this is liquidity * sqrtPX96 / (liquidity +- amount * sqrtPX96),
    /// if this is impossible because of overflow, we calculate liquidity / (liquidity / sqrtPX96 +- amount).
    /// @param sqrtPX96 The starting price, i.e. before accounting for the token0 delta
    /// @param liquidity The amount of usable liquidity
    /// @param amount How much of token0 to add or remove from virtual reserves
    /// @param add Whether to add or remove the amount of token0
    /// @return The price after adding or removing amount, depending on add
    function getNextSqrtPriceFromAmount0RoundingUp(
        uint160 sqrtPX96,
        uint128 liquidity,
        uint256 amount,
        bool add
    ) internal pure returns (uint160) {
        // we short circuit amount == 0 because the result is otherwise not guaranteed to equal the input price
        if (amount == 0) return sqrtPX96;
        uint256 numerator1 = uint256(liquidity) << FixedPoint96.RESOLUTION;

        if (add) {
            uint256 product;
            if ((product = amount * sqrtPX96) / amount == sqrtPX96) {
                uint256 denominator = numerator1 + product;
                if (denominator >= numerator1)
                    // always fits in 160 bits
                    return uint160(FullMath.mulDivRoundingUp(numerator1, sqrtPX96, denominator));
            }

            return uint160(UnsafeMath.divRoundingUp(numerator1, (numerator1 / sqrtPX96).add(amount)));
        } else {
            uint256 product;
            // if the product overflows, we know the denominator underflows
            // in addition, we must check that the denominator does not underflow
            require((product = amount * sqrtPX96) / amount == sqrtPX96 && numerator1 > product);
            uint256 denominator = numerator1 - product;
            return FullMath.mulDivRoundingUp(numerator1, sqrtPX96, denominator).toUint160();
        }
    }

    /// @notice Gets the next sqrt price given a delta of token1
    /// @dev Always rounds down, because in the exact output case (decreasing price) we need to move the price at least
    /// far enough to get the desired output amount, and in the exact input case (increasing price) we need to move the
    /// price less in order to not send too much output.
    /// The formula we compute is within <1 wei of the lossless version: sqrtPX96 +- amount / liquidity
    /// @param sqrtPX96 The starting price, i.e., before accounting for the token1 delta
    /// @param liquidity The amount of usable liquidity
    /// @param amount How much of token1 to add, or remove, from virtual reserves
    /// @param add Whether to add, or remove, the amount of token1
    /// @return The price after adding or removing `amount`
    function getNextSqrtPriceFromAmount1RoundingDown(
        uint160 sqrtPX96,
        uint128 liquidity,
        uint256 amount,
        bool add
    ) internal pure returns (uint160) {
        // if we're adding (subtracting), rounding down requires rounding the quotient down (up)
        // in both cases, avoid a mulDiv for most inputs
        if (add) {
            uint256 quotient =
                (
                    amount <= type(uint160).max
                        ? (amount << FixedPoint96.RESOLUTION) / liquidity
                        : FullMath.mulDiv(amount, FixedPoint96.Q96, liquidity)
                );

            return uint256(sqrtPX96).add(quotient).toUint160();
        } else {
            uint256 quotient =
                (
                    amount <= type(uint160).max
                        ? UnsafeMath.divRoundingUp(amount << FixedPoint96.RESOLUTION, liquidity)
                        : FullMath.mulDivRoundingUp(amount, FixedPoint96.Q96, liquidity)
                );

            require(sqrtPX96 > quotient);
            // always fits 160 bits
            return uint160(sqrtPX96 - quotient);
        }
    }

    /// @notice Gets the next sqrt price given an input amount of token0 or token1
    /// @dev Throws if price or liquidity are 0, or if the next price is out of bounds
    /// @param sqrtPX96 The starting price, i.e., before accounting for the input amount
    /// @param liquidity The amount of usable liquidity
    /// @param amountIn How much of token0, or token1, is being swapped in
    /// @param zeroForOne Whether the amount in is token0 or token1
    /// @return sqrtQX96 The price after adding the input amount to token0 or token1
    function getNextSqrtPriceFromInput(
        uint160 sqrtPX96,
        uint128 liquidity,
        uint256 amountIn,
        bool zeroForOne
    ) internal pure returns (uint160 sqrtQX96) {
        require(sqrtPX96 > 0);
        require(liquidity > 0);

        // round to make sure that we don't pass the target price
        return
            zeroForOne
                ? getNextSqrtPriceFromAmount0RoundingUp(sqrtPX96, liquidity, amountIn, true)
                : getNextSqrtPriceFromAmount1RoundingDown(sqrtPX96, liquidity, amountIn, true);
    }

    /// @notice Gets the next sqrt price given an output amount of token0 or token1
    /// @dev Throws if price or liquidity are 0 or the next price is out of bounds
    /// @param sqrtPX96 The starting price before accounting for the output amount
    /// @param liquidity The amount of usable liquidity
    /// @param amountOut How much of token0, or token1, is being swapped out
    /// @param zeroForOne Whether the amount out is token0 or token1
    /// @return sqrtQX96 The price after removing the output amount of token0 or token1
    function getNextSqrtPriceFromOutput(
        uint160 sqrtPX96,
        uint128 liquidity,
        uint256 amountOut,
        bool zeroForOne
    ) internal pure returns (uint160 sqrtQX96) {
        require(sqrtPX96 > 0);
        require(liquidity > 0);

        // round to make sure that we pass the target price
        return
            zeroForOne
                ? getNextSqrtPriceFromAmount1RoundingDown(sqrtPX96, liquidity, amountOut, false)
                : getNextSqrtPriceFromAmount0RoundingUp(sqrtPX96, liquidity, amountOut, false);
    }

    /// @notice Gets the amount0 delta between two prices
    /// @dev Calculates liquidity / sqrt(lower) - liquidity / sqrt(upper),
    /// i.e. liquidity * (sqrt(upper) - sqrt(lower)) / (sqrt(upper) * sqrt(lower))
    /// @param sqrtRatioAX96 A sqrt price
    /// @param sqrtRatioBX96 Another sqrt price
    /// @param liquidity The amount of usable liquidity
    /// @param roundUp Whether to round the amount up or down
    /// @return amount0 Amount of token0 required to cover a position of size liquidity between the two passed prices
    function getAmount0Delta(
        uint160 sqrtRatioAX96,
        uint160 sqrtRatioBX96,
        uint128 liquidity,
        bool roundUp
    ) internal pure returns (uint256 amount0) {
        if (sqrtRatioAX96 > sqrtRatioBX96) (sqrtRatioAX96, sqrtRatioBX96) = (sqrtRatioBX96, sqrtRatioAX96);

        uint256 numerator1 = uint256(liquidity) << FixedPoint96.RESOLUTION;
        uint256 numerator2 = sqrtRatioBX96 - sqrtRatioAX96;

        require(sqrtRatioAX96 > 0);

        return
            roundUp
                ? UnsafeMath.divRoundingUp(
                    FullMath.mulDivRoundingUp(numerator1, numerator2, sqrtRatioBX96),
                    sqrtRatioAX96
                )
                : FullMath.mulDiv(numerator1, numerator2, sqrtRatioBX96) / sqrtRatioAX96;
    }

    /// @notice Gets the amount1 delta between two prices
    /// @dev Calculates liquidity * (sqrt(upper) - sqrt(lower))
    /// @param sqrtRatioAX96 A sqrt price
    /// @param sqrtRatioBX96 Another sqrt price
    /// @param liquidity The amount of usable liquidity
    /// @param roundUp Whether to round the amount up, or down
    /// @return amount1 Amount of token1 required to cover a position of size liquidity between the two passed prices
    function getAmount1Delta(
        uint160 sqrtRatioAX96,
        uint160 sqrtRatioBX96,
        uint128 liquidity,
        bool roundUp
    ) internal pure returns (uint256 amount1) {
        if (sqrtRatioAX96 > sqrtRatioBX96) (sqrtRatioAX96, sqrtRatioBX96) = (sqrtRatioBX96, sqrtRatioAX96);

        return
            roundUp
                ? FullMath.mulDivRoundingUp(liquidity, sqrtRatioBX96 - sqrtRatioAX96, FixedPoint96.Q96)
                : FullMath.mulDiv(liquidity, sqrtRatioBX96 - sqrtRatioAX96, FixedPoint96.Q96);
    }

    /// @notice Helper that gets signed token0 delta
    /// @param sqrtRatioAX96 A sqrt price
    /// @param sqrtRatioBX96 Another sqrt price
    /// @param liquidity The change in liquidity for which to compute the amount0 delta
    /// @return amount0 Amount of token0 corresponding to the passed liquidityDelta between the two prices
    function getAmount0Delta(
        uint160 sqrtRatioAX96,
        uint160 sqrtRatioBX96,
        int128 liquidity
    ) internal pure returns (int256 amount0) {
        return
            liquidity < 0
                ? -getAmount0Delta(sqrtRatioAX96, sqrtRatioBX96, uint128(-liquidity), false).toInt256()
                : getAmount0Delta(sqrtRatioAX96, sqrtRatioBX96, uint128(liquidity), true).toInt256();
    }

    /// @notice Helper that gets signed token1 delta
    /// @param sqrtRatioAX96 A sqrt price
    /// @param sqrtRatioBX96 Another sqrt price
    /// @param liquidity The change in liquidity for which to compute the amount1 delta
    /// @return amount1 Amount of token1 corresponding to the passed liquidityDelta between the two prices
    function getAmount1Delta(
        uint160 sqrtRatioAX96,
        uint160 sqrtRatioBX96,
        int128 liquidity
    ) internal pure returns (int256 amount1) {
        return
            liquidity < 0
                ? -getAmount1Delta(sqrtRatioAX96, sqrtRatioBX96, uint128(-liquidity), false).toInt256()
                : getAmount1Delta(sqrtRatioAX96, sqrtRatioBX96, uint128(liquidity), true).toInt256();
    }
}

File 16 of 31 : SwapMath.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity >=0.5.0;

import './FullMath.sol';
import './SqrtPriceMath.sol';

/// @title Computes the result of a swap within ticks
/// @notice Contains methods for computing the result of a swap within a single tick price range, i.e., a single tick.
library SwapMath {
    /// @notice Computes the result of swapping some amount in, or amount out, given the parameters of the swap
    /// @dev The fee, plus the amount in, will never exceed the amount remaining if the swap's `amountSpecified` is positive
    /// @param sqrtRatioCurrentX96 The current sqrt price of the pool
    /// @param sqrtRatioTargetX96 The price that cannot be exceeded, from which the direction of the swap is inferred
    /// @param liquidity The usable liquidity
    /// @param amountRemaining How much input or output amount is remaining to be swapped in/out
    /// @param feePips The fee taken from the input amount, expressed in hundredths of a bip
    /// @return sqrtRatioNextX96 The price after swapping the amount in/out, not to exceed the price target
    /// @return amountIn The amount to be swapped in, of either token0 or token1, based on the direction of the swap
    /// @return amountOut The amount to be received, of either token0 or token1, based on the direction of the swap
    /// @return feeAmount The amount of input that will be taken as a fee
    function computeSwapStep(
        uint160 sqrtRatioCurrentX96,
        uint160 sqrtRatioTargetX96,
        uint128 liquidity,
        int256 amountRemaining,
        uint24 feePips
    )
        internal
        pure
        returns (
            uint160 sqrtRatioNextX96,
            uint256 amountIn,
            uint256 amountOut,
            uint256 feeAmount
        )
    {
        bool zeroForOne = sqrtRatioCurrentX96 >= sqrtRatioTargetX96;
        bool exactIn = amountRemaining >= 0;

        if (exactIn) {
            uint256 amountRemainingLessFee = FullMath.mulDiv(uint256(amountRemaining), 1e6 - feePips, 1e6);
            amountIn = zeroForOne
                ? SqrtPriceMath.getAmount0Delta(sqrtRatioTargetX96, sqrtRatioCurrentX96, liquidity, true)
                : SqrtPriceMath.getAmount1Delta(sqrtRatioCurrentX96, sqrtRatioTargetX96, liquidity, true);
            if (amountRemainingLessFee >= amountIn) sqrtRatioNextX96 = sqrtRatioTargetX96;
            else
                sqrtRatioNextX96 = SqrtPriceMath.getNextSqrtPriceFromInput(
                    sqrtRatioCurrentX96,
                    liquidity,
                    amountRemainingLessFee,
                    zeroForOne
                );
        } else {
            amountOut = zeroForOne
                ? SqrtPriceMath.getAmount1Delta(sqrtRatioTargetX96, sqrtRatioCurrentX96, liquidity, false)
                : SqrtPriceMath.getAmount0Delta(sqrtRatioCurrentX96, sqrtRatioTargetX96, liquidity, false);
            if (uint256(-amountRemaining) >= amountOut) sqrtRatioNextX96 = sqrtRatioTargetX96;
            else
                sqrtRatioNextX96 = SqrtPriceMath.getNextSqrtPriceFromOutput(
                    sqrtRatioCurrentX96,
                    liquidity,
                    uint256(-amountRemaining),
                    zeroForOne
                );
        }

        bool max = sqrtRatioTargetX96 == sqrtRatioNextX96;

        // get the input/output amounts
        if (zeroForOne) {
            amountIn = max && exactIn
                ? amountIn
                : SqrtPriceMath.getAmount0Delta(sqrtRatioNextX96, sqrtRatioCurrentX96, liquidity, true);
            amountOut = max && !exactIn
                ? amountOut
                : SqrtPriceMath.getAmount1Delta(sqrtRatioNextX96, sqrtRatioCurrentX96, liquidity, false);
        } else {
            amountIn = max && exactIn
                ? amountIn
                : SqrtPriceMath.getAmount1Delta(sqrtRatioCurrentX96, sqrtRatioNextX96, liquidity, true);
            amountOut = max && !exactIn
                ? amountOut
                : SqrtPriceMath.getAmount0Delta(sqrtRatioCurrentX96, sqrtRatioNextX96, liquidity, false);
        }

        // cap the output amount to not exceed the remaining output amount
        if (!exactIn && amountOut > uint256(-amountRemaining)) {
            amountOut = uint256(-amountRemaining);
        }

        if (exactIn && sqrtRatioNextX96 != sqrtRatioTargetX96) {
            // we didn't reach the target, so take the remainder of the maximum input as fee
            feeAmount = uint256(amountRemaining) - amountIn;
        } else {
            feeAmount = FullMath.mulDivRoundingUp(amountIn, feePips, 1e6 - feePips);
        }
    }
}

File 17 of 31 : IUniswapV3PoolDeployer.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;

/// @title An interface for a contract that is capable of deploying Uniswap V3 Pools
/// @notice A contract that constructs a pool must implement this to pass arguments to the pool
/// @dev This is used to avoid having constructor arguments in the pool contract, which results in the init code hash
/// of the pool being constant allowing the CREATE2 address of the pool to be cheaply computed on-chain
interface IUniswapV3PoolDeployer {
    /// @notice Get the parameters to be used in constructing the pool, set transiently during pool creation.
    /// @dev Called by the pool constructor to fetch the parameters of the pool
    /// Returns factory The factory address
    /// Returns token0 The first token of the pool by address sort order
    /// Returns token1 The second token of the pool by address sort order
    /// Returns fee The fee collected upon every swap in the pool, denominated in hundredths of a bip
    /// Returns tickSpacing The minimum number of ticks between initialized ticks
    function parameters()
        external
        view
        returns (
            address factory,
            address token0,
            address token1,
            uint24 fee,
            int24 tickSpacing
        );
}

File 18 of 31 : IUniswapV3Factory.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;

/// @title The interface for the Uniswap V3 Factory
/// @notice The Uniswap V3 Factory facilitates creation of Uniswap V3 pools and control over the protocol fees
interface IUniswapV3Factory {
    /// @notice Emitted when the owner of the factory is changed
    /// @param oldOwner The owner before the owner was changed
    /// @param newOwner The owner after the owner was changed
    event OwnerChanged(address indexed oldOwner, address indexed newOwner);

    /// @notice Emitted when a pool is created
    /// @param token0 The first token of the pool by address sort order
    /// @param token1 The second token of the pool by address sort order
    /// @param fee The fee collected upon every swap in the pool, denominated in hundredths of a bip
    /// @param tickSpacing The minimum number of ticks between initialized ticks
    /// @param pool The address of the created pool
    event PoolCreated(
        address indexed token0,
        address indexed token1,
        uint24 indexed fee,
        int24 tickSpacing,
        address pool
    );

    /// @notice Emitted when a new fee amount is enabled for pool creation via the factory
    /// @param fee The enabled fee, denominated in hundredths of a bip
    /// @param tickSpacing The minimum number of ticks between initialized ticks for pools created with the given fee
    event FeeAmountEnabled(uint24 indexed fee, int24 indexed tickSpacing);

    /// @notice Returns the current owner of the factory
    /// @dev Can be changed by the current owner via setOwner
    /// @return The address of the factory owner
    function owner() external view returns (address);

    /// @notice Returns the tick spacing for a given fee amount, if enabled, or 0 if not enabled
    /// @dev A fee amount can never be removed, so this value should be hard coded or cached in the calling context
    /// @param fee The enabled fee, denominated in hundredths of a bip. Returns 0 in case of unenabled fee
    /// @return The tick spacing
    function feeAmountTickSpacing(uint24 fee) external view returns (int24);

    /// @notice Returns the pool address for a given pair of tokens and a fee, or address 0 if it does not exist
    /// @dev tokenA and tokenB may be passed in either token0/token1 or token1/token0 order
    /// @param tokenA The contract address of either token0 or token1
    /// @param tokenB The contract address of the other token
    /// @param fee The fee collected upon every swap in the pool, denominated in hundredths of a bip
    /// @return pool The pool address
    function getPool(
        address tokenA,
        address tokenB,
        uint24 fee
    ) external view returns (address pool);

    /// @notice Creates a pool for the given two tokens and fee
    /// @param tokenA One of the two tokens in the desired pool
    /// @param tokenB The other of the two tokens in the desired pool
    /// @param fee The desired fee for the pool
    /// @dev tokenA and tokenB may be passed in either order: token0/token1 or token1/token0. tickSpacing is retrieved
    /// from the fee. The call will revert if the pool already exists, the fee is invalid, or the token arguments
    /// are invalid.
    /// @return pool The address of the newly created pool
    function createPool(
        address tokenA,
        address tokenB,
        uint24 fee
    ) external returns (address pool);

    /// @notice Updates the owner of the factory
    /// @dev Must be called by the current owner
    /// @param _owner The new owner of the factory
    function setOwner(address _owner) external;

    /// @notice Enables a fee amount with the given tickSpacing
    /// @dev Fee amounts may never be removed once enabled
    /// @param fee The fee amount to enable, denominated in hundredths of a bip (i.e. 1e-6)
    /// @param tickSpacing The spacing between ticks to be enforced for all pools created with the given fee amount
    function enableFeeAmount(uint24 fee, int24 tickSpacing) external;
}

File 19 of 31 : IERC20Minimal.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;

/// @title Minimal ERC20 interface for Uniswap
/// @notice Contains a subset of the full ERC20 interface that is used in Uniswap V3
interface IERC20Minimal {
    /// @notice Returns the balance of a token
    /// @param account The account for which to look up the number of tokens it has, i.e. its balance
    /// @return The number of tokens held by the account
    function balanceOf(address account) external view returns (uint256);

    /// @notice Transfers the amount of token from the `msg.sender` to the recipient
    /// @param recipient The account that will receive the amount transferred
    /// @param amount The number of tokens to send from the sender to the recipient
    /// @return Returns true for a successful transfer, false for an unsuccessful transfer
    function transfer(address recipient, uint256 amount) external returns (bool);

    /// @notice Returns the current allowance given to a spender by an owner
    /// @param owner The account of the token owner
    /// @param spender The account of the token spender
    /// @return The current allowance granted by `owner` to `spender`
    function allowance(address owner, address spender) external view returns (uint256);

    /// @notice Sets the allowance of a spender from the `msg.sender` to the value `amount`
    /// @param spender The account which will be allowed to spend a given amount of the owners tokens
    /// @param amount The amount of tokens allowed to be used by `spender`
    /// @return Returns true for a successful approval, false for unsuccessful
    function approve(address spender, uint256 amount) external returns (bool);

    /// @notice Transfers `amount` tokens from `sender` to `recipient` up to the allowance given to the `msg.sender`
    /// @param sender The account from which the transfer will be initiated
    /// @param recipient The recipient of the transfer
    /// @param amount The amount of the transfer
    /// @return Returns true for a successful transfer, false for unsuccessful
    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) external returns (bool);

    /// @notice Event emitted when tokens are transferred from one address to another, either via `#transfer` or `#transferFrom`.
    /// @param from The account from which the tokens were sent, i.e. the balance decreased
    /// @param to The account to which the tokens were sent, i.e. the balance increased
    /// @param value The amount of tokens that were transferred
    event Transfer(address indexed from, address indexed to, uint256 value);

    /// @notice Event emitted when the approval amount for the spender of a given owner's tokens changes.
    /// @param owner The account that approved spending of its tokens
    /// @param spender The account for which the spending allowance was modified
    /// @param value The new allowance from the owner to the spender
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

File 20 of 31 : IUniswapV3MintCallback.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;

/// @title Callback for IUniswapV3PoolActions#mint
/// @notice Any contract that calls IUniswapV3PoolActions#mint must implement this interface
interface IUniswapV3MintCallback {
    /// @notice Called to `msg.sender` after minting liquidity to a position from IUniswapV3Pool#mint.
    /// @dev In the implementation you must pay the pool tokens owed for the minted liquidity.
    /// The caller of this method must be checked to be a UniswapV3Pool deployed by the canonical UniswapV3Factory.
    /// @param amount0Owed The amount of token0 due to the pool for the minted liquidity
    /// @param amount1Owed The amount of token1 due to the pool for the minted liquidity
    /// @param data Any data passed through by the caller via the IUniswapV3PoolActions#mint call
    function uniswapV3MintCallback(
        uint256 amount0Owed,
        uint256 amount1Owed,
        bytes calldata data
    ) external;
}

File 21 of 31 : IUniswapV3SwapCallback.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;

/// @title Callback for IUniswapV3PoolActions#swap
/// @notice Any contract that calls IUniswapV3PoolActions#swap must implement this interface
interface IUniswapV3SwapCallback {
    /// @notice Called to `msg.sender` after executing a swap via IUniswapV3Pool#swap.
    /// @dev In the implementation you must pay the pool tokens owed for the swap.
    /// The caller of this method must be checked to be a UniswapV3Pool deployed by the canonical UniswapV3Factory.
    /// amount0Delta and amount1Delta can both be 0 if no tokens were swapped.
    /// @param amount0Delta The amount of token0 that was sent (negative) or must be received (positive) by the pool by
    /// the end of the swap. If positive, the callback must send that amount of token0 to the pool.
    /// @param amount1Delta The amount of token1 that was sent (negative) or must be received (positive) by the pool by
    /// the end of the swap. If positive, the callback must send that amount of token1 to the pool.
    /// @param data Any data passed through by the caller via the IUniswapV3PoolActions#swap call
    function uniswapV3SwapCallback(
        int256 amount0Delta,
        int256 amount1Delta,
        bytes calldata data
    ) external;
}

File 22 of 31 : IUniswapV3FlashCallback.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;

/// @title Callback for IUniswapV3PoolActions#flash
/// @notice Any contract that calls IUniswapV3PoolActions#flash must implement this interface
interface IUniswapV3FlashCallback {
    /// @notice Called to `msg.sender` after transferring to the recipient from IUniswapV3Pool#flash.
    /// @dev In the implementation you must repay the pool the tokens sent by flash plus the computed fee amounts.
    /// The caller of this method must be checked to be a UniswapV3Pool deployed by the canonical UniswapV3Factory.
    /// @param fee0 The fee amount in token0 due to the pool by the end of the flash
    /// @param fee1 The fee amount in token1 due to the pool by the end of the flash
    /// @param data Any data passed through by the caller via the IUniswapV3PoolActions#flash call
    function uniswapV3FlashCallback(
        uint256 fee0,
        uint256 fee1,
        bytes calldata data
    ) external;
}

File 23 of 31 : IUniswapV3PoolImmutables.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;

/// @title Pool state that never changes
/// @notice These parameters are fixed for a pool forever, i.e., the methods will always return the same values
interface IUniswapV3PoolImmutables {
    /// @notice The contract that deployed the pool, which must adhere to the IUniswapV3Factory interface
    /// @return The contract address
    function factory() external view returns (address);

    /// @notice The first of the two tokens of the pool, sorted by address
    /// @return The token contract address
    function token0() external view returns (address);

    /// @notice The second of the two tokens of the pool, sorted by address
    /// @return The token contract address
    function token1() external view returns (address);

    /// @notice The pool's fee in hundredths of a bip, i.e. 1e-6
    /// @return The fee
    function fee() external view returns (uint24);

    /// @notice The pool tick spacing
    /// @dev Ticks can only be used at multiples of this value, minimum of 1 and always positive
    /// e.g.: a tickSpacing of 3 means ticks can be initialized every 3rd tick, i.e., ..., -6, -3, 0, 3, 6, ...
    /// This value is an int24 to avoid casting even though it is always positive.
    /// @return The tick spacing
    function tickSpacing() external view returns (int24);

    /// @notice The maximum amount of position liquidity that can use any tick in the range
    /// @dev This parameter is enforced per tick to prevent liquidity from overflowing a uint128 at any point, and
    /// also prevents out-of-range liquidity from being used to prevent adding in-range liquidity to a pool
    /// @return The max amount of liquidity per tick
    function maxLiquidityPerTick() external view returns (uint128);
}

File 24 of 31 : IUniswapV3PoolState.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;

/// @title Pool state that can change
/// @notice These methods compose the pool's state, and can change with any frequency including multiple times
/// per transaction
interface IUniswapV3PoolState {
    /// @notice The 0th storage slot in the pool stores many values, and is exposed as a single method to save gas
    /// when accessed externally.
    /// @return sqrtPriceX96 The current price of the pool as a sqrt(token1/token0) Q64.96 value
    /// tick The current tick of the pool, i.e. according to the last tick transition that was run.
    /// This value may not always be equal to SqrtTickMath.getTickAtSqrtRatio(sqrtPriceX96) if the price is on a tick
    /// boundary.
    /// observationIndex The index of the last oracle observation that was written,
    /// observationCardinality The current maximum number of observations stored in the pool,
    /// observationCardinalityNext The next maximum number of observations, to be updated when the observation.
    /// feeProtocol The protocol fee for both tokens of the pool.
    /// Encoded as two 4 bit values, where the protocol fee of token1 is shifted 4 bits and the protocol fee of token0
    /// is the lower 4 bits. Used as the denominator of a fraction of the swap fee, e.g. 4 means 1/4th of the swap fee.
    /// unlocked Whether the pool is currently locked to reentrancy
    function slot0()
        external
        view
        returns (
            uint160 sqrtPriceX96,
            int24 tick,
            uint16 observationIndex,
            uint16 observationCardinality,
            uint16 observationCardinalityNext,
            uint8 feeProtocol,
            bool unlocked
        );

    /// @notice The fee growth as a Q128.128 fees of token0 collected per unit of liquidity for the entire life of the pool
    /// @dev This value can overflow the uint256
    function feeGrowthGlobal0X128() external view returns (uint256);

    /// @notice The fee growth as a Q128.128 fees of token1 collected per unit of liquidity for the entire life of the pool
    /// @dev This value can overflow the uint256
    function feeGrowthGlobal1X128() external view returns (uint256);

    /// @notice The amounts of token0 and token1 that are owed to the protocol
    /// @dev Protocol fees will never exceed uint128 max in either token
    function protocolFees() external view returns (uint128 token0, uint128 token1);

    /// @notice The currently in range liquidity available to the pool
    /// @dev This value has no relationship to the total liquidity across all ticks
    function liquidity() external view returns (uint128);

    /// @notice Look up information about a specific tick in the pool
    /// @param tick The tick to look up
    /// @return liquidityGross the total amount of position liquidity that uses the pool either as tick lower or
    /// tick upper,
    /// liquidityNet how much liquidity changes when the pool price crosses the tick,
    /// feeGrowthOutside0X128 the fee growth on the other side of the tick from the current tick in token0,
    /// feeGrowthOutside1X128 the fee growth on the other side of the tick from the current tick in token1,
    /// tickCumulativeOutside the cumulative tick value on the other side of the tick from the current tick
    /// secondsPerLiquidityOutsideX128 the seconds spent per liquidity on the other side of the tick from the current tick,
    /// secondsOutside the seconds spent on the other side of the tick from the current tick,
    /// initialized Set to true if the tick is initialized, i.e. liquidityGross is greater than 0, otherwise equal to false.
    /// Outside values can only be used if the tick is initialized, i.e. if liquidityGross is greater than 0.
    /// In addition, these values are only relative and must be used only in comparison to previous snapshots for
    /// a specific position.
    function ticks(int24 tick)
        external
        view
        returns (
            uint128 liquidityGross,
            int128 liquidityNet,
            uint256 feeGrowthOutside0X128,
            uint256 feeGrowthOutside1X128,
            int56 tickCumulativeOutside,
            uint160 secondsPerLiquidityOutsideX128,
            uint32 secondsOutside,
            bool initialized
        );

    /// @notice Returns 256 packed tick initialized boolean values. See TickBitmap for more information
    function tickBitmap(int16 wordPosition) external view returns (uint256);

    /// @notice Returns the information about a position by the position's key
    /// @param key The position's key is a hash of a preimage composed by the owner, tickLower and tickUpper
    /// @return _liquidity The amount of liquidity in the position,
    /// Returns feeGrowthInside0LastX128 fee growth of token0 inside the tick range as of the last mint/burn/poke,
    /// Returns feeGrowthInside1LastX128 fee growth of token1 inside the tick range as of the last mint/burn/poke,
    /// Returns tokensOwed0 the computed amount of token0 owed to the position as of the last mint/burn/poke,
    /// Returns tokensOwed1 the computed amount of token1 owed to the position as of the last mint/burn/poke
    function positions(bytes32 key)
        external
        view
        returns (
            uint128 _liquidity,
            uint256 feeGrowthInside0LastX128,
            uint256 feeGrowthInside1LastX128,
            uint128 tokensOwed0,
            uint128 tokensOwed1
        );

    /// @notice Returns data about a specific observation index
    /// @param index The element of the observations array to fetch
    /// @dev You most likely want to use #observe() instead of this method to get an observation as of some amount of time
    /// ago, rather than at a specific index in the array.
    /// @return blockTimestamp The timestamp of the observation,
    /// Returns tickCumulative the tick multiplied by seconds elapsed for the life of the pool as of the observation timestamp,
    /// Returns secondsPerLiquidityCumulativeX128 the seconds per in range liquidity for the life of the pool as of the observation timestamp,
    /// Returns initialized whether the observation has been initialized and the values are safe to use
    function observations(uint256 index)
        external
        view
        returns (
            uint32 blockTimestamp,
            int56 tickCumulative,
            uint160 secondsPerLiquidityCumulativeX128,
            bool initialized
        );
}

File 25 of 31 : IUniswapV3PoolDerivedState.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;

/// @title Pool state that is not stored
/// @notice Contains view functions to provide information about the pool that is computed rather than stored on the
/// blockchain. The functions here may have variable gas costs.
interface IUniswapV3PoolDerivedState {
    /// @notice Returns the cumulative tick and liquidity as of each timestamp `secondsAgo` from the current block timestamp
    /// @dev To get a time weighted average tick or liquidity-in-range, you must call this with two values, one representing
    /// the beginning of the period and another for the end of the period. E.g., to get the last hour time-weighted average tick,
    /// you must call it with secondsAgos = [3600, 0].
    /// @dev The time weighted average tick represents the geometric time weighted average price of the pool, in
    /// log base sqrt(1.0001) of token1 / token0. The TickMath library can be used to go from a tick value to a ratio.
    /// @param secondsAgos From how long ago each cumulative tick and liquidity value should be returned
    /// @return tickCumulatives Cumulative tick values as of each `secondsAgos` from the current block timestamp
    /// @return secondsPerLiquidityCumulativeX128s Cumulative seconds per liquidity-in-range value as of each `secondsAgos` from the current block
    /// timestamp
    function observe(uint32[] calldata secondsAgos)
        external
        view
        returns (int56[] memory tickCumulatives, uint160[] memory secondsPerLiquidityCumulativeX128s);

    /// @notice Returns a snapshot of the tick cumulative, seconds per liquidity and seconds inside a tick range
    /// @dev Snapshots must only be compared to other snapshots, taken over a period for which a position existed.
    /// I.e., snapshots cannot be compared if a position is not held for the entire period between when the first
    /// snapshot is taken and the second snapshot is taken.
    /// @param tickLower The lower tick of the range
    /// @param tickUpper The upper tick of the range
    /// @return tickCumulativeInside The snapshot of the tick accumulator for the range
    /// @return secondsPerLiquidityInsideX128 The snapshot of seconds per liquidity for the range
    /// @return secondsInside The snapshot of seconds per liquidity for the range
    function snapshotCumulativesInside(int24 tickLower, int24 tickUpper)
        external
        view
        returns (
            int56 tickCumulativeInside,
            uint160 secondsPerLiquidityInsideX128,
            uint32 secondsInside
        );
}

File 26 of 31 : IUniswapV3PoolActions.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;

/// @title Permissionless pool actions
/// @notice Contains pool methods that can be called by anyone
interface IUniswapV3PoolActions {
    /// @notice Sets the initial price for the pool
    /// @dev Price is represented as a sqrt(amountToken1/amountToken0) Q64.96 value
    /// @param sqrtPriceX96 the initial sqrt price of the pool as a Q64.96
    function initialize(uint160 sqrtPriceX96) external;

    /// @notice Adds liquidity for the given recipient/tickLower/tickUpper position
    /// @dev The caller of this method receives a callback in the form of IUniswapV3MintCallback#uniswapV3MintCallback
    /// in which they must pay any token0 or token1 owed for the liquidity. The amount of token0/token1 due depends
    /// on tickLower, tickUpper, the amount of liquidity, and the current price.
    /// @param recipient The address for which the liquidity will be created
    /// @param tickLower The lower tick of the position in which to add liquidity
    /// @param tickUpper The upper tick of the position in which to add liquidity
    /// @param amount The amount of liquidity to mint
    /// @param data Any data that should be passed through to the callback
    /// @return amount0 The amount of token0 that was paid to mint the given amount of liquidity. Matches the value in the callback
    /// @return amount1 The amount of token1 that was paid to mint the given amount of liquidity. Matches the value in the callback
    function mint(
        address recipient,
        int24 tickLower,
        int24 tickUpper,
        uint128 amount,
        bytes calldata data
    ) external returns (uint256 amount0, uint256 amount1);

    /// @notice Collects tokens owed to a position
    /// @dev Does not recompute fees earned, which must be done either via mint or burn of any amount of liquidity.
    /// Collect must be called by the position owner. To withdraw only token0 or only token1, amount0Requested or
    /// amount1Requested may be set to zero. To withdraw all tokens owed, caller may pass any value greater than the
    /// actual tokens owed, e.g. type(uint128).max. Tokens owed may be from accumulated swap fees or burned liquidity.
    /// @param recipient The address which should receive the fees collected
    /// @param tickLower The lower tick of the position for which to collect fees
    /// @param tickUpper The upper tick of the position for which to collect fees
    /// @param amount0Requested How much token0 should be withdrawn from the fees owed
    /// @param amount1Requested How much token1 should be withdrawn from the fees owed
    /// @return amount0 The amount of fees collected in token0
    /// @return amount1 The amount of fees collected in token1
    function collect(
        address recipient,
        int24 tickLower,
        int24 tickUpper,
        uint128 amount0Requested,
        uint128 amount1Requested
    ) external returns (uint128 amount0, uint128 amount1);

    /// @notice Burn liquidity from the sender and account tokens owed for the liquidity to the position
    /// @dev Can be used to trigger a recalculation of fees owed to a position by calling with an amount of 0
    /// @dev Fees must be collected separately via a call to #collect
    /// @param tickLower The lower tick of the position for which to burn liquidity
    /// @param tickUpper The upper tick of the position for which to burn liquidity
    /// @param amount How much liquidity to burn
    /// @return amount0 The amount of token0 sent to the recipient
    /// @return amount1 The amount of token1 sent to the recipient
    function burn(
        int24 tickLower,
        int24 tickUpper,
        uint128 amount
    ) external returns (uint256 amount0, uint256 amount1);

    /// @notice Swap token0 for token1, or token1 for token0
    /// @dev The caller of this method receives a callback in the form of IUniswapV3SwapCallback#uniswapV3SwapCallback
    /// @param recipient The address to receive the output of the swap
    /// @param zeroForOne The direction of the swap, true for token0 to token1, false for token1 to token0
    /// @param amountSpecified The amount of the swap, which implicitly configures the swap as exact input (positive), or exact output (negative)
    /// @param sqrtPriceLimitX96 The Q64.96 sqrt price limit. If zero for one, the price cannot be less than this
    /// value after the swap. If one for zero, the price cannot be greater than this value after the swap
    /// @param data Any data to be passed through to the callback
    /// @return amount0 The delta of the balance of token0 of the pool, exact when negative, minimum when positive
    /// @return amount1 The delta of the balance of token1 of the pool, exact when negative, minimum when positive
    function swap(
        address recipient,
        bool zeroForOne,
        int256 amountSpecified,
        uint160 sqrtPriceLimitX96,
        bytes calldata data
    ) external returns (int256 amount0, int256 amount1);

    /// @notice Receive token0 and/or token1 and pay it back, plus a fee, in the callback
    /// @dev The caller of this method receives a callback in the form of IUniswapV3FlashCallback#uniswapV3FlashCallback
    /// @dev Can be used to donate underlying tokens pro-rata to currently in-range liquidity providers by calling
    /// with 0 amount{0,1} and sending the donation amount(s) from the callback
    /// @param recipient The address which will receive the token0 and token1 amounts
    /// @param amount0 The amount of token0 to send
    /// @param amount1 The amount of token1 to send
    /// @param data Any data to be passed through to the callback
    function flash(
        address recipient,
        uint256 amount0,
        uint256 amount1,
        bytes calldata data
    ) external;

    /// @notice Increase the maximum number of price and liquidity observations that this pool will store
    /// @dev This method is no-op if the pool already has an observationCardinalityNext greater than or equal to
    /// the input observationCardinalityNext.
    /// @param observationCardinalityNext The desired minimum number of observations for the pool to store
    function increaseObservationCardinalityNext(uint16 observationCardinalityNext) external;
}

File 27 of 31 : IUniswapV3PoolOwnerActions.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;

/// @title Permissioned pool actions
/// @notice Contains pool methods that may only be called by the factory owner
interface IUniswapV3PoolOwnerActions {
    /// @notice Set the denominator of the protocol's % share of the fees
    /// @param feeProtocol0 new protocol fee for token0 of the pool
    /// @param feeProtocol1 new protocol fee for token1 of the pool
    function setFeeProtocol(uint8 feeProtocol0, uint8 feeProtocol1) external;

    /// @notice Collect the protocol fee accrued to the pool
    /// @param recipient The address to which collected protocol fees should be sent
    /// @param amount0Requested The maximum amount of token0 to send, can be 0 to collect fees in only token1
    /// @param amount1Requested The maximum amount of token1 to send, can be 0 to collect fees in only token0
    /// @return amount0 The protocol fee collected in token0
    /// @return amount1 The protocol fee collected in token1
    function collectProtocol(
        address recipient,
        uint128 amount0Requested,
        uint128 amount1Requested
    ) external returns (uint128 amount0, uint128 amount1);
}

File 28 of 31 : IUniswapV3PoolEvents.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;

/// @title Events emitted by a pool
/// @notice Contains all events emitted by the pool
interface IUniswapV3PoolEvents {
    /// @notice Emitted exactly once by a pool when #initialize is first called on the pool
    /// @dev Mint/Burn/Swap cannot be emitted by the pool before Initialize
    /// @param sqrtPriceX96 The initial sqrt price of the pool, as a Q64.96
    /// @param tick The initial tick of the pool, i.e. log base 1.0001 of the starting price of the pool
    event Initialize(uint160 sqrtPriceX96, int24 tick);

    /// @notice Emitted when liquidity is minted for a given position
    /// @param sender The address that minted the liquidity
    /// @param owner The owner of the position and recipient of any minted liquidity
    /// @param tickLower The lower tick of the position
    /// @param tickUpper The upper tick of the position
    /// @param amount The amount of liquidity minted to the position range
    /// @param amount0 How much token0 was required for the minted liquidity
    /// @param amount1 How much token1 was required for the minted liquidity
    event Mint(
        address sender,
        address indexed owner,
        int24 indexed tickLower,
        int24 indexed tickUpper,
        uint128 amount,
        uint256 amount0,
        uint256 amount1
    );

    /// @notice Emitted when fees are collected by the owner of a position
    /// @dev Collect events may be emitted with zero amount0 and amount1 when the caller chooses not to collect fees
    /// @param owner The owner of the position for which fees are collected
    /// @param tickLower The lower tick of the position
    /// @param tickUpper The upper tick of the position
    /// @param amount0 The amount of token0 fees collected
    /// @param amount1 The amount of token1 fees collected
    event Collect(
        address indexed owner,
        address recipient,
        int24 indexed tickLower,
        int24 indexed tickUpper,
        uint128 amount0,
        uint128 amount1
    );

    /// @notice Emitted when a position's liquidity is removed
    /// @dev Does not withdraw any fees earned by the liquidity position, which must be withdrawn via #collect
    /// @param owner The owner of the position for which liquidity is removed
    /// @param tickLower The lower tick of the position
    /// @param tickUpper The upper tick of the position
    /// @param amount The amount of liquidity to remove
    /// @param amount0 The amount of token0 withdrawn
    /// @param amount1 The amount of token1 withdrawn
    event Burn(
        address indexed owner,
        int24 indexed tickLower,
        int24 indexed tickUpper,
        uint128 amount,
        uint256 amount0,
        uint256 amount1
    );

    /// @notice Emitted by the pool for any swaps between token0 and token1
    /// @param sender The address that initiated the swap call, and that received the callback
    /// @param recipient The address that received the output of the swap
    /// @param amount0 The delta of the token0 balance of the pool
    /// @param amount1 The delta of the token1 balance of the pool
    /// @param sqrtPriceX96 The sqrt(price) of the pool after the swap, as a Q64.96
    /// @param liquidity The liquidity of the pool after the swap
    /// @param tick The log base 1.0001 of price of the pool after the swap
    event Swap(
        address indexed sender,
        address indexed recipient,
        int256 amount0,
        int256 amount1,
        uint160 sqrtPriceX96,
        uint128 liquidity,
        int24 tick
    );

    /// @notice Emitted by the pool for any flashes of token0/token1
    /// @param sender The address that initiated the swap call, and that received the callback
    /// @param recipient The address that received the tokens from flash
    /// @param amount0 The amount of token0 that was flashed
    /// @param amount1 The amount of token1 that was flashed
    /// @param paid0 The amount of token0 paid for the flash, which can exceed the amount0 plus the fee
    /// @param paid1 The amount of token1 paid for the flash, which can exceed the amount1 plus the fee
    event Flash(
        address indexed sender,
        address indexed recipient,
        uint256 amount0,
        uint256 amount1,
        uint256 paid0,
        uint256 paid1
    );

    /// @notice Emitted by the pool for increases to the number of observations that can be stored
    /// @dev observationCardinalityNext is not the observation cardinality until an observation is written at the index
    /// just before a mint/swap/burn.
    /// @param observationCardinalityNextOld The previous value of the next observation cardinality
    /// @param observationCardinalityNextNew The updated value of the next observation cardinality
    event IncreaseObservationCardinalityNext(
        uint16 observationCardinalityNextOld,
        uint16 observationCardinalityNextNew
    );

    /// @notice Emitted when the protocol fee is changed by the pool
    /// @param feeProtocol0Old The previous value of the token0 protocol fee
    /// @param feeProtocol1Old The previous value of the token1 protocol fee
    /// @param feeProtocol0New The updated value of the token0 protocol fee
    /// @param feeProtocol1New The updated value of the token1 protocol fee
    event SetFeeProtocol(uint8 feeProtocol0Old, uint8 feeProtocol1Old, uint8 feeProtocol0New, uint8 feeProtocol1New);

    /// @notice Emitted when the collected protocol fees are withdrawn by the factory owner
    /// @param sender The address that collects the protocol fees
    /// @param recipient The address that receives the collected protocol fees
    /// @param amount0 The amount of token0 protocol fees that is withdrawn
    /// @param amount0 The amount of token1 protocol fees that is withdrawn
    event CollectProtocol(address indexed sender, address indexed recipient, uint128 amount0, uint128 amount1);
}

File 29 of 31 : BitMath.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;

/// @title BitMath
/// @dev This library provides functionality for computing bit properties of an unsigned integer
library BitMath {
    /// @notice Returns the index of the most significant bit of the number,
    ///     where the least significant bit is at index 0 and the most significant bit is at index 255
    /// @dev The function satisfies the property:
    ///     x >= 2**mostSignificantBit(x) and x < 2**(mostSignificantBit(x)+1)
    /// @param x the value for which to compute the most significant bit, must be greater than 0
    /// @return r the index of the most significant bit
    function mostSignificantBit(uint256 x) internal pure returns (uint8 r) {
        require(x > 0);

        if (x >= 0x100000000000000000000000000000000) {
            x >>= 128;
            r += 128;
        }
        if (x >= 0x10000000000000000) {
            x >>= 64;
            r += 64;
        }
        if (x >= 0x100000000) {
            x >>= 32;
            r += 32;
        }
        if (x >= 0x10000) {
            x >>= 16;
            r += 16;
        }
        if (x >= 0x100) {
            x >>= 8;
            r += 8;
        }
        if (x >= 0x10) {
            x >>= 4;
            r += 4;
        }
        if (x >= 0x4) {
            x >>= 2;
            r += 2;
        }
        if (x >= 0x2) r += 1;
    }

    /// @notice Returns the index of the least significant bit of the number,
    ///     where the least significant bit is at index 0 and the most significant bit is at index 255
    /// @dev The function satisfies the property:
    ///     (x & 2**leastSignificantBit(x)) != 0 and (x & (2**(leastSignificantBit(x)) - 1)) == 0)
    /// @param x the value for which to compute the least significant bit, must be greater than 0
    /// @return r the index of the least significant bit
    function leastSignificantBit(uint256 x) internal pure returns (uint8 r) {
        require(x > 0);

        r = 255;
        if (x & type(uint128).max > 0) {
            r -= 128;
        } else {
            x >>= 128;
        }
        if (x & type(uint64).max > 0) {
            r -= 64;
        } else {
            x >>= 64;
        }
        if (x & type(uint32).max > 0) {
            r -= 32;
        } else {
            x >>= 32;
        }
        if (x & type(uint16).max > 0) {
            r -= 16;
        } else {
            x >>= 16;
        }
        if (x & type(uint8).max > 0) {
            r -= 8;
        } else {
            x >>= 8;
        }
        if (x & 0xf > 0) {
            r -= 4;
        } else {
            x >>= 4;
        }
        if (x & 0x3 > 0) {
            r -= 2;
        } else {
            x >>= 2;
        }
        if (x & 0x1 > 0) r -= 1;
    }
}

File 30 of 31 : UnsafeMath.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;

/// @title Math functions that do not check inputs or outputs
/// @notice Contains methods that perform common math functions but do not do any overflow or underflow checks
library UnsafeMath {
    /// @notice Returns ceil(x / y)
    /// @dev division by 0 has unspecified behavior, and must be checked externally
    /// @param x The dividend
    /// @param y The divisor
    /// @return z The quotient, ceil(x / y)
    function divRoundingUp(uint256 x, uint256 y) internal pure returns (uint256 z) {
        assembly {
            z := add(div(x, y), gt(mod(x, y), 0))
        }
    }
}

File 31 of 31 : FixedPoint96.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.4.0;

/// @title FixedPoint96
/// @notice A library for handling binary fixed point numbers, see https://en.wikipedia.org/wiki/Q_(number_format)
/// @dev Used in SqrtPriceMath.sol
library FixedPoint96 {
    uint8 internal constant RESOLUTION = 96;
    uint256 internal constant Q96 = 0x1000000000000000000000000;
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 800
  },
  "metadata": {
    "bytecodeHash": "none"
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"int24","name":"tickLower","type":"int24"},{"indexed":true,"internalType":"int24","name":"tickUpper","type":"int24"},{"indexed":false,"internalType":"uint128","name":"amount","type":"uint128"},{"indexed":false,"internalType":"uint256","name":"amount0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1","type":"uint256"}],"name":"Burn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"address","name":"recipient","type":"address"},{"indexed":true,"internalType":"int24","name":"tickLower","type":"int24"},{"indexed":true,"internalType":"int24","name":"tickUpper","type":"int24"},{"indexed":false,"internalType":"uint128","name":"amount0","type":"uint128"},{"indexed":false,"internalType":"uint128","name":"amount1","type":"uint128"}],"name":"Collect","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint128","name":"amount0","type":"uint128"},{"indexed":false,"internalType":"uint128","name":"amount1","type":"uint128"}],"name":"CollectProtocol","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"paid0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"paid1","type":"uint256"}],"name":"Flash","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint16","name":"observationCardinalityNextOld","type":"uint16"},{"indexed":false,"internalType":"uint16","name":"observationCardinalityNextNew","type":"uint16"}],"name":"IncreaseObservationCardinalityNext","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint160","name":"sqrtPriceX96","type":"uint160"},{"indexed":false,"internalType":"int24","name":"tick","type":"int24"}],"name":"Initialize","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"int24","name":"tickLower","type":"int24"},{"indexed":true,"internalType":"int24","name":"tickUpper","type":"int24"},{"indexed":false,"internalType":"uint128","name":"amount","type":"uint128"},{"indexed":false,"internalType":"uint256","name":"amount0","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount1","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"feeProtocol0Old","type":"uint8"},{"indexed":false,"internalType":"uint8","name":"feeProtocol1Old","type":"uint8"},{"indexed":false,"internalType":"uint8","name":"feeProtocol0New","type":"uint8"},{"indexed":false,"internalType":"uint8","name":"feeProtocol1New","type":"uint8"}],"name":"SetFeeProtocol","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"int256","name":"amount0","type":"int256"},{"indexed":false,"internalType":"int256","name":"amount1","type":"int256"},{"indexed":false,"internalType":"uint160","name":"sqrtPriceX96","type":"uint160"},{"indexed":false,"internalType":"uint128","name":"liquidity","type":"uint128"},{"indexed":false,"internalType":"int24","name":"tick","type":"int24"}],"name":"Swap","type":"event"},{"inputs":[{"internalType":"int24","name":"tickLower","type":"int24"},{"internalType":"int24","name":"tickUpper","type":"int24"},{"internalType":"uint128","name":"amount","type":"uint128"}],"name":"burn","outputs":[{"internalType":"uint256","name":"amount0","type":"uint256"},{"internalType":"uint256","name":"amount1","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"int24","name":"tickLower","type":"int24"},{"internalType":"int24","name":"tickUpper","type":"int24"},{"internalType":"uint128","name":"amount0Requested","type":"uint128"},{"internalType":"uint128","name":"amount1Requested","type":"uint128"}],"name":"collect","outputs":[{"internalType":"uint128","name":"amount0","type":"uint128"},{"internalType":"uint128","name":"amount1","type":"uint128"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint128","name":"amount0Requested","type":"uint128"},{"internalType":"uint128","name":"amount1Requested","type":"uint128"}],"name":"collectProtocol","outputs":[{"internalType":"uint128","name":"amount0","type":"uint128"},{"internalType":"uint128","name":"amount1","type":"uint128"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"factory","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fee","outputs":[{"internalType":"uint24","name":"","type":"uint24"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeGrowthGlobal0X128","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeGrowthGlobal1X128","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount0","type":"uint256"},{"internalType":"uint256","name":"amount1","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"flash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"observationCardinalityNext","type":"uint16"}],"name":"increaseObservationCardinalityNext","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint160","name":"sqrtPriceX96","type":"uint160"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"liquidity","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxLiquidityPerTick","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"int24","name":"tickLower","type":"int24"},{"internalType":"int24","name":"tickUpper","type":"int24"},{"internalType":"uint128","name":"amount","type":"uint128"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"mint","outputs":[{"internalType":"uint256","name":"amount0","type":"uint256"},{"internalType":"uint256","name":"amount1","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"observations","outputs":[{"internalType":"uint32","name":"blockTimestamp","type":"uint32"},{"internalType":"int56","name":"tickCumulative","type":"int56"},{"internalType":"uint160","name":"secondsPerLiquidityCumulativeX128","type":"uint160"},{"internalType":"bool","name":"initialized","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32[]","name":"secondsAgos","type":"uint32[]"}],"name":"observe","outputs":[{"internalType":"int56[]","name":"tickCumulatives","type":"int56[]"},{"internalType":"uint160[]","name":"secondsPerLiquidityCumulativeX128s","type":"uint160[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"positions","outputs":[{"internalType":"uint128","name":"liquidity","type":"uint128"},{"internalType":"uint256","name":"feeGrowthInside0LastX128","type":"uint256"},{"internalType":"uint256","name":"feeGrowthInside1LastX128","type":"uint256"},{"internalType":"uint128","name":"tokensOwed0","type":"uint128"},{"internalType":"uint128","name":"tokensOwed1","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"protocolFees","outputs":[{"internalType":"uint128","name":"token0","type":"uint128"},{"internalType":"uint128","name":"token1","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"feeProtocol0","type":"uint8"},{"internalType":"uint8","name":"feeProtocol1","type":"uint8"}],"name":"setFeeProtocol","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"slot0","outputs":[{"internalType":"uint160","name":"sqrtPriceX96","type":"uint160"},{"internalType":"int24","name":"tick","type":"int24"},{"internalType":"uint16","name":"observationIndex","type":"uint16"},{"internalType":"uint16","name":"observationCardinality","type":"uint16"},{"internalType":"uint16","name":"observationCardinalityNext","type":"uint16"},{"internalType":"uint8","name":"feeProtocol","type":"uint8"},{"internalType":"bool","name":"unlocked","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"int24","name":"tickLower","type":"int24"},{"internalType":"int24","name":"tickUpper","type":"int24"}],"name":"snapshotCumulativesInside","outputs":[{"internalType":"int56","name":"tickCumulativeInside","type":"int56"},{"internalType":"uint160","name":"secondsPerLiquidityInsideX128","type":"uint160"},{"internalType":"uint32","name":"secondsInside","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"bool","name":"zeroForOne","type":"bool"},{"internalType":"int256","name":"amountSpecified","type":"int256"},{"internalType":"uint160","name":"sqrtPriceLimitX96","type":"uint160"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"swap","outputs":[{"internalType":"int256","name":"amount0","type":"int256"},{"internalType":"int256","name":"amount1","type":"int256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"int16","name":"","type":"int16"}],"name":"tickBitmap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tickSpacing","outputs":[{"internalType":"int24","name":"","type":"int24"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"int24","name":"","type":"int24"}],"name":"ticks","outputs":[{"internalType":"uint128","name":"liquidityGross","type":"uint128"},{"internalType":"int128","name":"liquidityNet","type":"int128"},{"internalType":"uint256","name":"feeGrowthOutside0X128","type":"uint256"},{"internalType":"uint256","name":"feeGrowthOutside1X128","type":"uint256"},{"internalType":"int56","name":"tickCumulativeOutside","type":"int56"},{"internalType":"uint160","name":"secondsPerLiquidityOutsideX128","type":"uint160"},{"internalType":"uint32","name":"secondsOutside","type":"uint32"},{"internalType":"bool","name":"initialized","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token0","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token1","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101ae5760003560e01c806370cf754a116100ee578063c45a015511610097578063ddca3f4311610071578063ddca3f4314610800578063f305839914610820578063f30dba9314610828578063f637731d146108aa576101ae565b8063c45a0155146107d1578063d0c93a7c146107d9578063d21220a7146107f8576101ae565b8063883bdbfd116100c8578063883bdbfd14610633578063a34123a71461073c578063a38807f214610776576101ae565b806370cf754a146105c65780638206a4d1146105ce57806385b66729146105f6576101ae565b80633850c7bd1161015b578063490e6cbc11610135578063490e6cbc146104705780634f1eb3d8146104fc578063514ea4bf1461054d5780635339c296146105a6576101ae565b80633850c7bd1461035b5780633c8a7d8d146103b45780634614131914610456576101ae565b80631ad8b03b1161018c5780631ad8b03b146102aa578063252c09d7146102e157806332148f6714610338576101ae565b80630dfe1681146101b3578063128acb08146101d75780631a68650214610286575b600080fd5b6101bb6108d0565b604080516001600160a01b039092168252519081900360200190f35b61026d600480360360a08110156101ed57600080fd5b6001600160a01b0382358116926020810135151592604082013592606083013516919081019060a08101608082013564010000000081111561022e57600080fd5b82018360208201111561024057600080fd5b8035906020019184600183028401116401000000008311171561026257600080fd5b5090925090506108f4565b6040805192835260208301919091528051918290030190f35b61028e6114ad565b604080516001600160801b039092168252519081900360200190f35b6102b26114bc565b60405180836001600160801b03168152602001826001600160801b031681526020019250505060405180910390f35b6102fe600480360360208110156102f757600080fd5b50356114d6565b6040805163ffffffff909516855260069390930b60208501526001600160a01b039091168383015215156060830152519081900360800190f35b6103596004803603602081101561034e57600080fd5b503561ffff1661151c565b005b610363611616565b604080516001600160a01b03909816885260029690960b602088015261ffff9485168787015292841660608701529216608085015260ff90911660a0840152151560c0830152519081900360e00190f35b61026d600480360360a08110156103ca57600080fd5b6001600160a01b03823516916020810135600290810b92604083013590910b916001600160801b036060820135169181019060a08101608082013564010000000081111561041757600080fd5b82018360208201111561042957600080fd5b8035906020019184600183028401116401000000008311171561044b57600080fd5b509092509050611666565b61045e611922565b60408051918252519081900360200190f35b6103596004803603608081101561048657600080fd5b6001600160a01b0382351691602081013591604082013591908101906080810160608201356401000000008111156104bd57600080fd5b8201836020820111156104cf57600080fd5b803590602001918460018302840111640100000000831117156104f157600080fd5b509092509050611928565b6102b2600480360360a081101561051257600080fd5b506001600160a01b03813516906020810135600290810b91604081013590910b906001600160801b0360608201358116916080013516611d83565b61056a6004803603602081101561056357600080fd5b5035611f9d565b604080516001600160801b0396871681526020810195909552848101939093529084166060840152909216608082015290519081900360a00190f35b61045e600480360360208110156105bc57600080fd5b503560010b611fda565b61028e611fec565b610359600480360360408110156105e457600080fd5b5060ff81358116916020013516612010565b6102b26004803603606081101561060c57600080fd5b506001600160a01b03813516906001600160801b036020820135811691604001351661220f565b6106a36004803603602081101561064957600080fd5b81019060208101813564010000000081111561066457600080fd5b82018360208201111561067657600080fd5b8035906020019184602083028401116401000000008311171561069857600080fd5b5090925090506124dc565b604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b838110156106e75781810151838201526020016106cf565b50505050905001838103825284818151815260200191508051906020019060200280838360005b8381101561072657818101518382015260200161070e565b5050505090500194505050505060405180910390f35b61026d6004803603606081101561075257600080fd5b508035600290810b91602081013590910b90604001356001600160801b0316612569565b6107a06004803603604081101561078c57600080fd5b508035600290810b9160200135900b6126e0565b6040805160069490940b84526001600160a01b03909216602084015263ffffffff1682820152519081900360600190f35b6101bb6128d7565b6107e16128fb565b6040805160029290920b8252519081900360200190f35b6101bb61291f565b610808612943565b6040805162ffffff9092168252519081900360200190f35b61045e612967565b6108486004803603602081101561083e57600080fd5b503560020b61296d565b604080516001600160801b039099168952600f9790970b602089015287870195909552606087019390935260069190910b60808601526001600160a01b031660a085015263ffffffff1660c0840152151560e083015251908190036101000190f35b610359600480360360208110156108c057600080fd5b50356001600160a01b03166129db565b7f000000000000000000000000cd5fe23c85820f7b72d0926fc9b05b43e359b7ee81565b6000806108ff612bf0565b85610936576040805162461bcd60e51b8152602060048201526002602482015261415360f01b604482015290519081900360640190fd5b6040805160e0810182526000546001600160a01b0381168252600160a01b8104600290810b810b900b602083015261ffff600160b81b8204811693830193909352600160c81b810483166060830152600160d81b8104909216608082015260ff600160e81b8304811660a0830152600160f01b909204909116151560c082018190526109ef576040805162461bcd60e51b81526020600482015260036024820152624c4f4b60e81b604482015290519081900360640190fd5b87610a3a5780600001516001600160a01b0316866001600160a01b0316118015610a35575073fffd8963efd1fc6a506488495d951d5263988d266001600160a01b038716105b610a6c565b80600001516001600160a01b0316866001600160a01b0316108015610a6c57506401000276a36001600160a01b038716115b610aa3576040805162461bcd60e51b815260206004820152600360248201526214d41360ea1b604482015290519081900360640190fd5b6000805460ff60f01b191681556040805160c08101909152808a610ad25760048460a0015160ff16901c610ae5565b60108460a0015160ff1681610ae357fe5b065b60ff1681526004546001600160801b03166020820152604001610b06612c27565b63ffffffff168152602001600060060b815260200160006001600160a01b031681526020016000151581525090506000808913905060006040518060e001604052808b81526020016000815260200185600001516001600160a01b03168152602001856020015160020b81526020018c610b8257600254610b86565b6001545b815260200160006001600160801b0316815260200184602001516001600160801b031681525090505b805115801590610bd55750886001600160a01b031681604001516001600160a01b031614155b15610f9f57610be261560e565b60408201516001600160a01b031681526060820151610c25906006907f000000000000000000000000000000000000000000000000000000000000000a8f612c2b565b15156040830152600290810b810b60208301819052620d89e719910b1215610c5657620d89e7196020820152610c75565b6020810151620d89e860029190910b1315610c7557620d89e860208201525b610c828160200151612d6d565b6001600160a01b031660608201526040820151610d13908d610cbc578b6001600160a01b031683606001516001600160a01b031611610cd6565b8b6001600160a01b031683606001516001600160a01b0316105b610ce4578260600151610ce6565b8b5b60c085015185517f00000000000000000000000000000000000000000000000000000000000001f461309f565b60c085015260a084015260808301526001600160a01b031660408301528215610d7557610d498160c00151826080015101613291565b825103825260a0810151610d6b90610d6090613291565b6020840151906132a7565b6020830152610db0565b610d828160a00151613291565b825101825260c08101516080820151610daa91610d9f9101613291565b6020840151906132c3565b60208301525b835160ff1615610df6576000846000015160ff168260c0015181610dd057fe5b60c0840180519290910491829003905260a0840180519091016001600160801b03169052505b60c08201516001600160801b031615610e3557610e298160c00151600160801b8460c001516001600160801b03166132d9565b60808301805190910190525b80606001516001600160a01b031682604001516001600160a01b03161415610f5e57806040015115610f35578360a00151610ebf57610e9d846040015160008760200151886040015188602001518a606001516008613389909695949392919063ffffffff16565b6001600160a01b03166080860152600690810b900b6060850152600160a08501525b6000610f0b82602001518e610ed657600154610edc565b84608001515b8f610eeb578560800151610eef565b6002545b608089015160608a015160408b0151600595949392919061351c565b90508c15610f17576000035b610f258360c00151826135ef565b6001600160801b031660c0840152505b8b610f44578060200151610f4d565b60018160200151035b600290810b900b6060830152610f99565b80600001516001600160a01b031682604001516001600160a01b031614610f9957610f8c82604001516136a5565b600290810b900b60608301525b50610baf565b836020015160020b816060015160020b1461107a57600080610fed86604001518660400151886020015188602001518a606001518b6080015160086139d1909695949392919063ffffffff16565b604085015160608601516000805461ffff60c81b1916600160c81b61ffff958616021761ffff60b81b1916600160b81b95909416949094029290921762ffffff60a01b1916600160a01b62ffffff60029490940b93909316929092029190911773ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03909116179055506110ac9050565b60408101516000805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b039092169190911790555b8060c001516001600160801b031683602001516001600160801b0316146110f25760c0810151600480546001600160801b0319166001600160801b039092169190911790555b8a1561114257608081015160015560a08101516001600160801b03161561113d5760a0810151600380546001600160801b031981166001600160801b03918216909301169190911790555b611188565b608081015160025560a08101516001600160801b0316156111885760a0810151600380546001600160801b03808216600160801b92839004821690940116029190911790555b8115158b1515146111a157602081015181518b036111ae565b80600001518a0381602001515b90965094508a156112e75760008512156111f0576111f07f000000000000000000000000d9a442856c234a39a81a089c06451ebaa4306a728d87600003613b86565b60006111fa613cd4565b9050336001600160a01b031663fa461e3388888c8c6040518563ffffffff1660e01b815260040180858152602001848152602001806020018281038252848482818152602001925080828437600081840152601f19601f82011690508083019250505095505050505050600060405180830381600087803b15801561127e57600080fd5b505af1158015611292573d6000803e3d6000fd5b5050505061129e613cd4565b6112a88289613e0d565b11156112e1576040805162461bcd60e51b815260206004820152600360248201526249494160e81b604482015290519081900360640190fd5b50611411565b600086121561131e5761131e7f000000000000000000000000cd5fe23c85820f7b72d0926fc9b05b43e359b7ee8d88600003613b86565b6000611328613e1d565b9050336001600160a01b031663fa461e3388888c8c6040518563ffffffff1660e01b815260040180858152602001848152602001806020018281038252848482818152602001925080828437600081840152601f19601f82011690508083019250505095505050505050600060405180830381600087803b1580156113ac57600080fd5b505af11580156113c0573d6000803e3d6000fd5b505050506113cc613e1d565b6113d68288613e0d565b111561140f576040805162461bcd60e51b815260206004820152600360248201526249494160e81b604482015290519081900360640190fd5b505b60408082015160c083015160608085015184518b8152602081018b90526001600160a01b03948516818701526001600160801b039093169183019190915260020b60808201529151908e169133917fc42079f94a6350d7e6235f29174924f928cc2ac818eb64fed8004e115fbcca679181900360a00190a350506000805460ff60f01b1916600160f01b17905550919890975095505050505050565b6004546001600160801b031681565b6003546001600160801b0380821691600160801b90041682565b60088161ffff81106114e757600080fd5b015463ffffffff81169150640100000000810460060b90600160581b81046001600160a01b031690600160f81b900460ff1684565b600054600160f01b900460ff16611560576040805162461bcd60e51b81526020600482015260036024820152624c4f4b60e81b604482015290519081900360640190fd5b6000805460ff60f01b19169055611575612bf0565b60008054600160d81b900461ffff169061159160088385613eb5565b6000805461ffff808416600160d81b810261ffff60d81b19909316929092179092559192508316146115fe576040805161ffff80851682528316602082015281517fac49e518f90a358f652e4400164f05a5d8f7e35e7747279bc3a93dbf584e125a929181900390910190a15b50506000805460ff60f01b1916600160f01b17905550565b6000546001600160a01b03811690600160a01b810460020b9061ffff600160b81b8204811691600160c81b8104821691600160d81b8204169060ff600160e81b8204811691600160f01b90041687565b600080548190600160f01b900460ff166116ad576040805162461bcd60e51b81526020600482015260036024820152624c4f4b60e81b604482015290519081900360640190fd5b6000805460ff60f01b191690556001600160801b0385166116cd57600080fd5b60008061171b60405180608001604052808c6001600160a01b031681526020018b60020b81526020018a60020b81526020016117118a6001600160801b0316613f58565b600f0b9052613f69565b9250925050819350809250600080600086111561173d5761173a613cd4565b91505b841561174e5761174b613e1d565b90505b336001600160a01b031663d348799787878b8b6040518563ffffffff1660e01b815260040180858152602001848152602001806020018281038252848482818152602001925080828437600081840152601f19601f82011690508083019250505095505050505050600060405180830381600087803b1580156117d057600080fd5b505af11580156117e4573d6000803e3d6000fd5b50505050600086111561183b576117f9613cd4565b6118038388613e0d565b111561183b576040805162461bcd60e51b815260206004820152600260248201526104d360f41b604482015290519081900360640190fd5b841561188b57611849613e1d565b6118538287613e0d565b111561188b576040805162461bcd60e51b81526020600482015260026024820152614d3160f01b604482015290519081900360640190fd5b8960020b8b60020b8d6001600160a01b03167f7a53080ba414158be7ec69b987b5fb7d07dee101fe85488f0853ae16239d0bde338d8b8b60405180856001600160a01b03168152602001846001600160801b0316815260200183815260200182815260200194505050505060405180910390a450506000805460ff60f01b1916600160f01b17905550919890975095505050505050565b60025481565b600054600160f01b900460ff1661196c576040805162461bcd60e51b81526020600482015260036024820152624c4f4b60e81b604482015290519081900360640190fd5b6000805460ff60f01b19169055611981612bf0565b6004546001600160801b0316806119c3576040805162461bcd60e51b81526020600482015260016024820152601360fa1b604482015290519081900360640190fd5b60006119f8867f00000000000000000000000000000000000000000000000000000000000001f462ffffff16620f42406141a9565b90506000611a2f867f00000000000000000000000000000000000000000000000000000000000001f462ffffff16620f42406141a9565b90506000611a3b613cd4565b90506000611a47613e1d565b90508815611a7a57611a7a7f000000000000000000000000cd5fe23c85820f7b72d0926fc9b05b43e359b7ee8b8b613b86565b8715611aab57611aab7f000000000000000000000000d9a442856c234a39a81a089c06451ebaa4306a728b8a613b86565b336001600160a01b031663e9cbafb085858a8a6040518563ffffffff1660e01b815260040180858152602001848152602001806020018281038252848482818152602001925080828437600081840152601f19601f82011690508083019250505095505050505050600060405180830381600087803b158015611b2d57600080fd5b505af1158015611b41573d6000803e3d6000fd5b505050506000611b4f613cd4565b90506000611b5b613e1d565b905081611b688588613e0d565b1115611ba0576040805162461bcd60e51b8152602060048201526002602482015261046360f41b604482015290519081900360640190fd5b80611bab8487613e0d565b1115611be3576040805162461bcd60e51b8152602060048201526002602482015261463160f01b604482015290519081900360640190fd5b8382038382038115611c725760008054600160e81b9004600f16908115611c16578160ff168481611c1057fe5b04611c19565b60005b90506001600160801b03811615611c4c57600380546001600160801b038082168401166001600160801b03199091161790555b611c66818503600160801b8d6001600160801b03166132d9565b60018054909101905550505b8015611cfd5760008054600160e81b900460041c600f16908115611ca2578160ff168381611c9c57fe5b04611ca5565b60005b90506001600160801b03811615611cd757600380546001600160801b03600160801b8083048216850182160291161790555b611cf1818403600160801b8d6001600160801b03166132d9565b60028054909101905550505b8d6001600160a01b0316336001600160a01b03167fbdbdb71d7860376ba52b25a5028beea23581364a40522f6bcfb86bb1f2dca6338f8f86866040518085815260200184815260200183815260200182815260200194505050505060405180910390a350506000805460ff60f01b1916600160f01b179055505050505050505050505050565b600080548190600160f01b900460ff16611dca576040805162461bcd60e51b81526020600482015260036024820152624c4f4b60e81b604482015290519081900360640190fd5b6000805460ff60f01b19168155611de460073389896141e3565b60038101549091506001600160801b0390811690861611611e055784611e14565b60038101546001600160801b03165b60038201549093506001600160801b03600160801b909104811690851611611e3c5783611e52565b6003810154600160801b90046001600160801b03165b91506001600160801b03831615611eb7576003810180546001600160801b031981166001600160801b03918216869003821617909155611eb7907f000000000000000000000000cd5fe23c85820f7b72d0926fc9b05b43e359b7ee908a908616613b86565b6001600160801b03821615611f1d576003810180546001600160801b03600160801b808304821686900382160291811691909117909155611f1d907f000000000000000000000000d9a442856c234a39a81a089c06451ebaa4306a72908a908516613b86565b604080516001600160a01b038a1681526001600160801b0380861660208301528416818301529051600288810b92908a900b9133917f70935338e69775456a85ddef226c395fb668b63fa0115f5f20610b388e6ca9c0919081900360600190a4506000805460ff60f01b1916600160f01b17905590969095509350505050565b60076020526000908152604090208054600182015460028301546003909301546001600160801b0392831693919281811691600160801b90041685565b60066020526000908152604090205481565b7f0000000000000000000000000000000000005e8b2285f864419ac400be90719681565b600054600160f01b900460ff16612054576040805162461bcd60e51b81526020600482015260036024820152624c4f4b60e81b604482015290519081900360640190fd5b6000805460ff60f01b1916905560408051638da5cb5b60e01b815290516001600160a01b037f0000000000000000000000001f98431c8ad98523631ae4a59f267346ea31f9841691638da5cb5b916004808301926020929190829003018186803b1580156120c157600080fd5b505afa1580156120d5573d6000803e3d6000fd5b505050506040513d60208110156120eb57600080fd5b50516001600160a01b0316331461210157600080fd5b60ff82161580612124575060048260ff16101580156121245750600a8260ff1611155b801561214e575060ff8116158061214e575060048160ff161015801561214e5750600a8160ff1611155b61215757600080fd5b60008054610ff0600484901b16840160ff908116600160e81b9081027fffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff841617909355919004167f973d8d92bb299f4af6ce49b52a8adb85ae46b9f214c4c4fc06ac77401237b1336010826040805160ff9390920683168252600f600486901c16602083015286831682820152918516606082015290519081900360800190a150506000805460ff60f01b1916600160f01b17905550565b600080548190600160f01b900460ff16612256576040805162461bcd60e51b81526020600482015260036024820152624c4f4b60e81b604482015290519081900360640190fd5b6000805460ff60f01b1916905560408051638da5cb5b60e01b815290516001600160a01b037f0000000000000000000000001f98431c8ad98523631ae4a59f267346ea31f9841691638da5cb5b916004808301926020929190829003018186803b1580156122c357600080fd5b505afa1580156122d7573d6000803e3d6000fd5b505050506040513d60208110156122ed57600080fd5b50516001600160a01b0316331461230357600080fd5b6003546001600160801b039081169085161161231f578361232c565b6003546001600160801b03165b6003549092506001600160801b03600160801b9091048116908416116123525782612366565b600354600160801b90046001600160801b03165b90506001600160801b038216156123e7576003546001600160801b038381169116141561239557600019909101905b600380546001600160801b031981166001600160801b039182168590038216179091556123e7907f000000000000000000000000cd5fe23c85820f7b72d0926fc9b05b43e359b7ee9087908516613b86565b6001600160801b0381161561246d576003546001600160801b03828116600160801b90920416141561241857600019015b600380546001600160801b03600160801b80830482168590038216029181169190911790915561246d907f000000000000000000000000d9a442856c234a39a81a089c06451ebaa4306a729087908416613b86565b604080516001600160801b0380851682528316602082015281516001600160a01b0388169233927f596b573906218d3411850b26a6b437d6c4522fdb43d2d2386263f86d50b8b151929081900390910190a36000805460ff60f01b1916600160f01b1790559094909350915050565b6060806124e7612bf0565b61255e6124f2612c27565b858580806020026020016040519081016040528093929190818152602001838360200280828437600092018290525054600454600896959450600160a01b820460020b935061ffff600160b81b8304811693506001600160801b0390911691600160c81b900416614247565b915091509250929050565b600080548190600160f01b900460ff166125b0576040805162461bcd60e51b81526020600482015260036024820152624c4f4b60e81b604482015290519081900360640190fd5b6000805460ff60f01b1916815560408051608081018252338152600288810b602083015287900b918101919091528190819061260990606081016125fc6001600160801b038a16613f58565b600003600f0b9052613f69565b925092509250816000039450806000039350600085118061262a5750600084115b15612669576003830180546001600160801b038082168089018216600160801b93849004831689019092169092029091176001600160801b0319161790555b604080516001600160801b0388168152602081018790528082018690529051600289810b92908b900b9133917f0c396cd989a39f4459b5fa1aed6a9a8dcdbc45908acfd67e028cd568da98982c919081900360600190a450506000805460ff60f01b1916600160f01b179055509094909350915050565b60008060006126ed612bf0565b6126f785856143a1565b600285810b810b60009081526005602052604080822087840b90930b825281206003830154600681900b9367010000000000000082046001600160a01b0316928492600160d81b810463ffffffff169284929091600160f81b900460ff168061275f57600080fd5b6003820154600681900b985067010000000000000081046001600160a01b03169650600160d81b810463ffffffff169450600160f81b900460ff16806127a457600080fd5b50506040805160e0810182526000546001600160a01b0381168252600160a01b8104600290810b810b810b6020840181905261ffff600160b81b8404811695850195909552600160c81b830485166060850152600160d81b8304909416608084015260ff600160e81b8304811660a0850152600160f01b909204909116151560c08301529093508e810b91900b1215905061284d575093909403965090039350900390506128d0565b8a60020b816020015160020b12156128c1576000612869612c27565b602083015160408401516004546060860151939450600093849361289f936008938893879392916001600160801b031690613389565b9a9003989098039b5050949096039290920396509091030392506128d0915050565b50949093039650039350900390505b9250925092565b7f0000000000000000000000001f98431c8ad98523631ae4a59f267346ea31f98481565b7f000000000000000000000000000000000000000000000000000000000000000a81565b7f000000000000000000000000d9a442856c234a39a81a089c06451ebaa4306a7281565b7f00000000000000000000000000000000000000000000000000000000000001f481565b60015481565b60056020526000908152604090208054600182015460028301546003909301546001600160801b03831693600160801b909304600f0b9290600681900b9067010000000000000081046001600160a01b031690600160d81b810463ffffffff1690600160f81b900460ff1688565b6000546001600160a01b031615612a1e576040805162461bcd60e51b8152602060048201526002602482015261414960f01b604482015290519081900360640190fd5b6000612a29826136a5565b9050600080612a41612a39612c27565b60089061446a565b6040805160e0810182526001600160a01b038816808252600288810b6020808501829052600085870181905261ffff898116606088018190529089166080880181905260a08801839052600160c0909801979097528154600160f01b73ffffffffffffffffffffffffffffffffffffffff19909116871762ffffff60a01b1916600160a01b62ffffff9787900b9790971696909602959095177fffffffffff00000000ffffffffffffffffffffffffffffffffffffffffffffff16600160c81b9091021761ffff60d81b1916600160d81b909602959095177fff0000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1692909217909355835191825281019190915281519395509193507f98636036cb66a9c19a37435efc1e90142190214e8abeb821bdba3f2990dd4c9592918290030190a150505050565b60008082600281900b620d89e71981612b9957fe5b05029050600083600281900b620d89e881612bb057fe5b0502905060008460020b83830360020b81612bc757fe5b0560010190508062ffffff166001600160801b03801681612be457fe5b0493505050505b919050565b306001600160a01b037f0000000000000000000000005ffdc86fbd6b13156b4b9200870c5e44b64589dd1614612c2557600080fd5b565b4290565b60008060008460020b8660020b81612c3f57fe5b05905060008660020b128015612c6657508460020b8660020b81612c5f57fe5b0760020b15155b15612c7057600019015b8315612ce557600080612c82836144b6565b600182810b810b600090815260208d9052604090205460ff83169190911b80016000190190811680151597509294509092509085612cc757888360ff16860302612cda565b88612cd1826144c8565b840360ff168603025b965050505050612d63565b600080612cf4836001016144b6565b91509150600060018260ff166001901b031990506000818b60008660010b60010b8152602001908152602001600020541690508060001415955085612d4657888360ff0360ff16866001010102612d5c565b8883612d5183614568565b0360ff168660010101025b9650505050505b5094509492505050565b60008060008360020b12612d84578260020b612d8c565b8260020b6000035b9050620d89e8811115612dca576040805162461bcd60e51b81526020600482015260016024820152601560fa1b604482015290519081900360640190fd5b600060018216612dde57600160801b612df0565b6ffffcb933bd6fad37aa2d162d1a5940015b70ffffffffffffffffffffffffffffffffff1690506002821615612e24576ffff97272373d413259a46990580e213a0260801c5b6004821615612e43576ffff2e50f5f656932ef12357cf3c7fdcc0260801c5b6008821615612e62576fffe5caca7e10e4e61c3624eaa0941cd00260801c5b6010821615612e81576fffcb9843d60f6159c9db58835c9266440260801c5b6020821615612ea0576fff973b41fa98c081472e6896dfb254c00260801c5b6040821615612ebf576fff2ea16466c96a3843ec78b326b528610260801c5b6080821615612ede576ffe5dee046a99a2a811c461f1969c30530260801c5b610100821615612efe576ffcbe86c7900a88aedcffc83b479aa3a40260801c5b610200821615612f1e576ff987a7253ac413176f2b074cf7815e540260801c5b610400821615612f3e576ff3392b0822b70005940c7a398e4b70f30260801c5b610800821615612f5e576fe7159475a2c29b7443b29c7fa6e889d90260801c5b611000821615612f7e576fd097f3bdfd2022b8845ad8f792aa58250260801c5b612000821615612f9e576fa9f746462d870fdf8a65dc1f90e061e50260801c5b614000821615612fbe576f70d869a156d2a1b890bb3df62baf32f70260801c5b618000821615612fde576f31be135f97d08fd981231505542fcfa60260801c5b62010000821615612fff576f09aa508b5b7a84e1c677de54f3e99bc90260801c5b6202000082161561301f576e5d6af8dedb81196699c329225ee6040260801c5b6204000082161561303e576d2216e584f5fa1ea926041bedfe980260801c5b6208000082161561305b576b048a170391f7dc42444e8fa20260801c5b60008460020b131561307657806000198161307257fe5b0490505b64010000000081061561308a57600161308d565b60005b60ff16602082901c0192505050919050565b60008080806001600160a01b03808916908a1610158187128015906131245760006130d88989620f42400362ffffff16620f42406132d9565b9050826130f1576130ec8c8c8c6001614652565b6130fe565b6130fe8b8d8c60016146cd565b955085811061310f578a965061311e565b61311b8c8b838661478a565b96505b5061316e565b8161313b576131368b8b8b60006146cd565b613148565b6131488a8c8b6000614652565b935083886000031061315c5789955061316e565b61316b8b8a8a600003856147d6565b95505b6001600160a01b038a81169087161482156131d15780801561318d5750815b6131a35761319e878d8c60016146cd565b6131a5565b855b95508080156131b2575081155b6131c8576131c3878d8c6000614652565b6131ca565b845b945061321b565b8080156131db5750815b6131f1576131ec8c888c6001614652565b6131f3565b855b9550808015613200575081155b613216576132118c888c60006146cd565b613218565b845b94505b8115801561322b57508860000385115b15613237578860000394505b81801561325657508a6001600160a01b0316876001600160a01b031614155b15613265578589039350613282565b61327f868962ffffff168a620f42400362ffffff166141a9565b93505b50505095509550955095915050565b6000600160ff1b82106132a357600080fd5b5090565b808203828113156000831215146132bd57600080fd5b92915050565b818101828112156000831215146132bd57600080fd5b600080806000198587098686029250828110908390030390508061330f576000841161330457600080fd5b508290049050613382565b80841161331b57600080fd5b6000848688096000868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010186841190950394909402919094039290920491909117919091029150505b9392505050565b60008063ffffffff8716613430576000898661ffff1661ffff81106133aa57fe5b60408051608081018252919092015463ffffffff8082168084526401000000008304600690810b810b900b6020850152600160581b83046001600160a01b031694840194909452600160f81b90910460ff16151560608301529092508a161461341c57613419818a8988614822565b90505b806020015181604001519250925050613510565b8688036000806134458c8c858c8c8c8c6148d2565b91509150816000015163ffffffff168363ffffffff161415613477578160200151826040015194509450505050613510565b805163ffffffff8481169116141561349f578060200151816040015194509450505050613510565b8151815160208085015190840151918390039286039163ffffffff80841692908516910360060b816134cd57fe5b05028460200151018263ffffffff168263ffffffff1686604001518660400151036001600160a01b031602816134ff57fe5b048560400151019650965050505050505b97509795505050505050565b600295860b860b60009081526020979097526040909620600181018054909503909455938301805490920390915560038201805463ffffffff600160d81b6001600160a01b036701000000000000008085048216909603169094027fffffffffff0000000000000000000000000000000000000000ffffffffffffff90921691909117600681810b90960390950b66ffffffffffffff1666ffffffffffffff199095169490941782810485169095039093160263ffffffff60d81b1990931692909217905554600160801b9004600f0b90565b60008082600f0b121561365457826001600160801b03168260000384039150816001600160801b03161061364f576040805162461bcd60e51b81526020600482015260026024820152614c5360f01b604482015290519081900360640190fd5b6132bd565b826001600160801b03168284019150816001600160801b031610156132bd576040805162461bcd60e51b81526020600482015260026024820152614c4160f01b604482015290519081900360640190fd5b60006401000276a36001600160a01b038316108015906136e1575073fffd8963efd1fc6a506488495d951d5263988d266001600160a01b038316105b613716576040805162461bcd60e51b81526020600482015260016024820152602960f91b604482015290519081900360640190fd5b77ffffffffffffffffffffffffffffffffffffffff00000000602083901b166001600160801b03811160071b81811c67ffffffffffffffff811160061b90811c63ffffffff811160051b90811c61ffff811160041b90811c60ff8111600390811b91821c600f811160021b90811c918211600190811b92831c979088119617909417909217179091171717608081106137b757607f810383901c91506137c1565b80607f0383901b91505b908002607f81811c60ff83811c9190911c800280831c81831c1c800280841c81841c1c800280851c81851c1c800280861c81861c1c800280871c81871c1c800280881c81881c1c800280891c81891c1c8002808a1c818a1c1c8002808b1c818b1c1c8002808c1c818c1c1c8002808d1c818d1c1c8002808e1c9c81901c9c909c1c80029c8d901c9e9d607f198f0160401b60c09190911c678000000000000000161760c19b909b1c674000000000000000169a909a1760c29990991c672000000000000000169890981760c39790971c671000000000000000169690961760c49590951c670800000000000000169490941760c59390931c670400000000000000169290921760c69190911c670200000000000000161760c79190911c670100000000000000161760c89190911c6680000000000000161760c99190911c6640000000000000161760ca9190911c6620000000000000161760cb9190911c6610000000000000161760cc9190911c6608000000000000161760cd9190911c66040000000000001617693627a301d71055774c8581026f028f6481ab7f045a5af012a19d003aa9198101608090811d906fdb2df09e81959a81455e260799a0632f8301901d600281810b9083900b146139c257886001600160a01b03166139a682612d6d565b6001600160a01b031611156139bb57816139bd565b805b6139c4565b815b9998505050505050505050565b6000806000898961ffff1661ffff81106139e757fe5b60408051608081018252919092015463ffffffff8082168084526401000000008304600690810b810b900b6020850152600160581b83046001600160a01b031694840194909452600160f81b90910460ff161515606083015290925089161415613a575788859250925050613510565b8461ffff168461ffff16118015613a7857506001850361ffff168961ffff16145b15613a8557839150613a89565b8491505b8161ffff168960010161ffff1681613a9d57fe5b069250613aac81898989614822565b8a8461ffff1661ffff8110613abd57fe5b825191018054602084015160408501516060909501511515600160f81b027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6001600160a01b03909616600160581b027fff0000000000000000000000000000000000000000ffffffffffffffffffffff60069390930b66ffffffffffffff16640100000000026affffffffffffff000000001963ffffffff90971663ffffffff199095169490941795909516929092171692909217929092161790555097509795505050505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b1781529251825160009485949389169392918291908083835b60208310613c025780518252601f199092019160209182019101613be3565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114613c64576040519150601f19603f3d011682016040523d82523d6000602084013e613c69565b606091505b5091509150818015613c97575080511580613c975750808060200190516020811015613c9457600080fd5b50515b613ccd576040805162461bcd60e51b81526020600482015260026024820152612a2360f11b604482015290519081900360640190fd5b5050505050565b604080513060248083019190915282518083039091018152604490910182526020810180516001600160e01b03166370a0823160e01b17815291518151600093849384936001600160a01b037f000000000000000000000000cd5fe23c85820f7b72d0926fc9b05b43e359b7ee1693919290918291908083835b60208310613d6d5780518252601f199092019160209182019101613d4e565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114613dcd576040519150601f19603f3d011682016040523d82523d6000602084013e613dd2565b606091505b5091509150818015613de657506020815110155b613def57600080fd5b808060200190516020811015613e0457600080fd5b50519250505090565b808201828110156132bd57600080fd5b604080513060248083019190915282518083039091018152604490910182526020810180516001600160e01b03166370a0823160e01b17815291518151600093849384936001600160a01b037f000000000000000000000000d9a442856c234a39a81a089c06451ebaa4306a7216939192909182919080838360208310613d6d5780518252601f199092019160209182019101613d4e565b6000808361ffff1611613ef3576040805162461bcd60e51b81526020600482015260016024820152604960f81b604482015290519081900360640190fd5b8261ffff168261ffff1611613f09575081613382565b825b8261ffff168161ffff161015613f4f576001858261ffff1661ffff8110613f2e57fe5b01805463ffffffff191663ffffffff92909216919091179055600101613f0b565b50909392505050565b80600f81900b8114612beb57600080fd5b6000806000613f76612bf0565b613f88846020015185604001516143a1565b6040805160e0810182526000546001600160a01b0381168252600160a01b8104600290810b810b900b602080840182905261ffff600160b81b8404811685870152600160c81b84048116606080870191909152600160d81b8504909116608086015260ff600160e81b8504811660a0870152600160f01b909404909316151560c08501528851908901519489015192890151939461402c9491939092909190614acf565b93508460600151600f0b6000146141a157846020015160020b816020015160020b12156140815761407a6140638660200151612d6d565b6140708760400151612d6d565b8760600151614c84565b92506141a1565b846040015160020b816020015160020b12156141775760045460408201516001600160801b03909116906140d3906140b7612c27565b60208501516060860151608087015160089493929187916139d1565b6000805461ffff60c81b1916600160c81b61ffff938416021761ffff60b81b1916600160b81b939092169290920217905581516040870151614123919061411990612d6d565b8860600151614c84565b93506141416141358760200151612d6d565b83516060890151614cc8565b92506141518187606001516135ef565b600480546001600160801b0319166001600160801b0392909216919091179055506141a1565b61419e6141878660200151612d6d565b6141948760400151612d6d565b8760600151614cc8565b91505b509193909250565b60006141b68484846132d9565b9050600082806141c257fe5b84860911156133825760001981106141d957600080fd5b6001019392505050565b6040805160609490941b6bffffffffffffffffffffffff1916602080860191909152600293840b60e890811b60348701529290930b90911b60378401528051808403601a018152603a90930181528251928201929092206000908152929052902090565b60608060008361ffff1611614287576040805162461bcd60e51b81526020600482015260016024820152604960f81b604482015290519081900360640190fd5b865167ffffffffffffffff8111801561429f57600080fd5b506040519080825280602002602001820160405280156142c9578160200160208202803683370190505b509150865167ffffffffffffffff811180156142e457600080fd5b5060405190808252806020026020018201604052801561430e578160200160208202803683370190505b50905060005b87518110156143945761433f8a8a8a848151811061432e57fe5b60200260200101518a8a8a8a613389565b84838151811061434b57fe5b6020026020010184848151811061435e57fe5b60200260200101826001600160a01b03166001600160a01b03168152508260060b60060b81525050508080600101915050614314565b5097509795505050505050565b8060020b8260020b126143e1576040805162461bcd60e51b8152602060048201526003602482015262544c5560e81b604482015290519081900360640190fd5b620d89e719600283900b1215614424576040805162461bcd60e51b8152602060048201526003602482015262544c4d60e81b604482015290519081900360640190fd5b620d89e8600282900b1315614466576040805162461bcd60e51b815260206004820152600360248201526254554d60e81b604482015290519081900360640190fd5b5050565b6040805160808101825263ffffffff9283168082526000602083018190529282019290925260016060909101819052835463ffffffff1916909117909116600160f81b17909155908190565b60020b600881901d9161010090910790565b60008082116144d657600080fd5b600160801b82106144e957608091821c91015b68010000000000000000821061450157604091821c91015b640100000000821061451557602091821c91015b62010000821061452757601091821c91015b610100821061453857600891821c91015b6010821061454857600491821c91015b6004821061455857600291821c91015b60028210612beb57600101919050565b600080821161457657600080fd5b5060ff6001600160801b0382161561459157607f1901614599565b608082901c91505b67ffffffffffffffff8216156145b257603f19016145ba565b604082901c91505b63ffffffff8216156145cf57601f19016145d7565b602082901c91505b61ffff8216156145ea57600f19016145f2565b601082901c91505b60ff821615614604576007190161460c565b600882901c91505b600f82161561461e5760031901614626565b600482901c91505b60038216156146385760011901614640565b600282901c91505b6001821615612beb5760001901919050565b6000836001600160a01b0316856001600160a01b03161115614672579293925b8161469f5761469a836001600160801b03168686036001600160a01b0316600160601b6132d9565b6146c2565b6146c2836001600160801b03168686036001600160a01b0316600160601b6141a9565b90505b949350505050565b6000836001600160a01b0316856001600160a01b031611156146ed579293925b7bffffffffffffffffffffffffffffffff000000000000000000000000606084901b166001600160a01b03868603811690871661472957600080fd5b8361475957866001600160a01b031661474c8383896001600160a01b03166132d9565b8161475357fe5b0461477f565b61477f6147708383896001600160a01b03166141a9565b886001600160a01b0316614cf7565b979650505050505050565b600080856001600160a01b0316116147a157600080fd5b6000846001600160801b0316116147b757600080fd5b816147c95761469a8585856001614d02565b6146c28585856001614de3565b600080856001600160a01b0316116147ed57600080fd5b6000846001600160801b03161161480357600080fd5b816148155761469a8585856000614de3565b6146c28585856000614d02565b61482a61564a565b600085600001518503905060405180608001604052808663ffffffff1681526020018263ffffffff168660020b0288602001510160060b81526020016000856001600160801b03161161487e576001614880565b845b6001600160801b031673ffffffff00000000000000000000000000000000608085901b16816148ab57fe5b048860400151016001600160a01b0316815260200160011515815250915050949350505050565b6148da61564a565b6148e261564a565b888561ffff1661ffff81106148f357fe5b60408051608081018252919092015463ffffffff81168083526401000000008204600690810b810b900b6020840152600160581b82046001600160a01b031693830193909352600160f81b900460ff1615156060820152925061495890899089614ed8565b15614990578663ffffffff16826000015163ffffffff16141561497a57613510565b8161498783898988614822565b91509150613510565b888361ffff168660010161ffff16816149a557fe5b0661ffff1661ffff81106149b557fe5b60408051608081018252929091015463ffffffff811683526401000000008104600690810b810b900b60208401526001600160a01b03600160581b8204169183019190915260ff600160f81b90910416151560608201819052909250614a6c57604080516080810182528a5463ffffffff811682526401000000008104600690810b810b900b6020830152600160581b81046001600160a01b031692820192909252600160f81b90910460ff161515606082015291505b614a7b88836000015189614ed8565b614ab2576040805162461bcd60e51b815260206004820152600360248201526213d31160ea1b604482015290519081900360640190fd5b614abf8989898887614f9b565b9150915097509795505050505050565b6000614ade60078787876141e3565b60015460025491925090600080600f87900b15614c24576000614aff612c27565b6000805460045492935090918291614b499160089186918591600160a01b810460020b9161ffff600160b81b83048116926001600160801b0390921691600160c81b900416613389565b9092509050614b8360058d8b8d8b8b87898b60007f0000000000000000000000000000000000005e8b2285f864419ac400be90719661513b565b9450614bba60058c8b8d8b8b87898b60017f0000000000000000000000000000000000005e8b2285f864419ac400be90719661513b565b93508415614bee57614bee60068d7f000000000000000000000000000000000000000000000000000000000000000a615325565b8315614c2057614c2060068c7f000000000000000000000000000000000000000000000000000000000000000a615325565b5050505b600080614c3660058c8c8b8a8a61538b565b9092509050614c47878a8484615437565b600089600f0b1215614c75578315614c6457614c6460058c6155cc565b8215614c7557614c7560058b6155cc565b50505050505095945050505050565b60008082600f0b12614caa57614ca5614ca085858560016146cd565b613291565b6146c5565b614cbd614ca085858560000360006146cd565b600003949350505050565b60008082600f0b12614ce457614ca5614ca08585856001614652565b614cbd614ca08585856000036000614652565b808204910615150190565b60008115614d755760006001600160a01b03841115614d3857614d3384600160601b876001600160801b03166132d9565b614d50565b6001600160801b038516606085901b81614d4e57fe5b045b9050614d6d614d686001600160a01b03881683613e0d565b6155f8565b9150506146c5565b60006001600160a01b03841115614da357614d9e84600160601b876001600160801b03166141a9565b614dba565b614dba606085901b6001600160801b038716614cf7565b905080866001600160a01b031611614dd157600080fd5b6001600160a01b0386160390506146c5565b600082614df15750836146c5565b7bffffffffffffffffffffffffffffffff000000000000000000000000606085901b168215614e91576001600160a01b03861684810290858281614e3157fe5b041415614e6257818101828110614e6057614e5683896001600160a01b0316836141a9565b93505050506146c5565b505b614e8882614e83878a6001600160a01b03168681614e7c57fe5b0490613e0d565b614cf7565b925050506146c5565b6001600160a01b03861684810290858281614ea857fe5b04148015614eb557508082115b614ebe57600080fd5b808203614e56614d68846001600160a01b038b16846141a9565b60008363ffffffff168363ffffffff1611158015614f0257508363ffffffff168263ffffffff1611155b15614f1e578163ffffffff168363ffffffff1611159050613382565b60008463ffffffff168463ffffffff1611614f46578363ffffffff1664010000000001614f4e565b8363ffffffff165b64ffffffffff16905060008563ffffffff168463ffffffff1611614f7f578363ffffffff1664010000000001614f87565b8363ffffffff165b64ffffffffff169091111595945050505050565b614fa361564a565b614fab61564a565b60008361ffff168560010161ffff1681614fc157fe5b0661ffff169050600060018561ffff16830103905060005b506002818301048961ffff87168281614fee57fe5b0661ffff8110614ffa57fe5b60408051608081018252929091015463ffffffff811683526401000000008104600690810b810b900b60208401526001600160a01b03600160581b8204169183019190915260ff600160f81b9091041615156060820181905290955061506557806001019250614fd9565b898661ffff16826001018161507657fe5b0661ffff811061508257fe5b60408051608081018252929091015463ffffffff811683526401000000008104600690810b810b900b60208401526001600160a01b03600160581b8204169183019190915260ff600160f81b909104161515606082015285519094506000906150ed908b908b614ed8565b905080801561510657506151068a8a8760000151614ed8565b15615111575061512e565b8061512157600182039250615128565b8160010193505b50614fd9565b5050509550959350505050565b60028a810b900b600090815260208c90526040812080546001600160801b031682615166828d6135ef565b9050846001600160801b0316816001600160801b031611156151b4576040805162461bcd60e51b81526020600482015260026024820152614c4f60f01b604482015290519081900360640190fd5b6001600160801b03828116159082161581141594501561528a578c60020b8e60020b1361525a57600183018b9055600283018a90556003830180547fffffffffff0000000000000000000000000000000000000000ffffffffffffff166701000000000000006001600160a01b038c16021766ffffffffffffff191666ffffffffffffff60068b900b161763ffffffff60d81b1916600160d81b63ffffffff8a16021790555b6003830180547effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff16600160f81b1790555b82546001600160801b0319166001600160801b038216178355856152d35782546152ce906152c990600160801b9004600f90810b810b908f900b6132c3565b613f58565b6152f4565b82546152f4906152c990600160801b9004600f90810b810b908f900b6132a7565b8354600f9190910b6001600160801b03908116600160801b0291161790925550909c9b505050505050505050505050565b8060020b8260020b8161533457fe5b0760020b1561534257600080fd5b60008061535d8360020b8560020b8161535757fe5b056144b6565b600191820b820b60009081526020979097526040909620805460ff9097169190911b90951890945550505050565b600285810b80820b60009081526020899052604080822088850b850b83529082209193849391929184918291908a900b126153d1575050600182015460028301546153e4565b8360010154880391508360020154870390505b6000808b60020b8b60020b121561540657505060018301546002840154615419565b84600101548a0391508460020154890390505b92909803979097039b96909503949094039850939650505050505050565b6040805160a08101825285546001600160801b0390811682526001870154602083015260028701549282019290925260038601548083166060830152600160801b900490911660808201526000600f85900b6154d65781516001600160801b03166154ce576040805162461bcd60e51b815260206004820152600260248201526104e560f41b604482015290519081900360640190fd5b5080516154e5565b81516154e290866135ef565b90505b60006155098360200151860384600001516001600160801b0316600160801b6132d9565b9050600061552f8460400151860385600001516001600160801b0316600160801b6132d9565b905086600f0b6000146155565787546001600160801b0319166001600160801b0384161788555b60018801869055600288018590556001600160801b03821615158061558457506000816001600160801b0316115b156155c2576003880180546001600160801b031981166001600160801b039182168501821617808216600160801b9182900483168501909216021790555b5050505050505050565b600290810b810b6000908152602092909252604082208281556001810183905590810182905560030155565b806001600160a01b0381168114612beb57600080fd5b6040805160e081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c081019190915290565b6040805160808101825260008082526020820181905291810182905260608101919091529056fea164736f6c6343000706000a

Deployed Bytecode Sourcemap

932:34568:1:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1515:40;;;:::i;:::-;;;;-1:-1:-1;;;;;1515:40:1;;;;;;;;;;;;;;22899:9002;;;;;;;;;;;;;;;;-1:-1:-1;;;;;22899:9002:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;22899:9002:1;;-1:-1:-1;22899:9002:1;-1:-1:-1;22899:9002:1;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;3176:33;;;:::i;:::-;;;;-1:-1:-1;;;;;3176:33:1;;;;;;;;;;;;;;3088:41;;;:::i;:::-;;;;;-1:-1:-1;;;;;3088:41:1;;;;;;-1:-1:-1;;;;;3088:41:1;;;;;;;;;;;;;;;;3554:54;;;;;;;;;;;;;;;;-1:-1:-1;3554:54:1;;:::i;:::-;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;3554:54:1;;;;;;;;;;;;;;;;;;;;;;9623:660;;;;;;;;;;;;;;;;-1:-1:-1;9623:660:1;;;;:::i;:::-;;2697:27;;;:::i;:::-;;;;-1:-1:-1;;;;;2697:27:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;17529:1188;;;;;;;;;;;;;;;;-1:-1:-1;;;;;17529:1188:1;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;17529:1188:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;17529:1188:1;;-1:-1:-1;17529:1188:1;-1:-1:-1;17529:1188:1;:::i;2861:44::-;;;:::i;:::-;;;;;;;;;;;;;;;;31949:1913;;;;;;;;;;;;;;;;-1:-1:-1;;;;;31949:1913:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;31949:1913:1;;-1:-1:-1;31949:1913:1;-1:-1:-1;31949:1913:1;:::i;18765:1035::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;18765:1035:1;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;18765:1035:1;;;;;;;;;;;;:::i;3449:59::-;;;;;;;;;;;;;;;;-1:-1:-1;3449:59:1;;:::i;:::-;;;;-1:-1:-1;;;;;3449:59:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3351:52;;;;;;;;;;;;;;;;-1:-1:-1;3351:52:1;;;;:::i;1880:53::-;;;:::i;33915:513::-;;;;;;;;;;;;;;;;-1:-1:-1;33915:513:1;;;;;;;;;;;:::i;34481:1017::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;34481:1017:1;;;;-1:-1:-1;;;;;34481:1017:1;;;;;;;;;;;;:::i;9076:499::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;9076:499:1;;-1:-1:-1;9076:499:1;-1:-1:-1;9076:499:1;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;19918:939;;;;;;;;;;;;;;;;-1:-1:-1;19918:939:1;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;19918:939:1;;:::i;6169:2854::-;;;;;;;;;;;;;;;;-1:-1:-1;6169:2854:1;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;-1:-1:-1;;;;;6169:2854:1;;;;;;;;;;;;;;;;;;;;;;1423:41;;;:::i;1785:43::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;1606:40;;;:::i;1697:36::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;2771:44;;;:::i;3256:49::-;;;;;;;;;;;;;;;;-1:-1:-1;3256:49:1;;;;:::i;:::-;;;;-1:-1:-1;;;;;3256:49:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;3256:49:1;;;;;;;;;;;;;;;;;;;;;;;;;;10387:621;;;;;;;;;;;;;;;;-1:-1:-1;10387:621:1;-1:-1:-1;;;;;10387:621:1;;:::i;1515:40::-;;;:::o;22899:9002::-;23109:14;23125;1036:22:0;:20;:22::i;:::-;23159:20:1;23151:35:::1;;;::::0;;-1:-1:-1;;;23151:35:1;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;23151:35:1;;;;;;;;;;;;;::::1;;23197:31;::::0;;::::1;::::0;::::1;::::0;;:23:::1;:31:::0;-1:-1:-1;;;;;23197:31:1;::::1;::::0;;-1:-1:-1;;;23197:31:1;::::1;;::::0;;::::1;::::0;::::1;::::0;::::1;;::::0;::::1;::::0;::::1;-1:-1:-1::0;;;23197:31:1;::::1;::::0;::::1;::::0;;;;;;;-1:-1:-1;;;23197:31:1;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;23197:31:1;::::1;::::0;;::::1;::::0;;;;::::1;-1:-1:-1::0;;;23197:31:1;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;23197:31:1;;::::1;::::0;;::::1;;;::::0;;;;;;23239:35:::1;;;::::0;;-1:-1:-1;;;23239:35:1;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;23239:35:1;;;;;;;;;;;;;::::1;;23305:10;:228;;23463:10;:23;;;-1:-1:-1::0;;;;;23443:43:1::1;:17;-1:-1:-1::0;;;;;23443:43:1::1;;:90;;;;-1:-1:-1::0;997:49:28::1;-1:-1:-1::0;;;;;23490:43:1;::::1;;23443:90;23305:228;;;23354:10;:23;;;-1:-1:-1::0;;;;;23334:43:1::1;:17;-1:-1:-1::0;;;;;23334:43:1::1;;:90;;;;-1:-1:-1::0;817:10:28::1;-1:-1:-1::0;;;;;23381:43:1;::::1;;23334:90;23284:278;;;::::0;;-1:-1:-1;;;23284:278:1;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;23284:278:1;;;;;;;;;;;;;::::1;;23590:5;23573:22:::0;;-1:-1:-1;;;;23573:22:1::1;::::0;;23643:363:::1;::::0;;::::1;::::0;::::1;::::0;;;;23778:10;:74:::1;;23850:1;23824:10;:22;;;:27;;;;23778:74;;;23817:2;23792:10;:22;;;:27;;;;;;;;23778:74;23643:363;;::::0;;23687:9:::1;::::0;-1:-1:-1;;;;;23687:9:1::1;23643:363;::::0;::::1;::::0;;;23730:17:::1;:15;:17::i;:::-;23643:363;;;;;;23940:1;23643:363;;;;;;23905:1;-1:-1:-1::0;;;;;23643:363:1::1;;;;;23986:5;23643:363;;;;::::0;23606:400:::1;;24017:15;24053:1:::0;24035:15:::1;:19;24017:37;;24065:22;24102:391;;;;;;;;24156:15;24102:391;;;;24207:1;24102:391;;;;24240:10;:23;;;-1:-1:-1::0;;;;;24102:391:1::1;;;;;24287:10;:15;;;24102:391;;;;;;24341:10;:56;;24377:20;;24341:56;;;24354:20;;24341:56;24102:391;;;;24428:1;-1:-1:-1::0;;;;;24102:391:1::1;;;;;24458:5;:20;;;-1:-1:-1::0;;;;;24102:391:1::1;;;::::0;24065:428:::1;;24620:4621;24627:30:::0;;:35;;::::1;::::0;:78:::1;;;24688:17;-1:-1:-1::0;;;;;24666:39:1::1;:5;:18;;;-1:-1:-1::0;;;;;24666:39:1::1;;;24627:78;24620:4621;;;24721:28;;:::i;:::-;24789:18;::::0;::::1;::::0;-1:-1:-1;;;;;24764:43:1::1;::::0;;24919:10:::1;::::0;::::1;::::0;24858:142:::1;::::0;:10:::1;::::0;24947:11:::1;24976:10:::0;24858:43:::1;:142::i;:::-;24822:178;;24838:16;::::0;::::1;24822:178:::0;::::1;::::0;;::::1;::::0;::::1;24823:13;::::0;::::1;24822:178:::0;;;-1:-1:-1;;25132:33:1;::::1;;25128:216;;;-1:-1:-1::0;;25185:13:1::1;::::0;::::1;:33:::0;25128:216:::1;;;25243:13;::::0;::::1;::::0;637:9:28;25243:33:1::1;::::0;;;::::1;;25239:105;;;637:9:28::0;25296:13:1::1;::::0;::::1;:33:::0;25239:105:::1;25429:42;25457:4;:13;;;25429:27;:42::i;:::-;-1:-1:-1::0;;;;;25405:66:1::1;:21;::::0;::::1;:66:::0;25717:18:::1;::::0;::::1;::::0;25675:378:::1;::::0;25754:10;:98:::1;;25835:17;-1:-1:-1::0;;;;;25811:41:1::1;:4;:21;;;-1:-1:-1::0;;;;;25811:41:1::1;;25754:98;;;25791:17;-1:-1:-1::0;;;;;25767:41:1::1;:4;:21;;;-1:-1:-1::0;;;;;25767:41:1::1;;25754:98;25753:184;;25916:4;:21;;;25753:184;;;25876:17;25753:184;25955:15;::::0;::::1;::::0;25988:30;;26036:3:::1;25675:24;:378::i;:::-;25657:14;::::0;::::1;25605:448:::0;25641:14:::1;::::0;::::1;25605:448:::0;25626:13:::1;::::0;::::1;25605:448:::0;-1:-1:-1;;;;;25605:448:1::1;25606:18;::::0;::::1;25605:448:::0;26068:434;::::1;;;26136:43;26153:4;:14;;;26137:4;:13;;;:30;26136:41;:43::i;:::-;26102:77:::0;;::::1;::::0;;26249:14:::1;::::0;::::1;::::0;26222:53:::1;::::0;26249:25:::1;::::0;:23:::1;:25::i;:::-;26222:22;::::0;::::1;::::0;;:26:::1;:53::i;:::-;26197:22;::::0;::::1;:78:::0;26068:434:::1;;;26348:25;:4;:14;;;:23;:25::i;:::-;26314:59:::0;;::::1;::::0;;26460:14:::1;::::0;::::1;::::0;26444:13:::1;::::0;::::1;::::0;26416:71:::1;::::0;26443:43:::1;::::0;26444:30:::1;26443:41;:43::i;:::-;26416:22;::::0;::::1;::::0;;:26:::1;:71::i;:::-;26391:22;::::0;::::1;:96:::0;26068:434:::1;26637:17:::0;;:21:::1;;::::0;26633:204:::1;;26678:13;26711:5;:17;;;26694:34;;:4;:14;;;:34;;;;;26746:14;::::0;::::1;:23:::0;;26694:34;;;::::1;26746:23:::0;;;::::1;::::0;;26787:17:::1;::::0;::::1;:35:::0;;;;::::1;-1:-1:-1::0;;;;;26787:35:1::1;::::0;;-1:-1:-1;26633:204:1::1;26896:15;::::0;::::1;::::0;-1:-1:-1;;;;;26896:19:1::1;::::0;26892:138:::1;;26962:68;26978:4;:14;;;-1:-1:-1::0;;;27014:5:1::1;:15;;;-1:-1:-1::0;;;;;26962:68:1::1;:15;:68::i;:::-;26933:25;::::0;::::1;:97:::0;;;;::::1;::::0;;26892:138:::1;27126:4;:21;;;-1:-1:-1::0;;;;;27104:43:1::1;:5;:18;;;-1:-1:-1::0;;;;;27104:43:1::1;;27100:2131;;;27242:4;:16;;;27238:1632;;;27457:5;:31;;;27452:565;;27582:348;27638:5;:20;;;27688:1;27719:10;:15;;;27764:10;:27;;;27821:5;:20;;;27871:10;:33;;;27582:12;:26;;:348;;;;;;;;;:::i;:::-;-1:-1:-1::0;;;;;27516:414:1::1;27539:39;::::0;::::1;27516:414:::0;::::1;::::0;;::::1;::::0;::::1;27517:20;::::0;::::1;27516:414:::0;27990:4:::1;27956:31;::::0;::::1;:38:::0;27452:565:::1;28038:19;28084:435;28125:4;:13;;;28169:10;:61;;28210:20;;28169:61;;;28182:5;:25;;;28169:61;28262:10;:61;;28298:5;:25;;;28262:61;;;28275:20;;28262:61;28354:39;::::0;::::1;::::0;28423:20:::1;::::0;::::1;::::0;28473::::1;::::0;::::1;::::0;28084:5:::1;::::0;:435;;;28354:39;28423:20;28084:11:::1;:435::i;:::-;28038:481;;28717:10;28713:44;;;28744:13;;28713:44;28798:53;28821:5;:15;;;28838:12;28798:22;:53::i;:::-;-1:-1:-1::0;;;;;28780:71:1::1;:15;::::0;::::1;:71:::0;-1:-1:-1;27238:1632:1::1;28901:10;:46;;28934:4;:13;;;28901:46;;;28930:1;28914:4;:13;;;:17;28901:46;28888:59;::::0;;::::1;::::0;::::1;:10;::::0;::::1;:59:::0;27100:2131:::1;;;28994:4;:22;;;-1:-1:-1::0;;;;;28972:44:1::1;:5;:18;;;-1:-1:-1::0;;;;;28972:44:1::1;;28968:263;;29169:47;29197:5;:18;;;29169:27;:47::i;:::-;29156:60;::::0;;::::1;::::0;::::1;:10;::::0;::::1;:60:::0;28968:263:::1;24620:4621;;;;29337:10;:15;;;29323:29;;:5;:10;;;:29;;;29319:827;;29369:23;29394:29:::0;29443:320:::1;29483:10;:27;;;29532:5;:20;;;29574:10;:15;;;29611:5;:20;;;29653:10;:33;;;29708:10;:37;;;29443:12;:18;;:320;;;;;;;;;:::i;:::-;29884:18;::::0;::::1;::::0;29920:10:::1;::::0;::::1;::::0;29778:5:::1;29777:241:::0;;-1:-1:-1;;;;29777:241:1::1;-1:-1:-1::0;;;29777:241:1::1;::::0;;::::1;;;-1:-1:-1::0;;;;29777:241:1::1;-1:-1:-1::0;;;29777:241:1;;;::::1;::::0;;;::::1;::::0;;;::::1;-1:-1:-1::0;;;;29777:241:1::1;-1:-1:-1::0;;;29777:241:1::1;;::::0;;;::::1;::::0;;;::::1;::::0;;;::::1;::::0;;;::::1;-1:-1:-1::0;;29777:241:1::1;-1:-1:-1::0;;;;;29777:241:1;;::::1;;::::0;;-1:-1:-1;29319:827:1::1;::::0;-1:-1:-1;29319:827:1::1;;30117:18;::::0;::::1;::::0;30096:5:::1;:39:::0;;-1:-1:-1;;30096:39:1::1;-1:-1:-1::0;;;;;30096:39:1;;::::1;::::0;;;::::1;::::0;;29319:827:::1;30226:5;:15;;;-1:-1:-1::0;;;;;30202:39:1::1;:5;:20;;;-1:-1:-1::0;;;;;30202:39:1::1;;30198:72;;30255:15;::::0;::::1;::::0;30243:9:::1;:27:::0;;-1:-1:-1;;;;;;30243:27:1::1;-1:-1:-1::0;;;;;30243:27:1;;::::1;::::0;;;::::1;::::0;;30198:72:::1;30452:10;30448:330;;;30501:25;::::0;::::1;::::0;30478:20:::1;:48:::0;30544:17:::1;::::0;::::1;::::0;-1:-1:-1;;;;;30544:21:1::1;::::0;30540:67:::1;;30590:17;::::0;::::1;::::0;30567:12:::1;:40:::0;;-1:-1:-1;;;;;;30567:40:1;::::1;-1:-1:-1::0;;;;;30567:40:1;;::::1;::::0;;::::1;;::::0;;;::::1;::::0;;30540:67:::1;30448:330;;;30661:25;::::0;::::1;::::0;30638:20:::1;:48:::0;30704:17:::1;::::0;::::1;::::0;-1:-1:-1;;;;;30704:21:1::1;::::0;30700:67:::1;;30750:17;::::0;::::1;::::0;30727:12:::1;:40:::0;;-1:-1:-1;;;;;30727:40:1;;::::1;-1:-1:-1::0;;;30727:40:1;;;::::1;::::0;::::1;::::0;;::::1;;;::::0;;;::::1;::::0;;30700:67:::1;30823:10;30809:24;;:10;:24;;;:202;;30938:22;::::0;::::1;::::0;30980:30;;30962:48;::::1;30809:202;;;30867:5;:30;;;30849:15;:48;30899:5;:22;;;30809:202;30788:223:::0;;-1:-1:-1;30788:223:1;-1:-1:-1;31070:684:1;::::1;;;31114:1;31104:7;:11;31100:82;;;31117:65;31145:6;31153:9;31173:7;31172:8;;31117:27;:65::i;:::-;31197:22;31222:10;:8;:10::i;:::-;31197:35;;31269:10;-1:-1:-1::0;;;;;31246:56:1::1;;31303:7;31312;31321:4;;31246:80;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;31388:10;:8;:10::i;:::-;31348:36;:14:::0;31375:7;31348:18:::1;:36::i;:::-;:50;;31340:66;;;::::0;;-1:-1:-1;;;31340:66:1;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;31340:66:1;;;;;;;;;;;;;::::1;;31070:684;;;;31451:1;31441:7;:11;31437:82;;;31454:65;31482:6;31490:9;31510:7;31509:8;;31454:27;:65::i;:::-;31534:22;31559:10;:8;:10::i;:::-;31534:35;;31606:10;-1:-1:-1::0;;;;;31583:56:1::1;;31640:7;31649;31658:4;;31583:80;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;31725:10;:8;:10::i;:::-;31685:36;:14:::0;31712:7;31685:18:::1;:36::i;:::-;:50;;31677:66;;;::::0;;-1:-1:-1;;;31677:66:1;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;31677:66:1;;;;;;;;;;;;;::::1;;31070:684;;31815:18;::::0;;::::1;::::0;31835:15:::1;::::0;::::1;::::0;31852:10:::1;::::0;;::::1;::::0;31769:94;;;;;::::1;::::0;::::1;::::0;;;-1:-1:-1;;;;;31769:94:1;;::::1;::::0;;;;-1:-1:-1;;;;;31769:94:1;;::::1;::::0;;;;;;;::::1;;::::0;;;;;;;;::::1;::::0;31774:10:::1;::::0;31769:94:::1;::::0;;;;;;;::::1;-1:-1:-1::0;;31873:5:1::1;:21:::0;;-1:-1:-1;;;;31873:21:1::1;-1:-1:-1::0;;;31873:21:1::1;::::0;;-1:-1:-1;22899:9002:1;;;;-1:-1:-1;22899:9002:1;-1:-1:-1;;;;;;22899:9002:1:o;3176:33::-;;;-1:-1:-1;;;;;3176:33:1;;:::o;3088:41::-;;;-1:-1:-1;;;;;3088:41:1;;;;-1:-1:-1;;;3088:41:1;;;;:::o;3554:54::-;;;;;;;;;;;;;;;;;;-1:-1:-1;3554:54:1;;;;;;-1:-1:-1;;;3554:54:1;;-1:-1:-1;;;;;3554:54:1;;-1:-1:-1;;;3554:54:1;;;;;:::o;9623:660::-;3997:5;:14;-1:-1:-1;;;3997:14:1;;;;3989:30;;;;;-1:-1:-1;;;3989:30:1;;;;;;;;;;;;-1:-1:-1;;;3989:30:1;;;;;;;;;;;;;;;4046:5;4029:22;;-1:-1:-1;;;;4029:22:1;;;1036::0::1;:20;:22::i;:::-;9786:36:1::2;9825:32:::0;;-1:-1:-1;;;9825:32:1;::::2;;;::::0;9935:76:::2;:12;9825:32:::0;9984:26;9935:17:::2;:76::i;:::-;10021:5;:64:::0;;::::2;::::0;;::::2;-1:-1:-1::0;;;10021:64:1;::::2;-1:-1:-1::0;;;;10021:64:1;;::::2;::::0;;;::::2;::::0;;;9884:127;;-1:-1:-1;10099:62:1;::::2;;10095:181;;10180:96;::::0;;::::2;::::0;;::::2;::::0;;;::::2;;::::0;::::2;::::0;;;::::2;::::0;;;;;;;;;::::2;10095:181;-1:-1:-1::0;;4072:5:1;:21;;-1:-1:-1;;;;4072:21:1;-1:-1:-1;;;4072:21:1;;;-1:-1:-1;9623:660:1:o;2697:27::-;;;-1:-1:-1;;;;;2697:27:1;;;-1:-1:-1;;;2697:27:1;;;;;;-1:-1:-1;;;2697:27:1;;;;;-1:-1:-1;;;2697:27:1;;;;;-1:-1:-1;;;2697:27:1;;;;;-1:-1:-1;;;2697:27:1;;;;;-1:-1:-1;;;2697:27:1;;;;:::o;17529:1188::-;17711:15;3997:14;;17711:15;;-1:-1:-1;;;3997:14:1;;;;3989:30;;;;;-1:-1:-1;;;3989:30:1;;;;;;;;;;;;-1:-1:-1;;;3989:30:1;;;;;;;;;;;;;;;4046:5;4029:22;;-1:-1:-1;;;;4029:22:1;;;-1:-1:-1;;;;;17763:10:1;::::1;17755:19;;;::::0;::::1;;17787:17;17806::::0;17839:272:::1;17872:225;;;;;;;;17922:9;-1:-1:-1::0;;;;;17872:225:1::1;;;;;17964:9;17872:225;;;;;;18006:9;17872:225;;;;;;18053:25;18060:6;-1:-1:-1::0;;;;;18053:14:1::1;:23;:25::i;:::-;17872:225;;::::0;;17839:15:::1;:272::i;:::-;17784:327;;;;;18140:10;18122:29;;18179:10;18161:29;;18201:22;18233::::0;18279:1:::1;18269:7;:11;18265:44;;;18299:10;:8;:10::i;:::-;18282:27;;18265:44;18323:11:::0;;18319:44:::1;;18353:10;:8;:10::i;:::-;18336:27;;18319:44;18396:10;-1:-1:-1::0;;;;;18373:56:1::1;;18430:7;18439;18448:4;;18373:80;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;18477:1;18467:7;:11;18463:73;;;18519:10;:8;:10::i;:::-;18488:27;:14:::0;18507:7;18488:18:::1;:27::i;:::-;:41;;18480:56;;;::::0;;-1:-1:-1;;;18480:56:1;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;18480:56:1;;;;;;;;;;;;;::::1;;18550:11:::0;;18546:73:::1;;18602:10;:8;:10::i;:::-;18571:27;:14:::0;18590:7;18571:18:::1;:27::i;:::-;:41;;18563:56;;;::::0;;-1:-1:-1;;;18563:56:1;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;18563:56:1;;;;;;;;;;;;;::::1;;18674:9;18635:75;;18663:9;18635:75;;18652:9;-1:-1:-1::0;;;;;18635:75:1::1;;18640:10;18685:6;18693:7;18702;18635:75;;;;-1:-1:-1::0;;;;;18635:75:1::1;;;;;;-1:-1:-1::0;;;;;18635:75:1::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1::0;;4072:5:1;:21;;-1:-1:-1;;;;4072:21:1;-1:-1:-1;;;4072:21:1;;;-1:-1:-1;17529:1188:1;;;;-1:-1:-1;17529:1188:1;-1:-1:-1;;;;;;17529:1188:1:o;2861:44::-;;;;:::o;31949:1913::-;3997:5;:14;-1:-1:-1;;;3997:14:1;;;;3989:30;;;;;-1:-1:-1;;;3989:30:1;;;;;;;;;;;;-1:-1:-1;;;3989:30:1;;;;;;;;;;;;;;;4046:5;4029:22;;-1:-1:-1;;;;4029:22:1;;;1036::0::1;:20;:22::i;:::-;32145:9:1::2;::::0;-1:-1:-1;;;;;32145:9:1::2;32172:14:::0;32164:28:::2;;;::::0;;-1:-1:-1;;;32164:28:1;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;32164:28:1;;;;;;;;;;;;;::::2;;32203:12;32218:44;32244:7;32253:3;32218:44;;32258:3;32218:25;:44::i;:::-;32203:59;;32272:12;32287:44;32313:7;32322:3;32287:44;;32327:3;32287:25;:44::i;:::-;32272:59;;32341:22;32366:10;:8;:10::i;:::-;32341:35;;32386:22;32411:10;:8;:10::i;:::-;32386:35:::0;-1:-1:-1;32436:11:1;;32432:72:::2;;32449:55;32477:6;32485:9;32496:7;32449:27;:55::i;:::-;32518:11:::0;;32514:72:::2;;32531:55;32559:6;32567:9;32578:7;32531:27;:55::i;:::-;32621:10;-1:-1:-1::0;;;;;32597:58:1::2;;32656:4;32662;32668;;32597:76;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;32684:21;32708:10;:8;:10::i;:::-;32684:34;;32728:21;32752:10;:8;:10::i;:::-;32728:34:::0;-1:-1:-1;32809:13:1;32781:24:::2;:14:::0;32800:4;32781:18:::2;:24::i;:::-;:41;;32773:56;;;::::0;;-1:-1:-1;;;32773:56:1;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;32773:56:1;;;;;;;;;;;;;::::2;;32875:13:::0;32847:24:::2;:14:::0;32866:4;32847:18:::2;:24::i;:::-;:41;;32839:56;;;::::0;;-1:-1:-1;;;32839:56:1;;::::2;;::::0;::::2;::::0;::::2;::::0;;;;-1:-1:-1;;;32839:56:1;;;;;;;;;;;;;::::2;;33010:30:::0;;::::2;33066::::0;;::::2;33111:9:::0;;33107:332:::2;;33136:18;33157:17:::0;;-1:-1:-1;;;33157:17:1;::::2;:22:::0;;;33209:17;;:44:::2;;33241:12;33233:20;;:5;:20;;;;;;33209:44;;;33229:1;33209:44;33193:60:::0;-1:-1:-1;;;;;;33271:18:1;::::2;::::0;33267:61:::2;;33291:12;:37:::0;;-1:-1:-1;;;;;33291:37:1;;::::2;::::0;::::2;;-1:-1:-1::0;;;;;;33291:37:1;;::::2;;::::0;;33267:61:::2;33366:62;33390:5;33382;:13;-1:-1:-1::0;;;33417:10:1::2;-1:-1:-1::0;;;;;33366:62:1::2;:15;:62::i;:::-;33342:20;:86:::0;;;;::::2;::::0;;-1:-1:-1;;33107:332:1::2;33452:9:::0;;33448:332:::2;;33477:18;33498:17:::0;;-1:-1:-1;;;33498:17:1;::::2;33519:1;33498:22:::0;;;;33550:17;;:44:::2;;33582:12;33574:20;;:5;:20;;;;;;33550:44;;;33570:1;33550:44;33534:60:::0;-1:-1:-1;;;;;;33612:18:1;::::2;::::0;33608:61:::2;;33632:12;:37:::0;;-1:-1:-1;;;;;;;;33632:37:1;;::::2;::::0;::::2;::::0;::::2;::::0;::::2;;::::0;::::2;;::::0;;33608:61:::2;33707:62;33731:5;33723;:13;-1:-1:-1::0;;;33758:10:1::2;-1:-1:-1::0;;;;;33707:62:1::2;:15;:62::i;:::-;33683:20;:86:::0;;;;::::2;::::0;;-1:-1:-1;;33448:332:1::2;33813:9;-1:-1:-1::0;;;;;33795:60:1::2;33801:10;-1:-1:-1::0;;;;;33795:60:1::2;;33824:7;33833;33842:5;33849;33795:60;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1::0;;4072:5:1;:21;;-1:-1:-1;;;;4072:21:1;-1:-1:-1;;;4072:21:1;;;-1:-1:-1;;;;;;;;;;;;31949:1913:1:o;18765:1035::-;18965:15;3997:14;;18965:15;;-1:-1:-1;;;3997:14:1;;;;3989:30;;;;;-1:-1:-1;;;3989:30:1;;;;;;;;;;;;-1:-1:-1;;;3989:30:1;;;;;;;;;;;;;;;4046:5;4029:22;;-1:-1:-1;;;;4029:22:1;;;19154:47:::1;:9;19168:10;19180:9:::0;19191;19154:13:::1;:47::i;:::-;19241:20;::::0;::::1;::::0;19121:80;;-1:-1:-1;;;;;;19241:20:1;;::::1;19222:39:::0;;::::1;;:81;;19287:16;19222:81;;;19264:20;::::0;::::1;::::0;-1:-1:-1;;;;;19264:20:1::1;19222:81;19342:20;::::0;::::1;::::0;19212:91;;-1:-1:-1;;;;;;;;;19342:20:1;;::::1;::::0;::::1;19323:39:::0;;::::1;;:81;;19388:16;19323:81;;;19365:20;::::0;::::1;::::0;-1:-1:-1;;;19365:20:1;::::1;-1:-1:-1::0;;;;;19365:20:1::1;19323:81;19313:91:::0;-1:-1:-1;;;;;;19419:11:1;::::1;::::0;19415:142:::1;;19446:20;::::0;::::1;:31:::0;;-1:-1:-1;;;;;;19446:31:1;::::1;-1:-1:-1::0;;;;;19446:31:1;;::::1;::::0;;::::1;::::0;::::1;;::::0;;;19491:55:::1;::::0;19519:6:::1;::::0;19527:9;;19491:55;::::1;:27;:55::i;:::-;-1:-1:-1::0;;;;;19570:11:1;::::1;::::0;19566:142:::1;;19597:20;::::0;::::1;:31:::0;;-1:-1:-1;;;;;;;;19597:31:1;;::::1;::::0;::::1;::::0;;::::1;::::0;::::1;;::::0;;::::1;::::0;;;::::1;::::0;;;19642:55:::1;::::0;19670:6:::1;::::0;19678:9;;19642:55;::::1;:27;:55::i;:::-;19723:70;::::0;;-1:-1:-1;;;;;19723:70:1;::::1;::::0;;-1:-1:-1;;;;;19723:70:1;;::::1;;::::0;::::1;::::0;;::::1;::::0;;;;;;::::1;::::0;;::::1;::::0;;;;::::1;::::0;19731:10:::1;::::0;19723:70:::1;::::0;;;;;;;;::::1;-1:-1:-1::0;4072:5:1;:21;;-1:-1:-1;;;;4072:21:1;-1:-1:-1;;;4072:21:1;;;18765:1035;;;;-1:-1:-1;18765:1035:1;-1:-1:-1;;;;18765:1035:1:o;3449:59::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;3449:59:1;;;;;;;;;;-1:-1:-1;;;3449:59:1;;;;:::o;3351:52::-;;;;;;;;;;;;;:::o;1880:53::-;;;:::o;33915:513::-;3997:5;:14;-1:-1:-1;;;3997:14:1;;;;3989:30;;;;;-1:-1:-1;;;3989:30:1;;;;;;;;;;;;-1:-1:-1;;;3989:30:1;;;;;;;;;;;;;;;4046:5;4029:22;;-1:-1:-1;;;;4029:22:1;;;4276:34:::1;::::0;;-1:-1:-1;;;4276:34:1;;;;-1:-1:-1;;;;;4294:7:1::1;4276:32;::::0;::::1;::::0;:34:::1;::::0;;::::1;::::0;::::1;::::0;;;;;;;;:32;:34;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;4276:34:1;-1:-1:-1;;;;;4262:48:1::1;:10;:48;4254:57;;;::::0;::::1;;34051:17:::2;::::0;::::2;::::0;;:62:::2;;;34089:1;34073:12;:17;;;;:39;;;;;34110:2;34094:12;:18;;;;34073:39;34050:148;;;;-1:-1:-1::0;34135:17:1::2;::::0;::::2;::::0;;:62:::2;;;34173:1;34157:12;:17;;;;:39;;;;;34194:2;34178:12;:18;;;;34157:39;34029:179;;;::::0;::::2;;34218:20;34241:17:::0;;34304;34320:1:::2;34304:17:::0;;;;34288:34;::::2;34241:17;34268:54:::0;;::::2;-1:-1:-1::0;;;34268:54:1;;::::2;::::0;;::::2;;::::0;;;34241:17;;::::2;;34337:84;34369:2;34241:17:::0;34337:84:::2;::::0;;34373:19:::2;34352::::0;;;::::2;34337:84:::0;::::2;::::0;;34373:19;34391:1:::2;34373:19:::0;;;;34337:84:::2;::::0;::::2;::::0;;;::::2;::::0;;;;;;::::2;::::0;;;;;;;;;;;;;::::2;-1:-1:-1::0;;4072:5:1;:21;;-1:-1:-1;;;;4072:21:1;-1:-1:-1;;;4072:21:1;;;-1:-1:-1;33915:513:1:o;34481:1017::-;34656:15;3997:14;;34656:15;;-1:-1:-1;;;3997:14:1;;;;3989:30;;;;;-1:-1:-1;;;3989:30:1;;;;;;;;;;;;-1:-1:-1;;;3989:30:1;;;;;;;;;;;;;;;4046:5;4029:22;;-1:-1:-1;;;;4029:22:1;;;4276:34:::1;::::0;;-1:-1:-1;;;4276:34:1;;;;-1:-1:-1;;;;;4294:7:1::1;4276:32;::::0;::::1;::::0;:34:::1;::::0;;::::1;::::0;::::1;::::0;;;;;;;;:32;:34;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;4276:34:1;-1:-1:-1;;;;;4262:48:1::1;:10;:48;4254:57;;;::::0;::::1;;34729:12:::2;:19:::0;-1:-1:-1;;;;;34729:19:1;;::::2;34710:38:::0;;::::2;;:79;;34773:16;34710:79;;;34751:12;:19:::0;-1:-1:-1;;;;;34751:19:1::2;34710:79;34828:12;:19:::0;34700:89;;-1:-1:-1;;;;;;;;;34828:19:1;;::::2;::::0;::::2;34809:38:::0;;::::2;;:79;;34872:16;34809:79;;;34850:12;:19:::0;-1:-1:-1;;;34850:19:1;::::2;-1:-1:-1::0;;;;;34850:19:1::2;34809:79;34799:89:::0;-1:-1:-1;;;;;;34903:11:1;::::2;::::0;34899:256:::2;;34945:12;:19:::0;-1:-1:-1;;;;;34934:30:1;;::::2;34945:19:::0;::::2;34934:30;34930:45;;;-1:-1:-1::0;;34966:9:1;;;;34930:45:::2;35045:12;:30:::0;;-1:-1:-1;;;;;;35045:30:1;::::2;-1:-1:-1::0;;;;;35045:30:1;;::::2;::::0;;::::2;::::0;::::2;;::::0;;;35089:55:::2;::::0;35117:6:::2;::::0;35125:9;;35089:55;::::2;:27;:55::i;:::-;-1:-1:-1::0;;;;;35168:11:1;::::2;::::0;35164:256:::2;;35210:12;:19:::0;-1:-1:-1;;;;;35199:30:1;;::::2;-1:-1:-1::0;;;35210:19:1;;::::2;;35199:30;35195:45;;;-1:-1:-1::0;;35231:9:1;35195:45:::2;35310:12;:30:::0;;-1:-1:-1;;;;;;;;35310:30:1;;::::2;::::0;::::2;::::0;;::::2;::::0;::::2;;::::0;;::::2;::::0;;;::::2;::::0;;;35354:55:::2;::::0;35382:6:::2;::::0;35390:9;;35354:55;::::2;:27;:55::i;:::-;35435:56;::::0;;-1:-1:-1;;;;;35435:56:1;;::::2;::::0;;;::::2;;::::0;::::2;::::0;;;-1:-1:-1;;;;;35435:56:1;::::2;::::0;35451:10:::2;::::0;35435:56:::2;::::0;;;;;;;;;::::2;4072:5:::0;:21;;-1:-1:-1;;;;4072:21:1;-1:-1:-1;;;4072:21:1;;;34481:1017;;;;-1:-1:-1;34481:1017:1;-1:-1:-1;;34481:1017:1:o;9076:499::-;9211:30;9243:51;1036:22:0;:20;:22::i;:::-;9329:239:1::1;9367:17;:15;:17::i;:::-;9402:11;;9329:239;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;::::0;;;-1:-1:-1;9431:10:1;9499:9:::1;::::0;9329:12:::1;::::0;:239;;-1:-1:-1;;;;9431:10:1;::::1;;;::::0;-1:-1:-1;9459:22:1::1;-1:-1:-1::0;;;9459:22:1;::::1;::::0;::::1;::::0;-1:-1:-1;;;;;;9499:9:1;;::::1;::::0;-1:-1:-1;;;9526:28:1;::::1;;9329:20;:239::i;:::-;9310:258;;;;9076:499:::0;;;;;:::o;19918:939::-;20044:15;3997:14;;20044:15;;-1:-1:-1;;;3997:14:1;;;;3989:30;;;;;-1:-1:-1;;;3989:30:1;;;;;;;;;;;;-1:-1:-1;;;3989:30:1;;;;;;;;;;;;;;;4046:5;4029:22;;-1:-1:-1;;;;4029:22:1;;;20206:227:::1;::::0;;::::1;::::0;::::1;::::0;;20256:10:::1;20206:227:::0;;::::1;::::0;;::::1;;::::0;::::1;::::0;;;::::1;::::0;;;;;;;4046:5;;;;20173:274:::1;::::0;20206:227;;;20389:25:::1;-1:-1:-1::0;;;;;20389:14:1;::::1;:23;:25::i;:::-;20388:26;;20206:227;;::::0;;20173:15:::1;:274::i;:::-;20088:359;;;;;;20477:10;20476:11;;20458:30;;20517:10;20516:11;;20498:30;;20553:1;20543:7;:11;:26;;;;20568:1;20558:7;:11;20543:26;20539:232;;;20650:20;::::0;::::1;::::0;;-1:-1:-1;;;;;20650:20:1;;::::1;:39:::0;;::::1;20585:175:::0;::::1;-1:-1:-1::0;;;20707:20:1;;;::::1;::::0;::::1;:39:::0;::::1;20585:175:::0;;::::1;::::0;;::::1;::::0;;::::1;-1:-1:-1::0;;;;;;20585:175:1::1;;::::0;;20539:232:::1;20786:64;::::0;;-1:-1:-1;;;;;20786:64:1;::::1;::::0;;::::1;::::0;::::1;::::0;;;;;;;;;;;::::1;::::0;;::::1;::::0;;;;::::1;::::0;20791:10:::1;::::0;20786:64:::1;::::0;;;;;;;;::::1;-1:-1:-1::0;;4072:5:1;:21;;-1:-1:-1;;;;4072:21:1;-1:-1:-1;;;4072:21:1;;;-1:-1:-1;19918:939:1;;;;-1:-1:-1;19918:939:1;-1:-1:-1;;19918:939:1:o;6169:2854::-;6338:26;6378:37;6429:20;1036:22:0;:20;:22::i;:::-;6474:32:1::1;6485:9;6496;6474:10;:32::i;:::-;6806:16;::::0;;::::1;::::0;::::1;6517:25;6806:16:::0;;;:5:::1;:16;::::0;;;;;6862;;::::1;::::0;;::::1;::::0;;;;7045:27:::1;::::0;::::1;::::0;::::1;::::0;;::::1;::::0;7090:36;;::::1;-1:-1:-1::0;;;;;7090:36:1::1;::::0;6517:25;;-1:-1:-1;;;7144:20:1;::::1;;;::::0;6517:25;;6806:16;;-1:-1:-1;;;7182:17:1;::::1;;;::::0;7227:25:::1;;;::::0;::::1;;7420:27;::::0;::::1;::::0;::::1;::::0;;::::1;::::0;-1:-1:-1;7465:36:1;;::::1;-1:-1:-1::0;;;;;7465:36:1::1;::::0;-1:-1:-1;;;;7519:20:1;::::1;;;::::0;-1:-1:-1;;;;7557:17:1;::::1;;;::::0;7602:25:::1;;;::::0;::::1;;-1:-1:-1::0;;7648:27:1::1;::::0;;::::1;::::0;::::1;::::0;;:19:::1;:27:::0;-1:-1:-1;;;;;7648:27:1;::::1;::::0;;-1:-1:-1;;;7648:27:1;::::1;;::::0;;::::1;::::0;::::1;::::0;::::1;;::::0;::::1;::::0;;;::::1;-1:-1:-1::0;;;7648:27:1;::::1;::::0;::::1;::::0;;;;;;;-1:-1:-1;;;7648:27:1;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;7648:27:1;::::1;::::0;;::::1;::::0;;;;::::1;-1:-1:-1::0;;;7648:27:1;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;7648:27:1;;::::1;::::0;;::::1;;;::::0;;;;;;-1:-1:-1;7690:23:1;;::::1;::::0;;::::1;;7686:1331;::::0;-1:-1:-1;7686:1331:1::1;;-1:-1:-1::0;7754:41:1;;;::::1;::::0;-1:-1:-1;7813:73:1;::::1;::::0;-1:-1:-1;7904:41:1;::::1;::::0;-1:-1:-1;7729:230:1::1;;7686:1331;7994:9;7980:23;;:6;:11;;;:23;;;7976:1041;;;8019:11;8033:17;:15;:17::i;:::-;8245:11;::::0;::::1;::::0;8278:23:::1;::::0;::::1;::::0;8323:9:::1;::::0;8354:29:::1;::::0;::::1;::::0;8019:31;;-1:-1:-1;8065:20:1::1;::::0;;;8148:253:::1;::::0;:12:::1;::::0;8019:31;;8065:20;;8245:11;8278:23;-1:-1:-1;;;;;8323:9:1::1;::::0;8148:26:::1;:253::i;:::-;8440:36:::0;;::::1;:58:::0;;;::::1;::::0;-1:-1:-1;;8516:91:1;;;::::1;:149:::0;;;::::1;::::0;-1:-1:-1;8683:26:1;;::::1;:48;::::0;-1:-1:-1;8415:330:1::1;::::0;-1:-1:-1;;8415:330:1::1;7976:1041;-1:-1:-1::0;8801:41:1;;;::::1;::::0;-1:-1:-1;8860:73:1::1;::::0;-1:-1:-1;8951:41:1;::::1;::::0;-1:-1:-1;1068:1:0::1;6169:2854:1::0;;;;;:::o;1423:41::-;;;:::o;1785:43::-;;;:::o;1606:40::-;;;:::o;1697:36::-;;;:::o;2771:44::-;;;;:::o;3256:49::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;3256:49:1;;;-1:-1:-1;;;3256:49:1;;;;;;;;;;;;;;;-1:-1:-1;;;;;3256:49:1;;-1:-1:-1;;;3256:49:1;;;;;-1:-1:-1;;;3256:49:1;;;;;:::o;10387:621::-;10465:5;:18;-1:-1:-1;;;;;10465:18:1;:23;10457:38;;;;;-1:-1:-1;;;10457:38:1;;;;;;;;;;;;-1:-1:-1;;;10457:38:1;;;;;;;;;;;;;;;10506:10;10519:41;10547:12;10519:27;:41::i;:::-;10506:54;;10572:18;10592:22;10618:42;10642:17;:15;:17::i;:::-;10618:12;;:23;:42::i;:::-;10679:276;;;;;;;;-1:-1:-1;;;;;10679:276:1;;;;;;;;;;;;;;;;-1:-1:-1;10679:276:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10940:4;10679:276;;;;;;;;10671:284;;-1:-1:-1;;;;;10671:284:1;;;;;-1:-1:-1;;;;10671:284:1;-1:-1:-1;;;10671:284:1;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;10671:284:1;;;;-1:-1:-1;;;;10671:284:1;-1:-1:-1;;;10671:284:1;;;;;;;;;;;;;;;;10971:30;;;;;;;;;;;;;10679:276;;-1:-1:-1;10679:276:1;;-1:-1:-1;10971:30:1;;;;;;;;;10387:621;;;;:::o;2195:364:26:-;2279:7;;2350:11;2315:31;;;;-1:-1:-1;;2315:31:26;;;;;;2314:47;;-1:-1:-1;2371:13:26;2423:11;2388:31;;;;637:9:28;2388:31:26;;;;;;2387:47;2371:63;;2444:15;2491:11;2469:33;;2480:7;2470;:17;2469:33;;;;;;;;2506:1;2462:45;2444:63;;2544:8;2524:28;;-1:-1:-1;;;;;2524:28:26;;;;;;;;2517:35;;;;;2195:364;;;;:::o;835:96:0:-;906:4;-1:-1:-1;;;;;915:8:0;898:25;;890:34;;;;;;835:96::o;5018:138:1:-;5108:15;5018:138;:::o;2188:1921:27:-;2372:10;2384:16;2412;2438:11;2431:18;;:4;:18;;;;;;;;2412:37;;2470:1;2463:4;:8;;;:35;;;;;2482:11;2475:18;;:4;:18;;;;;;;;:23;;;;2463:35;2459:53;;;-1:-1:-1;;2500:12:27;2459:53;2562:3;2558:1545;;;2582:13;2597:12;2613:20;2622:10;2613:8;:20::i;:::-;2750:1;2793:13;;;;;2714:12;2793:13;;;;;;;;;;;2750:11;;;;;;;2729:33;;-1:-1:-1;;2729:33:27;2793:20;;;2960:11;;;;-1:-1:-1;2581:52:27;;-1:-1:-1;2581:52:27;;-1:-1:-1;2729:33:27;2960:11;3102:170;;3261:11;3250:6;3244:13;;3231:10;:26;3230:42;3102:170;;;3200:11;3161:34;3188:6;3161:26;:34::i;:::-;3152:6;:43;3146:50;;3133:10;:63;3132:79;3102:170;3095:177;;2558:1545;;;;;;;3401:13;3416:12;3432:24;3441:10;3454:1;3441:14;3432:8;:24::i;:::-;3400:56;;;;3528:12;3561:1;3551:6;3546:11;;:1;:11;;3545:17;3543:20;3528:35;;3577:14;3610:4;3594;:13;3599:7;3594:13;;;;;;;;;;;;;;;;:20;3577:37;;3753:6;3763:1;3753:11;;3739:25;;3895:11;:197;;4081:11;4070:6;4052:15;:24;4046:31;;4029:10;4042:1;4029:14;:48;4028:64;3895:197;;;3998:11;3987:6;3949:35;3977:6;3949:27;:35::i;:::-;:44;3943:51;;3926:10;3939:1;3926:14;:68;3925:84;3895:197;3888:204;;2558:1545;;;;;2188:1921;;;;;;;;:::o;1355:2580:28:-;1418:20;1450:15;1475:1;1468:4;:8;;;:57;;1519:4;1512:12;;1468:57;;;1495:4;1488:12;;1487:13;;1468:57;1450:75;-1:-1:-1;637:9:28;1543:28;;;1535:42;;;;;-1:-1:-1;;;1535:42:28;;;;;;;;;;;;-1:-1:-1;;;1535:42:28;;;;;;;;;;;;;;;1588:13;1614:3;1604:13;;:93;;-1:-1:-1;;;1604:93:28;;;1625:34;1604:93;1588:109;;;-1:-1:-1;1721:3:28;1711:13;;:18;1707:83;;1748:34;1740:42;1787:3;1739:51;1707:83;1814:3;1804:13;;:18;1800:83;;1841:34;1833:42;1880:3;1832:51;1800:83;1907:3;1897:13;;:18;1893:83;;1934:34;1926:42;1973:3;1925:51;1893:83;2000:4;1990:14;;:19;1986:84;;2028:34;2020:42;2067:3;2019:51;1986:84;2094:4;2084:14;;:19;2080:84;;2122:34;2114:42;2161:3;2113:51;2080:84;2188:4;2178:14;;:19;2174:84;;2216:34;2208:42;2255:3;2207:51;2174:84;2282:4;2272:14;;:19;2268:84;;2310:34;2302:42;2349:3;2301:51;2268:84;2376:5;2366:15;;:20;2362:85;;2405:34;2397:42;2444:3;2396:51;2362:85;2471:5;2461:15;;:20;2457:85;;2500:34;2492:42;2539:3;2491:51;2457:85;2566:5;2556:15;;:20;2552:85;;2595:34;2587:42;2634:3;2586:51;2552:85;2661:5;2651:15;;:20;2647:85;;2690:34;2682:42;2729:3;2681:51;2647:85;2756:6;2746:16;;:21;2742:86;;2786:34;2778:42;2825:3;2777:51;2742:86;2852:6;2842:16;;:21;2838:86;;2882:34;2874:42;2921:3;2873:51;2838:86;2948:6;2938:16;;:21;2934:86;;2978:34;2970:42;3017:3;2969:51;2934:86;3044:6;3034:16;;:21;3030:86;;3074:34;3066:42;3113:3;3065:51;3030:86;3140:7;3130:17;;:22;3126:86;;3171:33;3163:41;3209:3;3162:50;3126:86;3236:7;3226:17;;:22;3222:85;;3267:32;3259:40;3304:3;3258:49;3222:85;3331:7;3321:17;;:22;3317:83;;3362:30;3354:38;3397:3;3353:47;3317:83;3424:7;3414:17;;:22;3410:78;;3455:25;3447:33;3485:3;3446:42;3410:78;3510:1;3503:4;:8;;;3499:47;;;3541:5;-1:-1:-1;;3521:25:28;;;;;;3513:33;;3499:47;3905:7;3896:5;:17;:22;:30;;3925:1;3896:30;;;3921:1;3896:30;3879:48;;3889:2;3880:5;:11;;3879:48;3856:72;;1355:2580;;;;;:::o;1391:3239:25:-;1638:24;;;;-1:-1:-1;;;;;1797:41:25;;;;;;;;1863:20;;;;;;1894:1354;;1921:30;1954:61;1978:15;2002:7;1996:3;:13;1954:61;;2011:3;1954:15;:61::i;:::-;1921:94;;2040:10;:222;;2175:87;2205:19;2226:18;2246:9;2257:4;2175:29;:87::i;:::-;2040:222;;;2069:87;2099:18;2119:19;2140:9;2151:4;2069:29;:87::i;:::-;2029:233;;2306:8;2280:22;:34;2276:336;;2335:18;2316:37;;2276:336;;;2407:205;2468:19;2509:9;2540:22;2584:10;2407:39;:205::i;:::-;2388:224;;2276:336;1894:1354;;;;2655:10;:224;;2791:88;2821:19;2842:18;2862:9;2873:5;2791:29;:88::i;:::-;2655:224;;;2684:88;2714:18;2734:19;2755:9;2766:5;2684:29;:88::i;:::-;2643:236;;2926:9;2906:15;2905:16;;2897:38;2893:344;;2956:18;2937:37;;2893:344;;;3028:209;3090:19;3131:9;3171:15;3170:16;;3209:10;3028:40;:209::i;:::-;3009:228;;2893:344;-1:-1:-1;;;;;3269:38:25;;;;;;;3358:732;;;;3399:3;:14;;;;;3406:7;3399:14;:145;;3459:85;3489:16;3507:19;3528:9;3539:4;3459:29;:85::i;:::-;3399:145;;;3432:8;3399:145;3388:156;;3570:3;:15;;;;;3578:7;3577:8;3570:15;:148;;3632:86;3662:16;3680:19;3701:9;3712:5;3632:29;:86::i;:::-;3570:148;;;3604:9;3570:148;3558:160;;3358:732;;;3760:3;:14;;;;;3767:7;3760:14;:145;;3820:85;3850:19;3871:16;3889:9;3900:4;3820:29;:85::i;:::-;3760:145;;;3793:8;3760:145;3749:156;;3931:3;:15;;;;;3939:7;3938:8;3931:15;:148;;3993:86;4023:19;4044:16;4062:9;4073:5;3993:29;:86::i;:::-;3931:148;;;3965:9;3931:148;3919:160;;3358:732;4180:7;4179:8;:49;;;;;4212:15;4211:16;;4191:9;:37;4179:49;4175:117;;;4265:15;4264:16;;4244:37;;4175:117;4306:7;:49;;;;;4337:18;-1:-1:-1;;;;;4317:38:25;:16;-1:-1:-1;;;;;4317:38:25;;;4306:49;4302:322;;;4503:8;4484:15;4476:35;4464:47;;4302:322;;;4554:59;4580:8;4590:7;4554:59;;4605:7;4599:3;:13;4554:59;;:25;:59::i;:::-;4542:71;;4302:322;1391:3239;;;;;;;;;;;;;:::o;924:121:23:-;976:8;-1:-1:-1;;;1004:1:23;:10;996:19;;;;;;-1:-1:-1;1036:1:23;924:121::o;1573:120:20:-;1662:5;;;1657:16;;;;1629:8;1678:6;;;1657:28;1649:37;;;;;;1573:120;;;;:::o;1276:::-;1365:5;;;1360:16;;;;1332:8;1381:6;;;1360:28;1352:37;;;;;742:3776:18;854:14;;;-1:-1:-1;;1361:1:18;1358;1351:20;1393:9;;;;-1:-1:-1;1444:13:18;;;1428:14;;;;1424:34;;-1:-1:-1;1540:10:18;1536:179;;1588:1;1574:11;:15;1566:24;;;;;;-1:-1:-1;1641:23:18;;;;-1:-1:-1;1691:13:18;;1536:179;1842:5;1828:11;:19;1820:28;;;;;;2125:17;2201:11;2198:1;2195;2188:25;2553:12;2568;;;:26;;2688:22;;;;;3491:1;3472;:15;;3471:21;;3718:17;;;3714:21;;3707:28;3776:17;;;3772:21;;3765:28;3835:17;;;3831:21;;3824:28;3894:17;;;3890:21;;3883:28;3953:17;;;3949:21;;3942:28;4013:17;;;4009:21;;;4002:28;3060:12;;;;3056:23;;;3081:1;3052:31;2330:20;;;2319:32;;;3111:12;;;;2373:21;;;;2816:16;;;;3102:21;;;;4477:11;;;;;-1:-1:-1;;742:3776:18;;;;;;:::o;12646:1943:21:-;12884:20;;12963:15;;;12959:257;;12994:23;13020:4;13025:5;13020:11;;;;;;;;;12994:37;;;;;;;;13020:11;;;;12994:37;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;12994:37:21;;-1:-1:-1;;;;;12994:37:21;;;;;;;;-1:-1:-1;;;12994:37:21;;;;;;;;;;;;;-1:-1:-1;13049:27:21;;;13045:78;;13085:38;13095:4;13101;13107;13113:9;13085;:38::i;:::-;13078:45;;13045:78;13145:4;:19;;;13166:4;:38;;;13137:68;;;;;;;12959:257;13242:17;;;13226:13;;13346:83;13373:4;13242;:17;13393:4;13399:5;13406:9;13417:11;13346:26;:83::i;:::-;13270:159;;;;13454:10;:25;;;13444:35;;:6;:35;;;13440:1143;;;13545:10;:25;;;13572:10;:44;;;13537:80;;;;;;;;;13440:1143;13648:24;;13638:34;;;;;;;13634:949;;;13739:9;:24;;;13765:9;:43;;;13731:78;;;;;;;;;13634:949;13932:25;;13905:24;;14142:25;;;;;14115:24;;;;13905:52;;;;;13992:34;;;14113:113;;;;;14114:77;;;;14115:52;14114:77;;;;;;;;14113:113;14065:10;:25;;;:161;14516:20;14344:192;;14501:11;14345:167;;14428:10;:44;;;14382:9;:43;;;:90;-1:-1:-1;;;;;14345:153:21;:167;14344:192;;;;;;14244:10;:44;;;:314;14040:532;;;;;;;;;12646:1943;;;;;;;;;;;:::o;8679:837:26:-;9022:10;;;;;;8966:19;9022:10;;;;;;;;;;;;9094:26;;;;;9071:49;;;9042:78;;;9182:26;;;;;9159:49;;;9130:78;;;9292:35;;;;;9448:19;-1:-1:-1;;;;;;;;9292:35:26;;;;;;9256:71;;;9218:109;;;;;;;;;;;;9383:26;;;;9366:43;;;9337:72;;;;;-1:-1:-1;;9337:72:26;;;;;;;9448:19;;;;;9441:26;;;9419:48;;;;-1:-1:-1;;;;9419:48:26;;;;;;;;;9492:17;-1:-1:-1;;;9492:17:26;;;;;8679:837::o;383:236:19:-;445:9;474:1;470;:5;;;466:147;;;523:1;-1:-1:-1;;;;;499:25:19;517:1;516:2;;504:1;:15;500:19;;;-1:-1:-1;;;;;499:25:19;;491:40;;;;;-1:-1:-1;;;491:40:19;;;;;;;;;;;;-1:-1:-1;;;491:40:19;;;;;;;;;;;;;;;466:147;;;594:1;-1:-1:-1;;;;;570:25:19;587:1;575;:14;571:18;;;-1:-1:-1;;;;;570:25:19;;;562:40;;;;;-1:-1:-1;;;562:40:19;;;;;;;;;;;;-1:-1:-1;;;562:40:19;;;;;;;;;;;;;;4354:4281:28;4427:10;817;-1:-1:-1;;;;;4556:30:28;;;;;;:63;;-1:-1:-1;997:49:28;-1:-1:-1;;;;;4590:29:28;;;4556:63;4548:77;;;;;-1:-1:-1;;;4548:77:28;;;;;;;;;;;;-1:-1:-1;;;4548:77:28;;;;;;;;;;;;;;;4651:27;4676:2;4651:27;;;;-1:-1:-1;;;;;4781:41:28;;4778:1;4774:49;4871:9;;;4944:18;4938:25;;4935:1;4931:33;5012:9;;;5085:10;5079:17;;5076:1;5072:25;5145:9;;;5218:6;5212:13;;5209:1;5205:21;5274:9;;;5347:4;5341:11;;5338:1;5334:19;;;5401:9;;;5474:3;5468:10;;5465:1;5461:18;5527:9;;;5594:10;;;5591:1;5587:18;;;5653:9;;;;5713:10;;;4984;;5117;;;5246;;;5373;5499;;;5625;5743;5784:3;5777:10;;5773:79;;5809:3;5803;:9;5793:5;:20;;5789:24;;5773:79;;;5848:3;5842;:9;5832:5;:20;;5828:24;;5773:79;5951:9;;;5946:3;5942:19;;;5983:11;;;;6055:9;;;;6120;;6111:19;;;6152:11;;;6224:9;6289;;6280:19;;;6321:11;;;6393:9;6458;;6449:19;;;6490:11;;;6562:9;6627;;6618:19;;;6659:11;;;6731:9;6796;;6787:19;;;6828:11;;;6900:9;6965;;6956:19;;;6997:11;;;7069:9;7134;;7125:19;;;7166:11;;;7238:9;7303;;7294:19;;;7335:11;;;7407:9;7472;;7463:19;;;7504:11;;;7576:9;7641;;7632:19;;;7673:11;;;7745:9;7810;;7801:19;;;7842:11;;;7914:9;7979;;7970:19;;;8011:11;;;;8083:9;;;;8148;;8139:19;;;;;5951:9;-1:-1:-1;;5879:17:28;;5901:2;5878:25;6026:10;;;;;;;6016:21;6195:10;;;;;;;6185:21;;;;6364:10;;;;;;;6354:21;;;;6533:10;;;;;;;6523:21;;;;6702:10;;;;;;;6692:21;;;;6871:10;;;;;;;6861:21;;;;7040:10;;;;;;;7030:21;7209:10;;;;;;;7199:21;7378:10;;;;;;;7368:21;7547:10;;;;;;;7537:21;7716:10;;;;;;;7706:21;7885:10;;;;;;;7875:21;8054:10;;;;;;;8044:21;8223:10;;;;;;;8213:21;8285:24;8277:32;;-1:-1:-1;;8361:53:28;;5893:3;8360:62;;;;8471:39;8455:55;;8454:64;;8537:17;;;;;;;;;:91;;8597:12;-1:-1:-1;;;;;8567:42:28;:26;8586:6;8567:18;:26::i;:::-;-1:-1:-1;;;;;8567:42:28;;;:61;;8621:7;8567:61;;;8612:6;8567:61;8537:91;;;8557:7;8537:91;8530:98;4354:4281;-1:-1:-1;;;;;;;;;4354:4281:28:o;4432:902:21:-;4672:19;4693:25;4730:23;4756:4;4761:5;4756:11;;;;;;;;;4730:37;;;;;;;;4756:11;;;;4730:37;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;4730:37:21;;-1:-1:-1;;;;;4730:37:21;;;;;;;;-1:-1:-1;;;4730:37:21;;;;;;;;;;;;;-1:-1:-1;4857:37:21;;;4853:70;;;4904:5;4911:11;4896:27;;;;;;;4853:70;5024:11;5006:29;;:15;:29;;;:59;;;;;5063:1;5049:11;:15;5039:26;;:5;:26;;;5006:59;5002:189;;;5102:15;5081:36;;5002:189;;;5169:11;5148:32;;5002:189;5230:18;5216:32;;5217:5;5225:1;5217:9;5216:32;;;;;;;;5201:47;;5279:48;5289:4;5295:14;5311:4;5317:9;5279;:48::i;:::-;5258:4;5263:12;5258:18;;;;;;;;;:69;;:18;;:69;;;;;;;;;;;;;;;;;-1:-1:-1;;;5258:69:21;;-1:-1:-1;;;;;5258:69:21;;;-1:-1:-1;;;5258:69:21;;;;;;;;;;;-1:-1:-1;;5258:69:21;;;;-1:-1:-1;;5258:69:21;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4432:902:21;;;;;;;;;;:::o;602:328:29:-;774:66;;;-1:-1:-1;;;;;774:66:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;774:66:29;-1:-1:-1;;;774:66:29;;;763:78;;;;716:12;;;;763:10;;;;774:66;763:78;;;774:66;763:78;;774:66;763:78;;;;;;;;;;-1:-1:-1;;763:78:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;715:126;;;;859:7;:57;;;;-1:-1:-1;871:11:29;;:16;;:44;;;902:4;891:24;;;;;;;;;;;;;;;-1:-1:-1;891:24:29;871:44;851:72;;;;;-1:-1:-1;;;851:72:29;;;;;;;;;;;;-1:-1:-1;;;851:72:29;;;;;;;;;;;;;;;602:328;;;;;:::o;5339:297:1:-;5466:71;;;5531:4;5466:71;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;5466:71:1;-1:-1:-1;;;5466:71:1;;;5448:90;;;;5381:7;;;;;;-1:-1:-1;;;;;5448:6:1;:17;;5466:71;;5448:90;;;;5466:71;5448:90;;5466:71;5448:90;;;;;;;;;;-1:-1:-1;;5448:90:1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5400:138;;;;5556:7;:28;;;;;5582:2;5567:4;:11;:17;;5556:28;5548:37;;;;;;5613:4;5602:27;;;;;;;;;;;;;;;-1:-1:-1;5602:27:1;;-1:-1:-1;;;5339:297:1;:::o;435:111:20:-;527:5;;;522:16;;;;514:25;;;;;5819:297:1;5946:71;;;6011:4;5946:71;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;5946:71:1;-1:-1:-1;;;5946:71:1;;;5928:90;;;;5861:7;;;;;;-1:-1:-1;;;;;5928:6:1;:17;;5946:71;;5928:90;;;;5946:71;5928:90;;5946:71;5928:90;;;;;;;;;-1:-1:-1;;5928:90:1;;;;;;;;;;;;5713:549:21;5837:6;5873:1;5863:7;:11;;;5855:25;;;;;-1:-1:-1;;;5855:25:21;;;;;;;;;;;;-1:-1:-1;;;5855:25:21;;;;;;;;;;;;;;;5986:7;5978:15;;:4;:15;;;5974:35;;-1:-1:-1;6002:7:21;5995:14;;5974:35;6184:7;6168:66;6197:4;6193:8;;:1;:8;;;6168:66;;;6233:1;6208:4;6213:1;6208:7;;;;;;;;;;:26;;-1:-1:-1;;6208:26:21;;;;;;;;;;;;-1:-1:-1;6203:3:21;6168:66;;;-1:-1:-1;6251:4:21;;5713:549;-1:-1:-1;;;5713:549:21:o;652:107:23:-;750:1;731:20;;;;;;723:29;;;;;11757:2813:1;11887:30;11931:14;11959;1036:22:0;:20;:22::i;:::-;11998:46:1::1;12009:6;:16;;;12027:6;:16;;;11998:10;:46::i;:::-;12055:27;::::0;;::::1;::::0;::::1;::::0;;:19:::1;:27:::0;-1:-1:-1;;;;;12055:27:1;::::1;::::0;;-1:-1:-1;;;12055:27:1;::::1;;::::0;;::::1;::::0;::::1;::::0;::::1;;::::0;;::::1;::::0;;;::::1;-1:-1:-1::0;;;12055:27:1;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;12055:27:1;::::1;::::0;::::1;::::0;;;;;;;;-1:-1:-1;;;12055:27:1;::::1;::::0;;::::1;::::0;;;;::::1;-1:-1:-1::0;;;12055:27:1;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;12055:27:1;;::::1;::::0;;::::1;;;::::0;;;;12163:12;;12189:16;;::::1;::::0;12219;;::::1;::::0;12249:21;;::::1;::::0;12055:27;;12134:171:::1;::::0;12163:12;;12189:16;;12219;;12249:21;12134:15:::1;:171::i;:::-;12123:182;;12320:6;:21;;;:26;;12345:1;12320:26;12316:2248;;12380:6;:16;;;12366:30;;:6;:11;;;:30;;;12362:2192;;;12655:224;12706:45;12734:6;:16;;;12706:27;:45::i;:::-;12773;12801:6;:16;;;12773:27;:45::i;:::-;12840:6;:21;;;12655:29;:224::i;:::-;12645:234;;12362:2192;;;12918:6;:16;;;12904:30;;:6;:11;;;:30;;;12900:1654;;;13039:9;::::0;13235:23:::1;::::0;::::1;::::0;-1:-1:-1;;;;;13039:9:1;;::::1;::::0;13195:296:::1;::::0;13280:17:::1;:15;:17::i;:::-;13319:11;::::0;::::1;::::0;13389:29:::1;::::0;::::1;::::0;13440:33:::1;::::0;::::1;::::0;13195:12:::1;::::0;:296;;13319:11;13352:15;;13195:18:::1;:296::i;:::-;13139:5;13138:353:::0;;-1:-1:-1;;;;13138:353:1::1;-1:-1:-1::0;;;13138:353:1::1;::::0;;::::1;;;-1:-1:-1::0;;;;13138:353:1::1;-1:-1:-1::0;;;13138:353:1;;;::::1;::::0;;;::::1;;::::0;;13571:19;;13640:16:::1;::::0;::::1;::::0;13520:198:::1;::::0;13571:19;13612:45:::1;::::0;:27:::1;:45::i;:::-;13679:6;:21;;;13520:29;:198::i;:::-;13510:208;;13746:198;13797:45;13825:6;:16;;;13797:27;:45::i;:::-;13864:19:::0;;13905:21:::1;::::0;::::1;::::0;13746:29:::1;:198::i;:::-;13736:208;;13975:62;13998:15;14015:6;:21;;;13975:22;:62::i;:::-;13963:9;:74:::0;;-1:-1:-1;;;;;;13963:74:1::1;-1:-1:-1::0;;;;;13963:74:1;;;::::1;::::0;;;::::1;::::0;;-1:-1:-1;12900:1654:1::1;;;14315:224;14366:45;14394:6;:16;;;14366:27;:45::i;:::-;14433;14461:6;:16;;;14433:27;:45::i;:::-;14500:6;:21;;;14315:29;:224::i;:::-;14305:234;;12900:1654;1068:1:0;11757:2813:1::0;;;;;:::o;4800:315:18:-;4922:14;4957:25;4964:1;4967;4970:11;4957:6;:25::i;:::-;4948:34;;5024:1;5009:11;4996:25;;;;;5006:1;5003;4996:25;:29;4992:117;;;-1:-1:-1;;5049:6:18;:26;5041:35;;;;;;5090:8;;4800:315;;;;;:::o;1246:284:22:-;1476:45;;;;;;;;-1:-1:-1;;1476:45:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1466:56;;;;;;;;;-1:-1:-1;1461:62:22;;;;;;;;;1246:284::o;15543:862:21:-;15785:30;15817:51;15902:1;15888:11;:15;;;15880:29;;;;;-1:-1:-1;;;15880:29:21;;;;;;;;;;;;-1:-1:-1;;;15880:29:21;;;;;;;;;;;;;;;15950:11;:18;15938:31;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;15938:31:21;;15920:49;;16030:11;:18;16016:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;16016:33:21;;15979:70;;16064:9;16059:340;16083:11;:18;16079:1;:22;16059:340;;;16184:204;16215:4;16237;16259:11;16271:1;16259:14;;;;;;;;;;;;;;16291:4;16313:5;16336:9;16363:11;16184:13;:204::i;:::-;16123:15;16139:1;16123:18;;;;;;;;;;;;;16143:34;16178:1;16143:37;;;;;;;;;;;;;16122:266;-1:-1:-1;;;;;16122:266:21;-1:-1:-1;;;;;16122:266:21;;;;;;;;;;;;;;16103:3;;;;;;;16059:340;;;;15543:862;;;;;;;;;;:::o;4664:233:1:-;4761:9;4749:21;;:9;:21;;;4741:37;;;;;-1:-1:-1;;;4741:37:1;;;;;;;;;;;;-1:-1:-1;;;4741:37:1;;;;;;;;;;;;;;;-1:-1:-1;;4796:30:1;;;;;;4788:46;;;;;-1:-1:-1;;;4788:46:1;;;;;;;;;;;;-1:-1:-1;;;4788:46:1;;;;;;;;;;;;;;;637:9:28;4852:30:1;;;;;;4844:46;;;;;-1:-1:-1;;;4844:46:1;;;;;;;;;;;;-1:-1:-1;;;4844:46:1;;;;;;;;;;;;;;;4664:233;;:::o;2888:367:21:-;3056:169;;;;;;;;;;;;;;;-1:-1:-1;3056:169:21;;;;;;;;;;;;;3210:4;3056:169;;;;;;;3046:179;;-1:-1:-1;;3046:179:21;;;;;;;-1:-1:-1;;;3046:179:21;;;;3210:4;;;2888:367::o;686:160:27:-;793:9;;801:1;793:9;;;;835:3;828:10;;;;686:160::o;671:731:15:-;733:7;764:1;760;:5;752:14;;;;;;-1:-1:-1;;;781:1:15;:40;777:102;;843:3;837:9;;;;860:8;777:102;897:19;892:1;:24;888:84;;938:2;932:8;;;;954:7;888:84;990:11;985:1;:16;981:76;;1023:2;1017:8;;;;1039:7;981:76;1075:7;1070:1;:12;1066:72;;1104:2;1098:8;;;;1120:7;1066:72;1156:5;1151:1;:10;1147:68;;1183:1;1177:7;;;;1198:6;1147:68;1233:4;1228:1;:9;1224:67;;1259:1;1253:7;;;;1274:6;1224:67;1309:3;1304:1;:8;1300:66;;1334:1;1328:7;;;;1349:6;1300:66;1384:3;1379:1;:8;1375:20;;1394:1;1389:6;671:731;;;:::o;1893:894::-;1956:7;1987:1;1983;:5;1975:14;;;;;;-1:-1:-1;2004:3:15;-1:-1:-1;;;;;2021:21:15;;:25;2017:104;;-1:-1:-1;;2062:8:15;2017:104;;;2107:3;2101:9;;;;;2017:104;2138:16;2134:20;;:24;2130:101;;-1:-1:-1;;2174:7:15;2130:101;;;2218:2;2212:8;;;;;2130:101;2248:16;2244:20;;:24;2240:101;;-1:-1:-1;;2284:7:15;2240:101;;;2328:2;2322:8;;;;;2240:101;2358:16;2354:20;;:24;2350:101;;-1:-1:-1;;2394:7:15;2350:101;;;2438:2;2432:8;;;;;2350:101;2468:15;2464:19;;:23;2460:98;;-1:-1:-1;;2503:6:15;2460:98;;;2546:1;2540:7;;;;;2460:98;2575:3;2571:7;;:11;2567:86;;-1:-1:-1;;2598:6:15;2567:86;;;2641:1;2635:7;;;;;2567:86;2670:3;2666:7;;:11;2662:86;;-1:-1:-1;;2693:6:15;2662:86;;;2736:1;2730:7;;;;;2662:86;2765:3;2761:7;;:11;2757:23;;-1:-1:-1;;2774:6:15;1893:894;;;:::o;8727:532:24:-;8892:15;8939:13;-1:-1:-1;;;;;8923:29:24;:13;-1:-1:-1;;;;;8923:29:24;;8919:98;;;8988:13;;9003;8919:98;9047:7;:205;;9177:75;9193:9;-1:-1:-1;;;;;9177:75:24;9220:13;9204;:29;-1:-1:-1;;;;;9177:75:24;-1:-1:-1;;;9177:15:24;:75::i;:::-;9047:205;;;9073:85;9099:9;-1:-1:-1;;;;;9073:85:24;9126:13;9110;:29;-1:-1:-1;;;;;9073:85:24;-1:-1:-1;;;9073:25:24;:85::i;:::-;9028:224;;8727:532;;;;;;;:::o;7493:779::-;7658:15;7705:13;-1:-1:-1;;;;;7689:29:24;:13;-1:-1:-1;;;;;7689:29:24;;7685:98;;;7754:13;;7769;7685:98;7815:45;309:2:17;7815:45:24;;;;-1:-1:-1;;;;;7891:29:24;;;7870:50;;;7939:17;;7931:26;;;;;;7987:7;:278;;8252:13;-1:-1:-1;;;;;8195:70:24;:54;8211:10;8223;8235:13;-1:-1:-1;;;;;8195:54:24;:15;:54::i;:::-;:70;;;;;;7987:278;;;8013:163;8059:64;8085:10;8097;8109:13;-1:-1:-1;;;;;8059:64:24;:25;:64::i;:::-;8145:13;-1:-1:-1;;;;;8013:163:24;:24;:163::i;:::-;7968:297;7493:779;-1:-1:-1;;;;;;;7493:779:24:o;5299:550::-;5467:16;5514:1;5503:8;-1:-1:-1;;;;;5503:12:24;;5495:21;;;;;;5546:1;5534:9;-1:-1:-1;;;;;5534:13:24;;5526:22;;;;;;5644:10;:198;;5766:76;5806:8;5816:9;5827:8;5837:4;5766:39;:76::i;5644:198::-;5673:74;5711:8;5721:9;5732:8;5742:4;5673:37;:74::i;6395:550::-;6565:16;6612:1;6601:8;-1:-1:-1;;;;;6601:12:24;;6593:21;;;;;;6644:1;6632:9;-1:-1:-1;;;;;6632:13:24;;6624:22;;;;;;6736:10;:202;;6862:76;6900:8;6910:9;6921;6932:5;6862:37;:76::i;6736:202::-;6765:78;6805:8;6815:9;6826;6837:5;6765:39;:78::i;1804:633:21:-;1962:18;;:::i;:::-;1992:12;2024:4;:19;;;2007:14;:36;1992:51;;2072:358;;;;;;;;2118:14;2072:358;;;;;;2202:5;2188:19;;2194:4;2188:11;;:19;2166:4;:19;;;:41;2072:358;;;;;;2361:1;2349:9;-1:-1:-1;;;;;2349:13:21;;:29;;2377:1;2349:29;;;2365:9;2349:29;-1:-1:-1;;;;;2322:57:21;2323:21;2341:3;2323:21;;;;2322:57;;;;;;2260:4;:38;;;:120;-1:-1:-1;;;;;2072:358:21;;;;;2411:4;2072:358;;;;;2053:377;;;1804:633;;;;;;:::o;10110:1425::-;10356:29;;:::i;:::-;10387:28;;:::i;:::-;10503:4;10508:5;10503:11;;;;;;;;;10490:24;;;;;;;;10503:11;;;;10490:24;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;10490:24:21;;-1:-1:-1;;;;;10490:24:21;;;;;;;;-1:-1:-1;;;10490:24:21;;;;;;;;;;;-1:-1:-1;10629:44:21;;10633:4;;10666:6;10629:3;:44::i;:::-;10625:443;;;10722:6;10693:35;;:10;:25;;;:35;;;10689:369;;;10856:30;;10689:369;10984:10;10996:46;11006:10;11018:6;11026:4;11032:9;10996;:46::i;:::-;10976:67;;;;;;10689:369;11144:4;11163:11;11149:25;;11150:5;11158:1;11150:9;11149:25;;;;;;;;11144:31;;;;;;;;;11131:44;;;;;;;;11144:31;;;;11131:44;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;;;11131:44:21;;;;;;;;;;;-1:-1:-1;;;11131:44:21;;;;;;;;;;;;;;-1:-1:-1;11185:49:21;;11214:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;11214:20:21;;-1:-1:-1;;;;;11214:20:21;;;;;;;;-1:-1:-1;;;11214:20:21;;;;;;;;;;;;-1:-1:-1;11185:49:21;11341:44;11345:4;11351:10;:25;;;11378:6;11341:3;:44::i;:::-;11333:60;;;;;-1:-1:-1;;;11333:60:21;;;;;;;;;;;;-1:-1:-1;;;11333:60:21;;;;;;;;;;;;;;;11476:52;11489:4;11495;11501:6;11509:5;11516:11;11476:12;:52::i;:::-;11469:59;;;;10110:1425;;;;;;;;;;:::o;14894:2517:1:-;15066:30;15119:42;:9;15133:5;15140:9;15151;15119:13;:42::i;:::-;15204:20;;15296;;15108:53;;-1:-1:-1;15204:20:1;15172:29;;15464:19;;;;;15460:1402;;15499:11;15513:17;:15;:17::i;:::-;15545:20;15725:10;;15801:9;;15499:31;;-1:-1:-1;15545:20:1;;;;15628:250;;:12;;15499:31;;15545:20;;-1:-1:-1;;;15725:10:1;;;;;15757:22;-1:-1:-1;;;15757:22:1;;;;;-1:-1:-1;;;;;15801:9:1;;;;-1:-1:-1;;;15832:28:1;;;15628:26;:250::i;:::-;15544:334;;-1:-1:-1;15544:334:1;-1:-1:-1;15908:350:1;:5;15938:9;15965:4;15987:14;16019:21;16058;15544:334;;16180:4;16202:5;16225:19;15908:12;:350::i;:::-;15893:365;-1:-1:-1;16287:349:1;:5;16317:9;16344:4;16366:14;16398:21;16437;16476:33;16527:14;16559:4;16581;16603:19;16287:12;:349::i;:::-;16272:364;;16655:12;16651:94;;;16687:43;:10;16707:9;16718:11;16687:19;:43::i;:::-;16762:12;16758:94;;;16794:43;:10;16814:9;16825:11;16794:19;:43::i;:::-;15460:1402;;;;16873:28;;16947:98;:5;16972:9;16983;16994:4;17000:21;17023;16947:24;:98::i;:::-;16872:173;;-1:-1:-1;16872:173:1;-1:-1:-1;17056:75:1;:8;17072:14;16872:173;;17056:15;:75::i;:::-;17219:1;17202:14;:18;;;17198:207;;;17240:12;17236:73;;;17272:22;:5;17284:9;17272:11;:22::i;:::-;17326:12;17322:73;;;17358:22;:5;17370:9;17358:11;:22::i;:::-;14894:2517;;;;;;;;;;;;;:::o;9603:412:24:-;9745:14;9802:1;9790:9;:13;;;:218;;9926:82;:71;9942:13;9957;9980:9;9992:4;9926:15;:71::i;:::-;:80;:82::i;:::-;9790:218;;;9823:84;:73;9839:13;9854;9878:9;9877:10;;9890:5;9823:15;:73::i;:84::-;9822:85;;9771:237;9603:412;-1:-1:-1;;;;9603:412:24:o;10359:::-;10501:14;10558:1;10546:9;:13;;;:218;;10682:82;:71;10698:13;10713;10736:9;10748:4;10682:15;:71::i;10546:218::-;10579:84;:73;10595:13;10610;10634:9;10633:10;;10646:5;10579:15;:73::i;492:165:30:-;613:9;;;627;;624:16;;609:32;;590:61::o;3597:1153:24:-;3770:7;3947:3;3943:801;;;3966:16;-1:-1:-1;;;;;4023:27:24;;;:180;;4151:52;4167:6;-1:-1:-1;;;4193:9:24;-1:-1:-1;;;;;4151:52:24;:15;:52::i;:::-;4023:180;;;-1:-1:-1;;;;;4077:47:24;;309:2:17;4078:33:24;;;4077:47;;;;;;4023:180;3966:255;-1:-1:-1;4243:43:24;:31;-1:-1:-1;;;;;4243:17:24;;3966:255;4243:21;:31::i;:::-;:41;:43::i;:::-;4236:50;;;;;3943:801;4317:16;-1:-1:-1;;;;;4374:27:24;;;:213;;4525:62;4551:6;-1:-1:-1;;;4577:9:24;-1:-1:-1;;;;;4525:62:24;:25;:62::i;:::-;4374:213;;;4428:70;309:2:17;4453:33:24;;;-1:-1:-1;;;;;4428:70:24;;:24;:70::i;:::-;4317:288;;4639:8;4628;-1:-1:-1;;;;;4628:19:24;;4620:28;;;;;;-1:-1:-1;;;;;4713:19:24;;;;-1:-1:-1;4698:35:24;;1405:1366;1576:7;1711:11;1707:32;;-1:-1:-1;1731:8:24;1724:15;;1707:32;1770:45;309:2:17;1770:45:24;;;;1826:939;;;;-1:-1:-1;;;;;1882:50:24;;1893:17;;;;1914:6;1893:17;1914:6;1882:38;;;;;:50;1878:323;;;1974:20;;;2016:25;;;2012:174;;2125:60;2151:10;2163:8;-1:-1:-1;;;;;2125:60:24;2173:11;2125:25;:60::i;:::-;2110:76;;;;;;;2012:174;1878:323;;2230:73;2255:10;2267:35;2295:6;2281:8;-1:-1:-1;;;;;2268:21:24;:10;:21;;;;;;;2267:27;:35::i;:::-;2230:24;:73::i;:::-;2215:89;;;;;;1826:939;-1:-1:-1;;;;;2530:50:24;;2541:17;;;;2562:6;2541:17;2562:6;2530:38;;;;;:50;:74;;;;;2597:7;2584:10;:20;2530:74;2522:83;;;;;;2641:20;;;2682:72;:60;2641:10;-1:-1:-1;;;;;2682:60:24;;2641:20;2682:25;:60::i;6696:371:21:-;6794:4;6879;6874:9;;:1;:9;;;;:22;;;;;6892:4;6887:9;;:1;:9;;;;6874:22;6870:41;;;6910:1;6905:6;;:1;:6;;;;6898:13;;;;6870:41;6922:17;6946:4;6942:8;;:1;:8;;;:24;;6957:1;:9;;6961:5;6957:9;6942:24;;;6953:1;6942:24;;;6922:44;;;;6976:17;7000:4;6996:8;;:1;:8;;;:24;;7011:1;:9;;7015:5;7011:9;6996:24;;;7007:1;6996:24;;;6976:44;;7038:22;;;;;6696:371;-1:-1:-1;;;;;6696:371:21:o;8022:1064::-;8207:29;;:::i;:::-;8238:28;;:::i;:::-;8278:9;8304:11;8290:25;;8291:5;8299:1;8291:9;8290:25;;;;;;;;8278:37;;;;8347:9;8377:1;8363:11;8359:15;;:1;:15;:19;8347:31;;8410:9;8429:651;-1:-1:-1;8470:1:21;8461:5;;;8460:11;8499:4;8504:15;;;8460:11;8504:15;;;;;;8499:21;;;;;;;8486:34;;;;;;;;8499:21;;;;8486:34;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;;;8486:34:21;;;;;;;;;;;-1:-1:-1;;;8486:34:21;;;;;;;;;;;;;;-1:-1:-1;8627:97:21;;8678:1;8682;8678:5;8674:9;;8701:8;;8627:97;8750:4;8765:11;8755:21;;8756:1;8760;8756:5;8755:21;;;;;;8750:27;;;;;;;8738:39;;;;;;;;8750:27;;;;8738:39;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;;;8738:39:21;;;;;;;;;;;-1:-1:-1;;;8738:39:21;;;;;;;;;;8825:25;;8738:39;;-1:-1:-1;;;8815:44:21;;8819:4;;8852:6;8815:3;:44::i;:::-;8792:67;;8926:15;:62;;;;;8945:43;8949:4;8955:6;8963:9;:24;;;8945:3;:43::i;:::-;8922:73;;;8990:5;;;8922:73;9015:15;9010:59;;9040:1;9036;:5;9032:9;;9010:59;;;9064:1;9068;9064:5;9060:9;;9010:59;8429:651;;;;8022:1064;;;;;;;;;;;:::o;6010:1689:26:-;6455:10;;;;;;6406:12;6455:10;;;;;;;;;;6507:19;;-1:-1:-1;;;;;6507:19:26;6406:12;6566:60;6507:19;6611:14;6566:22;:60::i;:::-;6536:90;;6668:12;-1:-1:-1;;;;;6645:35:26;:19;-1:-1:-1;;;;;6645:35:26;;;6637:50;;;;;-1:-1:-1;;;6637:50:26;;;;;;;;;;;;-1:-1:-1;;;6637:50:26;;;;;;;;;;;;;;;-1:-1:-1;;;;;6739:25:26;;;;6709:24;;;;6708:57;;;;-1:-1:-1;6708:57:26;6776:572;;6945:11;6937:19;;:4;:19;;;6933:368;;6976:26;;;:49;;;7043:26;;;:49;;;7110:35;;;:71;;;;;-1:-1:-1;;;;;7110:71:26;;;;-1:-1:-1;;7199:43:26;;;;;;;;-1:-1:-1;;;;7260:26:26;-1:-1:-1;;;7260:26:26;;;;;;;6933:368;7314:16;;;:23;;;;-1:-1:-1;;;7314:23:26;;;6776:572;7358:41;;-1:-1:-1;;;;;;7358:41:26;-1:-1:-1;;;;;7358:41:26;;;;;7545:5;:147;;7643:17;;7636:56;;:45;;-1:-1:-1;;;7643:17:26;;7636:45;7643:17;;;7636:25;;;:45;;;:29;:45::i;:::-;:54;:56::i;:::-;7545:147;;;7572:17;;7565:56;;:45;;-1:-1:-1;;;7572:17:26;;7565:45;7572:17;;;7565:25;;;:45;;;:29;:45::i;:56::-;7525:167;;;;;;;-1:-1:-1;;;;;7525:167:26;;;-1:-1:-1;;;7525:167:26;;;;;;;-1:-1:-1;6010:1689:26;;;-1:-1:-1;;;;;;;;;;;;6010:1689:26:o;1102:348:27:-;1255:11;1248:18;;:4;:18;;;;;;;;:23;;;1240:32;;;;;;1317:13;1332:12;1348:28;1364:11;1357:18;;:4;:18;;;;;;;;1348:8;:28::i;:::-;1401:1;1422:13;;;;;1386:12;1422:13;;;;;;;;;;;;:21;;1401:11;;;;;;;;1422:21;;;;;;-1:-1:-1;;;;1102:348:27:o;3335:1569:26:-;3686:15;;;;;;;3595:28;3686:15;;;;;;;;;;;3732;;;;;;;;;;3595:28;;;;3686:15;;3732;3595:28;;;;3874:24;;;;;3870:356;;-1:-1:-1;;3936:27:26;;;;3999;;;;3870:356;;;4102:5;:27;;;4079:20;:50;4057:72;;4188:5;:27;;;4165:20;:50;4143:72;;3870:356;4274:27;4311;4366:9;4352:23;;:11;:23;;;4348:355;;;-1:-1:-1;;4413:27:26;;;;4476;;;;4348:355;;;4579:5;:27;;;4556:20;:50;4534:72;;4665:5;:27;;;4642:20;:50;4620:72;;4348:355;4736:42;;;;:64;;;;;4833:42;;;;:64;;;;;-1:-1:-1;3335:1569:26;;-1:-1:-1;;;;;;;3335:1569:26:o;2010:1562:22:-;2185:24;;;;;;;;;;-1:-1:-1;;;;;2185:24:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;2185:24:22;;;;;;;;;:17;2255:19;;;;2251:275;;2298:15;;-1:-1:-1;;;;;2298:19:22;2290:34;;;;;-1:-1:-1;;;2290:34:22;;;;;;;;;;;;-1:-1:-1;;;2290:34:22;;;;;;;;;;;;;;;-1:-1:-1;2398:15:22;;2251:275;;;2483:15;;2460:55;;2500:14;2460:22;:55::i;:::-;2444:71;;2251:275;2574:19;2633:185;2693:5;:30;;;2670:20;:53;2745:5;:15;;;-1:-1:-1;;;;;2633:185:22;-1:-1:-1;;;2633:15:22;:185::i;:::-;2574:258;;2842:19;2901:185;2961:5;:30;;;2938:20;:53;3013:5;:15;;;-1:-1:-1;;;;;2901:185:22;-1:-1:-1;;;2901:15:22;:185::i;:::-;2842:258;;3146:14;:19;;3164:1;3146:19;3142:55;;3167:30;;-1:-1:-1;;;;;;3167:30:22;-1:-1:-1;;;;;3167:30:22;;;;;3142:55;3207:29;;;:52;;;3269:29;;;:52;;;-1:-1:-1;;;;;3335:15:22;;;;;:34;;;3368:1;3354:11;-1:-1:-1;;;;;3354:15:22;;3335:34;3331:235;;;3479:16;;;:31;;-1:-1:-1;;;;;;3479:31:22;;-1:-1:-1;;;;;3479:31:22;;;;;;;;3524;;;-1:-1:-1;;;3524:31:22;;;;;;;;;;;;;;;3331:235;2010:1562;;;;;;;;:::o;7886:112:26:-;7981:10;;;;;;;;;;;;;;;;;;7974:17;;;;;;;;;;;;;;;;;;7886:112::o;357:111:23:-;459:1;-1:-1:-1;;;;;439:21:23;;;;431:30;;;;;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o

Swarm Source

none://none

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

OVERVIEW

Uniswap V3 pool to exchange between weETH and pufETH.

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.