{"matchId":"31834603","creationMatch":"exact_match","runtimeMatch":"exact_match","verifiedAt":"2026-06-09T21:56:55Z","creationBytecode":{"onchainBytecode":"0x6080604052348015600e575f5ffd5b50610fa78061001c5f395ff3fe608060405234801561000f575f5ffd5b506004361061006f575f3560e01c8063d6d8a43e1161004d578063d6d8a43e146100be578063f0a05395146100d1578063f9c51f27146100e4575f5ffd5b806314c8ad2c146100735780631ff517ff14610098578063d394dd9c146100ab575b5f5ffd5b610086610081366004610cc9565b6100f7565b60405190815260200160405180910390f35b6100866100a6366004610d00565b610299565b6100866100b9366004610cc9565b610444565b6100866100cc366004610d00565b610742565b6100866100df366004610cc9565b6108b6565b6100866100f2366004610cc9565b610946565b6040517f9198e84000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82811660048301525f9161029091851690639198e84090602401602060405180830381865afa158015610167573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061018b9190610d1b565b8473ffffffffffffffffffffffffffffffffffffffff1663a043d6d76040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101d4573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906101f89190610d32565b6040517f7d7d33d000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff87811660048301529190911690637d7d33d0906024015b602060405180830381865afa158015610265573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906102899190610d1b565b6001610b25565b90505b92915050565b5f6103cd8273ffffffffffffffffffffffffffffffffffffffff16631b859e416040518163ffffffff1660e01b8152600401602060405180830381865afa1580156102e6573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061030a9190610d1b565b8373ffffffffffffffffffffffffffffffffffffffff1663a043d6d76040518163ffffffff1660e01b8152600401602060405180830381865afa158015610353573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103779190610d32565b6040517f7d7d33d000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff86811660048301529190911690637d7d33d09060240161024a565b8273ffffffffffffffffffffffffffffffffffffffff1663bbcac5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015610416573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061043a9190610d1b565b6102939190610d7a565b5f5f61045084846100f7565b90508015610719575f8490505f8173ffffffffffffffffffffffffffffffffffffffff16633d07b1766040518163ffffffff1660e01b8152600401602060405180830381865afa1580156104a6573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104ca9190610d32565b6040517fff2ba6150000000000000000000000000000000000000000000000000000000081526001600482015273ffffffffffffffffffffffffffffffffffffffff919091169063ff2ba61590602401602060405180830381865afa158015610535573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105599190610d1b565b905061056883620186a0610d8d565b8273ffffffffffffffffffffffffffffffffffffffff16634031234c6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156105b1573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105d59190610d1b565b828473ffffffffffffffffffffffffffffffffffffffff16639bd6012f6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561061f573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106439190610d1b565b61064e906012610da4565b61065990600a610ed8565b6040517f29bc969d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8a811660048301528716906329bc969d90602401602060405180830381865afa1580156106c3573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106e79190610d1b565b6106f19190610d8d565b6106fb9190610d8d565b6107059190610d8d565b61070f9190610f10565b9350505050610293565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9392505050565b5f6102938273ffffffffffffffffffffffffffffffffffffffff16631b859e416040518163ffffffff1660e01b8152600401602060405180830381865afa15801561078f573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107b39190610d1b565b8373ffffffffffffffffffffffffffffffffffffffff1663a043d6d76040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107fc573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108209190610d32565b6040517fbbe462ce00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8681166004830152919091169063bbe462ce90602401602060405180830381865afa15801561088c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108b09190610d1b565b5f610b25565b5f620186a06108c58484610946565b8473ffffffffffffffffffffffffffffffffffffffff1663f384bd056040518163ffffffff1660e01b8152600401602060405180830381865afa15801561090e573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109329190610d1b565b61093c9190610d8d565b6102909190610f10565b5f8273ffffffffffffffffffffffffffffffffffffffff16639bd6012f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610990573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109b49190610d1b565b6109bf90600a610ed8565b8373ffffffffffffffffffffffffffffffffffffffff16633d07b1766040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a08573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a2c9190610d32565b6040517fff2ba6150000000000000000000000000000000000000000000000000000000081526001600482015273ffffffffffffffffffffffffffffffffffffffff919091169063ff2ba61590602401602060405180830381865afa158015610a97573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610abb9190610d1b565b6040517f29bc969d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85811660048301528616906329bc969d90602401602060405180830381865afa15801561090e573d5f5f3e3d5ffd5b5f610b3e84846b033b2e3c9fd0803ce800000085610b48565b90505b9392505050565b5f610b75610b5583610b93565b8015610b7057505f8480610b6b57610b6b610ee3565b868809115b151590565b610b80868686610bbf565b610b8a9190610d7a565b95945050505050565b5f6002826003811115610ba857610ba8610f23565b610bb29190610f50565b60ff166001149050919050565b5f838302817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff85870982811083820303915050805f03610c1257838281610c0857610c08610ee3565b0492505050610b41565b808411610c2957610c296003851502601118610c94565b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010186841190950394909402919094039290920491909117919091029150509392505050565b634e487b715f52806020526024601cfd5b73ffffffffffffffffffffffffffffffffffffffff81168114610cc6575f5ffd5b50565b5f5f60408385031215610cda575f5ffd5b8235610ce581610ca5565b91506020830135610cf581610ca5565b809150509250929050565b5f60208284031215610d10575f5ffd5b8135610b4181610ca5565b5f60208284031215610d2b575f5ffd5b5051919050565b5f60208284031215610d42575f5ffd5b8151610b4181610ca5565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b8082018082111561029357610293610d4d565b808202811582820484141761029357610293610d4d565b8181038181111561029357610293610d4d565b6001815b6001841115610df257808504811115610dd657610dd6610d4d565b6001841615610de457908102905b60019390931c928002610dbb565b935093915050565b5f82610e0857506001610293565b81610e1457505f610293565b8160018114610e2a5760028114610e3457610e50565b6001915050610293565b60ff841115610e4557610e45610d4d565b50506001821b610293565b5060208310610133831016604e8410600b8410161715610e73575081810a610293565b610e9e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8484610db7565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115610ed057610ed0610d4d565b029392505050565b5f6102908383610dfa565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f82610f1e57610f1e610ee3565b500490565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b5f60ff831680610f6257610f62610ee3565b8060ff8416069150509291505056fea264697066735822122085fc80a38af2b9bf0724bc3e37e3a26641e06268e6771891df1c827a6d2ba2d164736f6c634300081c0033","recompiledBytecode":"0x6080604052348015600e575f5ffd5b50610fa78061001c5f395ff3fe608060405234801561000f575f5ffd5b506004361061006f575f3560e01c8063d6d8a43e1161004d578063d6d8a43e146100be578063f0a05395146100d1578063f9c51f27146100e4575f5ffd5b806314c8ad2c146100735780631ff517ff14610098578063d394dd9c146100ab575b5f5ffd5b610086610081366004610cc9565b6100f7565b60405190815260200160405180910390f35b6100866100a6366004610d00565b610299565b6100866100b9366004610cc9565b610444565b6100866100cc366004610d00565b610742565b6100866100df366004610cc9565b6108b6565b6100866100f2366004610cc9565b610946565b6040517f9198e84000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82811660048301525f9161029091851690639198e84090602401602060405180830381865afa158015610167573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061018b9190610d1b565b8473ffffffffffffffffffffffffffffffffffffffff1663a043d6d76040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101d4573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906101f89190610d32565b6040517f7d7d33d000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff87811660048301529190911690637d7d33d0906024015b602060405180830381865afa158015610265573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906102899190610d1b565b6001610b25565b90505b92915050565b5f6103cd8273ffffffffffffffffffffffffffffffffffffffff16631b859e416040518163ffffffff1660e01b8152600401602060405180830381865afa1580156102e6573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061030a9190610d1b565b8373ffffffffffffffffffffffffffffffffffffffff1663a043d6d76040518163ffffffff1660e01b8152600401602060405180830381865afa158015610353573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103779190610d32565b6040517f7d7d33d000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff86811660048301529190911690637d7d33d09060240161024a565b8273ffffffffffffffffffffffffffffffffffffffff1663bbcac5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015610416573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061043a9190610d1b565b6102939190610d7a565b5f5f61045084846100f7565b90508015610719575f8490505f8173ffffffffffffffffffffffffffffffffffffffff16633d07b1766040518163ffffffff1660e01b8152600401602060405180830381865afa1580156104a6573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104ca9190610d32565b6040517fff2ba6150000000000000000000000000000000000000000000000000000000081526001600482015273ffffffffffffffffffffffffffffffffffffffff919091169063ff2ba61590602401602060405180830381865afa158015610535573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105599190610d1b565b905061056883620186a0610d8d565b8273ffffffffffffffffffffffffffffffffffffffff16634031234c6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156105b1573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105d59190610d1b565b828473ffffffffffffffffffffffffffffffffffffffff16639bd6012f6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561061f573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106439190610d1b565b61064e906012610da4565b61065990600a610ed8565b6040517f29bc969d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8a811660048301528716906329bc969d90602401602060405180830381865afa1580156106c3573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106e79190610d1b565b6106f19190610d8d565b6106fb9190610d8d565b6107059190610d8d565b61070f9190610f10565b9350505050610293565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9392505050565b5f6102938273ffffffffffffffffffffffffffffffffffffffff16631b859e416040518163ffffffff1660e01b8152600401602060405180830381865afa15801561078f573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107b39190610d1b565b8373ffffffffffffffffffffffffffffffffffffffff1663a043d6d76040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107fc573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108209190610d32565b6040517fbbe462ce00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8681166004830152919091169063bbe462ce90602401602060405180830381865afa15801561088c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108b09190610d1b565b5f610b25565b5f620186a06108c58484610946565b8473ffffffffffffffffffffffffffffffffffffffff1663f384bd056040518163ffffffff1660e01b8152600401602060405180830381865afa15801561090e573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109329190610d1b565b61093c9190610d8d565b6102909190610f10565b5f8273ffffffffffffffffffffffffffffffffffffffff16639bd6012f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610990573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109b49190610d1b565b6109bf90600a610ed8565b8373ffffffffffffffffffffffffffffffffffffffff16633d07b1766040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a08573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a2c9190610d32565b6040517fff2ba6150000000000000000000000000000000000000000000000000000000081526001600482015273ffffffffffffffffffffffffffffffffffffffff919091169063ff2ba61590602401602060405180830381865afa158015610a97573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610abb9190610d1b565b6040517f29bc969d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85811660048301528616906329bc969d90602401602060405180830381865afa15801561090e573d5f5f3e3d5ffd5b5f610b3e84846b033b2e3c9fd0803ce800000085610b48565b90505b9392505050565b5f610b75610b5583610b93565b8015610b7057505f8480610b6b57610b6b610ee3565b868809115b151590565b610b80868686610bbf565b610b8a9190610d7a565b95945050505050565b5f6002826003811115610ba857610ba8610f23565b610bb29190610f50565b60ff166001149050919050565b5f838302817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff85870982811083820303915050805f03610c1257838281610c0857610c08610ee3565b0492505050610b41565b808411610c2957610c296003851502601118610c94565b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010186841190950394909402919094039290920491909117919091029150509392505050565b634e487b715f52806020526024601cfd5b73ffffffffffffffffffffffffffffffffffffffff81168114610cc6575f5ffd5b50565b5f5f60408385031215610cda575f5ffd5b8235610ce581610ca5565b91506020830135610cf581610ca5565b809150509250929050565b5f60208284031215610d10575f5ffd5b8135610b4181610ca5565b5f60208284031215610d2b575f5ffd5b5051919050565b5f60208284031215610d42575f5ffd5b8151610b4181610ca5565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b8082018082111561029357610293610d4d565b808202811582820484141761029357610293610d4d565b8181038181111561029357610293610d4d565b6001815b6001841115610df257808504811115610dd657610dd6610d4d565b6001841615610de457908102905b60019390931c928002610dbb565b935093915050565b5f82610e0857506001610293565b81610e1457505f610293565b8160018114610e2a5760028114610e3457610e50565b6001915050610293565b60ff841115610e4557610e45610d4d565b50506001821b610293565b5060208310610133831016604e8410600b8410161715610e73575081810a610293565b610e9e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8484610db7565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115610ed057610ed0610d4d565b029392505050565b5f6102908383610dfa565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f82610f1e57610f1e610ee3565b500490565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b5f60ff831680610f6257610f62610ee3565b8060ff8416069150509291505056fea264697066735822122085fc80a38af2b9bf0724bc3e37e3a26641e06268e6771891df1c827a6d2ba2d164736f6c634300081c0033","sourceMap":"477:4451:5:-:0;;;;;;;;;;;;;;;;;;;","linkReferences":{},"cborAuxdata":{"1":{"value":"0xa264697066735822122085fc80a38af2b9bf0724bc3e37e3a26641e06268e6771891df1c827a6d2ba2d164736f6c634300081c0033","offset":3982}},"transformations":[],"transformationValues":{}},"runtimeBytecode":{"onchainBytecode":"0x608060405234801561000f575f5ffd5b506004361061006f575f3560e01c8063d6d8a43e1161004d578063d6d8a43e146100be578063f0a05395146100d1578063f9c51f27146100e4575f5ffd5b806314c8ad2c146100735780631ff517ff14610098578063d394dd9c146100ab575b5f5ffd5b610086610081366004610cc9565b6100f7565b60405190815260200160405180910390f35b6100866100a6366004610d00565b610299565b6100866100b9366004610cc9565b610444565b6100866100cc366004610d00565b610742565b6100866100df366004610cc9565b6108b6565b6100866100f2366004610cc9565b610946565b6040517f9198e84000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82811660048301525f9161029091851690639198e84090602401602060405180830381865afa158015610167573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061018b9190610d1b565b8473ffffffffffffffffffffffffffffffffffffffff1663a043d6d76040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101d4573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906101f89190610d32565b6040517f7d7d33d000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff87811660048301529190911690637d7d33d0906024015b602060405180830381865afa158015610265573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906102899190610d1b565b6001610b25565b90505b92915050565b5f6103cd8273ffffffffffffffffffffffffffffffffffffffff16631b859e416040518163ffffffff1660e01b8152600401602060405180830381865afa1580156102e6573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061030a9190610d1b565b8373ffffffffffffffffffffffffffffffffffffffff1663a043d6d76040518163ffffffff1660e01b8152600401602060405180830381865afa158015610353573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103779190610d32565b6040517f7d7d33d000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff86811660048301529190911690637d7d33d09060240161024a565b8273ffffffffffffffffffffffffffffffffffffffff1663bbcac5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015610416573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061043a9190610d1b565b6102939190610d7a565b5f5f61045084846100f7565b90508015610719575f8490505f8173ffffffffffffffffffffffffffffffffffffffff16633d07b1766040518163ffffffff1660e01b8152600401602060405180830381865afa1580156104a6573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104ca9190610d32565b6040517fff2ba6150000000000000000000000000000000000000000000000000000000081526001600482015273ffffffffffffffffffffffffffffffffffffffff919091169063ff2ba61590602401602060405180830381865afa158015610535573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105599190610d1b565b905061056883620186a0610d8d565b8273ffffffffffffffffffffffffffffffffffffffff16634031234c6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156105b1573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105d59190610d1b565b828473ffffffffffffffffffffffffffffffffffffffff16639bd6012f6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561061f573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106439190610d1b565b61064e906012610da4565b61065990600a610ed8565b6040517f29bc969d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8a811660048301528716906329bc969d90602401602060405180830381865afa1580156106c3573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106e79190610d1b565b6106f19190610d8d565b6106fb9190610d8d565b6107059190610d8d565b61070f9190610f10565b9350505050610293565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9392505050565b5f6102938273ffffffffffffffffffffffffffffffffffffffff16631b859e416040518163ffffffff1660e01b8152600401602060405180830381865afa15801561078f573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107b39190610d1b565b8373ffffffffffffffffffffffffffffffffffffffff1663a043d6d76040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107fc573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108209190610d32565b6040517fbbe462ce00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8681166004830152919091169063bbe462ce90602401602060405180830381865afa15801561088c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108b09190610d1b565b5f610b25565b5f620186a06108c58484610946565b8473ffffffffffffffffffffffffffffffffffffffff1663f384bd056040518163ffffffff1660e01b8152600401602060405180830381865afa15801561090e573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109329190610d1b565b61093c9190610d8d565b6102909190610f10565b5f8273ffffffffffffffffffffffffffffffffffffffff16639bd6012f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610990573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109b49190610d1b565b6109bf90600a610ed8565b8373ffffffffffffffffffffffffffffffffffffffff16633d07b1766040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a08573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a2c9190610d32565b6040517fff2ba6150000000000000000000000000000000000000000000000000000000081526001600482015273ffffffffffffffffffffffffffffffffffffffff919091169063ff2ba61590602401602060405180830381865afa158015610a97573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610abb9190610d1b565b6040517f29bc969d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85811660048301528616906329bc969d90602401602060405180830381865afa15801561090e573d5f5f3e3d5ffd5b5f610b3e84846b033b2e3c9fd0803ce800000085610b48565b90505b9392505050565b5f610b75610b5583610b93565b8015610b7057505f8480610b6b57610b6b610ee3565b868809115b151590565b610b80868686610bbf565b610b8a9190610d7a565b95945050505050565b5f6002826003811115610ba857610ba8610f23565b610bb29190610f50565b60ff166001149050919050565b5f838302817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff85870982811083820303915050805f03610c1257838281610c0857610c08610ee3565b0492505050610b41565b808411610c2957610c296003851502601118610c94565b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010186841190950394909402919094039290920491909117919091029150509392505050565b634e487b715f52806020526024601cfd5b73ffffffffffffffffffffffffffffffffffffffff81168114610cc6575f5ffd5b50565b5f5f60408385031215610cda575f5ffd5b8235610ce581610ca5565b91506020830135610cf581610ca5565b809150509250929050565b5f60208284031215610d10575f5ffd5b8135610b4181610ca5565b5f60208284031215610d2b575f5ffd5b5051919050565b5f60208284031215610d42575f5ffd5b8151610b4181610ca5565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b8082018082111561029357610293610d4d565b808202811582820484141761029357610293610d4d565b8181038181111561029357610293610d4d565b6001815b6001841115610df257808504811115610dd657610dd6610d4d565b6001841615610de457908102905b60019390931c928002610dbb565b935093915050565b5f82610e0857506001610293565b81610e1457505f610293565b8160018114610e2a5760028114610e3457610e50565b6001915050610293565b60ff841115610e4557610e45610d4d565b50506001821b610293565b5060208310610133831016604e8410600b8410161715610e73575081810a610293565b610e9e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8484610db7565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115610ed057610ed0610d4d565b029392505050565b5f6102908383610dfa565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f82610f1e57610f1e610ee3565b500490565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b5f60ff831680610f6257610f62610ee3565b8060ff8416069150509291505056fea264697066735822122085fc80a38af2b9bf0724bc3e37e3a26641e06268e6771891df1c827a6d2ba2d164736f6c634300081c0033","recompiledBytecode":"0x608060405234801561000f575f5ffd5b506004361061006f575f3560e01c8063d6d8a43e1161004d578063d6d8a43e146100be578063f0a05395146100d1578063f9c51f27146100e4575f5ffd5b806314c8ad2c146100735780631ff517ff14610098578063d394dd9c146100ab575b5f5ffd5b610086610081366004610cc9565b6100f7565b60405190815260200160405180910390f35b6100866100a6366004610d00565b610299565b6100866100b9366004610cc9565b610444565b6100866100cc366004610d00565b610742565b6100866100df366004610cc9565b6108b6565b6100866100f2366004610cc9565b610946565b6040517f9198e84000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82811660048301525f9161029091851690639198e84090602401602060405180830381865afa158015610167573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061018b9190610d1b565b8473ffffffffffffffffffffffffffffffffffffffff1663a043d6d76040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101d4573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906101f89190610d32565b6040517f7d7d33d000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff87811660048301529190911690637d7d33d0906024015b602060405180830381865afa158015610265573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906102899190610d1b565b6001610b25565b90505b92915050565b5f6103cd8273ffffffffffffffffffffffffffffffffffffffff16631b859e416040518163ffffffff1660e01b8152600401602060405180830381865afa1580156102e6573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061030a9190610d1b565b8373ffffffffffffffffffffffffffffffffffffffff1663a043d6d76040518163ffffffff1660e01b8152600401602060405180830381865afa158015610353573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103779190610d32565b6040517f7d7d33d000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff86811660048301529190911690637d7d33d09060240161024a565b8273ffffffffffffffffffffffffffffffffffffffff1663bbcac5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015610416573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061043a9190610d1b565b6102939190610d7a565b5f5f61045084846100f7565b90508015610719575f8490505f8173ffffffffffffffffffffffffffffffffffffffff16633d07b1766040518163ffffffff1660e01b8152600401602060405180830381865afa1580156104a6573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104ca9190610d32565b6040517fff2ba6150000000000000000000000000000000000000000000000000000000081526001600482015273ffffffffffffffffffffffffffffffffffffffff919091169063ff2ba61590602401602060405180830381865afa158015610535573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105599190610d1b565b905061056883620186a0610d8d565b8273ffffffffffffffffffffffffffffffffffffffff16634031234c6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156105b1573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105d59190610d1b565b828473ffffffffffffffffffffffffffffffffffffffff16639bd6012f6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561061f573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106439190610d1b565b61064e906012610da4565b61065990600a610ed8565b6040517f29bc969d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8a811660048301528716906329bc969d90602401602060405180830381865afa1580156106c3573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106e79190610d1b565b6106f19190610d8d565b6106fb9190610d8d565b6107059190610d8d565b61070f9190610f10565b9350505050610293565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9392505050565b5f6102938273ffffffffffffffffffffffffffffffffffffffff16631b859e416040518163ffffffff1660e01b8152600401602060405180830381865afa15801561078f573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107b39190610d1b565b8373ffffffffffffffffffffffffffffffffffffffff1663a043d6d76040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107fc573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108209190610d32565b6040517fbbe462ce00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8681166004830152919091169063bbe462ce90602401602060405180830381865afa15801561088c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108b09190610d1b565b5f610b25565b5f620186a06108c58484610946565b8473ffffffffffffffffffffffffffffffffffffffff1663f384bd056040518163ffffffff1660e01b8152600401602060405180830381865afa15801561090e573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109329190610d1b565b61093c9190610d8d565b6102909190610f10565b5f8273ffffffffffffffffffffffffffffffffffffffff16639bd6012f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610990573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109b49190610d1b565b6109bf90600a610ed8565b8373ffffffffffffffffffffffffffffffffffffffff16633d07b1766040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a08573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a2c9190610d32565b6040517fff2ba6150000000000000000000000000000000000000000000000000000000081526001600482015273ffffffffffffffffffffffffffffffffffffffff919091169063ff2ba61590602401602060405180830381865afa158015610a97573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610abb9190610d1b565b6040517f29bc969d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85811660048301528616906329bc969d90602401602060405180830381865afa15801561090e573d5f5f3e3d5ffd5b5f610b3e84846b033b2e3c9fd0803ce800000085610b48565b90505b9392505050565b5f610b75610b5583610b93565b8015610b7057505f8480610b6b57610b6b610ee3565b868809115b151590565b610b80868686610bbf565b610b8a9190610d7a565b95945050505050565b5f6002826003811115610ba857610ba8610f23565b610bb29190610f50565b60ff166001149050919050565b5f838302817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff85870982811083820303915050805f03610c1257838281610c0857610c08610ee3565b0492505050610b41565b808411610c2957610c296003851502601118610c94565b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010186841190950394909402919094039290920491909117919091029150509392505050565b634e487b715f52806020526024601cfd5b73ffffffffffffffffffffffffffffffffffffffff81168114610cc6575f5ffd5b50565b5f5f60408385031215610cda575f5ffd5b8235610ce581610ca5565b91506020830135610cf581610ca5565b809150509250929050565b5f60208284031215610d10575f5ffd5b8135610b4181610ca5565b5f60208284031215610d2b575f5ffd5b5051919050565b5f60208284031215610d42575f5ffd5b8151610b4181610ca5565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b8082018082111561029357610293610d4d565b808202811582820484141761029357610293610d4d565b8181038181111561029357610293610d4d565b6001815b6001841115610df257808504811115610dd657610dd6610d4d565b6001841615610de457908102905b60019390931c928002610dbb565b935093915050565b5f82610e0857506001610293565b81610e1457505f610293565b8160018114610e2a5760028114610e3457610e50565b6001915050610293565b60ff841115610e4557610e45610d4d565b50506001821b610293565b5060208310610133831016604e8410600b8410161715610e73575081810a610293565b610e9e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8484610db7565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115610ed057610ed0610d4d565b029392505050565b5f6102908383610dfa565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f82610f1e57610f1e610ee3565b500490565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b5f60ff831680610f6257610f62610ee3565b8060ff8416069150509291505056fea264697066735822122085fc80a38af2b9bf0724bc3e37e3a26641e06268e6771891df1c827a6d2ba2d164736f6c634300081c0033","sourceMap":"477:4451:5:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1446:226;;;;;;:::i;:::-;;:::i;:::-;;;755:25:13;;;743:2;728:18;1446:226:5;;;;;;;894:225;;;;;;:::i;:::-;;:::i;2043:793::-;;;;;;:::i;:::-;;:::i;4095:212::-;;;;;;:::i;:::-;;:::i;3689:177::-;;;;;;:::i;:::-;;:::i;3125:227::-;;;;;;:::i;:::-;;:::i;1446:226::-;1561:30;;;;;:21;2074:55:13;;;1561:30:5;;;2056:74:13;1518:7:5;;1544:121;;1561:21;;;;;2029:18:13;;1561:30:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1593:6;:19;;;:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:51;;;;;:34;2074:55:13;;;1593:51:5;;;2056:74:13;1593:34:5;;;;;;;2029:18:13;;1593:51:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1646:18;1544:16;:121::i;:::-;1537:128;;1446:226;;;;;:::o;894:225::-;952:7;997:115;1014:6;:22;;;:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1040:6;:19;;;:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:51;;;;;:34;2074:55:13;;;1040:51:5;;;2056:74:13;1040:34:5;;;;;;;2029:18:13;;1040:51:5;1910:226:13;997:115:5;978:6;:14;;;:16;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:134;;;;:::i;2043:793::-;2120:7;2139:17;2159:34;2176:6;2185:7;2159:8;:34::i;:::-;2139:54;-1:-1:-1;2207:14:5;;2203:574;;2237:24;2276:6;2237:46;;2349:19;2371:12;:25;;;:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:46;;;;;2412:4;2371:46;;;3362:41:13;2371:40:5;;;;;;;;3335:18:13;;2371:46:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2349:68;-1:-1:-1;2746:19:5;:9;2758:7;2746:19;:::i;:::-;2706:12;:33;;;:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2692:11;2659:12;:27;;;:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2654:34;;:2;:34;:::i;:::-;2647:42;;:2;:42;:::i;:::-;2604:40;;;;;:31;2074:55:13;;;2604:40:5;;;2056:74:13;2604:31:5;;;;;2029:18:13;;2604:40:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:85;;;;:::i;:::-;:99;;;;:::i;:::-;:137;;;;:::i;:::-;2603:163;;;;:::i;:::-;2580:186;;;;;;;2203:574;-1:-1:-1;598:2:5;;2043:793;-1:-1:-1;;;2043:793:5:o;4095:212::-;4160:7;4186:114;4203:6;:22;;;:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;4229:6;:19;;;:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:49;;;;;:32;2074:55:13;;;4229:49:5;;;2056:74:13;4229:32:5;;;;;;;2029:18:13;;4229:49:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;4280:19;4186:16;:114::i;3689:177::-;3772:7;3852;3817:31;3832:6;3840:7;3817:14;:31::i;:::-;3799:6;:13;;;:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:49;;;;:::i;:::-;3798:61;;;;:::i;3125:227::-;3208:7;3322:6;:21;;;:23;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;3316:29;;:2;:29;:::i;:::-;3272:6;:19;;;:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:40;;;;;3307:4;3272:40;;;3362:41:13;3272:34:5;;;;;;;;3335:18:13;;3272:40:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;3235:34;;;;;:25;2074:55:13;;;3235:34:5;;;2056:74:13;3235:25:5;;;;;2029:18:13;;3235:34:5;;;;;;;;;;;;;;;;;;;;;;4732:194;4844:7;4870:49;4882:10;4894:5;545:4;4906:12;4870:11;:49::i;:::-;4863:56;;4732:194;;;;;;:::o;9351:238:3:-;9452:7;9506:76;9522:26;9539:8;9522:16;:26::i;:::-;:59;;;;;9580:1;9565:11;9552:25;;;;;:::i;:::-;9562:1;9559;9552:25;:29;9522:59;34914:9:4;34907:17;;34795:145;9506:76:3;9478:25;9485:1;9488;9491:11;9478:6;:25::i;:::-;:104;;;;:::i;:::-;9471:111;9351:238;-1:-1:-1;;;;;9351:238:3:o;28183:122::-;28251:4;28292:1;28280:8;28274:15;;;;;;;;:::i;:::-;:19;;;;:::i;:::-;:24;;28297:1;28274:24;28267:31;;28183:122;;;:::o;4996:4226::-;5078:14;5449:5;;;5078:14;5634:6;5453:1;5449;5621:20;5694:5;5690:2;5687:13;5679:5;5675:2;5671:14;5667:34;5658:43;;;5796:5;5805:1;5796:10;5792:368;;6134:11;6126:5;:19;;;;;:::i;:::-;;6119:26;;;;;;5792:368;6285:5;6270:11;:20;6266:143;;6310:84;3066:5;6330:16;;3065:36;940:4:2;3060:42:3;6310:11;:84::i;:::-;6664:17;6799:11;6796:1;6793;6786:25;7199:12;7229:15;;;7214:31;;7348:22;;;;;8094:1;8075;:15;;8074:21;;8327;;;8323:25;;8312:36;8397:21;;;8393:25;;8382:36;8469:21;;;8465:25;;8454:36;8540:21;;;8536:25;;8525:36;8613:21;;;8609:25;;8598:36;8687:21;;;8683:25;;;8672:36;7597:12;;;;7593:23;;;7618:1;7589:31;6913:20;;;6902:32;;;7709:12;;;;6960:21;;;;7446:16;;;;7700:21;;;;9163:15;;;;;-1:-1:-1;;4996:4226:3;;;;;:::o;1776:194:2:-;1881:10;1875:4;1868:24;1918:4;1912;1905:18;1949:4;1943;1936:18;14:163:13;109:42;102:5;98:54;91:5;88:65;78:93;;167:1;164;157:12;78:93;14:163;:::o;182:422::-;266:6;274;327:2;315:9;306:7;302:23;298:32;295:52;;;343:1;340;333:12;295:52;382:9;369:23;401:40;435:5;401:40;:::i;:::-;460:5;-1:-1:-1;517:2:13;502:18;;489:32;530:42;489:32;530:42;:::i;:::-;591:7;581:17;;;182:422;;;;;:::o;791:272::-;866:6;919:2;907:9;898:7;894:23;890:32;887:52;;;935:1;932;925:12;887:52;974:9;961:23;993:40;1027:5;993:40;:::i;2141:184::-;2211:6;2264:2;2252:9;2243:7;2239:23;2235:32;2232:52;;;2280:1;2277;2270:12;2232:52;-1:-1:-1;2303:16:13;;2141:184;-1:-1:-1;2141:184:13:o;2330:282::-;2422:6;2475:2;2463:9;2454:7;2450:23;2446:32;2443:52;;;2491:1;2488;2481:12;2443:52;2523:9;2517:16;2542:40;2576:5;2542:40;:::i;2617:184::-;2669:77;2666:1;2659:88;2766:4;2763:1;2756:15;2790:4;2787:1;2780:15;2806:125;2871:9;;;2892:10;;;2889:36;;;2905:18;;:::i;3414:168::-;3487:9;;;3518;;3535:15;;;3529:22;;3515:37;3505:71;;3556:18;;:::i;3587:128::-;3654:9;;;3675:11;;;3672:37;;;3689:18;;:::i;3720:375::-;3808:1;3826:5;3840:249;3861:1;3851:8;3848:15;3840:249;;;3911:4;3906:3;3902:14;3896:4;3893:24;3890:50;;;3920:18;;:::i;:::-;3970:1;3960:8;3956:16;3953:49;;;3984:16;;;;3953:49;4067:1;4063:16;;;;;4023:15;;3840:249;;;3720:375;;;;;;:::o;4100:1022::-;4149:5;4179:8;4169:80;;-1:-1:-1;4220:1:13;4234:5;;4169:80;4268:4;4258:76;;-1:-1:-1;4305:1:13;4319:5;;4258:76;4350:4;4368:1;4363:59;;;;4436:1;4431:174;;;;4343:262;;4363:59;4393:1;4384:10;;4407:5;;;4431:174;4468:3;4458:8;4455:17;4452:43;;;4475:18;;:::i;:::-;-1:-1:-1;;4531:1:13;4517:16;;4590:5;;4343:262;;4689:2;4679:8;4676:16;4670:3;4664:4;4661:13;4657:36;4651:2;4641:8;4638:16;4633:2;4627:4;4624:12;4620:35;4617:77;4614:203;;;-1:-1:-1;4726:19:13;;;4802:5;;4614:203;4849:102;4884:66;4874:8;4868:4;4849:102;:::i;:::-;5047:6;4979:66;4975:79;4966:7;4963:92;4960:118;;;5058:18;;:::i;:::-;5096:20;;4100:1022;-1:-1:-1;;;4100:1022:13:o;5127:131::-;5187:5;5216:36;5243:8;5237:4;5216:36;:::i;5263:184::-;5315:77;5312:1;5305:88;5412:4;5409:1;5402:15;5436:4;5433:1;5426:15;5452:120;5492:1;5518;5508:35;;5523:18;;:::i;:::-;-1:-1:-1;5557:9:13;;5452:120::o;5577:184::-;5629:77;5626:1;5619:88;5726:4;5723:1;5716:15;5750:4;5747:1;5740:15;5766:157;5796:1;5830:4;5827:1;5823:12;5854:3;5844:37;;5861:18;;:::i;:::-;5913:3;5906:4;5903:1;5899:12;5895:22;5890:27;;;5766:157;;;;:::o","linkReferences":{},"cborAuxdata":{"1":{"value":"0xa264697066735822122085fc80a38af2b9bf0724bc3e37e3a26641e06268e6771891df1c827a6d2ba2d164736f6c634300081c0033","offset":3954}},"immutableReferences":{},"transformations":[],"transformationValues":{}},"deployment":{"transactionHash":"0xf17513bf32e6e7ec46aaa7af7f6bba4967e332e27fc2ccb52678a6bf97de913e","blockNumber":"24570605","transactionIndex":"459","deployer":"0xe08c2512F87cF63fb7D2325EDd08aEC7920aC2f6"},"sources":{"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"../IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC-20 standard.\n */\ninterface IERC20Metadata is IERC20 {\n    /**\n     * @dev Returns the name of the token.\n     */\n    function name() external view returns (string memory);\n\n    /**\n     * @dev Returns the symbol of the token.\n     */\n    function symbol() external view returns (string memory);\n\n    /**\n     * @dev Returns the decimals places of the token.\n     */\n    function decimals() external view returns (uint8);\n}\n"},"@openzeppelin/contracts/token/ERC20/IERC20.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC-20 standard as defined in the ERC.\n */\ninterface IERC20 {\n    /**\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\n     * another (`to`).\n     *\n     * Note that `value` may be zero.\n     */\n    event Transfer(address indexed from, address indexed to, uint256 value);\n\n    /**\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n     * a call to {approve}. `value` is the new allowance.\n     */\n    event Approval(address indexed owner, address indexed spender, uint256 value);\n\n    /**\n     * @dev Returns the value of tokens in existence.\n     */\n    function totalSupply() external view returns (uint256);\n\n    /**\n     * @dev Returns the value of tokens owned by `account`.\n     */\n    function balanceOf(address account) external view returns (uint256);\n\n    /**\n     * @dev Moves a `value` amount of tokens from the caller's account to `to`.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transfer(address to, uint256 value) external returns (bool);\n\n    /**\n     * @dev Returns the remaining number of tokens that `spender` will be\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\n     * zero by default.\n     *\n     * This value changes when {approve} or {transferFrom} are called.\n     */\n    function allowance(address owner, address spender) external view returns (uint256);\n\n    /**\n     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n     * caller's tokens.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\n     * that someone may use both the old and the new allowance by unfortunate\n     * transaction ordering. One possible solution to mitigate this race\n     * condition is to first reduce the spender's allowance to 0 and set the\n     * desired value afterwards:\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n     *\n     * Emits an {Approval} event.\n     */\n    function approve(address spender, uint256 value) external returns (bool);\n\n    /**\n     * @dev Moves a `value` amount of tokens from `from` to `to` using the\n     * allowance mechanism. `value` is then deducted from the caller's\n     * allowance.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transferFrom(address from, address to, uint256 value) external returns (bool);\n}\n"},"@openzeppelin/contracts/utils/math/Math.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.20;\n\nimport {Panic} from \"../Panic.sol\";\nimport {SafeCast} from \"./SafeCast.sol\";\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n    enum Rounding {\n        Floor, // Toward negative infinity\n        Ceil, // Toward positive infinity\n        Trunc, // Toward zero\n        Expand // Away from zero\n    }\n\n    /**\n     * @dev Returns the addition of two unsigned integers, with an success flag (no overflow).\n     */\n    function tryAdd(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n        unchecked {\n            uint256 c = a + b;\n            if (c < a) return (false, 0);\n            return (true, c);\n        }\n    }\n\n    /**\n     * @dev Returns the subtraction of two unsigned integers, with an success flag (no overflow).\n     */\n    function trySub(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n        unchecked {\n            if (b > a) return (false, 0);\n            return (true, a - b);\n        }\n    }\n\n    /**\n     * @dev Returns the multiplication of two unsigned integers, with an success flag (no overflow).\n     */\n    function tryMul(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n        unchecked {\n            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n            // benefit is lost if 'b' is also tested.\n            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n            if (a == 0) return (true, 0);\n            uint256 c = a * b;\n            if (c / a != b) return (false, 0);\n            return (true, c);\n        }\n    }\n\n    /**\n     * @dev Returns the division of two unsigned integers, with a success flag (no division by zero).\n     */\n    function tryDiv(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n        unchecked {\n            if (b == 0) return (false, 0);\n            return (true, a / b);\n        }\n    }\n\n    /**\n     * @dev Returns the remainder of dividing two unsigned integers, with a success flag (no division by zero).\n     */\n    function tryMod(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n        unchecked {\n            if (b == 0) return (false, 0);\n            return (true, a % b);\n        }\n    }\n\n    /**\n     * @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant.\n     *\n     * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.\n     * However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute\n     * one branch when needed, making this function more expensive.\n     */\n    function ternary(bool condition, uint256 a, uint256 b) internal pure returns (uint256) {\n        unchecked {\n            // branchless ternary works because:\n            // b ^ (a ^ b) == a\n            // b ^ 0 == b\n            return b ^ ((a ^ b) * SafeCast.toUint(condition));\n        }\n    }\n\n    /**\n     * @dev Returns the largest of two numbers.\n     */\n    function max(uint256 a, uint256 b) internal pure returns (uint256) {\n        return ternary(a > b, a, b);\n    }\n\n    /**\n     * @dev Returns the smallest of two numbers.\n     */\n    function min(uint256 a, uint256 b) internal pure returns (uint256) {\n        return ternary(a < b, a, b);\n    }\n\n    /**\n     * @dev Returns the average of two numbers. The result is rounded towards\n     * zero.\n     */\n    function average(uint256 a, uint256 b) internal pure returns (uint256) {\n        // (a + b) / 2 can overflow.\n        return (a & b) + (a ^ b) / 2;\n    }\n\n    /**\n     * @dev Returns the ceiling of the division of two numbers.\n     *\n     * This differs from standard division with `/` in that it rounds towards infinity instead\n     * of rounding towards zero.\n     */\n    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n        if (b == 0) {\n            // Guarantee the same behavior as in a regular Solidity division.\n            Panic.panic(Panic.DIVISION_BY_ZERO);\n        }\n\n        // The following calculation ensures accurate ceiling division without overflow.\n        // Since a is non-zero, (a - 1) / b will not overflow.\n        // The largest possible result occurs when (a - 1) / b is type(uint256).max,\n        // but the largest value we can obtain is type(uint256).max - 1, which happens\n        // when a = type(uint256).max and b = 1.\n        unchecked {\n            return SafeCast.toUint(a > 0) * ((a - 1) / b + 1);\n        }\n    }\n\n    /**\n     * @dev Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or\n     * denominator == 0.\n     *\n     * Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by\n     * Uniswap Labs also under MIT license.\n     */\n    function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\n        unchecked {\n            // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2²⁵⁶ and mod 2²⁵⁶ - 1, then use\n            // the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\n            // variables such that product = prod1 * 2²⁵⁶ + prod0.\n            uint256 prod0 = x * y; // Least significant 256 bits of the product\n            uint256 prod1; // Most significant 256 bits of the product\n            assembly {\n                let mm := mulmod(x, y, not(0))\n                prod1 := sub(sub(mm, prod0), lt(mm, prod0))\n            }\n\n            // Handle non-overflow cases, 256 by 256 division.\n            if (prod1 == 0) {\n                // Solidity will revert if denominator == 0, unlike the div opcode on its own.\n                // The surrounding unchecked block does not change this fact.\n                // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\n                return prod0 / denominator;\n            }\n\n            // Make sure the result is less than 2²⁵⁶. Also prevents denominator == 0.\n            if (denominator <= prod1) {\n                Panic.panic(ternary(denominator == 0, Panic.DIVISION_BY_ZERO, Panic.UNDER_OVERFLOW));\n            }\n\n            ///////////////////////////////////////////////\n            // 512 by 256 division.\n            ///////////////////////////////////////////////\n\n            // Make division exact by subtracting the remainder from [prod1 prod0].\n            uint256 remainder;\n            assembly {\n                // Compute remainder using mulmod.\n                remainder := mulmod(x, y, denominator)\n\n                // Subtract 256 bit number from 512 bit number.\n                prod1 := sub(prod1, gt(remainder, prod0))\n                prod0 := sub(prod0, remainder)\n            }\n\n            // Factor powers of two out of denominator and compute largest power of two divisor of denominator.\n            // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.\n\n            uint256 twos = denominator & (0 - denominator);\n            assembly {\n                // Divide denominator by twos.\n                denominator := div(denominator, twos)\n\n                // Divide [prod1 prod0] by twos.\n                prod0 := div(prod0, twos)\n\n                // Flip twos such that it is 2²⁵⁶ / twos. If twos is zero, then it becomes one.\n                twos := add(div(sub(0, twos), twos), 1)\n            }\n\n            // Shift in bits from prod1 into prod0.\n            prod0 |= prod1 * twos;\n\n            // Invert denominator mod 2²⁵⁶. Now that denominator is an odd number, it has an inverse modulo 2²⁵⁶ such\n            // that denominator * inv ≡ 1 mod 2²⁵⁶. Compute the inverse by starting with a seed that is correct for\n            // four bits. That is, denominator * inv ≡ 1 mod 2⁴.\n            uint256 inverse = (3 * denominator) ^ 2;\n\n            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also\n            // works in modular arithmetic, doubling the correct bits in each step.\n            inverse *= 2 - denominator * inverse; // inverse mod 2⁸\n            inverse *= 2 - denominator * inverse; // inverse mod 2¹⁶\n            inverse *= 2 - denominator * inverse; // inverse mod 2³²\n            inverse *= 2 - denominator * inverse; // inverse mod 2⁶⁴\n            inverse *= 2 - denominator * inverse; // inverse mod 2¹²⁸\n            inverse *= 2 - denominator * inverse; // inverse mod 2²⁵⁶\n\n            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\n            // This will give us the correct result modulo 2²⁵⁶. Since the preconditions guarantee that the outcome is\n            // less than 2²⁵⁶, this is the final result. We don't need to compute the high bits of the result and prod1\n            // is no longer required.\n            result = prod0 * inverse;\n            return result;\n        }\n    }\n\n    /**\n     * @dev Calculates x * y / denominator with full precision, following the selected rounding direction.\n     */\n    function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\n        return mulDiv(x, y, denominator) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0);\n    }\n\n    /**\n     * @dev Calculate the modular multiplicative inverse of a number in Z/nZ.\n     *\n     * If n is a prime, then Z/nZ is a field. In that case all elements are inversible, except 0.\n     * If n is not a prime, then Z/nZ is not a field, and some elements might not be inversible.\n     *\n     * If the input value is not inversible, 0 is returned.\n     *\n     * NOTE: If you know for sure that n is (big) a prime, it may be cheaper to use Fermat's little theorem and get the\n     * inverse using `Math.modExp(a, n - 2, n)`. See {invModPrime}.\n     */\n    function invMod(uint256 a, uint256 n) internal pure returns (uint256) {\n        unchecked {\n            if (n == 0) return 0;\n\n            // The inverse modulo is calculated using the Extended Euclidean Algorithm (iterative version)\n            // Used to compute integers x and y such that: ax + ny = gcd(a, n).\n            // When the gcd is 1, then the inverse of a modulo n exists and it's x.\n            // ax + ny = 1\n            // ax = 1 + (-y)n\n            // ax ≡ 1 (mod n) # x is the inverse of a modulo n\n\n            // If the remainder is 0 the gcd is n right away.\n            uint256 remainder = a % n;\n            uint256 gcd = n;\n\n            // Therefore the initial coefficients are:\n            // ax + ny = gcd(a, n) = n\n            // 0a + 1n = n\n            int256 x = 0;\n            int256 y = 1;\n\n            while (remainder != 0) {\n                uint256 quotient = gcd / remainder;\n\n                (gcd, remainder) = (\n                    // The old remainder is the next gcd to try.\n                    remainder,\n                    // Compute the next remainder.\n                    // Can't overflow given that (a % gcd) * (gcd // (a % gcd)) <= gcd\n                    // where gcd is at most n (capped to type(uint256).max)\n                    gcd - remainder * quotient\n                );\n\n                (x, y) = (\n                    // Increment the coefficient of a.\n                    y,\n                    // Decrement the coefficient of n.\n                    // Can overflow, but the result is casted to uint256 so that the\n                    // next value of y is \"wrapped around\" to a value between 0 and n - 1.\n                    x - y * int256(quotient)\n                );\n            }\n\n            if (gcd != 1) return 0; // No inverse exists.\n            return ternary(x < 0, n - uint256(-x), uint256(x)); // Wrap the result if it's negative.\n        }\n    }\n\n    /**\n     * @dev Variant of {invMod}. More efficient, but only works if `p` is known to be a prime greater than `2`.\n     *\n     * From https://en.wikipedia.org/wiki/Fermat%27s_little_theorem[Fermat's little theorem], we know that if p is\n     * prime, then `a**(p-1) ≡ 1 mod p`. As a consequence, we have `a * a**(p-2) ≡ 1 mod p`, which means that\n     * `a**(p-2)` is the modular multiplicative inverse of a in Fp.\n     *\n     * NOTE: this function does NOT check that `p` is a prime greater than `2`.\n     */\n    function invModPrime(uint256 a, uint256 p) internal view returns (uint256) {\n        unchecked {\n            return Math.modExp(a, p - 2, p);\n        }\n    }\n\n    /**\n     * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m)\n     *\n     * Requirements:\n     * - modulus can't be zero\n     * - underlying staticcall to precompile must succeed\n     *\n     * IMPORTANT: The result is only valid if the underlying call succeeds. When using this function, make\n     * sure the chain you're using it on supports the precompiled contract for modular exponentiation\n     * at address 0x05 as specified in https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise,\n     * the underlying function will succeed given the lack of a revert, but the result may be incorrectly\n     * interpreted as 0.\n     */\n    function modExp(uint256 b, uint256 e, uint256 m) internal view returns (uint256) {\n        (bool success, uint256 result) = tryModExp(b, e, m);\n        if (!success) {\n            Panic.panic(Panic.DIVISION_BY_ZERO);\n        }\n        return result;\n    }\n\n    /**\n     * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m).\n     * It includes a success flag indicating if the operation succeeded. Operation will be marked as failed if trying\n     * to operate modulo 0 or if the underlying precompile reverted.\n     *\n     * IMPORTANT: The result is only valid if the success flag is true. When using this function, make sure the chain\n     * you're using it on supports the precompiled contract for modular exponentiation at address 0x05 as specified in\n     * https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise, the underlying function will succeed given the lack\n     * of a revert, but the result may be incorrectly interpreted as 0.\n     */\n    function tryModExp(uint256 b, uint256 e, uint256 m) internal view returns (bool success, uint256 result) {\n        if (m == 0) return (false, 0);\n        assembly (\"memory-safe\") {\n            let ptr := mload(0x40)\n            // | Offset    | Content    | Content (Hex)                                                      |\n            // |-----------|------------|--------------------------------------------------------------------|\n            // | 0x00:0x1f | size of b  | 0x0000000000000000000000000000000000000000000000000000000000000020 |\n            // | 0x20:0x3f | size of e  | 0x0000000000000000000000000000000000000000000000000000000000000020 |\n            // | 0x40:0x5f | size of m  | 0x0000000000000000000000000000000000000000000000000000000000000020 |\n            // | 0x60:0x7f | value of b | 0x<.............................................................b> |\n            // | 0x80:0x9f | value of e | 0x<.............................................................e> |\n            // | 0xa0:0xbf | value of m | 0x<.............................................................m> |\n            mstore(ptr, 0x20)\n            mstore(add(ptr, 0x20), 0x20)\n            mstore(add(ptr, 0x40), 0x20)\n            mstore(add(ptr, 0x60), b)\n            mstore(add(ptr, 0x80), e)\n            mstore(add(ptr, 0xa0), m)\n\n            // Given the result < m, it's guaranteed to fit in 32 bytes,\n            // so we can use the memory scratch space located at offset 0.\n            success := staticcall(gas(), 0x05, ptr, 0xc0, 0x00, 0x20)\n            result := mload(0x00)\n        }\n    }\n\n    /**\n     * @dev Variant of {modExp} that supports inputs of arbitrary length.\n     */\n    function modExp(bytes memory b, bytes memory e, bytes memory m) internal view returns (bytes memory) {\n        (bool success, bytes memory result) = tryModExp(b, e, m);\n        if (!success) {\n            Panic.panic(Panic.DIVISION_BY_ZERO);\n        }\n        return result;\n    }\n\n    /**\n     * @dev Variant of {tryModExp} that supports inputs of arbitrary length.\n     */\n    function tryModExp(\n        bytes memory b,\n        bytes memory e,\n        bytes memory m\n    ) internal view returns (bool success, bytes memory result) {\n        if (_zeroBytes(m)) return (false, new bytes(0));\n\n        uint256 mLen = m.length;\n\n        // Encode call args in result and move the free memory pointer\n        result = abi.encodePacked(b.length, e.length, mLen, b, e, m);\n\n        assembly (\"memory-safe\") {\n            let dataPtr := add(result, 0x20)\n            // Write result on top of args to avoid allocating extra memory.\n            success := staticcall(gas(), 0x05, dataPtr, mload(result), dataPtr, mLen)\n            // Overwrite the length.\n            // result.length > returndatasize() is guaranteed because returndatasize() == m.length\n            mstore(result, mLen)\n            // Set the memory pointer after the returned data.\n            mstore(0x40, add(dataPtr, mLen))\n        }\n    }\n\n    /**\n     * @dev Returns whether the provided byte array is zero.\n     */\n    function _zeroBytes(bytes memory byteArray) private pure returns (bool) {\n        for (uint256 i = 0; i < byteArray.length; ++i) {\n            if (byteArray[i] != 0) {\n                return false;\n            }\n        }\n        return true;\n    }\n\n    /**\n     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded\n     * towards zero.\n     *\n     * This method is based on Newton's method for computing square roots; the algorithm is restricted to only\n     * using integer operations.\n     */\n    function sqrt(uint256 a) internal pure returns (uint256) {\n        unchecked {\n            // Take care of easy edge cases when a == 0 or a == 1\n            if (a <= 1) {\n                return a;\n            }\n\n            // In this function, we use Newton's method to get a root of `f(x) := x² - a`. It involves building a\n            // sequence x_n that converges toward sqrt(a). For each iteration x_n, we also define the error between\n            // the current value as `ε_n = | x_n - sqrt(a) |`.\n            //\n            // For our first estimation, we consider `e` the smallest power of 2 which is bigger than the square root\n            // of the target. (i.e. `2**(e-1) ≤ sqrt(a) < 2**e`). We know that `e ≤ 128` because `(2¹²⁸)² = 2²⁵⁶` is\n            // bigger than any uint256.\n            //\n            // By noticing that\n            // `2**(e-1) ≤ sqrt(a) < 2**e → (2**(e-1))² ≤ a < (2**e)² → 2**(2*e-2) ≤ a < 2**(2*e)`\n            // we can deduce that `e - 1` is `log2(a) / 2`. We can thus compute `x_n = 2**(e-1)` using a method similar\n            // to the msb function.\n            uint256 aa = a;\n            uint256 xn = 1;\n\n            if (aa >= (1 << 128)) {\n                aa >>= 128;\n                xn <<= 64;\n            }\n            if (aa >= (1 << 64)) {\n                aa >>= 64;\n                xn <<= 32;\n            }\n            if (aa >= (1 << 32)) {\n                aa >>= 32;\n                xn <<= 16;\n            }\n            if (aa >= (1 << 16)) {\n                aa >>= 16;\n                xn <<= 8;\n            }\n            if (aa >= (1 << 8)) {\n                aa >>= 8;\n                xn <<= 4;\n            }\n            if (aa >= (1 << 4)) {\n                aa >>= 4;\n                xn <<= 2;\n            }\n            if (aa >= (1 << 2)) {\n                xn <<= 1;\n            }\n\n            // We now have x_n such that `x_n = 2**(e-1) ≤ sqrt(a) < 2**e = 2 * x_n`. This implies ε_n ≤ 2**(e-1).\n            //\n            // We can refine our estimation by noticing that the middle of that interval minimizes the error.\n            // If we move x_n to equal 2**(e-1) + 2**(e-2), then we reduce the error to ε_n ≤ 2**(e-2).\n            // This is going to be our x_0 (and ε_0)\n            xn = (3 * xn) >> 1; // ε_0 := | x_0 - sqrt(a) | ≤ 2**(e-2)\n\n            // From here, Newton's method give us:\n            // x_{n+1} = (x_n + a / x_n) / 2\n            //\n            // One should note that:\n            // x_{n+1}² - a = ((x_n + a / x_n) / 2)² - a\n            //              = ((x_n² + a) / (2 * x_n))² - a\n            //              = (x_n⁴ + 2 * a * x_n² + a²) / (4 * x_n²) - a\n            //              = (x_n⁴ + 2 * a * x_n² + a² - 4 * a * x_n²) / (4 * x_n²)\n            //              = (x_n⁴ - 2 * a * x_n² + a²) / (4 * x_n²)\n            //              = (x_n² - a)² / (2 * x_n)²\n            //              = ((x_n² - a) / (2 * x_n))²\n            //              ≥ 0\n            // Which proves that for all n ≥ 1, sqrt(a) ≤ x_n\n            //\n            // This gives us the proof of quadratic convergence of the sequence:\n            // ε_{n+1} = | x_{n+1} - sqrt(a) |\n            //         = | (x_n + a / x_n) / 2 - sqrt(a) |\n            //         = | (x_n² + a - 2*x_n*sqrt(a)) / (2 * x_n) |\n            //         = | (x_n - sqrt(a))² / (2 * x_n) |\n            //         = | ε_n² / (2 * x_n) |\n            //         = ε_n² / | (2 * x_n) |\n            //\n            // For the first iteration, we have a special case where x_0 is known:\n            // ε_1 = ε_0² / | (2 * x_0) |\n            //     ≤ (2**(e-2))² / (2 * (2**(e-1) + 2**(e-2)))\n            //     ≤ 2**(2*e-4) / (3 * 2**(e-1))\n            //     ≤ 2**(e-3) / 3\n            //     ≤ 2**(e-3-log2(3))\n            //     ≤ 2**(e-4.5)\n            //\n            // For the following iterations, we use the fact that, 2**(e-1) ≤ sqrt(a) ≤ x_n:\n            // ε_{n+1} = ε_n² / | (2 * x_n) |\n            //         ≤ (2**(e-k))² / (2 * 2**(e-1))\n            //         ≤ 2**(2*e-2*k) / 2**e\n            //         ≤ 2**(e-2*k)\n            xn = (xn + a / xn) >> 1; // ε_1 := | x_1 - sqrt(a) | ≤ 2**(e-4.5)  -- special case, see above\n            xn = (xn + a / xn) >> 1; // ε_2 := | x_2 - sqrt(a) | ≤ 2**(e-9)    -- general case with k = 4.5\n            xn = (xn + a / xn) >> 1; // ε_3 := | x_3 - sqrt(a) | ≤ 2**(e-18)   -- general case with k = 9\n            xn = (xn + a / xn) >> 1; // ε_4 := | x_4 - sqrt(a) | ≤ 2**(e-36)   -- general case with k = 18\n            xn = (xn + a / xn) >> 1; // ε_5 := | x_5 - sqrt(a) | ≤ 2**(e-72)   -- general case with k = 36\n            xn = (xn + a / xn) >> 1; // ε_6 := | x_6 - sqrt(a) | ≤ 2**(e-144)  -- general case with k = 72\n\n            // Because e ≤ 128 (as discussed during the first estimation phase), we know have reached a precision\n            // ε_6 ≤ 2**(e-144) < 1. Given we're operating on integers, then we can ensure that xn is now either\n            // sqrt(a) or sqrt(a) + 1.\n            return xn - SafeCast.toUint(xn > a / xn);\n        }\n    }\n\n    /**\n     * @dev Calculates sqrt(a), following the selected rounding direction.\n     */\n    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n        unchecked {\n            uint256 result = sqrt(a);\n            return result + SafeCast.toUint(unsignedRoundsUp(rounding) && result * result < a);\n        }\n    }\n\n    /**\n     * @dev Return the log in base 2 of a positive value rounded towards zero.\n     * Returns 0 if given 0.\n     */\n    function log2(uint256 value) internal pure returns (uint256) {\n        uint256 result = 0;\n        uint256 exp;\n        unchecked {\n            exp = 128 * SafeCast.toUint(value > (1 << 128) - 1);\n            value >>= exp;\n            result += exp;\n\n            exp = 64 * SafeCast.toUint(value > (1 << 64) - 1);\n            value >>= exp;\n            result += exp;\n\n            exp = 32 * SafeCast.toUint(value > (1 << 32) - 1);\n            value >>= exp;\n            result += exp;\n\n            exp = 16 * SafeCast.toUint(value > (1 << 16) - 1);\n            value >>= exp;\n            result += exp;\n\n            exp = 8 * SafeCast.toUint(value > (1 << 8) - 1);\n            value >>= exp;\n            result += exp;\n\n            exp = 4 * SafeCast.toUint(value > (1 << 4) - 1);\n            value >>= exp;\n            result += exp;\n\n            exp = 2 * SafeCast.toUint(value > (1 << 2) - 1);\n            value >>= exp;\n            result += exp;\n\n            result += SafeCast.toUint(value > 1);\n        }\n        return result;\n    }\n\n    /**\n     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\n     * Returns 0 if given 0.\n     */\n    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\n        unchecked {\n            uint256 result = log2(value);\n            return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << result < value);\n        }\n    }\n\n    /**\n     * @dev Return the log in base 10 of a positive value rounded towards zero.\n     * Returns 0 if given 0.\n     */\n    function log10(uint256 value) internal pure returns (uint256) {\n        uint256 result = 0;\n        unchecked {\n            if (value >= 10 ** 64) {\n                value /= 10 ** 64;\n                result += 64;\n            }\n            if (value >= 10 ** 32) {\n                value /= 10 ** 32;\n                result += 32;\n            }\n            if (value >= 10 ** 16) {\n                value /= 10 ** 16;\n                result += 16;\n            }\n            if (value >= 10 ** 8) {\n                value /= 10 ** 8;\n                result += 8;\n            }\n            if (value >= 10 ** 4) {\n                value /= 10 ** 4;\n                result += 4;\n            }\n            if (value >= 10 ** 2) {\n                value /= 10 ** 2;\n                result += 2;\n            }\n            if (value >= 10 ** 1) {\n                result += 1;\n            }\n        }\n        return result;\n    }\n\n    /**\n     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n     * Returns 0 if given 0.\n     */\n    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\n        unchecked {\n            uint256 result = log10(value);\n            return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 10 ** result < value);\n        }\n    }\n\n    /**\n     * @dev Return the log in base 256 of a positive value rounded towards zero.\n     * Returns 0 if given 0.\n     *\n     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\n     */\n    function log256(uint256 value) internal pure returns (uint256) {\n        uint256 result = 0;\n        uint256 isGt;\n        unchecked {\n            isGt = SafeCast.toUint(value > (1 << 128) - 1);\n            value >>= isGt * 128;\n            result += isGt * 16;\n\n            isGt = SafeCast.toUint(value > (1 << 64) - 1);\n            value >>= isGt * 64;\n            result += isGt * 8;\n\n            isGt = SafeCast.toUint(value > (1 << 32) - 1);\n            value >>= isGt * 32;\n            result += isGt * 4;\n\n            isGt = SafeCast.toUint(value > (1 << 16) - 1);\n            value >>= isGt * 16;\n            result += isGt * 2;\n\n            result += SafeCast.toUint(value > (1 << 8) - 1);\n        }\n        return result;\n    }\n\n    /**\n     * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\n     * Returns 0 if given 0.\n     */\n    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\n        unchecked {\n            uint256 result = log256(value);\n            return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << (result << 3) < value);\n        }\n    }\n\n    /**\n     * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.\n     */\n    function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {\n        return uint8(rounding) % 2 == 1;\n    }\n}\n"},"@openzeppelin/contracts/utils/math/SafeCast.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/math/SafeCast.sol)\n// This file was procedurally generated from scripts/generate/templates/SafeCast.js.\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Wrappers over Solidity's uintXX/intXX/bool casting operators with added overflow\n * checks.\n *\n * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can\n * easily result in undesired exploitation or bugs, since developers usually\n * assume that overflows raise errors. `SafeCast` restores this intuition by\n * reverting the transaction when such an operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n */\nlibrary SafeCast {\n    /**\n     * @dev Value doesn't fit in an uint of `bits` size.\n     */\n    error SafeCastOverflowedUintDowncast(uint8 bits, uint256 value);\n\n    /**\n     * @dev An int value doesn't fit in an uint of `bits` size.\n     */\n    error SafeCastOverflowedIntToUint(int256 value);\n\n    /**\n     * @dev Value doesn't fit in an int of `bits` size.\n     */\n    error SafeCastOverflowedIntDowncast(uint8 bits, int256 value);\n\n    /**\n     * @dev An uint value doesn't fit in an int of `bits` size.\n     */\n    error SafeCastOverflowedUintToInt(uint256 value);\n\n    /**\n     * @dev Returns the downcasted uint248 from uint256, reverting on\n     * overflow (when the input is greater than largest uint248).\n     *\n     * Counterpart to Solidity's `uint248` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 248 bits\n     */\n    function toUint248(uint256 value) internal pure returns (uint248) {\n        if (value > type(uint248).max) {\n            revert SafeCastOverflowedUintDowncast(248, value);\n        }\n        return uint248(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint240 from uint256, reverting on\n     * overflow (when the input is greater than largest uint240).\n     *\n     * Counterpart to Solidity's `uint240` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 240 bits\n     */\n    function toUint240(uint256 value) internal pure returns (uint240) {\n        if (value > type(uint240).max) {\n            revert SafeCastOverflowedUintDowncast(240, value);\n        }\n        return uint240(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint232 from uint256, reverting on\n     * overflow (when the input is greater than largest uint232).\n     *\n     * Counterpart to Solidity's `uint232` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 232 bits\n     */\n    function toUint232(uint256 value) internal pure returns (uint232) {\n        if (value > type(uint232).max) {\n            revert SafeCastOverflowedUintDowncast(232, value);\n        }\n        return uint232(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint224 from uint256, reverting on\n     * overflow (when the input is greater than largest uint224).\n     *\n     * Counterpart to Solidity's `uint224` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 224 bits\n     */\n    function toUint224(uint256 value) internal pure returns (uint224) {\n        if (value > type(uint224).max) {\n            revert SafeCastOverflowedUintDowncast(224, value);\n        }\n        return uint224(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint216 from uint256, reverting on\n     * overflow (when the input is greater than largest uint216).\n     *\n     * Counterpart to Solidity's `uint216` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 216 bits\n     */\n    function toUint216(uint256 value) internal pure returns (uint216) {\n        if (value > type(uint216).max) {\n            revert SafeCastOverflowedUintDowncast(216, value);\n        }\n        return uint216(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint208 from uint256, reverting on\n     * overflow (when the input is greater than largest uint208).\n     *\n     * Counterpart to Solidity's `uint208` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 208 bits\n     */\n    function toUint208(uint256 value) internal pure returns (uint208) {\n        if (value > type(uint208).max) {\n            revert SafeCastOverflowedUintDowncast(208, value);\n        }\n        return uint208(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint200 from uint256, reverting on\n     * overflow (when the input is greater than largest uint200).\n     *\n     * Counterpart to Solidity's `uint200` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 200 bits\n     */\n    function toUint200(uint256 value) internal pure returns (uint200) {\n        if (value > type(uint200).max) {\n            revert SafeCastOverflowedUintDowncast(200, value);\n        }\n        return uint200(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint192 from uint256, reverting on\n     * overflow (when the input is greater than largest uint192).\n     *\n     * Counterpart to Solidity's `uint192` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 192 bits\n     */\n    function toUint192(uint256 value) internal pure returns (uint192) {\n        if (value > type(uint192).max) {\n            revert SafeCastOverflowedUintDowncast(192, value);\n        }\n        return uint192(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint184 from uint256, reverting on\n     * overflow (when the input is greater than largest uint184).\n     *\n     * Counterpart to Solidity's `uint184` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 184 bits\n     */\n    function toUint184(uint256 value) internal pure returns (uint184) {\n        if (value > type(uint184).max) {\n            revert SafeCastOverflowedUintDowncast(184, value);\n        }\n        return uint184(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint176 from uint256, reverting on\n     * overflow (when the input is greater than largest uint176).\n     *\n     * Counterpart to Solidity's `uint176` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 176 bits\n     */\n    function toUint176(uint256 value) internal pure returns (uint176) {\n        if (value > type(uint176).max) {\n            revert SafeCastOverflowedUintDowncast(176, value);\n        }\n        return uint176(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint168 from uint256, reverting on\n     * overflow (when the input is greater than largest uint168).\n     *\n     * Counterpart to Solidity's `uint168` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 168 bits\n     */\n    function toUint168(uint256 value) internal pure returns (uint168) {\n        if (value > type(uint168).max) {\n            revert SafeCastOverflowedUintDowncast(168, value);\n        }\n        return uint168(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint160 from uint256, reverting on\n     * overflow (when the input is greater than largest uint160).\n     *\n     * Counterpart to Solidity's `uint160` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 160 bits\n     */\n    function toUint160(uint256 value) internal pure returns (uint160) {\n        if (value > type(uint160).max) {\n            revert SafeCastOverflowedUintDowncast(160, value);\n        }\n        return uint160(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint152 from uint256, reverting on\n     * overflow (when the input is greater than largest uint152).\n     *\n     * Counterpart to Solidity's `uint152` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 152 bits\n     */\n    function toUint152(uint256 value) internal pure returns (uint152) {\n        if (value > type(uint152).max) {\n            revert SafeCastOverflowedUintDowncast(152, value);\n        }\n        return uint152(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint144 from uint256, reverting on\n     * overflow (when the input is greater than largest uint144).\n     *\n     * Counterpart to Solidity's `uint144` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 144 bits\n     */\n    function toUint144(uint256 value) internal pure returns (uint144) {\n        if (value > type(uint144).max) {\n            revert SafeCastOverflowedUintDowncast(144, value);\n        }\n        return uint144(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint136 from uint256, reverting on\n     * overflow (when the input is greater than largest uint136).\n     *\n     * Counterpart to Solidity's `uint136` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 136 bits\n     */\n    function toUint136(uint256 value) internal pure returns (uint136) {\n        if (value > type(uint136).max) {\n            revert SafeCastOverflowedUintDowncast(136, value);\n        }\n        return uint136(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint128 from uint256, reverting on\n     * overflow (when the input is greater than largest uint128).\n     *\n     * Counterpart to Solidity's `uint128` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 128 bits\n     */\n    function toUint128(uint256 value) internal pure returns (uint128) {\n        if (value > type(uint128).max) {\n            revert SafeCastOverflowedUintDowncast(128, value);\n        }\n        return uint128(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint120 from uint256, reverting on\n     * overflow (when the input is greater than largest uint120).\n     *\n     * Counterpart to Solidity's `uint120` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 120 bits\n     */\n    function toUint120(uint256 value) internal pure returns (uint120) {\n        if (value > type(uint120).max) {\n            revert SafeCastOverflowedUintDowncast(120, value);\n        }\n        return uint120(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint112 from uint256, reverting on\n     * overflow (when the input is greater than largest uint112).\n     *\n     * Counterpart to Solidity's `uint112` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 112 bits\n     */\n    function toUint112(uint256 value) internal pure returns (uint112) {\n        if (value > type(uint112).max) {\n            revert SafeCastOverflowedUintDowncast(112, value);\n        }\n        return uint112(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint104 from uint256, reverting on\n     * overflow (when the input is greater than largest uint104).\n     *\n     * Counterpart to Solidity's `uint104` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 104 bits\n     */\n    function toUint104(uint256 value) internal pure returns (uint104) {\n        if (value > type(uint104).max) {\n            revert SafeCastOverflowedUintDowncast(104, value);\n        }\n        return uint104(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint96 from uint256, reverting on\n     * overflow (when the input is greater than largest uint96).\n     *\n     * Counterpart to Solidity's `uint96` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 96 bits\n     */\n    function toUint96(uint256 value) internal pure returns (uint96) {\n        if (value > type(uint96).max) {\n            revert SafeCastOverflowedUintDowncast(96, value);\n        }\n        return uint96(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint88 from uint256, reverting on\n     * overflow (when the input is greater than largest uint88).\n     *\n     * Counterpart to Solidity's `uint88` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 88 bits\n     */\n    function toUint88(uint256 value) internal pure returns (uint88) {\n        if (value > type(uint88).max) {\n            revert SafeCastOverflowedUintDowncast(88, value);\n        }\n        return uint88(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint80 from uint256, reverting on\n     * overflow (when the input is greater than largest uint80).\n     *\n     * Counterpart to Solidity's `uint80` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 80 bits\n     */\n    function toUint80(uint256 value) internal pure returns (uint80) {\n        if (value > type(uint80).max) {\n            revert SafeCastOverflowedUintDowncast(80, value);\n        }\n        return uint80(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint72 from uint256, reverting on\n     * overflow (when the input is greater than largest uint72).\n     *\n     * Counterpart to Solidity's `uint72` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 72 bits\n     */\n    function toUint72(uint256 value) internal pure returns (uint72) {\n        if (value > type(uint72).max) {\n            revert SafeCastOverflowedUintDowncast(72, value);\n        }\n        return uint72(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint64 from uint256, reverting on\n     * overflow (when the input is greater than largest uint64).\n     *\n     * Counterpart to Solidity's `uint64` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 64 bits\n     */\n    function toUint64(uint256 value) internal pure returns (uint64) {\n        if (value > type(uint64).max) {\n            revert SafeCastOverflowedUintDowncast(64, value);\n        }\n        return uint64(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint56 from uint256, reverting on\n     * overflow (when the input is greater than largest uint56).\n     *\n     * Counterpart to Solidity's `uint56` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 56 bits\n     */\n    function toUint56(uint256 value) internal pure returns (uint56) {\n        if (value > type(uint56).max) {\n            revert SafeCastOverflowedUintDowncast(56, value);\n        }\n        return uint56(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint48 from uint256, reverting on\n     * overflow (when the input is greater than largest uint48).\n     *\n     * Counterpart to Solidity's `uint48` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 48 bits\n     */\n    function toUint48(uint256 value) internal pure returns (uint48) {\n        if (value > type(uint48).max) {\n            revert SafeCastOverflowedUintDowncast(48, value);\n        }\n        return uint48(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint40 from uint256, reverting on\n     * overflow (when the input is greater than largest uint40).\n     *\n     * Counterpart to Solidity's `uint40` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 40 bits\n     */\n    function toUint40(uint256 value) internal pure returns (uint40) {\n        if (value > type(uint40).max) {\n            revert SafeCastOverflowedUintDowncast(40, value);\n        }\n        return uint40(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint32 from uint256, reverting on\n     * overflow (when the input is greater than largest uint32).\n     *\n     * Counterpart to Solidity's `uint32` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 32 bits\n     */\n    function toUint32(uint256 value) internal pure returns (uint32) {\n        if (value > type(uint32).max) {\n            revert SafeCastOverflowedUintDowncast(32, value);\n        }\n        return uint32(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint24 from uint256, reverting on\n     * overflow (when the input is greater than largest uint24).\n     *\n     * Counterpart to Solidity's `uint24` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 24 bits\n     */\n    function toUint24(uint256 value) internal pure returns (uint24) {\n        if (value > type(uint24).max) {\n            revert SafeCastOverflowedUintDowncast(24, value);\n        }\n        return uint24(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint16 from uint256, reverting on\n     * overflow (when the input is greater than largest uint16).\n     *\n     * Counterpart to Solidity's `uint16` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 16 bits\n     */\n    function toUint16(uint256 value) internal pure returns (uint16) {\n        if (value > type(uint16).max) {\n            revert SafeCastOverflowedUintDowncast(16, value);\n        }\n        return uint16(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint8 from uint256, reverting on\n     * overflow (when the input is greater than largest uint8).\n     *\n     * Counterpart to Solidity's `uint8` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 8 bits\n     */\n    function toUint8(uint256 value) internal pure returns (uint8) {\n        if (value > type(uint8).max) {\n            revert SafeCastOverflowedUintDowncast(8, value);\n        }\n        return uint8(value);\n    }\n\n    /**\n     * @dev Converts a signed int256 into an unsigned uint256.\n     *\n     * Requirements:\n     *\n     * - input must be greater than or equal to 0.\n     */\n    function toUint256(int256 value) internal pure returns (uint256) {\n        if (value < 0) {\n            revert SafeCastOverflowedIntToUint(value);\n        }\n        return uint256(value);\n    }\n\n    /**\n     * @dev Returns the downcasted int248 from int256, reverting on\n     * overflow (when the input is less than smallest int248 or\n     * greater than largest int248).\n     *\n     * Counterpart to Solidity's `int248` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 248 bits\n     */\n    function toInt248(int256 value) internal pure returns (int248 downcasted) {\n        downcasted = int248(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(248, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int240 from int256, reverting on\n     * overflow (when the input is less than smallest int240 or\n     * greater than largest int240).\n     *\n     * Counterpart to Solidity's `int240` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 240 bits\n     */\n    function toInt240(int256 value) internal pure returns (int240 downcasted) {\n        downcasted = int240(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(240, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int232 from int256, reverting on\n     * overflow (when the input is less than smallest int232 or\n     * greater than largest int232).\n     *\n     * Counterpart to Solidity's `int232` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 232 bits\n     */\n    function toInt232(int256 value) internal pure returns (int232 downcasted) {\n        downcasted = int232(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(232, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int224 from int256, reverting on\n     * overflow (when the input is less than smallest int224 or\n     * greater than largest int224).\n     *\n     * Counterpart to Solidity's `int224` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 224 bits\n     */\n    function toInt224(int256 value) internal pure returns (int224 downcasted) {\n        downcasted = int224(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(224, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int216 from int256, reverting on\n     * overflow (when the input is less than smallest int216 or\n     * greater than largest int216).\n     *\n     * Counterpart to Solidity's `int216` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 216 bits\n     */\n    function toInt216(int256 value) internal pure returns (int216 downcasted) {\n        downcasted = int216(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(216, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int208 from int256, reverting on\n     * overflow (when the input is less than smallest int208 or\n     * greater than largest int208).\n     *\n     * Counterpart to Solidity's `int208` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 208 bits\n     */\n    function toInt208(int256 value) internal pure returns (int208 downcasted) {\n        downcasted = int208(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(208, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int200 from int256, reverting on\n     * overflow (when the input is less than smallest int200 or\n     * greater than largest int200).\n     *\n     * Counterpart to Solidity's `int200` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 200 bits\n     */\n    function toInt200(int256 value) internal pure returns (int200 downcasted) {\n        downcasted = int200(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(200, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int192 from int256, reverting on\n     * overflow (when the input is less than smallest int192 or\n     * greater than largest int192).\n     *\n     * Counterpart to Solidity's `int192` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 192 bits\n     */\n    function toInt192(int256 value) internal pure returns (int192 downcasted) {\n        downcasted = int192(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(192, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int184 from int256, reverting on\n     * overflow (when the input is less than smallest int184 or\n     * greater than largest int184).\n     *\n     * Counterpart to Solidity's `int184` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 184 bits\n     */\n    function toInt184(int256 value) internal pure returns (int184 downcasted) {\n        downcasted = int184(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(184, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int176 from int256, reverting on\n     * overflow (when the input is less than smallest int176 or\n     * greater than largest int176).\n     *\n     * Counterpart to Solidity's `int176` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 176 bits\n     */\n    function toInt176(int256 value) internal pure returns (int176 downcasted) {\n        downcasted = int176(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(176, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int168 from int256, reverting on\n     * overflow (when the input is less than smallest int168 or\n     * greater than largest int168).\n     *\n     * Counterpart to Solidity's `int168` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 168 bits\n     */\n    function toInt168(int256 value) internal pure returns (int168 downcasted) {\n        downcasted = int168(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(168, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int160 from int256, reverting on\n     * overflow (when the input is less than smallest int160 or\n     * greater than largest int160).\n     *\n     * Counterpart to Solidity's `int160` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 160 bits\n     */\n    function toInt160(int256 value) internal pure returns (int160 downcasted) {\n        downcasted = int160(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(160, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int152 from int256, reverting on\n     * overflow (when the input is less than smallest int152 or\n     * greater than largest int152).\n     *\n     * Counterpart to Solidity's `int152` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 152 bits\n     */\n    function toInt152(int256 value) internal pure returns (int152 downcasted) {\n        downcasted = int152(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(152, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int144 from int256, reverting on\n     * overflow (when the input is less than smallest int144 or\n     * greater than largest int144).\n     *\n     * Counterpart to Solidity's `int144` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 144 bits\n     */\n    function toInt144(int256 value) internal pure returns (int144 downcasted) {\n        downcasted = int144(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(144, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int136 from int256, reverting on\n     * overflow (when the input is less than smallest int136 or\n     * greater than largest int136).\n     *\n     * Counterpart to Solidity's `int136` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 136 bits\n     */\n    function toInt136(int256 value) internal pure returns (int136 downcasted) {\n        downcasted = int136(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(136, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int128 from int256, reverting on\n     * overflow (when the input is less than smallest int128 or\n     * greater than largest int128).\n     *\n     * Counterpart to Solidity's `int128` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 128 bits\n     */\n    function toInt128(int256 value) internal pure returns (int128 downcasted) {\n        downcasted = int128(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(128, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int120 from int256, reverting on\n     * overflow (when the input is less than smallest int120 or\n     * greater than largest int120).\n     *\n     * Counterpart to Solidity's `int120` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 120 bits\n     */\n    function toInt120(int256 value) internal pure returns (int120 downcasted) {\n        downcasted = int120(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(120, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int112 from int256, reverting on\n     * overflow (when the input is less than smallest int112 or\n     * greater than largest int112).\n     *\n     * Counterpart to Solidity's `int112` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 112 bits\n     */\n    function toInt112(int256 value) internal pure returns (int112 downcasted) {\n        downcasted = int112(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(112, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int104 from int256, reverting on\n     * overflow (when the input is less than smallest int104 or\n     * greater than largest int104).\n     *\n     * Counterpart to Solidity's `int104` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 104 bits\n     */\n    function toInt104(int256 value) internal pure returns (int104 downcasted) {\n        downcasted = int104(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(104, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int96 from int256, reverting on\n     * overflow (when the input is less than smallest int96 or\n     * greater than largest int96).\n     *\n     * Counterpart to Solidity's `int96` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 96 bits\n     */\n    function toInt96(int256 value) internal pure returns (int96 downcasted) {\n        downcasted = int96(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(96, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int88 from int256, reverting on\n     * overflow (when the input is less than smallest int88 or\n     * greater than largest int88).\n     *\n     * Counterpart to Solidity's `int88` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 88 bits\n     */\n    function toInt88(int256 value) internal pure returns (int88 downcasted) {\n        downcasted = int88(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(88, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int80 from int256, reverting on\n     * overflow (when the input is less than smallest int80 or\n     * greater than largest int80).\n     *\n     * Counterpart to Solidity's `int80` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 80 bits\n     */\n    function toInt80(int256 value) internal pure returns (int80 downcasted) {\n        downcasted = int80(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(80, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int72 from int256, reverting on\n     * overflow (when the input is less than smallest int72 or\n     * greater than largest int72).\n     *\n     * Counterpart to Solidity's `int72` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 72 bits\n     */\n    function toInt72(int256 value) internal pure returns (int72 downcasted) {\n        downcasted = int72(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(72, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int64 from int256, reverting on\n     * overflow (when the input is less than smallest int64 or\n     * greater than largest int64).\n     *\n     * Counterpart to Solidity's `int64` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 64 bits\n     */\n    function toInt64(int256 value) internal pure returns (int64 downcasted) {\n        downcasted = int64(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(64, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int56 from int256, reverting on\n     * overflow (when the input is less than smallest int56 or\n     * greater than largest int56).\n     *\n     * Counterpart to Solidity's `int56` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 56 bits\n     */\n    function toInt56(int256 value) internal pure returns (int56 downcasted) {\n        downcasted = int56(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(56, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int48 from int256, reverting on\n     * overflow (when the input is less than smallest int48 or\n     * greater than largest int48).\n     *\n     * Counterpart to Solidity's `int48` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 48 bits\n     */\n    function toInt48(int256 value) internal pure returns (int48 downcasted) {\n        downcasted = int48(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(48, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int40 from int256, reverting on\n     * overflow (when the input is less than smallest int40 or\n     * greater than largest int40).\n     *\n     * Counterpart to Solidity's `int40` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 40 bits\n     */\n    function toInt40(int256 value) internal pure returns (int40 downcasted) {\n        downcasted = int40(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(40, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int32 from int256, reverting on\n     * overflow (when the input is less than smallest int32 or\n     * greater than largest int32).\n     *\n     * Counterpart to Solidity's `int32` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 32 bits\n     */\n    function toInt32(int256 value) internal pure returns (int32 downcasted) {\n        downcasted = int32(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(32, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int24 from int256, reverting on\n     * overflow (when the input is less than smallest int24 or\n     * greater than largest int24).\n     *\n     * Counterpart to Solidity's `int24` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 24 bits\n     */\n    function toInt24(int256 value) internal pure returns (int24 downcasted) {\n        downcasted = int24(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(24, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int16 from int256, reverting on\n     * overflow (when the input is less than smallest int16 or\n     * greater than largest int16).\n     *\n     * Counterpart to Solidity's `int16` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 16 bits\n     */\n    function toInt16(int256 value) internal pure returns (int16 downcasted) {\n        downcasted = int16(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(16, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int8 from int256, reverting on\n     * overflow (when the input is less than smallest int8 or\n     * greater than largest int8).\n     *\n     * Counterpart to Solidity's `int8` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 8 bits\n     */\n    function toInt8(int256 value) internal pure returns (int8 downcasted) {\n        downcasted = int8(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(8, value);\n        }\n    }\n\n    /**\n     * @dev Converts an unsigned uint256 into a signed int256.\n     *\n     * Requirements:\n     *\n     * - input must be less than or equal to maxInt256.\n     */\n    function toInt256(uint256 value) internal pure returns (int256) {\n        // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive\n        if (value > uint256(type(int256).max)) {\n            revert SafeCastOverflowedUintToInt(value);\n        }\n        return int256(value);\n    }\n\n    /**\n     * @dev Cast a boolean (false or true) to a uint256 (0 or 1) with no jump.\n     */\n    function toUint(bool b) internal pure returns (uint256 u) {\n        assembly (\"memory-safe\") {\n            u := iszero(iszero(b))\n        }\n    }\n}\n"},"@openzeppelin/contracts/utils/Panic.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/Panic.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Helper library for emitting standardized panic codes.\n *\n * ```solidity\n * contract Example {\n *      using Panic for uint256;\n *\n *      // Use any of the declared internal constants\n *      function foo() { Panic.GENERIC.panic(); }\n *\n *      // Alternatively\n *      function foo() { Panic.panic(Panic.GENERIC); }\n * }\n * ```\n *\n * Follows the list from https://github.com/ethereum/solidity/blob/v0.8.24/libsolutil/ErrorCodes.h[libsolutil].\n *\n * _Available since v5.1._\n */\n// slither-disable-next-line unused-state\nlibrary Panic {\n    /// @dev generic / unspecified error\n    uint256 internal constant GENERIC = 0x00;\n    /// @dev used by the assert() builtin\n    uint256 internal constant ASSERT = 0x01;\n    /// @dev arithmetic underflow or overflow\n    uint256 internal constant UNDER_OVERFLOW = 0x11;\n    /// @dev division or modulo by zero\n    uint256 internal constant DIVISION_BY_ZERO = 0x12;\n    /// @dev enum conversion error\n    uint256 internal constant ENUM_CONVERSION_ERROR = 0x21;\n    /// @dev invalid encoding in storage\n    uint256 internal constant STORAGE_ENCODING_ERROR = 0x22;\n    /// @dev empty array pop\n    uint256 internal constant EMPTY_ARRAY_POP = 0x31;\n    /// @dev array out of bounds access\n    uint256 internal constant ARRAY_OUT_OF_BOUNDS = 0x32;\n    /// @dev resource error (too large allocation or too large array)\n    uint256 internal constant RESOURCE_ERROR = 0x41;\n    /// @dev calling invalid internal function\n    uint256 internal constant INVALID_INTERNAL_FUNCTION = 0x51;\n\n    /// @dev Reverts with a panic code. Recommended to use with\n    /// the internal constants with predefined codes.\n    function panic(uint256 code) internal pure {\n        assembly (\"memory-safe\") {\n            mstore(0x00, 0x4e487b71)\n            mstore(0x20, code)\n            revert(0x1c, 0x24)\n        }\n    }\n}\n"},"src/interfaces/internals/ICommonStruct.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.24;\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\n\nstruct TokenAmount {\n    IERC20 token;\n    uint256 amount;\n}\nstruct ZapStruct {\n    address router;\n    bytes routerCall;\n}\nstruct ZapStructDeposit {\n    IERC20 tokenIn;\n    uint256 amountIn;\n    uint256 minAmountOut;\n    ZapStruct zap;\n}\n\nstruct ZapStructDepositNoMinAmount {\n    IERC20 tokenIn;\n    uint256 amountIn;\n    ZapStruct zap;\n}\n"},"src/interfaces/internals/USG/ICollateral.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.24;\n\nimport {IERC20, IERC20Metadata} from \"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\";\n\nimport {IDebtIR} from \"./IDebtIR.sol\";\nimport {IRewardAccumulator} from \"./IRewardAccumulator.sol\";\nimport {IPriceOracle} from \"./IPriceOracle.sol\";\n\ninterface ICollateral {\n    function collatOracle() external view returns (IPriceOracle);\n\n    function collatToken() external view returns (IERC20Metadata);\n\n    function collatDecimals() external view returns (uint256);\n\n    function collateralBalances(address account) external view returns (uint256);\n\n    function totalCollateral() external view returns (uint256);\n\n    function maxLTV() external view returns (uint256);\n\n    function liquidationThreshold() external view returns (uint256);\n\n    function rewardAccumulator() external view returns (IRewardAccumulator);\n\n    function getBalanceAndTotalCollateral(address account) external view returns (uint256, uint256);\n}\n"},"src/interfaces/internals/USG/IDebtIR.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.24;\n\nimport {IIRCalculator} from \"./IIRCalculator.sol\";\n\ninterface IDebtIR {\n    function maxMarketDebt() external view returns (uint256);\n    function irCalculator() external view returns (IIRCalculator);\n    function minimumLoan() external view returns (uint256);\n    function userDebtShares(address user) external view returns (uint256);\n    function totalDebtShares() external view returns (uint256);\n    function badDebt() external view returns (uint256);\n}\n"},"src/interfaces/internals/USG/IIRCalculator.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.24;\n\nstruct IRParams {\n    /// @dev Flag to determine if a Market is HEC or LEC\n    bool isHEC;\n    /// @dev Minimum IR reached at pMax.\n    ///      1_000 <=> 1% / 100_000 <=> 100%.\n    uint24 rMin;\n    /// @dev Maximum IR reached at pMin.\n    ///      1_000 <=> 1% / 100_000 <=> 100%.\n    uint32 rMax;\n    /// @dev Minimum price of USG where rMax is reached.\n    ///      980_000 <=> 0.98$ / 1_000_000 <=> 1$\n    uint32 pMin;\n    /// @dev Inflexion price of USG where IR starts to increases more significantly.\n    ///      980_000 <=> 0.98$ / 1_000_000 <=> 1$\n    uint32 pInf;\n    /// @dev Maximum price of USG where IR increases more significantly.\n    ///      980_000 <=> 0.98$ / 1_000_000 <=> 1$\n    uint32 pMax;\n    /// @dev Convexity of the curve before pInf\n    ///      2_000 <=> 2 / 4_500 <=> 4.5\n    uint32 a1;\n    /// @dev Convexity of the curve after pInf\n    ///      2_000 <=> 2 / 4_500 <=> 4.5\n    uint32 a2;\n    /// @dev Velocity of the transition between a1 and a2\n    ///      It's an integer. 250 <=> 250\n    uint32 k;\n}\n\nstruct IRCheckpoint {\n    uint216 ir;\n    uint40 timestamp;\n}\ninterface IIRCalculator {\n    function initializeMarket(address market, IRParams calldata _irParam) external;\n\n    function simulateIR(uint256 USGPrice, IRParams memory irParam) external view returns (uint256);\n\n    function computeIRForMarket(address market) external returns (uint256);\n\n    function checkpointIR(address market) external returns (uint256);\n\n    function newDebtIndex(address market) external view returns (uint256);\n\n    function irCheckpoints(address market) external view returns (uint216, uint40);\n\n    function debtIndexes(address market) external view returns (uint256);\n\n    function indexDelta(address market) external view returns (uint256);\n\n    function mintableInterests() external view returns (uint256);\n\n    function getIRParams(address market) external view returns (IRParams memory);\n\n    function getIRCheckpoint(address market) external view returns (IRCheckpoint memory);\n}\n"},"src/interfaces/internals/USG/IMarketViewer.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.24;\n\nimport {ICollateral} from \"./ICollateral.sol\";\nimport {IDebtIR} from \"./IDebtIR.sol\";\ninterface IMarketViewer {\n    function totalDebt(IDebtIR market) external view returns (uint256);\n    function pendingInterests(IDebtIR user) external view returns (uint256);\n\n    function userDebt(IDebtIR market, address user) external view returns (uint256);\n    function positionValue(ICollateral market, address user) external view returns (uint256);\n    function maxBorrowable(ICollateral market, address user) external view returns (uint256);\n    function healthRatio(address market, address user) external view returns (uint256);\n}\n"},"src/interfaces/internals/USG/IPriceOracle.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.24;\n\ninterface IPriceOracle {\n    function latestAnswer(bool isNoFailMode) external view returns (uint256);\n\n    function latestAnswerUpdate(bool isNoFailMode) external returns (uint256);\n\n    function decimals() external view returns (uint8);\n}\n"},"src/interfaces/internals/USG/IRewardAccumulator.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.24;\n\nimport {TokenAmount, IERC20} from \"../ICommonStruct.sol\";\n\nstruct Reward {\n    uint128 lastUpdateTime;\n    uint128 periodFinish;\n    uint256 rewardRate;\n    uint256 rewardPerTokenStored;\n}\nstruct RCParams {\n    uint16 harvestFeePercentage;\n    /// @dev Amount of distincts reward cut steps.\n    uint16 stepAmount;\n    /// @dev Percentage minimum of the reward cut.\n    uint32 startCutPercentage;\n    /// @dev Percentage maximum of the reward cut.\n    uint32 endCutPercentage;\n    /// @dev Price of USG on which the reward cut starts to increase.\n    uint80 startCutPrice;\n    /// @dev Price of USG on which the reward cut is at its maximum\n    uint80 endCutPrice;\n}\ninterface IRewardAccumulator {\n    function cutFeeForToken(IERC20 token) external view returns (uint256);\n\n    function getRewardData(address market, IERC20 token) external view returns (Reward memory);\n\n    function updateRewards(address account, uint256 collateralBalances, uint256 totalCollateral) external;\n\n    function processRewards(address market, address harvestFeeReceiver) external;\n\n    function getRewardTokens(address markets) external view returns (IERC20[] memory);\n\n    function lastRewardCuts(address market) external view returns (uint256);\n\n    function claimableRewards(address market, address _account) external view returns (TokenAmount[] memory userRewards);\n\n    function simulateRC(uint256 USGPrice, RCParams calldata rcParams) external pure returns (uint256);\n\n    function computeRCForMarket(address market) external returns (uint256);\n\n    function initializeMarket(address market, IERC20[] calldata rewardTokens, RCParams calldata _rcParams) external;\n\n    function getRCParams(address markets) external view returns (RCParams memory);\n}\n"},"src/USG/Utilities/MarketViewer.sol":{"content":"// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.22;\n\nimport {Math} from \"@openzeppelin/contracts/utils/math/Math.sol\";\n\nimport {IMarketViewer} from \"../../interfaces/internals/USG/IMarketViewer.sol\";\nimport {ICollateral} from \"../../interfaces/internals/USG/ICollateral.sol\";\nimport {IDebtIR} from \"../../interfaces/internals/USG/IDebtIR.sol\";\n\n/// @title  MarketViewer\n/// @author Tangent Finance\n/// @notice Computes and return all information related to markets\ncontract MarketViewer is IMarketViewer {\n    uint256 constant RAY = 1e27;\n    uint256 constant MAX_UINT = uint256(int256(-1));\n\n    /**\n     * @notice Returns the current total debt in USG of a `market` (including interest)\n     * @dev    Applies the interest index to total debt shares and adds bad debt\n     * @param market Address of the market\n     * @return totalDebt Debt total of the market in USG\n     */\n    function totalDebt(IDebtIR market) external view returns (uint256) {\n        return market.badDebt() + _convertToAmount(market.totalDebtShares(), market.irCalculator().newDebtIndex(address(market)), Math.Rounding.Ceil);\n    }\n\n    /**\n     * @notice Returns the debt of an user (including accrued interest)\n     * @dev Applies current debt index to user's stored shares\n     * @param market  Address of the market where the position is\n     * @param account Address holding the debt position\n     * @return userDebt Debt of the user in USG\n     */\n    function userDebt(IDebtIR market, address account) public view returns (uint256) {\n        return _convertToAmount(market.userDebtShares(account), market.irCalculator().newDebtIndex(address(market)), Math.Rounding.Ceil);\n    }\n\n    /**\n     * @notice Computes a user's health ratio (safety of collateral vs debt)\n     *         Higher is safer. When HR < 1, position becomes liquidable.\n     * @param market  Address of the market where the position is.\n     * @param account Address holding the collateral position.\n     * @return healthRatio  Health Ratio of a position (1e18 base).\n     */\n    function healthRatio(address market, address account) external view returns (uint256) {\n        uint256 _userDebt = userDebt(IDebtIR(market), account);\n        if (_userDebt != 0) {\n            ICollateral marketCollat = ICollateral(market);\n            // We fetch the price of the collateral\n            uint256 collatPrice = marketCollat.collatOracle().latestAnswer(true);\n\n            // We compute the health ratio following this formula :\n            //      healthRatio = collatValue * liquidationThreshold / userDebt\n            return\n                (marketCollat.collateralBalances(account) * 10 ** (18 - marketCollat.collatDecimals()) * collatPrice * marketCollat.liquidationThreshold()) / (_userDebt * 100_000);\n        }\n        return MAX_UINT; // Fully healthy if no debt\n    }\n\n    /**\n     * @notice Returns the USD value of the user's collateral\n     * @param market  Address of the market where the position is.\n     * @param account Address holding the collateral position.\n     * @return positionValue Value in USD of the position (1e18 precision)\n     */\n    function positionValue(ICollateral market, address account) external view returns (uint256) {\n        return (market.collateralBalances(account) * market.collatOracle().latestAnswer(true)) / 10 ** market.collatDecimals();\n    }\n\n    /**\n     * @notice Returns the maximum amount of USG a user can borrow based on his collateral amount and LTV of the market\n     * @param market  Address of the market where the position is.\n     * @param account Address holding the collateral position.\n     * @return maxBorrowable Max borrowable in USG of an account\n     */\n    function maxBorrowable(ICollateral market, address account) external view returns (uint256) {\n        return (market.maxLTV() * _positionValue(market, account)) / 100_000;\n    }\n\n    /**\n     * @notice Calculates the interest accumulated since last checkpoint of a market\n     * @param market  Address of the market.\n     * @return pendingInterests Amount in USG accrued since last checkpoint.\n     */\n    function pendingInterests(IDebtIR market) external view returns (uint256) {\n        return _convertToAmount(market.totalDebtShares(), market.irCalculator().indexDelta(address(market)), Math.Rounding.Floor);\n    }\n\n    function _positionValue(ICollateral market, address account) internal view returns (uint256) {\n        return (market.collateralBalances(account) * market.collatOracle().latestAnswer(true)) / 10 ** market.collatDecimals();\n    }\n\n    /**\n     * @dev   Convert a debt shares to a debt amount\n     * @param debtShares  Debt shares\n     * @param index       Debt index of the market\n     * @return Debt amount\n     */\n    function _convertToAmount(uint256 debtShares, uint256 index, Math.Rounding roundingType) internal pure returns (uint256) {\n        return Math.mulDiv(debtShares, index, RAY, roundingType);\n    }\n}\n"}},"compilation":{"language":"Solidity","compiler":"solc","compilerVersion":"0.8.28+commit.7893614a","compilerSettings":{"optimizer":{"runs":1000000,"enabled":true},"evmVersion":"cancun"},"name":"MarketViewer","fullyQualifiedName":"src/USG/Utilities/MarketViewer.sol:MarketViewer"},"abi":[{"name":"healthRatio","type":"function","inputs":[{"name":"market","type":"address","internalType":"address"},{"name":"account","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"maxBorrowable","type":"function","inputs":[{"name":"market","type":"address","internalType":"contract ICollateral"},{"name":"account","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"pendingInterests","type":"function","inputs":[{"name":"market","type":"address","internalType":"contract IDebtIR"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"positionValue","type":"function","inputs":[{"name":"market","type":"address","internalType":"contract ICollateral"},{"name":"account","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"totalDebt","type":"function","inputs":[{"name":"market","type":"address","internalType":"contract IDebtIR"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"userDebt","type":"function","inputs":[{"name":"market","type":"address","internalType":"contract IDebtIR"},{"name":"account","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"}],"metadata":{"compiler":{"version":"0.8.28+commit.7893614a"},"language":"Solidity","output":{"abi":[{"inputs":[{"internalType":"address","name":"market","type":"address"},{"internalType":"address","name":"account","type":"address"}],"name":"healthRatio","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract ICollateral","name":"market","type":"address"},{"internalType":"address","name":"account","type":"address"}],"name":"maxBorrowable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IDebtIR","name":"market","type":"address"}],"name":"pendingInterests","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract ICollateral","name":"market","type":"address"},{"internalType":"address","name":"account","type":"address"}],"name":"positionValue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IDebtIR","name":"market","type":"address"}],"name":"totalDebt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IDebtIR","name":"market","type":"address"},{"internalType":"address","name":"account","type":"address"}],"name":"userDebt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}],"devdoc":{"author":"Tangent Finance","kind":"dev","methods":{"healthRatio(address,address)":{"params":{"account":"Address holding the collateral position.","market":"Address of the market where the position is."},"returns":{"_0":"healthRatio  Health Ratio of a position (1e18 base)."}},"maxBorrowable(address,address)":{"params":{"account":"Address holding the collateral position.","market":"Address of the market where the position is."},"returns":{"_0":"maxBorrowable Max borrowable in USG of an account"}},"pendingInterests(address)":{"params":{"market":"Address of the market."},"returns":{"_0":"pendingInterests Amount in USG accrued since last checkpoint."}},"positionValue(address,address)":{"params":{"account":"Address holding the collateral position.","market":"Address of the market where the position is."},"returns":{"_0":"positionValue Value in USD of the position (1e18 precision)"}},"totalDebt(address)":{"details":"Applies the interest index to total debt shares and adds bad debt","params":{"market":"Address of the market"},"returns":{"_0":"totalDebt Debt total of the market in USG"}},"userDebt(address,address)":{"details":"Applies current debt index to user's stored shares","params":{"account":"Address holding the debt position","market":"Address of the market where the position is"},"returns":{"_0":"userDebt Debt of the user in USG"}}},"title":"MarketViewer","version":1},"userdoc":{"kind":"user","methods":{"healthRatio(address,address)":{"notice":"Computes a user's health ratio (safety of collateral vs debt)         Higher is safer. When HR < 1, position becomes liquidable."},"maxBorrowable(address,address)":{"notice":"Returns the maximum amount of USG a user can borrow based on his collateral amount and LTV of the market"},"pendingInterests(address)":{"notice":"Calculates the interest accumulated since last checkpoint of a market"},"positionValue(address,address)":{"notice":"Returns the USD value of the user's collateral"},"totalDebt(address)":{"notice":"Returns the current total debt in USG of a `market` (including interest)"},"userDebt(address,address)":{"notice":"Returns the debt of an user (including accrued interest)"}},"notice":"Computes and return all information related to markets","version":1}},"settings":{"compilationTarget":{"src/USG/Utilities/MarketViewer.sol":"MarketViewer"},"evmVersion":"cancun","libraries":{},"metadata":{"bytecodeHash":"ipfs"},"optimizer":{"enabled":true,"runs":1000000},"remappings":[]},"sources":{"@openzeppelin/contracts/token/ERC20/IERC20.sol":{"keccak256":"0xe06a3f08a987af6ad2e1c1e774405d4fe08f1694b67517438b467cecf0da0ef7","license":"MIT","urls":["bzz-raw://df6f0c459663c9858b6cba2cda1d14a7d05a985bed6d2de72bd8e78c25ee79db","dweb:/ipfs/QmeTTxZ7qVk9rjEv2R4CpCwdf8UMCcRqDNMvzNxHc3Fnn9"]},"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol":{"keccak256":"0x70f2f713b13b7ce4610bcd0ac9fec0f3cc43693b043abcb8dc40a42a726eb330","license":"MIT","urls":["bzz-raw://c13d13304ac79a83ab1c30168967d19e2203342ebbd6a9bbce4db7550522dcbf","dweb:/ipfs/QmeN5jKMN2vw5bhacr6tkg78afbTTZUeaacNHqjWt4Ew1r"]},"@openzeppelin/contracts/utils/Panic.sol":{"keccak256":"0xf7fe324703a64fc51702311dc51562d5cb1497734f074e4f483bfb6717572d7a","license":"MIT","urls":["bzz-raw://c6a5ff4f9fd8649b7ee20800b7fa387d3465bd77cf20c2d1068cd5c98e1ed57a","dweb:/ipfs/QmVSaVJf9FXFhdYEYeCEfjMVHrxDh5qL4CGkxdMWpQCrqG"]},"@openzeppelin/contracts/utils/math/Math.sol":{"keccak256":"0xa00be322d7db5786750ce0ac7e2f5b633ac30a5ed5fa1ced1e74acfc19acecea","license":"MIT","urls":["bzz-raw://6c84e822f87cbdc4082533b626667b6928715bb2b1e8e7eb96954cebb9e38c8d","dweb:/ipfs/QmZmy9dgxLTerBAQDuuHqbL6EpgRxddqgv5KmwpXYVbKz1"]},"@openzeppelin/contracts/utils/math/SafeCast.sol":{"keccak256":"0x195533c86d0ef72bcc06456a4f66a9b941f38eb403739b00f21fd7c1abd1ae54","license":"MIT","urls":["bzz-raw://b1d578337048cad08c1c03041cca5978eff5428aa130c781b271ad9e5566e1f8","dweb:/ipfs/QmPFKL2r9CBsMwmUqqdcFPfHZB2qcs9g1HDrPxzWSxomvy"]},"src/USG/Utilities/MarketViewer.sol":{"keccak256":"0x522400c1480ea3381afa83b7a16ae2cb747eb437a13a3f290571aa8d058c0a91","license":"UNLICENSED","urls":["bzz-raw://239d9f5cef44a09fcc083dddeceee0334e1965f15a9638c810aabc93c3604a75","dweb:/ipfs/QmTQyqGFCDL6K6aoXK4D1jndenacFCsNCfFjCW1gJyvrQn"]},"src/interfaces/internals/ICommonStruct.sol":{"keccak256":"0xe66889d5bf49a2f13723f5f1ff3f365b925ecd7d0dc387994cb0a9f0842aeede","license":"MIT","urls":["bzz-raw://94689e9878196025dc72cd58cdf9c97deb7ab79740d557ae44e0883e66d080ac","dweb:/ipfs/QmVceqC6CRy3tYLoQJsFoZritH2QiRC4dSVgXuXRb7X4hC"]},"src/interfaces/internals/USG/ICollateral.sol":{"keccak256":"0x9c1a059c6ae1bbc0c305419462be6f0655b517b12d2528a035d8dff2444cae53","license":"MIT","urls":["bzz-raw://46445e314d7b35cfc71b9b31d0e8a89fc807d1eee1be87ab88925a530ae16700","dweb:/ipfs/QmS4fkVszW4euaqqYqDbcEr1cbKbYA885Lcw38dEPozGKY"]},"src/interfaces/internals/USG/IDebtIR.sol":{"keccak256":"0xf1b17238a3c8a96ce1ad44f5e772016a7a35722f7a76bb4f552516f949295943","license":"MIT","urls":["bzz-raw://e556853a4f5be1dd697de721a258e0183c5c6cb691eafbfc461884dca2b17026","dweb:/ipfs/QmXhbrRBFTpYKKBR9GiLQuL5n1c9hedZkfAC1W5RNRfJch"]},"src/interfaces/internals/USG/IIRCalculator.sol":{"keccak256":"0xec390b63b76bfdbf7165e66d652210b6774427d6cce7a38346babd016dc6c275","license":"MIT","urls":["bzz-raw://b83dfe894d175e626c4f6004f841b3817603e83bc08439ce6da9e94fdfe89efb","dweb:/ipfs/Qme99R42frMKaizYzo36FFLmWnNRiywnD8n6GsrEbaK6LK"]},"src/interfaces/internals/USG/IMarketViewer.sol":{"keccak256":"0xd8fca13132073524fe35da7ad2bba3794b5a25623cea34205bfcac556cb34a17","license":"MIT","urls":["bzz-raw://c23c1c05875097ebe9123a9257874a5de200d18e998c44bd91619aa2774d7d0a","dweb:/ipfs/QmdW58cNgTQUnTpMdjSLzhWFK1hM2A3jWXvoGz1oCXV3jj"]},"src/interfaces/internals/USG/IPriceOracle.sol":{"keccak256":"0x1d696fafdc5f4d3a3eba8249ba885d76061d2767a1891f0fb27b88ffadcb091c","license":"MIT","urls":["bzz-raw://2d098310848e34010993e80e23276d50a2ce7bed605d7cf6835b5953b62147d7","dweb:/ipfs/Qmak9vsPkcLhSLGVDbb3Lvna72tNPvUVFZ3QrhCjuqCAgw"]},"src/interfaces/internals/USG/IRewardAccumulator.sol":{"keccak256":"0xd68ae48cf25d77fc53ee202c3e32fa2437d8f57de62bdfcad1eda8e997c09e0c","license":"MIT","urls":["bzz-raw://07632ade2c266a7d7b70177672e5d5acacae551e1298b356303a54a668fbb111","dweb:/ipfs/QmRT6sRbwo1amdxcGJdqhnCcoU5nNvFbv6msxBcpFfEieB"]}},"version":1},"storageLayout":{"types":null,"storage":[]},"transientStorageLayout":{"types":null,"storage":[]},"userdoc":{"kind":"user","notice":"Computes and return all information related to markets","methods":{"totalDebt(address)":{"notice":"Returns the current total debt in USG of a `market` (including interest)"},"pendingInterests(address)":{"notice":"Calculates the interest accumulated since last checkpoint of a market"},"userDebt(address,address)":{"notice":"Returns the debt of an user (including accrued interest)"},"healthRatio(address,address)":{"notice":"Computes a user's health ratio (safety of collateral vs debt)         Higher is safer. When HR < 1, position becomes liquidable."},"maxBorrowable(address,address)":{"notice":"Returns the maximum amount of USG a user can borrow based on his collateral amount and LTV of the market"},"positionValue(address,address)":{"notice":"Returns the USD value of the user's collateral"}},"version":1},"devdoc":{"kind":"dev","title":"MarketViewer","author":"Tangent Finance","methods":{"totalDebt(address)":{"params":{"market":"Address of the market"},"details":"Applies the interest index to total debt shares and adds bad debt","returns":{"_0":"totalDebt Debt total of the market in USG"}},"pendingInterests(address)":{"params":{"market":"Address of the market."},"returns":{"_0":"pendingInterests Amount in USG accrued since last checkpoint."}},"userDebt(address,address)":{"params":{"market":"Address of the market where the position is","account":"Address holding the debt position"},"details":"Applies current debt index to user's stored shares","returns":{"_0":"userDebt Debt of the user in USG"}},"healthRatio(address,address)":{"params":{"market":"Address of the market where the position is.","account":"Address holding the collateral position."},"returns":{"_0":"healthRatio  Health Ratio of a position (1e18 base)."}},"maxBorrowable(address,address)":{"params":{"market":"Address of the market where the position is.","account":"Address holding the collateral position."},"returns":{"_0":"maxBorrowable Max borrowable in USG of an account"}},"positionValue(address,address)":{"params":{"market":"Address of the market where the position is.","account":"Address holding the collateral position."},"returns":{"_0":"positionValue Value in USD of the position (1e18 precision)"}}},"version":1},"sourceIds":{"src/USG/Utilities/MarketViewer.sol":{"id":5},"@openzeppelin/contracts/utils/Panic.sol":{"id":2},"src/interfaces/internals/USG/IDebtIR.sol":{"id":8},"src/interfaces/internals/ICommonStruct.sol":{"id":6},"@openzeppelin/contracts/utils/math/Math.sol":{"id":3},"src/interfaces/internals/USG/ICollateral.sol":{"id":7},"src/interfaces/internals/USG/IPriceOracle.sol":{"id":11},"@openzeppelin/contracts/token/ERC20/IERC20.sol":{"id":0},"src/interfaces/internals/USG/IIRCalculator.sol":{"id":9},"src/interfaces/internals/USG/IMarketViewer.sol":{"id":10},"@openzeppelin/contracts/utils/math/SafeCast.sol":{"id":4},"src/interfaces/internals/USG/IRewardAccumulator.sol":{"id":12},"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol":{"id":1}},"additionalInput":null,"stdJsonInput":{"sources":{"src/USG/Utilities/MarketViewer.sol":{"content":"// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.22;\n\nimport {Math} from \"@openzeppelin/contracts/utils/math/Math.sol\";\n\nimport {IMarketViewer} from \"../../interfaces/internals/USG/IMarketViewer.sol\";\nimport {ICollateral} from \"../../interfaces/internals/USG/ICollateral.sol\";\nimport {IDebtIR} from \"../../interfaces/internals/USG/IDebtIR.sol\";\n\n/// @title  MarketViewer\n/// @author Tangent Finance\n/// @notice Computes and return all information related to markets\ncontract MarketViewer is IMarketViewer {\n    uint256 constant RAY = 1e27;\n    uint256 constant MAX_UINT = uint256(int256(-1));\n\n    /**\n     * @notice Returns the current total debt in USG of a `market` (including interest)\n     * @dev    Applies the interest index to total debt shares and adds bad debt\n     * @param market Address of the market\n     * @return totalDebt Debt total of the market in USG\n     */\n    function totalDebt(IDebtIR market) external view returns (uint256) {\n        return market.badDebt() + _convertToAmount(market.totalDebtShares(), market.irCalculator().newDebtIndex(address(market)), Math.Rounding.Ceil);\n    }\n\n    /**\n     * @notice Returns the debt of an user (including accrued interest)\n     * @dev Applies current debt index to user's stored shares\n     * @param market  Address of the market where the position is\n     * @param account Address holding the debt position\n     * @return userDebt Debt of the user in USG\n     */\n    function userDebt(IDebtIR market, address account) public view returns (uint256) {\n        return _convertToAmount(market.userDebtShares(account), market.irCalculator().newDebtIndex(address(market)), Math.Rounding.Ceil);\n    }\n\n    /**\n     * @notice Computes a user's health ratio (safety of collateral vs debt)\n     *         Higher is safer. When HR < 1, position becomes liquidable.\n     * @param market  Address of the market where the position is.\n     * @param account Address holding the collateral position.\n     * @return healthRatio  Health Ratio of a position (1e18 base).\n     */\n    function healthRatio(address market, address account) external view returns (uint256) {\n        uint256 _userDebt = userDebt(IDebtIR(market), account);\n        if (_userDebt != 0) {\n            ICollateral marketCollat = ICollateral(market);\n            // We fetch the price of the collateral\n            uint256 collatPrice = marketCollat.collatOracle().latestAnswer(true);\n\n            // We compute the health ratio following this formula :\n            //      healthRatio = collatValue * liquidationThreshold / userDebt\n            return\n                (marketCollat.collateralBalances(account) * 10 ** (18 - marketCollat.collatDecimals()) * collatPrice * marketCollat.liquidationThreshold()) / (_userDebt * 100_000);\n        }\n        return MAX_UINT; // Fully healthy if no debt\n    }\n\n    /**\n     * @notice Returns the USD value of the user's collateral\n     * @param market  Address of the market where the position is.\n     * @param account Address holding the collateral position.\n     * @return positionValue Value in USD of the position (1e18 precision)\n     */\n    function positionValue(ICollateral market, address account) external view returns (uint256) {\n        return (market.collateralBalances(account) * market.collatOracle().latestAnswer(true)) / 10 ** market.collatDecimals();\n    }\n\n    /**\n     * @notice Returns the maximum amount of USG a user can borrow based on his collateral amount and LTV of the market\n     * @param market  Address of the market where the position is.\n     * @param account Address holding the collateral position.\n     * @return maxBorrowable Max borrowable in USG of an account\n     */\n    function maxBorrowable(ICollateral market, address account) external view returns (uint256) {\n        return (market.maxLTV() * _positionValue(market, account)) / 100_000;\n    }\n\n    /**\n     * @notice Calculates the interest accumulated since last checkpoint of a market\n     * @param market  Address of the market.\n     * @return pendingInterests Amount in USG accrued since last checkpoint.\n     */\n    function pendingInterests(IDebtIR market) external view returns (uint256) {\n        return _convertToAmount(market.totalDebtShares(), market.irCalculator().indexDelta(address(market)), Math.Rounding.Floor);\n    }\n\n    function _positionValue(ICollateral market, address account) internal view returns (uint256) {\n        return (market.collateralBalances(account) * market.collatOracle().latestAnswer(true)) / 10 ** market.collatDecimals();\n    }\n\n    /**\n     * @dev   Convert a debt shares to a debt amount\n     * @param debtShares  Debt shares\n     * @param index       Debt index of the market\n     * @return Debt amount\n     */\n    function _convertToAmount(uint256 debtShares, uint256 index, Math.Rounding roundingType) internal pure returns (uint256) {\n        return Math.mulDiv(debtShares, index, RAY, roundingType);\n    }\n}\n"},"@openzeppelin/contracts/utils/Panic.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/Panic.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Helper library for emitting standardized panic codes.\n *\n * ```solidity\n * contract Example {\n *      using Panic for uint256;\n *\n *      // Use any of the declared internal constants\n *      function foo() { Panic.GENERIC.panic(); }\n *\n *      // Alternatively\n *      function foo() { Panic.panic(Panic.GENERIC); }\n * }\n * ```\n *\n * Follows the list from https://github.com/ethereum/solidity/blob/v0.8.24/libsolutil/ErrorCodes.h[libsolutil].\n *\n * _Available since v5.1._\n */\n// slither-disable-next-line unused-state\nlibrary Panic {\n    /// @dev generic / unspecified error\n    uint256 internal constant GENERIC = 0x00;\n    /// @dev used by the assert() builtin\n    uint256 internal constant ASSERT = 0x01;\n    /// @dev arithmetic underflow or overflow\n    uint256 internal constant UNDER_OVERFLOW = 0x11;\n    /// @dev division or modulo by zero\n    uint256 internal constant DIVISION_BY_ZERO = 0x12;\n    /// @dev enum conversion error\n    uint256 internal constant ENUM_CONVERSION_ERROR = 0x21;\n    /// @dev invalid encoding in storage\n    uint256 internal constant STORAGE_ENCODING_ERROR = 0x22;\n    /// @dev empty array pop\n    uint256 internal constant EMPTY_ARRAY_POP = 0x31;\n    /// @dev array out of bounds access\n    uint256 internal constant ARRAY_OUT_OF_BOUNDS = 0x32;\n    /// @dev resource error (too large allocation or too large array)\n    uint256 internal constant RESOURCE_ERROR = 0x41;\n    /// @dev calling invalid internal function\n    uint256 internal constant INVALID_INTERNAL_FUNCTION = 0x51;\n\n    /// @dev Reverts with a panic code. Recommended to use with\n    /// the internal constants with predefined codes.\n    function panic(uint256 code) internal pure {\n        assembly (\"memory-safe\") {\n            mstore(0x00, 0x4e487b71)\n            mstore(0x20, code)\n            revert(0x1c, 0x24)\n        }\n    }\n}\n"},"src/interfaces/internals/USG/IDebtIR.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.24;\n\nimport {IIRCalculator} from \"./IIRCalculator.sol\";\n\ninterface IDebtIR {\n    function maxMarketDebt() external view returns (uint256);\n    function irCalculator() external view returns (IIRCalculator);\n    function minimumLoan() external view returns (uint256);\n    function userDebtShares(address user) external view returns (uint256);\n    function totalDebtShares() external view returns (uint256);\n    function badDebt() external view returns (uint256);\n}\n"},"src/interfaces/internals/ICommonStruct.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.24;\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\n\nstruct TokenAmount {\n    IERC20 token;\n    uint256 amount;\n}\nstruct ZapStruct {\n    address router;\n    bytes routerCall;\n}\nstruct ZapStructDeposit {\n    IERC20 tokenIn;\n    uint256 amountIn;\n    uint256 minAmountOut;\n    ZapStruct zap;\n}\n\nstruct ZapStructDepositNoMinAmount {\n    IERC20 tokenIn;\n    uint256 amountIn;\n    ZapStruct zap;\n}\n"},"@openzeppelin/contracts/utils/math/Math.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/math/Math.sol)\n\npragma solidity ^0.8.20;\n\nimport {Panic} from \"../Panic.sol\";\nimport {SafeCast} from \"./SafeCast.sol\";\n\n/**\n * @dev Standard math utilities missing in the Solidity language.\n */\nlibrary Math {\n    enum Rounding {\n        Floor, // Toward negative infinity\n        Ceil, // Toward positive infinity\n        Trunc, // Toward zero\n        Expand // Away from zero\n    }\n\n    /**\n     * @dev Returns the addition of two unsigned integers, with an success flag (no overflow).\n     */\n    function tryAdd(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n        unchecked {\n            uint256 c = a + b;\n            if (c < a) return (false, 0);\n            return (true, c);\n        }\n    }\n\n    /**\n     * @dev Returns the subtraction of two unsigned integers, with an success flag (no overflow).\n     */\n    function trySub(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n        unchecked {\n            if (b > a) return (false, 0);\n            return (true, a - b);\n        }\n    }\n\n    /**\n     * @dev Returns the multiplication of two unsigned integers, with an success flag (no overflow).\n     */\n    function tryMul(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n        unchecked {\n            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n            // benefit is lost if 'b' is also tested.\n            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n            if (a == 0) return (true, 0);\n            uint256 c = a * b;\n            if (c / a != b) return (false, 0);\n            return (true, c);\n        }\n    }\n\n    /**\n     * @dev Returns the division of two unsigned integers, with a success flag (no division by zero).\n     */\n    function tryDiv(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n        unchecked {\n            if (b == 0) return (false, 0);\n            return (true, a / b);\n        }\n    }\n\n    /**\n     * @dev Returns the remainder of dividing two unsigned integers, with a success flag (no division by zero).\n     */\n    function tryMod(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\n        unchecked {\n            if (b == 0) return (false, 0);\n            return (true, a % b);\n        }\n    }\n\n    /**\n     * @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant.\n     *\n     * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.\n     * However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute\n     * one branch when needed, making this function more expensive.\n     */\n    function ternary(bool condition, uint256 a, uint256 b) internal pure returns (uint256) {\n        unchecked {\n            // branchless ternary works because:\n            // b ^ (a ^ b) == a\n            // b ^ 0 == b\n            return b ^ ((a ^ b) * SafeCast.toUint(condition));\n        }\n    }\n\n    /**\n     * @dev Returns the largest of two numbers.\n     */\n    function max(uint256 a, uint256 b) internal pure returns (uint256) {\n        return ternary(a > b, a, b);\n    }\n\n    /**\n     * @dev Returns the smallest of two numbers.\n     */\n    function min(uint256 a, uint256 b) internal pure returns (uint256) {\n        return ternary(a < b, a, b);\n    }\n\n    /**\n     * @dev Returns the average of two numbers. The result is rounded towards\n     * zero.\n     */\n    function average(uint256 a, uint256 b) internal pure returns (uint256) {\n        // (a + b) / 2 can overflow.\n        return (a & b) + (a ^ b) / 2;\n    }\n\n    /**\n     * @dev Returns the ceiling of the division of two numbers.\n     *\n     * This differs from standard division with `/` in that it rounds towards infinity instead\n     * of rounding towards zero.\n     */\n    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\n        if (b == 0) {\n            // Guarantee the same behavior as in a regular Solidity division.\n            Panic.panic(Panic.DIVISION_BY_ZERO);\n        }\n\n        // The following calculation ensures accurate ceiling division without overflow.\n        // Since a is non-zero, (a - 1) / b will not overflow.\n        // The largest possible result occurs when (a - 1) / b is type(uint256).max,\n        // but the largest value we can obtain is type(uint256).max - 1, which happens\n        // when a = type(uint256).max and b = 1.\n        unchecked {\n            return SafeCast.toUint(a > 0) * ((a - 1) / b + 1);\n        }\n    }\n\n    /**\n     * @dev Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or\n     * denominator == 0.\n     *\n     * Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by\n     * Uniswap Labs also under MIT license.\n     */\n    function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\n        unchecked {\n            // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2²⁵⁶ and mod 2²⁵⁶ - 1, then use\n            // the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\n            // variables such that product = prod1 * 2²⁵⁶ + prod0.\n            uint256 prod0 = x * y; // Least significant 256 bits of the product\n            uint256 prod1; // Most significant 256 bits of the product\n            assembly {\n                let mm := mulmod(x, y, not(0))\n                prod1 := sub(sub(mm, prod0), lt(mm, prod0))\n            }\n\n            // Handle non-overflow cases, 256 by 256 division.\n            if (prod1 == 0) {\n                // Solidity will revert if denominator == 0, unlike the div opcode on its own.\n                // The surrounding unchecked block does not change this fact.\n                // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\n                return prod0 / denominator;\n            }\n\n            // Make sure the result is less than 2²⁵⁶. Also prevents denominator == 0.\n            if (denominator <= prod1) {\n                Panic.panic(ternary(denominator == 0, Panic.DIVISION_BY_ZERO, Panic.UNDER_OVERFLOW));\n            }\n\n            ///////////////////////////////////////////////\n            // 512 by 256 division.\n            ///////////////////////////////////////////////\n\n            // Make division exact by subtracting the remainder from [prod1 prod0].\n            uint256 remainder;\n            assembly {\n                // Compute remainder using mulmod.\n                remainder := mulmod(x, y, denominator)\n\n                // Subtract 256 bit number from 512 bit number.\n                prod1 := sub(prod1, gt(remainder, prod0))\n                prod0 := sub(prod0, remainder)\n            }\n\n            // Factor powers of two out of denominator and compute largest power of two divisor of denominator.\n            // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.\n\n            uint256 twos = denominator & (0 - denominator);\n            assembly {\n                // Divide denominator by twos.\n                denominator := div(denominator, twos)\n\n                // Divide [prod1 prod0] by twos.\n                prod0 := div(prod0, twos)\n\n                // Flip twos such that it is 2²⁵⁶ / twos. If twos is zero, then it becomes one.\n                twos := add(div(sub(0, twos), twos), 1)\n            }\n\n            // Shift in bits from prod1 into prod0.\n            prod0 |= prod1 * twos;\n\n            // Invert denominator mod 2²⁵⁶. Now that denominator is an odd number, it has an inverse modulo 2²⁵⁶ such\n            // that denominator * inv ≡ 1 mod 2²⁵⁶. Compute the inverse by starting with a seed that is correct for\n            // four bits. That is, denominator * inv ≡ 1 mod 2⁴.\n            uint256 inverse = (3 * denominator) ^ 2;\n\n            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also\n            // works in modular arithmetic, doubling the correct bits in each step.\n            inverse *= 2 - denominator * inverse; // inverse mod 2⁸\n            inverse *= 2 - denominator * inverse; // inverse mod 2¹⁶\n            inverse *= 2 - denominator * inverse; // inverse mod 2³²\n            inverse *= 2 - denominator * inverse; // inverse mod 2⁶⁴\n            inverse *= 2 - denominator * inverse; // inverse mod 2¹²⁸\n            inverse *= 2 - denominator * inverse; // inverse mod 2²⁵⁶\n\n            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\n            // This will give us the correct result modulo 2²⁵⁶. Since the preconditions guarantee that the outcome is\n            // less than 2²⁵⁶, this is the final result. We don't need to compute the high bits of the result and prod1\n            // is no longer required.\n            result = prod0 * inverse;\n            return result;\n        }\n    }\n\n    /**\n     * @dev Calculates x * y / denominator with full precision, following the selected rounding direction.\n     */\n    function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\n        return mulDiv(x, y, denominator) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0);\n    }\n\n    /**\n     * @dev Calculate the modular multiplicative inverse of a number in Z/nZ.\n     *\n     * If n is a prime, then Z/nZ is a field. In that case all elements are inversible, except 0.\n     * If n is not a prime, then Z/nZ is not a field, and some elements might not be inversible.\n     *\n     * If the input value is not inversible, 0 is returned.\n     *\n     * NOTE: If you know for sure that n is (big) a prime, it may be cheaper to use Fermat's little theorem and get the\n     * inverse using `Math.modExp(a, n - 2, n)`. See {invModPrime}.\n     */\n    function invMod(uint256 a, uint256 n) internal pure returns (uint256) {\n        unchecked {\n            if (n == 0) return 0;\n\n            // The inverse modulo is calculated using the Extended Euclidean Algorithm (iterative version)\n            // Used to compute integers x and y such that: ax + ny = gcd(a, n).\n            // When the gcd is 1, then the inverse of a modulo n exists and it's x.\n            // ax + ny = 1\n            // ax = 1 + (-y)n\n            // ax ≡ 1 (mod n) # x is the inverse of a modulo n\n\n            // If the remainder is 0 the gcd is n right away.\n            uint256 remainder = a % n;\n            uint256 gcd = n;\n\n            // Therefore the initial coefficients are:\n            // ax + ny = gcd(a, n) = n\n            // 0a + 1n = n\n            int256 x = 0;\n            int256 y = 1;\n\n            while (remainder != 0) {\n                uint256 quotient = gcd / remainder;\n\n                (gcd, remainder) = (\n                    // The old remainder is the next gcd to try.\n                    remainder,\n                    // Compute the next remainder.\n                    // Can't overflow given that (a % gcd) * (gcd // (a % gcd)) <= gcd\n                    // where gcd is at most n (capped to type(uint256).max)\n                    gcd - remainder * quotient\n                );\n\n                (x, y) = (\n                    // Increment the coefficient of a.\n                    y,\n                    // Decrement the coefficient of n.\n                    // Can overflow, but the result is casted to uint256 so that the\n                    // next value of y is \"wrapped around\" to a value between 0 and n - 1.\n                    x - y * int256(quotient)\n                );\n            }\n\n            if (gcd != 1) return 0; // No inverse exists.\n            return ternary(x < 0, n - uint256(-x), uint256(x)); // Wrap the result if it's negative.\n        }\n    }\n\n    /**\n     * @dev Variant of {invMod}. More efficient, but only works if `p` is known to be a prime greater than `2`.\n     *\n     * From https://en.wikipedia.org/wiki/Fermat%27s_little_theorem[Fermat's little theorem], we know that if p is\n     * prime, then `a**(p-1) ≡ 1 mod p`. As a consequence, we have `a * a**(p-2) ≡ 1 mod p`, which means that\n     * `a**(p-2)` is the modular multiplicative inverse of a in Fp.\n     *\n     * NOTE: this function does NOT check that `p` is a prime greater than `2`.\n     */\n    function invModPrime(uint256 a, uint256 p) internal view returns (uint256) {\n        unchecked {\n            return Math.modExp(a, p - 2, p);\n        }\n    }\n\n    /**\n     * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m)\n     *\n     * Requirements:\n     * - modulus can't be zero\n     * - underlying staticcall to precompile must succeed\n     *\n     * IMPORTANT: The result is only valid if the underlying call succeeds. When using this function, make\n     * sure the chain you're using it on supports the precompiled contract for modular exponentiation\n     * at address 0x05 as specified in https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise,\n     * the underlying function will succeed given the lack of a revert, but the result may be incorrectly\n     * interpreted as 0.\n     */\n    function modExp(uint256 b, uint256 e, uint256 m) internal view returns (uint256) {\n        (bool success, uint256 result) = tryModExp(b, e, m);\n        if (!success) {\n            Panic.panic(Panic.DIVISION_BY_ZERO);\n        }\n        return result;\n    }\n\n    /**\n     * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m).\n     * It includes a success flag indicating if the operation succeeded. Operation will be marked as failed if trying\n     * to operate modulo 0 or if the underlying precompile reverted.\n     *\n     * IMPORTANT: The result is only valid if the success flag is true. When using this function, make sure the chain\n     * you're using it on supports the precompiled contract for modular exponentiation at address 0x05 as specified in\n     * https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise, the underlying function will succeed given the lack\n     * of a revert, but the result may be incorrectly interpreted as 0.\n     */\n    function tryModExp(uint256 b, uint256 e, uint256 m) internal view returns (bool success, uint256 result) {\n        if (m == 0) return (false, 0);\n        assembly (\"memory-safe\") {\n            let ptr := mload(0x40)\n            // | Offset    | Content    | Content (Hex)                                                      |\n            // |-----------|------------|--------------------------------------------------------------------|\n            // | 0x00:0x1f | size of b  | 0x0000000000000000000000000000000000000000000000000000000000000020 |\n            // | 0x20:0x3f | size of e  | 0x0000000000000000000000000000000000000000000000000000000000000020 |\n            // | 0x40:0x5f | size of m  | 0x0000000000000000000000000000000000000000000000000000000000000020 |\n            // | 0x60:0x7f | value of b | 0x<.............................................................b> |\n            // | 0x80:0x9f | value of e | 0x<.............................................................e> |\n            // | 0xa0:0xbf | value of m | 0x<.............................................................m> |\n            mstore(ptr, 0x20)\n            mstore(add(ptr, 0x20), 0x20)\n            mstore(add(ptr, 0x40), 0x20)\n            mstore(add(ptr, 0x60), b)\n            mstore(add(ptr, 0x80), e)\n            mstore(add(ptr, 0xa0), m)\n\n            // Given the result < m, it's guaranteed to fit in 32 bytes,\n            // so we can use the memory scratch space located at offset 0.\n            success := staticcall(gas(), 0x05, ptr, 0xc0, 0x00, 0x20)\n            result := mload(0x00)\n        }\n    }\n\n    /**\n     * @dev Variant of {modExp} that supports inputs of arbitrary length.\n     */\n    function modExp(bytes memory b, bytes memory e, bytes memory m) internal view returns (bytes memory) {\n        (bool success, bytes memory result) = tryModExp(b, e, m);\n        if (!success) {\n            Panic.panic(Panic.DIVISION_BY_ZERO);\n        }\n        return result;\n    }\n\n    /**\n     * @dev Variant of {tryModExp} that supports inputs of arbitrary length.\n     */\n    function tryModExp(\n        bytes memory b,\n        bytes memory e,\n        bytes memory m\n    ) internal view returns (bool success, bytes memory result) {\n        if (_zeroBytes(m)) return (false, new bytes(0));\n\n        uint256 mLen = m.length;\n\n        // Encode call args in result and move the free memory pointer\n        result = abi.encodePacked(b.length, e.length, mLen, b, e, m);\n\n        assembly (\"memory-safe\") {\n            let dataPtr := add(result, 0x20)\n            // Write result on top of args to avoid allocating extra memory.\n            success := staticcall(gas(), 0x05, dataPtr, mload(result), dataPtr, mLen)\n            // Overwrite the length.\n            // result.length > returndatasize() is guaranteed because returndatasize() == m.length\n            mstore(result, mLen)\n            // Set the memory pointer after the returned data.\n            mstore(0x40, add(dataPtr, mLen))\n        }\n    }\n\n    /**\n     * @dev Returns whether the provided byte array is zero.\n     */\n    function _zeroBytes(bytes memory byteArray) private pure returns (bool) {\n        for (uint256 i = 0; i < byteArray.length; ++i) {\n            if (byteArray[i] != 0) {\n                return false;\n            }\n        }\n        return true;\n    }\n\n    /**\n     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded\n     * towards zero.\n     *\n     * This method is based on Newton's method for computing square roots; the algorithm is restricted to only\n     * using integer operations.\n     */\n    function sqrt(uint256 a) internal pure returns (uint256) {\n        unchecked {\n            // Take care of easy edge cases when a == 0 or a == 1\n            if (a <= 1) {\n                return a;\n            }\n\n            // In this function, we use Newton's method to get a root of `f(x) := x² - a`. It involves building a\n            // sequence x_n that converges toward sqrt(a). For each iteration x_n, we also define the error between\n            // the current value as `ε_n = | x_n - sqrt(a) |`.\n            //\n            // For our first estimation, we consider `e` the smallest power of 2 which is bigger than the square root\n            // of the target. (i.e. `2**(e-1) ≤ sqrt(a) < 2**e`). We know that `e ≤ 128` because `(2¹²⁸)² = 2²⁵⁶` is\n            // bigger than any uint256.\n            //\n            // By noticing that\n            // `2**(e-1) ≤ sqrt(a) < 2**e → (2**(e-1))² ≤ a < (2**e)² → 2**(2*e-2) ≤ a < 2**(2*e)`\n            // we can deduce that `e - 1` is `log2(a) / 2`. We can thus compute `x_n = 2**(e-1)` using a method similar\n            // to the msb function.\n            uint256 aa = a;\n            uint256 xn = 1;\n\n            if (aa >= (1 << 128)) {\n                aa >>= 128;\n                xn <<= 64;\n            }\n            if (aa >= (1 << 64)) {\n                aa >>= 64;\n                xn <<= 32;\n            }\n            if (aa >= (1 << 32)) {\n                aa >>= 32;\n                xn <<= 16;\n            }\n            if (aa >= (1 << 16)) {\n                aa >>= 16;\n                xn <<= 8;\n            }\n            if (aa >= (1 << 8)) {\n                aa >>= 8;\n                xn <<= 4;\n            }\n            if (aa >= (1 << 4)) {\n                aa >>= 4;\n                xn <<= 2;\n            }\n            if (aa >= (1 << 2)) {\n                xn <<= 1;\n            }\n\n            // We now have x_n such that `x_n = 2**(e-1) ≤ sqrt(a) < 2**e = 2 * x_n`. This implies ε_n ≤ 2**(e-1).\n            //\n            // We can refine our estimation by noticing that the middle of that interval minimizes the error.\n            // If we move x_n to equal 2**(e-1) + 2**(e-2), then we reduce the error to ε_n ≤ 2**(e-2).\n            // This is going to be our x_0 (and ε_0)\n            xn = (3 * xn) >> 1; // ε_0 := | x_0 - sqrt(a) | ≤ 2**(e-2)\n\n            // From here, Newton's method give us:\n            // x_{n+1} = (x_n + a / x_n) / 2\n            //\n            // One should note that:\n            // x_{n+1}² - a = ((x_n + a / x_n) / 2)² - a\n            //              = ((x_n² + a) / (2 * x_n))² - a\n            //              = (x_n⁴ + 2 * a * x_n² + a²) / (4 * x_n²) - a\n            //              = (x_n⁴ + 2 * a * x_n² + a² - 4 * a * x_n²) / (4 * x_n²)\n            //              = (x_n⁴ - 2 * a * x_n² + a²) / (4 * x_n²)\n            //              = (x_n² - a)² / (2 * x_n)²\n            //              = ((x_n² - a) / (2 * x_n))²\n            //              ≥ 0\n            // Which proves that for all n ≥ 1, sqrt(a) ≤ x_n\n            //\n            // This gives us the proof of quadratic convergence of the sequence:\n            // ε_{n+1} = | x_{n+1} - sqrt(a) |\n            //         = | (x_n + a / x_n) / 2 - sqrt(a) |\n            //         = | (x_n² + a - 2*x_n*sqrt(a)) / (2 * x_n) |\n            //         = | (x_n - sqrt(a))² / (2 * x_n) |\n            //         = | ε_n² / (2 * x_n) |\n            //         = ε_n² / | (2 * x_n) |\n            //\n            // For the first iteration, we have a special case where x_0 is known:\n            // ε_1 = ε_0² / | (2 * x_0) |\n            //     ≤ (2**(e-2))² / (2 * (2**(e-1) + 2**(e-2)))\n            //     ≤ 2**(2*e-4) / (3 * 2**(e-1))\n            //     ≤ 2**(e-3) / 3\n            //     ≤ 2**(e-3-log2(3))\n            //     ≤ 2**(e-4.5)\n            //\n            // For the following iterations, we use the fact that, 2**(e-1) ≤ sqrt(a) ≤ x_n:\n            // ε_{n+1} = ε_n² / | (2 * x_n) |\n            //         ≤ (2**(e-k))² / (2 * 2**(e-1))\n            //         ≤ 2**(2*e-2*k) / 2**e\n            //         ≤ 2**(e-2*k)\n            xn = (xn + a / xn) >> 1; // ε_1 := | x_1 - sqrt(a) | ≤ 2**(e-4.5)  -- special case, see above\n            xn = (xn + a / xn) >> 1; // ε_2 := | x_2 - sqrt(a) | ≤ 2**(e-9)    -- general case with k = 4.5\n            xn = (xn + a / xn) >> 1; // ε_3 := | x_3 - sqrt(a) | ≤ 2**(e-18)   -- general case with k = 9\n            xn = (xn + a / xn) >> 1; // ε_4 := | x_4 - sqrt(a) | ≤ 2**(e-36)   -- general case with k = 18\n            xn = (xn + a / xn) >> 1; // ε_5 := | x_5 - sqrt(a) | ≤ 2**(e-72)   -- general case with k = 36\n            xn = (xn + a / xn) >> 1; // ε_6 := | x_6 - sqrt(a) | ≤ 2**(e-144)  -- general case with k = 72\n\n            // Because e ≤ 128 (as discussed during the first estimation phase), we know have reached a precision\n            // ε_6 ≤ 2**(e-144) < 1. Given we're operating on integers, then we can ensure that xn is now either\n            // sqrt(a) or sqrt(a) + 1.\n            return xn - SafeCast.toUint(xn > a / xn);\n        }\n    }\n\n    /**\n     * @dev Calculates sqrt(a), following the selected rounding direction.\n     */\n    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\n        unchecked {\n            uint256 result = sqrt(a);\n            return result + SafeCast.toUint(unsignedRoundsUp(rounding) && result * result < a);\n        }\n    }\n\n    /**\n     * @dev Return the log in base 2 of a positive value rounded towards zero.\n     * Returns 0 if given 0.\n     */\n    function log2(uint256 value) internal pure returns (uint256) {\n        uint256 result = 0;\n        uint256 exp;\n        unchecked {\n            exp = 128 * SafeCast.toUint(value > (1 << 128) - 1);\n            value >>= exp;\n            result += exp;\n\n            exp = 64 * SafeCast.toUint(value > (1 << 64) - 1);\n            value >>= exp;\n            result += exp;\n\n            exp = 32 * SafeCast.toUint(value > (1 << 32) - 1);\n            value >>= exp;\n            result += exp;\n\n            exp = 16 * SafeCast.toUint(value > (1 << 16) - 1);\n            value >>= exp;\n            result += exp;\n\n            exp = 8 * SafeCast.toUint(value > (1 << 8) - 1);\n            value >>= exp;\n            result += exp;\n\n            exp = 4 * SafeCast.toUint(value > (1 << 4) - 1);\n            value >>= exp;\n            result += exp;\n\n            exp = 2 * SafeCast.toUint(value > (1 << 2) - 1);\n            value >>= exp;\n            result += exp;\n\n            result += SafeCast.toUint(value > 1);\n        }\n        return result;\n    }\n\n    /**\n     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\n     * Returns 0 if given 0.\n     */\n    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\n        unchecked {\n            uint256 result = log2(value);\n            return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << result < value);\n        }\n    }\n\n    /**\n     * @dev Return the log in base 10 of a positive value rounded towards zero.\n     * Returns 0 if given 0.\n     */\n    function log10(uint256 value) internal pure returns (uint256) {\n        uint256 result = 0;\n        unchecked {\n            if (value >= 10 ** 64) {\n                value /= 10 ** 64;\n                result += 64;\n            }\n            if (value >= 10 ** 32) {\n                value /= 10 ** 32;\n                result += 32;\n            }\n            if (value >= 10 ** 16) {\n                value /= 10 ** 16;\n                result += 16;\n            }\n            if (value >= 10 ** 8) {\n                value /= 10 ** 8;\n                result += 8;\n            }\n            if (value >= 10 ** 4) {\n                value /= 10 ** 4;\n                result += 4;\n            }\n            if (value >= 10 ** 2) {\n                value /= 10 ** 2;\n                result += 2;\n            }\n            if (value >= 10 ** 1) {\n                result += 1;\n            }\n        }\n        return result;\n    }\n\n    /**\n     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\n     * Returns 0 if given 0.\n     */\n    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\n        unchecked {\n            uint256 result = log10(value);\n            return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 10 ** result < value);\n        }\n    }\n\n    /**\n     * @dev Return the log in base 256 of a positive value rounded towards zero.\n     * Returns 0 if given 0.\n     *\n     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\n     */\n    function log256(uint256 value) internal pure returns (uint256) {\n        uint256 result = 0;\n        uint256 isGt;\n        unchecked {\n            isGt = SafeCast.toUint(value > (1 << 128) - 1);\n            value >>= isGt * 128;\n            result += isGt * 16;\n\n            isGt = SafeCast.toUint(value > (1 << 64) - 1);\n            value >>= isGt * 64;\n            result += isGt * 8;\n\n            isGt = SafeCast.toUint(value > (1 << 32) - 1);\n            value >>= isGt * 32;\n            result += isGt * 4;\n\n            isGt = SafeCast.toUint(value > (1 << 16) - 1);\n            value >>= isGt * 16;\n            result += isGt * 2;\n\n            result += SafeCast.toUint(value > (1 << 8) - 1);\n        }\n        return result;\n    }\n\n    /**\n     * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\n     * Returns 0 if given 0.\n     */\n    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\n        unchecked {\n            uint256 result = log256(value);\n            return result + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << (result << 3) < value);\n        }\n    }\n\n    /**\n     * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.\n     */\n    function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {\n        return uint8(rounding) % 2 == 1;\n    }\n}\n"},"src/interfaces/internals/USG/ICollateral.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.24;\n\nimport {IERC20, IERC20Metadata} from \"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\";\n\nimport {IDebtIR} from \"./IDebtIR.sol\";\nimport {IRewardAccumulator} from \"./IRewardAccumulator.sol\";\nimport {IPriceOracle} from \"./IPriceOracle.sol\";\n\ninterface ICollateral {\n    function collatOracle() external view returns (IPriceOracle);\n\n    function collatToken() external view returns (IERC20Metadata);\n\n    function collatDecimals() external view returns (uint256);\n\n    function collateralBalances(address account) external view returns (uint256);\n\n    function totalCollateral() external view returns (uint256);\n\n    function maxLTV() external view returns (uint256);\n\n    function liquidationThreshold() external view returns (uint256);\n\n    function rewardAccumulator() external view returns (IRewardAccumulator);\n\n    function getBalanceAndTotalCollateral(address account) external view returns (uint256, uint256);\n}\n"},"src/interfaces/internals/USG/IPriceOracle.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.24;\n\ninterface IPriceOracle {\n    function latestAnswer(bool isNoFailMode) external view returns (uint256);\n\n    function latestAnswerUpdate(bool isNoFailMode) external returns (uint256);\n\n    function decimals() external view returns (uint8);\n}\n"},"@openzeppelin/contracts/token/ERC20/IERC20.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Interface of the ERC-20 standard as defined in the ERC.\n */\ninterface IERC20 {\n    /**\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\n     * another (`to`).\n     *\n     * Note that `value` may be zero.\n     */\n    event Transfer(address indexed from, address indexed to, uint256 value);\n\n    /**\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n     * a call to {approve}. `value` is the new allowance.\n     */\n    event Approval(address indexed owner, address indexed spender, uint256 value);\n\n    /**\n     * @dev Returns the value of tokens in existence.\n     */\n    function totalSupply() external view returns (uint256);\n\n    /**\n     * @dev Returns the value of tokens owned by `account`.\n     */\n    function balanceOf(address account) external view returns (uint256);\n\n    /**\n     * @dev Moves a `value` amount of tokens from the caller's account to `to`.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transfer(address to, uint256 value) external returns (bool);\n\n    /**\n     * @dev Returns the remaining number of tokens that `spender` will be\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\n     * zero by default.\n     *\n     * This value changes when {approve} or {transferFrom} are called.\n     */\n    function allowance(address owner, address spender) external view returns (uint256);\n\n    /**\n     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n     * caller's tokens.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\n     * that someone may use both the old and the new allowance by unfortunate\n     * transaction ordering. One possible solution to mitigate this race\n     * condition is to first reduce the spender's allowance to 0 and set the\n     * desired value afterwards:\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n     *\n     * Emits an {Approval} event.\n     */\n    function approve(address spender, uint256 value) external returns (bool);\n\n    /**\n     * @dev Moves a `value` amount of tokens from `from` to `to` using the\n     * allowance mechanism. `value` is then deducted from the caller's\n     * allowance.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transferFrom(address from, address to, uint256 value) external returns (bool);\n}\n"},"src/interfaces/internals/USG/IIRCalculator.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.24;\n\nstruct IRParams {\n    /// @dev Flag to determine if a Market is HEC or LEC\n    bool isHEC;\n    /// @dev Minimum IR reached at pMax.\n    ///      1_000 <=> 1% / 100_000 <=> 100%.\n    uint24 rMin;\n    /// @dev Maximum IR reached at pMin.\n    ///      1_000 <=> 1% / 100_000 <=> 100%.\n    uint32 rMax;\n    /// @dev Minimum price of USG where rMax is reached.\n    ///      980_000 <=> 0.98$ / 1_000_000 <=> 1$\n    uint32 pMin;\n    /// @dev Inflexion price of USG where IR starts to increases more significantly.\n    ///      980_000 <=> 0.98$ / 1_000_000 <=> 1$\n    uint32 pInf;\n    /// @dev Maximum price of USG where IR increases more significantly.\n    ///      980_000 <=> 0.98$ / 1_000_000 <=> 1$\n    uint32 pMax;\n    /// @dev Convexity of the curve before pInf\n    ///      2_000 <=> 2 / 4_500 <=> 4.5\n    uint32 a1;\n    /// @dev Convexity of the curve after pInf\n    ///      2_000 <=> 2 / 4_500 <=> 4.5\n    uint32 a2;\n    /// @dev Velocity of the transition between a1 and a2\n    ///      It's an integer. 250 <=> 250\n    uint32 k;\n}\n\nstruct IRCheckpoint {\n    uint216 ir;\n    uint40 timestamp;\n}\ninterface IIRCalculator {\n    function initializeMarket(address market, IRParams calldata _irParam) external;\n\n    function simulateIR(uint256 USGPrice, IRParams memory irParam) external view returns (uint256);\n\n    function computeIRForMarket(address market) external returns (uint256);\n\n    function checkpointIR(address market) external returns (uint256);\n\n    function newDebtIndex(address market) external view returns (uint256);\n\n    function irCheckpoints(address market) external view returns (uint216, uint40);\n\n    function debtIndexes(address market) external view returns (uint256);\n\n    function indexDelta(address market) external view returns (uint256);\n\n    function mintableInterests() external view returns (uint256);\n\n    function getIRParams(address market) external view returns (IRParams memory);\n\n    function getIRCheckpoint(address market) external view returns (IRCheckpoint memory);\n}\n"},"src/interfaces/internals/USG/IMarketViewer.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.24;\n\nimport {ICollateral} from \"./ICollateral.sol\";\nimport {IDebtIR} from \"./IDebtIR.sol\";\ninterface IMarketViewer {\n    function totalDebt(IDebtIR market) external view returns (uint256);\n    function pendingInterests(IDebtIR user) external view returns (uint256);\n\n    function userDebt(IDebtIR market, address user) external view returns (uint256);\n    function positionValue(ICollateral market, address user) external view returns (uint256);\n    function maxBorrowable(ICollateral market, address user) external view returns (uint256);\n    function healthRatio(address market, address user) external view returns (uint256);\n}\n"},"@openzeppelin/contracts/utils/math/SafeCast.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/math/SafeCast.sol)\n// This file was procedurally generated from scripts/generate/templates/SafeCast.js.\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Wrappers over Solidity's uintXX/intXX/bool casting operators with added overflow\n * checks.\n *\n * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can\n * easily result in undesired exploitation or bugs, since developers usually\n * assume that overflows raise errors. `SafeCast` restores this intuition by\n * reverting the transaction when such an operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n */\nlibrary SafeCast {\n    /**\n     * @dev Value doesn't fit in an uint of `bits` size.\n     */\n    error SafeCastOverflowedUintDowncast(uint8 bits, uint256 value);\n\n    /**\n     * @dev An int value doesn't fit in an uint of `bits` size.\n     */\n    error SafeCastOverflowedIntToUint(int256 value);\n\n    /**\n     * @dev Value doesn't fit in an int of `bits` size.\n     */\n    error SafeCastOverflowedIntDowncast(uint8 bits, int256 value);\n\n    /**\n     * @dev An uint value doesn't fit in an int of `bits` size.\n     */\n    error SafeCastOverflowedUintToInt(uint256 value);\n\n    /**\n     * @dev Returns the downcasted uint248 from uint256, reverting on\n     * overflow (when the input is greater than largest uint248).\n     *\n     * Counterpart to Solidity's `uint248` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 248 bits\n     */\n    function toUint248(uint256 value) internal pure returns (uint248) {\n        if (value > type(uint248).max) {\n            revert SafeCastOverflowedUintDowncast(248, value);\n        }\n        return uint248(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint240 from uint256, reverting on\n     * overflow (when the input is greater than largest uint240).\n     *\n     * Counterpart to Solidity's `uint240` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 240 bits\n     */\n    function toUint240(uint256 value) internal pure returns (uint240) {\n        if (value > type(uint240).max) {\n            revert SafeCastOverflowedUintDowncast(240, value);\n        }\n        return uint240(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint232 from uint256, reverting on\n     * overflow (when the input is greater than largest uint232).\n     *\n     * Counterpart to Solidity's `uint232` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 232 bits\n     */\n    function toUint232(uint256 value) internal pure returns (uint232) {\n        if (value > type(uint232).max) {\n            revert SafeCastOverflowedUintDowncast(232, value);\n        }\n        return uint232(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint224 from uint256, reverting on\n     * overflow (when the input is greater than largest uint224).\n     *\n     * Counterpart to Solidity's `uint224` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 224 bits\n     */\n    function toUint224(uint256 value) internal pure returns (uint224) {\n        if (value > type(uint224).max) {\n            revert SafeCastOverflowedUintDowncast(224, value);\n        }\n        return uint224(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint216 from uint256, reverting on\n     * overflow (when the input is greater than largest uint216).\n     *\n     * Counterpart to Solidity's `uint216` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 216 bits\n     */\n    function toUint216(uint256 value) internal pure returns (uint216) {\n        if (value > type(uint216).max) {\n            revert SafeCastOverflowedUintDowncast(216, value);\n        }\n        return uint216(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint208 from uint256, reverting on\n     * overflow (when the input is greater than largest uint208).\n     *\n     * Counterpart to Solidity's `uint208` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 208 bits\n     */\n    function toUint208(uint256 value) internal pure returns (uint208) {\n        if (value > type(uint208).max) {\n            revert SafeCastOverflowedUintDowncast(208, value);\n        }\n        return uint208(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint200 from uint256, reverting on\n     * overflow (when the input is greater than largest uint200).\n     *\n     * Counterpart to Solidity's `uint200` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 200 bits\n     */\n    function toUint200(uint256 value) internal pure returns (uint200) {\n        if (value > type(uint200).max) {\n            revert SafeCastOverflowedUintDowncast(200, value);\n        }\n        return uint200(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint192 from uint256, reverting on\n     * overflow (when the input is greater than largest uint192).\n     *\n     * Counterpart to Solidity's `uint192` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 192 bits\n     */\n    function toUint192(uint256 value) internal pure returns (uint192) {\n        if (value > type(uint192).max) {\n            revert SafeCastOverflowedUintDowncast(192, value);\n        }\n        return uint192(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint184 from uint256, reverting on\n     * overflow (when the input is greater than largest uint184).\n     *\n     * Counterpart to Solidity's `uint184` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 184 bits\n     */\n    function toUint184(uint256 value) internal pure returns (uint184) {\n        if (value > type(uint184).max) {\n            revert SafeCastOverflowedUintDowncast(184, value);\n        }\n        return uint184(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint176 from uint256, reverting on\n     * overflow (when the input is greater than largest uint176).\n     *\n     * Counterpart to Solidity's `uint176` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 176 bits\n     */\n    function toUint176(uint256 value) internal pure returns (uint176) {\n        if (value > type(uint176).max) {\n            revert SafeCastOverflowedUintDowncast(176, value);\n        }\n        return uint176(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint168 from uint256, reverting on\n     * overflow (when the input is greater than largest uint168).\n     *\n     * Counterpart to Solidity's `uint168` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 168 bits\n     */\n    function toUint168(uint256 value) internal pure returns (uint168) {\n        if (value > type(uint168).max) {\n            revert SafeCastOverflowedUintDowncast(168, value);\n        }\n        return uint168(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint160 from uint256, reverting on\n     * overflow (when the input is greater than largest uint160).\n     *\n     * Counterpart to Solidity's `uint160` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 160 bits\n     */\n    function toUint160(uint256 value) internal pure returns (uint160) {\n        if (value > type(uint160).max) {\n            revert SafeCastOverflowedUintDowncast(160, value);\n        }\n        return uint160(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint152 from uint256, reverting on\n     * overflow (when the input is greater than largest uint152).\n     *\n     * Counterpart to Solidity's `uint152` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 152 bits\n     */\n    function toUint152(uint256 value) internal pure returns (uint152) {\n        if (value > type(uint152).max) {\n            revert SafeCastOverflowedUintDowncast(152, value);\n        }\n        return uint152(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint144 from uint256, reverting on\n     * overflow (when the input is greater than largest uint144).\n     *\n     * Counterpart to Solidity's `uint144` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 144 bits\n     */\n    function toUint144(uint256 value) internal pure returns (uint144) {\n        if (value > type(uint144).max) {\n            revert SafeCastOverflowedUintDowncast(144, value);\n        }\n        return uint144(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint136 from uint256, reverting on\n     * overflow (when the input is greater than largest uint136).\n     *\n     * Counterpart to Solidity's `uint136` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 136 bits\n     */\n    function toUint136(uint256 value) internal pure returns (uint136) {\n        if (value > type(uint136).max) {\n            revert SafeCastOverflowedUintDowncast(136, value);\n        }\n        return uint136(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint128 from uint256, reverting on\n     * overflow (when the input is greater than largest uint128).\n     *\n     * Counterpart to Solidity's `uint128` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 128 bits\n     */\n    function toUint128(uint256 value) internal pure returns (uint128) {\n        if (value > type(uint128).max) {\n            revert SafeCastOverflowedUintDowncast(128, value);\n        }\n        return uint128(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint120 from uint256, reverting on\n     * overflow (when the input is greater than largest uint120).\n     *\n     * Counterpart to Solidity's `uint120` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 120 bits\n     */\n    function toUint120(uint256 value) internal pure returns (uint120) {\n        if (value > type(uint120).max) {\n            revert SafeCastOverflowedUintDowncast(120, value);\n        }\n        return uint120(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint112 from uint256, reverting on\n     * overflow (when the input is greater than largest uint112).\n     *\n     * Counterpart to Solidity's `uint112` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 112 bits\n     */\n    function toUint112(uint256 value) internal pure returns (uint112) {\n        if (value > type(uint112).max) {\n            revert SafeCastOverflowedUintDowncast(112, value);\n        }\n        return uint112(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint104 from uint256, reverting on\n     * overflow (when the input is greater than largest uint104).\n     *\n     * Counterpart to Solidity's `uint104` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 104 bits\n     */\n    function toUint104(uint256 value) internal pure returns (uint104) {\n        if (value > type(uint104).max) {\n            revert SafeCastOverflowedUintDowncast(104, value);\n        }\n        return uint104(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint96 from uint256, reverting on\n     * overflow (when the input is greater than largest uint96).\n     *\n     * Counterpart to Solidity's `uint96` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 96 bits\n     */\n    function toUint96(uint256 value) internal pure returns (uint96) {\n        if (value > type(uint96).max) {\n            revert SafeCastOverflowedUintDowncast(96, value);\n        }\n        return uint96(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint88 from uint256, reverting on\n     * overflow (when the input is greater than largest uint88).\n     *\n     * Counterpart to Solidity's `uint88` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 88 bits\n     */\n    function toUint88(uint256 value) internal pure returns (uint88) {\n        if (value > type(uint88).max) {\n            revert SafeCastOverflowedUintDowncast(88, value);\n        }\n        return uint88(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint80 from uint256, reverting on\n     * overflow (when the input is greater than largest uint80).\n     *\n     * Counterpart to Solidity's `uint80` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 80 bits\n     */\n    function toUint80(uint256 value) internal pure returns (uint80) {\n        if (value > type(uint80).max) {\n            revert SafeCastOverflowedUintDowncast(80, value);\n        }\n        return uint80(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint72 from uint256, reverting on\n     * overflow (when the input is greater than largest uint72).\n     *\n     * Counterpart to Solidity's `uint72` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 72 bits\n     */\n    function toUint72(uint256 value) internal pure returns (uint72) {\n        if (value > type(uint72).max) {\n            revert SafeCastOverflowedUintDowncast(72, value);\n        }\n        return uint72(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint64 from uint256, reverting on\n     * overflow (when the input is greater than largest uint64).\n     *\n     * Counterpart to Solidity's `uint64` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 64 bits\n     */\n    function toUint64(uint256 value) internal pure returns (uint64) {\n        if (value > type(uint64).max) {\n            revert SafeCastOverflowedUintDowncast(64, value);\n        }\n        return uint64(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint56 from uint256, reverting on\n     * overflow (when the input is greater than largest uint56).\n     *\n     * Counterpart to Solidity's `uint56` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 56 bits\n     */\n    function toUint56(uint256 value) internal pure returns (uint56) {\n        if (value > type(uint56).max) {\n            revert SafeCastOverflowedUintDowncast(56, value);\n        }\n        return uint56(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint48 from uint256, reverting on\n     * overflow (when the input is greater than largest uint48).\n     *\n     * Counterpart to Solidity's `uint48` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 48 bits\n     */\n    function toUint48(uint256 value) internal pure returns (uint48) {\n        if (value > type(uint48).max) {\n            revert SafeCastOverflowedUintDowncast(48, value);\n        }\n        return uint48(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint40 from uint256, reverting on\n     * overflow (when the input is greater than largest uint40).\n     *\n     * Counterpart to Solidity's `uint40` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 40 bits\n     */\n    function toUint40(uint256 value) internal pure returns (uint40) {\n        if (value > type(uint40).max) {\n            revert SafeCastOverflowedUintDowncast(40, value);\n        }\n        return uint40(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint32 from uint256, reverting on\n     * overflow (when the input is greater than largest uint32).\n     *\n     * Counterpart to Solidity's `uint32` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 32 bits\n     */\n    function toUint32(uint256 value) internal pure returns (uint32) {\n        if (value > type(uint32).max) {\n            revert SafeCastOverflowedUintDowncast(32, value);\n        }\n        return uint32(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint24 from uint256, reverting on\n     * overflow (when the input is greater than largest uint24).\n     *\n     * Counterpart to Solidity's `uint24` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 24 bits\n     */\n    function toUint24(uint256 value) internal pure returns (uint24) {\n        if (value > type(uint24).max) {\n            revert SafeCastOverflowedUintDowncast(24, value);\n        }\n        return uint24(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint16 from uint256, reverting on\n     * overflow (when the input is greater than largest uint16).\n     *\n     * Counterpart to Solidity's `uint16` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 16 bits\n     */\n    function toUint16(uint256 value) internal pure returns (uint16) {\n        if (value > type(uint16).max) {\n            revert SafeCastOverflowedUintDowncast(16, value);\n        }\n        return uint16(value);\n    }\n\n    /**\n     * @dev Returns the downcasted uint8 from uint256, reverting on\n     * overflow (when the input is greater than largest uint8).\n     *\n     * Counterpart to Solidity's `uint8` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 8 bits\n     */\n    function toUint8(uint256 value) internal pure returns (uint8) {\n        if (value > type(uint8).max) {\n            revert SafeCastOverflowedUintDowncast(8, value);\n        }\n        return uint8(value);\n    }\n\n    /**\n     * @dev Converts a signed int256 into an unsigned uint256.\n     *\n     * Requirements:\n     *\n     * - input must be greater than or equal to 0.\n     */\n    function toUint256(int256 value) internal pure returns (uint256) {\n        if (value < 0) {\n            revert SafeCastOverflowedIntToUint(value);\n        }\n        return uint256(value);\n    }\n\n    /**\n     * @dev Returns the downcasted int248 from int256, reverting on\n     * overflow (when the input is less than smallest int248 or\n     * greater than largest int248).\n     *\n     * Counterpart to Solidity's `int248` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 248 bits\n     */\n    function toInt248(int256 value) internal pure returns (int248 downcasted) {\n        downcasted = int248(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(248, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int240 from int256, reverting on\n     * overflow (when the input is less than smallest int240 or\n     * greater than largest int240).\n     *\n     * Counterpart to Solidity's `int240` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 240 bits\n     */\n    function toInt240(int256 value) internal pure returns (int240 downcasted) {\n        downcasted = int240(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(240, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int232 from int256, reverting on\n     * overflow (when the input is less than smallest int232 or\n     * greater than largest int232).\n     *\n     * Counterpart to Solidity's `int232` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 232 bits\n     */\n    function toInt232(int256 value) internal pure returns (int232 downcasted) {\n        downcasted = int232(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(232, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int224 from int256, reverting on\n     * overflow (when the input is less than smallest int224 or\n     * greater than largest int224).\n     *\n     * Counterpart to Solidity's `int224` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 224 bits\n     */\n    function toInt224(int256 value) internal pure returns (int224 downcasted) {\n        downcasted = int224(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(224, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int216 from int256, reverting on\n     * overflow (when the input is less than smallest int216 or\n     * greater than largest int216).\n     *\n     * Counterpart to Solidity's `int216` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 216 bits\n     */\n    function toInt216(int256 value) internal pure returns (int216 downcasted) {\n        downcasted = int216(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(216, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int208 from int256, reverting on\n     * overflow (when the input is less than smallest int208 or\n     * greater than largest int208).\n     *\n     * Counterpart to Solidity's `int208` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 208 bits\n     */\n    function toInt208(int256 value) internal pure returns (int208 downcasted) {\n        downcasted = int208(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(208, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int200 from int256, reverting on\n     * overflow (when the input is less than smallest int200 or\n     * greater than largest int200).\n     *\n     * Counterpart to Solidity's `int200` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 200 bits\n     */\n    function toInt200(int256 value) internal pure returns (int200 downcasted) {\n        downcasted = int200(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(200, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int192 from int256, reverting on\n     * overflow (when the input is less than smallest int192 or\n     * greater than largest int192).\n     *\n     * Counterpart to Solidity's `int192` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 192 bits\n     */\n    function toInt192(int256 value) internal pure returns (int192 downcasted) {\n        downcasted = int192(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(192, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int184 from int256, reverting on\n     * overflow (when the input is less than smallest int184 or\n     * greater than largest int184).\n     *\n     * Counterpart to Solidity's `int184` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 184 bits\n     */\n    function toInt184(int256 value) internal pure returns (int184 downcasted) {\n        downcasted = int184(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(184, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int176 from int256, reverting on\n     * overflow (when the input is less than smallest int176 or\n     * greater than largest int176).\n     *\n     * Counterpart to Solidity's `int176` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 176 bits\n     */\n    function toInt176(int256 value) internal pure returns (int176 downcasted) {\n        downcasted = int176(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(176, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int168 from int256, reverting on\n     * overflow (when the input is less than smallest int168 or\n     * greater than largest int168).\n     *\n     * Counterpart to Solidity's `int168` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 168 bits\n     */\n    function toInt168(int256 value) internal pure returns (int168 downcasted) {\n        downcasted = int168(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(168, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int160 from int256, reverting on\n     * overflow (when the input is less than smallest int160 or\n     * greater than largest int160).\n     *\n     * Counterpart to Solidity's `int160` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 160 bits\n     */\n    function toInt160(int256 value) internal pure returns (int160 downcasted) {\n        downcasted = int160(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(160, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int152 from int256, reverting on\n     * overflow (when the input is less than smallest int152 or\n     * greater than largest int152).\n     *\n     * Counterpart to Solidity's `int152` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 152 bits\n     */\n    function toInt152(int256 value) internal pure returns (int152 downcasted) {\n        downcasted = int152(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(152, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int144 from int256, reverting on\n     * overflow (when the input is less than smallest int144 or\n     * greater than largest int144).\n     *\n     * Counterpart to Solidity's `int144` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 144 bits\n     */\n    function toInt144(int256 value) internal pure returns (int144 downcasted) {\n        downcasted = int144(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(144, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int136 from int256, reverting on\n     * overflow (when the input is less than smallest int136 or\n     * greater than largest int136).\n     *\n     * Counterpart to Solidity's `int136` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 136 bits\n     */\n    function toInt136(int256 value) internal pure returns (int136 downcasted) {\n        downcasted = int136(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(136, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int128 from int256, reverting on\n     * overflow (when the input is less than smallest int128 or\n     * greater than largest int128).\n     *\n     * Counterpart to Solidity's `int128` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 128 bits\n     */\n    function toInt128(int256 value) internal pure returns (int128 downcasted) {\n        downcasted = int128(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(128, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int120 from int256, reverting on\n     * overflow (when the input is less than smallest int120 or\n     * greater than largest int120).\n     *\n     * Counterpart to Solidity's `int120` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 120 bits\n     */\n    function toInt120(int256 value) internal pure returns (int120 downcasted) {\n        downcasted = int120(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(120, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int112 from int256, reverting on\n     * overflow (when the input is less than smallest int112 or\n     * greater than largest int112).\n     *\n     * Counterpart to Solidity's `int112` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 112 bits\n     */\n    function toInt112(int256 value) internal pure returns (int112 downcasted) {\n        downcasted = int112(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(112, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int104 from int256, reverting on\n     * overflow (when the input is less than smallest int104 or\n     * greater than largest int104).\n     *\n     * Counterpart to Solidity's `int104` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 104 bits\n     */\n    function toInt104(int256 value) internal pure returns (int104 downcasted) {\n        downcasted = int104(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(104, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int96 from int256, reverting on\n     * overflow (when the input is less than smallest int96 or\n     * greater than largest int96).\n     *\n     * Counterpart to Solidity's `int96` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 96 bits\n     */\n    function toInt96(int256 value) internal pure returns (int96 downcasted) {\n        downcasted = int96(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(96, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int88 from int256, reverting on\n     * overflow (when the input is less than smallest int88 or\n     * greater than largest int88).\n     *\n     * Counterpart to Solidity's `int88` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 88 bits\n     */\n    function toInt88(int256 value) internal pure returns (int88 downcasted) {\n        downcasted = int88(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(88, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int80 from int256, reverting on\n     * overflow (when the input is less than smallest int80 or\n     * greater than largest int80).\n     *\n     * Counterpart to Solidity's `int80` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 80 bits\n     */\n    function toInt80(int256 value) internal pure returns (int80 downcasted) {\n        downcasted = int80(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(80, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int72 from int256, reverting on\n     * overflow (when the input is less than smallest int72 or\n     * greater than largest int72).\n     *\n     * Counterpart to Solidity's `int72` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 72 bits\n     */\n    function toInt72(int256 value) internal pure returns (int72 downcasted) {\n        downcasted = int72(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(72, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int64 from int256, reverting on\n     * overflow (when the input is less than smallest int64 or\n     * greater than largest int64).\n     *\n     * Counterpart to Solidity's `int64` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 64 bits\n     */\n    function toInt64(int256 value) internal pure returns (int64 downcasted) {\n        downcasted = int64(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(64, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int56 from int256, reverting on\n     * overflow (when the input is less than smallest int56 or\n     * greater than largest int56).\n     *\n     * Counterpart to Solidity's `int56` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 56 bits\n     */\n    function toInt56(int256 value) internal pure returns (int56 downcasted) {\n        downcasted = int56(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(56, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int48 from int256, reverting on\n     * overflow (when the input is less than smallest int48 or\n     * greater than largest int48).\n     *\n     * Counterpart to Solidity's `int48` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 48 bits\n     */\n    function toInt48(int256 value) internal pure returns (int48 downcasted) {\n        downcasted = int48(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(48, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int40 from int256, reverting on\n     * overflow (when the input is less than smallest int40 or\n     * greater than largest int40).\n     *\n     * Counterpart to Solidity's `int40` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 40 bits\n     */\n    function toInt40(int256 value) internal pure returns (int40 downcasted) {\n        downcasted = int40(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(40, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int32 from int256, reverting on\n     * overflow (when the input is less than smallest int32 or\n     * greater than largest int32).\n     *\n     * Counterpart to Solidity's `int32` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 32 bits\n     */\n    function toInt32(int256 value) internal pure returns (int32 downcasted) {\n        downcasted = int32(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(32, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int24 from int256, reverting on\n     * overflow (when the input is less than smallest int24 or\n     * greater than largest int24).\n     *\n     * Counterpart to Solidity's `int24` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 24 bits\n     */\n    function toInt24(int256 value) internal pure returns (int24 downcasted) {\n        downcasted = int24(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(24, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int16 from int256, reverting on\n     * overflow (when the input is less than smallest int16 or\n     * greater than largest int16).\n     *\n     * Counterpart to Solidity's `int16` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 16 bits\n     */\n    function toInt16(int256 value) internal pure returns (int16 downcasted) {\n        downcasted = int16(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(16, value);\n        }\n    }\n\n    /**\n     * @dev Returns the downcasted int8 from int256, reverting on\n     * overflow (when the input is less than smallest int8 or\n     * greater than largest int8).\n     *\n     * Counterpart to Solidity's `int8` operator.\n     *\n     * Requirements:\n     *\n     * - input must fit into 8 bits\n     */\n    function toInt8(int256 value) internal pure returns (int8 downcasted) {\n        downcasted = int8(value);\n        if (downcasted != value) {\n            revert SafeCastOverflowedIntDowncast(8, value);\n        }\n    }\n\n    /**\n     * @dev Converts an unsigned uint256 into a signed int256.\n     *\n     * Requirements:\n     *\n     * - input must be less than or equal to maxInt256.\n     */\n    function toInt256(uint256 value) internal pure returns (int256) {\n        // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive\n        if (value > uint256(type(int256).max)) {\n            revert SafeCastOverflowedUintToInt(value);\n        }\n        return int256(value);\n    }\n\n    /**\n     * @dev Cast a boolean (false or true) to a uint256 (0 or 1) with no jump.\n     */\n    function toUint(bool b) internal pure returns (uint256 u) {\n        assembly (\"memory-safe\") {\n            u := iszero(iszero(b))\n        }\n    }\n}\n"},"src/interfaces/internals/USG/IRewardAccumulator.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.24;\n\nimport {TokenAmount, IERC20} from \"../ICommonStruct.sol\";\n\nstruct Reward {\n    uint128 lastUpdateTime;\n    uint128 periodFinish;\n    uint256 rewardRate;\n    uint256 rewardPerTokenStored;\n}\nstruct RCParams {\n    uint16 harvestFeePercentage;\n    /// @dev Amount of distincts reward cut steps.\n    uint16 stepAmount;\n    /// @dev Percentage minimum of the reward cut.\n    uint32 startCutPercentage;\n    /// @dev Percentage maximum of the reward cut.\n    uint32 endCutPercentage;\n    /// @dev Price of USG on which the reward cut starts to increase.\n    uint80 startCutPrice;\n    /// @dev Price of USG on which the reward cut is at its maximum\n    uint80 endCutPrice;\n}\ninterface IRewardAccumulator {\n    function cutFeeForToken(IERC20 token) external view returns (uint256);\n\n    function getRewardData(address market, IERC20 token) external view returns (Reward memory);\n\n    function updateRewards(address account, uint256 collateralBalances, uint256 totalCollateral) external;\n\n    function processRewards(address market, address harvestFeeReceiver) external;\n\n    function getRewardTokens(address markets) external view returns (IERC20[] memory);\n\n    function lastRewardCuts(address market) external view returns (uint256);\n\n    function claimableRewards(address market, address _account) external view returns (TokenAmount[] memory userRewards);\n\n    function simulateRC(uint256 USGPrice, RCParams calldata rcParams) external pure returns (uint256);\n\n    function computeRCForMarket(address market) external returns (uint256);\n\n    function initializeMarket(address market, IERC20[] calldata rewardTokens, RCParams calldata _rcParams) external;\n\n    function getRCParams(address markets) external view returns (RCParams memory);\n}\n"},"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"../IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC-20 standard.\n */\ninterface IERC20Metadata is IERC20 {\n    /**\n     * @dev Returns the name of the token.\n     */\n    function name() external view returns (string memory);\n\n    /**\n     * @dev Returns the symbol of the token.\n     */\n    function symbol() external view returns (string memory);\n\n    /**\n     * @dev Returns the decimals places of the token.\n     */\n    function decimals() external view returns (uint8);\n}\n"}},"language":"Solidity","settings":{"optimizer":{"runs":1000000,"enabled":true},"evmVersion":"cancun"}},"stdJsonOutput":{"sources":{"src/USG/Utilities/MarketViewer.sol":{"id":5},"@openzeppelin/contracts/utils/Panic.sol":{"id":2},"src/interfaces/internals/USG/IDebtIR.sol":{"id":8},"src/interfaces/internals/ICommonStruct.sol":{"id":6},"@openzeppelin/contracts/utils/math/Math.sol":{"id":3},"src/interfaces/internals/USG/ICollateral.sol":{"id":7},"src/interfaces/internals/USG/IPriceOracle.sol":{"id":11},"@openzeppelin/contracts/token/ERC20/IERC20.sol":{"id":0},"src/interfaces/internals/USG/IIRCalculator.sol":{"id":9},"src/interfaces/internals/USG/IMarketViewer.sol":{"id":10},"@openzeppelin/contracts/utils/math/SafeCast.sol":{"id":4},"src/interfaces/internals/USG/IRewardAccumulator.sol":{"id":12},"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol":{"id":1}},"contracts":{"src/USG/Utilities/MarketViewer.sol":{"MarketViewer":{"abi":[{"name":"healthRatio","type":"function","inputs":[{"name":"market","type":"address","internalType":"address"},{"name":"account","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"maxBorrowable","type":"function","inputs":[{"name":"market","type":"address","internalType":"contract ICollateral"},{"name":"account","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"pendingInterests","type":"function","inputs":[{"name":"market","type":"address","internalType":"contract IDebtIR"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"positionValue","type":"function","inputs":[{"name":"market","type":"address","internalType":"contract ICollateral"},{"name":"account","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"totalDebt","type":"function","inputs":[{"name":"market","type":"address","internalType":"contract IDebtIR"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"userDebt","type":"function","inputs":[{"name":"market","type":"address","internalType":"contract IDebtIR"},{"name":"account","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"}],"metadata":"{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"market\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"healthRatio\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ICollateral\",\"name\":\"market\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"maxBorrowable\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IDebtIR\",\"name\":\"market\",\"type\":\"address\"}],\"name\":\"pendingInterests\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ICollateral\",\"name\":\"market\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"positionValue\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IDebtIR\",\"name\":\"market\",\"type\":\"address\"}],\"name\":\"totalDebt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IDebtIR\",\"name\":\"market\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"userDebt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Tangent Finance\",\"kind\":\"dev\",\"methods\":{\"healthRatio(address,address)\":{\"params\":{\"account\":\"Address holding the collateral position.\",\"market\":\"Address of the market where the position is.\"},\"returns\":{\"_0\":\"healthRatio  Health Ratio of a position (1e18 base).\"}},\"maxBorrowable(address,address)\":{\"params\":{\"account\":\"Address holding the collateral position.\",\"market\":\"Address of the market where the position is.\"},\"returns\":{\"_0\":\"maxBorrowable Max borrowable in USG of an account\"}},\"pendingInterests(address)\":{\"params\":{\"market\":\"Address of the market.\"},\"returns\":{\"_0\":\"pendingInterests Amount in USG accrued since last checkpoint.\"}},\"positionValue(address,address)\":{\"params\":{\"account\":\"Address holding the collateral position.\",\"market\":\"Address of the market where the position is.\"},\"returns\":{\"_0\":\"positionValue Value in USD of the position (1e18 precision)\"}},\"totalDebt(address)\":{\"details\":\"Applies the interest index to total debt shares and adds bad debt\",\"params\":{\"market\":\"Address of the market\"},\"returns\":{\"_0\":\"totalDebt Debt total of the market in USG\"}},\"userDebt(address,address)\":{\"details\":\"Applies current debt index to user's stored shares\",\"params\":{\"account\":\"Address holding the debt position\",\"market\":\"Address of the market where the position is\"},\"returns\":{\"_0\":\"userDebt Debt of the user in USG\"}}},\"title\":\"MarketViewer\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"healthRatio(address,address)\":{\"notice\":\"Computes a user's health ratio (safety of collateral vs debt)         Higher is safer. When HR < 1, position becomes liquidable.\"},\"maxBorrowable(address,address)\":{\"notice\":\"Returns the maximum amount of USG a user can borrow based on his collateral amount and LTV of the market\"},\"pendingInterests(address)\":{\"notice\":\"Calculates the interest accumulated since last checkpoint of a market\"},\"positionValue(address,address)\":{\"notice\":\"Returns the USD value of the user's collateral\"},\"totalDebt(address)\":{\"notice\":\"Returns the current total debt in USG of a `market` (including interest)\"},\"userDebt(address,address)\":{\"notice\":\"Returns the debt of an user (including accrued interest)\"}},\"notice\":\"Computes and return all information related to markets\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/USG/Utilities/MarketViewer.sol\":\"MarketViewer\"},\"evmVersion\":\"cancun\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":1000000},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"keccak256\":\"0xe06a3f08a987af6ad2e1c1e774405d4fe08f1694b67517438b467cecf0da0ef7\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://df6f0c459663c9858b6cba2cda1d14a7d05a985bed6d2de72bd8e78c25ee79db\",\"dweb:/ipfs/QmeTTxZ7qVk9rjEv2R4CpCwdf8UMCcRqDNMvzNxHc3Fnn9\"]},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"keccak256\":\"0x70f2f713b13b7ce4610bcd0ac9fec0f3cc43693b043abcb8dc40a42a726eb330\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c13d13304ac79a83ab1c30168967d19e2203342ebbd6a9bbce4db7550522dcbf\",\"dweb:/ipfs/QmeN5jKMN2vw5bhacr6tkg78afbTTZUeaacNHqjWt4Ew1r\"]},\"@openzeppelin/contracts/utils/Panic.sol\":{\"keccak256\":\"0xf7fe324703a64fc51702311dc51562d5cb1497734f074e4f483bfb6717572d7a\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c6a5ff4f9fd8649b7ee20800b7fa387d3465bd77cf20c2d1068cd5c98e1ed57a\",\"dweb:/ipfs/QmVSaVJf9FXFhdYEYeCEfjMVHrxDh5qL4CGkxdMWpQCrqG\"]},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"keccak256\":\"0xa00be322d7db5786750ce0ac7e2f5b633ac30a5ed5fa1ced1e74acfc19acecea\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6c84e822f87cbdc4082533b626667b6928715bb2b1e8e7eb96954cebb9e38c8d\",\"dweb:/ipfs/QmZmy9dgxLTerBAQDuuHqbL6EpgRxddqgv5KmwpXYVbKz1\"]},\"@openzeppelin/contracts/utils/math/SafeCast.sol\":{\"keccak256\":\"0x195533c86d0ef72bcc06456a4f66a9b941f38eb403739b00f21fd7c1abd1ae54\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b1d578337048cad08c1c03041cca5978eff5428aa130c781b271ad9e5566e1f8\",\"dweb:/ipfs/QmPFKL2r9CBsMwmUqqdcFPfHZB2qcs9g1HDrPxzWSxomvy\"]},\"src/USG/Utilities/MarketViewer.sol\":{\"keccak256\":\"0x522400c1480ea3381afa83b7a16ae2cb747eb437a13a3f290571aa8d058c0a91\",\"license\":\"UNLICENSED\",\"urls\":[\"bzz-raw://239d9f5cef44a09fcc083dddeceee0334e1965f15a9638c810aabc93c3604a75\",\"dweb:/ipfs/QmTQyqGFCDL6K6aoXK4D1jndenacFCsNCfFjCW1gJyvrQn\"]},\"src/interfaces/internals/ICommonStruct.sol\":{\"keccak256\":\"0xe66889d5bf49a2f13723f5f1ff3f365b925ecd7d0dc387994cb0a9f0842aeede\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://94689e9878196025dc72cd58cdf9c97deb7ab79740d557ae44e0883e66d080ac\",\"dweb:/ipfs/QmVceqC6CRy3tYLoQJsFoZritH2QiRC4dSVgXuXRb7X4hC\"]},\"src/interfaces/internals/USG/ICollateral.sol\":{\"keccak256\":\"0x9c1a059c6ae1bbc0c305419462be6f0655b517b12d2528a035d8dff2444cae53\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://46445e314d7b35cfc71b9b31d0e8a89fc807d1eee1be87ab88925a530ae16700\",\"dweb:/ipfs/QmS4fkVszW4euaqqYqDbcEr1cbKbYA885Lcw38dEPozGKY\"]},\"src/interfaces/internals/USG/IDebtIR.sol\":{\"keccak256\":\"0xf1b17238a3c8a96ce1ad44f5e772016a7a35722f7a76bb4f552516f949295943\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://e556853a4f5be1dd697de721a258e0183c5c6cb691eafbfc461884dca2b17026\",\"dweb:/ipfs/QmXhbrRBFTpYKKBR9GiLQuL5n1c9hedZkfAC1W5RNRfJch\"]},\"src/interfaces/internals/USG/IIRCalculator.sol\":{\"keccak256\":\"0xec390b63b76bfdbf7165e66d652210b6774427d6cce7a38346babd016dc6c275\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b83dfe894d175e626c4f6004f841b3817603e83bc08439ce6da9e94fdfe89efb\",\"dweb:/ipfs/Qme99R42frMKaizYzo36FFLmWnNRiywnD8n6GsrEbaK6LK\"]},\"src/interfaces/internals/USG/IMarketViewer.sol\":{\"keccak256\":\"0xd8fca13132073524fe35da7ad2bba3794b5a25623cea34205bfcac556cb34a17\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c23c1c05875097ebe9123a9257874a5de200d18e998c44bd91619aa2774d7d0a\",\"dweb:/ipfs/QmdW58cNgTQUnTpMdjSLzhWFK1hM2A3jWXvoGz1oCXV3jj\"]},\"src/interfaces/internals/USG/IPriceOracle.sol\":{\"keccak256\":\"0x1d696fafdc5f4d3a3eba8249ba885d76061d2767a1891f0fb27b88ffadcb091c\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://2d098310848e34010993e80e23276d50a2ce7bed605d7cf6835b5953b62147d7\",\"dweb:/ipfs/Qmak9vsPkcLhSLGVDbb3Lvna72tNPvUVFZ3QrhCjuqCAgw\"]},\"src/interfaces/internals/USG/IRewardAccumulator.sol\":{\"keccak256\":\"0xd68ae48cf25d77fc53ee202c3e32fa2437d8f57de62bdfcad1eda8e997c09e0c\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://07632ade2c266a7d7b70177672e5d5acacae551e1298b356303a54a668fbb111\",\"dweb:/ipfs/QmRT6sRbwo1amdxcGJdqhnCcoU5nNvFbv6msxBcpFfEieB\"]}},\"version\":1}","userdoc":{"kind":"user","notice":"Computes and return all information related to markets","methods":{"totalDebt(address)":{"notice":"Returns the current total debt in USG of a `market` (including interest)"},"pendingInterests(address)":{"notice":"Calculates the interest accumulated since last checkpoint of a market"},"userDebt(address,address)":{"notice":"Returns the debt of an user (including accrued interest)"},"healthRatio(address,address)":{"notice":"Computes a user's health ratio (safety of collateral vs debt)         Higher is safer. When HR < 1, position becomes liquidable."},"maxBorrowable(address,address)":{"notice":"Returns the maximum amount of USG a user can borrow based on his collateral amount and LTV of the market"},"positionValue(address,address)":{"notice":"Returns the USD value of the user's collateral"}},"version":1},"devdoc":{"kind":"dev","title":"MarketViewer","author":"Tangent Finance","methods":{"totalDebt(address)":{"params":{"market":"Address of the market"},"details":"Applies the interest index to total debt shares and adds bad debt","returns":{"_0":"totalDebt Debt total of the market in USG"}},"pendingInterests(address)":{"params":{"market":"Address of the market."},"returns":{"_0":"pendingInterests Amount in USG accrued since last checkpoint."}},"userDebt(address,address)":{"params":{"market":"Address of the market where the position is","account":"Address holding the debt position"},"details":"Applies current debt index to user's stored shares","returns":{"_0":"userDebt Debt of the user in USG"}},"healthRatio(address,address)":{"params":{"market":"Address of the market where the position is.","account":"Address holding the collateral position."},"returns":{"_0":"healthRatio  Health Ratio of a position (1e18 base)."}},"maxBorrowable(address,address)":{"params":{"market":"Address of the market where the position is.","account":"Address holding the collateral position."},"returns":{"_0":"maxBorrowable Max borrowable in USG of an account"}},"positionValue(address,address)":{"params":{"market":"Address of the market where the position is.","account":"Address holding the collateral position."},"returns":{"_0":"positionValue Value in USD of the position (1e18 precision)"}}},"version":1},"storageLayout":{"types":null,"storage":[]},"transientStorageLayout":{"types":null,"storage":[]},"evm":{"bytecode":{"object":"6080604052348015600e575f5ffd5b50610fa78061001c5f395ff3fe608060405234801561000f575f5ffd5b506004361061006f575f3560e01c8063d6d8a43e1161004d578063d6d8a43e146100be578063f0a05395146100d1578063f9c51f27146100e4575f5ffd5b806314c8ad2c146100735780631ff517ff14610098578063d394dd9c146100ab575b5f5ffd5b610086610081366004610cc9565b6100f7565b60405190815260200160405180910390f35b6100866100a6366004610d00565b610299565b6100866100b9366004610cc9565b610444565b6100866100cc366004610d00565b610742565b6100866100df366004610cc9565b6108b6565b6100866100f2366004610cc9565b610946565b6040517f9198e84000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82811660048301525f9161029091851690639198e84090602401602060405180830381865afa158015610167573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061018b9190610d1b565b8473ffffffffffffffffffffffffffffffffffffffff1663a043d6d76040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101d4573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906101f89190610d32565b6040517f7d7d33d000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff87811660048301529190911690637d7d33d0906024015b602060405180830381865afa158015610265573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906102899190610d1b565b6001610b25565b90505b92915050565b5f6103cd8273ffffffffffffffffffffffffffffffffffffffff16631b859e416040518163ffffffff1660e01b8152600401602060405180830381865afa1580156102e6573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061030a9190610d1b565b8373ffffffffffffffffffffffffffffffffffffffff1663a043d6d76040518163ffffffff1660e01b8152600401602060405180830381865afa158015610353573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103779190610d32565b6040517f7d7d33d000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff86811660048301529190911690637d7d33d09060240161024a565b8273ffffffffffffffffffffffffffffffffffffffff1663bbcac5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015610416573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061043a9190610d1b565b6102939190610d7a565b5f5f61045084846100f7565b90508015610719575f8490505f8173ffffffffffffffffffffffffffffffffffffffff16633d07b1766040518163ffffffff1660e01b8152600401602060405180830381865afa1580156104a6573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104ca9190610d32565b6040517fff2ba6150000000000000000000000000000000000000000000000000000000081526001600482015273ffffffffffffffffffffffffffffffffffffffff919091169063ff2ba61590602401602060405180830381865afa158015610535573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105599190610d1b565b905061056883620186a0610d8d565b8273ffffffffffffffffffffffffffffffffffffffff16634031234c6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156105b1573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105d59190610d1b565b828473ffffffffffffffffffffffffffffffffffffffff16639bd6012f6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561061f573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106439190610d1b565b61064e906012610da4565b61065990600a610ed8565b6040517f29bc969d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8a811660048301528716906329bc969d90602401602060405180830381865afa1580156106c3573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106e79190610d1b565b6106f19190610d8d565b6106fb9190610d8d565b6107059190610d8d565b61070f9190610f10565b9350505050610293565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9392505050565b5f6102938273ffffffffffffffffffffffffffffffffffffffff16631b859e416040518163ffffffff1660e01b8152600401602060405180830381865afa15801561078f573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107b39190610d1b565b8373ffffffffffffffffffffffffffffffffffffffff1663a043d6d76040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107fc573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108209190610d32565b6040517fbbe462ce00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8681166004830152919091169063bbe462ce90602401602060405180830381865afa15801561088c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108b09190610d1b565b5f610b25565b5f620186a06108c58484610946565b8473ffffffffffffffffffffffffffffffffffffffff1663f384bd056040518163ffffffff1660e01b8152600401602060405180830381865afa15801561090e573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109329190610d1b565b61093c9190610d8d565b6102909190610f10565b5f8273ffffffffffffffffffffffffffffffffffffffff16639bd6012f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610990573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109b49190610d1b565b6109bf90600a610ed8565b8373ffffffffffffffffffffffffffffffffffffffff16633d07b1766040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a08573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a2c9190610d32565b6040517fff2ba6150000000000000000000000000000000000000000000000000000000081526001600482015273ffffffffffffffffffffffffffffffffffffffff919091169063ff2ba61590602401602060405180830381865afa158015610a97573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610abb9190610d1b565b6040517f29bc969d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85811660048301528616906329bc969d90602401602060405180830381865afa15801561090e573d5f5f3e3d5ffd5b5f610b3e84846b033b2e3c9fd0803ce800000085610b48565b90505b9392505050565b5f610b75610b5583610b93565b8015610b7057505f8480610b6b57610b6b610ee3565b868809115b151590565b610b80868686610bbf565b610b8a9190610d7a565b95945050505050565b5f6002826003811115610ba857610ba8610f23565b610bb29190610f50565b60ff166001149050919050565b5f838302817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff85870982811083820303915050805f03610c1257838281610c0857610c08610ee3565b0492505050610b41565b808411610c2957610c296003851502601118610c94565b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010186841190950394909402919094039290920491909117919091029150509392505050565b634e487b715f52806020526024601cfd5b73ffffffffffffffffffffffffffffffffffffffff81168114610cc6575f5ffd5b50565b5f5f60408385031215610cda575f5ffd5b8235610ce581610ca5565b91506020830135610cf581610ca5565b809150509250929050565b5f60208284031215610d10575f5ffd5b8135610b4181610ca5565b5f60208284031215610d2b575f5ffd5b5051919050565b5f60208284031215610d42575f5ffd5b8151610b4181610ca5565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b8082018082111561029357610293610d4d565b808202811582820484141761029357610293610d4d565b8181038181111561029357610293610d4d565b6001815b6001841115610df257808504811115610dd657610dd6610d4d565b6001841615610de457908102905b60019390931c928002610dbb565b935093915050565b5f82610e0857506001610293565b81610e1457505f610293565b8160018114610e2a5760028114610e3457610e50565b6001915050610293565b60ff841115610e4557610e45610d4d565b50506001821b610293565b5060208310610133831016604e8410600b8410161715610e73575081810a610293565b610e9e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8484610db7565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115610ed057610ed0610d4d565b029392505050565b5f6102908383610dfa565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f82610f1e57610f1e610ee3565b500490565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b5f60ff831680610f6257610f62610ee3565b8060ff8416069150509291505056fea264697066735822122085fc80a38af2b9bf0724bc3e37e3a26641e06268e6771891df1c827a6d2ba2d164736f6c634300081c0033","sourceMap":"477:4451:5:-:0;;;;;;;;;;;;;;;;;;;","linkReferences":{}},"deployedBytecode":{"object":"608060405234801561000f575f5ffd5b506004361061006f575f3560e01c8063d6d8a43e1161004d578063d6d8a43e146100be578063f0a05395146100d1578063f9c51f27146100e4575f5ffd5b806314c8ad2c146100735780631ff517ff14610098578063d394dd9c146100ab575b5f5ffd5b610086610081366004610cc9565b6100f7565b60405190815260200160405180910390f35b6100866100a6366004610d00565b610299565b6100866100b9366004610cc9565b610444565b6100866100cc366004610d00565b610742565b6100866100df366004610cc9565b6108b6565b6100866100f2366004610cc9565b610946565b6040517f9198e84000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82811660048301525f9161029091851690639198e84090602401602060405180830381865afa158015610167573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061018b9190610d1b565b8473ffffffffffffffffffffffffffffffffffffffff1663a043d6d76040518163ffffffff1660e01b8152600401602060405180830381865afa1580156101d4573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906101f89190610d32565b6040517f7d7d33d000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff87811660048301529190911690637d7d33d0906024015b602060405180830381865afa158015610265573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906102899190610d1b565b6001610b25565b90505b92915050565b5f6103cd8273ffffffffffffffffffffffffffffffffffffffff16631b859e416040518163ffffffff1660e01b8152600401602060405180830381865afa1580156102e6573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061030a9190610d1b565b8373ffffffffffffffffffffffffffffffffffffffff1663a043d6d76040518163ffffffff1660e01b8152600401602060405180830381865afa158015610353573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103779190610d32565b6040517f7d7d33d000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff86811660048301529190911690637d7d33d09060240161024a565b8273ffffffffffffffffffffffffffffffffffffffff1663bbcac5576040518163ffffffff1660e01b8152600401602060405180830381865afa158015610416573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061043a9190610d1b565b6102939190610d7a565b5f5f61045084846100f7565b90508015610719575f8490505f8173ffffffffffffffffffffffffffffffffffffffff16633d07b1766040518163ffffffff1660e01b8152600401602060405180830381865afa1580156104a6573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104ca9190610d32565b6040517fff2ba6150000000000000000000000000000000000000000000000000000000081526001600482015273ffffffffffffffffffffffffffffffffffffffff919091169063ff2ba61590602401602060405180830381865afa158015610535573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105599190610d1b565b905061056883620186a0610d8d565b8273ffffffffffffffffffffffffffffffffffffffff16634031234c6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156105b1573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105d59190610d1b565b828473ffffffffffffffffffffffffffffffffffffffff16639bd6012f6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561061f573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106439190610d1b565b61064e906012610da4565b61065990600a610ed8565b6040517f29bc969d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8a811660048301528716906329bc969d90602401602060405180830381865afa1580156106c3573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106e79190610d1b565b6106f19190610d8d565b6106fb9190610d8d565b6107059190610d8d565b61070f9190610f10565b9350505050610293565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9392505050565b5f6102938273ffffffffffffffffffffffffffffffffffffffff16631b859e416040518163ffffffff1660e01b8152600401602060405180830381865afa15801561078f573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107b39190610d1b565b8373ffffffffffffffffffffffffffffffffffffffff1663a043d6d76040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107fc573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108209190610d32565b6040517fbbe462ce00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8681166004830152919091169063bbe462ce90602401602060405180830381865afa15801561088c573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108b09190610d1b565b5f610b25565b5f620186a06108c58484610946565b8473ffffffffffffffffffffffffffffffffffffffff1663f384bd056040518163ffffffff1660e01b8152600401602060405180830381865afa15801561090e573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109329190610d1b565b61093c9190610d8d565b6102909190610f10565b5f8273ffffffffffffffffffffffffffffffffffffffff16639bd6012f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610990573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109b49190610d1b565b6109bf90600a610ed8565b8373ffffffffffffffffffffffffffffffffffffffff16633d07b1766040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a08573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a2c9190610d32565b6040517fff2ba6150000000000000000000000000000000000000000000000000000000081526001600482015273ffffffffffffffffffffffffffffffffffffffff919091169063ff2ba61590602401602060405180830381865afa158015610a97573d5f5f3e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610abb9190610d1b565b6040517f29bc969d00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85811660048301528616906329bc969d90602401602060405180830381865afa15801561090e573d5f5f3e3d5ffd5b5f610b3e84846b033b2e3c9fd0803ce800000085610b48565b90505b9392505050565b5f610b75610b5583610b93565b8015610b7057505f8480610b6b57610b6b610ee3565b868809115b151590565b610b80868686610bbf565b610b8a9190610d7a565b95945050505050565b5f6002826003811115610ba857610ba8610f23565b610bb29190610f50565b60ff166001149050919050565b5f838302817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff85870982811083820303915050805f03610c1257838281610c0857610c08610ee3565b0492505050610b41565b808411610c2957610c296003851502601118610c94565b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010186841190950394909402919094039290920491909117919091029150509392505050565b634e487b715f52806020526024601cfd5b73ffffffffffffffffffffffffffffffffffffffff81168114610cc6575f5ffd5b50565b5f5f60408385031215610cda575f5ffd5b8235610ce581610ca5565b91506020830135610cf581610ca5565b809150509250929050565b5f60208284031215610d10575f5ffd5b8135610b4181610ca5565b5f60208284031215610d2b575f5ffd5b5051919050565b5f60208284031215610d42575f5ffd5b8151610b4181610ca5565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b8082018082111561029357610293610d4d565b808202811582820484141761029357610293610d4d565b8181038181111561029357610293610d4d565b6001815b6001841115610df257808504811115610dd657610dd6610d4d565b6001841615610de457908102905b60019390931c928002610dbb565b935093915050565b5f82610e0857506001610293565b81610e1457505f610293565b8160018114610e2a5760028114610e3457610e50565b6001915050610293565b60ff841115610e4557610e45610d4d565b50506001821b610293565b5060208310610133831016604e8410600b8410161715610e73575081810a610293565b610e9e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8484610db7565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115610ed057610ed0610d4d565b029392505050565b5f6102908383610dfa565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f82610f1e57610f1e610ee3565b500490565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b5f60ff831680610f6257610f62610ee3565b8060ff8416069150509291505056fea264697066735822122085fc80a38af2b9bf0724bc3e37e3a26641e06268e6771891df1c827a6d2ba2d164736f6c634300081c0033","sourceMap":"477:4451:5:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1446:226;;;;;;:::i;:::-;;:::i;:::-;;;755:25:13;;;743:2;728:18;1446:226:5;;;;;;;894:225;;;;;;:::i;:::-;;:::i;2043:793::-;;;;;;:::i;:::-;;:::i;4095:212::-;;;;;;:::i;:::-;;:::i;3689:177::-;;;;;;:::i;:::-;;:::i;3125:227::-;;;;;;:::i;:::-;;:::i;1446:226::-;1561:30;;;;;:21;2074:55:13;;;1561:30:5;;;2056:74:13;1518:7:5;;1544:121;;1561:21;;;;;2029:18:13;;1561:30:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1593:6;:19;;;:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:51;;;;;:34;2074:55:13;;;1593:51:5;;;2056:74:13;1593:34:5;;;;;;;2029:18:13;;1593:51:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1646:18;1544:16;:121::i;:::-;1537:128;;1446:226;;;;;:::o;894:225::-;952:7;997:115;1014:6;:22;;;:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1040:6;:19;;;:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:51;;;;;:34;2074:55:13;;;1040:51:5;;;2056:74:13;1040:34:5;;;;;;;2029:18:13;;1040:51:5;1910:226:13;997:115:5;978:6;:14;;;:16;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:134;;;;:::i;2043:793::-;2120:7;2139:17;2159:34;2176:6;2185:7;2159:8;:34::i;:::-;2139:54;-1:-1:-1;2207:14:5;;2203:574;;2237:24;2276:6;2237:46;;2349:19;2371:12;:25;;;:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:46;;;;;2412:4;2371:46;;;3362:41:13;2371:40:5;;;;;;;;3335:18:13;;2371:46:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2349:68;-1:-1:-1;2746:19:5;:9;2758:7;2746:19;:::i;:::-;2706:12;:33;;;:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2692:11;2659:12;:27;;;:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;2654:34;;:2;:34;:::i;:::-;2647:42;;:2;:42;:::i;:::-;2604:40;;;;;:31;2074:55:13;;;2604:40:5;;;2056:74:13;2604:31:5;;;;;2029:18:13;;2604:40:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:85;;;;:::i;:::-;:99;;;;:::i;:::-;:137;;;;:::i;:::-;2603:163;;;;:::i;:::-;2580:186;;;;;;;2203:574;-1:-1:-1;598:2:5;;2043:793;-1:-1:-1;;;2043:793:5:o;4095:212::-;4160:7;4186:114;4203:6;:22;;;:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;4229:6;:19;;;:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:49;;;;;:32;2074:55:13;;;4229:49:5;;;2056:74:13;4229:32:5;;;;;;;2029:18:13;;4229:49:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;4280:19;4186:16;:114::i;3689:177::-;3772:7;3852;3817:31;3832:6;3840:7;3817:14;:31::i;:::-;3799:6;:13;;;:15;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:49;;;;:::i;:::-;3798:61;;;;:::i;3125:227::-;3208:7;3322:6;:21;;;:23;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;3316:29;;:2;:29;:::i;:::-;3272:6;:19;;;:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:40;;;;;3307:4;3272:40;;;3362:41:13;3272:34:5;;;;;;;;3335:18:13;;3272:40:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;3235:34;;;;;:25;2074:55:13;;;3235:34:5;;;2056:74:13;3235:25:5;;;;;2029:18:13;;3235:34:5;;;;;;;;;;;;;;;;;;;;;;4732:194;4844:7;4870:49;4882:10;4894:5;545:4;4906:12;4870:11;:49::i;:::-;4863:56;;4732:194;;;;;;:::o;9351:238:3:-;9452:7;9506:76;9522:26;9539:8;9522:16;:26::i;:::-;:59;;;;;9580:1;9565:11;9552:25;;;;;:::i;:::-;9562:1;9559;9552:25;:29;9522:59;34914:9:4;34907:17;;34795:145;9506:76:3;9478:25;9485:1;9488;9491:11;9478:6;:25::i;:::-;:104;;;;:::i;:::-;9471:111;9351:238;-1:-1:-1;;;;;9351:238:3:o;28183:122::-;28251:4;28292:1;28280:8;28274:15;;;;;;;;:::i;:::-;:19;;;;:::i;:::-;:24;;28297:1;28274:24;28267:31;;28183:122;;;:::o;4996:4226::-;5078:14;5449:5;;;5078:14;5634:6;5453:1;5449;5621:20;5694:5;5690:2;5687:13;5679:5;5675:2;5671:14;5667:34;5658:43;;;5796:5;5805:1;5796:10;5792:368;;6134:11;6126:5;:19;;;;;:::i;:::-;;6119:26;;;;;;5792:368;6285:5;6270:11;:20;6266:143;;6310:84;3066:5;6330:16;;3065:36;940:4:2;3060:42:3;6310:11;:84::i;:::-;6664:17;6799:11;6796:1;6793;6786:25;7199:12;7229:15;;;7214:31;;7348:22;;;;;8094:1;8075;:15;;8074:21;;8327;;;8323:25;;8312:36;8397:21;;;8393:25;;8382:36;8469:21;;;8465:25;;8454:36;8540:21;;;8536:25;;8525:36;8613:21;;;8609:25;;8598:36;8687:21;;;8683:25;;;8672:36;7597:12;;;;7593:23;;;7618:1;7589:31;6913:20;;;6902:32;;;7709:12;;;;6960:21;;;;7446:16;;;;7700:21;;;;9163:15;;;;;-1:-1:-1;;4996:4226:3;;;;;:::o;1776:194:2:-;1881:10;1875:4;1868:24;1918:4;1912;1905:18;1949:4;1943;1936:18;14:163:13;109:42;102:5;98:54;91:5;88:65;78:93;;167:1;164;157:12;78:93;14:163;:::o;182:422::-;266:6;274;327:2;315:9;306:7;302:23;298:32;295:52;;;343:1;340;333:12;295:52;382:9;369:23;401:40;435:5;401:40;:::i;:::-;460:5;-1:-1:-1;517:2:13;502:18;;489:32;530:42;489:32;530:42;:::i;:::-;591:7;581:17;;;182:422;;;;;:::o;791:272::-;866:6;919:2;907:9;898:7;894:23;890:32;887:52;;;935:1;932;925:12;887:52;974:9;961:23;993:40;1027:5;993:40;:::i;2141:184::-;2211:6;2264:2;2252:9;2243:7;2239:23;2235:32;2232:52;;;2280:1;2277;2270:12;2232:52;-1:-1:-1;2303:16:13;;2141:184;-1:-1:-1;2141:184:13:o;2330:282::-;2422:6;2475:2;2463:9;2454:7;2450:23;2446:32;2443:52;;;2491:1;2488;2481:12;2443:52;2523:9;2517:16;2542:40;2576:5;2542:40;:::i;2617:184::-;2669:77;2666:1;2659:88;2766:4;2763:1;2756:15;2790:4;2787:1;2780:15;2806:125;2871:9;;;2892:10;;;2889:36;;;2905:18;;:::i;3414:168::-;3487:9;;;3518;;3535:15;;;3529:22;;3515:37;3505:71;;3556:18;;:::i;3587:128::-;3654:9;;;3675:11;;;3672:37;;;3689:18;;:::i;3720:375::-;3808:1;3826:5;3840:249;3861:1;3851:8;3848:15;3840:249;;;3911:4;3906:3;3902:14;3896:4;3893:24;3890:50;;;3920:18;;:::i;:::-;3970:1;3960:8;3956:16;3953:49;;;3984:16;;;;3953:49;4067:1;4063:16;;;;;4023:15;;3840:249;;;3720:375;;;;;;:::o;4100:1022::-;4149:5;4179:8;4169:80;;-1:-1:-1;4220:1:13;4234:5;;4169:80;4268:4;4258:76;;-1:-1:-1;4305:1:13;4319:5;;4258:76;4350:4;4368:1;4363:59;;;;4436:1;4431:174;;;;4343:262;;4363:59;4393:1;4384:10;;4407:5;;;4431:174;4468:3;4458:8;4455:17;4452:43;;;4475:18;;:::i;:::-;-1:-1:-1;;4531:1:13;4517:16;;4590:5;;4343:262;;4689:2;4679:8;4676:16;4670:3;4664:4;4661:13;4657:36;4651:2;4641:8;4638:16;4633:2;4627:4;4624:12;4620:35;4617:77;4614:203;;;-1:-1:-1;4726:19:13;;;4802:5;;4614:203;4849:102;4884:66;4874:8;4868:4;4849:102;:::i;:::-;5047:6;4979:66;4975:79;4966:7;4963:92;4960:118;;;5058:18;;:::i;:::-;5096:20;;4100:1022;-1:-1:-1;;;4100:1022:13:o;5127:131::-;5187:5;5216:36;5243:8;5237:4;5216:36;:::i;5263:184::-;5315:77;5312:1;5305:88;5412:4;5409:1;5402:15;5436:4;5433:1;5426:15;5452:120;5492:1;5518;5508:35;;5523:18;;:::i;:::-;-1:-1:-1;5557:9:13;;5452:120::o;5577:184::-;5629:77;5626:1;5619:88;5726:4;5723:1;5716:15;5750:4;5747:1;5740:15;5766:157;5796:1;5830:4;5827:1;5823:12;5854:3;5844:37;;5861:18;;:::i;:::-;5913:3;5906:4;5903:1;5899:12;5895:22;5890:27;;;5766:157;;;;:::o","linkReferences":{},"immutableReferences":{}}}}}}},"signatures":{"function":[{"signature":"healthRatio(address,address)","signatureHash4":"0xd394dd9c","signatureHash32":"0xd394dd9c2a329c75eefe76a991d6042b9addcd153d460a7f4dfb88a39bc7805d"},{"signature":"maxBorrowable(address,address)","signatureHash4":"0xf0a05395","signatureHash32":"0xf0a05395e3204535791bdfae1586b64427aeebdf6ba2b36f1783658021961786"},{"signature":"pendingInterests(address)","signatureHash4":"0xd6d8a43e","signatureHash32":"0xd6d8a43e1eab00862d5228f9430c038c6ead90fda89d08553f04fcdc839d0f1f"},{"signature":"positionValue(address,address)","signatureHash4":"0xf9c51f27","signatureHash32":"0xf9c51f27931e8de21a89a5ab891ecd9e903f95a8a59a0a0f5d90d1366bad68db"},{"signature":"totalDebt(address)","signatureHash4":"0x1ff517ff","signatureHash32":"0x1ff517fff0ba3c149ab398a5ec5abdd7546666805d6460d44e452d52f5b2ead4"},{"signature":"userDebt(address,address)","signatureHash4":"0x14c8ad2c","signatureHash32":"0x14c8ad2c822cd7d987cc692caf336e583c813a76b236964f718fa4101845a60e"}],"event":[],"error":[]},"proxyResolution":{"isProxy":false,"proxyType":null,"implementations":[]},"match":"exact_match","chainId":"1","address":"0x05aFEe1B483DdA7273be250f93219b607EA2477D"}