@spritz-finance/api-client 0.0.3 → 0.0.4
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.
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
"use strict";var
|
|
2
|
-
`),
|
|
3
|
-
`)}function
|
|
1
|
+
"use strict";var ci=require("axios"),Ir=Object.getOwnPropertyNames,li=(e,t)=>function(){return t||(0,e[Ir(e)[0]])((t={exports:{}}).exports,t),t.exports};function Hn(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Hn=function(n){return typeof n}:Hn=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Hn(e)}function ve(e){return Hn(e)=="object"&&e!==null}var fi=typeof Symbol=="function"&&Symbol.iterator!=null?Symbol.iterator:"@@iterator",Y=typeof Symbol=="function"&&Symbol.toStringTag!=null?Symbol.toStringTag:"@@toStringTag";function Rt(e,t){for(var n=/\r\n|[\n\r]/g,i=1,a=t+1,o;(o=n.exec(e.body))&&o.index<t;)i+=1,a=t+1-(o.index+o[0].length);return{line:i,column:a}}function Ar(e){return di(e.source,Rt(e.source,e.start))}function di(e,t){var n=e.locationOffset.column-1,i=Kn(n)+e.body,a=t.line-1,o=e.locationOffset.line-1,u=t.line+o,s=t.line===1?n:0,c=t.column+s,l="".concat(e.name,":").concat(u,":").concat(c,`
|
|
2
|
+
`),y=i.split(/\r\n|[\n\r]/g),g=y[a];if(g.length>120){for(var D=Math.floor(c/80),k=c%80,S=[],w=0;w<g.length;w+=80)S.push(g.slice(w,w+80));return l+pi([["".concat(u),S[0]]].concat(S.slice(1,D+1).map(function(A){return["",A]}),[[" ",Kn(k-1)+"^"],["",S[D+1]]]))}return l+pi([["".concat(u-1),y[a-1]],["".concat(u),g],["",Kn(c-1)+"^"],["".concat(u+1),y[a+1]]])}function pi(e){var t=e.filter(function(i){i[0];var a=i[1];return a!==void 0}),n=Math.max.apply(Math,t.map(function(i){var a=i[0];return a.length}));return t.map(function(i){var a=i[0],o=i[1];return Dr(n,a)+(o?" | "+o:" |")}).join(`
|
|
3
|
+
`)}function Kn(e){return Array(e+1).join(" ")}function Dr(e,t){return Kn(e-t.length)+t}function Xn(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Xn=function(n){return typeof n}:Xn=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Xn(e)}function vi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,i)}return n}function wr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?vi(Object(n),!0).forEach(function(i){Or(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vi(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function Or(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mi(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function _r(e,t,n){return t&&mi(e.prototype,t),n&&mi(e,n),e}function Rr(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ve(e,t)}function Lr(e){var t=yi();return function(){var i=Be(e),a;if(t){var o=Be(this).constructor;a=Reflect.construct(i,arguments,o)}else a=i.apply(this,arguments);return hi(this,a)}}function hi(e,t){return t&&(Xn(t)==="object"||typeof t=="function")?t:Pe(e)}function Pe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Lt(e){var t=typeof Map=="function"?new Map:void 0;return Lt=function(i){if(i===null||!xr(i))return i;if(typeof i!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t<"u"){if(t.has(i))return t.get(i);t.set(i,a)}function a(){return Wn(i,arguments,Be(this).constructor)}return a.prototype=Object.create(i.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),Ve(a,i)},Lt(e)}function Wn(e,t,n){return yi()?Wn=Reflect.construct:Wn=function(a,o,u){var s=[null];s.push.apply(s,o);var c=Function.bind.apply(a,s),l=new c;return u&&Ve(l,u.prototype),l},Wn.apply(null,arguments)}function yi(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function xr(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function Ve(e,t){return Ve=Object.setPrototypeOf||function(i,a){return i.__proto__=a,i},Ve(e,t)}function Be(e){return Be=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Be(e)}var x=function(e){Rr(n,e);var t=Lr(n);function n(i,a,o,u,s,c,l){var y,g,D,k;Fr(this,n),k=t.call(this,i),k.name="GraphQLError",k.originalError=c??void 0,k.nodes=gi(Array.isArray(a)?a:a?[a]:void 0);for(var S=[],w=0,A=(F=k.nodes)!==null&&F!==void 0?F:[];w<A.length;w++){var F,Q=A[w],V=Q.loc;V!=null&&S.push(V)}S=gi(S),k.source=o??((y=S)===null||y===void 0?void 0:y[0].source),k.positions=u??((g=S)===null||g===void 0?void 0:g.map(function(L){return L.start})),k.locations=u&&o?u.map(function(L){return Rt(o,L)}):(D=S)===null||D===void 0?void 0:D.map(function(L){return Rt(L.source,L.start)}),k.path=s??void 0;var G=c?.extensions;return l==null&&ve(G)?k.extensions=wr({},G):k.extensions=l??{},Object.defineProperties(Pe(k),{message:{enumerable:!0},locations:{enumerable:k.locations!=null},path:{enumerable:k.path!=null},extensions:{enumerable:k.extensions!=null&&Object.keys(k.extensions).length>0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),c!=null&&c.stack?(Object.defineProperty(Pe(k),"stack",{value:c.stack,writable:!0,configurable:!0}),hi(k)):(Error.captureStackTrace?Error.captureStackTrace(Pe(k),n):Object.defineProperty(Pe(k),"stack",{value:Error().stack,writable:!0,configurable:!0}),k)}return _r(n,[{key:"toString",value:function(){return Ur(this)}},{key:Y,get:function(){return"Object"}}]),n}(Lt(Error));function gi(e){return e===void 0||e.length===0?void 0:e}function Ur(e){var t=e.message;if(e.nodes)for(var n=0,i=e.nodes;n<i.length;n++){var a=i[n];a.loc&&(t+=`
|
|
4
4
|
|
|
5
|
-
`+
|
|
5
|
+
`+Ar(a.loc))}else if(e.source&&e.locations)for(var o=0,u=e.locations;o<u.length;o++){var s=u[o];t+=`
|
|
6
6
|
|
|
7
|
-
`+
|
|
7
|
+
`+di(e.source,s)}return t}var v=Object.freeze({NAME:"Name",DOCUMENT:"Document",OPERATION_DEFINITION:"OperationDefinition",VARIABLE_DEFINITION:"VariableDefinition",SELECTION_SET:"SelectionSet",FIELD:"Field",ARGUMENT:"Argument",FRAGMENT_SPREAD:"FragmentSpread",INLINE_FRAGMENT:"InlineFragment",FRAGMENT_DEFINITION:"FragmentDefinition",VARIABLE:"Variable",INT:"IntValue",FLOAT:"FloatValue",STRING:"StringValue",BOOLEAN:"BooleanValue",NULL:"NullValue",ENUM:"EnumValue",LIST:"ListValue",OBJECT:"ObjectValue",OBJECT_FIELD:"ObjectField",DIRECTIVE:"Directive",NAMED_TYPE:"NamedType",LIST_TYPE:"ListType",NON_NULL_TYPE:"NonNullType",SCHEMA_DEFINITION:"SchemaDefinition",OPERATION_TYPE_DEFINITION:"OperationTypeDefinition",SCALAR_TYPE_DEFINITION:"ScalarTypeDefinition",OBJECT_TYPE_DEFINITION:"ObjectTypeDefinition",FIELD_DEFINITION:"FieldDefinition",INPUT_VALUE_DEFINITION:"InputValueDefinition",INTERFACE_TYPE_DEFINITION:"InterfaceTypeDefinition",UNION_TYPE_DEFINITION:"UnionTypeDefinition",ENUM_TYPE_DEFINITION:"EnumTypeDefinition",ENUM_VALUE_DEFINITION:"EnumValueDefinition",INPUT_OBJECT_TYPE_DEFINITION:"InputObjectTypeDefinition",DIRECTIVE_DEFINITION:"DirectiveDefinition",SCHEMA_EXTENSION:"SchemaExtension",SCALAR_TYPE_EXTENSION:"ScalarTypeExtension",OBJECT_TYPE_EXTENSION:"ObjectTypeExtension",INTERFACE_TYPE_EXTENSION:"InterfaceTypeExtension",UNION_TYPE_EXTENSION:"UnionTypeExtension",ENUM_TYPE_EXTENSION:"EnumTypeExtension",INPUT_OBJECT_TYPE_EXTENSION:"InputObjectTypeExtension"});function Me(e,t){var n=!!e;if(!n)throw new Error(t??"Unexpected invariant triggered.")}var Pr=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):void 0,xt=Pr;function W(e){var t=e.prototype.toJSON;typeof t=="function"||Me(0),e.prototype.inspect=t,xt&&(e.prototype[xt]=t)}var Vr=function(){function e(n,i,a){this.start=n.start,this.end=i.end,this.startToken=n,this.endToken=i,this.source=a}var t=e.prototype;return t.toJSON=function(){return{start:this.start,end:this.end}},e}();W(Vr);var Br=function(){function e(n,i,a,o,u,s,c){this.kind=n,this.start=i,this.end=a,this.line=o,this.column=u,this.value=c,this.prev=s,this.next=null}var t=e.prototype;return t.toJSON=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}},e}();W(Br);function Ut(e){return e!=null&&typeof e.kind=="string"}function Zn(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Zn=function(n){return typeof n}:Zn=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Zn(e)}var Mr=10,ki=2;function _(e){return et(e,[])}function et(e,t){switch(Zn(e)){case"string":return JSON.stringify(e);case"function":return e.name?"[function ".concat(e.name,"]"):"[function]";case"object":return e===null?"null":Cr(e,t);default:return String(e)}}function Cr(e,t){if(t.indexOf(e)!==-1)return"[Circular]";var n=[].concat(t,[e]),i=qr(e);if(i!==void 0){var a=i.call(e);if(a!==e)return typeof a=="string"?a:et(a,n)}else if(Array.isArray(e))return jr(e,n);return Gr(e,n)}function Gr(e,t){var n=Object.keys(e);if(n.length===0)return"{}";if(t.length>ki)return"["+Qr(e)+"]";var i=n.map(function(a){var o=et(e[a],t);return a+": "+o});return"{ "+i.join(", ")+" }"}function jr(e,t){if(e.length===0)return"[]";if(t.length>ki)return"[Array]";for(var n=Math.min(Mr,e.length),i=e.length-n,a=[],o=0;o<n;++o)a.push(et(e[o],t));return i===1?a.push("... 1 more item"):i>1&&a.push("... ".concat(i," more items")),"["+a.join(", ")+"]"}function qr(e){var t=e[String(xt)];if(typeof t=="function")return t;if(typeof e.inspect=="function")return e.inspect}function Qr(e){var t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(t==="Object"&&typeof e.constructor=="function"){var n=e.constructor.name;if(typeof n=="string"&&n!=="")return n}return t}function O(e,t){var n=!!e;if(!n)throw new Error(t)}function nt(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?nt=function(n){return typeof n}:nt=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},nt(e)}var oe=function(t,n){if(t instanceof n)return!0;if(nt(t)==="object"&&t!==null){var i,a=n.prototype[Symbol.toStringTag],o=Symbol.toStringTag in t?t[Symbol.toStringTag]:(i=t.constructor)===null||i===void 0?void 0:i.name;if(a===o){var u=_(t);throw new Error("Cannot use ".concat(a,' "').concat(u,`" from another module or realm.
|
|
8
8
|
|
|
9
9
|
Ensure that there is only one instance of "graphql" in the node_modules
|
|
10
10
|
directory. If different versions of "graphql" are the dependencies of other
|
|
@@ -15,31 +15,31 @@ https://yarnpkg.com/en/docs/selective-version-resolutions
|
|
|
15
15
|
Duplicate "graphql" modules cannot be used at the same time since different
|
|
16
16
|
versions may have different capabilities and behavior. The data from one
|
|
17
17
|
version used in the function from another could produce confusing and
|
|
18
|
-
spurious results.`))}}return!1};function
|
|
19
|
-
`)===-1,
|
|
20
|
-
`+t),
|
|
21
|
-
`+t):e,
|
|
22
|
-
`),'"""'+
|
|
18
|
+
spurious results.`))}}return!1};function Si(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function $r(e,t,n){return t&&Si(e.prototype,t),n&&Si(e,n),e}(function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"GraphQL request",i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{line:1,column:1};typeof t=="string"||O(0,"Body must be a string. Received: ".concat(_(t),".")),this.body=t,this.name=n,this.locationOffset=i,this.locationOffset.line>0||O(0,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||O(0,"column in locationOffset is 1-indexed and must be positive.")}return $r(e,[{key:Y,get:function(){return"Source"}}]),e})();var R=Object.freeze({QUERY:"QUERY",MUTATION:"MUTATION",SUBSCRIPTION:"SUBSCRIPTION",FIELD:"FIELD",FRAGMENT_DEFINITION:"FRAGMENT_DEFINITION",FRAGMENT_SPREAD:"FRAGMENT_SPREAD",INLINE_FRAGMENT:"INLINE_FRAGMENT",VARIABLE_DEFINITION:"VARIABLE_DEFINITION",SCHEMA:"SCHEMA",SCALAR:"SCALAR",OBJECT:"OBJECT",FIELD_DEFINITION:"FIELD_DEFINITION",ARGUMENT_DEFINITION:"ARGUMENT_DEFINITION",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",ENUM_VALUE:"ENUM_VALUE",INPUT_OBJECT:"INPUT_OBJECT",INPUT_FIELD_DEFINITION:"INPUT_FIELD_DEFINITION"});function Jr(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=e.indexOf(`
|
|
19
|
+
`)===-1,a=e[0]===" "||e[0]===" ",o=e[e.length-1]==='"',u=e[e.length-1]==="\\",s=!i||o||u||n,c="";return s&&!(i&&a)&&(c+=`
|
|
20
|
+
`+t),c+=t?e.replace(/\n/g,`
|
|
21
|
+
`+t):e,s&&(c+=`
|
|
22
|
+
`),'"""'+c.replace(/"""/g,'\\"""')+'"""'}var zr={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"]},Yr=Object.freeze({});function Ni(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:zr,i=void 0,a=Array.isArray(e),o=[e],u=-1,s=[],c=void 0,l=void 0,y=void 0,g=[],D=[],k=e;do{u++;var S=u===o.length,w=S&&s.length!==0;if(S){if(l=D.length===0?void 0:g[g.length-1],c=y,y=D.pop(),w){if(a)c=c.slice();else{for(var A={},F=0,Q=Object.keys(c);F<Q.length;F++){var V=Q[F];A[V]=c[V]}c=A}for(var G=0,L=0;L<s.length;L++){var J=s[L][0],X=s[L][1];a&&(J-=G),a&&X===null?(c.splice(J,1),G++):c[J]=X}}u=i.index,o=i.keys,s=i.edits,a=i.inArray,i=i.prev}else{if(l=y?a?u:o[u]:void 0,c=y?y[l]:k,c==null)continue;y&&g.push(l)}var q=void 0;if(!Array.isArray(c)){if(!Ut(c))throw new Error("Invalid AST Node: ".concat(_(c),"."));var re=Pt(t,c.kind,S);if(re){if(q=re.call(t,c,l,y,g,D),q===Yr)break;if(q===!1){if(!S){g.pop();continue}}else if(q!==void 0&&(s.push([l,q]),!S))if(Ut(q))c=q;else{g.pop();continue}}}if(q===void 0&&w&&s.push([l,c]),S)g.pop();else{var ue;i={inArray:a,index:u,keys:o,edits:s,prev:i},a=Array.isArray(c),o=a?c:(ue=n[c.kind])!==null&&ue!==void 0?ue:[],u=-1,s=[],y&&D.push(y),y=c}}while(i!==void 0);return s.length!==0&&(k=s[s.length-1][1]),k}function Pt(e,t,n){var i=e[t];if(i){if(!n&&typeof i=="function")return i;var a=n?i.leave:i.enter;if(typeof a=="function")return a}else{var o=n?e.leave:e.enter;if(o){if(typeof o=="function")return o;var u=o[t];if(typeof u=="function")return u}}}var Hr=Array.prototype.find?function(e,t){return Array.prototype.find.call(e,t)}:function(e,t){for(var n=0;n<e.length;n++){var i=e[n];if(t(i))return i}},Ti=Hr,Kr=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},me=Kr,Xr=Object.entries||function(e){return Object.keys(e).map(function(t){return[t,e[t]]})},Ce=Xr;function bi(e,t){return e.reduce(function(n,i){return n[t(i)]=i,n},Object.create(null))}function tt(e,t){for(var n=Object.create(null),i=0,a=Ce(e);i<a.length;i++){var o=a[i],u=o[0],s=o[1];n[u]=t(s,u)}return n}function z(e){if(Object.getPrototypeOf(e)===null)return e;for(var t=Object.create(null),n=0,i=Ce(e);n<i.length;n++){var a=i[n],o=a[0],u=a[1];t[o]=u}return t}function Vt(e,t,n){return e.reduce(function(i,a){return i[t(a)]=n(a),i},Object.create(null))}var Wr=5;function Zr(e,t){var n=typeof e=="string"?[e,t]:[void 0,e],i=n[0],a=n[1],o=" Did you mean ";i&&(o+=i+" ");var u=a.map(function(l){return'"'.concat(l,'"')});switch(u.length){case 0:return"";case 1:return o+u[0]+"?";case 2:return o+u[0]+" or "+u[1]+"?"}var s=u.slice(0,Wr),c=s.pop();return o+s.join(", ")+", or "+c+"?"}function Ei(e){return e}function ea(e,t){for(var n=0,i=0;n<e.length&&i<t.length;){var a=e.charCodeAt(n),o=t.charCodeAt(i);if(it(a)&&it(o)){var u=0;do++n,u=u*10+a-Bt,a=e.charCodeAt(n);while(it(a)&&u>0);var s=0;do++i,s=s*10+o-Bt,o=t.charCodeAt(i);while(it(o)&&s>0);if(u<s)return-1;if(u>s)return 1}else{if(a<o)return-1;if(a>o)return 1;++n,++i}}return e.length-t.length}var Bt=48,na=57;function it(e){return!isNaN(e)&&Bt<=e&&e<=na}function ta(e,t){for(var n=Object.create(null),i=new ia(e),a=Math.floor(e.length*.4)+1,o=0;o<t.length;o++){var u=t[o],s=i.measure(u,a);s!==void 0&&(n[u]=s)}return Object.keys(n).sort(function(c,l){var y=n[c]-n[l];return y!==0?y:ea(c,l)})}var ia=function(){function e(n){this._input=n,this._inputLowerCase=n.toLowerCase(),this._inputArray=Ii(this._inputLowerCase),this._rows=[new Array(n.length+1).fill(0),new Array(n.length+1).fill(0),new Array(n.length+1).fill(0)]}var t=e.prototype;return t.measure=function(i,a){if(this._input===i)return 0;var o=i.toLowerCase();if(this._inputLowerCase===o)return 1;var u=Ii(o),s=this._inputArray;if(u.length<s.length){var c=u;u=s,s=c}var l=u.length,y=s.length;if(!(l-y>a)){for(var g=this._rows,D=0;D<=y;D++)g[0][D]=D;for(var k=1;k<=l;k++){for(var S=g[(k-1)%3],w=g[k%3],A=w[0]=k,F=1;F<=y;F++){var Q=u[k-1]===s[F-1]?0:1,V=Math.min(S[F]+1,w[F-1]+1,S[F-1]+Q);if(k>1&&F>1&&u[k-1]===s[F-2]&&u[k-2]===s[F-1]){var G=g[(k-2)%3][F-2];V=Math.min(V,G+1)}V<A&&(A=V),w[F]=V}if(A>a)return}var L=g[l%3][y];return L<=a?L:void 0}},e}();function Ii(e){for(var t=e.length,n=new Array(t),i=0;i<t;++i)n[i]=e.charCodeAt(i);return n}function se(e){return Ni(e,{leave:aa})}var ra=80,aa={Name:function(t){return t.value},Variable:function(t){return"$"+t.name},Document:function(t){return m(t.definitions,`
|
|
23
23
|
|
|
24
24
|
`)+`
|
|
25
|
-
`},OperationDefinition:function(t){var n=t.operation,i=t.name,
|
|
26
|
-
`,
|
|
25
|
+
`},OperationDefinition:function(t){var n=t.operation,i=t.name,a=U("(",m(t.variableDefinitions,", "),")"),o=m(t.directives," "),u=t.selectionSet;return!i&&!o&&!a&&n==="query"?u:m([n,m([i,a]),o,u]," ")},VariableDefinition:function(t){var n=t.variable,i=t.type,a=t.defaultValue,o=t.directives;return n+": "+i+U(" = ",a)+U(" ",m(o," "))},SelectionSet:function(t){var n=t.selections;return ee(n)},Field:function(t){var n=t.alias,i=t.name,a=t.arguments,o=t.directives,u=t.selectionSet,s=U("",n,": ")+i,c=s+U("(",m(a,", "),")");return c.length>ra&&(c=s+U(`(
|
|
26
|
+
`,rt(m(a,`
|
|
27
27
|
`)),`
|
|
28
|
-
)`)),
|
|
29
|
-
`,
|
|
28
|
+
)`)),m([c,m(o," "),u]," ")},Argument:function(t){var n=t.name,i=t.value;return n+": "+i},FragmentSpread:function(t){var n=t.name,i=t.directives;return"..."+n+U(" ",m(i," "))},InlineFragment:function(t){var n=t.typeCondition,i=t.directives,a=t.selectionSet;return m(["...",U("on ",n),m(i," "),a]," ")},FragmentDefinition:function(t){var n=t.name,i=t.typeCondition,a=t.variableDefinitions,o=t.directives,u=t.selectionSet;return"fragment ".concat(n).concat(U("(",m(a,", "),")")," ")+"on ".concat(i," ").concat(U("",m(o," ")," "))+u},IntValue:function(t){var n=t.value;return n},FloatValue:function(t){var n=t.value;return n},StringValue:function(t,n){var i=t.value,a=t.block;return a?Jr(i,n==="description"?"":" "):JSON.stringify(i)},BooleanValue:function(t){var n=t.value;return n?"true":"false"},NullValue:function(){return"null"},EnumValue:function(t){var n=t.value;return n},ListValue:function(t){var n=t.values;return"["+m(n,", ")+"]"},ObjectValue:function(t){var n=t.fields;return"{"+m(n,", ")+"}"},ObjectField:function(t){var n=t.name,i=t.value;return n+": "+i},Directive:function(t){var n=t.name,i=t.arguments;return"@"+n+U("(",m(i,", "),")")},NamedType:function(t){var n=t.name;return n},ListType:function(t){var n=t.type;return"["+n+"]"},NonNullType:function(t){var n=t.type;return n+"!"},SchemaDefinition:Z(function(e){var t=e.directives,n=e.operationTypes;return m(["schema",m(t," "),ee(n)]," ")}),OperationTypeDefinition:function(t){var n=t.operation,i=t.type;return n+": "+i},ScalarTypeDefinition:Z(function(e){var t=e.name,n=e.directives;return m(["scalar",t,m(n," ")]," ")}),ObjectTypeDefinition:Z(function(e){var t=e.name,n=e.interfaces,i=e.directives,a=e.fields;return m(["type",t,U("implements ",m(n," & ")),m(i," "),ee(a)]," ")}),FieldDefinition:Z(function(e){var t=e.name,n=e.arguments,i=e.type,a=e.directives;return t+(Ai(n)?U(`(
|
|
29
|
+
`,rt(m(n,`
|
|
30
30
|
`)),`
|
|
31
|
-
)`):
|
|
32
|
-
`,
|
|
31
|
+
)`):U("(",m(n,", "),")"))+": "+i+U(" ",m(a," "))}),InputValueDefinition:Z(function(e){var t=e.name,n=e.type,i=e.defaultValue,a=e.directives;return m([t+": "+n,U("= ",i),m(a," ")]," ")}),InterfaceTypeDefinition:Z(function(e){var t=e.name,n=e.interfaces,i=e.directives,a=e.fields;return m(["interface",t,U("implements ",m(n," & ")),m(i," "),ee(a)]," ")}),UnionTypeDefinition:Z(function(e){var t=e.name,n=e.directives,i=e.types;return m(["union",t,m(n," "),i&&i.length!==0?"= "+m(i," | "):""]," ")}),EnumTypeDefinition:Z(function(e){var t=e.name,n=e.directives,i=e.values;return m(["enum",t,m(n," "),ee(i)]," ")}),EnumValueDefinition:Z(function(e){var t=e.name,n=e.directives;return m([t,m(n," ")]," ")}),InputObjectTypeDefinition:Z(function(e){var t=e.name,n=e.directives,i=e.fields;return m(["input",t,m(n," "),ee(i)]," ")}),DirectiveDefinition:Z(function(e){var t=e.name,n=e.arguments,i=e.repeatable,a=e.locations;return"directive @"+t+(Ai(n)?U(`(
|
|
32
|
+
`,rt(m(n,`
|
|
33
33
|
`)),`
|
|
34
|
-
)`):
|
|
35
|
-
`)}}function
|
|
36
|
-
`,
|
|
34
|
+
)`):U("(",m(n,", "),")"))+(i?" repeatable":"")+" on "+m(a," | ")}),SchemaExtension:function(t){var n=t.directives,i=t.operationTypes;return m(["extend schema",m(n," "),ee(i)]," ")},ScalarTypeExtension:function(t){var n=t.name,i=t.directives;return m(["extend scalar",n,m(i," ")]," ")},ObjectTypeExtension:function(t){var n=t.name,i=t.interfaces,a=t.directives,o=t.fields;return m(["extend type",n,U("implements ",m(i," & ")),m(a," "),ee(o)]," ")},InterfaceTypeExtension:function(t){var n=t.name,i=t.interfaces,a=t.directives,o=t.fields;return m(["extend interface",n,U("implements ",m(i," & ")),m(a," "),ee(o)]," ")},UnionTypeExtension:function(t){var n=t.name,i=t.directives,a=t.types;return m(["extend union",n,m(i," "),a&&a.length!==0?"= "+m(a," | "):""]," ")},EnumTypeExtension:function(t){var n=t.name,i=t.directives,a=t.values;return m(["extend enum",n,m(i," "),ee(a)]," ")},InputObjectTypeExtension:function(t){var n=t.name,i=t.directives,a=t.fields;return m(["extend input",n,m(i," "),ee(a)]," ")}};function Z(e){return function(t){return m([t.description,e(t)],`
|
|
35
|
+
`)}}function m(e){var t,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return(t=e?.filter(function(i){return i}).join(n))!==null&&t!==void 0?t:""}function ee(e){return U(`{
|
|
36
|
+
`,rt(m(e,`
|
|
37
37
|
`)),`
|
|
38
|
-
}`)}function
|
|
39
|
-
`))}function
|
|
40
|
-
`)!==-1}function $n(e){return e!=null&&e.some(yi)}function pn(e,t){switch(e.kind){case l.NULL:return null;case l.INT:return parseInt(e.value,10);case l.FLOAT:return parseFloat(e.value);case l.STRING:case l.ENUM:case l.BOOLEAN:return e.value;case l.LIST:return e.values.map(function(n){return pn(n,t)});case l.OBJECT:return fn(e.fields,function(n){return n.name.value},function(n){return pn(n.value,t)});case l.VARIABLE:return t?.[e.name.value]}Te(0,"Unexpected value node: "+S(e))}function Yn(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function ie(e,t,n){return t&&Yn(e.prototype,t),n&&Yn(e,n),e}function zn(e){return Ne(e)||q(e)||V(e)||z(e)||X(e)||ee(e)||ke(e)||re(e)}function gi(e){if(!zn(e))throw new Error("Expected ".concat(S(e)," to be a GraphQL type."));return e}function Ne(e){return J(e,ne)}function q(e){return J(e,H)}function V(e){return J(e,Zn)}function z(e){return J(e,et)}function X(e){return J(e,Ge)}function ee(e){return J(e,nt)}function ke(e){return J(e,D)}function re(e){return J(e,h)}function ae(e){return Ne(e)||X(e)||ee(e)||mn(e)&&ae(e.ofType)}function Be(e){return Ne(e)||q(e)||V(e)||z(e)||X(e)||mn(e)&&Be(e.ofType)}function Ti(e){return Ne(e)||X(e)}function vn(e){return q(e)||V(e)||z(e)}function Si(e){return V(e)||z(e)}function D(e){if(this instanceof D)this.ofType=gi(e);else return new D(e)}D.prototype.toString=function(){return"["+String(this.ofType)+"]"},D.prototype.toJSON=function(){return this.toString()},Object.defineProperty(D.prototype,U,{get:function(){return"GraphQLList"}}),B(D);function h(e){if(this instanceof h)this.ofType=ki(e);else return new h(e)}h.prototype.toString=function(){return String(this.ofType)+"!"},h.prototype.toJSON=function(){return this.toString()},Object.defineProperty(h.prototype,U,{get:function(){return"GraphQLNonNull"}}),B(h);function mn(e){return ke(e)||re(e)}function Ni(e){return zn(e)&&!re(e)}function ki(e){if(!Ni(e))throw new Error("Expected ".concat(S(e)," to be a GraphQL nullable type."));return e}function Ei(e){if(e)return re(e)?e.ofType:e}function Ee(e){if(e){for(var t=e;mn(t);)t=t.ofType;return t}}function Pe(e){return typeof e=="function"?e():e}function oe(e){return e&&e.length>0?e:void 0}var ne=function(){function e(n){var i,r,a,s=(i=n.parseValue)!==null&&i!==void 0?i:qn;this.name=n.name,this.description=n.description,this.specifiedByUrl=n.specifiedByUrl,this.serialize=(r=n.serialize)!==null&&r!==void 0?r:qn,this.parseValue=s,this.parseLiteral=(a=n.parseLiteral)!==null&&a!==void 0?a:function(o,u){return s(pn(o,u))},this.extensions=n.extensions&&x(n.extensions),this.astNode=n.astNode,this.extensionASTNodes=oe(n.extensionASTNodes),typeof n.name=="string"||g(0,"Must provide name."),n.specifiedByUrl==null||typeof n.specifiedByUrl=="string"||g(0,"".concat(this.name,' must provide "specifiedByUrl" as a string, ')+"but got: ".concat(S(n.specifiedByUrl),".")),n.serialize==null||typeof n.serialize=="function"||g(0,"".concat(this.name,' must provide "serialize" function. If this custom Scalar is also used as an input type, ensure "parseValue" and "parseLiteral" functions are also provided.')),n.parseLiteral&&(typeof n.parseValue=="function"&&typeof n.parseLiteral=="function"||g(0,"".concat(this.name,' must provide both "parseValue" and "parseLiteral" functions.')))}var t=e.prototype;return t.toConfig=function(){var i;return{name:this.name,description:this.description,specifiedByUrl:this.specifiedByUrl,serialize:this.serialize,parseValue:this.parseValue,parseLiteral:this.parseLiteral,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:(i=this.extensionASTNodes)!==null&&i!==void 0?i:[]}},t.toString=function(){return this.name},t.toJSON=function(){return this.toString()},ie(e,[{key:U,get:function(){return"GraphQLScalarType"}}]),e}();B(ne);var H=function(){function e(n){this.name=n.name,this.description=n.description,this.isTypeOf=n.isTypeOf,this.extensions=n.extensions&&x(n.extensions),this.astNode=n.astNode,this.extensionASTNodes=oe(n.extensionASTNodes),this._fields=Hn.bind(void 0,n),this._interfaces=Xn.bind(void 0,n),typeof n.name=="string"||g(0,"Must provide name."),n.isTypeOf==null||typeof n.isTypeOf=="function"||g(0,"".concat(this.name,' must provide "isTypeOf" as a function, ')+"but got: ".concat(S(n.isTypeOf),"."))}var t=e.prototype;return t.getFields=function(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields},t.getInterfaces=function(){return typeof this._interfaces=="function"&&(this._interfaces=this._interfaces()),this._interfaces},t.toConfig=function(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:Kn(this.getFields()),isTypeOf:this.isTypeOf,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes||[]}},t.toString=function(){return this.name},t.toJSON=function(){return this.toString()},ie(e,[{key:U,get:function(){return"GraphQLObjectType"}}]),e}();B(H);function Xn(e){var t,n=(t=Pe(e.interfaces))!==null&&t!==void 0?t:[];return Array.isArray(n)||g(0,"".concat(e.name," interfaces must be an Array or a function which returns an Array.")),n}function Hn(e){var t=Pe(e.fields);return se(t)||g(0,"".concat(e.name," fields must be an object with field names as keys or a function which returns such an object.")),Ue(t,function(n,i){var r;se(n)||g(0,"".concat(e.name,".").concat(i," field config must be an object.")),!("isDeprecated"in n)||g(0,"".concat(e.name,".").concat(i,' should provide "deprecationReason" instead of "isDeprecated".')),n.resolve==null||typeof n.resolve=="function"||g(0,"".concat(e.name,".").concat(i," field resolver must be a function if ")+"provided, but got: ".concat(S(n.resolve),"."));var a=(r=n.args)!==null&&r!==void 0?r:{};se(a)||g(0,"".concat(e.name,".").concat(i," args must be an object with argument names as keys."));var s=Se(a).map(function(o){var u=o[0],c=o[1];return{name:u,description:c.description,type:c.type,defaultValue:c.defaultValue,deprecationReason:c.deprecationReason,extensions:c.extensions&&x(c.extensions),astNode:c.astNode}});return{name:i,description:n.description,type:n.type,args:s,resolve:n.resolve,subscribe:n.subscribe,isDeprecated:n.deprecationReason!=null,deprecationReason:n.deprecationReason,extensions:n.extensions&&x(n.extensions),astNode:n.astNode}})}function se(e){return W(e)&&!Array.isArray(e)}function Kn(e){return Ue(e,function(t){return{description:t.description,type:t.type,args:Wn(t.args),resolve:t.resolve,subscribe:t.subscribe,deprecationReason:t.deprecationReason,extensions:t.extensions,astNode:t.astNode}})}function Wn(e){return fn(e,function(t){return t.name},function(t){return{description:t.description,type:t.type,defaultValue:t.defaultValue,deprecationReason:t.deprecationReason,extensions:t.extensions,astNode:t.astNode}})}var Zn=function(){function e(n){this.name=n.name,this.description=n.description,this.resolveType=n.resolveType,this.extensions=n.extensions&&x(n.extensions),this.astNode=n.astNode,this.extensionASTNodes=oe(n.extensionASTNodes),this._fields=Hn.bind(void 0,n),this._interfaces=Xn.bind(void 0,n),typeof n.name=="string"||g(0,"Must provide name."),n.resolveType==null||typeof n.resolveType=="function"||g(0,"".concat(this.name,' must provide "resolveType" as a function, ')+"but got: ".concat(S(n.resolveType),"."))}var t=e.prototype;return t.getFields=function(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields},t.getInterfaces=function(){return typeof this._interfaces=="function"&&(this._interfaces=this._interfaces()),this._interfaces},t.toConfig=function(){var i;return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:Kn(this.getFields()),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:(i=this.extensionASTNodes)!==null&&i!==void 0?i:[]}},t.toString=function(){return this.name},t.toJSON=function(){return this.toString()},ie(e,[{key:U,get:function(){return"GraphQLInterfaceType"}}]),e}();B(Zn);var et=function(){function e(n){this.name=n.name,this.description=n.description,this.resolveType=n.resolveType,this.extensions=n.extensions&&x(n.extensions),this.astNode=n.astNode,this.extensionASTNodes=oe(n.extensionASTNodes),this._types=Ii.bind(void 0,n),typeof n.name=="string"||g(0,"Must provide name."),n.resolveType==null||typeof n.resolveType=="function"||g(0,"".concat(this.name,' must provide "resolveType" as a function, ')+"but got: ".concat(S(n.resolveType),"."))}var t=e.prototype;return t.getTypes=function(){return typeof this._types=="function"&&(this._types=this._types()),this._types},t.toConfig=function(){var i;return{name:this.name,description:this.description,types:this.getTypes(),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:(i=this.extensionASTNodes)!==null&&i!==void 0?i:[]}},t.toString=function(){return this.name},t.toJSON=function(){return this.toString()},ie(e,[{key:U,get:function(){return"GraphQLUnionType"}}]),e}();B(et);function Ii(e){var t=Pe(e.types);return Array.isArray(t)||g(0,"Must provide Array of types or a function which returns such an array for Union ".concat(e.name,".")),t}var Ge=function(){function e(n){this.name=n.name,this.description=n.description,this.extensions=n.extensions&&x(n.extensions),this.astNode=n.astNode,this.extensionASTNodes=oe(n.extensionASTNodes),this._values=bi(this.name,n.values),this._valueLookup=new Map(this._values.map(function(i){return[i.value,i]})),this._nameLookup=Qn(this._values,function(i){return i.name}),typeof n.name=="string"||g(0,"Must provide name.")}var t=e.prototype;return t.getValues=function(){return this._values},t.getValue=function(i){return this._nameLookup[i]},t.serialize=function(i){var r=this._valueLookup.get(i);if(r===void 0)throw new b('Enum "'.concat(this.name,'" cannot represent value: ').concat(S(i)));return r.name},t.parseValue=function(i){if(typeof i!="string"){var r=S(i);throw new b('Enum "'.concat(this.name,'" cannot represent non-string value: ').concat(r,".")+je(this,r))}var a=this.getValue(i);if(a==null)throw new b('Value "'.concat(i,'" does not exist in "').concat(this.name,'" enum.')+je(this,i));return a.value},t.parseLiteral=function(i,r){if(i.kind!==l.ENUM){var a=$(i);throw new b('Enum "'.concat(this.name,'" cannot represent non-enum value: ').concat(a,".")+je(this,a),i)}var s=this.getValue(i.value);if(s==null){var o=$(i);throw new b('Value "'.concat(o,'" does not exist in "').concat(this.name,'" enum.')+je(this,o),i)}return s.value},t.toConfig=function(){var i,r=fn(this.getValues(),function(a){return a.name},function(a){return{description:a.description,value:a.value,deprecationReason:a.deprecationReason,extensions:a.extensions,astNode:a.astNode}});return{name:this.name,description:this.description,values:r,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:(i=this.extensionASTNodes)!==null&&i!==void 0?i:[]}},t.toString=function(){return this.name},t.toJSON=function(){return this.toString()},ie(e,[{key:U,get:function(){return"GraphQLEnumType"}}]),e}();B(Ge);function je(e,t){var n=e.getValues().map(function(r){return r.name}),i=pi(t,n);return li("the enum value",i)}function bi(e,t){return se(t)||g(0,"".concat(e," values must be an object with value names as keys.")),Se(t).map(function(n){var i=n[0],r=n[1];return se(r)||g(0,"".concat(e,".").concat(i,' must refer to an object with a "value" key ')+"representing an internal value but got: ".concat(S(r),".")),!("isDeprecated"in r)||g(0,"".concat(e,".").concat(i,' should provide "deprecationReason" instead of "isDeprecated".')),{name:i,description:r.description,value:r.value!==void 0?r.value:i,isDeprecated:r.deprecationReason!=null,deprecationReason:r.deprecationReason,extensions:r.extensions&&x(r.extensions),astNode:r.astNode}})}var nt=function(){function e(n){this.name=n.name,this.description=n.description,this.extensions=n.extensions&&x(n.extensions),this.astNode=n.astNode,this.extensionASTNodes=oe(n.extensionASTNodes),this._fields=Ai.bind(void 0,n),typeof n.name=="string"||g(0,"Must provide name.")}var t=e.prototype;return t.getFields=function(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields},t.toConfig=function(){var i,r=Ue(this.getFields(),function(a){return{description:a.description,type:a.type,defaultValue:a.defaultValue,deprecationReason:a.deprecationReason,extensions:a.extensions,astNode:a.astNode}});return{name:this.name,description:this.description,fields:r,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:(i=this.extensionASTNodes)!==null&&i!==void 0?i:[]}},t.toString=function(){return this.name},t.toJSON=function(){return this.toString()},ie(e,[{key:U,get:function(){return"GraphQLInputObjectType"}}]),e}();B(nt);function Ai(e){var t=Pe(e.fields);return se(t)||g(0,"".concat(e.name," fields must be an object with field names as keys or a function which returns such an object.")),Ue(t,function(n,i){return!("resolve"in n)||g(0,"".concat(e.name,".").concat(i," field has a resolve property, but Input Types cannot define resolvers.")),{name:i,description:n.description,type:n.type,defaultValue:n.defaultValue,deprecationReason:n.deprecationReason,extensions:n.extensions&&x(n.extensions),astNode:n.astNode}})}var Oi=Array.from||function(e,t,n){if(e==null)throw new TypeError("Array.from requires an array-like object - not null or undefined");var i=e[_n];if(typeof i=="function"){for(var r=i.call(e),a=[],s,o=0;!(s=r.next()).done;++o)if(a.push(t.call(n,s.value,o)),o>9999999)throw new TypeError("Near-infinite iteration.");return a}var u=e.length;if(typeof u=="number"&&u>=0&&u%1===0){for(var c=[],p=0;p<u;++p)Object.prototype.hasOwnProperty.call(e,p)&&c.push(t.call(n,e[p],p));return c}return[]},Di=Oi,wi=Number.isFinite||function(e){return typeof e=="number"&&isFinite(e)},Ie=wi;function Ce(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ce=function(n){return typeof n}:Ce=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Ce(e)}function Fi(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(p){return p};if(e==null||Ce(e)!=="object")return null;if(Array.isArray(e))return e.map(t);var n=e[_n];if(typeof n=="function"){for(var i=n.call(e),r=[],a,s=0;!(a=i.next()).done;++s)r.push(t(a.value,s));return r}var o=e.length;if(typeof o=="number"&&o>=0&&o%1===0){for(var u=[],c=0;c<o;++c){if(!Object.prototype.hasOwnProperty.call(e,c))return null;u.push(t(e[String(c)],c))}return u}return null}var _i=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e},Qe=_i,hn=2147483647,yn=-2147483648;function Li(e){var t=be(e);if(typeof t=="boolean")return t?1:0;var n=t;if(typeof t=="string"&&t!==""&&(n=Number(t)),!Qe(n))throw new b("Int cannot represent non-integer value: ".concat(S(t)));if(n>hn||n<yn)throw new b("Int cannot represent non 32-bit signed integer value: "+S(t));return n}function Ri(e){if(!Qe(e))throw new b("Int cannot represent non-integer value: ".concat(S(e)));if(e>hn||e<yn)throw new b("Int cannot represent non 32-bit signed integer value: ".concat(e));return e}var xi=new ne({name:"Int",description:"The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.",serialize:Li,parseValue:Ri,parseLiteral:function(t){if(t.kind!==l.INT)throw new b("Int cannot represent non-integer value: ".concat($(t)),t);var n=parseInt(t.value,10);if(n>hn||n<yn)throw new b("Int cannot represent non 32-bit signed integer value: ".concat(t.value),t);return n}});function Ui(e){var t=be(e);if(typeof t=="boolean")return t?1:0;var n=t;if(typeof t=="string"&&t!==""&&(n=Number(t)),!Ie(n))throw new b("Float cannot represent non numeric value: ".concat(S(t)));return n}function Vi(e){if(!Ie(e))throw new b("Float cannot represent non numeric value: ".concat(S(e)));return e}var Mi=new ne({name:"Float",description:"The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point).",serialize:Ui,parseValue:Vi,parseLiteral:function(t){if(t.kind!==l.FLOAT&&t.kind!==l.INT)throw new b("Float cannot represent non numeric value: ".concat($(t)),t);return parseFloat(t.value)}});function be(e){if(W(e)){if(typeof e.valueOf=="function"){var t=e.valueOf();if(!W(t))return t}if(typeof e.toJSON=="function")return e.toJSON()}return e}function Bi(e){var t=be(e);if(typeof t=="string")return t;if(typeof t=="boolean")return t?"true":"false";if(Ie(t))return t.toString();throw new b("String cannot represent value: ".concat(S(e)))}function Pi(e){if(typeof e!="string")throw new b("String cannot represent a non string value: ".concat(S(e)));return e}var O=new ne({name:"String",description:"The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.",serialize:Bi,parseValue:Pi,parseLiteral:function(t){if(t.kind!==l.STRING)throw new b("String cannot represent a non string value: ".concat($(t)),t);return t.value}});function Gi(e){var t=be(e);if(typeof t=="boolean")return t;if(Ie(t))return t!==0;throw new b("Boolean cannot represent a non boolean value: ".concat(S(t)))}function ji(e){if(typeof e!="boolean")throw new b("Boolean cannot represent a non boolean value: ".concat(S(e)));return e}var M=new ne({name:"Boolean",description:"The `Boolean` scalar type represents `true` or `false`.",serialize:Gi,parseValue:ji,parseLiteral:function(t){if(t.kind!==l.BOOLEAN)throw new b("Boolean cannot represent a non boolean value: ".concat($(t)),t);return t.value}});function Ci(e){var t=be(e);if(typeof t=="string")return t;if(Qe(t))return String(t);throw new b("ID cannot represent value: ".concat(S(e)))}function Qi(e){if(typeof e=="string")return e;if(Qe(e))return e.toString();throw new b("ID cannot represent value: ".concat(S(e)))}var tt=new ne({name:"ID",description:'The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"4"`) or integer (such as `4`) input value will be accepted as an ID.',serialize:Ci,parseValue:Qi,parseLiteral:function(t){if(t.kind!==l.STRING&&t.kind!==l.INT)throw new b("ID cannot represent a non-string and non-integer value: "+$(t),t);return t.value}}),it=Object.freeze([O,xi,Mi,M,tt]);function Ae(e,t){if(re(t)){var n=Ae(e,t.ofType);return n?.kind===l.NULL?null:n}if(e===null)return{kind:l.NULL};if(e===void 0)return null;if(ke(t)){var i=t.ofType,r=Fi(e);if(r!=null){for(var a=[],s=0;s<r.length;s++){var o=r[s],u=Ae(o,i);u!=null&&a.push(u)}return{kind:l.LIST,values:a}}return Ae(e,i)}if(ee(t)){if(!W(e))return null;for(var c=[],p=0,m=Z(t.getFields());p<m.length;p++){var y=m[p],d=Ae(e[y.name],y.type);d&&c.push({kind:l.OBJECT_FIELD,name:{kind:l.NAME,value:y.name},value:d})}return{kind:l.OBJECT,fields:c}}if(Ti(t)){var v=t.serialize(e);if(v==null)return null;if(typeof v=="boolean")return{kind:l.BOOLEAN,value:v};if(typeof v=="number"&&Ie(v)){var T=String(v);return rt.test(T)?{kind:l.INT,value:T}:{kind:l.FLOAT,value:T}}if(typeof v=="string")return X(t)?{kind:l.ENUM,value:v}:t===tt&&rt.test(v)?{kind:l.INT,value:v}:{kind:l.STRING,value:v};throw new TypeError("Cannot convert value to AST: ".concat(S(v),"."))}Te(0,"Unexpected input type: "+S(t))}var rt=/^-?(?:0|[1-9][0-9]*)$/,gn=new H({name:"__Schema",description:"A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.",fields:function(){return{description:{type:O,resolve:function(n){return n.description}},types:{description:"A list of all types supported by this server.",type:new h(new D(new h(j))),resolve:function(n){return Z(n.getTypeMap())}},queryType:{description:"The type that query operations will be rooted at.",type:new h(j),resolve:function(n){return n.getQueryType()}},mutationType:{description:"If this server supports mutation, the type that mutation operations will be rooted at.",type:j,resolve:function(n){return n.getMutationType()}},subscriptionType:{description:"If this server support subscription, the type that subscription operations will be rooted at.",type:j,resolve:function(n){return n.getSubscriptionType()}},directives:{description:"A list of all directives supported by this server.",type:new h(new D(new h(at))),resolve:function(n){return n.getDirectives()}}}}}),at=new H({name:"__Directive",description:`A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.
|
|
38
|
+
}`)}function U(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"";return t!=null&&t!==""?e+t+n:""}function rt(e){return U(" ",e.replace(/\n/g,`
|
|
39
|
+
`))}function oa(e){return e.indexOf(`
|
|
40
|
+
`)!==-1}function Ai(e){return e!=null&&e.some(oa)}function Mt(e,t){switch(e.kind){case v.NULL:return null;case v.INT:return parseInt(e.value,10);case v.FLOAT:return parseFloat(e.value);case v.STRING:case v.ENUM:case v.BOOLEAN:return e.value;case v.LIST:return e.values.map(function(n){return Mt(n,t)});case v.OBJECT:return Vt(e.fields,function(n){return n.name.value},function(n){return Mt(n.value,t)});case v.VARIABLE:return t?.[e.name.value]}Me(0,"Unexpected value node: "+_(e))}function Di(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function ke(e,t,n){return t&&Di(e.prototype,t),n&&Di(e,n),e}function wi(e){return Ge(e)||ie(e)||H(e)||le(e)||fe(e)||he(e)||je(e)||Se(e)}function sa(e){if(!wi(e))throw new Error("Expected ".concat(_(e)," to be a GraphQL type."));return e}function Ge(e){return oe(e,ye)}function ie(e){return oe(e,de)}function H(e){return oe(e,Li)}function le(e){return oe(e,xi)}function fe(e){return oe(e,st)}function he(e){return oe(e,Ui)}function je(e){return oe(e,j)}function Se(e){return oe(e,I)}function Ne(e){return Ge(e)||fe(e)||he(e)||Gt(e)&&Ne(e.ofType)}function at(e){return Ge(e)||ie(e)||H(e)||le(e)||fe(e)||Gt(e)&&at(e.ofType)}function ua(e){return Ge(e)||fe(e)}function Ct(e){return ie(e)||H(e)||le(e)}function ca(e){return H(e)||le(e)}function j(e){if(this instanceof j)this.ofType=sa(e);else return new j(e)}j.prototype.toString=function(){return"["+String(this.ofType)+"]"},j.prototype.toJSON=function(){return this.toString()},Object.defineProperty(j.prototype,Y,{get:function(){return"GraphQLList"}}),W(j);function I(e){if(this instanceof I)this.ofType=fa(e);else return new I(e)}I.prototype.toString=function(){return String(this.ofType)+"!"},I.prototype.toJSON=function(){return this.toString()},Object.defineProperty(I.prototype,Y,{get:function(){return"GraphQLNonNull"}}),W(I);function Gt(e){return je(e)||Se(e)}function la(e){return wi(e)&&!Se(e)}function fa(e){if(!la(e))throw new Error("Expected ".concat(_(e)," to be a GraphQL nullable type."));return e}function da(e){if(e)return Se(e)?e.ofType:e}function qe(e){if(e){for(var t=e;Gt(t);)t=t.ofType;return t}}function ot(e){return typeof e=="function"?e():e}function Te(e){return e&&e.length>0?e:void 0}var ye=function(){function e(n){var i,a,o,u=(i=n.parseValue)!==null&&i!==void 0?i:Ei;this.name=n.name,this.description=n.description,this.specifiedByUrl=n.specifiedByUrl,this.serialize=(a=n.serialize)!==null&&a!==void 0?a:Ei,this.parseValue=u,this.parseLiteral=(o=n.parseLiteral)!==null&&o!==void 0?o:function(s,c){return u(Mt(s,c))},this.extensions=n.extensions&&z(n.extensions),this.astNode=n.astNode,this.extensionASTNodes=Te(n.extensionASTNodes),typeof n.name=="string"||O(0,"Must provide name."),n.specifiedByUrl==null||typeof n.specifiedByUrl=="string"||O(0,"".concat(this.name,' must provide "specifiedByUrl" as a string, ')+"but got: ".concat(_(n.specifiedByUrl),".")),n.serialize==null||typeof n.serialize=="function"||O(0,"".concat(this.name,' must provide "serialize" function. If this custom Scalar is also used as an input type, ensure "parseValue" and "parseLiteral" functions are also provided.')),n.parseLiteral&&(typeof n.parseValue=="function"&&typeof n.parseLiteral=="function"||O(0,"".concat(this.name,' must provide both "parseValue" and "parseLiteral" functions.')))}var t=e.prototype;return t.toConfig=function(){var i;return{name:this.name,description:this.description,specifiedByUrl:this.specifiedByUrl,serialize:this.serialize,parseValue:this.parseValue,parseLiteral:this.parseLiteral,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:(i=this.extensionASTNodes)!==null&&i!==void 0?i:[]}},t.toString=function(){return this.name},t.toJSON=function(){return this.toString()},ke(e,[{key:Y,get:function(){return"GraphQLScalarType"}}]),e}();W(ye);var de=function(){function e(n){this.name=n.name,this.description=n.description,this.isTypeOf=n.isTypeOf,this.extensions=n.extensions&&z(n.extensions),this.astNode=n.astNode,this.extensionASTNodes=Te(n.extensionASTNodes),this._fields=Fi.bind(void 0,n),this._interfaces=Oi.bind(void 0,n),typeof n.name=="string"||O(0,"Must provide name."),n.isTypeOf==null||typeof n.isTypeOf=="function"||O(0,"".concat(this.name,' must provide "isTypeOf" as a function, ')+"but got: ".concat(_(n.isTypeOf),"."))}var t=e.prototype;return t.getFields=function(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields},t.getInterfaces=function(){return typeof this._interfaces=="function"&&(this._interfaces=this._interfaces()),this._interfaces},t.toConfig=function(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:_i(this.getFields()),isTypeOf:this.isTypeOf,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes||[]}},t.toString=function(){return this.name},t.toJSON=function(){return this.toString()},ke(e,[{key:Y,get:function(){return"GraphQLObjectType"}}]),e}();W(de);function Oi(e){var t,n=(t=ot(e.interfaces))!==null&&t!==void 0?t:[];return Array.isArray(n)||O(0,"".concat(e.name," interfaces must be an Array or a function which returns an Array.")),n}function Fi(e){var t=ot(e.fields);return be(t)||O(0,"".concat(e.name," fields must be an object with field names as keys or a function which returns such an object.")),tt(t,function(n,i){var a;be(n)||O(0,"".concat(e.name,".").concat(i," field config must be an object.")),!("isDeprecated"in n)||O(0,"".concat(e.name,".").concat(i,' should provide "deprecationReason" instead of "isDeprecated".')),n.resolve==null||typeof n.resolve=="function"||O(0,"".concat(e.name,".").concat(i," field resolver must be a function if ")+"provided, but got: ".concat(_(n.resolve),"."));var o=(a=n.args)!==null&&a!==void 0?a:{};be(o)||O(0,"".concat(e.name,".").concat(i," args must be an object with argument names as keys."));var u=Ce(o).map(function(s){var c=s[0],l=s[1];return{name:c,description:l.description,type:l.type,defaultValue:l.defaultValue,deprecationReason:l.deprecationReason,extensions:l.extensions&&z(l.extensions),astNode:l.astNode}});return{name:i,description:n.description,type:n.type,args:u,resolve:n.resolve,subscribe:n.subscribe,isDeprecated:n.deprecationReason!=null,deprecationReason:n.deprecationReason,extensions:n.extensions&&z(n.extensions),astNode:n.astNode}})}function be(e){return ve(e)&&!Array.isArray(e)}function _i(e){return tt(e,function(t){return{description:t.description,type:t.type,args:Ri(t.args),resolve:t.resolve,subscribe:t.subscribe,deprecationReason:t.deprecationReason,extensions:t.extensions,astNode:t.astNode}})}function Ri(e){return Vt(e,function(t){return t.name},function(t){return{description:t.description,type:t.type,defaultValue:t.defaultValue,deprecationReason:t.deprecationReason,extensions:t.extensions,astNode:t.astNode}})}var Li=function(){function e(n){this.name=n.name,this.description=n.description,this.resolveType=n.resolveType,this.extensions=n.extensions&&z(n.extensions),this.astNode=n.astNode,this.extensionASTNodes=Te(n.extensionASTNodes),this._fields=Fi.bind(void 0,n),this._interfaces=Oi.bind(void 0,n),typeof n.name=="string"||O(0,"Must provide name."),n.resolveType==null||typeof n.resolveType=="function"||O(0,"".concat(this.name,' must provide "resolveType" as a function, ')+"but got: ".concat(_(n.resolveType),"."))}var t=e.prototype;return t.getFields=function(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields},t.getInterfaces=function(){return typeof this._interfaces=="function"&&(this._interfaces=this._interfaces()),this._interfaces},t.toConfig=function(){var i;return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:_i(this.getFields()),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:(i=this.extensionASTNodes)!==null&&i!==void 0?i:[]}},t.toString=function(){return this.name},t.toJSON=function(){return this.toString()},ke(e,[{key:Y,get:function(){return"GraphQLInterfaceType"}}]),e}();W(Li);var xi=function(){function e(n){this.name=n.name,this.description=n.description,this.resolveType=n.resolveType,this.extensions=n.extensions&&z(n.extensions),this.astNode=n.astNode,this.extensionASTNodes=Te(n.extensionASTNodes),this._types=pa.bind(void 0,n),typeof n.name=="string"||O(0,"Must provide name."),n.resolveType==null||typeof n.resolveType=="function"||O(0,"".concat(this.name,' must provide "resolveType" as a function, ')+"but got: ".concat(_(n.resolveType),"."))}var t=e.prototype;return t.getTypes=function(){return typeof this._types=="function"&&(this._types=this._types()),this._types},t.toConfig=function(){var i;return{name:this.name,description:this.description,types:this.getTypes(),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:(i=this.extensionASTNodes)!==null&&i!==void 0?i:[]}},t.toString=function(){return this.name},t.toJSON=function(){return this.toString()},ke(e,[{key:Y,get:function(){return"GraphQLUnionType"}}]),e}();W(xi);function pa(e){var t=ot(e.types);return Array.isArray(t)||O(0,"Must provide Array of types or a function which returns such an array for Union ".concat(e.name,".")),t}var st=function(){function e(n){this.name=n.name,this.description=n.description,this.extensions=n.extensions&&z(n.extensions),this.astNode=n.astNode,this.extensionASTNodes=Te(n.extensionASTNodes),this._values=va(this.name,n.values),this._valueLookup=new Map(this._values.map(function(i){return[i.value,i]})),this._nameLookup=bi(this._values,function(i){return i.name}),typeof n.name=="string"||O(0,"Must provide name.")}var t=e.prototype;return t.getValues=function(){return this._values},t.getValue=function(i){return this._nameLookup[i]},t.serialize=function(i){var a=this._valueLookup.get(i);if(a===void 0)throw new x('Enum "'.concat(this.name,'" cannot represent value: ').concat(_(i)));return a.name},t.parseValue=function(i){if(typeof i!="string"){var a=_(i);throw new x('Enum "'.concat(this.name,'" cannot represent non-string value: ').concat(a,".")+ut(this,a))}var o=this.getValue(i);if(o==null)throw new x('Value "'.concat(i,'" does not exist in "').concat(this.name,'" enum.')+ut(this,i));return o.value},t.parseLiteral=function(i,a){if(i.kind!==v.ENUM){var o=se(i);throw new x('Enum "'.concat(this.name,'" cannot represent non-enum value: ').concat(o,".")+ut(this,o),i)}var u=this.getValue(i.value);if(u==null){var s=se(i);throw new x('Value "'.concat(s,'" does not exist in "').concat(this.name,'" enum.')+ut(this,s),i)}return u.value},t.toConfig=function(){var i,a=Vt(this.getValues(),function(o){return o.name},function(o){return{description:o.description,value:o.value,deprecationReason:o.deprecationReason,extensions:o.extensions,astNode:o.astNode}});return{name:this.name,description:this.description,values:a,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:(i=this.extensionASTNodes)!==null&&i!==void 0?i:[]}},t.toString=function(){return this.name},t.toJSON=function(){return this.toString()},ke(e,[{key:Y,get:function(){return"GraphQLEnumType"}}]),e}();W(st);function ut(e,t){var n=e.getValues().map(function(a){return a.name}),i=ta(t,n);return Zr("the enum value",i)}function va(e,t){return be(t)||O(0,"".concat(e," values must be an object with value names as keys.")),Ce(t).map(function(n){var i=n[0],a=n[1];return be(a)||O(0,"".concat(e,".").concat(i,' must refer to an object with a "value" key ')+"representing an internal value but got: ".concat(_(a),".")),!("isDeprecated"in a)||O(0,"".concat(e,".").concat(i,' should provide "deprecationReason" instead of "isDeprecated".')),{name:i,description:a.description,value:a.value!==void 0?a.value:i,isDeprecated:a.deprecationReason!=null,deprecationReason:a.deprecationReason,extensions:a.extensions&&z(a.extensions),astNode:a.astNode}})}var Ui=function(){function e(n){this.name=n.name,this.description=n.description,this.extensions=n.extensions&&z(n.extensions),this.astNode=n.astNode,this.extensionASTNodes=Te(n.extensionASTNodes),this._fields=ma.bind(void 0,n),typeof n.name=="string"||O(0,"Must provide name.")}var t=e.prototype;return t.getFields=function(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields},t.toConfig=function(){var i,a=tt(this.getFields(),function(o){return{description:o.description,type:o.type,defaultValue:o.defaultValue,deprecationReason:o.deprecationReason,extensions:o.extensions,astNode:o.astNode}});return{name:this.name,description:this.description,fields:a,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:(i=this.extensionASTNodes)!==null&&i!==void 0?i:[]}},t.toString=function(){return this.name},t.toJSON=function(){return this.toString()},ke(e,[{key:Y,get:function(){return"GraphQLInputObjectType"}}]),e}();W(Ui);function ma(e){var t=ot(e.fields);return be(t)||O(0,"".concat(e.name," fields must be an object with field names as keys or a function which returns such an object.")),tt(t,function(n,i){return!("resolve"in n)||O(0,"".concat(e.name,".").concat(i," field has a resolve property, but Input Types cannot define resolvers.")),{name:i,description:n.description,type:n.type,defaultValue:n.defaultValue,deprecationReason:n.deprecationReason,extensions:n.extensions&&z(n.extensions),astNode:n.astNode}})}var ha=Array.from||function(e,t,n){if(e==null)throw new TypeError("Array.from requires an array-like object - not null or undefined");var i=e[fi];if(typeof i=="function"){for(var a=i.call(e),o=[],u,s=0;!(u=a.next()).done;++s)if(o.push(t.call(n,u.value,s)),s>9999999)throw new TypeError("Near-infinite iteration.");return o}var c=e.length;if(typeof c=="number"&&c>=0&&c%1===0){for(var l=[],y=0;y<c;++y)Object.prototype.hasOwnProperty.call(e,y)&&l.push(t.call(n,e[y],y));return l}return[]},ya=ha,ga=Number.isFinite||function(e){return typeof e=="number"&&isFinite(e)},Qe=ga;function ct(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ct=function(n){return typeof n}:ct=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ct(e)}function ka(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:function(y){return y};if(e==null||ct(e)!=="object")return null;if(Array.isArray(e))return e.map(t);var n=e[fi];if(typeof n=="function"){for(var i=n.call(e),a=[],o,u=0;!(o=i.next()).done;++u)a.push(t(o.value,u));return a}var s=e.length;if(typeof s=="number"&&s>=0&&s%1===0){for(var c=[],l=0;l<s;++l){if(!Object.prototype.hasOwnProperty.call(e,l))return null;c.push(t(e[String(l)],l))}return c}return null}var Sa=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e},lt=Sa,jt=2147483647,qt=-2147483648;function Na(e){var t=$e(e);if(typeof t=="boolean")return t?1:0;var n=t;if(typeof t=="string"&&t!==""&&(n=Number(t)),!lt(n))throw new x("Int cannot represent non-integer value: ".concat(_(t)));if(n>jt||n<qt)throw new x("Int cannot represent non 32-bit signed integer value: "+_(t));return n}function Ta(e){if(!lt(e))throw new x("Int cannot represent non-integer value: ".concat(_(e)));if(e>jt||e<qt)throw new x("Int cannot represent non 32-bit signed integer value: ".concat(e));return e}var ba=new ye({name:"Int",description:"The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.",serialize:Na,parseValue:Ta,parseLiteral:function(t){if(t.kind!==v.INT)throw new x("Int cannot represent non-integer value: ".concat(se(t)),t);var n=parseInt(t.value,10);if(n>jt||n<qt)throw new x("Int cannot represent non 32-bit signed integer value: ".concat(t.value),t);return n}});function Ea(e){var t=$e(e);if(typeof t=="boolean")return t?1:0;var n=t;if(typeof t=="string"&&t!==""&&(n=Number(t)),!Qe(n))throw new x("Float cannot represent non numeric value: ".concat(_(t)));return n}function Ia(e){if(!Qe(e))throw new x("Float cannot represent non numeric value: ".concat(_(e)));return e}var Aa=new ye({name:"Float",description:"The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point).",serialize:Ea,parseValue:Ia,parseLiteral:function(t){if(t.kind!==v.FLOAT&&t.kind!==v.INT)throw new x("Float cannot represent non numeric value: ".concat(se(t)),t);return parseFloat(t.value)}});function $e(e){if(ve(e)){if(typeof e.valueOf=="function"){var t=e.valueOf();if(!ve(t))return t}if(typeof e.toJSON=="function")return e.toJSON()}return e}function Da(e){var t=$e(e);if(typeof t=="string")return t;if(typeof t=="boolean")return t?"true":"false";if(Qe(t))return t.toString();throw new x("String cannot represent value: ".concat(_(e)))}function wa(e){if(typeof e!="string")throw new x("String cannot represent a non string value: ".concat(_(e)));return e}var B=new ye({name:"String",description:"The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.",serialize:Da,parseValue:wa,parseLiteral:function(t){if(t.kind!==v.STRING)throw new x("String cannot represent a non string value: ".concat(se(t)),t);return t.value}});function Oa(e){var t=$e(e);if(typeof t=="boolean")return t;if(Qe(t))return t!==0;throw new x("Boolean cannot represent a non boolean value: ".concat(_(t)))}function Fa(e){if(typeof e!="boolean")throw new x("Boolean cannot represent a non boolean value: ".concat(_(e)));return e}var K=new ye({name:"Boolean",description:"The `Boolean` scalar type represents `true` or `false`.",serialize:Oa,parseValue:Fa,parseLiteral:function(t){if(t.kind!==v.BOOLEAN)throw new x("Boolean cannot represent a non boolean value: ".concat(se(t)),t);return t.value}});function _a(e){var t=$e(e);if(typeof t=="string")return t;if(lt(t))return String(t);throw new x("ID cannot represent value: ".concat(_(e)))}function Ra(e){if(typeof e=="string")return e;if(lt(e))return e.toString();throw new x("ID cannot represent value: ".concat(_(e)))}var Pi=new ye({name:"ID",description:'The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"4"`) or integer (such as `4`) input value will be accepted as an ID.',serialize:_a,parseValue:Ra,parseLiteral:function(t){if(t.kind!==v.STRING&&t.kind!==v.INT)throw new x("ID cannot represent a non-string and non-integer value: "+se(t),t);return t.value}}),Vi=Object.freeze([B,ba,Aa,K,Pi]);function Je(e,t){if(Se(t)){var n=Je(e,t.ofType);return n?.kind===v.NULL?null:n}if(e===null)return{kind:v.NULL};if(e===void 0)return null;if(je(t)){var i=t.ofType,a=ka(e);if(a!=null){for(var o=[],u=0;u<a.length;u++){var s=a[u],c=Je(s,i);c!=null&&o.push(c)}return{kind:v.LIST,values:o}}return Je(e,i)}if(he(t)){if(!ve(e))return null;for(var l=[],y=0,g=me(t.getFields());y<g.length;y++){var D=g[y],k=Je(e[D.name],D.type);k&&l.push({kind:v.OBJECT_FIELD,name:{kind:v.NAME,value:D.name},value:k})}return{kind:v.OBJECT,fields:l}}if(ua(t)){var S=t.serialize(e);if(S==null)return null;if(typeof S=="boolean")return{kind:v.BOOLEAN,value:S};if(typeof S=="number"&&Qe(S)){var w=String(S);return Bi.test(w)?{kind:v.INT,value:w}:{kind:v.FLOAT,value:w}}if(typeof S=="string")return fe(t)?{kind:v.ENUM,value:S}:t===Pi&&Bi.test(S)?{kind:v.INT,value:S}:{kind:v.STRING,value:S};throw new TypeError("Cannot convert value to AST: ".concat(_(S),"."))}Me(0,"Unexpected input type: "+_(t))}var Bi=/^-?(?:0|[1-9][0-9]*)$/,Qt=new de({name:"__Schema",description:"A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.",fields:function(){return{description:{type:B,resolve:function(n){return n.description}},types:{description:"A list of all types supported by this server.",type:new I(new j(new I(ne))),resolve:function(n){return me(n.getTypeMap())}},queryType:{description:"The type that query operations will be rooted at.",type:new I(ne),resolve:function(n){return n.getQueryType()}},mutationType:{description:"If this server supports mutation, the type that mutation operations will be rooted at.",type:ne,resolve:function(n){return n.getMutationType()}},subscriptionType:{description:"If this server support subscription, the type that subscription operations will be rooted at.",type:ne,resolve:function(n){return n.getSubscriptionType()}},directives:{description:"A list of all directives supported by this server.",type:new I(new j(new I(Mi))),resolve:function(n){return n.getDirectives()}}}}}),Mi=new de({name:"__Directive",description:`A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document.
|
|
41
41
|
|
|
42
|
-
In some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.`,fields:function(){return{name:{type:new h(O),resolve:function(n){return n.name}},description:{type:O,resolve:function(n){return n.description}},isRepeatable:{type:new h(M),resolve:function(n){return n.isRepeatable}},locations:{type:new h(new D(new h(ot))),resolve:function(n){return n.locations}},args:{type:new h(new D(new h(qe))),args:{includeDeprecated:{type:M,defaultValue:!1}},resolve:function(n,i){var r=i.includeDeprecated;return r?n.args:n.args.filter(function(a){return a.deprecationReason==null})}}}}}),ot=new Ge({name:"__DirectiveLocation",description:"A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.",values:{QUERY:{value:k.QUERY,description:"Location adjacent to a query operation."},MUTATION:{value:k.MUTATION,description:"Location adjacent to a mutation operation."},SUBSCRIPTION:{value:k.SUBSCRIPTION,description:"Location adjacent to a subscription operation."},FIELD:{value:k.FIELD,description:"Location adjacent to a field."},FRAGMENT_DEFINITION:{value:k.FRAGMENT_DEFINITION,description:"Location adjacent to a fragment definition."},FRAGMENT_SPREAD:{value:k.FRAGMENT_SPREAD,description:"Location adjacent to a fragment spread."},INLINE_FRAGMENT:{value:k.INLINE_FRAGMENT,description:"Location adjacent to an inline fragment."},VARIABLE_DEFINITION:{value:k.VARIABLE_DEFINITION,description:"Location adjacent to a variable definition."},SCHEMA:{value:k.SCHEMA,description:"Location adjacent to a schema definition."},SCALAR:{value:k.SCALAR,description:"Location adjacent to a scalar definition."},OBJECT:{value:k.OBJECT,description:"Location adjacent to an object type definition."},FIELD_DEFINITION:{value:k.FIELD_DEFINITION,description:"Location adjacent to a field definition."},ARGUMENT_DEFINITION:{value:k.ARGUMENT_DEFINITION,description:"Location adjacent to an argument definition."},INTERFACE:{value:k.INTERFACE,description:"Location adjacent to an interface definition."},UNION:{value:k.UNION,description:"Location adjacent to a union definition."},ENUM:{value:k.ENUM,description:"Location adjacent to an enum definition."},ENUM_VALUE:{value:k.ENUM_VALUE,description:"Location adjacent to an enum value definition."},INPUT_OBJECT:{value:k.INPUT_OBJECT,description:"Location adjacent to an input object type definition."},INPUT_FIELD_DEFINITION:{value:k.INPUT_FIELD_DEFINITION,description:"Location adjacent to an input object field definition."}}}),j=new H({name:"__Type",description:"The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByUrl`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.",fields:function(){return{kind:{type:new h(ct),resolve:function(n){if(Ne(n))return F.SCALAR;if(q(n))return F.OBJECT;if(V(n))return F.INTERFACE;if(z(n))return F.UNION;if(X(n))return F.ENUM;if(ee(n))return F.INPUT_OBJECT;if(ke(n))return F.LIST;if(re(n))return F.NON_NULL;Te(0,'Unexpected type: "'.concat(S(n),'".'))}},name:{type:O,resolve:function(n){return n.name!==void 0?n.name:void 0}},description:{type:O,resolve:function(n){return n.description!==void 0?n.description:void 0}},specifiedByUrl:{type:O,resolve:function(n){return n.specifiedByUrl!==void 0?n.specifiedByUrl:void 0}},fields:{type:new D(new h(st)),args:{includeDeprecated:{type:M,defaultValue:!1}},resolve:function(n,i){var r=i.includeDeprecated;if(q(n)||V(n)){var a=Z(n.getFields());return r?a:a.filter(function(s){return s.deprecationReason==null})}}},interfaces:{type:new D(new h(j)),resolve:function(n){if(q(n)||V(n))return n.getInterfaces()}},possibleTypes:{type:new D(new h(j)),resolve:function(n,i,r,a){var s=a.schema;if(Si(n))return s.getPossibleTypes(n)}},enumValues:{type:new D(new h(ut)),args:{includeDeprecated:{type:M,defaultValue:!1}},resolve:function(n,i){var r=i.includeDeprecated;if(X(n)){var a=n.getValues();return r?a:a.filter(function(s){return s.deprecationReason==null})}}},inputFields:{type:new D(new h(qe)),args:{includeDeprecated:{type:M,defaultValue:!1}},resolve:function(n,i){var r=i.includeDeprecated;if(ee(n)){var a=Z(n.getFields());return r?a:a.filter(function(s){return s.deprecationReason==null})}}},ofType:{type:j,resolve:function(n){return n.ofType!==void 0?n.ofType:void 0}}}}}),st=new H({name:"__Field",description:"Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.",fields:function(){return{name:{type:new h(O),resolve:function(n){return n.name}},description:{type:O,resolve:function(n){return n.description}},args:{type:new h(new D(new h(qe))),args:{includeDeprecated:{type:M,defaultValue:!1}},resolve:function(n,i){var r=i.includeDeprecated;return r?n.args:n.args.filter(function(a){return a.deprecationReason==null})}},type:{type:new h(j),resolve:function(n){return n.type}},isDeprecated:{type:new h(M),resolve:function(n){return n.deprecationReason!=null}},deprecationReason:{type:O,resolve:function(n){return n.deprecationReason}}}}}),qe=new H({name:"__InputValue",description:"Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.",fields:function(){return{name:{type:new h(O),resolve:function(n){return n.name}},description:{type:O,resolve:function(n){return n.description}},type:{type:new h(j),resolve:function(n){return n.type}},defaultValue:{type:O,description:"A GraphQL-formatted string representing the default value for this input value.",resolve:function(n){var i=n.type,r=n.defaultValue,a=Ae(r,i);return a?$(a):null}},isDeprecated:{type:new h(M),resolve:function(n){return n.deprecationReason!=null}},deprecationReason:{type:O,resolve:function(n){return n.deprecationReason}}}}}),ut=new H({name:"__EnumValue",description:"One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.",fields:function(){return{name:{type:new h(O),resolve:function(n){return n.name}},description:{type:O,resolve:function(n){return n.description}},isDeprecated:{type:new h(M),resolve:function(n){return n.deprecationReason!=null}},deprecationReason:{type:O,resolve:function(n){return n.deprecationReason}}}}}),F=Object.freeze({SCALAR:"SCALAR",OBJECT:"OBJECT",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",INPUT_OBJECT:"INPUT_OBJECT",LIST:"LIST",NON_NULL:"NON_NULL"}),ct=new Ge({name:"__TypeKind",description:"An enum describing what kind of type a given `__Type` is.",values:{SCALAR:{value:F.SCALAR,description:"Indicates this type is a scalar."},OBJECT:{value:F.OBJECT,description:"Indicates this type is an object. `fields` and `interfaces` are valid fields."},INTERFACE:{value:F.INTERFACE,description:"Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields."},UNION:{value:F.UNION,description:"Indicates this type is a union. `possibleTypes` is a valid field."},ENUM:{value:F.ENUM,description:"Indicates this type is an enum. `enumValues` is a valid field."},INPUT_OBJECT:{value:F.INPUT_OBJECT,description:"Indicates this type is an input object. `inputFields` is a valid field."},LIST:{value:F.LIST,description:"Indicates this type is a list. `ofType` is a valid field."},NON_NULL:{value:F.NON_NULL,description:"Indicates this type is a non-null. `ofType` is a valid field."}}}),lt={name:"__schema",type:new h(gn),description:"Access the current type schema of this server.",args:[],resolve:function(t,n,i,r){var a=r.schema;return a},isDeprecated:!1,deprecationReason:void 0,extensions:void 0,astNode:void 0},ft={name:"__type",type:j,description:"Request the type information of a single type.",args:[{name:"name",description:void 0,type:new h(O),defaultValue:void 0,deprecationReason:void 0,extensions:void 0,astNode:void 0}],resolve:function(t,n,i,r){var a=n.name,s=r.schema;return s.getType(a)},isDeprecated:!1,deprecationReason:void 0,extensions:void 0,astNode:void 0},dt={name:"__typename",type:new h(O),description:"The name of the current Object type at runtime.",args:[],resolve:function(t,n,i,r){var a=r.parentType;return a.name},isDeprecated:!1,deprecationReason:void 0,extensions:void 0,astNode:void 0},pt=Object.freeze([gn,at,ot,j,st,qe,ut,ct]);function vt(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function qi(e,t,n){return t&&vt(e.prototype,t),n&&vt(e,n),e}function Ji(e){return J(e,ue)}var ue=function(){function e(n){var i,r;this.name=n.name,this.description=n.description,this.locations=n.locations,this.isRepeatable=(i=n.isRepeatable)!==null&&i!==void 0?i:!1,this.extensions=n.extensions&&x(n.extensions),this.astNode=n.astNode,n.name||g(0,"Directive must be named."),Array.isArray(n.locations)||g(0,"@".concat(n.name," locations must be an Array."));var a=(r=n.args)!==null&&r!==void 0?r:{};W(a)&&!Array.isArray(a)||g(0,"@".concat(n.name," args must be an object with argument names as keys.")),this.args=Se(a).map(function(s){var o=s[0],u=s[1];return{name:o,description:u.description,type:u.type,defaultValue:u.defaultValue,deprecationReason:u.deprecationReason,extensions:u.extensions&&x(u.extensions),astNode:u.astNode}})}var t=e.prototype;return t.toConfig=function(){return{name:this.name,description:this.description,locations:this.locations,args:Wn(this.args),isRepeatable:this.isRepeatable,extensions:this.extensions,astNode:this.astNode}},t.toString=function(){return"@"+this.name},t.toJSON=function(){return this.toString()},qi(e,[{key:U,get:function(){return"GraphQLDirective"}}]),e}();B(ue);var $i=new ue({name:"include",description:"Directs the executor to include this field or fragment only when the `if` argument is true.",locations:[k.FIELD,k.FRAGMENT_SPREAD,k.INLINE_FRAGMENT],args:{if:{type:new h(M),description:"Included when true."}}}),Yi=new ue({name:"skip",description:"Directs the executor to skip this field or fragment when the `if` argument is true.",locations:[k.FIELD,k.FRAGMENT_SPREAD,k.INLINE_FRAGMENT],args:{if:{type:new h(M),description:"Skipped when true."}}}),zi="No longer supported",Xi=new ue({name:"deprecated",description:"Marks an element of a GraphQL schema as no longer supported.",locations:[k.FIELD_DEFINITION,k.ARGUMENT_DEFINITION,k.INPUT_FIELD_DEFINITION,k.ENUM_VALUE],args:{reason:{type:O,description:"Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).",defaultValue:zi}}}),Hi=new ue({name:"specifiedBy",description:"Exposes a URL that specifies the behaviour of this scalar.",locations:[k.SCALAR],args:{url:{type:new h(O),description:"The URL that specifies the behaviour of this scalar."}}}),Ki=Object.freeze([$i,Yi,Xi,Hi]);function mt(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Wi(e,t,n){return t&&mt(e.prototype,t),n&&mt(e,n),e}(function(){function e(n){var i;this.__validationErrors=n.assumeValid===!0?[]:void 0,W(n)||g(0,"Must provide configuration object."),!n.types||Array.isArray(n.types)||g(0,'"types" must be Array if provided but got: '.concat(S(n.types),".")),!n.directives||Array.isArray(n.directives)||g(0,'"directives" must be Array if provided but got: '+"".concat(S(n.directives),".")),this.description=n.description,this.extensions=n.extensions&&x(n.extensions),this.astNode=n.astNode,this.extensionASTNodes=n.extensionASTNodes,this._queryType=n.query,this._mutationType=n.mutation,this._subscriptionType=n.subscription,this._directives=(i=n.directives)!==null&&i!==void 0?i:Ki;var r=new Set(n.types);if(n.types!=null)for(var a=0,s=n.types;a<s.length;a++){var o=s[a];r.delete(o),C(o,r)}this._queryType!=null&&C(this._queryType,r),this._mutationType!=null&&C(this._mutationType,r),this._subscriptionType!=null&&C(this._subscriptionType,r);for(var u=0,c=this._directives;u<c.length;u++){var p=c[u];if(Ji(p))for(var m=0,y=p.args;m<y.length;m++){var d=y[m];C(d.type,r)}}C(gn,r),this._typeMap=Object.create(null),this._subTypeMap=Object.create(null),this._implementationsMap=Object.create(null);for(var v=0,T=Di(r);v<T.length;v++){var E=T[v];if(E!=null){var N=E.name;if(N||g(0,"One of the provided types for building the Schema is missing a name."),this._typeMap[N]!==void 0)throw new Error('Schema must contain uniquely named types but contains multiple types named "'.concat(N,'".'));if(this._typeMap[N]=E,V(E))for(var R=0,w=E.getInterfaces();R<w.length;R++){var _=w[R];if(V(_)){var I=this._implementationsMap[_.name];I===void 0&&(I=this._implementationsMap[_.name]={objects:[],interfaces:[]}),I.interfaces.push(E)}}else if(q(E))for(var Q=0,Y=E.getInterfaces();Q<Y.length;Q++){var L=Y[Q];if(V(L)){var te=this._implementationsMap[L.name];te===void 0&&(te=this._implementationsMap[L.name]={objects:[],interfaces:[]}),te.objects.push(E)}}}}}var t=e.prototype;return t.getQueryType=function(){return this._queryType},t.getMutationType=function(){return this._mutationType},t.getSubscriptionType=function(){return this._subscriptionType},t.getTypeMap=function(){return this._typeMap},t.getType=function(i){return this.getTypeMap()[i]},t.getPossibleTypes=function(i){return z(i)?i.getTypes():this.getImplementations(i).objects},t.getImplementations=function(i){var r=this._implementationsMap[i.name];return r??{objects:[],interfaces:[]}},t.isPossibleType=function(i,r){return this.isSubType(i,r)},t.isSubType=function(i,r){var a=this._subTypeMap[i.name];if(a===void 0){if(a=Object.create(null),z(i))for(var s=0,o=i.getTypes();s<o.length;s++){var u=o[s];a[u.name]=!0}else{for(var c=this.getImplementations(i),p=0,m=c.objects;p<m.length;p++){var y=m[p];a[y.name]=!0}for(var d=0,v=c.interfaces;d<v.length;d++){var T=v[d];a[T.name]=!0}}this._subTypeMap[i.name]=a}return a[r.name]!==void 0},t.getDirectives=function(){return this._directives},t.getDirective=function(i){return Cn(this.getDirectives(),function(r){return r.name===i})},t.toConfig=function(){var i;return{description:this.description,query:this.getQueryType(),mutation:this.getMutationType(),subscription:this.getSubscriptionType(),types:Z(this.getTypeMap()),directives:this.getDirectives().slice(),extensions:this.extensions,astNode:this.astNode,extensionASTNodes:(i=this.extensionASTNodes)!==null&&i!==void 0?i:[],assumeValid:this.__validationErrors!==void 0}},Wi(e,[{key:U,get:function(){return"GraphQLSchema"}}]),e})();function C(e,t){var n=Ee(e);if(!t.has(n)){if(t.add(n),z(n))for(var i=0,r=n.getTypes();i<r.length;i++){var a=r[i];C(a,t)}else if(q(n)||V(n)){for(var s=0,o=n.getInterfaces();s<o.length;s++){var u=o[s];C(u,t)}for(var c=0,p=Z(n.getFields());c<p.length;c++){var m=p[c];C(m.type,t);for(var y=0,d=m.args;y<d.length;y++){var v=d[y];C(v.type,t)}}}else if(ee(n))for(var T=0,E=Z(n.getFields());T<E.length;T++){var N=E[T];C(N.type,t)}}return t}function Je(e,t){var n;if(t.kind===l.LIST_TYPE)return n=Je(e,t.type),n&&new D(n);if(t.kind===l.NON_NULL_TYPE)return n=Je(e,t.type),n&&new h(n);if(t.kind===l.NAMED_TYPE)return e.getType(t.name.value);Te(0,"Unexpected type node: "+S(t))}var Zi=function(){function e(n,i,r){this._schema=n,this._typeStack=[],this._parentTypeStack=[],this._inputTypeStack=[],this._fieldDefStack=[],this._defaultValueStack=[],this._directive=null,this._argument=null,this._enumValue=null,this._getFieldDef=i??er,r&&(ae(r)&&this._inputTypeStack.push(r),vn(r)&&this._parentTypeStack.push(r),Be(r)&&this._typeStack.push(r))}var t=e.prototype;return t.getType=function(){if(this._typeStack.length>0)return this._typeStack[this._typeStack.length-1]},t.getParentType=function(){if(this._parentTypeStack.length>0)return this._parentTypeStack[this._parentTypeStack.length-1]},t.getInputType=function(){if(this._inputTypeStack.length>0)return this._inputTypeStack[this._inputTypeStack.length-1]},t.getParentInputType=function(){if(this._inputTypeStack.length>1)return this._inputTypeStack[this._inputTypeStack.length-2]},t.getFieldDef=function(){if(this._fieldDefStack.length>0)return this._fieldDefStack[this._fieldDefStack.length-1]},t.getDefaultValue=function(){if(this._defaultValueStack.length>0)return this._defaultValueStack[this._defaultValueStack.length-1]},t.getDirective=function(){return this._directive},t.getArgument=function(){return this._argument},t.getEnumValue=function(){return this._enumValue},t.enter=function(i){var r=this._schema;switch(i.kind){case l.SELECTION_SET:{var a=Ee(this.getType());this._parentTypeStack.push(vn(a)?a:void 0);break}case l.FIELD:{var s=this.getParentType(),o,u;s&&(o=this._getFieldDef(r,s,i),o&&(u=o.type)),this._fieldDefStack.push(o),this._typeStack.push(Be(u)?u:void 0);break}case l.DIRECTIVE:this._directive=r.getDirective(i.name.value);break;case l.OPERATION_DEFINITION:{var c;switch(i.operation){case"query":c=r.getQueryType();break;case"mutation":c=r.getMutationType();break;case"subscription":c=r.getSubscriptionType();break}this._typeStack.push(q(c)?c:void 0);break}case l.INLINE_FRAGMENT:case l.FRAGMENT_DEFINITION:{var p=i.typeCondition,m=p?Je(r,p):Ee(this.getType());this._typeStack.push(Be(m)?m:void 0);break}case l.VARIABLE_DEFINITION:{var y=Je(r,i.type);this._inputTypeStack.push(ae(y)?y:void 0);break}case l.ARGUMENT:{var d,v,T,E=(d=this.getDirective())!==null&&d!==void 0?d:this.getFieldDef();E&&(v=Cn(E.args,function(L){return L.name===i.name.value}),v&&(T=v.type)),this._argument=v,this._defaultValueStack.push(v?v.defaultValue:void 0),this._inputTypeStack.push(ae(T)?T:void 0);break}case l.LIST:{var N=Ei(this.getInputType()),R=ke(N)?N.ofType:N;this._defaultValueStack.push(void 0),this._inputTypeStack.push(ae(R)?R:void 0);break}case l.OBJECT_FIELD:{var w=Ee(this.getInputType()),_,I;ee(w)&&(I=w.getFields()[i.name.value],I&&(_=I.type)),this._defaultValueStack.push(I?I.defaultValue:void 0),this._inputTypeStack.push(ae(_)?_:void 0);break}case l.ENUM:{var Q=Ee(this.getInputType()),Y;X(Q)&&(Y=Q.getValue(i.value)),this._enumValue=Y;break}}},t.leave=function(i){switch(i.kind){case l.SELECTION_SET:this._parentTypeStack.pop();break;case l.FIELD:this._fieldDefStack.pop(),this._typeStack.pop();break;case l.DIRECTIVE:this._directive=null;break;case l.OPERATION_DEFINITION:case l.INLINE_FRAGMENT:case l.FRAGMENT_DEFINITION:this._typeStack.pop();break;case l.VARIABLE_DEFINITION:this._inputTypeStack.pop();break;case l.ARGUMENT:this._argument=null,this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case l.LIST:case l.OBJECT_FIELD:this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case l.ENUM:this._enumValue=null;break}},e}();function er(e,t,n){var i=n.name.value;if(i===lt.name&&e.getQueryType()===t)return lt;if(i===ft.name&&e.getQueryType()===t)return ft;if(i===dt.name&&vn(t))return dt;if(q(t)||V(t))return t.getFields()[i]}function nr(e,t){return{enter:function(i){e.enter(i);var r=ln(t,i.kind,!1);if(r){var a=r.apply(t,arguments);return a!==void 0&&(e.leave(i),cn(a)&&e.enter(a)),a}},leave:function(i){var r=ln(t,i.kind,!0),a;return r&&(a=r.apply(t,arguments)),e.leave(i),a}}}[].concat(it,pt).map(function(e){return e.name});var K;function ce(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}K={},ce(K,l.SCALAR_TYPE_DEFINITION,l.SCALAR_TYPE_EXTENSION),ce(K,l.OBJECT_TYPE_DEFINITION,l.OBJECT_TYPE_EXTENSION),ce(K,l.INTERFACE_TYPE_DEFINITION,l.INTERFACE_TYPE_EXTENSION),ce(K,l.UNION_TYPE_DEFINITION,l.UNION_TYPE_EXTENSION),ce(K,l.ENUM_TYPE_DEFINITION,l.ENUM_TYPE_EXTENSION),ce(K,l.INPUT_OBJECT_TYPE_DEFINITION,l.INPUT_OBJECT_TYPE_EXTENSION);function ht(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var yt=function(){function e(n,i){this._ast=n,this._fragments=void 0,this._fragmentSpreads=new Map,this._recursivelyReferencedFragments=new Map,this._onError=i}var t=e.prototype;return t.reportError=function(i){this._onError(i)},t.getDocument=function(){return this._ast},t.getFragment=function(i){var r=this._fragments;return r||(this._fragments=r=this.getDocument().definitions.reduce(function(a,s){return s.kind===l.FRAGMENT_DEFINITION&&(a[s.name.value]=s),a},Object.create(null))),r[i]},t.getFragmentSpreads=function(i){var r=this._fragmentSpreads.get(i);if(!r){r=[];for(var a=[i];a.length!==0;)for(var s=a.pop(),o=0,u=s.selections;o<u.length;o++){var c=u[o];c.kind===l.FRAGMENT_SPREAD?r.push(c):c.selectionSet&&a.push(c.selectionSet)}this._fragmentSpreads.set(i,r)}return r},t.getRecursivelyReferencedFragments=function(i){var r=this._recursivelyReferencedFragments.get(i);if(!r){r=[];for(var a=Object.create(null),s=[i.selectionSet];s.length!==0;)for(var o=s.pop(),u=0,c=this.getFragmentSpreads(o);u<c.length;u++){var p=c[u],m=p.name.value;if(a[m]!==!0){a[m]=!0;var y=this.getFragment(m);y&&(r.push(y),s.push(y.selectionSet))}}this._recursivelyReferencedFragments.set(i,r)}return r},e}();(function(e){ht(t,e);function t(i,r,a){var s;return s=e.call(this,i,a)||this,s._schema=r,s}var n=t.prototype;return n.getSchema=function(){return this._schema},t})(yt),function(e){ht(t,e);function t(i,r,a,s){var o;return o=e.call(this,r,s)||this,o._schema=i,o._typeInfo=a,o._variableUsages=new Map,o._recursiveVariableUsages=new Map,o}var n=t.prototype;return n.getSchema=function(){return this._schema},n.getVariableUsages=function(r){var a=this._variableUsages.get(r);if(!a){var s=[],o=new Zi(this._schema);jn(r,nr(o,{VariableDefinition:function(){return!1},Variable:function(c){s.push({node:c,type:o.getInputType(),defaultValue:o.getDefaultValue()})}})),a=s,this._variableUsages.set(r,a)}return a},n.getRecursiveVariableUsages=function(r){var a=this._recursiveVariableUsages.get(r);if(!a){a=this.getVariableUsages(r);for(var s=0,o=this.getRecursivelyReferencedFragments(r);s<o.length;s++){var u=o[s];a=a.concat(this.getVariableUsages(u))}this._recursiveVariableUsages.set(r,a)}return a},n.getType=function(){return this._typeInfo.getType()},n.getParentType=function(){return this._typeInfo.getParentType()},n.getInputType=function(){return this._typeInfo.getInputType()},n.getParentInputType=function(){return this._typeInfo.getParentInputType()},n.getFieldDef=function(){return this._typeInfo.getFieldDef()},n.getDirective=function(){return this._typeInfo.getDirective()},n.getArgument=function(){return this._typeInfo.getArgument()},n.getEnumValue=function(){return this._typeInfo.getEnumValue()},t}(yt),Qn(it.concat(pt),function(e){return e.name});const tr={staging:{graphEndpoint:"https://api-staging.spritz.finance/graphql"},production:{graphEndpoint:"https://api.spritz.finance/graphql"}};class Oe extends Error{date;constructor(t,...n){super(...n),Error.captureStackTrace&&Error.captureStackTrace(this,Oe),this.name="SpritzApiError",this.message=t,this.date=new Date}}const ir=e=>Fn.create(e);class rr{client;constructor(t,n){this.client=ir({baseURL:tr[t].graphEndpoint,headers:{"Content-Type":"application/json",Authorization:"Bearer "+n}})}async query({query:t,variables:n}){try{const i=await this.client.post("",{query:$(t),variables:n,operationName:t?.definitions?.[0]?.name?.value});if(i.data.errors)throw new Oe(`Spritz GraphQL Error: ${i.data.errors[0].message}`);return i.data.data}catch(i){if(Fn.isAxiosError(i)){const r=i.response?.data.Message??i.response?.data.message;throw new Oe(`Spritz Request Error: ${r}`)}else throw new Oe(`Spritz Request Error: ${i.message}`)}}}var $e={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"PayableAccountFragment"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"PayableAccount"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"userId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"country"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"currency"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"BankAccount"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"accountNumber"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"bankAccountType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"bankAccountSubType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"holder"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"ownedByUser"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"bankAccountDetails"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"USBankAccountDetails"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"routingNumber"},arguments:[],directives:[]}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"institution"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"logo"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"country"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"currency"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:501}};$e.loc.source={body:`fragment PayableAccountFragment on PayableAccount {
|
|
42
|
+
In some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.`,fields:function(){return{name:{type:new I(B),resolve:function(n){return n.name}},description:{type:B,resolve:function(n){return n.description}},isRepeatable:{type:new I(K),resolve:function(n){return n.isRepeatable}},locations:{type:new I(new j(new I(Ci))),resolve:function(n){return n.locations}},args:{type:new I(new j(new I(ft))),args:{includeDeprecated:{type:K,defaultValue:!1}},resolve:function(n,i){var a=i.includeDeprecated;return a?n.args:n.args.filter(function(o){return o.deprecationReason==null})}}}}}),Ci=new st({name:"__DirectiveLocation",description:"A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.",values:{QUERY:{value:R.QUERY,description:"Location adjacent to a query operation."},MUTATION:{value:R.MUTATION,description:"Location adjacent to a mutation operation."},SUBSCRIPTION:{value:R.SUBSCRIPTION,description:"Location adjacent to a subscription operation."},FIELD:{value:R.FIELD,description:"Location adjacent to a field."},FRAGMENT_DEFINITION:{value:R.FRAGMENT_DEFINITION,description:"Location adjacent to a fragment definition."},FRAGMENT_SPREAD:{value:R.FRAGMENT_SPREAD,description:"Location adjacent to a fragment spread."},INLINE_FRAGMENT:{value:R.INLINE_FRAGMENT,description:"Location adjacent to an inline fragment."},VARIABLE_DEFINITION:{value:R.VARIABLE_DEFINITION,description:"Location adjacent to a variable definition."},SCHEMA:{value:R.SCHEMA,description:"Location adjacent to a schema definition."},SCALAR:{value:R.SCALAR,description:"Location adjacent to a scalar definition."},OBJECT:{value:R.OBJECT,description:"Location adjacent to an object type definition."},FIELD_DEFINITION:{value:R.FIELD_DEFINITION,description:"Location adjacent to a field definition."},ARGUMENT_DEFINITION:{value:R.ARGUMENT_DEFINITION,description:"Location adjacent to an argument definition."},INTERFACE:{value:R.INTERFACE,description:"Location adjacent to an interface definition."},UNION:{value:R.UNION,description:"Location adjacent to a union definition."},ENUM:{value:R.ENUM,description:"Location adjacent to an enum definition."},ENUM_VALUE:{value:R.ENUM_VALUE,description:"Location adjacent to an enum value definition."},INPUT_OBJECT:{value:R.INPUT_OBJECT,description:"Location adjacent to an input object type definition."},INPUT_FIELD_DEFINITION:{value:R.INPUT_FIELD_DEFINITION,description:"Location adjacent to an input object field definition."}}}),ne=new de({name:"__Type",description:"The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByUrl`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.",fields:function(){return{kind:{type:new I(qi),resolve:function(n){if(Ge(n))return $.SCALAR;if(ie(n))return $.OBJECT;if(H(n))return $.INTERFACE;if(le(n))return $.UNION;if(fe(n))return $.ENUM;if(he(n))return $.INPUT_OBJECT;if(je(n))return $.LIST;if(Se(n))return $.NON_NULL;Me(0,'Unexpected type: "'.concat(_(n),'".'))}},name:{type:B,resolve:function(n){return n.name!==void 0?n.name:void 0}},description:{type:B,resolve:function(n){return n.description!==void 0?n.description:void 0}},specifiedByUrl:{type:B,resolve:function(n){return n.specifiedByUrl!==void 0?n.specifiedByUrl:void 0}},fields:{type:new j(new I(Gi)),args:{includeDeprecated:{type:K,defaultValue:!1}},resolve:function(n,i){var a=i.includeDeprecated;if(ie(n)||H(n)){var o=me(n.getFields());return a?o:o.filter(function(u){return u.deprecationReason==null})}}},interfaces:{type:new j(new I(ne)),resolve:function(n){if(ie(n)||H(n))return n.getInterfaces()}},possibleTypes:{type:new j(new I(ne)),resolve:function(n,i,a,o){var u=o.schema;if(ca(n))return u.getPossibleTypes(n)}},enumValues:{type:new j(new I(ji)),args:{includeDeprecated:{type:K,defaultValue:!1}},resolve:function(n,i){var a=i.includeDeprecated;if(fe(n)){var o=n.getValues();return a?o:o.filter(function(u){return u.deprecationReason==null})}}},inputFields:{type:new j(new I(ft)),args:{includeDeprecated:{type:K,defaultValue:!1}},resolve:function(n,i){var a=i.includeDeprecated;if(he(n)){var o=me(n.getFields());return a?o:o.filter(function(u){return u.deprecationReason==null})}}},ofType:{type:ne,resolve:function(n){return n.ofType!==void 0?n.ofType:void 0}}}}}),Gi=new de({name:"__Field",description:"Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.",fields:function(){return{name:{type:new I(B),resolve:function(n){return n.name}},description:{type:B,resolve:function(n){return n.description}},args:{type:new I(new j(new I(ft))),args:{includeDeprecated:{type:K,defaultValue:!1}},resolve:function(n,i){var a=i.includeDeprecated;return a?n.args:n.args.filter(function(o){return o.deprecationReason==null})}},type:{type:new I(ne),resolve:function(n){return n.type}},isDeprecated:{type:new I(K),resolve:function(n){return n.deprecationReason!=null}},deprecationReason:{type:B,resolve:function(n){return n.deprecationReason}}}}}),ft=new de({name:"__InputValue",description:"Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.",fields:function(){return{name:{type:new I(B),resolve:function(n){return n.name}},description:{type:B,resolve:function(n){return n.description}},type:{type:new I(ne),resolve:function(n){return n.type}},defaultValue:{type:B,description:"A GraphQL-formatted string representing the default value for this input value.",resolve:function(n){var i=n.type,a=n.defaultValue,o=Je(a,i);return o?se(o):null}},isDeprecated:{type:new I(K),resolve:function(n){return n.deprecationReason!=null}},deprecationReason:{type:B,resolve:function(n){return n.deprecationReason}}}}}),ji=new de({name:"__EnumValue",description:"One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.",fields:function(){return{name:{type:new I(B),resolve:function(n){return n.name}},description:{type:B,resolve:function(n){return n.description}},isDeprecated:{type:new I(K),resolve:function(n){return n.deprecationReason!=null}},deprecationReason:{type:B,resolve:function(n){return n.deprecationReason}}}}}),$=Object.freeze({SCALAR:"SCALAR",OBJECT:"OBJECT",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",INPUT_OBJECT:"INPUT_OBJECT",LIST:"LIST",NON_NULL:"NON_NULL"}),qi=new st({name:"__TypeKind",description:"An enum describing what kind of type a given `__Type` is.",values:{SCALAR:{value:$.SCALAR,description:"Indicates this type is a scalar."},OBJECT:{value:$.OBJECT,description:"Indicates this type is an object. `fields` and `interfaces` are valid fields."},INTERFACE:{value:$.INTERFACE,description:"Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields."},UNION:{value:$.UNION,description:"Indicates this type is a union. `possibleTypes` is a valid field."},ENUM:{value:$.ENUM,description:"Indicates this type is an enum. `enumValues` is a valid field."},INPUT_OBJECT:{value:$.INPUT_OBJECT,description:"Indicates this type is an input object. `inputFields` is a valid field."},LIST:{value:$.LIST,description:"Indicates this type is a list. `ofType` is a valid field."},NON_NULL:{value:$.NON_NULL,description:"Indicates this type is a non-null. `ofType` is a valid field."}}}),Qi={name:"__schema",type:new I(Qt),description:"Access the current type schema of this server.",args:[],resolve:function(t,n,i,a){var o=a.schema;return o},isDeprecated:!1,deprecationReason:void 0,extensions:void 0,astNode:void 0},$i={name:"__type",type:ne,description:"Request the type information of a single type.",args:[{name:"name",description:void 0,type:new I(B),defaultValue:void 0,deprecationReason:void 0,extensions:void 0,astNode:void 0}],resolve:function(t,n,i,a){var o=n.name,u=a.schema;return u.getType(o)},isDeprecated:!1,deprecationReason:void 0,extensions:void 0,astNode:void 0},Ji={name:"__typename",type:new I(B),description:"The name of the current Object type at runtime.",args:[],resolve:function(t,n,i,a){var o=a.parentType;return o.name},isDeprecated:!1,deprecationReason:void 0,extensions:void 0,astNode:void 0},zi=Object.freeze([Qt,Mi,Ci,ne,Gi,ft,ji,qi]);function Yi(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function La(e,t,n){return t&&Yi(e.prototype,t),n&&Yi(e,n),e}function xa(e){return oe(e,Ee)}var Ee=function(){function e(n){var i,a;this.name=n.name,this.description=n.description,this.locations=n.locations,this.isRepeatable=(i=n.isRepeatable)!==null&&i!==void 0?i:!1,this.extensions=n.extensions&&z(n.extensions),this.astNode=n.astNode,n.name||O(0,"Directive must be named."),Array.isArray(n.locations)||O(0,"@".concat(n.name," locations must be an Array."));var o=(a=n.args)!==null&&a!==void 0?a:{};ve(o)&&!Array.isArray(o)||O(0,"@".concat(n.name," args must be an object with argument names as keys.")),this.args=Ce(o).map(function(u){var s=u[0],c=u[1];return{name:s,description:c.description,type:c.type,defaultValue:c.defaultValue,deprecationReason:c.deprecationReason,extensions:c.extensions&&z(c.extensions),astNode:c.astNode}})}var t=e.prototype;return t.toConfig=function(){return{name:this.name,description:this.description,locations:this.locations,args:Ri(this.args),isRepeatable:this.isRepeatable,extensions:this.extensions,astNode:this.astNode}},t.toString=function(){return"@"+this.name},t.toJSON=function(){return this.toString()},La(e,[{key:Y,get:function(){return"GraphQLDirective"}}]),e}();W(Ee);var Ua=new Ee({name:"include",description:"Directs the executor to include this field or fragment only when the `if` argument is true.",locations:[R.FIELD,R.FRAGMENT_SPREAD,R.INLINE_FRAGMENT],args:{if:{type:new I(K),description:"Included when true."}}}),Pa=new Ee({name:"skip",description:"Directs the executor to skip this field or fragment when the `if` argument is true.",locations:[R.FIELD,R.FRAGMENT_SPREAD,R.INLINE_FRAGMENT],args:{if:{type:new I(K),description:"Skipped when true."}}}),Va="No longer supported",Ba=new Ee({name:"deprecated",description:"Marks an element of a GraphQL schema as no longer supported.",locations:[R.FIELD_DEFINITION,R.ARGUMENT_DEFINITION,R.INPUT_FIELD_DEFINITION,R.ENUM_VALUE],args:{reason:{type:B,description:"Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).",defaultValue:Va}}}),Ma=new Ee({name:"specifiedBy",description:"Exposes a URL that specifies the behaviour of this scalar.",locations:[R.SCALAR],args:{url:{type:new I(B),description:"The URL that specifies the behaviour of this scalar."}}}),Ca=Object.freeze([Ua,Pa,Ba,Ma]);function Hi(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Ga(e,t,n){return t&&Hi(e.prototype,t),n&&Hi(e,n),e}(function(){function e(n){var i;this.__validationErrors=n.assumeValid===!0?[]:void 0,ve(n)||O(0,"Must provide configuration object."),!n.types||Array.isArray(n.types)||O(0,'"types" must be Array if provided but got: '.concat(_(n.types),".")),!n.directives||Array.isArray(n.directives)||O(0,'"directives" must be Array if provided but got: '+"".concat(_(n.directives),".")),this.description=n.description,this.extensions=n.extensions&&z(n.extensions),this.astNode=n.astNode,this.extensionASTNodes=n.extensionASTNodes,this._queryType=n.query,this._mutationType=n.mutation,this._subscriptionType=n.subscription,this._directives=(i=n.directives)!==null&&i!==void 0?i:Ca;var a=new Set(n.types);if(n.types!=null)for(var o=0,u=n.types;o<u.length;o++){var s=u[o];a.delete(s),te(s,a)}this._queryType!=null&&te(this._queryType,a),this._mutationType!=null&&te(this._mutationType,a),this._subscriptionType!=null&&te(this._subscriptionType,a);for(var c=0,l=this._directives;c<l.length;c++){var y=l[c];if(xa(y))for(var g=0,D=y.args;g<D.length;g++){var k=D[g];te(k.type,a)}}te(Qt,a),this._typeMap=Object.create(null),this._subTypeMap=Object.create(null),this._implementationsMap=Object.create(null);for(var S=0,w=ya(a);S<w.length;S++){var A=w[S];if(A!=null){var F=A.name;if(F||O(0,"One of the provided types for building the Schema is missing a name."),this._typeMap[F]!==void 0)throw new Error('Schema must contain uniquely named types but contains multiple types named "'.concat(F,'".'));if(this._typeMap[F]=A,H(A))for(var Q=0,V=A.getInterfaces();Q<V.length;Q++){var G=V[Q];if(H(G)){var L=this._implementationsMap[G.name];L===void 0&&(L=this._implementationsMap[G.name]={objects:[],interfaces:[]}),L.interfaces.push(A)}}else if(ie(A))for(var J=0,X=A.getInterfaces();J<X.length;J++){var q=X[J];if(H(q)){var re=this._implementationsMap[q.name];re===void 0&&(re=this._implementationsMap[q.name]={objects:[],interfaces:[]}),re.objects.push(A)}}}}}var t=e.prototype;return t.getQueryType=function(){return this._queryType},t.getMutationType=function(){return this._mutationType},t.getSubscriptionType=function(){return this._subscriptionType},t.getTypeMap=function(){return this._typeMap},t.getType=function(i){return this.getTypeMap()[i]},t.getPossibleTypes=function(i){return le(i)?i.getTypes():this.getImplementations(i).objects},t.getImplementations=function(i){var a=this._implementationsMap[i.name];return a??{objects:[],interfaces:[]}},t.isPossibleType=function(i,a){return this.isSubType(i,a)},t.isSubType=function(i,a){var o=this._subTypeMap[i.name];if(o===void 0){if(o=Object.create(null),le(i))for(var u=0,s=i.getTypes();u<s.length;u++){var c=s[u];o[c.name]=!0}else{for(var l=this.getImplementations(i),y=0,g=l.objects;y<g.length;y++){var D=g[y];o[D.name]=!0}for(var k=0,S=l.interfaces;k<S.length;k++){var w=S[k];o[w.name]=!0}}this._subTypeMap[i.name]=o}return o[a.name]!==void 0},t.getDirectives=function(){return this._directives},t.getDirective=function(i){return Ti(this.getDirectives(),function(a){return a.name===i})},t.toConfig=function(){var i;return{description:this.description,query:this.getQueryType(),mutation:this.getMutationType(),subscription:this.getSubscriptionType(),types:me(this.getTypeMap()),directives:this.getDirectives().slice(),extensions:this.extensions,astNode:this.astNode,extensionASTNodes:(i=this.extensionASTNodes)!==null&&i!==void 0?i:[],assumeValid:this.__validationErrors!==void 0}},Ga(e,[{key:Y,get:function(){return"GraphQLSchema"}}]),e})();function te(e,t){var n=qe(e);if(!t.has(n)){if(t.add(n),le(n))for(var i=0,a=n.getTypes();i<a.length;i++){var o=a[i];te(o,t)}else if(ie(n)||H(n)){for(var u=0,s=n.getInterfaces();u<s.length;u++){var c=s[u];te(c,t)}for(var l=0,y=me(n.getFields());l<y.length;l++){var g=y[l];te(g.type,t);for(var D=0,k=g.args;D<k.length;D++){var S=k[D];te(S.type,t)}}}else if(he(n))for(var w=0,A=me(n.getFields());w<A.length;w++){var F=A[w];te(F.type,t)}}return t}function dt(e,t){var n;if(t.kind===v.LIST_TYPE)return n=dt(e,t.type),n&&new j(n);if(t.kind===v.NON_NULL_TYPE)return n=dt(e,t.type),n&&new I(n);if(t.kind===v.NAMED_TYPE)return e.getType(t.name.value);Me(0,"Unexpected type node: "+_(t))}var ja=function(){function e(n,i,a){this._schema=n,this._typeStack=[],this._parentTypeStack=[],this._inputTypeStack=[],this._fieldDefStack=[],this._defaultValueStack=[],this._directive=null,this._argument=null,this._enumValue=null,this._getFieldDef=i??qa,a&&(Ne(a)&&this._inputTypeStack.push(a),Ct(a)&&this._parentTypeStack.push(a),at(a)&&this._typeStack.push(a))}var t=e.prototype;return t.getType=function(){if(this._typeStack.length>0)return this._typeStack[this._typeStack.length-1]},t.getParentType=function(){if(this._parentTypeStack.length>0)return this._parentTypeStack[this._parentTypeStack.length-1]},t.getInputType=function(){if(this._inputTypeStack.length>0)return this._inputTypeStack[this._inputTypeStack.length-1]},t.getParentInputType=function(){if(this._inputTypeStack.length>1)return this._inputTypeStack[this._inputTypeStack.length-2]},t.getFieldDef=function(){if(this._fieldDefStack.length>0)return this._fieldDefStack[this._fieldDefStack.length-1]},t.getDefaultValue=function(){if(this._defaultValueStack.length>0)return this._defaultValueStack[this._defaultValueStack.length-1]},t.getDirective=function(){return this._directive},t.getArgument=function(){return this._argument},t.getEnumValue=function(){return this._enumValue},t.enter=function(i){var a=this._schema;switch(i.kind){case v.SELECTION_SET:{var o=qe(this.getType());this._parentTypeStack.push(Ct(o)?o:void 0);break}case v.FIELD:{var u=this.getParentType(),s,c;u&&(s=this._getFieldDef(a,u,i),s&&(c=s.type)),this._fieldDefStack.push(s),this._typeStack.push(at(c)?c:void 0);break}case v.DIRECTIVE:this._directive=a.getDirective(i.name.value);break;case v.OPERATION_DEFINITION:{var l;switch(i.operation){case"query":l=a.getQueryType();break;case"mutation":l=a.getMutationType();break;case"subscription":l=a.getSubscriptionType();break}this._typeStack.push(ie(l)?l:void 0);break}case v.INLINE_FRAGMENT:case v.FRAGMENT_DEFINITION:{var y=i.typeCondition,g=y?dt(a,y):qe(this.getType());this._typeStack.push(at(g)?g:void 0);break}case v.VARIABLE_DEFINITION:{var D=dt(a,i.type);this._inputTypeStack.push(Ne(D)?D:void 0);break}case v.ARGUMENT:{var k,S,w,A=(k=this.getDirective())!==null&&k!==void 0?k:this.getFieldDef();A&&(S=Ti(A.args,function(q){return q.name===i.name.value}),S&&(w=S.type)),this._argument=S,this._defaultValueStack.push(S?S.defaultValue:void 0),this._inputTypeStack.push(Ne(w)?w:void 0);break}case v.LIST:{var F=da(this.getInputType()),Q=je(F)?F.ofType:F;this._defaultValueStack.push(void 0),this._inputTypeStack.push(Ne(Q)?Q:void 0);break}case v.OBJECT_FIELD:{var V=qe(this.getInputType()),G,L;he(V)&&(L=V.getFields()[i.name.value],L&&(G=L.type)),this._defaultValueStack.push(L?L.defaultValue:void 0),this._inputTypeStack.push(Ne(G)?G:void 0);break}case v.ENUM:{var J=qe(this.getInputType()),X;fe(J)&&(X=J.getValue(i.value)),this._enumValue=X;break}}},t.leave=function(i){switch(i.kind){case v.SELECTION_SET:this._parentTypeStack.pop();break;case v.FIELD:this._fieldDefStack.pop(),this._typeStack.pop();break;case v.DIRECTIVE:this._directive=null;break;case v.OPERATION_DEFINITION:case v.INLINE_FRAGMENT:case v.FRAGMENT_DEFINITION:this._typeStack.pop();break;case v.VARIABLE_DEFINITION:this._inputTypeStack.pop();break;case v.ARGUMENT:this._argument=null,this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case v.LIST:case v.OBJECT_FIELD:this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case v.ENUM:this._enumValue=null;break}},e}();function qa(e,t,n){var i=n.name.value;if(i===Qi.name&&e.getQueryType()===t)return Qi;if(i===$i.name&&e.getQueryType()===t)return $i;if(i===Ji.name&&Ct(t))return Ji;if(ie(t)||H(t))return t.getFields()[i]}function Qa(e,t){return{enter:function(i){e.enter(i);var a=Pt(t,i.kind,!1);if(a){var o=a.apply(t,arguments);return o!==void 0&&(e.leave(i),Ut(o)&&e.enter(o)),o}},leave:function(i){var a=Pt(t,i.kind,!0),o;return a&&(o=a.apply(t,arguments)),e.leave(i),o}}}[].concat(Vi,zi).map(function(e){return e.name});var pe;function Ie(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}pe={},Ie(pe,v.SCALAR_TYPE_DEFINITION,v.SCALAR_TYPE_EXTENSION),Ie(pe,v.OBJECT_TYPE_DEFINITION,v.OBJECT_TYPE_EXTENSION),Ie(pe,v.INTERFACE_TYPE_DEFINITION,v.INTERFACE_TYPE_EXTENSION),Ie(pe,v.UNION_TYPE_DEFINITION,v.UNION_TYPE_EXTENSION),Ie(pe,v.ENUM_TYPE_DEFINITION,v.ENUM_TYPE_EXTENSION),Ie(pe,v.INPUT_OBJECT_TYPE_DEFINITION,v.INPUT_OBJECT_TYPE_EXTENSION);function Ki(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var Xi=function(){function e(n,i){this._ast=n,this._fragments=void 0,this._fragmentSpreads=new Map,this._recursivelyReferencedFragments=new Map,this._onError=i}var t=e.prototype;return t.reportError=function(i){this._onError(i)},t.getDocument=function(){return this._ast},t.getFragment=function(i){var a=this._fragments;return a||(this._fragments=a=this.getDocument().definitions.reduce(function(o,u){return u.kind===v.FRAGMENT_DEFINITION&&(o[u.name.value]=u),o},Object.create(null))),a[i]},t.getFragmentSpreads=function(i){var a=this._fragmentSpreads.get(i);if(!a){a=[];for(var o=[i];o.length!==0;)for(var u=o.pop(),s=0,c=u.selections;s<c.length;s++){var l=c[s];l.kind===v.FRAGMENT_SPREAD?a.push(l):l.selectionSet&&o.push(l.selectionSet)}this._fragmentSpreads.set(i,a)}return a},t.getRecursivelyReferencedFragments=function(i){var a=this._recursivelyReferencedFragments.get(i);if(!a){a=[];for(var o=Object.create(null),u=[i.selectionSet];u.length!==0;)for(var s=u.pop(),c=0,l=this.getFragmentSpreads(s);c<l.length;c++){var y=l[c],g=y.name.value;if(o[g]!==!0){o[g]=!0;var D=this.getFragment(g);D&&(a.push(D),u.push(D.selectionSet))}}this._recursivelyReferencedFragments.set(i,a)}return a},e}();(function(e){Ki(t,e);function t(i,a,o){var u;return u=e.call(this,i,o)||this,u._schema=a,u}var n=t.prototype;return n.getSchema=function(){return this._schema},t})(Xi),function(e){Ki(t,e);function t(i,a,o,u){var s;return s=e.call(this,a,u)||this,s._schema=i,s._typeInfo=o,s._variableUsages=new Map,s._recursiveVariableUsages=new Map,s}var n=t.prototype;return n.getSchema=function(){return this._schema},n.getVariableUsages=function(a){var o=this._variableUsages.get(a);if(!o){var u=[],s=new ja(this._schema);Ni(a,Qa(s,{VariableDefinition:function(){return!1},Variable:function(l){u.push({node:l,type:s.getInputType(),defaultValue:s.getDefaultValue()})}})),o=u,this._variableUsages.set(a,o)}return o},n.getRecursiveVariableUsages=function(a){var o=this._recursiveVariableUsages.get(a);if(!o){o=this.getVariableUsages(a);for(var u=0,s=this.getRecursivelyReferencedFragments(a);u<s.length;u++){var c=s[u];o=o.concat(this.getVariableUsages(c))}this._recursiveVariableUsages.set(a,o)}return o},n.getType=function(){return this._typeInfo.getType()},n.getParentType=function(){return this._typeInfo.getParentType()},n.getInputType=function(){return this._typeInfo.getInputType()},n.getParentInputType=function(){return this._typeInfo.getParentInputType()},n.getFieldDef=function(){return this._typeInfo.getFieldDef()},n.getDirective=function(){return this._typeInfo.getDirective()},n.getArgument=function(){return this._typeInfo.getArgument()},n.getEnumValue=function(){return this._typeInfo.getEnumValue()},t}(Xi),bi(Vi.concat(zi),function(e){return e.name});const $a={staging:{graphEndpoint:"https://api-staging.spritz.finance/graphql"},production:{graphEndpoint:"https://api.spritz.finance/graphql"}};class ze extends Error{date;constructor(t,...n){super(...n),Error.captureStackTrace&&Error.captureStackTrace(this,ze),this.name="SpritzApiError",this.message=t,this.date=new Date}}const Ja=e=>ci.create(e);class za{client;constructor(t,n){this.client=Ja({baseURL:$a[t].graphEndpoint,headers:{"Content-Type":"application/json",Authorization:"Bearer "+n}})}async query({query:t,variables:n}){try{const i=await this.client.post("",{query:se(t),variables:n,operationName:t?.definitions?.[0]?.name?.value});if(i.data.errors)throw new ze(`Spritz GraphQL Error: ${i.data.errors[0].message}`);return i.data.data}catch(i){if(ci.isAxiosError(i)){const a=i.response?.data.Message??i.response?.data.message;throw new ze(`Spritz Request Error: ${a}`)}else throw new ze(`Spritz Request Error: ${i.message}`)}}}var pt={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"PayableAccountFragment"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"PayableAccount"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"userId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"country"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"currency"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"BankAccount"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"accountNumber"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"bankAccountType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"bankAccountSubType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"holder"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"ownedByUser"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"bankAccountDetails"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"USBankAccountDetails"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"routingNumber"},arguments:[],directives:[]}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"institution"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"logo"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"country"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"currency"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:501}};pt.loc.source={body:`fragment PayableAccountFragment on PayableAccount {
|
|
43
43
|
id
|
|
44
44
|
name
|
|
45
45
|
userId
|
|
@@ -68,14 +68,14 @@ In some cases, you need to provide options to alter GraphQL's execution behavior
|
|
|
68
68
|
currency
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
|
-
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function
|
|
71
|
+
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function vt(e,t){if(e.kind==="FragmentSpread")t.add(e.name.value);else if(e.kind==="VariableDefinition"){var n=e.type;n.kind==="NamedType"&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(i){vt(i,t)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(i){vt(i,t)}),e.definitions&&e.definitions.forEach(function(i){vt(i,t)})}var $t={};(function(){pt.definitions.forEach(function(t){if(t.name){var n=new Set;vt(t,n),$t[t.name.value]=n}})})();function Wi(e,t){for(var n=0;n<e.definitions.length;n++){var i=e.definitions[n];if(i.name&&i.name.value==t)return i}}function Ya(e,t){var n={kind:e.kind,definitions:[Wi(e,t)]};e.hasOwnProperty("loc")&&(n.loc=e.loc);var i=$t[t]||new Set,a=new Set,o=new Set;for(i.forEach(function(s){o.add(s)});o.size>0;){var u=o;o=new Set,u.forEach(function(s){if(!a.has(s)){a.add(s);var c=$t[s]||new Set;c.forEach(function(l){o.add(l)})}})}return a.forEach(function(s){var c=Wi(e,s);c&&n.definitions.push(c)}),n}Ya(pt,"PayableAccountFragment");var Ae={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateUSBankAccount"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"createUSAccountInput"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"USBankAccountInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createUSBankAccount"},arguments:[{kind:"Argument",name:{kind:"Name",value:"createUSAccountInput"},value:{kind:"Variable",name:{kind:"Name",value:"createUSAccountInput"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"PayableAccountFragment"},directives:[]}]}}]}}],loc:{start:0,end:241}};Ae.loc.source={body:`#import "../queries/payableAccountFragment.graphql"
|
|
72
72
|
|
|
73
73
|
mutation CreateUSBankAccount($createUSAccountInput: USBankAccountInput!) {
|
|
74
74
|
createUSBankAccount(createUSAccountInput: $createUSAccountInput) {
|
|
75
75
|
...PayableAccountFragment
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
|
-
`,name:"GraphQL request",locationOffset:{line:1,column:1}};var
|
|
78
|
+
`,name:"GraphQL request",locationOffset:{line:1,column:1}};var Zi={};function Ha(e){return e.filter(function(t){if(t.kind!=="FragmentDefinition")return!0;var n=t.name.value;return Zi[n]?!1:(Zi[n]=!0,!0)})}Ae.definitions=Ae.definitions.concat(Ha(pt.definitions));function mt(e,t){if(e.kind==="FragmentSpread")t.add(e.name.value);else if(e.kind==="VariableDefinition"){var n=e.type;n.kind==="NamedType"&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(i){mt(i,t)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(i){mt(i,t)}),e.definitions&&e.definitions.forEach(function(i){mt(i,t)})}var Jt={};(function(){Ae.definitions.forEach(function(t){if(t.name){var n=new Set;mt(t,n),Jt[t.name.value]=n}})})();function er(e,t){for(var n=0;n<e.definitions.length;n++){var i=e.definitions[n];if(i.name&&i.name.value==t)return i}}function Ka(e,t){var n={kind:e.kind,definitions:[er(e,t)]};e.hasOwnProperty("loc")&&(n.loc=e.loc);var i=Jt[t]||new Set,a=new Set,o=new Set;for(i.forEach(function(s){o.add(s)});o.size>0;){var u=o;o=new Set,u.forEach(function(s){if(!a.has(s)){a.add(s);var c=Jt[s]||new Set;c.forEach(function(l){o.add(l)})}})}return a.forEach(function(s){var c=er(e,s);c&&n.definitions.push(c)}),n}Ka(Ae,"CreateUSBankAccount");var De={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"BankAccountFragment"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"BankAccount"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"userId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"country"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"currency"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"type"},arguments:[],directives:[]},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"BankAccount"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"accountNumber"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"bankAccountType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"bankAccountSubType"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"holder"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"ownedByUser"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"bankAccountDetails"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"USBankAccountDetails"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"routingNumber"},arguments:[],directives:[]}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"institution"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"logo"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"country"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"currency"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:495}};De.loc.source={body:`fragment BankAccountFragment on BankAccount {
|
|
79
79
|
id
|
|
80
80
|
name
|
|
81
81
|
userId
|
|
@@ -104,28 +104,75 @@ mutation CreateUSBankAccount($createUSAccountInput: USBankAccountInput!) {
|
|
|
104
104
|
currency
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
|
-
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function
|
|
107
|
+
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function ht(e,t){if(e.kind==="FragmentSpread")t.add(e.name.value);else if(e.kind==="VariableDefinition"){var n=e.type;n.kind==="NamedType"&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(i){ht(i,t)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(i){ht(i,t)}),e.definitions&&e.definitions.forEach(function(i){ht(i,t)})}var zt={};(function(){De.definitions.forEach(function(t){if(t.name){var n=new Set;ht(t,n),zt[t.name.value]=n}})})();function nr(e,t){for(var n=0;n<e.definitions.length;n++){var i=e.definitions[n];if(i.name&&i.name.value==t)return i}}function Xa(e,t){var n={kind:e.kind,definitions:[nr(e,t)]};e.hasOwnProperty("loc")&&(n.loc=e.loc);var i=zt[t]||new Set,a=new Set,o=new Set;for(i.forEach(function(s){o.add(s)});o.size>0;){var u=o;o=new Set,u.forEach(function(s){if(!a.has(s)){a.add(s);var c=zt[s]||new Set;c.forEach(function(l){o.add(l)})}})}return a.forEach(function(s){var c=nr(e,s);c&&n.definitions.push(c)}),n}Xa(De,"BankAccountFragment");var we={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"RenameBankAccount"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accountId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"renamePayableAccount"},arguments:[{kind:"Argument",name:{kind:"Name",value:"accountId"},value:{kind:"Variable",name:{kind:"Name",value:"accountId"}}},{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"BankAccountFragment"},directives:[]}]}}]}}],loc:{start:0,end:218}};we.loc.source={body:`#import "../queries/bankAccountFragment.graphql"
|
|
108
108
|
|
|
109
109
|
mutation RenameBankAccount($accountId: String!, $name: String!) {
|
|
110
110
|
renamePayableAccount(accountId: $accountId, name: $name) {
|
|
111
111
|
...BankAccountFragment
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
|
-
`,name:"GraphQL request",locationOffset:{line:1,column:1}};var
|
|
114
|
+
`,name:"GraphQL request",locationOffset:{line:1,column:1}};var tr={};function Wa(e){return e.filter(function(t){if(t.kind!=="FragmentDefinition")return!0;var n=t.name.value;return tr[n]?!1:(tr[n]=!0,!0)})}we.definitions=we.definitions.concat(Wa(De.definitions));function yt(e,t){if(e.kind==="FragmentSpread")t.add(e.name.value);else if(e.kind==="VariableDefinition"){var n=e.type;n.kind==="NamedType"&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(i){yt(i,t)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(i){yt(i,t)}),e.definitions&&e.definitions.forEach(function(i){yt(i,t)})}var Yt={};(function(){we.definitions.forEach(function(t){if(t.name){var n=new Set;yt(t,n),Yt[t.name.value]=n}})})();function ir(e,t){for(var n=0;n<e.definitions.length;n++){var i=e.definitions[n];if(i.name&&i.name.value==t)return i}}function Za(e,t){var n={kind:e.kind,definitions:[ir(e,t)]};e.hasOwnProperty("loc")&&(n.loc=e.loc);var i=Yt[t]||new Set,a=new Set,o=new Set;for(i.forEach(function(s){o.add(s)});o.size>0;){var u=o;o=new Set,u.forEach(function(s){if(!a.has(s)){a.add(s);var c=Yt[s]||new Set;c.forEach(function(l){o.add(l)})}})}return a.forEach(function(s){var c=ir(e,s);c&&n.definitions.push(c)}),n}Za(we,"RenameBankAccount");var Oe={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteBankAccount"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accountId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deletePayableAccount"},arguments:[{kind:"Argument",name:{kind:"Name",value:"accountId"},value:{kind:"Variable",name:{kind:"Name",value:"accountId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"BankAccountFragment"},directives:[]}]}}]}}],loc:{start:0,end:189}};Oe.loc.source={body:`#import "../queries/bankAccountFragment.graphql"
|
|
115
115
|
|
|
116
116
|
mutation DeleteBankAccount($accountId: String!) {
|
|
117
117
|
deletePayableAccount(accountId: $accountId) {
|
|
118
118
|
...BankAccountFragment
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
|
-
`,name:"GraphQL request",locationOffset:{line:1,column:1}};var
|
|
121
|
+
`,name:"GraphQL request",locationOffset:{line:1,column:1}};var rr={};function eo(e){return e.filter(function(t){if(t.kind!=="FragmentDefinition")return!0;var n=t.name.value;return rr[n]?!1:(rr[n]=!0,!0)})}Oe.definitions=Oe.definitions.concat(eo(De.definitions));function gt(e,t){if(e.kind==="FragmentSpread")t.add(e.name.value);else if(e.kind==="VariableDefinition"){var n=e.type;n.kind==="NamedType"&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(i){gt(i,t)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(i){gt(i,t)}),e.definitions&&e.definitions.forEach(function(i){gt(i,t)})}var Ht={};(function(){Oe.definitions.forEach(function(t){if(t.name){var n=new Set;gt(t,n),Ht[t.name.value]=n}})})();function ar(e,t){for(var n=0;n<e.definitions.length;n++){var i=e.definitions[n];if(i.name&&i.name.value==t)return i}}function no(e,t){var n={kind:e.kind,definitions:[ar(e,t)]};e.hasOwnProperty("loc")&&(n.loc=e.loc);var i=Ht[t]||new Set,a=new Set,o=new Set;for(i.forEach(function(s){o.add(s)});o.size>0;){var u=o;o=new Set,u.forEach(function(s){if(!a.has(s)){a.add(s);var c=Ht[s]||new Set;c.forEach(function(l){o.add(l)})}})}return a.forEach(function(s){var c=ar(e,s);c&&n.definitions.push(c)}),n}no(Oe,"DeleteBankAccount");var Fe={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"UserBankAccounts"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"userBankAccounts"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"BankAccountFragment"},directives:[]}]}}]}}],loc:{start:0,end:128}};Fe.loc.source={body:`#import "./bankAccountFragment.graphql"
|
|
122
122
|
|
|
123
123
|
query UserBankAccounts {
|
|
124
124
|
userBankAccounts {
|
|
125
125
|
...BankAccountFragment
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
|
-
`,name:"GraphQL request",locationOffset:{line:1,column:1}};var
|
|
128
|
+
`,name:"GraphQL request",locationOffset:{line:1,column:1}};var or={};function to(e){return e.filter(function(t){if(t.kind!=="FragmentDefinition")return!0;var n=t.name.value;return or[n]?!1:(or[n]=!0,!0)})}Fe.definitions=Fe.definitions.concat(to(De.definitions));function kt(e,t){if(e.kind==="FragmentSpread")t.add(e.name.value);else if(e.kind==="VariableDefinition"){var n=e.type;n.kind==="NamedType"&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(i){kt(i,t)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(i){kt(i,t)}),e.definitions&&e.definitions.forEach(function(i){kt(i,t)})}var Kt={};(function(){Fe.definitions.forEach(function(t){if(t.name){var n=new Set;kt(t,n),Kt[t.name.value]=n}})})();function sr(e,t){for(var n=0;n<e.definitions.length;n++){var i=e.definitions[n];if(i.name&&i.name.value==t)return i}}function io(e,t){var n={kind:e.kind,definitions:[sr(e,t)]};e.hasOwnProperty("loc")&&(n.loc=e.loc);var i=Kt[t]||new Set,a=new Set,o=new Set;for(i.forEach(function(s){o.add(s)});o.size>0;){var u=o;o=new Set,u.forEach(function(s){if(!a.has(s)){a.add(s);var c=Kt[s]||new Set;c.forEach(function(l){o.add(l)})}})}return a.forEach(function(s){var c=sr(e,s);c&&n.definitions.push(c)}),n}io(Fe,"UserBankAccounts");var Xt=(e=>(e.CHECKBOOK="CHECKBOOK",e.METHOD_FI="METHOD_FI",e))(Xt||{}),ur=(e=>(e.Business="Business",e.Checking="Checking",e.Savings="Savings",e))(ur||{}),Wt=(e=>(e.USBankAccount="USBankAccount",e))(Wt||{}),cr=(e=>(e.COMPLETED="COMPLETED",e.CONFIRMED="CONFIRMED",e.CREATED="CREATED",e.FAILED="FAILED",e.PENDING="PENDING",e.REFUNDED="REFUNDED",e.TRANSACTION_FAILED="TRANSACTION_FAILED",e.TRANSACTION_PENDING="TRANSACTION_PENDING",e))(cr||{}),lr=(e=>(e.ACTIVE="ACTIVE",e.FAILED="FAILED",e.INITIALIZED="INITIALIZED",e.LOADING="LOADING",e.UNAVAILABLE="UNAVAILABLE",e.UNINITIALIZED="UNINITIALIZED",e))(lr||{}),fr=(e=>(e.BankAccount="BankAccount",e.Bill="Bill",e.DebitCard="DebitCard",e))(fr||{});const ro={[Wt.USBankAccount]:e=>({query:Ae,variables:{createUSAccountInput:e},response:"createUSBankAccount"})},ao=(e,t)=>ro[e]?.(t)??null;class oo{client;constructor(t){this.client=t}async list(){return(await this.client.query({query:Fe}))?.userBankAccounts??null}async rename(t,n){return(await this.client.query({query:we,variables:{accountId:t,name:n}}))?.renamePayableAccount??null}async delete(t){return(await this.client.query({query:Oe,variables:{accountId:t}}))?.deletePayableAccount??null}async create(t,n){const i=ao(t,n);if(!i)throw new Error("Invalid bank account type");return(await this.client.query({query:i.query,variables:i.variables}))?.[i.response]??null}}var St={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"PaymentRequestFragment"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"DirectPayment"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"userId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"accountId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"amount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"network"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]}]}}],loc:{start:0,end:133}};St.loc.source={body:`fragment PaymentRequestFragment on DirectPayment {
|
|
129
|
+
id
|
|
130
|
+
userId
|
|
131
|
+
accountId
|
|
132
|
+
status
|
|
133
|
+
amount
|
|
134
|
+
network
|
|
135
|
+
createdAt
|
|
136
|
+
}
|
|
137
|
+
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function Nt(e,t){if(e.kind==="FragmentSpread")t.add(e.name.value);else if(e.kind==="VariableDefinition"){var n=e.type;n.kind==="NamedType"&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(i){Nt(i,t)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(i){Nt(i,t)}),e.definitions&&e.definitions.forEach(function(i){Nt(i,t)})}var Zt={};(function(){St.definitions.forEach(function(t){if(t.name){var n=new Set;Nt(t,n),Zt[t.name.value]=n}})})();function dr(e,t){for(var n=0;n<e.definitions.length;n++){var i=e.definitions[n];if(i.name&&i.name.value==t)return i}}function so(e,t){var n={kind:e.kind,definitions:[dr(e,t)]};e.hasOwnProperty("loc")&&(n.loc=e.loc);var i=Zt[t]||new Set,a=new Set,o=new Set;for(i.forEach(function(s){o.add(s)});o.size>0;){var u=o;o=new Set,u.forEach(function(s){if(!a.has(s)){a.add(s);var c=Zt[s]||new Set;c.forEach(function(l){o.add(l)})}})}return a.forEach(function(s){var c=dr(e,s);c&&n.definitions.push(c)}),n}so(St,"PaymentRequestFragment");var _e={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreatePaymentRequest"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"createDirectPaymentInput"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateDirectPaymentInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createDirectPayment"},arguments:[{kind:"Argument",name:{kind:"Name",value:"createDirectPaymentInput"},value:{kind:"Variable",name:{kind:"Name",value:"createDirectPaymentInput"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"PaymentRequestFragment"},directives:[]}]}}]}}],loc:{start:0,end:260}};_e.loc.source={body:`#import "../queries/paymentRequestFragment.graphql"
|
|
138
|
+
|
|
139
|
+
mutation CreatePaymentRequest($createDirectPaymentInput: CreateDirectPaymentInput!) {
|
|
140
|
+
createDirectPayment(createDirectPaymentInput: $createDirectPaymentInput) {
|
|
141
|
+
...PaymentRequestFragment
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
`,name:"GraphQL request",locationOffset:{line:1,column:1}};var pr={};function uo(e){return e.filter(function(t){if(t.kind!=="FragmentDefinition")return!0;var n=t.name.value;return pr[n]?!1:(pr[n]=!0,!0)})}_e.definitions=_e.definitions.concat(uo(St.definitions));function Tt(e,t){if(e.kind==="FragmentSpread")t.add(e.name.value);else if(e.kind==="VariableDefinition"){var n=e.type;n.kind==="NamedType"&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(i){Tt(i,t)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(i){Tt(i,t)}),e.definitions&&e.definitions.forEach(function(i){Tt(i,t)})}var ei={};(function(){_e.definitions.forEach(function(t){if(t.name){var n=new Set;Tt(t,n),ei[t.name.value]=n}})})();function vr(e,t){for(var n=0;n<e.definitions.length;n++){var i=e.definitions[n];if(i.name&&i.name.value==t)return i}}function co(e,t){var n={kind:e.kind,definitions:[vr(e,t)]};e.hasOwnProperty("loc")&&(n.loc=e.loc);var i=ei[t]||new Set,a=new Set,o=new Set;for(i.forEach(function(s){o.add(s)});o.size>0;){var u=o;o=new Set,u.forEach(function(s){if(!a.has(s)){a.add(s);var c=ei[s]||new Set;c.forEach(function(l){o.add(l)})}})}return a.forEach(function(s){var c=vr(e,s);c&&n.definitions.push(c)}),n}co(_e,"CreatePaymentRequest");var bt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetSpritzPayParams"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"tokenAddress"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"amount"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Float"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"reference"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"network"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"spritzPayParams"},arguments:[{kind:"Argument",name:{kind:"Name",value:"tokenAddress"},value:{kind:"Variable",name:{kind:"Name",value:"tokenAddress"}}},{kind:"Argument",name:{kind:"Name",value:"amount"},value:{kind:"Variable",name:{kind:"Name",value:"amount"}}},{kind:"Argument",name:{kind:"Name",value:"reference"},value:{kind:"Variable",name:{kind:"Name",value:"reference"}}},{kind:"Argument",name:{kind:"Name",value:"network"},value:{kind:"Variable",name:{kind:"Name",value:"network"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"contractAddress"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"method"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"calldata"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"requiredTokenInput"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"suggestedGasLimit"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:399}};bt.loc.source={body:`query GetSpritzPayParams(
|
|
145
|
+
$tokenAddress: String!
|
|
146
|
+
$amount: Float!
|
|
147
|
+
$reference: String!
|
|
148
|
+
$network: String!
|
|
149
|
+
) {
|
|
150
|
+
spritzPayParams(
|
|
151
|
+
tokenAddress: $tokenAddress
|
|
152
|
+
amount: $amount
|
|
153
|
+
reference: $reference
|
|
154
|
+
network: $network
|
|
155
|
+
) {
|
|
156
|
+
contractAddress
|
|
157
|
+
method
|
|
158
|
+
calldata
|
|
159
|
+
value
|
|
160
|
+
requiredTokenInput
|
|
161
|
+
suggestedGasLimit
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function Et(e,t){if(e.kind==="FragmentSpread")t.add(e.name.value);else if(e.kind==="VariableDefinition"){var n=e.type;n.kind==="NamedType"&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(i){Et(i,t)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(i){Et(i,t)}),e.definitions&&e.definitions.forEach(function(i){Et(i,t)})}var ni={};(function(){bt.definitions.forEach(function(t){if(t.name){var n=new Set;Et(t,n),ni[t.name.value]=n}})})();function mr(e,t){for(var n=0;n<e.definitions.length;n++){var i=e.definitions[n];if(i.name&&i.name.value==t)return i}}function lo(e,t){var n={kind:e.kind,definitions:[mr(e,t)]};e.hasOwnProperty("loc")&&(n.loc=e.loc);var i=ni[t]||new Set,a=new Set,o=new Set;for(i.forEach(function(s){o.add(s)});o.size>0;){var u=o;o=new Set,u.forEach(function(s){if(!a.has(s)){a.add(s);var c=ni[s]||new Set;c.forEach(function(l){o.add(l)})}})}return a.forEach(function(s){var c=mr(e,s);c&&n.definitions.push(c)}),n}lo(bt,"GetSpritzPayParams");const fo=e=>Math.round((e+Number.EPSILON)*100)/100;var po=li({"node_modules/js-sha3/src/sha3.js"(e,t){(function(){var n="input is invalid type",i="finalize already called",a=typeof window=="object",o=a?window:{};o.JS_SHA3_NO_WINDOW&&(a=!1);var u=!a&&typeof self=="object",s=!o.JS_SHA3_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;s?o=global:u&&(o=self);var c=!o.JS_SHA3_NO_COMMON_JS&&typeof t=="object"&&t.exports,l=typeof define=="function"&&define.amd,y=!o.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",g="0123456789abcdef".split(""),D=[31,7936,2031616,520093696],k=[4,1024,262144,67108864],S=[1,256,65536,16777216],w=[6,1536,393216,100663296],A=[0,8,16,24],F=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],Q=[224,256,384,512],V=[128,256],G=["hex","buffer","arrayBuffer","array","digest"],L={128:168,256:136};(o.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(r){return Object.prototype.toString.call(r)==="[object Array]"}),y&&(o.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(r){return typeof r=="object"&&r.buffer&&r.buffer.constructor===ArrayBuffer});for(var J=function(r,f,d){return function(p){return new M(r,f,r).update(p)[d]()}},X=function(r,f,d){return function(p,h){return new M(r,f,h).update(p)[d]()}},q=function(r,f,d){return function(p,h,T,b){return ae["cshake"+r].update(p,h,T,b)[d]()}},re=function(r,f,d){return function(p,h,T,b){return ae["kmac"+r].update(p,h,T,b)[d]()}},ue=function(r,f,d,p){for(var h=0;h<G.length;++h){var T=G[h];r[T]=f(d,p,T)}return r},oi=function(r,f){var d=J(r,f,"hex");return d.create=function(){return new M(r,f,r)},d.update=function(p){return d.create().update(p)},ue(d,J,r,f)},Tr=function(r,f){var d=X(r,f,"hex");return d.create=function(p){return new M(r,f,p)},d.update=function(p,h){return d.create(h).update(p)},ue(d,X,r,f)},br=function(r,f){var d=L[r],p=q(r,f,"hex");return p.create=function(h,T,b){return!T&&!b?ae["shake"+r].create(h):new M(r,f,h).bytepad([T,b],d)},p.update=function(h,T,b,N){return p.create(T,b,N).update(h)},ue(p,q,r,f)},Er=function(r,f){var d=L[r],p=re(r,f,"hex");return p.create=function(h,T,b){return new _t(r,f,T).bytepad(["KMAC",b],d).bytepad([h],d)},p.update=function(h,T,b,N){return p.create(h,b,N).update(T)},ue(p,re,r,f)},si=[{name:"keccak",padding:S,bits:Q,createMethod:oi},{name:"sha3",padding:w,bits:Q,createMethod:oi},{name:"shake",padding:D,bits:V,createMethod:Tr},{name:"cshake",padding:k,bits:V,createMethod:br},{name:"kmac",padding:k,bits:V,createMethod:Er}],ae={},Le=[],ce=0;ce<si.length;++ce)for(var ge=si[ce],Ye=ge.bits,xe=0;xe<Ye.length;++xe){var Ft=ge.name+"_"+Ye[xe];if(Le.push(Ft),ae[Ft]=ge.createMethod(Ye[xe],ge.padding),ge.name!=="sha3"){var ui=ge.name+Ye[xe];Le.push(ui),ae[ui]=ae[Ft]}}function M(r,f,d){this.blocks=[],this.s=[],this.padding=f,this.outputBits=d,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(r<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=d>>5,this.extraBytes=(d&31)>>3;for(var p=0;p<50;++p)this.s[p]=0}M.prototype.update=function(r){if(this.finalized)throw new Error(i);var f,d=typeof r;if(d!=="string"){if(d==="object"){if(r===null)throw new Error(n);if(y&&r.constructor===ArrayBuffer)r=new Uint8Array(r);else if(!Array.isArray(r)&&(!y||!ArrayBuffer.isView(r)))throw new Error(n)}else throw new Error(n);f=!0}for(var p=this.blocks,h=this.byteCount,T=r.length,b=this.blockCount,N=0,C=this.s,E,P;N<T;){if(this.reset)for(this.reset=!1,p[0]=this.block,E=1;E<b+1;++E)p[E]=0;if(f)for(E=this.start;N<T&&E<h;++N)p[E>>2]|=r[N]<<A[E++&3];else for(E=this.start;N<T&&E<h;++N)P=r.charCodeAt(N),P<128?p[E>>2]|=P<<A[E++&3]:P<2048?(p[E>>2]|=(192|P>>6)<<A[E++&3],p[E>>2]|=(128|P&63)<<A[E++&3]):P<55296||P>=57344?(p[E>>2]|=(224|P>>12)<<A[E++&3],p[E>>2]|=(128|P>>6&63)<<A[E++&3],p[E>>2]|=(128|P&63)<<A[E++&3]):(P=65536+((P&1023)<<10|r.charCodeAt(++N)&1023),p[E>>2]|=(240|P>>18)<<A[E++&3],p[E>>2]|=(128|P>>12&63)<<A[E++&3],p[E>>2]|=(128|P>>6&63)<<A[E++&3],p[E>>2]|=(128|P&63)<<A[E++&3]);if(this.lastByteIndex=E,E>=h){for(this.start=E-h,this.block=p[b],E=0;E<b;++E)C[E]^=p[E];Ue(C),this.reset=!0}else this.start=E}return this},M.prototype.encode=function(r,f){var d=r&255,p=1,h=[d];for(r=r>>8,d=r&255;d>0;)h.unshift(d),r=r>>8,d=r&255,++p;return f?h.push(p):h.unshift(p),this.update(h),h.length},M.prototype.encodeString=function(r){var f,d=typeof r;if(d!=="string"){if(d==="object"){if(r===null)throw new Error(n);if(y&&r.constructor===ArrayBuffer)r=new Uint8Array(r);else if(!Array.isArray(r)&&(!y||!ArrayBuffer.isView(r)))throw new Error(n)}else throw new Error(n);f=!0}var p=0,h=r.length;if(f)p=h;else for(var T=0;T<r.length;++T){var b=r.charCodeAt(T);b<128?p+=1:b<2048?p+=2:b<55296||b>=57344?p+=3:(b=65536+((b&1023)<<10|r.charCodeAt(++T)&1023),p+=4)}return p+=this.encode(p*8),this.update(r),p},M.prototype.bytepad=function(r,f){for(var d=this.encode(f),p=0;p<r.length;++p)d+=this.encodeString(r[p]);var h=f-d%f,T=[];return T.length=h,this.update(T),this},M.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var r=this.blocks,f=this.lastByteIndex,d=this.blockCount,p=this.s;if(r[f>>2]|=this.padding[f&3],this.lastByteIndex===this.byteCount)for(r[0]=r[d],f=1;f<d+1;++f)r[f]=0;for(r[d-1]|=2147483648,f=0;f<d;++f)p[f]^=r[f];Ue(p)}},M.prototype.toString=M.prototype.hex=function(){this.finalize();for(var r=this.blockCount,f=this.s,d=this.outputBlocks,p=this.extraBytes,h=0,T=0,b="",N;T<d;){for(h=0;h<r&&T<d;++h,++T)N=f[h],b+=g[N>>4&15]+g[N&15]+g[N>>12&15]+g[N>>8&15]+g[N>>20&15]+g[N>>16&15]+g[N>>28&15]+g[N>>24&15];T%r===0&&(Ue(f),h=0)}return p&&(N=f[h],b+=g[N>>4&15]+g[N&15],p>1&&(b+=g[N>>12&15]+g[N>>8&15]),p>2&&(b+=g[N>>20&15]+g[N>>16&15])),b},M.prototype.arrayBuffer=function(){this.finalize();var r=this.blockCount,f=this.s,d=this.outputBlocks,p=this.extraBytes,h=0,T=0,b=this.outputBits>>3,N;p?N=new ArrayBuffer(d+1<<2):N=new ArrayBuffer(b);for(var C=new Uint32Array(N);T<d;){for(h=0;h<r&&T<d;++h,++T)C[T]=f[h];T%r===0&&Ue(f)}return p&&(C[h]=f[h],N=N.slice(0,b)),N},M.prototype.buffer=M.prototype.arrayBuffer,M.prototype.digest=M.prototype.array=function(){this.finalize();for(var r=this.blockCount,f=this.s,d=this.outputBlocks,p=this.extraBytes,h=0,T=0,b=[],N,C;T<d;){for(h=0;h<r&&T<d;++h,++T)N=T<<2,C=f[h],b[N]=C&255,b[N+1]=C>>8&255,b[N+2]=C>>16&255,b[N+3]=C>>24&255;T%r===0&&Ue(f)}return p&&(N=T<<2,C=f[h],b[N]=C&255,p>1&&(b[N+1]=C>>8&255),p>2&&(b[N+2]=C>>16&255)),b};function _t(r,f,d){M.call(this,r,f,d)}_t.prototype=new M,_t.prototype.finalize=function(){return this.encode(this.outputBits,!0),M.prototype.finalize.call(this)};var Ue=function(r){var f,d,p,h,T,b,N,C,E,P,He,Ke,Xe,We,Ze,en,nn,tn,rn,an,on,sn,un,cn,ln,fn,dn,pn,vn,mn,hn,yn,gn,kn,Sn,Nn,Tn,bn,En,In,An,Dn,wn,On,Fn,_n,Rn,Ln,xn,Un,Pn,Vn,Bn,Mn,Cn,Gn,jn,qn,Qn,$n,Jn,zn,Yn;for(p=0;p<48;p+=2)h=r[0]^r[10]^r[20]^r[30]^r[40],T=r[1]^r[11]^r[21]^r[31]^r[41],b=r[2]^r[12]^r[22]^r[32]^r[42],N=r[3]^r[13]^r[23]^r[33]^r[43],C=r[4]^r[14]^r[24]^r[34]^r[44],E=r[5]^r[15]^r[25]^r[35]^r[45],P=r[6]^r[16]^r[26]^r[36]^r[46],He=r[7]^r[17]^r[27]^r[37]^r[47],Ke=r[8]^r[18]^r[28]^r[38]^r[48],Xe=r[9]^r[19]^r[29]^r[39]^r[49],f=Ke^(b<<1|N>>>31),d=Xe^(N<<1|b>>>31),r[0]^=f,r[1]^=d,r[10]^=f,r[11]^=d,r[20]^=f,r[21]^=d,r[30]^=f,r[31]^=d,r[40]^=f,r[41]^=d,f=h^(C<<1|E>>>31),d=T^(E<<1|C>>>31),r[2]^=f,r[3]^=d,r[12]^=f,r[13]^=d,r[22]^=f,r[23]^=d,r[32]^=f,r[33]^=d,r[42]^=f,r[43]^=d,f=b^(P<<1|He>>>31),d=N^(He<<1|P>>>31),r[4]^=f,r[5]^=d,r[14]^=f,r[15]^=d,r[24]^=f,r[25]^=d,r[34]^=f,r[35]^=d,r[44]^=f,r[45]^=d,f=C^(Ke<<1|Xe>>>31),d=E^(Xe<<1|Ke>>>31),r[6]^=f,r[7]^=d,r[16]^=f,r[17]^=d,r[26]^=f,r[27]^=d,r[36]^=f,r[37]^=d,r[46]^=f,r[47]^=d,f=P^(h<<1|T>>>31),d=He^(T<<1|h>>>31),r[8]^=f,r[9]^=d,r[18]^=f,r[19]^=d,r[28]^=f,r[29]^=d,r[38]^=f,r[39]^=d,r[48]^=f,r[49]^=d,We=r[0],Ze=r[1],_n=r[11]<<4|r[10]>>>28,Rn=r[10]<<4|r[11]>>>28,pn=r[20]<<3|r[21]>>>29,vn=r[21]<<3|r[20]>>>29,$n=r[31]<<9|r[30]>>>23,Jn=r[30]<<9|r[31]>>>23,Dn=r[40]<<18|r[41]>>>14,wn=r[41]<<18|r[40]>>>14,kn=r[2]<<1|r[3]>>>31,Sn=r[3]<<1|r[2]>>>31,en=r[13]<<12|r[12]>>>20,nn=r[12]<<12|r[13]>>>20,Ln=r[22]<<10|r[23]>>>22,xn=r[23]<<10|r[22]>>>22,mn=r[33]<<13|r[32]>>>19,hn=r[32]<<13|r[33]>>>19,zn=r[42]<<2|r[43]>>>30,Yn=r[43]<<2|r[42]>>>30,Mn=r[5]<<30|r[4]>>>2,Cn=r[4]<<30|r[5]>>>2,Nn=r[14]<<6|r[15]>>>26,Tn=r[15]<<6|r[14]>>>26,tn=r[25]<<11|r[24]>>>21,rn=r[24]<<11|r[25]>>>21,Un=r[34]<<15|r[35]>>>17,Pn=r[35]<<15|r[34]>>>17,yn=r[45]<<29|r[44]>>>3,gn=r[44]<<29|r[45]>>>3,cn=r[6]<<28|r[7]>>>4,ln=r[7]<<28|r[6]>>>4,Gn=r[17]<<23|r[16]>>>9,jn=r[16]<<23|r[17]>>>9,bn=r[26]<<25|r[27]>>>7,En=r[27]<<25|r[26]>>>7,an=r[36]<<21|r[37]>>>11,on=r[37]<<21|r[36]>>>11,Vn=r[47]<<24|r[46]>>>8,Bn=r[46]<<24|r[47]>>>8,On=r[8]<<27|r[9]>>>5,Fn=r[9]<<27|r[8]>>>5,fn=r[18]<<20|r[19]>>>12,dn=r[19]<<20|r[18]>>>12,qn=r[29]<<7|r[28]>>>25,Qn=r[28]<<7|r[29]>>>25,In=r[38]<<8|r[39]>>>24,An=r[39]<<8|r[38]>>>24,sn=r[48]<<14|r[49]>>>18,un=r[49]<<14|r[48]>>>18,r[0]=We^~en&tn,r[1]=Ze^~nn&rn,r[10]=cn^~fn&pn,r[11]=ln^~dn&vn,r[20]=kn^~Nn&bn,r[21]=Sn^~Tn&En,r[30]=On^~_n&Ln,r[31]=Fn^~Rn&xn,r[40]=Mn^~Gn&qn,r[41]=Cn^~jn&Qn,r[2]=en^~tn&an,r[3]=nn^~rn&on,r[12]=fn^~pn&mn,r[13]=dn^~vn&hn,r[22]=Nn^~bn&In,r[23]=Tn^~En&An,r[32]=_n^~Ln&Un,r[33]=Rn^~xn&Pn,r[42]=Gn^~qn&$n,r[43]=jn^~Qn&Jn,r[4]=tn^~an&sn,r[5]=rn^~on&un,r[14]=pn^~mn&yn,r[15]=vn^~hn&gn,r[24]=bn^~In&Dn,r[25]=En^~An&wn,r[34]=Ln^~Un&Vn,r[35]=xn^~Pn&Bn,r[44]=qn^~$n&zn,r[45]=Qn^~Jn&Yn,r[6]=an^~sn&We,r[7]=on^~un&Ze,r[16]=mn^~yn&cn,r[17]=hn^~gn&ln,r[26]=In^~Dn&kn,r[27]=An^~wn&Sn,r[36]=Un^~Vn&On,r[37]=Pn^~Bn&Fn,r[46]=$n^~zn&Mn,r[47]=Jn^~Yn&Cn,r[8]=sn^~We&en,r[9]=un^~Ze&nn,r[18]=yn^~cn&fn,r[19]=gn^~ln&dn,r[28]=Dn^~kn&Nn,r[29]=wn^~Sn&Tn,r[38]=Vn^~On&_n,r[39]=Bn^~Fn&Rn,r[48]=zn^~Mn&Gn,r[49]=Yn^~Cn&jn,r[0]^=F[p],r[1]^=F[p+1]};if(c)t.exports=ae;else{for(ce=0;ce<Le.length;++ce)o[Le[ce]]=ae[Le[ce]];l&&define(function(){return ae})}})()}}),vo=li({"optimize-deps:js-sha3"(e,t){t.exports=po()}}),mo=vo();/*! Bundled license information:
|
|
165
|
+
|
|
166
|
+
js-sha3/src/sha3.js:
|
|
167
|
+
(**
|
|
168
|
+
* [js-sha3]{@link https://github.com/emn178/js-sha3}
|
|
169
|
+
*
|
|
170
|
+
* @version 0.8.0
|
|
171
|
+
* @author Chen, Yi-Cyuan [emn178@gmail.com]
|
|
172
|
+
* @copyright Chen, Yi-Cyuan 2015-2018
|
|
173
|
+
* @license MIT
|
|
174
|
+
*)
|
|
175
|
+
*/function ho(e,t=!1){if(!/^0x[0-9a-fA-F]{40}$/.test(e))return!1;if(t){const n=e.substring(2),i=mo.keccak256.hex(n.toLowerCase());for(let a=0;a<40;a++){const o=n.charAt(a),u=parseInt(i.charAt(a),16);if(u>7&&o.toUpperCase()!==o||u<=7&&o.toLowerCase()!==o)return!1}}return!0}class yo{client;constructor(t){this.client=t}async create(t){return(await this.client.query({query:_e,variables:{createDirectPaymentInput:{...t,provider:Xt.CHECKBOOK}}}))?.createDirectPayment}async getWeb3PaymentParams(t,n=!1){if(!ho(t.paymentTokenAddress,n))throw new Error("Invalid token address");return(await this.client.query({query:bt,variables:{amount:fo(t.amount),network:t.network,tokenAddress:t.paymentTokenAddress,reference:t.paymentRequestId}}))?.spritzPayParams}}var It={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"UserFragment"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"User"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"sub"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"firstName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lastName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"picture"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"phone"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"timezone"},arguments:[],directives:[]}]}}],loc:{start:0,end:135}};It.loc.source={body:`fragment UserFragment on User {
|
|
129
176
|
id
|
|
130
177
|
sub
|
|
131
178
|
email
|
|
@@ -136,14 +183,14 @@ query UserBankAccounts {
|
|
|
136
183
|
createdAt
|
|
137
184
|
timezone
|
|
138
185
|
}
|
|
139
|
-
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function
|
|
186
|
+
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function At(e,t){if(e.kind==="FragmentSpread")t.add(e.name.value);else if(e.kind==="VariableDefinition"){var n=e.type;n.kind==="NamedType"&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(i){At(i,t)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(i){At(i,t)}),e.definitions&&e.definitions.forEach(function(i){At(i,t)})}var ti={};(function(){It.definitions.forEach(function(t){if(t.name){var n=new Set;At(t,n),ti[t.name.value]=n}})})();function hr(e,t){for(var n=0;n<e.definitions.length;n++){var i=e.definitions[n];if(i.name&&i.name.value==t)return i}}function go(e,t){var n={kind:e.kind,definitions:[hr(e,t)]};e.hasOwnProperty("loc")&&(n.loc=e.loc);var i=ti[t]||new Set,a=new Set,o=new Set;for(i.forEach(function(s){o.add(s)});o.size>0;){var u=o;o=new Set,u.forEach(function(s){if(!a.has(s)){a.add(s);var c=ti[s]||new Set;c.forEach(function(l){o.add(l)})}})}return a.forEach(function(s){var c=hr(e,s);c&&n.definitions.push(c)}),n}go(It,"UserFragment");var Re={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"CurrentUser"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"me"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"UserFragment"},directives:[]}]}}]}}],loc:{start:0,end:95}};Re.loc.source={body:`#import "./userFragment.graphql"
|
|
140
187
|
|
|
141
188
|
query CurrentUser {
|
|
142
189
|
me {
|
|
143
190
|
...UserFragment
|
|
144
191
|
}
|
|
145
192
|
}
|
|
146
|
-
`,name:"GraphQL request",locationOffset:{line:1,column:1}};var
|
|
193
|
+
`,name:"GraphQL request",locationOffset:{line:1,column:1}};var yr={};function ko(e){return e.filter(function(t){if(t.kind!=="FragmentDefinition")return!0;var n=t.name.value;return yr[n]?!1:(yr[n]=!0,!0)})}Re.definitions=Re.definitions.concat(ko(It.definitions));function Dt(e,t){if(e.kind==="FragmentSpread")t.add(e.name.value);else if(e.kind==="VariableDefinition"){var n=e.type;n.kind==="NamedType"&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(i){Dt(i,t)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(i){Dt(i,t)}),e.definitions&&e.definitions.forEach(function(i){Dt(i,t)})}var ii={};(function(){Re.definitions.forEach(function(t){if(t.name){var n=new Set;Dt(t,n),ii[t.name.value]=n}})})();function gr(e,t){for(var n=0;n<e.definitions.length;n++){var i=e.definitions[n];if(i.name&&i.name.value==t)return i}}function So(e,t){var n={kind:e.kind,definitions:[gr(e,t)]};e.hasOwnProperty("loc")&&(n.loc=e.loc);var i=ii[t]||new Set,a=new Set,o=new Set;for(i.forEach(function(s){o.add(s)});o.size>0;){var u=o;o=new Set,u.forEach(function(s){if(!a.has(s)){a.add(s);var c=ii[s]||new Set;c.forEach(function(l){o.add(l)})}})}return a.forEach(function(s){var c=gr(e,s);c&&n.definitions.push(c)}),n}So(Re,"CurrentUser");var wt={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"UserVerification"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"verification"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"userId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"identity"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"status"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"country"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"verificationUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"user"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"firstName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lastName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"completedAt"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:297}};wt.loc.source={body:`query UserVerification {
|
|
147
194
|
verification {
|
|
148
195
|
userId
|
|
149
196
|
identity {
|
|
@@ -159,5 +206,5 @@ query CurrentUser {
|
|
|
159
206
|
}
|
|
160
207
|
}
|
|
161
208
|
}
|
|
162
|
-
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function
|
|
209
|
+
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function Ot(e,t){if(e.kind==="FragmentSpread")t.add(e.name.value);else if(e.kind==="VariableDefinition"){var n=e.type;n.kind==="NamedType"&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(i){Ot(i,t)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(i){Ot(i,t)}),e.definitions&&e.definitions.forEach(function(i){Ot(i,t)})}var ri={};(function(){wt.definitions.forEach(function(t){if(t.name){var n=new Set;Ot(t,n),ri[t.name.value]=n}})})();function kr(e,t){for(var n=0;n<e.definitions.length;n++){var i=e.definitions[n];if(i.name&&i.name.value==t)return i}}function No(e,t){var n={kind:e.kind,definitions:[kr(e,t)]};e.hasOwnProperty("loc")&&(n.loc=e.loc);var i=ri[t]||new Set,a=new Set,o=new Set;for(i.forEach(function(s){o.add(s)});o.size>0;){var u=o;o=new Set,u.forEach(function(s){if(!a.has(s)){a.add(s);var c=ri[s]||new Set;c.forEach(function(l){o.add(l)})}})}return a.forEach(function(s){var c=kr(e,s);c&&n.definitions.push(c)}),n}No(wt,"UserVerification");class To{client;constructor(t){this.client=t}async getCurrentUser(){return(await this.client.query({query:Re}))?.me??null}async getUserVerification(){return(await this.client.query({query:wt}))?.verification??null}}class ai{client;user;bankAccount;paymentRequest;static initialize(t,n){const i=new ai;return i.init(t,n),i}init(t,n){this.client=new za(t,n),this.user=new To(this.client),this.bankAccount=new oo(this.client),this.paymentRequest=new yo(this.client)}}var Sr=(e=>(e.Staging="staging",e.Production="production",e))(Sr||{}),Nr=(e=>(e.Ethereum="ethereum",e.Polygon="polygon",e.Optimism="optimism",e.Arbitrum="arbitrum",e.Binance="binance-smart-chain",e.Avalanche="avalanche",e.Bitcoin="bitcoin",e.BitcoinTestnet="bitcoin-testnet",e.Dash="dash",e.DashTestnet="dash-testnet",e))(Nr||{});exports.AccountProvider=Xt,exports.BankAccountSubType=ur,exports.BankAccountType=Wt,exports.DirectPaymentStatus=cr,exports.Environment=Sr,exports.ModuleStatus=lr,exports.PayableAccountType=fr,exports.PaymentNetwork=Nr,exports.SpritzApiClient=ai;
|
|
163
210
|
//# sourceMappingURL=spritz-api-client.js.map
|