@stonecrop/graphql-client 0.4.35 → 0.4.36
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
|
-
(function(K,ge){typeof exports=="object"&&typeof module<"u"?ge(exports):typeof define=="function"&&define.amd?define(["exports"],ge):(K=typeof globalThis<"u"?globalThis:K||self,ge(K["@stonecrop/graphql-client"]={}))})(this,function(K){"use strict";function ge(e,t){for(var n=0;n<t.length;n++){const i=t[n];if(typeof i!="string"&&!Array.isArray(i)){for(const r in i)if(r!=="default"&&!(r in e)){const s=Object.getOwnPropertyDescriptor(i,r);s&&Object.defineProperty(e,r,s.get?s:{enumerable:!0,get:()=>i[r]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}/*!
|
|
1
|
+
(function(K,ge){typeof exports=="object"&&typeof module<"u"?ge(exports):typeof define=="function"&&define.amd?define(["exports"],ge):(K=typeof globalThis<"u"?globalThis:K||self,ge(K["@stonecrop/graphql-client"]={}))})(this,(function(K){"use strict";function ge(e,t){for(var n=0;n<t.length;n++){const i=t[n];if(typeof i!="string"&&!Array.isArray(i)){for(const r in i)if(r!=="default"&&!(r in e)){const s=Object.getOwnPropertyDescriptor(i,r);s&&Object.defineProperty(e,r,s.get?s:{enumerable:!0,get:()=>i[r]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}/*!
|
|
2
2
|
* decimal.js v10.4.3
|
|
3
3
|
* An arbitrary-precision Decimal type for JavaScript.
|
|
4
4
|
* https://github.com/MikeMcl/decimal.js
|
|
5
5
|
* Copyright (c) 2022 Michael Mclaughlin <M8ch88l@gmail.com>
|
|
6
6
|
* MIT Licence
|
|
7
|
-
*/var ce=9e15,ee=1e9,Ue="0123456789abcdef",Te="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",Ae="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",qe={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-ce,maxE:ce,crypto:!1},nt,W,I=!0,Ie="[DecimalError] ",te=Ie+"Invalid argument: ",it=Ie+"Precision limit exceeded",rt=Ie+"crypto unavailable",st="[object Decimal]",q=Math.floor,P=Math.pow,Mt=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,Bt=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,Ut=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,ot=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,J=1e7,T=7,qt=9007199254740991,Vt=Te.length-1,Ve=Ae.length-1,g={toStringTag:st};g.absoluteValue=g.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),v(e)},g.ceil=function(){return v(new this.constructor(this),this.e+1,2)},g.clampedTo=g.clamp=function(e,t){var n,i=this,r=i.constructor;if(e=new r(e),t=new r(t),!e.s||!t.s)return new r(NaN);if(e.gt(t))throw Error(te+t);return n=i.cmp(e),n<0?e:i.cmp(t)>0?t:new r(i)},g.comparedTo=g.cmp=function(e){var t,n,i,r,s=this,o=s.d,a=(e=new s.constructor(e)).d,u=s.s,c=e.s;if(!o||!a)return!u||!c?NaN:u!==c?u:o===a?0:!o^u<0?1:-1;if(!o[0]||!a[0])return o[0]?u:a[0]?-c:0;if(u!==c)return u;if(s.e!==e.e)return s.e>e.e^u<0?1:-1;for(i=o.length,r=a.length,t=0,n=i<r?i:r;t<n;++t)if(o[t]!==a[t])return o[t]>a[t]^u<0?1:-1;return i===r?0:i>r^u<0?1:-1},g.cosine=g.cos=function(){var e,t,n=this,i=n.constructor;return n.d?n.d[0]?(e=i.precision,t=i.rounding,i.precision=e+Math.max(n.e,n.sd())+T,i.rounding=1,n=jt(i,ht(i,n)),i.precision=e,i.rounding=t,v(W==2||W==3?n.neg():n,e,t,!0)):new i(1):new i(NaN)},g.cubeRoot=g.cbrt=function(){var e,t,n,i,r,s,o,a,u,c,l=this,f=l.constructor;if(!l.isFinite()||l.isZero())return new f(l);for(I=!1,s=l.s*P(l.s*l,1/3),!s||Math.abs(s)==1/0?(n=B(l.d),e=l.e,(s=(e-n.length+1)%3)&&(n+=s==1||s==-2?"0":"00"),s=P(n,1/3),e=q((e+1)/3)-(e%3==(e<0?-1:2)),s==1/0?n="5e"+e:(n=s.toExponential(),n=n.slice(0,n.indexOf("e")+1)+e),i=new f(n),i.s=l.s):i=new f(s.toString()),o=(e=f.precision)+3;;)if(a=i,u=a.times(a).times(a),c=u.plus(l),i=C(c.plus(l).times(a),c.plus(u),o+2,1),B(a.d).slice(0,o)===(n=B(i.d)).slice(0,o))if(n=n.slice(o-3,o+1),n=="9999"||!r&&n=="4999"){if(!r&&(v(a,e+1,0),a.times(a).times(a).eq(l))){i=a;break}o+=4,r=1}else{(!+n||!+n.slice(1)&&n.charAt(0)=="5")&&(v(i,e+1,1),t=!i.times(i).times(i).eq(l));break}return I=!0,v(i,e,f.rounding,t)},g.decimalPlaces=g.dp=function(){var e,t=this.d,n=NaN;if(t){if(e=t.length-1,n=(e-q(this.e/T))*T,e=t[e],e)for(;e%10==0;e/=10)n--;n<0&&(n=0)}return n},g.dividedBy=g.div=function(e){return C(this,new this.constructor(e))},g.dividedToIntegerBy=g.divToInt=function(e){var t=this,n=t.constructor;return v(C(t,new n(e),0,1,1),n.precision,n.rounding)},g.equals=g.eq=function(e){return this.cmp(e)===0},g.floor=function(){return v(new this.constructor(this),this.e+1,3)},g.greaterThan=g.gt=function(e){return this.cmp(e)>0},g.greaterThanOrEqualTo=g.gte=function(e){var t=this.cmp(e);return t==1||t===0},g.hyperbolicCosine=g.cosh=function(){var e,t,n,i,r,s=this,o=s.constructor,a=new o(1);if(!s.isFinite())return new o(s.s?1/0:NaN);if(s.isZero())return a;n=o.precision,i=o.rounding,o.precision=n+Math.max(s.e,s.sd())+4,o.rounding=1,r=s.d.length,r<32?(e=Math.ceil(r/3),t=(1/De(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),s=ue(o,1,s.times(t),new o(1),!0);for(var u,c=e,l=new o(8);c--;)u=s.times(s),s=a.minus(u.times(l.minus(u.times(l))));return v(s,o.precision=n,o.rounding=i,!0)},g.hyperbolicSine=g.sinh=function(){var e,t,n,i,r=this,s=r.constructor;if(!r.isFinite()||r.isZero())return new s(r);if(t=s.precision,n=s.rounding,s.precision=t+Math.max(r.e,r.sd())+4,s.rounding=1,i=r.d.length,i<3)r=ue(s,2,r,r,!0);else{e=1.4*Math.sqrt(i),e=e>16?16:e|0,r=r.times(1/De(5,e)),r=ue(s,2,r,r,!0);for(var o,a=new s(5),u=new s(16),c=new s(20);e--;)o=r.times(r),r=r.times(a.plus(o.times(u.times(o).plus(c))))}return s.precision=t,s.rounding=n,v(r,t,n,!0)},g.hyperbolicTangent=g.tanh=function(){var e,t,n=this,i=n.constructor;return n.isFinite()?n.isZero()?new i(n):(e=i.precision,t=i.rounding,i.precision=e+7,i.rounding=1,C(n.sinh(),n.cosh(),i.precision=e,i.rounding=t)):new i(n.s)},g.inverseCosine=g.acos=function(){var e,t=this,n=t.constructor,i=t.abs().cmp(1),r=n.precision,s=n.rounding;return i!==-1?i===0?t.isNeg()?z(n,r,s):new n(0):new n(NaN):t.isZero()?z(n,r+4,s).times(.5):(n.precision=r+6,n.rounding=1,t=t.asin(),e=z(n,r+4,s).times(.5),n.precision=r,n.rounding=s,e.minus(t))},g.inverseHyperbolicCosine=g.acosh=function(){var e,t,n=this,i=n.constructor;return n.lte(1)?new i(n.eq(1)?0:NaN):n.isFinite()?(e=i.precision,t=i.rounding,i.precision=e+Math.max(Math.abs(n.e),n.sd())+4,i.rounding=1,I=!1,n=n.times(n).minus(1).sqrt().plus(n),I=!0,i.precision=e,i.rounding=t,n.ln()):new i(n)},g.inverseHyperbolicSine=g.asinh=function(){var e,t,n=this,i=n.constructor;return!n.isFinite()||n.isZero()?new i(n):(e=i.precision,t=i.rounding,i.precision=e+2*Math.max(Math.abs(n.e),n.sd())+6,i.rounding=1,I=!1,n=n.times(n).plus(1).sqrt().plus(n),I=!0,i.precision=e,i.rounding=t,n.ln())},g.inverseHyperbolicTangent=g.atanh=function(){var e,t,n,i,r=this,s=r.constructor;return r.isFinite()?r.e>=0?new s(r.abs().eq(1)?r.s/0:r.isZero()?r:NaN):(e=s.precision,t=s.rounding,i=r.sd(),Math.max(i,e)<2*-r.e-1?v(new s(r),e,t,!0):(s.precision=n=i-r.e,r=C(r.plus(1),new s(1).minus(r),n+e,1),s.precision=e+4,s.rounding=1,r=r.ln(),s.precision=e,s.rounding=t,r.times(.5))):new s(NaN)},g.inverseSine=g.asin=function(){var e,t,n,i,r=this,s=r.constructor;return r.isZero()?new s(r):(t=r.abs().cmp(1),n=s.precision,i=s.rounding,t!==-1?t===0?(e=z(s,n+4,i).times(.5),e.s=r.s,e):new s(NaN):(s.precision=n+6,s.rounding=1,r=r.div(new s(1).minus(r.times(r)).sqrt().plus(1)).atan(),s.precision=n,s.rounding=i,r.times(2)))},g.inverseTangent=g.atan=function(){var e,t,n,i,r,s,o,a,u,c=this,l=c.constructor,f=l.precision,d=l.rounding;if(c.isFinite()){if(c.isZero())return new l(c);if(c.abs().eq(1)&&f+4<=Ve)return o=z(l,f+4,d).times(.25),o.s=c.s,o}else{if(!c.s)return new l(NaN);if(f+4<=Ve)return o=z(l,f+4,d).times(.5),o.s=c.s,o}for(l.precision=a=f+10,l.rounding=1,n=Math.min(28,a/T+2|0),e=n;e;--e)c=c.div(c.times(c).plus(1).sqrt().plus(1));for(I=!1,t=Math.ceil(a/T),i=1,u=c.times(c),o=new l(c),r=c;e!==-1;)if(r=r.times(u),s=o.minus(r.div(i+=2)),r=r.times(u),o=s.plus(r.div(i+=2)),o.d[t]!==void 0)for(e=t;o.d[e]===s.d[e]&&e--;);return n&&(o=o.times(2<<n-1)),I=!0,v(o,l.precision=f,l.rounding=d,!0)},g.isFinite=function(){return!!this.d},g.isInteger=g.isInt=function(){return!!this.d&&q(this.e/T)>this.d.length-2},g.isNaN=function(){return!this.s},g.isNegative=g.isNeg=function(){return this.s<0},g.isPositive=g.isPos=function(){return this.s>0},g.isZero=function(){return!!this.d&&this.d[0]===0},g.lessThan=g.lt=function(e){return this.cmp(e)<0},g.lessThanOrEqualTo=g.lte=function(e){return this.cmp(e)<1},g.logarithm=g.log=function(e){var t,n,i,r,s,o,a,u,c=this,l=c.constructor,f=l.precision,d=l.rounding,y=5;if(e==null)e=new l(10),t=!0;else{if(e=new l(e),n=e.d,e.s<0||!n||!n[0]||e.eq(1))return new l(NaN);t=e.eq(10)}if(n=c.d,c.s<0||!n||!n[0]||c.eq(1))return new l(n&&!n[0]?-1/0:c.s!=1?NaN:n?0:1/0);if(t)if(n.length>1)s=!0;else{for(r=n[0];r%10===0;)r/=10;s=r!==1}if(I=!1,a=f+y,o=ie(c,a),i=t?_e(l,a+10):ie(e,a),u=C(o,i,a,1),Ee(u.d,r=f,d))do if(a+=10,o=ie(c,a),i=t?_e(l,a+10):ie(e,a),u=C(o,i,a,1),!s){+B(u.d).slice(r+1,r+15)+1==1e14&&(u=v(u,f+1,0));break}while(Ee(u.d,r+=10,d));return I=!0,v(u,f,d)},g.minus=g.sub=function(e){var t,n,i,r,s,o,a,u,c,l,f,d,y=this,N=y.constructor;if(e=new N(e),!y.d||!e.d)return!y.s||!e.s?e=new N(NaN):y.d?e.s=-e.s:e=new N(e.d||y.s!==e.s?y:NaN),e;if(y.s!=e.s)return e.s=-e.s,y.plus(e);if(c=y.d,d=e.d,a=N.precision,u=N.rounding,!c[0]||!d[0]){if(d[0])e.s=-e.s;else if(c[0])e=new N(y);else return new N(u===3?-0:0);return I?v(e,a,u):e}if(n=q(e.e/T),l=q(y.e/T),c=c.slice(),s=l-n,s){for(f=s<0,f?(t=c,s=-s,o=d.length):(t=d,n=l,o=c.length),i=Math.max(Math.ceil(a/T),o)+2,s>i&&(s=i,t.length=1),t.reverse(),i=s;i--;)t.push(0);t.reverse()}else{for(i=c.length,o=d.length,f=i<o,f&&(o=i),i=0;i<o;i++)if(c[i]!=d[i]){f=c[i]<d[i];break}s=0}for(f&&(t=c,c=d,d=t,e.s=-e.s),o=c.length,i=d.length-o;i>0;--i)c[o++]=0;for(i=d.length;i>s;){if(c[--i]<d[i]){for(r=i;r&&c[--r]===0;)c[r]=J-1;--c[r],c[i]+=J}c[i]-=d[i]}for(;c[--o]===0;)c.pop();for(;c[0]===0;c.shift())--n;return c[0]?(e.d=c,e.e=be(c,n),I?v(e,a,u):e):new N(u===3?-0:0)},g.modulo=g.mod=function(e){var t,n=this,i=n.constructor;return e=new i(e),!n.d||!e.s||e.d&&!e.d[0]?new i(NaN):!e.d||n.d&&!n.d[0]?v(new i(n),i.precision,i.rounding):(I=!1,i.modulo==9?(t=C(n,e.abs(),0,3,1),t.s*=e.s):t=C(n,e,0,i.modulo,1),t=t.times(e),I=!0,n.minus(t))},g.naturalExponential=g.exp=function(){return je(this)},g.naturalLogarithm=g.ln=function(){return ie(this)},g.negated=g.neg=function(){var e=new this.constructor(this);return e.s=-e.s,v(e)},g.plus=g.add=function(e){var t,n,i,r,s,o,a,u,c,l,f=this,d=f.constructor;if(e=new d(e),!f.d||!e.d)return!f.s||!e.s?e=new d(NaN):f.d||(e=new d(e.d||f.s===e.s?f:NaN)),e;if(f.s!=e.s)return e.s=-e.s,f.minus(e);if(c=f.d,l=e.d,a=d.precision,u=d.rounding,!c[0]||!l[0])return l[0]||(e=new d(f)),I?v(e,a,u):e;if(s=q(f.e/T),i=q(e.e/T),c=c.slice(),r=s-i,r){for(r<0?(n=c,r=-r,o=l.length):(n=l,i=s,o=c.length),s=Math.ceil(a/T),o=s>o?s+1:o+1,r>o&&(r=o,n.length=1),n.reverse();r--;)n.push(0);n.reverse()}for(o=c.length,r=l.length,o-r<0&&(r=o,n=l,l=c,c=n),t=0;r;)t=(c[--r]=c[r]+l[r]+t)/J|0,c[r]%=J;for(t&&(c.unshift(t),++i),o=c.length;c[--o]==0;)c.pop();return e.d=c,e.e=be(c,i),I?v(e,a,u):e},g.precision=g.sd=function(e){var t,n=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(te+e);return n.d?(t=at(n.d),e&&n.e+1>t&&(t=n.e+1)):t=NaN,t},g.round=function(){var e=this,t=e.constructor;return v(new t(e),e.e+1,t.rounding)},g.sine=g.sin=function(){var e,t,n=this,i=n.constructor;return n.isFinite()?n.isZero()?new i(n):(e=i.precision,t=i.rounding,i.precision=e+Math.max(n.e,n.sd())+T,i.rounding=1,n=Ht(i,ht(i,n)),i.precision=e,i.rounding=t,v(W>2?n.neg():n,e,t,!0)):new i(NaN)},g.squareRoot=g.sqrt=function(){var e,t,n,i,r,s,o=this,a=o.d,u=o.e,c=o.s,l=o.constructor;if(c!==1||!a||!a[0])return new l(!c||c<0&&(!a||a[0])?NaN:a?o:1/0);for(I=!1,c=Math.sqrt(+o),c==0||c==1/0?(t=B(a),(t.length+u)%2==0&&(t+="0"),c=Math.sqrt(t),u=q((u+1)/2)-(u<0||u%2),c==1/0?t="5e"+u:(t=c.toExponential(),t=t.slice(0,t.indexOf("e")+1)+u),i=new l(t)):i=new l(c.toString()),n=(u=l.precision)+3;;)if(s=i,i=s.plus(C(o,s,n+2,1)).times(.5),B(s.d).slice(0,n)===(t=B(i.d)).slice(0,n))if(t=t.slice(n-3,n+1),t=="9999"||!r&&t=="4999"){if(!r&&(v(s,u+1,0),s.times(s).eq(o))){i=s;break}n+=4,r=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(v(i,u+1,1),e=!i.times(i).eq(o));break}return I=!0,v(i,u,l.rounding,e)},g.tangent=g.tan=function(){var e,t,n=this,i=n.constructor;return n.isFinite()?n.isZero()?new i(n):(e=i.precision,t=i.rounding,i.precision=e+10,i.rounding=1,n=n.sin(),n.s=1,n=C(n,new i(1).minus(n.times(n)).sqrt(),e+10,0),i.precision=e,i.rounding=t,v(W==2||W==4?n.neg():n,e,t,!0)):new i(NaN)},g.times=g.mul=function(e){var t,n,i,r,s,o,a,u,c,l=this,f=l.constructor,d=l.d,y=(e=new f(e)).d;if(e.s*=l.s,!d||!d[0]||!y||!y[0])return new f(!e.s||d&&!d[0]&&!y||y&&!y[0]&&!d?NaN:!d||!y?e.s/0:e.s*0);for(n=q(l.e/T)+q(e.e/T),u=d.length,c=y.length,u<c&&(s=d,d=y,y=s,o=u,u=c,c=o),s=[],o=u+c,i=o;i--;)s.push(0);for(i=c;--i>=0;){for(t=0,r=u+i;r>i;)a=s[r]+y[i]*d[r-i-1]+t,s[r--]=a%J|0,t=a/J|0;s[r]=(s[r]+t)%J|0}for(;!s[--o];)s.pop();return t?++n:s.shift(),e.d=s,e.e=be(s,n),I?v(e,f.precision,f.rounding):e},g.toBinary=function(e,t){return He(this,2,e,t)},g.toDecimalPlaces=g.toDP=function(e,t){var n=this,i=n.constructor;return n=new i(n),e===void 0?n:(H(e,0,ee),t===void 0?t=i.rounding:H(t,0,8),v(n,e+n.e+1,t))},g.toExponential=function(e,t){var n,i=this,r=i.constructor;return e===void 0?n=Z(i,!0):(H(e,0,ee),t===void 0?t=r.rounding:H(t,0,8),i=v(new r(i),e+1,t),n=Z(i,!0,e+1)),i.isNeg()&&!i.isZero()?"-"+n:n},g.toFixed=function(e,t){var n,i,r=this,s=r.constructor;return e===void 0?n=Z(r):(H(e,0,ee),t===void 0?t=s.rounding:H(t,0,8),i=v(new s(r),e+r.e+1,t),n=Z(i,!1,e+i.e+1)),r.isNeg()&&!r.isZero()?"-"+n:n},g.toFraction=function(e){var t,n,i,r,s,o,a,u,c,l,f,d,y=this,N=y.d,E=y.constructor;if(!N)return new E(y);if(c=n=new E(1),i=u=new E(0),t=new E(i),s=t.e=at(N)-y.e-1,o=s%T,t.d[0]=P(10,o<0?T+o:o),e==null)e=s>0?t:c;else{if(a=new E(e),!a.isInt()||a.lt(c))throw Error(te+a);e=a.gt(t)?s>0?t:c:a}for(I=!1,a=new E(B(N)),l=E.precision,E.precision=s=N.length*T*2;f=C(a,t,0,1,1),r=n.plus(f.times(i)),r.cmp(e)!=1;)n=i,i=r,r=c,c=u.plus(f.times(r)),u=r,r=t,t=a.minus(f.times(r)),a=r;return r=C(e.minus(n),i,0,1,1),u=u.plus(r.times(c)),n=n.plus(r.times(i)),u.s=c.s=y.s,d=C(c,i,s,1).minus(y).abs().cmp(C(u,n,s,1).minus(y).abs())<1?[c,i]:[u,n],E.precision=l,I=!0,d},g.toHexadecimal=g.toHex=function(e,t){return He(this,16,e,t)},g.toNearest=function(e,t){var n=this,i=n.constructor;if(n=new i(n),e==null){if(!n.d)return n;e=new i(1),t=i.rounding}else{if(e=new i(e),t===void 0?t=i.rounding:H(t,0,8),!n.d)return e.s?n:e;if(!e.d)return e.s&&(e.s=n.s),e}return e.d[0]?(I=!1,n=C(n,e,0,t,1).times(e),I=!0,v(n)):(e.s=n.s,n=e),n},g.toNumber=function(){return+this},g.toOctal=function(e,t){return He(this,8,e,t)},g.toPower=g.pow=function(e){var t,n,i,r,s,o,a=this,u=a.constructor,c=+(e=new u(e));if(!a.d||!e.d||!a.d[0]||!e.d[0])return new u(P(+a,c));if(a=new u(a),a.eq(1))return a;if(i=u.precision,s=u.rounding,e.eq(1))return v(a,i,s);if(t=q(e.e/T),t>=e.d.length-1&&(n=c<0?-c:c)<=qt)return r=ct(u,a,n,i),e.s<0?new u(1).div(r):v(r,i,s);if(o=a.s,o<0){if(t<e.d.length-1)return new u(NaN);if((e.d[t]&1)==0&&(o=1),a.e==0&&a.d[0]==1&&a.d.length==1)return a.s=o,a}return n=P(+a,c),t=n==0||!isFinite(n)?q(c*(Math.log("0."+B(a.d))/Math.LN10+a.e+1)):new u(n+"").e,t>u.maxE+1||t<u.minE-1?new u(t>0?o/0:0):(I=!1,u.rounding=a.s=1,n=Math.min(12,(t+"").length),r=je(e.times(ie(a,i+n)),i),r.d&&(r=v(r,i+5,1),Ee(r.d,i,s)&&(t=i+10,r=v(je(e.times(ie(a,t+n)),t),t+5,1),+B(r.d).slice(i+1,i+15)+1==1e14&&(r=v(r,i+1,0)))),r.s=o,I=!0,u.rounding=s,v(r,i,s))},g.toPrecision=function(e,t){var n,i=this,r=i.constructor;return e===void 0?n=Z(i,i.e<=r.toExpNeg||i.e>=r.toExpPos):(H(e,1,ee),t===void 0?t=r.rounding:H(t,0,8),i=v(new r(i),e,t),n=Z(i,e<=i.e||i.e<=r.toExpNeg,e)),i.isNeg()&&!i.isZero()?"-"+n:n},g.toSignificantDigits=g.toSD=function(e,t){var n=this,i=n.constructor;return e===void 0?(e=i.precision,t=i.rounding):(H(e,1,ee),t===void 0?t=i.rounding:H(t,0,8)),v(new i(n),e,t)},g.toString=function(){var e=this,t=e.constructor,n=Z(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+n:n},g.truncated=g.trunc=function(){return v(new this.constructor(this),this.e+1,1)},g.valueOf=g.toJSON=function(){var e=this,t=e.constructor,n=Z(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+n:n};function B(e){var t,n,i,r=e.length-1,s="",o=e[0];if(r>0){for(s+=o,t=1;t<r;t++)i=e[t]+"",n=T-i.length,n&&(s+=ne(n)),s+=i;o=e[t],i=o+"",n=T-i.length,n&&(s+=ne(n))}else if(o===0)return"0";for(;o%10===0;)o/=10;return s+o}function H(e,t,n){if(e!==~~e||e<t||e>n)throw Error(te+e)}function Ee(e,t,n,i){var r,s,o,a;for(s=e[0];s>=10;s/=10)--t;return--t<0?(t+=T,r=0):(r=Math.ceil((t+1)/T),t%=T),s=P(10,T-t),a=e[r]%s|0,i==null?t<3?(t==0?a=a/100|0:t==1&&(a=a/10|0),o=n<4&&a==99999||n>3&&a==49999||a==5e4||a==0):o=(n<4&&a+1==s||n>3&&a+1==s/2)&&(e[r+1]/s/100|0)==P(10,t-2)-1||(a==s/2||a==0)&&(e[r+1]/s/100|0)==0:t<4?(t==0?a=a/1e3|0:t==1?a=a/100|0:t==2&&(a=a/10|0),o=(i||n<4)&&a==9999||!i&&n>3&&a==4999):o=((i||n<4)&&a+1==s||!i&&n>3&&a+1==s/2)&&(e[r+1]/s/1e3|0)==P(10,t-3)-1,o}function Oe(e,t,n){for(var i,r=[0],s,o=0,a=e.length;o<a;){for(s=r.length;s--;)r[s]*=t;for(r[0]+=Ue.indexOf(e.charAt(o++)),i=0;i<r.length;i++)r[i]>n-1&&(r[i+1]===void 0&&(r[i+1]=0),r[i+1]+=r[i]/n|0,r[i]%=n)}return r.reverse()}function jt(e,t){var n,i,r;if(t.isZero())return t;i=t.d.length,i<32?(n=Math.ceil(i/3),r=(1/De(4,n)).toString()):(n=16,r="2.3283064365386962890625e-10"),e.precision+=n,t=ue(e,1,t.times(r),new e(1));for(var s=n;s--;){var o=t.times(t);t=o.times(o).minus(o).times(8).plus(1)}return e.precision-=n,t}var C=function(){function e(i,r,s){var o,a=0,u=i.length;for(i=i.slice();u--;)o=i[u]*r+a,i[u]=o%s|0,a=o/s|0;return a&&i.unshift(a),i}function t(i,r,s,o){var a,u;if(s!=o)u=s>o?1:-1;else for(a=u=0;a<s;a++)if(i[a]!=r[a]){u=i[a]>r[a]?1:-1;break}return u}function n(i,r,s,o){for(var a=0;s--;)i[s]-=a,a=i[s]<r[s]?1:0,i[s]=a*o+i[s]-r[s];for(;!i[0]&&i.length>1;)i.shift()}return function(i,r,s,o,a,u){var c,l,f,d,y,N,E,x,O,V,b,k,Q,$,re,pe,G,ve,Y,j,me=i.constructor,oe=i.s==r.s?1:-1,h=i.d,p=r.d;if(!h||!h[0]||!p||!p[0])return new me(!i.s||!r.s||(h?p&&h[0]==p[0]:!p)?NaN:h&&h[0]==0||!p?oe*0:oe/0);for(u?(y=1,l=i.e-r.e):(u=J,y=T,l=q(i.e/y)-q(r.e/y)),Y=p.length,G=h.length,O=new me(oe),V=O.d=[],f=0;p[f]==(h[f]||0);f++);if(p[f]>(h[f]||0)&&l--,s==null?($=s=me.precision,o=me.rounding):a?$=s+(i.e-r.e)+1:$=s,$<0)V.push(1),N=!0;else{if($=$/y+2|0,f=0,Y==1){for(d=0,p=p[0],$++;(f<G||d)&&$--;f++)re=d*u+(h[f]||0),V[f]=re/p|0,d=re%p|0;N=d||f<G}else{for(d=u/(p[0]+1)|0,d>1&&(p=e(p,d,u),h=e(h,d,u),Y=p.length,G=h.length),pe=Y,b=h.slice(0,Y),k=b.length;k<Y;)b[k++]=0;j=p.slice(),j.unshift(0),ve=p[0],p[1]>=u/2&&++ve;do d=0,c=t(p,b,Y,k),c<0?(Q=b[0],Y!=k&&(Q=Q*u+(b[1]||0)),d=Q/ve|0,d>1?(d>=u&&(d=u-1),E=e(p,d,u),x=E.length,k=b.length,c=t(E,b,x,k),c==1&&(d--,n(E,Y<x?j:p,x,u))):(d==0&&(c=d=1),E=p.slice()),x=E.length,x<k&&E.unshift(0),n(b,E,k,u),c==-1&&(k=b.length,c=t(p,b,Y,k),c<1&&(d++,n(b,Y<k?j:p,k,u))),k=b.length):c===0&&(d++,b=[0]),V[f++]=d,c&&b[0]?b[k++]=h[pe]||0:(b=[h[pe]],k=1);while((pe++<G||b[0]!==void 0)&&$--);N=b[0]!==void 0}V[0]||V.shift()}if(y==1)O.e=l,nt=N;else{for(f=1,d=V[0];d>=10;d/=10)f++;O.e=f+l*y-1,v(O,a?s+O.e+1:s,o,N)}return O}}();function v(e,t,n,i){var r,s,o,a,u,c,l,f,d,y=e.constructor;e:if(t!=null){if(f=e.d,!f)return e;for(r=1,a=f[0];a>=10;a/=10)r++;if(s=t-r,s<0)s+=T,o=t,l=f[d=0],u=l/P(10,r-o-1)%10|0;else if(d=Math.ceil((s+1)/T),a=f.length,d>=a)if(i){for(;a++<=d;)f.push(0);l=u=0,r=1,s%=T,o=s-T+1}else break e;else{for(l=a=f[d],r=1;a>=10;a/=10)r++;s%=T,o=s-T+r,u=o<0?0:l/P(10,r-o-1)%10|0}if(i=i||t<0||f[d+1]!==void 0||(o<0?l:l%P(10,r-o-1)),c=n<4?(u||i)&&(n==0||n==(e.s<0?3:2)):u>5||u==5&&(n==4||i||n==6&&(s>0?o>0?l/P(10,r-o):0:f[d-1])%10&1||n==(e.s<0?8:7)),t<1||!f[0])return f.length=0,c?(t-=e.e+1,f[0]=P(10,(T-t%T)%T),e.e=-t||0):f[0]=e.e=0,e;if(s==0?(f.length=d,a=1,d--):(f.length=d+1,a=P(10,T-s),f[d]=o>0?(l/P(10,r-o)%P(10,o)|0)*a:0),c)for(;;)if(d==0){for(s=1,o=f[0];o>=10;o/=10)s++;for(o=f[0]+=a,a=1;o>=10;o/=10)a++;s!=a&&(e.e++,f[0]==J&&(f[0]=1));break}else{if(f[d]+=a,f[d]!=J)break;f[d--]=0,a=1}for(s=f.length;f[--s]===0;)f.pop()}return I&&(e.e>y.maxE?(e.d=null,e.e=NaN):e.e<y.minE&&(e.e=0,e.d=[0])),e}function Z(e,t,n){if(!e.isFinite())return ft(e);var i,r=e.e,s=B(e.d),o=s.length;return t?(n&&(i=n-o)>0?s=s.charAt(0)+"."+s.slice(1)+ne(i):o>1&&(s=s.charAt(0)+"."+s.slice(1)),s=s+(e.e<0?"e":"e+")+e.e):r<0?(s="0."+ne(-r-1)+s,n&&(i=n-o)>0&&(s+=ne(i))):r>=o?(s+=ne(r+1-o),n&&(i=n-r-1)>0&&(s=s+"."+ne(i))):((i=r+1)<o&&(s=s.slice(0,i)+"."+s.slice(i)),n&&(i=n-o)>0&&(r+1===o&&(s+="."),s+=ne(i))),s}function be(e,t){var n=e[0];for(t*=T;n>=10;n/=10)t++;return t}function _e(e,t,n){if(t>Vt)throw I=!0,n&&(e.precision=n),Error(it);return v(new e(Te),t,1,!0)}function z(e,t,n){if(t>Ve)throw Error(it);return v(new e(Ae),t,n,!0)}function at(e){var t=e.length-1,n=t*T+1;if(t=e[t],t){for(;t%10==0;t/=10)n--;for(t=e[0];t>=10;t/=10)n++}return n}function ne(e){for(var t="";e--;)t+="0";return t}function ct(e,t,n,i){var r,s=new e(1),o=Math.ceil(i/T+4);for(I=!1;;){if(n%2&&(s=s.times(t),dt(s.d,o)&&(r=!0)),n=q(n/2),n===0){n=s.d.length-1,r&&s.d[n]===0&&++s.d[n];break}t=t.times(t),dt(t.d,o)}return I=!0,s}function ut(e){return e.d[e.d.length-1]&1}function lt(e,t,n){for(var i,r=new e(t[0]),s=0;++s<t.length;)if(i=new e(t[s]),i.s)r[n](i)&&(r=i);else{r=i;break}return r}function je(e,t){var n,i,r,s,o,a,u,c=0,l=0,f=0,d=e.constructor,y=d.rounding,N=d.precision;if(!e.d||!e.d[0]||e.e>17)return new d(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(t==null?(I=!1,u=N):u=t,a=new d(.03125);e.e>-2;)e=e.times(a),f+=5;for(i=Math.log(P(2,f))/Math.LN10*2+5|0,u+=i,n=s=o=new d(1),d.precision=u;;){if(s=v(s.times(e),u,1),n=n.times(++l),a=o.plus(C(s,n,u,1)),B(a.d).slice(0,u)===B(o.d).slice(0,u)){for(r=f;r--;)o=v(o.times(o),u,1);if(t==null)if(c<3&&Ee(o.d,u-i,y,c))d.precision=u+=10,n=s=a=new d(1),l=0,c++;else return v(o,d.precision=N,y,I=!0);else return d.precision=N,o}o=a}}function ie(e,t){var n,i,r,s,o,a,u,c,l,f,d,y=1,N=10,E=e,x=E.d,O=E.constructor,V=O.rounding,b=O.precision;if(E.s<0||!x||!x[0]||!E.e&&x[0]==1&&x.length==1)return new O(x&&!x[0]?-1/0:E.s!=1?NaN:x?0:E);if(t==null?(I=!1,l=b):l=t,O.precision=l+=N,n=B(x),i=n.charAt(0),Math.abs(s=E.e)<15e14){for(;i<7&&i!=1||i==1&&n.charAt(1)>3;)E=E.times(e),n=B(E.d),i=n.charAt(0),y++;s=E.e,i>1?(E=new O("0."+n),s++):E=new O(i+"."+n.slice(1))}else return c=_e(O,l+2,b).times(s+""),E=ie(new O(i+"."+n.slice(1)),l-N).plus(c),O.precision=b,t==null?v(E,b,V,I=!0):E;for(f=E,u=o=E=C(E.minus(1),E.plus(1),l,1),d=v(E.times(E),l,1),r=3;;){if(o=v(o.times(d),l,1),c=u.plus(C(o,new O(r),l,1)),B(c.d).slice(0,l)===B(u.d).slice(0,l))if(u=u.times(2),s!==0&&(u=u.plus(_e(O,l+2,b).times(s+""))),u=C(u,new O(y),l,1),t==null)if(Ee(u.d,l-N,V,a))O.precision=l+=N,c=o=E=C(f.minus(1),f.plus(1),l,1),d=v(E.times(E),l,1),r=a=1;else return v(u,O.precision=b,V,I=!0);else return O.precision=b,u;u=c,r+=2}}function ft(e){return String(e.s*e.s/0)}function $e(e,t){var n,i,r;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(i=t.search(/e/i))>0?(n<0&&(n=i),n+=+t.slice(i+1),t=t.substring(0,i)):n<0&&(n=t.length),i=0;t.charCodeAt(i)===48;i++);for(r=t.length;t.charCodeAt(r-1)===48;--r);if(t=t.slice(i,r),t){if(r-=i,e.e=n=n-i-1,e.d=[],i=(n+1)%T,n<0&&(i+=T),i<r){for(i&&e.d.push(+t.slice(0,i)),r-=T;i<r;)e.d.push(+t.slice(i,i+=T));t=t.slice(i),i=T-t.length}else i-=r;for(;i--;)t+="0";e.d.push(+t),I&&(e.e>e.constructor.maxE?(e.d=null,e.e=NaN):e.e<e.constructor.minE&&(e.e=0,e.d=[0]))}else e.e=0,e.d=[0];return e}function $t(e,t){var n,i,r,s,o,a,u,c,l;if(t.indexOf("_")>-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),ot.test(t))return $e(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(Bt.test(t))n=16,t=t.toLowerCase();else if(Mt.test(t))n=2;else if(Ut.test(t))n=8;else throw Error(te+t);for(s=t.search(/p/i),s>0?(u=+t.slice(s+1),t=t.substring(2,s)):t=t.slice(2),s=t.indexOf("."),o=s>=0,i=e.constructor,o&&(t=t.replace(".",""),a=t.length,s=a-s,r=ct(i,new i(n),s,s*2)),c=Oe(t,n,J),l=c.length-1,s=l;c[s]===0;--s)c.pop();return s<0?new i(e.s*0):(e.e=be(c,l),e.d=c,I=!1,o&&(e=C(e,r,a*4)),u&&(e=e.times(Math.abs(u)<54?P(2,u):le.pow(2,u))),I=!0,e)}function Ht(e,t){var n,i=t.d.length;if(i<3)return t.isZero()?t:ue(e,2,t,t);n=1.4*Math.sqrt(i),n=n>16?16:n|0,t=t.times(1/De(5,n)),t=ue(e,2,t,t);for(var r,s=new e(5),o=new e(16),a=new e(20);n--;)r=t.times(t),t=t.times(s.plus(r.times(o.times(r).minus(a))));return t}function ue(e,t,n,i,r){var s,o,a,u,c=e.precision,l=Math.ceil(c/T);for(I=!1,u=n.times(n),a=new e(i);;){if(o=C(a.times(u),new e(t++*t++),c,1),a=r?i.plus(o):i.minus(o),i=C(o.times(u),new e(t++*t++),c,1),o=a.plus(i),o.d[l]!==void 0){for(s=l;o.d[s]===a.d[s]&&s--;);if(s==-1)break}s=a,a=i,i=o,o=s}return I=!0,o.d.length=l+1,o}function De(e,t){for(var n=e;--t;)n*=e;return n}function ht(e,t){var n,i=t.s<0,r=z(e,e.precision,1),s=r.times(.5);if(t=t.abs(),t.lte(s))return W=i?4:1,t;if(n=t.divToInt(r),n.isZero())W=i?3:2;else{if(t=t.minus(n.times(r)),t.lte(s))return W=ut(n)?i?2:3:i?4:1,t;W=ut(n)?i?1:4:i?3:2}return t.minus(r).abs()}function He(e,t,n,i){var r,s,o,a,u,c,l,f,d,y=e.constructor,N=n!==void 0;if(N?(H(n,1,ee),i===void 0?i=y.rounding:H(i,0,8)):(n=y.precision,i=y.rounding),!e.isFinite())l=ft(e);else{for(l=Z(e),o=l.indexOf("."),N?(r=2,t==16?n=n*4-3:t==8&&(n=n*3-2)):r=t,o>=0&&(l=l.replace(".",""),d=new y(1),d.e=l.length-o,d.d=Oe(Z(d),10,r),d.e=d.d.length),f=Oe(l,10,r),s=u=f.length;f[--u]==0;)f.pop();if(!f[0])l=N?"0p+0":"0";else{if(o<0?s--:(e=new y(e),e.d=f,e.e=s,e=C(e,d,n,i,0,r),f=e.d,s=e.e,c=nt),o=f[n],a=r/2,c=c||f[n+1]!==void 0,c=i<4?(o!==void 0||c)&&(i===0||i===(e.s<0?3:2)):o>a||o===a&&(i===4||c||i===6&&f[n-1]&1||i===(e.s<0?8:7)),f.length=n,c)for(;++f[--n]>r-1;)f[n]=0,n||(++s,f.unshift(1));for(u=f.length;!f[u-1];--u);for(o=0,l="";o<u;o++)l+=Ue.charAt(f[o]);if(N){if(u>1)if(t==16||t==8){for(o=t==16?4:3,--u;u%o;u++)l+="0";for(f=Oe(l,r,t),u=f.length;!f[u-1];--u);for(o=1,l="1.";o<u;o++)l+=Ue.charAt(f[o])}else l=l.charAt(0)+"."+l.slice(1);l=l+(s<0?"p":"p+")+s}else if(s<0){for(;++s;)l="0"+l;l="0."+l}else if(++s>u)for(s-=u;s--;)l+="0";else s<u&&(l=l.slice(0,s)+"."+l.slice(s))}l=(t==16?"0x":t==2?"0b":t==8?"0o":"")+l}return e.s<0?"-"+l:l}function dt(e,t){if(e.length>t)return e.length=t,!0}function Gt(e){return new this(e).abs()}function Yt(e){return new this(e).acos()}function Jt(e){return new this(e).acosh()}function zt(e,t){return new this(e).plus(t)}function Xt(e){return new this(e).asin()}function Qt(e){return new this(e).asinh()}function Zt(e){return new this(e).atan()}function Wt(e){return new this(e).atanh()}function Kt(e,t){e=new this(e),t=new this(t);var n,i=this.precision,r=this.rounding,s=i+4;return!e.s||!t.s?n=new this(NaN):!e.d&&!t.d?(n=z(this,s,1).times(t.s>0?.25:.75),n.s=e.s):!t.d||e.isZero()?(n=t.s<0?z(this,i,r):new this(0),n.s=e.s):!e.d||t.isZero()?(n=z(this,s,1).times(.5),n.s=e.s):t.s<0?(this.precision=s,this.rounding=1,n=this.atan(C(e,t,s,1)),t=z(this,s,1),this.precision=i,this.rounding=r,n=e.s<0?n.minus(t):n.plus(t)):n=this.atan(C(e,t,s,1)),n}function en(e){return new this(e).cbrt()}function tn(e){return v(e=new this(e),e.e+1,2)}function nn(e,t,n){return new this(e).clamp(t,n)}function rn(e){if(!e||typeof e!="object")throw Error(Ie+"Object expected");var t,n,i,r=e.defaults===!0,s=["precision",1,ee,"rounding",0,8,"toExpNeg",-ce,0,"toExpPos",0,ce,"maxE",0,ce,"minE",-ce,0,"modulo",0,9];for(t=0;t<s.length;t+=3)if(n=s[t],r&&(this[n]=qe[n]),(i=e[n])!==void 0)if(q(i)===i&&i>=s[t+1]&&i<=s[t+2])this[n]=i;else throw Error(te+n+": "+i);if(n="crypto",r&&(this[n]=qe[n]),(i=e[n])!==void 0)if(i===!0||i===!1||i===0||i===1)if(i)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[n]=!0;else throw Error(rt);else this[n]=!1;else throw Error(te+n+": "+i);return this}function sn(e){return new this(e).cos()}function on(e){return new this(e).cosh()}function pt(e){var t,n,i;function r(s){var o,a,u,c=this;if(!(c instanceof r))return new r(s);if(c.constructor=r,mt(s)){c.s=s.s,I?!s.d||s.e>r.maxE?(c.e=NaN,c.d=null):s.e<r.minE?(c.e=0,c.d=[0]):(c.e=s.e,c.d=s.d.slice()):(c.e=s.e,c.d=s.d?s.d.slice():s.d);return}if(u=typeof s,u==="number"){if(s===0){c.s=1/s<0?-1:1,c.e=0,c.d=[0];return}if(s<0?(s=-s,c.s=-1):c.s=1,s===~~s&&s<1e7){for(o=0,a=s;a>=10;a/=10)o++;I?o>r.maxE?(c.e=NaN,c.d=null):o<r.minE?(c.e=0,c.d=[0]):(c.e=o,c.d=[s]):(c.e=o,c.d=[s]);return}else if(s*0!==0){s||(c.s=NaN),c.e=NaN,c.d=null;return}return $e(c,s.toString())}else if(u!=="string")throw Error(te+s);return(a=s.charCodeAt(0))===45?(s=s.slice(1),c.s=-1):(a===43&&(s=s.slice(1)),c.s=1),ot.test(s)?$e(c,s):$t(c,s)}if(r.prototype=g,r.ROUND_UP=0,r.ROUND_DOWN=1,r.ROUND_CEIL=2,r.ROUND_FLOOR=3,r.ROUND_HALF_UP=4,r.ROUND_HALF_DOWN=5,r.ROUND_HALF_EVEN=6,r.ROUND_HALF_CEIL=7,r.ROUND_HALF_FLOOR=8,r.EUCLID=9,r.config=r.set=rn,r.clone=pt,r.isDecimal=mt,r.abs=Gt,r.acos=Yt,r.acosh=Jt,r.add=zt,r.asin=Xt,r.asinh=Qt,r.atan=Zt,r.atanh=Wt,r.atan2=Kt,r.cbrt=en,r.ceil=tn,r.clamp=nn,r.cos=sn,r.cosh=on,r.div=an,r.exp=cn,r.floor=un,r.hypot=ln,r.ln=fn,r.log=hn,r.log10=pn,r.log2=dn,r.max=mn,r.min=gn,r.mod=En,r.mul=yn,r.pow=Nn,r.random=wn,r.round=vn,r.sign=Tn,r.sin=An,r.sinh=In,r.sqrt=On,r.sub=bn,r.sum=_n,r.tan=Dn,r.tanh=Sn,r.trunc=xn,e===void 0&&(e={}),e&&e.defaults!==!0)for(i=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],t=0;t<i.length;)e.hasOwnProperty(n=i[t++])||(e[n]=this[n]);return r.config(e),r}function an(e,t){return new this(e).div(t)}function cn(e){return new this(e).exp()}function un(e){return v(e=new this(e),e.e+1,3)}function ln(){var e,t,n=new this(0);for(I=!1,e=0;e<arguments.length;)if(t=new this(arguments[e++]),t.d)n.d&&(n=n.plus(t.times(t)));else{if(t.s)return I=!0,new this(1/0);n=t}return I=!0,n.sqrt()}function mt(e){return e instanceof le||e&&e.toStringTag===st||!1}function fn(e){return new this(e).ln()}function hn(e,t){return new this(e).log(t)}function dn(e){return new this(e).log(2)}function pn(e){return new this(e).log(10)}function mn(){return lt(this,arguments,"lt")}function gn(){return lt(this,arguments,"gt")}function En(e,t){return new this(e).mod(t)}function yn(e,t){return new this(e).mul(t)}function Nn(e,t){return new this(e).pow(t)}function wn(e){var t,n,i,r,s=0,o=new this(1),a=[];if(e===void 0?e=this.precision:H(e,1,ee),i=Math.ceil(e/T),this.crypto)if(crypto.getRandomValues)for(t=crypto.getRandomValues(new Uint32Array(i));s<i;)r=t[s],r>=429e7?t[s]=crypto.getRandomValues(new Uint32Array(1))[0]:a[s++]=r%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(i*=4);s<i;)r=t[s]+(t[s+1]<<8)+(t[s+2]<<16)+((t[s+3]&127)<<24),r>=214e7?crypto.randomBytes(4).copy(t,s):(a.push(r%1e7),s+=4);s=i/4}else throw Error(rt);else for(;s<i;)a[s++]=Math.random()*1e7|0;for(i=a[--s],e%=T,i&&e&&(r=P(10,T-e),a[s]=(i/r|0)*r);a[s]===0;s--)a.pop();if(s<0)n=0,a=[0];else{for(n=-1;a[0]===0;n-=T)a.shift();for(i=1,r=a[0];r>=10;r/=10)i++;i<T&&(n-=T-i)}return o.e=n,o.d=a,o}function vn(e){return v(e=new this(e),e.e+1,this.rounding)}function Tn(e){return e=new this(e),e.d?e.d[0]?e.s:0*e.s:e.s||NaN}function An(e){return new this(e).sin()}function In(e){return new this(e).sinh()}function On(e){return new this(e).sqrt()}function bn(e,t){return new this(e).sub(t)}function _n(){var e=0,t=arguments,n=new this(t[e]);for(I=!1;n.s&&++e<t.length;)n=n.plus(t[e]);return I=!0,v(n,this.precision,this.rounding)}function Dn(e){return new this(e).tan()}function Sn(e){return new this(e).tanh()}function xn(e){return v(e=new this(e),e.e+1,1)}g[Symbol.for("nodejs.util.inspect.custom")]=g.toString,g[Symbol.toStringTag]="Decimal";var le=g.constructor=pt(qe);Te=new le(Te),Ae=new le(Ae);const Ge=JSON,Cn=e=>e.toUpperCase(),kn=e=>{const t={};return e.forEach((n,i)=>{t[i]=n}),t},Rn=(e,t,n)=>e.document?e:{document:e,variables:t,requestHeaders:n,signal:void 0},Ln=(e,t,n)=>e.query?e:{query:e,variables:t,requestHeaders:n,signal:void 0},Fn=(e,t)=>e.documents?e:{documents:e,requestHeaders:t,signal:void 0};function Se(e,t){if(!!!e)throw new Error(t)}function Pn(e){return typeof e=="object"&&e!==null}function Mn(e,t){if(!!!e)throw new Error("Unexpected invariant triggered.")}const Bn=/\r\n|[\n\r]/g;function Ye(e,t){let n=0,i=1;for(const r of e.body.matchAll(Bn)){if(typeof r.index=="number"||Mn(!1),r.index>=t)break;n=r.index+r[0].length,i+=1}return{line:i,column:t+1-n}}function Un(e){return gt(e.source,Ye(e.source,e.start))}function gt(e,t){const n=e.locationOffset.column-1,i="".padStart(n)+e.body,r=t.line-1,s=e.locationOffset.line-1,o=t.line+s,a=t.line===1?n:0,u=t.column+a,c=`${e.name}:${o}:${u}
|
|
7
|
+
*/var ce=9e15,ee=1e9,Ue="0123456789abcdef",Te="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",Ae="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",qe={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-ce,maxE:ce,crypto:!1},nt,W,I=!0,Ie="[DecimalError] ",te=Ie+"Invalid argument: ",it=Ie+"Precision limit exceeded",rt=Ie+"crypto unavailable",st="[object Decimal]",q=Math.floor,P=Math.pow,Mt=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,Bt=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,Ut=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,ot=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,J=1e7,T=7,qt=9007199254740991,Vt=Te.length-1,Ve=Ae.length-1,g={toStringTag:st};g.absoluteValue=g.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),v(e)},g.ceil=function(){return v(new this.constructor(this),this.e+1,2)},g.clampedTo=g.clamp=function(e,t){var n,i=this,r=i.constructor;if(e=new r(e),t=new r(t),!e.s||!t.s)return new r(NaN);if(e.gt(t))throw Error(te+t);return n=i.cmp(e),n<0?e:i.cmp(t)>0?t:new r(i)},g.comparedTo=g.cmp=function(e){var t,n,i,r,s=this,o=s.d,a=(e=new s.constructor(e)).d,u=s.s,c=e.s;if(!o||!a)return!u||!c?NaN:u!==c?u:o===a?0:!o^u<0?1:-1;if(!o[0]||!a[0])return o[0]?u:a[0]?-c:0;if(u!==c)return u;if(s.e!==e.e)return s.e>e.e^u<0?1:-1;for(i=o.length,r=a.length,t=0,n=i<r?i:r;t<n;++t)if(o[t]!==a[t])return o[t]>a[t]^u<0?1:-1;return i===r?0:i>r^u<0?1:-1},g.cosine=g.cos=function(){var e,t,n=this,i=n.constructor;return n.d?n.d[0]?(e=i.precision,t=i.rounding,i.precision=e+Math.max(n.e,n.sd())+T,i.rounding=1,n=jt(i,ht(i,n)),i.precision=e,i.rounding=t,v(W==2||W==3?n.neg():n,e,t,!0)):new i(1):new i(NaN)},g.cubeRoot=g.cbrt=function(){var e,t,n,i,r,s,o,a,u,c,l=this,f=l.constructor;if(!l.isFinite()||l.isZero())return new f(l);for(I=!1,s=l.s*P(l.s*l,1/3),!s||Math.abs(s)==1/0?(n=B(l.d),e=l.e,(s=(e-n.length+1)%3)&&(n+=s==1||s==-2?"0":"00"),s=P(n,1/3),e=q((e+1)/3)-(e%3==(e<0?-1:2)),s==1/0?n="5e"+e:(n=s.toExponential(),n=n.slice(0,n.indexOf("e")+1)+e),i=new f(n),i.s=l.s):i=new f(s.toString()),o=(e=f.precision)+3;;)if(a=i,u=a.times(a).times(a),c=u.plus(l),i=C(c.plus(l).times(a),c.plus(u),o+2,1),B(a.d).slice(0,o)===(n=B(i.d)).slice(0,o))if(n=n.slice(o-3,o+1),n=="9999"||!r&&n=="4999"){if(!r&&(v(a,e+1,0),a.times(a).times(a).eq(l))){i=a;break}o+=4,r=1}else{(!+n||!+n.slice(1)&&n.charAt(0)=="5")&&(v(i,e+1,1),t=!i.times(i).times(i).eq(l));break}return I=!0,v(i,e,f.rounding,t)},g.decimalPlaces=g.dp=function(){var e,t=this.d,n=NaN;if(t){if(e=t.length-1,n=(e-q(this.e/T))*T,e=t[e],e)for(;e%10==0;e/=10)n--;n<0&&(n=0)}return n},g.dividedBy=g.div=function(e){return C(this,new this.constructor(e))},g.dividedToIntegerBy=g.divToInt=function(e){var t=this,n=t.constructor;return v(C(t,new n(e),0,1,1),n.precision,n.rounding)},g.equals=g.eq=function(e){return this.cmp(e)===0},g.floor=function(){return v(new this.constructor(this),this.e+1,3)},g.greaterThan=g.gt=function(e){return this.cmp(e)>0},g.greaterThanOrEqualTo=g.gte=function(e){var t=this.cmp(e);return t==1||t===0},g.hyperbolicCosine=g.cosh=function(){var e,t,n,i,r,s=this,o=s.constructor,a=new o(1);if(!s.isFinite())return new o(s.s?1/0:NaN);if(s.isZero())return a;n=o.precision,i=o.rounding,o.precision=n+Math.max(s.e,s.sd())+4,o.rounding=1,r=s.d.length,r<32?(e=Math.ceil(r/3),t=(1/De(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),s=ue(o,1,s.times(t),new o(1),!0);for(var u,c=e,l=new o(8);c--;)u=s.times(s),s=a.minus(u.times(l.minus(u.times(l))));return v(s,o.precision=n,o.rounding=i,!0)},g.hyperbolicSine=g.sinh=function(){var e,t,n,i,r=this,s=r.constructor;if(!r.isFinite()||r.isZero())return new s(r);if(t=s.precision,n=s.rounding,s.precision=t+Math.max(r.e,r.sd())+4,s.rounding=1,i=r.d.length,i<3)r=ue(s,2,r,r,!0);else{e=1.4*Math.sqrt(i),e=e>16?16:e|0,r=r.times(1/De(5,e)),r=ue(s,2,r,r,!0);for(var o,a=new s(5),u=new s(16),c=new s(20);e--;)o=r.times(r),r=r.times(a.plus(o.times(u.times(o).plus(c))))}return s.precision=t,s.rounding=n,v(r,t,n,!0)},g.hyperbolicTangent=g.tanh=function(){var e,t,n=this,i=n.constructor;return n.isFinite()?n.isZero()?new i(n):(e=i.precision,t=i.rounding,i.precision=e+7,i.rounding=1,C(n.sinh(),n.cosh(),i.precision=e,i.rounding=t)):new i(n.s)},g.inverseCosine=g.acos=function(){var e,t=this,n=t.constructor,i=t.abs().cmp(1),r=n.precision,s=n.rounding;return i!==-1?i===0?t.isNeg()?z(n,r,s):new n(0):new n(NaN):t.isZero()?z(n,r+4,s).times(.5):(n.precision=r+6,n.rounding=1,t=t.asin(),e=z(n,r+4,s).times(.5),n.precision=r,n.rounding=s,e.minus(t))},g.inverseHyperbolicCosine=g.acosh=function(){var e,t,n=this,i=n.constructor;return n.lte(1)?new i(n.eq(1)?0:NaN):n.isFinite()?(e=i.precision,t=i.rounding,i.precision=e+Math.max(Math.abs(n.e),n.sd())+4,i.rounding=1,I=!1,n=n.times(n).minus(1).sqrt().plus(n),I=!0,i.precision=e,i.rounding=t,n.ln()):new i(n)},g.inverseHyperbolicSine=g.asinh=function(){var e,t,n=this,i=n.constructor;return!n.isFinite()||n.isZero()?new i(n):(e=i.precision,t=i.rounding,i.precision=e+2*Math.max(Math.abs(n.e),n.sd())+6,i.rounding=1,I=!1,n=n.times(n).plus(1).sqrt().plus(n),I=!0,i.precision=e,i.rounding=t,n.ln())},g.inverseHyperbolicTangent=g.atanh=function(){var e,t,n,i,r=this,s=r.constructor;return r.isFinite()?r.e>=0?new s(r.abs().eq(1)?r.s/0:r.isZero()?r:NaN):(e=s.precision,t=s.rounding,i=r.sd(),Math.max(i,e)<2*-r.e-1?v(new s(r),e,t,!0):(s.precision=n=i-r.e,r=C(r.plus(1),new s(1).minus(r),n+e,1),s.precision=e+4,s.rounding=1,r=r.ln(),s.precision=e,s.rounding=t,r.times(.5))):new s(NaN)},g.inverseSine=g.asin=function(){var e,t,n,i,r=this,s=r.constructor;return r.isZero()?new s(r):(t=r.abs().cmp(1),n=s.precision,i=s.rounding,t!==-1?t===0?(e=z(s,n+4,i).times(.5),e.s=r.s,e):new s(NaN):(s.precision=n+6,s.rounding=1,r=r.div(new s(1).minus(r.times(r)).sqrt().plus(1)).atan(),s.precision=n,s.rounding=i,r.times(2)))},g.inverseTangent=g.atan=function(){var e,t,n,i,r,s,o,a,u,c=this,l=c.constructor,f=l.precision,d=l.rounding;if(c.isFinite()){if(c.isZero())return new l(c);if(c.abs().eq(1)&&f+4<=Ve)return o=z(l,f+4,d).times(.25),o.s=c.s,o}else{if(!c.s)return new l(NaN);if(f+4<=Ve)return o=z(l,f+4,d).times(.5),o.s=c.s,o}for(l.precision=a=f+10,l.rounding=1,n=Math.min(28,a/T+2|0),e=n;e;--e)c=c.div(c.times(c).plus(1).sqrt().plus(1));for(I=!1,t=Math.ceil(a/T),i=1,u=c.times(c),o=new l(c),r=c;e!==-1;)if(r=r.times(u),s=o.minus(r.div(i+=2)),r=r.times(u),o=s.plus(r.div(i+=2)),o.d[t]!==void 0)for(e=t;o.d[e]===s.d[e]&&e--;);return n&&(o=o.times(2<<n-1)),I=!0,v(o,l.precision=f,l.rounding=d,!0)},g.isFinite=function(){return!!this.d},g.isInteger=g.isInt=function(){return!!this.d&&q(this.e/T)>this.d.length-2},g.isNaN=function(){return!this.s},g.isNegative=g.isNeg=function(){return this.s<0},g.isPositive=g.isPos=function(){return this.s>0},g.isZero=function(){return!!this.d&&this.d[0]===0},g.lessThan=g.lt=function(e){return this.cmp(e)<0},g.lessThanOrEqualTo=g.lte=function(e){return this.cmp(e)<1},g.logarithm=g.log=function(e){var t,n,i,r,s,o,a,u,c=this,l=c.constructor,f=l.precision,d=l.rounding,y=5;if(e==null)e=new l(10),t=!0;else{if(e=new l(e),n=e.d,e.s<0||!n||!n[0]||e.eq(1))return new l(NaN);t=e.eq(10)}if(n=c.d,c.s<0||!n||!n[0]||c.eq(1))return new l(n&&!n[0]?-1/0:c.s!=1?NaN:n?0:1/0);if(t)if(n.length>1)s=!0;else{for(r=n[0];r%10===0;)r/=10;s=r!==1}if(I=!1,a=f+y,o=ie(c,a),i=t?_e(l,a+10):ie(e,a),u=C(o,i,a,1),Ee(u.d,r=f,d))do if(a+=10,o=ie(c,a),i=t?_e(l,a+10):ie(e,a),u=C(o,i,a,1),!s){+B(u.d).slice(r+1,r+15)+1==1e14&&(u=v(u,f+1,0));break}while(Ee(u.d,r+=10,d));return I=!0,v(u,f,d)},g.minus=g.sub=function(e){var t,n,i,r,s,o,a,u,c,l,f,d,y=this,N=y.constructor;if(e=new N(e),!y.d||!e.d)return!y.s||!e.s?e=new N(NaN):y.d?e.s=-e.s:e=new N(e.d||y.s!==e.s?y:NaN),e;if(y.s!=e.s)return e.s=-e.s,y.plus(e);if(c=y.d,d=e.d,a=N.precision,u=N.rounding,!c[0]||!d[0]){if(d[0])e.s=-e.s;else if(c[0])e=new N(y);else return new N(u===3?-0:0);return I?v(e,a,u):e}if(n=q(e.e/T),l=q(y.e/T),c=c.slice(),s=l-n,s){for(f=s<0,f?(t=c,s=-s,o=d.length):(t=d,n=l,o=c.length),i=Math.max(Math.ceil(a/T),o)+2,s>i&&(s=i,t.length=1),t.reverse(),i=s;i--;)t.push(0);t.reverse()}else{for(i=c.length,o=d.length,f=i<o,f&&(o=i),i=0;i<o;i++)if(c[i]!=d[i]){f=c[i]<d[i];break}s=0}for(f&&(t=c,c=d,d=t,e.s=-e.s),o=c.length,i=d.length-o;i>0;--i)c[o++]=0;for(i=d.length;i>s;){if(c[--i]<d[i]){for(r=i;r&&c[--r]===0;)c[r]=J-1;--c[r],c[i]+=J}c[i]-=d[i]}for(;c[--o]===0;)c.pop();for(;c[0]===0;c.shift())--n;return c[0]?(e.d=c,e.e=be(c,n),I?v(e,a,u):e):new N(u===3?-0:0)},g.modulo=g.mod=function(e){var t,n=this,i=n.constructor;return e=new i(e),!n.d||!e.s||e.d&&!e.d[0]?new i(NaN):!e.d||n.d&&!n.d[0]?v(new i(n),i.precision,i.rounding):(I=!1,i.modulo==9?(t=C(n,e.abs(),0,3,1),t.s*=e.s):t=C(n,e,0,i.modulo,1),t=t.times(e),I=!0,n.minus(t))},g.naturalExponential=g.exp=function(){return je(this)},g.naturalLogarithm=g.ln=function(){return ie(this)},g.negated=g.neg=function(){var e=new this.constructor(this);return e.s=-e.s,v(e)},g.plus=g.add=function(e){var t,n,i,r,s,o,a,u,c,l,f=this,d=f.constructor;if(e=new d(e),!f.d||!e.d)return!f.s||!e.s?e=new d(NaN):f.d||(e=new d(e.d||f.s===e.s?f:NaN)),e;if(f.s!=e.s)return e.s=-e.s,f.minus(e);if(c=f.d,l=e.d,a=d.precision,u=d.rounding,!c[0]||!l[0])return l[0]||(e=new d(f)),I?v(e,a,u):e;if(s=q(f.e/T),i=q(e.e/T),c=c.slice(),r=s-i,r){for(r<0?(n=c,r=-r,o=l.length):(n=l,i=s,o=c.length),s=Math.ceil(a/T),o=s>o?s+1:o+1,r>o&&(r=o,n.length=1),n.reverse();r--;)n.push(0);n.reverse()}for(o=c.length,r=l.length,o-r<0&&(r=o,n=l,l=c,c=n),t=0;r;)t=(c[--r]=c[r]+l[r]+t)/J|0,c[r]%=J;for(t&&(c.unshift(t),++i),o=c.length;c[--o]==0;)c.pop();return e.d=c,e.e=be(c,i),I?v(e,a,u):e},g.precision=g.sd=function(e){var t,n=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(te+e);return n.d?(t=at(n.d),e&&n.e+1>t&&(t=n.e+1)):t=NaN,t},g.round=function(){var e=this,t=e.constructor;return v(new t(e),e.e+1,t.rounding)},g.sine=g.sin=function(){var e,t,n=this,i=n.constructor;return n.isFinite()?n.isZero()?new i(n):(e=i.precision,t=i.rounding,i.precision=e+Math.max(n.e,n.sd())+T,i.rounding=1,n=Ht(i,ht(i,n)),i.precision=e,i.rounding=t,v(W>2?n.neg():n,e,t,!0)):new i(NaN)},g.squareRoot=g.sqrt=function(){var e,t,n,i,r,s,o=this,a=o.d,u=o.e,c=o.s,l=o.constructor;if(c!==1||!a||!a[0])return new l(!c||c<0&&(!a||a[0])?NaN:a?o:1/0);for(I=!1,c=Math.sqrt(+o),c==0||c==1/0?(t=B(a),(t.length+u)%2==0&&(t+="0"),c=Math.sqrt(t),u=q((u+1)/2)-(u<0||u%2),c==1/0?t="5e"+u:(t=c.toExponential(),t=t.slice(0,t.indexOf("e")+1)+u),i=new l(t)):i=new l(c.toString()),n=(u=l.precision)+3;;)if(s=i,i=s.plus(C(o,s,n+2,1)).times(.5),B(s.d).slice(0,n)===(t=B(i.d)).slice(0,n))if(t=t.slice(n-3,n+1),t=="9999"||!r&&t=="4999"){if(!r&&(v(s,u+1,0),s.times(s).eq(o))){i=s;break}n+=4,r=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(v(i,u+1,1),e=!i.times(i).eq(o));break}return I=!0,v(i,u,l.rounding,e)},g.tangent=g.tan=function(){var e,t,n=this,i=n.constructor;return n.isFinite()?n.isZero()?new i(n):(e=i.precision,t=i.rounding,i.precision=e+10,i.rounding=1,n=n.sin(),n.s=1,n=C(n,new i(1).minus(n.times(n)).sqrt(),e+10,0),i.precision=e,i.rounding=t,v(W==2||W==4?n.neg():n,e,t,!0)):new i(NaN)},g.times=g.mul=function(e){var t,n,i,r,s,o,a,u,c,l=this,f=l.constructor,d=l.d,y=(e=new f(e)).d;if(e.s*=l.s,!d||!d[0]||!y||!y[0])return new f(!e.s||d&&!d[0]&&!y||y&&!y[0]&&!d?NaN:!d||!y?e.s/0:e.s*0);for(n=q(l.e/T)+q(e.e/T),u=d.length,c=y.length,u<c&&(s=d,d=y,y=s,o=u,u=c,c=o),s=[],o=u+c,i=o;i--;)s.push(0);for(i=c;--i>=0;){for(t=0,r=u+i;r>i;)a=s[r]+y[i]*d[r-i-1]+t,s[r--]=a%J|0,t=a/J|0;s[r]=(s[r]+t)%J|0}for(;!s[--o];)s.pop();return t?++n:s.shift(),e.d=s,e.e=be(s,n),I?v(e,f.precision,f.rounding):e},g.toBinary=function(e,t){return He(this,2,e,t)},g.toDecimalPlaces=g.toDP=function(e,t){var n=this,i=n.constructor;return n=new i(n),e===void 0?n:(H(e,0,ee),t===void 0?t=i.rounding:H(t,0,8),v(n,e+n.e+1,t))},g.toExponential=function(e,t){var n,i=this,r=i.constructor;return e===void 0?n=Z(i,!0):(H(e,0,ee),t===void 0?t=r.rounding:H(t,0,8),i=v(new r(i),e+1,t),n=Z(i,!0,e+1)),i.isNeg()&&!i.isZero()?"-"+n:n},g.toFixed=function(e,t){var n,i,r=this,s=r.constructor;return e===void 0?n=Z(r):(H(e,0,ee),t===void 0?t=s.rounding:H(t,0,8),i=v(new s(r),e+r.e+1,t),n=Z(i,!1,e+i.e+1)),r.isNeg()&&!r.isZero()?"-"+n:n},g.toFraction=function(e){var t,n,i,r,s,o,a,u,c,l,f,d,y=this,N=y.d,E=y.constructor;if(!N)return new E(y);if(c=n=new E(1),i=u=new E(0),t=new E(i),s=t.e=at(N)-y.e-1,o=s%T,t.d[0]=P(10,o<0?T+o:o),e==null)e=s>0?t:c;else{if(a=new E(e),!a.isInt()||a.lt(c))throw Error(te+a);e=a.gt(t)?s>0?t:c:a}for(I=!1,a=new E(B(N)),l=E.precision,E.precision=s=N.length*T*2;f=C(a,t,0,1,1),r=n.plus(f.times(i)),r.cmp(e)!=1;)n=i,i=r,r=c,c=u.plus(f.times(r)),u=r,r=t,t=a.minus(f.times(r)),a=r;return r=C(e.minus(n),i,0,1,1),u=u.plus(r.times(c)),n=n.plus(r.times(i)),u.s=c.s=y.s,d=C(c,i,s,1).minus(y).abs().cmp(C(u,n,s,1).minus(y).abs())<1?[c,i]:[u,n],E.precision=l,I=!0,d},g.toHexadecimal=g.toHex=function(e,t){return He(this,16,e,t)},g.toNearest=function(e,t){var n=this,i=n.constructor;if(n=new i(n),e==null){if(!n.d)return n;e=new i(1),t=i.rounding}else{if(e=new i(e),t===void 0?t=i.rounding:H(t,0,8),!n.d)return e.s?n:e;if(!e.d)return e.s&&(e.s=n.s),e}return e.d[0]?(I=!1,n=C(n,e,0,t,1).times(e),I=!0,v(n)):(e.s=n.s,n=e),n},g.toNumber=function(){return+this},g.toOctal=function(e,t){return He(this,8,e,t)},g.toPower=g.pow=function(e){var t,n,i,r,s,o,a=this,u=a.constructor,c=+(e=new u(e));if(!a.d||!e.d||!a.d[0]||!e.d[0])return new u(P(+a,c));if(a=new u(a),a.eq(1))return a;if(i=u.precision,s=u.rounding,e.eq(1))return v(a,i,s);if(t=q(e.e/T),t>=e.d.length-1&&(n=c<0?-c:c)<=qt)return r=ct(u,a,n,i),e.s<0?new u(1).div(r):v(r,i,s);if(o=a.s,o<0){if(t<e.d.length-1)return new u(NaN);if((e.d[t]&1)==0&&(o=1),a.e==0&&a.d[0]==1&&a.d.length==1)return a.s=o,a}return n=P(+a,c),t=n==0||!isFinite(n)?q(c*(Math.log("0."+B(a.d))/Math.LN10+a.e+1)):new u(n+"").e,t>u.maxE+1||t<u.minE-1?new u(t>0?o/0:0):(I=!1,u.rounding=a.s=1,n=Math.min(12,(t+"").length),r=je(e.times(ie(a,i+n)),i),r.d&&(r=v(r,i+5,1),Ee(r.d,i,s)&&(t=i+10,r=v(je(e.times(ie(a,t+n)),t),t+5,1),+B(r.d).slice(i+1,i+15)+1==1e14&&(r=v(r,i+1,0)))),r.s=o,I=!0,u.rounding=s,v(r,i,s))},g.toPrecision=function(e,t){var n,i=this,r=i.constructor;return e===void 0?n=Z(i,i.e<=r.toExpNeg||i.e>=r.toExpPos):(H(e,1,ee),t===void 0?t=r.rounding:H(t,0,8),i=v(new r(i),e,t),n=Z(i,e<=i.e||i.e<=r.toExpNeg,e)),i.isNeg()&&!i.isZero()?"-"+n:n},g.toSignificantDigits=g.toSD=function(e,t){var n=this,i=n.constructor;return e===void 0?(e=i.precision,t=i.rounding):(H(e,1,ee),t===void 0?t=i.rounding:H(t,0,8)),v(new i(n),e,t)},g.toString=function(){var e=this,t=e.constructor,n=Z(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+n:n},g.truncated=g.trunc=function(){return v(new this.constructor(this),this.e+1,1)},g.valueOf=g.toJSON=function(){var e=this,t=e.constructor,n=Z(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+n:n};function B(e){var t,n,i,r=e.length-1,s="",o=e[0];if(r>0){for(s+=o,t=1;t<r;t++)i=e[t]+"",n=T-i.length,n&&(s+=ne(n)),s+=i;o=e[t],i=o+"",n=T-i.length,n&&(s+=ne(n))}else if(o===0)return"0";for(;o%10===0;)o/=10;return s+o}function H(e,t,n){if(e!==~~e||e<t||e>n)throw Error(te+e)}function Ee(e,t,n,i){var r,s,o,a;for(s=e[0];s>=10;s/=10)--t;return--t<0?(t+=T,r=0):(r=Math.ceil((t+1)/T),t%=T),s=P(10,T-t),a=e[r]%s|0,i==null?t<3?(t==0?a=a/100|0:t==1&&(a=a/10|0),o=n<4&&a==99999||n>3&&a==49999||a==5e4||a==0):o=(n<4&&a+1==s||n>3&&a+1==s/2)&&(e[r+1]/s/100|0)==P(10,t-2)-1||(a==s/2||a==0)&&(e[r+1]/s/100|0)==0:t<4?(t==0?a=a/1e3|0:t==1?a=a/100|0:t==2&&(a=a/10|0),o=(i||n<4)&&a==9999||!i&&n>3&&a==4999):o=((i||n<4)&&a+1==s||!i&&n>3&&a+1==s/2)&&(e[r+1]/s/1e3|0)==P(10,t-3)-1,o}function Oe(e,t,n){for(var i,r=[0],s,o=0,a=e.length;o<a;){for(s=r.length;s--;)r[s]*=t;for(r[0]+=Ue.indexOf(e.charAt(o++)),i=0;i<r.length;i++)r[i]>n-1&&(r[i+1]===void 0&&(r[i+1]=0),r[i+1]+=r[i]/n|0,r[i]%=n)}return r.reverse()}function jt(e,t){var n,i,r;if(t.isZero())return t;i=t.d.length,i<32?(n=Math.ceil(i/3),r=(1/De(4,n)).toString()):(n=16,r="2.3283064365386962890625e-10"),e.precision+=n,t=ue(e,1,t.times(r),new e(1));for(var s=n;s--;){var o=t.times(t);t=o.times(o).minus(o).times(8).plus(1)}return e.precision-=n,t}var C=(function(){function e(i,r,s){var o,a=0,u=i.length;for(i=i.slice();u--;)o=i[u]*r+a,i[u]=o%s|0,a=o/s|0;return a&&i.unshift(a),i}function t(i,r,s,o){var a,u;if(s!=o)u=s>o?1:-1;else for(a=u=0;a<s;a++)if(i[a]!=r[a]){u=i[a]>r[a]?1:-1;break}return u}function n(i,r,s,o){for(var a=0;s--;)i[s]-=a,a=i[s]<r[s]?1:0,i[s]=a*o+i[s]-r[s];for(;!i[0]&&i.length>1;)i.shift()}return function(i,r,s,o,a,u){var c,l,f,d,y,N,E,x,O,V,b,k,Q,$,re,pe,G,ve,Y,j,me=i.constructor,oe=i.s==r.s?1:-1,h=i.d,p=r.d;if(!h||!h[0]||!p||!p[0])return new me(!i.s||!r.s||(h?p&&h[0]==p[0]:!p)?NaN:h&&h[0]==0||!p?oe*0:oe/0);for(u?(y=1,l=i.e-r.e):(u=J,y=T,l=q(i.e/y)-q(r.e/y)),Y=p.length,G=h.length,O=new me(oe),V=O.d=[],f=0;p[f]==(h[f]||0);f++);if(p[f]>(h[f]||0)&&l--,s==null?($=s=me.precision,o=me.rounding):a?$=s+(i.e-r.e)+1:$=s,$<0)V.push(1),N=!0;else{if($=$/y+2|0,f=0,Y==1){for(d=0,p=p[0],$++;(f<G||d)&&$--;f++)re=d*u+(h[f]||0),V[f]=re/p|0,d=re%p|0;N=d||f<G}else{for(d=u/(p[0]+1)|0,d>1&&(p=e(p,d,u),h=e(h,d,u),Y=p.length,G=h.length),pe=Y,b=h.slice(0,Y),k=b.length;k<Y;)b[k++]=0;j=p.slice(),j.unshift(0),ve=p[0],p[1]>=u/2&&++ve;do d=0,c=t(p,b,Y,k),c<0?(Q=b[0],Y!=k&&(Q=Q*u+(b[1]||0)),d=Q/ve|0,d>1?(d>=u&&(d=u-1),E=e(p,d,u),x=E.length,k=b.length,c=t(E,b,x,k),c==1&&(d--,n(E,Y<x?j:p,x,u))):(d==0&&(c=d=1),E=p.slice()),x=E.length,x<k&&E.unshift(0),n(b,E,k,u),c==-1&&(k=b.length,c=t(p,b,Y,k),c<1&&(d++,n(b,Y<k?j:p,k,u))),k=b.length):c===0&&(d++,b=[0]),V[f++]=d,c&&b[0]?b[k++]=h[pe]||0:(b=[h[pe]],k=1);while((pe++<G||b[0]!==void 0)&&$--);N=b[0]!==void 0}V[0]||V.shift()}if(y==1)O.e=l,nt=N;else{for(f=1,d=V[0];d>=10;d/=10)f++;O.e=f+l*y-1,v(O,a?s+O.e+1:s,o,N)}return O}})();function v(e,t,n,i){var r,s,o,a,u,c,l,f,d,y=e.constructor;e:if(t!=null){if(f=e.d,!f)return e;for(r=1,a=f[0];a>=10;a/=10)r++;if(s=t-r,s<0)s+=T,o=t,l=f[d=0],u=l/P(10,r-o-1)%10|0;else if(d=Math.ceil((s+1)/T),a=f.length,d>=a)if(i){for(;a++<=d;)f.push(0);l=u=0,r=1,s%=T,o=s-T+1}else break e;else{for(l=a=f[d],r=1;a>=10;a/=10)r++;s%=T,o=s-T+r,u=o<0?0:l/P(10,r-o-1)%10|0}if(i=i||t<0||f[d+1]!==void 0||(o<0?l:l%P(10,r-o-1)),c=n<4?(u||i)&&(n==0||n==(e.s<0?3:2)):u>5||u==5&&(n==4||i||n==6&&(s>0?o>0?l/P(10,r-o):0:f[d-1])%10&1||n==(e.s<0?8:7)),t<1||!f[0])return f.length=0,c?(t-=e.e+1,f[0]=P(10,(T-t%T)%T),e.e=-t||0):f[0]=e.e=0,e;if(s==0?(f.length=d,a=1,d--):(f.length=d+1,a=P(10,T-s),f[d]=o>0?(l/P(10,r-o)%P(10,o)|0)*a:0),c)for(;;)if(d==0){for(s=1,o=f[0];o>=10;o/=10)s++;for(o=f[0]+=a,a=1;o>=10;o/=10)a++;s!=a&&(e.e++,f[0]==J&&(f[0]=1));break}else{if(f[d]+=a,f[d]!=J)break;f[d--]=0,a=1}for(s=f.length;f[--s]===0;)f.pop()}return I&&(e.e>y.maxE?(e.d=null,e.e=NaN):e.e<y.minE&&(e.e=0,e.d=[0])),e}function Z(e,t,n){if(!e.isFinite())return ft(e);var i,r=e.e,s=B(e.d),o=s.length;return t?(n&&(i=n-o)>0?s=s.charAt(0)+"."+s.slice(1)+ne(i):o>1&&(s=s.charAt(0)+"."+s.slice(1)),s=s+(e.e<0?"e":"e+")+e.e):r<0?(s="0."+ne(-r-1)+s,n&&(i=n-o)>0&&(s+=ne(i))):r>=o?(s+=ne(r+1-o),n&&(i=n-r-1)>0&&(s=s+"."+ne(i))):((i=r+1)<o&&(s=s.slice(0,i)+"."+s.slice(i)),n&&(i=n-o)>0&&(r+1===o&&(s+="."),s+=ne(i))),s}function be(e,t){var n=e[0];for(t*=T;n>=10;n/=10)t++;return t}function _e(e,t,n){if(t>Vt)throw I=!0,n&&(e.precision=n),Error(it);return v(new e(Te),t,1,!0)}function z(e,t,n){if(t>Ve)throw Error(it);return v(new e(Ae),t,n,!0)}function at(e){var t=e.length-1,n=t*T+1;if(t=e[t],t){for(;t%10==0;t/=10)n--;for(t=e[0];t>=10;t/=10)n++}return n}function ne(e){for(var t="";e--;)t+="0";return t}function ct(e,t,n,i){var r,s=new e(1),o=Math.ceil(i/T+4);for(I=!1;;){if(n%2&&(s=s.times(t),dt(s.d,o)&&(r=!0)),n=q(n/2),n===0){n=s.d.length-1,r&&s.d[n]===0&&++s.d[n];break}t=t.times(t),dt(t.d,o)}return I=!0,s}function ut(e){return e.d[e.d.length-1]&1}function lt(e,t,n){for(var i,r=new e(t[0]),s=0;++s<t.length;)if(i=new e(t[s]),i.s)r[n](i)&&(r=i);else{r=i;break}return r}function je(e,t){var n,i,r,s,o,a,u,c=0,l=0,f=0,d=e.constructor,y=d.rounding,N=d.precision;if(!e.d||!e.d[0]||e.e>17)return new d(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(t==null?(I=!1,u=N):u=t,a=new d(.03125);e.e>-2;)e=e.times(a),f+=5;for(i=Math.log(P(2,f))/Math.LN10*2+5|0,u+=i,n=s=o=new d(1),d.precision=u;;){if(s=v(s.times(e),u,1),n=n.times(++l),a=o.plus(C(s,n,u,1)),B(a.d).slice(0,u)===B(o.d).slice(0,u)){for(r=f;r--;)o=v(o.times(o),u,1);if(t==null)if(c<3&&Ee(o.d,u-i,y,c))d.precision=u+=10,n=s=a=new d(1),l=0,c++;else return v(o,d.precision=N,y,I=!0);else return d.precision=N,o}o=a}}function ie(e,t){var n,i,r,s,o,a,u,c,l,f,d,y=1,N=10,E=e,x=E.d,O=E.constructor,V=O.rounding,b=O.precision;if(E.s<0||!x||!x[0]||!E.e&&x[0]==1&&x.length==1)return new O(x&&!x[0]?-1/0:E.s!=1?NaN:x?0:E);if(t==null?(I=!1,l=b):l=t,O.precision=l+=N,n=B(x),i=n.charAt(0),Math.abs(s=E.e)<15e14){for(;i<7&&i!=1||i==1&&n.charAt(1)>3;)E=E.times(e),n=B(E.d),i=n.charAt(0),y++;s=E.e,i>1?(E=new O("0."+n),s++):E=new O(i+"."+n.slice(1))}else return c=_e(O,l+2,b).times(s+""),E=ie(new O(i+"."+n.slice(1)),l-N).plus(c),O.precision=b,t==null?v(E,b,V,I=!0):E;for(f=E,u=o=E=C(E.minus(1),E.plus(1),l,1),d=v(E.times(E),l,1),r=3;;){if(o=v(o.times(d),l,1),c=u.plus(C(o,new O(r),l,1)),B(c.d).slice(0,l)===B(u.d).slice(0,l))if(u=u.times(2),s!==0&&(u=u.plus(_e(O,l+2,b).times(s+""))),u=C(u,new O(y),l,1),t==null)if(Ee(u.d,l-N,V,a))O.precision=l+=N,c=o=E=C(f.minus(1),f.plus(1),l,1),d=v(E.times(E),l,1),r=a=1;else return v(u,O.precision=b,V,I=!0);else return O.precision=b,u;u=c,r+=2}}function ft(e){return String(e.s*e.s/0)}function $e(e,t){var n,i,r;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(i=t.search(/e/i))>0?(n<0&&(n=i),n+=+t.slice(i+1),t=t.substring(0,i)):n<0&&(n=t.length),i=0;t.charCodeAt(i)===48;i++);for(r=t.length;t.charCodeAt(r-1)===48;--r);if(t=t.slice(i,r),t){if(r-=i,e.e=n=n-i-1,e.d=[],i=(n+1)%T,n<0&&(i+=T),i<r){for(i&&e.d.push(+t.slice(0,i)),r-=T;i<r;)e.d.push(+t.slice(i,i+=T));t=t.slice(i),i=T-t.length}else i-=r;for(;i--;)t+="0";e.d.push(+t),I&&(e.e>e.constructor.maxE?(e.d=null,e.e=NaN):e.e<e.constructor.minE&&(e.e=0,e.d=[0]))}else e.e=0,e.d=[0];return e}function $t(e,t){var n,i,r,s,o,a,u,c,l;if(t.indexOf("_")>-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),ot.test(t))return $e(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(Bt.test(t))n=16,t=t.toLowerCase();else if(Mt.test(t))n=2;else if(Ut.test(t))n=8;else throw Error(te+t);for(s=t.search(/p/i),s>0?(u=+t.slice(s+1),t=t.substring(2,s)):t=t.slice(2),s=t.indexOf("."),o=s>=0,i=e.constructor,o&&(t=t.replace(".",""),a=t.length,s=a-s,r=ct(i,new i(n),s,s*2)),c=Oe(t,n,J),l=c.length-1,s=l;c[s]===0;--s)c.pop();return s<0?new i(e.s*0):(e.e=be(c,l),e.d=c,I=!1,o&&(e=C(e,r,a*4)),u&&(e=e.times(Math.abs(u)<54?P(2,u):le.pow(2,u))),I=!0,e)}function Ht(e,t){var n,i=t.d.length;if(i<3)return t.isZero()?t:ue(e,2,t,t);n=1.4*Math.sqrt(i),n=n>16?16:n|0,t=t.times(1/De(5,n)),t=ue(e,2,t,t);for(var r,s=new e(5),o=new e(16),a=new e(20);n--;)r=t.times(t),t=t.times(s.plus(r.times(o.times(r).minus(a))));return t}function ue(e,t,n,i,r){var s,o,a,u,c=e.precision,l=Math.ceil(c/T);for(I=!1,u=n.times(n),a=new e(i);;){if(o=C(a.times(u),new e(t++*t++),c,1),a=r?i.plus(o):i.minus(o),i=C(o.times(u),new e(t++*t++),c,1),o=a.plus(i),o.d[l]!==void 0){for(s=l;o.d[s]===a.d[s]&&s--;);if(s==-1)break}s=a,a=i,i=o,o=s}return I=!0,o.d.length=l+1,o}function De(e,t){for(var n=e;--t;)n*=e;return n}function ht(e,t){var n,i=t.s<0,r=z(e,e.precision,1),s=r.times(.5);if(t=t.abs(),t.lte(s))return W=i?4:1,t;if(n=t.divToInt(r),n.isZero())W=i?3:2;else{if(t=t.minus(n.times(r)),t.lte(s))return W=ut(n)?i?2:3:i?4:1,t;W=ut(n)?i?1:4:i?3:2}return t.minus(r).abs()}function He(e,t,n,i){var r,s,o,a,u,c,l,f,d,y=e.constructor,N=n!==void 0;if(N?(H(n,1,ee),i===void 0?i=y.rounding:H(i,0,8)):(n=y.precision,i=y.rounding),!e.isFinite())l=ft(e);else{for(l=Z(e),o=l.indexOf("."),N?(r=2,t==16?n=n*4-3:t==8&&(n=n*3-2)):r=t,o>=0&&(l=l.replace(".",""),d=new y(1),d.e=l.length-o,d.d=Oe(Z(d),10,r),d.e=d.d.length),f=Oe(l,10,r),s=u=f.length;f[--u]==0;)f.pop();if(!f[0])l=N?"0p+0":"0";else{if(o<0?s--:(e=new y(e),e.d=f,e.e=s,e=C(e,d,n,i,0,r),f=e.d,s=e.e,c=nt),o=f[n],a=r/2,c=c||f[n+1]!==void 0,c=i<4?(o!==void 0||c)&&(i===0||i===(e.s<0?3:2)):o>a||o===a&&(i===4||c||i===6&&f[n-1]&1||i===(e.s<0?8:7)),f.length=n,c)for(;++f[--n]>r-1;)f[n]=0,n||(++s,f.unshift(1));for(u=f.length;!f[u-1];--u);for(o=0,l="";o<u;o++)l+=Ue.charAt(f[o]);if(N){if(u>1)if(t==16||t==8){for(o=t==16?4:3,--u;u%o;u++)l+="0";for(f=Oe(l,r,t),u=f.length;!f[u-1];--u);for(o=1,l="1.";o<u;o++)l+=Ue.charAt(f[o])}else l=l.charAt(0)+"."+l.slice(1);l=l+(s<0?"p":"p+")+s}else if(s<0){for(;++s;)l="0"+l;l="0."+l}else if(++s>u)for(s-=u;s--;)l+="0";else s<u&&(l=l.slice(0,s)+"."+l.slice(s))}l=(t==16?"0x":t==2?"0b":t==8?"0o":"")+l}return e.s<0?"-"+l:l}function dt(e,t){if(e.length>t)return e.length=t,!0}function Gt(e){return new this(e).abs()}function Yt(e){return new this(e).acos()}function Jt(e){return new this(e).acosh()}function zt(e,t){return new this(e).plus(t)}function Xt(e){return new this(e).asin()}function Qt(e){return new this(e).asinh()}function Zt(e){return new this(e).atan()}function Wt(e){return new this(e).atanh()}function Kt(e,t){e=new this(e),t=new this(t);var n,i=this.precision,r=this.rounding,s=i+4;return!e.s||!t.s?n=new this(NaN):!e.d&&!t.d?(n=z(this,s,1).times(t.s>0?.25:.75),n.s=e.s):!t.d||e.isZero()?(n=t.s<0?z(this,i,r):new this(0),n.s=e.s):!e.d||t.isZero()?(n=z(this,s,1).times(.5),n.s=e.s):t.s<0?(this.precision=s,this.rounding=1,n=this.atan(C(e,t,s,1)),t=z(this,s,1),this.precision=i,this.rounding=r,n=e.s<0?n.minus(t):n.plus(t)):n=this.atan(C(e,t,s,1)),n}function en(e){return new this(e).cbrt()}function tn(e){return v(e=new this(e),e.e+1,2)}function nn(e,t,n){return new this(e).clamp(t,n)}function rn(e){if(!e||typeof e!="object")throw Error(Ie+"Object expected");var t,n,i,r=e.defaults===!0,s=["precision",1,ee,"rounding",0,8,"toExpNeg",-ce,0,"toExpPos",0,ce,"maxE",0,ce,"minE",-ce,0,"modulo",0,9];for(t=0;t<s.length;t+=3)if(n=s[t],r&&(this[n]=qe[n]),(i=e[n])!==void 0)if(q(i)===i&&i>=s[t+1]&&i<=s[t+2])this[n]=i;else throw Error(te+n+": "+i);if(n="crypto",r&&(this[n]=qe[n]),(i=e[n])!==void 0)if(i===!0||i===!1||i===0||i===1)if(i)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[n]=!0;else throw Error(rt);else this[n]=!1;else throw Error(te+n+": "+i);return this}function sn(e){return new this(e).cos()}function on(e){return new this(e).cosh()}function pt(e){var t,n,i;function r(s){var o,a,u,c=this;if(!(c instanceof r))return new r(s);if(c.constructor=r,mt(s)){c.s=s.s,I?!s.d||s.e>r.maxE?(c.e=NaN,c.d=null):s.e<r.minE?(c.e=0,c.d=[0]):(c.e=s.e,c.d=s.d.slice()):(c.e=s.e,c.d=s.d?s.d.slice():s.d);return}if(u=typeof s,u==="number"){if(s===0){c.s=1/s<0?-1:1,c.e=0,c.d=[0];return}if(s<0?(s=-s,c.s=-1):c.s=1,s===~~s&&s<1e7){for(o=0,a=s;a>=10;a/=10)o++;I?o>r.maxE?(c.e=NaN,c.d=null):o<r.minE?(c.e=0,c.d=[0]):(c.e=o,c.d=[s]):(c.e=o,c.d=[s]);return}else if(s*0!==0){s||(c.s=NaN),c.e=NaN,c.d=null;return}return $e(c,s.toString())}else if(u!=="string")throw Error(te+s);return(a=s.charCodeAt(0))===45?(s=s.slice(1),c.s=-1):(a===43&&(s=s.slice(1)),c.s=1),ot.test(s)?$e(c,s):$t(c,s)}if(r.prototype=g,r.ROUND_UP=0,r.ROUND_DOWN=1,r.ROUND_CEIL=2,r.ROUND_FLOOR=3,r.ROUND_HALF_UP=4,r.ROUND_HALF_DOWN=5,r.ROUND_HALF_EVEN=6,r.ROUND_HALF_CEIL=7,r.ROUND_HALF_FLOOR=8,r.EUCLID=9,r.config=r.set=rn,r.clone=pt,r.isDecimal=mt,r.abs=Gt,r.acos=Yt,r.acosh=Jt,r.add=zt,r.asin=Xt,r.asinh=Qt,r.atan=Zt,r.atanh=Wt,r.atan2=Kt,r.cbrt=en,r.ceil=tn,r.clamp=nn,r.cos=sn,r.cosh=on,r.div=an,r.exp=cn,r.floor=un,r.hypot=ln,r.ln=fn,r.log=hn,r.log10=pn,r.log2=dn,r.max=mn,r.min=gn,r.mod=En,r.mul=yn,r.pow=Nn,r.random=wn,r.round=vn,r.sign=Tn,r.sin=An,r.sinh=In,r.sqrt=On,r.sub=bn,r.sum=_n,r.tan=Dn,r.tanh=Sn,r.trunc=xn,e===void 0&&(e={}),e&&e.defaults!==!0)for(i=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],t=0;t<i.length;)e.hasOwnProperty(n=i[t++])||(e[n]=this[n]);return r.config(e),r}function an(e,t){return new this(e).div(t)}function cn(e){return new this(e).exp()}function un(e){return v(e=new this(e),e.e+1,3)}function ln(){var e,t,n=new this(0);for(I=!1,e=0;e<arguments.length;)if(t=new this(arguments[e++]),t.d)n.d&&(n=n.plus(t.times(t)));else{if(t.s)return I=!0,new this(1/0);n=t}return I=!0,n.sqrt()}function mt(e){return e instanceof le||e&&e.toStringTag===st||!1}function fn(e){return new this(e).ln()}function hn(e,t){return new this(e).log(t)}function dn(e){return new this(e).log(2)}function pn(e){return new this(e).log(10)}function mn(){return lt(this,arguments,"lt")}function gn(){return lt(this,arguments,"gt")}function En(e,t){return new this(e).mod(t)}function yn(e,t){return new this(e).mul(t)}function Nn(e,t){return new this(e).pow(t)}function wn(e){var t,n,i,r,s=0,o=new this(1),a=[];if(e===void 0?e=this.precision:H(e,1,ee),i=Math.ceil(e/T),this.crypto)if(crypto.getRandomValues)for(t=crypto.getRandomValues(new Uint32Array(i));s<i;)r=t[s],r>=429e7?t[s]=crypto.getRandomValues(new Uint32Array(1))[0]:a[s++]=r%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(i*=4);s<i;)r=t[s]+(t[s+1]<<8)+(t[s+2]<<16)+((t[s+3]&127)<<24),r>=214e7?crypto.randomBytes(4).copy(t,s):(a.push(r%1e7),s+=4);s=i/4}else throw Error(rt);else for(;s<i;)a[s++]=Math.random()*1e7|0;for(i=a[--s],e%=T,i&&e&&(r=P(10,T-e),a[s]=(i/r|0)*r);a[s]===0;s--)a.pop();if(s<0)n=0,a=[0];else{for(n=-1;a[0]===0;n-=T)a.shift();for(i=1,r=a[0];r>=10;r/=10)i++;i<T&&(n-=T-i)}return o.e=n,o.d=a,o}function vn(e){return v(e=new this(e),e.e+1,this.rounding)}function Tn(e){return e=new this(e),e.d?e.d[0]?e.s:0*e.s:e.s||NaN}function An(e){return new this(e).sin()}function In(e){return new this(e).sinh()}function On(e){return new this(e).sqrt()}function bn(e,t){return new this(e).sub(t)}function _n(){var e=0,t=arguments,n=new this(t[e]);for(I=!1;n.s&&++e<t.length;)n=n.plus(t[e]);return I=!0,v(n,this.precision,this.rounding)}function Dn(e){return new this(e).tan()}function Sn(e){return new this(e).tanh()}function xn(e){return v(e=new this(e),e.e+1,1)}g[Symbol.for("nodejs.util.inspect.custom")]=g.toString,g[Symbol.toStringTag]="Decimal";var le=g.constructor=pt(qe);Te=new le(Te),Ae=new le(Ae);const Ge=JSON,Cn=e=>e.toUpperCase(),kn=e=>{const t={};return e.forEach((n,i)=>{t[i]=n}),t},Rn=(e,t,n)=>e.document?e:{document:e,variables:t,requestHeaders:n,signal:void 0},Ln=(e,t,n)=>e.query?e:{query:e,variables:t,requestHeaders:n,signal:void 0},Fn=(e,t)=>e.documents?e:{documents:e,requestHeaders:t,signal:void 0};function Se(e,t){if(!!!e)throw new Error(t)}function Pn(e){return typeof e=="object"&&e!==null}function Mn(e,t){if(!!!e)throw new Error("Unexpected invariant triggered.")}const Bn=/\r\n|[\n\r]/g;function Ye(e,t){let n=0,i=1;for(const r of e.body.matchAll(Bn)){if(typeof r.index=="number"||Mn(!1),r.index>=t)break;n=r.index+r[0].length,i+=1}return{line:i,column:t+1-n}}function Un(e){return gt(e.source,Ye(e.source,e.start))}function gt(e,t){const n=e.locationOffset.column-1,i="".padStart(n)+e.body,r=t.line-1,s=e.locationOffset.line-1,o=t.line+s,a=t.line===1?n:0,u=t.column+a,c=`${e.name}:${o}:${u}
|
|
8
8
|
`,l=i.split(/\r\n|[\n\r]/g),f=l[r];if(f.length>120){const d=Math.floor(u/80),y=u%80,N=[];for(let E=0;E<f.length;E+=80)N.push(f.slice(E,E+80));return c+Et([[`${o} |`,N[0]],...N.slice(1,d+1).map(E=>["|",E]),["|","^".padStart(y)],["|",N[d+1]]])}return c+Et([[`${o-1} |`,l[r-1]],[`${o} |`,f],["|","^".padStart(u)],[`${o+1} |`,l[r+1]]])}function Et(e){const t=e.filter(([i,r])=>r!==void 0),n=Math.max(...t.map(([i])=>i.length));return t.map(([i,r])=>i.padStart(n)+(r?" "+r:"")).join(`
|
|
9
9
|
`)}function qn(e){const t=e[0];return t==null||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}class Je extends Error{constructor(t,...n){var i,r,s;const{nodes:o,source:a,positions:u,path:c,originalError:l,extensions:f}=qn(n);super(t),this.name="GraphQLError",this.path=c??void 0,this.originalError=l??void 0,this.nodes=yt(Array.isArray(o)?o:o?[o]:void 0);const d=yt((i=this.nodes)===null||i===void 0?void 0:i.map(N=>N.loc).filter(N=>N!=null));this.source=a??(d==null||(r=d[0])===null||r===void 0?void 0:r.source),this.positions=u??d?.map(N=>N.start),this.locations=u&&a?u.map(N=>Ye(a,N)):d?.map(N=>Ye(N.source,N.start));const y=Pn(l?.extensions)?l?.extensions:void 0;this.extensions=(s=f??y)!==null&&s!==void 0?s:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),l!=null&&l.stack?Object.defineProperty(this,"stack",{value:l.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,Je):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let t=this.message;if(this.nodes)for(const n of this.nodes)n.loc&&(t+=`
|
|
10
10
|
|
|
@@ -52,8 +52,8 @@ spurious results.`)}}return!1};class Dt{constructor(t,n="GraphQL request",i={lin
|
|
|
52
52
|
`)),`
|
|
53
53
|
}`)}function D(e,t,n=""){return t!=null&&t!==""?e+t+n:""}function Re(e){return D(" ",e.replace(/\n/g,`
|
|
54
54
|
`))}function xt(e){var t;return(t=e?.some(n=>n.includes(`
|
|
55
|
-
`)))!==null&&t!==void 0?t:!1}const Ct=e=>{let t;const n=e.definitions.filter(i=>i.kind==="OperationDefinition");return n.length===1&&(t=n[0]?.name?.value),t},We=e=>{if(typeof e=="string"){let n;try{const i=hi(e);n=Ct(i)}catch{}return{query:e,operationName:n}}const t=Ct(e);return{query:vi(e),operationName:t}};class we extends Error{constructor(t,n){const i=`${we.extractMessage(t)}: ${JSON.stringify({response:t,request:n})}`;super(i),Object.setPrototypeOf(this,we.prototype),this.response=t,this.request=n,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,we)}static extractMessage(t){return t.errors?.[0]?.message??`GraphQL Error (Code: ${t.status})`}}var Le=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ii(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Fe={exports:{}},kt;function Oi(){return kt||(kt=1,function(e,t){var n=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof Le<"u"&&Le,i=function(){function s(){this.fetch=!1,this.DOMException=n.DOMException}return s.prototype=n,new s}();(function(s){(function(o){var a=typeof s<"u"&&s||typeof self<"u"&&self||typeof Le<"u"&&Le||{},u={searchParams:"URLSearchParams"in a,iterable:"Symbol"in a&&"iterator"in Symbol,blob:"FileReader"in a&&"Blob"in a&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in a,arrayBuffer:"ArrayBuffer"in a};function c(h){return h&&DataView.prototype.isPrototypeOf(h)}if(u.arrayBuffer)var l=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],f=ArrayBuffer.isView||function(h){return h&&l.indexOf(Object.prototype.toString.call(h))>-1};function d(h){if(typeof h!="string"&&(h=String(h)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(h)||h==="")throw new TypeError('Invalid character in header field name: "'+h+'"');return h.toLowerCase()}function y(h){return typeof h!="string"&&(h=String(h)),h}function N(h){var p={next:function(){var _=h.shift();return{done:_===void 0,value:_}}};return u.iterable&&(p[Symbol.iterator]=function(){return p}),p}function E(h){this.map={},h instanceof E?h.forEach(function(p,_){this.append(_,p)},this):Array.isArray(h)?h.forEach(function(p){if(p.length!=2)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+p.length);this.append(p[0],p[1])},this):h&&Object.getOwnPropertyNames(h).forEach(function(p){this.append(p,h[p])},this)}E.prototype.append=function(h,p){h=d(h),p=y(p);var _=this.map[h];this.map[h]=_?_+", "+p:p},E.prototype.delete=function(h){delete this.map[d(h)]},E.prototype.get=function(h){return h=d(h),this.has(h)?this.map[h]:null},E.prototype.has=function(h){return this.map.hasOwnProperty(d(h))},E.prototype.set=function(h,p){this.map[d(h)]=y(p)},E.prototype.forEach=function(h,p){for(var _ in this.map)this.map.hasOwnProperty(_)&&h.call(p,this.map[_],_,this)},E.prototype.keys=function(){var h=[];return this.forEach(function(p,_){h.push(_)}),N(h)},E.prototype.values=function(){var h=[];return this.forEach(function(p){h.push(p)}),N(h)},E.prototype.entries=function(){var h=[];return this.forEach(function(p,_){h.push([_,p])}),N(h)},u.iterable&&(E.prototype[Symbol.iterator]=E.prototype.entries);function x(h){if(!h._noBody){if(h.bodyUsed)return Promise.reject(new TypeError("Already read"));h.bodyUsed=!0}}function O(h){return new Promise(function(p,_){h.onload=function(){p(h.result)},h.onerror=function(){_(h.error)}})}function V(h){var p=new FileReader,_=O(p);return p.readAsArrayBuffer(h),_}function b(h){var p=new FileReader,_=O(p),R=/charset=([A-Za-z0-9_-]+)/.exec(h.type),L=R?R[1]:"utf-8";return p.readAsText(h,L),_}function k(h){for(var p=new Uint8Array(h),_=new Array(p.length),R=0;R<p.length;R++)_[R]=String.fromCharCode(p[R]);return _.join("")}function Q(h){if(h.slice)return h.slice(0);var p=new Uint8Array(h.byteLength);return p.set(new Uint8Array(h)),p.buffer}function $(){return this.bodyUsed=!1,this._initBody=function(h){this.bodyUsed=this.bodyUsed,this._bodyInit=h,h?typeof h=="string"?this._bodyText=h:u.blob&&Blob.prototype.isPrototypeOf(h)?this._bodyBlob=h:u.formData&&FormData.prototype.isPrototypeOf(h)?this._bodyFormData=h:u.searchParams&&URLSearchParams.prototype.isPrototypeOf(h)?this._bodyText=h.toString():u.arrayBuffer&&u.blob&&c(h)?(this._bodyArrayBuffer=Q(h.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):u.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(h)||f(h))?this._bodyArrayBuffer=Q(h):this._bodyText=h=Object.prototype.toString.call(h):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||(typeof h=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):u.searchParams&&URLSearchParams.prototype.isPrototypeOf(h)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},u.blob&&(this.blob=function(){var h=x(this);if(h)return h;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var h=x(this);return h||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else{if(u.blob)return this.blob().then(V);throw new Error("could not read as ArrayBuffer")}},this.text=function(){var h=x(this);if(h)return h;if(this._bodyBlob)return b(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(k(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},u.formData&&(this.formData=function(){return this.text().then(ve)}),this.json=function(){return this.text().then(JSON.parse)},this}var re=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function pe(h){var p=h.toUpperCase();return re.indexOf(p)>-1?p:h}function G(h,p){if(!(this instanceof G))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');p=p||{};var _=p.body;if(h instanceof G){if(h.bodyUsed)throw new TypeError("Already read");this.url=h.url,this.credentials=h.credentials,p.headers||(this.headers=new E(h.headers)),this.method=h.method,this.mode=h.mode,this.signal=h.signal,!_&&h._bodyInit!=null&&(_=h._bodyInit,h.bodyUsed=!0)}else this.url=String(h);if(this.credentials=p.credentials||this.credentials||"same-origin",(p.headers||!this.headers)&&(this.headers=new E(p.headers)),this.method=pe(p.method||this.method||"GET"),this.mode=p.mode||this.mode||null,this.signal=p.signal||this.signal||function(){if("AbortController"in a){var S=new AbortController;return S.signal}}(),this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&_)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(_),(this.method==="GET"||this.method==="HEAD")&&(p.cache==="no-store"||p.cache==="no-cache")){var R=/([?&])_=[^&]*/;if(R.test(this.url))this.url=this.url.replace(R,"$1_="+new Date().getTime());else{var L=/\?/;this.url+=(L.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}G.prototype.clone=function(){return new G(this,{body:this._bodyInit})};function ve(h){var p=new FormData;return h.trim().split("&").forEach(function(_){if(_){var R=_.split("="),L=R.shift().replace(/\+/g," "),S=R.join("=").replace(/\+/g," ");p.append(decodeURIComponent(L),decodeURIComponent(S))}}),p}function Y(h){var p=new E,_=h.replace(/\r?\n[\t ]+/g," ");return _.split("\r").map(function(R){return R.indexOf(`
|
|
56
|
-
`)===0?R.substr(1,R.length):R}).forEach(function(R){var L=R.split(":"),S=L.shift().trim();if(S){var Be=L.join(":").trim();try{p.append(S,Be)}catch(tt){console.warn("Response "+tt.message)}}}),p}$.call(G.prototype);function j(h,p){if(!(this instanceof j))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(p||(p={}),this.type="default",this.status=p.status===void 0?200:p.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=p.statusText===void 0?"":""+p.statusText,this.headers=new E(p.headers),this.url=p.url||"",this._initBody(h)}$.call(j.prototype),j.prototype.clone=function(){return new j(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new E(this.headers),url:this.url})},j.error=function(){var h=new j(null,{status:200,statusText:""});return h.ok=!1,h.status=0,h.type="error",h};var me=[301,302,303,307,308];j.redirect=function(h,p){if(me.indexOf(p)===-1)throw new RangeError("Invalid status code");return new j(null,{status:p,headers:{location:h}})},o.DOMException=a.DOMException;try{new o.DOMException}catch{o.DOMException=function(p,_){this.message=p,this.name=_;var R=Error(p);this.stack=R.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function oe(h,p){return new Promise(function(_,R){var L=new G(h,p);if(L.signal&&L.signal.aborted)return R(new o.DOMException("Aborted","AbortError"));var S=new XMLHttpRequest;function Be(){S.abort()}S.onload=function(){var U={statusText:S.statusText,headers:Y(S.getAllResponseHeaders()||"")};L.url.indexOf("file://")===0&&(S.status<200||S.status>599)?U.status=200:U.status=S.status,U.url="responseURL"in S?S.responseURL:U.headers.get("X-Request-URL");var ae="response"in S?S.response:S.responseText;setTimeout(function(){_(new j(ae,U))},0)},S.onerror=function(){setTimeout(function(){R(new TypeError("Network request failed"))},0)},S.ontimeout=function(){setTimeout(function(){R(new TypeError("Network request timed out"))},0)},S.onabort=function(){setTimeout(function(){R(new o.DOMException("Aborted","AbortError"))},0)};function tt(U){try{return U===""&&a.location.href?a.location.href:U}catch{return U}}if(S.open(L.method,tt(L.url),!0),L.credentials==="include"?S.withCredentials=!0:L.credentials==="omit"&&(S.withCredentials=!1),"responseType"in S&&(u.blob?S.responseType="blob":u.arrayBuffer&&(S.responseType="arraybuffer")),p&&typeof p.headers=="object"&&!(p.headers instanceof E||a.Headers&&p.headers instanceof a.Headers)){var Pt=[];Object.getOwnPropertyNames(p.headers).forEach(function(U){Pt.push(d(U)),S.setRequestHeader(U,y(p.headers[U]))}),L.headers.forEach(function(U,ae){Pt.indexOf(ae)===-1&&S.setRequestHeader(ae,U)})}else L.headers.forEach(function(U,ae){S.setRequestHeader(ae,U)});L.signal&&(L.signal.addEventListener("abort",Be),S.onreadystatechange=function(){S.readyState===4&&L.signal.removeEventListener("abort",Be)}),S.send(typeof L._bodyInit>"u"?null:L._bodyInit)})}return oe.polyfill=!0,a.fetch||(a.fetch=oe,a.Headers=E,a.Request=G,a.Response=j),o.Headers=E,o.Request=G,o.Response=j,o.fetch=oe,Object.defineProperty(o,"__esModule",{value:!0}),o})({})})(i),i.fetch.ponyfill=!0,delete i.fetch.polyfill;var r=n.fetch?n:i;t=r.fetch,t.default=r.fetch,t.fetch=r.fetch,t.Headers=r.Headers,t.Request=r.Request,t.Response=r.Response,e.exports=t}(Fe,Fe.exports)),Fe.exports}var Pe=Oi();const Me=Ii(Pe),bi=ge({__proto__:null,default:Me},[Pe]),de=e=>{let t={};return e&&(typeof Headers<"u"&&e instanceof Headers||bi&&Pe.Headers&&e instanceof Pe.Headers?t=kn(e):Array.isArray(e)?e.forEach(([n,i])=>{n&&i!==void 0&&(t[n]=i)}):t=e),t},Rt=e=>e.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),_i=e=>{if(!Array.isArray(e.query)){const i=e,r=[`query=${encodeURIComponent(Rt(i.query))}`];return e.variables&&r.push(`variables=${encodeURIComponent(i.jsonSerializer.stringify(i.variables))}`),i.operationName&&r.push(`operationName=${encodeURIComponent(i.operationName)}`),r.join("&")}if(typeof e.variables<"u"&&!Array.isArray(e.variables))throw new Error("Cannot create query with given variable type, array expected");const t=e,n=e.query.reduce((i,r,s)=>(i.push({query:Rt(r),variables:t.variables?t.jsonSerializer.stringify(t.variables[s]):void 0}),i),[]);return`query=${encodeURIComponent(t.jsonSerializer.stringify(n))}`},Di=e=>async t=>{const{url:n,query:i,variables:r,operationName:s,fetch:o,fetchOptions:a,middleware:u}=t,c={...t.headers};let l="",f;e==="POST"?(f=xi(i,r,s,a.jsonSerializer),typeof f=="string"&&(c["Content-Type"]="application/json")):l=_i({query:i,variables:r,operationName:s,jsonSerializer:a.jsonSerializer??Ge});const d={method:e,headers:c,body:f,...a};let y=n,N=d;if(u){const E=await Promise.resolve(u({...d,url:n,operationName:s,variables:r})),{url:x,...O}=E;y=x,N=O}return l&&(y=`${y}?${l}`),await o(y,N)};class Si{constructor(t,n={}){this.url=t,this.requestConfig=n,this.rawRequest=async(...i)=>{const[r,s,o]=i,a=Ln(r,s,o),{headers:u,fetch:c=Me,method:l="POST",requestMiddleware:f,responseMiddleware:d,...y}=this.requestConfig,{url:N}=this;a.signal!==void 0&&(y.signal=a.signal);const{operationName:E}=We(a.query);return Ke({url:N,query:a.query,variables:a.variables,headers:{...de(et(u)),...de(a.requestHeaders)},operationName:E,fetch:c,method:l,fetchOptions:y,middleware:f}).then(x=>(d&&d(x),x)).catch(x=>{throw d&&d(x),x})}}async request(t,...n){const[i,r]=n,s=Rn(t,i,r),{headers:o,fetch:a=Me,method:u="POST",requestMiddleware:c,responseMiddleware:l,...f}=this.requestConfig,{url:d}=this;s.signal!==void 0&&(f.signal=s.signal);const{query:y,operationName:N}=We(s.document);return Ke({url:d,query:y,variables:s.variables,headers:{...de(et(o)),...de(s.requestHeaders)},operationName:N,fetch:a,method:u,fetchOptions:f,middleware:c}).then(E=>(l&&l(E),E.data)).catch(E=>{throw l&&l(E),E})}batchRequests(t,n){const i=Fn(t,n),{headers:r,...s}=this.requestConfig;i.signal!==void 0&&(s.signal=i.signal);const o=i.documents.map(({document:u})=>We(u).query),a=i.documents.map(({variables:u})=>u);return Ke({url:this.url,query:o,variables:a,headers:{...de(et(r)),...de(i.requestHeaders)},operationName:void 0,fetch:this.requestConfig.fetch??Me,method:this.requestConfig.method||"POST",fetchOptions:s,middleware:this.requestConfig.requestMiddleware}).then(u=>(this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(u),u.data)).catch(u=>{throw this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(u),u})}setHeaders(t){return this.requestConfig.headers=t,this}setHeader(t,n){const{headers:i}=this.requestConfig;return i?i[t]=n:this.requestConfig.headers={[t]:n},this}setEndpoint(t){return this.url=t,this}}const Ke=async e=>{const{query:t,variables:n,fetchOptions:i}=e,r=Di(Cn(e.method??"post")),s=Array.isArray(e.query),o=await r(e),a=await Ci(o,i.jsonSerializer??Ge),u=Array.isArray(a)?!a.some(({data:l})=>!l):!!a.data,c=Array.isArray(a)||!a.errors||Array.isArray(a.errors)&&!a.errors.length||i.errorPolicy==="all"||i.errorPolicy==="ignore";if(o.ok&&c&&u){const{errors:l,...f}=(Array.isArray(a),a),d=i.errorPolicy==="ignore"?f:a;return{...s?{data:d}:d,headers:o.headers,status:o.status}}else{const l=typeof a=="string"?{error:a}:a;throw new we({...l,status:o.status,headers:o.headers},{query:t,variables:n})}},xi=(e,t,n,i)=>{const r=i??Ge;if(!Array.isArray(e))return r.stringify({query:e,variables:t,operationName:n});if(typeof t<"u"&&!Array.isArray(t))throw new Error("Cannot create request body with given variable type, array expected");const s=e.reduce((o,a,u)=>(o.push({query:a,variables:t?t[u]:void 0}),o),[]);return r.stringify(s)},Ci=async(e,t)=>{let n;return e.headers.forEach((i,r)=>{r.toLowerCase()==="content-type"&&(n=i)}),n&&(n.toLowerCase().startsWith("application/json")||n.toLowerCase().startsWith("application/graphql+json")||n.toLowerCase().startsWith("application/graphql-response+json"))?t.parse(await e.text()):e.text()},et=e=>typeof e=="function"?e():e,Lt=(e,...t)=>e.reduce((n,i,r)=>`${n}${i}${r in t?String(t[r]):""}`,""),Ft={getMeta:Lt`
|
|
55
|
+
`)))!==null&&t!==void 0?t:!1}const Ct=e=>{let t;const n=e.definitions.filter(i=>i.kind==="OperationDefinition");return n.length===1&&(t=n[0]?.name?.value),t},We=e=>{if(typeof e=="string"){let n;try{const i=hi(e);n=Ct(i)}catch{}return{query:e,operationName:n}}const t=Ct(e);return{query:vi(e),operationName:t}};class we extends Error{constructor(t,n){const i=`${we.extractMessage(t)}: ${JSON.stringify({response:t,request:n})}`;super(i),Object.setPrototypeOf(this,we.prototype),this.response=t,this.request=n,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,we)}static extractMessage(t){return t.errors?.[0]?.message??`GraphQL Error (Code: ${t.status})`}}var Le=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ii(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Fe={exports:{}},kt;function Oi(){return kt||(kt=1,(function(e,t){var n=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof Le<"u"&&Le,i=(function(){function s(){this.fetch=!1,this.DOMException=n.DOMException}return s.prototype=n,new s})();(function(s){(function(o){var a=typeof s<"u"&&s||typeof self<"u"&&self||typeof Le<"u"&&Le||{},u={searchParams:"URLSearchParams"in a,iterable:"Symbol"in a&&"iterator"in Symbol,blob:"FileReader"in a&&"Blob"in a&&(function(){try{return new Blob,!0}catch{return!1}})(),formData:"FormData"in a,arrayBuffer:"ArrayBuffer"in a};function c(h){return h&&DataView.prototype.isPrototypeOf(h)}if(u.arrayBuffer)var l=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],f=ArrayBuffer.isView||function(h){return h&&l.indexOf(Object.prototype.toString.call(h))>-1};function d(h){if(typeof h!="string"&&(h=String(h)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(h)||h==="")throw new TypeError('Invalid character in header field name: "'+h+'"');return h.toLowerCase()}function y(h){return typeof h!="string"&&(h=String(h)),h}function N(h){var p={next:function(){var _=h.shift();return{done:_===void 0,value:_}}};return u.iterable&&(p[Symbol.iterator]=function(){return p}),p}function E(h){this.map={},h instanceof E?h.forEach(function(p,_){this.append(_,p)},this):Array.isArray(h)?h.forEach(function(p){if(p.length!=2)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+p.length);this.append(p[0],p[1])},this):h&&Object.getOwnPropertyNames(h).forEach(function(p){this.append(p,h[p])},this)}E.prototype.append=function(h,p){h=d(h),p=y(p);var _=this.map[h];this.map[h]=_?_+", "+p:p},E.prototype.delete=function(h){delete this.map[d(h)]},E.prototype.get=function(h){return h=d(h),this.has(h)?this.map[h]:null},E.prototype.has=function(h){return this.map.hasOwnProperty(d(h))},E.prototype.set=function(h,p){this.map[d(h)]=y(p)},E.prototype.forEach=function(h,p){for(var _ in this.map)this.map.hasOwnProperty(_)&&h.call(p,this.map[_],_,this)},E.prototype.keys=function(){var h=[];return this.forEach(function(p,_){h.push(_)}),N(h)},E.prototype.values=function(){var h=[];return this.forEach(function(p){h.push(p)}),N(h)},E.prototype.entries=function(){var h=[];return this.forEach(function(p,_){h.push([_,p])}),N(h)},u.iterable&&(E.prototype[Symbol.iterator]=E.prototype.entries);function x(h){if(!h._noBody){if(h.bodyUsed)return Promise.reject(new TypeError("Already read"));h.bodyUsed=!0}}function O(h){return new Promise(function(p,_){h.onload=function(){p(h.result)},h.onerror=function(){_(h.error)}})}function V(h){var p=new FileReader,_=O(p);return p.readAsArrayBuffer(h),_}function b(h){var p=new FileReader,_=O(p),R=/charset=([A-Za-z0-9_-]+)/.exec(h.type),L=R?R[1]:"utf-8";return p.readAsText(h,L),_}function k(h){for(var p=new Uint8Array(h),_=new Array(p.length),R=0;R<p.length;R++)_[R]=String.fromCharCode(p[R]);return _.join("")}function Q(h){if(h.slice)return h.slice(0);var p=new Uint8Array(h.byteLength);return p.set(new Uint8Array(h)),p.buffer}function $(){return this.bodyUsed=!1,this._initBody=function(h){this.bodyUsed=this.bodyUsed,this._bodyInit=h,h?typeof h=="string"?this._bodyText=h:u.blob&&Blob.prototype.isPrototypeOf(h)?this._bodyBlob=h:u.formData&&FormData.prototype.isPrototypeOf(h)?this._bodyFormData=h:u.searchParams&&URLSearchParams.prototype.isPrototypeOf(h)?this._bodyText=h.toString():u.arrayBuffer&&u.blob&&c(h)?(this._bodyArrayBuffer=Q(h.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):u.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(h)||f(h))?this._bodyArrayBuffer=Q(h):this._bodyText=h=Object.prototype.toString.call(h):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||(typeof h=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):u.searchParams&&URLSearchParams.prototype.isPrototypeOf(h)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},u.blob&&(this.blob=function(){var h=x(this);if(h)return h;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var h=x(this);return h||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else{if(u.blob)return this.blob().then(V);throw new Error("could not read as ArrayBuffer")}},this.text=function(){var h=x(this);if(h)return h;if(this._bodyBlob)return b(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(k(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},u.formData&&(this.formData=function(){return this.text().then(ve)}),this.json=function(){return this.text().then(JSON.parse)},this}var re=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function pe(h){var p=h.toUpperCase();return re.indexOf(p)>-1?p:h}function G(h,p){if(!(this instanceof G))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');p=p||{};var _=p.body;if(h instanceof G){if(h.bodyUsed)throw new TypeError("Already read");this.url=h.url,this.credentials=h.credentials,p.headers||(this.headers=new E(h.headers)),this.method=h.method,this.mode=h.mode,this.signal=h.signal,!_&&h._bodyInit!=null&&(_=h._bodyInit,h.bodyUsed=!0)}else this.url=String(h);if(this.credentials=p.credentials||this.credentials||"same-origin",(p.headers||!this.headers)&&(this.headers=new E(p.headers)),this.method=pe(p.method||this.method||"GET"),this.mode=p.mode||this.mode||null,this.signal=p.signal||this.signal||(function(){if("AbortController"in a){var S=new AbortController;return S.signal}})(),this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&_)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(_),(this.method==="GET"||this.method==="HEAD")&&(p.cache==="no-store"||p.cache==="no-cache")){var R=/([?&])_=[^&]*/;if(R.test(this.url))this.url=this.url.replace(R,"$1_="+new Date().getTime());else{var L=/\?/;this.url+=(L.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}G.prototype.clone=function(){return new G(this,{body:this._bodyInit})};function ve(h){var p=new FormData;return h.trim().split("&").forEach(function(_){if(_){var R=_.split("="),L=R.shift().replace(/\+/g," "),S=R.join("=").replace(/\+/g," ");p.append(decodeURIComponent(L),decodeURIComponent(S))}}),p}function Y(h){var p=new E,_=h.replace(/\r?\n[\t ]+/g," ");return _.split("\r").map(function(R){return R.indexOf(`
|
|
56
|
+
`)===0?R.substr(1,R.length):R}).forEach(function(R){var L=R.split(":"),S=L.shift().trim();if(S){var Be=L.join(":").trim();try{p.append(S,Be)}catch(tt){console.warn("Response "+tt.message)}}}),p}$.call(G.prototype);function j(h,p){if(!(this instanceof j))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(p||(p={}),this.type="default",this.status=p.status===void 0?200:p.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=p.statusText===void 0?"":""+p.statusText,this.headers=new E(p.headers),this.url=p.url||"",this._initBody(h)}$.call(j.prototype),j.prototype.clone=function(){return new j(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new E(this.headers),url:this.url})},j.error=function(){var h=new j(null,{status:200,statusText:""});return h.ok=!1,h.status=0,h.type="error",h};var me=[301,302,303,307,308];j.redirect=function(h,p){if(me.indexOf(p)===-1)throw new RangeError("Invalid status code");return new j(null,{status:p,headers:{location:h}})},o.DOMException=a.DOMException;try{new o.DOMException}catch{o.DOMException=function(p,_){this.message=p,this.name=_;var R=Error(p);this.stack=R.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function oe(h,p){return new Promise(function(_,R){var L=new G(h,p);if(L.signal&&L.signal.aborted)return R(new o.DOMException("Aborted","AbortError"));var S=new XMLHttpRequest;function Be(){S.abort()}S.onload=function(){var U={statusText:S.statusText,headers:Y(S.getAllResponseHeaders()||"")};L.url.indexOf("file://")===0&&(S.status<200||S.status>599)?U.status=200:U.status=S.status,U.url="responseURL"in S?S.responseURL:U.headers.get("X-Request-URL");var ae="response"in S?S.response:S.responseText;setTimeout(function(){_(new j(ae,U))},0)},S.onerror=function(){setTimeout(function(){R(new TypeError("Network request failed"))},0)},S.ontimeout=function(){setTimeout(function(){R(new TypeError("Network request timed out"))},0)},S.onabort=function(){setTimeout(function(){R(new o.DOMException("Aborted","AbortError"))},0)};function tt(U){try{return U===""&&a.location.href?a.location.href:U}catch{return U}}if(S.open(L.method,tt(L.url),!0),L.credentials==="include"?S.withCredentials=!0:L.credentials==="omit"&&(S.withCredentials=!1),"responseType"in S&&(u.blob?S.responseType="blob":u.arrayBuffer&&(S.responseType="arraybuffer")),p&&typeof p.headers=="object"&&!(p.headers instanceof E||a.Headers&&p.headers instanceof a.Headers)){var Pt=[];Object.getOwnPropertyNames(p.headers).forEach(function(U){Pt.push(d(U)),S.setRequestHeader(U,y(p.headers[U]))}),L.headers.forEach(function(U,ae){Pt.indexOf(ae)===-1&&S.setRequestHeader(ae,U)})}else L.headers.forEach(function(U,ae){S.setRequestHeader(ae,U)});L.signal&&(L.signal.addEventListener("abort",Be),S.onreadystatechange=function(){S.readyState===4&&L.signal.removeEventListener("abort",Be)}),S.send(typeof L._bodyInit>"u"?null:L._bodyInit)})}return oe.polyfill=!0,a.fetch||(a.fetch=oe,a.Headers=E,a.Request=G,a.Response=j),o.Headers=E,o.Request=G,o.Response=j,o.fetch=oe,Object.defineProperty(o,"__esModule",{value:!0}),o})({})})(i),i.fetch.ponyfill=!0,delete i.fetch.polyfill;var r=n.fetch?n:i;t=r.fetch,t.default=r.fetch,t.fetch=r.fetch,t.Headers=r.Headers,t.Request=r.Request,t.Response=r.Response,e.exports=t})(Fe,Fe.exports)),Fe.exports}var Pe=Oi();const Me=Ii(Pe),bi=ge({__proto__:null,default:Me},[Pe]),de=e=>{let t={};return e&&(typeof Headers<"u"&&e instanceof Headers||bi&&Pe.Headers&&e instanceof Pe.Headers?t=kn(e):Array.isArray(e)?e.forEach(([n,i])=>{n&&i!==void 0&&(t[n]=i)}):t=e),t},Rt=e=>e.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),_i=e=>{if(!Array.isArray(e.query)){const i=e,r=[`query=${encodeURIComponent(Rt(i.query))}`];return e.variables&&r.push(`variables=${encodeURIComponent(i.jsonSerializer.stringify(i.variables))}`),i.operationName&&r.push(`operationName=${encodeURIComponent(i.operationName)}`),r.join("&")}if(typeof e.variables<"u"&&!Array.isArray(e.variables))throw new Error("Cannot create query with given variable type, array expected");const t=e,n=e.query.reduce((i,r,s)=>(i.push({query:Rt(r),variables:t.variables?t.jsonSerializer.stringify(t.variables[s]):void 0}),i),[]);return`query=${encodeURIComponent(t.jsonSerializer.stringify(n))}`},Di=e=>async t=>{const{url:n,query:i,variables:r,operationName:s,fetch:o,fetchOptions:a,middleware:u}=t,c={...t.headers};let l="",f;e==="POST"?(f=xi(i,r,s,a.jsonSerializer),typeof f=="string"&&(c["Content-Type"]="application/json")):l=_i({query:i,variables:r,operationName:s,jsonSerializer:a.jsonSerializer??Ge});const d={method:e,headers:c,body:f,...a};let y=n,N=d;if(u){const E=await Promise.resolve(u({...d,url:n,operationName:s,variables:r})),{url:x,...O}=E;y=x,N=O}return l&&(y=`${y}?${l}`),await o(y,N)};class Si{constructor(t,n={}){this.url=t,this.requestConfig=n,this.rawRequest=async(...i)=>{const[r,s,o]=i,a=Ln(r,s,o),{headers:u,fetch:c=Me,method:l="POST",requestMiddleware:f,responseMiddleware:d,...y}=this.requestConfig,{url:N}=this;a.signal!==void 0&&(y.signal=a.signal);const{operationName:E}=We(a.query);return Ke({url:N,query:a.query,variables:a.variables,headers:{...de(et(u)),...de(a.requestHeaders)},operationName:E,fetch:c,method:l,fetchOptions:y,middleware:f}).then(x=>(d&&d(x),x)).catch(x=>{throw d&&d(x),x})}}async request(t,...n){const[i,r]=n,s=Rn(t,i,r),{headers:o,fetch:a=Me,method:u="POST",requestMiddleware:c,responseMiddleware:l,...f}=this.requestConfig,{url:d}=this;s.signal!==void 0&&(f.signal=s.signal);const{query:y,operationName:N}=We(s.document);return Ke({url:d,query:y,variables:s.variables,headers:{...de(et(o)),...de(s.requestHeaders)},operationName:N,fetch:a,method:u,fetchOptions:f,middleware:c}).then(E=>(l&&l(E),E.data)).catch(E=>{throw l&&l(E),E})}batchRequests(t,n){const i=Fn(t,n),{headers:r,...s}=this.requestConfig;i.signal!==void 0&&(s.signal=i.signal);const o=i.documents.map(({document:u})=>We(u).query),a=i.documents.map(({variables:u})=>u);return Ke({url:this.url,query:o,variables:a,headers:{...de(et(r)),...de(i.requestHeaders)},operationName:void 0,fetch:this.requestConfig.fetch??Me,method:this.requestConfig.method||"POST",fetchOptions:s,middleware:this.requestConfig.requestMiddleware}).then(u=>(this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(u),u.data)).catch(u=>{throw this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(u),u})}setHeaders(t){return this.requestConfig.headers=t,this}setHeader(t,n){const{headers:i}=this.requestConfig;return i?i[t]=n:this.requestConfig.headers={[t]:n},this}setEndpoint(t){return this.url=t,this}}const Ke=async e=>{const{query:t,variables:n,fetchOptions:i}=e,r=Di(Cn(e.method??"post")),s=Array.isArray(e.query),o=await r(e),a=await Ci(o,i.jsonSerializer??Ge),u=Array.isArray(a)?!a.some(({data:l})=>!l):!!a.data,c=Array.isArray(a)||!a.errors||Array.isArray(a.errors)&&!a.errors.length||i.errorPolicy==="all"||i.errorPolicy==="ignore";if(o.ok&&c&&u){const{errors:l,...f}=(Array.isArray(a),a),d=i.errorPolicy==="ignore"?f:a;return{...s?{data:d}:d,headers:o.headers,status:o.status}}else{const l=typeof a=="string"?{error:a}:a;throw new we({...l,status:o.status,headers:o.headers},{query:t,variables:n})}},xi=(e,t,n,i)=>{const r=i??Ge;if(!Array.isArray(e))return r.stringify({query:e,variables:t,operationName:n});if(typeof t<"u"&&!Array.isArray(t))throw new Error("Cannot create request body with given variable type, array expected");const s=e.reduce((o,a,u)=>(o.push({query:a,variables:t?t[u]:void 0}),o),[]);return r.stringify(s)},Ci=async(e,t)=>{let n;return e.headers.forEach((i,r)=>{r.toLowerCase()==="content-type"&&(n=i)}),n&&(n.toLowerCase().startsWith("application/json")||n.toLowerCase().startsWith("application/graphql+json")||n.toLowerCase().startsWith("application/graphql-response+json"))?t.parse(await e.text()):e.text()},et=e=>typeof e=="function"?e():e,Lt=(e,...t)=>e.reduce((n,i,r)=>`${n}${i}${r in t?String(t[r]):""}`,""),Ft={getMeta:Lt`
|
|
57
57
|
query getDoctype($doctype: String!) {
|
|
58
58
|
getMeta(doctype: $doctype) {
|
|
59
59
|
id
|
|
@@ -109,5 +109,5 @@ spurious results.`)}}return!1};class Dt{constructor(t,n="GraphQL request",i={lin
|
|
|
109
109
|
query: Query
|
|
110
110
|
mutation: Mutation
|
|
111
111
|
}
|
|
112
|
-
`,Ri=e=>JSON.parse(e,(t,n)=>{if(typeof n=="string")try{return JSON.parse(n,(i,r)=>typeof r=="string"&&!isNaN(Number(r))?new le(r):r)}catch{return n}else if(!isNaN(Number(n)))return new le(n);return n}),Li={getMeta:async(e,t)=>{const n=new Si(t||"/graphql",{jsonSerializer:{stringify:r=>JSON.stringify(r),parse:Ri}}),{getMeta:i}=await n.request({document:Ft.getMeta,variables:{doctype:e}});return i}};K.methods=Li,K.queries=Ft,K.typeDefs=ki,Object.defineProperty(K,Symbol.toStringTag,{value:"Module"})});
|
|
112
|
+
`,Ri=e=>JSON.parse(e,(t,n)=>{if(typeof n=="string")try{return JSON.parse(n,(i,r)=>typeof r=="string"&&!isNaN(Number(r))?new le(r):r)}catch{return n}else if(!isNaN(Number(n)))return new le(n);return n}),Li={getMeta:async(e,t)=>{const n=new Si(t||"/graphql",{jsonSerializer:{stringify:r=>JSON.stringify(r),parse:Ri}}),{getMeta:i}=await n.request({document:Ft.getMeta,variables:{doctype:e}});return i}};K.methods=Li,K.queries=Ft,K.typeDefs=ki,Object.defineProperty(K,Symbol.toStringTag,{value:"Module"})}));
|
|
113
113
|
//# sourceMappingURL=graphql-client.umd.cjs.map
|