@graphty/cytoscape-extensions 0.0.28 → 0.0.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/algorithm-options.d.ts +5 -0
- package/dist/algorithm-options.d.ts.map +1 -0
- package/dist/algorithm-options.js +285 -0
- package/dist/algorithm-options.js.map +1 -0
- package/dist/algorithms.d.ts +489 -0
- package/dist/algorithms.d.ts.map +1 -0
- package/dist/algorithms.js +1184 -0
- package/dist/algorithms.js.map +1 -0
- package/dist/cdn/chunks/elements-DIunzJUl.js +1 -0
- package/dist/cdn/chunks/gpu-platform-browser-DnQwf3s0.js +2825 -0
- package/dist/cdn/chunks/index-C-jUF_Ve.js +1 -0
- package/dist/cdn/chunks/index-C4RZkds_.js +10 -0
- package/dist/cdn/chunks/io-D-Vr0j3W.js +269 -0
- package/dist/cdn/chunks/preload-helper-Crt_PPe8.js +1 -0
- package/dist/cdn/chunks/samples-Dja23zzq.js +1 -0
- package/dist/cdn/chunks/sigv4-BXwVbza3-DZCCNyQA.js +3 -0
- package/dist/cdn/chunks/sources-cypher-oj3S6pKb.js +5 -0
- package/dist/cdn/chunks/sources-ndex-BgZhxHsL.js +1 -0
- package/dist/cdn/chunks/sources-rest-E6On5P3z.js +1 -0
- package/dist/cdn/chunks/sources-sparql-BAxh1dw-.js +5 -0
- package/dist/cdn/cytoscape-extensions.js +1 -0
- package/dist/cdn/io.js +1 -0
- package/dist/cytoscape-extensions.bundle.js +2825 -0
- package/dist/elements.d.ts +69 -0
- package/dist/elements.d.ts.map +1 -0
- package/dist/elements.js +343 -0
- package/dist/elements.js.map +1 -0
- package/dist/gpu-platform-browser.d.ts +11 -0
- package/dist/gpu-platform-browser.d.ts.map +1 -0
- package/dist/gpu-platform-browser.js +22 -0
- package/dist/gpu-platform-browser.js.map +1 -0
- package/dist/gpu-platform-node.d.ts +15 -0
- package/dist/gpu-platform-node.d.ts.map +1 -0
- package/dist/gpu-platform-node.js +27 -0
- package/dist/gpu-platform-node.js.map +1 -0
- package/dist/gpu.d.ts +149 -0
- package/dist/gpu.d.ts.map +1 -0
- package/dist/gpu.js +312 -0
- package/dist/gpu.js.map +1 -0
- package/dist/graph-data.d.ts +101 -0
- package/dist/graph-data.d.ts.map +1 -0
- package/dist/graph-data.js +147 -0
- package/dist/graph-data.js.map +1 -0
- package/dist/index.d.ts +36 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +48 -0
- package/dist/index.js.map +1 -0
- package/dist/io.d.ts +111 -0
- package/dist/io.d.ts.map +1 -0
- package/dist/io.js +258 -0
- package/dist/io.js.map +1 -0
- package/dist/layouts.d.ts +207 -0
- package/dist/layouts.d.ts.map +1 -0
- package/dist/layouts.js +615 -0
- package/dist/layouts.js.map +1 -0
- package/dist/lazy.d.ts +21 -0
- package/dist/lazy.d.ts.map +1 -0
- package/dist/lazy.js +32 -0
- package/dist/lazy.js.map +1 -0
- package/dist/samples.d.ts +115 -0
- package/dist/samples.d.ts.map +1 -0
- package/dist/samples.js +237 -0
- package/dist/samples.js.map +1 -0
- package/dist/snapshot.d.ts +81 -0
- package/dist/snapshot.d.ts.map +1 -0
- package/dist/snapshot.js +225 -0
- package/dist/snapshot.js.map +1 -0
- package/dist/webgpu-provider.d.ts +25 -0
- package/dist/webgpu-provider.d.ts.map +1 -0
- package/dist/webgpu-provider.js +53 -0
- package/dist/webgpu-provider.js.map +1 -0
- package/package.json +13 -9
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
function E0(e,g){for(var O=0;O<g.length;O++){const d=g[O];if(typeof d!="string"&&!Array.isArray(d)){for(const o in d)if(o!=="default"&&!(o in e)){const n=Object.getOwnPropertyDescriptor(d,o);n&&Object.defineProperty(e,o,n.get?n:{enumerable:!0,get:()=>d[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var T0=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function S0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Kr={},rr={},_r={},Ne={},Bu={},oi={},sl;function ly(){if(sl)return oi;sl=1,Object.defineProperty(oi,"__esModule",{value:!0}),oi.createBrokenObject=O,oi.isBrokenObject=d,oi.getBrokenObjectReason=o;var e="__isBrokenObject__",g="__reason__";function O(n,t){t===void 0&&(t={});var r=function(){throw n};return new Proxy(t,{get:function(i,c){if(c===e)return!0;if(c===g)return n;if(c==="toJSON")return;r()},set:r,apply:r,construct:r,defineProperty:r,deleteProperty:r,getOwnPropertyDescriptor:r,getPrototypeOf:r,has:r,isExtensible:r,ownKeys:r,preventExtensions:r,setPrototypeOf:r})}function d(n){return n!==null&&typeof n=="object"&&n[e]===!0}function o(n){return n[g]}return oi}var ll;function rn(){if(ll)return Bu;ll=1,Object.defineProperty(Bu,"__esModule",{value:!0}),Bu.stringify=g;var e=ly();function g(O,d){return JSON.stringify(O,function(o,n){return(0,e.isBrokenObject)(n)?{__isBrokenObject__:!0,__reason__:(0,e.getBrokenObjectReason)(n)}:typeof n=="bigint"?"".concat(n,"n"):d?.sortedElements===!0&&typeof n=="object"&&!Array.isArray(n)?Object.keys(n).sort().reduce(function(t,r){return t[r]=n[r],t},{}):d?.useCustomToString===!0&&typeof n=="object"&&!Array.isArray(n)&&typeof n.toString=="function"&&n.toString!==Object.prototype.toString?n?.toString():n})}return Bu}var is={},fl;function fy(){return fl||(fl=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.rawPolyfilledDiagnosticRecord=void 0,e.rawPolyfilledDiagnosticRecord={OPERATION:"",OPERATION_CODE:"0",CURRENT_SCHEMA:"/"},Object.freeze(e.rawPolyfilledDiagnosticRecord)})(is)),is}var dl;function He(){if(dl)return Ne;dl=1;var e=Ne&&Ne.__extends||(function(){var b=function(E,w){return b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(T,R){T.__proto__=R}||function(T,R){for(var L in R)Object.prototype.hasOwnProperty.call(R,L)&&(T[L]=R[L])},b(E,w)};return function(E,w){if(typeof w!="function"&&w!==null)throw new TypeError("Class extends value "+String(w)+" is not a constructor or null");b(E,w);function T(){this.constructor=E}E.prototype=w===null?Object.create(w):(T.prototype=w.prototype,new T)}})(),g=Ne&&Ne.__createBinding||(Object.create?(function(b,E,w,T){T===void 0&&(T=w);var R=Object.getOwnPropertyDescriptor(E,w);(!R||("get"in R?!E.__esModule:R.writable||R.configurable))&&(R={enumerable:!0,get:function(){return E[w]}}),Object.defineProperty(b,T,R)}):(function(b,E,w,T){T===void 0&&(T=w),b[T]=E[w]})),O=Ne&&Ne.__setModuleDefault||(Object.create?(function(b,E){Object.defineProperty(b,"default",{enumerable:!0,value:E})}):function(b,E){b.default=E}),d=Ne&&Ne.__importStar||(function(){var b=function(E){return b=Object.getOwnPropertyNames||function(w){var T=[];for(var R in w)Object.prototype.hasOwnProperty.call(w,R)&&(T[T.length]=R);return T},b(E)};return function(E){if(E&&E.__esModule)return E;var w={};if(E!=null)for(var T=b(E),R=0;R<T.length;R++)T[R]!=="default"&&g(w,E,T[R]);return O(w,E),w}})();Object.defineProperty(Ne,"__esModule",{value:!0}),Ne.PROTOCOL_ERROR=Ne.SESSION_EXPIRED=Ne.SERVICE_UNAVAILABLE=Ne.GQLError=Ne.Neo4jError=Ne.isRetriableError=void 0,Ne.newError=m,Ne.newGQLError=h;var o=d(rn()),n=fy(),t={DATABASE_ERROR:"DATABASE_ERROR",CLIENT_ERROR:"CLIENT_ERROR",TRANSIENT_ERROR:"TRANSIENT_ERROR",UNKNOWN:"UNKNOWN"};Object.freeze(t);var r=Object.values(t),i="ServiceUnavailable";Ne.SERVICE_UNAVAILABLE=i;var c="SessionExpired";Ne.SESSION_EXPIRED=c;var l="ProtocolError";Ne.PROTOCOL_ERROR=l;var a="N/A",_=(function(b){e(E,b);function E(w,T,R,L,j){var M,x=b.call(this,w,j!=null?{cause:j}:void 0)||this;return x.constructor=E,x.__proto__=E.prototype,x.cause=j??void 0,x.gqlStatus=T,x.gqlStatusDescription=R,x.diagnosticRecord=L,x.classification=f(x.diagnosticRecord),x.rawClassification=(M=L?._classification)!==null&&M!==void 0?M:void 0,x.name="GQLError",x}return Object.defineProperty(E.prototype,"diagnosticRecordAsJsonString",{get:function(){return o.stringify(this.diagnosticRecord,{useCustomToString:!0})},enumerable:!1,configurable:!0}),E})(Error);Ne.GQLError=_;var p=(function(b){e(E,b);function E(w,T,R,L,j,M){var x=b.call(this,w,R,L,j,M)||this;return x.constructor=E,x.__proto__=E.prototype,x.code=T,x.name="Neo4jError",x.retriable=v(T),x}return E.isRetriable=function(w){return w!=null&&w instanceof E&&w.retriable},E})(_);Ne.Neo4jError=p;function m(b,E,w,T,R,L){return new p(b,E??a,T??"50N42",R??"error: general processing exception - unexpected error. "+b,L??n.rawPolyfilledDiagnosticRecord,w)}function h(b,E,w,T,R){return new _(b,w??"50N42",T??"error: general processing exception - unexpected error. "+b,R??n.rawPolyfilledDiagnosticRecord,E)}var u=p.isRetriable;Ne.isRetriableError=u;function v(b){return b===i||b===c||s(b)||y(b)}function y(b){return b?.includes("TransientError")===!0}function s(b){return b==="Neo.ClientError.Security.AuthorizationExpired"}function f(b){return b===void 0||b._classification===void 0?"UNKNOWN":r.includes(b._classification)?b?._classification:"UNKNOWN"}return Ne}var tr={},hl;function Tu(){if(hl)return tr;hl=1,Object.defineProperty(tr,"__esModule",{value:!0}),tr.toString=tr.toNumber=tr.inSafeRange=tr.isInt=tr.int=void 0;var e=He(),g=new Map,O=(function(){function u(v,y){this.low=v??0,this.high=y??0}return u.prototype.inSafeRange=function(){return this.greaterThanOrEqual(u.MIN_SAFE_VALUE)&&this.lessThanOrEqual(u.MAX_SAFE_VALUE)},u.prototype.toInt=function(){return this.low},u.prototype.toNumber=function(){return this.high*r+(this.low>>>0)},u.prototype.toBigInt=function(){if(this.isZero())return BigInt(0);if(this.isPositive())return BigInt(this.high>>>0)*BigInt(r)+BigInt(this.low>>>0);var v=this.negate();return BigInt(-1)*(BigInt(v.high>>>0)*BigInt(r)+BigInt(v.low>>>0))},u.prototype.toNumberOrInfinity=function(){return this.lessThan(u.MIN_SAFE_VALUE)?Number.NEGATIVE_INFINITY:this.greaterThan(u.MAX_SAFE_VALUE)?Number.POSITIVE_INFINITY:this.toNumber()},u.prototype.toString=function(v){if(v=v??10,v<2||v>36)throw RangeError("radix out of range: "+v.toString());if(this.isZero())return"0";var y;if(this.isNegative())if(this.equals(u.MIN_VALUE)){var s=u.fromNumber(v),f=this.div(s);return y=f.multiply(s).subtract(this),f.toString(v)+y.toInt().toString(v)}else return"-"+this.negate().toString(v);var b=u.fromNumber(Math.pow(v,6));y=this;for(var E="";;){var w=y.div(b),T=y.subtract(w.multiply(b)).toInt()>>>0,R=T.toString(v);if(y=w,y.isZero())return R+E;for(;R.length<6;)R="0"+R;E=""+R+E}},u.prototype.valueOf=function(){return this.toBigInt()},u.prototype.getHighBits=function(){return this.high},u.prototype.getLowBits=function(){return this.low},u.prototype.getNumBitsAbs=function(){if(this.isNegative())return this.equals(u.MIN_VALUE)?64:this.negate().getNumBitsAbs();var v=this.high!==0?this.high:this.low,y=0;for(y=31;y>0&&(v&1<<y)===0;y--);return this.high!==0?y+33:y+1},u.prototype.isZero=function(){return this.high===0&&this.low===0},u.prototype.isNegative=function(){return this.high<0},u.prototype.isPositive=function(){return this.high>=0},u.prototype.isOdd=function(){return(this.low&1)===1},u.prototype.isEven=function(){return(this.low&1)===0},u.prototype.equals=function(v){var y=u.fromValue(v);return this.high===y.high&&this.low===y.low},u.prototype.notEquals=function(v){return!this.equals(v)},u.prototype.lessThan=function(v){return this.compare(v)<0},u.prototype.lessThanOrEqual=function(v){return this.compare(v)<=0},u.prototype.greaterThan=function(v){return this.compare(v)>0},u.prototype.greaterThanOrEqual=function(v){return this.compare(v)>=0},u.prototype.compare=function(v){var y=u.fromValue(v);if(this.equals(y))return 0;var s=this.isNegative(),f=y.isNegative();return s&&!f?-1:!s&&f?1:this.subtract(y).isNegative()?-1:1},u.prototype.negate=function(){return this.equals(u.MIN_VALUE)?u.MIN_VALUE:this.not().add(u.ONE)},u.prototype.add=function(v){var y=u.fromValue(v),s=this.high>>>16,f=this.high&65535,b=this.low>>>16,E=this.low&65535,w=y.high>>>16,T=y.high&65535,R=y.low>>>16,L=y.low&65535,j=0,M=0,x=0,Z=0;return Z+=E+L,x+=Z>>>16,Z&=65535,x+=b+R,M+=x>>>16,x&=65535,M+=f+T,j+=M>>>16,M&=65535,j+=s+w,j&=65535,u.fromBits(x<<16|Z,j<<16|M)},u.prototype.subtract=function(v){var y=u.fromValue(v);return this.add(y.negate())},u.prototype.multiply=function(v){if(this.isZero())return u.ZERO;var y=u.fromValue(v);if(y.isZero())return u.ZERO;if(this.equals(u.MIN_VALUE))return y.isOdd()?u.MIN_VALUE:u.ZERO;if(y.equals(u.MIN_VALUE))return this.isOdd()?u.MIN_VALUE:u.ZERO;if(this.isNegative())return y.isNegative()?this.negate().multiply(y.negate()):this.negate().multiply(y).negate();if(y.isNegative())return this.multiply(y.negate()).negate();if(this.lessThan(l)&&y.lessThan(l))return u.fromNumber(this.toNumber()*y.toNumber());var s=this.high>>>16,f=this.high&65535,b=this.low>>>16,E=this.low&65535,w=y.high>>>16,T=y.high&65535,R=y.low>>>16,L=y.low&65535,j=0,M=0,x=0,Z=0;return Z+=E*L,x+=Z>>>16,Z&=65535,x+=b*L,M+=x>>>16,x&=65535,x+=E*R,M+=x>>>16,x&=65535,M+=f*L,j+=M>>>16,M&=65535,M+=b*R,j+=M>>>16,M&=65535,M+=E*T,j+=M>>>16,M&=65535,j+=s*L+f*R+b*T+E*w,j&=65535,u.fromBits(x<<16|Z,j<<16|M)},u.prototype.div=function(v){var y=u.fromValue(v);if(y.isZero())throw(0,e.newError)("division by zero");if(this.isZero())return u.ZERO;var s,f,b;if(this.equals(u.MIN_VALUE)){if(y.equals(u.ONE)||y.equals(u.NEG_ONE))return u.MIN_VALUE;if(y.equals(u.MIN_VALUE))return u.ONE;var E=this.shiftRight(1);return s=E.div(y).shiftLeft(1),s.equals(u.ZERO)?y.isNegative()?u.ONE:u.NEG_ONE:(f=this.subtract(y.multiply(s)),b=s.add(f.div(y)),b)}else if(y.equals(u.MIN_VALUE))return u.ZERO;if(this.isNegative())return y.isNegative()?this.negate().div(y.negate()):this.negate().div(y).negate();if(y.isNegative())return this.div(y.negate()).negate();for(b=u.ZERO,f=this;f.greaterThanOrEqual(y);){s=Math.max(1,Math.floor(f.toNumber()/y.toNumber()));for(var w=Math.ceil(Math.log(s)/Math.LN2),T=w<=48?1:Math.pow(2,w-48),R=u.fromNumber(s),L=R.multiply(y);L.isNegative()||L.greaterThan(f);)s-=T,R=u.fromNumber(s),L=R.multiply(y);R.isZero()&&(R=u.ONE),b=b.add(R),f=f.subtract(L)}return b},u.prototype.modulo=function(v){var y=u.fromValue(v);return this.subtract(this.div(y).multiply(y))},u.prototype.not=function(){return u.fromBits(~this.low,~this.high)},u.prototype.and=function(v){var y=u.fromValue(v);return u.fromBits(this.low&y.low,this.high&y.high)},u.prototype.or=function(v){var y=u.fromValue(v);return u.fromBits(this.low|y.low,this.high|y.high)},u.prototype.xor=function(v){var y=u.fromValue(v);return u.fromBits(this.low^y.low,this.high^y.high)},u.prototype.shiftLeft=function(v){var y=u.toNumber(v);return(y&=63)===0?u.ZERO:y<32?u.fromBits(this.low<<y,this.high<<y|this.low>>>32-y):u.fromBits(0,this.low<<y-32)},u.prototype.shiftRight=function(v){var y=u.toNumber(v),s=u.toNumber(v);return(y&=63)===0?u.ZERO:s<32?u.fromBits(this.low>>>y|this.high<<32-y,this.high>>y):u.fromBits(this.high>>y-32,this.high>=0?0:-1)},u.isInteger=function(v){return v?.__isInteger__===!0},u.fromInt=function(v){var y;if(v=v|0,v>=-128&&v<128&&(y=g.get(v),y!=null))return y;var s=new u(v,v<0?-1:0);return v>=-128&&v<128&&g.set(v,s),s},u.fromBits=function(v,y){return new u(v,y)},u.fromNumber=function(v){return isNaN(v)||!isFinite(v)?u.ZERO:v<=-c?u.MIN_VALUE:v+1>=c?u.MAX_VALUE:v<0?u.fromNumber(-v).negate():new u(v%r|0,v/r|0)},u.fromString=function(v,y,s){var f=s===void 0?{}:s,b=f.strictStringValidation;if(v.length===0)throw(0,e.newError)("number format error: empty string");if(v==="NaN"||v==="Infinity"||v==="+Infinity"||v==="-Infinity")return u.ZERO;if(y=y??10,y<2||y>36)throw(0,e.newError)("radix out of range: "+y.toString());var E;if((E=v.indexOf("-"))>0)throw(0,e.newError)('number format error: interior "-" character: '+v);if(E===0)return u.fromString(v.substring(1),y).negate();for(var w=u.fromNumber(Math.pow(y,8)),T=u.ZERO,R=0;R<v.length;R+=8){var L=Math.min(8,v.length-R),j=v.substring(R,R+L),M=parseInt(j,y);if(b===!0&&!o(j,M,y))throw(0,e.newError)('number format error: "'.concat(j,'" is NaN in radix ').concat(y,": ").concat(v));if(L<8){var x=u.fromNumber(Math.pow(y,L));T=T.multiply(x).add(u.fromNumber(M))}else T=T.multiply(w),T=T.add(u.fromNumber(M))}return T},u.fromValue=function(v,y){return y===void 0&&(y={}),v instanceof u?v:typeof v=="number"?(y.ceilFloat===!0&&(v=Math.ceil(v)),u.fromNumber(v)):typeof v=="string"?u.fromString(v,void 0,y):typeof v=="bigint"?u.fromString(v.toString()):new u(v.low,v.high)},u.toNumber=function(v){switch(typeof v){case"number":return v;case"bigint":return Number(v);default:return u.fromValue(v).toNumber()}},u.toString=function(v,y){return u.fromValue(v).toString(y)},u.inSafeRange=function(v){return u.fromValue(v).inSafeRange()},u.ZERO=u.fromInt(0),u.ONE=u.fromInt(1),u.NEG_ONE=u.fromInt(-1),u.MAX_VALUE=u.fromBits(-1,2147483647),u.MIN_VALUE=u.fromBits(0,-2147483648),u.MIN_SAFE_VALUE=u.fromBits(1,-2097152),u.MAX_SAFE_VALUE=u.fromBits(-1,2097151),u.__isInteger__=!0,u})();function d(u,v,y){var s=u.toString(v),f=Math.max(y-s.length,0),b="0".repeat(f);return"".concat(b).concat(s)}function o(u,v,y){return!Number.isNaN(u)&&!Number.isNaN(v)&&d(v,y,u.length)===u.toLowerCase()}Object.defineProperty(O.prototype,"__isInteger__",{value:!0,enumerable:!1,configurable:!1});var n=65536,t=1<<24,r=n*n,i=r*r,c=i/2,l=O.fromInt(t),a=O.fromValue;tr.int=a;var _=O.isInteger;tr.isInt=_;var p=O.inSafeRange;tr.inSafeRange=p;var m=O.toNumber;tr.toNumber=m;var h=O.toString;return tr.toString=h,tr.default=O,tr}var Se={},Zr={},Me={},vl;function hr(){if(vl)return Me;vl=1;var e=Me&&Me.__createBinding||(Object.create?(function(b,E,w,T){T===void 0&&(T=w);var R=Object.getOwnPropertyDescriptor(E,w);(!R||("get"in R?!E.__esModule:R.writable||R.configurable))&&(R={enumerable:!0,get:function(){return E[w]}}),Object.defineProperty(b,T,R)}):(function(b,E,w,T){T===void 0&&(T=w),b[T]=E[w]})),g=Me&&Me.__setModuleDefault||(Object.create?(function(b,E){Object.defineProperty(b,"default",{enumerable:!0,value:E})}):function(b,E){b.default=E}),O=Me&&Me.__importStar||(function(){var b=function(E){return b=Object.getOwnPropertyNames||function(w){var T=[];for(var R in w)Object.prototype.hasOwnProperty.call(w,R)&&(T[T.length]=R);return T},b(E)};return function(E){if(E&&E.__esModule)return E;var w={};if(E!=null)for(var T=b(E),R=0;R<T.length;R++)T[R]!=="default"&&e(w,E,T[R]);return g(w,E),w}})(),d=Me&&Me.__values||function(b){var E=typeof Symbol=="function"&&Symbol.iterator,w=E&&b[E],T=0;if(w)return w.call(b);if(b&&typeof b.length=="number")return{next:function(){return b&&T>=b.length&&(b=void 0),{value:b&&b[T++],done:!b}}};throw new TypeError(E?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(Me,"__esModule",{value:!0}),Me.ENCRYPTION_OFF=Me.ENCRYPTION_ON=void 0,Me.isEmptyObjectOrNull=i,Me.isObject=c,Me.isString=y,Me.assertObject=a,Me.assertString=_,Me.assertNumber=p,Me.assertNumberOrInteger=m,Me.assertValidDate=h,Me.toNumber=f,Me.validateQueryAndParameters=l,Me.equals=s;var o=O(Tu()),n=rn(),t="ENCRYPTION_ON";Me.ENCRYPTION_ON=t;var r="ENCRYPTION_OFF";Me.ENCRYPTION_OFF=r;function i(b){if(b===null)return!0;if(!c(b))return!1;for(var E in b)if(b[E]!==void 0)return!1;return!0}function c(b){return typeof b=="object"&&!Array.isArray(b)&&b!==null}function l(b,E,w){var T,R,L="",j=E??{},M=(T=w?.skipAsserts)!==null&&T!==void 0?T:!1;return typeof b=="string"?L=b:b instanceof String?L=b.toString():typeof b=="object"&&b.text!=null&&(L=b.text,j=(R=b.parameters)!==null&&R!==void 0?R:{}),M||(u(L),v(j)),{validatedQuery:L,params:j}}function a(b,E){if(!c(b))throw new TypeError(E+" expected to be an object but was: "+(0,n.stringify)(b));return b}function _(b,E){if(!y(b))throw new TypeError((0,n.stringify)(E)+" expected to be string but was: "+(0,n.stringify)(b));return b}function p(b,E){if(typeof b!="number")throw new TypeError(E+" expected to be a number but was: "+(0,n.stringify)(b));return b}function m(b,E){if(typeof b!="number"&&typeof b!="bigint"&&!(0,o.isInt)(b))throw new TypeError(E+" expected to be either a number or an Integer object but was: "+(0,n.stringify)(b));return b}function h(b,E){if(Object.prototype.toString.call(b)!=="[object Date]")throw new TypeError(E+" expected to be a standard JavaScript Date but was: "+(0,n.stringify)(b));if(Number.isNaN(b.getTime()))throw new TypeError(E+" expected to be valid JavaScript Date but its time was NaN: "+(0,n.stringify)(b));return b}function u(b){if(_(b,"Cypher query"),b.trim().length===0)throw new TypeError("Cypher query is expected to be a non-empty string.")}function v(b){if(!c(b)){var E=b.constructor!=null?" "+b.constructor.name:"";throw new TypeError("Query parameters are expected to either be undefined/null or an object, given:".concat(E," ").concat(JSON.stringify(b)))}}function y(b){return Object.prototype.toString.call(b)==="[object String]"}function s(b,E){var w,T;if(b===E)return!0;if(b===null||E===null)return!1;if(typeof b=="object"&&typeof E=="object"){var R=Object.keys(b),L=Object.keys(E);if(R.length!==L.length)return!1;try{for(var j=d(R),M=j.next();!M.done;M=j.next()){var x=M.value;if(!s(b[x],E[x]))return!1}}catch(Z){w={error:Z}}finally{try{M&&!M.done&&(T=j.return)&&T.call(j)}finally{if(w)throw w.error}}return!0}return!1}function f(b){return b instanceof o.default?b.toNumber():typeof b=="bigint"?(0,o.int)(b).toNumber():b}return Me}var _l;function dy(){return _l||(_l=1,(function(e){var g=Zr&&Zr.__createBinding||(Object.create?(function(k,W,F,Y){Y===void 0&&(Y=F);var X=Object.getOwnPropertyDescriptor(W,F);(!X||("get"in X?!W.__esModule:X.writable||X.configurable))&&(X={enumerable:!0,get:function(){return W[F]}}),Object.defineProperty(k,Y,X)}):(function(k,W,F,Y){Y===void 0&&(Y=F),k[Y]=W[F]})),O=Zr&&Zr.__setModuleDefault||(Object.create?(function(k,W){Object.defineProperty(k,"default",{enumerable:!0,value:W})}):function(k,W){k.default=W}),d=Zr&&Zr.__importStar||(function(){var k=function(W){return k=Object.getOwnPropertyNames||function(F){var Y=[];for(var X in F)Object.prototype.hasOwnProperty.call(F,X)&&(Y[Y.length]=X);return Y},k(W)};return function(W){if(W&&W.__esModule)return W;var F={};if(W!=null)for(var Y=k(W),X=0;X<Y.length;X++)Y[X]!=="default"&&g(F,W,Y[X]);return O(F,W),F}})();Object.defineProperty(e,"__esModule",{value:!0}),e.SECONDS_PER_DAY=e.DAYS_PER_400_YEAR_CYCLE=e.DAYS_0000_TO_1970=e.NANOS_PER_HOUR=e.NANOS_PER_MINUTE=e.NANOS_PER_MILLISECOND=e.NANOS_PER_SECOND=e.SECONDS_PER_HOUR=e.SECONDS_PER_MINUTE=e.MINUTES_PER_HOUR=e.NANOSECOND_OF_SECOND_RANGE=e.SECOND_OF_MINUTE_RANGE=e.MINUTE_OF_HOUR_RANGE=e.HOUR_OF_DAY_RANGE=e.DAY_OF_MONTH_RANGE=e.MONTH_OF_YEAR_RANGE=e.YEAR_RANGE=void 0,e.normalizeSecondsForDuration=i,e.normalizeNanosecondsForDuration=c,e.localTimeToNanoOfDay=l,e.localDateTimeToEpochSecond=a,e.dateToEpochDay=_,e.durationToIsoString=p,e.timeToIsoString=m,e.timeZoneOffsetToIsoString=h,e.dateToIsoString=u,e.isoStringToStandardDate=v,e.toStandardDate=y,e.newDate=s,e.totalNanoseconds=f,e.timeZoneOffsetInSeconds=b,e.assertValidYear=T,e.assertValidMonth=R,e.assertValidDay=L,e.assertValidHour=j,e.assertValidMinute=M,e.assertValidSecond=x,e.assertValidNanosecond=Z,e.assertValidZoneId=G,e.floorDiv=U,e.floorMod=Q;var o=d(Tu()),n=He(),t=hr(),r=(function(){function k(W,F){this._minNumber=W,this._maxNumber=F,this._minInteger=(0,o.int)(W),this._maxInteger=(0,o.int)(F)}return k.prototype.contains=function(W){if((0,o.isInt)(W)&&W instanceof o.default)return W.greaterThanOrEqual(this._minInteger)&&W.lessThanOrEqual(this._maxInteger);if(typeof W=="bigint"){var F=(0,o.int)(W);return F.greaterThanOrEqual(this._minInteger)&&F.lessThanOrEqual(this._maxInteger)}else return W>=this._minNumber&&W<=this._maxNumber},k.prototype.toString=function(){return"[".concat(this._minNumber,", ").concat(this._maxNumber,"]")},k})();e.YEAR_RANGE=new r(-999999999,999999999),e.MONTH_OF_YEAR_RANGE=new r(1,12),e.DAY_OF_MONTH_RANGE=new r(1,31),e.HOUR_OF_DAY_RANGE=new r(0,23),e.MINUTE_OF_HOUR_RANGE=new r(0,59),e.SECOND_OF_MINUTE_RANGE=new r(0,59),e.NANOSECOND_OF_SECOND_RANGE=new r(0,999999999),e.MINUTES_PER_HOUR=60,e.SECONDS_PER_MINUTE=60,e.SECONDS_PER_HOUR=e.SECONDS_PER_MINUTE*e.MINUTES_PER_HOUR,e.NANOS_PER_SECOND=1e9,e.NANOS_PER_MILLISECOND=1e6,e.NANOS_PER_MINUTE=e.NANOS_PER_SECOND*e.SECONDS_PER_MINUTE,e.NANOS_PER_HOUR=e.NANOS_PER_MINUTE*e.MINUTES_PER_HOUR,e.DAYS_0000_TO_1970=719528,e.DAYS_PER_400_YEAR_CYCLE=146097,e.SECONDS_PER_DAY=86400;function i(k,W){return(0,o.int)(k).add(U(W,e.NANOS_PER_SECOND))}function c(k){return Q(k,e.NANOS_PER_SECOND)}function l(k,W,F,Y){k=(0,o.int)(k),W=(0,o.int)(W),F=(0,o.int)(F),Y=(0,o.int)(Y);var X=k.multiply(e.NANOS_PER_HOUR);return X=X.add(W.multiply(e.NANOS_PER_MINUTE)),X=X.add(F.multiply(e.NANOS_PER_SECOND)),X.add(Y)}function a(k,W,F,Y,X,ne,le){var de=_(k,W,F),D=A(Y,X,ne);return de.multiply(e.SECONDS_PER_DAY).add(D)}function _(k,W,F){k=(0,o.int)(k),W=(0,o.int)(W),F=(0,o.int)(F);var Y=k.multiply(365);return k.greaterThanOrEqual(0)?Y=Y.add(k.add(3).div(4).subtract(k.add(99).div(100)).add(k.add(399).div(400))):Y=Y.subtract(k.div(-4).subtract(k.div(-100)).add(k.div(-400))),Y=Y.add(W.multiply(367).subtract(362).div(12)),Y=Y.add(F.subtract(1)),W.greaterThan(2)&&(Y=Y.subtract(1),q(k)||(Y=Y.subtract(1))),Y.subtract(e.DAYS_0000_TO_1970)}function p(k,W,F,Y){var X=ce(k),ne=ce(W),le=te(F,Y);return"P".concat(X,"M").concat(ne,"DT").concat(le,"S")}function m(k,W,F,Y){var X=ce(k,2),ne=ce(W,2),le=ce(F,2),de=z(Y);return"".concat(X,":").concat(ne,":").concat(le).concat(de)}function h(k){if(k=(0,o.int)(k),k.equals(0))return"Z";var W=k.isNegative();W&&(k=k.multiply(-1));var F=W?"-":"+",Y=ce(k.div(e.SECONDS_PER_HOUR),2),X=ce(k.div(e.SECONDS_PER_MINUTE).modulo(e.MINUTES_PER_HOUR),2),ne=k.modulo(e.SECONDS_PER_MINUTE),le=ne.equals(0)?null:ce(ne,2);return le!=null?"".concat(F).concat(Y,":").concat(X,":").concat(le):"".concat(F).concat(Y,":").concat(X)}function u(k,W,F){var Y=re(k),X=ce(W,2),ne=ce(F,2);return"".concat(Y,"-").concat(X,"-").concat(ne)}function v(k){return new Date(k)}function y(k){return new Date(k)}function s(k){return new Date(k)}function f(k,W){W=W??0;var F=k.getMilliseconds()*e.NANOS_PER_MILLISECOND;return ae(W,F)}function b(k){var W=k.getSeconds()-k.getUTCSeconds(),F=k.getMinutes()-k.getUTCMinutes(),Y=k.getHours()-k.getUTCHours(),X=E(k);return Y*e.SECONDS_PER_HOUR+F*e.SECONDS_PER_MINUTE+W+X*e.SECONDS_PER_DAY}function E(k){return k.getMonth()===k.getUTCMonth()?k.getDate()-k.getUTCDate():k.getFullYear()>k.getUTCFullYear()||k.getMonth()>k.getUTCMonth()&&k.getFullYear()===k.getUTCFullYear()?k.getDate()+w(k.getUTCMonth(),k.getUTCFullYear())-k.getUTCDate():k.getDate()-(k.getUTCDate()+w(k.getMonth(),k.getFullYear()))}function w(k,W){return k===1?W%400===0||W%4===0&&W%100!==0?29:28:[0,2,4,6,7,9,11].includes(k)?31:30}function T(k){return $(k,e.YEAR_RANGE,"Year")}function R(k){return $(k,e.MONTH_OF_YEAR_RANGE,"Month")}function L(k){return $(k,e.DAY_OF_MONTH_RANGE,"Day")}function j(k){return $(k,e.HOUR_OF_DAY_RANGE,"Hour")}function M(k){return $(k,e.MINUTE_OF_HOUR_RANGE,"Minute")}function x(k){return $(k,e.SECOND_OF_MINUTE_RANGE,"Second")}function Z(k){return $(k,e.NANOSECOND_OF_SECOND_RANGE,"Nanosecond")}var H=new Map,K=function(k,W){return(0,n.newError)("".concat(W,' is expected to be a valid ZoneId but was: "').concat(k,'"'))};function G(k,W){var F=H.get(W);if(F!==!0){if(F===!1)throw K(W,k);try{Intl.DateTimeFormat(void 0,{timeZone:W}),H.set(W,!0)}catch{throw H.set(W,!1),K(W,k)}}}function $(k,W,F){if((0,t.assertNumberOrInteger)(k,F),!W.contains(k))throw(0,n.newError)("".concat(F," is expected to be in range ").concat(W.toString()," but was: ").concat(k.toString()));return k}function A(k,W,F){k=(0,o.int)(k),W=(0,o.int)(W),F=(0,o.int)(F);var Y=k.multiply(e.SECONDS_PER_HOUR);return Y=Y.add(W.multiply(e.SECONDS_PER_MINUTE)),Y.add(F)}function q(k){return k=(0,o.int)(k),k.modulo(4).equals(0)?k.modulo(100).equals(0)?!!k.modulo(400).equals(0):!0:!1}function U(k,W){k=(0,o.int)(k),W=(0,o.int)(W);var F=k.div(W);return k.isPositive()!==W.isPositive()&&F.multiply(W).notEquals(k)&&(F=F.subtract(1)),F}function Q(k,W){return k=(0,o.int)(k),W=(0,o.int)(W),k.subtract(U(k,W).multiply(W))}function te(k,W){k=(0,o.int)(k),W=(0,o.int)(W);var F,Y,X=k.isNegative(),ne=W.greaterThan(0);return X&&ne?k.equals(-1)?F="-0":F=k.add(1).toString():F=k.toString(),ne&&(X?Y=z(W.negate().add(2*e.NANOS_PER_SECOND).modulo(e.NANOS_PER_SECOND)):Y=z(W.add(e.NANOS_PER_SECOND).modulo(e.NANOS_PER_SECOND))),Y!=null?F+Y:F}function z(k){return k=(0,o.int)(k),k.equals(0)?"":"."+ce(k,9)}function re(k){var W=(0,o.int)(k);return W.isNegative()||W.greaterThan(9999)?ce(W,6,{usePositiveSign:!0}):ce(W,4)}function ce(k,W,F){k=(0,o.int)(k);var Y=k.isNegative();Y&&(k=k.negate());var X=k.toString();if(W!=null)for(;X.length<W;)X="0"+X;return Y?"-"+X:F?.usePositiveSign===!0?"+"+X:X}function ae(k,W){return k instanceof o.default?k.add(W):typeof k=="bigint"?k+BigInt(W):k+W}})(Zr)),Zr}var pl;function P0(){if(pl)return Se;pl=1;var e=Se&&Se.__createBinding||(Object.create?(function(H,K,G,$){$===void 0&&($=G);var A=Object.getOwnPropertyDescriptor(K,G);(!A||("get"in A?!K.__esModule:A.writable||A.configurable))&&(A={enumerable:!0,get:function(){return K[G]}}),Object.defineProperty(H,$,A)}):(function(H,K,G,$){$===void 0&&($=G),H[$]=K[G]})),g=Se&&Se.__setModuleDefault||(Object.create?(function(H,K){Object.defineProperty(H,"default",{enumerable:!0,value:K})}):function(H,K){H.default=K}),O=Se&&Se.__importStar||(function(){var H=function(K){return H=Object.getOwnPropertyNames||function(G){var $=[];for(var A in G)Object.prototype.hasOwnProperty.call(G,A)&&($[$.length]=A);return $},H(K)};return function(K){if(K&&K.__esModule)return K;var G={};if(K!=null)for(var $=H(K),A=0;A<$.length;A++)$[A]!=="default"&&e(G,K,$[A]);return g(G,K),G}})(),d=Se&&Se.__read||function(H,K){var G=typeof Symbol=="function"&&H[Symbol.iterator];if(!G)return H;var $=G.call(H),A,q=[],U;try{for(;(K===void 0||K-- >0)&&!(A=$.next()).done;)q.push(A.value)}catch(Q){U={error:Q}}finally{try{A&&!A.done&&(G=$.return)&&G.call($)}finally{if(U)throw U.error}}return q};Object.defineProperty(Se,"__esModule",{value:!0}),Se.DateTime=Se.LocalDateTime=Se.Date=Se.Time=Se.LocalTime=Se.Duration=void 0,Se.isDuration=u,Se.isLocalTime=y,Se.isTime=f,Se.isDate=E,Se.isLocalDateTime=T,Se.isDateTime=L;var o=O(dy()),n=hr(),t=He(),r=O(Tu()),i={value:!0,enumerable:!1,configurable:!1,writable:!1},c="__isDuration__",l="__isLocalTime__",a="__isTime__",_="__isDate__",p="__isLocalDateTime__",m="__isDateTime__",h=(function(){function H(K,G,$,A){this.months=(0,n.assertNumberOrInteger)(K,"Months"),this.days=(0,n.assertNumberOrInteger)(G,"Days"),(0,n.assertNumberOrInteger)($,"Seconds"),(0,n.assertNumberOrInteger)(A,"Nanoseconds"),this.seconds=o.normalizeSecondsForDuration($,A),this.nanoseconds=o.normalizeNanosecondsForDuration(A),Object.freeze(this)}return H.prototype.toString=function(){return o.durationToIsoString(this.months,this.days,this.seconds,this.nanoseconds)},H})();Se.Duration=h,Object.defineProperty(h.prototype,c,i);function u(H){return j(H,c)}var v=(function(){function H(K,G,$,A){this.hour=o.assertValidHour(K),this.minute=o.assertValidMinute(G),this.second=o.assertValidSecond($),this.nanosecond=o.assertValidNanosecond(A),Object.freeze(this)}return H.fromStandardDate=function(K,G){Z(K,G);var $=o.totalNanoseconds(K,G);return new H(K.getHours(),K.getMinutes(),K.getSeconds(),$ instanceof r.default?$.toInt():typeof $=="bigint"?(0,r.int)($).toInt():$)},H.prototype.toString=function(){return o.timeToIsoString(this.hour,this.minute,this.second,this.nanosecond)},H})();Se.LocalTime=v,Object.defineProperty(v.prototype,l,i);function y(H){return j(H,l)}var s=(function(){function H(K,G,$,A,q){this.hour=o.assertValidHour(K),this.minute=o.assertValidMinute(G),this.second=o.assertValidSecond($),this.nanosecond=o.assertValidNanosecond(A),this.timeZoneOffsetSeconds=(0,n.assertNumberOrInteger)(q,"Time zone offset in seconds"),Object.freeze(this)}return H.fromStandardDate=function(K,G){return Z(K,G),new H(K.getHours(),K.getMinutes(),K.getSeconds(),(0,r.toNumber)(o.totalNanoseconds(K,G)),o.timeZoneOffsetInSeconds(K))},H.prototype.toString=function(){return o.timeToIsoString(this.hour,this.minute,this.second,this.nanosecond)+o.timeZoneOffsetToIsoString(this.timeZoneOffsetSeconds)},H})();Se.Time=s,Object.defineProperty(s.prototype,a,i);function f(H){return j(H,a)}var b=(function(){function H(K,G,$){this.year=o.assertValidYear(K),this.month=o.assertValidMonth(G),this.day=o.assertValidDay($),Object.freeze(this)}return H.fromStandardDate=function(K){return Z(K),new H(K.getFullYear(),K.getMonth()+1,K.getDate())},H.prototype.toStandardDate=function(){return o.isoStringToStandardDate(this.toString())},H.prototype.toString=function(){return o.dateToIsoString(this.year,this.month,this.day)},H})();Se.Date=b,Object.defineProperty(b.prototype,_,i);function E(H){return j(H,_)}var w=(function(){function H(K,G,$,A,q,U,Q){this.year=o.assertValidYear(K),this.month=o.assertValidMonth(G),this.day=o.assertValidDay($),this.hour=o.assertValidHour(A),this.minute=o.assertValidMinute(q),this.second=o.assertValidSecond(U),this.nanosecond=o.assertValidNanosecond(Q),Object.freeze(this)}return H.fromStandardDate=function(K,G){return Z(K,G),new H(K.getFullYear(),K.getMonth()+1,K.getDate(),K.getHours(),K.getMinutes(),K.getSeconds(),(0,r.toNumber)(o.totalNanoseconds(K,G)))},H.prototype.toStandardDate=function(){return o.isoStringToStandardDate(this.toString())},H.prototype.toString=function(){return M(this.year,this.month,this.day,this.hour,this.minute,this.second,this.nanosecond)},H})();Se.LocalDateTime=w,Object.defineProperty(w.prototype,p,i);function T(H){return j(H,p)}var R=(function(){function H(K,G,$,A,q,U,Q,te,z){this.year=o.assertValidYear(K),this.month=o.assertValidMonth(G),this.day=o.assertValidDay($),this.hour=o.assertValidHour(A),this.minute=o.assertValidMinute(q),this.second=o.assertValidSecond(U),this.nanosecond=o.assertValidNanosecond(Q);var re=d(x(te,z),2),ce=re[0],ae=re[1];this.timeZoneOffsetSeconds=ce,this.timeZoneId=ae??void 0,Object.freeze(this)}return H.fromStandardDate=function(K,G){return Z(K,G),new H(K.getFullYear(),K.getMonth()+1,K.getDate(),K.getHours(),K.getMinutes(),K.getSeconds(),(0,r.toNumber)(o.totalNanoseconds(K,G)),o.timeZoneOffsetInSeconds(K),null)},H.prototype.toStandardDate=function(){return o.toStandardDate(this._toUTC())},H.prototype.toString=function(){var K,G=M(this.year,this.month,this.day,this.hour,this.minute,this.second,this.nanosecond),$=this.timeZoneOffsetSeconds!=null?o.timeZoneOffsetToIsoString((K=this.timeZoneOffsetSeconds)!==null&&K!==void 0?K:0):"",A=this.timeZoneId!=null?"[".concat(this.timeZoneId,"]"):"";return G+$+A},H.prototype._toUTC=function(){var K;if(this.timeZoneOffsetSeconds===void 0)throw new Error("Requires DateTime created with time zone offset");var G=o.localDateTimeToEpochSecond(this.year,this.month,this.day,this.hour,this.minute,this.second,this.nanosecond),$=G.subtract((K=this.timeZoneOffsetSeconds)!==null&&K!==void 0?K:0);return(0,r.int)($).multiply(1e3).add((0,r.int)(this.nanosecond).div(1e6)).toNumber()},H})();Se.DateTime=R,Object.defineProperty(R.prototype,m,i);function L(H){return j(H,m)}function j(H,K){return H!=null&&H[K]===!0}function M(H,K,G,$,A,q,U){return o.dateToIsoString(H,K,G)+"T"+o.timeToIsoString($,A,q,U)}function x(H,K){var G=H!=null,$=K!=null&&K!=="";if(!G&&!$)throw(0,t.newError)("Unable to create DateTime without either time zone offset or id. Please specify either of them. Given offset: ".concat(H," and id: ").concat(K));var A=[void 0,void 0];return G&&((0,n.assertNumberOrInteger)(H,"Time zone offset in seconds"),A[0]=H),$&&((0,n.assertString)(K,"Time zone ID"),o.assertValidZoneId("Time zone ID",K),A[1]=K),A}function Z(H,K){(0,n.assertValidDate)(H,"Standard date"),K!=null&&(0,n.assertNumberOrInteger)(K,"Nanosecond")}return Se}var Fe={},yl;function R0(){if(yl)return Fe;yl=1,Object.defineProperty(Fe,"__esModule",{value:!0}),Fe.PathSegment=Fe.Path=Fe.UnboundRelationship=Fe.Relationship=Fe.Node=void 0,Fe.isNode=c,Fe.isRelationship=a,Fe.isUnboundRelationship=p,Fe.isPath=v,Fe.isPathSegment=h;var e=rn(),g={value:!0,enumerable:!1,configurable:!1,writable:!1},O="__isNode__",d="__isRelationship__",o="__isUnboundRelationship__",n="__isPath__",t="__isPathSegment__";function r(s,f){return s!=null&&s[f]===!0}var i=(function(){function s(f,b,E,w){this.identity=f,this.labels=b,this.properties=E,this.elementId=y(w,function(){return f.toString()})}return s.prototype.toString=function(){for(var f="("+this.elementId,b=0;b<this.labels.length;b++)f+=":"+this.labels[b];var E=Object.keys(this.properties);if(E.length>0){f+=" {";for(var b=0;b<E.length;b++)b>0&&(f+=","),f+=E[b]+":"+(0,e.stringify)(this.properties[E[b]]);f+="}"}return f+=")",f},s})();Fe.Node=i,Object.defineProperty(i.prototype,O,g);function c(s){return r(s,O)}var l=(function(){function s(f,b,E,w,T,R,L,j){this.identity=f,this.start=b,this.end=E,this.type=w,this.properties=T,this.elementId=y(R,function(){return f.toString()}),this.startNodeElementId=y(L,function(){return b.toString()}),this.endNodeElementId=y(j,function(){return E.toString()})}return s.prototype.toString=function(){var f="("+this.startNodeElementId+")-[:"+this.type,b=Object.keys(this.properties);if(b.length>0){f+=" {";for(var E=0;E<b.length;E++)E>0&&(f+=","),f+=b[E]+":"+(0,e.stringify)(this.properties[b[E]]);f+="}"}return f+="]->("+this.endNodeElementId+")",f},s})();Fe.Relationship=l,Object.defineProperty(l.prototype,d,g);function a(s){return r(s,d)}var _=(function(){function s(f,b,E,w){this.identity=f,this.type=b,this.properties=E,this.elementId=y(w,function(){return f.toString()})}return s.prototype.bind=function(f,b){return new l(this.identity,f,b,this.type,this.properties,this.elementId)},s.prototype.bindTo=function(f,b){return new l(this.identity,f.identity,b.identity,this.type,this.properties,this.elementId,f.elementId,b.elementId)},s.prototype.toString=function(){var f="-[:"+this.type,b=Object.keys(this.properties);if(b.length>0){f+=" {";for(var E=0;E<b.length;E++)E>0&&(f+=","),f+=b[E]+":"+(0,e.stringify)(this.properties[b[E]]);f+="}"}return f+="]->",f},s})();Fe.UnboundRelationship=_,Object.defineProperty(_.prototype,o,g);function p(s){return r(s,o)}var m=(function(){function s(f,b,E){this.start=f,this.relationship=b,this.end=E}return s})();Fe.PathSegment=m,Object.defineProperty(m.prototype,t,g);function h(s){return r(s,t)}var u=(function(){function s(f,b,E){this.start=f,this.end=b,this.segments=E,this.length=E.length}return s})();Fe.Path=u,Object.defineProperty(u.prototype,n,g);function v(s){return r(s,n)}function y(s,f){return s??f()}return Fe}var Pr={},bl;function C0(){if(bl)return Pr;bl=1;var e=Pr&&Pr.__generator||function(t,r){var i={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},c,l,a,_=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return _.next=p(0),_.throw=p(1),_.return=p(2),typeof Symbol=="function"&&(_[Symbol.iterator]=function(){return this}),_;function p(h){return function(u){return m([h,u])}}function m(h){if(c)throw new TypeError("Generator is already executing.");for(;_&&(_=0,h[0]&&(i=0)),i;)try{if(c=1,l&&(a=h[0]&2?l.return:h[0]?l.throw||((a=l.return)&&a.call(l),0):l.next)&&!(a=a.call(l,h[1])).done)return a;switch(l=0,a&&(h=[h[0]&2,a.value]),h[0]){case 0:case 1:a=h;break;case 4:return i.label++,{value:h[1],done:!1};case 5:i.label++,l=h[1],h=[0];continue;case 7:h=i.ops.pop(),i.trys.pop();continue;default:if(a=i.trys,!(a=a.length>0&&a[a.length-1])&&(h[0]===6||h[0]===2)){i=0;continue}if(h[0]===3&&(!a||h[1]>a[0]&&h[1]<a[3])){i.label=h[1];break}if(h[0]===6&&i.label<a[1]){i.label=a[1],a=h;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(h);break}a[2]&&i.ops.pop(),i.trys.pop();continue}h=r.call(t,i)}catch(u){h=[6,u],l=0}finally{c=a=0}if(h[0]&5)throw h[1];return{value:h[0]?h[1]:void 0,done:!0}}},g=Pr&&Pr.__values||function(t){var r=typeof Symbol=="function"&&Symbol.iterator,i=r&&t[r],c=0;if(i)return i.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&c>=t.length&&(t=void 0),{value:t&&t[c++],done:!t}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")},O=Pr&&Pr.__read||function(t,r){var i=typeof Symbol=="function"&&t[Symbol.iterator];if(!i)return t;var c=i.call(t),l,a=[],_;try{for(;(r===void 0||r-- >0)&&!(l=c.next()).done;)a.push(l.value)}catch(p){_={error:p}}finally{try{l&&!l.done&&(i=c.return)&&i.call(c)}finally{if(_)throw _.error}}return a};Object.defineProperty(Pr,"__esModule",{value:!0});var d=He();function o(t){var r={};return t.forEach(function(i,c){r[i]=c}),r}var n=(function(){function t(r,i,c){this.keys=r,this.length=r.length,this._fields=i,this._fieldLookup=c??o(r)}return t.prototype.forEach=function(r){var i,c;try{for(var l=g(this.entries()),a=l.next();!a.done;a=l.next()){var _=O(a.value,2),p=_[0],m=_[1];r(m,p,this)}}catch(h){i={error:h}}finally{try{a&&!a.done&&(c=l.return)&&c.call(l)}finally{if(i)throw i.error}}},t.prototype.map=function(r){var i,c,l=[];try{for(var a=g(this.entries()),_=a.next();!_.done;_=a.next()){var p=O(_.value,2),m=p[0],h=p[1];l.push(r(h,m,this))}}catch(u){i={error:u}}finally{try{_&&!_.done&&(c=a.return)&&c.call(a)}finally{if(i)throw i.error}}return l},t.prototype.entries=function(){var r;return e(this,function(i){switch(i.label){case 0:r=0,i.label=1;case 1:return r<this.keys.length?[4,[this.keys[r],this._fields[r]]]:[3,4];case 2:i.sent(),i.label=3;case 3:return r++,[3,1];case 4:return[2]}})},t.prototype.values=function(){var r;return e(this,function(i){switch(i.label){case 0:r=0,i.label=1;case 1:return r<this.keys.length?[4,this._fields[r]]:[3,4];case 2:i.sent(),i.label=3;case 3:return r++,[3,1];case 4:return[2]}})},t.prototype[Symbol.iterator]=function(){var r;return e(this,function(i){switch(i.label){case 0:r=0,i.label=1;case 1:return r<this.keys.length?[4,this._fields[r]]:[3,4];case 2:i.sent(),i.label=3;case 3:return r++,[3,1];case 4:return[2]}})},t.prototype.toObject=function(){var r,i,c={};try{for(var l=g(this.entries()),a=l.next();!a.done;a=l.next()){var _=O(a.value,2),p=_[0],m=_[1];c[p]=m}}catch(h){r={error:h}}finally{try{a&&!a.done&&(i=l.return)&&i.call(l)}finally{if(r)throw r.error}}return c},t.prototype.get=function(r){var i;if(typeof r!="number"){if(i=this._fieldLookup[r],i===void 0)throw(0,d.newError)("This record has no field with key '".concat(r.toString(),"', available keys are: [")+this.keys.toString()+"].")}else i=r;if(i>this._fields.length-1||i<0)throw(0,d.newError)("This record has no field with index '"+i.toString()+"'. Remember that indexes start at `0`, and make sure your query returns records in the shape you meant it to.");return this._fields[i]},t.prototype.has=function(r){return typeof r=="number"?r>=0&&r<this._fields.length:this._fieldLookup[r]!==void 0},t})();return Pr.default=n,Pr}var ai={},ml;function I0(){if(ml)return ai;ml=1,Object.defineProperty(ai,"__esModule",{value:!0}),ai.Point=void 0,ai.isPoint=o;var e=hr(),g="__isPoint__",O=(function(){function n(t,r,i,c){this.srid=(0,e.assertNumberOrInteger)(t,"SRID"),this.x=(0,e.assertNumber)(r,"X coordinate"),this.y=(0,e.assertNumber)(i,"Y coordinate"),this.z=c==null?c:(0,e.assertNumber)(c,"Z coordinate"),Object.freeze(this)}return n.prototype.toString=function(){return this.z!=null&&!isNaN(this.z)?"Point{srid=".concat(d(this.srid),", x=").concat(d(this.x),", y=").concat(d(this.y),", z=").concat(d(this.z),"}"):"Point{srid=".concat(d(this.srid),", x=").concat(d(this.x),", y=").concat(d(this.y),"}")},n})();ai.Point=O;function d(n){return Number.isInteger(n)?n.toString()+".0":n.toString()}Object.defineProperty(O.prototype,g,{value:!0,enumerable:!1,configurable:!1,writable:!1});function o(n){var t=n;return n!=null&&t[g]===!0}return ai}var Be={},we={},dn={},gl;function gs(){if(gl)return dn;gl=1,Object.defineProperty(dn,"__esModule",{value:!0}),dn.FailedObserver=dn.CompletedObserver=void 0;var e=(function(){function d(){}return d.prototype.subscribe=function(o){O(o,o.onKeys,[]),O(o,o.onCompleted,{})},d.prototype.cancel=function(){},d.prototype.pause=function(){},d.prototype.resume=function(){},d.prototype.prepareToHandleSingleResponse=function(){},d.prototype.markCompleted=function(){},d.prototype.onError=function(o){throw new Error("CompletedObserver not supposed to call onError",{cause:o})},d})();dn.CompletedObserver=e;var g=(function(){function d(o){var n=o.error,t=o.onError;this._error=n,this._beforeError=t,this._observers=[],this.onError(n)}return d.prototype.subscribe=function(o){O(o,o.onError,this._error),this._observers.push(o)},d.prototype.onError=function(o){O(this,this._beforeError,o),this._observers.forEach(function(n){return O(n,n.onError,o)})},d.prototype.cancel=function(){},d.prototype.pause=function(){},d.prototype.resume=function(){},d.prototype.markCompleted=function(){},d.prototype.prepareToHandleSingleResponse=function(){},d})();dn.FailedObserver=g;function O(d,o,n){o?.bind(d)(n)}return dn}var Ye={},Ol;function Su(){if(Ol)return Ye;Ol=1;var e=Ye&&Ye.__createBinding||(Object.create?(function(a,_,p,m){m===void 0&&(m=p);var h=Object.getOwnPropertyDescriptor(_,p);(!h||("get"in h?!_.__esModule:h.writable||h.configurable))&&(h={enumerable:!0,get:function(){return _[p]}}),Object.defineProperty(a,m,h)}):(function(a,_,p,m){m===void 0&&(m=p),a[m]=_[p]})),g=Ye&&Ye.__setModuleDefault||(Object.create?(function(a,_){Object.defineProperty(a,"default",{enumerable:!0,value:_})}):function(a,_){a.default=_}),O=Ye&&Ye.__importStar||(function(){var a=function(_){return a=Object.getOwnPropertyNames||function(p){var m=[];for(var h in p)Object.prototype.hasOwnProperty.call(p,h)&&(m[m.length]=h);return m},a(_)};return function(_){if(_&&_.__esModule)return _;var p={};if(_!=null)for(var m=a(_),h=0;h<m.length;h++)m[h]!=="default"&&e(p,_,m[h]);return g(p,_),p}})(),d=Ye&&Ye.__read||function(a,_){var p=typeof Symbol=="function"&&a[Symbol.iterator];if(!p)return a;var m=p.call(a),h,u=[],v;try{for(;(_===void 0||_-- >0)&&!(h=m.next()).done;)u.push(h.value)}catch(y){v={error:y}}finally{try{h&&!h.done&&(p=m.return)&&p.call(m)}finally{if(v)throw v.error}}return u},o=Ye&&Ye.__spreadArray||function(a,_,p){if(p||arguments.length===2)for(var m=0,h=_.length,u;m<h;m++)(u||!(m in _))&&(u||(u=Array.prototype.slice.call(_,0,m)),u[m]=_[m]);return a.concat(u||Array.prototype.slice.call(_))};Object.defineProperty(Ye,"__esModule",{value:!0}),Ye.Bookmarks=void 0;var n=O(hr()),t="bookmarks",r=(function(){function a(_){this._values=c(_)}return a.empty=function(){return i},a.prototype.isEmpty=function(){return this._values.length===0},a.prototype.values=function(){return this._values},a.prototype[Symbol.iterator]=function(){return this._values[Symbol.iterator]()},a.prototype.asBeginTransactionParameters=function(){var _;return this.isEmpty()?{}:(_={},_[t]=this._values,_)},a})();Ye.Bookmarks=r;var i=new r(null);function c(a){if(a==null||a==="")return[];if(n.isString(a))return[a];if(Array.isArray(a)){for(var _=new Set,p=l(a),m=0;m<p.length;m++){var h=p[m];if(h!=null){if(!n.isString(h))throw new TypeError("Bookmark value should be a string, given: '".concat(h,"'"));_.add(h)}}return o([],d(_),!1)}throw new TypeError("Bookmarks should either be a string or a string array, given: '".concat(a,"'"))}function l(a){return a.reduce(function(_,p){return Array.isArray(p)?_.concat(l(p)):_.concat(p)},[])}return Ye}var be={},wl;function Si(){if(wl)return be;wl=1,Object.defineProperty(be,"__esModule",{value:!0}),be.TELEMETRY_APIS=be.BOLT_PROTOCOL_V5_8=be.BOLT_PROTOCOL_V5_7=be.BOLT_PROTOCOL_V5_6=be.BOLT_PROTOCOL_V5_5=be.BOLT_PROTOCOL_V5_4=be.BOLT_PROTOCOL_V5_3=be.BOLT_PROTOCOL_V5_2=be.BOLT_PROTOCOL_V5_1=be.BOLT_PROTOCOL_V5_0=be.BOLT_PROTOCOL_V4_4=be.BOLT_PROTOCOL_V4_3=be.BOLT_PROTOCOL_V4_2=be.BOLT_PROTOCOL_V4_1=be.BOLT_PROTOCOL_V4_0=be.BOLT_PROTOCOL_V3=be.BOLT_PROTOCOL_V2=be.BOLT_PROTOCOL_V1=be.DEFAULT_POOL_MAX_SIZE=be.DEFAULT_POOL_ACQUISITION_TIMEOUT=be.DEFAULT_CONNECTION_TIMEOUT_MILLIS=be.ACCESS_MODE_WRITE=be.ACCESS_MODE_READ=be.FETCH_ALL=void 0;var e=-1;be.FETCH_ALL=e;var g=60*1e3;be.DEFAULT_POOL_ACQUISITION_TIMEOUT=g;var O=100;be.DEFAULT_POOL_MAX_SIZE=O;var d=3e4;be.DEFAULT_CONNECTION_TIMEOUT_MILLIS=d;var o="READ";be.ACCESS_MODE_READ=o;var n="WRITE";be.ACCESS_MODE_WRITE=n;var t=1;be.BOLT_PROTOCOL_V1=t;var r=2;be.BOLT_PROTOCOL_V2=r;var i=3;be.BOLT_PROTOCOL_V3=i;var c=4;be.BOLT_PROTOCOL_V4_0=c;var l=4.1;be.BOLT_PROTOCOL_V4_1=l;var a=4.2;be.BOLT_PROTOCOL_V4_2=a;var _=4.3;be.BOLT_PROTOCOL_V4_3=_;var p=4.4;be.BOLT_PROTOCOL_V4_4=p;var m=5;be.BOLT_PROTOCOL_V5_0=m;var h=5.1;be.BOLT_PROTOCOL_V5_1=h;var u=5.2;be.BOLT_PROTOCOL_V5_2=u;var v=5.3;be.BOLT_PROTOCOL_V5_3=v;var y=5.4;be.BOLT_PROTOCOL_V5_4=y;var s=5.5;be.BOLT_PROTOCOL_V5_5=s;var f=5.6;be.BOLT_PROTOCOL_V5_6=f;var b=5.7;be.BOLT_PROTOCOL_V5_7=b;var E=5.8;be.BOLT_PROTOCOL_V5_8=E;var w={MANAGED_TRANSACTION:0,UNMANAGED_TRANSACTION:1,AUTO_COMMIT_TRANSACTION:2,EXECUTE_QUERY:3};return be.TELEMETRY_APIS=w,be}var xe={},hn={},El;function uc(){if(El)return hn;El=1;var e=hn&&hn.__extends||(function(){var h=function(u,v){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(y,s){y.__proto__=s}||function(y,s){for(var f in s)Object.prototype.hasOwnProperty.call(s,f)&&(y[f]=s[f])},h(u,v)};return function(u,v){if(typeof v!="function"&&v!==null)throw new TypeError("Class extends value "+String(v)+" is not a constructor or null");h(u,v);function y(){this.constructor=u}u.prototype=v===null?Object.create(v):(y.prototype=v.prototype,new y)}})(),g;Object.defineProperty(hn,"__esModule",{value:!0}),hn.Logger=void 0;var O=He(),d="error",o="warn",n="info",t="debug",r=n,i=(g={},g[d]=0,g[o]=1,g[n]=2,g[t]=3,g),c=(function(){function h(u,v){this._level=u,this._loggerFunction=v}return h.create=function(u){if(u?.logging!=null){var v=u.logging,y=p(v),s=m(v);return new h(y,s)}return this.noOp()},h.noOp=function(){return a},h.prototype.isErrorEnabled=function(){return _(this._level,d)},h.prototype.error=function(u){this.isErrorEnabled()&&this._loggerFunction(d,u)},h.prototype.isWarnEnabled=function(){return _(this._level,o)},h.prototype.warn=function(u){this.isWarnEnabled()&&this._loggerFunction(o,u)},h.prototype.isInfoEnabled=function(){return _(this._level,n)},h.prototype.info=function(u){this.isInfoEnabled()&&this._loggerFunction(n,u)},h.prototype.isDebugEnabled=function(){return _(this._level,t)},h.prototype.debug=function(u){this.isDebugEnabled()&&this._loggerFunction(t,u)},h})();hn.Logger=c;var l=(function(h){e(u,h);function u(){return h.call(this,n,function(v,y){})||this}return u.prototype.isErrorEnabled=function(){return!1},u.prototype.error=function(v){},u.prototype.isWarnEnabled=function(){return!1},u.prototype.warn=function(v){},u.prototype.isInfoEnabled=function(){return!1},u.prototype.info=function(v){},u.prototype.isDebugEnabled=function(){return!1},u.prototype.debug=function(v){},u})(c),a=new l;function _(h,u){return i[h]>=i[u]}function p(h){if(h?.level!=null){var u=h.level,v=i[u];if(v==null&&v!==0)throw(0,O.newError)("Illegal logging level: ".concat(u,". Supported levels are: ").concat(Object.keys(i).toString()));return u}return r}function m(h){var u,v;if(h?.logger!=null){var y=h.logger;if(y!=null&&typeof y=="function")return y}throw(0,O.newError)("Illegal logger function: ".concat((v=(u=h?.logger)===null||u===void 0?void 0:u.toString())!==null&&v!==void 0?v:"undefined"))}return hn}var Tl;function Os(){if(Tl)return xe;Tl=1;var e=xe&&xe.__extends||(function(){var p=function(m,h){return p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,v){u.__proto__=v}||function(u,v){for(var y in v)Object.prototype.hasOwnProperty.call(v,y)&&(u[y]=v[y])},p(m,h)};return function(m,h){if(typeof h!="function"&&h!==null)throw new TypeError("Class extends value "+String(h)+" is not a constructor or null");p(m,h);function u(){this.constructor=m}m.prototype=h===null?Object.create(h):(u.prototype=h.prototype,new u)}})(),g=xe&&xe.__awaiter||function(p,m,h,u){function v(y){return y instanceof h?y:new h(function(s){s(y)})}return new(h||(h=Promise))(function(y,s){function f(w){try{E(u.next(w))}catch(T){s(T)}}function b(w){try{E(u.throw(w))}catch(T){s(T)}}function E(w){w.done?y(w.value):v(w.value).then(f,b)}E((u=u.apply(p,m||[])).next())})},O=xe&&xe.__generator||function(p,m){var h={label:0,sent:function(){if(y[0]&1)throw y[1];return y[1]},trys:[],ops:[]},u,v,y,s=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return s.next=f(0),s.throw=f(1),s.return=f(2),typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function f(E){return function(w){return b([E,w])}}function b(E){if(u)throw new TypeError("Generator is already executing.");for(;s&&(s=0,E[0]&&(h=0)),h;)try{if(u=1,v&&(y=E[0]&2?v.return:E[0]?v.throw||((y=v.return)&&y.call(v),0):v.next)&&!(y=y.call(v,E[1])).done)return y;switch(v=0,y&&(E=[E[0]&2,y.value]),E[0]){case 0:case 1:y=E;break;case 4:return h.label++,{value:E[1],done:!1};case 5:h.label++,v=E[1],E=[0];continue;case 7:E=h.ops.pop(),h.trys.pop();continue;default:if(y=h.trys,!(y=y.length>0&&y[y.length-1])&&(E[0]===6||E[0]===2)){h=0;continue}if(E[0]===3&&(!y||E[1]>y[0]&&E[1]<y[3])){h.label=E[1];break}if(E[0]===6&&h.label<y[1]){h.label=y[1],y=E;break}if(y&&h.label<y[2]){h.label=y[2],h.ops.push(E);break}y[2]&&h.ops.pop(),h.trys.pop();continue}E=m.call(p,h)}catch(w){E=[6,w],v=0}finally{u=y=0}if(E[0]&5)throw E[1];return{value:E[0]?E[1]:void 0,done:!0}}};Object.defineProperty(xe,"__esModule",{value:!0}),xe.EMPTY_CONNECTION_HOLDER=xe.ReadOnlyConnectionHolder=xe.ConnectionHolder=void 0;var d=He(),o=hr(),n=Si(),t=Su(),r=uc(),i=(function(){function p(m){var h=m.mode,u=m.database,v=u===void 0?"":u,y=m.bookmarks,s=m.connectionProvider,f=m.impersonatedUser,b=m.onDatabaseNameResolved,E=m.getConnectionAcquistionBookmarks,w=m.auth,T=m.log;this._mode=h??n.ACCESS_MODE_WRITE,this._closed=!1,this._database=v!=null?(0,o.assertString)(v,"database"):"",this._bookmarks=y??t.Bookmarks.empty(),this._connectionProvider=s,this._impersonatedUser=f,this._referenceCount=0,this._connectionPromise=Promise.resolve(null),this._onDatabaseNameResolved=b,this._auth=w,this._log=T,this._logError=this._logError.bind(this),this._getConnectionAcquistionBookmarks=E??(function(){return Promise.resolve(t.Bookmarks.empty())})}return p.prototype.mode=function(){return this._mode},p.prototype.database=function(){return this._database},p.prototype.setDatabase=function(m){this._database=m},p.prototype.bookmarks=function(){return this._bookmarks},p.prototype.connectionProvider=function(){return this._connectionProvider},p.prototype.referenceCount=function(){return this._referenceCount},p.prototype.initializeConnection=function(m){if(this._referenceCount===0&&this._connectionProvider!=null)this._connectionPromise=this._createConnectionPromise(this._connectionProvider,m);else return this._referenceCount++,!1;return this._referenceCount++,!0},p.prototype._createConnectionPromise=function(m,h){return g(this,void 0,void 0,function(){var u,v,y;return O(this,function(s){switch(s.label){case 0:return v=(u=m).acquireConnection,y={accessMode:this._mode,database:this._database},[4,this._getBookmarks()];case 1:return[4,v.apply(u,[(y.bookmarks=s.sent(),y.impersonatedUser=this._impersonatedUser,y.onDatabaseNameResolved=this._onDatabaseNameResolved,y.auth=this._auth,y.homeDb=h,y)])];case 2:return[2,s.sent()]}})})},p.prototype._getBookmarks=function(){return g(this,void 0,void 0,function(){return O(this,function(m){switch(m.label){case 0:return[4,this._getConnectionAcquistionBookmarks()];case 1:return[2,m.sent()]}})})},p.prototype.getConnection=function(){return this._connectionPromise},p.prototype.releaseConnection=function(){return this._referenceCount===0?this._connectionPromise:(this._referenceCount--,this._referenceCount===0?this._releaseConnection():this._connectionPromise)},p.prototype.close=function(m){return this._closed=!0,this._referenceCount===0?this._connectionPromise:(this._referenceCount=0,this._releaseConnection(m))},p.prototype.log=function(){return this._log},p.prototype._releaseConnection=function(m){return this._connectionPromise=this._connectionPromise.then(function(h){return h!=null?h.isOpen()&&(h.hasOngoingObservableRequests()||m===!0)?h.resetAndFlush().catch(_).then(function(){return h.release().then(function(){return null})}):h.release().then(function(){return null}):Promise.resolve(null)}).catch(this._logError),this._connectionPromise},p.prototype._logError=function(m){return this._log.isWarnEnabled()&&this._log.warn("ConnectionHolder got an error while releasing the connection. Error ".concat(m,". Stacktrace: ").concat(m.stack)),null},p})();xe.ConnectionHolder=i;var c=(function(p){e(m,p);function m(h){var u=p.call(this,{mode:h.mode(),database:h.database(),bookmarks:h.bookmarks(),getConnectionAcquistionBookmarks:h._getConnectionAcquistionBookmarks,connectionProvider:h.connectionProvider(),log:h.log()})||this;return u._connectionHolder=h,u}return m.prototype.initializeConnection=function(){return this._connectionHolder.referenceCount()!==0},m.prototype.getConnection=function(){return this._connectionHolder.getConnection()},m.prototype.releaseConnection=function(){return this._connectionHolder.getConnection().catch(function(){return Promise.resolve(null)})},m.prototype.close=function(){return this._connectionHolder.getConnection().catch(function(){return Promise.resolve(null)})},m})(i);xe.ReadOnlyConnectionHolder=c,xe.default=c;var l=(function(p){e(m,p);function m(){return p.call(this,{log:r.Logger.create({})})||this}return m.prototype.mode=function(){},m.prototype.database=function(){},m.prototype.initializeConnection=function(){return!0},m.prototype.getConnection=function(){return g(this,void 0,void 0,function(){return O(this,function(h){switch(h.label){case 0:return[4,Promise.reject((0,d.newError)("This connection holder does not serve connections"))];case 1:return[2,h.sent()]}})})},m.prototype.releaseConnection=function(){return g(this,void 0,void 0,function(){return O(this,function(h){switch(h.label){case 0:return[4,Promise.resolve(null)];case 1:return[2,h.sent()]}})})},m.prototype.close=function(){return g(this,void 0,void 0,function(){return O(this,function(h){switch(h.label){case 0:return[4,Promise.resolve(null)];case 1:return[2,h.sent()]}})})},m})(i),a=new l;xe.EMPTY_CONNECTION_HOLDER=a;function _(p){return null}return xe}var pr={},Sl;function ws(){if(Sl)return pr;Sl=1;var e=pr&&pr.__createBinding||(Object.create?(function(_,p,m,h){h===void 0&&(h=m);var u=Object.getOwnPropertyDescriptor(p,m);(!u||("get"in u?!p.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return p[m]}}),Object.defineProperty(_,h,u)}):(function(_,p,m,h){h===void 0&&(h=m),_[h]=p[m]})),g=pr&&pr.__setModuleDefault||(Object.create?(function(_,p){Object.defineProperty(_,"default",{enumerable:!0,value:p})}):function(_,p){_.default=p}),O=pr&&pr.__importStar||(function(){var _=function(p){return _=Object.getOwnPropertyNames||function(m){var h=[];for(var u in m)Object.prototype.hasOwnProperty.call(m,u)&&(h[h.length]=u);return h},_(p)};return function(p){if(p&&p.__esModule)return p;var m={};if(p!=null)for(var h=_(p),u=0;u<h.length;u++)h[u]!=="default"&&e(m,p,h[u]);return g(m,p),m}})();Object.defineProperty(pr,"__esModule",{value:!0}),pr.TxConfig=void 0;var d=O(hr()),o=He(),n=Tu(),t=(function(){function _(p,m){a(p),this.timeout=i(p,m),this.metadata=l(p)}return _.empty=function(){return r},_.prototype.isEmpty=function(){return Object.values(this).every(function(p){return p==null})},_})();pr.TxConfig=t;var r=new t({});function i(_,p){if(d.isObject(_)&&_.timeout!=null){d.assertNumberOrInteger(_.timeout,"Transaction timeout"),c(_)&&p?.isInfoEnabled()===!0&&p?.info("Transaction timeout expected to be an integer, got: ".concat(_.timeout,". The value will be rounded up."));var m=(0,n.int)(_.timeout,{ceilFloat:!0});if(m.isNegative())throw(0,o.newError)("Transaction timeout should not be negative");return m}return null}function c(_){return typeof _.timeout=="number"&&!Number.isInteger(_.timeout)}function l(_){if(d.isObject(_)&&_.metadata!=null){var p=_.metadata;if(d.assertObject(p,"config.metadata"),Object.keys(p).length!==0)return p}return null}function a(_){_!=null&&d.assertObject(_,"Transaction config")}return pr}var Ke={},Pl;function hy(){if(Pl)return Ke;Pl=1;var e=Ke&&Ke.__assign||function(){return e=Object.assign||function(h){for(var u,v=1,y=arguments.length;v<y;v++){u=arguments[v];for(var s in u)Object.prototype.hasOwnProperty.call(u,s)&&(h[s]=u[s])}return h},e.apply(this,arguments)},g=Ke&&Ke.__awaiter||function(h,u,v,y){function s(f){return f instanceof v?f:new v(function(b){b(f)})}return new(v||(v=Promise))(function(f,b){function E(R){try{T(y.next(R))}catch(L){b(L)}}function w(R){try{T(y.throw(R))}catch(L){b(L)}}function T(R){R.done?f(R.value):s(R.value).then(E,w)}T((y=y.apply(h,u||[])).next())})},O=Ke&&Ke.__generator||function(h,u){var v={label:0,sent:function(){if(f[0]&1)throw f[1];return f[1]},trys:[],ops:[]},y,s,f,b=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return b.next=E(0),b.throw=E(1),b.return=E(2),typeof Symbol=="function"&&(b[Symbol.iterator]=function(){return this}),b;function E(T){return function(R){return w([T,R])}}function w(T){if(y)throw new TypeError("Generator is already executing.");for(;b&&(b=0,T[0]&&(v=0)),v;)try{if(y=1,s&&(f=T[0]&2?s.return:T[0]?s.throw||((f=s.return)&&f.call(s),0):s.next)&&!(f=f.call(s,T[1])).done)return f;switch(s=0,f&&(T=[T[0]&2,f.value]),T[0]){case 0:case 1:f=T;break;case 4:return v.label++,{value:T[1],done:!1};case 5:v.label++,s=T[1],T=[0];continue;case 7:T=v.ops.pop(),v.trys.pop();continue;default:if(f=v.trys,!(f=f.length>0&&f[f.length-1])&&(T[0]===6||T[0]===2)){v=0;continue}if(T[0]===3&&(!f||T[1]>f[0]&&T[1]<f[3])){v.label=T[1];break}if(T[0]===6&&v.label<f[1]){v.label=f[1],f=T;break}if(f&&v.label<f[2]){v.label=f[2],v.ops.push(T);break}f[2]&&v.ops.pop(),v.trys.pop();continue}T=u.call(h,v)}catch(R){T=[6,R],s=0}finally{y=f=0}if(T[0]&5)throw T[1];return{value:T[0]?T[1]:void 0,done:!0}}},d=Ke&&Ke.__read||function(h,u){var v=typeof Symbol=="function"&&h[Symbol.iterator];if(!v)return h;var y=v.call(h),s,f=[],b;try{for(;(u===void 0||u-- >0)&&!(s=y.next()).done;)f.push(s.value)}catch(E){b={error:E}}finally{try{s&&!s.done&&(v=y.return)&&v.call(y)}finally{if(b)throw b.error}}return f},o=Ke&&Ke.__spreadArray||function(h,u,v){if(v||arguments.length===2)for(var y=0,s=u.length,f;y<s;y++)(f||!(y in u))&&(f||(f=Array.prototype.slice.call(u,0,y)),f[y]=u[y]);return h.concat(f||Array.prototype.slice.call(u))};Object.defineProperty(Ke,"__esModule",{value:!0}),Ke.TransactionExecutor=void 0;var n=He(),t=Si(),r=30*1e3,i=1e3,c=2,l=.2;function a(h,u){for(var v=[],y=2;y<arguments.length;y++)v[y-2]=arguments[y];return setTimeout.apply(void 0,o([h,u],d(v),!1))}function _(h){return clearTimeout(h)}var p=(function(){function h(u,v,y,s,f){f===void 0&&(f={setTimeout:a,clearTimeout:_}),this._maxRetryTimeMs=m(u,r),this._initialRetryDelayMs=m(v,i),this._multiplier=m(y,c),this._jitterFactor=m(s,l),this._setTimeout=f.setTimeout,this._clearTimeout=f.clearTimeout,this._inFlightTimeoutIds=[],this.pipelineBegin=!1,this.telemetryApi=t.TELEMETRY_APIS.MANAGED_TRANSACTION,this._verifyAfterConstruction()}return h.prototype.execute=function(u,v,y){var s=this,f={apiTransactionConfig:{api:this.telemetryApi,onTelemetrySuccess:function(){f.apiTransactionConfig=void 0}}};return new Promise(function(b,E){s._executeTransactionInsidePromise(u,v,b,E,y,f).catch(E)}).catch(function(b){var E=Date.now(),w=s._initialRetryDelayMs;return s._retryTransactionPromise(u,v,b,E,w,y,f)})},h.prototype.close=function(){var u=this;this._inFlightTimeoutIds.forEach(function(v){return u._clearTimeout(v)}),this._inFlightTimeoutIds=[]},h.prototype._retryTransactionPromise=function(u,v,y,s,f,b,E){var w=this,T=Date.now()-s;return T>this._maxRetryTimeMs||!(0,n.isRetriableError)(y)?Promise.reject(y):new Promise(function(R,L){var j=w._computeDelayWithJitter(f),M=w._setTimeout(function(){w._inFlightTimeoutIds=w._inFlightTimeoutIds.filter(function(x){return x!==M}),w._executeTransactionInsidePromise(u,v,R,L,b,E).catch(L)},j);w._inFlightTimeoutIds.push(M)}).catch(function(R){var L=f*w._multiplier;return w._retryTransactionPromise(u,v,R,s,L,b,E)})},h.prototype._executeTransactionInsidePromise=function(u,v,y,s,f,b){return g(this,void 0,void 0,function(){var E,w,T,R,L,j,M,x=this;return O(this,function(Z){switch(Z.label){case 0:return Z.trys.push([0,4,,5]),w=u(b?.apiTransactionConfig!=null?e({},b?.apiTransactionConfig):void 0),this.pipelineBegin?(T=w,[3,3]):[3,1];case 1:return[4,w];case 2:T=Z.sent(),Z.label=3;case 3:return E=T,[3,5];case 4:return R=Z.sent(),s(R),[2];case 5:return L=f??(function(H){return H}),j=L(E),M=this._safeExecuteTransactionWork(j,v),M.then(function(H){return x._handleTransactionWorkSuccess(H,E,y,s)}).catch(function(H){return x._handleTransactionWorkFailure(H,E,s)}),[2]}})})},h.prototype._safeExecuteTransactionWork=function(u,v){try{var y=v(u);return Promise.resolve(y)}catch(s){return Promise.reject(s)}},h.prototype._handleTransactionWorkSuccess=function(u,v,y,s){v.isOpen()?v.commit().then(function(){y(u)}).catch(function(f){s(f)}):y(u)},h.prototype._handleTransactionWorkFailure=function(u,v,y){v.isOpen()?v.rollback().catch(function(s){}).then(function(){return y(u)}).catch(y):y(u)},h.prototype._computeDelayWithJitter=function(u){var v=u*this._jitterFactor,y=u-v,s=u+v;return Math.random()*(s-y)+y},h.prototype._verifyAfterConstruction=function(){if(this._maxRetryTimeMs<0)throw(0,n.newError)("Max retry time should be >= 0: "+this._maxRetryTimeMs.toString());if(this._initialRetryDelayMs<0)throw(0,n.newError)("Initial retry delay should >= 0: "+this._initialRetryDelayMs.toString());if(this._multiplier<1)throw(0,n.newError)("Multiplier should be >= 1.0: "+this._multiplier.toString());if(this._jitterFactor<0||this._jitterFactor>1)throw(0,n.newError)("Jitter factor should be in [0.0, 1.0]: "+this._jitterFactor.toFixed())},h})();Ke.TransactionExecutor=p;function m(h,u){return h??u}return Ke}var or={},Rl;function vy(){if(Rl)return or;Rl=1;var e=or&&or.__assign||function(){return e=Object.assign||function(E){for(var w,T=1,R=arguments.length;T<R;T++){w=arguments[T];for(var L in w)Object.prototype.hasOwnProperty.call(w,L)&&(E[L]=w[L])}return E},e.apply(this,arguments)},g=or&&or.__read||function(E,w){var T=typeof Symbol=="function"&&E[Symbol.iterator];if(!T)return E;var R=T.call(E),L,j=[],M;try{for(;(w===void 0||w-- >0)&&!(L=R.next()).done;)j.push(L.value)}catch(x){M={error:x}}finally{try{L&&!L.done&&(T=R.return)&&T.call(R)}finally{if(M)throw M.error}}return j};Object.defineProperty(or,"__esModule",{value:!0}),or.Url=void 0,or.parseDatabaseUrl=r,or.defaultPortForScheme=f,or.formatIPv4Address=y,or.formatIPv6Address=s;var O=hr(),d=7687,o=7474,n=7473,t=(function(){function E(w,T,R,L,j){this.scheme=w,this.host=T,this.port=R,this.hostAndPort=L,this.query=j}return E})();or.Url=t;function r(E){var w;(0,O.assertString)(E,"URL");var T=c(E),R=b(T.url),L=T.schemeMissing?null:l(R.scheme),j=a(R.host),M=v(j),x=_(R.port,L),Z="".concat(M,":").concat(x),H=p((w=R.query)!==null&&w!==void 0?w:i(R.resourceName),E);return new t(L,j,x,Z,H)}function i(E){if(typeof E!="string")return null;var w=g(E.split("?"),2),T=w[1];return T}function c(E){return E=E.trim(),E.includes("://")?{schemeMissing:!1,url:E}:{schemeMissing:!0,url:"none://".concat(E)}}function l(E){return E!=null?(E=E.trim(),E.charAt(E.length-1)===":"&&(E=E.substring(0,E.length-1)),E):null}function a(E,w){if(E==null)throw new Error("Unable to extract host from null or undefined URL");return E.trim()}function _(E,w){var T=typeof E=="string"?parseInt(E,10):E;return T!=null&&!isNaN(T)?T:f(w)}function p(E,w){var T=E!=null?m(E):null,R={};return T?.split("&").forEach(function(L){var j=L.split("=");if(j.length!==2)throw new Error("Invalid parameters: '".concat(j.toString(),"' in URL '").concat(w,"'."));var M=h(j[0],"key",w),x=h(j[1],"value",w);if(R[M]!==void 0)throw new Error("Duplicated query parameters with key '".concat(M,"' in URL '").concat(w,"'"));R[M]=x}),R}function m(E){return E=(E??"").trim(),E?.charAt(0)==="?"&&(E=E.substring(1,E.length)),E}function h(E,w,T){if(E=(E??"").trim(),E==="")throw new Error("Illegal empty ".concat(w," in URL query '").concat(T,"'"));return E}function u(E){var w=E.charAt(0)==="[",T=E.charAt(E.length-1)==="]";if(!w&&!T)return"[".concat(E,"]");if(w&&T)return E;throw new Error("Illegal IPv6 address ".concat(E))}function v(E){if(E===""||E==null)throw new Error("Illegal host ".concat(E));var w=E.includes(":");return w?u(E):E}function y(E,w){return"".concat(E,":").concat(w)}function s(E,w){var T=u(E);return"".concat(T,":").concat(w)}function f(E){return E==="http"?o:E==="https"?n:d}function b(E){function w(x,Z){var H=x.indexOf(Z);return H>=0?[x.substring(0,H),x[H],x.substring(H+1)]:[x,"",""]}function T(x,Z){var H=x.lastIndexOf(Z);return H>=0?[x.substring(0,H),x[H],x.substring(H+1)]:["","",x]}function R(x,Z,H){var K=w(x,Z),G=w(K[2],H);return[G[0],G[2]]}function L(x){var Z={},H;H=T(x,"@"),H[1]==="@"&&(Z.userInfo=decodeURIComponent(H[0]),x=H[2]);var K=g(R(x,"[","]"),2),G=K[0],$=K[1];return G!==""?(Z.host=G,H=w($,":")):(H=w(x,":"),Z.host=H[0]),H[1]===":"&&(Z.port=H[2]),Z}var j={},M;return M=w(E,":"),M[1]===":"&&(j.scheme=decodeURIComponent(M[0]),E=M[2]),M=w(E,"#"),M[1]==="#"&&(j.fragment=decodeURIComponent(M[2]),E=M[0]),M=w(E,"?"),M[1]==="?"&&(j.query=M[2],E=M[0]),E.startsWith("//")?(M=w(E.substr(2),"/"),j=e(e({},j),L(M[0])),j.path=M[1]+M[2]):j.path=E,j}return or}var yr={},Cl;function _y(){if(Cl)return yr;Cl=1;var e=yr&&yr.__createBinding||(Object.create?(function(t,r,i,c){c===void 0&&(c=i);var l=Object.getOwnPropertyDescriptor(r,i);(!l||("get"in l?!r.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return r[i]}}),Object.defineProperty(t,c,l)}):(function(t,r,i,c){c===void 0&&(c=i),t[c]=r[i]})),g=yr&&yr.__setModuleDefault||(Object.create?(function(t,r){Object.defineProperty(t,"default",{enumerable:!0,value:r})}):function(t,r){t.default=r}),O=yr&&yr.__importStar||(function(){var t=function(r){return t=Object.getOwnPropertyNames||function(i){var c=[];for(var l in i)Object.prototype.hasOwnProperty.call(i,l)&&(c[c.length]=l);return c},t(r)};return function(r){if(r&&r.__esModule)return r;var i={};if(r!=null)for(var c=t(r),l=0;l<c.length;l++)c[l]!=="default"&&e(i,r,c[l]);return g(i,r),i}})();Object.defineProperty(yr,"__esModule",{value:!0}),yr.ServerAddress=void 0;var d=hr(),o=O(vy()),n=(function(){function t(r,i,c,l){this._host=(0,d.assertString)(r,"host"),this._resolved=i!=null?(0,d.assertString)(i,"resolved"):null,this._port=(0,d.assertNumber)(c,"port"),this._hostPort=l,this._stringValue=i!=null?"".concat(l,"(").concat(i,")"):"".concat(l)}return t.prototype.host=function(){return this._host},t.prototype.resolvedHost=function(){return this._resolved!=null?this._resolved:this._host},t.prototype.port=function(){return this._port},t.prototype.resolveWith=function(r){return new t(this._host,r,this._port,this._hostPort)},t.prototype.asHostPort=function(){return this._hostPort},t.prototype.asKey=function(){return this._hostPort},t.prototype.toString=function(){return this._stringValue},t.fromUrl=function(r){var i=o.parseDatabaseUrl(r);return new t(i.host,null,i.port,i.hostAndPort)},t})();return yr.ServerAddress=n,yr}var Qr={},xu={},Il;function A0(){if(Il)return xu;Il=1,Object.defineProperty(xu,"__esModule",{value:!0});var e=(function(){function g(){}return g.prototype.resolve=function(){throw new Error("Abstract function")},g.prototype._resolveToItself=function(O){return Promise.resolve([O])},g})();return xu.default=e,xu}var Wu={},Al;function py(){if(Al)return Wu;Al=1,Object.defineProperty(Wu,"__esModule",{value:!0});var e=_y();function g(d){return Promise.resolve([d])}var O=(function(){function d(o){this._resolverFunction=o??g}return d.prototype.resolve=function(o){var n=this;return new Promise(function(t){return t(n._resolverFunction(o.asHostPort()))}).then(function(t){if(!Array.isArray(t))throw new TypeError("Configured resolver function should either return an array of addresses or a Promise resolved with an array of addresses."+"Each address is '<host>:<port>'. Got: ".concat(t));return t.map(function(r){return e.ServerAddress.fromUrl(r)})})},d})();return Wu.default=O,Wu}var jl;function j0(){if(jl)return Qr;jl=1;var e=Qr&&Qr.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(Qr,"__esModule",{value:!0}),Qr.ConfiguredCustomResolver=Qr.BaseHostNameResolver=void 0;var g=e(A0());Qr.BaseHostNameResolver=g.default;var O=e(py());return Qr.ConfiguredCustomResolver=O.default,Qr}var vn={},Vu={},Ml;function M0(){if(Ml)return Vu;Ml=1,Object.defineProperty(Vu,"__esModule",{value:!0}),Vu.fromVersion=e;function e(g,O){O===void 0&&(O=function(){return{get userAgent(){}}});var d=O(),o=d.userAgent!=null?d.userAgent.split("(")[1].split(")")[0]:void 0,n=d.userAgent||void 0;return{product:"neo4j-javascript/".concat(g),platform:o,languageDetails:n}}return Vu}var Nl;function N0(){return Nl||(Nl=1,(function(e){var g=vn&&vn.__createBinding||(Object.create?(function(d,o,n,t){t===void 0&&(t=n);var r=Object.getOwnPropertyDescriptor(o,n);(!r||("get"in r?!o.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return o[n]}}),Object.defineProperty(d,t,r)}):(function(d,o,n,t){t===void 0&&(t=n),d[t]=o[n]})),O=vn&&vn.__exportStar||function(d,o){for(var n in d)n!=="default"&&!Object.prototype.hasOwnProperty.call(o,n)&&g(o,d,n)};Object.defineProperty(e,"__esModule",{value:!0}),O(M0(),e)})(vn)),vn}var br={},Et={},kl;function yy(){if(kl)return Et;kl=1,Object.defineProperty(Et,"__esModule",{value:!0}),Et.DEFAULT_ACQUISITION_TIMEOUT=Et.DEFAULT_MAX_SIZE=void 0;var e=100;Et.DEFAULT_MAX_SIZE=e;var g=60*1e3;Et.DEFAULT_ACQUISITION_TIMEOUT=g;var O=(function(){function n(t,r){this.maxSize=d(t,e),this.acquisitionTimeout=d(r,g)}return n.defaultConfig=function(){return new n(e,g)},n.fromDriverConfig=function(t){var r=o(t.maxConnectionPoolSize)?t.maxConnectionPoolSize:e,i=o(t.connectionAcquisitionTimeout)?t.connectionAcquisitionTimeout:g;return new n(r,i)},n})();Et.default=O;function d(n,t){return o(n)?n:t}function o(n){return n===0||n!=null}return Et}var Rr={},Ll;function k0(){if(Ll)return Rr;Ll=1;var e=Rr&&Rr.__awaiter||function(a,_,p,m){function h(u){return u instanceof p?u:new p(function(v){v(u)})}return new(p||(p=Promise))(function(u,v){function y(b){try{f(m.next(b))}catch(E){v(E)}}function s(b){try{f(m.throw(b))}catch(E){v(E)}}function f(b){b.done?u(b.value):h(b.value).then(y,s)}f((m=m.apply(a,_||[])).next())})},g=Rr&&Rr.__generator||function(a,_){var p={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]},m,h,u,v=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return v.next=y(0),v.throw=y(1),v.return=y(2),typeof Symbol=="function"&&(v[Symbol.iterator]=function(){return this}),v;function y(f){return function(b){return s([f,b])}}function s(f){if(m)throw new TypeError("Generator is already executing.");for(;v&&(v=0,f[0]&&(p=0)),p;)try{if(m=1,h&&(u=f[0]&2?h.return:f[0]?h.throw||((u=h.return)&&u.call(h),0):h.next)&&!(u=u.call(h,f[1])).done)return u;switch(h=0,u&&(f=[f[0]&2,u.value]),f[0]){case 0:case 1:u=f;break;case 4:return p.label++,{value:f[1],done:!1};case 5:p.label++,h=f[1],f=[0];continue;case 7:f=p.ops.pop(),p.trys.pop();continue;default:if(u=p.trys,!(u=u.length>0&&u[u.length-1])&&(f[0]===6||f[0]===2)){p=0;continue}if(f[0]===3&&(!u||f[1]>u[0]&&f[1]<u[3])){p.label=f[1];break}if(f[0]===6&&p.label<u[1]){p.label=u[1],u=f;break}if(u&&p.label<u[2]){p.label=u[2],p.ops.push(f);break}u[2]&&p.ops.pop(),p.trys.pop();continue}f=_.call(a,p)}catch(b){f=[6,b],h=0}finally{m=u=0}if(f[0]&5)throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}},O=Rr&&Rr.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(Rr,"__esModule",{value:!0});var d=O(yy()),o=He(),n=uc(),t=(function(){function a(_){var p=_.create,m=p===void 0?function(Z,H,K){return e(x,void 0,void 0,function(){return g(this,function(G){switch(G.label){case 0:return[4,Promise.reject(new Error("Not implemented"))];case 1:return[2,G.sent()]}})})}:p,h=_.destroy,u=h===void 0?function(Z){return e(x,void 0,void 0,function(){return g(this,function(H){switch(H.label){case 0:return[4,Promise.resolve()];case 1:return[2,H.sent()]}})})}:h,v=_.validateOnAcquire,y=v===void 0?function(Z,H){return!0}:v,s=_.validateOnRelease,f=s===void 0?function(Z){return!0}:s,b=_.installIdleObserver,E=b===void 0?function(Z,H){}:b,w=_.removeIdleObserver,T=w===void 0?function(Z){}:w,R=_.config,L=R===void 0?d.default.defaultConfig():R,j=_.log,M=j===void 0?n.Logger.noOp():j,x=this;this._create=m,this._destroy=u,this._validateOnAcquire=y,this._validateOnRelease=f,this._installIdleObserver=E,this._removeIdleObserver=T,this._maxSize=L.maxSize,this._acquisitionTimeout=L.acquisitionTimeout,this._pools={},this._pendingCreates={},this._acquireRequests={},this._activeResourceCounts={},this._release=this._release.bind(this),this._log=M,this._closed=!1}return a.prototype.acquire=function(_,p,m){return e(this,void 0,void 0,function(){var h,u,v,y=this;return g(this,function(s){switch(s.label){case 0:return h=p.asKey(),u=this._acquireRequests,v=u[h],v==null&&(u[h]=[]),[4,new Promise(function(f,b){var E=setTimeout(function(){var T=u[h];if(T!=null&&(u[h]=T.filter(function(j){return j!==w})),!w.isCompleted()){var R=y.activeResourceCount(p),L=y.has(p)?y._pools[h].length:0;w.reject((0,o.newError)("Connection acquisition timed out in ".concat(y._acquisitionTimeout," ms. Pool status: Active conn count = ").concat(R,", Idle conn count = ").concat(L,".")))}},y._acquisitionTimeout);typeof E=="object"&&E.unref();var w=new c(h,_,m,f,b,E,y._log);u[h].push(w),y._processPendingAcquireRequests(p)})];case 1:return[2,s.sent()]}})})},a.prototype.purge=function(_){return e(this,void 0,void 0,function(){return g(this,function(p){switch(p.label){case 0:return[4,this._purgeKey(_.asKey())];case 1:return[2,p.sent()]}})})},a.prototype.apply=function(_,p){var m=_.asKey();m in this._pools&&this._pools[m].apply(p)},a.prototype.close=function(){return e(this,void 0,void 0,function(){var _=this;return g(this,function(p){switch(p.label){case 0:return this._closed=!0,[4,Promise.all(Object.keys(this._pools).map(function(m){return e(_,void 0,void 0,function(){return g(this,function(h){switch(h.label){case 0:return[4,this._purgeKey(m)];case 1:return[2,h.sent()]}})})})).then()];case 1:return[2,p.sent()]}})})},a.prototype.keepAll=function(_){return e(this,void 0,void 0,function(){var p,m,h,u=this;return g(this,function(v){switch(v.label){case 0:return p=_.map(function(y){return y.asKey()}),m=Object.keys(this._pools),h=m.filter(function(y){return!p.includes(y)}),[4,Promise.all(h.map(function(y){return e(u,void 0,void 0,function(){return g(this,function(s){switch(s.label){case 0:return[4,this._purgeKey(y)];case 1:return[2,s.sent()]}})})})).then()];case 1:return[2,v.sent()]}})})},a.prototype.has=function(_){return _.asKey()in this._pools},a.prototype.activeResourceCount=function(_){var p;return(p=this._activeResourceCounts[_.asKey()])!==null&&p!==void 0?p:0},a.prototype._getOrInitializePoolFor=function(_){var p=this._pools[_];return p==null&&(p=new l,this._pools[_]=p,this._pendingCreates[_]=0),p},a.prototype._acquire=function(_,p,m){return e(this,void 0,void 0,function(){var h,u,v,y,s,b,f,b,E,w=this;return g(this,function(T){switch(T.label){case 0:if(this._closed)throw(0,o.newError)("Pool is closed, it is no more able to serve requests.");if(h=p.asKey(),u=this._getOrInitializePoolFor(h),m)return[3,10];T.label=1;case 1:if(!(u.length>0))return[3,10];if(v=u.pop(),v==null)return[3,1];r(h,this._activeResourceCounts),this._removeIdleObserver!=null&&this._removeIdleObserver(v),y=!1,T.label=2;case 2:return T.trys.push([2,4,,6]),[4,this._validateOnAcquire(_,v)];case 3:return y=T.sent(),[3,6];case 4:return s=T.sent(),i(h,this._activeResourceCounts),u.removeInUse(v),[4,this._destroy(v)];case 5:throw T.sent(),s;case 6:return y?(this._log.isDebugEnabled()&&this._log.debug("".concat(v," acquired from the pool ").concat(h)),[2,{resource:v,pool:u}]):[3,7];case 7:return i(h,this._activeResourceCounts),u.removeInUse(v),[4,this._destroy(v)];case 8:T.sent(),T.label=9;case 9:return[3,1];case 10:if(this._maxSize>0&&(b=this.activeResourceCount(p)+this._pendingCreates[h],b>=this._maxSize))return[2,{resource:null,pool:u}];this._pendingCreates[h]=this._pendingCreates[h]+1,T.label=11;case 11:return T.trys.push([11,,15,16]),b=this.activeResourceCount(p)+u.length,b>=this._maxSize&&m?(E=u.pop(),E==null?[3,13]:(this._removeIdleObserver!=null&&this._removeIdleObserver(E),u.removeInUse(E),[4,this._destroy(E)])):[3,13];case 12:T.sent(),T.label=13;case 13:return[4,this._create(_,p,function(R,L){return e(w,void 0,void 0,function(){return g(this,function(j){switch(j.label){case 0:return[4,this._release(R,L,u)];case 1:return[2,j.sent()]}})})})];case 14:return f=T.sent(),u.pushInUse(f),r(h,this._activeResourceCounts),this._log.isDebugEnabled()&&this._log.debug("".concat(f," created for the pool ").concat(h)),[3,16];case 15:return this._pendingCreates[h]=this._pendingCreates[h]-1,[7];case 16:return[2,{resource:f,pool:u}]}})})},a.prototype._release=function(_,p,m){return e(this,void 0,void 0,function(){var h,u=this;return g(this,function(v){switch(v.label){case 0:h=_.asKey(),v.label=1;case 1:return v.trys.push([1,,9,10]),m.isActive()?[4,this._validateOnRelease(p)]:[3,6];case 2:return v.sent()?[3,4]:(this._log.isDebugEnabled()&&this._log.debug("".concat(p," destroyed and can't be released to the pool ").concat(h," because it is not functional")),m.removeInUse(p),[4,this._destroy(p)]);case 3:return v.sent(),[3,5];case 4:this._installIdleObserver!=null&&this._installIdleObserver(p,{onError:function(y){u._log.debug("Idle connection ".concat(p," destroyed because of error: ").concat(y));var s=u._pools[h];s!=null&&(u._pools[h]=s.filter(function(f){return f!==p}),s.removeInUse(p)),u._destroy(p).catch(function(){})}}),m.push(p),this._log.isDebugEnabled()&&this._log.debug("".concat(p," released to the pool ").concat(h)),v.label=5;case 5:return[3,8];case 6:return this._log.isDebugEnabled()&&this._log.debug("".concat(p," destroyed and can't be released to the pool ").concat(h," because pool has been purged")),m.removeInUse(p),[4,this._destroy(p)];case 7:v.sent(),v.label=8;case 8:return[3,10];case 9:return i(h,this._activeResourceCounts),this._processPendingAcquireRequests(_),[7];case 10:return[2]}})})},a.prototype._purgeKey=function(_){return e(this,void 0,void 0,function(){var p,m,h;return g(this,function(u){switch(u.label){case 0:if(p=this._pools[_],m=[],p==null)return[3,2];for(;p.length>0;)h=p.pop(),h!=null&&(this._removeIdleObserver!=null&&this._removeIdleObserver(h),m.push(this._destroy(h)));return p.close(),delete this._pools[_],[4,Promise.all(m)];case 1:u.sent(),u.label=2;case 2:return[2]}})})},a.prototype._processPendingAcquireRequests=function(_){var p=this,m=_.asKey(),h=this._acquireRequests[m];if(h!=null){var u=h.shift();u!=null?this._acquire(u.context,_,u.requireNew).catch(function(v){return u.reject(v),{resource:null,pool:null}}).then(function(v){var y=v.resource,s=v.pool;y!=null&&s!=null?u.isCompleted()?p._release(_,y,s).catch(function(f){p._log.isDebugEnabled()&&p._log.debug("".concat(y," could not be release back to the pool. Cause: ").concat(f))}):u.resolve(y):u.isCompleted()||(p._acquireRequests[m]==null&&(p._acquireRequests[m]=[]),p._acquireRequests[m].unshift(u))}).catch(function(v){return u.reject(v)}):delete this._acquireRequests[m]}},a})();function r(a,_){var p,m=(p=_[a])!==null&&p!==void 0?p:0;_[a]=m+1}function i(a,_){var p,m=(p=_[a])!==null&&p!==void 0?p:0,h=m-1;h>0?_[a]=h:delete _[a]}var c=(function(){function a(_,p,m,h,u,v,y){this._key=_,this._context=p,this._resolve=h,this._reject=u,this._timeoutId=v,this._log=y,this._completed=!1,this._config=m??{}}return Object.defineProperty(a.prototype,"context",{get:function(){return this._context},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"requireNew",{get:function(){var _;return(_=this._config.requireNew)!==null&&_!==void 0?_:!1},enumerable:!1,configurable:!0}),a.prototype.isCompleted=function(){return this._completed},a.prototype.resolve=function(_){this._completed||(this._completed=!0,clearTimeout(this._timeoutId),this._log.isDebugEnabled()&&this._log.debug("".concat(_," acquired from the pool ").concat(this._key)),this._resolve(_))},a.prototype.reject=function(_){this._completed||(this._completed=!0,clearTimeout(this._timeoutId),this._reject(_))},a})(),l=(function(){function a(){this._active=!0,this._elements=[],this._elementsInUse=new Set}return a.prototype.isActive=function(){return this._active},a.prototype.close=function(){this._active=!1,this._elements=[],this._elementsInUse=new Set},a.prototype.filter=function(_){return this._elements=this._elements.filter(_),this},a.prototype.apply=function(_){this._elements.forEach(_),this._elementsInUse.forEach(_)},Object.defineProperty(a.prototype,"length",{get:function(){return this._elements.length},enumerable:!1,configurable:!0}),a.prototype.pop=function(){var _=this._elements.pop();return _!=null&&this._elementsInUse.add(_),_},a.prototype.push=function(_){return this._elementsInUse.delete(_),this._elements.push(_)},a.prototype.pushInUse=function(_){this._elementsInUse.add(_)},a.prototype.removeInUse=function(_){this._elementsInUse.delete(_)},a})();return Rr.default=t,Rr}var Dl;function L0(){return Dl||(Dl=1,(function(e){var g=br&&br.__createBinding||(Object.create?(function(r,i,c,l){l===void 0&&(l=c);var a=Object.getOwnPropertyDescriptor(i,c);(!a||("get"in a?!i.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return i[c]}}),Object.defineProperty(r,l,a)}):(function(r,i,c,l){l===void 0&&(l=c),r[l]=i[c]})),O=br&&br.__setModuleDefault||(Object.create?(function(r,i){Object.defineProperty(r,"default",{enumerable:!0,value:i})}):function(r,i){r.default=i}),d=br&&br.__importStar||(function(){var r=function(i){return r=Object.getOwnPropertyNames||function(c){var l=[];for(var a in c)Object.prototype.hasOwnProperty.call(c,a)&&(l[l.length]=a);return l},r(i)};return function(i){if(i&&i.__esModule)return i;var c={};if(i!=null)for(var l=r(i),a=0;a<l.length;a++)l[a]!=="default"&&g(c,i,l[a]);return O(c,i),c}})(),o=br&&br.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(e,"__esModule",{value:!0}),e.DEFAULT_MAX_SIZE=e.DEFAULT_ACQUISITION_TIMEOUT=e.PoolConfig=e.Pool=void 0;var n=d(yy());e.PoolConfig=n.default,Object.defineProperty(e,"DEFAULT_ACQUISITION_TIMEOUT",{enumerable:!0,get:function(){return n.DEFAULT_ACQUISITION_TIMEOUT}}),Object.defineProperty(e,"DEFAULT_MAX_SIZE",{enumerable:!0,get:function(){return n.DEFAULT_MAX_SIZE}});var t=o(k0());e.Pool=t.default,e.default=t.default})(br)),br}var Ul;function Pu(){if(Ul)return we;Ul=1;var e=we&&we.__createBinding||(Object.create?(function(y,s,f,b){b===void 0&&(b=f);var E=Object.getOwnPropertyDescriptor(s,f);(!E||("get"in E?!s.__esModule:E.writable||E.configurable))&&(E={enumerable:!0,get:function(){return s[f]}}),Object.defineProperty(y,b,E)}):(function(y,s,f,b){b===void 0&&(b=f),y[b]=s[f]})),g=we&&we.__setModuleDefault||(Object.create?(function(y,s){Object.defineProperty(y,"default",{enumerable:!0,value:s})}):function(y,s){y.default=s}),O=we&&we.__importStar||(function(){var y=function(s){return y=Object.getOwnPropertyNames||function(f){var b=[];for(var E in f)Object.prototype.hasOwnProperty.call(f,E)&&(b[b.length]=E);return b},y(s)};return function(s){if(s&&s.__esModule)return s;var f={};if(s!=null)for(var b=y(s),E=0;E<b.length;E++)b[E]!=="default"&&e(f,s,b[E]);return g(f,s),f}})();Object.defineProperty(we,"__esModule",{value:!0}),we.pool=we.boltAgent=we.objectUtil=we.resolver=we.serverAddress=we.urlUtil=we.logger=we.transactionExecutor=we.txConfig=we.connectionHolder=we.constants=we.bookmarks=we.observer=we.temporalUtil=we.util=void 0;var d=O(hr());we.util=d;var o=O(dy());we.temporalUtil=o;var n=O(gs());we.observer=n;var t=O(Su());we.bookmarks=t;var r=O(Si());we.constants=r;var i=O(Os());we.connectionHolder=i;var c=O(ws());we.txConfig=c;var l=O(hy());we.transactionExecutor=l;var a=O(uc());we.logger=a;var _=O(vy());we.urlUtil=_;var p=O(_y());we.serverAddress=p;var m=O(j0());we.resolver=m;var h=O(ly());we.objectUtil=h;var u=O(N0());we.boltAgent=u;var v=O(L0());return we.pool=v,we}var Te={},ql;function by(){if(ql)return Te;ql=1;var e=Te&&Te.__assign||function(){return e=Object.assign||function(j){for(var M,x=1,Z=arguments.length;x<Z;x++){M=arguments[x];for(var H in M)Object.prototype.hasOwnProperty.call(M,H)&&(j[H]=M[H])}return j},e.apply(this,arguments)},g=Te&&Te.__createBinding||(Object.create?(function(j,M,x,Z){Z===void 0&&(Z=x);var H=Object.getOwnPropertyDescriptor(M,x);(!H||("get"in H?!M.__esModule:H.writable||H.configurable))&&(H={enumerable:!0,get:function(){return M[x]}}),Object.defineProperty(j,Z,H)}):(function(j,M,x,Z){Z===void 0&&(Z=x),j[Z]=M[x]})),O=Te&&Te.__setModuleDefault||(Object.create?(function(j,M){Object.defineProperty(j,"default",{enumerable:!0,value:M})}):function(j,M){j.default=M}),d=Te&&Te.__importStar||(function(){var j=function(M){return j=Object.getOwnPropertyNames||function(x){var Z=[];for(var H in x)Object.prototype.hasOwnProperty.call(x,H)&&(Z[Z.length]=H);return Z},j(M)};return function(M){if(M&&M.__esModule)return M;var x={};if(M!=null)for(var Z=j(M),H=0;H<Z.length;H++)Z[H]!=="default"&&g(x,M,Z[H]);return O(x,M),x}})(),o=Te&&Te.__read||function(j,M){var x=typeof Symbol=="function"&&j[Symbol.iterator];if(!x)return j;var Z=x.call(j),H,K=[],G;try{for(;(M===void 0||M-- >0)&&!(H=Z.next()).done;)K.push(H.value)}catch($){G={error:$}}finally{try{H&&!H.done&&(x=Z.return)&&x.call(Z)}finally{if(G)throw G.error}}return K},n=Te&&Te.__spreadArray||function(j,M,x){if(x||arguments.length===2)for(var Z=0,H=M.length,K;Z<H;Z++)(K||!(Z in M))&&(K||(K=Array.prototype.slice.call(M,0,Z)),K[Z]=M[Z]);return j.concat(K||Array.prototype.slice.call(M))};Object.defineProperty(Te,"__esModule",{value:!0}),Te.GqlStatusObject=Te.Notification=Te.notificationClassification=Te.notificationCategory=Te.notificationSeverityLevel=void 0,Te.polyfillGqlStatusObject=y,Te.polyfillNotification=v,Te.buildGqlStatusObjectFromMetadata=f,Te.buildNotificationsFromMetadata=w;var t=d(rn()),r=Pu(),i=fy(),c={WARNING:{gql_status:"01N42",status_description:"warn: unknown warning"},NO_DATA:{gql_status:"02N42",status_description:"note: no data - unknown subcondition"},INFORMATION:{gql_status:"03N42",status_description:"info: unknown notification"}},l={WARNING:"WARNING",INFORMATION:"INFORMATION",UNKNOWN:"UNKNOWN"};Te.notificationSeverityLevel=l,Object.freeze(l);var a=Object.values(l),_={HINT:"HINT",UNRECOGNIZED:"UNRECOGNIZED",UNSUPPORTED:"UNSUPPORTED",PERFORMANCE:"PERFORMANCE",DEPRECATION:"DEPRECATION",TOPOLOGY:"TOPOLOGY",SECURITY:"SECURITY",GENERIC:"GENERIC",SCHEMA:"SCHEMA",UNKNOWN:"UNKNOWN"};Te.notificationCategory=_,Object.freeze(_);var p=Object.values(_),m=_;Te.notificationClassification=m;var h=(function(){function j(M){this.code=M.code,this.title=M.title,this.description=M.description,this.severity=M.severity,this.position=T(M.position),this.severityLevel=R(M.severity),this.rawSeverityLevel=M.severity,this.category=L(M.category),this.rawCategory=M.category}return j})();Te.Notification=h;var u=(function(){function j(M){var x;this.gqlStatus=M.gql_status,this.statusDescription=M.status_description,this.diagnosticRecord=(x=M.diagnostic_record)!==null&&x!==void 0?x:{},this.position=this.diagnosticRecord._position!=null?T(this.diagnosticRecord._position):void 0,this.severity=R(this.diagnosticRecord._severity),this.rawSeverity=this.diagnosticRecord._severity,this.classification=L(this.diagnosticRecord._classification),this.rawClassification=this.diagnosticRecord._classification,this.isNotification=M.neo4j_code!=null,Object.freeze(this)}return Object.defineProperty(j.prototype,"diagnosticRecordAsJsonString",{get:function(){return t.stringify(this.diagnosticRecord,{useCustomToString:!0})},enumerable:!1,configurable:!0}),j})();Te.GqlStatusObject=u;function v(j){var M,x,Z;if(j.neo4j_code!=null)return new h({code:j.neo4j_code,title:j.title,description:j.description,severity:(M=j.diagnostic_record)===null||M===void 0?void 0:M._severity,category:(x=j.diagnostic_record)===null||x===void 0?void 0:x._classification,position:(Z=j.diagnostic_record)===null||Z===void 0?void 0:Z._position})}function y(j){var M,x=j.severity===l.WARNING?c.WARNING:c.INFORMATION,Z={gql_status:x.gql_status,status_description:(M=j.description)!==null&&M!==void 0?M:x.status_description,neo4j_code:j.code,title:j.title,diagnostic_record:e({},i.rawPolyfilledDiagnosticRecord)};return j.severity!=null&&(Z.diagnostic_record._severity=j.severity),j.category!=null&&(Z.diagnostic_record._classification=j.category),j.position!=null&&(Z.diagnostic_record._position=j.position),new u(Z)}var s={SUCCESS:new u({gql_status:"00000",status_description:"note: successful completion",diagnostic_record:i.rawPolyfilledDiagnosticRecord}),NO_DATA:new u({gql_status:"02000",status_description:"note: no data",diagnostic_record:i.rawPolyfilledDiagnosticRecord}),NO_DATA_UNKNOWN_SUBCONDITION:new u(e(e({},c.NO_DATA),{diagnostic_record:i.rawPolyfilledDiagnosticRecord})),OMITTED_RESULT:new u({gql_status:"00001",status_description:"note: successful completion - omitted result",diagnostic_record:i.rawPolyfilledDiagnosticRecord})};Object.freeze(s);function f(j){var M,x;function Z(G){return G?.have_records_streamed===!0?s.SUCCESS:G?.has_keys===!1?s.OMITTED_RESULT:G?.pulled===!0?s.NO_DATA:s.NO_DATA_UNKNOWN_SUBCONDITION}if(j.statuses!=null)return j.statuses.map(function(G){return new u(G)});var H=Z(j.stream_summary),K=n([H],o((x=(M=j.notifications)===null||M===void 0?void 0:M.map(y))!==null&&x!==void 0?x:[]),!1);return K.sort(function(G,$){return E(G)-E($)})}var b=Object.freeze({"02":0,"01":1,"00":2});function E(j){var M,x,Z=(M=j.gqlStatus)===null||M===void 0?void 0:M.slice(0,2);return(x=b[Z])!==null&&x!==void 0?x:9999}function w(j){return j.notifications!=null?j.notifications.map(function(M){return new h(M)}):j.statuses!=null?j.statuses.map(v).filter(function(M){return M!=null}):[]}function T(j){return j==null?{}:{offset:r.util.toNumber(j.offset),line:r.util.toNumber(j.line),column:r.util.toNumber(j.column)}}function R(j){return a.includes(j)?j:l.UNKNOWN}function L(j){return p.includes(j)?j:m.UNKNOWN}return Te.default=h,Te}var Fl;function my(){if(Fl)return Be;Fl=1,Object.defineProperty(Be,"__esModule",{value:!0}),Be.Stats=Be.QueryStatistics=Be.ProfiledPlan=Be.Plan=Be.ServerInfo=Be.queryType=void 0;var e=Pu(),g=by(),O=(function(){function l(a,_,p,m){var h,u,v;this.query={text:a,parameters:_},this.queryType=p.type,this.counters=new t((h=p.stats)!==null&&h!==void 0?h:{}),this.updateStatistics=this.counters,this.plan=p.plan!=null||p.profile!=null?new d((u=p.plan)!==null&&u!==void 0?u:p.profile):!1,this.profile=p.profile!=null?new o(p.profile):!1,this.notifications=(0,g.buildNotificationsFromMetadata)(p),this.gqlStatusObjects=(0,g.buildGqlStatusObjectFromMetadata)(p),this.server=new r(p.server,m),this.resultConsumedAfter=p.result_consumed_after,this.resultAvailableAfter=p.result_available_after,this.database={name:(v=p.db)!==null&&v!==void 0?v:null}}return l.prototype.hasPlan=function(){return this.plan instanceof d},l.prototype.hasProfile=function(){return this.profile instanceof o},l})(),d=(function(){function l(a){this.operatorType=a.operatorType,this.identifiers=a.identifiers,this.arguments=a.args,this.children=a.children!=null?a.children.map(function(_){return new l(_)}):[]}return l})();Be.Plan=d;var o=(function(){function l(a){this.operatorType=a.operatorType,this.identifiers=a.identifiers,this.arguments=a.args,this.dbHits=i("dbHits",a),this.rows=i("rows",a),this.pageCacheMisses=i("pageCacheMisses",a),this.pageCacheHits=i("pageCacheHits",a),this.pageCacheHitRatio=i("pageCacheHitRatio",a),this.time=i("time",a),this.children=a.children!=null?a.children.map(function(_){return new l(_)}):[]}return l.prototype.hasPageCacheStats=function(){return this.pageCacheMisses>0||this.pageCacheHits>0||this.pageCacheHitRatio>0},l})();Be.ProfiledPlan=o;var n=(function(){function l(){this.nodesCreated=0,this.nodesDeleted=0,this.relationshipsCreated=0,this.relationshipsDeleted=0,this.propertiesSet=0,this.labelsAdded=0,this.labelsRemoved=0,this.indexesAdded=0,this.indexesRemoved=0,this.constraintsAdded=0,this.constraintsRemoved=0}return l})();Be.Stats=n;var t=(function(){function l(a){var _=this;this._stats={nodesCreated:0,nodesDeleted:0,relationshipsCreated:0,relationshipsDeleted:0,propertiesSet:0,labelsAdded:0,labelsRemoved:0,indexesAdded:0,indexesRemoved:0,constraintsAdded:0,constraintsRemoved:0},this._systemUpdates=0,Object.keys(a).forEach(function(p){var m=p.replace(/(-\w)/g,function(h){return h[1].toUpperCase()});m in _._stats?_._stats[m]=e.util.toNumber(a[p]):m==="systemUpdates"?_._systemUpdates=e.util.toNumber(a[p]):m==="containsSystemUpdates"?_._containsSystemUpdates=a[p]:m==="containsUpdates"&&(_._containsUpdates=a[p])}),this._stats=Object.freeze(this._stats)}return l.prototype.containsUpdates=function(){var a=this;return this._containsUpdates!==void 0?this._containsUpdates:Object.keys(this._stats).reduce(function(_,p){return _+a._stats[p]},0)>0},l.prototype.updates=function(){return this._stats},l.prototype.containsSystemUpdates=function(){return this._containsSystemUpdates!==void 0?this._containsSystemUpdates:this._systemUpdates>0},l.prototype.systemUpdates=function(){return this._systemUpdates},l})();Be.QueryStatistics=t;var r=(function(){function l(a,_){a!=null&&(this.address=a.address,this.agent=a.version),this.protocolVersion=_}return l})();Be.ServerInfo=r;function i(l,a,_){if(_===void 0&&(_=0),a!==!1&&l in a){var p=a[l];return e.util.toNumber(p)}else return _}var c={READ_ONLY:"r",READ_WRITE:"rw",WRITE_ONLY:"w",SCHEMA_WRITE:"s"};return Be.queryType=c,Be.default=O,Be}var Cr={},Bl;function D0(){if(Bl)return Cr;Bl=1,Object.defineProperty(Cr,"__esModule",{value:!0}),Cr.notificationFilterDisabledClassification=Cr.notificationFilterDisabledCategory=Cr.notificationFilterMinimumSeverityLevel=void 0;var e={OFF:"OFF",WARNING:"WARNING",INFORMATION:"INFORMATION"};Cr.notificationFilterMinimumSeverityLevel=e,Object.freeze(e);var g={HINT:"HINT",UNRECOGNIZED:"UNRECOGNIZED",UNSUPPORTED:"UNSUPPORTED",PERFORMANCE:"PERFORMANCE",TOPOLOGY:"TOPOLOGY",SECURITY:"SECURITY",DEPRECATION:"DEPRECATION",GENERIC:"GENERIC",SCHEMA:"SCHEMA"};Cr.notificationFilterDisabledCategory=g,Object.freeze(g);var O=g;Cr.notificationFilterDisabledClassification=O;var d=(function(){function o(){throw this.minimumSeverityLevel=void 0,this.disabledCategories=void 0,this.disabledClassifications=void 0,new Error("Not implemented")}return o})();return Cr.default=d,Cr}var Ir={},xl;function Es(){if(xl)return Ir;xl=1;var e=Ir&&Ir.__awaiter||function(m,h,u,v){function y(s){return s instanceof u?s:new u(function(f){f(s)})}return new(u||(u=Promise))(function(s,f){function b(T){try{w(v.next(T))}catch(R){f(R)}}function E(T){try{w(v.throw(T))}catch(R){f(R)}}function w(T){T.done?s(T.value):y(T.value).then(b,E)}w((v=v.apply(m,h||[])).next())})},g=Ir&&Ir.__generator||function(m,h){var u={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},v,y,s,f=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return f.next=b(0),f.throw=b(1),f.return=b(2),typeof Symbol=="function"&&(f[Symbol.iterator]=function(){return this}),f;function b(w){return function(T){return E([w,T])}}function E(w){if(v)throw new TypeError("Generator is already executing.");for(;f&&(f=0,w[0]&&(u=0)),u;)try{if(v=1,y&&(s=w[0]&2?y.return:w[0]?y.throw||((s=y.return)&&s.call(y),0):y.next)&&!(s=s.call(y,w[1])).done)return s;switch(y=0,s&&(w=[w[0]&2,s.value]),w[0]){case 0:case 1:s=w;break;case 4:return u.label++,{value:w[1],done:!1};case 5:u.label++,y=w[1],w=[0];continue;case 7:w=u.ops.pop(),u.trys.pop();continue;default:if(s=u.trys,!(s=s.length>0&&s[s.length-1])&&(w[0]===6||w[0]===2)){u=0;continue}if(w[0]===3&&(!s||w[1]>s[0]&&w[1]<s[3])){u.label=w[1];break}if(w[0]===6&&u.label<s[1]){u.label=s[1],s=w;break}if(s&&u.label<s[2]){u.label=s[2],u.ops.push(w);break}s[2]&&u.ops.pop(),u.trys.pop();continue}w=h.call(m,u)}catch(T){w=[6,T],y=0}finally{v=s=0}if(w[0]&5)throw w[1];return{value:w[0]?w[1]:void 0,done:!0}}},O=Ir&&Ir.__importDefault||function(m){return m&&m.__esModule?m:{default:m}},d;Object.defineProperty(Ir,"__esModule",{value:!0});var o=O(my()),n=Pu(),t=He(),r=n.connectionHolder.EMPTY_CONNECTION_HOLDER,i=function(m){console.log("Uncaught error when processing result: "+m)},c=function(m){},l=function(m){},a=(function(){function m(h,u,v,y,s){s===void 0&&(s={high:Number.MAX_VALUE,low:Number.MAX_VALUE}),this[d]="Result",this._stack=_(),this._streamObserverPromise=h,this._p=null,this._query=u,this._parameters=v??{},this._connectionHolder=y??r,this._keys=null,this._summary=null,this._error=null,this._watermarks=s}return m.prototype.keys=function(){var h=this;return this._keys!==null?Promise.resolve(this._keys):this._error!==null?Promise.reject(this._error):new Promise(function(u,v){h._streamObserverPromise.then(function(y){return y.subscribe(h._decorateObserver({onKeys:function(s){return u(s)},onError:function(s){return v(s)}}))}).catch(v)})},m.prototype.summary=function(){var h=this;return this._summary!==null?Promise.resolve(this._summary):this._error!==null?Promise.reject(this._error):new Promise(function(u,v){h._streamObserverPromise.then(function(y){y.cancel(),y.subscribe(h._decorateObserver({onCompleted:function(s){return u(s)},onError:function(s){return v(s)}}))}).catch(v)})},m.prototype._getOrCreatePromise=function(){var h=this;return this._p==null&&(this._p=new Promise(function(u,v){var y=[],s={onNext:function(f){y.push(f)},onCompleted:function(f){u({records:y,summary:f})},onError:function(f){v(f)}};h.subscribe(s)})),this._p},m.prototype[Symbol.asyncIterator]=function(){var h=this;if(!this.isOpen()){var u=(0,t.newError)("Result is already consumed");return{next:function(){return Promise.reject(u)},peek:function(){return Promise.reject(u)}}}var v={paused:!0,firstRun:!0,finished:!1},y=function(){var b,E;if(v.streaming!=null){var w=(E=(b=v.queuedObserver)===null||b===void 0?void 0:b.size)!==null&&E!==void 0?E:0,T=w>=h._watermarks.high,R=w<=h._watermarks.low;T&&!v.paused?(v.paused=!0,v.streaming.pause()):(R&&v.paused||v.firstRun&&!T)&&(v.firstRun=!1,v.paused=!1,v.streaming.resume())}},s=function(){return e(h,void 0,void 0,function(){var b;return g(this,function(E){switch(E.label){case 0:return v.queuedObserver!==void 0?[3,2]:(v.queuedObserver=this._createQueuedResultObserver(y),b=v,[4,this._subscribe(v.queuedObserver,!0).catch(function(){})]);case 1:b.streaming=E.sent(),y(),E.label=2;case 2:return[2,v.queuedObserver]}})})},f=function(b){if(b===void 0)throw(0,t.newError)("InvalidState: Result stream finished without Summary",t.PROTOCOL_ERROR);return!0};return{next:function(){return e(h,void 0,void 0,function(){var b,E;return g(this,function(w){switch(w.label){case 0:return v.finished&&f(v.summary)?[2,{done:!0,value:v.summary}]:[4,s()];case 1:return b=w.sent(),[4,b.dequeue()];case 2:return E=w.sent(),E.done===!0&&(v.finished=E.done,v.summary=E.value),[2,E]}})})},return:function(b){return e(h,void 0,void 0,function(){var E,w,T;return g(this,function(R){switch(R.label){case 0:return v.finished&&f(v.summary)?[2,{done:!0,value:b??v.summary}]:((T=v.streaming)===null||T===void 0||T.cancel(),[4,s()]);case 1:return E=R.sent(),[4,E.dequeueUntilDone()];case 2:return w=R.sent(),v.finished=!0,w.value=b??w.value,v.summary=w.value,[2,w]}})})},peek:function(){return e(h,void 0,void 0,function(){var b;return g(this,function(E){switch(E.label){case 0:return v.finished&&f(v.summary)?[2,{done:!0,value:v.summary}]:[4,s()];case 1:return b=E.sent(),[4,b.head()];case 2:return[2,E.sent()]}})})}}},m.prototype.then=function(h,u){return this._getOrCreatePromise().then(h,u)},m.prototype.catch=function(h){return this._getOrCreatePromise().catch(h)},m.prototype.finally=function(h){return this._getOrCreatePromise().finally(h)},m.prototype.subscribe=function(h){this._subscribe(h).catch(function(){})},m.prototype.isOpen=function(){return this._summary===null&&this._error===null},m.prototype._subscribe=function(h,u){u===void 0&&(u=!1);var v=this._decorateObserver(h);return this._streamObserverPromise.then(function(y){return u&&y.pause(),y.subscribe(v),y}).catch(function(y){return v.onError!=null&&v.onError(y),Promise.reject(y)})},m.prototype._decorateObserver=function(h){var u=this,v,y,s,f=(v=h.onCompleted)!==null&&v!==void 0?v:c,b=(y=h.onError)!==null&&y!==void 0?y:i,E=(s=h.onKeys)!==null&&s!==void 0?s:l,w=function(L){u._releaseConnectionAndGetSummary(L).then(function(j){return u._summary!==null?f.call(h,u._summary):(u._summary=j,f.call(h,j))}).catch(b)},T=function(L){u._connectionHolder.releaseConnection().then(function(){p(L,u._stack),u._error=L,b.call(h,L)}).catch(b)},R=function(L){return u._keys=L,E.call(h,L)};return{onNext:h.onNext!=null?h.onNext.bind(h):void 0,onKeys:R,onCompleted:w,onError:T}},m.prototype._cancel=function(){this._summary===null&&this._error===null&&this._streamObserverPromise.then(function(h){return h.cancel()}).catch(function(){})},m.prototype._releaseConnectionAndGetSummary=function(h){var u=n.util.validateQueryAndParameters(this._query,this._parameters,{skipAsserts:!0}),v=u.validatedQuery,y=u.params,s=this._connectionHolder;return s.getConnection().then(function(f){return s.releaseConnection().then(function(){return f?.getProtocolVersion()})},function(f){}).then(function(f){return new o.default(v,y,h,f)})},m.prototype._createQueuedResultObserver=function(h){var u=this;function v(){var w={};return w.promise=new Promise(function(T,R){w.resolve=T,w.reject=R}),w}function y(w){return w instanceof Error}function s(){return e(this,void 0,void 0,function(){var w,T;return g(this,function(R){switch(R.label){case 0:if(f.length>0){if(w=(T=f.shift())!==null&&T!==void 0?T:(0,t.newError)("Unexpected empty buffer",t.PROTOCOL_ERROR),h(),y(w))throw w;return[2,w]}return b.resolvable=v(),[4,b.resolvable.promise];case 1:return[2,R.sent()]}})})}var f=[],b={resolvable:null},E={onNext:function(w){E._push({done:!1,value:w})},onCompleted:function(w){E._push({done:!0,value:w})},onError:function(w){E._push(w)},_push:function(w){if(b.resolvable!==null){var T=b.resolvable;b.resolvable=null,y(w)?T.reject(w):T.resolve(w)}else f.push(w),h()},dequeue:s,dequeueUntilDone:function(){return e(u,void 0,void 0,function(){var w;return g(this,function(T){switch(T.label){case 0:return[4,s()];case 1:return w=T.sent(),w.done===!0?[2,w]:[3,0];case 2:return[2]}})})},head:function(){return e(u,void 0,void 0,function(){var w,w,T;return g(this,function(R){switch(R.label){case 0:if(f.length>0){if(w=f[0],y(w))throw w;return[2,w]}b.resolvable=v(),R.label=1;case 1:return R.trys.push([1,3,4,5]),[4,b.resolvable.promise];case 2:return w=R.sent(),f.unshift(w),[2,w];case 3:throw T=R.sent(),f.unshift(T),T;case 4:return h(),[7];case 5:return[2]}})})},get size(){return f.length}};return E},m})();d=Symbol.toStringTag;function _(){var m=new Error("");return m.stack!=null?m.stack.replace(/^Error(\n\r)*/,""):null}function p(m,h){h!=null&&(m.stack=m.toString()+`
|
|
2
|
+
`+h)}return Ir.default=a,Ir}var Hu={},Wl;function gy(){if(Wl)return Hu;Wl=1,Object.defineProperty(Hu,"__esModule",{value:!0});var e=(function(){function g(O,d,o){this.keys=O,this.records=d,this.summary=o}return g})();return Hu.default=e,Hu}var ui={},Vl;function U0(){if(Vl)return ui;Vl=1,Object.defineProperty(ui,"__esModule",{value:!0}),ui.Releasable=void 0;var e=(function(){function O(){}return O.prototype.release=function(){throw new Error("Not implemented")},O})();ui.Releasable=e;var g=(function(){function O(){}return O.prototype.acquireConnection=function(d){throw Error("Not implemented")},O.prototype.supportsMultiDb=function(){throw Error("Not implemented")},O.prototype.supportsTransactionConfig=function(){throw Error("Not implemented")},O.prototype.supportsUserImpersonation=function(){throw Error("Not implemented")},O.prototype.supportsSessionAuth=function(){throw Error("Not implemented")},O.prototype.SSREnabled=function(){return!1},O.prototype.verifyConnectivityAndGetServerInfo=function(d){throw Error("Not implemented")},O.prototype.verifyAuthentication=function(d){throw Error("Not implemented")},O.prototype.getNegotiatedProtocolVersion=function(){throw Error("Not Implemented")},O.prototype.close=function(){throw Error("Not implemented")},O})();return ui.default=g,ui}var zu={},Hl;function q0(){if(Hl)return zu;Hl=1,Object.defineProperty(zu,"__esModule",{value:!0});var e=(function(){function g(){}return g.prototype.beginTransaction=function(O){throw new Error("Not implemented")},g.prototype.run=function(O,d,o){throw new Error("Not implemented")},g.prototype.commitTransaction=function(O){throw new Error("Not implemented")},g.prototype.rollbackTransaction=function(O){throw new Error("Not implemented")},g.prototype.resetAndFlush=function(){throw new Error("Not implemented")},g.prototype.isOpen=function(){throw new Error("Not implemented")},g.prototype.getProtocolVersion=function(){throw new Error("Not implemented")},g.prototype.hasOngoingObservableRequests=function(){throw new Error("Not implemented")},g})();return zu.default=e,zu}var Ar={},zl;function Oy(){if(zl)return Ar;zl=1;var e=Ar&&Ar.__awaiter||function(m,h,u,v){function y(s){return s instanceof u?s:new u(function(f){f(s)})}return new(u||(u=Promise))(function(s,f){function b(T){try{w(v.next(T))}catch(R){f(R)}}function E(T){try{w(v.throw(T))}catch(R){f(R)}}function w(T){T.done?s(T.value):y(T.value).then(b,E)}w((v=v.apply(m,h||[])).next())})},g=Ar&&Ar.__generator||function(m,h){var u={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},v,y,s,f=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return f.next=b(0),f.throw=b(1),f.return=b(2),typeof Symbol=="function"&&(f[Symbol.iterator]=function(){return this}),f;function b(w){return function(T){return E([w,T])}}function E(w){if(v)throw new TypeError("Generator is already executing.");for(;f&&(f=0,w[0]&&(u=0)),u;)try{if(v=1,y&&(s=w[0]&2?y.return:w[0]?y.throw||((s=y.return)&&s.call(y),0):y.next)&&!(s=s.call(y,w[1])).done)return s;switch(y=0,s&&(w=[w[0]&2,s.value]),w[0]){case 0:case 1:s=w;break;case 4:return u.label++,{value:w[1],done:!1};case 5:u.label++,y=w[1],w=[0];continue;case 7:w=u.ops.pop(),u.trys.pop();continue;default:if(s=u.trys,!(s=s.length>0&&s[s.length-1])&&(w[0]===6||w[0]===2)){u=0;continue}if(w[0]===3&&(!s||w[1]>s[0]&&w[1]<s[3])){u.label=w[1];break}if(w[0]===6&&u.label<s[1]){u.label=s[1],s=w;break}if(s&&u.label<s[2]){u.label=s[2],u.ops.push(w);break}s[2]&&u.ops.pop(),u.trys.pop();continue}w=h.call(m,u)}catch(T){w=[6,T],y=0}finally{v=s=0}if(w[0]&5)throw w[1];return{value:w[0]?w[1]:void 0,done:!0}}},O=Ar&&Ar.__importDefault||function(m){return m&&m.__esModule?m:{default:m}};Object.defineProperty(Ar,"__esModule",{value:!0});var d=hr(),o=Os(),n=Su(),t=ws(),r=gs(),i=He(),c=O(Es()),l=(function(){function m(h){var u=h.connectionHolder,v=h.onClose,y=h.onBookmarks,s=h.onConnection,f=h.reactive,b=h.fetchSize,E=h.impersonatedUser,w=h.highRecordWatermark,T=h.lowRecordWatermark,R=h.notificationFilter,L=h.apiTelemetryConfig,j=this;this._connectionHolder=u,this._reactive=f,this._state=a.ACTIVE,this._onClose=v,this._onBookmarks=y,this._onConnection=s,this._onError=this._onErrorCallback.bind(this),this._fetchSize=b,this._onComplete=this._onCompleteCallback.bind(this),this._results=[],this._impersonatedUser=E,this._lowRecordWatermak=T,this._highRecordWatermark=w,this._bookmarks=n.Bookmarks.empty(),this._notificationFilter=R,this._apiTelemetryConfig=L,this._acceptActive=function(){},this._activePromise=new Promise(function(M,x){j._acceptActive=M})}return m.prototype._begin=function(h,u,v){var y=this;this._connectionHolder.getConnection().then(function(s){return e(y,void 0,void 0,function(){var f,b=this;return g(this,function(E){switch(E.label){case 0:return this._onConnection(),s==null?[3,2]:(f=this,[4,h()]);case 1:return f._bookmarks=E.sent(),[2,s.beginTransaction({bookmarks:this._bookmarks,txConfig:u,mode:this._connectionHolder.mode(),database:this._connectionHolder.database(),impersonatedUser:this._impersonatedUser,notificationFilter:this._notificationFilter,apiTelemetryConfig:this._apiTelemetryConfig,beforeError:function(w){v?.onError(w),b._onError(w).catch(function(){})},afterComplete:function(w){v?.onComplete(w),w.db!==void 0&&v?.onDB!=null&&v.onDB(w.db),b._onComplete(w)}})];case 2:throw(0,i.newError)("No connection available")}})})}).catch(function(s){v?.onError(s),y._onError(s).catch(function(){})}).finally(function(){return y._acceptActive()})},m.prototype.run=function(h,u){var v=(0,d.validateQueryAndParameters)(h,u),y=v.validatedQuery,s=v.params,f=this._state.run(y,s,{connectionHolder:this._connectionHolder,onError:this._onError,onComplete:this._onComplete,onConnection:this._onConnection,reactive:this._reactive,fetchSize:this._fetchSize,highRecordWatermark:this._highRecordWatermark,lowRecordWatermark:this._lowRecordWatermak,preparationJob:this._activePromise});return this._results.push(f),f},m.prototype.commit=function(){var h=this,u=this._state.commit({connectionHolder:this._connectionHolder,onError:this._onError,onComplete:function(v){return h._onCompleteCallback(v,h._bookmarks)},onConnection:this._onConnection,pendingResults:this._results,preparationJob:this._activePromise});return this._state=u.state,this._onClose(),new Promise(function(v,y){u.result.subscribe({onCompleted:function(){return v()},onError:function(s){return y(s)}})})},m.prototype.rollback=function(){var h=this._state.rollback({connectionHolder:this._connectionHolder,onError:this._onError,onComplete:this._onComplete,onConnection:this._onConnection,pendingResults:this._results,preparationJob:this._activePromise});return this._state=h.state,this._onClose(),new Promise(function(u,v){h.result.subscribe({onCompleted:function(){return u()},onError:function(y){return v(y)}})})},m.prototype.isOpen=function(){return this._state===a.ACTIVE},m.prototype.close=function(){return e(this,void 0,void 0,function(){return g(this,function(h){switch(h.label){case 0:return this.isOpen()?[4,this.rollback()]:[3,2];case 1:h.sent(),h.label=2;case 2:return[2]}})})},m.prototype[Symbol.asyncDispose]=function(){return this.close()},m.prototype._onErrorCallback=function(h){return this._state===a.FAILED?Promise.resolve(null):(this._state=a.FAILED,this._onClose(),this._results.forEach(function(u){u.isOpen()&&u._streamObserverPromise.then(function(v){return v.onError(h)}).catch(function(v){})}),this._connectionHolder.releaseConnection())},m.prototype._onCompleteCallback=function(h,u){this._onBookmarks(new n.Bookmarks(h?.bookmark),u??n.Bookmarks.empty(),h?.db)},m})(),a={ACTIVE:{commit:function(m){var h=m.connectionHolder,u=m.onError,v=m.onComplete,y=m.onConnection,s=m.pendingResults,f=m.preparationJob;return{result:_(!0,h,u,v,y,s,f),state:a.SUCCEEDED}},rollback:function(m){var h=m.connectionHolder,u=m.onError,v=m.onComplete,y=m.onConnection,s=m.pendingResults,f=m.preparationJob;return{result:_(!1,h,u,v,y,s,f),state:a.ROLLED_BACK}},run:function(m,h,u){var v=u.connectionHolder,y=u.onError,s=u.onComplete,f=u.onConnection,b=u.reactive,E=u.fetchSize,w=u.highRecordWatermark,T=u.lowRecordWatermark,R=u.preparationJob,L=R??Promise.resolve(),j=v.getConnection().then(function(M){return L.then(function(){return M})}).then(function(M){if(f(),M!=null)return M.run(m,h,{bookmarks:n.Bookmarks.empty(),txConfig:t.TxConfig.empty(),beforeError:y,afterComplete:s,reactive:b,fetchSize:E,highRecordWatermark:w,lowRecordWatermark:T});throw(0,i.newError)("No connection available")}).catch(function(M){return new r.FailedObserver({error:M,onError:y})});return p(j,m,h,v,w,T)}},FAILED:{commit:function(m){var h=m.connectionHolder,u=m.onError;return m.onComplete,{result:p(new r.FailedObserver({error:(0,i.newError)("Cannot commit this transaction, because it has been rolled back either because of an error or explicit termination."),onError:u}),"COMMIT",{},h,0,0),state:a.FAILED}},rollback:function(m){var h=m.connectionHolder;return m.onError,m.onComplete,{result:p(new r.CompletedObserver,"ROLLBACK",{},h,0,0),state:a.FAILED}},run:function(m,h,u){var v=u.connectionHolder,y=u.onError;return u.onComplete,p(new r.FailedObserver({error:(0,i.newError)("Cannot run query in this transaction, because it has been rolled back either because of an error or explicit termination."),onError:y}),m,h,v,0,0)}},SUCCEEDED:{commit:function(m){var h=m.connectionHolder,u=m.onError;return m.onComplete,{result:p(new r.FailedObserver({error:(0,i.newError)("Cannot commit this transaction, because it has already been committed."),onError:u}),"COMMIT",{},o.EMPTY_CONNECTION_HOLDER,0,0),state:a.SUCCEEDED,connectionHolder:h}},rollback:function(m){var h=m.connectionHolder,u=m.onError;return m.onComplete,{result:p(new r.FailedObserver({error:(0,i.newError)("Cannot rollback this transaction, because it has already been committed."),onError:u}),"ROLLBACK",{},o.EMPTY_CONNECTION_HOLDER,0,0),state:a.SUCCEEDED,connectionHolder:h}},run:function(m,h,u){var v=u.connectionHolder,y=u.onError;return u.onComplete,p(new r.FailedObserver({error:(0,i.newError)("Cannot run query in this transaction, because it has already been committed."),onError:y}),m,h,v,0,0)}},ROLLED_BACK:{commit:function(m){var h=m.connectionHolder,u=m.onError;return m.onComplete,{result:p(new r.FailedObserver({error:(0,i.newError)("Cannot commit this transaction, because it has already been rolled back."),onError:u}),"COMMIT",{},h,0,0),state:a.ROLLED_BACK}},rollback:function(m){var h=m.connectionHolder;return m.onError,m.onComplete,{result:p(new r.FailedObserver({error:(0,i.newError)("Cannot rollback this transaction, because it has already been rolled back.")}),"ROLLBACK",{},h,0,0),state:a.ROLLED_BACK}},run:function(m,h,u){var v=u.connectionHolder,y=u.onError;return u.onComplete,p(new r.FailedObserver({error:(0,i.newError)("Cannot run query in this transaction, because it has already been rolled back."),onError:y}),m,h,v,0,0)}}};function _(m,h,u,v,y,s,f){var b=f??Promise.resolve(),E=h.getConnection().then(function(w){return b.then(function(){return w})}).then(function(w){return y(),s.forEach(function(T){return T._cancel()}),Promise.all(s.map(function(T){return T.summary()})).then(function(T){if(w!=null)return m?w.commitTransaction({beforeError:u,afterComplete:v}):w.rollbackTransaction({beforeError:u,afterComplete:v});throw(0,i.newError)("No connection available")})}).catch(function(w){return new r.FailedObserver({error:w,onError:u})});return new c.default(E,m?"COMMIT":"ROLLBACK",{},h,{high:Number.MAX_VALUE,low:Number.MAX_VALUE})}function p(m,h,u,v,y,s){return v===void 0&&(v=o.EMPTY_CONNECTION_HOLDER),new c.default(Promise.resolve(m),h,u,new o.ReadOnlyConnectionHolder(v??o.EMPTY_CONNECTION_HOLDER),{low:s,high:y})}return Ar.default=l,Ar}var $u={},$l;function wy(){if($l)return $u;$l=1,Object.defineProperty($u,"__esModule",{value:!0});var e=(function(){function g(O){var d=O.run;this._run=d}return g.fromTransaction=function(O){return new g({run:O.run.bind(O)})},g.prototype.run=function(O,d){return this._run(O,d)},g})();return $u.default=e,$u}var jr={},Gl;function Ey(){if(Gl)return jr;Gl=1;var e=jr&&jr.__extends||(function(){var t=function(r,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,l){c.__proto__=l}||function(c,l){for(var a in l)Object.prototype.hasOwnProperty.call(l,a)&&(c[a]=l[a])},t(r,i)};return function(r,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");t(r,i);function c(){this.constructor=r}r.prototype=i===null?Object.create(i):(c.prototype=i.prototype,new c)}})(),g=jr&&jr.__assign||function(){return g=Object.assign||function(t){for(var r,i=1,c=arguments.length;i<c;i++){r=arguments[i];for(var l in r)Object.prototype.hasOwnProperty.call(r,l)&&(t[l]=r[l])}return t},g.apply(this,arguments)},O=jr&&jr.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},d;Object.defineProperty(jr,"__esModule",{value:!0});var o=O(Oy()),n=(function(t){e(r,t);function r(i){var c=i.connectionHolder,l=i.onClose,a=i.onBookmarks,_=i.onConnection,p=i.reactive,m=i.fetchSize,h=i.impersonatedUser,u=i.highRecordWatermark,v=i.lowRecordWatermark,y=i.notificationFilter,s=i.apiTelemetryConfig,f=i.onDbCallback,b=t.call(this,{connectionHolder:c,onClose:l,onBookmarks:a,onConnection:_,reactive:p,fetchSize:m,impersonatedUser:h,highRecordWatermark:u,lowRecordWatermark:v,notificationFilter:y,apiTelemetryConfig:s})||this;return b[d]="TransactionPromise",b._onDbCallback=f,b}return r.prototype.then=function(i,c){return this._getOrCreateBeginPromise().then(i,c)},r.prototype.catch=function(i){return this._getOrCreateBeginPromise().catch(i)},r.prototype.finally=function(i){return this._getOrCreateBeginPromise().finally(i)},r.prototype._getOrCreateBeginPromise=function(){var i=this;return this._beginPromise==null&&(this._beginPromise=new Promise(function(c,l){i._resolve=c,i._reject=l,i._beginError!=null&&l(i._beginError),i._beginMetadata!=null&&c(i._toTransaction())})),this._beginPromise},r.prototype._toTransaction=function(){return g(g({},this),{run:t.prototype.run.bind(this),commit:t.prototype.commit.bind(this),rollback:t.prototype.rollback.bind(this),close:t.prototype.close.bind(this),isOpen:t.prototype.isOpen.bind(this),_begin:this._begin.bind(this)})},r.prototype._begin=function(i,c){return t.prototype._begin.call(this,i,c,{onError:this._onBeginError.bind(this),onComplete:this._onBeginMetadata.bind(this),onDB:this._onDbCallback})},r.prototype._onBeginError=function(i){this._beginError=i,this._reject!=null&&this._reject(i)},r.prototype._onBeginMetadata=function(i){this._beginMetadata=i??{},this._resolve!=null&&this._resolve(this._toTransaction())},r})(o.default);return d=Symbol.toStringTag,jr.default=n,jr}var nr={},Gu={},Yl;function Ty(){if(Yl)return Gu;Yl=1,Object.defineProperty(Gu,"__esModule",{value:!0}),Gu.cacheKey=g;var e=rn();function g(O,d){var o;return d!=null?"basic:"+d:O===void 0?"DEFAULT":O.scheme==="basic"?"basic:"+((o=O.principal)!==null&&o!==void 0?o:""):O.scheme==="kerberos"?"kerberos:"+O.credentials:O.scheme==="bearer"?"bearer:"+O.credentials:O.scheme==="none"?"none":(0,e.stringify)(O,{sortedElements:!0})}return Gu}var Kl;function Sy(){if(Kl)return nr;Kl=1;var e=nr&&nr.__awaiter||function(s,f,b,E){function w(T){return T instanceof b?T:new b(function(R){R(T)})}return new(b||(b=Promise))(function(T,R){function L(x){try{M(E.next(x))}catch(Z){R(Z)}}function j(x){try{M(E.throw(x))}catch(Z){R(Z)}}function M(x){x.done?T(x.value):w(x.value).then(L,j)}M((E=E.apply(s,f||[])).next())})},g=nr&&nr.__generator||function(s,f){var b={label:0,sent:function(){if(T[0]&1)throw T[1];return T[1]},trys:[],ops:[]},E,w,T,R=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return R.next=L(0),R.throw=L(1),R.return=L(2),typeof Symbol=="function"&&(R[Symbol.iterator]=function(){return this}),R;function L(M){return function(x){return j([M,x])}}function j(M){if(E)throw new TypeError("Generator is already executing.");for(;R&&(R=0,M[0]&&(b=0)),b;)try{if(E=1,w&&(T=M[0]&2?w.return:M[0]?w.throw||((T=w.return)&&T.call(w),0):w.next)&&!(T=T.call(w,M[1])).done)return T;switch(w=0,T&&(M=[M[0]&2,T.value]),M[0]){case 0:case 1:T=M;break;case 4:return b.label++,{value:M[1],done:!1};case 5:b.label++,w=M[1],M=[0];continue;case 7:M=b.ops.pop(),b.trys.pop();continue;default:if(T=b.trys,!(T=T.length>0&&T[T.length-1])&&(M[0]===6||M[0]===2)){b=0;continue}if(M[0]===3&&(!T||M[1]>T[0]&&M[1]<T[3])){b.label=M[1];break}if(M[0]===6&&b.label<T[1]){b.label=T[1],T=M;break}if(T&&b.label<T[2]){b.label=T[2],b.ops.push(M);break}T[2]&&b.ops.pop(),b.trys.pop();continue}M=f.call(s,b)}catch(x){M=[6,x],w=0}finally{E=T=0}if(M[0]&5)throw M[1];return{value:M[0]?M[1]:void 0,done:!0}}},O=nr&&nr.__read||function(s,f){var b=typeof Symbol=="function"&&s[Symbol.iterator];if(!b)return s;var E=b.call(s),w,T=[],R;try{for(;(f===void 0||f-- >0)&&!(w=E.next()).done;)T.push(w.value)}catch(L){R={error:L}}finally{try{w&&!w.done&&(b=E.return)&&b.call(E)}finally{if(R)throw R.error}}return T},d=nr&&nr.__spreadArray||function(s,f,b){if(b||arguments.length===2)for(var E=0,w=f.length,T;E<w;E++)(T||!(E in f))&&(T||(T=Array.prototype.slice.call(f,0,E)),T[E]=f[E]);return s.concat(T||Array.prototype.slice.call(f))},o=nr&&nr.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(nr,"__esModule",{value:!0});var n=gs(),t=hr(),r=Si(),i=He(),c=o(Es()),l=Os(),a=hy(),_=Su(),p=ws(),m=o(Ey()),h=o(wy()),u=Ty(),v=(function(){function s(f){var b=f.mode,E=f.connectionProvider,w=f.bookmarks,T=f.database,R=f.config,L=f.reactive,j=f.fetchSize,M=f.impersonatedUser,x=f.bookmarkManager,Z=f.notificationFilter,H=f.auth,K=f.log,G=f.homeDatabaseCallback,$;this._mode=b,this._database=T,this._reactive=L,this._fetchSize=j,this._homeDatabaseCallback=G,this._auth=H,this._getConnectionAcquistionBookmarks=this._getConnectionAcquistionBookmarks.bind(this),this._readConnectionHolder=new l.ConnectionHolder({mode:r.ACCESS_MODE_READ,auth:H,database:T,bookmarks:w,connectionProvider:E,impersonatedUser:M,onDatabaseNameResolved:this._onDatabaseNameResolved.bind(this),getConnectionAcquistionBookmarks:this._getConnectionAcquistionBookmarks,log:K}),this._writeConnectionHolder=new l.ConnectionHolder({mode:r.ACCESS_MODE_WRITE,auth:H,database:T,bookmarks:w,connectionProvider:E,impersonatedUser:M,onDatabaseNameResolved:this._onDatabaseNameResolved.bind(this),getConnectionAcquistionBookmarks:this._getConnectionAcquistionBookmarks,log:K}),this._open=!0,this._hasTx=!1,this._impersonatedUser=M,this._lastBookmarks=w??_.Bookmarks.empty(),this._configuredBookmarks=this._lastBookmarks,this._transactionExecutor=y(R),this._databaseNameResolved=this._database!=="";var A=this._calculateWatermaks();this._lowRecordWatermark=A.low,this._highRecordWatermark=A.high,this._results=[],this._bookmarkManager=x,this._notificationFilter=Z,this._log=K,this._databaseGuess=R?.cachedHomeDatabase,this._isRoutingSession=($=R?.routingDriver)!==null&&$!==void 0?$:!1}return s.prototype.run=function(f,b,E){var w=this,T=(0,t.validateQueryAndParameters)(f,b),R=T.validatedQuery,L=T.params,j=E!=null?new p.TxConfig(E,this._log):p.TxConfig.empty(),M=this._run(R,L,function(x){return e(w,void 0,void 0,function(){var Z,H=this;return g(this,function(K){switch(K.label){case 0:return[4,this._bookmarks()];case 1:return Z=K.sent(),this._assertSessionIsOpen(),[2,x.run(R,L,{bookmarks:Z,txConfig:j,mode:this._mode,database:this._database,apiTelemetryConfig:{api:r.TELEMETRY_APIS.AUTO_COMMIT_TRANSACTION},impersonatedUser:this._impersonatedUser,afterComplete:function(G){return H._onCompleteCallback(G,Z)},reactive:this._reactive,fetchSize:this._fetchSize,lowRecordWatermark:this._lowRecordWatermark,highRecordWatermark:this._highRecordWatermark,notificationFilter:this._notificationFilter,onDb:this._onDatabaseNameResolved.bind(this)})]}})})});return this._results.push(M),M},s.prototype._run=function(f,b,E){var w=this._acquireAndConsumeConnection(E),T=w.connectionHolder,R=w.resultPromise,L=R.catch(function(M){return Promise.resolve(new n.FailedObserver({error:M}))}),j={high:this._highRecordWatermark,low:this._lowRecordWatermark};return new c.default(L,f,b,T,j)},s.prototype._acquireConnection=function(f){var b=this,E=this._acquireAndConsumeConnection(f),w=E.connectionHolder,T=E.resultPromise;return T.then(function(R){return e(b,void 0,void 0,function(){return g(this,function(L){switch(L.label){case 0:return[4,w.releaseConnection()];case 1:return L.sent(),[2,R]}})})})},s.prototype._acquireAndConsumeConnection=function(f){var b,E=this._connectionHolderWithMode(this._mode);return this._open?!this._hasTx&&E.initializeConnection(this._databaseGuess)?b=E.getConnection().then(function(w){return f(w)}):b=Promise.reject((0,i.newError)("Queries cannot be run directly on a session with an open transaction; either run from within the transaction or use a different session.")):b=Promise.reject((0,i.newError)("Cannot run query in a closed session.")),{connectionHolder:E,resultPromise:b}},s.prototype.beginTransaction=function(f){var b=f,E=p.TxConfig.empty();return b!=null&&(E=new p.TxConfig(b,this._log)),this._beginTransaction(this._mode,E,{api:r.TELEMETRY_APIS.UNMANAGED_TRANSACTION})},s.prototype._beginTransaction=function(f,b,E){var w=this;if(!this._open)throw(0,i.newError)("Cannot begin a transaction on a closed session.");if(this._hasTx)throw(0,i.newError)("You cannot begin a transaction on a session with an open transaction; either run from within the transaction or use a different session.");var T=s._validateSessionMode(f),R=this._connectionHolderWithMode(T);R.initializeConnection(this._databaseGuess),this._hasTx=!0;var L=new m.default({connectionHolder:R,impersonatedUser:this._impersonatedUser,onClose:this._transactionClosed.bind(this),onBookmarks:function(j,M,x){return w._updateBookmarks(j,M,x)},onConnection:this._assertSessionIsOpen.bind(this),reactive:this._reactive,fetchSize:this._fetchSize,lowRecordWatermark:this._lowRecordWatermark,highRecordWatermark:this._highRecordWatermark,notificationFilter:this._notificationFilter,apiTelemetryConfig:E,onDbCallback:this._onDatabaseNameResolved.bind(this)});return L._begin(function(){return w._bookmarks()},b),L},s.prototype._assertSessionIsOpen=function(){if(!this._open)throw(0,i.newError)("You cannot run more transactions on a closed session.")},s.prototype._transactionClosed=function(){this._hasTx=!1},s.prototype.lastBookmark=function(){return this.lastBookmarks()},s.prototype.lastBookmarks=function(){return this._lastBookmarks.values()},s.prototype._bookmarks=function(){return e(this,void 0,void 0,function(){var f,b;return g(this,function(E){switch(E.label){case 0:return[4,(b=this._bookmarkManager)===null||b===void 0?void 0:b.getBookmarks()];case 1:return f=E.sent(),f===void 0?[2,this._lastBookmarks]:[2,new _.Bookmarks(d(d([],O(f),!1),O(this._configuredBookmarks),!1))]}})})},s.prototype.readTransaction=function(f,b){var E=new p.TxConfig(b,this._log);return this._runTransaction(r.ACCESS_MODE_READ,E,f)},s.prototype.writeTransaction=function(f,b){var E=new p.TxConfig(b,this._log);return this._runTransaction(r.ACCESS_MODE_WRITE,E,f)},s.prototype._runTransaction=function(f,b,E){var w=this;return this._transactionExecutor.execute(function(T){return w._beginTransaction(f,b,T)},E)},s.prototype.executeRead=function(f,b){var E=new p.TxConfig(b,this._log);return this._executeInTransaction(r.ACCESS_MODE_READ,E,f)},s.prototype.executeWrite=function(f,b){var E=new p.TxConfig(b,this._log);return this._executeInTransaction(r.ACCESS_MODE_WRITE,E,f)},s.prototype._executeInTransaction=function(f,b,E){var w=this;return this._transactionExecutor.execute(function(T){return w._beginTransaction(f,b,T)},E,h.default.fromTransaction)},s.prototype._onDatabaseNameResolved=function(f){if(this._isRoutingSession&&(this._databaseGuess=f,!this._databaseNameResolved)){var b=f??"";this._database=b,this._readConnectionHolder.setDatabase(b),this._writeConnectionHolder.setDatabase(b),this._databaseNameResolved=!0,this._homeDatabaseCallback!=null&&this._homeDatabaseCallback((0,u.cacheKey)(this._auth,this._impersonatedUser),f)}},s.prototype._getConnectionAcquistionBookmarks=function(){return e(this,void 0,void 0,function(){var f,b;return g(this,function(E){switch(E.label){case 0:return[4,(b=this._bookmarkManager)===null||b===void 0?void 0:b.getBookmarks()];case 1:return f=E.sent(),f===void 0?[2,this._lastBookmarks]:[2,new _.Bookmarks(d(d([],O(this._configuredBookmarks),!1),O(f),!1))]}})})},s.prototype._updateBookmarks=function(f,b,E){var w,T,R;f!=null&&!f.isEmpty()&&((w=this._bookmarkManager)===null||w===void 0||w.updateBookmarks((T=b?.values())!==null&&T!==void 0?T:[],(R=f?.values())!==null&&R!==void 0?R:[]).catch(function(){}),this._lastBookmarks=f,this._configuredBookmarks=_.Bookmarks.empty())},s.prototype.close=function(){return e(this,void 0,void 0,function(){return g(this,function(f){switch(f.label){case 0:return this._open?(this._open=!1,this._results.forEach(function(b){return b._cancel()}),this._transactionExecutor.close(),[4,this._readConnectionHolder.close(this._hasTx)]):[3,3];case 1:return f.sent(),[4,this._writeConnectionHolder.close(this._hasTx)];case 2:f.sent(),f.label=3;case 3:return[2]}})})},s.prototype[Symbol.asyncDispose]=function(){return this.close()},s.prototype._connectionHolderWithMode=function(f){if(f===r.ACCESS_MODE_READ)return this._readConnectionHolder;if(f===r.ACCESS_MODE_WRITE)return this._writeConnectionHolder;throw(0,i.newError)("Unknown access mode: "+f)},s.prototype._onCompleteCallback=function(f,b){this._updateBookmarks(new _.Bookmarks(f.bookmark),b,f.db)},s.prototype._calculateWatermaks=function(){return this._fetchSize===r.FETCH_ALL?{low:Number.MAX_VALUE,high:Number.MAX_VALUE}:{low:.3*this._fetchSize,high:.7*this._fetchSize}},s.prototype._configureTransactionExecutor=function(f,b){this._transactionExecutor.pipelineBegin=f,this._transactionExecutor.telemetryApi=b},s._validateSessionMode=function(f){var b=f??r.ACCESS_MODE_WRITE;if(b!==r.ACCESS_MODE_READ&&b!==r.ACCESS_MODE_WRITE)throw(0,i.newError)("Illegal session mode "+b);return b},s})();function y(s){var f,b=(f=s?.maxTransactionRetryTime)!==null&&f!==void 0?f:null;return new a.TransactionExecutor(b)}return nr.default=v,nr}var Le={},Ze={},Zl;function Py(){if(Zl)return Ze;Zl=1;var e=Ze&&Ze.__awaiter||function(i,c,l,a){function _(p){return p instanceof l?p:new l(function(m){m(p)})}return new(l||(l=Promise))(function(p,m){function h(y){try{v(a.next(y))}catch(s){m(s)}}function u(y){try{v(a.throw(y))}catch(s){m(s)}}function v(y){y.done?p(y.value):_(y.value).then(h,u)}v((a=a.apply(i,c||[])).next())})},g=Ze&&Ze.__generator||function(i,c){var l={label:0,sent:function(){if(p[0]&1)throw p[1];return p[1]},trys:[],ops:[]},a,_,p,m=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return m.next=h(0),m.throw=h(1),m.return=h(2),typeof Symbol=="function"&&(m[Symbol.iterator]=function(){return this}),m;function h(v){return function(y){return u([v,y])}}function u(v){if(a)throw new TypeError("Generator is already executing.");for(;m&&(m=0,v[0]&&(l=0)),l;)try{if(a=1,_&&(p=v[0]&2?_.return:v[0]?_.throw||((p=_.return)&&p.call(_),0):_.next)&&!(p=p.call(_,v[1])).done)return p;switch(_=0,p&&(v=[v[0]&2,p.value]),v[0]){case 0:case 1:p=v;break;case 4:return l.label++,{value:v[1],done:!1};case 5:l.label++,_=v[1],v=[0];continue;case 7:v=l.ops.pop(),l.trys.pop();continue;default:if(p=l.trys,!(p=p.length>0&&p[p.length-1])&&(v[0]===6||v[0]===2)){l=0;continue}if(v[0]===3&&(!p||v[1]>p[0]&&v[1]<p[3])){l.label=v[1];break}if(v[0]===6&&l.label<p[1]){l.label=p[1],p=v;break}if(p&&l.label<p[2]){l.label=p[2],l.ops.push(v);break}p[2]&&l.ops.pop(),l.trys.pop();continue}v=c.call(i,l)}catch(y){v=[6,y],_=0}finally{a=p=0}if(v[0]&5)throw v[1];return{value:v[0]?v[1]:void 0,done:!0}}},O=Ze&&Ze.__values||function(i){var c=typeof Symbol=="function"&&Symbol.iterator,l=c&&i[c],a=0;if(l)return l.call(i);if(i&&typeof i.length=="number")return{next:function(){return i&&a>=i.length&&(i=void 0),{value:i&&i[a++],done:!i}}};throw new TypeError(c?"Object is not iterable.":"Symbol.iterator is not defined.")},d=Ze&&Ze.__read||function(i,c){var l=typeof Symbol=="function"&&i[Symbol.iterator];if(!l)return i;var a=l.call(i),_,p=[],m;try{for(;(c===void 0||c-- >0)&&!(_=a.next()).done;)p.push(_.value)}catch(h){m={error:h}}finally{try{_&&!_.done&&(l=a.return)&&l.call(a)}finally{if(m)throw m.error}}return p},o=Ze&&Ze.__spreadArray||function(i,c,l){if(l||arguments.length===2)for(var a=0,_=c.length,p;a<_;a++)(p||!(a in c))&&(p||(p=Array.prototype.slice.call(c,0,a)),p[a]=c[a]);return i.concat(p||Array.prototype.slice.call(c))};Object.defineProperty(Ze,"__esModule",{value:!0}),Ze.bookmarkManager=t;var n=(function(){function i(){throw new Error("Not implemented")}return i.prototype.updateBookmarks=function(c,l){return e(this,void 0,void 0,function(){return g(this,function(a){throw new Error("Not implemented")})})},i.prototype.getBookmarks=function(){return e(this,void 0,void 0,function(){return g(this,function(c){throw new Error("Not implemented")})})},i})();Ze.default=n;function t(i){i===void 0&&(i={});var c=new Set(i.initialBookmarks);return new r(c,i.bookmarksSupplier,i.bookmarksConsumer)}var r=(function(){function i(c,l,a){this._bookmarks=c,this._bookmarksSupplier=l,this._bookmarksConsumer=a}return i.prototype.updateBookmarks=function(c,l){return e(this,void 0,void 0,function(){var a,_,p,u,m,h,u,v,y,s,f;return g(this,function(b){switch(b.label){case 0:a=this._bookmarks;try{for(_=O(c),p=_.next();!p.done;p=_.next())u=p.value,a.delete(u)}catch(E){v={error:E}}finally{try{p&&!p.done&&(y=_.return)&&y.call(_)}finally{if(v)throw v.error}}try{for(m=O(l),h=m.next();!h.done;h=m.next())u=h.value,a.add(u)}catch(E){s={error:E}}finally{try{h&&!h.done&&(f=m.return)&&f.call(m)}finally{if(s)throw s.error}}return typeof this._bookmarksConsumer!="function"?[3,2]:[4,this._bookmarksConsumer(o([],d(a),!1))];case 1:b.sent(),b.label=2;case 2:return[2]}})})},i.prototype.getBookmarks=function(){return e(this,void 0,void 0,function(){var c,l,a,_,p,m,h,u;return g(this,function(v){switch(v.label){case 0:return c=new Set(this._bookmarks),typeof this._bookmarksSupplier!="function"?[3,2]:[4,this._bookmarksSupplier()];case 1:l=(u=v.sent())!==null&&u!==void 0?u:[];try{for(a=O(l),_=a.next();!_.done;_=a.next())p=_.value,c.add(p)}catch(y){m={error:y}}finally{try{_&&!_.done&&(h=a.return)&&h.call(a)}finally{if(m)throw m.error}}v.label=2;case 2:return[2,o([],d(c),!1)]}})})},i})();return Ze}var Mr={},Ql;function Ry(){if(Ql)return Mr;Ql=1;var e=Mr&&Mr.__awaiter||function(a,_,p,m){function h(u){return u instanceof p?u:new p(function(v){v(u)})}return new(p||(p=Promise))(function(u,v){function y(b){try{f(m.next(b))}catch(E){v(E)}}function s(b){try{f(m.throw(b))}catch(E){v(E)}}function f(b){b.done?u(b.value):h(b.value).then(y,s)}f((m=m.apply(a,_||[])).next())})},g=Mr&&Mr.__generator||function(a,_){var p={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]},m,h,u,v=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return v.next=y(0),v.throw=y(1),v.return=y(2),typeof Symbol=="function"&&(v[Symbol.iterator]=function(){return this}),v;function y(f){return function(b){return s([f,b])}}function s(f){if(m)throw new TypeError("Generator is already executing.");for(;v&&(v=0,f[0]&&(p=0)),p;)try{if(m=1,h&&(u=f[0]&2?h.return:f[0]?h.throw||((u=h.return)&&u.call(h),0):h.next)&&!(u=u.call(h,f[1])).done)return u;switch(h=0,u&&(f=[f[0]&2,u.value]),f[0]){case 0:case 1:u=f;break;case 4:return p.label++,{value:f[1],done:!1};case 5:p.label++,h=f[1],f=[0];continue;case 7:f=p.ops.pop(),p.trys.pop();continue;default:if(u=p.trys,!(u=u.length>0&&u[u.length-1])&&(f[0]===6||f[0]===2)){p=0;continue}if(f[0]===3&&(!u||f[1]>u[0]&&f[1]<u[3])){p.label=f[1];break}if(f[0]===6&&p.label<u[1]){p.label=u[1],u=f;break}if(u&&p.label<u[2]){p.label=u[2],p.ops.push(f);break}u[2]&&p.ops.pop(),p.trys.pop();continue}f=_.call(a,p)}catch(b){f=[6,b],h=0}finally{m=u=0}if(f[0]&5)throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}},O=Mr&&Mr.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(Mr,"__esModule",{value:!0});var d=O(gy()),o=He(),n=(function(){function a(){}return a.prototype.eagerResultTransformer=function(){return r},a.prototype.eager=function(){return r},a.prototype.mappedResultTransformer=function(_){return i(_)},a.prototype.mapped=function(_){return i(_)},a.prototype.first=function(){return c},a.prototype.summary=function(){return l},a})(),t=new n;Object.freeze(t),Mr.default=t;function r(a){return e(this,void 0,void 0,function(){var _,p,m,h;return g(this,function(u){switch(u.label){case 0:return[4,a];case 1:return _=u.sent(),p=_.summary,m=_.records,[4,a.keys()];case 2:return h=u.sent(),[2,new d.default(h,m,p)]}})})}function i(a){var _=this;if(a==null||a.collect==null&&a.map==null)throw(0,o.newError)("Requires a map or/and a collect functions.");return function(p){return e(_,void 0,void 0,function(){return g(this,function(m){switch(m.label){case 0:return[4,new Promise(function(h,u){var v={records:[],keys:[]};p.subscribe({onKeys:function(y){v.keys=y},onNext:function(y){if(a.map!=null){var s=a.map(y);s!==void 0&&v.records.push(s)}else v.records.push(y)},onCompleted:function(y){if(a.collect!=null)h(a.collect(v.records,y,v.keys));else{var s={records:v.records,summary:y,keys:v.keys};h(s)}},onError:function(y){u(y)}})})];case 1:return[2,m.sent()]}})})}}function c(a){return e(this,void 0,void 0,function(){var _,p,m,h;return g(this,function(u){switch(u.label){case 0:return _=a[Symbol.asyncIterator](),[4,_.next()];case 1:p=u.sent(),m=p.value,h=p.done,u.label=2;case 2:return u.trys.push([2,,3,6]),h===!0?[2,void 0]:[2,m];case 3:return _.return==null?[3,5]:[4,_.return()];case 4:u.sent(),u.label=5;case 5:return[7];case 6:return[2]}})})}function l(a){return e(this,void 0,void 0,function(){return g(this,function(_){switch(_.label){case 0:return[4,a.summary()];case 1:return[2,_.sent()]}})})}return Mr}var Tt={},Xl;function F0(){if(Xl)return Tt;Xl=1;var e=Tt&&Tt.__awaiter||function(n,t,r,i){function c(l){return l instanceof r?l:new r(function(a){a(l)})}return new(r||(r=Promise))(function(l,a){function _(h){try{m(i.next(h))}catch(u){a(u)}}function p(h){try{m(i.throw(h))}catch(u){a(u)}}function m(h){h.done?l(h.value):c(h.value).then(_,p)}m((i=i.apply(n,t||[])).next())})},g=Tt&&Tt.__generator||function(n,t){var r={label:0,sent:function(){if(l[0]&1)throw l[1];return l[1]},trys:[],ops:[]},i,c,l,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=_(0),a.throw=_(1),a.return=_(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function _(m){return function(h){return p([m,h])}}function p(m){if(i)throw new TypeError("Generator is already executing.");for(;a&&(a=0,m[0]&&(r=0)),r;)try{if(i=1,c&&(l=m[0]&2?c.return:m[0]?c.throw||((l=c.return)&&l.call(c),0):c.next)&&!(l=l.call(c,m[1])).done)return l;switch(c=0,l&&(m=[m[0]&2,l.value]),m[0]){case 0:case 1:l=m;break;case 4:return r.label++,{value:m[1],done:!1};case 5:r.label++,c=m[1],m=[0];continue;case 7:m=r.ops.pop(),r.trys.pop();continue;default:if(l=r.trys,!(l=l.length>0&&l[l.length-1])&&(m[0]===6||m[0]===2)){r=0;continue}if(m[0]===3&&(!l||m[1]>l[0]&&m[1]<l[3])){r.label=m[1];break}if(m[0]===6&&r.label<l[1]){r.label=l[1],l=m;break}if(l&&r.label<l[2]){r.label=l[2],r.ops.push(m);break}l[2]&&r.ops.pop(),r.trys.pop();continue}m=t.call(n,r)}catch(h){m=[6,h],c=0}finally{i=l=0}if(m[0]&5)throw m[1];return{value:m[0]?m[1]:void 0,done:!0}}};Object.defineProperty(Tt,"__esModule",{value:!0});var O=Si(),d=(function(){function n(t){this._createSession=t}return n.prototype.execute=function(t,r,i){return e(this,void 0,void 0,function(){var c,l,a,_=this;return g(this,function(p){switch(p.label){case 0:c=this._createSession({database:t.database,bookmarkManager:t.bookmarkManager,impersonatedUser:t.impersonatedUser,auth:t.auth}),l=o(t.signal,"abort",function(){return e(_,void 0,void 0,function(){return g(this,function(m){switch(m.label){case 0:return[4,c.close()];case 1:return[2,m.sent()]}})})}),c._configureTransactionExecutor(!0,O.TELEMETRY_APIS.EXECUTE_QUERY),p.label=1;case 1:return p.trys.push([1,,3,5]),a=t.routing==="READ"?c.executeRead.bind(c):c.executeWrite.bind(c),[4,a(function(m){return e(_,void 0,void 0,function(){var h;return g(this,function(u){switch(u.label){case 0:return h=m.run(r,i),[4,t.resultTransformer(h)];case 1:return[2,u.sent()]}})})},t.transactionConfig)];case 2:return[2,p.sent()];case 3:return l.uninstall(),[4,c.close()];case 4:return p.sent(),[7];case 5:return[2]}})})},n})();Tt.default=d;function o(n,t,r){return typeof n?.addEventListener=="function"&&n.addEventListener(t,r),{uninstall:function(){typeof n?.removeEventListener=="function"&&n.removeEventListener(t,r)}}}return Tt}var Yu={},Jl;function B0(){if(Jl)return Yu;Jl=1,Object.defineProperty(Yu,"__esModule",{value:!0});var e=(function(){function g(O){this.maxSize=O,this.pruneCount=Math.max(Math.round(.01*O*Math.log(O)),1),this.map=new Map}return g.prototype.set=function(O,d){this.map.set(O,{database:d,lastUsed:Date.now()}),this._pruneCache()},g.prototype.get=function(O){var d=this.map.get(O);if(d!==void 0)return d.lastUsed=Date.now(),d.database},g.prototype.delete=function(O){this.map.delete(O)},g.prototype._pruneCache=function(){if(this.map.size>this.maxSize)for(var O=Array.from(this.map.entries()).sort(function(o,n){return o[1].lastUsed-n[1].lastUsed}),d=0;d<this.pruneCount;d++)this.map.delete(O[d][0])},g})();return Yu.default=e,Yu}var ef;function rf(){if(ef)return Le;ef=1;var e=Le&&Le.__assign||function(){return e=Object.assign||function(A){for(var q,U=1,Q=arguments.length;U<Q;U++){q=arguments[U];for(var te in q)Object.prototype.hasOwnProperty.call(q,te)&&(A[te]=q[te])}return A},e.apply(this,arguments)},g=Le&&Le.__awaiter||function(A,q,U,Q){function te(z){return z instanceof U?z:new U(function(re){re(z)})}return new(U||(U=Promise))(function(z,re){function ce(W){try{k(Q.next(W))}catch(F){re(F)}}function ae(W){try{k(Q.throw(W))}catch(F){re(F)}}function k(W){W.done?z(W.value):te(W.value).then(ce,ae)}k((Q=Q.apply(A,q||[])).next())})},O=Le&&Le.__generator||function(A,q){var U={label:0,sent:function(){if(z[0]&1)throw z[1];return z[1]},trys:[],ops:[]},Q,te,z,re=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return re.next=ce(0),re.throw=ce(1),re.return=ce(2),typeof Symbol=="function"&&(re[Symbol.iterator]=function(){return this}),re;function ce(k){return function(W){return ae([k,W])}}function ae(k){if(Q)throw new TypeError("Generator is already executing.");for(;re&&(re=0,k[0]&&(U=0)),U;)try{if(Q=1,te&&(z=k[0]&2?te.return:k[0]?te.throw||((z=te.return)&&z.call(te),0):te.next)&&!(z=z.call(te,k[1])).done)return z;switch(te=0,z&&(k=[k[0]&2,z.value]),k[0]){case 0:case 1:z=k;break;case 4:return U.label++,{value:k[1],done:!1};case 5:U.label++,te=k[1],k=[0];continue;case 7:k=U.ops.pop(),U.trys.pop();continue;default:if(z=U.trys,!(z=z.length>0&&z[z.length-1])&&(k[0]===6||k[0]===2)){U=0;continue}if(k[0]===3&&(!z||k[1]>z[0]&&k[1]<z[3])){U.label=k[1];break}if(k[0]===6&&U.label<z[1]){U.label=z[1],z=k;break}if(z&&U.label<z[2]){U.label=z[2],U.ops.push(k);break}z[2]&&U.ops.pop(),U.trys.pop();continue}k=q.call(A,U)}catch(W){k=[6,W],te=0}finally{Q=z=0}if(k[0]&5)throw k[1];return{value:k[0]?k[1]:void 0,done:!0}}},d=Le&&Le.__importDefault||function(A){return A&&A.__esModule?A:{default:A}};Object.defineProperty(Le,"__esModule",{value:!0}),Le.QueryConfig=Le.SessionConfig=Le.routing=Le.WRITE=Le.READ=Le.Driver=void 0;var o=Su(),n=d(py()),t=Si(),r=uc(),i=d(Sy()),c=hr(),l=Py(),a=d(Ry()),_=d(F0()),p=He(),m=d(B0()),h=Ty(),u=3600*1e3,v=1e3,y=1e4,s=t.ACCESS_MODE_READ;Le.READ=s;var f=t.ACCESS_MODE_WRITE;Le.WRITE=f;var b=0,E=(function(){function A(){this.defaultAccessMode=f,this.bookmarks=[],this.database="",this.impersonatedUser=void 0,this.auth=void 0,this.fetchSize=void 0,this.bookmarkManager=void 0,this.notificationFilter=void 0}return A})();Le.SessionConfig=E;var w="WRITE",T="READ",R={WRITE:w,READ:T};Le.routing=R,Object.freeze(R);var L=(function(){function A(){this.routing=R.WRITE,this.resultTransformer=void 0,this.database="",this.impersonatedUser=void 0,this.bookmarkManager=void 0,this.transactionConfig=void 0,this.auth=void 0,this.signal=void 0}return A})();Le.QueryConfig=L;var j=(function(){function A(q,U,Q,te,z){U===void 0&&(U={}),te===void 0&&(te=function(ce){return new i.default(ce)}),z===void 0&&(z=function(ce){return new _.default(ce)}),x(U);var re=r.Logger.create(U);M(U,re),this._id=b++,this._meta=q,this._config=U,this._log=re,this._createConnectionProvider=Q,this._createSession=te,this._defaultExecuteQueryBookmarkManager=(0,l.bookmarkManager)(),this._queryExecutor=z(this.session.bind(this)),this._connectionProvider=null,this.homeDatabaseCache=new m.default(y),this._afterConstruction()}return Object.defineProperty(A.prototype,"executeQueryBookmarkManager",{get:function(){return this._defaultExecuteQueryBookmarkManager},enumerable:!1,configurable:!0}),A.prototype.executeQuery=function(q,U){return g(this,arguments,void 0,function(Q,te,z){var re,ce,ae,k,W,F;return z===void 0&&(z={}),O(this,function(Y){switch(Y.label){case 0:if(re=z.bookmarkManager===null?void 0:(k=z.bookmarkManager)!==null&&k!==void 0?k:this.executeQueryBookmarkManager,ce=(W=z.resultTransformer)!==null&&W!==void 0?W:a.default.eagerResultTransformer(),ae=(F=z.routing)!==null&&F!==void 0?F:R.WRITE,ae!==R.READ&&ae!==R.WRITE)throw(0,p.newError)('Illegal query routing config: "'.concat(ae,'"'));return[4,this._queryExecutor.execute({resultTransformer:ce,bookmarkManager:re,routing:ae,database:z.database,impersonatedUser:z.impersonatedUser,transactionConfig:z.transactionConfig,auth:z.auth,signal:z.signal},Q,te)];case 1:return[2,Y.sent()]}})})},A.prototype.verifyConnectivity=function(q){var U=q===void 0?{}:q,Q=U.database,te=Q===void 0?"":Q,z=this._getOrCreateConnectionProvider();return z.verifyConnectivityAndGetServerInfo({database:te,accessMode:s})},A.prototype.verifyAuthentication=function(){return g(this,arguments,void 0,function(q){var U,Q=q===void 0?{}:q,te=Q.database,z=Q.auth;return O(this,function(re){switch(re.label){case 0:return U=this._getOrCreateConnectionProvider(),[4,U.verifyAuthentication({database:te??"system",auth:z,accessMode:s})];case 1:return[2,re.sent()]}})})},A.prototype.getServerInfo=function(q){var U=q===void 0?{}:q,Q=U.database,te=Q===void 0?"":Q,z=this._getOrCreateConnectionProvider();return z.verifyConnectivityAndGetServerInfo({database:te,accessMode:s})},A.prototype.supportsMultiDb=function(){var q=this._getOrCreateConnectionProvider();return q.supportsMultiDb()},A.prototype.supportsTransactionConfig=function(){var q=this._getOrCreateConnectionProvider();return q.supportsTransactionConfig()},A.prototype.supportsUserImpersonation=function(){var q=this._getOrCreateConnectionProvider();return q.supportsUserImpersonation()},A.prototype.supportsSessionAuth=function(){var q=this._getOrCreateConnectionProvider();return q.supportsSessionAuth()},A.prototype.getNegotiatedProtocolVersion=function(){var q=this._getOrCreateConnectionProvider();return q.getNegotiatedProtocolVersion()},A.prototype.isEncrypted=function(){return this._isEncrypted()},A.prototype._supportsRouting=function(){return this._meta.routing},A.prototype._isEncrypted=function(){return this._config.encrypted===c.ENCRYPTION_ON||this._config.encrypted===!0},A.prototype._getTrust=function(){return this._config.trust},A.prototype.session=function(q){var U=q===void 0?{}:q,Q=U.defaultAccessMode,te=Q===void 0?f:Q,z=U.bookmarks,re=U.database,ce=re===void 0?"":re,ae=U.impersonatedUser,k=U.fetchSize,W=U.bookmarkManager,F=U.notificationFilter,Y=U.auth;return this._newSession({defaultAccessMode:te,bookmarkOrBookmarks:z,database:ce,reactive:!1,impersonatedUser:ae,fetchSize:H(k,this._config.fetchSize),bookmarkManager:W,notificationFilter:F,auth:Y})},A.prototype.close=function(){return this._log.info("Driver ".concat(this._id," closing")),this._connectionProvider!=null?this._connectionProvider.close():Promise.resolve()},A.prototype[Symbol.asyncDispose]=function(){return this.close()},A.prototype._afterConstruction=function(){this._log.info("".concat(this._meta.typename," driver ").concat(this._id," created for server address ").concat(this._meta.address.toString()))},A.prototype._homeDatabaseCallback=function(q,U){this.homeDatabaseCache.set(q,U)},A.prototype._newSession=function(q){var U=q.defaultAccessMode,Q=q.bookmarkOrBookmarks,te=q.database,z=q.reactive,re=q.impersonatedUser,ce=q.fetchSize,ae=q.bookmarkManager,k=q.notificationFilter,W=q.auth,F=i.default._validateSessionMode(U),Y=this._getOrCreateConnectionProvider(),X=this.homeDatabaseCache.get((0,h.cacheKey)(W,re)),ne=this._homeDatabaseCallback.bind(this),le=Q!=null?new o.Bookmarks(Q):o.Bookmarks.empty();return this._createSession({mode:F,database:te??"",connectionProvider:Y,bookmarks:le,config:e({cachedHomeDatabase:X,routingDriver:this._supportsRouting()},this._config),reactive:z,impersonatedUser:re,fetchSize:ce,bookmarkManager:ae,notificationFilter:k,auth:W,log:this._log,homeDatabaseCallback:ne})},A.prototype._getOrCreateConnectionProvider=function(){return this._connectionProvider==null&&(this._connectionProvider=this._createConnectionProvider(this._id,this._config,this._log,$(this._config))),this._connectionProvider},A})();Le.Driver=j;function M(A,q){var U,Q,te=A.resolver;if(te!=null&&typeof te!="function")throw new TypeError("Configured resolver should be a function. Got: ".concat(typeof te));if(A.connectionAcquisitionTimeout<A.connectionTimeout&&q.warn('Configuration for "connectionAcquisitionTimeout" should be greater than or equal to "connectionTimeout". Otherwise, the connection acquisition timeout will take precedence for over the connection timeout in scenarios where a new connection is created while it is acquired'),((U=A.notificationFilter)===null||U===void 0?void 0:U.disabledCategories)!=null&&((Q=A.notificationFilter)===null||Q===void 0?void 0:Q.disabledClassifications)!=null)throw new Error(`The notificationFilter can't have both "disabledCategories" and "disabledClassifications" configured at the same time.`);return A}function x(A){A.maxConnectionLifetime=Z(A.maxConnectionLifetime,u),A.maxConnectionPoolSize=Z(A.maxConnectionPoolSize,t.DEFAULT_POOL_MAX_SIZE),A.connectionAcquisitionTimeout=Z(A.connectionAcquisitionTimeout,t.DEFAULT_POOL_ACQUISITION_TIMEOUT),A.fetchSize=H(A.fetchSize,v),A.connectionTimeout=K(A),A.connectionLivenessCheckTimeout=G(A.connectionLivenessCheckTimeout)}function Z(A,q){var U=parseInt(A,10);return U>0||U===0?U:U<0?Number.MAX_SAFE_INTEGER:q}function H(A,q){var U=parseInt(A,10);if(U>0||U===t.FETCH_ALL)return U;if(U===0||U<0)throw new Error("The fetch size can only be a positive value or ".concat(t.FETCH_ALL," for ALL. However fetchSize = ").concat(U));return q}function K(A){var q=parseInt(A.connectionTimeout,10);return q===0||!isNaN(q)&&q<0?null:isNaN(q)?t.DEFAULT_CONNECTION_TIMEOUT_MILLIS:q}function G(A){if(A!=null){var q=parseInt(A,10);if(q<0||Number.isNaN(q))throw new Error("The connectionLivenessCheckTimeout can only be a positive value or 0 for always. However connectionLivenessCheckTimeout = ".concat(q));return q}}function $(A){return new n.default(A.resolver)}return Le.default=j,Le}var Ku={},tf;function Cy(){if(tf)return Ku;tf=1,Object.defineProperty(Ku,"__esModule",{value:!0});var e=He(),g=rn(),O={basic:function(o,n,t){return t!=null?{scheme:"basic",principal:o,credentials:n,realm:t}:{scheme:"basic",principal:o,credentials:n}},kerberos:function(o){return{scheme:"kerberos",principal:"",credentials:o}},bearer:function(o){return{scheme:"bearer",credentials:o}},none:function(){return{scheme:"none"}},custom:function(o,n,t,r,i){var c={scheme:r,principal:o};if(d(n)&&(c.credentials=n),d(t)&&(c.realm=t),d(i)){try{(0,g.stringify)(i)}catch(l){throw(0,e.newError)("Circular references in custom auth token parameters",void 0,l)}c.parameters=i}return c}};function d(o){return!(o==null||o===""||Object.getPrototypeOf(o)===Object.prototype&&Object.keys(o).length===0)}return Ku.default=O,Ku}var Qe={},nf;function x0(){if(nf)return Qe;nf=1;var e=Qe&&Qe.__awaiter||function(p,m,h,u){function v(y){return y instanceof h?y:new h(function(s){s(y)})}return new(h||(h=Promise))(function(y,s){function f(w){try{E(u.next(w))}catch(T){s(T)}}function b(w){try{E(u.throw(w))}catch(T){s(T)}}function E(w){w.done?y(w.value):v(w.value).then(f,b)}E((u=u.apply(p,m||[])).next())})},g=Qe&&Qe.__generator||function(p,m){var h={label:0,sent:function(){if(y[0]&1)throw y[1];return y[1]},trys:[],ops:[]},u,v,y,s=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return s.next=f(0),s.throw=f(1),s.return=f(2),typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function f(E){return function(w){return b([E,w])}}function b(E){if(u)throw new TypeError("Generator is already executing.");for(;s&&(s=0,E[0]&&(h=0)),h;)try{if(u=1,v&&(y=E[0]&2?v.return:E[0]?v.throw||((y=v.return)&&y.call(v),0):v.next)&&!(y=y.call(v,E[1])).done)return y;switch(v=0,y&&(E=[E[0]&2,y.value]),E[0]){case 0:case 1:y=E;break;case 4:return h.label++,{value:E[1],done:!1};case 5:h.label++,v=E[1],E=[0];continue;case 7:E=h.ops.pop(),h.trys.pop();continue;default:if(y=h.trys,!(y=y.length>0&&y[y.length-1])&&(E[0]===6||E[0]===2)){h=0;continue}if(E[0]===3&&(!y||E[1]>y[0]&&E[1]<y[3])){h.label=E[1];break}if(E[0]===6&&h.label<y[1]){h.label=y[1],y=E;break}if(y&&h.label<y[2]){h.label=y[2],h.ops.push(E);break}y[2]&&h.ops.pop(),h.trys.pop();continue}E=m.call(p,h)}catch(w){E=[6,w],v=0}finally{u=y=0}if(E[0]&5)throw E[1];return{value:E[0]?E[1]:void 0,done:!0}}},O=Qe&&Qe.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.authTokenManagers=Qe.AuthTokenAndExpiration=void 0,Qe.staticAuthTokenManager=c;var d=O(Cy()),o=Pu(),n=(function(){function p(){}return p.prototype.getToken=function(){throw new Error("Not Implemented")},p.prototype.handleSecurityException=function(m,h){throw new Error("Not implemented")},p})();Qe.default=n;var t=(function(){function p(){this.token=d.default.none(),this.expiration=void 0}return p})();Qe.AuthTokenAndExpiration=t;var r=(function(){function p(){}return p.prototype.bearer=function(m){var h=m.tokenProvider;if(typeof h!="function")throw new TypeError("tokenProvider should be function, but got: ".concat(typeof h));return new a(h,["Neo.ClientError.Security.Unauthorized","Neo.ClientError.Security.TokenExpired"])},p.prototype.basic=function(m){var h=this,u=m.tokenProvider;if(typeof u!="function")throw new TypeError("tokenProvider should be function, but got: ".concat(typeof u));return new a(function(){return e(h,void 0,void 0,function(){var v;return g(this,function(y){switch(y.label){case 0:return v={},[4,u()];case 1:return[2,(v.token=y.sent(),v)]}})})},["Neo.ClientError.Security.Unauthorized"])},p})(),i=new r;Qe.authTokenManagers=i,Object.freeze(i);function c(p){var m=p.authToken;return new _(m)}var l=(function(){function p(m){m===void 0&&(m=[]),this._subscribers=m}return p.prototype.subscribe=function(m){this._subscribers.push(m)},p.prototype.onCompleted=function(m){this._subscribers.forEach(function(h){return h.onCompleted(m)})},p.prototype.onError=function(m){this._subscribers.forEach(function(h){return h.onError(m)})},p})(),a=(function(){function p(m,h,u,v){this._tokenProvider=m,this._handledSecurityCodes=h,this._currentAuthData=u,this._refreshObservable=v}return p.prototype.getToken=function(){return e(this,void 0,void 0,function(){var m;return g(this,function(h){switch(h.label){case 0:return this._currentAuthData===void 0||this._currentAuthData.expiration!==void 0&&this._currentAuthData.expiration<new Date?[4,this._refreshAuthToken()]:[3,2];case 1:h.sent(),h.label=2;case 2:return[2,(m=this._currentAuthData)===null||m===void 0?void 0:m.token]}})})},p.prototype.handleSecurityException=function(m,h){var u;return this._handledSecurityCodes.includes(h)?(o.util.equals(m,(u=this._currentAuthData)===null||u===void 0?void 0:u.token)&&this._scheduleRefreshAuthToken(),!0):!1},p.prototype._scheduleRefreshAuthToken=function(m){var h=this;this._refreshObservable===void 0&&(this._currentAuthData=void 0,this._refreshObservable=new l,Promise.resolve(this._tokenProvider()).then(function(u){var v;h._currentAuthData=u,(v=h._refreshObservable)===null||v===void 0||v.onCompleted(u)}).catch(function(u){var v;(v=h._refreshObservable)===null||v===void 0||v.onError(u)}).finally(function(){h._refreshObservable=void 0})),m!==void 0&&this._refreshObservable.subscribe(m)},p.prototype._refreshAuthToken=function(){return e(this,void 0,void 0,function(){var m=this;return g(this,function(h){switch(h.label){case 0:return[4,new Promise(function(u,v){m._scheduleRefreshAuthToken({onCompleted:u,onError:v})})];case 1:return[2,h.sent()]}})})},p})(),_=(function(){function p(m){this._authToken=m}return p.prototype.getToken=function(){return this._authToken},p.prototype.handleSecurityException=function(m,h){return!1},p})();return Qe}var Xr={},of;function W0(){if(of)return Xr;of=1;var e=Xr&&Xr.__extends||(function(){var d=function(o,n){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])},d(o,n)};return function(o,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");d(o,n);function t(){this.constructor=o}o.prototype=n===null?Object.create(n):(t.prototype=n.prototype,new t)}})();Object.defineProperty(Xr,"__esModule",{value:!0}),Xr.InternalConfig=Xr.Config=void 0;var g=(function(){function d(){this.encrypted=void 0,this.trust=void 0,this.trustedCertificates=[],this.maxConnectionPoolSize=100,this.maxConnectionLifetime=3600*1e3,this.connectionAcquisitionTimeout=6e4,this.maxTransactionRetryTime=3e4,this.connectionLivenessCheckTimeout=void 0,this.connectionTimeout=3e4,this.disableLosslessIntegers=!1,this.useBigInt=!1,this.logging=void 0,this.resolver=void 0,this.notificationFilter=void 0,this.userAgent=void 0,this.telemetryDisabled=!1,this.clientCertificate=void 0}return d})();Xr.Config=g;var O=(function(d){e(o,d);function o(){return d!==null&&d.apply(this,arguments)||this}return o})(g);return Xr.InternalConfig=O,Xr}var Ue={},af;function V0(){if(af)return Ue;af=1;var e=Ue&&Ue.__extends||(function(){var s=function(f,b){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(E,w){E.__proto__=w}||function(E,w){for(var T in w)Object.prototype.hasOwnProperty.call(w,T)&&(E[T]=w[T])},s(f,b)};return function(f,b){if(typeof b!="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");s(f,b);function E(){this.constructor=f}f.prototype=b===null?Object.create(b):(E.prototype=b.prototype,new E)}})(),g=Ue&&Ue.__assign||function(){return g=Object.assign||function(s){for(var f,b=1,E=arguments.length;b<E;b++){f=arguments[b];for(var w in f)Object.prototype.hasOwnProperty.call(f,w)&&(s[w]=f[w])}return s},g.apply(this,arguments)},O=Ue&&Ue.__createBinding||(Object.create?(function(s,f,b,E){E===void 0&&(E=b);var w=Object.getOwnPropertyDescriptor(f,b);(!w||("get"in w?!f.__esModule:w.writable||w.configurable))&&(w={enumerable:!0,get:function(){return f[b]}}),Object.defineProperty(s,E,w)}):(function(s,f,b,E){E===void 0&&(E=b),s[E]=f[b]})),d=Ue&&Ue.__setModuleDefault||(Object.create?(function(s,f){Object.defineProperty(s,"default",{enumerable:!0,value:f})}):function(s,f){s.default=f}),o=Ue&&Ue.__importStar||(function(){var s=function(f){return s=Object.getOwnPropertyNames||function(b){var E=[];for(var w in b)Object.prototype.hasOwnProperty.call(b,w)&&(E[E.length]=w);return E},s(f)};return function(f){if(f&&f.__esModule)return f;var b={};if(f!=null)for(var E=s(f),w=0;w<E.length;w++)E[w]!=="default"&&O(b,f,E[w]);return d(b,f),b}})();Object.defineProperty(Ue,"__esModule",{value:!0}),Ue.clientCertificateProviders=Ue.RotatingClientCertificateProvider=Ue.ClientCertificateProvider=void 0,Ue.resolveCertificateProvider=a;var n=o(rn()),t=(function(){function s(){this.certfile="",this.keyfile="",this.password=void 0}return s})();Ue.default=t;var r=(function(){function s(){}return s.prototype.hasUpdate=function(){throw new Error("Not Implemented")},s.prototype.getClientCertificate=function(){throw new Error("Not Implemented")},s})();Ue.ClientCertificateProvider=r;var i=(function(s){e(f,s);function f(){return s!==null&&s.apply(this,arguments)||this}return f.prototype.updateCertificate=function(b){throw new Error("Not implemented")},f})(r);Ue.RotatingClientCertificateProvider=i;var c=(function(){function s(){}return s.prototype.rotating=function(f){var b=f.initialCertificate;if(b==null||!_(b))throw new TypeError("initialCertificate should be ClientCertificate, but got ".concat(n.stringify(b)));var E=g({},b);return new y(E)},s})(),l=new c;Ue.clientCertificateProviders=l,Object.freeze(l);function a(s){if(s!=null){if(typeof s=="object"&&"hasUpdate"in s&&"getClientCertificate"in s&&typeof s.getClientCertificate=="function"&&typeof s.hasUpdate=="function")return s;if(_(s)){var f=g({},s);return{getClientCertificate:function(){return f},hasUpdate:function(){return!1}}}throw new TypeError("clientCertificate should be configured with ClientCertificate or ClientCertificateProvider, but got ".concat(n.stringify(s)))}}function _(s){return s!=null&&typeof s=="object"&&"certfile"in s&&p(s.certfile)&&"keyfile"in s&&m(s.keyfile)&&v("password",s)}function p(s){return h(s)||u(s,h)}function m(s){function f(b){return typeof b=="string"||b!=null&&typeof b=="object"&&"path"in b&&typeof b.path=="string"&&v("password",b)}return f(s)||u(s,f)}function h(s){return typeof s=="string"}function u(s,f,b){return b===void 0&&(b=!1),Array.isArray(s)&&(b||s.length>0)&&s.filter(f).length===s.length}function v(s,f){return!(s in f)||f[s]==null||typeof f[s]=="string"}var y=(function(){function s(f,b){b===void 0&&(b=!1),this._certificate=f,this._updated=b}return s.prototype.hasUpdate=function(){try{return this._updated}finally{this._updated=!1}},s.prototype.getClientCertificate=function(){return this._certificate},s.prototype.updateCertificate=function(f){if(!_(f))throw new TypeError("certificate should be ClientCertificate, but got ".concat(n.stringify(f)));this._certificate=g({},f),this._updated=!0},s})();return Ue}var uf;function _e(){return uf||(uf=1,(function(e){var g=_r&&_r.__createBinding||(Object.create?(function(A,q,U,Q){Q===void 0&&(Q=U);var te=Object.getOwnPropertyDescriptor(q,U);(!te||("get"in te?!q.__esModule:te.writable||te.configurable))&&(te={enumerable:!0,get:function(){return q[U]}}),Object.defineProperty(A,Q,te)}):(function(A,q,U,Q){Q===void 0&&(Q=U),A[Q]=q[U]})),O=_r&&_r.__setModuleDefault||(Object.create?(function(A,q){Object.defineProperty(A,"default",{enumerable:!0,value:q})}):function(A,q){A.default=q}),d=_r&&_r.__importStar||(function(){var A=function(q){return A=Object.getOwnPropertyNames||function(U){var Q=[];for(var te in U)Object.prototype.hasOwnProperty.call(U,te)&&(Q[Q.length]=te);return Q},A(q)};return function(q){if(q&&q.__esModule)return q;var U={};if(q!=null)for(var Q=A(q),te=0;te<Q.length;te++)Q[te]!=="default"&&g(U,q,Q[te]);return O(U,q),U}})(),o=_r&&_r.__importDefault||function(A){return A&&A.__esModule?A:{default:A}};Object.defineProperty(e,"__esModule",{value:!0}),e.EagerResult=e.Result=e.Stats=e.QueryStatistics=e.ProfiledPlan=e.Plan=e.GqlStatusObject=e.Notification=e.ServerInfo=e.queryType=e.ResultSummary=e.Record=e.isPathSegment=e.PathSegment=e.isPath=e.Path=e.isUnboundRelationship=e.UnboundRelationship=e.isRelationship=e.Relationship=e.isNode=e.Node=e.Time=e.LocalTime=e.LocalDateTime=e.isTime=e.isLocalTime=e.isLocalDateTime=e.isDuration=e.isDateTime=e.isDate=e.Duration=e.DateTime=e.Date=e.Point=e.isPoint=e.internal=e.toString=e.toNumber=e.inSafeRange=e.isInt=e.int=e.Integer=e.error=e.isRetriableError=e.GQLError=e.newGQLError=e.Neo4jError=e.newError=e.authTokenManagers=void 0,e.resolveCertificateProvider=e.clientCertificateProviders=e.notificationFilterMinimumSeverityLevel=e.notificationFilterDisabledClassification=e.notificationFilterDisabledCategory=e.notificationSeverityLevel=e.notificationClassification=e.notificationCategory=e.resultTransformers=e.routing=e.staticAuthTokenManager=e.bookmarkManager=e.auth=e.json=e.driver=e.types=e.Driver=e.Session=e.TransactionPromise=e.ManagedTransaction=e.Transaction=e.Connection=e.Releasable=e.ConnectionProvider=void 0;var n=He();Object.defineProperty(e,"newError",{enumerable:!0,get:function(){return n.newError}}),Object.defineProperty(e,"Neo4jError",{enumerable:!0,get:function(){return n.Neo4jError}}),Object.defineProperty(e,"newGQLError",{enumerable:!0,get:function(){return n.newGQLError}}),Object.defineProperty(e,"GQLError",{enumerable:!0,get:function(){return n.GQLError}}),Object.defineProperty(e,"isRetriableError",{enumerable:!0,get:function(){return n.isRetriableError}});var t=d(Tu());e.Integer=t.default,Object.defineProperty(e,"int",{enumerable:!0,get:function(){return t.int}}),Object.defineProperty(e,"isInt",{enumerable:!0,get:function(){return t.isInt}}),Object.defineProperty(e,"inSafeRange",{enumerable:!0,get:function(){return t.inSafeRange}}),Object.defineProperty(e,"toNumber",{enumerable:!0,get:function(){return t.toNumber}}),Object.defineProperty(e,"toString",{enumerable:!0,get:function(){return t.toString}});var r=P0();Object.defineProperty(e,"Date",{enumerable:!0,get:function(){return r.Date}}),Object.defineProperty(e,"DateTime",{enumerable:!0,get:function(){return r.DateTime}}),Object.defineProperty(e,"Duration",{enumerable:!0,get:function(){return r.Duration}}),Object.defineProperty(e,"isDate",{enumerable:!0,get:function(){return r.isDate}}),Object.defineProperty(e,"isDateTime",{enumerable:!0,get:function(){return r.isDateTime}}),Object.defineProperty(e,"isDuration",{enumerable:!0,get:function(){return r.isDuration}}),Object.defineProperty(e,"isLocalDateTime",{enumerable:!0,get:function(){return r.isLocalDateTime}}),Object.defineProperty(e,"isLocalTime",{enumerable:!0,get:function(){return r.isLocalTime}}),Object.defineProperty(e,"isTime",{enumerable:!0,get:function(){return r.isTime}}),Object.defineProperty(e,"LocalDateTime",{enumerable:!0,get:function(){return r.LocalDateTime}}),Object.defineProperty(e,"LocalTime",{enumerable:!0,get:function(){return r.LocalTime}}),Object.defineProperty(e,"Time",{enumerable:!0,get:function(){return r.Time}});var i=R0();Object.defineProperty(e,"Node",{enumerable:!0,get:function(){return i.Node}}),Object.defineProperty(e,"isNode",{enumerable:!0,get:function(){return i.isNode}}),Object.defineProperty(e,"Relationship",{enumerable:!0,get:function(){return i.Relationship}}),Object.defineProperty(e,"isRelationship",{enumerable:!0,get:function(){return i.isRelationship}}),Object.defineProperty(e,"UnboundRelationship",{enumerable:!0,get:function(){return i.UnboundRelationship}}),Object.defineProperty(e,"isUnboundRelationship",{enumerable:!0,get:function(){return i.isUnboundRelationship}}),Object.defineProperty(e,"Path",{enumerable:!0,get:function(){return i.Path}}),Object.defineProperty(e,"isPath",{enumerable:!0,get:function(){return i.isPath}}),Object.defineProperty(e,"PathSegment",{enumerable:!0,get:function(){return i.PathSegment}}),Object.defineProperty(e,"isPathSegment",{enumerable:!0,get:function(){return i.isPathSegment}});var c=o(C0());e.Record=c.default;var l=I0();Object.defineProperty(e,"isPoint",{enumerable:!0,get:function(){return l.isPoint}}),Object.defineProperty(e,"Point",{enumerable:!0,get:function(){return l.Point}});var a=d(my());e.ResultSummary=a.default,Object.defineProperty(e,"queryType",{enumerable:!0,get:function(){return a.queryType}}),Object.defineProperty(e,"ServerInfo",{enumerable:!0,get:function(){return a.ServerInfo}}),Object.defineProperty(e,"Plan",{enumerable:!0,get:function(){return a.Plan}}),Object.defineProperty(e,"ProfiledPlan",{enumerable:!0,get:function(){return a.ProfiledPlan}}),Object.defineProperty(e,"QueryStatistics",{enumerable:!0,get:function(){return a.QueryStatistics}}),Object.defineProperty(e,"Stats",{enumerable:!0,get:function(){return a.Stats}});var _=d(by());e.Notification=_.default,Object.defineProperty(e,"GqlStatusObject",{enumerable:!0,get:function(){return _.GqlStatusObject}}),Object.defineProperty(e,"notificationCategory",{enumerable:!0,get:function(){return _.notificationCategory}}),Object.defineProperty(e,"notificationClassification",{enumerable:!0,get:function(){return _.notificationClassification}}),Object.defineProperty(e,"notificationSeverityLevel",{enumerable:!0,get:function(){return _.notificationSeverityLevel}});var p=D0();Object.defineProperty(e,"notificationFilterDisabledCategory",{enumerable:!0,get:function(){return p.notificationFilterDisabledCategory}}),Object.defineProperty(e,"notificationFilterDisabledClassification",{enumerable:!0,get:function(){return p.notificationFilterDisabledClassification}}),Object.defineProperty(e,"notificationFilterMinimumSeverityLevel",{enumerable:!0,get:function(){return p.notificationFilterMinimumSeverityLevel}});var m=o(Es());e.Result=m.default;var h=o(gy());e.EagerResult=h.default;var u=d(U0());e.ConnectionProvider=u.default,Object.defineProperty(e,"Releasable",{enumerable:!0,get:function(){return u.Releasable}});var v=o(q0());e.Connection=v.default;var y=o(Oy());e.Transaction=y.default;var s=o(wy());e.ManagedTransaction=s.default;var f=o(Ey());e.TransactionPromise=f.default;var b=o(Sy());e.Session=b.default;var E=d(rf()),w=E;e.Driver=E.default,e.driver=w;var T=o(Cy());e.auth=T.default;var R=Py();Object.defineProperty(e,"bookmarkManager",{enumerable:!0,get:function(){return R.bookmarkManager}});var L=x0();Object.defineProperty(e,"authTokenManagers",{enumerable:!0,get:function(){return L.authTokenManagers}}),Object.defineProperty(e,"staticAuthTokenManager",{enumerable:!0,get:function(){return L.staticAuthTokenManager}});var j=rf();Object.defineProperty(e,"routing",{enumerable:!0,get:function(){return j.routing}});var M=d(W0());e.types=M;var x=d(rn());e.json=x;var Z=o(Ry());e.resultTransformers=Z.default;var H=V0();Object.defineProperty(e,"clientCertificateProviders",{enumerable:!0,get:function(){return H.clientCertificateProviders}}),Object.defineProperty(e,"resolveCertificateProvider",{enumerable:!0,get:function(){return H.resolveCertificateProvider}});var K=d(Pu());e.internal=K;var G={SERVICE_UNAVAILABLE:n.SERVICE_UNAVAILABLE,SESSION_EXPIRED:n.SESSION_EXPIRED,PROTOCOL_ERROR:n.PROTOCOL_ERROR};e.error=G;var $={authTokenManagers:L.authTokenManagers,newError:n.newError,Neo4jError:n.Neo4jError,newGQLError:n.newGQLError,GQLError:n.GQLError,isRetriableError:n.isRetriableError,error:G,Integer:t.default,int:t.int,isInt:t.isInt,inSafeRange:t.inSafeRange,toNumber:t.toNumber,toString:t.toString,internal:K,isPoint:l.isPoint,Point:l.Point,Date:r.Date,DateTime:r.DateTime,Duration:r.Duration,isDate:r.isDate,isDateTime:r.isDateTime,isDuration:r.isDuration,isLocalDateTime:r.isLocalDateTime,isLocalTime:r.isLocalTime,isTime:r.isTime,LocalDateTime:r.LocalDateTime,LocalTime:r.LocalTime,Time:r.Time,Node:i.Node,isNode:i.isNode,Relationship:i.Relationship,isRelationship:i.isRelationship,UnboundRelationship:i.UnboundRelationship,isUnboundRelationship:i.isUnboundRelationship,Path:i.Path,isPath:i.isPath,PathSegment:i.PathSegment,isPathSegment:i.isPathSegment,Record:c.default,ResultSummary:a.default,queryType:a.queryType,ServerInfo:a.ServerInfo,Notification:_.default,GqlStatusObject:_.GqlStatusObject,Plan:a.Plan,ProfiledPlan:a.ProfiledPlan,QueryStatistics:a.QueryStatistics,Stats:a.Stats,Result:m.default,EagerResult:h.default,Transaction:y.default,ManagedTransaction:s.default,TransactionPromise:f.default,Session:b.default,Driver:E.default,Connection:v.default,Releasable:u.Releasable,types:M,driver:w,json:x,auth:T.default,bookmarkManager:R.bookmarkManager,routing:j.routing,resultTransformers:Z.default,notificationCategory:_.notificationCategory,notificationClassification:_.notificationClassification,notificationSeverityLevel:_.notificationSeverityLevel,notificationFilterDisabledCategory:p.notificationFilterDisabledCategory,notificationFilterDisabledClassification:p.notificationFilterDisabledClassification,notificationFilterMinimumSeverityLevel:p.notificationFilterMinimumSeverityLevel,clientCertificateProviders:H.clientCertificateProviders,resolveCertificateProvider:H.resolveCertificateProvider};e.default=$})(_r)),_r}var ci={},_n={},Ci={},Ii={},Ai={},cf;function Re(){if(cf)return Ai;cf=1,Object.defineProperty(Ai,"__esModule",{value:!0}),Ai.isFunction=void 0;function e(g){return typeof g=="function"}return Ai.isFunction=e,Ai}var Xe={},ji={},Mi={},sf;function Jn(){if(sf)return Mi;sf=1,Object.defineProperty(Mi,"__esModule",{value:!0}),Mi.createErrorClass=void 0;function e(g){var O=function(o){Error.call(o),o.stack=new Error().stack},d=g(O);return d.prototype=Object.create(Error.prototype),d.prototype.constructor=d,d}return Mi.createErrorClass=e,Mi}var lf;function Iy(){if(lf)return ji;lf=1,Object.defineProperty(ji,"__esModule",{value:!0}),ji.UnsubscriptionError=void 0;var e=Jn();return ji.UnsubscriptionError=e.createErrorClass(function(g){return function(d){g(this),this.message=d?d.length+` errors occurred during unsubscription:
|
|
3
|
+
`+d.map(function(o,n){return n+1+") "+o.toString()}).join(`
|
|
4
|
+
`):"",this.name="UnsubscriptionError",this.errors=d}}),ji}var Ni={},ff;function tn(){if(ff)return Ni;ff=1,Object.defineProperty(Ni,"__esModule",{value:!0}),Ni.arrRemove=void 0;function e(g,O){if(g){var d=g.indexOf(O);0<=d&&g.splice(d,1)}}return Ni.arrRemove=e,Ni}var df;function vr(){if(df)return Xe;df=1;var e=Xe&&Xe.__values||function(c){var l=typeof Symbol=="function"&&Symbol.iterator,a=l&&c[l],_=0;if(a)return a.call(c);if(c&&typeof c.length=="number")return{next:function(){return c&&_>=c.length&&(c=void 0),{value:c&&c[_++],done:!c}}};throw new TypeError(l?"Object is not iterable.":"Symbol.iterator is not defined.")},g=Xe&&Xe.__read||function(c,l){var a=typeof Symbol=="function"&&c[Symbol.iterator];if(!a)return c;var _=a.call(c),p,m=[],h;try{for(;(l===void 0||l-- >0)&&!(p=_.next()).done;)m.push(p.value)}catch(u){h={error:u}}finally{try{p&&!p.done&&(a=_.return)&&a.call(_)}finally{if(h)throw h.error}}return m},O=Xe&&Xe.__spreadArray||function(c,l){for(var a=0,_=l.length,p=c.length;a<_;a++,p++)c[p]=l[a];return c};Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.isSubscription=Xe.EMPTY_SUBSCRIPTION=Xe.Subscription=void 0;var d=Re(),o=Iy(),n=tn(),t=(function(){function c(l){this.initialTeardown=l,this.closed=!1,this._parentage=null,this._finalizers=null}return c.prototype.unsubscribe=function(){var l,a,_,p,m;if(!this.closed){this.closed=!0;var h=this._parentage;if(h)if(this._parentage=null,Array.isArray(h))try{for(var u=e(h),v=u.next();!v.done;v=u.next()){var y=v.value;y.remove(this)}}catch(T){l={error:T}}finally{try{v&&!v.done&&(a=u.return)&&a.call(u)}finally{if(l)throw l.error}}else h.remove(this);var s=this.initialTeardown;if(d.isFunction(s))try{s()}catch(T){m=T instanceof o.UnsubscriptionError?T.errors:[T]}var f=this._finalizers;if(f){this._finalizers=null;try{for(var b=e(f),E=b.next();!E.done;E=b.next()){var w=E.value;try{i(w)}catch(T){m=m??[],T instanceof o.UnsubscriptionError?m=O(O([],g(m)),g(T.errors)):m.push(T)}}}catch(T){_={error:T}}finally{try{E&&!E.done&&(p=b.return)&&p.call(b)}finally{if(_)throw _.error}}}if(m)throw new o.UnsubscriptionError(m)}},c.prototype.add=function(l){var a;if(l&&l!==this)if(this.closed)i(l);else{if(l instanceof c){if(l.closed||l._hasParent(this))return;l._addParent(this)}(this._finalizers=(a=this._finalizers)!==null&&a!==void 0?a:[]).push(l)}},c.prototype._hasParent=function(l){var a=this._parentage;return a===l||Array.isArray(a)&&a.includes(l)},c.prototype._addParent=function(l){var a=this._parentage;this._parentage=Array.isArray(a)?(a.push(l),a):a?[a,l]:l},c.prototype._removeParent=function(l){var a=this._parentage;a===l?this._parentage=null:Array.isArray(a)&&n.arrRemove(a,l)},c.prototype.remove=function(l){var a=this._finalizers;a&&n.arrRemove(a,l),l instanceof c&&l._removeParent(this)},c.EMPTY=(function(){var l=new c;return l.closed=!0,l})(),c})();Xe.Subscription=t,Xe.EMPTY_SUBSCRIPTION=t.EMPTY;function r(c){return c instanceof t||c&&"closed"in c&&d.isFunction(c.remove)&&d.isFunction(c.add)&&d.isFunction(c.unsubscribe)}Xe.isSubscription=r;function i(c){d.isFunction(c)?c():c.unsubscribe()}return Xe}var ki={},hf;function Ru(){return hf||(hf=1,Object.defineProperty(ki,"__esModule",{value:!0}),ki.config=void 0,ki.config={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1}),ki}var Li={},pn={},vf;function Ay(){return vf||(vf=1,(function(e){var g=pn&&pn.__read||function(d,o){var n=typeof Symbol=="function"&&d[Symbol.iterator];if(!n)return d;var t=n.call(d),r,i=[],c;try{for(;(o===void 0||o-- >0)&&!(r=t.next()).done;)i.push(r.value)}catch(l){c={error:l}}finally{try{r&&!r.done&&(n=t.return)&&n.call(t)}finally{if(c)throw c.error}}return i},O=pn&&pn.__spreadArray||function(d,o){for(var n=0,t=o.length,r=d.length;n<t;n++,r++)d[r]=o[n];return d};Object.defineProperty(e,"__esModule",{value:!0}),e.timeoutProvider=void 0,e.timeoutProvider={setTimeout:function(d,o){for(var n=[],t=2;t<arguments.length;t++)n[t-2]=arguments[t];var r=e.timeoutProvider.delegate;return r?.setTimeout?r.setTimeout.apply(r,O([d,o],g(n))):setTimeout.apply(void 0,O([d,o],g(n)))},clearTimeout:function(d){var o=e.timeoutProvider.delegate;return(o?.clearTimeout||clearTimeout)(d)},delegate:void 0}})(pn)),pn}var _f;function jy(){if(_f)return Li;_f=1,Object.defineProperty(Li,"__esModule",{value:!0}),Li.reportUnhandledError=void 0;var e=Ru(),g=Ay();function O(d){g.timeoutProvider.setTimeout(function(){var o=e.config.onUnhandledError;if(o)o(d);else throw d})}return Li.reportUnhandledError=O,Li}var Di={},pf;function ze(){if(pf)return Di;pf=1,Object.defineProperty(Di,"__esModule",{value:!0}),Di.noop=void 0;function e(){}return Di.noop=e,Di}var mr={},yf;function H0(){if(yf)return mr;yf=1,Object.defineProperty(mr,"__esModule",{value:!0}),mr.createNotification=mr.nextNotification=mr.errorNotification=mr.COMPLETE_NOTIFICATION=void 0,mr.COMPLETE_NOTIFICATION=(function(){return O("C",void 0,void 0)})();function e(d){return O("E",void 0,d)}mr.errorNotification=e;function g(d){return O("N",d,void 0)}mr.nextNotification=g;function O(d,o,n){return{kind:d,value:o,error:n}}return mr.createNotification=O,mr}var yn={},bf;function Ts(){if(bf)return yn;bf=1,Object.defineProperty(yn,"__esModule",{value:!0}),yn.captureError=yn.errorContext=void 0;var e=Ru(),g=null;function O(o){if(e.config.useDeprecatedSynchronousErrorHandling){var n=!g;if(n&&(g={errorThrown:!1,error:null}),o(),n){var t=g,r=t.errorThrown,i=t.error;if(g=null,r)throw i}}else o()}yn.errorContext=O;function d(o){e.config.useDeprecatedSynchronousErrorHandling&&g&&(g.errorThrown=!0,g.error=o)}return yn.captureError=d,yn}var mf;function Cu(){return mf||(mf=1,(function(e){var g=Ii&&Ii.__extends||(function(){var y=function(s,f){return y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,E){b.__proto__=E}||function(b,E){for(var w in E)Object.prototype.hasOwnProperty.call(E,w)&&(b[w]=E[w])},y(s,f)};return function(s,f){if(typeof f!="function"&&f!==null)throw new TypeError("Class extends value "+String(f)+" is not a constructor or null");y(s,f);function b(){this.constructor=s}s.prototype=f===null?Object.create(f):(b.prototype=f.prototype,new b)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.EMPTY_OBSERVER=e.SafeSubscriber=e.Subscriber=void 0;var O=Re(),d=vr(),o=Ru(),n=jy(),t=ze(),r=H0(),i=Ay(),c=Ts(),l=(function(y){g(s,y);function s(f){var b=y.call(this)||this;return b.isStopped=!1,f?(b.destination=f,d.isSubscription(f)&&f.add(b)):b.destination=e.EMPTY_OBSERVER,b}return s.create=function(f,b,E){return new m(f,b,E)},s.prototype.next=function(f){this.isStopped?v(r.nextNotification(f),this):this._next(f)},s.prototype.error=function(f){this.isStopped?v(r.errorNotification(f),this):(this.isStopped=!0,this._error(f))},s.prototype.complete=function(){this.isStopped?v(r.COMPLETE_NOTIFICATION,this):(this.isStopped=!0,this._complete())},s.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,y.prototype.unsubscribe.call(this),this.destination=null)},s.prototype._next=function(f){this.destination.next(f)},s.prototype._error=function(f){try{this.destination.error(f)}finally{this.unsubscribe()}},s.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},s})(d.Subscription);e.Subscriber=l;var a=Function.prototype.bind;function _(y,s){return a.call(y,s)}var p=(function(){function y(s){this.partialObserver=s}return y.prototype.next=function(s){var f=this.partialObserver;if(f.next)try{f.next(s)}catch(b){h(b)}},y.prototype.error=function(s){var f=this.partialObserver;if(f.error)try{f.error(s)}catch(b){h(b)}else h(s)},y.prototype.complete=function(){var s=this.partialObserver;if(s.complete)try{s.complete()}catch(f){h(f)}},y})(),m=(function(y){g(s,y);function s(f,b,E){var w=y.call(this)||this,T;if(O.isFunction(f)||!f)T={next:f??void 0,error:b??void 0,complete:E??void 0};else{var R;w&&o.config.useDeprecatedNextContext?(R=Object.create(f),R.unsubscribe=function(){return w.unsubscribe()},T={next:f.next&&_(f.next,R),error:f.error&&_(f.error,R),complete:f.complete&&_(f.complete,R)}):T=f}return w.destination=new p(T),w}return s})(l);e.SafeSubscriber=m;function h(y){o.config.useDeprecatedSynchronousErrorHandling?c.captureError(y):n.reportUnhandledError(y)}function u(y){throw y}function v(y,s){var f=o.config.onStoppedNotification;f&&i.timeoutProvider.setTimeout(function(){return f(y,s)})}e.EMPTY_OBSERVER={closed:!0,next:t.noop,error:u,complete:t.noop}})(Ii)),Ii}var Ui={},gf;function cc(){return gf||(gf=1,Object.defineProperty(Ui,"__esModule",{value:!0}),Ui.observable=void 0,Ui.observable=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})()),Ui}var bn={},qi={},Of;function $e(){if(Of)return qi;Of=1,Object.defineProperty(qi,"__esModule",{value:!0}),qi.identity=void 0;function e(g){return g}return qi.identity=e,qi}var wf;function sc(){if(wf)return bn;wf=1,Object.defineProperty(bn,"__esModule",{value:!0}),bn.pipeFromArray=bn.pipe=void 0;var e=$e();function g(){for(var d=[],o=0;o<arguments.length;o++)d[o]=arguments[o];return O(d)}bn.pipe=g;function O(d){return d.length===0?e.identity:d.length===1?d[0]:function(n){return d.reduce(function(t,r){return r(t)},n)}}return bn.pipeFromArray=O,bn}var Ef;function Ie(){if(Ef)return Ci;Ef=1,Object.defineProperty(Ci,"__esModule",{value:!0}),Ci.Observable=void 0;var e=Cu(),g=vr(),O=cc(),d=sc(),o=Ru(),n=Re(),t=Ts(),r=(function(){function a(_){_&&(this._subscribe=_)}return a.prototype.lift=function(_){var p=new a;return p.source=this,p.operator=_,p},a.prototype.subscribe=function(_,p,m){var h=this,u=l(_)?_:new e.SafeSubscriber(_,p,m);return t.errorContext(function(){var v=h,y=v.operator,s=v.source;u.add(y?y.call(u,s):s?h._subscribe(u):h._trySubscribe(u))}),u},a.prototype._trySubscribe=function(_){try{return this._subscribe(_)}catch(p){_.error(p)}},a.prototype.forEach=function(_,p){var m=this;return p=i(p),new p(function(h,u){var v=new e.SafeSubscriber({next:function(y){try{_(y)}catch(s){u(s),v.unsubscribe()}},error:u,complete:h});m.subscribe(v)})},a.prototype._subscribe=function(_){var p;return(p=this.source)===null||p===void 0?void 0:p.subscribe(_)},a.prototype[O.observable]=function(){return this},a.prototype.pipe=function(){for(var _=[],p=0;p<arguments.length;p++)_[p]=arguments[p];return d.pipeFromArray(_)(this)},a.prototype.toPromise=function(_){var p=this;return _=i(_),new _(function(m,h){var u;p.subscribe(function(v){return u=v},function(v){return h(v)},function(){return m(u)})})},a.create=function(_){return new a(_)},a})();Ci.Observable=r;function i(a){var _;return(_=a??o.config.Promise)!==null&&_!==void 0?_:Promise}function c(a){return a&&n.isFunction(a.next)&&n.isFunction(a.error)&&n.isFunction(a.complete)}function l(a){return a&&a instanceof e.Subscriber||c(a)&&g.isSubscription(a)}return Ci}var mn={},Fi={},gn={},Tf;function fe(){if(Tf)return gn;Tf=1,Object.defineProperty(gn,"__esModule",{value:!0}),gn.operate=gn.hasLift=void 0;var e=Re();function g(d){return e.isFunction(d?.lift)}gn.hasLift=g;function O(d){return function(o){if(g(o))return o.lift(function(n){try{return d(n,this)}catch(t){this.error(t)}});throw new TypeError("Unable to lift unknown Observable type")}}return gn.operate=O,gn}var Jr={},Sf;function he(){if(Sf)return Jr;Sf=1;var e=Jr&&Jr.__extends||(function(){var o=function(n,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var c in i)Object.prototype.hasOwnProperty.call(i,c)&&(r[c]=i[c])},o(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");o(n,t);function r(){this.constructor=n}n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}})();Object.defineProperty(Jr,"__esModule",{value:!0}),Jr.OperatorSubscriber=Jr.createOperatorSubscriber=void 0;var g=Cu();function O(o,n,t,r,i){return new d(o,n,t,r,i)}Jr.createOperatorSubscriber=O;var d=(function(o){e(n,o);function n(t,r,i,c,l,a){var _=o.call(this,t)||this;return _.onFinalize=l,_.shouldUnsubscribe=a,_._next=r?function(p){try{r(p)}catch(m){t.error(m)}}:o.prototype._next,_._error=c?function(p){try{c(p)}catch(m){t.error(m)}finally{this.unsubscribe()}}:o.prototype._error,_._complete=i?function(){try{i()}catch(p){t.error(p)}finally{this.unsubscribe()}}:o.prototype._complete,_}return n.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;o.prototype.unsubscribe.call(this),!r&&((t=this.onFinalize)===null||t===void 0||t.call(this))}},n})(g.Subscriber);return Jr.OperatorSubscriber=d,Jr}var Pf;function Ss(){if(Pf)return Fi;Pf=1,Object.defineProperty(Fi,"__esModule",{value:!0}),Fi.refCount=void 0;var e=fe(),g=he();function O(){return e.operate(function(d,o){var n=null;d._refCount++;var t=g.createOperatorSubscriber(o,void 0,void 0,void 0,function(){if(!d||d._refCount<=0||0<--d._refCount){n=null;return}var r=d._connection,i=n;n=null,r&&(!i||r===i)&&r.unsubscribe(),o.unsubscribe()});d.subscribe(t),t.closed||(n=d.connect())})}return Fi.refCount=O,Fi}var Rf;function lc(){if(Rf)return mn;Rf=1;var e=mn&&mn.__extends||(function(){var r=function(i,c){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,a){l.__proto__=a}||function(l,a){for(var _ in a)Object.prototype.hasOwnProperty.call(a,_)&&(l[_]=a[_])},r(i,c)};return function(i,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");r(i,c);function l(){this.constructor=i}i.prototype=c===null?Object.create(c):(l.prototype=c.prototype,new l)}})();Object.defineProperty(mn,"__esModule",{value:!0}),mn.ConnectableObservable=void 0;var g=Ie(),O=vr(),d=Ss(),o=he(),n=fe(),t=(function(r){e(i,r);function i(c,l){var a=r.call(this)||this;return a.source=c,a.subjectFactory=l,a._subject=null,a._refCount=0,a._connection=null,n.hasLift(c)&&(a.lift=c.lift),a}return i.prototype._subscribe=function(c){return this.getSubject().subscribe(c)},i.prototype.getSubject=function(){var c=this._subject;return(!c||c.isStopped)&&(this._subject=this.subjectFactory()),this._subject},i.prototype._teardown=function(){this._refCount=0;var c=this._connection;this._subject=this._connection=null,c?.unsubscribe()},i.prototype.connect=function(){var c=this,l=this._connection;if(!l){l=this._connection=new O.Subscription;var a=this.getSubject();l.add(this.source.subscribe(o.createOperatorSubscriber(a,void 0,function(){c._teardown(),a.complete()},function(_){c._teardown(),a.error(_)},function(){return c._teardown()}))),l.closed&&(this._connection=null,l=O.Subscription.EMPTY)}return l},i.prototype.refCount=function(){return d.refCount()(this)},i})(g.Observable);return mn.ConnectableObservable=t,mn}var Bi={},os={},Cf;function z0(){return Cf||(Cf=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.performanceTimestampProvider=void 0,e.performanceTimestampProvider={now:function(){return(e.performanceTimestampProvider.delegate||performance).now()},delegate:void 0}})(os)),os}var On={},If;function My(){return If||(If=1,(function(e){var g=On&&On.__read||function(o,n){var t=typeof Symbol=="function"&&o[Symbol.iterator];if(!t)return o;var r=t.call(o),i,c=[],l;try{for(;(n===void 0||n-- >0)&&!(i=r.next()).done;)c.push(i.value)}catch(a){l={error:a}}finally{try{i&&!i.done&&(t=r.return)&&t.call(r)}finally{if(l)throw l.error}}return c},O=On&&On.__spreadArray||function(o,n){for(var t=0,r=n.length,i=o.length;t<r;t++,i++)o[i]=n[t];return o};Object.defineProperty(e,"__esModule",{value:!0}),e.animationFrameProvider=void 0;var d=vr();e.animationFrameProvider={schedule:function(o){var n=requestAnimationFrame,t=cancelAnimationFrame,r=e.animationFrameProvider.delegate;r&&(n=r.requestAnimationFrame,t=r.cancelAnimationFrame);var i=n(function(c){t=void 0,o(c)});return new d.Subscription(function(){return t?.(i)})},requestAnimationFrame:function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var t=e.animationFrameProvider.delegate;return(t?.requestAnimationFrame||requestAnimationFrame).apply(void 0,O([],g(o)))},cancelAnimationFrame:function(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var t=e.animationFrameProvider.delegate;return(t?.cancelAnimationFrame||cancelAnimationFrame).apply(void 0,O([],g(o)))},delegate:void 0}})(On)),On}var Af;function $0(){if(Af)return Bi;Af=1,Object.defineProperty(Bi,"__esModule",{value:!0}),Bi.animationFrames=void 0;var e=Ie(),g=z0(),O=My();function d(t){return t?o(t):n}Bi.animationFrames=d;function o(t){return new e.Observable(function(r){var i=t||g.performanceTimestampProvider,c=i.now(),l=0,a=function(){r.closed||(l=O.animationFrameProvider.requestAnimationFrame(function(_){l=0;var p=i.now();r.next({timestamp:t?p:_,elapsed:p-c}),a()}))};return a(),function(){l&&O.animationFrameProvider.cancelAnimationFrame(l)}})}var n=o();return Bi}var gr={},xi={},jf;function Ny(){if(jf)return xi;jf=1,Object.defineProperty(xi,"__esModule",{value:!0}),xi.ObjectUnsubscribedError=void 0;var e=Jn();return xi.ObjectUnsubscribedError=e.createErrorClass(function(g){return function(){g(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),xi}var Mf;function Ge(){if(Mf)return gr;Mf=1;var e=gr&&gr.__extends||(function(){var c=function(l,a){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,p){_.__proto__=p}||function(_,p){for(var m in p)Object.prototype.hasOwnProperty.call(p,m)&&(_[m]=p[m])},c(l,a)};return function(l,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");c(l,a);function _(){this.constructor=l}l.prototype=a===null?Object.create(a):(_.prototype=a.prototype,new _)}})(),g=gr&&gr.__values||function(c){var l=typeof Symbol=="function"&&Symbol.iterator,a=l&&c[l],_=0;if(a)return a.call(c);if(c&&typeof c.length=="number")return{next:function(){return c&&_>=c.length&&(c=void 0),{value:c&&c[_++],done:!c}}};throw new TypeError(l?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(gr,"__esModule",{value:!0}),gr.AnonymousSubject=gr.Subject=void 0;var O=Ie(),d=vr(),o=Ny(),n=tn(),t=Ts(),r=(function(c){e(l,c);function l(){var a=c.call(this)||this;return a.closed=!1,a.currentObservers=null,a.observers=[],a.isStopped=!1,a.hasError=!1,a.thrownError=null,a}return l.prototype.lift=function(a){var _=new i(this,this);return _.operator=a,_},l.prototype._throwIfClosed=function(){if(this.closed)throw new o.ObjectUnsubscribedError},l.prototype.next=function(a){var _=this;t.errorContext(function(){var p,m;if(_._throwIfClosed(),!_.isStopped){_.currentObservers||(_.currentObservers=Array.from(_.observers));try{for(var h=g(_.currentObservers),u=h.next();!u.done;u=h.next()){var v=u.value;v.next(a)}}catch(y){p={error:y}}finally{try{u&&!u.done&&(m=h.return)&&m.call(h)}finally{if(p)throw p.error}}}})},l.prototype.error=function(a){var _=this;t.errorContext(function(){if(_._throwIfClosed(),!_.isStopped){_.hasError=_.isStopped=!0,_.thrownError=a;for(var p=_.observers;p.length;)p.shift().error(a)}})},l.prototype.complete=function(){var a=this;t.errorContext(function(){if(a._throwIfClosed(),!a.isStopped){a.isStopped=!0;for(var _=a.observers;_.length;)_.shift().complete()}})},l.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(l.prototype,"observed",{get:function(){var a;return((a=this.observers)===null||a===void 0?void 0:a.length)>0},enumerable:!1,configurable:!0}),l.prototype._trySubscribe=function(a){return this._throwIfClosed(),c.prototype._trySubscribe.call(this,a)},l.prototype._subscribe=function(a){return this._throwIfClosed(),this._checkFinalizedStatuses(a),this._innerSubscribe(a)},l.prototype._innerSubscribe=function(a){var _=this,p=this,m=p.hasError,h=p.isStopped,u=p.observers;return m||h?d.EMPTY_SUBSCRIPTION:(this.currentObservers=null,u.push(a),new d.Subscription(function(){_.currentObservers=null,n.arrRemove(u,a)}))},l.prototype._checkFinalizedStatuses=function(a){var _=this,p=_.hasError,m=_.thrownError,h=_.isStopped;p?a.error(m):h&&a.complete()},l.prototype.asObservable=function(){var a=new O.Observable;return a.source=this,a},l.create=function(a,_){return new i(a,_)},l})(O.Observable);gr.Subject=r;var i=(function(c){e(l,c);function l(a,_){var p=c.call(this)||this;return p.destination=a,p.source=_,p}return l.prototype.next=function(a){var _,p;(p=(_=this.destination)===null||_===void 0?void 0:_.next)===null||p===void 0||p.call(_,a)},l.prototype.error=function(a){var _,p;(p=(_=this.destination)===null||_===void 0?void 0:_.error)===null||p===void 0||p.call(_,a)},l.prototype.complete=function(){var a,_;(_=(a=this.destination)===null||a===void 0?void 0:a.complete)===null||_===void 0||_.call(a)},l.prototype._subscribe=function(a){var _,p;return(p=(_=this.source)===null||_===void 0?void 0:_.subscribe(a))!==null&&p!==void 0?p:d.EMPTY_SUBSCRIPTION},l})(r);return gr.AnonymousSubject=i,gr}var wn={},Nf;function ky(){if(Nf)return wn;Nf=1;var e=wn&&wn.__extends||(function(){var d=function(o,n){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])},d(o,n)};return function(o,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");d(o,n);function t(){this.constructor=o}o.prototype=n===null?Object.create(n):(t.prototype=n.prototype,new t)}})();Object.defineProperty(wn,"__esModule",{value:!0}),wn.BehaviorSubject=void 0;var g=Ge(),O=(function(d){e(o,d);function o(n){var t=d.call(this)||this;return t._value=n,t}return Object.defineProperty(o.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),o.prototype._subscribe=function(n){var t=d.prototype._subscribe.call(this,n);return!t.closed&&n.next(this._value),t},o.prototype.getValue=function(){var n=this,t=n.hasError,r=n.thrownError,i=n._value;if(t)throw r;return this._throwIfClosed(),i},o.prototype.next=function(n){d.prototype.next.call(this,this._value=n)},o})(g.Subject);return wn.BehaviorSubject=O,wn}var En={},as={},kf;function Ps(){return kf||(kf=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.dateTimestampProvider=void 0,e.dateTimestampProvider={now:function(){return(e.dateTimestampProvider.delegate||Date).now()},delegate:void 0}})(as)),as}var Lf;function Rs(){if(Lf)return En;Lf=1;var e=En&&En.__extends||(function(){var o=function(n,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var c in i)Object.prototype.hasOwnProperty.call(i,c)&&(r[c]=i[c])},o(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");o(n,t);function r(){this.constructor=n}n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}})();Object.defineProperty(En,"__esModule",{value:!0}),En.ReplaySubject=void 0;var g=Ge(),O=Ps(),d=(function(o){e(n,o);function n(t,r,i){t===void 0&&(t=1/0),r===void 0&&(r=1/0),i===void 0&&(i=O.dateTimestampProvider);var c=o.call(this)||this;return c._bufferSize=t,c._windowTime=r,c._timestampProvider=i,c._buffer=[],c._infiniteTimeWindow=!0,c._infiniteTimeWindow=r===1/0,c._bufferSize=Math.max(1,t),c._windowTime=Math.max(1,r),c}return n.prototype.next=function(t){var r=this,i=r.isStopped,c=r._buffer,l=r._infiniteTimeWindow,a=r._timestampProvider,_=r._windowTime;i||(c.push(t),!l&&c.push(a.now()+_)),this._trimBuffer(),o.prototype.next.call(this,t)},n.prototype._subscribe=function(t){this._throwIfClosed(),this._trimBuffer();for(var r=this._innerSubscribe(t),i=this,c=i._infiniteTimeWindow,l=i._buffer,a=l.slice(),_=0;_<a.length&&!t.closed;_+=c?1:2)t.next(a[_]);return this._checkFinalizedStatuses(t),r},n.prototype._trimBuffer=function(){var t=this,r=t._bufferSize,i=t._timestampProvider,c=t._buffer,l=t._infiniteTimeWindow,a=(l?1:2)*r;if(r<1/0&&a<c.length&&c.splice(0,c.length-a),!l){for(var _=i.now(),p=0,m=1;m<c.length&&c[m]<=_;m+=2)p=m;p&&c.splice(0,p+1)}},n})(g.Subject);return En.ReplaySubject=d,En}var Tn={},Df;function Cs(){if(Df)return Tn;Df=1;var e=Tn&&Tn.__extends||(function(){var d=function(o,n){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])},d(o,n)};return function(o,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");d(o,n);function t(){this.constructor=o}o.prototype=n===null?Object.create(n):(t.prototype=n.prototype,new t)}})();Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.AsyncSubject=void 0;var g=Ge(),O=(function(d){e(o,d);function o(){var n=d!==null&&d.apply(this,arguments)||this;return n._value=null,n._hasValue=!1,n._isComplete=!1,n}return o.prototype._checkFinalizedStatuses=function(n){var t=this,r=t.hasError,i=t._hasValue,c=t._value,l=t.thrownError,a=t.isStopped,_=t._isComplete;r?n.error(l):(a||_)&&(i&&n.next(c),n.complete())},o.prototype.next=function(n){this.isStopped||(this._value=n,this._hasValue=!0)},o.prototype.complete=function(){var n=this,t=n._hasValue,r=n._value,i=n._isComplete;i||(this._isComplete=!0,t&&d.prototype.next.call(this,r),d.prototype.complete.call(this))},o})(g.Subject);return Tn.AsyncSubject=O,Tn}var us={},Sn={},Pn={},Rn={},Uf;function G0(){if(Uf)return Rn;Uf=1;var e=Rn&&Rn.__extends||(function(){var d=function(o,n){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])},d(o,n)};return function(o,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");d(o,n);function t(){this.constructor=o}o.prototype=n===null?Object.create(n):(t.prototype=n.prototype,new t)}})();Object.defineProperty(Rn,"__esModule",{value:!0}),Rn.Action=void 0;var g=vr(),O=(function(d){e(o,d);function o(n,t){return d.call(this)||this}return o.prototype.schedule=function(n,t){return this},o})(g.Subscription);return Rn.Action=O,Rn}var Cn={},qf;function Y0(){return qf||(qf=1,(function(e){var g=Cn&&Cn.__read||function(d,o){var n=typeof Symbol=="function"&&d[Symbol.iterator];if(!n)return d;var t=n.call(d),r,i=[],c;try{for(;(o===void 0||o-- >0)&&!(r=t.next()).done;)i.push(r.value)}catch(l){c={error:l}}finally{try{r&&!r.done&&(n=t.return)&&n.call(t)}finally{if(c)throw c.error}}return i},O=Cn&&Cn.__spreadArray||function(d,o){for(var n=0,t=o.length,r=d.length;n<t;n++,r++)d[r]=o[n];return d};Object.defineProperty(e,"__esModule",{value:!0}),e.intervalProvider=void 0,e.intervalProvider={setInterval:function(d,o){for(var n=[],t=2;t<arguments.length;t++)n[t-2]=arguments[t];var r=e.intervalProvider.delegate;return r?.setInterval?r.setInterval.apply(r,O([d,o],g(n))):setInterval.apply(void 0,O([d,o],g(n)))},clearInterval:function(d){var o=e.intervalProvider.delegate;return(o?.clearInterval||clearInterval)(d)},delegate:void 0}})(Cn)),Cn}var Ff;function Iu(){if(Ff)return Pn;Ff=1;var e=Pn&&Pn.__extends||(function(){var n=function(t,r){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,c){i.__proto__=c}||function(i,c){for(var l in c)Object.prototype.hasOwnProperty.call(c,l)&&(i[l]=c[l])},n(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");n(t,r);function i(){this.constructor=t}t.prototype=r===null?Object.create(r):(i.prototype=r.prototype,new i)}})();Object.defineProperty(Pn,"__esModule",{value:!0}),Pn.AsyncAction=void 0;var g=G0(),O=Y0(),d=tn(),o=(function(n){e(t,n);function t(r,i){var c=n.call(this,r,i)||this;return c.scheduler=r,c.work=i,c.pending=!1,c}return t.prototype.schedule=function(r,i){var c;if(i===void 0&&(i=0),this.closed)return this;this.state=r;var l=this.id,a=this.scheduler;return l!=null&&(this.id=this.recycleAsyncId(a,l,i)),this.pending=!0,this.delay=i,this.id=(c=this.id)!==null&&c!==void 0?c:this.requestAsyncId(a,this.id,i),this},t.prototype.requestAsyncId=function(r,i,c){return c===void 0&&(c=0),O.intervalProvider.setInterval(r.flush.bind(r,this),c)},t.prototype.recycleAsyncId=function(r,i,c){if(c===void 0&&(c=0),c!=null&&this.delay===c&&this.pending===!1)return i;i!=null&&O.intervalProvider.clearInterval(i)},t.prototype.execute=function(r,i){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var c=this._execute(r,i);if(c)return c;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(r,i){var c=!1,l;try{this.work(r)}catch(a){c=!0,l=a||new Error("Scheduled action threw falsy error")}if(c)return this.unsubscribe(),l},t.prototype.unsubscribe=function(){if(!this.closed){var r=this,i=r.id,c=r.scheduler,l=c.actions;this.work=this.state=this.scheduler=null,this.pending=!1,d.arrRemove(l,this),i!=null&&(this.id=this.recycleAsyncId(c,i,null)),this.delay=null,n.prototype.unsubscribe.call(this)}},t})(g.Action);return Pn.AsyncAction=o,Pn}var In={},An={},Bf;function K0(){if(Bf)return An;Bf=1,Object.defineProperty(An,"__esModule",{value:!0}),An.TestTools=An.Immediate=void 0;var e=1,g,O={};function d(o){return o in O?(delete O[o],!0):!1}return An.Immediate={setImmediate:function(o){var n=e++;return O[n]=!0,g||(g=Promise.resolve()),g.then(function(){return d(n)&&o()}),n},clearImmediate:function(o){d(o)}},An.TestTools={pending:function(){return Object.keys(O).length}},An}var xf;function Z0(){return xf||(xf=1,(function(e){var g=In&&In.__read||function(t,r){var i=typeof Symbol=="function"&&t[Symbol.iterator];if(!i)return t;var c=i.call(t),l,a=[],_;try{for(;(r===void 0||r-- >0)&&!(l=c.next()).done;)a.push(l.value)}catch(p){_={error:p}}finally{try{l&&!l.done&&(i=c.return)&&i.call(c)}finally{if(_)throw _.error}}return a},O=In&&In.__spreadArray||function(t,r){for(var i=0,c=r.length,l=t.length;i<c;i++,l++)t[l]=r[i];return t};Object.defineProperty(e,"__esModule",{value:!0}),e.immediateProvider=void 0;var d=K0(),o=d.Immediate.setImmediate,n=d.Immediate.clearImmediate;e.immediateProvider={setImmediate:function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var i=e.immediateProvider.delegate;return(i?.setImmediate||o).apply(void 0,O([],g(t)))},clearImmediate:function(t){var r=e.immediateProvider.delegate;return(r?.clearImmediate||n)(t)},delegate:void 0}})(In)),In}var Wf;function Q0(){if(Wf)return Sn;Wf=1;var e=Sn&&Sn.__extends||(function(){var o=function(n,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var c in i)Object.prototype.hasOwnProperty.call(i,c)&&(r[c]=i[c])},o(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");o(n,t);function r(){this.constructor=n}n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}})();Object.defineProperty(Sn,"__esModule",{value:!0}),Sn.AsapAction=void 0;var g=Iu(),O=Z0(),d=(function(o){e(n,o);function n(t,r){var i=o.call(this,t,r)||this;return i.scheduler=t,i.work=r,i}return n.prototype.requestAsyncId=function(t,r,i){return i===void 0&&(i=0),i!==null&&i>0?o.prototype.requestAsyncId.call(this,t,r,i):(t.actions.push(this),t._scheduled||(t._scheduled=O.immediateProvider.setImmediate(t.flush.bind(t,void 0))))},n.prototype.recycleAsyncId=function(t,r,i){var c;if(i===void 0&&(i=0),i!=null?i>0:this.delay>0)return o.prototype.recycleAsyncId.call(this,t,r,i);var l=t.actions;r!=null&&((c=l[l.length-1])===null||c===void 0?void 0:c.id)!==r&&(O.immediateProvider.clearImmediate(r),t._scheduled===r&&(t._scheduled=void 0))},n})(g.AsyncAction);return Sn.AsapAction=d,Sn}var jn={},Mn={},Wi={},Vf;function Ly(){if(Vf)return Wi;Vf=1,Object.defineProperty(Wi,"__esModule",{value:!0}),Wi.Scheduler=void 0;var e=Ps(),g=(function(){function O(d,o){o===void 0&&(o=O.now),this.schedulerActionCtor=d,this.now=o}return O.prototype.schedule=function(d,o,n){return o===void 0&&(o=0),new this.schedulerActionCtor(this,d).schedule(n,o)},O.now=e.dateTimestampProvider.now,O})();return Wi.Scheduler=g,Wi}var Hf;function Au(){if(Hf)return Mn;Hf=1;var e=Mn&&Mn.__extends||(function(){var d=function(o,n){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])},d(o,n)};return function(o,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");d(o,n);function t(){this.constructor=o}o.prototype=n===null?Object.create(n):(t.prototype=n.prototype,new t)}})();Object.defineProperty(Mn,"__esModule",{value:!0}),Mn.AsyncScheduler=void 0;var g=Ly(),O=(function(d){e(o,d);function o(n,t){t===void 0&&(t=g.Scheduler.now);var r=d.call(this,n,t)||this;return r.actions=[],r._active=!1,r}return o.prototype.flush=function(n){var t=this.actions;if(this._active){t.push(n);return}var r;this._active=!0;do if(r=n.execute(n.state,n.delay))break;while(n=t.shift());if(this._active=!1,r){for(;n=t.shift();)n.unsubscribe();throw r}},o})(g.Scheduler);return Mn.AsyncScheduler=O,Mn}var zf;function X0(){if(zf)return jn;zf=1;var e=jn&&jn.__extends||(function(){var d=function(o,n){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])},d(o,n)};return function(o,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");d(o,n);function t(){this.constructor=o}o.prototype=n===null?Object.create(n):(t.prototype=n.prototype,new t)}})();Object.defineProperty(jn,"__esModule",{value:!0}),jn.AsapScheduler=void 0;var g=Au(),O=(function(d){e(o,d);function o(){return d!==null&&d.apply(this,arguments)||this}return o.prototype.flush=function(n){this._active=!0;var t=this._scheduled;this._scheduled=void 0;var r=this.actions,i;n=n||r.shift();do if(i=n.execute(n.state,n.delay))break;while((n=r[0])&&n.id===t&&r.shift());if(this._active=!1,i){for(;(n=r[0])&&n.id===t&&r.shift();)n.unsubscribe();throw i}},o})(g.AsyncScheduler);return jn.AsapScheduler=O,jn}var $f;function J0(){return $f||($f=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.asap=e.asapScheduler=void 0;var g=Q0(),O=X0();e.asapScheduler=new O.AsapScheduler(g.AsapAction),e.asap=e.asapScheduler})(us)),us}var cs={},Gf;function sr(){return Gf||(Gf=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.async=e.asyncScheduler=void 0;var g=Iu(),O=Au();e.asyncScheduler=new O.AsyncScheduler(g.AsyncAction),e.async=e.asyncScheduler})(cs)),cs}var ss={},Nn={},Yf;function eO(){if(Yf)return Nn;Yf=1;var e=Nn&&Nn.__extends||(function(){var d=function(o,n){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])},d(o,n)};return function(o,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");d(o,n);function t(){this.constructor=o}o.prototype=n===null?Object.create(n):(t.prototype=n.prototype,new t)}})();Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.QueueAction=void 0;var g=Iu(),O=(function(d){e(o,d);function o(n,t){var r=d.call(this,n,t)||this;return r.scheduler=n,r.work=t,r}return o.prototype.schedule=function(n,t){return t===void 0&&(t=0),t>0?d.prototype.schedule.call(this,n,t):(this.delay=t,this.state=n,this.scheduler.flush(this),this)},o.prototype.execute=function(n,t){return t>0||this.closed?d.prototype.execute.call(this,n,t):this._execute(n,t)},o.prototype.requestAsyncId=function(n,t,r){return r===void 0&&(r=0),r!=null&&r>0||r==null&&this.delay>0?d.prototype.requestAsyncId.call(this,n,t,r):(n.flush(this),0)},o})(g.AsyncAction);return Nn.QueueAction=O,Nn}var kn={},Kf;function rO(){if(Kf)return kn;Kf=1;var e=kn&&kn.__extends||(function(){var d=function(o,n){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])},d(o,n)};return function(o,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");d(o,n);function t(){this.constructor=o}o.prototype=n===null?Object.create(n):(t.prototype=n.prototype,new t)}})();Object.defineProperty(kn,"__esModule",{value:!0}),kn.QueueScheduler=void 0;var g=Au(),O=(function(d){e(o,d);function o(){return d!==null&&d.apply(this,arguments)||this}return o})(g.AsyncScheduler);return kn.QueueScheduler=O,kn}var Zf;function tO(){return Zf||(Zf=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.queue=e.queueScheduler=void 0;var g=eO(),O=rO();e.queueScheduler=new O.QueueScheduler(g.QueueAction),e.queue=e.queueScheduler})(ss)),ss}var ls={},Ln={},Qf;function nO(){if(Qf)return Ln;Qf=1;var e=Ln&&Ln.__extends||(function(){var o=function(n,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var c in i)Object.prototype.hasOwnProperty.call(i,c)&&(r[c]=i[c])},o(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");o(n,t);function r(){this.constructor=n}n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}})();Object.defineProperty(Ln,"__esModule",{value:!0}),Ln.AnimationFrameAction=void 0;var g=Iu(),O=My(),d=(function(o){e(n,o);function n(t,r){var i=o.call(this,t,r)||this;return i.scheduler=t,i.work=r,i}return n.prototype.requestAsyncId=function(t,r,i){return i===void 0&&(i=0),i!==null&&i>0?o.prototype.requestAsyncId.call(this,t,r,i):(t.actions.push(this),t._scheduled||(t._scheduled=O.animationFrameProvider.requestAnimationFrame(function(){return t.flush(void 0)})))},n.prototype.recycleAsyncId=function(t,r,i){var c;if(i===void 0&&(i=0),i!=null?i>0:this.delay>0)return o.prototype.recycleAsyncId.call(this,t,r,i);var l=t.actions;r!=null&&r===t._scheduled&&((c=l[l.length-1])===null||c===void 0?void 0:c.id)!==r&&(O.animationFrameProvider.cancelAnimationFrame(r),t._scheduled=void 0)},n})(g.AsyncAction);return Ln.AnimationFrameAction=d,Ln}var Dn={},Xf;function iO(){if(Xf)return Dn;Xf=1;var e=Dn&&Dn.__extends||(function(){var d=function(o,n){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])},d(o,n)};return function(o,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");d(o,n);function t(){this.constructor=o}o.prototype=n===null?Object.create(n):(t.prototype=n.prototype,new t)}})();Object.defineProperty(Dn,"__esModule",{value:!0}),Dn.AnimationFrameScheduler=void 0;var g=Au(),O=(function(d){e(o,d);function o(){return d!==null&&d.apply(this,arguments)||this}return o.prototype.flush=function(n){this._active=!0;var t;n?t=n.id:(t=this._scheduled,this._scheduled=void 0);var r=this.actions,i;n=n||r.shift();do if(i=n.execute(n.state,n.delay))break;while((n=r[0])&&n.id===t&&r.shift());if(this._active=!1,i){for(;(n=r[0])&&n.id===t&&r.shift();)n.unsubscribe();throw i}},o})(g.AsyncScheduler);return Dn.AnimationFrameScheduler=O,Dn}var Jf;function oO(){return Jf||(Jf=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.animationFrame=e.animationFrameScheduler=void 0;var g=nO(),O=iO();e.animationFrameScheduler=new O.AnimationFrameScheduler(g.AnimationFrameAction),e.animationFrame=e.animationFrameScheduler})(ls)),ls}var et={},ed;function aO(){if(ed)return et;ed=1;var e=et&&et.__extends||(function(){var t=function(r,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,l){c.__proto__=l}||function(c,l){for(var a in l)Object.prototype.hasOwnProperty.call(l,a)&&(c[a]=l[a])},t(r,i)};return function(r,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");t(r,i);function c(){this.constructor=r}r.prototype=i===null?Object.create(i):(c.prototype=i.prototype,new c)}})();Object.defineProperty(et,"__esModule",{value:!0}),et.VirtualAction=et.VirtualTimeScheduler=void 0;var g=Iu(),O=vr(),d=Au(),o=(function(t){e(r,t);function r(i,c){i===void 0&&(i=n),c===void 0&&(c=1/0);var l=t.call(this,i,function(){return l.frame})||this;return l.maxFrames=c,l.frame=0,l.index=-1,l}return r.prototype.flush=function(){for(var i=this,c=i.actions,l=i.maxFrames,a,_;(_=c[0])&&_.delay<=l&&(c.shift(),this.frame=_.delay,!(a=_.execute(_.state,_.delay))););if(a){for(;_=c.shift();)_.unsubscribe();throw a}},r.frameTimeFactor=10,r})(d.AsyncScheduler);et.VirtualTimeScheduler=o;var n=(function(t){e(r,t);function r(i,c,l){l===void 0&&(l=i.index+=1);var a=t.call(this,i,c)||this;return a.scheduler=i,a.work=c,a.index=l,a.active=!0,a.index=i.index=l,a}return r.prototype.schedule=function(i,c){if(c===void 0&&(c=0),Number.isFinite(c)){if(!this.id)return t.prototype.schedule.call(this,i,c);this.active=!1;var l=new r(this.scheduler,this.work);return this.add(l),l.schedule(i,c)}else return O.Subscription.EMPTY},r.prototype.requestAsyncId=function(i,c,l){l===void 0&&(l=0),this.delay=i.frame+l;var a=i.actions;return a.push(this),a.sort(r.sortActions),1},r.prototype.recycleAsyncId=function(i,c,l){},r.prototype._execute=function(i,c){if(this.active===!0)return t.prototype._execute.call(this,i,c)},r.sortActions=function(i,c){return i.delay===c.delay?i.index===c.index?0:i.index>c.index?1:-1:i.delay>c.delay?1:-1},r})(g.AsyncAction);return et.VirtualAction=n,et}var fs={},ds={},rd;function Gr(){return rd||(rd=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.empty=e.EMPTY=void 0;var g=Ie();e.EMPTY=new g.Observable(function(o){return o.complete()});function O(o){return o?d(o):e.EMPTY}e.empty=O;function d(o){return new g.Observable(function(n){return o.schedule(function(){return n.complete()})})}})(ds)),ds}var Vi={},rt={},Hi={},td;function fc(){if(td)return Hi;td=1,Object.defineProperty(Hi,"__esModule",{value:!0}),Hi.isScheduler=void 0;var e=Re();function g(O){return O&&e.isFunction(O.schedule)}return Hi.isScheduler=g,Hi}var nd;function lr(){if(nd)return rt;nd=1,Object.defineProperty(rt,"__esModule",{value:!0}),rt.popNumber=rt.popScheduler=rt.popResultSelector=void 0;var e=Re(),g=fc();function O(t){return t[t.length-1]}function d(t){return e.isFunction(O(t))?t.pop():void 0}rt.popResultSelector=d;function o(t){return g.isScheduler(O(t))?t.pop():void 0}rt.popScheduler=o;function n(t,r){return typeof O(t)=="number"?t.pop():r}return rt.popNumber=n,rt}var zi={},$i={},Gi={},ke={},Yi={},id;function Is(){return id||(id=1,Object.defineProperty(Yi,"__esModule",{value:!0}),Yi.isArrayLike=void 0,Yi.isArrayLike=(function(e){return e&&typeof e.length=="number"&&typeof e!="function"})),Yi}var Ki={},od;function Dy(){if(od)return Ki;od=1,Object.defineProperty(Ki,"__esModule",{value:!0}),Ki.isPromise=void 0;var e=Re();function g(O){return e.isFunction(O?.then)}return Ki.isPromise=g,Ki}var Zi={},ad;function Uy(){if(ad)return Zi;ad=1,Object.defineProperty(Zi,"__esModule",{value:!0}),Zi.isInteropObservable=void 0;var e=cc(),g=Re();function O(d){return g.isFunction(d[e.observable])}return Zi.isInteropObservable=O,Zi}var Qi={},ud;function qy(){if(ud)return Qi;ud=1,Object.defineProperty(Qi,"__esModule",{value:!0}),Qi.isAsyncIterable=void 0;var e=Re();function g(O){return Symbol.asyncIterator&&e.isFunction(O?.[Symbol.asyncIterator])}return Qi.isAsyncIterable=g,Qi}var Xi={},cd;function Fy(){if(cd)return Xi;cd=1,Object.defineProperty(Xi,"__esModule",{value:!0}),Xi.createInvalidObservableTypeError=void 0;function e(g){return new TypeError("You provided "+(g!==null&&typeof g=="object"?"an invalid object":"'"+g+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}return Xi.createInvalidObservableTypeError=e,Xi}var Ji={},Un={},sd;function By(){if(sd)return Un;sd=1,Object.defineProperty(Un,"__esModule",{value:!0}),Un.iterator=Un.getSymbolIterator=void 0;function e(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}return Un.getSymbolIterator=e,Un.iterator=e(),Un}var ld;function xy(){if(ld)return Ji;ld=1,Object.defineProperty(Ji,"__esModule",{value:!0}),Ji.isIterable=void 0;var e=By(),g=Re();function O(d){return g.isFunction(d?.[e.iterator])}return Ji.isIterable=O,Ji}var ar={},fd;function As(){if(fd)return ar;fd=1;var e=ar&&ar.__generator||function(t,r){var i={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},c,l,a,_;return _={next:p(0),throw:p(1),return:p(2)},typeof Symbol=="function"&&(_[Symbol.iterator]=function(){return this}),_;function p(h){return function(u){return m([h,u])}}function m(h){if(c)throw new TypeError("Generator is already executing.");for(;i;)try{if(c=1,l&&(a=h[0]&2?l.return:h[0]?l.throw||((a=l.return)&&a.call(l),0):l.next)&&!(a=a.call(l,h[1])).done)return a;switch(l=0,a&&(h=[h[0]&2,a.value]),h[0]){case 0:case 1:a=h;break;case 4:return i.label++,{value:h[1],done:!1};case 5:i.label++,l=h[1],h=[0];continue;case 7:h=i.ops.pop(),i.trys.pop();continue;default:if(a=i.trys,!(a=a.length>0&&a[a.length-1])&&(h[0]===6||h[0]===2)){i=0;continue}if(h[0]===3&&(!a||h[1]>a[0]&&h[1]<a[3])){i.label=h[1];break}if(h[0]===6&&i.label<a[1]){i.label=a[1],a=h;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(h);break}a[2]&&i.ops.pop(),i.trys.pop();continue}h=r.call(t,i)}catch(u){h=[6,u],l=0}finally{c=a=0}if(h[0]&5)throw h[1];return{value:h[0]?h[1]:void 0,done:!0}}},g=ar&&ar.__await||function(t){return this instanceof g?(this.v=t,this):new g(t)},O=ar&&ar.__asyncGenerator||function(t,r,i){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var c=i.apply(t,r||[]),l,a=[];return l={},_("next"),_("throw"),_("return"),l[Symbol.asyncIterator]=function(){return this},l;function _(y){c[y]&&(l[y]=function(s){return new Promise(function(f,b){a.push([y,s,f,b])>1||p(y,s)})})}function p(y,s){try{m(c[y](s))}catch(f){v(a[0][3],f)}}function m(y){y.value instanceof g?Promise.resolve(y.value.v).then(h,u):v(a[0][2],y)}function h(y){p("next",y)}function u(y){p("throw",y)}function v(y,s){y(s),a.shift(),a.length&&p(a[0][0],a[0][1])}};Object.defineProperty(ar,"__esModule",{value:!0}),ar.isReadableStreamLike=ar.readableStreamLikeToAsyncGenerator=void 0;var d=Re();function o(t){return O(this,arguments,function(){var i,c,l,a;return e(this,function(_){switch(_.label){case 0:i=t.getReader(),_.label=1;case 1:_.trys.push([1,,9,10]),_.label=2;case 2:return[4,g(i.read())];case 3:return c=_.sent(),l=c.value,a=c.done,a?[4,g(void 0)]:[3,5];case 4:return[2,_.sent()];case 5:return[4,g(l)];case 6:return[4,_.sent()];case 7:return _.sent(),[3,2];case 8:return[3,10];case 9:return i.releaseLock(),[7];case 10:return[2]}})})}ar.readableStreamLikeToAsyncGenerator=o;function n(t){return d.isFunction(t?.getReader)}return ar.isReadableStreamLike=n,ar}var dd;function Oe(){if(dd)return ke;dd=1;var e=ke&&ke.__awaiter||function(w,T,R,L){function j(M){return M instanceof R?M:new R(function(x){x(M)})}return new(R||(R=Promise))(function(M,x){function Z(G){try{K(L.next(G))}catch($){x($)}}function H(G){try{K(L.throw(G))}catch($){x($)}}function K(G){G.done?M(G.value):j(G.value).then(Z,H)}K((L=L.apply(w,T||[])).next())})},g=ke&&ke.__generator||function(w,T){var R={label:0,sent:function(){if(M[0]&1)throw M[1];return M[1]},trys:[],ops:[]},L,j,M,x;return x={next:Z(0),throw:Z(1),return:Z(2)},typeof Symbol=="function"&&(x[Symbol.iterator]=function(){return this}),x;function Z(K){return function(G){return H([K,G])}}function H(K){if(L)throw new TypeError("Generator is already executing.");for(;R;)try{if(L=1,j&&(M=K[0]&2?j.return:K[0]?j.throw||((M=j.return)&&M.call(j),0):j.next)&&!(M=M.call(j,K[1])).done)return M;switch(j=0,M&&(K=[K[0]&2,M.value]),K[0]){case 0:case 1:M=K;break;case 4:return R.label++,{value:K[1],done:!1};case 5:R.label++,j=K[1],K=[0];continue;case 7:K=R.ops.pop(),R.trys.pop();continue;default:if(M=R.trys,!(M=M.length>0&&M[M.length-1])&&(K[0]===6||K[0]===2)){R=0;continue}if(K[0]===3&&(!M||K[1]>M[0]&&K[1]<M[3])){R.label=K[1];break}if(K[0]===6&&R.label<M[1]){R.label=M[1],M=K;break}if(M&&R.label<M[2]){R.label=M[2],R.ops.push(K);break}M[2]&&R.ops.pop(),R.trys.pop();continue}K=T.call(w,R)}catch(G){K=[6,G],j=0}finally{L=M=0}if(K[0]&5)throw K[1];return{value:K[0]?K[1]:void 0,done:!0}}},O=ke&&ke.__asyncValues||function(w){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var T=w[Symbol.asyncIterator],R;return T?T.call(w):(w=typeof d=="function"?d(w):w[Symbol.iterator](),R={},L("next"),L("throw"),L("return"),R[Symbol.asyncIterator]=function(){return this},R);function L(M){R[M]=w[M]&&function(x){return new Promise(function(Z,H){x=w[M](x),j(Z,H,x.done,x.value)})}}function j(M,x,Z,H){Promise.resolve(H).then(function(K){M({value:K,done:Z})},x)}},d=ke&&ke.__values||function(w){var T=typeof Symbol=="function"&&Symbol.iterator,R=T&&w[T],L=0;if(R)return R.call(w);if(w&&typeof w.length=="number")return{next:function(){return w&&L>=w.length&&(w=void 0),{value:w&&w[L++],done:!w}}};throw new TypeError(T?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(ke,"__esModule",{value:!0}),ke.fromReadableStreamLike=ke.fromAsyncIterable=ke.fromIterable=ke.fromPromise=ke.fromArrayLike=ke.fromInteropObservable=ke.innerFrom=void 0;var o=Is(),n=Dy(),t=Ie(),r=Uy(),i=qy(),c=Fy(),l=xy(),a=As(),_=Re(),p=jy(),m=cc();function h(w){if(w instanceof t.Observable)return w;if(w!=null){if(r.isInteropObservable(w))return u(w);if(o.isArrayLike(w))return v(w);if(n.isPromise(w))return y(w);if(i.isAsyncIterable(w))return f(w);if(l.isIterable(w))return s(w);if(a.isReadableStreamLike(w))return b(w)}throw c.createInvalidObservableTypeError(w)}ke.innerFrom=h;function u(w){return new t.Observable(function(T){var R=w[m.observable]();if(_.isFunction(R.subscribe))return R.subscribe(T);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}ke.fromInteropObservable=u;function v(w){return new t.Observable(function(T){for(var R=0;R<w.length&&!T.closed;R++)T.next(w[R]);T.complete()})}ke.fromArrayLike=v;function y(w){return new t.Observable(function(T){w.then(function(R){T.closed||(T.next(R),T.complete())},function(R){return T.error(R)}).then(null,p.reportUnhandledError)})}ke.fromPromise=y;function s(w){return new t.Observable(function(T){var R,L;try{for(var j=d(w),M=j.next();!M.done;M=j.next()){var x=M.value;if(T.next(x),T.closed)return}}catch(Z){R={error:Z}}finally{try{M&&!M.done&&(L=j.return)&&L.call(j)}finally{if(R)throw R.error}}T.complete()})}ke.fromIterable=s;function f(w){return new t.Observable(function(T){E(w,T).catch(function(R){return T.error(R)})})}ke.fromAsyncIterable=f;function b(w){return f(a.readableStreamLikeToAsyncGenerator(w))}ke.fromReadableStreamLike=b;function E(w,T){var R,L,j,M;return e(this,void 0,void 0,function(){var x,Z;return g(this,function(H){switch(H.label){case 0:H.trys.push([0,5,6,11]),R=O(w),H.label=1;case 1:return[4,R.next()];case 2:if(L=H.sent(),!!L.done)return[3,4];if(x=L.value,T.next(x),T.closed)return[2];H.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return Z=H.sent(),j={error:Z},[3,11];case 6:return H.trys.push([6,,9,10]),L&&!L.done&&(M=R.return)?[4,M.call(R)]:[3,8];case 7:H.sent(),H.label=8;case 8:return[3,10];case 9:if(j)throw j.error;return[7];case 10:return[7];case 11:return T.complete(),[2]}})})}return ke}var eo={},ro={},hd;function nn(){if(hd)return ro;hd=1,Object.defineProperty(ro,"__esModule",{value:!0}),ro.executeSchedule=void 0;function e(g,O,d,o,n){o===void 0&&(o=0),n===void 0&&(n=!1);var t=O.schedule(function(){d(),n?g.add(this.schedule(null,o)):this.unsubscribe()},o);if(g.add(t),!n)return t}return ro.executeSchedule=e,ro}var vd;function ju(){if(vd)return eo;vd=1,Object.defineProperty(eo,"__esModule",{value:!0}),eo.observeOn=void 0;var e=nn(),g=fe(),O=he();function d(o,n){return n===void 0&&(n=0),g.operate(function(t,r){t.subscribe(O.createOperatorSubscriber(r,function(i){return e.executeSchedule(r,o,function(){return r.next(i)},n)},function(){return e.executeSchedule(r,o,function(){return r.complete()},n)},function(i){return e.executeSchedule(r,o,function(){return r.error(i)},n)}))})}return eo.observeOn=d,eo}var to={},_d;function Mu(){if(_d)return to;_d=1,Object.defineProperty(to,"__esModule",{value:!0}),to.subscribeOn=void 0;var e=fe();function g(O,d){return d===void 0&&(d=0),e.operate(function(o,n){n.add(O.schedule(function(){return o.subscribe(n)},d))})}return to.subscribeOn=g,to}var pd;function uO(){if(pd)return Gi;pd=1,Object.defineProperty(Gi,"__esModule",{value:!0}),Gi.scheduleObservable=void 0;var e=Oe(),g=ju(),O=Mu();function d(o,n){return e.innerFrom(o).pipe(O.subscribeOn(n),g.observeOn(n))}return Gi.scheduleObservable=d,Gi}var no={},yd;function cO(){if(yd)return no;yd=1,Object.defineProperty(no,"__esModule",{value:!0}),no.schedulePromise=void 0;var e=Oe(),g=ju(),O=Mu();function d(o,n){return e.innerFrom(o).pipe(O.subscribeOn(n),g.observeOn(n))}return no.schedulePromise=d,no}var io={},bd;function sO(){if(bd)return io;bd=1,Object.defineProperty(io,"__esModule",{value:!0}),io.scheduleArray=void 0;var e=Ie();function g(O,d){return new e.Observable(function(o){var n=0;return d.schedule(function(){n===O.length?o.complete():(o.next(O[n++]),o.closed||this.schedule())})})}return io.scheduleArray=g,io}var oo={},md;function Wy(){if(md)return oo;md=1,Object.defineProperty(oo,"__esModule",{value:!0}),oo.scheduleIterable=void 0;var e=Ie(),g=By(),O=Re(),d=nn();function o(n,t){return new e.Observable(function(r){var i;return d.executeSchedule(r,t,function(){i=n[g.iterator](),d.executeSchedule(r,t,function(){var c,l,a;try{c=i.next(),l=c.value,a=c.done}catch(_){r.error(_);return}a?r.complete():r.next(l)},0,!0)}),function(){return O.isFunction(i?.return)&&i.return()}})}return oo.scheduleIterable=o,oo}var ao={},gd;function Vy(){if(gd)return ao;gd=1,Object.defineProperty(ao,"__esModule",{value:!0}),ao.scheduleAsyncIterable=void 0;var e=Ie(),g=nn();function O(d,o){if(!d)throw new Error("Iterable cannot be null");return new e.Observable(function(n){g.executeSchedule(n,o,function(){var t=d[Symbol.asyncIterator]();g.executeSchedule(n,o,function(){t.next().then(function(r){r.done?n.complete():n.next(r.value)})},0,!0)})})}return ao.scheduleAsyncIterable=O,ao}var uo={},Od;function lO(){if(Od)return uo;Od=1,Object.defineProperty(uo,"__esModule",{value:!0}),uo.scheduleReadableStreamLike=void 0;var e=Vy(),g=As();function O(d,o){return e.scheduleAsyncIterable(g.readableStreamLikeToAsyncGenerator(d),o)}return uo.scheduleReadableStreamLike=O,uo}var wd;function Hy(){if(wd)return $i;wd=1,Object.defineProperty($i,"__esModule",{value:!0}),$i.scheduled=void 0;var e=uO(),g=cO(),O=sO(),d=Wy(),o=Vy(),n=Uy(),t=Dy(),r=Is(),i=xy(),c=qy(),l=Fy(),a=As(),_=lO();function p(m,h){if(m!=null){if(n.isInteropObservable(m))return e.scheduleObservable(m,h);if(r.isArrayLike(m))return O.scheduleArray(m,h);if(t.isPromise(m))return g.schedulePromise(m,h);if(c.isAsyncIterable(m))return o.scheduleAsyncIterable(m,h);if(i.isIterable(m))return d.scheduleIterable(m,h);if(a.isReadableStreamLike(m))return _.scheduleReadableStreamLike(m,h)}throw l.createInvalidObservableTypeError(m)}return $i.scheduled=p,$i}var Ed;function on(){if(Ed)return zi;Ed=1,Object.defineProperty(zi,"__esModule",{value:!0}),zi.from=void 0;var e=Hy(),g=Oe();function O(d,o){return o?e.scheduled(d,o):g.innerFrom(d)}return zi.from=O,zi}var Td;function js(){if(Td)return Vi;Td=1,Object.defineProperty(Vi,"__esModule",{value:!0}),Vi.of=void 0;var e=lr(),g=on();function O(){for(var d=[],o=0;o<arguments.length;o++)d[o]=arguments[o];var n=e.popScheduler(d);return g.from(d,n)}return Vi.of=O,Vi}var co={},Sd;function zy(){if(Sd)return co;Sd=1,Object.defineProperty(co,"__esModule",{value:!0}),co.throwError=void 0;var e=Ie(),g=Re();function O(d,o){var n=g.isFunction(d)?d:function(){return d},t=function(r){return r.error(n())};return new e.Observable(o?function(r){return o.schedule(t,0,r)}:t)}return co.throwError=O,co}var Pd;function Ms(){return Pd||(Pd=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.observeNotification=e.Notification=e.NotificationKind=void 0;var g=Gr(),O=js(),d=zy(),o=Re();(function(r){r.NEXT="N",r.ERROR="E",r.COMPLETE="C"})(e.NotificationKind||(e.NotificationKind={}));var n=(function(){function r(i,c,l){this.kind=i,this.value=c,this.error=l,this.hasValue=i==="N"}return r.prototype.observe=function(i){return t(this,i)},r.prototype.do=function(i,c,l){var a=this,_=a.kind,p=a.value,m=a.error;return _==="N"?i?.(p):_==="E"?c?.(m):l?.()},r.prototype.accept=function(i,c,l){var a;return o.isFunction((a=i)===null||a===void 0?void 0:a.next)?this.observe(i):this.do(i,c,l)},r.prototype.toObservable=function(){var i=this,c=i.kind,l=i.value,a=i.error,_=c==="N"?O.of(l):c==="E"?d.throwError(function(){return a}):c==="C"?g.EMPTY:0;if(!_)throw new TypeError("Unexpected notification kind "+c);return _},r.createNext=function(i){return new r("N",i)},r.createError=function(i){return new r("E",void 0,i)},r.createComplete=function(){return r.completeNotification},r.completeNotification=new r("C"),r})();e.Notification=n;function t(r,i){var c,l,a,_=r,p=_.kind,m=_.value,h=_.error;if(typeof p!="string")throw new TypeError('Invalid notification, missing "kind"');p==="N"?(c=i.next)===null||c===void 0||c.call(i,m):p==="E"?(l=i.error)===null||l===void 0||l.call(i,h):(a=i.complete)===null||a===void 0||a.call(i)}e.observeNotification=t})(fs)),fs}var so={},Rd;function fO(){if(Rd)return so;Rd=1,Object.defineProperty(so,"__esModule",{value:!0}),so.isObservable=void 0;var e=Ie(),g=Re();function O(d){return!!d&&(d instanceof e.Observable||g.isFunction(d.lift)&&g.isFunction(d.subscribe))}return so.isObservable=O,so}var lo={},fo={},Cd;function ei(){if(Cd)return fo;Cd=1,Object.defineProperty(fo,"__esModule",{value:!0}),fo.EmptyError=void 0;var e=Jn();return fo.EmptyError=e.createErrorClass(function(g){return function(){g(this),this.name="EmptyError",this.message="no elements in sequence"}}),fo}var Id;function dO(){if(Id)return lo;Id=1,Object.defineProperty(lo,"__esModule",{value:!0}),lo.lastValueFrom=void 0;var e=ei();function g(O,d){var o=typeof d=="object";return new Promise(function(n,t){var r=!1,i;O.subscribe({next:function(c){i=c,r=!0},error:t,complete:function(){r?n(i):o?n(d.defaultValue):t(new e.EmptyError)}})})}return lo.lastValueFrom=g,lo}var ho={},Ad;function hO(){if(Ad)return ho;Ad=1,Object.defineProperty(ho,"__esModule",{value:!0}),ho.firstValueFrom=void 0;var e=ei(),g=Cu();function O(d,o){var n=typeof o=="object";return new Promise(function(t,r){var i=new g.SafeSubscriber({next:function(c){t(c),i.unsubscribe()},error:r,complete:function(){n?t(o.defaultValue):r(new e.EmptyError)}});d.subscribe(i)})}return ho.firstValueFrom=O,ho}var vo={},jd;function $y(){if(jd)return vo;jd=1,Object.defineProperty(vo,"__esModule",{value:!0}),vo.ArgumentOutOfRangeError=void 0;var e=Jn();return vo.ArgumentOutOfRangeError=e.createErrorClass(function(g){return function(){g(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}}),vo}var _o={},Md;function Gy(){if(Md)return _o;Md=1,Object.defineProperty(_o,"__esModule",{value:!0}),_o.NotFoundError=void 0;var e=Jn();return _o.NotFoundError=e.createErrorClass(function(g){return function(d){g(this),this.name="NotFoundError",this.message=d}}),_o}var po={},Nd;function Yy(){if(Nd)return po;Nd=1,Object.defineProperty(po,"__esModule",{value:!0}),po.SequenceError=void 0;var e=Jn();return po.SequenceError=e.createErrorClass(function(g){return function(d){g(this),this.name="SequenceError",this.message=d}}),po}var hs={},yo={},kd;function Ns(){if(kd)return yo;kd=1,Object.defineProperty(yo,"__esModule",{value:!0}),yo.isValidDate=void 0;function e(g){return g instanceof Date&&!isNaN(g)}return yo.isValidDate=e,yo}var Ld;function ac(){return Ld||(Ld=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.timeout=e.TimeoutError=void 0;var g=sr(),O=Ns(),d=fe(),o=Oe(),n=Jn(),t=he(),r=nn();e.TimeoutError=n.createErrorClass(function(l){return function(_){_===void 0&&(_=null),l(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=_}});function i(l,a){var _=O.isValidDate(l)?{first:l}:typeof l=="number"?{each:l}:l,p=_.first,m=_.each,h=_.with,u=h===void 0?c:h,v=_.scheduler,y=v===void 0?a??g.asyncScheduler:v,s=_.meta,f=s===void 0?null:s;if(p==null&&m==null)throw new TypeError("No timeout provided.");return d.operate(function(b,E){var w,T,R=null,L=0,j=function(M){T=r.executeSchedule(E,y,function(){try{w.unsubscribe(),o.innerFrom(u({meta:f,lastValue:R,seen:L})).subscribe(E)}catch(x){E.error(x)}},M)};w=b.subscribe(t.createOperatorSubscriber(E,function(M){T?.unsubscribe(),L++,E.next(R=M),m>0&&j(m)},void 0,void 0,function(){T?.closed||T?.unsubscribe(),R=null})),!L&&j(p!=null?typeof p=="number"?p:+p-y.now():m)})}e.timeout=i;function c(l){throw new e.TimeoutError(l)}})(hs)),hs}var bo={},tt={},nt={},mo={},Dd;function an(){if(Dd)return mo;Dd=1,Object.defineProperty(mo,"__esModule",{value:!0}),mo.map=void 0;var e=fe(),g=he();function O(d,o){return e.operate(function(n,t){var r=0;n.subscribe(g.createOperatorSubscriber(t,function(i){t.next(d.call(o,i,r++))}))})}return mo.map=O,mo}var Ud;function ri(){if(Ud)return nt;Ud=1;var e=nt&&nt.__read||function(t,r){var i=typeof Symbol=="function"&&t[Symbol.iterator];if(!i)return t;var c=i.call(t),l,a=[],_;try{for(;(r===void 0||r-- >0)&&!(l=c.next()).done;)a.push(l.value)}catch(p){_={error:p}}finally{try{l&&!l.done&&(i=c.return)&&i.call(c)}finally{if(_)throw _.error}}return a},g=nt&&nt.__spreadArray||function(t,r){for(var i=0,c=r.length,l=t.length;i<c;i++,l++)t[l]=r[i];return t};Object.defineProperty(nt,"__esModule",{value:!0}),nt.mapOneOrManyArgs=void 0;var O=an(),d=Array.isArray;function o(t,r){return d(r)?t.apply(void 0,g([],e(r))):t(r)}function n(t){return O.map(function(r){return o(t,r)})}return nt.mapOneOrManyArgs=n,nt}var qd;function Ky(){if(qd)return tt;qd=1;var e=tt&&tt.__read||function(c,l){var a=typeof Symbol=="function"&&c[Symbol.iterator];if(!a)return c;var _=a.call(c),p,m=[],h;try{for(;(l===void 0||l-- >0)&&!(p=_.next()).done;)m.push(p.value)}catch(u){h={error:u}}finally{try{p&&!p.done&&(a=_.return)&&a.call(_)}finally{if(h)throw h.error}}return m},g=tt&&tt.__spreadArray||function(c,l){for(var a=0,_=l.length,p=c.length;a<_;a++,p++)c[p]=l[a];return c};Object.defineProperty(tt,"__esModule",{value:!0}),tt.bindCallbackInternals=void 0;var O=fc(),d=Ie(),o=Mu(),n=ri(),t=ju(),r=Cs();function i(c,l,a,_){if(a)if(O.isScheduler(a))_=a;else return function(){for(var p=[],m=0;m<arguments.length;m++)p[m]=arguments[m];return i(c,l,_).apply(this,p).pipe(n.mapOneOrManyArgs(a))};return _?function(){for(var p=[],m=0;m<arguments.length;m++)p[m]=arguments[m];return i(c,l).apply(this,p).pipe(o.subscribeOn(_),t.observeOn(_))}:function(){for(var p=this,m=[],h=0;h<arguments.length;h++)m[h]=arguments[h];var u=new r.AsyncSubject,v=!0;return new d.Observable(function(y){var s=u.subscribe(y);if(v){v=!1;var f=!1,b=!1;l.apply(p,g(g([],e(m)),[function(){for(var E=[],w=0;w<arguments.length;w++)E[w]=arguments[w];if(c){var T=E.shift();if(T!=null){u.error(T);return}}u.next(1<E.length?E:E[0]),b=!0,f&&u.complete()}])),b&&u.complete(),f=!0}return s})}}return tt.bindCallbackInternals=i,tt}var Fd;function vO(){if(Fd)return bo;Fd=1,Object.defineProperty(bo,"__esModule",{value:!0}),bo.bindCallback=void 0;var e=Ky();function g(O,d,o){return e.bindCallbackInternals(!1,O,d,o)}return bo.bindCallback=g,bo}var go={},Bd;function _O(){if(Bd)return go;Bd=1,Object.defineProperty(go,"__esModule",{value:!0}),go.bindNodeCallback=void 0;var e=Ky();function g(O,d,o){return e.bindCallbackInternals(!0,O,d,o)}return go.bindNodeCallback=g,go}var qn={},Oo={},xd;function Zy(){if(xd)return Oo;xd=1,Object.defineProperty(Oo,"__esModule",{value:!0}),Oo.argsArgArrayOrObject=void 0;var e=Array.isArray,g=Object.getPrototypeOf,O=Object.prototype,d=Object.keys;function o(t){if(t.length===1){var r=t[0];if(e(r))return{args:r,keys:null};if(n(r)){var i=d(r);return{args:i.map(function(c){return r[c]}),keys:i}}}return{args:t,keys:null}}Oo.argsArgArrayOrObject=o;function n(t){return t&&typeof t=="object"&&g(t)===O}return Oo}var wo={},Wd;function Qy(){if(Wd)return wo;Wd=1,Object.defineProperty(wo,"__esModule",{value:!0}),wo.createObject=void 0;function e(g,O){return g.reduce(function(d,o,n){return d[o]=O[n],d},{})}return wo.createObject=e,wo}var Vd;function ks(){if(Vd)return qn;Vd=1,Object.defineProperty(qn,"__esModule",{value:!0}),qn.combineLatestInit=qn.combineLatest=void 0;var e=Ie(),g=Zy(),O=on(),d=$e(),o=ri(),n=lr(),t=Qy(),r=he(),i=nn();function c(){for(var _=[],p=0;p<arguments.length;p++)_[p]=arguments[p];var m=n.popScheduler(_),h=n.popResultSelector(_),u=g.argsArgArrayOrObject(_),v=u.args,y=u.keys;if(v.length===0)return O.from([],m);var s=new e.Observable(l(v,m,y?function(f){return t.createObject(y,f)}:d.identity));return h?s.pipe(o.mapOneOrManyArgs(h)):s}qn.combineLatest=c;function l(_,p,m){return m===void 0&&(m=d.identity),function(h){a(p,function(){for(var u=_.length,v=new Array(u),y=u,s=u,f=function(E){a(p,function(){var w=O.from(_[E],p),T=!1;w.subscribe(r.createOperatorSubscriber(h,function(R){v[E]=R,T||(T=!0,s--),s||h.next(m(v.slice()))},function(){--y||h.complete()}))},h)},b=0;b<u;b++)f(b)},h)}}qn.combineLatestInit=l;function a(_,p,m){_?i.executeSchedule(m,_,p):p()}return qn}var Eo={},To={},So={},Po={},Ro={},Hd;function Ls(){if(Hd)return Ro;Hd=1,Object.defineProperty(Ro,"__esModule",{value:!0}),Ro.mergeInternals=void 0;var e=Oe(),g=nn(),O=he();function d(o,n,t,r,i,c,l,a){var _=[],p=0,m=0,h=!1,u=function(){h&&!_.length&&!p&&n.complete()},v=function(s){return p<r?y(s):_.push(s)},y=function(s){c&&n.next(s),p++;var f=!1;e.innerFrom(t(s,m++)).subscribe(O.createOperatorSubscriber(n,function(b){i?.(b),c?v(b):n.next(b)},function(){f=!0},void 0,function(){if(f)try{p--;for(var b=function(){var E=_.shift();l?g.executeSchedule(n,l,function(){return y(E)}):y(E)};_.length&&p<r;)b();u()}catch(E){n.error(E)}}))};return o.subscribe(O.createOperatorSubscriber(n,v,function(){h=!0,u()})),function(){a?.()}}return Ro.mergeInternals=d,Ro}var zd;function wt(){if(zd)return Po;zd=1,Object.defineProperty(Po,"__esModule",{value:!0}),Po.mergeMap=void 0;var e=an(),g=Oe(),O=fe(),d=Ls(),o=Re();function n(t,r,i){return i===void 0&&(i=1/0),o.isFunction(r)?n(function(c,l){return e.map(function(a,_){return r(c,a,l,_)})(g.innerFrom(t(c,l)))},i):(typeof r=="number"&&(i=r),O.operate(function(c,l){return d.mergeInternals(c,l,t,i)}))}return Po.mergeMap=n,Po}var $d;function Nu(){if($d)return So;$d=1,Object.defineProperty(So,"__esModule",{value:!0}),So.mergeAll=void 0;var e=wt(),g=$e();function O(d){return d===void 0&&(d=1/0),e.mergeMap(g.identity,d)}return So.mergeAll=O,So}var Gd;function dc(){if(Gd)return To;Gd=1,Object.defineProperty(To,"__esModule",{value:!0}),To.concatAll=void 0;var e=Nu();function g(){return e.mergeAll(1)}return To.concatAll=g,To}var Yd;function hc(){if(Yd)return Eo;Yd=1,Object.defineProperty(Eo,"__esModule",{value:!0}),Eo.concat=void 0;var e=dc(),g=lr(),O=on();function d(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return e.concatAll()(O.from(o,g.popScheduler(o)))}return Eo.concat=d,Eo}var Co={},Io={},Kd;function vc(){if(Kd)return Io;Kd=1,Object.defineProperty(Io,"__esModule",{value:!0}),Io.defer=void 0;var e=Ie(),g=Oe();function O(d){return new e.Observable(function(o){g.innerFrom(d()).subscribe(o)})}return Io.defer=O,Io}var Zd;function pO(){if(Zd)return Co;Zd=1,Object.defineProperty(Co,"__esModule",{value:!0}),Co.connectable=void 0;var e=Ge(),g=Ie(),O=vc(),d={connector:function(){return new e.Subject},resetOnDisconnect:!0};function o(n,t){t===void 0&&(t=d);var r=null,i=t.connector,c=t.resetOnDisconnect,l=c===void 0?!0:c,a=i(),_=new g.Observable(function(p){return a.subscribe(p)});return _.connect=function(){return(!r||r.closed)&&(r=O.defer(function(){return n}).subscribe(a),l&&r.add(function(){return a=i()})),r},_}return Co.connectable=o,Co}var Ao={},Qd;function yO(){if(Qd)return Ao;Qd=1,Object.defineProperty(Ao,"__esModule",{value:!0}),Ao.forkJoin=void 0;var e=Ie(),g=Zy(),O=Oe(),d=lr(),o=he(),n=ri(),t=Qy();function r(){for(var i=[],c=0;c<arguments.length;c++)i[c]=arguments[c];var l=d.popResultSelector(i),a=g.argsArgArrayOrObject(i),_=a.args,p=a.keys,m=new e.Observable(function(h){var u=_.length;if(!u){h.complete();return}for(var v=new Array(u),y=u,s=u,f=function(E){var w=!1;O.innerFrom(_[E]).subscribe(o.createOperatorSubscriber(h,function(T){w||(w=!0,s--),v[E]=T},function(){return y--},void 0,function(){(!y||!w)&&(s||h.next(p?t.createObject(p,v):v),h.complete())}))},b=0;b<u;b++)f(b)});return l?m.pipe(n.mapOneOrManyArgs(l)):m}return Ao.forkJoin=r,Ao}var Fn={},Xd;function bO(){if(Xd)return Fn;Xd=1;var e=Fn&&Fn.__read||function(h,u){var v=typeof Symbol=="function"&&h[Symbol.iterator];if(!v)return h;var y=v.call(h),s,f=[],b;try{for(;(u===void 0||u-- >0)&&!(s=y.next()).done;)f.push(s.value)}catch(E){b={error:E}}finally{try{s&&!s.done&&(v=y.return)&&v.call(y)}finally{if(b)throw b.error}}return f};Object.defineProperty(Fn,"__esModule",{value:!0}),Fn.fromEvent=void 0;var g=Oe(),O=Ie(),d=wt(),o=Is(),n=Re(),t=ri(),r=["addListener","removeListener"],i=["addEventListener","removeEventListener"],c=["on","off"];function l(h,u,v,y){if(n.isFunction(v)&&(y=v,v=void 0),y)return l(h,u,v).pipe(t.mapOneOrManyArgs(y));var s=e(m(h)?i.map(function(E){return function(w){return h[E](u,w,v)}}):_(h)?r.map(a(h,u)):p(h)?c.map(a(h,u)):[],2),f=s[0],b=s[1];if(!f&&o.isArrayLike(h))return d.mergeMap(function(E){return l(E,u,v)})(g.innerFrom(h));if(!f)throw new TypeError("Invalid event target");return new O.Observable(function(E){var w=function(){for(var T=[],R=0;R<arguments.length;R++)T[R]=arguments[R];return E.next(1<T.length?T:T[0])};return f(w),function(){return b(w)}})}Fn.fromEvent=l;function a(h,u){return function(v){return function(y){return h[v](u,y)}}}function _(h){return n.isFunction(h.addListener)&&n.isFunction(h.removeListener)}function p(h){return n.isFunction(h.on)&&n.isFunction(h.off)}function m(h){return n.isFunction(h.addEventListener)&&n.isFunction(h.removeEventListener)}return Fn}var jo={},Jd;function mO(){if(Jd)return jo;Jd=1,Object.defineProperty(jo,"__esModule",{value:!0}),jo.fromEventPattern=void 0;var e=Ie(),g=Re(),O=ri();function d(o,n,t){return t?d(o,n).pipe(O.mapOneOrManyArgs(t)):new e.Observable(function(r){var i=function(){for(var l=[],a=0;a<arguments.length;a++)l[a]=arguments[a];return r.next(l.length===1?l[0]:l)},c=o(i);return g.isFunction(n)?function(){return n(i,c)}:void 0})}return jo.fromEventPattern=d,jo}var Bn={},eh;function gO(){if(eh)return Bn;eh=1;var e=Bn&&Bn.__generator||function(t,r){var i={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},c,l,a,_;return _={next:p(0),throw:p(1),return:p(2)},typeof Symbol=="function"&&(_[Symbol.iterator]=function(){return this}),_;function p(h){return function(u){return m([h,u])}}function m(h){if(c)throw new TypeError("Generator is already executing.");for(;i;)try{if(c=1,l&&(a=h[0]&2?l.return:h[0]?l.throw||((a=l.return)&&a.call(l),0):l.next)&&!(a=a.call(l,h[1])).done)return a;switch(l=0,a&&(h=[h[0]&2,a.value]),h[0]){case 0:case 1:a=h;break;case 4:return i.label++,{value:h[1],done:!1};case 5:i.label++,l=h[1],h=[0];continue;case 7:h=i.ops.pop(),i.trys.pop();continue;default:if(a=i.trys,!(a=a.length>0&&a[a.length-1])&&(h[0]===6||h[0]===2)){i=0;continue}if(h[0]===3&&(!a||h[1]>a[0]&&h[1]<a[3])){i.label=h[1];break}if(h[0]===6&&i.label<a[1]){i.label=a[1],a=h;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(h);break}a[2]&&i.ops.pop(),i.trys.pop();continue}h=r.call(t,i)}catch(u){h=[6,u],l=0}finally{c=a=0}if(h[0]&5)throw h[1];return{value:h[0]?h[1]:void 0,done:!0}}};Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.generate=void 0;var g=$e(),O=fc(),d=vc(),o=Wy();function n(t,r,i,c,l){var a,_,p,m;arguments.length===1?(a=t,m=a.initialState,r=a.condition,i=a.iterate,_=a.resultSelector,p=_===void 0?g.identity:_,l=a.scheduler):(m=t,!c||O.isScheduler(c)?(p=g.identity,l=c):p=c);function h(){var u;return e(this,function(v){switch(v.label){case 0:u=m,v.label=1;case 1:return!r||r(u)?[4,p(u)]:[3,4];case 2:v.sent(),v.label=3;case 3:return u=i(u),[3,1];case 4:return[2]}})}return d.defer(l?function(){return o.scheduleIterable(h(),l)}:h)}return Bn.generate=n,Bn}var Mo={},rh;function OO(){if(rh)return Mo;rh=1,Object.defineProperty(Mo,"__esModule",{value:!0}),Mo.iif=void 0;var e=vc();function g(O,d,o){return e.defer(function(){return O()?d:o})}return Mo.iif=g,Mo}var No={},ko={},th;function ti(){if(th)return ko;th=1,Object.defineProperty(ko,"__esModule",{value:!0}),ko.timer=void 0;var e=Ie(),g=sr(),O=fc(),d=Ns();function o(n,t,r){n===void 0&&(n=0),r===void 0&&(r=g.async);var i=-1;return t!=null&&(O.isScheduler(t)?r=t:i=t),new e.Observable(function(c){var l=d.isValidDate(n)?+n-r.now():n;l<0&&(l=0);var a=0;return r.schedule(function(){c.closed||(c.next(a++),0<=i?this.schedule(void 0,i):c.complete())},l)})}return ko.timer=o,ko}var nh;function Xy(){if(nh)return No;nh=1,Object.defineProperty(No,"__esModule",{value:!0}),No.interval=void 0;var e=sr(),g=ti();function O(d,o){return d===void 0&&(d=0),o===void 0&&(o=e.asyncScheduler),d<0&&(d=0),g.timer(d,d,o)}return No.interval=O,No}var Lo={},ih;function wO(){if(ih)return Lo;ih=1,Object.defineProperty(Lo,"__esModule",{value:!0}),Lo.merge=void 0;var e=Nu(),g=Oe(),O=Gr(),d=lr(),o=on();function n(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var i=d.popScheduler(t),c=d.popNumber(t,1/0),l=t;return l.length?l.length===1?g.innerFrom(l[0]):e.mergeAll(c)(o.from(l,i)):O.EMPTY}return Lo.merge=n,Lo}var vs={},oh;function ah(){return oh||(oh=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.never=e.NEVER=void 0;var g=Ie(),O=ze();e.NEVER=new g.Observable(O.noop);function d(){return e.NEVER}e.never=d})(vs)),vs}var Do={},Uo={},uh;function Pi(){if(uh)return Uo;uh=1,Object.defineProperty(Uo,"__esModule",{value:!0}),Uo.argsOrArgArray=void 0;var e=Array.isArray;function g(O){return O.length===1&&e(O[0])?O[0]:O}return Uo.argsOrArgArray=g,Uo}var ch;function Jy(){if(ch)return Do;ch=1,Object.defineProperty(Do,"__esModule",{value:!0}),Do.onErrorResumeNext=void 0;var e=Ie(),g=Pi(),O=he(),d=ze(),o=Oe();function n(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var i=g.argsOrArgArray(t);return new e.Observable(function(c){var l=0,a=function(){if(l<i.length){var _=void 0;try{_=o.innerFrom(i[l++])}catch{a();return}var p=new O.OperatorSubscriber(c,void 0,d.noop,d.noop);_.subscribe(p),p.add(a)}else c.complete()};a()})}return Do.onErrorResumeNext=n,Do}var qo={},sh;function EO(){if(sh)return qo;sh=1,Object.defineProperty(qo,"__esModule",{value:!0}),qo.pairs=void 0;var e=on();function g(O,d){return e.from(Object.entries(O),d)}return qo.pairs=g,qo}var Fo={},Bo={},lh;function eb(){if(lh)return Bo;lh=1,Object.defineProperty(Bo,"__esModule",{value:!0}),Bo.not=void 0;function e(g,O){return function(d,o){return!g.call(O,d,o)}}return Bo.not=e,Bo}var xo={},fh;function un(){if(fh)return xo;fh=1,Object.defineProperty(xo,"__esModule",{value:!0}),xo.filter=void 0;var e=fe(),g=he();function O(d,o){return e.operate(function(n,t){var r=0;n.subscribe(g.createOperatorSubscriber(t,function(i){return d.call(o,i,r++)&&t.next(i)}))})}return xo.filter=O,xo}var dh;function TO(){if(dh)return Fo;dh=1,Object.defineProperty(Fo,"__esModule",{value:!0}),Fo.partition=void 0;var e=eb(),g=un(),O=Oe();function d(o,n,t){return[g.filter(n,t)(O.innerFrom(o)),g.filter(e.not(n,t))(O.innerFrom(o))]}return Fo.partition=d,Fo}var xn={},hh;function rb(){if(hh)return xn;hh=1,Object.defineProperty(xn,"__esModule",{value:!0}),xn.raceInit=xn.race=void 0;var e=Ie(),g=Oe(),O=Pi(),d=he();function o(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return t=O.argsOrArgArray(t),t.length===1?g.innerFrom(t[0]):new e.Observable(n(t))}xn.race=o;function n(t){return function(r){for(var i=[],c=function(a){i.push(g.innerFrom(t[a]).subscribe(d.createOperatorSubscriber(r,function(_){if(i){for(var p=0;p<i.length;p++)p!==a&&i[p].unsubscribe();i=null}r.next(_)})))},l=0;i&&!r.closed&&l<t.length;l++)c(l)}}return xn.raceInit=n,xn}var Wo={},vh;function SO(){if(vh)return Wo;vh=1,Object.defineProperty(Wo,"__esModule",{value:!0}),Wo.range=void 0;var e=Ie(),g=Gr();function O(d,o,n){if(o==null&&(o=d,d=0),o<=0)return g.EMPTY;var t=o+d;return new e.Observable(n?function(r){var i=d;return n.schedule(function(){i<t?(r.next(i++),this.schedule()):r.complete()})}:function(r){for(var i=d;i<t&&!r.closed;)r.next(i++);r.complete()})}return Wo.range=O,Wo}var Vo={},_h;function PO(){if(_h)return Vo;_h=1,Object.defineProperty(Vo,"__esModule",{value:!0}),Vo.using=void 0;var e=Ie(),g=Oe(),O=Gr();function d(o,n){return new e.Observable(function(t){var r=o(),i=n(r),c=i?g.innerFrom(i):O.EMPTY;return c.subscribe(t),function(){r&&r.unsubscribe()}})}return Vo.using=d,Vo}var it={},ph;function Ds(){if(ph)return it;ph=1;var e=it&&it.__read||function(c,l){var a=typeof Symbol=="function"&&c[Symbol.iterator];if(!a)return c;var _=a.call(c),p,m=[],h;try{for(;(l===void 0||l-- >0)&&!(p=_.next()).done;)m.push(p.value)}catch(u){h={error:u}}finally{try{p&&!p.done&&(a=_.return)&&a.call(_)}finally{if(h)throw h.error}}return m},g=it&&it.__spreadArray||function(c,l){for(var a=0,_=l.length,p=c.length;a<_;a++,p++)c[p]=l[a];return c};Object.defineProperty(it,"__esModule",{value:!0}),it.zip=void 0;var O=Ie(),d=Oe(),o=Pi(),n=Gr(),t=he(),r=lr();function i(){for(var c=[],l=0;l<arguments.length;l++)c[l]=arguments[l];var a=r.popResultSelector(c),_=o.argsOrArgArray(c);return _.length?new O.Observable(function(p){var m=_.map(function(){return[]}),h=_.map(function(){return!1});p.add(function(){m=h=null});for(var u=function(y){d.innerFrom(_[y]).subscribe(t.createOperatorSubscriber(p,function(s){if(m[y].push(s),m.every(function(b){return b.length})){var f=m.map(function(b){return b.shift()});p.next(a?a.apply(void 0,g([],e(f))):f),m.some(function(b,E){return!b.length&&h[E]})&&p.complete()}},function(){h[y]=!0,!m[y].length&&p.complete()}))},v=0;!p.closed&&v<_.length;v++)u(v);return function(){m=h=null}}):n.EMPTY}return it.zip=i,it}var _s={},yh;function RO(){return yh||(yh=1,Object.defineProperty(_s,"__esModule",{value:!0})),_s}var Ho={},bh;function Us(){if(bh)return Ho;bh=1,Object.defineProperty(Ho,"__esModule",{value:!0}),Ho.audit=void 0;var e=fe(),g=Oe(),O=he();function d(o){return e.operate(function(n,t){var r=!1,i=null,c=null,l=!1,a=function(){if(c?.unsubscribe(),c=null,r){r=!1;var p=i;i=null,t.next(p)}l&&t.complete()},_=function(){c=null,l&&t.complete()};n.subscribe(O.createOperatorSubscriber(t,function(p){r=!0,i=p,c||g.innerFrom(o(p)).subscribe(c=O.createOperatorSubscriber(t,a,_))},function(){l=!0,(!r||!c||c.closed)&&t.complete()}))})}return Ho.audit=d,Ho}var zo={},mh;function tb(){if(mh)return zo;mh=1,Object.defineProperty(zo,"__esModule",{value:!0}),zo.auditTime=void 0;var e=sr(),g=Us(),O=ti();function d(o,n){return n===void 0&&(n=e.asyncScheduler),g.audit(function(){return O.timer(o,n)})}return zo.auditTime=d,zo}var $o={},gh;function nb(){if(gh)return $o;gh=1,Object.defineProperty($o,"__esModule",{value:!0}),$o.buffer=void 0;var e=fe(),g=ze(),O=he(),d=Oe();function o(n){return e.operate(function(t,r){var i=[];return t.subscribe(O.createOperatorSubscriber(r,function(c){return i.push(c)},function(){r.next(i),r.complete()})),d.innerFrom(n).subscribe(O.createOperatorSubscriber(r,function(){var c=i;i=[],r.next(c)},g.noop)),function(){i=null}})}return $o.buffer=o,$o}var Wn={},Oh;function ib(){if(Oh)return Wn;Oh=1;var e=Wn&&Wn.__values||function(n){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&n[t],i=0;if(r)return r.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&i>=n.length&&(n=void 0),{value:n&&n[i++],done:!n}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.bufferCount=void 0;var g=fe(),O=he(),d=tn();function o(n,t){return t===void 0&&(t=null),t=t??n,g.operate(function(r,i){var c=[],l=0;r.subscribe(O.createOperatorSubscriber(i,function(a){var _,p,m,h,u=null;l++%t===0&&c.push([]);try{for(var v=e(c),y=v.next();!y.done;y=v.next()){var s=y.value;s.push(a),n<=s.length&&(u=u??[],u.push(s))}}catch(E){_={error:E}}finally{try{y&&!y.done&&(p=v.return)&&p.call(v)}finally{if(_)throw _.error}}if(u)try{for(var f=e(u),b=f.next();!b.done;b=f.next()){var s=b.value;d.arrRemove(c,s),i.next(s)}}catch(E){m={error:E}}finally{try{b&&!b.done&&(h=f.return)&&h.call(f)}finally{if(m)throw m.error}}},function(){var a,_;try{for(var p=e(c),m=p.next();!m.done;m=p.next()){var h=m.value;i.next(h)}}catch(u){a={error:u}}finally{try{m&&!m.done&&(_=p.return)&&_.call(p)}finally{if(a)throw a.error}}i.complete()},void 0,function(){c=null}))})}return Wn.bufferCount=o,Wn}var Vn={},wh;function ob(){if(wh)return Vn;wh=1;var e=Vn&&Vn.__values||function(c){var l=typeof Symbol=="function"&&Symbol.iterator,a=l&&c[l],_=0;if(a)return a.call(c);if(c&&typeof c.length=="number")return{next:function(){return c&&_>=c.length&&(c=void 0),{value:c&&c[_++],done:!c}}};throw new TypeError(l?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(Vn,"__esModule",{value:!0}),Vn.bufferTime=void 0;var g=vr(),O=fe(),d=he(),o=tn(),n=sr(),t=lr(),r=nn();function i(c){for(var l,a,_=[],p=1;p<arguments.length;p++)_[p-1]=arguments[p];var m=(l=t.popScheduler(_))!==null&&l!==void 0?l:n.asyncScheduler,h=(a=_[0])!==null&&a!==void 0?a:null,u=_[1]||1/0;return O.operate(function(v,y){var s=[],f=!1,b=function(T){var R=T.buffer,L=T.subs;L.unsubscribe(),o.arrRemove(s,T),y.next(R),f&&E()},E=function(){if(s){var T=new g.Subscription;y.add(T);var R=[],L={buffer:R,subs:T};s.push(L),r.executeSchedule(T,m,function(){return b(L)},c)}};h!==null&&h>=0?r.executeSchedule(y,m,E,h,!0):f=!0,E();var w=d.createOperatorSubscriber(y,function(T){var R,L,j=s.slice();try{for(var M=e(j),x=M.next();!x.done;x=M.next()){var Z=x.value,H=Z.buffer;H.push(T),u<=H.length&&b(Z)}}catch(K){R={error:K}}finally{try{x&&!x.done&&(L=M.return)&&L.call(M)}finally{if(R)throw R.error}}},function(){for(;s?.length;)y.next(s.shift().buffer);w?.unsubscribe(),y.complete(),y.unsubscribe()},void 0,function(){return s=null});v.subscribe(w)})}return Vn.bufferTime=i,Vn}var Hn={},Eh;function ab(){if(Eh)return Hn;Eh=1;var e=Hn&&Hn.__values||function(i){var c=typeof Symbol=="function"&&Symbol.iterator,l=c&&i[c],a=0;if(l)return l.call(i);if(i&&typeof i.length=="number")return{next:function(){return i&&a>=i.length&&(i=void 0),{value:i&&i[a++],done:!i}}};throw new TypeError(c?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(Hn,"__esModule",{value:!0}),Hn.bufferToggle=void 0;var g=vr(),O=fe(),d=Oe(),o=he(),n=ze(),t=tn();function r(i,c){return O.operate(function(l,a){var _=[];d.innerFrom(i).subscribe(o.createOperatorSubscriber(a,function(p){var m=[];_.push(m);var h=new g.Subscription,u=function(){t.arrRemove(_,m),a.next(m),h.unsubscribe()};h.add(d.innerFrom(c(p)).subscribe(o.createOperatorSubscriber(a,u,n.noop)))},n.noop)),l.subscribe(o.createOperatorSubscriber(a,function(p){var m,h;try{for(var u=e(_),v=u.next();!v.done;v=u.next()){var y=v.value;y.push(p)}}catch(s){m={error:s}}finally{try{v&&!v.done&&(h=u.return)&&h.call(u)}finally{if(m)throw m.error}}},function(){for(;_.length>0;)a.next(_.shift());a.complete()}))})}return Hn.bufferToggle=r,Hn}var Go={},Th;function ub(){if(Th)return Go;Th=1,Object.defineProperty(Go,"__esModule",{value:!0}),Go.bufferWhen=void 0;var e=fe(),g=ze(),O=he(),d=Oe();function o(n){return e.operate(function(t,r){var i=null,c=null,l=function(){c?.unsubscribe();var a=i;i=[],a&&r.next(a),d.innerFrom(n()).subscribe(c=O.createOperatorSubscriber(r,l,g.noop))};l(),t.subscribe(O.createOperatorSubscriber(r,function(a){return i?.push(a)},function(){i&&r.next(i),r.complete()},void 0,function(){return i=c=null}))})}return Go.bufferWhen=o,Go}var Yo={},Sh;function cb(){if(Sh)return Yo;Sh=1,Object.defineProperty(Yo,"__esModule",{value:!0}),Yo.catchError=void 0;var e=Oe(),g=he(),O=fe();function d(o){return O.operate(function(n,t){var r=null,i=!1,c;r=n.subscribe(g.createOperatorSubscriber(t,void 0,void 0,function(l){c=e.innerFrom(o(l,d(o)(n))),r?(r.unsubscribe(),r=null,c.subscribe(t)):i=!0})),i&&(r.unsubscribe(),r=null,c.subscribe(t))})}return Yo.catchError=d,Yo}var Ko={},Zo={},Qo={},Xo={},Jo={},ea={},Ph;function sb(){if(Ph)return ea;Ph=1,Object.defineProperty(ea,"__esModule",{value:!0}),ea.scanInternals=void 0;var e=he();function g(O,d,o,n,t){return function(r,i){var c=o,l=d,a=0;r.subscribe(e.createOperatorSubscriber(i,function(_){var p=a++;l=c?O(l,_,p):(c=!0,_),n&&i.next(l)},t&&(function(){c&&i.next(l),i.complete()})))}}return ea.scanInternals=g,ea}var Rh;function Ri(){if(Rh)return Jo;Rh=1,Object.defineProperty(Jo,"__esModule",{value:!0}),Jo.reduce=void 0;var e=sb(),g=fe();function O(d,o){return g.operate(e.scanInternals(d,o,arguments.length>=2,!1,!0))}return Jo.reduce=O,Jo}var Ch;function qs(){if(Ch)return Xo;Ch=1,Object.defineProperty(Xo,"__esModule",{value:!0}),Xo.toArray=void 0;var e=Ri(),g=fe(),O=function(o,n){return o.push(n),o};function d(){return g.operate(function(o,n){e.reduce(O,[])(o).subscribe(n)})}return Xo.toArray=d,Xo}var Ih;function lb(){if(Ih)return Qo;Ih=1,Object.defineProperty(Qo,"__esModule",{value:!0}),Qo.joinAllInternals=void 0;var e=$e(),g=ri(),O=sc(),d=wt(),o=qs();function n(t,r){return O.pipe(o.toArray(),d.mergeMap(function(i){return t(i)}),r?g.mapOneOrManyArgs(r):e.identity)}return Qo.joinAllInternals=n,Qo}var Ah;function Fs(){if(Ah)return Zo;Ah=1,Object.defineProperty(Zo,"__esModule",{value:!0}),Zo.combineLatestAll=void 0;var e=ks(),g=lb();function O(d){return g.joinAllInternals(e.combineLatest,d)}return Zo.combineLatestAll=O,Zo}var jh;function fb(){if(jh)return Ko;jh=1,Object.defineProperty(Ko,"__esModule",{value:!0}),Ko.combineAll=void 0;var e=Fs();return Ko.combineAll=e.combineLatestAll,Ko}var ot={},at={},Mh;function db(){if(Mh)return at;Mh=1;var e=at&&at.__read||function(c,l){var a=typeof Symbol=="function"&&c[Symbol.iterator];if(!a)return c;var _=a.call(c),p,m=[],h;try{for(;(l===void 0||l-- >0)&&!(p=_.next()).done;)m.push(p.value)}catch(u){h={error:u}}finally{try{p&&!p.done&&(a=_.return)&&a.call(_)}finally{if(h)throw h.error}}return m},g=at&&at.__spreadArray||function(c,l){for(var a=0,_=l.length,p=c.length;a<_;a++,p++)c[p]=l[a];return c};Object.defineProperty(at,"__esModule",{value:!0}),at.combineLatest=void 0;var O=ks(),d=fe(),o=Pi(),n=ri(),t=sc(),r=lr();function i(){for(var c=[],l=0;l<arguments.length;l++)c[l]=arguments[l];var a=r.popResultSelector(c);return a?t.pipe(i.apply(void 0,g([],e(c))),n.mapOneOrManyArgs(a)):d.operate(function(_,p){O.combineLatestInit(g([_],e(o.argsOrArgArray(c))))(p)})}return at.combineLatest=i,at}var Nh;function hb(){if(Nh)return ot;Nh=1;var e=ot&&ot.__read||function(o,n){var t=typeof Symbol=="function"&&o[Symbol.iterator];if(!t)return o;var r=t.call(o),i,c=[],l;try{for(;(n===void 0||n-- >0)&&!(i=r.next()).done;)c.push(i.value)}catch(a){l={error:a}}finally{try{i&&!i.done&&(t=r.return)&&t.call(r)}finally{if(l)throw l.error}}return c},g=ot&&ot.__spreadArray||function(o,n){for(var t=0,r=n.length,i=o.length;t<r;t++,i++)o[i]=n[t];return o};Object.defineProperty(ot,"__esModule",{value:!0}),ot.combineLatestWith=void 0;var O=db();function d(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return O.combineLatest.apply(void 0,g([],e(o)))}return ot.combineLatestWith=d,ot}var ra={},kh;function Bs(){if(kh)return ra;kh=1,Object.defineProperty(ra,"__esModule",{value:!0}),ra.concatMap=void 0;var e=wt(),g=Re();function O(d,o){return g.isFunction(o)?e.mergeMap(d,o,1):e.mergeMap(d,1)}return ra.concatMap=O,ra}var ta={},Lh;function vb(){if(Lh)return ta;Lh=1,Object.defineProperty(ta,"__esModule",{value:!0}),ta.concatMapTo=void 0;var e=Bs(),g=Re();function O(d,o){return g.isFunction(o)?e.concatMap(function(){return d},o):e.concatMap(function(){return d})}return ta.concatMapTo=O,ta}var ut={},ct={},Dh;function _b(){if(Dh)return ct;Dh=1;var e=ct&&ct.__read||function(r,i){var c=typeof Symbol=="function"&&r[Symbol.iterator];if(!c)return r;var l=c.call(r),a,_=[],p;try{for(;(i===void 0||i-- >0)&&!(a=l.next()).done;)_.push(a.value)}catch(m){p={error:m}}finally{try{a&&!a.done&&(c=l.return)&&c.call(l)}finally{if(p)throw p.error}}return _},g=ct&&ct.__spreadArray||function(r,i){for(var c=0,l=i.length,a=r.length;c<l;c++,a++)r[a]=i[c];return r};Object.defineProperty(ct,"__esModule",{value:!0}),ct.concat=void 0;var O=fe(),d=dc(),o=lr(),n=on();function t(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var c=o.popScheduler(r);return O.operate(function(l,a){d.concatAll()(n.from(g([l],e(r)),c)).subscribe(a)})}return ct.concat=t,ct}var Uh;function pb(){if(Uh)return ut;Uh=1;var e=ut&&ut.__read||function(o,n){var t=typeof Symbol=="function"&&o[Symbol.iterator];if(!t)return o;var r=t.call(o),i,c=[],l;try{for(;(n===void 0||n-- >0)&&!(i=r.next()).done;)c.push(i.value)}catch(a){l={error:a}}finally{try{i&&!i.done&&(t=r.return)&&t.call(r)}finally{if(l)throw l.error}}return c},g=ut&&ut.__spreadArray||function(o,n){for(var t=0,r=n.length,i=o.length;t<r;t++,i++)o[i]=n[t];return o};Object.defineProperty(ut,"__esModule",{value:!0}),ut.concatWith=void 0;var O=_b();function d(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return O.concat.apply(void 0,g([],e(o)))}return ut.concatWith=d,ut}var na={},ia={},qh;function CO(){if(qh)return ia;qh=1,Object.defineProperty(ia,"__esModule",{value:!0}),ia.fromSubscribable=void 0;var e=Ie();function g(O){return new e.Observable(function(d){return O.subscribe(d)})}return ia.fromSubscribable=g,ia}var Fh;function _c(){if(Fh)return na;Fh=1,Object.defineProperty(na,"__esModule",{value:!0}),na.connect=void 0;var e=Ge(),g=Oe(),O=fe(),d=CO(),o={connector:function(){return new e.Subject}};function n(t,r){r===void 0&&(r=o);var i=r.connector;return O.operate(function(c,l){var a=i();g.innerFrom(t(d.fromSubscribable(a))).subscribe(l),l.add(c.subscribe(a))})}return na.connect=n,na}var oa={},Bh;function yb(){if(Bh)return oa;Bh=1,Object.defineProperty(oa,"__esModule",{value:!0}),oa.count=void 0;var e=Ri();function g(O){return e.reduce(function(d,o,n){return!O||O(o,n)?d+1:d},0)}return oa.count=g,oa}var aa={},xh;function bb(){if(xh)return aa;xh=1,Object.defineProperty(aa,"__esModule",{value:!0}),aa.debounce=void 0;var e=fe(),g=ze(),O=he(),d=Oe();function o(n){return e.operate(function(t,r){var i=!1,c=null,l=null,a=function(){if(l?.unsubscribe(),l=null,i){i=!1;var _=c;c=null,r.next(_)}};t.subscribe(O.createOperatorSubscriber(r,function(_){l?.unsubscribe(),i=!0,c=_,l=O.createOperatorSubscriber(r,a,g.noop),d.innerFrom(n(_)).subscribe(l)},function(){a(),r.complete()},void 0,function(){c=l=null}))})}return aa.debounce=o,aa}var ua={},Wh;function mb(){if(Wh)return ua;Wh=1,Object.defineProperty(ua,"__esModule",{value:!0}),ua.debounceTime=void 0;var e=sr(),g=fe(),O=he();function d(o,n){return n===void 0&&(n=e.asyncScheduler),g.operate(function(t,r){var i=null,c=null,l=null,a=function(){if(i){i.unsubscribe(),i=null;var p=c;c=null,r.next(p)}};function _(){var p=l+o,m=n.now();if(m<p){i=this.schedule(void 0,p-m),r.add(i);return}a()}t.subscribe(O.createOperatorSubscriber(r,function(p){c=p,l=n.now(),i||(i=n.schedule(_,o),r.add(i))},function(){a(),r.complete()},void 0,function(){c=i=null}))})}return ua.debounceTime=d,ua}var ca={},Vh;function ku(){if(Vh)return ca;Vh=1,Object.defineProperty(ca,"__esModule",{value:!0}),ca.defaultIfEmpty=void 0;var e=fe(),g=he();function O(d){return e.operate(function(o,n){var t=!1;o.subscribe(g.createOperatorSubscriber(n,function(r){t=!0,n.next(r)},function(){t||n.next(d),n.complete()}))})}return ca.defaultIfEmpty=O,ca}var sa={},la={},fa={},Hh;function Lu(){if(Hh)return fa;Hh=1,Object.defineProperty(fa,"__esModule",{value:!0}),fa.take=void 0;var e=Gr(),g=fe(),O=he();function d(o){return o<=0?function(){return e.EMPTY}:g.operate(function(n,t){var r=0;n.subscribe(O.createOperatorSubscriber(t,function(i){++r<=o&&(t.next(i),o<=r&&t.complete())}))})}return fa.take=d,fa}var da={},zh;function xs(){if(zh)return da;zh=1,Object.defineProperty(da,"__esModule",{value:!0}),da.ignoreElements=void 0;var e=fe(),g=he(),O=ze();function d(){return e.operate(function(o,n){o.subscribe(g.createOperatorSubscriber(n,O.noop))})}return da.ignoreElements=d,da}var ha={},$h;function Ws(){if($h)return ha;$h=1,Object.defineProperty(ha,"__esModule",{value:!0}),ha.mapTo=void 0;var e=an();function g(O){return e.map(function(){return O})}return ha.mapTo=g,ha}var Gh;function Vs(){if(Gh)return la;Gh=1,Object.defineProperty(la,"__esModule",{value:!0}),la.delayWhen=void 0;var e=hc(),g=Lu(),O=xs(),d=Ws(),o=wt(),n=Oe();function t(r,i){return i?function(c){return e.concat(i.pipe(g.take(1),O.ignoreElements()),c.pipe(t(r)))}:o.mergeMap(function(c,l){return n.innerFrom(r(c,l)).pipe(g.take(1),d.mapTo(c))})}return la.delayWhen=t,la}var Yh;function gb(){if(Yh)return sa;Yh=1,Object.defineProperty(sa,"__esModule",{value:!0}),sa.delay=void 0;var e=sr(),g=Vs(),O=ti();function d(o,n){n===void 0&&(n=e.asyncScheduler);var t=O.timer(o,n);return g.delayWhen(function(){return t})}return sa.delay=d,sa}var va={},Kh;function Ob(){if(Kh)return va;Kh=1,Object.defineProperty(va,"__esModule",{value:!0}),va.dematerialize=void 0;var e=Ms(),g=fe(),O=he();function d(){return g.operate(function(o,n){o.subscribe(O.createOperatorSubscriber(n,function(t){return e.observeNotification(t,n)}))})}return va.dematerialize=d,va}var _a={},Zh;function wb(){if(Zh)return _a;Zh=1,Object.defineProperty(_a,"__esModule",{value:!0}),_a.distinct=void 0;var e=fe(),g=he(),O=ze(),d=Oe();function o(n,t){return e.operate(function(r,i){var c=new Set;r.subscribe(g.createOperatorSubscriber(i,function(l){var a=n?n(l):l;c.has(a)||(c.add(a),i.next(l))})),t&&d.innerFrom(t).subscribe(g.createOperatorSubscriber(i,function(){return c.clear()},O.noop))})}return _a.distinct=o,_a}var pa={},Qh;function Hs(){if(Qh)return pa;Qh=1,Object.defineProperty(pa,"__esModule",{value:!0}),pa.distinctUntilChanged=void 0;var e=$e(),g=fe(),O=he();function d(n,t){return t===void 0&&(t=e.identity),n=n??o,g.operate(function(r,i){var c,l=!0;r.subscribe(O.createOperatorSubscriber(i,function(a){var _=t(a);(l||!n(c,_))&&(l=!1,c=_,i.next(a))}))})}pa.distinctUntilChanged=d;function o(n,t){return n===t}return pa}var ya={},Xh;function Eb(){if(Xh)return ya;Xh=1,Object.defineProperty(ya,"__esModule",{value:!0}),ya.distinctUntilKeyChanged=void 0;var e=Hs();function g(O,d){return e.distinctUntilChanged(function(o,n){return d?d(o[O],n[O]):o[O]===n[O]})}return ya.distinctUntilKeyChanged=g,ya}var ba={},ma={},Jh;function Du(){if(Jh)return ma;Jh=1,Object.defineProperty(ma,"__esModule",{value:!0}),ma.throwIfEmpty=void 0;var e=ei(),g=fe(),O=he();function d(n){return n===void 0&&(n=o),g.operate(function(t,r){var i=!1;t.subscribe(O.createOperatorSubscriber(r,function(c){i=!0,r.next(c)},function(){return i?r.complete():r.error(n())}))})}ma.throwIfEmpty=d;function o(){return new e.EmptyError}return ma}var ev;function Tb(){if(ev)return ba;ev=1,Object.defineProperty(ba,"__esModule",{value:!0}),ba.elementAt=void 0;var e=$y(),g=un(),O=Du(),d=ku(),o=Lu();function n(t,r){if(t<0)throw new e.ArgumentOutOfRangeError;var i=arguments.length>=2;return function(c){return c.pipe(g.filter(function(l,a){return a===t}),o.take(1),i?d.defaultIfEmpty(r):O.throwIfEmpty(function(){return new e.ArgumentOutOfRangeError}))}}return ba.elementAt=n,ba}var st={},rv;function Sb(){if(rv)return st;rv=1;var e=st&&st.__read||function(n,t){var r=typeof Symbol=="function"&&n[Symbol.iterator];if(!r)return n;var i=r.call(n),c,l=[],a;try{for(;(t===void 0||t-- >0)&&!(c=i.next()).done;)l.push(c.value)}catch(_){a={error:_}}finally{try{c&&!c.done&&(r=i.return)&&r.call(i)}finally{if(a)throw a.error}}return l},g=st&&st.__spreadArray||function(n,t){for(var r=0,i=t.length,c=n.length;r<i;r++,c++)n[c]=t[r];return n};Object.defineProperty(st,"__esModule",{value:!0}),st.endWith=void 0;var O=hc(),d=js();function o(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return function(r){return O.concat(r,d.of.apply(void 0,g([],e(n))))}}return st.endWith=o,st}var ga={},tv;function Pb(){if(tv)return ga;tv=1,Object.defineProperty(ga,"__esModule",{value:!0}),ga.every=void 0;var e=fe(),g=he();function O(d,o){return e.operate(function(n,t){var r=0;n.subscribe(g.createOperatorSubscriber(t,function(i){d.call(o,i,r++,n)||(t.next(!1),t.complete())},function(){t.next(!0),t.complete()}))})}return ga.every=O,ga}var Oa={},wa={},Ea={},nv;function zs(){if(nv)return Ea;nv=1,Object.defineProperty(Ea,"__esModule",{value:!0}),Ea.exhaustMap=void 0;var e=an(),g=Oe(),O=fe(),d=he();function o(n,t){return t?function(r){return r.pipe(o(function(i,c){return g.innerFrom(n(i,c)).pipe(e.map(function(l,a){return t(i,l,c,a)}))}))}:O.operate(function(r,i){var c=0,l=null,a=!1;r.subscribe(d.createOperatorSubscriber(i,function(_){l||(l=d.createOperatorSubscriber(i,void 0,function(){l=null,a&&i.complete()}),g.innerFrom(n(_,c++)).subscribe(l))},function(){a=!0,!l&&i.complete()}))})}return Ea.exhaustMap=o,Ea}var iv;function $s(){if(iv)return wa;iv=1,Object.defineProperty(wa,"__esModule",{value:!0}),wa.exhaustAll=void 0;var e=zs(),g=$e();function O(){return e.exhaustMap(g.identity)}return wa.exhaustAll=O,wa}var ov;function Rb(){if(ov)return Oa;ov=1,Object.defineProperty(Oa,"__esModule",{value:!0}),Oa.exhaust=void 0;var e=$s();return Oa.exhaust=e.exhaustAll,Oa}var Ta={},av;function Cb(){if(av)return Ta;av=1,Object.defineProperty(Ta,"__esModule",{value:!0}),Ta.expand=void 0;var e=fe(),g=Ls();function O(d,o,n){return o===void 0&&(o=1/0),o=(o||0)<1?1/0:o,e.operate(function(t,r){return g.mergeInternals(t,r,d,o,void 0,!0,n)})}return Ta.expand=O,Ta}var Sa={},uv;function Ib(){if(uv)return Sa;uv=1,Object.defineProperty(Sa,"__esModule",{value:!0}),Sa.finalize=void 0;var e=fe();function g(O){return e.operate(function(d,o){try{d.subscribe(o)}finally{o.add(O)}})}return Sa.finalize=g,Sa}var zn={},cv;function Gs(){if(cv)return zn;cv=1,Object.defineProperty(zn,"__esModule",{value:!0}),zn.createFind=zn.find=void 0;var e=fe(),g=he();function O(o,n){return e.operate(d(o,n,"value"))}zn.find=O;function d(o,n,t){var r=t==="index";return function(i,c){var l=0;i.subscribe(g.createOperatorSubscriber(c,function(a){var _=l++;o.call(n,a,_,i)&&(c.next(r?_:a),c.complete())},function(){c.next(r?-1:void 0),c.complete()}))}}return zn.createFind=d,zn}var Pa={},sv;function Ab(){if(sv)return Pa;sv=1,Object.defineProperty(Pa,"__esModule",{value:!0}),Pa.findIndex=void 0;var e=fe(),g=Gs();function O(d,o){return e.operate(g.createFind(d,o,"index"))}return Pa.findIndex=O,Pa}var Ra={},lv;function jb(){if(lv)return Ra;lv=1,Object.defineProperty(Ra,"__esModule",{value:!0}),Ra.first=void 0;var e=ei(),g=un(),O=Lu(),d=ku(),o=Du(),n=$e();function t(r,i){var c=arguments.length>=2;return function(l){return l.pipe(r?g.filter(function(a,_){return r(a,_,l)}):n.identity,O.take(1),c?d.defaultIfEmpty(i):o.throwIfEmpty(function(){return new e.EmptyError}))}}return Ra.first=t,Ra}var Ca={},fv;function Mb(){if(fv)return Ca;fv=1,Object.defineProperty(Ca,"__esModule",{value:!0}),Ca.groupBy=void 0;var e=Ie(),g=Oe(),O=Ge(),d=fe(),o=he();function n(t,r,i,c){return d.operate(function(l,a){var _;!r||typeof r=="function"?_=r:(i=r.duration,_=r.element,c=r.connector);var p=new Map,m=function(f){p.forEach(f),f(a)},h=function(f){return m(function(b){return b.error(f)})},u=0,v=!1,y=new o.OperatorSubscriber(a,function(f){try{var b=t(f),E=p.get(b);if(!E){p.set(b,E=c?c():new O.Subject);var w=s(b,E);if(a.next(w),i){var T=o.createOperatorSubscriber(E,function(){E.complete(),T?.unsubscribe()},void 0,void 0,function(){return p.delete(b)});y.add(g.innerFrom(i(w)).subscribe(T))}}E.next(_?_(f):f)}catch(R){h(R)}},function(){return m(function(f){return f.complete()})},h,function(){return p.clear()},function(){return v=!0,u===0});l.subscribe(y);function s(f,b){var E=new e.Observable(function(w){u++;var T=b.subscribe(w);return function(){T.unsubscribe(),--u===0&&v&&y.unsubscribe()}});return E.key=f,E}})}return Ca.groupBy=n,Ca}var Ia={},dv;function Nb(){if(dv)return Ia;dv=1,Object.defineProperty(Ia,"__esModule",{value:!0}),Ia.isEmpty=void 0;var e=fe(),g=he();function O(){return e.operate(function(d,o){d.subscribe(g.createOperatorSubscriber(o,function(){o.next(!1),o.complete()},function(){o.next(!0),o.complete()}))})}return Ia.isEmpty=O,Ia}var Aa={},$n={},hv;function Ys(){if(hv)return $n;hv=1;var e=$n&&$n.__values||function(n){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&n[t],i=0;if(r)return r.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&i>=n.length&&(n=void 0),{value:n&&n[i++],done:!n}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty($n,"__esModule",{value:!0}),$n.takeLast=void 0;var g=Gr(),O=fe(),d=he();function o(n){return n<=0?function(){return g.EMPTY}:O.operate(function(t,r){var i=[];t.subscribe(d.createOperatorSubscriber(r,function(c){i.push(c),n<i.length&&i.shift()},function(){var c,l;try{for(var a=e(i),_=a.next();!_.done;_=a.next()){var p=_.value;r.next(p)}}catch(m){c={error:m}}finally{try{_&&!_.done&&(l=a.return)&&l.call(a)}finally{if(c)throw c.error}}r.complete()},void 0,function(){i=null}))})}return $n.takeLast=o,$n}var vv;function kb(){if(vv)return Aa;vv=1,Object.defineProperty(Aa,"__esModule",{value:!0}),Aa.last=void 0;var e=ei(),g=un(),O=Ys(),d=Du(),o=ku(),n=$e();function t(r,i){var c=arguments.length>=2;return function(l){return l.pipe(r?g.filter(function(a,_){return r(a,_,l)}):n.identity,O.takeLast(1),c?o.defaultIfEmpty(i):d.throwIfEmpty(function(){return new e.EmptyError}))}}return Aa.last=t,Aa}var ja={},_v;function Lb(){if(_v)return ja;_v=1,Object.defineProperty(ja,"__esModule",{value:!0}),ja.materialize=void 0;var e=Ms(),g=fe(),O=he();function d(){return g.operate(function(o,n){o.subscribe(O.createOperatorSubscriber(n,function(t){n.next(e.Notification.createNext(t))},function(){n.next(e.Notification.createComplete()),n.complete()},function(t){n.next(e.Notification.createError(t)),n.complete()}))})}return ja.materialize=d,ja}var Ma={},pv;function Db(){if(pv)return Ma;pv=1,Object.defineProperty(Ma,"__esModule",{value:!0}),Ma.max=void 0;var e=Ri(),g=Re();function O(d){return e.reduce(g.isFunction(d)?function(o,n){return d(o,n)>0?o:n}:function(o,n){return o>n?o:n})}return Ma.max=O,Ma}var Na={},yv;function Ub(){if(yv)return Na;yv=1,Object.defineProperty(Na,"__esModule",{value:!0}),Na.flatMap=void 0;var e=wt();return Na.flatMap=e.mergeMap,Na}var ka={},bv;function qb(){if(bv)return ka;bv=1,Object.defineProperty(ka,"__esModule",{value:!0}),ka.mergeMapTo=void 0;var e=wt(),g=Re();function O(d,o,n){return n===void 0&&(n=1/0),g.isFunction(o)?e.mergeMap(function(){return d},o,n):(typeof o=="number"&&(n=o),e.mergeMap(function(){return d},n))}return ka.mergeMapTo=O,ka}var La={},mv;function Fb(){if(mv)return La;mv=1,Object.defineProperty(La,"__esModule",{value:!0}),La.mergeScan=void 0;var e=fe(),g=Ls();function O(d,o,n){return n===void 0&&(n=1/0),e.operate(function(t,r){var i=o;return g.mergeInternals(t,r,function(c,l){return d(i,c,l)},n,function(c){i=c},!1,void 0,function(){return i=null})})}return La.mergeScan=O,La}var lt={},ft={},gv;function Bb(){if(gv)return ft;gv=1;var e=ft&&ft.__read||function(r,i){var c=typeof Symbol=="function"&&r[Symbol.iterator];if(!c)return r;var l=c.call(r),a,_=[],p;try{for(;(i===void 0||i-- >0)&&!(a=l.next()).done;)_.push(a.value)}catch(m){p={error:m}}finally{try{a&&!a.done&&(c=l.return)&&c.call(l)}finally{if(p)throw p.error}}return _},g=ft&&ft.__spreadArray||function(r,i){for(var c=0,l=i.length,a=r.length;c<l;c++,a++)r[a]=i[c];return r};Object.defineProperty(ft,"__esModule",{value:!0}),ft.merge=void 0;var O=fe(),d=Nu(),o=lr(),n=on();function t(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var c=o.popScheduler(r),l=o.popNumber(r,1/0);return O.operate(function(a,_){d.mergeAll(l)(n.from(g([a],e(r)),c)).subscribe(_)})}return ft.merge=t,ft}var Ov;function xb(){if(Ov)return lt;Ov=1;var e=lt&<.__read||function(o,n){var t=typeof Symbol=="function"&&o[Symbol.iterator];if(!t)return o;var r=t.call(o),i,c=[],l;try{for(;(n===void 0||n-- >0)&&!(i=r.next()).done;)c.push(i.value)}catch(a){l={error:a}}finally{try{i&&!i.done&&(t=r.return)&&t.call(r)}finally{if(l)throw l.error}}return c},g=lt&<.__spreadArray||function(o,n){for(var t=0,r=n.length,i=o.length;t<r;t++,i++)o[i]=n[t];return o};Object.defineProperty(lt,"__esModule",{value:!0}),lt.mergeWith=void 0;var O=Bb();function d(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return O.merge.apply(void 0,g([],e(o)))}return lt.mergeWith=d,lt}var Da={},wv;function Wb(){if(wv)return Da;wv=1,Object.defineProperty(Da,"__esModule",{value:!0}),Da.min=void 0;var e=Ri(),g=Re();function O(d){return e.reduce(g.isFunction(d)?function(o,n){return d(o,n)<0?o:n}:function(o,n){return o<n?o:n})}return Da.min=O,Da}var Ua={},Ev;function pc(){if(Ev)return Ua;Ev=1,Object.defineProperty(Ua,"__esModule",{value:!0}),Ua.multicast=void 0;var e=lc(),g=Re(),O=_c();function d(o,n){var t=g.isFunction(o)?o:function(){return o};return g.isFunction(n)?O.connect(n,{connector:t}):function(r){return new e.ConnectableObservable(r,t)}}return Ua.multicast=d,Ua}var Or={},Tv;function Vb(){if(Tv)return Or;Tv=1;var e=Or&&Or.__read||function(n,t){var r=typeof Symbol=="function"&&n[Symbol.iterator];if(!r)return n;var i=r.call(n),c,l=[],a;try{for(;(t===void 0||t-- >0)&&!(c=i.next()).done;)l.push(c.value)}catch(_){a={error:_}}finally{try{c&&!c.done&&(r=i.return)&&r.call(i)}finally{if(a)throw a.error}}return l},g=Or&&Or.__spreadArray||function(n,t){for(var r=0,i=t.length,c=n.length;r<i;r++,c++)n[c]=t[r];return n};Object.defineProperty(Or,"__esModule",{value:!0}),Or.onErrorResumeNext=Or.onErrorResumeNextWith=void 0;var O=Pi(),d=Jy();function o(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];var r=O.argsOrArgArray(n);return function(i){return d.onErrorResumeNext.apply(void 0,g([i],e(r)))}}return Or.onErrorResumeNextWith=o,Or.onErrorResumeNext=o,Or}var qa={},Sv;function Hb(){if(Sv)return qa;Sv=1,Object.defineProperty(qa,"__esModule",{value:!0}),qa.pairwise=void 0;var e=fe(),g=he();function O(){return e.operate(function(d,o){var n,t=!1;d.subscribe(g.createOperatorSubscriber(o,function(r){var i=n;n=r,t&&o.next([i,r]),t=!0}))})}return qa.pairwise=O,qa}var Fa={},Pv;function zb(){if(Pv)return Fa;Pv=1,Object.defineProperty(Fa,"__esModule",{value:!0}),Fa.pluck=void 0;var e=an();function g(){for(var O=[],d=0;d<arguments.length;d++)O[d]=arguments[d];var o=O.length;if(o===0)throw new Error("list of properties cannot be empty.");return e.map(function(n){for(var t=n,r=0;r<o;r++){var i=t?.[O[r]];if(typeof i<"u")t=i;else return}return t})}return Fa.pluck=g,Fa}var Ba={},Rv;function $b(){if(Rv)return Ba;Rv=1,Object.defineProperty(Ba,"__esModule",{value:!0}),Ba.publish=void 0;var e=Ge(),g=pc(),O=_c();function d(o){return o?function(n){return O.connect(o)(n)}:function(n){return g.multicast(new e.Subject)(n)}}return Ba.publish=d,Ba}var xa={},Cv;function Gb(){if(Cv)return xa;Cv=1,Object.defineProperty(xa,"__esModule",{value:!0}),xa.publishBehavior=void 0;var e=ky(),g=lc();function O(d){return function(o){var n=new e.BehaviorSubject(d);return new g.ConnectableObservable(o,function(){return n})}}return xa.publishBehavior=O,xa}var Wa={},Iv;function Yb(){if(Iv)return Wa;Iv=1,Object.defineProperty(Wa,"__esModule",{value:!0}),Wa.publishLast=void 0;var e=Cs(),g=lc();function O(){return function(d){var o=new e.AsyncSubject;return new g.ConnectableObservable(d,function(){return o})}}return Wa.publishLast=O,Wa}var Va={},Av;function Kb(){if(Av)return Va;Av=1,Object.defineProperty(Va,"__esModule",{value:!0}),Va.publishReplay=void 0;var e=Rs(),g=pc(),O=Re();function d(o,n,t,r){t&&!O.isFunction(t)&&(r=t);var i=O.isFunction(t)?t:void 0;return function(c){return g.multicast(new e.ReplaySubject(o,n,r),i)(c)}}return Va.publishReplay=d,Va}var dt={},jv;function Ks(){if(jv)return dt;jv=1;var e=dt&&dt.__read||function(t,r){var i=typeof Symbol=="function"&&t[Symbol.iterator];if(!i)return t;var c=i.call(t),l,a=[],_;try{for(;(r===void 0||r-- >0)&&!(l=c.next()).done;)a.push(l.value)}catch(p){_={error:p}}finally{try{l&&!l.done&&(i=c.return)&&i.call(c)}finally{if(_)throw _.error}}return a},g=dt&&dt.__spreadArray||function(t,r){for(var i=0,c=r.length,l=t.length;i<c;i++,l++)t[l]=r[i];return t};Object.defineProperty(dt,"__esModule",{value:!0}),dt.raceWith=void 0;var O=rb(),d=fe(),o=$e();function n(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return t.length?d.operate(function(i,c){O.raceInit(g([i],e(t)))(c)}):o.identity}return dt.raceWith=n,dt}var Ha={},Mv;function Zb(){if(Mv)return Ha;Mv=1,Object.defineProperty(Ha,"__esModule",{value:!0}),Ha.repeat=void 0;var e=Gr(),g=fe(),O=he(),d=Oe(),o=ti();function n(t){var r,i=1/0,c;return t!=null&&(typeof t=="object"?(r=t.count,i=r===void 0?1/0:r,c=t.delay):i=t),i<=0?function(){return e.EMPTY}:g.operate(function(l,a){var _=0,p,m=function(){if(p?.unsubscribe(),p=null,c!=null){var u=typeof c=="number"?o.timer(c):d.innerFrom(c(_)),v=O.createOperatorSubscriber(a,function(){v.unsubscribe(),h()});u.subscribe(v)}else h()},h=function(){var u=!1;p=l.subscribe(O.createOperatorSubscriber(a,void 0,function(){++_<i?p?m():u=!0:a.complete()})),u&&m()};h()})}return Ha.repeat=n,Ha}var za={},Nv;function Qb(){if(Nv)return za;Nv=1,Object.defineProperty(za,"__esModule",{value:!0}),za.repeatWhen=void 0;var e=Oe(),g=Ge(),O=fe(),d=he();function o(n){return O.operate(function(t,r){var i,c=!1,l,a=!1,_=!1,p=function(){return _&&a&&(r.complete(),!0)},m=function(){return l||(l=new g.Subject,e.innerFrom(n(l)).subscribe(d.createOperatorSubscriber(r,function(){i?h():c=!0},function(){a=!0,p()}))),l},h=function(){_=!1,i=t.subscribe(d.createOperatorSubscriber(r,void 0,function(){_=!0,!p()&&m().next()})),c&&(i.unsubscribe(),i=null,c=!1,h())};h()})}return za.repeatWhen=o,za}var $a={},kv;function Xb(){if(kv)return $a;kv=1,Object.defineProperty($a,"__esModule",{value:!0}),$a.retry=void 0;var e=fe(),g=he(),O=$e(),d=ti(),o=Oe();function n(t){t===void 0&&(t=1/0);var r;t&&typeof t=="object"?r=t:r={count:t};var i=r.count,c=i===void 0?1/0:i,l=r.delay,a=r.resetOnSuccess,_=a===void 0?!1:a;return c<=0?O.identity:e.operate(function(p,m){var h=0,u,v=function(){var y=!1;u=p.subscribe(g.createOperatorSubscriber(m,function(s){_&&(h=0),m.next(s)},void 0,function(s){if(h++<c){var f=function(){u?(u.unsubscribe(),u=null,v()):y=!0};if(l!=null){var b=typeof l=="number"?d.timer(l):o.innerFrom(l(s,h)),E=g.createOperatorSubscriber(m,function(){E.unsubscribe(),f()},function(){m.complete()});b.subscribe(E)}else f()}else m.error(s)})),y&&(u.unsubscribe(),u=null,v())};v()})}return $a.retry=n,$a}var Ga={},Lv;function Jb(){if(Lv)return Ga;Lv=1,Object.defineProperty(Ga,"__esModule",{value:!0}),Ga.retryWhen=void 0;var e=Oe(),g=Ge(),O=fe(),d=he();function o(n){return O.operate(function(t,r){var i,c=!1,l,a=function(){i=t.subscribe(d.createOperatorSubscriber(r,void 0,void 0,function(_){l||(l=new g.Subject,e.innerFrom(n(l)).subscribe(d.createOperatorSubscriber(r,function(){return i?a():c=!0}))),l&&l.next(_)})),c&&(i.unsubscribe(),i=null,c=!1,a())};a()})}return Ga.retryWhen=o,Ga}var Ya={},Dv;function Zs(){if(Dv)return Ya;Dv=1,Object.defineProperty(Ya,"__esModule",{value:!0}),Ya.sample=void 0;var e=Oe(),g=fe(),O=ze(),d=he();function o(n){return g.operate(function(t,r){var i=!1,c=null;t.subscribe(d.createOperatorSubscriber(r,function(l){i=!0,c=l})),e.innerFrom(n).subscribe(d.createOperatorSubscriber(r,function(){if(i){i=!1;var l=c;c=null,r.next(l)}},O.noop))})}return Ya.sample=o,Ya}var Ka={},Uv;function em(){if(Uv)return Ka;Uv=1,Object.defineProperty(Ka,"__esModule",{value:!0}),Ka.sampleTime=void 0;var e=sr(),g=Zs(),O=Xy();function d(o,n){return n===void 0&&(n=e.asyncScheduler),g.sample(O.interval(o,n))}return Ka.sampleTime=d,Ka}var Za={},qv;function rm(){if(qv)return Za;qv=1,Object.defineProperty(Za,"__esModule",{value:!0}),Za.scan=void 0;var e=fe(),g=sb();function O(d,o){return e.operate(g.scanInternals(d,o,arguments.length>=2,!0))}return Za.scan=O,Za}var Qa={},Fv;function tm(){if(Fv)return Qa;Fv=1,Object.defineProperty(Qa,"__esModule",{value:!0}),Qa.sequenceEqual=void 0;var e=fe(),g=he(),O=Oe();function d(n,t){return t===void 0&&(t=function(r,i){return r===i}),e.operate(function(r,i){var c=o(),l=o(),a=function(p){i.next(p),i.complete()},_=function(p,m){var h=g.createOperatorSubscriber(i,function(u){var v=m.buffer,y=m.complete;v.length===0?y?a(!1):p.buffer.push(u):!t(u,v.shift())&&a(!1)},function(){p.complete=!0;var u=m.complete,v=m.buffer;u&&a(v.length===0),h?.unsubscribe()});return h};r.subscribe(_(c,l)),O.innerFrom(n).subscribe(_(l,c))})}Qa.sequenceEqual=d;function o(){return{buffer:[],complete:!1}}return Qa}var ht={},Bv;function Qs(){if(Bv)return ht;Bv=1;var e=ht&&ht.__read||function(i,c){var l=typeof Symbol=="function"&&i[Symbol.iterator];if(!l)return i;var a=l.call(i),_,p=[],m;try{for(;(c===void 0||c-- >0)&&!(_=a.next()).done;)p.push(_.value)}catch(h){m={error:h}}finally{try{_&&!_.done&&(l=a.return)&&l.call(a)}finally{if(m)throw m.error}}return p},g=ht&&ht.__spreadArray||function(i,c){for(var l=0,a=c.length,_=i.length;l<a;l++,_++)i[_]=c[l];return i};Object.defineProperty(ht,"__esModule",{value:!0}),ht.share=void 0;var O=Oe(),d=Ge(),o=Cu(),n=fe();function t(i){i===void 0&&(i={});var c=i.connector,l=c===void 0?function(){return new d.Subject}:c,a=i.resetOnError,_=a===void 0?!0:a,p=i.resetOnComplete,m=p===void 0?!0:p,h=i.resetOnRefCountZero,u=h===void 0?!0:h;return function(v){var y,s,f,b=0,E=!1,w=!1,T=function(){s?.unsubscribe(),s=void 0},R=function(){T(),y=f=void 0,E=w=!1},L=function(){var j=y;R(),j?.unsubscribe()};return n.operate(function(j,M){b++,!w&&!E&&T();var x=f=f??l();M.add(function(){b--,b===0&&!w&&!E&&(s=r(L,u))}),x.subscribe(M),!y&&b>0&&(y=new o.SafeSubscriber({next:function(Z){return x.next(Z)},error:function(Z){w=!0,T(),s=r(R,_,Z),x.error(Z)},complete:function(){E=!0,T(),s=r(R,m),x.complete()}}),O.innerFrom(j).subscribe(y))})(v)}}ht.share=t;function r(i,c){for(var l=[],a=2;a<arguments.length;a++)l[a-2]=arguments[a];if(c===!0){i();return}if(c!==!1){var _=new o.SafeSubscriber({next:function(){_.unsubscribe(),i()}});return O.innerFrom(c.apply(void 0,g([],e(l)))).subscribe(_)}}return ht}var Xa={},xv;function nm(){if(xv)return Xa;xv=1,Object.defineProperty(Xa,"__esModule",{value:!0}),Xa.shareReplay=void 0;var e=Rs(),g=Qs();function O(d,o,n){var t,r,i,c,l=!1;return d&&typeof d=="object"?(t=d.bufferSize,c=t===void 0?1/0:t,r=d.windowTime,o=r===void 0?1/0:r,i=d.refCount,l=i===void 0?!1:i,n=d.scheduler):c=d??1/0,g.share({connector:function(){return new e.ReplaySubject(c,o,n)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:l})}return Xa.shareReplay=O,Xa}var Ja={},Wv;function im(){if(Wv)return Ja;Wv=1,Object.defineProperty(Ja,"__esModule",{value:!0}),Ja.single=void 0;var e=ei(),g=Yy(),O=Gy(),d=fe(),o=he();function n(t){return d.operate(function(r,i){var c=!1,l,a=!1,_=0;r.subscribe(o.createOperatorSubscriber(i,function(p){a=!0,(!t||t(p,_++,r))&&(c&&i.error(new g.SequenceError("Too many matching values")),c=!0,l=p)},function(){c?(i.next(l),i.complete()):i.error(a?new O.NotFoundError("No matching values"):new e.EmptyError)}))})}return Ja.single=n,Ja}var eu={},Vv;function om(){if(Vv)return eu;Vv=1,Object.defineProperty(eu,"__esModule",{value:!0}),eu.skip=void 0;var e=un();function g(O){return e.filter(function(d,o){return O<=o})}return eu.skip=g,eu}var ru={},Hv;function am(){if(Hv)return ru;Hv=1,Object.defineProperty(ru,"__esModule",{value:!0}),ru.skipLast=void 0;var e=$e(),g=fe(),O=he();function d(o){return o<=0?e.identity:g.operate(function(n,t){var r=new Array(o),i=0;return n.subscribe(O.createOperatorSubscriber(t,function(c){var l=i++;if(l<o)r[l]=c;else{var a=l%o,_=r[a];r[a]=c,t.next(_)}})),function(){r=null}})}return ru.skipLast=d,ru}var tu={},zv;function um(){if(zv)return tu;zv=1,Object.defineProperty(tu,"__esModule",{value:!0}),tu.skipUntil=void 0;var e=fe(),g=he(),O=Oe(),d=ze();function o(n){return e.operate(function(t,r){var i=!1,c=g.createOperatorSubscriber(r,function(){c?.unsubscribe(),i=!0},d.noop);O.innerFrom(n).subscribe(c),t.subscribe(g.createOperatorSubscriber(r,function(l){return i&&r.next(l)}))})}return tu.skipUntil=o,tu}var nu={},$v;function cm(){if($v)return nu;$v=1,Object.defineProperty(nu,"__esModule",{value:!0}),nu.skipWhile=void 0;var e=fe(),g=he();function O(d){return e.operate(function(o,n){var t=!1,r=0;o.subscribe(g.createOperatorSubscriber(n,function(i){return(t||(t=!d(i,r++)))&&n.next(i)}))})}return nu.skipWhile=O,nu}var iu={},Gv;function sm(){if(Gv)return iu;Gv=1,Object.defineProperty(iu,"__esModule",{value:!0}),iu.startWith=void 0;var e=hc(),g=lr(),O=fe();function d(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];var t=g.popScheduler(o);return O.operate(function(r,i){(t?e.concat(o,r,t):e.concat(o,r)).subscribe(i)})}return iu.startWith=d,iu}var ou={},au={},Yv;function Uu(){if(Yv)return au;Yv=1,Object.defineProperty(au,"__esModule",{value:!0}),au.switchMap=void 0;var e=Oe(),g=fe(),O=he();function d(o,n){return g.operate(function(t,r){var i=null,c=0,l=!1,a=function(){return l&&!i&&r.complete()};t.subscribe(O.createOperatorSubscriber(r,function(_){i?.unsubscribe();var p=0,m=c++;e.innerFrom(o(_,m)).subscribe(i=O.createOperatorSubscriber(r,function(h){return r.next(n?n(_,h,m,p++):h)},function(){i=null,a()}))},function(){l=!0,a()}))})}return au.switchMap=d,au}var Kv;function lm(){if(Kv)return ou;Kv=1,Object.defineProperty(ou,"__esModule",{value:!0}),ou.switchAll=void 0;var e=Uu(),g=$e();function O(){return e.switchMap(g.identity)}return ou.switchAll=O,ou}var uu={},Zv;function fm(){if(Zv)return uu;Zv=1,Object.defineProperty(uu,"__esModule",{value:!0}),uu.switchMapTo=void 0;var e=Uu(),g=Re();function O(d,o){return g.isFunction(o)?e.switchMap(function(){return d},o):e.switchMap(function(){return d})}return uu.switchMapTo=O,uu}var cu={},Qv;function dm(){if(Qv)return cu;Qv=1,Object.defineProperty(cu,"__esModule",{value:!0}),cu.switchScan=void 0;var e=Uu(),g=fe();function O(d,o){return g.operate(function(n,t){var r=o;return e.switchMap(function(i,c){return d(r,i,c)},function(i,c){return r=c,c})(n).subscribe(t),function(){r=null}})}return cu.switchScan=O,cu}var su={},Xv;function hm(){if(Xv)return su;Xv=1,Object.defineProperty(su,"__esModule",{value:!0}),su.takeUntil=void 0;var e=fe(),g=he(),O=Oe(),d=ze();function o(n){return e.operate(function(t,r){O.innerFrom(n).subscribe(g.createOperatorSubscriber(r,function(){return r.complete()},d.noop)),!r.closed&&t.subscribe(r)})}return su.takeUntil=o,su}var lu={},Jv;function vm(){if(Jv)return lu;Jv=1,Object.defineProperty(lu,"__esModule",{value:!0}),lu.takeWhile=void 0;var e=fe(),g=he();function O(d,o){return o===void 0&&(o=!1),e.operate(function(n,t){var r=0;n.subscribe(g.createOperatorSubscriber(t,function(i){var c=d(i,r++);(c||o)&&t.next(i),!c&&t.complete()}))})}return lu.takeWhile=O,lu}var fu={},e_;function _m(){if(e_)return fu;e_=1,Object.defineProperty(fu,"__esModule",{value:!0}),fu.tap=void 0;var e=Re(),g=fe(),O=he(),d=$e();function o(n,t,r){var i=e.isFunction(n)||t||r?{next:n,error:t,complete:r}:n;return i?g.operate(function(c,l){var a;(a=i.subscribe)===null||a===void 0||a.call(i);var _=!0;c.subscribe(O.createOperatorSubscriber(l,function(p){var m;(m=i.next)===null||m===void 0||m.call(i,p),l.next(p)},function(){var p;_=!1,(p=i.complete)===null||p===void 0||p.call(i),l.complete()},function(p){var m;_=!1,(m=i.error)===null||m===void 0||m.call(i,p),l.error(p)},function(){var p,m;_&&((p=i.unsubscribe)===null||p===void 0||p.call(i)),(m=i.finalize)===null||m===void 0||m.call(i)}))}):d.identity}return fu.tap=o,fu}var du={},r_;function Xs(){if(r_)return du;r_=1,Object.defineProperty(du,"__esModule",{value:!0}),du.throttle=void 0;var e=fe(),g=he(),O=Oe();function d(o,n){return e.operate(function(t,r){var i=n??{},c=i.leading,l=c===void 0?!0:c,a=i.trailing,_=a===void 0?!1:a,p=!1,m=null,h=null,u=!1,v=function(){h?.unsubscribe(),h=null,_&&(f(),u&&r.complete())},y=function(){h=null,u&&r.complete()},s=function(b){return h=O.innerFrom(o(b)).subscribe(g.createOperatorSubscriber(r,v,y))},f=function(){if(p){p=!1;var b=m;m=null,r.next(b),!u&&s(b)}};t.subscribe(g.createOperatorSubscriber(r,function(b){p=!0,m=b,!(h&&!h.closed)&&(l?f():s(b))},function(){u=!0,!(_&&p&&h&&!h.closed)&&r.complete()}))})}return du.throttle=d,du}var hu={},t_;function pm(){if(t_)return hu;t_=1,Object.defineProperty(hu,"__esModule",{value:!0}),hu.throttleTime=void 0;var e=sr(),g=Xs(),O=ti();function d(o,n,t){n===void 0&&(n=e.asyncScheduler);var r=O.timer(o,n);return g.throttle(function(){return r},t)}return hu.throttleTime=d,hu}var Gn={},n_;function ym(){if(n_)return Gn;n_=1,Object.defineProperty(Gn,"__esModule",{value:!0}),Gn.TimeInterval=Gn.timeInterval=void 0;var e=sr(),g=fe(),O=he();function d(n){return n===void 0&&(n=e.asyncScheduler),g.operate(function(t,r){var i=n.now();t.subscribe(O.createOperatorSubscriber(r,function(c){var l=n.now(),a=l-i;i=l,r.next(new o(c,a))}))})}Gn.timeInterval=d;var o=(function(){function n(t,r){this.value=t,this.interval=r}return n})();return Gn.TimeInterval=o,Gn}var vu={},i_;function bm(){if(i_)return vu;i_=1,Object.defineProperty(vu,"__esModule",{value:!0}),vu.timeoutWith=void 0;var e=sr(),g=Ns(),O=ac();function d(o,n,t){var r,i,c;if(t=t??e.async,g.isValidDate(o)?r=o:typeof o=="number"&&(i=o),n)c=function(){return n};else throw new TypeError("No observable provided to switch to");if(r==null&&i==null)throw new TypeError("No timeout provided.");return O.timeout({first:r,each:i,scheduler:t,with:c})}return vu.timeoutWith=d,vu}var _u={},o_;function mm(){if(o_)return _u;o_=1,Object.defineProperty(_u,"__esModule",{value:!0}),_u.timestamp=void 0;var e=Ps(),g=an();function O(d){return d===void 0&&(d=e.dateTimestampProvider),g.map(function(o){return{value:o,timestamp:d.now()}})}return _u.timestamp=O,_u}var pu={},a_;function gm(){if(a_)return pu;a_=1,Object.defineProperty(pu,"__esModule",{value:!0}),pu.window=void 0;var e=Ge(),g=fe(),O=he(),d=ze(),o=Oe();function n(t){return g.operate(function(r,i){var c=new e.Subject;i.next(c.asObservable());var l=function(a){c.error(a),i.error(a)};return r.subscribe(O.createOperatorSubscriber(i,function(a){return c?.next(a)},function(){c.complete(),i.complete()},l)),o.innerFrom(t).subscribe(O.createOperatorSubscriber(i,function(){c.complete(),i.next(c=new e.Subject)},d.noop,l)),function(){c?.unsubscribe(),c=null}})}return pu.window=n,pu}var Yn={},u_;function Om(){if(u_)return Yn;u_=1;var e=Yn&&Yn.__values||function(n){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&n[t],i=0;if(r)return r.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&i>=n.length&&(n=void 0),{value:n&&n[i++],done:!n}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(Yn,"__esModule",{value:!0}),Yn.windowCount=void 0;var g=Ge(),O=fe(),d=he();function o(n,t){t===void 0&&(t=0);var r=t>0?t:n;return O.operate(function(i,c){var l=[new g.Subject],a=0;c.next(l[0].asObservable()),i.subscribe(d.createOperatorSubscriber(c,function(_){var p,m;try{for(var h=e(l),u=h.next();!u.done;u=h.next()){var v=u.value;v.next(_)}}catch(f){p={error:f}}finally{try{u&&!u.done&&(m=h.return)&&m.call(h)}finally{if(p)throw p.error}}var y=a-n+1;if(y>=0&&y%r===0&&l.shift().complete(),++a%r===0){var s=new g.Subject;l.push(s),c.next(s.asObservable())}},function(){for(;l.length>0;)l.shift().complete();c.complete()},function(_){for(;l.length>0;)l.shift().error(_);c.error(_)},function(){l=null}))})}return Yn.windowCount=o,Yn}var yu={},c_;function wm(){if(c_)return yu;c_=1,Object.defineProperty(yu,"__esModule",{value:!0}),yu.windowTime=void 0;var e=Ge(),g=sr(),O=vr(),d=fe(),o=he(),n=tn(),t=lr(),r=nn();function i(c){for(var l,a,_=[],p=1;p<arguments.length;p++)_[p-1]=arguments[p];var m=(l=t.popScheduler(_))!==null&&l!==void 0?l:g.asyncScheduler,h=(a=_[0])!==null&&a!==void 0?a:null,u=_[1]||1/0;return d.operate(function(v,y){var s=[],f=!1,b=function(R){var L=R.window,j=R.subs;L.complete(),j.unsubscribe(),n.arrRemove(s,R),f&&E()},E=function(){if(s){var R=new O.Subscription;y.add(R);var L=new e.Subject,j={window:L,subs:R,seen:0};s.push(j),y.next(L.asObservable()),r.executeSchedule(R,m,function(){return b(j)},c)}};h!==null&&h>=0?r.executeSchedule(y,m,E,h,!0):f=!0,E();var w=function(R){return s.slice().forEach(R)},T=function(R){w(function(L){var j=L.window;return R(j)}),R(y),y.unsubscribe()};return v.subscribe(o.createOperatorSubscriber(y,function(R){w(function(L){L.window.next(R),u<=++L.seen&&b(L)})},function(){return T(function(R){return R.complete()})},function(R){return T(function(L){return L.error(R)})})),function(){s=null}})}return yu.windowTime=i,yu}var Kn={},s_;function Em(){if(s_)return Kn;s_=1;var e=Kn&&Kn.__values||function(c){var l=typeof Symbol=="function"&&Symbol.iterator,a=l&&c[l],_=0;if(a)return a.call(c);if(c&&typeof c.length=="number")return{next:function(){return c&&_>=c.length&&(c=void 0),{value:c&&c[_++],done:!c}}};throw new TypeError(l?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.windowToggle=void 0;var g=Ge(),O=vr(),d=fe(),o=Oe(),n=he(),t=ze(),r=tn();function i(c,l){return d.operate(function(a,_){var p=[],m=function(h){for(;0<p.length;)p.shift().error(h);_.error(h)};o.innerFrom(c).subscribe(n.createOperatorSubscriber(_,function(h){var u=new g.Subject;p.push(u);var v=new O.Subscription,y=function(){r.arrRemove(p,u),u.complete(),v.unsubscribe()},s;try{s=o.innerFrom(l(h))}catch(f){m(f);return}_.next(u.asObservable()),v.add(s.subscribe(n.createOperatorSubscriber(_,y,t.noop,m)))},t.noop)),a.subscribe(n.createOperatorSubscriber(_,function(h){var u,v,y=p.slice();try{for(var s=e(y),f=s.next();!f.done;f=s.next()){var b=f.value;b.next(h)}}catch(E){u={error:E}}finally{try{f&&!f.done&&(v=s.return)&&v.call(s)}finally{if(u)throw u.error}}},function(){for(;0<p.length;)p.shift().complete();_.complete()},m,function(){for(;0<p.length;)p.shift().unsubscribe()}))})}return Kn.windowToggle=i,Kn}var bu={},l_;function Tm(){if(l_)return bu;l_=1,Object.defineProperty(bu,"__esModule",{value:!0}),bu.windowWhen=void 0;var e=Ge(),g=fe(),O=he(),d=Oe();function o(n){return g.operate(function(t,r){var i,c,l=function(_){i.error(_),r.error(_)},a=function(){c?.unsubscribe(),i?.complete(),i=new e.Subject,r.next(i.asObservable());var _;try{_=d.innerFrom(n())}catch(p){l(p);return}_.subscribe(c=O.createOperatorSubscriber(r,a,a,l))};a(),t.subscribe(O.createOperatorSubscriber(r,function(_){return i.next(_)},function(){i.complete(),r.complete()},l,function(){c?.unsubscribe(),i=null}))})}return bu.windowWhen=o,bu}var vt={},f_;function Sm(){if(f_)return vt;f_=1;var e=vt&&vt.__read||function(c,l){var a=typeof Symbol=="function"&&c[Symbol.iterator];if(!a)return c;var _=a.call(c),p,m=[],h;try{for(;(l===void 0||l-- >0)&&!(p=_.next()).done;)m.push(p.value)}catch(u){h={error:u}}finally{try{p&&!p.done&&(a=_.return)&&a.call(_)}finally{if(h)throw h.error}}return m},g=vt&&vt.__spreadArray||function(c,l){for(var a=0,_=l.length,p=c.length;a<_;a++,p++)c[p]=l[a];return c};Object.defineProperty(vt,"__esModule",{value:!0}),vt.withLatestFrom=void 0;var O=fe(),d=he(),o=Oe(),n=$e(),t=ze(),r=lr();function i(){for(var c=[],l=0;l<arguments.length;l++)c[l]=arguments[l];var a=r.popResultSelector(c);return O.operate(function(_,p){for(var m=c.length,h=new Array(m),u=c.map(function(){return!1}),v=!1,y=function(f){o.innerFrom(c[f]).subscribe(d.createOperatorSubscriber(p,function(b){h[f]=b,!v&&!u[f]&&(u[f]=!0,(v=u.every(n.identity))&&(u=null))},t.noop))},s=0;s<m;s++)y(s);_.subscribe(d.createOperatorSubscriber(p,function(f){if(v){var b=g([f],e(h));p.next(a?a.apply(void 0,g([],e(b))):b)}}))})}return vt.withLatestFrom=i,vt}var mu={},d_;function Pm(){if(d_)return mu;d_=1,Object.defineProperty(mu,"__esModule",{value:!0}),mu.zipAll=void 0;var e=Ds(),g=lb();function O(d){return g.joinAllInternals(e.zip,d)}return mu.zipAll=O,mu}var _t={},pt={},h_;function Rm(){if(h_)return pt;h_=1;var e=pt&&pt.__read||function(n,t){var r=typeof Symbol=="function"&&n[Symbol.iterator];if(!r)return n;var i=r.call(n),c,l=[],a;try{for(;(t===void 0||t-- >0)&&!(c=i.next()).done;)l.push(c.value)}catch(_){a={error:_}}finally{try{c&&!c.done&&(r=i.return)&&r.call(i)}finally{if(a)throw a.error}}return l},g=pt&&pt.__spreadArray||function(n,t){for(var r=0,i=t.length,c=n.length;r<i;r++,c++)n[c]=t[r];return n};Object.defineProperty(pt,"__esModule",{value:!0}),pt.zip=void 0;var O=Ds(),d=fe();function o(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return d.operate(function(r,i){O.zip.apply(void 0,g([r],e(n))).subscribe(i)})}return pt.zip=o,pt}var v_;function Cm(){if(v_)return _t;v_=1;var e=_t&&_t.__read||function(o,n){var t=typeof Symbol=="function"&&o[Symbol.iterator];if(!t)return o;var r=t.call(o),i,c=[],l;try{for(;(n===void 0||n-- >0)&&!(i=r.next()).done;)c.push(i.value)}catch(a){l={error:a}}finally{try{i&&!i.done&&(t=r.return)&&t.call(r)}finally{if(l)throw l.error}}return c},g=_t&&_t.__spreadArray||function(o,n){for(var t=0,r=n.length,i=o.length;t<r;t++,i++)o[i]=n[t];return o};Object.defineProperty(_t,"__esModule",{value:!0}),_t.zipWith=void 0;var O=Rm();function d(){for(var o=[],n=0;n<arguments.length;n++)o[n]=arguments[n];return O.zip.apply(void 0,g([],e(o)))}return _t.zipWith=d,_t}var __;function yc(){return __||(__=1,(function(e){var g=_n&&_n.__createBinding||(Object.create?(function(ni,ii,Yr,fn){fn===void 0&&(fn=Yr),Object.defineProperty(ni,fn,{enumerable:!0,get:function(){return ii[Yr]}})}):(function(ni,ii,Yr,fn){fn===void 0&&(fn=Yr),ni[fn]=ii[Yr]})),O=_n&&_n.__exportStar||function(ni,ii){for(var Yr in ni)Yr!=="default"&&!Object.prototype.hasOwnProperty.call(ii,Yr)&&g(ii,ni,Yr)};Object.defineProperty(e,"__esModule",{value:!0}),e.interval=e.iif=e.generate=e.fromEventPattern=e.fromEvent=e.from=e.forkJoin=e.empty=e.defer=e.connectable=e.concat=e.combineLatest=e.bindNodeCallback=e.bindCallback=e.UnsubscriptionError=e.TimeoutError=e.SequenceError=e.ObjectUnsubscribedError=e.NotFoundError=e.EmptyError=e.ArgumentOutOfRangeError=e.firstValueFrom=e.lastValueFrom=e.isObservable=e.identity=e.noop=e.pipe=e.NotificationKind=e.Notification=e.Subscriber=e.Subscription=e.Scheduler=e.VirtualAction=e.VirtualTimeScheduler=e.animationFrameScheduler=e.animationFrame=e.queueScheduler=e.queue=e.asyncScheduler=e.async=e.asapScheduler=e.asap=e.AsyncSubject=e.ReplaySubject=e.BehaviorSubject=e.Subject=e.animationFrames=e.observable=e.ConnectableObservable=e.Observable=void 0,e.filter=e.expand=e.exhaustMap=e.exhaustAll=e.exhaust=e.every=e.endWith=e.elementAt=e.distinctUntilKeyChanged=e.distinctUntilChanged=e.distinct=e.dematerialize=e.delayWhen=e.delay=e.defaultIfEmpty=e.debounceTime=e.debounce=e.count=e.connect=e.concatWith=e.concatMapTo=e.concatMap=e.concatAll=e.combineLatestWith=e.combineLatestAll=e.combineAll=e.catchError=e.bufferWhen=e.bufferToggle=e.bufferTime=e.bufferCount=e.buffer=e.auditTime=e.audit=e.config=e.NEVER=e.EMPTY=e.scheduled=e.zip=e.using=e.timer=e.throwError=e.range=e.race=e.partition=e.pairs=e.onErrorResumeNext=e.of=e.never=e.merge=void 0,e.switchMap=e.switchAll=e.subscribeOn=e.startWith=e.skipWhile=e.skipUntil=e.skipLast=e.skip=e.single=e.shareReplay=e.share=e.sequenceEqual=e.scan=e.sampleTime=e.sample=e.refCount=e.retryWhen=e.retry=e.repeatWhen=e.repeat=e.reduce=e.raceWith=e.publishReplay=e.publishLast=e.publishBehavior=e.publish=e.pluck=e.pairwise=e.onErrorResumeNextWith=e.observeOn=e.multicast=e.min=e.mergeWith=e.mergeScan=e.mergeMapTo=e.mergeMap=e.flatMap=e.mergeAll=e.max=e.materialize=e.mapTo=e.map=e.last=e.isEmpty=e.ignoreElements=e.groupBy=e.first=e.findIndex=e.find=e.finalize=void 0,e.zipWith=e.zipAll=e.withLatestFrom=e.windowWhen=e.windowToggle=e.windowTime=e.windowCount=e.window=e.toArray=e.timestamp=e.timeoutWith=e.timeout=e.timeInterval=e.throwIfEmpty=e.throttleTime=e.throttle=e.tap=e.takeWhile=e.takeUntil=e.takeLast=e.take=e.switchScan=e.switchMapTo=void 0;var d=Ie();Object.defineProperty(e,"Observable",{enumerable:!0,get:function(){return d.Observable}});var o=lc();Object.defineProperty(e,"ConnectableObservable",{enumerable:!0,get:function(){return o.ConnectableObservable}});var n=cc();Object.defineProperty(e,"observable",{enumerable:!0,get:function(){return n.observable}});var t=$0();Object.defineProperty(e,"animationFrames",{enumerable:!0,get:function(){return t.animationFrames}});var r=Ge();Object.defineProperty(e,"Subject",{enumerable:!0,get:function(){return r.Subject}});var i=ky();Object.defineProperty(e,"BehaviorSubject",{enumerable:!0,get:function(){return i.BehaviorSubject}});var c=Rs();Object.defineProperty(e,"ReplaySubject",{enumerable:!0,get:function(){return c.ReplaySubject}});var l=Cs();Object.defineProperty(e,"AsyncSubject",{enumerable:!0,get:function(){return l.AsyncSubject}});var a=J0();Object.defineProperty(e,"asap",{enumerable:!0,get:function(){return a.asap}}),Object.defineProperty(e,"asapScheduler",{enumerable:!0,get:function(){return a.asapScheduler}});var _=sr();Object.defineProperty(e,"async",{enumerable:!0,get:function(){return _.async}}),Object.defineProperty(e,"asyncScheduler",{enumerable:!0,get:function(){return _.asyncScheduler}});var p=tO();Object.defineProperty(e,"queue",{enumerable:!0,get:function(){return p.queue}}),Object.defineProperty(e,"queueScheduler",{enumerable:!0,get:function(){return p.queueScheduler}});var m=oO();Object.defineProperty(e,"animationFrame",{enumerable:!0,get:function(){return m.animationFrame}}),Object.defineProperty(e,"animationFrameScheduler",{enumerable:!0,get:function(){return m.animationFrameScheduler}});var h=aO();Object.defineProperty(e,"VirtualTimeScheduler",{enumerable:!0,get:function(){return h.VirtualTimeScheduler}}),Object.defineProperty(e,"VirtualAction",{enumerable:!0,get:function(){return h.VirtualAction}});var u=Ly();Object.defineProperty(e,"Scheduler",{enumerable:!0,get:function(){return u.Scheduler}});var v=vr();Object.defineProperty(e,"Subscription",{enumerable:!0,get:function(){return v.Subscription}});var y=Cu();Object.defineProperty(e,"Subscriber",{enumerable:!0,get:function(){return y.Subscriber}});var s=Ms();Object.defineProperty(e,"Notification",{enumerable:!0,get:function(){return s.Notification}}),Object.defineProperty(e,"NotificationKind",{enumerable:!0,get:function(){return s.NotificationKind}});var f=sc();Object.defineProperty(e,"pipe",{enumerable:!0,get:function(){return f.pipe}});var b=ze();Object.defineProperty(e,"noop",{enumerable:!0,get:function(){return b.noop}});var E=$e();Object.defineProperty(e,"identity",{enumerable:!0,get:function(){return E.identity}});var w=fO();Object.defineProperty(e,"isObservable",{enumerable:!0,get:function(){return w.isObservable}});var T=dO();Object.defineProperty(e,"lastValueFrom",{enumerable:!0,get:function(){return T.lastValueFrom}});var R=hO();Object.defineProperty(e,"firstValueFrom",{enumerable:!0,get:function(){return R.firstValueFrom}});var L=$y();Object.defineProperty(e,"ArgumentOutOfRangeError",{enumerable:!0,get:function(){return L.ArgumentOutOfRangeError}});var j=ei();Object.defineProperty(e,"EmptyError",{enumerable:!0,get:function(){return j.EmptyError}});var M=Gy();Object.defineProperty(e,"NotFoundError",{enumerable:!0,get:function(){return M.NotFoundError}});var x=Ny();Object.defineProperty(e,"ObjectUnsubscribedError",{enumerable:!0,get:function(){return x.ObjectUnsubscribedError}});var Z=Yy();Object.defineProperty(e,"SequenceError",{enumerable:!0,get:function(){return Z.SequenceError}});var H=ac();Object.defineProperty(e,"TimeoutError",{enumerable:!0,get:function(){return H.TimeoutError}});var K=Iy();Object.defineProperty(e,"UnsubscriptionError",{enumerable:!0,get:function(){return K.UnsubscriptionError}});var G=vO();Object.defineProperty(e,"bindCallback",{enumerable:!0,get:function(){return G.bindCallback}});var $=_O();Object.defineProperty(e,"bindNodeCallback",{enumerable:!0,get:function(){return $.bindNodeCallback}});var A=ks();Object.defineProperty(e,"combineLatest",{enumerable:!0,get:function(){return A.combineLatest}});var q=hc();Object.defineProperty(e,"concat",{enumerable:!0,get:function(){return q.concat}});var U=pO();Object.defineProperty(e,"connectable",{enumerable:!0,get:function(){return U.connectable}});var Q=vc();Object.defineProperty(e,"defer",{enumerable:!0,get:function(){return Q.defer}});var te=Gr();Object.defineProperty(e,"empty",{enumerable:!0,get:function(){return te.empty}});var z=yO();Object.defineProperty(e,"forkJoin",{enumerable:!0,get:function(){return z.forkJoin}});var re=on();Object.defineProperty(e,"from",{enumerable:!0,get:function(){return re.from}});var ce=bO();Object.defineProperty(e,"fromEvent",{enumerable:!0,get:function(){return ce.fromEvent}});var ae=mO();Object.defineProperty(e,"fromEventPattern",{enumerable:!0,get:function(){return ae.fromEventPattern}});var k=gO();Object.defineProperty(e,"generate",{enumerable:!0,get:function(){return k.generate}});var W=OO();Object.defineProperty(e,"iif",{enumerable:!0,get:function(){return W.iif}});var F=Xy();Object.defineProperty(e,"interval",{enumerable:!0,get:function(){return F.interval}});var Y=wO();Object.defineProperty(e,"merge",{enumerable:!0,get:function(){return Y.merge}});var X=ah();Object.defineProperty(e,"never",{enumerable:!0,get:function(){return X.never}});var ne=js();Object.defineProperty(e,"of",{enumerable:!0,get:function(){return ne.of}});var le=Jy();Object.defineProperty(e,"onErrorResumeNext",{enumerable:!0,get:function(){return le.onErrorResumeNext}});var de=EO();Object.defineProperty(e,"pairs",{enumerable:!0,get:function(){return de.pairs}});var D=TO();Object.defineProperty(e,"partition",{enumerable:!0,get:function(){return D.partition}});var P=rb();Object.defineProperty(e,"race",{enumerable:!0,get:function(){return P.race}});var I=SO();Object.defineProperty(e,"range",{enumerable:!0,get:function(){return I.range}});var B=zy();Object.defineProperty(e,"throwError",{enumerable:!0,get:function(){return B.throwError}});var ee=ti();Object.defineProperty(e,"timer",{enumerable:!0,get:function(){return ee.timer}});var ue=PO();Object.defineProperty(e,"using",{enumerable:!0,get:function(){return ue.using}});var oe=Ds();Object.defineProperty(e,"zip",{enumerable:!0,get:function(){return oe.zip}});var ve=Hy();Object.defineProperty(e,"scheduled",{enumerable:!0,get:function(){return ve.scheduled}});var pe=Gr();Object.defineProperty(e,"EMPTY",{enumerable:!0,get:function(){return pe.EMPTY}});var ye=ah();Object.defineProperty(e,"NEVER",{enumerable:!0,get:function(){return ye.NEVER}}),O(RO(),e);var me=Ru();Object.defineProperty(e,"config",{enumerable:!0,get:function(){return me.config}});var N=Us();Object.defineProperty(e,"audit",{enumerable:!0,get:function(){return N.audit}});var S=tb();Object.defineProperty(e,"auditTime",{enumerable:!0,get:function(){return S.auditTime}});var C=nb();Object.defineProperty(e,"buffer",{enumerable:!0,get:function(){return C.buffer}});var V=ib();Object.defineProperty(e,"bufferCount",{enumerable:!0,get:function(){return V.bufferCount}});var J=ob();Object.defineProperty(e,"bufferTime",{enumerable:!0,get:function(){return J.bufferTime}});var ie=ab();Object.defineProperty(e,"bufferToggle",{enumerable:!0,get:function(){return ie.bufferToggle}});var se=ub();Object.defineProperty(e,"bufferWhen",{enumerable:!0,get:function(){return se.bufferWhen}});var ge=cb();Object.defineProperty(e,"catchError",{enumerable:!0,get:function(){return ge.catchError}});var Ae=fb();Object.defineProperty(e,"combineAll",{enumerable:!0,get:function(){return Ae.combineAll}});var Pe=Fs();Object.defineProperty(e,"combineLatestAll",{enumerable:!0,get:function(){return Pe.combineLatestAll}});var je=hb();Object.defineProperty(e,"combineLatestWith",{enumerable:!0,get:function(){return je.combineLatestWith}});var Ee=dc();Object.defineProperty(e,"concatAll",{enumerable:!0,get:function(){return Ee.concatAll}});var mc=Bs();Object.defineProperty(e,"concatMap",{enumerable:!0,get:function(){return mc.concatMap}});var gc=vb();Object.defineProperty(e,"concatMapTo",{enumerable:!0,get:function(){return gc.concatMapTo}});var Oc=pb();Object.defineProperty(e,"concatWith",{enumerable:!0,get:function(){return Oc.concatWith}});var wc=_c();Object.defineProperty(e,"connect",{enumerable:!0,get:function(){return wc.connect}});var Ec=yb();Object.defineProperty(e,"count",{enumerable:!0,get:function(){return Ec.count}});var Tc=bb();Object.defineProperty(e,"debounce",{enumerable:!0,get:function(){return Tc.debounce}});var Sc=mb();Object.defineProperty(e,"debounceTime",{enumerable:!0,get:function(){return Sc.debounceTime}});var Pc=ku();Object.defineProperty(e,"defaultIfEmpty",{enumerable:!0,get:function(){return Pc.defaultIfEmpty}});var Rc=gb();Object.defineProperty(e,"delay",{enumerable:!0,get:function(){return Rc.delay}});var Cc=Vs();Object.defineProperty(e,"delayWhen",{enumerable:!0,get:function(){return Cc.delayWhen}});var Ic=Ob();Object.defineProperty(e,"dematerialize",{enumerable:!0,get:function(){return Ic.dematerialize}});var Ac=wb();Object.defineProperty(e,"distinct",{enumerable:!0,get:function(){return Ac.distinct}});var jc=Hs();Object.defineProperty(e,"distinctUntilChanged",{enumerable:!0,get:function(){return jc.distinctUntilChanged}});var Mc=Eb();Object.defineProperty(e,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return Mc.distinctUntilKeyChanged}});var Nc=Tb();Object.defineProperty(e,"elementAt",{enumerable:!0,get:function(){return Nc.elementAt}});var kc=Sb();Object.defineProperty(e,"endWith",{enumerable:!0,get:function(){return kc.endWith}});var Lc=Pb();Object.defineProperty(e,"every",{enumerable:!0,get:function(){return Lc.every}});var Dc=Rb();Object.defineProperty(e,"exhaust",{enumerable:!0,get:function(){return Dc.exhaust}});var Uc=$s();Object.defineProperty(e,"exhaustAll",{enumerable:!0,get:function(){return Uc.exhaustAll}});var qc=zs();Object.defineProperty(e,"exhaustMap",{enumerable:!0,get:function(){return qc.exhaustMap}});var Fc=Cb();Object.defineProperty(e,"expand",{enumerable:!0,get:function(){return Fc.expand}});var Bc=un();Object.defineProperty(e,"filter",{enumerable:!0,get:function(){return Bc.filter}});var xc=Ib();Object.defineProperty(e,"finalize",{enumerable:!0,get:function(){return xc.finalize}});var Wc=Gs();Object.defineProperty(e,"find",{enumerable:!0,get:function(){return Wc.find}});var Vc=Ab();Object.defineProperty(e,"findIndex",{enumerable:!0,get:function(){return Vc.findIndex}});var Hc=jb();Object.defineProperty(e,"first",{enumerable:!0,get:function(){return Hc.first}});var zc=Mb();Object.defineProperty(e,"groupBy",{enumerable:!0,get:function(){return zc.groupBy}});var $c=xs();Object.defineProperty(e,"ignoreElements",{enumerable:!0,get:function(){return $c.ignoreElements}});var Gc=Nb();Object.defineProperty(e,"isEmpty",{enumerable:!0,get:function(){return Gc.isEmpty}});var Yc=kb();Object.defineProperty(e,"last",{enumerable:!0,get:function(){return Yc.last}});var Kc=an();Object.defineProperty(e,"map",{enumerable:!0,get:function(){return Kc.map}});var Zc=Ws();Object.defineProperty(e,"mapTo",{enumerable:!0,get:function(){return Zc.mapTo}});var Qc=Lb();Object.defineProperty(e,"materialize",{enumerable:!0,get:function(){return Qc.materialize}});var Xc=Db();Object.defineProperty(e,"max",{enumerable:!0,get:function(){return Xc.max}});var Jc=Nu();Object.defineProperty(e,"mergeAll",{enumerable:!0,get:function(){return Jc.mergeAll}});var es=Ub();Object.defineProperty(e,"flatMap",{enumerable:!0,get:function(){return es.flatMap}});var rs=wt();Object.defineProperty(e,"mergeMap",{enumerable:!0,get:function(){return rs.mergeMap}});var ts=qb();Object.defineProperty(e,"mergeMapTo",{enumerable:!0,get:function(){return ts.mergeMapTo}});var ns=Fb();Object.defineProperty(e,"mergeScan",{enumerable:!0,get:function(){return ns.mergeScan}});var Og=xb();Object.defineProperty(e,"mergeWith",{enumerable:!0,get:function(){return Og.mergeWith}});var wg=Wb();Object.defineProperty(e,"min",{enumerable:!0,get:function(){return wg.min}});var Eg=pc();Object.defineProperty(e,"multicast",{enumerable:!0,get:function(){return Eg.multicast}});var Tg=ju();Object.defineProperty(e,"observeOn",{enumerable:!0,get:function(){return Tg.observeOn}});var Sg=Vb();Object.defineProperty(e,"onErrorResumeNextWith",{enumerable:!0,get:function(){return Sg.onErrorResumeNextWith}});var Pg=Hb();Object.defineProperty(e,"pairwise",{enumerable:!0,get:function(){return Pg.pairwise}});var Rg=zb();Object.defineProperty(e,"pluck",{enumerable:!0,get:function(){return Rg.pluck}});var Cg=$b();Object.defineProperty(e,"publish",{enumerable:!0,get:function(){return Cg.publish}});var Ig=Gb();Object.defineProperty(e,"publishBehavior",{enumerable:!0,get:function(){return Ig.publishBehavior}});var Ag=Yb();Object.defineProperty(e,"publishLast",{enumerable:!0,get:function(){return Ag.publishLast}});var jg=Kb();Object.defineProperty(e,"publishReplay",{enumerable:!0,get:function(){return jg.publishReplay}});var Mg=Ks();Object.defineProperty(e,"raceWith",{enumerable:!0,get:function(){return Mg.raceWith}});var Ng=Ri();Object.defineProperty(e,"reduce",{enumerable:!0,get:function(){return Ng.reduce}});var kg=Zb();Object.defineProperty(e,"repeat",{enumerable:!0,get:function(){return kg.repeat}});var Lg=Qb();Object.defineProperty(e,"repeatWhen",{enumerable:!0,get:function(){return Lg.repeatWhen}});var Dg=Xb();Object.defineProperty(e,"retry",{enumerable:!0,get:function(){return Dg.retry}});var Ug=Jb();Object.defineProperty(e,"retryWhen",{enumerable:!0,get:function(){return Ug.retryWhen}});var qg=Ss();Object.defineProperty(e,"refCount",{enumerable:!0,get:function(){return qg.refCount}});var Fg=Zs();Object.defineProperty(e,"sample",{enumerable:!0,get:function(){return Fg.sample}});var Bg=em();Object.defineProperty(e,"sampleTime",{enumerable:!0,get:function(){return Bg.sampleTime}});var xg=rm();Object.defineProperty(e,"scan",{enumerable:!0,get:function(){return xg.scan}});var Wg=tm();Object.defineProperty(e,"sequenceEqual",{enumerable:!0,get:function(){return Wg.sequenceEqual}});var Vg=Qs();Object.defineProperty(e,"share",{enumerable:!0,get:function(){return Vg.share}});var Hg=nm();Object.defineProperty(e,"shareReplay",{enumerable:!0,get:function(){return Hg.shareReplay}});var zg=im();Object.defineProperty(e,"single",{enumerable:!0,get:function(){return zg.single}});var $g=om();Object.defineProperty(e,"skip",{enumerable:!0,get:function(){return $g.skip}});var Gg=am();Object.defineProperty(e,"skipLast",{enumerable:!0,get:function(){return Gg.skipLast}});var Yg=um();Object.defineProperty(e,"skipUntil",{enumerable:!0,get:function(){return Yg.skipUntil}});var Kg=cm();Object.defineProperty(e,"skipWhile",{enumerable:!0,get:function(){return Kg.skipWhile}});var Zg=sm();Object.defineProperty(e,"startWith",{enumerable:!0,get:function(){return Zg.startWith}});var Qg=Mu();Object.defineProperty(e,"subscribeOn",{enumerable:!0,get:function(){return Qg.subscribeOn}});var Xg=lm();Object.defineProperty(e,"switchAll",{enumerable:!0,get:function(){return Xg.switchAll}});var Jg=Uu();Object.defineProperty(e,"switchMap",{enumerable:!0,get:function(){return Jg.switchMap}});var e0=fm();Object.defineProperty(e,"switchMapTo",{enumerable:!0,get:function(){return e0.switchMapTo}});var r0=dm();Object.defineProperty(e,"switchScan",{enumerable:!0,get:function(){return r0.switchScan}});var t0=Lu();Object.defineProperty(e,"take",{enumerable:!0,get:function(){return t0.take}});var n0=Ys();Object.defineProperty(e,"takeLast",{enumerable:!0,get:function(){return n0.takeLast}});var i0=hm();Object.defineProperty(e,"takeUntil",{enumerable:!0,get:function(){return i0.takeUntil}});var o0=vm();Object.defineProperty(e,"takeWhile",{enumerable:!0,get:function(){return o0.takeWhile}});var a0=_m();Object.defineProperty(e,"tap",{enumerable:!0,get:function(){return a0.tap}});var u0=Xs();Object.defineProperty(e,"throttle",{enumerable:!0,get:function(){return u0.throttle}});var c0=pm();Object.defineProperty(e,"throttleTime",{enumerable:!0,get:function(){return c0.throttleTime}});var s0=Du();Object.defineProperty(e,"throwIfEmpty",{enumerable:!0,get:function(){return s0.throwIfEmpty}});var l0=ym();Object.defineProperty(e,"timeInterval",{enumerable:!0,get:function(){return l0.timeInterval}});var f0=ac();Object.defineProperty(e,"timeout",{enumerable:!0,get:function(){return f0.timeout}});var d0=bm();Object.defineProperty(e,"timeoutWith",{enumerable:!0,get:function(){return d0.timeoutWith}});var h0=mm();Object.defineProperty(e,"timestamp",{enumerable:!0,get:function(){return h0.timestamp}});var v0=qs();Object.defineProperty(e,"toArray",{enumerable:!0,get:function(){return v0.toArray}});var _0=gm();Object.defineProperty(e,"window",{enumerable:!0,get:function(){return _0.window}});var p0=Om();Object.defineProperty(e,"windowCount",{enumerable:!0,get:function(){return p0.windowCount}});var y0=wm();Object.defineProperty(e,"windowTime",{enumerable:!0,get:function(){return y0.windowTime}});var b0=Em();Object.defineProperty(e,"windowToggle",{enumerable:!0,get:function(){return b0.windowToggle}});var m0=Tm();Object.defineProperty(e,"windowWhen",{enumerable:!0,get:function(){return m0.windowWhen}});var g0=Sm();Object.defineProperty(e,"withLatestFrom",{enumerable:!0,get:function(){return g0.withLatestFrom}});var O0=Pm();Object.defineProperty(e,"zipAll",{enumerable:!0,get:function(){return O0.zipAll}});var w0=Cm();Object.defineProperty(e,"zipWith",{enumerable:!0,get:function(){return w0.zipWith}})})(_n)),_n}var ps={},gu={},p_;function IO(){if(p_)return gu;p_=1,Object.defineProperty(gu,"__esModule",{value:!0}),gu.partition=void 0;var e=eb(),g=un();function O(d,o){return function(n){return[g.filter(d,o)(n),g.filter(e.not(d,o))(n)]}}return gu.partition=O,gu}var yt={},y_;function AO(){if(y_)return yt;y_=1;var e=yt&&yt.__read||function(n,t){var r=typeof Symbol=="function"&&n[Symbol.iterator];if(!r)return n;var i=r.call(n),c,l=[],a;try{for(;(t===void 0||t-- >0)&&!(c=i.next()).done;)l.push(c.value)}catch(_){a={error:_}}finally{try{c&&!c.done&&(r=i.return)&&r.call(i)}finally{if(a)throw a.error}}return l},g=yt&&yt.__spreadArray||function(n,t){for(var r=0,i=t.length,c=n.length;r<i;r++,c++)n[c]=t[r];return n};Object.defineProperty(yt,"__esModule",{value:!0}),yt.race=void 0;var O=Pi(),d=Ks();function o(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return d.raceWith.apply(void 0,g([],e(O.argsOrArgArray(n))))}return yt.race=o,yt}var b_;function Js(){return b_||(b_=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.mergeAll=e.merge=e.max=e.materialize=e.mapTo=e.map=e.last=e.isEmpty=e.ignoreElements=e.groupBy=e.first=e.findIndex=e.find=e.finalize=e.filter=e.expand=e.exhaustMap=e.exhaustAll=e.exhaust=e.every=e.endWith=e.elementAt=e.distinctUntilKeyChanged=e.distinctUntilChanged=e.distinct=e.dematerialize=e.delayWhen=e.delay=e.defaultIfEmpty=e.debounceTime=e.debounce=e.count=e.connect=e.concatWith=e.concatMapTo=e.concatMap=e.concatAll=e.concat=e.combineLatestWith=e.combineLatest=e.combineLatestAll=e.combineAll=e.catchError=e.bufferWhen=e.bufferToggle=e.bufferTime=e.bufferCount=e.buffer=e.auditTime=e.audit=void 0,e.timeInterval=e.throwIfEmpty=e.throttleTime=e.throttle=e.tap=e.takeWhile=e.takeUntil=e.takeLast=e.take=e.switchScan=e.switchMapTo=e.switchMap=e.switchAll=e.subscribeOn=e.startWith=e.skipWhile=e.skipUntil=e.skipLast=e.skip=e.single=e.shareReplay=e.share=e.sequenceEqual=e.scan=e.sampleTime=e.sample=e.refCount=e.retryWhen=e.retry=e.repeatWhen=e.repeat=e.reduce=e.raceWith=e.race=e.publishReplay=e.publishLast=e.publishBehavior=e.publish=e.pluck=e.partition=e.pairwise=e.onErrorResumeNext=e.observeOn=e.multicast=e.min=e.mergeWith=e.mergeScan=e.mergeMapTo=e.mergeMap=e.flatMap=void 0,e.zipWith=e.zipAll=e.zip=e.withLatestFrom=e.windowWhen=e.windowToggle=e.windowTime=e.windowCount=e.window=e.toArray=e.timestamp=e.timeoutWith=e.timeout=void 0;var g=Us();Object.defineProperty(e,"audit",{enumerable:!0,get:function(){return g.audit}});var O=tb();Object.defineProperty(e,"auditTime",{enumerable:!0,get:function(){return O.auditTime}});var d=nb();Object.defineProperty(e,"buffer",{enumerable:!0,get:function(){return d.buffer}});var o=ib();Object.defineProperty(e,"bufferCount",{enumerable:!0,get:function(){return o.bufferCount}});var n=ob();Object.defineProperty(e,"bufferTime",{enumerable:!0,get:function(){return n.bufferTime}});var t=ab();Object.defineProperty(e,"bufferToggle",{enumerable:!0,get:function(){return t.bufferToggle}});var r=ub();Object.defineProperty(e,"bufferWhen",{enumerable:!0,get:function(){return r.bufferWhen}});var i=cb();Object.defineProperty(e,"catchError",{enumerable:!0,get:function(){return i.catchError}});var c=fb();Object.defineProperty(e,"combineAll",{enumerable:!0,get:function(){return c.combineAll}});var l=Fs();Object.defineProperty(e,"combineLatestAll",{enumerable:!0,get:function(){return l.combineLatestAll}});var a=db();Object.defineProperty(e,"combineLatest",{enumerable:!0,get:function(){return a.combineLatest}});var _=hb();Object.defineProperty(e,"combineLatestWith",{enumerable:!0,get:function(){return _.combineLatestWith}});var p=_b();Object.defineProperty(e,"concat",{enumerable:!0,get:function(){return p.concat}});var m=dc();Object.defineProperty(e,"concatAll",{enumerable:!0,get:function(){return m.concatAll}});var h=Bs();Object.defineProperty(e,"concatMap",{enumerable:!0,get:function(){return h.concatMap}});var u=vb();Object.defineProperty(e,"concatMapTo",{enumerable:!0,get:function(){return u.concatMapTo}});var v=pb();Object.defineProperty(e,"concatWith",{enumerable:!0,get:function(){return v.concatWith}});var y=_c();Object.defineProperty(e,"connect",{enumerable:!0,get:function(){return y.connect}});var s=yb();Object.defineProperty(e,"count",{enumerable:!0,get:function(){return s.count}});var f=bb();Object.defineProperty(e,"debounce",{enumerable:!0,get:function(){return f.debounce}});var b=mb();Object.defineProperty(e,"debounceTime",{enumerable:!0,get:function(){return b.debounceTime}});var E=ku();Object.defineProperty(e,"defaultIfEmpty",{enumerable:!0,get:function(){return E.defaultIfEmpty}});var w=gb();Object.defineProperty(e,"delay",{enumerable:!0,get:function(){return w.delay}});var T=Vs();Object.defineProperty(e,"delayWhen",{enumerable:!0,get:function(){return T.delayWhen}});var R=Ob();Object.defineProperty(e,"dematerialize",{enumerable:!0,get:function(){return R.dematerialize}});var L=wb();Object.defineProperty(e,"distinct",{enumerable:!0,get:function(){return L.distinct}});var j=Hs();Object.defineProperty(e,"distinctUntilChanged",{enumerable:!0,get:function(){return j.distinctUntilChanged}});var M=Eb();Object.defineProperty(e,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return M.distinctUntilKeyChanged}});var x=Tb();Object.defineProperty(e,"elementAt",{enumerable:!0,get:function(){return x.elementAt}});var Z=Sb();Object.defineProperty(e,"endWith",{enumerable:!0,get:function(){return Z.endWith}});var H=Pb();Object.defineProperty(e,"every",{enumerable:!0,get:function(){return H.every}});var K=Rb();Object.defineProperty(e,"exhaust",{enumerable:!0,get:function(){return K.exhaust}});var G=$s();Object.defineProperty(e,"exhaustAll",{enumerable:!0,get:function(){return G.exhaustAll}});var $=zs();Object.defineProperty(e,"exhaustMap",{enumerable:!0,get:function(){return $.exhaustMap}});var A=Cb();Object.defineProperty(e,"expand",{enumerable:!0,get:function(){return A.expand}});var q=un();Object.defineProperty(e,"filter",{enumerable:!0,get:function(){return q.filter}});var U=Ib();Object.defineProperty(e,"finalize",{enumerable:!0,get:function(){return U.finalize}});var Q=Gs();Object.defineProperty(e,"find",{enumerable:!0,get:function(){return Q.find}});var te=Ab();Object.defineProperty(e,"findIndex",{enumerable:!0,get:function(){return te.findIndex}});var z=jb();Object.defineProperty(e,"first",{enumerable:!0,get:function(){return z.first}});var re=Mb();Object.defineProperty(e,"groupBy",{enumerable:!0,get:function(){return re.groupBy}});var ce=xs();Object.defineProperty(e,"ignoreElements",{enumerable:!0,get:function(){return ce.ignoreElements}});var ae=Nb();Object.defineProperty(e,"isEmpty",{enumerable:!0,get:function(){return ae.isEmpty}});var k=kb();Object.defineProperty(e,"last",{enumerable:!0,get:function(){return k.last}});var W=an();Object.defineProperty(e,"map",{enumerable:!0,get:function(){return W.map}});var F=Ws();Object.defineProperty(e,"mapTo",{enumerable:!0,get:function(){return F.mapTo}});var Y=Lb();Object.defineProperty(e,"materialize",{enumerable:!0,get:function(){return Y.materialize}});var X=Db();Object.defineProperty(e,"max",{enumerable:!0,get:function(){return X.max}});var ne=Bb();Object.defineProperty(e,"merge",{enumerable:!0,get:function(){return ne.merge}});var le=Nu();Object.defineProperty(e,"mergeAll",{enumerable:!0,get:function(){return le.mergeAll}});var de=Ub();Object.defineProperty(e,"flatMap",{enumerable:!0,get:function(){return de.flatMap}});var D=wt();Object.defineProperty(e,"mergeMap",{enumerable:!0,get:function(){return D.mergeMap}});var P=qb();Object.defineProperty(e,"mergeMapTo",{enumerable:!0,get:function(){return P.mergeMapTo}});var I=Fb();Object.defineProperty(e,"mergeScan",{enumerable:!0,get:function(){return I.mergeScan}});var B=xb();Object.defineProperty(e,"mergeWith",{enumerable:!0,get:function(){return B.mergeWith}});var ee=Wb();Object.defineProperty(e,"min",{enumerable:!0,get:function(){return ee.min}});var ue=pc();Object.defineProperty(e,"multicast",{enumerable:!0,get:function(){return ue.multicast}});var oe=ju();Object.defineProperty(e,"observeOn",{enumerable:!0,get:function(){return oe.observeOn}});var ve=Vb();Object.defineProperty(e,"onErrorResumeNext",{enumerable:!0,get:function(){return ve.onErrorResumeNext}});var pe=Hb();Object.defineProperty(e,"pairwise",{enumerable:!0,get:function(){return pe.pairwise}});var ye=IO();Object.defineProperty(e,"partition",{enumerable:!0,get:function(){return ye.partition}});var me=zb();Object.defineProperty(e,"pluck",{enumerable:!0,get:function(){return me.pluck}});var N=$b();Object.defineProperty(e,"publish",{enumerable:!0,get:function(){return N.publish}});var S=Gb();Object.defineProperty(e,"publishBehavior",{enumerable:!0,get:function(){return S.publishBehavior}});var C=Yb();Object.defineProperty(e,"publishLast",{enumerable:!0,get:function(){return C.publishLast}});var V=Kb();Object.defineProperty(e,"publishReplay",{enumerable:!0,get:function(){return V.publishReplay}});var J=AO();Object.defineProperty(e,"race",{enumerable:!0,get:function(){return J.race}});var ie=Ks();Object.defineProperty(e,"raceWith",{enumerable:!0,get:function(){return ie.raceWith}});var se=Ri();Object.defineProperty(e,"reduce",{enumerable:!0,get:function(){return se.reduce}});var ge=Zb();Object.defineProperty(e,"repeat",{enumerable:!0,get:function(){return ge.repeat}});var Ae=Qb();Object.defineProperty(e,"repeatWhen",{enumerable:!0,get:function(){return Ae.repeatWhen}});var Pe=Xb();Object.defineProperty(e,"retry",{enumerable:!0,get:function(){return Pe.retry}});var je=Jb();Object.defineProperty(e,"retryWhen",{enumerable:!0,get:function(){return je.retryWhen}});var Ee=Ss();Object.defineProperty(e,"refCount",{enumerable:!0,get:function(){return Ee.refCount}});var mc=Zs();Object.defineProperty(e,"sample",{enumerable:!0,get:function(){return mc.sample}});var gc=em();Object.defineProperty(e,"sampleTime",{enumerable:!0,get:function(){return gc.sampleTime}});var Oc=rm();Object.defineProperty(e,"scan",{enumerable:!0,get:function(){return Oc.scan}});var wc=tm();Object.defineProperty(e,"sequenceEqual",{enumerable:!0,get:function(){return wc.sequenceEqual}});var Ec=Qs();Object.defineProperty(e,"share",{enumerable:!0,get:function(){return Ec.share}});var Tc=nm();Object.defineProperty(e,"shareReplay",{enumerable:!0,get:function(){return Tc.shareReplay}});var Sc=im();Object.defineProperty(e,"single",{enumerable:!0,get:function(){return Sc.single}});var Pc=om();Object.defineProperty(e,"skip",{enumerable:!0,get:function(){return Pc.skip}});var Rc=am();Object.defineProperty(e,"skipLast",{enumerable:!0,get:function(){return Rc.skipLast}});var Cc=um();Object.defineProperty(e,"skipUntil",{enumerable:!0,get:function(){return Cc.skipUntil}});var Ic=cm();Object.defineProperty(e,"skipWhile",{enumerable:!0,get:function(){return Ic.skipWhile}});var Ac=sm();Object.defineProperty(e,"startWith",{enumerable:!0,get:function(){return Ac.startWith}});var jc=Mu();Object.defineProperty(e,"subscribeOn",{enumerable:!0,get:function(){return jc.subscribeOn}});var Mc=lm();Object.defineProperty(e,"switchAll",{enumerable:!0,get:function(){return Mc.switchAll}});var Nc=Uu();Object.defineProperty(e,"switchMap",{enumerable:!0,get:function(){return Nc.switchMap}});var kc=fm();Object.defineProperty(e,"switchMapTo",{enumerable:!0,get:function(){return kc.switchMapTo}});var Lc=dm();Object.defineProperty(e,"switchScan",{enumerable:!0,get:function(){return Lc.switchScan}});var Dc=Lu();Object.defineProperty(e,"take",{enumerable:!0,get:function(){return Dc.take}});var Uc=Ys();Object.defineProperty(e,"takeLast",{enumerable:!0,get:function(){return Uc.takeLast}});var qc=hm();Object.defineProperty(e,"takeUntil",{enumerable:!0,get:function(){return qc.takeUntil}});var Fc=vm();Object.defineProperty(e,"takeWhile",{enumerable:!0,get:function(){return Fc.takeWhile}});var Bc=_m();Object.defineProperty(e,"tap",{enumerable:!0,get:function(){return Bc.tap}});var xc=Xs();Object.defineProperty(e,"throttle",{enumerable:!0,get:function(){return xc.throttle}});var Wc=pm();Object.defineProperty(e,"throttleTime",{enumerable:!0,get:function(){return Wc.throttleTime}});var Vc=Du();Object.defineProperty(e,"throwIfEmpty",{enumerable:!0,get:function(){return Vc.throwIfEmpty}});var Hc=ym();Object.defineProperty(e,"timeInterval",{enumerable:!0,get:function(){return Hc.timeInterval}});var zc=ac();Object.defineProperty(e,"timeout",{enumerable:!0,get:function(){return zc.timeout}});var $c=bm();Object.defineProperty(e,"timeoutWith",{enumerable:!0,get:function(){return $c.timeoutWith}});var Gc=mm();Object.defineProperty(e,"timestamp",{enumerable:!0,get:function(){return Gc.timestamp}});var Yc=qs();Object.defineProperty(e,"toArray",{enumerable:!0,get:function(){return Yc.toArray}});var Kc=gm();Object.defineProperty(e,"window",{enumerable:!0,get:function(){return Kc.window}});var Zc=Om();Object.defineProperty(e,"windowCount",{enumerable:!0,get:function(){return Zc.windowCount}});var Qc=wm();Object.defineProperty(e,"windowTime",{enumerable:!0,get:function(){return Qc.windowTime}});var Xc=Em();Object.defineProperty(e,"windowToggle",{enumerable:!0,get:function(){return Xc.windowToggle}});var Jc=Tm();Object.defineProperty(e,"windowWhen",{enumerable:!0,get:function(){return Jc.windowWhen}});var es=Sm();Object.defineProperty(e,"withLatestFrom",{enumerable:!0,get:function(){return es.withLatestFrom}});var rs=Rm();Object.defineProperty(e,"zip",{enumerable:!0,get:function(){return rs.zip}});var ts=Pm();Object.defineProperty(e,"zipAll",{enumerable:!0,get:function(){return ts.zipAll}});var ns=Cm();Object.defineProperty(e,"zipWith",{enumerable:!0,get:function(){return ns.zipWith}})})(ps)),ps}var St={},m_;function bc(){if(m_)return St;m_=1;var e=St&&St.__awaiter||function(c,l,a,_){function p(m){return m instanceof a?m:new a(function(h){h(m)})}return new(a||(a=Promise))(function(m,h){function u(s){try{y(_.next(s))}catch(f){h(f)}}function v(s){try{y(_.throw(s))}catch(f){h(f)}}function y(s){s.done?m(s.value):p(s.value).then(u,v)}y((_=_.apply(c,l||[])).next())})},g=St&&St.__generator||function(c,l){var a={label:0,sent:function(){if(m[0]&1)throw m[1];return m[1]},trys:[],ops:[]},_,p,m,h=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return h.next=u(0),h.throw=u(1),h.return=u(2),typeof Symbol=="function"&&(h[Symbol.iterator]=function(){return this}),h;function u(y){return function(s){return v([y,s])}}function v(y){if(_)throw new TypeError("Generator is already executing.");for(;h&&(h=0,y[0]&&(a=0)),a;)try{if(_=1,p&&(m=y[0]&2?p.return:y[0]?p.throw||((m=p.return)&&m.call(p),0):p.next)&&!(m=m.call(p,y[1])).done)return m;switch(p=0,m&&(y=[y[0]&2,m.value]),y[0]){case 0:case 1:m=y;break;case 4:return a.label++,{value:y[1],done:!1};case 5:a.label++,p=y[1],y=[0];continue;case 7:y=a.ops.pop(),a.trys.pop();continue;default:if(m=a.trys,!(m=m.length>0&&m[m.length-1])&&(y[0]===6||y[0]===2)){a=0;continue}if(y[0]===3&&(!m||y[1]>m[0]&&y[1]<m[3])){a.label=y[1];break}if(y[0]===6&&a.label<m[1]){a.label=m[1],m=y;break}if(m&&a.label<m[2]){a.label=m[2],a.ops.push(y);break}m[2]&&a.ops.pop(),a.trys.pop();continue}y=l.call(c,a)}catch(s){y=[6,s],p=0}finally{_=m=0}if(y[0]&5)throw y[1];return{value:y[0]?y[1]:void 0,done:!0}}};Object.defineProperty(St,"__esModule",{value:!0});var O=_e(),d=yc(),o=Js(),n={READY:0,STREAMING:1,COMPLETED:2},t=(function(){function c(l,a){var _=l.pipe((0,o.publishReplay)(1),(0,o.refCount)());this._result=_,this._keys=_.pipe((0,o.mergeMap)(function(p){return(0,d.from)(p.keys())}),(0,o.publishReplay)(1),(0,o.refCount)()),this._records=void 0,this._controls=new i,this._summary=new d.ReplaySubject,this._state=a||n.READY}return c.prototype.keys=function(){return this._keys},c.prototype.records=function(){var l=this,a=this._result.pipe((0,o.mergeMap)(function(_){return new d.Observable(function(p){return l._startStreaming({result:_,recordsObserver:p})})}));return a.push=function(){return l._push()},a},c.prototype.consume=function(){var l=this;return this._result.pipe((0,o.mergeMap)(function(a){return new d.Observable(function(_){return l._startStreaming({result:a,summaryObserver:_})})}))},c.prototype.pause=function(){this._controls.pause()},c.prototype.resume=function(){return this._controls.resume()},c.prototype.push=function(){return this._controls.push()},c.prototype._startStreaming=function(l){var a=l===void 0?{}:l,_=a.result,p=a.recordsObserver,m=p===void 0?null:p,h=a.summaryObserver,u=h===void 0?null:h,v=[];return u&&v.push(this._summary.subscribe(u)),this._state<n.STREAMING?(this._state=n.STREAMING,this._setupRecordsStream(_),m?v.push(this._records.subscribe(m)):_._cancel(),v.push({unsubscribe:function(){_._cancel&&_._cancel()}})):m&&m.error((0,O.newError)("Streaming has already started/consumed with a previous records or summary subscription.")),function(){v.forEach(function(y){return y.unsubscribe()})}},c.prototype._toObservable=function(){var l=this;function a(_){return new d.Observable(function(p){p.next(_),p.complete()})}return new d.Observable(function(_){l._result.subscribe({complete:function(){return _.complete()},next:function(p){return _.next(new c(a(p)),l._state)},error:function(p){return _.error(p)}})})},c.prototype._setupRecordsStream=function(l){var a=this;return this._records?this._records:(this._records=r(l[Symbol.asyncIterator](),{complete:function(){return e(a,void 0,void 0,function(){var _,p;return g(this,function(m){switch(m.label){case 0:return this._state=n.COMPLETED,p=(_=this._summary).next,[4,l.summary()];case 1:return p.apply(_,[m.sent()]),this._summary.complete(),[2]}})})},error:function(_){a._state=n.COMPLETED,a._summary.error(_)}},this._controls),this._records)},c})();St.default=t;function r(c,l,a){var _=this;a===void 0&&(a=new i);var p=new d.Subject,m=function(u){return e(_,void 0,void 0,function(){var v,y,s,f;return g(this,function(b){switch(b.label){case 0:return b.trys.push([0,2,3,4]),a.pushing=!0,[4,u];case 1:return v=b.sent(),y=v.done,s=v.value,y?(p.complete(),l.complete()):(p.next(s),a.paused||m(c.next()).catch(function(){})),[3,4];case 2:return f=b.sent(),p.error(f),l.error(f),[3,4];case 3:return a.pushing=!1,[7];case 4:return[2]}})})};function h(u){return e(this,void 0,void 0,function(){return g(this,function(v){switch(v.label){case 0:return[4,m(c.next(u))];case 1:return v.sent(),[2]}})})}return a.pusher=h,h(),p}var i=(function(){function c(l){l===void 0&&(l=function(){return e(a,void 0,void 0,function(){return g(this,function(_){return[2]})})});var a=this;this._paused=!1,this._pushing=!1,this._push=l}return c.prototype.pause=function(){this._paused=!0},Object.defineProperty(c.prototype,"paused",{get:function(){return this._paused},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"pushing",{get:function(){return this._pushing},set:function(l){this._pushing=l},enumerable:!1,configurable:!0}),c.prototype.resume=function(){return e(this,void 0,void 0,function(){var l;return g(this,function(a){switch(a.label){case 0:return l=this._paused,this._paused=!1,l&&!this._pushing?[4,this._push()]:[3,2];case 1:a.sent(),a.label=2;case 2:return[2]}})})},c.prototype.push=function(){return e(this,void 0,void 0,function(){return g(this,function(l){switch(l.label){case 0:return this.pause(),[4,this._push()];case 1:return[2,l.sent()]}})})},Object.defineProperty(c.prototype,"pusher",{get:function(){return this._push},set:function(l){this._push=l},enumerable:!1,configurable:!0}),c})();return St}var si={},g_;function el(){if(g_)return si;g_=1;var e=si&&si.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(si,"__esModule",{value:!0});var g=yc(),O=e(bc());e(_e());var d=(function(){function o(n){this._txc=n}return o.prototype.run=function(n,t){var r=this;return new O.default(new g.Observable(function(i){try{i.next(r._txc.run(n,t)),i.complete()}catch(c){i.error(c)}return function(){}}))},o.prototype.commit=function(){var n=this;return new g.Observable(function(t){n._txc.commit().then(function(){t.complete()}).catch(function(r){return t.error(r)})})},o.prototype.rollback=function(){var n=this;return new g.Observable(function(t){n._txc.rollback().then(function(){t.complete()}).catch(function(r){return t.error(r)})})},o.prototype.isOpen=function(){return this._txc.isOpen()},o.prototype.close=function(){var n=this;return new g.Observable(function(t){n._txc.close().then(function(){t.complete()}).catch(function(r){return t.error(r)})})},o})();return si.default=d,si}var li={},O_;function Im(){if(O_)return li;O_=1;var e=li&&li.__importDefault||function(O){return O&&O.__esModule?O:{default:O}};Object.defineProperty(li,"__esModule",{value:!0}),e(bc()),e(el());var g=(function(){function O(d){var o=d.run;this._run=o}return O.fromTransaction=function(d){return new O({run:d.run.bind(d)})},O.prototype.run=function(d,o){return this._run(d,o)},O})();return li.default=g,li}var Zu={},w_;function jO(){if(w_)return Zu;w_=1,Object.defineProperty(Zu,"__esModule",{value:!0});var e=_e(),g=yc(),O=Js();e.internal.logger.Logger;var d=e.error.SERVICE_UNAVAILABLE,o=30*1e3,n=1e3,t=2,r=.2,i=(function(){function l(a){var _=a===void 0?{}:a,p=_.maxRetryTimeout,m=p===void 0?o:p,h=_.initialDelay,u=h===void 0?n:h,v=_.delayMultiplier,y=v===void 0?t:v,s=_.delayJitter,f=s===void 0?r:s,b=_.logger,E=b===void 0?null:b;this._maxRetryTimeout=c(m,o),this._initialDelay=c(u,n),this._delayMultiplier=c(y,t),this._delayJitter=c(f,r),this._logger=E}return l.prototype.retry=function(a){var _=this;return a.pipe((0,O.retryWhen)(function(p){var m=[],h=Date.now(),u=1,v=_._initialDelay;return p.pipe((0,O.mergeMap)(function(y){if(!(0,e.isRetriableError)(y))return(0,g.throwError)(function(){return y});if(m.push(y),u>=2&&Date.now()-h>=_._maxRetryTimeout){var s=(0,e.newError)("Failed after retried for ".concat(u," times in ").concat(_._maxRetryTimeout," ms. Make sure that your database is online and retry again."),d);return s.seenErrors=m,(0,g.throwError)(function(){return s})}var f=_._computeNextDelay(v);return v=v*_._delayMultiplier,u++,_._logger&&_._logger.warn("Transaction failed and will be retried in ".concat(f)),(0,g.of)(1).pipe((0,O.delay)(f))}))}))},l.prototype._computeNextDelay=function(a){var _=a*this._delayJitter;return a-_+2*_*Math.random()},l})();Zu.default=i;function c(l,a){return l||l===0?l:a}return Zu}var E_;function Am(){if(E_)return ci;E_=1;var e=ci&&ci.__importDefault||function(h){return h&&h.__esModule?h:{default:h}};Object.defineProperty(ci,"__esModule",{value:!0});var g=yc(),O=Js(),d=e(bc()),o=_e(),n=e(el()),t=e(Im()),r=e(jO()),i=o.internal.constants,c=i.ACCESS_MODE_READ,l=i.ACCESS_MODE_WRITE,a=i.TELEMETRY_APIS,_=o.internal.txConfig.TxConfig,p=(function(){function h(u){var v=u===void 0?{}:u,y=v.session,s=v.config,f=v.log;this._session=y,this._retryLogic=m(s),this._log=f}return h.prototype.run=function(u,v,y){var s=this;return new d.default(new g.Observable(function(f){try{f.next(s._session.run(u,v,y)),f.complete()}catch(b){f.error(b)}return function(){}}))},h.prototype.beginTransaction=function(u){return this._beginTransaction(this._session._mode,u,{api:a.UNMANAGED_TRANSACTION})},h.prototype.readTransaction=function(u,v){return this._runTransaction(c,u,v)},h.prototype.writeTransaction=function(u,v){return this._runTransaction(l,u,v)},h.prototype.executeRead=function(u,v){return this._executeInTransaction(c,u,v)},h.prototype.executeWrite=function(u,v){return this._executeInTransaction(l,u,v)},h.prototype._executeInTransaction=function(u,v,y){var s=function(f){return new t.default({run:f.run.bind(f)})};return this._runTransaction(u,v,y,s)},h.prototype.close=function(){var u=this;return new g.Observable(function(v){u._session.close().then(function(){v.complete()}).catch(function(y){return v.error(y)})})},h.prototype[Symbol.asyncDispose]=function(){return this.close()},h.prototype.lastBookmark=function(){return this.lastBookmarks()},h.prototype.lastBookmarks=function(){return this._session.lastBookmarks()},h.prototype._beginTransaction=function(u,v,y){var s=this,f=_.empty();return v&&(f=new _(v,this._log)),new g.Observable(function(b){try{s._session._beginTransaction(u,f,y).then(function(E){b.next(new n.default(E)),b.complete()}).catch(function(E){return b.error(E)})}catch(E){b.error(E)}return function(){}})},h.prototype._runTransaction=function(u,v,y,s){var f=this;s===void 0&&(s=function(w){return w});var b=_.empty();y&&(b=new _(y));var E={apiTelemetryConfig:{api:a.MANAGED_TRANSACTION,onTelemetrySuccess:function(){E.apiTelemetryConfig=void 0}}};return this._retryLogic.retry((0,g.of)(1).pipe((0,O.mergeMap)(function(){return f._beginTransaction(u,b,E.apiTelemetryConfig)}),(0,O.mergeMap)(function(w){return(0,g.defer)(function(){try{return v(s(w))}catch(T){return(0,g.throwError)(function(){return T})}}).pipe((0,O.catchError)(function(T){return w.rollback().pipe((0,O.concatWith)((0,g.throwError)(function(){return T})))}),(0,O.concatWith)(w.commit()))})))},h})();ci.default=p;function m(h){var u=h&&h.maxTransactionRetryTime?h.maxTransactionRetryTime:null;return new r.default({maxRetryTimeout:u})}return ci}var T_;function MO(){if(T_)return rr;T_=1;var e=rr&&rr.__extends||(function(){var c=function(l,a){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,p){_.__proto__=p}||function(_,p){for(var m in p)Object.prototype.hasOwnProperty.call(p,m)&&(_[m]=p[m])},c(l,a)};return function(l,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");c(l,a);function _(){this.constructor=l}l.prototype=a===null?Object.create(a):(_.prototype=a.prototype,new _)}})(),g=rr&&rr.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(rr,"__esModule",{value:!0}),rr.WRITE=rr.READ=rr.Driver=void 0;var O=_e(),d=g(Am()),o=O.internal.constants.FETCH_ALL,n=O.driver.READ,t=O.driver.WRITE;rr.READ=n,rr.WRITE=t;var r=(function(c){e(l,c);function l(){return c!==null&&c.apply(this,arguments)||this}return l.prototype.rxSession=function(a){var _=a===void 0?{}:a,p=_.defaultAccessMode,m=p===void 0?t:p,h=_.bookmarks,u=_.database,v=u===void 0?"":u,y=_.fetchSize,s=_.impersonatedUser,f=_.bookmarkManager,b=_.notificationFilter,E=_.auth;return new d.default({session:this._newSession({defaultAccessMode:m,bookmarkOrBookmarks:h,database:v,impersonatedUser:s,auth:E,reactive:!1,fetchSize:i(y,this._config.fetchSize),bookmarkManager:f,notificationFilter:b,log:this._log}),config:this._config,log:this._log})},l})(O.Driver);rr.Driver=r;function i(c,l){var a=parseInt(c,10);if(a>0||a===o)return a;if(a===0||a<0)throw new Error("The fetch size can only be a positive value or ".concat(o," for ALL. However fetchSize = ").concat(a));return l}return rr.default=r,rr}var Qu={},S_;function NO(){return S_||(S_=1,Object.defineProperty(Qu,"__esModule",{value:!0}),Qu.default="5.28.3"),Qu}var wr={},Nr={},Xu={},P_;function jm(){if(P_)return Xu;P_=1,Object.defineProperty(Xu,"__esModule",{value:!0});var e=(function(){function g(){}return g.prototype.selectReader=function(O){throw new Error("Abstract function")},g.prototype.selectWriter=function(O){throw new Error("Abstract function")},g})();return Xu.default=e,Xu}var Pt={},Ju={},R_;function kO(){if(R_)return Ju;R_=1,Object.defineProperty(Ju,"__esModule",{value:!0});var e=(function(){function g(O){this._offset=O||0}return g.prototype.next=function(O){if(O===0)return-1;var d=this._offset;return this._offset+=1,this._offset===Number.MAX_SAFE_INTEGER&&(this._offset=0),d%O},g})();return Ju.default=e,Ju}var C_;function LO(){if(C_)return Pt;C_=1;var e=Pt&&Pt.__extends||(function(){var n=function(t,r){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,c){i.__proto__=c}||function(i,c){for(var l in c)Object.prototype.hasOwnProperty.call(c,l)&&(i[l]=c[l])},n(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");n(t,r);function i(){this.constructor=t}t.prototype=r===null?Object.create(r):(i.prototype=r.prototype,new i)}})(),g=Pt&&Pt.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(Pt,"__esModule",{value:!0});var O=g(kO()),d=g(jm()),o=(function(n){e(t,n);function t(r){var i=n.call(this)||this;return i._readersIndex=new O.default,i._writersIndex=new O.default,i._connectionPool=r,i}return t.prototype.selectReader=function(r){return this._select(r,this._readersIndex)},t.prototype.selectWriter=function(r){return this._select(r,this._writersIndex)},t.prototype._select=function(r,i){var c=r.length;if(c===0)return null;var l=i.next(c),a=l,_=null,p=Number.MAX_SAFE_INTEGER;do{var m=r[a],h=this._connectionPool.activeResourceCount(m);h<p&&(_=m,p=h),a===c-1?a=0:a++}while(a!==l);return _},t})(d.default);return Pt.default=o,Pt}var I_;function Mm(){if(I_)return Nr;I_=1;var e=Nr&&Nr.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(Nr,"__esModule",{value:!0}),Nr.LeastConnectedLoadBalancingStrategy=Nr.LoadBalancingStrategy=void 0;var g=e(jm());Nr.LoadBalancingStrategy=g.default;var O=e(LO());return Nr.LeastConnectedLoadBalancingStrategy=O.default,Nr.default=O.default,Nr}var bt={},ec={},mt={},Er={},fi={},gt={},ys={},Ou={},A_;function Nm(){if(A_)return Ou;A_=1,Ou.byteLength=r,Ou.toByteArray=c,Ou.fromByteArray=_;for(var e=[],g=[],O=typeof Uint8Array<"u"?Uint8Array:Array,d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,n=d.length;o<n;++o)e[o]=d[o],g[d.charCodeAt(o)]=o;g[45]=62,g[95]=63;function t(p){var m=p.length;if(m%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var h=p.indexOf("=");h===-1&&(h=m);var u=h===m?0:4-h%4;return[h,u]}function r(p){var m=t(p),h=m[0],u=m[1];return(h+u)*3/4-u}function i(p,m,h){return(m+h)*3/4-h}function c(p){var m,h=t(p),u=h[0],v=h[1],y=new O(i(p,u,v)),s=0,f=v>0?u-4:u,b;for(b=0;b<f;b+=4)m=g[p.charCodeAt(b)]<<18|g[p.charCodeAt(b+1)]<<12|g[p.charCodeAt(b+2)]<<6|g[p.charCodeAt(b+3)],y[s++]=m>>16&255,y[s++]=m>>8&255,y[s++]=m&255;return v===2&&(m=g[p.charCodeAt(b)]<<2|g[p.charCodeAt(b+1)]>>4,y[s++]=m&255),v===1&&(m=g[p.charCodeAt(b)]<<10|g[p.charCodeAt(b+1)]<<4|g[p.charCodeAt(b+2)]>>2,y[s++]=m>>8&255,y[s++]=m&255),y}function l(p){return e[p>>18&63]+e[p>>12&63]+e[p>>6&63]+e[p&63]}function a(p,m,h){for(var u,v=[],y=m;y<h;y+=3)u=(p[y]<<16&16711680)+(p[y+1]<<8&65280)+(p[y+2]&255),v.push(l(u));return v.join("")}function _(p){for(var m,h=p.length,u=h%3,v=[],y=16383,s=0,f=h-u;s<f;s+=y)v.push(a(p,s,s+y>f?f:s+y));return u===1?(m=p[h-1],v.push(e[m>>2]+e[m<<4&63]+"==")):u===2&&(m=(p[h-2]<<8)+p[h-1],v.push(e[m>>10]+e[m>>4&63]+e[m<<2&63]+"=")),v.join("")}return Ou}var rc={};var j_;function km(){return j_||(j_=1,rc.read=function(e,g,O,d,o){var n,t,r=o*8-d-1,i=(1<<r)-1,c=i>>1,l=-7,a=O?o-1:0,_=O?-1:1,p=e[g+a];for(a+=_,n=p&(1<<-l)-1,p>>=-l,l+=r;l>0;n=n*256+e[g+a],a+=_,l-=8);for(t=n&(1<<-l)-1,n>>=-l,l+=d;l>0;t=t*256+e[g+a],a+=_,l-=8);if(n===0)n=1-c;else{if(n===i)return t?NaN:(p?-1:1)*(1/0);t=t+Math.pow(2,d),n=n-c}return(p?-1:1)*t*Math.pow(2,n-d)},rc.write=function(e,g,O,d,o,n){var t,r,i,c=n*8-o-1,l=(1<<c)-1,a=l>>1,_=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,p=d?0:n-1,m=d?1:-1,h=g<0||g===0&&1/g<0?1:0;for(g=Math.abs(g),isNaN(g)||g===1/0?(r=isNaN(g)?1:0,t=l):(t=Math.floor(Math.log(g)/Math.LN2),g*(i=Math.pow(2,-t))<1&&(t--,i*=2),t+a>=1?g+=_/i:g+=_*Math.pow(2,1-a),g*i>=2&&(t++,i/=2),t+a>=l?(r=0,t=l):t+a>=1?(r=(g*i-1)*Math.pow(2,o),t=t+a):(r=g*Math.pow(2,a-1)*Math.pow(2,o),t=0));o>=8;e[O+p]=r&255,p+=m,r/=256,o-=8);for(t=t<<o|r,c+=o;c>0;e[O+p]=t&255,p+=m,t/=256,c-=8);e[O+p-m]|=h*128}),rc}var M_;function Lm(){return M_||(M_=1,(function(e){const g=Nm(),O=km(),d=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=r,e.SlowBuffer=y,e.INSPECT_MAX_BYTES=50;const o=2147483647;e.kMaxLength=o,r.TYPED_ARRAY_SUPPORT=n(),!r.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function n(){try{const N=new Uint8Array(1),S={foo:function(){return 42}};return Object.setPrototypeOf(S,Uint8Array.prototype),Object.setPrototypeOf(N,S),N.foo()===42}catch{return!1}}Object.defineProperty(r.prototype,"parent",{enumerable:!0,get:function(){if(r.isBuffer(this))return this.buffer}}),Object.defineProperty(r.prototype,"offset",{enumerable:!0,get:function(){if(r.isBuffer(this))return this.byteOffset}});function t(N){if(N>o)throw new RangeError('The value "'+N+'" is invalid for option "size"');const S=new Uint8Array(N);return Object.setPrototypeOf(S,r.prototype),S}function r(N,S,C){if(typeof N=="number"){if(typeof S=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return a(N)}return i(N,S,C)}r.poolSize=8192;function i(N,S,C){if(typeof N=="string")return _(N,S);if(ArrayBuffer.isView(N))return m(N);if(N==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof N);if(oe(N,ArrayBuffer)||N&&oe(N.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(oe(N,SharedArrayBuffer)||N&&oe(N.buffer,SharedArrayBuffer)))return h(N,S,C);if(typeof N=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const V=N.valueOf&&N.valueOf();if(V!=null&&V!==N)return r.from(V,S,C);const J=u(N);if(J)return J;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof N[Symbol.toPrimitive]=="function")return r.from(N[Symbol.toPrimitive]("string"),S,C);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof N)}r.from=function(N,S,C){return i(N,S,C)},Object.setPrototypeOf(r.prototype,Uint8Array.prototype),Object.setPrototypeOf(r,Uint8Array);function c(N){if(typeof N!="number")throw new TypeError('"size" argument must be of type number');if(N<0)throw new RangeError('The value "'+N+'" is invalid for option "size"')}function l(N,S,C){return c(N),N<=0?t(N):S!==void 0?typeof C=="string"?t(N).fill(S,C):t(N).fill(S):t(N)}r.alloc=function(N,S,C){return l(N,S,C)};function a(N){return c(N),t(N<0?0:v(N)|0)}r.allocUnsafe=function(N){return a(N)},r.allocUnsafeSlow=function(N){return a(N)};function _(N,S){if((typeof S!="string"||S==="")&&(S="utf8"),!r.isEncoding(S))throw new TypeError("Unknown encoding: "+S);const C=s(N,S)|0;let V=t(C);const J=V.write(N,S);return J!==C&&(V=V.slice(0,J)),V}function p(N){const S=N.length<0?0:v(N.length)|0,C=t(S);for(let V=0;V<S;V+=1)C[V]=N[V]&255;return C}function m(N){if(oe(N,Uint8Array)){const S=new Uint8Array(N);return h(S.buffer,S.byteOffset,S.byteLength)}return p(N)}function h(N,S,C){if(S<0||N.byteLength<S)throw new RangeError('"offset" is outside of buffer bounds');if(N.byteLength<S+(C||0))throw new RangeError('"length" is outside of buffer bounds');let V;return S===void 0&&C===void 0?V=new Uint8Array(N):C===void 0?V=new Uint8Array(N,S):V=new Uint8Array(N,S,C),Object.setPrototypeOf(V,r.prototype),V}function u(N){if(r.isBuffer(N)){const S=v(N.length)|0,C=t(S);return C.length===0||N.copy(C,0,0,S),C}if(N.length!==void 0)return typeof N.length!="number"||ve(N.length)?t(0):p(N);if(N.type==="Buffer"&&Array.isArray(N.data))return p(N.data)}function v(N){if(N>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return N|0}function y(N){return+N!=N&&(N=0),r.alloc(+N)}r.isBuffer=function(S){return S!=null&&S._isBuffer===!0&&S!==r.prototype},r.compare=function(S,C){if(oe(S,Uint8Array)&&(S=r.from(S,S.offset,S.byteLength)),oe(C,Uint8Array)&&(C=r.from(C,C.offset,C.byteLength)),!r.isBuffer(S)||!r.isBuffer(C))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(S===C)return 0;let V=S.length,J=C.length;for(let ie=0,se=Math.min(V,J);ie<se;++ie)if(S[ie]!==C[ie]){V=S[ie],J=C[ie];break}return V<J?-1:J<V?1:0},r.isEncoding=function(S){switch(String(S).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},r.concat=function(S,C){if(!Array.isArray(S))throw new TypeError('"list" argument must be an Array of Buffers');if(S.length===0)return r.alloc(0);let V;if(C===void 0)for(C=0,V=0;V<S.length;++V)C+=S[V].length;const J=r.allocUnsafe(C);let ie=0;for(V=0;V<S.length;++V){let se=S[V];if(oe(se,Uint8Array))ie+se.length>J.length?(r.isBuffer(se)||(se=r.from(se)),se.copy(J,ie)):Uint8Array.prototype.set.call(J,se,ie);else if(r.isBuffer(se))se.copy(J,ie);else throw new TypeError('"list" argument must be an Array of Buffers');ie+=se.length}return J};function s(N,S){if(r.isBuffer(N))return N.length;if(ArrayBuffer.isView(N)||oe(N,ArrayBuffer))return N.byteLength;if(typeof N!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof N);const C=N.length,V=arguments.length>2&&arguments[2]===!0;if(!V&&C===0)return 0;let J=!1;for(;;)switch(S){case"ascii":case"latin1":case"binary":return C;case"utf8":case"utf-8":return P(N).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C*2;case"hex":return C>>>1;case"base64":return ee(N).length;default:if(J)return V?-1:P(N).length;S=(""+S).toLowerCase(),J=!0}}r.byteLength=s;function f(N,S,C){let V=!1;if((S===void 0||S<0)&&(S=0),S>this.length||((C===void 0||C>this.length)&&(C=this.length),C<=0)||(C>>>=0,S>>>=0,C<=S))return"";for(N||(N="utf8");;)switch(N){case"hex":return A(this,S,C);case"utf8":case"utf-8":return Z(this,S,C);case"ascii":return G(this,S,C);case"latin1":case"binary":return $(this,S,C);case"base64":return x(this,S,C);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return q(this,S,C);default:if(V)throw new TypeError("Unknown encoding: "+N);N=(N+"").toLowerCase(),V=!0}}r.prototype._isBuffer=!0;function b(N,S,C){const V=N[S];N[S]=N[C],N[C]=V}r.prototype.swap16=function(){const S=this.length;if(S%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let C=0;C<S;C+=2)b(this,C,C+1);return this},r.prototype.swap32=function(){const S=this.length;if(S%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let C=0;C<S;C+=4)b(this,C,C+3),b(this,C+1,C+2);return this},r.prototype.swap64=function(){const S=this.length;if(S%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let C=0;C<S;C+=8)b(this,C,C+7),b(this,C+1,C+6),b(this,C+2,C+5),b(this,C+3,C+4);return this},r.prototype.toString=function(){const S=this.length;return S===0?"":arguments.length===0?Z(this,0,S):f.apply(this,arguments)},r.prototype.toLocaleString=r.prototype.toString,r.prototype.equals=function(S){if(!r.isBuffer(S))throw new TypeError("Argument must be a Buffer");return this===S?!0:r.compare(this,S)===0},r.prototype.inspect=function(){let S="";const C=e.INSPECT_MAX_BYTES;return S=this.toString("hex",0,C).replace(/(.{2})/g,"$1 ").trim(),this.length>C&&(S+=" ... "),"<Buffer "+S+">"},d&&(r.prototype[d]=r.prototype.inspect),r.prototype.compare=function(S,C,V,J,ie){if(oe(S,Uint8Array)&&(S=r.from(S,S.offset,S.byteLength)),!r.isBuffer(S))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof S);if(C===void 0&&(C=0),V===void 0&&(V=S?S.length:0),J===void 0&&(J=0),ie===void 0&&(ie=this.length),C<0||V>S.length||J<0||ie>this.length)throw new RangeError("out of range index");if(J>=ie&&C>=V)return 0;if(J>=ie)return-1;if(C>=V)return 1;if(C>>>=0,V>>>=0,J>>>=0,ie>>>=0,this===S)return 0;let se=ie-J,ge=V-C;const Ae=Math.min(se,ge),Pe=this.slice(J,ie),je=S.slice(C,V);for(let Ee=0;Ee<Ae;++Ee)if(Pe[Ee]!==je[Ee]){se=Pe[Ee],ge=je[Ee];break}return se<ge?-1:ge<se?1:0};function E(N,S,C,V,J){if(N.length===0)return-1;if(typeof C=="string"?(V=C,C=0):C>2147483647?C=2147483647:C<-2147483648&&(C=-2147483648),C=+C,ve(C)&&(C=J?0:N.length-1),C<0&&(C=N.length+C),C>=N.length){if(J)return-1;C=N.length-1}else if(C<0)if(J)C=0;else return-1;if(typeof S=="string"&&(S=r.from(S,V)),r.isBuffer(S))return S.length===0?-1:w(N,S,C,V,J);if(typeof S=="number")return S=S&255,typeof Uint8Array.prototype.indexOf=="function"?J?Uint8Array.prototype.indexOf.call(N,S,C):Uint8Array.prototype.lastIndexOf.call(N,S,C):w(N,[S],C,V,J);throw new TypeError("val must be string, number or Buffer")}function w(N,S,C,V,J){let ie=1,se=N.length,ge=S.length;if(V!==void 0&&(V=String(V).toLowerCase(),V==="ucs2"||V==="ucs-2"||V==="utf16le"||V==="utf-16le")){if(N.length<2||S.length<2)return-1;ie=2,se/=2,ge/=2,C/=2}function Ae(je,Ee){return ie===1?je[Ee]:je.readUInt16BE(Ee*ie)}let Pe;if(J){let je=-1;for(Pe=C;Pe<se;Pe++)if(Ae(N,Pe)===Ae(S,je===-1?0:Pe-je)){if(je===-1&&(je=Pe),Pe-je+1===ge)return je*ie}else je!==-1&&(Pe-=Pe-je),je=-1}else for(C+ge>se&&(C=se-ge),Pe=C;Pe>=0;Pe--){let je=!0;for(let Ee=0;Ee<ge;Ee++)if(Ae(N,Pe+Ee)!==Ae(S,Ee)){je=!1;break}if(je)return Pe}return-1}r.prototype.includes=function(S,C,V){return this.indexOf(S,C,V)!==-1},r.prototype.indexOf=function(S,C,V){return E(this,S,C,V,!0)},r.prototype.lastIndexOf=function(S,C,V){return E(this,S,C,V,!1)};function T(N,S,C,V){C=Number(C)||0;const J=N.length-C;V?(V=Number(V),V>J&&(V=J)):V=J;const ie=S.length;V>ie/2&&(V=ie/2);let se;for(se=0;se<V;++se){const ge=parseInt(S.substr(se*2,2),16);if(ve(ge))return se;N[C+se]=ge}return se}function R(N,S,C,V){return ue(P(S,N.length-C),N,C,V)}function L(N,S,C,V){return ue(I(S),N,C,V)}function j(N,S,C,V){return ue(ee(S),N,C,V)}function M(N,S,C,V){return ue(B(S,N.length-C),N,C,V)}r.prototype.write=function(S,C,V,J){if(C===void 0)J="utf8",V=this.length,C=0;else if(V===void 0&&typeof C=="string")J=C,V=this.length,C=0;else if(isFinite(C))C=C>>>0,isFinite(V)?(V=V>>>0,J===void 0&&(J="utf8")):(J=V,V=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const ie=this.length-C;if((V===void 0||V>ie)&&(V=ie),S.length>0&&(V<0||C<0)||C>this.length)throw new RangeError("Attempt to write outside buffer bounds");J||(J="utf8");let se=!1;for(;;)switch(J){case"hex":return T(this,S,C,V);case"utf8":case"utf-8":return R(this,S,C,V);case"ascii":case"latin1":case"binary":return L(this,S,C,V);case"base64":return j(this,S,C,V);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,S,C,V);default:if(se)throw new TypeError("Unknown encoding: "+J);J=(""+J).toLowerCase(),se=!0}},r.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function x(N,S,C){return S===0&&C===N.length?g.fromByteArray(N):g.fromByteArray(N.slice(S,C))}function Z(N,S,C){C=Math.min(N.length,C);const V=[];let J=S;for(;J<C;){const ie=N[J];let se=null,ge=ie>239?4:ie>223?3:ie>191?2:1;if(J+ge<=C){let Ae,Pe,je,Ee;switch(ge){case 1:ie<128&&(se=ie);break;case 2:Ae=N[J+1],(Ae&192)===128&&(Ee=(ie&31)<<6|Ae&63,Ee>127&&(se=Ee));break;case 3:Ae=N[J+1],Pe=N[J+2],(Ae&192)===128&&(Pe&192)===128&&(Ee=(ie&15)<<12|(Ae&63)<<6|Pe&63,Ee>2047&&(Ee<55296||Ee>57343)&&(se=Ee));break;case 4:Ae=N[J+1],Pe=N[J+2],je=N[J+3],(Ae&192)===128&&(Pe&192)===128&&(je&192)===128&&(Ee=(ie&15)<<18|(Ae&63)<<12|(Pe&63)<<6|je&63,Ee>65535&&Ee<1114112&&(se=Ee))}}se===null?(se=65533,ge=1):se>65535&&(se-=65536,V.push(se>>>10&1023|55296),se=56320|se&1023),V.push(se),J+=ge}return K(V)}const H=4096;function K(N){const S=N.length;if(S<=H)return String.fromCharCode.apply(String,N);let C="",V=0;for(;V<S;)C+=String.fromCharCode.apply(String,N.slice(V,V+=H));return C}function G(N,S,C){let V="";C=Math.min(N.length,C);for(let J=S;J<C;++J)V+=String.fromCharCode(N[J]&127);return V}function $(N,S,C){let V="";C=Math.min(N.length,C);for(let J=S;J<C;++J)V+=String.fromCharCode(N[J]);return V}function A(N,S,C){const V=N.length;(!S||S<0)&&(S=0),(!C||C<0||C>V)&&(C=V);let J="";for(let ie=S;ie<C;++ie)J+=pe[N[ie]];return J}function q(N,S,C){const V=N.slice(S,C);let J="";for(let ie=0;ie<V.length-1;ie+=2)J+=String.fromCharCode(V[ie]+V[ie+1]*256);return J}r.prototype.slice=function(S,C){const V=this.length;S=~~S,C=C===void 0?V:~~C,S<0?(S+=V,S<0&&(S=0)):S>V&&(S=V),C<0?(C+=V,C<0&&(C=0)):C>V&&(C=V),C<S&&(C=S);const J=this.subarray(S,C);return Object.setPrototypeOf(J,r.prototype),J};function U(N,S,C){if(N%1!==0||N<0)throw new RangeError("offset is not uint");if(N+S>C)throw new RangeError("Trying to access beyond buffer length")}r.prototype.readUintLE=r.prototype.readUIntLE=function(S,C,V){S=S>>>0,C=C>>>0,V||U(S,C,this.length);let J=this[S],ie=1,se=0;for(;++se<C&&(ie*=256);)J+=this[S+se]*ie;return J},r.prototype.readUintBE=r.prototype.readUIntBE=function(S,C,V){S=S>>>0,C=C>>>0,V||U(S,C,this.length);let J=this[S+--C],ie=1;for(;C>0&&(ie*=256);)J+=this[S+--C]*ie;return J},r.prototype.readUint8=r.prototype.readUInt8=function(S,C){return S=S>>>0,C||U(S,1,this.length),this[S]},r.prototype.readUint16LE=r.prototype.readUInt16LE=function(S,C){return S=S>>>0,C||U(S,2,this.length),this[S]|this[S+1]<<8},r.prototype.readUint16BE=r.prototype.readUInt16BE=function(S,C){return S=S>>>0,C||U(S,2,this.length),this[S]<<8|this[S+1]},r.prototype.readUint32LE=r.prototype.readUInt32LE=function(S,C){return S=S>>>0,C||U(S,4,this.length),(this[S]|this[S+1]<<8|this[S+2]<<16)+this[S+3]*16777216},r.prototype.readUint32BE=r.prototype.readUInt32BE=function(S,C){return S=S>>>0,C||U(S,4,this.length),this[S]*16777216+(this[S+1]<<16|this[S+2]<<8|this[S+3])},r.prototype.readBigUInt64LE=ye(function(S){S=S>>>0,ne(S,"offset");const C=this[S],V=this[S+7];(C===void 0||V===void 0)&&le(S,this.length-8);const J=C+this[++S]*2**8+this[++S]*2**16+this[++S]*2**24,ie=this[++S]+this[++S]*2**8+this[++S]*2**16+V*2**24;return BigInt(J)+(BigInt(ie)<<BigInt(32))}),r.prototype.readBigUInt64BE=ye(function(S){S=S>>>0,ne(S,"offset");const C=this[S],V=this[S+7];(C===void 0||V===void 0)&&le(S,this.length-8);const J=C*2**24+this[++S]*2**16+this[++S]*2**8+this[++S],ie=this[++S]*2**24+this[++S]*2**16+this[++S]*2**8+V;return(BigInt(J)<<BigInt(32))+BigInt(ie)}),r.prototype.readIntLE=function(S,C,V){S=S>>>0,C=C>>>0,V||U(S,C,this.length);let J=this[S],ie=1,se=0;for(;++se<C&&(ie*=256);)J+=this[S+se]*ie;return ie*=128,J>=ie&&(J-=Math.pow(2,8*C)),J},r.prototype.readIntBE=function(S,C,V){S=S>>>0,C=C>>>0,V||U(S,C,this.length);let J=C,ie=1,se=this[S+--J];for(;J>0&&(ie*=256);)se+=this[S+--J]*ie;return ie*=128,se>=ie&&(se-=Math.pow(2,8*C)),se},r.prototype.readInt8=function(S,C){return S=S>>>0,C||U(S,1,this.length),this[S]&128?(255-this[S]+1)*-1:this[S]},r.prototype.readInt16LE=function(S,C){S=S>>>0,C||U(S,2,this.length);const V=this[S]|this[S+1]<<8;return V&32768?V|4294901760:V},r.prototype.readInt16BE=function(S,C){S=S>>>0,C||U(S,2,this.length);const V=this[S+1]|this[S]<<8;return V&32768?V|4294901760:V},r.prototype.readInt32LE=function(S,C){return S=S>>>0,C||U(S,4,this.length),this[S]|this[S+1]<<8|this[S+2]<<16|this[S+3]<<24},r.prototype.readInt32BE=function(S,C){return S=S>>>0,C||U(S,4,this.length),this[S]<<24|this[S+1]<<16|this[S+2]<<8|this[S+3]},r.prototype.readBigInt64LE=ye(function(S){S=S>>>0,ne(S,"offset");const C=this[S],V=this[S+7];(C===void 0||V===void 0)&&le(S,this.length-8);const J=this[S+4]+this[S+5]*2**8+this[S+6]*2**16+(V<<24);return(BigInt(J)<<BigInt(32))+BigInt(C+this[++S]*2**8+this[++S]*2**16+this[++S]*2**24)}),r.prototype.readBigInt64BE=ye(function(S){S=S>>>0,ne(S,"offset");const C=this[S],V=this[S+7];(C===void 0||V===void 0)&&le(S,this.length-8);const J=(C<<24)+this[++S]*2**16+this[++S]*2**8+this[++S];return(BigInt(J)<<BigInt(32))+BigInt(this[++S]*2**24+this[++S]*2**16+this[++S]*2**8+V)}),r.prototype.readFloatLE=function(S,C){return S=S>>>0,C||U(S,4,this.length),O.read(this,S,!0,23,4)},r.prototype.readFloatBE=function(S,C){return S=S>>>0,C||U(S,4,this.length),O.read(this,S,!1,23,4)},r.prototype.readDoubleLE=function(S,C){return S=S>>>0,C||U(S,8,this.length),O.read(this,S,!0,52,8)},r.prototype.readDoubleBE=function(S,C){return S=S>>>0,C||U(S,8,this.length),O.read(this,S,!1,52,8)};function Q(N,S,C,V,J,ie){if(!r.isBuffer(N))throw new TypeError('"buffer" argument must be a Buffer instance');if(S>J||S<ie)throw new RangeError('"value" argument is out of bounds');if(C+V>N.length)throw new RangeError("Index out of range")}r.prototype.writeUintLE=r.prototype.writeUIntLE=function(S,C,V,J){if(S=+S,C=C>>>0,V=V>>>0,!J){const ge=Math.pow(2,8*V)-1;Q(this,S,C,V,ge,0)}let ie=1,se=0;for(this[C]=S&255;++se<V&&(ie*=256);)this[C+se]=S/ie&255;return C+V},r.prototype.writeUintBE=r.prototype.writeUIntBE=function(S,C,V,J){if(S=+S,C=C>>>0,V=V>>>0,!J){const ge=Math.pow(2,8*V)-1;Q(this,S,C,V,ge,0)}let ie=V-1,se=1;for(this[C+ie]=S&255;--ie>=0&&(se*=256);)this[C+ie]=S/se&255;return C+V},r.prototype.writeUint8=r.prototype.writeUInt8=function(S,C,V){return S=+S,C=C>>>0,V||Q(this,S,C,1,255,0),this[C]=S&255,C+1},r.prototype.writeUint16LE=r.prototype.writeUInt16LE=function(S,C,V){return S=+S,C=C>>>0,V||Q(this,S,C,2,65535,0),this[C]=S&255,this[C+1]=S>>>8,C+2},r.prototype.writeUint16BE=r.prototype.writeUInt16BE=function(S,C,V){return S=+S,C=C>>>0,V||Q(this,S,C,2,65535,0),this[C]=S>>>8,this[C+1]=S&255,C+2},r.prototype.writeUint32LE=r.prototype.writeUInt32LE=function(S,C,V){return S=+S,C=C>>>0,V||Q(this,S,C,4,4294967295,0),this[C+3]=S>>>24,this[C+2]=S>>>16,this[C+1]=S>>>8,this[C]=S&255,C+4},r.prototype.writeUint32BE=r.prototype.writeUInt32BE=function(S,C,V){return S=+S,C=C>>>0,V||Q(this,S,C,4,4294967295,0),this[C]=S>>>24,this[C+1]=S>>>16,this[C+2]=S>>>8,this[C+3]=S&255,C+4};function te(N,S,C,V,J){X(S,V,J,N,C,7);let ie=Number(S&BigInt(4294967295));N[C++]=ie,ie=ie>>8,N[C++]=ie,ie=ie>>8,N[C++]=ie,ie=ie>>8,N[C++]=ie;let se=Number(S>>BigInt(32)&BigInt(4294967295));return N[C++]=se,se=se>>8,N[C++]=se,se=se>>8,N[C++]=se,se=se>>8,N[C++]=se,C}function z(N,S,C,V,J){X(S,V,J,N,C,7);let ie=Number(S&BigInt(4294967295));N[C+7]=ie,ie=ie>>8,N[C+6]=ie,ie=ie>>8,N[C+5]=ie,ie=ie>>8,N[C+4]=ie;let se=Number(S>>BigInt(32)&BigInt(4294967295));return N[C+3]=se,se=se>>8,N[C+2]=se,se=se>>8,N[C+1]=se,se=se>>8,N[C]=se,C+8}r.prototype.writeBigUInt64LE=ye(function(S,C=0){return te(this,S,C,BigInt(0),BigInt("0xffffffffffffffff"))}),r.prototype.writeBigUInt64BE=ye(function(S,C=0){return z(this,S,C,BigInt(0),BigInt("0xffffffffffffffff"))}),r.prototype.writeIntLE=function(S,C,V,J){if(S=+S,C=C>>>0,!J){const Ae=Math.pow(2,8*V-1);Q(this,S,C,V,Ae-1,-Ae)}let ie=0,se=1,ge=0;for(this[C]=S&255;++ie<V&&(se*=256);)S<0&&ge===0&&this[C+ie-1]!==0&&(ge=1),this[C+ie]=(S/se>>0)-ge&255;return C+V},r.prototype.writeIntBE=function(S,C,V,J){if(S=+S,C=C>>>0,!J){const Ae=Math.pow(2,8*V-1);Q(this,S,C,V,Ae-1,-Ae)}let ie=V-1,se=1,ge=0;for(this[C+ie]=S&255;--ie>=0&&(se*=256);)S<0&&ge===0&&this[C+ie+1]!==0&&(ge=1),this[C+ie]=(S/se>>0)-ge&255;return C+V},r.prototype.writeInt8=function(S,C,V){return S=+S,C=C>>>0,V||Q(this,S,C,1,127,-128),S<0&&(S=255+S+1),this[C]=S&255,C+1},r.prototype.writeInt16LE=function(S,C,V){return S=+S,C=C>>>0,V||Q(this,S,C,2,32767,-32768),this[C]=S&255,this[C+1]=S>>>8,C+2},r.prototype.writeInt16BE=function(S,C,V){return S=+S,C=C>>>0,V||Q(this,S,C,2,32767,-32768),this[C]=S>>>8,this[C+1]=S&255,C+2},r.prototype.writeInt32LE=function(S,C,V){return S=+S,C=C>>>0,V||Q(this,S,C,4,2147483647,-2147483648),this[C]=S&255,this[C+1]=S>>>8,this[C+2]=S>>>16,this[C+3]=S>>>24,C+4},r.prototype.writeInt32BE=function(S,C,V){return S=+S,C=C>>>0,V||Q(this,S,C,4,2147483647,-2147483648),S<0&&(S=4294967295+S+1),this[C]=S>>>24,this[C+1]=S>>>16,this[C+2]=S>>>8,this[C+3]=S&255,C+4},r.prototype.writeBigInt64LE=ye(function(S,C=0){return te(this,S,C,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),r.prototype.writeBigInt64BE=ye(function(S,C=0){return z(this,S,C,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function re(N,S,C,V,J,ie){if(C+V>N.length)throw new RangeError("Index out of range");if(C<0)throw new RangeError("Index out of range")}function ce(N,S,C,V,J){return S=+S,C=C>>>0,J||re(N,S,C,4),O.write(N,S,C,V,23,4),C+4}r.prototype.writeFloatLE=function(S,C,V){return ce(this,S,C,!0,V)},r.prototype.writeFloatBE=function(S,C,V){return ce(this,S,C,!1,V)};function ae(N,S,C,V,J){return S=+S,C=C>>>0,J||re(N,S,C,8),O.write(N,S,C,V,52,8),C+8}r.prototype.writeDoubleLE=function(S,C,V){return ae(this,S,C,!0,V)},r.prototype.writeDoubleBE=function(S,C,V){return ae(this,S,C,!1,V)},r.prototype.copy=function(S,C,V,J){if(!r.isBuffer(S))throw new TypeError("argument should be a Buffer");if(V||(V=0),!J&&J!==0&&(J=this.length),C>=S.length&&(C=S.length),C||(C=0),J>0&&J<V&&(J=V),J===V||S.length===0||this.length===0)return 0;if(C<0)throw new RangeError("targetStart out of bounds");if(V<0||V>=this.length)throw new RangeError("Index out of range");if(J<0)throw new RangeError("sourceEnd out of bounds");J>this.length&&(J=this.length),S.length-C<J-V&&(J=S.length-C+V);const ie=J-V;return this===S&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(C,V,J):Uint8Array.prototype.set.call(S,this.subarray(V,J),C),ie},r.prototype.fill=function(S,C,V,J){if(typeof S=="string"){if(typeof C=="string"?(J=C,C=0,V=this.length):typeof V=="string"&&(J=V,V=this.length),J!==void 0&&typeof J!="string")throw new TypeError("encoding must be a string");if(typeof J=="string"&&!r.isEncoding(J))throw new TypeError("Unknown encoding: "+J);if(S.length===1){const se=S.charCodeAt(0);(J==="utf8"&&se<128||J==="latin1")&&(S=se)}}else typeof S=="number"?S=S&255:typeof S=="boolean"&&(S=Number(S));if(C<0||this.length<C||this.length<V)throw new RangeError("Out of range index");if(V<=C)return this;C=C>>>0,V=V===void 0?this.length:V>>>0,S||(S=0);let ie;if(typeof S=="number")for(ie=C;ie<V;++ie)this[ie]=S;else{const se=r.isBuffer(S)?S:r.from(S,J),ge=se.length;if(ge===0)throw new TypeError('The value "'+S+'" is invalid for argument "value"');for(ie=0;ie<V-C;++ie)this[ie+C]=se[ie%ge]}return this};const k={};function W(N,S,C){k[N]=class extends C{constructor(){super(),Object.defineProperty(this,"message",{value:S.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${N}]`,this.stack,delete this.name}get code(){return N}set code(J){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:J,writable:!0})}toString(){return`${this.name} [${N}]: ${this.message}`}}}W("ERR_BUFFER_OUT_OF_BOUNDS",function(N){return N?`${N} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),W("ERR_INVALID_ARG_TYPE",function(N,S){return`The "${N}" argument must be of type number. Received type ${typeof S}`},TypeError),W("ERR_OUT_OF_RANGE",function(N,S,C){let V=`The value of "${N}" is out of range.`,J=C;return Number.isInteger(C)&&Math.abs(C)>2**32?J=F(String(C)):typeof C=="bigint"&&(J=String(C),(C>BigInt(2)**BigInt(32)||C<-(BigInt(2)**BigInt(32)))&&(J=F(J)),J+="n"),V+=` It must be ${S}. Received ${J}`,V},RangeError);function F(N){let S="",C=N.length;const V=N[0]==="-"?1:0;for(;C>=V+4;C-=3)S=`_${N.slice(C-3,C)}${S}`;return`${N.slice(0,C)}${S}`}function Y(N,S,C){ne(S,"offset"),(N[S]===void 0||N[S+C]===void 0)&&le(S,N.length-(C+1))}function X(N,S,C,V,J,ie){if(N>C||N<S){const se=typeof S=="bigint"?"n":"";let ge;throw S===0||S===BigInt(0)?ge=`>= 0${se} and < 2${se} ** ${(ie+1)*8}${se}`:ge=`>= -(2${se} ** ${(ie+1)*8-1}${se}) and < 2 ** ${(ie+1)*8-1}${se}`,new k.ERR_OUT_OF_RANGE("value",ge,N)}Y(V,J,ie)}function ne(N,S){if(typeof N!="number")throw new k.ERR_INVALID_ARG_TYPE(S,"number",N)}function le(N,S,C){throw Math.floor(N)!==N?(ne(N,C),new k.ERR_OUT_OF_RANGE("offset","an integer",N)):S<0?new k.ERR_BUFFER_OUT_OF_BOUNDS:new k.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${S}`,N)}const de=/[^+/0-9A-Za-z-_]/g;function D(N){if(N=N.split("=")[0],N=N.trim().replace(de,""),N.length<2)return"";for(;N.length%4!==0;)N=N+"=";return N}function P(N,S){S=S||1/0;let C;const V=N.length;let J=null;const ie=[];for(let se=0;se<V;++se){if(C=N.charCodeAt(se),C>55295&&C<57344){if(!J){if(C>56319){(S-=3)>-1&&ie.push(239,191,189);continue}else if(se+1===V){(S-=3)>-1&&ie.push(239,191,189);continue}J=C;continue}if(C<56320){(S-=3)>-1&&ie.push(239,191,189),J=C;continue}C=(J-55296<<10|C-56320)+65536}else J&&(S-=3)>-1&&ie.push(239,191,189);if(J=null,C<128){if((S-=1)<0)break;ie.push(C)}else if(C<2048){if((S-=2)<0)break;ie.push(C>>6|192,C&63|128)}else if(C<65536){if((S-=3)<0)break;ie.push(C>>12|224,C>>6&63|128,C&63|128)}else if(C<1114112){if((S-=4)<0)break;ie.push(C>>18|240,C>>12&63|128,C>>6&63|128,C&63|128)}else throw new Error("Invalid code point")}return ie}function I(N){const S=[];for(let C=0;C<N.length;++C)S.push(N.charCodeAt(C)&255);return S}function B(N,S){let C,V,J;const ie=[];for(let se=0;se<N.length&&!((S-=2)<0);++se)C=N.charCodeAt(se),V=C>>8,J=C%256,ie.push(J),ie.push(V);return ie}function ee(N){return g.toByteArray(D(N))}function ue(N,S,C,V){let J;for(J=0;J<V&&!(J+C>=S.length||J>=N.length);++J)S[J+C]=N[J];return J}function oe(N,S){return N instanceof S||N!=null&&N.constructor!=null&&N.constructor.name!=null&&N.constructor.name===S.name}function ve(N){return N!==N}const pe=(function(){const N="0123456789abcdef",S=new Array(256);for(let C=0;C<16;++C){const V=C*16;for(let J=0;J<16;++J)S[V+J]=N[C]+N[J]}return S})();function ye(N){return typeof BigInt>"u"?me:N}function me(){throw new Error("BigInt not supported")}})(ys)),ys}var Rt={},di={},N_;function Dm(){if(N_)return di;N_=1;var e=di&&di.__extends||(function(){var d=function(o,n){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])},d(o,n)};return function(o,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");d(o,n);function t(){this.constructor=o}o.prototype=n===null?Object.create(n):(t.prototype=n.prototype,new t)}})();Object.defineProperty(di,"__esModule",{value:!0});var g=(function(){function d(o){this.position=0,this.length=o}return d.prototype.getUInt8=function(o){throw new Error("Not implemented")},d.prototype.getInt8=function(o){throw new Error("Not implemented")},d.prototype.getFloat64=function(o){throw new Error("Not implemented")},d.prototype.getVarInt=function(o){throw new Error("Not implemented")},d.prototype.putUInt8=function(o,n){throw new Error("Not implemented")},d.prototype.putInt8=function(o,n){throw new Error("Not implemented")},d.prototype.putFloat64=function(o,n){throw new Error("Not implemented")},d.prototype.getInt16=function(o){return this.getInt8(o)<<8|this.getUInt8(o+1)},d.prototype.getUInt16=function(o){return this.getUInt8(o)<<8|this.getUInt8(o+1)},d.prototype.getInt32=function(o){return this.getInt8(o)<<24|this.getUInt8(o+1)<<16|this.getUInt8(o+2)<<8|this.getUInt8(o+3)},d.prototype.getUInt32=function(o){return this.getUInt8(o)<<24|this.getUInt8(o+1)<<16|this.getUInt8(o+2)<<8|this.getUInt8(o+3)},d.prototype.getInt64=function(o){return this.getInt8(o)<<56|this.getUInt8(o+1)<<48|this.getUInt8(o+2)<<40|this.getUInt8(o+3)<<32|this.getUInt8(o+4)<<24|this.getUInt8(o+5)<<16|this.getUInt8(o+6)<<8|this.getUInt8(o+7)},d.prototype.getSlice=function(o,n){return new O(o,n,this)},d.prototype.putInt16=function(o,n){this.putInt8(o,n>>8),this.putUInt8(o+1,n&255)},d.prototype.putUInt16=function(o,n){this.putUInt8(o,n>>8&255),this.putUInt8(o+1,n&255)},d.prototype.putInt32=function(o,n){this.putInt8(o,n>>24),this.putUInt8(o+1,n>>16&255),this.putUInt8(o+2,n>>8&255),this.putUInt8(o+3,n&255)},d.prototype.putUInt32=function(o,n){this.putUInt8(o,n>>24&255),this.putUInt8(o+1,n>>16&255),this.putUInt8(o+2,n>>8&255),this.putUInt8(o+3,n&255)},d.prototype.putInt64=function(o,n){this.putInt8(o,n>>48),this.putUInt8(o+1,n>>42&255),this.putUInt8(o+2,n>>36&255),this.putUInt8(o+3,n>>30&255),this.putUInt8(o+4,n>>24&255),this.putUInt8(o+5,n>>16&255),this.putUInt8(o+6,n>>8&255),this.putUInt8(o+7,n&255)},d.prototype.putVarInt=function(o,n){for(var t=0;n>1;){var r=n%128;n>=128&&(r+=128),n=n/128,this.putUInt8(o+t,r),t+=1}return t},d.prototype.putBytes=function(o,n){for(var t=0,r=n.remaining();t<r;t++)this.putUInt8(o+t,n.readUInt8())},d.prototype.readUInt8=function(){return this.getUInt8(this._updatePos(1))},d.prototype.readInt8=function(){return this.getInt8(this._updatePos(1))},d.prototype.readUInt16=function(){return this.getUInt16(this._updatePos(2))},d.prototype.readUInt32=function(){return this.getUInt32(this._updatePos(4))},d.prototype.readInt16=function(){return this.getInt16(this._updatePos(2))},d.prototype.readInt32=function(){return this.getInt32(this._updatePos(4))},d.prototype.readInt64=function(){return this.getInt32(this._updatePos(8))},d.prototype.readFloat64=function(){return this.getFloat64(this._updatePos(8))},d.prototype.readVarInt=function(){var o=this.getVarInt(this.position);return this._updatePos(o.length),o.value},d.prototype.writeUInt8=function(o){this.putUInt8(this._updatePos(1),o)},d.prototype.writeInt8=function(o){this.putInt8(this._updatePos(1),o)},d.prototype.writeInt16=function(o){this.putInt16(this._updatePos(2),o)},d.prototype.writeInt32=function(o){this.putInt32(this._updatePos(4),o)},d.prototype.writeUInt32=function(o){this.putUInt32(this._updatePos(4),o)},d.prototype.writeInt64=function(o){this.putInt64(this._updatePos(8),o)},d.prototype.writeFloat64=function(o){this.putFloat64(this._updatePos(8),o)},d.prototype.writeVarInt=function(o){var n=this.putVarInt(this.position,o);this._updatePos(n)},d.prototype.writeBytes=function(o){this.putBytes(this._updatePos(o.remaining()),o)},d.prototype.readSlice=function(o){return this.getSlice(this._updatePos(o),o)},d.prototype._updatePos=function(o){var n=this.position;return this.position+=o,n},d.prototype.remaining=function(){return this.length-this.position},d.prototype.hasRemaining=function(){return this.remaining()>0},d.prototype.reset=function(){this.position=0},d.prototype.toString=function(){return this.constructor.name+"( position="+this.position+` )
|
|
5
|
+
`+this.toHex()},d.prototype.toHex=function(){for(var o="",n=0;n<this.length;n++){var t=this.getUInt8(n).toString(16);t.length===1&&(t="0"+t),o+=t,n!==this.length-1&&(o+=" ")}return o},d})();di.default=g;var O=(function(d){e(o,d);function o(n,t,r){var i=d.call(this,t)||this;return i._start=n,i._inner=r,i}return o.prototype.putUInt8=function(n,t){this._inner.putUInt8(this._start+n,t)},o.prototype.getUInt8=function(n){return this._inner.getUInt8(this._start+n)},o.prototype.putInt8=function(n,t){this._inner.putInt8(this._start+n,t)},o.prototype.putFloat64=function(n,t){this._inner.putFloat64(this._start+n,t)},o.prototype.getInt8=function(n){return this._inner.getInt8(this._start+n)},o.prototype.getFloat64=function(n){return this._inner.getFloat64(this._start+n)},o})(g);return di}var k_;function rl(){if(k_)return Rt;k_=1;var e=Rt&&Rt.__importDefault||function(O){return O&&O.__esModule?O:{default:O}};Object.defineProperty(Rt,"__esModule",{value:!0}),Rt.BaseBuffer=void 0;var g=e(Dm());return Rt.BaseBuffer=g.default,Rt.default=g.default,Rt}var L_;function qu(){if(L_)return gt;L_=1;var e=gt&>.__extends||(function(){var r=function(i,c){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,a){l.__proto__=a}||function(l,a){for(var _ in a)Object.prototype.hasOwnProperty.call(a,_)&&(l[_]=a[_])},r(i,c)};return function(i,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");r(i,c);function l(){this.constructor=i}i.prototype=c===null?Object.create(c):(l.prototype=c.prototype,new l)}})(),g=gt&>.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(gt,"__esModule",{value:!0}),gt.alloc=n;var O=g(Lm()),d=g(rl()),o=(function(r){e(i,r);function i(c){var l=this,a=t(c);return l=r.call(this,a.length)||this,l._buffer=a,l}return i.prototype.getUInt8=function(c){return this._buffer.readUInt8(c)},i.prototype.getInt8=function(c){return this._buffer.readInt8(c)},i.prototype.getFloat64=function(c){return this._buffer.readDoubleBE(c)},i.prototype.getVarInt=function(c){for(var l=0,a=this._buffer.readInt8(c+l),_=a%128;a/128>=1;)l+=1,a=this._buffer.readInt8(c+l),_+=a%128;return{length:l+1,value:_}},i.prototype.putUInt8=function(c,l){this._buffer.writeUInt8(l,c)},i.prototype.putInt8=function(c,l){this._buffer.writeInt8(l,c)},i.prototype.putFloat64=function(c,l){this._buffer.writeDoubleBE(l,c)},i.prototype.putBytes=function(c,l){if(l instanceof i){var a=Math.min(l.length-l.position,this.length-c);l._buffer.copy(this._buffer,c,l.position,l.position+a),l.position+=a}else r.prototype.putBytes.call(this,c,l)},i.prototype.getSlice=function(c,l){return new i(this._buffer.slice(c,c+l))},i})(d.default);gt.default=o;function n(r){return new o(r)}function t(r){return r instanceof O.default.Buffer?r:typeof r=="number"&&typeof O.default.Buffer.alloc=="function"?O.default.Buffer.alloc(r):new O.default.Buffer(r)}return gt}var D_;function DO(){if(D_)return fi;D_=1;var e=fi&&fi.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(fi,"__esModule",{value:!0});var g=e(qu()),O=_e(),d=O.internal.util,o=d.ENCRYPTION_OFF,n=d.ENCRYPTION_ON,t=1,r=3,i=(function(){function s(f,b,E){b===void 0&&(b=y),E===void 0&&(E=function(M){return new WebSocket(M)});var w=this;this._open=!0,this._pending=[],this._error=null,this._handleConnectionError=this._handleConnectionError.bind(this),this._config=f,this._receiveTimeout=null,this._receiveTimeoutStarted=!1,this._receiveTimeoutId=null,this._closingPromise=null;var T=p(f,b),R=T.scheme,L=T.error;if(L){this._error=L;return}this._ws=c(R,f.address,E),this._ws.binaryType="arraybuffer";var j=this;this._ws.onclose=function(M){M&&!M.wasClean&&j._handleConnectionError(),j._open=!1},this._ws.onopen=function(){j._clearConnectionTimeout();var M=j._pending;j._pending=null;for(var x=0;x<M.length;x++)j.write(M[x])},this._ws.onmessage=function(M){if(w._resetTimeout(),j.onmessage){var x=new g.default(M.data);j.onmessage(x)}},this._ws.onerror=this._handleConnectionError,this._connectionTimeoutFired=!1,this._connectionTimeoutId=this._setupConnectionTimeout()}return s.prototype._handleConnectionError=function(){if(this._connectionTimeoutFired){this._error=(0,O.newError)("Failed to establish connection in ".concat(this._config.connectionTimeout,"ms"),this._config.connectionErrorCode),this.onerror&&this.onerror(this._error);return}this._open&&!this._timedout&&(this._error=(0,O.newError)("WebSocket connection failure. Due to security constraints in your web browser, the reason for the failure is not available to this Neo4j Driver. Please use your browsers development console to determine the root cause of the failure. Common reasons include the database being unavailable, using the wrong connection URL or temporary network problems. If you have enabled encryption, ensure your browser is configured to trust the certificate Neo4j is configured to use. WebSocket `readyState` is: "+this._ws.readyState,this._config.connectionErrorCode),this.onerror&&this.onerror(this._error))},s.prototype.write=function(f){if(this._pending!==null)this._pending.push(f);else if(f instanceof g.default)try{this._ws.send(f._buffer)}catch(b){if(this._ws.readyState!==t)this._handleConnectionError();else throw(0,O.newError)("unexpected failure to write.",void 0,b)}else throw(0,O.newError)("Don't know how to send buffer: "+f)},s.prototype.close=function(){var f=this;return this._closingPromise===null&&(this._closingPromise=new Promise(function(b,E){f._clearConnectionTimeout(),f._ws&&f._ws.readyState!==r?(f._open=!1,f.stopReceiveTimeout(),f._ws.onclose=function(){b()},f._ws.close()):b()})),this._closingPromise},s.prototype.setupReceiveTimeout=function(f){this._receiveTimeout=f},s.prototype.stopReceiveTimeout=function(){this._receiveTimeout!==null&&this._receiveTimeoutStarted&&(this._receiveTimeoutStarted=!1,this._receiveTimeoutId!=null&&clearTimeout(this._receiveTimeoutId),this._receiveTimeoutId=null)},s.prototype.startReceiveTimeout=function(){this._open&&this._receiveTimeout!==null&&!this._receiveTimeoutStarted&&(this._receiveTimeoutStarted=!0,this._resetTimeout())},s.prototype._resetTimeout=function(){var f=this;this._receiveTimeoutStarted&&(this._receiveTimeoutId!==null&&clearTimeout(this._receiveTimeoutId),this._receiveTimeoutId=setTimeout(function(){f._receiveTimeoutId=null,f._timedout=!0,f.stopReceiveTimeout(),f._error=(0,O.newError)("Connection lost. Server didn't respond in ".concat(f._receiveTimeout,"ms"),f._config.connectionErrorCode),f.close(),f.onerror&&f.onerror(f._error)},this._receiveTimeout))},s.prototype._setupConnectionTimeout=function(){var f=this,b=this._config.connectionTimeout;if(b){var E=this._ws;return setTimeout(function(){E.readyState!==t&&(f._connectionTimeoutFired=!0,E.close())},b)}return null},s.prototype._clearConnectionTimeout=function(){var f=this._connectionTimeoutId;(f||f===0)&&(this._connectionTimeoutFired=!1,this._connectionTimeoutId=null,clearTimeout(f))},s})();fi.default=i;function c(s,f,b){var E=s+"://"+f.asHostPort();try{return b(E)}catch(T){if(l(T,f)){var w=_(s,f);return b(w)}else throw T}}function l(s,f){return s.name==="SyntaxError"&&a(f.asHostPort())}function a(s){return s.charAt(0)==="["&&s.indexOf("]")!==-1}function _(s,f){var b=f.host().replace(/:/g,"-"),E=b.replace("%","s"),w=E+".ipv6-literal.net";return"".concat(s,"://").concat(w,":").concat(f.port())}function p(s,f){var b=m(s),E=h(s),w=s.trust,T=u(f);if(v(b,E,T),E)return{scheme:"ws",error:null};if(T)return{scheme:"wss",error:null};if(b){if(!w||w==="TRUST_SYSTEM_CA_SIGNED_CERTIFICATES")return{scheme:"wss",error:null};var R=(0,O.newError)("The browser version of this driver only supports one trust strategy, 'TRUST_SYSTEM_CA_SIGNED_CERTIFICATES'. "+w+' is not supported. Please either use TRUST_SYSTEM_CA_SIGNED_CERTIFICATES or disable encryption by setting `encrypted:"'+o+'"` in the driver configuration.');return{scheme:null,error:R}}return{scheme:"ws",error:null}}function m(s){return s.encrypted===!0||s.encrypted===n}function h(s){return s.encrypted===!1||s.encrypted===o}function u(s){var f=typeof s=="function"?s():"";return f&&f.toLowerCase().indexOf("https")>=0}function v(s,f,b){b===null||(s&&!b?console.warn("Neo4j driver is configured to use secure WebSocket on a HTTP web page. WebSockets might not work in a mixed content environment. Please consider configuring driver to not use encryption."):f&&b&&console.warn("Neo4j driver is configured to use insecure WebSocket on a HTTPS web page. WebSockets might not work in a mixed content environment. Please consider configuring driver to use encryption."))}function y(){return typeof window<"u"&&window.location?window.location.protocol:null}return fi}var hi={},U_;function UO(){if(U_)return hi;U_=1;var e=hi&&hi.__extends||(function(){var o=function(n,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var c in i)Object.prototype.hasOwnProperty.call(i,c)&&(r[c]=i[c])},o(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");o(n,t);function r(){this.constructor=n}n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}})();Object.defineProperty(hi,"__esModule",{value:!0});var g=_e(),O=g.internal.resolver.BaseHostNameResolver,d=(function(o){e(n,o);function n(){return o!==null&&o.apply(this,arguments)||this}return n.prototype.resolve=function(t){return this._resolveToItself(t)},n})(O);return hi.default=d,hi}var Ct={},q_;function qO(){if(q_)return Ct;q_=1;var e=Ct&&Ct.__awaiter||function(O,d,o,n){function t(r){return r instanceof o?r:new o(function(i){i(r)})}return new(o||(o=Promise))(function(r,i){function c(_){try{a(n.next(_))}catch(p){i(p)}}function l(_){try{a(n.throw(_))}catch(p){i(p)}}function a(_){_.done?r(_.value):t(_.value).then(c,l)}a((n=n.apply(O,d||[])).next())})},g=Ct&&Ct.__generator||function(O,d){var o={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,t,r,i=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return i.next=c(0),i.throw=c(1),i.return=c(2),typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function c(a){return function(_){return l([a,_])}}function l(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(o=0)),o;)try{if(n=1,t&&(r=a[0]&2?t.return:a[0]?t.throw||((r=t.return)&&r.call(t),0):t.next)&&!(r=r.call(t,a[1])).done)return r;switch(t=0,r&&(a=[a[0]&2,r.value]),a[0]){case 0:case 1:r=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,t=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(r=o.trys,!(r=r.length>0&&r[r.length-1])&&(a[0]===6||a[0]===2)){o=0;continue}if(a[0]===3&&(!r||a[1]>r[0]&&a[1]<r[3])){o.label=a[1];break}if(a[0]===6&&o.label<r[1]){o.label=r[1],r=a;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(a);break}r[2]&&o.ops.pop(),o.trys.pop();continue}a=d.call(O,o)}catch(_){a=[6,_],t=0}finally{n=r=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}};return Object.defineProperty(Ct,"__esModule",{value:!0}),Ct.default={load:function(O){return e(this,void 0,void 0,function(){return g(this,function(d){return[2,O]})})}},Ct}var F_;function FO(){if(F_)return Er;F_=1;var e=Er&&Er.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(Er,"__esModule",{value:!0}),Er.ClientCertificatesLoader=Er.HostNameResolver=Er.Channel=void 0;var g=e(DO()),O=e(UO()),d=e(qO());return Er.Channel=g.default,Er.HostNameResolver=O.default,Er.ClientCertificatesLoader=d.default,Er}var Tr={},vi={},B_;function BO(){if(B_)return vi;B_=1;var e=vi&&vi.__extends||(function(){var o=function(n,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var c in i)Object.prototype.hasOwnProperty.call(i,c)&&(r[c]=i[c])},o(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");o(n,t);function r(){this.constructor=n}n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}})();Object.defineProperty(vi,"__esModule",{value:!0});var g=rl(),O=qu(),d=(function(o){e(n,o);function n(t){for(var r=this,i=0,c=0;c<t.length;c++)i+=t[c].length;return r=o.call(this,i)||this,r._buffers=t,r}return n.prototype.getUInt8=function(t){for(var r=0;r<this._buffers.length;r++){var i=this._buffers[r];if(t>=i.length)t-=i.length;else return i.getUInt8(t)}},n.prototype.getInt8=function(t){for(var r=0;r<this._buffers.length;r++){var i=this._buffers[r];if(t>=i.length)t-=i.length;else return i.getInt8(t)}},n.prototype.getFloat64=function(t){for(var r=(0,O.alloc)(8),i=0;i<8;i++)r.putUInt8(i,this.getUInt8(t+i));return r.getFloat64(0)},n})(g.BaseBuffer);return vi.default=d,vi}var x_;function xO(){if(x_)return Tr;x_=1;var e=Tr&&Tr.__extends||(function(){var l=function(a,_){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,m){p.__proto__=m}||function(p,m){for(var h in m)Object.prototype.hasOwnProperty.call(m,h)&&(p[h]=m[h])},l(a,_)};return function(a,_){if(typeof _!="function"&&_!==null)throw new TypeError("Class extends value "+String(_)+" is not a constructor or null");l(a,_);function p(){this.constructor=a}a.prototype=_===null?Object.create(_):(p.prototype=_.prototype,new p)}})(),g=Tr&&Tr.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(Tr,"__esModule",{value:!0}),Tr.Dechunker=Tr.Chunker=void 0;var O=g(Dm()),d=qu(),o=g(BO()),n=2,t=0,r=1400,i=(function(l){e(a,l);function a(_,p){var m=l.call(this,0)||this;return m._bufferSize=p||r,m._ch=_,m._buffer=(0,d.alloc)(m._bufferSize),m._currentChunkStart=0,m._chunkOpen=!1,m}return a.prototype.putUInt8=function(_,p){this._ensure(1),this._buffer.writeUInt8(p)},a.prototype.putInt8=function(_,p){this._ensure(1),this._buffer.writeInt8(p)},a.prototype.putFloat64=function(_,p){this._ensure(8),this._buffer.writeFloat64(p)},a.prototype.putBytes=function(_,p){for(;p.remaining()>0;)this._ensure(1),this._buffer.remaining()>p.remaining()?this._buffer.writeBytes(p):this._buffer.writeBytes(p.readSlice(this._buffer.remaining()));return this},a.prototype.flush=function(){if(this._buffer.position>0){this._closeChunkIfOpen();var _=this._buffer;this._buffer=null,this._ch.write(_.getSlice(0,_.position)),this._buffer=(0,d.alloc)(this._bufferSize),this._chunkOpen=!1}return this},a.prototype.messageBoundary=function(){this._closeChunkIfOpen(),this._buffer.remaining()<n&&this.flush(),this._buffer.writeInt16(t)},a.prototype._ensure=function(_){var p=this._chunkOpen?_:_+n;this._buffer.remaining()<p&&this.flush(),this._chunkOpen||(this._currentChunkStart=this._buffer.position,this._buffer.position=this._buffer.position+n,this._chunkOpen=!0)},a.prototype._closeChunkIfOpen=function(){if(this._chunkOpen){var _=this._buffer.position-(this._currentChunkStart+n);this._buffer.putUInt16(this._currentChunkStart,_),this._chunkOpen=!1}},a})(O.default);Tr.Chunker=i;var c=(function(){function l(){this._currentMessage=[],this._partialChunkHeader=0,this._state=this.AWAITING_CHUNK}return l.prototype.AWAITING_CHUNK=function(a){return a.remaining()>=2?this._onHeader(a.readUInt16()):(this._partialChunkHeader=a.readUInt8()<<8,this.IN_HEADER)},l.prototype.IN_HEADER=function(a){return this._onHeader((this._partialChunkHeader|a.readUInt8())&65535)},l.prototype.IN_CHUNK=function(a){return this._chunkSize<=a.remaining()?(this._currentMessage.push(a.readSlice(this._chunkSize)),this.AWAITING_CHUNK):(this._chunkSize-=a.remaining(),this._currentMessage.push(a.readSlice(a.remaining())),this.IN_CHUNK)},l.prototype.CLOSED=function(a){},l.prototype._onHeader=function(a){if(a===0){var _=void 0;switch(this._currentMessage.length){case 0:return this.AWAITING_CHUNK;case 1:_=this._currentMessage[0];break;default:_=new o.default(this._currentMessage);break}return this._currentMessage=[],this.onmessage(_),this.AWAITING_CHUNK}else return this._chunkSize=a,this.IN_CHUNK},l.prototype.write=function(a){for(;a.hasRemaining();)this._state=this._state(a)},l})();return Tr.Dechunker=c,Tr}var tc={},W_;function WO(){if(W_)return tc;W_=1,Object.defineProperty(tc,"__esModule",{value:!0});var e=_e(),g=e.internal.util,O=g.ENCRYPTION_OFF,d=g.ENCRYPTION_ON,o=e.error.SERVICE_UNAVAILABLE,n=[null,void 0,!0,!1,d,O],t=[null,void 0,"TRUST_ALL_CERTIFICATES","TRUST_CUSTOM_CA_SIGNED_CERTIFICATES","TRUST_SYSTEM_CA_SIGNED_CERTIFICATES"],r=(function(){function _(p,m,h,u){this.address=p,this.encrypted=i(m),this.trust=c(m),this.trustedCertificates=l(m),this.knownHostsPath=a(m),this.connectionErrorCode=h||o,this.connectionTimeout=m.connectionTimeout,this.clientCertificate=u}return _})();tc.default=r;function i(_){var p=_.encrypted;if(n.indexOf(p)===-1)throw(0,e.newError)("Illegal value of the encrypted setting ".concat(p,". Expected one of ").concat(n));return p}function c(_){var p=_.trust;if(t.indexOf(p)===-1)throw(0,e.newError)("Illegal value of the trust setting ".concat(p,". Expected one of ").concat(t));return p}function l(_){return _.trustedCertificates||[]}function a(_){return _.knownHosts||null}return tc}var _i={},bs={},nc={exports:{}},ms={};var V_;function VO(){return V_||(V_=1,(function(e){var g=Nm(),O=km(),d=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=r,e.SlowBuffer=y,e.INSPECT_MAX_BYTES=50;var o=2147483647;e.kMaxLength=o,r.TYPED_ARRAY_SUPPORT=n(),!r.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function n(){try{var D=new Uint8Array(1),P={foo:function(){return 42}};return Object.setPrototypeOf(P,Uint8Array.prototype),Object.setPrototypeOf(D,P),D.foo()===42}catch{return!1}}Object.defineProperty(r.prototype,"parent",{enumerable:!0,get:function(){if(r.isBuffer(this))return this.buffer}}),Object.defineProperty(r.prototype,"offset",{enumerable:!0,get:function(){if(r.isBuffer(this))return this.byteOffset}});function t(D){if(D>o)throw new RangeError('The value "'+D+'" is invalid for option "size"');var P=new Uint8Array(D);return Object.setPrototypeOf(P,r.prototype),P}function r(D,P,I){if(typeof D=="number"){if(typeof P=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return a(D)}return i(D,P,I)}r.poolSize=8192;function i(D,P,I){if(typeof D=="string")return _(D,P);if(ArrayBuffer.isView(D))return m(D);if(D==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof D);if(ne(D,ArrayBuffer)||D&&ne(D.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(ne(D,SharedArrayBuffer)||D&&ne(D.buffer,SharedArrayBuffer)))return h(D,P,I);if(typeof D=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var B=D.valueOf&&D.valueOf();if(B!=null&&B!==D)return r.from(B,P,I);var ee=u(D);if(ee)return ee;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof D[Symbol.toPrimitive]=="function")return r.from(D[Symbol.toPrimitive]("string"),P,I);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof D)}r.from=function(D,P,I){return i(D,P,I)},Object.setPrototypeOf(r.prototype,Uint8Array.prototype),Object.setPrototypeOf(r,Uint8Array);function c(D){if(typeof D!="number")throw new TypeError('"size" argument must be of type number');if(D<0)throw new RangeError('The value "'+D+'" is invalid for option "size"')}function l(D,P,I){return c(D),D<=0?t(D):P!==void 0?typeof I=="string"?t(D).fill(P,I):t(D).fill(P):t(D)}r.alloc=function(D,P,I){return l(D,P,I)};function a(D){return c(D),t(D<0?0:v(D)|0)}r.allocUnsafe=function(D){return a(D)},r.allocUnsafeSlow=function(D){return a(D)};function _(D,P){if((typeof P!="string"||P==="")&&(P="utf8"),!r.isEncoding(P))throw new TypeError("Unknown encoding: "+P);var I=s(D,P)|0,B=t(I),ee=B.write(D,P);return ee!==I&&(B=B.slice(0,ee)),B}function p(D){for(var P=D.length<0?0:v(D.length)|0,I=t(P),B=0;B<P;B+=1)I[B]=D[B]&255;return I}function m(D){if(ne(D,Uint8Array)){var P=new Uint8Array(D);return h(P.buffer,P.byteOffset,P.byteLength)}return p(D)}function h(D,P,I){if(P<0||D.byteLength<P)throw new RangeError('"offset" is outside of buffer bounds');if(D.byteLength<P+(I||0))throw new RangeError('"length" is outside of buffer bounds');var B;return P===void 0&&I===void 0?B=new Uint8Array(D):I===void 0?B=new Uint8Array(D,P):B=new Uint8Array(D,P,I),Object.setPrototypeOf(B,r.prototype),B}function u(D){if(r.isBuffer(D)){var P=v(D.length)|0,I=t(P);return I.length===0||D.copy(I,0,0,P),I}if(D.length!==void 0)return typeof D.length!="number"||le(D.length)?t(0):p(D);if(D.type==="Buffer"&&Array.isArray(D.data))return p(D.data)}function v(D){if(D>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return D|0}function y(D){return+D!=D&&(D=0),r.alloc(+D)}r.isBuffer=function(P){return P!=null&&P._isBuffer===!0&&P!==r.prototype},r.compare=function(P,I){if(ne(P,Uint8Array)&&(P=r.from(P,P.offset,P.byteLength)),ne(I,Uint8Array)&&(I=r.from(I,I.offset,I.byteLength)),!r.isBuffer(P)||!r.isBuffer(I))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(P===I)return 0;for(var B=P.length,ee=I.length,ue=0,oe=Math.min(B,ee);ue<oe;++ue)if(P[ue]!==I[ue]){B=P[ue],ee=I[ue];break}return B<ee?-1:ee<B?1:0},r.isEncoding=function(P){switch(String(P).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},r.concat=function(P,I){if(!Array.isArray(P))throw new TypeError('"list" argument must be an Array of Buffers');if(P.length===0)return r.alloc(0);var B;if(I===void 0)for(I=0,B=0;B<P.length;++B)I+=P[B].length;var ee=r.allocUnsafe(I),ue=0;for(B=0;B<P.length;++B){var oe=P[B];if(ne(oe,Uint8Array))ue+oe.length>ee.length?r.from(oe).copy(ee,ue):Uint8Array.prototype.set.call(ee,oe,ue);else if(r.isBuffer(oe))oe.copy(ee,ue);else throw new TypeError('"list" argument must be an Array of Buffers');ue+=oe.length}return ee};function s(D,P){if(r.isBuffer(D))return D.length;if(ArrayBuffer.isView(D)||ne(D,ArrayBuffer))return D.byteLength;if(typeof D!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof D);var I=D.length,B=arguments.length>2&&arguments[2]===!0;if(!B&&I===0)return 0;for(var ee=!1;;)switch(P){case"ascii":case"latin1":case"binary":return I;case"utf8":case"utf-8":return k(D).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I*2;case"hex":return I>>>1;case"base64":return Y(D).length;default:if(ee)return B?-1:k(D).length;P=(""+P).toLowerCase(),ee=!0}}r.byteLength=s;function f(D,P,I){var B=!1;if((P===void 0||P<0)&&(P=0),P>this.length||((I===void 0||I>this.length)&&(I=this.length),I<=0)||(I>>>=0,P>>>=0,I<=P))return"";for(D||(D="utf8");;)switch(D){case"hex":return A(this,P,I);case"utf8":case"utf-8":return Z(this,P,I);case"ascii":return G(this,P,I);case"latin1":case"binary":return $(this,P,I);case"base64":return x(this,P,I);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return q(this,P,I);default:if(B)throw new TypeError("Unknown encoding: "+D);D=(D+"").toLowerCase(),B=!0}}r.prototype._isBuffer=!0;function b(D,P,I){var B=D[P];D[P]=D[I],D[I]=B}r.prototype.swap16=function(){var P=this.length;if(P%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var I=0;I<P;I+=2)b(this,I,I+1);return this},r.prototype.swap32=function(){var P=this.length;if(P%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var I=0;I<P;I+=4)b(this,I,I+3),b(this,I+1,I+2);return this},r.prototype.swap64=function(){var P=this.length;if(P%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var I=0;I<P;I+=8)b(this,I,I+7),b(this,I+1,I+6),b(this,I+2,I+5),b(this,I+3,I+4);return this},r.prototype.toString=function(){var P=this.length;return P===0?"":arguments.length===0?Z(this,0,P):f.apply(this,arguments)},r.prototype.toLocaleString=r.prototype.toString,r.prototype.equals=function(P){if(!r.isBuffer(P))throw new TypeError("Argument must be a Buffer");return this===P?!0:r.compare(this,P)===0},r.prototype.inspect=function(){var P="",I=e.INSPECT_MAX_BYTES;return P=this.toString("hex",0,I).replace(/(.{2})/g,"$1 ").trim(),this.length>I&&(P+=" ... "),"<Buffer "+P+">"},d&&(r.prototype[d]=r.prototype.inspect),r.prototype.compare=function(P,I,B,ee,ue){if(ne(P,Uint8Array)&&(P=r.from(P,P.offset,P.byteLength)),!r.isBuffer(P))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof P);if(I===void 0&&(I=0),B===void 0&&(B=P?P.length:0),ee===void 0&&(ee=0),ue===void 0&&(ue=this.length),I<0||B>P.length||ee<0||ue>this.length)throw new RangeError("out of range index");if(ee>=ue&&I>=B)return 0;if(ee>=ue)return-1;if(I>=B)return 1;if(I>>>=0,B>>>=0,ee>>>=0,ue>>>=0,this===P)return 0;for(var oe=ue-ee,ve=B-I,pe=Math.min(oe,ve),ye=this.slice(ee,ue),me=P.slice(I,B),N=0;N<pe;++N)if(ye[N]!==me[N]){oe=ye[N],ve=me[N];break}return oe<ve?-1:ve<oe?1:0};function E(D,P,I,B,ee){if(D.length===0)return-1;if(typeof I=="string"?(B=I,I=0):I>2147483647?I=2147483647:I<-2147483648&&(I=-2147483648),I=+I,le(I)&&(I=ee?0:D.length-1),I<0&&(I=D.length+I),I>=D.length){if(ee)return-1;I=D.length-1}else if(I<0)if(ee)I=0;else return-1;if(typeof P=="string"&&(P=r.from(P,B)),r.isBuffer(P))return P.length===0?-1:w(D,P,I,B,ee);if(typeof P=="number")return P=P&255,typeof Uint8Array.prototype.indexOf=="function"?ee?Uint8Array.prototype.indexOf.call(D,P,I):Uint8Array.prototype.lastIndexOf.call(D,P,I):w(D,[P],I,B,ee);throw new TypeError("val must be string, number or Buffer")}function w(D,P,I,B,ee){var ue=1,oe=D.length,ve=P.length;if(B!==void 0&&(B=String(B).toLowerCase(),B==="ucs2"||B==="ucs-2"||B==="utf16le"||B==="utf-16le")){if(D.length<2||P.length<2)return-1;ue=2,oe/=2,ve/=2,I/=2}function pe(C,V){return ue===1?C[V]:C.readUInt16BE(V*ue)}var ye;if(ee){var me=-1;for(ye=I;ye<oe;ye++)if(pe(D,ye)===pe(P,me===-1?0:ye-me)){if(me===-1&&(me=ye),ye-me+1===ve)return me*ue}else me!==-1&&(ye-=ye-me),me=-1}else for(I+ve>oe&&(I=oe-ve),ye=I;ye>=0;ye--){for(var N=!0,S=0;S<ve;S++)if(pe(D,ye+S)!==pe(P,S)){N=!1;break}if(N)return ye}return-1}r.prototype.includes=function(P,I,B){return this.indexOf(P,I,B)!==-1},r.prototype.indexOf=function(P,I,B){return E(this,P,I,B,!0)},r.prototype.lastIndexOf=function(P,I,B){return E(this,P,I,B,!1)};function T(D,P,I,B){I=Number(I)||0;var ee=D.length-I;B?(B=Number(B),B>ee&&(B=ee)):B=ee;var ue=P.length;B>ue/2&&(B=ue/2);for(var oe=0;oe<B;++oe){var ve=parseInt(P.substr(oe*2,2),16);if(le(ve))return oe;D[I+oe]=ve}return oe}function R(D,P,I,B){return X(k(P,D.length-I),D,I,B)}function L(D,P,I,B){return X(W(P),D,I,B)}function j(D,P,I,B){return X(Y(P),D,I,B)}function M(D,P,I,B){return X(F(P,D.length-I),D,I,B)}r.prototype.write=function(P,I,B,ee){if(I===void 0)ee="utf8",B=this.length,I=0;else if(B===void 0&&typeof I=="string")ee=I,B=this.length,I=0;else if(isFinite(I))I=I>>>0,isFinite(B)?(B=B>>>0,ee===void 0&&(ee="utf8")):(ee=B,B=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var ue=this.length-I;if((B===void 0||B>ue)&&(B=ue),P.length>0&&(B<0||I<0)||I>this.length)throw new RangeError("Attempt to write outside buffer bounds");ee||(ee="utf8");for(var oe=!1;;)switch(ee){case"hex":return T(this,P,I,B);case"utf8":case"utf-8":return R(this,P,I,B);case"ascii":case"latin1":case"binary":return L(this,P,I,B);case"base64":return j(this,P,I,B);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,P,I,B);default:if(oe)throw new TypeError("Unknown encoding: "+ee);ee=(""+ee).toLowerCase(),oe=!0}},r.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function x(D,P,I){return P===0&&I===D.length?g.fromByteArray(D):g.fromByteArray(D.slice(P,I))}function Z(D,P,I){I=Math.min(D.length,I);for(var B=[],ee=P;ee<I;){var ue=D[ee],oe=null,ve=ue>239?4:ue>223?3:ue>191?2:1;if(ee+ve<=I){var pe,ye,me,N;switch(ve){case 1:ue<128&&(oe=ue);break;case 2:pe=D[ee+1],(pe&192)===128&&(N=(ue&31)<<6|pe&63,N>127&&(oe=N));break;case 3:pe=D[ee+1],ye=D[ee+2],(pe&192)===128&&(ye&192)===128&&(N=(ue&15)<<12|(pe&63)<<6|ye&63,N>2047&&(N<55296||N>57343)&&(oe=N));break;case 4:pe=D[ee+1],ye=D[ee+2],me=D[ee+3],(pe&192)===128&&(ye&192)===128&&(me&192)===128&&(N=(ue&15)<<18|(pe&63)<<12|(ye&63)<<6|me&63,N>65535&&N<1114112&&(oe=N))}}oe===null?(oe=65533,ve=1):oe>65535&&(oe-=65536,B.push(oe>>>10&1023|55296),oe=56320|oe&1023),B.push(oe),ee+=ve}return K(B)}var H=4096;function K(D){var P=D.length;if(P<=H)return String.fromCharCode.apply(String,D);for(var I="",B=0;B<P;)I+=String.fromCharCode.apply(String,D.slice(B,B+=H));return I}function G(D,P,I){var B="";I=Math.min(D.length,I);for(var ee=P;ee<I;++ee)B+=String.fromCharCode(D[ee]&127);return B}function $(D,P,I){var B="";I=Math.min(D.length,I);for(var ee=P;ee<I;++ee)B+=String.fromCharCode(D[ee]);return B}function A(D,P,I){var B=D.length;(!P||P<0)&&(P=0),(!I||I<0||I>B)&&(I=B);for(var ee="",ue=P;ue<I;++ue)ee+=de[D[ue]];return ee}function q(D,P,I){for(var B=D.slice(P,I),ee="",ue=0;ue<B.length-1;ue+=2)ee+=String.fromCharCode(B[ue]+B[ue+1]*256);return ee}r.prototype.slice=function(P,I){var B=this.length;P=~~P,I=I===void 0?B:~~I,P<0?(P+=B,P<0&&(P=0)):P>B&&(P=B),I<0?(I+=B,I<0&&(I=0)):I>B&&(I=B),I<P&&(I=P);var ee=this.subarray(P,I);return Object.setPrototypeOf(ee,r.prototype),ee};function U(D,P,I){if(D%1!==0||D<0)throw new RangeError("offset is not uint");if(D+P>I)throw new RangeError("Trying to access beyond buffer length")}r.prototype.readUintLE=r.prototype.readUIntLE=function(P,I,B){P=P>>>0,I=I>>>0,B||U(P,I,this.length);for(var ee=this[P],ue=1,oe=0;++oe<I&&(ue*=256);)ee+=this[P+oe]*ue;return ee},r.prototype.readUintBE=r.prototype.readUIntBE=function(P,I,B){P=P>>>0,I=I>>>0,B||U(P,I,this.length);for(var ee=this[P+--I],ue=1;I>0&&(ue*=256);)ee+=this[P+--I]*ue;return ee},r.prototype.readUint8=r.prototype.readUInt8=function(P,I){return P=P>>>0,I||U(P,1,this.length),this[P]},r.prototype.readUint16LE=r.prototype.readUInt16LE=function(P,I){return P=P>>>0,I||U(P,2,this.length),this[P]|this[P+1]<<8},r.prototype.readUint16BE=r.prototype.readUInt16BE=function(P,I){return P=P>>>0,I||U(P,2,this.length),this[P]<<8|this[P+1]},r.prototype.readUint32LE=r.prototype.readUInt32LE=function(P,I){return P=P>>>0,I||U(P,4,this.length),(this[P]|this[P+1]<<8|this[P+2]<<16)+this[P+3]*16777216},r.prototype.readUint32BE=r.prototype.readUInt32BE=function(P,I){return P=P>>>0,I||U(P,4,this.length),this[P]*16777216+(this[P+1]<<16|this[P+2]<<8|this[P+3])},r.prototype.readIntLE=function(P,I,B){P=P>>>0,I=I>>>0,B||U(P,I,this.length);for(var ee=this[P],ue=1,oe=0;++oe<I&&(ue*=256);)ee+=this[P+oe]*ue;return ue*=128,ee>=ue&&(ee-=Math.pow(2,8*I)),ee},r.prototype.readIntBE=function(P,I,B){P=P>>>0,I=I>>>0,B||U(P,I,this.length);for(var ee=I,ue=1,oe=this[P+--ee];ee>0&&(ue*=256);)oe+=this[P+--ee]*ue;return ue*=128,oe>=ue&&(oe-=Math.pow(2,8*I)),oe},r.prototype.readInt8=function(P,I){return P=P>>>0,I||U(P,1,this.length),this[P]&128?(255-this[P]+1)*-1:this[P]},r.prototype.readInt16LE=function(P,I){P=P>>>0,I||U(P,2,this.length);var B=this[P]|this[P+1]<<8;return B&32768?B|4294901760:B},r.prototype.readInt16BE=function(P,I){P=P>>>0,I||U(P,2,this.length);var B=this[P+1]|this[P]<<8;return B&32768?B|4294901760:B},r.prototype.readInt32LE=function(P,I){return P=P>>>0,I||U(P,4,this.length),this[P]|this[P+1]<<8|this[P+2]<<16|this[P+3]<<24},r.prototype.readInt32BE=function(P,I){return P=P>>>0,I||U(P,4,this.length),this[P]<<24|this[P+1]<<16|this[P+2]<<8|this[P+3]},r.prototype.readFloatLE=function(P,I){return P=P>>>0,I||U(P,4,this.length),O.read(this,P,!0,23,4)},r.prototype.readFloatBE=function(P,I){return P=P>>>0,I||U(P,4,this.length),O.read(this,P,!1,23,4)},r.prototype.readDoubleLE=function(P,I){return P=P>>>0,I||U(P,8,this.length),O.read(this,P,!0,52,8)},r.prototype.readDoubleBE=function(P,I){return P=P>>>0,I||U(P,8,this.length),O.read(this,P,!1,52,8)};function Q(D,P,I,B,ee,ue){if(!r.isBuffer(D))throw new TypeError('"buffer" argument must be a Buffer instance');if(P>ee||P<ue)throw new RangeError('"value" argument is out of bounds');if(I+B>D.length)throw new RangeError("Index out of range")}r.prototype.writeUintLE=r.prototype.writeUIntLE=function(P,I,B,ee){if(P=+P,I=I>>>0,B=B>>>0,!ee){var ue=Math.pow(2,8*B)-1;Q(this,P,I,B,ue,0)}var oe=1,ve=0;for(this[I]=P&255;++ve<B&&(oe*=256);)this[I+ve]=P/oe&255;return I+B},r.prototype.writeUintBE=r.prototype.writeUIntBE=function(P,I,B,ee){if(P=+P,I=I>>>0,B=B>>>0,!ee){var ue=Math.pow(2,8*B)-1;Q(this,P,I,B,ue,0)}var oe=B-1,ve=1;for(this[I+oe]=P&255;--oe>=0&&(ve*=256);)this[I+oe]=P/ve&255;return I+B},r.prototype.writeUint8=r.prototype.writeUInt8=function(P,I,B){return P=+P,I=I>>>0,B||Q(this,P,I,1,255,0),this[I]=P&255,I+1},r.prototype.writeUint16LE=r.prototype.writeUInt16LE=function(P,I,B){return P=+P,I=I>>>0,B||Q(this,P,I,2,65535,0),this[I]=P&255,this[I+1]=P>>>8,I+2},r.prototype.writeUint16BE=r.prototype.writeUInt16BE=function(P,I,B){return P=+P,I=I>>>0,B||Q(this,P,I,2,65535,0),this[I]=P>>>8,this[I+1]=P&255,I+2},r.prototype.writeUint32LE=r.prototype.writeUInt32LE=function(P,I,B){return P=+P,I=I>>>0,B||Q(this,P,I,4,4294967295,0),this[I+3]=P>>>24,this[I+2]=P>>>16,this[I+1]=P>>>8,this[I]=P&255,I+4},r.prototype.writeUint32BE=r.prototype.writeUInt32BE=function(P,I,B){return P=+P,I=I>>>0,B||Q(this,P,I,4,4294967295,0),this[I]=P>>>24,this[I+1]=P>>>16,this[I+2]=P>>>8,this[I+3]=P&255,I+4},r.prototype.writeIntLE=function(P,I,B,ee){if(P=+P,I=I>>>0,!ee){var ue=Math.pow(2,8*B-1);Q(this,P,I,B,ue-1,-ue)}var oe=0,ve=1,pe=0;for(this[I]=P&255;++oe<B&&(ve*=256);)P<0&&pe===0&&this[I+oe-1]!==0&&(pe=1),this[I+oe]=(P/ve>>0)-pe&255;return I+B},r.prototype.writeIntBE=function(P,I,B,ee){if(P=+P,I=I>>>0,!ee){var ue=Math.pow(2,8*B-1);Q(this,P,I,B,ue-1,-ue)}var oe=B-1,ve=1,pe=0;for(this[I+oe]=P&255;--oe>=0&&(ve*=256);)P<0&&pe===0&&this[I+oe+1]!==0&&(pe=1),this[I+oe]=(P/ve>>0)-pe&255;return I+B},r.prototype.writeInt8=function(P,I,B){return P=+P,I=I>>>0,B||Q(this,P,I,1,127,-128),P<0&&(P=255+P+1),this[I]=P&255,I+1},r.prototype.writeInt16LE=function(P,I,B){return P=+P,I=I>>>0,B||Q(this,P,I,2,32767,-32768),this[I]=P&255,this[I+1]=P>>>8,I+2},r.prototype.writeInt16BE=function(P,I,B){return P=+P,I=I>>>0,B||Q(this,P,I,2,32767,-32768),this[I]=P>>>8,this[I+1]=P&255,I+2},r.prototype.writeInt32LE=function(P,I,B){return P=+P,I=I>>>0,B||Q(this,P,I,4,2147483647,-2147483648),this[I]=P&255,this[I+1]=P>>>8,this[I+2]=P>>>16,this[I+3]=P>>>24,I+4},r.prototype.writeInt32BE=function(P,I,B){return P=+P,I=I>>>0,B||Q(this,P,I,4,2147483647,-2147483648),P<0&&(P=4294967295+P+1),this[I]=P>>>24,this[I+1]=P>>>16,this[I+2]=P>>>8,this[I+3]=P&255,I+4};function te(D,P,I,B,ee,ue){if(I+B>D.length)throw new RangeError("Index out of range");if(I<0)throw new RangeError("Index out of range")}function z(D,P,I,B,ee){return P=+P,I=I>>>0,ee||te(D,P,I,4),O.write(D,P,I,B,23,4),I+4}r.prototype.writeFloatLE=function(P,I,B){return z(this,P,I,!0,B)},r.prototype.writeFloatBE=function(P,I,B){return z(this,P,I,!1,B)};function re(D,P,I,B,ee){return P=+P,I=I>>>0,ee||te(D,P,I,8),O.write(D,P,I,B,52,8),I+8}r.prototype.writeDoubleLE=function(P,I,B){return re(this,P,I,!0,B)},r.prototype.writeDoubleBE=function(P,I,B){return re(this,P,I,!1,B)},r.prototype.copy=function(P,I,B,ee){if(!r.isBuffer(P))throw new TypeError("argument should be a Buffer");if(B||(B=0),!ee&&ee!==0&&(ee=this.length),I>=P.length&&(I=P.length),I||(I=0),ee>0&&ee<B&&(ee=B),ee===B||P.length===0||this.length===0)return 0;if(I<0)throw new RangeError("targetStart out of bounds");if(B<0||B>=this.length)throw new RangeError("Index out of range");if(ee<0)throw new RangeError("sourceEnd out of bounds");ee>this.length&&(ee=this.length),P.length-I<ee-B&&(ee=P.length-I+B);var ue=ee-B;return this===P&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(I,B,ee):Uint8Array.prototype.set.call(P,this.subarray(B,ee),I),ue},r.prototype.fill=function(P,I,B,ee){if(typeof P=="string"){if(typeof I=="string"?(ee=I,I=0,B=this.length):typeof B=="string"&&(ee=B,B=this.length),ee!==void 0&&typeof ee!="string")throw new TypeError("encoding must be a string");if(typeof ee=="string"&&!r.isEncoding(ee))throw new TypeError("Unknown encoding: "+ee);if(P.length===1){var ue=P.charCodeAt(0);(ee==="utf8"&&ue<128||ee==="latin1")&&(P=ue)}}else typeof P=="number"?P=P&255:typeof P=="boolean"&&(P=Number(P));if(I<0||this.length<I||this.length<B)throw new RangeError("Out of range index");if(B<=I)return this;I=I>>>0,B=B===void 0?this.length:B>>>0,P||(P=0);var oe;if(typeof P=="number")for(oe=I;oe<B;++oe)this[oe]=P;else{var ve=r.isBuffer(P)?P:r.from(P,ee),pe=ve.length;if(pe===0)throw new TypeError('The value "'+P+'" is invalid for argument "value"');for(oe=0;oe<B-I;++oe)this[oe+I]=ve[oe%pe]}return this};var ce=/[^+/0-9A-Za-z-_]/g;function ae(D){if(D=D.split("=")[0],D=D.trim().replace(ce,""),D.length<2)return"";for(;D.length%4!==0;)D=D+"=";return D}function k(D,P){P=P||1/0;for(var I,B=D.length,ee=null,ue=[],oe=0;oe<B;++oe){if(I=D.charCodeAt(oe),I>55295&&I<57344){if(!ee){if(I>56319){(P-=3)>-1&&ue.push(239,191,189);continue}else if(oe+1===B){(P-=3)>-1&&ue.push(239,191,189);continue}ee=I;continue}if(I<56320){(P-=3)>-1&&ue.push(239,191,189),ee=I;continue}I=(ee-55296<<10|I-56320)+65536}else ee&&(P-=3)>-1&&ue.push(239,191,189);if(ee=null,I<128){if((P-=1)<0)break;ue.push(I)}else if(I<2048){if((P-=2)<0)break;ue.push(I>>6|192,I&63|128)}else if(I<65536){if((P-=3)<0)break;ue.push(I>>12|224,I>>6&63|128,I&63|128)}else if(I<1114112){if((P-=4)<0)break;ue.push(I>>18|240,I>>12&63|128,I>>6&63|128,I&63|128)}else throw new Error("Invalid code point")}return ue}function W(D){for(var P=[],I=0;I<D.length;++I)P.push(D.charCodeAt(I)&255);return P}function F(D,P){for(var I,B,ee,ue=[],oe=0;oe<D.length&&!((P-=2)<0);++oe)I=D.charCodeAt(oe),B=I>>8,ee=I%256,ue.push(ee),ue.push(B);return ue}function Y(D){return g.toByteArray(ae(D))}function X(D,P,I,B){for(var ee=0;ee<B&&!(ee+I>=P.length||ee>=D.length);++ee)P[ee+I]=D[ee];return ee}function ne(D,P){return D instanceof P||D!=null&&D.constructor!=null&&D.constructor.name!=null&&D.constructor.name===P.name}function le(D){return D!==D}var de=(function(){for(var D="0123456789abcdef",P=new Array(256),I=0;I<16;++I)for(var B=I*16,ee=0;ee<16;++ee)P[B+ee]=D[I]+D[ee];return P})()})(ms)),ms}var H_;function HO(){return H_||(H_=1,(function(e,g){var O=VO(),d=O.Buffer;function o(t,r){for(var i in t)r[i]=t[i]}d.from&&d.alloc&&d.allocUnsafe&&d.allocUnsafeSlow?e.exports=O:(o(O,g),g.Buffer=n);function n(t,r,i){return d(t,r,i)}n.prototype=Object.create(d.prototype),o(d,n),n.from=function(t,r,i){if(typeof t=="number")throw new TypeError("Argument must not be a number");return d(t,r,i)},n.alloc=function(t,r,i){if(typeof t!="number")throw new TypeError("Argument must be a number");var c=d(t);return r!==void 0?typeof i=="string"?c.fill(r,i):c.fill(r):c.fill(0),c},n.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return d(t)},n.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return O.SlowBuffer(t)}})(nc,nc.exports)),nc.exports}var z_;function zO(){if(z_)return bs;z_=1;var e=HO().Buffer,g=e.isEncoding||function(v){switch(v=""+v,v&&v.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function O(v){if(!v)return"utf8";for(var y;;)switch(v){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return v;default:if(y)return;v=(""+v).toLowerCase(),y=!0}}function d(v){var y=O(v);if(typeof y!="string"&&(e.isEncoding===g||!g(v)))throw new Error("Unknown encoding: "+v);return y||v}bs.StringDecoder=o;function o(v){this.encoding=d(v);var y;switch(this.encoding){case"utf16le":this.text=a,this.end=_,y=4;break;case"utf8":this.fillLast=i,y=4;break;case"base64":this.text=p,this.end=m,y=3;break;default:this.write=h,this.end=u;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=e.allocUnsafe(y)}o.prototype.write=function(v){if(v.length===0)return"";var y,s;if(this.lastNeed){if(y=this.fillLast(v),y===void 0)return"";s=this.lastNeed,this.lastNeed=0}else s=0;return s<v.length?y?y+this.text(v,s):this.text(v,s):y||""},o.prototype.end=l,o.prototype.text=c,o.prototype.fillLast=function(v){if(this.lastNeed<=v.length)return v.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);v.copy(this.lastChar,this.lastTotal-this.lastNeed,0,v.length),this.lastNeed-=v.length};function n(v){return v<=127?0:v>>5===6?2:v>>4===14?3:v>>3===30?4:v>>6===2?-1:-2}function t(v,y,s){var f=y.length-1;if(f<s)return 0;var b=n(y[f]);return b>=0?(b>0&&(v.lastNeed=b-1),b):--f<s||b===-2?0:(b=n(y[f]),b>=0?(b>0&&(v.lastNeed=b-2),b):--f<s||b===-2?0:(b=n(y[f]),b>=0?(b>0&&(b===2?b=0:v.lastNeed=b-3),b):0))}function r(v,y,s){if((y[0]&192)!==128)return v.lastNeed=0,"�";if(v.lastNeed>1&&y.length>1){if((y[1]&192)!==128)return v.lastNeed=1,"�";if(v.lastNeed>2&&y.length>2&&(y[2]&192)!==128)return v.lastNeed=2,"�"}}function i(v){var y=this.lastTotal-this.lastNeed,s=r(this,v);if(s!==void 0)return s;if(this.lastNeed<=v.length)return v.copy(this.lastChar,y,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);v.copy(this.lastChar,y,0,v.length),this.lastNeed-=v.length}function c(v,y){var s=t(this,v,y);if(!this.lastNeed)return v.toString("utf8",y);this.lastTotal=s;var f=v.length-(s-this.lastNeed);return v.copy(this.lastChar,0,f),v.toString("utf8",y,f)}function l(v){var y=v&&v.length?this.write(v):"";return this.lastNeed?y+"�":y}function a(v,y){if((v.length-y)%2===0){var s=v.toString("utf16le",y);if(s){var f=s.charCodeAt(s.length-1);if(f>=55296&&f<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=v[v.length-2],this.lastChar[1]=v[v.length-1],s.slice(0,-1)}return s}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=v[v.length-1],v.toString("utf16le",y,v.length-1)}function _(v){var y=v&&v.length?this.write(v):"";if(this.lastNeed){var s=this.lastTotal-this.lastNeed;return y+this.lastChar.toString("utf16le",0,s)}return y}function p(v,y){var s=(v.length-y)%3;return s===0?v.toString("base64",y):(this.lastNeed=3-s,this.lastTotal=3,s===1?this.lastChar[0]=v[v.length-1]:(this.lastChar[0]=v[v.length-2],this.lastChar[1]=v[v.length-1]),v.toString("base64",y,v.length-s))}function m(v){var y=v&&v.length?this.write(v):"";return this.lastNeed?y+this.lastChar.toString("base64",0,3-this.lastNeed):y}function h(v){return v.toString(this.encoding)}function u(v){return v&&v.length?this.write(v):""}return bs}var $_;function $O(){if($_)return _i;$_=1;var e=_i&&_i.__importDefault||function(_){return _&&_.__esModule?_:{default:_}};Object.defineProperty(_i,"__esModule",{value:!0});var g=e(qu()),O=_e(),d=e(Lm()),o=zO(),n=new o.StringDecoder("utf8");function t(_){return new g.default(a(_))}function r(_,p){if(Object.prototype.hasOwnProperty.call(_,"_buffer"))return i(_,p);if(Object.prototype.hasOwnProperty.call(_,"_buffers"))return c(_,p);throw(0,O.newError)("Don't know how to decode strings from '".concat(_,"'"))}function i(_,p){var m=_.position,h=m+p;return _.position=Math.min(h,_.length),_._buffer.toString("utf8",m,h)}function c(_,p){return l(_,p,function(m){return n.write(m._buffer)},function(){return n.end()})}function l(_,p,m,h){var u=p,v=_.position;_._updatePos(Math.min(p,_.length-v));var y=_._buffers.reduce(function(s,f){if(u<=0)return s;if(v>=f.length)return v-=f.length,"";f._updatePos(v-f.position);var b=Math.min(f.length-v,u),E=f.readSlice(b);return f._updatePos(b),u=Math.max(u-E.length,0),v=0,s+m(E)},"");return y+h()}function a(_){return typeof d.default.Buffer.from=="function"?d.default.Buffer.from(_,"utf8"):new d.default.Buffer(_,"utf8")}return _i.default={encode:t,decode:r},_i}var G_;function cn(){return G_||(G_=1,(function(e){var g=mt&&mt.__createBinding||(Object.create?(function(r,i,c,l){l===void 0&&(l=c);var a=Object.getOwnPropertyDescriptor(i,c);(!a||("get"in a?!i.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return i[c]}}),Object.defineProperty(r,l,a)}):(function(r,i,c,l){l===void 0&&(l=c),r[l]=i[c]})),O=mt&&mt.__exportStar||function(r,i){for(var c in r)c!=="default"&&!Object.prototype.hasOwnProperty.call(i,c)&&g(i,r,c)},d=mt&&mt.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(e,"__esModule",{value:!0}),e.utf8=e.alloc=e.ChannelConfig=void 0,O(FO(),e),O(xO(),e);var o=WO();Object.defineProperty(e,"ChannelConfig",{enumerable:!0,get:function(){return d(o).default}});var n=qu();Object.defineProperty(e,"alloc",{enumerable:!0,get:function(){return n.alloc}});var t=$O();Object.defineProperty(e,"utf8",{enumerable:!0,get:function(){return d(t).default}})})(mt)),mt}var Y_;function GO(){if(Y_)return ec;Y_=1,Object.defineProperty(ec,"__esModule",{value:!0}),ec.default=l;var e=cn(),g=_e(),O=1616949271,d=["5.8","5.7","5.6","5.4","5.3","5.2","5.1","5.0","4.4","4.3","4.2","3.0"],o=0;function n(m,h){return{major:m,minor:h}}function t(m){if(m.length>4)throw(0,g.newError)("It should not have more than 4 versions of the protocol");var h=(0,e.alloc)(20);return h.writeInt32(O),m.forEach(function(u){if(u instanceof Array){var v=u[0],y=v.major,s=v.minor,f=u[1].minor,b=s-f;h.writeInt32(b<<16|s<<8|y)}else{var y=u.major,s=u.minor;h.writeInt32(s<<8|y)}}),h.reset(),h}function r(m,h){var u=[m.readUInt8(),m.readUInt8(),m.readUInt8(),m.readUInt8()];if(u[0]===72&&u[1]===84&&u[2]===84&&u[3]===80)throw h.error("Handshake failed since server responded with HTTP."),(0,g.newError)("Server responded HTTP. Make sure you are not trying to connect to the http endpoint (HTTP defaults to port 7474 whereas BOLT defaults to port 7687)");return+(u[3]+"."+u[2])}function i(m,h,u){for(var v=h.readVarInt(),y=[],s=0;s<v;s++){var f=[h.readUInt8(),h.readUInt8(),h.readUInt8(),h.readUInt8()];y=y.concat(_(f))}h.readVarInt();var b=p(),E=0,w=0;y.sort(function(R,L){return Number(R.major)!==Number(L.major)?Number(L.major)-Number(R.major):Number(L.minor)-Number(R.minor)});for(var s=0;s<y.length;s++){var T=y[s];if(d.includes(T.major+"."+T.minor)){E=T.major,w=T.minor;break}}return new Promise(function(R,L){try{var j=(0,e.alloc)(5);j.writeInt32(w<<8|E),j.writeVarInt(b),m.write(j),R({protocolVersion:+(E+"."+w),capabilites:b,consumeRemainingBuffer:function(M){h.hasRemaining()&&M(h.readSlice(h.remaining()))}})}catch(M){L(M)}})}function c(){return t([n(255,1),[n(5,8),n(5,0)],[n(4,4),n(4,2)],n(3,0)])}function l(m,h){return a(m,h).then(function(u){return u.protocolVersion===255.1?i(m,u.buffer):u})}function a(m,h){var u=this;return new Promise(function(v,y){var s=function(f){y(f)};m.onerror=s.bind(u),m._error&&s(m._error),m.onmessage=function(f){try{var b=r(f,h);v({protocolVersion:b,capabilites:0,buffer:f,consumeRemainingBuffer:function(E){f.hasRemaining()&&E(f.readSlice(f.remaining()))}})}catch(E){y(E)}},m.write(c())})}function _(m){for(var h=[],u=m[3],v=m[2],y=0;y<=m[1];y++)h.push({major:u,minor:v-y});return h}function p(m){return o}return ec}var pi={},ir={},Zn={},Ce={},It={},K_;function Um(){if(K_)return It;K_=1;var e=It&&It.__extends||(function(){var t=function(r,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,l){c.__proto__=l}||function(c,l){for(var a in l)Object.prototype.hasOwnProperty.call(l,a)&&(c[a]=l[a])},t(r,i)};return function(r,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");t(r,i);function c(){this.constructor=r}r.prototype=i===null?Object.create(i):(c.prototype=i.prototype,new c)}})(),g=It&&It.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(It,"__esModule",{value:!0}),g(_e());var O=(function(){function t(){}return t.ofRecord=function(r){return r===null?t.ofNull():new n(r)},t.ofMessageResponse=function(r){return r===null?t.ofNull():new d(r)},t.ofNull=function(){return new o},Object.defineProperty(t.prototype,"ttl",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"db",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"servers",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isNull",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),t})();It.default=O;var d=(function(t){e(r,t);function r(i){var c=t.call(this)||this;return c._response=i,c}return Object.defineProperty(r.prototype,"ttl",{get:function(){return this._response.rt.ttl},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"servers",{get:function(){return this._response.rt.servers},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"db",{get:function(){return this._response.rt.db},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"isNull",{get:function(){return this._response===null},enumerable:!1,configurable:!0}),r})(O),o=(function(t){e(r,t);function r(){return t!==null&&t.apply(this,arguments)||this}return Object.defineProperty(r.prototype,"isNull",{get:function(){return!0},enumerable:!1,configurable:!0}),r})(O),n=(function(t){e(r,t);function r(i){var c=t.call(this)||this;return c._record=i,c}return Object.defineProperty(r.prototype,"ttl",{get:function(){return this._record.get("ttl")},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"servers",{get:function(){return this._record.get("servers")},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"db",{get:function(){return this._record.has("db")?this._record.get("db"):null},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"isNull",{get:function(){return this._record===null},enumerable:!1,configurable:!0}),r})(O);return It}var ur={},wu={},Z_;function qm(){if(Z_)return wu;Z_=1,Object.defineProperty(wu,"__esModule",{value:!0}),wu.identity=g,wu.reuseOngoingRequest=O;var e=_e();function g(d){return d}function O(d,o){o===void 0&&(o=null);var n=new Map;return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var i=e.json.stringify(t);if(n.has(i))return n.get(i);var c=d.apply(o,t);return n.set(i,c),c.finally(function(){n.delete(i)})}}return wu}var yi={},Q_;function YO(){if(Q_)return yi;Q_=1;var e=yi&&yi.__values||function(O){var d=typeof Symbol=="function"&&Symbol.iterator,o=d&&O[d],n=0;if(o)return o.call(O);if(O&&typeof O.length=="number")return{next:function(){return O&&n>=O.length&&(O=void 0),{value:O&&O[n++],done:!O}}};throw new TypeError(d?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(yi,"__esModule",{value:!0}),yi.equals=g;function g(O,d){var o,n;if(O===d)return!0;if(O===null||d===null)return!1;if(typeof O=="object"&&typeof d=="object"){var t=Object.keys(O),r=Object.keys(d);if(t.length!==r.length)return!1;try{for(var i=e(t),c=i.next();!c.done;c=i.next()){var l=c.value;if(O[l]!==d[l])return!1}}catch(a){o={error:a}}finally{try{c&&!c.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return!0}return!1}return yi}var X_;function Fu(){if(X_)return ur;X_=1;var e=ur&&ur.__createBinding||(Object.create?(function(d,o,n,t){t===void 0&&(t=n);var r=Object.getOwnPropertyDescriptor(o,n);(!r||("get"in r?!o.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return o[n]}}),Object.defineProperty(d,t,r)}):(function(d,o,n,t){t===void 0&&(t=n),d[t]=o[n]})),g=ur&&ur.__setModuleDefault||(Object.create?(function(d,o){Object.defineProperty(d,"default",{enumerable:!0,value:o})}):function(d,o){d.default=o}),O=ur&&ur.__importStar||(function(){var d=function(o){return d=Object.getOwnPropertyNames||function(n){var t=[];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[t.length]=r);return t},d(o)};return function(o){if(o&&o.__esModule)return o;var n={};if(o!=null)for(var t=d(o),r=0;r<t.length;r++)t[r]!=="default"&&e(n,o,t[r]);return g(n,o),n}})();return Object.defineProperty(ur,"__esModule",{value:!0}),ur.object=ur.functional=void 0,ur.functional=O(qm()),ur.object=O(YO()),ur}var J_;function er(){if(J_)return Ce;J_=1;var e=Ce&&Ce.__extends||(function(){var y=function(s,f){return y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,E){b.__proto__=E}||function(b,E){for(var w in E)Object.prototype.hasOwnProperty.call(E,w)&&(b[w]=E[w])},y(s,f)};return function(s,f){if(typeof f!="function"&&f!==null)throw new TypeError("Class extends value "+String(f)+" is not a constructor or null");y(s,f);function b(){this.constructor=s}s.prototype=f===null?Object.create(f):(b.prototype=f.prototype,new b)}})(),g=Ce&&Ce.__importDefault||function(y){return y&&y.__esModule?y:{default:y}};Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.TelemetryObserver=Ce.ProcedureRouteObserver=Ce.RouteObserver=Ce.CompletedObserver=Ce.FailedObserver=Ce.ResetObserver=Ce.LogoffObserver=Ce.LoginObserver=Ce.ResultStreamObserver=Ce.StreamObserver=void 0;var O=_e(),d=g(Um()),o=Fu(),n=O.internal.constants.FETCH_ALL,t=O.error.PROTOCOL_ERROR,r=(function(){function y(){}return y.prototype.onNext=function(s){},y.prototype.onError=function(s){},y.prototype.onCompleted=function(s){},y})();Ce.StreamObserver=r;var i=(function(y){e(s,y);function s(f){var b=f===void 0?{}:f,E=b.reactive,w=E===void 0?!1:E,T=b.moreFunction,R=b.discardFunction,L=b.fetchSize,j=L===void 0?n:L,M=b.beforeError,x=b.afterError,Z=b.beforeKeys,H=b.afterKeys,K=b.beforeComplete,G=b.afterComplete,$=b.server,A=b.highRecordWatermark,q=A===void 0?Number.MAX_VALUE:A,U=b.lowRecordWatermark,Q=U===void 0?Number.MAX_VALUE:U,te=b.enrichMetadata,z=b.onDb,re=y.call(this)||this;return re._fieldKeys=null,re._fieldLookup=null,re._head=null,re._queuedRecords=[],re._tail=null,re._error=null,re._observers=[],re._meta={},re._server=$,re._beforeError=M,re._afterError=x,re._beforeKeys=Z,re._afterKeys=H,re._beforeComplete=K,re._afterComplete=G,re._enrichMetadata=te||o.functional.identity,re._queryId=null,re._moreFunction=T,re._discardFunction=R,re._discard=!1,re._fetchSize=j,re._lowRecordWatermark=Q,re._highRecordWatermark=q,re._setState(w?v.READY:v.READY_STREAMING),re._setupAutoPull(),re._paused=!1,re._pulled=!w,re._haveRecordStreamed=!1,re._onDb=z,re}return s.prototype.pause=function(){this._paused=!0},s.prototype.resume=function(){this._paused=!1,this._setupAutoPull(!0),this._state.pull(this)},s.prototype.onNext=function(f){this._haveRecordStreamed=!0;var b=new O.Record(this._fieldKeys,f,this._fieldLookup);this._observers.some(function(E){return E.onNext})?this._observers.forEach(function(E){E.onNext&&E.onNext(b)}):(this._queuedRecords.push(b),this._queuedRecords.length>this._highRecordWatermark&&(this._autoPull=!1))},s.prototype.onCompleted=function(f){this._state.onSuccess(this,f)},s.prototype.onError=function(f){this._state.onError(this,f)},s.prototype.cancel=function(){this._discard=!0},s.prototype.prepareToHandleSingleResponse=function(){this._head=[],this._fieldKeys=[],this._setState(v.STREAMING)},s.prototype.markCompleted=function(){this._head=[],this._fieldKeys=[],this._tail={},this._setState(v.SUCCEEDED)},s.prototype.subscribe=function(f){if(this._head&&f.onKeys&&f.onKeys(this._head),this._queuedRecords.length>0&&f.onNext)for(var b=0;b<this._queuedRecords.length;b++)f.onNext(this._queuedRecords[b]),this._queuedRecords.length-b-1<=this._lowRecordWatermark&&(this._autoPull=!0,this._state===v.READY&&this._handleStreaming());this._tail&&f.onCompleted&&f.onCompleted(this._tail),this._error&&f.onError(this._error),this._observers.push(f),this._state===v.READY&&this._handleStreaming()},s.prototype._handleHasMore=function(f){this._setState(v.READY),this._handleStreaming(),delete f.has_more},s.prototype._handlePullSuccess=function(f){var b=this,E=this._enrichMetadata(Object.assign(this._server?{server:this._server}:{},this._meta,{stream_summary:{have_records_streamed:this._haveRecordStreamed,pulled:this._pulled,has_keys:this._fieldKeys.length>0}},f));if(![void 0,null,"r","w","rw","s"].includes(E.type)){this.onError((0,O.newError)(`Server returned invalid query type. Expected one of [undefined, null, "r", "w", "rw", "s"] but got '`.concat(E.type,"'"),t));return}this._setState(v.SUCCEEDED);var w=null;this._beforeComplete&&(w=this._beforeComplete(E));var T=function(){b._tail=E,b._observers.some(function(R){return R.onCompleted})&&b._observers.forEach(function(R){R.onCompleted&&R.onCompleted(E)}),b._afterComplete&&b._afterComplete(E)};w?Promise.resolve(w).then(function(){return T()}):T()},s.prototype._handleRunSuccess=function(f,b){var E=this;if(this._fieldKeys===null){if(this._fieldKeys=[],this._fieldLookup={},f.fields&&f.fields.length>0){this._fieldKeys=f.fields;for(var w=0;w<f.fields.length;w++)this._fieldLookup[f.fields[w]]=w}f.db!==null&&this._onDb!==void 0&&this._onDb(f.db),f.fields!=null&&delete f.fields,f.qid!==null&&f.qid!==void 0&&(this._queryId=f.qid,delete f.qid),this._storeMetadataForCompletion(f);var T=null;this._beforeKeys&&(T=this._beforeKeys(this._fieldKeys));var R=function(){E._head=E._fieldKeys,E._observers.some(function(L){return L.onKeys})&&E._observers.forEach(function(L){L.onKeys&&L.onKeys(E._fieldKeys)}),E._afterKeys&&E._afterKeys(E._fieldKeys),b()};T?Promise.resolve(T).then(function(){return R()}):R()}},s.prototype._handleError=function(f){var b=this;this._setState(v.FAILED),this._error=f;var E=null;this._beforeError&&(E=this._beforeError(f));var w=function(){b._observers.some(function(T){return T.onError})&&b._observers.forEach(function(T){T.onError&&T.onError(f)}),b._afterError&&b._afterError(f)};E?Promise.resolve(E).then(function(){return w()}):w()},s.prototype._handleStreaming=function(){this._head&&this._observers.some(function(f){return f.onNext||f.onCompleted})&&!this._paused&&(this._discard||this._autoPull)&&this._more()},s.prototype._more=function(){this._discard?this._discardFunction(this._queryId,this):(this._pulled=!0,this._moreFunction(this._queryId,this._fetchSize,this)),this._setState(v.STREAMING)},s.prototype._storeMetadataForCompletion=function(f){for(var b=Object.keys(f),E=b.length,w="";E--;)w=b[E],this._meta[w]=f[w]},s.prototype._setState=function(f){this._state=f},s.prototype._setupAutoPull=function(){this._autoPull=!0},s})(r);Ce.ResultStreamObserver=i;var c=(function(y){e(s,y);function s(f){var b=f===void 0?{}:f,E=b.onError,w=b.onCompleted,T=y.call(this)||this;return T._onError=E,T._onCompleted=w,T}return s.prototype.onNext=function(f){this.onError((0,O.newError)("Received RECORD when initializing "+O.json.stringify(f)))},s.prototype.onError=function(f){this._onError&&this._onError(f)},s.prototype.onCompleted=function(f){this._onCompleted&&this._onCompleted(f)},s})(r);Ce.LoginObserver=c;var l=(function(y){e(s,y);function s(f){var b=f===void 0?{}:f,E=b.onError,w=b.onCompleted,T=y.call(this)||this;return T._onError=E,T._onCompleted=w,T}return s.prototype.onNext=function(f){this.onError((0,O.newError)("Received RECORD when logging off "+O.json.stringify(f)))},s.prototype.onError=function(f){this._onError&&this._onError(f)},s.prototype.onCompleted=function(f){this._onCompleted&&this._onCompleted(f)},s})(r);Ce.LogoffObserver=l;var a=(function(y){e(s,y);function s(f){var b=f===void 0?{}:f,E=b.onProtocolError,w=b.onError,T=b.onComplete,R=y.call(this)||this;return R._onProtocolError=E,R._onError=w,R._onComplete=T,R}return s.prototype.onNext=function(f){this.onError((0,O.newError)("Received RECORD when resetting: received record is: "+O.json.stringify(f),t))},s.prototype.onError=function(f){f.code===t&&this._onProtocolError&&this._onProtocolError(f.message),this._onError&&this._onError(f)},s.prototype.onCompleted=function(f){this._onComplete&&this._onComplete(f)},s})(r);Ce.ResetObserver=a;var _=(function(y){e(s,y);function s(f){var b=f===void 0?{}:f,E=b.onError,w=b.onCompleted,T=y.call(this)||this;return T._onError=E,T._onCompleted=w,T}return s.prototype.onNext=function(f){this.onError((0,O.newError)("Received RECORD when sending telemetry "+O.json.stringify(f),t))},s.prototype.onError=function(f){this._onError&&this._onError(f)},s.prototype.onCompleted=function(f){this._onCompleted&&this._onCompleted(f)},s})(i);Ce.TelemetryObserver=_;var p=(function(y){e(s,y);function s(f){var b=f.error,E=f.onError,w=y.call(this,{beforeError:E})||this;return w.onError(b),w}return s})(i);Ce.FailedObserver=p;var m=(function(y){e(s,y);function s(){var f=y.call(this)||this;return y.prototype.markCompleted.call(f),f}return s})(i);Ce.CompletedObserver=m;var h=(function(y){e(s,y);function s(f){var b=f.resultObserver,E=f.onProtocolError,w=f.onError,T=f.onCompleted,R=y.call(this)||this;return R._resultObserver=b,R._onError=w,R._onCompleted=T,R._records=[],R._onProtocolError=E,b.subscribe(R),R}return s.prototype.onNext=function(f){this._records.push(f)},s.prototype.onError=function(f){f.code===t&&this._onProtocolError&&this._onProtocolError(f.message),this._onError&&this._onError(f)},s.prototype.onCompleted=function(){if(this._records!==null&&this._records.length!==1){this.onError((0,O.newError)("Illegal response from router. Received "+this._records.length+` records but expected only one.
|
|
6
|
+
`+O.json.stringify(this._records),t));return}this._onCompleted&&this._onCompleted(d.default.ofRecord(this._records[0]))},s})(r);Ce.ProcedureRouteObserver=h;var u=(function(y){e(s,y);function s(f){var b=f===void 0?{}:f,E=b.onProtocolError,w=b.onError,T=b.onCompleted,R=y.call(this)||this;return R._onProtocolError=E,R._onError=w,R._onCompleted=T,R}return s.prototype.onNext=function(f){this.onError((0,O.newError)("Received RECORD when resetting: received record is: "+O.json.stringify(f),t))},s.prototype.onError=function(f){f.code===t&&this._onProtocolError&&this._onProtocolError(f.message),this._onError&&this._onError(f)},s.prototype.onCompleted=function(f){this._onCompleted&&this._onCompleted(d.default.ofMessageResponse(f))},s})(r);Ce.RouteObserver=u;var v={READY_STREAMING:{onSuccess:function(y,s){y._handleRunSuccess(s,function(){y._setState(v.STREAMING)})},onError:function(y,s){y._handleError(s)},name:function(){return"READY_STREAMING"},pull:function(){}},READY:{onSuccess:function(y,s){y._handleRunSuccess(s,function(){return y._handleStreaming()})},onError:function(y,s){y._handleError(s)},name:function(){return"READY"},pull:function(y){return y._more()}},STREAMING:{onSuccess:function(y,s){s.has_more?y._handleHasMore(s):y._handlePullSuccess(s)},onError:function(y,s){y._handleError(s)},name:function(){return"STREAMING"},pull:function(){}},FAILED:{onError:function(y){},name:function(){return"FAILED"},pull:function(){}},SUCCEEDED:{name:function(){return"SUCCEEDED"},pull:function(){}}};return Ce}var ep;function sn(){if(ep)return Zn;ep=1,Object.defineProperty(Zn,"__esModule",{value:!0}),Zn.assertDatabaseIsEmpty=O,Zn.assertTxConfigIsEmpty=g,Zn.assertImpersonatedUserIsEmpty=d,Zn.assertNotificationFilterIsEmpty=o;var e=_e();er();function g(n,t,r){if(t===void 0&&(t=function(){}),n&&!n.isEmpty()){var i=(0,e.newError)("Driver is connected to the database that does not support transaction configuration. Please upgrade to neo4j 3.5.0 or later in order to use this functionality");throw t(i.message),r.onError(i),i}}function O(n,t,r){if(t===void 0&&(t=function(){}),n){var i=(0,e.newError)("Driver is connected to the database that does not support multiple databases. Please upgrade to neo4j 4.0.0 or later in order to use this functionality");throw t(i.message),r.onError(i),i}}function d(n,t,r){if(t===void 0&&(t=function(){}),n){var i=(0,e.newError)("Driver is connected to the database that does not support user impersonation. Please upgrade to neo4j 4.4.0 or later in order to use this functionality. "+"Trying to impersonate ".concat(n,"."));throw t(i.message),r.onError(i),i}}function o(n,t,r){if(t===void 0&&(t=function(){}),n!==void 0){var i=(0,e.newError)("Driver is connected to a database that does not support user notification filters. Please upgrade to Neo4j 5.7.0 or later in order to use this functionality. "+"Trying to set notifications to ".concat(e.json.stringify(n),"."));throw t(i.message),r.onError(i),i}}return Zn}var We={},Qn={},Xn={},rp;function Fm(){if(rp)return Xn;rp=1,Object.defineProperty(Xn,"__esModule",{value:!0}),Xn.Structure=void 0,Xn.verifyStructSize=d;var e=_e(),g=e.error.PROTOCOL_ERROR,O=(function(){function o(n,t){this.signature=n,this.fields=t}return Object.defineProperty(o.prototype,"size",{get:function(){return this.fields.length},enumerable:!1,configurable:!0}),o.prototype.toString=function(){for(var n="",t=0;t<this.fields.length;t++)t>0&&(n+=", "),n+=this.fields[t];return"Structure("+this.signature+", ["+n+"])"},o})();Xn.Structure=O;function d(o,n,t){if(n!==t)throw(0,e.newError)("Wrong struct size for ".concat(o,", expected ").concat(n," but was ").concat(t),g)}return Xn.default=O,Xn}var tp;function Bm(){if(tp)return Qn;tp=1,Object.defineProperty(Qn,"__esModule",{value:!0}),Qn.Unpacker=Qn.Packer=void 0;var e=cn(),g=Fu(),O=Fm(),d=_e(),o=d.error.PROTOCOL_ERROR,n=128,t=144,r=160,i=176,c=192,l=193,a=194,_=195,p=200,m=201,h=202,u=203,v=208,y=209,s=210,f=212,b=213,E=214,w=204,T=205,R=206,L=216,j=217,M=218,x=220,Z=221,H=(function(){function $(A){this._ch=A,this._byteArraysSupported=!0}return $.prototype.packable=function(A,q){var U=this;q===void 0&&(q=g.functional.identity);try{A=q(A)}catch(z){return function(){throw z}}if(A===null)return function(){return U._ch.writeUInt8(c)};if(A===!0)return function(){return U._ch.writeUInt8(_)};if(A===!1)return function(){return U._ch.writeUInt8(a)};if(typeof A=="number")return function(){return U.packFloat(A)};if(typeof A=="string")return function(){return U.packString(A)};if(typeof A=="bigint")return function(){return U.packInteger((0,d.int)(A))};if((0,d.isInt)(A))return function(){return U.packInteger(A)};if(A instanceof Int8Array)return function(){return U.packBytes(A)};if(A instanceof Array)return function(){U.packListHeader(A.length);for(var z=0;z<A.length;z++)U.packable(A[z]===void 0?null:A[z],q)()};if(G(A))return this.packableIterable(A,q);if(A instanceof O.Structure){for(var Q=[],te=0;te<A.fields.length;te++)Q[te]=this.packable(A.fields[te],q);return function(){return U.packStruct(A.signature,Q)}}else return typeof A=="object"?function(){for(var z=Object.keys(A),re=0,ce=0;ce<z.length;ce++)A[z[ce]]!==void 0&&re++;U.packMapHeader(re);for(var ce=0;ce<z.length;ce++){var ae=z[ce];A[ae]!==void 0&&(U.packString(ae),U.packable(A[ae],q)())}}:this._nonPackableValue("Unable to pack the given value: ".concat(A))},$.prototype.packableIterable=function(A,q){try{var U=Array.from(A);return this.packable(U,q)}catch(Q){throw(0,d.newError)("Cannot pack given iterable, ".concat(Q.message,": ").concat(A))}},$.prototype.packStruct=function(A,q){q=q||[],this.packStructHeader(q.length,A);for(var U=0;U<q.length;U++)q[U]()},$.prototype.packInteger=function(A){var q=A.high,U=A.low;A.greaterThanOrEqual(-16)&&A.lessThan(128)?this._ch.writeInt8(U):A.greaterThanOrEqual(-128)&&A.lessThan(-16)?(this._ch.writeUInt8(p),this._ch.writeInt8(U)):A.greaterThanOrEqual(-32768)&&A.lessThan(32768)?(this._ch.writeUInt8(m),this._ch.writeInt16(U)):A.greaterThanOrEqual(-2147483648)&&A.lessThan(2147483648)?(this._ch.writeUInt8(h),this._ch.writeInt32(U)):(this._ch.writeUInt8(u),this._ch.writeInt32(q),this._ch.writeInt32(U))},$.prototype.packFloat=function(A){this._ch.writeUInt8(l),this._ch.writeFloat64(A)},$.prototype.packString=function(A){var q=e.utf8.encode(A),U=q.length;if(U<16)this._ch.writeUInt8(n|U),this._ch.writeBytes(q);else if(U<256)this._ch.writeUInt8(v),this._ch.writeUInt8(U),this._ch.writeBytes(q);else if(U<65536)this._ch.writeUInt8(y),this._ch.writeUInt8(U/256>>0),this._ch.writeUInt8(U%256),this._ch.writeBytes(q);else if(U<4294967296)this._ch.writeUInt8(s),this._ch.writeUInt8((U/16777216>>0)%256),this._ch.writeUInt8((U/65536>>0)%256),this._ch.writeUInt8((U/256>>0)%256),this._ch.writeUInt8(U%256),this._ch.writeBytes(q);else throw(0,d.newError)("UTF-8 strings of size "+U+" are not supported")},$.prototype.packListHeader=function(A){if(A<16)this._ch.writeUInt8(t|A);else if(A<256)this._ch.writeUInt8(f),this._ch.writeUInt8(A);else if(A<65536)this._ch.writeUInt8(b),this._ch.writeUInt8((A/256>>0)%256),this._ch.writeUInt8(A%256);else if(A<4294967296)this._ch.writeUInt8(E),this._ch.writeUInt8((A/16777216>>0)%256),this._ch.writeUInt8((A/65536>>0)%256),this._ch.writeUInt8((A/256>>0)%256),this._ch.writeUInt8(A%256);else throw(0,d.newError)("Lists of size "+A+" are not supported")},$.prototype.packBytes=function(A){if(this._byteArraysSupported){this.packBytesHeader(A.length);for(var q=0;q<A.length;q++)this._ch.writeInt8(A[q])}else throw(0,d.newError)("Byte arrays are not supported by the database this driver is connected to")},$.prototype.packBytesHeader=function(A){if(A<256)this._ch.writeUInt8(w),this._ch.writeUInt8(A);else if(A<65536)this._ch.writeUInt8(T),this._ch.writeUInt8((A/256>>0)%256),this._ch.writeUInt8(A%256);else if(A<4294967296)this._ch.writeUInt8(R),this._ch.writeUInt8((A/16777216>>0)%256),this._ch.writeUInt8((A/65536>>0)%256),this._ch.writeUInt8((A/256>>0)%256),this._ch.writeUInt8(A%256);else throw(0,d.newError)("Byte arrays of size "+A+" are not supported")},$.prototype.packMapHeader=function(A){if(A<16)this._ch.writeUInt8(r|A);else if(A<256)this._ch.writeUInt8(L),this._ch.writeUInt8(A);else if(A<65536)this._ch.writeUInt8(j),this._ch.writeUInt8(A/256>>0),this._ch.writeUInt8(A%256);else if(A<4294967296)this._ch.writeUInt8(M),this._ch.writeUInt8((A/16777216>>0)%256),this._ch.writeUInt8((A/65536>>0)%256),this._ch.writeUInt8((A/256>>0)%256),this._ch.writeUInt8(A%256);else throw(0,d.newError)("Maps of size "+A+" are not supported")},$.prototype.packStructHeader=function(A,q){if(A<16)this._ch.writeUInt8(i|A),this._ch.writeUInt8(q);else if(A<256)this._ch.writeUInt8(x),this._ch.writeUInt8(A),this._ch.writeUInt8(q);else if(A<65536)this._ch.writeUInt8(Z),this._ch.writeUInt8(A/256>>0),this._ch.writeUInt8(A%256);else throw(0,d.newError)("Structures of size "+A+" are not supported")},$.prototype.disableByteArrays=function(){this._byteArraysSupported=!1},$.prototype._nonPackableValue=function(A){return function(){throw(0,d.newError)(A,o)}},$})();Qn.Packer=H;var K=(function(){function $(A,q){A===void 0&&(A=!1),q===void 0&&(q=!1),this._disableLosslessIntegers=A,this._useBigInt=q}return $.prototype.unpack=function(A,q){q===void 0&&(q=g.functional.identity);var U=A.readUInt8(),Q=U&240,te=U&15;if(U===c)return null;var z=this._unpackBoolean(U);if(z!==null)return z;var re=this._unpackNumberOrInteger(U,A);if(re!==null){if((0,d.isInt)(re)){if(this._useBigInt)return re.toBigInt();if(this._disableLosslessIntegers)return re.toNumberOrInfinity()}return re}var ce=this._unpackString(U,Q,te,A);if(ce!==null)return ce;var ae=this._unpackList(U,Q,te,A,q);if(ae!==null)return ae;var k=this._unpackByteArray(U,A);if(k!==null)return k;var W=this._unpackMap(U,Q,te,A,q);if(W!==null)return W;var F=this._unpackStruct(U,Q,te,A,q);if(F!==null)return F;throw(0,d.newError)("Unknown packed value with marker "+U.toString(16))},$.prototype.unpackInteger=function(A){var q=A.readUInt8(),U=this._unpackInteger(q,A);if(U==null)throw(0,d.newError)("Unable to unpack integer value with marker "+q.toString(16));return U},$.prototype._unpackBoolean=function(A){return A===_?!0:A===a?!1:null},$.prototype._unpackNumberOrInteger=function(A,q){return A===l?q.readFloat64():this._unpackInteger(A,q)},$.prototype._unpackInteger=function(A,q){if(A>=0&&A<128)return(0,d.int)(A);if(A>=240&&A<256)return(0,d.int)(A-256);if(A===p)return(0,d.int)(q.readInt8());if(A===m)return(0,d.int)(q.readInt16());if(A===h){var U=q.readInt32();return(0,d.int)(U)}else if(A===u){var Q=q.readInt32(),te=q.readInt32();return new d.Integer(te,Q)}else return null},$.prototype._unpackString=function(A,q,U,Q){return q===n?e.utf8.decode(Q,U):A===v?e.utf8.decode(Q,Q.readUInt8()):A===y?e.utf8.decode(Q,Q.readUInt16()):A===s?e.utf8.decode(Q,Q.readUInt32()):null},$.prototype._unpackList=function(A,q,U,Q,te){return q===t?this._unpackListWithSize(U,Q,te):A===f?this._unpackListWithSize(Q.readUInt8(),Q,te):A===b?this._unpackListWithSize(Q.readUInt16(),Q,te):A===E?this._unpackListWithSize(Q.readUInt32(),Q,te):null},$.prototype._unpackListWithSize=function(A,q,U){for(var Q=[],te=0;te<A;te++)Q.push(this.unpack(q,U));return Q},$.prototype._unpackByteArray=function(A,q){return A===w?this._unpackByteArrayWithSize(q.readUInt8(),q):A===T?this._unpackByteArrayWithSize(q.readUInt16(),q):A===R?this._unpackByteArrayWithSize(q.readUInt32(),q):null},$.prototype._unpackByteArrayWithSize=function(A,q){for(var U=new Int8Array(A),Q=0;Q<A;Q++)U[Q]=q.readInt8();return U},$.prototype._unpackMap=function(A,q,U,Q,te){return q===r?this._unpackMapWithSize(U,Q,te):A===L?this._unpackMapWithSize(Q.readUInt8(),Q,te):A===j?this._unpackMapWithSize(Q.readUInt16(),Q,te):A===M?this._unpackMapWithSize(Q.readUInt32(),Q,te):null},$.prototype._unpackMapWithSize=function(A,q,U){for(var Q={},te=0;te<A;te++){var z=this.unpack(q,U);Q[z]=this.unpack(q,U)}return Q},$.prototype._unpackStruct=function(A,q,U,Q,te){return q===i?this._unpackStructWithSize(U,Q,te):A===x?this._unpackStructWithSize(Q.readUInt8(),Q,te):A===Z?this._unpackStructWithSize(Q.readUInt16(),Q,te):null},$.prototype._unpackStructWithSize=function(A,q,U){for(var Q=q.readUInt8(),te=new O.Structure(Q,[]),z=0;z<A;z++)te.fields.push(this.unpack(q,U));return U(te)},$})();Qn.Unpacker=K;function G($){return $==null?!1:typeof $[Symbol.iterator]=="function"}return Qn}var Je={},np;function KO(){if(np)return Je;np=1;var e=Je&&Je.__extends||(function(){var r=function(i,c){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,a){l.__proto__=a}||function(l,a){for(var _ in a)Object.prototype.hasOwnProperty.call(a,_)&&(l[_]=a[_])},r(i,c)};return function(i,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");r(i,c);function l(){this.constructor=i}i.prototype=c===null?Object.create(c):(l.prototype=c.prototype,new l)}})(),g=Je&&Je.__createBinding||(Object.create?(function(r,i,c,l){l===void 0&&(l=c);var a=Object.getOwnPropertyDescriptor(i,c);(!a||("get"in a?!i.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return i[c]}}),Object.defineProperty(r,l,a)}):(function(r,i,c,l){l===void 0&&(l=c),r[l]=i[c]})),O=Je&&Je.__setModuleDefault||(Object.create?(function(r,i){Object.defineProperty(r,"default",{enumerable:!0,value:i})}):function(r,i){r.default=i}),d=Je&&Je.__importStar||(function(){var r=function(i){return r=Object.getOwnPropertyNames||function(c){var l=[];for(var a in c)Object.prototype.hasOwnProperty.call(c,a)&&(l[l.length]=a);return l},r(i)};return function(i){if(i&&i.__esModule)return i;var c={};if(i!=null)for(var l=r(i),a=0;a<l.length;a++)l[a]!=="default"&&g(c,i,l[a]);return O(c,i),c}})();Object.defineProperty(Je,"__esModule",{value:!0}),Je.Unpacker=Je.Packer=void 0;var o=d(Bm()),n=(function(r){e(i,r);function i(){return r!==null&&r.apply(this,arguments)||this}return i.prototype.disableByteArrays=function(){throw new Error("Bolt V2 should always support byte arrays")},i})(o.Packer);Je.Packer=n;var t=(function(r){e(i,r);function i(c,l){return c===void 0&&(c=!1),l===void 0&&(l=!1),r.call(this,c,l)||this}return i})(o.Unpacker);return Je.Unpacker=t,Je}var ip;function ln(){if(ip)return We;ip=1;var e=We&&We.__createBinding||(Object.create?(function(t,r,i,c){c===void 0&&(c=i);var l=Object.getOwnPropertyDescriptor(r,i);(!l||("get"in l?!r.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return r[i]}}),Object.defineProperty(t,c,l)}):(function(t,r,i,c){c===void 0&&(c=i),t[c]=r[i]})),g=We&&We.__setModuleDefault||(Object.create?(function(t,r){Object.defineProperty(t,"default",{enumerable:!0,value:r})}):function(t,r){t.default=r}),O=We&&We.__importStar||(function(){var t=function(r){return t=Object.getOwnPropertyNames||function(i){var c=[];for(var l in i)Object.prototype.hasOwnProperty.call(i,l)&&(c[c.length]=l);return c},t(r)};return function(r){if(r&&r.__esModule)return r;var i={};if(r!=null)for(var c=t(r),l=0;l<c.length;l++)c[l]!=="default"&&e(i,r,c[l]);return g(i,r),i}})();Object.defineProperty(We,"__esModule",{value:!0}),We.structure=We.v2=We.v1=void 0;var d=O(Bm());We.v1=d;var o=O(KO());We.v2=o;var n=O(Fm());return We.structure=n,We.default=o,We}var bi={},op;function fr(){if(op)return bi;op=1,Object.defineProperty(bi,"__esModule",{value:!0}),bi.SIGNATURES=void 0;var e=_e(),g=e.internal.constants,O=g.ACCESS_MODE_READ,d=g.FETCH_ALL,o=e.internal.util.assertString,n=1,t=15,r=16,i=63,c=1,l=2,a=17,_=18,p=19,m=84,h=102,u=106,v=107,y=47,s=63,f="r",b=-1,E=Object.freeze({INIT:n,RESET:t,RUN:r,PULL_ALL:i,HELLO:c,GOODBYE:l,BEGIN:a,COMMIT:_,ROLLBACK:p,TELEMETRY:m,ROUTE:h,LOGON:u,LOGOFF:v,DISCARD:y,PULL:s});bi.SIGNATURES=E;var w=(function(){function G($,A,q){this.signature=$,this.fields=A,this.toString=q}return G.init=function($,A){return new G(n,[$,A],function(){return"INIT ".concat($," {...}")})},G.run=function($,A){return new G(r,[$,A],function(){return"RUN ".concat($," ").concat(e.json.stringify(A))})},G.pullAll=function(){return M},G.reset=function(){return x},G.hello=function($,A,q,U){q===void 0&&(q=null),U===void 0&&(U=null);var Q=Object.assign({user_agent:$},A);return q&&(Q.routing=q),U&&(Q.patch_bolt=U),new G(c,[Q],function(){return"HELLO {user_agent: '".concat($,"', ...}")})},G.hello5x1=function($,A){A===void 0&&(A=null);var q={user_agent:$};return A&&(q.routing=A),new G(c,[q],function(){return"HELLO {user_agent: '".concat($,"', ...}")})},G.hello5x2=function($,A,q){A===void 0&&(A=null),q===void 0&&(q=null);var U={user_agent:$};return L(U,A),q&&(U.routing=q),new G(c,[U],function(){return"HELLO ".concat(e.json.stringify(U))})},G.hello5x3=function($,A,q,U){q===void 0&&(q=null),U===void 0&&(U=null);var Q={};return $&&(Q.user_agent=$),A&&(Q.bolt_agent={product:A.product,platform:A.platform,language:A.language,language_details:A.languageDetails}),L(Q,q),U&&(Q.routing=U),new G(c,[Q],function(){return"HELLO ".concat(e.json.stringify(Q))})},G.hello5x5=function($,A,q,U){q===void 0&&(q=null),U===void 0&&(U=null);var Q={};return $&&(Q.user_agent=$),A&&(Q.bolt_agent={product:A.product,platform:A.platform,language:A.language,language_details:A.languageDetails}),j(Q,q),U&&(Q.routing=U),new G(c,[Q],function(){return"HELLO ".concat(e.json.stringify(Q))})},G.logon=function($){return new G(u,[$],function(){return"LOGON { ... }"})},G.logoff=function(){return new G(v,[],function(){return"LOGOFF"})},G.begin=function($){var A=$===void 0?{}:$,q=A.bookmarks,U=A.txConfig,Q=A.database,te=A.mode,z=A.impersonatedUser,re=A.notificationFilter,ce=T(q,U,Q,te,z,re);return new G(a,[ce],function(){return"BEGIN ".concat(e.json.stringify(ce))})},G.begin5x5=function($){var A=$===void 0?{}:$,q=A.bookmarks,U=A.txConfig,Q=A.database,te=A.mode,z=A.impersonatedUser,re=A.notificationFilter,ce=T(q,U,Q,te,z,re,{appendNotificationFilter:j});return new G(a,[ce],function(){return"BEGIN ".concat(e.json.stringify(ce))})},G.commit=function(){return Z},G.rollback=function(){return H},G.runWithMetadata=function($,A,q){var U=q===void 0?{}:q,Q=U.bookmarks,te=U.txConfig,z=U.database,re=U.mode,ce=U.impersonatedUser,ae=U.notificationFilter,k=T(Q,te,z,re,ce,ae);return new G(r,[$,A,k],function(){return"RUN ".concat($," ").concat(e.json.stringify(A)," ").concat(e.json.stringify(k))})},G.runWithMetadata5x5=function($,A,q){var U=q===void 0?{}:q,Q=U.bookmarks,te=U.txConfig,z=U.database,re=U.mode,ce=U.impersonatedUser,ae=U.notificationFilter,k=T(Q,te,z,re,ce,ae,{appendNotificationFilter:j});return new G(r,[$,A,k],function(){return"RUN ".concat($," ").concat(e.json.stringify(A)," ").concat(e.json.stringify(k))})},G.goodbye=function(){return K},G.pull=function($){var A=$===void 0?{}:$,q=A.stmtId,U=q===void 0?b:q,Q=A.n,te=Q===void 0?d:Q,z=R(U??b,te||d);return new G(s,[z],function(){return"PULL ".concat(e.json.stringify(z))})},G.discard=function($){var A=$===void 0?{}:$,q=A.stmtId,U=q===void 0?b:q,Q=A.n,te=Q===void 0?d:Q,z=R(U??b,te||d);return new G(y,[z],function(){return"DISCARD ".concat(e.json.stringify(z))})},G.telemetry=function($){var A=$.api,q=(0,e.int)(A);return new G(m,[q],function(){return"TELEMETRY ".concat(q.toString())})},G.route=function($,A,q){return $===void 0&&($={}),A===void 0&&(A=[]),q===void 0&&(q=null),new G(h,[$,A,q],function(){return"ROUTE ".concat(e.json.stringify($)," ").concat(e.json.stringify(A)," ").concat(q)})},G.routeV4x4=function($,A,q){$===void 0&&($={}),A===void 0&&(A=[]),q===void 0&&(q={});var U={};return q.databaseName&&(U.db=q.databaseName),q.impersonatedUser&&(U.imp_user=q.impersonatedUser),new G(h,[$,A,U],function(){return"ROUTE ".concat(e.json.stringify($)," ").concat(e.json.stringify(A)," ").concat(e.json.stringify(U))})},G})();bi.default=w;function T(G,$,A,q,U,Q,te){var z;te===void 0&&(te={});var re={};G.isEmpty()||(re.bookmarks=G.values()),$.timeout!==null&&(re.tx_timeout=$.timeout),$.metadata&&(re.tx_metadata=$.metadata),A&&(re.db=o(A,"database")),U&&(re.imp_user=o(U,"impersonatedUser")),q===O&&(re.mode=f);var ce=(z=te.appendNotificationFilter)!==null&&z!==void 0?z:L;return ce(re,Q),re}function R(G,$){var A={n:(0,e.int)($)};return G!==b&&(A.qid=(0,e.int)(G)),A}function L(G,$){$&&($.minimumSeverityLevel&&(G.notifications_minimum_severity=$.minimumSeverityLevel),$.disabledCategories&&(G.notifications_disabled_categories=$.disabledCategories),$.disabledClassifications&&(G.notifications_disabled_categories=$.disabledClassifications))}function j(G,$){$&&($.minimumSeverityLevel&&(G.notifications_minimum_severity=$.minimumSeverityLevel),$.disabledCategories&&(G.notifications_disabled_classifications=$.disabledCategories),$.disabledClassifications&&(G.notifications_disabled_classifications=$.disabledClassifications))}var M=new w(i,[],function(){return"PULL_ALL"}),x=new w(t,[],function(){return"RESET"}),Z=new w(_,[],function(){return"COMMIT"}),H=new w(p,[],function(){return"ROLLBACK"}),K=new w(l,[],function(){return"GOODBYE"});return bi}var mi={},gi={},ap;function qe(){if(ap)return gi;ap=1,Object.defineProperty(gi,"__esModule",{value:!0}),gi.TypeTransformer=void 0;var e=ln(),g=_e(),O=g.internal.objectUtil,d=(function(){function n(t){this._transformers=t,this._transformersPerSignature=new Map(t.map(function(r){return[r.signature,r]})),this.fromStructure=this.fromStructure.bind(this),this.toStructure=this.toStructure.bind(this),Object.freeze(this)}return n.prototype.fromStructure=function(t){try{if(t instanceof e.structure.Structure&&this._transformersPerSignature.has(t.signature)){var r=this._transformersPerSignature.get(t.signature).fromStructure;return r(t)}return t}catch(i){return O.createBrokenObject(i)}},n.prototype.toStructure=function(t){var r=this._transformers.find(function(i){var c=i.isTypeInstance;return c(t)});return r!==void 0?r.toStructure(t):t},n})();gi.default=d;var o=(function(){function n(t){var r=t.signature,i=t.fromStructure,c=t.toStructure,l=t.isTypeInstance;this.signature=r,this.isTypeInstance=l,this.fromStructure=i,this.toStructure=c,Object.freeze(this)}return n.prototype.extendsWith=function(t){var r=t.signature,i=t.fromStructure,c=t.toStructure,l=t.isTypeInstance;return new n({signature:r||this.signature,fromStructure:i||this.fromStructure,toStructure:c||this.toStructure,isTypeInstance:l||this.isTypeInstance})},n})();return gi.TypeTransformer=o,gi}var up;function xm(){if(up)return mi;up=1;var e=mi&&mi.__read||function(v,y){var s=typeof Symbol=="function"&&v[Symbol.iterator];if(!s)return v;var f=s.call(v),b,E=[],w;try{for(;(y===void 0||y-- >0)&&!(b=f.next()).done;)E.push(b.value)}catch(T){w={error:T}}finally{try{b&&!b.done&&(s=f.return)&&s.call(f)}finally{if(w)throw w.error}}return E};Object.defineProperty(mi,"__esModule",{value:!0});var g=_e(),O=ln(),d=qe(),o=g.error.PROTOCOL_ERROR,n=78,t=3,r=82,i=5,c=114,l=3,a=80,_=3;function p(){return new d.TypeTransformer({signature:n,isTypeInstance:function(v){return v instanceof g.Node},toStructure:function(v){throw(0,g.newError)("It is not allowed to pass nodes in query parameters, given: ".concat(v),o)},fromStructure:function(v){O.structure.verifyStructSize("Node",t,v.size);var y=e(v.fields,3),s=y[0],f=y[1],b=y[2];return new g.Node(s,f,b)}})}function m(){return new d.TypeTransformer({signature:r,isTypeInstance:function(v){return v instanceof g.Relationship},toStructure:function(v){throw(0,g.newError)("It is not allowed to pass relationships in query parameters, given: ".concat(v),o)},fromStructure:function(v){O.structure.verifyStructSize("Relationship",i,v.size);var y=e(v.fields,5),s=y[0],f=y[1],b=y[2],E=y[3],w=y[4];return new g.Relationship(s,f,b,E,w)}})}function h(){return new d.TypeTransformer({signature:c,isTypeInstance:function(v){return v instanceof g.UnboundRelationship},toStructure:function(v){throw(0,g.newError)("It is not allowed to pass unbound relationships in query parameters, given: ".concat(v),o)},fromStructure:function(v){O.structure.verifyStructSize("UnboundRelationship",l,v.size);var y=e(v.fields,3),s=y[0],f=y[1],b=y[2];return new g.UnboundRelationship(s,f,b)}})}function u(){return new d.TypeTransformer({signature:a,isTypeInstance:function(v){return v instanceof g.Path},toStructure:function(v){throw(0,g.newError)("It is not allowed to pass paths in query parameters, given: ".concat(v),o)},fromStructure:function(v){O.structure.verifyStructSize("Path",_,v.size);for(var y=e(v.fields,3),s=y[0],f=y[1],b=y[2],E=[],w=s[0],T=0;T<b.length;T+=2){var R=s[b[T+1]],L=(0,g.toNumber)(b[T]),j=void 0;L>0?(j=f[L-1],j instanceof g.UnboundRelationship&&(f[L-1]=j=j.bindTo(w,R))):(j=f[-L-1],j instanceof g.UnboundRelationship&&(f[-L-1]=j=j.bindTo(R,w))),E.push(new g.PathSegment(w,j,R)),w=R}return new g.Path(s[0],s[s.length-1],E)}})}return mi.default={createNodeTransformer:p,createRelationshipTransformer:m,createUnboundRelationshipTransformer:h,createPathTransformer:u},mi}var cp;function Wm(){if(cp)return ir;cp=1;var e=ir&&ir.__assign||function(){return e=Object.assign||function(s){for(var f,b=1,E=arguments.length;b<E;b++){f=arguments[b];for(var w in f)Object.prototype.hasOwnProperty.call(f,w)&&(s[w]=f[w])}return s},e.apply(this,arguments)},g=ir&&ir.__createBinding||(Object.create?(function(s,f,b,E){E===void 0&&(E=b);var w=Object.getOwnPropertyDescriptor(f,b);(!w||("get"in w?!f.__esModule:w.writable||w.configurable))&&(w={enumerable:!0,get:function(){return f[b]}}),Object.defineProperty(s,E,w)}):(function(s,f,b,E){E===void 0&&(E=b),s[E]=f[b]})),O=ir&&ir.__setModuleDefault||(Object.create?(function(s,f){Object.defineProperty(s,"default",{enumerable:!0,value:f})}):function(s,f){s.default=f}),d=ir&&ir.__importStar||(function(){var s=function(f){return s=Object.getOwnPropertyNames||function(b){var E=[];for(var w in b)Object.prototype.hasOwnProperty.call(b,w)&&(E[E.length]=w);return E},s(f)};return function(f){if(f&&f.__esModule)return f;var b={};if(f!=null)for(var E=s(f),w=0;w<E.length;w++)E[w]!=="default"&&g(b,f,E[w]);return O(b,f),b}})(),o=ir&&ir.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(ir,"__esModule",{value:!0});var n=sn();cn();var t=ln(),r=d(fr()),i=er(),c=_e(),l=o(xm()),a=o(qe()),_=c.internal.bookmarks.Bookmarks,p=c.internal.constants,m=p.ACCESS_MODE_WRITE,h=p.BOLT_PROTOCOL_V1;c.internal.logger.Logger;var u=c.internal.txConfig.TxConfig,v=Object.freeze({OPERATION:"",OPERATION_CODE:"0",CURRENT_SCHEMA:"/"}),y=(function(){function s(f,b,E,w,T,R){var L=E===void 0?{}:E,j=L.disableLosslessIntegers,M=L.useBigInt;w===void 0&&(w=function(){return null}),this._server=f||{},this._chunker=b,this._packer=this._createPacker(b),this._unpacker=this._createUnpacker(j,M),this._responseHandler=w(this),this._log=T,this._onProtocolError=R,this._fatalError=null,this._lastMessageSignature=null,this._config={disableLosslessIntegers:j,useBigInt:M}}return Object.defineProperty(s.prototype,"transformer",{get:function(){var f=this;return this._transformer===void 0&&(this._transformer=new a.default(Object.values(l.default).map(function(b){return b(f._config,f._log)}))),this._transformer},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"version",{get:function(){return h},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"supportsReAuth",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"initialized",{get:function(){return!!this._initialized},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"authToken",{get:function(){return this._authToken},enumerable:!1,configurable:!0}),s.prototype.packer=function(){return this._packer},s.prototype.packable=function(f){return this._packer.packable(f,this.transformer.toStructure)},s.prototype.unpacker=function(){return this._unpacker},s.prototype.unpack=function(f){return this._unpacker.unpack(f,this.transformer.fromStructure)},s.prototype.transformMetadata=function(f){return f},s.prototype.enrichErrorMetadata=function(f){return e(e({},f),{diagnostic_record:f.diagnostic_record!==null?e(e({},v),f.diagnostic_record):null})},s.prototype.initialize=function(f){var b=this,E=f===void 0?{}:f,w=E.userAgent;E.boltAgent;var T=E.authToken,R=E.notificationFilter,L=E.onError,j=E.onComplete,M=new i.LoginObserver({onError:function(x){return b._onLoginError(x,L)},onCompleted:function(x){return b._onLoginCompleted(x,j)}});return(0,n.assertNotificationFilterIsEmpty)(R,this._onProtocolError,M),this.write(r.default.init(w,T),M,!0),M},s.prototype.logoff=function(f){var b=f===void 0?{}:f,E=b.onComplete,w=b.onError;b.flush;var T=new i.LogoffObserver({onCompleted:E,onError:w}),R=(0,c.newError)("Driver is connected to a database that does not support logoff. Please upgrade to Neo4j 5.5.0 or later in order to use this functionality.");throw this._onProtocolError(R.message),T.onError(R),R},s.prototype.logon=function(f){var b=this,E=f===void 0?{}:f,w=E.authToken,T=E.onComplete,R=E.onError;E.flush;var L=new i.LoginObserver({onCompleted:function(){return b._onLoginCompleted({},w,T)},onError:function(M){return b._onLoginError(M,R)}}),j=(0,c.newError)("Driver is connected to a database that does not support logon. Please upgrade to Neo4j 5.5.0 or later in order to use this functionality.");throw this._onProtocolError(j.message),L.onError(j),j},s.prototype.prepareToClose=function(){},s.prototype.beginTransaction=function(f){var b=f===void 0?{}:f,E=b.bookmarks,w=b.txConfig,T=b.database,R=b.mode,L=b.impersonatedUser,j=b.notificationFilter,M=b.beforeError,x=b.afterError,Z=b.beforeComplete,H=b.afterComplete;return this.run("BEGIN",E?E.asBeginTransactionParameters():{},{bookmarks:E,txConfig:w,database:T,mode:R,impersonatedUser:L,notificationFilter:j,beforeError:M,afterError:x,beforeComplete:Z,afterComplete:H,flush:!1})},s.prototype.commitTransaction=function(f){var b=f===void 0?{}:f,E=b.beforeError,w=b.afterError,T=b.beforeComplete,R=b.afterComplete;return this.run("COMMIT",{},{bookmarks:_.empty(),txConfig:u.empty(),mode:m,beforeError:E,afterError:w,beforeComplete:T,afterComplete:R})},s.prototype.rollbackTransaction=function(f){var b=f===void 0?{}:f,E=b.beforeError,w=b.afterError,T=b.beforeComplete,R=b.afterComplete;return this.run("ROLLBACK",{},{bookmarks:_.empty(),txConfig:u.empty(),mode:m,beforeError:E,afterError:w,beforeComplete:T,afterComplete:R})},s.prototype.run=function(f,b,E){var w=E===void 0?{}:E;w.bookmarks;var T=w.txConfig,R=w.database;w.mode;var L=w.impersonatedUser,j=w.notificationFilter,M=w.beforeKeys,x=w.afterKeys,Z=w.beforeError,H=w.afterError,K=w.beforeComplete,G=w.afterComplete,$=w.flush,A=$===void 0?!0:$,q=w.highRecordWatermark,U=q===void 0?Number.MAX_VALUE:q,Q=w.lowRecordWatermark,te=Q===void 0?Number.MAX_VALUE:Q,z=new i.ResultStreamObserver({server:this._server,beforeKeys:M,afterKeys:x,beforeError:Z,afterError:H,beforeComplete:K,afterComplete:G,highRecordWatermark:U,lowRecordWatermark:te});return(0,n.assertTxConfigIsEmpty)(T,this._onProtocolError,z),(0,n.assertDatabaseIsEmpty)(R,this._onProtocolError,z),(0,n.assertImpersonatedUserIsEmpty)(L,this._onProtocolError,z),(0,n.assertNotificationFilterIsEmpty)(j,this._onProtocolError,z),this.write(r.default.run(f,b),z,!1),this.write(r.default.pullAll(),z,A),z},Object.defineProperty(s.prototype,"currentFailure",{get:function(){return this._responseHandler.currentFailure},enumerable:!1,configurable:!0}),s.prototype.reset=function(f){var b=f===void 0?{}:f,E=b.onError,w=b.onComplete,T=new i.ResetObserver({onProtocolError:this._onProtocolError,onError:E,onComplete:w});return this.write(r.default.reset(),T,!0),T},s.prototype.telemetry=function(f,b){f.api;var E=b===void 0?{}:b;E.onError;var w=E.onCompleted,T=new i.CompletedObserver;return w&&w(),T},s.prototype._createPacker=function(f){return new t.v1.Packer(f)},s.prototype._createUnpacker=function(f,b){return new t.v1.Unpacker(f,b)},s.prototype.write=function(f,b,E){var w=this.queueObserverIfProtocolIsNotBroken(b);if(w){this._log.isDebugEnabled()&&this._log.debug("C: ".concat(f)),this._lastMessageSignature=f.signature;var T=new t.structure.Structure(f.signature,f.fields);this.packable(T)(),this._chunker.messageBoundary(),E&&this._chunker.flush()}},s.prototype.isLastMessageLogon=function(){return this._lastMessageSignature===r.SIGNATURES.HELLO||this._lastMessageSignature===r.SIGNATURES.LOGON},s.prototype.isLastMessageReset=function(){return this._lastMessageSignature===r.SIGNATURES.RESET},s.prototype.notifyFatalError=function(f){return this._fatalError=f,this._responseHandler._notifyErrorToObservers(f)},s.prototype.updateCurrentObserver=function(){return this._responseHandler._updateCurrentObserver()},s.prototype.hasOngoingObservableRequests=function(){return this._responseHandler.hasOngoingObservableRequests()},s.prototype.queueObserverIfProtocolIsNotBroken=function(f){return this.isBroken()?(this.notifyFatalErrorToObserver(f),!1):this._responseHandler._queueObserver(f)},s.prototype.isBroken=function(){return!!this._fatalError},s.prototype.notifyFatalErrorToObserver=function(f){f&&f.onError&&f.onError(this._fatalError)},s.prototype.resetFailure=function(){this._responseHandler._resetFailure()},s.prototype._onLoginCompleted=function(f,b,E){if(this._initialized=!0,this._authToken=b,f){var w=f.server;this._server.version||(this._server.version=w)}E&&E(f)},s.prototype._onLoginError=function(f,b){this._onProtocolError(f.message),b&&b(f)},s})();return ir.default=y,ir}var At={},kr={},Oi={},sp;function Vm(){if(sp)return Oi;sp=1,Object.defineProperty(Oi,"__esModule",{value:!0}),Oi.epochDayToDate=l,Oi.nanoOfDayToLocalTime=a,Oi.epochSecondAndNanoToLocalDateTime=_;var e=_e(),g=e.internal.temporalUtil,O=g.DAYS_0000_TO_1970,d=g.DAYS_PER_400_YEAR_CYCLE,o=g.NANOS_PER_HOUR,n=g.NANOS_PER_MINUTE,t=g.NANOS_PER_SECOND,r=g.SECONDS_PER_DAY,i=g.floorDiv,c=g.floorMod;function l(p){p=(0,e.int)(p);var m=p.add(O).subtract(60),h=(0,e.int)(0);if(m.lessThan(0)){var u=m.add(1).div(d).subtract(1);h=u.multiply(400),m=m.add(u.multiply(-d))}var v=m.multiply(400).add(591).div(d),y=m.subtract(v.multiply(365).add(v.div(4)).subtract(v.div(100)).add(v.div(400)));y.lessThan(0)&&(v=v.subtract(1),y=m.subtract(v.multiply(365).add(v.div(4)).subtract(v.div(100)).add(v.div(400)))),v=v.add(h);var s=y,f=s.multiply(5).add(2).div(153),b=f.add(2).modulo(12).add(1),E=s.subtract(f.multiply(306).add(5).div(10)).add(1);return v=v.add(f.div(10)),new e.Date(v,b,E)}function a(p){p=(0,e.int)(p);var m=p.div(o);p=p.subtract(m.multiply(o));var h=p.div(n);p=p.subtract(h.multiply(n));var u=p.div(t),v=p.subtract(u.multiply(t));return new e.LocalTime(m,h,u,v)}function _(p,m){var h=i(p,r),u=c(p,r),v=u.multiply(t).add(m),y=l(h),s=a(v);return new e.LocalDateTime(y.year,y.month,y.day,s.hour,s.minute,s.second,s.nanosecond)}return Oi}var lp;function Hm(){if(lp)return kr;lp=1;var e=kr&&kr.__assign||function(){return e=Object.assign||function(z){for(var re,ce=1,ae=arguments.length;ce<ae;ce++){re=arguments[ce];for(var k in re)Object.prototype.hasOwnProperty.call(re,k)&&(z[k]=re[k])}return z},e.apply(this,arguments)},g=kr&&kr.__read||function(z,re){var ce=typeof Symbol=="function"&&z[Symbol.iterator];if(!ce)return z;var ae=ce.call(z),k,W=[],F;try{for(;(re===void 0||re-- >0)&&!(k=ae.next()).done;)W.push(k.value)}catch(Y){F={error:Y}}finally{try{k&&!k.done&&(ce=ae.return)&&ce.call(ae)}finally{if(F)throw F.error}}return W},O=kr&&kr.__importDefault||function(z){return z&&z.__esModule?z:{default:z}};Object.defineProperty(kr,"__esModule",{value:!0});var d=_e(),o=ln(),n=qe(),t=Vm(),r=O(xm()),i=d.internal.temporalUtil,c=i.dateToEpochDay,l=i.localDateTimeToEpochSecond,a=i.localTimeToNanoOfDay,_=88,p=3,m=89,h=4,u=69,v=4,y=116,s=1,f=84,b=2,E=68,w=1,T=100,R=2,L=70,j=3,M=102,x=3;function Z(){return new n.TypeTransformer({signature:_,isTypeInstance:function(z){return(0,d.isPoint)(z)&&(z.z===null||z.z===void 0)},toStructure:function(z){return new o.structure.Structure(_,[(0,d.int)(z.srid),z.x,z.y])},fromStructure:function(z){o.structure.verifyStructSize("Point2D",p,z.size);var re=g(z.fields,3),ce=re[0],ae=re[1],k=re[2];return new d.Point(ce,ae,k,void 0)}})}function H(){return new n.TypeTransformer({signature:m,isTypeInstance:function(z){return(0,d.isPoint)(z)&&z.z!==null&&z.z!==void 0},toStructure:function(z){return new o.structure.Structure(m,[(0,d.int)(z.srid),z.x,z.y,z.z])},fromStructure:function(z){o.structure.verifyStructSize("Point3D",h,z.size);var re=g(z.fields,4),ce=re[0],ae=re[1],k=re[2],W=re[3];return new d.Point(ce,ae,k,W)}})}function K(){return new n.TypeTransformer({signature:u,isTypeInstance:d.isDuration,toStructure:function(z){var re=(0,d.int)(z.months),ce=(0,d.int)(z.days),ae=(0,d.int)(z.seconds),k=(0,d.int)(z.nanoseconds);return new o.structure.Structure(u,[re,ce,ae,k])},fromStructure:function(z){o.structure.verifyStructSize("Duration",v,z.size);var re=g(z.fields,4),ce=re[0],ae=re[1],k=re[2],W=re[3];return new d.Duration(ce,ae,k,W)}})}function G(z){var re=z.disableLosslessIntegers,ce=z.useBigInt;return new n.TypeTransformer({signature:y,isTypeInstance:d.isLocalTime,toStructure:function(ae){var k=a(ae.hour,ae.minute,ae.second,ae.nanosecond);return new o.structure.Structure(y,[k])},fromStructure:function(ae){o.structure.verifyStructSize("LocalTime",s,ae.size);var k=g(ae.fields,1),W=k[0],F=(0,t.nanoOfDayToLocalTime)(W);return te(F,re,ce)}})}function $(z){var re=z.disableLosslessIntegers,ce=z.useBigInt;return new n.TypeTransformer({signature:f,isTypeInstance:d.isTime,toStructure:function(ae){var k=a(ae.hour,ae.minute,ae.second,ae.nanosecond),W=(0,d.int)(ae.timeZoneOffsetSeconds);return new o.structure.Structure(f,[k,W])},fromStructure:function(ae){o.structure.verifyStructSize("Time",b,ae.size);var k=g(ae.fields,2),W=k[0],F=k[1],Y=(0,t.nanoOfDayToLocalTime)(W),X=new d.Time(Y.hour,Y.minute,Y.second,Y.nanosecond,F);return te(X,re,ce)}})}function A(z){var re=z.disableLosslessIntegers,ce=z.useBigInt;return new n.TypeTransformer({signature:E,isTypeInstance:d.isDate,toStructure:function(ae){var k=c(ae.year,ae.month,ae.day);return new o.structure.Structure(E,[k])},fromStructure:function(ae){o.structure.verifyStructSize("Date",w,ae.size);var k=g(ae.fields,1),W=k[0],F=(0,t.epochDayToDate)(W);return te(F,re,ce)}})}function q(z){var re=z.disableLosslessIntegers,ce=z.useBigInt;return new n.TypeTransformer({signature:T,isTypeInstance:d.isLocalDateTime,toStructure:function(ae){var k=l(ae.year,ae.month,ae.day,ae.hour,ae.minute,ae.second,ae.nanosecond),W=(0,d.int)(ae.nanosecond);return new o.structure.Structure(T,[k,W])},fromStructure:function(ae){o.structure.verifyStructSize("LocalDateTime",R,ae.size);var k=g(ae.fields,2),W=k[0],F=k[1],Y=(0,t.epochSecondAndNanoToLocalDateTime)(W,F);return te(Y,re,ce)}})}function U(z){var re=z.disableLosslessIntegers,ce=z.useBigInt;return new n.TypeTransformer({signature:M,isTypeInstance:function(ae){return(0,d.isDateTime)(ae)&&ae.timeZoneId!=null},toStructure:function(ae){var k=l(ae.year,ae.month,ae.day,ae.hour,ae.minute,ae.second,ae.nanosecond),W=(0,d.int)(ae.nanosecond),F=ae.timeZoneId;return new o.structure.Structure(M,[k,W,F])},fromStructure:function(ae){o.structure.verifyStructSize("DateTimeWithZoneId",x,ae.size);var k=g(ae.fields,3),W=k[0],F=k[1],Y=k[2],X=(0,t.epochSecondAndNanoToLocalDateTime)(W,F),ne=new d.DateTime(X.year,X.month,X.day,X.hour,X.minute,X.second,X.nanosecond,null,Y);return te(ne,re,ce)}})}function Q(z){var re=z.disableLosslessIntegers,ce=z.useBigInt;return new n.TypeTransformer({signature:L,isTypeInstance:function(ae){return(0,d.isDateTime)(ae)&&ae.timeZoneId==null},toStructure:function(ae){var k=l(ae.year,ae.month,ae.day,ae.hour,ae.minute,ae.second,ae.nanosecond),W=(0,d.int)(ae.nanosecond),F=(0,d.int)(ae.timeZoneOffsetSeconds);return new o.structure.Structure(L,[k,W,F])},fromStructure:function(ae){o.structure.verifyStructSize("DateTimeWithZoneOffset",j,ae.size);var k=g(ae.fields,3),W=k[0],F=k[1],Y=k[2],X=(0,t.epochSecondAndNanoToLocalDateTime)(W,F),ne=new d.DateTime(X.year,X.month,X.day,X.hour,X.minute,X.second,X.nanosecond,Y,null);return te(ne,re,ce)}})}function te(z,re,ce){if(!re&&!ce)return z;var ae=function(Y){return ce?Y.toBigInt():Y.toNumberOrInfinity()},k=Object.create(Object.getPrototypeOf(z));for(var W in z)if(Object.prototype.hasOwnProperty.call(z,W)===!0){var F=z[W];k[W]=(0,d.isInt)(F)?ae(F):F}return Object.freeze(k),k}return kr.default=e(e({},r.default),{createPoint2DTransformer:Z,createPoint3DTransformer:H,createDurationTransformer:K,createLocalTimeTransformer:G,createTimeTransformer:$,createDateTransformer:A,createLocalDateTimeTransformer:q,createDateTimeWithZoneIdTransformer:U,createDateTimeWithOffsetTransformer:Q}),kr}var fp;function zm(){if(fp)return At;fp=1;var e=At&&At.__extends||(function(){var c=function(l,a){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_,p){_.__proto__=p}||function(_,p){for(var m in p)Object.prototype.hasOwnProperty.call(p,m)&&(_[m]=p[m])},c(l,a)};return function(l,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");c(l,a);function _(){this.constructor=l}l.prototype=a===null?Object.create(a):(_.prototype=a.prototype,new _)}})(),g=At&&At.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(At,"__esModule",{value:!0});var O=g(Wm()),d=g(ln()),o=_e(),n=g(Hm()),t=g(qe()),r=o.internal.constants.BOLT_PROTOCOL_V2,i=(function(c){e(l,c);function l(){return c!==null&&c.apply(this,arguments)||this}return l.prototype._createPacker=function(a){return new d.default.Packer(a)},l.prototype._createUnpacker=function(a,_){return new d.default.Unpacker(a,_)},Object.defineProperty(l.prototype,"transformer",{get:function(){var a=this;return this._transformer===void 0&&(this._transformer=new t.default(Object.values(n.default).map(function(_){return _(a._config,a._log)}))),this._transformer},enumerable:!1,configurable:!0}),Object.defineProperty(l.prototype,"version",{get:function(){return r},enumerable:!1,configurable:!0}),l})(O.default);return At.default=i,At}var Lr={},jt={},dp;function $m(){if(dp)return jt;dp=1;var e=jt&&jt.__assign||function(){return e=Object.assign||function(d){for(var o,n=1,t=arguments.length;n<t;n++){o=arguments[n];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(d[r]=o[r])}return d},e.apply(this,arguments)},g=jt&&jt.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(jt,"__esModule",{value:!0});var O=g(Hm());return jt.default=e({},O.default),jt}var hp;function Gm(){if(hp)return Lr;hp=1;var e=Lr&&Lr.__extends||(function(){var u=function(v,y){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,f){s.__proto__=f}||function(s,f){for(var b in f)Object.prototype.hasOwnProperty.call(f,b)&&(s[b]=f[b])},u(v,y)};return function(v,y){if(typeof y!="function"&&y!==null)throw new TypeError("Class extends value "+String(y)+" is not a constructor or null");u(v,y);function s(){this.constructor=v}v.prototype=y===null?Object.create(y):(s.prototype=y.prototype,new s)}})(),g=Lr&&Lr.__assign||function(){return g=Object.assign||function(u){for(var v,y=1,s=arguments.length;y<s;y++){v=arguments[y];for(var f in v)Object.prototype.hasOwnProperty.call(v,f)&&(u[f]=v[f])}return u},g.apply(this,arguments)},O=Lr&&Lr.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(Lr,"__esModule",{value:!0});var d=O(zm()),o=O(fr()),n=sn(),t=er(),r=O($m()),i=O(qe()),c=_e();c.internal.bookmarks.Bookmarks;var l=c.internal.constants.BOLT_PROTOCOL_V3,a=c.internal.txConfig.TxConfig,_="context",p="CALL dbms.cluster.routing.getRoutingTable($".concat(_,")"),m=new t.StreamObserver,h=(function(u){e(v,u);function v(){return u!==null&&u.apply(this,arguments)||this}return Object.defineProperty(v.prototype,"version",{get:function(){return l},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"transformer",{get:function(){var y=this;return this._transformer===void 0&&(this._transformer=new i.default(Object.values(r.default).map(function(s){return s(y._config,y._log)}))),this._transformer},enumerable:!1,configurable:!0}),v.prototype.transformMetadata=function(y){return"t_first"in y&&(y.result_available_after=y.t_first,delete y.t_first),"t_last"in y&&(y.result_consumed_after=y.t_last,delete y.t_last),y},v.prototype.initialize=function(y){var s=this,f=y===void 0?{}:y,b=f.userAgent;f.boltAgent;var E=f.authToken,w=f.notificationFilter,T=f.onError,R=f.onComplete,L=new t.LoginObserver({onError:function(j){return s._onLoginError(j,T)},onCompleted:function(j){return s._onLoginCompleted(j,E,R)}});return(0,n.assertNotificationFilterIsEmpty)(w,this._onProtocolError,L),this.write(o.default.hello(b,E),L,!0),L},v.prototype.prepareToClose=function(){this.write(o.default.goodbye(),m,!0)},v.prototype.beginTransaction=function(y){var s=y===void 0?{}:y,f=s.bookmarks,b=s.txConfig,E=s.database,w=s.impersonatedUser,T=s.notificationFilter,R=s.mode,L=s.beforeError,j=s.afterError,M=s.beforeComplete,x=s.afterComplete,Z=new t.ResultStreamObserver({server:this._server,beforeError:L,afterError:j,beforeComplete:M,afterComplete:x});return Z.prepareToHandleSingleResponse(),(0,n.assertDatabaseIsEmpty)(E,this._onProtocolError,Z),(0,n.assertImpersonatedUserIsEmpty)(w,this._onProtocolError,Z),(0,n.assertNotificationFilterIsEmpty)(T,this._onProtocolError,Z),this.write(o.default.begin({bookmarks:f,txConfig:b,mode:R}),Z,!0),Z},v.prototype.commitTransaction=function(y){var s=y===void 0?{}:y,f=s.beforeError,b=s.afterError,E=s.beforeComplete,w=s.afterComplete,T=new t.ResultStreamObserver({server:this._server,beforeError:f,afterError:b,beforeComplete:E,afterComplete:w});return T.prepareToHandleSingleResponse(),this.write(o.default.commit(),T,!0),T},v.prototype.rollbackTransaction=function(y){var s=y===void 0?{}:y,f=s.beforeError,b=s.afterError,E=s.beforeComplete,w=s.afterComplete,T=new t.ResultStreamObserver({server:this._server,beforeError:f,afterError:b,beforeComplete:E,afterComplete:w});return T.prepareToHandleSingleResponse(),this.write(o.default.rollback(),T,!0),T},v.prototype.run=function(y,s,f){var b=f===void 0?{}:f,E=b.bookmarks,w=b.txConfig,T=b.database,R=b.impersonatedUser,L=b.notificationFilter,j=b.mode,M=b.beforeKeys,x=b.afterKeys,Z=b.beforeError,H=b.afterError,K=b.beforeComplete,G=b.afterComplete,$=b.flush,A=$===void 0?!0:$,q=b.highRecordWatermark,U=q===void 0?Number.MAX_VALUE:q,Q=b.lowRecordWatermark,te=Q===void 0?Number.MAX_VALUE:Q,z=new t.ResultStreamObserver({server:this._server,beforeKeys:M,afterKeys:x,beforeError:Z,afterError:H,beforeComplete:K,afterComplete:G,highRecordWatermark:U,lowRecordWatermark:te});return(0,n.assertDatabaseIsEmpty)(T,this._onProtocolError,z),(0,n.assertImpersonatedUserIsEmpty)(R,this._onProtocolError,z),(0,n.assertNotificationFilterIsEmpty)(L,this._onProtocolError,z),this.write(o.default.runWithMetadata(y,s,{bookmarks:E,txConfig:w,mode:j}),z,!1),this.write(o.default.pullAll(),z,A),z},v.prototype.requestRoutingInformation=function(y){var s,f=y.routingContext,b=f===void 0?{}:f,E=y.sessionContext,w=E===void 0?{}:E,T=y.onError,R=y.onCompleted,L=this.run(p,(s={},s[_]=b,s),g(g({},w),{txConfig:a.empty()}));return new t.ProcedureRouteObserver({resultObserver:L,onProtocolError:this._onProtocolError,onError:T,onCompleted:R})},v})(d.default);return Lr.default=h,Lr}var Dr={},Mt={},vp;function Ym(){if(vp)return Mt;vp=1;var e=Mt&&Mt.__assign||function(){return e=Object.assign||function(d){for(var o,n=1,t=arguments.length;n<t;n++){o=arguments[n];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(d[r]=o[r])}return d},e.apply(this,arguments)},g=Mt&&Mt.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(Mt,"__esModule",{value:!0});var O=g($m());return Mt.default=e({},O.default),Mt}var _p;function Km(){if(_p)return Dr;_p=1;var e=Dr&&Dr.__extends||(function(){var y=function(s,f){return y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,E){b.__proto__=E}||function(b,E){for(var w in E)Object.prototype.hasOwnProperty.call(E,w)&&(b[w]=E[w])},y(s,f)};return function(s,f){if(typeof f!="function"&&f!==null)throw new TypeError("Class extends value "+String(f)+" is not a constructor or null");y(s,f);function b(){this.constructor=s}s.prototype=f===null?Object.create(f):(b.prototype=f.prototype,new b)}})(),g=Dr&&Dr.__assign||function(){return g=Object.assign||function(y){for(var s,f=1,b=arguments.length;f<b;f++){s=arguments[f];for(var E in s)Object.prototype.hasOwnProperty.call(s,E)&&(y[E]=s[E])}return y},g.apply(this,arguments)},O=Dr&&Dr.__importDefault||function(y){return y&&y.__esModule?y:{default:y}};Object.defineProperty(Dr,"__esModule",{value:!0});var d=O(Gm()),o=O(fr()),n=sn(),t=er(),r=O(Ym()),i=O(qe()),c=_e();c.internal.bookmarks.Bookmarks;var l=c.internal.constants,a=l.BOLT_PROTOCOL_V4_0,_=l.FETCH_ALL,p=c.internal.txConfig.TxConfig,m="context",h="database",u="CALL dbms.routing.getRoutingTable($".concat(m,", $").concat(h,")"),v=(function(y){e(s,y);function s(){return y!==null&&y.apply(this,arguments)||this}return Object.defineProperty(s.prototype,"version",{get:function(){return a},enumerable:!1,configurable:!0}),Object.defineProperty(s.prototype,"transformer",{get:function(){var f=this;return this._transformer===void 0&&(this._transformer=new i.default(Object.values(r.default).map(function(b){return b(f._config,f._log)}))),this._transformer},enumerable:!1,configurable:!0}),s.prototype.beginTransaction=function(f){var b=f===void 0?{}:f,E=b.bookmarks,w=b.txConfig,T=b.database,R=b.impersonatedUser,L=b.notificationFilter,j=b.mode,M=b.beforeError,x=b.afterError,Z=b.beforeComplete,H=b.afterComplete,K=new t.ResultStreamObserver({server:this._server,beforeError:M,afterError:x,beforeComplete:Z,afterComplete:H});return K.prepareToHandleSingleResponse(),(0,n.assertImpersonatedUserIsEmpty)(R,this._onProtocolError,K),(0,n.assertNotificationFilterIsEmpty)(L,this._onProtocolError,K),this.write(o.default.begin({bookmarks:E,txConfig:w,database:T,mode:j}),K,!0),K},s.prototype.run=function(f,b,E){var w=E===void 0?{}:E,T=w.bookmarks,R=w.txConfig,L=w.database,j=w.impersonatedUser,M=w.notificationFilter,x=w.mode,Z=w.beforeKeys,H=w.afterKeys,K=w.beforeError,G=w.afterError,$=w.beforeComplete,A=w.afterComplete,q=w.flush,U=q===void 0?!0:q,Q=w.reactive,te=Q===void 0?!1:Q,z=w.fetchSize,re=z===void 0?_:z,ce=w.highRecordWatermark,ae=ce===void 0?Number.MAX_VALUE:ce,k=w.lowRecordWatermark,W=k===void 0?Number.MAX_VALUE:k,F=new t.ResultStreamObserver({server:this._server,reactive:te,fetchSize:re,moreFunction:this._requestMore.bind(this),discardFunction:this._requestDiscard.bind(this),beforeKeys:Z,afterKeys:H,beforeError:K,afterError:G,beforeComplete:$,afterComplete:A,highRecordWatermark:ae,lowRecordWatermark:W});(0,n.assertImpersonatedUserIsEmpty)(j,this._onProtocolError,F),(0,n.assertNotificationFilterIsEmpty)(M,this._onProtocolError,F);var Y=te;return this.write(o.default.runWithMetadata(f,b,{bookmarks:T,txConfig:R,database:L,mode:x}),F,Y&&U),te||this.write(o.default.pull({n:re}),F,U),F},s.prototype._requestMore=function(f,b,E){this.write(o.default.pull({stmtId:f,n:b}),E,!0)},s.prototype._requestDiscard=function(f,b){this.write(o.default.discard({stmtId:f}),b,!0)},s.prototype._noOp=function(){},s.prototype.requestRoutingInformation=function(f){var b,E=f.routingContext,w=E===void 0?{}:E,T=f.databaseName,R=T===void 0?null:T,L=f.sessionContext,j=L===void 0?{}:L,M=f.onError,x=f.onCompleted,Z=this.run(u,(b={},b[m]=w,b[h]=R,b),g(g({},j),{txConfig:p.empty()}));return new t.ProcedureRouteObserver({resultObserver:Z,onProtocolError:this._onProtocolError,onError:M,onCompleted:x})},s})(d.default);return Dr.default=v,Dr}var Nt={},kt={},pp;function Zm(){if(pp)return kt;pp=1;var e=kt&&kt.__assign||function(){return e=Object.assign||function(d){for(var o,n=1,t=arguments.length;n<t;n++){o=arguments[n];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(d[r]=o[r])}return d},e.apply(this,arguments)},g=kt&&kt.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(kt,"__esModule",{value:!0});var O=g(Ym());return kt.default=e({},O.default),kt}var yp;function Qm(){if(yp)return Nt;yp=1;var e=Nt&&Nt.__extends||(function(){var a=function(_,p){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,h){m.__proto__=h}||function(m,h){for(var u in h)Object.prototype.hasOwnProperty.call(h,u)&&(m[u]=h[u])},a(_,p)};return function(_,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");a(_,p);function m(){this.constructor=_}_.prototype=p===null?Object.create(p):(m.prototype=p.prototype,new m)}})(),g=Nt&&Nt.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(Nt,"__esModule",{value:!0});var O=g(Km()),d=g(fr()),o=er(),n=_e(),t=sn(),r=g(Zm()),i=g(qe()),c=n.internal.constants.BOLT_PROTOCOL_V4_1,l=(function(a){e(_,a);function _(p,m,h,u,v,y,s){u===void 0&&(u=function(){return null});var f=a.call(this,p,m,h,u,v,y)||this;return f._serversideRouting=s,f}return Object.defineProperty(_.prototype,"version",{get:function(){return c},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"transformer",{get:function(){var p=this;return this._transformer===void 0&&(this._transformer=new i.default(Object.values(r.default).map(function(m){return m(p._config,p._log)}))),this._transformer},enumerable:!1,configurable:!0}),_.prototype.initialize=function(p){var m=this,h=p===void 0?{}:p,u=h.userAgent;h.boltAgent;var v=h.authToken,y=h.notificationFilter,s=h.onError,f=h.onComplete,b=new o.LoginObserver({onError:function(E){return m._onLoginError(E,s)},onCompleted:function(E){return m._onLoginCompleted(E,v,f)}});return(0,t.assertNotificationFilterIsEmpty)(y,this._onProtocolError,b),this.write(d.default.hello(u,v,this._serversideRouting),b,!0),b},_})(O.default);return Nt.default=l,Nt}var Lt={},Dt={},bp;function Xm(){if(bp)return Dt;bp=1;var e=Dt&&Dt.__assign||function(){return e=Object.assign||function(d){for(var o,n=1,t=arguments.length;n<t;n++){o=arguments[n];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(d[r]=o[r])}return d},e.apply(this,arguments)},g=Dt&&Dt.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(Dt,"__esModule",{value:!0});var O=g(Zm());return Dt.default=e({},O.default),Dt}var mp;function Jm(){if(mp)return Lt;mp=1;var e=Lt&&Lt.__extends||(function(){var i=function(c,l){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,_){a.__proto__=_}||function(a,_){for(var p in _)Object.prototype.hasOwnProperty.call(_,p)&&(a[p]=_[p])},i(c,l)};return function(c,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");i(c,l);function a(){this.constructor=c}c.prototype=l===null?Object.create(l):(a.prototype=l.prototype,new a)}})(),g=Lt&&Lt.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Lt,"__esModule",{value:!0});var O=g(Qm()),d=_e(),o=g(Xm()),n=g(qe()),t=d.internal.constants.BOLT_PROTOCOL_V4_2,r=(function(i){e(c,i);function c(){return i!==null&&i.apply(this,arguments)||this}return Object.defineProperty(c.prototype,"version",{get:function(){return t},enumerable:!1,configurable:!0}),Object.defineProperty(c.prototype,"transformer",{get:function(){var l=this;return this._transformer===void 0&&(this._transformer=new n.default(Object.values(o.default).map(function(a){return a(l._config,l._log)}))),this._transformer},enumerable:!1,configurable:!0}),c})(O.default);return Lt.default=r,Lt}var Ur={},Ut={},gp;function eg(){if(gp)return Ut;gp=1;var e=Ut&&Ut.__assign||function(){return e=Object.assign||function(d){for(var o,n=1,t=arguments.length;n<t;n++){o=arguments[n];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(d[r]=o[r])}return d},e.apply(this,arguments)},g=Ut&&Ut.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(Ut,"__esModule",{value:!0});var O=g(Xm());return Ut.default=e({},O.default),Ut}var qt={},Ft={},Op;function tl(){if(Op)return Ft;Op=1;var e=Ft&&Ft.__assign||function(){return e=Object.assign||function(d){for(var o,n=1,t=arguments.length;n<t;n++){o=arguments[n];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(d[r]=o[r])}return d},e.apply(this,arguments)},g=Ft&&Ft.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(Ft,"__esModule",{value:!0});var O=g(eg());return Ft.default=e({},O.default),Ft}var wp;function nl(){if(wp)return qt;wp=1;var e=qt&&qt.__read||function(s,f){var b=typeof Symbol=="function"&&s[Symbol.iterator];if(!b)return s;var E=b.call(s),w,T=[],R;try{for(;(f===void 0||f-- >0)&&!(w=E.next()).done;)T.push(w.value)}catch(L){R={error:L}}finally{try{w&&!w.done&&(b=E.return)&&b.call(E)}finally{if(R)throw R.error}}return T},g=qt&&qt.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(qt,"__esModule",{value:!0});var O=ln(),d=_e(),o=g(tl()),n=Vm(),t=qm(),r=d.internal.temporalUtil.localDateTimeToEpochSecond,i=73,c=3,l=105,a=3;function _(s,f){var b=s.disableLosslessIntegers,E=s.useBigInt,w=o.default.createDateTimeWithZoneIdTransformer(s);return w.extendsWith({signature:l,fromStructure:function(T){O.structure.verifyStructSize("DateTimeWithZoneId",a,T.size);var R=e(T.fields,3),L=R[0],j=R[1],M=R[2],x=u(M,L,j),Z=new d.DateTime(x.year,x.month,x.day,x.hour,x.minute,x.second,(0,d.int)(j),x.timeZoneOffsetSeconds,M);return y(Z,b,E)},toStructure:function(T){var R=r(T.year,T.month,T.day,T.hour,T.minute,T.second,T.nanosecond),L=T.timeZoneOffsetSeconds!=null?T.timeZoneOffsetSeconds:p(T.timeZoneId,R,T.nanosecond);T.timeZoneOffsetSeconds==null&&f.warn('DateTime objects without "timeZoneOffsetSeconds" property are prune to bugs related to ambiguous times. For instance, 2022-10-30T2:30:00[Europe/Berlin] could be GMT+1 or GMT+2.');var j=R.subtract(L),M=(0,d.int)(T.nanosecond),x=T.timeZoneId;return new O.structure.Structure(l,[j,M,x])}})}function p(s,f,b){var E=u(s,f,b),w=r(E.year,E.month,E.day,E.hour,E.minute,E.second,b),T=w.subtract(f),R=f.subtract(T),L=u(s,R,b),j=r(L.year,L.month,L.day,L.hour,L.minute,L.second,b),M=j.subtract(R);return M}var m=new Map;function h(s){if(!m.has(s)){var f=new Intl.DateTimeFormat("en-US",{timeZone:s,year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!1,era:"narrow"});m.set(s,f)}return m.get(s)}function u(s,f,b){var E=h(s),w=(0,d.int)(f).multiply(1e3).add((0,d.int)(b).div(1e6)).toNumber(),T=E.formatToParts(w),R=T.reduce(function(j,M){return M.type==="era"?j.adjustEra=M.value.toUpperCase()==="B"?function(x){return x.subtract(1).negate()}:t.identity:M.type==="hour"?j.hour=(0,d.int)(M.value).modulo(24):M.type!=="literal"&&(j[M.type]=(0,d.int)(M.value)),j},{});R.year=R.adjustEra(R.year);var L=r(R.year,R.month,R.day,R.hour,R.minute,R.second,R.nanosecond);return R.timeZoneOffsetSeconds=L.subtract(f),R.hour=R.hour.modulo(24),R}function v(s){var f=s.disableLosslessIntegers,b=s.useBigInt,E=o.default.createDateTimeWithOffsetTransformer(s);return E.extendsWith({signature:i,toStructure:function(w){var T=r(w.year,w.month,w.day,w.hour,w.minute,w.second,w.nanosecond),R=(0,d.int)(w.nanosecond),L=(0,d.int)(w.timeZoneOffsetSeconds),j=T.subtract(L);return new O.structure.Structure(i,[j,R,L])},fromStructure:function(w){O.structure.verifyStructSize("DateTimeWithZoneOffset",c,w.size);var T=e(w.fields,3),R=T[0],L=T[1],j=T[2],M=(0,d.int)(R).add(j),x=(0,n.epochSecondAndNanoToLocalDateTime)(M,L),Z=new d.DateTime(x.year,x.month,x.day,x.hour,x.minute,x.second,x.nanosecond,j,null);return y(Z,f,b)}})}function y(s,f,b){if(!f&&!b)return s;var E=function(L){return b?L.toBigInt():L.toNumberOrInfinity()},w=Object.create(Object.getPrototypeOf(s));for(var T in s)if(Object.prototype.hasOwnProperty.call(s,T)===!0){var R=s[T];w[T]=(0,d.isInt)(R)?E(R):R}return Object.freeze(w),w}return qt.default={createDateTimeWithZoneIdTransformer:_,createDateTimeWithOffsetTransformer:v},qt}var Ep;function il(){if(Ep)return Ur;Ep=1;var e=Ur&&Ur.__extends||(function(){var m=function(h,u){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,y){v.__proto__=y}||function(v,y){for(var s in y)Object.prototype.hasOwnProperty.call(y,s)&&(v[s]=y[s])},m(h,u)};return function(h,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");m(h,u);function v(){this.constructor=h}h.prototype=u===null?Object.create(u):(v.prototype=u.prototype,new v)}})(),g=Ur&&Ur.__assign||function(){return g=Object.assign||function(m){for(var h,u=1,v=arguments.length;u<v;u++){h=arguments[u];for(var y in h)Object.prototype.hasOwnProperty.call(h,y)&&(m[y]=h[y])}return m},g.apply(this,arguments)},O=Ur&&Ur.__importDefault||function(m){return m&&m.__esModule?m:{default:m}};Object.defineProperty(Ur,"__esModule",{value:!0});var d=O(Jm()),o=O(fr()),n=er(),t=sn(),r=O(eg()),i=O(nl()),c=O(qe()),l=_e(),a=l.internal.bookmarks.Bookmarks,_=l.internal.constants.BOLT_PROTOCOL_V4_3,p=(function(m){e(h,m);function h(){return m!==null&&m.apply(this,arguments)||this}return Object.defineProperty(h.prototype,"version",{get:function(){return _},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"transformer",{get:function(){var u=this;return this._transformer===void 0&&(this._transformer=new c.default(Object.values(r.default).map(function(v){return v(u._config,u._log)}))),this._transformer},enumerable:!1,configurable:!0}),h.prototype.requestRoutingInformation=function(u){var v=u.routingContext,y=v===void 0?{}:v,s=u.databaseName,f=s===void 0?null:s,b=u.sessionContext,E=b===void 0?{}:b,w=u.onError,T=u.onCompleted,R=new n.RouteObserver({onProtocolError:this._onProtocolError,onError:w,onCompleted:T}),L=E.bookmarks||a.empty();return this.write(o.default.route(y,L.values(),f),R,!0),R},h.prototype.initialize=function(u){var v=this,y=u===void 0?{}:u,s=y.userAgent;y.boltAgent;var f=y.authToken,b=y.notificationFilter,E=y.onError,w=y.onComplete,T=new n.LoginObserver({onError:function(R){return v._onLoginError(R,E)},onCompleted:function(R){return R.patch_bolt!==void 0&&v._applyPatches(R.patch_bolt),v._onLoginCompleted(R,f,w)}});return(0,t.assertNotificationFilterIsEmpty)(b,this._onProtocolError,T),this.write(o.default.hello(s,f,this._serversideRouting,["utc"]),T,!0),T},h.prototype._applyPatches=function(u){u.includes("utc")&&this._applyUtcPatch()},h.prototype._applyUtcPatch=function(){var u=this;this._transformer=new c.default(Object.values(g(g({},r.default),i.default)).map(function(v){return v(u._config,u._log)}))},h})(d.default);return Ur.default=p,Ur}var qr={},Tp;function rg(){if(Tp)return qr;Tp=1;var e=qr&&qr.__extends||(function(){var u=function(v,y){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,f){s.__proto__=f}||function(s,f){for(var b in f)Object.prototype.hasOwnProperty.call(f,b)&&(s[b]=f[b])},u(v,y)};return function(v,y){if(typeof y!="function"&&y!==null)throw new TypeError("Class extends value "+String(y)+" is not a constructor or null");u(v,y);function s(){this.constructor=v}v.prototype=y===null?Object.create(y):(s.prototype=y.prototype,new s)}})(),g=qr&&qr.__assign||function(){return g=Object.assign||function(u){for(var v,y=1,s=arguments.length;y<s;y++){v=arguments[y];for(var f in v)Object.prototype.hasOwnProperty.call(v,f)&&(u[f]=v[f])}return u},g.apply(this,arguments)},O=qr&&qr.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(qr,"__esModule",{value:!0});var d=O(il()),o=_e(),n=O(fr()),t=er(),r=sn(),i=O(tl()),c=O(nl()),l=O(qe()),a=o.internal.constants,_=a.BOLT_PROTOCOL_V4_4,p=a.FETCH_ALL,m=o.internal.bookmarks.Bookmarks,h=(function(u){e(v,u);function v(){return u!==null&&u.apply(this,arguments)||this}return Object.defineProperty(v.prototype,"version",{get:function(){return _},enumerable:!1,configurable:!0}),Object.defineProperty(v.prototype,"transformer",{get:function(){var y=this;return this._transformer===void 0&&(this._transformer=new l.default(Object.values(i.default).map(function(s){return s(y._config,y._log)}))),this._transformer},enumerable:!1,configurable:!0}),v.prototype.requestRoutingInformation=function(y){var s=y.routingContext,f=s===void 0?{}:s,b=y.databaseName,E=b===void 0?null:b,w=y.impersonatedUser,T=w===void 0?null:w,R=y.sessionContext,L=R===void 0?{}:R,j=y.onError,M=y.onCompleted,x=new t.RouteObserver({onProtocolError:this._onProtocolError,onError:j,onCompleted:M}),Z=L.bookmarks||m.empty();return this.write(n.default.routeV4x4(f,Z.values(),{databaseName:E,impersonatedUser:T}),x,!0),x},v.prototype.run=function(y,s,f){var b=f===void 0?{}:f,E=b.bookmarks,w=b.txConfig,T=b.database,R=b.mode,L=b.impersonatedUser,j=b.notificationFilter,M=b.beforeKeys,x=b.afterKeys,Z=b.beforeError,H=b.afterError,K=b.beforeComplete,G=b.afterComplete,$=b.flush,A=$===void 0?!0:$,q=b.reactive,U=q===void 0?!1:q,Q=b.fetchSize,te=Q===void 0?p:Q,z=b.highRecordWatermark,re=z===void 0?Number.MAX_VALUE:z,ce=b.lowRecordWatermark,ae=ce===void 0?Number.MAX_VALUE:ce,k=new t.ResultStreamObserver({server:this._server,reactive:U,fetchSize:te,moreFunction:this._requestMore.bind(this),discardFunction:this._requestDiscard.bind(this),beforeKeys:M,afterKeys:x,beforeError:Z,afterError:H,beforeComplete:K,afterComplete:G,highRecordWatermark:re,lowRecordWatermark:ae});(0,r.assertNotificationFilterIsEmpty)(j,this._onProtocolError,k);var W=U;return this.write(n.default.runWithMetadata(y,s,{bookmarks:E,txConfig:w,database:T,mode:R,impersonatedUser:L}),k,W&&A),U||this.write(n.default.pull({n:te}),k,A),k},v.prototype.beginTransaction=function(y){var s=y===void 0?{}:y,f=s.bookmarks,b=s.txConfig,E=s.database,w=s.mode,T=s.impersonatedUser,R=s.notificationFilter,L=s.beforeError,j=s.afterError,M=s.beforeComplete,x=s.afterComplete,Z=new t.ResultStreamObserver({server:this._server,beforeError:L,afterError:j,beforeComplete:M,afterComplete:x});return Z.prepareToHandleSingleResponse(),(0,r.assertNotificationFilterIsEmpty)(R,this._onProtocolError,Z),this.write(n.default.begin({bookmarks:f,txConfig:b,database:E,mode:w,impersonatedUser:T}),Z,!0),Z},v.prototype._applyUtcPatch=function(){var y=this;this._transformer=new l.default(Object.values(g(g({},i.default),c.default)).map(function(s){return s(y._config,y._log)}))},v})(d.default);return qr.default=h,qr}var Bt={},Fr={},Sp;function tg(){if(Sp)return Fr;Sp=1;var e=Fr&&Fr.__assign||function(){return e=Object.assign||function(p){for(var m,h=1,u=arguments.length;h<u;h++){m=arguments[h];for(var v in m)Object.prototype.hasOwnProperty.call(m,v)&&(p[v]=m[v])}return p},e.apply(this,arguments)},g=Fr&&Fr.__read||function(p,m){var h=typeof Symbol=="function"&&p[Symbol.iterator];if(!h)return p;var u=h.call(p),v,y=[],s;try{for(;(m===void 0||m-- >0)&&!(v=u.next()).done;)y.push(v.value)}catch(f){s={error:f}}finally{try{v&&!v.done&&(h=u.return)&&h.call(u)}finally{if(s)throw s.error}}return y},O=Fr&&Fr.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(Fr,"__esModule",{value:!0});var d=ln(),o=_e(),n=O(tl()),t=O(nl()),r=4,i=8,c=4;function l(p){var m=n.default.createNodeTransformer(p);return m.extendsWith({fromStructure:function(h){d.structure.verifyStructSize("Node",r,h.size);var u=g(h.fields,4),v=u[0],y=u[1],s=u[2],f=u[3];return new o.Node(v,y,s,f)}})}function a(p){var m=n.default.createRelationshipTransformer(p);return m.extendsWith({fromStructure:function(h){d.structure.verifyStructSize("Relationship",i,h.size);var u=g(h.fields,8),v=u[0],y=u[1],s=u[2],f=u[3],b=u[4],E=u[5],w=u[6],T=u[7];return new o.Relationship(v,y,s,f,b,E,w,T)}})}function _(p){var m=n.default.createUnboundRelationshipTransformer(p);return m.extendsWith({fromStructure:function(h){d.structure.verifyStructSize("UnboundRelationship",c,h.size);var u=g(h.fields,4),v=u[0],y=u[1],s=u[2],f=u[3];return new o.UnboundRelationship(v,y,s,f)}})}return Fr.default=e(e(e({},n.default),t.default),{createNodeTransformer:l,createRelationshipTransformer:a,createUnboundRelationshipTransformer:_}),Fr}var Pp;function ng(){if(Pp)return Bt;Pp=1;var e=Bt&&Bt.__extends||(function(){var a=function(_,p){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,h){m.__proto__=h}||function(m,h){for(var u in h)Object.prototype.hasOwnProperty.call(h,u)&&(m[u]=h[u])},a(_,p)};return function(_,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");a(_,p);function m(){this.constructor=_}_.prototype=p===null?Object.create(p):(m.prototype=p.prototype,new m)}})(),g=Bt&&Bt.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(Bt,"__esModule",{value:!0});var O=g(rg()),d=sn(),o=g(tg()),n=g(qe()),t=g(fr()),r=er(),i=_e(),c=i.internal.constants.BOLT_PROTOCOL_V5_0,l=(function(a){e(_,a);function _(){return a!==null&&a.apply(this,arguments)||this}return Object.defineProperty(_.prototype,"version",{get:function(){return c},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"transformer",{get:function(){var p=this;return this._transformer===void 0&&(this._transformer=new n.default(Object.values(o.default).map(function(m){return m(p._config,p._log)}))),this._transformer},enumerable:!1,configurable:!0}),_.prototype.initialize=function(p){var m=this,h=p===void 0?{}:p,u=h.userAgent;h.boltAgent;var v=h.authToken,y=h.notificationFilter,s=h.onError,f=h.onComplete,b=new r.LoginObserver({onError:function(E){return m._onLoginError(E,s)},onCompleted:function(E){return m._onLoginCompleted(E,v,f)}});return(0,d.assertNotificationFilterIsEmpty)(y,this._onProtocolError,b),this.write(t.default.hello(u,v,this._serversideRouting),b,!0),b},_})(O.default);return Bt.default=l,Bt}var Br={},xt={},Rp;function ig(){if(Rp)return xt;Rp=1;var e=xt&&xt.__assign||function(){return e=Object.assign||function(d){for(var o,n=1,t=arguments.length;n<t;n++){o=arguments[n];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(d[r]=o[r])}return d},e.apply(this,arguments)},g=xt&&xt.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(xt,"__esModule",{value:!0});var O=g(tg());return xt.default=e({},O.default),xt}var Cp;function og(){if(Cp)return Br;Cp=1;var e=Br&&Br.__extends||(function(){var _=function(p,m){return _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,u){h.__proto__=u}||function(h,u){for(var v in u)Object.prototype.hasOwnProperty.call(u,v)&&(h[v]=u[v])},_(p,m)};return function(p,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");_(p,m);function h(){this.constructor=p}p.prototype=m===null?Object.create(m):(h.prototype=m.prototype,new h)}})(),g=Br&&Br.__assign||function(){return g=Object.assign||function(_){for(var p,m=1,h=arguments.length;m<h;m++){p=arguments[m];for(var u in p)Object.prototype.hasOwnProperty.call(p,u)&&(_[u]=p[u])}return _},g.apply(this,arguments)},O=Br&&Br.__importDefault||function(_){return _&&_.__esModule?_:{default:_}};Object.defineProperty(Br,"__esModule",{value:!0});var d=O(ng()),o=sn(),n=O(ig()),t=O(qe()),r=O(fr()),i=er(),c=_e(),l=c.internal.constants.BOLT_PROTOCOL_V5_1,a=(function(_){e(p,_);function p(){return _!==null&&_.apply(this,arguments)||this}return Object.defineProperty(p.prototype,"version",{get:function(){return l},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"transformer",{get:function(){var m=this;return this._transformer===void 0&&(this._transformer=new t.default(Object.values(n.default).map(function(h){return h(m._config,m._log)}))),this._transformer},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"supportsReAuth",{get:function(){return!0},enumerable:!1,configurable:!0}),p.prototype.initialize=function(m){var h=this,u=m===void 0?{}:m,v=u.userAgent;u.boltAgent;var y=u.authToken,s=u.notificationFilter,f=u.onError,b=u.onComplete,E={},w=new i.LoginObserver({onError:function(T){return h._onLoginError(T,f)},onCompleted:function(T){return E.metadata=T,h._onLoginCompleted(T)}});return(0,o.assertNotificationFilterIsEmpty)(s,this._onProtocolError,w),this.write(r.default.hello5x1(v,this._serversideRouting),w,!1),this.logon({authToken:y,onComplete:function(T){return b(g(g({},T),E.metadata))},onError:f,flush:!0})},p.prototype.logon=function(m){var h=this,u=m===void 0?{}:m,v=u.authToken,y=u.onComplete,s=u.onError,f=u.flush,b=new i.LoginObserver({onCompleted:function(){return h._onLoginCompleted(null,v,y)},onError:function(E){return h._onLoginError(E,s)}});return this.write(r.default.logon(v),b,f),b},p.prototype.logoff=function(m){var h=m===void 0?{}:m,u=h.onComplete,v=h.onError,y=h.flush,s=new i.LogoffObserver({onCompleted:u,onError:v});return this.write(r.default.logoff(),s,y),s},p})(d.default);return Br.default=a,Br}var xr={},Wt={},Ip;function ag(){if(Ip)return Wt;Ip=1;var e=Wt&&Wt.__assign||function(){return e=Object.assign||function(d){for(var o,n=1,t=arguments.length;n<t;n++){o=arguments[n];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(d[r]=o[r])}return d},e.apply(this,arguments)},g=Wt&&Wt.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(Wt,"__esModule",{value:!0});var O=g(ig());return Wt.default=e({},O.default),Wt}var Ap;function ug(){if(Ap)return xr;Ap=1;var e=xr&&xr.__extends||(function(){var p=function(m,h){return p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,v){u.__proto__=v}||function(u,v){for(var y in v)Object.prototype.hasOwnProperty.call(v,y)&&(u[y]=v[y])},p(m,h)};return function(m,h){if(typeof h!="function"&&h!==null)throw new TypeError("Class extends value "+String(h)+" is not a constructor or null");p(m,h);function u(){this.constructor=m}m.prototype=h===null?Object.create(h):(u.prototype=h.prototype,new u)}})(),g=xr&&xr.__assign||function(){return g=Object.assign||function(p){for(var m,h=1,u=arguments.length;h<u;h++){m=arguments[h];for(var v in m)Object.prototype.hasOwnProperty.call(m,v)&&(p[v]=m[v])}return p},g.apply(this,arguments)},O=xr&&xr.__importDefault||function(p){return p&&p.__esModule?p:{default:p}};Object.defineProperty(xr,"__esModule",{value:!0});var d=O(og()),o=O(ag()),n=O(qe()),t=O(fr()),r=er(),i=_e(),c=i.internal.constants,l=c.BOLT_PROTOCOL_V5_2,a=c.FETCH_ALL,_=(function(p){e(m,p);function m(){return p!==null&&p.apply(this,arguments)||this}return Object.defineProperty(m.prototype,"version",{get:function(){return l},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"transformer",{get:function(){var h=this;return this._transformer===void 0&&(this._transformer=new n.default(Object.values(o.default).map(function(u){return u(h._config,h._log)}))),this._transformer},enumerable:!1,configurable:!0}),Object.defineProperty(m.prototype,"supportsReAuth",{get:function(){return!0},enumerable:!1,configurable:!0}),m.prototype.initialize=function(h){var u=this,v=h===void 0?{}:h,y=v.userAgent;v.boltAgent;var s=v.authToken,f=v.notificationFilter,b=v.onError,E=v.onComplete,w={},T=new r.LoginObserver({onError:function(R){return u._onLoginError(R,b)},onCompleted:function(R){return w.metadata=R,u._onLoginCompleted(R)}});return this.write(t.default.hello5x2(y,f,this._serversideRouting),T,!1),this.logon({authToken:s,onComplete:function(R){return E(g(g({},R),w.metadata))},onError:b,flush:!0})},m.prototype.beginTransaction=function(h){var u=h===void 0?{}:h,v=u.bookmarks,y=u.txConfig,s=u.database,f=u.mode,b=u.impersonatedUser,E=u.notificationFilter,w=u.beforeError,T=u.afterError,R=u.beforeComplete,L=u.afterComplete,j=new r.ResultStreamObserver({server:this._server,beforeError:w,afterError:T,beforeComplete:R,afterComplete:L});return j.prepareToHandleSingleResponse(),this.write(t.default.begin({bookmarks:v,txConfig:y,database:s,mode:f,impersonatedUser:b,notificationFilter:E}),j,!0),j},m.prototype.run=function(h,u,v){var y=v===void 0?{}:v,s=y.bookmarks,f=y.txConfig,b=y.database,E=y.mode,w=y.impersonatedUser,T=y.notificationFilter,R=y.beforeKeys,L=y.afterKeys,j=y.beforeError,M=y.afterError,x=y.beforeComplete,Z=y.afterComplete,H=y.flush,K=H===void 0?!0:H,G=y.reactive,$=G===void 0?!1:G,A=y.fetchSize,q=A===void 0?a:A,U=y.highRecordWatermark,Q=U===void 0?Number.MAX_VALUE:U,te=y.lowRecordWatermark,z=te===void 0?Number.MAX_VALUE:te,re=new r.ResultStreamObserver({server:this._server,reactive:$,fetchSize:q,moreFunction:this._requestMore.bind(this),discardFunction:this._requestDiscard.bind(this),beforeKeys:R,afterKeys:L,beforeError:j,afterError:M,beforeComplete:x,afterComplete:Z,highRecordWatermark:Q,lowRecordWatermark:z}),ce=$;return this.write(t.default.runWithMetadata(h,u,{bookmarks:s,txConfig:f,database:b,mode:E,impersonatedUser:w,notificationFilter:T}),re,ce&&K),$||this.write(t.default.pull({n:q}),re,K),re},m})(d.default);return xr.default=_,xr}var Wr={},Vt={},jp;function cg(){if(jp)return Vt;jp=1;var e=Vt&&Vt.__assign||function(){return e=Object.assign||function(d){for(var o,n=1,t=arguments.length;n<t;n++){o=arguments[n];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(d[r]=o[r])}return d},e.apply(this,arguments)},g=Vt&&Vt.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(Vt,"__esModule",{value:!0});var O=g(ag());return Vt.default=e({},O.default),Vt}var Mp;function sg(){if(Mp)return Wr;Mp=1;var e=Wr&&Wr.__extends||(function(){var a=function(_,p){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(m,h){m.__proto__=h}||function(m,h){for(var u in h)Object.prototype.hasOwnProperty.call(h,u)&&(m[u]=h[u])},a(_,p)};return function(_,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");a(_,p);function m(){this.constructor=_}_.prototype=p===null?Object.create(p):(m.prototype=p.prototype,new m)}})(),g=Wr&&Wr.__assign||function(){return g=Object.assign||function(a){for(var _,p=1,m=arguments.length;p<m;p++){_=arguments[p];for(var h in _)Object.prototype.hasOwnProperty.call(_,h)&&(a[h]=_[h])}return a},g.apply(this,arguments)},O=Wr&&Wr.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(Wr,"__esModule",{value:!0});var d=O(ug()),o=O(cg()),n=O(qe()),t=O(fr()),r=er(),i=_e(),c=i.internal.constants.BOLT_PROTOCOL_V5_3,l=(function(a){e(_,a);function _(){return a!==null&&a.apply(this,arguments)||this}return Object.defineProperty(_.prototype,"version",{get:function(){return c},enumerable:!1,configurable:!0}),Object.defineProperty(_.prototype,"transformer",{get:function(){var p=this;return this._transformer===void 0&&(this._transformer=new n.default(Object.values(o.default).map(function(m){return m(p._config,p._log)}))),this._transformer},enumerable:!1,configurable:!0}),_.prototype.initialize=function(p){var m=this,h=p===void 0?{}:p,u=h.userAgent,v=h.boltAgent,y=h.authToken,s=h.notificationFilter,f=h.onError,b=h.onComplete,E={},w=new r.LoginObserver({onError:function(T){return m._onLoginError(T,f)},onCompleted:function(T){return E.metadata=T,m._onLoginCompleted(T)}});return this.write(t.default.hello5x3(u,v,s,this._serversideRouting),w,!1),this.logon({authToken:y,onComplete:function(T){return b(g(g({},T),E.metadata))},onError:f,flush:!0})},_})(d.default);return Wr.default=l,Wr}var Ht={},zt={},Np;function lg(){if(Np)return zt;Np=1;var e=zt&&zt.__assign||function(){return e=Object.assign||function(d){for(var o,n=1,t=arguments.length;n<t;n++){o=arguments[n];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(d[r]=o[r])}return d},e.apply(this,arguments)},g=zt&&zt.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(zt,"__esModule",{value:!0});var O=g(cg());return zt.default=e({},O.default),zt}var kp;function fg(){if(kp)return Ht;kp=1;var e=Ht&&Ht.__extends||(function(){var l=function(a,_){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,m){p.__proto__=m}||function(p,m){for(var h in m)Object.prototype.hasOwnProperty.call(m,h)&&(p[h]=m[h])},l(a,_)};return function(a,_){if(typeof _!="function"&&_!==null)throw new TypeError("Class extends value "+String(_)+" is not a constructor or null");l(a,_);function p(){this.constructor=a}a.prototype=_===null?Object.create(_):(p.prototype=_.prototype,new p)}})(),g=Ht&&Ht.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(Ht,"__esModule",{value:!0});var O=g(sg()),d=g(lg()),o=g(fr()),n=er(),t=g(qe()),r=_e(),i=r.internal.constants.BOLT_PROTOCOL_V5_4,c=(function(l){e(a,l);function a(){return l!==null&&l.apply(this,arguments)||this}return Object.defineProperty(a.prototype,"version",{get:function(){return i},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"transformer",{get:function(){var _=this;return this._transformer===void 0&&(this._transformer=new t.default(Object.values(d.default).map(function(p){return p(_._config,_._log)}))),this._transformer},enumerable:!1,configurable:!0}),a.prototype.telemetry=function(_,p){var m=_.api,h=p===void 0?{}:p,u=h.onError,v=h.onCompleted,y=new n.TelemetryObserver({onCompleted:v,onError:u});return this.write(o.default.telemetry({api:m}),y,!1),y},a})(O.default);return Ht.default=c,Ht}var Vr={},$t={},Lp;function dg(){if(Lp)return $t;Lp=1;var e=$t&&$t.__assign||function(){return e=Object.assign||function(d){for(var o,n=1,t=arguments.length;n<t;n++){o=arguments[n];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(d[r]=o[r])}return d},e.apply(this,arguments)},g=$t&&$t.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty($t,"__esModule",{value:!0});var O=g(lg());return $t.default=e({},O.default),$t}var Dp;function hg(){if(Dp)return Vr;Dp=1;var e=Vr&&Vr.__extends||(function(){var m=function(h,u){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,y){v.__proto__=y}||function(v,y){for(var s in y)Object.prototype.hasOwnProperty.call(y,s)&&(v[s]=y[s])},m(h,u)};return function(h,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");m(h,u);function v(){this.constructor=h}h.prototype=u===null?Object.create(u):(v.prototype=u.prototype,new v)}})(),g=Vr&&Vr.__assign||function(){return g=Object.assign||function(m){for(var h,u=1,v=arguments.length;u<v;u++){h=arguments[u];for(var y in h)Object.prototype.hasOwnProperty.call(h,y)&&(m[y]=h[y])}return m},g.apply(this,arguments)},O=Vr&&Vr.__importDefault||function(m){return m&&m.__esModule?m:{default:m}};Object.defineProperty(Vr,"__esModule",{value:!0});var d=O(fg()),o=O(dg()),n=O(qe()),t=O(fr()),r=er(),i=_e(),c=i.internal.constants,l=c.BOLT_PROTOCOL_V5_5,a=c.FETCH_ALL,_=Object.freeze({OPERATION:"",OPERATION_CODE:"0",CURRENT_SCHEMA:"/"}),p=(function(m){e(h,m);function h(){return m!==null&&m.apply(this,arguments)||this}return Object.defineProperty(h.prototype,"version",{get:function(){return l},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"transformer",{get:function(){var u=this;return this._transformer===void 0&&(this._transformer=new n.default(Object.values(o.default).map(function(v){return v(u._config,u._log)}))),this._transformer},enumerable:!1,configurable:!0}),h.prototype.initialize=function(u){var v=this,y=u===void 0?{}:u,s=y.userAgent,f=y.boltAgent,b=y.authToken,E=y.notificationFilter,w=y.onError,T=y.onComplete,R={},L=new r.LoginObserver({onError:function(j){return v._onLoginError(j,w)},onCompleted:function(j){return R.metadata=j,v._onLoginCompleted(j)}});return this.write(t.default.hello5x5(s,f,E,this._serversideRouting),L,!1),this.logon({authToken:b,onComplete:function(j){return T(g(g({},j),R.metadata))},onError:w,flush:!0})},h.prototype.beginTransaction=function(u){var v=u===void 0?{}:u,y=v.bookmarks,s=v.txConfig,f=v.database,b=v.mode,E=v.impersonatedUser,w=v.notificationFilter,T=v.beforeError,R=v.afterError,L=v.beforeComplete,j=v.afterComplete,M=new r.ResultStreamObserver({server:this._server,beforeError:T,afterError:R,beforeComplete:L,afterComplete:j});return M.prepareToHandleSingleResponse(),this.write(t.default.begin5x5({bookmarks:y,txConfig:s,database:f,mode:b,impersonatedUser:E,notificationFilter:w}),M,!0),M},h.prototype.run=function(u,v,y){var s=y===void 0?{}:y,f=s.bookmarks,b=s.txConfig,E=s.database,w=s.mode,T=s.impersonatedUser,R=s.notificationFilter,L=s.beforeKeys,j=s.afterKeys,M=s.beforeError,x=s.afterError,Z=s.beforeComplete,H=s.afterComplete,K=s.flush,G=K===void 0?!0:K,$=s.reactive,A=$===void 0?!1:$,q=s.fetchSize,U=q===void 0?a:q,Q=s.highRecordWatermark,te=Q===void 0?Number.MAX_VALUE:Q,z=s.lowRecordWatermark,re=z===void 0?Number.MAX_VALUE:z,ce=new r.ResultStreamObserver({server:this._server,reactive:A,fetchSize:U,moreFunction:this._requestMore.bind(this),discardFunction:this._requestDiscard.bind(this),beforeKeys:L,afterKeys:j,beforeError:M,afterError:x,beforeComplete:Z,afterComplete:H,highRecordWatermark:te,lowRecordWatermark:re,enrichMetadata:this._enrichMetadata}),ae=A;return this.write(t.default.runWithMetadata5x5(u,v,{bookmarks:f,txConfig:b,database:E,mode:w,impersonatedUser:T,notificationFilter:R}),ce,ae&&G),A||this.write(t.default.pull({n:U}),ce,G),ce},h.prototype._enrichMetadata=function(u){return Array.isArray(u.statuses)&&(u.statuses=u.statuses.map(function(v){return g(g({},v),{description:v.neo4j_code!=null?v.status_description:v.description,diagnostic_record:v.diagnostic_record!==null?g(g({},_),v.diagnostic_record):null})})),u},h})(d.default);return Vr.default=p,Vr}var Hr={},Gt={},Up;function vg(){if(Up)return Gt;Up=1;var e=Gt&&Gt.__assign||function(){return e=Object.assign||function(d){for(var o,n=1,t=arguments.length;n<t;n++){o=arguments[n];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(d[r]=o[r])}return d},e.apply(this,arguments)},g=Gt&&Gt.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(Gt,"__esModule",{value:!0});var O=g(dg());return Gt.default=e({},O.default),Gt}var qp;function _g(){if(qp)return Hr;qp=1;var e=Hr&&Hr.__extends||(function(){var l=function(a,_){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,m){p.__proto__=m}||function(p,m){for(var h in m)Object.prototype.hasOwnProperty.call(m,h)&&(p[h]=m[h])},l(a,_)};return function(a,_){if(typeof _!="function"&&_!==null)throw new TypeError("Class extends value "+String(_)+" is not a constructor or null");l(a,_);function p(){this.constructor=a}a.prototype=_===null?Object.create(_):(p.prototype=_.prototype,new p)}})(),g=Hr&&Hr.__assign||function(){return g=Object.assign||function(l){for(var a,_=1,p=arguments.length;_<p;_++){a=arguments[_];for(var m in a)Object.prototype.hasOwnProperty.call(a,m)&&(l[m]=a[m])}return l},g.apply(this,arguments)},O=Hr&&Hr.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(Hr,"__esModule",{value:!0});var d=O(hg()),o=O(vg()),n=O(qe()),t=_e(),r=t.internal.constants.BOLT_PROTOCOL_V5_6,i=Object.freeze({OPERATION:"",OPERATION_CODE:"0",CURRENT_SCHEMA:"/"}),c=(function(l){e(a,l);function a(){return l!==null&&l.apply(this,arguments)||this}return Object.defineProperty(a.prototype,"version",{get:function(){return r},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"transformer",{get:function(){var _=this;return this._transformer===void 0&&(this._transformer=new n.default(Object.values(o.default).map(function(p){return p(_._config,_._log)}))),this._transformer},enumerable:!1,configurable:!0}),a.prototype._enrichMetadata=function(_){return Array.isArray(_.statuses)&&(_.statuses=_.statuses.map(function(p){return g(g({},p),{diagnostic_record:p.diagnostic_record!==null?g(g({},i),p.diagnostic_record):null})})),_},a})(d.default);return Hr.default=c,Hr}var zr={},Yt={},Fp;function pg(){if(Fp)return Yt;Fp=1;var e=Yt&&Yt.__assign||function(){return e=Object.assign||function(d){for(var o,n=1,t=arguments.length;n<t;n++){o=arguments[n];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(d[r]=o[r])}return d},e.apply(this,arguments)},g=Yt&&Yt.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(Yt,"__esModule",{value:!0});var O=g(vg());return Yt.default=e({},O.default),Yt}var Bp;function yg(){if(Bp)return zr;Bp=1;var e=zr&&zr.__extends||(function(){var l=function(a,_){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,m){p.__proto__=m}||function(p,m){for(var h in m)Object.prototype.hasOwnProperty.call(m,h)&&(p[h]=m[h])},l(a,_)};return function(a,_){if(typeof _!="function"&&_!==null)throw new TypeError("Class extends value "+String(_)+" is not a constructor or null");l(a,_);function p(){this.constructor=a}a.prototype=_===null?Object.create(_):(p.prototype=_.prototype,new p)}})(),g=zr&&zr.__assign||function(){return g=Object.assign||function(l){for(var a,_=1,p=arguments.length;_<p;_++){a=arguments[_];for(var m in a)Object.prototype.hasOwnProperty.call(a,m)&&(l[m]=a[m])}return l},g.apply(this,arguments)},O=zr&&zr.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(zr,"__esModule",{value:!0});var d=O(_g()),o=O(pg()),n=O(qe()),t=_e(),r=t.internal.constants.BOLT_PROTOCOL_V5_7,i=Object.freeze({OPERATION:"",OPERATION_CODE:"0",CURRENT_SCHEMA:"/"}),c=(function(l){e(a,l);function a(){return l!==null&&l.apply(this,arguments)||this}return Object.defineProperty(a.prototype,"version",{get:function(){return r},enumerable:!1,configurable:!0}),Object.defineProperty(a.prototype,"transformer",{get:function(){var _=this;return this._transformer===void 0&&(this._transformer=new n.default(Object.values(o.default).map(function(p){return p(_._config,_._log)}))),this._transformer},enumerable:!1,configurable:!0}),a.prototype.enrichErrorMetadata=function(_){return g(g({},_),{cause:_.cause!==null&&_.cause!==void 0?this.enrichErrorMetadata(_.cause):null,code:_.neo4j_code,diagnostic_record:_.diagnostic_record!==null?g(g({},i),_.diagnostic_record):null})},a})(d.default);return zr.default=c,zr}var Kt={},Zt={},xp;function ZO(){if(xp)return Zt;xp=1;var e=Zt&&Zt.__assign||function(){return e=Object.assign||function(d){for(var o,n=1,t=arguments.length;n<t;n++){o=arguments[n];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(d[r]=o[r])}return d},e.apply(this,arguments)},g=Zt&&Zt.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(Zt,"__esModule",{value:!0});var O=g(pg());return Zt.default=e({},O.default),Zt}var Wp;function QO(){if(Wp)return Kt;Wp=1;var e=Kt&&Kt.__extends||(function(){var _=function(p,m){return _=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,u){h.__proto__=u}||function(h,u){for(var v in u)Object.prototype.hasOwnProperty.call(u,v)&&(h[v]=u[v])},_(p,m)};return function(p,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");_(p,m);function h(){this.constructor=p}p.prototype=m===null?Object.create(m):(h.prototype=m.prototype,new h)}})(),g=Kt&&Kt.__importDefault||function(_){return _&&_.__esModule?_:{default:_}};Object.defineProperty(Kt,"__esModule",{value:!0});var O=g(yg()),d=g(ZO()),o=g(qe()),n=g(fr()),t=er(),r=_e(),i=r.internal.constants,c=i.BOLT_PROTOCOL_V5_8,l=i.FETCH_ALL,a=(function(_){e(p,_);function p(){return _!==null&&_.apply(this,arguments)||this}return Object.defineProperty(p.prototype,"version",{get:function(){return c},enumerable:!1,configurable:!0}),Object.defineProperty(p.prototype,"transformer",{get:function(){var m=this;return this._transformer===void 0&&(this._transformer=new o.default(Object.values(d.default).map(function(h){return h(m._config,m._log)}))),this._transformer},enumerable:!1,configurable:!0}),p.prototype.run=function(m,h,u){var v=u===void 0?{}:u,y=v.bookmarks,s=v.txConfig,f=v.database,b=v.mode,E=v.impersonatedUser,w=v.notificationFilter,T=v.beforeKeys,R=v.afterKeys,L=v.beforeError,j=v.afterError,M=v.beforeComplete,x=v.afterComplete,Z=v.flush,H=Z===void 0?!0:Z,K=v.reactive,G=K===void 0?!1:K,$=v.fetchSize,A=$===void 0?l:$,q=v.highRecordWatermark,U=q===void 0?Number.MAX_VALUE:q,Q=v.lowRecordWatermark,te=Q===void 0?Number.MAX_VALUE:Q,z=v.onDb,re=new t.ResultStreamObserver({server:this._server,reactive:G,fetchSize:A,moreFunction:this._requestMore.bind(this),discardFunction:this._requestDiscard.bind(this),beforeKeys:T,afterKeys:R,beforeError:L,afterError:j,beforeComplete:M,afterComplete:x,highRecordWatermark:U,lowRecordWatermark:te,enrichMetadata:this._enrichMetadata,onDb:z}),ce=G;return this.write(n.default.runWithMetadata5x5(m,h,{bookmarks:y,txConfig:s,database:f,mode:b,impersonatedUser:E,notificationFilter:w}),re,ce&&H),G||this.write(n.default.pull({n:A}),re,H),re},p})(O.default);return Kt.default=a,Kt}var ic={},Vp;function XO(){if(Vp)return ic;Vp=1,Object.defineProperty(ic,"__esModule",{value:!0});var e=_e(),g=112,O=113,d=126,o=127;function n(){}function t(l){return l}var r={onNext:n,onCompleted:n,onError:n},i=(function(){function l(a){var _=a===void 0?{}:a,p=_.transformMetadata,m=_.enrichErrorMetadata,h=_.log,u=_.observer;this._pendingObservers=[],this._log=h,this._transformMetadata=p||t,this._enrichErrorMetadata=m||t,this._observer=Object.assign({onObserversCountChange:n,onError:n,onFailure:n,onErrorApplyTransformation:t},u)}return Object.defineProperty(l.prototype,"currentFailure",{get:function(){return this._currentFailure},enumerable:!1,configurable:!0}),l.prototype.handleResponse=function(a){var _=a.fields[0];switch(a.signature){case O:this._log.isDebugEnabled()&&this._log.debug("S: RECORD ".concat(e.json.stringify(a))),this._currentObserver.onNext(_);break;case g:this._log.isDebugEnabled()&&this._log.debug("S: SUCCESS ".concat(e.json.stringify(a)));try{var p=this._transformMetadata(_);this._currentObserver.onCompleted(p)}finally{this._updateCurrentObserver()}break;case o:this._log.isDebugEnabled()&&this._log.debug("S: FAILURE ".concat(e.json.stringify(a)));try{this._currentFailure=this._handleErrorPayload(this._enrichErrorMetadata(_)),this._currentObserver.onError(this._currentFailure)}finally{this._updateCurrentObserver(),this._observer.onFailure(this._currentFailure)}break;case d:this._log.isDebugEnabled()&&this._log.debug("S: IGNORED ".concat(e.json.stringify(a)));try{this._currentFailure&&this._currentObserver.onError?this._currentObserver.onError(this._currentFailure):this._currentObserver.onError&&this._currentObserver.onError((0,e.newError)("Ignored either because of an error or RESET"))}finally{this._updateCurrentObserver()}break;default:this._observer.onError((0,e.newError)("Unknown Bolt protocol message: "+a))}},l.prototype._updateCurrentObserver=function(){this._currentObserver=this._pendingObservers.shift(),this._observer.onObserversCountChange(this._observersCount)},Object.defineProperty(l.prototype,"_observersCount",{get:function(){return this._currentObserver==null?this._pendingObservers.length:this._pendingObservers.length+1},enumerable:!1,configurable:!0}),l.prototype._queueObserver=function(a){return a=a||r,a.onCompleted=a.onCompleted||n,a.onError=a.onError||n,a.onNext=a.onNext||n,this._currentObserver===void 0?this._currentObserver=a:this._pendingObservers.push(a),this._observer.onObserversCountChange(this._observersCount),!0},l.prototype._notifyErrorToObservers=function(a){for(this._currentObserver&&this._currentObserver.onError&&this._currentObserver.onError(a);this._pendingObservers.length>0;){var _=this._pendingObservers.shift();_&&_.onError&&_.onError(a)}},l.prototype.hasOngoingObservableRequests=function(){return this._currentObserver!=null||this._pendingObservers.length>0},l.prototype._resetFailure=function(){this._currentFailure=null},l.prototype._handleErrorPayload=function(a){var _=c(a.code),p=a.cause!=null?this._handleErrorCause(a.cause):void 0,m=(0,e.newError)(a.message,_,p,a.gql_status,a.description,a.diagnostic_record);return this._observer.onErrorApplyTransformation(m)},l.prototype._handleErrorCause=function(a){var _=a.cause!=null?this._handleErrorCause(a.cause):void 0,p=(0,e.newGQLError)(a.message,_,a.gql_status,a.description,a.diagnostic_record);return this._observer.onErrorApplyTransformation(p)},l})();ic.default=i;function c(l){return l==="Neo.TransientError.Transaction.Terminated"?"Neo.ClientError.Transaction.Terminated":l==="Neo.TransientError.Transaction.LockClientStopped"?"Neo.ClientError.Transaction.LockClientStopped":l}return ic}var Hp;function JO(){if(Hp)return pi;Hp=1;var e=pi&&pi.__importDefault||function(E){return E&&E.__esModule?E:{default:E}};Object.defineProperty(pi,"__esModule",{value:!0}),pi.default=f;var g=_e(),O=e(Wm()),d=e(zm()),o=e(Gm()),n=e(Km()),t=e(Qm()),r=e(Jm()),i=e(il()),c=e(rg()),l=e(ng()),a=e(og()),_=e(ug()),p=e(sg()),m=e(fg()),h=e(hg()),u=e(_g()),v=e(yg()),y=e(QO());cn();var s=e(XO());function f(E){var w=E===void 0?{}:E,T=w.version,R=w.chunker,L=w.dechunker,j=w.channel,M=w.disableLosslessIntegers,x=w.useBigInt,Z=w.serversideRouting,H=w.server,K=w.log,G=w.observer,$=function(A){var q=new s.default({transformMetadata:A.transformMetadata.bind(A),enrichErrorMetadata:A.enrichErrorMetadata.bind(A),log:K,observer:G});return j.onerror=G.onError.bind(G),j.onmessage=function(U){return L.write(U)},L.onmessage=function(U){try{q.handleResponse(A.unpack(U))}catch(Q){return G.onError(Q)}},q};return b(T,H,R,{disableLosslessIntegers:M,useBigInt:x},Z,$,G.onProtocolError.bind(G),K)}function b(E,w,T,R,L,j,M,x){switch(E){case 1:return new O.default(w,T,R,j,x,M);case 2:return new d.default(w,T,R,j,x,M);case 3:return new o.default(w,T,R,j,x,M);case 4:return new n.default(w,T,R,j,x,M);case 4.1:return new t.default(w,T,R,j,x,M,L);case 4.2:return new r.default(w,T,R,j,x,M,L);case 4.3:return new i.default(w,T,R,j,x,M,L);case 4.4:return new c.default(w,T,R,j,x,M,L);case 5:return new l.default(w,T,R,j,x,M,L);case 5.1:return new a.default(w,T,R,j,x,M,L);case 5.2:return new _.default(w,T,R,j,x,M,L);case 5.3:return new p.default(w,T,R,j,x,M,L);case 5.4:return new m.default(w,T,R,j,x,M,L);case 5.5:return new h.default(w,T,R,j,x,M,L);case 5.6:return new u.default(w,T,R,j,x,M,L);case 5.7:return new v.default(w,T,R,j,x,M,L);case 5.8:return new y.default(w,T,R,j,x,M,L);default:throw(0,g.newError)("Unknown Bolt protocol version: "+E)}}return pi}var zp;function ol(){return zp||(zp=1,(function(e){var g=bt&&bt.__createBinding||(Object.create?(function(i,c,l,a){a===void 0&&(a=l);var _=Object.getOwnPropertyDescriptor(c,l);(!_||("get"in _?!c.__esModule:_.writable||_.configurable))&&(_={enumerable:!0,get:function(){return c[l]}}),Object.defineProperty(i,a,_)}):(function(i,c,l,a){a===void 0&&(a=l),i[a]=c[l]})),O=bt&&bt.__exportStar||function(i,c){for(var l in i)l!=="default"&&!Object.prototype.hasOwnProperty.call(c,l)&&g(c,i,l)},d=bt&&bt.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(e,"__esModule",{value:!0}),e.RawRoutingTable=e.BoltProtocol=void 0;var o=d(GO()),n=d(JO()),t=d(il()),r=d(Um());O(er(),e),e.BoltProtocol=t.default,e.RawRoutingTable=r.default,e.default={handshake:o.default,create:n.default}})(bt)),bt}var Eu={},wi={},$p;function bg(){if($p)return wi;$p=1;var e=wi&&wi.__extends||(function(){var d=function(o,n){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])},d(o,n)};return function(o,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");d(o,n);function t(){this.constructor=o}o.prototype=n===null?Object.create(n):(t.prototype=n.prototype,new t)}})();Object.defineProperty(wi,"__esModule",{value:!0});var g=_e(),O=(function(d){e(o,d);function o(n){var t=d.call(this)||this;return t._connection=n,t}return o.prototype.acquireConnection=function(n){var t=n===void 0?{}:n;t.accessMode,t.database,t.bookmarks;var r=this._connection;return this._connection=null,Promise.resolve(r)},o})(g.ConnectionProvider);return wi.default=O,wi}var Ve={},Sr={},Ei={},Gp;function al(){if(Gp)return Ei;Gp=1;var e=Ei&&Ei.__extends||(function(){var d=function(o,n){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])},d(o,n)};return function(o,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");d(o,n);function t(){this.constructor=o}o.prototype=n===null?Object.create(n):(t.prototype=n.prototype,new t)}})();Object.defineProperty(Ei,"__esModule",{value:!0}),ol();var g=_e(),O=(function(d){e(o,d);function o(n){var t=d.call(this)||this;return t._errorHandler=n,t}return Object.defineProperty(o.prototype,"id",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"databaseId",{get:function(){throw new Error("not implemented")},set:function(n){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"authToken",{get:function(){throw new Error("not implemented")},set:function(n){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"supportsReAuth",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"creationTimestamp",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"idleTimestamp",{get:function(){throw new Error("not implemented")},set:function(n){throw new Error("not implemented")},enumerable:!1,configurable:!0}),o.prototype.protocol=function(){throw new Error("not implemented")},Object.defineProperty(o.prototype,"address",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"version",{get:function(){throw new Error("not implemented")},set:function(n){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"server",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),o.prototype.connect=function(n,t,r,i){throw new Error("not implemented")},o.prototype.write=function(n,t,r){throw new Error("not implemented")},o.prototype.close=function(){throw new Error("not implemented")},o.prototype.handleAndTransformError=function(n,t){return this._errorHandler?this._errorHandler.handleAndTransformError(n,t,this):n},o})(g.Connection);return Ei.default=O,Ei}var cr={},Yp;function e1(){if(Yp)return cr;Yp=1;var e=cr&&cr.__extends||(function(){var m=function(h,u){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,y){v.__proto__=y}||function(v,y){for(var s in y)Object.prototype.hasOwnProperty.call(y,s)&&(v[s]=y[s])},m(h,u)};return function(h,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");m(h,u);function v(){this.constructor=h}h.prototype=u===null?Object.create(u):(v.prototype=u.prototype,new v)}})(),g=cr&&cr.__awaiter||function(m,h,u,v){function y(s){return s instanceof u?s:new u(function(f){f(s)})}return new(u||(u=Promise))(function(s,f){function b(T){try{w(v.next(T))}catch(R){f(R)}}function E(T){try{w(v.throw(T))}catch(R){f(R)}}function w(T){T.done?s(T.value):y(T.value).then(b,E)}w((v=v.apply(m,h||[])).next())})},O=cr&&cr.__generator||function(m,h){var u={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},v,y,s,f=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return f.next=b(0),f.throw=b(1),f.return=b(2),typeof Symbol=="function"&&(f[Symbol.iterator]=function(){return this}),f;function b(w){return function(T){return E([w,T])}}function E(w){if(v)throw new TypeError("Generator is already executing.");for(;f&&(f=0,w[0]&&(u=0)),u;)try{if(v=1,y&&(s=w[0]&2?y.return:w[0]?y.throw||((s=y.return)&&s.call(y),0):y.next)&&!(s=s.call(y,w[1])).done)return s;switch(y=0,s&&(w=[w[0]&2,s.value]),w[0]){case 0:case 1:s=w;break;case 4:return u.label++,{value:w[1],done:!1};case 5:u.label++,y=w[1],w=[0];continue;case 7:w=u.ops.pop(),u.trys.pop();continue;default:if(s=u.trys,!(s=s.length>0&&s[s.length-1])&&(w[0]===6||w[0]===2)){u=0;continue}if(w[0]===3&&(!s||w[1]>s[0]&&w[1]<s[3])){u.label=w[1];break}if(w[0]===6&&u.label<s[1]){u.label=s[1],s=w;break}if(s&&u.label<s[2]){u.label=s[2],u.ops.push(w);break}s[2]&&u.ops.pop(),u.trys.pop();continue}w=h.call(m,u)}catch(T){w=[6,T],y=0}finally{v=s=0}if(w[0]&5)throw w[1];return{value:w[0]?w[1]:void 0,done:!0}}},d=cr&&cr.__importDefault||function(m){return m&&m.__esModule?m:{default:m}};Object.defineProperty(cr,"__esModule",{value:!0}),cr.createChannelConnection=a;var o=cn(),n=_e(),t=d(al()),r=d(ol()),i=n.error.PROTOCOL_ERROR,c=n.internal.logger.Logger,l=0;function a(m,h,u,v,y,s,f,b){s===void 0&&(s=null),b===void 0&&(b=function(T){return new o.Channel(T)});var E=new o.ChannelConfig(m,h,u.errorCode(),y),w=b(E);return r.default.handshake(w,v).then(function(T){var R=T.protocolVersion,L=T.consumeRemainingBuffer,j=new o.Chunker(w),M=new o.Dechunker,x=function(H){return r.default.create({version:R,channel:w,chunker:j,dechunker:M,disableLosslessIntegers:h.disableLosslessIntegers,useBigInt:h.useBigInt,serversideRouting:s,server:H.server,log:H.logger,observer:{onObserversCountChange:H._handleOngoingRequestsNumberChange.bind(H),onError:H._handleFatalError.bind(H),onFailure:H._resetOnFailure.bind(H),onProtocolError:H._handleProtocolError.bind(H),onErrorApplyTransformation:function(K){return H.handleAndTransformError(K,H._address)}}})},Z=new _(w,u,m,v,h.disableLosslessIntegers,s,j,h.notificationFilter,x,h.telemetryDisabled,f);return L(function(H){return M.write(H)}),Z}).catch(function(T){return w.close().then(function(){throw T})})}var _=(function(m){e(h,m);function h(u,v,y,s,f,b,E,w,T,R,L){f===void 0&&(f=!1),b===void 0&&(b=null),L===void 0&&(L=function(M){});var j=m.call(this,v)||this;return j._authToken=null,j._idle=!1,j._reseting=!1,j._resetObservers=[],j._id=l++,j._address=y,j._server={address:y.asHostPort()},j._creationTimestamp=Date.now(),j._disableLosslessIntegers=f,j._ch=u,j._chunker=E,j._log=p(j,s),j._serversideRouting=b,j._notificationFilter=w,j._telemetryDisabledDriverConfig=R===!0,j._telemetryDisabledConnection=!0,j._ssrCallback=L,j._dbConnectionId=null,j._protocol=T(j),j._isBroken=!1,j._log.isDebugEnabled()&&j._log.debug("created towards ".concat(y)),j}return h.prototype.beginTransaction=function(u){return this._sendTelemetryIfEnabled(u),this._protocol.beginTransaction(u)},h.prototype.run=function(u,v,y){return this._sendTelemetryIfEnabled(y),this._protocol.run(u,v,y)},h.prototype._sendTelemetryIfEnabled=function(u){this._telemetryDisabledConnection||this._telemetryDisabledDriverConfig||u==null||u.apiTelemetryConfig==null||this._protocol.telemetry({api:u.apiTelemetryConfig.api},{onCompleted:u.apiTelemetryConfig.onTelemetrySuccess,onError:u.beforeError})},h.prototype.commitTransaction=function(u){return this._protocol.commitTransaction(u)},h.prototype.rollbackTransaction=function(u){return this._protocol.rollbackTransaction(u)},h.prototype.getProtocolVersion=function(){return this._protocol.version},Object.defineProperty(h.prototype,"authToken",{get:function(){return this._authToken},set:function(u){this._authToken=u},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"supportsReAuth",{get:function(){return this._protocol.supportsReAuth},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"databaseId",{get:function(){return this._dbConnectionId},set:function(u){this._dbConnectionId=u},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"idleTimestamp",{get:function(){return this._idleTimestamp},set:function(u){this._idleTimestamp=u},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"creationTimestamp",{get:function(){return this._creationTimestamp},enumerable:!1,configurable:!0}),h.prototype.connect=function(u,v,y,s){return g(this,void 0,void 0,function(){var f=this;return O(this,function(b){switch(b.label){case 0:if(this._protocol.initialized&&!this._protocol.supportsReAuth)throw(0,n.newError)("Connection does not support re-auth");return this._authToken=y,this._protocol.initialized?[3,2]:[4,this._initialize(u,v,y)];case 1:return[2,b.sent()];case 2:return s?[4,new Promise(function(E,w){f._protocol.logoff({onError:w}),f._protocol.logon({authToken:y,onError:w,onComplete:function(){return E(f)},flush:!0})})]:[3,4];case 3:return[2,b.sent()];case 4:return this._protocol.logoff(),this._protocol.logon({authToken:y,flush:!0}),[2,this]}})})},h.prototype._initialize=function(u,v,y){var s=this,f=this;return new Promise(function(b,E){s._protocol.initialize({userAgent:u,boltAgent:v,authToken:y,notificationFilter:s._notificationFilter,onError:function(w){return E(w)},onComplete:function(w){var T;if(w){var R=w.server;(!s.version||R)&&(s.version=R);var L=w.connection_id;if(s.databaseId||(s.databaseId=L),w.hints){var j=w.hints["connection.recv_timeout_seconds"];if(j!=null){var M=(0,n.toNumber)(j);Number.isInteger(M)&&M>0?s._ch.setupReceiveTimeout(M*1e3):s._log.info("Server located at ".concat(s._address," supplied an invalid connection receive timeout value (").concat(M,"). ")+"Please, verify the server configuration and status because this can be the symptom of a bigger issue.")}var x=w.hints["telemetry.enabled"];x===!0&&(s._telemetryDisabledConnection=!1),s.SSREnabledHint=w.hints["ssr.enabled"]}s._ssrCallback((T=s.SSREnabledHint)!==null&&T!==void 0?T:!1,"OPEN")}b(f)}})})},h.prototype.protocol=function(){return this._protocol},Object.defineProperty(h.prototype,"address",{get:function(){return this._address},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"version",{get:function(){return this._server.version},set:function(u){this._server.version=u},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"server",{get:function(){return this._server},enumerable:!1,configurable:!0}),Object.defineProperty(h.prototype,"logger",{get:function(){return this._log},enumerable:!1,configurable:!0}),h.prototype._handleFatalError=function(u){this._isBroken=!0,this._error=this.handleAndTransformError(this._protocol.currentFailure||u,this._address),this._log.isErrorEnabled()&&this._log.error("experienced a fatal error caused by ".concat(this._error," (").concat(n.json.stringify(this._error),")")),this._protocol.notifyFatalError(this._error)},h.prototype._setIdle=function(u){this._idle=!0,this._ch.stopReceiveTimeout(),this._protocol.queueObserverIfProtocolIsNotBroken(u)},h.prototype._unsetIdle=function(){this._idle=!1,this._updateCurrentObserver()},h.prototype._queueObserver=function(u){return this._protocol.queueObserverIfProtocolIsNotBroken(u)},h.prototype.hasOngoingObservableRequests=function(){return!this._idle&&this._protocol.hasOngoingObservableRequests()},h.prototype.resetAndFlush=function(){var u=this;return new Promise(function(v,y){u._reset({onError:function(s){if(u._isBroken)y(s);else{var f=u._handleProtocolError("Received FAILURE as a response for RESET: ".concat(s));y(f)}},onComplete:function(){v()}})})},h.prototype._resetOnFailure=function(){var u=this;this.isOpen()&&this._reset({onError:function(){u._protocol.resetFailure()},onComplete:function(){u._protocol.resetFailure()}})},h.prototype._reset=function(u){var v=this;if(this._reseting){this._protocol.isLastMessageReset()?this._resetObservers.push(u):this._protocol.reset({onError:function(s){u.onError(s)},onComplete:function(){u.onComplete()}});return}this._resetObservers.push(u),this._reseting=!0;var y=function(s){v._reseting=!1;var f=v._resetObservers;v._resetObservers=[],f.forEach(s)};this._protocol.reset({onError:function(s){y(function(f){return f.onError(s)})},onComplete:function(){y(function(s){return s.onComplete()})}})},h.prototype._updateCurrentObserver=function(){this._protocol.updateCurrentObserver()},h.prototype.isOpen=function(){return!this._isBroken&&this._ch._open},h.prototype._handleOngoingRequestsNumberChange=function(u){this._idle||(u===0?this._ch.stopReceiveTimeout():this._ch.startReceiveTimeout())},h.prototype.close=function(){return g(this,void 0,void 0,function(){var u;return O(this,function(v){switch(v.label){case 0:return this._ssrCallback((u=this.SSREnabledHint)!==null&&u!==void 0?u:!1,"CLOSE"),this._log.isDebugEnabled()&&this._log.debug("closing"),this._protocol&&this.isOpen()&&this._protocol.prepareToClose(),[4,this._ch.close()];case 1:return v.sent(),this._log.isDebugEnabled()&&this._log.debug("closed"),[2]}})})},h.prototype.toString=function(){return"Connection [".concat(this.id,"][").concat(this.databaseId||"","]")},h.prototype._handleProtocolError=function(u){this._protocol.resetFailure(),this._updateCurrentObserver();var v=(0,n.newError)(u,i);return this._handleFatalError(v),v},h})(t.default);cr.default=_;function p(m,h){return new c(h._level,function(u,v){return h._loggerFunction(u,"".concat(m," ").concat(v))})}return cr}var Qt={},Kp;function r1(){if(Kp)return Qt;Kp=1;var e=Qt&&Qt.__extends||(function(){var o=function(n,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var c in i)Object.prototype.hasOwnProperty.call(i,c)&&(r[c]=i[c])},o(n,t)};return function(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");o(n,t);function r(){this.constructor=n}n.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}})(),g=Qt&&Qt.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(Qt,"__esModule",{value:!0});var O=g(al()),d=(function(o){e(n,o);function n(t,r){var i=o.call(this,r)||this;return r&&(i._originalErrorHandler=t._errorHandler,t._errorHandler=i._errorHandler),i._delegate=t,i}return n.prototype.beginTransaction=function(t){return this._delegate.beginTransaction(t)},n.prototype.run=function(t,r,i){return this._delegate.run(t,r,i)},n.prototype.commitTransaction=function(t){return this._delegate.commitTransaction(t)},n.prototype.rollbackTransaction=function(t){return this._delegate.rollbackTransaction(t)},n.prototype.getProtocolVersion=function(){return this._delegate.getProtocolVersion()},Object.defineProperty(n.prototype,"id",{get:function(){return this._delegate.id},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"databaseId",{get:function(){return this._delegate.databaseId},set:function(t){this._delegate.databaseId=t},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"server",{get:function(){return this._delegate.server},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"authToken",{get:function(){return this._delegate.authToken},set:function(t){this._delegate.authToken=t},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"supportsReAuth",{get:function(){return this._delegate.supportsReAuth},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"address",{get:function(){return this._delegate.address},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"version",{get:function(){return this._delegate.version},set:function(t){this._delegate.version=t},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"creationTimestamp",{get:function(){return this._delegate.creationTimestamp},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"idleTimestamp",{get:function(){return this._delegate.idleTimestamp},set:function(t){this._delegate.idleTimestamp=t},enumerable:!1,configurable:!0}),n.prototype.isOpen=function(){return this._delegate.isOpen()},n.prototype.protocol=function(){return this._delegate.protocol()},n.prototype.connect=function(t,r,i,c){return this._delegate.connect(t,r,i,c)},n.prototype.write=function(t,r,i){return this._delegate.write(t,r,i)},n.prototype.resetAndFlush=function(){return this._delegate.resetAndFlush()},n.prototype.hasOngoingObservableRequests=function(){return this._delegate.hasOngoingObservableRequests()},n.prototype.close=function(){return this._delegate.close()},n.prototype.release=function(){return this._originalErrorHandler&&(this._delegate._errorHandler=this._originalErrorHandler),this._delegate.release()},n})(O.default);return Qt.default=d,Qt}var oc={},Zp;function t1(){if(Zp)return oc;Zp=1,Object.defineProperty(oc,"__esModule",{value:!0});var e=_e(),g=e.error.SERVICE_UNAVAILABLE,O=e.error.SESSION_EXPIRED,d=(function(){function i(c,l,a,_){this._errorCode=c,this._handleUnavailability=l||r,this._handleWriteFailure=a||r,this._handleSecurityError=_||r}return i.create=function(c){var l=c.errorCode,a=c.handleUnavailability,_=c.handleWriteFailure,p=c.handleSecurityError;return new i(l,a,_,p)},i.prototype.errorCode=function(){return this._errorCode},i.prototype.handleAndTransformError=function(c,l,a){return o(c)?this._handleSecurityError(c,l,a):n(c)?this._handleUnavailability(c,l,a):t(c)?this._handleWriteFailure(c,l,a):c},i})();oc.default=d;function o(i){return i!=null&&i.code!=null&&i.code.startsWith("Neo.ClientError.Security.")}function n(i){return i?i.code===O||i.code===g||i.code==="Neo.TransientError.General.DatabaseUnavailable":!1}function t(i){return i?i.code==="Neo.ClientError.Cluster.NotALeader"||i.code==="Neo.ClientError.General.ForbiddenOnReadOnlyDatabase":!1}function r(i){return i}return oc}var Qp;function ul(){return Qp||(Qp=1,(function(e){var g=Sr&&Sr.__createBinding||(Object.create?(function(c,l,a,_){_===void 0&&(_=a);var p=Object.getOwnPropertyDescriptor(l,a);(!p||("get"in p?!l.__esModule:p.writable||p.configurable))&&(p={enumerable:!0,get:function(){return l[a]}}),Object.defineProperty(c,_,p)}):(function(c,l,a,_){_===void 0&&(_=a),c[_]=l[a]})),O=Sr&&Sr.__setModuleDefault||(Object.create?(function(c,l){Object.defineProperty(c,"default",{enumerable:!0,value:l})}):function(c,l){c.default=l}),d=Sr&&Sr.__importStar||(function(){var c=function(l){return c=Object.getOwnPropertyNames||function(a){var _=[];for(var p in a)Object.prototype.hasOwnProperty.call(a,p)&&(_[_.length]=p);return _},c(l)};return function(l){if(l&&l.__esModule)return l;var a={};if(l!=null)for(var _=c(l),p=0;p<_.length;p++)_[p]!=="default"&&g(a,l,_[p]);return O(a,l),a}})(),o=Sr&&Sr.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(e,"__esModule",{value:!0}),e.createChannelConnection=e.ConnectionErrorHandler=e.DelegateConnection=e.ChannelConnection=e.Connection=void 0;var n=o(al());e.Connection=n.default;var t=d(e1());e.ChannelConnection=t.default,Object.defineProperty(e,"createChannelConnection",{enumerable:!0,get:function(){return t.createChannelConnection}});var r=o(r1());e.DelegateConnection=r.default;var i=o(t1());e.ConnectionErrorHandler=i.default,e.default=n.default})(Sr)),Sr}var Xt={},Xp;function n1(){if(Xp)return Xt;Xp=1;var e=Xt&&Xt.__awaiter||function(n,t,r,i){function c(l){return l instanceof r?l:new r(function(a){a(l)})}return new(r||(r=Promise))(function(l,a){function _(h){try{m(i.next(h))}catch(u){a(u)}}function p(h){try{m(i.throw(h))}catch(u){a(u)}}function m(h){h.done?l(h.value):c(h.value).then(_,p)}m((i=i.apply(n,t||[])).next())})},g=Xt&&Xt.__generator||function(n,t){var r={label:0,sent:function(){if(l[0]&1)throw l[1];return l[1]},trys:[],ops:[]},i,c,l,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=_(0),a.throw=_(1),a.return=_(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function _(m){return function(h){return p([m,h])}}function p(m){if(i)throw new TypeError("Generator is already executing.");for(;a&&(a=0,m[0]&&(r=0)),r;)try{if(i=1,c&&(l=m[0]&2?c.return:m[0]?c.throw||((l=c.return)&&l.call(c),0):c.next)&&!(l=l.call(c,m[1])).done)return l;switch(c=0,l&&(m=[m[0]&2,l.value]),m[0]){case 0:case 1:l=m;break;case 4:return r.label++,{value:m[1],done:!1};case 5:r.label++,c=m[1],m=[0];continue;case 7:m=r.ops.pop(),r.trys.pop();continue;default:if(l=r.trys,!(l=l.length>0&&l[l.length-1])&&(m[0]===6||m[0]===2)){r=0;continue}if(m[0]===3&&(!l||m[1]>l[0]&&m[1]<l[3])){r.label=m[1];break}if(m[0]===6&&r.label<l[1]){r.label=l[1],l=m;break}if(l&&r.label<l[2]){r.label=l[2],r.ops.push(m);break}l[2]&&r.ops.pop(),r.trys.pop();continue}m=t.call(n,r)}catch(h){m=[6,h],c=0}finally{i=l=0}if(m[0]&5)throw m[1];return{value:m[0]?m[1]:void 0,done:!0}}};Object.defineProperty(Xt,"__esModule",{value:!0});var O=_e(),d=Fu(),o=(function(){function n(t){var r=t.authTokenManager,i=t.userAgent,c=t.boltAgent;this._authTokenManager=r||(0,O.staticAuthTokenManager)({}),this._userAgent=i,this._boltAgent=c}return n.prototype.authenticate=function(t){return e(this,arguments,void 0,function(r){var i,c,l=r.connection,a=r.auth,_=r.skipReAuth,p=r.waitReAuth,m=r.forceReAuth;return g(this,function(h){switch(h.label){case 0:return a==null?[3,3]:(i=l.supportsReAuth===!0&&(!d.object.equals(l.authToken,a)&&_!==!0||m===!0),l.authToken==null||i?[4,l.connect(this._userAgent,this._boltAgent,a,p||!1)]:[3,2]);case 1:return[2,h.sent()];case 2:return[2,l];case 3:return[4,this._authTokenManager.getToken()];case 4:return c=h.sent(),d.object.equals(c,l.authToken)?[3,6]:[4,l.connect(this._userAgent,this._boltAgent,c,!1)];case 5:return[2,h.sent()];case 6:return[2,l]}})})},n.prototype.handleError=function(t){var r=t.connection,i=t.code;return r&&i.startsWith("Neo.ClientError.Security.")?this._authTokenManager.handleSecurityException(r.authToken,i):!1},n})();return Xt.default=o,Xt}var Jt={},Jp;function i1(){if(Jp)return Jt;Jp=1;var e=Jt&&Jt.__awaiter||function(d,o,n,t){function r(i){return i instanceof n?i:new n(function(c){c(i)})}return new(n||(n=Promise))(function(i,c){function l(p){try{_(t.next(p))}catch(m){c(m)}}function a(p){try{_(t.throw(p))}catch(m){c(m)}}function _(p){p.done?i(p.value):r(p.value).then(l,a)}_((t=t.apply(d,o||[])).next())})},g=Jt&&Jt.__generator||function(d,o){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},t,r,i,c=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return c.next=l(0),c.throw=l(1),c.return=l(2),typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function l(_){return function(p){return a([_,p])}}function a(_){if(t)throw new TypeError("Generator is already executing.");for(;c&&(c=0,_[0]&&(n=0)),n;)try{if(t=1,r&&(i=_[0]&2?r.return:_[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,_[1])).done)return i;switch(r=0,i&&(_=[_[0]&2,i.value]),_[0]){case 0:case 1:i=_;break;case 4:return n.label++,{value:_[1],done:!1};case 5:n.label++,r=_[1],_=[0];continue;case 7:_=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(_[0]===6||_[0]===2)){n=0;continue}if(_[0]===3&&(!i||_[1]>i[0]&&_[1]<i[3])){n.label=_[1];break}if(_[0]===6&&n.label<i[1]){n.label=i[1],i=_;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(_);break}i[2]&&n.ops.pop(),n.trys.pop();continue}_=o.call(d,n)}catch(p){_=[6,p],r=0}finally{t=i=0}if(_[0]&5)throw _[1];return{value:_[0]?_[1]:void 0,done:!0}}};Object.defineProperty(Jt,"__esModule",{value:!0});var O=(function(){function d(o){var n=o.connectionLivenessCheckTimeout;this._connectionLivenessCheckTimeout=n}return d.prototype.check=function(o){return e(this,void 0,void 0,function(){var n;return g(this,function(t){switch(t.label){case 0:return this._isCheckDisabled||this._isNewlyCreatedConnection(o)?[2,!0]:(n=Date.now()-o.idleTimestamp,this._connectionLivenessCheckTimeout===0||n>this._connectionLivenessCheckTimeout?[4,o.resetAndFlush().then(function(){return!0})]:[3,2]);case 1:return[2,t.sent()];case 2:return[2,!0]}})})},Object.defineProperty(d.prototype,"_isCheckDisabled",{get:function(){return this._connectionLivenessCheckTimeout==null||this._connectionLivenessCheckTimeout<0},enumerable:!1,configurable:!0}),d.prototype._isNewlyCreatedConnection=function(o){return o.authToken==null},d})();return Jt.default=O,Jt}var en={},ey;function o1(){if(ey)return en;ey=1;var e=en&&en.__awaiter||function(o,n,t,r){function i(c){return c instanceof t?c:new t(function(l){l(c)})}return new(t||(t=Promise))(function(c,l){function a(m){try{p(r.next(m))}catch(h){l(h)}}function _(m){try{p(r.throw(m))}catch(h){l(h)}}function p(m){m.done?c(m.value):i(m.value).then(a,_)}p((r=r.apply(o,n||[])).next())})},g=en&&en.__generator||function(o,n){var t={label:0,sent:function(){if(c[0]&1)throw c[1];return c[1]},trys:[],ops:[]},r,i,c,l=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return l.next=a(0),l.throw=a(1),l.return=a(2),typeof Symbol=="function"&&(l[Symbol.iterator]=function(){return this}),l;function a(p){return function(m){return _([p,m])}}function _(p){if(r)throw new TypeError("Generator is already executing.");for(;l&&(l=0,p[0]&&(t=0)),t;)try{if(r=1,i&&(c=p[0]&2?i.return:p[0]?i.throw||((c=i.return)&&c.call(i),0):i.next)&&!(c=c.call(i,p[1])).done)return c;switch(i=0,c&&(p=[p[0]&2,c.value]),p[0]){case 0:case 1:c=p;break;case 4:return t.label++,{value:p[1],done:!1};case 5:t.label++,i=p[1],p=[0];continue;case 7:p=t.ops.pop(),t.trys.pop();continue;default:if(c=t.trys,!(c=c.length>0&&c[c.length-1])&&(p[0]===6||p[0]===2)){t=0;continue}if(p[0]===3&&(!c||p[1]>c[0]&&p[1]<c[3])){t.label=p[1];break}if(p[0]===6&&t.label<c[1]){t.label=c[1],c=p;break}if(c&&t.label<c[2]){t.label=c[2],t.ops.push(p);break}c[2]&&t.ops.pop(),t.trys.pop();continue}p=n.call(o,t)}catch(m){p=[6,m],i=0}finally{r=c=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}};Object.defineProperty(en,"__esModule",{value:!0});var O=cn(),d=(function(){function o(n){var t=n.clientCertificateProvider,r=n.loader;this._clientCertificateProvider=t,this._loader=r||O.ClientCertificatesLoader,this._clientCertificate=null}return o.prototype.getClientCertificate=function(){return e(this,void 0,void 0,function(){var n,t,r=this;return g(this,function(i){switch(i.label){case 0:return n=this._clientCertificateProvider!=null,n?(t=this._clientCertificate==null,t?[3,2]:[4,this._clientCertificateProvider.hasUpdate()]):[3,3];case 1:t=i.sent(),i.label=2;case 2:n=t,i.label=3;case 3:return n&&(this._clientCertificate=Promise.resolve(this._clientCertificateProvider.getClientCertificate()).then(this._loader.load).then(function(c){return r._clientCertificate=c,r._clientCertificate}).catch(function(c){throw r._clientCertificate=null,c})),[2,this._clientCertificate]}})})},o})();return en.default=d,en}var ry;function cl(){if(ry)return Ve;ry=1;var e=Ve&&Ve.__extends||(function(){var y=function(s,f){return y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,E){b.__proto__=E}||function(b,E){for(var w in E)Object.prototype.hasOwnProperty.call(E,w)&&(b[w]=E[w])},y(s,f)};return function(s,f){if(typeof f!="function"&&f!==null)throw new TypeError("Class extends value "+String(f)+" is not a constructor or null");y(s,f);function b(){this.constructor=s}s.prototype=f===null?Object.create(f):(b.prototype=f.prototype,new b)}})(),g=Ve&&Ve.__awaiter||function(y,s,f,b){function E(w){return w instanceof f?w:new f(function(T){T(w)})}return new(f||(f=Promise))(function(w,T){function R(M){try{j(b.next(M))}catch(x){T(x)}}function L(M){try{j(b.throw(M))}catch(x){T(x)}}function j(M){M.done?w(M.value):E(M.value).then(R,L)}j((b=b.apply(y,s||[])).next())})},O=Ve&&Ve.__generator||function(y,s){var f={label:0,sent:function(){if(w[0]&1)throw w[1];return w[1]},trys:[],ops:[]},b,E,w,T=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return T.next=R(0),T.throw=R(1),T.return=R(2),typeof Symbol=="function"&&(T[Symbol.iterator]=function(){return this}),T;function R(j){return function(M){return L([j,M])}}function L(j){if(b)throw new TypeError("Generator is already executing.");for(;T&&(T=0,j[0]&&(f=0)),f;)try{if(b=1,E&&(w=j[0]&2?E.return:j[0]?E.throw||((w=E.return)&&w.call(E),0):E.next)&&!(w=w.call(E,j[1])).done)return w;switch(E=0,w&&(j=[j[0]&2,w.value]),j[0]){case 0:case 1:w=j;break;case 4:return f.label++,{value:j[1],done:!1};case 5:f.label++,E=j[1],j=[0];continue;case 7:j=f.ops.pop(),f.trys.pop();continue;default:if(w=f.trys,!(w=w.length>0&&w[w.length-1])&&(j[0]===6||j[0]===2)){f=0;continue}if(j[0]===3&&(!w||j[1]>w[0]&&j[1]<w[3])){f.label=j[1];break}if(j[0]===6&&f.label<w[1]){f.label=w[1],w=j;break}if(w&&f.label<w[2]){f.label=w[2],f.ops.push(j);break}w[2]&&f.ops.pop(),f.trys.pop();continue}j=s.call(y,f)}catch(M){j=[6,M],E=0}finally{b=w=0}if(j[0]&5)throw j[1];return{value:j[0]?j[1]:void 0,done:!0}}},d=Ve&&Ve.__read||function(y,s){var f=typeof Symbol=="function"&&y[Symbol.iterator];if(!f)return y;var b=f.call(y),E,w=[],T;try{for(;(s===void 0||s-- >0)&&!(E=b.next()).done;)w.push(E.value)}catch(R){T={error:R}}finally{try{E&&!E.done&&(f=b.return)&&f.call(b)}finally{if(T)throw T.error}}return w},o=Ve&&Ve.__spreadArray||function(y,s,f){if(f||arguments.length===2)for(var b=0,E=s.length,w;b<E;b++)(w||!(b in s))&&(w||(w=Array.prototype.slice.call(s,0,b)),w[b]=s[b]);return y.concat(w||Array.prototype.slice.call(s))},n=Ve&&Ve.__importDefault||function(y){return y&&y.__esModule?y:{default:y}};Object.defineProperty(Ve,"__esModule",{value:!0});var t=ul(),r=_e(),i=n(n1()),c=Fu(),l=n(i1()),a=n(o1()),_=r.error.SERVICE_UNAVAILABLE,p=["Neo.ClientError.Security.CredentialsExpired","Neo.ClientError.Security.Forbidden","Neo.ClientError.Security.TokenExpired","Neo.ClientError.Security.Unauthorized"],m=r.internal.pool,h=m.Pool,u=m.PoolConfig,v=(function(y){e(s,y);function s(f,b){var E=f.id,w=f.config,T=f.log,R=f.userAgent,L=f.boltAgent,j=f.authTokenManager,M=f.newPool,x=M===void 0?function(){for(var H=[],K=0;K<arguments.length;K++)H[K]=arguments[K];return new(h.bind.apply(h,o([void 0],d(H),!1)))}:M;b===void 0&&(b=null);var Z=y.call(this)||this;return Z._id=E,Z._config=w,Z._log=T,Z._clientCertificateHolder=new a.default({clientCertificateProvider:Z._config.clientCertificate}),Z._authenticationProvider=new i.default({authTokenManager:j,userAgent:R,boltAgent:L}),Z._livenessCheckProvider=new l.default({connectionLivenessCheckTimeout:w.connectionLivenessCheckTimeout}),Z._userAgent=R,Z._boltAgent=L,Z._createChannelConnection=b||(function(H){return g(Z,void 0,void 0,function(){var K,G;return O(this,function($){switch($.label){case 0:return K=t.createChannelConnection,G=[H,this._config,this._createConnectionErrorHandler(),this._log],[4,this._clientCertificateHolder.getClientCertificate()];case 1:return[2,K.apply(void 0,G.concat([$.sent()]))]}})})}),Z._connectionPool=x({create:Z._createConnection.bind(Z),destroy:Z._destroyConnection.bind(Z),validateOnAcquire:Z._validateConnectionOnAcquire.bind(Z),validateOnRelease:Z._validateConnectionOnRelease.bind(Z),installIdleObserver:s._installIdleObserverOnConnection.bind(Z),removeIdleObserver:s._removeIdleObserverOnConnection.bind(Z),config:u.fromDriverConfig(w),log:Z._log}),Z._openConnections={},Z}return s.prototype._createConnectionErrorHandler=function(){return new t.ConnectionErrorHandler(_)},s.prototype._getClientCertificate=function(){return g(this,void 0,void 0,function(){return O(this,function(f){return[2,this._config.clientCertificate.getClientCertificate()]})})},s.prototype._createConnection=function(f,b,E){var w=this,T=f.auth;return this._createChannelConnection(b).then(function(R){return R.release=function(){return R.idleTimestamp=Date.now(),E(b,R)},w._openConnections[R.id]=R,w._authenticationProvider.authenticate({connection:R,auth:T}).catch(function(L){throw w._destroyConnection(R),L})})},s.prototype._validateConnectionOnAcquire=function(f,b){return g(this,arguments,void 0,function(E,w){var T,R,L=E.auth,j=E.skipReAuth;return O(this,function(M){switch(M.label){case 0:if(!this._validateConnection(w))return[2,!1];M.label=1;case 1:return M.trys.push([1,3,,4]),[4,this._livenessCheckProvider.check(w)];case 2:return M.sent(),[3,4];case 3:return T=M.sent(),this._log.debug("The connection ".concat(w.id," is not alive because of an error ").concat(T.code," '").concat(T.message,"'")),[2,!1];case 4:return M.trys.push([4,6,,7]),[4,this._authenticationProvider.authenticate({connection:w,auth:L,skipReAuth:j})];case 5:return M.sent(),[2,!0];case 6:return R=M.sent(),this._log.debug("The connection ".concat(w.id," is not valid because of an error ").concat(R.code," '").concat(R.message,"'")),[2,!1];case 7:return[2]}})})},s.prototype._validateConnectionOnRelease=function(f){return f._sticky!==!0&&this._validateConnection(f)},s.prototype._validateConnection=function(f){if(!f.isOpen())return!1;var b=this._config.maxConnectionLifetime,E=Date.now()-f.creationTimestamp;return!(E>b)},s.prototype._destroyConnection=function(f){return delete this._openConnections[f.id],f.close()},s.prototype._verifyConnectivityAndGetServerVersion=function(f){return g(this,arguments,void 0,function(b){var E,w,T=b.address;return O(this,function(R){switch(R.label){case 0:return[4,this._connectionPool.acquire({},T)];case 1:E=R.sent(),w=new r.ServerInfo(E.server,E.protocol().version),R.label=2;case 2:return R.trys.push([2,,5,7]),E.protocol().isLastMessageLogon()?[3,4]:[4,E.resetAndFlush()];case 3:R.sent(),R.label=4;case 4:return[3,7];case 5:return[4,E.release()];case 6:return R.sent(),[7];case 7:return[2,w]}})})},s.prototype._verifyAuthentication=function(f){return g(this,arguments,void 0,function(b){var E,w,T,R,L,j,M=b.getAddress,x=b.auth;return O(this,function(Z){switch(Z.label){case 0:E=[],Z.label=1;case 1:return Z.trys.push([1,8,9,11]),[4,M()];case 2:return w=Z.sent(),[4,this._connectionPool.acquire({auth:x,skipReAuth:!0},w)];case 3:if(T=Z.sent(),E.push(T),R=!T.protocol().isLastMessageLogon(),!T.supportsReAuth)throw(0,r.newError)("Driver is connected to a database that does not support user switch.");return R&&T.supportsReAuth?[4,this._authenticationProvider.authenticate({connection:T,auth:x,waitReAuth:!0,forceReAuth:!0})]:[3,5];case 4:return Z.sent(),[3,7];case 5:return R&&!T.supportsReAuth?[4,this._connectionPool.acquire({auth:x},w,{requireNew:!0})]:[3,7];case 6:L=Z.sent(),L._sticky=!0,E.push(L),Z.label=7;case 7:return[2,!0];case 8:if(j=Z.sent(),p.includes(j.code))return[2,!1];throw j;case 9:return[4,Promise.all(E.map(function(H){return H.release()}))];case 10:return Z.sent(),[7];case 11:return[2]}})})},s.prototype._verifyStickyConnection=function(f){return g(this,arguments,void 0,function(b){var E,w,T=b.auth,R=b.connection;return b.address,O(this,function(L){switch(L.label){case 0:return E=c.object.equals(T,R.authToken),w=!E,R._sticky=E&&!R.supportsReAuth,w||R._sticky?[4,R.release()]:[3,2];case 1:throw L.sent(),(0,r.newError)("Driver is connected to a database that does not support user switch.");case 2:return[2]}})})},s.prototype.close=function(){return g(this,void 0,void 0,function(){return O(this,function(f){switch(f.label){case 0:return[4,this._connectionPool.close()];case 1:return f.sent(),[4,Promise.all(Object.values(this._openConnections).map(function(b){return b.close()}))];case 2:return f.sent(),[2]}})})},s._installIdleObserverOnConnection=function(f,b){f._setIdle(b)},s._removeIdleObserverOnConnection=function(f){f._unsetIdle()},s.prototype._handleSecurityError=function(f,b,E){var w=this._authenticationProvider.handleError({connection:E,code:f.code});return w&&(f.retriable=!0),f.code==="Neo.ClientError.Security.AuthorizationExpired"&&this._connectionPool.apply(b,function(T){T.authToken=null}),E&&E.close().catch(function(){}),f},s})(r.ConnectionProvider);return Ve.default=v,Ve}var dr={},ty;function a1(){if(ty)return dr;ty=1;var e=dr&&dr.__extends||(function(){var m=function(h,u){return m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(v,y){v.__proto__=y}||function(v,y){for(var s in y)Object.prototype.hasOwnProperty.call(y,s)&&(v[s]=y[s])},m(h,u)};return function(h,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");m(h,u);function v(){this.constructor=h}h.prototype=u===null?Object.create(u):(v.prototype=u.prototype,new v)}})(),g=dr&&dr.__awaiter||function(m,h,u,v){function y(s){return s instanceof u?s:new u(function(f){f(s)})}return new(u||(u=Promise))(function(s,f){function b(T){try{w(v.next(T))}catch(R){f(R)}}function E(T){try{w(v.throw(T))}catch(R){f(R)}}function w(T){T.done?s(T.value):y(T.value).then(b,E)}w((v=v.apply(m,h||[])).next())})},O=dr&&dr.__generator||function(m,h){var u={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},v,y,s,f=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return f.next=b(0),f.throw=b(1),f.return=b(2),typeof Symbol=="function"&&(f[Symbol.iterator]=function(){return this}),f;function b(w){return function(T){return E([w,T])}}function E(w){if(v)throw new TypeError("Generator is already executing.");for(;f&&(f=0,w[0]&&(u=0)),u;)try{if(v=1,y&&(s=w[0]&2?y.return:w[0]?y.throw||((s=y.return)&&s.call(y),0):y.next)&&!(s=s.call(y,w[1])).done)return s;switch(y=0,s&&(w=[w[0]&2,s.value]),w[0]){case 0:case 1:s=w;break;case 4:return u.label++,{value:w[1],done:!1};case 5:u.label++,y=w[1],w=[0];continue;case 7:w=u.ops.pop(),u.trys.pop();continue;default:if(s=u.trys,!(s=s.length>0&&s[s.length-1])&&(w[0]===6||w[0]===2)){u=0;continue}if(w[0]===3&&(!s||w[1]>s[0]&&w[1]<s[3])){u.label=w[1];break}if(w[0]===6&&u.label<s[1]){u.label=s[1],s=w;break}if(s&&u.label<s[2]){u.label=s[2],u.ops.push(w);break}s[2]&&u.ops.pop(),u.trys.pop();continue}w=h.call(m,u)}catch(T){w=[6,T],y=0}finally{v=s=0}if(w[0]&5)throw w[1];return{value:w[0]?w[1]:void 0,done:!0}}},d=dr&&dr.__importDefault||function(m){return m&&m.__esModule?m:{default:m}};Object.defineProperty(dr,"__esModule",{value:!0});var o=d(cl()),n=ul(),t=_e(),r=t.internal.constants,i=r.BOLT_PROTOCOL_V3,c=r.BOLT_PROTOCOL_V4_0,l=r.BOLT_PROTOCOL_V4_4,a=r.BOLT_PROTOCOL_V5_1,_=t.error.SERVICE_UNAVAILABLE,p=(function(m){e(h,m);function h(u){var v=u.id,y=u.config,s=u.log,f=u.address,b=u.userAgent,E=u.boltAgent,w=u.authTokenManager,T=u.newPool,R=m.call(this,{id:v,config:y,log:s,userAgent:b,boltAgent:E,authTokenManager:w,newPool:T})||this;return R._address=f,R}return h.prototype.acquireConnection=function(){return g(this,arguments,void 0,function(u){var v,y,s=this,f=u===void 0?{}:u;f.accessMode;var b=f.database;f.bookmarks;var E=f.auth,w=f.forceReAuth;return O(this,function(T){switch(T.label){case 0:return v=n.ConnectionErrorHandler.create({errorCode:_,handleSecurityError:function(R,L,j){return s._handleSecurityError(R,L,j,b)}}),[4,this._connectionPool.acquire({auth:E,forceReAuth:w},this._address)];case 1:return y=T.sent(),E?[4,this._verifyStickyConnection({auth:E,connection:y,address:this._address})]:[3,3];case 2:return T.sent(),[2,y];case 3:return[2,new n.DelegateConnection(y,v)]}})})},h.prototype._handleSecurityError=function(u,v,y,s){return this._log.warn("Direct driver ".concat(this._id," will close connection to ").concat(v," for database '").concat(s,"' because of an error ").concat(u.code," '").concat(u.message,"'")),m.prototype._handleSecurityError.call(this,u,v,y)},h.prototype._hasProtocolVersion=function(u){return g(this,void 0,void 0,function(){var v,y;return O(this,function(s){switch(s.label){case 0:return[4,this._createChannelConnection(this._address)];case 1:return v=s.sent(),y=v.protocol()?v.protocol().version:null,[4,v.close()];case 2:return s.sent(),y?[2,u(y)]:[2,!1]}})})},h.prototype.supportsMultiDb=function(){return g(this,void 0,void 0,function(){return O(this,function(u){switch(u.label){case 0:return[4,this._hasProtocolVersion(function(v){return v>=c})];case 1:return[2,u.sent()]}})})},h.prototype.getNegotiatedProtocolVersion=function(){var u=this;return new Promise(function(v,y){u._hasProtocolVersion(v).catch(y)})},h.prototype.supportsTransactionConfig=function(){return g(this,void 0,void 0,function(){return O(this,function(u){switch(u.label){case 0:return[4,this._hasProtocolVersion(function(v){return v>=i})];case 1:return[2,u.sent()]}})})},h.prototype.supportsUserImpersonation=function(){return g(this,void 0,void 0,function(){return O(this,function(u){switch(u.label){case 0:return[4,this._hasProtocolVersion(function(v){return v>=l})];case 1:return[2,u.sent()]}})})},h.prototype.supportsSessionAuth=function(){return g(this,void 0,void 0,function(){return O(this,function(u){switch(u.label){case 0:return[4,this._hasProtocolVersion(function(v){return v>=a})];case 1:return[2,u.sent()]}})})},h.prototype.verifyAuthentication=function(u){return g(this,arguments,void 0,function(v){var y=this,s=v.auth;return O(this,function(f){return[2,this._verifyAuthentication({auth:s,getAddress:function(){return y._address}})]})})},h.prototype.verifyConnectivityAndGetServerInfo=function(){return g(this,void 0,void 0,function(){return O(this,function(u){switch(u.label){case 0:return[4,this._verifyConnectivityAndGetServerVersion({address:this._address})];case 1:return[2,u.sent()]}})})},h})(o.default);return dr.default=p,dr}var De={},$r={},Ti={},Ot={},ny;function mg(){if(ny)return Ot;ny=1;var e=Ot&&Ot.__read||function(u,v){var y=typeof Symbol=="function"&&u[Symbol.iterator];if(!y)return u;var s=y.call(u),f,b=[],E;try{for(;(v===void 0||v-- >0)&&!(f=s.next()).done;)b.push(f.value)}catch(w){E={error:w}}finally{try{f&&!f.done&&(y=s.return)&&y.call(s)}finally{if(E)throw E.error}}return b},g=Ot&&Ot.__spreadArray||function(u,v,y){if(y||arguments.length===2)for(var s=0,f=v.length,b;s<f;s++)(b||!(s in v))&&(b||(b=Array.prototype.slice.call(v,0,s)),b[s]=v[s]);return u.concat(b||Array.prototype.slice.call(v))};Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.createValidRoutingTable=a;var O=_e(),d=O.internal.constants,o=d.ACCESS_MODE_WRITE,n=d.ACCESS_MODE_READ,t=O.internal.serverAddress.ServerAddress,r=O.error.PROTOCOL_ERROR,i=1,c=(function(){function u(v){var y=v===void 0?{}:v,s=y.database,f=y.routers,b=y.readers,E=y.writers,w=y.expirationTime,T=y.ttl;this.database=s||null,this.databaseName=s||"default database",this.routers=f||[],this.readers=b||[],this.writers=E||[],this.expirationTime=w||(0,O.int)(0),this.ttl=T}return u.fromRawRoutingTable=function(v,y,s){return a(v,y,s)},u.prototype.forget=function(v){this.readers=l(this.readers,v),this.writers=l(this.writers,v)},u.prototype.forgetRouter=function(v){this.routers=l(this.routers,v)},u.prototype.forgetWriter=function(v){this.writers=l(this.writers,v)},u.prototype.isStaleFor=function(v){return this.expirationTime.lessThan(Date.now())||this.routers.length<i||v===n&&this.readers.length===0||v===o&&this.writers.length===0},u.prototype.isExpiredFor=function(v){return this.expirationTime.add(v).lessThan(Date.now())},u.prototype.allServers=function(){return g(g(g([],e(this.routers),!1),e(this.readers),!1),e(this.writers),!1)},u.prototype.toString=function(){return"RoutingTable["+"database=".concat(this.databaseName,", ")+"expirationTime=".concat(this.expirationTime,", ")+"currentTime=".concat(Date.now(),", ")+"routers=[".concat(this.routers,"], ")+"readers=[".concat(this.readers,"], ")+"writers=[".concat(this.writers,"]]")},u})();Ot.default=c;function l(u,v){return u.filter(function(y){return y.asKey()!==v.asKey()})}function a(u,v,y){var s=y.ttl,f=p(y,v),b=_(y,v),E=b.routers,w=b.readers,T=b.writers;return m(E,"routers",v),m(w,"readers",v),new c({database:u||y.db,routers:E,readers:w,writers:T,expirationTime:f,ttl:s})}function _(u,v){try{var y=[],s=[],f=[];return u.servers.forEach(function(b){var E=b.role,w=b.addresses;E==="ROUTE"?y=h(w).map(function(T){return t.fromUrl(T)}):E==="WRITE"?f=h(w).map(function(T){return t.fromUrl(T)}):E==="READ"&&(s=h(w).map(function(T){return t.fromUrl(T)}))}),{routers:y,readers:s,writers:f}}catch(b){throw(0,O.newError)("Unable to parse servers entry from router ".concat(v,` from addresses:
|
|
7
|
+
`).concat(O.json.stringify(u.servers),`
|
|
8
|
+
Error message: `).concat(b.message),r)}}function p(u,v){try{var y=(0,O.int)(Date.now()),s=(0,O.int)(u.ttl).multiply(1e3).add(y);return s.lessThan(y)?O.Integer.MAX_VALUE:s}catch(f){throw(0,O.newError)("Unable to parse TTL entry from router ".concat(v,` from raw routing table:
|
|
9
|
+
`).concat(O.json.stringify(u),`
|
|
10
|
+
Error message: `).concat(f.message),r)}}function m(u,v,y){if(u.length===0)throw(0,O.newError)("Received no "+v+" from router "+y,r)}function h(u){if(!Array.isArray(u))throw new TypeError("Array expected but got: "+u);return Array.from(u)}return Ot}var iy;function u1(){if(iy)return Ti;iy=1;var e=Ti&&Ti.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(Ti,"__esModule",{value:!0});var g=e(mg());_e();var O=(function(){function d(o){this._routingContext=o}return d.prototype.lookupRoutingTableOnRouter=function(o,n,t,r){var i=this;return o._acquireConnection(function(c){return i._requestRawRoutingTable(c,o,n,t,r).then(function(l){return l.isNull?null:g.default.fromRawRoutingTable(n,t,l)})})},d.prototype._requestRawRoutingTable=function(o,n,t,r,i){var c=this;return new Promise(function(l,a){o.protocol().requestRoutingInformation({routingContext:c._routingContext,databaseName:t,impersonatedUser:i,sessionContext:{bookmarks:n._lastBookmarks,mode:n._mode,database:n._database,afterComplete:n._onComplete},onCompleted:l,onError:a})})},d})();return Ti.default=O,Ti}var oy;function c1(){if(oy)return $r;oy=1;var e=$r&&$r.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty($r,"__esModule",{value:!0}),$r.RoutingTable=$r.Rediscovery=void 0;var g=e(u1());$r.Rediscovery=g.default;var O=e(mg());return $r.RoutingTable=O.default,$r.default=g.default,$r}var ay;function s1(){if(ay)return De;ay=1;var e=De&&De.__extends||(function(){var k=function(W,F){return k=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Y,X){Y.__proto__=X}||function(Y,X){for(var ne in X)Object.prototype.hasOwnProperty.call(X,ne)&&(Y[ne]=X[ne])},k(W,F)};return function(W,F){if(typeof F!="function"&&F!==null)throw new TypeError("Class extends value "+String(F)+" is not a constructor or null");k(W,F);function Y(){this.constructor=W}W.prototype=F===null?Object.create(F):(Y.prototype=F.prototype,new Y)}})(),g=De&&De.__assign||function(){return g=Object.assign||function(k){for(var W,F=1,Y=arguments.length;F<Y;F++){W=arguments[F];for(var X in W)Object.prototype.hasOwnProperty.call(W,X)&&(k[X]=W[X])}return k},g.apply(this,arguments)},O=De&&De.__createBinding||(Object.create?(function(k,W,F,Y){Y===void 0&&(Y=F);var X=Object.getOwnPropertyDescriptor(W,F);(!X||("get"in X?!W.__esModule:X.writable||X.configurable))&&(X={enumerable:!0,get:function(){return W[F]}}),Object.defineProperty(k,Y,X)}):(function(k,W,F,Y){Y===void 0&&(Y=F),k[Y]=W[F]})),d=De&&De.__setModuleDefault||(Object.create?(function(k,W){Object.defineProperty(k,"default",{enumerable:!0,value:W})}):function(k,W){k.default=W}),o=De&&De.__importStar||(function(){var k=function(W){return k=Object.getOwnPropertyNames||function(F){var Y=[];for(var X in F)Object.prototype.hasOwnProperty.call(F,X)&&(Y[Y.length]=X);return Y},k(W)};return function(W){if(W&&W.__esModule)return W;var F={};if(W!=null)for(var Y=k(W),X=0;X<Y.length;X++)Y[X]!=="default"&&O(F,W,Y[X]);return d(F,W),F}})(),n=De&&De.__awaiter||function(k,W,F,Y){function X(ne){return ne instanceof F?ne:new F(function(le){le(ne)})}return new(F||(F=Promise))(function(ne,le){function de(I){try{P(Y.next(I))}catch(B){le(B)}}function D(I){try{P(Y.throw(I))}catch(B){le(B)}}function P(I){I.done?ne(I.value):X(I.value).then(de,D)}P((Y=Y.apply(k,W||[])).next())})},t=De&&De.__generator||function(k,W){var F={label:0,sent:function(){if(ne[0]&1)throw ne[1];return ne[1]},trys:[],ops:[]},Y,X,ne,le=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return le.next=de(0),le.throw=de(1),le.return=de(2),typeof Symbol=="function"&&(le[Symbol.iterator]=function(){return this}),le;function de(P){return function(I){return D([P,I])}}function D(P){if(Y)throw new TypeError("Generator is already executing.");for(;le&&(le=0,P[0]&&(F=0)),F;)try{if(Y=1,X&&(ne=P[0]&2?X.return:P[0]?X.throw||((ne=X.return)&&ne.call(X),0):X.next)&&!(ne=ne.call(X,P[1])).done)return ne;switch(X=0,ne&&(P=[P[0]&2,ne.value]),P[0]){case 0:case 1:ne=P;break;case 4:return F.label++,{value:P[1],done:!1};case 5:F.label++,X=P[1],P=[0];continue;case 7:P=F.ops.pop(),F.trys.pop();continue;default:if(ne=F.trys,!(ne=ne.length>0&&ne[ne.length-1])&&(P[0]===6||P[0]===2)){F=0;continue}if(P[0]===3&&(!ne||P[1]>ne[0]&&P[1]<ne[3])){F.label=P[1];break}if(P[0]===6&&F.label<ne[1]){F.label=ne[1],ne=P;break}if(ne&&F.label<ne[2]){F.label=ne[2],F.ops.push(P);break}ne[2]&&F.ops.pop(),F.trys.pop();continue}P=W.call(k,F)}catch(I){P=[6,I],X=0}finally{Y=ne=0}if(P[0]&5)throw P[1];return{value:P[0]?P[1]:void 0,done:!0}}},r=De&&De.__values||function(k){var W=typeof Symbol=="function"&&Symbol.iterator,F=W&&k[W],Y=0;if(F)return F.call(k);if(k&&typeof k.length=="number")return{next:function(){return k&&Y>=k.length&&(k=void 0),{value:k&&k[Y++],done:!k}}};throw new TypeError(W?"Object is not iterable.":"Symbol.iterator is not defined.")},i=De&&De.__read||function(k,W){var F=typeof Symbol=="function"&&k[Symbol.iterator];if(!F)return k;var Y=F.call(k),X,ne=[],le;try{for(;(W===void 0||W-- >0)&&!(X=Y.next()).done;)ne.push(X.value)}catch(de){le={error:de}}finally{try{X&&!X.done&&(F=Y.return)&&F.call(Y)}finally{if(le)throw le.error}}return ne},c=De&&De.__importDefault||function(k){return k&&k.__esModule?k:{default:k}};Object.defineProperty(De,"__esModule",{value:!0});var l=_e(),a=o(c1()),_=cn(),p=c(bg()),m=c(cl()),h=Mm(),u=ul(),v=Fu(),y=l.error.SERVICE_UNAVAILABLE,s=l.error.SESSION_EXPIRED,f=l.internal.bookmarks.Bookmarks,b=l.internal.constants,E=b.ACCESS_MODE_READ,w=b.ACCESS_MODE_WRITE,T=b.BOLT_PROTOCOL_V3,R=b.BOLT_PROTOCOL_V4_0,L=b.BOLT_PROTOCOL_V4_4,j=b.BOLT_PROTOCOL_V5_1,M="Neo.ClientError.Procedure.ProcedureNotFound",x="Neo.ClientError.Database.DatabaseNotFound",Z="Neo.ClientError.Transaction.InvalidBookmark",H="Neo.ClientError.Transaction.InvalidBookmarkMixture",K="Neo.ClientError.Security.AuthorizationExpired",G="Neo.ClientError.Statement.ArgumentError",$="Neo.ClientError.Request.Invalid",A="Neo.ClientError.Statement.TypeError",q="N/A",U="system",Q=null,te=(0,l.int)(3e4),z=(function(k){e(W,k);function W(F){var Y=F.id,X=F.address,ne=F.routingContext,le=F.hostNameResolver,de=F.config,D=F.log,P=F.userAgent,I=F.boltAgent,B=F.authTokenManager,ee=F.routingTablePurgeDelay,ue=F.newPool,oe=k.call(this,{id:Y,config:de,log:D,userAgent:P,boltAgent:I,authTokenManager:B,newPool:ue},function(ve){return n(oe,void 0,void 0,function(){var pe,ye;return t(this,function(me){switch(me.label){case 0:return pe=u.createChannelConnection,ye=[ve,this._config,this._createConnectionErrorHandler(),this._log],[4,this._clientCertificateHolder.getClientCertificate()];case 1:return[2,pe.apply(void 0,ye.concat([me.sent(),this._routingContext,this._channelSsrCallback.bind(this)]))]}})})})||this;return oe._routingContext=g(g({},ne),{address:X.toString()}),oe._seedRouter=X,oe._rediscovery=new a.default(oe._routingContext),oe._loadBalancingStrategy=new h.LeastConnectedLoadBalancingStrategy(oe._connectionPool),oe._hostNameResolver=le,oe._dnsResolver=new _.HostNameResolver,oe._log=D,oe._useSeedRouter=!0,oe._routingTableRegistry=new re(ee?(0,l.int)(ee):te),oe._refreshRoutingTable=v.functional.reuseOngoingRequest(oe._refreshRoutingTable,oe),oe._withSSR=0,oe._withoutSSR=0,oe}return W.prototype._createConnectionErrorHandler=function(){return new u.ConnectionErrorHandler(s)},W.prototype._handleUnavailability=function(F,Y,X){return this._log.warn("Routing driver ".concat(this._id," will forget ").concat(Y," for database '").concat(X,"' because of an error ").concat(F.code," '").concat(F.message,"'")),this.forget(Y,X||Q),F},W.prototype._handleSecurityError=function(F,Y,X,ne){return this._log.warn("Routing driver ".concat(this._id," will close connections to ").concat(Y," for database '").concat(ne,"' because of an error ").concat(F.code," '").concat(F.message,"'")),k.prototype._handleSecurityError.call(this,F,Y,X,ne)},W.prototype._handleWriteFailure=function(F,Y,X){return this._log.warn("Routing driver ".concat(this._id," will forget writer ").concat(Y," for database '").concat(X,"' because of an error ").concat(F.code," '").concat(F.message,"'")),this.forgetWriter(Y,X||Q),(0,l.newError)("No longer possible to write to server at "+Y,s,F)},W.prototype.acquireConnection=function(){return n(this,arguments,void 0,function(F){var Y,X,ne,le,de,D=this,P=F===void 0?{}:F,I=P.accessMode,B=P.database,ee=P.bookmarks,ue=P.impersonatedUser,oe=P.onDatabaseNameResolved,ve=P.auth,pe=P.homeDb;return t(this,function(ye){switch(ye.label){case 0:return Y={database:B||Q},X=new u.ConnectionErrorHandler(s,function(me,N){return D._handleUnavailability(me,N,Y.database)},function(me,N){return D._handleWriteFailure(me,N,pe??Y.database)},function(me,N,S){return D._handleSecurityError(me,N,S,Y.database)}),this.SSREnabled()&&pe!==void 0&&B===""?(le=this._routingTableRegistry.get(pe,function(){return new a.RoutingTable({database:pe})}),le&&!le.isStaleFor(I)?[4,this.getConnectionFromRoutingTable(le,ve,I,X)]:[3,2]):[3,2];case 1:if(ne=ye.sent(),this.SSREnabled())return[2,ne];ne.release(),ye.label=2;case 2:return[4,this._freshRoutingTable({accessMode:I,database:Y.database,bookmarks:ee,impersonatedUser:ue,auth:ve,onDatabaseNameResolved:function(me){Y.database=Y.database||me,oe&&oe(me)}})];case 3:return de=ye.sent(),[2,this.getConnectionFromRoutingTable(de,ve,I,X)]}})})},W.prototype.getConnectionFromRoutingTable=function(F,Y,X,ne){return n(this,void 0,void 0,function(){var le,de,D,P,I;return t(this,function(B){switch(B.label){case 0:if(X===E)de=this._loadBalancingStrategy.selectReader(F.readers),le="read";else if(X===w)de=this._loadBalancingStrategy.selectWriter(F.writers),le="write";else throw(0,l.newError)("Illegal mode "+X);if(!de)throw(0,l.newError)("Failed to obtain connection towards ".concat(le," server. Known routing table is: ").concat(F),s);B.label=1;case 1:return B.trys.push([1,5,,6]),[4,this._connectionPool.acquire({auth:Y},de)];case 2:return D=B.sent(),Y?[4,this._verifyStickyConnection({auth:Y,connection:D,address:de})]:[3,4];case 3:return B.sent(),[2,D];case 4:return[2,new u.DelegateConnection(D,ne)];case 5:throw P=B.sent(),I=ne.handleAndTransformError(P,de),I;case 6:return[2]}})})},W.prototype._hasProtocolVersion=function(F){return n(this,void 0,void 0,function(){var Y,X,ne,le,de,D;return t(this,function(P){switch(P.label){case 0:return[4,this._resolveSeedRouter(this._seedRouter)];case 1:Y=P.sent(),ne=0,P.label=2;case 2:if(!(ne<Y.length))return[3,8];P.label=3;case 3:return P.trys.push([3,6,,7]),[4,this._createChannelConnection(Y[ne])];case 4:return le=P.sent(),de=le.protocol()?le.protocol().version:null,[4,le.close()];case 5:return P.sent(),de?[2,F(de)]:[2,!1];case 6:return D=P.sent(),X=D,[3,7];case 7:return ne++,[3,2];case 8:if(X)throw X;return[2,!1]}})})},W.prototype.supportsMultiDb=function(){return n(this,void 0,void 0,function(){return t(this,function(F){switch(F.label){case 0:return[4,this._hasProtocolVersion(function(Y){return Y>=R})];case 1:return[2,F.sent()]}})})},W.prototype.supportsTransactionConfig=function(){return n(this,void 0,void 0,function(){return t(this,function(F){switch(F.label){case 0:return[4,this._hasProtocolVersion(function(Y){return Y>=T})];case 1:return[2,F.sent()]}})})},W.prototype.supportsUserImpersonation=function(){return n(this,void 0,void 0,function(){return t(this,function(F){switch(F.label){case 0:return[4,this._hasProtocolVersion(function(Y){return Y>=L})];case 1:return[2,F.sent()]}})})},W.prototype.supportsSessionAuth=function(){return n(this,void 0,void 0,function(){return t(this,function(F){switch(F.label){case 0:return[4,this._hasProtocolVersion(function(Y){return Y>=j})];case 1:return[2,F.sent()]}})})},W.prototype.getNegotiatedProtocolVersion=function(){var F=this;return new Promise(function(Y,X){F._hasProtocolVersion(Y).catch(X)})},W.prototype.verifyAuthentication=function(F){return n(this,arguments,void 0,function(Y){var X=this,ne=Y.database,le=Y.accessMode,de=Y.auth;return t(this,function(D){return[2,this._verifyAuthentication({auth:de,getAddress:function(){return n(X,void 0,void 0,function(){var P,I,B;return t(this,function(ee){switch(ee.label){case 0:return P={database:ne||Q},[4,this._freshRoutingTable({accessMode:le,database:P.database,auth:de,onDatabaseNameResolved:function(ue){P.database=P.database||ue}})];case 1:if(I=ee.sent(),B=le===w?I.writers:I.readers,B.length===0)throw(0,l.newError)("No servers available for database '".concat(P.database,"' with access mode '").concat(le,"'"),y);return[2,B[0]]}})})}})]})})},W.prototype.verifyConnectivityAndGetServerInfo=function(F){return n(this,arguments,void 0,function(Y){var X,ne,le,de,D,P,I,B,ee,ue,oe,ve,pe=Y.database,ye=Y.accessMode;return t(this,function(me){switch(me.label){case 0:return X={database:pe||Q},[4,this._freshRoutingTable({accessMode:ye,database:X.database,onDatabaseNameResolved:function(N){X.database=X.database||N}})];case 1:ne=me.sent(),le=ye===w?ne.writers:ne.readers,de=(0,l.newError)("No servers available for database '".concat(X.database,"' with access mode '").concat(ye,"'"),y),me.label=2;case 2:me.trys.push([2,9,10,11]),D=r(le),P=D.next(),me.label=3;case 3:if(P.done)return[3,8];I=P.value,me.label=4;case 4:return me.trys.push([4,6,,7]),[4,this._verifyConnectivityAndGetServerVersion({address:I})];case 5:return B=me.sent(),[2,B];case 6:return ee=me.sent(),de=ee,[3,7];case 7:return P=D.next(),[3,3];case 8:return[3,11];case 9:return ue=me.sent(),oe={error:ue},[3,11];case 10:try{P&&!P.done&&(ve=D.return)&&ve.call(D)}finally{if(oe)throw oe.error}return[7];case 11:throw de}})})},W.prototype.forget=function(F,Y){this._routingTableRegistry.apply(Y,{applyWhenExists:function(X){return X.forget(F)}}),this._connectionPool.purge(F).catch(function(){})},W.prototype.forgetWriter=function(F,Y){this._routingTableRegistry.apply(Y,{applyWhenExists:function(X){return X.forgetWriter(F)}})},W.prototype._freshRoutingTable=function(F){var Y=F===void 0?{}:F,X=Y.accessMode,ne=Y.database,le=Y.bookmarks,de=Y.impersonatedUser,D=Y.onDatabaseNameResolved,P=Y.auth,I=this._routingTableRegistry.get(ne,function(){return new a.RoutingTable({database:ne})});return I.isStaleFor(X)?(this._log.info('Routing table is stale for database: "'.concat(ne,'" and access mode: "').concat(X,'": ').concat(I)),this._refreshRoutingTable(I,le,de,P).then(function(B){return D(B.database),B})):I},W.prototype._refreshRoutingTable=function(F,Y,X,ne){var le=F.routers;return this._useSeedRouter?this._fetchRoutingTableFromSeedRouterFallbackToKnownRouters(le,F,Y,X,ne):this._fetchRoutingTableFromKnownRoutersFallbackToSeedRouter(le,F,Y,X,ne)},W.prototype._fetchRoutingTableFromSeedRouterFallbackToKnownRouters=function(F,Y,X,ne,le){return n(this,void 0,void 0,function(){var de,D,P,I,B,ee,ue;return t(this,function(oe){switch(oe.label){case 0:return de=[],[4,this._fetchRoutingTableUsingSeedRouter(de,this._seedRouter,Y,X,ne,le)];case 1:return D=i.apply(void 0,[oe.sent(),2]),P=D[0],I=D[1],P?(this._useSeedRouter=!1,[3,4]):[3,2];case 2:return[4,this._fetchRoutingTableUsingKnownRouters(F,Y,X,ne,le)];case 3:B=i.apply(void 0,[oe.sent(),2]),ee=B[0],ue=B[1],P=ee,I=ue||I,oe.label=4;case 4:return[4,this._applyRoutingTableIfPossible(Y,P,I)];case 5:return[2,oe.sent()]}})})},W.prototype._fetchRoutingTableFromKnownRoutersFallbackToSeedRouter=function(F,Y,X,ne,le){return n(this,void 0,void 0,function(){var de,D,P,I;return t(this,function(B){switch(B.label){case 0:return[4,this._fetchRoutingTableUsingKnownRouters(F,Y,X,ne,le)];case 1:return de=i.apply(void 0,[B.sent(),2]),D=de[0],P=de[1],D?[3,3]:[4,this._fetchRoutingTableUsingSeedRouter(F,this._seedRouter,Y,X,ne,le)];case 2:I=i.apply(void 0,[B.sent(),2]),D=I[0],P=I[1],B.label=3;case 3:return[4,this._applyRoutingTableIfPossible(Y,D,P)];case 4:return[2,B.sent()]}})})},W.prototype._fetchRoutingTableUsingKnownRouters=function(F,Y,X,ne,le){return n(this,void 0,void 0,function(){var de,D,P,I;return t(this,function(B){switch(B.label){case 0:return[4,this._fetchRoutingTable(F,Y,X,ne,le)];case 1:return de=i.apply(void 0,[B.sent(),2]),D=de[0],P=de[1],D?[2,[D,null]]:(I=F.length-1,W._forgetRouter(Y,F,I),[2,[null,P]])}})})},W.prototype._fetchRoutingTableUsingSeedRouter=function(F,Y,X,ne,le,de){return n(this,void 0,void 0,function(){var D,P;return t(this,function(I){switch(I.label){case 0:return[4,this._resolveSeedRouter(Y)];case 1:return D=I.sent(),P=D.filter(function(B){return F.indexOf(B)<0}),[4,this._fetchRoutingTable(P,X,ne,le,de)];case 2:return[2,I.sent()]}})})},W.prototype._resolveSeedRouter=function(F){return n(this,void 0,void 0,function(){var Y,X,ne=this;return t(this,function(le){switch(le.label){case 0:return[4,this._hostNameResolver.resolve(F)];case 1:return Y=le.sent(),[4,Promise.all(Y.map(function(de){return ne._dnsResolver.resolve(de)}))];case 2:return X=le.sent(),[2,[].concat.apply([],X)]}})})},W.prototype._fetchRoutingTable=function(F,Y,X,ne,le){return n(this,void 0,void 0,function(){var de=this;return t(this,function(D){return[2,F.reduce(function(P,I,B){return n(de,void 0,void 0,function(){var ee,ue,oe,ve,pe,ye,me;return t(this,function(N){switch(N.label){case 0:return[4,P];case 1:return ee=i.apply(void 0,[N.sent(),1]),ue=ee[0],ue?[2,[ue,null]]:(oe=B-1,W._forgetRouter(Y,F,oe),[4,this._createSessionForRediscovery(I,X,ne,le)]);case 2:if(ve=i.apply(void 0,[N.sent(),2]),pe=ve[0],ye=ve[1],!pe)return[3,8];N.label=3;case 3:return N.trys.push([3,5,6,7]),[4,this._rediscovery.lookupRoutingTableOnRouter(pe,Y.database,I,ne)];case 4:return[2,[N.sent(),null]];case 5:return me=N.sent(),[2,this._handleRediscoveryError(me,I)];case 6:return pe.close(),[7];case 7:return[3,9];case 8:return[2,[null,ye]];case 9:return[2]}})})},Promise.resolve([null,null]))]})})},W.prototype._createSessionForRediscovery=function(F,Y,X,ne){return n(this,void 0,void 0,function(){var le,de,D,P,I,B,ee=this;return t(this,function(ue){switch(ue.label){case 0:return ue.trys.push([0,4,,5]),[4,this._connectionPool.acquire({auth:ne},F)];case 1:return le=ue.sent(),ne?[4,this._verifyStickyConnection({auth:ne,connection:le,address:F})]:[3,3];case 2:ue.sent(),ue.label=3;case 3:return de=u.ConnectionErrorHandler.create({errorCode:s,handleSecurityError:function(oe,ve,pe){return ee._handleSecurityError(oe,ve,pe)}}),D=le._sticky?new u.DelegateConnection(le):new u.DelegateConnection(le,de),P=new p.default(D),I=le.protocol().version,I<4?[2,[new l.Session({mode:w,bookmarks:f.empty(),connectionProvider:P}),null]]:[2,[new l.Session({mode:E,database:U,bookmarks:Y,connectionProvider:P,impersonatedUser:X}),null]];case 4:return B=ue.sent(),[2,this._handleRediscoveryError(B,F)];case 5:return[2]}})})},W.prototype._handleRediscoveryError=function(F,Y){if(ce(F)||ae(F))throw F;if(F.code===M)throw(0,l.newError)("Server at ".concat(Y.asHostPort()," can't perform routing. Make sure you are connecting to a causal cluster"),y,F);return this._log.warn("unable to fetch routing table because of an error ".concat(F)),[null,F]},W.prototype._applyRoutingTableIfPossible=function(F,Y,X){return n(this,void 0,void 0,function(){return t(this,function(ne){switch(ne.label){case 0:if(!Y)throw(0,l.newError)("Could not perform discovery. No routing servers available. Known routing table: ".concat(F),y,X);return Y.writers.length===0&&(this._useSeedRouter=!0),[4,this._updateRoutingTable(Y)];case 1:return ne.sent(),[2,Y]}})})},W.prototype._updateRoutingTable=function(F){return n(this,void 0,void 0,function(){return t(this,function(Y){switch(Y.label){case 0:return[4,this._connectionPool.keepAll(F.allServers())];case 1:return Y.sent(),this._routingTableRegistry.removeExpired(),this._routingTableRegistry.register(F),this._log.info("Updated routing table ".concat(F)),[2]}})})},W._forgetRouter=function(F,Y,X){var ne=Y[X];F&&ne&&F.forgetRouter(ne)},W.prototype._channelSsrCallback=function(F,Y){if(Y==="OPEN")F===!0?this._withSSR=this._withSSR+1:this._withoutSSR=this._withoutSSR+1;else if(Y==="CLOSE")F===!0?this._withSSR=this._withSSR-1:this._withoutSSR=this._withoutSSR-1;else throw(0,l.newError)("Channel SSR Callback invoked with action other than 'OPEN' or 'CLOSE'")},W.prototype.SSREnabled=function(){return this._withSSR>0&&this._withoutSSR===0},W})(m.default);De.default=z;var re=(function(){function k(W){this._tables=new Map,this._routingTablePurgeDelay=W}return k.prototype.register=function(W){return this._tables.set(W.database,W),this},k.prototype.apply=function(W,F){var Y=F===void 0?{}:F,X=Y.applyWhenExists,ne=Y.applyWhenDontExists,le=ne===void 0?function(){}:ne;return this._tables.has(W)?X(this._tables.get(W)):typeof W=="string"||W===null?le():this._forEach(X),this},k.prototype.get=function(W,F){return this._tables.has(W)?this._tables.get(W):typeof F=="function"?F():F},k.prototype.removeExpired=function(){var W=this;return this._removeIf(function(F){return F.isExpiredFor(W._routingTablePurgeDelay)})},k.prototype._forEach=function(W){var F,Y;try{for(var X=r(this._tables),ne=X.next();!ne.done;ne=X.next()){var le=i(ne.value,2),de=le[1];W(de)}}catch(D){F={error:D}}finally{try{ne&&!ne.done&&(Y=X.return)&&Y.call(X)}finally{if(F)throw F.error}}return this},k.prototype._remove=function(W){return this._tables.delete(W),this},k.prototype._removeIf=function(W){var F,Y;try{for(var X=r(this._tables),ne=X.next();!ne.done;ne=X.next()){var le=i(ne.value,2),de=le[0],D=le[1];W(D)&&this._remove(de)}}catch(P){F={error:P}}finally{try{ne&&!ne.done&&(Y=X.return)&&Y.call(X)}finally{if(F)throw F.error}}return this},k})();function ce(k){return[x,Z,H,G,$,A,q].includes(k.code)}function ae(k){var W;return((W=k.code)===null||W===void 0?void 0:W.startsWith("Neo.ClientError.Security."))&&![K].includes(k.code)}return De}var uy;function l1(){return uy||(uy=1,(function(e){var g=Eu&&Eu.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.RoutingConnectionProvider=e.DirectConnectionProvider=e.PooledConnectionProvider=e.SingleConnectionProvider=void 0;var O=bg();Object.defineProperty(e,"SingleConnectionProvider",{enumerable:!0,get:function(){return g(O).default}});var d=cl();Object.defineProperty(e,"PooledConnectionProvider",{enumerable:!0,get:function(){return g(d).default}});var o=a1();Object.defineProperty(e,"DirectConnectionProvider",{enumerable:!0,get:function(){return g(o).default}});var n=s1();Object.defineProperty(e,"RoutingConnectionProvider",{enumerable:!0,get:function(){return g(n).default}})})(Eu)),Eu}var cy;function f1(){return cy||(cy=1,(function(e){var g=wr&&wr.__createBinding||(Object.create?(function(n,t,r,i){i===void 0&&(i=r);var c=Object.getOwnPropertyDescriptor(t,r);(!c||("get"in c?!t.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(n,i,c)}):(function(n,t,r,i){i===void 0&&(i=r),n[i]=t[r]})),O=wr&&wr.__setModuleDefault||(Object.create?(function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}):function(n,t){n.default=t}),d=wr&&wr.__importStar||(function(){var n=function(t){return n=Object.getOwnPropertyNames||function(r){var i=[];for(var c in r)Object.prototype.hasOwnProperty.call(r,c)&&(i[i.length]=c);return i},n(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var i=n(t),c=0;c<i.length;c++)i[c]!=="default"&&g(r,t,i[c]);return O(r,t),r}})(),o=wr&&wr.__exportStar||function(n,t){for(var r in n)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&g(t,n,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.packstream=e.channel=e.buf=e.bolt=e.loadBalancing=void 0,e.loadBalancing=d(Mm()),e.bolt=d(ol()),e.buf=d(rl()),e.channel=d(cn()),e.packstream=d(ln()),o(l1(),e)})(wr)),wr}var sy;function d1(){return sy||(sy=1,(function(e){var g=Kr&&Kr.__awaiter||function(H,K,G,$){function A(q){return q instanceof G?q:new G(function(U){U(q)})}return new(G||(G=Promise))(function(q,U){function Q(re){try{z($.next(re))}catch(ce){U(ce)}}function te(re){try{z($.throw(re))}catch(ce){U(ce)}}function z(re){re.done?q(re.value):A(re.value).then(Q,te)}z(($=$.apply(H,K||[])).next())})},O=Kr&&Kr.__generator||function(H,K){var G={label:0,sent:function(){if(q[0]&1)throw q[1];return q[1]},trys:[],ops:[]},$,A,q,U=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return U.next=Q(0),U.throw=Q(1),U.return=Q(2),typeof Symbol=="function"&&(U[Symbol.iterator]=function(){return this}),U;function Q(z){return function(re){return te([z,re])}}function te(z){if($)throw new TypeError("Generator is already executing.");for(;U&&(U=0,z[0]&&(G=0)),G;)try{if($=1,A&&(q=z[0]&2?A.return:z[0]?A.throw||((q=A.return)&&q.call(A),0):A.next)&&!(q=q.call(A,z[1])).done)return q;switch(A=0,q&&(z=[z[0]&2,q.value]),z[0]){case 0:case 1:q=z;break;case 4:return G.label++,{value:z[1],done:!1};case 5:G.label++,A=z[1],z=[0];continue;case 7:z=G.ops.pop(),G.trys.pop();continue;default:if(q=G.trys,!(q=q.length>0&&q[q.length-1])&&(z[0]===6||z[0]===2)){G=0;continue}if(z[0]===3&&(!q||z[1]>q[0]&&z[1]<q[3])){G.label=z[1];break}if(z[0]===6&&G.label<q[1]){G.label=q[1],q=z;break}if(q&&G.label<q[2]){G.label=q[2],G.ops.push(z);break}q[2]&&G.ops.pop(),G.trys.pop();continue}z=K.call(H,G)}catch(re){z=[6,re],A=0}finally{$=q=0}if(z[0]&5)throw z[1];return{value:z[0]?z[1]:void 0,done:!0}}},d=Kr&&Kr.__importDefault||function(H){return H&&H.__esModule?H:{default:H}};Object.defineProperty(e,"__esModule",{value:!0}),e.PathSegment=e.Path=e.UnboundRelationship=e.Relationship=e.Node=e.Record=e.ServerInfo=e.GqlStatusObject=e.Notification=e.QueryStatistics=e.ProfiledPlan=e.Plan=e.ResultSummary=e.RxResult=e.RxManagedTransaction=e.RxTransaction=e.RxSession=e.EagerResult=e.Result=e.ManagedTransaction=e.Transaction=e.Session=e.Driver=e.temporal=e.spatial=e.graph=e.error=e.routing=e.session=e.types=e.logging=e.auth=e.isRetriableError=e.Neo4jError=e.integer=e.isUnboundRelationship=e.isRelationship=e.isPathSegment=e.isPath=e.isNode=e.isDateTime=e.isLocalDateTime=e.isDate=e.isTime=e.isLocalTime=e.isDuration=e.isPoint=e.isInt=e.int=e.authTokenManagers=void 0,e.clientCertificateProviders=e.notificationFilterMinimumSeverityLevel=e.notificationFilterDisabledClassification=e.notificationFilterDisabledCategory=e.notificationSeverityLevel=e.notificationClassification=e.notificationCategory=e.resultTransformers=e.bookmarkManager=e.DateTime=e.LocalDateTime=e.Date=e.Time=e.LocalTime=e.Duration=e.Integer=e.Point=void 0,e.driver=b,e.hasReachableServer=E;var o=MO();Object.defineProperty(e,"Driver",{enumerable:!0,get:function(){return o.Driver}});var n=d(NO()),t=_e();Object.defineProperty(e,"authTokenManagers",{enumerable:!0,get:function(){return t.authTokenManagers}}),Object.defineProperty(e,"Neo4jError",{enumerable:!0,get:function(){return t.Neo4jError}}),Object.defineProperty(e,"isRetriableError",{enumerable:!0,get:function(){return t.isRetriableError}}),Object.defineProperty(e,"error",{enumerable:!0,get:function(){return t.error}}),Object.defineProperty(e,"Integer",{enumerable:!0,get:function(){return t.Integer}}),Object.defineProperty(e,"int",{enumerable:!0,get:function(){return t.int}}),Object.defineProperty(e,"isInt",{enumerable:!0,get:function(){return t.isInt}}),Object.defineProperty(e,"isPoint",{enumerable:!0,get:function(){return t.isPoint}}),Object.defineProperty(e,"Point",{enumerable:!0,get:function(){return t.Point}}),Object.defineProperty(e,"Date",{enumerable:!0,get:function(){return t.Date}}),Object.defineProperty(e,"DateTime",{enumerable:!0,get:function(){return t.DateTime}}),Object.defineProperty(e,"Duration",{enumerable:!0,get:function(){return t.Duration}}),Object.defineProperty(e,"isDate",{enumerable:!0,get:function(){return t.isDate}}),Object.defineProperty(e,"isDateTime",{enumerable:!0,get:function(){return t.isDateTime}}),Object.defineProperty(e,"isDuration",{enumerable:!0,get:function(){return t.isDuration}}),Object.defineProperty(e,"isLocalDateTime",{enumerable:!0,get:function(){return t.isLocalDateTime}}),Object.defineProperty(e,"isLocalTime",{enumerable:!0,get:function(){return t.isLocalTime}}),Object.defineProperty(e,"isNode",{enumerable:!0,get:function(){return t.isNode}}),Object.defineProperty(e,"isPath",{enumerable:!0,get:function(){return t.isPath}}),Object.defineProperty(e,"isPathSegment",{enumerable:!0,get:function(){return t.isPathSegment}}),Object.defineProperty(e,"isRelationship",{enumerable:!0,get:function(){return t.isRelationship}}),Object.defineProperty(e,"isTime",{enumerable:!0,get:function(){return t.isTime}}),Object.defineProperty(e,"isUnboundRelationship",{enumerable:!0,get:function(){return t.isUnboundRelationship}}),Object.defineProperty(e,"LocalDateTime",{enumerable:!0,get:function(){return t.LocalDateTime}}),Object.defineProperty(e,"LocalTime",{enumerable:!0,get:function(){return t.LocalTime}}),Object.defineProperty(e,"Time",{enumerable:!0,get:function(){return t.Time}}),Object.defineProperty(e,"Node",{enumerable:!0,get:function(){return t.Node}}),Object.defineProperty(e,"Path",{enumerable:!0,get:function(){return t.Path}}),Object.defineProperty(e,"PathSegment",{enumerable:!0,get:function(){return t.PathSegment}}),Object.defineProperty(e,"Relationship",{enumerable:!0,get:function(){return t.Relationship}}),Object.defineProperty(e,"UnboundRelationship",{enumerable:!0,get:function(){return t.UnboundRelationship}}),Object.defineProperty(e,"Record",{enumerable:!0,get:function(){return t.Record}}),Object.defineProperty(e,"ResultSummary",{enumerable:!0,get:function(){return t.ResultSummary}}),Object.defineProperty(e,"Plan",{enumerable:!0,get:function(){return t.Plan}}),Object.defineProperty(e,"ProfiledPlan",{enumerable:!0,get:function(){return t.ProfiledPlan}}),Object.defineProperty(e,"QueryStatistics",{enumerable:!0,get:function(){return t.QueryStatistics}}),Object.defineProperty(e,"Notification",{enumerable:!0,get:function(){return t.Notification}}),Object.defineProperty(e,"GqlStatusObject",{enumerable:!0,get:function(){return t.GqlStatusObject}}),Object.defineProperty(e,"ServerInfo",{enumerable:!0,get:function(){return t.ServerInfo}}),Object.defineProperty(e,"Result",{enumerable:!0,get:function(){return t.Result}}),Object.defineProperty(e,"EagerResult",{enumerable:!0,get:function(){return t.EagerResult}}),Object.defineProperty(e,"auth",{enumerable:!0,get:function(){return t.auth}}),Object.defineProperty(e,"Session",{enumerable:!0,get:function(){return t.Session}}),Object.defineProperty(e,"Transaction",{enumerable:!0,get:function(){return t.Transaction}}),Object.defineProperty(e,"ManagedTransaction",{enumerable:!0,get:function(){return t.ManagedTransaction}}),Object.defineProperty(e,"bookmarkManager",{enumerable:!0,get:function(){return t.bookmarkManager}}),Object.defineProperty(e,"routing",{enumerable:!0,get:function(){return t.routing}}),Object.defineProperty(e,"resultTransformers",{enumerable:!0,get:function(){return t.resultTransformers}}),Object.defineProperty(e,"notificationCategory",{enumerable:!0,get:function(){return t.notificationCategory}}),Object.defineProperty(e,"notificationClassification",{enumerable:!0,get:function(){return t.notificationClassification}}),Object.defineProperty(e,"notificationSeverityLevel",{enumerable:!0,get:function(){return t.notificationSeverityLevel}}),Object.defineProperty(e,"notificationFilterDisabledCategory",{enumerable:!0,get:function(){return t.notificationFilterDisabledCategory}}),Object.defineProperty(e,"notificationFilterDisabledClassification",{enumerable:!0,get:function(){return t.notificationFilterDisabledClassification}}),Object.defineProperty(e,"notificationFilterMinimumSeverityLevel",{enumerable:!0,get:function(){return t.notificationFilterMinimumSeverityLevel}}),Object.defineProperty(e,"clientCertificateProviders",{enumerable:!0,get:function(){return t.clientCertificateProviders}});var r=f1(),i=d(Am());e.RxSession=i.default;var c=d(el());e.RxTransaction=c.default;var l=d(Im());e.RxManagedTransaction=l.default;var a=d(bc());e.RxResult=a.default;var _=t.internal.util,p=_.ENCRYPTION_ON,m=_.assertString,h=_.isEmptyObjectOrNull,u=t.internal.serverAddress.ServerAddress,v=t.internal.urlUtil,y="neo4j-javascript/"+n.default;function s(H){return typeof H=="object"&&H!=null&&"getToken"in H&&"handleSecurityException"in H&&typeof H.getToken=="function"&&typeof H.handleSecurityException=="function"}function f(H){if(s(H))return H;var K=H;return K=K||{},K.scheme=K.scheme||"none",(0,t.staticAuthTokenManager)({authToken:K})}function b(H,K,G){G===void 0&&(G={}),m(H,"Bolt URL");var $=v.parseDatabaseUrl(H),A=!1,q=!1,U;switch($.scheme){case"bolt":break;case"bolt+s":q=!0,U="TRUST_SYSTEM_CA_SIGNED_CERTIFICATES";break;case"bolt+ssc":q=!0,U="TRUST_ALL_CERTIFICATES";break;case"neo4j":A=!0;break;case"neo4j+s":q=!0,U="TRUST_SYSTEM_CA_SIGNED_CERTIFICATES",A=!0;break;case"neo4j+ssc":q=!0,U="TRUST_ALL_CERTIFICATES",A=!0;break;default:throw new Error("Unknown scheme: ".concat($.scheme))}if(q){if("encrypted"in G||"trust"in G)throw new Error("Encryption/trust can only be configured either through URL or config, not both");G.encrypted=p,G.trust=U,G.clientCertificate=(0,t.resolveCertificateProvider)(G.clientCertificate)}var Q=f(K);G.userAgent=G.userAgent||y,G.boltAgent=t.internal.boltAgent.fromVersion(n.default);var te=u.fromUrl($.hostAndPort),z={address:te,typename:A?"Routing":"Direct",routing:A};return new o.Driver(z,G,re());function re(){if(A)return function(ce,ae,k,W){return new r.RoutingConnectionProvider({id:ce,config:ae,log:k,hostNameResolver:W,authTokenManager:Q,address:te,userAgent:ae.userAgent,boltAgent:ae.boltAgent,routingContext:$.query})};if(!h($.query))throw new Error("Parameters are not supported with none routed scheme. Given URL: '".concat(H,"'"));return function(ce,ae,k){return new r.DirectConnectionProvider({id:ce,config:ae,log:k,authTokenManager:Q,address:te,userAgent:ae.userAgent,boltAgent:ae.boltAgent})}}}function E(H,K){return g(this,void 0,void 0,function(){var G;return O(this,function($){switch($.label){case 0:G=b(H,{scheme:"none",principal:"",credentials:""},K),$.label=1;case 1:return $.trys.push([1,,3,5]),[4,G.getNegotiatedProtocolVersion()];case 2:return $.sent(),[2,!0];case 3:return[4,G.close()];case 4:return $.sent(),[7];case 5:return[2]}})})}var w={console:function(H){return{level:H,logger:function(K,G){return console.log("".concat(T0.Date.now()," ").concat(K.toUpperCase()," ").concat(G))}}}};e.logging=w;var T={Node:t.Node,Relationship:t.Relationship,UnboundRelationship:t.UnboundRelationship,PathSegment:t.PathSegment,Path:t.Path,Result:t.Result,EagerResult:t.EagerResult,ResultSummary:t.ResultSummary,Record:t.Record,Point:t.Point,Date:t.Date,DateTime:t.DateTime,Duration:t.Duration,LocalDateTime:t.LocalDateTime,LocalTime:t.LocalTime,Time:t.Time,Integer:t.Integer};e.types=T;var R={READ:o.READ,WRITE:o.WRITE};e.session=R;var L={toNumber:t.toNumber,toString:t.toString,inSafeRange:t.inSafeRange};e.integer=L;var j={isPoint:t.isPoint};e.spatial=j;var M={isDuration:t.isDuration,isLocalTime:t.isLocalTime,isTime:t.isTime,isDate:t.isDate,isLocalDateTime:t.isLocalDateTime,isDateTime:t.isDateTime};e.temporal=M;var x={isNode:t.isNode,isPath:t.isPath,isPathSegment:t.isPathSegment,isRelationship:t.isRelationship,isUnboundRelationship:t.isUnboundRelationship};e.graph=x;var Z={authTokenManagers:t.authTokenManagers,driver:b,hasReachableServer:E,int:t.int,isInt:t.isInt,isPoint:t.isPoint,isDuration:t.isDuration,isLocalTime:t.isLocalTime,isTime:t.isTime,isDate:t.isDate,isLocalDateTime:t.isLocalDateTime,isDateTime:t.isDateTime,isNode:t.isNode,isPath:t.isPath,isPathSegment:t.isPathSegment,isRelationship:t.isRelationship,isUnboundRelationship:t.isUnboundRelationship,integer:L,Neo4jError:t.Neo4jError,isRetriableError:t.isRetriableError,auth:t.auth,logging:w,types:T,session:R,routing:t.routing,error:t.error,graph:x,spatial:j,temporal:M,Driver:o.Driver,Session:t.Session,Transaction:t.Transaction,ManagedTransaction:t.ManagedTransaction,Result:t.Result,EagerResult:t.EagerResult,RxSession:i.default,RxTransaction:c.default,RxManagedTransaction:l.default,RxResult:a.default,ResultSummary:t.ResultSummary,Plan:t.Plan,ProfiledPlan:t.ProfiledPlan,QueryStatistics:t.QueryStatistics,Notification:t.Notification,GqlStatusObject:t.GqlStatusObject,ServerInfo:t.ServerInfo,Record:t.Record,Node:t.Node,Relationship:t.Relationship,UnboundRelationship:t.UnboundRelationship,Path:t.Path,PathSegment:t.PathSegment,Point:t.Point,Integer:t.Integer,Duration:t.Duration,LocalTime:t.LocalTime,Time:t.Time,Date:t.Date,LocalDateTime:t.LocalDateTime,DateTime:t.DateTime,bookmarkManager:t.bookmarkManager,resultTransformers:t.resultTransformers,notificationCategory:t.notificationCategory,notificationSeverityLevel:t.notificationSeverityLevel,notificationFilterDisabledCategory:t.notificationFilterDisabledCategory,notificationFilterMinimumSeverityLevel:t.notificationFilterMinimumSeverityLevel,clientCertificateProviders:t.clientCertificateProviders};e.default=Z})(Kr)),Kr}var gg=d1();const h1=S0(gg),_1=E0({__proto__:null,default:h1},[gg]);export{_1 as i};
|