@aave/react 4.0.0-next.32 → 4.0.0-next.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-3TDVAQWZ.js +1664 -0
- package/dist/chunk-3TDVAQWZ.js.map +1 -0
- package/dist/chunk-6A77Z4MD.js +2 -0
- package/dist/chunk-6A77Z4MD.js.map +1 -0
- package/dist/chunk-PYBBLRVB.js +2 -0
- package/dist/chunk-PYBBLRVB.js.map +1 -0
- package/dist/chunk-Q5WBQO2R.js +2 -0
- package/dist/chunk-Q5WBQO2R.js.map +1 -0
- package/dist/chunk-SXNP4MR6.js +2 -0
- package/dist/chunk-SXNP4MR6.js.map +1 -0
- package/dist/ethers.cjs +1637 -1
- package/dist/ethers.cjs.map +1 -1
- package/dist/ethers.d.cts +2 -5
- package/dist/ethers.d.ts +2 -5
- package/dist/ethers.js +1 -1
- package/dist/ethers.js.map +1 -1
- package/dist/index.cjs +1663 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +17 -20
- package/dist/index.d.ts +17 -20
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/{misc-Bb3e3jZd.d.ts → misc-B5-hfFfF.d.ts} +4 -7
- package/dist/{misc-B2Lsewb5.d.cts → misc-B_3Pj33R.d.cts} +4 -7
- package/dist/privy.cjs +1637 -1
- package/dist/privy.cjs.map +1 -1
- package/dist/privy.d.cts +2 -5
- package/dist/privy.d.ts +2 -5
- package/dist/privy.js +1 -1
- package/dist/privy.js.map +1 -1
- package/dist/thirdweb.cjs +1637 -1
- package/dist/thirdweb.cjs.map +1 -1
- package/dist/thirdweb.d.cts +2 -5
- package/dist/thirdweb.d.ts +2 -5
- package/dist/thirdweb.js +1 -1
- package/dist/thirdweb.js.map +1 -1
- package/dist/utils.cjs +1 -1
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.js +1 -1
- package/dist/utils.js.map +1 -1
- package/dist/viem/index.cjs +1637 -1
- package/dist/viem/index.cjs.map +1 -1
- package/dist/viem/index.d.cts +3 -6
- package/dist/viem/index.d.ts +3 -6
- package/dist/viem/index.js +1 -1
- package/dist/viem/index.js.map +1 -1
- package/dist/{writes-CcVGQGt5.d.cts → writes-d5YEXauI.d.cts} +1 -4
- package/dist/{writes-CcVGQGt5.d.ts → writes-d5YEXauI.d.ts} +1 -4
- package/package.json +2 -5
- package/dist/chunk-4GURAVFN.js +0 -2
- package/dist/chunk-4GURAVFN.js.map +0 -1
- package/dist/chunk-4NA4FB6K.js +0 -2
- package/dist/chunk-4NA4FB6K.js.map +0 -1
- package/dist/chunk-6REYOFJ4.js +0 -2
- package/dist/chunk-6REYOFJ4.js.map +0 -1
|
@@ -0,0 +1,1664 @@
|
|
|
1
|
+
import {r,L as L$1,a,c,b,o,F,R,D as D$1,p,N,B as B$1,I as I$1,q,P as P$1}from'./chunk-6A77Z4MD.js';import {useState,useRef,useCallback}from'react';function Bs(e){return typeof e=="object"&&e!==null&&"approvals"in e&&Array.isArray(e.approvals)}function xs(e){return Bs(e)&&r(e.approvals)&&!!e.approvals[0].bySignature}var H={NAME:"Name",OPERATION_DEFINITION:"OperationDefinition",FIELD:"Field",INLINE_FRAGMENT:"InlineFragment",FRAGMENT_DEFINITION:"FragmentDefinition"};var ze=class extends Error{constructor(n,a,t,r,i,o,s){super(n),this.name="GraphQLError",this.message=n,i&&(this.path=i),a&&(this.nodes=Array.isArray(a)?a:[a]),t&&(this.source=t),r&&(this.positions=r),o&&(this.originalError=o);var p=s;if(!p&&o){var d=o.extensions;d&&typeof d=="object"&&(p=d);}this.extensions=p||{};}toJSON(){return {...this,message:this.message}}toString(){return this.message}get[Symbol.toStringTag](){return "GraphQLError"}},L,g;function Y(e){return new ze(`Syntax Error: Unexpected token at ${g} in ${e}`)}function Wt(e){if(e.lastIndex=g,e.test(L))return L.slice(g,g=e.lastIndex)}var Bn=/ +(?=[^\s])/y;function Ds(e){for(var n=e.split(`
|
|
2
|
+
`),a="",t=0,r=0,i=n.length-1,o=0;o<n.length;o++)Bn.lastIndex=0,Bn.test(n[o])&&(o&&(!t||Bn.lastIndex<t)&&(t=Bn.lastIndex),r=r||o,i=o);for(var s=r;s<=i;s++)s!==r&&(a+=`
|
|
3
|
+
`),a+=n[s].slice(t).replace(/\\"""/g,'"""');return a}function P(){for(var e=0|L.charCodeAt(g++);e===9||e===10||e===13||e===32||e===35||e===44||e===65279;e=0|L.charCodeAt(g++))if(e===35)for(;(e=0|L.charCodeAt(g++))&&e!==10&&e!==13;);g--;}function Ua(){for(var e=g,n=0|L.charCodeAt(g++);n>=48&&n<=57||n>=65&&n<=90||n===95||n>=97&&n<=122;n=0|L.charCodeAt(g++));if(e===g-1)throw Y("Name");var a=L.slice(e,--g);return P(),a}function ne(){return {kind:"Name",value:Ua()}}var Fs=/(?:"""|(?:[\s\S]*?[^\\])""")/y,Js=/(?:(?:\.\d+)?[eE][+-]?\d+|\.\d+)/y;function Xe(e){var n;switch(L.charCodeAt(g)){case 91:g++,P();for(var a=[];L.charCodeAt(g)!==93;)a.push(Xe(e));return g++,P(),{kind:"ListValue",values:a};case 123:g++,P();for(var t=[];L.charCodeAt(g)!==125;){var r=ne();if(L.charCodeAt(g++)!==58)throw Y("ObjectField");P(),t.push({kind:"ObjectField",name:r,value:Xe(e)});}return g++,P(),{kind:"ObjectValue",fields:t};case 36:if(e)throw Y("Variable");return g++,{kind:"Variable",name:ne()};case 34:if(L.charCodeAt(g+1)===34&&L.charCodeAt(g+2)===34){if(g+=3,(n=Wt(Fs))==null)throw Y("StringValue");return P(),{kind:"StringValue",value:Ds(n.slice(0,-3)),block:true}}else {var i=g,o;g++;var s=false;for(o=0|L.charCodeAt(g++);o===92&&(g++,s=true)||o!==10&&o!==13&&o!==34&&o;o=0|L.charCodeAt(g++));if(o!==34)throw Y("StringValue");return n=L.slice(i,g),P(),{kind:"StringValue",value:s?JSON.parse(n):n.slice(1,-1),block:false}}case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:for(var p=g++,d;(d=0|L.charCodeAt(g++))>=48&&d<=57;);var y=L.slice(p,--g);if((d=L.charCodeAt(g))===46||d===69||d===101){if((n=Wt(Js))==null)throw Y("FloatValue");return P(),{kind:"FloatValue",value:y+n}}else return P(),{kind:"IntValue",value:y};case 110:if(L.charCodeAt(g+1)===117&&L.charCodeAt(g+2)===108&&L.charCodeAt(g+3)===108)return g+=4,P(),{kind:"NullValue"};break;case 116:if(L.charCodeAt(g+1)===114&&L.charCodeAt(g+2)===117&&L.charCodeAt(g+3)===101)return g+=4,P(),{kind:"BooleanValue",value:true};break;case 102:if(L.charCodeAt(g+1)===97&&L.charCodeAt(g+2)===108&&L.charCodeAt(g+3)===115&&L.charCodeAt(g+4)===101)return g+=5,P(),{kind:"BooleanValue",value:false};break}return {kind:"EnumValue",value:Ua()}}function Qt(e){if(L.charCodeAt(g)===40){var n=[];g++,P();do{var a=ne();if(L.charCodeAt(g++)!==58)throw Y("Argument");P(),n.push({kind:"Argument",name:a,value:Xe(e)});}while(L.charCodeAt(g)!==41);return g++,P(),n}}function Ce(e){if(L.charCodeAt(g)===64){var n=[];do g++,n.push({kind:"Directive",name:ne(),arguments:Qt(e)});while(L.charCodeAt(g)===64);return n}}function Vs(){for(var e=0;L.charCodeAt(g)===91;)e++,g++,P();var n={kind:"NamedType",name:ne()};do if(L.charCodeAt(g)===33&&(g++,P(),n={kind:"NonNullType",type:n}),e){if(L.charCodeAt(g++)!==93)throw Y("NamedType");P(),n={kind:"ListType",type:n};}while(e--);return n}function xn(){if(L.charCodeAt(g++)!==123)throw Y("SelectionSet");return P(),Dn()}function Dn(){var e=[];do if(L.charCodeAt(g)===46){if(L.charCodeAt(++g)!==46||L.charCodeAt(++g)!==46)throw Y("SelectionSet");switch(g++,P(),L.charCodeAt(g)){case 64:e.push({kind:"InlineFragment",typeCondition:void 0,directives:Ce(false),selectionSet:xn()});break;case 111:L.charCodeAt(g+1)===110?(g+=2,P(),e.push({kind:"InlineFragment",typeCondition:{kind:"NamedType",name:ne()},directives:Ce(false),selectionSet:xn()})):e.push({kind:"FragmentSpread",name:ne(),directives:Ce(false)});break;case 123:g++,P(),e.push({kind:"InlineFragment",typeCondition:void 0,directives:void 0,selectionSet:Dn()});break;default:e.push({kind:"FragmentSpread",name:ne(),directives:Ce(false)});}}else {var n=ne(),a=void 0;L.charCodeAt(g)===58&&(g++,P(),a=n,n=ne());var t=Qt(false),r=Ce(false),i=void 0;L.charCodeAt(g)===123&&(g++,P(),i=Dn()),e.push({kind:"Field",alias:a,name:n,arguments:t,directives:r,selectionSet:i});}while(L.charCodeAt(g)!==125);return g++,P(),{kind:"SelectionSet",selections:e}}function $s(){if(P(),L.charCodeAt(g)===40){var e=[];g++,P();do{var n=void 0;if(L.charCodeAt(g)===34&&(n=Xe(true)),L.charCodeAt(g++)!==36)throw Y("Variable");var a=ne();if(L.charCodeAt(g++)!==58)throw Y("VariableDefinition");P();var t=Vs(),r=void 0;L.charCodeAt(g)===61&&(g++,P(),r=Xe(true)),P();var i={kind:"VariableDefinition",variable:{kind:"Variable",name:a},type:t,defaultValue:r,directives:Ce(true)};n&&(i.description=n),e.push(i);}while(L.charCodeAt(g)!==41);return g++,P(),e}}function Ws(e){var n=ne();if(L.charCodeAt(g++)!==111||L.charCodeAt(g++)!==110)throw Y("FragmentDefinition");P();var a={kind:"FragmentDefinition",name:n,typeCondition:{kind:"NamedType",name:ne()},directives:Ce(false),selectionSet:xn()};return e&&(a.description=e),a}function Ht(){var e=[];do{var n=void 0;if(L.charCodeAt(g)===34&&(n=Xe(true)),L.charCodeAt(g)===123){if(n)throw Y("Document");g++,P(),e.push({kind:"OperationDefinition",operation:"query",name:void 0,variableDefinitions:void 0,directives:void 0,selectionSet:Dn()});}else {var a=Ua();switch(a){case "fragment":e.push(Ws(n));break;case "query":case "mutation":case "subscription":var t,r=void 0;(t=L.charCodeAt(g))!==40&&t!==64&&t!==123&&(r=ne());var i={kind:"OperationDefinition",operation:a,name:r,variableDefinitions:$s(),directives:Ce(false),selectionSet:xn()};n&&(i.description=n),e.push(i);break;default:throw Y("Document")}}}while(g<L.length);return e}function Mt(e,n){return L=e.body?e.body:e,g=0,P(),n&&n.noLocation?{kind:"Document",definitions:Ht()}:{kind:"Document",definitions:Ht(),loc:{start:0,end:L.length,startToken:void 0,endToken:void 0,source:{body:L,name:"graphql.web",locationOffset:{line:1,column:1}}}}}function ee(e,n,a){for(var t="",r=0;r<e.length;r++)r&&(t+=n),t+=a(e[r]);return t}function Hs(e){return JSON.stringify(e)}function Qs(e){return `"""
|
|
4
|
+
`+e.replace(/"""/g,'\\"""')+`
|
|
5
|
+
"""`}var ye=`
|
|
6
|
+
`,J={OperationDefinition(e){var n="";e.description&&(n+=J.StringValue(e.description)+`
|
|
7
|
+
`),n+=e.operation,e.name&&(n+=" "+e.name.value),e.variableDefinitions&&e.variableDefinitions.length&&(e.name||(n+=" "),n+="("+ee(e.variableDefinitions,", ",J.VariableDefinition)+")"),e.directives&&e.directives.length&&(n+=" "+ee(e.directives," ",J.Directive));var a=J.SelectionSet(e.selectionSet);return n!=="query"?n+" "+a:a},VariableDefinition(e){var n="";return e.description&&(n+=J.StringValue(e.description)+" "),n+=J.Variable(e.variable)+": "+ve(e.type),e.defaultValue&&(n+=" = "+ve(e.defaultValue)),e.directives&&e.directives.length&&(n+=" "+ee(e.directives," ",J.Directive)),n},Field(e){var n=e.alias?e.alias.value+": "+e.name.value:e.name.value;if(e.arguments&&e.arguments.length){var a=ee(e.arguments,", ",J.Argument);n.length+a.length+2>80?n+="("+(ye+=" ")+ee(e.arguments,ye,J.Argument)+(ye=ye.slice(0,-2))+")":n+="("+a+")";}return e.directives&&e.directives.length&&(n+=" "+ee(e.directives," ",J.Directive)),e.selectionSet&&e.selectionSet.selections.length&&(n+=" "+J.SelectionSet(e.selectionSet)),n},StringValue(e){return e.block?Qs(e.value).replace(/\n/g,ye):Hs(e.value)},BooleanValue:e=>""+e.value,NullValue:e=>"null",IntValue:e=>e.value,FloatValue:e=>e.value,EnumValue:e=>e.value,Name:e=>e.value,Variable:e=>"$"+e.name.value,ListValue:e=>"["+ee(e.values,", ",ve)+"]",ObjectValue:e=>"{"+ee(e.fields,", ",J.ObjectField)+"}",ObjectField:e=>e.name.value+": "+ve(e.value),Document(e){return !e.definitions||!e.definitions.length?"":ee(e.definitions,`
|
|
8
|
+
|
|
9
|
+
`,ve)},SelectionSet:e=>"{"+(ye+=" ")+ee(e.selections,ye,ve)+(ye=ye.slice(0,-2))+"}",Argument:e=>e.name.value+": "+ve(e.value),FragmentSpread(e){var n="..."+e.name.value;return e.directives&&e.directives.length&&(n+=" "+ee(e.directives," ",J.Directive)),n},InlineFragment(e){var n="...";return e.typeCondition&&(n+=" on "+e.typeCondition.name.value),e.directives&&e.directives.length&&(n+=" "+ee(e.directives," ",J.Directive)),n+=" "+J.SelectionSet(e.selectionSet)},FragmentDefinition(e){var n="";return e.description&&(n+=J.StringValue(e.description)+`
|
|
10
|
+
`),n+="fragment "+e.name.value,n+=" on "+e.typeCondition.name.value,e.directives&&e.directives.length&&(n+=" "+ee(e.directives," ",J.Directive)),n+" "+J.SelectionSet(e.selectionSet)},Directive(e){var n="@"+e.name.value;return e.arguments&&e.arguments.length&&(n+="("+ee(e.arguments,", ",J.Argument)+")"),n},NamedType:e=>e.name.value,ListType:e=>"["+ve(e.type)+"]",NonNullType:e=>ve(e.type)+"!"},ve=e=>J[e.kind](e);function jt(e){return ye=`
|
|
11
|
+
`,J[e.kind]?J[e.kind](e):""}function xe(e,n){switch(e.kind){case "NullValue":return null;case "IntValue":return parseInt(e.value,10);case "FloatValue":return parseFloat(e.value);case "StringValue":case "EnumValue":case "BooleanValue":return e.value;case "ListValue":for(var a=[],t=0,r=e.values.length;t<r;t++)a.push(xe(e.values[t],n));return a;case "ObjectValue":for(var i=Object.create(null),o=0,s=e.fields.length;o<s;o++){var p=e.fields[o];i[p.name.value]=xe(p.value,n);}return i;case "Variable":return n&&n[e.name.value]}}var Kt=()=>{},re=Kt;function ue(e){return {tag:0,0:e}}function dn(e){return {tag:1,0:e}}var Gt=()=>typeof Symbol=="function"&&Symbol.asyncIterator||"@@asyncIterator";var Ms=e=>e;function Q(e){return n=>a=>{var t=re;n((r=>{r===0?a(0):r.tag===0?(t=r[0],a(r)):e(r[0])?a(r):t(0);}));}}function _e(e){return n=>a=>n((t=>{t===0||t.tag===0?a(t):a(dn(e(t[0])));}))}function Fn(e){return n=>a=>{var t=[],r=re,i=false,o=false;n((s=>{o||(s===0?(o=true,t.length||a(0)):s.tag===0?r=s[0]:(i=false,(function(d){var y=re;d((c=>{if(c===0){if(t.length){var l=t.indexOf(y);l>-1&&(t=t.slice()).splice(l,1),t.length||(o?a(0):i||(i=true,r(0)));}}else c.tag===0?(t.push(y=c[0]),y(0)):t.length&&(a(c),y(0));}));})(e(s[0])),i||(i=true,r(0))));})),a(ue((s=>{if(s===1){o||(o=true,r(1));for(var p=0,d=t,y=t.length;p<y;p++)d[p](1);t.length=0;}else {!o&&!i?(i=true,r(0)):i=false;for(var c=0,l=t,T=t.length;c<T;c++)l[c](0);}})));}}function js(e){return Fn(Ms)(e)}function Ze(e){return js(Ia(e))}function Jn(e){return n=>a=>{var t=false;n((r=>{if(!t)if(r===0)t=true,a(0),e();else if(r.tag===0){var i=r[0];a(ue((o=>{o===1?(t=true,i(1),e()):i(o);})));}else a(r);}));}}function yn(e){return n=>a=>{var t=false;n((r=>{if(!t)if(r===0)t=true,a(0);else if(r.tag===0){var i=r[0];a(ue((o=>{o===1&&(t=true),i(o);})));}else e(r[0]),a(r);}));}}function ba(e){return n=>a=>n((t=>{t===0?a(0):t.tag===0?(a(t),e()):a(t);}))}function we(e){var n=[],a=re,t=false;return r=>{n.push(r),n.length===1&&e((i=>{if(i===0){for(var o=0,s=n,p=n.length;o<p;o++)s[o](0);n.length=0;}else if(i.tag===0)a=i[0];else {t=false;for(var d=0,y=n,c=n.length;d<c;d++)y[d](i);}})),r(ue((i=>{if(i===1){var o=n.indexOf(r);o>-1&&(n=n.slice()).splice(o,1),n.length||a(1);}else t||(t=true,a(0));})));}}function Ra(e){return n=>a=>{var t=re,r=re,i=false,o=false,s=false,p=false;n((d=>{p||(d===0?(p=true,s||a(0)):d.tag===0?t=d[0]:(s&&(r(1),r=re),i?i=false:(i=true,t(0)),(function(c){s=true,c((l=>{s&&(l===0?(s=false,p?a(0):i||(i=true,t(0))):l.tag===0?(o=false,(r=l[0])(0)):(a(l),o?o=false:r(0)));}));})(e(d[0]))));})),a(ue((d=>{d===1?(p||(p=true,t(1)),s&&(s=false,r(1))):(!p&&!i&&(i=true,t(0)),s&&!o&&(o=true,r(0)));})));}}function qa(e){return n=>a=>{var t=re,r=false,i=0;n((o=>{r||(o===0?(r=true,a(0)):o.tag===0?t=o[0]:i++<e?(a(o),!r&&i>=e&&(r=true,a(0),t(1))):a(o));})),a(ue((o=>{o===1&&!r?(r=true,t(1)):o===0&&!r&&i<e&&t(0);})));}}function Yt(e){return n=>a=>{var t=re,r=re,i=false;n((o=>{i||(o===0?(i=true,r(1),a(0)):o.tag===0?(t=o[0],e((s=>{s===0||(s.tag===0?(r=s[0])(0):(i=true,r(1),t(1),a(0)));}))):a(o));})),a(ue((o=>{o===1&&!i?(i=true,t(1),r(1)):i||t(0);})));}}function zt(e,n){return a=>t=>{var r=re,i=false;a((o=>{i||(o===0?(i=true,t(0)):o.tag===0?(r=o[0],t(o)):e(o[0])?t(o):(i=true,t(o),t(0),r(1)));}));}}function Xt(e){return n=>e()(n)}function Pa(e){return n=>{var a=e[Gt()]&&e[Gt()]()||e,t=false,r=false,i=false,o;n(ue((async s=>{if(s===1)t=true,a.return&&a.return();else if(r)i=true;else {for(i=r=true;i&&!t;)if((o=await a.next()).done)t=true,a.return&&await a.return(),n(0);else try{i=!1,n(dn(o.value));}catch(p){if(a.throw)(t=!!(await a.throw(p)).done)&&n(0);else throw p}r=false;}})));}}function Gs(e){return e[Symbol.asyncIterator]?Pa(e):n=>{var a=e[Symbol.iterator](),t=false,r=false,i=false,o;n(ue((s=>{if(s===1)t=true,a.return&&a.return();else if(r)i=true;else {for(i=r=true;i&&!t;)if((o=a.next()).done)t=true,a.return&&a.return(),n(0);else try{i=!1,n(dn(o.value));}catch(p){if(a.throw)(t=!!a.throw(p).done)&&n(0);else throw p}r=false;}})));}}var Ia=Gs;function Vn(e){return n=>{var a=false;n(ue((t=>{t===1?a=true:a||(a=true,n(dn(e)),n(0));})));}}function Zt(e){return n=>{var a=false,t=e({next(r){a||n(dn(r));},complete(){a||(a=true,n(0));}});n(ue((r=>{r===1&&!a&&(a=true,t());})));}}function $n(){var e,n;return {source:we(Zt((a=>(e=a.next,n=a.complete,Kt)))),next(a){e&&e(a);},complete(){n&&n();}}}var er=e=>{var n=false;e(ue((a=>{a===1?n=true:n||(n=true,e(0));})));};function cn(e){return n=>{var a=re,t=false;return n((r=>{r===0?t=true:r.tag===0?(a=r[0])(0):t||(e(r[0]),a(0));})),{unsubscribe(){t||(t=true,a(1));}}}}function nr(e){cn((n=>{}))(e);}function ar(e){return new Promise((n=>{var a=re,t;e((r=>{r===0?Promise.resolve(t).then(n):r.tag===0?(a=r[0])(0):(t=r[0],a(0));}));}))}var Ks=e=>e&&typeof e.message=="string"&&(e.extensions||e.name==="GraphQLError")?e:typeof e=="object"&&typeof e.message=="string"?new ze(e.message,e.nodes,e.source,e.positions,e.path,e,e.extensions||{}):new ze(e),Ae=class extends Error{constructor(n){var a=(n.graphQLErrors||[]).map(Ks),t=((r,i)=>{var o="";if(r)return `[Network] ${r.message}`;if(i)for(var s=0,p=i.length;s<p;s++)o&&(o+=`
|
|
12
|
+
`),o+=`[GraphQL] ${i[s].message}`;return o})(n.networkError,a);super(t),this.name="CombinedError",this.message=t,this.graphQLErrors=a,this.networkError=n.networkError,this.response=n.response;}toString(){return this.message}},Wn=(e,n)=>{for(var a=0|(n||5381),t=0,r=0|e.length;t<r;t++)a=(a<<5)+a+e.charCodeAt(t);return a},De=new Set,tr=new WeakMap,en=(e,n)=>{if(e===null||De.has(e))return "null";if(typeof e!="object")return JSON.stringify(e)||"";if(e.toJSON)return en(e.toJSON(),n);if(Array.isArray(e)){for(var a="[",t=0,r=e.length;t<r;t++)a.length>1&&(a+=","),a+=en(e[t],n)||"null";return a+="]"}else if(!n&&(Qn!==Ue&&e instanceof Qn||Mn!==Ue&&e instanceof Mn))return "null";var i=Object.keys(e).sort();if(!i.length&&e.constructor&&Object.getPrototypeOf(e).constructor!==Object.prototype.constructor){var o=tr.get(e)||Math.random().toString(36).slice(2);return tr.set(e,o),en({__key:o},n)}De.add(e);for(var s="{",p=0,d=i.length;p<d;p++){var y=en(e[i[p]],n);y&&(s.length>1&&(s+=","),s+=en(i[p],n)+":"+y);}return De.delete(e),s+="}"},Ba=(e,n,a)=>{if(!(a==null||typeof a!="object"||a.toJSON||De.has(a)))if(Array.isArray(a))for(var t=0,r=a.length;t<r;t++)Ba(e,`${n}.${t}`,a[t]);else if(a instanceof Qn||a instanceof Mn)e.set(n,a);else {De.add(a);for(var i in a)Ba(e,`${n}.${i}`,a[i]);}},he=(e,n)=>(De.clear(),en(e,n||false)),Ue=class{},Qn=typeof File<"u"?File:Ue,Mn=typeof Blob<"u"?Blob:Ue,Ys=/("{3}[\s\S]*"{3}|"(?:\\.|[^"])*")/g,zs=/(?:#[^\n\r]+)?(?:[\r\n]+|$)/g,Xs=(e,n)=>n%2==0?e.replace(zs,`
|
|
13
|
+
`):e,rr=e=>e.split(Ys).map(Xs).join("").trim(),ir=new Map,Hn=new Map,Fe=e=>{var n;return typeof e=="string"?n=rr(e):e.loc&&Hn.get(e.__key)===e?n=e.loc.source.body:(n=ir.get(e)||rr(jt(e)),ir.set(e,n)),typeof e!="string"&&!e.loc&&(e.loc={start:0,end:n.length,source:{body:n,name:"gql",locationOffset:{line:1,column:1}}}),n},or=e=>{var n;if(e.documentId)n=Wn(e.documentId);else if(n=Wn(Fe(e)),e.definitions){var a=mn(e);a&&(n=Wn(`
|
|
14
|
+
# ${a}`,n));}return n},Da=e=>{var n,a;return typeof e=="string"?(n=or(e),a=Hn.get(n)||Mt(e,{noLocation:true})):(n=e.__key||or(e),a=Hn.get(n)||e),a.loc||Fe(a),a.__key=n,Hn.set(n,a),a},Je=(e,n,a)=>{var t=n||{},r=Da(e),i=he(t,true),o=r.__key;return i!=="{}"&&(o=Wn(i,o)),{key:o,query:r,variables:t,extensions:a}},mn=e=>{for(var n=0,a=e.definitions.length;n<a;n++){var t=e.definitions[n];if(t.kind===H.OPERATION_DEFINITION)return t.name?t.name.value:void 0}},pr=e=>{for(var n=0,a=e.definitions.length;n<a;n++){var t=e.definitions[n];if(t.kind===H.OPERATION_DEFINITION)return t.operation}},xa=(e,n,a)=>{if(!("data"in n||"errors"in n&&Array.isArray(n.errors)))throw new Error("No Content");var t=e.kind==="subscription";return {operation:e,data:n.data,error:Array.isArray(n.errors)?new Ae({graphQLErrors:n.errors,response:a}):void 0,extensions:n.extensions?{...n.extensions}:void 0,hasNext:n.hasNext==null?t:n.hasNext,stale:false}},jn=(e,n)=>{if(typeof e=="object"&&e!=null){if(Array.isArray(e)){e=[...e];for(var a=0,t=n.length;a<t;a++)e[a]=jn(e[a],n[a]);return e}if(!e.constructor||e.constructor===Object){e={...e};for(var r in n)e[r]=jn(e[r],n[r]);return e}}return n},lr=(e,n,a,t)=>{var r=e.error?e.error.graphQLErrors:[],i=!!e.extensions||!!(n.payload||n).extensions,o={...e.extensions,...(n.payload||n).extensions},s=n.incremental;"path"in n&&(s=[n]);var p={data:e.data};if(s)for(var d=function(){var l=s[y];Array.isArray(l.errors)&&r.push(...l.errors),l.extensions&&(Object.assign(o,l.extensions),i=true);var T="data",N=p,A=[];if(l.path)A=l.path;else if(t){var h=t.find((k=>k.id===l.id));l.subPath?A=[...h.path,...l.subPath]:A=h.path;}for(var w=0,C=A.length;w<C;T=A[w++])N=N[T]=Array.isArray(N[T])?[...N[T]]:{...N[T]};if(l.items)for(var b=+T>=0?T:0,f=0,m=l.items.length;f<m;f++)N[b+f]=jn(N[b+f],l.items[f]);else l.data!==void 0&&(N[T]=jn(N[T],l.data));},y=0,c=s.length;y<c;y++)d();else p.data=(n.payload||n).data||e.data,r=n.errors||n.payload&&n.payload.errors||r;return {operation:e.operation,data:p.data,error:r.length?new Ae({graphQLErrors:r,response:a}):void 0,extensions:i?o:void 0,hasNext:n.hasNext!=null?n.hasNext:e.hasNext,stale:false}},dr=(e,n,a)=>({operation:e,data:void 0,error:new Ae({networkError:n,response:a}),extensions:void 0,hasNext:false,stale:false});function Gn(e){var n={query:void 0,documentId:void 0,operationName:mn(e.query),variables:e.variables||void 0,extensions:e.extensions};return "documentId"in e.query&&e.query.documentId&&(!e.query.definitions||!e.query.definitions.length)?n.documentId=e.query.documentId:(!e.extensions||!e.extensions.persistedQuery||e.extensions.persistedQuery.miss)&&(n.query=Fe(e.query)),n}var Kn=(e,n)=>{var a=e.kind==="query"&&e.context.preferGetMethod;if(!a||!n)return e.context.url;var t=Zs(e.context.url);for(var r in n){var i=n[r];i&&t[1].set(r,typeof i=="object"?he(i):i);}var o=t.join("?");return o.length>2047&&a!=="force"?(e.context.preferGetMethod=false,e.context.url):o},Zs=e=>{var n=e.indexOf("?");return n>-1?[e.slice(0,n),new URLSearchParams(e.slice(n+1))]:[e,new URLSearchParams]},eu=(e,n)=>{if(n&&!(e.kind==="query"&&e.context.preferGetMethod)){var a=he(n),t=(s=>{var p=new Map;return (Qn!==Ue||Mn!==Ue)&&(De.clear(),Ba(p,"variables",s)),p})(n.variables);if(t.size){var r=new FormData;r.append("operations",a),r.append("map",he({...[...t.keys()].map((s=>[s]))}));var i=0;for(var o of t.values())r.append(""+i++,o);return r}return a}},Yn=(e,n)=>{var a={accept:e.kind==="subscription"?"text/event-stream, multipart/mixed":"application/graphql-response+json, application/graphql+json, application/json, text/event-stream, multipart/mixed"},t=(typeof e.context.fetchOptions=="function"?e.context.fetchOptions():e.context.fetchOptions)||{};if(t.headers)if((o=>"has"in o&&!Object.keys(o).length)(t.headers))t.headers.forEach(((o,s)=>{a[s]=o;}));else if(Array.isArray(t.headers))t.headers.forEach(((o,s)=>{Array.isArray(o)?a[o[0]]?a[o[0]]=`${a[o[0]]},${o[1]}`:a[o[0]]=o[1]:a[s]=o;}));else for(var r in t.headers)a[r.toLowerCase()]=t.headers[r];var i=eu(e,n);return typeof i=="string"&&!a["content-type"]&&(a["content-type"]="application/json"),{...t,method:i?"POST":"GET",body:i,headers:a}},nu=/boundary="?([^=";]+)"?/i,au=/data: ?([^\n]+)/;async function*sr(e){if(e.body[Symbol.asyncIterator])for await(var n of e.body)yield n;else {var a=e.body.getReader(),t;try{for(;!(t=await a.read()).done;)yield t.value;}finally{a.cancel();}}}async function*ur(e,n){var a=typeof TextDecoder<"u"?new TextDecoder:null,t="",r;for await(var i of e)for(t+=i.constructor.name==="Buffer"?i.toString():a.decode(i,{stream:true});(r=t.indexOf(n))>-1;)yield t.slice(0,r),t=t.slice(r+n.length);}async function*tu(e,n,a){var t=true,r=null,i;try{yield await Promise.resolve();var o=(i=await(e.context.fetch||fetch)(n,a)).headers.get("Content-Type")||"",s;/multipart\/mixed/i.test(o)?s=(async function*(c,l){var T=c.match(nu),N="--"+(T?T[1]:"-"),A=!0,h;for await(var w of ur(sr(l),`\r
|
|
15
|
+
`+N)){if(A){A=!1;var C=w.indexOf(N);if(C>-1)w=w.slice(C+N.length);else continue}try{yield h=JSON.parse(w.slice(w.indexOf(`\r
|
|
16
|
+
\r
|
|
17
|
+
`)+4));}catch(b){if(!h)throw b}if(h&&h.hasNext===!1)break}h&&h.hasNext!==!1&&(yield {hasNext:!1});})(o,i):/text\/event-stream/i.test(o)?s=(async function*(c){var l;for await(var T of ur(sr(c),`
|
|
18
|
+
|
|
19
|
+
`)){var N=T.match(au);if(N){var A=N[1];try{yield l=JSON.parse(A);}catch(h){if(!l)throw h}if(l&&l.hasNext===!1)break}}l&&l.hasNext!==!1&&(yield {hasNext:!1});})(i):/text\//i.test(o)?s=(async function*(c){var l=await c.text();try{var T=JSON.parse(l);process.env.NODE_ENV!=="production"&&console.warn('Found response with content-type "text/plain" but it had a valid "application/json" response.'),yield T;}catch{throw new Error(l)}})(i):s=(async function*(c){yield JSON.parse(await c.text());})(i);var p;for await(var d of s)d.pending&&!r?p=d.pending:d.pending&&(p=[...p,...d.pending]),r=r?lr(r,d,i,p):xa(e,d,i),t=!1,yield r,t=!0;r||(yield r=xa(e,{},i));}catch(y){if(!t)throw y;console.log({o:i}),i.text().then(console.log),yield dr(e,i&&(i.status<200||i.status>=300)&&i.statusText?new Error(i.statusText):y,i);}}function zn(e,n,a){var t;return typeof AbortController<"u"&&(a.signal=(t=new AbortController).signal),Jn((()=>{t&&t.abort();}))(Q((r=>!!r))(Pa(tu(e,n,a))))}var Fa=e=>{if("definitions"in e){for(var n=[],a=0,t=e.definitions.length;a<t;a++){var r=Fa(e.definitions[a]);n.push(r);}return {...e,definitions:n}}if("directives"in e&&e.directives&&e.directives.length){for(var i=[],o={},s=0,p=e.directives.length;s<p;s++){var d=e.directives[s],y=d.name.value;y[0]!=="_"?i.push(d):y=y.slice(1),o[y]=d;}e={...e,directives:i,_directives:o};}if("selectionSet"in e){var c=[],l=e.kind===H.OPERATION_DEFINITION;if(e.selectionSet){for(var T=0,N=e.selectionSet.selections.length;T<N;T++){var A=e.selectionSet.selections[T];l=l||A.kind===H.FIELD&&A.name.value==="__typename"&&!A.alias;var h=Fa(A);c.push(h);}return l||c.push({kind:H.FIELD,name:{kind:H.NAME,value:"__typename"},_generated:true}),{...e,selectionSet:{...e.selectionSet,selections:c}}}}return e},yr=new Map,nn=e=>{var n=Da(e),a=yr.get(n.__key);return a||(yr.set(n.__key,a=Fa(n)),Object.defineProperty(a,"__key",{value:n.__key,enumerable:false})),a};function cr(e){var n=a=>e(a);return n.toPromise=()=>ar(qa(1)(Q((a=>!a.stale&&!a.hasNext))(n))),n.then=(a,t)=>n.toPromise().then(a,t),n.subscribe=a=>cn(a)(n),n}function be(e,n,a){return {...n,kind:e,context:n.context?{...n.context,...a}:a||n.context}}var ru=()=>{};var iu=e=>({client:n,forward:a,dispatchDebug:t})=>e.reduceRight(((r,i)=>{var o=false;return i({client:n,forward(s){if(process.env.NODE_ENV!=="production"){if(o)throw new Error("forward() must only be called once in each Exchange.");o=true;}return we(r(we(s)))},dispatchDebug(s){process.env.NODE_ENV!=="production"&&t({timestamp:Date.now(),source:i.name,...s});}})}),a);var ou=({dispatchDebug:e})=>n=>(process.env.NODE_ENV!=="production"&&(n=yn((a=>{if(a.kind!=="teardown"&&process.env.NODE_ENV!=="production"){var t=`No exchange has handled operations of kind "${a.kind}". Check whether you've added an exchange responsible for these operations.`;process.env.NODE_ENV!=="production"&&e({type:"fallbackCatch",message:t,operation:a,source:"fallbackExchange"}),console.warn(t);}}))(n)),Q((a=>false))(n)),su=function e(n){if(process.env.NODE_ENV!=="production"&&!n.url)throw new Error("You are creating an urql-client without a url.");var a=0,t=new Map,r=new Map,i=new Set,o=[],s={url:n.url,fetchSubscriptions:n.fetchSubscriptions,fetchOptions:n.fetchOptions,fetch:n.fetch,preferGetMethod:n.preferGetMethod!=null?n.preferGetMethod:"within-url-limit",requestPolicy:n.requestPolicy||"cache-first"},p=$n();function d(f){(f.kind==="mutation"||f.kind==="teardown"||!i.has(f.key))&&(f.kind==="teardown"?i.delete(f.key):f.kind!=="mutation"&&i.add(f.key),p.next(f));}var y=false;function c(f){if(f&&d(f),!y){for(y=true;y&&(f=o.shift());)d(f);y=false;}}var l=f=>{var m=Yt(Q((k=>k.kind==="teardown"&&k.key===f.key))(p.source))(Q((k=>k.operation.kind===f.kind&&k.operation.key===f.key&&(!k.operation.context._instance||k.operation.context._instance===f.context._instance)))(b));return f.kind!=="query"?m=zt((k=>!!k.hasNext))(m):m=Ra((k=>{var O=Vn(k);return k.stale||k.hasNext?O:Ze([O,_e((()=>(k.stale=true,k)))(qa(1)(Q((q=>q.key===f.key))(p.source)))])}))(m),f.kind!=="mutation"?m=Jn((()=>{i.delete(f.key),t.delete(f.key),r.delete(f.key),y=false;for(var k=o.length-1;k>=0;k--)o[k].key===f.key&&o.splice(k,1);d(be("teardown",f,f.context));}))(yn((k=>{if(k.stale)if(!k.hasNext)i.delete(f.key);else for(var O=0;O<o.length;O++){var q=o[O];if(q.key===k.operation.key){i.delete(q.key);break}}else k.hasNext||i.delete(f.key);t.set(f.key,k);}))(m)):m=ba((()=>{d(f);}))(m),we(m)},T=this instanceof e?this:Object.create(e.prototype),N=Object.assign(T,{suspense:!!n.suspense,operations$:p.source,reexecuteOperation(f){if(f.kind==="teardown")c(f);else if(f.kind==="mutation")o.push(f),Promise.resolve().then(c);else if(r.has(f.key)){for(var m=false,k=0;k<o.length;k++)o[k].key===f.key&&(o[k]=f,m=true);m||i.has(f.key)&&f.context.requestPolicy!=="network-only"?(i.delete(f.key),Promise.resolve().then(c)):(o.push(f),Promise.resolve().then(c));}},createRequestOperation(f,m,k){k||(k={});var O;if(process.env.NODE_ENV!=="production"&&f!=="teardown"&&(O=pr(m.query))!==f)throw new Error(`Expected operation of type "${f}" but found "${O}"`);return be(f,m,{_instance:f==="mutation"?a=a+1|0:void 0,...s,...k,requestPolicy:k.requestPolicy||s.requestPolicy,suspense:k.suspense||k.suspense!==false&&N.suspense})},executeRequestOperation(f){return f.kind==="mutation"?cr(l(f)):cr(Xt((()=>{var m=r.get(f.key);m||r.set(f.key,m=l(f)),m=ba((()=>{c(f);}))(m);var k=t.get(f.key);return f.kind==="query"&&k&&(k.stale||k.hasNext)?Ra(Vn)(Ze([m,Q((O=>O===t.get(f.key)))(Vn(k))])):m})))},executeQuery(f,m){var k=N.createRequestOperation("query",f,m);return N.executeRequestOperation(k)},executeSubscription(f,m){var k=N.createRequestOperation("subscription",f,m);return N.executeRequestOperation(k)},executeMutation(f,m){var k=N.createRequestOperation("mutation",f,m);return N.executeRequestOperation(k)},readQuery(f,m,k){var O=null;return cn((q=>{O=q;}))(N.query(f,m,k)).unsubscribe(),O},query:(f,m,k)=>N.executeQuery(Je(f,m),k),subscription:(f,m,k)=>N.executeSubscription(Je(f,m),k),mutation:(f,m,k)=>N.executeMutation(Je(f,m),k)}),A=ru;if(process.env.NODE_ENV!=="production"){var{next:h,source:w}=$n();N.subscribeToDebugTarget=f=>cn(f)(w),A=h;}var C=iu(n.exchanges),b=we(C({client:N,dispatchDebug:A,forward:ou({dispatchDebug:A})})(p.source));return nr(b),N},mr=su;function fr(e,n){throw new Error(n)}var Va={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},uu=new Set(Object.keys(Va));function $a(e){let n=e?.kind;return typeof n=="string"&&uu.has(n)}var Ja;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription";})(Ja||(Ja={}));var ce;(function(e){e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.INT="IntValue",e.FLOAT="FloatValue",e.STRING="StringValue",e.BOOLEAN="BooleanValue",e.NULL="NullValue",e.ENUM="EnumValue",e.LIST="ListValue",e.OBJECT="ObjectValue",e.OBJECT_FIELD="ObjectField",e.DIRECTIVE="Directive",e.NAMED_TYPE="NamedType",e.LIST_TYPE="ListType",e.NON_NULL_TYPE="NonNullType",e.SCHEMA_DEFINITION="SchemaDefinition",e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",e.FIELD_DEFINITION="FieldDefinition",e.INPUT_VALUE_DEFINITION="InputValueDefinition",e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",e.UNION_TYPE_DEFINITION="UnionTypeDefinition",e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",e.ENUM_VALUE_DEFINITION="EnumValueDefinition",e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",e.DIRECTIVE_DEFINITION="DirectiveDefinition",e.SCHEMA_EXTENSION="SchemaExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension";})(ce||(ce={}));function Nr(e){return Xn(e,[])}function Xn(e,n){switch(typeof e){case "string":return JSON.stringify(e);case "function":return e.name?`[function ${e.name}]`:"[function]";case "object":return pu(e,n);default:return String(e)}}function pu(e,n){if(e===null)return "null";if(n.includes(e))return "[Circular]";let a=[...n,e];if(lu(e)){let t=e.toJSON();if(t!==e)return typeof t=="string"?t:Xn(t,a)}else if(Array.isArray(e))return yu(e,a);return du(e,a)}function lu(e){return typeof e.toJSON=="function"}function du(e,n){let a=Object.entries(e);return a.length===0?"{}":n.length>2?"["+cu(e)+"]":"{ "+a.map(([r,i])=>r+": "+Xn(i,n)).join(", ")+" }"}function yu(e,n){if(e.length===0)return "[]";if(n.length>2)return "[Array]";let a=Math.min(10,e.length),t=e.length-a,r=[];for(let i=0;i<a;++i)r.push(Xn(e[i],n));return t===1?r.push("... 1 more item"):t>1&&r.push(`... ${t} more items`),"["+r.join(", ")+"]"}function cu(e){let n=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(n==="Object"&&typeof e.constructor=="function"){let a=e.constructor.name;if(typeof a=="string"&&a!=="")return a}return n}var Wa=Object.freeze({});function an(e,n,a=Va){let t=new Map;for(let w of Object.values(ce))t.set(w,Ha(n,w));let r,i=Array.isArray(e),o=[e],s=-1,p=[],d=e,y,c,l=[],T=[];do{s++;let w=s===o.length,C=w&&p.length!==0;if(w){if(y=T.length===0?void 0:l[l.length-1],d=c,c=T.pop(),C)if(i){d=d.slice();let f=0;for(let[m,k]of p){let O=m-f;k===null?(d.splice(O,1),f++):d[O]=k;}}else {d={...d};for(let[f,m]of p)d[f]=m;}s=r.index,o=r.keys,p=r.edits,i=r.inArray,r=r.prev;}else if(c){if(y=i?s:o[s],d=c[y],d==null)continue;l.push(y);}let b;if(!Array.isArray(d)){var N,A;$a(d)||fr(false,`Invalid AST Node: ${Nr(d)}.`);let f=w?(N=t.get(d.kind))===null||N===void 0?void 0:N.leave:(A=t.get(d.kind))===null||A===void 0?void 0:A.enter;if(b=f?.call(n,d,y,c,l,T),b===Wa)break;if(b===false){if(!w){l.pop();continue}}else if(b!==void 0&&(p.push([y,b]),!w))if($a(b))d=b;else {l.pop();continue}}if(b===void 0&&C&&p.push([y,d]),w)l.pop();else {var h;r={inArray:i,index:s,keys:o,edits:p,prev:r},i=Array.isArray(d),o=i?d:(h=a[d.kind])!==null&&h!==void 0?h:[],s=-1,p=[],c&&T.push(c),c=d;}}while(r!==void 0);return p.length!==0?p[p.length-1][1]:e}function Ha(e,n){let a=e[n];return typeof a=="object"?a:typeof a=="function"?{enter:a,leave:void 0}:{enter:e.enter,leave:e.leave}}var Nu=()=>{},$e=Nu;function We(e){return {tag:0,0:e}}function ja(e){return {tag:1,0:e}}var kr=()=>typeof Symbol=="function"&&Symbol.asyncIterator||"@@asyncIterator",ku=e=>e;function Zn(e){return n=>a=>{var t=$e;n((r=>{r===0?a(0):r.tag===0?(t=r[0],a(r)):e(r[0])?a(r):t(0);}));}}function Qa(e){return n=>a=>{var t=[],r=$e,i=false,o=false;n((s=>{o||(s===0?(o=true,t.length||a(0)):s.tag===0?r=s[0]:(i=false,(function(p){var d=$e;p((y=>{if(y===0){if(t.length){var c=t.indexOf(d);c>-1&&(t=t.slice()).splice(c,1),t.length||(o?a(0):i||(i=true,r(0)));}}else y.tag===0?(t.push(d=y[0]),d(0)):t.length&&(a(y),d(0));}));})(e(s[0])),i||(i=true,r(0))));})),a(We((s=>{if(s===1){o||(o=true,r(1));for(var p=0,d=t,y=t.length;p<y;p++)d[p](1);t.length=0;}else {!o&&!i?(i=true,r(0)):i=false;for(var c=0,l=t,T=t.length;c<T;c++)l[c](0);}})));}}function Tu(e){return Qa(ku)(e)}function gu(e){return Tu(Ou(e))}function gr(e){return n=>a=>{var t=false;n((r=>{if(!t)if(r===0)t=true,a(0);else if(r.tag===0){var i=r[0];a(We((o=>{o===1&&(t=true),i(o);})));}else e(r[0]),a(r);}));}}function vu(e){var n=[],a=$e,t=false;return r=>{n.push(r),n.length===1&&e((i=>{if(i===0){for(var o=0,s=n,p=n.length;o<p;o++)s[o](0);n.length=0;}else if(i.tag===0)a=i[0];else {t=false;for(var d=0,y=n,c=n.length;d<c;d++)y[d](i);}})),r(We((i=>{if(i===1){var o=n.indexOf(r);o>-1&&(n=n.slice()).splice(o,1),n.length||a(1);}else t||(t=true,a(0));})));}}function Au(e){return n=>a=>{var t=$e,r=$e,i=false;n((o=>{i||(o===0?(i=true,r(1),a(0)):o.tag===0?(t=o[0],e((s=>{s===0||(s.tag===0?(r=s[0])(0):(i=true,r(1),t(1),a(0)));}))):a(o));})),a(We((o=>{o===1&&!i?(i=true,t(1),r(1)):i||t(0);})));}}function hu(e){return n=>{var a=e[kr()]&&e[kr()]()||e,t=false,r=false,i=false,o;n(We((async s=>{if(s===1)t=true,a.return&&a.return();else if(r)i=true;else {for(i=r=true;i&&!t;)if((o=await a.next()).done)t=true,a.return&&await a.return(),n(0);else try{i=!1,n(ja(o.value));}catch(p){if(a.throw)(t=!!(await a.throw(p)).done)&&n(0);else throw p}r=false;}})));}}function Lu(e){return e[Symbol.asyncIterator]?hu(e):n=>{var a=e[Symbol.iterator](),t=false,r=false,i=false,o;n(We((s=>{if(s===1)t=true,a.return&&a.return();else if(r)i=true;else {for(i=r=true;i&&!t;)if((o=a.next()).done)t=true,a.return&&a.return(),n(0);else try{i=!1,n(ja(o.value));}catch(p){if(a.throw)(t=!!a.throw(p).done)&&n(0);else throw p}r=false;}})));}}var Ou=Lu;function Su(e){return n=>{var a=false,t=e({next(r){a||n(ja(r));},complete(){a||(a=true,n(0));}});n(We((r=>{r===1&&!a&&(a=true,t());})));}}function Eu(e){return n=>{var a=$e,t=false;return n((r=>{r===0?t=true:r.tag===0?(a=r[0])(0):t||(e(r[0]),a(0));})),{unsubscribe(){t||(t=true,a(1));}}}}var Ve=(...e)=>{for(var n=e[0],a=1,t=e.length;a<t;a++)n=e[a](n);return n},vr=(e=>(e.UNAUTHENTICATED="UNAUTHENTICATED",e.FORBIDDEN="FORBIDDEN",e.INTERNAL_SERVER_ERROR="INTERNAL_SERVER_ERROR",e.BAD_USER_INPUT="BAD_USER_INPUT",e.BAD_REQUEST="BAD_REQUEST",e))(vr||{});function Cu(e,n){return e.graphQLErrors.some(a=>a.extensions?.code===n)}var W=class Ar extends L$1{name="UnexpectedError";static upgradeRequired(n){return new Ar(`${n}. Check for SDK updates.`)}},_u=class extends L$1{name="SigningError"},wu=class hr extends L$1{name="TransactionError";txHash;constructor(n,a,t){super(n,{cause:t}),this.txHash=a;}static new(n){let{txHash:a,request:t,link:r}=n,i=r?`Transaction failed: ${a}
|
|
20
|
+
\u2192 View on explorer: ${r}`:`Transaction failed: ${a}`;return new hr(i,a,t)}},fn=class extends L$1{name="TimeoutError"},Nn=class Lr extends L$1{constructor(n){super(n.__typename),this.cause=n;}name="ValidationError";static fromGqlNode(n){return new Lr(n)}},Ga=class extends L$1{name="CancelError"},Uu=class{constructor(e,n){this.batchInterval=e,this.maxBatchSize=n;}queue=new Map;flushTimer=null;flushing=false;onBatchReady=()=>{};push(e){if(this.queue.set(e.key,e),this.shouldFlush()&&!this.flushing){this.cancelScheduledFlush(),this.flushBatch();return}!this.flushTimer&&!this.flushing&&this.scheduleFlush();}remove(e){this.queue.delete(e.key);}onBatch(e){this.onBatchReady=e;}shouldFlush(){return this.queue.size>=this.maxBatchSize}scheduleFlush(){this.flushTimer=setTimeout(()=>{this.flushTimer=null,this.flushBatch();},this.batchInterval);}cancelScheduledFlush(){this.flushTimer&&(clearTimeout(this.flushTimer),this.flushTimer=null);}flushBatch(){if(this.flushing)return;if(this.flushing=true,this.queue.size===0){this.flushing=false;return}let e=Array.from(this.queue.values()).slice(0,this.maxBatchSize);this.onBatchReady(e);for(let n of e)this.queue.delete(n.key);this.queue.size>0?setTimeout(()=>this.flushBatch(),0):this.flushing=false;}};function Tr(e,n){let a=Gn(e),t=Kn(e,a),r=Yn(e,a);return Ve(zn(e,t,r),Au(Ve(n,Zn(i=>i.kind==="teardown"&&i.key===e.key))))}function bu({batchInterval:e,maxBatchSize:n,url:a,fetchOptions:t}){return ({forward:r})=>{let i=new Uu(e,n);return o$1=>{let s=vu(o$1),p=Ve(s,Zn(l=>l.kind==="teardown"||l.kind==="subscription"&&!l.context.fetchSubscriptions),r),d=Ve(s,Zn(l=>l.kind==="mutation"||l.kind==="subscription"&&!!l.context.fetchSubscriptions||l.kind==="query"&&l.context.batch===false),Qa(l=>Tr(l,o$1))),y=new Map,c=Ve(s,Zn(l=>l.kind==="query"&&l.context.batch!==false),Qa(l=>(o(l.context.url===a,`Operation URL mismatch: expected "${a}", got "${l.context.url}"`),i.push(l),Su(({next:T})=>{let N=y.get(l.key);return N?N.push(T):y.set(l.key,[T]),()=>{i.remove(l);let A=y.get(l.key);if(!A)return;let h=A.indexOf(T);h!==-1&&A.splice(h,1),A.length===0&&y.delete(l.key);}}))));return i.onBatch(l=>{if(o(q(l),"Expected non-empty array of operations"),l.length===1){Ve(Tr(l[0],o$1),gr(A=>{let h=y.get(l[0].key);if(h){for(let w of h)w(A);y.delete(l[0].key);}}),Eu(()=>{}));return}let T=l.map(A=>({query:Fe(A.query),variables:A.variables??{},operationName:mn(A.query),extensions:A.extensions})),N=typeof t=="function"?t():t||{};fetch(a,{method:"POST",headers:{"content-type":"application/json",...N.headers||{}},body:JSON.stringify(T),...N}).then(A=>A.json()).then(A=>{for(let h=0;h<A.length&&h<l.length;h++){let w=A[h],C=l[h];if(!C||!w)continue;let b={operation:C,data:w.data,error:w.errors?new Ae({graphQLErrors:w.errors}):void 0,extensions:w.extensions,stale:false,hasNext:false},f=y.get(C.key);if(f){for(let m of f)m(b);y.delete(C.key);}}}).catch(A=>{for(let h of l){let w={operation:h,data:void 0,error:new Ae({networkError:A}),stale:false,hasNext:false},C=y.get(h.key);if(C){for(let b of C)b(w);y.delete(h.key);}}});}),gu([d,c,p])}}}var Ru=class{constructor(e){this.document=e,this._fragmentSpreads=new Map,this._recursivelyReferencedFragments=new Map;}_fragments;_fragmentSpreads;_recursivelyReferencedFragments;dedupe(){let e=[],n=[],a=[];return an(this.document,{OperationDefinition:t=>(e.push(t),false),FragmentDefinition:t=>(n.push(t),false),Document:{leave:()=>{let t=Object.create(null);for(let r of e)for(let i of this.getRecursivelyReferencedFragments(r))t[i.name.value]=true;for(let r of n){let i=r.name.value;t[i]!==true&&a.push(r);}}}}),an(this.document,{FragmentDefinition:t=>a.indexOf(t)!==-1?null:t})}getRecursivelyReferencedFragments(e){let n=this._recursivelyReferencedFragments.get(e);if(!n){n=[];let a=Object.create(null),t=[e.selectionSet],r;for(;r=t.pop();)for(let i of this.getFragmentSpreads(r)){let o=i.name.value;if(a[o]!==true){a[o]=true;let s=this.getFragment(o);s&&(n.push(s),t.push(s.selectionSet));}}this._recursivelyReferencedFragments.set(e,n);}return n}getFragmentSpreads(e){let n=this._fragmentSpreads.get(e);if(!n){n=[];let a=[e],t;for(;t=a.pop();)for(let r of t.selections)r.kind===ce.FRAGMENT_SPREAD?n.push(r):r.selectionSet&&a.push(r.selectionSet);this._fragmentSpreads.set(e,n);}return n}getFragment(e){let n;if(this._fragments)n=this._fragments;else {n=Object.create(null);for(let a of this.document.definitions)a.kind===ce.FRAGMENT_DEFINITION&&(n[a.name.value]=a);this._fragments=n;}return n[e]}},qu=class Or{constructor(n){this.fragments=n;}static from(n){let a=new Map;for(let t of n)for(let r of t.definitions)o(r.kind==="FragmentDefinition",`expected a fragment definition, got ${t.definitions[0]?.kind}`),o(!a.has(r.name.value),`Duplicate fragment detected. A fragment named "${r.name.value}" has already been provided, either directly or as part of another fragment document.`),a.set(r.name.value,r);return new Or(a)}replaceFrom(n){let a=an(n,{FragmentDefinition:t=>this.fragments.has(t.name.value)?null:t,Document:{leave:t=>({...t,definitions:[...t.definitions,...this.fragments.values()]})}});return new Ru(a).dedupe()}},Pu=class Sr{level;name;constructor(n,a=3){this.name=n,this.level=a,this.replaceMethods();}static named(n,a=3){return new Sr(n,a)}trace=()=>{};debug=()=>{};info=()=>{};warn=()=>{};error=()=>{};log=()=>{};replaceMethods(){["trace","debug","info","warn","error"].forEach((n,a)=>{a>=this.level&&(this[n]=(...t)=>console[n==="debug"?"log":n](`[${this.name}]`,...t));}),this.log=this.debug;}};function ea(e){return new Promise(n=>setTimeout(n,e))}function Ma(e){return e.query.definitions.find(n=>n.kind===ce.OPERATION_DEFINITION)?.name?.value??null}function Er(e){return e.kind==="query"&&!e.context.pause}function Cr(e){return e.kind==="teardown"}var Ka=class{constructor(e){this.context=e,this.resolver=qu.from(e.fragments),this.logger=Pu.named(e.displayName,e.debug?1:5),this.urql=mr({url:e.environment.backend,requestPolicy:e.cache?"cache-and-network":"network-only",preferGetMethod:false,exchanges:this.exchanges(),fetchOptions:this.getFetchOptions()});}urql;activeQueries=new Map;logger;resolver;query(e,n,{requestPolicy:a,batch:t=true}={}){let r=this.resolver.replaceFrom(e);return this.resultFrom(this.urql.query(r,n,{batch:t,requestPolicy:a}))}mutation(e,n){return this.resultFrom(this.urql.mutation(e,n))}async refreshWhere(e){let n=Array.from(this.activeQueries.values()),a=(await Promise.all(n.map(async t=>({op:t,matches:await e(t)})))).filter(({matches:t})=>t).map(({op:t})=>t);this.logger.debug(`Refreshing ${a.length} matching queries`);for(let t of a)this.urql.reexecuteOperation(be(t.kind,t,{...t.context,requestPolicy:"network-only",batch:false}));}exchanges(){let e=[this.activeQueryRegistry()];return this.context.cache&&e.push(this.context.cache),e.push(bu({batchInterval:1,maxBatchSize:10,url:this.context.environment.backend,fetchOptions:this.getFetchOptions()})),e}getFetchOptions(){return {credentials:"omit",headers:this.context.headers}}registerQuery(e){this.activeQueries.set(e.key,e),this.logger.debug(`Registered query: ${Ma(e)} (key: ${e.key})`);}unregisterQuery(e){let n=this.activeQueries.get(e);n&&(this.activeQueries.delete(e),this.logger.debug(`Unregistered query: ${Ma(n)} (key: ${e})`));}activeQueryRegistry(){return ({forward:e})=>n=>Ve(n,gr(a=>{Er(a)?this.registerQuery(a):Cr(a)&&this.unregisterQuery(a.key);}),e)}resultFrom(e){return a.fromPromise(e.toPromise(),n=>(this.logger.error(n),W.from(n))).andThen(n=>n.error?.networkError?c(W.from(n.error.networkError)):n.data?b(n.data.value):c(W.from(n.error)))}};var na={DOCUMENT:"Document",FRAGMENT_DEFINITION:"FragmentDefinition"},Iu=class extends Error{constructor(e,n,a,t,r,i,o){super(e),this.name="GraphQLError",this.message=e,r&&(this.path=r),n&&(this.nodes=Array.isArray(n)?n:[n]),a&&(this.source=a),t&&(this.positions=t),i&&(this.originalError=i);var s=o;if(!s&&i){var p=i.extensions;p&&typeof p=="object"&&(s=p);}this.extensions=s||{};}toJSON(){return {...this,message:this.message}}toString(){return this.message}get[Symbol.toStringTag](){return "GraphQLError"}},S,v;function ae(e){return new Iu(`Syntax Error: Unexpected token at ${v} in ${e}`)}function _r(e){if(e.lastIndex=v,e.test(S))return S.slice(v,v=e.lastIndex)}var aa=/ +(?=[^\s])/y;function Bu(e){for(var n=e.split(`
|
|
21
|
+
`),a="",t=0,r=0,i=n.length-1,o=0;o<n.length;o++)aa.lastIndex=0,aa.test(n[o])&&(o&&(!t||aa.lastIndex<t)&&(t=aa.lastIndex),r=r||o,i=o);for(var s=r;s<=i;s++)s!==r&&(a+=`
|
|
22
|
+
`),a+=n[s].slice(t).replace(/\\"""/g,'"""');return a}function I(){for(var e=0|S.charCodeAt(v++);e===9||e===10||e===13||e===32||e===35||e===44||e===65279;e=0|S.charCodeAt(v++))if(e===35)for(;(e=S.charCodeAt(v++))!==10&&e!==13;);v--;}function za(){for(var e=v,n=0|S.charCodeAt(v++);n>=48&&n<=57||n>=65&&n<=90||n===95||n>=97&&n<=122;n=0|S.charCodeAt(v++));if(e===v-1)throw ae("Name");var a=S.slice(e,--v);return I(),a}function te(){return {kind:"Name",value:za()}}var xu=/(?:"""|(?:[\s\S]*?[^\\])""")/y,Du=/(?:(?:\.\d+)?[eE][+-]?\d+|\.\d+)/y;function ta(e){var n;switch(S.charCodeAt(v)){case 91:v++,I();for(var a=[];S.charCodeAt(v)!==93;)a.push(ta(e));return v++,I(),{kind:"ListValue",values:a};case 123:v++,I();for(var t=[];S.charCodeAt(v)!==125;){var r=te();if(S.charCodeAt(v++)!==58)throw ae("ObjectField");I(),t.push({kind:"ObjectField",name:r,value:ta(e)});}return v++,I(),{kind:"ObjectValue",fields:t};case 36:if(e)throw ae("Variable");return v++,{kind:"Variable",name:te()};case 34:if(S.charCodeAt(v+1)===34&&S.charCodeAt(v+2)===34){if(v+=3,(n=_r(xu))==null)throw ae("StringValue");return I(),{kind:"StringValue",value:Bu(n.slice(0,-3)),block:true}}else {var i=v,o;v++;var s=false;for(o=0|S.charCodeAt(v++);o===92&&(v++,s=true)||o!==10&&o!==13&&o!==34&&o;o=0|S.charCodeAt(v++));if(o!==34)throw ae("StringValue");return n=S.slice(i,v),I(),{kind:"StringValue",value:s?JSON.parse(n):n.slice(1,-1),block:false}}case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:for(var p=v++,d;(d=0|S.charCodeAt(v++))>=48&&d<=57;);var y=S.slice(p,--v);if((d=S.charCodeAt(v))===46||d===69||d===101){if((n=_r(Du))==null)throw ae("FloatValue");return I(),{kind:"FloatValue",value:y+n}}else return I(),{kind:"IntValue",value:y};case 110:if(S.charCodeAt(v+1)===117&&S.charCodeAt(v+2)===108&&S.charCodeAt(v+3)===108)return v+=4,I(),{kind:"NullValue"};break;case 116:if(S.charCodeAt(v+1)===114&&S.charCodeAt(v+2)===117&&S.charCodeAt(v+3)===101)return v+=4,I(),{kind:"BooleanValue",value:true};break;case 102:if(S.charCodeAt(v+1)===97&&S.charCodeAt(v+2)===108&&S.charCodeAt(v+3)===115&&S.charCodeAt(v+4)===101)return v+=5,I(),{kind:"BooleanValue",value:false};break}return {kind:"EnumValue",value:za()}}function Ur(e){if(S.charCodeAt(v)===40){var n=[];v++,I();do{var a=te();if(S.charCodeAt(v++)!==58)throw ae("Argument");I(),n.push({kind:"Argument",name:a,value:ta(e)});}while(S.charCodeAt(v)!==41);return v++,I(),n}}function Re(e){if(S.charCodeAt(v)===64){var n=[];do v++,n.push({kind:"Directive",name:te(),arguments:Ur(e)});while(S.charCodeAt(v)===64);return n}}function Fu(){for(var e=0;S.charCodeAt(v)===91;)e++,v++,I();var n={kind:"NamedType",name:te()};do if(S.charCodeAt(v)===33&&(v++,I(),n={kind:"NonNullType",type:n}),e){if(S.charCodeAt(v++)!==93)throw ae("NamedType");I(),n={kind:"ListType",type:n};}while(e--);return n}function ra(){if(S.charCodeAt(v++)!==123)throw ae("SelectionSet");return I(),ia()}function ia(){var e=[];do if(S.charCodeAt(v)===46){if(S.charCodeAt(++v)!==46||S.charCodeAt(++v)!==46)throw ae("SelectionSet");switch(v++,I(),S.charCodeAt(v)){case 64:e.push({kind:"InlineFragment",typeCondition:void 0,directives:Re(false),selectionSet:ra()});break;case 111:S.charCodeAt(v+1)===110?(v+=2,I(),e.push({kind:"InlineFragment",typeCondition:{kind:"NamedType",name:te()},directives:Re(false),selectionSet:ra()})):e.push({kind:"FragmentSpread",name:te(),directives:Re(false)});break;case 123:v++,I(),e.push({kind:"InlineFragment",typeCondition:void 0,directives:void 0,selectionSet:ia()});break;default:e.push({kind:"FragmentSpread",name:te(),directives:Re(false)});}}else {var n=te(),a=void 0;S.charCodeAt(v)===58&&(v++,I(),a=n,n=te());var t=Ur(false),r=Re(false),i=void 0;S.charCodeAt(v)===123&&(v++,I(),i=ia()),e.push({kind:"Field",alias:a,name:n,arguments:t,directives:r,selectionSet:i});}while(S.charCodeAt(v)!==125);return v++,I(),{kind:"SelectionSet",selections:e}}function Ju(){if(I(),S.charCodeAt(v)===40){var e=[];v++,I();do{if(S.charCodeAt(v++)!==36)throw ae("Variable");var n=te();if(S.charCodeAt(v++)!==58)throw ae("VariableDefinition");I();var a=Fu(),t=void 0;S.charCodeAt(v)===61&&(v++,I(),t=ta(true)),I(),e.push({kind:"VariableDefinition",variable:{kind:"Variable",name:n},type:a,defaultValue:t,directives:Re(true)});}while(S.charCodeAt(v)!==41);return v++,I(),e}}function Vu(){var e=te();if(S.charCodeAt(v++)!==111||S.charCodeAt(v++)!==110)throw ae("FragmentDefinition");return I(),{kind:"FragmentDefinition",name:e,typeCondition:{kind:"NamedType",name:te()},directives:Re(false),selectionSet:ra()}}function $u(){var e=[];do if(S.charCodeAt(v)===123)v++,I(),e.push({kind:"OperationDefinition",operation:"query",name:void 0,variableDefinitions:void 0,directives:void 0,selectionSet:ia()});else {var n=za();switch(n){case "fragment":e.push(Vu());break;case "query":case "mutation":case "subscription":var a,t=void 0;(a=S.charCodeAt(v))!==40&&a!==64&&a!==123&&(t=te()),e.push({kind:"OperationDefinition",operation:n,name:t,variableDefinitions:Ju(),directives:Re(false),selectionSet:ra()});break;default:throw ae("Document")}}while(v<S.length);return e}function Wu(e,n){return S=e.body?e.body:e,v=0,I(),{kind:"Document",definitions:$u(),loc:{start:0,end:S.length,startToken:void 0,endToken:void 0,source:{body:S,name:"graphql.web",locationOffset:{line:1,column:1}}}}}var wr=0,Ya=new Set;function br(){function e(n,a){var t=Wu(n).definitions,r=new Set;for(var i of a||[])for(var o of i.definitions)o.kind===na.FRAGMENT_DEFINITION&&!r.has(o)&&(t.push(o),r.add(o));var s;(s=t[0].kind===na.FRAGMENT_DEFINITION)&&t[0].directives&&(t[0].directives=t[0].directives.filter((d=>d.name.value!=="_unmask")));var p;return {kind:na.DOCUMENT,definitions:t,get loc(){if(!p&&s){var d=n+(function(y){try{wr++;var c="";for(var l of y)if(!Ya.has(l)){Ya.add(l);var{loc:T}=l;T&&(c+=T.source.body);}return c}finally{--wr==0&&Ya.clear();}})(a||[]);return {start:0,end:d.length,source:{body:d,name:"GraphQLTada",locationOffset:{line:1,column:1}}}}return p},set loc(d){p=d;}}}return e.scalar=function(n,a){return a},e.persisted=function(n,a){return {kind:na.DOCUMENT,definitions:a?a.definitions:[],documentId:n}},e}br();var Rr=(e=>(e.Asc="ASC",e.Desc="DESC",e))(Rr||{}),qr=(e=>(e.Ten="TEN",e.Fifty="FIFTY",e))(qr||{}),Xa=(e=>(e.LastDay="LAST_DAY",e.LastWeek="LAST_WEEK",e.LastMonth="LAST_MONTH",e.LastSixMonths="LAST_SIX_MONTHS",e.LastYear="LAST_YEAR",e.All="ALL",e))(Xa||{}),Pr=(e=>(e.SpokeBorrow="SPOKE_BORROW",e.SpokeRepay="SPOKE_REPAY",e.SpokeSupply="SPOKE_SUPPLY",e.SpokeWithdraw="SPOKE_WITHDRAW",e.SpokeUpdateUserRiskPremium="SPOKE_UPDATE_USER_RISK_PREMIUM",e.SpokeUpdateUserDynamicConfig="SPOKE_UPDATE_USER_DYNAMIC_CONFIG",e.SpokeSetUserUsingAsCollateral="SPOKE_SET_USER_USING_AS_COLLATERAL",e.SpokeSetUserPositionManager="SPOKE_SET_USER_POSITION_MANAGER",e.RenounceSpokeUserPositionManager="RENOUNCE_SPOKE_USER_POSITION_MANAGER",e.Liquidation="LIQUIDATION",e))(Pr||{}),Ir=(e=>(e.TESTNET_ONLY="TESTNET_ONLY",e.MAINNET_ONLY="MAINNET_ONLY",e.ALL="ALL",e))(Ir||{}),Br=(e=>(e.Borrow="BORROW",e.Supply="SUPPLY",e.Withdraw="WITHDRAW",e.Repay="REPAY",e.Liquidated="LIQUIDATED",e.SetAsCollateral="SET_AS_COLLATERAL",e.UpdatedDynamicConfig="UPDATED_DYNAMIC_CONFIG",e.UpdatedRiskPremium="UPDATED_RISK_PREMIUM",e.TokenToTokenSwap="TOKEN_TO_TOKEN_SWAP",e.SupplySwap="SUPPLY_SWAP",e.BorrowSwap="BORROW_SWAP",e.RepayWithSupply="REPAY_WITH_SUPPLY",e.WithdrawSwap="WITHDRAW_SWAP",e))(Br||{}),xr=(e=>(e.Highest="HIGHEST",e.Lowest="LOWEST",e.Average="AVERAGE",e))(xr||{}),Dr=(e=>(e.Highest="HIGHEST",e.Lowest="LOWEST",e))(Dr||{}),Za=(e=>(e.Usd="USD",e.Eur="EUR",e.Gbp="GBP",e))(Za||{}),Fr=(e=>(e.Supply="SUPPLY",e.Borrow="BORROW",e.Collateral="COLLATERAL",e.All="ALL",e))(Fr||{}),Jr=(e=>(e.Buy="BUY",e.Sell="SELL",e))(Jr||{}),Vr=(e=>(e.Current="CURRENT",e.New="NEW",e))(Vr||{}),$r=(e=>(e.Repay="REPAY",e.Supply="SUPPLY",e))($r||{}),Wr=(e=>(e.Current="CURRENT",e.New="NEW",e))(Wr||{}),Hr=(e=>(e.Withdraw="WITHDRAW",e.Buy="BUY",e))(Hr||{}),Qr=(e=>(e.Cancelled="CANCELLED",e.Expired="EXPIRED",e.Fulfilled="FULFILLED",e.Open="OPEN",e.PendingSignature="PENDING_SIGNATURE",e))(Qr||{}),Mr=(e=>(e.Stablecoin="STABLECOIN",e.EthCorrelated="ETH_CORRELATED",e))(Mr||{}),jr=(e=>(e.AllDynamicConfig="ALL_DYNAMIC_CONFIG",e.JustRiskPremium="JUST_RISK_PREMIUM",e))(jr||{}),Gr=(e=>(e.Fast="FAST",e.Accurate="ACCURATE",e))(Gr||{}),u=br(),et=u(`fragment DomainData on DomainData {
|
|
23
|
+
name
|
|
24
|
+
version
|
|
25
|
+
chainId
|
|
26
|
+
verifyingContract
|
|
27
|
+
}`),fe=u(`fragment DecimalNumber on DecimalNumber {
|
|
28
|
+
__typename
|
|
29
|
+
onChainValue
|
|
30
|
+
decimals
|
|
31
|
+
value
|
|
32
|
+
}`),D=u(`fragment PercentNumber on PercentNumber {
|
|
33
|
+
__typename
|
|
34
|
+
onChainValue
|
|
35
|
+
decimals
|
|
36
|
+
value
|
|
37
|
+
normalized
|
|
38
|
+
}`),Kr=u(`fragment DecimalNumberWithChange on DecimalNumberWithChange {
|
|
39
|
+
__typename
|
|
40
|
+
current {
|
|
41
|
+
...DecimalNumber
|
|
42
|
+
}
|
|
43
|
+
change(window: $timeWindow) {
|
|
44
|
+
...PercentNumber
|
|
45
|
+
}
|
|
46
|
+
}`,[fe,D]),ie=u(`fragment ExchangeAmount on ExchangeAmount {
|
|
47
|
+
__typename
|
|
48
|
+
value
|
|
49
|
+
name
|
|
50
|
+
symbol
|
|
51
|
+
icon
|
|
52
|
+
decimals
|
|
53
|
+
}`),kn=u(`fragment TokenInfo on TokenInfo {
|
|
54
|
+
__typename
|
|
55
|
+
id
|
|
56
|
+
name
|
|
57
|
+
symbol
|
|
58
|
+
icon
|
|
59
|
+
decimals
|
|
60
|
+
categories
|
|
61
|
+
}`),$=u(`fragment Chain on Chain {
|
|
62
|
+
__typename
|
|
63
|
+
name
|
|
64
|
+
icon
|
|
65
|
+
chainId
|
|
66
|
+
rpcUrl
|
|
67
|
+
explorerUrl
|
|
68
|
+
isTestnet
|
|
69
|
+
isFork
|
|
70
|
+
nativeWrappedToken
|
|
71
|
+
nativeGateway
|
|
72
|
+
signatureGateway
|
|
73
|
+
nativeInfo {
|
|
74
|
+
...TokenInfo
|
|
75
|
+
}
|
|
76
|
+
}`,[kn]),Le=u(`fragment Erc20Token on Erc20Token {
|
|
77
|
+
__typename
|
|
78
|
+
info {
|
|
79
|
+
...TokenInfo
|
|
80
|
+
}
|
|
81
|
+
address
|
|
82
|
+
chain {
|
|
83
|
+
...Chain
|
|
84
|
+
}
|
|
85
|
+
isWrappedNativeToken
|
|
86
|
+
}`,[kn,$]),nt=u(`fragment NativeToken on NativeToken {
|
|
87
|
+
__typename
|
|
88
|
+
info {
|
|
89
|
+
...TokenInfo
|
|
90
|
+
}
|
|
91
|
+
chain {
|
|
92
|
+
...Chain
|
|
93
|
+
}
|
|
94
|
+
}`,[kn,$]),z=u(`fragment Erc20Amount on Erc20Amount {
|
|
95
|
+
__typename
|
|
96
|
+
token {
|
|
97
|
+
...Erc20Token
|
|
98
|
+
}
|
|
99
|
+
amount {
|
|
100
|
+
...DecimalNumber
|
|
101
|
+
}
|
|
102
|
+
exchange(currency: $currency){
|
|
103
|
+
...ExchangeAmount
|
|
104
|
+
}
|
|
105
|
+
exchangeRate(currency: $currency){
|
|
106
|
+
...DecimalNumber
|
|
107
|
+
}
|
|
108
|
+
}`,[Le,fe,ie]),at=u(`fragment NativeAmount on NativeAmount {
|
|
109
|
+
__typename
|
|
110
|
+
token {
|
|
111
|
+
...NativeToken
|
|
112
|
+
}
|
|
113
|
+
amount {
|
|
114
|
+
...DecimalNumber
|
|
115
|
+
}
|
|
116
|
+
exchange(currency: $currency){
|
|
117
|
+
...ExchangeAmount
|
|
118
|
+
}
|
|
119
|
+
exchangeRate(currency: $currency){
|
|
120
|
+
...DecimalNumber
|
|
121
|
+
}
|
|
122
|
+
}`,[nt,fe,ie]),oa=u(`fragment TokenAmount on TokenAmount {
|
|
123
|
+
__typename
|
|
124
|
+
... on Erc20Amount {
|
|
125
|
+
...Erc20Amount
|
|
126
|
+
}
|
|
127
|
+
... on NativeAmount {
|
|
128
|
+
...NativeAmount
|
|
129
|
+
}
|
|
130
|
+
}`,[z,at]),Yr=u(`fragment Token on Token {
|
|
131
|
+
__typename
|
|
132
|
+
... on Erc20Token {
|
|
133
|
+
...Erc20Token
|
|
134
|
+
}
|
|
135
|
+
... on NativeToken {
|
|
136
|
+
...NativeToken
|
|
137
|
+
}
|
|
138
|
+
}`,[Le,nt]),tn=u(`fragment ExchangeAmountWithChange on ExchangeAmountWithChange {
|
|
139
|
+
__typename
|
|
140
|
+
current {
|
|
141
|
+
...ExchangeAmount
|
|
142
|
+
}
|
|
143
|
+
change(window: $timeWindow){
|
|
144
|
+
...PercentNumber
|
|
145
|
+
}
|
|
146
|
+
}`,[ie,D]),zr=u(`fragment PercentNumberWithChange on PercentNumberWithChange {
|
|
147
|
+
__typename
|
|
148
|
+
current {
|
|
149
|
+
...PercentNumber
|
|
150
|
+
}
|
|
151
|
+
change(window: $timeWindow){
|
|
152
|
+
...PercentNumber
|
|
153
|
+
}
|
|
154
|
+
}`,[D]),Tn=u(`fragment PaginatedResultInfo on PaginatedResultInfo {
|
|
155
|
+
__typename
|
|
156
|
+
prev
|
|
157
|
+
next
|
|
158
|
+
}`),Xr=u(`fragment PercentNumberVariation on PercentNumberVariation {
|
|
159
|
+
__typename
|
|
160
|
+
current {
|
|
161
|
+
...PercentNumber
|
|
162
|
+
}
|
|
163
|
+
after {
|
|
164
|
+
...PercentNumber
|
|
165
|
+
}
|
|
166
|
+
}`,[D]),Zr=u(`fragment ExchangeAmountVariation on ExchangeAmountVariation {
|
|
167
|
+
__typename
|
|
168
|
+
current {
|
|
169
|
+
...ExchangeAmount
|
|
170
|
+
}
|
|
171
|
+
after {
|
|
172
|
+
...ExchangeAmount
|
|
173
|
+
}
|
|
174
|
+
}`,[ie]),ei=u(`fragment HealthFactorWithChange on HealthFactorWithChange {
|
|
175
|
+
__typename
|
|
176
|
+
current
|
|
177
|
+
change(window: $timeWindow) {
|
|
178
|
+
...PercentNumber
|
|
179
|
+
}
|
|
180
|
+
}`,[D]),ni=u(`fragment HealthFactorVariation on HealthFactorVariation {
|
|
181
|
+
__typename
|
|
182
|
+
current
|
|
183
|
+
after
|
|
184
|
+
}`),ai=u(`fragment HealthFactorError on HealthFactorError {
|
|
185
|
+
__typename
|
|
186
|
+
reason
|
|
187
|
+
current
|
|
188
|
+
after
|
|
189
|
+
}`),ti=u(`fragment HealthFactorResult on HealthFactorResult {
|
|
190
|
+
__typename
|
|
191
|
+
... on HealthFactorVariation {
|
|
192
|
+
...HealthFactorVariation
|
|
193
|
+
}
|
|
194
|
+
... on HealthFactorError {
|
|
195
|
+
...HealthFactorError
|
|
196
|
+
}
|
|
197
|
+
}`,[ni,ai]),rn=u(`fragment InsufficientBalanceError on InsufficientBalanceError {
|
|
198
|
+
__typename
|
|
199
|
+
required {
|
|
200
|
+
...DecimalNumber
|
|
201
|
+
}
|
|
202
|
+
available {
|
|
203
|
+
...DecimalNumber
|
|
204
|
+
}
|
|
205
|
+
}`,[fe]),ri=u(`fragment HubSummary on HubSummary {
|
|
206
|
+
__typename
|
|
207
|
+
totalBorrowed {
|
|
208
|
+
...ExchangeAmountWithChange
|
|
209
|
+
}
|
|
210
|
+
totalBorrowCap {
|
|
211
|
+
...ExchangeAmount
|
|
212
|
+
}
|
|
213
|
+
totalSupplied {
|
|
214
|
+
...ExchangeAmountWithChange
|
|
215
|
+
}
|
|
216
|
+
totalSupplyCap {
|
|
217
|
+
...ExchangeAmount
|
|
218
|
+
}
|
|
219
|
+
utilizationRate {
|
|
220
|
+
...PercentNumber
|
|
221
|
+
}
|
|
222
|
+
}`,[ie,tn,D]),gn=u(`fragment Hub on Hub {
|
|
223
|
+
__typename
|
|
224
|
+
id
|
|
225
|
+
name
|
|
226
|
+
address
|
|
227
|
+
chain {
|
|
228
|
+
...Chain
|
|
229
|
+
}
|
|
230
|
+
summary(currency: $currency) {
|
|
231
|
+
...HubSummary
|
|
232
|
+
}
|
|
233
|
+
}`,[$,ri]),ii=u(`fragment HubAssetSummary on HubAssetSummary {
|
|
234
|
+
__typename
|
|
235
|
+
supplied {
|
|
236
|
+
...Erc20Amount
|
|
237
|
+
}
|
|
238
|
+
borrowed {
|
|
239
|
+
...Erc20Amount
|
|
240
|
+
}
|
|
241
|
+
availableLiquidity {
|
|
242
|
+
...Erc20Amount
|
|
243
|
+
}
|
|
244
|
+
supplyApy {
|
|
245
|
+
...PercentNumber
|
|
246
|
+
}
|
|
247
|
+
borrowApy {
|
|
248
|
+
...PercentNumber
|
|
249
|
+
}
|
|
250
|
+
netApy {
|
|
251
|
+
...PercentNumber
|
|
252
|
+
}
|
|
253
|
+
utilizationRate {
|
|
254
|
+
...PercentNumber
|
|
255
|
+
}
|
|
256
|
+
}`,[z,D]),oi=u(`fragment HubAssetSettings on HubAssetSettings {
|
|
257
|
+
__typename
|
|
258
|
+
feeReceiver
|
|
259
|
+
liquidityFee {
|
|
260
|
+
...PercentNumber
|
|
261
|
+
}
|
|
262
|
+
irStrategy
|
|
263
|
+
reinvestmentController
|
|
264
|
+
}`,[D]),si=u(`fragment HubAssetUserState on HubAssetUserState {
|
|
265
|
+
__typename
|
|
266
|
+
balance {
|
|
267
|
+
...Erc20Amount
|
|
268
|
+
}
|
|
269
|
+
}`,[z]),sa=u(`fragment HubAsset on HubAsset {
|
|
270
|
+
__typename
|
|
271
|
+
id
|
|
272
|
+
onchainAssetId
|
|
273
|
+
hub {
|
|
274
|
+
...Hub
|
|
275
|
+
}
|
|
276
|
+
underlying {
|
|
277
|
+
...Erc20Token
|
|
278
|
+
}
|
|
279
|
+
summary {
|
|
280
|
+
...HubAssetSummary
|
|
281
|
+
}
|
|
282
|
+
settings {
|
|
283
|
+
...HubAssetSettings
|
|
284
|
+
}
|
|
285
|
+
userState {
|
|
286
|
+
...HubAssetUserState
|
|
287
|
+
}
|
|
288
|
+
}`,[gn,Le,ii,oi,si]),ui=u(`fragment PermitTypedData on PermitTypedData {
|
|
289
|
+
__typename
|
|
290
|
+
types
|
|
291
|
+
primaryType
|
|
292
|
+
domain {
|
|
293
|
+
...DomainData
|
|
294
|
+
}
|
|
295
|
+
message
|
|
296
|
+
}`,[et]);function Hu(e){return typeof e=="object"&&e!==null&&"deadline"in e&&"value"in e}var oe=u(`fragment Spoke on Spoke {
|
|
297
|
+
__typename
|
|
298
|
+
id
|
|
299
|
+
name
|
|
300
|
+
address
|
|
301
|
+
chain {
|
|
302
|
+
...Chain
|
|
303
|
+
}
|
|
304
|
+
}`,[$]),pi=u(`fragment SpokePositionManager on SpokePositionManager {
|
|
305
|
+
__typename
|
|
306
|
+
address
|
|
307
|
+
active
|
|
308
|
+
name
|
|
309
|
+
}`),li=u(`fragment PaginatedSpokePositionManagerResult on PaginatedSpokePositionManagerResult {
|
|
310
|
+
__typename
|
|
311
|
+
items {
|
|
312
|
+
...SpokePositionManager
|
|
313
|
+
}
|
|
314
|
+
pageInfo {
|
|
315
|
+
...PaginatedResultInfo
|
|
316
|
+
}
|
|
317
|
+
}`,[pi,Tn]),di=u(`fragment SpokeUserPositionManager on SpokeUserPositionManager {
|
|
318
|
+
__typename
|
|
319
|
+
address
|
|
320
|
+
approvedOn
|
|
321
|
+
active
|
|
322
|
+
name
|
|
323
|
+
}`),yi=u(`fragment PaginatedSpokeUserPositionManagerResult on PaginatedSpokeUserPositionManagerResult {
|
|
324
|
+
__typename
|
|
325
|
+
items {
|
|
326
|
+
...SpokeUserPositionManager
|
|
327
|
+
}
|
|
328
|
+
pageInfo {
|
|
329
|
+
...PaginatedResultInfo
|
|
330
|
+
}
|
|
331
|
+
}`,[di,Tn]),ci=u(`fragment ReserveSettings on ReserveSettings {
|
|
332
|
+
__typename
|
|
333
|
+
collateralFactor {
|
|
334
|
+
...PercentNumber
|
|
335
|
+
}
|
|
336
|
+
maxLiquidationBonus {
|
|
337
|
+
...PercentNumber
|
|
338
|
+
}
|
|
339
|
+
liquidationFee {
|
|
340
|
+
...PercentNumber
|
|
341
|
+
}
|
|
342
|
+
collateralRisk {
|
|
343
|
+
...PercentNumber
|
|
344
|
+
}
|
|
345
|
+
borrowable
|
|
346
|
+
collateral
|
|
347
|
+
suppliable
|
|
348
|
+
latestDynamicConfigKey
|
|
349
|
+
}`,[D]),mi=u(`fragment ReserveStatus on ReserveStatus {
|
|
350
|
+
__typename
|
|
351
|
+
frozen
|
|
352
|
+
paused
|
|
353
|
+
active
|
|
354
|
+
}`),fi=u(`fragment ReserveSummary on ReserveSummary {
|
|
355
|
+
__typename
|
|
356
|
+
supplied {
|
|
357
|
+
...Erc20Amount
|
|
358
|
+
}
|
|
359
|
+
borrowed {
|
|
360
|
+
...Erc20Amount
|
|
361
|
+
}
|
|
362
|
+
supplyApy {
|
|
363
|
+
...PercentNumber
|
|
364
|
+
}
|
|
365
|
+
borrowApy {
|
|
366
|
+
...PercentNumber
|
|
367
|
+
}
|
|
368
|
+
}`,[z,D]),Ni=u(`fragment ReserveUserState on ReserveUserState {
|
|
369
|
+
__typename
|
|
370
|
+
balance {
|
|
371
|
+
...Erc20Amount
|
|
372
|
+
}
|
|
373
|
+
suppliable {
|
|
374
|
+
...Erc20Amount
|
|
375
|
+
}
|
|
376
|
+
borrowable {
|
|
377
|
+
...Erc20Amount
|
|
378
|
+
}
|
|
379
|
+
borrowApy {
|
|
380
|
+
...PercentNumber
|
|
381
|
+
}
|
|
382
|
+
collateralFactor {
|
|
383
|
+
...PercentNumber
|
|
384
|
+
}
|
|
385
|
+
maxLiquidationBonus {
|
|
386
|
+
...PercentNumber
|
|
387
|
+
}
|
|
388
|
+
liquidationFee {
|
|
389
|
+
...PercentNumber
|
|
390
|
+
}
|
|
391
|
+
dynamicConfigKey
|
|
392
|
+
}`,[z,D]),vn=u(`fragment Reserve on Reserve {
|
|
393
|
+
__typename
|
|
394
|
+
id
|
|
395
|
+
onChainId
|
|
396
|
+
spoke {
|
|
397
|
+
...Spoke
|
|
398
|
+
}
|
|
399
|
+
borrowCap
|
|
400
|
+
supplyCap
|
|
401
|
+
chain {
|
|
402
|
+
...Chain
|
|
403
|
+
}
|
|
404
|
+
summary {
|
|
405
|
+
...ReserveSummary
|
|
406
|
+
}
|
|
407
|
+
settings {
|
|
408
|
+
...ReserveSettings
|
|
409
|
+
}
|
|
410
|
+
status {
|
|
411
|
+
...ReserveStatus
|
|
412
|
+
}
|
|
413
|
+
canBorrow
|
|
414
|
+
canSupply
|
|
415
|
+
canUseAsCollateral
|
|
416
|
+
canSwapFrom
|
|
417
|
+
userState {
|
|
418
|
+
...ReserveUserState
|
|
419
|
+
}
|
|
420
|
+
asset {
|
|
421
|
+
...HubAsset
|
|
422
|
+
}
|
|
423
|
+
}`,[oe,$,fi,ci,mi,Ni,sa]),Oe=u(`fragment ReserveInfo on ReserveInfo {
|
|
424
|
+
__typename
|
|
425
|
+
id
|
|
426
|
+
asset {
|
|
427
|
+
...HubAsset
|
|
428
|
+
}
|
|
429
|
+
}`,[sa]),se=u(`fragment TransactionRequest on TransactionRequest {
|
|
430
|
+
__typename
|
|
431
|
+
to
|
|
432
|
+
from
|
|
433
|
+
data
|
|
434
|
+
value
|
|
435
|
+
chainId
|
|
436
|
+
operations
|
|
437
|
+
}`),tt=u(`fragment Erc20Approval on Erc20Approval {
|
|
438
|
+
__typename
|
|
439
|
+
byTransaction {
|
|
440
|
+
...TransactionRequest
|
|
441
|
+
}
|
|
442
|
+
bySignature {
|
|
443
|
+
...PermitTypedData
|
|
444
|
+
}
|
|
445
|
+
}`,[se,ui]),rt=u(`fragment Erc20ApprovalRequired on Erc20ApprovalRequired {
|
|
446
|
+
__typename
|
|
447
|
+
approvals {
|
|
448
|
+
...Erc20Approval
|
|
449
|
+
}
|
|
450
|
+
reason
|
|
451
|
+
requiredAmount {
|
|
452
|
+
...DecimalNumber
|
|
453
|
+
}
|
|
454
|
+
currentAllowance {
|
|
455
|
+
...DecimalNumber
|
|
456
|
+
}
|
|
457
|
+
originalTransaction {
|
|
458
|
+
...TransactionRequest
|
|
459
|
+
}
|
|
460
|
+
}`,[se,tt,fe]),ki=u(`fragment PreContractActionRequired on PreContractActionRequired {
|
|
461
|
+
__typename
|
|
462
|
+
transaction {
|
|
463
|
+
...TransactionRequest
|
|
464
|
+
}
|
|
465
|
+
reason
|
|
466
|
+
originalTransaction {
|
|
467
|
+
...TransactionRequest
|
|
468
|
+
}
|
|
469
|
+
}`,[se]),An=u(`fragment ExecutionPlan on ExecutionPlan {
|
|
470
|
+
__typename
|
|
471
|
+
... on TransactionRequest {
|
|
472
|
+
...TransactionRequest
|
|
473
|
+
}
|
|
474
|
+
... on Erc20ApprovalRequired {
|
|
475
|
+
...Erc20ApprovalRequired
|
|
476
|
+
}
|
|
477
|
+
... on PreContractActionRequired {
|
|
478
|
+
...PreContractActionRequired
|
|
479
|
+
}
|
|
480
|
+
... on InsufficientBalanceError {
|
|
481
|
+
...InsufficientBalanceError
|
|
482
|
+
}
|
|
483
|
+
}`,[se,rt,ki,rn]),Ti=u(`fragment SwapQuoteCosts on SwapQuoteCosts {
|
|
484
|
+
__typename
|
|
485
|
+
networkCosts {
|
|
486
|
+
...TokenAmount
|
|
487
|
+
}
|
|
488
|
+
partnerFee {
|
|
489
|
+
...TokenAmount
|
|
490
|
+
}
|
|
491
|
+
flashloanFee {
|
|
492
|
+
...TokenAmount
|
|
493
|
+
}
|
|
494
|
+
providerFee {
|
|
495
|
+
...TokenAmount
|
|
496
|
+
}
|
|
497
|
+
}`,[oa]),hn=u(`fragment SwapQuote on SwapQuote {
|
|
498
|
+
__typename
|
|
499
|
+
accuracy
|
|
500
|
+
quoteId
|
|
501
|
+
suggestedSlippage {
|
|
502
|
+
...PercentNumber
|
|
503
|
+
}
|
|
504
|
+
selectedSlippage {
|
|
505
|
+
...PercentNumber
|
|
506
|
+
}
|
|
507
|
+
buy {
|
|
508
|
+
...TokenAmount
|
|
509
|
+
}
|
|
510
|
+
sell {
|
|
511
|
+
...TokenAmount
|
|
512
|
+
}
|
|
513
|
+
costs {
|
|
514
|
+
...SwapQuoteCosts
|
|
515
|
+
}
|
|
516
|
+
finalBuy {
|
|
517
|
+
...TokenAmount
|
|
518
|
+
}
|
|
519
|
+
finalSell {
|
|
520
|
+
...TokenAmount
|
|
521
|
+
}
|
|
522
|
+
}`,[D,oa,Ti]),Ln=u(`fragment SwapTypedData on SwapTypedData {
|
|
523
|
+
__typename
|
|
524
|
+
primaryType
|
|
525
|
+
types
|
|
526
|
+
domain {
|
|
527
|
+
...DomainData
|
|
528
|
+
}
|
|
529
|
+
message
|
|
530
|
+
}`,[et]),it=u(`fragment PrepareSwapOrder on PrepareSwapOrder {
|
|
531
|
+
__typename
|
|
532
|
+
newQuoteId
|
|
533
|
+
data {
|
|
534
|
+
...SwapTypedData
|
|
535
|
+
}
|
|
536
|
+
}`,[Ln]),gi=u(`fragment SwapByIntent on SwapByIntent {
|
|
537
|
+
__typename
|
|
538
|
+
quote {
|
|
539
|
+
...SwapQuote
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
}`,[hn]),vi=u(`fragment SwapByIntentWithApprovalRequired on SwapByIntentWithApprovalRequired {
|
|
543
|
+
__typename
|
|
544
|
+
approvals {
|
|
545
|
+
...Erc20Approval
|
|
546
|
+
}
|
|
547
|
+
quote {
|
|
548
|
+
...SwapQuote
|
|
549
|
+
}
|
|
550
|
+
}`,[tt,hn]),Ai=u(`fragment SwapByTransaction on SwapByTransaction {
|
|
551
|
+
__typename
|
|
552
|
+
quote {
|
|
553
|
+
...SwapQuote
|
|
554
|
+
}
|
|
555
|
+
}`,[hn]),ot=u(`fragment SwapReceipt on SwapReceipt {
|
|
556
|
+
__typename
|
|
557
|
+
id
|
|
558
|
+
explorerUrl
|
|
559
|
+
createdAt
|
|
560
|
+
}`),hi=u(`fragment TokenSwapQuoteResult on TokenSwapQuoteResult {
|
|
561
|
+
__typename
|
|
562
|
+
... on SwapByIntent {
|
|
563
|
+
...SwapByIntent
|
|
564
|
+
}
|
|
565
|
+
... on SwapByIntentWithApprovalRequired {
|
|
566
|
+
...SwapByIntentWithApprovalRequired
|
|
567
|
+
}
|
|
568
|
+
... on SwapByTransaction {
|
|
569
|
+
...SwapByTransaction
|
|
570
|
+
}
|
|
571
|
+
}`,[gi,vi,Ai]),Li=u(`fragment PrepareTokenSwapResult on PrepareTokenSwapResult {
|
|
572
|
+
__typename
|
|
573
|
+
... on PrepareSwapOrder {
|
|
574
|
+
...PrepareSwapOrder
|
|
575
|
+
}
|
|
576
|
+
... on InsufficientBalanceError {
|
|
577
|
+
...InsufficientBalanceError
|
|
578
|
+
}
|
|
579
|
+
}`,[it,rn]),Oi=u(`fragment SwapTransactionRequest on SwapTransactionRequest {
|
|
580
|
+
__typename
|
|
581
|
+
transaction {
|
|
582
|
+
...TransactionRequest
|
|
583
|
+
}
|
|
584
|
+
orderReceipt {
|
|
585
|
+
...SwapReceipt
|
|
586
|
+
}
|
|
587
|
+
}`,[se,ot]),Si=u(`fragment SwapExecutionPlan on SwapExecutionPlan {
|
|
588
|
+
__typename
|
|
589
|
+
... on SwapTransactionRequest {
|
|
590
|
+
...SwapTransactionRequest
|
|
591
|
+
}
|
|
592
|
+
... on SwapReceipt {
|
|
593
|
+
...SwapReceipt
|
|
594
|
+
}
|
|
595
|
+
... on InsufficientBalanceError {
|
|
596
|
+
...InsufficientBalanceError
|
|
597
|
+
}
|
|
598
|
+
}`,[Oi,ot,rn]),st=u(`fragment SwapCancelled on SwapCancelled {
|
|
599
|
+
__typename
|
|
600
|
+
swapId
|
|
601
|
+
createdAt
|
|
602
|
+
cancelledAt
|
|
603
|
+
explorerUrl
|
|
604
|
+
}`),Ei=u(`fragment SwapExpired on SwapExpired {
|
|
605
|
+
__typename
|
|
606
|
+
swapId
|
|
607
|
+
createdAt
|
|
608
|
+
expiredAt
|
|
609
|
+
explorerUrl
|
|
610
|
+
}`),Ci=u(`fragment PositionAmount on PositionAmount {
|
|
611
|
+
__typename
|
|
612
|
+
reserve {
|
|
613
|
+
...ReserveInfo
|
|
614
|
+
}
|
|
615
|
+
amount {
|
|
616
|
+
...Erc20Amount
|
|
617
|
+
}
|
|
618
|
+
}`,[Oe,z]),qe=u(`fragment SwapAmount on SwapAmount {
|
|
619
|
+
__typename
|
|
620
|
+
... on PositionAmount {
|
|
621
|
+
...PositionAmount
|
|
622
|
+
}
|
|
623
|
+
... on NativeAmount {
|
|
624
|
+
...NativeAmount
|
|
625
|
+
}
|
|
626
|
+
... on Erc20Amount {
|
|
627
|
+
...Erc20Amount
|
|
628
|
+
}
|
|
629
|
+
}`,[Ci,at,z]),_i=u(`fragment SwapOpen on SwapOpen {
|
|
630
|
+
__typename
|
|
631
|
+
swapId
|
|
632
|
+
createdAt
|
|
633
|
+
deadline
|
|
634
|
+
explorerUrl
|
|
635
|
+
desiredSell {
|
|
636
|
+
...SwapAmount
|
|
637
|
+
}
|
|
638
|
+
desiredBuy {
|
|
639
|
+
...SwapAmount
|
|
640
|
+
}
|
|
641
|
+
}`,[qe]),wi=u(`fragment SwapPendingSignature on SwapPendingSignature {
|
|
642
|
+
__typename
|
|
643
|
+
swapId
|
|
644
|
+
createdAt
|
|
645
|
+
deadline
|
|
646
|
+
explorerUrl
|
|
647
|
+
}`),Ui=u(`fragment SwapFulfilled on SwapFulfilled {
|
|
648
|
+
__typename
|
|
649
|
+
swapId
|
|
650
|
+
txHash
|
|
651
|
+
desiredSell {
|
|
652
|
+
...SwapAmount
|
|
653
|
+
}
|
|
654
|
+
desiredBuy {
|
|
655
|
+
...SwapAmount
|
|
656
|
+
}
|
|
657
|
+
sold {
|
|
658
|
+
...SwapAmount
|
|
659
|
+
}
|
|
660
|
+
bought {
|
|
661
|
+
...SwapAmount
|
|
662
|
+
}
|
|
663
|
+
createdAt
|
|
664
|
+
fulfilledAt
|
|
665
|
+
explorerUrl
|
|
666
|
+
refundTxHash
|
|
667
|
+
}`,[qe]),ut=u(`fragment SwapStatus on SwapStatus {
|
|
668
|
+
__typename
|
|
669
|
+
... on SwapOpen {
|
|
670
|
+
...SwapOpen
|
|
671
|
+
}
|
|
672
|
+
... on SwapPendingSignature {
|
|
673
|
+
...SwapPendingSignature
|
|
674
|
+
}
|
|
675
|
+
... on SwapCancelled {
|
|
676
|
+
...SwapCancelled
|
|
677
|
+
}
|
|
678
|
+
... on SwapExpired {
|
|
679
|
+
...SwapExpired
|
|
680
|
+
}
|
|
681
|
+
... on SwapFulfilled {
|
|
682
|
+
...SwapFulfilled
|
|
683
|
+
}
|
|
684
|
+
}`,[_i,wi,st,Ei,Ui]),bi=u(`fragment PrepareSwapCancelResult on PrepareSwapCancelResult {
|
|
685
|
+
__typename
|
|
686
|
+
data {
|
|
687
|
+
...SwapTypedData
|
|
688
|
+
}
|
|
689
|
+
}`,[Ln]),Ri=u(`fragment CancelSwapExecutionPlan on CancelSwapExecutionPlan {
|
|
690
|
+
__typename
|
|
691
|
+
... on TransactionRequest {
|
|
692
|
+
...TransactionRequest
|
|
693
|
+
}
|
|
694
|
+
... on SwapCancelled {
|
|
695
|
+
...SwapCancelled
|
|
696
|
+
}
|
|
697
|
+
}`,[se,st]),qi=u(`fragment PaginatedUserSwapsResult on PaginatedUserSwapsResult {
|
|
698
|
+
__typename
|
|
699
|
+
items {
|
|
700
|
+
...SwapStatus
|
|
701
|
+
}
|
|
702
|
+
pageInfo {
|
|
703
|
+
...PaginatedResultInfo
|
|
704
|
+
}
|
|
705
|
+
}`,[ut,Tn]),Pi=u(`fragment PositionSwapAdapterContractApproval on PositionSwapAdapterContractApproval {
|
|
706
|
+
__typename
|
|
707
|
+
bySignature {
|
|
708
|
+
...SwapTypedData
|
|
709
|
+
}
|
|
710
|
+
}`,[Ln]),Ii=u(`fragment PositionSwapPositionManagerApproval on PositionSwapPositionManagerApproval {
|
|
711
|
+
__typename
|
|
712
|
+
byTransaction {
|
|
713
|
+
...TransactionRequest
|
|
714
|
+
}
|
|
715
|
+
bySignature {
|
|
716
|
+
...SwapTypedData
|
|
717
|
+
}
|
|
718
|
+
}`,[se,Ln]),Bi=u(`fragment PositionSwapApproval on PositionSwapApproval {
|
|
719
|
+
__typename
|
|
720
|
+
... on PositionSwapAdapterContractApproval {
|
|
721
|
+
...PositionSwapAdapterContractApproval
|
|
722
|
+
}
|
|
723
|
+
... on PositionSwapPositionManagerApproval {
|
|
724
|
+
...PositionSwapPositionManagerApproval
|
|
725
|
+
}
|
|
726
|
+
}`,[Pi,Ii]),On=u(`fragment PositionSwapByIntentApprovalsRequired on PositionSwapByIntentApprovalsRequired {
|
|
727
|
+
__typename
|
|
728
|
+
quote {
|
|
729
|
+
...SwapQuote
|
|
730
|
+
}
|
|
731
|
+
approvals {
|
|
732
|
+
...PositionSwapApproval
|
|
733
|
+
}
|
|
734
|
+
}`,[hn,Bi]),xi=u(`fragment SupplySwapQuoteResult on SupplySwapQuoteResult {
|
|
735
|
+
__typename
|
|
736
|
+
... on PositionSwapByIntentApprovalsRequired {
|
|
737
|
+
...PositionSwapByIntentApprovalsRequired
|
|
738
|
+
}
|
|
739
|
+
}`,[On]),Di=u(`fragment BorrowSwapQuoteResult on BorrowSwapQuoteResult {
|
|
740
|
+
__typename
|
|
741
|
+
... on PositionSwapByIntentApprovalsRequired {
|
|
742
|
+
...PositionSwapByIntentApprovalsRequired
|
|
743
|
+
}
|
|
744
|
+
}`,[On]),Fi=u(`fragment RepayWithSupplyQuoteResult on RepayWithSupplyQuoteResult {
|
|
745
|
+
__typename
|
|
746
|
+
... on PositionSwapByIntentApprovalsRequired {
|
|
747
|
+
...PositionSwapByIntentApprovalsRequired
|
|
748
|
+
}
|
|
749
|
+
}`,[On]),Ji=u(`fragment WithdrawSwapQuoteResult on WithdrawSwapQuoteResult {
|
|
750
|
+
__typename
|
|
751
|
+
... on PositionSwapByIntentApprovalsRequired {
|
|
752
|
+
...PositionSwapByIntentApprovalsRequired
|
|
753
|
+
}
|
|
754
|
+
}`,[On]),Vi=u(`fragment PreparePositionSwapResult on PreparePositionSwapResult {
|
|
755
|
+
__typename
|
|
756
|
+
... on PrepareSwapOrder {
|
|
757
|
+
...PrepareSwapOrder
|
|
758
|
+
}
|
|
759
|
+
... on InsufficientBalanceError {
|
|
760
|
+
...InsufficientBalanceError
|
|
761
|
+
}
|
|
762
|
+
}`,[it,rn]),$i=u(`fragment UserSupplyItem on UserSupplyItem {
|
|
763
|
+
__typename
|
|
764
|
+
id
|
|
765
|
+
reserve {
|
|
766
|
+
...Reserve
|
|
767
|
+
}
|
|
768
|
+
interest {
|
|
769
|
+
...Erc20Amount
|
|
770
|
+
}
|
|
771
|
+
principal {
|
|
772
|
+
...Erc20Amount
|
|
773
|
+
}
|
|
774
|
+
withdrawable {
|
|
775
|
+
...Erc20Amount
|
|
776
|
+
}
|
|
777
|
+
isCollateral
|
|
778
|
+
createdAt
|
|
779
|
+
}`,[z,vn]),Wi=u(`fragment UserBorrowItem on UserBorrowItem {
|
|
780
|
+
__typename
|
|
781
|
+
id
|
|
782
|
+
principal {
|
|
783
|
+
...Erc20Amount
|
|
784
|
+
}
|
|
785
|
+
interest {
|
|
786
|
+
...Erc20Amount
|
|
787
|
+
}
|
|
788
|
+
debt {
|
|
789
|
+
...Erc20Amount
|
|
790
|
+
}
|
|
791
|
+
reserve {
|
|
792
|
+
...Reserve
|
|
793
|
+
}
|
|
794
|
+
createdAt
|
|
795
|
+
}`,[z,vn]),Hi=u(`fragment UserSummary on UserSummary {
|
|
796
|
+
__typename
|
|
797
|
+
totalPositions
|
|
798
|
+
netBalance(currency: $currency) {
|
|
799
|
+
...ExchangeAmountWithChange
|
|
800
|
+
}
|
|
801
|
+
totalCollateral(currency: $currency) {
|
|
802
|
+
...ExchangeAmount
|
|
803
|
+
}
|
|
804
|
+
totalSupplied(currency: $currency) {
|
|
805
|
+
...ExchangeAmount
|
|
806
|
+
}
|
|
807
|
+
totalDebt(currency: $currency) {
|
|
808
|
+
...ExchangeAmount
|
|
809
|
+
}
|
|
810
|
+
netApy {
|
|
811
|
+
...PercentNumber
|
|
812
|
+
}
|
|
813
|
+
netAccruedInterest(currency: $currency) {
|
|
814
|
+
...ExchangeAmount
|
|
815
|
+
}
|
|
816
|
+
lowestHealthFactor
|
|
817
|
+
}`,[tn,ie,D]),pt=u(`fragment UserRiskPremiumBreakdownItem on UserRiskPremiumBreakdownItem {
|
|
818
|
+
__typename
|
|
819
|
+
token {
|
|
820
|
+
...Erc20Token
|
|
821
|
+
}
|
|
822
|
+
currentRiskPremiumWeight {
|
|
823
|
+
...PercentNumber
|
|
824
|
+
}
|
|
825
|
+
latestRiskPremiumWeight {
|
|
826
|
+
...PercentNumber
|
|
827
|
+
}
|
|
828
|
+
collateral {
|
|
829
|
+
...PercentNumber
|
|
830
|
+
}
|
|
831
|
+
}`,[Le,D]),Qi=u(`fragment UserPositionRiskPremium on UserPositionRiskPremium {
|
|
832
|
+
__typename
|
|
833
|
+
current {
|
|
834
|
+
...PercentNumber
|
|
835
|
+
}
|
|
836
|
+
latest {
|
|
837
|
+
...PercentNumber
|
|
838
|
+
}
|
|
839
|
+
breakdown {
|
|
840
|
+
...UserRiskPremiumBreakdownItem
|
|
841
|
+
}
|
|
842
|
+
}`,[D,pt]),lt=u(`fragment UserPosition on UserPosition {
|
|
843
|
+
__typename
|
|
844
|
+
id
|
|
845
|
+
spoke {
|
|
846
|
+
...Spoke
|
|
847
|
+
}
|
|
848
|
+
user
|
|
849
|
+
createdAt
|
|
850
|
+
netApy {
|
|
851
|
+
...PercentNumber
|
|
852
|
+
}
|
|
853
|
+
netCollateral(currency: $currency) {
|
|
854
|
+
...ExchangeAmountWithChange
|
|
855
|
+
}
|
|
856
|
+
netBalance(currency: $currency) {
|
|
857
|
+
...ExchangeAmountWithChange
|
|
858
|
+
}
|
|
859
|
+
netAccruedInterest(currency: $currency) {
|
|
860
|
+
...ExchangeAmount
|
|
861
|
+
}
|
|
862
|
+
totalCollateral(currency: $currency) {
|
|
863
|
+
...ExchangeAmountWithChange
|
|
864
|
+
}
|
|
865
|
+
totalSupplied(currency: $currency) {
|
|
866
|
+
...ExchangeAmountWithChange
|
|
867
|
+
}
|
|
868
|
+
totalDebt(currency: $currency) {
|
|
869
|
+
...ExchangeAmountWithChange
|
|
870
|
+
}
|
|
871
|
+
netSupplyApy {
|
|
872
|
+
...PercentNumberWithChange
|
|
873
|
+
}
|
|
874
|
+
netBorrowApy {
|
|
875
|
+
...PercentNumberWithChange
|
|
876
|
+
}
|
|
877
|
+
healthFactor {
|
|
878
|
+
...HealthFactorWithChange
|
|
879
|
+
}
|
|
880
|
+
riskPremium {
|
|
881
|
+
...UserPositionRiskPremium
|
|
882
|
+
}
|
|
883
|
+
liquidationPrice(currency: $currency) {
|
|
884
|
+
...ExchangeAmount
|
|
885
|
+
}
|
|
886
|
+
borrowingPower(currency: $currency) {
|
|
887
|
+
...ExchangeAmount
|
|
888
|
+
}
|
|
889
|
+
canUpdateDynamicConfig
|
|
890
|
+
netBalancePercentChange(window: $timeWindow) {
|
|
891
|
+
...PercentNumber
|
|
892
|
+
}
|
|
893
|
+
averageCollateralFactor {
|
|
894
|
+
...PercentNumber
|
|
895
|
+
}
|
|
896
|
+
}`,[oe,D,tn,ie,zr,ei,Qi]),Mi=u(`fragment UserBalance on UserBalance {
|
|
897
|
+
__typename
|
|
898
|
+
id
|
|
899
|
+
info {
|
|
900
|
+
...TokenInfo
|
|
901
|
+
}
|
|
902
|
+
totalAmount {
|
|
903
|
+
...DecimalNumber
|
|
904
|
+
}
|
|
905
|
+
balances {
|
|
906
|
+
...TokenAmount
|
|
907
|
+
}
|
|
908
|
+
exchange(currency: $currency) {
|
|
909
|
+
...ExchangeAmount
|
|
910
|
+
}
|
|
911
|
+
highestSupplyApy: supplyApy(metric: HIGHEST) {
|
|
912
|
+
...PercentNumber
|
|
913
|
+
}
|
|
914
|
+
highestBorrowApy: borrowApy(metric: HIGHEST) {
|
|
915
|
+
...PercentNumber
|
|
916
|
+
}
|
|
917
|
+
lowestSupplyApy: supplyApy(metric: LOWEST) {
|
|
918
|
+
...PercentNumber
|
|
919
|
+
}
|
|
920
|
+
lowestBorrowApy: borrowApy(metric: LOWEST) {
|
|
921
|
+
...PercentNumber
|
|
922
|
+
}
|
|
923
|
+
highestCollateralFactor: collateralFactor(metric: HIGHEST) {
|
|
924
|
+
...PercentNumber
|
|
925
|
+
}
|
|
926
|
+
lowestCollateralFactor: collateralFactor(metric: LOWEST) {
|
|
927
|
+
...PercentNumber
|
|
928
|
+
}
|
|
929
|
+
}`,[kn,fe,oa,ie,D]),ji=u(`fragment UserSummaryHistoryItem on UserSummaryHistoryItem {
|
|
930
|
+
__typename
|
|
931
|
+
netBalance(currency: $currency) {
|
|
932
|
+
...ExchangeAmount
|
|
933
|
+
}
|
|
934
|
+
borrows(currency: $currency) {
|
|
935
|
+
...ExchangeAmount
|
|
936
|
+
}
|
|
937
|
+
supplies(currency: $currency) {
|
|
938
|
+
...ExchangeAmount
|
|
939
|
+
}
|
|
940
|
+
healthFactor
|
|
941
|
+
date
|
|
942
|
+
}`,[ie]),dt=u(`fragment ApySample on ApySample {
|
|
943
|
+
__typename
|
|
944
|
+
date
|
|
945
|
+
avgRate {
|
|
946
|
+
...PercentNumber
|
|
947
|
+
}
|
|
948
|
+
}`,[D]),Qu=u(`query Hub($request: HubRequest!, $currency: Currency!, $timeWindow: TimeWindow!) {
|
|
949
|
+
value: hub(request: $request) {
|
|
950
|
+
...Hub
|
|
951
|
+
}
|
|
952
|
+
}`,[gn]),Gi=u(`query Hubs($request: HubsRequest!, $currency: Currency!, $timeWindow: TimeWindow!) {
|
|
953
|
+
value: hubs(request: $request) {
|
|
954
|
+
...Hub
|
|
955
|
+
}
|
|
956
|
+
}`,[gn]),Mu=u(`query HubAssets($request: HubAssetsRequest!, $currency: Currency!, $timeWindow: TimeWindow!) {
|
|
957
|
+
value: hubAssets(request: $request) {
|
|
958
|
+
...HubAsset
|
|
959
|
+
}
|
|
960
|
+
}`,[sa]),Ki=u(`fragment HubSummarySample on HubSummarySample {
|
|
961
|
+
__typename
|
|
962
|
+
date
|
|
963
|
+
deposits {
|
|
964
|
+
...ExchangeAmount
|
|
965
|
+
}
|
|
966
|
+
borrows {
|
|
967
|
+
...ExchangeAmount
|
|
968
|
+
}
|
|
969
|
+
availableLiquidity {
|
|
970
|
+
...ExchangeAmount
|
|
971
|
+
}
|
|
972
|
+
utilizationRate {
|
|
973
|
+
...PercentNumber
|
|
974
|
+
}
|
|
975
|
+
}`,[ie,D]),ju=u(`query HubSummaryHistory($request: HubSummaryHistoryRequest!) {
|
|
976
|
+
value: hubSummaryHistory(request: $request) {
|
|
977
|
+
...HubSummarySample
|
|
978
|
+
}
|
|
979
|
+
}`,[Ki]);function ua(e){return new TextDecoder().decode(Uint8Array.from(atob(e),n=>n.charCodeAt(0)))}function pa(e){return btoa(String.fromCharCode(...new TextEncoder().encode(e)))}var me="::";function Gu(e){return o(typeof e=="string"&&e.length>0,`Invalid AssetId: ${e}`),o(/^[A-Za-z0-9+/]*={0,2}$/.test(e),`AssetId must be valid base64: ${e}`),e}function Yi(e){return o(typeof e=="string"&&e.length>0,`Invalid HubId: ${e}`),o(/^[A-Za-z0-9+/]*={0,2}$/.test(e),`HubId must be valid base64: ${e}`),e}function yt(e){return Yi(pa(`${e.chainId}${me}${e.address}`))}function Ku(e){let n=ua(e),[a,t]=n.split(me);return {chainId:R(Number.parseInt(a,10)),address:F(t)}}function Yu(e){return o(typeof e=="string"&&e.length>0,`Invalid HubAssetId: ${e}`),o(/^[A-Za-z0-9+/]*={0,2}$/.test(e),`HubAssetId must be valid base64: ${e}`),e}function zu(e){return e}function Xu(e){let n=ua(e),[a,t,r]=n.split(me);return {chainId:R(Number.parseInt(a,10)),spoke:F(t),onChainId:r}}function ct(e){return pa(`${e.chainId}${me}${e.spoke}${me}${e.onChainId}`)}function zi(e){return o(typeof e=="string"&&e.length>0,`Invalid UserPositionId: ${e}`),o(/^[A-Za-z0-9+/]*={0,2}$/.test(e),`UserPositionId must be valid base64: ${e}`),e}function Zu(e){let n=ua(e),[a,t,r]=n.split(me);return {chainId:R(Number.parseInt(a,10)),spoke:F(t),user:F(r)}}function mt(e){return zi(pa(`${e.chainId}${me}${e.spoke}${me}${e.user}`))}function ep(e){return o(D$1(e),`Invalid SwapId: ${e}`),e}function np(e){return o(D$1(e),`Invalid SwapQuoteId: ${e}`),e}function ap(e){return Xi(pa(`${e.chainId}${me}${e.address}`))}function ft(e){let n=ua(e),[a,t]=n.split(me);return {chainId:R(Number.parseInt(a,10)),address:F(t)}}function Xi(e){return o(typeof e=="string"&&e.length>0,`Invalid SpokeId: ${e}`),o(/^[A-Za-z0-9+/]*={0,2}$/.test(e),`SpokeId must be valid base64: ${e}`),e}function tp(e){return o(typeof e=="string"&&e.length>0,`Invalid UserBalanceId: ${e}`),o(/^[A-Za-z0-9+/]*={0,2}$/.test(e),`UserBalanceId must be valid base64: ${e}`),e}function rp(e){return o(typeof e=="string"&&e.length>0,`Invalid UserBorrowItemId: ${e}`),o(/^[A-Za-z0-9+/]*={0,2}$/.test(e),`UserBorrowItemId must be valid base64: ${e}`),e}function ip(e){return o(typeof e=="string"&&e.length>0,`Invalid UserSupplyItemId: ${e}`),o(/^[A-Za-z0-9+/]*={0,2}$/.test(e),`UserSupplyItemId must be valid base64: ${e}`),e}function op(e){return o(typeof e=="string"&&e.length>0,`Invalid TokenInfoId: ${e}`),e}function Nt(e){return p(e)&&"hubInput"in e&&e.hubInput!=null}function sp(e){return p(e)&&"chainIds"in e&&e.chainIds!=null}function up(e){return p(e)&&"tokens"in e&&e.tokens!=null}function pp(e){return p(e)&&"spoke"in e&&e.spoke!=null}function kt(e){return p(e)&&"reserveInput"in e&&e.reserveInput!=null}function Tt(e){return p(e)&&"txHash"in e&&e.txHash!=null}var Zi=u(`query Chain($request: ChainRequest!) {
|
|
980
|
+
value: chain(request: $request) {
|
|
981
|
+
...Chain
|
|
982
|
+
}
|
|
983
|
+
}`,[$]),lp=u(`query Chains($request: ChainsRequest!) {
|
|
984
|
+
value: chains(request: $request) {
|
|
985
|
+
...Chain
|
|
986
|
+
}
|
|
987
|
+
}`,[$]),eo=u(`query HasProcessedKnownTransaction($request: HasProcessedKnownTransactionRequest!) {
|
|
988
|
+
value: hasProcessedKnownTransaction(request: $request)
|
|
989
|
+
}`),dp=u(`query Health {
|
|
990
|
+
value: health
|
|
991
|
+
}`),no=u(`query ExchangeRate($request: ExchangeRateRequest!) {
|
|
992
|
+
value: exchangeRate(request: $request) {
|
|
993
|
+
...ExchangeAmount
|
|
994
|
+
}
|
|
995
|
+
}`,[ie]),ao=u(`fragment AssetPriceSample on AssetPriceSample {
|
|
996
|
+
__typename
|
|
997
|
+
date
|
|
998
|
+
price
|
|
999
|
+
}`),gt=u(`fragment AssetSampleBreakdown on AssetSampleBreakdown {
|
|
1000
|
+
__typename
|
|
1001
|
+
amount {
|
|
1002
|
+
...DecimalNumber
|
|
1003
|
+
}
|
|
1004
|
+
apy {
|
|
1005
|
+
...PercentNumber
|
|
1006
|
+
}
|
|
1007
|
+
hub {
|
|
1008
|
+
...Hub
|
|
1009
|
+
}
|
|
1010
|
+
}`,[fe,D,gn]),to=u(`fragment AssetSupplySample on AssetSupplySample {
|
|
1011
|
+
__typename
|
|
1012
|
+
date
|
|
1013
|
+
amount {
|
|
1014
|
+
...DecimalNumber
|
|
1015
|
+
}
|
|
1016
|
+
highestApy {
|
|
1017
|
+
...PercentNumber
|
|
1018
|
+
}
|
|
1019
|
+
lowestApy {
|
|
1020
|
+
...PercentNumber
|
|
1021
|
+
}
|
|
1022
|
+
averageApy {
|
|
1023
|
+
...PercentNumber
|
|
1024
|
+
}
|
|
1025
|
+
breakdown {
|
|
1026
|
+
...AssetSampleBreakdown
|
|
1027
|
+
}
|
|
1028
|
+
}`,[fe,D,gt]),ro=u(`fragment AssetBorrowSample on AssetBorrowSample {
|
|
1029
|
+
__typename
|
|
1030
|
+
date
|
|
1031
|
+
amount {
|
|
1032
|
+
...DecimalNumber
|
|
1033
|
+
}
|
|
1034
|
+
highestApy {
|
|
1035
|
+
...PercentNumber
|
|
1036
|
+
}
|
|
1037
|
+
lowestApy {
|
|
1038
|
+
...PercentNumber
|
|
1039
|
+
}
|
|
1040
|
+
averageApy {
|
|
1041
|
+
...PercentNumber
|
|
1042
|
+
}
|
|
1043
|
+
breakdown {
|
|
1044
|
+
...AssetSampleBreakdown
|
|
1045
|
+
}
|
|
1046
|
+
}`,[fe,D,gt]),io=u(`fragment AssetAmountWithChange on AssetAmountWithChange {
|
|
1047
|
+
__typename
|
|
1048
|
+
amount {
|
|
1049
|
+
...DecimalNumberWithChange
|
|
1050
|
+
}
|
|
1051
|
+
exchange(currency: $currency) {
|
|
1052
|
+
...ExchangeAmountWithChange
|
|
1053
|
+
}
|
|
1054
|
+
}`,[Kr,tn]),oo=u(`fragment AssetSummary on AssetSummary {
|
|
1055
|
+
__typename
|
|
1056
|
+
totalSupplyCap {
|
|
1057
|
+
...AssetAmountWithChange
|
|
1058
|
+
}
|
|
1059
|
+
totalSupplied {
|
|
1060
|
+
...AssetAmountWithChange
|
|
1061
|
+
}
|
|
1062
|
+
totalSuppliable {
|
|
1063
|
+
...AssetAmountWithChange
|
|
1064
|
+
}
|
|
1065
|
+
totalBorrowCap {
|
|
1066
|
+
...AssetAmountWithChange
|
|
1067
|
+
}
|
|
1068
|
+
totalBorrowed {
|
|
1069
|
+
...AssetAmountWithChange
|
|
1070
|
+
}
|
|
1071
|
+
totalBorrowable {
|
|
1072
|
+
...AssetAmountWithChange
|
|
1073
|
+
}
|
|
1074
|
+
averageBorrowApy: borrowApy(metric: AVERAGE) {
|
|
1075
|
+
...PercentNumber
|
|
1076
|
+
}
|
|
1077
|
+
averageSupplyApy: supplyApy(metric: AVERAGE) {
|
|
1078
|
+
...PercentNumber
|
|
1079
|
+
}
|
|
1080
|
+
}`,[io,D]),so=u(`fragment Asset on Asset {
|
|
1081
|
+
__typename
|
|
1082
|
+
id
|
|
1083
|
+
token {
|
|
1084
|
+
...Erc20Token
|
|
1085
|
+
}
|
|
1086
|
+
summary {
|
|
1087
|
+
...AssetSummary
|
|
1088
|
+
}
|
|
1089
|
+
price(currency: $currency) {
|
|
1090
|
+
...ExchangeAmountWithChange
|
|
1091
|
+
}
|
|
1092
|
+
}`,[Le,oo,tn]),yp=u(`query Asset($request: AssetRequest!, $currency: Currency!, $timeWindow: TimeWindow!) {
|
|
1093
|
+
value: asset(request: $request) {
|
|
1094
|
+
...Asset
|
|
1095
|
+
}
|
|
1096
|
+
}`,[so]),cp=u(`query AssetPriceHistory($request: AssetPriceHistoryRequest!) {
|
|
1097
|
+
value: assetPriceHistory(request: $request) {
|
|
1098
|
+
...AssetPriceSample
|
|
1099
|
+
}
|
|
1100
|
+
}`,[ao]),mp=u(`query AssetSupplyHistory($request: AssetSupplyHistoryRequest!, $currency: Currency!, $timeWindow: TimeWindow!) {
|
|
1101
|
+
value: assetSupplyHistory(request: $request) {
|
|
1102
|
+
...AssetSupplySample
|
|
1103
|
+
}
|
|
1104
|
+
}`,[to]),fp=u(`query AssetBorrowHistory($request: AssetBorrowHistoryRequest!, $currency: Currency!, $timeWindow: TimeWindow!) {
|
|
1105
|
+
value: assetBorrowHistory(request: $request) {
|
|
1106
|
+
...AssetBorrowSample
|
|
1107
|
+
}
|
|
1108
|
+
}`,[ro]),uo=u(`fragment ProtocolHistorySample on ProtocolHistorySample {
|
|
1109
|
+
__typename
|
|
1110
|
+
date
|
|
1111
|
+
deposits {
|
|
1112
|
+
...ExchangeAmount
|
|
1113
|
+
}
|
|
1114
|
+
borrows {
|
|
1115
|
+
...ExchangeAmount
|
|
1116
|
+
}
|
|
1117
|
+
}`,[ie]),Np=u(`query ProtocolHistory($request: ProtocolHistoryRequest!) {
|
|
1118
|
+
value: protocolHistory(request: $request) {
|
|
1119
|
+
...ProtocolHistorySample
|
|
1120
|
+
}
|
|
1121
|
+
}`,[uo]),kp=u(`query BorrowApyHistory($request: BorrowApyHistoryRequest!) {
|
|
1122
|
+
value: borrowApyHistory(request: $request) {
|
|
1123
|
+
...ApySample
|
|
1124
|
+
}
|
|
1125
|
+
}`,[dt]),Tp=u(`query SupplyApyHistory($request: SupplyApyHistoryRequest!) {
|
|
1126
|
+
value: supplyApyHistory(request: $request) {
|
|
1127
|
+
...ApySample
|
|
1128
|
+
}
|
|
1129
|
+
}`,[dt]),po=u(`query Reserve($request: ReserveRequest!, $currency: Currency!, $timeWindow: TimeWindow!) {
|
|
1130
|
+
value: reserve(request: $request) {
|
|
1131
|
+
...Reserve
|
|
1132
|
+
}
|
|
1133
|
+
}`,[vn]),lo=u(`query Reserves($request: ReservesRequest!, $currency: Currency!, $timeWindow: TimeWindow!) {
|
|
1134
|
+
value: reserves(request: $request) {
|
|
1135
|
+
...Reserve
|
|
1136
|
+
}
|
|
1137
|
+
}`,[vn]),gp=u(`query Spoke($request: SpokeRequest!) {
|
|
1138
|
+
value: spoke(request: $request) {
|
|
1139
|
+
...Spoke
|
|
1140
|
+
}
|
|
1141
|
+
}`,[oe]),vp=u(`query Spokes($request: SpokesRequest!) {
|
|
1142
|
+
value: spokes(request: $request) {
|
|
1143
|
+
...Spoke
|
|
1144
|
+
}
|
|
1145
|
+
}`,[oe]),Ap=u(`query SpokePositionManagers($request: SpokePositionManagersRequest!) {
|
|
1146
|
+
value: spokePositionManagers(request: $request) {
|
|
1147
|
+
...PaginatedSpokePositionManagerResult
|
|
1148
|
+
}
|
|
1149
|
+
}`,[li]),hp=u(`query SpokeUserPositionManagers($request: SpokeUserPositionManagersRequest!) {
|
|
1150
|
+
value: spokeUserPositionManagers(request: $request) {
|
|
1151
|
+
...PaginatedSpokeUserPositionManagerResult
|
|
1152
|
+
}
|
|
1153
|
+
}`,[yi]),yo=u(`query TokenSwapQuote($request: TokenSwapQuoteRequest!, $currency: Currency!) {
|
|
1154
|
+
value: tokenSwapQuote(request: $request) {
|
|
1155
|
+
...TokenSwapQuoteResult
|
|
1156
|
+
}
|
|
1157
|
+
}`,[hi]),Lp=u(`query SwappableTokens($request: SwappableTokensRequest!) {
|
|
1158
|
+
value: swappableTokens(request: $request) {
|
|
1159
|
+
...Token
|
|
1160
|
+
}
|
|
1161
|
+
}`,[Yr]),co=u(`query PrepareTokenSwap($request: PrepareTokenSwapRequest!) {
|
|
1162
|
+
value: prepareTokenSwap(request: $request) {
|
|
1163
|
+
...PrepareTokenSwapResult
|
|
1164
|
+
}
|
|
1165
|
+
}`,[Li]),mo=u(`query SwapStatus($request: SwapStatusRequest!, $currency: Currency!, $timeWindow: TimeWindow!) {
|
|
1166
|
+
value: swapStatus(request: $request) {
|
|
1167
|
+
...SwapStatus
|
|
1168
|
+
}
|
|
1169
|
+
}`,[ut]),fo=u(`mutation Swap($request: SwapRequest!) {
|
|
1170
|
+
value: swap(request: $request) {
|
|
1171
|
+
...SwapExecutionPlan
|
|
1172
|
+
}
|
|
1173
|
+
}`,[Si]),No=u(`query PrepareSwapCancel($request: PrepareSwapCancelRequest!) {
|
|
1174
|
+
value: prepareSwapCancel(request: $request) {
|
|
1175
|
+
...PrepareSwapCancelResult
|
|
1176
|
+
}
|
|
1177
|
+
}`,[bi]),ko=u(`mutation CancelSwap($request: CancelSwapRequest!) {
|
|
1178
|
+
value: cancelSwap(request: $request) {
|
|
1179
|
+
...CancelSwapExecutionPlan
|
|
1180
|
+
}
|
|
1181
|
+
}`,[Ri]),Op=u(`query UserSwaps($request: UserSwapsRequest!, $currency: Currency!, $timeWindow: TimeWindow!) {
|
|
1182
|
+
value: userSwaps(request: $request) {
|
|
1183
|
+
...PaginatedUserSwapsResult
|
|
1184
|
+
}
|
|
1185
|
+
}`,[qi]),To=u(`query SupplySwapQuote($request: SupplySwapQuoteRequest!, $currency: Currency!) {
|
|
1186
|
+
value: supplySwapQuote(request: $request) {
|
|
1187
|
+
...SupplySwapQuoteResult
|
|
1188
|
+
}
|
|
1189
|
+
}`,[xi]),go=u(`query BorrowSwapQuote($request: BorrowSwapQuoteRequest!, $currency: Currency!) {
|
|
1190
|
+
value: borrowSwapQuote(request: $request) {
|
|
1191
|
+
...BorrowSwapQuoteResult
|
|
1192
|
+
}
|
|
1193
|
+
}`,[Di]),vo=u(`query RepayWithSupplyQuote($request: RepayWithSupplyQuoteRequest!, $currency: Currency!) {
|
|
1194
|
+
value: repayWithSupplyQuote(request: $request) {
|
|
1195
|
+
...RepayWithSupplyQuoteResult
|
|
1196
|
+
}
|
|
1197
|
+
}`,[Fi]),Ao=u(`query WithdrawSwapQuote($request: WithdrawSwapQuoteRequest!, $currency: Currency!) {
|
|
1198
|
+
value: withdrawSwapQuote(request: $request) {
|
|
1199
|
+
...WithdrawSwapQuoteResult
|
|
1200
|
+
}
|
|
1201
|
+
}`,[Ji]),ho=u(`query PreparePositionSwap($request: PreparePositionSwapRequest!) {
|
|
1202
|
+
value: preparePositionSwap(request: $request) {
|
|
1203
|
+
...PreparePositionSwapResult
|
|
1204
|
+
}
|
|
1205
|
+
}`,[Vi]),Lo=u(`query Borrow($request: BorrowRequest!) {
|
|
1206
|
+
value: borrow(request: $request) {
|
|
1207
|
+
...ExecutionPlan
|
|
1208
|
+
}
|
|
1209
|
+
}`,[An]),Oo=u(`query Supply($request: SupplyRequest!) {
|
|
1210
|
+
value: supply(request: $request) {
|
|
1211
|
+
...ExecutionPlan
|
|
1212
|
+
}
|
|
1213
|
+
}`,[An]),So=u(`query Repay($request: RepayRequest!) {
|
|
1214
|
+
value: repay(request: $request) {
|
|
1215
|
+
...ExecutionPlan
|
|
1216
|
+
}
|
|
1217
|
+
}`,[An]),Eo=u(`query Withdraw($request: WithdrawRequest!) {
|
|
1218
|
+
value: withdraw(request: $request) {
|
|
1219
|
+
...ExecutionPlan
|
|
1220
|
+
}
|
|
1221
|
+
}`,[An]),Co=u(`fragment LiquidatePositionExecutionPlan on LiquidatePositionExecutionPlan {
|
|
1222
|
+
__typename
|
|
1223
|
+
... on TransactionRequest {
|
|
1224
|
+
...TransactionRequest
|
|
1225
|
+
}
|
|
1226
|
+
... on Erc20ApprovalRequired {
|
|
1227
|
+
...Erc20ApprovalRequired
|
|
1228
|
+
}
|
|
1229
|
+
... on InsufficientBalanceError {
|
|
1230
|
+
...InsufficientBalanceError
|
|
1231
|
+
}
|
|
1232
|
+
}`,[se,rt,rn]),_o=u(`query LiquidatePosition($request: LiquidatePositionRequest!) {
|
|
1233
|
+
value: liquidatePosition(request: $request) {
|
|
1234
|
+
...LiquidatePositionExecutionPlan
|
|
1235
|
+
}
|
|
1236
|
+
}`,[Co]),wo=u(`query SetSpokeUserPositionManager($request: SetSpokeUserPositionManagerRequest!) {
|
|
1237
|
+
value: setSpokeUserPositionManager(request: $request) {
|
|
1238
|
+
...TransactionRequest
|
|
1239
|
+
}
|
|
1240
|
+
}`,[se]),Uo=u(`query SetUserSuppliesAsCollateral($request: SetUserSuppliesAsCollateralRequest!) {
|
|
1241
|
+
value: setUserSuppliesAsCollateral(request: $request) {
|
|
1242
|
+
...TransactionRequest
|
|
1243
|
+
}
|
|
1244
|
+
}`,[se]),bo=u(`query RenounceSpokeUserPositionManager($request: RenounceSpokeUserPositionManagerRequest!) {
|
|
1245
|
+
value: renounceSpokeUserPositionManager(request: $request) {
|
|
1246
|
+
...TransactionRequest
|
|
1247
|
+
}
|
|
1248
|
+
}`,[se]),Ro=u(`query UpdateUserPositionConditions($request: UpdateUserPositionConditionsRequest!) {
|
|
1249
|
+
value: updateUserPositionConditions(request: $request) {
|
|
1250
|
+
...TransactionRequest
|
|
1251
|
+
}
|
|
1252
|
+
}`,[se]),qo=u(`fragment CollateralFactorVariation on CollateralFactorVariation {
|
|
1253
|
+
__typename
|
|
1254
|
+
reserveId
|
|
1255
|
+
token {
|
|
1256
|
+
...Erc20Token
|
|
1257
|
+
}
|
|
1258
|
+
current {
|
|
1259
|
+
...PercentNumber
|
|
1260
|
+
}
|
|
1261
|
+
after {
|
|
1262
|
+
...PercentNumber
|
|
1263
|
+
}
|
|
1264
|
+
}`,[Le,D]),Po=u(`fragment LiquidationFeeVariation on LiquidationFeeVariation {
|
|
1265
|
+
__typename
|
|
1266
|
+
reserveId
|
|
1267
|
+
token {
|
|
1268
|
+
...Erc20Token
|
|
1269
|
+
}
|
|
1270
|
+
current {
|
|
1271
|
+
...PercentNumber
|
|
1272
|
+
}
|
|
1273
|
+
after {
|
|
1274
|
+
...PercentNumber
|
|
1275
|
+
}
|
|
1276
|
+
}`,[Le,D]),Io=u(`fragment MaxLiquidationBonusVariation on MaxLiquidationBonusVariation {
|
|
1277
|
+
__typename
|
|
1278
|
+
reserveId
|
|
1279
|
+
token {
|
|
1280
|
+
...Erc20Token
|
|
1281
|
+
}
|
|
1282
|
+
current {
|
|
1283
|
+
...PercentNumber
|
|
1284
|
+
}
|
|
1285
|
+
after {
|
|
1286
|
+
...PercentNumber
|
|
1287
|
+
}
|
|
1288
|
+
}`,[Le,D]),Bo=u(`fragment UserPositionConditionVariation on UserPositionConditionVariation {
|
|
1289
|
+
__typename
|
|
1290
|
+
... on CollateralFactorVariation {
|
|
1291
|
+
...CollateralFactorVariation
|
|
1292
|
+
}
|
|
1293
|
+
... on LiquidationFeeVariation {
|
|
1294
|
+
...LiquidationFeeVariation
|
|
1295
|
+
}
|
|
1296
|
+
... on MaxLiquidationBonusVariation {
|
|
1297
|
+
...MaxLiquidationBonusVariation
|
|
1298
|
+
}
|
|
1299
|
+
}`,[qo,Po,Io]),xo=u(`fragment PreviewUserPosition on PreviewUserPosition {
|
|
1300
|
+
__typename
|
|
1301
|
+
id
|
|
1302
|
+
healthFactor {
|
|
1303
|
+
...HealthFactorResult
|
|
1304
|
+
}
|
|
1305
|
+
netApy {
|
|
1306
|
+
...PercentNumberVariation
|
|
1307
|
+
}
|
|
1308
|
+
riskPremium {
|
|
1309
|
+
...PercentNumberVariation
|
|
1310
|
+
}
|
|
1311
|
+
netCollateral(currency: $currency) {
|
|
1312
|
+
...ExchangeAmountVariation
|
|
1313
|
+
}
|
|
1314
|
+
netBalance(currency: $currency) {
|
|
1315
|
+
...ExchangeAmountVariation
|
|
1316
|
+
}
|
|
1317
|
+
projectedEarnings {
|
|
1318
|
+
...ExchangeAmountVariation
|
|
1319
|
+
}
|
|
1320
|
+
borrowingPower {
|
|
1321
|
+
...ExchangeAmountVariation
|
|
1322
|
+
}
|
|
1323
|
+
otherConditions {
|
|
1324
|
+
...UserPositionConditionVariation
|
|
1325
|
+
}
|
|
1326
|
+
}`,[ti,Xr,Zr,Bo]),Do=u(`query Preview($request: PreviewRequest!, $currency: Currency! = USD) {
|
|
1327
|
+
value: preview(request: $request) {
|
|
1328
|
+
...PreviewUserPosition
|
|
1329
|
+
}
|
|
1330
|
+
}`,[xo]),vt=u(`fragment PercentNumberChangeSnapshot on PercentNumberChangeSnapshot {
|
|
1331
|
+
__typename
|
|
1332
|
+
before {
|
|
1333
|
+
...PercentNumber
|
|
1334
|
+
}
|
|
1335
|
+
after {
|
|
1336
|
+
...PercentNumber
|
|
1337
|
+
}
|
|
1338
|
+
}`,[D]),Fo=u(`fragment BorrowActivity on BorrowActivity {
|
|
1339
|
+
__typename
|
|
1340
|
+
id
|
|
1341
|
+
user
|
|
1342
|
+
timestamp
|
|
1343
|
+
txHash
|
|
1344
|
+
spoke {
|
|
1345
|
+
...Spoke
|
|
1346
|
+
}
|
|
1347
|
+
reserve {
|
|
1348
|
+
...ReserveInfo
|
|
1349
|
+
}
|
|
1350
|
+
borrowed {
|
|
1351
|
+
...Erc20Amount
|
|
1352
|
+
}
|
|
1353
|
+
chain {
|
|
1354
|
+
...Chain
|
|
1355
|
+
}
|
|
1356
|
+
}`,[oe,z,Oe,$]),Jo=u(`fragment SupplyActivity on SupplyActivity {
|
|
1357
|
+
__typename
|
|
1358
|
+
id
|
|
1359
|
+
user
|
|
1360
|
+
timestamp
|
|
1361
|
+
txHash
|
|
1362
|
+
spoke {
|
|
1363
|
+
...Spoke
|
|
1364
|
+
}
|
|
1365
|
+
reserve {
|
|
1366
|
+
...ReserveInfo
|
|
1367
|
+
}
|
|
1368
|
+
supplied {
|
|
1369
|
+
...Erc20Amount
|
|
1370
|
+
}
|
|
1371
|
+
chain {
|
|
1372
|
+
...Chain
|
|
1373
|
+
}
|
|
1374
|
+
}`,[oe,z,Oe,$]),Vo=u(`fragment WithdrawActivity on WithdrawActivity {
|
|
1375
|
+
__typename
|
|
1376
|
+
id
|
|
1377
|
+
user
|
|
1378
|
+
timestamp
|
|
1379
|
+
txHash
|
|
1380
|
+
spoke {
|
|
1381
|
+
...Spoke
|
|
1382
|
+
}
|
|
1383
|
+
reserve {
|
|
1384
|
+
...ReserveInfo
|
|
1385
|
+
}
|
|
1386
|
+
withdrawn {
|
|
1387
|
+
...Erc20Amount
|
|
1388
|
+
}
|
|
1389
|
+
chain {
|
|
1390
|
+
...Chain
|
|
1391
|
+
}
|
|
1392
|
+
}`,[oe,z,Oe,$]),$o=u(`fragment RepayActivity on RepayActivity {
|
|
1393
|
+
__typename
|
|
1394
|
+
id
|
|
1395
|
+
user
|
|
1396
|
+
timestamp
|
|
1397
|
+
txHash
|
|
1398
|
+
spoke {
|
|
1399
|
+
...Spoke
|
|
1400
|
+
}
|
|
1401
|
+
reserve {
|
|
1402
|
+
...ReserveInfo
|
|
1403
|
+
}
|
|
1404
|
+
repaid {
|
|
1405
|
+
...Erc20Amount
|
|
1406
|
+
}
|
|
1407
|
+
chain {
|
|
1408
|
+
...Chain
|
|
1409
|
+
}
|
|
1410
|
+
}`,[oe,z,Oe,$]),Wo=u(`fragment LiquidatedActivity on LiquidatedActivity {
|
|
1411
|
+
__typename
|
|
1412
|
+
id
|
|
1413
|
+
user
|
|
1414
|
+
timestamp
|
|
1415
|
+
txHash
|
|
1416
|
+
spoke {
|
|
1417
|
+
...Spoke
|
|
1418
|
+
}
|
|
1419
|
+
collateralReserve {
|
|
1420
|
+
...ReserveInfo
|
|
1421
|
+
}
|
|
1422
|
+
debtReserve {
|
|
1423
|
+
...ReserveInfo
|
|
1424
|
+
}
|
|
1425
|
+
collateral {
|
|
1426
|
+
...Erc20Amount
|
|
1427
|
+
}
|
|
1428
|
+
debt {
|
|
1429
|
+
...Erc20Amount
|
|
1430
|
+
}
|
|
1431
|
+
liquidator
|
|
1432
|
+
chain {
|
|
1433
|
+
...Chain
|
|
1434
|
+
}
|
|
1435
|
+
}`,[oe,z,Oe,$]),Ho=u(`fragment UsingAsCollateralActivity on UsingAsCollateralActivity {
|
|
1436
|
+
__typename
|
|
1437
|
+
id
|
|
1438
|
+
user
|
|
1439
|
+
timestamp
|
|
1440
|
+
txHash
|
|
1441
|
+
spoke {
|
|
1442
|
+
...Spoke
|
|
1443
|
+
}
|
|
1444
|
+
reserve {
|
|
1445
|
+
...ReserveInfo
|
|
1446
|
+
}
|
|
1447
|
+
enabledAsCollateral
|
|
1448
|
+
chain {
|
|
1449
|
+
...Chain
|
|
1450
|
+
}
|
|
1451
|
+
}`,[oe,Oe,$]),Qo=u(`fragment UpdatedDynamicConfigActivity on UpdatedDynamicConfigActivity {
|
|
1452
|
+
__typename
|
|
1453
|
+
id
|
|
1454
|
+
user
|
|
1455
|
+
timestamp
|
|
1456
|
+
txHash
|
|
1457
|
+
spoke {
|
|
1458
|
+
...Spoke
|
|
1459
|
+
}
|
|
1460
|
+
reserve {
|
|
1461
|
+
...ReserveInfo
|
|
1462
|
+
}
|
|
1463
|
+
collateralFactor {
|
|
1464
|
+
...PercentNumberChangeSnapshot
|
|
1465
|
+
}
|
|
1466
|
+
maxLiquidationBonus {
|
|
1467
|
+
...PercentNumberChangeSnapshot
|
|
1468
|
+
}
|
|
1469
|
+
liquidationFee {
|
|
1470
|
+
...PercentNumberChangeSnapshot
|
|
1471
|
+
}
|
|
1472
|
+
chain {
|
|
1473
|
+
...Chain
|
|
1474
|
+
}
|
|
1475
|
+
}`,[oe,Oe,vt,$]),Mo=u(`fragment UpdatedRiskPremiumActivity on UpdatedRiskPremiumActivity {
|
|
1476
|
+
__typename
|
|
1477
|
+
id
|
|
1478
|
+
user
|
|
1479
|
+
timestamp
|
|
1480
|
+
txHash
|
|
1481
|
+
spoke {
|
|
1482
|
+
...Spoke
|
|
1483
|
+
}
|
|
1484
|
+
premium {
|
|
1485
|
+
...PercentNumberChangeSnapshot
|
|
1486
|
+
}
|
|
1487
|
+
chain {
|
|
1488
|
+
...Chain
|
|
1489
|
+
}
|
|
1490
|
+
}`,[oe,vt,$]),jo=u(`fragment TokenSwapActivity on TokenSwapActivity {
|
|
1491
|
+
__typename
|
|
1492
|
+
id
|
|
1493
|
+
user
|
|
1494
|
+
timestamp
|
|
1495
|
+
txHash
|
|
1496
|
+
chain {
|
|
1497
|
+
...Chain
|
|
1498
|
+
}
|
|
1499
|
+
sold {
|
|
1500
|
+
...SwapAmount
|
|
1501
|
+
}
|
|
1502
|
+
bought {
|
|
1503
|
+
...SwapAmount
|
|
1504
|
+
}
|
|
1505
|
+
explorerUrl
|
|
1506
|
+
}`,[$,qe]),Go=u(`fragment SupplySwapActivity on SupplySwapActivity {
|
|
1507
|
+
__typename
|
|
1508
|
+
id
|
|
1509
|
+
user
|
|
1510
|
+
timestamp
|
|
1511
|
+
txHash
|
|
1512
|
+
chain {
|
|
1513
|
+
...Chain
|
|
1514
|
+
}
|
|
1515
|
+
sold {
|
|
1516
|
+
...SwapAmount
|
|
1517
|
+
}
|
|
1518
|
+
bought {
|
|
1519
|
+
...SwapAmount
|
|
1520
|
+
}
|
|
1521
|
+
explorerUrl
|
|
1522
|
+
}`,[$,qe]),Ko=u(`fragment BorrowSwapActivity on BorrowSwapActivity {
|
|
1523
|
+
__typename
|
|
1524
|
+
id
|
|
1525
|
+
user
|
|
1526
|
+
timestamp
|
|
1527
|
+
txHash
|
|
1528
|
+
chain {
|
|
1529
|
+
...Chain
|
|
1530
|
+
}
|
|
1531
|
+
sold {
|
|
1532
|
+
...SwapAmount
|
|
1533
|
+
}
|
|
1534
|
+
bought {
|
|
1535
|
+
...SwapAmount
|
|
1536
|
+
}
|
|
1537
|
+
explorerUrl
|
|
1538
|
+
}`,[$,qe]),Yo=u(`fragment RepayWithSupplyActivity on RepayWithSupplyActivity {
|
|
1539
|
+
__typename
|
|
1540
|
+
id
|
|
1541
|
+
user
|
|
1542
|
+
timestamp
|
|
1543
|
+
txHash
|
|
1544
|
+
chain {
|
|
1545
|
+
...Chain
|
|
1546
|
+
}
|
|
1547
|
+
debtRepaid {
|
|
1548
|
+
...SwapAmount
|
|
1549
|
+
}
|
|
1550
|
+
supplyUsed {
|
|
1551
|
+
...SwapAmount
|
|
1552
|
+
}
|
|
1553
|
+
explorerUrl
|
|
1554
|
+
}`,[$,qe]),zo=u(`fragment WithdrawSwapActivity on WithdrawSwapActivity {
|
|
1555
|
+
__typename
|
|
1556
|
+
id
|
|
1557
|
+
user
|
|
1558
|
+
timestamp
|
|
1559
|
+
txHash
|
|
1560
|
+
chain {
|
|
1561
|
+
...Chain
|
|
1562
|
+
}
|
|
1563
|
+
withdrawn {
|
|
1564
|
+
...SwapAmount
|
|
1565
|
+
}
|
|
1566
|
+
bought {
|
|
1567
|
+
...SwapAmount
|
|
1568
|
+
}
|
|
1569
|
+
explorerUrl
|
|
1570
|
+
}`,[$,qe]),Xo=u(`fragment ActivityItem on ActivityItem {
|
|
1571
|
+
__typename
|
|
1572
|
+
... on BorrowActivity {
|
|
1573
|
+
...BorrowActivity
|
|
1574
|
+
}
|
|
1575
|
+
... on SupplyActivity {
|
|
1576
|
+
...SupplyActivity
|
|
1577
|
+
}
|
|
1578
|
+
... on WithdrawActivity {
|
|
1579
|
+
...WithdrawActivity
|
|
1580
|
+
}
|
|
1581
|
+
... on RepayActivity {
|
|
1582
|
+
...RepayActivity
|
|
1583
|
+
}
|
|
1584
|
+
... on LiquidatedActivity {
|
|
1585
|
+
...LiquidatedActivity
|
|
1586
|
+
}
|
|
1587
|
+
... on UsingAsCollateralActivity {
|
|
1588
|
+
...UsingAsCollateralActivity
|
|
1589
|
+
}
|
|
1590
|
+
... on UpdatedDynamicConfigActivity {
|
|
1591
|
+
...UpdatedDynamicConfigActivity
|
|
1592
|
+
}
|
|
1593
|
+
... on UpdatedRiskPremiumActivity {
|
|
1594
|
+
...UpdatedRiskPremiumActivity
|
|
1595
|
+
}
|
|
1596
|
+
... on TokenSwapActivity {
|
|
1597
|
+
...TokenSwapActivity
|
|
1598
|
+
}
|
|
1599
|
+
... on SupplySwapActivity {
|
|
1600
|
+
...SupplySwapActivity
|
|
1601
|
+
}
|
|
1602
|
+
... on BorrowSwapActivity {
|
|
1603
|
+
...BorrowSwapActivity
|
|
1604
|
+
}
|
|
1605
|
+
... on RepayWithSupplyActivity {
|
|
1606
|
+
...RepayWithSupplyActivity
|
|
1607
|
+
}
|
|
1608
|
+
... on WithdrawSwapActivity {
|
|
1609
|
+
...WithdrawSwapActivity
|
|
1610
|
+
}
|
|
1611
|
+
}`,[Fo,Jo,Vo,$o,Wo,Ho,Qo,Mo,jo,Go,Ko,Yo,zo]),Zo=u(`fragment PaginatedActivitiesResult on PaginatedActivitiesResult {
|
|
1612
|
+
__typename
|
|
1613
|
+
items {
|
|
1614
|
+
...ActivityItem
|
|
1615
|
+
}
|
|
1616
|
+
pageInfo {
|
|
1617
|
+
...PaginatedResultInfo
|
|
1618
|
+
}
|
|
1619
|
+
}`,[Xo,Tn]),es=u(`query Activities($request: ActivitiesRequest!, $currency: Currency!, $timeWindow: TimeWindow!) {
|
|
1620
|
+
value: activities(request: $request) {
|
|
1621
|
+
...PaginatedActivitiesResult
|
|
1622
|
+
}
|
|
1623
|
+
}`,[Zo]),ns=u(`query UserSupplies($request: UserSuppliesRequest!, $currency: Currency!, $timeWindow: TimeWindow!) {
|
|
1624
|
+
value: userSupplies(request: $request) {
|
|
1625
|
+
...UserSupplyItem
|
|
1626
|
+
}
|
|
1627
|
+
}`,[$i]),as=u(`query UserBorrows($request: UserBorrowsRequest!, $currency: Currency!, $timeWindow: TimeWindow!) {
|
|
1628
|
+
value: userBorrows(request: $request) {
|
|
1629
|
+
...UserBorrowItem
|
|
1630
|
+
}
|
|
1631
|
+
}`,[Wi]),Sp=u(`query UserSummary($request: UserSummaryRequest!, $currency: Currency!, $timeWindow: TimeWindow!) {
|
|
1632
|
+
value: userSummary(request: $request) {
|
|
1633
|
+
...UserSummary
|
|
1634
|
+
}
|
|
1635
|
+
}`,[Hi]),ts=u(`query UserPositions($request: UserPositionsRequest!, $currency: Currency!, $timeWindow: TimeWindow!) {
|
|
1636
|
+
value: userPositions(request: $request) {
|
|
1637
|
+
...UserPosition
|
|
1638
|
+
}
|
|
1639
|
+
}`,[lt]),Ep=u(`query UserPosition($request: UserPositionRequest!, $currency: Currency!, $timeWindow: TimeWindow!) {
|
|
1640
|
+
value: userPosition(request: $request) {
|
|
1641
|
+
...UserPosition
|
|
1642
|
+
}
|
|
1643
|
+
}`,[lt]),rs=u(`query UserBalances($request: UserBalancesRequest!, $currency: Currency!) {
|
|
1644
|
+
value: userBalances(request: $request) {
|
|
1645
|
+
...UserBalance
|
|
1646
|
+
}
|
|
1647
|
+
}`,[Mi]),Cp=u(`query UserSummaryHistory($request: UserSummaryHistoryRequest!, $currency: Currency!) {
|
|
1648
|
+
value: userSummaryHistory(request: $request) {
|
|
1649
|
+
...UserSummaryHistoryItem
|
|
1650
|
+
}
|
|
1651
|
+
}`,[ji]),_p=u(`query UserRiskPremiumBreakdown($request: UserRiskPremiumBreakdownRequest!) {
|
|
1652
|
+
value: userRiskPremiumBreakdown(request: $request) {
|
|
1653
|
+
...UserRiskPremiumBreakdownItem
|
|
1654
|
+
}
|
|
1655
|
+
}`,[pt]),E={currency:Za.Usd,timeWindow:Xa.LastDay,requestPolicy:"cache-and-network",batch:true};function Nd(e,n,{currency:a=E.currency,timeWindow:t=E.timeWindow,requestPolicy:r=E.requestPolicy}=E){return e.query(Gi,{request:n,currency:a,timeWindow:t},{requestPolicy:r})}function kd(e,n,{batch:a=E.batch,requestPolicy:t=E.requestPolicy}=E){return e.query(Zi,{request:n},{batch:a,requestPolicy:t})}function is(e,n){return e.query(eo,{request:n},{requestPolicy:"network-only",batch:false})}function Td(e,n,{requestPolicy:a=E.requestPolicy}=E){return e.query(no,{request:n},{requestPolicy:a})}function gd(e,n,{currency:a=E.currency,timeWindow:t=E.timeWindow,requestPolicy:r=E.requestPolicy}=E){return e.query(po,{request:n,currency:a,timeWindow:t},{requestPolicy:r})}function vd(e,n,{currency:a=E.currency,timeWindow:t=E.timeWindow,requestPolicy:r=E.requestPolicy}=E){return e.query(lo,{request:n,currency:a,timeWindow:t},{requestPolicy:r})}function Ad(e,n,{currency:a=E.currency,requestPolicy:t=E.requestPolicy}=E){return e.query(yo,{request:n,currency:a},{batch:false,requestPolicy:t})}function hd(e,n){return e.query(co,{request:n},{batch:false}).map(N).andThen(a=>{switch(a.__typename){case "PrepareSwapOrder":return b(a);case "InsufficientBalanceError":return Nn.fromGqlNode(a).asResultAsync();default:return W.upgradeRequired(`Unsupported result: ${a.__typename}`).asResultAsync()}})}function Ld(e,n,{currency:a=E.currency,requestPolicy:t=E.requestPolicy}=E){return e.query(To,{request:n,currency:a},{batch:false,requestPolicy:t}).map(N).andThen(r=>{switch(r.__typename){case "PositionSwapByIntentApprovalsRequired":return b(r);default:return W.upgradeRequired(`Unsupported result: ${r.__typename}`).asResultAsync()}})}function Od(e,n,{currency:a=E.currency,requestPolicy:t=E.requestPolicy}=E){return e.query(go,{request:n,currency:a},{batch:false,requestPolicy:t}).map(N).andThen(r=>{switch(r.__typename){case "PositionSwapByIntentApprovalsRequired":return b(r);default:return W.upgradeRequired(`Unsupported result: ${r.__typename}`).asResultAsync()}})}function Sd(e,n,{currency:a=E.currency,requestPolicy:t=E.requestPolicy}=E){return e.query(vo,{request:n,currency:a},{batch:false,requestPolicy:t}).map(N).andThen(r=>{switch(r.__typename){case "PositionSwapByIntentApprovalsRequired":return b(r);default:return W.upgradeRequired(`Unsupported result: ${r.__typename}`).asResultAsync()}})}function Ed(e,n,{currency:a=E.currency,requestPolicy:t=E.requestPolicy}=E){return e.query(Ao,{request:n,currency:a},{batch:false,requestPolicy:t}).map(N).andThen(r=>{switch(r.__typename){case "PositionSwapByIntentApprovalsRequired":return b(r);default:return W.upgradeRequired(`Unsupported result: ${r.__typename}`).asResultAsync()}})}function Cd(e,n){return e.query(ho,{request:n},{batch:false}).map(N).andThen(a=>{switch(a.__typename){case "PrepareSwapOrder":return b(a);case "InsufficientBalanceError":return Nn.fromGqlNode(a).asResultAsync();default:return W.upgradeRequired(`Unsupported result: ${a.__typename}`).asResultAsync()}})}function _d(e,n,{currency:a=E.currency,timeWindow:t=E.timeWindow,requestPolicy:r=E.requestPolicy}=E){return e.query(mo,{request:n,currency:a,timeWindow:t},{requestPolicy:r})}function wd(e,n){return e.mutation(fo,{request:n}).map(N).andThen(a=>{switch(a.__typename){case "SwapTransactionRequest":return b(a);case "SwapReceipt":return b(a);case "InsufficientBalanceError":return Nn.fromGqlNode(a).asResultAsync();default:return W.upgradeRequired(`Unsupported swap plan: ${a.__typename}`).asResultAsync()}})}function Ud(e,n){return e.query(No,{request:n},{batch:false})}function bd(e,n){return e.mutation(ko,{request:n})}function Rd(e,n){return e.query(Lo,{request:n})}function qd(e,n){return e.query(Oo,{request:n})}function Pd(e,n){return e.query(So,{request:n})}function Id(e,n){return e.query(Eo,{request:n})}function Bd(e,n){return e.query(bo,{request:n})}function xd(e,n){return e.query(Ro,{request:n})}function Dd(e,n){return e.query(_o,{request:n})}function Fd(e,n){return e.query(wo,{request:n})}function Jd(e,n,{currency:a=E.currency,requestPolicy:t=E.requestPolicy}=E){return e.query(Do,{request:n,currency:a},{requestPolicy:t})}function Vd(e,n){return e.query(Uo,{request:n})}function $d(e,n,{currency:a=E.currency,timeWindow:t=E.timeWindow,requestPolicy:r=E.requestPolicy}=E){return e.query(es,{request:n,currency:a,timeWindow:t},{requestPolicy:r})}function Wd(e,n,{currency:a=E.currency,timeWindow:t=E.timeWindow,requestPolicy:r=E.requestPolicy}=E){return e.query(ns,{request:n,currency:a,timeWindow:t},{requestPolicy:r})}function Hd(e,n,{currency:a=E.currency,timeWindow:t=E.timeWindow,requestPolicy:r=E.requestPolicy}=E){return e.query(as,{request:n,currency:a,timeWindow:t},{requestPolicy:r})}function Qd(e,n,{currency:a=E.currency,timeWindow:t=E.timeWindow,requestPolicy:r=E.requestPolicy}=E){return e.query(ts,{request:n,currency:a,timeWindow:t},{requestPolicy:r})}function Md(e,n,{currency:a=E.currency,requestPolicy:t=E.requestPolicy}=E){return e.query(rs,{request:n,currency:a},{requestPolicy:t})}var ht=`
|
|
1656
|
+
https://bit.ly/2XbVrpR#`,os=new Set,on=[],Sn=()=>on.pop(),En=(e,n)=>{var a="";n.kind===H.INLINE_FRAGMENT?a=e?`Inline Fragment on "${e}"`:"Inline Fragment":n.kind===H.OPERATION_DEFINITION?a=`${n.name?`"${n.name.value}"`:"Unnamed"} ${n.operation}`:n.kind===H.FRAGMENT_DEFINITION&&(a=`"${n.name.value}" Fragment`),a&&on.push(a);},Lt=()=>on.length?`
|
|
1657
|
+
(Caused At: `+on.join(", ")+")":"";function un(e,n,a){if(!e){var t=n||"Minfied Error #"+a+`
|
|
1658
|
+
`;process.env.NODE_ENV!=="production"&&(t+=Lt());var r=new Error(t+ht+a);throw r.name="Graphcache Error",r}}function V(e,n,a){os.has(e)||(a?a("warn",e+Lt()+ht+n):console.warn(e+Lt()+ht+n),os.add(e));}var wp={},Aa=e=>e._directives||wp,Te=e=>e.name.value,ss=e=>e.typeCondition.name.value,qt=e=>e.alias?e.alias.value:e.name.value,Up=[],pe=e=>e.selectionSet?e.selectionSet.selections:Up,ms=e=>e.typeCondition?e.typeCondition.name.value:null,ha=(e,n)=>{var a=null;if(e.arguments)for(var t=0,r=e.arguments.length;t<r;t++){var i=e.arguments[t],o=xe(i.value,n);o!=null&&(a||(a={}),a[Te(i)]=o);}return a},bp=(e,n)=>{if(!(!n||!e.variableDefinitions)){for(var a={},t=0,r=e.variableDefinitions.length;t<r;t++){var i=Te(e.variableDefinitions[t].variable);a[i]=n[i];}return a}},fs=(e,n)=>{var a={};if(!n)return a;if(e.variableDefinitions)for(var t=0,r=e.variableDefinitions.length;t<r;t++){var i=e.variableDefinitions[t],o=Te(i.variable);a[o]=n[o]===void 0&&i.defaultValue?xe(i.defaultValue,n):n[o];}for(var s in n)s in a||(a[s]=n[s]);return a};function Pt(e){for(var n=0;n<e.definitions.length;n++)if(e.definitions[n].kind===H.OPERATION_DEFINITION)return e.definitions[n];un(false,process.env.NODE_ENV!=="production"?"Invalid GraphQL document: All GraphQL documents must contain an OperationDefinitionnode for a query, subscription, or mutation.":"",1);}var ma=e=>{for(var n={},a=0;a<e.definitions.length;a++){var t=e.definitions[a];t.kind===H.FRAGMENT_DEFINITION&&(n[Te(t)]=t);}return n},Rp=(e,n)=>{var a=Aa(e);if(a.include||a.skip)for(var t in a){var r=a[t];if(r&&(t==="include"||t==="skip")&&r.arguments&&r.arguments[0]&&Te(r.arguments[0])==="if"){var i=xe(r.arguments[0].value,n);return t==="include"?!!i:!i}}return true},qp=(e,n)=>{var{defer:a}=Aa(e);if(a){for(var t of a.arguments||[])if(Te(t)==="if")return !!xe(t.value,n);return true}return false},Pp=e=>{var{optional:n,required:a}=Aa(e);if(a)return false;if(n)return true},fa="__",us=(e,n,a,t)=>{var r=It(e,n,a,t);return !!r&&r.type.kind!=="NON_NULL"},Ns=(e,n,a,t)=>{var r=It(e,n,a,t);if(!r)return false;var i=r.type.kind==="NON_NULL"?r.type.ofType:r.type;return i.kind==="LIST"&&i.ofType.kind!=="NON_NULL"},ks=(e,n,a,t)=>a.indexOf(fa)===0||n.indexOf(fa)===0||!!It(e,n,a,t),Ip=(e,n,a)=>{if(!a)return false;var t=ms(n);return !t||a===t?true:e.types.has(t)&&e.types.get(t).kind==="OBJECT"?t===a:((function(i,o){un(i.types.has(o)&&(i.types.get(o).kind==="INTERFACE"||i.types.get(o).kind==="UNION"),process.env.NODE_ENV!=="production"?"Invalid Abstract type: The type `"+o+"` is not an Interface or Union type in the defined schema, but a fragment in the GraphQL document is using it as a type condition.":"",5);})(e,t),Ts(e,a),e.isSubType(t,a))},It=(e,n,a,t)=>{if(!(a.indexOf(fa)===0||n.indexOf(fa)===0)){Ts(e,n);var r=e.types.get(n).fields()[a];return process.env.NODE_ENV!=="production"&&(r||V("Invalid field: The field `"+a+"` does not exist on `"+n+"`, but the GraphQL document expects it to exist.\nTraversal will continue, however this may lead to undefined behavior!",4,t)),r}};function Ts(e,n){un(e.types.has(n)&&e.types.get(n).kind==="OBJECT",process.env.NODE_ENV!=="production"?"Invalid Object type: The type `"+n+"` is not an object in the defined schema, but the GraphQL document is traversing it.":"",3);}function la(e,n){process.env.NODE_ENV!=="production"&&V(`Invalid resolver: \`${e}\` is not in the defined schema, but the \`resolvers\` option is referencing it.`,23,n);}function Bp(e,n,a){process.env.NODE_ENV!=="production"&&V(`Invalid resolver: \`${e}\` does not match to a concrete type in the schema, but the \`resolvers\` option is referencing it. Implement the resolver for the types that ${n==="UNION"?"make up the union":"implement the interface"} instead.`,26,a);}var Me=(e,n)=>n?`${e}(${he(n)})`:e,Un=(e,n)=>`${e}.${n}`,xp=e=>{var n=e.indexOf("(");return n>-1?{fieldKey:e,fieldName:e.slice(0,n),arguments:JSON.parse(e.slice(n+1,-1))}:{fieldKey:e,fieldName:e,arguments:null}},gs=e=>{var n=e.indexOf(".");return {entityKey:e.slice(0,n).replace(/%2e/g,"."),fieldKey:e.slice(n+1)}},Cn=null,Na=null,U=null,X=null,M=null,de=null,pn=false,Pe=false;function ke(e,n){var a;if(e){if(Cn.has(e))return e;a=Na.get(e);}return a==null&&(a=n?[]:{}),e&&Na.set(e,a),Cn.add(a),a}var At=e=>!!e&&Cn.has(e),He=(e,n,a,t,r)=>{Cn=new WeakSet,Na=new WeakMap,M=e,U=n,de=new Set,Pe=!!t,pn=!!r,process.env.NODE_ENV!=="production"&&(on.length=0),a?M==="read"?X=a:t||n.hydrating||n.optimisticOrder.length>1?(!t&&!n.commutativeKeys.has(a)?da(n,a):t&&(n.optimisticOrder.indexOf(a)!==-1&&!n.commutativeKeys.has(a)&&n.optimisticOrder.splice(n.optimisticOrder.indexOf(a),1),n.commutativeKeys.delete(a)),X=a,Jp(n,a)):(X=null,Ss(n,a)):X=null;},Qe=()=>{process.env.NODE_ENV!=="production"&&Bt();var e=U,n=X;if(Pe=false,X=null,!e.hydrating&&n&&e.optimisticOrder.indexOf(n)>-1)for(var a=e.optimisticOrder.length;--a>=0&&e.dirtyKeys.has(e.optimisticOrder[a])&&e.commutativeKeys.has(e.optimisticOrder[a]);)Vp(e.optimisticOrder[a]);Cn=null,Na=null,M=null,U=null,de=null,process.env.NODE_ENV!=="production"&&(on.length=0),process.env.NODE_ENV!=="test"&&!e.defer&&(e.storage||!e.optimisticOrder.length)&&(e.defer=true,setTimeout((()=>{He("read",e,null),Dp(),$p(),Qe(),e.defer=false;})));},ps=(e,n,a)=>{n&&!a&&e.deferredKeys.delete(n),He("write",e,n,a),Qe();},Bt=()=>(un(de!==null,process.env.NODE_ENV!=="production"?"Invalid Cache call: The cache may only be accessed or mutated duringoperations like write or query, or as part of its resolvers, updaters, or optimistic configs.":"",2),de),vs=new Set,As=(e,n,a,t)=>{process.env.NODE_ENV!=="production"&&un(M!=="read",process.env.NODE_ENV!=="production"?"Invalid Cache write: You may not write to the cache during cache reads. Accesses to `cache.writeFragment`, `cache.updateQuery`, and `cache.link` may not be made inside `resolvers` for instance.":"",27);var r=X?e.optimistic.get(X):e.base,i=r.get(n);i===void 0&&r.set(n,i=Object.create(null)),t===void 0&&!X?delete i[a]:i[a]=t;},La=(e,n,a)=>{for(var t,r=!Pe&&M==="read"&&X&&U.commutativeKeys.has(X),i=0,o=U.optimisticOrder.length;i<o;i++){var s=U.optimisticOrder[i],p=e.optimistic.get(s);if(r=r&&s!==X,p&&(!r||!U.commutativeKeys.has(s))&&(!Pe||M==="write"||U.commutativeKeys.has(s))&&(t=p.get(n))!==void 0&&a in t)return t[a]}return (t=e.base.get(n))!==void 0?t[a]:void 0};function ka(e){return U.refCount.get(e)||0}var Ta=(e,n)=>{if(Array.isArray(e))for(var a=0,t=e.length;a<t;a++)Ta(e[a],n);else typeof e=="string"&&((r,i)=>{var o=ka(r),s=o+i>0?o+i:0;U.refCount.set(r,s),s?!o&&s&&U.gc.delete(r):U.gc.add(r);})(e,n);},ls=(e,n,a)=>{if(a!==void 0)for(var t in a)n.has(t)||(e.push(xp(t)),n.add(t));},ds=(e,n,a,t)=>{ls(e,n,t.base.get(a));for(var r=0,i=U.optimisticOrder.length;r<i;r++){var o=t.optimistic.get(U.optimisticOrder[r]);o!==void 0&&ls(e,n,o.get(a));}},Dp=()=>{if(!U.optimisticOrder.length){for(var e of U.gc.keys())if(U.gc.delete(e),!(ka(e)>0)){var n=U.records.base.get(e);U.refCount.delete(e),U.records.base.delete(e);var a=n&&n.__typename;if(a){var t=U.types.get(a);t&&t.delete(e);}var r=U.links.base.get(e);if(r){U.links.base.delete(e);for(var i in r)Ta(r[i],-1);}}}},bn=(e,n)=>{e!==U.queryRootKey?de.add(e):n!==void 0&&n!=="__typename"&&de.add(Un(e,n));},hs=(e,n)=>{!Pe&&U.storage&&U.persist.add(((a,t)=>`${a.replace(/\./g,"%2e")}.${t}`)(e,n));},Ne=(e,n)=>(M==="read"&&bn(e,n),La(U.records,e,n)),je=(e,n)=>(M==="read"&&bn(e,n),La(U.links,e,n)),Fp=(e,n)=>{var a=U.abstractToConcreteMap.get(e);if(a)a.add(n);else {var t=new Set;t.add(n),U.abstractToConcreteMap.set(e,t);}},_n=(e,n,a)=>{Cs(La(U.records,e,n),a)||(bn(e,n),hs(e,n)),As(U.records,e,n,a);},Ls=(e,n)=>Ne(e,n)!==void 0||je(e,n)!==void 0,Rn=(e,n,a)=>{var t=X?U.links.optimistic.get(X):U.links.base;if(!X){var r=t&&t.get(e);Ta(r&&r[n],-1),Ta(a,1);}Cs(La(U.links,e,n),a)||(bn(e,n),hs(e,n)),As(U.links,e,n,a);},da=(e,n,a)=>{var t=e.optimisticOrder.indexOf(n);if(t>-1&&e.optimisticOrder.splice(t,1),a)for(e.deferredKeys.add(n),t=t>-1?t:0;t<e.optimisticOrder.length&&!e.deferredKeys.has(e.optimisticOrder[t])&&(!e.dirtyKeys.has(e.optimisticOrder[t])||!e.commutativeKeys.has(e.optimisticOrder[t]));t++);else e.deferredKeys.delete(n),t>-1&&!e.commutativeKeys.has(n)&&Os(e,n),t=0;e.optimisticOrder.splice(t,0,n),e.commutativeKeys.add(n);},Jp=(e,n)=>{e.optimisticOrder.indexOf(n)===-1&&e.optimisticOrder.unshift(n),e.dirtyKeys.has(n)||(e.dirtyKeys.add(n),e.links.optimistic.set(n,new Map),e.records.optimistic.set(n,new Map));},Os=(e,n)=>{e.dirtyKeys.has(n)&&(e.dirtyKeys.delete(n),e.records.optimistic.delete(n),e.links.optimistic.delete(n),e.deferredKeys.delete(n));},Ss=(e,n)=>{var a=e.optimisticOrder.indexOf(n);a>-1&&(e.optimisticOrder.splice(a,1),e.commutativeKeys.delete(n)),Os(e,n);},Vp=e=>{var n=de;de=new Set,M="write";var a=U.links.optimistic.get(e);if(a)for(var t of a.entries()){var r=t[0],i=t[1];for(var o in i)Rn(r,o,i[o]);}var s=U.records.optimistic.get(e);if(s)for(var p of s.entries()){var d=p[0],y=p[1];for(var c in y)_n(d,c,y[c]);}de=n,Ss(U,e);},Es=e=>{var{links:n,records:a}=U,t=[],r=new Set;return bn(e),ds(t,r,e,n),ds(t,r,e,a),t},$p=()=>{if(U.storage){Pe=true,M="read";var e={};for(var n of U.persist.keys()){var{entityKey:a,fieldKey:t}=gs(n),r=void 0;(r=je(a,t))!==void 0?e[n]=`:${he(r)}`:(r=Ne(a,t))!==void 0?e[n]=he(r):e[n]=void 0;}Pe=false,U.storage.writeData(e),U.persist.clear();}};function Cs(e,n){return typeof e!=typeof n||e!==n?false:Array.isArray(e)&&Array.isArray(n)?e.length!==n.length?false:!e.some(((a,t)=>a!==n[t])):true}var ya=null,ga=false,Ot=void 0,Oa=e=>e.__internal.path.length>0&&e.__internal.errorMap?e.__internal.errorMap[e.__internal.path.join(".")]:void 0,va=(e,n,a,t,r,i)=>{var o={store:e,variables:n,fragments:a,parent:{__typename:t},parentTypeName:t,parentKey:r,parentFieldKey:"",fieldName:"",error:void 0,partial:false,hasNext:false,optimistic:Pe,__internal:{path:[],errorMap:void 0}};if(i&&i.graphQLErrors)for(var s=0;s<i.graphQLErrors.length;s++){var p=i.graphQLErrors[s];p.path&&p.path.length&&(o.__internal.errorMap||(o.__internal.errorMap=Object.create(null)),o.__internal.errorMap[p.path.join(".")]=p);}return o},St=(e,n,a,t,r,i)=>{ya=e,e.parent=n,e.parentTypeName=a,e.parentKey=t,e.parentFieldKey=r,e.fieldName=i,e.error=Oa(e);},Wp=(e,n,a,t,r)=>{if(!n)return false;var i=ms(e);return !i||n===i?true:(process.env.NODE_ENV!=="production"&&V("Heuristic Fragment Matching: A fragment is trying to match against the `"+n+"` type, but the type condition is `"+i+"`. Since GraphQL allows for interfaces `"+i+"` may be an interface.\nA schema needs to be defined for this match to be deterministic, otherwise the fragment will be matched heuristically!",16,r),!pe(e).some((o=>{if(o.kind!==H.FIELD)return false;var s=Me(Te(o),ha(o,t));return !Ls(a,s)})))},wn=class{constructor(n,a,t,r,i,o){this.typename=n,this.entityKey=a,this.ctx=o,this.stack=[{selectionSet:i,index:0,defer:t,optional:r}];}next(){for(;this.stack.length>0;){for(var n=this.stack[this.stack.length-1];n.index<n.selectionSet.length;){var a=n.selectionSet[n.index++];if(Rp(a,this.ctx.variables)){if(a.kind!==H.FIELD){var t=a.kind!==H.INLINE_FRAGMENT?this.ctx.fragments[Te(a)]:a;if(t){var r=!t.typeCondition||(this.ctx.store.schema?Ip(this.ctx.store.schema,t,this.typename):this.ctx.store.possibleTypeMap?Hp(this.ctx.store.possibleTypeMap,t.typeCondition.name.value,this.typename):M==="read"&&Qp(t.typeCondition.name.value,this.typename)||Wp(t,this.typename,this.entityKey,this.ctx.variables,this.ctx.store.logger));if(r||M==="write"&&!this.ctx.store.schema){process.env.NODE_ENV!=="production"&&En(this.typename,t);var i=Pp(a);r&&t.typeCondition&&this.typename!==t.typeCondition.name.value&&Fp(t.typeCondition.name.value,this.typename),this.stack.push(n={selectionSet:pe(t),index:0,defer:n.defer||qp(a,this.ctx.variables),optional:i!==void 0?i:n.optional});}}}else if(M==="write"||!a._generated)return ga=n.defer,Ot=n.optional,a}}this.stack.pop(),process.env.NODE_ENV!=="production"&&Sn();}}},Hp=(e,n,a)=>{if(!a)return false;if(n===a)return true;var t=e.get(n);return t&&t.has(a)},Qp=(e,n)=>{if(!n)return false;if(e===n)return true;var a=!(r=>U.types.has(r))(e);if(!a)return false;var t=(r=>U.abstractToConcreteMap.get(r)||vs)(e);return t.size&&t.has(n)},ca=e=>e??null,Et=(e,n)=>{if(n){if(Array.isArray(n)){for(var a=new Array(n.length),t=0,r=a.length;t<r;t++)a[t]=Et(e,n[t]);return a}}else return n||null;var i=e.keyOfEntity(n);return process.env.NODE_ENV!=="production"&&!i&&n&&typeof n=="object"&&V("Can't generate a key for link(...) item.\nYou have to pass an `id` or `_id` field or create a custom `keys` config for `"+n.__typename+"`.",12,e.logger),i},Ct=(e,n,a,t)=>{var r=nn(n.query),i=Pt(r),o=e.rootFields[i.operation],s=pe(i),p=va(e,fs(i,n.variables),ma(r),o,o,t);process.env.NODE_ENV!=="production"&&En(o,i);var d=o!==p.store.rootFields.query?_s(p,o,s,a||ke()):sn(p,o,s,a||ke());return process.env.NODE_ENV!=="production"&&(Sn(),Bt()),{dependencies:de,partial:p.partial||!d,hasNext:p.hasNext,data:d||null}},_s=(e,n,a,t)=>{if(typeof(e.store.rootNames[n]?n:t.__typename)!="string")return t;for(var r=new wn(n,n,false,void 0,a,e),i,o=pn,s=ke(t);i=r.next();){var p=qt(i),d=t[p];e.__internal.path.push(p);var y=void 0;i.selectionSet&&d!==null?y=ws(e,pe(i),ca(d)):y=d,o=o||y!==d,y!==void 0&&(s[p]=y),e.__internal.path.pop();}return o?s:t},ws=(e,n,a)=>{if(Array.isArray(a)){for(var t=new Array(a.length),r=pn,i=0,o=a.length;i<o;i++)e.__internal.path.push(i),t[i]=ws(e,n,a[i]),r=r||t[i]!==a[i],e.__internal.path.pop();return r?t:a}else if(a===null)return null;var s=e.store.keyOfEntity(a);return s!==null?sn(e,s,n,a)||null:_s(e,a.__typename,n,a)};function Mp(e,n,a,t){var r=t.store.resolvers[n],i=r&&r[a],o;for(var s in e){var p=e[s];if(p&&s!=="include"&&s!=="skip"&&t.store.directives[s]){if(o=t.store.directives[s](ha(p,t.variables)),process.env.NODE_ENV==="production")return o;break}}return process.env.NODE_ENV!=="production"&&i&&o&&V(`A resolver and directive is being used at "${n}.${a}" simultaneously. Only the directive will apply.`,28,t.store.logger),o||i}var sn=(e,n,a,t,r)=>{var{store:i}=e,o=n===i.rootFields.query,s=r&&i.keyOfEntity(r)||n;process.env.NODE_ENV!=="production"&&!o&&e.store.rootNames[s]&&V("Invalid root traversal: A selection was being read on `"+s+"` which is an uncached root type.\nThe `"+e.store.rootFields.mutation+"` and `"+e.store.rootFields.subscription+"` types are special Operation Root Types and cannot be read back from the cache.",25,i.logger);var p=o?n:Ne(s,"__typename")||r&&r.__typename;if(typeof p=="string"){if(r&&p!==r.__typename){process.env.NODE_ENV!=="production"&&V("Invalid resolver data: The resolver at `"+s+"` returned an invalid typename that could not be reconciled with the cache.",8,i.logger);return}for(var d=new wn(p,s,false,void 0,a,e),y=false,c=false,l=pn,T,N=e.partial,A=ke(t);(T=d.next())!==void 0;){var h=Te(T),w=ha(T,e.variables),C=qt(T),b=Aa(T),f=Mp(b,p,h,e),m=Me(h,w),k=Un(s,m),O=Ne(s,m),q=r?r[h]:void 0;process.env.NODE_ENV!=="production"&&i.schema&&p&&ks(i.schema,p,h,e.store.logger),e.__internal.path.push(C);var R=void 0;if(h==="__typename")R=p;else if(q!==void 0&&T.selectionSet===void 0)R=q;else if(M==="read"&&f){var F=A;if(T.selectionSet===void 0&&O!==void 0&&(F={...A,[C]:O,[h]:O}),St(e,F,p,s,m,h),R=f(F,w||{},i,e),T.selectionSet&&(R=_t(e,p,h,k,pe(T),A[C]!==void 0?A[C]:t[C],R,At(t))),i.schema&&R===null&&!us(i.schema,p,h,e.store.logger))return}else if(!T.selectionSet)R=O;else if(q!==void 0)R=_t(e,p,h,k,pe(T),A[C]!==void 0?A[C]:t[C],q,At(t));else {var j=je(s,m);j!==void 0?R=Us(e,j,p,h,pe(T),A[C]!==void 0?A[C]:t[C],At(t)):typeof O=="object"&&O!==null&&(R=O);}if(!ga&&R===void 0&&(b.optional||Ot&&!b.required||Oa(e)||!b.required&&i.schema&&us(i.schema,p,h,e.store.logger))?(e.partial=true,R=null):R===null&&(b.required||Ot===false)?(e.store.logger&&process.env.NODE_ENV!=="production"&&M==="read"&&e.store.logger("debug",`Got value "null" for required field "${h}"${w?` with args ${JSON.stringify(w)}`:""} on entity "${s}"`),R=void 0):y=y||h!=="__typename",e.__internal.path.pop(),l=l||R!==t[C],R!==void 0)A[C]=R;else if(ga)c=true;else {e.store.logger&&process.env.NODE_ENV!=="production"&&M==="read"&&e.store.logger("debug",`No value for field "${h}"${w?` with args ${JSON.stringify(w)}`:""} on entity "${s}"`),e.partial=N;return}}return e.partial=e.partial||N,e.hasNext=e.hasNext||c,o&&e.partial&&!y?void 0:l?A:t}},_t=(e,n,a,t,r,i,o,s)=>{if(Array.isArray(o)){for(var{store:p}=e,d=p.schema?Ns(p.schema,n,a,e.store.logger):false,y=e.partial,c=ke(i,true),l=pn||!Array.isArray(i)||o.length!==i.length,T=0,N=o.length;T<N;T++){e.__internal.path.push(T);var A=_t(e,n,a,Un(t,`${T}`),r,i?.[T],o[T],s);if(e.__internal.path.pop(),A===void 0&&!d){e.partial=y;return}else e.partial=e.partial||A===void 0&&d,c[T]=A??null,l=l||c[T]!==i[T];}return l?c:i}else {if(o==null)return o;if(s&&i===null)return null;if(jp(o)){var h=i||ke(i);return typeof o=="string"?sn(e,o,r,h):sn(e,t,r,h,o)}else {process.env.NODE_ENV!=="production"&&V("Invalid resolver value: The field at `"+t+"` is a scalar (number, boolean, etc), but the GraphQL query expects a selection set for this field.",9,e.store.logger);return}}},Us=(e,n,a,t,r,i,o)=>{if(Array.isArray(n)){for(var{store:s}=e,p=s.schema?Ns(s.schema,a,t,e.store.logger):false,d=ke(i,true),y=e.partial,c=pn||!Array.isArray(i)||n.length!==i.length,l=0,T=n.length;l<T;l++){e.__internal.path.push(l);var N=Us(e,n[l],a,t,r,i?.[l],o);if(e.__internal.path.pop(),N===void 0&&!p){e.partial=y;return}else e.partial=e.partial||N===void 0&&p,d[l]=N||null,c=c||d[l]!==i[l];}return c?d:i}else if(n===null||i===null&&o)return null;return sn(e,n,r,i||ke(i))},jp=e=>typeof e=="string"||typeof e=="object"&&typeof e.__typename=="string",bs=(e,n,a)=>{for(var t=n?[{fieldKey:Me(n,a)}]:Es(e),r=0,i=t.length;r<i;r++){var{fieldKey:o}=t[r];je(e,o)!==void 0?Rn(e,o,void 0):_n(e,o,void 0);}},wt=(e,n)=>{var a=(r=>U.types.get(r)||vs)(e);for(var t of a)n.includes(t)||bs(t);},Ut=(e,n,a,t)=>{process.env.NODE_ENV!=="production"&&Bt();var r=nn(n.query),i=Pt(r),o={data:a||ke(),dependencies:de},s=e.rootFields[i.operation],p=va(e,fs(i,n.variables),ma(r),s,s,t);return process.env.NODE_ENV!=="production"&&En(s,i),xt(p,s,pe(i),o.data),process.env.NODE_ENV!=="production"&&Sn(),o},xt=(e,n,a,t)=>{var r=e.store.rootNames[n]||"query",i=!!e.store.rootNames[n],o=i?n:t.__typename;if(!o&&n&&e.optimistic&&(o=Ne(n,"__typename")),o)!i&&n&&(_n(n,"__typename",o),((Z,_)=>{var G=U.types.get(Z);if(G)G.add(_);else {var le=new Set;le.add(_),U.types.set(Z,le);}})(o,n));else {process.env.NODE_ENV!=="production"&&V("Couldn't find __typename when writing.\nIf you're writing to the cache manually have to pass a `__typename` property on each entity in your data.",14,e.store.logger);return}for(var s=e.store.updates[o],p=new wn(o,n||o,false,void 0,a,e),d;d=p.next();){var y=Te(d),c=ha(d,e.variables),l=Me(y,c),T=qt(d),N=t[e.optimistic?y:T];if(!(y==="__typename"||N===void 0&&(ga||e.optimistic&&r==="query"))){process.env.NODE_ENV!=="production"&&e.store.schema&&o&&y!=="__typename"&&ks(e.store.schema,o,y,e.store.logger),e.__internal.path.push(T);var A=void 0;if(e.optimistic&&r==="mutation"){if(!(A=e.store.optimisticMutations[y]))continue}else e.optimistic&&typeof N=="function"&&(A=N);if(A&&(St(e,t,o,n||o,l,y),N=ca(A(c||{},e.store,e))),N===void 0){process.env.NODE_ENV!=="production"&&(!n||!Ls(n,l)||e.optimistic&&!Ne(n,"__typename"))&&process.env.NODE_ENV!=="production"&&V("Invalid undefined: The field at `"+l+"` is `undefined`, but the GraphQL query expects a "+(d.selectionSet===void 0?"scalar (number, boolean, etc)":"selection set")+" for this field.",13,e.store.logger);continue}if(d.selectionSet)if(n&&r==="query"){var h=Un(n,l),w=bt(e,pe(d),ca(N),h,e.optimistic?je(n||o,l):void 0);Rn(n||o,l,w);}else bt(e,pe(d),ca(N));else n&&r==="query"&&_n(n||o,l,N!==null||!Oa(e)?N:void 0);var C=s&&s[y];if(C)St(e,t,o,n||o,l,y),t[y]=N,C(t,c||{},e.store,e);else if(o===e.store.rootFields.mutation&&!e.optimistic){if(N&&Array.isArray(N))for(var b=N.map((Z=>e.store.keyOfEntity(Z)||"")),f=0,m=N.length;f<m;f++){var k=b[f];if(k&&N[f].__typename){var O=Ne(k,"__typename"),q=ka(k);O&&!q&&wt(N[f].__typename,b);}}else if(N&&typeof N=="object"){var R=e.store.keyOfEntity(N);if(R){var F=Ne(R,"__typename"),j=ka(R);(!F||!j)&&N.__typename&&wt(N.__typename,[R]);}}}e.__internal.path.pop();}}},Gp=/^__|PageInfo|(Connection|Edge)$/,bt=(e,n,a,t,r)=>{if(Array.isArray(a)){for(var i=new Array(a.length),o=0,s=a.length;o<s;o++){e.__internal.path.push(o);var p=t?Un(t,`${o}`):void 0,d=bt(e,n,a[o],p,r?.[o]);i[o]=d,e.__internal.path.pop();}return i}else if(a===null)return Oa(e)?void 0:null;var y=e.store.keyOfEntity(a)||(typeof r=="string"?r:null),c=a.__typename;process.env.NODE_ENV!=="production"&&t&&!e.store.keys[a.__typename]&&y===null&&typeof c=="string"&&!Gp.test(c)&&V("Invalid key: The GraphQL query at the field at `"+t+"` has a selection set, but no key could be generated for the data at this field.\nYou have to request `id` or `_id` fields for all selection sets or create a custom `keys` config for `"+c+"`.\nEntities without keys will be embedded directly on the parent entity. If this is intentional, create a `keys` config for `"+c+"` that always returns null.",15,e.store.logger);var l=y||t;return xt(e,l,n,a),l||null},Rt=class{constructor(n){n||(n={}),this.logger=n.logger,this.resolvers=n.resolvers||{},this.directives=n.directives||{},this.optimisticMutations=n.optimistic||{},this.keys=n.keys||{},this.globalIDs=Array.isArray(n.globalIDs)?new Set(n.globalIDs):!!n.globalIDs;var a="Query",t="Mutation",r="Subscription";if(n.schema){var i=(({__schema:y})=>{var c=new Map,l=C=>{var b;return ()=>{if(!b){b={};for(var f=0;f<C.length;f++)b[C[f].name]=C[f];}return b}},T=C=>{switch(C.kind){case "OBJECT":case "INTERFACE":return {name:C.name,kind:C.kind,interfaces:l(C.interfaces||[]),fields:l(C.fields.map((b=>({name:b.name,type:b.type,args:l(b.args)}))))};case "UNION":return {name:C.name,kind:C.kind,types:l(C.possibleTypes||[])}}},N={query:y.queryType?y.queryType.name:null,mutation:y.mutationType?y.mutationType.name:null,subscription:y.subscriptionType?y.subscriptionType.name:null,types:void 0,isSubType(C,b){var f=c.get(C),m=c.get(b);return !f||!m?false:f.kind==="UNION"?!!f.types()[b]:f.kind!=="OBJECT"&&m.kind==="OBJECT"?!!m.interfaces()[C]:C===b}};if(y.types){N.types=c;for(var A=0;A<y.types.length;A++){var h=y.types[A];if(h&&h.name){var w=T(h);w&&c.set(h.name,w);}}}return N})(n.schema);a=i.query||a,t=i.mutation||t,r=i.subscription||r,i.types&&(this.schema=i);}if(!this.schema&&n.possibleTypes){this.possibleTypeMap=new Map;for(var o of Object.entries(n.possibleTypes)){var[s,p]=o;this.possibleTypeMap.set(s,new Set(p));}}this.updates=n.updates||{},this.rootFields={query:a,mutation:t,subscription:r},this.rootNames={[a]:"query",[t]:"mutation",[r]:"subscription"},this.data=(d=a,{hydrating:false,defer:false,gc:new Set,types:new Map,persist:new Set,queryRootKey:d,refCount:new Map,links:{optimistic:new Map,base:new Map},abstractToConcreteMap:new Map,records:{optimistic:new Map,base:new Map},deferredKeys:new Set,commutativeKeys:new Set,dirtyKeys:new Set,optimisticOrder:[],storage:null});var d;this.schema&&process.env.NODE_ENV!=="production"&&((function(c,l,T){if(process.env.NODE_ENV!=="production")for(var N in l)process.env.NODE_ENV!=="production"&&(c.types.has(N)||V("Invalid Object type: The type `"+N+"` is not an object in the defined schema, but the `keys` option is referencing it.",20,T));})(this.schema,this.keys,this.logger),(function(c,l,T){if(process.env.NODE_ENV!=="production")for(var N in l){if(l[N]){if(!c.types.has(N)){var A="";return N==="Mutation"&&c.mutation&&c.mutation!=="Mutation"?A+="\nMaybe your config should reference `"+c.mutation+"`?":N==="Subscription"&&c.subscription&&c.subscription!=="Subscription"&&(A+="\nMaybe your config should reference `"+c.subscription+"`?"),process.env.NODE_ENV!=="production"?V("Invalid updates type: The type `"+N+"` is not an object in the defined schema, but the `updates` config is referencing it."+A,21,T):void 0}}else continue;var h=c.types.get(N).fields();for(var w in l[N])process.env.NODE_ENV!=="production"&&(h[w]||V("Invalid updates field: `"+w+"` on `"+N+"` is not in the defined schema, but the `updates` config is referencing it.",22,T));}})(this.schema,this.updates,this.logger),(function(c,l,T){if(process.env.NODE_ENV!=="production")for(var N in l)if(N==="Query")if(c.query){var A=c.types.get(c.query).fields();for(var h in l.Query||{})A[h]||la("Query."+h,T);}else la("Query",T);else if(!c.types.has(N))la(N,T);else if(c.types.get(N).kind==="INTERFACE"||c.types.get(N).kind==="UNION")Bp(N,c.types.get(N).kind,T);else {var w=c.types.get(N).fields();for(var C in l[N]||{})w[C]||la(N+"."+C,T);}})(this.schema,this.resolvers,this.logger),(function(c,l,T){if(process.env.NODE_ENV!=="production"&&c.mutation){var N=c.types.get(c.mutation).fields();for(var A in l)process.env.NODE_ENV!=="production"&&(N[A]||V(`Invalid optimistic mutation field: \`${A}\` is not a mutation field in the defined schema, but the \`optimistic\` option is referencing it.`,24,T));}})(this.schema,this.optimisticMutations,this.logger));}keyOfField(n,a){return Me(n,a)}keyOfEntity(n){if(ya&&n===ya.parent)return ya.parentKey;if(n==null||typeof n=="string")return n||null;if(n.__typename){if(this.rootNames[n.__typename])return n.__typename}else return null;var a=null;this.keys[n.__typename]?a=this.keys[n.__typename](n)||null:n.id!=null?a=`${n.id}`:n._id!=null&&(a=`${n._id}`);var t=n.__typename;return this.globalIDs===true||this.globalIDs&&this.globalIDs.has(t)||!a?a:`${t}:${a}`}resolve(n,a,t){var r=this.keyOfEntity(n);if(r){var i=Me(a,t),o=Ne(r,i);if(o!==void 0)return o;var s=je(r,i);return s!==void 0&&(s=Et(this,s)),s}}invalidate(n,a,t){var r=this.keyOfEntity(n);n&&typeof n=="string"&&!a&&!t&&!this.resolve(n,"__typename")?wt(n,[]):(un(r,process.env.NODE_ENV!=="production"?"Can't generate a key for invalidate(...).\nYou have to pass an id or _id field or create a custom `keys` field for `"+(typeof n=="object"?n.__typename:n+"`."):"",19),bs(r,a,t));}inspectFields(n){var a=this.keyOfEntity(n);return a?Es(a):[]}updateQuery(n,a){var t=Je(n.query,n.variables),r=a(this.readQuery(t));r!==null&&Ut(this,t,r,void 0);}readQuery(n){var a=Je(n.query,n.variables);return Ct(this,a,void 0,void 0).data}readFragment(n,a,t,r){return ((i,o,s,p,d)=>{var y=ma(o),c;if(d){if(!(c=y[d]))return process.env.NODE_ENV!=="production"&&V(`readFragment(...) was called with a fragment name that does not exist.
|
|
1659
|
+
You provided `+d+" but could only find "+Object.keys(y).join(", ")+".",6,i.logger),null}else if(!(c=y[Object.keys(y)[0]]))return process.env.NODE_ENV!=="production"&&V(`readFragment(...) was called with an empty fragment.
|
|
1660
|
+
You have to call it with at least one fragment in your GraphQL document.`,6,i.logger),null;var l=ss(c);typeof s!="string"&&!s.__typename&&(s.__typename=l);var T=i.keyOfEntity(s);if(!T)return process.env.NODE_ENV!=="production"&&V("Can't generate a key for readFragment(...).\nYou have to pass an `id` or `_id` field or create a custom `keys` config for `"+l+"`.",7,i.logger),null;process.env.NODE_ENV!=="production"&&En(l,c);var N=va(i,p||{},y,l,T,void 0),A=sn(N,T,pe(c),ke())||null;return process.env.NODE_ENV!=="production"&&Sn(),A})(this,nn(n),a,t,r)}writeFragment(n,a,t,r){((i,o,s,p,d)=>{var y=ma(o),c;if(d){if(!(c=y[d]))return process.env.NODE_ENV!=="production"&&V(`writeFragment(...) was called with a fragment name that does not exist.
|
|
1661
|
+
You provided `+d+" but could only find "+Object.keys(y).join(", ")+".",11,i.logger),null}else if(!(c=y[Object.keys(y)[0]]))return process.env.NODE_ENV!=="production"&&V(`writeFragment(...) was called with an empty fragment.
|
|
1662
|
+
You have to call it with at least one fragment in your GraphQL document.`,11,i.logger),null;var l=ss(c),T={__typename:l,...s},N=i.keyOfEntity(T);if(!N)return process.env.NODE_ENV!=="production"?V("Can't generate a key for writeFragment(...) data.\nYou have to pass an `id` or `_id` field or create a custom `keys` config for `"+l+"`.",12,i.logger):void 0;process.env.NODE_ENV!=="production"&&En(l,c);var A=va(i,p||{},y,l,N,void 0);xt(A,N,pe(c),T),process.env.NODE_ENV!=="production"&&Sn();})(this,nn(n),a,t,r);}link(n,a,...t){var r=t.length===2?t[0]:null,i=t.length===2?t[1]:t[0],o=this.keyOfEntity(n);o&&Rn(o,Me(a,r),Et(this,i));}},ys=(e,n)=>be(e.kind,e,{...e.context,meta:{...e.context.meta,...n}}),cs=(e,n)=>be(e.kind,e,{...e.context,requestPolicy:n}),Rs=e=>({forward:n,client:a,dispatchDebug:t})=>{var r=new Rt(e);e&&e.storage&&(r.data.hydrating=true,e.storage.readData().then((m=>{((k,O,q)=>{He("write",k,null);for(var R in q){var F=q[R];if(F!==void 0){var{entityKey:j,fieldKey:Z}=gs(R);F[0]===":"?je(j,Z)===void 0&&Rn(j,Z,JSON.parse(F.slice(1))):Ne(j,Z)===void 0&&_n(j,Z,JSON.parse(F));}}k.storage=O,k.hydrating=false,Qe();})(r.data,e.storage,m),e.storage.onCacheHydrated&&e.storage.onCacheHydrated();})));var i=new Map,o=[],s=new Map,p=new Map,d=new Set,y=new Set,c=new Map,l=new Set,T=new Set,N=m=>{for(var k of m.values())if(d.has(k))return true;return false},A=(m,k)=>{if(k)for(var O of k.values()){var q=c.get(O);if(q)for(var R of q.values())m.add(R);}},h=(m,k,O)=>{for(var q of k.values())if(q!==m.key){var R=s.get(q);if(R){m.kind==="query"&&T.add(q);var F="cache-first";y.has(q)&&(y.delete(q),F="cache-and-network"),a.reexecuteOperation(cs(R,F));}}if(!O){var j=l;l=T,m.kind==="query"&&l.add(m.key),(T=j).clear();}},w=m=>{var k=false;if(m.kind==="query")da(r.data,m.key),s.set(m.key,m);else {if(m.kind==="teardown")return s.delete(m.key),p.delete(m.key),l.delete(m.key),ps(r.data,m.key),m;if(m.kind==="mutation"&&m.context.requestPolicy!=="network-only"){s.set(m.key,m),He("write",r.data,m.key,true,false);var{dependencies:O}=Ut(r,m,void 0,void 0);if(Qe(),O.size){for(var q of O.values())d.add(q);i.set(m.key,O);var R=new Set;A(R,O),h(m,R,true),k=true;}}}return be(m.kind,{key:m.key,query:nn(m.query),variables:m.variables?bp(Pt(m.query),m.variables):m.variables},{...m.context,optimistic:k})},C=(m,k)=>{for(var O of k.values()){var q=c.get(O);q||c.set(O,q=new Set),q.add(m.key);}},b=m=>{He("read",r.data,void 0,false,false);var k=Ct(r,m,p.get(m.key),void 0);Qe();var O=k.data?!k.partial&&!k.hasNext?"hit":"partial":"miss";return p.set(m.key,k.data),s.set(m.key,m),C(m,k.dependencies),{outcome:O,operation:m,data:k.data,dependencies:k.dependencies,hasNext:k.hasNext}},f=(m,k)=>{var O=s.get(m.operation.key)||m.operation;if(O.kind==="mutation"){var q=i.get(O.key);A(k,q),i.delete(O.key);}(O.kind==="subscription"||m.hasNext)&&da(r.data,O.key,true);var R,F=m.data;if(F){He("write",r.data,O.key,false,false);var j=Ut(r,O,F,m.error).dependencies;Qe(),A(k,j);var Z=O.kind==="query"?p.get(O.key):null;He("read",r.data,O.key,false,Z!==F);var _=Ct(r,O,Z||F,m.error);Qe(),F=_.data,O.kind==="query"&&(A(k,R=_.dependencies),p.set(O.key,F));}else ps(r.data,O.key);return R&&C(m.operation,R),{operation:O,data:F,error:m.error,extensions:m.extensions,hasNext:m.hasNext,stale:m.stale}};return m=>{var k=we(_e(b)(Q((_=>_.kind==="query"&&_.context.requestPolicy!=="network-only"))(m))),O=Q((_=>_.kind!=="query"||_.context.requestPolicy==="network-only"))(m),q=_e((_=>(process.env.NODE_ENV!=="production"&&t({type:"cacheMiss",message:"The result could not be retrieved from the cache",operation:_.operation,source:"cacheExchange"}),ys(_.operation,{cacheOutcome:"miss"}))))(Q((_=>_.outcome==="miss"&&_.operation.context.requestPolicy!=="cache-only"&&!N(_.dependencies)&&!l.has(_.operation.key)))(k)),R=_e((_=>{var{requestPolicy:G}=_.operation.context,le=G!=="cache-only"&&(_.hasNext||G==="cache-and-network"||G==="cache-first"&&_.outcome==="partial"&&!l.has(_.operation.key)),qn=G!=="cache-only"&&(le||_.outcome==="partial"&&l.has(_.operation.key)&&((ln=r.data).commutativeKeys.has(Vt=_.operation.key)||ln.optimisticOrder.indexOf(Vt)>-1)),ln,Vt,$t={operation:ys(_.operation,{cacheOutcome:_.outcome}),data:_.data,error:_.error,extensions:_.extensions,stale:qn&&!_.hasNext,hasNext:le&&_.hasNext};return le&&(N(_.dependencies)?G==="cache-and-network"&&y.add(_.operation.key):a.reexecuteOperation(cs(s.get(_.operation.key)||_.operation,"network-only"))),process.env.NODE_ENV!=="production"&&t({type:"cacheHit",message:"A requested operation was found and returned from the cache.",operation:_.operation,data:{value:$t},source:"cacheExchange"}),$t}))(Q((_=>_.outcome!=="miss"||_.operation.context.requestPolicy==="cache-only"))(k)),F=n(_e(w)(Ze([O,q]))),j=_e((_=>{var G=new Set,le=f(_,G);return h(_.operation,G,false),le}))(Q((_=>!i.has(_.operation.key)))(F)),Z=Fn((_=>{if(o.push(_)<i.size)return er;for(var G=0;G<o.length;G++)da(r.data,o[G].operation.key);d.clear();for(var le=[],qn=new Set,ln;ln=o.shift();)le.push(f(ln,qn));return h(_.operation,qn,false),Ia(le)}))(Q((_=>i.has(_.operation.key)))(F));return Ze([j,Z,R])}};var Kp={__schema:{queryType:{name:"Query",kind:"OBJECT"},mutationType:{name:"Mutation",kind:"OBJECT"},subscriptionType:null,types:[{kind:"UNION",name:"ActivityItem",possibleTypes:[{kind:"OBJECT",name:"BorrowActivity"},{kind:"OBJECT",name:"SupplyActivity"},{kind:"OBJECT",name:"WithdrawActivity"},{kind:"OBJECT",name:"RepayActivity"},{kind:"OBJECT",name:"LiquidatedActivity"},{kind:"OBJECT",name:"UsingAsCollateralActivity"},{kind:"OBJECT",name:"UpdatedDynamicConfigActivity"},{kind:"OBJECT",name:"UpdatedRiskPremiumActivity"},{kind:"OBJECT",name:"TokenSwapActivity"},{kind:"OBJECT",name:"SupplySwapActivity"},{kind:"OBJECT",name:"BorrowSwapActivity"},{kind:"OBJECT",name:"RepayWithSupplyActivity"},{kind:"OBJECT",name:"WithdrawSwapActivity"}]},{kind:"OBJECT",name:"ApySample",fields:[{name:"date",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"avgRate",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"PercentNumber",ofType:null}},args:[]}],interfaces:[]},{kind:"OBJECT",name:"Asset",fields:[{name:"id",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"token",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"Erc20Token",ofType:null}},args:[]},{name:"summary",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"AssetSummary",ofType:null}},args:[]},{name:"price",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"ExchangeAmountWithChange",ofType:null}},args:[{name:"currency",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]}],interfaces:[]},{kind:"OBJECT",name:"AssetAmountWithChange",fields:[{name:"amount",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"DecimalNumberWithChange",ofType:null}},args:[]},{name:"exchange",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"ExchangeAmountWithChange",ofType:null}},args:[{name:"currency",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]}],interfaces:[]},{kind:"OBJECT",name:"AssetBorrowSample",fields:[{name:"date",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"amount",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"DecimalNumber",ofType:null}},args:[]},{name:"highestApy",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"PercentNumber",ofType:null}},args:[]},{name:"lowestApy",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"PercentNumber",ofType:null}},args:[]},{name:"averageApy",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"PercentNumber",ofType:null}},args:[]},{name:"breakdown",type:{kind:"NON_NULL",ofType:{kind:"LIST",ofType:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"AssetSampleBreakdown",ofType:null}}}},args:[]}],interfaces:[]},{kind:"OBJECT",name:"AssetPriceSample",fields:[{name:"date",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"price",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]}],interfaces:[]},{kind:"OBJECT",name:"AssetSampleBreakdown",fields:[{name:"amount",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"DecimalNumber",ofType:null}},args:[]},{name:"apy",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"PercentNumber",ofType:null}},args:[]},{name:"hub",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"Hub",ofType:null}},args:[]}],interfaces:[]},{kind:"OBJECT",name:"AssetSummary",fields:[{name:"totalSupplyCap",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"AssetAmountWithChange",ofType:null}},args:[]},{name:"totalSupplied",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"AssetAmountWithChange",ofType:null}},args:[]},{name:"totalSuppliable",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"AssetAmountWithChange",ofType:null}},args:[]},{name:"totalBorrowCap",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"AssetAmountWithChange",ofType:null}},args:[]},{name:"totalBorrowed",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"AssetAmountWithChange",ofType:null}},args:[]},{name:"totalBorrowable",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"AssetAmountWithChange",ofType:null}},args:[]},{name:"supplyApy",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"PercentNumber",ofType:null}},args:[{name:"metric",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"borrowApy",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"PercentNumber",ofType:null}},args:[{name:"metric",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]}],interfaces:[]},{kind:"OBJECT",name:"AssetSupplySample",fields:[{name:"date",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"amount",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"DecimalNumber",ofType:null}},args:[]},{name:"highestApy",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"PercentNumber",ofType:null}},args:[]},{name:"lowestApy",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"PercentNumber",ofType:null}},args:[]},{name:"averageApy",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"PercentNumber",ofType:null}},args:[]},{name:"breakdown",type:{kind:"NON_NULL",ofType:{kind:"LIST",ofType:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"AssetSampleBreakdown",ofType:null}}}},args:[]}],interfaces:[]},{kind:"OBJECT",name:"BorrowActivity",fields:[{name:"id",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"user",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"timestamp",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"txHash",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"spoke",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"Spoke",ofType:null}},args:[]},{name:"reserve",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"ReserveInfo",ofType:null}},args:[]},{name:"borrowed",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"Erc20Amount",ofType:null}},args:[]},{name:"chain",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"Chain",ofType:null}},args:[]}],interfaces:[]},{kind:"OBJECT",name:"BorrowSwapActivity",fields:[{name:"id",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"user",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"timestamp",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"txHash",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"chain",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"Chain",ofType:null}},args:[]},{name:"sold",type:{kind:"NON_NULL",ofType:{kind:"UNION",name:"SwapAmount",ofType:null}},args:[]},{name:"bought",type:{kind:"NON_NULL",ofType:{kind:"UNION",name:"SwapAmount",ofType:null}},args:[]},{name:"explorerUrl",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]}],interfaces:[]},{kind:"UNION",name:"BorrowSwapQuoteResult",possibleTypes:[{kind:"OBJECT",name:"PositionSwapByIntentApprovalsRequired"}]},{kind:"UNION",name:"CancelSwapExecutionPlan",possibleTypes:[{kind:"OBJECT",name:"TransactionRequest"},{kind:"OBJECT",name:"SwapCancelled"}]},{kind:"OBJECT",name:"Chain",fields:[{name:"name",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"icon",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"chainId",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"explorerUrl",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"isTestnet",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"nativeWrappedToken",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"nativeInfo",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"TokenInfo",ofType:null}},args:[]},{name:"nativeGateway",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"signatureGateway",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"rpcUrl",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"isFork",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]}],interfaces:[]},{kind:"OBJECT",name:"CollateralFactorVariation",fields:[{name:"reserveId",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"token",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"Erc20Token",ofType:null}},args:[]},{name:"current",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"PercentNumber",ofType:null}},args:[]},{name:"after",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"PercentNumber",ofType:null}},args:[]}],interfaces:[]},{kind:"OBJECT",name:"DecimalNumber",fields:[{name:"onChainValue",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"decimals",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"value",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]}],interfaces:[]},{kind:"OBJECT",name:"DecimalNumberWithChange",fields:[{name:"current",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"DecimalNumber",ofType:null}},args:[]},{name:"change",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"PercentNumber",ofType:null}},args:[{name:"window",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]}],interfaces:[]},{kind:"OBJECT",name:"DomainData",fields:[{name:"name",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"version",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"chainId",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"verifyingContract",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]}],interfaces:[]},{kind:"OBJECT",name:"Erc20Amount",fields:[{name:"amount",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"DecimalNumber",ofType:null}},args:[]},{name:"exchange",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"ExchangeAmount",ofType:null}},args:[{name:"currency",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"exchangeRate",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"DecimalNumber",ofType:null}},args:[{name:"currency",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"isWrappedNative",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"token",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"Erc20Token",ofType:null}},args:[]}],interfaces:[]},{kind:"OBJECT",name:"Erc20Approval",fields:[{name:"byTransaction",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"TransactionRequest",ofType:null}},args:[]},{name:"bySignature",type:{kind:"OBJECT",name:"PermitTypedData",ofType:null},args:[]}],interfaces:[]},{kind:"OBJECT",name:"Erc20ApprovalRequired",fields:[{name:"transaction",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"TransactionRequest",ofType:null}},args:[]},{name:"approval",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"Erc20Approval",ofType:null}},args:[]},{name:"approvals",type:{kind:"NON_NULL",ofType:{kind:"LIST",ofType:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"Erc20Approval",ofType:null}}}},args:[]},{name:"reason",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"requiredAmount",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"DecimalNumber",ofType:null}},args:[]},{name:"currentAllowance",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"DecimalNumber",ofType:null}},args:[]},{name:"originalTransaction",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"TransactionRequest",ofType:null}},args:[]}],interfaces:[]},{kind:"OBJECT",name:"Erc20Token",fields:[{name:"address",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"chain",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"Chain",ofType:null}},args:[]},{name:"info",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"TokenInfo",ofType:null}},args:[]},{name:"isWrappedNativeToken",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]}],interfaces:[]},{kind:"OBJECT",name:"ExchangeAmount",fields:[{name:"value",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"name",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"symbol",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"icon",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"decimals",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]}],interfaces:[]},{kind:"OBJECT",name:"ExchangeAmountVariation",fields:[{name:"current",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"ExchangeAmount",ofType:null}},args:[]},{name:"after",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"ExchangeAmount",ofType:null}},args:[]}],interfaces:[]},{kind:"OBJECT",name:"ExchangeAmountWithChange",fields:[{name:"current",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"ExchangeAmount",ofType:null}},args:[]},{name:"change",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"PercentNumber",ofType:null}},args:[{name:"window",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]}],interfaces:[]},{kind:"UNION",name:"ExecutionPlan",possibleTypes:[{kind:"OBJECT",name:"TransactionRequest"},{kind:"OBJECT",name:"Erc20ApprovalRequired"},{kind:"OBJECT",name:"PreContractActionRequired"},{kind:"OBJECT",name:"InsufficientBalanceError"}]},{kind:"OBJECT",name:"ForkTopUpResponse",fields:[{name:"message",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"txHash",type:{kind:"SCALAR",name:"Any"},args:[]}],interfaces:[]},{kind:"OBJECT",name:"HealthFactorError",fields:[{name:"reason",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"current",type:{kind:"SCALAR",name:"Any"},args:[]},{name:"after",type:{kind:"SCALAR",name:"Any"},args:[]}],interfaces:[]},{kind:"UNION",name:"HealthFactorResult",possibleTypes:[{kind:"OBJECT",name:"HealthFactorVariation"},{kind:"OBJECT",name:"HealthFactorError"}]},{kind:"OBJECT",name:"HealthFactorVariation",fields:[{name:"current",type:{kind:"SCALAR",name:"Any"},args:[]},{name:"after",type:{kind:"SCALAR",name:"Any"},args:[]}],interfaces:[]},{kind:"OBJECT",name:"HealthFactorWithChange",fields:[{name:"current",type:{kind:"SCALAR",name:"Any"},args:[]},{name:"change",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"PercentNumber",ofType:null}},args:[{name:"window",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]}],interfaces:[]},{kind:"OBJECT",name:"Hub",fields:[{name:"id",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"name",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"address",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"chain",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"Chain",ofType:null}},args:[]},{name:"summary",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"HubSummary",ofType:null}},args:[{name:"currency",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]}],interfaces:[]},{kind:"OBJECT",name:"HubAsset",fields:[{name:"id",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"onchainAssetId",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"hub",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"Hub",ofType:null}},args:[]},{name:"underlying",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"Erc20Token",ofType:null}},args:[]},{name:"summary",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"HubAssetSummary",ofType:null}},args:[]},{name:"settings",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"HubAssetSettings",ofType:null}},args:[]},{name:"userState",type:{kind:"OBJECT",name:"HubAssetUserState",ofType:null},args:[]}],interfaces:[]},{kind:"OBJECT",name:"HubAssetSettings",fields:[{name:"feeReceiver",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"liquidityFee",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"PercentNumber",ofType:null}},args:[]},{name:"irStrategy",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"reinvestmentController",type:{kind:"SCALAR",name:"Any"},args:[]}],interfaces:[]},{kind:"OBJECT",name:"HubAssetSummary",fields:[{name:"supplied",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"Erc20Amount",ofType:null}},args:[]},{name:"borrowed",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"Erc20Amount",ofType:null}},args:[]},{name:"availableLiquidity",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"Erc20Amount",ofType:null}},args:[]},{name:"supplyApy",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"PercentNumber",ofType:null}},args:[]},{name:"borrowApy",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"PercentNumber",ofType:null}},args:[]},{name:"netApy",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"PercentNumber",ofType:null}},args:[]},{name:"utilizationRate",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"PercentNumber",ofType:null}},args:[]}],interfaces:[]},{kind:"OBJECT",name:"HubAssetUserState",fields:[{name:"balance",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"Erc20Amount",ofType:null}},args:[]}],interfaces:[]},{kind:"OBJECT",name:"HubSummary",fields:[{name:"totalBorrowed",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"ExchangeAmountWithChange",ofType:null}},args:[]},{name:"totalBorrowCap",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"ExchangeAmount",ofType:null}},args:[]},{name:"totalSupplied",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"ExchangeAmountWithChange",ofType:null}},args:[]},{name:"totalSupplyCap",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"ExchangeAmount",ofType:null}},args:[]},{name:"utilizationRate",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"PercentNumber",ofType:null}},args:[]}],interfaces:[]},{kind:"OBJECT",name:"HubSummarySample",fields:[{name:"date",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"deposits",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"ExchangeAmount",ofType:null}},args:[]},{name:"borrows",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"ExchangeAmount",ofType:null}},args:[]},{name:"availableLiquidity",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"ExchangeAmount",ofType:null}},args:[]},{name:"utilizationRate",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"PercentNumber",ofType:null}},args:[]}],interfaces:[]},{kind:"OBJECT",name:"InsufficientBalanceError",fields:[{name:"required",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"DecimalNumber",ofType:null}},args:[]},{name:"available",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"DecimalNumber",ofType:null}},args:[]}],interfaces:[]},{kind:"UNION",name:"LiquidatePositionExecutionPlan",possibleTypes:[{kind:"OBJECT",name:"TransactionRequest"},{kind:"OBJECT",name:"Erc20ApprovalRequired"},{kind:"OBJECT",name:"InsufficientBalanceError"}]},{kind:"OBJECT",name:"LiquidatedActivity",fields:[{name:"id",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"user",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"timestamp",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"txHash",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"spoke",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"Spoke",ofType:null}},args:[]},{name:"collateralReserve",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"ReserveInfo",ofType:null}},args:[]},{name:"debtReserve",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"ReserveInfo",ofType:null}},args:[]},{name:"collateral",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"Erc20Amount",ofType:null}},args:[]},{name:"debt",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"Erc20Amount",ofType:null}},args:[]},{name:"liquidator",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"chain",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"Chain",ofType:null}},args:[]}],interfaces:[]},{kind:"OBJECT",name:"LiquidationFeeVariation",fields:[{name:"reserveId",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"token",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"Erc20Token",ofType:null}},args:[]},{name:"current",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"PercentNumber",ofType:null}},args:[]},{name:"after",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"PercentNumber",ofType:null}},args:[]}],interfaces:[]},{kind:"OBJECT",name:"MaxLiquidationBonusVariation",fields:[{name:"reserveId",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"token",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"Erc20Token",ofType:null}},args:[]},{name:"current",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"PercentNumber",ofType:null}},args:[]},{name:"after",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"PercentNumber",ofType:null}},args:[]}],interfaces:[]},{kind:"OBJECT",name:"Mutation",fields:[{name:"forkTopUp",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"ForkTopUpResponse",ofType:null}},args:[{name:"request",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"swap",type:{kind:"NON_NULL",ofType:{kind:"UNION",name:"SwapExecutionPlan",ofType:null}},args:[{name:"request",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"cancelSwap",type:{kind:"NON_NULL",ofType:{kind:"UNION",name:"CancelSwapExecutionPlan",ofType:null}},args:[{name:"request",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]}],interfaces:[]},{kind:"OBJECT",name:"NativeAmount",fields:[{name:"token",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"NativeToken",ofType:null}},args:[]},{name:"amount",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"DecimalNumber",ofType:null}},args:[]},{name:"exchange",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"ExchangeAmount",ofType:null}},args:[{name:"currency",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"exchangeRate",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"DecimalNumber",ofType:null}},args:[{name:"currency",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]}],interfaces:[]},{kind:"OBJECT",name:"NativeToken",fields:[{name:"info",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"TokenInfo",ofType:null}},args:[]},{name:"chain",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"Chain",ofType:null}},args:[]}],interfaces:[]},{kind:"OBJECT",name:"PaginatedActivitiesResult",fields:[{name:"items",type:{kind:"NON_NULL",ofType:{kind:"LIST",ofType:{kind:"NON_NULL",ofType:{kind:"UNION",name:"ActivityItem",ofType:null}}}},args:[]},{name:"pageInfo",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"PaginatedResultInfo",ofType:null}},args:[]}],interfaces:[]},{kind:"OBJECT",name:"PaginatedResultInfo",fields:[{name:"prev",type:{kind:"SCALAR",name:"Any"},args:[]},{name:"next",type:{kind:"SCALAR",name:"Any"},args:[]}],interfaces:[]},{kind:"OBJECT",name:"PaginatedSpokePositionManagerResult",fields:[{name:"items",type:{kind:"NON_NULL",ofType:{kind:"LIST",ofType:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"SpokePositionManager",ofType:null}}}},args:[]},{name:"pageInfo",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"PaginatedResultInfo",ofType:null}},args:[]}],interfaces:[]},{kind:"OBJECT",name:"PaginatedSpokeUserPositionManagerResult",fields:[{name:"items",type:{kind:"NON_NULL",ofType:{kind:"LIST",ofType:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"SpokeUserPositionManager",ofType:null}}}},args:[]},{name:"pageInfo",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"PaginatedResultInfo",ofType:null}},args:[]}],interfaces:[]},{kind:"OBJECT",name:"PaginatedUserSwapsResult",fields:[{name:"items",type:{kind:"NON_NULL",ofType:{kind:"LIST",ofType:{kind:"NON_NULL",ofType:{kind:"UNION",name:"SwapStatus",ofType:null}}}},args:[]},{name:"pageInfo",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"PaginatedResultInfo",ofType:null}},args:[]}],interfaces:[]},{kind:"OBJECT",name:"PercentNumber",fields:[{name:"onChainValue",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"decimals",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"value",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"normalized",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]}],interfaces:[]},{kind:"OBJECT",name:"PercentNumberChangeSnapshot",fields:[{name:"before",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"PercentNumber",ofType:null}},args:[]},{name:"after",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"PercentNumber",ofType:null}},args:[]}],interfaces:[]},{kind:"OBJECT",name:"PercentNumberVariation",fields:[{name:"current",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"PercentNumber",ofType:null}},args:[]},{name:"after",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"PercentNumber",ofType:null}},args:[]}],interfaces:[]},{kind:"OBJECT",name:"PercentNumberWithChange",fields:[{name:"current",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"PercentNumber",ofType:null}},args:[]},{name:"change",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"PercentNumber",ofType:null}},args:[{name:"window",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]}],interfaces:[]},{kind:"OBJECT",name:"PermitTypedData",fields:[{name:"types",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"primaryType",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"domain",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"DomainData",ofType:null}},args:[]},{name:"message",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]}],interfaces:[]},{kind:"OBJECT",name:"PositionAmount",fields:[{name:"reserve",type:{kind:"OBJECT",name:"ReserveInfo",ofType:null},args:[]},{name:"amount",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"Erc20Amount",ofType:null}},args:[]}],interfaces:[]},{kind:"OBJECT",name:"PositionSwapAdapterContractApproval",fields:[{name:"bySignature",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"SwapTypedData",ofType:null}},args:[]}],interfaces:[]},{kind:"UNION",name:"PositionSwapApproval",possibleTypes:[{kind:"OBJECT",name:"PositionSwapAdapterContractApproval"},{kind:"OBJECT",name:"PositionSwapPositionManagerApproval"}]},{kind:"OBJECT",name:"PositionSwapByIntentApprovalsRequired",fields:[{name:"quote",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"SwapQuote",ofType:null}},args:[]},{name:"approvals",type:{kind:"NON_NULL",ofType:{kind:"LIST",ofType:{kind:"NON_NULL",ofType:{kind:"UNION",name:"PositionSwapApproval",ofType:null}}}},args:[]}],interfaces:[]},{kind:"OBJECT",name:"PositionSwapPositionManagerApproval",fields:[{name:"byTransaction",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"TransactionRequest",ofType:null}},args:[]},{name:"bySignature",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"SwapTypedData",ofType:null}},args:[]}],interfaces:[]},{kind:"OBJECT",name:"PreContractActionRequired",fields:[{name:"transaction",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"TransactionRequest",ofType:null}},args:[]},{name:"reason",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"originalTransaction",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"TransactionRequest",ofType:null}},args:[]}],interfaces:[]},{kind:"UNION",name:"PreparePositionSwapResult",possibleTypes:[{kind:"OBJECT",name:"PrepareSwapOrder"},{kind:"OBJECT",name:"InsufficientBalanceError"}]},{kind:"OBJECT",name:"PrepareSwapCancelResult",fields:[{name:"data",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"SwapTypedData",ofType:null}},args:[]}],interfaces:[]},{kind:"OBJECT",name:"PrepareSwapOrder",fields:[{name:"newQuoteId",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"data",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"SwapTypedData",ofType:null}},args:[]}],interfaces:[]},{kind:"UNION",name:"PrepareTokenSwapResult",possibleTypes:[{kind:"OBJECT",name:"PrepareSwapOrder"},{kind:"OBJECT",name:"InsufficientBalanceError"}]},{kind:"OBJECT",name:"PreviewUserPosition",fields:[{name:"id",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"healthFactor",type:{kind:"NON_NULL",ofType:{kind:"UNION",name:"HealthFactorResult",ofType:null}},args:[]},{name:"riskPremium",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"PercentNumberVariation",ofType:null}},args:[]},{name:"netApy",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"PercentNumberVariation",ofType:null}},args:[]},{name:"netCollateral",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"ExchangeAmountVariation",ofType:null}},args:[{name:"currency",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"netBalance",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"ExchangeAmountVariation",ofType:null}},args:[{name:"currency",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"projectedEarnings",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"ExchangeAmountVariation",ofType:null}},args:[]},{name:"borrowingPower",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"ExchangeAmountVariation",ofType:null}},args:[]},{name:"otherConditions",type:{kind:"NON_NULL",ofType:{kind:"LIST",ofType:{kind:"NON_NULL",ofType:{kind:"UNION",name:"UserPositionConditionVariation",ofType:null}}}},args:[]}],interfaces:[]},{kind:"OBJECT",name:"ProtocolHistorySample",fields:[{name:"date",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"deposits",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"ExchangeAmount",ofType:null}},args:[]},{name:"borrows",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"ExchangeAmount",ofType:null}},args:[]}],interfaces:[]},{kind:"OBJECT",name:"Query",fields:[{name:"health",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"chain",type:{kind:"OBJECT",name:"Chain",ofType:null},args:[{name:"request",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"chains",type:{kind:"NON_NULL",ofType:{kind:"LIST",ofType:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"Chain",ofType:null}}}},args:[{name:"request",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"exchangeRate",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"ExchangeAmount",ofType:null}},args:[{name:"request",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"protocolHistory",type:{kind:"NON_NULL",ofType:{kind:"LIST",ofType:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"ProtocolHistorySample",ofType:null}}}},args:[{name:"request",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"asset",type:{kind:"OBJECT",name:"Asset",ofType:null},args:[{name:"request",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"assetSupplyHistory",type:{kind:"NON_NULL",ofType:{kind:"LIST",ofType:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"AssetSupplySample",ofType:null}}}},args:[{name:"request",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"assetBorrowHistory",type:{kind:"NON_NULL",ofType:{kind:"LIST",ofType:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"AssetBorrowSample",ofType:null}}}},args:[{name:"request",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"assetPriceHistory",type:{kind:"NON_NULL",ofType:{kind:"LIST",ofType:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"AssetPriceSample",ofType:null}}}},args:[{name:"request",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"hubs",type:{kind:"NON_NULL",ofType:{kind:"LIST",ofType:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"Hub",ofType:null}}}},args:[{name:"request",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"hub",type:{kind:"OBJECT",name:"Hub",ofType:null},args:[{name:"request",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"hubAssets",type:{kind:"NON_NULL",ofType:{kind:"LIST",ofType:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"HubAsset",ofType:null}}}},args:[{name:"request",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"hubSummaryHistory",type:{kind:"NON_NULL",ofType:{kind:"LIST",ofType:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"HubSummarySample",ofType:null}}}},args:[{name:"request",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"reserve",type:{kind:"OBJECT",name:"Reserve",ofType:null},args:[{name:"request",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"reserves",type:{kind:"NON_NULL",ofType:{kind:"LIST",ofType:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"Reserve",ofType:null}}}},args:[{name:"request",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"supply",type:{kind:"NON_NULL",ofType:{kind:"UNION",name:"ExecutionPlan",ofType:null}},args:[{name:"request",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"borrow",type:{kind:"NON_NULL",ofType:{kind:"UNION",name:"ExecutionPlan",ofType:null}},args:[{name:"request",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"withdraw",type:{kind:"NON_NULL",ofType:{kind:"UNION",name:"ExecutionPlan",ofType:null}},args:[{name:"request",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"repay",type:{kind:"NON_NULL",ofType:{kind:"UNION",name:"ExecutionPlan",ofType:null}},args:[{name:"request",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"spokePositionManagers",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"PaginatedSpokePositionManagerResult",ofType:null}},args:[{name:"request",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"spokeUserPositionManagers",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"PaginatedSpokeUserPositionManagerResult",ofType:null}},args:[{name:"request",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"setSpokeUserPositionManager",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"TransactionRequest",ofType:null}},args:[{name:"request",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"renounceSpokeUserPositionManager",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"TransactionRequest",ofType:null}},args:[{name:"request",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"setUserSuppliesAsCollateral",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"TransactionRequest",ofType:null}},args:[{name:"request",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"liquidatePosition",type:{kind:"NON_NULL",ofType:{kind:"UNION",name:"LiquidatePositionExecutionPlan",ofType:null}},args:[{name:"request",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"updateUserPositionConditions",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"TransactionRequest",ofType:null}},args:[{name:"request",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"preview",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"PreviewUserPosition",ofType:null}},args:[{name:"request",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"borrowApyHistory",type:{kind:"NON_NULL",ofType:{kind:"LIST",ofType:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"ApySample",ofType:null}}}},args:[{name:"request",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"supplyApyHistory",type:{kind:"NON_NULL",ofType:{kind:"LIST",ofType:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"ApySample",ofType:null}}}},args:[{name:"request",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"spoke",type:{kind:"OBJECT",name:"Spoke",ofType:null},args:[{name:"request",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"spokes",type:{kind:"NON_NULL",ofType:{kind:"LIST",ofType:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"Spoke",ofType:null}}}},args:[{name:"request",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"userBalances",type:{kind:"NON_NULL",ofType:{kind:"LIST",ofType:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"UserBalance",ofType:null}}}},args:[{name:"request",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"userBorrows",type:{kind:"NON_NULL",ofType:{kind:"LIST",ofType:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"UserBorrowItem",ofType:null}}}},args:[{name:"request",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"userSummary",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"UserSummary",ofType:null}},args:[{name:"request",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"userSummaryHistory",type:{kind:"NON_NULL",ofType:{kind:"LIST",ofType:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"UserSummaryHistoryItem",ofType:null}}}},args:[{name:"request",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"userPositions",type:{kind:"NON_NULL",ofType:{kind:"LIST",ofType:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"UserPosition",ofType:null}}}},args:[{name:"request",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"userPosition",type:{kind:"OBJECT",name:"UserPosition",ofType:null},args:[{name:"request",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"userSupplies",type:{kind:"NON_NULL",ofType:{kind:"LIST",ofType:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"UserSupplyItem",ofType:null}}}},args:[{name:"request",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"userRiskPremiumBreakdown",type:{kind:"NON_NULL",ofType:{kind:"LIST",ofType:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"UserRiskPremiumBreakdownItem",ofType:null}}}},args:[{name:"request",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"hasProcessedKnownTransaction",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[{name:"request",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"activities",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"PaginatedActivitiesResult",ofType:null}},args:[{name:"request",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"tokenSwapQuote",type:{kind:"NON_NULL",ofType:{kind:"UNION",name:"TokenSwapQuoteResult",ofType:null}},args:[{name:"request",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"prepareTokenSwap",type:{kind:"NON_NULL",ofType:{kind:"UNION",name:"PrepareTokenSwapResult",ofType:null}},args:[{name:"request",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"supplySwapQuote",type:{kind:"NON_NULL",ofType:{kind:"UNION",name:"SupplySwapQuoteResult",ofType:null}},args:[{name:"request",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"borrowSwapQuote",type:{kind:"NON_NULL",ofType:{kind:"UNION",name:"BorrowSwapQuoteResult",ofType:null}},args:[{name:"request",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"repayWithSupplyQuote",type:{kind:"NON_NULL",ofType:{kind:"UNION",name:"RepayWithSupplyQuoteResult",ofType:null}},args:[{name:"request",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"withdrawSwapQuote",type:{kind:"NON_NULL",ofType:{kind:"UNION",name:"WithdrawSwapQuoteResult",ofType:null}},args:[{name:"request",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"preparePositionSwap",type:{kind:"NON_NULL",ofType:{kind:"UNION",name:"PreparePositionSwapResult",ofType:null}},args:[{name:"request",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"swapStatus",type:{kind:"NON_NULL",ofType:{kind:"UNION",name:"SwapStatus",ofType:null}},args:[{name:"request",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"userSwaps",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"PaginatedUserSwapsResult",ofType:null}},args:[{name:"request",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"prepareSwapCancel",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"PrepareSwapCancelResult",ofType:null}},args:[{name:"request",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"swappableTokens",type:{kind:"NON_NULL",ofType:{kind:"LIST",ofType:{kind:"NON_NULL",ofType:{kind:"UNION",name:"Token",ofType:null}}}},args:[{name:"request",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]}],interfaces:[]},{kind:"OBJECT",name:"RepayActivity",fields:[{name:"id",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"user",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"timestamp",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"txHash",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"spoke",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"Spoke",ofType:null}},args:[]},{name:"reserve",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"ReserveInfo",ofType:null}},args:[]},{name:"repaid",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"Erc20Amount",ofType:null}},args:[]},{name:"chain",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"Chain",ofType:null}},args:[]}],interfaces:[]},{kind:"OBJECT",name:"RepayWithSupplyActivity",fields:[{name:"id",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"user",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"timestamp",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"txHash",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"chain",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"Chain",ofType:null}},args:[]},{name:"debtRepaid",type:{kind:"NON_NULL",ofType:{kind:"UNION",name:"SwapAmount",ofType:null}},args:[]},{name:"supplyUsed",type:{kind:"NON_NULL",ofType:{kind:"UNION",name:"SwapAmount",ofType:null}},args:[]},{name:"explorerUrl",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]}],interfaces:[]},{kind:"UNION",name:"RepayWithSupplyQuoteResult",possibleTypes:[{kind:"OBJECT",name:"PositionSwapByIntentApprovalsRequired"}]},{kind:"OBJECT",name:"Reserve",fields:[{name:"id",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"onChainId",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"borrowCap",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"supplyCap",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"chain",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"Chain",ofType:null}},args:[]},{name:"summary",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"ReserveSummary",ofType:null}},args:[]},{name:"settings",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"ReserveSettings",ofType:null}},args:[]},{name:"status",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"ReserveStatus",ofType:null}},args:[]},{name:"canBorrow",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"canSupply",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"canUseAsCollateral",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"canSwapFrom",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"userState",type:{kind:"OBJECT",name:"ReserveUserState",ofType:null},args:[]},{name:"asset",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"HubAsset",ofType:null}},args:[]},{name:"spoke",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"Spoke",ofType:null}},args:[]}],interfaces:[]},{kind:"OBJECT",name:"ReserveInfo",fields:[{name:"id",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"asset",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"HubAsset",ofType:null}},args:[]}],interfaces:[]},{kind:"OBJECT",name:"ReserveSettings",fields:[{name:"collateralFactor",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"PercentNumber",ofType:null}},args:[]},{name:"maxLiquidationBonus",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"PercentNumber",ofType:null}},args:[]},{name:"liquidationFee",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"PercentNumber",ofType:null}},args:[]},{name:"collateralRisk",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"PercentNumber",ofType:null}},args:[]},{name:"borrowable",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"collateral",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"suppliable",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"latestDynamicConfigKey",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]}],interfaces:[]},{kind:"OBJECT",name:"ReserveStatus",fields:[{name:"frozen",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"paused",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"active",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]}],interfaces:[]},{kind:"OBJECT",name:"ReserveSummary",fields:[{name:"supplied",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"Erc20Amount",ofType:null}},args:[]},{name:"borrowed",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"Erc20Amount",ofType:null}},args:[]},{name:"supplyApy",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"PercentNumber",ofType:null}},args:[]},{name:"borrowApy",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"PercentNumber",ofType:null}},args:[]}],interfaces:[]},{kind:"OBJECT",name:"ReserveUserState",fields:[{name:"balance",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"Erc20Amount",ofType:null}},args:[]},{name:"suppliable",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"Erc20Amount",ofType:null}},args:[]},{name:"borrowable",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"Erc20Amount",ofType:null}},args:[]},{name:"borrowApy",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"PercentNumber",ofType:null}},args:[]},{name:"collateralFactor",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"PercentNumber",ofType:null}},args:[]},{name:"maxLiquidationBonus",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"PercentNumber",ofType:null}},args:[]},{name:"liquidationFee",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"PercentNumber",ofType:null}},args:[]},{name:"dynamicConfigKey",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]}],interfaces:[]},{kind:"OBJECT",name:"Spoke",fields:[{name:"id",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"name",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"address",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"chain",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"Chain",ofType:null}},args:[]}],interfaces:[]},{kind:"OBJECT",name:"SpokePositionManager",fields:[{name:"name",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"address",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"active",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]}],interfaces:[]},{kind:"OBJECT",name:"SpokeUserPositionManager",fields:[{name:"name",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"address",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"approvedOn",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"active",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]}],interfaces:[]},{kind:"OBJECT",name:"SupplyActivity",fields:[{name:"id",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"user",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"timestamp",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"txHash",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"spoke",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"Spoke",ofType:null}},args:[]},{name:"reserve",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"ReserveInfo",ofType:null}},args:[]},{name:"supplied",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"Erc20Amount",ofType:null}},args:[]},{name:"chain",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"Chain",ofType:null}},args:[]}],interfaces:[]},{kind:"OBJECT",name:"SupplySwapActivity",fields:[{name:"id",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"user",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"timestamp",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"txHash",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"chain",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"Chain",ofType:null}},args:[]},{name:"sold",type:{kind:"NON_NULL",ofType:{kind:"UNION",name:"SwapAmount",ofType:null}},args:[]},{name:"bought",type:{kind:"NON_NULL",ofType:{kind:"UNION",name:"SwapAmount",ofType:null}},args:[]},{name:"explorerUrl",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]}],interfaces:[]},{kind:"UNION",name:"SupplySwapQuoteResult",possibleTypes:[{kind:"OBJECT",name:"PositionSwapByIntentApprovalsRequired"}]},{kind:"UNION",name:"SwapAmount",possibleTypes:[{kind:"OBJECT",name:"PositionAmount"},{kind:"OBJECT",name:"NativeAmount"},{kind:"OBJECT",name:"Erc20Amount"}]},{kind:"OBJECT",name:"SwapByIntent",fields:[{name:"quote",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"SwapQuote",ofType:null}},args:[]}],interfaces:[]},{kind:"OBJECT",name:"SwapByIntentWithApprovalRequired",fields:[{name:"quote",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"SwapQuote",ofType:null}},args:[]},{name:"approval",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"Erc20Approval",ofType:null}},args:[]},{name:"approvals",type:{kind:"NON_NULL",ofType:{kind:"LIST",ofType:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"Erc20Approval",ofType:null}}}},args:[]}],interfaces:[]},{kind:"OBJECT",name:"SwapByTransaction",fields:[{name:"quote",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"SwapQuote",ofType:null}},args:[]}],interfaces:[]},{kind:"OBJECT",name:"SwapCancelled",fields:[{name:"swapId",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"createdAt",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"cancelledAt",type:{kind:"SCALAR",name:"Any"},args:[]},{name:"explorerUrl",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]}],interfaces:[]},{kind:"UNION",name:"SwapExecutionPlan",possibleTypes:[{kind:"OBJECT",name:"SwapTransactionRequest"},{kind:"OBJECT",name:"SwapReceipt"},{kind:"OBJECT",name:"InsufficientBalanceError"}]},{kind:"OBJECT",name:"SwapExpired",fields:[{name:"swapId",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"createdAt",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"expiredAt",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"explorerUrl",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]}],interfaces:[]},{kind:"OBJECT",name:"SwapFulfilled",fields:[{name:"swapId",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"txHash",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"desiredSell",type:{kind:"NON_NULL",ofType:{kind:"UNION",name:"SwapAmount",ofType:null}},args:[]},{name:"desiredBuy",type:{kind:"NON_NULL",ofType:{kind:"UNION",name:"SwapAmount",ofType:null}},args:[]},{name:"sold",type:{kind:"NON_NULL",ofType:{kind:"UNION",name:"SwapAmount",ofType:null}},args:[]},{name:"bought",type:{kind:"NON_NULL",ofType:{kind:"UNION",name:"SwapAmount",ofType:null}},args:[]},{name:"createdAt",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"fulfilledAt",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"explorerUrl",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"refundTxHash",type:{kind:"SCALAR",name:"Any"},args:[]}],interfaces:[]},{kind:"OBJECT",name:"SwapOpen",fields:[{name:"swapId",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"createdAt",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"deadline",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"explorerUrl",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"desiredSell",type:{kind:"NON_NULL",ofType:{kind:"UNION",name:"SwapAmount",ofType:null}},args:[]},{name:"desiredBuy",type:{kind:"NON_NULL",ofType:{kind:"UNION",name:"SwapAmount",ofType:null}},args:[]}],interfaces:[]},{kind:"OBJECT",name:"SwapPendingSignature",fields:[{name:"swapId",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"createdAt",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"deadline",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"explorerUrl",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]}],interfaces:[]},{kind:"OBJECT",name:"SwapQuote",fields:[{name:"accuracy",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"quoteId",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"suggestedSlippage",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"PercentNumber",ofType:null}},args:[]},{name:"selectedSlippage",type:{kind:"OBJECT",name:"PercentNumber",ofType:null},args:[]},{name:"sell",type:{kind:"NON_NULL",ofType:{kind:"UNION",name:"TokenAmount",ofType:null}},args:[]},{name:"buy",type:{kind:"NON_NULL",ofType:{kind:"UNION",name:"TokenAmount",ofType:null}},args:[]},{name:"costs",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"SwapQuoteCosts",ofType:null}},args:[]},{name:"finalBuy",type:{kind:"NON_NULL",ofType:{kind:"UNION",name:"TokenAmount",ofType:null}},args:[]},{name:"finalSell",type:{kind:"NON_NULL",ofType:{kind:"UNION",name:"TokenAmount",ofType:null}},args:[]}],interfaces:[]},{kind:"OBJECT",name:"SwapQuoteCosts",fields:[{name:"networkCosts",type:{kind:"NON_NULL",ofType:{kind:"UNION",name:"TokenAmount",ofType:null}},args:[]},{name:"partnerFee",type:{kind:"NON_NULL",ofType:{kind:"UNION",name:"TokenAmount",ofType:null}},args:[]},{name:"flashloanFee",type:{kind:"UNION",name:"TokenAmount",ofType:null},args:[]},{name:"providerFee",type:{kind:"NON_NULL",ofType:{kind:"UNION",name:"TokenAmount",ofType:null}},args:[]}],interfaces:[]},{kind:"OBJECT",name:"SwapReceipt",fields:[{name:"id",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"createdAt",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"explorerUrl",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]}],interfaces:[]},{kind:"UNION",name:"SwapStatus",possibleTypes:[{kind:"OBJECT",name:"SwapOpen"},{kind:"OBJECT",name:"SwapPendingSignature"},{kind:"OBJECT",name:"SwapCancelled"},{kind:"OBJECT",name:"SwapExpired"},{kind:"OBJECT",name:"SwapFulfilled"}]},{kind:"OBJECT",name:"SwapTransactionRequest",fields:[{name:"transaction",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"TransactionRequest",ofType:null}},args:[]},{name:"orderReceipt",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"SwapReceipt",ofType:null}},args:[]}],interfaces:[]},{kind:"OBJECT",name:"SwapTypedData",fields:[{name:"types",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"primaryType",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"domain",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"DomainData",ofType:null}},args:[]},{name:"message",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]}],interfaces:[]},{kind:"UNION",name:"Token",possibleTypes:[{kind:"OBJECT",name:"NativeToken"},{kind:"OBJECT",name:"Erc20Token"}]},{kind:"UNION",name:"TokenAmount",possibleTypes:[{kind:"OBJECT",name:"NativeAmount"},{kind:"OBJECT",name:"Erc20Amount"}]},{kind:"OBJECT",name:"TokenInfo",fields:[{name:"id",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"name",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"symbol",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"icon",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"decimals",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"categories",type:{kind:"NON_NULL",ofType:{kind:"LIST",ofType:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}},args:[]}],interfaces:[]},{kind:"OBJECT",name:"TokenSwapActivity",fields:[{name:"id",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"user",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"timestamp",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"txHash",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"chain",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"Chain",ofType:null}},args:[]},{name:"sold",type:{kind:"NON_NULL",ofType:{kind:"UNION",name:"SwapAmount",ofType:null}},args:[]},{name:"bought",type:{kind:"NON_NULL",ofType:{kind:"UNION",name:"SwapAmount",ofType:null}},args:[]},{name:"explorerUrl",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]}],interfaces:[]},{kind:"UNION",name:"TokenSwapQuoteResult",possibleTypes:[{kind:"OBJECT",name:"SwapByIntent"},{kind:"OBJECT",name:"SwapByIntentWithApprovalRequired"},{kind:"OBJECT",name:"SwapByTransaction"}]},{kind:"OBJECT",name:"TransactionRequest",fields:[{name:"to",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"from",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"data",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"value",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"chainId",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"operations",type:{kind:"LIST",ofType:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}},args:[]}],interfaces:[]},{kind:"OBJECT",name:"UpdatedDynamicConfigActivity",fields:[{name:"id",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"user",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"timestamp",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"txHash",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"spoke",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"Spoke",ofType:null}},args:[]},{name:"reserve",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"ReserveInfo",ofType:null}},args:[]},{name:"collateralFactor",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"PercentNumberChangeSnapshot",ofType:null}},args:[]},{name:"maxLiquidationBonus",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"PercentNumberChangeSnapshot",ofType:null}},args:[]},{name:"liquidationFee",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"PercentNumberChangeSnapshot",ofType:null}},args:[]},{name:"chain",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"Chain",ofType:null}},args:[]}],interfaces:[]},{kind:"OBJECT",name:"UpdatedRiskPremiumActivity",fields:[{name:"id",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"user",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"timestamp",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"txHash",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"spoke",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"Spoke",ofType:null}},args:[]},{name:"premium",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"PercentNumberChangeSnapshot",ofType:null}},args:[]},{name:"chain",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"Chain",ofType:null}},args:[]}],interfaces:[]},{kind:"OBJECT",name:"UserBalance",fields:[{name:"id",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"info",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"TokenInfo",ofType:null}},args:[]},{name:"balances",type:{kind:"NON_NULL",ofType:{kind:"LIST",ofType:{kind:"NON_NULL",ofType:{kind:"UNION",name:"TokenAmount",ofType:null}}}},args:[]},{name:"totalAmount",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"DecimalNumber",ofType:null}},args:[]},{name:"exchange",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"ExchangeAmount",ofType:null}},args:[{name:"currency",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"supplyApy",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"PercentNumber",ofType:null}},args:[{name:"metric",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"borrowApy",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"PercentNumber",ofType:null}},args:[{name:"metric",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"collateralFactor",type:{kind:"OBJECT",name:"PercentNumber",ofType:null},args:[{name:"metric",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]}],interfaces:[]},{kind:"OBJECT",name:"UserBorrowItem",fields:[{name:"id",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"reserve",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"Reserve",ofType:null}},args:[]},{name:"principal",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"Erc20Amount",ofType:null}},args:[]},{name:"debt",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"Erc20Amount",ofType:null}},args:[]},{name:"interest",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"Erc20Amount",ofType:null}},args:[]},{name:"createdAt",type:{kind:"SCALAR",name:"Any"},args:[]}],interfaces:[]},{kind:"OBJECT",name:"UserPosition",fields:[{name:"id",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"user",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"createdAt",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"totalSupplied",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"ExchangeAmountWithChange",ofType:null}},args:[{name:"currency",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"totalCollateral",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"ExchangeAmountWithChange",ofType:null}},args:[{name:"currency",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"totalDebt",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"ExchangeAmountWithChange",ofType:null}},args:[{name:"currency",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"netBalance",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"ExchangeAmountWithChange",ofType:null}},args:[{name:"currency",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"netCollateral",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"ExchangeAmountWithChange",ofType:null}},args:[{name:"currency",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"netApy",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"PercentNumber",ofType:null}},args:[]},{name:"netSupplyApy",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"PercentNumberWithChange",ofType:null}},args:[]},{name:"netBorrowApy",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"PercentNumberWithChange",ofType:null}},args:[]},{name:"netAccruedInterest",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"ExchangeAmount",ofType:null}},args:[{name:"currency",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"healthFactor",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"HealthFactorWithChange",ofType:null}},args:[]},{name:"riskPremium",type:{kind:"OBJECT",name:"UserPositionRiskPremium",ofType:null},args:[]},{name:"liquidationPrice",type:{kind:"OBJECT",name:"ExchangeAmount",ofType:null},args:[{name:"currency",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"borrowingPower",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"ExchangeAmount",ofType:null}},args:[{name:"currency",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"canUpdateDynamicConfig",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"netBalancePercentChange",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"PercentNumber",ofType:null}},args:[{name:"window",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"spoke",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"Spoke",ofType:null}},args:[]},{name:"averageCollateralFactor",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"PercentNumber",ofType:null}},args:[]}],interfaces:[]},{kind:"UNION",name:"UserPositionConditionVariation",possibleTypes:[{kind:"OBJECT",name:"CollateralFactorVariation"},{kind:"OBJECT",name:"LiquidationFeeVariation"},{kind:"OBJECT",name:"MaxLiquidationBonusVariation"}]},{kind:"OBJECT",name:"UserPositionRiskPremium",fields:[{name:"current",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"PercentNumber",ofType:null}},args:[]},{name:"latest",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"PercentNumber",ofType:null}},args:[]},{name:"breakdown",type:{kind:"NON_NULL",ofType:{kind:"LIST",ofType:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"UserRiskPremiumBreakdownItem",ofType:null}}}},args:[]}],interfaces:[]},{kind:"OBJECT",name:"UserRiskPremiumBreakdownItem",fields:[{name:"token",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"Erc20Token",ofType:null}},args:[]},{name:"currentRiskPremiumWeight",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"PercentNumber",ofType:null}},args:[]},{name:"latestRiskPremiumWeight",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"PercentNumber",ofType:null}},args:[]},{name:"collateral",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"PercentNumber",ofType:null}},args:[]}],interfaces:[]},{kind:"OBJECT",name:"UserSummary",fields:[{name:"totalPositions",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"netBalance",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"ExchangeAmountWithChange",ofType:null}},args:[{name:"currency",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"totalCollateral",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"ExchangeAmount",ofType:null}},args:[{name:"currency",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"totalSupplied",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"ExchangeAmount",ofType:null}},args:[{name:"currency",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"totalDebt",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"ExchangeAmount",ofType:null}},args:[{name:"currency",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"netApy",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"PercentNumber",ofType:null}},args:[]},{name:"netAccruedInterest",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"ExchangeAmount",ofType:null}},args:[{name:"currency",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"lowestHealthFactor",type:{kind:"SCALAR",name:"Any"},args:[]}],interfaces:[]},{kind:"OBJECT",name:"UserSummaryHistoryItem",fields:[{name:"healthFactor",type:{kind:"SCALAR",name:"Any"},args:[]},{name:"date",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"netBalance",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"ExchangeAmount",ofType:null}},args:[{name:"currency",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"borrows",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"ExchangeAmount",ofType:null}},args:[{name:"currency",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]},{name:"supplies",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"ExchangeAmount",ofType:null}},args:[{name:"currency",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}}}]}],interfaces:[]},{kind:"OBJECT",name:"UserSupplyItem",fields:[{name:"id",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"reserve",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"Reserve",ofType:null}},args:[]},{name:"principal",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"Erc20Amount",ofType:null}},args:[]},{name:"withdrawable",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"Erc20Amount",ofType:null}},args:[]},{name:"interest",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"Erc20Amount",ofType:null}},args:[]},{name:"isCollateral",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"createdAt",type:{kind:"SCALAR",name:"Any"},args:[]}],interfaces:[]},{kind:"OBJECT",name:"UsingAsCollateralActivity",fields:[{name:"id",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"user",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"timestamp",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"txHash",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"spoke",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"Spoke",ofType:null}},args:[]},{name:"reserve",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"ReserveInfo",ofType:null}},args:[]},{name:"enabledAsCollateral",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"chain",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"Chain",ofType:null}},args:[]}],interfaces:[]},{kind:"OBJECT",name:"WithdrawActivity",fields:[{name:"id",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"user",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"timestamp",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"txHash",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"spoke",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"Spoke",ofType:null}},args:[]},{name:"reserve",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"ReserveInfo",ofType:null}},args:[]},{name:"withdrawn",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"Erc20Amount",ofType:null}},args:[]},{name:"chain",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"Chain",ofType:null}},args:[]}],interfaces:[]},{kind:"OBJECT",name:"WithdrawSwapActivity",fields:[{name:"id",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"user",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"timestamp",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"txHash",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]},{name:"chain",type:{kind:"NON_NULL",ofType:{kind:"OBJECT",name:"Chain",ofType:null}},args:[]},{name:"withdrawn",type:{kind:"NON_NULL",ofType:{kind:"UNION",name:"SwapAmount",ofType:null}},args:[]},{name:"bought",type:{kind:"NON_NULL",ofType:{kind:"UNION",name:"SwapAmount",ofType:null}},args:[]},{name:"explorerUrl",type:{kind:"NON_NULL",ofType:{kind:"SCALAR",name:"Any"}},args:[]}],interfaces:[]},{kind:"UNION",name:"WithdrawSwapQuoteResult",possibleTypes:[{kind:"OBJECT",name:"PositionSwapByIntentApprovalsRequired"}]},{kind:"SCALAR",name:"Any"}],directives:[]}},Yp=Kp,zp=Yp,Dt=(e,n,a,t)=>BigInt(e[t.fieldName]),Ie=(e,n,a,t)=>P$1.new(e[t.fieldName]),Ge=(e,n,a,t)=>e[t.fieldName]==null?null:Ie(e,n,a,t),B=(e,n,a,t)=>new Date(e[t.fieldName]),Ft=(e,n,a,t)=>e[t.fieldName]==null?null:B(e,n,a,t),Xp=Rs({schema:zp,resolvers:{PercentNumber:{onChainValue:Dt,value:Ie,normalized:Ie},DecimalNumber:{onChainValue:Dt,value:Ie},ExchangeAmount:{value:Ie},AssetPriceSample:{price:Ie,date:B},Reserve:{borrowCap:Ie,supplyCap:Ie},HealthFactorError:{current:Ge,after:Ge},HealthFactorVariation:{current:Ge,after:Ge},HealthFactorWithChange:{current:Ge},UserSummary:{lowestHealthFactor:Ge},UserSummaryHistoryItem:{healthFactor:Ge,date:B},TransactionRequest:{value:Dt},ApySample:{date:B},AssetBorrowSample:{date:B},AssetSupplySample:{date:B},HubSummarySample:{date:B},ProtocolHistorySample:{date:B},BorrowActivity:{timestamp:B},LiquidatedActivity:{timestamp:B},RepayActivity:{timestamp:B},SupplyActivity:{timestamp:B},WithdrawActivity:{timestamp:B},UsingAsCollateralActivity:{timestamp:B},UpdatedDynamicConfigActivity:{timestamp:B},UpdatedRiskPremiumActivity:{timestamp:B},TokenSwapActivity:{timestamp:B},SupplySwapActivity:{timestamp:B},BorrowSwapActivity:{timestamp:B},RepayWithSupplyActivity:{timestamp:B},WithdrawSwapActivity:{timestamp:B},UserPosition:{createdAt:B},UserBorrowItem:{createdAt:Ft},UserSupplyItem:{createdAt:Ft},SpokeUserPositionManager:{approvedOn:B},SwapCancelled:{createdAt:B,cancelledAt:Ft},SwapExpired:{createdAt:B,expiredAt:B},SwapFulfilled:{createdAt:B,fulfilledAt:B},SwapOpen:{createdAt:B,deadline:B},SwapPendingSignature:{createdAt:B,deadline:B},SwapReceipt:{createdAt:B},Query:{hub:(e,{request:n})=>Nt(n.query)?{__typename:"Hub",id:yt(n.query.hubInput)}:{__typename:"Hub",id:n.query.hubId},reserve:(e,{request:n})=>kt(n.query)?{__typename:"Reserve",id:ct(n.query.reserveInput)}:{__typename:"Reserve",id:n.query.reserveId},userPosition:(e,{request:n})=>{if("userSpoke"in n&&n.userSpoke){let{chainId:a,address:t}=ft(n.userSpoke.spoke);return {__typename:"UserPosition",id:mt({chainId:a,spoke:t,user:n.userSpoke.user})}}if("id"in n&&n.id)return {__typename:"UserPosition",id:n.id}},activities:(e,n,a)=>{if(!Tt(n.request.query))return a.resolve("Query","activities",n);let{txHash:t,chainId:r}=n.request.query.txHash,i=a.inspectFields("Query").filter(o=>o.fieldName==="activities").reduce((o,s)=>{let p=a.resolve("Query",s.fieldKey);if(!p)return o;let d=a.resolve(p,"items");if(!d)return o;for(let y of d)o.add(y);return o},new Set).values().toArray().filter(o=>{if(a.resolve(o,"txHash")!==t)return false;let s=a.resolve(o,"spoke");if(s){let p=a.resolve(s,"chain"),d=p?a.resolve(p,"chainId"):void 0;if(typeof d=="number")return d===r}return true});if(i.length!==0)return {__typename:"PaginatedActivitiesResult",items:i,pageInfo:{__typename:"PaginatedResultInfo",prev:null,next:null}}}}},keys:{Asset:e=>e.id,BorrowActivity:e=>e.id,Hub:e=>e.id,HubAsset:e=>e.id,LiquidatedActivity:e=>e.id,RepayActivity:e=>e.id,Reserve:e=>e.id,ReserveInfo:e=>e.id,Spoke:e=>e.id,SupplyActivity:e=>e.id,TokenInfo:e=>e.id,UserPosition:e=>e.id,UsingAsCollateralActivity:e=>e.id,WithdrawActivity:e=>e.id,UpdatedDynamicConfigActivity:e=>e.id,UpdatedRiskPremiumActivity:e=>e.id,TokenSwapActivity:e=>e.id,SupplySwapActivity:e=>e.id,BorrowSwapActivity:e=>e.id,RepayWithSupplyActivity:e=>e.id,WithdrawSwapActivity:e=>e.id,Erc20Token:e=>e.address,Chain:e=>e.chainId.toString(),NativeToken:e=>e.chain.chainId.toString(),ApySample:()=>null,AssetAmountWithChange:()=>null,AssetBorrowSample:()=>null,AssetPriceSample:()=>null,AssetSampleBreakdown:()=>null,AssetSummary:()=>null,AssetSupplySample:()=>null,DecimalNumber:()=>null,CollateralFactorVariation:()=>null,DecimalNumberWithChange:()=>null,DomainData:()=>null,Erc20Amount:()=>null,Erc20Approval:()=>null,Erc20ApprovalRequired:()=>null,ExchangeAmount:()=>null,ExchangeAmountVariation:()=>null,ExchangeAmountWithChange:()=>null,ForkTopUpResponse:()=>null,HealthFactorError:()=>null,HealthFactorVariation:()=>null,HealthFactorWithChange:()=>null,HubAssetSettings:()=>null,HubAssetSummary:()=>null,HubAssetUserState:()=>null,HubSummary:()=>null,HubSummarySample:()=>null,InsufficientBalanceError:()=>null,LiquidationFeeVariation:()=>null,MaxLiquidationBonusVariation:()=>null,NativeAmount:()=>null,PaginatedActivitiesResult:()=>null,PaginatedResultInfo:()=>null,PaginatedSpokePositionManagerResult:()=>null,PaginatedSpokeUserPositionManagerResult:()=>null,PaginatedUserSwapsResult:()=>null,PercentNumber:()=>null,PercentNumberVariation:()=>null,PercentNumberWithChange:()=>null,PermitTypedData:()=>null,BorrowSwapQuoteResult:()=>null,PercentNumberChangeSnapshot:()=>null,PositionAmount:()=>null,PositionSwapAdapterContractApproval:()=>null,PositionSwapByIntentApprovalsRequired:()=>null,PositionSwapPositionManagerApproval:()=>null,PreContractActionRequired:()=>null,PrepareSwapCancelResult:()=>null,PrepareSwapOrder:()=>null,PreviewUserPosition:()=>null,RepayWithSupplyQuoteResult:()=>null,ProtocolHistorySample:()=>null,ReserveSettings:()=>null,ReserveStatus:()=>null,ReserveSummary:()=>null,ReserveUserState:()=>null,SpokePositionManager:()=>null,SpokeUserPositionManager:()=>null,SwapByIntent:()=>null,SwapByIntentWithApprovalRequired:()=>null,SupplySwapQuoteResult:()=>null,SwapByTransaction:()=>null,SwapCancelled:()=>null,SwapExpired:()=>null,SwapFulfilled:()=>null,SwapOpen:()=>null,SwapPendingSignature:()=>null,SwapQuote:()=>null,SwapQuoteCosts:()=>null,SwapReceipt:()=>null,SwapTransactionRequest:()=>null,SwapTypedData:()=>null,TokenSwapQuoteResult:()=>null,WithdrawSwapQuoteResult:()=>null,TransactionRequest:()=>null,UserBalance:()=>null,UserBorrowItem:()=>null,UserPositionRiskPremium:()=>null,UserRiskPremiumBreakdownItem:()=>null,UserSummary:()=>null,UserSummaryHistoryItem:()=>null,UserSupplyItem:()=>null}}),Zp={name:"production",backend:"https://api.aave.com/graphql",indexingTimeout:6e4,pollingInterval:100,exchangeRateInterval:1e4,swapQuoteInterval:3e4,swapStatusInterval:5e3},Ry={name:"staging",backend:"https://api.staging.aave.com/graphql",indexingTimeout:6e4,pollingInterval:500,exchangeRateInterval:1e4,swapQuoteInterval:3e4,swapStatusInterval:5e3},qy={name:"local",backend:"http://localhost:3007/graphql",indexingTimeout:6e4,pollingInterval:1e3,exchangeRateInterval:1e4,swapQuoteInterval:3e4,swapStatusInterval:5e3};function el({environment:e=Zp,headers:n,cache:a=true,debug:t=false,fragments:r=[]}){return {displayName:"AaveClient",environment:e,headers:n,cache:a?Xp:null,debug:t,fragments:r}}function nl(e){return e.operations!==null&&e.operations.length>0}var Py=class qs extends Ka{static create(n){return new qs(el(n??{}))}waitForTransaction=n=>(o(nl(n),"AaveClient.waitForTransaction called with an non-tracked operation. See the documentation for correct tracking setup."),a.fromPromise(this.pollTransactionStatus(n),a=>a instanceof fn||a instanceof W?a:W.from(a)));async refreshQueryWhere(n,a){await this.refreshWhere(async t=>{if(t.query===n){let r=await this.query(n,t.variables,{requestPolicy:"cache-only"});return r.isErr()?false:a(t.variables,r.value)}return false});}async pollTransactionStatus(n){let a=Date.now();for(;Date.now()-a<this.context.environment.indexingTimeout;){if(await is(this,n).match(t=>t,t=>{throw t}))return n.txHash;await ea(this.context.environment.pollingInterval);}throw fn.from(`Timeout waiting for transaction ${n.txHash} to be processed.`)}};var Jt={Idle:()=>({called:false,loading:false,data:void 0,error:void 0}),Loading:e=>({called:true,loading:true,data:e,error:void 0}),Success:e=>({called:true,loading:false,data:e,error:void 0}),Failed:e=>({called:true,loading:false,data:void 0,error:e})};function $y(e,n){let[a,t]=useState(Jt.Idle()),r=useRef(false),i=useCallback(e,n);return [useCallback(s=>{o(!r.current,"Cannot execute a task while another is in progress."),r.current=true;let p;t(d=>(p=d,{called:true,loading:true,data:d.data,error:void 0}));try{let d=i(s);return d.match(y=>{r.current=!1,t(Jt.Success(y));},y=>{r.current=!1,t(Jt.Failed(y));}),d}catch(d){throw r.current=false,t(B$1(p)),d}},[i]),a]}var Qy=e=>Ga.from(e).asResultAsync(),Is=class e{constructor(n){this.wait=n;}static isInstanceOf(n){return n instanceof e}static tryFrom(n){return e.isInstanceOf(n)?b(n):W.from(n).asResultAsync()}};function My(e){return I$1(e)?b(e):W.from(`Expected Signature, but got ${String(e)}`).asResultAsync()}
|
|
1663
|
+
export{ni as $,On as $a,ro as $b,Qo as $c,$y as $d,$r as A,An as Aa,ct as Ab,go as Ac,Od as Ad,Wr as B,Ti as Ba,zi as Bb,vo as Bc,Sd as Bd,Hr as C,hn as Ca,Zu as Cb,Ao as Cc,Ed as Cd,Qr as D,Ln as Da,mt as Db,ho as Dc,Cd as Dd,Mr as E,it as Ea,ep as Eb,Lo as Ec,_d as Ed,jr as F,gi as Fa,np as Fb,Oo as Fc,wd as Fd,Gr as G,vi as Ga,ap as Gb,So as Gc,Ud as Gd,u as H,Ai as Ha,ft as Hb,Eo as Hc,bd as Hd,et as I,ot as Ia,Xi as Ib,Co as Ic,Rd as Id,fe as J,hi as Ja,tp as Jb,_o as Jc,qd as Jd,D as K,Li as Ka,rp as Kb,wo as Kc,Pd as Kd,Kr as L,Oi as La,ip as Lb,Uo as Lc,Id as Ld,ie as M,Si as Ma,op as Mb,bo as Mc,Bd as Md,kn as N,st as Na,Nt as Nb,Ro as Nc,xd as Nd,$ as O,Ei as Oa,sp as Ob,qo as Oc,Dd as Od,Le as P,Ci as Pa,up as Pb,Po as Pc,Fd as Pd,nt as Q,qe as Qa,pp as Qb,Io as Qc,Jd as Qd,z as R,_i as Ra,kt as Rb,Bo as Rc,Vd as Rd,at as S,wi as Sa,Tt as Sb,xo as Sc,$d as Sd,oa as T,Ui as Ta,Zi as Tb,Do as Tc,Wd as Td,Yr as U,ut as Ua,lp as Ub,vt as Uc,Hd as Ud,tn as V,bi as Va,eo as Vb,Fo as Vc,Qd as Vd,zr as W,Ri as Wa,dp as Wb,Jo as Wc,Md as Wd,Tn as X,qi as Xa,no as Xb,Vo as Xc,Zp as Xd,Xr as Y,Pi as Ya,ao as Yb,$o as Yc,Ry as Yd,Zr as Z,Ii as Za,gt as Zb,Wo as Zc,qy as Zd,ei as _,Bi as _a,to as _b,Ho as _c,Py as _d,xs as a,ai as aa,xi as ab,io as ac,Mo as ad,Qy as ae,vr as b,ti as ba,Di as bb,oo as bc,jo as bd,Is as be,Cu as c,rn as ca,Fi as cb,so as cc,Go as cd,My as ce,W as d,ri as da,Ji as db,yp as dc,Ko as dd,_u as e,gn as ea,Vi as eb,cp as ec,Yo as ed,wu as f,ii as fa,$i as fb,mp as fc,zo as fd,fn as g,oi as ga,Wi as gb,fp as gc,Xo as gd,Nn as h,si as ha,Hi as hb,uo as hc,Zo as hd,Ga as i,sa as ia,pt as ib,Np as ic,es as id,ea as j,ui as ja,Qi as jb,kp as jc,ns as jd,Ma as k,Hu as ka,lt as kb,Tp as kc,as as kd,Er as l,oe as la,Mi as lb,po as lc,Sp as ld,Cr as m,pi as ma,ji as mb,lo as mc,ts as md,Ka as n,li as na,dt as nb,gp as nc,Ep as nd,Rr as o,di as oa,Qu as ob,vp as oc,rs as od,qr as p,yi as pa,Gi as pb,Ap as pc,Cp as pd,Xa as q,ci as qa,Mu as qb,hp as qc,_p as qd,Pr as r,mi as ra,Ki as rb,yo as rc,E as rd,Ir as s,fi as sa,ju as sb,Lp as sc,Nd as sd,Br as t,Ni as ta,Gu as tb,co as tc,kd as td,xr as u,vn as ua,Yi as ub,mo as uc,Td as ud,Dr as v,Oe as va,yt as vb,fo as vc,gd as vd,Za as w,se as wa,Ku as wb,No as wc,vd as wd,Fr as x,tt as xa,Yu as xb,ko as xc,Ad as xd,Jr as y,rt as ya,zu as yb,Op as yc,hd as yd,Vr as z,ki as za,Xu as zb,To as zc,Ld as zd};//# sourceMappingURL=chunk-3TDVAQWZ.js.map
|
|
1664
|
+
//# sourceMappingURL=chunk-3TDVAQWZ.js.map
|