neo4j-driver 5.16.0 → 5.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).neo4j=t()}(this,function(){"use strict";var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function D(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var U,L,F={},B={},e={},t={},n=r&&r.__extends||(U=function(e,t){return(U=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}U(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),W=(Object.defineProperty(t,"__esModule",{value:!0}),t.PROTOCOL_ERROR=t.SESSION_EXPIRED=t.SERVICE_UNAVAILABLE=t.Neo4jError=t.isRetriableError=t.newError=void 0,"ServiceUnavailable"),z=(t.SERVICE_UNAVAILABLE=W,"SessionExpired"),q=(t.SESSION_EXPIRED=z,t.PROTOCOL_ERROR="ProtocolError",L=Error,n(V,L),V.isRetriable=function(e){return null!=e&&e instanceof V&&e.retriable},V);function V(e,t,r){e=L.call(this,e,null!=r?{cause:r}:void 0)||this;return e.constructor=V,e.__proto__=V.prototype,e.code=t,e.name="Neo4jError",e.retriable=(r=t)===W||r===z||"Neo.ClientError.Security.AuthorizationExpired"===r||function(e){return!0===(null==e?void 0:e.includes("TransientError"))}(r),e}t.Neo4jError=q,t.newError=function(e,t,r){return new q(e,null!=t?t:"N/A",r)};n=q.isRetriable;t.isRetriableError=n;var n={},H=(Object.defineProperty(n,"__esModule",{value:!0}),n.toString=n.toNumber=n.inSafeRange=n.isInt=n.int=void 0,t),G=new Map,o=(d.prototype.inSafeRange=function(){return this.greaterThanOrEqual(d.MIN_SAFE_VALUE)&&this.lessThanOrEqual(d.MAX_SAFE_VALUE)},d.prototype.toInt=function(){return this.low},d.prototype.toNumber=function(){return this.high*Y+(this.low>>>0)},d.prototype.toBigInt=function(){var e;return this.isZero()?BigInt(0):this.isPositive()?BigInt(this.high>>>0)*BigInt(Y)+BigInt(this.low>>>0):(e=this.negate(),BigInt(-1)*(BigInt(e.high>>>0)*BigInt(Y)+BigInt(e.low>>>0)))},d.prototype.toNumberOrInfinity=function(){return this.lessThan(d.MIN_SAFE_VALUE)?Number.NEGATIVE_INFINITY:this.greaterThan(d.MAX_SAFE_VALUE)?Number.POSITIVE_INFINITY:this.toNumber()},d.prototype.toString=function(e){if((e=null!=e?e:10)<2||36<e)throw RangeError("radix out of range: "+e.toString());if(this.isZero())return"0";var t,r,n;if(this.isNegative())return this.equals(d.MIN_VALUE)?(t=d.fromNumber(e),n=(r=this.div(t)).multiply(t).subtract(this),r.toString(e)+n.toInt().toString(e)):"-"+this.negate().toString(e);for(var o=d.fromNumber(Math.pow(e,6)),i=(n=this,"");;){var u=n.div(o),a=(n.subtract(u.multiply(o)).toInt()>>>0).toString(e);if((n=u).isZero())return a+i;for(;a.length<6;)a="0"+a;i=""+a+i}},d.prototype.valueOf=function(){return this.toBigInt()},d.prototype.getHighBits=function(){return this.high},d.prototype.getLowBits=function(){return this.low},d.prototype.getNumBitsAbs=function(){if(this.isNegative())return this.equals(d.MIN_VALUE)?64:this.negate().getNumBitsAbs();for(var e=0!==this.high?this.high:this.low,t=0,t=31;0<t&&0==(e&1<<t);t--);return 0!==this.high?t+33:t+1},d.prototype.isZero=function(){return 0===this.high&&0===this.low},d.prototype.isNegative=function(){return this.high<0},d.prototype.isPositive=function(){return 0<=this.high},d.prototype.isOdd=function(){return 1==(1&this.low)},d.prototype.isEven=function(){return 0==(1&this.low)},d.prototype.equals=function(e){e=d.fromValue(e);return this.high===e.high&&this.low===e.low},d.prototype.notEquals=function(e){return!this.equals(e)},d.prototype.lessThan=function(e){return this.compare(e)<0},d.prototype.lessThanOrEqual=function(e){return this.compare(e)<=0},d.prototype.greaterThan=function(e){return 0<this.compare(e)},d.prototype.greaterThanOrEqual=function(e){return 0<=this.compare(e)},d.prototype.compare=function(e){e=d.fromValue(e);if(this.equals(e))return 0;var t=this.isNegative(),r=e.isNegative();return t&&!r||(t||!r)&&this.subtract(e).isNegative()?-1:1},d.prototype.negate=function(){return this.equals(d.MIN_VALUE)?d.MIN_VALUE:this.not().add(d.ONE)},d.prototype.add=function(e){var e=d.fromValue(e),t=this.high>>>16,r=65535&this.high,n=this.low>>>16,o=65535&this.low,i=e.high>>>16,u=65535&e.high,a=e.low>>>16,s=0,c=0,l=0,f=0;return c+=(l=l+((f+=o+(65535&e.low))>>>16)+(n+a))>>>16,d.fromBits((l&=65535)<<16|(f&=65535),((s+=(c+=r+u)>>>16)+(t+i)&65535)<<16|(c&=65535))},d.prototype.subtract=function(e){e=d.fromValue(e);return this.add(e.negate())},d.prototype.multiply=function(e){if(this.isZero())return d.ZERO;e=d.fromValue(e);if(e.isZero())return d.ZERO;if(this.equals(d.MIN_VALUE))return e.isOdd()?d.MIN_VALUE:d.ZERO;if(e.equals(d.MIN_VALUE))return this.isOdd()?d.MIN_VALUE:d.ZERO;if(this.isNegative())return e.isNegative()?this.negate().multiply(e.negate()):this.negate().multiply(e).negate();if(e.isNegative())return this.multiply(e.negate()).negate();if(this.lessThan(Z)&&e.lessThan(Z))return d.fromNumber(this.toNumber()*e.toNumber());var t=this.high>>>16,r=65535&this.high,n=this.low>>>16,o=65535&this.low,i=e.high>>>16,u=65535&e.high,a=e.low>>>16,e=65535&e.low,s=0,c=0,l=0,f=(f=0)+((c=c+((l+=o*e)>>>16)+n*e)>>>16)+((c=(c&65535)+o*a)>>>16);return d.fromBits((c&=65535)<<16|(l&=65535),((s+=(f+=r*e)>>>16)+((f=(f&65535)+n*a)>>>16)+((f=(f&65535)+o*u)>>>16)+(t*e+r*a+n*u+o*i)&65535)<<16|(f&=65535))},d.prototype.div=function(e){var t,r,n,o=d.fromValue(e);if(o.isZero())throw(0,H.newError)("division by zero");if(this.isZero())return d.ZERO;{if(this.equals(d.MIN_VALUE))return o.equals(d.ONE)||o.equals(d.NEG_ONE)?d.MIN_VALUE:o.equals(d.MIN_VALUE)?d.ONE:(n=this.shiftRight(1).div(o).shiftLeft(1)).equals(d.ZERO)?o.isNegative()?d.ONE:d.NEG_ONE:(t=this.subtract(o.multiply(n)),n.add(t.div(o)));if(o.equals(d.MIN_VALUE))return d.ZERO}if(this.isNegative())return o.isNegative()?this.negate().div(o.negate()):this.negate().div(o).negate();if(o.isNegative())return this.div(o.negate()).negate();for(r=d.ZERO,t=this;t.greaterThanOrEqual(o);){n=Math.max(1,Math.floor(t.toNumber()/o.toNumber()));for(var i=Math.ceil(Math.log(n)/Math.LN2),u=i<=48?1:Math.pow(2,i-48),a=d.fromNumber(n),s=a.multiply(o);s.isNegative()||s.greaterThan(t);)s=(a=d.fromNumber(n-=u)).multiply(o);a.isZero()&&(a=d.ONE),r=r.add(a),t=t.subtract(s)}return r},d.prototype.modulo=function(e){e=d.fromValue(e);return this.subtract(this.div(e).multiply(e))},d.prototype.not=function(){return d.fromBits(~this.low,~this.high)},d.prototype.and=function(e){e=d.fromValue(e);return d.fromBits(this.low&e.low,this.high&e.high)},d.prototype.or=function(e){e=d.fromValue(e);return d.fromBits(this.low|e.low,this.high|e.high)},d.prototype.xor=function(e){e=d.fromValue(e);return d.fromBits(this.low^e.low,this.high^e.high)},d.prototype.shiftLeft=function(e){e=d.toNumber(e);return 0==(e&=63)?d.ZERO:e<32?d.fromBits(this.low<<e,this.high<<e|this.low>>>32-e):d.fromBits(0,this.low<<e-32)},d.prototype.shiftRight=function(e){var t=d.toNumber(e),e=d.toNumber(e);return 0==(t&=63)?d.ZERO:e<32?d.fromBits(this.low>>>t|this.high<<32-t,this.high>>t):d.fromBits(this.high>>t-32,0<=this.high?0:-1)},d.isInteger=function(e){return!0===(null==e?void 0:e.__isInteger__)},d.fromInt=function(e){if(-128<=(e|=0)&&e<128&&null!=(t=G.get(e)))return t;var t=new d(e,e<0?-1:0);return-128<=e&&e<128&&G.set(e,t),t},d.fromBits=function(e,t){return new d(e,t)},d.fromNumber=function(e){return isNaN(e)||!isFinite(e)?d.ZERO:e<=-K?d.MIN_VALUE:K<=e+1?d.MAX_VALUE:e<0?d.fromNumber(-e).negate():new d(e%Y|0,e/Y|0)},d.fromString=function(e,t,r){var n=(void 0===r?{}:r).strictStringValidation;if(0===e.length)throw(0,H.newError)("number format error: empty string");if("NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return d.ZERO;if((t=null!=t?t:10)<2||36<t)throw(0,H.newError)("radix out of range: "+t.toString());if(0<(r=e.indexOf("-")))throw(0,H.newError)('number format error: interior "-" character: '+e);if(0===r)return d.fromString(e.substring(1),t).negate();for(var o,i,u=d.fromNumber(Math.pow(t,8)),a=d.ZERO,s=0;s<e.length;s+=8){var c,l=Math.min(8,e.length-s),f=e.substring(s,s+l),p=parseInt(f,t);if(!0===n&&(o=f,c=p,i=t,Number.isNaN(o)||Number.isNaN(c)||function(e,t,r){e=e.toString(t),t=Math.max(r-e.length,0),r="0".repeat(t);return"".concat(r).concat(e)}(c,i,o.length)!==o.toLowerCase()))throw(0,H.newError)('number format error: "'.concat(f,'" is NaN in radix ').concat(t,": ").concat(e));a=l<8?(c=d.fromNumber(Math.pow(t,l)),a.multiply(c).add(d.fromNumber(p))):(a=a.multiply(u)).add(d.fromNumber(p))}return a},d.fromValue=function(e,t){return void 0===t&&(t={}),e instanceof d?e:"number"==typeof e?(!0===t.ceilFloat&&(e=Math.ceil(e)),d.fromNumber(e)):"string"==typeof e?d.fromString(e,void 0,t):"bigint"==typeof e?d.fromString(e.toString()):new d(e.low,e.high)},d.toNumber=function(e){switch(typeof e){case"number":return e;case"bigint":return Number(e);default:return d.fromValue(e).toNumber()}},d.toString=function(e,t){return d.fromValue(e).toString(t)},d.inSafeRange=function(e){return d.fromValue(e).inSafeRange()},d.ZERO=d.fromInt(0),d.ONE=d.fromInt(1),d.NEG_ONE=d.fromInt(-1),d.MAX_VALUE=d.fromBits(-1,2147483647),d.MIN_VALUE=d.fromBits(0,-2147483648),d.MIN_SAFE_VALUE=d.fromBits(1,-2097152),d.MAX_SAFE_VALUE=d.fromBits(-1,2097151),d.__isInteger__=!0,d);function d(e,t){this.low=null!=e?e:0,this.high=null!=t?t:0}Object.defineProperty(o.prototype,"__isInteger__",{value:!0,enumerable:!1,configurable:!1});var Y=4294967296,K=Y*Y/2,Z=o.fromInt(1<<24),i=o.fromValue,i=(n.int=i,o.isInteger),i=(n.isInt=i,o.inSafeRange),i=(n.inSafeRange=i,o.toNumber),i=(n.toNumber=i,o.toString),i=(n.toString=i,n.default=o,{}),o={},u={},Q={},X={},J=(Object.defineProperty(X,"__esModule",{value:!0}),X.getBrokenObjectReason=X.isBrokenObject=X.createBrokenObject=void 0,"__isBrokenObject__"),$="__reason__";X.createBrokenObject=function(r,e){function n(){throw r}return void 0===e&&(e={}),new Proxy(e,{get:function(e,t){return t===J||(t===$?r:void("toJSON"!==t&&n()))},set:n,apply:n,construct:n,defineProperty:n,deleteProperty:n,getOwnPropertyDescriptor:n,getPrototypeOf:n,has:n,isExtensible:n,ownKeys:n,preventExtensions:n,setPrototypeOf:n})},X.isBrokenObject=function(e){return null!==e&&"object"==typeof e&&!0===e[J]},X.getBrokenObjectReason=function(e){return e[$]},Object.defineProperty(Q,"__esModule",{value:!0}),Q.stringify=void 0;var ee=X;Q.stringify=function(e){return JSON.stringify(e,function(e,t){return(0,ee.isBrokenObject)(t)?{__isBrokenObject__:!0,__reason__:(0,ee.getBrokenObjectReason)(t)}:"bigint"==typeof t?"".concat(t,"n"):t})};var a,te,re,ne,oe,ie,ue=r&&r.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},ae=(Object.defineProperty(u,"__esModule",{value:!0}),u.ENCRYPTION_OFF=u.ENCRYPTION_ON=u.equals=u.validateQueryAndParameters=u.assertValidDate=u.assertNumberOrInteger=u.assertNumber=u.assertString=u.assertObject=u.isString=u.isObject=u.isEmptyObjectOrNull=void 0,n),se=Q;u.ENCRYPTION_ON="ENCRYPTION_ON";function ce(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}function le(e,t){if(fe(e))return e;throw new TypeError((0,se.stringify)(t)+" expected to be string but was: "+(0,se.stringify)(e))}function fe(e){return"[object String]"===Object.prototype.toString.call(e)}function pe(e,t){this._minNumber=e,this._maxNumber=t,this._minInteger=(0,ne.int)(e),this._maxInteger=(0,ne.int)(t)}function de(e,t,r){e=(0,ne.int)(e),t=(0,ne.int)(t),r=(0,ne.int)(r);var n=e.multiply(365);return n=(n=(n=e.greaterThanOrEqual(0)?n.add(e.add(3).div(4).subtract(e.add(99).div(100)).add(e.add(399).div(400))):n.subtract(e.div(-4).subtract(e.div(-100)).add(e.div(-400)))).add(t.multiply(367).subtract(362).div(12))).add(r.subtract(1)),t.greaterThan(2)&&(n=n.subtract(1),function(e){if((e=(0,ne.int)(e)).modulo(4).equals(0))return!e.modulo(100).equals(0)||!!e.modulo(400).equals(0)}(e)||(n=n.subtract(1))),n.subtract(a.DAYS_0000_TO_1970)}function he(e,t,r){if((0,ie.assertNumberOrInteger)(e,r),t.contains(e))return e;throw(0,oe.newError)("".concat(r," is expected to be in range ").concat(t.toString()," but was: ").concat(e.toString()))}function be(e,t){e=(0,ne.int)(e),t=(0,ne.int)(t);var r=e.div(t);return r=e.isPositive()!==t.isPositive()&&r.multiply(t).notEquals(e)?r.subtract(1):r}function ye(e,t){return e=(0,ne.int)(e),t=(0,ne.int)(t),e.subtract(be(e,t).multiply(t))}function _e(e){return(e=(0,ne.int)(e)).equals(0)?"":"."+ve(e,9)}function ve(e,t,r){var n=(e=(0,ne.int)(e)).isNegative(),o=(e=n?e.negate():e).toString();if(null!=t)for(;o.length<t;)o="0"+o;return n?"-"+o:!0===(null==r?void 0:r.usePositiveSign)?"+"+o:o}u.ENCRYPTION_OFF="ENCRYPTION_OFF",u.isEmptyObjectOrNull=function(e){if(null===e)return!0;if(!ce(e))return!1;for(var t in e)if(void 0!==e[t])return!1;return!0},u.isObject=ce,u.validateQueryAndParameters=function(e,t,r){var n="",t=null!=t?t:{},r=null!=(r=null==r?void 0:r.skipAsserts)&&r;if("string"==typeof e?n=e:e instanceof String?n=e.toString():"object"==typeof e&&null!=e.text&&(n=e.text,t=null!=(e=e.parameters)?e:{}),!r){e=n;if(le(e,"Cypher query"),0===e.trim().length)throw new TypeError("Cypher query is expected to be a non-empty string.");r=t;if(!ce(r))throw e=null!=r.constructor?" "+r.constructor.name:"",new TypeError("Query parameters are expected to either be undefined/null or an object, given:".concat(e," ").concat(JSON.stringify(r)))}return{validatedQuery:n,params:t}},u.assertObject=function(e,t){if(ce(e))return e;throw new TypeError(t+" expected to be an object but was: "+(0,se.stringify)(e))},u.assertString=le,u.assertNumber=function(e,t){if("number"!=typeof e)throw new TypeError(t+" expected to be a number but was: "+(0,se.stringify)(e));return e},u.assertNumberOrInteger=function(e,t){if("number"==typeof e||"bigint"==typeof e||(0,ae.isInt)(e))return e;throw new TypeError(t+" expected to be either a number or an Integer object but was: "+(0,se.stringify)(e))},u.assertValidDate=function(e,t){if("[object Date]"!==Object.prototype.toString.call(e))throw new TypeError(t+" expected to be a standard JavaScript Date but was: "+(0,se.stringify)(e));if(Number.isNaN(e.getTime()))throw new TypeError(t+" expected to be valid JavaScript Date but its time was NaN: "+(0,se.stringify)(e));return e},u.isString=fe,u.equals=function e(t,r){var n,o;if(t===r)return!0;if(null===t||null===r)return!1;if("object"!=typeof t||"object"!=typeof r)return!1;var i=Object.keys(t),u=Object.keys(r);if(i.length!==u.length)return!1;try{for(var a=ue(i),s=a.next();!s.done;s=a.next()){var c=s.value;if(!e(t[c],r[c]))return!1}}catch(e){n={error:e}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(n)throw n.error}}return!0},a=o,te=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),re=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&te(t,e,r);return re(t,e),t},Object.defineProperty(a,"__esModule",{value:!0}),a.floorMod=a.floorDiv=a.assertValidZoneId=a.assertValidNanosecond=a.assertValidSecond=a.assertValidMinute=a.assertValidHour=a.assertValidDay=a.assertValidMonth=a.assertValidYear=a.timeZoneOffsetInSeconds=a.totalNanoseconds=a.newDate=a.toStandardDate=a.isoStringToStandardDate=a.dateToIsoString=a.timeZoneOffsetToIsoString=a.timeToIsoString=a.durationToIsoString=a.dateToEpochDay=a.localDateTimeToEpochSecond=a.localTimeToNanoOfDay=a.normalizeNanosecondsForDuration=a.normalizeSecondsForDuration=a.SECONDS_PER_DAY=a.DAYS_PER_400_YEAR_CYCLE=a.DAYS_0000_TO_1970=a.NANOS_PER_HOUR=a.NANOS_PER_MINUTE=a.NANOS_PER_MILLISECOND=a.NANOS_PER_SECOND=a.SECONDS_PER_HOUR=a.SECONDS_PER_MINUTE=a.MINUTES_PER_HOUR=a.NANOSECOND_OF_SECOND_RANGE=a.SECOND_OF_MINUTE_RANGE=a.MINUTE_OF_HOUR_RANGE=a.HOUR_OF_DAY_RANGE=a.DAY_OF_MONTH_RANGE=a.MONTH_OF_YEAR_RANGE=a.YEAR_RANGE=void 0,ne=s(n),oe=t,ie=u,pe.prototype.contains=function(e){var t;return(0,ne.isInt)(e)&&e instanceof ne.default?e.greaterThanOrEqual(this._minInteger)&&e.lessThanOrEqual(this._maxInteger):"bigint"==typeof e?(t=(0,ne.int)(e)).greaterThanOrEqual(this._minInteger)&&t.lessThanOrEqual(this._maxInteger):e>=this._minNumber&&e<=this._maxNumber},pe.prototype.toString=function(){return"[".concat(this._minNumber,", ").concat(this._maxNumber,"]")},s=pe,a.YEAR_RANGE=new s(-999999999,999999999),a.MONTH_OF_YEAR_RANGE=new s(1,12),a.DAY_OF_MONTH_RANGE=new s(1,31),a.HOUR_OF_DAY_RANGE=new s(0,23),a.MINUTE_OF_HOUR_RANGE=new s(0,59),a.SECOND_OF_MINUTE_RANGE=new s(0,59),a.NANOSECOND_OF_SECOND_RANGE=new s(0,999999999),a.MINUTES_PER_HOUR=60,a.SECONDS_PER_MINUTE=60,a.SECONDS_PER_HOUR=a.SECONDS_PER_MINUTE*a.MINUTES_PER_HOUR,a.NANOS_PER_SECOND=1e9,a.NANOS_PER_MILLISECOND=1e6,a.NANOS_PER_MINUTE=a.NANOS_PER_SECOND*a.SECONDS_PER_MINUTE,a.NANOS_PER_HOUR=a.NANOS_PER_MINUTE*a.MINUTES_PER_HOUR,a.DAYS_0000_TO_1970=719528,a.DAYS_PER_400_YEAR_CYCLE=146097,a.SECONDS_PER_DAY=86400,a.normalizeSecondsForDuration=function(e,t){return(0,ne.int)(e).add(be(t,a.NANOS_PER_SECOND))},a.normalizeNanosecondsForDuration=function(e){return ye(e,a.NANOS_PER_SECOND)},a.localTimeToNanoOfDay=function(e,t,r,n){return e=(0,ne.int)(e),t=(0,ne.int)(t),r=(0,ne.int)(r),n=(0,ne.int)(n),(e=(e=(e=e.multiply(a.NANOS_PER_HOUR)).add(t.multiply(a.NANOS_PER_MINUTE))).add(r.multiply(a.NANOS_PER_SECOND))).add(n)},a.localDateTimeToEpochSecond=function(e,t,r,n,o,i,u){return e=de(e,t,r),t=function(e,t,r){e=(0,ne.int)(e),t=(0,ne.int)(t),r=(0,ne.int)(r);e=e.multiply(a.SECONDS_PER_HOUR);return(e=e.add(t.multiply(a.SECONDS_PER_MINUTE))).add(r)}(n,o,i),e.multiply(a.SECONDS_PER_DAY).add(t)},a.dateToEpochDay=de,a.durationToIsoString=function(e,t,r,n){return e=ve(e),t=ve(t),r=function(e,t){e=(0,ne.int)(e),t=(0,ne.int)(t);var r,n=e.isNegative(),o=t.greaterThan(0);e=n&&o?e.equals(-1)?"-0":e.add(1).toString():e.toString();o&&(r=_e((n?t.negate().add(2*a.NANOS_PER_SECOND):t.add(a.NANOS_PER_SECOND)).modulo(a.NANOS_PER_SECOND)));return null!=r?e+r:e}(r,n),"P".concat(e,"M").concat(t,"DT").concat(r,"S")},a.timeToIsoString=function(e,t,r,n){return e=ve(e,2),t=ve(t,2),r=ve(r,2),n=_e(n),"".concat(e,":").concat(t,":").concat(r).concat(n)},a.timeZoneOffsetToIsoString=function(e){if((e=(0,ne.int)(e)).equals(0))return"Z";var t=(r=e.isNegative())?"-":"+",r=ve((e=r?e.multiply(-1):e).div(a.SECONDS_PER_HOUR),2),n=ve(e.div(a.SECONDS_PER_MINUTE).modulo(a.MINUTES_PER_HOUR),2);return null!=(e=(e=e.modulo(a.SECONDS_PER_MINUTE)).equals(0)?null:ve(e,2))?"".concat(t).concat(r,":").concat(n,":").concat(e):"".concat(t).concat(r,":").concat(n)},a.dateToIsoString=function(e,t,r){return e=function(e){e=(0,ne.int)(e);if(e.isNegative()||e.greaterThan(9999))return ve(e,6,{usePositiveSign:!0});return ve(e,4)}(e),t=ve(t,2),r=ve(r,2),"".concat(e,"-").concat(t,"-").concat(r)},a.isoStringToStandardDate=function(e){return new Date(e)},a.toStandardDate=function(e){return new Date(e)},a.newDate=function(e){return new Date(e)},a.totalNanoseconds=function(e,t){return t=null!=t?t:0,e=e.getMilliseconds()*a.NANOS_PER_MILLISECOND,t instanceof ne.default?t.add(e):"bigint"==typeof t?t+BigInt(e):t+e},a.timeZoneOffsetInSeconds=function(e){var t=e.getSeconds()>=e.getUTCSeconds()?e.getSeconds()-e.getUTCSeconds():e.getSeconds()-e.getUTCSeconds()+60;return 0===(e=e.getTimezoneOffset())?0+t:-1*e*a.SECONDS_PER_MINUTE+t},a.assertValidYear=function(e){return he(e,a.YEAR_RANGE,"Year")},a.assertValidMonth=function(e){return he(e,a.MONTH_OF_YEAR_RANGE,"Month")},a.assertValidDay=function(e){return he(e,a.DAY_OF_MONTH_RANGE,"Day")},a.assertValidHour=function(e){return he(e,a.HOUR_OF_DAY_RANGE,"Hour")},a.assertValidMinute=function(e){return he(e,a.MINUTE_OF_HOUR_RANGE,"Minute")},a.assertValidSecond=function(e){return he(e,a.SECOND_OF_MINUTE_RANGE,"Second")},a.assertValidNanosecond=function(e){return he(e,a.NANOSECOND_OF_SECOND_RANGE,"Nanosecond")},a.assertValidZoneId=function(t,r){try{Intl.DateTimeFormat(void 0,{timeZone:r})}catch(e){throw(0,oe.newError)("".concat(t,' is expected to be a valid ZoneId but was: "').concat(r,'"'))}},a.floorDiv=be,a.floorMod=ye;var me=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),ge=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&me(t,e,r);return ge(t,e),t},Oe=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},c=(Object.defineProperty(i,"__esModule",{value:!0}),i.isDateTime=i.DateTime=i.isLocalDateTime=i.LocalDateTime=i.isDate=i.Date=i.isTime=i.Time=i.isLocalTime=i.LocalTime=i.isDuration=i.Duration=void 0,s(o)),we=u,Ee=t,Pe=s(n),s={value:!0,enumerable:!1,configurable:!1,writable:!1},Se="__isDuration__",Te="__isLocalTime__",je="__isTime__",Ce="__isDate__",Ie="__isLocalDateTime__",Re="__isDateTime__",l=(ke.prototype.toString=function(){return c.durationToIsoString(this.months,this.days,this.seconds,this.nanoseconds)},ke);function ke(e,t,r,n){this.months=(0,we.assertNumberOrInteger)(e,"Months"),this.days=(0,we.assertNumberOrInteger)(t,"Days"),(0,we.assertNumberOrInteger)(r,"Seconds"),(0,we.assertNumberOrInteger)(n,"Nanoseconds"),this.seconds=c.normalizeSecondsForDuration(r,n),this.nanoseconds=c.normalizeNanosecondsForDuration(n),Object.freeze(this)}i.Duration=l,Object.defineProperty(l.prototype,Se,s),i.isDuration=function(e){return Ue(e,Se)};Ae.fromStandardDate=function(e,t){Fe(e,t);t=c.totalNanoseconds(e,t);return new Ae(e.getHours(),e.getMinutes(),e.getSeconds(),t instanceof Pe.default?t.toInt():"bigint"==typeof t?(0,Pe.int)(t).toInt():t)},Ae.prototype.toString=function(){return c.timeToIsoString(this.hour,this.minute,this.second,this.nanosecond)};l=Ae;function Ae(e,t,r,n){this.hour=c.assertValidHour(e),this.minute=c.assertValidMinute(t),this.second=c.assertValidSecond(r),this.nanosecond=c.assertValidNanosecond(n),Object.freeze(this)}i.LocalTime=l,Object.defineProperty(l.prototype,Te,s),i.isLocalTime=function(e){return Ue(e,Te)};Me.fromStandardDate=function(e,t){return Fe(e,t),new Me(e.getHours(),e.getMinutes(),e.getSeconds(),(0,Pe.toNumber)(c.totalNanoseconds(e,t)),c.timeZoneOffsetInSeconds(e))},Me.prototype.toString=function(){return c.timeToIsoString(this.hour,this.minute,this.second,this.nanosecond)+c.timeZoneOffsetToIsoString(this.timeZoneOffsetSeconds)};l=Me;function Me(e,t,r,n,o){this.hour=c.assertValidHour(e),this.minute=c.assertValidMinute(t),this.second=c.assertValidSecond(r),this.nanosecond=c.assertValidNanosecond(n),this.timeZoneOffsetSeconds=(0,we.assertNumberOrInteger)(o,"Time zone offset in seconds"),Object.freeze(this)}i.Time=l,Object.defineProperty(l.prototype,je,s),i.isTime=function(e){return Ue(e,je)};Ne.fromStandardDate=function(e){return Fe(e),new Ne(e.getFullYear(),e.getMonth()+1,e.getDate())},Ne.prototype.toStandardDate=function(){return c.isoStringToStandardDate(this.toString())},Ne.prototype.toString=function(){return c.dateToIsoString(this.year,this.month,this.day)};l=Ne;function Ne(e,t,r){this.year=c.assertValidYear(e),this.month=c.assertValidMonth(t),this.day=c.assertValidDay(r),Object.freeze(this)}i.Date=l,Object.defineProperty(l.prototype,Ce,s),i.isDate=function(e){return Ue(e,Ce)};xe.fromStandardDate=function(e,t){return Fe(e,t),new xe(e.getFullYear(),e.getMonth()+1,e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),(0,Pe.toNumber)(c.totalNanoseconds(e,t)))},xe.prototype.toStandardDate=function(){return c.isoStringToStandardDate(this.toString())},xe.prototype.toString=function(){return Le(this.year,this.month,this.day,this.hour,this.minute,this.second,this.nanosecond)};l=xe;function xe(e,t,r,n,o,i,u){this.year=c.assertValidYear(e),this.month=c.assertValidMonth(t),this.day=c.assertValidDay(r),this.hour=c.assertValidHour(n),this.minute=c.assertValidMinute(o),this.second=c.assertValidSecond(i),this.nanosecond=c.assertValidNanosecond(u),Object.freeze(this)}i.LocalDateTime=l,Object.defineProperty(l.prototype,Ie,s),i.isLocalDateTime=function(e){return Ue(e,Ie)};De.fromStandardDate=function(e,t){return Fe(e,t),new De(e.getFullYear(),e.getMonth()+1,e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),(0,Pe.toNumber)(c.totalNanoseconds(e,t)),c.timeZoneOffsetInSeconds(e),null)},De.prototype.toStandardDate=function(){return c.toStandardDate(this._toUTC())},De.prototype.toString=function(){var e;return Le(this.year,this.month,this.day,this.hour,this.minute,this.second,this.nanosecond)+(null!=this.timeZoneOffsetSeconds?c.timeZoneOffsetToIsoString(null!=(e=this.timeZoneOffsetSeconds)?e:0):"")+(null!=this.timeZoneId?"[".concat(this.timeZoneId,"]"):"")},De.prototype._toUTC=function(){if(void 0===this.timeZoneOffsetSeconds)throw new Error("Requires DateTime created with time zone offset");var e=c.localDateTimeToEpochSecond(this.year,this.month,this.day,this.hour,this.minute,this.second,this.nanosecond).subtract(null!=(e=this.timeZoneOffsetSeconds)?e:0);return(0,Pe.int)(e).multiply(1e3).add((0,Pe.int)(this.nanosecond).div(1e6)).toNumber()};l=De;function De(e,t,r,n,o,i,u,a,s){this.year=c.assertValidYear(e),this.month=c.assertValidMonth(t),this.day=c.assertValidDay(r),this.hour=c.assertValidHour(n),this.minute=c.assertValidMinute(o),this.second=c.assertValidSecond(i),this.nanosecond=c.assertValidNanosecond(u);e=Oe(function(e,t){var r=null!=e,n=null!=t&&""!==t;if(!r&&!n)throw(0,Ee.newError)("Unable to create DateTime without either time zone offset or id. Please specify either of them. Given offset: ".concat(e," and id: ").concat(t));var o=[void 0,void 0];r&&((0,we.assertNumberOrInteger)(e,"Time zone offset in seconds"),o[0]=e);n&&((0,we.assertString)(t,"Time zone ID"),c.assertValidZoneId("Time zone ID",t),o[1]=t);return o}(a,s),2),t=e[0],r=e[1];this.timeZoneOffsetSeconds=t,this.timeZoneId=null!=r?r:void 0,Object.freeze(this)}function Ue(e,t){return null!=e&&!0===e[t]}function Le(e,t,r,n,o,i,u){return c.dateToIsoString(e,t,r)+"T"+c.timeToIsoString(n,o,i,u)}function Fe(e,t){(0,we.assertValidDate)(e,"Standard date"),null!=t&&(0,we.assertNumberOrInteger)(t,"Nanosecond")}i.DateTime=l,Object.defineProperty(l.prototype,Re,s),i.isDateTime=function(e){return Ue(e,Re)};var l={},Be=(Object.defineProperty(l,"__esModule",{value:!0}),l.isPathSegment=l.PathSegment=l.isPath=l.Path=l.isUnboundRelationship=l.UnboundRelationship=l.isRelationship=l.Relationship=l.isNode=l.Node=void 0,Q),s={value:!0,enumerable:!1,configurable:!1,writable:!1},We="__isNode__",ze="__isRelationship__",qe="__isUnboundRelationship__",Ve="__isPath__",He="__isPathSegment__";function Ge(e,t){return null!=e&&!0===e[t]}Ye.prototype.toString=function(){for(var e="("+this.elementId,t=0;t<this.labels.length;t++)e+=":"+this.labels[t];var r=Object.keys(this.properties);if(0<r.length){e+=" {";for(t=0;t<r.length;t++)0<t&&(e+=","),e+=r[t]+":"+(0,Be.stringify)(this.properties[r[t]]);e+="}"}return e+=")"};var f=Ye;function Ye(e,t,r,n){this.identity=e,this.labels=t,this.properties=r,this.elementId=$e(n,function(){return e.toString()})}l.Node=f,Object.defineProperty(f.prototype,We,s),l.isNode=function(e){return Ge(e,We)};Ze.prototype.toString=function(){var e="("+this.startNodeElementId+")-[:"+this.type,t=Object.keys(this.properties);if(0<t.length){e+=" {";for(var r=0;r<t.length;r++)0<r&&(e+=","),e+=t[r]+":"+(0,Be.stringify)(this.properties[t[r]]);e+="}"}return e+="]->("+this.endNodeElementId+")"};var Ke=Ze;function Ze(e,t,r,n,o,i,u,a){this.identity=e,this.start=t,this.end=r,this.type=n,this.properties=o,this.elementId=$e(i,function(){return e.toString()}),this.startNodeElementId=$e(u,function(){return t.toString()}),this.endNodeElementId=$e(a,function(){return r.toString()})}l.Relationship=Ke,Object.defineProperty(Ke.prototype,ze,s),l.isRelationship=function(e){return Ge(e,ze)};Qe.prototype.bind=function(e,t){return new Ke(this.identity,e,t,this.type,this.properties,this.elementId)},Qe.prototype.bindTo=function(e,t){return new Ke(this.identity,e.identity,t.identity,this.type,this.properties,this.elementId,e.elementId,t.elementId)},Qe.prototype.toString=function(){var e="-[:"+this.type,t=Object.keys(this.properties);if(0<t.length){e+=" {";for(var r=0;r<t.length;r++)0<r&&(e+=","),e+=t[r]+":"+(0,Be.stringify)(this.properties[t[r]]);e+="}"}return e+="]->"};f=Qe;function Qe(e,t,r,n){this.identity=e,this.type=t,this.properties=r,this.elementId=$e(n,function(){return e.toString()})}l.UnboundRelationship=f,Object.defineProperty(f.prototype,qe,s),l.isUnboundRelationship=function(e){return Ge(e,qe)};function Xe(e,t,r){this.start=e,this.relationship=t,this.end=r}l.PathSegment=Xe,Object.defineProperty(Xe.prototype,He,s),l.isPathSegment=function(e){return Ge(e,He)};function Je(e,t,r){this.start=e,this.end=t,this.segments=r,this.length=r.length}function $e(e,t){return null==e?t():e}l.Path=Je,Object.defineProperty(Je.prototype,Ve,s),l.isPath=function(e){return Ge(e,Ve)};var f={},et=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},tt=r&&r.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},rt=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},nt=(Object.defineProperty(f,"__esModule",{value:!0}),t);function ot(e,t,r){var n;this.keys=e,this.length=e.length,this._fields=t,this._fieldLookup=null!=r?r:(n={},e.forEach(function(e,t){n[e]=t}),n)}ot.prototype.forEach=function(e){var t,r;try{for(var n=tt(this.entries()),o=n.next();!o.done;o=n.next()){var i=rt(o.value,2),u=i[0];e(i[1],u,this)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}},ot.prototype.map=function(e){var t,r,n=[];try{for(var o=tt(this.entries()),i=o.next();!i.done;i=o.next()){var u=rt(i.value,2),a=u[0],s=u[1];n.push(e(s,a,this))}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return n},ot.prototype.entries=function(){var t;return et(this,function(e){switch(e.label){case 0:t=0,e.label=1;case 1:return t<this.keys.length?[4,[this.keys[t],this._fields[t]]]:[3,4];case 2:e.sent(),e.label=3;case 3:return t++,[3,1];case 4:return[2]}})},ot.prototype.values=function(){var t;return et(this,function(e){switch(e.label){case 0:t=0,e.label=1;case 1:return t<this.keys.length?[4,this._fields[t]]:[3,4];case 2:e.sent(),e.label=3;case 3:return t++,[3,1];case 4:return[2]}})},ot.prototype[Symbol.iterator]=function(){var t;return et(this,function(e){switch(e.label){case 0:t=0,e.label=1;case 1:return t<this.keys.length?[4,this._fields[t]]:[3,4];case 2:e.sent(),e.label=3;case 3:return t++,[3,1];case 4:return[2]}})},ot.prototype.toObject=function(){var t,e,r={};try{for(var n=tt(this.entries()),o=n.next();!o.done;o=n.next()){var i=rt(o.value,2),u=i[0],a=i[1];r[u]=a}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}return r},ot.prototype.get=function(e){var t;if("number"!=typeof e){if(void 0===(t=this._fieldLookup[e]))throw(0,nt.newError)("This record has no field with key '".concat(e.toString(),"', available keys are: [")+this.keys.toString()+"].")}else t=e;if(t>this._fields.length-1||t<0)throw(0,nt.newError)("This record has no field with index '"+t.toString()+"'. Remember that indexes start at `0`, and make sure your query returns records in the shape you meant it to.");return this._fields[t]},ot.prototype.has=function(e){return"number"==typeof e?0<=e&&e<this._fields.length:void 0!==this._fieldLookup[e]},f.default=ot;var s={},it=(Object.defineProperty(s,"__esModule",{value:!0}),s.isPoint=s.Point=void 0,u),ut="__isPoint__",p=(at.prototype.toString=function(){return null==this.z||isNaN(this.z)?"Point{srid=".concat(st(this.srid),", x=").concat(st(this.x),", y=").concat(st(this.y),"}"):"Point{srid=".concat(st(this.srid),", x=").concat(st(this.x),", y=").concat(st(this.y),", z=").concat(st(this.z),"}")},at);function at(e,t,r,n){this.srid=(0,it.assertNumberOrInteger)(e,"SRID"),this.x=(0,it.assertNumber)(t,"X coordinate"),this.y=(0,it.assertNumber)(r,"Y coordinate"),this.z=null==n?n:(0,it.assertNumber)(n,"Z coordinate"),Object.freeze(this)}function st(e){return Number.isInteger(e)?e.toString()+".0":e.toString()}s.Point=p,Object.defineProperty(p.prototype,ut,{value:!0,enumerable:!1,configurable:!1,writable:!1}),s.isPoint=function(e){return null!=e&&!0===e[ut]};var p={},ct=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),lt=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),ft=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&ct(t,e,r);return lt(t,e),t},pt=(Object.defineProperty(p,"__esModule",{value:!0}),p.notificationCategory=p.notificationSeverityLevel=p.Stats=p.QueryStatistics=p.ProfiledPlan=p.Plan=p.Notification=p.ServerInfo=p.queryType=void 0,ft(n)),ft=(dt.prototype._buildNotifications=function(e){return null==e?[]:e.map(function(e){return new Et(e)})},dt.prototype.hasPlan=function(){return this.plan instanceof ht},dt.prototype.hasProfile=function(){return this.profile instanceof bt},dt);function dt(e,t,r,n){this.query={text:e,parameters:t},this.queryType=r.type,this.counters=new _t(null!=(e=r.stats)?e:{}),this.updateStatistics=this.counters,this.plan=(null!=r.plan||null!=r.profile)&&new ht(null!=(t=r.plan)?t:r.profile),this.profile=null!=r.profile&&new bt(r.profile),this.notifications=this._buildNotifications(r.notifications),this.server=new St(r.server,n),this.resultConsumedAfter=r.result_consumed_after,this.resultAvailableAfter=r.result_available_after,this.database={name:null!=(e=r.db)?e:null}}var ht=function t(e){this.operatorType=e.operatorType,this.identifiers=e.identifiers,this.arguments=e.args,this.children=null!=e.children?e.children.map(function(e){return new t(e)}):[]},bt=(p.Plan=ht,yt.prototype.hasPageCacheStats=function(){return 0<this.pageCacheMisses||0<this.pageCacheHits||0<this.pageCacheHitRatio},yt);function yt(e){this.operatorType=e.operatorType,this.identifiers=e.identifiers,this.arguments=e.args,this.dbHits=jt("dbHits",e),this.rows=jt("rows",e),this.pageCacheMisses=jt("pageCacheMisses",e),this.pageCacheHits=jt("pageCacheHits",e),this.pageCacheHitRatio=jt("pageCacheHitRatio",e),this.time=jt("time",e),this.children=null!=e.children?e.children.map(function(e){return new yt(e)}):[]}p.ProfiledPlan=bt;p.Stats=function(){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},vt.prototype.containsUpdates=function(){var r=this;return void 0!==this._containsUpdates?this._containsUpdates:0<Object.keys(this._stats).reduce(function(e,t){return e+r._stats[t]},0)},vt.prototype.updates=function(){return this._stats},vt.prototype.containsSystemUpdates=function(){return void 0!==this._containsSystemUpdates?this._containsSystemUpdates:0<this._systemUpdates},vt.prototype.systemUpdates=function(){return this._systemUpdates};var _t=vt;function vt(r){var n=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(r).forEach(function(e){var t=e.replace(/(-\w)/g,function(e){return e[1].toUpperCase()});t in n._stats?n._stats[t]=Tt(r[e]):"systemUpdates"===t?n._systemUpdates=Tt(r[e]):"containsSystemUpdates"===t?n._containsSystemUpdates=r[e]:"containsUpdates"===t&&(n._containsUpdates=r[e])}),this._stats=Object.freeze(this._stats)}p.QueryStatistics=_t;var mt={WARNING:"WARNING",INFORMATION:"INFORMATION",UNKNOWN:"UNKNOWN"},gt=(p.notificationSeverityLevel=mt,Object.freeze(mt),Object.values(mt)),Ot={HINT:"HINT",UNRECOGNIZED:"UNRECOGNIZED",UNSUPPORTED:"UNSUPPORTED",PERFORMANCE:"PERFORMANCE",DEPRECATION:"DEPRECATION",TOPOLOGY:"TOPOLOGY",SECURITY:"SECURITY",GENERIC:"GENERIC",UNKNOWN:"UNKNOWN"},wt=(p.notificationCategory=Ot,Object.freeze(Ot),Object.values(Ot)),Et=(Pt._constructPosition=function(e){return null==e?{}:{offset:Tt(e.offset),line:Tt(e.line),column:Tt(e.column)}},Pt);function Pt(e){this.code=e.code,this.title=e.title,this.description=e.description,this.severity=e.severity,this.position=Pt._constructPosition(e.position),this.severityLevel=gt.includes(e.severity)?e.severity:mt.UNKNOWN,this.rawSeverityLevel=e.severity,this.category=wt.includes(e.category)?e.category:Ot.UNKNOWN,this.rawCategory=e.category}p.Notification=Et;var St=function(e,t){null!=e&&(this.address=e.address,this.agent=e.version),this.protocolVersion=t};function Tt(e){return e instanceof pt.default?e.toNumber():"bigint"==typeof e?(0,pt.int)(e).toNumber():e}function jt(e,t,r){return void 0===r&&(r=0),!1!==t&&e in t?Tt(t[e]):r}p.ServerInfo=St;function Ct(){throw this.minimumSeverityLevel=void 0,this.disabledCategories=void 0,new Error("Not implemented")}p.queryType={READ_ONLY:"r",READ_WRITE:"rw",WRITE_ONLY:"w",SCHEMA_WRITE:"s"},p.default=ft;var ft={},It=(Object.defineProperty(ft,"__esModule",{value:!0}),ft.notificationFilterDisabledCategory=ft.notificationFilterMinimumSeverityLevel=void 0,{OFF:"OFF",WARNING:"WARNING",INFORMATION:"INFORMATION"}),It=(ft.notificationFilterMinimumSeverityLevel=It,Object.freeze(It),{HINT:"HINT",UNRECOGNIZED:"UNRECOGNIZED",UNSUPPORTED:"UNSUPPORTED",PERFORMANCE:"PERFORMANCE",TOPOLOGY:"TOPOLOGY",SECURITY:"SECURITY",DEPRECATION:"DEPRECATION",GENERIC:"GENERIC"}),It=(ft.notificationFilterDisabledCategory=It,Object.freeze(It),ft.default=Ct,{}),h={},b={},y=(Object.defineProperty(b,"__esModule",{value:!0}),b.FailedObserver=b.CompletedObserver=void 0,Rt.prototype.subscribe=function(e){At(e,e.onKeys,[]),At(e,e.onCompleted,{})},Rt.prototype.cancel=function(){},Rt.prototype.pause=function(){},Rt.prototype.resume=function(){},Rt.prototype.prepareToHandleSingleResponse=function(){},Rt.prototype.markCompleted=function(){},Rt.prototype.onError=function(e){throw new Error("CompletedObserver not supposed to call onError",{cause:e})},Rt);function Rt(){}function kt(e){var t=e.error,e=e.onError;this._error=t,this._beforeError=e,this._observers=[],this.onError(t)}function At(e,t,r){null!=t&&t.bind(e)(r)}b.CompletedObserver=y,kt.prototype.subscribe=function(e){At(e,e.onError,this._error),this._observers.push(e)},kt.prototype.onError=function(t){At(this,this._beforeError,t),this._observers.forEach(function(e){return At(e,e.onError,t)})},kt.prototype.cancel=function(){},kt.prototype.pause=function(){},kt.prototype.resume=function(){},kt.prototype.markCompleted=function(){},kt.prototype.prepareToHandleSingleResponse=function(){},b.FailedObserver=kt;var y={},Mt=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),Nt=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),_=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&Mt(t,e,r);return Nt(t,e),t},xt=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Dt=r&&r.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||((n=n||Array.prototype.slice.call(t,0,o))[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},Ut=(Object.defineProperty(y,"__esModule",{value:!0}),y.Bookmarks=void 0,_(u)),_=(Lt.empty=function(){return Ft},Lt.prototype.isEmpty=function(){return 0===this._values.length},Lt.prototype.values=function(){return this._values},Lt.prototype[Symbol.iterator]=function(){return this._values[Symbol.iterator]()},Lt.prototype.asBeginTransactionParameters=function(){var e;return this.isEmpty()?{}:((e={}).bookmarks=this._values,e)},Lt);function Lt(e){this._values=function(e){if(null==e||""===e)return[];if(Ut.isString(e))return[e];if(Array.isArray(e)){for(var t=new Set,r=function r(e){return e.reduce(function(e,t){return Array.isArray(t)?e.concat(r(t)):e.concat(t)},[])}(e),n=0;n<r.length;n++){var o=r[n];if(null!=o){if(!Ut.isString(o))throw new TypeError("Bookmark value should be a string, given: '".concat(o,"'"));t.add(o)}}return Dt([],xt(t),!1)}throw new TypeError("Bookmarks should either be a string or a string array, given: '".concat(e,"'"))}(e)}var Ft=new(y.Bookmarks=_)(null);var Bt,Wt,_={},v=(Object.defineProperty(_,"__esModule",{value:!0}),_.TELEMETRY_APIS=_.BOLT_PROTOCOL_V5_4=_.BOLT_PROTOCOL_V5_3=_.BOLT_PROTOCOL_V5_2=_.BOLT_PROTOCOL_V5_1=_.BOLT_PROTOCOL_V5_0=_.BOLT_PROTOCOL_V4_4=_.BOLT_PROTOCOL_V4_3=_.BOLT_PROTOCOL_V4_2=_.BOLT_PROTOCOL_V4_1=_.BOLT_PROTOCOL_V4_0=_.BOLT_PROTOCOL_V3=_.BOLT_PROTOCOL_V2=_.BOLT_PROTOCOL_V1=_.DEFAULT_POOL_MAX_SIZE=_.DEFAULT_POOL_ACQUISITION_TIMEOUT=_.DEFAULT_CONNECTION_TIMEOUT_MILLIS=_.ACCESS_MODE_WRITE=_.ACCESS_MODE_READ=_.FETCH_ALL=void 0,_.FETCH_ALL=-1,_.DEFAULT_POOL_ACQUISITION_TIMEOUT=6e4,_.DEFAULT_POOL_MAX_SIZE=100,_.DEFAULT_CONNECTION_TIMEOUT_MILLIS=3e4,_.ACCESS_MODE_READ="READ",_.ACCESS_MODE_WRITE="WRITE",_.BOLT_PROTOCOL_V1=1,_.BOLT_PROTOCOL_V2=2,_.BOLT_PROTOCOL_V3=3,_.BOLT_PROTOCOL_V4_0=4,_.BOLT_PROTOCOL_V4_1=4.1,_.BOLT_PROTOCOL_V4_2=4.2,_.BOLT_PROTOCOL_V4_3=4.3,_.BOLT_PROTOCOL_V4_4=4.4,_.BOLT_PROTOCOL_V5_0=5,_.BOLT_PROTOCOL_V5_1=5.1,_.BOLT_PROTOCOL_V5_2=5.2,_.BOLT_PROTOCOL_V5_3=5.3,_.BOLT_PROTOCOL_V5_4=5.4,_.TELEMETRY_APIS={MANAGED_TRANSACTION:0,UNMANAGED_TRANSACTION:1,AUTO_COMMIT_TRANSACTION:2,EXECUTE_QUERY:3},{}),m={},g=r&&r.__extends||(Bt=function(e,t){return(Bt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Bt(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),zt=(Object.defineProperty(m,"__esModule",{value:!0}),m.Logger=void 0,t),qt="error",Vt="warn",Ht="info",Gt="debug",Yt=((Kt={})[qt]=0,Kt[Vt]=1,Kt[Ht]=2,Kt[Gt]=3,Kt),Kt=(Zt.create=function(e){return null!=(null==e?void 0:e.logging)?new Zt(function(e){if(null==(null==e?void 0:e.level))return"info";var e=e.level,t=Yt[e];if(null!=t||0===t)return e;throw(0,zt.newError)("Illegal logging level: ".concat(e,". Supported levels are: ").concat(Object.keys(Yt).toString()))}(e=e.logging),function(e){if(null!=(null==e?void 0:e.logger)){var t=e.logger;if(null!=t&&"function"==typeof t)return t}throw(0,zt.newError)("Illegal logger function: ".concat(null!=(e=null==(t=null==e?void 0:e.logger)?void 0:t.toString())?e:"undefined"))}(e)):this.noOp()},Zt.noOp=function(){return Xt},Zt.prototype.isErrorEnabled=function(){return Jt(this._level,qt)},Zt.prototype.error=function(e){this.isErrorEnabled()&&this._loggerFunction(qt,e)},Zt.prototype.isWarnEnabled=function(){return Jt(this._level,Vt)},Zt.prototype.warn=function(e){this.isWarnEnabled()&&this._loggerFunction(Vt,e)},Zt.prototype.isInfoEnabled=function(){return Jt(this._level,Ht)},Zt.prototype.info=function(e){this.isInfoEnabled()&&this._loggerFunction(Ht,e)},Zt.prototype.isDebugEnabled=function(){return Jt(this._level,Gt)},Zt.prototype.debug=function(e){this.isDebugEnabled()&&this._loggerFunction(Gt,e)},Zt);function Zt(e,t){this._level=e,this._loggerFunction=t}function Qt(){return Wt.call(this,Ht,function(e,t){})||this}m.Logger=Kt,g(Qt,Wt=Kt),Qt.prototype.isErrorEnabled=function(){return!1},Qt.prototype.error=function(e){},Qt.prototype.isWarnEnabled=function(){return!1},Qt.prototype.warn=function(e){},Qt.prototype.isInfoEnabled=function(){return!1},Qt.prototype.info=function(e){},Qt.prototype.isDebugEnabled=function(){return!1},Qt.prototype.debug=function(e){};var Xt=new Qt;function Jt(e,t){return Yt[e]>=Yt[t]}var $t,g=r&&r.__extends||($t=function(e,t){return($t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}$t(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),er=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},tr=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},rr=(Object.defineProperty(v,"__esModule",{value:!0}),v.EMPTY_CONNECTION_HOLDER=v.ReadOnlyConnectionHolder=v.ConnectionHolder=void 0,t),nr=u,or=_,ir=y,ur=m,Kt=(ar.prototype.mode=function(){return this._mode},ar.prototype.database=function(){return this._database},ar.prototype.setDatabase=function(e){this._database=e},ar.prototype.bookmarks=function(){return this._bookmarks},ar.prototype.connectionProvider=function(){return this._connectionProvider},ar.prototype.referenceCount=function(){return this._referenceCount},ar.prototype.initializeConnection=function(){return 0!==this._referenceCount||null==this._connectionProvider?(this._referenceCount++,!1):(this._connectionPromise=this._createConnectionPromise(this._connectionProvider),this._referenceCount++,!0)},ar.prototype._createConnectionPromise=function(o){return er(this,void 0,void 0,function(){var t,r,n;return tr(this,function(e){switch(e.label){case 0:return r=(t=o).acquireConnection,n={accessMode:this._mode,database:this._database},[4,this._getBookmarks()];case 1:return[4,r.apply(t,[(n.bookmarks=e.sent(),n.impersonatedUser=this._impersonatedUser,n.onDatabaseNameResolved=this._onDatabaseNameResolved,n.auth=this._auth,n)])];case 2:return[2,e.sent()]}})})},ar.prototype._getBookmarks=function(){return er(this,void 0,void 0,function(){return tr(this,function(e){switch(e.label){case 0:return[4,this._getConnectionAcquistionBookmarks()];case 1:return[2,e.sent()]}})})},ar.prototype.getConnection=function(){return this._connectionPromise},ar.prototype.releaseConnection=function(){return 0===this._referenceCount?this._connectionPromise:(this._referenceCount--,0===this._referenceCount?this._releaseConnection():this._connectionPromise)},ar.prototype.close=function(e){return this._closed=!0,0===this._referenceCount?this._connectionPromise:(this._referenceCount=0,this._releaseConnection(e))},ar.prototype.log=function(){return this._log},ar.prototype._releaseConnection=function(t){return this._connectionPromise=this._connectionPromise.then(function(e){return null!=e?e.isOpen()&&(e.hasOngoingObservableRequests()||!0===t)?e.resetAndFlush().catch(dr).then(function(){return e.release().then(function(){return null})}):e.release().then(function(){return null}):Promise.resolve(null)}).catch(this._logError),this._connectionPromise},ar.prototype._logError=function(e){return this._log.isWarnEnabled()&&this._log.warn("ConnectionHolder got an error while releasing the connection. Error ".concat(e,". Stacktrace: ").concat(e.stack)),null},ar);function ar(e){var t=e.mode,r=e.database,r=void 0===r?"":r,n=e.bookmarks,o=e.connectionProvider,i=e.impersonatedUser,u=e.onDatabaseNameResolved,a=e.getConnectionAcquistionBookmarks,s=e.auth,e=e.log;this._mode=null!=t?t:or.ACCESS_MODE_WRITE,this._closed=!1,this._database=null!=r?(0,nr.assertString)(r,"database"):"",this._bookmarks=null!=n?n:ir.Bookmarks.empty(),this._connectionProvider=o,this._impersonatedUser=i,this._referenceCount=0,this._connectionPromise=Promise.resolve(null),this._onDatabaseNameResolved=u,this._auth=s,this._log=e,this._logError=this._logError.bind(this),this._getConnectionAcquistionBookmarks=null!=a?a:function(){return Promise.resolve(ir.Bookmarks.empty())}}v.ConnectionHolder=Kt;g(fr,sr=Kt),fr.prototype.initializeConnection=function(){return 0!==this._connectionHolder.referenceCount()},fr.prototype.getConnection=function(){return this._connectionHolder.getConnection()},fr.prototype.releaseConnection=function(){return this._connectionHolder.getConnection().catch(function(){return Promise.resolve(null)})},fr.prototype.close=function(){return this._connectionHolder.getConnection().catch(function(){return Promise.resolve(null)})};var sr,cr,lr=fr;function fr(e){var t=sr.call(this,{mode:e.mode(),database:e.database(),bookmarks:e.bookmarks(),getConnectionAcquistionBookmarks:e._getConnectionAcquistionBookmarks,connectionProvider:e.connectionProvider(),log:e.log()})||this;return t._connectionHolder=e,t}function pr(){return cr.call(this,{log:ur.Logger.create({})})||this}v.ReadOnlyConnectionHolder=lr,v.default=lr,g(pr,cr=Kt),pr.prototype.mode=function(){},pr.prototype.database=function(){},pr.prototype.initializeConnection=function(){return!0},pr.prototype.getConnection=function(){return er(this,void 0,void 0,function(){return tr(this,function(e){switch(e.label){case 0:return[4,Promise.reject((0,rr.newError)("This connection holder does not serve connections"))];case 1:return[2,e.sent()]}})})},pr.prototype.releaseConnection=function(){return er(this,void 0,void 0,function(){return tr(this,function(e){switch(e.label){case 0:return[4,Promise.resolve(null)];case 1:return[2,e.sent()]}})})},pr.prototype.close=function(){return er(this,void 0,void 0,function(){return tr(this,function(e){switch(e.label){case 0:return[4,Promise.resolve(null)];case 1:return[2,e.sent()]}})})};lr=new pr;function dr(e){return null}v.EMPTY_CONNECTION_HOLDER=lr;var g={},hr=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),br=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Kt=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&hr(t,e,r);return br(t,e),t},yr=(Object.defineProperty(g,"__esModule",{value:!0}),g.TxConfig=void 0,Kt(u)),_r=t,vr=n,lr=(mr.empty=function(){return gr},mr.prototype.isEmpty=function(){return Object.values(this).every(function(e){return null==e})},mr);function mr(e,t){var r;null!=(r=e)&&yr.assertObject(r,"Transaction config"),this.timeout=function(e,t){if(yr.isObject(e)&&null!=e.timeout){yr.assertNumberOrInteger(e.timeout,"Transaction timeout"),!function(e){return"number"==typeof e.timeout&&!Number.isInteger(e.timeout)}(e)||!0!==(null==t?void 0:t.isInfoEnabled())||null==t||t.info("Transaction timeout expected to be an integer, got: ".concat(e.timeout,". The value will be rounded up."));t=(0,vr.int)(e.timeout,{ceilFloat:!0});if(t.isNegative())throw(0,_r.newError)("Transaction timeout should not be negative");return t}return null}(e,t),this.metadata=function(e){if(yr.isObject(e)&&null!=e.metadata){e=e.metadata;if(yr.assertObject(e,"config.metadata"),0!==Object.keys(e).length)return e}return null}(e)}var gr=new(g.TxConfig=lr)({});var Kt={},Or=r&&r.__assign||function(){return(Or=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},wr=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},Er=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},Pr=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Sr=r&&r.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||((n=n||Array.prototype.slice.call(t,0,o))[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},Tr=(Object.defineProperty(Kt,"__esModule",{value:!0}),Kt.TransactionExecutor=void 0,t),jr=_;function Cr(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return setTimeout.apply(void 0,Sr([e,t],Pr(r),!1))}function Ir(e){return clearTimeout(e)}function Rr(e,t,r,n,o){void 0===o&&(o={setTimeout:Cr,clearTimeout:Ir}),this._maxRetryTimeMs=kr(e,3e4),this._initialRetryDelayMs=kr(t,1e3),this._multiplier=kr(r,2),this._jitterFactor=kr(n,.2),this._setTimeout=o.setTimeout,this._clearTimeout=o.clearTimeout,this._inFlightTimeoutIds=[],this.pipelineBegin=!1,this.telemetryApi=jr.TELEMETRY_APIS.MANAGED_TRANSACTION,this._verifyAfterConstruction()}function kr(e,t){return null!=e?e:t}Rr.prototype.execute=function(n,o,i){var u=this,a={apiTransactionConfig:{api:this.telemetryApi,onTelemetrySuccess:function(){a.apiTransactionConfig=void 0}}};return new Promise(function(e,t){u._executeTransactionInsidePromise(n,o,e,t,i,a).catch(t)}).catch(function(e){var t=Date.now(),r=u._initialRetryDelayMs;return u._retryTransactionPromise(n,o,e,t,r,i,a)})},Rr.prototype.close=function(){var t=this;this._inFlightTimeoutIds.forEach(function(e){return t._clearTimeout(e)}),this._inFlightTimeoutIds=[]},Rr.prototype._retryTransactionPromise=function(o,i,e,r,u,a,s){var c=this;return Date.now()-r>this._maxRetryTimeMs||!(0,Tr.isRetriableError)(e)?Promise.reject(e):new Promise(function(e,t){var r=c._computeDelayWithJitter(u),n=c._setTimeout(function(){c._inFlightTimeoutIds=c._inFlightTimeoutIds.filter(function(e){return e!==n}),c._executeTransactionInsidePromise(o,i,e,t,a,s).catch(t)},r);c._inFlightTimeoutIds.push(n)}).catch(function(e){var t=u*c._multiplier;return c._retryTransactionPromise(o,i,e,r,t,a,s)})},Rr.prototype._executeTransactionInsidePromise=function(u,a,s,c,l,f){return wr(this,void 0,void 0,function(){var t,r,n,o,i=this;return Er(this,function(e){switch(e.label){case 0:return(e.trys.push([0,4,,5]),r=u(null!=(null==f?void 0:f.apiTransactionConfig)?Or({},null==f?void 0:f.apiTransactionConfig):void 0),this.pipelineBegin)?(n=r,[3,3]):[3,1];case 1:return[4,r];case 2:n=e.sent(),e.label=3;case 3:return t=n,[3,5];case 4:return o=e.sent(),c(o),[2];case 5:return o=(null!=l?l:function(e){return e})(t),this._safeExecuteTransactionWork(o,a).then(function(e){return i._handleTransactionWorkSuccess(e,t,s,c)}).catch(function(e){return i._handleTransactionWorkFailure(e,t,c)}),[2]}})})},Rr.prototype._safeExecuteTransactionWork=function(e,t){try{var r=t(e);return Promise.resolve(r)}catch(e){return Promise.reject(e)}},Rr.prototype._handleTransactionWorkSuccess=function(e,t,r,n){t.isOpen()?t.commit().then(function(){r(e)}).catch(function(e){n(e)}):r(e)},Rr.prototype._handleTransactionWorkFailure=function(e,t,r){t.isOpen()?t.rollback().catch(function(e){}).then(function(){return r(e)}).catch(r):r(e)},Rr.prototype._computeDelayWithJitter=function(e){var t=e*this._jitterFactor,r=e-t,e=e+t;return Math.random()*(e-r)+r},Rr.prototype._verifyAfterConstruction=function(){if(this._maxRetryTimeMs<0)throw(0,Tr.newError)("Max retry time should be >= 0: "+this._maxRetryTimeMs.toString());if(this._initialRetryDelayMs<0)throw(0,Tr.newError)("Initial retry delay should >= 0: "+this._initialRetryDelayMs.toString());if(this._multiplier<1)throw(0,Tr.newError)("Multiplier should be >= 1.0: "+this._multiplier.toString());if(this._jitterFactor<0||1<this._jitterFactor)throw(0,Tr.newError)("Jitter factor should be in [0.0, 1.0]: "+this._jitterFactor.toFixed())},Kt.TransactionExecutor=Rr;var lr={},Ar=r&&r.__assign||function(){return(Ar=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Mr=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Nr=(Object.defineProperty(lr,"__esModule",{value:!0}),lr.Url=lr.formatIPv6Address=lr.formatIPv4Address=lr.defaultPortForScheme=lr.parseDatabaseUrl=void 0,u),xr=7687,Dr=7474,Ur=7473,Lr=function(e,t,r,n,o){this.scheme=e,this.host=t,this.port=r,this.hostAndPort=n,this.query=o};function Fr(e,t,r){if(""===(e=(null!=e?e:"").trim()))throw new Error("Illegal empty ".concat(t," in URL query '").concat(r,"'"));return e}function Br(e){var t="["===e.charAt(0),r="]"===e.charAt(e.length-1);if(t||r){if(t&&r)return e;throw new Error("Illegal IPv6 address ".concat(e))}return"[".concat(e,"]")}function Wr(e){return"http"===e?Dr:"https"===e?Ur:xr}lr.Url=Lr,lr.parseDatabaseUrl=function(e){(0,Nr.assertString)(e,"URL");var t,r=function(e){function u(e,t){t=e.indexOf(t);return 0<=t?[e.substring(0,t),e[t],e.substring(t+1)]:[e,"",""]}function t(e){var t,r={},n=((t="@")===(t=0<=(t=(o=e).lastIndexOf(t))?[o.substring(0,t),o[t],o.substring(t+1)]:["","",o])[1]&&(r.userInfo=decodeURIComponent(t[0]),e=t[2]),Mr((o="]",n=u(n=e,i="["),[(i=u(n[2],o))[0],i[2]]),2)),o=n[0],i=n[1];return""!==o?(r.host=o,t=u(i,":")):(t=u(e,":"),r.host=t[0]),":"===t[1]&&(r.port=t[2]),r}var r,n={};":"===(r=u(e,":"))[1]&&(n.scheme=decodeURIComponent(r[0]),e=r[2]);"#"===(r=u(e,"#"))[1]&&(n.fragment=decodeURIComponent(r[2]),e=r[0]);"?"===(r=u(e,"?"))[1]&&(n.query=r[2],e=r[0]);e.startsWith("//")?(r=u(e.substr(2),"/"),(n=Ar(Ar({},n),t(r[0]))).path=r[1]+r[2]):n.path=e;return n}((n=(n=(n=e).trim()).includes("://")?{schemeMissing:!1,url:n}:{schemeMissing:!0,url:"none://".concat(n)}).url),n=n.schemeMissing?null:function(e){if(null==e)return null;":"===(e=e.trim()).charAt(e.length-1)&&(e=e.substring(0,e.length-1));return e}(r.scheme),o=function(e){if(null!=e)return e.trim();throw new Error("Unable to extract host from null or undefined URL")}(r.host),i=function(e){if(""!==e&&null!=e)return e.includes(":")?Br(e):e;throw new Error("Illegal host ".concat(e))}(o),u=function(e,t){e="string"==typeof e?parseInt(e,10):e;return null==e||isNaN(e)?Wr(t):e}(r.port,n),i="".concat(i,":").concat(u),r=function(e,r){var e=null!=e?function(e){"?"===(null==(e=(null!=e?e:"").trim())?void 0:e.charAt(0))&&(e=e.substring(1,e.length));return e}(e):null,n={};null!=e&&e.split("&").forEach(function(e){e=e.split("=");if(2!==e.length)throw new Error("Invalid parameters: '".concat(e.toString(),"' in URL '").concat(r,"'."));var t=Fr(e[0],"key",r),e=Fr(e[1],"value",r);if(void 0!==n[t])throw new Error("Duplicated query parameters with key '".concat(t,"' in URL '").concat(r,"'"));n[t]=e});return n}(null!=(t=r.query)?t:"string"==typeof(t=r.resourceName)?Mr(t.split("?"),2)[1]:null,e);return new Lr(n,o,u,i,r)},lr.formatIPv4Address=function(e,t){return"".concat(e,":").concat(t)},lr.formatIPv6Address=function(e,t){return e=Br(e),"".concat(e,":").concat(t)},lr.defaultPortForScheme=Wr;var O={},zr=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),qr=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),w=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&zr(t,e,r);return qr(t,e),t},Vr=(Object.defineProperty(O,"__esModule",{value:!0}),O.ServerAddress=void 0,u),Hr=w(lr);function Gr(e,t,r,n){this._host=(0,Vr.assertString)(e,"host"),this._resolved=null!=t?(0,Vr.assertString)(t,"resolved"):null,this._port=(0,Vr.assertNumber)(r,"port"),this._hostPort=n,this._stringValue=null!=t?"".concat(n,"(").concat(t,")"):"".concat(n)}Gr.prototype.host=function(){return this._host},Gr.prototype.resolvedHost=function(){return null!=this._resolved?this._resolved:this._host},Gr.prototype.port=function(){return this._port},Gr.prototype.resolveWith=function(e){return new Gr(this._host,e,this._port,this._hostPort)},Gr.prototype.asHostPort=function(){return this._hostPort},Gr.prototype.asKey=function(){return this._hostPort},Gr.prototype.toString=function(){return this._stringValue},Gr.fromUrl=function(e){e=Hr.parseDatabaseUrl(e);return new Gr(e.host,null,e.port,e.hostAndPort)},O.ServerAddress=Gr;var w={},E={};function Yr(){}Object.defineProperty(E,"__esModule",{value:!0}),Yr.prototype.resolve=function(){throw new Error("Abstract function")},Yr.prototype._resolveToItself=function(e){return Promise.resolve([e])},E.default=Yr;var Kr={},Zr=(Object.defineProperty(Kr,"__esModule",{value:!0}),O);function Qr(e){return Promise.resolve([e])}function Xr(e){this._resolverFunction=null!=e?e:Qr}Xr.prototype.resolve=function(t){var r=this;return new Promise(function(e){return e(r._resolverFunction(t.asHostPort()))}).then(function(e){if(Array.isArray(e))return e.map(function(e){return Zr.ServerAddress.fromUrl(e)});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(e))})},Kr.default=Xr;var Jr,$r=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},E=(Object.defineProperty(w,"__esModule",{value:!0}),w.ConfiguredCustomResolver=w.BaseHostNameResolver=void 0,$r(E)),E=(w.BaseHostNameResolver=E.default,$r(Kr)),$r=(w.ConfiguredCustomResolver=E.default,{}),E={};Object.defineProperty(E,"__esModule",{value:!0}),E.fromVersion=void 0,E.fromVersion=function(e,t){var r=null!=(t=(t=void 0===t?function(){return{get userAgent(){}}}:t)()).userAgent?t.userAgent.split("(")[1].split(")")[0]:void 0,t=t.userAgent||void 0;return{product:"neo4j-javascript/".concat(e),platform:r,languageDetails:t}},S=$r,Jr=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),P=r&&r.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||Jr(t,e,r)},Object.defineProperty(S,"__esModule",{value:!0}),P(E,S);function en(e){console.log("Uncaught error when processing result: "+e)}function tn(e){}function rn(e){}var nn,on=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),un=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),P=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&on(t,e,r);return un(t,e),t},E=(Object.defineProperty(h,"__esModule",{value:!0}),h.boltAgent=h.objectUtil=h.resolver=h.serverAddress=h.urlUtil=h.logger=h.transactionExecutor=h.txConfig=h.connectionHolder=h.constants=h.bookmarks=h.observer=h.temporalUtil=h.util=void 0,P(u)),S=(h.util=E,P(o)),E=(h.temporalUtil=S,P(b)),o=(h.observer=E,P(y)),S=(h.bookmarks=o,P(_)),E=(h.constants=S,P(v)),o=(h.connectionHolder=E,P(g)),S=(h.txConfig=o,P(Kt)),E=(h.transactionExecutor=S,P(m)),o=(h.logger=E,P(lr)),S=(h.urlUtil=o,P(O)),E=(h.serverAddress=S,P(w)),lr=(h.resolver=E,P(X)),o=(h.objectUtil=lr,P($r)),an=(h.boltAgent=o,r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})}),sn=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},O=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},cn=(Object.defineProperty(It,"__esModule",{value:!0}),O(p)),ln=h,fn=t,pn=ln.connectionHolder.EMPTY_CONNECTION_HOLDER;function dn(e,t,r,n,o){var i;void 0===o&&(o={high:Number.MAX_VALUE,low:Number.MAX_VALUE}),this[nn]="Result",this._stack=null==(i=new Error("")).stack?null:i.stack.replace(/^Error(\n\r)*/,""),this._streamObserverPromise=e,this._p=null,this._query=t,this._parameters=null!=r?r:{},this._connectionHolder=null!=n?n:pn,this._keys=null,this._summary=null,this._error=null,this._watermarks=o}dn.prototype.keys=function(){var n=this;return null!==this._keys?Promise.resolve(this._keys):null!==this._error?Promise.reject(this._error):new Promise(function(t,r){n._streamObserverPromise.then(function(e){return e.subscribe(n._decorateObserver({onKeys:function(e){return t(e)},onError:function(e){return r(e)}}))}).catch(r)})},dn.prototype.summary=function(){var n=this;return null!==this._summary?Promise.resolve(this._summary):null!==this._error?Promise.reject(this._error):new Promise(function(t,r){n._streamObserverPromise.then(function(e){e.cancel(),e.subscribe(n._decorateObserver({onCompleted:function(e){return t(e)},onError:function(e){return r(e)}}))}).catch(r)})},dn.prototype._getOrCreatePromise=function(){var e=this;return null==this._p&&(this._p=new Promise(function(t,r){var n=[];e.subscribe({onNext:function(e){n.push(e)},onCompleted:function(e){t({records:n,summary:e})},onError:function(e){r(e)}})})),this._p},dn.prototype[Symbol.asyncIterator]=function(){var e,n=this;if(!this.isOpen())return e=(0,fn.newError)("Result is already consumed"),{next:function(){return Promise.reject(e)},peek:function(){return Promise.reject(e)}};function o(){return an(n,void 0,void 0,function(){var t;return sn(this,function(e){switch(e.label){case 0:return void 0!==u.queuedObserver?[3,2]:(u.queuedObserver=this._createQueuedResultObserver(r),t=u,[4,this._subscribe(u.queuedObserver,!0).catch(function(){})]);case 1:t.streaming=e.sent(),r(),e.label=2;case 2:return[2,u.queuedObserver]}})})}function i(e){if(void 0===e)throw(0,fn.newError)("InvalidState: Result stream finished without Summary",fn.PROTOCOL_ERROR);return 1}var u={paused:!0,firstRun:!0,finished:!1},r=function(){var e,t;null!=u.streaming&&(e=(t=null!=(t=null==(t=u.queuedObserver)?void 0:t.size)?t:0)>=n._watermarks.high,t=t<=n._watermarks.low,e&&!u.paused?(u.paused=!0,u.streaming.pause()):(t&&u.paused||u.firstRun&&!e)&&(u.firstRun=!1,u.paused=!1,u.streaming.resume()))};return{next:function(){return an(n,void 0,void 0,function(){var t;return sn(this,function(e){switch(e.label){case 0:return u.finished&&i(u.summary)?[2,{done:!0,value:u.summary}]:[4,o()];case 1:return[4,e.sent().dequeue()];case 2:return!0===(t=e.sent()).done&&(u.finished=t.done,u.summary=t.value),[2,t]}})})},return:function(r){return an(n,void 0,void 0,function(){var t;return sn(this,function(e){switch(e.label){case 0:return u.finished&&i(u.summary)?[2,{done:!0,value:null!=r?r:u.summary}]:(null!=(t=u.streaming)&&t.cancel(),[4,o()]);case 1:return[4,e.sent().dequeueUntilDone()];case 2:return t=e.sent(),u.finished=!0,t.value=null!=r?r:t.value,u.summary=t.value,[2,t]}})})},peek:function(){return an(n,void 0,void 0,function(){return sn(this,function(e){switch(e.label){case 0:return u.finished&&i(u.summary)?[2,{done:!0,value:u.summary}]:[4,o()];case 1:return[4,e.sent().head()];case 2:return[2,e.sent()]}})})}}},dn.prototype.then=function(e,t){return this._getOrCreatePromise().then(e,t)},dn.prototype.catch=function(e){return this._getOrCreatePromise().catch(e)},dn.prototype.finally=function(e){return this._getOrCreatePromise().finally(e)},dn.prototype.subscribe=function(e){this._subscribe(e).catch(function(){})},dn.prototype.isOpen=function(){return null===this._summary&&null===this._error},dn.prototype._subscribe=function(e,t){void 0===t&&(t=!1);var r=this._decorateObserver(e);return this._streamObserverPromise.then(function(e){return t&&e.pause(),e.subscribe(r),e}).catch(function(e){return null!=r.onError&&r.onError(e),Promise.reject(e)})},dn.prototype._decorateObserver=function(n){var e,o=this,t=null!=(e=n.onCompleted)?e:tn,i=null!=(e=n.onError)?e:en,r=null!=(e=n.onKeys)?e:rn;return{onNext:null!=n.onNext?n.onNext.bind(n):void 0,onKeys:function(e){return o._keys=e,r.call(n,e)},onCompleted:function(e){o._releaseConnectionAndGetSummary(e).then(function(e){return null!==o._summary?t.call(n,o._summary):(o._summary=e,t.call(n,e))}).catch(i)},onError:function(r){o._connectionHolder.releaseConnection().then(function(){var e,t;e=r,null!=(t=o._stack)&&(e.stack=e.toString()+"\n"+t),o._error=r,i.call(n,r)}).catch(i)}}},dn.prototype._cancel=function(){null===this._summary&&null===this._error&&this._streamObserverPromise.then(function(e){return e.cancel()}).catch(function(){})},dn.prototype._releaseConnectionAndGetSummary=function(t){var e=ln.util.validateQueryAndParameters(this._query,this._parameters,{skipAsserts:!0}),r=e.validatedQuery,n=e.params,o=this._connectionHolder;return o.getConnection().then(function(e){return o.releaseConnection().then(function(){return null==e?void 0:e.getProtocolVersion()})},function(e){}).then(function(e){return new cn.default(r,n,t,e)})},dn.prototype._createQueuedResultObserver=function(n){var e=this;function o(){var r={};return r.promise=new Promise(function(e,t){r.resolve=e,r.reject=t}),r}function i(e){return e instanceof Error}function r(){var r;return an(this,void 0,void 0,function(){var t;return sn(this,function(e){switch(e.label){case 0:if(0<u.length){if(t=null!=(r=u.shift())?r:(0,fn.newError)("Unexpected empty buffer",fn.PROTOCOL_ERROR),n(),i(t))throw t;return[2,t]}return a.resolvable=o(),[4,a.resolvable.promise];case 1:return[2,e.sent()]}})})}var u=[],a={resolvable:null},t={onNext:function(e){t._push({done:!1,value:e})},onCompleted:function(e){t._push({done:!0,value:e})},onError:function(e){t._push(e)},_push:function(e){var t;null!==a.resolvable?(t=a.resolvable,a.resolvable=null,i(e)?t.reject(e):t.resolve(e)):(u.push(e),n())},dequeue:r,dequeueUntilDone:function(){return an(e,void 0,void 0,function(){var t;return sn(this,function(e){switch(e.label){case 0:return[4,r()];case 1:return!0===(t=e.sent()).done?[2,t]:[3,0];case 2:return[2]}})})},head:function(){return an(e,void 0,void 0,function(){var t,r;return sn(this,function(e){switch(e.label){case 0:if(0<u.length){if(i(t=u[0]))throw t;return[2,t]}a.resolvable=o(),e.label=1;case 1:return e.trys.push([1,3,4,5]),[4,a.resolvable.promise];case 2:return t=e.sent(),u.unshift(t),[2,t];case 3:throw r=e.sent(),u.unshift(r),r;case 4:return n(),[7];case 5:return[2]}})})},get size(){return u.length}};return t},nn=Symbol.toStringTag,It.default=dn;S={};Object.defineProperty(S,"__esModule",{value:!0});S.default=function(e,t,r){this.keys=e,this.records=t,this.summary=r};w={},Object.defineProperty(w,"__esModule",{value:!0}),w.Releasable=void 0,hn.prototype.release=function(){throw new Error("Not implemented")},E=hn;function hn(){}function bn(){}w.Releasable=E,bn.prototype.acquireConnection=function(e){throw Error("Not implemented")},bn.prototype.supportsMultiDb=function(){throw Error("Not implemented")},bn.prototype.supportsTransactionConfig=function(){throw Error("Not implemented")},bn.prototype.supportsUserImpersonation=function(){throw Error("Not implemented")},bn.prototype.supportsSessionAuth=function(){throw Error("Not implemented")},bn.prototype.verifyConnectivityAndGetServerInfo=function(e){throw Error("Not implemented")},bn.prototype.verifyAuthentication=function(e){throw Error("Not implemented")},bn.prototype.getNegotiatedProtocolVersion=function(){throw Error("Not Implemented")},bn.prototype.close=function(){throw Error("Not implemented")},w.default=bn;X={};function yn(){}Object.defineProperty(X,"__esModule",{value:!0}),yn.prototype.beginTransaction=function(e){throw new Error("Not implemented")},yn.prototype.run=function(e,t,r){throw new Error("Not implemented")},yn.prototype.commitTransaction=function(e){throw new Error("Not implemented")},yn.prototype.rollbackTransaction=function(e){throw new Error("Not implemented")},yn.prototype.resetAndFlush=function(){throw new Error("Not implemented")},yn.prototype.isOpen=function(){throw new Error("Not implemented")},yn.prototype.getProtocolVersion=function(){throw new Error("Not implemented")},yn.prototype.hasOngoingObservableRequests=function(){throw new Error("Not implemented")},X.default=yn;var lr={},_n=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},vn=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},P=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},mn=(Object.defineProperty(lr,"__esModule",{value:!0}),u),gn=v,On=y,wn=g,En=b,Pn=t,Sn=P(It);function Tn(e){var t=e.connectionHolder,r=e.onClose,n=e.onBookmarks,o=e.onConnection,i=e.reactive,u=e.fetchSize,a=e.impersonatedUser,s=e.highRecordWatermark,c=e.lowRecordWatermark,l=e.notificationFilter,e=e.apiTelemetryConfig,f=this;this._connectionHolder=t,this._reactive=i,this._state=jn.ACTIVE,this._onClose=r,this._onBookmarks=n,this._onConnection=o,this._onError=this._onErrorCallback.bind(this),this._fetchSize=u,this._onComplete=this._onCompleteCallback.bind(this),this._results=[],this._impersonatedUser=a,this._lowRecordWatermak=c,this._highRecordWatermark=s,this._bookmarks=On.Bookmarks.empty(),this._notificationFilter=l,this._apiTelemetryConfig=e,this._acceptActive=function(){},this._activePromise=new Promise(function(e,t){f._acceptActive=e})}Tn.prototype._begin=function(o,i,u){var t=this;this._connectionHolder.getConnection().then(function(n){return _n(t,void 0,void 0,function(){var t,r=this;return vn(this,function(e){switch(e.label){case 0:return(this._onConnection(),null==n)?[3,2]:(t=this,[4,o()]);case 1:return t._bookmarks=e.sent(),[2,n.beginTransaction({bookmarks:this._bookmarks,txConfig:i,mode:this._connectionHolder.mode(),database:this._connectionHolder.database(),impersonatedUser:this._impersonatedUser,notificationFilter:this._notificationFilter,apiTelemetryConfig:this._apiTelemetryConfig,beforeError:function(e){null!=u&&u.onError(e),r._onError(e).catch(function(){})},afterComplete:function(e){null!=u&&u.onComplete(e),r._onComplete(e)}})];case 2:throw(0,Pn.newError)("No connection available")}})})}).catch(function(e){null!=u&&u.onError(e),t._onError(e).catch(function(){})}).finally(function(){return t._acceptActive()})},Tn.prototype.run=function(e,t){e=(0,mn.validateQueryAndParameters)(e,t),t=e.validatedQuery,e=e.params,t=this._state.run(t,e,{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(t),t},Tn.prototype.commit=function(){var t=this,r=this._state.commit({connectionHolder:this._connectionHolder,onError:this._onError,onComplete:function(e){return t._onCompleteCallback(e,t._bookmarks)},onConnection:this._onConnection,pendingResults:this._results,preparationJob:this._activePromise});return this._state=r.state,this._onClose(),new Promise(function(e,t){r.result.subscribe({onCompleted:function(){return e()},onError:function(e){return t(e)}})})},Tn.prototype.rollback=function(){var r=this._state.rollback({connectionHolder:this._connectionHolder,onError:this._onError,onComplete:this._onComplete,onConnection:this._onConnection,pendingResults:this._results,preparationJob:this._activePromise});return this._state=r.state,this._onClose(),new Promise(function(e,t){r.result.subscribe({onCompleted:function(){return e()},onError:function(e){return t(e)}})})},Tn.prototype.isOpen=function(){return this._state===jn.ACTIVE},Tn.prototype.close=function(){return _n(this,void 0,void 0,function(){return vn(this,function(e){switch(e.label){case 0:return this.isOpen()?[4,this.rollback()]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}})})},Tn.prototype[Symbol.asyncDispose]=function(){return this.close()},Tn.prototype._onErrorCallback=function(t){return this._state=jn.FAILED,this._onClose(),this._results.forEach(function(e){e.isOpen()&&e._streamObserverPromise.then(function(e){return e.onError(t)}).catch(function(e){})}),this._connectionHolder.releaseConnection()},Tn.prototype._onCompleteCallback=function(e,t){this._onBookmarks(new On.Bookmarks(null==e?void 0:e.bookmark),null!=t?t:On.Bookmarks.empty(),null==e?void 0:e.db)};var jn={ACTIVE:{commit:function(e){return{result:Cn(!0,e.connectionHolder,e.onError,e.onComplete,e.onConnection,e.pendingResults,e.preparationJob),state:jn.SUCCEEDED}},rollback:function(e){return{result:Cn(!1,e.connectionHolder,e.onError,e.onComplete,e.onConnection,e.pendingResults,e.preparationJob),state:jn.ROLLED_BACK}},run:function(t,r,e){var n=e.connectionHolder,o=e.onError,i=e.onComplete,u=e.onConnection,a=e.reactive,s=e.fetchSize,c=e.highRecordWatermark,l=e.lowRecordWatermark,e=e.preparationJob,f=null!=e?e:Promise.resolve();return In(n.getConnection().then(function(e){return f.then(function(){return e})}).then(function(e){if(u(),null!=e)return e.run(t,r,{bookmarks:On.Bookmarks.empty(),txConfig:wn.TxConfig.empty(),beforeError:o,afterComplete:i,reactive:a,fetchSize:s,highRecordWatermark:c,lowRecordWatermark:l});throw(0,Pn.newError)("No connection available")}).catch(function(e){return new En.FailedObserver({error:e,onError:o})}),t,r,n,c,l)}},FAILED:{commit:function(e){var t=e.connectionHolder,r=e.onError;return e.onComplete,{result:In(new En.FailedObserver({error:(0,Pn.newError)("Cannot commit this transaction, because it has been rolled back either because of an error or explicit termination."),onError:r}),"COMMIT",{},t,0,0),state:jn.FAILED}},rollback:function(e){var t=e.connectionHolder;return e.onError,e.onComplete,{result:In(new En.CompletedObserver,"ROLLBACK",{},t,0,0),state:jn.FAILED}},run:function(e,t,r){var n=r.connectionHolder,o=r.onError;return r.onComplete,In(new En.FailedObserver({error:(0,Pn.newError)("Cannot run query in this transaction, because it has been rolled back either because of an error or explicit termination."),onError:o}),e,t,n,0,0)}},SUCCEEDED:{commit:function(e){var t=e.connectionHolder,r=e.onError;return e.onComplete,{result:In(new En.FailedObserver({error:(0,Pn.newError)("Cannot commit this transaction, because it has already been committed."),onError:r}),"COMMIT",{},gn.EMPTY_CONNECTION_HOLDER,0,0),state:jn.SUCCEEDED,connectionHolder:t}},rollback:function(e){var t=e.connectionHolder,r=e.onError;return e.onComplete,{result:In(new En.FailedObserver({error:(0,Pn.newError)("Cannot rollback this transaction, because it has already been committed."),onError:r}),"ROLLBACK",{},gn.EMPTY_CONNECTION_HOLDER,0,0),state:jn.SUCCEEDED,connectionHolder:t}},run:function(e,t,r){var n=r.connectionHolder,o=r.onError;return r.onComplete,In(new En.FailedObserver({error:(0,Pn.newError)("Cannot run query in this transaction, because it has already been committed."),onError:o}),e,t,n,0,0)}},ROLLED_BACK:{commit:function(e){var t=e.connectionHolder,r=e.onError;return e.onComplete,{result:In(new En.FailedObserver({error:(0,Pn.newError)("Cannot commit this transaction, because it has already been rolled back."),onError:r}),"COMMIT",{},t,0,0),state:jn.ROLLED_BACK}},rollback:function(e){var t=e.connectionHolder;return e.onError,e.onComplete,{result:In(new En.FailedObserver({error:(0,Pn.newError)("Cannot rollback this transaction, because it has already been rolled back.")}),"ROLLBACK",{},t,0,0),state:jn.ROLLED_BACK}},run:function(e,t,r){var n=r.connectionHolder,o=r.onError;return r.onComplete,In(new En.FailedObserver({error:(0,Pn.newError)("Cannot run query in this transaction, because it has already been rolled back."),onError:o}),e,t,n,0,0)}}};function Cn(r,e,n,o,i,u,t){var a=null!=t?t:Promise.resolve(),t=e.getConnection().then(function(e){return a.then(function(){return e})}).then(function(t){return i(),u.forEach(function(e){return e._cancel()}),Promise.all(u.map(function(e){return e.summary()})).then(function(e){if(null!=t)return r?t.commitTransaction({beforeError:n,afterComplete:o}):t.rollbackTransaction({beforeError:n,afterComplete:o});throw(0,Pn.newError)("No connection available")})}).catch(function(e){return new En.FailedObserver({error:e,onError:n})});return new Sn.default(t,r?"COMMIT":"ROLLBACK",{},e,{high:Number.MAX_VALUE,low:Number.MAX_VALUE})}function In(e,t,r,n,o,i){return void 0===n&&(n=gn.EMPTY_CONNECTION_HOLDER),new Sn.default(Promise.resolve(e),t,r,new gn.ReadOnlyConnectionHolder(null!=n?n:gn.EMPTY_CONNECTION_HOLDER),{low:i,high:o})}lr.default=Tn;$r={};function Rn(e){e=e.run;this._run=e}Object.defineProperty($r,"__esModule",{value:!0}),Rn.fromTransaction=function(e){return new Rn({run:e.run.bind(e)})},Rn.prototype.run=function(e,t){return this._run(e,t)},$r.default=Rn;var kn,An,Mn,o={},O=r&&r.__extends||(kn=function(e,t){return(kn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}kn(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Nn=r&&r.__assign||function(){return(Nn=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},E=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},P=(Object.defineProperty(o,"__esModule",{value:!0}),E(lr)),E=(Mn=P.default,O(xn,Mn),xn.prototype.then=function(e,t){return this._getOrCreateBeginPromise().then(e,t)},xn.prototype.catch=function(e){return this._getOrCreateBeginPromise().catch(e)},xn.prototype.finally=function(e){return this._getOrCreateBeginPromise().finally(e)},xn.prototype._getOrCreateBeginPromise=function(){var r=this;return null==this._beginPromise&&(this._beginPromise=new Promise(function(e,t){r._resolve=e,r._reject=t,null!=r._beginError&&t(r._beginError),null!=r._beginMetadata&&e(r._toTransaction())})),this._beginPromise},xn.prototype._toTransaction=function(){return Nn(Nn({},this),{run:Mn.prototype.run.bind(this),commit:Mn.prototype.commit.bind(this),rollback:Mn.prototype.rollback.bind(this),close:Mn.prototype.close.bind(this),isOpen:Mn.prototype.isOpen.bind(this),_begin:this._begin.bind(this)})},xn.prototype._begin=function(e,t){return Mn.prototype._begin.call(this,e,t,{onError:this._onBeginError.bind(this),onComplete:this._onBeginMetadata.bind(this)})},xn.prototype._onBeginError=function(e){this._beginError=e,null!=this._reject&&this._reject(e)},xn.prototype._onBeginMetadata=function(e){this._beginMetadata=null!=e?e:{},null!=this._resolve&&this._resolve(this._toTransaction())},xn);function xn(e){var t=e.connectionHolder,r=e.onClose,n=e.onBookmarks,o=e.onConnection,i=e.reactive,u=e.fetchSize,a=e.impersonatedUser,s=e.highRecordWatermark,c=e.lowRecordWatermark,l=e.notificationFilter,e=e.apiTelemetryConfig,t=Mn.call(this,{connectionHolder:t,onClose:r,onBookmarks:n,onConnection:o,reactive:i,fetchSize:u,impersonatedUser:a,highRecordWatermark:s,lowRecordWatermark:c,notificationFilter:l,apiTelemetryConfig:e})||this;return t[An]="TransactionPromise",t}An=Symbol.toStringTag,o.default=E;var P={},Dn=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},Un=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},Ln=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Fn=r&&r.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||((n=n||Array.prototype.slice.call(t,0,o))[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},O=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Bn=(Object.defineProperty(P,"__esModule",{value:!0}),b),Wn=u,zn=_,qn=t,Vn=O(It),Hn=v,Gn=Kt,Yn=y,Kn=g,Zn=O(o),Qn=O($r);function Xn(e){var t=e.mode,r=e.connectionProvider,n=e.bookmarks,o=e.database,i=e.config,u=e.reactive,a=e.fetchSize,s=e.impersonatedUser,c=e.bookmarkManager,l=e.notificationFilter,f=e.auth,e=e.log,t=(this._mode=t,this._database=o,this._reactive=u,this._fetchSize=a,this._onDatabaseNameResolved=this._onDatabaseNameResolved.bind(this),this._getConnectionAcquistionBookmarks=this._getConnectionAcquistionBookmarks.bind(this),this._readConnectionHolder=new Hn.ConnectionHolder({mode:zn.ACCESS_MODE_READ,auth:f,database:o,bookmarks:n,connectionProvider:r,impersonatedUser:s,onDatabaseNameResolved:this._onDatabaseNameResolved,getConnectionAcquistionBookmarks:this._getConnectionAcquistionBookmarks,log:e}),this._writeConnectionHolder=new Hn.ConnectionHolder({mode:zn.ACCESS_MODE_WRITE,auth:f,database:o,bookmarks:n,connectionProvider:r,impersonatedUser:s,onDatabaseNameResolved:this._onDatabaseNameResolved,getConnectionAcquistionBookmarks:this._getConnectionAcquistionBookmarks,log:e}),this._open=!0,this._hasTx=!1,this._impersonatedUser=s,this._lastBookmarks=null!=n?n:Yn.Bookmarks.empty(),this._configuredBookmarks=this._lastBookmarks,this._transactionExecutor=function(e){e=null!=(e=null==e?void 0:e.maxTransactionRetryTime)?e:null;return new Gn.TransactionExecutor(e)}(i),this._databaseNameResolved=""!==this._database,this._calculateWatermaks());this._lowRecordWatermark=t.low,this._highRecordWatermark=t.high,this._results=[],this._bookmarkManager=c,this._notificationFilter=l,this._log=e}Xn.prototype.run=function(e,t,r){var o=this,e=(0,Wn.validateQueryAndParameters)(e,t),i=e.validatedQuery,u=e.params,a=null!=r?new Kn.TxConfig(r,this._log):Kn.TxConfig.empty(),t=this._run(i,u,function(n){return Dn(o,void 0,void 0,function(){var t,r=this;return Un(this,function(e){switch(e.label){case 0:return[4,this._bookmarks()];case 1:return t=e.sent(),this._assertSessionIsOpen(),[2,n.run(i,u,{bookmarks:t,txConfig:a,mode:this._mode,database:this._database,apiTelemetryConfig:{api:zn.TELEMETRY_APIS.AUTO_COMMIT_TRANSACTION},impersonatedUser:this._impersonatedUser,afterComplete:function(e){return r._onCompleteCallback(e,t)},reactive:this._reactive,fetchSize:this._fetchSize,lowRecordWatermark:this._lowRecordWatermark,highRecordWatermark:this._highRecordWatermark,notificationFilter:this._notificationFilter})]}})})});return this._results.push(t),t},Xn.prototype._run=function(e,t,r){var r=this._acquireAndConsumeConnection(r),n=r.connectionHolder,r=r.resultPromise.catch(function(e){return Promise.resolve(new Bn.FailedObserver({error:e}))}),o={high:this._highRecordWatermark,low:this._lowRecordWatermark};return new Vn.default(r,e,t,n,o)},Xn.prototype._acquireConnection=function(e){var r=this,e=this._acquireAndConsumeConnection(e),n=e.connectionHolder;return e.resultPromise.then(function(t){return Dn(r,void 0,void 0,function(){return Un(this,function(e){switch(e.label){case 0:return[4,n.releaseConnection()];case 1:return e.sent(),[2,t]}})})})},Xn.prototype._acquireAndConsumeConnection=function(t){var e=this._connectionHolderWithMode(this._mode),r=this._open?!this._hasTx&&e.initializeConnection()?e.getConnection().then(function(e){return t(e)}):Promise.reject((0,qn.newError)("Queries cannot be run directly on a session with an open transaction; either run from within the transaction or use a different session.")):Promise.reject((0,qn.newError)("Cannot run query in a closed session."));return{connectionHolder:e,resultPromise:r}},Xn.prototype.beginTransaction=function(e){var t=Kn.TxConfig.empty();return null!=e&&(t=new Kn.TxConfig(e,this._log)),this._beginTransaction(this._mode,t,{api:zn.TELEMETRY_APIS.UNMANAGED_TRANSACTION})},Xn.prototype._beginTransaction=function(e,t,r){var n=this;if(!this._open)throw(0,qn.newError)("Cannot begin a transaction on a closed session.");if(this._hasTx)throw(0,qn.newError)("You cannot begin a transaction on a session with an open transaction; either run from within the transaction or use a different session.");e=Xn._validateSessionMode(e),e=this._connectionHolderWithMode(e),e.initializeConnection(),this._hasTx=!0,e=new Zn.default({connectionHolder:e,impersonatedUser:this._impersonatedUser,onClose:this._transactionClosed.bind(this),onBookmarks:function(e,t,r){return n._updateBookmarks(e,t,r)},onConnection:this._assertSessionIsOpen.bind(this),reactive:this._reactive,fetchSize:this._fetchSize,lowRecordWatermark:this._lowRecordWatermark,highRecordWatermark:this._highRecordWatermark,notificationFilter:this._notificationFilter,apiTelemetryConfig:r});return e._begin(function(){return n._bookmarks()},t),e},Xn.prototype._assertSessionIsOpen=function(){if(!this._open)throw(0,qn.newError)("You cannot run more transactions on a closed session.")},Xn.prototype._transactionClosed=function(){this._hasTx=!1},Xn.prototype.lastBookmark=function(){return this.lastBookmarks()},Xn.prototype.lastBookmarks=function(){return this._lastBookmarks.values()},Xn.prototype._bookmarks=function(){var r;return Dn(this,void 0,void 0,function(){var t;return Un(this,function(e){switch(e.label){case 0:return[4,null==(r=this._bookmarkManager)?void 0:r.getBookmarks()];case 1:return void 0===(t=e.sent())?[2,this._lastBookmarks]:[2,new Yn.Bookmarks(Fn(Fn([],Ln(t),!1),Ln(this._configuredBookmarks),!1))]}})})},Xn.prototype.readTransaction=function(e,t){t=new Kn.TxConfig(t,this._log);return this._runTransaction(zn.ACCESS_MODE_READ,t,e)},Xn.prototype.writeTransaction=function(e,t){t=new Kn.TxConfig(t,this._log);return this._runTransaction(zn.ACCESS_MODE_WRITE,t,e)},Xn.prototype._runTransaction=function(t,r,e){var n=this;return this._transactionExecutor.execute(function(e){return n._beginTransaction(t,r,e)},e)},Xn.prototype.executeRead=function(e,t){t=new Kn.TxConfig(t,this._log);return this._executeInTransaction(zn.ACCESS_MODE_READ,t,e)},Xn.prototype.executeWrite=function(e,t){t=new Kn.TxConfig(t,this._log);return this._executeInTransaction(zn.ACCESS_MODE_WRITE,t,e)},Xn.prototype._executeInTransaction=function(t,r,e){var n=this;return this._transactionExecutor.execute(function(e){return n._beginTransaction(t,r,e)},e,Qn.default.fromTransaction)},Xn.prototype._onDatabaseNameResolved=function(e){this._databaseNameResolved||(this._database=e=null!=e?e:"",this._readConnectionHolder.setDatabase(e),this._writeConnectionHolder.setDatabase(e),this._databaseNameResolved=!0)},Xn.prototype._getConnectionAcquistionBookmarks=function(){var r;return Dn(this,void 0,void 0,function(){var t;return Un(this,function(e){switch(e.label){case 0:return[4,null==(r=this._bookmarkManager)?void 0:r.getBookmarks()];case 1:return void 0===(t=e.sent())?[2,this._lastBookmarks]:[2,new Yn.Bookmarks(Fn(Fn([],Ln(this._configuredBookmarks),!1),Ln(t),!1))]}})})},Xn.prototype._updateBookmarks=function(e,t,r){var n;null==e||e.isEmpty()||(null!=(n=this._bookmarkManager)&&n.updateBookmarks(null!=(n=null==t?void 0:t.values())?n:[],null!=(t=null==e?void 0:e.values())?t:[]).catch(function(){}),this._lastBookmarks=e,this._configuredBookmarks=Yn.Bookmarks.empty())},Xn.prototype.close=function(){return Dn(this,void 0,void 0,function(){return Un(this,function(e){switch(e.label){case 0:return this._open?(this._open=!1,this._results.forEach(function(e){return e._cancel()}),this._transactionExecutor.close(),[4,this._readConnectionHolder.close(this._hasTx)]):[3,3];case 1:return e.sent(),[4,this._writeConnectionHolder.close(this._hasTx)];case 2:e.sent(),e.label=3;case 3:return[2]}})})},Xn.prototype[Symbol.asyncDispose]=function(){return this.close()},Xn.prototype._connectionHolderWithMode=function(e){if(e===zn.ACCESS_MODE_READ)return this._readConnectionHolder;if(e===zn.ACCESS_MODE_WRITE)return this._writeConnectionHolder;throw(0,qn.newError)("Unknown access mode: "+e)},Xn.prototype._onCompleteCallback=function(e,t){this._updateBookmarks(new Yn.Bookmarks(e.bookmark),t,e.db)},Xn.prototype._calculateWatermaks=function(){return this._fetchSize===zn.FETCH_ALL?{low:Number.MAX_VALUE,high:Number.MAX_VALUE}:{low:.3*this._fetchSize,high:.7*this._fetchSize}},Xn.prototype._configureTransactionExecutor=function(e,t){this._transactionExecutor.pipelineBegin=e,this._transactionExecutor.telemetryApi=t},Xn._validateSessionMode=function(e){e=null!=e?e:zn.ACCESS_MODE_WRITE;if(e!==zn.ACCESS_MODE_READ&&e!==zn.ACCESS_MODE_WRITE)throw(0,qn.newError)("Illegal session mode "+e);return e},P.default=Xn;var E={},b={},Jn=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},$n=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},eo=r&&r.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},to=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},ro=r&&r.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||((n=n||Array.prototype.slice.call(t,0,o))[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},v=(Object.defineProperty(b,"__esModule",{value:!0}),b.bookmarkManager=void 0,no.prototype.updateBookmarks=function(e,t){return Jn(this,void 0,void 0,function(){return $n(this,function(e){throw new Error("Not implemented")})})},no.prototype.getBookmarks=function(){return Jn(this,void 0,void 0,function(){return $n(this,function(e){throw new Error("Not implemented")})})},no);function no(){throw new Error("Not implemented")}b.default=v,b.bookmarkManager=function(e){void 0===e&&(e={});var t=new Set(e.initialBookmarks);return new oo(t,e.bookmarksSupplier,e.bookmarksConsumer)};io.prototype.updateBookmarks=function(f,p){return Jn(this,void 0,void 0,function(){var t,r,n,o,i,u,a,s,c,l;return $n(this,function(e){switch(e.label){case 0:t=this._bookmarks;try{for(r=eo(f),n=r.next();!n.done;n=r.next())u=n.value,t.delete(u)}catch(e){a={error:e}}finally{try{n&&!n.done&&(s=r.return)&&s.call(r)}finally{if(a)throw a.error}}try{for(o=eo(p),i=o.next();!i.done;i=o.next())u=i.value,t.add(u)}catch(e){c={error:e}}finally{try{i&&!i.done&&(l=o.return)&&l.call(o)}finally{if(c)throw c.error}}return"function"!=typeof this._bookmarksConsumer?[3,2]:[4,this._bookmarksConsumer(ro([],to(t),!1))];case 1:e.sent(),e.label=2;case 2:return[2]}})})},io.prototype.getBookmarks=function(){var s;return Jn(this,void 0,void 0,function(){var t,r,n,o,i,u,a;return $n(this,function(e){switch(e.label){case 0:return t=new Set(this._bookmarks),"function"!=typeof this._bookmarksSupplier?[3,2]:[4,this._bookmarksSupplier()];case 1:r=null!=(s=e.sent())?s:[];try{for(n=eo(r),o=n.next();!o.done;o=n.next())i=o.value,t.add(i)}catch(e){u={error:e}}finally{try{o&&!o.done&&(a=n.return)&&a.call(n)}finally{if(u)throw u.error}}e.label=2;case 2:return[2,ro([],to(t),!1)]}})})};var oo=io;function io(e,t,r){this._bookmarks=e,this._bookmarksSupplier=t,this._bookmarksConsumer=r}var Kt={},uo=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},ao=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},g=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},so=(Object.defineProperty(Kt,"__esModule",{value:!0}),g(S)),co=t;function lo(o){return uo(this,void 0,void 0,function(){var t,r,n;return ao(this,function(e){switch(e.label){case 0:return[4,o];case 1:return r=e.sent(),t=r.summary,r=r.records,[4,o.keys()];case 2:return n=e.sent(),[2,new so.default(n,r,t)]}})})}function fo(){}fo.prototype.eagerResultTransformer=function(){return lo},fo.prototype.mappedResultTransformer=function(i){var e=this;if(null==i||null==i.collect&&null==i.map)throw(0,co.newError)("Requires a map or/and a collect functions.");return function(o){return uo(e,void 0,void 0,function(){return ao(this,function(e){switch(e.label){case 0:return[4,new Promise(function(t,r){var n={records:[],keys:[]};o.subscribe({onKeys:function(e){n.keys=e},onNext:function(e){var t;null!=i.map?void 0!==(t=i.map(e))&&n.records.push(t):n.records.push(e)},onCompleted:function(e){null!=i.collect?t(i.collect(n.records,e,n.keys)):(e={records:n.records,summary:e,keys:n.keys},t(e))},onError:function(e){r(e)}})})];case 1:return[2,e.sent()]}})})}};var O=new fo,v=(Object.freeze(O),Kt.default=O,{}),po=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},ho=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},bo=(Object.defineProperty(v,"__esModule",{value:!0}),_);function yo(e){this._createSession=e}yo.prototype.execute=function(o,i,u){return po(this,void 0,void 0,function(){var t,n=this;return ho(this,function(e){switch(e.label){case 0:(t=this._createSession({database:o.database,bookmarkManager:o.bookmarkManager,impersonatedUser:o.impersonatedUser}))._configureTransactionExecutor(!0,bo.TELEMETRY_APIS.EXECUTE_QUERY),e.label=1;case 1:return e.trys.push([1,,3,5]),[4,("READ"===o.routing?t.executeRead:t.executeWrite).bind(t)(function(r){return po(n,void 0,void 0,function(){var t;return ho(this,function(e){switch(e.label){case 0:return t=r.run(i,u),[4,o.resultTransformer(t)];case 1:return[2,e.sent()]}})})},o.transactionConfig)];case 2:return[2,e.sent()];case 3:return[4,t.close()];case 4:return e.sent(),[7];case 5:return[2]}})})},v.default=yo;function _o(){this.routing=xo.WRITE,this.resultTransformer=void 0,this.database="",this.impersonatedUser=void 0,this.bookmarkManager=void 0,this.transactionConfig=void 0}var vo=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},mo=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},g=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},go=(Object.defineProperty(E,"__esModule",{value:!0}),E.QueryConfig=E.SessionConfig=E.routing=E.WRITE=E.READ=E.Driver=void 0,y),Oo=g(Kr),wo=_,Eo=m,Po=g(P),So=u,To=b,jo=g(Kt),Co=g(v),Io=t,Ro=36e5,ko=1e3,Ao=wo.ACCESS_MODE_READ,Mo=(E.READ=Ao,wo.ACCESS_MODE_WRITE),No=(E.WRITE=Mo,0),xo=(E.SessionConfig=function(){this.defaultAccessMode=Mo,this.bookmarks=[],this.database="",this.impersonatedUser=void 0,this.auth=void 0,this.fetchSize=void 0,this.bookmarkManager=void 0,this.notificationFilter=void 0},{WRITE:"WRITE",READ:"READ"}),O=(E.routing=xo,Object.freeze(xo),E.QueryConfig=_o,Object.defineProperty(Do.prototype,"executeQueryBookmarkManager",{get:function(){return this._defaultExecuteQueryBookmarkManager},enumerable:!1,configurable:!0}),Do.prototype.executeQuery=function(o,i,u){var a,s;return void 0===u&&(u={}),vo(this,void 0,void 0,function(){var t,r,n;return mo(this,function(e){switch(e.label){case 0:if(t=null===u.bookmarkManager?void 0:null!=(a=u.bookmarkManager)?a:this.executeQueryBookmarkManager,r=null!=(a=u.resultTransformer)?a:jo.default.eagerResultTransformer(),(n=null!=(s=u.routing)?s:xo.WRITE)!==xo.READ&&n!==xo.WRITE)throw(0,Io.newError)('Illegal query routing config: "'.concat(n,'"'));return[4,this._queryExecutor.execute({resultTransformer:r,bookmarkManager:t,routing:n,database:u.database,impersonatedUser:u.impersonatedUser,transactionConfig:u.transactionConfig},o,i)];case 1:return[2,e.sent()]}})})},Do.prototype.verifyConnectivity=function(e){e=(void 0===e?{}:e).database,e=void 0===e?"":e;return this._getOrCreateConnectionProvider().verifyConnectivityAndGetServerInfo({database:e,accessMode:Ao})},Do.prototype.verifyAuthentication=function(e){var e=void 0===e?{}:e,t=e.database,r=e.auth;return vo(this,void 0,void 0,function(){return mo(this,function(e){switch(e.label){case 0:return[4,this._getOrCreateConnectionProvider().verifyAuthentication({database:null!=t?t:"system",auth:r,accessMode:Ao})];case 1:return[2,e.sent()]}})})},Do.prototype.getServerInfo=function(e){e=(void 0===e?{}:e).database,e=void 0===e?"":e;return this._getOrCreateConnectionProvider().verifyConnectivityAndGetServerInfo({database:e,accessMode:Ao})},Do.prototype.supportsMultiDb=function(){return this._getOrCreateConnectionProvider().supportsMultiDb()},Do.prototype.supportsTransactionConfig=function(){return this._getOrCreateConnectionProvider().supportsTransactionConfig()},Do.prototype.supportsUserImpersonation=function(){return this._getOrCreateConnectionProvider().supportsUserImpersonation()},Do.prototype.supportsSessionAuth=function(){return this._getOrCreateConnectionProvider().supportsSessionAuth()},Do.prototype.getNegotiatedProtocolVersion=function(){return this._getOrCreateConnectionProvider().getNegotiatedProtocolVersion()},Do.prototype.isEncrypted=function(){return this._isEncrypted()},Do.prototype._supportsRouting=function(){return this._meta.routing},Do.prototype._isEncrypted=function(){return this._config.encrypted===So.ENCRYPTION_ON||!0===this._config.encrypted},Do.prototype._getTrust=function(){return this._config.trust},Do.prototype.session=function(e){var e=void 0===e?{}:e,t=e.defaultAccessMode,r=e.bookmarks,n=e.database,o=e.impersonatedUser,i=e.fetchSize,u=e.bookmarkManager,a=e.notificationFilter,e=e.auth;return this._newSession({defaultAccessMode:void 0===t?Mo:t,bookmarkOrBookmarks:r,database:void 0===n?"":n,reactive:!1,impersonatedUser:o,fetchSize:Lo(i,this._config.fetchSize),bookmarkManager:u,notificationFilter:a,auth:e})},Do.prototype.close=function(){return this._log.info("Driver ".concat(this._id," closing")),null!=this._connectionProvider?this._connectionProvider.close():Promise.resolve()},Do.prototype[Symbol.asyncDispose]=function(){return this.close()},Do.prototype._afterConstruction=function(){this._log.info("".concat(this._meta.typename," driver ").concat(this._id," created for server address ").concat(this._meta.address.toString()))},Do.prototype._newSession=function(e){var t=e.defaultAccessMode,r=e.bookmarkOrBookmarks,n=e.database,o=e.reactive,i=e.impersonatedUser,u=e.fetchSize,a=e.bookmarkManager,s=e.notificationFilter,e=e.auth,t=Po.default._validateSessionMode(t),c=this._getOrCreateConnectionProvider(),r=null!=r?new go.Bookmarks(r):go.Bookmarks.empty();return this._createSession({mode:t,database:null!=n?n:"",connectionProvider:c,bookmarks:r,config:this._config,reactive:o,impersonatedUser:i,fetchSize:u,bookmarkManager:a,notificationFilter:s,auth:e,log:this._log})},Do.prototype._getOrCreateConnectionProvider=function(){var e;return null==this._connectionProvider&&(this._connectionProvider=this._createConnectionProvider(this._id,this._config,this._log,(e=this._config,new Oo.default(e.resolver)))),this._connectionProvider},Do);function Do(e,t,r,n,o){void 0===n&&(n=function(e){return new Po.default(e)}),void 0===o&&(o=function(e){return new Co.default(e)}),(i=t=void 0===t?{}:t).maxConnectionLifetime=Uo(i.maxConnectionLifetime,Ro),i.maxConnectionPoolSize=Uo(i.maxConnectionPoolSize,wo.DEFAULT_POOL_MAX_SIZE),i.connectionAcquisitionTimeout=Uo(i.connectionAcquisitionTimeout,wo.DEFAULT_POOL_ACQUISITION_TIMEOUT),i.fetchSize=Lo(i.fetchSize,ko),i.connectionTimeout=function(e){e=parseInt(e.connectionTimeout,10);return 0===e||!isNaN(e)&&e<0?null:isNaN(e)?wo.DEFAULT_CONNECTION_TIMEOUT_MILLIS:e}(i),i.connectionLivenessCheckTimeout=function(e){if(null==e)return;e=parseInt(e,10);if(e<0||Number.isNaN(e))throw new Error("The connectionLivenessCheckTimeout can only be a positive value or 0 for always. However connectionLivenessCheckTimeout = ".concat(e));return e}(i.connectionLivenessCheckTimeout);var i=Eo.Logger.create(t),u=t,a=i,s=u.resolver;if(null!=s&&"function"!=typeof s)throw new TypeError("Configured resolver should be a function. Got: ".concat(typeof s));u.connectionAcquisitionTimeout<u.connectionTimeout&&a.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'),this._id=No++,this._meta=e,this._config=t,this._log=i,this._createConnectionProvider=r,this._createSession=n,this._defaultExecuteQueryBookmarkManager=(0,To.bookmarkManager)(),this._queryExecutor=o(this.session.bind(this)),this._connectionProvider=null,this._afterConstruction()}function Uo(e,t){e=parseInt(e,10);return 0<e||0===e?e:e<0?Number.MAX_SAFE_INTEGER:t}function Lo(e,t){e=parseInt(e,10);if(0<e||e===wo.FETCH_ALL)return e;if(0===e||e<0)throw new Error("The fetch size can only be a positive value or ".concat(wo.FETCH_ALL," for ALL. However fetchSize = ").concat(e));return t}E.Driver=O,E.default=O;y={};function Fo(e){return null!=e&&""!==e&&(Object.getPrototypeOf(e)!==Object.prototype||0!==Object.keys(e).length)}Object.defineProperty(y,"__esModule",{value:!0}),y.default={basic:function(e,t,r){return null!=r?{scheme:"basic",principal:e,credentials:t,realm:r}:{scheme:"basic",principal:e,credentials:t}},kerberos:function(e){return{scheme:"kerberos",principal:"",credentials:e}},bearer:function(e){return{scheme:"bearer",credentials:e}},none:function(){return{scheme:"none"}},custom:function(e,t,r,n,o){n={scheme:n,principal:e};return Fo(t)&&(n.credentials=t),Fo(r)&&(n.realm=r),Fo(o)&&(n.parameters=o),n}};var Kr={},Bo=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},Wo=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},_=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},zo=(Object.defineProperty(Kr,"__esModule",{value:!0}),Kr.staticAuthTokenManager=Kr.authTokenManagers=Kr.AuthTokenAndExpiration=void 0,_(y)),qo=h;function Vo(){}function Ho(){}Vo.prototype.getToken=function(){throw new Error("Not Implemented")},Vo.prototype.handleSecurityException=function(e,t){throw new Error("Not implemented")},Kr.default=Vo,Kr.AuthTokenAndExpiration=function(){this.token=zo.default.none(),this.expiration=void 0},Ho.prototype.bearer=function(e){e=e.tokenProvider;if("function"!=typeof e)throw new TypeError("tokenProvider should be function, but got: ".concat(typeof e));return new Ko(e,["Neo.ClientError.Security.Unauthorized","Neo.ClientError.Security.TokenExpired"])},Ho.prototype.basic=function(e){var t=this,r=e.tokenProvider;if("function"!=typeof r)throw new TypeError("tokenProvider should be function, but got: ".concat(typeof r));return new Ko(function(){return Bo(t,void 0,void 0,function(){var t;return Wo(this,function(e){switch(e.label){case 0:return t={},[4,r()];case 1:return[2,(t.token=e.sent(),t)]}})})},["Neo.ClientError.Security.Unauthorized"])};m=new Ho;Kr.authTokenManagers=m,Object.freeze(m),Kr.staticAuthTokenManager=function(e){return e=e.authToken,new Qo(e)};Yo.prototype.subscribe=function(e){this._subscribers.push(e)},Yo.prototype.onCompleted=function(t){this._subscribers.forEach(function(e){return e.onCompleted(t)})},Yo.prototype.onError=function(t){this._subscribers.forEach(function(e){return e.onError(t)})};var Go=Yo;function Yo(e){this._subscribers=e=void 0===e?[]:e}Zo.prototype.getToken=function(){var t;return Bo(this,void 0,void 0,function(){return Wo(this,function(e){switch(e.label){case 0:return void 0===this._currentAuthData||void 0!==this._currentAuthData.expiration&&this._currentAuthData.expiration<new Date?[4,this._refreshAuthToken()]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2,null==(t=this._currentAuthData)?void 0:t.token]}})})},Zo.prototype.handleSecurityException=function(e,t){return!!this._handledSecurityCodes.includes(t)&&(qo.util.equals(e,null==(t=this._currentAuthData)?void 0:t.token)&&this._scheduleRefreshAuthToken(),!0)},Zo.prototype._scheduleRefreshAuthToken=function(e){var r=this;void 0===this._refreshObservable&&(this._currentAuthData=void 0,this._refreshObservable=new Go,Promise.resolve(this._tokenProvider()).then(function(e){var t;r._currentAuthData=e,null!=(t=r._refreshObservable)&&t.onCompleted(e)}).catch(function(e){var t;null!=(t=r._refreshObservable)&&t.onError(e)}).finally(function(){r._refreshObservable=void 0})),void 0!==e&&this._refreshObservable.subscribe(e)},Zo.prototype._refreshAuthToken=function(){return Bo(this,void 0,void 0,function(){var r=this;return Wo(this,function(e){switch(e.label){case 0:return[4,new Promise(function(e,t){r._scheduleRefreshAuthToken({onCompleted:e,onError:t})})];case 1:return[2,e.sent()]}})})};var Ko=Zo;function Zo(e,t,r,n){this._tokenProvider=e,this._handledSecurityCodes=t,this._currentAuthData=r,this._refreshObservable=n}Xo.prototype.getToken=function(){return this._authToken},Xo.prototype.handleSecurityException=function(e,t){return!1};var Qo=Xo;function Xo(e){this._authToken=e}function Jo(){this.encrypted=void 0,this.trust=void 0,this.trustedCertificates=[],this.maxConnectionPoolSize=100,this.maxConnectionLifetime=36e5,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}var $o,ei,ti,ri,ni,oi,ii,ui,ai,si,ci,li,fi,pi,u={},g=r&&r.__extends||($o=function(e,t){return($o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}$o(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),v=(Object.defineProperty(u,"__esModule",{value:!0}),u.InternalConfig=u.Config=void 0,u.Config=Jo,g(di,ei=Jo),di);function di(){return null!==ei&&ei.apply(this,arguments)||this}u.InternalConfig=v,O=e,ti=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),ri=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),_=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&ti(t,e,r);return ri(t,e),t},m=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(O,"__esModule",{value:!0}),O.Transaction=O.Connection=O.ConnectionProvider=O.EagerResult=O.Result=O.Stats=O.QueryStatistics=O.ProfiledPlan=O.Plan=O.Notification=O.ServerInfo=O.queryType=O.ResultSummary=O.Record=O.isPathSegment=O.PathSegment=O.isPath=O.Path=O.isUnboundRelationship=O.UnboundRelationship=O.isRelationship=O.Relationship=O.isNode=O.Node=O.Time=O.LocalTime=O.LocalDateTime=O.isTime=O.isLocalTime=O.isLocalDateTime=O.isDuration=O.isDateTime=O.isDate=O.Duration=O.DateTime=O.Date=O.Point=O.isPoint=O.internal=O.toString=O.toNumber=O.inSafeRange=O.isInt=O.int=O.Integer=O.error=O.isRetriableError=O.Neo4jError=O.newError=O.authTokenManagers=void 0,O.notificationFilterMinimumSeverityLevel=O.notificationFilterDisabledCategory=O.notificationSeverityLevel=O.notificationCategory=O.resultTransformers=O.routing=O.staticAuthTokenManager=O.bookmarkManager=O.auth=O.json=O.driver=O.types=O.Driver=O.Session=O.TransactionPromise=O.ManagedTransaction=void 0,ni=t,Object.defineProperty(O,"newError",{enumerable:!0,get:function(){return ni.newError}}),Object.defineProperty(O,"Neo4jError",{enumerable:!0,get:function(){return ni.Neo4jError}}),Object.defineProperty(O,"isRetriableError",{enumerable:!0,get:function(){return ni.isRetriableError}}),oi=_(n),O.Integer=oi.default,Object.defineProperty(O,"int",{enumerable:!0,get:function(){return oi.int}}),Object.defineProperty(O,"isInt",{enumerable:!0,get:function(){return oi.isInt}}),Object.defineProperty(O,"inSafeRange",{enumerable:!0,get:function(){return oi.inSafeRange}}),Object.defineProperty(O,"toNumber",{enumerable:!0,get:function(){return oi.toNumber}}),Object.defineProperty(O,"toString",{enumerable:!0,get:function(){return oi.toString}}),ii=i,Object.defineProperty(O,"Date",{enumerable:!0,get:function(){return ii.Date}}),Object.defineProperty(O,"DateTime",{enumerable:!0,get:function(){return ii.DateTime}}),Object.defineProperty(O,"Duration",{enumerable:!0,get:function(){return ii.Duration}}),Object.defineProperty(O,"isDate",{enumerable:!0,get:function(){return ii.isDate}}),Object.defineProperty(O,"isDateTime",{enumerable:!0,get:function(){return ii.isDateTime}}),Object.defineProperty(O,"isDuration",{enumerable:!0,get:function(){return ii.isDuration}}),Object.defineProperty(O,"isLocalDateTime",{enumerable:!0,get:function(){return ii.isLocalDateTime}}),Object.defineProperty(O,"isLocalTime",{enumerable:!0,get:function(){return ii.isLocalTime}}),Object.defineProperty(O,"isTime",{enumerable:!0,get:function(){return ii.isTime}}),Object.defineProperty(O,"LocalDateTime",{enumerable:!0,get:function(){return ii.LocalDateTime}}),Object.defineProperty(O,"LocalTime",{enumerable:!0,get:function(){return ii.LocalTime}}),Object.defineProperty(O,"Time",{enumerable:!0,get:function(){return ii.Time}}),ui=l,Object.defineProperty(O,"Node",{enumerable:!0,get:function(){return ui.Node}}),Object.defineProperty(O,"isNode",{enumerable:!0,get:function(){return ui.isNode}}),Object.defineProperty(O,"Relationship",{enumerable:!0,get:function(){return ui.Relationship}}),Object.defineProperty(O,"isRelationship",{enumerable:!0,get:function(){return ui.isRelationship}}),Object.defineProperty(O,"UnboundRelationship",{enumerable:!0,get:function(){return ui.UnboundRelationship}}),Object.defineProperty(O,"isUnboundRelationship",{enumerable:!0,get:function(){return ui.isUnboundRelationship}}),Object.defineProperty(O,"Path",{enumerable:!0,get:function(){return ui.Path}}),Object.defineProperty(O,"isPath",{enumerable:!0,get:function(){return ui.isPath}}),Object.defineProperty(O,"PathSegment",{enumerable:!0,get:function(){return ui.PathSegment}}),Object.defineProperty(O,"isPathSegment",{enumerable:!0,get:function(){return ui.isPathSegment}}),g=m(f),O.Record=g.default,ai=s,Object.defineProperty(O,"isPoint",{enumerable:!0,get:function(){return ai.isPoint}}),Object.defineProperty(O,"Point",{enumerable:!0,get:function(){return ai.Point}}),si=_(p),O.ResultSummary=si.default,Object.defineProperty(O,"queryType",{enumerable:!0,get:function(){return si.queryType}}),Object.defineProperty(O,"ServerInfo",{enumerable:!0,get:function(){return si.ServerInfo}}),Object.defineProperty(O,"Notification",{enumerable:!0,get:function(){return si.Notification}}),Object.defineProperty(O,"Plan",{enumerable:!0,get:function(){return si.Plan}}),Object.defineProperty(O,"ProfiledPlan",{enumerable:!0,get:function(){return si.ProfiledPlan}}),Object.defineProperty(O,"QueryStatistics",{enumerable:!0,get:function(){return si.QueryStatistics}}),Object.defineProperty(O,"Stats",{enumerable:!0,get:function(){return si.Stats}}),Object.defineProperty(O,"notificationCategory",{enumerable:!0,get:function(){return si.notificationCategory}}),Object.defineProperty(O,"notificationSeverityLevel",{enumerable:!0,get:function(){return si.notificationSeverityLevel}}),ci=ft,Object.defineProperty(O,"notificationFilterDisabledCategory",{enumerable:!0,get:function(){return ci.notificationFilterDisabledCategory}}),Object.defineProperty(O,"notificationFilterMinimumSeverityLevel",{enumerable:!0,get:function(){return ci.notificationFilterMinimumSeverityLevel}}),v=m(It),O.Result=v.default,t=m(S),O.EagerResult=t.default,n=m(w),O.ConnectionProvider=n.default,n=m(X),O.Connection=n.default,i=m(lr),O.Transaction=i.default,l=m($r),O.ManagedTransaction=l.default,f=m(o),O.TransactionPromise=f.default,s=m(P),O.Session=s.default,p=_(E),ft=p,O.Driver=p.default,O.driver=ft,It=m(y),O.auth=It.default,li=b,Object.defineProperty(O,"bookmarkManager",{enumerable:!0,get:function(){return li.bookmarkManager}}),fi=Kr,Object.defineProperty(O,"authTokenManagers",{enumerable:!0,get:function(){return fi.authTokenManagers}}),Object.defineProperty(O,"staticAuthTokenManager",{enumerable:!0,get:function(){return fi.staticAuthTokenManager}}),pi=E,Object.defineProperty(O,"routing",{enumerable:!0,get:function(){return pi.routing}}),S=_(u),O.types=S,w=_(Q),O.json=w,m=m(Kt),O.resultTransformers=m.default,_=_(h),O.internal=_,X={SERVICE_UNAVAILABLE:ni.SERVICE_UNAVAILABLE,SESSION_EXPIRED:ni.SESSION_EXPIRED,PROTOCOL_ERROR:ni.PROTOCOL_ERROR},O.error=X,X={authTokenManagers:fi.authTokenManagers,newError:ni.newError,Neo4jError:ni.Neo4jError,isRetriableError:ni.isRetriableError,error:X,Integer:oi.default,int:oi.int,isInt:oi.isInt,inSafeRange:oi.inSafeRange,toNumber:oi.toNumber,toString:oi.toString,internal:_,isPoint:ai.isPoint,Point:ai.Point,Date:ii.Date,DateTime:ii.DateTime,Duration:ii.Duration,isDate:ii.isDate,isDateTime:ii.isDateTime,isDuration:ii.isDuration,isLocalDateTime:ii.isLocalDateTime,isLocalTime:ii.isLocalTime,isTime:ii.isTime,LocalDateTime:ii.LocalDateTime,LocalTime:ii.LocalTime,Time:ii.Time,Node:ui.Node,isNode:ui.isNode,Relationship:ui.Relationship,isRelationship:ui.isRelationship,UnboundRelationship:ui.UnboundRelationship,isUnboundRelationship:ui.isUnboundRelationship,Path:ui.Path,isPath:ui.isPath,PathSegment:ui.PathSegment,isPathSegment:ui.isPathSegment,Record:g.default,ResultSummary:si.default,queryType:si.queryType,ServerInfo:si.ServerInfo,Notification:si.Notification,Plan:si.Plan,ProfiledPlan:si.ProfiledPlan,QueryStatistics:si.QueryStatistics,Stats:si.Stats,Result:v.default,EagerResult:t.default,Transaction:i.default,ManagedTransaction:l.default,TransactionPromise:f.default,Session:s.default,Driver:p.default,Connection:n.default,types:S,driver:ft,json:w,auth:It.default,bookmarkManager:li.bookmarkManager,routing:pi.routing,resultTransformers:m.default,notificationCategory:si.notificationCategory,notificationSeverityLevel:si.notificationSeverityLevel,notificationFilterDisabledCategory:ci.notificationFilterDisabledCategory,notificationFilterMinimumSeverityLevel:ci.notificationFilterMinimumSeverityLevel},O.default=X;lr={},$r={},o={},P={},y={};Object.defineProperty(y,"__esModule",{value:!0}),y.isFunction=void 0,y.isFunction=function(e){return"function"==typeof e};b={},Kr={},E={};Object.defineProperty(E,"__esModule",{value:!0}),E.createErrorClass=void 0,E.createErrorClass=function(e){return(e=e(function(e){Error.call(e),e.stack=(new Error).stack})).prototype=Object.create(Error.prototype),e.prototype.constructor=e},Object.defineProperty(Kr,"__esModule",{value:!0}),Kr.UnsubscriptionError=void 0;u=E,Kr.UnsubscriptionError=u.createErrorClass(function(t){return function(e){t(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map(function(e,t){return t+1+") "+e.toString()}).join("\n "):"",this.name="UnsubscriptionError",this.errors=e}}),Q={};Object.defineProperty(Q,"__esModule",{value:!0}),Q.arrRemove=void 0,Q.arrRemove=function(e,t){e&&0<=(t=e.indexOf(t))&&e.splice(t,1)};var hi=r&&r.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},bi=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},yi=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},_i=(Object.defineProperty(b,"__esModule",{value:!0}),b.isSubscription=b.EMPTY_SUBSCRIPTION=b.Subscription=void 0,y),vi=Kr,mi=Q,gi=(Oi.prototype.unsubscribe=function(){var t,e,r;if(!this.closed){this.closed=!0;var n=this._parentage;if(n)if(this._parentage=null,Array.isArray(n))try{for(var o=hi(n),i=o.next();!i.done;i=o.next())i.value.remove(this)}catch(e){a={error:e}}finally{try{i&&!i.done&&(u=o.return)&&u.call(o)}finally{if(a)throw a.error}}else n.remove(this);var u=this.initialTeardown;if(_i.isFunction(u))try{u()}catch(e){r=e instanceof vi.UnsubscriptionError?e.errors:[e]}var a=this._finalizers;if(a){this._finalizers=null;try{for(var s=hi(a),c=s.next();!c.done;c=s.next()){var l=c.value;try{wi(l)}catch(e){r=null!=r?r:[],e instanceof vi.UnsubscriptionError?r=yi(yi([],bi(r)),bi(e.errors)):r.push(e)}}}catch(e){t={error:e}}finally{try{c&&!c.done&&(e=s.return)&&e.call(s)}finally{if(t)throw t.error}}}if(r)throw new vi.UnsubscriptionError(r)}},Oi.prototype.add=function(e){var t;if(e&&e!==this)if(this.closed)wi(e);else{if(e instanceof Oi){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=null!=(t=this._finalizers)?t:[]).push(e)}},Oi.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},Oi.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},Oi.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&mi.arrRemove(t,e)},Oi.prototype.remove=function(e){var t=this._finalizers;t&&mi.arrRemove(t,e),e instanceof Oi&&e._removeParent(this)},Oi.EMPTY=((Kt=new Oi).closed=!0,Kt),Oi);function Oi(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}function wi(e){_i.isFunction(e)?e():e.unsubscribe()}b.Subscription=gi,b.EMPTY_SUBSCRIPTION=gi.EMPTY,b.isSubscription=function(e){return e instanceof gi||e&&"closed"in e&&_i.isFunction(e.remove)&&_i.isFunction(e.add)&&_i.isFunction(e.unsubscribe)};var Ei,Pi,Si,h={},_=(Object.defineProperty(h,"__esModule",{value:!0}),h.config=void 0,h.config={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},{}),g={},Ti=(Ei=g,Pi=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Si=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},Object.defineProperty(Ei,"__esModule",{value:!0}),Ei.timeoutProvider=void 0,Ei.timeoutProvider={setTimeout:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var o=Ei.timeoutProvider.delegate;return null!=o&&o.setTimeout?o.setTimeout.apply(o,Si([e,t],Pi(r))):setTimeout.apply(void 0,Si([e,t],Pi(r)))},clearTimeout:function(e){var t=Ei.timeoutProvider.delegate;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0},Object.defineProperty(_,"__esModule",{value:!0}),_.reportUnhandledError=void 0,h),ji=g;_.reportUnhandledError=function(t){ji.timeoutProvider.setTimeout(function(){var e=Ti.config.onUnhandledError;if(!e)throw t;e(t)})};v={};Object.defineProperty(v,"__esModule",{value:!0}),v.noop=void 0,v.noop=function(){};t={};function Ci(e,t,r){return{kind:e,value:t,error:r}}Object.defineProperty(t,"__esModule",{value:!0}),t.createNotification=t.nextNotification=t.errorNotification=t.COMPLETE_NOTIFICATION=void 0,t.COMPLETE_NOTIFICATION=Ci("C",void 0,void 0),t.errorNotification=function(e){return Ci("E",void 0,e)},t.nextNotification=function(e){return Ci("N",e,void 0)},t.createNotification=Ci;var Ii,Ri,ki,Ai,Mi,Ni,xi,Di,Ui,Li,Fi,Bi,Wi,zi,i={},qi=(Object.defineProperty(i,"__esModule",{value:!0}),i.captureError=i.errorContext=void 0,h),Vi=null;function Hi(e){var t=ki.call(this)||this;return t.isStopped=!1,e?(t.destination=e,Mi.isSubscription(e)&&e.add(t)):t.destination=Ii.EMPTY_OBSERVER,t}function Gi(e,t){return Fi.call(e,t)}function Yi(e){this.partialObserver=e}function Ki(e,t,r){var n=Wi.call(this)||this;return r=Ai.isFunction(e)||!e?{next:null!=e?e:void 0,error:null!=t?t:void 0,complete:null!=r?r:void 0}:n&&Ni.config.useDeprecatedNextContext?((t=Object.create(e)).unsubscribe=function(){return n.unsubscribe()},{next:e.next&&Gi(e.next,t),error:e.error&&Gi(e.error,t),complete:e.complete&&Gi(e.complete,t)}):e,n.destination=new Bi(r),n}function Zi(e){Ni.config.useDeprecatedSynchronousErrorHandling?Li.captureError(e):xi.reportUnhandledError(e)}function Qi(e,t){var r=Ni.config.onStoppedNotification;r&&Ui.timeoutProvider.setTimeout(function(){return r(e,t)})}i.errorContext=function(e){if(qi.config.useDeprecatedSynchronousErrorHandling){var t=!Vi;if(t&&(Vi={errorThrown:!1,error:null}),e(),t){var t=Vi,r=t.errorThrown,t=t.error;if(Vi=null,r)throw t}}else e()},i.captureError=function(e){qi.config.useDeprecatedSynchronousErrorHandling&&Vi&&(Vi.errorThrown=!0,Vi.error=e)},Ii=P,l=r&&r.__extends||(Ri=function(e,t){return(Ri=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Ri(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Object.defineProperty(Ii,"__esModule",{value:!0}),Ii.EMPTY_OBSERVER=Ii.SafeSubscriber=Ii.Subscriber=void 0,Ai=y,Ni=h,xi=_,f=v,Di=t,Ui=g,Li=i,ki=(Mi=b).Subscription,l(Hi,ki),Hi.create=function(e,t,r){return new zi(e,t,r)},Hi.prototype.next=function(e){this.isStopped?Qi(Di.nextNotification(e),this):this._next(e)},Hi.prototype.error=function(e){this.isStopped?Qi(Di.errorNotification(e),this):(this.isStopped=!0,this._error(e))},Hi.prototype.complete=function(){this.isStopped?Qi(Di.COMPLETE_NOTIFICATION,this):(this.isStopped=!0,this._complete())},Hi.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,ki.prototype.unsubscribe.call(this),this.destination=null)},Hi.prototype._next=function(e){this.destination.next(e)},Hi.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},Hi.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},s=Hi,Ii.Subscriber=s,Fi=Function.prototype.bind,Yi.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){Zi(e)}},Yi.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){Zi(e)}else Zi(e)},Yi.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){Zi(e)}},Bi=Yi,l(Ki,Wi=s),zi=Ki,Ii.SafeSubscriber=zi,Ii.EMPTY_OBSERVER={closed:!0,next:f.noop,error:function(e){throw e},complete:f.noop};p={},Object.defineProperty(p,"__esModule",{value:!0}),p.observable=void 0,p.observable="function"==typeof Symbol&&Symbol.observable||"@@observable",n={},S={};Object.defineProperty(S,"__esModule",{value:!0}),S.identity=void 0,S.identity=function(e){return e},Object.defineProperty(n,"__esModule",{value:!0}),n.pipeFromArray=n.pipe=void 0;var Xi=S;function Ji(t){return 0===t.length?Xi.identity:1===t.length?t[0]:function(e){return t.reduce(function(e,t){return t(e)},e)}}n.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Ji(e)},n.pipeFromArray=Ji,Object.defineProperty(o,"__esModule",{value:!0}),o.Observable=void 0;var $i=P,eu=b,ft=p,tu=n,ru=h,nu=y,ou=i;function iu(e){e&&(this._subscribe=e)}function uu(e){return null!=(e=null!=e?e:ru.config.Promise)?e:Promise}iu.prototype.lift=function(e){var t=new iu;return t.source=this,t.operator=e,t},iu.prototype.subscribe=function(e,t,r){var n,o=this,i=(n=e)&&n instanceof $i.Subscriber||function(e){return e&&nu.isFunction(e.next)&&nu.isFunction(e.error)&&nu.isFunction(e.complete)}(n)&&eu.isSubscription(n)?e:new $i.SafeSubscriber(e,t,r);return ou.errorContext(function(){var e=o.operator,t=o.source;i.add(e?e.call(i,t):t?o._subscribe(i):o._trySubscribe(i))}),i},iu.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},iu.prototype.forEach=function(n,e){var o=this;return new(e=uu(e))(function(e,t){var r=new $i.SafeSubscriber({next:function(e){try{n(e)}catch(e){t(e),r.unsubscribe()}},error:t,complete:e});o.subscribe(r)})},iu.prototype._subscribe=function(e){var t;return null==(t=this.source)?void 0:t.subscribe(e)},iu.prototype[ft.observable]=function(){return this},iu.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return tu.pipeFromArray(e)(this)},iu.prototype.toPromise=function(e){var n=this;return new(e=uu(e))(function(e,t){var r;n.subscribe(function(e){return r=e},function(e){return t(e)},function(){return e(r)})})},iu.create=function(e){return new iu(e)},o.Observable=iu;var w={},It={},m={},au=(Object.defineProperty(m,"__esModule",{value:!0}),m.operate=m.hasLift=void 0,y);function su(e){return au.isFunction(null==e?void 0:e.lift)}m.hasLift=su,m.operate=function(t){return function(e){if(su(e))return e.lift(function(e){try{return t(e,this)}catch(e){this.error(e)}});throw new TypeError("Unable to lift unknown Observable type")}};var cu,O={},X=r&&r.__extends||(cu=function(e,t){return(cu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}cu(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),u=(Object.defineProperty(O,"__esModule",{value:!0}),O.OperatorSubscriber=O.createOperatorSubscriber=void 0,P);O.createOperatorSubscriber=function(e,t,r,n,o){return new fu(e,t,r,n,o)};X(pu,lu=u.Subscriber),pu.prototype.unsubscribe=function(){var e;this.shouldUnsubscribe&&!this.shouldUnsubscribe()||(e=this.closed,lu.prototype.unsubscribe.call(this),e||null==(e=this.onFinalize)||e.call(this))};var lu,fu=pu;function pu(t,r,e,n,o,i){var u=lu.call(this,t)||this;return u.onFinalize=o,u.shouldUnsubscribe=i,u._next=r?function(e){try{r(e)}catch(e){t.error(e)}}:lu.prototype._next,u._error=n?function(e){try{n(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:lu.prototype._error,u._complete=e?function(){try{e()}catch(e){t.error(e)}finally{this.unsubscribe()}}:lu.prototype._complete,u}O.OperatorSubscriber=fu,Object.defineProperty(It,"__esModule",{value:!0}),It.refCount=void 0;var du=m,hu=O;It.refCount=function(){return du.operate(function(r,n){var o=null,e=(r._refCount++,hu.createOperatorSubscriber(n,void 0,void 0,void 0,function(){var e,t;!r||r._refCount<=0||0<--r._refCount?o=null:(e=r._connection,t=o,o=null,!e||t&&e!==t||e.unsubscribe(),n.unsubscribe())}));r.subscribe(e),e.closed||(o=r.connect())})};var bu,Kt=r&&r.__extends||(bu=function(e,t){return(bu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}bu(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(w,"__esModule",{value:!0}),w.ConnectableObservable=void 0;var yu,_u=b,vu=It,mu=O,gu=m,t=(yu=o.Observable,Kt(Ou,yu),Ou.prototype._subscribe=function(e){return this.getSubject().subscribe(e)},Ou.prototype.getSubject=function(){var e=this._subject;return e&&!e.isStopped||(this._subject=this.subjectFactory()),this._subject},Ou.prototype._teardown=function(){this._refCount=0;var e=this._connection;(this._subject=this._connection=null)!=e&&e.unsubscribe()},Ou.prototype.connect=function(){var t,r=this,e=this._connection;return e||(e=this._connection=new _u.Subscription,t=this.getSubject(),e.add(this.source.subscribe(mu.createOperatorSubscriber(t,void 0,function(){r._teardown(),t.complete()},function(e){r._teardown(),t.error(e)},function(){return r._teardown()}))),e.closed&&(this._connection=null,e=_u.Subscription.EMPTY)),e},Ou.prototype.refCount=function(){return vu.refCount()(this)},Ou);function Ou(e,t){var r=yu.call(this)||this;return r.source=e,r.subjectFactory=t,r._subject=null,r._refCount=0,r._connection=null,gu.hasLift(e)&&(r.lift=e.lift),r}w.ConnectableObservable=t;var wu,Eu,Pu,Su,Tu,g={},l={},s=(wu=l,Object.defineProperty(wu,"__esModule",{value:!0}),wu.performanceTimestampProvider=void 0,wu.performanceTimestampProvider={now:function(){return(wu.performanceTimestampProvider.delegate||performance).now()},delegate:void 0},{}),ju=(Eu=s,Pu=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Su=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},Object.defineProperty(Eu,"__esModule",{value:!0}),Eu.animationFrameProvider=void 0,Tu=b,Eu.animationFrameProvider={schedule:function(t){var e=requestAnimationFrame,r=cancelAnimationFrame,n=Eu.animationFrameProvider.delegate,o=(n&&(e=n.requestAnimationFrame,r=n.cancelAnimationFrame),e(function(e){r=void 0,t(e)}));return new Tu.Subscription(function(){return null==r?void 0:r(o)})},requestAnimationFrame:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Eu.animationFrameProvider.delegate;return((null==r?void 0:r.requestAnimationFrame)||requestAnimationFrame).apply(void 0,Su([],Pu(e)))},cancelAnimationFrame:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Eu.animationFrameProvider.delegate;return((null==r?void 0:r.cancelAnimationFrame)||cancelAnimationFrame).apply(void 0,Su([],Pu(e)))},delegate:void 0},Object.defineProperty(g,"__esModule",{value:!0}),g.animationFrames=void 0,o),Cu=l,Iu=s;function Ru(a){return new ju.Observable(function(r){var n=a||Cu.performanceTimestampProvider,o=n.now(),i=0,u=function(){r.closed||(i=Iu.animationFrameProvider.requestAnimationFrame(function(e){i=0;var t=n.now();r.next({timestamp:a?t:e,elapsed:t-o}),u()}))};return u(),function(){i&&Iu.animationFrameProvider.cancelAnimationFrame(i)}})}g.animationFrames=function(e){return e?Ru(e):Mu};var ku,Au,Mu=Ru(),f={},ft={},X=(Object.defineProperty(ft,"__esModule",{value:!0}),ft.ObjectUnsubscribedError=void 0,E),u=(ft.ObjectUnsubscribedError=X.createErrorClass(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),r&&r.__extends||(ku=function(e,t){return(ku=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}ku(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),Nu=r&&r.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},xu=(Object.defineProperty(f,"__esModule",{value:!0}),f.AnonymousSubject=f.Subject=void 0,o),Du=b,Uu=ft,Lu=Q,Fu=i,Kt=(Au=xu.Observable,u(Bu,Au),Bu.prototype.lift=function(e){var t=new zu(this,this);return t.operator=e,t},Bu.prototype._throwIfClosed=function(){if(this.closed)throw new Uu.ObjectUnsubscribedError},Bu.prototype.next=function(o){var i=this;Fu.errorContext(function(){var t,e;if(i._throwIfClosed(),!i.isStopped){i.currentObservers||(i.currentObservers=Array.from(i.observers));try{for(var r=Nu(i.currentObservers),n=r.next();!n.done;n=r.next())n.value.next(o)}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}}})},Bu.prototype.error=function(t){var r=this;Fu.errorContext(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=t;for(var e=r.observers;e.length;)e.shift().error(t)}})},Bu.prototype.complete=function(){var t=this;Fu.errorContext(function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var e=t.observers;e.length;)e.shift().complete()}})},Bu.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(Bu.prototype,"observed",{get:function(){var e;return 0<(null==(e=this.observers)?void 0:e.length)},enumerable:!1,configurable:!0}),Bu.prototype._trySubscribe=function(e){return this._throwIfClosed(),Au.prototype._trySubscribe.call(this,e)},Bu.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},Bu.prototype._innerSubscribe=function(e){var t=this,r=this.hasError,n=this.isStopped,o=this.observers;return r||n?Du.EMPTY_SUBSCRIPTION:(this.currentObservers=null,o.push(e),new Du.Subscription(function(){t.currentObservers=null,Lu.arrRemove(o,e)}))},Bu.prototype._checkFinalizedStatuses=function(e){var t=this.hasError,r=this.thrownError,n=this.isStopped;t?e.error(r):n&&e.complete()},Bu.prototype.asObservable=function(){var e=new xu.Observable;return e.source=this,e},Bu.create=function(e,t){return new zu(e,t)},Bu);function Bu(){var e=Au.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}f.Subject=Kt;u(qu,Wu=Kt),qu.prototype.next=function(e){var t,r;null!=(r=null==(t=this.destination)?void 0:t.next)&&r.call(t,e)},qu.prototype.error=function(e){var t,r;null!=(r=null==(t=this.destination)?void 0:t.error)&&r.call(t,e)},qu.prototype.complete=function(){var e,t;null!=(t=null==(e=this.destination)?void 0:e.complete)&&t.call(e)},qu.prototype._subscribe=function(e){var t;return null!=(t=null==(t=this.source)?void 0:t.subscribe(e))?t:Du.EMPTY_SUBSCRIPTION};var Wu,zu=qu;function qu(e,t){var r=Wu.call(this)||this;return r.destination=e,r.source=t,r}f.AnonymousSubject=zu;var Vu,t={},l=r&&r.__extends||(Vu=function(e,t){return(Vu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Vu(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.BehaviorSubject=void 0;Hu=f.Subject,l(Gu,Hu),Object.defineProperty(Gu.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),Gu.prototype._subscribe=function(e){var t=Hu.prototype._subscribe.call(this,e);return t.closed||e.next(this._value),t},Gu.prototype.getValue=function(){var e=this.hasError,t=this.thrownError,r=this._value;if(e)throw t;return this._throwIfClosed(),r},Gu.prototype.next=function(e){Hu.prototype.next.call(this,this._value=e)};var Hu,X=Gu;function Gu(e){var t=Hu.call(this)||this;return t._value=e,t}t.BehaviorSubject=X;var Yu,Ku,i={},u={},Kt=(Yu=u,Object.defineProperty(Yu,"__esModule",{value:!0}),Yu.dateTimestampProvider=void 0,Yu.dateTimestampProvider={now:function(){return(Yu.dateTimestampProvider.delegate||Date).now()},delegate:void 0},r&&r.__extends||(Ku=function(e,t){return(Ku=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Ku(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}));Object.defineProperty(i,"__esModule",{value:!0}),i.ReplaySubject=void 0;var Zu,Qu=u,l=(Zu=f.Subject,Kt(Xu,Zu),Xu.prototype.next=function(e){var t=this.isStopped,r=this._buffer,n=this._infiniteTimeWindow,o=this._timestampProvider,i=this._windowTime;t||(r.push(e),n||r.push(o.now()+i)),this._trimBuffer(),Zu.prototype.next.call(this,e)},Xu.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),r=this._infiniteTimeWindow,n=this._buffer.slice(),o=0;o<n.length&&!e.closed;o+=r?1:2)e.next(n[o]);return this._checkFinalizedStatuses(e),t},Xu.prototype._trimBuffer=function(){var e=this._bufferSize,t=this._timestampProvider,r=this._buffer,n=this._infiniteTimeWindow,o=(n?1:2)*e;if(e<1/0&&o<r.length&&r.splice(0,r.length-o),!n){for(var i=t.now(),u=0,a=1;a<r.length&&r[a]<=i;a+=2)u=a;u&&r.splice(0,u+1)}},Xu);function Xu(e,t,r){void 0===e&&(e=1/0),void 0===t&&(t=1/0),void 0===r&&(r=Qu.dateTimestampProvider);var n=Zu.call(this)||this;return n._bufferSize=e,n._windowTime=t,n._timestampProvider=r,n._buffer=[],n._infiniteTimeWindow=!0,n._infiniteTimeWindow=t===1/0,n._bufferSize=Math.max(1,e),n._windowTime=Math.max(1,t),n}i.ReplaySubject=l;var Ju,X={},Kt=r&&r.__extends||(Ju=function(e,t){return(Ju=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Ju(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(X,"__esModule",{value:!0}),X.AsyncSubject=void 0;$u=f.Subject,Kt(ea,$u),ea.prototype._checkFinalizedStatuses=function(e){var t=this.hasError,r=this._hasValue,n=this._value,o=this.thrownError,i=this.isStopped,u=this._isComplete;t?e.error(o):(i||u)&&(r&&e.next(n),e.complete())},ea.prototype.next=function(e){this.isStopped||(this._value=e,this._hasValue=!0)},ea.prototype.complete=function(){var e=this._hasValue,t=this._value;this._isComplete||(this._isComplete=!0,e&&$u.prototype.next.call(this,t),$u.prototype.complete.call(this))};var $u,l=ea;function ea(){var e=null!==$u&&$u.apply(this,arguments)||this;return e._value=null,e._hasValue=!1,e._isComplete=!1,e}X.AsyncSubject=l;var ta,Kt={},l={},ra={},na={},oa=r&&r.__extends||(ta=function(e,t){return(ta=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}ta(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(na,"__esModule",{value:!0}),na.Action=void 0;ia=b.Subscription,oa(ua,ia),ua.prototype.schedule=function(e,t){return this};var ia,oa=ua;function ua(e,t){return ia.call(this)||this}na.Action=oa;var aa,sa,ca,la,oa={},fa=(aa=oa,sa=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},ca=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},Object.defineProperty(aa,"__esModule",{value:!0}),aa.intervalProvider=void 0,aa.intervalProvider={setInterval:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var o=aa.intervalProvider.delegate;return null!=o&&o.setInterval?o.setInterval.apply(o,ca([e,t],sa(r))):setInterval.apply(void 0,ca([e,t],sa(r)))},clearInterval:function(e){var t=aa.intervalProvider.delegate;return((null==t?void 0:t.clearInterval)||clearInterval)(e)},delegate:void 0},r&&r.__extends||(la=function(e,t){return(la=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}la(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}));Object.defineProperty(ra,"__esModule",{value:!0}),ra.AsyncAction=void 0;var pa,da=oa,ha=Q,oa=(pa=na.Action,fa(ba,pa),ba.prototype.schedule=function(e,t){if(void 0===t&&(t=0),this.closed)return this;this.state=e;var e=this.id,r=this.scheduler;return null!=e&&(this.id=this.recycleAsyncId(r,e,t)),this.pending=!0,this.delay=t,this.id=null!=(e=this.id)?e:this.requestAsyncId(r,this.id,t),this},ba.prototype.requestAsyncId=function(e,t,r){return void 0===r&&(r=0),da.intervalProvider.setInterval(e.flush.bind(e,this),r)},ba.prototype.recycleAsyncId=function(e,t,r){if(null!=(r=void 0===r?0:r)&&this.delay===r&&!1===this.pending)return t;null!=t&&da.intervalProvider.clearInterval(t)},ba.prototype.execute=function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;e=this._execute(e,t);if(e)return e;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},ba.prototype._execute=function(e,t){var r,n=!1;try{this.work(e)}catch(e){n=!0,r=e||new Error("Scheduled action threw falsy error")}if(n)return this.unsubscribe(),r},ba.prototype.unsubscribe=function(){var e,t,r;this.closed||(e=this.id,r=(t=this.scheduler).actions,this.work=this.state=this.scheduler=null,this.pending=!1,ha.arrRemove(r,this),null!=e&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null,pa.prototype.unsubscribe.call(this))},ba);function ba(e,t){var r=pa.call(this,e,t)||this;return r.scheduler=e,r.work=t,r.pending=!1,r}ra.AsyncAction=oa;var ya,_a,va,ma,ga,Oa,na={},fa={},wa=(Object.defineProperty(fa,"__esModule",{value:!0}),fa.TestTools=fa.Immediate=void 0,1),Ea={};function Pa(e){return e in Ea&&(delete Ea[e],!0)}fa.Immediate={setImmediate:function(e){var t=wa++;return Ea[t]=!0,(ya=ya||Promise.resolve()).then(function(){return Pa(t)&&e()}),t},clearImmediate:function(e){Pa(e)}},fa.TestTools={pending:function(){return Object.keys(Ea).length}},_a=na,va=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},ma=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},Object.defineProperty(_a,"__esModule",{value:!0}),_a.immediateProvider=void 0,ga=fa.Immediate.setImmediate,Oa=fa.Immediate.clearImmediate,_a.immediateProvider={setImmediate:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=_a.immediateProvider.delegate;return((null==r?void 0:r.setImmediate)||ga).apply(void 0,ma([],va(e)))},clearImmediate:function(e){var t=_a.immediateProvider.delegate;return((null==t?void 0:t.clearImmediate)||Oa)(e)},delegate:void 0};var Sa,oa=r&&r.__extends||(Sa=function(e,t){return(Sa=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Sa(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(l,"__esModule",{value:!0}),l.AsapAction=void 0;var Ta,ja=na,fa=(Ta=ra.AsyncAction,oa(Ca,Ta),Ca.prototype.requestAsyncId=function(e,t,r){return null!==(r=void 0===r?0:r)&&0<r?Ta.prototype.requestAsyncId.call(this,e,t,r):(e.actions.push(this),e._scheduled||(e._scheduled=ja.immediateProvider.setImmediate(e.flush.bind(e,void 0))))},Ca.prototype.recycleAsyncId=function(e,t,r){if(null!=(r=void 0===r?0:r)?0<r:0<this.delay)return Ta.prototype.recycleAsyncId.call(this,e,t,r);var r=e.actions;null!=t&&(null==(r=r[r.length-1])?void 0:r.id)!==t&&(ja.immediateProvider.clearImmediate(t),e._scheduled===t&&(e._scheduled=void 0))},Ca);function Ca(e,t){var r=Ta.call(this,e,t)||this;return r.scheduler=e,r.work=t,r}l.AsapAction=fa;var na={},oa={},fa={},Ia=(Object.defineProperty(fa,"__esModule",{value:!0}),fa.Scheduler=void 0,u);function Ra(e,t){void 0===t&&(t=Ra.now),this.schedulerActionCtor=e,this.now=t}Ra.prototype.schedule=function(e,t,r){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(r,t)},Ra.now=Ia.dateTimestampProvider.now,fa.Scheduler=Ra;var ka,Aa,Ia=r&&r.__extends||(ka=function(e,t){return(ka=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}ka(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Ma=(Object.defineProperty(oa,"__esModule",{value:!0}),oa.AsyncScheduler=void 0,fa),Ia=(Aa=Ma.Scheduler,Ia(Na,Aa),Na.prototype.flush=function(e){var t,r=this.actions;if(this._active)r.push(e);else{this._active=!0;do{if(t=e.execute(e.state,e.delay))break}while(e=r.shift());if(this._active=!1,t){for(;e=r.shift();)e.unsubscribe();throw t}}},Na);function Na(e,t){void 0===t&&(t=Ma.Scheduler.now);e=Aa.call(this,e,t)||this;return e.actions=[],e._active=!1,e}oa.AsyncScheduler=Ia;var xa,Ia=r&&r.__extends||(xa=function(e,t){return(xa=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}xa(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(na,"__esModule",{value:!0}),na.AsapScheduler=void 0;Da=oa.AsyncScheduler,Ia(Ua,Da),Ua.prototype.flush=function(e){this._active=!0;var t,r=this._scheduled,n=(this._scheduled=void 0,this.actions);e=e||n.shift();do{if(t=e.execute(e.state,e.delay))break}while((e=n[0])&&e.id===r&&n.shift());if(this._active=!1,t){for(;(e=n[0])&&e.id===r&&n.shift();)e.unsubscribe();throw t}};var Da,Ia=Ua;function Ua(){return null!==Da&&Da.apply(this,arguments)||this}na.AsapScheduler=Ia,Ia=Kt,Object.defineProperty(Ia,"__esModule",{value:!0}),Ia.asap=Ia.asapScheduler=void 0,Ia.asapScheduler=new na.AsapScheduler(l.AsapAction),Ia.asap=Ia.asapScheduler;var La,na={},Ia=(l=na,Object.defineProperty(l,"__esModule",{value:!0}),l.async=l.asyncScheduler=void 0,l.asyncScheduler=new oa.AsyncScheduler(ra.AsyncAction),l.async=l.asyncScheduler,{}),l={},Fa=r&&r.__extends||(La=function(e,t){return(La=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}La(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(l,"__esModule",{value:!0}),l.QueueAction=void 0;Ba=ra.AsyncAction,Fa(Wa,Ba),Wa.prototype.schedule=function(e,t){return 0<(t=void 0===t?0:t)?Ba.prototype.schedule.call(this,e,t):(this.delay=t,this.state=e,this.scheduler.flush(this),this)},Wa.prototype.execute=function(e,t){return 0<t||this.closed?Ba.prototype.execute.call(this,e,t):this._execute(e,t)},Wa.prototype.requestAsyncId=function(e,t,r){return null!=(r=void 0===r?0:r)&&0<r||null==r&&0<this.delay?Ba.prototype.requestAsyncId.call(this,e,t,r):(e.flush(this),0)};var Ba,Fa=Wa;function Wa(e,t){var r=Ba.call(this,e,t)||this;return r.scheduler=e,r.work=t,r}l.QueueAction=Fa;var za,Fa={},qa=r&&r.__extends||(za=function(e,t){return(za=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}za(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(Fa,"__esModule",{value:!0}),Fa.QueueScheduler=void 0;Va=oa.AsyncScheduler,qa(Ha,Va);var Va,qa=Ha;function Ha(){return null!==Va&&Va.apply(this,arguments)||this}Fa.QueueScheduler=qa,qa=Ia,Object.defineProperty(qa,"__esModule",{value:!0}),qa.queue=qa.queueScheduler=void 0,qa.queueScheduler=new Fa.QueueScheduler(l.QueueAction),qa.queue=qa.queueScheduler;var Ga,Fa={},l={},qa=r&&r.__extends||(Ga=function(e,t){return(Ga=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Ga(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(l,"__esModule",{value:!0}),l.AnimationFrameAction=void 0;var Ya,Ka=s,s=(Ya=ra.AsyncAction,qa(Za,Ya),Za.prototype.requestAsyncId=function(e,t,r){return null!==(r=void 0===r?0:r)&&0<r?Ya.prototype.requestAsyncId.call(this,e,t,r):(e.actions.push(this),e._scheduled||(e._scheduled=Ka.animationFrameProvider.requestAnimationFrame(function(){return e.flush(void 0)})))},Za.prototype.recycleAsyncId=function(e,t,r){if(null!=(r=void 0===r?0:r)?0<r:0<this.delay)return Ya.prototype.recycleAsyncId.call(this,e,t,r);var r=e.actions;null!=t&&(null==(r=r[r.length-1])?void 0:r.id)!==t&&(Ka.animationFrameProvider.cancelAnimationFrame(t),e._scheduled=void 0)},Za);function Za(e,t){var r=Ya.call(this,e,t)||this;return r.scheduler=e,r.work=t,r}l.AnimationFrameAction=s;var Qa,qa={},s=r&&r.__extends||(Qa=function(e,t){return(Qa=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Qa(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(qa,"__esModule",{value:!0}),qa.AnimationFrameScheduler=void 0;Xa=oa.AsyncScheduler,s(Ja,Xa),Ja.prototype.flush=function(e){this._active=!0;var t,r=this._scheduled,n=(this._scheduled=void 0,this.actions);e=e||n.shift();do{if(t=e.execute(e.state,e.delay))break}while((e=n[0])&&e.id===r&&n.shift());if(this._active=!1,t){for(;(e=n[0])&&e.id===r&&n.shift();)e.unsubscribe();throw t}};var Xa,s=Ja;function Ja(){return null!==Xa&&Xa.apply(this,arguments)||this}qa.AnimationFrameScheduler=s,s=Fa,Object.defineProperty(s,"__esModule",{value:!0}),s.animationFrame=s.animationFrameScheduler=void 0,s.animationFrameScheduler=new qa.AnimationFrameScheduler(l.AnimationFrameAction),s.animationFrame=s.animationFrameScheduler;var $a,es,qa={},l=r&&r.__extends||($a=function(e,t){return($a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}$a(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),s=(Object.defineProperty(qa,"__esModule",{value:!0}),qa.VirtualAction=qa.VirtualTimeScheduler=void 0,ra),ts=b,ra=(es=oa.AsyncScheduler,l(rs,es),rs.prototype.flush=function(){for(var e,t,r=this.actions,n=this.maxFrames;(t=r[0])&&t.delay<=n&&(r.shift(),this.frame=t.delay,!(e=t.execute(t.state,t.delay))););if(e){for(;t=r.shift();)t.unsubscribe();throw e}},rs.frameTimeFactor=10,rs);function rs(e,t){void 0===t&&(t=1/0);var r=es.call(this,e=void 0===e?os:e,function(){return r.frame})||this;return r.maxFrames=t,r.frame=0,r.index=-1,r}qa.VirtualTimeScheduler=ra;ns=s.AsyncAction,l(is,ns),is.prototype.schedule=function(e,t){if(void 0===t&&(t=0),Number.isFinite(t)){if(!this.id)return ns.prototype.schedule.call(this,e,t);this.active=!1;var r=new is(this.scheduler,this.work);return this.add(r),r.schedule(e,t)}return ts.Subscription.EMPTY},is.prototype.requestAsyncId=function(e,t,r){this.delay=e.frame+(r=void 0===r?0:r);r=e.actions;return r.push(this),r.sort(is.sortActions),1},is.prototype.recycleAsyncId=function(e,t,r){},is.prototype._execute=function(e,t){if(!0===this.active)return ns.prototype._execute.call(this,e,t)},is.sortActions=function(e,t){return e.delay===t.delay?e.index===t.index?0:e.index>t.index?1:-1:e.delay>t.delay?1:-1};var ns,os=is;function is(e,t,r){void 0===r&&(r=e.index+=1);var n=ns.call(this,e,t)||this;return n.scheduler=e,n.work=t,n.index=r,n.active=!0,n.index=e.index=r,n}qa.VirtualAction=os;var us,as,oa={},ra={},s=(us=ra,Object.defineProperty(us,"__esModule",{value:!0}),us.empty=us.EMPTY=void 0,as=o,us.EMPTY=new as.Observable(function(e){return e.complete()}),us.empty=function(e){return e?(t=e,new as.Observable(function(e){return t.schedule(function(){return e.complete()})})):us.EMPTY;var t},{}),l={},ss={},cs=(Object.defineProperty(ss,"__esModule",{value:!0}),ss.isScheduler=void 0,y);ss.isScheduler=function(e){return e&&cs.isFunction(e.schedule)},Object.defineProperty(l,"__esModule",{value:!0}),l.popNumber=l.popScheduler=l.popResultSelector=void 0;var ls=y,fs=ss;function ps(e){return e[e.length-1]}l.popResultSelector=function(e){return ls.isFunction(ps(e))?e.pop():void 0},l.popScheduler=function(e){return fs.isScheduler(ps(e))?e.pop():void 0},l.popNumber=function(e,t){return"number"==typeof ps(e)?e.pop():t};var ds={},hs={},bs={},T={},ys={},_s=(Object.defineProperty(ys,"__esModule",{value:!0}),ys.isArrayLike=void 0,ys.isArrayLike=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e},{}),vs=(Object.defineProperty(_s,"__esModule",{value:!0}),_s.isPromise=void 0,y);_s.isPromise=function(e){return vs.isFunction(null==e?void 0:e.then)};var ms={},gs=(Object.defineProperty(ms,"__esModule",{value:!0}),ms.isInteropObservable=void 0,p),Os=y;ms.isInteropObservable=function(e){return Os.isFunction(e[gs.observable])};var ws={},Es=(Object.defineProperty(ws,"__esModule",{value:!0}),ws.isAsyncIterable=void 0,y);ws.isAsyncIterable=function(e){return Symbol.asyncIterator&&Es.isFunction(null==e?void 0:e[Symbol.asyncIterator])};var Ps={};Object.defineProperty(Ps,"__esModule",{value:!0}),Ps.createInvalidObservableTypeError=void 0,Ps.createInvalidObservableTypeError=function(e){return new TypeError("You provided "+(null!==e&&"object"==typeof e?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")};var Ss={},Ts={};function js(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}Object.defineProperty(Ts,"__esModule",{value:!0}),Ts.iterator=Ts.getSymbolIterator=void 0,Ts.getSymbolIterator=js,Ts.iterator=js(),Object.defineProperty(Ss,"__esModule",{value:!0}),Ss.isIterable=void 0;var Cs=Ts,Is=y;Ss.isIterable=function(e){return Is.isFunction(null==e?void 0:e[Cs.iterator])};var Rs={},ks=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},As=r&&r.__await||function(e){return this instanceof As?(this.v=e,this):new As(e)},Ms=r&&r.__asyncGenerator||function(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var o=r.apply(e,t||[]),i=[],u={};return n("next"),n("throw"),n("return"),u[Symbol.asyncIterator]=function(){return this},u;function n(n){o[n]&&(u[n]=function(r){return new Promise(function(e,t){1<i.push([n,r,e,t])||a(n,r)})})}function a(e,t){try{(r=o[e](t)).value instanceof As?Promise.resolve(r.value.v).then(s,c):l(i[0][2],r)}catch(e){l(i[0][3],e)}var r}function s(e){a("next",e)}function c(e){a("throw",e)}function l(e,t){e(t),i.shift(),i.length&&a(i[0][0],i[0][1])}},Ns=(Object.defineProperty(Rs,"__esModule",{value:!0}),Rs.isReadableStreamLike=Rs.readableStreamLikeToAsyncGenerator=void 0,y);Rs.readableStreamLikeToAsyncGenerator=function(o){return Ms(this,arguments,function(){var t,r,n;return ks(this,function(e){switch(e.label){case 0:t=o.getReader(),e.label=1;case 1:e.trys.push([1,,9,10]),e.label=2;case 2:return[4,As(t.read())];case 3:return(r=e.sent(),n=r.value,r.done)?[4,As(void 0)]:[3,5];case 4:return[2,e.sent()];case 5:return[4,As(n)];case 6:return[4,e.sent()];case 7:return e.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})},Rs.isReadableStreamLike=function(e){return Ns.isFunction(null==e?void 0:e.getReader)};var xs=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},Ds=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},Us=r&&r.__asyncValues||function(u){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,t=u[Symbol.asyncIterator];return t?t.call(u):(u="function"==typeof Ls?Ls(u):u[Symbol.iterator](),e={},r("next"),r("throw"),r("return"),e[Symbol.asyncIterator]=function(){return this},e);function r(i){e[i]=u[i]&&function(o){return new Promise(function(e,t){var r,n;o=u[i](o),r=e,e=t,n=o.done,t=o.value,Promise.resolve(t).then(function(e){r({value:e,done:n})},e)})}}},Ls=r&&r.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Fs=(Object.defineProperty(T,"__esModule",{value:!0}),T.fromReadableStreamLike=T.fromAsyncIterable=T.fromIterable=T.fromPromise=T.fromArrayLike=T.fromInteropObservable=T.innerFrom=void 0,ys),Bs=_s,Ws=o,zs=ms,qs=ws,Vs=Ps,Hs=Ss,Gs=Rs,Ys=y,Ks=_,Zs=p;function Qs(r){return new Ws.Observable(function(e){var t=r[Zs.observable]();if(Ys.isFunction(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function Xs(r){return new Ws.Observable(function(e){for(var t=0;t<r.length&&!e.closed;t++)e.next(r[t]);e.complete()})}function Js(e){return new Ws.Observable(function(t){e.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,Ks.reportUnhandledError)})}function $s(u){return new Ws.Observable(function(e){var t,r;try{for(var n=Ls(u),o=n.next();!o.done;o=n.next()){var i=o.value;if(e.next(i),e.closed)return}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}e.complete()})}function ec(e){return new Ws.Observable(function(t){!function(r,n){var o,i,u,a;return xs(this,void 0,void 0,function(){var t;return Ds(this,function(e){switch(e.label){case 0:e.trys.push([0,5,6,11]),o=Us(r),e.label=1;case 1:return[4,o.next()];case 2:if((i=e.sent()).done)return[3,4];if(t=i.value,n.next(t),n.closed)return[2];e.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return t=e.sent(),u={error:t},[3,11];case 6:return(e.trys.push([6,,9,10]),i&&!i.done&&(a=o.return))?[4,a.call(o)]:[3,8];case 7:e.sent(),e.label=8;case 8:return[3,10];case 9:if(u)throw u.error;return[7];case 10:return[7];case 11:return n.complete(),[2]}})})}(e,t).catch(function(e){return t.error(e)})})}function tc(e){return ec(Gs.readableStreamLikeToAsyncGenerator(e))}T.innerFrom=function(e){if(e instanceof Ws.Observable)return e;if(null!=e){if(zs.isInteropObservable(e))return Qs(e);if(Fs.isArrayLike(e))return Xs(e);if(Bs.isPromise(e))return Js(e);if(qs.isAsyncIterable(e))return ec(e);if(Hs.isIterable(e))return $s(e);if(Gs.isReadableStreamLike(e))return tc(e)}throw Vs.createInvalidObservableTypeError(e)},T.fromInteropObservable=Qs,T.fromArrayLike=Xs,T.fromPromise=Js,T.fromIterable=$s,T.fromAsyncIterable=ec,T.fromReadableStreamLike=tc;var _={},rc={};Object.defineProperty(rc,"__esModule",{value:!0}),rc.executeSchedule=void 0,rc.executeSchedule=function(e,t,r,n,o){if(void 0===n&&(n=0),void 0===o&&(o=!1),t=t.schedule(function(){r(),o?e.add(this.schedule(null,n)):this.unsubscribe()},n),e.add(t),!o)return t},Object.defineProperty(_,"__esModule",{value:!0}),_.observeOn=void 0;var nc=rc,oc=m,ic=O;_.observeOn=function(r,n){return void 0===n&&(n=0),oc.operate(function(e,t){e.subscribe(ic.createOperatorSubscriber(t,function(e){return nc.executeSchedule(t,r,function(){return t.next(e)},n)},function(){return nc.executeSchedule(t,r,function(){return t.complete()},n)},function(e){return nc.executeSchedule(t,r,function(){return t.error(e)},n)}))})};var j={},uc=(Object.defineProperty(j,"__esModule",{value:!0}),j.subscribeOn=void 0,m);j.subscribeOn=function(r,n){return void 0===n&&(n=0),uc.operate(function(e,t){t.add(r.schedule(function(){return e.subscribe(t)},n))})},Object.defineProperty(bs,"__esModule",{value:!0}),bs.scheduleObservable=void 0;var ac=T,sc=_,cc=j;bs.scheduleObservable=function(e,t){return ac.innerFrom(e).pipe(cc.subscribeOn(t),sc.observeOn(t))};var lc={},fc=(Object.defineProperty(lc,"__esModule",{value:!0}),lc.schedulePromise=void 0,T),pc=_,dc=j;lc.schedulePromise=function(e,t){return fc.innerFrom(e).pipe(dc.subscribeOn(t),pc.observeOn(t))};var hc={},bc=(Object.defineProperty(hc,"__esModule",{value:!0}),hc.scheduleArray=void 0,o);hc.scheduleArray=function(r,n){return new bc.Observable(function(e){var t=0;return n.schedule(function(){t===r.length?e.complete():(e.next(r[t++]),e.closed||this.schedule())})})};var yc={},_c=(Object.defineProperty(yc,"__esModule",{value:!0}),yc.scheduleIterable=void 0,o),vc=Ts,mc=y,gc=rc;yc.scheduleIterable=function(e,t){return new _c.Observable(function(n){var o;return gc.executeSchedule(n,t,function(){o=e[vc.iterator](),gc.executeSchedule(n,t,function(){var e,t,r;try{t=(e=o.next()).value,r=e.done}catch(e){return void n.error(e)}r?n.complete():n.next(t)},0,!0)}),function(){return mc.isFunction(null==o?void 0:o.return)&&o.return()}})};var Ts={},Oc=(Object.defineProperty(Ts,"__esModule",{value:!0}),Ts.scheduleAsyncIterable=void 0,o),wc=rc;Ts.scheduleAsyncIterable=function(r,n){if(r)return new Oc.Observable(function(t){wc.executeSchedule(t,n,function(){var e=r[Symbol.asyncIterator]();wc.executeSchedule(t,n,function(){e.next().then(function(e){e.done?t.complete():t.next(e.value)})},0,!0)})});throw new Error("Iterable cannot be null")};var Ec={},Pc=(Object.defineProperty(Ec,"__esModule",{value:!0}),Ec.scheduleReadableStreamLike=void 0,Ts),Sc=Rs;Ec.scheduleReadableStreamLike=function(e,t){return Pc.scheduleAsyncIterable(Sc.readableStreamLikeToAsyncGenerator(e),t)},Object.defineProperty(hs,"__esModule",{value:!0}),hs.scheduled=void 0;var Tc=bs,jc=lc,Cc=hc,Ic=yc,Rc=Ts,kc=ms,Ac=_s,Mc=ys,Nc=Ss,xc=ws,Dc=Ps,Uc=Rs,Lc=Ec;hs.scheduled=function(e,t){if(null!=e){if(kc.isInteropObservable(e))return Tc.scheduleObservable(e,t);if(Mc.isArrayLike(e))return Cc.scheduleArray(e,t);if(Ac.isPromise(e))return jc.schedulePromise(e,t);if(xc.isAsyncIterable(e))return Rc.scheduleAsyncIterable(e,t);if(Nc.isIterable(e))return Ic.scheduleIterable(e,t);if(Uc.isReadableStreamLike(e))return Lc.scheduleReadableStreamLike(e,t)}throw Dc.createInvalidObservableTypeError(e)},Object.defineProperty(ds,"__esModule",{value:!0}),ds.from=void 0;var Fc=hs,Bc=T;ds.from=function(e,t){return t?Fc.scheduled(e,t):Bc.innerFrom(e)},Object.defineProperty(s,"__esModule",{value:!0}),s.of=void 0;var Wc=l,zc=ds;s.of=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Wc.popScheduler(e);return zc.from(e,r)};var qc,Vc,Hc,Gc,bs={},Yc=(Object.defineProperty(bs,"__esModule",{value:!0}),bs.throwError=void 0,o),Kc=y;function Zc(e,t,r){this.kind=e,this.value=t,this.error=r,this.hasValue="N"===e}function Qc(e,t){var r,n=e.kind,o=e.value,e=e.error;if("string"!=typeof n)throw new TypeError('Invalid notification, missing "kind"');"N"===n?null!=(r=t.next)&&r.call(t,o):"E"===n?null!=(r=t.error)&&r.call(t,e):null!=(o=t.complete)&&o.call(t)}bs.throwError=function(e,t){function r(e){return e.error(n())}var n=Kc.isFunction(e)?e:function(){return e};return new Yc.Observable(t?function(e){return t.schedule(r,0,e)}:r)},lc=oa,Object.defineProperty(lc,"__esModule",{value:!0}),lc.observeNotification=lc.Notification=lc.NotificationKind=void 0,qc=ra,Vc=s,Hc=bs,Gc=y,(hc=lc.NotificationKind||(lc.NotificationKind={})).NEXT="N",hc.ERROR="E",hc.COMPLETE="C",Zc.prototype.observe=function(e){return Qc(this,e)},Zc.prototype.do=function(e,t,r){var n=this.kind,o=this.value,i=this.error;return"N"===n?null==e?void 0:e(o):"E"===n?null==t?void 0:t(i):null==r?void 0:r()},Zc.prototype.accept=function(e,t,r){var n;return Gc.isFunction(null==(n=e)?void 0:n.next)?this.observe(e):this.do(e,t,r)},Zc.prototype.toObservable=function(){var e=this.kind,t=this.value,r=this.error,t="N"===e?Vc.of(t):"E"===e?Hc.throwError(function(){return r}):"C"===e?qc.EMPTY:0;if(t)return t;throw new TypeError("Unexpected notification kind "+e)},Zc.createNext=function(e){return new Zc("N",e)},Zc.createError=function(e){return new Zc("E",void 0,e)},Zc.createComplete=function(){return Zc.completeNotification},Zc.completeNotification=new Zc("C"),hc=Zc,lc.Notification=hc,lc.observeNotification=Qc;var Ts={},Xc=(Object.defineProperty(Ts,"__esModule",{value:!0}),Ts.isObservable=void 0,o),Jc=y;Ts.isObservable=function(e){return!!e&&(e instanceof Xc.Observable||Jc.isFunction(e.lift)&&Jc.isFunction(e.subscribe))};var ms={},_s={},Ss=(Object.defineProperty(_s,"__esModule",{value:!0}),_s.EmptyError=void 0,E),$c=(_s.EmptyError=Ss.createErrorClass(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}}),Object.defineProperty(ms,"__esModule",{value:!0}),ms.lastValueFrom=void 0,_s);ms.lastValueFrom=function(o,i){var u="object"==typeof i;return new Promise(function(e,t){var r,n=!1;o.subscribe({next:function(e){r=e,n=!0},error:t,complete:function(){n?e(r):u?e(i.defaultValue):t(new $c.EmptyError)}})})};var ws={},el=(Object.defineProperty(ws,"__esModule",{value:!0}),ws.firstValueFrom=void 0,_s),tl=P;ws.firstValueFrom=function(n,o){var i="object"==typeof o;return new Promise(function(t,e){var r=new tl.SafeSubscriber({next:function(e){t(e),r.unsubscribe()},error:e,complete:function(){i?t(o.defaultValue):e(new el.EmptyError)}});n.subscribe(r)})};var rl,nl,ol,il,ul,al,sl,Ps={},Rs=(Object.defineProperty(Ps,"__esModule",{value:!0}),Ps.ArgumentOutOfRangeError=void 0,E),Ec=(Ps.ArgumentOutOfRangeError=Rs.createErrorClass(function(e){return function(){e(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}}),{}),hc=(Object.defineProperty(Ec,"__esModule",{value:!0}),Ec.NotFoundError=void 0,E),lc=(Ec.NotFoundError=hc.createErrorClass(function(t){return function(e){t(this),this.name="NotFoundError",this.message=e}}),{}),Ss=(Object.defineProperty(lc,"__esModule",{value:!0}),lc.SequenceError=void 0,E),Rs=(lc.SequenceError=Ss.createErrorClass(function(t){return function(e){t(this),this.name="SequenceError",this.message=e}}),{}),hc={};function cl(e){throw new rl.TimeoutError(e)}Object.defineProperty(hc,"__esModule",{value:!0}),hc.isValidDate=void 0,hc.isValidDate=function(e){return e instanceof Date&&!isNaN(e)},rl=Rs,Object.defineProperty(rl,"__esModule",{value:!0}),rl.timeout=rl.TimeoutError=void 0,nl=na,ol=hc,il=m,ul=T,al=O,sl=rc,rl.TimeoutError=E.createErrorClass(function(t){return function(e){void 0===e&&(e=null),t(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=e}}),rl.timeout=function(e,t){var a=(e=ol.isValidDate(e)?{first:e}:"number"==typeof e?{each:e}:e).first,s=e.each,r=e.with,c=void 0===r?cl:r,l=void 0===(r=e.scheduler)?null!=t?t:nl.asyncScheduler:r,f=void 0===(t=e.meta)?null:t;if(null==a&&null==s)throw new TypeError("No timeout provided.");return il.operate(function(e,t){function r(e){n=sl.executeSchedule(t,l,function(){try{u.unsubscribe(),ul.innerFrom(c({meta:f,lastValue:o,seen:i})).subscribe(t)}catch(e){t.error(e)}},e)}var n,o=null,i=0,u=e.subscribe(al.createOperatorSubscriber(t,function(e){null!=n&&n.unsubscribe(),i++,t.next(o=e),0<s&&r(s)},void 0,void 0,function(){null!=n&&n.closed||null!=n&&n.unsubscribe(),o=null}));i||r(null!=a?"number"==typeof a?a:+a-l.now():s)})};var Ss={},E={},ll={},fl={},pl=(Object.defineProperty(fl,"__esModule",{value:!0}),fl.map=void 0,m),dl=O;fl.map=function(n,o){return pl.operate(function(e,t){var r=0;e.subscribe(dl.createOperatorSubscriber(t,function(e){t.next(n.call(o,e,r++))}))})};var hl=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},bl=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},yl=(Object.defineProperty(ll,"__esModule",{value:!0}),ll.mapOneOrManyArgs=void 0,fl),_l=Array.isArray;ll.mapOneOrManyArgs=function(r){return yl.map(function(e){return t=r,_l(e=e)?t.apply(void 0,bl([],hl(e))):t(e);var t})};var vl=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},ml=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},gl=(Object.defineProperty(E,"__esModule",{value:!0}),E.bindCallbackInternals=void 0,ss),Ol=o,wl=j,El=ll,Pl=_,Sl=X;E.bindCallbackInternals=function r(a,s,n,o){if(n){if(!gl.isScheduler(n))return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r(a,s,o).apply(this,e).pipe(El.mapOneOrManyArgs(n))};o=n}return o?function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r(a,s).apply(this,e).pipe(wl.subscribeOn(o),Pl.observeOn(o))}:function(){for(var t=this,r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var i=new Sl.AsyncSubject,u=!0;return new Ol.Observable(function(e){var n,o,e=i.subscribe(e);return u&&(n=u=!1,o=!1,s.apply(t,ml(ml([],vl(r)),[function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(a){var r=e.shift();if(null!=r)return void i.error(r)}i.next(1<e.length?e:e[0]),o=!0,n&&i.complete()}])),o&&i.complete(),n=!0),e})}},Object.defineProperty(Ss,"__esModule",{value:!0}),Ss.bindCallback=void 0;var Tl=E;Ss.bindCallback=function(e,t,r){return Tl.bindCallbackInternals(!1,e,t,r)};var jl={},Cl=(Object.defineProperty(jl,"__esModule",{value:!0}),jl.bindNodeCallback=void 0,E);jl.bindNodeCallback=function(e,t,r){return Cl.bindCallbackInternals(!0,e,t,r)};var E={},Il={},Rl=(Object.defineProperty(Il,"__esModule",{value:!0}),Il.argsArgArrayOrObject=void 0,Array.isArray),kl=Object.getPrototypeOf,Al=Object.prototype,Ml=Object.keys;Il.argsArgArrayOrObject=function(e){if(1===e.length){var t=e[0];if(Rl(t))return{args:t,keys:null};if((r=t)&&"object"==typeof r&&kl(r)===Al)return{args:(r=Ml(t)).map(function(e){return t[e]}),keys:r}}var r;return{args:e,keys:null}};var Nl={};Object.defineProperty(Nl,"__esModule",{value:!0}),Nl.createObject=void 0,Nl.createObject=function(e,n){return e.reduce(function(e,t,r){return e[t]=n[r],e},{})},Object.defineProperty(E,"__esModule",{value:!0}),E.combineLatestInit=E.combineLatest=void 0;var xl=o,Dl=Il,Ul=ds,Ll=S,Fl=ll,Bl=l,Wl=Nl,zl=O,ql=rc;function Vl(a,s,c){return void 0===c&&(c=Ll.identity),function(u){Hl(s,function(){for(var e=a.length,n=new Array(e),o=e,i=e,t=0;t<e;t++)!function(r){Hl(s,function(){var e=Ul.from(a[r],s),t=!1;e.subscribe(zl.createOperatorSubscriber(u,function(e){n[r]=e,t||(t=!0,i--),i||u.next(c(n.slice()))},function(){--o||u.complete()}))},u)}(t)},u)}}function Hl(e,t,r){e?ql.executeSchedule(r,e,t):t()}E.combineLatest=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Bl.popScheduler(e),n=Bl.popResultSelector(e),o=Dl.argsArgArrayOrObject(e),i=o.args,u=o.keys;return 0===i.length?Ul.from([],r):(o=new xl.Observable(Vl(i,r,u?function(e){return Wl.createObject(u,e)}:Ll.identity)),n?o.pipe(Fl.mapOneOrManyArgs(n)):o)},E.combineLatestInit=Vl;var Gl={},Yl={},Kl={},Zl={},Ql={},Xl=(Object.defineProperty(Ql,"__esModule",{value:!0}),Ql.mergeInternals=void 0,T),Jl=rc,$l=O;Ql.mergeInternals=function(e,r,n,o,i,u,a,t){var s=[],c=0,l=0,f=function(){s.length||c||r.complete()},p=function(e){return c<o?d(e):s.push(e)},d=function(e){u&&r.next(e),c++;var t=!1;Xl.innerFrom(n(e,l++)).subscribe($l.createOperatorSubscriber(r,function(e){null!=i&&i(e),u?p(e):r.next(e)},function(){t=!0},void 0,function(){if(t)try{c--;for(;s.length&&c<o;)!function(){var e=s.shift();a?Jl.executeSchedule(r,a,function(){return d(e)}):d(e)}();f()}catch(e){r.error(e)}}))};return e.subscribe($l.createOperatorSubscriber(r,p,function(){f()})),function(){null!=t&&t()}},Object.defineProperty(Zl,"__esModule",{value:!0}),Zl.mergeMap=void 0;var ef=fl,tf=T,rf=m,nf=Ql,of=y;Zl.mergeMap=function e(o,i,r){return void 0===r&&(r=1/0),of.isFunction(i)?e(function(r,n){return ef.map(function(e,t){return i(r,e,n,t)})(tf.innerFrom(o(r,n)))},r):("number"==typeof i&&(r=i),rf.operate(function(e,t){return nf.mergeInternals(e,t,o,r)}))},Object.defineProperty(Kl,"__esModule",{value:!0}),Kl.mergeAll=void 0;var uf=Zl,af=S;Kl.mergeAll=function(e){return uf.mergeMap(af.identity,e=void 0===e?1/0:e)},Object.defineProperty(Yl,"__esModule",{value:!0}),Yl.concatAll=void 0;var sf=Kl;Yl.concatAll=function(){return sf.mergeAll(1)},Object.defineProperty(Gl,"__esModule",{value:!0}),Gl.concat=void 0;var cf=Yl,lf=l,ff=ds;Gl.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return cf.concatAll()(ff.from(e,lf.popScheduler(e)))};var pf={},df={},hf=(Object.defineProperty(df,"__esModule",{value:!0}),df.defer=void 0,o),bf=T;df.defer=function(t){return new hf.Observable(function(e){bf.innerFrom(t()).subscribe(e)})},Object.defineProperty(pf,"__esModule",{value:!0}),pf.connectable=void 0;var yf=f,_f=o,vf=df,mf={connector:function(){return new yf.Subject},resetOnDisconnect:!0};pf.connectable=function(e,t){var r=null,n=(t=void 0===t?mf:t).connector,o=void 0===(t=t.resetOnDisconnect)||t,i=n();return(t=new _f.Observable(function(e){return i.subscribe(e)})).connect=function(){return r&&!r.closed||(r=vf.defer(function(){return e}).subscribe(i),o&&r.add(function(){return i=n()})),r},t};var gf={},Of=(Object.defineProperty(gf,"__esModule",{value:!0}),gf.forkJoin=void 0,o),wf=Il,Ef=T,Pf=l,Sf=O,Tf=ll,jf=Nl;gf.forkJoin=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Pf.popResultSelector(e),u=(n=wf.argsArgArrayOrObject(e)).args,a=n.keys,n=new Of.Observable(function(e){var t=u.length;if(t)for(var n=new Array(t),o=t,i=t,r=0;r<t;r++)!function(t){var r=!1;Ef.innerFrom(u[t]).subscribe(Sf.createOperatorSubscriber(e,function(e){r||(r=!0,i--),n[t]=e},function(){return o--},void 0,function(){o&&r||(i||e.next(a?jf.createObject(a,n):n),e.complete())}))}(r);else e.complete()});return r?n.pipe(Tf.mapOneOrManyArgs(r)):n};var Il={},Cf=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},If=(Object.defineProperty(Il,"__esModule",{value:!0}),Il.fromEvent=void 0,T),Rf=o,kf=Zl,Af=ys,Mf=y,Nf=ll,xf=["addListener","removeListener"],Df=["addEventListener","removeEventListener"],Uf=["on","off"];function Lf(r,n){return function(t){return function(e){return r[t](n,e)}}}Il.fromEvent=function t(r,n,o,e){if(Mf.isFunction(o)&&(e=o,o=void 0),e)return t(r,n,o).pipe(Nf.mapOneOrManyArgs(e));var e=Cf((e=r,Mf.isFunction(e.addEventListener)&&Mf.isFunction(e.removeEventListener)?Df.map(function(t){return function(e){return r[t](n,e,o)}}):(e=r,Mf.isFunction(e.addListener)&&Mf.isFunction(e.removeListener)?xf.map(Lf(r,n)):(e=r,Mf.isFunction(e.on)&&Mf.isFunction(e.off)?Uf.map(Lf(r,n)):[]))),2),i=e[0],u=e[1];if(!i&&Af.isArrayLike(r))return kf.mergeMap(function(e){return t(e,n,o)})(If.innerFrom(r));if(i)return new Rf.Observable(function(r){function e(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r.next(1<e.length?e:e[0])}return i(e),function(){return u(e)}});throw new TypeError("Invalid event target")};var Nl={},Ff=(Object.defineProperty(Nl,"__esModule",{value:!0}),Nl.fromEventPattern=void 0,o),Bf=y,Wf=ll;Nl.fromEventPattern=function e(n,o,t){return t?e(n,o).pipe(Wf.mapOneOrManyArgs(t)):new Ff.Observable(function(r){function e(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r.next(1===e.length?e[0]:e)}var t=n(e);return Bf.isFunction(o)?function(){return o(e,t)}:void 0})};var ys={},zf=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},qf=(Object.defineProperty(ys,"__esModule",{value:!0}),ys.generate=void 0,S),Vf=ss,Hf=df,Gf=yc;ys.generate=function(e,r,n,t,o){var i,u,a;function s(){var t;return zf(this,function(e){switch(e.label){case 0:t=a,e.label=1;case 1:return r&&!r(t)?[3,4]:[4,u(t)];case 2:e.sent(),e.label=3;case 3:return t=n(t),[3,1];case 4:return[2]}})}return 1===arguments.length?(a=e.initialState,r=e.condition,n=e.iterate,i=e.resultSelector,u=void 0===i?qf.identity:i,o=e.scheduler):(a=e,!t||Vf.isScheduler(t)?(u=qf.identity,o=t):u=t),Hf.defer(o?function(){return Gf.scheduleIterable(s(),o)}:s)};var yc={},Yf=(Object.defineProperty(yc,"__esModule",{value:!0}),yc.iif=void 0,df);yc.iif=function(e,t,r){return Yf.defer(function(){return e()?t:r})};var Kf={},Zf={},Qf=(Object.defineProperty(Zf,"__esModule",{value:!0}),Zf.timer=void 0,o),Xf=na,Jf=ss,$f=hc;Zf.timer=function(n,e,o){void 0===n&&(n=0),void 0===o&&(o=Xf.async);var i=-1;return null!=e&&(Jf.isScheduler(e)?o=e:i=e),new Qf.Observable(function(e){var t=$f.isValidDate(n)?+n-o.now():n,r=0;return o.schedule(function(){e.closed||(e.next(r++),0<=i?this.schedule(void 0,i):e.complete())},t=t<0?0:t)})},Object.defineProperty(Kf,"__esModule",{value:!0}),Kf.interval=void 0;var ep=na,tp=Zf;Kf.interval=function(e,t){return tp.timer(e=(e=void 0===e?0:e)<0?0:e,e,t=void 0===t?ep.asyncScheduler:t)};var ss={},rp=(Object.defineProperty(ss,"__esModule",{value:!0}),ss.merge=void 0,Kl),np=T,op=ra,ip=l,up=ds;ss.merge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=ip.popScheduler(e),n=ip.popNumber(e,1/0),o=e;return o.length?1===o.length?np.innerFrom(o[0]):rp.mergeAll(n)(up.from(o,r)):op.EMPTY};var ap,sp={},cp=(ap=sp,Object.defineProperty(ap,"__esModule",{value:!0}),ap.never=ap.NEVER=void 0,ap.NEVER=new o.Observable(v.noop),ap.never=function(){return ap.NEVER},{}),lp={},fp=(Object.defineProperty(lp,"__esModule",{value:!0}),lp.argsOrArgArray=void 0,Array.isArray);lp.argsOrArgArray=function(e){return 1===e.length&&fp(e[0])?e[0]:e},Object.defineProperty(cp,"__esModule",{value:!0}),cp.onErrorResumeNext=void 0;var pp=o,dp=lp,hp=O,bp=v,yp=T;cp.onErrorResumeNext=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=dp.argsOrArgArray(e);return new pp.Observable(function(r){var n=0,o=function(){if(n<i.length){var e=void 0;try{e=yp.innerFrom(i[n++])}catch(e){return void o()}var t=new hp.OperatorSubscriber(r,void 0,bp.noop,bp.noop);e.subscribe(t),t.add(o)}else r.complete()};o()})};var _p={},vp=(Object.defineProperty(_p,"__esModule",{value:!0}),_p.pairs=void 0,ds);_p.pairs=function(e,t){return vp.from(Object.entries(e),t)};var mp={},gp={};Object.defineProperty(gp,"__esModule",{value:!0}),gp.not=void 0,gp.not=function(r,n){return function(e,t){return!r.call(n,e,t)}};var Op={},wp=(Object.defineProperty(Op,"__esModule",{value:!0}),Op.filter=void 0,m),Ep=O;Op.filter=function(n,o){return wp.operate(function(e,t){var r=0;e.subscribe(Ep.createOperatorSubscriber(t,function(e){return n.call(o,e,r++)&&t.next(e)}))})},Object.defineProperty(mp,"__esModule",{value:!0}),mp.partition=void 0;var Pp=gp,Sp=Op,Tp=T;mp.partition=function(e,t,r){return[Sp.filter(t,r)(Tp.innerFrom(e)),Sp.filter(Pp.not(t,r))(Tp.innerFrom(e))]};var jp={},Cp=(Object.defineProperty(jp,"__esModule",{value:!0}),jp.raceInit=jp.race=void 0,o),Ip=T,Rp=lp,kp=O;function Ap(t){return function(n){for(var o=[],e=0;o&&!n.closed&&e<t.length;e++)!function(r){o.push(Ip.innerFrom(t[r]).subscribe(kp.createOperatorSubscriber(n,function(e){if(o){for(var t=0;t<o.length;t++)t!==r&&o[t].unsubscribe();o=null}n.next(e)})))}(e)}}jp.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 1===(e=Rp.argsOrArgArray(e)).length?Ip.innerFrom(e[0]):new Cp.Observable(Ap(e))},jp.raceInit=Ap;var Mp={},Np=(Object.defineProperty(Mp,"__esModule",{value:!0}),Mp.range=void 0,o),xp=ra;Mp.range=function(r,e,n){if(null==e&&(e=r,r=0),e<=0)return xp.EMPTY;var o=e+r;return new Np.Observable(n?function(e){var t=r;return n.schedule(function(){t<o?(e.next(t++),this.schedule()):e.complete()})}:function(e){for(var t=r;t<o&&!e.closed;)e.next(t++);e.complete()})};var Dp={},Up=(Object.defineProperty(Dp,"__esModule",{value:!0}),Dp.using=void 0,o),Lp=T,Fp=ra;Dp.using=function(n,o){return new Up.Observable(function(e){var t=n(),r=o(t);return(r?Lp.innerFrom(r):Fp.EMPTY).subscribe(e),function(){t&&t.unsubscribe()}})};var Bp={},Wp=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},zp=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},qp=(Object.defineProperty(Bp,"__esModule",{value:!0}),Bp.zip=void 0,o),Vp=T,Hp=lp,Gp=ra,Yp=O,Kp=l;Bp.zip=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=Kp.popResultSelector(e),u=Hp.argsOrArgArray(e);return u.length?new qp.Observable(function(r){for(var n=u.map(function(){return[]}),o=u.map(function(){return!1}),e=(r.add(function(){n=o=null}),0);!r.closed&&e<u.length;e++)!function(t){Vp.innerFrom(u[t]).subscribe(Yp.createOperatorSubscriber(r,function(e){n[t].push(e),n.every(function(e){return e.length})&&(e=n.map(function(e){return e.shift()}),r.next(i?i.apply(void 0,zp([],Wp(e))):e),n.some(function(e,t){return!e.length&&o[t]})&&r.complete())},function(){o[t]=!0,n[t].length||r.complete()}))}(e);return function(){n=o=null}}):Gp.EMPTY};var Zp={},Qp=(Object.defineProperty(Zp,"__esModule",{value:!0}),{}),Xp=(Object.defineProperty(Qp,"__esModule",{value:!0}),Qp.audit=void 0,m),Jp=T,$p=O;Qp.audit=function(s){return Xp.operate(function(e,t){function r(){var e;null!=u&&u.unsubscribe(),u=null,o&&(o=!1,e=i,i=null,t.next(e)),a&&t.complete()}function n(){u=null,a&&t.complete()}var o=!1,i=null,u=null,a=!1;e.subscribe($p.createOperatorSubscriber(t,function(e){o=!0,i=e,u||Jp.innerFrom(s(e)).subscribe(u=$p.createOperatorSubscriber(t,r,n))},function(){a=!0,o&&u&&!u.closed||t.complete()}))})};var ed={},td=(Object.defineProperty(ed,"__esModule",{value:!0}),ed.auditTime=void 0,na),rd=Qp,nd=Zf;ed.auditTime=function(e,t){return void 0===t&&(t=td.asyncScheduler),rd.audit(function(){return nd.timer(e,t)})};var od={},id=(Object.defineProperty(od,"__esModule",{value:!0}),od.buffer=void 0,m),ud=v,ad=O,sd=T;od.buffer=function(n){return id.operate(function(e,t){var r=[];return e.subscribe(ad.createOperatorSubscriber(t,function(e){return r.push(e)},function(){t.next(r),t.complete()})),sd.innerFrom(n).subscribe(ad.createOperatorSubscriber(t,function(){var e=r;r=[],t.next(e)},ud.noop)),function(){r=null}})};var cd={},ld=r&&r.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},fd=(Object.defineProperty(cd,"__esModule",{value:!0}),cd.bufferCount=void 0,m),pd=O,dd=Q;cd.bufferCount=function(h,b){return b=null!=(b=void 0===b?null:b)?b:h,fd.operate(function(e,f){var p=[],d=0;e.subscribe(pd.createOperatorSubscriber(f,function(e){var t,r,n,o,i=null;d++%b==0&&p.push([]);try{for(var u=ld(p),a=u.next();!a.done;a=u.next())(l=a.value).push(e),h<=l.length&&(i=null!=i?i:[]).push(l)}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=u.return)&&r.call(u)}finally{if(t)throw t.error}}if(i)try{for(var s=ld(i),c=s.next();!c.done;c=s.next()){var l=c.value;dd.arrRemove(p,l),f.next(l)}}catch(e){n={error:e}}finally{try{c&&!c.done&&(o=s.return)&&o.call(s)}finally{if(n)throw n.error}}},function(){var t,e;try{for(var r=ld(p),n=r.next();!n.done;n=r.next()){var o=n.value;f.next(o)}}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}f.complete()},void 0,function(){p=null}))})};var hd={},bd=r&&r.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},yd=(Object.defineProperty(hd,"__esModule",{value:!0}),hd.bufferTime=void 0,b),_d=m,vd=O,md=Q,gd=na,Od=l,wd=rc;hd.bufferTime=function(i){for(var e,t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var u=null!=(e=Od.popScheduler(t))?e:gd.asyncScheduler,a=null!=(e=t[0])?e:null,l=t[1]||1/0;return _d.operate(function(e,r){var s=[],n=!1,c=function(e){var t=e.buffer;e.subs.unsubscribe(),md.arrRemove(s,e),r.next(t),n&&o()},o=function(){var e,t;s&&(e=new yd.Subscription,r.add(e),s.push(t={buffer:[],subs:e}),wd.executeSchedule(e,u,function(){return c(t)},i))},t=(null!==a&&0<=a?wd.executeSchedule(r,u,o,a,!0):n=!0,o(),vd.createOperatorSubscriber(r,function(e){var t,r,n=s.slice();try{for(var o=bd(n),i=o.next();!i.done;i=o.next()){var u=i.value,a=u.buffer;a.push(e),l<=a.length&&c(u)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}},function(){for(;null!=s&&s.length;)r.next(s.shift().buffer);null!=t&&t.unsubscribe(),r.complete(),r.unsubscribe()},void 0,function(){return s=null}));e.subscribe(t)})};var Ed={},Pd=r&&r.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Sd=(Object.defineProperty(Ed,"__esModule",{value:!0}),Ed.bufferToggle=void 0,b),Td=m,jd=T,Cd=O,Id=v,Rd=Q;Ed.bufferToggle=function(t,o){return Td.operate(function(e,n){var i=[];jd.innerFrom(t).subscribe(Cd.createOperatorSubscriber(n,function(e){var t=[],r=(i.push(t),new Sd.Subscription);r.add(jd.innerFrom(o(e)).subscribe(Cd.createOperatorSubscriber(n,function(){Rd.arrRemove(i,t),n.next(t),r.unsubscribe()},Id.noop)))},Id.noop)),e.subscribe(Cd.createOperatorSubscriber(n,function(e){var t,r;try{for(var n=Pd(i),o=n.next();!o.done;o=n.next())o.value.push(e)}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}},function(){for(;0<i.length;)n.next(i.shift());n.complete()}))})};var kd={},Ad=(Object.defineProperty(kd,"__esModule",{value:!0}),kd.bufferWhen=void 0,m),Md=v,Nd=O,xd=T;kd.bufferWhen=function(i){return Ad.operate(function(e,t){var r=null,n=null,o=function(){null!=n&&n.unsubscribe();var e=r;r=[],e&&t.next(e),xd.innerFrom(i()).subscribe(n=Nd.createOperatorSubscriber(t,o,Md.noop))};o(),e.subscribe(Nd.createOperatorSubscriber(t,function(e){return null==r?void 0:r.push(e)},function(){r&&t.next(r),t.complete()},void 0,function(){return r=n=null}))})};var Dd={},Ud=(Object.defineProperty(Dd,"__esModule",{value:!0}),Dd.catchError=void 0,T),Ld=O,Fd=m;Dd.catchError=function u(a){return Fd.operate(function(t,r){var n,o=null,i=!1,o=t.subscribe(Ld.createOperatorSubscriber(r,void 0,void 0,function(e){n=Ud.innerFrom(a(e,u(a)(t))),o?(o.unsubscribe(),o=null,n.subscribe(r)):i=!0}));i&&(o.unsubscribe(),o=null,n.subscribe(r))})};var Bd={},Wd={},C={},zd={},qd={},Vd={},Hd=(Object.defineProperty(Vd,"__esModule",{value:!0}),Vd.scanInternals=void 0,O);Vd.scanInternals=function(u,t,a,s,c){return function(e,r){var n=a,o=t,i=0;e.subscribe(Hd.createOperatorSubscriber(r,function(e){var t=i++;o=n?u(o,e,t):(n=!0,e),s&&r.next(o)},c&&function(){n&&r.next(o),r.complete()}))}},Object.defineProperty(qd,"__esModule",{value:!0}),qd.reduce=void 0;var Gd=Vd,Yd=m;qd.reduce=function(e,t){return Yd.operate(Gd.scanInternals(e,t,2<=arguments.length,!1,!0))},Object.defineProperty(zd,"__esModule",{value:!0}),zd.toArray=void 0;function Kd(e,t){return e.push(t),e}var Zd=qd,Qd=m;zd.toArray=function(){return Qd.operate(function(e,t){Zd.reduce(Kd,[])(e).subscribe(t)})},Object.defineProperty(C,"__esModule",{value:!0}),C.joinAllInternals=void 0;var Xd=S,Jd=ll,$d=n,eh=Zl,th=zd;C.joinAllInternals=function(t,e){return $d.pipe(th.toArray(),eh.mergeMap(function(e){return t(e)}),e?Jd.mapOneOrManyArgs(e):Xd.identity)},Object.defineProperty(Wd,"__esModule",{value:!0}),Wd.combineLatestAll=void 0;var rh=E,nh=C;Wd.combineLatestAll=function(e){return nh.joinAllInternals(rh.combineLatest,e)},Object.defineProperty(Bd,"__esModule",{value:!0}),Bd.combineAll=void 0;Bd.combineAll=Wd.combineLatestAll;var oh={},ih={},uh=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},ah=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},sh=(Object.defineProperty(ih,"__esModule",{value:!0}),ih.combineLatest=void 0,E),ch=m,lh=lp,fh=ll,ph=n,dh=l;function hh(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=dh.popResultSelector(r);return t?ph.pipe(hh.apply(void 0,ah([],uh(r))),fh.mapOneOrManyArgs(t)):ch.operate(function(e,t){sh.combineLatestInit(ah([e],uh(lh.argsOrArgArray(r))))(t)})}ih.combineLatest=hh;var bh=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},yh=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},_h=(Object.defineProperty(oh,"__esModule",{value:!0}),oh.combineLatestWith=void 0,ih);oh.combineLatestWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return _h.combineLatest.apply(void 0,yh([],bh(e)))};var ll={},vh=(Object.defineProperty(ll,"__esModule",{value:!0}),ll.concatMap=void 0,Zl),mh=y;ll.concatMap=function(e,t){return mh.isFunction(t)?vh.mergeMap(e,t,1):vh.mergeMap(e,1)};var gh={},Oh=(Object.defineProperty(gh,"__esModule",{value:!0}),gh.concatMapTo=void 0,ll),wh=y;gh.concatMapTo=function(e,t){return wh.isFunction(t)?Oh.concatMap(function(){return e},t):Oh.concatMap(function(){return e})};var Eh={},Ph={},Sh=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Th=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},jh=(Object.defineProperty(Ph,"__esModule",{value:!0}),Ph.concat=void 0,m),Ch=Yl,Ih=l,Rh=ds;Ph.concat=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var n=Ih.popScheduler(r);return jh.operate(function(e,t){Ch.concatAll()(Rh.from(Th([e],Sh(r)),n)).subscribe(t)})};var kh=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Ah=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},Mh=(Object.defineProperty(Eh,"__esModule",{value:!0}),Eh.concatWith=void 0,Ph);Eh.concatWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Mh.concat.apply(void 0,Ah([],kh(e)))};var Nh={},xh={},Dh=(Object.defineProperty(xh,"__esModule",{value:!0}),xh.fromSubscribable=void 0,o);xh.fromSubscribable=function(t){return new Dh.Observable(function(e){return t.subscribe(e)})},Object.defineProperty(Nh,"__esModule",{value:!0}),Nh.connect=void 0;var Uh=f,Lh=T,Fh=m,Bh=xh,Wh={connector:function(){return new Uh.Subject}};Nh.connect=function(n,e){var o=(e=void 0===e?Wh:e).connector;return Fh.operate(function(e,t){var r=o();Lh.innerFrom(n(Bh.fromSubscribable(r))).subscribe(t),t.add(e.subscribe(r))})};var xh={},zh=(Object.defineProperty(xh,"__esModule",{value:!0}),xh.count=void 0,qd);xh.count=function(n){return zh.reduce(function(e,t,r){return!n||n(t,r)?e+1:e},0)};var qh={},Vh=(Object.defineProperty(qh,"__esModule",{value:!0}),qh.debounce=void 0,m),Hh=v,Gh=O,Yh=T;qh.debounce=function(u){return Vh.operate(function(e,t){function r(){var e;null!=i&&i.unsubscribe(),i=null,n&&(n=!1,e=o,o=null,t.next(e))}var n=!1,o=null,i=null;e.subscribe(Gh.createOperatorSubscriber(t,function(e){null!=i&&i.unsubscribe(),n=!0,o=e,i=Gh.createOperatorSubscriber(t,r,Hh.noop),Yh.innerFrom(u(e)).subscribe(i)},function(){r(),t.complete()},void 0,function(){o=i=null}))})};var I={},Kh=(Object.defineProperty(I,"__esModule",{value:!0}),I.debounceTime=void 0,na),Zh=m,Qh=O;I.debounceTime=function(a,s){return void 0===s&&(s=Kh.asyncScheduler),Zh.operate(function(e,r){var n=null,t=null,o=null,i=function(){var e;n&&(n.unsubscribe(),e=t,t=n=null,r.next(e))};function u(){var e=o+a,t=s.now();if(t<e)return n=this.schedule(void 0,e-t),void r.add(n);i()}e.subscribe(Qh.createOperatorSubscriber(r,function(e){t=e,o=s.now(),n||(n=s.schedule(u,a),r.add(n))},function(){i(),r.complete()},void 0,function(){t=n=null}))})};var Xh={},Jh=(Object.defineProperty(Xh,"__esModule",{value:!0}),Xh.defaultIfEmpty=void 0,m),$h=O;Xh.defaultIfEmpty=function(n){return Jh.operate(function(e,t){var r=!1;e.subscribe($h.createOperatorSubscriber(t,function(e){r=!0,t.next(e)},function(){r||t.next(n),t.complete()}))})};var eb={},tb={},rb={},nb=(Object.defineProperty(rb,"__esModule",{value:!0}),rb.take=void 0,ra),ob=m,ib=O;rb.take=function(n){return n<=0?function(){return nb.EMPTY}:ob.operate(function(e,t){var r=0;e.subscribe(ib.createOperatorSubscriber(t,function(e){++r<=n&&(t.next(e),n<=r&&t.complete())}))})};var ub={},ab=(Object.defineProperty(ub,"__esModule",{value:!0}),ub.ignoreElements=void 0,m),sb=O,cb=v;ub.ignoreElements=function(){return ab.operate(function(e,t){e.subscribe(sb.createOperatorSubscriber(t,cb.noop))})};var lb={},fb=(Object.defineProperty(lb,"__esModule",{value:!0}),lb.mapTo=void 0,fl);lb.mapTo=function(e){return fb.map(function(){return e})},Object.defineProperty(tb,"__esModule",{value:!0}),tb.delayWhen=void 0;var pb=Gl,db=rb,hb=ub,bb=lb,yb=Zl,_b=T;tb.delayWhen=function t(r,n){return n?function(e){return pb.concat(n.pipe(db.take(1),hb.ignoreElements()),e.pipe(t(r)))}:yb.mergeMap(function(e,t){return _b.innerFrom(r(e,t)).pipe(db.take(1),bb.mapTo(e))})},Object.defineProperty(eb,"__esModule",{value:!0}),eb.delay=void 0;var vb=na,mb=tb,gb=Zf;eb.delay=function(e,t){var r=gb.timer(e,t=void 0===t?vb.asyncScheduler:t);return mb.delayWhen(function(){return r})};var Ob={},wb=(Object.defineProperty(Ob,"__esModule",{value:!0}),Ob.dematerialize=void 0,oa),Eb=m,Pb=O;Ob.dematerialize=function(){return Eb.operate(function(e,t){e.subscribe(Pb.createOperatorSubscriber(t,function(e){return wb.observeNotification(e,t)}))})};var Sb={},Tb=(Object.defineProperty(Sb,"__esModule",{value:!0}),Sb.distinct=void 0,m),jb=O,Cb=v,Ib=T;Sb.distinct=function(o,t){return Tb.operate(function(e,r){var n=new Set;e.subscribe(jb.createOperatorSubscriber(r,function(e){var t=o?o(e):e;n.has(t)||(n.add(t),r.next(e))})),t&&Ib.innerFrom(t).subscribe(jb.createOperatorSubscriber(r,function(){return n.clear()},Cb.noop))})};var Rb={},kb=(Object.defineProperty(Rb,"__esModule",{value:!0}),Rb.distinctUntilChanged=void 0,S),Ab=m,Mb=O;function Nb(e,t){return e===t}Rb.distinctUntilChanged=function(i,u){return void 0===u&&(u=kb.identity),i=null!=i?i:Nb,Ab.operate(function(e,r){var n,o=!0;e.subscribe(Mb.createOperatorSubscriber(r,function(e){var t=u(e);!o&&i(n,t)||(o=!1,n=t,r.next(e))}))})};var xb={},Db=(Object.defineProperty(xb,"__esModule",{value:!0}),xb.distinctUntilKeyChanged=void 0,Rb);xb.distinctUntilKeyChanged=function(r,n){return Db.distinctUntilChanged(function(e,t){return n?n(e[r],t[r]):e[r]===t[r]})};var Ub={},Lb={},Fb=(Object.defineProperty(Lb,"__esModule",{value:!0}),Lb.throwIfEmpty=void 0,_s),Bb=m,Wb=O;function zb(){return new Fb.EmptyError}Lb.throwIfEmpty=function(n){return void 0===n&&(n=zb),Bb.operate(function(e,t){var r=!1;e.subscribe(Wb.createOperatorSubscriber(t,function(e){r=!0,t.next(e)},function(){return r?t.complete():t.error(n())}))})},Object.defineProperty(Ub,"__esModule",{value:!0}),Ub.elementAt=void 0;var qb=Ps,Vb=Op,Hb=Lb,Gb=Xh,Yb=rb;Ub.elementAt=function(r,t){if(r<0)throw new qb.ArgumentOutOfRangeError;var n=2<=arguments.length;return function(e){return e.pipe(Vb.filter(function(e,t){return t===r}),Yb.take(1),n?Gb.defaultIfEmpty(t):Hb.throwIfEmpty(function(){return new qb.ArgumentOutOfRangeError}))}};var Kb={},Zb=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Qb=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},Xb=(Object.defineProperty(Kb,"__esModule",{value:!0}),Kb.endWith=void 0,Gl),Jb=s;Kb.endWith=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return Xb.concat(e,Jb.of.apply(void 0,Qb([],Zb(t))))}};var $b={},ey=(Object.defineProperty($b,"__esModule",{value:!0}),$b.every=void 0,m),ty=O;$b.every=function(o,i){return ey.operate(function(t,r){var n=0;t.subscribe(ty.createOperatorSubscriber(r,function(e){o.call(i,e,n++,t)||(r.next(!1),r.complete())},function(){r.next(!0),r.complete()}))})};var ry={},ny={},oy={},iy=(Object.defineProperty(oy,"__esModule",{value:!0}),oy.exhaustMap=void 0,fl),uy=T,ay=m,sy=O;oy.exhaustMap=function t(i,o){return o?function(e){return e.pipe(t(function(r,n){return uy.innerFrom(i(r,n)).pipe(iy.map(function(e,t){return o(r,e,n,t)}))}))}:ay.operate(function(e,t){var r=0,n=null,o=!1;e.subscribe(sy.createOperatorSubscriber(t,function(e){n||(n=sy.createOperatorSubscriber(t,void 0,function(){n=null,o&&t.complete()}),uy.innerFrom(i(e,r++)).subscribe(n))},function(){o=!0,n||t.complete()}))})},Object.defineProperty(ny,"__esModule",{value:!0}),ny.exhaustAll=void 0;var cy=oy,ly=S;ny.exhaustAll=function(){return cy.exhaustMap(ly.identity)},Object.defineProperty(ry,"__esModule",{value:!0}),ry.exhaust=void 0;ry.exhaust=ny.exhaustAll;var fy={},py=(Object.defineProperty(fy,"__esModule",{value:!0}),fy.expand=void 0,m),dy=Ql;fy.expand=function(r,n,o){return n=((n=void 0===n?1/0:n)||0)<1?1/0:n,py.operate(function(e,t){return dy.mergeInternals(e,t,r,n,void 0,!0,o)})};var hy={},by=(Object.defineProperty(hy,"__esModule",{value:!0}),hy.finalize=void 0,m);hy.finalize=function(r){return by.operate(function(e,t){try{e.subscribe(t)}finally{t.add(r)}})};var yy={},_y=(Object.defineProperty(yy,"__esModule",{value:!0}),yy.createFind=yy.find=void 0,m),vy=O;function my(i,u,e){var a="index"===e;return function(r,n){var o=0;r.subscribe(vy.createOperatorSubscriber(n,function(e){var t=o++;i.call(u,e,t,r)&&(n.next(a?t:e),n.complete())},function(){n.next(a?-1:void 0),n.complete()}))}}yy.find=function(e,t){return _y.operate(my(e,t,"value"))},yy.createFind=my;var gy={},Oy=(Object.defineProperty(gy,"__esModule",{value:!0}),gy.findIndex=void 0,m),wy=yy;gy.findIndex=function(e,t){return Oy.operate(wy.createFind(e,t,"index"))};var Ey={},Py=(Object.defineProperty(Ey,"__esModule",{value:!0}),Ey.first=void 0,_s),Sy=Op,Ty=rb,jy=Xh,Cy=Lb,Iy=S;Ey.first=function(n,e){var t=2<=arguments.length;return function(r){return r.pipe(n?Sy.filter(function(e,t){return n(e,t,r)}):Iy.identity,Ty.take(1),t?jy.defaultIfEmpty(e):Cy.throwIfEmpty(function(){return new Py.EmptyError}))}};var Ry={},ky=(Object.defineProperty(Ry,"__esModule",{value:!0}),Ry.groupBy=void 0,o),Ay=T,My=f,Ny=m,xy=O;Ry.groupBy=function(b,t,y,_){return Ny.operate(function(e,s){function c(t){return r(function(e){return e.error(t)})}t&&"function"!=typeof t?(y=t.duration,l=t.element,_=t.connector):l=t;var l,f=new Map,r=function(e){f.forEach(e),e(s)},p=0,d=!1,h=new xy.OperatorSubscriber(s,function(e){try{var t,r,n=b(e),o=f.get(n);o||(f.set(n,o=_?_():new My.Subject),i=n,u=o,(a=new ky.Observable(function(e){p++;var t=u.subscribe(e);return function(){t.unsubscribe(),0==--p&&d&&h.unsubscribe()}})).key=i,t=a,s.next(t),y&&(r=xy.createOperatorSubscriber(o,function(){o.complete(),null!=r&&r.unsubscribe()},void 0,void 0,function(){return f.delete(n)}),h.add(Ay.innerFrom(y(t)).subscribe(r)))),o.next(l?l(e):e)}catch(e){c(e)}var i,u,a},function(){return r(function(e){return e.complete()})},c,function(){return f.clear()},function(){return d=!0,0===p});e.subscribe(h)})};var Dy={},Uy=(Object.defineProperty(Dy,"__esModule",{value:!0}),Dy.isEmpty=void 0,m),Ly=O;Dy.isEmpty=function(){return Uy.operate(function(e,t){e.subscribe(Ly.createOperatorSubscriber(t,function(){t.next(!1),t.complete()},function(){t.next(!0),t.complete()}))})};var Fy={},By={},Wy=r&&r.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},zy=(Object.defineProperty(By,"__esModule",{value:!0}),By.takeLast=void 0,ra),qy=m,Vy=O;By.takeLast=function(t){return t<=0?function(){return zy.EMPTY}:qy.operate(function(e,i){var u=[];e.subscribe(Vy.createOperatorSubscriber(i,function(e){u.push(e),t<u.length&&u.shift()},function(){var t,e;try{for(var r=Wy(u),n=r.next();!n.done;n=r.next()){var o=n.value;i.next(o)}}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}i.complete()},void 0,function(){u=null}))})},Object.defineProperty(Fy,"__esModule",{value:!0}),Fy.last=void 0;var Hy=_s,Gy=Op,Yy=By,Ky=Lb,Zy=Xh,Qy=S;Fy.last=function(n,e){var t=2<=arguments.length;return function(r){return r.pipe(n?Gy.filter(function(e,t){return n(e,t,r)}):Qy.identity,Yy.takeLast(1),t?Zy.defaultIfEmpty(e):Ky.throwIfEmpty(function(){return new Hy.EmptyError}))}};var Xy={},Jy=(Object.defineProperty(Xy,"__esModule",{value:!0}),Xy.materialize=void 0,oa),$y=m,e_=O;Xy.materialize=function(){return $y.operate(function(e,t){e.subscribe(e_.createOperatorSubscriber(t,function(e){t.next(Jy.Notification.createNext(e))},function(){t.next(Jy.Notification.createComplete()),t.complete()},function(e){t.next(Jy.Notification.createError(e)),t.complete()}))})};var t_={},r_=(Object.defineProperty(t_,"__esModule",{value:!0}),t_.max=void 0,qd),n_=y;t_.max=function(r){return r_.reduce(n_.isFunction(r)?function(e,t){return 0<r(e,t)?e:t}:function(e,t){return t<e?e:t})};var o_={},i_=(Object.defineProperty(o_,"__esModule",{value:!0}),o_.flatMap=void 0,Zl),i_=(o_.flatMap=i_.mergeMap,{}),u_=(Object.defineProperty(i_,"__esModule",{value:!0}),i_.mergeMapTo=void 0,Zl),a_=y;i_.mergeMapTo=function(e,t,r){return void 0===r&&(r=1/0),a_.isFunction(t)?u_.mergeMap(function(){return e},t,r):u_.mergeMap(function(){return e},r="number"==typeof t?t:r)};var s_={},c_=(Object.defineProperty(s_,"__esModule",{value:!0}),s_.mergeScan=void 0,m),l_=Ql;s_.mergeScan=function(n,o,i){return void 0===i&&(i=1/0),c_.operate(function(e,t){var r=o;return l_.mergeInternals(e,t,function(e,t){return n(r,e,t)},i,function(e){r=e},!1,void 0,function(){return r=null})})};var Ql={},f_={},p_=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},d_=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},h_=(Object.defineProperty(f_,"__esModule",{value:!0}),f_.merge=void 0,m),b_=lp,y_=Kl,__=l,v_=ds;f_.merge=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var n=__.popScheduler(r),o=__.popNumber(r,1/0),r=b_.argsOrArgArray(r);return h_.operate(function(e,t){y_.mergeAll(o)(v_.from(d_([e],p_(r)),n)).subscribe(t)})};var m_=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},g_=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},O_=(Object.defineProperty(Ql,"__esModule",{value:!0}),Ql.mergeWith=void 0,f_);Ql.mergeWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return O_.merge.apply(void 0,g_([],m_(e)))};var w_={},E_=(Object.defineProperty(w_,"__esModule",{value:!0}),w_.min=void 0,qd),P_=y;w_.min=function(r){return E_.reduce(P_.isFunction(r)?function(e,t){return r(e,t)<0?e:t}:function(e,t){return e<t?e:t})};var S_={},T_=(Object.defineProperty(S_,"__esModule",{value:!0}),S_.multicast=void 0,w),j_=y,C_=Nh;S_.multicast=function(e,t){var r=j_.isFunction(e)?e:function(){return e};return j_.isFunction(t)?C_.connect(t,{connector:r}):function(e){return new T_.ConnectableObservable(e,r)}};var I_={},R_=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},k_=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},A_=(Object.defineProperty(I_,"__esModule",{value:!0}),I_.onErrorResumeNext=I_.onErrorResumeNextWith=void 0,lp),M_=cp;function N_(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=A_.argsOrArgArray(e);return function(e){return M_.onErrorResumeNext.apply(void 0,k_([e],R_(r)))}}I_.onErrorResumeNextWith=N_,I_.onErrorResumeNext=N_;var x_={},D_=(Object.defineProperty(x_,"__esModule",{value:!0}),x_.pairwise=void 0,m),U_=O;x_.pairwise=function(){return D_.operate(function(e,r){var n,o=!1;e.subscribe(U_.createOperatorSubscriber(r,function(e){var t=n;n=e,o&&r.next([t,e]),o=!0}))})};var L_={},F_=(Object.defineProperty(L_,"__esModule",{value:!0}),L_.pluck=void 0,fl);L_.pluck=function(){for(var o=[],e=0;e<arguments.length;e++)o[e]=arguments[e];var i=o.length;if(0===i)throw new Error("list of properties cannot be empty.");return F_.map(function(e){for(var t=e,r=0;r<i;r++){var n=null==t?void 0:t[o[r]];if(void 0===n)return;t=n}return t})};var B_={},W_=(Object.defineProperty(B_,"__esModule",{value:!0}),B_.publish=void 0,f),z_=S_,q_=Nh;B_.publish=function(t){return t?function(e){return q_.connect(t)(e)}:function(e){return z_.multicast(new W_.Subject)(e)}};var V_={},H_=(Object.defineProperty(V_,"__esModule",{value:!0}),V_.publishBehavior=void 0,t),G_=w;V_.publishBehavior=function(r){return function(e){var t=new H_.BehaviorSubject(r);return new G_.ConnectableObservable(e,function(){return t})}};var Y_={},K_=(Object.defineProperty(Y_,"__esModule",{value:!0}),Y_.publishLast=void 0,X),Z_=w;Y_.publishLast=function(){return function(e){var t=new K_.AsyncSubject;return new Z_.ConnectableObservable(e,function(){return t})}};var Q_={},X_=(Object.defineProperty(Q_,"__esModule",{value:!0}),Q_.publishReplay=void 0,i),J_=S_,$_=y;Q_.publishReplay=function(t,r,e,n){e&&!$_.isFunction(e)&&(n=e);var o=$_.isFunction(e)?e:void 0;return function(e){return J_.multicast(new X_.ReplaySubject(t,r,n),o)(e)}};var ev={},tv=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},rv=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},nv=(Object.defineProperty(ev,"__esModule",{value:!0}),ev.raceWith=void 0,jp),ov=m,iv=S;ev.raceWith=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return r.length?ov.operate(function(e,t){nv.raceInit(rv([e],tv(r)))(t)}):iv.identity};var uv={},av=(Object.defineProperty(uv,"__esModule",{value:!0}),uv.repeat=void 0,ra),sv=m,cv=O,lv=T,fv=Zf;uv.repeat=function(e){var t,a,s=1/0;return null!=e&&("object"==typeof e?(t=e.count,s=void 0===t?1/0:t,a=e.delay):s=e),s<=0?function(){return av.EMPTY}:sv.operate(function(t,r){function n(){var e=!1;o=t.subscribe(cv.createOperatorSubscriber(r,void 0,function(){++i<s?o?u():e=!0:r.complete()})),e&&u()}var o,i=0,u=function(){var e,t;null!=o&&o.unsubscribe(),(o=null)!=a?(e="number"==typeof a?fv.timer(a):lv.innerFrom(a(i)),t=cv.createOperatorSubscriber(r,function(){t.unsubscribe(),n()}),e.subscribe(t)):n()};n()})};var pv={},dv=(Object.defineProperty(pv,"__esModule",{value:!0}),pv.repeatWhen=void 0,T),hv=f,bv=m,yv=O;pv.repeatWhen=function(l){return bv.operate(function(e,t){var r,n,o=!1,i=!1,u=!1,a=function(){return u&&i&&(t.complete(),!0)},s=function(){return n||(n=new hv.Subject,dv.innerFrom(l(n)).subscribe(yv.createOperatorSubscriber(t,function(){r?c():o=!0},function(){i=!0,a()}))),n},c=function(){u=!1,r=e.subscribe(yv.createOperatorSubscriber(t,void 0,function(){u=!0,a()||s().next()})),o&&(r.unsubscribe(),r=null,o=!1,c())};c()})};var _v={},vv=(Object.defineProperty(_v,"__esModule",{value:!0}),_v.retry=void 0,m),mv=O,gv=S,Ov=Zf,wv=T;_v.retry=function(e){var t=(e=(e=void 0===e?1/0:e)&&"object"==typeof e?e:{count:e}).count,c=void 0===t?1/0:t,l=e.delay,r=void 0!==(t=e.resetOnSuccess)&&t;return c<=0?gv.identity:vv.operate(function(e,i){var u,a=0,s=function(){var o=!1;u=e.subscribe(mv.createOperatorSubscriber(i,function(e){r&&(a=0),i.next(e)},void 0,function(e){var t,r,n;a++<c?(t=function(){u?(u.unsubscribe(),u=null,s()):o=!0},null!=l?(r="number"==typeof l?Ov.timer(l):wv.innerFrom(l(e,a)),n=mv.createOperatorSubscriber(i,function(){n.unsubscribe(),t()},function(){i.complete()}),r.subscribe(n)):t()):i.error(e)})),o&&(u.unsubscribe(),u=null,s())};s()})};var Ev={},Pv=(Object.defineProperty(Ev,"__esModule",{value:!0}),Ev.retryWhen=void 0,T),Sv=f,Tv=m,jv=O;Ev.retryWhen=function(u){return Tv.operate(function(e,t){var r,n,o=!1,i=function(){r=e.subscribe(jv.createOperatorSubscriber(t,void 0,void 0,function(e){n||(n=new Sv.Subject,Pv.innerFrom(u(n)).subscribe(jv.createOperatorSubscriber(t,function(){return r?i():o=!0}))),n&&n.next(e)})),o&&(r.unsubscribe(),r=null,o=!1,i())};i()})};var Cv={},Iv=(Object.defineProperty(Cv,"__esModule",{value:!0}),Cv.sample=void 0,T),Rv=m,kv=v,Av=O;Cv.sample=function(o){return Rv.operate(function(e,t){var r=!1,n=null;e.subscribe(Av.createOperatorSubscriber(t,function(e){r=!0,n=e})),Iv.innerFrom(o).subscribe(Av.createOperatorSubscriber(t,function(){var e;r&&(r=!1,e=n,n=null,t.next(e))},kv.noop))})};var Mv={},Nv=(Object.defineProperty(Mv,"__esModule",{value:!0}),Mv.sampleTime=void 0,na),xv=Cv,Dv=Kf;Mv.sampleTime=function(e,t){return xv.sample(Dv.interval(e,t=void 0===t?Nv.asyncScheduler:t))};var Uv={},Lv=(Object.defineProperty(Uv,"__esModule",{value:!0}),Uv.scan=void 0,m),Fv=Vd;Uv.scan=function(e,t){return Lv.operate(Fv.scanInternals(e,t,2<=arguments.length,!0))};var Vd={},Bv=(Object.defineProperty(Vd,"__esModule",{value:!0}),Vd.sequenceEqual=void 0,m),Wv=O,zv=T;function qv(){return{buffer:[],complete:!1}}Vd.sequenceEqual=function(u,a){return void 0===a&&(a=function(e,t){return e===t}),Bv.operate(function(e,t){function r(n,o){var r=Wv.createOperatorSubscriber(t,function(e){var t=o.buffer,r=o.complete;0===t.length?r?i(!1):n.buffer.push(e):a(e,t.shift())||i(!1)},function(){n.complete=!0;var e=o.complete,t=o.buffer;e&&i(0===t.length),null!=r&&r.unsubscribe()});return r}var n=qv(),o=qv(),i=function(e){t.next(e),t.complete()};e.subscribe(r(n,o)),zv.innerFrom(u).subscribe(r(o,n))})};var Vv={},Hv=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Gv=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},Yv=(Object.defineProperty(Vv,"__esModule",{value:!0}),Vv.share=void 0,T),Kv=f,Zv=P,Qv=m;function Xv(e,t){for(var r,n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];if(!0===t)e();else if(!1!==t)return r=new Zv.SafeSubscriber({next:function(){r.unsubscribe(),e()}}),Yv.innerFrom(t.apply(void 0,Gv([],Hv(n)))).subscribe(r)}Vv.share=function(e){var t=(e=void 0===e?{}:e).connector,p=void 0===t?function(){return new Kv.Subject}:t,d=void 0===(t=e.resetOnError)||t,h=void 0===(t=e.resetOnComplete)||t,b=void 0===(t=e.resetOnRefCountZero)||t;return function(e){function n(){var e=o;f(),null!=e&&e.unsubscribe()}var o,i,u,a=0,s=!1,c=!1,l=function(){null!=i&&i.unsubscribe(),i=void 0},f=function(){l(),o=u=void 0,s=c=!1};return Qv.operate(function(e,t){a++,c||s||l();var r=u=null!=u?u:p();t.add(function(){0!==--a||c||s||(i=Xv(n,b))}),r.subscribe(t),!o&&0<a&&(o=new Zv.SafeSubscriber({next:function(e){return r.next(e)},error:function(e){c=!0,l(),i=Xv(f,d,e),r.error(e)},complete:function(){s=!0,l(),i=Xv(f,h),r.complete()}}),Yv.innerFrom(e).subscribe(o))})(e)}};var Jv={},$v=(Object.defineProperty(Jv,"__esModule",{value:!0}),Jv.shareReplay=void 0,i),em=Vv;Jv.shareReplay=function(e,t,r){var n,o,i=!1;return e&&"object"==typeof e?(n=e.bufferSize,o=void 0===n?1/0:n,n=e.windowTime,t=void 0===n?1/0:n,i=void 0!==(n=e.refCount)&&n,r=e.scheduler):o=null!=e?e:1/0,em.share({connector:function(){return new $v.ReplaySubject(o,t,r)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})};var tm={},rm=(Object.defineProperty(tm,"__esModule",{value:!0}),tm.single=void 0,_s),nm=lc,om=Ec,im=m,um=O;tm.single=function(a){return im.operate(function(t,r){var n,o=!1,i=!1,u=0;t.subscribe(um.createOperatorSubscriber(r,function(e){i=!0,a&&!a(e,u++,t)||(o&&r.error(new nm.SequenceError("Too many matching values")),o=!0,n=e)},function(){o?(r.next(n),r.complete()):r.error(i?new om.NotFoundError("No matching values"):new rm.EmptyError)}))})};var am={},sm=(Object.defineProperty(am,"__esModule",{value:!0}),am.skip=void 0,Op);am.skip=function(r){return sm.filter(function(e,t){return r<=t})};var cm={},lm=(Object.defineProperty(cm,"__esModule",{value:!0}),cm.skipLast=void 0,S),fm=m,pm=O;cm.skipLast=function(u){return u<=0?lm.identity:fm.operate(function(e,n){var o=new Array(u),i=0;return e.subscribe(pm.createOperatorSubscriber(n,function(e){var t,r=i++;r<u?o[r]=e:(t=o[r=r%u],o[r]=e,n.next(t))})),function(){o=null}})};var dm={},hm=(Object.defineProperty(dm,"__esModule",{value:!0}),dm.skipUntil=void 0,m),bm=O,ym=T,_m=v;dm.skipUntil=function(o){return hm.operate(function(e,t){var r=!1,n=bm.createOperatorSubscriber(t,function(){null!=n&&n.unsubscribe(),r=!0},_m.noop);ym.innerFrom(o).subscribe(n),e.subscribe(bm.createOperatorSubscriber(t,function(e){return r&&t.next(e)}))})};var vm={},mm=(Object.defineProperty(vm,"__esModule",{value:!0}),vm.skipWhile=void 0,m),gm=O;vm.skipWhile=function(o){return mm.operate(function(e,t){var r=!1,n=0;e.subscribe(gm.createOperatorSubscriber(t,function(e){return(r=r||!o(e,n++))&&t.next(e)}))})};var Om={},wm=(Object.defineProperty(Om,"__esModule",{value:!0}),Om.startWith=void 0,Gl),Em=l,Pm=m;Om.startWith=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var n=Em.popScheduler(r);return Pm.operate(function(e,t){(n?wm.concat(r,e,n):wm.concat(r,e)).subscribe(t)})};var Sm={},Tm={},jm=(Object.defineProperty(Tm,"__esModule",{value:!0}),Tm.switchMap=void 0,T),Cm=m,Im=O;Tm.switchMap=function(s,c){return Cm.operate(function(e,o){function i(){t&&!u&&o.complete()}var u=null,a=0,t=!1;e.subscribe(Im.createOperatorSubscriber(o,function(t){null!=u&&u.unsubscribe();var r=0,n=a++;jm.innerFrom(s(t,n)).subscribe(u=Im.createOperatorSubscriber(o,function(e){return o.next(c?c(t,e,n,r++):e)},function(){u=null,i()}))},function(){t=!0,i()}))})},Object.defineProperty(Sm,"__esModule",{value:!0}),Sm.switchAll=void 0;var Rm=Tm,km=S;Sm.switchAll=function(){return Rm.switchMap(km.identity)};var Am={},Mm=(Object.defineProperty(Am,"__esModule",{value:!0}),Am.switchMapTo=void 0,Tm),Nm=y;Am.switchMapTo=function(e,t){return Nm.isFunction(t)?Mm.switchMap(function(){return e},t):Mm.switchMap(function(){return e})};var xm={},Dm=(Object.defineProperty(xm,"__esModule",{value:!0}),xm.switchScan=void 0,Tm),Um=m;xm.switchScan=function(n,o){return Um.operate(function(e,t){var r=o;return Dm.switchMap(function(e,t){return n(r,e,t)},function(e,t){return r=t})(e).subscribe(t),function(){r=null}})};var Lm={},Fm=(Object.defineProperty(Lm,"__esModule",{value:!0}),Lm.takeUntil=void 0,m),Bm=O,Wm=T,zm=v;Lm.takeUntil=function(r){return Fm.operate(function(e,t){Wm.innerFrom(r).subscribe(Bm.createOperatorSubscriber(t,function(){return t.complete()},zm.noop)),t.closed||e.subscribe(t)})};var qm={},Vm=(Object.defineProperty(qm,"__esModule",{value:!0}),qm.takeWhile=void 0,m),Hm=O;qm.takeWhile=function(o,i){return void 0===i&&(i=!1),Vm.operate(function(e,r){var n=0;e.subscribe(Hm.createOperatorSubscriber(r,function(e){var t=o(e,n++);(t||i)&&r.next(e),t||r.complete()}))})};var Gm={},Ym=(Object.defineProperty(Gm,"__esModule",{value:!0}),Gm.tap=void 0,y),Km=m,Zm=O,Qm=S;Gm.tap=function(e,t,r){var o=Ym.isFunction(e)||t||r?{next:e,error:t,complete:r}:e;return o?Km.operate(function(e,r){null!=(t=o.subscribe)&&t.call(o);var t,n=!0;e.subscribe(Zm.createOperatorSubscriber(r,function(e){var t;null!=(t=o.next)&&t.call(o,e),r.next(e)},function(){var e;n=!1,null!=(e=o.complete)&&e.call(o),r.complete()},function(e){var t;n=!1,null!=(t=o.error)&&t.call(o,e),r.error(e)},function(){var e;n&&null!=(e=o.unsubscribe)&&e.call(o),null!=(e=o.finalize)&&e.call(o)}))}):Qm.identity};var y={},Xm=(Object.defineProperty(y,"__esModule",{value:!0}),y.throttle=void 0,m),Jm=O,$m=T;y.throttle=function(h,b){return Xm.operate(function(e,t){function r(){var e;a&&(a=!1,e=s,s=null,t.next(e),l||d(e))}var n=null!=b?b:{},o=n.leading,i=void 0===o||o,o=n.trailing,u=void 0!==o&&o,a=!1,s=null,c=null,l=!1,f=function(){null!=c&&c.unsubscribe(),c=null,u&&(r(),l&&t.complete())},p=function(){c=null,l&&t.complete()},d=function(e){return c=$m.innerFrom(h(e)).subscribe(Jm.createOperatorSubscriber(t,f,p))};e.subscribe(Jm.createOperatorSubscriber(t,function(e){a=!0,s=e,c&&!c.closed||(i?r():d(e))},function(){l=!0,u&&a&&c&&!c.closed||t.complete()}))})};var e0={},t0=(Object.defineProperty(e0,"__esModule",{value:!0}),e0.throttleTime=void 0,na),r0=y,n0=Zf;e0.throttleTime=function(e,t,r){var n=n0.timer(e,t=void 0===t?t0.asyncScheduler:t);return r0.throttle(function(){return n},r)};var o0={},i0=(Object.defineProperty(o0,"__esModule",{value:!0}),o0.TimeInterval=o0.timeInterval=void 0,na),u0=m,a0=O;o0.timeInterval=function(i){return void 0===i&&(i=i0.asyncScheduler),u0.operate(function(e,n){var o=i.now();e.subscribe(a0.createOperatorSubscriber(n,function(e){var t=i.now(),r=t-o;o=t,n.next(new s0(e,r))}))})};var s0=function(e,t){this.value=e,this.interval=t},c0=(o0.TimeInterval=s0,{}),l0=(Object.defineProperty(c0,"__esModule",{value:!0}),c0.timeoutWith=void 0,na),f0=hc,p0=Rs;c0.timeoutWith=function(e,t,r){var n,o;if(r=null!=r?r:l0.async,f0.isValidDate(e)?n=e:"number"==typeof e&&(o=e),!t)throw new TypeError("No observable provided to switch to");if(e=function(){return t},null==n&&null==o)throw new TypeError("No timeout provided.");return p0.timeout({first:n,each:o,scheduler:r,with:e})};var hc={},d0=(Object.defineProperty(hc,"__esModule",{value:!0}),hc.timestamp=void 0,u),h0=fl;hc.timestamp=function(t){return void 0===t&&(t=d0.dateTimestampProvider),h0.map(function(e){return{value:e,timestamp:t.now()}})};var u={},b0=(Object.defineProperty(u,"__esModule",{value:!0}),u.window=void 0,f),y0=m,_0=O,v0=v,m0=T;u.window=function(o){return y0.operate(function(e,t){function r(e){n.error(e),t.error(e)}var n=new b0.Subject;t.next(n.asObservable());return e.subscribe(_0.createOperatorSubscriber(t,function(e){return null==n?void 0:n.next(e)},function(){n.complete(),t.complete()},r)),m0.innerFrom(o).subscribe(_0.createOperatorSubscriber(t,function(){n.complete(),t.next(n=new b0.Subject)},v0.noop,r)),function(){null!=n&&n.unsubscribe(),n=null}})};var g0={},O0=r&&r.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},w0=(Object.defineProperty(g0,"__esModule",{value:!0}),g0.windowCount=void 0,f),E0=m,P0=O;g0.windowCount=function(s,e){var c=0<(e=void 0===e?0:e)?e:s;return E0.operate(function(e,i){var u=[new w0.Subject],a=0;i.next(u[0].asObservable()),e.subscribe(P0.createOperatorSubscriber(i,function(e){try{for(var t=O0(u),r=t.next();!r.done;r=t.next())r.value.next(e)}catch(e){n={error:e}}finally{try{r&&!r.done&&(o=t.return)&&o.call(t)}finally{if(n)throw n.error}}var n,o=a-s+1;0<=o&&o%c==0&&u.shift().complete(),++a%c==0&&(n=new w0.Subject,u.push(n),i.next(n.asObservable()))},function(){for(;0<u.length;)u.shift().complete();i.complete()},function(e){for(;0<u.length;)u.shift().error(e);i.error(e)},function(){u=null}))})};var S0={},T0=(Object.defineProperty(S0,"__esModule",{value:!0}),S0.windowTime=void 0,f),j0=na,C0=b,I0=m,R0=O,k0=Q,A0=l,M0=rc;S0.windowTime=function(c){for(var e,t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var l=null!=(e=A0.popScheduler(t))?e:j0.asyncScheduler,f=null!=(e=t[0])?e:null,p=t[1]||1/0;return I0.operate(function(e,n){function r(t){s(function(e){e=e.window;return t(e)}),t(n),n.unsubscribe()}var o=[],i=!1,u=function(e){var t=e.window,r=e.subs;t.complete(),r.unsubscribe(),k0.arrRemove(o,e),i&&a()},a=function(){var e,t,r;o&&(e=new C0.Subscription,n.add(e),t=new T0.Subject,o.push(r={window:t,subs:e,seen:0}),n.next(t.asObservable()),M0.executeSchedule(e,l,function(){return u(r)},c))},s=(null!==f&&0<=f?M0.executeSchedule(n,l,a,f,!0):i=!0,a(),function(e){return o.slice().forEach(e)});return e.subscribe(R0.createOperatorSubscriber(n,function(t){s(function(e){e.window.next(t),p<=++e.seen&&u(e)})},function(){return r(function(e){return e.complete()})},function(t){return r(function(e){return e.error(t)})})),function(){o=null}})};var rc={},N0=r&&r.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},x0=(Object.defineProperty(rc,"__esModule",{value:!0}),rc.windowToggle=void 0,f),D0=b,U0=m,L0=T,F0=O,B0=v,W0=Q;rc.windowToggle=function(t,a){return U0.operate(function(e,o){function i(e){for(;0<u.length;)u.shift().error(e);o.error(e)}var u=[];L0.innerFrom(t).subscribe(F0.createOperatorSubscriber(o,function(e){var t,r=new x0.Subject,n=(u.push(r),new D0.Subscription);try{t=L0.innerFrom(a(e))}catch(e){return void i(e)}o.next(r.asObservable()),n.add(t.subscribe(F0.createOperatorSubscriber(o,function(){W0.arrRemove(u,r),r.complete(),n.unsubscribe()},B0.noop,i)))},B0.noop)),e.subscribe(F0.createOperatorSubscriber(o,function(e){var t,r,n=u.slice();try{for(var o=N0(n),i=o.next();!i.done;i=o.next())i.value.next(e)}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}},function(){for(;0<u.length;)u.shift().complete();o.complete()},i,function(){for(;0<u.length;)u.shift().unsubscribe()}))})};var Q={},z0=(Object.defineProperty(Q,"__esModule",{value:!0}),Q.windowWhen=void 0,f),q0=m,V0=O,H0=T;Q.windowWhen=function(u){return q0.operate(function(e,t){var r,n,o=function(e){r.error(e),t.error(e)},i=function(){var e;null!=n&&n.unsubscribe(),null!=r&&r.complete(),r=new z0.Subject,t.next(r.asObservable());try{e=H0.innerFrom(u())}catch(e){return void o(e)}e.subscribe(n=V0.createOperatorSubscriber(t,i,i,o))};i(),e.subscribe(V0.createOperatorSubscriber(t,function(e){return r.next(e)},function(){r.complete(),t.complete()},o,function(){null!=n&&n.unsubscribe(),r=null}))})};var G0={},Y0=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},K0=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},Z0=(Object.defineProperty(G0,"__esModule",{value:!0}),G0.withLatestFrom=void 0,m),Q0=O,X0=T,J0=S,$0=v,eg=l;G0.withLatestFrom=function(){for(var a=[],e=0;e<arguments.length;e++)a[e]=arguments[e];var s=eg.popResultSelector(a);return Z0.operate(function(e,r){for(var t=a.length,n=new Array(t),o=a.map(function(){return!1}),i=!1,u=0;u<t;u++)!function(t){X0.innerFrom(a[t]).subscribe(Q0.createOperatorSubscriber(r,function(e){n[t]=e,i||o[t]||(o[t]=!0,(i=o.every(J0.identity))&&(o=null))},$0.noop))}(u);e.subscribe(Q0.createOperatorSubscriber(r,function(e){i&&(e=K0([e],Y0(n)),r.next(s?s.apply(void 0,K0([],Y0(e))):e))}))})};var O={},tg=(Object.defineProperty(O,"__esModule",{value:!0}),O.zipAll=void 0,Bp),rg=C;O.zipAll=function(e){return rg.joinAllInternals(tg.zip,e)};var T={},l={},ng=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},og=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},ig=(Object.defineProperty(l,"__esModule",{value:!0}),l.zip=void 0,Bp),ug=m;l.zip=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return ug.operate(function(e,t){ig.zip.apply(void 0,og([e],ng(r))).subscribe(t)})};var ag,sg,cg,lg,fg,pg,dg,hg,bg,yg,_g,vg,mg,gg,Og,wg,Eg,Pg,Sg,Tg,jg,Cg,Ig,Rg,kg,Ag,Mg,Ng,xg,Dg,Ug,Lg,Fg,Bg,Wg,zg,qg,Vg,Hg,Gg,Yg,Kg,Zg,Qg,Xg,Jg,$g,eO,tO,rO,nO,oO,iO,uO,aO,sO,cO,lO,fO,pO,dO,hO,bO,yO,_O,vO,mO,gO,OO,wO,EO,PO,SO,TO,jO,CO,IO,RO,kO,AO,MO,NO,xO,DO,UO,LO,FO,BO,WO,zO,qO,VO,HO,GO,YO,KO,ZO,QO,XO,JO,$O,ew,tw,rw,nw,ow,iw,uw,aw,sw,cw,lw,fw,pw,dw,hw,bw,yw,_w,vw,mw,gw,Ow,ww,Ew,Pw,Sw,Tw,jw,Cw,Iw,Rw,kw,Aw,Mw,Nw,xw,Dw,Uw,Lw,Fw,Bw,Ww,zw,qw,Vw,Hw,Gw,Yw,Kw,Zw,Qw,Xw,Jw,$w,eE,tE,rE,nE,oE,iE,uE,aE,sE,cE,lE,fE,pE,dE=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},hE=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},bE=(Object.defineProperty(T,"__esModule",{value:!0}),T.zipWith=void 0,l);T.zipWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return bE.zip.apply(void 0,hE([],dE(e)))},C=$r,ag=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),m=r&&r.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||ag(t,e,r)},Object.defineProperty(C,"__esModule",{value:!0}),C.interval=C.iif=C.generate=C.fromEventPattern=C.fromEvent=C.from=C.forkJoin=C.empty=C.defer=C.connectable=C.concat=C.combineLatest=C.bindNodeCallback=C.bindCallback=C.UnsubscriptionError=C.TimeoutError=C.SequenceError=C.ObjectUnsubscribedError=C.NotFoundError=C.EmptyError=C.ArgumentOutOfRangeError=C.firstValueFrom=C.lastValueFrom=C.isObservable=C.identity=C.noop=C.pipe=C.NotificationKind=C.Notification=C.Subscriber=C.Subscription=C.Scheduler=C.VirtualAction=C.VirtualTimeScheduler=C.animationFrameScheduler=C.animationFrame=C.queueScheduler=C.queue=C.asyncScheduler=C.async=C.asapScheduler=C.asap=C.AsyncSubject=C.ReplaySubject=C.BehaviorSubject=C.Subject=C.animationFrames=C.observable=C.ConnectableObservable=C.Observable=void 0,C.filter=C.expand=C.exhaustMap=C.exhaustAll=C.exhaust=C.every=C.endWith=C.elementAt=C.distinctUntilKeyChanged=C.distinctUntilChanged=C.distinct=C.dematerialize=C.delayWhen=C.delay=C.defaultIfEmpty=C.debounceTime=C.debounce=C.count=C.connect=C.concatWith=C.concatMapTo=C.concatMap=C.concatAll=C.combineLatestWith=C.combineLatestAll=C.combineAll=C.catchError=C.bufferWhen=C.bufferToggle=C.bufferTime=C.bufferCount=C.buffer=C.auditTime=C.audit=C.config=C.NEVER=C.EMPTY=C.scheduled=C.zip=C.using=C.timer=C.throwError=C.range=C.race=C.partition=C.pairs=C.onErrorResumeNext=C.of=C.never=C.merge=void 0,C.switchMap=C.switchAll=C.subscribeOn=C.startWith=C.skipWhile=C.skipUntil=C.skipLast=C.skip=C.single=C.shareReplay=C.share=C.sequenceEqual=C.scan=C.sampleTime=C.sample=C.refCount=C.retryWhen=C.retry=C.repeatWhen=C.repeat=C.reduce=C.raceWith=C.publishReplay=C.publishLast=C.publishBehavior=C.publish=C.pluck=C.pairwise=C.onErrorResumeNextWith=C.observeOn=C.multicast=C.min=C.mergeWith=C.mergeScan=C.mergeMapTo=C.mergeMap=C.flatMap=C.mergeAll=C.max=C.materialize=C.mapTo=C.map=C.last=C.isEmpty=C.ignoreElements=C.groupBy=C.first=C.findIndex=C.find=C.finalize=void 0,C.zipWith=C.zipAll=C.withLatestFrom=C.windowWhen=C.windowToggle=C.windowTime=C.windowCount=C.window=C.toArray=C.timestamp=C.timeoutWith=C.timeout=C.timeInterval=C.throwIfEmpty=C.throttleTime=C.throttle=C.tap=C.takeWhile=C.takeUntil=C.takeLast=C.take=C.switchScan=C.switchMapTo=void 0,sg=o,Object.defineProperty(C,"Observable",{enumerable:!0,get:function(){return sg.Observable}}),cg=w,Object.defineProperty(C,"ConnectableObservable",{enumerable:!0,get:function(){return cg.ConnectableObservable}}),lg=p,Object.defineProperty(C,"observable",{enumerable:!0,get:function(){return lg.observable}}),fg=g,Object.defineProperty(C,"animationFrames",{enumerable:!0,get:function(){return fg.animationFrames}}),pg=f,Object.defineProperty(C,"Subject",{enumerable:!0,get:function(){return pg.Subject}}),dg=t,Object.defineProperty(C,"BehaviorSubject",{enumerable:!0,get:function(){return dg.BehaviorSubject}}),hg=i,Object.defineProperty(C,"ReplaySubject",{enumerable:!0,get:function(){return hg.ReplaySubject}}),bg=X,Object.defineProperty(C,"AsyncSubject",{enumerable:!0,get:function(){return bg.AsyncSubject}}),yg=Kt,Object.defineProperty(C,"asap",{enumerable:!0,get:function(){return yg.asap}}),Object.defineProperty(C,"asapScheduler",{enumerable:!0,get:function(){return yg.asapScheduler}}),_g=na,Object.defineProperty(C,"async",{enumerable:!0,get:function(){return _g.async}}),Object.defineProperty(C,"asyncScheduler",{enumerable:!0,get:function(){return _g.asyncScheduler}}),vg=Ia,Object.defineProperty(C,"queue",{enumerable:!0,get:function(){return vg.queue}}),Object.defineProperty(C,"queueScheduler",{enumerable:!0,get:function(){return vg.queueScheduler}}),mg=Fa,Object.defineProperty(C,"animationFrame",{enumerable:!0,get:function(){return mg.animationFrame}}),Object.defineProperty(C,"animationFrameScheduler",{enumerable:!0,get:function(){return mg.animationFrameScheduler}}),gg=qa,Object.defineProperty(C,"VirtualTimeScheduler",{enumerable:!0,get:function(){return gg.VirtualTimeScheduler}}),Object.defineProperty(C,"VirtualAction",{enumerable:!0,get:function(){return gg.VirtualAction}}),Og=fa,Object.defineProperty(C,"Scheduler",{enumerable:!0,get:function(){return Og.Scheduler}}),wg=b,Object.defineProperty(C,"Subscription",{enumerable:!0,get:function(){return wg.Subscription}}),Eg=P,Object.defineProperty(C,"Subscriber",{enumerable:!0,get:function(){return Eg.Subscriber}}),Pg=oa,Object.defineProperty(C,"Notification",{enumerable:!0,get:function(){return Pg.Notification}}),Object.defineProperty(C,"NotificationKind",{enumerable:!0,get:function(){return Pg.NotificationKind}}),Sg=n,Object.defineProperty(C,"pipe",{enumerable:!0,get:function(){return Sg.pipe}}),Tg=v,Object.defineProperty(C,"noop",{enumerable:!0,get:function(){return Tg.noop}}),jg=S,Object.defineProperty(C,"identity",{enumerable:!0,get:function(){return jg.identity}}),Cg=Ts,Object.defineProperty(C,"isObservable",{enumerable:!0,get:function(){return Cg.isObservable}}),Ig=ms,Object.defineProperty(C,"lastValueFrom",{enumerable:!0,get:function(){return Ig.lastValueFrom}}),Rg=ws,Object.defineProperty(C,"firstValueFrom",{enumerable:!0,get:function(){return Rg.firstValueFrom}}),kg=Ps,Object.defineProperty(C,"ArgumentOutOfRangeError",{enumerable:!0,get:function(){return kg.ArgumentOutOfRangeError}}),Ag=_s,Object.defineProperty(C,"EmptyError",{enumerable:!0,get:function(){return Ag.EmptyError}}),Mg=Ec,Object.defineProperty(C,"NotFoundError",{enumerable:!0,get:function(){return Mg.NotFoundError}}),Ng=ft,Object.defineProperty(C,"ObjectUnsubscribedError",{enumerable:!0,get:function(){return Ng.ObjectUnsubscribedError}}),xg=lc,Object.defineProperty(C,"SequenceError",{enumerable:!0,get:function(){return xg.SequenceError}}),Dg=Rs,Object.defineProperty(C,"TimeoutError",{enumerable:!0,get:function(){return Dg.TimeoutError}}),Ug=Kr,Object.defineProperty(C,"UnsubscriptionError",{enumerable:!0,get:function(){return Ug.UnsubscriptionError}}),Lg=Ss,Object.defineProperty(C,"bindCallback",{enumerable:!0,get:function(){return Lg.bindCallback}}),Fg=jl,Object.defineProperty(C,"bindNodeCallback",{enumerable:!0,get:function(){return Fg.bindNodeCallback}}),Bg=E,Object.defineProperty(C,"combineLatest",{enumerable:!0,get:function(){return Bg.combineLatest}}),Wg=Gl,Object.defineProperty(C,"concat",{enumerable:!0,get:function(){return Wg.concat}}),zg=pf,Object.defineProperty(C,"connectable",{enumerable:!0,get:function(){return zg.connectable}}),qg=df,Object.defineProperty(C,"defer",{enumerable:!0,get:function(){return qg.defer}}),Vg=ra,Object.defineProperty(C,"empty",{enumerable:!0,get:function(){return Vg.empty}}),Hg=gf,Object.defineProperty(C,"forkJoin",{enumerable:!0,get:function(){return Hg.forkJoin}}),Gg=ds,Object.defineProperty(C,"from",{enumerable:!0,get:function(){return Gg.from}}),Yg=Il,Object.defineProperty(C,"fromEvent",{enumerable:!0,get:function(){return Yg.fromEvent}}),Kg=Nl,Object.defineProperty(C,"fromEventPattern",{enumerable:!0,get:function(){return Kg.fromEventPattern}}),Zg=ys,Object.defineProperty(C,"generate",{enumerable:!0,get:function(){return Zg.generate}}),Qg=yc,Object.defineProperty(C,"iif",{enumerable:!0,get:function(){return Qg.iif}}),Xg=Kf,Object.defineProperty(C,"interval",{enumerable:!0,get:function(){return Xg.interval}}),Jg=ss,Object.defineProperty(C,"merge",{enumerable:!0,get:function(){return Jg.merge}}),$g=sp,Object.defineProperty(C,"never",{enumerable:!0,get:function(){return $g.never}}),eO=s,Object.defineProperty(C,"of",{enumerable:!0,get:function(){return eO.of}}),tO=cp,Object.defineProperty(C,"onErrorResumeNext",{enumerable:!0,get:function(){return tO.onErrorResumeNext}}),rO=_p,Object.defineProperty(C,"pairs",{enumerable:!0,get:function(){return rO.pairs}}),nO=mp,Object.defineProperty(C,"partition",{enumerable:!0,get:function(){return nO.partition}}),oO=jp,Object.defineProperty(C,"race",{enumerable:!0,get:function(){return oO.race}}),iO=Mp,Object.defineProperty(C,"range",{enumerable:!0,get:function(){return iO.range}}),uO=bs,Object.defineProperty(C,"throwError",{enumerable:!0,get:function(){return uO.throwError}}),aO=Zf,Object.defineProperty(C,"timer",{enumerable:!0,get:function(){return aO.timer}}),sO=Dp,Object.defineProperty(C,"using",{enumerable:!0,get:function(){return sO.using}}),cO=Bp,Object.defineProperty(C,"zip",{enumerable:!0,get:function(){return cO.zip}}),lO=hs,Object.defineProperty(C,"scheduled",{enumerable:!0,get:function(){return lO.scheduled}}),fO=ra,Object.defineProperty(C,"EMPTY",{enumerable:!0,get:function(){return fO.EMPTY}}),pO=sp,Object.defineProperty(C,"NEVER",{enumerable:!0,get:function(){return pO.NEVER}}),m(Zp,C),dO=h,Object.defineProperty(C,"config",{enumerable:!0,get:function(){return dO.config}}),hO=Qp,Object.defineProperty(C,"audit",{enumerable:!0,get:function(){return hO.audit}}),bO=ed,Object.defineProperty(C,"auditTime",{enumerable:!0,get:function(){return bO.auditTime}}),yO=od,Object.defineProperty(C,"buffer",{enumerable:!0,get:function(){return yO.buffer}}),_O=cd,Object.defineProperty(C,"bufferCount",{enumerable:!0,get:function(){return _O.bufferCount}}),vO=hd,Object.defineProperty(C,"bufferTime",{enumerable:!0,get:function(){return vO.bufferTime}}),mO=Ed,Object.defineProperty(C,"bufferToggle",{enumerable:!0,get:function(){return mO.bufferToggle}}),gO=kd,Object.defineProperty(C,"bufferWhen",{enumerable:!0,get:function(){return gO.bufferWhen}}),OO=Dd,Object.defineProperty(C,"catchError",{enumerable:!0,get:function(){return OO.catchError}}),wO=Bd,Object.defineProperty(C,"combineAll",{enumerable:!0,get:function(){return wO.combineAll}}),EO=Wd,Object.defineProperty(C,"combineLatestAll",{enumerable:!0,get:function(){return EO.combineLatestAll}}),PO=oh,Object.defineProperty(C,"combineLatestWith",{enumerable:!0,get:function(){return PO.combineLatestWith}}),SO=Yl,Object.defineProperty(C,"concatAll",{enumerable:!0,get:function(){return SO.concatAll}}),TO=ll,Object.defineProperty(C,"concatMap",{enumerable:!0,get:function(){return TO.concatMap}}),jO=gh,Object.defineProperty(C,"concatMapTo",{enumerable:!0,get:function(){return jO.concatMapTo}}),CO=Eh,Object.defineProperty(C,"concatWith",{enumerable:!0,get:function(){return CO.concatWith}}),IO=Nh,Object.defineProperty(C,"connect",{enumerable:!0,get:function(){return IO.connect}}),RO=xh,Object.defineProperty(C,"count",{enumerable:!0,get:function(){return RO.count}}),kO=qh,Object.defineProperty(C,"debounce",{enumerable:!0,get:function(){return kO.debounce}}),AO=I,Object.defineProperty(C,"debounceTime",{enumerable:!0,get:function(){return AO.debounceTime}}),MO=Xh,Object.defineProperty(C,"defaultIfEmpty",{enumerable:!0,get:function(){return MO.defaultIfEmpty}}),NO=eb,Object.defineProperty(C,"delay",{enumerable:!0,get:function(){return NO.delay}}),xO=tb,Object.defineProperty(C,"delayWhen",{enumerable:!0,get:function(){return xO.delayWhen}}),DO=Ob,Object.defineProperty(C,"dematerialize",{enumerable:!0,get:function(){return DO.dematerialize}}),UO=Sb,Object.defineProperty(C,"distinct",{enumerable:!0,get:function(){return UO.distinct}}),LO=Rb,Object.defineProperty(C,"distinctUntilChanged",{enumerable:!0,get:function(){return LO.distinctUntilChanged}}),FO=xb,Object.defineProperty(C,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return FO.distinctUntilKeyChanged}}),BO=Ub,Object.defineProperty(C,"elementAt",{enumerable:!0,get:function(){return BO.elementAt}}),WO=Kb,Object.defineProperty(C,"endWith",{enumerable:!0,get:function(){return WO.endWith}}),zO=$b,Object.defineProperty(C,"every",{enumerable:!0,get:function(){return zO.every}}),qO=ry,Object.defineProperty(C,"exhaust",{enumerable:!0,get:function(){return qO.exhaust}}),VO=ny,Object.defineProperty(C,"exhaustAll",{enumerable:!0,get:function(){return VO.exhaustAll}}),HO=oy,Object.defineProperty(C,"exhaustMap",{enumerable:!0,get:function(){return HO.exhaustMap}}),GO=fy,Object.defineProperty(C,"expand",{enumerable:!0,get:function(){return GO.expand}}),YO=Op,Object.defineProperty(C,"filter",{enumerable:!0,get:function(){return YO.filter}}),KO=hy,Object.defineProperty(C,"finalize",{enumerable:!0,get:function(){return KO.finalize}}),ZO=yy,Object.defineProperty(C,"find",{enumerable:!0,get:function(){return ZO.find}}),QO=gy,Object.defineProperty(C,"findIndex",{enumerable:!0,get:function(){return QO.findIndex}}),XO=Ey,Object.defineProperty(C,"first",{enumerable:!0,get:function(){return XO.first}}),JO=Ry,Object.defineProperty(C,"groupBy",{enumerable:!0,get:function(){return JO.groupBy}}),$O=ub,Object.defineProperty(C,"ignoreElements",{enumerable:!0,get:function(){return $O.ignoreElements}}),ew=Dy,Object.defineProperty(C,"isEmpty",{enumerable:!0,get:function(){return ew.isEmpty}}),tw=Fy,Object.defineProperty(C,"last",{enumerable:!0,get:function(){return tw.last}}),rw=fl,Object.defineProperty(C,"map",{enumerable:!0,get:function(){return rw.map}}),nw=lb,Object.defineProperty(C,"mapTo",{enumerable:!0,get:function(){return nw.mapTo}}),ow=Xy,Object.defineProperty(C,"materialize",{enumerable:!0,get:function(){return ow.materialize}}),iw=t_,Object.defineProperty(C,"max",{enumerable:!0,get:function(){return iw.max}}),uw=Kl,Object.defineProperty(C,"mergeAll",{enumerable:!0,get:function(){return uw.mergeAll}}),aw=o_,Object.defineProperty(C,"flatMap",{enumerable:!0,get:function(){return aw.flatMap}}),sw=Zl,Object.defineProperty(C,"mergeMap",{enumerable:!0,get:function(){return sw.mergeMap}}),cw=i_,Object.defineProperty(C,"mergeMapTo",{enumerable:!0,get:function(){return cw.mergeMapTo}}),lw=s_,Object.defineProperty(C,"mergeScan",{enumerable:!0,get:function(){return lw.mergeScan}}),fw=Ql,Object.defineProperty(C,"mergeWith",{enumerable:!0,get:function(){return fw.mergeWith}}),pw=w_,Object.defineProperty(C,"min",{enumerable:!0,get:function(){return pw.min}}),dw=S_,Object.defineProperty(C,"multicast",{enumerable:!0,get:function(){return dw.multicast}}),hw=_,Object.defineProperty(C,"observeOn",{enumerable:!0,get:function(){return hw.observeOn}}),bw=I_,Object.defineProperty(C,"onErrorResumeNextWith",{enumerable:!0,get:function(){return bw.onErrorResumeNextWith}}),yw=x_,Object.defineProperty(C,"pairwise",{enumerable:!0,get:function(){return yw.pairwise}}),_w=L_,Object.defineProperty(C,"pluck",{enumerable:!0,get:function(){return _w.pluck}}),vw=B_,Object.defineProperty(C,"publish",{enumerable:!0,get:function(){return vw.publish}}),mw=V_,Object.defineProperty(C,"publishBehavior",{enumerable:!0,get:function(){return mw.publishBehavior}}),gw=Y_,Object.defineProperty(C,"publishLast",{enumerable:!0,get:function(){return gw.publishLast}}),Ow=Q_,Object.defineProperty(C,"publishReplay",{enumerable:!0,get:function(){return Ow.publishReplay}}),ww=ev,Object.defineProperty(C,"raceWith",{enumerable:!0,get:function(){return ww.raceWith}}),Ew=qd,Object.defineProperty(C,"reduce",{enumerable:!0,get:function(){return Ew.reduce}}),Pw=uv,Object.defineProperty(C,"repeat",{enumerable:!0,get:function(){return Pw.repeat}}),Sw=pv,Object.defineProperty(C,"repeatWhen",{enumerable:!0,get:function(){return Sw.repeatWhen}}),Tw=_v,Object.defineProperty(C,"retry",{enumerable:!0,get:function(){return Tw.retry}}),jw=Ev,Object.defineProperty(C,"retryWhen",{enumerable:!0,get:function(){return jw.retryWhen}}),Cw=It,Object.defineProperty(C,"refCount",{enumerable:!0,get:function(){return Cw.refCount}}),Iw=Cv,Object.defineProperty(C,"sample",{enumerable:!0,get:function(){return Iw.sample}}),Rw=Mv,Object.defineProperty(C,"sampleTime",{enumerable:!0,get:function(){return Rw.sampleTime}}),kw=Uv,Object.defineProperty(C,"scan",{enumerable:!0,get:function(){return kw.scan}}),Aw=Vd,Object.defineProperty(C,"sequenceEqual",{enumerable:!0,get:function(){return Aw.sequenceEqual}}),Mw=Vv,Object.defineProperty(C,"share",{enumerable:!0,get:function(){return Mw.share}}),Nw=Jv,Object.defineProperty(C,"shareReplay",{enumerable:!0,get:function(){return Nw.shareReplay}}),xw=tm,Object.defineProperty(C,"single",{enumerable:!0,get:function(){return xw.single}}),Dw=am,Object.defineProperty(C,"skip",{enumerable:!0,get:function(){return Dw.skip}}),Uw=cm,Object.defineProperty(C,"skipLast",{enumerable:!0,get:function(){return Uw.skipLast}}),Lw=dm,Object.defineProperty(C,"skipUntil",{enumerable:!0,get:function(){return Lw.skipUntil}}),Fw=vm,Object.defineProperty(C,"skipWhile",{enumerable:!0,get:function(){return Fw.skipWhile}}),Bw=Om,Object.defineProperty(C,"startWith",{enumerable:!0,get:function(){return Bw.startWith}}),Ww=j,Object.defineProperty(C,"subscribeOn",{enumerable:!0,get:function(){return Ww.subscribeOn}}),zw=Sm,Object.defineProperty(C,"switchAll",{enumerable:!0,get:function(){return zw.switchAll}}),qw=Tm,Object.defineProperty(C,"switchMap",{enumerable:!0,get:function(){return qw.switchMap}}),Vw=Am,Object.defineProperty(C,"switchMapTo",{enumerable:!0,get:function(){return Vw.switchMapTo}}),Hw=xm,Object.defineProperty(C,"switchScan",{enumerable:!0,get:function(){return Hw.switchScan}}),Gw=rb,Object.defineProperty(C,"take",{enumerable:!0,get:function(){return Gw.take}}),Yw=By,Object.defineProperty(C,"takeLast",{enumerable:!0,get:function(){return Yw.takeLast}}),Kw=Lm,Object.defineProperty(C,"takeUntil",{enumerable:!0,get:function(){return Kw.takeUntil}}),Zw=qm,Object.defineProperty(C,"takeWhile",{enumerable:!0,get:function(){return Zw.takeWhile}}),Qw=Gm,Object.defineProperty(C,"tap",{enumerable:!0,get:function(){return Qw.tap}}),Xw=y,Object.defineProperty(C,"throttle",{enumerable:!0,get:function(){return Xw.throttle}}),Jw=e0,Object.defineProperty(C,"throttleTime",{enumerable:!0,get:function(){return Jw.throttleTime}}),$w=Lb,Object.defineProperty(C,"throwIfEmpty",{enumerable:!0,get:function(){return $w.throwIfEmpty}}),eE=o0,Object.defineProperty(C,"timeInterval",{enumerable:!0,get:function(){return eE.timeInterval}}),tE=Rs,Object.defineProperty(C,"timeout",{enumerable:!0,get:function(){return tE.timeout}}),rE=c0,Object.defineProperty(C,"timeoutWith",{enumerable:!0,get:function(){return rE.timeoutWith}}),nE=hc,Object.defineProperty(C,"timestamp",{enumerable:!0,get:function(){return nE.timestamp}}),oE=zd,Object.defineProperty(C,"toArray",{enumerable:!0,get:function(){return oE.toArray}}),iE=u,Object.defineProperty(C,"window",{enumerable:!0,get:function(){return iE.window}}),uE=g0,Object.defineProperty(C,"windowCount",{enumerable:!0,get:function(){return uE.windowCount}}),aE=S0,Object.defineProperty(C,"windowTime",{enumerable:!0,get:function(){return aE.windowTime}}),sE=rc,Object.defineProperty(C,"windowToggle",{enumerable:!0,get:function(){return sE.windowToggle}}),cE=Q,Object.defineProperty(C,"windowWhen",{enumerable:!0,get:function(){return cE.windowWhen}}),lE=G0,Object.defineProperty(C,"withLatestFrom",{enumerable:!0,get:function(){return lE.withLatestFrom}}),fE=O,Object.defineProperty(C,"zipAll",{enumerable:!0,get:function(){return fE.zipAll}}),pE=T,Object.defineProperty(C,"zipWith",{enumerable:!0,get:function(){return pE.zipWith}});var o={},w={},yE=(Object.defineProperty(w,"__esModule",{value:!0}),w.partition=void 0,gp),_E=Op;w.partition=function(t,r){return function(e){return[_E.filter(t,r)(e),_E.filter(yE.not(t,r))(e)]}};var vE,mE,gE,OE,wE,EE,PE,SE,TE,jE,CE,IE,RE,kE,AE,ME,NE,xE,DE,UE,LE,FE,BE,WE,zE,qE,VE,HE,GE,YE,KE,ZE,QE,XE,JE,$E,eP,tP,rP,nP,oP,iP,uP,aP,sP,cP,lP,fP,pP,dP,hP,bP,yP,_P,vP,mP,gP,OP,wP,EP,PP,SP,TP,jP,CP,IP,RP,kP,AP,MP,NP,xP,DP,UP,LP,FP,BP,WP,zP,qP,VP,HP,GP,YP,KP,ZP,QP,XP,JP,$P,eS,tS,rS,nS,oS,iS,uS,aS,sS,cS,lS,fS,pS,dS,hS,bS,yS,_S,vS,mS,gS,OS,wS,p={},ES=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},PS=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},SS=(Object.defineProperty(p,"__esModule",{value:!0}),p.race=void 0,lp),TS=ev;p.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return TS.raceWith.apply(void 0,PS([],ES(SS.argsOrArgArray(e))))},g=o,Object.defineProperty(g,"__esModule",{value:!0}),g.mergeAll=g.merge=g.max=g.materialize=g.mapTo=g.map=g.last=g.isEmpty=g.ignoreElements=g.groupBy=g.first=g.findIndex=g.find=g.finalize=g.filter=g.expand=g.exhaustMap=g.exhaustAll=g.exhaust=g.every=g.endWith=g.elementAt=g.distinctUntilKeyChanged=g.distinctUntilChanged=g.distinct=g.dematerialize=g.delayWhen=g.delay=g.defaultIfEmpty=g.debounceTime=g.debounce=g.count=g.connect=g.concatWith=g.concatMapTo=g.concatMap=g.concatAll=g.concat=g.combineLatestWith=g.combineLatest=g.combineLatestAll=g.combineAll=g.catchError=g.bufferWhen=g.bufferToggle=g.bufferTime=g.bufferCount=g.buffer=g.auditTime=g.audit=void 0,g.timeInterval=g.throwIfEmpty=g.throttleTime=g.throttle=g.tap=g.takeWhile=g.takeUntil=g.takeLast=g.take=g.switchScan=g.switchMapTo=g.switchMap=g.switchAll=g.subscribeOn=g.startWith=g.skipWhile=g.skipUntil=g.skipLast=g.skip=g.single=g.shareReplay=g.share=g.sequenceEqual=g.scan=g.sampleTime=g.sample=g.refCount=g.retryWhen=g.retry=g.repeatWhen=g.repeat=g.reduce=g.raceWith=g.race=g.publishReplay=g.publishLast=g.publishBehavior=g.publish=g.pluck=g.partition=g.pairwise=g.onErrorResumeNext=g.observeOn=g.multicast=g.min=g.mergeWith=g.mergeScan=g.mergeMapTo=g.mergeMap=g.flatMap=void 0,g.zipWith=g.zipAll=g.zip=g.withLatestFrom=g.windowWhen=g.windowToggle=g.windowTime=g.windowCount=g.window=g.toArray=g.timestamp=g.timeoutWith=g.timeout=void 0,vE=Qp,Object.defineProperty(g,"audit",{enumerable:!0,get:function(){return vE.audit}}),mE=ed,Object.defineProperty(g,"auditTime",{enumerable:!0,get:function(){return mE.auditTime}}),gE=od,Object.defineProperty(g,"buffer",{enumerable:!0,get:function(){return gE.buffer}}),OE=cd,Object.defineProperty(g,"bufferCount",{enumerable:!0,get:function(){return OE.bufferCount}}),wE=hd,Object.defineProperty(g,"bufferTime",{enumerable:!0,get:function(){return wE.bufferTime}}),EE=Ed,Object.defineProperty(g,"bufferToggle",{enumerable:!0,get:function(){return EE.bufferToggle}}),PE=kd,Object.defineProperty(g,"bufferWhen",{enumerable:!0,get:function(){return PE.bufferWhen}}),SE=Dd,Object.defineProperty(g,"catchError",{enumerable:!0,get:function(){return SE.catchError}}),TE=Bd,Object.defineProperty(g,"combineAll",{enumerable:!0,get:function(){return TE.combineAll}}),jE=Wd,Object.defineProperty(g,"combineLatestAll",{enumerable:!0,get:function(){return jE.combineLatestAll}}),CE=ih,Object.defineProperty(g,"combineLatest",{enumerable:!0,get:function(){return CE.combineLatest}}),IE=oh,Object.defineProperty(g,"combineLatestWith",{enumerable:!0,get:function(){return IE.combineLatestWith}}),RE=Ph,Object.defineProperty(g,"concat",{enumerable:!0,get:function(){return RE.concat}}),kE=Yl,Object.defineProperty(g,"concatAll",{enumerable:!0,get:function(){return kE.concatAll}}),AE=ll,Object.defineProperty(g,"concatMap",{enumerable:!0,get:function(){return AE.concatMap}}),ME=gh,Object.defineProperty(g,"concatMapTo",{enumerable:!0,get:function(){return ME.concatMapTo}}),NE=Eh,Object.defineProperty(g,"concatWith",{enumerable:!0,get:function(){return NE.concatWith}}),xE=Nh,Object.defineProperty(g,"connect",{enumerable:!0,get:function(){return xE.connect}}),DE=xh,Object.defineProperty(g,"count",{enumerable:!0,get:function(){return DE.count}}),UE=qh,Object.defineProperty(g,"debounce",{enumerable:!0,get:function(){return UE.debounce}}),LE=I,Object.defineProperty(g,"debounceTime",{enumerable:!0,get:function(){return LE.debounceTime}}),FE=Xh,Object.defineProperty(g,"defaultIfEmpty",{enumerable:!0,get:function(){return FE.defaultIfEmpty}}),BE=eb,Object.defineProperty(g,"delay",{enumerable:!0,get:function(){return BE.delay}}),WE=tb,Object.defineProperty(g,"delayWhen",{enumerable:!0,get:function(){return WE.delayWhen}}),zE=Ob,Object.defineProperty(g,"dematerialize",{enumerable:!0,get:function(){return zE.dematerialize}}),qE=Sb,Object.defineProperty(g,"distinct",{enumerable:!0,get:function(){return qE.distinct}}),VE=Rb,Object.defineProperty(g,"distinctUntilChanged",{enumerable:!0,get:function(){return VE.distinctUntilChanged}}),HE=xb,Object.defineProperty(g,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return HE.distinctUntilKeyChanged}}),GE=Ub,Object.defineProperty(g,"elementAt",{enumerable:!0,get:function(){return GE.elementAt}}),YE=Kb,Object.defineProperty(g,"endWith",{enumerable:!0,get:function(){return YE.endWith}}),KE=$b,Object.defineProperty(g,"every",{enumerable:!0,get:function(){return KE.every}}),ZE=ry,Object.defineProperty(g,"exhaust",{enumerable:!0,get:function(){return ZE.exhaust}}),QE=ny,Object.defineProperty(g,"exhaustAll",{enumerable:!0,get:function(){return QE.exhaustAll}}),XE=oy,Object.defineProperty(g,"exhaustMap",{enumerable:!0,get:function(){return XE.exhaustMap}}),JE=fy,Object.defineProperty(g,"expand",{enumerable:!0,get:function(){return JE.expand}}),$E=Op,Object.defineProperty(g,"filter",{enumerable:!0,get:function(){return $E.filter}}),eP=hy,Object.defineProperty(g,"finalize",{enumerable:!0,get:function(){return eP.finalize}}),tP=yy,Object.defineProperty(g,"find",{enumerable:!0,get:function(){return tP.find}}),rP=gy,Object.defineProperty(g,"findIndex",{enumerable:!0,get:function(){return rP.findIndex}}),nP=Ey,Object.defineProperty(g,"first",{enumerable:!0,get:function(){return nP.first}}),oP=Ry,Object.defineProperty(g,"groupBy",{enumerable:!0,get:function(){return oP.groupBy}}),iP=ub,Object.defineProperty(g,"ignoreElements",{enumerable:!0,get:function(){return iP.ignoreElements}}),uP=Dy,Object.defineProperty(g,"isEmpty",{enumerable:!0,get:function(){return uP.isEmpty}}),aP=Fy,Object.defineProperty(g,"last",{enumerable:!0,get:function(){return aP.last}}),sP=fl,Object.defineProperty(g,"map",{enumerable:!0,get:function(){return sP.map}}),cP=lb,Object.defineProperty(g,"mapTo",{enumerable:!0,get:function(){return cP.mapTo}}),lP=Xy,Object.defineProperty(g,"materialize",{enumerable:!0,get:function(){return lP.materialize}}),fP=t_,Object.defineProperty(g,"max",{enumerable:!0,get:function(){return fP.max}}),pP=f_,Object.defineProperty(g,"merge",{enumerable:!0,get:function(){return pP.merge}}),dP=Kl,Object.defineProperty(g,"mergeAll",{enumerable:!0,get:function(){return dP.mergeAll}}),hP=o_,Object.defineProperty(g,"flatMap",{enumerable:!0,get:function(){return hP.flatMap}}),bP=Zl,Object.defineProperty(g,"mergeMap",{enumerable:!0,get:function(){return bP.mergeMap}}),yP=i_,Object.defineProperty(g,"mergeMapTo",{enumerable:!0,get:function(){return yP.mergeMapTo}}),_P=s_,Object.defineProperty(g,"mergeScan",{enumerable:!0,get:function(){return _P.mergeScan}}),vP=Ql,Object.defineProperty(g,"mergeWith",{enumerable:!0,get:function(){return vP.mergeWith}}),mP=w_,Object.defineProperty(g,"min",{enumerable:!0,get:function(){return mP.min}}),gP=S_,Object.defineProperty(g,"multicast",{enumerable:!0,get:function(){return gP.multicast}}),OP=_,Object.defineProperty(g,"observeOn",{enumerable:!0,get:function(){return OP.observeOn}}),wP=I_,Object.defineProperty(g,"onErrorResumeNext",{enumerable:!0,get:function(){return wP.onErrorResumeNext}}),EP=x_,Object.defineProperty(g,"pairwise",{enumerable:!0,get:function(){return EP.pairwise}}),PP=w,Object.defineProperty(g,"partition",{enumerable:!0,get:function(){return PP.partition}}),SP=L_,Object.defineProperty(g,"pluck",{enumerable:!0,get:function(){return SP.pluck}}),TP=B_,Object.defineProperty(g,"publish",{enumerable:!0,get:function(){return TP.publish}}),jP=V_,Object.defineProperty(g,"publishBehavior",{enumerable:!0,get:function(){return jP.publishBehavior}}),CP=Y_,Object.defineProperty(g,"publishLast",{enumerable:!0,get:function(){return CP.publishLast}}),IP=Q_,Object.defineProperty(g,"publishReplay",{enumerable:!0,get:function(){return IP.publishReplay}}),RP=p,Object.defineProperty(g,"race",{enumerable:!0,get:function(){return RP.race}}),kP=ev,Object.defineProperty(g,"raceWith",{enumerable:!0,get:function(){return kP.raceWith}}),AP=qd,Object.defineProperty(g,"reduce",{enumerable:!0,get:function(){return AP.reduce}}),MP=uv,Object.defineProperty(g,"repeat",{enumerable:!0,get:function(){return MP.repeat}}),NP=pv,Object.defineProperty(g,"repeatWhen",{enumerable:!0,get:function(){return NP.repeatWhen}}),xP=_v,Object.defineProperty(g,"retry",{enumerable:!0,get:function(){return xP.retry}}),DP=Ev,Object.defineProperty(g,"retryWhen",{enumerable:!0,get:function(){return DP.retryWhen}}),UP=It,Object.defineProperty(g,"refCount",{enumerable:!0,get:function(){return UP.refCount}}),LP=Cv,Object.defineProperty(g,"sample",{enumerable:!0,get:function(){return LP.sample}}),FP=Mv,Object.defineProperty(g,"sampleTime",{enumerable:!0,get:function(){return FP.sampleTime}}),BP=Uv,Object.defineProperty(g,"scan",{enumerable:!0,get:function(){return BP.scan}}),WP=Vd,Object.defineProperty(g,"sequenceEqual",{enumerable:!0,get:function(){return WP.sequenceEqual}}),zP=Vv,Object.defineProperty(g,"share",{enumerable:!0,get:function(){return zP.share}}),qP=Jv,Object.defineProperty(g,"shareReplay",{enumerable:!0,get:function(){return qP.shareReplay}}),VP=tm,Object.defineProperty(g,"single",{enumerable:!0,get:function(){return VP.single}}),HP=am,Object.defineProperty(g,"skip",{enumerable:!0,get:function(){return HP.skip}}),GP=cm,Object.defineProperty(g,"skipLast",{enumerable:!0,get:function(){return GP.skipLast}}),YP=dm,Object.defineProperty(g,"skipUntil",{enumerable:!0,get:function(){return YP.skipUntil}}),KP=vm,Object.defineProperty(g,"skipWhile",{enumerable:!0,get:function(){return KP.skipWhile}}),ZP=Om,Object.defineProperty(g,"startWith",{enumerable:!0,get:function(){return ZP.startWith}}),QP=j,Object.defineProperty(g,"subscribeOn",{enumerable:!0,get:function(){return QP.subscribeOn}}),XP=Sm,Object.defineProperty(g,"switchAll",{enumerable:!0,get:function(){return XP.switchAll}}),JP=Tm,Object.defineProperty(g,"switchMap",{enumerable:!0,get:function(){return JP.switchMap}}),$P=Am,Object.defineProperty(g,"switchMapTo",{enumerable:!0,get:function(){return $P.switchMapTo}}),eS=xm,Object.defineProperty(g,"switchScan",{enumerable:!0,get:function(){return eS.switchScan}}),tS=rb,Object.defineProperty(g,"take",{enumerable:!0,get:function(){return tS.take}}),rS=By,Object.defineProperty(g,"takeLast",{enumerable:!0,get:function(){return rS.takeLast}}),nS=Lm,Object.defineProperty(g,"takeUntil",{enumerable:!0,get:function(){return nS.takeUntil}}),oS=qm,Object.defineProperty(g,"takeWhile",{enumerable:!0,get:function(){return oS.takeWhile}}),iS=Gm,Object.defineProperty(g,"tap",{enumerable:!0,get:function(){return iS.tap}}),uS=y,Object.defineProperty(g,"throttle",{enumerable:!0,get:function(){return uS.throttle}}),aS=e0,Object.defineProperty(g,"throttleTime",{enumerable:!0,get:function(){return aS.throttleTime}}),sS=Lb,Object.defineProperty(g,"throwIfEmpty",{enumerable:!0,get:function(){return sS.throwIfEmpty}}),cS=o0,Object.defineProperty(g,"timeInterval",{enumerable:!0,get:function(){return cS.timeInterval}}),lS=Rs,Object.defineProperty(g,"timeout",{enumerable:!0,get:function(){return lS.timeout}}),fS=c0,Object.defineProperty(g,"timeoutWith",{enumerable:!0,get:function(){return fS.timeoutWith}}),pS=hc,Object.defineProperty(g,"timestamp",{enumerable:!0,get:function(){return pS.timestamp}}),dS=zd,Object.defineProperty(g,"toArray",{enumerable:!0,get:function(){return dS.toArray}}),hS=u,Object.defineProperty(g,"window",{enumerable:!0,get:function(){return hS.window}}),bS=g0,Object.defineProperty(g,"windowCount",{enumerable:!0,get:function(){return bS.windowCount}}),yS=S0,Object.defineProperty(g,"windowTime",{enumerable:!0,get:function(){return yS.windowTime}}),_S=rc,Object.defineProperty(g,"windowToggle",{enumerable:!0,get:function(){return _S.windowToggle}}),vS=Q,Object.defineProperty(g,"windowWhen",{enumerable:!0,get:function(){return vS.windowWhen}}),mS=G0,Object.defineProperty(g,"withLatestFrom",{enumerable:!0,get:function(){return mS.withLatestFrom}}),gS=l,Object.defineProperty(g,"zip",{enumerable:!0,get:function(){return gS.zip}}),OS=O,Object.defineProperty(g,"zipAll",{enumerable:!0,get:function(){return OS.zipAll}}),wS=T,Object.defineProperty(g,"zipWith",{enumerable:!0,get:function(){return wS.zipWith}});var f={},jS=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},CS=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},IS=(Object.defineProperty(f,"__esModule",{value:!0}),e),RS=$r,kS=o,AS=0,MS=1,NS=2;function xS(e,t){e=e.pipe((0,kS.publishReplay)(1),(0,kS.refCount)());this._result=e,this._keys=e.pipe((0,kS.mergeMap)(function(e){return(0,RS.from)(e.keys())}),(0,kS.publishReplay)(1),(0,kS.refCount)()),this._records=void 0,this._controls=new DS,this._summary=new RS.ReplaySubject,this._state=t||AS}xS.prototype.keys=function(){return this._keys},xS.prototype.records=function(){var r=this,e=this._result.pipe((0,kS.mergeMap)(function(t){return new RS.Observable(function(e){return r._startStreaming({result:t,recordsObserver:e})})}));return e.push=function(){return r._push()},e},xS.prototype.consume=function(){var r=this;return this._result.pipe((0,kS.mergeMap)(function(t){return new RS.Observable(function(e){return r._startStreaming({result:t,summaryObserver:e})})}))},xS.prototype.pause=function(){this._controls.pause()},xS.prototype.resume=function(){return this._controls.resume()},xS.prototype.push=function(){return this._controls.push()},xS.prototype._startStreaming=function(e){var e=void 0===e?{}:e,t=e.result,r=e.recordsObserver,r=void 0===r?null:r,e=e.summaryObserver,e=void 0===e?null:e,n=[];return e&&n.push(this._summary.subscribe(e)),this._state<MS?(this._state=MS,this._setupRecordsStream(t),r?n.push(this._records.subscribe(r)):t._cancel(),n.push({unsubscribe:function(){t._cancel&&t._cancel()}})):r&&r.error((0,IS.newError)("Streaming has already started/consumed with a previous records or summary subscription.")),function(){n.forEach(function(e){return e.unsubscribe()})}},xS.prototype._toObservable=function(){var n=this;return new RS.Observable(function(r){n._result.subscribe({complete:function(){return r.complete()},next:function(e){return r.next(new xS((t=e,new RS.Observable(function(e){e.next(t),e.complete()}))),n._state);var t},error:function(e){return r.error(e)}})})},xS.prototype._setupRecordsStream=function(n){var t=this;return this._records||(this._records=function(o,i,u){var e=this;void 0===u&&(u=new DS);var a=new RS.Subject,s=function(n){return jS(e,void 0,void 0,function(){var t,r;return CS(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,3,4]),u.pushing=!0,[4,n];case 1:return t=e.sent(),r=t.done,t=t.value,r?(a.complete(),i.complete()):(a.next(t),u.paused||s(o.next()).catch(function(){})),[3,4];case 2:return r=e.sent(),a.error(r),i.error(r),[3,4];case 3:return u.pushing=!1,[7];case 4:return[2]}})})};function t(t){return jS(this,void 0,void 0,function(){return CS(this,function(e){switch(e.label){case 0:return[4,s(o.next(t))];case 1:return e.sent(),[2]}})})}return(u.pusher=t)(),a}(n[Symbol.asyncIterator](),{complete:function(){return jS(t,void 0,void 0,function(){var t,r;return CS(this,function(e){switch(e.label){case 0:return this._state=NS,r=(t=this._summary).next,[4,n.summary()];case 1:return r.apply(t,[e.sent()]),this._summary.complete(),[2]}})})},error:function(e){t._state=NS,t._summary.error(e)}},this._controls),this._records)},f.default=xS;US.prototype.pause=function(){this._paused=!0},Object.defineProperty(US.prototype,"paused",{get:function(){return this._paused},enumerable:!1,configurable:!0}),Object.defineProperty(US.prototype,"pushing",{get:function(){return this._pushing},set:function(e){this._pushing=e},enumerable:!1,configurable:!0}),US.prototype.resume=function(){return jS(this,void 0,void 0,function(){var t;return CS(this,function(e){switch(e.label){case 0:return t=this._paused,this._paused=!1,!t||this._pushing?[3,2]:[4,this._push()];case 1:e.sent(),e.label=2;case 2:return[2]}})})},US.prototype.push=function(){return jS(this,void 0,void 0,function(){return CS(this,function(e){switch(e.label){case 0:return this.pause(),[4,this._push()];case 1:return[2,e.sent()]}})})},Object.defineProperty(US.prototype,"pusher",{get:function(){return this._push},set:function(e){this._push=e},enumerable:!1,configurable:!0});var DS=US;function US(e){void 0===e&&(e=function(){return jS(t,void 0,void 0,function(){return CS(this,function(e){return[2]})})});var t=this;this._paused=!1,this._pushing=!1,this._push=e}var t={},i=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},LS=(Object.defineProperty(t,"__esModule",{value:!0}),$r),FS=i(f);function BS(e){this._txc=e}i(e),BS.prototype.run=function(e,r){var n=this;return new FS.default(new LS.Observable(function(t){try{t.next(n._txc.run(e,r)),t.complete()}catch(e){t.error(e)}return function(){}}))},BS.prototype.commit=function(){var e=this;return new LS.Observable(function(t){e._txc.commit().then(function(){t.complete()}).catch(function(e){return t.error(e)})})},BS.prototype.rollback=function(){var e=this;return new LS.Observable(function(t){e._txc.rollback().then(function(){t.complete()}).catch(function(e){return t.error(e)})})},BS.prototype.isOpen=function(){return this._txc.isOpen()},BS.prototype.close=function(){var e=this;return new LS.Observable(function(t){e._txc.close().then(function(){t.complete()}).catch(function(e){return t.error(e)})})},t.default=BS;X={},Kt=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};function WS(e){e=e.run;this._run=e}Object.defineProperty(X,"__esModule",{value:!0}),Kt(f),Kt(t),WS.fromTransaction=function(e){return new WS({run:e.run.bind(e)})},WS.prototype.run=function(e,t){return this._run(e,t)},X.default=WS;var na={},zS=(Object.defineProperty(na,"__esModule",{value:!0}),e),qS=$r,VS=o,HS=(zS.internal.logger.Logger,zS.error.SERVICE_UNAVAILABLE);function GS(e){var e=void 0===e?{}:e,t=e.maxRetryTimeout,r=e.initialDelay,r=void 0===r?1e3:r,n=e.delayMultiplier,n=void 0===n?2:n,o=e.delayJitter,o=void 0===o?.2:o,e=e.logger,e=void 0===e?null:e;this._maxRetryTimeout=YS(void 0===t?3e4:t,3e4),this._initialDelay=YS(r,1e3),this._delayMultiplier=YS(n,2),this._delayJitter=YS(o,.2),this._logger=e}function YS(e,t){return e||0===e?e:t}GS.prototype.retry=function(e){var a=this;return e.pipe((0,VS.retryWhen)(function(e){var n=[],o=Date.now(),i=1,u=a._initialDelay;return e.pipe((0,VS.mergeMap)(function(e){if(!(0,zS.isRetriableError)(e))return(0,qS.throwError)(function(){return e});var t;if(n.push(e),2<=i&&Date.now()-o>=a._maxRetryTimeout)return(t=(0,zS.newError)("Failed after retried for ".concat(i," times in ").concat(a._maxRetryTimeout," ms. Make sure that your database is online and retry again."),HS)).seenErrors=n,(0,qS.throwError)(function(){return t});var r=a._computeNextDelay(u);return u*=a._delayMultiplier,i++,a._logger&&a._logger.warn("Transaction failed and will be retried in ".concat(r)),(0,qS.of)(1).pipe((0,VS.delay)(r))}))}))},GS.prototype._computeNextDelay=function(e){var t=e*this._delayJitter;return e-t+2*t*Math.random()},na.default=GS;var Ia=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},KS=(Object.defineProperty(lr,"__esModule",{value:!0}),$r),ZS=o,QS=Ia(f),Fa=e,XS=Ia(t),JS=Ia(X),$S=Ia(na),qa=Fa.internal.constants,eT=qa.ACCESS_MODE_READ,tT=qa.ACCESS_MODE_WRITE,rT=qa.TELEMETRY_APIS,nT=Fa.internal.txConfig.TxConfig;function oT(e){var e=void 0===e?{}:e,t=e.session,r=e.config,e=e.log;this._session=t,this._retryLogic=function(e){e=e&&e.maxTransactionRetryTime?e.maxTransactionRetryTime:null;return new $S.default({maxRetryTimeout:e})}(r),this._log=e}oT.prototype.run=function(e,r,n){var o=this;return new QS.default(new KS.Observable(function(t){try{t.next(o._session.run(e,r,n)),t.complete()}catch(e){t.error(e)}return function(){}}))},oT.prototype.beginTransaction=function(e){return this._beginTransaction(this._session._mode,e,{api:rT.UNMANAGED_TRANSACTION})},oT.prototype.readTransaction=function(e,t){return this._runTransaction(eT,e,t)},oT.prototype.writeTransaction=function(e,t){return this._runTransaction(tT,e,t)},oT.prototype.executeRead=function(e,t){return this._executeInTransaction(eT,e,t)},oT.prototype.executeWrite=function(e,t){return this._executeInTransaction(tT,e,t)},oT.prototype._executeInTransaction=function(e,t,r){return this._runTransaction(e,t,r,function(e){return new JS.default({run:e.run.bind(e)})})},oT.prototype.close=function(){var e=this;return new KS.Observable(function(t){e._session.close().then(function(){t.complete()}).catch(function(e){return t.error(e)})})},oT.prototype[Symbol.asyncDispose]=function(){return this.close()},oT.prototype.lastBookmark=function(){return this.lastBookmarks()},oT.prototype.lastBookmarks=function(){return this._session.lastBookmarks()},oT.prototype._beginTransaction=function(e,t,r){var n=this,o=nT.empty();return t&&(o=new nT(t,this._log)),new KS.Observable(function(t){try{n._session._beginTransaction(e,o,r).then(function(e){t.next(new XS.default(e)),t.complete()}).catch(function(e){return t.error(e)})}catch(e){t.error(e)}return function(){}})},oT.prototype._runTransaction=function(e,r,t,n){var o=this,i=(void 0===n&&(n=function(e){return e}),nT.empty()),u=(t&&(i=new nT(t)),{apiTelemetryConfig:{api:rT.MANAGED_TRANSACTION,onTelemetrySuccess:function(){u.apiTelemetryConfig=void 0}}});return this._retryLogic.retry((0,KS.of)(1).pipe((0,ZS.mergeMap)(function(){return o._beginTransaction(e,i,u.apiTelemetryConfig)}),(0,ZS.mergeMap)(function(t){return(0,KS.defer)(function(){try{return r(n(t))}catch(e){return(0,KS.throwError)(function(){return e})}}).pipe((0,ZS.catchError)(function(e){return t.rollback().pipe((0,ZS.concatWith)((0,KS.throwError)(function(){return e})))}),(0,ZS.concatWith)(t.commit()))})))},lr.default=oT;var iT,uT,fa=r&&r.__extends||(iT=function(e,t){return(iT=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}iT(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),b=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},P=(Object.defineProperty(B,"__esModule",{value:!0}),B.WRITE=B.READ=B.Driver=void 0,e),aT=b(lr),sT=P.internal.constants.FETCH_ALL,oa=P.driver.READ,cT=P.driver.WRITE,n=(B.READ=oa,B.WRITE=cT,fa(lT,uT=P.Driver),lT.prototype.rxSession=function(e){var e=void 0===e?{}:e,t=e.defaultAccessMode,r=e.bookmarks,n=e.database,o=e.fetchSize,i=e.impersonatedUser,u=e.bookmarkManager,a=e.notificationFilter,e=e.auth;return new aT.default({session:this._newSession({defaultAccessMode:void 0===t?cT:t,bookmarkOrBookmarks:r,database:void 0===n?"":n,impersonatedUser:i,auth:e,reactive:!1,fetchSize:function(e,t){e=parseInt(e,10);{if(0<e||e===sT)return e;if(0===e||e<0)throw new Error("The fetch size can only be a positive value or ".concat(sT," for ALL. However fetchSize = ").concat(e));return t}}(o,this._config.fetchSize),bookmarkManager:u,notificationFilter:a,log:this._log}),config:this._config,log:this._log})},lT);function lT(){return null!==uT&&uT.apply(this,arguments)||this}B.Driver=n,B.default=n;v={},Object.defineProperty(v,"__esModule",{value:!0}),v.default="5.16.0",S={},Ts={},ms={};function fT(){}Object.defineProperty(ms,"__esModule",{value:!0}),fT.prototype.selectReader=function(e){throw new Error("Abstract function")},fT.prototype.selectWriter=function(e){throw new Error("Abstract function")},ms.default=fT;ws={},Ps={};function pT(e){this._offset=e||0}Object.defineProperty(Ps,"__esModule",{value:!0}),pT.prototype.next=function(e){if(0===e)return-1;var t=this._offset;return this._offset+=1,this._offset===Number.MAX_SAFE_INTEGER&&(this._offset=0),t%e},Ps.default=pT;var dT,hT,_s=r&&r.__extends||(dT=function(e,t){return(dT=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}dT(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Ec=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},bT=(Object.defineProperty(ws,"__esModule",{value:!0}),Ec(Ps)),ft=Ec(ms),lc=(hT=ft.default,_s(yT,hT),yT.prototype.selectReader=function(e){return this._select(e,this._readersIndex)},yT.prototype.selectWriter=function(e){return this._select(e,this._writersIndex)},yT.prototype._select=function(e,t){var r=e.length;if(0===r)return null;var n=t.next(r),o=n,i=null,u=Number.MAX_SAFE_INTEGER;do{var a=e[o],s=this._connectionPool.activeResourceCount(a)}while(s<u&&(i=a,u=s),o===r-1?o=0:o++,o!==n);return i},yT);function yT(e){var t=hT.call(this)||this;return t._readersIndex=new bT.default,t._writersIndex=new bT.default,t._connectionPool=e,t}ws.default=lc;Kr=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(Ts,"__esModule",{value:!0}),Ts.LeastConnectedLoadBalancingStrategy=Ts.LoadBalancingStrategy=void 0,Ss=Kr(ms),Ts.LoadBalancingStrategy=Ss.default,jl=Kr(ws),Ts.LeastConnectedLoadBalancingStrategy=jl.default,Ts.default=jl.default,E={},Gl={},pf={},df={},gf={},ds={},Il={},Nl={byteLength:function(e){var e=ET(e),t=e[0],e=e[1];return 3*(t+e)/4-e}};Nl.toByteArray=function(e){var t,r,n=ET(e),o=n[0],n=n[1],i=new mT(function(e,t){return 3*(e+t)/4-t}(o,n)),u=0,a=0<n?o-4:o;for(r=0;r<a;r+=4)t=vT[e.charCodeAt(r)]<<18|vT[e.charCodeAt(r+1)]<<12|vT[e.charCodeAt(r+2)]<<6|vT[e.charCodeAt(r+3)],i[u++]=t>>16&255,i[u++]=t>>8&255,i[u++]=255&t;2===n&&(t=vT[e.charCodeAt(r)]<<2|vT[e.charCodeAt(r+1)]>>4,i[u++]=255&t);1===n&&(t=vT[e.charCodeAt(r)]<<10|vT[e.charCodeAt(r+1)]<<4|vT[e.charCodeAt(r+2)]>>2,i[u++]=t>>8&255,i[u++]=255&t);return i},Nl.fromByteArray=function(e){for(var t,r=e.length,n=r%3,o=[],i=0,u=r-n;i<u;i+=16383)o.push(function(e,t,r){for(var n,o=[],i=t;i<r;i+=3)n=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(255&e[i+2]),o.push(function(e){return _T[e>>18&63]+_T[e>>12&63]+_T[e>>6&63]+_T[63&e]}(n));return o.join("")}(e,i,u<i+16383?u:i+16383));1==n?(t=e[r-1],o.push(_T[t>>2]+_T[t<<4&63]+"==")):2==n&&(t=(e[r-2]<<8)+e[r-1],o.push(_T[t>>10]+_T[t>>4&63]+_T[t<<2&63]+"="));return o.join("")};for(var _T=[],vT=[],mT="undefined"!=typeof Uint8Array?Uint8Array:Array,gT="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",OT=0,wT=gT.length;OT<wT;++OT)_T[OT]=gT[OT],vT[gT.charCodeAt(OT)]=OT;function ET(e){var t=e.length;if(0<t%4)throw new Error("Invalid string. Length must be a multiple of 4");e=e.indexOf("="),t=(e=-1===e?t:e)===t?0:4-e%4;return[e,t]}vT["-".charCodeAt(0)]=62,vT["_".charCodeAt(0)]=63;ys={read:function(e,t,r,n,o){var i,u,a=8*o-n-1,s=(1<<a)-1,c=s>>1,l=-7,f=r?o-1:0,p=r?-1:1,o=e[t+f];for(f+=p,i=o&(1<<-l)-1,o>>=-l,l+=a;0<l;i=256*i+e[t+f],f+=p,l-=8);for(u=i&(1<<-l)-1,i>>=-l,l+=n;0<l;u=256*u+e[t+f],f+=p,l-=8);if(0===i)i=1-c;else{if(i===s)return u?NaN:1/0*(o?-1:1);u+=Math.pow(2,n),i-=c}return(o?-1:1)*u*Math.pow(2,i-n)},write:function(e,t,r,n,o,i){var u,a,s=8*i-o-1,c=(1<<s)-1,l=c>>1,f=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:i-1,d=n?1:-1,i=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,u=c):(u=Math.floor(Math.log(t)/Math.LN2),t*(n=Math.pow(2,-u))<1&&(u--,n*=2),2<=(t+=1<=u+l?f/n:f*Math.pow(2,1-l))*n&&(u++,n/=2),c<=u+l?(a=0,u=c):1<=u+l?(a=(t*n-1)*Math.pow(2,o),u+=l):(a=t*Math.pow(2,l-1)*Math.pow(2,o),u=0));8<=o;e[r+p]=255&a,p+=d,a/=256,o-=8);for(u=u<<o|a,s+=o;0<s;e[r+p]=255&u,p+=d,u/=256,s-=8);e[r+p-d]|=128*i}};{var PT=Il;const aN=Nl,sN=ys,cN=(yc="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null,PT.Buffer=R,PT.SlowBuffer=function(e){+e!=e&&(e=0);return R.alloc(+e)},PT.INSPECT_MAX_BYTES=50,2147483647);function ST(e){if(e>cN)throw new RangeError('The value "'+e+'" is invalid for option "size"');e=new Uint8Array(e);return Object.setPrototypeOf(e,R.prototype),e}function R(e,t,r){if("number"!=typeof e)return TT(e,t,r);if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return CT(e)}function TT(t,r,e){if("string"==typeof t){var n=t;var o=r;"string"==typeof o&&""!==o||(o="utf8");if(!R.isEncoding(o))throw new TypeError("Unknown encoding: "+o);var i=0|AT(n,o);let e=ST(i);n=e.write(n,o);n!==i&&(e=e.slice(0,n));return e}if(ArrayBuffer.isView(t))return t1(o=t,Uint8Array)?RT((i=new Uint8Array(o)).buffer,i.byteOffset,i.byteLength):IT(o);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(t1(t,ArrayBuffer)||t&&t1(t.buffer,ArrayBuffer))return RT(t,r,e);if("undefined"!=typeof SharedArrayBuffer&&(t1(t,SharedArrayBuffer)||t&&t1(t.buffer,SharedArrayBuffer)))return RT(t,r,e);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return R.from(n,r,e);var u=function(e){{var t,r;if(R.isBuffer(e))return t=0|kT(e.length),0===(r=ST(t)).length||e.copy(r,0,0,t),r}if(void 0!==e.length)return"number"!=typeof e.length||r1(e.length)?ST(0):IT(e);if("Buffer"===e.type&&Array.isArray(e.data))return IT(e.data)}(t);if(u)return u;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return R.from(t[Symbol.toPrimitive]("string"),r,e);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function jT(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function CT(e){return jT(e),ST(e<0?0:0|kT(e))}function IT(t){var r=t.length<0?0:0|kT(t.length);const n=ST(r);for(let e=0;e<r;e+=1)n[e]=255&t[e];return n}function RT(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,R.prototype),n}function kT(e){if(e>=cN)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+cN.toString(16)+" bytes");return 0|e}function AT(e,t){if(R.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||t1(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=2<arguments.length&&!0===arguments[2];if(!n&&0===r)return 0;let o=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return JT(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return $T(e).length;default:if(o)return n?-1:JT(e).length;t=(""+t).toLowerCase(),o=!0}}function MT(e,r,n){let t=!1;if((r=void 0===r||r<0?0:r)>this.length)return"";if((n=void 0===n||n>this.length?this.length:n)<=0)return"";if((n>>>=0)<=(r>>>=0))return"";for(e=e||"utf8";;)switch(e){case"hex":{var o=this;var i=r;var u=n;var a=o.length;(!i||i<0)&&(i=0);(!u||u<0||a<u)&&(u=a);let t="";for(let e=i;e<u;++e)t+=dN[o[e]];return t;return}case"utf8":case"utf-8":return FT(this,r,n);case"ascii":{var s=this;a=r;var c=n;let t="";c=Math.min(s.length,c);for(let e=a;e<c;++e)t+=String.fromCharCode(127&s[e]);return t;return}case"latin1":case"binary":{var l=this;i=r;var f=n;let t="";f=Math.min(l.length,f);for(let e=i;e<f;++e)t+=String.fromCharCode(l[e]);return t;return}case"base64":return d=this,b=n,0===(h=r)&&b===d.length?aN.fromByteArray(d):aN.fromByteArray(d.slice(h,b));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":{d=this;h=r;b=n;var p=d.slice(h,b);let t="";for(let e=0;e<p.length-1;e+=2)t+=String.fromCharCode(p[e]+256*p[e+1]);return t;return}default:if(t)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),t=!0}var d,h,b}function NT(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function xT(e,t,r,n,o){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):2147483647<r?r=2147483647:r<-2147483648&&(r=-2147483648),(r=(r=r1(r=+r)?o?0:e.length-1:r)<0?e.length+r:r)>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof t&&(t=R.from(t,n)),R.isBuffer(t))return 0===t.length?-1:DT(e,t,r,n,o);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?(o?Uint8Array.prototype.indexOf:Uint8Array.prototype.lastIndexOf).call(e,t,r):DT(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function DT(r,n,t,e,o){let i=1,u=r.length,a=n.length;if(void 0!==e&&("ucs2"===(e=String(e).toLowerCase())||"ucs-2"===e||"utf16le"===e||"utf-16le"===e)){if(r.length<2||n.length<2)return-1;i=2,u/=2,a/=2,t/=2}function s(e,t){return 1===i?e[t]:e.readUInt16BE(t*i)}let c;if(o){let e=-1;for(c=t;c<u;c++)if(s(r,c)===s(n,-1===e?0:c-e)){if(-1===e&&(e=c),c-e+1===a)return e*i}else-1!==e&&(c-=c-e),e=-1}else for(t+a>u&&(t=u-a),c=t;0<=c;c--){let t=!0;for(let e=0;e<a;e++)if(s(r,c+e)!==s(n,e)){t=!1;break}if(t)return c}return-1}function UT(e,t,r,n){return e1(function(t){const r=[];for(let e=0;e<t.length;++e)r.push(255&t.charCodeAt(e));return r}(t),e,r,n)}function LT(e,t,r,n){return e1(function(t,r){var n,o;const i=[];for(let e=0;e<t.length&&!((r-=2)<0);++e)o=t.charCodeAt(e),n=o>>8,o=o%256,i.push(o),i.push(n);return i}(t,e.length-r),e,r,n)}function FT(u,e,t){t=Math.min(u.length,t);const r=[];let a=e;for(;a<t;){var s=u[a];let o=null,i=239<s?4:223<s?3:191<s?2:1;if(a+i<=t){let e,t,r,n;switch(i){case 1:s<128&&(o=s);break;case 2:128==(192&(e=u[a+1]))&&127<(n=(31&s)<<6|63&e)&&(o=n);break;case 3:e=u[a+1],t=u[a+2],128==(192&e)&&128==(192&t)&&2047<(n=(15&s)<<12|(63&e)<<6|63&t)&&(n<55296||57343<n)&&(o=n);break;case 4:e=u[a+1],t=u[a+2],r=u[a+3],128==(192&e)&&128==(192&t)&&128==(192&r)&&65535<(n=(15&s)<<18|(63&e)<<12|(63&t)<<6|63&r)&&n<1114112&&(o=n)}}null===o?(o=65533,i=1):65535<o&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o),a+=i}{var n=r,o=n.length;if(o<=lN)return String.fromCharCode.apply(String,n);let e="",t=0;for(;t<o;)e+=String.fromCharCode.apply(String,n.slice(t,t+=lN));return e}}PT.kMaxLength=cN,(R.TYPED_ARRAY_SUPPORT=function(){try{const t=new Uint8Array(1);var e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(e){return!1}}())||"undefined"==typeof console||"function"!=typeof console.error||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."),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}}),R.poolSize=8192,R.from=TT,Object.setPrototypeOf(R.prototype,Uint8Array.prototype),Object.setPrototypeOf(R,Uint8Array),R.alloc=function(e,t,r){return t=t,r=r,jT(e=e),!(e<=0)&&void 0!==t?"string"==typeof r?ST(e).fill(t,r):ST(e).fill(t):ST(e)},R.allocUnsafe=CT,R.allocUnsafeSlow=CT,R.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==R.prototype},R.compare=function(r,n){if(t1(r,Uint8Array)&&(r=R.from(r,r.offset,r.byteLength)),t1(n,Uint8Array)&&(n=R.from(n,n.offset,n.byteLength)),!R.isBuffer(r)||!R.isBuffer(n))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(r===n)return 0;let o=r.length,i=n.length;for(let e=0,t=Math.min(o,i);e<t;++e)if(r[e]!==n[e]){o=r[e],i=n[e];break}return o<i?-1:i<o?1:0},R.isEncoding=function(e){switch(String(e).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(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return R.alloc(0);let r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=R.allocUnsafe(e);let o=0;for(r=0;r<t.length;++r){let e=t[r];if(t1(e,Uint8Array))o+e.length>n.length?(e=R.isBuffer(e)?e:R.from(e)).copy(n,o):Uint8Array.prototype.set.call(n,e,o);else{if(!R.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(n,o)}o+=e.length}return n},R.byteLength=AT,R.prototype._isBuffer=!0,R.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;e<t;e+=2)NT(this,e,e+1);return this},R.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let e=0;e<t;e+=4)NT(this,e,e+3),NT(this,e+1,e+2);return this},R.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let e=0;e<t;e+=8)NT(this,e,e+7),NT(this,e+1,e+6),NT(this,e+2,e+5),NT(this,e+3,e+4);return this},R.prototype.toLocaleString=R.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?FT(this,0,e):MT.apply(this,arguments)},R.prototype.equals=function(e){if(R.isBuffer(e))return this===e||0===R.compare(this,e);throw new TypeError("Argument must be a Buffer")},R.prototype.inspect=function(){let e="";var t=PT.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),"<Buffer "+e+">"},yc&&(R.prototype[yc]=R.prototype.inspect),R.prototype.compare=function(e,t,r,n,o){if(t1(e,Uint8Array)&&(e=R.from(e,e.offset,e.byteLength)),!R.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),(t=void 0===t?0:t)<0||r>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(o<=n&&r<=t)return 0;if(o<=n)return-1;if(r<=t)return 1;if(this===e)return 0;let i=(o>>>=0)-(n>>>=0),u=(r>>>=0)-(t>>>=0);var a=Math.min(i,u),s=this.slice(n,o),c=e.slice(t,r);for(let e=0;e<a;++e)if(s[e]!==c[e]){i=s[e],u=c[e];break}return i<u?-1:u<i?1:0},R.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},R.prototype.indexOf=function(e,t,r){return xT(this,e,t,r,!0)},R.prototype.lastIndexOf=function(e,t,r){return xT(this,e,t,r,!1)},R.prototype.write=function(t,r,n,e){if(void 0===r)e="utf8",n=this.length,r=0;else if(void 0===n&&"string"==typeof r)e=r,n=this.length,r=0;else{if(!isFinite(r))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");r>>>=0,isFinite(n)?(n>>>=0,void 0===e&&(e="utf8")):(e=n,n=void 0)}var o,i,u,a=this.length-r;if((void 0===n||a<n)&&(n=a),0<t.length&&(n<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");e=e||"utf8";let s=!1;for(;;)switch(e){case"hex":{var c=this;var l=t;var f=r;var p=n;f=Number(f)||0;var d=c.length-f;(!p||d<(p=Number(p)))&&(p=d),(d=l.length)/2<p&&(p=d/2);let e;for(e=0;e<p;++e){var h=parseInt(l.substr(2*e,2),16);if(r1(h))return e;c[f+e]=h}return e;return}case"utf8":case"utf-8":return d=r,u=n,e1(JT(t,(i=this).length-d),i,d,u);case"ascii":case"latin1":case"binary":return UT(this,t,r,n);case"base64":return i=this,u=r,o=n,e1($T(t),i,u,o);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return LT(this,t,r,n);default:if(s)throw new TypeError("Unknown encoding: "+e);e=(""+e).toLowerCase(),s=!0}},R.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const lN=4096;function BT(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(r<e+t)throw new RangeError("Trying to access beyond buffer length")}function WT(e,t,r,n,o,i){if(!R.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(o<t||t<i)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function zT(e,t,r,n,o){ZT(t,n,o,e,r,7);n=Number(t&BigInt(4294967295)),e[r++]=n,e[r++]=n>>=8,e[r++]=n>>=8,e[r++]=n>>=8,o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=o,e[r++]=o>>=8,e[r++]=o>>=8,e[r++]=o>>=8,r}function qT(e,t,r,n,o){ZT(t,n,o,e,r,7);n=Number(t&BigInt(4294967295)),e[r+7]=n,e[r+6]=n>>=8,e[r+5]=n>>=8,e[r+4]=n>>=8,o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=o,e[r+2]=o>>=8,e[r+1]=o>>=8,e[r]=o>>=8,r+8}function VT(e,t,r,n){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function HT(e,t,r,n,o){return t=+t,r>>>=0,o||VT(e,0,r,4),sN.write(e,t,r,n,23,4),r+4}function GT(e,t,r,n,o){return t=+t,r>>>=0,o||VT(e,0,r,8),sN.write(e,t,r,n,52,8),r+8}R.prototype.slice=function(e,t){var r=this.length,r=((e=~~e)<0?(e+=r)<0&&(e=0):r<e&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):r<t&&(t=r),t<e&&(t=e),this.subarray(e,t));return Object.setPrototypeOf(r,R.prototype),r},R.prototype.readUintLE=R.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||BT(e,t,this.length);let n=this[e],o=1,i=0;for(;++i<t&&(o*=256);)n+=this[e+i]*o;return n},R.prototype.readUintBE=R.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||BT(e,t,this.length);let n=this[e+--t],o=1;for(;0<t&&(o*=256);)n+=this[e+--t]*o;return n},R.prototype.readUint8=R.prototype.readUInt8=function(e,t){return e>>>=0,t||BT(e,1,this.length),this[e]},R.prototype.readUint16LE=R.prototype.readUInt16LE=function(e,t){return e>>>=0,t||BT(e,2,this.length),this[e]|this[e+1]<<8},R.prototype.readUint16BE=R.prototype.readUInt16BE=function(e,t){return e>>>=0,t||BT(e,2,this.length),this[e]<<8|this[e+1]},R.prototype.readUint32LE=R.prototype.readUInt32LE=function(e,t){return e>>>=0,t||BT(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},R.prototype.readUint32BE=R.prototype.readUInt32BE=function(e,t){return e>>>=0,t||BT(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},R.prototype.readBigUInt64LE=n1(function(e){QT(e>>>=0,"offset");var t=this[e],r=this[e+7],t=(void 0!==t&&void 0!==r||XT(e,this.length-8),t+256*this[++e]+65536*this[++e]+this[++e]*2**24),e=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(t)+(BigInt(e)<<BigInt(32))}),R.prototype.readBigUInt64BE=n1(function(e){QT(e>>>=0,"offset");var t=this[e],r=this[e+7],t=(void 0!==t&&void 0!==r||XT(e,this.length-8),t*2**24+65536*this[++e]+256*this[++e]+this[++e]),e=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(t)<<BigInt(32))+BigInt(e)}),R.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||BT(e,t,this.length);let n=this[e],o=1,i=0;for(;++i<t&&(o*=256);)n+=this[e+i]*o;return o*=128,n>=o&&(n-=Math.pow(2,8*t)),n},R.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||BT(e,t,this.length);let n=t,o=1,i=this[e+--n];for(;0<n&&(o*=256);)i+=this[e+--n]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*t)),i},R.prototype.readInt8=function(e,t){return e>>>=0,t||BT(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},R.prototype.readInt16LE=function(e,t){e>>>=0,t||BT(e,2,this.length);t=this[e]|this[e+1]<<8;return 32768&t?4294901760|t:t},R.prototype.readInt16BE=function(e,t){e>>>=0,t||BT(e,2,this.length);t=this[e+1]|this[e]<<8;return 32768&t?4294901760|t:t},R.prototype.readInt32LE=function(e,t){return e>>>=0,t||BT(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},R.prototype.readInt32BE=function(e,t){return e>>>=0,t||BT(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},R.prototype.readBigInt64LE=n1(function(e){QT(e>>>=0,"offset");var t=this[e],r=this[e+7],r=(void 0!==t&&void 0!==r||XT(e,this.length-8),this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24));return(BigInt(r)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)}),R.prototype.readBigInt64BE=n1(function(e){QT(e>>>=0,"offset");var t=this[e],r=this[e+7],t=(void 0!==t&&void 0!==r||XT(e,this.length-8),(t<<24)+65536*this[++e]+256*this[++e]+this[++e]);return(BigInt(t)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)}),R.prototype.readFloatLE=function(e,t){return e>>>=0,t||BT(e,4,this.length),sN.read(this,e,!0,23,4)},R.prototype.readFloatBE=function(e,t){return e>>>=0,t||BT(e,4,this.length),sN.read(this,e,!1,23,4)},R.prototype.readDoubleLE=function(e,t){return e>>>=0,t||BT(e,8,this.length),sN.read(this,e,!0,52,8)},R.prototype.readDoubleBE=function(e,t){return e>>>=0,t||BT(e,8,this.length),sN.read(this,e,!1,52,8)},R.prototype.writeUintLE=R.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||WT(this,e,t,r,Math.pow(2,8*r)-1,0);let o=1,i=0;for(this[t]=255&e;++i<r&&(o*=256);)this[t+i]=e/o&255;return t+r},R.prototype.writeUintBE=R.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||WT(this,e,t,r,Math.pow(2,8*r)-1,0);let o=r-1,i=1;for(this[t+o]=255&e;0<=--o&&(i*=256);)this[t+o]=e/i&255;return t+r},R.prototype.writeUint8=R.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||WT(this,e,t,1,255,0),this[t]=255&e,t+1},R.prototype.writeUint16LE=R.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||WT(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},R.prototype.writeUint16BE=R.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||WT(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},R.prototype.writeUint32LE=R.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||WT(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},R.prototype.writeUint32BE=R.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||WT(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},R.prototype.writeBigUInt64LE=n1(function(e,t=0){return zT(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),R.prototype.writeBigUInt64BE=n1(function(e,t=0){return qT(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),R.prototype.writeIntLE=function(e,t,r,n){e=+e,t>>>=0,n||WT(this,e,t,r,(n=Math.pow(2,8*r-1))-1,-n);let o=0,i=1,u=0;for(this[t]=255&e;++o<r&&(i*=256);)e<0&&0===u&&0!==this[t+o-1]&&(u=1),this[t+o]=(e/i>>0)-u&255;return t+r},R.prototype.writeIntBE=function(e,t,r,n){e=+e,t>>>=0,n||WT(this,e,t,r,(n=Math.pow(2,8*r-1))-1,-n);let o=r-1,i=1,u=0;for(this[t+o]=255&e;0<=--o&&(i*=256);)e<0&&0===u&&0!==this[t+o+1]&&(u=1),this[t+o]=(e/i>>0)-u&255;return t+r},R.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||WT(this,e,t,1,127,-128),this[t]=255&(e=e<0?255+e+1:e),t+1},R.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||WT(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},R.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||WT(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},R.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||WT(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},R.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||WT(this,e,t,4,2147483647,-2147483648),this[t]=(e=e<0?4294967295+e+1:e)>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},R.prototype.writeBigInt64LE=n1(function(e,t=0){return zT(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),R.prototype.writeBigInt64BE=n1(function(e,t=0){return qT(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),R.prototype.writeFloatLE=function(e,t,r){return HT(this,e,t,!0,r)},R.prototype.writeFloatBE=function(e,t,r){return HT(this,e,t,!1,r)},R.prototype.writeDoubleLE=function(e,t,r){return GT(this,e,t,!0,r)},R.prototype.writeDoubleBE=function(e,t,r){return GT(this,e,t,!1,r)},R.prototype.copy=function(e,t,r,n){if(!R.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r=r||0,n||0===n||(n=this.length),t>=e.length&&(t=e.length),(n=0<n&&n<r?r:n)===r)return 0;if(0===e.length||0===this.length)return 0;if((t=t||0)<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length);var o=(n=e.length-t<n-r?e.length-t+r:n)-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),o},R.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!R.isEncoding(n))throw new TypeError("Unknown encoding: "+n);var o;1===e.length&&(o=e.charCodeAt(0),("utf8"===n&&o<128||"latin1"===n)&&(e=o))}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;t>>>=0,r=void 0===r?this.length:r>>>0;let i;if("number"==typeof(e=e||0))for(i=t;i<r;++i)this[i]=e;else{var u=R.isBuffer(e)?e:R.from(e,n),a=u.length;if(0===a)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=u[i%a]}return this};const fN={};function YT(e,t,r){fN[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=this.name+` [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return this.name+` [${e}]: `+this.message}}}function KT(e){let t="",r=e.length;for(var n="-"===e[0]?1:0;r>=4+n;r-=3)t="_"+e.slice(r-3,r)+t;return""+e.slice(0,r)+t}function ZT(t,r,n,e,o,i){if(n<t||t<r){var u="bigint"==typeof r?"n":"";let e;throw e=3<i?0===r||r===BigInt(0)?`>= 0${u} and < 2${u} ** `+8*(i+1)+u:`>= -(2${u} ** ${8*(i+1)-1}${u}) and < 2 ** `+(8*(i+1)-1)+u:`>= ${r}${u} and <= `+n+u,new fN.ERR_OUT_OF_RANGE("value",e,t)}r=e,n=i,QT(u=o,"offset"),void 0!==r[u]&&void 0!==r[u+n]||XT(u,r.length-(n+1))}function QT(e,t){if("number"!=typeof e)throw new fN.ERR_INVALID_ARG_TYPE(t,"number",e)}function XT(e,t,r){if(Math.floor(e)!==e)throw QT(e,r),new fN.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new fN.ERR_BUFFER_OUT_OF_BOUNDS;throw new fN.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= `+t,e)}YT("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?e+" is outside of buffer bounds":"Attempt to access memory outside buffer bounds"},RangeError),YT("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type `+typeof t},TypeError),YT("ERR_OUT_OF_RANGE",function(e,t,r){e=`The value of "${e}" is out of range.`;let n=r;return Number.isInteger(r)&&Math.abs(r)>2**32?n=KT(String(r)):"bigint"==typeof r&&(n=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(n=KT(n)),n+="n"),e+=` It must be ${t}. Received `+n},RangeError);const pN=/[^+/0-9A-Za-z-_]/g;function JT(t,r){r=r||1/0;let n;var o=t.length;let i=null;const u=[];for(let e=0;e<o;++e){if(55295<(n=t.charCodeAt(e))&&n<57344){if(!i){if(56319<n){-1<(r-=3)&&u.push(239,191,189);continue}if(e+1===o){-1<(r-=3)&&u.push(239,191,189);continue}i=n;continue}if(n<56320){-1<(r-=3)&&u.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&-1<(r-=3)&&u.push(239,191,189);if(i=null,n<128){if(--r<0)break;u.push(n)}else if(n<2048){if((r-=2)<0)break;u.push(n>>6|192,63&n|128)}else if(n<65536){if((r-=3)<0)break;u.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((r-=4)<0)break;u.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return u}function $T(e){return aN.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(pN,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function e1(e,t,r,n){let o;for(o=0;o<n&&!(o+r>=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function t1(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function r1(e){return e!=e}const dN=function(){var r="0123456789abcdef";const n=new Array(256);for(let t=0;t<16;++t){var o=16*t;for(let e=0;e<16;++e)n[o+e]=r[t]+r[e]}return n}();function n1(e){return"undefined"==typeof BigInt?o1:e}function o1(){throw new Error("BigInt not supported")}}var i1,Kf={},ss={},s=r&&r.__extends||(i1=function(e,t){return(i1=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}i1(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),cp=(Object.defineProperty(ss,"__esModule",{value:!0}),k.prototype.getUInt8=function(e){throw new Error("Not implemented")},k.prototype.getInt8=function(e){throw new Error("Not implemented")},k.prototype.getFloat64=function(e){throw new Error("Not implemented")},k.prototype.putUInt8=function(e,t){throw new Error("Not implemented")},k.prototype.putInt8=function(e,t){throw new Error("Not implemented")},k.prototype.putFloat64=function(e,t){throw new Error("Not implemented")},k.prototype.getInt16=function(e){return this.getInt8(e)<<8|this.getUInt8(e+1)},k.prototype.getUInt16=function(e){return this.getUInt8(e)<<8|this.getUInt8(e+1)},k.prototype.getInt32=function(e){return this.getInt8(e)<<24|this.getUInt8(e+1)<<16|this.getUInt8(e+2)<<8|this.getUInt8(e+3)},k.prototype.getUInt32=function(e){return this.getUInt8(e)<<24|this.getUInt8(e+1)<<16|this.getUInt8(e+2)<<8|this.getUInt8(e+3)},k.prototype.getInt64=function(e){return this.getInt8(e)<<56|this.getUInt8(e+1)<<48|this.getUInt8(e+2)<<40|this.getUInt8(e+3)<<32|this.getUInt8(e+4)<<24|this.getUInt8(e+5)<<16|this.getUInt8(e+6)<<8|this.getUInt8(e+7)},k.prototype.getSlice=function(e,t){return new a1(e,t,this)},k.prototype.putInt16=function(e,t){this.putInt8(e,t>>8),this.putUInt8(e+1,255&t)},k.prototype.putUInt16=function(e,t){this.putUInt8(e,t>>8&255),this.putUInt8(e+1,255&t)},k.prototype.putInt32=function(e,t){this.putInt8(e,t>>24),this.putUInt8(e+1,t>>16&255),this.putUInt8(e+2,t>>8&255),this.putUInt8(e+3,255&t)},k.prototype.putUInt32=function(e,t){this.putUInt8(e,t>>24&255),this.putUInt8(e+1,t>>16&255),this.putUInt8(e+2,t>>8&255),this.putUInt8(e+3,255&t)},k.prototype.putInt64=function(e,t){this.putInt8(e,t>>48),this.putUInt8(e+1,t>>42&255),this.putUInt8(e+2,t>>36&255),this.putUInt8(e+3,t>>30&255),this.putUInt8(e+4,t>>24&255),this.putUInt8(e+5,t>>16&255),this.putUInt8(e+6,t>>8&255),this.putUInt8(e+7,255&t)},k.prototype.putBytes=function(e,t){for(var r=0,n=t.remaining();r<n;r++)this.putUInt8(e+r,t.readUInt8())},k.prototype.readUInt8=function(){return this.getUInt8(this._updatePos(1))},k.prototype.readInt8=function(){return this.getInt8(this._updatePos(1))},k.prototype.readUInt16=function(){return this.getUInt16(this._updatePos(2))},k.prototype.readUInt32=function(){return this.getUInt32(this._updatePos(4))},k.prototype.readInt16=function(){return this.getInt16(this._updatePos(2))},k.prototype.readInt32=function(){return this.getInt32(this._updatePos(4))},k.prototype.readInt64=function(){return this.getInt32(this._updatePos(8))},k.prototype.readFloat64=function(){return this.getFloat64(this._updatePos(8))},k.prototype.writeUInt8=function(e){this.putUInt8(this._updatePos(1),e)},k.prototype.writeInt8=function(e){this.putInt8(this._updatePos(1),e)},k.prototype.writeInt16=function(e){this.putInt16(this._updatePos(2),e)},k.prototype.writeInt32=function(e){this.putInt32(this._updatePos(4),e)},k.prototype.writeUInt32=function(e){this.putUInt32(this._updatePos(4),e)},k.prototype.writeInt64=function(e){this.putInt64(this._updatePos(8),e)},k.prototype.writeFloat64=function(e){this.putFloat64(this._updatePos(8),e)},k.prototype.writeBytes=function(e){this.putBytes(this._updatePos(e.remaining()),e)},k.prototype.readSlice=function(e){return this.getSlice(this._updatePos(e),e)},k.prototype._updatePos=function(e){var t=this.position;return this.position+=e,t},k.prototype.remaining=function(){return this.length-this.position},k.prototype.hasRemaining=function(){return 0<this.remaining()},k.prototype.reset=function(){this.position=0},k.prototype.toString=function(){return this.constructor.name+"( position="+this.position+" )\n "+this.toHex()},k.prototype.toHex=function(){for(var e="",t=0;t<this.length;t++){var r=this.getUInt8(t).toString(16);e+=r=1===r.length?"0"+r:r,t!==this.length-1&&(e+=" ")}return e},k);function k(e){this.position=0,this.length=e}ss.default=cp;s(s1,u1=cp),s1.prototype.putUInt8=function(e,t){this._inner.putUInt8(this._start+e,t)},s1.prototype.getUInt8=function(e){return this._inner.getUInt8(this._start+e)},s1.prototype.putInt8=function(e,t){this._inner.putInt8(this._start+e,t)},s1.prototype.putFloat64=function(e,t){this._inner.putFloat64(this._start+e,t)},s1.prototype.getInt8=function(e){return this._inner.getInt8(this._start+e)},s1.prototype.getFloat64=function(e){return this._inner.getFloat64(this._start+e)};var u1,a1=s1;function s1(e,t,r){t=u1.call(this,t)||this;return t._start=e,t._inner=r,t}var c1,l1,_p=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},mp=(Object.defineProperty(Kf,"__esModule",{value:!0}),Kf.BaseBuffer=void 0,_p(ss)),jp=(Kf.BaseBuffer=mp.default,Kf.default=mp.default,r&&r.__extends||(c1=function(e,t){return(c1=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}c1(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),Mp=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},f1=(Object.defineProperty(ds,"__esModule",{value:!0}),ds.alloc=void 0,Mp(Il)),bs=Mp(Kf),p1=(l1=bs.default,jp(d1,l1),d1.prototype.getUInt8=function(e){return this._buffer.readUInt8(e)},d1.prototype.getInt8=function(e){return this._buffer.readInt8(e)},d1.prototype.getFloat64=function(e){return this._buffer.readDoubleBE(e)},d1.prototype.putUInt8=function(e,t){this._buffer.writeUInt8(t,e)},d1.prototype.putInt8=function(e,t){this._buffer.writeInt8(t,e)},d1.prototype.putFloat64=function(e,t){this._buffer.writeDoubleBE(t,e)},d1.prototype.putBytes=function(e,t){var r;t instanceof d1?(r=Math.min(t.length-t.position,this.length-e),t._buffer.copy(this._buffer,e,t.position,t.position+r),t.position+=r):l1.prototype.putBytes.call(this,e,t)},d1.prototype.getSlice=function(e,t){return new d1(this._buffer.slice(e,e+t))},d1);function d1(e){var t=this,e=(e=e)instanceof f1.default.Buffer?e:"number"==typeof e&&"function"==typeof f1.default.Buffer.alloc?f1.default.Buffer.alloc(e):new f1.default.Buffer(e);return(t=l1.call(this,e.length)||this)._buffer=e,t}ds.default=p1,ds.alloc=function(e){return new p1(e)};var Zf=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},h1=(Object.defineProperty(gf,"__esModule",{value:!0}),Zf(ds)),b1=e,Dp=b1.internal.util,y1=Dp.ENCRYPTION_OFF,_1=Dp.ENCRYPTION_ON;function v1(e,t,r){void 0===t&&(t=m1),void 0===r&&(r=function(e){return new WebSocket(e)});var n,o=this,t=(this._open=!0,this._pending=[],this._error=null,this._handleConnectionError=this._handleConnectionError.bind(this),this._config=e,this._receiveTimeout=null,this._receiveTimeoutStarted=!1,this._receiveTimeoutId=null,this._closingPromise=null,function(e,t){var r=function(e){return!0===e.encrypted||e.encrypted===_1}(e),n=function(e){return!1===e.encrypted||e.encrypted===y1}(e),e=e.trust,t=function(e){e="function"==typeof e?e():"";return e&&0<=e.toLowerCase().indexOf("https")}(t);if(function(e,t,r){null!==r&&(e&&!r?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."):t&&r&&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."))}(r,n,t),n)return{scheme:"ws",error:null};if(t)return{scheme:"wss",error:null};if(r)return e&&"TRUST_SYSTEM_CA_SIGNED_CERTIFICATES"!==e?{scheme:null,error:(0,b1.newError)("The browser version of this driver only supports one trust strategy, 'TRUST_SYSTEM_CA_SIGNED_CERTIFICATES'. "+e+' is not supported. Please either use TRUST_SYSTEM_CA_SIGNED_CERTIFICATES or disable encryption by setting `encrypted:"'+y1+'"` in the driver configuration.')}:{scheme:"wss",error:null};return{scheme:"ws",error:null}}(e,t)),i=t.scheme,t=t.error;t?this._error=t:(this._ws=function(t,r,n){var o=t+"://"+r.asHostPort();try{return n(o)}catch(e){if(function(e,t){return"SyntaxError"===e.name&&function(e){return"["===e.charAt(0)&&-1!==e.indexOf("]")}(t.asHostPort())}(e,r))return o=function(e,t){var r=t.host().replace(/:/g,"-").replace("%","s")+".ipv6-literal.net";return"".concat(e,"://").concat(r,":").concat(t.port())}(t,r),n(o);throw e}}(i,e.address,r),this._ws.binaryType="arraybuffer",(n=this)._ws.onclose=function(e){e&&!e.wasClean&&n._handleConnectionError(),n._open=!1},this._ws.onopen=function(){n._clearConnectionTimeout();var e=n._pending;n._pending=null;for(var t=0;t<e.length;t++)n.write(e[t])},this._ws.onmessage=function(e){o._resetTimeout(),n.onmessage&&(e=new h1.default(e.data),n.onmessage(e))},this._ws.onerror=this._handleConnectionError,this._connectionTimeoutFired=!1,this._connectionTimeoutId=this._setupConnectionTimeout())}function m1(){return"undefined"!=typeof window&&window.location?window.location.protocol:null}v1.prototype._handleConnectionError=function(){if(this._connectionTimeoutFired)return this._error=(0,b1.newError)("Failed to establish connection in ".concat(this._config.connectionTimeout,"ms"),this._config.connectionErrorCode),void(this.onerror&&this.onerror(this._error));this._open&&!this._timedout&&(this._error=(0,b1.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))},v1.prototype.write=function(e){if(null!==this._pending)this._pending.push(e);else{if(!(e instanceof h1.default))throw(0,b1.newError)("Don't know how to send buffer: "+e);try{this._ws.send(e._buffer)}catch(e){if(1===this._ws.readyState)throw e;this._handleConnectionError()}}},v1.prototype.close=function(){var r=this;return null===this._closingPromise&&(this._closingPromise=new Promise(function(e,t){r._clearConnectionTimeout(),r._ws&&3!==r._ws.readyState?(r._open=!1,r.stopReceiveTimeout(),r._ws.onclose=function(){e()},r._ws.close()):e()})),this._closingPromise},v1.prototype.setupReceiveTimeout=function(e){this._receiveTimeout=e},v1.prototype.stopReceiveTimeout=function(){null!==this._receiveTimeout&&this._receiveTimeoutStarted&&(this._receiveTimeoutStarted=!1,null!=this._receiveTimeoutId&&clearTimeout(this._receiveTimeoutId),this._receiveTimeoutId=null)},v1.prototype.startReceiveTimeout=function(){this._open&&null!==this._receiveTimeout&&!this._receiveTimeoutStarted&&(this._receiveTimeoutStarted=!0,this._resetTimeout())},v1.prototype._resetTimeout=function(){var e=this;this._receiveTimeoutStarted&&(null!==this._receiveTimeoutId&&clearTimeout(this._receiveTimeoutId),this._receiveTimeoutId=setTimeout(function(){e._receiveTimeoutId=null,e._timedout=!0,e.stopReceiveTimeout(),e._error=(0,b1.newError)("Connection lost. Server didn't respond in ".concat(e._receiveTimeout,"ms"),e._config.connectionErrorCode),e.close(),e.onerror&&e.onerror(e._error)},this._receiveTimeout))},v1.prototype._setupConnectionTimeout=function(){var e,t=this,r=this._config.connectionTimeout;return r?(e=this._ws,setTimeout(function(){1!==e.readyState&&(t._connectionTimeoutFired=!0,e.close())},r)):null},v1.prototype._clearConnectionTimeout=function(){var e=this._connectionTimeoutId;!e&&0!==e||(this._connectionTimeoutFired=!1,this._connectionTimeoutId=null,clearTimeout(e))},gf.default=v1;var g1,Bp={},hs=r&&r.__extends||(g1=function(e,t){return(g1=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}g1(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(Bp,"__esModule",{value:!0});var O1,ra=e.internal.resolver.BaseHostNameResolver,sp=(hs(w1,O1=ra),w1.prototype.resolve=function(e){return this._resolveToItself(e)},w1);function w1(){return null!==O1&&O1.apply(this,arguments)||this}Bp.default=sp;var E1,m=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Zp=(Object.defineProperty(df,"__esModule",{value:!0}),df.HostNameResolver=df.Channel=void 0,m(gf)),h=m(Bp),C=(df.Channel=Zp.default,df.HostNameResolver=h.default,{}),gp={},lp=r&&r.__extends||(E1=function(e,t){return(E1=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}E1(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(gp,"__esModule",{value:!0});var P1,S1=ds,Qp=(P1=Kf.BaseBuffer,lp(T1,P1),T1.prototype.getUInt8=function(e){for(var t=0;t<this._buffers.length;t++){var r=this._buffers[t];if(!(e>=r.length))return r.getUInt8(e);e-=r.length}},T1.prototype.getInt8=function(e){for(var t=0;t<this._buffers.length;t++){var r=this._buffers[t];if(!(e>=r.length))return r.getInt8(e);e-=r.length}},T1.prototype.getFloat64=function(e){for(var t=(0,S1.alloc)(8),r=0;r<8;r++)t.putUInt8(r,this.getUInt8(e+r));return t.getFloat64(0)},T1);function T1(e){for(var t=this,r=0,n=0;n<e.length;n++)r+=e[n].length;return(t=P1.call(this,r)||this)._buffers=e,t}gp.default=Qp;var j1,C1,ed=r&&r.__extends||(j1=function(e,t){return(j1=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}j1(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),od=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},cd=(Object.defineProperty(C,"__esModule",{value:!0}),C.Dechunker=C.Chunker=void 0,od(ss)),I1=ds,R1=od(gp),hd=(C1=cd.default,ed(k1,C1),k1.prototype.putUInt8=function(e,t){this._ensure(1),this._buffer.writeUInt8(t)},k1.prototype.putInt8=function(e,t){this._ensure(1),this._buffer.writeInt8(t)},k1.prototype.putFloat64=function(e,t){this._ensure(8),this._buffer.writeFloat64(t)},k1.prototype.putBytes=function(e,t){for(;0<t.remaining();)this._ensure(1),this._buffer.remaining()>t.remaining()?this._buffer.writeBytes(t):this._buffer.writeBytes(t.readSlice(this._buffer.remaining()));return this},k1.prototype.flush=function(){var e;return 0<this._buffer.position&&(this._closeChunkIfOpen(),e=this._buffer,this._buffer=null,this._ch.write(e.getSlice(0,e.position)),this._buffer=(0,I1.alloc)(this._bufferSize),this._chunkOpen=!1),this},k1.prototype.messageBoundary=function(){this._closeChunkIfOpen(),this._buffer.remaining()<2&&this.flush(),this._buffer.writeInt16(0)},k1.prototype._ensure=function(e){e=this._chunkOpen?e:e+2;this._buffer.remaining()<e&&this.flush(),this._chunkOpen||(this._currentChunkStart=this._buffer.position,this._buffer.position=this._buffer.position+2,this._chunkOpen=!0)},k1.prototype._closeChunkIfOpen=function(){var e;this._chunkOpen&&(e=this._buffer.position-(this._currentChunkStart+2),this._buffer.putUInt16(this._currentChunkStart,e),this._chunkOpen=!1)},k1);function k1(e,t){var r=C1.call(this,0)||this;return r._bufferSize=t||1400,r._ch=e,r._buffer=(0,I1.alloc)(r._bufferSize),r._currentChunkStart=0,r._chunkOpen=!1,r}function A1(){this._currentMessage=[],this._partialChunkHeader=0,this._state=this.AWAITING_CHUNK}C.Chunker=hd,A1.prototype.AWAITING_CHUNK=function(e){return 2<=e.remaining()?this._onHeader(e.readUInt16()):(this._partialChunkHeader=e.readUInt8()<<8,this.IN_HEADER)},A1.prototype.IN_HEADER=function(e){return this._onHeader(65535&(this._partialChunkHeader|e.readUInt8()))},A1.prototype.IN_CHUNK=function(e){return this._chunkSize<=e.remaining()?(this._currentMessage.push(e.readSlice(this._chunkSize)),this.AWAITING_CHUNK):(this._chunkSize-=e.remaining(),this._currentMessage.push(e.readSlice(e.remaining())),this.IN_CHUNK)},A1.prototype.CLOSED=function(e){},A1.prototype._onHeader=function(e){if(0!==e)return this._chunkSize=e,this.IN_CHUNK;var t=void 0;switch(this._currentMessage.length){case 0:return this.AWAITING_CHUNK;case 1:t=this._currentMessage[0];break;default:t=new R1.default(this._currentMessage)}return this._currentMessage=[],this.onmessage(t),this.AWAITING_CHUNK},A1.prototype.write=function(e){for(;e.hasRemaining();)this._state=this._state(e)},C.Dechunker=A1;var Ed={},M1=(Object.defineProperty(Ed,"__esModule",{value:!0}),e),kd=M1.internal.util,Dd=kd.ENCRYPTION_OFF,Bd=kd.ENCRYPTION_ON,N1=M1.error.SERVICE_UNAVAILABLE,x1=[null,void 0,!0,!1,Bd,Dd],D1=[null,void 0,"TRUST_ALL_CERTIFICATES","TRUST_CUSTOM_CA_SIGNED_CERTIFICATES","TRUST_SYSTEM_CA_SIGNED_CERTIFICATES"];Ed.default=function(e,t,r){this.address=e,this.encrypted=function(e){e=e.encrypted;if(-1!==x1.indexOf(e))return e;throw(0,M1.newError)("Illegal value of the encrypted setting ".concat(e,". Expected one of ").concat(x1))}(t),this.trust=function(e){e=e.trust;if(-1!==D1.indexOf(e))return e;throw(0,M1.newError)("Illegal value of the trust setting ".concat(e,". Expected one of ").concat(D1))}(t),this.trustedCertificates=t.trustedCertificates||[],this.knownHostsPath=t.knownHosts||null,this.connectionErrorCode=r||N1,this.connectionTimeout=t.connectionTimeout};var U1,L1,Wd={},ih={},oh={exports:{}};function F1(e,t){for(var r in e)t[r]=e[r]}function B1(e,t,r){return L1(e,t,r)}Yl=(Ph=oh).exports,(L1=(U1=Il).Buffer).from&&L1.alloc&&L1.allocUnsafe&&L1.allocUnsafeSlow?Ph.exports=U1:(F1(U1,Yl),Yl.Buffer=B1),B1.prototype=Object.create(L1.prototype),F1(L1,B1),B1.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return L1(e,t,r)},B1.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");e=L1(e);return void 0!==t?"string"==typeof r?e.fill(t,r):e.fill(t):e.fill(0),e},B1.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return L1(e)},B1.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return U1.SlowBuffer(e)};var W1=oh.exports.Buffer,z1=W1.isEncoding||function(e){switch((e=""+e)&&e.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 q1(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){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 e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"==typeof t||W1.isEncoding!==z1&&z1(e))return t||e;throw new Error("Unknown encoding: "+e)}function V1(e){var t;switch(this.encoding=q1(e),this.encoding){case"utf16le":this.text=Y1,this.end=K1,t=4;break;case"utf8":this.fillLast=G1,t=4;break;case"base64":this.text=Z1,this.end=Q1,t=3;break;default:return this.write=X1,void(this.end=J1)}this.lastNeed=0,this.lastTotal=0,this.lastChar=W1.allocUnsafe(t)}function H1(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function G1(e){var t,r=this.lastTotal-this.lastNeed,n=(t=this,128!=(192&(n=e)[0])?(t.lastNeed=0,"�"):1<t.lastNeed&&1<n.length?128!=(192&n[1])?(t.lastNeed=1,"�"):2<t.lastNeed&&2<n.length&&128!=(192&n[2])?(t.lastNeed=2,"�"):void 0:void 0);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,r,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,r,0,e.length),void(this.lastNeed-=e.length))}function Y1(e,t){if((e.length-t)%2!=0)return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1);t=e.toString("utf16le",t);if(t){var r=t.charCodeAt(t.length-1);if(55296<=r&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],t.slice(0,-1)}return t}function K1(e){var t,e=e&&e.length?this.write(e):"";return this.lastNeed?(t=this.lastTotal-this.lastNeed,e+this.lastChar.toString("utf16le",0,t)):e}function Z1(e,t){var r=(e.length-t)%3;return 0==r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1==r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function Q1(e){e=e&&e.length?this.write(e):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function X1(e){return e.toString(this.encoding)}function J1(e){return e&&e.length?this.write(e):""}(ih.StringDecoder=V1).prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},V1.prototype.end=function(e){e=e&&e.length?this.write(e):"";return this.lastNeed?e+"�":e},V1.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var o=H1(t[n]);if(0<=o)return 0<o&&(e.lastNeed=o-1),o;if(--n<r||-2===o)return 0;if(0<=(o=H1(t[n])))return 0<o&&(e.lastNeed=o-2),o;if(--n<r||-2===o)return 0;if(0<=(o=H1(t[n])))return 0<o&&(2===o?o=0:e.lastNeed=o-3),o;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;r=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},V1.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length};var $1,ej,tj,rj,nj,ll=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},oj=(Object.defineProperty(Wd,"__esModule",{value:!0}),ll(ds)),ij=e,uj=ll(Il),aj=new ih.StringDecoder("utf8");Wd.default={encode:function(e){return new oj.default((e=e,"function"==typeof uj.default.Buffer.from?uj.default.Buffer.from(e,"utf8"):new uj.default.Buffer(e,"utf8")))},decode:function(e,t){if(Object.prototype.hasOwnProperty.call(e,"_buffer"))return n=t,a=(r=e).position,n=a+n,r.position=Math.min(n,r.length),r._buffer.toString("utf8",a,n);var o,i,u,r,n,a;if(Object.prototype.hasOwnProperty.call(e,"_buffers"))return o=function(e){return aj.write(e._buffer)},r=function(){return aj.end()},i=t,u=(a=e).position,a._updatePos(Math.min(t,a.length-u)),a._buffers.reduce(function(e,t){var r,n;return i<=0?e:u>=t.length?(u-=t.length,""):(t._updatePos(u-t.position),r=Math.min(t.length-u,i),n=t.readSlice(r),t._updatePos(r),i=Math.max(i-n.length,0),u=0,e+o(n))},"")+r();throw(0,ij.newError)("Don't know how to decode strings from '".concat(e,"'"))}},gh=pf,$1=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),Eh=r&&r.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||$1(t,e,r)},ej=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(gh,"__esModule",{value:!0}),gh.utf8=gh.alloc=gh.ChannelConfig=void 0,Eh(df,gh),Eh(C,gh),tj=Ed,Object.defineProperty(gh,"ChannelConfig",{enumerable:!0,get:function(){return ej(tj).default}}),rj=ds,Object.defineProperty(gh,"alloc",{enumerable:!0,get:function(){return rj.alloc}}),nj=Wd,Object.defineProperty(gh,"utf8",{enumerable:!0,get:function(){return ej(nj).default}}),Object.defineProperty(Gl,"__esModule",{value:!0});var sj=pf,cj=e,lj=1616949271;function fj(e,t){return{major:e,minor:t}}function pj(){var e=[[fj(5,4),fj(5,0)],[fj(4,4),fj(4,2)],fj(4,1),fj(3,0)];if(4<e.length)throw(0,cj.newError)("It should not have more than 4 versions of the protocol");var o=(0,sj.alloc)(20);return o.writeInt32(lj),e.forEach(function(e){var t,r,n;e instanceof Array?(r=(n=e[0]).major,n=n.minor,t=e[1].minor,o.writeInt32(n-t<<16|n<<8|r)):(r=e.major,n=e.minor,o.writeInt32(n<<8|r))}),o.reset(),o}Gl.default=function(t,o){var i=this;return new Promise(function(r,n){function e(e){n(e)}t.onerror=e.bind(i),t._error&&e(t._error),t.onmessage=function(t){try{var e=function(e,t){if(72===(e=[e.readUInt8(),e.readUInt8(),e.readUInt8(),e.readUInt8()])[0]&&84===e[1]&&84===e[2]&&80===e[3])throw t.error("Handshake failed since server responded with HTTP."),(0,cj.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 Number(e[3]+"."+e[2])}(t,o);r({protocolVersion:e,consumeRemainingBuffer:function(e){t.hasRemaining()&&e(t.readSlice(t.remaining()))}})}catch(e){n(e)}},t.write(pj())})};var dj,Nh={},xh={},qh={},I={},Xh={},eb=r&&r.__extends||(dj=function(e,t){return(dj=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}dj(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),tb=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Ob=(Object.defineProperty(Xh,"__esModule",{value:!0}),tb(e),hj.ofRecord=function(e){return null===e?hj.ofNull():new wj(e)},hj.ofMessageResponse=function(e){return null===e?hj.ofNull():new yj(e)},hj.ofNull=function(){return new mj},Object.defineProperty(hj.prototype,"ttl",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(hj.prototype,"db",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(hj.prototype,"servers",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(hj.prototype,"isNull",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),hj);function hj(){}Xh.default=Ob;eb(_j,bj=Ob),Object.defineProperty(_j.prototype,"ttl",{get:function(){return this._response.rt.ttl},enumerable:!1,configurable:!0}),Object.defineProperty(_j.prototype,"servers",{get:function(){return this._response.rt.servers},enumerable:!1,configurable:!0}),Object.defineProperty(_j.prototype,"db",{get:function(){return this._response.rt.db},enumerable:!1,configurable:!0}),Object.defineProperty(_j.prototype,"isNull",{get:function(){return null===this._response},enumerable:!1,configurable:!0});var bj,yj=_j;function _j(e){var t=bj.call(this)||this;return t._response=e,t}eb(gj,vj=Ob),Object.defineProperty(gj.prototype,"isNull",{get:function(){return!0},enumerable:!1,configurable:!0});var vj,mj=gj;function gj(){return null!==vj&&vj.apply(this,arguments)||this}eb(Ej,Oj=Ob),Object.defineProperty(Ej.prototype,"ttl",{get:function(){return this._record.get("ttl")},enumerable:!1,configurable:!0}),Object.defineProperty(Ej.prototype,"servers",{get:function(){return this._record.get("servers")},enumerable:!1,configurable:!0}),Object.defineProperty(Ej.prototype,"db",{get:function(){return this._record.has("db")?this._record.get("db"):null},enumerable:!1,configurable:!0}),Object.defineProperty(Ej.prototype,"isNull",{get:function(){return null===this._record},enumerable:!1,configurable:!0});var Oj,wj=Ej;function Ej(e){var t=Oj.call(this)||this;return t._record=e,t}var Pj,Sb=r&&r.__extends||(Pj=function(e,t){return(Pj=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Pj(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Rb=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Sj=(Object.defineProperty(I,"__esModule",{value:!0}),I.TelemetryObserver=I.ProcedureRouteObserver=I.RouteObserver=I.CompletedObserver=I.FailedObserver=I.ResetObserver=I.LogoffObserver=I.LoginObserver=I.ResultStreamObserver=I.StreamObserver=void 0,e),Tj=Rb(Xh),jj=Sj.internal.constants.FETCH_ALL,Cj=Sj.error.PROTOCOL_ERROR,xb=(Ij.prototype.onNext=function(e){},Ij.prototype.onError=function(e){},Ij.prototype.onCompleted=function(e){},Ij);function Ij(){}I.StreamObserver=xb;Sb(kj,Rj=xb),kj.prototype.pause=function(){this._paused=!0},kj.prototype.resume=function(){this._paused=!1,this._setupAutoPull(!0),this._state.pull(this)},kj.prototype.onNext=function(e){var t=new Sj.Record(this._fieldKeys,e,this._fieldLookup);this._observers.some(function(e){return e.onNext})?this._observers.forEach(function(e){e.onNext&&e.onNext(t)}):(this._queuedRecords.push(t),this._queuedRecords.length>this._highRecordWatermark&&(this._autoPull=!1))},kj.prototype.onCompleted=function(e){this._state.onSuccess(this,e)},kj.prototype.onError=function(e){this._state.onError(this,e)},kj.prototype.cancel=function(){this._discard=!0},kj.prototype.prepareToHandleSingleResponse=function(){this._head=[],this._fieldKeys=[],this._setState(Kj.STREAMING)},kj.prototype.markCompleted=function(){this._head=[],this._fieldKeys=[],this._tail={},this._setState(Kj.SUCCEEDED)},kj.prototype.subscribe=function(e){if(this._head&&e.onKeys&&e.onKeys(this._head),0<this._queuedRecords.length&&e.onNext)for(var t=0;t<this._queuedRecords.length;t++)e.onNext(this._queuedRecords[t]),this._queuedRecords.length-t-1<=this._lowRecordWatermark&&(this._autoPull=!0,this._state===Kj.READY&&this._handleStreaming());this._tail&&e.onCompleted&&e.onCompleted(this._tail),this._error&&e.onError(this._error),this._observers.push(e),this._state===Kj.READY&&this._handleStreaming()},kj.prototype._handleHasMore=function(e){this._setState(Kj.READY),this._handleStreaming(),delete e.has_more},kj.prototype._handlePullSuccess=function(e){var t,r=this,n=Object.assign(this._server?{server:this._server}:{},this._meta,e);[void 0,null,"r","w","rw","s"].includes(n.type)?(this._setState(Kj.SUCCEEDED),e=null,t=function(){r._tail=n,r._observers.some(function(e){return e.onCompleted})&&r._observers.forEach(function(e){e.onCompleted&&e.onCompleted(n)}),r._afterComplete&&r._afterComplete(n)},(e=this._beforeComplete?this._beforeComplete(n):e)?Promise.resolve(e).then(t):t()):this.onError((0,Sj.newError)('Server returned invalid query type. Expected one of [undefined, null, "r", "w", "rw", "s"] but got \''.concat(n.type,"'"),Cj))},kj.prototype._handleRunSuccess=function(e,t){var r=this;if(null===this._fieldKeys){if(this._fieldKeys=[],this._fieldLookup={},e.fields&&0<e.fields.length){this._fieldKeys=e.fields;for(var n=0;n<e.fields.length;n++)this._fieldLookup[e.fields[n]]=n;delete e.fields}null!==e.qid&&void 0!==e.qid&&(this._queryId=e.qid,delete e.qid),this._storeMetadataForCompletion(e);var o=null,i=(this._beforeKeys&&(o=this._beforeKeys(this._fieldKeys)),function(){r._head=r._fieldKeys,r._observers.some(function(e){return e.onKeys})&&r._observers.forEach(function(e){e.onKeys&&e.onKeys(r._fieldKeys)}),r._afterKeys&&r._afterKeys(r._fieldKeys),t()});o?Promise.resolve(o).then(i):i()}},kj.prototype._handleError=function(t){function e(){r._observers.some(function(e){return e.onError})&&r._observers.forEach(function(e){e.onError&&e.onError(t)}),r._afterError&&r._afterError(t)}var r=this,n=(this._setState(Kj.FAILED),this._error=t,null);this._beforeError&&(n=this._beforeError(t));n?Promise.resolve(n).then(e):e()},kj.prototype._handleStreaming=function(){this._head&&this._observers.some(function(e){return e.onNext||e.onCompleted})&&(this._paused||!this._discard&&!this._autoPull||this._more())},kj.prototype._more=function(){this._discard?this._discardFunction(this._queryId,this):this._moreFunction(this._queryId,this._fetchSize,this),this._setState(Kj.STREAMING)},kj.prototype._storeMetadataForCompletion=function(e){for(var t,r=Object.keys(e),n=r.length;n--;)t=r[n],this._meta[t]=e[t]},kj.prototype._setState=function(e){this._state=e},kj.prototype._setupAutoPull=function(){this._autoPull=!0};var Rj,Ub=kj;function kj(e){var e=void 0===e?{}:e,t=e.reactive,t=void 0!==t&&t,r=e.moreFunction,n=e.discardFunction,o=e.fetchSize,o=void 0===o?jj:o,i=e.beforeError,u=e.afterError,a=e.beforeKeys,s=e.afterKeys,c=e.beforeComplete,l=e.afterComplete,f=e.server,p=e.highRecordWatermark,p=void 0===p?Number.MAX_VALUE:p,e=e.lowRecordWatermark,e=void 0===e?Number.MAX_VALUE:e,d=Rj.call(this)||this;return d._fieldKeys=null,d._fieldLookup=null,d._head=null,d._queuedRecords=[],d._tail=null,d._error=null,d._observers=[],d._meta={},d._server=f,d._beforeError=i,d._afterError=u,d._beforeKeys=a,d._afterKeys=s,d._beforeComplete=c,d._afterComplete=l,d._queryId=null,d._moreFunction=r,d._discardFunction=n,d._discard=!1,d._fetchSize=o,d._lowRecordWatermark=e,d._highRecordWatermark=p,d._setState(t?Kj.READY:Kj.READY_STREAMING),d._setupAutoPull(),d._paused=!1,d}I.ResultStreamObserver=Ub;Sb(Mj,Aj=xb),Mj.prototype.onNext=function(e){this.onError((0,Sj.newError)("Received RECORD when initializing "+Sj.json.stringify(e)))},Mj.prototype.onError=function(e){this._onError&&this._onError(e)},Mj.prototype.onCompleted=function(e){this._onCompleted&&this._onCompleted(e)};var Aj,Kb=Mj;function Mj(e){var e=void 0===e?{}:e,t=e.onError,e=e.onCompleted,r=Aj.call(this)||this;return r._onError=t,r._onCompleted=e,r}I.LoginObserver=Kb;Sb(xj,Nj=xb),xj.prototype.onNext=function(e){this.onError((0,Sj.newError)("Received RECORD when logging off "+Sj.json.stringify(e)))},xj.prototype.onError=function(e){this._onError&&this._onError(e)},xj.prototype.onCompleted=function(e){this._onCompleted&&this._onCompleted(e)};var Nj,$b=xj;function xj(e){var e=void 0===e?{}:e,t=e.onError,e=e.onCompleted,r=Nj.call(this)||this;return r._onError=t,r._onCompleted=e,r}I.LogoffObserver=$b;Sb(Uj,Dj=xb),Uj.prototype.onNext=function(e){this.onError((0,Sj.newError)("Received RECORD when resetting: received record is: "+Sj.json.stringify(e),Cj))},Uj.prototype.onError=function(e){e.code===Cj&&this._onProtocolError&&this._onProtocolError(e.message),this._onError&&this._onError(e)},Uj.prototype.onCompleted=function(e){this._onComplete&&this._onComplete(e)};var Dj,ry=Uj;function Uj(e){var e=void 0===e?{}:e,t=e.onProtocolError,r=e.onError,e=e.onComplete,n=Dj.call(this)||this;return n._onProtocolError=t,n._onError=r,n._onComplete=e,n}I.ResetObserver=ry;Sb(Fj,Lj=Ub),Fj.prototype.onNext=function(e){this.onError((0,Sj.newError)("Received RECORD when sending telemetry "+Sj.json.stringify(e),Cj))},Fj.prototype.onError=function(e){this._onError&&this._onError(e)},Fj.prototype.onCompleted=function(e){this._onCompleted&&this._onCompleted(e)};var Lj,ny=Fj;function Fj(e){var e=void 0===e?{}:e,t=e.onError,e=e.onCompleted,r=Lj.call(this)||this;return r._onError=t,r._onCompleted=e,r}I.TelemetryObserver=ny;Sb(Wj,Bj=Ub);var Bj,oy=Wj;function Wj(e){var t=e.error,e=e.onError,e=Bj.call(this,{beforeError:e})||this;return e.onError(t),e}I.FailedObserver=oy;Sb(qj,zj=Ub);var zj,fy=qj;function qj(){var e=zj.call(this)||this;return zj.prototype.markCompleted.call(e),e}I.CompletedObserver=fy;Sb(Hj,Vj=xb),Hj.prototype.onNext=function(e){this._records.push(e)},Hj.prototype.onError=function(e){e.code===Cj&&this._onProtocolError&&this._onProtocolError(e.message),this._onError&&this._onError(e)},Hj.prototype.onCompleted=function(){null!==this._records&&1!==this._records.length?this.onError((0,Sj.newError)("Illegal response from router. Received "+this._records.length+" records but expected only one.\n"+Sj.json.stringify(this._records),Cj)):this._onCompleted&&this._onCompleted(Tj.default.ofRecord(this._records[0]))};var Vj,Op=Hj;function Hj(e){var t=e.resultObserver,r=e.onProtocolError,n=e.onError,e=e.onCompleted,o=Vj.call(this)||this;return o._resultObserver=t,o._onError=n,o._onCompleted=e,o._records=[],o._onProtocolError=r,t.subscribe(o),o}I.ProcedureRouteObserver=Op;Sb(Yj,Gj=xb),Yj.prototype.onNext=function(e){this.onError((0,Sj.newError)("Received RECORD when resetting: received record is: "+Sj.json.stringify(e),Cj))},Yj.prototype.onError=function(e){e.code===Cj&&this._onProtocolError&&this._onProtocolError(e.message),this._onError&&this._onError(e)},Yj.prototype.onCompleted=function(e){this._onCompleted&&this._onCompleted(Tj.default.ofMessageResponse(e))};var Gj,hy=Yj;function Yj(e){var e=void 0===e?{}:e,t=e.onProtocolError,r=e.onError,e=e.onCompleted,n=Gj.call(this)||this;return n._onProtocolError=t,n._onError=r,n._onCompleted=e,n}I.RouteObserver=hy;var Kj={READY_STREAMING:{onSuccess:function(e,t){e._handleRunSuccess(t,function(){e._setState(Kj.STREAMING)})},onError:function(e,t){e._handleError(t)},name:function(){return"READY_STREAMING"},pull:function(){}},READY:{onSuccess:function(e,t){e._handleRunSuccess(t,function(){return e._handleStreaming()})},onError:function(e,t){e._handleError(t)},name:function(){return"READY"},pull:function(e){return e._more()}},STREAMING:{onSuccess:function(e,t){t.has_more?e._handleHasMore(t):e._handlePullSuccess(t)},onError:function(e,t){e._handleError(t)},name:function(){return"STREAMING"},pull:function(){}},FAILED:{onError:function(e){},name:function(){return"FAILED"},pull:function(){}},SUCCEEDED:{name:function(){return"SUCCEEDED"},pull:function(){}}},Zj=(Object.defineProperty(qh,"__esModule",{value:!0}),qh.assertNotificationFilterIsEmpty=qh.assertImpersonatedUserIsEmpty=qh.assertTxConfigIsEmpty=qh.assertDatabaseIsEmpty=void 0,e);qh.assertTxConfigIsEmpty=function(e,t,r){if(void 0===t&&(t=function(){}),e&&!e.isEmpty())throw t((e=(0,Zj.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")).message),r.onError(e),e},qh.assertDatabaseIsEmpty=function(e,t,r){if(void 0===t&&(t=function(){}),e)throw t((e=(0,Zj.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")).message),r.onError(e),e},qh.assertImpersonatedUserIsEmpty=function(e,t,r){if(void 0===t&&(t=function(){}),e)throw t((t=(0,Zj.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(e,"."))).message),r.onError(t),t},qh.assertNotificationFilterIsEmpty=function(e,t,r){if(void 0===t&&(t=function(){}),void 0!==e)throw t((t=(0,Zj.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(Zj.json.stringify(e),"."))).message),r.onError(t),t};var yy={},gy={},Ey={},Ry={},Qj=(Object.defineProperty(Ry,"__esModule",{value:!0}),Ry.reuseOngoingRequest=Ry.identity=void 0,e);Ry.identity=function(e){return e},Ry.reuseOngoingRequest=function(o,i){void 0===i&&(i=null);var u=new Map;return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Qj.json.stringify(e);if(u.has(r))return u.get(r);var n=o.apply(i,e);return u.set(r,n),n.finally(function(){u.delete(r)})}};var ub={},Xj=r&&r.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(ub,"__esModule",{value:!0}),ub.equals=void 0,ub.equals=function(e,t){var r,n;if(e===t)return!0;if(null===e||null===t)return!1;if("object"!=typeof e||"object"!=typeof t)return!1;var o=Object.keys(e),i=Object.keys(t);if(o.length!==i.length)return!1;try{for(var u=Xj(o),a=u.next();!a.done;a=u.next()){var s=a.value;if(e[s]!==t[s])return!1}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=u.return)&&n.call(u)}finally{if(r)throw r.error}}return!0};var Jj=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),$j=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Dy=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&Jj(t,e,r);return $j(t,e),t},Fy=(Object.defineProperty(Ey,"__esModule",{value:!0}),Ey.object=Ey.functional=void 0,Ey.functional=Dy(Ry),Ey.object=Dy(ub),{}),eC=(Object.defineProperty(Fy,"__esModule",{value:!0}),Fy.verifyStructSize=Fy.Structure=void 0,e),tC=eC.error.PROTOCOL_ERROR,fl=(Object.defineProperty(rC.prototype,"size",{get:function(){return this.fields.length},enumerable:!1,configurable:!0}),rC.prototype.toString=function(){for(var e="",t=0;t<this.fields.length;t++)0<t&&(e+=", "),e+=this.fields[t];return"Structure("+this.signature+", ["+e+"])"},rC);function rC(e,t){this.signature=e,this.fields=t}Fy.Structure=fl,Fy.verifyStructSize=function(e,t,r){if(t!==r)throw(0,eC.newError)("Wrong struct size for ".concat(e,", expected ").concat(t," but was ").concat(r),tC)},Fy.default=fl,Object.defineProperty(gy,"__esModule",{value:!0}),gy.Unpacker=gy.Packer=void 0;var nC=pf,oC=Ey,iC=Fy,uC=e,aC=uC.error.PROTOCOL_ERROR;function sC(e){this._ch=e,this._byteArraysSupported=!0}function cC(e,t){void 0===t&&(t=!1),this._disableLosslessIntegers=e=void 0===e?!1:e,this._useBigInt=t}sC.prototype.packable=function(o,i){var e,u=this;void 0===i&&(i=oC.functional.identity);try{o=i(o)}catch(e){return function(){throw e}}if(null===o)return function(){return u._ch.writeUInt8(192)};if(!0===o)return function(){return u._ch.writeUInt8(195)};if(!1===o)return function(){return u._ch.writeUInt8(194)};if("number"==typeof o)return function(){return u.packFloat(o)};if("string"==typeof o)return function(){return u.packString(o)};if("bigint"==typeof o)return function(){return u.packInteger((0,uC.int)(o))};if((0,uC.isInt)(o))return function(){return u.packInteger(o)};if(o instanceof Int8Array)return function(){return u.packBytes(o)};if(o instanceof Array)return function(){u.packListHeader(o.length);for(var e=0;e<o.length;e++)u.packable(void 0===o[e]?null:o[e],i)()};if(null!=(e=o)&&"function"==typeof e[Symbol.iterator])return this.packableIterable(o,i);if(o instanceof iC.Structure){for(var t=[],r=0;r<o.fields.length;r++)t[r]=this.packable(o.fields[r],i);return function(){return u.packStruct(o.signature,t)}}return"object"==typeof o?function(){for(var e=Object.keys(o),t=0,r=0;r<e.length;r++)void 0!==o[e[r]]&&t++;u.packMapHeader(t);for(r=0;r<e.length;r++){var n=e[r];void 0!==o[n]&&(u.packString(n),u.packable(o[n],i)())}}:this._nonPackableValue("Unable to pack the given value: ".concat(o))},sC.prototype.packableIterable=function(t,e){try{var r=Array.from(t);return this.packable(r,e)}catch(e){throw(0,uC.newError)("Cannot pack given iterable, ".concat(e.message,": ").concat(t))}},sC.prototype.packStruct=function(e,t){this.packStructHeader((t=t||[]).length,e);for(var r=0;r<t.length;r++)t[r]()},sC.prototype.packInteger=function(e){var t=e.high,r=e.low;e.greaterThanOrEqual(-16)&&e.lessThan(128)?this._ch.writeInt8(r):e.greaterThanOrEqual(-128)&&e.lessThan(-16)?(this._ch.writeUInt8(200),this._ch.writeInt8(r)):e.greaterThanOrEqual(-32768)&&e.lessThan(32768)?(this._ch.writeUInt8(201),this._ch.writeInt16(r)):(e.greaterThanOrEqual(-2147483648)&&e.lessThan(2147483648)?this._ch.writeUInt8(202):(this._ch.writeUInt8(203),this._ch.writeInt32(t)),this._ch.writeInt32(r))},sC.prototype.packFloat=function(e){this._ch.writeUInt8(193),this._ch.writeFloat64(e)},sC.prototype.packString=function(e){var e=nC.utf8.encode(e),t=e.length;if(t<16)this._ch.writeUInt8(128|t),this._ch.writeBytes(e);else if(t<256)this._ch.writeUInt8(208),this._ch.writeUInt8(t),this._ch.writeBytes(e);else if(t<65536)this._ch.writeUInt8(209),this._ch.writeUInt8(t/256>>0),this._ch.writeUInt8(t%256),this._ch.writeBytes(e);else{if(!(t<4294967296))throw(0,uC.newError)("UTF-8 strings of size "+t+" are not supported");this._ch.writeUInt8(210),this._ch.writeUInt8((t/16777216>>0)%256),this._ch.writeUInt8((t/65536>>0)%256),this._ch.writeUInt8((t/256>>0)%256),this._ch.writeUInt8(t%256),this._ch.writeBytes(e)}},sC.prototype.packListHeader=function(e){if(e<16)this._ch.writeUInt8(144|e);else if(e<256)this._ch.writeUInt8(212),this._ch.writeUInt8(e);else if(e<65536)this._ch.writeUInt8(213),this._ch.writeUInt8((e/256>>0)%256),this._ch.writeUInt8(e%256);else{if(!(e<4294967296))throw(0,uC.newError)("Lists of size "+e+" are not supported");this._ch.writeUInt8(214),this._ch.writeUInt8((e/16777216>>0)%256),this._ch.writeUInt8((e/65536>>0)%256),this._ch.writeUInt8((e/256>>0)%256),this._ch.writeUInt8(e%256)}},sC.prototype.packBytes=function(e){if(!this._byteArraysSupported)throw(0,uC.newError)("Byte arrays are not supported by the database this driver is connected to");this.packBytesHeader(e.length);for(var t=0;t<e.length;t++)this._ch.writeInt8(e[t])},sC.prototype.packBytesHeader=function(e){if(e<256)this._ch.writeUInt8(204),this._ch.writeUInt8(e);else if(e<65536)this._ch.writeUInt8(205),this._ch.writeUInt8((e/256>>0)%256),this._ch.writeUInt8(e%256);else{if(!(e<4294967296))throw(0,uC.newError)("Byte arrays of size "+e+" are not supported");this._ch.writeUInt8(206),this._ch.writeUInt8((e/16777216>>0)%256),this._ch.writeUInt8((e/65536>>0)%256),this._ch.writeUInt8((e/256>>0)%256),this._ch.writeUInt8(e%256)}},sC.prototype.packMapHeader=function(e){if(e<16)this._ch.writeUInt8(160|e);else if(e<256)this._ch.writeUInt8(216),this._ch.writeUInt8(e);else if(e<65536)this._ch.writeUInt8(217),this._ch.writeUInt8(e/256>>0),this._ch.writeUInt8(e%256);else{if(!(e<4294967296))throw(0,uC.newError)("Maps of size "+e+" are not supported");this._ch.writeUInt8(218),this._ch.writeUInt8((e/16777216>>0)%256),this._ch.writeUInt8((e/65536>>0)%256),this._ch.writeUInt8((e/256>>0)%256),this._ch.writeUInt8(e%256)}},sC.prototype.packStructHeader=function(e,t){if(e<16)this._ch.writeUInt8(176|e),this._ch.writeUInt8(t);else if(e<256)this._ch.writeUInt8(220),this._ch.writeUInt8(e),this._ch.writeUInt8(t);else{if(!(e<65536))throw(0,uC.newError)("Structures of size "+e+" are not supported");this._ch.writeUInt8(221),this._ch.writeUInt8(e/256>>0),this._ch.writeUInt8(e%256)}},sC.prototype.disableByteArrays=function(){this._byteArraysSupported=!1},sC.prototype._nonPackableValue=function(e){return function(){throw(0,uC.newError)(e,aC)}},gy.Packer=sC,cC.prototype.unpack=function(e,t){void 0===t&&(t=oC.functional.identity);var r=e.readUInt8(),n=240&r,o=15&r;if(192===r)return null;var i=this._unpackBoolean(r);if(null!==i)return i;i=this._unpackNumberOrInteger(r,e);if(null!==i){if((0,uC.isInt)(i)){if(this._useBigInt)return i.toBigInt();if(this._disableLosslessIntegers)return i.toNumberOrInfinity()}return i}i=this._unpackString(r,n,o,e);if(null!==i)return i;i=this._unpackList(r,n,o,e,t);if(null!==i)return i;i=this._unpackByteArray(r,e);if(null!==i)return i;i=this._unpackMap(r,n,o,e,t);if(null!==i)return i;i=this._unpackStruct(r,n,o,e,t);if(null!==i)return i;throw(0,uC.newError)("Unknown packed value with marker "+r.toString(16))},cC.prototype.unpackInteger=function(e){var t=e.readUInt8(),e=this._unpackInteger(t,e);if(null==e)throw(0,uC.newError)("Unable to unpack integer value with marker "+t.toString(16));return e},cC.prototype._unpackBoolean=function(e){return 195===e||194!==e&&null},cC.prototype._unpackNumberOrInteger=function(e,t){return 193===e?t.readFloat64():this._unpackInteger(e,t)},cC.prototype._unpackInteger=function(e,t){var r;return 0<=e&&e<128?(0,uC.int)(e):240<=e&&e<256?(0,uC.int)(e-256):200===e?(0,uC.int)(t.readInt8()):201===e?(0,uC.int)(t.readInt16()):202===e?(r=t.readInt32(),(0,uC.int)(r)):203===e?(r=t.readInt32(),e=t.readInt32(),new uC.Integer(e,r)):null},cC.prototype._unpackString=function(e,t,r,n){return 128===t?nC.utf8.decode(n,r):208===e?nC.utf8.decode(n,n.readUInt8()):209===e?nC.utf8.decode(n,n.readUInt16()):210===e?nC.utf8.decode(n,n.readUInt32()):null},cC.prototype._unpackList=function(e,t,r,n,o){return 144===t?this._unpackListWithSize(r,n,o):212===e?this._unpackListWithSize(n.readUInt8(),n,o):213===e?this._unpackListWithSize(n.readUInt16(),n,o):214===e?this._unpackListWithSize(n.readUInt32(),n,o):null},cC.prototype._unpackListWithSize=function(e,t,r){for(var n=[],o=0;o<e;o++)n.push(this.unpack(t,r));return n},cC.prototype._unpackByteArray=function(e,t){return 204===e?this._unpackByteArrayWithSize(t.readUInt8(),t):205===e?this._unpackByteArrayWithSize(t.readUInt16(),t):206===e?this._unpackByteArrayWithSize(t.readUInt32(),t):null},cC.prototype._unpackByteArrayWithSize=function(e,t){for(var r=new Int8Array(e),n=0;n<e;n++)r[n]=t.readInt8();return r},cC.prototype._unpackMap=function(e,t,r,n,o){return 160===t?this._unpackMapWithSize(r,n,o):216===e?this._unpackMapWithSize(n.readUInt8(),n,o):217===e?this._unpackMapWithSize(n.readUInt16(),n,o):218===e?this._unpackMapWithSize(n.readUInt32(),n,o):null},cC.prototype._unpackMapWithSize=function(e,t,r){for(var n={},o=0;o<e;o++)n[this.unpack(t,r)]=this.unpack(t,r);return n},cC.prototype._unpackStruct=function(e,t,r,n,o){return 176===t?this._unpackStructWithSize(r,n,o):220===e?this._unpackStructWithSize(n.readUInt8(),n,o):221===e?this._unpackStructWithSize(n.readUInt16(),n,o):null},cC.prototype._unpackStructWithSize=function(e,t,r){for(var n=t.readUInt8(),o=new iC.Structure(n,[]),i=0;i<e;i++)o.fields.push(this.unpack(t,r));return r(o)},gy.Unpacker=cC;var lC,fC,lb={},Xy=r&&r.__extends||(lC=function(e,t){return(lC=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}lC(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),pC=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),dC=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),t_=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&pC(t,e,r);return dC(t,e),t},f_=(Object.defineProperty(lb,"__esModule",{value:!0}),lb.Unpacker=lb.Packer=void 0,t_(gy)),Kl=(fC=f_.Packer,Xy(hC,fC),hC.prototype.disableByteArrays=function(){throw new Error("Bolt V2 should always support byte arrays")},hC);function hC(){return null!==fC&&fC.apply(this,arguments)||this}lb.Packer=Kl;bC=f_.Unpacker,Xy(yC,bC);var bC,o_=yC;function yC(e,t){return bC.call(this,e=void 0===e?!1:e,t=void 0===t?!1:t)||this}lb.Unpacker=o_;var _C=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),vC=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Zl=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&_C(t,e,r);return vC(t,e),t},i_=(Object.defineProperty(yy,"__esModule",{value:!0}),yy.structure=yy.v2=yy.v1=void 0,Zl(gy)),s_=(yy.v1=i_,Zl(lb)),Ql=(yy.v2=s_,Zl(Fy)),w_=(yy.structure=Ql,yy.default=s_,{}),mC=(Object.defineProperty(w_,"__esModule",{value:!0}),w_.SIGNATURES=void 0,e),S_=mC.internal.constants,gC=S_.ACCESS_MODE_READ,OC=S_.FETCH_ALL,wC=mC.internal.util.assertString,_=Object.freeze({INIT:1,RESET:15,RUN:16,PULL_ALL:63,HELLO:1,GOODBYE:2,BEGIN:17,COMMIT:18,ROLLBACK:19,TELEMETRY:84,ROUTE:102,LOGON:106,LOGOFF:107,DISCARD:47,PULL:63}),I_=(w_.SIGNATURES=_,A.init=function(e,t){return new A(1,[e,t],function(){return"INIT ".concat(e," {...}")})},A.run=function(e,t){return new A(16,[e,t],function(){return"RUN ".concat(e," ").concat(mC.json.stringify(t))})},A.pullAll=function(){return SC},A.reset=function(){return TC},A.hello=function(e,t,r,n){void 0===r&&(r=null),void 0===n&&(n=null);t=Object.assign({user_agent:e},t);return r&&(t.routing=r),n&&(t.patch_bolt=n),new A(1,[t],function(){return"HELLO {user_agent: '".concat(e,"', ...}")})},A.hello5x1=function(e,t){var r={user_agent:e};return(t=void 0===t?null:t)&&(r.routing=t),new A(1,[r],function(){return"HELLO {user_agent: '".concat(e,"', ...}")})},A.hello5x2=function(e,t,r){void 0===r&&(r=null);var n={user_agent:e};return(t=void 0===t?null:t)&&(t.minimumSeverityLevel&&(n.notifications_minimum_severity=t.minimumSeverityLevel),t.disabledCategories&&(n.notifications_disabled_categories=t.disabledCategories)),r&&(n.routing=r),new A(1,[n],function(){return"HELLO ".concat(mC.json.stringify(n))})},A.hello5x3=function(e,t,r,n){void 0===r&&(r=null),void 0===n&&(n=null);var o={};return e&&(o.user_agent=e),t&&(o.bolt_agent={product:t.product,platform:t.platform,language:t.language,language_details:t.languageDetails}),r&&(r.minimumSeverityLevel&&(o.notifications_minimum_severity=r.minimumSeverityLevel),r.disabledCategories&&(o.notifications_disabled_categories=r.disabledCategories)),n&&(o.routing=n),new A(1,[o],function(){return"HELLO ".concat(mC.json.stringify(o))})},A.logon=function(e){return new A(106,[e],function(){return"LOGON { ... }"})},A.logoff=function(){return new A(107,[],function(){return"LOGOFF"})},A.begin=function(e){var e=void 0===e?{}:e,t=EC(e.bookmarks,e.txConfig,e.database,e.mode,e.impersonatedUser,e.notificationFilter);return new A(17,[t],function(){return"BEGIN ".concat(mC.json.stringify(t))})},A.commit=function(){return jC},A.rollback=function(){return CC},A.runWithMetadata=function(e,t,r){var r=void 0===r?{}:r,n=EC(r.bookmarks,r.txConfig,r.database,r.mode,r.impersonatedUser,r.notificationFilter);return new A(16,[e,t,n],function(){return"RUN ".concat(e," ").concat(mC.json.stringify(t)," ").concat(mC.json.stringify(n))})},A.goodbye=function(){return IC},A.pull=function(e){var e=void 0===e?{}:e,t=e.stmtId,t=void 0===t?-1:t,e=e.n,r=PC(null==t?-1:t,(void 0===e?OC:e)||OC);return new A(63,[r],function(){return"PULL ".concat(mC.json.stringify(r))})},A.discard=function(e){var e=void 0===e?{}:e,t=e.stmtId,t=void 0===t?-1:t,e=e.n,r=PC(null==t?-1:t,(void 0===e?OC:e)||OC);return new A(47,[r],function(){return"DISCARD ".concat(mC.json.stringify(r))})},A.telemetry=function(e){var e=e.api,t=(0,mC.int)(e);return new A(84,[t],function(){return"TELEMETRY ".concat(t.toString())})},A.route=function(e,t,r){return new A(102,[e=void 0===e?{}:e,t=void 0===t?[]:t,r=void 0===r?null:r],function(){return"ROUTE ".concat(mC.json.stringify(e)," ").concat(mC.json.stringify(t)," ").concat(r)})},A.routeV4x4=function(e,t,r){void 0===e&&(e={}),void 0===t&&(t=[]);var n={};return(r=void 0===r?{}:r).databaseName&&(n.db=r.databaseName),r.impersonatedUser&&(n.imp_user=r.impersonatedUser),new A(102,[e,t,n],function(){return"ROUTE ".concat(mC.json.stringify(e)," ").concat(mC.json.stringify(t)," ").concat(mC.json.stringify(n))})},A);function A(e,t,r){this.signature=e,this.fields=t,this.toString=r}function EC(e,t,r,n,o,i){var u={};return e.isEmpty()||(u.bookmarks=e.values()),null!==t.timeout&&(u.tx_timeout=t.timeout),t.metadata&&(u.tx_metadata=t.metadata),r&&(u.db=wC(r,"database")),o&&(u.imp_user=wC(o,"impersonatedUser")),n===gC&&(u.mode="r"),i&&(i.minimumSeverityLevel&&(u.notifications_minimum_severity=i.minimumSeverityLevel),i.disabledCategories&&(u.notifications_disabled_categories=i.disabledCategories)),u}function PC(e,t){t={n:(0,mC.int)(t)};return-1!==e&&(t.qid=(0,mC.int)(e)),t}var SC=new(w_.default=I_)(63,[],function(){return"PULL_ALL"}),TC=new I_(15,[],function(){return"RESET"}),jC=new I_(18,[],function(){return"COMMIT"}),CC=new I_(19,[],function(){return"ROLLBACK"}),IC=new I_(2,[],function(){return"GOODBYE"}),x_={},w={},RC=(Object.defineProperty(w,"__esModule",{value:!0}),w.TypeTransformer=void 0,yy),kC=e.internal.objectUtil;function AC(e){this._transformers=e,this._transformersPerSignature=new Map(e.map(function(e){return[e.signature,e]})),this.fromStructure=this.fromStructure.bind(this),this.toStructure=this.toStructure.bind(this),Object.freeze(this)}function MC(e){var t=e.signature,r=e.fromStructure,n=e.toStructure,e=e.isTypeInstance;this.signature=t,this.isTypeInstance=e,this.fromStructure=r,this.toStructure=n,Object.freeze(this)}AC.prototype.fromStructure=function(e){try{return e instanceof RC.structure.Structure&&this._transformersPerSignature.has(e.signature)?(0,this._transformersPerSignature.get(e.signature).fromStructure)(e):e}catch(e){return kC.createBrokenObject(e)}},AC.prototype.toStructure=function(t){var e=this._transformers.find(function(e){return(0,e.isTypeInstance)(t)});return void 0!==e?e.toStructure(t):t},w.default=AC,MC.prototype.extendsWith=function(e){var t=e.signature,r=e.fromStructure,n=e.toStructure,e=e.isTypeInstance;return new MC({signature:t||this.signature,fromStructure:r||this.fromStructure,toStructure:n||this.toStructure,isTypeInstance:e||this.isTypeInstance})},w.TypeTransformer=MC;var NC=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},xC=(Object.defineProperty(x_,"__esModule",{value:!0}),e),DC=yy,UC=w,LC=xC.error.PROTOCOL_ERROR;x_.default={createNodeTransformer:function(){return new UC.TypeTransformer({signature:78,isTypeInstance:function(e){return e instanceof xC.Node},toStructure:function(e){throw(0,xC.newError)("It is not allowed to pass nodes in query parameters, given: ".concat(e),LC)},fromStructure:function(e){DC.structure.verifyStructSize("Node",3,e.size);var e=NC(e.fields,3),t=e[0],r=e[1],e=e[2];return new xC.Node(t,r,e)}})},createRelationshipTransformer:function(){return new UC.TypeTransformer({signature:82,isTypeInstance:function(e){return e instanceof xC.Relationship},toStructure:function(e){throw(0,xC.newError)("It is not allowed to pass relationships in query parameters, given: ".concat(e),LC)},fromStructure:function(e){DC.structure.verifyStructSize("Relationship",5,e.size);var e=NC(e.fields,5),t=e[0],r=e[1],n=e[2],o=e[3],e=e[4];return new xC.Relationship(t,r,n,o,e)}})},createUnboundRelationshipTransformer:function(){return new UC.TypeTransformer({signature:114,isTypeInstance:function(e){return e instanceof xC.UnboundRelationship},toStructure:function(e){throw(0,xC.newError)("It is not allowed to pass unbound relationships in query parameters, given: ".concat(e),LC)},fromStructure:function(e){DC.structure.verifyStructSize("UnboundRelationship",3,e.size);var e=NC(e.fields,3),t=e[0],r=e[1],e=e[2];return new xC.UnboundRelationship(t,r,e)}})},createPathTransformer:function(){return new UC.TypeTransformer({signature:80,isTypeInstance:function(e){return e instanceof xC.Path},toStructure:function(e){throw(0,xC.newError)("It is not allowed to pass paths in query parameters, given: ".concat(e),LC)},fromStructure:function(e){DC.structure.verifyStructSize("Path",3,e.size);for(var e=NC(e.fields,3),t=e[0],r=e[1],n=e[2],o=[],i=t[0],u=0;u<n.length;u+=2){var a=t[n[u+1]],s=(0,xC.toNumber)(n[u]),c=void 0;0<s?(c=r[s-1])instanceof xC.UnboundRelationship&&(r[s-1]=c=c.bindTo(i,a)):(c=r[-s-1])instanceof xC.UnboundRelationship&&(r[-s-1]=c=c.bindTo(a,i)),o.push(new xC.PathSegment(i,c,a)),i=a}return new xC.Path(t[0],t[t.length-1],o)}})}};var FC=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),BC=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),L_=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&FC(t,e,r);return BC(t,e),t},B_=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},WC=(Object.defineProperty(xh,"__esModule",{value:!0}),qh),zC=yy,qC=L_(w_),VC=I,HC=e,GC=B_(x_),YC=B_(w),KC=HC.internal.bookmarks.Bookmarks,V_=HC.internal.constants,ZC=V_.ACCESS_MODE_WRITE,QC=V_.BOLT_PROTOCOL_V1,XC=(HC.internal.logger.Logger,HC.internal.txConfig.TxConfig),Y_=(Object.defineProperty(M.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new YC.default(Object.values(GC.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"version",{get:function(){return QC},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"supportsReAuth",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"initialized",{get:function(){return!!this._initialized},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"authToken",{get:function(){return this._authToken},enumerable:!1,configurable:!0}),M.prototype.packer=function(){return this._packer},M.prototype.packable=function(e){return this._packer.packable(e,this.transformer.toStructure)},M.prototype.unpacker=function(){return this._unpacker},M.prototype.unpack=function(e){return this._unpacker.unpack(e,this.transformer.fromStructure)},M.prototype.transformMetadata=function(e){return e},M.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=(e.boltAgent,e.authToken),o=e.notificationFilter,i=e.onError,u=e.onComplete,e=new VC.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return t._onLoginCompleted(e,u)}});return(0,WC.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(qC.default.init(r,n),e,!0),e},M.prototype.logoff=function(e){var e=void 0===e?{}:e,t=e.onComplete,r=e.onError,e=(e.flush,new VC.LogoffObserver({onCompleted:t,onError:r})),t=(0,HC.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(t.message),e.onError(t),t},M.prototype.logon=function(e){var t=this,e=void 0===e?{}:e,r=e.authToken,n=e.onComplete,o=e.onError,e=(e.flush,new VC.LoginObserver({onCompleted:function(){return t._onLoginCompleted({},r,n)},onError:function(e){return t._onLoginError(e,o)}})),i=(0,HC.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(i.message),e.onError(i),i},M.prototype.prepareToClose=function(){},M.prototype.beginTransaction=function(e){var e=void 0===e?{}:e,t=e.bookmarks,r=e.txConfig,n=e.database,o=e.mode,i=e.impersonatedUser,u=e.notificationFilter,a=e.beforeError,s=e.afterError,c=e.beforeComplete,e=e.afterComplete;return this.run("BEGIN",t?t.asBeginTransactionParameters():{},{bookmarks:t,txConfig:r,database:n,mode:o,impersonatedUser:i,notificationFilter:u,beforeError:a,afterError:s,beforeComplete:c,afterComplete:e,flush:!1})},M.prototype.commitTransaction=function(e){var e=void 0===e?{}:e,t=e.beforeError,r=e.afterError,n=e.beforeComplete,e=e.afterComplete;return this.run("COMMIT",{},{bookmarks:KC.empty(),txConfig:XC.empty(),mode:ZC,beforeError:t,afterError:r,beforeComplete:n,afterComplete:e})},M.prototype.rollbackTransaction=function(e){var e=void 0===e?{}:e,t=e.beforeError,r=e.afterError,n=e.beforeComplete,e=e.afterComplete;return this.run("ROLLBACK",{},{bookmarks:KC.empty(),txConfig:XC.empty(),mode:ZC,beforeError:t,afterError:r,beforeComplete:n,afterComplete:e})},M.prototype.run=function(e,t,r){var r=void 0===r?{}:r,n=(r.bookmarks,r.txConfig),o=r.database,i=(r.mode,r.impersonatedUser),u=r.notificationFilter,a=r.beforeKeys,s=r.afterKeys,c=r.beforeError,l=r.afterError,f=r.beforeComplete,p=r.afterComplete,d=r.flush,d=void 0===d||d,h=r.highRecordWatermark,h=void 0===h?Number.MAX_VALUE:h,r=r.lowRecordWatermark,r=void 0===r?Number.MAX_VALUE:r,a=new VC.ResultStreamObserver({server:this._server,beforeKeys:a,afterKeys:s,beforeError:c,afterError:l,beforeComplete:f,afterComplete:p,highRecordWatermark:h,lowRecordWatermark:r});return(0,WC.assertTxConfigIsEmpty)(n,this._onProtocolError,a),(0,WC.assertDatabaseIsEmpty)(o,this._onProtocolError,a),(0,WC.assertImpersonatedUserIsEmpty)(i,this._onProtocolError,a),(0,WC.assertNotificationFilterIsEmpty)(u,this._onProtocolError,a),this.write(qC.default.run(e,t),a,!1),this.write(qC.default.pullAll(),a,d),a},Object.defineProperty(M.prototype,"currentFailure",{get:function(){return this._responseHandler.currentFailure},enumerable:!1,configurable:!0}),M.prototype.reset=function(e){var e=void 0===e?{}:e,t=e.onError,e=e.onComplete,t=new VC.ResetObserver({onProtocolError:this._onProtocolError,onError:t,onComplete:e});return this.write(qC.default.reset(),t,!0),t},M.prototype.telemetry=function(e,t){e.api;e=void 0===t?{}:t,e.onError,t=e.onCompleted,e=new VC.CompletedObserver;return t&&t(),e},M.prototype._createPacker=function(e){return new zC.v1.Packer(e)},M.prototype._createUnpacker=function(e,t){return new zC.v1.Unpacker(e,t)},M.prototype.write=function(e,t,r){this.queueObserverIfProtocolIsNotBroken(t)&&(this._log.isDebugEnabled()&&this._log.debug("C: ".concat(e)),this._lastMessageSignature=e.signature,t=new zC.structure.Structure(e.signature,e.fields),this.packable(t)(),this._chunker.messageBoundary(),r&&this._chunker.flush())},M.prototype.isLastMessageLogon=function(){return this._lastMessageSignature===qC.SIGNATURES.HELLO||this._lastMessageSignature===qC.SIGNATURES.LOGON},M.prototype.isLastMessageReset=function(){return this._lastMessageSignature===qC.SIGNATURES.RESET},M.prototype.notifyFatalError=function(e){return this._fatalError=e,this._responseHandler._notifyErrorToObservers(e)},M.prototype.updateCurrentObserver=function(){return this._responseHandler._updateCurrentObserver()},M.prototype.hasOngoingObservableRequests=function(){return this._responseHandler.hasOngoingObservableRequests()},M.prototype.queueObserverIfProtocolIsNotBroken=function(e){return this.isBroken()?(this.notifyFatalErrorToObserver(e),!1):this._responseHandler._queueObserver(e)},M.prototype.isBroken=function(){return!!this._fatalError},M.prototype.notifyFatalErrorToObserver=function(e){e&&e.onError&&e.onError(this._fatalError)},M.prototype.resetFailure=function(){this._responseHandler._resetFailure()},M.prototype._onLoginCompleted=function(e,t,r){this._initialized=!0,this._authToken=t,e&&(t=e.server,this._server.version||(this._server.version=t)),r&&r(e)},M.prototype._onLoginError=function(e,t){this._onProtocolError(e.message),t&&t(e)},M);function M(e,t,r,n,o,i){var r=void 0===r?{}:r,u=r.disableLosslessIntegers,r=r.useBigInt;void 0===n&&(n=function(){return null}),this._server=e||{},this._chunker=t,this._packer=this._createPacker(t),this._unpacker=this._createUnpacker(u,r),this._responseHandler=n(this),this._log=o,this._onProtocolError=i,this._fatalError=null,this._lastMessageSignature=null,this._config={disableLosslessIntegers:u,useBigInt:r}}xh.default=Y_;var Q_={},p={},ev={},JC=(Object.defineProperty(ev,"__esModule",{value:!0}),ev.epochSecondAndNanoToLocalDateTime=ev.nanoOfDayToLocalTime=ev.epochDayToDate=void 0,e),qd=JC.internal.temporalUtil,$C=qd.DAYS_0000_TO_1970,eI=qd.DAYS_PER_400_YEAR_CYCLE,tI=qd.NANOS_PER_HOUR,rI=qd.NANOS_PER_MINUTE,nI=qd.NANOS_PER_SECOND,oI=qd.SECONDS_PER_DAY,iI=qd.floorDiv,uI=qd.floorMod;function aI(e){var e=(e=(0,JC.int)(e)).add($C).subtract(60),t=(0,JC.int)(0),r=(e.lessThan(0)&&(t=(r=e.add(1).div(eI).subtract(1)).multiply(400),e=e.add(r.multiply(-eI))),e.multiply(400).add(591).div(eI)),n=e.subtract(r.multiply(365).add(r.div(4)).subtract(r.div(100)).add(r.div(400))),e=(n.lessThan(0)&&(r=r.subtract(1),n=e.subtract(r.multiply(365).add(r.div(4)).subtract(r.div(100)).add(r.div(400)))),r=r.add(t),n),t=e.multiply(5).add(2).div(153),n=t.add(2).modulo(12).add(1),e=e.subtract(t.multiply(306).add(5).div(10)).add(1),r=r.add(t.div(10));return new JC.Date(r,n,e)}function sI(e){var t=(e=(0,JC.int)(e)).div(tI),r=(e=e.subtract(t.multiply(tI))).div(rI),n=(e=e.subtract(r.multiply(rI))).div(nI),e=e.subtract(n.multiply(nI));return new JC.LocalTime(t,r,n,e)}ev.epochDayToDate=aI,ev.nanoOfDayToLocalTime=sI,ev.epochSecondAndNanoToLocalDateTime=function(e,t){var r=iI(e,oI),e=uI(e,oI).multiply(nI).add(t),t=aI(r),r=sI(e);return new JC.LocalDateTime(t.year,t.month,t.day,r.hour,r.minute,r.second,r.nanosecond)};var cI=r&&r.__assign||function(){return(cI=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},lI=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},uv=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},fI=(Object.defineProperty(p,"__esModule",{value:!0}),e),pI=yy,dI=w,hI=ev,pv=uv(x_),_v=fI.internal.temporalUtil,bI=_v.dateToEpochDay,yI=_v.localDateTimeToEpochSecond,_I=_v.localTimeToNanoOfDay;function vI(e,t,r){if(!t&&!r)return e;var n,o,i,u=Object.create(Object.getPrototypeOf(e));for(n in e)!0===Object.prototype.hasOwnProperty.call(e,n)&&(o=e[n],u[n]=(0,fI.isInt)(o)?(i=o,r?i.toBigInt():i.toNumberOrInfinity()):o);return Object.freeze(u),u}p.default=cI(cI({},pv.default),{createPoint2DTransformer:function(){return new dI.TypeTransformer({signature:88,isTypeInstance:function(e){return(0,fI.isPoint)(e)&&(null===e.z||void 0===e.z)},toStructure:function(e){return new pI.structure.Structure(88,[(0,fI.int)(e.srid),e.x,e.y])},fromStructure:function(e){pI.structure.verifyStructSize("Point2D",3,e.size);var e=lI(e.fields,3),t=e[0],r=e[1],e=e[2];return new fI.Point(t,r,e,void 0)}})},createPoint3DTransformer:function(){return new dI.TypeTransformer({signature:89,isTypeInstance:function(e){return(0,fI.isPoint)(e)&&null!==e.z&&void 0!==e.z},toStructure:function(e){return new pI.structure.Structure(89,[(0,fI.int)(e.srid),e.x,e.y,e.z])},fromStructure:function(e){pI.structure.verifyStructSize("Point3D",4,e.size);var e=lI(e.fields,4),t=e[0],r=e[1],n=e[2],e=e[3];return new fI.Point(t,r,n,e)}})},createDurationTransformer:function(){return new dI.TypeTransformer({signature:69,isTypeInstance:fI.isDuration,toStructure:function(e){var t=(0,fI.int)(e.months),r=(0,fI.int)(e.days),n=(0,fI.int)(e.seconds),e=(0,fI.int)(e.nanoseconds);return new pI.structure.Structure(69,[t,r,n,e])},fromStructure:function(e){pI.structure.verifyStructSize("Duration",4,e.size);var e=lI(e.fields,4),t=e[0],r=e[1],n=e[2],e=e[3];return new fI.Duration(t,r,n,e)}})},createLocalTimeTransformer:function(e){var t=e.disableLosslessIntegers,r=e.useBigInt;return new dI.TypeTransformer({signature:116,isTypeInstance:fI.isLocalTime,toStructure:function(e){e=_I(e.hour,e.minute,e.second,e.nanosecond);return new pI.structure.Structure(116,[e])},fromStructure:function(e){pI.structure.verifyStructSize("LocalTime",1,e.size);e=lI(e.fields,1)[0];return vI((0,hI.nanoOfDayToLocalTime)(e),t,r)}})},createTimeTransformer:function(e){var r=e.disableLosslessIntegers,n=e.useBigInt;return new dI.TypeTransformer({signature:84,isTypeInstance:fI.isTime,toStructure:function(e){var t=_I(e.hour,e.minute,e.second,e.nanosecond),e=(0,fI.int)(e.timeZoneOffsetSeconds);return new pI.structure.Structure(84,[t,e])},fromStructure:function(e){pI.structure.verifyStructSize("Time",2,e.size);var e=lI(e.fields,2),t=e[0],e=e[1],t=(0,hI.nanoOfDayToLocalTime)(t);return vI(new fI.Time(t.hour,t.minute,t.second,t.nanosecond,e),r,n)}})},createDateTransformer:function(e){var t=e.disableLosslessIntegers,r=e.useBigInt;return new dI.TypeTransformer({signature:68,isTypeInstance:fI.isDate,toStructure:function(e){e=bI(e.year,e.month,e.day);return new pI.structure.Structure(68,[e])},fromStructure:function(e){pI.structure.verifyStructSize("Date",1,e.size);e=lI(e.fields,1)[0];return vI((0,hI.epochDayToDate)(e),t,r)}})},createLocalDateTimeTransformer:function(e){var r=e.disableLosslessIntegers,n=e.useBigInt;return new dI.TypeTransformer({signature:100,isTypeInstance:fI.isLocalDateTime,toStructure:function(e){var t=yI(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond),e=(0,fI.int)(e.nanosecond);return new pI.structure.Structure(100,[t,e])},fromStructure:function(e){pI.structure.verifyStructSize("LocalDateTime",2,e.size);var e=lI(e.fields,2),t=e[0],e=e[1];return vI((0,hI.epochSecondAndNanoToLocalDateTime)(t,e),r,n)}})},createDateTimeWithZoneIdTransformer:function(e){var n=e.disableLosslessIntegers,o=e.useBigInt;return new dI.TypeTransformer({signature:102,isTypeInstance:function(e){return(0,fI.isDateTime)(e)&&null!=e.timeZoneId},toStructure:function(e){var t=yI(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond),r=(0,fI.int)(e.nanosecond),e=e.timeZoneId;return new pI.structure.Structure(102,[t,r,e])},fromStructure:function(e){pI.structure.verifyStructSize("DateTimeWithZoneId",3,e.size);var e=lI(e.fields,3),t=e[0],r=e[1],e=e[2],t=(0,hI.epochSecondAndNanoToLocalDateTime)(t,r);return vI(new fI.DateTime(t.year,t.month,t.day,t.hour,t.minute,t.second,t.nanosecond,null,e),n,o)}})},createDateTimeWithOffsetTransformer:function(e){var n=e.disableLosslessIntegers,o=e.useBigInt;return new dI.TypeTransformer({signature:70,isTypeInstance:function(e){return(0,fI.isDateTime)(e)&&null==e.timeZoneId},toStructure:function(e){var t=yI(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond),r=(0,fI.int)(e.nanosecond),e=(0,fI.int)(e.timeZoneOffsetSeconds);return new pI.structure.Structure(70,[t,r,e])},fromStructure:function(e){pI.structure.verifyStructSize("DateTimeWithZoneOffset",3,e.size);var e=lI(e.fields,3),t=e[0],r=e[1],e=e[2],t=(0,hI.epochSecondAndNanoToLocalDateTime)(t,r);return vI(new fI.DateTime(t.year,t.month,t.day,t.hour,t.minute,t.second,t.nanosecond,e,null),n,o)}})}});var mI,gI,Ev=r&&r.__extends||(mI=function(e,t){return(mI=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}mI(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),It=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Cv=(Object.defineProperty(Q_,"__esModule",{value:!0}),It(xh)),OI=It(yy),Mv=e,wI=It(p),EI=It(w),PI=Mv.internal.constants.BOLT_PROTOCOL_V2,Uv=(gI=Cv.default,Ev(SI,gI),SI.prototype._createPacker=function(e){return new OI.default.Packer(e)},SI.prototype._createUnpacker=function(e,t){return new OI.default.Unpacker(e,t)},Object.defineProperty(SI.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new EI.default(Object.values(wI.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),Object.defineProperty(SI.prototype,"version",{get:function(){return PI},enumerable:!1,configurable:!0}),SI);function SI(){return null!==gI&&gI.apply(this,arguments)||this}Q_.default=Uv;var TI,jI,Vd={},Vv={},CI=r&&r.__assign||function(){return(CI=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Jv=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},tm=(Object.defineProperty(Vv,"__esModule",{value:!0}),Jv(p)),am=(Vv.default=CI({},tm.default),r&&r.__extends||(TI=function(e,t){return(TI=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}TI(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),II=r&&r.__assign||function(){return(II=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},cm=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},dm=(Object.defineProperty(Vd,"__esModule",{value:!0}),cm(Q_)),RI=cm(w_),kI=qh,AI=I,MI=cm(Vv),NI=cm(w),xI=(e.internal.bookmarks.Bookmarks,e.internal.constants.BOLT_PROTOCOL_V3),DI=e.internal.txConfig.TxConfig,UI="context",LI="CALL dbms.cluster.routing.getRoutingTable($".concat(UI,")"),FI=new AI.StreamObserver,vm=(jI=dm.default,am(BI,jI),Object.defineProperty(BI.prototype,"version",{get:function(){return xI},enumerable:!1,configurable:!0}),Object.defineProperty(BI.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new NI.default(Object.values(MI.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),BI.prototype.transformMetadata=function(e){return"t_first"in e&&(e.result_available_after=e.t_first,delete e.t_first),"t_last"in e&&(e.result_consumed_after=e.t_last,delete e.t_last),e},BI.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=(e.boltAgent,e.authToken),o=e.notificationFilter,i=e.onError,u=e.onComplete,e=new AI.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return t._onLoginCompleted(e,n,u)}});return(0,kI.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(RI.default.hello(r,n),e,!0),e},BI.prototype.prepareToClose=function(){this.write(RI.default.goodbye(),FI,!0)},BI.prototype.beginTransaction=function(e){var e=void 0===e?{}:e,t=e.bookmarks,r=e.txConfig,n=e.database,o=e.impersonatedUser,i=e.notificationFilter,u=e.mode,a=e.beforeError,s=e.afterError,c=e.beforeComplete,e=e.afterComplete,a=new AI.ResultStreamObserver({server:this._server,beforeError:a,afterError:s,beforeComplete:c,afterComplete:e});return a.prepareToHandleSingleResponse(),(0,kI.assertDatabaseIsEmpty)(n,this._onProtocolError,a),(0,kI.assertImpersonatedUserIsEmpty)(o,this._onProtocolError,a),(0,kI.assertNotificationFilterIsEmpty)(i,this._onProtocolError,a),this.write(RI.default.begin({bookmarks:t,txConfig:r,mode:u}),a,!0),a},BI.prototype.commitTransaction=function(e){var e=void 0===e?{}:e,t=e.beforeError,r=e.afterError,n=e.beforeComplete,e=e.afterComplete,t=new AI.ResultStreamObserver({server:this._server,beforeError:t,afterError:r,beforeComplete:n,afterComplete:e});return t.prepareToHandleSingleResponse(),this.write(RI.default.commit(),t,!0),t},BI.prototype.rollbackTransaction=function(e){var e=void 0===e?{}:e,t=e.beforeError,r=e.afterError,n=e.beforeComplete,e=e.afterComplete,t=new AI.ResultStreamObserver({server:this._server,beforeError:t,afterError:r,beforeComplete:n,afterComplete:e});return t.prepareToHandleSingleResponse(),this.write(RI.default.rollback(),t,!0),t},BI.prototype.run=function(e,t,r){var r=void 0===r?{}:r,n=r.bookmarks,o=r.txConfig,i=r.database,u=r.impersonatedUser,a=r.notificationFilter,s=r.mode,c=r.beforeKeys,l=r.afterKeys,f=r.beforeError,p=r.afterError,d=r.beforeComplete,h=r.afterComplete,b=r.flush,b=void 0===b||b,y=r.highRecordWatermark,y=void 0===y?Number.MAX_VALUE:y,r=r.lowRecordWatermark,r=void 0===r?Number.MAX_VALUE:r,c=new AI.ResultStreamObserver({server:this._server,beforeKeys:c,afterKeys:l,beforeError:f,afterError:p,beforeComplete:d,afterComplete:h,highRecordWatermark:y,lowRecordWatermark:r});return(0,kI.assertDatabaseIsEmpty)(i,this._onProtocolError,c),(0,kI.assertImpersonatedUserIsEmpty)(u,this._onProtocolError,c),(0,kI.assertNotificationFilterIsEmpty)(a,this._onProtocolError,c),this.write(RI.default.runWithMetadata(e,t,{bookmarks:n,txConfig:o,mode:s}),c,!1),this.write(RI.default.pullAll(),c,b),c},BI.prototype.requestRoutingInformation=function(e){var t,r=e.routingContext,n=e.sessionContext,n=void 0===n?{}:n,o=e.onError,e=e.onCompleted,r=this.run(LI,((t={})[UI]=void 0===r?{}:r,t),II(II({},n),{txConfig:DI.empty()}));return new AI.ProcedureRouteObserver({resultObserver:r,onProtocolError:this._onProtocolError,onError:o,onCompleted:e})},BI);function BI(){return null!==jI&&jI.apply(this,arguments)||this}Vd.default=vm;var WI,zI,Om={},j={},qI=r&&r.__assign||function(){return(qI=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Sm=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Tm=(Object.defineProperty(j,"__esModule",{value:!0}),Sm(Vv)),Am=(j.default=qI({},Tm.default),r&&r.__extends||(WI=function(e,t){return(WI=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}WI(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),VI=r&&r.__assign||function(){return(VI=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},xm=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},rb=(Object.defineProperty(Om,"__esModule",{value:!0}),xm(Vd)),HI=xm(w_),GI=qh,YI=I,KI=xm(j),ZI=xm(w),By=(e.internal.bookmarks.Bookmarks,e.internal.constants),QI=By.BOLT_PROTOCOL_V4_0,XI=By.FETCH_ALL,JI=e.internal.txConfig.TxConfig,$I="context",eR="database",tR="CALL dbms.routing.getRoutingTable($".concat($I,", $").concat(eR,")"),Lm=(zI=rb.default,Am(rR,zI),Object.defineProperty(rR.prototype,"version",{get:function(){return QI},enumerable:!1,configurable:!0}),Object.defineProperty(rR.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new ZI.default(Object.values(KI.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),rR.prototype.beginTransaction=function(e){var e=void 0===e?{}:e,t=e.bookmarks,r=e.txConfig,n=e.database,o=e.impersonatedUser,i=e.notificationFilter,u=e.mode,a=e.beforeError,s=e.afterError,c=e.beforeComplete,e=e.afterComplete,a=new YI.ResultStreamObserver({server:this._server,beforeError:a,afterError:s,beforeComplete:c,afterComplete:e});return a.prepareToHandleSingleResponse(),(0,GI.assertImpersonatedUserIsEmpty)(o,this._onProtocolError,a),(0,GI.assertNotificationFilterIsEmpty)(i,this._onProtocolError,a),this.write(HI.default.begin({bookmarks:t,txConfig:r,database:n,mode:u}),a,!0),a},rR.prototype.run=function(e,t,r){var r=void 0===r?{}:r,n=r.bookmarks,o=r.txConfig,i=r.database,u=r.impersonatedUser,a=r.notificationFilter,s=r.mode,c=r.beforeKeys,l=r.afterKeys,f=r.beforeError,p=r.afterError,d=r.beforeComplete,h=r.afterComplete,b=r.flush,b=void 0===b||b,y=r.reactive,y=void 0!==y&&y,_=r.fetchSize,_=void 0===_?XI:_,v=r.highRecordWatermark,v=void 0===v?Number.MAX_VALUE:v,r=r.lowRecordWatermark,r=void 0===r?Number.MAX_VALUE:r,c=new YI.ResultStreamObserver({server:this._server,reactive:y,fetchSize:_,moreFunction:this._requestMore.bind(this),discardFunction:this._requestDiscard.bind(this),beforeKeys:c,afterKeys:l,beforeError:f,afterError:p,beforeComplete:d,afterComplete:h,highRecordWatermark:v,lowRecordWatermark:r}),l=((0,GI.assertImpersonatedUserIsEmpty)(u,this._onProtocolError,c),(0,GI.assertNotificationFilterIsEmpty)(a,this._onProtocolError,c),y);return this.write(HI.default.runWithMetadata(e,t,{bookmarks:n,txConfig:o,database:i,mode:s}),c,l&&b),y||this.write(HI.default.pull({n:_}),c,b),c},rR.prototype._requestMore=function(e,t,r){this.write(HI.default.pull({stmtId:e,n:t}),r,!0)},rR.prototype._requestDiscard=function(e,t){this.write(HI.default.discard({stmtId:e}),t,!0)},rR.prototype._noOp=function(){},rR.prototype.requestRoutingInformation=function(e){var t,r=e.routingContext,n=e.databaseName,n=void 0===n?null:n,o=e.sessionContext,o=void 0===o?{}:o,i=e.onError,e=e.onCompleted,r=this.run(tR,((t={})[$I]=void 0===r?{}:r,t[eR]=n,t),VI(VI({},o),{txConfig:JI.empty()}));return new YI.ProcedureRouteObserver({resultObserver:r,onProtocolError:this._onProtocolError,onError:i,onCompleted:e})},rR);function rR(){return null!==zI&&zI.apply(this,arguments)||this}Om.default=Lm;var nR,oR,qm={},Gm={},iR=r&&r.__assign||function(){return(iR=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},y=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},e0=(Object.defineProperty(Gm,"__esModule",{value:!0}),y(j)),Lb=(Gm.default=iR({},e0.default),r&&r.__extends||(nR=function(e,t){return(nR=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}nR(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),o0=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Rs=(Object.defineProperty(qm,"__esModule",{value:!0}),o0(Om)),uR=o0(w_),aR=I,c0=e,sR=qh,cR=o0(Gm),lR=o0(w),fR=c0.internal.constants.BOLT_PROTOCOL_V4_1,hc=(oR=Rs.default,Lb(pR,oR),Object.defineProperty(pR.prototype,"version",{get:function(){return fR},enumerable:!1,configurable:!0}),Object.defineProperty(pR.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new lR.default(Object.values(cR.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),pR.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=(e.boltAgent,e.authToken),o=e.notificationFilter,i=e.onError,u=e.onComplete,e=new aR.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return t._onLoginCompleted(e,n,u)}});return(0,sR.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(uR.default.hello(r,n,this._serversideRouting),e,!0),e},pR);function pR(e,t,r,n,o,i,u){e=oR.call(this,e,t,r,n=void 0===n?function(){return null}:n,o,i)||this;return e._serversideRouting=u,e}qm.default=hc;var dR,hR,zd={},u={},bR=r&&r.__assign||function(){return(bR=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},g0=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},S0=(Object.defineProperty(u,"__esModule",{value:!0}),g0(Gm)),rc=(u.default=bR({},S0.default),r&&r.__extends||(dR=function(e,t){return(dR=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}dR(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),Q=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},G0=(Object.defineProperty(zd,"__esModule",{value:!0}),Q(qm)),l=e,yR=Q(u),_R=Q(w),vR=l.internal.constants.BOLT_PROTOCOL_V4_2,O=(hR=G0.default,rc(mR,hR),Object.defineProperty(mR.prototype,"version",{get:function(){return vR},enumerable:!1,configurable:!0}),Object.defineProperty(mR.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new _R.default(Object.values(yR.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),mR);function mR(){return null!==hR&&hR.apply(this,arguments)||this}zd.default=O;var T={},g={},gR=r&&r.__assign||function(){return(gR=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},i=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Kt=(Object.defineProperty(g,"__esModule",{value:!0}),i(u)),$r=(g.default=gR({},Kt.default),{}),o={},OR=r&&r.__assign||function(){return(OR=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Ia=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},na=(Object.defineProperty(o,"__esModule",{value:!0}),Ia(g)),wR=(o.default=OR({},na.default),r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u}),qa=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},ER=(Object.defineProperty($r,"__esModule",{value:!0}),yy),PR=e,SR=qa(o),TR=ev,jR=Ry,CR=PR.internal.temporalUtil.localDateTimeToEpochSecond;function IR(e,t,r){e=new Intl.DateTimeFormat("en-US",{timeZone:e,year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!1,era:"narrow"}),r=(0,PR.int)(t).multiply(1e3).add((0,PR.int)(r).div(1e6)).toNumber(),e=e.formatToParts(r).reduce(function(e,t){return"era"===t.type?e.adjustEra="B"===t.value.toUpperCase()?function(e){return e.subtract(1).negate()}:jR.identity:"hour"===t.type?e.hour=(0,PR.int)(t.value).modulo(24):"literal"!==t.type&&(e[t.type]=(0,PR.int)(t.value)),e},{}),e.year=e.adjustEra(e.year),r=CR(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond);return e.timeZoneOffsetSeconds=r.subtract(t),e.hour=e.hour.modulo(24),e}function RR(e,t,r){if(!t&&!r)return e;var n,o,i,u=Object.create(Object.getPrototypeOf(e));for(n in e)!0===Object.prototype.hasOwnProperty.call(e,n)&&(o=e[n],u[n]=(0,PR.isInt)(o)?(i=o,r?i.toBigInt():i.toNumberOrInfinity()):o);return Object.freeze(u),u}$r.default={createDateTimeWithZoneIdTransformer:function(e,u){var n=e.disableLosslessIntegers,o=e.useBigInt;return SR.default.createDateTimeWithZoneIdTransformer(e).extendsWith({signature:105,fromStructure:function(e){ER.structure.verifyStructSize("DateTimeWithZoneId",3,e.size);var e=wR(e.fields,3),t=e[0],r=e[1],e=e[2],t=IR(e,t,r);return RR(new PR.DateTime(t.year,t.month,t.day,t.hour,t.minute,t.second,(0,PR.int)(r),t.timeZoneOffsetSeconds,e),n,o)},toStructure:function(e){var t=CR(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond),r=null!=e.timeZoneOffsetSeconds?e.timeZoneOffsetSeconds:(r=e.timeZoneId,i=t,o=e.nanosecond,n=IR(r,i,o),n=CR(n.year,n.month,n.day,n.hour,n.minute,n.second,o).subtract(i),i=i.subtract(n),n=IR(r,i,o),CR(n.year,n.month,n.day,n.hour,n.minute,n.second,o).subtract(i)),n=(null==e.timeZoneOffsetSeconds&&u.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.'),t.subtract(r)),o=(0,PR.int)(e.nanosecond),i=e.timeZoneId;return new ER.structure.Structure(105,[n,o,i])}})},createDateTimeWithOffsetTransformer:function(e){var n=e.disableLosslessIntegers,o=e.useBigInt;return SR.default.createDateTimeWithOffsetTransformer(e).extendsWith({signature:73,toStructure:function(e){var t=CR(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond),r=(0,PR.int)(e.nanosecond),e=(0,PR.int)(e.timeZoneOffsetSeconds),t=t.subtract(e);return new ER.structure.Structure(73,[t,r,e])},fromStructure:function(e){ER.structure.verifyStructSize("DateTimeWithZoneOffset",3,e.size);var e=wR(e.fields,3),t=e[0],r=e[1],e=e[2],t=(0,PR.int)(t).add(e),t=(0,TR.epochSecondAndNanoToLocalDateTime)(t,r);return RR(new PR.DateTime(t.year,t.month,t.day,t.hour,t.minute,t.second,t.nanosecond,e,null),n,o)}})}};var kR,AR,Fa=r&&r.__extends||(kR=function(e,t){return(kR=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}kR(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),MR=r&&r.__assign||function(){return(MR=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},b=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},oa=(Object.defineProperty(T,"__esModule",{value:!0}),b(zd)),NR=b(w_),xR=I,DR=qh,UR=b(g),LR=b($r),FR=b(w),BR=e.internal.bookmarks.Bookmarks,WR=e.internal.constants.BOLT_PROTOCOL_V4_3,fa=(AR=oa.default,Fa(zR,AR),Object.defineProperty(zR.prototype,"version",{get:function(){return WR},enumerable:!1,configurable:!0}),Object.defineProperty(zR.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new FR.default(Object.values(UR.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),zR.prototype.requestRoutingInformation=function(e){var t=e.routingContext,t=void 0===t?{}:t,r=e.databaseName,r=void 0===r?null:r,n=e.sessionContext,n=void 0===n?{}:n,o=e.onError,e=e.onCompleted,o=new xR.RouteObserver({onProtocolError:this._onProtocolError,onError:o,onCompleted:e}),e=n.bookmarks||BR.empty();return this.write(NR.default.route(t,e.values(),r),o,!0),o},zR.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=(e.boltAgent,e.authToken),o=e.notificationFilter,i=e.onError,u=e.onComplete,e=new xR.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return void 0!==e.patch_bolt&&t._applyPatches(e.patch_bolt),t._onLoginCompleted(e,n,u)}});return(0,DR.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(NR.default.hello(r,n,this._serversideRouting,["utc"]),e,!0),e},zR.prototype._applyPatches=function(e){e.includes("utc")&&this._applyUtcPatch()},zR.prototype._applyUtcPatch=function(){var t=this;this._transformer=new FR.default(Object.values(MR(MR({},UR.default),LR.default)).map(function(e){return e(t._config,t._log)}))},zR);function zR(){return null!==AR&&AR.apply(this,arguments)||this}T.default=fa;var qR,VR,P={},n=r&&r.__extends||(qR=function(e,t){return(qR=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}qR(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),HR=r&&r.__assign||function(){return(HR=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Ps=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Ec=(Object.defineProperty(P,"__esModule",{value:!0}),Ps(T)),ft=e,GR=Ps(w_),YR=I,KR=qh,ZR=Ps(o),QR=Ps($r),XR=Ps(w),_s=ft.internal.constants,JR=_s.BOLT_PROTOCOL_V4_4,$R=_s.FETCH_ALL,ek=ft.internal.bookmarks.Bookmarks,lc=(VR=Ec.default,n(tk,VR),Object.defineProperty(tk.prototype,"version",{get:function(){return JR},enumerable:!1,configurable:!0}),Object.defineProperty(tk.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new XR.default(Object.values(ZR.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),tk.prototype.requestRoutingInformation=function(e){var t=e.routingContext,t=void 0===t?{}:t,r=e.databaseName,r=void 0===r?null:r,n=e.impersonatedUser,n=void 0===n?null:n,o=e.sessionContext,o=void 0===o?{}:o,i=e.onError,e=e.onCompleted,i=new YR.RouteObserver({onProtocolError:this._onProtocolError,onError:i,onCompleted:e}),e=o.bookmarks||ek.empty();return this.write(GR.default.routeV4x4(t,e.values(),{databaseName:r,impersonatedUser:n}),i,!0),i},tk.prototype.run=function(e,t,r){var r=void 0===r?{}:r,n=r.bookmarks,o=r.txConfig,i=r.database,u=r.mode,a=r.impersonatedUser,s=r.notificationFilter,c=r.beforeKeys,l=r.afterKeys,f=r.beforeError,p=r.afterError,d=r.beforeComplete,h=r.afterComplete,b=r.flush,b=void 0===b||b,y=r.reactive,y=void 0!==y&&y,_=r.fetchSize,_=void 0===_?$R:_,v=r.highRecordWatermark,v=void 0===v?Number.MAX_VALUE:v,r=r.lowRecordWatermark,r=void 0===r?Number.MAX_VALUE:r,c=new YR.ResultStreamObserver({server:this._server,reactive:y,fetchSize:_,moreFunction:this._requestMore.bind(this),discardFunction:this._requestDiscard.bind(this),beforeKeys:c,afterKeys:l,beforeError:f,afterError:p,beforeComplete:d,afterComplete:h,highRecordWatermark:v,lowRecordWatermark:r}),l=((0,KR.assertNotificationFilterIsEmpty)(s,this._onProtocolError,c),y);return this.write(GR.default.runWithMetadata(e,t,{bookmarks:n,txConfig:o,database:i,mode:u,impersonatedUser:a}),c,l&&b),y||this.write(GR.default.pull({n:_}),c,b),c},tk.prototype.beginTransaction=function(e){var e=void 0===e?{}:e,t=e.bookmarks,r=e.txConfig,n=e.database,o=e.mode,i=e.impersonatedUser,u=e.notificationFilter,a=e.beforeError,s=e.afterError,c=e.beforeComplete,e=e.afterComplete,a=new YR.ResultStreamObserver({server:this._server,beforeError:a,afterError:s,beforeComplete:c,afterComplete:e});return a.prepareToHandleSingleResponse(),(0,KR.assertNotificationFilterIsEmpty)(u,this._onProtocolError,a),this.write(GR.default.begin({bookmarks:t,txConfig:r,database:n,mode:o,impersonatedUser:i}),a,!0),a},tk.prototype._applyUtcPatch=function(){var t=this;this._transformer=new XR.default(Object.values(HR(HR({},ZR.default),QR.default)).map(function(e){return e(t._config,t._log)}))},tk);function tk(){return null!==VR&&VR.apply(this,arguments)||this}P.default=lc;var ms={},Ss={},rk=r&&r.__assign||function(){return(rk=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},nk=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Kr=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},ok=(Object.defineProperty(Ss,"__esModule",{value:!0}),yy),ik=e,uk=Kr(o),ws=Kr($r);Ss.default=rk(rk(rk({},uk.default),ws.default),{createNodeTransformer:function(e){return uk.default.createNodeTransformer(e).extendsWith({fromStructure:function(e){ok.structure.verifyStructSize("Node",4,e.size);var e=nk(e.fields,4),t=e[0],r=e[1],n=e[2],e=e[3];return new ik.Node(t,r,n,e)}})},createRelationshipTransformer:function(e){return uk.default.createRelationshipTransformer(e).extendsWith({fromStructure:function(e){ok.structure.verifyStructSize("Relationship",8,e.size);var e=nk(e.fields,8),t=e[0],r=e[1],n=e[2],o=e[3],i=e[4],u=e[5],a=e[6],e=e[7];return new ik.Relationship(t,r,n,o,i,u,a,e)}})},createUnboundRelationshipTransformer:function(e){return uk.default.createUnboundRelationshipTransformer(e).extendsWith({fromStructure:function(e){ok.structure.verifyStructSize("UnboundRelationship",4,e.size);var e=nk(e.fields,4),t=e[0],r=e[1],n=e[2],e=e[3];return new ik.UnboundRelationship(t,r,n,e)}})}});var ak,sk,jl=r&&r.__extends||(ak=function(e,t){return(ak=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}ak(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Nl=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},ys=(Object.defineProperty(ms,"__esModule",{value:!0}),Nl(P)),ck=qh,lk=Nl(Ss),fk=Nl(w),pk=Nl(w_),dk=I,hk=e.internal.constants.BOLT_PROTOCOL_V5_0,yc=(sk=ys.default,jl(bk,sk),Object.defineProperty(bk.prototype,"version",{get:function(){return hk},enumerable:!1,configurable:!0}),Object.defineProperty(bk.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new fk.default(Object.values(lk.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),bk.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=(e.boltAgent,e.authToken),o=e.notificationFilter,i=e.onError,u=e.onComplete,e=new dk.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return t._onLoginCompleted(e,n,u)}});return(0,ck.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(pk.default.hello(r,n,this._serversideRouting),e,!0),e},bk);function bk(){return null!==sk&&sk.apply(this,arguments)||this}ms.default=yc;var yk,_k,s={},cp={},vk=r&&r.__assign||function(){return(vk=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},_p=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},mp=(Object.defineProperty(cp,"__esModule",{value:!0}),_p(Ss)),Mp=(cp.default=vk({},mp.default),r&&r.__extends||(yk=function(e,t){return(yk=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}yk(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),mk=r&&r.__assign||function(){return(mk=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},bs=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},jp=(Object.defineProperty(s,"__esModule",{value:!0}),bs(ms)),gk=qh,Ok=bs(cp),wk=bs(w),Ek=bs(w_),Pk=I,Sk=e.internal.constants.BOLT_PROTOCOL_V5_1,Zf=(_k=jp.default,Mp(Tk,_k),Object.defineProperty(Tk.prototype,"version",{get:function(){return Sk},enumerable:!1,configurable:!0}),Object.defineProperty(Tk.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new wk.default(Object.values(Ok.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),Object.defineProperty(Tk.prototype,"supportsReAuth",{get:function(){return!0},enumerable:!1,configurable:!0}),Tk.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=(e.boltAgent,e.authToken),o=e.notificationFilter,i=e.onError,u=e.onComplete,a={},e=new Pk.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return a.metadata=e,t._onLoginCompleted(e)}});return(0,gk.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(Ek.default.hello5x1(r,this._serversideRouting),e,!1),this.logon({authToken:n,onComplete:function(e){return u(mk(mk({},e),a.metadata))},onError:i,flush:!0})},Tk.prototype.logon=function(e){var t=this,e=void 0===e?{}:e,r=e.authToken,n=e.onComplete,o=e.onError,e=e.flush,i=new Pk.LoginObserver({onCompleted:function(){return t._onLoginCompleted(null,r,n)},onError:function(e){return t._onLoginError(e,o)}});return this.write(Ek.default.logon(r),i,e),i},Tk.prototype.logoff=function(e){var e=void 0===e?{}:e,t=e.onComplete,r=e.onError,e=e.flush,t=new Pk.LogoffObserver({onCompleted:t,onError:r});return this.write(Ek.default.logoff(),t,e),t},Tk);function Tk(){return null!==_k&&_k.apply(this,arguments)||this}s.default=Zf;var jk,Ck,Dp={},hs={},Ik=r&&r.__assign||function(){return(Ik=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},ra=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},sp=(Object.defineProperty(hs,"__esModule",{value:!0}),ra(cp)),gf=(hs.default=Ik({},sp.default),r&&r.__extends||(jk=function(e,t){return(jk=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}jk(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),Rk=r&&r.__assign||function(){return(Rk=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},m=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Bp=(Object.defineProperty(Dp,"__esModule",{value:!0}),m(s)),kk=m(hs),Ak=m(w),Mk=m(w_),Nk=I,Zp=e.internal.constants,xk=Zp.BOLT_PROTOCOL_V5_2,Dk=Zp.FETCH_ALL,h=(Ck=Bp.default,gf(Uk,Ck),Object.defineProperty(Uk.prototype,"version",{get:function(){return xk},enumerable:!1,configurable:!0}),Object.defineProperty(Uk.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new Ak.default(Object.values(kk.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),Object.defineProperty(Uk.prototype,"supportsReAuth",{get:function(){return!0},enumerable:!1,configurable:!0}),Uk.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=(e.boltAgent,e.authToken),o=e.notificationFilter,i=e.onError,u=e.onComplete,a={},e=new Nk.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return a.metadata=e,t._onLoginCompleted(e)}});return this.write(Mk.default.hello5x2(r,o,this._serversideRouting),e,!1),this.logon({authToken:n,onComplete:function(e){return u(Rk(Rk({},e),a.metadata))},onError:i,flush:!0})},Uk.prototype.beginTransaction=function(e){var e=void 0===e?{}:e,t=e.bookmarks,r=e.txConfig,n=e.database,o=e.mode,i=e.impersonatedUser,u=e.notificationFilter,a=e.beforeError,s=e.afterError,c=e.beforeComplete,e=e.afterComplete,a=new Nk.ResultStreamObserver({server:this._server,beforeError:a,afterError:s,beforeComplete:c,afterComplete:e});return a.prepareToHandleSingleResponse(),this.write(Mk.default.begin({bookmarks:t,txConfig:r,database:n,mode:o,impersonatedUser:i,notificationFilter:u}),a,!0),a},Uk.prototype.run=function(e,t,r){var r=void 0===r?{}:r,n=r.bookmarks,o=r.txConfig,i=r.database,u=r.mode,a=r.impersonatedUser,s=r.notificationFilter,c=r.beforeKeys,l=r.afterKeys,f=r.beforeError,p=r.afterError,d=r.beforeComplete,h=r.afterComplete,b=r.flush,b=void 0===b||b,y=r.reactive,y=void 0!==y&&y,_=r.fetchSize,_=void 0===_?Dk:_,v=r.highRecordWatermark,v=void 0===v?Number.MAX_VALUE:v,r=r.lowRecordWatermark,r=void 0===r?Number.MAX_VALUE:r,c=new Nk.ResultStreamObserver({server:this._server,reactive:y,fetchSize:_,moreFunction:this._requestMore.bind(this),discardFunction:this._requestDiscard.bind(this),beforeKeys:c,afterKeys:l,beforeError:f,afterError:p,beforeComplete:d,afterComplete:h,highRecordWatermark:v,lowRecordWatermark:r}),l=y;return this.write(Mk.default.runWithMetadata(e,t,{bookmarks:n,txConfig:o,database:i,mode:u,impersonatedUser:a,notificationFilter:s}),c,l&&b),y||this.write(Mk.default.pull({n:_}),c,b),c},Uk);function Uk(){return null!==Ck&&Ck.apply(this,arguments)||this}Dp.default=h;var Lk,Fk,lp={},Qp={},Bk=r&&r.__assign||function(){return(Bk=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},ss=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},od=(Object.defineProperty(Qp,"__esModule",{value:!0}),ss(hs)),gp=(Qp.default=Bk({},od.default),r&&r.__extends||(Lk=function(e,t){return(Lk=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Lk(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),Wk=r&&r.__assign||function(){return(Wk=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},cd=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},ed=(Object.defineProperty(lp,"__esModule",{value:!0}),cd(Dp)),zk=cd(Qp),qk=cd(w),Vk=cd(w_),Hk=I,Gk=e.internal.constants.BOLT_PROTOCOL_V5_3,hd=(Fk=ed.default,gp(Yk,Fk),Object.defineProperty(Yk.prototype,"version",{get:function(){return Gk},enumerable:!1,configurable:!0}),Object.defineProperty(Yk.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new qk.default(Object.values(zk.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),Yk.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=e.boltAgent,o=e.authToken,i=e.notificationFilter,u=e.onError,a=e.onComplete,s={},e=new Hk.LoginObserver({onError:function(e){return t._onLoginError(e,u)},onCompleted:function(e){return s.metadata=e,t._onLoginCompleted(e)}});return this.write(Vk.default.hello5x3(r,n,i,this._serversideRouting),e,!1),this.logon({authToken:o,onComplete:function(e){return a(Wk(Wk({},e),s.metadata))},onError:u,flush:!0})},Yk);function Yk(){return null!==Fk&&Fk.apply(this,arguments)||this}lp.default=hd;var Kk,Zk,kd={},Bd={},Qk=r&&r.__assign||function(){return(Qk=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Dd=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Ph=(Object.defineProperty(Bd,"__esModule",{value:!0}),Dd(Qp)),Yl=(Bd.default=Qk({},Ph.default),r&&r.__extends||(Kk=function(e,t){return(Kk=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Kk(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),oh=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},ll=(Object.defineProperty(kd,"__esModule",{value:!0}),oh(lp)),Xk=oh(Bd),Jk=oh(w_),$k=I,eA=oh(w),tA=e.internal.constants.BOLT_PROTOCOL_V5_4,Il=(Zk=ll.default,Yl(rA,Zk),Object.defineProperty(rA.prototype,"version",{get:function(){return tA},enumerable:!1,configurable:!0}),Object.defineProperty(rA.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new eA.default(Object.values(Xk.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),rA.prototype.telemetry=function(e,t){var e=e.api,t=void 0===t?{}:t,r=t.onError,t=t.onCompleted,t=new $k.TelemetryObserver({onCompleted:t,onError:r});return this.write(Jk.default.telemetry({api:e}),t,!1),t},rA);function rA(){return null!==Zk&&Zk.apply(this,arguments)||this}kd.default=Il;var ih={},nA=(Object.defineProperty(ih,"__esModule",{value:!0}),e);function oA(){}function iA(e){return e}var uA={onNext:oA,onCompleted:oA,onError:oA};function aA(e){var e=void 0===e?{}:e,t=e.transformMetadata,r=e.log,e=e.observer;this._pendingObservers=[],this._log=r,this._transformMetadata=t||iA,this._observer=Object.assign({onObserversCountChange:oA,onError:oA,onFailure:oA,onErrorApplyTransformation:iA},e)}Object.defineProperty(aA.prototype,"currentFailure",{get:function(){return this._currentFailure},enumerable:!1,configurable:!0}),aA.prototype.handleResponse=function(e){var t=e.fields[0];switch(e.signature){case 113:this._log.isDebugEnabled()&&this._log.debug("S: RECORD ".concat(nA.json.stringify(e))),this._currentObserver.onNext(t);break;case 112:this._log.isDebugEnabled()&&this._log.debug("S: SUCCESS ".concat(nA.json.stringify(e)));try{var r=this._transformMetadata(t);this._currentObserver.onCompleted(r)}finally{this._updateCurrentObserver()}break;case 127:this._log.isDebugEnabled()&&this._log.debug("S: FAILURE ".concat(nA.json.stringify(e)));try{var n=function(e){{if("Neo.TransientError.Transaction.Terminated"===e)return"Neo.ClientError.Transaction.Terminated";if("Neo.TransientError.Transaction.LockClientStopped"===e)return"Neo.ClientError.Transaction.LockClientStopped"}return e}(t.code),o=(0,nA.newError)(t.message,n);this._currentFailure=this._observer.onErrorApplyTransformation(o),this._currentObserver.onError(this._currentFailure)}finally{this._updateCurrentObserver(),this._observer.onFailure(this._currentFailure)}break;case 126:this._log.isDebugEnabled()&&this._log.debug("S: IGNORED ".concat(nA.json.stringify(e)));try{this._currentFailure&&this._currentObserver.onError?this._currentObserver.onError(this._currentFailure):this._currentObserver.onError&&this._currentObserver.onError((0,nA.newError)("Ignored either because of an error or RESET"))}finally{this._updateCurrentObserver()}break;default:this._observer.onError((0,nA.newError)("Unknown Bolt protocol message: "+e))}},aA.prototype._updateCurrentObserver=function(){this._currentObserver=this._pendingObservers.shift(),this._observer.onObserversCountChange(this._observersCount)},Object.defineProperty(aA.prototype,"_observersCount",{get:function(){return null==this._currentObserver?this._pendingObservers.length:this._pendingObservers.length+1},enumerable:!1,configurable:!0}),aA.prototype._queueObserver=function(e){return(e=e||uA).onCompleted=e.onCompleted||oA,e.onError=e.onError||oA,e.onNext=e.onNext||oA,void 0===this._currentObserver?this._currentObserver=e:this._pendingObservers.push(e),this._observer.onObserversCountChange(this._observersCount),!0},aA.prototype._notifyErrorToObservers=function(e){for(this._currentObserver&&this._currentObserver.onError&&this._currentObserver.onError(e);0<this._pendingObservers.length;){var t=this._pendingObservers.shift();t&&t.onError&&t.onError(e)}},aA.prototype.hasOngoingObservableRequests=function(){return null!=this._currentObserver||0<this._pendingObservers.length},aA.prototype._resetFailure=function(){this._currentFailure=null},ih.default=aA;var sA,df=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},cA=(Object.defineProperty(Nh,"__esModule",{value:!0}),e),lA=df(xh),fA=df(Q_),pA=df(Vd),dA=df(Om),hA=df(qm),bA=df(zd),yA=df(T),_A=df(P),vA=df(ms),mA=df(s),gA=df(Dp),OA=df(lp),wA=df(kd),EA=df(ih);Nh.default=function(e){var t=(e=void 0===e?{}:e).version,r=e.chunker,n=e.dechunker,o=e.channel,i=e.disableLosslessIntegers,u=e.useBigInt,a=e.serversideRouting,s=e.server,c=e.log,l=e.observer,f=t,p=s,d=r,h={disableLosslessIntegers:i,useBigInt:u},b=a,y=function(t){var r=new EA.default({transformMetadata:t.transformMetadata.bind(t),log:c,observer:l});return o.onerror=l.onError.bind(l),o.onmessage=function(e){return n.write(e)},n.onmessage=function(e){try{r.handleResponse(t.unpack(e))}catch(e){return l.onError(e)}},r},_=l.onProtocolError.bind(l),v=c;switch(f){case 1:return new lA.default(p,d,h,y,v,_);case 2:return new fA.default(p,d,h,y,v,_);case 3:return new pA.default(p,d,h,y,v,_);case 4:return new dA.default(p,d,h,y,v,_);case 4.1:return new hA.default(p,d,h,y,v,_,b);case 4.2:return new bA.default(p,d,h,y,v,_,b);case 4.3:return new yA.default(p,d,h,y,v,_,b);case 4.4:return new _A.default(p,d,h,y,v,_,b);case 5:return new vA.default(p,d,h,y,v,_,b);case 5.1:return new mA.default(p,d,h,y,v,_,b);case 5.2:return new gA.default(p,d,h,y,v,_,b);case 5.3:return new OA.default(p,d,h,y,v,_,b);case 5.4:return new wA.default(p,d,h,y,v,_,b);default:throw(0,cA.newError)("Unknown Bolt protocol version: "+f)}},Eh=E,sA=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),C=r&&r.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||sA(t,e,r)},Ed=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(Eh,"__esModule",{value:!0}),Eh.RawRoutingTable=Eh.BoltProtocol=void 0,ds=Ed(Gl),Wd=Ed(Nh),gh=Ed(T),Ed=Ed(Xh),C(I,Eh),Eh.BoltProtocol=gh.default,Eh.RawRoutingTable=Ed.default,Eh.default={handshake:ds.default,create:Wd.default};tb={},eb={},Object.defineProperty(eb,"__esModule",{value:!0}),eb.DEFAULT_ACQUISITION_TIMEOUT=eb.DEFAULT_MAX_SIZE=void 0,eb.DEFAULT_MAX_SIZE=100,eb.DEFAULT_ACQUISITION_TIMEOUT=6e4,PA.defaultConfig=function(){return new PA(100,6e4)},PA.fromDriverConfig=function(e){return new PA(TA(e.maxConnectionPoolSize)?e.maxConnectionPoolSize:100,TA(e.connectionAcquisitionTimeout)?e.connectionAcquisitionTimeout:6e4)},Ob=PA;function PA(e,t){this.maxSize=SA(e,100),this.acquisitionTimeout=SA(t,6e4)}function SA(e,t){return 0===e||e?e:t}function TA(e){return 0===e||e}eb.default=Ob;var Rb={},jA=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},CA=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},Kb=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},IA=(Object.defineProperty(Rb,"__esModule",{value:!0}),Kb(eb)),RA=e,kA=RA.internal.logger.Logger,$b=(AA.prototype.acquire=function(o,i,u){var a=this,s=i.asKey(),c=this._acquireRequests;return c[s]||(c[s]=[]),new Promise(function(e,t){var r=null,n=setTimeout(function(){var e,t=c[s];t&&(c[s]=t.filter(function(e){return e!==r})),r.isCompleted()||(t=a.activeResourceCount(i),e=a.has(i)?a._pools[s].length:0,r.reject((0,RA.newError)("Connection acquisition timed out in ".concat(a._acquisitionTimeout," ms. Pool status: Active conn count = ").concat(t,", Idle conn count = ").concat(e,"."))))},a._acquisitionTimeout),r=new NA(s,o,u,e,t,n,a._log);c[s].push(r),a._processPendingAcquireRequests(i)})},AA.prototype.purge=function(e){return this._purgeKey(e.asKey())},AA.prototype.apply=function(e,t){e=e.asKey();e in this._pools&&this._pools[e].apply(t)},AA.prototype.close=function(){return jA(this,void 0,void 0,function(){var t=this;return CA(this,function(e){switch(e.label){case 0:return this._closed=!0,[4,Promise.all(Object.keys(this._pools).map(function(e){return t._purgeKey(e)}))];case 1:return[2,e.sent()]}})})},AA.prototype.keepAll=function(e){var t=this,r=e.map(function(e){return e.asKey()}),e=Object.keys(this._pools).filter(function(e){return-1===r.indexOf(e)});return Promise.all(e.map(function(e){return t._purgeKey(e)}))},AA.prototype.has=function(e){return e.asKey()in this._pools},AA.prototype.activeResourceCount=function(e){return this._activeResourceCounts[e.asKey()]||0},AA.prototype._getOrInitializePoolFor=function(e){var t=this._pools[e];return t||(t=new FA,this._pools[e]=t,this._pendingCreates[e]=0),t},AA.prototype._acquire=function(a,s,c){return jA(this,void 0,void 0,function(){var t,r,n,o,i,u=this;return CA(this,function(e){switch(e.label){case 0:if(this._closed)throw(0,RA.newError)("Pool is closed, it is no more able to serve requests.");if(t=s.asKey(),r=this._getOrInitializePoolFor(t),c)return[3,6];e.label=1;case 1:return r.length?(n=r.pop(),this._removeIdleObserver&&this._removeIdleObserver(n),[4,this._validateOnAcquire(a,n)]):[3,6];case 2:return e.sent()?(MA(t,this._activeResourceCounts),this._log.isDebugEnabled()&&this._log.debug("".concat(n," acquired from the pool ").concat(t)),[2,{resource:n,pool:r}]):[3,3];case 3:return r.removeInUse(n),[4,this._destroy(n)];case 4:e.sent(),e.label=5;case 5:return[3,1];case 6:if(0<this._maxSize&&this.activeResourceCount(s)+this._pendingCreates[t]>=this._maxSize)return[2,{resource:null,pool:r}];this._pendingCreates[t]=this._pendingCreates[t]+1,e.label=7;case 7:return(e.trys.push([7,,11,12]),this.activeResourceCount(s)+r.length>=this._maxSize&&c)?(i=r.pop(),this._removeIdleObserver&&this._removeIdleObserver(i),r.removeInUse(i),[4,this._destroy(i)]):[3,9];case 8:e.sent(),e.label=9;case 9:return[4,this._create(a,s,function(e,t){return u._release(e,t,r)})];case 10:return o=e.sent(),r.pushInUse(o),MA(t,this._activeResourceCounts),this._log.isDebugEnabled()&&this._log.debug("".concat(o," created for the pool ").concat(t)),[3,12];case 11:return this._pendingCreates[t]=this._pendingCreates[t]-1,[7];case 12:return[2,{resource:o,pool:r}]}})})},AA.prototype._release=function(u,a,s){return jA(this,void 0,void 0,function(){var o,i=this;return CA(this,function(e){switch(e.label){case 0:o=u.asKey(),e.label=1;case 1:return(e.trys.push([1,,9,10]),s.isActive())?[4,this._validateOnRelease(a)]:[3,6];case 2:return e.sent()?[3,4]:(this._log.isDebugEnabled()&&this._log.debug("".concat(a," destroyed and can't be released to the pool ").concat(o," because it is not functional")),s.removeInUse(a),[4,this._destroy(a)]);case 3:return e.sent(),[3,5];case 4:this._installIdleObserver&&this._installIdleObserver(a,{onError:function(e){i._log.debug("Idle connection ".concat(a," destroyed because of error: ").concat(e));e=i._pools[o];e&&(i._pools[o]=e.filter(function(e){return e!==a}),e.removeInUse(a)),i._destroy(a).catch(function(){})}}),s.push(a),this._log.isDebugEnabled()&&this._log.debug("".concat(a," released to the pool ").concat(o)),e.label=5;case 5:return[3,8];case 6:return this._log.isDebugEnabled()&&this._log.debug("".concat(a," destroyed and can't be released to the pool ").concat(o," because pool has been purged")),s.removeInUse(a),[4,this._destroy(a)];case 7:e.sent(),e.label=8;case 8:return[3,10];case 9:return t=o,r=this._activeResourceCounts,0<(n=(r[t]||0)-1)?r[t]=n:delete r[t],this._processPendingAcquireRequests(u),[7];case 10:return[2]}var t,r,n})})},AA.prototype._purgeKey=function(o){return jA(this,void 0,void 0,function(){var t,r,n;return CA(this,function(e){switch(e.label){case 0:if(t=this._pools[o],r=[],!t)return[3,2];for(;t.length;)n=t.pop(),this._removeIdleObserver&&this._removeIdleObserver(n),r.push(this._destroy(n));return t.close(),delete this._pools[o],[4,Promise.all(r)];case 1:e.sent(),e.label=2;case 2:return[2]}})})},AA.prototype._processPendingAcquireRequests=function(r){var n,o=this,i=r.asKey(),e=this._acquireRequests[i];e&&((n=e.shift())?this._acquire(n.context,r,n.requireNew).catch(function(e){return n.reject(e),{resource:null}}).then(function(e){var t=e.resource,e=e.pool;t?n.isCompleted()?o._release(r,t,e):n.resolve(t):n.isCompleted()||(o._acquireRequests[i]||(o._acquireRequests[i]=[]),o._acquireRequests[i].unshift(n))}):delete this._acquireRequests[i])},AA);function AA(e){var e=void 0===e?{}:e,t=e.create,t=void 0===t?function(e,t,r){return Promise.resolve()}:t,r=e.destroy,r=void 0===r?function(e){return Promise.resolve()}:r,n=e.validateOnAcquire,n=void 0===n?function(e,t){return!0}:n,o=e.validateOnRelease,o=void 0===o?function(e){return!0}:o,i=e.installIdleObserver,i=void 0===i?function(e,t){}:i,u=e.removeIdleObserver,u=void 0===u?function(e){}:u,a=e.config,a=void 0===a?IA.default.defaultConfig():a,e=e.log,e=void 0===e?kA.noOp():e;this._create=t,this._destroy=r,this._validateOnAcquire=n,this._validateOnRelease=o,this._installIdleObserver=i,this._removeIdleObserver=u,this._maxSize=a.maxSize,this._acquisitionTimeout=a.acquisitionTimeout,this._pools={},this._pendingCreates={},this._acquireRequests={},this._activeResourceCounts={},this._release=this._release.bind(this),this._log=e,this._closed=!1}function MA(e,t){var r=t[e]||0;t[e]=r+1}Object.defineProperty(xA.prototype,"context",{get:function(){return this._context},enumerable:!1,configurable:!0}),Object.defineProperty(xA.prototype,"requireNew",{get:function(){return this._config.requireNew||!1},enumerable:!1,configurable:!0}),xA.prototype.isCompleted=function(){return this._completed},xA.prototype.resolve=function(e){this._completed||(this._completed=!0,clearTimeout(this._timeoutId),this._log.isDebugEnabled()&&this._log.debug("".concat(e," acquired from the pool ").concat(this._key)),this._resolve(e))},xA.prototype.reject=function(e){this._completed||(this._completed=!0,clearTimeout(this._timeoutId),this._reject(e))};var NA=xA;function xA(e,t,r,n,o,i,u){this._key=e,this._context=t,this._resolve=n,this._reject=o,this._timeoutId=i,this._log=u,this._completed=!1,this._config=r||{}}BA.prototype.isActive=function(){return this._active},BA.prototype.close=function(){this._active=!1,this._elements=[],this._elementsInUse=new Set},BA.prototype.filter=function(e){return this._elements=this._elements.filter(e),this},BA.prototype.apply=function(e){this._elements.forEach(e),this._elementsInUse.forEach(e)},Object.defineProperty(BA.prototype,"length",{get:function(){return this._elements.length},enumerable:!1,configurable:!0}),BA.prototype.pop=function(){var e=this._elements.pop();return this._elementsInUse.add(e),e},BA.prototype.push=function(e){return this._elementsInUse.delete(e),this._elements.push(e)},BA.prototype.pushInUse=function(e){this._elementsInUse.add(e)},BA.prototype.removeInUse=function(e){this._elementsInUse.delete(e)};var DA,UA,LA,FA=BA;function BA(){this._active=!0,this._elements=[],this._elementsInUse=new Set}Rb.default=$b,ry=tb,DA=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),UA=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),ny=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&DA(t,e,r);return UA(t,e),t},oy=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(ry,"__esModule",{value:!0}),ry.DEFAULT_MAX_SIZE=ry.DEFAULT_ACQUISITION_TIMEOUT=ry.PoolConfig=ry.Pool=void 0,LA=ny(eb),ry.PoolConfig=LA.default,Object.defineProperty(ry,"DEFAULT_ACQUISITION_TIMEOUT",{enumerable:!0,get:function(){return LA.DEFAULT_ACQUISITION_TIMEOUT}}),Object.defineProperty(ry,"DEFAULT_MAX_SIZE",{enumerable:!0,get:function(){return LA.DEFAULT_MAX_SIZE}}),ny=oy(Rb),ry.Pool=ny.default,ry.default=ny.default;var WA,Ub={},fy={},Op=r&&r.__extends||(WA=function(e,t){return(WA=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}WA(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(fy,"__esModule",{value:!0});Op(qA,zA=e.ConnectionProvider),qA.prototype.acquireConnection=function(e){e=void 0===e?{}:e,e.accessMode,e.database,e.bookmarks,e=this._connection;return this._connection=null,Promise.resolve(e)};var zA,Sb=qA;function qA(e){var t=zA.call(this)||this;return t._connection=e,t}fy.default=Sb;var VA,xb={},hy={},Dy={},ub=r&&r.__extends||(VA=function(e,t){return(VA=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}VA(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(Dy,"__esModule",{value:!0});ub(GA,HA=e.Connection),Object.defineProperty(GA.prototype,"id",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(GA.prototype,"databaseId",{get:function(){throw new Error("not implemented")},set:function(e){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(GA.prototype,"authToken",{get:function(){throw new Error("not implemented")},set:function(e){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(GA.prototype,"supportsReAuth",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(GA.prototype,"creationTimestamp",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(GA.prototype,"idleTimestamp",{get:function(){throw new Error("not implemented")},set:function(e){throw new Error("not implemented")},enumerable:!1,configurable:!0}),GA.prototype.protocol=function(){throw new Error("not implemented")},Object.defineProperty(GA.prototype,"address",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(GA.prototype,"version",{get:function(){throw new Error("not implemented")},set:function(e){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(GA.prototype,"server",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),GA.prototype.connect=function(e,t,r,n){throw new Error("not implemented")},GA.prototype.write=function(e,t,r){throw new Error("not implemented")},GA.prototype.close=function(){throw new Error("not implemented")},GA.prototype.handleAndTransformError=function(e,t){return this._errorHandler?this._errorHandler.handleAndTransformError(e,t,this):e};var HA,fl=GA;function GA(e){var t=HA.call(this)||this;return t._errorHandler=e,t}Dy.default=fl;var YA,t_={},Kl=r&&r.__extends||(YA=function(e,t){return(YA=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}YA(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),KA=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},ZA=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},f_=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},QA=(Object.defineProperty(t_,"__esModule",{value:!0}),t_.createChannelConnection=void 0,pf),XA=e,Xy=f_(Dy),JA=f_(E),$A=XA.error.PROTOCOL_ERROR,eM=XA.internal.logger.Logger,tM=0;t_.createChannelConnection=function(i,u,a,s,c,e){void 0===c&&(c=null);var l=(e=void 0===e?function(e){return new QA.Channel(e)}:e)(new QA.ChannelConfig(i,u,a.errorCode()));return JA.default.handshake(l,s).then(function(e){var r=e.protocolVersion,e=e.consumeRemainingBuffer,n=new QA.Chunker(l),o=new QA.Dechunker,t=new nM(l,a,i,s,u.disableLosslessIntegers,c,n,u.notificationFilter,function(t){return JA.default.create({version:r,channel:l,chunker:n,dechunker:o,disableLosslessIntegers:u.disableLosslessIntegers,useBigInt:u.useBigInt,serversideRouting:c,server:t.server,log:t.logger,observer:{onObserversCountChange:t._handleOngoingRequestsNumberChange.bind(t),onError:t._handleFatalError.bind(t),onFailure:t._resetOnFailure.bind(t),onProtocolError:t._handleProtocolError.bind(t),onErrorApplyTransformation:function(e){return t.handleAndTransformError(e,t._address)}}})},u.telemetryDisabled);return e(function(e){return o.write(e)}),t}).catch(function(e){return l.close().then(function(){throw e})})};rM=Xy.default,Kl(N,rM),N.prototype.beginTransaction=function(e){return this._sendTelemetryIfEnabled(e),this._protocol.beginTransaction(e)},N.prototype.run=function(e,t,r){return this._sendTelemetryIfEnabled(r),this._protocol.run(e,t,r)},N.prototype._sendTelemetryIfEnabled=function(e){this._telemetryDisabledConnection||this._telemetryDisabledDriverConfig||null==e||null==e.apiTelemetryConfig||this._protocol.telemetry({api:e.apiTelemetryConfig.api},{onCompleted:e.apiTelemetryConfig.onTelemetrySuccess,onError:e.beforeError})},N.prototype.commitTransaction=function(e){return this._protocol.commitTransaction(e)},N.prototype.rollbackTransaction=function(e){return this._protocol.rollbackTransaction(e)},N.prototype.getProtocolVersion=function(){return this._protocol.version},Object.defineProperty(N.prototype,"authToken",{get:function(){return this._authToken},set:function(e){this._authToken=e},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"supportsReAuth",{get:function(){return this._protocol.supportsReAuth},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"databaseId",{get:function(){return this._dbConnectionId},set:function(e){this._dbConnectionId=e},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"idleTimestamp",{get:function(){return this._idleTimestamp},set:function(e){this._idleTimestamp=e},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"creationTimestamp",{get:function(){return this._creationTimestamp},enumerable:!1,configurable:!0}),N.prototype.connect=function(t,n,o,i){return KA(this,void 0,void 0,function(){var r=this;return ZA(this,function(e){switch(e.label){case 0:if(this._protocol.initialized&&!this._protocol.supportsReAuth)throw(0,XA.newError)("Connection does not support re-auth");return this._authToken=o,this._protocol.initialized?[3,2]:[4,this._initialize(t,n,o)];case 1:return[2,e.sent()];case 2:return i?[4,new Promise(function(e,t){r._protocol.logoff({onError:t}),r._protocol.logon({authToken:o,onError:t,onComplete:function(){return e(r)},flush:!0})})]:[3,4];case 3:return[2,e.sent()];case 4:return this._protocol.logoff(),this._protocol.logon({authToken:o,flush:!0}),[2,this]}})})},N.prototype._initialize=function(e,n,o){var i=this,u=this;return new Promise(function(r,t){i._protocol.initialize({userAgent:e,boltAgent:n,authToken:o,notificationFilter:i._notificationFilter,onError:function(e){return t(e)},onComplete:function(e){var t;e&&(t=e.server,i.version&&!t||(i.version=t),t=e.connection_id,i.databaseId||(i.databaseId=t),e.hints&&(null!=(t=e.hints["connection.recv_timeout_seconds"])&&(t=(0,XA.toNumber)(t),Number.isInteger(t)&&0<t?i._ch.setupReceiveTimeout(1e3*t):i._log.info("Server located at ".concat(i._address," supplied an invalid connection receive timeout value (").concat(t,"). ")+"Please, verify the server configuration and status because this can be the symptom of a bigger issue.")),!0===e.hints["telemetry.enabled"]&&(i._telemetryDisabledConnection=!1))),r(u)}})})},N.prototype.protocol=function(){return this._protocol},Object.defineProperty(N.prototype,"address",{get:function(){return this._address},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"version",{get:function(){return this._server.version},set:function(e){this._server.version=e},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"server",{get:function(){return this._server},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"logger",{get:function(){return this._log},enumerable:!1,configurable:!0}),N.prototype._handleFatalError=function(e){this._isBroken=!0,this._error=this.handleAndTransformError(this._protocol.currentFailure||e,this._address),this._log.isErrorEnabled()&&this._log.error("experienced a fatal error caused by ".concat(this._error," (").concat(XA.json.stringify(this._error),")")),this._protocol.notifyFatalError(this._error)},N.prototype._setIdle=function(e){this._idle=!0,this._ch.stopReceiveTimeout(),this._protocol.queueObserverIfProtocolIsNotBroken(e)},N.prototype._unsetIdle=function(){this._idle=!1,this._updateCurrentObserver()},N.prototype._queueObserver=function(e){return this._protocol.queueObserverIfProtocolIsNotBroken(e)},N.prototype.hasOngoingObservableRequests=function(){return!this._idle&&this._protocol.hasOngoingObservableRequests()},N.prototype.resetAndFlush=function(){var r=this;return new Promise(function(e,t){r._reset({onError:function(e){r._isBroken?t(e):(e=r._handleProtocolError("Received FAILURE as a response for RESET: "+e),t(e))},onComplete:function(){e()}})})},N.prototype._resetOnFailure=function(){var e=this;this.isOpen()&&this._reset({onError:function(){e._protocol.resetFailure()},onComplete:function(){e._protocol.resetFailure()}})},N.prototype._reset=function(t){var e,r=this;this._reseting?this._protocol.isLastMessageReset()?this._resetObservers.push(t):this._protocol.reset({onError:function(e){t.onError(e)},onComplete:function(){t.onComplete()}}):(this._resetObservers.push(t),this._reseting=!0,e=function(e){r._reseting=!1;var t=r._resetObservers;r._resetObservers=[],t.forEach(e)},this._protocol.reset({onError:function(t){e(function(e){return e.onError(t)})},onComplete:function(){e(function(e){return e.onComplete()})}}))},N.prototype._updateCurrentObserver=function(){this._protocol.updateCurrentObserver()},N.prototype.isOpen=function(){return!this._isBroken&&this._ch._open},N.prototype._handleOngoingRequestsNumberChange=function(e){this._idle||(0===e?this._ch.stopReceiveTimeout():this._ch.startReceiveTimeout())},N.prototype.close=function(){return KA(this,void 0,void 0,function(){return ZA(this,function(e){switch(e.label){case 0:return this._log.isDebugEnabled()&&this._log.debug("closing"),this._protocol&&this.isOpen()&&this._protocol.prepareToClose(),[4,this._ch.close()];case 1:return e.sent(),this._log.isDebugEnabled()&&this._log.debug("closed"),[2]}})})},N.prototype.toString=function(){return"Connection [".concat(this.id,"][").concat(this.databaseId||"","]")},N.prototype._handleProtocolError=function(e){this._protocol.resetFailure(),this._updateCurrentObserver();e=(0,XA.newError)(e,$A);return this._handleFatalError(e),e};var rM,nM=N;function N(e,t,r,n,o,i,u,a,s,c){void 0===o&&(o=!1),void 0===i&&(i=null);var l,f,t=rM.call(this,t)||this;return t._authToken=null,t._idle=!1,t._reseting=!1,t._resetObservers=[],t._id=tM++,t._address=r,t._server={address:r.asHostPort()},t._creationTimestamp=Date.now(),t._disableLosslessIntegers=o,t._ch=e,t._chunker=u,t._log=(l=t,new eM((f=n)._level,function(e,t){return f._loggerFunction(e,"".concat(l," ").concat(t))})),t._serversideRouting=i,t._notificationFilter=a,t._telemetryDisabledDriverConfig=!0===c,t._telemetryDisabledConnection=!0,t._dbConnectionId=null,t._protocol=s(t),t._isBroken=!1,t._log.isDebugEnabled()&&t._log.debug("created towards ".concat(r)),t}t_.default=nM;var oM,iM,o_={},gy=r&&r.__extends||(oM=function(e,t){return(oM=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}oM(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i_=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},lb=(Object.defineProperty(o_,"__esModule",{value:!0}),i_(Dy)),Zl=(iM=lb.default,gy(uM,iM),uM.prototype.beginTransaction=function(e){return this._delegate.beginTransaction(e)},uM.prototype.run=function(e,t,r){return this._delegate.run(e,t,r)},uM.prototype.commitTransaction=function(e){return this._delegate.commitTransaction(e)},uM.prototype.rollbackTransaction=function(e){return this._delegate.rollbackTransaction(e)},uM.prototype.getProtocolVersion=function(){return this._delegate.getProtocolVersion()},Object.defineProperty(uM.prototype,"id",{get:function(){return this._delegate.id},enumerable:!1,configurable:!0}),Object.defineProperty(uM.prototype,"databaseId",{get:function(){return this._delegate.databaseId},set:function(e){this._delegate.databaseId=e},enumerable:!1,configurable:!0}),Object.defineProperty(uM.prototype,"server",{get:function(){return this._delegate.server},enumerable:!1,configurable:!0}),Object.defineProperty(uM.prototype,"authToken",{get:function(){return this._delegate.authToken},set:function(e){this._delegate.authToken=e},enumerable:!1,configurable:!0}),Object.defineProperty(uM.prototype,"supportsReAuth",{get:function(){return this._delegate.supportsReAuth},enumerable:!1,configurable:!0}),Object.defineProperty(uM.prototype,"address",{get:function(){return this._delegate.address},enumerable:!1,configurable:!0}),Object.defineProperty(uM.prototype,"version",{get:function(){return this._delegate.version},set:function(e){this._delegate.version=e},enumerable:!1,configurable:!0}),Object.defineProperty(uM.prototype,"creationTimestamp",{get:function(){return this._delegate.creationTimestamp},enumerable:!1,configurable:!0}),Object.defineProperty(uM.prototype,"idleTimestamp",{get:function(){return this._delegate.idleTimestamp},set:function(e){this._delegate.idleTimestamp=e},enumerable:!1,configurable:!0}),uM.prototype.isOpen=function(){return this._delegate.isOpen()},uM.prototype.protocol=function(){return this._delegate.protocol()},uM.prototype.connect=function(e,t,r,n){return this._delegate.connect(e,t,r,n)},uM.prototype.write=function(e,t,r){return this._delegate.write(e,t,r)},uM.prototype.resetAndFlush=function(){return this._delegate.resetAndFlush()},uM.prototype.hasOngoingObservableRequests=function(){return this._delegate.hasOngoingObservableRequests()},uM.prototype.close=function(){return this._delegate.close()},uM.prototype.release=function(){return this._originalErrorHandler&&(this._delegate._errorHandler=this._originalErrorHandler),this._delegate.release()},uM);function uM(e,t){var r=iM.call(this,t)||this;return t&&(r._originalErrorHandler=e._errorHandler,e._errorHandler=r._errorHandler),r._delegate=e,r}o_.default=Zl;Fy={};Object.defineProperty(Fy,"__esModule",{value:!0});var aM,sM,cM,lM=e.error.SERVICE_UNAVAILABLE,fM=e.error.SESSION_EXPIRED;function pM(e,t,r,n){this._errorCode=e,this._handleUnavailability=t||dM,this._handleWriteFailure=r||dM,this._handleSecurityError=n||dM}function dM(e){return e}pM.create=function(e){return new pM(e.errorCode,e.handleUnavailability,e.handleWriteFailure,e.handleSecurityError)},pM.prototype.errorCode=function(){return this._errorCode},pM.prototype.handleAndTransformError=function(e,t,r){return null!=(n=e)&&null!=n.code&&n.code.startsWith("Neo.ClientError.Security.")?this._handleSecurityError(e,t,r):function(e){if(e)return e.code===fM||e.code===lM||"Neo.TransientError.General.DatabaseUnavailable"===e.code;return}(e)?this._handleUnavailability(e,t,r):function(e){if(e)return"Neo.ClientError.Cluster.NotALeader"===e.code||"Neo.ClientError.General.ForbiddenOnReadOnlyDatabase"===e.code;return}(e)?this._handleWriteFailure(e,t,r):e;var n},Fy.default=pM,Ql=hy,aM=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),sM=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s_=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&aM(t,e,r);return sM(t,e),t},S_=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(Ql,"__esModule",{value:!0}),Ql.createChannelConnection=Ql.ConnectionErrorHandler=Ql.DelegateConnection=Ql.ChannelConnection=Ql.Connection=void 0,_=S_(Dy),Ql.Connection=_.default,cM=s_(t_),Ql.ChannelConnection=cM.default,Object.defineProperty(Ql,"createChannelConnection",{enumerable:!0,get:function(){return cM.createChannelConnection}}),s_=S_(o_),Ql.DelegateConnection=s_.default,s_=S_(Fy),Ql.ConnectionErrorHandler=s_.default,Ql.default=_.default;var I_={},hM=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},bM=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},yM=(Object.defineProperty(I_,"__esModule",{value:!0}),e),_M=Ey;function vM(e){var t=e.authTokenManager,r=e.userAgent,e=e.boltAgent;this._authTokenManager=t||(0,yM.staticAuthTokenManager)({}),this._userAgent=r,this._boltAgent=e}vM.prototype.authenticate=function(e){var r=e.connection,n=e.auth,o=e.skipReAuth,i=e.waitReAuth,u=e.forceReAuth;return hM(this,void 0,void 0,function(){var t;return bM(this,function(e){switch(e.label){case 0:return null==n?[3,3]:(t=!0===r.supportsReAuth&&(!_M.object.equals(r.authToken,n)&&!0!==o||!0===u),null==r.authToken||t?[4,r.connect(this._userAgent,this._boltAgent,n,i||!1)]:[3,2]);case 1:return[2,e.sent()];case 2:return[2,r];case 3:return[4,this._authTokenManager.getToken()];case 4:return t=e.sent(),_M.object.equals(t,r.authToken)?[3,6]:[4,r.connect(this._userAgent,this._boltAgent,t,!1)];case 5:return[2,e.sent()];case 6:return[2,r]}})})},vM.prototype.handleError=function(e){var t=e.connection,e=e.code;return!(!t||!e.startsWith("Neo.ClientError.Security."))&&this._authTokenManager.handleSecurityException(t.authToken,e)},I_.default=vM;var L_={},mM=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},gM=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}};function OM(e){e=e.connectionLivenessCheckTimeout;this._connectionLivenessCheckTimeout=e}Object.defineProperty(L_,"__esModule",{value:!0}),OM.prototype.check=function(r){return mM(this,void 0,void 0,function(){var t;return gM(this,function(e){switch(e.label){case 0:return this._isCheckDisabled||this._isNewlyCreatedConnection(r)?[2,!0]:(t=Date.now()-r.idleTimestamp,0===this._connectionLivenessCheckTimeout||t>this._connectionLivenessCheckTimeout?[4,r.resetAndFlush().then(function(){return!0})]:[3,2]);case 1:return[2,e.sent()];case 2:return[2,!0]}})})},Object.defineProperty(OM.prototype,"_isCheckDisabled",{get:function(){return null==this._connectionLivenessCheckTimeout||this._connectionLivenessCheckTimeout<0},enumerable:!1,configurable:!0}),OM.prototype._isNewlyCreatedConnection=function(e){return null==e.authToken},L_.default=OM;var wM,EM,B_=r&&r.__extends||(wM=function(e,t){return(wM=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}wM(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),PM=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),SM=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),V_=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&PM(t,e,r);return SM(t,e),t},TM=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},jM=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},CM=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},IM=r&&r.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||((n=n||Array.prototype.slice.call(t,0,o))[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},Y_=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},RM=(Object.defineProperty(xb,"__esModule",{value:!0}),hy),kM=V_(tb),AM=e,MM=Y_(I_),NM=Ey,xM=Y_(L_),DM=AM.error.SERVICE_UNAVAILABLE,UM=["Neo.ClientError.Security.CredentialsExpired","Neo.ClientError.Security.Forbidden","Neo.ClientError.Security.TokenExpired","Neo.ClientError.Security.Unauthorized"],qd=(EM=AM.ConnectionProvider,B_(LM,EM),LM.prototype._createConnectionErrorHandler=function(){return new RM.ConnectionErrorHandler(DM)},LM.prototype._createConnection=function(e,r,n){var o=this,i=e.auth;return this._createChannelConnection(r).then(function(t){return t.release=function(){return t.idleTimestamp=Date.now(),n(r,t)},o._openConnections[t.id]=t,o._authenticationProvider.authenticate({connection:t,auth:i}).catch(function(e){throw o._destroyConnection(t),e})})},LM.prototype._validateConnectionOnAcquire=function(e,r){var n=e.auth,o=e.skipReAuth;return TM(this,void 0,void 0,function(){var t;return jM(this,function(e){switch(e.label){case 0:if(!this._validateConnection(r))return[2,!1];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this._livenessCheckProvider.check(r)];case 2:return e.sent(),[3,4];case 3:return t=e.sent(),this._log.debug("The connection ".concat(r.id," is not alive because of an error ").concat(t.code," '").concat(t.message,"'")),[2,!1];case 4:return e.trys.push([4,6,,7]),[4,this._authenticationProvider.authenticate({connection:r,auth:n,skipReAuth:o})];case 5:return e.sent(),[2,!0];case 6:return t=e.sent(),this._log.debug("The connection ".concat(r.id," is not valid because of an error ").concat(t.code," '").concat(t.message,"'")),[2,!1];case 7:return[2]}})})},LM.prototype._validateConnectionOnRelease=function(e){return!0!==e._sticky&&this._validateConnection(e)},LM.prototype._validateConnection=function(e){return!!e.isOpen()&&!(this._config.maxConnectionLifetime<Date.now()-e.creationTimestamp)},LM.prototype._destroyConnection=function(e){return delete this._openConnections[e.id],e.close()},LM.prototype._verifyConnectivityAndGetServerVersion=function(e){var n=e.address;return TM(this,void 0,void 0,function(){var t,r;return jM(this,function(e){switch(e.label){case 0:return[4,this._connectionPool.acquire({},n)];case 1:t=e.sent(),r=new AM.ServerInfo(t.server,t.protocol().version),e.label=2;case 2:return e.trys.push([2,,5,7]),t.protocol().isLastMessageLogon()?[3,4]:[4,t.resetAndFlush()];case 3:e.sent(),e.label=4;case 4:return[3,7];case 5:return[4,t.release()];case 6:return e.sent(),[7];case 7:return[2,r]}})})},LM.prototype._verifyAuthentication=function(e){var u=e.getAddress,a=e.auth;return TM(this,void 0,void 0,function(){var t,r,n,o,i;return jM(this,function(e){switch(e.label){case 0:t=[],e.label=1;case 1:return e.trys.push([1,8,9,11]),[4,u()];case 2:return r=e.sent(),[4,this._connectionPool.acquire({auth:a,skipReAuth:!0},r)];case 3:if(n=e.sent(),t.push(n),o=!n.protocol().isLastMessageLogon(),n.supportsReAuth)return o&&n.supportsReAuth?[4,this._authenticationProvider.authenticate({connection:n,auth:a,waitReAuth:!0,forceReAuth:!0})]:[3,5];throw(0,AM.newError)("Driver is connected to a database that does not support user switch.");case 4:return e.sent(),[3,7];case 5:return!o||n.supportsReAuth?[3,7]:[4,this._connectionPool.acquire({auth:a},r,{requireNew:!0})];case 6:(i=e.sent())._sticky=!0,t.push(i),e.label=7;case 7:return[2,!0];case 8:if(i=e.sent(),UM.includes(i.code))return[2,!1];throw i;case 9:return[4,Promise.all(t.map(function(e){return e.release()}))];case 10:return e.sent(),[7];case 11:return[2]}})})},LM.prototype._verifyStickyConnection=function(e){var n=e.auth,o=e.connection;return e.address,TM(this,void 0,void 0,function(){var t,r;return jM(this,function(e){switch(e.label){case 0:return(t=NM.object.equals(n,o.authToken),r=!t,o._sticky=t&&!o.supportsReAuth,r||o._sticky)?[4,o.release()]:[3,2];case 1:throw e.sent(),(0,AM.newError)("Driver is connected to a database that does not support user switch.");case 2:return[2]}})})},LM.prototype.close=function(){return TM(this,void 0,void 0,function(){return jM(this,function(e){switch(e.label){case 0:return[4,this._connectionPool.close()];case 1:return e.sent(),[4,Promise.all(Object.values(this._openConnections).map(function(e){return e.close()}))];case 2:return e.sent(),[2]}})})},LM._installIdleObserverOnConnection=function(e,t){e._setIdle(t)},LM._removeIdleObserverOnConnection=function(e){e._unsetIdle()},LM.prototype._handleSecurityError=function(e,t,r){return this._authenticationProvider.handleError({connection:r,code:e.code})&&(e.retriable=!0),"Neo.ClientError.Security.AuthorizationExpired"===e.code&&this._connectionPool.apply(t,function(e){e.authToken=null}),r&&r.close().catch(function(){}),e},LM);function LM(e,t){var r=e.id,n=e.config,o=e.log,i=e.userAgent,u=e.boltAgent,a=e.authTokenManager,e=e.newPool,e=void 0===e?function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return new(kM.default.bind.apply(kM.default,IM([void 0],CM(e),!1)))}:e,s=(void 0===t&&(t=null),EM.call(this)||this);return s._id=r,s._config=n,s._log=o,s._authenticationProvider=new MM.default({authTokenManager:a,userAgent:i,boltAgent:u}),s._livenessCheckProvider=new xM.default({connectionLivenessCheckTimeout:n.connectionLivenessCheckTimeout}),s._userAgent=i,s._boltAgent=u,s._createChannelConnection=t||function(e){return(0,RM.createChannelConnection)(e,s._config,s._createConnectionErrorHandler(),s._log)},s._connectionPool=e({create:s._createConnection.bind(s),destroy:s._destroyConnection.bind(s),validateOnAcquire:s._validateConnectionOnAcquire.bind(s),validateOnRelease:s._validateConnectionOnRelease.bind(s),installIdleObserver:LM._installIdleObserverOnConnection.bind(s),removeIdleObserver:LM._removeIdleObserverOnConnection.bind(s),config:kM.PoolConfig.fromDriverConfig(n),log:s._log}),s._openConnections={},s}xb.default=qd;var FM,BM,uv={},x_=r&&r.__extends||(FM=function(e,t){return(FM=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}FM(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),WM=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},zM=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},_v=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},pv=(Object.defineProperty(uv,"__esModule",{value:!0}),_v(xb)),qM=hy,It=e.internal.constants,VM=It.BOLT_PROTOCOL_V3,HM=It.BOLT_PROTOCOL_V4_0,GM=It.BOLT_PROTOCOL_V4_4,YM=It.BOLT_PROTOCOL_V5_1,KM=e.error.SERVICE_UNAVAILABLE,Mv=(BM=pv.default,x_(ZM,BM),ZM.prototype.acquireConnection=function(e){var e=void 0===e?{}:e,o=(e.accessMode,e.database),i=(e.bookmarks,e.auth),u=e.forceReAuth;return WM(this,void 0,void 0,function(){var t,r,n=this;return zM(this,function(e){switch(e.label){case 0:return t=qM.ConnectionErrorHandler.create({errorCode:KM,handleSecurityError:function(e,t,r){return n._handleSecurityError(e,t,r,o)}}),[4,this._connectionPool.acquire({auth:i,forceReAuth:u},this._address)];case 1:return(r=e.sent(),i)?[4,this._verifyStickyConnection({auth:i,connection:r,address:this._address})]:[3,3];case 2:return e.sent(),[2,r];case 3:return[2,new qM.DelegateConnection(r,t)]}})})},ZM.prototype._handleSecurityError=function(e,t,r,n){return this._log.warn("Direct driver ".concat(this._id," will close connection to ").concat(t," for database '").concat(n,"' because of an error ").concat(e.code," '").concat(e.message,"'")),BM.prototype._handleSecurityError.call(this,e,t,r)},ZM.prototype._hasProtocolVersion=function(n){return WM(this,void 0,void 0,function(){var t,r;return zM(this,function(e){switch(e.label){case 0:return[4,(0,qM.createChannelConnection)(this._address,this._config,this._createConnectionErrorHandler(),this._log)];case 1:return t=e.sent(),r=t.protocol()?t.protocol().version:null,[4,t.close()];case 2:return e.sent(),r?[2,n(r)]:[2,!1]}})})},ZM.prototype.supportsMultiDb=function(){return WM(this,void 0,void 0,function(){return zM(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return HM<=e})];case 1:return[2,e.sent()]}})})},ZM.prototype.getNegotiatedProtocolVersion=function(){var r=this;return new Promise(function(e,t){r._hasProtocolVersion(e).catch(t)})},ZM.prototype.supportsTransactionConfig=function(){return WM(this,void 0,void 0,function(){return zM(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return VM<=e})];case 1:return[2,e.sent()]}})})},ZM.prototype.supportsUserImpersonation=function(){return WM(this,void 0,void 0,function(){return zM(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return GM<=e})];case 1:return[2,e.sent()]}})})},ZM.prototype.supportsSessionAuth=function(){return WM(this,void 0,void 0,function(){return zM(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return YM<=e})];case 1:return[2,e.sent()]}})})},ZM.prototype.verifyAuthentication=function(e){var r=e.auth;return WM(this,void 0,void 0,function(){var t=this;return zM(this,function(e){return[2,this._verifyAuthentication({auth:r,getAddress:function(){return t._address}})]})})},ZM.prototype.verifyConnectivityAndGetServerInfo=function(){return WM(this,void 0,void 0,function(){return zM(this,function(e){switch(e.label){case 0:return[4,this._verifyConnectivityAndGetServerVersion({address:this._address})];case 1:return[2,e.sent()]}})})},ZM);function ZM(e){var t=e.id,r=e.config,n=e.log,o=e.address,i=e.userAgent,u=e.boltAgent,a=e.authTokenManager,e=e.newPool,t=BM.call(this,{id:t,config:r,log:n,userAgent:i,boltAgent:u,authTokenManager:a,newPool:e})||this;return t._address=o,t}uv.default=Mv;var Cv={},Ev={},Uv={},Jv={},QM=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},XM=r&&r.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||((n=n||Array.prototype.slice.call(t,0,o))[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},JM=(Object.defineProperty(Jv,"__esModule",{value:!0}),Jv.createValidRoutingTable=void 0,e),p=JM.internal.constants,$M=p.ACCESS_MODE_WRITE,e2=p.ACCESS_MODE_READ,t2=JM.internal.serverAddress.ServerAddress,r2=JM.error.PROTOCOL_ERROR,n2=(o2.fromRawRoutingTable=u2,o2.prototype.forget=function(e){this.readers=i2(this.readers,e),this.writers=i2(this.writers,e)},o2.prototype.forgetRouter=function(e){this.routers=i2(this.routers,e)},o2.prototype.forgetWriter=function(e){this.writers=i2(this.writers,e)},o2.prototype.isStaleFor=function(e){return this.expirationTime.lessThan(Date.now())||this.routers.length<1||e===e2&&0===this.readers.length||e===$M&&0===this.writers.length},o2.prototype.isExpiredFor=function(e){return this.expirationTime.add(e).lessThan(Date.now())},o2.prototype.allServers=function(){return XM(XM(XM([],QM(this.routers),!1),QM(this.readers),!1),QM(this.writers),!1)},o2.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,"]]")},o2);function o2(e){var e=void 0===e?{}:e,t=e.database,r=e.routers,n=e.readers,o=e.writers,i=e.expirationTime,e=e.ttl;this.database=t||null,this.databaseName=t||"default database",this.routers=r||[],this.readers=n||[],this.writers=o||[],this.expirationTime=i||(0,JM.int)(0),this.ttl=e}function i2(e,t){return e.filter(function(e){return e.asKey()!==t.asKey()})}function u2(e,t,r){var n=r.ttl,o=function(t,r){try{var e=(0,JM.int)(Date.now()),n=(0,JM.int)(t.ttl).multiply(1e3).add(e);return n.lessThan(e)?JM.Integer.MAX_VALUE:n}catch(e){throw(0,JM.newError)("Unable to parse TTL entry from router ".concat(r," from raw routing table:\n").concat(JM.json.stringify(t),"\nError message: ").concat(e.message),r2)}}(r,t),i=function(t,r){try{var n=[],o=[],i=[];return t.servers.forEach(function(e){var t=e.role,e=e.addresses;"ROUTE"===t?n=s2(e).map(function(e){return t2.fromUrl(e)}):"WRITE"===t?i=s2(e).map(function(e){return t2.fromUrl(e)}):"READ"===t&&(o=s2(e).map(function(e){return t2.fromUrl(e)}))}),{routers:n,readers:o,writers:i}}catch(e){throw(0,JM.newError)("Unable to parse servers entry from router ".concat(r," from addresses:\n").concat(JM.json.stringify(t.servers),"\nError message: ").concat(e.message),r2)}}(r,t),u=i.routers,a=i.readers,i=i.writers;return a2(u,"routers",t),a2(a,"readers",t),new n2({database:e||r.db,routers:u,readers:a,writers:i,expirationTime:o,ttl:n})}function a2(e,t,r){if(0===e.length)throw(0,JM.newError)("Received no "+t+" from router "+r,r2)}function s2(e){if(Array.isArray(e))return Array.from(e);throw new TypeError("Array expected but got: "+e)}Jv.default=n2,Jv.createValidRoutingTable=u2;var tm=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},c2=(Object.defineProperty(Uv,"__esModule",{value:!0}),tm(Jv));function l2(e){this._routingContext=e}l2.prototype.lookupRoutingTableOnRouter=function(t,r,n,o){var i=this;return t._acquireConnection(function(e){return i._requestRawRoutingTable(e,t,r,n,o).then(function(e){return e.isNull?null:c2.default.fromRawRoutingTable(r,n,e)})})},l2.prototype._requestRawRoutingTable=function(r,n,o,e,i){var u=this;return new Promise(function(e,t){r.protocol().requestRoutingInformation({routingContext:u._routingContext,databaseName:o,impersonatedUser:i,sessionContext:{bookmarks:n._lastBookmarks,mode:n._mode,database:n._database,afterComplete:n._onComplete},onCompleted:e,onError:t})})},Uv.default=l2;var f2,p2,cm=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},dm=(Object.defineProperty(Ev,"__esModule",{value:!0}),Ev.RoutingTable=Ev.Rediscovery=void 0,cm(Uv)),am=(Ev.Rediscovery=dm.default,cm(Jv)),vm=(Ev.RoutingTable=am.default,Ev.default=dm.default,r&&r.__extends||(f2=function(e,t){return(f2=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}f2(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),d2=r&&r.__assign||function(){return(d2=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},h2=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),b2=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Sm=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&h2(t,e,r);return b2(t,e),t},y2=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},_2=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},v2=r&&r.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},m2=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Vv=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},g2=(Object.defineProperty(Cv,"__esModule",{value:!0}),e),O2=Sm(Ev),w2=pf,E2=Vv(fy),Tm=Vv(xb),P2=Ts,S2=hy,T2=Ey,j2=g2.error.SERVICE_UNAVAILABLE,C2=g2.error.SESSION_EXPIRED,I2=g2.internal.bookmarks.Bookmarks,xm=g2.internal.constants,R2=xm.ACCESS_MODE_READ,k2=xm.ACCESS_MODE_WRITE,A2=xm.BOLT_PROTOCOL_V3,M2=xm.BOLT_PROTOCOL_V4_0,N2=xm.BOLT_PROTOCOL_V4_4,x2=xm.BOLT_PROTOCOL_V5_1,D2=null,U2=(0,g2.int)(3e4),By=(p2=Tm.default,vm(L2,p2),L2.prototype._createConnectionErrorHandler=function(){return new S2.ConnectionErrorHandler(C2)},L2.prototype._handleUnavailability=function(e,t,r){return this._log.warn("Routing driver ".concat(this._id," will forget ").concat(t," for database '").concat(r,"' because of an error ").concat(e.code," '").concat(e.message,"'")),this.forget(t,r||D2),e},L2.prototype._handleSecurityError=function(e,t,r,n){return this._log.warn("Routing driver ".concat(this._id," will close connections to ").concat(t," for database '").concat(n,"' because of an error ").concat(e.code," '").concat(e.message,"'")),p2.prototype._handleSecurityError.call(this,e,t,r,n)},L2.prototype._handleWriteFailure=function(e,t,r){return this._log.warn("Routing driver ".concat(this._id," will forget writer ").concat(t," for database '").concat(r,"' because of an error ").concat(e.code," '").concat(e.message,"'")),this.forgetWriter(t,r||D2),(0,g2.newError)("No longer possible to write to server at "+t,C2,e)},L2.prototype.acquireConnection=function(e){var e=void 0===e?{}:e,s=e.accessMode,c=e.database,l=e.bookmarks,f=e.impersonatedUser,p=e.onDatabaseNameResolved,d=e.auth;return y2(this,void 0,void 0,function(){var t,r,n,o,i,u,a=this;return _2(this,function(e){switch(e.label){case 0:return n={database:c||D2},o=new S2.ConnectionErrorHandler(C2,function(e,t){return a._handleUnavailability(e,t,n.database)},function(e,t){return a._handleWriteFailure(e,t,n.database)},function(e,t,r){return a._handleSecurityError(e,t,r,n.database)}),[4,this._freshRoutingTable({accessMode:s,database:n.database,bookmarks:l,impersonatedUser:f,auth:d,onDatabaseNameResolved:function(e){n.database=n.database||e,p&&p(e)}})];case 1:if(u=e.sent(),s===R2)r=this._loadBalancingStrategy.selectReader(u.readers),t="read";else{if(s!==k2)throw(0,g2.newError)("Illegal mode "+s);r=this._loadBalancingStrategy.selectWriter(u.writers),t="write"}if(!r)throw(0,g2.newError)("Failed to obtain connection towards ".concat(t," server. Known routing table is: ").concat(u),C2);e.label=2;case 2:return e.trys.push([2,6,,7]),[4,this._connectionPool.acquire({auth:d},r)];case 3:return(i=e.sent(),d)?[4,this._verifyStickyConnection({auth:d,connection:i,address:r})]:[3,5];case 4:return e.sent(),[2,i];case 5:return[2,new S2.DelegateConnection(i,o)];case 6:throw u=e.sent(),o.handleAndTransformError(u,r);case 7:return[2]}})})},L2.prototype._hasProtocolVersion=function(u){return y2(this,void 0,void 0,function(){var t,r,n,o,i;return _2(this,function(e){switch(e.label){case 0:return[4,this._resolveSeedRouter(this._seedRouter)];case 1:t=e.sent(),n=0,e.label=2;case 2:if(!(n<t.length))return[3,8];e.label=3;case 3:return e.trys.push([3,6,,7]),[4,(0,S2.createChannelConnection)(t[n],this._config,this._createConnectionErrorHandler(),this._log)];case 4:return i=e.sent(),o=i.protocol()?i.protocol().version:null,[4,i.close()];case 5:return e.sent(),o?[2,u(o)]:[2,!1];case 6:return i=e.sent(),r=i,[3,7];case 7:return n++,[3,2];case 8:if(r)throw r;return[2,!1]}})})},L2.prototype.supportsMultiDb=function(){return y2(this,void 0,void 0,function(){return _2(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return M2<=e})];case 1:return[2,e.sent()]}})})},L2.prototype.supportsTransactionConfig=function(){return y2(this,void 0,void 0,function(){return _2(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return A2<=e})];case 1:return[2,e.sent()]}})})},L2.prototype.supportsUserImpersonation=function(){return y2(this,void 0,void 0,function(){return _2(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return N2<=e})];case 1:return[2,e.sent()]}})})},L2.prototype.supportsSessionAuth=function(){return y2(this,void 0,void 0,function(){return _2(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return x2<=e})];case 1:return[2,e.sent()]}})})},L2.prototype.getNegotiatedProtocolVersion=function(){var r=this;return new Promise(function(e,t){r._hasProtocolVersion(e).catch(t)})},L2.prototype.verifyAuthentication=function(e){var n=e.database,o=e.accessMode,i=e.auth;return y2(this,void 0,void 0,function(){var t=this;return _2(this,function(e){return[2,this._verifyAuthentication({auth:i,getAddress:function(){return y2(t,void 0,void 0,function(){var t,r;return _2(this,function(e){switch(e.label){case 0:return t={database:n||D2},[4,this._freshRoutingTable({accessMode:o,database:t.database,auth:i,onDatabaseNameResolved:function(e){t.database=t.database||e}})];case 1:if(r=e.sent(),0===(r=o===k2?r.writers:r.readers).length)throw(0,g2.newError)("No servers available for database '".concat(t.database,"' with access mode '").concat(o,"'"),j2);return[2,r[0]]}})})}})]})})},L2.prototype.verifyConnectivityAndGetServerInfo=function(e){var l=e.database,f=e.accessMode;return y2(this,void 0,void 0,function(){var t,r,n,o,i,u,a,s,c;return _2(this,function(e){switch(e.label){case 0:return t={database:l||D2},[4,this._freshRoutingTable({accessMode:f,database:t.database,onDatabaseNameResolved:function(e){t.database=t.database||e}})];case 1:r=e.sent(),r=f===k2?r.writers:r.readers,n=(0,g2.newError)("No servers available for database '".concat(t.database,"' with access mode '").concat(f,"'"),j2),e.label=2;case 2:e.trys.push([2,9,10,11]),o=v2(r),i=o.next(),e.label=3;case 3:if(i.done)return[3,8];u=i.value,e.label=4;case 4:return e.trys.push([4,6,,7]),[4,this._verifyConnectivityAndGetServerVersion({address:u})];case 5:return[2,e.sent()];case 6:return a=e.sent(),n=a,[3,7];case 7:return i=o.next(),[3,3];case 8:return[3,11];case 9:return a=e.sent(),s={error:a},[3,11];case 10:try{i&&!i.done&&(c=o.return)&&c.call(o)}finally{if(s)throw s.error}return[7];case 11:throw n}})})},L2.prototype.forget=function(t,e){this._routingTableRegistry.apply(e,{applyWhenExists:function(e){return e.forget(t)}}),this._connectionPool.purge(t).catch(function(){})},L2.prototype.forgetWriter=function(t,e){this._routingTableRegistry.apply(e,{applyWhenExists:function(e){return e.forgetWriter(t)}})},L2.prototype._freshRoutingTable=function(e){var e=void 0===e?{}:e,t=e.accessMode,r=e.database,n=e.bookmarks,o=e.impersonatedUser,i=e.onDatabaseNameResolved,e=e.auth,u=this._routingTableRegistry.get(r,function(){return new O2.RoutingTable({database:r})});return u.isStaleFor(t)?(this._log.info('Routing table is stale for database: "'.concat(r,'" and access mode: "').concat(t,'": ').concat(u)),this._refreshRoutingTable(u,n,o,e).then(function(e){return i(e.database),e})):u},L2.prototype._refreshRoutingTable=function(e,t,r,n){var o=e.routers;return this._useSeedRouter?this._fetchRoutingTableFromSeedRouterFallbackToKnownRouters(o,e,t,r,n):this._fetchRoutingTableFromKnownRoutersFallbackToSeedRouter(o,e,t,r,n)},L2.prototype._fetchRoutingTableFromSeedRouterFallbackToKnownRouters=function(u,a,s,c,l){return y2(this,void 0,void 0,function(){var t,r,n,o,i;return _2(this,function(e){switch(e.label){case 0:return t=[],[4,this._fetchRoutingTableUsingSeedRouter(t,this._seedRouter,a,s,c,l)];case 1:return(t=m2.apply(void 0,[e.sent(),2]),r=t[0],n=t[1],r)?(this._useSeedRouter=!1,[3,4]):[3,2];case 2:return[4,this._fetchRoutingTableUsingKnownRouters(u,a,s,c,l)];case 3:i=m2.apply(void 0,[e.sent(),2]),o=i[0],i=i[1],r=o,n=i||n,e.label=4;case 4:return[4,this._applyRoutingTableIfPossible(a,r,n)];case 5:return[2,e.sent()]}})})},L2.prototype._fetchRoutingTableFromKnownRoutersFallbackToSeedRouter=function(o,i,u,a,s){return y2(this,void 0,void 0,function(){var t,r,n;return _2(this,function(e){switch(e.label){case 0:return[4,this._fetchRoutingTableUsingKnownRouters(o,i,u,a,s)];case 1:return r=m2.apply(void 0,[e.sent(),2]),t=r[0],r=r[1],t?[3,3]:[4,this._fetchRoutingTableUsingSeedRouter(o,this._seedRouter,i,u,a,s)];case 2:n=m2.apply(void 0,[e.sent(),2]),t=n[0],r=n[1],e.label=3;case 3:return[4,this._applyRoutingTableIfPossible(i,t,r)];case 4:return[2,e.sent()]}})})},L2.prototype._fetchRoutingTableUsingKnownRouters=function(n,o,i,u,a){return y2(this,void 0,void 0,function(){var t,r;return _2(this,function(e){switch(e.label){case 0:return[4,this._fetchRoutingTable(n,o,i,u,a)];case 1:return(t=m2.apply(void 0,[e.sent(),2]),r=t[0],t=t[1],r)?[2,[r,null]]:(r=n.length-1,L2._forgetRouter(o,n,r),[2,[null,t]])}})})},L2.prototype._fetchRoutingTableUsingSeedRouter=function(r,n,o,i,u,a){return y2(this,void 0,void 0,function(){var t;return _2(this,function(e){switch(e.label){case 0:return[4,this._resolveSeedRouter(n)];case 1:return t=e.sent(),t=t.filter(function(e){return r.indexOf(e)<0}),[4,this._fetchRoutingTable(t,o,i,u,a)];case 2:return[2,e.sent()]}})})},L2.prototype._resolveSeedRouter=function(n){return y2(this,void 0,void 0,function(){var t,r=this;return _2(this,function(e){switch(e.label){case 0:return[4,this._hostNameResolver.resolve(n)];case 1:return t=e.sent(),[4,Promise.all(t.map(function(e){return r._dnsResolver.resolve(e)}))];case 2:return t=e.sent(),[2,[].concat.apply([],t)]}})})},L2.prototype._fetchRoutingTable=function(s,c,l,f,p){return y2(this,void 0,void 0,function(){var t=this;return _2(this,function(e){return[2,s.reduce(function(i,u,a){return y2(t,void 0,void 0,function(){var t,r,n,o;return _2(this,function(e){switch(e.label){case 0:return[4,i];case 1:return(t=m2.apply(void 0,[e.sent(),1]),t=t[0])?[2,[t,null]]:(L2._forgetRouter(c,s,a-1),[4,this._createSessionForRediscovery(u,l,f,p)]);case 2:if(t=m2.apply(void 0,[e.sent(),2]),r=t[0],n=t[1],!r)return[3,8];e.label=3;case 3:return e.trys.push([3,5,6,7]),[4,this._rediscovery.lookupRoutingTableOnRouter(r,c.database,u,f)];case 4:return[2,[e.sent(),null]];case 5:return o=e.sent(),[2,this._handleRediscoveryError(o,u)];case 6:return r.close(),[7];case 7:return[3,9];case 8:return[2,[null,n]];case 9:return[2]}})})},Promise.resolve([null,null]))]})})},L2.prototype._createSessionForRediscovery=function(o,i,u,a){return y2(this,void 0,void 0,function(){var t,r,n=this;return _2(this,function(e){switch(e.label){case 0:return e.trys.push([0,4,,5]),[4,this._connectionPool.acquire({auth:a},o)];case 1:return(t=e.sent(),a)?[4,this._verifyStickyConnection({auth:a,connection:t,address:o})]:[3,3];case 2:e.sent(),e.label=3;case 3:return r=S2.ConnectionErrorHandler.create({errorCode:C2,handleSecurityError:function(e,t,r){return n._handleSecurityError(e,t,r)}}),r=t._sticky?new S2.DelegateConnection(t):new S2.DelegateConnection(t,r),r=new E2.default(r),t.protocol().version<4?[2,[new g2.Session({mode:k2,bookmarks:I2.empty(),connectionProvider:r}),null]]:[2,[new g2.Session({mode:R2,database:"system",bookmarks:i,connectionProvider:r,impersonatedUser:u}),null]];case 4:return r=e.sent(),[2,this._handleRediscoveryError(r,o)];case 5:return[2]}})})},L2.prototype._handleRediscoveryError=function(e,t){if(["Neo.ClientError.Database.DatabaseNotFound","Neo.ClientError.Transaction.InvalidBookmark","Neo.ClientError.Transaction.InvalidBookmarkMixture","Neo.ClientError.Statement.ArgumentError","Neo.ClientError.Request.Invalid","Neo.ClientError.Statement.TypeError","N/A"].includes(e.code)||(r=e).code.startsWith("Neo.ClientError.Security.")&&!["Neo.ClientError.Security.AuthorizationExpired"].includes(r.code))throw e;if("Neo.ClientError.Procedure.ProcedureNotFound"===e.code)throw(0,g2.newError)("Server at ".concat(t.asHostPort()," can't perform routing. Make sure you are connecting to a causal cluster"),j2,e);var r;return this._log.warn("unable to fetch routing table because of an error ".concat(e)),[null,e]},L2.prototype._applyRoutingTableIfPossible=function(t,r,n){return y2(this,void 0,void 0,function(){return _2(this,function(e){switch(e.label){case 0:if(r)return 0===r.writers.length&&(this._useSeedRouter=!0),[4,this._updateRoutingTable(r)];throw(0,g2.newError)("Could not perform discovery. No routing servers available. Known routing table: ".concat(t),j2,n);case 1:return e.sent(),[2,r]}})})},L2.prototype._updateRoutingTable=function(t){return y2(this,void 0,void 0,function(){return _2(this,function(e){switch(e.label){case 0:return[4,this._connectionPool.keepAll(t.allServers())];case 1:return e.sent(),this._routingTableRegistry.removeExpired(),this._routingTableRegistry.register(t),this._log.info("Updated routing table ".concat(t)),[2]}})})},L2._forgetRouter=function(e,t,r){t=t[r];e&&t&&e.forgetRouter(t)},L2);function L2(e){var t=e.id,r=e.address,n=e.routingContext,o=e.hostNameResolver,i=e.config,u=e.log,a=e.userAgent,s=e.boltAgent,c=e.authTokenManager,l=e.routingTablePurgeDelay,e=e.newPool,f=p2.call(this,{id:t,config:i,log:u,userAgent:a,boltAgent:s,authTokenManager:c,newPool:e},function(e){return(0,S2.createChannelConnection)(e,f._config,f._createConnectionErrorHandler(),f._log,f._routingContext)})||this;return f._routingContext=d2(d2({},n),{address:r.toString()}),f._seedRouter=r,f._rediscovery=new O2.default(f._routingContext),f._loadBalancingStrategy=new P2.LeastConnectedLoadBalancingStrategy(f._connectionPool),f._hostNameResolver=o,f._dnsResolver=new w2.HostNameResolver,f._log=u,f._useSeedRouter=!0,f._routingTableRegistry=new nN(l?(0,g2.int)(l):U2),f._refreshRoutingTable=T2.functional.reuseOngoingRequest(f._refreshRoutingTable,f),f}Cv.default=By;oN.prototype.register=function(e){return this._tables.set(e.database,e),this},oN.prototype.apply=function(e,t){var t=void 0===t?{}:t,r=t.applyWhenExists,t=t.applyWhenDontExists,t=void 0===t?function(){}:t;return this._tables.has(e)?r(this._tables.get(e)):"string"==typeof e||null===e?t():this._forEach(r),this},oN.prototype.get=function(e,t){return this._tables.has(e)?this._tables.get(e):"function"==typeof t?t():t},oN.prototype.removeExpired=function(){var t=this;return this._removeIf(function(e){return e.isExpiredFor(t._routingTablePurgeDelay)})},oN.prototype._forEach=function(e){var t,r;try{for(var n=v2(this._tables),o=n.next();!o.done;o=n.next())e(m2(o.value,2)[1])}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return this},oN.prototype._remove=function(e){return this._tables.delete(e),this},oN.prototype._removeIf=function(e){var t,r;try{for(var n=v2(this._tables),o=n.next();!o.done;o=n.next()){var i=m2(o.value,2),u=i[0];e(i[1])&&this._remove(u)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return this};var F2,B2,W2,z2,q2,V2,H2,G2,Y2,K2,Z2,x,Q2,X2,J2,$2,eN,tN,rN,nN=oN;function oN(e){this._tables=new Map,this._routingTablePurgeDelay=e}function iN(e,t,r){void 0===r&&(r={}),J2(e,"Bolt URL");var n,o=tN.parseDatabaseUrl(e),i=!1,u=!1;switch(o.scheme){case"bolt":break;case"bolt+s":u=!0,n="TRUST_SYSTEM_CA_SIGNED_CERTIFICATES";break;case"bolt+ssc":u=!0,n="TRUST_ALL_CERTIFICATES";break;case"neo4j":i=!0;break;case"neo4j+s":n="TRUST_SYSTEM_CA_SIGNED_CERTIFICATES",i=u=!0;break;case"neo4j+ssc":n="TRUST_ALL_CERTIFICATES",i=u=!0;break;default:throw new Error("Unknown scheme: ".concat(o.scheme))}if(u){if("encrypted"in r||"trust"in r)throw new Error("Encryption/trust can only be configured either through URL or config, not both");r.encrypted=X2,r.trust=n}var a=function(e){if("object"==typeof(t=e)&&null!=t&&"getToken"in t&&"handleSecurityException"in t&&"function"==typeof t.getToken&&"function"==typeof t.handleSecurityException)return e;var t=e;return(t=t||{}).scheme=t.scheme||"none",(0,x.staticAuthTokenManager)({authToken:t})}(t),s=(r.userAgent=r.userAgent||rN,r.boltAgent=x.internal.boltAgent.fromVersion("neo4j-javascript/"+Z2.default),eN.fromUrl(o.hostAndPort)),t={address:s,typename:i?"Routing":"Direct",routing:i};return new K2.Driver(t,r,function(){{if(i)return function(e,t,r,n){return new Q2.RoutingConnectionProvider({id:e,config:t,log:r,hostNameResolver:n,authTokenManager:a,address:s,userAgent:t.userAgent,boltAgent:t.boltAgent,routingContext:o.query})};if($2(o.query))return function(e,t,r){return new Q2.DirectConnectionProvider({id:e,config:t,log:r,authTokenManager:a,address:s,userAgent:t.userAgent,boltAgent:t.boltAgent})};throw new Error("Parameters are not supported with none routed scheme. Given URL: '".concat(e,"'"))}}())}function uN(r,n){return G2(this,void 0,void 0,function(){var t;return Y2(this,function(e){switch(e.label){case 0:t=iN(r,{scheme:"none",principal:"",credentials:""},n),e.label=1;case 1:return e.trys.push([1,,3,5]),[4,t.getNegotiatedProtocolVersion()];case 2:return e.sent(),[2,!0];case 3:return[4,t.close()];case 4:return e.sent(),[7];case 5:return[2]}})})}return rb=Ub,F2=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(rb,"__esModule",{value:!0}),rb.RoutingConnectionProvider=rb.DirectConnectionProvider=rb.PooledConnectionProvider=rb.SingleConnectionProvider=void 0,B2=fy,Object.defineProperty(rb,"SingleConnectionProvider",{enumerable:!0,get:function(){return F2(B2).default}}),W2=xb,Object.defineProperty(rb,"PooledConnectionProvider",{enumerable:!0,get:function(){return F2(W2).default}}),z2=uv,Object.defineProperty(rb,"DirectConnectionProvider",{enumerable:!0,get:function(){return F2(z2).default}}),q2=Cv,Object.defineProperty(rb,"RoutingConnectionProvider",{enumerable:!0,get:function(){return F2(q2).default}}),Am=S,V2=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),H2=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Lm=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&V2(t,e,r);return H2(t,e),t},y=r&&r.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||V2(t,e,r)},Object.defineProperty(Am,"__esModule",{value:!0}),Am.pool=Am.packstream=Am.channel=Am.buf=Am.bolt=Am.loadBalancing=void 0,Am.loadBalancing=Lm(Ts),Am.bolt=Lm(E),Am.buf=Lm(Kf),Am.channel=Lm(pf),Am.packstream=Lm(yy),Am.pool=Lm(tb),y(Ub,Am),j=F,G2=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},Y2=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},e0=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(j,"__esModule",{value:!0}),j.Path=j.UnboundRelationship=j.Relationship=j.Node=j.Record=j.ServerInfo=j.Notification=j.QueryStatistics=j.ProfiledPlan=j.Plan=j.ResultSummary=j.RxResult=j.RxManagedTransaction=j.RxTransaction=j.RxSession=j.EagerResult=j.Result=j.ManagedTransaction=j.Transaction=j.Session=j.Driver=j.temporal=j.spatial=j.graph=j.error=j.routing=j.session=j.types=j.logging=j.auth=j.isRetryableError=j.Neo4jError=j.integer=j.isUnboundRelationship=j.isRelationship=j.isPathSegment=j.isPath=j.isNode=j.isDateTime=j.isLocalDateTime=j.isDate=j.isTime=j.isLocalTime=j.isDuration=j.isPoint=j.isInt=j.int=j.hasReachableServer=j.driver=j.authTokenManagers=void 0,j.notificationFilterMinimumSeverityLevel=j.notificationFilterDisabledCategory=j.notificationSeverityLevel=j.notificationCategory=j.resultTransformers=j.bookmarkManager=j.DateTime=j.LocalDateTime=j.Date=j.Time=j.LocalTime=j.Duration=j.Integer=j.Point=j.PathSegment=void 0,K2=B,Object.defineProperty(j,"Driver",{enumerable:!0,get:function(){return K2.Driver}}),Z2=e0(v),x=e,Object.defineProperty(j,"authTokenManagers",{enumerable:!0,get:function(){return x.authTokenManagers}}),Object.defineProperty(j,"Neo4jError",{enumerable:!0,get:function(){return x.Neo4jError}}),Object.defineProperty(j,"isRetryableError",{enumerable:!0,get:function(){return x.isRetryableError}}),Object.defineProperty(j,"error",{enumerable:!0,get:function(){return x.error}}),Object.defineProperty(j,"Integer",{enumerable:!0,get:function(){return x.Integer}}),Object.defineProperty(j,"int",{enumerable:!0,get:function(){return x.int}}),Object.defineProperty(j,"isInt",{enumerable:!0,get:function(){return x.isInt}}),Object.defineProperty(j,"isPoint",{enumerable:!0,get:function(){return x.isPoint}}),Object.defineProperty(j,"Point",{enumerable:!0,get:function(){return x.Point}}),Object.defineProperty(j,"Date",{enumerable:!0,get:function(){return x.Date}}),Object.defineProperty(j,"DateTime",{enumerable:!0,get:function(){return x.DateTime}}),Object.defineProperty(j,"Duration",{enumerable:!0,get:function(){return x.Duration}}),Object.defineProperty(j,"isDate",{enumerable:!0,get:function(){return x.isDate}}),Object.defineProperty(j,"isDateTime",{enumerable:!0,get:function(){return x.isDateTime}}),Object.defineProperty(j,"isDuration",{enumerable:!0,get:function(){return x.isDuration}}),Object.defineProperty(j,"isLocalDateTime",{enumerable:!0,get:function(){return x.isLocalDateTime}}),Object.defineProperty(j,"isLocalTime",{enumerable:!0,get:function(){return x.isLocalTime}}),Object.defineProperty(j,"isNode",{enumerable:!0,get:function(){return x.isNode}}),Object.defineProperty(j,"isPath",{enumerable:!0,get:function(){return x.isPath}}),Object.defineProperty(j,"isPathSegment",{enumerable:!0,get:function(){return x.isPathSegment}}),Object.defineProperty(j,"isRelationship",{enumerable:!0,get:function(){return x.isRelationship}}),Object.defineProperty(j,"isTime",{enumerable:!0,get:function(){return x.isTime}}),Object.defineProperty(j,"isUnboundRelationship",{enumerable:!0,get:function(){return x.isUnboundRelationship}}),Object.defineProperty(j,"LocalDateTime",{enumerable:!0,get:function(){return x.LocalDateTime}}),Object.defineProperty(j,"LocalTime",{enumerable:!0,get:function(){return x.LocalTime}}),Object.defineProperty(j,"Time",{enumerable:!0,get:function(){return x.Time}}),Object.defineProperty(j,"Node",{enumerable:!0,get:function(){return x.Node}}),Object.defineProperty(j,"Path",{enumerable:!0,get:function(){return x.Path}}),Object.defineProperty(j,"PathSegment",{enumerable:!0,get:function(){return x.PathSegment}}),Object.defineProperty(j,"Relationship",{enumerable:!0,get:function(){return x.Relationship}}),Object.defineProperty(j,"UnboundRelationship",{enumerable:!0,get:function(){return x.UnboundRelationship}}),Object.defineProperty(j,"Record",{enumerable:!0,get:function(){return x.Record}}),Object.defineProperty(j,"ResultSummary",{enumerable:!0,get:function(){return x.ResultSummary}}),Object.defineProperty(j,"Plan",{enumerable:!0,get:function(){return x.Plan}}),Object.defineProperty(j,"ProfiledPlan",{enumerable:!0,get:function(){return x.ProfiledPlan}}),Object.defineProperty(j,"QueryStatistics",{enumerable:!0,get:function(){return x.QueryStatistics}}),Object.defineProperty(j,"Notification",{enumerable:!0,get:function(){return x.Notification}}),Object.defineProperty(j,"ServerInfo",{enumerable:!0,get:function(){return x.ServerInfo}}),Object.defineProperty(j,"Result",{enumerable:!0,get:function(){return x.Result}}),Object.defineProperty(j,"EagerResult",{enumerable:!0,get:function(){return x.EagerResult}}),Object.defineProperty(j,"auth",{enumerable:!0,get:function(){return x.auth}}),Object.defineProperty(j,"Session",{enumerable:!0,get:function(){return x.Session}}),Object.defineProperty(j,"Transaction",{enumerable:!0,get:function(){return x.Transaction}}),Object.defineProperty(j,"ManagedTransaction",{enumerable:!0,get:function(){return x.ManagedTransaction}}),Object.defineProperty(j,"bookmarkManager",{enumerable:!0,get:function(){return x.bookmarkManager}}),Object.defineProperty(j,"routing",{enumerable:!0,get:function(){return x.routing}}),Object.defineProperty(j,"resultTransformers",{enumerable:!0,get:function(){return x.resultTransformers}}),Object.defineProperty(j,"notificationCategory",{enumerable:!0,get:function(){return x.notificationCategory}}),Object.defineProperty(j,"notificationSeverityLevel",{enumerable:!0,get:function(){return x.notificationSeverityLevel}}),Object.defineProperty(j,"notificationFilterDisabledCategory",{enumerable:!0,get:function(){return x.notificationFilterDisabledCategory}}),Object.defineProperty(j,"notificationFilterMinimumSeverityLevel",{enumerable:!0,get:function(){return x.notificationFilterMinimumSeverityLevel}}),Q2=S,o0=e0(lr),j.RxSession=o0.default,c0=e0(t),j.RxTransaction=c0.default,Rs=e0(X),j.RxManagedTransaction=Rs.default,e0=e0(f),j.RxResult=e0.default,Lb=x.internal.util,X2=Lb.ENCRYPTION_ON,J2=Lb.assertString,$2=Lb.isEmptyObjectOrNull,eN=x.internal.serverAddress.ServerAddress,tN=x.internal.urlUtil,rN="neo4j-javascript/"+Z2.default,j.driver=iN,j.hasReachableServer=uN,Lb={console:function(e){return{level:e,logger:function(e,t){return console.log("".concat(r.Date.now()," ").concat(e.toUpperCase()," ").concat(t))}}}},j.logging=Lb,hc={Node:x.Node,Relationship:x.Relationship,UnboundRelationship:x.UnboundRelationship,PathSegment:x.PathSegment,Path:x.Path,Result:x.Result,EagerResult:x.EagerResult,ResultSummary:x.ResultSummary,Record:x.Record,Point:x.Point,Date:x.Date,DateTime:x.DateTime,Duration:x.Duration,LocalDateTime:x.LocalDateTime,LocalTime:x.LocalTime,Time:x.Time,Integer:x.Integer},j.types=hc,g0={READ:K2.READ,WRITE:K2.WRITE},j.session=g0,Gm={toNumber:x.toNumber,toString:x.toString,inSafeRange:x.inSafeRange},j.integer=Gm,S0={isPoint:x.isPoint},j.spatial=S0,Q={isDuration:x.isDuration,isLocalTime:x.isLocalTime,isTime:x.isTime,isDate:x.isDate,isLocalDateTime:x.isLocalDateTime,isDateTime:x.isDateTime},j.temporal=Q,l={isNode:x.isNode,isPath:x.isPath,isPathSegment:x.isPathSegment,isRelationship:x.isRelationship,isUnboundRelationship:x.isUnboundRelationship},j.graph=l,Gm={authTokenManagers:x.authTokenManagers,driver:iN,hasReachableServer:uN,int:x.int,isInt:x.isInt,isPoint:x.isPoint,isDuration:x.isDuration,isLocalTime:x.isLocalTime,isTime:x.isTime,isDate:x.isDate,isLocalDateTime:x.isLocalDateTime,isDateTime:x.isDateTime,isNode:x.isNode,isPath:x.isPath,isPathSegment:x.isPathSegment,isRelationship:x.isRelationship,isUnboundRelationship:x.isUnboundRelationship,integer:Gm,Neo4jError:x.Neo4jError,isRetryableError:x.isRetryableError,auth:x.auth,logging:Lb,types:hc,session:g0,routing:x.routing,error:x.error,graph:l,spatial:S0,temporal:Q,Driver:K2.Driver,Session:x.Session,Transaction:x.Transaction,ManagedTransaction:x.ManagedTransaction,Result:x.Result,EagerResult:x.EagerResult,RxSession:o0.default,RxTransaction:c0.default,RxManagedTransaction:Rs.default,RxResult:e0.default,ResultSummary:x.ResultSummary,Plan:x.Plan,ProfiledPlan:x.ProfiledPlan,QueryStatistics:x.QueryStatistics,Notification:x.Notification,ServerInfo:x.ServerInfo,Record:x.Record,Node:x.Node,Relationship:x.Relationship,UnboundRelationship:x.UnboundRelationship,Path:x.Path,PathSegment:x.PathSegment,Point:x.Point,Integer:x.Integer,Duration:x.Duration,LocalTime:x.LocalTime,Time:x.Time,Date:x.Date,LocalDateTime:x.LocalDateTime,DateTime:x.DateTime,bookmarkManager:x.bookmarkManager,resultTransformers:x.resultTransformers,notificationCategory:x.notificationCategory,notificationSeverityLevel:x.notificationSeverityLevel,notificationFilterDisabledCategory:x.notificationFilterDisabledCategory,notificationFilterMinimumSeverityLevel:x.notificationFilterMinimumSeverityLevel},j.default=Gm,D(F)});
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).neo4j=t()}(this,function(){"use strict";var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function D(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var U,L,F={},B={},e={},t={},n=r&&r.__extends||(U=function(e,t){return(U=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}U(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),W=(Object.defineProperty(t,"__esModule",{value:!0}),t.PROTOCOL_ERROR=t.SESSION_EXPIRED=t.SERVICE_UNAVAILABLE=t.Neo4jError=t.isRetriableError=t.newError=void 0,"ServiceUnavailable"),z=(t.SERVICE_UNAVAILABLE=W,"SessionExpired"),q=(t.SESSION_EXPIRED=z,t.PROTOCOL_ERROR="ProtocolError",L=Error,n(V,L),V.isRetriable=function(e){return null!=e&&e instanceof V&&e.retriable},V);function V(e,t,r){e=L.call(this,e,null!=r?{cause:r}:void 0)||this;return e.constructor=V,e.__proto__=V.prototype,e.code=t,e.name="Neo4jError",e.retriable=(r=t)===W||r===z||"Neo.ClientError.Security.AuthorizationExpired"===r||function(e){return!0===(null==e?void 0:e.includes("TransientError"))}(r),e}t.Neo4jError=q,t.newError=function(e,t,r){return new q(e,null!=t?t:"N/A",r)};n=q.isRetriable;t.isRetriableError=n;var n={},H=(Object.defineProperty(n,"__esModule",{value:!0}),n.toString=n.toNumber=n.inSafeRange=n.isInt=n.int=void 0,t),G=new Map,o=(d.prototype.inSafeRange=function(){return this.greaterThanOrEqual(d.MIN_SAFE_VALUE)&&this.lessThanOrEqual(d.MAX_SAFE_VALUE)},d.prototype.toInt=function(){return this.low},d.prototype.toNumber=function(){return this.high*Y+(this.low>>>0)},d.prototype.toBigInt=function(){var e;return this.isZero()?BigInt(0):this.isPositive()?BigInt(this.high>>>0)*BigInt(Y)+BigInt(this.low>>>0):(e=this.negate(),BigInt(-1)*(BigInt(e.high>>>0)*BigInt(Y)+BigInt(e.low>>>0)))},d.prototype.toNumberOrInfinity=function(){return this.lessThan(d.MIN_SAFE_VALUE)?Number.NEGATIVE_INFINITY:this.greaterThan(d.MAX_SAFE_VALUE)?Number.POSITIVE_INFINITY:this.toNumber()},d.prototype.toString=function(e){if((e=null!=e?e:10)<2||36<e)throw RangeError("radix out of range: "+e.toString());if(this.isZero())return"0";var t,r,n;if(this.isNegative())return this.equals(d.MIN_VALUE)?(t=d.fromNumber(e),n=(r=this.div(t)).multiply(t).subtract(this),r.toString(e)+n.toInt().toString(e)):"-"+this.negate().toString(e);for(var o=d.fromNumber(Math.pow(e,6)),i=(n=this,"");;){var u=n.div(o),a=(n.subtract(u.multiply(o)).toInt()>>>0).toString(e);if((n=u).isZero())return a+i;for(;a.length<6;)a="0"+a;i=""+a+i}},d.prototype.valueOf=function(){return this.toBigInt()},d.prototype.getHighBits=function(){return this.high},d.prototype.getLowBits=function(){return this.low},d.prototype.getNumBitsAbs=function(){if(this.isNegative())return this.equals(d.MIN_VALUE)?64:this.negate().getNumBitsAbs();for(var e=0!==this.high?this.high:this.low,t=0,t=31;0<t&&0==(e&1<<t);t--);return 0!==this.high?t+33:t+1},d.prototype.isZero=function(){return 0===this.high&&0===this.low},d.prototype.isNegative=function(){return this.high<0},d.prototype.isPositive=function(){return 0<=this.high},d.prototype.isOdd=function(){return 1==(1&this.low)},d.prototype.isEven=function(){return 0==(1&this.low)},d.prototype.equals=function(e){e=d.fromValue(e);return this.high===e.high&&this.low===e.low},d.prototype.notEquals=function(e){return!this.equals(e)},d.prototype.lessThan=function(e){return this.compare(e)<0},d.prototype.lessThanOrEqual=function(e){return this.compare(e)<=0},d.prototype.greaterThan=function(e){return 0<this.compare(e)},d.prototype.greaterThanOrEqual=function(e){return 0<=this.compare(e)},d.prototype.compare=function(e){e=d.fromValue(e);if(this.equals(e))return 0;var t=this.isNegative(),r=e.isNegative();return t&&!r||(t||!r)&&this.subtract(e).isNegative()?-1:1},d.prototype.negate=function(){return this.equals(d.MIN_VALUE)?d.MIN_VALUE:this.not().add(d.ONE)},d.prototype.add=function(e){var e=d.fromValue(e),t=this.high>>>16,r=65535&this.high,n=this.low>>>16,o=65535&this.low,i=e.high>>>16,u=65535&e.high,a=e.low>>>16,s=0,c=0,l=0,f=0;return c+=(l=l+((f+=o+(65535&e.low))>>>16)+(n+a))>>>16,d.fromBits((l&=65535)<<16|(f&=65535),((s+=(c+=r+u)>>>16)+(t+i)&65535)<<16|(c&=65535))},d.prototype.subtract=function(e){e=d.fromValue(e);return this.add(e.negate())},d.prototype.multiply=function(e){if(this.isZero())return d.ZERO;e=d.fromValue(e);if(e.isZero())return d.ZERO;if(this.equals(d.MIN_VALUE))return e.isOdd()?d.MIN_VALUE:d.ZERO;if(e.equals(d.MIN_VALUE))return this.isOdd()?d.MIN_VALUE:d.ZERO;if(this.isNegative())return e.isNegative()?this.negate().multiply(e.negate()):this.negate().multiply(e).negate();if(e.isNegative())return this.multiply(e.negate()).negate();if(this.lessThan(Z)&&e.lessThan(Z))return d.fromNumber(this.toNumber()*e.toNumber());var t=this.high>>>16,r=65535&this.high,n=this.low>>>16,o=65535&this.low,i=e.high>>>16,u=65535&e.high,a=e.low>>>16,e=65535&e.low,s=0,c=0,l=0,f=(f=0)+((c=c+((l+=o*e)>>>16)+n*e)>>>16)+((c=(c&65535)+o*a)>>>16);return d.fromBits((c&=65535)<<16|(l&=65535),((s+=(f+=r*e)>>>16)+((f=(f&65535)+n*a)>>>16)+((f=(f&65535)+o*u)>>>16)+(t*e+r*a+n*u+o*i)&65535)<<16|(f&=65535))},d.prototype.div=function(e){var t,r,n,o=d.fromValue(e);if(o.isZero())throw(0,H.newError)("division by zero");if(this.isZero())return d.ZERO;{if(this.equals(d.MIN_VALUE))return o.equals(d.ONE)||o.equals(d.NEG_ONE)?d.MIN_VALUE:o.equals(d.MIN_VALUE)?d.ONE:(n=this.shiftRight(1).div(o).shiftLeft(1)).equals(d.ZERO)?o.isNegative()?d.ONE:d.NEG_ONE:(t=this.subtract(o.multiply(n)),n.add(t.div(o)));if(o.equals(d.MIN_VALUE))return d.ZERO}if(this.isNegative())return o.isNegative()?this.negate().div(o.negate()):this.negate().div(o).negate();if(o.isNegative())return this.div(o.negate()).negate();for(r=d.ZERO,t=this;t.greaterThanOrEqual(o);){n=Math.max(1,Math.floor(t.toNumber()/o.toNumber()));for(var i=Math.ceil(Math.log(n)/Math.LN2),u=i<=48?1:Math.pow(2,i-48),a=d.fromNumber(n),s=a.multiply(o);s.isNegative()||s.greaterThan(t);)s=(a=d.fromNumber(n-=u)).multiply(o);a.isZero()&&(a=d.ONE),r=r.add(a),t=t.subtract(s)}return r},d.prototype.modulo=function(e){e=d.fromValue(e);return this.subtract(this.div(e).multiply(e))},d.prototype.not=function(){return d.fromBits(~this.low,~this.high)},d.prototype.and=function(e){e=d.fromValue(e);return d.fromBits(this.low&e.low,this.high&e.high)},d.prototype.or=function(e){e=d.fromValue(e);return d.fromBits(this.low|e.low,this.high|e.high)},d.prototype.xor=function(e){e=d.fromValue(e);return d.fromBits(this.low^e.low,this.high^e.high)},d.prototype.shiftLeft=function(e){e=d.toNumber(e);return 0==(e&=63)?d.ZERO:e<32?d.fromBits(this.low<<e,this.high<<e|this.low>>>32-e):d.fromBits(0,this.low<<e-32)},d.prototype.shiftRight=function(e){var t=d.toNumber(e),e=d.toNumber(e);return 0==(t&=63)?d.ZERO:e<32?d.fromBits(this.low>>>t|this.high<<32-t,this.high>>t):d.fromBits(this.high>>t-32,0<=this.high?0:-1)},d.isInteger=function(e){return!0===(null==e?void 0:e.__isInteger__)},d.fromInt=function(e){if(-128<=(e|=0)&&e<128&&null!=(t=G.get(e)))return t;var t=new d(e,e<0?-1:0);return-128<=e&&e<128&&G.set(e,t),t},d.fromBits=function(e,t){return new d(e,t)},d.fromNumber=function(e){return isNaN(e)||!isFinite(e)?d.ZERO:e<=-K?d.MIN_VALUE:K<=e+1?d.MAX_VALUE:e<0?d.fromNumber(-e).negate():new d(e%Y|0,e/Y|0)},d.fromString=function(e,t,r){var n=(void 0===r?{}:r).strictStringValidation;if(0===e.length)throw(0,H.newError)("number format error: empty string");if("NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return d.ZERO;if((t=null!=t?t:10)<2||36<t)throw(0,H.newError)("radix out of range: "+t.toString());if(0<(r=e.indexOf("-")))throw(0,H.newError)('number format error: interior "-" character: '+e);if(0===r)return d.fromString(e.substring(1),t).negate();for(var o,i,u=d.fromNumber(Math.pow(t,8)),a=d.ZERO,s=0;s<e.length;s+=8){var c,l=Math.min(8,e.length-s),f=e.substring(s,s+l),p=parseInt(f,t);if(!0===n&&(o=f,c=p,i=t,Number.isNaN(o)||Number.isNaN(c)||function(e,t,r){e=e.toString(t),t=Math.max(r-e.length,0),r="0".repeat(t);return"".concat(r).concat(e)}(c,i,o.length)!==o.toLowerCase()))throw(0,H.newError)('number format error: "'.concat(f,'" is NaN in radix ').concat(t,": ").concat(e));a=l<8?(c=d.fromNumber(Math.pow(t,l)),a.multiply(c).add(d.fromNumber(p))):(a=a.multiply(u)).add(d.fromNumber(p))}return a},d.fromValue=function(e,t){return void 0===t&&(t={}),e instanceof d?e:"number"==typeof e?(!0===t.ceilFloat&&(e=Math.ceil(e)),d.fromNumber(e)):"string"==typeof e?d.fromString(e,void 0,t):"bigint"==typeof e?d.fromString(e.toString()):new d(e.low,e.high)},d.toNumber=function(e){switch(typeof e){case"number":return e;case"bigint":return Number(e);default:return d.fromValue(e).toNumber()}},d.toString=function(e,t){return d.fromValue(e).toString(t)},d.inSafeRange=function(e){return d.fromValue(e).inSafeRange()},d.ZERO=d.fromInt(0),d.ONE=d.fromInt(1),d.NEG_ONE=d.fromInt(-1),d.MAX_VALUE=d.fromBits(-1,2147483647),d.MIN_VALUE=d.fromBits(0,-2147483648),d.MIN_SAFE_VALUE=d.fromBits(1,-2097152),d.MAX_SAFE_VALUE=d.fromBits(-1,2097151),d.__isInteger__=!0,d);function d(e,t){this.low=null!=e?e:0,this.high=null!=t?t:0}Object.defineProperty(o.prototype,"__isInteger__",{value:!0,enumerable:!1,configurable:!1});var Y=4294967296,K=Y*Y/2,Z=o.fromInt(1<<24),i=o.fromValue,i=(n.int=i,o.isInteger),i=(n.isInt=i,o.inSafeRange),i=(n.inSafeRange=i,o.toNumber),i=(n.toNumber=i,o.toString),i=(n.toString=i,n.default=o,{}),o={},u={},Q={},X={},J=(Object.defineProperty(X,"__esModule",{value:!0}),X.getBrokenObjectReason=X.isBrokenObject=X.createBrokenObject=void 0,"__isBrokenObject__"),$="__reason__";X.createBrokenObject=function(r,e){function n(){throw r}return void 0===e&&(e={}),new Proxy(e,{get:function(e,t){return t===J||(t===$?r:void("toJSON"!==t&&n()))},set:n,apply:n,construct:n,defineProperty:n,deleteProperty:n,getOwnPropertyDescriptor:n,getPrototypeOf:n,has:n,isExtensible:n,ownKeys:n,preventExtensions:n,setPrototypeOf:n})},X.isBrokenObject=function(e){return null!==e&&"object"==typeof e&&!0===e[J]},X.getBrokenObjectReason=function(e){return e[$]},Object.defineProperty(Q,"__esModule",{value:!0}),Q.stringify=void 0;var ee=X;Q.stringify=function(e){return JSON.stringify(e,function(e,t){return(0,ee.isBrokenObject)(t)?{__isBrokenObject__:!0,__reason__:(0,ee.getBrokenObjectReason)(t)}:"bigint"==typeof t?"".concat(t,"n"):t})};var a,te,re,ne,oe,ie,ue,ae=r&&r.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},se=(Object.defineProperty(u,"__esModule",{value:!0}),u.ENCRYPTION_OFF=u.ENCRYPTION_ON=u.equals=u.validateQueryAndParameters=u.assertValidDate=u.assertNumberOrInteger=u.assertNumber=u.assertString=u.assertObject=u.isString=u.isObject=u.isEmptyObjectOrNull=void 0,n),ce=Q;u.ENCRYPTION_ON="ENCRYPTION_ON";function le(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}function fe(e,t){if(pe(e))return e;throw new TypeError((0,ce.stringify)(t)+" expected to be string but was: "+(0,ce.stringify)(e))}function pe(e){return"[object String]"===Object.prototype.toString.call(e)}function de(e,t){this._minNumber=e,this._maxNumber=t,this._minInteger=(0,ne.int)(e),this._maxInteger=(0,ne.int)(t)}function he(e,t,r){e=(0,ne.int)(e),t=(0,ne.int)(t),r=(0,ne.int)(r);var n=e.multiply(365);return n=(n=(n=e.greaterThanOrEqual(0)?n.add(e.add(3).div(4).subtract(e.add(99).div(100)).add(e.add(399).div(400))):n.subtract(e.div(-4).subtract(e.div(-100)).add(e.div(-400)))).add(t.multiply(367).subtract(362).div(12))).add(r.subtract(1)),t.greaterThan(2)&&(n=n.subtract(1),function(e){if((e=(0,ne.int)(e)).modulo(4).equals(0))return!e.modulo(100).equals(0)||!!e.modulo(400).equals(0)}(e)||(n=n.subtract(1))),n.subtract(a.DAYS_0000_TO_1970)}function be(e,t){return(0,oe.newError)("".concat(t,' is expected to be a valid ZoneId but was: "').concat(e,'"'))}function ye(e,t,r){if((0,ie.assertNumberOrInteger)(e,r),t.contains(e))return e;throw(0,oe.newError)("".concat(r," is expected to be in range ").concat(t.toString()," but was: ").concat(e.toString()))}function _e(e,t){e=(0,ne.int)(e),t=(0,ne.int)(t);var r=e.div(t);return r=e.isPositive()!==t.isPositive()&&r.multiply(t).notEquals(e)?r.subtract(1):r}function ve(e,t){return e=(0,ne.int)(e),t=(0,ne.int)(t),e.subtract(_e(e,t).multiply(t))}function me(e){return(e=(0,ne.int)(e)).equals(0)?"":"."+ge(e,9)}function ge(e,t,r){var n=(e=(0,ne.int)(e)).isNegative(),o=(e=n?e.negate():e).toString();if(null!=t)for(;o.length<t;)o="0"+o;return n?"-"+o:!0===(null==r?void 0:r.usePositiveSign)?"+"+o:o}u.ENCRYPTION_OFF="ENCRYPTION_OFF",u.isEmptyObjectOrNull=function(e){if(null===e)return!0;if(!le(e))return!1;for(var t in e)if(void 0!==e[t])return!1;return!0},u.isObject=le,u.validateQueryAndParameters=function(e,t,r){var n="",t=null!=t?t:{},r=null!=(r=null==r?void 0:r.skipAsserts)&&r;if("string"==typeof e?n=e:e instanceof String?n=e.toString():"object"==typeof e&&null!=e.text&&(n=e.text,t=null!=(e=e.parameters)?e:{}),!r){e=n;if(fe(e,"Cypher query"),0===e.trim().length)throw new TypeError("Cypher query is expected to be a non-empty string.");r=t;if(!le(r))throw e=null!=r.constructor?" "+r.constructor.name:"",new TypeError("Query parameters are expected to either be undefined/null or an object, given:".concat(e," ").concat(JSON.stringify(r)))}return{validatedQuery:n,params:t}},u.assertObject=function(e,t){if(le(e))return e;throw new TypeError(t+" expected to be an object but was: "+(0,ce.stringify)(e))},u.assertString=fe,u.assertNumber=function(e,t){if("number"!=typeof e)throw new TypeError(t+" expected to be a number but was: "+(0,ce.stringify)(e));return e},u.assertNumberOrInteger=function(e,t){if("number"==typeof e||"bigint"==typeof e||(0,se.isInt)(e))return e;throw new TypeError(t+" expected to be either a number or an Integer object but was: "+(0,ce.stringify)(e))},u.assertValidDate=function(e,t){if("[object Date]"!==Object.prototype.toString.call(e))throw new TypeError(t+" expected to be a standard JavaScript Date but was: "+(0,ce.stringify)(e));if(Number.isNaN(e.getTime()))throw new TypeError(t+" expected to be valid JavaScript Date but its time was NaN: "+(0,ce.stringify)(e));return e},u.isString=pe,u.equals=function e(t,r){var n,o;if(t===r)return!0;if(null===t||null===r)return!1;if("object"!=typeof t||"object"!=typeof r)return!1;var i=Object.keys(t),u=Object.keys(r);if(i.length!==u.length)return!1;try{for(var a=ae(i),s=a.next();!s.done;s=a.next()){var c=s.value;if(!e(t[c],r[c]))return!1}}catch(e){n={error:e}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(n)throw n.error}}return!0},a=o,te=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),re=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&te(t,e,r);return re(t,e),t},Object.defineProperty(a,"__esModule",{value:!0}),a.floorMod=a.floorDiv=a.assertValidZoneId=a.assertValidNanosecond=a.assertValidSecond=a.assertValidMinute=a.assertValidHour=a.assertValidDay=a.assertValidMonth=a.assertValidYear=a.timeZoneOffsetInSeconds=a.totalNanoseconds=a.newDate=a.toStandardDate=a.isoStringToStandardDate=a.dateToIsoString=a.timeZoneOffsetToIsoString=a.timeToIsoString=a.durationToIsoString=a.dateToEpochDay=a.localDateTimeToEpochSecond=a.localTimeToNanoOfDay=a.normalizeNanosecondsForDuration=a.normalizeSecondsForDuration=a.SECONDS_PER_DAY=a.DAYS_PER_400_YEAR_CYCLE=a.DAYS_0000_TO_1970=a.NANOS_PER_HOUR=a.NANOS_PER_MINUTE=a.NANOS_PER_MILLISECOND=a.NANOS_PER_SECOND=a.SECONDS_PER_HOUR=a.SECONDS_PER_MINUTE=a.MINUTES_PER_HOUR=a.NANOSECOND_OF_SECOND_RANGE=a.SECOND_OF_MINUTE_RANGE=a.MINUTE_OF_HOUR_RANGE=a.HOUR_OF_DAY_RANGE=a.DAY_OF_MONTH_RANGE=a.MONTH_OF_YEAR_RANGE=a.YEAR_RANGE=void 0,ne=s(n),oe=t,ie=u,de.prototype.contains=function(e){var t;return(0,ne.isInt)(e)&&e instanceof ne.default?e.greaterThanOrEqual(this._minInteger)&&e.lessThanOrEqual(this._maxInteger):"bigint"==typeof e?(t=(0,ne.int)(e)).greaterThanOrEqual(this._minInteger)&&t.lessThanOrEqual(this._maxInteger):e>=this._minNumber&&e<=this._maxNumber},de.prototype.toString=function(){return"[".concat(this._minNumber,", ").concat(this._maxNumber,"]")},s=de,a.YEAR_RANGE=new s(-999999999,999999999),a.MONTH_OF_YEAR_RANGE=new s(1,12),a.DAY_OF_MONTH_RANGE=new s(1,31),a.HOUR_OF_DAY_RANGE=new s(0,23),a.MINUTE_OF_HOUR_RANGE=new s(0,59),a.SECOND_OF_MINUTE_RANGE=new s(0,59),a.NANOSECOND_OF_SECOND_RANGE=new s(0,999999999),a.MINUTES_PER_HOUR=60,a.SECONDS_PER_MINUTE=60,a.SECONDS_PER_HOUR=a.SECONDS_PER_MINUTE*a.MINUTES_PER_HOUR,a.NANOS_PER_SECOND=1e9,a.NANOS_PER_MILLISECOND=1e6,a.NANOS_PER_MINUTE=a.NANOS_PER_SECOND*a.SECONDS_PER_MINUTE,a.NANOS_PER_HOUR=a.NANOS_PER_MINUTE*a.MINUTES_PER_HOUR,a.DAYS_0000_TO_1970=719528,a.DAYS_PER_400_YEAR_CYCLE=146097,a.SECONDS_PER_DAY=86400,a.normalizeSecondsForDuration=function(e,t){return(0,ne.int)(e).add(_e(t,a.NANOS_PER_SECOND))},a.normalizeNanosecondsForDuration=function(e){return ve(e,a.NANOS_PER_SECOND)},a.localTimeToNanoOfDay=function(e,t,r,n){return e=(0,ne.int)(e),t=(0,ne.int)(t),r=(0,ne.int)(r),n=(0,ne.int)(n),(e=(e=(e=e.multiply(a.NANOS_PER_HOUR)).add(t.multiply(a.NANOS_PER_MINUTE))).add(r.multiply(a.NANOS_PER_SECOND))).add(n)},a.localDateTimeToEpochSecond=function(e,t,r,n,o,i,u){return e=he(e,t,r),t=function(e,t,r){e=(0,ne.int)(e),t=(0,ne.int)(t),r=(0,ne.int)(r);e=e.multiply(a.SECONDS_PER_HOUR);return(e=e.add(t.multiply(a.SECONDS_PER_MINUTE))).add(r)}(n,o,i),e.multiply(a.SECONDS_PER_DAY).add(t)},a.dateToEpochDay=he,a.durationToIsoString=function(e,t,r,n){return e=ge(e),t=ge(t),r=function(e,t){e=(0,ne.int)(e),t=(0,ne.int)(t);var r,n=e.isNegative(),o=t.greaterThan(0);e=n&&o?e.equals(-1)?"-0":e.add(1).toString():e.toString();o&&(r=me((n?t.negate().add(2*a.NANOS_PER_SECOND):t.add(a.NANOS_PER_SECOND)).modulo(a.NANOS_PER_SECOND)));return null!=r?e+r:e}(r,n),"P".concat(e,"M").concat(t,"DT").concat(r,"S")},a.timeToIsoString=function(e,t,r,n){return e=ge(e,2),t=ge(t,2),r=ge(r,2),n=me(n),"".concat(e,":").concat(t,":").concat(r).concat(n)},a.timeZoneOffsetToIsoString=function(e){if((e=(0,ne.int)(e)).equals(0))return"Z";var t=(r=e.isNegative())?"-":"+",r=ge((e=r?e.multiply(-1):e).div(a.SECONDS_PER_HOUR),2),n=ge(e.div(a.SECONDS_PER_MINUTE).modulo(a.MINUTES_PER_HOUR),2);return null!=(e=(e=e.modulo(a.SECONDS_PER_MINUTE)).equals(0)?null:ge(e,2))?"".concat(t).concat(r,":").concat(n,":").concat(e):"".concat(t).concat(r,":").concat(n)},a.dateToIsoString=function(e,t,r){return e=function(e){e=(0,ne.int)(e);if(e.isNegative()||e.greaterThan(9999))return ge(e,6,{usePositiveSign:!0});return ge(e,4)}(e),t=ge(t,2),r=ge(r,2),"".concat(e,"-").concat(t,"-").concat(r)},a.isoStringToStandardDate=function(e){return new Date(e)},a.toStandardDate=function(e){return new Date(e)},a.newDate=function(e){return new Date(e)},a.totalNanoseconds=function(e,t){return t=null!=t?t:0,e=e.getMilliseconds()*a.NANOS_PER_MILLISECOND,t instanceof ne.default?t.add(e):"bigint"==typeof t?t+BigInt(e):t+e},a.timeZoneOffsetInSeconds=function(e){var t=e.getSeconds()>=e.getUTCSeconds()?e.getSeconds()-e.getUTCSeconds():e.getSeconds()-e.getUTCSeconds()+60;return 0===(e=e.getTimezoneOffset())?0+t:-1*e*a.SECONDS_PER_MINUTE+t},a.assertValidYear=function(e){return ye(e,a.YEAR_RANGE,"Year")},a.assertValidMonth=function(e){return ye(e,a.MONTH_OF_YEAR_RANGE,"Month")},a.assertValidDay=function(e){return ye(e,a.DAY_OF_MONTH_RANGE,"Day")},a.assertValidHour=function(e){return ye(e,a.HOUR_OF_DAY_RANGE,"Hour")},a.assertValidMinute=function(e){return ye(e,a.MINUTE_OF_HOUR_RANGE,"Minute")},a.assertValidSecond=function(e){return ye(e,a.SECOND_OF_MINUTE_RANGE,"Second")},a.assertValidNanosecond=function(e){return ye(e,a.NANOSECOND_OF_SECOND_RANGE,"Nanosecond")},ue=new Map,a.assertValidZoneId=function(t,r){var e=ue.get(r);if(!0!==e){if(!1===e)throw be(r,t);try{Intl.DateTimeFormat(void 0,{timeZone:r}),ue.set(r,!0)}catch(e){throw ue.set(r,!1),be(r,t)}}},a.floorDiv=_e,a.floorMod=ve;var Oe=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),we=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&Oe(t,e,r);return we(t,e),t},Ee=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},c=(Object.defineProperty(i,"__esModule",{value:!0}),i.isDateTime=i.DateTime=i.isLocalDateTime=i.LocalDateTime=i.isDate=i.Date=i.isTime=i.Time=i.isLocalTime=i.LocalTime=i.isDuration=i.Duration=void 0,s(o)),Pe=u,Se=t,Te=s(n),s={value:!0,enumerable:!1,configurable:!1,writable:!1},je="__isDuration__",Ce="__isLocalTime__",Ie="__isTime__",Re="__isDate__",ke="__isLocalDateTime__",Ae="__isDateTime__",l=(Me.prototype.toString=function(){return c.durationToIsoString(this.months,this.days,this.seconds,this.nanoseconds)},Me);function Me(e,t,r,n){this.months=(0,Pe.assertNumberOrInteger)(e,"Months"),this.days=(0,Pe.assertNumberOrInteger)(t,"Days"),(0,Pe.assertNumberOrInteger)(r,"Seconds"),(0,Pe.assertNumberOrInteger)(n,"Nanoseconds"),this.seconds=c.normalizeSecondsForDuration(r,n),this.nanoseconds=c.normalizeNanosecondsForDuration(n),Object.freeze(this)}i.Duration=l,Object.defineProperty(l.prototype,je,s),i.isDuration=function(e){return Fe(e,je)};Ne.fromStandardDate=function(e,t){We(e,t);t=c.totalNanoseconds(e,t);return new Ne(e.getHours(),e.getMinutes(),e.getSeconds(),t instanceof Te.default?t.toInt():"bigint"==typeof t?(0,Te.int)(t).toInt():t)},Ne.prototype.toString=function(){return c.timeToIsoString(this.hour,this.minute,this.second,this.nanosecond)};l=Ne;function Ne(e,t,r,n){this.hour=c.assertValidHour(e),this.minute=c.assertValidMinute(t),this.second=c.assertValidSecond(r),this.nanosecond=c.assertValidNanosecond(n),Object.freeze(this)}i.LocalTime=l,Object.defineProperty(l.prototype,Ce,s),i.isLocalTime=function(e){return Fe(e,Ce)};xe.fromStandardDate=function(e,t){return We(e,t),new xe(e.getHours(),e.getMinutes(),e.getSeconds(),(0,Te.toNumber)(c.totalNanoseconds(e,t)),c.timeZoneOffsetInSeconds(e))},xe.prototype.toString=function(){return c.timeToIsoString(this.hour,this.minute,this.second,this.nanosecond)+c.timeZoneOffsetToIsoString(this.timeZoneOffsetSeconds)};l=xe;function xe(e,t,r,n,o){this.hour=c.assertValidHour(e),this.minute=c.assertValidMinute(t),this.second=c.assertValidSecond(r),this.nanosecond=c.assertValidNanosecond(n),this.timeZoneOffsetSeconds=(0,Pe.assertNumberOrInteger)(o,"Time zone offset in seconds"),Object.freeze(this)}i.Time=l,Object.defineProperty(l.prototype,Ie,s),i.isTime=function(e){return Fe(e,Ie)};De.fromStandardDate=function(e){return We(e),new De(e.getFullYear(),e.getMonth()+1,e.getDate())},De.prototype.toStandardDate=function(){return c.isoStringToStandardDate(this.toString())},De.prototype.toString=function(){return c.dateToIsoString(this.year,this.month,this.day)};l=De;function De(e,t,r){this.year=c.assertValidYear(e),this.month=c.assertValidMonth(t),this.day=c.assertValidDay(r),Object.freeze(this)}i.Date=l,Object.defineProperty(l.prototype,Re,s),i.isDate=function(e){return Fe(e,Re)};Ue.fromStandardDate=function(e,t){return We(e,t),new Ue(e.getFullYear(),e.getMonth()+1,e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),(0,Te.toNumber)(c.totalNanoseconds(e,t)))},Ue.prototype.toStandardDate=function(){return c.isoStringToStandardDate(this.toString())},Ue.prototype.toString=function(){return Be(this.year,this.month,this.day,this.hour,this.minute,this.second,this.nanosecond)};l=Ue;function Ue(e,t,r,n,o,i,u){this.year=c.assertValidYear(e),this.month=c.assertValidMonth(t),this.day=c.assertValidDay(r),this.hour=c.assertValidHour(n),this.minute=c.assertValidMinute(o),this.second=c.assertValidSecond(i),this.nanosecond=c.assertValidNanosecond(u),Object.freeze(this)}i.LocalDateTime=l,Object.defineProperty(l.prototype,ke,s),i.isLocalDateTime=function(e){return Fe(e,ke)};Le.fromStandardDate=function(e,t){return We(e,t),new Le(e.getFullYear(),e.getMonth()+1,e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),(0,Te.toNumber)(c.totalNanoseconds(e,t)),c.timeZoneOffsetInSeconds(e),null)},Le.prototype.toStandardDate=function(){return c.toStandardDate(this._toUTC())},Le.prototype.toString=function(){var e;return Be(this.year,this.month,this.day,this.hour,this.minute,this.second,this.nanosecond)+(null!=this.timeZoneOffsetSeconds?c.timeZoneOffsetToIsoString(null!=(e=this.timeZoneOffsetSeconds)?e:0):"")+(null!=this.timeZoneId?"[".concat(this.timeZoneId,"]"):"")},Le.prototype._toUTC=function(){if(void 0===this.timeZoneOffsetSeconds)throw new Error("Requires DateTime created with time zone offset");var e=c.localDateTimeToEpochSecond(this.year,this.month,this.day,this.hour,this.minute,this.second,this.nanosecond).subtract(null!=(e=this.timeZoneOffsetSeconds)?e:0);return(0,Te.int)(e).multiply(1e3).add((0,Te.int)(this.nanosecond).div(1e6)).toNumber()};l=Le;function Le(e,t,r,n,o,i,u,a,s){this.year=c.assertValidYear(e),this.month=c.assertValidMonth(t),this.day=c.assertValidDay(r),this.hour=c.assertValidHour(n),this.minute=c.assertValidMinute(o),this.second=c.assertValidSecond(i),this.nanosecond=c.assertValidNanosecond(u);e=Ee(function(e,t){var r=null!=e,n=null!=t&&""!==t;if(!r&&!n)throw(0,Se.newError)("Unable to create DateTime without either time zone offset or id. Please specify either of them. Given offset: ".concat(e," and id: ").concat(t));var o=[void 0,void 0];r&&((0,Pe.assertNumberOrInteger)(e,"Time zone offset in seconds"),o[0]=e);n&&((0,Pe.assertString)(t,"Time zone ID"),c.assertValidZoneId("Time zone ID",t),o[1]=t);return o}(a,s),2),t=e[0],r=e[1];this.timeZoneOffsetSeconds=t,this.timeZoneId=null!=r?r:void 0,Object.freeze(this)}function Fe(e,t){return null!=e&&!0===e[t]}function Be(e,t,r,n,o,i,u){return c.dateToIsoString(e,t,r)+"T"+c.timeToIsoString(n,o,i,u)}function We(e,t){(0,Pe.assertValidDate)(e,"Standard date"),null!=t&&(0,Pe.assertNumberOrInteger)(t,"Nanosecond")}i.DateTime=l,Object.defineProperty(l.prototype,Ae,s),i.isDateTime=function(e){return Fe(e,Ae)};var l={},ze=(Object.defineProperty(l,"__esModule",{value:!0}),l.isPathSegment=l.PathSegment=l.isPath=l.Path=l.isUnboundRelationship=l.UnboundRelationship=l.isRelationship=l.Relationship=l.isNode=l.Node=void 0,Q),s={value:!0,enumerable:!1,configurable:!1,writable:!1},qe="__isNode__",Ve="__isRelationship__",He="__isUnboundRelationship__",Ge="__isPath__",Ye="__isPathSegment__";function Ke(e,t){return null!=e&&!0===e[t]}Ze.prototype.toString=function(){for(var e="("+this.elementId,t=0;t<this.labels.length;t++)e+=":"+this.labels[t];var r=Object.keys(this.properties);if(0<r.length){e+=" {";for(t=0;t<r.length;t++)0<t&&(e+=","),e+=r[t]+":"+(0,ze.stringify)(this.properties[r[t]]);e+="}"}return e+=")"};var f=Ze;function Ze(e,t,r,n){this.identity=e,this.labels=t,this.properties=r,this.elementId=tt(n,function(){return e.toString()})}l.Node=f,Object.defineProperty(f.prototype,qe,s),l.isNode=function(e){return Ke(e,qe)};Xe.prototype.toString=function(){var e="("+this.startNodeElementId+")-[:"+this.type,t=Object.keys(this.properties);if(0<t.length){e+=" {";for(var r=0;r<t.length;r++)0<r&&(e+=","),e+=t[r]+":"+(0,ze.stringify)(this.properties[t[r]]);e+="}"}return e+="]->("+this.endNodeElementId+")"};var Qe=Xe;function Xe(e,t,r,n,o,i,u,a){this.identity=e,this.start=t,this.end=r,this.type=n,this.properties=o,this.elementId=tt(i,function(){return e.toString()}),this.startNodeElementId=tt(u,function(){return t.toString()}),this.endNodeElementId=tt(a,function(){return r.toString()})}l.Relationship=Qe,Object.defineProperty(Qe.prototype,Ve,s),l.isRelationship=function(e){return Ke(e,Ve)};Je.prototype.bind=function(e,t){return new Qe(this.identity,e,t,this.type,this.properties,this.elementId)},Je.prototype.bindTo=function(e,t){return new Qe(this.identity,e.identity,t.identity,this.type,this.properties,this.elementId,e.elementId,t.elementId)},Je.prototype.toString=function(){var e="-[:"+this.type,t=Object.keys(this.properties);if(0<t.length){e+=" {";for(var r=0;r<t.length;r++)0<r&&(e+=","),e+=t[r]+":"+(0,ze.stringify)(this.properties[t[r]]);e+="}"}return e+="]->"};f=Je;function Je(e,t,r,n){this.identity=e,this.type=t,this.properties=r,this.elementId=tt(n,function(){return e.toString()})}l.UnboundRelationship=f,Object.defineProperty(f.prototype,He,s),l.isUnboundRelationship=function(e){return Ke(e,He)};function $e(e,t,r){this.start=e,this.relationship=t,this.end=r}l.PathSegment=$e,Object.defineProperty($e.prototype,Ye,s),l.isPathSegment=function(e){return Ke(e,Ye)};function et(e,t,r){this.start=e,this.end=t,this.segments=r,this.length=r.length}function tt(e,t){return null==e?t():e}l.Path=et,Object.defineProperty(et.prototype,Ge,s),l.isPath=function(e){return Ke(e,Ge)};var f={},rt=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},nt=r&&r.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},ot=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},it=(Object.defineProperty(f,"__esModule",{value:!0}),t);function ut(e,t,r){var n;this.keys=e,this.length=e.length,this._fields=t,this._fieldLookup=null!=r?r:(n={},e.forEach(function(e,t){n[e]=t}),n)}ut.prototype.forEach=function(e){var t,r;try{for(var n=nt(this.entries()),o=n.next();!o.done;o=n.next()){var i=ot(o.value,2),u=i[0];e(i[1],u,this)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}},ut.prototype.map=function(e){var t,r,n=[];try{for(var o=nt(this.entries()),i=o.next();!i.done;i=o.next()){var u=ot(i.value,2),a=u[0],s=u[1];n.push(e(s,a,this))}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return n},ut.prototype.entries=function(){var t;return rt(this,function(e){switch(e.label){case 0:t=0,e.label=1;case 1:return t<this.keys.length?[4,[this.keys[t],this._fields[t]]]:[3,4];case 2:e.sent(),e.label=3;case 3:return t++,[3,1];case 4:return[2]}})},ut.prototype.values=function(){var t;return rt(this,function(e){switch(e.label){case 0:t=0,e.label=1;case 1:return t<this.keys.length?[4,this._fields[t]]:[3,4];case 2:e.sent(),e.label=3;case 3:return t++,[3,1];case 4:return[2]}})},ut.prototype[Symbol.iterator]=function(){var t;return rt(this,function(e){switch(e.label){case 0:t=0,e.label=1;case 1:return t<this.keys.length?[4,this._fields[t]]:[3,4];case 2:e.sent(),e.label=3;case 3:return t++,[3,1];case 4:return[2]}})},ut.prototype.toObject=function(){var t,e,r={};try{for(var n=nt(this.entries()),o=n.next();!o.done;o=n.next()){var i=ot(o.value,2),u=i[0],a=i[1];r[u]=a}}catch(e){t={error:e}}finally{try{o&&!o.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}return r},ut.prototype.get=function(e){var t;if("number"!=typeof e){if(void 0===(t=this._fieldLookup[e]))throw(0,it.newError)("This record has no field with key '".concat(e.toString(),"', available keys are: [")+this.keys.toString()+"].")}else t=e;if(t>this._fields.length-1||t<0)throw(0,it.newError)("This record has no field with index '"+t.toString()+"'. Remember that indexes start at `0`, and make sure your query returns records in the shape you meant it to.");return this._fields[t]},ut.prototype.has=function(e){return"number"==typeof e?0<=e&&e<this._fields.length:void 0!==this._fieldLookup[e]},f.default=ut;var s={},at=(Object.defineProperty(s,"__esModule",{value:!0}),s.isPoint=s.Point=void 0,u),st="__isPoint__",p=(ct.prototype.toString=function(){return null==this.z||isNaN(this.z)?"Point{srid=".concat(lt(this.srid),", x=").concat(lt(this.x),", y=").concat(lt(this.y),"}"):"Point{srid=".concat(lt(this.srid),", x=").concat(lt(this.x),", y=").concat(lt(this.y),", z=").concat(lt(this.z),"}")},ct);function ct(e,t,r,n){this.srid=(0,at.assertNumberOrInteger)(e,"SRID"),this.x=(0,at.assertNumber)(t,"X coordinate"),this.y=(0,at.assertNumber)(r,"Y coordinate"),this.z=null==n?n:(0,at.assertNumber)(n,"Z coordinate"),Object.freeze(this)}function lt(e){return Number.isInteger(e)?e.toString()+".0":e.toString()}s.Point=p,Object.defineProperty(p.prototype,st,{value:!0,enumerable:!1,configurable:!1,writable:!1}),s.isPoint=function(e){return null!=e&&!0===e[st]};var p={},ft=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),pt=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),dt=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&ft(t,e,r);return pt(t,e),t},ht=(Object.defineProperty(p,"__esModule",{value:!0}),p.notificationCategory=p.notificationSeverityLevel=p.Stats=p.QueryStatistics=p.ProfiledPlan=p.Plan=p.Notification=p.ServerInfo=p.queryType=void 0,dt(n)),dt=(bt.prototype._buildNotifications=function(e){return null==e?[]:e.map(function(e){return new St(e)})},bt.prototype.hasPlan=function(){return this.plan instanceof yt},bt.prototype.hasProfile=function(){return this.profile instanceof _t},bt);function bt(e,t,r,n){this.query={text:e,parameters:t},this.queryType=r.type,this.counters=new mt(null!=(e=r.stats)?e:{}),this.updateStatistics=this.counters,this.plan=(null!=r.plan||null!=r.profile)&&new yt(null!=(t=r.plan)?t:r.profile),this.profile=null!=r.profile&&new _t(r.profile),this.notifications=this._buildNotifications(r.notifications),this.server=new jt(r.server,n),this.resultConsumedAfter=r.result_consumed_after,this.resultAvailableAfter=r.result_available_after,this.database={name:null!=(e=r.db)?e:null}}var yt=function t(e){this.operatorType=e.operatorType,this.identifiers=e.identifiers,this.arguments=e.args,this.children=null!=e.children?e.children.map(function(e){return new t(e)}):[]},_t=(p.Plan=yt,vt.prototype.hasPageCacheStats=function(){return 0<this.pageCacheMisses||0<this.pageCacheHits||0<this.pageCacheHitRatio},vt);function vt(e){this.operatorType=e.operatorType,this.identifiers=e.identifiers,this.arguments=e.args,this.dbHits=It("dbHits",e),this.rows=It("rows",e),this.pageCacheMisses=It("pageCacheMisses",e),this.pageCacheHits=It("pageCacheHits",e),this.pageCacheHitRatio=It("pageCacheHitRatio",e),this.time=It("time",e),this.children=null!=e.children?e.children.map(function(e){return new vt(e)}):[]}p.ProfiledPlan=_t;p.Stats=function(){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},gt.prototype.containsUpdates=function(){var r=this;return void 0!==this._containsUpdates?this._containsUpdates:0<Object.keys(this._stats).reduce(function(e,t){return e+r._stats[t]},0)},gt.prototype.updates=function(){return this._stats},gt.prototype.containsSystemUpdates=function(){return void 0!==this._containsSystemUpdates?this._containsSystemUpdates:0<this._systemUpdates},gt.prototype.systemUpdates=function(){return this._systemUpdates};var mt=gt;function gt(r){var n=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(r).forEach(function(e){var t=e.replace(/(-\w)/g,function(e){return e[1].toUpperCase()});t in n._stats?n._stats[t]=Ct(r[e]):"systemUpdates"===t?n._systemUpdates=Ct(r[e]):"containsSystemUpdates"===t?n._containsSystemUpdates=r[e]:"containsUpdates"===t&&(n._containsUpdates=r[e])}),this._stats=Object.freeze(this._stats)}p.QueryStatistics=mt;var Ot={WARNING:"WARNING",INFORMATION:"INFORMATION",UNKNOWN:"UNKNOWN"},wt=(p.notificationSeverityLevel=Ot,Object.freeze(Ot),Object.values(Ot)),Et={HINT:"HINT",UNRECOGNIZED:"UNRECOGNIZED",UNSUPPORTED:"UNSUPPORTED",PERFORMANCE:"PERFORMANCE",DEPRECATION:"DEPRECATION",TOPOLOGY:"TOPOLOGY",SECURITY:"SECURITY",GENERIC:"GENERIC",UNKNOWN:"UNKNOWN"},Pt=(p.notificationCategory=Et,Object.freeze(Et),Object.values(Et)),St=(Tt._constructPosition=function(e){return null==e?{}:{offset:Ct(e.offset),line:Ct(e.line),column:Ct(e.column)}},Tt);function Tt(e){this.code=e.code,this.title=e.title,this.description=e.description,this.severity=e.severity,this.position=Tt._constructPosition(e.position),this.severityLevel=wt.includes(e.severity)?e.severity:Ot.UNKNOWN,this.rawSeverityLevel=e.severity,this.category=Pt.includes(e.category)?e.category:Et.UNKNOWN,this.rawCategory=e.category}p.Notification=St;var jt=function(e,t){null!=e&&(this.address=e.address,this.agent=e.version),this.protocolVersion=t};function Ct(e){return e instanceof ht.default?e.toNumber():"bigint"==typeof e?(0,ht.int)(e).toNumber():e}function It(e,t,r){return void 0===r&&(r=0),!1!==t&&e in t?Ct(t[e]):r}p.ServerInfo=jt;function Rt(){throw this.minimumSeverityLevel=void 0,this.disabledCategories=void 0,new Error("Not implemented")}p.queryType={READ_ONLY:"r",READ_WRITE:"rw",WRITE_ONLY:"w",SCHEMA_WRITE:"s"},p.default=dt;var dt={},kt=(Object.defineProperty(dt,"__esModule",{value:!0}),dt.notificationFilterDisabledCategory=dt.notificationFilterMinimumSeverityLevel=void 0,{OFF:"OFF",WARNING:"WARNING",INFORMATION:"INFORMATION"}),kt=(dt.notificationFilterMinimumSeverityLevel=kt,Object.freeze(kt),{HINT:"HINT",UNRECOGNIZED:"UNRECOGNIZED",UNSUPPORTED:"UNSUPPORTED",PERFORMANCE:"PERFORMANCE",TOPOLOGY:"TOPOLOGY",SECURITY:"SECURITY",DEPRECATION:"DEPRECATION",GENERIC:"GENERIC"}),kt=(dt.notificationFilterDisabledCategory=kt,Object.freeze(kt),dt.default=Rt,{}),h={},b={},y=(Object.defineProperty(b,"__esModule",{value:!0}),b.FailedObserver=b.CompletedObserver=void 0,At.prototype.subscribe=function(e){Nt(e,e.onKeys,[]),Nt(e,e.onCompleted,{})},At.prototype.cancel=function(){},At.prototype.pause=function(){},At.prototype.resume=function(){},At.prototype.prepareToHandleSingleResponse=function(){},At.prototype.markCompleted=function(){},At.prototype.onError=function(e){throw new Error("CompletedObserver not supposed to call onError",{cause:e})},At);function At(){}function Mt(e){var t=e.error,e=e.onError;this._error=t,this._beforeError=e,this._observers=[],this.onError(t)}function Nt(e,t,r){null!=t&&t.bind(e)(r)}b.CompletedObserver=y,Mt.prototype.subscribe=function(e){Nt(e,e.onError,this._error),this._observers.push(e)},Mt.prototype.onError=function(t){Nt(this,this._beforeError,t),this._observers.forEach(function(e){return Nt(e,e.onError,t)})},Mt.prototype.cancel=function(){},Mt.prototype.pause=function(){},Mt.prototype.resume=function(){},Mt.prototype.markCompleted=function(){},Mt.prototype.prepareToHandleSingleResponse=function(){},b.FailedObserver=Mt;var y={},xt=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),Dt=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),_=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&xt(t,e,r);return Dt(t,e),t},Ut=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Lt=r&&r.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||((n=n||Array.prototype.slice.call(t,0,o))[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},Ft=(Object.defineProperty(y,"__esModule",{value:!0}),y.Bookmarks=void 0,_(u)),_=(Bt.empty=function(){return Wt},Bt.prototype.isEmpty=function(){return 0===this._values.length},Bt.prototype.values=function(){return this._values},Bt.prototype[Symbol.iterator]=function(){return this._values[Symbol.iterator]()},Bt.prototype.asBeginTransactionParameters=function(){var e;return this.isEmpty()?{}:((e={}).bookmarks=this._values,e)},Bt);function Bt(e){this._values=function(e){if(null==e||""===e)return[];if(Ft.isString(e))return[e];if(Array.isArray(e)){for(var t=new Set,r=function r(e){return e.reduce(function(e,t){return Array.isArray(t)?e.concat(r(t)):e.concat(t)},[])}(e),n=0;n<r.length;n++){var o=r[n];if(null!=o){if(!Ft.isString(o))throw new TypeError("Bookmark value should be a string, given: '".concat(o,"'"));t.add(o)}}return Lt([],Ut(t),!1)}throw new TypeError("Bookmarks should either be a string or a string array, given: '".concat(e,"'"))}(e)}var Wt=new(y.Bookmarks=_)(null);var zt,qt,_={},v=(Object.defineProperty(_,"__esModule",{value:!0}),_.TELEMETRY_APIS=_.BOLT_PROTOCOL_V5_4=_.BOLT_PROTOCOL_V5_3=_.BOLT_PROTOCOL_V5_2=_.BOLT_PROTOCOL_V5_1=_.BOLT_PROTOCOL_V5_0=_.BOLT_PROTOCOL_V4_4=_.BOLT_PROTOCOL_V4_3=_.BOLT_PROTOCOL_V4_2=_.BOLT_PROTOCOL_V4_1=_.BOLT_PROTOCOL_V4_0=_.BOLT_PROTOCOL_V3=_.BOLT_PROTOCOL_V2=_.BOLT_PROTOCOL_V1=_.DEFAULT_POOL_MAX_SIZE=_.DEFAULT_POOL_ACQUISITION_TIMEOUT=_.DEFAULT_CONNECTION_TIMEOUT_MILLIS=_.ACCESS_MODE_WRITE=_.ACCESS_MODE_READ=_.FETCH_ALL=void 0,_.FETCH_ALL=-1,_.DEFAULT_POOL_ACQUISITION_TIMEOUT=6e4,_.DEFAULT_POOL_MAX_SIZE=100,_.DEFAULT_CONNECTION_TIMEOUT_MILLIS=3e4,_.ACCESS_MODE_READ="READ",_.ACCESS_MODE_WRITE="WRITE",_.BOLT_PROTOCOL_V1=1,_.BOLT_PROTOCOL_V2=2,_.BOLT_PROTOCOL_V3=3,_.BOLT_PROTOCOL_V4_0=4,_.BOLT_PROTOCOL_V4_1=4.1,_.BOLT_PROTOCOL_V4_2=4.2,_.BOLT_PROTOCOL_V4_3=4.3,_.BOLT_PROTOCOL_V4_4=4.4,_.BOLT_PROTOCOL_V5_0=5,_.BOLT_PROTOCOL_V5_1=5.1,_.BOLT_PROTOCOL_V5_2=5.2,_.BOLT_PROTOCOL_V5_3=5.3,_.BOLT_PROTOCOL_V5_4=5.4,_.TELEMETRY_APIS={MANAGED_TRANSACTION:0,UNMANAGED_TRANSACTION:1,AUTO_COMMIT_TRANSACTION:2,EXECUTE_QUERY:3},{}),m={},g=r&&r.__extends||(zt=function(e,t){return(zt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}zt(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Vt=(Object.defineProperty(m,"__esModule",{value:!0}),m.Logger=void 0,t),Ht="error",Gt="warn",Yt="info",Kt="debug",Zt=((Qt={})[Ht]=0,Qt[Gt]=1,Qt[Yt]=2,Qt[Kt]=3,Qt),Qt=(Xt.create=function(e){return null!=(null==e?void 0:e.logging)?new Xt(function(e){if(null==(null==e?void 0:e.level))return"info";var e=e.level,t=Zt[e];if(null!=t||0===t)return e;throw(0,Vt.newError)("Illegal logging level: ".concat(e,". Supported levels are: ").concat(Object.keys(Zt).toString()))}(e=e.logging),function(e){if(null!=(null==e?void 0:e.logger)){var t=e.logger;if(null!=t&&"function"==typeof t)return t}throw(0,Vt.newError)("Illegal logger function: ".concat(null!=(e=null==(t=null==e?void 0:e.logger)?void 0:t.toString())?e:"undefined"))}(e)):this.noOp()},Xt.noOp=function(){return $t},Xt.prototype.isErrorEnabled=function(){return er(this._level,Ht)},Xt.prototype.error=function(e){this.isErrorEnabled()&&this._loggerFunction(Ht,e)},Xt.prototype.isWarnEnabled=function(){return er(this._level,Gt)},Xt.prototype.warn=function(e){this.isWarnEnabled()&&this._loggerFunction(Gt,e)},Xt.prototype.isInfoEnabled=function(){return er(this._level,Yt)},Xt.prototype.info=function(e){this.isInfoEnabled()&&this._loggerFunction(Yt,e)},Xt.prototype.isDebugEnabled=function(){return er(this._level,Kt)},Xt.prototype.debug=function(e){this.isDebugEnabled()&&this._loggerFunction(Kt,e)},Xt);function Xt(e,t){this._level=e,this._loggerFunction=t}function Jt(){return qt.call(this,Yt,function(e,t){})||this}m.Logger=Qt,g(Jt,qt=Qt),Jt.prototype.isErrorEnabled=function(){return!1},Jt.prototype.error=function(e){},Jt.prototype.isWarnEnabled=function(){return!1},Jt.prototype.warn=function(e){},Jt.prototype.isInfoEnabled=function(){return!1},Jt.prototype.info=function(e){},Jt.prototype.isDebugEnabled=function(){return!1},Jt.prototype.debug=function(e){};var $t=new Jt;function er(e,t){return Zt[e]>=Zt[t]}var tr,g=r&&r.__extends||(tr=function(e,t){return(tr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}tr(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),rr=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},nr=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},or=(Object.defineProperty(v,"__esModule",{value:!0}),v.EMPTY_CONNECTION_HOLDER=v.ReadOnlyConnectionHolder=v.ConnectionHolder=void 0,t),ir=u,ur=_,ar=y,sr=m,Qt=(cr.prototype.mode=function(){return this._mode},cr.prototype.database=function(){return this._database},cr.prototype.setDatabase=function(e){this._database=e},cr.prototype.bookmarks=function(){return this._bookmarks},cr.prototype.connectionProvider=function(){return this._connectionProvider},cr.prototype.referenceCount=function(){return this._referenceCount},cr.prototype.initializeConnection=function(){return 0!==this._referenceCount||null==this._connectionProvider?(this._referenceCount++,!1):(this._connectionPromise=this._createConnectionPromise(this._connectionProvider),this._referenceCount++,!0)},cr.prototype._createConnectionPromise=function(o){return rr(this,void 0,void 0,function(){var t,r,n;return nr(this,function(e){switch(e.label){case 0:return r=(t=o).acquireConnection,n={accessMode:this._mode,database:this._database},[4,this._getBookmarks()];case 1:return[4,r.apply(t,[(n.bookmarks=e.sent(),n.impersonatedUser=this._impersonatedUser,n.onDatabaseNameResolved=this._onDatabaseNameResolved,n.auth=this._auth,n)])];case 2:return[2,e.sent()]}})})},cr.prototype._getBookmarks=function(){return rr(this,void 0,void 0,function(){return nr(this,function(e){switch(e.label){case 0:return[4,this._getConnectionAcquistionBookmarks()];case 1:return[2,e.sent()]}})})},cr.prototype.getConnection=function(){return this._connectionPromise},cr.prototype.releaseConnection=function(){return 0===this._referenceCount?this._connectionPromise:(this._referenceCount--,0===this._referenceCount?this._releaseConnection():this._connectionPromise)},cr.prototype.close=function(e){return this._closed=!0,0===this._referenceCount?this._connectionPromise:(this._referenceCount=0,this._releaseConnection(e))},cr.prototype.log=function(){return this._log},cr.prototype._releaseConnection=function(t){return this._connectionPromise=this._connectionPromise.then(function(e){return null!=e?e.isOpen()&&(e.hasOngoingObservableRequests()||!0===t)?e.resetAndFlush().catch(br).then(function(){return e.release().then(function(){return null})}):e.release().then(function(){return null}):Promise.resolve(null)}).catch(this._logError),this._connectionPromise},cr.prototype._logError=function(e){return this._log.isWarnEnabled()&&this._log.warn("ConnectionHolder got an error while releasing the connection. Error ".concat(e,". Stacktrace: ").concat(e.stack)),null},cr);function cr(e){var t=e.mode,r=e.database,r=void 0===r?"":r,n=e.bookmarks,o=e.connectionProvider,i=e.impersonatedUser,u=e.onDatabaseNameResolved,a=e.getConnectionAcquistionBookmarks,s=e.auth,e=e.log;this._mode=null!=t?t:ur.ACCESS_MODE_WRITE,this._closed=!1,this._database=null!=r?(0,ir.assertString)(r,"database"):"",this._bookmarks=null!=n?n:ar.Bookmarks.empty(),this._connectionProvider=o,this._impersonatedUser=i,this._referenceCount=0,this._connectionPromise=Promise.resolve(null),this._onDatabaseNameResolved=u,this._auth=s,this._log=e,this._logError=this._logError.bind(this),this._getConnectionAcquistionBookmarks=null!=a?a:function(){return Promise.resolve(ar.Bookmarks.empty())}}v.ConnectionHolder=Qt;g(dr,lr=Qt),dr.prototype.initializeConnection=function(){return 0!==this._connectionHolder.referenceCount()},dr.prototype.getConnection=function(){return this._connectionHolder.getConnection()},dr.prototype.releaseConnection=function(){return this._connectionHolder.getConnection().catch(function(){return Promise.resolve(null)})},dr.prototype.close=function(){return this._connectionHolder.getConnection().catch(function(){return Promise.resolve(null)})};var lr,fr,pr=dr;function dr(e){var t=lr.call(this,{mode:e.mode(),database:e.database(),bookmarks:e.bookmarks(),getConnectionAcquistionBookmarks:e._getConnectionAcquistionBookmarks,connectionProvider:e.connectionProvider(),log:e.log()})||this;return t._connectionHolder=e,t}function hr(){return fr.call(this,{log:sr.Logger.create({})})||this}v.ReadOnlyConnectionHolder=pr,v.default=pr,g(hr,fr=Qt),hr.prototype.mode=function(){},hr.prototype.database=function(){},hr.prototype.initializeConnection=function(){return!0},hr.prototype.getConnection=function(){return rr(this,void 0,void 0,function(){return nr(this,function(e){switch(e.label){case 0:return[4,Promise.reject((0,or.newError)("This connection holder does not serve connections"))];case 1:return[2,e.sent()]}})})},hr.prototype.releaseConnection=function(){return rr(this,void 0,void 0,function(){return nr(this,function(e){switch(e.label){case 0:return[4,Promise.resolve(null)];case 1:return[2,e.sent()]}})})},hr.prototype.close=function(){return rr(this,void 0,void 0,function(){return nr(this,function(e){switch(e.label){case 0:return[4,Promise.resolve(null)];case 1:return[2,e.sent()]}})})};pr=new hr;function br(e){return null}v.EMPTY_CONNECTION_HOLDER=pr;var g={},yr=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),_r=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Qt=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&yr(t,e,r);return _r(t,e),t},vr=(Object.defineProperty(g,"__esModule",{value:!0}),g.TxConfig=void 0,Qt(u)),mr=t,gr=n,pr=(Or.empty=function(){return wr},Or.prototype.isEmpty=function(){return Object.values(this).every(function(e){return null==e})},Or);function Or(e,t){var r;null!=(r=e)&&vr.assertObject(r,"Transaction config"),this.timeout=function(e,t){if(vr.isObject(e)&&null!=e.timeout){vr.assertNumberOrInteger(e.timeout,"Transaction timeout"),!function(e){return"number"==typeof e.timeout&&!Number.isInteger(e.timeout)}(e)||!0!==(null==t?void 0:t.isInfoEnabled())||null==t||t.info("Transaction timeout expected to be an integer, got: ".concat(e.timeout,". The value will be rounded up."));t=(0,gr.int)(e.timeout,{ceilFloat:!0});if(t.isNegative())throw(0,mr.newError)("Transaction timeout should not be negative");return t}return null}(e,t),this.metadata=function(e){if(vr.isObject(e)&&null!=e.metadata){e=e.metadata;if(vr.assertObject(e,"config.metadata"),0!==Object.keys(e).length)return e}return null}(e)}var wr=new(g.TxConfig=pr)({});var Qt={},Er=r&&r.__assign||function(){return(Er=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Pr=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},Sr=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},Tr=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},jr=r&&r.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||((n=n||Array.prototype.slice.call(t,0,o))[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},Cr=(Object.defineProperty(Qt,"__esModule",{value:!0}),Qt.TransactionExecutor=void 0,t),Ir=_;function Rr(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return setTimeout.apply(void 0,jr([e,t],Tr(r),!1))}function kr(e){return clearTimeout(e)}function Ar(e,t,r,n,o){void 0===o&&(o={setTimeout:Rr,clearTimeout:kr}),this._maxRetryTimeMs=Mr(e,3e4),this._initialRetryDelayMs=Mr(t,1e3),this._multiplier=Mr(r,2),this._jitterFactor=Mr(n,.2),this._setTimeout=o.setTimeout,this._clearTimeout=o.clearTimeout,this._inFlightTimeoutIds=[],this.pipelineBegin=!1,this.telemetryApi=Ir.TELEMETRY_APIS.MANAGED_TRANSACTION,this._verifyAfterConstruction()}function Mr(e,t){return null!=e?e:t}Ar.prototype.execute=function(n,o,i){var u=this,a={apiTransactionConfig:{api:this.telemetryApi,onTelemetrySuccess:function(){a.apiTransactionConfig=void 0}}};return new Promise(function(e,t){u._executeTransactionInsidePromise(n,o,e,t,i,a).catch(t)}).catch(function(e){var t=Date.now(),r=u._initialRetryDelayMs;return u._retryTransactionPromise(n,o,e,t,r,i,a)})},Ar.prototype.close=function(){var t=this;this._inFlightTimeoutIds.forEach(function(e){return t._clearTimeout(e)}),this._inFlightTimeoutIds=[]},Ar.prototype._retryTransactionPromise=function(o,i,e,r,u,a,s){var c=this;return Date.now()-r>this._maxRetryTimeMs||!(0,Cr.isRetriableError)(e)?Promise.reject(e):new Promise(function(e,t){var r=c._computeDelayWithJitter(u),n=c._setTimeout(function(){c._inFlightTimeoutIds=c._inFlightTimeoutIds.filter(function(e){return e!==n}),c._executeTransactionInsidePromise(o,i,e,t,a,s).catch(t)},r);c._inFlightTimeoutIds.push(n)}).catch(function(e){var t=u*c._multiplier;return c._retryTransactionPromise(o,i,e,r,t,a,s)})},Ar.prototype._executeTransactionInsidePromise=function(u,a,s,c,l,f){return Pr(this,void 0,void 0,function(){var t,r,n,o,i=this;return Sr(this,function(e){switch(e.label){case 0:return(e.trys.push([0,4,,5]),r=u(null!=(null==f?void 0:f.apiTransactionConfig)?Er({},null==f?void 0:f.apiTransactionConfig):void 0),this.pipelineBegin)?(n=r,[3,3]):[3,1];case 1:return[4,r];case 2:n=e.sent(),e.label=3;case 3:return t=n,[3,5];case 4:return o=e.sent(),c(o),[2];case 5:return o=(null!=l?l:function(e){return e})(t),this._safeExecuteTransactionWork(o,a).then(function(e){return i._handleTransactionWorkSuccess(e,t,s,c)}).catch(function(e){return i._handleTransactionWorkFailure(e,t,c)}),[2]}})})},Ar.prototype._safeExecuteTransactionWork=function(e,t){try{var r=t(e);return Promise.resolve(r)}catch(e){return Promise.reject(e)}},Ar.prototype._handleTransactionWorkSuccess=function(e,t,r,n){t.isOpen()?t.commit().then(function(){r(e)}).catch(function(e){n(e)}):r(e)},Ar.prototype._handleTransactionWorkFailure=function(e,t,r){t.isOpen()?t.rollback().catch(function(e){}).then(function(){return r(e)}).catch(r):r(e)},Ar.prototype._computeDelayWithJitter=function(e){var t=e*this._jitterFactor,r=e-t,e=e+t;return Math.random()*(e-r)+r},Ar.prototype._verifyAfterConstruction=function(){if(this._maxRetryTimeMs<0)throw(0,Cr.newError)("Max retry time should be >= 0: "+this._maxRetryTimeMs.toString());if(this._initialRetryDelayMs<0)throw(0,Cr.newError)("Initial retry delay should >= 0: "+this._initialRetryDelayMs.toString());if(this._multiplier<1)throw(0,Cr.newError)("Multiplier should be >= 1.0: "+this._multiplier.toString());if(this._jitterFactor<0||1<this._jitterFactor)throw(0,Cr.newError)("Jitter factor should be in [0.0, 1.0]: "+this._jitterFactor.toFixed())},Qt.TransactionExecutor=Ar;var pr={},Nr=r&&r.__assign||function(){return(Nr=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},xr=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Dr=(Object.defineProperty(pr,"__esModule",{value:!0}),pr.Url=pr.formatIPv6Address=pr.formatIPv4Address=pr.defaultPortForScheme=pr.parseDatabaseUrl=void 0,u),Ur=7687,Lr=7474,Fr=7473,Br=function(e,t,r,n,o){this.scheme=e,this.host=t,this.port=r,this.hostAndPort=n,this.query=o};function Wr(e,t,r){if(""===(e=(null!=e?e:"").trim()))throw new Error("Illegal empty ".concat(t," in URL query '").concat(r,"'"));return e}function zr(e){var t="["===e.charAt(0),r="]"===e.charAt(e.length-1);if(t||r){if(t&&r)return e;throw new Error("Illegal IPv6 address ".concat(e))}return"[".concat(e,"]")}function qr(e){return"http"===e?Lr:"https"===e?Fr:Ur}pr.Url=Br,pr.parseDatabaseUrl=function(e){(0,Dr.assertString)(e,"URL");var t,r=function(e){function u(e,t){t=e.indexOf(t);return 0<=t?[e.substring(0,t),e[t],e.substring(t+1)]:[e,"",""]}function t(e){var t,r={},n=((t="@")===(t=0<=(t=(o=e).lastIndexOf(t))?[o.substring(0,t),o[t],o.substring(t+1)]:["","",o])[1]&&(r.userInfo=decodeURIComponent(t[0]),e=t[2]),xr((o="]",n=u(n=e,i="["),[(i=u(n[2],o))[0],i[2]]),2)),o=n[0],i=n[1];return""!==o?(r.host=o,t=u(i,":")):(t=u(e,":"),r.host=t[0]),":"===t[1]&&(r.port=t[2]),r}var r,n={};":"===(r=u(e,":"))[1]&&(n.scheme=decodeURIComponent(r[0]),e=r[2]);"#"===(r=u(e,"#"))[1]&&(n.fragment=decodeURIComponent(r[2]),e=r[0]);"?"===(r=u(e,"?"))[1]&&(n.query=r[2],e=r[0]);e.startsWith("//")?(r=u(e.substr(2),"/"),(n=Nr(Nr({},n),t(r[0]))).path=r[1]+r[2]):n.path=e;return n}((n=(n=(n=e).trim()).includes("://")?{schemeMissing:!1,url:n}:{schemeMissing:!0,url:"none://".concat(n)}).url),n=n.schemeMissing?null:function(e){if(null==e)return null;":"===(e=e.trim()).charAt(e.length-1)&&(e=e.substring(0,e.length-1));return e}(r.scheme),o=function(e){if(null!=e)return e.trim();throw new Error("Unable to extract host from null or undefined URL")}(r.host),i=function(e){if(""!==e&&null!=e)return e.includes(":")?zr(e):e;throw new Error("Illegal host ".concat(e))}(o),u=function(e,t){e="string"==typeof e?parseInt(e,10):e;return null==e||isNaN(e)?qr(t):e}(r.port,n),i="".concat(i,":").concat(u),r=function(e,r){var e=null!=e?function(e){"?"===(null==(e=(null!=e?e:"").trim())?void 0:e.charAt(0))&&(e=e.substring(1,e.length));return e}(e):null,n={};null!=e&&e.split("&").forEach(function(e){e=e.split("=");if(2!==e.length)throw new Error("Invalid parameters: '".concat(e.toString(),"' in URL '").concat(r,"'."));var t=Wr(e[0],"key",r),e=Wr(e[1],"value",r);if(void 0!==n[t])throw new Error("Duplicated query parameters with key '".concat(t,"' in URL '").concat(r,"'"));n[t]=e});return n}(null!=(t=r.query)?t:"string"==typeof(t=r.resourceName)?xr(t.split("?"),2)[1]:null,e);return new Br(n,o,u,i,r)},pr.formatIPv4Address=function(e,t){return"".concat(e,":").concat(t)},pr.formatIPv6Address=function(e,t){return e=zr(e),"".concat(e,":").concat(t)},pr.defaultPortForScheme=qr;var O={},Vr=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),Hr=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),w=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&Vr(t,e,r);return Hr(t,e),t},Gr=(Object.defineProperty(O,"__esModule",{value:!0}),O.ServerAddress=void 0,u),Yr=w(pr);function Kr(e,t,r,n){this._host=(0,Gr.assertString)(e,"host"),this._resolved=null!=t?(0,Gr.assertString)(t,"resolved"):null,this._port=(0,Gr.assertNumber)(r,"port"),this._hostPort=n,this._stringValue=null!=t?"".concat(n,"(").concat(t,")"):"".concat(n)}Kr.prototype.host=function(){return this._host},Kr.prototype.resolvedHost=function(){return null!=this._resolved?this._resolved:this._host},Kr.prototype.port=function(){return this._port},Kr.prototype.resolveWith=function(e){return new Kr(this._host,e,this._port,this._hostPort)},Kr.prototype.asHostPort=function(){return this._hostPort},Kr.prototype.asKey=function(){return this._hostPort},Kr.prototype.toString=function(){return this._stringValue},Kr.fromUrl=function(e){e=Yr.parseDatabaseUrl(e);return new Kr(e.host,null,e.port,e.hostAndPort)},O.ServerAddress=Kr;var w={},E={};function Zr(){}Object.defineProperty(E,"__esModule",{value:!0}),Zr.prototype.resolve=function(){throw new Error("Abstract function")},Zr.prototype._resolveToItself=function(e){return Promise.resolve([e])},E.default=Zr;var Qr={},Xr=(Object.defineProperty(Qr,"__esModule",{value:!0}),O);function Jr(e){return Promise.resolve([e])}function $r(e){this._resolverFunction=null!=e?e:Jr}$r.prototype.resolve=function(t){var r=this;return new Promise(function(e){return e(r._resolverFunction(t.asHostPort()))}).then(function(e){if(Array.isArray(e))return e.map(function(e){return Xr.ServerAddress.fromUrl(e)});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(e))})},Qr.default=$r;var en,tn=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},E=(Object.defineProperty(w,"__esModule",{value:!0}),w.ConfiguredCustomResolver=w.BaseHostNameResolver=void 0,tn(E)),E=(w.BaseHostNameResolver=E.default,tn(Qr)),tn=(w.ConfiguredCustomResolver=E.default,{}),E={};Object.defineProperty(E,"__esModule",{value:!0}),E.fromVersion=void 0,E.fromVersion=function(e,t){var r=null!=(t=(t=void 0===t?function(){return{get userAgent(){}}}:t)()).userAgent?t.userAgent.split("(")[1].split(")")[0]:void 0,t=t.userAgent||void 0;return{product:"neo4j-javascript/".concat(e),platform:r,languageDetails:t}},S=tn,en=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),P=r&&r.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||en(t,e,r)},Object.defineProperty(S,"__esModule",{value:!0}),P(E,S);function rn(e){console.log("Uncaught error when processing result: "+e)}function nn(e){}function on(e){}var un,an=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),sn=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),P=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&an(t,e,r);return sn(t,e),t},E=(Object.defineProperty(h,"__esModule",{value:!0}),h.boltAgent=h.objectUtil=h.resolver=h.serverAddress=h.urlUtil=h.logger=h.transactionExecutor=h.txConfig=h.connectionHolder=h.constants=h.bookmarks=h.observer=h.temporalUtil=h.util=void 0,P(u)),S=(h.util=E,P(o)),E=(h.temporalUtil=S,P(b)),o=(h.observer=E,P(y)),S=(h.bookmarks=o,P(_)),E=(h.constants=S,P(v)),o=(h.connectionHolder=E,P(g)),S=(h.txConfig=o,P(Qt)),E=(h.transactionExecutor=S,P(m)),o=(h.logger=E,P(pr)),S=(h.urlUtil=o,P(O)),E=(h.serverAddress=S,P(w)),pr=(h.resolver=E,P(X)),o=(h.objectUtil=pr,P(tn)),cn=(h.boltAgent=o,r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})}),ln=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},O=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},fn=(Object.defineProperty(kt,"__esModule",{value:!0}),O(p)),pn=h,dn=t,hn=pn.connectionHolder.EMPTY_CONNECTION_HOLDER;function bn(e,t,r,n,o){var i;void 0===o&&(o={high:Number.MAX_VALUE,low:Number.MAX_VALUE}),this[un]="Result",this._stack=null==(i=new Error("")).stack?null:i.stack.replace(/^Error(\n\r)*/,""),this._streamObserverPromise=e,this._p=null,this._query=t,this._parameters=null!=r?r:{},this._connectionHolder=null!=n?n:hn,this._keys=null,this._summary=null,this._error=null,this._watermarks=o}bn.prototype.keys=function(){var n=this;return null!==this._keys?Promise.resolve(this._keys):null!==this._error?Promise.reject(this._error):new Promise(function(t,r){n._streamObserverPromise.then(function(e){return e.subscribe(n._decorateObserver({onKeys:function(e){return t(e)},onError:function(e){return r(e)}}))}).catch(r)})},bn.prototype.summary=function(){var n=this;return null!==this._summary?Promise.resolve(this._summary):null!==this._error?Promise.reject(this._error):new Promise(function(t,r){n._streamObserverPromise.then(function(e){e.cancel(),e.subscribe(n._decorateObserver({onCompleted:function(e){return t(e)},onError:function(e){return r(e)}}))}).catch(r)})},bn.prototype._getOrCreatePromise=function(){var e=this;return null==this._p&&(this._p=new Promise(function(t,r){var n=[];e.subscribe({onNext:function(e){n.push(e)},onCompleted:function(e){t({records:n,summary:e})},onError:function(e){r(e)}})})),this._p},bn.prototype[Symbol.asyncIterator]=function(){var e,n=this;if(!this.isOpen())return e=(0,dn.newError)("Result is already consumed"),{next:function(){return Promise.reject(e)},peek:function(){return Promise.reject(e)}};function o(){return cn(n,void 0,void 0,function(){var t;return ln(this,function(e){switch(e.label){case 0:return void 0!==u.queuedObserver?[3,2]:(u.queuedObserver=this._createQueuedResultObserver(r),t=u,[4,this._subscribe(u.queuedObserver,!0).catch(function(){})]);case 1:t.streaming=e.sent(),r(),e.label=2;case 2:return[2,u.queuedObserver]}})})}function i(e){if(void 0===e)throw(0,dn.newError)("InvalidState: Result stream finished without Summary",dn.PROTOCOL_ERROR);return 1}var u={paused:!0,firstRun:!0,finished:!1},r=function(){var e,t;null!=u.streaming&&(e=(t=null!=(t=null==(t=u.queuedObserver)?void 0:t.size)?t:0)>=n._watermarks.high,t=t<=n._watermarks.low,e&&!u.paused?(u.paused=!0,u.streaming.pause()):(t&&u.paused||u.firstRun&&!e)&&(u.firstRun=!1,u.paused=!1,u.streaming.resume()))};return{next:function(){return cn(n,void 0,void 0,function(){var t;return ln(this,function(e){switch(e.label){case 0:return u.finished&&i(u.summary)?[2,{done:!0,value:u.summary}]:[4,o()];case 1:return[4,e.sent().dequeue()];case 2:return!0===(t=e.sent()).done&&(u.finished=t.done,u.summary=t.value),[2,t]}})})},return:function(r){return cn(n,void 0,void 0,function(){var t;return ln(this,function(e){switch(e.label){case 0:return u.finished&&i(u.summary)?[2,{done:!0,value:null!=r?r:u.summary}]:(null!=(t=u.streaming)&&t.cancel(),[4,o()]);case 1:return[4,e.sent().dequeueUntilDone()];case 2:return t=e.sent(),u.finished=!0,t.value=null!=r?r:t.value,u.summary=t.value,[2,t]}})})},peek:function(){return cn(n,void 0,void 0,function(){return ln(this,function(e){switch(e.label){case 0:return u.finished&&i(u.summary)?[2,{done:!0,value:u.summary}]:[4,o()];case 1:return[4,e.sent().head()];case 2:return[2,e.sent()]}})})}}},bn.prototype.then=function(e,t){return this._getOrCreatePromise().then(e,t)},bn.prototype.catch=function(e){return this._getOrCreatePromise().catch(e)},bn.prototype.finally=function(e){return this._getOrCreatePromise().finally(e)},bn.prototype.subscribe=function(e){this._subscribe(e).catch(function(){})},bn.prototype.isOpen=function(){return null===this._summary&&null===this._error},bn.prototype._subscribe=function(e,t){void 0===t&&(t=!1);var r=this._decorateObserver(e);return this._streamObserverPromise.then(function(e){return t&&e.pause(),e.subscribe(r),e}).catch(function(e){return null!=r.onError&&r.onError(e),Promise.reject(e)})},bn.prototype._decorateObserver=function(n){var e,o=this,t=null!=(e=n.onCompleted)?e:nn,i=null!=(e=n.onError)?e:rn,r=null!=(e=n.onKeys)?e:on;return{onNext:null!=n.onNext?n.onNext.bind(n):void 0,onKeys:function(e){return o._keys=e,r.call(n,e)},onCompleted:function(e){o._releaseConnectionAndGetSummary(e).then(function(e){return null!==o._summary?t.call(n,o._summary):(o._summary=e,t.call(n,e))}).catch(i)},onError:function(r){o._connectionHolder.releaseConnection().then(function(){var e,t;e=r,null!=(t=o._stack)&&(e.stack=e.toString()+"\n"+t),o._error=r,i.call(n,r)}).catch(i)}}},bn.prototype._cancel=function(){null===this._summary&&null===this._error&&this._streamObserverPromise.then(function(e){return e.cancel()}).catch(function(){})},bn.prototype._releaseConnectionAndGetSummary=function(t){var e=pn.util.validateQueryAndParameters(this._query,this._parameters,{skipAsserts:!0}),r=e.validatedQuery,n=e.params,o=this._connectionHolder;return o.getConnection().then(function(e){return o.releaseConnection().then(function(){return null==e?void 0:e.getProtocolVersion()})},function(e){}).then(function(e){return new fn.default(r,n,t,e)})},bn.prototype._createQueuedResultObserver=function(n){var e=this;function o(){var r={};return r.promise=new Promise(function(e,t){r.resolve=e,r.reject=t}),r}function i(e){return e instanceof Error}function r(){var r;return cn(this,void 0,void 0,function(){var t;return ln(this,function(e){switch(e.label){case 0:if(0<u.length){if(t=null!=(r=u.shift())?r:(0,dn.newError)("Unexpected empty buffer",dn.PROTOCOL_ERROR),n(),i(t))throw t;return[2,t]}return a.resolvable=o(),[4,a.resolvable.promise];case 1:return[2,e.sent()]}})})}var u=[],a={resolvable:null},t={onNext:function(e){t._push({done:!1,value:e})},onCompleted:function(e){t._push({done:!0,value:e})},onError:function(e){t._push(e)},_push:function(e){var t;null!==a.resolvable?(t=a.resolvable,a.resolvable=null,i(e)?t.reject(e):t.resolve(e)):(u.push(e),n())},dequeue:r,dequeueUntilDone:function(){return cn(e,void 0,void 0,function(){var t;return ln(this,function(e){switch(e.label){case 0:return[4,r()];case 1:return!0===(t=e.sent()).done?[2,t]:[3,0];case 2:return[2]}})})},head:function(){return cn(e,void 0,void 0,function(){var t,r;return ln(this,function(e){switch(e.label){case 0:if(0<u.length){if(i(t=u[0]))throw t;return[2,t]}a.resolvable=o(),e.label=1;case 1:return e.trys.push([1,3,4,5]),[4,a.resolvable.promise];case 2:return t=e.sent(),u.unshift(t),[2,t];case 3:throw r=e.sent(),u.unshift(r),r;case 4:return n(),[7];case 5:return[2]}})})},get size(){return u.length}};return t},un=Symbol.toStringTag,kt.default=bn;S={};Object.defineProperty(S,"__esModule",{value:!0});S.default=function(e,t,r){this.keys=e,this.records=t,this.summary=r};w={},Object.defineProperty(w,"__esModule",{value:!0}),w.Releasable=void 0,yn.prototype.release=function(){throw new Error("Not implemented")},E=yn;function yn(){}function _n(){}w.Releasable=E,_n.prototype.acquireConnection=function(e){throw Error("Not implemented")},_n.prototype.supportsMultiDb=function(){throw Error("Not implemented")},_n.prototype.supportsTransactionConfig=function(){throw Error("Not implemented")},_n.prototype.supportsUserImpersonation=function(){throw Error("Not implemented")},_n.prototype.supportsSessionAuth=function(){throw Error("Not implemented")},_n.prototype.verifyConnectivityAndGetServerInfo=function(e){throw Error("Not implemented")},_n.prototype.verifyAuthentication=function(e){throw Error("Not implemented")},_n.prototype.getNegotiatedProtocolVersion=function(){throw Error("Not Implemented")},_n.prototype.close=function(){throw Error("Not implemented")},w.default=_n;X={};function vn(){}Object.defineProperty(X,"__esModule",{value:!0}),vn.prototype.beginTransaction=function(e){throw new Error("Not implemented")},vn.prototype.run=function(e,t,r){throw new Error("Not implemented")},vn.prototype.commitTransaction=function(e){throw new Error("Not implemented")},vn.prototype.rollbackTransaction=function(e){throw new Error("Not implemented")},vn.prototype.resetAndFlush=function(){throw new Error("Not implemented")},vn.prototype.isOpen=function(){throw new Error("Not implemented")},vn.prototype.getProtocolVersion=function(){throw new Error("Not implemented")},vn.prototype.hasOngoingObservableRequests=function(){throw new Error("Not implemented")},X.default=vn;var pr={},mn=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},gn=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},P=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},On=(Object.defineProperty(pr,"__esModule",{value:!0}),u),wn=v,En=y,Pn=g,Sn=b,Tn=t,jn=P(kt);function Cn(e){var t=e.connectionHolder,r=e.onClose,n=e.onBookmarks,o=e.onConnection,i=e.reactive,u=e.fetchSize,a=e.impersonatedUser,s=e.highRecordWatermark,c=e.lowRecordWatermark,l=e.notificationFilter,e=e.apiTelemetryConfig,f=this;this._connectionHolder=t,this._reactive=i,this._state=In.ACTIVE,this._onClose=r,this._onBookmarks=n,this._onConnection=o,this._onError=this._onErrorCallback.bind(this),this._fetchSize=u,this._onComplete=this._onCompleteCallback.bind(this),this._results=[],this._impersonatedUser=a,this._lowRecordWatermak=c,this._highRecordWatermark=s,this._bookmarks=En.Bookmarks.empty(),this._notificationFilter=l,this._apiTelemetryConfig=e,this._acceptActive=function(){},this._activePromise=new Promise(function(e,t){f._acceptActive=e})}Cn.prototype._begin=function(o,i,u){var t=this;this._connectionHolder.getConnection().then(function(n){return mn(t,void 0,void 0,function(){var t,r=this;return gn(this,function(e){switch(e.label){case 0:return(this._onConnection(),null==n)?[3,2]:(t=this,[4,o()]);case 1:return t._bookmarks=e.sent(),[2,n.beginTransaction({bookmarks:this._bookmarks,txConfig:i,mode:this._connectionHolder.mode(),database:this._connectionHolder.database(),impersonatedUser:this._impersonatedUser,notificationFilter:this._notificationFilter,apiTelemetryConfig:this._apiTelemetryConfig,beforeError:function(e){null!=u&&u.onError(e),r._onError(e).catch(function(){})},afterComplete:function(e){null!=u&&u.onComplete(e),r._onComplete(e)}})];case 2:throw(0,Tn.newError)("No connection available")}})})}).catch(function(e){null!=u&&u.onError(e),t._onError(e).catch(function(){})}).finally(function(){return t._acceptActive()})},Cn.prototype.run=function(e,t){e=(0,On.validateQueryAndParameters)(e,t),t=e.validatedQuery,e=e.params,t=this._state.run(t,e,{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(t),t},Cn.prototype.commit=function(){var t=this,r=this._state.commit({connectionHolder:this._connectionHolder,onError:this._onError,onComplete:function(e){return t._onCompleteCallback(e,t._bookmarks)},onConnection:this._onConnection,pendingResults:this._results,preparationJob:this._activePromise});return this._state=r.state,this._onClose(),new Promise(function(e,t){r.result.subscribe({onCompleted:function(){return e()},onError:function(e){return t(e)}})})},Cn.prototype.rollback=function(){var r=this._state.rollback({connectionHolder:this._connectionHolder,onError:this._onError,onComplete:this._onComplete,onConnection:this._onConnection,pendingResults:this._results,preparationJob:this._activePromise});return this._state=r.state,this._onClose(),new Promise(function(e,t){r.result.subscribe({onCompleted:function(){return e()},onError:function(e){return t(e)}})})},Cn.prototype.isOpen=function(){return this._state===In.ACTIVE},Cn.prototype.close=function(){return mn(this,void 0,void 0,function(){return gn(this,function(e){switch(e.label){case 0:return this.isOpen()?[4,this.rollback()]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}})})},Cn.prototype[Symbol.asyncDispose]=function(){return this.close()},Cn.prototype._onErrorCallback=function(t){return this._state=In.FAILED,this._onClose(),this._results.forEach(function(e){e.isOpen()&&e._streamObserverPromise.then(function(e){return e.onError(t)}).catch(function(e){})}),this._connectionHolder.releaseConnection()},Cn.prototype._onCompleteCallback=function(e,t){this._onBookmarks(new En.Bookmarks(null==e?void 0:e.bookmark),null!=t?t:En.Bookmarks.empty(),null==e?void 0:e.db)};var In={ACTIVE:{commit:function(e){return{result:Rn(!0,e.connectionHolder,e.onError,e.onComplete,e.onConnection,e.pendingResults,e.preparationJob),state:In.SUCCEEDED}},rollback:function(e){return{result:Rn(!1,e.connectionHolder,e.onError,e.onComplete,e.onConnection,e.pendingResults,e.preparationJob),state:In.ROLLED_BACK}},run:function(t,r,e){var n=e.connectionHolder,o=e.onError,i=e.onComplete,u=e.onConnection,a=e.reactive,s=e.fetchSize,c=e.highRecordWatermark,l=e.lowRecordWatermark,e=e.preparationJob,f=null!=e?e:Promise.resolve();return kn(n.getConnection().then(function(e){return f.then(function(){return e})}).then(function(e){if(u(),null!=e)return e.run(t,r,{bookmarks:En.Bookmarks.empty(),txConfig:Pn.TxConfig.empty(),beforeError:o,afterComplete:i,reactive:a,fetchSize:s,highRecordWatermark:c,lowRecordWatermark:l});throw(0,Tn.newError)("No connection available")}).catch(function(e){return new Sn.FailedObserver({error:e,onError:o})}),t,r,n,c,l)}},FAILED:{commit:function(e){var t=e.connectionHolder,r=e.onError;return e.onComplete,{result:kn(new Sn.FailedObserver({error:(0,Tn.newError)("Cannot commit this transaction, because it has been rolled back either because of an error or explicit termination."),onError:r}),"COMMIT",{},t,0,0),state:In.FAILED}},rollback:function(e){var t=e.connectionHolder;return e.onError,e.onComplete,{result:kn(new Sn.CompletedObserver,"ROLLBACK",{},t,0,0),state:In.FAILED}},run:function(e,t,r){var n=r.connectionHolder,o=r.onError;return r.onComplete,kn(new Sn.FailedObserver({error:(0,Tn.newError)("Cannot run query in this transaction, because it has been rolled back either because of an error or explicit termination."),onError:o}),e,t,n,0,0)}},SUCCEEDED:{commit:function(e){var t=e.connectionHolder,r=e.onError;return e.onComplete,{result:kn(new Sn.FailedObserver({error:(0,Tn.newError)("Cannot commit this transaction, because it has already been committed."),onError:r}),"COMMIT",{},wn.EMPTY_CONNECTION_HOLDER,0,0),state:In.SUCCEEDED,connectionHolder:t}},rollback:function(e){var t=e.connectionHolder,r=e.onError;return e.onComplete,{result:kn(new Sn.FailedObserver({error:(0,Tn.newError)("Cannot rollback this transaction, because it has already been committed."),onError:r}),"ROLLBACK",{},wn.EMPTY_CONNECTION_HOLDER,0,0),state:In.SUCCEEDED,connectionHolder:t}},run:function(e,t,r){var n=r.connectionHolder,o=r.onError;return r.onComplete,kn(new Sn.FailedObserver({error:(0,Tn.newError)("Cannot run query in this transaction, because it has already been committed."),onError:o}),e,t,n,0,0)}},ROLLED_BACK:{commit:function(e){var t=e.connectionHolder,r=e.onError;return e.onComplete,{result:kn(new Sn.FailedObserver({error:(0,Tn.newError)("Cannot commit this transaction, because it has already been rolled back."),onError:r}),"COMMIT",{},t,0,0),state:In.ROLLED_BACK}},rollback:function(e){var t=e.connectionHolder;return e.onError,e.onComplete,{result:kn(new Sn.FailedObserver({error:(0,Tn.newError)("Cannot rollback this transaction, because it has already been rolled back.")}),"ROLLBACK",{},t,0,0),state:In.ROLLED_BACK}},run:function(e,t,r){var n=r.connectionHolder,o=r.onError;return r.onComplete,kn(new Sn.FailedObserver({error:(0,Tn.newError)("Cannot run query in this transaction, because it has already been rolled back."),onError:o}),e,t,n,0,0)}}};function Rn(r,e,n,o,i,u,t){var a=null!=t?t:Promise.resolve(),t=e.getConnection().then(function(e){return a.then(function(){return e})}).then(function(t){return i(),u.forEach(function(e){return e._cancel()}),Promise.all(u.map(function(e){return e.summary()})).then(function(e){if(null!=t)return r?t.commitTransaction({beforeError:n,afterComplete:o}):t.rollbackTransaction({beforeError:n,afterComplete:o});throw(0,Tn.newError)("No connection available")})}).catch(function(e){return new Sn.FailedObserver({error:e,onError:n})});return new jn.default(t,r?"COMMIT":"ROLLBACK",{},e,{high:Number.MAX_VALUE,low:Number.MAX_VALUE})}function kn(e,t,r,n,o,i){return void 0===n&&(n=wn.EMPTY_CONNECTION_HOLDER),new jn.default(Promise.resolve(e),t,r,new wn.ReadOnlyConnectionHolder(null!=n?n:wn.EMPTY_CONNECTION_HOLDER),{low:i,high:o})}pr.default=Cn;tn={};function An(e){e=e.run;this._run=e}Object.defineProperty(tn,"__esModule",{value:!0}),An.fromTransaction=function(e){return new An({run:e.run.bind(e)})},An.prototype.run=function(e,t){return this._run(e,t)},tn.default=An;var Mn,Nn,xn,o={},O=r&&r.__extends||(Mn=function(e,t){return(Mn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Mn(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Dn=r&&r.__assign||function(){return(Dn=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},E=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},P=(Object.defineProperty(o,"__esModule",{value:!0}),E(pr)),E=(xn=P.default,O(Un,xn),Un.prototype.then=function(e,t){return this._getOrCreateBeginPromise().then(e,t)},Un.prototype.catch=function(e){return this._getOrCreateBeginPromise().catch(e)},Un.prototype.finally=function(e){return this._getOrCreateBeginPromise().finally(e)},Un.prototype._getOrCreateBeginPromise=function(){var r=this;return null==this._beginPromise&&(this._beginPromise=new Promise(function(e,t){r._resolve=e,r._reject=t,null!=r._beginError&&t(r._beginError),null!=r._beginMetadata&&e(r._toTransaction())})),this._beginPromise},Un.prototype._toTransaction=function(){return Dn(Dn({},this),{run:xn.prototype.run.bind(this),commit:xn.prototype.commit.bind(this),rollback:xn.prototype.rollback.bind(this),close:xn.prototype.close.bind(this),isOpen:xn.prototype.isOpen.bind(this),_begin:this._begin.bind(this)})},Un.prototype._begin=function(e,t){return xn.prototype._begin.call(this,e,t,{onError:this._onBeginError.bind(this),onComplete:this._onBeginMetadata.bind(this)})},Un.prototype._onBeginError=function(e){this._beginError=e,null!=this._reject&&this._reject(e)},Un.prototype._onBeginMetadata=function(e){this._beginMetadata=null!=e?e:{},null!=this._resolve&&this._resolve(this._toTransaction())},Un);function Un(e){var t=e.connectionHolder,r=e.onClose,n=e.onBookmarks,o=e.onConnection,i=e.reactive,u=e.fetchSize,a=e.impersonatedUser,s=e.highRecordWatermark,c=e.lowRecordWatermark,l=e.notificationFilter,e=e.apiTelemetryConfig,t=xn.call(this,{connectionHolder:t,onClose:r,onBookmarks:n,onConnection:o,reactive:i,fetchSize:u,impersonatedUser:a,highRecordWatermark:s,lowRecordWatermark:c,notificationFilter:l,apiTelemetryConfig:e})||this;return t[Nn]="TransactionPromise",t}Nn=Symbol.toStringTag,o.default=E;var P={},Ln=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},Fn=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},Bn=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Wn=r&&r.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||((n=n||Array.prototype.slice.call(t,0,o))[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},O=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},zn=(Object.defineProperty(P,"__esModule",{value:!0}),b),qn=u,Vn=_,Hn=t,Gn=O(kt),Yn=v,Kn=Qt,Zn=y,Qn=g,Xn=O(o),Jn=O(tn);function $n(e){var t=e.mode,r=e.connectionProvider,n=e.bookmarks,o=e.database,i=e.config,u=e.reactive,a=e.fetchSize,s=e.impersonatedUser,c=e.bookmarkManager,l=e.notificationFilter,f=e.auth,e=e.log,t=(this._mode=t,this._database=o,this._reactive=u,this._fetchSize=a,this._onDatabaseNameResolved=this._onDatabaseNameResolved.bind(this),this._getConnectionAcquistionBookmarks=this._getConnectionAcquistionBookmarks.bind(this),this._readConnectionHolder=new Yn.ConnectionHolder({mode:Vn.ACCESS_MODE_READ,auth:f,database:o,bookmarks:n,connectionProvider:r,impersonatedUser:s,onDatabaseNameResolved:this._onDatabaseNameResolved,getConnectionAcquistionBookmarks:this._getConnectionAcquistionBookmarks,log:e}),this._writeConnectionHolder=new Yn.ConnectionHolder({mode:Vn.ACCESS_MODE_WRITE,auth:f,database:o,bookmarks:n,connectionProvider:r,impersonatedUser:s,onDatabaseNameResolved:this._onDatabaseNameResolved,getConnectionAcquistionBookmarks:this._getConnectionAcquistionBookmarks,log:e}),this._open=!0,this._hasTx=!1,this._impersonatedUser=s,this._lastBookmarks=null!=n?n:Zn.Bookmarks.empty(),this._configuredBookmarks=this._lastBookmarks,this._transactionExecutor=function(e){e=null!=(e=null==e?void 0:e.maxTransactionRetryTime)?e:null;return new Kn.TransactionExecutor(e)}(i),this._databaseNameResolved=""!==this._database,this._calculateWatermaks());this._lowRecordWatermark=t.low,this._highRecordWatermark=t.high,this._results=[],this._bookmarkManager=c,this._notificationFilter=l,this._log=e}$n.prototype.run=function(e,t,r){var o=this,e=(0,qn.validateQueryAndParameters)(e,t),i=e.validatedQuery,u=e.params,a=null!=r?new Qn.TxConfig(r,this._log):Qn.TxConfig.empty(),t=this._run(i,u,function(n){return Ln(o,void 0,void 0,function(){var t,r=this;return Fn(this,function(e){switch(e.label){case 0:return[4,this._bookmarks()];case 1:return t=e.sent(),this._assertSessionIsOpen(),[2,n.run(i,u,{bookmarks:t,txConfig:a,mode:this._mode,database:this._database,apiTelemetryConfig:{api:Vn.TELEMETRY_APIS.AUTO_COMMIT_TRANSACTION},impersonatedUser:this._impersonatedUser,afterComplete:function(e){return r._onCompleteCallback(e,t)},reactive:this._reactive,fetchSize:this._fetchSize,lowRecordWatermark:this._lowRecordWatermark,highRecordWatermark:this._highRecordWatermark,notificationFilter:this._notificationFilter})]}})})});return this._results.push(t),t},$n.prototype._run=function(e,t,r){var r=this._acquireAndConsumeConnection(r),n=r.connectionHolder,r=r.resultPromise.catch(function(e){return Promise.resolve(new zn.FailedObserver({error:e}))}),o={high:this._highRecordWatermark,low:this._lowRecordWatermark};return new Gn.default(r,e,t,n,o)},$n.prototype._acquireConnection=function(e){var r=this,e=this._acquireAndConsumeConnection(e),n=e.connectionHolder;return e.resultPromise.then(function(t){return Ln(r,void 0,void 0,function(){return Fn(this,function(e){switch(e.label){case 0:return[4,n.releaseConnection()];case 1:return e.sent(),[2,t]}})})})},$n.prototype._acquireAndConsumeConnection=function(t){var e=this._connectionHolderWithMode(this._mode),r=this._open?!this._hasTx&&e.initializeConnection()?e.getConnection().then(function(e){return t(e)}):Promise.reject((0,Hn.newError)("Queries cannot be run directly on a session with an open transaction; either run from within the transaction or use a different session.")):Promise.reject((0,Hn.newError)("Cannot run query in a closed session."));return{connectionHolder:e,resultPromise:r}},$n.prototype.beginTransaction=function(e){var t=Qn.TxConfig.empty();return null!=e&&(t=new Qn.TxConfig(e,this._log)),this._beginTransaction(this._mode,t,{api:Vn.TELEMETRY_APIS.UNMANAGED_TRANSACTION})},$n.prototype._beginTransaction=function(e,t,r){var n=this;if(!this._open)throw(0,Hn.newError)("Cannot begin a transaction on a closed session.");if(this._hasTx)throw(0,Hn.newError)("You cannot begin a transaction on a session with an open transaction; either run from within the transaction or use a different session.");e=$n._validateSessionMode(e),e=this._connectionHolderWithMode(e),e.initializeConnection(),this._hasTx=!0,e=new Xn.default({connectionHolder:e,impersonatedUser:this._impersonatedUser,onClose:this._transactionClosed.bind(this),onBookmarks:function(e,t,r){return n._updateBookmarks(e,t,r)},onConnection:this._assertSessionIsOpen.bind(this),reactive:this._reactive,fetchSize:this._fetchSize,lowRecordWatermark:this._lowRecordWatermark,highRecordWatermark:this._highRecordWatermark,notificationFilter:this._notificationFilter,apiTelemetryConfig:r});return e._begin(function(){return n._bookmarks()},t),e},$n.prototype._assertSessionIsOpen=function(){if(!this._open)throw(0,Hn.newError)("You cannot run more transactions on a closed session.")},$n.prototype._transactionClosed=function(){this._hasTx=!1},$n.prototype.lastBookmark=function(){return this.lastBookmarks()},$n.prototype.lastBookmarks=function(){return this._lastBookmarks.values()},$n.prototype._bookmarks=function(){var r;return Ln(this,void 0,void 0,function(){var t;return Fn(this,function(e){switch(e.label){case 0:return[4,null==(r=this._bookmarkManager)?void 0:r.getBookmarks()];case 1:return void 0===(t=e.sent())?[2,this._lastBookmarks]:[2,new Zn.Bookmarks(Wn(Wn([],Bn(t),!1),Bn(this._configuredBookmarks),!1))]}})})},$n.prototype.readTransaction=function(e,t){t=new Qn.TxConfig(t,this._log);return this._runTransaction(Vn.ACCESS_MODE_READ,t,e)},$n.prototype.writeTransaction=function(e,t){t=new Qn.TxConfig(t,this._log);return this._runTransaction(Vn.ACCESS_MODE_WRITE,t,e)},$n.prototype._runTransaction=function(t,r,e){var n=this;return this._transactionExecutor.execute(function(e){return n._beginTransaction(t,r,e)},e)},$n.prototype.executeRead=function(e,t){t=new Qn.TxConfig(t,this._log);return this._executeInTransaction(Vn.ACCESS_MODE_READ,t,e)},$n.prototype.executeWrite=function(e,t){t=new Qn.TxConfig(t,this._log);return this._executeInTransaction(Vn.ACCESS_MODE_WRITE,t,e)},$n.prototype._executeInTransaction=function(t,r,e){var n=this;return this._transactionExecutor.execute(function(e){return n._beginTransaction(t,r,e)},e,Jn.default.fromTransaction)},$n.prototype._onDatabaseNameResolved=function(e){this._databaseNameResolved||(this._database=e=null!=e?e:"",this._readConnectionHolder.setDatabase(e),this._writeConnectionHolder.setDatabase(e),this._databaseNameResolved=!0)},$n.prototype._getConnectionAcquistionBookmarks=function(){var r;return Ln(this,void 0,void 0,function(){var t;return Fn(this,function(e){switch(e.label){case 0:return[4,null==(r=this._bookmarkManager)?void 0:r.getBookmarks()];case 1:return void 0===(t=e.sent())?[2,this._lastBookmarks]:[2,new Zn.Bookmarks(Wn(Wn([],Bn(this._configuredBookmarks),!1),Bn(t),!1))]}})})},$n.prototype._updateBookmarks=function(e,t,r){var n;null==e||e.isEmpty()||(null!=(n=this._bookmarkManager)&&n.updateBookmarks(null!=(n=null==t?void 0:t.values())?n:[],null!=(t=null==e?void 0:e.values())?t:[]).catch(function(){}),this._lastBookmarks=e,this._configuredBookmarks=Zn.Bookmarks.empty())},$n.prototype.close=function(){return Ln(this,void 0,void 0,function(){return Fn(this,function(e){switch(e.label){case 0:return this._open?(this._open=!1,this._results.forEach(function(e){return e._cancel()}),this._transactionExecutor.close(),[4,this._readConnectionHolder.close(this._hasTx)]):[3,3];case 1:return e.sent(),[4,this._writeConnectionHolder.close(this._hasTx)];case 2:e.sent(),e.label=3;case 3:return[2]}})})},$n.prototype[Symbol.asyncDispose]=function(){return this.close()},$n.prototype._connectionHolderWithMode=function(e){if(e===Vn.ACCESS_MODE_READ)return this._readConnectionHolder;if(e===Vn.ACCESS_MODE_WRITE)return this._writeConnectionHolder;throw(0,Hn.newError)("Unknown access mode: "+e)},$n.prototype._onCompleteCallback=function(e,t){this._updateBookmarks(new Zn.Bookmarks(e.bookmark),t,e.db)},$n.prototype._calculateWatermaks=function(){return this._fetchSize===Vn.FETCH_ALL?{low:Number.MAX_VALUE,high:Number.MAX_VALUE}:{low:.3*this._fetchSize,high:.7*this._fetchSize}},$n.prototype._configureTransactionExecutor=function(e,t){this._transactionExecutor.pipelineBegin=e,this._transactionExecutor.telemetryApi=t},$n._validateSessionMode=function(e){e=null!=e?e:Vn.ACCESS_MODE_WRITE;if(e!==Vn.ACCESS_MODE_READ&&e!==Vn.ACCESS_MODE_WRITE)throw(0,Hn.newError)("Illegal session mode "+e);return e},P.default=$n;var E={},b={},eo=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},to=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},ro=r&&r.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},no=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},oo=r&&r.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||((n=n||Array.prototype.slice.call(t,0,o))[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},v=(Object.defineProperty(b,"__esModule",{value:!0}),b.bookmarkManager=void 0,io.prototype.updateBookmarks=function(e,t){return eo(this,void 0,void 0,function(){return to(this,function(e){throw new Error("Not implemented")})})},io.prototype.getBookmarks=function(){return eo(this,void 0,void 0,function(){return to(this,function(e){throw new Error("Not implemented")})})},io);function io(){throw new Error("Not implemented")}b.default=v,b.bookmarkManager=function(e){void 0===e&&(e={});var t=new Set(e.initialBookmarks);return new uo(t,e.bookmarksSupplier,e.bookmarksConsumer)};ao.prototype.updateBookmarks=function(f,p){return eo(this,void 0,void 0,function(){var t,r,n,o,i,u,a,s,c,l;return to(this,function(e){switch(e.label){case 0:t=this._bookmarks;try{for(r=ro(f),n=r.next();!n.done;n=r.next())u=n.value,t.delete(u)}catch(e){a={error:e}}finally{try{n&&!n.done&&(s=r.return)&&s.call(r)}finally{if(a)throw a.error}}try{for(o=ro(p),i=o.next();!i.done;i=o.next())u=i.value,t.add(u)}catch(e){c={error:e}}finally{try{i&&!i.done&&(l=o.return)&&l.call(o)}finally{if(c)throw c.error}}return"function"!=typeof this._bookmarksConsumer?[3,2]:[4,this._bookmarksConsumer(oo([],no(t),!1))];case 1:e.sent(),e.label=2;case 2:return[2]}})})},ao.prototype.getBookmarks=function(){var s;return eo(this,void 0,void 0,function(){var t,r,n,o,i,u,a;return to(this,function(e){switch(e.label){case 0:return t=new Set(this._bookmarks),"function"!=typeof this._bookmarksSupplier?[3,2]:[4,this._bookmarksSupplier()];case 1:r=null!=(s=e.sent())?s:[];try{for(n=ro(r),o=n.next();!o.done;o=n.next())i=o.value,t.add(i)}catch(e){u={error:e}}finally{try{o&&!o.done&&(a=n.return)&&a.call(n)}finally{if(u)throw u.error}}e.label=2;case 2:return[2,oo([],no(t),!1)]}})})};var uo=ao;function ao(e,t,r){this._bookmarks=e,this._bookmarksSupplier=t,this._bookmarksConsumer=r}var Qt={},so=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},co=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},g=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},lo=(Object.defineProperty(Qt,"__esModule",{value:!0}),g(S)),fo=t;function po(o){return so(this,void 0,void 0,function(){var t,r,n;return co(this,function(e){switch(e.label){case 0:return[4,o];case 1:return r=e.sent(),t=r.summary,r=r.records,[4,o.keys()];case 2:return n=e.sent(),[2,new lo.default(n,r,t)]}})})}function ho(){}ho.prototype.eagerResultTransformer=function(){return po},ho.prototype.mappedResultTransformer=function(i){var e=this;if(null==i||null==i.collect&&null==i.map)throw(0,fo.newError)("Requires a map or/and a collect functions.");return function(o){return so(e,void 0,void 0,function(){return co(this,function(e){switch(e.label){case 0:return[4,new Promise(function(t,r){var n={records:[],keys:[]};o.subscribe({onKeys:function(e){n.keys=e},onNext:function(e){var t;null!=i.map?void 0!==(t=i.map(e))&&n.records.push(t):n.records.push(e)},onCompleted:function(e){null!=i.collect?t(i.collect(n.records,e,n.keys)):(e={records:n.records,summary:e,keys:n.keys},t(e))},onError:function(e){r(e)}})})];case 1:return[2,e.sent()]}})})}};var O=new ho,v=(Object.freeze(O),Qt.default=O,{}),bo=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},yo=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},_o=(Object.defineProperty(v,"__esModule",{value:!0}),_);function vo(e){this._createSession=e}vo.prototype.execute=function(o,i,u){return bo(this,void 0,void 0,function(){var t,n=this;return yo(this,function(e){switch(e.label){case 0:(t=this._createSession({database:o.database,bookmarkManager:o.bookmarkManager,impersonatedUser:o.impersonatedUser,auth:o.auth}))._configureTransactionExecutor(!0,_o.TELEMETRY_APIS.EXECUTE_QUERY),e.label=1;case 1:return e.trys.push([1,,3,5]),[4,("READ"===o.routing?t.executeRead:t.executeWrite).bind(t)(function(r){return bo(n,void 0,void 0,function(){var t;return yo(this,function(e){switch(e.label){case 0:return t=r.run(i,u),[4,o.resultTransformer(t)];case 1:return[2,e.sent()]}})})},o.transactionConfig)];case 2:return[2,e.sent()];case 3:return[4,t.close()];case 4:return e.sent(),[7];case 5:return[2]}})})},v.default=vo;function mo(){this.routing=Uo.WRITE,this.resultTransformer=void 0,this.database="",this.impersonatedUser=void 0,this.bookmarkManager=void 0,this.transactionConfig=void 0,this.auth=void 0}var go=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},Oo=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},g=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},wo=(Object.defineProperty(E,"__esModule",{value:!0}),E.QueryConfig=E.SessionConfig=E.routing=E.WRITE=E.READ=E.Driver=void 0,y),Eo=g(Qr),Po=_,So=m,To=g(P),jo=u,Co=b,Io=g(Qt),Ro=g(v),ko=t,Ao=36e5,Mo=1e3,No=Po.ACCESS_MODE_READ,xo=(E.READ=No,Po.ACCESS_MODE_WRITE),Do=(E.WRITE=xo,0),Uo=(E.SessionConfig=function(){this.defaultAccessMode=xo,this.bookmarks=[],this.database="",this.impersonatedUser=void 0,this.auth=void 0,this.fetchSize=void 0,this.bookmarkManager=void 0,this.notificationFilter=void 0},{WRITE:"WRITE",READ:"READ"}),O=(E.routing=Uo,Object.freeze(Uo),E.QueryConfig=mo,Object.defineProperty(Lo.prototype,"executeQueryBookmarkManager",{get:function(){return this._defaultExecuteQueryBookmarkManager},enumerable:!1,configurable:!0}),Lo.prototype.executeQuery=function(o,i,u){var a,s;return void 0===u&&(u={}),go(this,void 0,void 0,function(){var t,r,n;return Oo(this,function(e){switch(e.label){case 0:if(t=null===u.bookmarkManager?void 0:null!=(a=u.bookmarkManager)?a:this.executeQueryBookmarkManager,r=null!=(a=u.resultTransformer)?a:Io.default.eagerResultTransformer(),(n=null!=(s=u.routing)?s:Uo.WRITE)!==Uo.READ&&n!==Uo.WRITE)throw(0,ko.newError)('Illegal query routing config: "'.concat(n,'"'));return[4,this._queryExecutor.execute({resultTransformer:r,bookmarkManager:t,routing:n,database:u.database,impersonatedUser:u.impersonatedUser,transactionConfig:u.transactionConfig,auth:u.auth},o,i)];case 1:return[2,e.sent()]}})})},Lo.prototype.verifyConnectivity=function(e){e=(void 0===e?{}:e).database,e=void 0===e?"":e;return this._getOrCreateConnectionProvider().verifyConnectivityAndGetServerInfo({database:e,accessMode:No})},Lo.prototype.verifyAuthentication=function(e){var e=void 0===e?{}:e,t=e.database,r=e.auth;return go(this,void 0,void 0,function(){return Oo(this,function(e){switch(e.label){case 0:return[4,this._getOrCreateConnectionProvider().verifyAuthentication({database:null!=t?t:"system",auth:r,accessMode:No})];case 1:return[2,e.sent()]}})})},Lo.prototype.getServerInfo=function(e){e=(void 0===e?{}:e).database,e=void 0===e?"":e;return this._getOrCreateConnectionProvider().verifyConnectivityAndGetServerInfo({database:e,accessMode:No})},Lo.prototype.supportsMultiDb=function(){return this._getOrCreateConnectionProvider().supportsMultiDb()},Lo.prototype.supportsTransactionConfig=function(){return this._getOrCreateConnectionProvider().supportsTransactionConfig()},Lo.prototype.supportsUserImpersonation=function(){return this._getOrCreateConnectionProvider().supportsUserImpersonation()},Lo.prototype.supportsSessionAuth=function(){return this._getOrCreateConnectionProvider().supportsSessionAuth()},Lo.prototype.getNegotiatedProtocolVersion=function(){return this._getOrCreateConnectionProvider().getNegotiatedProtocolVersion()},Lo.prototype.isEncrypted=function(){return this._isEncrypted()},Lo.prototype._supportsRouting=function(){return this._meta.routing},Lo.prototype._isEncrypted=function(){return this._config.encrypted===jo.ENCRYPTION_ON||!0===this._config.encrypted},Lo.prototype._getTrust=function(){return this._config.trust},Lo.prototype.session=function(e){var e=void 0===e?{}:e,t=e.defaultAccessMode,r=e.bookmarks,n=e.database,o=e.impersonatedUser,i=e.fetchSize,u=e.bookmarkManager,a=e.notificationFilter,e=e.auth;return this._newSession({defaultAccessMode:void 0===t?xo:t,bookmarkOrBookmarks:r,database:void 0===n?"":n,reactive:!1,impersonatedUser:o,fetchSize:Bo(i,this._config.fetchSize),bookmarkManager:u,notificationFilter:a,auth:e})},Lo.prototype.close=function(){return this._log.info("Driver ".concat(this._id," closing")),null!=this._connectionProvider?this._connectionProvider.close():Promise.resolve()},Lo.prototype[Symbol.asyncDispose]=function(){return this.close()},Lo.prototype._afterConstruction=function(){this._log.info("".concat(this._meta.typename," driver ").concat(this._id," created for server address ").concat(this._meta.address.toString()))},Lo.prototype._newSession=function(e){var t=e.defaultAccessMode,r=e.bookmarkOrBookmarks,n=e.database,o=e.reactive,i=e.impersonatedUser,u=e.fetchSize,a=e.bookmarkManager,s=e.notificationFilter,e=e.auth,t=To.default._validateSessionMode(t),c=this._getOrCreateConnectionProvider(),r=null!=r?new wo.Bookmarks(r):wo.Bookmarks.empty();return this._createSession({mode:t,database:null!=n?n:"",connectionProvider:c,bookmarks:r,config:this._config,reactive:o,impersonatedUser:i,fetchSize:u,bookmarkManager:a,notificationFilter:s,auth:e,log:this._log})},Lo.prototype._getOrCreateConnectionProvider=function(){var e;return null==this._connectionProvider&&(this._connectionProvider=this._createConnectionProvider(this._id,this._config,this._log,(e=this._config,new Eo.default(e.resolver)))),this._connectionProvider},Lo);function Lo(e,t,r,n,o){void 0===n&&(n=function(e){return new To.default(e)}),void 0===o&&(o=function(e){return new Ro.default(e)}),(i=t=void 0===t?{}:t).maxConnectionLifetime=Fo(i.maxConnectionLifetime,Ao),i.maxConnectionPoolSize=Fo(i.maxConnectionPoolSize,Po.DEFAULT_POOL_MAX_SIZE),i.connectionAcquisitionTimeout=Fo(i.connectionAcquisitionTimeout,Po.DEFAULT_POOL_ACQUISITION_TIMEOUT),i.fetchSize=Bo(i.fetchSize,Mo),i.connectionTimeout=function(e){e=parseInt(e.connectionTimeout,10);return 0===e||!isNaN(e)&&e<0?null:isNaN(e)?Po.DEFAULT_CONNECTION_TIMEOUT_MILLIS:e}(i),i.connectionLivenessCheckTimeout=function(e){if(null==e)return;e=parseInt(e,10);if(e<0||Number.isNaN(e))throw new Error("The connectionLivenessCheckTimeout can only be a positive value or 0 for always. However connectionLivenessCheckTimeout = ".concat(e));return e}(i.connectionLivenessCheckTimeout);var i=So.Logger.create(t),u=t,a=i,s=u.resolver;if(null!=s&&"function"!=typeof s)throw new TypeError("Configured resolver should be a function. Got: ".concat(typeof s));u.connectionAcquisitionTimeout<u.connectionTimeout&&a.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'),this._id=Do++,this._meta=e,this._config=t,this._log=i,this._createConnectionProvider=r,this._createSession=n,this._defaultExecuteQueryBookmarkManager=(0,Co.bookmarkManager)(),this._queryExecutor=o(this.session.bind(this)),this._connectionProvider=null,this._afterConstruction()}function Fo(e,t){e=parseInt(e,10);return 0<e||0===e?e:e<0?Number.MAX_SAFE_INTEGER:t}function Bo(e,t){e=parseInt(e,10);if(0<e||e===Po.FETCH_ALL)return e;if(0===e||e<0)throw new Error("The fetch size can only be a positive value or ".concat(Po.FETCH_ALL," for ALL. However fetchSize = ").concat(e));return t}E.Driver=O,E.default=O;y={};function Wo(e){return null!=e&&""!==e&&(Object.getPrototypeOf(e)!==Object.prototype||0!==Object.keys(e).length)}Object.defineProperty(y,"__esModule",{value:!0}),y.default={basic:function(e,t,r){return null!=r?{scheme:"basic",principal:e,credentials:t,realm:r}:{scheme:"basic",principal:e,credentials:t}},kerberos:function(e){return{scheme:"kerberos",principal:"",credentials:e}},bearer:function(e){return{scheme:"bearer",credentials:e}},none:function(){return{scheme:"none"}},custom:function(e,t,r,n,o){n={scheme:n,principal:e};return Wo(t)&&(n.credentials=t),Wo(r)&&(n.realm=r),Wo(o)&&(n.parameters=o),n}};var Qr={},zo=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},qo=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},_=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Vo=(Object.defineProperty(Qr,"__esModule",{value:!0}),Qr.staticAuthTokenManager=Qr.authTokenManagers=Qr.AuthTokenAndExpiration=void 0,_(y)),Ho=h;function Go(){}function Yo(){}Go.prototype.getToken=function(){throw new Error("Not Implemented")},Go.prototype.handleSecurityException=function(e,t){throw new Error("Not implemented")},Qr.default=Go,Qr.AuthTokenAndExpiration=function(){this.token=Vo.default.none(),this.expiration=void 0},Yo.prototype.bearer=function(e){e=e.tokenProvider;if("function"!=typeof e)throw new TypeError("tokenProvider should be function, but got: ".concat(typeof e));return new Qo(e,["Neo.ClientError.Security.Unauthorized","Neo.ClientError.Security.TokenExpired"])},Yo.prototype.basic=function(e){var t=this,r=e.tokenProvider;if("function"!=typeof r)throw new TypeError("tokenProvider should be function, but got: ".concat(typeof r));return new Qo(function(){return zo(t,void 0,void 0,function(){var t;return qo(this,function(e){switch(e.label){case 0:return t={},[4,r()];case 1:return[2,(t.token=e.sent(),t)]}})})},["Neo.ClientError.Security.Unauthorized"])};m=new Yo;Qr.authTokenManagers=m,Object.freeze(m),Qr.staticAuthTokenManager=function(e){return e=e.authToken,new Jo(e)};Zo.prototype.subscribe=function(e){this._subscribers.push(e)},Zo.prototype.onCompleted=function(t){this._subscribers.forEach(function(e){return e.onCompleted(t)})},Zo.prototype.onError=function(t){this._subscribers.forEach(function(e){return e.onError(t)})};var Ko=Zo;function Zo(e){this._subscribers=e=void 0===e?[]:e}Xo.prototype.getToken=function(){var t;return zo(this,void 0,void 0,function(){return qo(this,function(e){switch(e.label){case 0:return void 0===this._currentAuthData||void 0!==this._currentAuthData.expiration&&this._currentAuthData.expiration<new Date?[4,this._refreshAuthToken()]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2,null==(t=this._currentAuthData)?void 0:t.token]}})})},Xo.prototype.handleSecurityException=function(e,t){return!!this._handledSecurityCodes.includes(t)&&(Ho.util.equals(e,null==(t=this._currentAuthData)?void 0:t.token)&&this._scheduleRefreshAuthToken(),!0)},Xo.prototype._scheduleRefreshAuthToken=function(e){var r=this;void 0===this._refreshObservable&&(this._currentAuthData=void 0,this._refreshObservable=new Ko,Promise.resolve(this._tokenProvider()).then(function(e){var t;r._currentAuthData=e,null!=(t=r._refreshObservable)&&t.onCompleted(e)}).catch(function(e){var t;null!=(t=r._refreshObservable)&&t.onError(e)}).finally(function(){r._refreshObservable=void 0})),void 0!==e&&this._refreshObservable.subscribe(e)},Xo.prototype._refreshAuthToken=function(){return zo(this,void 0,void 0,function(){var r=this;return qo(this,function(e){switch(e.label){case 0:return[4,new Promise(function(e,t){r._scheduleRefreshAuthToken({onCompleted:e,onError:t})})];case 1:return[2,e.sent()]}})})};var Qo=Xo;function Xo(e,t,r,n){this._tokenProvider=e,this._handledSecurityCodes=t,this._currentAuthData=r,this._refreshObservable=n}$o.prototype.getToken=function(){return this._authToken},$o.prototype.handleSecurityException=function(e,t){return!1};var Jo=$o;function $o(e){this._authToken=e}function ei(){this.encrypted=void 0,this.trust=void 0,this.trustedCertificates=[],this.maxConnectionPoolSize=100,this.maxConnectionLifetime=36e5,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}var ti,ri,ni,oi,ii,ui,ai,si,ci,li,fi,pi,di,hi,u={},g=r&&r.__extends||(ti=function(e,t){return(ti=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}ti(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),v=(Object.defineProperty(u,"__esModule",{value:!0}),u.InternalConfig=u.Config=void 0,u.Config=ei,g(bi,ri=ei),bi);function bi(){return null!==ri&&ri.apply(this,arguments)||this}u.InternalConfig=v,O=e,ni=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),oi=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),_=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&ni(t,e,r);return oi(t,e),t},m=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(O,"__esModule",{value:!0}),O.Transaction=O.Connection=O.ConnectionProvider=O.EagerResult=O.Result=O.Stats=O.QueryStatistics=O.ProfiledPlan=O.Plan=O.Notification=O.ServerInfo=O.queryType=O.ResultSummary=O.Record=O.isPathSegment=O.PathSegment=O.isPath=O.Path=O.isUnboundRelationship=O.UnboundRelationship=O.isRelationship=O.Relationship=O.isNode=O.Node=O.Time=O.LocalTime=O.LocalDateTime=O.isTime=O.isLocalTime=O.isLocalDateTime=O.isDuration=O.isDateTime=O.isDate=O.Duration=O.DateTime=O.Date=O.Point=O.isPoint=O.internal=O.toString=O.toNumber=O.inSafeRange=O.isInt=O.int=O.Integer=O.error=O.isRetriableError=O.Neo4jError=O.newError=O.authTokenManagers=void 0,O.notificationFilterMinimumSeverityLevel=O.notificationFilterDisabledCategory=O.notificationSeverityLevel=O.notificationCategory=O.resultTransformers=O.routing=O.staticAuthTokenManager=O.bookmarkManager=O.auth=O.json=O.driver=O.types=O.Driver=O.Session=O.TransactionPromise=O.ManagedTransaction=void 0,ii=t,Object.defineProperty(O,"newError",{enumerable:!0,get:function(){return ii.newError}}),Object.defineProperty(O,"Neo4jError",{enumerable:!0,get:function(){return ii.Neo4jError}}),Object.defineProperty(O,"isRetriableError",{enumerable:!0,get:function(){return ii.isRetriableError}}),ui=_(n),O.Integer=ui.default,Object.defineProperty(O,"int",{enumerable:!0,get:function(){return ui.int}}),Object.defineProperty(O,"isInt",{enumerable:!0,get:function(){return ui.isInt}}),Object.defineProperty(O,"inSafeRange",{enumerable:!0,get:function(){return ui.inSafeRange}}),Object.defineProperty(O,"toNumber",{enumerable:!0,get:function(){return ui.toNumber}}),Object.defineProperty(O,"toString",{enumerable:!0,get:function(){return ui.toString}}),ai=i,Object.defineProperty(O,"Date",{enumerable:!0,get:function(){return ai.Date}}),Object.defineProperty(O,"DateTime",{enumerable:!0,get:function(){return ai.DateTime}}),Object.defineProperty(O,"Duration",{enumerable:!0,get:function(){return ai.Duration}}),Object.defineProperty(O,"isDate",{enumerable:!0,get:function(){return ai.isDate}}),Object.defineProperty(O,"isDateTime",{enumerable:!0,get:function(){return ai.isDateTime}}),Object.defineProperty(O,"isDuration",{enumerable:!0,get:function(){return ai.isDuration}}),Object.defineProperty(O,"isLocalDateTime",{enumerable:!0,get:function(){return ai.isLocalDateTime}}),Object.defineProperty(O,"isLocalTime",{enumerable:!0,get:function(){return ai.isLocalTime}}),Object.defineProperty(O,"isTime",{enumerable:!0,get:function(){return ai.isTime}}),Object.defineProperty(O,"LocalDateTime",{enumerable:!0,get:function(){return ai.LocalDateTime}}),Object.defineProperty(O,"LocalTime",{enumerable:!0,get:function(){return ai.LocalTime}}),Object.defineProperty(O,"Time",{enumerable:!0,get:function(){return ai.Time}}),si=l,Object.defineProperty(O,"Node",{enumerable:!0,get:function(){return si.Node}}),Object.defineProperty(O,"isNode",{enumerable:!0,get:function(){return si.isNode}}),Object.defineProperty(O,"Relationship",{enumerable:!0,get:function(){return si.Relationship}}),Object.defineProperty(O,"isRelationship",{enumerable:!0,get:function(){return si.isRelationship}}),Object.defineProperty(O,"UnboundRelationship",{enumerable:!0,get:function(){return si.UnboundRelationship}}),Object.defineProperty(O,"isUnboundRelationship",{enumerable:!0,get:function(){return si.isUnboundRelationship}}),Object.defineProperty(O,"Path",{enumerable:!0,get:function(){return si.Path}}),Object.defineProperty(O,"isPath",{enumerable:!0,get:function(){return si.isPath}}),Object.defineProperty(O,"PathSegment",{enumerable:!0,get:function(){return si.PathSegment}}),Object.defineProperty(O,"isPathSegment",{enumerable:!0,get:function(){return si.isPathSegment}}),g=m(f),O.Record=g.default,ci=s,Object.defineProperty(O,"isPoint",{enumerable:!0,get:function(){return ci.isPoint}}),Object.defineProperty(O,"Point",{enumerable:!0,get:function(){return ci.Point}}),li=_(p),O.ResultSummary=li.default,Object.defineProperty(O,"queryType",{enumerable:!0,get:function(){return li.queryType}}),Object.defineProperty(O,"ServerInfo",{enumerable:!0,get:function(){return li.ServerInfo}}),Object.defineProperty(O,"Notification",{enumerable:!0,get:function(){return li.Notification}}),Object.defineProperty(O,"Plan",{enumerable:!0,get:function(){return li.Plan}}),Object.defineProperty(O,"ProfiledPlan",{enumerable:!0,get:function(){return li.ProfiledPlan}}),Object.defineProperty(O,"QueryStatistics",{enumerable:!0,get:function(){return li.QueryStatistics}}),Object.defineProperty(O,"Stats",{enumerable:!0,get:function(){return li.Stats}}),Object.defineProperty(O,"notificationCategory",{enumerable:!0,get:function(){return li.notificationCategory}}),Object.defineProperty(O,"notificationSeverityLevel",{enumerable:!0,get:function(){return li.notificationSeverityLevel}}),fi=dt,Object.defineProperty(O,"notificationFilterDisabledCategory",{enumerable:!0,get:function(){return fi.notificationFilterDisabledCategory}}),Object.defineProperty(O,"notificationFilterMinimumSeverityLevel",{enumerable:!0,get:function(){return fi.notificationFilterMinimumSeverityLevel}}),v=m(kt),O.Result=v.default,t=m(S),O.EagerResult=t.default,n=m(w),O.ConnectionProvider=n.default,n=m(X),O.Connection=n.default,i=m(pr),O.Transaction=i.default,l=m(tn),O.ManagedTransaction=l.default,f=m(o),O.TransactionPromise=f.default,s=m(P),O.Session=s.default,p=_(E),dt=p,O.Driver=p.default,O.driver=dt,kt=m(y),O.auth=kt.default,pi=b,Object.defineProperty(O,"bookmarkManager",{enumerable:!0,get:function(){return pi.bookmarkManager}}),di=Qr,Object.defineProperty(O,"authTokenManagers",{enumerable:!0,get:function(){return di.authTokenManagers}}),Object.defineProperty(O,"staticAuthTokenManager",{enumerable:!0,get:function(){return di.staticAuthTokenManager}}),hi=E,Object.defineProperty(O,"routing",{enumerable:!0,get:function(){return hi.routing}}),S=_(u),O.types=S,w=_(Q),O.json=w,m=m(Qt),O.resultTransformers=m.default,_=_(h),O.internal=_,X={SERVICE_UNAVAILABLE:ii.SERVICE_UNAVAILABLE,SESSION_EXPIRED:ii.SESSION_EXPIRED,PROTOCOL_ERROR:ii.PROTOCOL_ERROR},O.error=X,X={authTokenManagers:di.authTokenManagers,newError:ii.newError,Neo4jError:ii.Neo4jError,isRetriableError:ii.isRetriableError,error:X,Integer:ui.default,int:ui.int,isInt:ui.isInt,inSafeRange:ui.inSafeRange,toNumber:ui.toNumber,toString:ui.toString,internal:_,isPoint:ci.isPoint,Point:ci.Point,Date:ai.Date,DateTime:ai.DateTime,Duration:ai.Duration,isDate:ai.isDate,isDateTime:ai.isDateTime,isDuration:ai.isDuration,isLocalDateTime:ai.isLocalDateTime,isLocalTime:ai.isLocalTime,isTime:ai.isTime,LocalDateTime:ai.LocalDateTime,LocalTime:ai.LocalTime,Time:ai.Time,Node:si.Node,isNode:si.isNode,Relationship:si.Relationship,isRelationship:si.isRelationship,UnboundRelationship:si.UnboundRelationship,isUnboundRelationship:si.isUnboundRelationship,Path:si.Path,isPath:si.isPath,PathSegment:si.PathSegment,isPathSegment:si.isPathSegment,Record:g.default,ResultSummary:li.default,queryType:li.queryType,ServerInfo:li.ServerInfo,Notification:li.Notification,Plan:li.Plan,ProfiledPlan:li.ProfiledPlan,QueryStatistics:li.QueryStatistics,Stats:li.Stats,Result:v.default,EagerResult:t.default,Transaction:i.default,ManagedTransaction:l.default,TransactionPromise:f.default,Session:s.default,Driver:p.default,Connection:n.default,types:S,driver:dt,json:w,auth:kt.default,bookmarkManager:pi.bookmarkManager,routing:hi.routing,resultTransformers:m.default,notificationCategory:li.notificationCategory,notificationSeverityLevel:li.notificationSeverityLevel,notificationFilterDisabledCategory:fi.notificationFilterDisabledCategory,notificationFilterMinimumSeverityLevel:fi.notificationFilterMinimumSeverityLevel},O.default=X;pr={},tn={},o={},P={},y={};Object.defineProperty(y,"__esModule",{value:!0}),y.isFunction=void 0,y.isFunction=function(e){return"function"==typeof e};b={},Qr={},E={};Object.defineProperty(E,"__esModule",{value:!0}),E.createErrorClass=void 0,E.createErrorClass=function(e){return(e=e(function(e){Error.call(e),e.stack=(new Error).stack})).prototype=Object.create(Error.prototype),e.prototype.constructor=e},Object.defineProperty(Qr,"__esModule",{value:!0}),Qr.UnsubscriptionError=void 0;u=E,Qr.UnsubscriptionError=u.createErrorClass(function(t){return function(e){t(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map(function(e,t){return t+1+") "+e.toString()}).join("\n "):"",this.name="UnsubscriptionError",this.errors=e}}),Q={};Object.defineProperty(Q,"__esModule",{value:!0}),Q.arrRemove=void 0,Q.arrRemove=function(e,t){e&&0<=(t=e.indexOf(t))&&e.splice(t,1)};var yi=r&&r.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},_i=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},vi=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},mi=(Object.defineProperty(b,"__esModule",{value:!0}),b.isSubscription=b.EMPTY_SUBSCRIPTION=b.Subscription=void 0,y),gi=Qr,Oi=Q,wi=(Ei.prototype.unsubscribe=function(){var t,e,r;if(!this.closed){this.closed=!0;var n=this._parentage;if(n)if(this._parentage=null,Array.isArray(n))try{for(var o=yi(n),i=o.next();!i.done;i=o.next())i.value.remove(this)}catch(e){a={error:e}}finally{try{i&&!i.done&&(u=o.return)&&u.call(o)}finally{if(a)throw a.error}}else n.remove(this);var u=this.initialTeardown;if(mi.isFunction(u))try{u()}catch(e){r=e instanceof gi.UnsubscriptionError?e.errors:[e]}var a=this._finalizers;if(a){this._finalizers=null;try{for(var s=yi(a),c=s.next();!c.done;c=s.next()){var l=c.value;try{Pi(l)}catch(e){r=null!=r?r:[],e instanceof gi.UnsubscriptionError?r=vi(vi([],_i(r)),_i(e.errors)):r.push(e)}}}catch(e){t={error:e}}finally{try{c&&!c.done&&(e=s.return)&&e.call(s)}finally{if(t)throw t.error}}}if(r)throw new gi.UnsubscriptionError(r)}},Ei.prototype.add=function(e){var t;if(e&&e!==this)if(this.closed)Pi(e);else{if(e instanceof Ei){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=null!=(t=this._finalizers)?t:[]).push(e)}},Ei.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},Ei.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},Ei.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&Oi.arrRemove(t,e)},Ei.prototype.remove=function(e){var t=this._finalizers;t&&Oi.arrRemove(t,e),e instanceof Ei&&e._removeParent(this)},Ei.EMPTY=((Qt=new Ei).closed=!0,Qt),Ei);function Ei(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}function Pi(e){mi.isFunction(e)?e():e.unsubscribe()}b.Subscription=wi,b.EMPTY_SUBSCRIPTION=wi.EMPTY,b.isSubscription=function(e){return e instanceof wi||e&&"closed"in e&&mi.isFunction(e.remove)&&mi.isFunction(e.add)&&mi.isFunction(e.unsubscribe)};var Si,Ti,ji,h={},_=(Object.defineProperty(h,"__esModule",{value:!0}),h.config=void 0,h.config={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},{}),g={},Ci=(Si=g,Ti=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},ji=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},Object.defineProperty(Si,"__esModule",{value:!0}),Si.timeoutProvider=void 0,Si.timeoutProvider={setTimeout:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var o=Si.timeoutProvider.delegate;return null!=o&&o.setTimeout?o.setTimeout.apply(o,ji([e,t],Ti(r))):setTimeout.apply(void 0,ji([e,t],Ti(r)))},clearTimeout:function(e){var t=Si.timeoutProvider.delegate;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0},Object.defineProperty(_,"__esModule",{value:!0}),_.reportUnhandledError=void 0,h),Ii=g;_.reportUnhandledError=function(t){Ii.timeoutProvider.setTimeout(function(){var e=Ci.config.onUnhandledError;if(!e)throw t;e(t)})};v={};Object.defineProperty(v,"__esModule",{value:!0}),v.noop=void 0,v.noop=function(){};t={};function Ri(e,t,r){return{kind:e,value:t,error:r}}Object.defineProperty(t,"__esModule",{value:!0}),t.createNotification=t.nextNotification=t.errorNotification=t.COMPLETE_NOTIFICATION=void 0,t.COMPLETE_NOTIFICATION=Ri("C",void 0,void 0),t.errorNotification=function(e){return Ri("E",void 0,e)},t.nextNotification=function(e){return Ri("N",e,void 0)},t.createNotification=Ri;var ki,Ai,Mi,Ni,xi,Di,Ui,Li,Fi,Bi,Wi,zi,qi,Vi,i={},Hi=(Object.defineProperty(i,"__esModule",{value:!0}),i.captureError=i.errorContext=void 0,h),Gi=null;function Yi(e){var t=Mi.call(this)||this;return t.isStopped=!1,e?(t.destination=e,xi.isSubscription(e)&&e.add(t)):t.destination=ki.EMPTY_OBSERVER,t}function Ki(e,t){return Wi.call(e,t)}function Zi(e){this.partialObserver=e}function Qi(e,t,r){var n=qi.call(this)||this;return r=Ni.isFunction(e)||!e?{next:null!=e?e:void 0,error:null!=t?t:void 0,complete:null!=r?r:void 0}:n&&Di.config.useDeprecatedNextContext?((t=Object.create(e)).unsubscribe=function(){return n.unsubscribe()},{next:e.next&&Ki(e.next,t),error:e.error&&Ki(e.error,t),complete:e.complete&&Ki(e.complete,t)}):e,n.destination=new zi(r),n}function Xi(e){Di.config.useDeprecatedSynchronousErrorHandling?Bi.captureError(e):Ui.reportUnhandledError(e)}function Ji(e,t){var r=Di.config.onStoppedNotification;r&&Fi.timeoutProvider.setTimeout(function(){return r(e,t)})}i.errorContext=function(e){if(Hi.config.useDeprecatedSynchronousErrorHandling){var t=!Gi;if(t&&(Gi={errorThrown:!1,error:null}),e(),t){var t=Gi,r=t.errorThrown,t=t.error;if(Gi=null,r)throw t}}else e()},i.captureError=function(e){Hi.config.useDeprecatedSynchronousErrorHandling&&Gi&&(Gi.errorThrown=!0,Gi.error=e)},ki=P,l=r&&r.__extends||(Ai=function(e,t){return(Ai=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Ai(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Object.defineProperty(ki,"__esModule",{value:!0}),ki.EMPTY_OBSERVER=ki.SafeSubscriber=ki.Subscriber=void 0,Ni=y,Di=h,Ui=_,f=v,Li=t,Fi=g,Bi=i,Mi=(xi=b).Subscription,l(Yi,Mi),Yi.create=function(e,t,r){return new Vi(e,t,r)},Yi.prototype.next=function(e){this.isStopped?Ji(Li.nextNotification(e),this):this._next(e)},Yi.prototype.error=function(e){this.isStopped?Ji(Li.errorNotification(e),this):(this.isStopped=!0,this._error(e))},Yi.prototype.complete=function(){this.isStopped?Ji(Li.COMPLETE_NOTIFICATION,this):(this.isStopped=!0,this._complete())},Yi.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,Mi.prototype.unsubscribe.call(this),this.destination=null)},Yi.prototype._next=function(e){this.destination.next(e)},Yi.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},Yi.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},s=Yi,ki.Subscriber=s,Wi=Function.prototype.bind,Zi.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){Xi(e)}},Zi.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){Xi(e)}else Xi(e)},Zi.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){Xi(e)}},zi=Zi,l(Qi,qi=s),Vi=Qi,ki.SafeSubscriber=Vi,ki.EMPTY_OBSERVER={closed:!0,next:f.noop,error:function(e){throw e},complete:f.noop};p={},Object.defineProperty(p,"__esModule",{value:!0}),p.observable=void 0,p.observable="function"==typeof Symbol&&Symbol.observable||"@@observable",n={},S={};Object.defineProperty(S,"__esModule",{value:!0}),S.identity=void 0,S.identity=function(e){return e},Object.defineProperty(n,"__esModule",{value:!0}),n.pipeFromArray=n.pipe=void 0;var $i=S;function eu(t){return 0===t.length?$i.identity:1===t.length?t[0]:function(e){return t.reduce(function(e,t){return t(e)},e)}}n.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return eu(e)},n.pipeFromArray=eu,Object.defineProperty(o,"__esModule",{value:!0}),o.Observable=void 0;var tu=P,ru=b,dt=p,nu=n,ou=h,iu=y,uu=i;function au(e){e&&(this._subscribe=e)}function su(e){return null!=(e=null!=e?e:ou.config.Promise)?e:Promise}au.prototype.lift=function(e){var t=new au;return t.source=this,t.operator=e,t},au.prototype.subscribe=function(e,t,r){var n,o=this,i=(n=e)&&n instanceof tu.Subscriber||function(e){return e&&iu.isFunction(e.next)&&iu.isFunction(e.error)&&iu.isFunction(e.complete)}(n)&&ru.isSubscription(n)?e:new tu.SafeSubscriber(e,t,r);return uu.errorContext(function(){var e=o.operator,t=o.source;i.add(e?e.call(i,t):t?o._subscribe(i):o._trySubscribe(i))}),i},au.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},au.prototype.forEach=function(n,e){var o=this;return new(e=su(e))(function(e,t){var r=new tu.SafeSubscriber({next:function(e){try{n(e)}catch(e){t(e),r.unsubscribe()}},error:t,complete:e});o.subscribe(r)})},au.prototype._subscribe=function(e){var t;return null==(t=this.source)?void 0:t.subscribe(e)},au.prototype[dt.observable]=function(){return this},au.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return nu.pipeFromArray(e)(this)},au.prototype.toPromise=function(e){var n=this;return new(e=su(e))(function(e,t){var r;n.subscribe(function(e){return r=e},function(e){return t(e)},function(){return e(r)})})},au.create=function(e){return new au(e)},o.Observable=au;var w={},kt={},m={},cu=(Object.defineProperty(m,"__esModule",{value:!0}),m.operate=m.hasLift=void 0,y);function lu(e){return cu.isFunction(null==e?void 0:e.lift)}m.hasLift=lu,m.operate=function(t){return function(e){if(lu(e))return e.lift(function(e){try{return t(e,this)}catch(e){this.error(e)}});throw new TypeError("Unable to lift unknown Observable type")}};var fu,O={},X=r&&r.__extends||(fu=function(e,t){return(fu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}fu(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),u=(Object.defineProperty(O,"__esModule",{value:!0}),O.OperatorSubscriber=O.createOperatorSubscriber=void 0,P);O.createOperatorSubscriber=function(e,t,r,n,o){return new du(e,t,r,n,o)};X(hu,pu=u.Subscriber),hu.prototype.unsubscribe=function(){var e;this.shouldUnsubscribe&&!this.shouldUnsubscribe()||(e=this.closed,pu.prototype.unsubscribe.call(this),e||null==(e=this.onFinalize)||e.call(this))};var pu,du=hu;function hu(t,r,e,n,o,i){var u=pu.call(this,t)||this;return u.onFinalize=o,u.shouldUnsubscribe=i,u._next=r?function(e){try{r(e)}catch(e){t.error(e)}}:pu.prototype._next,u._error=n?function(e){try{n(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:pu.prototype._error,u._complete=e?function(){try{e()}catch(e){t.error(e)}finally{this.unsubscribe()}}:pu.prototype._complete,u}O.OperatorSubscriber=du,Object.defineProperty(kt,"__esModule",{value:!0}),kt.refCount=void 0;var bu=m,yu=O;kt.refCount=function(){return bu.operate(function(r,n){var o=null,e=(r._refCount++,yu.createOperatorSubscriber(n,void 0,void 0,void 0,function(){var e,t;!r||r._refCount<=0||0<--r._refCount?o=null:(e=r._connection,t=o,o=null,!e||t&&e!==t||e.unsubscribe(),n.unsubscribe())}));r.subscribe(e),e.closed||(o=r.connect())})};var _u,Qt=r&&r.__extends||(_u=function(e,t){return(_u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}_u(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(w,"__esModule",{value:!0}),w.ConnectableObservable=void 0;var vu,mu=b,gu=kt,Ou=O,wu=m,t=(vu=o.Observable,Qt(Eu,vu),Eu.prototype._subscribe=function(e){return this.getSubject().subscribe(e)},Eu.prototype.getSubject=function(){var e=this._subject;return e&&!e.isStopped||(this._subject=this.subjectFactory()),this._subject},Eu.prototype._teardown=function(){this._refCount=0;var e=this._connection;(this._subject=this._connection=null)!=e&&e.unsubscribe()},Eu.prototype.connect=function(){var t,r=this,e=this._connection;return e||(e=this._connection=new mu.Subscription,t=this.getSubject(),e.add(this.source.subscribe(Ou.createOperatorSubscriber(t,void 0,function(){r._teardown(),t.complete()},function(e){r._teardown(),t.error(e)},function(){return r._teardown()}))),e.closed&&(this._connection=null,e=mu.Subscription.EMPTY)),e},Eu.prototype.refCount=function(){return gu.refCount()(this)},Eu);function Eu(e,t){var r=vu.call(this)||this;return r.source=e,r.subjectFactory=t,r._subject=null,r._refCount=0,r._connection=null,wu.hasLift(e)&&(r.lift=e.lift),r}w.ConnectableObservable=t;var Pu,Su,Tu,ju,Cu,g={},l={},s=(Pu=l,Object.defineProperty(Pu,"__esModule",{value:!0}),Pu.performanceTimestampProvider=void 0,Pu.performanceTimestampProvider={now:function(){return(Pu.performanceTimestampProvider.delegate||performance).now()},delegate:void 0},{}),Iu=(Su=s,Tu=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},ju=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},Object.defineProperty(Su,"__esModule",{value:!0}),Su.animationFrameProvider=void 0,Cu=b,Su.animationFrameProvider={schedule:function(t){var e=requestAnimationFrame,r=cancelAnimationFrame,n=Su.animationFrameProvider.delegate,o=(n&&(e=n.requestAnimationFrame,r=n.cancelAnimationFrame),e(function(e){r=void 0,t(e)}));return new Cu.Subscription(function(){return null==r?void 0:r(o)})},requestAnimationFrame:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Su.animationFrameProvider.delegate;return((null==r?void 0:r.requestAnimationFrame)||requestAnimationFrame).apply(void 0,ju([],Tu(e)))},cancelAnimationFrame:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Su.animationFrameProvider.delegate;return((null==r?void 0:r.cancelAnimationFrame)||cancelAnimationFrame).apply(void 0,ju([],Tu(e)))},delegate:void 0},Object.defineProperty(g,"__esModule",{value:!0}),g.animationFrames=void 0,o),Ru=l,ku=s;function Au(a){return new Iu.Observable(function(r){var n=a||Ru.performanceTimestampProvider,o=n.now(),i=0,u=function(){r.closed||(i=ku.animationFrameProvider.requestAnimationFrame(function(e){i=0;var t=n.now();r.next({timestamp:a?t:e,elapsed:t-o}),u()}))};return u(),function(){i&&ku.animationFrameProvider.cancelAnimationFrame(i)}})}g.animationFrames=function(e){return e?Au(e):xu};var Mu,Nu,xu=Au(),f={},dt={},X=(Object.defineProperty(dt,"__esModule",{value:!0}),dt.ObjectUnsubscribedError=void 0,E),u=(dt.ObjectUnsubscribedError=X.createErrorClass(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),r&&r.__extends||(Mu=function(e,t){return(Mu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Mu(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),Du=r&&r.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Uu=(Object.defineProperty(f,"__esModule",{value:!0}),f.AnonymousSubject=f.Subject=void 0,o),Lu=b,Fu=dt,Bu=Q,Wu=i,Qt=(Nu=Uu.Observable,u(zu,Nu),zu.prototype.lift=function(e){var t=new Vu(this,this);return t.operator=e,t},zu.prototype._throwIfClosed=function(){if(this.closed)throw new Fu.ObjectUnsubscribedError},zu.prototype.next=function(o){var i=this;Wu.errorContext(function(){var t,e;if(i._throwIfClosed(),!i.isStopped){i.currentObservers||(i.currentObservers=Array.from(i.observers));try{for(var r=Du(i.currentObservers),n=r.next();!n.done;n=r.next())n.value.next(o)}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}}})},zu.prototype.error=function(t){var r=this;Wu.errorContext(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=t;for(var e=r.observers;e.length;)e.shift().error(t)}})},zu.prototype.complete=function(){var t=this;Wu.errorContext(function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var e=t.observers;e.length;)e.shift().complete()}})},zu.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(zu.prototype,"observed",{get:function(){var e;return 0<(null==(e=this.observers)?void 0:e.length)},enumerable:!1,configurable:!0}),zu.prototype._trySubscribe=function(e){return this._throwIfClosed(),Nu.prototype._trySubscribe.call(this,e)},zu.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},zu.prototype._innerSubscribe=function(e){var t=this,r=this.hasError,n=this.isStopped,o=this.observers;return r||n?Lu.EMPTY_SUBSCRIPTION:(this.currentObservers=null,o.push(e),new Lu.Subscription(function(){t.currentObservers=null,Bu.arrRemove(o,e)}))},zu.prototype._checkFinalizedStatuses=function(e){var t=this.hasError,r=this.thrownError,n=this.isStopped;t?e.error(r):n&&e.complete()},zu.prototype.asObservable=function(){var e=new Uu.Observable;return e.source=this,e},zu.create=function(e,t){return new Vu(e,t)},zu);function zu(){var e=Nu.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}f.Subject=Qt;u(Hu,qu=Qt),Hu.prototype.next=function(e){var t,r;null!=(r=null==(t=this.destination)?void 0:t.next)&&r.call(t,e)},Hu.prototype.error=function(e){var t,r;null!=(r=null==(t=this.destination)?void 0:t.error)&&r.call(t,e)},Hu.prototype.complete=function(){var e,t;null!=(t=null==(e=this.destination)?void 0:e.complete)&&t.call(e)},Hu.prototype._subscribe=function(e){var t;return null!=(t=null==(t=this.source)?void 0:t.subscribe(e))?t:Lu.EMPTY_SUBSCRIPTION};var qu,Vu=Hu;function Hu(e,t){var r=qu.call(this)||this;return r.destination=e,r.source=t,r}f.AnonymousSubject=Vu;var Gu,t={},l=r&&r.__extends||(Gu=function(e,t){return(Gu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Gu(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.BehaviorSubject=void 0;Yu=f.Subject,l(Ku,Yu),Object.defineProperty(Ku.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),Ku.prototype._subscribe=function(e){var t=Yu.prototype._subscribe.call(this,e);return t.closed||e.next(this._value),t},Ku.prototype.getValue=function(){var e=this.hasError,t=this.thrownError,r=this._value;if(e)throw t;return this._throwIfClosed(),r},Ku.prototype.next=function(e){Yu.prototype.next.call(this,this._value=e)};var Yu,X=Ku;function Ku(e){var t=Yu.call(this)||this;return t._value=e,t}t.BehaviorSubject=X;var Zu,Qu,i={},u={},Qt=(Zu=u,Object.defineProperty(Zu,"__esModule",{value:!0}),Zu.dateTimestampProvider=void 0,Zu.dateTimestampProvider={now:function(){return(Zu.dateTimestampProvider.delegate||Date).now()},delegate:void 0},r&&r.__extends||(Qu=function(e,t){return(Qu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Qu(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}));Object.defineProperty(i,"__esModule",{value:!0}),i.ReplaySubject=void 0;var Xu,Ju=u,l=(Xu=f.Subject,Qt($u,Xu),$u.prototype.next=function(e){var t=this.isStopped,r=this._buffer,n=this._infiniteTimeWindow,o=this._timestampProvider,i=this._windowTime;t||(r.push(e),n||r.push(o.now()+i)),this._trimBuffer(),Xu.prototype.next.call(this,e)},$u.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),r=this._infiniteTimeWindow,n=this._buffer.slice(),o=0;o<n.length&&!e.closed;o+=r?1:2)e.next(n[o]);return this._checkFinalizedStatuses(e),t},$u.prototype._trimBuffer=function(){var e=this._bufferSize,t=this._timestampProvider,r=this._buffer,n=this._infiniteTimeWindow,o=(n?1:2)*e;if(e<1/0&&o<r.length&&r.splice(0,r.length-o),!n){for(var i=t.now(),u=0,a=1;a<r.length&&r[a]<=i;a+=2)u=a;u&&r.splice(0,u+1)}},$u);function $u(e,t,r){void 0===e&&(e=1/0),void 0===t&&(t=1/0),void 0===r&&(r=Ju.dateTimestampProvider);var n=Xu.call(this)||this;return n._bufferSize=e,n._windowTime=t,n._timestampProvider=r,n._buffer=[],n._infiniteTimeWindow=!0,n._infiniteTimeWindow=t===1/0,n._bufferSize=Math.max(1,e),n._windowTime=Math.max(1,t),n}i.ReplaySubject=l;var ea,X={},Qt=r&&r.__extends||(ea=function(e,t){return(ea=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}ea(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(X,"__esModule",{value:!0}),X.AsyncSubject=void 0;ta=f.Subject,Qt(ra,ta),ra.prototype._checkFinalizedStatuses=function(e){var t=this.hasError,r=this._hasValue,n=this._value,o=this.thrownError,i=this.isStopped,u=this._isComplete;t?e.error(o):(i||u)&&(r&&e.next(n),e.complete())},ra.prototype.next=function(e){this.isStopped||(this._value=e,this._hasValue=!0)},ra.prototype.complete=function(){var e=this._hasValue,t=this._value;this._isComplete||(this._isComplete=!0,e&&ta.prototype.next.call(this,t),ta.prototype.complete.call(this))};var ta,l=ra;function ra(){var e=null!==ta&&ta.apply(this,arguments)||this;return e._value=null,e._hasValue=!1,e._isComplete=!1,e}X.AsyncSubject=l;var na,Qt={},l={},oa={},ia={},ua=r&&r.__extends||(na=function(e,t){return(na=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}na(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(ia,"__esModule",{value:!0}),ia.Action=void 0;aa=b.Subscription,ua(sa,aa),sa.prototype.schedule=function(e,t){return this};var aa,ua=sa;function sa(e,t){return aa.call(this)||this}ia.Action=ua;var ca,la,fa,pa,ua={},da=(ca=ua,la=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},fa=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},Object.defineProperty(ca,"__esModule",{value:!0}),ca.intervalProvider=void 0,ca.intervalProvider={setInterval:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var o=ca.intervalProvider.delegate;return null!=o&&o.setInterval?o.setInterval.apply(o,fa([e,t],la(r))):setInterval.apply(void 0,fa([e,t],la(r)))},clearInterval:function(e){var t=ca.intervalProvider.delegate;return((null==t?void 0:t.clearInterval)||clearInterval)(e)},delegate:void 0},r&&r.__extends||(pa=function(e,t){return(pa=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}pa(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}));Object.defineProperty(oa,"__esModule",{value:!0}),oa.AsyncAction=void 0;var ha,ba=ua,ya=Q,ua=(ha=ia.Action,da(_a,ha),_a.prototype.schedule=function(e,t){if(void 0===t&&(t=0),this.closed)return this;this.state=e;var e=this.id,r=this.scheduler;return null!=e&&(this.id=this.recycleAsyncId(r,e,t)),this.pending=!0,this.delay=t,this.id=null!=(e=this.id)?e:this.requestAsyncId(r,this.id,t),this},_a.prototype.requestAsyncId=function(e,t,r){return void 0===r&&(r=0),ba.intervalProvider.setInterval(e.flush.bind(e,this),r)},_a.prototype.recycleAsyncId=function(e,t,r){if(null!=(r=void 0===r?0:r)&&this.delay===r&&!1===this.pending)return t;null!=t&&ba.intervalProvider.clearInterval(t)},_a.prototype.execute=function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;e=this._execute(e,t);if(e)return e;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},_a.prototype._execute=function(e,t){var r,n=!1;try{this.work(e)}catch(e){n=!0,r=e||new Error("Scheduled action threw falsy error")}if(n)return this.unsubscribe(),r},_a.prototype.unsubscribe=function(){var e,t,r;this.closed||(e=this.id,r=(t=this.scheduler).actions,this.work=this.state=this.scheduler=null,this.pending=!1,ya.arrRemove(r,this),null!=e&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null,ha.prototype.unsubscribe.call(this))},_a);function _a(e,t){var r=ha.call(this,e,t)||this;return r.scheduler=e,r.work=t,r.pending=!1,r}oa.AsyncAction=ua;var va,ma,ga,Oa,wa,Ea,ia={},da={},Pa=(Object.defineProperty(da,"__esModule",{value:!0}),da.TestTools=da.Immediate=void 0,1),Sa={};function Ta(e){return e in Sa&&(delete Sa[e],!0)}da.Immediate={setImmediate:function(e){var t=Pa++;return Sa[t]=!0,(va=va||Promise.resolve()).then(function(){return Ta(t)&&e()}),t},clearImmediate:function(e){Ta(e)}},da.TestTools={pending:function(){return Object.keys(Sa).length}},ma=ia,ga=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Oa=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},Object.defineProperty(ma,"__esModule",{value:!0}),ma.immediateProvider=void 0,wa=da.Immediate.setImmediate,Ea=da.Immediate.clearImmediate,ma.immediateProvider={setImmediate:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=ma.immediateProvider.delegate;return((null==r?void 0:r.setImmediate)||wa).apply(void 0,Oa([],ga(e)))},clearImmediate:function(e){var t=ma.immediateProvider.delegate;return((null==t?void 0:t.clearImmediate)||Ea)(e)},delegate:void 0};var ja,ua=r&&r.__extends||(ja=function(e,t){return(ja=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}ja(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(l,"__esModule",{value:!0}),l.AsapAction=void 0;var Ca,Ia=ia,da=(Ca=oa.AsyncAction,ua(Ra,Ca),Ra.prototype.requestAsyncId=function(e,t,r){return null!==(r=void 0===r?0:r)&&0<r?Ca.prototype.requestAsyncId.call(this,e,t,r):(e.actions.push(this),e._scheduled||(e._scheduled=Ia.immediateProvider.setImmediate(e.flush.bind(e,void 0))))},Ra.prototype.recycleAsyncId=function(e,t,r){if(null!=(r=void 0===r?0:r)?0<r:0<this.delay)return Ca.prototype.recycleAsyncId.call(this,e,t,r);var r=e.actions;null!=t&&(null==(r=r[r.length-1])?void 0:r.id)!==t&&(Ia.immediateProvider.clearImmediate(t),e._scheduled===t&&(e._scheduled=void 0))},Ra);function Ra(e,t){var r=Ca.call(this,e,t)||this;return r.scheduler=e,r.work=t,r}l.AsapAction=da;var ia={},ua={},da={},ka=(Object.defineProperty(da,"__esModule",{value:!0}),da.Scheduler=void 0,u);function Aa(e,t){void 0===t&&(t=Aa.now),this.schedulerActionCtor=e,this.now=t}Aa.prototype.schedule=function(e,t,r){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(r,t)},Aa.now=ka.dateTimestampProvider.now,da.Scheduler=Aa;var Ma,Na,ka=r&&r.__extends||(Ma=function(e,t){return(Ma=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Ma(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),xa=(Object.defineProperty(ua,"__esModule",{value:!0}),ua.AsyncScheduler=void 0,da),ka=(Na=xa.Scheduler,ka(Da,Na),Da.prototype.flush=function(e){var t,r=this.actions;if(this._active)r.push(e);else{this._active=!0;do{if(t=e.execute(e.state,e.delay))break}while(e=r.shift());if(this._active=!1,t){for(;e=r.shift();)e.unsubscribe();throw t}}},Da);function Da(e,t){void 0===t&&(t=xa.Scheduler.now);e=Na.call(this,e,t)||this;return e.actions=[],e._active=!1,e}ua.AsyncScheduler=ka;var Ua,ka=r&&r.__extends||(Ua=function(e,t){return(Ua=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Ua(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(ia,"__esModule",{value:!0}),ia.AsapScheduler=void 0;La=ua.AsyncScheduler,ka(Fa,La),Fa.prototype.flush=function(e){this._active=!0;var t,r=this._scheduled,n=(this._scheduled=void 0,this.actions);e=e||n.shift();do{if(t=e.execute(e.state,e.delay))break}while((e=n[0])&&e.id===r&&n.shift());if(this._active=!1,t){for(;(e=n[0])&&e.id===r&&n.shift();)e.unsubscribe();throw t}};var La,ka=Fa;function Fa(){return null!==La&&La.apply(this,arguments)||this}ia.AsapScheduler=ka,ka=Qt,Object.defineProperty(ka,"__esModule",{value:!0}),ka.asap=ka.asapScheduler=void 0,ka.asapScheduler=new ia.AsapScheduler(l.AsapAction),ka.asap=ka.asapScheduler;var Ba,ia={},ka=(l=ia,Object.defineProperty(l,"__esModule",{value:!0}),l.async=l.asyncScheduler=void 0,l.asyncScheduler=new ua.AsyncScheduler(oa.AsyncAction),l.async=l.asyncScheduler,{}),l={},Wa=r&&r.__extends||(Ba=function(e,t){return(Ba=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Ba(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(l,"__esModule",{value:!0}),l.QueueAction=void 0;za=oa.AsyncAction,Wa(qa,za),qa.prototype.schedule=function(e,t){return 0<(t=void 0===t?0:t)?za.prototype.schedule.call(this,e,t):(this.delay=t,this.state=e,this.scheduler.flush(this),this)},qa.prototype.execute=function(e,t){return 0<t||this.closed?za.prototype.execute.call(this,e,t):this._execute(e,t)},qa.prototype.requestAsyncId=function(e,t,r){return null!=(r=void 0===r?0:r)&&0<r||null==r&&0<this.delay?za.prototype.requestAsyncId.call(this,e,t,r):(e.flush(this),0)};var za,Wa=qa;function qa(e,t){var r=za.call(this,e,t)||this;return r.scheduler=e,r.work=t,r}l.QueueAction=Wa;var Va,Wa={},Ha=r&&r.__extends||(Va=function(e,t){return(Va=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Va(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(Wa,"__esModule",{value:!0}),Wa.QueueScheduler=void 0;Ga=ua.AsyncScheduler,Ha(Ya,Ga);var Ga,Ha=Ya;function Ya(){return null!==Ga&&Ga.apply(this,arguments)||this}Wa.QueueScheduler=Ha,Ha=ka,Object.defineProperty(Ha,"__esModule",{value:!0}),Ha.queue=Ha.queueScheduler=void 0,Ha.queueScheduler=new Wa.QueueScheduler(l.QueueAction),Ha.queue=Ha.queueScheduler;var Ka,Wa={},l={},Ha=r&&r.__extends||(Ka=function(e,t){return(Ka=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Ka(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(l,"__esModule",{value:!0}),l.AnimationFrameAction=void 0;var Za,Qa=s,s=(Za=oa.AsyncAction,Ha(Xa,Za),Xa.prototype.requestAsyncId=function(e,t,r){return null!==(r=void 0===r?0:r)&&0<r?Za.prototype.requestAsyncId.call(this,e,t,r):(e.actions.push(this),e._scheduled||(e._scheduled=Qa.animationFrameProvider.requestAnimationFrame(function(){return e.flush(void 0)})))},Xa.prototype.recycleAsyncId=function(e,t,r){if(null!=(r=void 0===r?0:r)?0<r:0<this.delay)return Za.prototype.recycleAsyncId.call(this,e,t,r);var r=e.actions;null!=t&&(null==(r=r[r.length-1])?void 0:r.id)!==t&&(Qa.animationFrameProvider.cancelAnimationFrame(t),e._scheduled=void 0)},Xa);function Xa(e,t){var r=Za.call(this,e,t)||this;return r.scheduler=e,r.work=t,r}l.AnimationFrameAction=s;var Ja,Ha={},s=r&&r.__extends||(Ja=function(e,t){return(Ja=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Ja(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(Ha,"__esModule",{value:!0}),Ha.AnimationFrameScheduler=void 0;$a=ua.AsyncScheduler,s(es,$a),es.prototype.flush=function(e){this._active=!0;var t,r=this._scheduled,n=(this._scheduled=void 0,this.actions);e=e||n.shift();do{if(t=e.execute(e.state,e.delay))break}while((e=n[0])&&e.id===r&&n.shift());if(this._active=!1,t){for(;(e=n[0])&&e.id===r&&n.shift();)e.unsubscribe();throw t}};var $a,s=es;function es(){return null!==$a&&$a.apply(this,arguments)||this}Ha.AnimationFrameScheduler=s,s=Wa,Object.defineProperty(s,"__esModule",{value:!0}),s.animationFrame=s.animationFrameScheduler=void 0,s.animationFrameScheduler=new Ha.AnimationFrameScheduler(l.AnimationFrameAction),s.animationFrame=s.animationFrameScheduler;var ts,rs,Ha={},l=r&&r.__extends||(ts=function(e,t){return(ts=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}ts(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),s=(Object.defineProperty(Ha,"__esModule",{value:!0}),Ha.VirtualAction=Ha.VirtualTimeScheduler=void 0,oa),ns=b,oa=(rs=ua.AsyncScheduler,l(os,rs),os.prototype.flush=function(){for(var e,t,r=this.actions,n=this.maxFrames;(t=r[0])&&t.delay<=n&&(r.shift(),this.frame=t.delay,!(e=t.execute(t.state,t.delay))););if(e){for(;t=r.shift();)t.unsubscribe();throw e}},os.frameTimeFactor=10,os);function os(e,t){void 0===t&&(t=1/0);var r=rs.call(this,e=void 0===e?us:e,function(){return r.frame})||this;return r.maxFrames=t,r.frame=0,r.index=-1,r}Ha.VirtualTimeScheduler=oa;is=s.AsyncAction,l(as,is),as.prototype.schedule=function(e,t){if(void 0===t&&(t=0),Number.isFinite(t)){if(!this.id)return is.prototype.schedule.call(this,e,t);this.active=!1;var r=new as(this.scheduler,this.work);return this.add(r),r.schedule(e,t)}return ns.Subscription.EMPTY},as.prototype.requestAsyncId=function(e,t,r){this.delay=e.frame+(r=void 0===r?0:r);r=e.actions;return r.push(this),r.sort(as.sortActions),1},as.prototype.recycleAsyncId=function(e,t,r){},as.prototype._execute=function(e,t){if(!0===this.active)return is.prototype._execute.call(this,e,t)},as.sortActions=function(e,t){return e.delay===t.delay?e.index===t.index?0:e.index>t.index?1:-1:e.delay>t.delay?1:-1};var is,us=as;function as(e,t,r){void 0===r&&(r=e.index+=1);var n=is.call(this,e,t)||this;return n.scheduler=e,n.work=t,n.index=r,n.active=!0,n.index=e.index=r,n}Ha.VirtualAction=us;var ss,cs,ua={},oa={},s=(ss=oa,Object.defineProperty(ss,"__esModule",{value:!0}),ss.empty=ss.EMPTY=void 0,cs=o,ss.EMPTY=new cs.Observable(function(e){return e.complete()}),ss.empty=function(e){return e?(t=e,new cs.Observable(function(e){return t.schedule(function(){return e.complete()})})):ss.EMPTY;var t},{}),l={},ls={},fs=(Object.defineProperty(ls,"__esModule",{value:!0}),ls.isScheduler=void 0,y);ls.isScheduler=function(e){return e&&fs.isFunction(e.schedule)},Object.defineProperty(l,"__esModule",{value:!0}),l.popNumber=l.popScheduler=l.popResultSelector=void 0;var ps=y,ds=ls;function hs(e){return e[e.length-1]}l.popResultSelector=function(e){return ps.isFunction(hs(e))?e.pop():void 0},l.popScheduler=function(e){return ds.isScheduler(hs(e))?e.pop():void 0},l.popNumber=function(e,t){return"number"==typeof hs(e)?e.pop():t};var bs={},ys={},_s={},T={},vs={},ms=(Object.defineProperty(vs,"__esModule",{value:!0}),vs.isArrayLike=void 0,vs.isArrayLike=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e},{}),gs=(Object.defineProperty(ms,"__esModule",{value:!0}),ms.isPromise=void 0,y);ms.isPromise=function(e){return gs.isFunction(null==e?void 0:e.then)};var Os={},ws=(Object.defineProperty(Os,"__esModule",{value:!0}),Os.isInteropObservable=void 0,p),Es=y;Os.isInteropObservable=function(e){return Es.isFunction(e[ws.observable])};var Ps={},Ss=(Object.defineProperty(Ps,"__esModule",{value:!0}),Ps.isAsyncIterable=void 0,y);Ps.isAsyncIterable=function(e){return Symbol.asyncIterator&&Ss.isFunction(null==e?void 0:e[Symbol.asyncIterator])};var Ts={};Object.defineProperty(Ts,"__esModule",{value:!0}),Ts.createInvalidObservableTypeError=void 0,Ts.createInvalidObservableTypeError=function(e){return new TypeError("You provided "+(null!==e&&"object"==typeof e?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")};var js={},Cs={};function Is(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}Object.defineProperty(Cs,"__esModule",{value:!0}),Cs.iterator=Cs.getSymbolIterator=void 0,Cs.getSymbolIterator=Is,Cs.iterator=Is(),Object.defineProperty(js,"__esModule",{value:!0}),js.isIterable=void 0;var Rs=Cs,ks=y;js.isIterable=function(e){return ks.isFunction(null==e?void 0:e[Rs.iterator])};var As={},Ms=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},Ns=r&&r.__await||function(e){return this instanceof Ns?(this.v=e,this):new Ns(e)},xs=r&&r.__asyncGenerator||function(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var o=r.apply(e,t||[]),i=[],u={};return n("next"),n("throw"),n("return"),u[Symbol.asyncIterator]=function(){return this},u;function n(n){o[n]&&(u[n]=function(r){return new Promise(function(e,t){1<i.push([n,r,e,t])||a(n,r)})})}function a(e,t){try{(r=o[e](t)).value instanceof Ns?Promise.resolve(r.value.v).then(s,c):l(i[0][2],r)}catch(e){l(i[0][3],e)}var r}function s(e){a("next",e)}function c(e){a("throw",e)}function l(e,t){e(t),i.shift(),i.length&&a(i[0][0],i[0][1])}},Ds=(Object.defineProperty(As,"__esModule",{value:!0}),As.isReadableStreamLike=As.readableStreamLikeToAsyncGenerator=void 0,y);As.readableStreamLikeToAsyncGenerator=function(o){return xs(this,arguments,function(){var t,r,n;return Ms(this,function(e){switch(e.label){case 0:t=o.getReader(),e.label=1;case 1:e.trys.push([1,,9,10]),e.label=2;case 2:return[4,Ns(t.read())];case 3:return(r=e.sent(),n=r.value,r.done)?[4,Ns(void 0)]:[3,5];case 4:return[2,e.sent()];case 5:return[4,Ns(n)];case 6:return[4,e.sent()];case 7:return e.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})},As.isReadableStreamLike=function(e){return Ds.isFunction(null==e?void 0:e.getReader)};var Us=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},Ls=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},Fs=r&&r.__asyncValues||function(u){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,t=u[Symbol.asyncIterator];return t?t.call(u):(u="function"==typeof Bs?Bs(u):u[Symbol.iterator](),e={},r("next"),r("throw"),r("return"),e[Symbol.asyncIterator]=function(){return this},e);function r(i){e[i]=u[i]&&function(o){return new Promise(function(e,t){var r,n;o=u[i](o),r=e,e=t,n=o.done,t=o.value,Promise.resolve(t).then(function(e){r({value:e,done:n})},e)})}}},Bs=r&&r.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Ws=(Object.defineProperty(T,"__esModule",{value:!0}),T.fromReadableStreamLike=T.fromAsyncIterable=T.fromIterable=T.fromPromise=T.fromArrayLike=T.fromInteropObservable=T.innerFrom=void 0,vs),zs=ms,qs=o,Vs=Os,Hs=Ps,Gs=Ts,Ys=js,Ks=As,Zs=y,Qs=_,Xs=p;function Js(r){return new qs.Observable(function(e){var t=r[Xs.observable]();if(Zs.isFunction(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function $s(r){return new qs.Observable(function(e){for(var t=0;t<r.length&&!e.closed;t++)e.next(r[t]);e.complete()})}function ec(e){return new qs.Observable(function(t){e.then(function(e){t.closed||(t.next(e),t.complete())},function(e){return t.error(e)}).then(null,Qs.reportUnhandledError)})}function tc(u){return new qs.Observable(function(e){var t,r;try{for(var n=Bs(u),o=n.next();!o.done;o=n.next()){var i=o.value;if(e.next(i),e.closed)return}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}e.complete()})}function rc(e){return new qs.Observable(function(t){!function(r,n){var o,i,u,a;return Us(this,void 0,void 0,function(){var t;return Ls(this,function(e){switch(e.label){case 0:e.trys.push([0,5,6,11]),o=Fs(r),e.label=1;case 1:return[4,o.next()];case 2:if((i=e.sent()).done)return[3,4];if(t=i.value,n.next(t),n.closed)return[2];e.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return t=e.sent(),u={error:t},[3,11];case 6:return(e.trys.push([6,,9,10]),i&&!i.done&&(a=o.return))?[4,a.call(o)]:[3,8];case 7:e.sent(),e.label=8;case 8:return[3,10];case 9:if(u)throw u.error;return[7];case 10:return[7];case 11:return n.complete(),[2]}})})}(e,t).catch(function(e){return t.error(e)})})}function nc(e){return rc(Ks.readableStreamLikeToAsyncGenerator(e))}T.innerFrom=function(e){if(e instanceof qs.Observable)return e;if(null!=e){if(Vs.isInteropObservable(e))return Js(e);if(Ws.isArrayLike(e))return $s(e);if(zs.isPromise(e))return ec(e);if(Hs.isAsyncIterable(e))return rc(e);if(Ys.isIterable(e))return tc(e);if(Ks.isReadableStreamLike(e))return nc(e)}throw Gs.createInvalidObservableTypeError(e)},T.fromInteropObservable=Js,T.fromArrayLike=$s,T.fromPromise=ec,T.fromIterable=tc,T.fromAsyncIterable=rc,T.fromReadableStreamLike=nc;var _={},oc={};Object.defineProperty(oc,"__esModule",{value:!0}),oc.executeSchedule=void 0,oc.executeSchedule=function(e,t,r,n,o){if(void 0===n&&(n=0),void 0===o&&(o=!1),t=t.schedule(function(){r(),o?e.add(this.schedule(null,n)):this.unsubscribe()},n),e.add(t),!o)return t},Object.defineProperty(_,"__esModule",{value:!0}),_.observeOn=void 0;var ic=oc,uc=m,ac=O;_.observeOn=function(r,n){return void 0===n&&(n=0),uc.operate(function(e,t){e.subscribe(ac.createOperatorSubscriber(t,function(e){return ic.executeSchedule(t,r,function(){return t.next(e)},n)},function(){return ic.executeSchedule(t,r,function(){return t.complete()},n)},function(e){return ic.executeSchedule(t,r,function(){return t.error(e)},n)}))})};var j={},sc=(Object.defineProperty(j,"__esModule",{value:!0}),j.subscribeOn=void 0,m);j.subscribeOn=function(r,n){return void 0===n&&(n=0),sc.operate(function(e,t){t.add(r.schedule(function(){return e.subscribe(t)},n))})},Object.defineProperty(_s,"__esModule",{value:!0}),_s.scheduleObservable=void 0;var cc=T,lc=_,fc=j;_s.scheduleObservable=function(e,t){return cc.innerFrom(e).pipe(fc.subscribeOn(t),lc.observeOn(t))};var pc={},dc=(Object.defineProperty(pc,"__esModule",{value:!0}),pc.schedulePromise=void 0,T),hc=_,bc=j;pc.schedulePromise=function(e,t){return dc.innerFrom(e).pipe(bc.subscribeOn(t),hc.observeOn(t))};var yc={},_c=(Object.defineProperty(yc,"__esModule",{value:!0}),yc.scheduleArray=void 0,o);yc.scheduleArray=function(r,n){return new _c.Observable(function(e){var t=0;return n.schedule(function(){t===r.length?e.complete():(e.next(r[t++]),e.closed||this.schedule())})})};var vc={},mc=(Object.defineProperty(vc,"__esModule",{value:!0}),vc.scheduleIterable=void 0,o),gc=Cs,Oc=y,wc=oc;vc.scheduleIterable=function(e,t){return new mc.Observable(function(n){var o;return wc.executeSchedule(n,t,function(){o=e[gc.iterator](),wc.executeSchedule(n,t,function(){var e,t,r;try{t=(e=o.next()).value,r=e.done}catch(e){return void n.error(e)}r?n.complete():n.next(t)},0,!0)}),function(){return Oc.isFunction(null==o?void 0:o.return)&&o.return()}})};var Cs={},Ec=(Object.defineProperty(Cs,"__esModule",{value:!0}),Cs.scheduleAsyncIterable=void 0,o),Pc=oc;Cs.scheduleAsyncIterable=function(r,n){if(r)return new Ec.Observable(function(t){Pc.executeSchedule(t,n,function(){var e=r[Symbol.asyncIterator]();Pc.executeSchedule(t,n,function(){e.next().then(function(e){e.done?t.complete():t.next(e.value)})},0,!0)})});throw new Error("Iterable cannot be null")};var Sc={},Tc=(Object.defineProperty(Sc,"__esModule",{value:!0}),Sc.scheduleReadableStreamLike=void 0,Cs),jc=As;Sc.scheduleReadableStreamLike=function(e,t){return Tc.scheduleAsyncIterable(jc.readableStreamLikeToAsyncGenerator(e),t)},Object.defineProperty(ys,"__esModule",{value:!0}),ys.scheduled=void 0;var Cc=_s,Ic=pc,Rc=yc,kc=vc,Ac=Cs,Mc=Os,Nc=ms,xc=vs,Dc=js,Uc=Ps,Lc=Ts,Fc=As,Bc=Sc;ys.scheduled=function(e,t){if(null!=e){if(Mc.isInteropObservable(e))return Cc.scheduleObservable(e,t);if(xc.isArrayLike(e))return Rc.scheduleArray(e,t);if(Nc.isPromise(e))return Ic.schedulePromise(e,t);if(Uc.isAsyncIterable(e))return Ac.scheduleAsyncIterable(e,t);if(Dc.isIterable(e))return kc.scheduleIterable(e,t);if(Fc.isReadableStreamLike(e))return Bc.scheduleReadableStreamLike(e,t)}throw Lc.createInvalidObservableTypeError(e)},Object.defineProperty(bs,"__esModule",{value:!0}),bs.from=void 0;var Wc=ys,zc=T;bs.from=function(e,t){return t?Wc.scheduled(e,t):zc.innerFrom(e)},Object.defineProperty(s,"__esModule",{value:!0}),s.of=void 0;var qc=l,Vc=bs;s.of=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=qc.popScheduler(e);return Vc.from(e,r)};var Hc,Gc,Yc,Kc,_s={},Zc=(Object.defineProperty(_s,"__esModule",{value:!0}),_s.throwError=void 0,o),Qc=y;function Xc(e,t,r){this.kind=e,this.value=t,this.error=r,this.hasValue="N"===e}function Jc(e,t){var r,n=e.kind,o=e.value,e=e.error;if("string"!=typeof n)throw new TypeError('Invalid notification, missing "kind"');"N"===n?null!=(r=t.next)&&r.call(t,o):"E"===n?null!=(r=t.error)&&r.call(t,e):null!=(o=t.complete)&&o.call(t)}_s.throwError=function(e,t){function r(e){return e.error(n())}var n=Qc.isFunction(e)?e:function(){return e};return new Zc.Observable(t?function(e){return t.schedule(r,0,e)}:r)},pc=ua,Object.defineProperty(pc,"__esModule",{value:!0}),pc.observeNotification=pc.Notification=pc.NotificationKind=void 0,Hc=oa,Gc=s,Yc=_s,Kc=y,(yc=pc.NotificationKind||(pc.NotificationKind={})).NEXT="N",yc.ERROR="E",yc.COMPLETE="C",Xc.prototype.observe=function(e){return Jc(this,e)},Xc.prototype.do=function(e,t,r){var n=this.kind,o=this.value,i=this.error;return"N"===n?null==e?void 0:e(o):"E"===n?null==t?void 0:t(i):null==r?void 0:r()},Xc.prototype.accept=function(e,t,r){var n;return Kc.isFunction(null==(n=e)?void 0:n.next)?this.observe(e):this.do(e,t,r)},Xc.prototype.toObservable=function(){var e=this.kind,t=this.value,r=this.error,t="N"===e?Gc.of(t):"E"===e?Yc.throwError(function(){return r}):"C"===e?Hc.EMPTY:0;if(t)return t;throw new TypeError("Unexpected notification kind "+e)},Xc.createNext=function(e){return new Xc("N",e)},Xc.createError=function(e){return new Xc("E",void 0,e)},Xc.createComplete=function(){return Xc.completeNotification},Xc.completeNotification=new Xc("C"),yc=Xc,pc.Notification=yc,pc.observeNotification=Jc;var Cs={},$c=(Object.defineProperty(Cs,"__esModule",{value:!0}),Cs.isObservable=void 0,o),el=y;Cs.isObservable=function(e){return!!e&&(e instanceof $c.Observable||el.isFunction(e.lift)&&el.isFunction(e.subscribe))};var Os={},ms={},js=(Object.defineProperty(ms,"__esModule",{value:!0}),ms.EmptyError=void 0,E),tl=(ms.EmptyError=js.createErrorClass(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}}),Object.defineProperty(Os,"__esModule",{value:!0}),Os.lastValueFrom=void 0,ms);Os.lastValueFrom=function(o,i){var u="object"==typeof i;return new Promise(function(e,t){var r,n=!1;o.subscribe({next:function(e){r=e,n=!0},error:t,complete:function(){n?e(r):u?e(i.defaultValue):t(new tl.EmptyError)}})})};var Ps={},rl=(Object.defineProperty(Ps,"__esModule",{value:!0}),Ps.firstValueFrom=void 0,ms),nl=P;Ps.firstValueFrom=function(n,o){var i="object"==typeof o;return new Promise(function(t,e){var r=new nl.SafeSubscriber({next:function(e){t(e),r.unsubscribe()},error:e,complete:function(){i?t(o.defaultValue):e(new rl.EmptyError)}});n.subscribe(r)})};var ol,il,ul,al,sl,cl,ll,Ts={},As=(Object.defineProperty(Ts,"__esModule",{value:!0}),Ts.ArgumentOutOfRangeError=void 0,E),Sc=(Ts.ArgumentOutOfRangeError=As.createErrorClass(function(e){return function(){e(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}}),{}),yc=(Object.defineProperty(Sc,"__esModule",{value:!0}),Sc.NotFoundError=void 0,E),pc=(Sc.NotFoundError=yc.createErrorClass(function(t){return function(e){t(this),this.name="NotFoundError",this.message=e}}),{}),js=(Object.defineProperty(pc,"__esModule",{value:!0}),pc.SequenceError=void 0,E),As=(pc.SequenceError=js.createErrorClass(function(t){return function(e){t(this),this.name="SequenceError",this.message=e}}),{}),yc={};function fl(e){throw new ol.TimeoutError(e)}Object.defineProperty(yc,"__esModule",{value:!0}),yc.isValidDate=void 0,yc.isValidDate=function(e){return e instanceof Date&&!isNaN(e)},ol=As,Object.defineProperty(ol,"__esModule",{value:!0}),ol.timeout=ol.TimeoutError=void 0,il=ia,ul=yc,al=m,sl=T,cl=O,ll=oc,ol.TimeoutError=E.createErrorClass(function(t){return function(e){void 0===e&&(e=null),t(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=e}}),ol.timeout=function(e,t){var a=(e=ul.isValidDate(e)?{first:e}:"number"==typeof e?{each:e}:e).first,s=e.each,r=e.with,c=void 0===r?fl:r,l=void 0===(r=e.scheduler)?null!=t?t:il.asyncScheduler:r,f=void 0===(t=e.meta)?null:t;if(null==a&&null==s)throw new TypeError("No timeout provided.");return al.operate(function(e,t){function r(e){n=ll.executeSchedule(t,l,function(){try{u.unsubscribe(),sl.innerFrom(c({meta:f,lastValue:o,seen:i})).subscribe(t)}catch(e){t.error(e)}},e)}var n,o=null,i=0,u=e.subscribe(cl.createOperatorSubscriber(t,function(e){null!=n&&n.unsubscribe(),i++,t.next(o=e),0<s&&r(s)},void 0,void 0,function(){null!=n&&n.closed||null!=n&&n.unsubscribe(),o=null}));i||r(null!=a?"number"==typeof a?a:+a-l.now():s)})};var js={},E={},pl={},dl={},hl=(Object.defineProperty(dl,"__esModule",{value:!0}),dl.map=void 0,m),bl=O;dl.map=function(n,o){return hl.operate(function(e,t){var r=0;e.subscribe(bl.createOperatorSubscriber(t,function(e){t.next(n.call(o,e,r++))}))})};var yl=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},_l=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},vl=(Object.defineProperty(pl,"__esModule",{value:!0}),pl.mapOneOrManyArgs=void 0,dl),ml=Array.isArray;pl.mapOneOrManyArgs=function(r){return vl.map(function(e){return t=r,ml(e=e)?t.apply(void 0,_l([],yl(e))):t(e);var t})};var gl=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Ol=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},wl=(Object.defineProperty(E,"__esModule",{value:!0}),E.bindCallbackInternals=void 0,ls),El=o,Pl=j,Sl=pl,Tl=_,jl=X;E.bindCallbackInternals=function r(a,s,n,o){if(n){if(!wl.isScheduler(n))return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r(a,s,o).apply(this,e).pipe(Sl.mapOneOrManyArgs(n))};o=n}return o?function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r(a,s).apply(this,e).pipe(Pl.subscribeOn(o),Tl.observeOn(o))}:function(){for(var t=this,r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var i=new jl.AsyncSubject,u=!0;return new El.Observable(function(e){var n,o,e=i.subscribe(e);return u&&(n=u=!1,o=!1,s.apply(t,Ol(Ol([],gl(r)),[function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(a){var r=e.shift();if(null!=r)return void i.error(r)}i.next(1<e.length?e:e[0]),o=!0,n&&i.complete()}])),o&&i.complete(),n=!0),e})}},Object.defineProperty(js,"__esModule",{value:!0}),js.bindCallback=void 0;var Cl=E;js.bindCallback=function(e,t,r){return Cl.bindCallbackInternals(!1,e,t,r)};var Il={},Rl=(Object.defineProperty(Il,"__esModule",{value:!0}),Il.bindNodeCallback=void 0,E);Il.bindNodeCallback=function(e,t,r){return Rl.bindCallbackInternals(!0,e,t,r)};var E={},kl={},Al=(Object.defineProperty(kl,"__esModule",{value:!0}),kl.argsArgArrayOrObject=void 0,Array.isArray),Ml=Object.getPrototypeOf,Nl=Object.prototype,xl=Object.keys;kl.argsArgArrayOrObject=function(e){if(1===e.length){var t=e[0];if(Al(t))return{args:t,keys:null};if((r=t)&&"object"==typeof r&&Ml(r)===Nl)return{args:(r=xl(t)).map(function(e){return t[e]}),keys:r}}var r;return{args:e,keys:null}};var Dl={};Object.defineProperty(Dl,"__esModule",{value:!0}),Dl.createObject=void 0,Dl.createObject=function(e,n){return e.reduce(function(e,t,r){return e[t]=n[r],e},{})},Object.defineProperty(E,"__esModule",{value:!0}),E.combineLatestInit=E.combineLatest=void 0;var Ul=o,Ll=kl,Fl=bs,Bl=S,Wl=pl,zl=l,ql=Dl,Vl=O,Hl=oc;function Gl(a,s,c){return void 0===c&&(c=Bl.identity),function(u){Yl(s,function(){for(var e=a.length,n=new Array(e),o=e,i=e,t=0;t<e;t++)!function(r){Yl(s,function(){var e=Fl.from(a[r],s),t=!1;e.subscribe(Vl.createOperatorSubscriber(u,function(e){n[r]=e,t||(t=!0,i--),i||u.next(c(n.slice()))},function(){--o||u.complete()}))},u)}(t)},u)}}function Yl(e,t,r){e?Hl.executeSchedule(r,e,t):t()}E.combineLatest=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=zl.popScheduler(e),n=zl.popResultSelector(e),o=Ll.argsArgArrayOrObject(e),i=o.args,u=o.keys;return 0===i.length?Fl.from([],r):(o=new Ul.Observable(Gl(i,r,u?function(e){return ql.createObject(u,e)}:Bl.identity)),n?o.pipe(Wl.mapOneOrManyArgs(n)):o)},E.combineLatestInit=Gl;var Kl={},Zl={},Ql={},Xl={},Jl={},$l=(Object.defineProperty(Jl,"__esModule",{value:!0}),Jl.mergeInternals=void 0,T),ef=oc,tf=O;Jl.mergeInternals=function(e,r,n,o,i,u,a,t){var s=[],c=0,l=0,f=function(){s.length||c||r.complete()},p=function(e){return c<o?d(e):s.push(e)},d=function(e){u&&r.next(e),c++;var t=!1;$l.innerFrom(n(e,l++)).subscribe(tf.createOperatorSubscriber(r,function(e){null!=i&&i(e),u?p(e):r.next(e)},function(){t=!0},void 0,function(){if(t)try{c--;for(;s.length&&c<o;)!function(){var e=s.shift();a?ef.executeSchedule(r,a,function(){return d(e)}):d(e)}();f()}catch(e){r.error(e)}}))};return e.subscribe(tf.createOperatorSubscriber(r,p,function(){f()})),function(){null!=t&&t()}},Object.defineProperty(Xl,"__esModule",{value:!0}),Xl.mergeMap=void 0;var rf=dl,nf=T,of=m,uf=Jl,af=y;Xl.mergeMap=function e(o,i,r){return void 0===r&&(r=1/0),af.isFunction(i)?e(function(r,n){return rf.map(function(e,t){return i(r,e,n,t)})(nf.innerFrom(o(r,n)))},r):("number"==typeof i&&(r=i),of.operate(function(e,t){return uf.mergeInternals(e,t,o,r)}))},Object.defineProperty(Ql,"__esModule",{value:!0}),Ql.mergeAll=void 0;var sf=Xl,cf=S;Ql.mergeAll=function(e){return sf.mergeMap(cf.identity,e=void 0===e?1/0:e)},Object.defineProperty(Zl,"__esModule",{value:!0}),Zl.concatAll=void 0;var lf=Ql;Zl.concatAll=function(){return lf.mergeAll(1)},Object.defineProperty(Kl,"__esModule",{value:!0}),Kl.concat=void 0;var ff=Zl,pf=l,df=bs;Kl.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return ff.concatAll()(df.from(e,pf.popScheduler(e)))};var hf={},bf={},yf=(Object.defineProperty(bf,"__esModule",{value:!0}),bf.defer=void 0,o),_f=T;bf.defer=function(t){return new yf.Observable(function(e){_f.innerFrom(t()).subscribe(e)})},Object.defineProperty(hf,"__esModule",{value:!0}),hf.connectable=void 0;var vf=f,mf=o,gf=bf,Of={connector:function(){return new vf.Subject},resetOnDisconnect:!0};hf.connectable=function(e,t){var r=null,n=(t=void 0===t?Of:t).connector,o=void 0===(t=t.resetOnDisconnect)||t,i=n();return(t=new mf.Observable(function(e){return i.subscribe(e)})).connect=function(){return r&&!r.closed||(r=gf.defer(function(){return e}).subscribe(i),o&&r.add(function(){return i=n()})),r},t};var wf={},Ef=(Object.defineProperty(wf,"__esModule",{value:!0}),wf.forkJoin=void 0,o),Pf=kl,Sf=T,Tf=l,jf=O,Cf=pl,If=Dl;wf.forkJoin=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Tf.popResultSelector(e),u=(n=Pf.argsArgArrayOrObject(e)).args,a=n.keys,n=new Ef.Observable(function(e){var t=u.length;if(t)for(var n=new Array(t),o=t,i=t,r=0;r<t;r++)!function(t){var r=!1;Sf.innerFrom(u[t]).subscribe(jf.createOperatorSubscriber(e,function(e){r||(r=!0,i--),n[t]=e},function(){return o--},void 0,function(){o&&r||(i||e.next(a?If.createObject(a,n):n),e.complete())}))}(r);else e.complete()});return r?n.pipe(Cf.mapOneOrManyArgs(r)):n};var kl={},Rf=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},kf=(Object.defineProperty(kl,"__esModule",{value:!0}),kl.fromEvent=void 0,T),Af=o,Mf=Xl,Nf=vs,xf=y,Df=pl,Uf=["addListener","removeListener"],Lf=["addEventListener","removeEventListener"],Ff=["on","off"];function Bf(r,n){return function(t){return function(e){return r[t](n,e)}}}kl.fromEvent=function t(r,n,o,e){if(xf.isFunction(o)&&(e=o,o=void 0),e)return t(r,n,o).pipe(Df.mapOneOrManyArgs(e));var e=Rf((e=r,xf.isFunction(e.addEventListener)&&xf.isFunction(e.removeEventListener)?Lf.map(function(t){return function(e){return r[t](n,e,o)}}):(e=r,xf.isFunction(e.addListener)&&xf.isFunction(e.removeListener)?Uf.map(Bf(r,n)):(e=r,xf.isFunction(e.on)&&xf.isFunction(e.off)?Ff.map(Bf(r,n)):[]))),2),i=e[0],u=e[1];if(!i&&Nf.isArrayLike(r))return Mf.mergeMap(function(e){return t(e,n,o)})(kf.innerFrom(r));if(i)return new Af.Observable(function(r){function e(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r.next(1<e.length?e:e[0])}return i(e),function(){return u(e)}});throw new TypeError("Invalid event target")};var Dl={},Wf=(Object.defineProperty(Dl,"__esModule",{value:!0}),Dl.fromEventPattern=void 0,o),zf=y,qf=pl;Dl.fromEventPattern=function e(n,o,t){return t?e(n,o).pipe(qf.mapOneOrManyArgs(t)):new Wf.Observable(function(r){function e(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r.next(1===e.length?e[0]:e)}var t=n(e);return zf.isFunction(o)?function(){return o(e,t)}:void 0})};var vs={},Vf=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},Hf=(Object.defineProperty(vs,"__esModule",{value:!0}),vs.generate=void 0,S),Gf=ls,Yf=bf,Kf=vc;vs.generate=function(e,r,n,t,o){var i,u,a;function s(){var t;return Vf(this,function(e){switch(e.label){case 0:t=a,e.label=1;case 1:return r&&!r(t)?[3,4]:[4,u(t)];case 2:e.sent(),e.label=3;case 3:return t=n(t),[3,1];case 4:return[2]}})}return 1===arguments.length?(a=e.initialState,r=e.condition,n=e.iterate,i=e.resultSelector,u=void 0===i?Hf.identity:i,o=e.scheduler):(a=e,!t||Gf.isScheduler(t)?(u=Hf.identity,o=t):u=t),Yf.defer(o?function(){return Kf.scheduleIterable(s(),o)}:s)};var vc={},Zf=(Object.defineProperty(vc,"__esModule",{value:!0}),vc.iif=void 0,bf);vc.iif=function(e,t,r){return Zf.defer(function(){return e()?t:r})};var Qf={},Xf={},Jf=(Object.defineProperty(Xf,"__esModule",{value:!0}),Xf.timer=void 0,o),$f=ia,ep=ls,tp=yc;Xf.timer=function(n,e,o){void 0===n&&(n=0),void 0===o&&(o=$f.async);var i=-1;return null!=e&&(ep.isScheduler(e)?o=e:i=e),new Jf.Observable(function(e){var t=tp.isValidDate(n)?+n-o.now():n,r=0;return o.schedule(function(){e.closed||(e.next(r++),0<=i?this.schedule(void 0,i):e.complete())},t=t<0?0:t)})},Object.defineProperty(Qf,"__esModule",{value:!0}),Qf.interval=void 0;var rp=ia,np=Xf;Qf.interval=function(e,t){return np.timer(e=(e=void 0===e?0:e)<0?0:e,e,t=void 0===t?rp.asyncScheduler:t)};var ls={},op=(Object.defineProperty(ls,"__esModule",{value:!0}),ls.merge=void 0,Ql),ip=T,up=oa,ap=l,sp=bs;ls.merge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=ap.popScheduler(e),n=ap.popNumber(e,1/0),o=e;return o.length?1===o.length?ip.innerFrom(o[0]):op.mergeAll(n)(sp.from(o,r)):up.EMPTY};var cp,lp={},fp=(cp=lp,Object.defineProperty(cp,"__esModule",{value:!0}),cp.never=cp.NEVER=void 0,cp.NEVER=new o.Observable(v.noop),cp.never=function(){return cp.NEVER},{}),pp={},dp=(Object.defineProperty(pp,"__esModule",{value:!0}),pp.argsOrArgArray=void 0,Array.isArray);pp.argsOrArgArray=function(e){return 1===e.length&&dp(e[0])?e[0]:e},Object.defineProperty(fp,"__esModule",{value:!0}),fp.onErrorResumeNext=void 0;var hp=o,bp=pp,yp=O,_p=v,vp=T;fp.onErrorResumeNext=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=bp.argsOrArgArray(e);return new hp.Observable(function(r){var n=0,o=function(){if(n<i.length){var e=void 0;try{e=vp.innerFrom(i[n++])}catch(e){return void o()}var t=new yp.OperatorSubscriber(r,void 0,_p.noop,_p.noop);e.subscribe(t),t.add(o)}else r.complete()};o()})};var mp={},gp=(Object.defineProperty(mp,"__esModule",{value:!0}),mp.pairs=void 0,bs);mp.pairs=function(e,t){return gp.from(Object.entries(e),t)};var Op={},wp={};Object.defineProperty(wp,"__esModule",{value:!0}),wp.not=void 0,wp.not=function(r,n){return function(e,t){return!r.call(n,e,t)}};var Ep={},Pp=(Object.defineProperty(Ep,"__esModule",{value:!0}),Ep.filter=void 0,m),Sp=O;Ep.filter=function(n,o){return Pp.operate(function(e,t){var r=0;e.subscribe(Sp.createOperatorSubscriber(t,function(e){return n.call(o,e,r++)&&t.next(e)}))})},Object.defineProperty(Op,"__esModule",{value:!0}),Op.partition=void 0;var Tp=wp,jp=Ep,Cp=T;Op.partition=function(e,t,r){return[jp.filter(t,r)(Cp.innerFrom(e)),jp.filter(Tp.not(t,r))(Cp.innerFrom(e))]};var Ip={},Rp=(Object.defineProperty(Ip,"__esModule",{value:!0}),Ip.raceInit=Ip.race=void 0,o),kp=T,Ap=pp,Mp=O;function Np(t){return function(n){for(var o=[],e=0;o&&!n.closed&&e<t.length;e++)!function(r){o.push(kp.innerFrom(t[r]).subscribe(Mp.createOperatorSubscriber(n,function(e){if(o){for(var t=0;t<o.length;t++)t!==r&&o[t].unsubscribe();o=null}n.next(e)})))}(e)}}Ip.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 1===(e=Ap.argsOrArgArray(e)).length?kp.innerFrom(e[0]):new Rp.Observable(Np(e))},Ip.raceInit=Np;var xp={},Dp=(Object.defineProperty(xp,"__esModule",{value:!0}),xp.range=void 0,o),Up=oa;xp.range=function(r,e,n){if(null==e&&(e=r,r=0),e<=0)return Up.EMPTY;var o=e+r;return new Dp.Observable(n?function(e){var t=r;return n.schedule(function(){t<o?(e.next(t++),this.schedule()):e.complete()})}:function(e){for(var t=r;t<o&&!e.closed;)e.next(t++);e.complete()})};var Lp={},Fp=(Object.defineProperty(Lp,"__esModule",{value:!0}),Lp.using=void 0,o),Bp=T,Wp=oa;Lp.using=function(n,o){return new Fp.Observable(function(e){var t=n(),r=o(t);return(r?Bp.innerFrom(r):Wp.EMPTY).subscribe(e),function(){t&&t.unsubscribe()}})};var zp={},qp=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Vp=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},Hp=(Object.defineProperty(zp,"__esModule",{value:!0}),zp.zip=void 0,o),Gp=T,Yp=pp,Kp=oa,Zp=O,Qp=l;zp.zip=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=Qp.popResultSelector(e),u=Yp.argsOrArgArray(e);return u.length?new Hp.Observable(function(r){for(var n=u.map(function(){return[]}),o=u.map(function(){return!1}),e=(r.add(function(){n=o=null}),0);!r.closed&&e<u.length;e++)!function(t){Gp.innerFrom(u[t]).subscribe(Zp.createOperatorSubscriber(r,function(e){n[t].push(e),n.every(function(e){return e.length})&&(e=n.map(function(e){return e.shift()}),r.next(i?i.apply(void 0,Vp([],qp(e))):e),n.some(function(e,t){return!e.length&&o[t]})&&r.complete())},function(){o[t]=!0,n[t].length||r.complete()}))}(e);return function(){n=o=null}}):Kp.EMPTY};var Xp={},Jp=(Object.defineProperty(Xp,"__esModule",{value:!0}),{}),$p=(Object.defineProperty(Jp,"__esModule",{value:!0}),Jp.audit=void 0,m),ed=T,td=O;Jp.audit=function(s){return $p.operate(function(e,t){function r(){var e;null!=u&&u.unsubscribe(),u=null,o&&(o=!1,e=i,i=null,t.next(e)),a&&t.complete()}function n(){u=null,a&&t.complete()}var o=!1,i=null,u=null,a=!1;e.subscribe(td.createOperatorSubscriber(t,function(e){o=!0,i=e,u||ed.innerFrom(s(e)).subscribe(u=td.createOperatorSubscriber(t,r,n))},function(){a=!0,o&&u&&!u.closed||t.complete()}))})};var rd={},nd=(Object.defineProperty(rd,"__esModule",{value:!0}),rd.auditTime=void 0,ia),od=Jp,id=Xf;rd.auditTime=function(e,t){return void 0===t&&(t=nd.asyncScheduler),od.audit(function(){return id.timer(e,t)})};var ud={},ad=(Object.defineProperty(ud,"__esModule",{value:!0}),ud.buffer=void 0,m),sd=v,cd=O,ld=T;ud.buffer=function(n){return ad.operate(function(e,t){var r=[];return e.subscribe(cd.createOperatorSubscriber(t,function(e){return r.push(e)},function(){t.next(r),t.complete()})),ld.innerFrom(n).subscribe(cd.createOperatorSubscriber(t,function(){var e=r;r=[],t.next(e)},sd.noop)),function(){r=null}})};var fd={},pd=r&&r.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},dd=(Object.defineProperty(fd,"__esModule",{value:!0}),fd.bufferCount=void 0,m),hd=O,bd=Q;fd.bufferCount=function(h,b){return b=null!=(b=void 0===b?null:b)?b:h,dd.operate(function(e,f){var p=[],d=0;e.subscribe(hd.createOperatorSubscriber(f,function(e){var t,r,n,o,i=null;d++%b==0&&p.push([]);try{for(var u=pd(p),a=u.next();!a.done;a=u.next())(l=a.value).push(e),h<=l.length&&(i=null!=i?i:[]).push(l)}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=u.return)&&r.call(u)}finally{if(t)throw t.error}}if(i)try{for(var s=pd(i),c=s.next();!c.done;c=s.next()){var l=c.value;bd.arrRemove(p,l),f.next(l)}}catch(e){n={error:e}}finally{try{c&&!c.done&&(o=s.return)&&o.call(s)}finally{if(n)throw n.error}}},function(){var t,e;try{for(var r=pd(p),n=r.next();!n.done;n=r.next()){var o=n.value;f.next(o)}}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}f.complete()},void 0,function(){p=null}))})};var yd={},_d=r&&r.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},vd=(Object.defineProperty(yd,"__esModule",{value:!0}),yd.bufferTime=void 0,b),md=m,gd=O,Od=Q,wd=ia,Ed=l,Pd=oc;yd.bufferTime=function(i){for(var e,t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var u=null!=(e=Ed.popScheduler(t))?e:wd.asyncScheduler,a=null!=(e=t[0])?e:null,l=t[1]||1/0;return md.operate(function(e,r){var s=[],n=!1,c=function(e){var t=e.buffer;e.subs.unsubscribe(),Od.arrRemove(s,e),r.next(t),n&&o()},o=function(){var e,t;s&&(e=new vd.Subscription,r.add(e),s.push(t={buffer:[],subs:e}),Pd.executeSchedule(e,u,function(){return c(t)},i))},t=(null!==a&&0<=a?Pd.executeSchedule(r,u,o,a,!0):n=!0,o(),gd.createOperatorSubscriber(r,function(e){var t,r,n=s.slice();try{for(var o=_d(n),i=o.next();!i.done;i=o.next()){var u=i.value,a=u.buffer;a.push(e),l<=a.length&&c(u)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}},function(){for(;null!=s&&s.length;)r.next(s.shift().buffer);null!=t&&t.unsubscribe(),r.complete(),r.unsubscribe()},void 0,function(){return s=null}));e.subscribe(t)})};var Sd={},Td=r&&r.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},jd=(Object.defineProperty(Sd,"__esModule",{value:!0}),Sd.bufferToggle=void 0,b),Cd=m,Id=T,Rd=O,kd=v,Ad=Q;Sd.bufferToggle=function(t,o){return Cd.operate(function(e,n){var i=[];Id.innerFrom(t).subscribe(Rd.createOperatorSubscriber(n,function(e){var t=[],r=(i.push(t),new jd.Subscription);r.add(Id.innerFrom(o(e)).subscribe(Rd.createOperatorSubscriber(n,function(){Ad.arrRemove(i,t),n.next(t),r.unsubscribe()},kd.noop)))},kd.noop)),e.subscribe(Rd.createOperatorSubscriber(n,function(e){var t,r;try{for(var n=Td(i),o=n.next();!o.done;o=n.next())o.value.push(e)}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}},function(){for(;0<i.length;)n.next(i.shift());n.complete()}))})};var Md={},Nd=(Object.defineProperty(Md,"__esModule",{value:!0}),Md.bufferWhen=void 0,m),xd=v,Dd=O,Ud=T;Md.bufferWhen=function(i){return Nd.operate(function(e,t){var r=null,n=null,o=function(){null!=n&&n.unsubscribe();var e=r;r=[],e&&t.next(e),Ud.innerFrom(i()).subscribe(n=Dd.createOperatorSubscriber(t,o,xd.noop))};o(),e.subscribe(Dd.createOperatorSubscriber(t,function(e){return null==r?void 0:r.push(e)},function(){r&&t.next(r),t.complete()},void 0,function(){return r=n=null}))})};var Ld={},Fd=(Object.defineProperty(Ld,"__esModule",{value:!0}),Ld.catchError=void 0,T),Bd=O,Wd=m;Ld.catchError=function u(a){return Wd.operate(function(t,r){var n,o=null,i=!1,o=t.subscribe(Bd.createOperatorSubscriber(r,void 0,void 0,function(e){n=Fd.innerFrom(a(e,u(a)(t))),o?(o.unsubscribe(),o=null,n.subscribe(r)):i=!0}));i&&(o.unsubscribe(),o=null,n.subscribe(r))})};var zd={},qd={},C={},Vd={},Hd={},Gd={},Yd=(Object.defineProperty(Gd,"__esModule",{value:!0}),Gd.scanInternals=void 0,O);Gd.scanInternals=function(u,t,a,s,c){return function(e,r){var n=a,o=t,i=0;e.subscribe(Yd.createOperatorSubscriber(r,function(e){var t=i++;o=n?u(o,e,t):(n=!0,e),s&&r.next(o)},c&&function(){n&&r.next(o),r.complete()}))}},Object.defineProperty(Hd,"__esModule",{value:!0}),Hd.reduce=void 0;var Kd=Gd,Zd=m;Hd.reduce=function(e,t){return Zd.operate(Kd.scanInternals(e,t,2<=arguments.length,!1,!0))},Object.defineProperty(Vd,"__esModule",{value:!0}),Vd.toArray=void 0;function Qd(e,t){return e.push(t),e}var Xd=Hd,Jd=m;Vd.toArray=function(){return Jd.operate(function(e,t){Xd.reduce(Qd,[])(e).subscribe(t)})},Object.defineProperty(C,"__esModule",{value:!0}),C.joinAllInternals=void 0;var $d=S,eh=pl,th=n,rh=Xl,nh=Vd;C.joinAllInternals=function(t,e){return th.pipe(nh.toArray(),rh.mergeMap(function(e){return t(e)}),e?eh.mapOneOrManyArgs(e):$d.identity)},Object.defineProperty(qd,"__esModule",{value:!0}),qd.combineLatestAll=void 0;var oh=E,ih=C;qd.combineLatestAll=function(e){return ih.joinAllInternals(oh.combineLatest,e)},Object.defineProperty(zd,"__esModule",{value:!0}),zd.combineAll=void 0;zd.combineAll=qd.combineLatestAll;var uh={},ah={},sh=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},ch=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},lh=(Object.defineProperty(ah,"__esModule",{value:!0}),ah.combineLatest=void 0,E),fh=m,ph=pp,dh=pl,hh=n,bh=l;function yh(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=bh.popResultSelector(r);return t?hh.pipe(yh.apply(void 0,ch([],sh(r))),dh.mapOneOrManyArgs(t)):fh.operate(function(e,t){lh.combineLatestInit(ch([e],sh(ph.argsOrArgArray(r))))(t)})}ah.combineLatest=yh;var _h=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},vh=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},mh=(Object.defineProperty(uh,"__esModule",{value:!0}),uh.combineLatestWith=void 0,ah);uh.combineLatestWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return mh.combineLatest.apply(void 0,vh([],_h(e)))};var pl={},gh=(Object.defineProperty(pl,"__esModule",{value:!0}),pl.concatMap=void 0,Xl),Oh=y;pl.concatMap=function(e,t){return Oh.isFunction(t)?gh.mergeMap(e,t,1):gh.mergeMap(e,1)};var wh={},Eh=(Object.defineProperty(wh,"__esModule",{value:!0}),wh.concatMapTo=void 0,pl),Ph=y;wh.concatMapTo=function(e,t){return Ph.isFunction(t)?Eh.concatMap(function(){return e},t):Eh.concatMap(function(){return e})};var Sh={},Th={},jh=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Ch=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},Ih=(Object.defineProperty(Th,"__esModule",{value:!0}),Th.concat=void 0,m),Rh=Zl,kh=l,Ah=bs;Th.concat=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var n=kh.popScheduler(r);return Ih.operate(function(e,t){Rh.concatAll()(Ah.from(Ch([e],jh(r)),n)).subscribe(t)})};var Mh=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Nh=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},xh=(Object.defineProperty(Sh,"__esModule",{value:!0}),Sh.concatWith=void 0,Th);Sh.concatWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return xh.concat.apply(void 0,Nh([],Mh(e)))};var Dh={},Uh={},Lh=(Object.defineProperty(Uh,"__esModule",{value:!0}),Uh.fromSubscribable=void 0,o);Uh.fromSubscribable=function(t){return new Lh.Observable(function(e){return t.subscribe(e)})},Object.defineProperty(Dh,"__esModule",{value:!0}),Dh.connect=void 0;var Fh=f,Bh=T,Wh=m,zh=Uh,qh={connector:function(){return new Fh.Subject}};Dh.connect=function(n,e){var o=(e=void 0===e?qh:e).connector;return Wh.operate(function(e,t){var r=o();Bh.innerFrom(n(zh.fromSubscribable(r))).subscribe(t),t.add(e.subscribe(r))})};var Uh={},Vh=(Object.defineProperty(Uh,"__esModule",{value:!0}),Uh.count=void 0,Hd);Uh.count=function(n){return Vh.reduce(function(e,t,r){return!n||n(t,r)?e+1:e},0)};var Hh={},Gh=(Object.defineProperty(Hh,"__esModule",{value:!0}),Hh.debounce=void 0,m),Yh=v,Kh=O,Zh=T;Hh.debounce=function(u){return Gh.operate(function(e,t){function r(){var e;null!=i&&i.unsubscribe(),i=null,n&&(n=!1,e=o,o=null,t.next(e))}var n=!1,o=null,i=null;e.subscribe(Kh.createOperatorSubscriber(t,function(e){null!=i&&i.unsubscribe(),n=!0,o=e,i=Kh.createOperatorSubscriber(t,r,Yh.noop),Zh.innerFrom(u(e)).subscribe(i)},function(){r(),t.complete()},void 0,function(){o=i=null}))})};var I={},Qh=(Object.defineProperty(I,"__esModule",{value:!0}),I.debounceTime=void 0,ia),Xh=m,Jh=O;I.debounceTime=function(a,s){return void 0===s&&(s=Qh.asyncScheduler),Xh.operate(function(e,r){var n=null,t=null,o=null,i=function(){var e;n&&(n.unsubscribe(),e=t,t=n=null,r.next(e))};function u(){var e=o+a,t=s.now();if(t<e)return n=this.schedule(void 0,e-t),void r.add(n);i()}e.subscribe(Jh.createOperatorSubscriber(r,function(e){t=e,o=s.now(),n||(n=s.schedule(u,a),r.add(n))},function(){i(),r.complete()},void 0,function(){t=n=null}))})};var $h={},eb=(Object.defineProperty($h,"__esModule",{value:!0}),$h.defaultIfEmpty=void 0,m),tb=O;$h.defaultIfEmpty=function(n){return eb.operate(function(e,t){var r=!1;e.subscribe(tb.createOperatorSubscriber(t,function(e){r=!0,t.next(e)},function(){r||t.next(n),t.complete()}))})};var rb={},nb={},ob={},ib=(Object.defineProperty(ob,"__esModule",{value:!0}),ob.take=void 0,oa),ub=m,ab=O;ob.take=function(n){return n<=0?function(){return ib.EMPTY}:ub.operate(function(e,t){var r=0;e.subscribe(ab.createOperatorSubscriber(t,function(e){++r<=n&&(t.next(e),n<=r&&t.complete())}))})};var sb={},cb=(Object.defineProperty(sb,"__esModule",{value:!0}),sb.ignoreElements=void 0,m),lb=O,fb=v;sb.ignoreElements=function(){return cb.operate(function(e,t){e.subscribe(lb.createOperatorSubscriber(t,fb.noop))})};var pb={},db=(Object.defineProperty(pb,"__esModule",{value:!0}),pb.mapTo=void 0,dl);pb.mapTo=function(e){return db.map(function(){return e})},Object.defineProperty(nb,"__esModule",{value:!0}),nb.delayWhen=void 0;var hb=Kl,bb=ob,yb=sb,_b=pb,vb=Xl,mb=T;nb.delayWhen=function t(r,n){return n?function(e){return hb.concat(n.pipe(bb.take(1),yb.ignoreElements()),e.pipe(t(r)))}:vb.mergeMap(function(e,t){return mb.innerFrom(r(e,t)).pipe(bb.take(1),_b.mapTo(e))})},Object.defineProperty(rb,"__esModule",{value:!0}),rb.delay=void 0;var gb=ia,Ob=nb,wb=Xf;rb.delay=function(e,t){var r=wb.timer(e,t=void 0===t?gb.asyncScheduler:t);return Ob.delayWhen(function(){return r})};var Eb={},Pb=(Object.defineProperty(Eb,"__esModule",{value:!0}),Eb.dematerialize=void 0,ua),Sb=m,Tb=O;Eb.dematerialize=function(){return Sb.operate(function(e,t){e.subscribe(Tb.createOperatorSubscriber(t,function(e){return Pb.observeNotification(e,t)}))})};var jb={},Cb=(Object.defineProperty(jb,"__esModule",{value:!0}),jb.distinct=void 0,m),Ib=O,Rb=v,kb=T;jb.distinct=function(o,t){return Cb.operate(function(e,r){var n=new Set;e.subscribe(Ib.createOperatorSubscriber(r,function(e){var t=o?o(e):e;n.has(t)||(n.add(t),r.next(e))})),t&&kb.innerFrom(t).subscribe(Ib.createOperatorSubscriber(r,function(){return n.clear()},Rb.noop))})};var Ab={},Mb=(Object.defineProperty(Ab,"__esModule",{value:!0}),Ab.distinctUntilChanged=void 0,S),Nb=m,xb=O;function Db(e,t){return e===t}Ab.distinctUntilChanged=function(i,u){return void 0===u&&(u=Mb.identity),i=null!=i?i:Db,Nb.operate(function(e,r){var n,o=!0;e.subscribe(xb.createOperatorSubscriber(r,function(e){var t=u(e);!o&&i(n,t)||(o=!1,n=t,r.next(e))}))})};var Ub={},Lb=(Object.defineProperty(Ub,"__esModule",{value:!0}),Ub.distinctUntilKeyChanged=void 0,Ab);Ub.distinctUntilKeyChanged=function(r,n){return Lb.distinctUntilChanged(function(e,t){return n?n(e[r],t[r]):e[r]===t[r]})};var Fb={},Bb={},Wb=(Object.defineProperty(Bb,"__esModule",{value:!0}),Bb.throwIfEmpty=void 0,ms),zb=m,qb=O;function Vb(){return new Wb.EmptyError}Bb.throwIfEmpty=function(n){return void 0===n&&(n=Vb),zb.operate(function(e,t){var r=!1;e.subscribe(qb.createOperatorSubscriber(t,function(e){r=!0,t.next(e)},function(){return r?t.complete():t.error(n())}))})},Object.defineProperty(Fb,"__esModule",{value:!0}),Fb.elementAt=void 0;var Hb=Ts,Gb=Ep,Yb=Bb,Kb=$h,Zb=ob;Fb.elementAt=function(r,t){if(r<0)throw new Hb.ArgumentOutOfRangeError;var n=2<=arguments.length;return function(e){return e.pipe(Gb.filter(function(e,t){return t===r}),Zb.take(1),n?Kb.defaultIfEmpty(t):Yb.throwIfEmpty(function(){return new Hb.ArgumentOutOfRangeError}))}};var Qb={},Xb=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Jb=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},$b=(Object.defineProperty(Qb,"__esModule",{value:!0}),Qb.endWith=void 0,Kl),ey=s;Qb.endWith=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return $b.concat(e,ey.of.apply(void 0,Jb([],Xb(t))))}};var ty={},ry=(Object.defineProperty(ty,"__esModule",{value:!0}),ty.every=void 0,m),ny=O;ty.every=function(o,i){return ry.operate(function(t,r){var n=0;t.subscribe(ny.createOperatorSubscriber(r,function(e){o.call(i,e,n++,t)||(r.next(!1),r.complete())},function(){r.next(!0),r.complete()}))})};var oy={},iy={},uy={},ay=(Object.defineProperty(uy,"__esModule",{value:!0}),uy.exhaustMap=void 0,dl),sy=T,cy=m,ly=O;uy.exhaustMap=function t(i,o){return o?function(e){return e.pipe(t(function(r,n){return sy.innerFrom(i(r,n)).pipe(ay.map(function(e,t){return o(r,e,n,t)}))}))}:cy.operate(function(e,t){var r=0,n=null,o=!1;e.subscribe(ly.createOperatorSubscriber(t,function(e){n||(n=ly.createOperatorSubscriber(t,void 0,function(){n=null,o&&t.complete()}),sy.innerFrom(i(e,r++)).subscribe(n))},function(){o=!0,n||t.complete()}))})},Object.defineProperty(iy,"__esModule",{value:!0}),iy.exhaustAll=void 0;var fy=uy,py=S;iy.exhaustAll=function(){return fy.exhaustMap(py.identity)},Object.defineProperty(oy,"__esModule",{value:!0}),oy.exhaust=void 0;oy.exhaust=iy.exhaustAll;var dy={},hy=(Object.defineProperty(dy,"__esModule",{value:!0}),dy.expand=void 0,m),by=Jl;dy.expand=function(r,n,o){return n=((n=void 0===n?1/0:n)||0)<1?1/0:n,hy.operate(function(e,t){return by.mergeInternals(e,t,r,n,void 0,!0,o)})};var yy={},_y=(Object.defineProperty(yy,"__esModule",{value:!0}),yy.finalize=void 0,m);yy.finalize=function(r){return _y.operate(function(e,t){try{e.subscribe(t)}finally{t.add(r)}})};var vy={},my=(Object.defineProperty(vy,"__esModule",{value:!0}),vy.createFind=vy.find=void 0,m),gy=O;function Oy(i,u,e){var a="index"===e;return function(r,n){var o=0;r.subscribe(gy.createOperatorSubscriber(n,function(e){var t=o++;i.call(u,e,t,r)&&(n.next(a?t:e),n.complete())},function(){n.next(a?-1:void 0),n.complete()}))}}vy.find=function(e,t){return my.operate(Oy(e,t,"value"))},vy.createFind=Oy;var wy={},Ey=(Object.defineProperty(wy,"__esModule",{value:!0}),wy.findIndex=void 0,m),Py=vy;wy.findIndex=function(e,t){return Ey.operate(Py.createFind(e,t,"index"))};var Sy={},Ty=(Object.defineProperty(Sy,"__esModule",{value:!0}),Sy.first=void 0,ms),jy=Ep,Cy=ob,Iy=$h,Ry=Bb,ky=S;Sy.first=function(n,e){var t=2<=arguments.length;return function(r){return r.pipe(n?jy.filter(function(e,t){return n(e,t,r)}):ky.identity,Cy.take(1),t?Iy.defaultIfEmpty(e):Ry.throwIfEmpty(function(){return new Ty.EmptyError}))}};var Ay={},My=(Object.defineProperty(Ay,"__esModule",{value:!0}),Ay.groupBy=void 0,o),Ny=T,xy=f,Dy=m,Uy=O;Ay.groupBy=function(b,t,y,_){return Dy.operate(function(e,s){function c(t){return r(function(e){return e.error(t)})}t&&"function"!=typeof t?(y=t.duration,l=t.element,_=t.connector):l=t;var l,f=new Map,r=function(e){f.forEach(e),e(s)},p=0,d=!1,h=new Uy.OperatorSubscriber(s,function(e){try{var t,r,n=b(e),o=f.get(n);o||(f.set(n,o=_?_():new xy.Subject),i=n,u=o,(a=new My.Observable(function(e){p++;var t=u.subscribe(e);return function(){t.unsubscribe(),0==--p&&d&&h.unsubscribe()}})).key=i,t=a,s.next(t),y&&(r=Uy.createOperatorSubscriber(o,function(){o.complete(),null!=r&&r.unsubscribe()},void 0,void 0,function(){return f.delete(n)}),h.add(Ny.innerFrom(y(t)).subscribe(r)))),o.next(l?l(e):e)}catch(e){c(e)}var i,u,a},function(){return r(function(e){return e.complete()})},c,function(){return f.clear()},function(){return d=!0,0===p});e.subscribe(h)})};var Ly={},Fy=(Object.defineProperty(Ly,"__esModule",{value:!0}),Ly.isEmpty=void 0,m),By=O;Ly.isEmpty=function(){return Fy.operate(function(e,t){e.subscribe(By.createOperatorSubscriber(t,function(){t.next(!1),t.complete()},function(){t.next(!0),t.complete()}))})};var Wy={},zy={},qy=r&&r.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Vy=(Object.defineProperty(zy,"__esModule",{value:!0}),zy.takeLast=void 0,oa),Hy=m,Gy=O;zy.takeLast=function(t){return t<=0?function(){return Vy.EMPTY}:Hy.operate(function(e,i){var u=[];e.subscribe(Gy.createOperatorSubscriber(i,function(e){u.push(e),t<u.length&&u.shift()},function(){var t,e;try{for(var r=qy(u),n=r.next();!n.done;n=r.next()){var o=n.value;i.next(o)}}catch(e){t={error:e}}finally{try{n&&!n.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}i.complete()},void 0,function(){u=null}))})},Object.defineProperty(Wy,"__esModule",{value:!0}),Wy.last=void 0;var Yy=ms,Ky=Ep,Zy=zy,Qy=Bb,Xy=$h,Jy=S;Wy.last=function(n,e){var t=2<=arguments.length;return function(r){return r.pipe(n?Ky.filter(function(e,t){return n(e,t,r)}):Jy.identity,Zy.takeLast(1),t?Xy.defaultIfEmpty(e):Qy.throwIfEmpty(function(){return new Yy.EmptyError}))}};var $y={},e_=(Object.defineProperty($y,"__esModule",{value:!0}),$y.materialize=void 0,ua),t_=m,r_=O;$y.materialize=function(){return t_.operate(function(e,t){e.subscribe(r_.createOperatorSubscriber(t,function(e){t.next(e_.Notification.createNext(e))},function(){t.next(e_.Notification.createComplete()),t.complete()},function(e){t.next(e_.Notification.createError(e)),t.complete()}))})};var n_={},o_=(Object.defineProperty(n_,"__esModule",{value:!0}),n_.max=void 0,Hd),i_=y;n_.max=function(r){return o_.reduce(i_.isFunction(r)?function(e,t){return 0<r(e,t)?e:t}:function(e,t){return t<e?e:t})};var u_={},a_=(Object.defineProperty(u_,"__esModule",{value:!0}),u_.flatMap=void 0,Xl),a_=(u_.flatMap=a_.mergeMap,{}),s_=(Object.defineProperty(a_,"__esModule",{value:!0}),a_.mergeMapTo=void 0,Xl),c_=y;a_.mergeMapTo=function(e,t,r){return void 0===r&&(r=1/0),c_.isFunction(t)?s_.mergeMap(function(){return e},t,r):s_.mergeMap(function(){return e},r="number"==typeof t?t:r)};var l_={},f_=(Object.defineProperty(l_,"__esModule",{value:!0}),l_.mergeScan=void 0,m),p_=Jl;l_.mergeScan=function(n,o,i){return void 0===i&&(i=1/0),f_.operate(function(e,t){var r=o;return p_.mergeInternals(e,t,function(e,t){return n(r,e,t)},i,function(e){r=e},!1,void 0,function(){return r=null})})};var Jl={},d_={},h_=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},b_=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},y_=(Object.defineProperty(d_,"__esModule",{value:!0}),d_.merge=void 0,m),__=pp,v_=Ql,m_=l,g_=bs;d_.merge=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var n=m_.popScheduler(r),o=m_.popNumber(r,1/0),r=__.argsOrArgArray(r);return y_.operate(function(e,t){v_.mergeAll(o)(g_.from(b_([e],h_(r)),n)).subscribe(t)})};var O_=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},w_=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},E_=(Object.defineProperty(Jl,"__esModule",{value:!0}),Jl.mergeWith=void 0,d_);Jl.mergeWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return E_.merge.apply(void 0,w_([],O_(e)))};var P_={},S_=(Object.defineProperty(P_,"__esModule",{value:!0}),P_.min=void 0,Hd),T_=y;P_.min=function(r){return S_.reduce(T_.isFunction(r)?function(e,t){return r(e,t)<0?e:t}:function(e,t){return e<t?e:t})};var j_={},C_=(Object.defineProperty(j_,"__esModule",{value:!0}),j_.multicast=void 0,w),I_=y,R_=Dh;j_.multicast=function(e,t){var r=I_.isFunction(e)?e:function(){return e};return I_.isFunction(t)?R_.connect(t,{connector:r}):function(e){return new C_.ConnectableObservable(e,r)}};var k_={},A_=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},M_=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},N_=(Object.defineProperty(k_,"__esModule",{value:!0}),k_.onErrorResumeNext=k_.onErrorResumeNextWith=void 0,pp),x_=fp;function D_(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=N_.argsOrArgArray(e);return function(e){return x_.onErrorResumeNext.apply(void 0,M_([e],A_(r)))}}k_.onErrorResumeNextWith=D_,k_.onErrorResumeNext=D_;var U_={},L_=(Object.defineProperty(U_,"__esModule",{value:!0}),U_.pairwise=void 0,m),F_=O;U_.pairwise=function(){return L_.operate(function(e,r){var n,o=!1;e.subscribe(F_.createOperatorSubscriber(r,function(e){var t=n;n=e,o&&r.next([t,e]),o=!0}))})};var B_={},W_=(Object.defineProperty(B_,"__esModule",{value:!0}),B_.pluck=void 0,dl);B_.pluck=function(){for(var o=[],e=0;e<arguments.length;e++)o[e]=arguments[e];var i=o.length;if(0===i)throw new Error("list of properties cannot be empty.");return W_.map(function(e){for(var t=e,r=0;r<i;r++){var n=null==t?void 0:t[o[r]];if(void 0===n)return;t=n}return t})};var z_={},q_=(Object.defineProperty(z_,"__esModule",{value:!0}),z_.publish=void 0,f),V_=j_,H_=Dh;z_.publish=function(t){return t?function(e){return H_.connect(t)(e)}:function(e){return V_.multicast(new q_.Subject)(e)}};var G_={},Y_=(Object.defineProperty(G_,"__esModule",{value:!0}),G_.publishBehavior=void 0,t),K_=w;G_.publishBehavior=function(r){return function(e){var t=new Y_.BehaviorSubject(r);return new K_.ConnectableObservable(e,function(){return t})}};var Z_={},Q_=(Object.defineProperty(Z_,"__esModule",{value:!0}),Z_.publishLast=void 0,X),X_=w;Z_.publishLast=function(){return function(e){var t=new Q_.AsyncSubject;return new X_.ConnectableObservable(e,function(){return t})}};var J_={},$_=(Object.defineProperty(J_,"__esModule",{value:!0}),J_.publishReplay=void 0,i),ev=j_,tv=y;J_.publishReplay=function(t,r,e,n){e&&!tv.isFunction(e)&&(n=e);var o=tv.isFunction(e)?e:void 0;return function(e){return ev.multicast(new $_.ReplaySubject(t,r,n),o)(e)}};var rv={},nv=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},ov=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},iv=(Object.defineProperty(rv,"__esModule",{value:!0}),rv.raceWith=void 0,Ip),uv=m,av=S;rv.raceWith=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return r.length?uv.operate(function(e,t){iv.raceInit(ov([e],nv(r)))(t)}):av.identity};var sv={},cv=(Object.defineProperty(sv,"__esModule",{value:!0}),sv.repeat=void 0,oa),lv=m,fv=O,pv=T,dv=Xf;sv.repeat=function(e){var t,a,s=1/0;return null!=e&&("object"==typeof e?(t=e.count,s=void 0===t?1/0:t,a=e.delay):s=e),s<=0?function(){return cv.EMPTY}:lv.operate(function(t,r){function n(){var e=!1;o=t.subscribe(fv.createOperatorSubscriber(r,void 0,function(){++i<s?o?u():e=!0:r.complete()})),e&&u()}var o,i=0,u=function(){var e,t;null!=o&&o.unsubscribe(),(o=null)!=a?(e="number"==typeof a?dv.timer(a):pv.innerFrom(a(i)),t=fv.createOperatorSubscriber(r,function(){t.unsubscribe(),n()}),e.subscribe(t)):n()};n()})};var hv={},bv=(Object.defineProperty(hv,"__esModule",{value:!0}),hv.repeatWhen=void 0,T),yv=f,_v=m,vv=O;hv.repeatWhen=function(l){return _v.operate(function(e,t){var r,n,o=!1,i=!1,u=!1,a=function(){return u&&i&&(t.complete(),!0)},s=function(){return n||(n=new yv.Subject,bv.innerFrom(l(n)).subscribe(vv.createOperatorSubscriber(t,function(){r?c():o=!0},function(){i=!0,a()}))),n},c=function(){u=!1,r=e.subscribe(vv.createOperatorSubscriber(t,void 0,function(){u=!0,a()||s().next()})),o&&(r.unsubscribe(),r=null,o=!1,c())};c()})};var mv={},gv=(Object.defineProperty(mv,"__esModule",{value:!0}),mv.retry=void 0,m),Ov=O,wv=S,Ev=Xf,Pv=T;mv.retry=function(e){var t=(e=(e=void 0===e?1/0:e)&&"object"==typeof e?e:{count:e}).count,c=void 0===t?1/0:t,l=e.delay,r=void 0!==(t=e.resetOnSuccess)&&t;return c<=0?wv.identity:gv.operate(function(e,i){var u,a=0,s=function(){var o=!1;u=e.subscribe(Ov.createOperatorSubscriber(i,function(e){r&&(a=0),i.next(e)},void 0,function(e){var t,r,n;a++<c?(t=function(){u?(u.unsubscribe(),u=null,s()):o=!0},null!=l?(r="number"==typeof l?Ev.timer(l):Pv.innerFrom(l(e,a)),n=Ov.createOperatorSubscriber(i,function(){n.unsubscribe(),t()},function(){i.complete()}),r.subscribe(n)):t()):i.error(e)})),o&&(u.unsubscribe(),u=null,s())};s()})};var Sv={},Tv=(Object.defineProperty(Sv,"__esModule",{value:!0}),Sv.retryWhen=void 0,T),jv=f,Cv=m,Iv=O;Sv.retryWhen=function(u){return Cv.operate(function(e,t){var r,n,o=!1,i=function(){r=e.subscribe(Iv.createOperatorSubscriber(t,void 0,void 0,function(e){n||(n=new jv.Subject,Tv.innerFrom(u(n)).subscribe(Iv.createOperatorSubscriber(t,function(){return r?i():o=!0}))),n&&n.next(e)})),o&&(r.unsubscribe(),r=null,o=!1,i())};i()})};var Rv={},kv=(Object.defineProperty(Rv,"__esModule",{value:!0}),Rv.sample=void 0,T),Av=m,Mv=v,Nv=O;Rv.sample=function(o){return Av.operate(function(e,t){var r=!1,n=null;e.subscribe(Nv.createOperatorSubscriber(t,function(e){r=!0,n=e})),kv.innerFrom(o).subscribe(Nv.createOperatorSubscriber(t,function(){var e;r&&(r=!1,e=n,n=null,t.next(e))},Mv.noop))})};var xv={},Dv=(Object.defineProperty(xv,"__esModule",{value:!0}),xv.sampleTime=void 0,ia),Uv=Rv,Lv=Qf;xv.sampleTime=function(e,t){return Uv.sample(Lv.interval(e,t=void 0===t?Dv.asyncScheduler:t))};var Fv={},Bv=(Object.defineProperty(Fv,"__esModule",{value:!0}),Fv.scan=void 0,m),Wv=Gd;Fv.scan=function(e,t){return Bv.operate(Wv.scanInternals(e,t,2<=arguments.length,!0))};var Gd={},zv=(Object.defineProperty(Gd,"__esModule",{value:!0}),Gd.sequenceEqual=void 0,m),qv=O,Vv=T;function Hv(){return{buffer:[],complete:!1}}Gd.sequenceEqual=function(u,a){return void 0===a&&(a=function(e,t){return e===t}),zv.operate(function(e,t){function r(n,o){var r=qv.createOperatorSubscriber(t,function(e){var t=o.buffer,r=o.complete;0===t.length?r?i(!1):n.buffer.push(e):a(e,t.shift())||i(!1)},function(){n.complete=!0;var e=o.complete,t=o.buffer;e&&i(0===t.length),null!=r&&r.unsubscribe()});return r}var n=Hv(),o=Hv(),i=function(e){t.next(e),t.complete()};e.subscribe(r(n,o)),Vv.innerFrom(u).subscribe(r(o,n))})};var Gv={},Yv=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Kv=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},Zv=(Object.defineProperty(Gv,"__esModule",{value:!0}),Gv.share=void 0,T),Qv=f,Xv=P,Jv=m;function $v(e,t){for(var r,n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];if(!0===t)e();else if(!1!==t)return r=new Xv.SafeSubscriber({next:function(){r.unsubscribe(),e()}}),Zv.innerFrom(t.apply(void 0,Kv([],Yv(n)))).subscribe(r)}Gv.share=function(e){var t=(e=void 0===e?{}:e).connector,p=void 0===t?function(){return new Qv.Subject}:t,d=void 0===(t=e.resetOnError)||t,h=void 0===(t=e.resetOnComplete)||t,b=void 0===(t=e.resetOnRefCountZero)||t;return function(e){function n(){var e=o;f(),null!=e&&e.unsubscribe()}var o,i,u,a=0,s=!1,c=!1,l=function(){null!=i&&i.unsubscribe(),i=void 0},f=function(){l(),o=u=void 0,s=c=!1};return Jv.operate(function(e,t){a++,c||s||l();var r=u=null!=u?u:p();t.add(function(){0!==--a||c||s||(i=$v(n,b))}),r.subscribe(t),!o&&0<a&&(o=new Xv.SafeSubscriber({next:function(e){return r.next(e)},error:function(e){c=!0,l(),i=$v(f,d,e),r.error(e)},complete:function(){s=!0,l(),i=$v(f,h),r.complete()}}),Zv.innerFrom(e).subscribe(o))})(e)}};var em={},tm=(Object.defineProperty(em,"__esModule",{value:!0}),em.shareReplay=void 0,i),rm=Gv;em.shareReplay=function(e,t,r){var n,o,i=!1;return e&&"object"==typeof e?(n=e.bufferSize,o=void 0===n?1/0:n,n=e.windowTime,t=void 0===n?1/0:n,i=void 0!==(n=e.refCount)&&n,r=e.scheduler):o=null!=e?e:1/0,rm.share({connector:function(){return new tm.ReplaySubject(o,t,r)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:i})};var nm={},om=(Object.defineProperty(nm,"__esModule",{value:!0}),nm.single=void 0,ms),im=pc,um=Sc,am=m,sm=O;nm.single=function(a){return am.operate(function(t,r){var n,o=!1,i=!1,u=0;t.subscribe(sm.createOperatorSubscriber(r,function(e){i=!0,a&&!a(e,u++,t)||(o&&r.error(new im.SequenceError("Too many matching values")),o=!0,n=e)},function(){o?(r.next(n),r.complete()):r.error(i?new um.NotFoundError("No matching values"):new om.EmptyError)}))})};var cm={},lm=(Object.defineProperty(cm,"__esModule",{value:!0}),cm.skip=void 0,Ep);cm.skip=function(r){return lm.filter(function(e,t){return r<=t})};var fm={},pm=(Object.defineProperty(fm,"__esModule",{value:!0}),fm.skipLast=void 0,S),dm=m,hm=O;fm.skipLast=function(u){return u<=0?pm.identity:dm.operate(function(e,n){var o=new Array(u),i=0;return e.subscribe(hm.createOperatorSubscriber(n,function(e){var t,r=i++;r<u?o[r]=e:(t=o[r=r%u],o[r]=e,n.next(t))})),function(){o=null}})};var bm={},ym=(Object.defineProperty(bm,"__esModule",{value:!0}),bm.skipUntil=void 0,m),_m=O,vm=T,mm=v;bm.skipUntil=function(o){return ym.operate(function(e,t){var r=!1,n=_m.createOperatorSubscriber(t,function(){null!=n&&n.unsubscribe(),r=!0},mm.noop);vm.innerFrom(o).subscribe(n),e.subscribe(_m.createOperatorSubscriber(t,function(e){return r&&t.next(e)}))})};var gm={},Om=(Object.defineProperty(gm,"__esModule",{value:!0}),gm.skipWhile=void 0,m),wm=O;gm.skipWhile=function(o){return Om.operate(function(e,t){var r=!1,n=0;e.subscribe(wm.createOperatorSubscriber(t,function(e){return(r=r||!o(e,n++))&&t.next(e)}))})};var Em={},Pm=(Object.defineProperty(Em,"__esModule",{value:!0}),Em.startWith=void 0,Kl),Sm=l,Tm=m;Em.startWith=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var n=Sm.popScheduler(r);return Tm.operate(function(e,t){(n?Pm.concat(r,e,n):Pm.concat(r,e)).subscribe(t)})};var jm={},Cm={},Im=(Object.defineProperty(Cm,"__esModule",{value:!0}),Cm.switchMap=void 0,T),Rm=m,km=O;Cm.switchMap=function(s,c){return Rm.operate(function(e,o){function i(){t&&!u&&o.complete()}var u=null,a=0,t=!1;e.subscribe(km.createOperatorSubscriber(o,function(t){null!=u&&u.unsubscribe();var r=0,n=a++;Im.innerFrom(s(t,n)).subscribe(u=km.createOperatorSubscriber(o,function(e){return o.next(c?c(t,e,n,r++):e)},function(){u=null,i()}))},function(){t=!0,i()}))})},Object.defineProperty(jm,"__esModule",{value:!0}),jm.switchAll=void 0;var Am=Cm,Mm=S;jm.switchAll=function(){return Am.switchMap(Mm.identity)};var Nm={},xm=(Object.defineProperty(Nm,"__esModule",{value:!0}),Nm.switchMapTo=void 0,Cm),Dm=y;Nm.switchMapTo=function(e,t){return Dm.isFunction(t)?xm.switchMap(function(){return e},t):xm.switchMap(function(){return e})};var Um={},Lm=(Object.defineProperty(Um,"__esModule",{value:!0}),Um.switchScan=void 0,Cm),Fm=m;Um.switchScan=function(n,o){return Fm.operate(function(e,t){var r=o;return Lm.switchMap(function(e,t){return n(r,e,t)},function(e,t){return r=t})(e).subscribe(t),function(){r=null}})};var Bm={},Wm=(Object.defineProperty(Bm,"__esModule",{value:!0}),Bm.takeUntil=void 0,m),zm=O,qm=T,Vm=v;Bm.takeUntil=function(r){return Wm.operate(function(e,t){qm.innerFrom(r).subscribe(zm.createOperatorSubscriber(t,function(){return t.complete()},Vm.noop)),t.closed||e.subscribe(t)})};var Hm={},Gm=(Object.defineProperty(Hm,"__esModule",{value:!0}),Hm.takeWhile=void 0,m),Ym=O;Hm.takeWhile=function(o,i){return void 0===i&&(i=!1),Gm.operate(function(e,r){var n=0;e.subscribe(Ym.createOperatorSubscriber(r,function(e){var t=o(e,n++);(t||i)&&r.next(e),t||r.complete()}))})};var Km={},Zm=(Object.defineProperty(Km,"__esModule",{value:!0}),Km.tap=void 0,y),Qm=m,Xm=O,Jm=S;Km.tap=function(e,t,r){var o=Zm.isFunction(e)||t||r?{next:e,error:t,complete:r}:e;return o?Qm.operate(function(e,r){null!=(t=o.subscribe)&&t.call(o);var t,n=!0;e.subscribe(Xm.createOperatorSubscriber(r,function(e){var t;null!=(t=o.next)&&t.call(o,e),r.next(e)},function(){var e;n=!1,null!=(e=o.complete)&&e.call(o),r.complete()},function(e){var t;n=!1,null!=(t=o.error)&&t.call(o,e),r.error(e)},function(){var e;n&&null!=(e=o.unsubscribe)&&e.call(o),null!=(e=o.finalize)&&e.call(o)}))}):Jm.identity};var y={},$m=(Object.defineProperty(y,"__esModule",{value:!0}),y.throttle=void 0,m),e0=O,t0=T;y.throttle=function(h,b){return $m.operate(function(e,t){function r(){var e;a&&(a=!1,e=s,s=null,t.next(e),l||d(e))}var n=null!=b?b:{},o=n.leading,i=void 0===o||o,o=n.trailing,u=void 0!==o&&o,a=!1,s=null,c=null,l=!1,f=function(){null!=c&&c.unsubscribe(),c=null,u&&(r(),l&&t.complete())},p=function(){c=null,l&&t.complete()},d=function(e){return c=t0.innerFrom(h(e)).subscribe(e0.createOperatorSubscriber(t,f,p))};e.subscribe(e0.createOperatorSubscriber(t,function(e){a=!0,s=e,c&&!c.closed||(i?r():d(e))},function(){l=!0,u&&a&&c&&!c.closed||t.complete()}))})};var r0={},n0=(Object.defineProperty(r0,"__esModule",{value:!0}),r0.throttleTime=void 0,ia),o0=y,i0=Xf;r0.throttleTime=function(e,t,r){var n=i0.timer(e,t=void 0===t?n0.asyncScheduler:t);return o0.throttle(function(){return n},r)};var u0={},a0=(Object.defineProperty(u0,"__esModule",{value:!0}),u0.TimeInterval=u0.timeInterval=void 0,ia),s0=m,c0=O;u0.timeInterval=function(i){return void 0===i&&(i=a0.asyncScheduler),s0.operate(function(e,n){var o=i.now();e.subscribe(c0.createOperatorSubscriber(n,function(e){var t=i.now(),r=t-o;o=t,n.next(new l0(e,r))}))})};var l0=function(e,t){this.value=e,this.interval=t},f0=(u0.TimeInterval=l0,{}),p0=(Object.defineProperty(f0,"__esModule",{value:!0}),f0.timeoutWith=void 0,ia),d0=yc,h0=As;f0.timeoutWith=function(e,t,r){var n,o;if(r=null!=r?r:p0.async,d0.isValidDate(e)?n=e:"number"==typeof e&&(o=e),!t)throw new TypeError("No observable provided to switch to");if(e=function(){return t},null==n&&null==o)throw new TypeError("No timeout provided.");return h0.timeout({first:n,each:o,scheduler:r,with:e})};var yc={},b0=(Object.defineProperty(yc,"__esModule",{value:!0}),yc.timestamp=void 0,u),y0=dl;yc.timestamp=function(t){return void 0===t&&(t=b0.dateTimestampProvider),y0.map(function(e){return{value:e,timestamp:t.now()}})};var u={},_0=(Object.defineProperty(u,"__esModule",{value:!0}),u.window=void 0,f),v0=m,m0=O,g0=v,O0=T;u.window=function(o){return v0.operate(function(e,t){function r(e){n.error(e),t.error(e)}var n=new _0.Subject;t.next(n.asObservable());return e.subscribe(m0.createOperatorSubscriber(t,function(e){return null==n?void 0:n.next(e)},function(){n.complete(),t.complete()},r)),O0.innerFrom(o).subscribe(m0.createOperatorSubscriber(t,function(){n.complete(),t.next(n=new _0.Subject)},g0.noop,r)),function(){null!=n&&n.unsubscribe(),n=null}})};var w0={},E0=r&&r.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},P0=(Object.defineProperty(w0,"__esModule",{value:!0}),w0.windowCount=void 0,f),S0=m,T0=O;w0.windowCount=function(s,e){var c=0<(e=void 0===e?0:e)?e:s;return S0.operate(function(e,i){var u=[new P0.Subject],a=0;i.next(u[0].asObservable()),e.subscribe(T0.createOperatorSubscriber(i,function(e){try{for(var t=E0(u),r=t.next();!r.done;r=t.next())r.value.next(e)}catch(e){n={error:e}}finally{try{r&&!r.done&&(o=t.return)&&o.call(t)}finally{if(n)throw n.error}}var n,o=a-s+1;0<=o&&o%c==0&&u.shift().complete(),++a%c==0&&(n=new P0.Subject,u.push(n),i.next(n.asObservable()))},function(){for(;0<u.length;)u.shift().complete();i.complete()},function(e){for(;0<u.length;)u.shift().error(e);i.error(e)},function(){u=null}))})};var j0={},C0=(Object.defineProperty(j0,"__esModule",{value:!0}),j0.windowTime=void 0,f),I0=ia,R0=b,k0=m,A0=O,M0=Q,N0=l,x0=oc;j0.windowTime=function(c){for(var e,t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var l=null!=(e=N0.popScheduler(t))?e:I0.asyncScheduler,f=null!=(e=t[0])?e:null,p=t[1]||1/0;return k0.operate(function(e,n){function r(t){s(function(e){e=e.window;return t(e)}),t(n),n.unsubscribe()}var o=[],i=!1,u=function(e){var t=e.window,r=e.subs;t.complete(),r.unsubscribe(),M0.arrRemove(o,e),i&&a()},a=function(){var e,t,r;o&&(e=new R0.Subscription,n.add(e),t=new C0.Subject,o.push(r={window:t,subs:e,seen:0}),n.next(t.asObservable()),x0.executeSchedule(e,l,function(){return u(r)},c))},s=(null!==f&&0<=f?x0.executeSchedule(n,l,a,f,!0):i=!0,a(),function(e){return o.slice().forEach(e)});return e.subscribe(A0.createOperatorSubscriber(n,function(t){s(function(e){e.window.next(t),p<=++e.seen&&u(e)})},function(){return r(function(e){return e.complete()})},function(t){return r(function(e){return e.error(t)})})),function(){o=null}})};var oc={},D0=r&&r.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},U0=(Object.defineProperty(oc,"__esModule",{value:!0}),oc.windowToggle=void 0,f),L0=b,F0=m,B0=T,W0=O,z0=v,q0=Q;oc.windowToggle=function(t,a){return F0.operate(function(e,o){function i(e){for(;0<u.length;)u.shift().error(e);o.error(e)}var u=[];B0.innerFrom(t).subscribe(W0.createOperatorSubscriber(o,function(e){var t,r=new U0.Subject,n=(u.push(r),new L0.Subscription);try{t=B0.innerFrom(a(e))}catch(e){return void i(e)}o.next(r.asObservable()),n.add(t.subscribe(W0.createOperatorSubscriber(o,function(){q0.arrRemove(u,r),r.complete(),n.unsubscribe()},z0.noop,i)))},z0.noop)),e.subscribe(W0.createOperatorSubscriber(o,function(e){var t,r,n=u.slice();try{for(var o=D0(n),i=o.next();!i.done;i=o.next())i.value.next(e)}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}},function(){for(;0<u.length;)u.shift().complete();o.complete()},i,function(){for(;0<u.length;)u.shift().unsubscribe()}))})};var Q={},V0=(Object.defineProperty(Q,"__esModule",{value:!0}),Q.windowWhen=void 0,f),H0=m,G0=O,Y0=T;Q.windowWhen=function(u){return H0.operate(function(e,t){var r,n,o=function(e){r.error(e),t.error(e)},i=function(){var e;null!=n&&n.unsubscribe(),null!=r&&r.complete(),r=new V0.Subject,t.next(r.asObservable());try{e=Y0.innerFrom(u())}catch(e){return void o(e)}e.subscribe(n=G0.createOperatorSubscriber(t,i,i,o))};i(),e.subscribe(G0.createOperatorSubscriber(t,function(e){return r.next(e)},function(){r.complete(),t.complete()},o,function(){null!=n&&n.unsubscribe(),r=null}))})};var K0={},Z0=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Q0=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},X0=(Object.defineProperty(K0,"__esModule",{value:!0}),K0.withLatestFrom=void 0,m),J0=O,$0=T,eg=S,tg=v,rg=l;K0.withLatestFrom=function(){for(var a=[],e=0;e<arguments.length;e++)a[e]=arguments[e];var s=rg.popResultSelector(a);return X0.operate(function(e,r){for(var t=a.length,n=new Array(t),o=a.map(function(){return!1}),i=!1,u=0;u<t;u++)!function(t){$0.innerFrom(a[t]).subscribe(J0.createOperatorSubscriber(r,function(e){n[t]=e,i||o[t]||(o[t]=!0,(i=o.every(eg.identity))&&(o=null))},tg.noop))}(u);e.subscribe(J0.createOperatorSubscriber(r,function(e){i&&(e=Q0([e],Z0(n)),r.next(s?s.apply(void 0,Q0([],Z0(e))):e))}))})};var O={},ng=(Object.defineProperty(O,"__esModule",{value:!0}),O.zipAll=void 0,zp),og=C;O.zipAll=function(e){return og.joinAllInternals(ng.zip,e)};var T={},l={},ig=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},ug=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},ag=(Object.defineProperty(l,"__esModule",{value:!0}),l.zip=void 0,zp),sg=m;l.zip=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return sg.operate(function(e,t){ag.zip.apply(void 0,ug([e],ig(r))).subscribe(t)})};var cg,lg,fg,pg,dg,hg,bg,yg,_g,vg,mg,gg,Og,wg,Eg,Pg,Sg,Tg,jg,Cg,Ig,Rg,kg,Ag,Mg,Ng,xg,Dg,Ug,Lg,Fg,Bg,Wg,zg,qg,Vg,Hg,Gg,Yg,Kg,Zg,Qg,Xg,Jg,$g,eO,tO,rO,nO,oO,iO,uO,aO,sO,cO,lO,fO,pO,dO,hO,bO,yO,_O,vO,mO,gO,OO,wO,EO,PO,SO,TO,jO,CO,IO,RO,kO,AO,MO,NO,xO,DO,UO,LO,FO,BO,WO,zO,qO,VO,HO,GO,YO,KO,ZO,QO,XO,JO,$O,ew,tw,rw,nw,ow,iw,uw,aw,sw,cw,lw,fw,pw,dw,hw,bw,yw,_w,vw,mw,gw,Ow,ww,Ew,Pw,Sw,Tw,jw,Cw,Iw,Rw,kw,Aw,Mw,Nw,xw,Dw,Uw,Lw,Fw,Bw,Ww,zw,qw,Vw,Hw,Gw,Yw,Kw,Zw,Qw,Xw,Jw,$w,eE,tE,rE,nE,oE,iE,uE,aE,sE,cE,lE,fE,pE,dE,hE,bE=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},yE=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},_E=(Object.defineProperty(T,"__esModule",{value:!0}),T.zipWith=void 0,l);T.zipWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return _E.zip.apply(void 0,yE([],bE(e)))},C=tn,cg=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),m=r&&r.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||cg(t,e,r)},Object.defineProperty(C,"__esModule",{value:!0}),C.interval=C.iif=C.generate=C.fromEventPattern=C.fromEvent=C.from=C.forkJoin=C.empty=C.defer=C.connectable=C.concat=C.combineLatest=C.bindNodeCallback=C.bindCallback=C.UnsubscriptionError=C.TimeoutError=C.SequenceError=C.ObjectUnsubscribedError=C.NotFoundError=C.EmptyError=C.ArgumentOutOfRangeError=C.firstValueFrom=C.lastValueFrom=C.isObservable=C.identity=C.noop=C.pipe=C.NotificationKind=C.Notification=C.Subscriber=C.Subscription=C.Scheduler=C.VirtualAction=C.VirtualTimeScheduler=C.animationFrameScheduler=C.animationFrame=C.queueScheduler=C.queue=C.asyncScheduler=C.async=C.asapScheduler=C.asap=C.AsyncSubject=C.ReplaySubject=C.BehaviorSubject=C.Subject=C.animationFrames=C.observable=C.ConnectableObservable=C.Observable=void 0,C.filter=C.expand=C.exhaustMap=C.exhaustAll=C.exhaust=C.every=C.endWith=C.elementAt=C.distinctUntilKeyChanged=C.distinctUntilChanged=C.distinct=C.dematerialize=C.delayWhen=C.delay=C.defaultIfEmpty=C.debounceTime=C.debounce=C.count=C.connect=C.concatWith=C.concatMapTo=C.concatMap=C.concatAll=C.combineLatestWith=C.combineLatestAll=C.combineAll=C.catchError=C.bufferWhen=C.bufferToggle=C.bufferTime=C.bufferCount=C.buffer=C.auditTime=C.audit=C.config=C.NEVER=C.EMPTY=C.scheduled=C.zip=C.using=C.timer=C.throwError=C.range=C.race=C.partition=C.pairs=C.onErrorResumeNext=C.of=C.never=C.merge=void 0,C.switchMap=C.switchAll=C.subscribeOn=C.startWith=C.skipWhile=C.skipUntil=C.skipLast=C.skip=C.single=C.shareReplay=C.share=C.sequenceEqual=C.scan=C.sampleTime=C.sample=C.refCount=C.retryWhen=C.retry=C.repeatWhen=C.repeat=C.reduce=C.raceWith=C.publishReplay=C.publishLast=C.publishBehavior=C.publish=C.pluck=C.pairwise=C.onErrorResumeNextWith=C.observeOn=C.multicast=C.min=C.mergeWith=C.mergeScan=C.mergeMapTo=C.mergeMap=C.flatMap=C.mergeAll=C.max=C.materialize=C.mapTo=C.map=C.last=C.isEmpty=C.ignoreElements=C.groupBy=C.first=C.findIndex=C.find=C.finalize=void 0,C.zipWith=C.zipAll=C.withLatestFrom=C.windowWhen=C.windowToggle=C.windowTime=C.windowCount=C.window=C.toArray=C.timestamp=C.timeoutWith=C.timeout=C.timeInterval=C.throwIfEmpty=C.throttleTime=C.throttle=C.tap=C.takeWhile=C.takeUntil=C.takeLast=C.take=C.switchScan=C.switchMapTo=void 0,lg=o,Object.defineProperty(C,"Observable",{enumerable:!0,get:function(){return lg.Observable}}),fg=w,Object.defineProperty(C,"ConnectableObservable",{enumerable:!0,get:function(){return fg.ConnectableObservable}}),pg=p,Object.defineProperty(C,"observable",{enumerable:!0,get:function(){return pg.observable}}),dg=g,Object.defineProperty(C,"animationFrames",{enumerable:!0,get:function(){return dg.animationFrames}}),hg=f,Object.defineProperty(C,"Subject",{enumerable:!0,get:function(){return hg.Subject}}),bg=t,Object.defineProperty(C,"BehaviorSubject",{enumerable:!0,get:function(){return bg.BehaviorSubject}}),yg=i,Object.defineProperty(C,"ReplaySubject",{enumerable:!0,get:function(){return yg.ReplaySubject}}),_g=X,Object.defineProperty(C,"AsyncSubject",{enumerable:!0,get:function(){return _g.AsyncSubject}}),vg=Qt,Object.defineProperty(C,"asap",{enumerable:!0,get:function(){return vg.asap}}),Object.defineProperty(C,"asapScheduler",{enumerable:!0,get:function(){return vg.asapScheduler}}),mg=ia,Object.defineProperty(C,"async",{enumerable:!0,get:function(){return mg.async}}),Object.defineProperty(C,"asyncScheduler",{enumerable:!0,get:function(){return mg.asyncScheduler}}),gg=ka,Object.defineProperty(C,"queue",{enumerable:!0,get:function(){return gg.queue}}),Object.defineProperty(C,"queueScheduler",{enumerable:!0,get:function(){return gg.queueScheduler}}),Og=Wa,Object.defineProperty(C,"animationFrame",{enumerable:!0,get:function(){return Og.animationFrame}}),Object.defineProperty(C,"animationFrameScheduler",{enumerable:!0,get:function(){return Og.animationFrameScheduler}}),wg=Ha,Object.defineProperty(C,"VirtualTimeScheduler",{enumerable:!0,get:function(){return wg.VirtualTimeScheduler}}),Object.defineProperty(C,"VirtualAction",{enumerable:!0,get:function(){return wg.VirtualAction}}),Eg=da,Object.defineProperty(C,"Scheduler",{enumerable:!0,get:function(){return Eg.Scheduler}}),Pg=b,Object.defineProperty(C,"Subscription",{enumerable:!0,get:function(){return Pg.Subscription}}),Sg=P,Object.defineProperty(C,"Subscriber",{enumerable:!0,get:function(){return Sg.Subscriber}}),Tg=ua,Object.defineProperty(C,"Notification",{enumerable:!0,get:function(){return Tg.Notification}}),Object.defineProperty(C,"NotificationKind",{enumerable:!0,get:function(){return Tg.NotificationKind}}),jg=n,Object.defineProperty(C,"pipe",{enumerable:!0,get:function(){return jg.pipe}}),Cg=v,Object.defineProperty(C,"noop",{enumerable:!0,get:function(){return Cg.noop}}),Ig=S,Object.defineProperty(C,"identity",{enumerable:!0,get:function(){return Ig.identity}}),Rg=Cs,Object.defineProperty(C,"isObservable",{enumerable:!0,get:function(){return Rg.isObservable}}),kg=Os,Object.defineProperty(C,"lastValueFrom",{enumerable:!0,get:function(){return kg.lastValueFrom}}),Ag=Ps,Object.defineProperty(C,"firstValueFrom",{enumerable:!0,get:function(){return Ag.firstValueFrom}}),Mg=Ts,Object.defineProperty(C,"ArgumentOutOfRangeError",{enumerable:!0,get:function(){return Mg.ArgumentOutOfRangeError}}),Ng=ms,Object.defineProperty(C,"EmptyError",{enumerable:!0,get:function(){return Ng.EmptyError}}),xg=Sc,Object.defineProperty(C,"NotFoundError",{enumerable:!0,get:function(){return xg.NotFoundError}}),Dg=dt,Object.defineProperty(C,"ObjectUnsubscribedError",{enumerable:!0,get:function(){return Dg.ObjectUnsubscribedError}}),Ug=pc,Object.defineProperty(C,"SequenceError",{enumerable:!0,get:function(){return Ug.SequenceError}}),Lg=As,Object.defineProperty(C,"TimeoutError",{enumerable:!0,get:function(){return Lg.TimeoutError}}),Fg=Qr,Object.defineProperty(C,"UnsubscriptionError",{enumerable:!0,get:function(){return Fg.UnsubscriptionError}}),Bg=js,Object.defineProperty(C,"bindCallback",{enumerable:!0,get:function(){return Bg.bindCallback}}),Wg=Il,Object.defineProperty(C,"bindNodeCallback",{enumerable:!0,get:function(){return Wg.bindNodeCallback}}),zg=E,Object.defineProperty(C,"combineLatest",{enumerable:!0,get:function(){return zg.combineLatest}}),qg=Kl,Object.defineProperty(C,"concat",{enumerable:!0,get:function(){return qg.concat}}),Vg=hf,Object.defineProperty(C,"connectable",{enumerable:!0,get:function(){return Vg.connectable}}),Hg=bf,Object.defineProperty(C,"defer",{enumerable:!0,get:function(){return Hg.defer}}),Gg=oa,Object.defineProperty(C,"empty",{enumerable:!0,get:function(){return Gg.empty}}),Yg=wf,Object.defineProperty(C,"forkJoin",{enumerable:!0,get:function(){return Yg.forkJoin}}),Kg=bs,Object.defineProperty(C,"from",{enumerable:!0,get:function(){return Kg.from}}),Zg=kl,Object.defineProperty(C,"fromEvent",{enumerable:!0,get:function(){return Zg.fromEvent}}),Qg=Dl,Object.defineProperty(C,"fromEventPattern",{enumerable:!0,get:function(){return Qg.fromEventPattern}}),Xg=vs,Object.defineProperty(C,"generate",{enumerable:!0,get:function(){return Xg.generate}}),Jg=vc,Object.defineProperty(C,"iif",{enumerable:!0,get:function(){return Jg.iif}}),$g=Qf,Object.defineProperty(C,"interval",{enumerable:!0,get:function(){return $g.interval}}),eO=ls,Object.defineProperty(C,"merge",{enumerable:!0,get:function(){return eO.merge}}),tO=lp,Object.defineProperty(C,"never",{enumerable:!0,get:function(){return tO.never}}),rO=s,Object.defineProperty(C,"of",{enumerable:!0,get:function(){return rO.of}}),nO=fp,Object.defineProperty(C,"onErrorResumeNext",{enumerable:!0,get:function(){return nO.onErrorResumeNext}}),oO=mp,Object.defineProperty(C,"pairs",{enumerable:!0,get:function(){return oO.pairs}}),iO=Op,Object.defineProperty(C,"partition",{enumerable:!0,get:function(){return iO.partition}}),uO=Ip,Object.defineProperty(C,"race",{enumerable:!0,get:function(){return uO.race}}),aO=xp,Object.defineProperty(C,"range",{enumerable:!0,get:function(){return aO.range}}),sO=_s,Object.defineProperty(C,"throwError",{enumerable:!0,get:function(){return sO.throwError}}),cO=Xf,Object.defineProperty(C,"timer",{enumerable:!0,get:function(){return cO.timer}}),lO=Lp,Object.defineProperty(C,"using",{enumerable:!0,get:function(){return lO.using}}),fO=zp,Object.defineProperty(C,"zip",{enumerable:!0,get:function(){return fO.zip}}),pO=ys,Object.defineProperty(C,"scheduled",{enumerable:!0,get:function(){return pO.scheduled}}),dO=oa,Object.defineProperty(C,"EMPTY",{enumerable:!0,get:function(){return dO.EMPTY}}),hO=lp,Object.defineProperty(C,"NEVER",{enumerable:!0,get:function(){return hO.NEVER}}),m(Xp,C),bO=h,Object.defineProperty(C,"config",{enumerable:!0,get:function(){return bO.config}}),yO=Jp,Object.defineProperty(C,"audit",{enumerable:!0,get:function(){return yO.audit}}),_O=rd,Object.defineProperty(C,"auditTime",{enumerable:!0,get:function(){return _O.auditTime}}),vO=ud,Object.defineProperty(C,"buffer",{enumerable:!0,get:function(){return vO.buffer}}),mO=fd,Object.defineProperty(C,"bufferCount",{enumerable:!0,get:function(){return mO.bufferCount}}),gO=yd,Object.defineProperty(C,"bufferTime",{enumerable:!0,get:function(){return gO.bufferTime}}),OO=Sd,Object.defineProperty(C,"bufferToggle",{enumerable:!0,get:function(){return OO.bufferToggle}}),wO=Md,Object.defineProperty(C,"bufferWhen",{enumerable:!0,get:function(){return wO.bufferWhen}}),EO=Ld,Object.defineProperty(C,"catchError",{enumerable:!0,get:function(){return EO.catchError}}),PO=zd,Object.defineProperty(C,"combineAll",{enumerable:!0,get:function(){return PO.combineAll}}),SO=qd,Object.defineProperty(C,"combineLatestAll",{enumerable:!0,get:function(){return SO.combineLatestAll}}),TO=uh,Object.defineProperty(C,"combineLatestWith",{enumerable:!0,get:function(){return TO.combineLatestWith}}),jO=Zl,Object.defineProperty(C,"concatAll",{enumerable:!0,get:function(){return jO.concatAll}}),CO=pl,Object.defineProperty(C,"concatMap",{enumerable:!0,get:function(){return CO.concatMap}}),IO=wh,Object.defineProperty(C,"concatMapTo",{enumerable:!0,get:function(){return IO.concatMapTo}}),RO=Sh,Object.defineProperty(C,"concatWith",{enumerable:!0,get:function(){return RO.concatWith}}),kO=Dh,Object.defineProperty(C,"connect",{enumerable:!0,get:function(){return kO.connect}}),AO=Uh,Object.defineProperty(C,"count",{enumerable:!0,get:function(){return AO.count}}),MO=Hh,Object.defineProperty(C,"debounce",{enumerable:!0,get:function(){return MO.debounce}}),NO=I,Object.defineProperty(C,"debounceTime",{enumerable:!0,get:function(){return NO.debounceTime}}),xO=$h,Object.defineProperty(C,"defaultIfEmpty",{enumerable:!0,get:function(){return xO.defaultIfEmpty}}),DO=rb,Object.defineProperty(C,"delay",{enumerable:!0,get:function(){return DO.delay}}),UO=nb,Object.defineProperty(C,"delayWhen",{enumerable:!0,get:function(){return UO.delayWhen}}),LO=Eb,Object.defineProperty(C,"dematerialize",{enumerable:!0,get:function(){return LO.dematerialize}}),FO=jb,Object.defineProperty(C,"distinct",{enumerable:!0,get:function(){return FO.distinct}}),BO=Ab,Object.defineProperty(C,"distinctUntilChanged",{enumerable:!0,get:function(){return BO.distinctUntilChanged}}),WO=Ub,Object.defineProperty(C,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return WO.distinctUntilKeyChanged}}),zO=Fb,Object.defineProperty(C,"elementAt",{enumerable:!0,get:function(){return zO.elementAt}}),qO=Qb,Object.defineProperty(C,"endWith",{enumerable:!0,get:function(){return qO.endWith}}),VO=ty,Object.defineProperty(C,"every",{enumerable:!0,get:function(){return VO.every}}),HO=oy,Object.defineProperty(C,"exhaust",{enumerable:!0,get:function(){return HO.exhaust}}),GO=iy,Object.defineProperty(C,"exhaustAll",{enumerable:!0,get:function(){return GO.exhaustAll}}),YO=uy,Object.defineProperty(C,"exhaustMap",{enumerable:!0,get:function(){return YO.exhaustMap}}),KO=dy,Object.defineProperty(C,"expand",{enumerable:!0,get:function(){return KO.expand}}),ZO=Ep,Object.defineProperty(C,"filter",{enumerable:!0,get:function(){return ZO.filter}}),QO=yy,Object.defineProperty(C,"finalize",{enumerable:!0,get:function(){return QO.finalize}}),XO=vy,Object.defineProperty(C,"find",{enumerable:!0,get:function(){return XO.find}}),JO=wy,Object.defineProperty(C,"findIndex",{enumerable:!0,get:function(){return JO.findIndex}}),$O=Sy,Object.defineProperty(C,"first",{enumerable:!0,get:function(){return $O.first}}),ew=Ay,Object.defineProperty(C,"groupBy",{enumerable:!0,get:function(){return ew.groupBy}}),tw=sb,Object.defineProperty(C,"ignoreElements",{enumerable:!0,get:function(){return tw.ignoreElements}}),rw=Ly,Object.defineProperty(C,"isEmpty",{enumerable:!0,get:function(){return rw.isEmpty}}),nw=Wy,Object.defineProperty(C,"last",{enumerable:!0,get:function(){return nw.last}}),ow=dl,Object.defineProperty(C,"map",{enumerable:!0,get:function(){return ow.map}}),iw=pb,Object.defineProperty(C,"mapTo",{enumerable:!0,get:function(){return iw.mapTo}}),uw=$y,Object.defineProperty(C,"materialize",{enumerable:!0,get:function(){return uw.materialize}}),aw=n_,Object.defineProperty(C,"max",{enumerable:!0,get:function(){return aw.max}}),sw=Ql,Object.defineProperty(C,"mergeAll",{enumerable:!0,get:function(){return sw.mergeAll}}),cw=u_,Object.defineProperty(C,"flatMap",{enumerable:!0,get:function(){return cw.flatMap}}),lw=Xl,Object.defineProperty(C,"mergeMap",{enumerable:!0,get:function(){return lw.mergeMap}}),fw=a_,Object.defineProperty(C,"mergeMapTo",{enumerable:!0,get:function(){return fw.mergeMapTo}}),pw=l_,Object.defineProperty(C,"mergeScan",{enumerable:!0,get:function(){return pw.mergeScan}}),dw=Jl,Object.defineProperty(C,"mergeWith",{enumerable:!0,get:function(){return dw.mergeWith}}),hw=P_,Object.defineProperty(C,"min",{enumerable:!0,get:function(){return hw.min}}),bw=j_,Object.defineProperty(C,"multicast",{enumerable:!0,get:function(){return bw.multicast}}),yw=_,Object.defineProperty(C,"observeOn",{enumerable:!0,get:function(){return yw.observeOn}}),_w=k_,Object.defineProperty(C,"onErrorResumeNextWith",{enumerable:!0,get:function(){return _w.onErrorResumeNextWith}}),vw=U_,Object.defineProperty(C,"pairwise",{enumerable:!0,get:function(){return vw.pairwise}}),mw=B_,Object.defineProperty(C,"pluck",{enumerable:!0,get:function(){return mw.pluck}}),gw=z_,Object.defineProperty(C,"publish",{enumerable:!0,get:function(){return gw.publish}}),Ow=G_,Object.defineProperty(C,"publishBehavior",{enumerable:!0,get:function(){return Ow.publishBehavior}}),ww=Z_,Object.defineProperty(C,"publishLast",{enumerable:!0,get:function(){return ww.publishLast}}),Ew=J_,Object.defineProperty(C,"publishReplay",{enumerable:!0,get:function(){return Ew.publishReplay}}),Pw=rv,Object.defineProperty(C,"raceWith",{enumerable:!0,get:function(){return Pw.raceWith}}),Sw=Hd,Object.defineProperty(C,"reduce",{enumerable:!0,get:function(){return Sw.reduce}}),Tw=sv,Object.defineProperty(C,"repeat",{enumerable:!0,get:function(){return Tw.repeat}}),jw=hv,Object.defineProperty(C,"repeatWhen",{enumerable:!0,get:function(){return jw.repeatWhen}}),Cw=mv,Object.defineProperty(C,"retry",{enumerable:!0,get:function(){return Cw.retry}}),Iw=Sv,Object.defineProperty(C,"retryWhen",{enumerable:!0,get:function(){return Iw.retryWhen}}),Rw=kt,Object.defineProperty(C,"refCount",{enumerable:!0,get:function(){return Rw.refCount}}),kw=Rv,Object.defineProperty(C,"sample",{enumerable:!0,get:function(){return kw.sample}}),Aw=xv,Object.defineProperty(C,"sampleTime",{enumerable:!0,get:function(){return Aw.sampleTime}}),Mw=Fv,Object.defineProperty(C,"scan",{enumerable:!0,get:function(){return Mw.scan}}),Nw=Gd,Object.defineProperty(C,"sequenceEqual",{enumerable:!0,get:function(){return Nw.sequenceEqual}}),xw=Gv,Object.defineProperty(C,"share",{enumerable:!0,get:function(){return xw.share}}),Dw=em,Object.defineProperty(C,"shareReplay",{enumerable:!0,get:function(){return Dw.shareReplay}}),Uw=nm,Object.defineProperty(C,"single",{enumerable:!0,get:function(){return Uw.single}}),Lw=cm,Object.defineProperty(C,"skip",{enumerable:!0,get:function(){return Lw.skip}}),Fw=fm,Object.defineProperty(C,"skipLast",{enumerable:!0,get:function(){return Fw.skipLast}}),Bw=bm,Object.defineProperty(C,"skipUntil",{enumerable:!0,get:function(){return Bw.skipUntil}}),Ww=gm,Object.defineProperty(C,"skipWhile",{enumerable:!0,get:function(){return Ww.skipWhile}}),zw=Em,Object.defineProperty(C,"startWith",{enumerable:!0,get:function(){return zw.startWith}}),qw=j,Object.defineProperty(C,"subscribeOn",{enumerable:!0,get:function(){return qw.subscribeOn}}),Vw=jm,Object.defineProperty(C,"switchAll",{enumerable:!0,get:function(){return Vw.switchAll}}),Hw=Cm,Object.defineProperty(C,"switchMap",{enumerable:!0,get:function(){return Hw.switchMap}}),Gw=Nm,Object.defineProperty(C,"switchMapTo",{enumerable:!0,get:function(){return Gw.switchMapTo}}),Yw=Um,Object.defineProperty(C,"switchScan",{enumerable:!0,get:function(){return Yw.switchScan}}),Kw=ob,Object.defineProperty(C,"take",{enumerable:!0,get:function(){return Kw.take}}),Zw=zy,Object.defineProperty(C,"takeLast",{enumerable:!0,get:function(){return Zw.takeLast}}),Qw=Bm,Object.defineProperty(C,"takeUntil",{enumerable:!0,get:function(){return Qw.takeUntil}}),Xw=Hm,Object.defineProperty(C,"takeWhile",{enumerable:!0,get:function(){return Xw.takeWhile}}),Jw=Km,Object.defineProperty(C,"tap",{enumerable:!0,get:function(){return Jw.tap}}),$w=y,Object.defineProperty(C,"throttle",{enumerable:!0,get:function(){return $w.throttle}}),eE=r0,Object.defineProperty(C,"throttleTime",{enumerable:!0,get:function(){return eE.throttleTime}}),tE=Bb,Object.defineProperty(C,"throwIfEmpty",{enumerable:!0,get:function(){return tE.throwIfEmpty}}),rE=u0,Object.defineProperty(C,"timeInterval",{enumerable:!0,get:function(){return rE.timeInterval}}),nE=As,Object.defineProperty(C,"timeout",{enumerable:!0,get:function(){return nE.timeout}}),oE=f0,Object.defineProperty(C,"timeoutWith",{enumerable:!0,get:function(){return oE.timeoutWith}}),iE=yc,Object.defineProperty(C,"timestamp",{enumerable:!0,get:function(){return iE.timestamp}}),uE=Vd,Object.defineProperty(C,"toArray",{enumerable:!0,get:function(){return uE.toArray}}),aE=u,Object.defineProperty(C,"window",{enumerable:!0,get:function(){return aE.window}}),sE=w0,Object.defineProperty(C,"windowCount",{enumerable:!0,get:function(){return sE.windowCount}}),cE=j0,Object.defineProperty(C,"windowTime",{enumerable:!0,get:function(){return cE.windowTime}}),lE=oc,Object.defineProperty(C,"windowToggle",{enumerable:!0,get:function(){return lE.windowToggle}}),fE=Q,Object.defineProperty(C,"windowWhen",{enumerable:!0,get:function(){return fE.windowWhen}}),pE=K0,Object.defineProperty(C,"withLatestFrom",{enumerable:!0,get:function(){return pE.withLatestFrom}}),dE=O,Object.defineProperty(C,"zipAll",{enumerable:!0,get:function(){return dE.zipAll}}),hE=T,Object.defineProperty(C,"zipWith",{enumerable:!0,get:function(){return hE.zipWith}});var o={},w={},vE=(Object.defineProperty(w,"__esModule",{value:!0}),w.partition=void 0,wp),mE=Ep;w.partition=function(t,r){return function(e){return[mE.filter(t,r)(e),mE.filter(vE.not(t,r))(e)]}};var gE,OE,wE,EE,PE,SE,TE,jE,CE,IE,RE,kE,AE,ME,NE,xE,DE,UE,LE,FE,BE,WE,zE,qE,VE,HE,GE,YE,KE,ZE,QE,XE,JE,$E,eP,tP,rP,nP,oP,iP,uP,aP,sP,cP,lP,fP,pP,dP,hP,bP,yP,_P,vP,mP,gP,OP,wP,EP,PP,SP,TP,jP,CP,IP,RP,kP,AP,MP,NP,xP,DP,UP,LP,FP,BP,WP,zP,qP,VP,HP,GP,YP,KP,ZP,QP,XP,JP,$P,eS,tS,rS,nS,oS,iS,uS,aS,sS,cS,lS,fS,pS,dS,hS,bS,yS,_S,vS,mS,gS,OS,wS,ES,PS,p={},SS=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},TS=r&&r.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e},jS=(Object.defineProperty(p,"__esModule",{value:!0}),p.race=void 0,pp),CS=rv;p.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return CS.raceWith.apply(void 0,TS([],SS(jS.argsOrArgArray(e))))},g=o,Object.defineProperty(g,"__esModule",{value:!0}),g.mergeAll=g.merge=g.max=g.materialize=g.mapTo=g.map=g.last=g.isEmpty=g.ignoreElements=g.groupBy=g.first=g.findIndex=g.find=g.finalize=g.filter=g.expand=g.exhaustMap=g.exhaustAll=g.exhaust=g.every=g.endWith=g.elementAt=g.distinctUntilKeyChanged=g.distinctUntilChanged=g.distinct=g.dematerialize=g.delayWhen=g.delay=g.defaultIfEmpty=g.debounceTime=g.debounce=g.count=g.connect=g.concatWith=g.concatMapTo=g.concatMap=g.concatAll=g.concat=g.combineLatestWith=g.combineLatest=g.combineLatestAll=g.combineAll=g.catchError=g.bufferWhen=g.bufferToggle=g.bufferTime=g.bufferCount=g.buffer=g.auditTime=g.audit=void 0,g.timeInterval=g.throwIfEmpty=g.throttleTime=g.throttle=g.tap=g.takeWhile=g.takeUntil=g.takeLast=g.take=g.switchScan=g.switchMapTo=g.switchMap=g.switchAll=g.subscribeOn=g.startWith=g.skipWhile=g.skipUntil=g.skipLast=g.skip=g.single=g.shareReplay=g.share=g.sequenceEqual=g.scan=g.sampleTime=g.sample=g.refCount=g.retryWhen=g.retry=g.repeatWhen=g.repeat=g.reduce=g.raceWith=g.race=g.publishReplay=g.publishLast=g.publishBehavior=g.publish=g.pluck=g.partition=g.pairwise=g.onErrorResumeNext=g.observeOn=g.multicast=g.min=g.mergeWith=g.mergeScan=g.mergeMapTo=g.mergeMap=g.flatMap=void 0,g.zipWith=g.zipAll=g.zip=g.withLatestFrom=g.windowWhen=g.windowToggle=g.windowTime=g.windowCount=g.window=g.toArray=g.timestamp=g.timeoutWith=g.timeout=void 0,gE=Jp,Object.defineProperty(g,"audit",{enumerable:!0,get:function(){return gE.audit}}),OE=rd,Object.defineProperty(g,"auditTime",{enumerable:!0,get:function(){return OE.auditTime}}),wE=ud,Object.defineProperty(g,"buffer",{enumerable:!0,get:function(){return wE.buffer}}),EE=fd,Object.defineProperty(g,"bufferCount",{enumerable:!0,get:function(){return EE.bufferCount}}),PE=yd,Object.defineProperty(g,"bufferTime",{enumerable:!0,get:function(){return PE.bufferTime}}),SE=Sd,Object.defineProperty(g,"bufferToggle",{enumerable:!0,get:function(){return SE.bufferToggle}}),TE=Md,Object.defineProperty(g,"bufferWhen",{enumerable:!0,get:function(){return TE.bufferWhen}}),jE=Ld,Object.defineProperty(g,"catchError",{enumerable:!0,get:function(){return jE.catchError}}),CE=zd,Object.defineProperty(g,"combineAll",{enumerable:!0,get:function(){return CE.combineAll}}),IE=qd,Object.defineProperty(g,"combineLatestAll",{enumerable:!0,get:function(){return IE.combineLatestAll}}),RE=ah,Object.defineProperty(g,"combineLatest",{enumerable:!0,get:function(){return RE.combineLatest}}),kE=uh,Object.defineProperty(g,"combineLatestWith",{enumerable:!0,get:function(){return kE.combineLatestWith}}),AE=Th,Object.defineProperty(g,"concat",{enumerable:!0,get:function(){return AE.concat}}),ME=Zl,Object.defineProperty(g,"concatAll",{enumerable:!0,get:function(){return ME.concatAll}}),NE=pl,Object.defineProperty(g,"concatMap",{enumerable:!0,get:function(){return NE.concatMap}}),xE=wh,Object.defineProperty(g,"concatMapTo",{enumerable:!0,get:function(){return xE.concatMapTo}}),DE=Sh,Object.defineProperty(g,"concatWith",{enumerable:!0,get:function(){return DE.concatWith}}),UE=Dh,Object.defineProperty(g,"connect",{enumerable:!0,get:function(){return UE.connect}}),LE=Uh,Object.defineProperty(g,"count",{enumerable:!0,get:function(){return LE.count}}),FE=Hh,Object.defineProperty(g,"debounce",{enumerable:!0,get:function(){return FE.debounce}}),BE=I,Object.defineProperty(g,"debounceTime",{enumerable:!0,get:function(){return BE.debounceTime}}),WE=$h,Object.defineProperty(g,"defaultIfEmpty",{enumerable:!0,get:function(){return WE.defaultIfEmpty}}),zE=rb,Object.defineProperty(g,"delay",{enumerable:!0,get:function(){return zE.delay}}),qE=nb,Object.defineProperty(g,"delayWhen",{enumerable:!0,get:function(){return qE.delayWhen}}),VE=Eb,Object.defineProperty(g,"dematerialize",{enumerable:!0,get:function(){return VE.dematerialize}}),HE=jb,Object.defineProperty(g,"distinct",{enumerable:!0,get:function(){return HE.distinct}}),GE=Ab,Object.defineProperty(g,"distinctUntilChanged",{enumerable:!0,get:function(){return GE.distinctUntilChanged}}),YE=Ub,Object.defineProperty(g,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return YE.distinctUntilKeyChanged}}),KE=Fb,Object.defineProperty(g,"elementAt",{enumerable:!0,get:function(){return KE.elementAt}}),ZE=Qb,Object.defineProperty(g,"endWith",{enumerable:!0,get:function(){return ZE.endWith}}),QE=ty,Object.defineProperty(g,"every",{enumerable:!0,get:function(){return QE.every}}),XE=oy,Object.defineProperty(g,"exhaust",{enumerable:!0,get:function(){return XE.exhaust}}),JE=iy,Object.defineProperty(g,"exhaustAll",{enumerable:!0,get:function(){return JE.exhaustAll}}),$E=uy,Object.defineProperty(g,"exhaustMap",{enumerable:!0,get:function(){return $E.exhaustMap}}),eP=dy,Object.defineProperty(g,"expand",{enumerable:!0,get:function(){return eP.expand}}),tP=Ep,Object.defineProperty(g,"filter",{enumerable:!0,get:function(){return tP.filter}}),rP=yy,Object.defineProperty(g,"finalize",{enumerable:!0,get:function(){return rP.finalize}}),nP=vy,Object.defineProperty(g,"find",{enumerable:!0,get:function(){return nP.find}}),oP=wy,Object.defineProperty(g,"findIndex",{enumerable:!0,get:function(){return oP.findIndex}}),iP=Sy,Object.defineProperty(g,"first",{enumerable:!0,get:function(){return iP.first}}),uP=Ay,Object.defineProperty(g,"groupBy",{enumerable:!0,get:function(){return uP.groupBy}}),aP=sb,Object.defineProperty(g,"ignoreElements",{enumerable:!0,get:function(){return aP.ignoreElements}}),sP=Ly,Object.defineProperty(g,"isEmpty",{enumerable:!0,get:function(){return sP.isEmpty}}),cP=Wy,Object.defineProperty(g,"last",{enumerable:!0,get:function(){return cP.last}}),lP=dl,Object.defineProperty(g,"map",{enumerable:!0,get:function(){return lP.map}}),fP=pb,Object.defineProperty(g,"mapTo",{enumerable:!0,get:function(){return fP.mapTo}}),pP=$y,Object.defineProperty(g,"materialize",{enumerable:!0,get:function(){return pP.materialize}}),dP=n_,Object.defineProperty(g,"max",{enumerable:!0,get:function(){return dP.max}}),hP=d_,Object.defineProperty(g,"merge",{enumerable:!0,get:function(){return hP.merge}}),bP=Ql,Object.defineProperty(g,"mergeAll",{enumerable:!0,get:function(){return bP.mergeAll}}),yP=u_,Object.defineProperty(g,"flatMap",{enumerable:!0,get:function(){return yP.flatMap}}),_P=Xl,Object.defineProperty(g,"mergeMap",{enumerable:!0,get:function(){return _P.mergeMap}}),vP=a_,Object.defineProperty(g,"mergeMapTo",{enumerable:!0,get:function(){return vP.mergeMapTo}}),mP=l_,Object.defineProperty(g,"mergeScan",{enumerable:!0,get:function(){return mP.mergeScan}}),gP=Jl,Object.defineProperty(g,"mergeWith",{enumerable:!0,get:function(){return gP.mergeWith}}),OP=P_,Object.defineProperty(g,"min",{enumerable:!0,get:function(){return OP.min}}),wP=j_,Object.defineProperty(g,"multicast",{enumerable:!0,get:function(){return wP.multicast}}),EP=_,Object.defineProperty(g,"observeOn",{enumerable:!0,get:function(){return EP.observeOn}}),PP=k_,Object.defineProperty(g,"onErrorResumeNext",{enumerable:!0,get:function(){return PP.onErrorResumeNext}}),SP=U_,Object.defineProperty(g,"pairwise",{enumerable:!0,get:function(){return SP.pairwise}}),TP=w,Object.defineProperty(g,"partition",{enumerable:!0,get:function(){return TP.partition}}),jP=B_,Object.defineProperty(g,"pluck",{enumerable:!0,get:function(){return jP.pluck}}),CP=z_,Object.defineProperty(g,"publish",{enumerable:!0,get:function(){return CP.publish}}),IP=G_,Object.defineProperty(g,"publishBehavior",{enumerable:!0,get:function(){return IP.publishBehavior}}),RP=Z_,Object.defineProperty(g,"publishLast",{enumerable:!0,get:function(){return RP.publishLast}}),kP=J_,Object.defineProperty(g,"publishReplay",{enumerable:!0,get:function(){return kP.publishReplay}}),AP=p,Object.defineProperty(g,"race",{enumerable:!0,get:function(){return AP.race}}),MP=rv,Object.defineProperty(g,"raceWith",{enumerable:!0,get:function(){return MP.raceWith}}),NP=Hd,Object.defineProperty(g,"reduce",{enumerable:!0,get:function(){return NP.reduce}}),xP=sv,Object.defineProperty(g,"repeat",{enumerable:!0,get:function(){return xP.repeat}}),DP=hv,Object.defineProperty(g,"repeatWhen",{enumerable:!0,get:function(){return DP.repeatWhen}}),UP=mv,Object.defineProperty(g,"retry",{enumerable:!0,get:function(){return UP.retry}}),LP=Sv,Object.defineProperty(g,"retryWhen",{enumerable:!0,get:function(){return LP.retryWhen}}),FP=kt,Object.defineProperty(g,"refCount",{enumerable:!0,get:function(){return FP.refCount}}),BP=Rv,Object.defineProperty(g,"sample",{enumerable:!0,get:function(){return BP.sample}}),WP=xv,Object.defineProperty(g,"sampleTime",{enumerable:!0,get:function(){return WP.sampleTime}}),zP=Fv,Object.defineProperty(g,"scan",{enumerable:!0,get:function(){return zP.scan}}),qP=Gd,Object.defineProperty(g,"sequenceEqual",{enumerable:!0,get:function(){return qP.sequenceEqual}}),VP=Gv,Object.defineProperty(g,"share",{enumerable:!0,get:function(){return VP.share}}),HP=em,Object.defineProperty(g,"shareReplay",{enumerable:!0,get:function(){return HP.shareReplay}}),GP=nm,Object.defineProperty(g,"single",{enumerable:!0,get:function(){return GP.single}}),YP=cm,Object.defineProperty(g,"skip",{enumerable:!0,get:function(){return YP.skip}}),KP=fm,Object.defineProperty(g,"skipLast",{enumerable:!0,get:function(){return KP.skipLast}}),ZP=bm,Object.defineProperty(g,"skipUntil",{enumerable:!0,get:function(){return ZP.skipUntil}}),QP=gm,Object.defineProperty(g,"skipWhile",{enumerable:!0,get:function(){return QP.skipWhile}}),XP=Em,Object.defineProperty(g,"startWith",{enumerable:!0,get:function(){return XP.startWith}}),JP=j,Object.defineProperty(g,"subscribeOn",{enumerable:!0,get:function(){return JP.subscribeOn}}),$P=jm,Object.defineProperty(g,"switchAll",{enumerable:!0,get:function(){return $P.switchAll}}),eS=Cm,Object.defineProperty(g,"switchMap",{enumerable:!0,get:function(){return eS.switchMap}}),tS=Nm,Object.defineProperty(g,"switchMapTo",{enumerable:!0,get:function(){return tS.switchMapTo}}),rS=Um,Object.defineProperty(g,"switchScan",{enumerable:!0,get:function(){return rS.switchScan}}),nS=ob,Object.defineProperty(g,"take",{enumerable:!0,get:function(){return nS.take}}),oS=zy,Object.defineProperty(g,"takeLast",{enumerable:!0,get:function(){return oS.takeLast}}),iS=Bm,Object.defineProperty(g,"takeUntil",{enumerable:!0,get:function(){return iS.takeUntil}}),uS=Hm,Object.defineProperty(g,"takeWhile",{enumerable:!0,get:function(){return uS.takeWhile}}),aS=Km,Object.defineProperty(g,"tap",{enumerable:!0,get:function(){return aS.tap}}),sS=y,Object.defineProperty(g,"throttle",{enumerable:!0,get:function(){return sS.throttle}}),cS=r0,Object.defineProperty(g,"throttleTime",{enumerable:!0,get:function(){return cS.throttleTime}}),lS=Bb,Object.defineProperty(g,"throwIfEmpty",{enumerable:!0,get:function(){return lS.throwIfEmpty}}),fS=u0,Object.defineProperty(g,"timeInterval",{enumerable:!0,get:function(){return fS.timeInterval}}),pS=As,Object.defineProperty(g,"timeout",{enumerable:!0,get:function(){return pS.timeout}}),dS=f0,Object.defineProperty(g,"timeoutWith",{enumerable:!0,get:function(){return dS.timeoutWith}}),hS=yc,Object.defineProperty(g,"timestamp",{enumerable:!0,get:function(){return hS.timestamp}}),bS=Vd,Object.defineProperty(g,"toArray",{enumerable:!0,get:function(){return bS.toArray}}),yS=u,Object.defineProperty(g,"window",{enumerable:!0,get:function(){return yS.window}}),_S=w0,Object.defineProperty(g,"windowCount",{enumerable:!0,get:function(){return _S.windowCount}}),vS=j0,Object.defineProperty(g,"windowTime",{enumerable:!0,get:function(){return vS.windowTime}}),mS=oc,Object.defineProperty(g,"windowToggle",{enumerable:!0,get:function(){return mS.windowToggle}}),gS=Q,Object.defineProperty(g,"windowWhen",{enumerable:!0,get:function(){return gS.windowWhen}}),OS=K0,Object.defineProperty(g,"withLatestFrom",{enumerable:!0,get:function(){return OS.withLatestFrom}}),wS=l,Object.defineProperty(g,"zip",{enumerable:!0,get:function(){return wS.zip}}),ES=O,Object.defineProperty(g,"zipAll",{enumerable:!0,get:function(){return ES.zipAll}}),PS=T,Object.defineProperty(g,"zipWith",{enumerable:!0,get:function(){return PS.zipWith}});var f={},IS=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},RS=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},kS=(Object.defineProperty(f,"__esModule",{value:!0}),e),AS=tn,MS=o,NS=0,xS=1,DS=2;function US(e,t){e=e.pipe((0,MS.publishReplay)(1),(0,MS.refCount)());this._result=e,this._keys=e.pipe((0,MS.mergeMap)(function(e){return(0,AS.from)(e.keys())}),(0,MS.publishReplay)(1),(0,MS.refCount)()),this._records=void 0,this._controls=new LS,this._summary=new AS.ReplaySubject,this._state=t||NS}US.prototype.keys=function(){return this._keys},US.prototype.records=function(){var r=this,e=this._result.pipe((0,MS.mergeMap)(function(t){return new AS.Observable(function(e){return r._startStreaming({result:t,recordsObserver:e})})}));return e.push=function(){return r._push()},e},US.prototype.consume=function(){var r=this;return this._result.pipe((0,MS.mergeMap)(function(t){return new AS.Observable(function(e){return r._startStreaming({result:t,summaryObserver:e})})}))},US.prototype.pause=function(){this._controls.pause()},US.prototype.resume=function(){return this._controls.resume()},US.prototype.push=function(){return this._controls.push()},US.prototype._startStreaming=function(e){var e=void 0===e?{}:e,t=e.result,r=e.recordsObserver,r=void 0===r?null:r,e=e.summaryObserver,e=void 0===e?null:e,n=[];return e&&n.push(this._summary.subscribe(e)),this._state<xS?(this._state=xS,this._setupRecordsStream(t),r?n.push(this._records.subscribe(r)):t._cancel(),n.push({unsubscribe:function(){t._cancel&&t._cancel()}})):r&&r.error((0,kS.newError)("Streaming has already started/consumed with a previous records or summary subscription.")),function(){n.forEach(function(e){return e.unsubscribe()})}},US.prototype._toObservable=function(){var n=this;return new AS.Observable(function(r){n._result.subscribe({complete:function(){return r.complete()},next:function(e){return r.next(new US((t=e,new AS.Observable(function(e){e.next(t),e.complete()}))),n._state);var t},error:function(e){return r.error(e)}})})},US.prototype._setupRecordsStream=function(n){var t=this;return this._records||(this._records=function(o,i,u){var e=this;void 0===u&&(u=new LS);var a=new AS.Subject,s=function(n){return IS(e,void 0,void 0,function(){var t,r;return RS(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,3,4]),u.pushing=!0,[4,n];case 1:return t=e.sent(),r=t.done,t=t.value,r?(a.complete(),i.complete()):(a.next(t),u.paused||s(o.next()).catch(function(){})),[3,4];case 2:return r=e.sent(),a.error(r),i.error(r),[3,4];case 3:return u.pushing=!1,[7];case 4:return[2]}})})};function t(t){return IS(this,void 0,void 0,function(){return RS(this,function(e){switch(e.label){case 0:return[4,s(o.next(t))];case 1:return e.sent(),[2]}})})}return(u.pusher=t)(),a}(n[Symbol.asyncIterator](),{complete:function(){return IS(t,void 0,void 0,function(){var t,r;return RS(this,function(e){switch(e.label){case 0:return this._state=DS,r=(t=this._summary).next,[4,n.summary()];case 1:return r.apply(t,[e.sent()]),this._summary.complete(),[2]}})})},error:function(e){t._state=DS,t._summary.error(e)}},this._controls),this._records)},f.default=US;FS.prototype.pause=function(){this._paused=!0},Object.defineProperty(FS.prototype,"paused",{get:function(){return this._paused},enumerable:!1,configurable:!0}),Object.defineProperty(FS.prototype,"pushing",{get:function(){return this._pushing},set:function(e){this._pushing=e},enumerable:!1,configurable:!0}),FS.prototype.resume=function(){return IS(this,void 0,void 0,function(){var t;return RS(this,function(e){switch(e.label){case 0:return t=this._paused,this._paused=!1,!t||this._pushing?[3,2]:[4,this._push()];case 1:e.sent(),e.label=2;case 2:return[2]}})})},FS.prototype.push=function(){return IS(this,void 0,void 0,function(){return RS(this,function(e){switch(e.label){case 0:return this.pause(),[4,this._push()];case 1:return[2,e.sent()]}})})},Object.defineProperty(FS.prototype,"pusher",{get:function(){return this._push},set:function(e){this._push=e},enumerable:!1,configurable:!0});var LS=FS;function FS(e){void 0===e&&(e=function(){return IS(t,void 0,void 0,function(){return RS(this,function(e){return[2]})})});var t=this;this._paused=!1,this._pushing=!1,this._push=e}var t={},i=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},BS=(Object.defineProperty(t,"__esModule",{value:!0}),tn),WS=i(f);function zS(e){this._txc=e}i(e),zS.prototype.run=function(e,r){var n=this;return new WS.default(new BS.Observable(function(t){try{t.next(n._txc.run(e,r)),t.complete()}catch(e){t.error(e)}return function(){}}))},zS.prototype.commit=function(){var e=this;return new BS.Observable(function(t){e._txc.commit().then(function(){t.complete()}).catch(function(e){return t.error(e)})})},zS.prototype.rollback=function(){var e=this;return new BS.Observable(function(t){e._txc.rollback().then(function(){t.complete()}).catch(function(e){return t.error(e)})})},zS.prototype.isOpen=function(){return this._txc.isOpen()},zS.prototype.close=function(){var e=this;return new BS.Observable(function(t){e._txc.close().then(function(){t.complete()}).catch(function(e){return t.error(e)})})},t.default=zS;X={},Qt=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};function qS(e){e=e.run;this._run=e}Object.defineProperty(X,"__esModule",{value:!0}),Qt(f),Qt(t),qS.fromTransaction=function(e){return new qS({run:e.run.bind(e)})},qS.prototype.run=function(e,t){return this._run(e,t)},X.default=qS;var ia={},VS=(Object.defineProperty(ia,"__esModule",{value:!0}),e),HS=tn,GS=o,YS=(VS.internal.logger.Logger,VS.error.SERVICE_UNAVAILABLE);function KS(e){var e=void 0===e?{}:e,t=e.maxRetryTimeout,r=e.initialDelay,r=void 0===r?1e3:r,n=e.delayMultiplier,n=void 0===n?2:n,o=e.delayJitter,o=void 0===o?.2:o,e=e.logger,e=void 0===e?null:e;this._maxRetryTimeout=ZS(void 0===t?3e4:t,3e4),this._initialDelay=ZS(r,1e3),this._delayMultiplier=ZS(n,2),this._delayJitter=ZS(o,.2),this._logger=e}function ZS(e,t){return e||0===e?e:t}KS.prototype.retry=function(e){var a=this;return e.pipe((0,GS.retryWhen)(function(e){var n=[],o=Date.now(),i=1,u=a._initialDelay;return e.pipe((0,GS.mergeMap)(function(e){if(!(0,VS.isRetriableError)(e))return(0,HS.throwError)(function(){return e});var t;if(n.push(e),2<=i&&Date.now()-o>=a._maxRetryTimeout)return(t=(0,VS.newError)("Failed after retried for ".concat(i," times in ").concat(a._maxRetryTimeout," ms. Make sure that your database is online and retry again."),YS)).seenErrors=n,(0,HS.throwError)(function(){return t});var r=a._computeNextDelay(u);return u*=a._delayMultiplier,i++,a._logger&&a._logger.warn("Transaction failed and will be retried in ".concat(r)),(0,HS.of)(1).pipe((0,GS.delay)(r))}))}))},KS.prototype._computeNextDelay=function(e){var t=e*this._delayJitter;return e-t+2*t*Math.random()},ia.default=KS;var ka=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},QS=(Object.defineProperty(pr,"__esModule",{value:!0}),tn),XS=o,JS=ka(f),Wa=e,$S=ka(t),eT=ka(X),tT=ka(ia),Ha=Wa.internal.constants,rT=Ha.ACCESS_MODE_READ,nT=Ha.ACCESS_MODE_WRITE,oT=Ha.TELEMETRY_APIS,iT=Wa.internal.txConfig.TxConfig;function uT(e){var e=void 0===e?{}:e,t=e.session,r=e.config,e=e.log;this._session=t,this._retryLogic=function(e){e=e&&e.maxTransactionRetryTime?e.maxTransactionRetryTime:null;return new tT.default({maxRetryTimeout:e})}(r),this._log=e}uT.prototype.run=function(e,r,n){var o=this;return new JS.default(new QS.Observable(function(t){try{t.next(o._session.run(e,r,n)),t.complete()}catch(e){t.error(e)}return function(){}}))},uT.prototype.beginTransaction=function(e){return this._beginTransaction(this._session._mode,e,{api:oT.UNMANAGED_TRANSACTION})},uT.prototype.readTransaction=function(e,t){return this._runTransaction(rT,e,t)},uT.prototype.writeTransaction=function(e,t){return this._runTransaction(nT,e,t)},uT.prototype.executeRead=function(e,t){return this._executeInTransaction(rT,e,t)},uT.prototype.executeWrite=function(e,t){return this._executeInTransaction(nT,e,t)},uT.prototype._executeInTransaction=function(e,t,r){return this._runTransaction(e,t,r,function(e){return new eT.default({run:e.run.bind(e)})})},uT.prototype.close=function(){var e=this;return new QS.Observable(function(t){e._session.close().then(function(){t.complete()}).catch(function(e){return t.error(e)})})},uT.prototype[Symbol.asyncDispose]=function(){return this.close()},uT.prototype.lastBookmark=function(){return this.lastBookmarks()},uT.prototype.lastBookmarks=function(){return this._session.lastBookmarks()},uT.prototype._beginTransaction=function(e,t,r){var n=this,o=iT.empty();return t&&(o=new iT(t,this._log)),new QS.Observable(function(t){try{n._session._beginTransaction(e,o,r).then(function(e){t.next(new $S.default(e)),t.complete()}).catch(function(e){return t.error(e)})}catch(e){t.error(e)}return function(){}})},uT.prototype._runTransaction=function(e,r,t,n){var o=this,i=(void 0===n&&(n=function(e){return e}),iT.empty()),u=(t&&(i=new iT(t)),{apiTelemetryConfig:{api:oT.MANAGED_TRANSACTION,onTelemetrySuccess:function(){u.apiTelemetryConfig=void 0}}});return this._retryLogic.retry((0,QS.of)(1).pipe((0,XS.mergeMap)(function(){return o._beginTransaction(e,i,u.apiTelemetryConfig)}),(0,XS.mergeMap)(function(t){return(0,QS.defer)(function(){try{return r(n(t))}catch(e){return(0,QS.throwError)(function(){return e})}}).pipe((0,XS.catchError)(function(e){return t.rollback().pipe((0,XS.concatWith)((0,QS.throwError)(function(){return e})))}),(0,XS.concatWith)(t.commit()))})))},pr.default=uT;var aT,sT,da=r&&r.__extends||(aT=function(e,t){return(aT=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}aT(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),b=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},P=(Object.defineProperty(B,"__esModule",{value:!0}),B.WRITE=B.READ=B.Driver=void 0,e),cT=b(pr),lT=P.internal.constants.FETCH_ALL,ua=P.driver.READ,fT=P.driver.WRITE,n=(B.READ=ua,B.WRITE=fT,da(pT,sT=P.Driver),pT.prototype.rxSession=function(e){var e=void 0===e?{}:e,t=e.defaultAccessMode,r=e.bookmarks,n=e.database,o=e.fetchSize,i=e.impersonatedUser,u=e.bookmarkManager,a=e.notificationFilter,e=e.auth;return new cT.default({session:this._newSession({defaultAccessMode:void 0===t?fT:t,bookmarkOrBookmarks:r,database:void 0===n?"":n,impersonatedUser:i,auth:e,reactive:!1,fetchSize:function(e,t){e=parseInt(e,10);{if(0<e||e===lT)return e;if(0===e||e<0)throw new Error("The fetch size can only be a positive value or ".concat(lT," for ALL. However fetchSize = ").concat(e));return t}}(o,this._config.fetchSize),bookmarkManager:u,notificationFilter:a,log:this._log}),config:this._config,log:this._log})},pT);function pT(){return null!==sT&&sT.apply(this,arguments)||this}B.Driver=n,B.default=n;v={},Object.defineProperty(v,"__esModule",{value:!0}),v.default="5.18.0",S={},Cs={},Os={};function dT(){}Object.defineProperty(Os,"__esModule",{value:!0}),dT.prototype.selectReader=function(e){throw new Error("Abstract function")},dT.prototype.selectWriter=function(e){throw new Error("Abstract function")},Os.default=dT;Ps={},Ts={};function hT(e){this._offset=e||0}Object.defineProperty(Ts,"__esModule",{value:!0}),hT.prototype.next=function(e){if(0===e)return-1;var t=this._offset;return this._offset+=1,this._offset===Number.MAX_SAFE_INTEGER&&(this._offset=0),t%e},Ts.default=hT;var bT,yT,ms=r&&r.__extends||(bT=function(e,t){return(bT=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}bT(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Sc=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},_T=(Object.defineProperty(Ps,"__esModule",{value:!0}),Sc(Ts)),dt=Sc(Os),pc=(yT=dt.default,ms(vT,yT),vT.prototype.selectReader=function(e){return this._select(e,this._readersIndex)},vT.prototype.selectWriter=function(e){return this._select(e,this._writersIndex)},vT.prototype._select=function(e,t){var r=e.length;if(0===r)return null;var n=t.next(r),o=n,i=null,u=Number.MAX_SAFE_INTEGER;do{var a=e[o],s=this._connectionPool.activeResourceCount(a)}while(s<u&&(i=a,u=s),o===r-1?o=0:o++,o!==n);return i},vT);function vT(e){var t=yT.call(this)||this;return t._readersIndex=new _T.default,t._writersIndex=new _T.default,t._connectionPool=e,t}Ps.default=pc;Qr=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(Cs,"__esModule",{value:!0}),Cs.LeastConnectedLoadBalancingStrategy=Cs.LoadBalancingStrategy=void 0,js=Qr(Os),Cs.LoadBalancingStrategy=js.default,Il=Qr(Ps),Cs.LeastConnectedLoadBalancingStrategy=Il.default,Cs.default=Il.default,E={},Kl={},hf={},bf={},wf={},bs={},kl={},Dl={byteLength:function(e){var e=ST(e),t=e[0],e=e[1];return 3*(t+e)/4-e}};Dl.toByteArray=function(e){var t,r,n=ST(e),o=n[0],n=n[1],i=new OT(function(e,t){return 3*(e+t)/4-t}(o,n)),u=0,a=0<n?o-4:o;for(r=0;r<a;r+=4)t=gT[e.charCodeAt(r)]<<18|gT[e.charCodeAt(r+1)]<<12|gT[e.charCodeAt(r+2)]<<6|gT[e.charCodeAt(r+3)],i[u++]=t>>16&255,i[u++]=t>>8&255,i[u++]=255&t;2===n&&(t=gT[e.charCodeAt(r)]<<2|gT[e.charCodeAt(r+1)]>>4,i[u++]=255&t);1===n&&(t=gT[e.charCodeAt(r)]<<10|gT[e.charCodeAt(r+1)]<<4|gT[e.charCodeAt(r+2)]>>2,i[u++]=t>>8&255,i[u++]=255&t);return i},Dl.fromByteArray=function(e){for(var t,r=e.length,n=r%3,o=[],i=0,u=r-n;i<u;i+=16383)o.push(function(e,t,r){for(var n,o=[],i=t;i<r;i+=3)n=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(255&e[i+2]),o.push(function(e){return mT[e>>18&63]+mT[e>>12&63]+mT[e>>6&63]+mT[63&e]}(n));return o.join("")}(e,i,u<i+16383?u:i+16383));1==n?(t=e[r-1],o.push(mT[t>>2]+mT[t<<4&63]+"==")):2==n&&(t=(e[r-2]<<8)+e[r-1],o.push(mT[t>>10]+mT[t>>4&63]+mT[t<<2&63]+"="));return o.join("")};for(var mT=[],gT=[],OT="undefined"!=typeof Uint8Array?Uint8Array:Array,wT="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ET=0,PT=wT.length;ET<PT;++ET)mT[ET]=wT[ET],gT[wT.charCodeAt(ET)]=ET;function ST(e){var t=e.length;if(0<t%4)throw new Error("Invalid string. Length must be a multiple of 4");e=e.indexOf("="),t=(e=-1===e?t:e)===t?0:4-e%4;return[e,t]}gT["-".charCodeAt(0)]=62,gT["_".charCodeAt(0)]=63;vs={read:function(e,t,r,n,o){var i,u,a=8*o-n-1,s=(1<<a)-1,c=s>>1,l=-7,f=r?o-1:0,p=r?-1:1,o=e[t+f];for(f+=p,i=o&(1<<-l)-1,o>>=-l,l+=a;0<l;i=256*i+e[t+f],f+=p,l-=8);for(u=i&(1<<-l)-1,i>>=-l,l+=n;0<l;u=256*u+e[t+f],f+=p,l-=8);if(0===i)i=1-c;else{if(i===s)return u?NaN:1/0*(o?-1:1);u+=Math.pow(2,n),i-=c}return(o?-1:1)*u*Math.pow(2,i-n)},write:function(e,t,r,n,o,i){var u,a,s=8*i-o-1,c=(1<<s)-1,l=c>>1,f=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:i-1,d=n?1:-1,i=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,u=c):(u=Math.floor(Math.log(t)/Math.LN2),t*(n=Math.pow(2,-u))<1&&(u--,n*=2),2<=(t+=1<=u+l?f/n:f*Math.pow(2,1-l))*n&&(u++,n/=2),c<=u+l?(a=0,u=c):1<=u+l?(a=(t*n-1)*Math.pow(2,o),u+=l):(a=t*Math.pow(2,l-1)*Math.pow(2,o),u=0));8<=o;e[r+p]=255&a,p+=d,a/=256,o-=8);for(u=u<<o|a,s+=o;0<s;e[r+p]=255&u,p+=d,u/=256,s-=8);e[r+p-d]|=128*i}};{var TT=kl;const lN=Dl,fN=vs,pN=(vc="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null,TT.Buffer=R,TT.SlowBuffer=function(e){+e!=e&&(e=0);return R.alloc(+e)},TT.INSPECT_MAX_BYTES=50,2147483647);function jT(e){if(e>pN)throw new RangeError('The value "'+e+'" is invalid for option "size"');e=new Uint8Array(e);return Object.setPrototypeOf(e,R.prototype),e}function R(e,t,r){if("number"!=typeof e)return CT(e,t,r);if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return RT(e)}function CT(t,r,e){if("string"==typeof t){var n=t;var o=r;"string"==typeof o&&""!==o||(o="utf8");if(!R.isEncoding(o))throw new TypeError("Unknown encoding: "+o);var i=0|NT(n,o);let e=jT(i);n=e.write(n,o);n!==i&&(e=e.slice(0,n));return e}if(ArrayBuffer.isView(t))return n1(o=t,Uint8Array)?AT((i=new Uint8Array(o)).buffer,i.byteOffset,i.byteLength):kT(o);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(n1(t,ArrayBuffer)||t&&n1(t.buffer,ArrayBuffer))return AT(t,r,e);if("undefined"!=typeof SharedArrayBuffer&&(n1(t,SharedArrayBuffer)||t&&n1(t.buffer,SharedArrayBuffer)))return AT(t,r,e);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return R.from(n,r,e);var u=function(e){{var t,r;if(R.isBuffer(e))return t=0|MT(e.length),0===(r=jT(t)).length||e.copy(r,0,0,t),r}if(void 0!==e.length)return"number"!=typeof e.length||o1(e.length)?jT(0):kT(e);if("Buffer"===e.type&&Array.isArray(e.data))return kT(e.data)}(t);if(u)return u;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return R.from(t[Symbol.toPrimitive]("string"),r,e);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function IT(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function RT(e){return IT(e),jT(e<0?0:0|MT(e))}function kT(t){var r=t.length<0?0:0|MT(t.length);const n=jT(r);for(let e=0;e<r;e+=1)n[e]=255&t[e];return n}function AT(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,R.prototype),n}function MT(e){if(e>=pN)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+pN.toString(16)+" bytes");return 0|e}function NT(e,t){if(R.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||n1(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=2<arguments.length&&!0===arguments[2];if(!n&&0===r)return 0;let o=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return e1(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return t1(e).length;default:if(o)return n?-1:e1(e).length;t=(""+t).toLowerCase(),o=!0}}function xT(e,r,n){let t=!1;if((r=void 0===r||r<0?0:r)>this.length)return"";if((n=void 0===n||n>this.length?this.length:n)<=0)return"";if((n>>>=0)<=(r>>>=0))return"";for(e=e||"utf8";;)switch(e){case"hex":{var o=this;var i=r;var u=n;var a=o.length;(!i||i<0)&&(i=0);(!u||u<0||a<u)&&(u=a);let t="";for(let e=i;e<u;++e)t+=yN[o[e]];return t;return}case"utf8":case"utf-8":return WT(this,r,n);case"ascii":{var s=this;a=r;var c=n;let t="";c=Math.min(s.length,c);for(let e=a;e<c;++e)t+=String.fromCharCode(127&s[e]);return t;return}case"latin1":case"binary":{var l=this;i=r;var f=n;let t="";f=Math.min(l.length,f);for(let e=i;e<f;++e)t+=String.fromCharCode(l[e]);return t;return}case"base64":return d=this,b=n,0===(h=r)&&b===d.length?lN.fromByteArray(d):lN.fromByteArray(d.slice(h,b));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":{d=this;h=r;b=n;var p=d.slice(h,b);let t="";for(let e=0;e<p.length-1;e+=2)t+=String.fromCharCode(p[e]+256*p[e+1]);return t;return}default:if(t)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),t=!0}var d,h,b}function DT(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function UT(e,t,r,n,o){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):2147483647<r?r=2147483647:r<-2147483648&&(r=-2147483648),(r=(r=o1(r=+r)?o?0:e.length-1:r)<0?e.length+r:r)>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof t&&(t=R.from(t,n)),R.isBuffer(t))return 0===t.length?-1:LT(e,t,r,n,o);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?(o?Uint8Array.prototype.indexOf:Uint8Array.prototype.lastIndexOf).call(e,t,r):LT(e,[t],r,n,o);throw new TypeError("val must be string, number or Buffer")}function LT(r,n,t,e,o){let i=1,u=r.length,a=n.length;if(void 0!==e&&("ucs2"===(e=String(e).toLowerCase())||"ucs-2"===e||"utf16le"===e||"utf-16le"===e)){if(r.length<2||n.length<2)return-1;i=2,u/=2,a/=2,t/=2}function s(e,t){return 1===i?e[t]:e.readUInt16BE(t*i)}let c;if(o){let e=-1;for(c=t;c<u;c++)if(s(r,c)===s(n,-1===e?0:c-e)){if(-1===e&&(e=c),c-e+1===a)return e*i}else-1!==e&&(c-=c-e),e=-1}else for(t+a>u&&(t=u-a),c=t;0<=c;c--){let t=!0;for(let e=0;e<a;e++)if(s(r,c+e)!==s(n,e)){t=!1;break}if(t)return c}return-1}function FT(e,t,r,n){return r1(function(t){const r=[];for(let e=0;e<t.length;++e)r.push(255&t.charCodeAt(e));return r}(t),e,r,n)}function BT(e,t,r,n){return r1(function(t,r){var n,o;const i=[];for(let e=0;e<t.length&&!((r-=2)<0);++e)o=t.charCodeAt(e),n=o>>8,o=o%256,i.push(o),i.push(n);return i}(t,e.length-r),e,r,n)}function WT(u,e,t){t=Math.min(u.length,t);const r=[];let a=e;for(;a<t;){var s=u[a];let o=null,i=239<s?4:223<s?3:191<s?2:1;if(a+i<=t){let e,t,r,n;switch(i){case 1:s<128&&(o=s);break;case 2:128==(192&(e=u[a+1]))&&127<(n=(31&s)<<6|63&e)&&(o=n);break;case 3:e=u[a+1],t=u[a+2],128==(192&e)&&128==(192&t)&&2047<(n=(15&s)<<12|(63&e)<<6|63&t)&&(n<55296||57343<n)&&(o=n);break;case 4:e=u[a+1],t=u[a+2],r=u[a+3],128==(192&e)&&128==(192&t)&&128==(192&r)&&65535<(n=(15&s)<<18|(63&e)<<12|(63&t)<<6|63&r)&&n<1114112&&(o=n)}}null===o?(o=65533,i=1):65535<o&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o),a+=i}{var n=r,o=n.length;if(o<=dN)return String.fromCharCode.apply(String,n);let e="",t=0;for(;t<o;)e+=String.fromCharCode.apply(String,n.slice(t,t+=dN));return e}}TT.kMaxLength=pN,(R.TYPED_ARRAY_SUPPORT=function(){try{const t=new Uint8Array(1);var e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(e){return!1}}())||"undefined"==typeof console||"function"!=typeof console.error||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."),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}}),R.poolSize=8192,R.from=CT,Object.setPrototypeOf(R.prototype,Uint8Array.prototype),Object.setPrototypeOf(R,Uint8Array),R.alloc=function(e,t,r){return t=t,r=r,IT(e=e),!(e<=0)&&void 0!==t?"string"==typeof r?jT(e).fill(t,r):jT(e).fill(t):jT(e)},R.allocUnsafe=RT,R.allocUnsafeSlow=RT,R.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==R.prototype},R.compare=function(r,n){if(n1(r,Uint8Array)&&(r=R.from(r,r.offset,r.byteLength)),n1(n,Uint8Array)&&(n=R.from(n,n.offset,n.byteLength)),!R.isBuffer(r)||!R.isBuffer(n))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(r===n)return 0;let o=r.length,i=n.length;for(let e=0,t=Math.min(o,i);e<t;++e)if(r[e]!==n[e]){o=r[e],i=n[e];break}return o<i?-1:i<o?1:0},R.isEncoding=function(e){switch(String(e).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(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return R.alloc(0);let r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=R.allocUnsafe(e);let o=0;for(r=0;r<t.length;++r){let e=t[r];if(n1(e,Uint8Array))o+e.length>n.length?(e=R.isBuffer(e)?e:R.from(e)).copy(n,o):Uint8Array.prototype.set.call(n,e,o);else{if(!R.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(n,o)}o+=e.length}return n},R.byteLength=NT,R.prototype._isBuffer=!0,R.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;e<t;e+=2)DT(this,e,e+1);return this},R.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let e=0;e<t;e+=4)DT(this,e,e+3),DT(this,e+1,e+2);return this},R.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let e=0;e<t;e+=8)DT(this,e,e+7),DT(this,e+1,e+6),DT(this,e+2,e+5),DT(this,e+3,e+4);return this},R.prototype.toLocaleString=R.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?WT(this,0,e):xT.apply(this,arguments)},R.prototype.equals=function(e){if(R.isBuffer(e))return this===e||0===R.compare(this,e);throw new TypeError("Argument must be a Buffer")},R.prototype.inspect=function(){let e="";var t=TT.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),"<Buffer "+e+">"},vc&&(R.prototype[vc]=R.prototype.inspect),R.prototype.compare=function(e,t,r,n,o){if(n1(e,Uint8Array)&&(e=R.from(e,e.offset,e.byteLength)),!R.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),(t=void 0===t?0:t)<0||r>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(o<=n&&r<=t)return 0;if(o<=n)return-1;if(r<=t)return 1;if(this===e)return 0;let i=(o>>>=0)-(n>>>=0),u=(r>>>=0)-(t>>>=0);var a=Math.min(i,u),s=this.slice(n,o),c=e.slice(t,r);for(let e=0;e<a;++e)if(s[e]!==c[e]){i=s[e],u=c[e];break}return i<u?-1:u<i?1:0},R.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},R.prototype.indexOf=function(e,t,r){return UT(this,e,t,r,!0)},R.prototype.lastIndexOf=function(e,t,r){return UT(this,e,t,r,!1)},R.prototype.write=function(t,r,n,e){if(void 0===r)e="utf8",n=this.length,r=0;else if(void 0===n&&"string"==typeof r)e=r,n=this.length,r=0;else{if(!isFinite(r))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");r>>>=0,isFinite(n)?(n>>>=0,void 0===e&&(e="utf8")):(e=n,n=void 0)}var o,i,u,a=this.length-r;if((void 0===n||a<n)&&(n=a),0<t.length&&(n<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");e=e||"utf8";let s=!1;for(;;)switch(e){case"hex":{var c=this;var l=t;var f=r;var p=n;f=Number(f)||0;var d=c.length-f;(!p||d<(p=Number(p)))&&(p=d),(d=l.length)/2<p&&(p=d/2);let e;for(e=0;e<p;++e){var h=parseInt(l.substr(2*e,2),16);if(o1(h))return e;c[f+e]=h}return e;return}case"utf8":case"utf-8":return d=r,u=n,r1(e1(t,(i=this).length-d),i,d,u);case"ascii":case"latin1":case"binary":return FT(this,t,r,n);case"base64":return i=this,u=r,o=n,r1(t1(t),i,u,o);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return BT(this,t,r,n);default:if(s)throw new TypeError("Unknown encoding: "+e);e=(""+e).toLowerCase(),s=!0}},R.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const dN=4096;function zT(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(r<e+t)throw new RangeError("Trying to access beyond buffer length")}function qT(e,t,r,n,o,i){if(!R.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(o<t||t<i)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function VT(e,t,r,n,o){XT(t,n,o,e,r,7);n=Number(t&BigInt(4294967295)),e[r++]=n,e[r++]=n>>=8,e[r++]=n>>=8,e[r++]=n>>=8,o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=o,e[r++]=o>>=8,e[r++]=o>>=8,e[r++]=o>>=8,r}function HT(e,t,r,n,o){XT(t,n,o,e,r,7);n=Number(t&BigInt(4294967295)),e[r+7]=n,e[r+6]=n>>=8,e[r+5]=n>>=8,e[r+4]=n>>=8,o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=o,e[r+2]=o>>=8,e[r+1]=o>>=8,e[r]=o>>=8,r+8}function GT(e,t,r,n){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function YT(e,t,r,n,o){return t=+t,r>>>=0,o||GT(e,0,r,4),fN.write(e,t,r,n,23,4),r+4}function KT(e,t,r,n,o){return t=+t,r>>>=0,o||GT(e,0,r,8),fN.write(e,t,r,n,52,8),r+8}R.prototype.slice=function(e,t){var r=this.length,r=((e=~~e)<0?(e+=r)<0&&(e=0):r<e&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):r<t&&(t=r),t<e&&(t=e),this.subarray(e,t));return Object.setPrototypeOf(r,R.prototype),r},R.prototype.readUintLE=R.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||zT(e,t,this.length);let n=this[e],o=1,i=0;for(;++i<t&&(o*=256);)n+=this[e+i]*o;return n},R.prototype.readUintBE=R.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||zT(e,t,this.length);let n=this[e+--t],o=1;for(;0<t&&(o*=256);)n+=this[e+--t]*o;return n},R.prototype.readUint8=R.prototype.readUInt8=function(e,t){return e>>>=0,t||zT(e,1,this.length),this[e]},R.prototype.readUint16LE=R.prototype.readUInt16LE=function(e,t){return e>>>=0,t||zT(e,2,this.length),this[e]|this[e+1]<<8},R.prototype.readUint16BE=R.prototype.readUInt16BE=function(e,t){return e>>>=0,t||zT(e,2,this.length),this[e]<<8|this[e+1]},R.prototype.readUint32LE=R.prototype.readUInt32LE=function(e,t){return e>>>=0,t||zT(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},R.prototype.readUint32BE=R.prototype.readUInt32BE=function(e,t){return e>>>=0,t||zT(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},R.prototype.readBigUInt64LE=i1(function(e){JT(e>>>=0,"offset");var t=this[e],r=this[e+7],t=(void 0!==t&&void 0!==r||$T(e,this.length-8),t+256*this[++e]+65536*this[++e]+this[++e]*2**24),e=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(t)+(BigInt(e)<<BigInt(32))}),R.prototype.readBigUInt64BE=i1(function(e){JT(e>>>=0,"offset");var t=this[e],r=this[e+7],t=(void 0!==t&&void 0!==r||$T(e,this.length-8),t*2**24+65536*this[++e]+256*this[++e]+this[++e]),e=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(t)<<BigInt(32))+BigInt(e)}),R.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||zT(e,t,this.length);let n=this[e],o=1,i=0;for(;++i<t&&(o*=256);)n+=this[e+i]*o;return o*=128,n>=o&&(n-=Math.pow(2,8*t)),n},R.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||zT(e,t,this.length);let n=t,o=1,i=this[e+--n];for(;0<n&&(o*=256);)i+=this[e+--n]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*t)),i},R.prototype.readInt8=function(e,t){return e>>>=0,t||zT(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},R.prototype.readInt16LE=function(e,t){e>>>=0,t||zT(e,2,this.length);t=this[e]|this[e+1]<<8;return 32768&t?4294901760|t:t},R.prototype.readInt16BE=function(e,t){e>>>=0,t||zT(e,2,this.length);t=this[e+1]|this[e]<<8;return 32768&t?4294901760|t:t},R.prototype.readInt32LE=function(e,t){return e>>>=0,t||zT(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},R.prototype.readInt32BE=function(e,t){return e>>>=0,t||zT(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},R.prototype.readBigInt64LE=i1(function(e){JT(e>>>=0,"offset");var t=this[e],r=this[e+7],r=(void 0!==t&&void 0!==r||$T(e,this.length-8),this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24));return(BigInt(r)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)}),R.prototype.readBigInt64BE=i1(function(e){JT(e>>>=0,"offset");var t=this[e],r=this[e+7],t=(void 0!==t&&void 0!==r||$T(e,this.length-8),(t<<24)+65536*this[++e]+256*this[++e]+this[++e]);return(BigInt(t)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)}),R.prototype.readFloatLE=function(e,t){return e>>>=0,t||zT(e,4,this.length),fN.read(this,e,!0,23,4)},R.prototype.readFloatBE=function(e,t){return e>>>=0,t||zT(e,4,this.length),fN.read(this,e,!1,23,4)},R.prototype.readDoubleLE=function(e,t){return e>>>=0,t||zT(e,8,this.length),fN.read(this,e,!0,52,8)},R.prototype.readDoubleBE=function(e,t){return e>>>=0,t||zT(e,8,this.length),fN.read(this,e,!1,52,8)},R.prototype.writeUintLE=R.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||qT(this,e,t,r,Math.pow(2,8*r)-1,0);let o=1,i=0;for(this[t]=255&e;++i<r&&(o*=256);)this[t+i]=e/o&255;return t+r},R.prototype.writeUintBE=R.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||qT(this,e,t,r,Math.pow(2,8*r)-1,0);let o=r-1,i=1;for(this[t+o]=255&e;0<=--o&&(i*=256);)this[t+o]=e/i&255;return t+r},R.prototype.writeUint8=R.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||qT(this,e,t,1,255,0),this[t]=255&e,t+1},R.prototype.writeUint16LE=R.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||qT(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},R.prototype.writeUint16BE=R.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||qT(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},R.prototype.writeUint32LE=R.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||qT(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},R.prototype.writeUint32BE=R.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||qT(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},R.prototype.writeBigUInt64LE=i1(function(e,t=0){return VT(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),R.prototype.writeBigUInt64BE=i1(function(e,t=0){return HT(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),R.prototype.writeIntLE=function(e,t,r,n){e=+e,t>>>=0,n||qT(this,e,t,r,(n=Math.pow(2,8*r-1))-1,-n);let o=0,i=1,u=0;for(this[t]=255&e;++o<r&&(i*=256);)e<0&&0===u&&0!==this[t+o-1]&&(u=1),this[t+o]=(e/i>>0)-u&255;return t+r},R.prototype.writeIntBE=function(e,t,r,n){e=+e,t>>>=0,n||qT(this,e,t,r,(n=Math.pow(2,8*r-1))-1,-n);let o=r-1,i=1,u=0;for(this[t+o]=255&e;0<=--o&&(i*=256);)e<0&&0===u&&0!==this[t+o+1]&&(u=1),this[t+o]=(e/i>>0)-u&255;return t+r},R.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||qT(this,e,t,1,127,-128),this[t]=255&(e=e<0?255+e+1:e),t+1},R.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||qT(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},R.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||qT(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},R.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||qT(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},R.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||qT(this,e,t,4,2147483647,-2147483648),this[t]=(e=e<0?4294967295+e+1:e)>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},R.prototype.writeBigInt64LE=i1(function(e,t=0){return VT(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),R.prototype.writeBigInt64BE=i1(function(e,t=0){return HT(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),R.prototype.writeFloatLE=function(e,t,r){return YT(this,e,t,!0,r)},R.prototype.writeFloatBE=function(e,t,r){return YT(this,e,t,!1,r)},R.prototype.writeDoubleLE=function(e,t,r){return KT(this,e,t,!0,r)},R.prototype.writeDoubleBE=function(e,t,r){return KT(this,e,t,!1,r)},R.prototype.copy=function(e,t,r,n){if(!R.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r=r||0,n||0===n||(n=this.length),t>=e.length&&(t=e.length),(n=0<n&&n<r?r:n)===r)return 0;if(0===e.length||0===this.length)return 0;if((t=t||0)<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length);var o=(n=e.length-t<n-r?e.length-t+r:n)-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),o},R.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!R.isEncoding(n))throw new TypeError("Unknown encoding: "+n);var o;1===e.length&&(o=e.charCodeAt(0),("utf8"===n&&o<128||"latin1"===n)&&(e=o))}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;t>>>=0,r=void 0===r?this.length:r>>>0;let i;if("number"==typeof(e=e||0))for(i=t;i<r;++i)this[i]=e;else{var u=R.isBuffer(e)?e:R.from(e,n),a=u.length;if(0===a)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=u[i%a]}return this};const hN={};function ZT(e,t,r){hN[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=this.name+` [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return this.name+` [${e}]: `+this.message}}}function QT(e){let t="",r=e.length;for(var n="-"===e[0]?1:0;r>=4+n;r-=3)t="_"+e.slice(r-3,r)+t;return""+e.slice(0,r)+t}function XT(t,r,n,e,o,i){if(n<t||t<r){var u="bigint"==typeof r?"n":"";let e;throw e=3<i?0===r||r===BigInt(0)?`>= 0${u} and < 2${u} ** `+8*(i+1)+u:`>= -(2${u} ** ${8*(i+1)-1}${u}) and < 2 ** `+(8*(i+1)-1)+u:`>= ${r}${u} and <= `+n+u,new hN.ERR_OUT_OF_RANGE("value",e,t)}r=e,n=i,JT(u=o,"offset"),void 0!==r[u]&&void 0!==r[u+n]||$T(u,r.length-(n+1))}function JT(e,t){if("number"!=typeof e)throw new hN.ERR_INVALID_ARG_TYPE(t,"number",e)}function $T(e,t,r){if(Math.floor(e)!==e)throw JT(e,r),new hN.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new hN.ERR_BUFFER_OUT_OF_BOUNDS;throw new hN.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= `+t,e)}ZT("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?e+" is outside of buffer bounds":"Attempt to access memory outside buffer bounds"},RangeError),ZT("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type `+typeof t},TypeError),ZT("ERR_OUT_OF_RANGE",function(e,t,r){e=`The value of "${e}" is out of range.`;let n=r;return Number.isInteger(r)&&Math.abs(r)>2**32?n=QT(String(r)):"bigint"==typeof r&&(n=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(n=QT(n)),n+="n"),e+=` It must be ${t}. Received `+n},RangeError);const bN=/[^+/0-9A-Za-z-_]/g;function e1(t,r){r=r||1/0;let n;var o=t.length;let i=null;const u=[];for(let e=0;e<o;++e){if(55295<(n=t.charCodeAt(e))&&n<57344){if(!i){if(56319<n){-1<(r-=3)&&u.push(239,191,189);continue}if(e+1===o){-1<(r-=3)&&u.push(239,191,189);continue}i=n;continue}if(n<56320){-1<(r-=3)&&u.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&-1<(r-=3)&&u.push(239,191,189);if(i=null,n<128){if(--r<0)break;u.push(n)}else if(n<2048){if((r-=2)<0)break;u.push(n>>6|192,63&n|128)}else if(n<65536){if((r-=3)<0)break;u.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((r-=4)<0)break;u.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return u}function t1(e){return lN.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(bN,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function r1(e,t,r,n){let o;for(o=0;o<n&&!(o+r>=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function n1(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function o1(e){return e!=e}const yN=function(){var r="0123456789abcdef";const n=new Array(256);for(let t=0;t<16;++t){var o=16*t;for(let e=0;e<16;++e)n[o+e]=r[t]+r[e]}return n}();function i1(e){return"undefined"==typeof BigInt?u1:e}function u1(){throw new Error("BigInt not supported")}}var a1,Qf={},ls={},s=r&&r.__extends||(a1=function(e,t){return(a1=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}a1(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),fp=(Object.defineProperty(ls,"__esModule",{value:!0}),k.prototype.getUInt8=function(e){throw new Error("Not implemented")},k.prototype.getInt8=function(e){throw new Error("Not implemented")},k.prototype.getFloat64=function(e){throw new Error("Not implemented")},k.prototype.putUInt8=function(e,t){throw new Error("Not implemented")},k.prototype.putInt8=function(e,t){throw new Error("Not implemented")},k.prototype.putFloat64=function(e,t){throw new Error("Not implemented")},k.prototype.getInt16=function(e){return this.getInt8(e)<<8|this.getUInt8(e+1)},k.prototype.getUInt16=function(e){return this.getUInt8(e)<<8|this.getUInt8(e+1)},k.prototype.getInt32=function(e){return this.getInt8(e)<<24|this.getUInt8(e+1)<<16|this.getUInt8(e+2)<<8|this.getUInt8(e+3)},k.prototype.getUInt32=function(e){return this.getUInt8(e)<<24|this.getUInt8(e+1)<<16|this.getUInt8(e+2)<<8|this.getUInt8(e+3)},k.prototype.getInt64=function(e){return this.getInt8(e)<<56|this.getUInt8(e+1)<<48|this.getUInt8(e+2)<<40|this.getUInt8(e+3)<<32|this.getUInt8(e+4)<<24|this.getUInt8(e+5)<<16|this.getUInt8(e+6)<<8|this.getUInt8(e+7)},k.prototype.getSlice=function(e,t){return new c1(e,t,this)},k.prototype.putInt16=function(e,t){this.putInt8(e,t>>8),this.putUInt8(e+1,255&t)},k.prototype.putUInt16=function(e,t){this.putUInt8(e,t>>8&255),this.putUInt8(e+1,255&t)},k.prototype.putInt32=function(e,t){this.putInt8(e,t>>24),this.putUInt8(e+1,t>>16&255),this.putUInt8(e+2,t>>8&255),this.putUInt8(e+3,255&t)},k.prototype.putUInt32=function(e,t){this.putUInt8(e,t>>24&255),this.putUInt8(e+1,t>>16&255),this.putUInt8(e+2,t>>8&255),this.putUInt8(e+3,255&t)},k.prototype.putInt64=function(e,t){this.putInt8(e,t>>48),this.putUInt8(e+1,t>>42&255),this.putUInt8(e+2,t>>36&255),this.putUInt8(e+3,t>>30&255),this.putUInt8(e+4,t>>24&255),this.putUInt8(e+5,t>>16&255),this.putUInt8(e+6,t>>8&255),this.putUInt8(e+7,255&t)},k.prototype.putBytes=function(e,t){for(var r=0,n=t.remaining();r<n;r++)this.putUInt8(e+r,t.readUInt8())},k.prototype.readUInt8=function(){return this.getUInt8(this._updatePos(1))},k.prototype.readInt8=function(){return this.getInt8(this._updatePos(1))},k.prototype.readUInt16=function(){return this.getUInt16(this._updatePos(2))},k.prototype.readUInt32=function(){return this.getUInt32(this._updatePos(4))},k.prototype.readInt16=function(){return this.getInt16(this._updatePos(2))},k.prototype.readInt32=function(){return this.getInt32(this._updatePos(4))},k.prototype.readInt64=function(){return this.getInt32(this._updatePos(8))},k.prototype.readFloat64=function(){return this.getFloat64(this._updatePos(8))},k.prototype.writeUInt8=function(e){this.putUInt8(this._updatePos(1),e)},k.prototype.writeInt8=function(e){this.putInt8(this._updatePos(1),e)},k.prototype.writeInt16=function(e){this.putInt16(this._updatePos(2),e)},k.prototype.writeInt32=function(e){this.putInt32(this._updatePos(4),e)},k.prototype.writeUInt32=function(e){this.putUInt32(this._updatePos(4),e)},k.prototype.writeInt64=function(e){this.putInt64(this._updatePos(8),e)},k.prototype.writeFloat64=function(e){this.putFloat64(this._updatePos(8),e)},k.prototype.writeBytes=function(e){this.putBytes(this._updatePos(e.remaining()),e)},k.prototype.readSlice=function(e){return this.getSlice(this._updatePos(e),e)},k.prototype._updatePos=function(e){var t=this.position;return this.position+=e,t},k.prototype.remaining=function(){return this.length-this.position},k.prototype.hasRemaining=function(){return 0<this.remaining()},k.prototype.reset=function(){this.position=0},k.prototype.toString=function(){return this.constructor.name+"( position="+this.position+" )\n "+this.toHex()},k.prototype.toHex=function(){for(var e="",t=0;t<this.length;t++){var r=this.getUInt8(t).toString(16);e+=r=1===r.length?"0"+r:r,t!==this.length-1&&(e+=" ")}return e},k);function k(e){this.position=0,this.length=e}ls.default=fp;s(l1,s1=fp),l1.prototype.putUInt8=function(e,t){this._inner.putUInt8(this._start+e,t)},l1.prototype.getUInt8=function(e){return this._inner.getUInt8(this._start+e)},l1.prototype.putInt8=function(e,t){this._inner.putInt8(this._start+e,t)},l1.prototype.putFloat64=function(e,t){this._inner.putFloat64(this._start+e,t)},l1.prototype.getInt8=function(e){return this._inner.getInt8(this._start+e)},l1.prototype.getFloat64=function(e){return this._inner.getFloat64(this._start+e)};var s1,c1=l1;function l1(e,t,r){t=s1.call(this,t)||this;return t._start=e,t._inner=r,t}var f1,p1,mp=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Op=(Object.defineProperty(Qf,"__esModule",{value:!0}),Qf.BaseBuffer=void 0,mp(ls)),Ip=(Qf.BaseBuffer=Op.default,Qf.default=Op.default,r&&r.__extends||(f1=function(e,t){return(f1=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}f1(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),xp=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},d1=(Object.defineProperty(bs,"__esModule",{value:!0}),bs.alloc=void 0,xp(kl)),_s=xp(Qf),h1=(p1=_s.default,Ip(b1,p1),b1.prototype.getUInt8=function(e){return this._buffer.readUInt8(e)},b1.prototype.getInt8=function(e){return this._buffer.readInt8(e)},b1.prototype.getFloat64=function(e){return this._buffer.readDoubleBE(e)},b1.prototype.putUInt8=function(e,t){this._buffer.writeUInt8(t,e)},b1.prototype.putInt8=function(e,t){this._buffer.writeInt8(t,e)},b1.prototype.putFloat64=function(e,t){this._buffer.writeDoubleBE(t,e)},b1.prototype.putBytes=function(e,t){var r;t instanceof b1?(r=Math.min(t.length-t.position,this.length-e),t._buffer.copy(this._buffer,e,t.position,t.position+r),t.position+=r):p1.prototype.putBytes.call(this,e,t)},b1.prototype.getSlice=function(e,t){return new b1(this._buffer.slice(e,e+t))},b1);function b1(e){var t=this,e=(e=e)instanceof d1.default.Buffer?e:"number"==typeof e&&"function"==typeof d1.default.Buffer.alloc?d1.default.Buffer.alloc(e):new d1.default.Buffer(e);return(t=p1.call(this,e.length)||this)._buffer=e,t}bs.default=h1,bs.alloc=function(e){return new h1(e)};var Xf=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},y1=(Object.defineProperty(wf,"__esModule",{value:!0}),Xf(bs)),_1=e,Lp=_1.internal.util,v1=Lp.ENCRYPTION_OFF,m1=Lp.ENCRYPTION_ON;function g1(e,t,r){void 0===t&&(t=O1),void 0===r&&(r=function(e){return new WebSocket(e)});var n,o=this,t=(this._open=!0,this._pending=[],this._error=null,this._handleConnectionError=this._handleConnectionError.bind(this),this._config=e,this._receiveTimeout=null,this._receiveTimeoutStarted=!1,this._receiveTimeoutId=null,this._closingPromise=null,function(e,t){var r=function(e){return!0===e.encrypted||e.encrypted===m1}(e),n=function(e){return!1===e.encrypted||e.encrypted===v1}(e),e=e.trust,t=function(e){e="function"==typeof e?e():"";return e&&0<=e.toLowerCase().indexOf("https")}(t);if(function(e,t,r){null!==r&&(e&&!r?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."):t&&r&&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."))}(r,n,t),n)return{scheme:"ws",error:null};if(t)return{scheme:"wss",error:null};if(r)return e&&"TRUST_SYSTEM_CA_SIGNED_CERTIFICATES"!==e?{scheme:null,error:(0,_1.newError)("The browser version of this driver only supports one trust strategy, 'TRUST_SYSTEM_CA_SIGNED_CERTIFICATES'. "+e+' is not supported. Please either use TRUST_SYSTEM_CA_SIGNED_CERTIFICATES or disable encryption by setting `encrypted:"'+v1+'"` in the driver configuration.')}:{scheme:"wss",error:null};return{scheme:"ws",error:null}}(e,t)),i=t.scheme,t=t.error;t?this._error=t:(this._ws=function(t,r,n){var o=t+"://"+r.asHostPort();try{return n(o)}catch(e){if(function(e,t){return"SyntaxError"===e.name&&function(e){return"["===e.charAt(0)&&-1!==e.indexOf("]")}(t.asHostPort())}(e,r))return o=function(e,t){var r=t.host().replace(/:/g,"-").replace("%","s")+".ipv6-literal.net";return"".concat(e,"://").concat(r,":").concat(t.port())}(t,r),n(o);throw e}}(i,e.address,r),this._ws.binaryType="arraybuffer",(n=this)._ws.onclose=function(e){e&&!e.wasClean&&n._handleConnectionError(),n._open=!1},this._ws.onopen=function(){n._clearConnectionTimeout();var e=n._pending;n._pending=null;for(var t=0;t<e.length;t++)n.write(e[t])},this._ws.onmessage=function(e){o._resetTimeout(),n.onmessage&&(e=new y1.default(e.data),n.onmessage(e))},this._ws.onerror=this._handleConnectionError,this._connectionTimeoutFired=!1,this._connectionTimeoutId=this._setupConnectionTimeout())}function O1(){return"undefined"!=typeof window&&window.location?window.location.protocol:null}g1.prototype._handleConnectionError=function(){if(this._connectionTimeoutFired)return this._error=(0,_1.newError)("Failed to establish connection in ".concat(this._config.connectionTimeout,"ms"),this._config.connectionErrorCode),void(this.onerror&&this.onerror(this._error));this._open&&!this._timedout&&(this._error=(0,_1.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))},g1.prototype.write=function(e){if(null!==this._pending)this._pending.push(e);else{if(!(e instanceof y1.default))throw(0,_1.newError)("Don't know how to send buffer: "+e);try{this._ws.send(e._buffer)}catch(e){if(1===this._ws.readyState)throw e;this._handleConnectionError()}}},g1.prototype.close=function(){var r=this;return null===this._closingPromise&&(this._closingPromise=new Promise(function(e,t){r._clearConnectionTimeout(),r._ws&&3!==r._ws.readyState?(r._open=!1,r.stopReceiveTimeout(),r._ws.onclose=function(){e()},r._ws.close()):e()})),this._closingPromise},g1.prototype.setupReceiveTimeout=function(e){this._receiveTimeout=e},g1.prototype.stopReceiveTimeout=function(){null!==this._receiveTimeout&&this._receiveTimeoutStarted&&(this._receiveTimeoutStarted=!1,null!=this._receiveTimeoutId&&clearTimeout(this._receiveTimeoutId),this._receiveTimeoutId=null)},g1.prototype.startReceiveTimeout=function(){this._open&&null!==this._receiveTimeout&&!this._receiveTimeoutStarted&&(this._receiveTimeoutStarted=!0,this._resetTimeout())},g1.prototype._resetTimeout=function(){var e=this;this._receiveTimeoutStarted&&(null!==this._receiveTimeoutId&&clearTimeout(this._receiveTimeoutId),this._receiveTimeoutId=setTimeout(function(){e._receiveTimeoutId=null,e._timedout=!0,e.stopReceiveTimeout(),e._error=(0,_1.newError)("Connection lost. Server didn't respond in ".concat(e._receiveTimeout,"ms"),e._config.connectionErrorCode),e.close(),e.onerror&&e.onerror(e._error)},this._receiveTimeout))},g1.prototype._setupConnectionTimeout=function(){var e,t=this,r=this._config.connectionTimeout;return r?(e=this._ws,setTimeout(function(){1!==e.readyState&&(t._connectionTimeoutFired=!0,e.close())},r)):null},g1.prototype._clearConnectionTimeout=function(){var e=this._connectionTimeoutId;!e&&0!==e||(this._connectionTimeoutFired=!1,this._connectionTimeoutId=null,clearTimeout(e))},wf.default=g1;var w1,zp={},ys=r&&r.__extends||(w1=function(e,t){return(w1=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}w1(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(zp,"__esModule",{value:!0});var E1,oa=e.internal.resolver.BaseHostNameResolver,lp=(ys(P1,E1=oa),P1.prototype.resolve=function(e){return this._resolveToItself(e)},P1);function P1(){return null!==E1&&E1.apply(this,arguments)||this}zp.default=lp;var S1,m=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Xp=(Object.defineProperty(bf,"__esModule",{value:!0}),bf.HostNameResolver=bf.Channel=void 0,m(wf)),h=m(zp),C=(bf.Channel=Xp.default,bf.HostNameResolver=h.default,{}),wp={},pp=r&&r.__extends||(S1=function(e,t){return(S1=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}S1(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(wp,"__esModule",{value:!0});var T1,j1=bs,Jp=(T1=Qf.BaseBuffer,pp(C1,T1),C1.prototype.getUInt8=function(e){for(var t=0;t<this._buffers.length;t++){var r=this._buffers[t];if(!(e>=r.length))return r.getUInt8(e);e-=r.length}},C1.prototype.getInt8=function(e){for(var t=0;t<this._buffers.length;t++){var r=this._buffers[t];if(!(e>=r.length))return r.getInt8(e);e-=r.length}},C1.prototype.getFloat64=function(e){for(var t=(0,j1.alloc)(8),r=0;r<8;r++)t.putUInt8(r,this.getUInt8(e+r));return t.getFloat64(0)},C1);function C1(e){for(var t=this,r=0,n=0;n<e.length;n++)r+=e[n].length;return(t=T1.call(this,r)||this)._buffers=e,t}wp.default=Jp;var I1,R1,rd=r&&r.__extends||(I1=function(e,t){return(I1=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}I1(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),ud=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},fd=(Object.defineProperty(C,"__esModule",{value:!0}),C.Dechunker=C.Chunker=void 0,ud(ls)),k1=bs,A1=ud(wp),yd=(R1=fd.default,rd(M1,R1),M1.prototype.putUInt8=function(e,t){this._ensure(1),this._buffer.writeUInt8(t)},M1.prototype.putInt8=function(e,t){this._ensure(1),this._buffer.writeInt8(t)},M1.prototype.putFloat64=function(e,t){this._ensure(8),this._buffer.writeFloat64(t)},M1.prototype.putBytes=function(e,t){for(;0<t.remaining();)this._ensure(1),this._buffer.remaining()>t.remaining()?this._buffer.writeBytes(t):this._buffer.writeBytes(t.readSlice(this._buffer.remaining()));return this},M1.prototype.flush=function(){var e;return 0<this._buffer.position&&(this._closeChunkIfOpen(),e=this._buffer,this._buffer=null,this._ch.write(e.getSlice(0,e.position)),this._buffer=(0,k1.alloc)(this._bufferSize),this._chunkOpen=!1),this},M1.prototype.messageBoundary=function(){this._closeChunkIfOpen(),this._buffer.remaining()<2&&this.flush(),this._buffer.writeInt16(0)},M1.prototype._ensure=function(e){e=this._chunkOpen?e:e+2;this._buffer.remaining()<e&&this.flush(),this._chunkOpen||(this._currentChunkStart=this._buffer.position,this._buffer.position=this._buffer.position+2,this._chunkOpen=!0)},M1.prototype._closeChunkIfOpen=function(){var e;this._chunkOpen&&(e=this._buffer.position-(this._currentChunkStart+2),this._buffer.putUInt16(this._currentChunkStart,e),this._chunkOpen=!1)},M1);function M1(e,t){var r=R1.call(this,0)||this;return r._bufferSize=t||1400,r._ch=e,r._buffer=(0,k1.alloc)(r._bufferSize),r._currentChunkStart=0,r._chunkOpen=!1,r}function N1(){this._currentMessage=[],this._partialChunkHeader=0,this._state=this.AWAITING_CHUNK}C.Chunker=yd,N1.prototype.AWAITING_CHUNK=function(e){return 2<=e.remaining()?this._onHeader(e.readUInt16()):(this._partialChunkHeader=e.readUInt8()<<8,this.IN_HEADER)},N1.prototype.IN_HEADER=function(e){return this._onHeader(65535&(this._partialChunkHeader|e.readUInt8()))},N1.prototype.IN_CHUNK=function(e){return this._chunkSize<=e.remaining()?(this._currentMessage.push(e.readSlice(this._chunkSize)),this.AWAITING_CHUNK):(this._chunkSize-=e.remaining(),this._currentMessage.push(e.readSlice(e.remaining())),this.IN_CHUNK)},N1.prototype.CLOSED=function(e){},N1.prototype._onHeader=function(e){if(0!==e)return this._chunkSize=e,this.IN_CHUNK;var t=void 0;switch(this._currentMessage.length){case 0:return this.AWAITING_CHUNK;case 1:t=this._currentMessage[0];break;default:t=new A1.default(this._currentMessage)}return this._currentMessage=[],this.onmessage(t),this.AWAITING_CHUNK},N1.prototype.write=function(e){for(;e.hasRemaining();)this._state=this._state(e)},C.Dechunker=N1;var Sd={},x1=(Object.defineProperty(Sd,"__esModule",{value:!0}),e),Md=x1.internal.util,Ld=Md.ENCRYPTION_OFF,zd=Md.ENCRYPTION_ON,D1=x1.error.SERVICE_UNAVAILABLE,U1=[null,void 0,!0,!1,zd,Ld],L1=[null,void 0,"TRUST_ALL_CERTIFICATES","TRUST_CUSTOM_CA_SIGNED_CERTIFICATES","TRUST_SYSTEM_CA_SIGNED_CERTIFICATES"];Sd.default=function(e,t,r){this.address=e,this.encrypted=function(e){e=e.encrypted;if(-1!==U1.indexOf(e))return e;throw(0,x1.newError)("Illegal value of the encrypted setting ".concat(e,". Expected one of ").concat(U1))}(t),this.trust=function(e){e=e.trust;if(-1!==L1.indexOf(e))return e;throw(0,x1.newError)("Illegal value of the trust setting ".concat(e,". Expected one of ").concat(L1))}(t),this.trustedCertificates=t.trustedCertificates||[],this.knownHostsPath=t.knownHosts||null,this.connectionErrorCode=r||D1,this.connectionTimeout=t.connectionTimeout};var F1,B1,qd={},ah={},uh={exports:{}};function W1(e,t){for(var r in e)t[r]=e[r]}function z1(e,t,r){return B1(e,t,r)}Zl=(Th=uh).exports,(B1=(F1=kl).Buffer).from&&B1.alloc&&B1.allocUnsafe&&B1.allocUnsafeSlow?Th.exports=F1:(W1(F1,Zl),Zl.Buffer=z1),z1.prototype=Object.create(B1.prototype),W1(B1,z1),z1.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return B1(e,t,r)},z1.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");e=B1(e);return void 0!==t?"string"==typeof r?e.fill(t,r):e.fill(t):e.fill(0),e},z1.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return B1(e)},z1.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return F1.SlowBuffer(e)};var q1=uh.exports.Buffer,V1=q1.isEncoding||function(e){switch((e=""+e)&&e.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 H1(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){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 e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"==typeof t||q1.isEncoding!==V1&&V1(e))return t||e;throw new Error("Unknown encoding: "+e)}function G1(e){var t;switch(this.encoding=H1(e),this.encoding){case"utf16le":this.text=Z1,this.end=Q1,t=4;break;case"utf8":this.fillLast=K1,t=4;break;case"base64":this.text=X1,this.end=J1,t=3;break;default:return this.write=$1,void(this.end=ej)}this.lastNeed=0,this.lastTotal=0,this.lastChar=q1.allocUnsafe(t)}function Y1(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function K1(e){var t,r=this.lastTotal-this.lastNeed,n=(t=this,128!=(192&(n=e)[0])?(t.lastNeed=0,"�"):1<t.lastNeed&&1<n.length?128!=(192&n[1])?(t.lastNeed=1,"�"):2<t.lastNeed&&2<n.length&&128!=(192&n[2])?(t.lastNeed=2,"�"):void 0:void 0);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,r,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,r,0,e.length),void(this.lastNeed-=e.length))}function Z1(e,t){if((e.length-t)%2!=0)return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1);t=e.toString("utf16le",t);if(t){var r=t.charCodeAt(t.length-1);if(55296<=r&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],t.slice(0,-1)}return t}function Q1(e){var t,e=e&&e.length?this.write(e):"";return this.lastNeed?(t=this.lastTotal-this.lastNeed,e+this.lastChar.toString("utf16le",0,t)):e}function X1(e,t){var r=(e.length-t)%3;return 0==r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1==r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function J1(e){e=e&&e.length?this.write(e):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function $1(e){return e.toString(this.encoding)}function ej(e){return e&&e.length?this.write(e):""}(ah.StringDecoder=G1).prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},G1.prototype.end=function(e){e=e&&e.length?this.write(e):"";return this.lastNeed?e+"�":e},G1.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var o=Y1(t[n]);if(0<=o)return 0<o&&(e.lastNeed=o-1),o;if(--n<r||-2===o)return 0;if(0<=(o=Y1(t[n])))return 0<o&&(e.lastNeed=o-2),o;if(--n<r||-2===o)return 0;if(0<=(o=Y1(t[n])))return 0<o&&(2===o?o=0:e.lastNeed=o-3),o;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;r=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},G1.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length};var tj,rj,nj,oj,ij,pl=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},uj=(Object.defineProperty(qd,"__esModule",{value:!0}),pl(bs)),aj=e,sj=pl(kl),cj=new ah.StringDecoder("utf8");qd.default={encode:function(e){return new uj.default((e=e,"function"==typeof sj.default.Buffer.from?sj.default.Buffer.from(e,"utf8"):new sj.default.Buffer(e,"utf8")))},decode:function(e,t){if(Object.prototype.hasOwnProperty.call(e,"_buffer"))return n=t,a=(r=e).position,n=a+n,r.position=Math.min(n,r.length),r._buffer.toString("utf8",a,n);var o,i,u,r,n,a;if(Object.prototype.hasOwnProperty.call(e,"_buffers"))return o=function(e){return cj.write(e._buffer)},r=function(){return cj.end()},i=t,u=(a=e).position,a._updatePos(Math.min(t,a.length-u)),a._buffers.reduce(function(e,t){var r,n;return i<=0?e:u>=t.length?(u-=t.length,""):(t._updatePos(u-t.position),r=Math.min(t.length-u,i),n=t.readSlice(r),t._updatePos(r),i=Math.max(i-n.length,0),u=0,e+o(n))},"")+r();throw(0,aj.newError)("Don't know how to decode strings from '".concat(e,"'"))}},wh=hf,tj=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),Sh=r&&r.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||tj(t,e,r)},rj=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(wh,"__esModule",{value:!0}),wh.utf8=wh.alloc=wh.ChannelConfig=void 0,Sh(bf,wh),Sh(C,wh),nj=Sd,Object.defineProperty(wh,"ChannelConfig",{enumerable:!0,get:function(){return rj(nj).default}}),oj=bs,Object.defineProperty(wh,"alloc",{enumerable:!0,get:function(){return oj.alloc}}),ij=qd,Object.defineProperty(wh,"utf8",{enumerable:!0,get:function(){return rj(ij).default}}),Object.defineProperty(Kl,"__esModule",{value:!0});var lj=hf,fj=e,pj=1616949271;function dj(e,t){return{major:e,minor:t}}function hj(){var e=[[dj(5,4),dj(5,0)],[dj(4,4),dj(4,2)],dj(4,1),dj(3,0)];if(4<e.length)throw(0,fj.newError)("It should not have more than 4 versions of the protocol");var o=(0,lj.alloc)(20);return o.writeInt32(pj),e.forEach(function(e){var t,r,n;e instanceof Array?(r=(n=e[0]).major,n=n.minor,t=e[1].minor,o.writeInt32(n-t<<16|n<<8|r)):(r=e.major,n=e.minor,o.writeInt32(n<<8|r))}),o.reset(),o}Kl.default=function(t,o){var i=this;return new Promise(function(r,n){function e(e){n(e)}t.onerror=e.bind(i),t._error&&e(t._error),t.onmessage=function(t){try{var e=function(e,t){if(72===(e=[e.readUInt8(),e.readUInt8(),e.readUInt8(),e.readUInt8()])[0]&&84===e[1]&&84===e[2]&&80===e[3])throw t.error("Handshake failed since server responded with HTTP."),(0,fj.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 Number(e[3]+"."+e[2])}(t,o);r({protocolVersion:e,consumeRemainingBuffer:function(e){t.hasRemaining()&&e(t.readSlice(t.remaining()))}})}catch(e){n(e)}},t.write(hj())})};var bj,Dh={},Uh={},Hh={},I={},$h={},rb=r&&r.__extends||(bj=function(e,t){return(bj=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}bj(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),nb=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Eb=(Object.defineProperty($h,"__esModule",{value:!0}),nb(e),yj.ofRecord=function(e){return null===e?yj.ofNull():new Pj(e)},yj.ofMessageResponse=function(e){return null===e?yj.ofNull():new vj(e)},yj.ofNull=function(){return new Oj},Object.defineProperty(yj.prototype,"ttl",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(yj.prototype,"db",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(yj.prototype,"servers",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(yj.prototype,"isNull",{get:function(){throw new Error("Not implemented")},enumerable:!1,configurable:!0}),yj);function yj(){}$h.default=Eb;rb(mj,_j=Eb),Object.defineProperty(mj.prototype,"ttl",{get:function(){return this._response.rt.ttl},enumerable:!1,configurable:!0}),Object.defineProperty(mj.prototype,"servers",{get:function(){return this._response.rt.servers},enumerable:!1,configurable:!0}),Object.defineProperty(mj.prototype,"db",{get:function(){return this._response.rt.db},enumerable:!1,configurable:!0}),Object.defineProperty(mj.prototype,"isNull",{get:function(){return null===this._response},enumerable:!1,configurable:!0});var _j,vj=mj;function mj(e){var t=_j.call(this)||this;return t._response=e,t}rb(wj,gj=Eb),Object.defineProperty(wj.prototype,"isNull",{get:function(){return!0},enumerable:!1,configurable:!0});var gj,Oj=wj;function wj(){return null!==gj&&gj.apply(this,arguments)||this}rb(Sj,Ej=Eb),Object.defineProperty(Sj.prototype,"ttl",{get:function(){return this._record.get("ttl")},enumerable:!1,configurable:!0}),Object.defineProperty(Sj.prototype,"servers",{get:function(){return this._record.get("servers")},enumerable:!1,configurable:!0}),Object.defineProperty(Sj.prototype,"db",{get:function(){return this._record.has("db")?this._record.get("db"):null},enumerable:!1,configurable:!0}),Object.defineProperty(Sj.prototype,"isNull",{get:function(){return null===this._record},enumerable:!1,configurable:!0});var Ej,Pj=Sj;function Sj(e){var t=Ej.call(this)||this;return t._record=e,t}var Tj,jb=r&&r.__extends||(Tj=function(e,t){return(Tj=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Tj(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Ab=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},jj=(Object.defineProperty(I,"__esModule",{value:!0}),I.TelemetryObserver=I.ProcedureRouteObserver=I.RouteObserver=I.CompletedObserver=I.FailedObserver=I.ResetObserver=I.LogoffObserver=I.LoginObserver=I.ResultStreamObserver=I.StreamObserver=void 0,e),Cj=Ab($h),Ij=jj.internal.constants.FETCH_ALL,Rj=jj.error.PROTOCOL_ERROR,Ub=(kj.prototype.onNext=function(e){},kj.prototype.onError=function(e){},kj.prototype.onCompleted=function(e){},kj);function kj(){}I.StreamObserver=Ub;jb(Mj,Aj=Ub),Mj.prototype.pause=function(){this._paused=!0},Mj.prototype.resume=function(){this._paused=!1,this._setupAutoPull(!0),this._state.pull(this)},Mj.prototype.onNext=function(e){var t=new jj.Record(this._fieldKeys,e,this._fieldLookup);this._observers.some(function(e){return e.onNext})?this._observers.forEach(function(e){e.onNext&&e.onNext(t)}):(this._queuedRecords.push(t),this._queuedRecords.length>this._highRecordWatermark&&(this._autoPull=!1))},Mj.prototype.onCompleted=function(e){this._state.onSuccess(this,e)},Mj.prototype.onError=function(e){this._state.onError(this,e)},Mj.prototype.cancel=function(){this._discard=!0},Mj.prototype.prepareToHandleSingleResponse=function(){this._head=[],this._fieldKeys=[],this._setState(Qj.STREAMING)},Mj.prototype.markCompleted=function(){this._head=[],this._fieldKeys=[],this._tail={},this._setState(Qj.SUCCEEDED)},Mj.prototype.subscribe=function(e){if(this._head&&e.onKeys&&e.onKeys(this._head),0<this._queuedRecords.length&&e.onNext)for(var t=0;t<this._queuedRecords.length;t++)e.onNext(this._queuedRecords[t]),this._queuedRecords.length-t-1<=this._lowRecordWatermark&&(this._autoPull=!0,this._state===Qj.READY&&this._handleStreaming());this._tail&&e.onCompleted&&e.onCompleted(this._tail),this._error&&e.onError(this._error),this._observers.push(e),this._state===Qj.READY&&this._handleStreaming()},Mj.prototype._handleHasMore=function(e){this._setState(Qj.READY),this._handleStreaming(),delete e.has_more},Mj.prototype._handlePullSuccess=function(e){var t,r=this,n=Object.assign(this._server?{server:this._server}:{},this._meta,e);[void 0,null,"r","w","rw","s"].includes(n.type)?(this._setState(Qj.SUCCEEDED),e=null,t=function(){r._tail=n,r._observers.some(function(e){return e.onCompleted})&&r._observers.forEach(function(e){e.onCompleted&&e.onCompleted(n)}),r._afterComplete&&r._afterComplete(n)},(e=this._beforeComplete?this._beforeComplete(n):e)?Promise.resolve(e).then(t):t()):this.onError((0,jj.newError)('Server returned invalid query type. Expected one of [undefined, null, "r", "w", "rw", "s"] but got \''.concat(n.type,"'"),Rj))},Mj.prototype._handleRunSuccess=function(e,t){var r=this;if(null===this._fieldKeys){if(this._fieldKeys=[],this._fieldLookup={},e.fields&&0<e.fields.length){this._fieldKeys=e.fields;for(var n=0;n<e.fields.length;n++)this._fieldLookup[e.fields[n]]=n;delete e.fields}null!==e.qid&&void 0!==e.qid&&(this._queryId=e.qid,delete e.qid),this._storeMetadataForCompletion(e);var o=null,i=(this._beforeKeys&&(o=this._beforeKeys(this._fieldKeys)),function(){r._head=r._fieldKeys,r._observers.some(function(e){return e.onKeys})&&r._observers.forEach(function(e){e.onKeys&&e.onKeys(r._fieldKeys)}),r._afterKeys&&r._afterKeys(r._fieldKeys),t()});o?Promise.resolve(o).then(i):i()}},Mj.prototype._handleError=function(t){function e(){r._observers.some(function(e){return e.onError})&&r._observers.forEach(function(e){e.onError&&e.onError(t)}),r._afterError&&r._afterError(t)}var r=this,n=(this._setState(Qj.FAILED),this._error=t,null);this._beforeError&&(n=this._beforeError(t));n?Promise.resolve(n).then(e):e()},Mj.prototype._handleStreaming=function(){this._head&&this._observers.some(function(e){return e.onNext||e.onCompleted})&&(this._paused||!this._discard&&!this._autoPull||this._more())},Mj.prototype._more=function(){this._discard?this._discardFunction(this._queryId,this):this._moreFunction(this._queryId,this._fetchSize,this),this._setState(Qj.STREAMING)},Mj.prototype._storeMetadataForCompletion=function(e){for(var t,r=Object.keys(e),n=r.length;n--;)t=r[n],this._meta[t]=e[t]},Mj.prototype._setState=function(e){this._state=e},Mj.prototype._setupAutoPull=function(){this._autoPull=!0};var Aj,Fb=Mj;function Mj(e){var e=void 0===e?{}:e,t=e.reactive,t=void 0!==t&&t,r=e.moreFunction,n=e.discardFunction,o=e.fetchSize,o=void 0===o?Ij:o,i=e.beforeError,u=e.afterError,a=e.beforeKeys,s=e.afterKeys,c=e.beforeComplete,l=e.afterComplete,f=e.server,p=e.highRecordWatermark,p=void 0===p?Number.MAX_VALUE:p,e=e.lowRecordWatermark,e=void 0===e?Number.MAX_VALUE:e,d=Aj.call(this)||this;return d._fieldKeys=null,d._fieldLookup=null,d._head=null,d._queuedRecords=[],d._tail=null,d._error=null,d._observers=[],d._meta={},d._server=f,d._beforeError=i,d._afterError=u,d._beforeKeys=a,d._afterKeys=s,d._beforeComplete=c,d._afterComplete=l,d._queryId=null,d._moreFunction=r,d._discardFunction=n,d._discard=!1,d._fetchSize=o,d._lowRecordWatermark=e,d._highRecordWatermark=p,d._setState(t?Qj.READY:Qj.READY_STREAMING),d._setupAutoPull(),d._paused=!1,d}I.ResultStreamObserver=Fb;jb(xj,Nj=Ub),xj.prototype.onNext=function(e){this.onError((0,jj.newError)("Received RECORD when initializing "+jj.json.stringify(e)))},xj.prototype.onError=function(e){this._onError&&this._onError(e)},xj.prototype.onCompleted=function(e){this._onCompleted&&this._onCompleted(e)};var Nj,Qb=xj;function xj(e){var e=void 0===e?{}:e,t=e.onError,e=e.onCompleted,r=Nj.call(this)||this;return r._onError=t,r._onCompleted=e,r}I.LoginObserver=Qb;jb(Uj,Dj=Ub),Uj.prototype.onNext=function(e){this.onError((0,jj.newError)("Received RECORD when logging off "+jj.json.stringify(e)))},Uj.prototype.onError=function(e){this._onError&&this._onError(e)},Uj.prototype.onCompleted=function(e){this._onCompleted&&this._onCompleted(e)};var Dj,ty=Uj;function Uj(e){var e=void 0===e?{}:e,t=e.onError,e=e.onCompleted,r=Dj.call(this)||this;return r._onError=t,r._onCompleted=e,r}I.LogoffObserver=ty;jb(Fj,Lj=Ub),Fj.prototype.onNext=function(e){this.onError((0,jj.newError)("Received RECORD when resetting: received record is: "+jj.json.stringify(e),Rj))},Fj.prototype.onError=function(e){e.code===Rj&&this._onProtocolError&&this._onProtocolError(e.message),this._onError&&this._onError(e)},Fj.prototype.onCompleted=function(e){this._onComplete&&this._onComplete(e)};var Lj,oy=Fj;function Fj(e){var e=void 0===e?{}:e,t=e.onProtocolError,r=e.onError,e=e.onComplete,n=Lj.call(this)||this;return n._onProtocolError=t,n._onError=r,n._onComplete=e,n}I.ResetObserver=oy;jb(Wj,Bj=Fb),Wj.prototype.onNext=function(e){this.onError((0,jj.newError)("Received RECORD when sending telemetry "+jj.json.stringify(e),Rj))},Wj.prototype.onError=function(e){this._onError&&this._onError(e)},Wj.prototype.onCompleted=function(e){this._onCompleted&&this._onCompleted(e)};var Bj,iy=Wj;function Wj(e){var e=void 0===e?{}:e,t=e.onError,e=e.onCompleted,r=Bj.call(this)||this;return r._onError=t,r._onCompleted=e,r}I.TelemetryObserver=iy;jb(qj,zj=Fb);var zj,uy=qj;function qj(e){var t=e.error,e=e.onError,e=zj.call(this,{beforeError:e})||this;return e.onError(t),e}I.FailedObserver=uy;jb(Hj,Vj=Fb);var Vj,dy=Hj;function Hj(){var e=Vj.call(this)||this;return Vj.prototype.markCompleted.call(e),e}I.CompletedObserver=dy;jb(Yj,Gj=Ub),Yj.prototype.onNext=function(e){this._records.push(e)},Yj.prototype.onError=function(e){e.code===Rj&&this._onProtocolError&&this._onProtocolError(e.message),this._onError&&this._onError(e)},Yj.prototype.onCompleted=function(){null!==this._records&&1!==this._records.length?this.onError((0,jj.newError)("Illegal response from router. Received "+this._records.length+" records but expected only one.\n"+jj.json.stringify(this._records),Rj)):this._onCompleted&&this._onCompleted(Cj.default.ofRecord(this._records[0]))};var Gj,Ep=Yj;function Yj(e){var t=e.resultObserver,r=e.onProtocolError,n=e.onError,e=e.onCompleted,o=Gj.call(this)||this;return o._resultObserver=t,o._onError=n,o._onCompleted=e,o._records=[],o._onProtocolError=r,t.subscribe(o),o}I.ProcedureRouteObserver=Ep;jb(Zj,Kj=Ub),Zj.prototype.onNext=function(e){this.onError((0,jj.newError)("Received RECORD when resetting: received record is: "+jj.json.stringify(e),Rj))},Zj.prototype.onError=function(e){e.code===Rj&&this._onProtocolError&&this._onProtocolError(e.message),this._onError&&this._onError(e)},Zj.prototype.onCompleted=function(e){this._onCompleted&&this._onCompleted(Cj.default.ofMessageResponse(e))};var Kj,yy=Zj;function Zj(e){var e=void 0===e?{}:e,t=e.onProtocolError,r=e.onError,e=e.onCompleted,n=Kj.call(this)||this;return n._onProtocolError=t,n._onError=r,n._onCompleted=e,n}I.RouteObserver=yy;var Qj={READY_STREAMING:{onSuccess:function(e,t){e._handleRunSuccess(t,function(){e._setState(Qj.STREAMING)})},onError:function(e,t){e._handleError(t)},name:function(){return"READY_STREAMING"},pull:function(){}},READY:{onSuccess:function(e,t){e._handleRunSuccess(t,function(){return e._handleStreaming()})},onError:function(e,t){e._handleError(t)},name:function(){return"READY"},pull:function(e){return e._more()}},STREAMING:{onSuccess:function(e,t){t.has_more?e._handleHasMore(t):e._handlePullSuccess(t)},onError:function(e,t){e._handleError(t)},name:function(){return"STREAMING"},pull:function(){}},FAILED:{onError:function(e){},name:function(){return"FAILED"},pull:function(){}},SUCCEEDED:{name:function(){return"SUCCEEDED"},pull:function(){}}},Xj=(Object.defineProperty(Hh,"__esModule",{value:!0}),Hh.assertNotificationFilterIsEmpty=Hh.assertImpersonatedUserIsEmpty=Hh.assertTxConfigIsEmpty=Hh.assertDatabaseIsEmpty=void 0,e);Hh.assertTxConfigIsEmpty=function(e,t,r){if(void 0===t&&(t=function(){}),e&&!e.isEmpty())throw t((e=(0,Xj.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")).message),r.onError(e),e},Hh.assertDatabaseIsEmpty=function(e,t,r){if(void 0===t&&(t=function(){}),e)throw t((e=(0,Xj.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")).message),r.onError(e),e},Hh.assertImpersonatedUserIsEmpty=function(e,t,r){if(void 0===t&&(t=function(){}),e)throw t((t=(0,Xj.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(e,"."))).message),r.onError(t),t},Hh.assertNotificationFilterIsEmpty=function(e,t,r){if(void 0===t&&(t=function(){}),void 0!==e)throw t((t=(0,Xj.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(Xj.json.stringify(e),"."))).message),r.onError(t),t};var vy={},wy={},Sy={},Ay={},Jj=(Object.defineProperty(Ay,"__esModule",{value:!0}),Ay.reuseOngoingRequest=Ay.identity=void 0,e);Ay.identity=function(e){return e},Ay.reuseOngoingRequest=function(o,i){void 0===i&&(i=null);var u=new Map;return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Jj.json.stringify(e);if(u.has(r))return u.get(r);var n=o.apply(i,e);return u.set(r,n),n.finally(function(){u.delete(r)})}};var sb={},$j=r&&r.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(sb,"__esModule",{value:!0}),sb.equals=void 0,sb.equals=function(e,t){var r,n;if(e===t)return!0;if(null===e||null===t)return!1;if("object"!=typeof e||"object"!=typeof t)return!1;var o=Object.keys(e),i=Object.keys(t);if(o.length!==i.length)return!1;try{for(var u=$j(o),a=u.next();!a.done;a=u.next()){var s=a.value;if(e[s]!==t[s])return!1}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=u.return)&&n.call(u)}finally{if(r)throw r.error}}return!0};var eC=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),tC=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Ly=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&eC(t,e,r);return tC(t,e),t},Wy=(Object.defineProperty(Sy,"__esModule",{value:!0}),Sy.object=Sy.functional=void 0,Sy.functional=Ly(Ay),Sy.object=Ly(sb),{}),rC=(Object.defineProperty(Wy,"__esModule",{value:!0}),Wy.verifyStructSize=Wy.Structure=void 0,e),nC=rC.error.PROTOCOL_ERROR,dl=(Object.defineProperty(oC.prototype,"size",{get:function(){return this.fields.length},enumerable:!1,configurable:!0}),oC.prototype.toString=function(){for(var e="",t=0;t<this.fields.length;t++)0<t&&(e+=", "),e+=this.fields[t];return"Structure("+this.signature+", ["+e+"])"},oC);function oC(e,t){this.signature=e,this.fields=t}Wy.Structure=dl,Wy.verifyStructSize=function(e,t,r){if(t!==r)throw(0,rC.newError)("Wrong struct size for ".concat(e,", expected ").concat(t," but was ").concat(r),nC)},Wy.default=dl,Object.defineProperty(wy,"__esModule",{value:!0}),wy.Unpacker=wy.Packer=void 0;var iC=hf,uC=Sy,aC=Wy,sC=e,cC=sC.error.PROTOCOL_ERROR;function lC(e){this._ch=e,this._byteArraysSupported=!0}function fC(e,t){void 0===t&&(t=!1),this._disableLosslessIntegers=e=void 0===e?!1:e,this._useBigInt=t}lC.prototype.packable=function(o,i){var e,u=this;void 0===i&&(i=uC.functional.identity);try{o=i(o)}catch(e){return function(){throw e}}if(null===o)return function(){return u._ch.writeUInt8(192)};if(!0===o)return function(){return u._ch.writeUInt8(195)};if(!1===o)return function(){return u._ch.writeUInt8(194)};if("number"==typeof o)return function(){return u.packFloat(o)};if("string"==typeof o)return function(){return u.packString(o)};if("bigint"==typeof o)return function(){return u.packInteger((0,sC.int)(o))};if((0,sC.isInt)(o))return function(){return u.packInteger(o)};if(o instanceof Int8Array)return function(){return u.packBytes(o)};if(o instanceof Array)return function(){u.packListHeader(o.length);for(var e=0;e<o.length;e++)u.packable(void 0===o[e]?null:o[e],i)()};if(null!=(e=o)&&"function"==typeof e[Symbol.iterator])return this.packableIterable(o,i);if(o instanceof aC.Structure){for(var t=[],r=0;r<o.fields.length;r++)t[r]=this.packable(o.fields[r],i);return function(){return u.packStruct(o.signature,t)}}return"object"==typeof o?function(){for(var e=Object.keys(o),t=0,r=0;r<e.length;r++)void 0!==o[e[r]]&&t++;u.packMapHeader(t);for(r=0;r<e.length;r++){var n=e[r];void 0!==o[n]&&(u.packString(n),u.packable(o[n],i)())}}:this._nonPackableValue("Unable to pack the given value: ".concat(o))},lC.prototype.packableIterable=function(t,e){try{var r=Array.from(t);return this.packable(r,e)}catch(e){throw(0,sC.newError)("Cannot pack given iterable, ".concat(e.message,": ").concat(t))}},lC.prototype.packStruct=function(e,t){this.packStructHeader((t=t||[]).length,e);for(var r=0;r<t.length;r++)t[r]()},lC.prototype.packInteger=function(e){var t=e.high,r=e.low;e.greaterThanOrEqual(-16)&&e.lessThan(128)?this._ch.writeInt8(r):e.greaterThanOrEqual(-128)&&e.lessThan(-16)?(this._ch.writeUInt8(200),this._ch.writeInt8(r)):e.greaterThanOrEqual(-32768)&&e.lessThan(32768)?(this._ch.writeUInt8(201),this._ch.writeInt16(r)):(e.greaterThanOrEqual(-2147483648)&&e.lessThan(2147483648)?this._ch.writeUInt8(202):(this._ch.writeUInt8(203),this._ch.writeInt32(t)),this._ch.writeInt32(r))},lC.prototype.packFloat=function(e){this._ch.writeUInt8(193),this._ch.writeFloat64(e)},lC.prototype.packString=function(e){var e=iC.utf8.encode(e),t=e.length;if(t<16)this._ch.writeUInt8(128|t),this._ch.writeBytes(e);else if(t<256)this._ch.writeUInt8(208),this._ch.writeUInt8(t),this._ch.writeBytes(e);else if(t<65536)this._ch.writeUInt8(209),this._ch.writeUInt8(t/256>>0),this._ch.writeUInt8(t%256),this._ch.writeBytes(e);else{if(!(t<4294967296))throw(0,sC.newError)("UTF-8 strings of size "+t+" are not supported");this._ch.writeUInt8(210),this._ch.writeUInt8((t/16777216>>0)%256),this._ch.writeUInt8((t/65536>>0)%256),this._ch.writeUInt8((t/256>>0)%256),this._ch.writeUInt8(t%256),this._ch.writeBytes(e)}},lC.prototype.packListHeader=function(e){if(e<16)this._ch.writeUInt8(144|e);else if(e<256)this._ch.writeUInt8(212),this._ch.writeUInt8(e);else if(e<65536)this._ch.writeUInt8(213),this._ch.writeUInt8((e/256>>0)%256),this._ch.writeUInt8(e%256);else{if(!(e<4294967296))throw(0,sC.newError)("Lists of size "+e+" are not supported");this._ch.writeUInt8(214),this._ch.writeUInt8((e/16777216>>0)%256),this._ch.writeUInt8((e/65536>>0)%256),this._ch.writeUInt8((e/256>>0)%256),this._ch.writeUInt8(e%256)}},lC.prototype.packBytes=function(e){if(!this._byteArraysSupported)throw(0,sC.newError)("Byte arrays are not supported by the database this driver is connected to");this.packBytesHeader(e.length);for(var t=0;t<e.length;t++)this._ch.writeInt8(e[t])},lC.prototype.packBytesHeader=function(e){if(e<256)this._ch.writeUInt8(204),this._ch.writeUInt8(e);else if(e<65536)this._ch.writeUInt8(205),this._ch.writeUInt8((e/256>>0)%256),this._ch.writeUInt8(e%256);else{if(!(e<4294967296))throw(0,sC.newError)("Byte arrays of size "+e+" are not supported");this._ch.writeUInt8(206),this._ch.writeUInt8((e/16777216>>0)%256),this._ch.writeUInt8((e/65536>>0)%256),this._ch.writeUInt8((e/256>>0)%256),this._ch.writeUInt8(e%256)}},lC.prototype.packMapHeader=function(e){if(e<16)this._ch.writeUInt8(160|e);else if(e<256)this._ch.writeUInt8(216),this._ch.writeUInt8(e);else if(e<65536)this._ch.writeUInt8(217),this._ch.writeUInt8(e/256>>0),this._ch.writeUInt8(e%256);else{if(!(e<4294967296))throw(0,sC.newError)("Maps of size "+e+" are not supported");this._ch.writeUInt8(218),this._ch.writeUInt8((e/16777216>>0)%256),this._ch.writeUInt8((e/65536>>0)%256),this._ch.writeUInt8((e/256>>0)%256),this._ch.writeUInt8(e%256)}},lC.prototype.packStructHeader=function(e,t){if(e<16)this._ch.writeUInt8(176|e),this._ch.writeUInt8(t);else if(e<256)this._ch.writeUInt8(220),this._ch.writeUInt8(e),this._ch.writeUInt8(t);else{if(!(e<65536))throw(0,sC.newError)("Structures of size "+e+" are not supported");this._ch.writeUInt8(221),this._ch.writeUInt8(e/256>>0),this._ch.writeUInt8(e%256)}},lC.prototype.disableByteArrays=function(){this._byteArraysSupported=!1},lC.prototype._nonPackableValue=function(e){return function(){throw(0,sC.newError)(e,cC)}},wy.Packer=lC,fC.prototype.unpack=function(e,t){void 0===t&&(t=uC.functional.identity);var r=e.readUInt8(),n=240&r,o=15&r;if(192===r)return null;var i=this._unpackBoolean(r);if(null!==i)return i;i=this._unpackNumberOrInteger(r,e);if(null!==i){if((0,sC.isInt)(i)){if(this._useBigInt)return i.toBigInt();if(this._disableLosslessIntegers)return i.toNumberOrInfinity()}return i}i=this._unpackString(r,n,o,e);if(null!==i)return i;i=this._unpackList(r,n,o,e,t);if(null!==i)return i;i=this._unpackByteArray(r,e);if(null!==i)return i;i=this._unpackMap(r,n,o,e,t);if(null!==i)return i;i=this._unpackStruct(r,n,o,e,t);if(null!==i)return i;throw(0,sC.newError)("Unknown packed value with marker "+r.toString(16))},fC.prototype.unpackInteger=function(e){var t=e.readUInt8(),e=this._unpackInteger(t,e);if(null==e)throw(0,sC.newError)("Unable to unpack integer value with marker "+t.toString(16));return e},fC.prototype._unpackBoolean=function(e){return 195===e||194!==e&&null},fC.prototype._unpackNumberOrInteger=function(e,t){return 193===e?t.readFloat64():this._unpackInteger(e,t)},fC.prototype._unpackInteger=function(e,t){var r;return 0<=e&&e<128?(0,sC.int)(e):240<=e&&e<256?(0,sC.int)(e-256):200===e?(0,sC.int)(t.readInt8()):201===e?(0,sC.int)(t.readInt16()):202===e?(r=t.readInt32(),(0,sC.int)(r)):203===e?(r=t.readInt32(),e=t.readInt32(),new sC.Integer(e,r)):null},fC.prototype._unpackString=function(e,t,r,n){return 128===t?iC.utf8.decode(n,r):208===e?iC.utf8.decode(n,n.readUInt8()):209===e?iC.utf8.decode(n,n.readUInt16()):210===e?iC.utf8.decode(n,n.readUInt32()):null},fC.prototype._unpackList=function(e,t,r,n,o){return 144===t?this._unpackListWithSize(r,n,o):212===e?this._unpackListWithSize(n.readUInt8(),n,o):213===e?this._unpackListWithSize(n.readUInt16(),n,o):214===e?this._unpackListWithSize(n.readUInt32(),n,o):null},fC.prototype._unpackListWithSize=function(e,t,r){for(var n=[],o=0;o<e;o++)n.push(this.unpack(t,r));return n},fC.prototype._unpackByteArray=function(e,t){return 204===e?this._unpackByteArrayWithSize(t.readUInt8(),t):205===e?this._unpackByteArrayWithSize(t.readUInt16(),t):206===e?this._unpackByteArrayWithSize(t.readUInt32(),t):null},fC.prototype._unpackByteArrayWithSize=function(e,t){for(var r=new Int8Array(e),n=0;n<e;n++)r[n]=t.readInt8();return r},fC.prototype._unpackMap=function(e,t,r,n,o){return 160===t?this._unpackMapWithSize(r,n,o):216===e?this._unpackMapWithSize(n.readUInt8(),n,o):217===e?this._unpackMapWithSize(n.readUInt16(),n,o):218===e?this._unpackMapWithSize(n.readUInt32(),n,o):null},fC.prototype._unpackMapWithSize=function(e,t,r){for(var n={},o=0;o<e;o++)n[this.unpack(t,r)]=this.unpack(t,r);return n},fC.prototype._unpackStruct=function(e,t,r,n,o){return 176===t?this._unpackStructWithSize(r,n,o):220===e?this._unpackStructWithSize(n.readUInt8(),n,o):221===e?this._unpackStructWithSize(n.readUInt16(),n,o):null},fC.prototype._unpackStructWithSize=function(e,t,r){for(var n=t.readUInt8(),o=new aC.Structure(n,[]),i=0;i<e;i++)o.fields.push(this.unpack(t,r));return r(o)},wy.Unpacker=fC;var pC,dC,pb={},$y=r&&r.__extends||(pC=function(e,t){return(pC=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}pC(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),hC=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),bC=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),n_=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&hC(t,e,r);return bC(t,e),t},d_=(Object.defineProperty(pb,"__esModule",{value:!0}),pb.Unpacker=pb.Packer=void 0,n_(wy)),Ql=(dC=d_.Packer,$y(yC,dC),yC.prototype.disableByteArrays=function(){throw new Error("Bolt V2 should always support byte arrays")},yC);function yC(){return null!==dC&&dC.apply(this,arguments)||this}pb.Packer=Ql;_C=d_.Unpacker,$y(vC,_C);var _C,u_=vC;function vC(e,t){return _C.call(this,e=void 0===e?!1:e,t=void 0===t?!1:t)||this}pb.Unpacker=u_;var mC=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),gC=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Xl=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&mC(t,e,r);return gC(t,e),t},a_=(Object.defineProperty(vy,"__esModule",{value:!0}),vy.structure=vy.v2=vy.v1=void 0,Xl(wy)),l_=(vy.v1=a_,Xl(pb)),Jl=(vy.v2=l_,Xl(Wy)),P_=(vy.structure=Jl,vy.default=l_,{}),OC=(Object.defineProperty(P_,"__esModule",{value:!0}),P_.SIGNATURES=void 0,e),j_=OC.internal.constants,wC=j_.ACCESS_MODE_READ,EC=j_.FETCH_ALL,PC=OC.internal.util.assertString,_=Object.freeze({INIT:1,RESET:15,RUN:16,PULL_ALL:63,HELLO:1,GOODBYE:2,BEGIN:17,COMMIT:18,ROLLBACK:19,TELEMETRY:84,ROUTE:102,LOGON:106,LOGOFF:107,DISCARD:47,PULL:63}),k_=(P_.SIGNATURES=_,A.init=function(e,t){return new A(1,[e,t],function(){return"INIT ".concat(e," {...}")})},A.run=function(e,t){return new A(16,[e,t],function(){return"RUN ".concat(e," ").concat(OC.json.stringify(t))})},A.pullAll=function(){return jC},A.reset=function(){return CC},A.hello=function(e,t,r,n){void 0===r&&(r=null),void 0===n&&(n=null);t=Object.assign({user_agent:e},t);return r&&(t.routing=r),n&&(t.patch_bolt=n),new A(1,[t],function(){return"HELLO {user_agent: '".concat(e,"', ...}")})},A.hello5x1=function(e,t){var r={user_agent:e};return(t=void 0===t?null:t)&&(r.routing=t),new A(1,[r],function(){return"HELLO {user_agent: '".concat(e,"', ...}")})},A.hello5x2=function(e,t,r){void 0===r&&(r=null);var n={user_agent:e};return(t=void 0===t?null:t)&&(t.minimumSeverityLevel&&(n.notifications_minimum_severity=t.minimumSeverityLevel),t.disabledCategories&&(n.notifications_disabled_categories=t.disabledCategories)),r&&(n.routing=r),new A(1,[n],function(){return"HELLO ".concat(OC.json.stringify(n))})},A.hello5x3=function(e,t,r,n){void 0===r&&(r=null),void 0===n&&(n=null);var o={};return e&&(o.user_agent=e),t&&(o.bolt_agent={product:t.product,platform:t.platform,language:t.language,language_details:t.languageDetails}),r&&(r.minimumSeverityLevel&&(o.notifications_minimum_severity=r.minimumSeverityLevel),r.disabledCategories&&(o.notifications_disabled_categories=r.disabledCategories)),n&&(o.routing=n),new A(1,[o],function(){return"HELLO ".concat(OC.json.stringify(o))})},A.logon=function(e){return new A(106,[e],function(){return"LOGON { ... }"})},A.logoff=function(){return new A(107,[],function(){return"LOGOFF"})},A.begin=function(e){var e=void 0===e?{}:e,t=SC(e.bookmarks,e.txConfig,e.database,e.mode,e.impersonatedUser,e.notificationFilter);return new A(17,[t],function(){return"BEGIN ".concat(OC.json.stringify(t))})},A.commit=function(){return IC},A.rollback=function(){return RC},A.runWithMetadata=function(e,t,r){var r=void 0===r?{}:r,n=SC(r.bookmarks,r.txConfig,r.database,r.mode,r.impersonatedUser,r.notificationFilter);return new A(16,[e,t,n],function(){return"RUN ".concat(e," ").concat(OC.json.stringify(t)," ").concat(OC.json.stringify(n))})},A.goodbye=function(){return kC},A.pull=function(e){var e=void 0===e?{}:e,t=e.stmtId,t=void 0===t?-1:t,e=e.n,r=TC(null==t?-1:t,(void 0===e?EC:e)||EC);return new A(63,[r],function(){return"PULL ".concat(OC.json.stringify(r))})},A.discard=function(e){var e=void 0===e?{}:e,t=e.stmtId,t=void 0===t?-1:t,e=e.n,r=TC(null==t?-1:t,(void 0===e?EC:e)||EC);return new A(47,[r],function(){return"DISCARD ".concat(OC.json.stringify(r))})},A.telemetry=function(e){var e=e.api,t=(0,OC.int)(e);return new A(84,[t],function(){return"TELEMETRY ".concat(t.toString())})},A.route=function(e,t,r){return new A(102,[e=void 0===e?{}:e,t=void 0===t?[]:t,r=void 0===r?null:r],function(){return"ROUTE ".concat(OC.json.stringify(e)," ").concat(OC.json.stringify(t)," ").concat(r)})},A.routeV4x4=function(e,t,r){void 0===e&&(e={}),void 0===t&&(t=[]);var n={};return(r=void 0===r?{}:r).databaseName&&(n.db=r.databaseName),r.impersonatedUser&&(n.imp_user=r.impersonatedUser),new A(102,[e,t,n],function(){return"ROUTE ".concat(OC.json.stringify(e)," ").concat(OC.json.stringify(t)," ").concat(OC.json.stringify(n))})},A);function A(e,t,r){this.signature=e,this.fields=t,this.toString=r}function SC(e,t,r,n,o,i){var u={};return e.isEmpty()||(u.bookmarks=e.values()),null!==t.timeout&&(u.tx_timeout=t.timeout),t.metadata&&(u.tx_metadata=t.metadata),r&&(u.db=PC(r,"database")),o&&(u.imp_user=PC(o,"impersonatedUser")),n===wC&&(u.mode="r"),i&&(i.minimumSeverityLevel&&(u.notifications_minimum_severity=i.minimumSeverityLevel),i.disabledCategories&&(u.notifications_disabled_categories=i.disabledCategories)),u}function TC(e,t){t={n:(0,OC.int)(t)};return-1!==e&&(t.qid=(0,OC.int)(e)),t}var jC=new(P_.default=k_)(63,[],function(){return"PULL_ALL"}),CC=new k_(15,[],function(){return"RESET"}),IC=new k_(18,[],function(){return"COMMIT"}),RC=new k_(19,[],function(){return"ROLLBACK"}),kC=new k_(2,[],function(){return"GOODBYE"}),U_={},w={},AC=(Object.defineProperty(w,"__esModule",{value:!0}),w.TypeTransformer=void 0,vy),MC=e.internal.objectUtil;function NC(e){this._transformers=e,this._transformersPerSignature=new Map(e.map(function(e){return[e.signature,e]})),this.fromStructure=this.fromStructure.bind(this),this.toStructure=this.toStructure.bind(this),Object.freeze(this)}function xC(e){var t=e.signature,r=e.fromStructure,n=e.toStructure,e=e.isTypeInstance;this.signature=t,this.isTypeInstance=e,this.fromStructure=r,this.toStructure=n,Object.freeze(this)}NC.prototype.fromStructure=function(e){try{return e instanceof AC.structure.Structure&&this._transformersPerSignature.has(e.signature)?(0,this._transformersPerSignature.get(e.signature).fromStructure)(e):e}catch(e){return MC.createBrokenObject(e)}},NC.prototype.toStructure=function(t){var e=this._transformers.find(function(e){return(0,e.isTypeInstance)(t)});return void 0!==e?e.toStructure(t):t},w.default=NC,xC.prototype.extendsWith=function(e){var t=e.signature,r=e.fromStructure,n=e.toStructure,e=e.isTypeInstance;return new xC({signature:t||this.signature,fromStructure:r||this.fromStructure,toStructure:n||this.toStructure,isTypeInstance:e||this.isTypeInstance})},w.TypeTransformer=xC;var DC=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},UC=(Object.defineProperty(U_,"__esModule",{value:!0}),e),LC=vy,FC=w,BC=UC.error.PROTOCOL_ERROR;U_.default={createNodeTransformer:function(){return new FC.TypeTransformer({signature:78,isTypeInstance:function(e){return e instanceof UC.Node},toStructure:function(e){throw(0,UC.newError)("It is not allowed to pass nodes in query parameters, given: ".concat(e),BC)},fromStructure:function(e){LC.structure.verifyStructSize("Node",3,e.size);var e=DC(e.fields,3),t=e[0],r=e[1],e=e[2];return new UC.Node(t,r,e)}})},createRelationshipTransformer:function(){return new FC.TypeTransformer({signature:82,isTypeInstance:function(e){return e instanceof UC.Relationship},toStructure:function(e){throw(0,UC.newError)("It is not allowed to pass relationships in query parameters, given: ".concat(e),BC)},fromStructure:function(e){LC.structure.verifyStructSize("Relationship",5,e.size);var e=DC(e.fields,5),t=e[0],r=e[1],n=e[2],o=e[3],e=e[4];return new UC.Relationship(t,r,n,o,e)}})},createUnboundRelationshipTransformer:function(){return new FC.TypeTransformer({signature:114,isTypeInstance:function(e){return e instanceof UC.UnboundRelationship},toStructure:function(e){throw(0,UC.newError)("It is not allowed to pass unbound relationships in query parameters, given: ".concat(e),BC)},fromStructure:function(e){LC.structure.verifyStructSize("UnboundRelationship",3,e.size);var e=DC(e.fields,3),t=e[0],r=e[1],e=e[2];return new UC.UnboundRelationship(t,r,e)}})},createPathTransformer:function(){return new FC.TypeTransformer({signature:80,isTypeInstance:function(e){return e instanceof UC.Path},toStructure:function(e){throw(0,UC.newError)("It is not allowed to pass paths in query parameters, given: ".concat(e),BC)},fromStructure:function(e){LC.structure.verifyStructSize("Path",3,e.size);for(var e=DC(e.fields,3),t=e[0],r=e[1],n=e[2],o=[],i=t[0],u=0;u<n.length;u+=2){var a=t[n[u+1]],s=(0,UC.toNumber)(n[u]),c=void 0;0<s?(c=r[s-1])instanceof UC.UnboundRelationship&&(r[s-1]=c=c.bindTo(i,a)):(c=r[-s-1])instanceof UC.UnboundRelationship&&(r[-s-1]=c=c.bindTo(a,i)),o.push(new UC.PathSegment(i,c,a)),i=a}return new UC.Path(t[0],t[t.length-1],o)}})}};var WC=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),zC=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),B_=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&WC(t,e,r);return zC(t,e),t},z_=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},qC=(Object.defineProperty(Uh,"__esModule",{value:!0}),Hh),VC=vy,HC=B_(P_),GC=I,YC=e,KC=z_(U_),ZC=z_(w),QC=YC.internal.bookmarks.Bookmarks,G_=YC.internal.constants,XC=G_.ACCESS_MODE_WRITE,JC=G_.BOLT_PROTOCOL_V1,$C=(YC.internal.logger.Logger,YC.internal.txConfig.TxConfig),Z_=(Object.defineProperty(M.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new ZC.default(Object.values(KC.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"version",{get:function(){return JC},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"supportsReAuth",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"initialized",{get:function(){return!!this._initialized},enumerable:!1,configurable:!0}),Object.defineProperty(M.prototype,"authToken",{get:function(){return this._authToken},enumerable:!1,configurable:!0}),M.prototype.packer=function(){return this._packer},M.prototype.packable=function(e){return this._packer.packable(e,this.transformer.toStructure)},M.prototype.unpacker=function(){return this._unpacker},M.prototype.unpack=function(e){return this._unpacker.unpack(e,this.transformer.fromStructure)},M.prototype.transformMetadata=function(e){return e},M.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=(e.boltAgent,e.authToken),o=e.notificationFilter,i=e.onError,u=e.onComplete,e=new GC.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return t._onLoginCompleted(e,u)}});return(0,qC.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(HC.default.init(r,n),e,!0),e},M.prototype.logoff=function(e){var e=void 0===e?{}:e,t=e.onComplete,r=e.onError,e=(e.flush,new GC.LogoffObserver({onCompleted:t,onError:r})),t=(0,YC.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(t.message),e.onError(t),t},M.prototype.logon=function(e){var t=this,e=void 0===e?{}:e,r=e.authToken,n=e.onComplete,o=e.onError,e=(e.flush,new GC.LoginObserver({onCompleted:function(){return t._onLoginCompleted({},r,n)},onError:function(e){return t._onLoginError(e,o)}})),i=(0,YC.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(i.message),e.onError(i),i},M.prototype.prepareToClose=function(){},M.prototype.beginTransaction=function(e){var e=void 0===e?{}:e,t=e.bookmarks,r=e.txConfig,n=e.database,o=e.mode,i=e.impersonatedUser,u=e.notificationFilter,a=e.beforeError,s=e.afterError,c=e.beforeComplete,e=e.afterComplete;return this.run("BEGIN",t?t.asBeginTransactionParameters():{},{bookmarks:t,txConfig:r,database:n,mode:o,impersonatedUser:i,notificationFilter:u,beforeError:a,afterError:s,beforeComplete:c,afterComplete:e,flush:!1})},M.prototype.commitTransaction=function(e){var e=void 0===e?{}:e,t=e.beforeError,r=e.afterError,n=e.beforeComplete,e=e.afterComplete;return this.run("COMMIT",{},{bookmarks:QC.empty(),txConfig:$C.empty(),mode:XC,beforeError:t,afterError:r,beforeComplete:n,afterComplete:e})},M.prototype.rollbackTransaction=function(e){var e=void 0===e?{}:e,t=e.beforeError,r=e.afterError,n=e.beforeComplete,e=e.afterComplete;return this.run("ROLLBACK",{},{bookmarks:QC.empty(),txConfig:$C.empty(),mode:XC,beforeError:t,afterError:r,beforeComplete:n,afterComplete:e})},M.prototype.run=function(e,t,r){var r=void 0===r?{}:r,n=(r.bookmarks,r.txConfig),o=r.database,i=(r.mode,r.impersonatedUser),u=r.notificationFilter,a=r.beforeKeys,s=r.afterKeys,c=r.beforeError,l=r.afterError,f=r.beforeComplete,p=r.afterComplete,d=r.flush,d=void 0===d||d,h=r.highRecordWatermark,h=void 0===h?Number.MAX_VALUE:h,r=r.lowRecordWatermark,r=void 0===r?Number.MAX_VALUE:r,a=new GC.ResultStreamObserver({server:this._server,beforeKeys:a,afterKeys:s,beforeError:c,afterError:l,beforeComplete:f,afterComplete:p,highRecordWatermark:h,lowRecordWatermark:r});return(0,qC.assertTxConfigIsEmpty)(n,this._onProtocolError,a),(0,qC.assertDatabaseIsEmpty)(o,this._onProtocolError,a),(0,qC.assertImpersonatedUserIsEmpty)(i,this._onProtocolError,a),(0,qC.assertNotificationFilterIsEmpty)(u,this._onProtocolError,a),this.write(HC.default.run(e,t),a,!1),this.write(HC.default.pullAll(),a,d),a},Object.defineProperty(M.prototype,"currentFailure",{get:function(){return this._responseHandler.currentFailure},enumerable:!1,configurable:!0}),M.prototype.reset=function(e){var e=void 0===e?{}:e,t=e.onError,e=e.onComplete,t=new GC.ResetObserver({onProtocolError:this._onProtocolError,onError:t,onComplete:e});return this.write(HC.default.reset(),t,!0),t},M.prototype.telemetry=function(e,t){e.api;e=void 0===t?{}:t,e.onError,t=e.onCompleted,e=new GC.CompletedObserver;return t&&t(),e},M.prototype._createPacker=function(e){return new VC.v1.Packer(e)},M.prototype._createUnpacker=function(e,t){return new VC.v1.Unpacker(e,t)},M.prototype.write=function(e,t,r){this.queueObserverIfProtocolIsNotBroken(t)&&(this._log.isDebugEnabled()&&this._log.debug("C: ".concat(e)),this._lastMessageSignature=e.signature,t=new VC.structure.Structure(e.signature,e.fields),this.packable(t)(),this._chunker.messageBoundary(),r&&this._chunker.flush())},M.prototype.isLastMessageLogon=function(){return this._lastMessageSignature===HC.SIGNATURES.HELLO||this._lastMessageSignature===HC.SIGNATURES.LOGON},M.prototype.isLastMessageReset=function(){return this._lastMessageSignature===HC.SIGNATURES.RESET},M.prototype.notifyFatalError=function(e){return this._fatalError=e,this._responseHandler._notifyErrorToObservers(e)},M.prototype.updateCurrentObserver=function(){return this._responseHandler._updateCurrentObserver()},M.prototype.hasOngoingObservableRequests=function(){return this._responseHandler.hasOngoingObservableRequests()},M.prototype.queueObserverIfProtocolIsNotBroken=function(e){return this.isBroken()?(this.notifyFatalErrorToObserver(e),!1):this._responseHandler._queueObserver(e)},M.prototype.isBroken=function(){return!!this._fatalError},M.prototype.notifyFatalErrorToObserver=function(e){e&&e.onError&&e.onError(this._fatalError)},M.prototype.resetFailure=function(){this._responseHandler._resetFailure()},M.prototype._onLoginCompleted=function(e,t,r){this._initialized=!0,this._authToken=t,e&&(t=e.server,this._server.version||(this._server.version=t)),r&&r(e)},M.prototype._onLoginError=function(e,t){this._onProtocolError(e.message),t&&t(e)},M);function M(e,t,r,n,o,i){var r=void 0===r?{}:r,u=r.disableLosslessIntegers,r=r.useBigInt;void 0===n&&(n=function(){return null}),this._server=e||{},this._chunker=t,this._packer=this._createPacker(t),this._unpacker=this._createUnpacker(u,r),this._responseHandler=n(this),this._log=o,this._onProtocolError=i,this._fatalError=null,this._lastMessageSignature=null,this._config={disableLosslessIntegers:u,useBigInt:r}}Uh.default=Z_;var J_={},p={},rv={},eI=(Object.defineProperty(rv,"__esModule",{value:!0}),rv.epochSecondAndNanoToLocalDateTime=rv.nanoOfDayToLocalTime=rv.epochDayToDate=void 0,e),Hd=eI.internal.temporalUtil,tI=Hd.DAYS_0000_TO_1970,rI=Hd.DAYS_PER_400_YEAR_CYCLE,nI=Hd.NANOS_PER_HOUR,oI=Hd.NANOS_PER_MINUTE,iI=Hd.NANOS_PER_SECOND,uI=Hd.SECONDS_PER_DAY,aI=Hd.floorDiv,sI=Hd.floorMod;function cI(e){var e=(e=(0,eI.int)(e)).add(tI).subtract(60),t=(0,eI.int)(0),r=(e.lessThan(0)&&(t=(r=e.add(1).div(rI).subtract(1)).multiply(400),e=e.add(r.multiply(-rI))),e.multiply(400).add(591).div(rI)),n=e.subtract(r.multiply(365).add(r.div(4)).subtract(r.div(100)).add(r.div(400))),e=(n.lessThan(0)&&(r=r.subtract(1),n=e.subtract(r.multiply(365).add(r.div(4)).subtract(r.div(100)).add(r.div(400)))),r=r.add(t),n),t=e.multiply(5).add(2).div(153),n=t.add(2).modulo(12).add(1),e=e.subtract(t.multiply(306).add(5).div(10)).add(1),r=r.add(t.div(10));return new eI.Date(r,n,e)}function lI(e){var t=(e=(0,eI.int)(e)).div(nI),r=(e=e.subtract(t.multiply(nI))).div(oI),n=(e=e.subtract(r.multiply(oI))).div(iI),e=e.subtract(n.multiply(iI));return new eI.LocalTime(t,r,n,e)}rv.epochDayToDate=cI,rv.nanoOfDayToLocalTime=lI,rv.epochSecondAndNanoToLocalDateTime=function(e,t){var r=aI(e,uI),e=sI(e,uI).multiply(iI).add(t),t=cI(r),r=lI(e);return new eI.LocalDateTime(t.year,t.month,t.day,r.hour,r.minute,r.second,r.nanosecond)};var fI=r&&r.__assign||function(){return(fI=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},pI=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},sv=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},dI=(Object.defineProperty(p,"__esModule",{value:!0}),e),hI=vy,bI=w,yI=rv,hv=sv(U_),mv=dI.internal.temporalUtil,_I=mv.dateToEpochDay,vI=mv.localDateTimeToEpochSecond,mI=mv.localTimeToNanoOfDay;function gI(e,t,r){if(!t&&!r)return e;var n,o,i,u=Object.create(Object.getPrototypeOf(e));for(n in e)!0===Object.prototype.hasOwnProperty.call(e,n)&&(o=e[n],u[n]=(0,dI.isInt)(o)?(i=o,r?i.toBigInt():i.toNumberOrInfinity()):o);return Object.freeze(u),u}p.default=fI(fI({},hv.default),{createPoint2DTransformer:function(){return new bI.TypeTransformer({signature:88,isTypeInstance:function(e){return(0,dI.isPoint)(e)&&(null===e.z||void 0===e.z)},toStructure:function(e){return new hI.structure.Structure(88,[(0,dI.int)(e.srid),e.x,e.y])},fromStructure:function(e){hI.structure.verifyStructSize("Point2D",3,e.size);var e=pI(e.fields,3),t=e[0],r=e[1],e=e[2];return new dI.Point(t,r,e,void 0)}})},createPoint3DTransformer:function(){return new bI.TypeTransformer({signature:89,isTypeInstance:function(e){return(0,dI.isPoint)(e)&&null!==e.z&&void 0!==e.z},toStructure:function(e){return new hI.structure.Structure(89,[(0,dI.int)(e.srid),e.x,e.y,e.z])},fromStructure:function(e){hI.structure.verifyStructSize("Point3D",4,e.size);var e=pI(e.fields,4),t=e[0],r=e[1],n=e[2],e=e[3];return new dI.Point(t,r,n,e)}})},createDurationTransformer:function(){return new bI.TypeTransformer({signature:69,isTypeInstance:dI.isDuration,toStructure:function(e){var t=(0,dI.int)(e.months),r=(0,dI.int)(e.days),n=(0,dI.int)(e.seconds),e=(0,dI.int)(e.nanoseconds);return new hI.structure.Structure(69,[t,r,n,e])},fromStructure:function(e){hI.structure.verifyStructSize("Duration",4,e.size);var e=pI(e.fields,4),t=e[0],r=e[1],n=e[2],e=e[3];return new dI.Duration(t,r,n,e)}})},createLocalTimeTransformer:function(e){var t=e.disableLosslessIntegers,r=e.useBigInt;return new bI.TypeTransformer({signature:116,isTypeInstance:dI.isLocalTime,toStructure:function(e){e=mI(e.hour,e.minute,e.second,e.nanosecond);return new hI.structure.Structure(116,[e])},fromStructure:function(e){hI.structure.verifyStructSize("LocalTime",1,e.size);e=pI(e.fields,1)[0];return gI((0,yI.nanoOfDayToLocalTime)(e),t,r)}})},createTimeTransformer:function(e){var r=e.disableLosslessIntegers,n=e.useBigInt;return new bI.TypeTransformer({signature:84,isTypeInstance:dI.isTime,toStructure:function(e){var t=mI(e.hour,e.minute,e.second,e.nanosecond),e=(0,dI.int)(e.timeZoneOffsetSeconds);return new hI.structure.Structure(84,[t,e])},fromStructure:function(e){hI.structure.verifyStructSize("Time",2,e.size);var e=pI(e.fields,2),t=e[0],e=e[1],t=(0,yI.nanoOfDayToLocalTime)(t);return gI(new dI.Time(t.hour,t.minute,t.second,t.nanosecond,e),r,n)}})},createDateTransformer:function(e){var t=e.disableLosslessIntegers,r=e.useBigInt;return new bI.TypeTransformer({signature:68,isTypeInstance:dI.isDate,toStructure:function(e){e=_I(e.year,e.month,e.day);return new hI.structure.Structure(68,[e])},fromStructure:function(e){hI.structure.verifyStructSize("Date",1,e.size);e=pI(e.fields,1)[0];return gI((0,yI.epochDayToDate)(e),t,r)}})},createLocalDateTimeTransformer:function(e){var r=e.disableLosslessIntegers,n=e.useBigInt;return new bI.TypeTransformer({signature:100,isTypeInstance:dI.isLocalDateTime,toStructure:function(e){var t=vI(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond),e=(0,dI.int)(e.nanosecond);return new hI.structure.Structure(100,[t,e])},fromStructure:function(e){hI.structure.verifyStructSize("LocalDateTime",2,e.size);var e=pI(e.fields,2),t=e[0],e=e[1];return gI((0,yI.epochSecondAndNanoToLocalDateTime)(t,e),r,n)}})},createDateTimeWithZoneIdTransformer:function(e){var n=e.disableLosslessIntegers,o=e.useBigInt;return new bI.TypeTransformer({signature:102,isTypeInstance:function(e){return(0,dI.isDateTime)(e)&&null!=e.timeZoneId},toStructure:function(e){var t=vI(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond),r=(0,dI.int)(e.nanosecond),e=e.timeZoneId;return new hI.structure.Structure(102,[t,r,e])},fromStructure:function(e){hI.structure.verifyStructSize("DateTimeWithZoneId",3,e.size);var e=pI(e.fields,3),t=e[0],r=e[1],e=e[2],t=(0,yI.epochSecondAndNanoToLocalDateTime)(t,r);return gI(new dI.DateTime(t.year,t.month,t.day,t.hour,t.minute,t.second,t.nanosecond,null,e),n,o)}})},createDateTimeWithOffsetTransformer:function(e){var n=e.disableLosslessIntegers,o=e.useBigInt;return new bI.TypeTransformer({signature:70,isTypeInstance:function(e){return(0,dI.isDateTime)(e)&&null==e.timeZoneId},toStructure:function(e){var t=vI(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond),r=(0,dI.int)(e.nanosecond),e=(0,dI.int)(e.timeZoneOffsetSeconds);return new hI.structure.Structure(70,[t,r,e])},fromStructure:function(e){hI.structure.verifyStructSize("DateTimeWithZoneOffset",3,e.size);var e=pI(e.fields,3),t=e[0],r=e[1],e=e[2],t=(0,yI.epochSecondAndNanoToLocalDateTime)(t,r);return gI(new dI.DateTime(t.year,t.month,t.day,t.hour,t.minute,t.second,t.nanosecond,e,null),n,o)}})}});var OI,wI,Sv=r&&r.__extends||(OI=function(e,t){return(OI=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}OI(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),kt=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Rv=(Object.defineProperty(J_,"__esModule",{value:!0}),kt(Uh)),EI=kt(vy),xv=e,PI=kt(p),SI=kt(w),TI=xv.internal.constants.BOLT_PROTOCOL_V2,Fv=(wI=Rv.default,Sv(jI,wI),jI.prototype._createPacker=function(e){return new EI.default.Packer(e)},jI.prototype._createUnpacker=function(e,t){return new EI.default.Unpacker(e,t)},Object.defineProperty(jI.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new SI.default(Object.values(PI.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),Object.defineProperty(jI.prototype,"version",{get:function(){return TI},enumerable:!1,configurable:!0}),jI);function jI(){return null!==wI&&wI.apply(this,arguments)||this}J_.default=Fv;var CI,II,Gd={},Gv={},RI=r&&r.__assign||function(){return(RI=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},em=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},nm=(Object.defineProperty(Gv,"__esModule",{value:!0}),em(p)),cm=(Gv.default=RI({},nm.default),r&&r.__extends||(CI=function(e,t){return(CI=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}CI(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),kI=r&&r.__assign||function(){return(kI=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},fm=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},bm=(Object.defineProperty(Gd,"__esModule",{value:!0}),fm(J_)),AI=fm(P_),MI=Hh,NI=I,xI=fm(Gv),DI=fm(w),UI=(e.internal.bookmarks.Bookmarks,e.internal.constants.BOLT_PROTOCOL_V3),LI=e.internal.txConfig.TxConfig,FI="context",BI="CALL dbms.cluster.routing.getRoutingTable($".concat(FI,")"),WI=new NI.StreamObserver,gm=(II=bm.default,cm(zI,II),Object.defineProperty(zI.prototype,"version",{get:function(){return UI},enumerable:!1,configurable:!0}),Object.defineProperty(zI.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new DI.default(Object.values(xI.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),zI.prototype.transformMetadata=function(e){return"t_first"in e&&(e.result_available_after=e.t_first,delete e.t_first),"t_last"in e&&(e.result_consumed_after=e.t_last,delete e.t_last),e},zI.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=(e.boltAgent,e.authToken),o=e.notificationFilter,i=e.onError,u=e.onComplete,e=new NI.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return t._onLoginCompleted(e,n,u)}});return(0,MI.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(AI.default.hello(r,n),e,!0),e},zI.prototype.prepareToClose=function(){this.write(AI.default.goodbye(),WI,!0)},zI.prototype.beginTransaction=function(e){var e=void 0===e?{}:e,t=e.bookmarks,r=e.txConfig,n=e.database,o=e.impersonatedUser,i=e.notificationFilter,u=e.mode,a=e.beforeError,s=e.afterError,c=e.beforeComplete,e=e.afterComplete,a=new NI.ResultStreamObserver({server:this._server,beforeError:a,afterError:s,beforeComplete:c,afterComplete:e});return a.prepareToHandleSingleResponse(),(0,MI.assertDatabaseIsEmpty)(n,this._onProtocolError,a),(0,MI.assertImpersonatedUserIsEmpty)(o,this._onProtocolError,a),(0,MI.assertNotificationFilterIsEmpty)(i,this._onProtocolError,a),this.write(AI.default.begin({bookmarks:t,txConfig:r,mode:u}),a,!0),a},zI.prototype.commitTransaction=function(e){var e=void 0===e?{}:e,t=e.beforeError,r=e.afterError,n=e.beforeComplete,e=e.afterComplete,t=new NI.ResultStreamObserver({server:this._server,beforeError:t,afterError:r,beforeComplete:n,afterComplete:e});return t.prepareToHandleSingleResponse(),this.write(AI.default.commit(),t,!0),t},zI.prototype.rollbackTransaction=function(e){var e=void 0===e?{}:e,t=e.beforeError,r=e.afterError,n=e.beforeComplete,e=e.afterComplete,t=new NI.ResultStreamObserver({server:this._server,beforeError:t,afterError:r,beforeComplete:n,afterComplete:e});return t.prepareToHandleSingleResponse(),this.write(AI.default.rollback(),t,!0),t},zI.prototype.run=function(e,t,r){var r=void 0===r?{}:r,n=r.bookmarks,o=r.txConfig,i=r.database,u=r.impersonatedUser,a=r.notificationFilter,s=r.mode,c=r.beforeKeys,l=r.afterKeys,f=r.beforeError,p=r.afterError,d=r.beforeComplete,h=r.afterComplete,b=r.flush,b=void 0===b||b,y=r.highRecordWatermark,y=void 0===y?Number.MAX_VALUE:y,r=r.lowRecordWatermark,r=void 0===r?Number.MAX_VALUE:r,c=new NI.ResultStreamObserver({server:this._server,beforeKeys:c,afterKeys:l,beforeError:f,afterError:p,beforeComplete:d,afterComplete:h,highRecordWatermark:y,lowRecordWatermark:r});return(0,MI.assertDatabaseIsEmpty)(i,this._onProtocolError,c),(0,MI.assertImpersonatedUserIsEmpty)(u,this._onProtocolError,c),(0,MI.assertNotificationFilterIsEmpty)(a,this._onProtocolError,c),this.write(AI.default.runWithMetadata(e,t,{bookmarks:n,txConfig:o,mode:s}),c,!1),this.write(AI.default.pullAll(),c,b),c},zI.prototype.requestRoutingInformation=function(e){var t,r=e.routingContext,n=e.sessionContext,n=void 0===n?{}:n,o=e.onError,e=e.onCompleted,r=this.run(BI,((t={})[FI]=void 0===r?{}:r,t),kI(kI({},n),{txConfig:LI.empty()}));return new NI.ProcedureRouteObserver({resultObserver:r,onProtocolError:this._onProtocolError,onError:o,onCompleted:e})},zI);function zI(){return null!==II&&II.apply(this,arguments)||this}Gd.default=gm;var qI,VI,Em={},j={},HI=r&&r.__assign||function(){return(HI=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},jm=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Cm=(Object.defineProperty(j,"__esModule",{value:!0}),jm(Gv)),Nm=(j.default=HI({},Cm.default),r&&r.__extends||(qI=function(e,t){return(qI=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}qI(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),GI=r&&r.__assign||function(){return(GI=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Um=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},ob=(Object.defineProperty(Em,"__esModule",{value:!0}),Um(Gd)),YI=Um(P_),KI=Hh,ZI=I,QI=Um(j),XI=Um(w),zy=(e.internal.bookmarks.Bookmarks,e.internal.constants),JI=zy.BOLT_PROTOCOL_V4_0,$I=zy.FETCH_ALL,eR=e.internal.txConfig.TxConfig,tR="context",rR="database",nR="CALL dbms.routing.getRoutingTable($".concat(tR,", $").concat(rR,")"),Bm=(VI=ob.default,Nm(oR,VI),Object.defineProperty(oR.prototype,"version",{get:function(){return JI},enumerable:!1,configurable:!0}),Object.defineProperty(oR.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new XI.default(Object.values(QI.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),oR.prototype.beginTransaction=function(e){var e=void 0===e?{}:e,t=e.bookmarks,r=e.txConfig,n=e.database,o=e.impersonatedUser,i=e.notificationFilter,u=e.mode,a=e.beforeError,s=e.afterError,c=e.beforeComplete,e=e.afterComplete,a=new ZI.ResultStreamObserver({server:this._server,beforeError:a,afterError:s,beforeComplete:c,afterComplete:e});return a.prepareToHandleSingleResponse(),(0,KI.assertImpersonatedUserIsEmpty)(o,this._onProtocolError,a),(0,KI.assertNotificationFilterIsEmpty)(i,this._onProtocolError,a),this.write(YI.default.begin({bookmarks:t,txConfig:r,database:n,mode:u}),a,!0),a},oR.prototype.run=function(e,t,r){var r=void 0===r?{}:r,n=r.bookmarks,o=r.txConfig,i=r.database,u=r.impersonatedUser,a=r.notificationFilter,s=r.mode,c=r.beforeKeys,l=r.afterKeys,f=r.beforeError,p=r.afterError,d=r.beforeComplete,h=r.afterComplete,b=r.flush,b=void 0===b||b,y=r.reactive,y=void 0!==y&&y,_=r.fetchSize,_=void 0===_?$I:_,v=r.highRecordWatermark,v=void 0===v?Number.MAX_VALUE:v,r=r.lowRecordWatermark,r=void 0===r?Number.MAX_VALUE:r,c=new ZI.ResultStreamObserver({server:this._server,reactive:y,fetchSize:_,moreFunction:this._requestMore.bind(this),discardFunction:this._requestDiscard.bind(this),beforeKeys:c,afterKeys:l,beforeError:f,afterError:p,beforeComplete:d,afterComplete:h,highRecordWatermark:v,lowRecordWatermark:r}),l=((0,KI.assertImpersonatedUserIsEmpty)(u,this._onProtocolError,c),(0,KI.assertNotificationFilterIsEmpty)(a,this._onProtocolError,c),y);return this.write(YI.default.runWithMetadata(e,t,{bookmarks:n,txConfig:o,database:i,mode:s}),c,l&&b),y||this.write(YI.default.pull({n:_}),c,b),c},oR.prototype._requestMore=function(e,t,r){this.write(YI.default.pull({stmtId:e,n:t}),r,!0)},oR.prototype._requestDiscard=function(e,t){this.write(YI.default.discard({stmtId:e}),t,!0)},oR.prototype._noOp=function(){},oR.prototype.requestRoutingInformation=function(e){var t,r=e.routingContext,n=e.databaseName,n=void 0===n?null:n,o=e.sessionContext,o=void 0===o?{}:o,i=e.onError,e=e.onCompleted,r=this.run(nR,((t={})[tR]=void 0===r?{}:r,t[rR]=n,t),GI(GI({},o),{txConfig:eR.empty()}));return new ZI.ProcedureRouteObserver({resultObserver:r,onProtocolError:this._onProtocolError,onError:i,onCompleted:e})},oR);function oR(){return null!==VI&&VI.apply(this,arguments)||this}Em.default=Bm;var iR,uR,Hm={},Km={},aR=r&&r.__assign||function(){return(aR=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},y=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},r0=(Object.defineProperty(Km,"__esModule",{value:!0}),y(j)),Bb=(Km.default=aR({},r0.default),r&&r.__extends||(iR=function(e,t){return(iR=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}iR(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),u0=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},As=(Object.defineProperty(Hm,"__esModule",{value:!0}),u0(Em)),sR=u0(P_),cR=I,f0=e,lR=Hh,fR=u0(Km),pR=u0(w),dR=f0.internal.constants.BOLT_PROTOCOL_V4_1,yc=(uR=As.default,Bb(hR,uR),Object.defineProperty(hR.prototype,"version",{get:function(){return dR},enumerable:!1,configurable:!0}),Object.defineProperty(hR.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new pR.default(Object.values(fR.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),hR.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=(e.boltAgent,e.authToken),o=e.notificationFilter,i=e.onError,u=e.onComplete,e=new cR.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return t._onLoginCompleted(e,n,u)}});return(0,lR.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(sR.default.hello(r,n,this._serversideRouting),e,!0),e},hR);function hR(e,t,r,n,o,i,u){e=uR.call(this,e,t,r,n=void 0===n?function(){return null}:n,o,i)||this;return e._serversideRouting=u,e}Hm.default=yc;var bR,yR,Vd={},u={},_R=r&&r.__assign||function(){return(_R=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},w0=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},j0=(Object.defineProperty(u,"__esModule",{value:!0}),w0(Km)),oc=(u.default=_R({},j0.default),r&&r.__extends||(bR=function(e,t){return(bR=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}bR(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),Q=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},K0=(Object.defineProperty(Vd,"__esModule",{value:!0}),Q(Hm)),l=e,vR=Q(u),mR=Q(w),gR=l.internal.constants.BOLT_PROTOCOL_V4_2,O=(yR=K0.default,oc(OR,yR),Object.defineProperty(OR.prototype,"version",{get:function(){return gR},enumerable:!1,configurable:!0}),Object.defineProperty(OR.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new mR.default(Object.values(vR.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),OR);function OR(){return null!==yR&&yR.apply(this,arguments)||this}Vd.default=O;var T={},g={},wR=r&&r.__assign||function(){return(wR=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},i=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Qt=(Object.defineProperty(g,"__esModule",{value:!0}),i(u)),tn=(g.default=wR({},Qt.default),{}),o={},ER=r&&r.__assign||function(){return(ER=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},ka=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},ia=(Object.defineProperty(o,"__esModule",{value:!0}),ka(g)),PR=(o.default=ER({},ia.default),r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u}),Ha=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},SR=(Object.defineProperty(tn,"__esModule",{value:!0}),vy),TR=e,jR=Ha(o),CR=rv,IR=Ay,RR=TR.internal.temporalUtil.localDateTimeToEpochSecond;var kR=new Map;function AR(e,t,r){e=e,kR.has(e)||(n=new Intl.DateTimeFormat("en-US",{timeZone:e,year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!1,era:"narrow"}),kR.set(e,n));var n=kR.get(e),e=(0,TR.int)(t).multiply(1e3).add((0,TR.int)(r).div(1e6)).toNumber(),r=n.formatToParts(e).reduce(function(e,t){return"era"===t.type?e.adjustEra="B"===t.value.toUpperCase()?function(e){return e.subtract(1).negate()}:IR.identity:"hour"===t.type?e.hour=(0,TR.int)(t.value).modulo(24):"literal"!==t.type&&(e[t.type]=(0,TR.int)(t.value)),e},{}),e=(r.year=r.adjustEra(r.year),RR(r.year,r.month,r.day,r.hour,r.minute,r.second,r.nanosecond));return r.timeZoneOffsetSeconds=e.subtract(t),r.hour=r.hour.modulo(24),r}function MR(e,t,r){if(!t&&!r)return e;var n,o,i,u=Object.create(Object.getPrototypeOf(e));for(n in e)!0===Object.prototype.hasOwnProperty.call(e,n)&&(o=e[n],u[n]=(0,TR.isInt)(o)?(i=o,r?i.toBigInt():i.toNumberOrInfinity()):o);return Object.freeze(u),u}tn.default={createDateTimeWithZoneIdTransformer:function(e,u){var n=e.disableLosslessIntegers,o=e.useBigInt;return jR.default.createDateTimeWithZoneIdTransformer(e).extendsWith({signature:105,fromStructure:function(e){SR.structure.verifyStructSize("DateTimeWithZoneId",3,e.size);var e=PR(e.fields,3),t=e[0],r=e[1],e=e[2],t=AR(e,t,r);return MR(new TR.DateTime(t.year,t.month,t.day,t.hour,t.minute,t.second,(0,TR.int)(r),t.timeZoneOffsetSeconds,e),n,o)},toStructure:function(e){var t=RR(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond),r=null!=e.timeZoneOffsetSeconds?e.timeZoneOffsetSeconds:(r=e.timeZoneId,i=t,o=e.nanosecond,n=AR(r,i,o),n=RR(n.year,n.month,n.day,n.hour,n.minute,n.second,o).subtract(i),i=i.subtract(n),n=AR(r,i,o),RR(n.year,n.month,n.day,n.hour,n.minute,n.second,o).subtract(i)),n=(null==e.timeZoneOffsetSeconds&&u.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.'),t.subtract(r)),o=(0,TR.int)(e.nanosecond),i=e.timeZoneId;return new SR.structure.Structure(105,[n,o,i])}})},createDateTimeWithOffsetTransformer:function(e){var n=e.disableLosslessIntegers,o=e.useBigInt;return jR.default.createDateTimeWithOffsetTransformer(e).extendsWith({signature:73,toStructure:function(e){var t=RR(e.year,e.month,e.day,e.hour,e.minute,e.second,e.nanosecond),r=(0,TR.int)(e.nanosecond),e=(0,TR.int)(e.timeZoneOffsetSeconds),t=t.subtract(e);return new SR.structure.Structure(73,[t,r,e])},fromStructure:function(e){SR.structure.verifyStructSize("DateTimeWithZoneOffset",3,e.size);var e=PR(e.fields,3),t=e[0],r=e[1],e=e[2],t=(0,TR.int)(t).add(e),t=(0,CR.epochSecondAndNanoToLocalDateTime)(t,r);return MR(new TR.DateTime(t.year,t.month,t.day,t.hour,t.minute,t.second,t.nanosecond,e,null),n,o)}})}};var NR,xR,Wa=r&&r.__extends||(NR=function(e,t){return(NR=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}NR(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),DR=r&&r.__assign||function(){return(DR=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},b=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},ua=(Object.defineProperty(T,"__esModule",{value:!0}),b(Vd)),UR=b(P_),LR=I,FR=Hh,BR=b(g),WR=b(tn),zR=b(w),qR=e.internal.bookmarks.Bookmarks,VR=e.internal.constants.BOLT_PROTOCOL_V4_3,da=(xR=ua.default,Wa(HR,xR),Object.defineProperty(HR.prototype,"version",{get:function(){return VR},enumerable:!1,configurable:!0}),Object.defineProperty(HR.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new zR.default(Object.values(BR.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),HR.prototype.requestRoutingInformation=function(e){var t=e.routingContext,t=void 0===t?{}:t,r=e.databaseName,r=void 0===r?null:r,n=e.sessionContext,n=void 0===n?{}:n,o=e.onError,e=e.onCompleted,o=new LR.RouteObserver({onProtocolError:this._onProtocolError,onError:o,onCompleted:e}),e=n.bookmarks||qR.empty();return this.write(UR.default.route(t,e.values(),r),o,!0),o},HR.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=(e.boltAgent,e.authToken),o=e.notificationFilter,i=e.onError,u=e.onComplete,e=new LR.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return void 0!==e.patch_bolt&&t._applyPatches(e.patch_bolt),t._onLoginCompleted(e,n,u)}});return(0,FR.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(UR.default.hello(r,n,this._serversideRouting,["utc"]),e,!0),e},HR.prototype._applyPatches=function(e){e.includes("utc")&&this._applyUtcPatch()},HR.prototype._applyUtcPatch=function(){var t=this;this._transformer=new zR.default(Object.values(DR(DR({},BR.default),WR.default)).map(function(e){return e(t._config,t._log)}))},HR);function HR(){return null!==xR&&xR.apply(this,arguments)||this}T.default=da;var GR,YR,P={},n=r&&r.__extends||(GR=function(e,t){return(GR=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}GR(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),KR=r&&r.__assign||function(){return(KR=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Ts=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Sc=(Object.defineProperty(P,"__esModule",{value:!0}),Ts(T)),dt=e,ZR=Ts(P_),QR=I,XR=Hh,JR=Ts(o),$R=Ts(tn),ek=Ts(w),ms=dt.internal.constants,tk=ms.BOLT_PROTOCOL_V4_4,rk=ms.FETCH_ALL,nk=dt.internal.bookmarks.Bookmarks,pc=(YR=Sc.default,n(ok,YR),Object.defineProperty(ok.prototype,"version",{get:function(){return tk},enumerable:!1,configurable:!0}),Object.defineProperty(ok.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new ek.default(Object.values(JR.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),ok.prototype.requestRoutingInformation=function(e){var t=e.routingContext,t=void 0===t?{}:t,r=e.databaseName,r=void 0===r?null:r,n=e.impersonatedUser,n=void 0===n?null:n,o=e.sessionContext,o=void 0===o?{}:o,i=e.onError,e=e.onCompleted,i=new QR.RouteObserver({onProtocolError:this._onProtocolError,onError:i,onCompleted:e}),e=o.bookmarks||nk.empty();return this.write(ZR.default.routeV4x4(t,e.values(),{databaseName:r,impersonatedUser:n}),i,!0),i},ok.prototype.run=function(e,t,r){var r=void 0===r?{}:r,n=r.bookmarks,o=r.txConfig,i=r.database,u=r.mode,a=r.impersonatedUser,s=r.notificationFilter,c=r.beforeKeys,l=r.afterKeys,f=r.beforeError,p=r.afterError,d=r.beforeComplete,h=r.afterComplete,b=r.flush,b=void 0===b||b,y=r.reactive,y=void 0!==y&&y,_=r.fetchSize,_=void 0===_?rk:_,v=r.highRecordWatermark,v=void 0===v?Number.MAX_VALUE:v,r=r.lowRecordWatermark,r=void 0===r?Number.MAX_VALUE:r,c=new QR.ResultStreamObserver({server:this._server,reactive:y,fetchSize:_,moreFunction:this._requestMore.bind(this),discardFunction:this._requestDiscard.bind(this),beforeKeys:c,afterKeys:l,beforeError:f,afterError:p,beforeComplete:d,afterComplete:h,highRecordWatermark:v,lowRecordWatermark:r}),l=((0,XR.assertNotificationFilterIsEmpty)(s,this._onProtocolError,c),y);return this.write(ZR.default.runWithMetadata(e,t,{bookmarks:n,txConfig:o,database:i,mode:u,impersonatedUser:a}),c,l&&b),y||this.write(ZR.default.pull({n:_}),c,b),c},ok.prototype.beginTransaction=function(e){var e=void 0===e?{}:e,t=e.bookmarks,r=e.txConfig,n=e.database,o=e.mode,i=e.impersonatedUser,u=e.notificationFilter,a=e.beforeError,s=e.afterError,c=e.beforeComplete,e=e.afterComplete,a=new QR.ResultStreamObserver({server:this._server,beforeError:a,afterError:s,beforeComplete:c,afterComplete:e});return a.prepareToHandleSingleResponse(),(0,XR.assertNotificationFilterIsEmpty)(u,this._onProtocolError,a),this.write(ZR.default.begin({bookmarks:t,txConfig:r,database:n,mode:o,impersonatedUser:i}),a,!0),a},ok.prototype._applyUtcPatch=function(){var t=this;this._transformer=new ek.default(Object.values(KR(KR({},JR.default),$R.default)).map(function(e){return e(t._config,t._log)}))},ok);function ok(){return null!==YR&&YR.apply(this,arguments)||this}P.default=pc;var Os={},js={},ik=r&&r.__assign||function(){return(ik=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},uk=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Qr=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},ak=(Object.defineProperty(js,"__esModule",{value:!0}),vy),sk=e,ck=Qr(o),Ps=Qr(tn);js.default=ik(ik(ik({},ck.default),Ps.default),{createNodeTransformer:function(e){return ck.default.createNodeTransformer(e).extendsWith({fromStructure:function(e){ak.structure.verifyStructSize("Node",4,e.size);var e=uk(e.fields,4),t=e[0],r=e[1],n=e[2],e=e[3];return new sk.Node(t,r,n,e)}})},createRelationshipTransformer:function(e){return ck.default.createRelationshipTransformer(e).extendsWith({fromStructure:function(e){ak.structure.verifyStructSize("Relationship",8,e.size);var e=uk(e.fields,8),t=e[0],r=e[1],n=e[2],o=e[3],i=e[4],u=e[5],a=e[6],e=e[7];return new sk.Relationship(t,r,n,o,i,u,a,e)}})},createUnboundRelationshipTransformer:function(e){return ck.default.createUnboundRelationshipTransformer(e).extendsWith({fromStructure:function(e){ak.structure.verifyStructSize("UnboundRelationship",4,e.size);var e=uk(e.fields,4),t=e[0],r=e[1],n=e[2],e=e[3];return new sk.UnboundRelationship(t,r,n,e)}})}});var lk,fk,Il=r&&r.__extends||(lk=function(e,t){return(lk=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}lk(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Dl=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},vs=(Object.defineProperty(Os,"__esModule",{value:!0}),Dl(P)),pk=Hh,dk=Dl(js),hk=Dl(w),bk=Dl(P_),yk=I,_k=e.internal.constants.BOLT_PROTOCOL_V5_0,vc=(fk=vs.default,Il(vk,fk),Object.defineProperty(vk.prototype,"version",{get:function(){return _k},enumerable:!1,configurable:!0}),Object.defineProperty(vk.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new hk.default(Object.values(dk.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),vk.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=(e.boltAgent,e.authToken),o=e.notificationFilter,i=e.onError,u=e.onComplete,e=new yk.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return t._onLoginCompleted(e,n,u)}});return(0,pk.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(bk.default.hello(r,n,this._serversideRouting),e,!0),e},vk);function vk(){return null!==fk&&fk.apply(this,arguments)||this}Os.default=vc;var mk,gk,s={},fp={},Ok=r&&r.__assign||function(){return(Ok=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},mp=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Op=(Object.defineProperty(fp,"__esModule",{value:!0}),mp(js)),xp=(fp.default=Ok({},Op.default),r&&r.__extends||(mk=function(e,t){return(mk=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}mk(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),wk=r&&r.__assign||function(){return(wk=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},_s=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Ip=(Object.defineProperty(s,"__esModule",{value:!0}),_s(Os)),Ek=Hh,Pk=_s(fp),Sk=_s(w),Tk=_s(P_),jk=I,Ck=e.internal.constants.BOLT_PROTOCOL_V5_1,Xf=(gk=Ip.default,xp(Ik,gk),Object.defineProperty(Ik.prototype,"version",{get:function(){return Ck},enumerable:!1,configurable:!0}),Object.defineProperty(Ik.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new Sk.default(Object.values(Pk.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),Object.defineProperty(Ik.prototype,"supportsReAuth",{get:function(){return!0},enumerable:!1,configurable:!0}),Ik.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=(e.boltAgent,e.authToken),o=e.notificationFilter,i=e.onError,u=e.onComplete,a={},e=new jk.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return a.metadata=e,t._onLoginCompleted(e)}});return(0,Ek.assertNotificationFilterIsEmpty)(o,this._onProtocolError,e),this.write(Tk.default.hello5x1(r,this._serversideRouting),e,!1),this.logon({authToken:n,onComplete:function(e){return u(wk(wk({},e),a.metadata))},onError:i,flush:!0})},Ik.prototype.logon=function(e){var t=this,e=void 0===e?{}:e,r=e.authToken,n=e.onComplete,o=e.onError,e=e.flush,i=new jk.LoginObserver({onCompleted:function(){return t._onLoginCompleted(null,r,n)},onError:function(e){return t._onLoginError(e,o)}});return this.write(Tk.default.logon(r),i,e),i},Ik.prototype.logoff=function(e){var e=void 0===e?{}:e,t=e.onComplete,r=e.onError,e=e.flush,t=new jk.LogoffObserver({onCompleted:t,onError:r});return this.write(Tk.default.logoff(),t,e),t},Ik);function Ik(){return null!==gk&&gk.apply(this,arguments)||this}s.default=Xf;var Rk,kk,Lp={},ys={},Ak=r&&r.__assign||function(){return(Ak=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},oa=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},lp=(Object.defineProperty(ys,"__esModule",{value:!0}),oa(fp)),wf=(ys.default=Ak({},lp.default),r&&r.__extends||(Rk=function(e,t){return(Rk=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Rk(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),Mk=r&&r.__assign||function(){return(Mk=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},m=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},zp=(Object.defineProperty(Lp,"__esModule",{value:!0}),m(s)),Nk=m(ys),xk=m(w),Dk=m(P_),Uk=I,Xp=e.internal.constants,Lk=Xp.BOLT_PROTOCOL_V5_2,Fk=Xp.FETCH_ALL,h=(kk=zp.default,wf(Bk,kk),Object.defineProperty(Bk.prototype,"version",{get:function(){return Lk},enumerable:!1,configurable:!0}),Object.defineProperty(Bk.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new xk.default(Object.values(Nk.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),Object.defineProperty(Bk.prototype,"supportsReAuth",{get:function(){return!0},enumerable:!1,configurable:!0}),Bk.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=(e.boltAgent,e.authToken),o=e.notificationFilter,i=e.onError,u=e.onComplete,a={},e=new Uk.LoginObserver({onError:function(e){return t._onLoginError(e,i)},onCompleted:function(e){return a.metadata=e,t._onLoginCompleted(e)}});return this.write(Dk.default.hello5x2(r,o,this._serversideRouting),e,!1),this.logon({authToken:n,onComplete:function(e){return u(Mk(Mk({},e),a.metadata))},onError:i,flush:!0})},Bk.prototype.beginTransaction=function(e){var e=void 0===e?{}:e,t=e.bookmarks,r=e.txConfig,n=e.database,o=e.mode,i=e.impersonatedUser,u=e.notificationFilter,a=e.beforeError,s=e.afterError,c=e.beforeComplete,e=e.afterComplete,a=new Uk.ResultStreamObserver({server:this._server,beforeError:a,afterError:s,beforeComplete:c,afterComplete:e});return a.prepareToHandleSingleResponse(),this.write(Dk.default.begin({bookmarks:t,txConfig:r,database:n,mode:o,impersonatedUser:i,notificationFilter:u}),a,!0),a},Bk.prototype.run=function(e,t,r){var r=void 0===r?{}:r,n=r.bookmarks,o=r.txConfig,i=r.database,u=r.mode,a=r.impersonatedUser,s=r.notificationFilter,c=r.beforeKeys,l=r.afterKeys,f=r.beforeError,p=r.afterError,d=r.beforeComplete,h=r.afterComplete,b=r.flush,b=void 0===b||b,y=r.reactive,y=void 0!==y&&y,_=r.fetchSize,_=void 0===_?Fk:_,v=r.highRecordWatermark,v=void 0===v?Number.MAX_VALUE:v,r=r.lowRecordWatermark,r=void 0===r?Number.MAX_VALUE:r,c=new Uk.ResultStreamObserver({server:this._server,reactive:y,fetchSize:_,moreFunction:this._requestMore.bind(this),discardFunction:this._requestDiscard.bind(this),beforeKeys:c,afterKeys:l,beforeError:f,afterError:p,beforeComplete:d,afterComplete:h,highRecordWatermark:v,lowRecordWatermark:r}),l=y;return this.write(Dk.default.runWithMetadata(e,t,{bookmarks:n,txConfig:o,database:i,mode:u,impersonatedUser:a,notificationFilter:s}),c,l&&b),y||this.write(Dk.default.pull({n:_}),c,b),c},Bk);function Bk(){return null!==kk&&kk.apply(this,arguments)||this}Lp.default=h;var Wk,zk,pp={},Jp={},qk=r&&r.__assign||function(){return(qk=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},ls=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},ud=(Object.defineProperty(Jp,"__esModule",{value:!0}),ls(ys)),wp=(Jp.default=qk({},ud.default),r&&r.__extends||(Wk=function(e,t){return(Wk=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Wk(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),Vk=r&&r.__assign||function(){return(Vk=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},fd=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},rd=(Object.defineProperty(pp,"__esModule",{value:!0}),fd(Lp)),Hk=fd(Jp),Gk=fd(w),Yk=fd(P_),Kk=I,Zk=e.internal.constants.BOLT_PROTOCOL_V5_3,yd=(zk=rd.default,wp(Qk,zk),Object.defineProperty(Qk.prototype,"version",{get:function(){return Zk},enumerable:!1,configurable:!0}),Object.defineProperty(Qk.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new Gk.default(Object.values(Hk.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),Qk.prototype.initialize=function(e){var t=this,e=void 0===e?{}:e,r=e.userAgent,n=e.boltAgent,o=e.authToken,i=e.notificationFilter,u=e.onError,a=e.onComplete,s={},e=new Kk.LoginObserver({onError:function(e){return t._onLoginError(e,u)},onCompleted:function(e){return s.metadata=e,t._onLoginCompleted(e)}});return this.write(Yk.default.hello5x3(r,n,i,this._serversideRouting),e,!1),this.logon({authToken:o,onComplete:function(e){return a(Vk(Vk({},e),s.metadata))},onError:u,flush:!0})},Qk);function Qk(){return null!==zk&&zk.apply(this,arguments)||this}pp.default=yd;var Xk,Jk,Md={},zd={},$k=r&&r.__assign||function(){return($k=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Ld=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Th=(Object.defineProperty(zd,"__esModule",{value:!0}),Ld(Jp)),Zl=(zd.default=$k({},Th.default),r&&r.__extends||(Xk=function(e,t){return(Xk=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Xk(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),uh=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},pl=(Object.defineProperty(Md,"__esModule",{value:!0}),uh(pp)),eA=uh(zd),tA=uh(P_),rA=I,nA=uh(w),oA=e.internal.constants.BOLT_PROTOCOL_V5_4,kl=(Jk=pl.default,Zl(iA,Jk),Object.defineProperty(iA.prototype,"version",{get:function(){return oA},enumerable:!1,configurable:!0}),Object.defineProperty(iA.prototype,"transformer",{get:function(){var t=this;return void 0===this._transformer&&(this._transformer=new nA.default(Object.values(eA.default).map(function(e){return e(t._config,t._log)}))),this._transformer},enumerable:!1,configurable:!0}),iA.prototype.telemetry=function(e,t){var e=e.api,t=void 0===t?{}:t,r=t.onError,t=t.onCompleted,t=new rA.TelemetryObserver({onCompleted:t,onError:r});return this.write(tA.default.telemetry({api:e}),t,!1),t},iA);function iA(){return null!==Jk&&Jk.apply(this,arguments)||this}Md.default=kl;var ah={},uA=(Object.defineProperty(ah,"__esModule",{value:!0}),e);function aA(){}function sA(e){return e}var cA={onNext:aA,onCompleted:aA,onError:aA};function lA(e){var e=void 0===e?{}:e,t=e.transformMetadata,r=e.log,e=e.observer;this._pendingObservers=[],this._log=r,this._transformMetadata=t||sA,this._observer=Object.assign({onObserversCountChange:aA,onError:aA,onFailure:aA,onErrorApplyTransformation:sA},e)}Object.defineProperty(lA.prototype,"currentFailure",{get:function(){return this._currentFailure},enumerable:!1,configurable:!0}),lA.prototype.handleResponse=function(e){var t=e.fields[0];switch(e.signature){case 113:this._log.isDebugEnabled()&&this._log.debug("S: RECORD ".concat(uA.json.stringify(e))),this._currentObserver.onNext(t);break;case 112:this._log.isDebugEnabled()&&this._log.debug("S: SUCCESS ".concat(uA.json.stringify(e)));try{var r=this._transformMetadata(t);this._currentObserver.onCompleted(r)}finally{this._updateCurrentObserver()}break;case 127:this._log.isDebugEnabled()&&this._log.debug("S: FAILURE ".concat(uA.json.stringify(e)));try{var n=function(e){{if("Neo.TransientError.Transaction.Terminated"===e)return"Neo.ClientError.Transaction.Terminated";if("Neo.TransientError.Transaction.LockClientStopped"===e)return"Neo.ClientError.Transaction.LockClientStopped"}return e}(t.code),o=(0,uA.newError)(t.message,n);this._currentFailure=this._observer.onErrorApplyTransformation(o),this._currentObserver.onError(this._currentFailure)}finally{this._updateCurrentObserver(),this._observer.onFailure(this._currentFailure)}break;case 126:this._log.isDebugEnabled()&&this._log.debug("S: IGNORED ".concat(uA.json.stringify(e)));try{this._currentFailure&&this._currentObserver.onError?this._currentObserver.onError(this._currentFailure):this._currentObserver.onError&&this._currentObserver.onError((0,uA.newError)("Ignored either because of an error or RESET"))}finally{this._updateCurrentObserver()}break;default:this._observer.onError((0,uA.newError)("Unknown Bolt protocol message: "+e))}},lA.prototype._updateCurrentObserver=function(){this._currentObserver=this._pendingObservers.shift(),this._observer.onObserversCountChange(this._observersCount)},Object.defineProperty(lA.prototype,"_observersCount",{get:function(){return null==this._currentObserver?this._pendingObservers.length:this._pendingObservers.length+1},enumerable:!1,configurable:!0}),lA.prototype._queueObserver=function(e){return(e=e||cA).onCompleted=e.onCompleted||aA,e.onError=e.onError||aA,e.onNext=e.onNext||aA,void 0===this._currentObserver?this._currentObserver=e:this._pendingObservers.push(e),this._observer.onObserversCountChange(this._observersCount),!0},lA.prototype._notifyErrorToObservers=function(e){for(this._currentObserver&&this._currentObserver.onError&&this._currentObserver.onError(e);0<this._pendingObservers.length;){var t=this._pendingObservers.shift();t&&t.onError&&t.onError(e)}},lA.prototype.hasOngoingObservableRequests=function(){return null!=this._currentObserver||0<this._pendingObservers.length},lA.prototype._resetFailure=function(){this._currentFailure=null},ah.default=lA;var fA,bf=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},pA=(Object.defineProperty(Dh,"__esModule",{value:!0}),e),dA=bf(Uh),hA=bf(J_),bA=bf(Gd),yA=bf(Em),_A=bf(Hm),vA=bf(Vd),mA=bf(T),gA=bf(P),OA=bf(Os),wA=bf(s),EA=bf(Lp),PA=bf(pp),SA=bf(Md),TA=bf(ah);Dh.default=function(e){var t=(e=void 0===e?{}:e).version,r=e.chunker,n=e.dechunker,o=e.channel,i=e.disableLosslessIntegers,u=e.useBigInt,a=e.serversideRouting,s=e.server,c=e.log,l=e.observer,f=t,p=s,d=r,h={disableLosslessIntegers:i,useBigInt:u},b=a,y=function(t){var r=new TA.default({transformMetadata:t.transformMetadata.bind(t),log:c,observer:l});return o.onerror=l.onError.bind(l),o.onmessage=function(e){return n.write(e)},n.onmessage=function(e){try{r.handleResponse(t.unpack(e))}catch(e){return l.onError(e)}},r},_=l.onProtocolError.bind(l),v=c;switch(f){case 1:return new dA.default(p,d,h,y,v,_);case 2:return new hA.default(p,d,h,y,v,_);case 3:return new bA.default(p,d,h,y,v,_);case 4:return new yA.default(p,d,h,y,v,_);case 4.1:return new _A.default(p,d,h,y,v,_,b);case 4.2:return new vA.default(p,d,h,y,v,_,b);case 4.3:return new mA.default(p,d,h,y,v,_,b);case 4.4:return new gA.default(p,d,h,y,v,_,b);case 5:return new OA.default(p,d,h,y,v,_,b);case 5.1:return new wA.default(p,d,h,y,v,_,b);case 5.2:return new EA.default(p,d,h,y,v,_,b);case 5.3:return new PA.default(p,d,h,y,v,_,b);case 5.4:return new SA.default(p,d,h,y,v,_,b);default:throw(0,pA.newError)("Unknown Bolt protocol version: "+f)}},Sh=E,fA=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),C=r&&r.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||fA(t,e,r)},Sd=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(Sh,"__esModule",{value:!0}),Sh.RawRoutingTable=Sh.BoltProtocol=void 0,bs=Sd(Kl),qd=Sd(Dh),wh=Sd(T),Sd=Sd($h),C(I,Sh),Sh.BoltProtocol=wh.default,Sh.RawRoutingTable=Sd.default,Sh.default={handshake:bs.default,create:qd.default};nb={},rb={},Object.defineProperty(rb,"__esModule",{value:!0}),rb.DEFAULT_ACQUISITION_TIMEOUT=rb.DEFAULT_MAX_SIZE=void 0,rb.DEFAULT_MAX_SIZE=100,rb.DEFAULT_ACQUISITION_TIMEOUT=6e4,jA.defaultConfig=function(){return new jA(100,6e4)},jA.fromDriverConfig=function(e){return new jA(IA(e.maxConnectionPoolSize)?e.maxConnectionPoolSize:100,IA(e.connectionAcquisitionTimeout)?e.connectionAcquisitionTimeout:6e4)},Eb=jA;function jA(e,t){this.maxSize=CA(e,100),this.acquisitionTimeout=CA(t,6e4)}function CA(e,t){return 0===e||e?e:t}function IA(e){return 0===e||e}rb.default=Eb;var Ab={},RA=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},kA=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},Qb=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},AA=(Object.defineProperty(Ab,"__esModule",{value:!0}),Qb(rb)),MA=e,NA=MA.internal.logger.Logger,ty=(xA.prototype.acquire=function(o,i,u){var a=this,s=i.asKey(),c=this._acquireRequests;return c[s]||(c[s]=[]),new Promise(function(e,t){var r=null,n=setTimeout(function(){var e,t=c[s];t&&(c[s]=t.filter(function(e){return e!==r})),r.isCompleted()||(t=a.activeResourceCount(i),e=a.has(i)?a._pools[s].length:0,r.reject((0,MA.newError)("Connection acquisition timed out in ".concat(a._acquisitionTimeout," ms. Pool status: Active conn count = ").concat(t,", Idle conn count = ").concat(e,"."))))},a._acquisitionTimeout),r=new UA(s,o,u,e,t,n,a._log);c[s].push(r),a._processPendingAcquireRequests(i)})},xA.prototype.purge=function(e){return this._purgeKey(e.asKey())},xA.prototype.apply=function(e,t){e=e.asKey();e in this._pools&&this._pools[e].apply(t)},xA.prototype.close=function(){return RA(this,void 0,void 0,function(){var t=this;return kA(this,function(e){switch(e.label){case 0:return this._closed=!0,[4,Promise.all(Object.keys(this._pools).map(function(e){return t._purgeKey(e)}))];case 1:return[2,e.sent()]}})})},xA.prototype.keepAll=function(e){var t=this,r=e.map(function(e){return e.asKey()}),e=Object.keys(this._pools).filter(function(e){return-1===r.indexOf(e)});return Promise.all(e.map(function(e){return t._purgeKey(e)}))},xA.prototype.has=function(e){return e.asKey()in this._pools},xA.prototype.activeResourceCount=function(e){return this._activeResourceCounts[e.asKey()]||0},xA.prototype._getOrInitializePoolFor=function(e){var t=this._pools[e];return t||(t=new zA,this._pools[e]=t,this._pendingCreates[e]=0),t},xA.prototype._acquire=function(a,s,c){return RA(this,void 0,void 0,function(){var t,r,n,o,i,u=this;return kA(this,function(e){switch(e.label){case 0:if(this._closed)throw(0,MA.newError)("Pool is closed, it is no more able to serve requests.");if(t=s.asKey(),r=this._getOrInitializePoolFor(t),c)return[3,6];e.label=1;case 1:return r.length?(n=r.pop(),this._removeIdleObserver&&this._removeIdleObserver(n),[4,this._validateOnAcquire(a,n)]):[3,6];case 2:return e.sent()?(DA(t,this._activeResourceCounts),this._log.isDebugEnabled()&&this._log.debug("".concat(n," acquired from the pool ").concat(t)),[2,{resource:n,pool:r}]):[3,3];case 3:return r.removeInUse(n),[4,this._destroy(n)];case 4:e.sent(),e.label=5;case 5:return[3,1];case 6:if(0<this._maxSize&&this.activeResourceCount(s)+this._pendingCreates[t]>=this._maxSize)return[2,{resource:null,pool:r}];this._pendingCreates[t]=this._pendingCreates[t]+1,e.label=7;case 7:return(e.trys.push([7,,11,12]),this.activeResourceCount(s)+r.length>=this._maxSize&&c)?(i=r.pop(),this._removeIdleObserver&&this._removeIdleObserver(i),r.removeInUse(i),[4,this._destroy(i)]):[3,9];case 8:e.sent(),e.label=9;case 9:return[4,this._create(a,s,function(e,t){return u._release(e,t,r)})];case 10:return o=e.sent(),r.pushInUse(o),DA(t,this._activeResourceCounts),this._log.isDebugEnabled()&&this._log.debug("".concat(o," created for the pool ").concat(t)),[3,12];case 11:return this._pendingCreates[t]=this._pendingCreates[t]-1,[7];case 12:return[2,{resource:o,pool:r}]}})})},xA.prototype._release=function(u,a,s){return RA(this,void 0,void 0,function(){var o,i=this;return kA(this,function(e){switch(e.label){case 0:o=u.asKey(),e.label=1;case 1:return(e.trys.push([1,,9,10]),s.isActive())?[4,this._validateOnRelease(a)]:[3,6];case 2:return e.sent()?[3,4]:(this._log.isDebugEnabled()&&this._log.debug("".concat(a," destroyed and can't be released to the pool ").concat(o," because it is not functional")),s.removeInUse(a),[4,this._destroy(a)]);case 3:return e.sent(),[3,5];case 4:this._installIdleObserver&&this._installIdleObserver(a,{onError:function(e){i._log.debug("Idle connection ".concat(a," destroyed because of error: ").concat(e));e=i._pools[o];e&&(i._pools[o]=e.filter(function(e){return e!==a}),e.removeInUse(a)),i._destroy(a).catch(function(){})}}),s.push(a),this._log.isDebugEnabled()&&this._log.debug("".concat(a," released to the pool ").concat(o)),e.label=5;case 5:return[3,8];case 6:return this._log.isDebugEnabled()&&this._log.debug("".concat(a," destroyed and can't be released to the pool ").concat(o," because pool has been purged")),s.removeInUse(a),[4,this._destroy(a)];case 7:e.sent(),e.label=8;case 8:return[3,10];case 9:return t=o,r=this._activeResourceCounts,0<(n=(r[t]||0)-1)?r[t]=n:delete r[t],this._processPendingAcquireRequests(u),[7];case 10:return[2]}var t,r,n})})},xA.prototype._purgeKey=function(o){return RA(this,void 0,void 0,function(){var t,r,n;return kA(this,function(e){switch(e.label){case 0:if(t=this._pools[o],r=[],!t)return[3,2];for(;t.length;)n=t.pop(),this._removeIdleObserver&&this._removeIdleObserver(n),r.push(this._destroy(n));return t.close(),delete this._pools[o],[4,Promise.all(r)];case 1:e.sent(),e.label=2;case 2:return[2]}})})},xA.prototype._processPendingAcquireRequests=function(r){var n,o=this,i=r.asKey(),e=this._acquireRequests[i];e&&((n=e.shift())?this._acquire(n.context,r,n.requireNew).catch(function(e){return n.reject(e),{resource:null}}).then(function(e){var t=e.resource,e=e.pool;t?n.isCompleted()?o._release(r,t,e):n.resolve(t):n.isCompleted()||(o._acquireRequests[i]||(o._acquireRequests[i]=[]),o._acquireRequests[i].unshift(n))}):delete this._acquireRequests[i])},xA);function xA(e){var e=void 0===e?{}:e,t=e.create,t=void 0===t?function(e,t,r){return Promise.resolve()}:t,r=e.destroy,r=void 0===r?function(e){return Promise.resolve()}:r,n=e.validateOnAcquire,n=void 0===n?function(e,t){return!0}:n,o=e.validateOnRelease,o=void 0===o?function(e){return!0}:o,i=e.installIdleObserver,i=void 0===i?function(e,t){}:i,u=e.removeIdleObserver,u=void 0===u?function(e){}:u,a=e.config,a=void 0===a?AA.default.defaultConfig():a,e=e.log,e=void 0===e?NA.noOp():e;this._create=t,this._destroy=r,this._validateOnAcquire=n,this._validateOnRelease=o,this._installIdleObserver=i,this._removeIdleObserver=u,this._maxSize=a.maxSize,this._acquisitionTimeout=a.acquisitionTimeout,this._pools={},this._pendingCreates={},this._acquireRequests={},this._activeResourceCounts={},this._release=this._release.bind(this),this._log=e,this._closed=!1}function DA(e,t){var r=t[e]||0;t[e]=r+1}Object.defineProperty(LA.prototype,"context",{get:function(){return this._context},enumerable:!1,configurable:!0}),Object.defineProperty(LA.prototype,"requireNew",{get:function(){return this._config.requireNew||!1},enumerable:!1,configurable:!0}),LA.prototype.isCompleted=function(){return this._completed},LA.prototype.resolve=function(e){this._completed||(this._completed=!0,clearTimeout(this._timeoutId),this._log.isDebugEnabled()&&this._log.debug("".concat(e," acquired from the pool ").concat(this._key)),this._resolve(e))},LA.prototype.reject=function(e){this._completed||(this._completed=!0,clearTimeout(this._timeoutId),this._reject(e))};var UA=LA;function LA(e,t,r,n,o,i,u){this._key=e,this._context=t,this._resolve=n,this._reject=o,this._timeoutId=i,this._log=u,this._completed=!1,this._config=r||{}}qA.prototype.isActive=function(){return this._active},qA.prototype.close=function(){this._active=!1,this._elements=[],this._elementsInUse=new Set},qA.prototype.filter=function(e){return this._elements=this._elements.filter(e),this},qA.prototype.apply=function(e){this._elements.forEach(e),this._elementsInUse.forEach(e)},Object.defineProperty(qA.prototype,"length",{get:function(){return this._elements.length},enumerable:!1,configurable:!0}),qA.prototype.pop=function(){var e=this._elements.pop();return this._elementsInUse.add(e),e},qA.prototype.push=function(e){return this._elementsInUse.delete(e),this._elements.push(e)},qA.prototype.pushInUse=function(e){this._elementsInUse.add(e)},qA.prototype.removeInUse=function(e){this._elementsInUse.delete(e)};var FA,BA,WA,zA=qA;function qA(){this._active=!0,this._elements=[],this._elementsInUse=new Set}Ab.default=ty,oy=nb,FA=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),BA=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),iy=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&FA(t,e,r);return BA(t,e),t},uy=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(oy,"__esModule",{value:!0}),oy.DEFAULT_MAX_SIZE=oy.DEFAULT_ACQUISITION_TIMEOUT=oy.PoolConfig=oy.Pool=void 0,WA=iy(rb),oy.PoolConfig=WA.default,Object.defineProperty(oy,"DEFAULT_ACQUISITION_TIMEOUT",{enumerable:!0,get:function(){return WA.DEFAULT_ACQUISITION_TIMEOUT}}),Object.defineProperty(oy,"DEFAULT_MAX_SIZE",{enumerable:!0,get:function(){return WA.DEFAULT_MAX_SIZE}}),iy=uy(Ab),oy.Pool=iy.default,oy.default=iy.default;var VA,Fb={},dy={},Ep=r&&r.__extends||(VA=function(e,t){return(VA=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}VA(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(dy,"__esModule",{value:!0});Ep(GA,HA=e.ConnectionProvider),GA.prototype.acquireConnection=function(e){e=void 0===e?{}:e,e.accessMode,e.database,e.bookmarks,e=this._connection;return this._connection=null,Promise.resolve(e)};var HA,jb=GA;function GA(e){var t=HA.call(this)||this;return t._connection=e,t}dy.default=jb;var YA,Ub={},yy={},Ly={},sb=r&&r.__extends||(YA=function(e,t){return(YA=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}YA(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(Ly,"__esModule",{value:!0});sb(ZA,KA=e.Connection),Object.defineProperty(ZA.prototype,"id",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(ZA.prototype,"databaseId",{get:function(){throw new Error("not implemented")},set:function(e){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(ZA.prototype,"authToken",{get:function(){throw new Error("not implemented")},set:function(e){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(ZA.prototype,"supportsReAuth",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(ZA.prototype,"creationTimestamp",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(ZA.prototype,"idleTimestamp",{get:function(){throw new Error("not implemented")},set:function(e){throw new Error("not implemented")},enumerable:!1,configurable:!0}),ZA.prototype.protocol=function(){throw new Error("not implemented")},Object.defineProperty(ZA.prototype,"address",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(ZA.prototype,"version",{get:function(){throw new Error("not implemented")},set:function(e){throw new Error("not implemented")},enumerable:!1,configurable:!0}),Object.defineProperty(ZA.prototype,"server",{get:function(){throw new Error("not implemented")},enumerable:!1,configurable:!0}),ZA.prototype.connect=function(e,t,r,n){throw new Error("not implemented")},ZA.prototype.write=function(e,t,r){throw new Error("not implemented")},ZA.prototype.close=function(){throw new Error("not implemented")},ZA.prototype.handleAndTransformError=function(e,t){return this._errorHandler?this._errorHandler.handleAndTransformError(e,t,this):e};var KA,dl=ZA;function ZA(e){var t=KA.call(this)||this;return t._errorHandler=e,t}Ly.default=dl;var QA,n_={},Ql=r&&r.__extends||(QA=function(e,t){return(QA=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}QA(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),XA=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},JA=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},d_=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},$A=(Object.defineProperty(n_,"__esModule",{value:!0}),n_.createChannelConnection=void 0,hf),eM=e,$y=d_(Ly),tM=d_(E),rM=eM.error.PROTOCOL_ERROR,nM=eM.internal.logger.Logger,oM=0;n_.createChannelConnection=function(i,u,a,s,c,e){void 0===c&&(c=null);var l=(e=void 0===e?function(e){return new $A.Channel(e)}:e)(new $A.ChannelConfig(i,u,a.errorCode()));return tM.default.handshake(l,s).then(function(e){var r=e.protocolVersion,e=e.consumeRemainingBuffer,n=new $A.Chunker(l),o=new $A.Dechunker,t=new uM(l,a,i,s,u.disableLosslessIntegers,c,n,u.notificationFilter,function(t){return tM.default.create({version:r,channel:l,chunker:n,dechunker:o,disableLosslessIntegers:u.disableLosslessIntegers,useBigInt:u.useBigInt,serversideRouting:c,server:t.server,log:t.logger,observer:{onObserversCountChange:t._handleOngoingRequestsNumberChange.bind(t),onError:t._handleFatalError.bind(t),onFailure:t._resetOnFailure.bind(t),onProtocolError:t._handleProtocolError.bind(t),onErrorApplyTransformation:function(e){return t.handleAndTransformError(e,t._address)}}})},u.telemetryDisabled);return e(function(e){return o.write(e)}),t}).catch(function(e){return l.close().then(function(){throw e})})};iM=$y.default,Ql(N,iM),N.prototype.beginTransaction=function(e){return this._sendTelemetryIfEnabled(e),this._protocol.beginTransaction(e)},N.prototype.run=function(e,t,r){return this._sendTelemetryIfEnabled(r),this._protocol.run(e,t,r)},N.prototype._sendTelemetryIfEnabled=function(e){this._telemetryDisabledConnection||this._telemetryDisabledDriverConfig||null==e||null==e.apiTelemetryConfig||this._protocol.telemetry({api:e.apiTelemetryConfig.api},{onCompleted:e.apiTelemetryConfig.onTelemetrySuccess,onError:e.beforeError})},N.prototype.commitTransaction=function(e){return this._protocol.commitTransaction(e)},N.prototype.rollbackTransaction=function(e){return this._protocol.rollbackTransaction(e)},N.prototype.getProtocolVersion=function(){return this._protocol.version},Object.defineProperty(N.prototype,"authToken",{get:function(){return this._authToken},set:function(e){this._authToken=e},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"supportsReAuth",{get:function(){return this._protocol.supportsReAuth},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"databaseId",{get:function(){return this._dbConnectionId},set:function(e){this._dbConnectionId=e},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"idleTimestamp",{get:function(){return this._idleTimestamp},set:function(e){this._idleTimestamp=e},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"creationTimestamp",{get:function(){return this._creationTimestamp},enumerable:!1,configurable:!0}),N.prototype.connect=function(t,n,o,i){return XA(this,void 0,void 0,function(){var r=this;return JA(this,function(e){switch(e.label){case 0:if(this._protocol.initialized&&!this._protocol.supportsReAuth)throw(0,eM.newError)("Connection does not support re-auth");return this._authToken=o,this._protocol.initialized?[3,2]:[4,this._initialize(t,n,o)];case 1:return[2,e.sent()];case 2:return i?[4,new Promise(function(e,t){r._protocol.logoff({onError:t}),r._protocol.logon({authToken:o,onError:t,onComplete:function(){return e(r)},flush:!0})})]:[3,4];case 3:return[2,e.sent()];case 4:return this._protocol.logoff(),this._protocol.logon({authToken:o,flush:!0}),[2,this]}})})},N.prototype._initialize=function(e,n,o){var i=this,u=this;return new Promise(function(r,t){i._protocol.initialize({userAgent:e,boltAgent:n,authToken:o,notificationFilter:i._notificationFilter,onError:function(e){return t(e)},onComplete:function(e){var t;e&&(t=e.server,i.version&&!t||(i.version=t),t=e.connection_id,i.databaseId||(i.databaseId=t),e.hints&&(null!=(t=e.hints["connection.recv_timeout_seconds"])&&(t=(0,eM.toNumber)(t),Number.isInteger(t)&&0<t?i._ch.setupReceiveTimeout(1e3*t):i._log.info("Server located at ".concat(i._address," supplied an invalid connection receive timeout value (").concat(t,"). ")+"Please, verify the server configuration and status because this can be the symptom of a bigger issue.")),!0===e.hints["telemetry.enabled"]&&(i._telemetryDisabledConnection=!1))),r(u)}})})},N.prototype.protocol=function(){return this._protocol},Object.defineProperty(N.prototype,"address",{get:function(){return this._address},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"version",{get:function(){return this._server.version},set:function(e){this._server.version=e},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"server",{get:function(){return this._server},enumerable:!1,configurable:!0}),Object.defineProperty(N.prototype,"logger",{get:function(){return this._log},enumerable:!1,configurable:!0}),N.prototype._handleFatalError=function(e){this._isBroken=!0,this._error=this.handleAndTransformError(this._protocol.currentFailure||e,this._address),this._log.isErrorEnabled()&&this._log.error("experienced a fatal error caused by ".concat(this._error," (").concat(eM.json.stringify(this._error),")")),this._protocol.notifyFatalError(this._error)},N.prototype._setIdle=function(e){this._idle=!0,this._ch.stopReceiveTimeout(),this._protocol.queueObserverIfProtocolIsNotBroken(e)},N.prototype._unsetIdle=function(){this._idle=!1,this._updateCurrentObserver()},N.prototype._queueObserver=function(e){return this._protocol.queueObserverIfProtocolIsNotBroken(e)},N.prototype.hasOngoingObservableRequests=function(){return!this._idle&&this._protocol.hasOngoingObservableRequests()},N.prototype.resetAndFlush=function(){var r=this;return new Promise(function(e,t){r._reset({onError:function(e){r._isBroken?t(e):(e=r._handleProtocolError("Received FAILURE as a response for RESET: "+e),t(e))},onComplete:function(){e()}})})},N.prototype._resetOnFailure=function(){var e=this;this.isOpen()&&this._reset({onError:function(){e._protocol.resetFailure()},onComplete:function(){e._protocol.resetFailure()}})},N.prototype._reset=function(t){var e,r=this;this._reseting?this._protocol.isLastMessageReset()?this._resetObservers.push(t):this._protocol.reset({onError:function(e){t.onError(e)},onComplete:function(){t.onComplete()}}):(this._resetObservers.push(t),this._reseting=!0,e=function(e){r._reseting=!1;var t=r._resetObservers;r._resetObservers=[],t.forEach(e)},this._protocol.reset({onError:function(t){e(function(e){return e.onError(t)})},onComplete:function(){e(function(e){return e.onComplete()})}}))},N.prototype._updateCurrentObserver=function(){this._protocol.updateCurrentObserver()},N.prototype.isOpen=function(){return!this._isBroken&&this._ch._open},N.prototype._handleOngoingRequestsNumberChange=function(e){this._idle||(0===e?this._ch.stopReceiveTimeout():this._ch.startReceiveTimeout())},N.prototype.close=function(){return XA(this,void 0,void 0,function(){return JA(this,function(e){switch(e.label){case 0:return this._log.isDebugEnabled()&&this._log.debug("closing"),this._protocol&&this.isOpen()&&this._protocol.prepareToClose(),[4,this._ch.close()];case 1:return e.sent(),this._log.isDebugEnabled()&&this._log.debug("closed"),[2]}})})},N.prototype.toString=function(){return"Connection [".concat(this.id,"][").concat(this.databaseId||"","]")},N.prototype._handleProtocolError=function(e){this._protocol.resetFailure(),this._updateCurrentObserver();e=(0,eM.newError)(e,rM);return this._handleFatalError(e),e};var iM,uM=N;function N(e,t,r,n,o,i,u,a,s,c){void 0===o&&(o=!1),void 0===i&&(i=null);var l,f,t=iM.call(this,t)||this;return t._authToken=null,t._idle=!1,t._reseting=!1,t._resetObservers=[],t._id=oM++,t._address=r,t._server={address:r.asHostPort()},t._creationTimestamp=Date.now(),t._disableLosslessIntegers=o,t._ch=e,t._chunker=u,t._log=(l=t,new nM((f=n)._level,function(e,t){return f._loggerFunction(e,"".concat(l," ").concat(t))})),t._serversideRouting=i,t._notificationFilter=a,t._telemetryDisabledDriverConfig=!0===c,t._telemetryDisabledConnection=!0,t._dbConnectionId=null,t._protocol=s(t),t._isBroken=!1,t._log.isDebugEnabled()&&t._log.debug("created towards ".concat(r)),t}n_.default=uM;var aM,sM,u_={},wy=r&&r.__extends||(aM=function(e,t){return(aM=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}aM(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),a_=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},pb=(Object.defineProperty(u_,"__esModule",{value:!0}),a_(Ly)),Xl=(sM=pb.default,wy(cM,sM),cM.prototype.beginTransaction=function(e){return this._delegate.beginTransaction(e)},cM.prototype.run=function(e,t,r){return this._delegate.run(e,t,r)},cM.prototype.commitTransaction=function(e){return this._delegate.commitTransaction(e)},cM.prototype.rollbackTransaction=function(e){return this._delegate.rollbackTransaction(e)},cM.prototype.getProtocolVersion=function(){return this._delegate.getProtocolVersion()},Object.defineProperty(cM.prototype,"id",{get:function(){return this._delegate.id},enumerable:!1,configurable:!0}),Object.defineProperty(cM.prototype,"databaseId",{get:function(){return this._delegate.databaseId},set:function(e){this._delegate.databaseId=e},enumerable:!1,configurable:!0}),Object.defineProperty(cM.prototype,"server",{get:function(){return this._delegate.server},enumerable:!1,configurable:!0}),Object.defineProperty(cM.prototype,"authToken",{get:function(){return this._delegate.authToken},set:function(e){this._delegate.authToken=e},enumerable:!1,configurable:!0}),Object.defineProperty(cM.prototype,"supportsReAuth",{get:function(){return this._delegate.supportsReAuth},enumerable:!1,configurable:!0}),Object.defineProperty(cM.prototype,"address",{get:function(){return this._delegate.address},enumerable:!1,configurable:!0}),Object.defineProperty(cM.prototype,"version",{get:function(){return this._delegate.version},set:function(e){this._delegate.version=e},enumerable:!1,configurable:!0}),Object.defineProperty(cM.prototype,"creationTimestamp",{get:function(){return this._delegate.creationTimestamp},enumerable:!1,configurable:!0}),Object.defineProperty(cM.prototype,"idleTimestamp",{get:function(){return this._delegate.idleTimestamp},set:function(e){this._delegate.idleTimestamp=e},enumerable:!1,configurable:!0}),cM.prototype.isOpen=function(){return this._delegate.isOpen()},cM.prototype.protocol=function(){return this._delegate.protocol()},cM.prototype.connect=function(e,t,r,n){return this._delegate.connect(e,t,r,n)},cM.prototype.write=function(e,t,r){return this._delegate.write(e,t,r)},cM.prototype.resetAndFlush=function(){return this._delegate.resetAndFlush()},cM.prototype.hasOngoingObservableRequests=function(){return this._delegate.hasOngoingObservableRequests()},cM.prototype.close=function(){return this._delegate.close()},cM.prototype.release=function(){return this._originalErrorHandler&&(this._delegate._errorHandler=this._originalErrorHandler),this._delegate.release()},cM);function cM(e,t){var r=sM.call(this,t)||this;return t&&(r._originalErrorHandler=e._errorHandler,e._errorHandler=r._errorHandler),r._delegate=e,r}u_.default=Xl;Wy={};Object.defineProperty(Wy,"__esModule",{value:!0});var lM,fM,pM,dM=e.error.SERVICE_UNAVAILABLE,hM=e.error.SESSION_EXPIRED;function bM(e,t,r,n){this._errorCode=e,this._handleUnavailability=t||yM,this._handleWriteFailure=r||yM,this._handleSecurityError=n||yM}function yM(e){return e}bM.create=function(e){return new bM(e.errorCode,e.handleUnavailability,e.handleWriteFailure,e.handleSecurityError)},bM.prototype.errorCode=function(){return this._errorCode},bM.prototype.handleAndTransformError=function(e,t,r){return null!=(n=e)&&null!=n.code&&n.code.startsWith("Neo.ClientError.Security.")?this._handleSecurityError(e,t,r):function(e){if(e)return e.code===hM||e.code===dM||"Neo.TransientError.General.DatabaseUnavailable"===e.code;return}(e)?this._handleUnavailability(e,t,r):function(e){if(e)return"Neo.ClientError.Cluster.NotALeader"===e.code||"Neo.ClientError.General.ForbiddenOnReadOnlyDatabase"===e.code;return}(e)?this._handleWriteFailure(e,t,r):e;var n},Wy.default=bM,Jl=yy,lM=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),fM=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),l_=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&lM(t,e,r);return fM(t,e),t},j_=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(Jl,"__esModule",{value:!0}),Jl.createChannelConnection=Jl.ConnectionErrorHandler=Jl.DelegateConnection=Jl.ChannelConnection=Jl.Connection=void 0,_=j_(Ly),Jl.Connection=_.default,pM=l_(n_),Jl.ChannelConnection=pM.default,Object.defineProperty(Jl,"createChannelConnection",{enumerable:!0,get:function(){return pM.createChannelConnection}}),l_=j_(u_),Jl.DelegateConnection=l_.default,l_=j_(Wy),Jl.ConnectionErrorHandler=l_.default,Jl.default=_.default;var k_={},_M=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},vM=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},mM=(Object.defineProperty(k_,"__esModule",{value:!0}),e),gM=Sy;function OM(e){var t=e.authTokenManager,r=e.userAgent,e=e.boltAgent;this._authTokenManager=t||(0,mM.staticAuthTokenManager)({}),this._userAgent=r,this._boltAgent=e}OM.prototype.authenticate=function(e){var r=e.connection,n=e.auth,o=e.skipReAuth,i=e.waitReAuth,u=e.forceReAuth;return _M(this,void 0,void 0,function(){var t;return vM(this,function(e){switch(e.label){case 0:return null==n?[3,3]:(t=!0===r.supportsReAuth&&(!gM.object.equals(r.authToken,n)&&!0!==o||!0===u),null==r.authToken||t?[4,r.connect(this._userAgent,this._boltAgent,n,i||!1)]:[3,2]);case 1:return[2,e.sent()];case 2:return[2,r];case 3:return[4,this._authTokenManager.getToken()];case 4:return t=e.sent(),gM.object.equals(t,r.authToken)?[3,6]:[4,r.connect(this._userAgent,this._boltAgent,t,!1)];case 5:return[2,e.sent()];case 6:return[2,r]}})})},OM.prototype.handleError=function(e){var t=e.connection,e=e.code;return!(!t||!e.startsWith("Neo.ClientError.Security."))&&this._authTokenManager.handleSecurityException(t.authToken,e)},k_.default=OM;var B_={},wM=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},EM=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}};function PM(e){e=e.connectionLivenessCheckTimeout;this._connectionLivenessCheckTimeout=e}Object.defineProperty(B_,"__esModule",{value:!0}),PM.prototype.check=function(r){return wM(this,void 0,void 0,function(){var t;return EM(this,function(e){switch(e.label){case 0:return this._isCheckDisabled||this._isNewlyCreatedConnection(r)?[2,!0]:(t=Date.now()-r.idleTimestamp,0===this._connectionLivenessCheckTimeout||t>this._connectionLivenessCheckTimeout?[4,r.resetAndFlush().then(function(){return!0})]:[3,2]);case 1:return[2,e.sent()];case 2:return[2,!0]}})})},Object.defineProperty(PM.prototype,"_isCheckDisabled",{get:function(){return null==this._connectionLivenessCheckTimeout||this._connectionLivenessCheckTimeout<0},enumerable:!1,configurable:!0}),PM.prototype._isNewlyCreatedConnection=function(e){return null==e.authToken},B_.default=PM;var SM,TM,z_=r&&r.__extends||(SM=function(e,t){return(SM=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}SM(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),jM=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),CM=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),G_=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&jM(t,e,r);return CM(t,e),t},IM=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},RM=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},kM=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},AM=r&&r.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||((n=n||Array.prototype.slice.call(t,0,o))[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},Z_=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},MM=(Object.defineProperty(Ub,"__esModule",{value:!0}),yy),NM=G_(nb),xM=e,DM=Z_(k_),UM=Sy,LM=Z_(B_),FM=xM.error.SERVICE_UNAVAILABLE,BM=["Neo.ClientError.Security.CredentialsExpired","Neo.ClientError.Security.Forbidden","Neo.ClientError.Security.TokenExpired","Neo.ClientError.Security.Unauthorized"],Hd=(TM=xM.ConnectionProvider,z_(WM,TM),WM.prototype._createConnectionErrorHandler=function(){return new MM.ConnectionErrorHandler(FM)},WM.prototype._createConnection=function(e,r,n){var o=this,i=e.auth;return this._createChannelConnection(r).then(function(t){return t.release=function(){return t.idleTimestamp=Date.now(),n(r,t)},o._openConnections[t.id]=t,o._authenticationProvider.authenticate({connection:t,auth:i}).catch(function(e){throw o._destroyConnection(t),e})})},WM.prototype._validateConnectionOnAcquire=function(e,r){var n=e.auth,o=e.skipReAuth;return IM(this,void 0,void 0,function(){var t;return RM(this,function(e){switch(e.label){case 0:if(!this._validateConnection(r))return[2,!1];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this._livenessCheckProvider.check(r)];case 2:return e.sent(),[3,4];case 3:return t=e.sent(),this._log.debug("The connection ".concat(r.id," is not alive because of an error ").concat(t.code," '").concat(t.message,"'")),[2,!1];case 4:return e.trys.push([4,6,,7]),[4,this._authenticationProvider.authenticate({connection:r,auth:n,skipReAuth:o})];case 5:return e.sent(),[2,!0];case 6:return t=e.sent(),this._log.debug("The connection ".concat(r.id," is not valid because of an error ").concat(t.code," '").concat(t.message,"'")),[2,!1];case 7:return[2]}})})},WM.prototype._validateConnectionOnRelease=function(e){return!0!==e._sticky&&this._validateConnection(e)},WM.prototype._validateConnection=function(e){return!!e.isOpen()&&!(this._config.maxConnectionLifetime<Date.now()-e.creationTimestamp)},WM.prototype._destroyConnection=function(e){return delete this._openConnections[e.id],e.close()},WM.prototype._verifyConnectivityAndGetServerVersion=function(e){var n=e.address;return IM(this,void 0,void 0,function(){var t,r;return RM(this,function(e){switch(e.label){case 0:return[4,this._connectionPool.acquire({},n)];case 1:t=e.sent(),r=new xM.ServerInfo(t.server,t.protocol().version),e.label=2;case 2:return e.trys.push([2,,5,7]),t.protocol().isLastMessageLogon()?[3,4]:[4,t.resetAndFlush()];case 3:e.sent(),e.label=4;case 4:return[3,7];case 5:return[4,t.release()];case 6:return e.sent(),[7];case 7:return[2,r]}})})},WM.prototype._verifyAuthentication=function(e){var u=e.getAddress,a=e.auth;return IM(this,void 0,void 0,function(){var t,r,n,o,i;return RM(this,function(e){switch(e.label){case 0:t=[],e.label=1;case 1:return e.trys.push([1,8,9,11]),[4,u()];case 2:return r=e.sent(),[4,this._connectionPool.acquire({auth:a,skipReAuth:!0},r)];case 3:if(n=e.sent(),t.push(n),o=!n.protocol().isLastMessageLogon(),n.supportsReAuth)return o&&n.supportsReAuth?[4,this._authenticationProvider.authenticate({connection:n,auth:a,waitReAuth:!0,forceReAuth:!0})]:[3,5];throw(0,xM.newError)("Driver is connected to a database that does not support user switch.");case 4:return e.sent(),[3,7];case 5:return!o||n.supportsReAuth?[3,7]:[4,this._connectionPool.acquire({auth:a},r,{requireNew:!0})];case 6:(i=e.sent())._sticky=!0,t.push(i),e.label=7;case 7:return[2,!0];case 8:if(i=e.sent(),BM.includes(i.code))return[2,!1];throw i;case 9:return[4,Promise.all(t.map(function(e){return e.release()}))];case 10:return e.sent(),[7];case 11:return[2]}})})},WM.prototype._verifyStickyConnection=function(e){var n=e.auth,o=e.connection;return e.address,IM(this,void 0,void 0,function(){var t,r;return RM(this,function(e){switch(e.label){case 0:return(t=UM.object.equals(n,o.authToken),r=!t,o._sticky=t&&!o.supportsReAuth,r||o._sticky)?[4,o.release()]:[3,2];case 1:throw e.sent(),(0,xM.newError)("Driver is connected to a database that does not support user switch.");case 2:return[2]}})})},WM.prototype.close=function(){return IM(this,void 0,void 0,function(){return RM(this,function(e){switch(e.label){case 0:return[4,this._connectionPool.close()];case 1:return e.sent(),[4,Promise.all(Object.values(this._openConnections).map(function(e){return e.close()}))];case 2:return e.sent(),[2]}})})},WM._installIdleObserverOnConnection=function(e,t){e._setIdle(t)},WM._removeIdleObserverOnConnection=function(e){e._unsetIdle()},WM.prototype._handleSecurityError=function(e,t,r){return this._authenticationProvider.handleError({connection:r,code:e.code})&&(e.retriable=!0),"Neo.ClientError.Security.AuthorizationExpired"===e.code&&this._connectionPool.apply(t,function(e){e.authToken=null}),r&&r.close().catch(function(){}),e},WM);function WM(e,t){var r=e.id,n=e.config,o=e.log,i=e.userAgent,u=e.boltAgent,a=e.authTokenManager,e=e.newPool,e=void 0===e?function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return new(NM.default.bind.apply(NM.default,AM([void 0],kM(e),!1)))}:e,s=(void 0===t&&(t=null),TM.call(this)||this);return s._id=r,s._config=n,s._log=o,s._authenticationProvider=new DM.default({authTokenManager:a,userAgent:i,boltAgent:u}),s._livenessCheckProvider=new LM.default({connectionLivenessCheckTimeout:n.connectionLivenessCheckTimeout}),s._userAgent=i,s._boltAgent=u,s._createChannelConnection=t||function(e){return(0,MM.createChannelConnection)(e,s._config,s._createConnectionErrorHandler(),s._log)},s._connectionPool=e({create:s._createConnection.bind(s),destroy:s._destroyConnection.bind(s),validateOnAcquire:s._validateConnectionOnAcquire.bind(s),validateOnRelease:s._validateConnectionOnRelease.bind(s),installIdleObserver:WM._installIdleObserverOnConnection.bind(s),removeIdleObserver:WM._removeIdleObserverOnConnection.bind(s),config:NM.PoolConfig.fromDriverConfig(n),log:s._log}),s._openConnections={},s}Ub.default=Hd;var zM,qM,sv={},U_=r&&r.__extends||(zM=function(e,t){return(zM=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}zM(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),VM=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},HM=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},mv=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},hv=(Object.defineProperty(sv,"__esModule",{value:!0}),mv(Ub)),GM=yy,kt=e.internal.constants,YM=kt.BOLT_PROTOCOL_V3,KM=kt.BOLT_PROTOCOL_V4_0,ZM=kt.BOLT_PROTOCOL_V4_4,QM=kt.BOLT_PROTOCOL_V5_1,XM=e.error.SERVICE_UNAVAILABLE,xv=(qM=hv.default,U_(JM,qM),JM.prototype.acquireConnection=function(e){var e=void 0===e?{}:e,o=(e.accessMode,e.database),i=(e.bookmarks,e.auth),u=e.forceReAuth;return VM(this,void 0,void 0,function(){var t,r,n=this;return HM(this,function(e){switch(e.label){case 0:return t=GM.ConnectionErrorHandler.create({errorCode:XM,handleSecurityError:function(e,t,r){return n._handleSecurityError(e,t,r,o)}}),[4,this._connectionPool.acquire({auth:i,forceReAuth:u},this._address)];case 1:return(r=e.sent(),i)?[4,this._verifyStickyConnection({auth:i,connection:r,address:this._address})]:[3,3];case 2:return e.sent(),[2,r];case 3:return[2,new GM.DelegateConnection(r,t)]}})})},JM.prototype._handleSecurityError=function(e,t,r,n){return this._log.warn("Direct driver ".concat(this._id," will close connection to ").concat(t," for database '").concat(n,"' because of an error ").concat(e.code," '").concat(e.message,"'")),qM.prototype._handleSecurityError.call(this,e,t,r)},JM.prototype._hasProtocolVersion=function(n){return VM(this,void 0,void 0,function(){var t,r;return HM(this,function(e){switch(e.label){case 0:return[4,(0,GM.createChannelConnection)(this._address,this._config,this._createConnectionErrorHandler(),this._log)];case 1:return t=e.sent(),r=t.protocol()?t.protocol().version:null,[4,t.close()];case 2:return e.sent(),r?[2,n(r)]:[2,!1]}})})},JM.prototype.supportsMultiDb=function(){return VM(this,void 0,void 0,function(){return HM(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return KM<=e})];case 1:return[2,e.sent()]}})})},JM.prototype.getNegotiatedProtocolVersion=function(){var r=this;return new Promise(function(e,t){r._hasProtocolVersion(e).catch(t)})},JM.prototype.supportsTransactionConfig=function(){return VM(this,void 0,void 0,function(){return HM(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return YM<=e})];case 1:return[2,e.sent()]}})})},JM.prototype.supportsUserImpersonation=function(){return VM(this,void 0,void 0,function(){return HM(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return ZM<=e})];case 1:return[2,e.sent()]}})})},JM.prototype.supportsSessionAuth=function(){return VM(this,void 0,void 0,function(){return HM(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return QM<=e})];case 1:return[2,e.sent()]}})})},JM.prototype.verifyAuthentication=function(e){var r=e.auth;return VM(this,void 0,void 0,function(){var t=this;return HM(this,function(e){return[2,this._verifyAuthentication({auth:r,getAddress:function(){return t._address}})]})})},JM.prototype.verifyConnectivityAndGetServerInfo=function(){return VM(this,void 0,void 0,function(){return HM(this,function(e){switch(e.label){case 0:return[4,this._verifyConnectivityAndGetServerVersion({address:this._address})];case 1:return[2,e.sent()]}})})},JM);function JM(e){var t=e.id,r=e.config,n=e.log,o=e.address,i=e.userAgent,u=e.boltAgent,a=e.authTokenManager,e=e.newPool,t=qM.call(this,{id:t,config:r,log:n,userAgent:i,boltAgent:u,authTokenManager:a,newPool:e})||this;return t._address=o,t}sv.default=xv;var Rv={},Sv={},Fv={},em={},$M=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},e2=r&&r.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o<i;o++)!n&&o in t||((n=n||Array.prototype.slice.call(t,0,o))[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},t2=(Object.defineProperty(em,"__esModule",{value:!0}),em.createValidRoutingTable=void 0,e),p=t2.internal.constants,r2=p.ACCESS_MODE_WRITE,n2=p.ACCESS_MODE_READ,o2=t2.internal.serverAddress.ServerAddress,i2=t2.error.PROTOCOL_ERROR,u2=(a2.fromRawRoutingTable=c2,a2.prototype.forget=function(e){this.readers=s2(this.readers,e),this.writers=s2(this.writers,e)},a2.prototype.forgetRouter=function(e){this.routers=s2(this.routers,e)},a2.prototype.forgetWriter=function(e){this.writers=s2(this.writers,e)},a2.prototype.isStaleFor=function(e){return this.expirationTime.lessThan(Date.now())||this.routers.length<1||e===n2&&0===this.readers.length||e===r2&&0===this.writers.length},a2.prototype.isExpiredFor=function(e){return this.expirationTime.add(e).lessThan(Date.now())},a2.prototype.allServers=function(){return e2(e2(e2([],$M(this.routers),!1),$M(this.readers),!1),$M(this.writers),!1)},a2.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,"]]")},a2);function a2(e){var e=void 0===e?{}:e,t=e.database,r=e.routers,n=e.readers,o=e.writers,i=e.expirationTime,e=e.ttl;this.database=t||null,this.databaseName=t||"default database",this.routers=r||[],this.readers=n||[],this.writers=o||[],this.expirationTime=i||(0,t2.int)(0),this.ttl=e}function s2(e,t){return e.filter(function(e){return e.asKey()!==t.asKey()})}function c2(e,t,r){var n=r.ttl,o=function(t,r){try{var e=(0,t2.int)(Date.now()),n=(0,t2.int)(t.ttl).multiply(1e3).add(e);return n.lessThan(e)?t2.Integer.MAX_VALUE:n}catch(e){throw(0,t2.newError)("Unable to parse TTL entry from router ".concat(r," from raw routing table:\n").concat(t2.json.stringify(t),"\nError message: ").concat(e.message),i2)}}(r,t),i=function(t,r){try{var n=[],o=[],i=[];return t.servers.forEach(function(e){var t=e.role,e=e.addresses;"ROUTE"===t?n=f2(e).map(function(e){return o2.fromUrl(e)}):"WRITE"===t?i=f2(e).map(function(e){return o2.fromUrl(e)}):"READ"===t&&(o=f2(e).map(function(e){return o2.fromUrl(e)}))}),{routers:n,readers:o,writers:i}}catch(e){throw(0,t2.newError)("Unable to parse servers entry from router ".concat(r," from addresses:\n").concat(t2.json.stringify(t.servers),"\nError message: ").concat(e.message),i2)}}(r,t),u=i.routers,a=i.readers,i=i.writers;return l2(u,"routers",t),l2(a,"readers",t),new u2({database:e||r.db,routers:u,readers:a,writers:i,expirationTime:o,ttl:n})}function l2(e,t,r){if(0===e.length)throw(0,t2.newError)("Received no "+t+" from router "+r,i2)}function f2(e){if(Array.isArray(e))return Array.from(e);throw new TypeError("Array expected but got: "+e)}em.default=u2,em.createValidRoutingTable=c2;var nm=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},p2=(Object.defineProperty(Fv,"__esModule",{value:!0}),nm(em));function d2(e){this._routingContext=e}d2.prototype.lookupRoutingTableOnRouter=function(t,r,n,o){var i=this;return t._acquireConnection(function(e){return i._requestRawRoutingTable(e,t,r,n,o).then(function(e){return e.isNull?null:p2.default.fromRawRoutingTable(r,n,e)})})},d2.prototype._requestRawRoutingTable=function(r,n,o,e,i){var u=this;return new Promise(function(e,t){r.protocol().requestRoutingInformation({routingContext:u._routingContext,databaseName:o,impersonatedUser:i,sessionContext:{bookmarks:n._lastBookmarks,mode:n._mode,database:n._database,afterComplete:n._onComplete},onCompleted:e,onError:t})})},Fv.default=d2;var h2,b2,fm=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},bm=(Object.defineProperty(Sv,"__esModule",{value:!0}),Sv.RoutingTable=Sv.Rediscovery=void 0,fm(Fv)),cm=(Sv.Rediscovery=bm.default,fm(em)),gm=(Sv.RoutingTable=cm.default,Sv.default=bm.default,r&&r.__extends||(h2=function(e,t){return(h2=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}h2(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})),y2=r&&r.__assign||function(){return(y2=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},_2=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),v2=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),jm=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&_2(t,e,r);return v2(t,e),t},m2=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},g2=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},O2=r&&r.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},w2=r&&r.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||0<t--)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u},Gv=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},E2=(Object.defineProperty(Rv,"__esModule",{value:!0}),e),P2=jm(Sv),S2=hf,T2=Gv(dy),Cm=Gv(Ub),j2=Cs,C2=yy,I2=Sy,R2=E2.error.SERVICE_UNAVAILABLE,k2=E2.error.SESSION_EXPIRED,A2=E2.internal.bookmarks.Bookmarks,Um=E2.internal.constants,M2=Um.ACCESS_MODE_READ,N2=Um.ACCESS_MODE_WRITE,x2=Um.BOLT_PROTOCOL_V3,D2=Um.BOLT_PROTOCOL_V4_0,U2=Um.BOLT_PROTOCOL_V4_4,L2=Um.BOLT_PROTOCOL_V5_1,F2=null,B2=(0,E2.int)(3e4),zy=(b2=Cm.default,gm(W2,b2),W2.prototype._createConnectionErrorHandler=function(){return new C2.ConnectionErrorHandler(k2)},W2.prototype._handleUnavailability=function(e,t,r){return this._log.warn("Routing driver ".concat(this._id," will forget ").concat(t," for database '").concat(r,"' because of an error ").concat(e.code," '").concat(e.message,"'")),this.forget(t,r||F2),e},W2.prototype._handleSecurityError=function(e,t,r,n){return this._log.warn("Routing driver ".concat(this._id," will close connections to ").concat(t," for database '").concat(n,"' because of an error ").concat(e.code," '").concat(e.message,"'")),b2.prototype._handleSecurityError.call(this,e,t,r,n)},W2.prototype._handleWriteFailure=function(e,t,r){return this._log.warn("Routing driver ".concat(this._id," will forget writer ").concat(t," for database '").concat(r,"' because of an error ").concat(e.code," '").concat(e.message,"'")),this.forgetWriter(t,r||F2),(0,E2.newError)("No longer possible to write to server at "+t,k2,e)},W2.prototype.acquireConnection=function(e){var e=void 0===e?{}:e,s=e.accessMode,c=e.database,l=e.bookmarks,f=e.impersonatedUser,p=e.onDatabaseNameResolved,d=e.auth;return m2(this,void 0,void 0,function(){var t,r,n,o,i,u,a=this;return g2(this,function(e){switch(e.label){case 0:return n={database:c||F2},o=new C2.ConnectionErrorHandler(k2,function(e,t){return a._handleUnavailability(e,t,n.database)},function(e,t){return a._handleWriteFailure(e,t,n.database)},function(e,t,r){return a._handleSecurityError(e,t,r,n.database)}),[4,this._freshRoutingTable({accessMode:s,database:n.database,bookmarks:l,impersonatedUser:f,auth:d,onDatabaseNameResolved:function(e){n.database=n.database||e,p&&p(e)}})];case 1:if(u=e.sent(),s===M2)r=this._loadBalancingStrategy.selectReader(u.readers),t="read";else{if(s!==N2)throw(0,E2.newError)("Illegal mode "+s);r=this._loadBalancingStrategy.selectWriter(u.writers),t="write"}if(!r)throw(0,E2.newError)("Failed to obtain connection towards ".concat(t," server. Known routing table is: ").concat(u),k2);e.label=2;case 2:return e.trys.push([2,6,,7]),[4,this._connectionPool.acquire({auth:d},r)];case 3:return(i=e.sent(),d)?[4,this._verifyStickyConnection({auth:d,connection:i,address:r})]:[3,5];case 4:return e.sent(),[2,i];case 5:return[2,new C2.DelegateConnection(i,o)];case 6:throw u=e.sent(),o.handleAndTransformError(u,r);case 7:return[2]}})})},W2.prototype._hasProtocolVersion=function(u){return m2(this,void 0,void 0,function(){var t,r,n,o,i;return g2(this,function(e){switch(e.label){case 0:return[4,this._resolveSeedRouter(this._seedRouter)];case 1:t=e.sent(),n=0,e.label=2;case 2:if(!(n<t.length))return[3,8];e.label=3;case 3:return e.trys.push([3,6,,7]),[4,(0,C2.createChannelConnection)(t[n],this._config,this._createConnectionErrorHandler(),this._log)];case 4:return i=e.sent(),o=i.protocol()?i.protocol().version:null,[4,i.close()];case 5:return e.sent(),o?[2,u(o)]:[2,!1];case 6:return i=e.sent(),r=i,[3,7];case 7:return n++,[3,2];case 8:if(r)throw r;return[2,!1]}})})},W2.prototype.supportsMultiDb=function(){return m2(this,void 0,void 0,function(){return g2(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return D2<=e})];case 1:return[2,e.sent()]}})})},W2.prototype.supportsTransactionConfig=function(){return m2(this,void 0,void 0,function(){return g2(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return x2<=e})];case 1:return[2,e.sent()]}})})},W2.prototype.supportsUserImpersonation=function(){return m2(this,void 0,void 0,function(){return g2(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return U2<=e})];case 1:return[2,e.sent()]}})})},W2.prototype.supportsSessionAuth=function(){return m2(this,void 0,void 0,function(){return g2(this,function(e){switch(e.label){case 0:return[4,this._hasProtocolVersion(function(e){return L2<=e})];case 1:return[2,e.sent()]}})})},W2.prototype.getNegotiatedProtocolVersion=function(){var r=this;return new Promise(function(e,t){r._hasProtocolVersion(e).catch(t)})},W2.prototype.verifyAuthentication=function(e){var n=e.database,o=e.accessMode,i=e.auth;return m2(this,void 0,void 0,function(){var t=this;return g2(this,function(e){return[2,this._verifyAuthentication({auth:i,getAddress:function(){return m2(t,void 0,void 0,function(){var t,r;return g2(this,function(e){switch(e.label){case 0:return t={database:n||F2},[4,this._freshRoutingTable({accessMode:o,database:t.database,auth:i,onDatabaseNameResolved:function(e){t.database=t.database||e}})];case 1:if(r=e.sent(),0===(r=o===N2?r.writers:r.readers).length)throw(0,E2.newError)("No servers available for database '".concat(t.database,"' with access mode '").concat(o,"'"),R2);return[2,r[0]]}})})}})]})})},W2.prototype.verifyConnectivityAndGetServerInfo=function(e){var l=e.database,f=e.accessMode;return m2(this,void 0,void 0,function(){var t,r,n,o,i,u,a,s,c;return g2(this,function(e){switch(e.label){case 0:return t={database:l||F2},[4,this._freshRoutingTable({accessMode:f,database:t.database,onDatabaseNameResolved:function(e){t.database=t.database||e}})];case 1:r=e.sent(),r=f===N2?r.writers:r.readers,n=(0,E2.newError)("No servers available for database '".concat(t.database,"' with access mode '").concat(f,"'"),R2),e.label=2;case 2:e.trys.push([2,9,10,11]),o=O2(r),i=o.next(),e.label=3;case 3:if(i.done)return[3,8];u=i.value,e.label=4;case 4:return e.trys.push([4,6,,7]),[4,this._verifyConnectivityAndGetServerVersion({address:u})];case 5:return[2,e.sent()];case 6:return a=e.sent(),n=a,[3,7];case 7:return i=o.next(),[3,3];case 8:return[3,11];case 9:return a=e.sent(),s={error:a},[3,11];case 10:try{i&&!i.done&&(c=o.return)&&c.call(o)}finally{if(s)throw s.error}return[7];case 11:throw n}})})},W2.prototype.forget=function(t,e){this._routingTableRegistry.apply(e,{applyWhenExists:function(e){return e.forget(t)}}),this._connectionPool.purge(t).catch(function(){})},W2.prototype.forgetWriter=function(t,e){this._routingTableRegistry.apply(e,{applyWhenExists:function(e){return e.forgetWriter(t)}})},W2.prototype._freshRoutingTable=function(e){var e=void 0===e?{}:e,t=e.accessMode,r=e.database,n=e.bookmarks,o=e.impersonatedUser,i=e.onDatabaseNameResolved,e=e.auth,u=this._routingTableRegistry.get(r,function(){return new P2.RoutingTable({database:r})});return u.isStaleFor(t)?(this._log.info('Routing table is stale for database: "'.concat(r,'" and access mode: "').concat(t,'": ').concat(u)),this._refreshRoutingTable(u,n,o,e).then(function(e){return i(e.database),e})):u},W2.prototype._refreshRoutingTable=function(e,t,r,n){var o=e.routers;return this._useSeedRouter?this._fetchRoutingTableFromSeedRouterFallbackToKnownRouters(o,e,t,r,n):this._fetchRoutingTableFromKnownRoutersFallbackToSeedRouter(o,e,t,r,n)},W2.prototype._fetchRoutingTableFromSeedRouterFallbackToKnownRouters=function(u,a,s,c,l){return m2(this,void 0,void 0,function(){var t,r,n,o,i;return g2(this,function(e){switch(e.label){case 0:return t=[],[4,this._fetchRoutingTableUsingSeedRouter(t,this._seedRouter,a,s,c,l)];case 1:return(t=w2.apply(void 0,[e.sent(),2]),r=t[0],n=t[1],r)?(this._useSeedRouter=!1,[3,4]):[3,2];case 2:return[4,this._fetchRoutingTableUsingKnownRouters(u,a,s,c,l)];case 3:i=w2.apply(void 0,[e.sent(),2]),o=i[0],i=i[1],r=o,n=i||n,e.label=4;case 4:return[4,this._applyRoutingTableIfPossible(a,r,n)];case 5:return[2,e.sent()]}})})},W2.prototype._fetchRoutingTableFromKnownRoutersFallbackToSeedRouter=function(o,i,u,a,s){return m2(this,void 0,void 0,function(){var t,r,n;return g2(this,function(e){switch(e.label){case 0:return[4,this._fetchRoutingTableUsingKnownRouters(o,i,u,a,s)];case 1:return r=w2.apply(void 0,[e.sent(),2]),t=r[0],r=r[1],t?[3,3]:[4,this._fetchRoutingTableUsingSeedRouter(o,this._seedRouter,i,u,a,s)];case 2:n=w2.apply(void 0,[e.sent(),2]),t=n[0],r=n[1],e.label=3;case 3:return[4,this._applyRoutingTableIfPossible(i,t,r)];case 4:return[2,e.sent()]}})})},W2.prototype._fetchRoutingTableUsingKnownRouters=function(n,o,i,u,a){return m2(this,void 0,void 0,function(){var t,r;return g2(this,function(e){switch(e.label){case 0:return[4,this._fetchRoutingTable(n,o,i,u,a)];case 1:return(t=w2.apply(void 0,[e.sent(),2]),r=t[0],t=t[1],r)?[2,[r,null]]:(r=n.length-1,W2._forgetRouter(o,n,r),[2,[null,t]])}})})},W2.prototype._fetchRoutingTableUsingSeedRouter=function(r,n,o,i,u,a){return m2(this,void 0,void 0,function(){var t;return g2(this,function(e){switch(e.label){case 0:return[4,this._resolveSeedRouter(n)];case 1:return t=e.sent(),t=t.filter(function(e){return r.indexOf(e)<0}),[4,this._fetchRoutingTable(t,o,i,u,a)];case 2:return[2,e.sent()]}})})},W2.prototype._resolveSeedRouter=function(n){return m2(this,void 0,void 0,function(){var t,r=this;return g2(this,function(e){switch(e.label){case 0:return[4,this._hostNameResolver.resolve(n)];case 1:return t=e.sent(),[4,Promise.all(t.map(function(e){return r._dnsResolver.resolve(e)}))];case 2:return t=e.sent(),[2,[].concat.apply([],t)]}})})},W2.prototype._fetchRoutingTable=function(s,c,l,f,p){return m2(this,void 0,void 0,function(){var t=this;return g2(this,function(e){return[2,s.reduce(function(i,u,a){return m2(t,void 0,void 0,function(){var t,r,n,o;return g2(this,function(e){switch(e.label){case 0:return[4,i];case 1:return(t=w2.apply(void 0,[e.sent(),1]),t=t[0])?[2,[t,null]]:(W2._forgetRouter(c,s,a-1),[4,this._createSessionForRediscovery(u,l,f,p)]);case 2:if(t=w2.apply(void 0,[e.sent(),2]),r=t[0],n=t[1],!r)return[3,8];e.label=3;case 3:return e.trys.push([3,5,6,7]),[4,this._rediscovery.lookupRoutingTableOnRouter(r,c.database,u,f)];case 4:return[2,[e.sent(),null]];case 5:return o=e.sent(),[2,this._handleRediscoveryError(o,u)];case 6:return r.close(),[7];case 7:return[3,9];case 8:return[2,[null,n]];case 9:return[2]}})})},Promise.resolve([null,null]))]})})},W2.prototype._createSessionForRediscovery=function(o,i,u,a){return m2(this,void 0,void 0,function(){var t,r,n=this;return g2(this,function(e){switch(e.label){case 0:return e.trys.push([0,4,,5]),[4,this._connectionPool.acquire({auth:a},o)];case 1:return(t=e.sent(),a)?[4,this._verifyStickyConnection({auth:a,connection:t,address:o})]:[3,3];case 2:e.sent(),e.label=3;case 3:return r=C2.ConnectionErrorHandler.create({errorCode:k2,handleSecurityError:function(e,t,r){return n._handleSecurityError(e,t,r)}}),r=t._sticky?new C2.DelegateConnection(t):new C2.DelegateConnection(t,r),r=new T2.default(r),t.protocol().version<4?[2,[new E2.Session({mode:N2,bookmarks:A2.empty(),connectionProvider:r}),null]]:[2,[new E2.Session({mode:M2,database:"system",bookmarks:i,connectionProvider:r,impersonatedUser:u}),null]];case 4:return r=e.sent(),[2,this._handleRediscoveryError(r,o)];case 5:return[2]}})})},W2.prototype._handleRediscoveryError=function(e,t){if(["Neo.ClientError.Database.DatabaseNotFound","Neo.ClientError.Transaction.InvalidBookmark","Neo.ClientError.Transaction.InvalidBookmarkMixture","Neo.ClientError.Statement.ArgumentError","Neo.ClientError.Request.Invalid","Neo.ClientError.Statement.TypeError","N/A"].includes(e.code)||(r=e).code.startsWith("Neo.ClientError.Security.")&&!["Neo.ClientError.Security.AuthorizationExpired"].includes(r.code))throw e;if("Neo.ClientError.Procedure.ProcedureNotFound"===e.code)throw(0,E2.newError)("Server at ".concat(t.asHostPort()," can't perform routing. Make sure you are connecting to a causal cluster"),R2,e);var r;return this._log.warn("unable to fetch routing table because of an error ".concat(e)),[null,e]},W2.prototype._applyRoutingTableIfPossible=function(t,r,n){return m2(this,void 0,void 0,function(){return g2(this,function(e){switch(e.label){case 0:if(r)return 0===r.writers.length&&(this._useSeedRouter=!0),[4,this._updateRoutingTable(r)];throw(0,E2.newError)("Could not perform discovery. No routing servers available. Known routing table: ".concat(t),R2,n);case 1:return e.sent(),[2,r]}})})},W2.prototype._updateRoutingTable=function(t){return m2(this,void 0,void 0,function(){return g2(this,function(e){switch(e.label){case 0:return[4,this._connectionPool.keepAll(t.allServers())];case 1:return e.sent(),this._routingTableRegistry.removeExpired(),this._routingTableRegistry.register(t),this._log.info("Updated routing table ".concat(t)),[2]}})})},W2._forgetRouter=function(e,t,r){t=t[r];e&&t&&e.forgetRouter(t)},W2);function W2(e){var t=e.id,r=e.address,n=e.routingContext,o=e.hostNameResolver,i=e.config,u=e.log,a=e.userAgent,s=e.boltAgent,c=e.authTokenManager,l=e.routingTablePurgeDelay,e=e.newPool,f=b2.call(this,{id:t,config:i,log:u,userAgent:a,boltAgent:s,authTokenManager:c,newPool:e},function(e){return(0,C2.createChannelConnection)(e,f._config,f._createConnectionErrorHandler(),f._log,f._routingContext)})||this;return f._routingContext=y2(y2({},n),{address:r.toString()}),f._seedRouter=r,f._rediscovery=new P2.default(f._routingContext),f._loadBalancingStrategy=new j2.LeastConnectedLoadBalancingStrategy(f._connectionPool),f._hostNameResolver=o,f._dnsResolver=new S2.HostNameResolver,f._log=u,f._useSeedRouter=!0,f._routingTableRegistry=new uN(l?(0,E2.int)(l):B2),f._refreshRoutingTable=I2.functional.reuseOngoingRequest(f._refreshRoutingTable,f),f}Rv.default=zy;aN.prototype.register=function(e){return this._tables.set(e.database,e),this},aN.prototype.apply=function(e,t){var t=void 0===t?{}:t,r=t.applyWhenExists,t=t.applyWhenDontExists,t=void 0===t?function(){}:t;return this._tables.has(e)?r(this._tables.get(e)):"string"==typeof e||null===e?t():this._forEach(r),this},aN.prototype.get=function(e,t){return this._tables.has(e)?this._tables.get(e):"function"==typeof t?t():t},aN.prototype.removeExpired=function(){var t=this;return this._removeIf(function(e){return e.isExpiredFor(t._routingTablePurgeDelay)})},aN.prototype._forEach=function(e){var t,r;try{for(var n=O2(this._tables),o=n.next();!o.done;o=n.next())e(w2(o.value,2)[1])}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return this},aN.prototype._remove=function(e){return this._tables.delete(e),this},aN.prototype._removeIf=function(e){var t,r;try{for(var n=O2(this._tables),o=n.next();!o.done;o=n.next()){var i=w2(o.value,2),u=i[0];e(i[1])&&this._remove(u)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}return this};var z2,q2,V2,H2,G2,Y2,K2,Z2,Q2,X2,J2,x,$2,eN,tN,rN,nN,oN,iN,uN=aN;function aN(e){this._tables=new Map,this._routingTablePurgeDelay=e}function sN(e,t,r){void 0===r&&(r={}),tN(e,"Bolt URL");var n,o=oN.parseDatabaseUrl(e),i=!1,u=!1;switch(o.scheme){case"bolt":break;case"bolt+s":u=!0,n="TRUST_SYSTEM_CA_SIGNED_CERTIFICATES";break;case"bolt+ssc":u=!0,n="TRUST_ALL_CERTIFICATES";break;case"neo4j":i=!0;break;case"neo4j+s":n="TRUST_SYSTEM_CA_SIGNED_CERTIFICATES",i=u=!0;break;case"neo4j+ssc":n="TRUST_ALL_CERTIFICATES",i=u=!0;break;default:throw new Error("Unknown scheme: ".concat(o.scheme))}if(u){if("encrypted"in r||"trust"in r)throw new Error("Encryption/trust can only be configured either through URL or config, not both");r.encrypted=eN,r.trust=n}var a=function(e){if("object"==typeof(t=e)&&null!=t&&"getToken"in t&&"handleSecurityException"in t&&"function"==typeof t.getToken&&"function"==typeof t.handleSecurityException)return e;var t=e;return(t=t||{}).scheme=t.scheme||"none",(0,x.staticAuthTokenManager)({authToken:t})}(t),s=(r.userAgent=r.userAgent||iN,r.boltAgent=x.internal.boltAgent.fromVersion(J2.default),nN.fromUrl(o.hostAndPort)),t={address:s,typename:i?"Routing":"Direct",routing:i};return new X2.Driver(t,r,function(){{if(i)return function(e,t,r,n){return new $2.RoutingConnectionProvider({id:e,config:t,log:r,hostNameResolver:n,authTokenManager:a,address:s,userAgent:t.userAgent,boltAgent:t.boltAgent,routingContext:o.query})};if(rN(o.query))return function(e,t,r){return new $2.DirectConnectionProvider({id:e,config:t,log:r,authTokenManager:a,address:s,userAgent:t.userAgent,boltAgent:t.boltAgent})};throw new Error("Parameters are not supported with none routed scheme. Given URL: '".concat(e,"'"))}}())}function cN(r,n){return Z2(this,void 0,void 0,function(){var t;return Q2(this,function(e){switch(e.label){case 0:t=sN(r,{scheme:"none",principal:"",credentials:""},n),e.label=1;case 1:return e.trys.push([1,,3,5]),[4,t.getNegotiatedProtocolVersion()];case 2:return e.sent(),[2,!0];case 3:return[4,t.close()];case 4:return e.sent(),[7];case 5:return[2]}})})}return ob=Fb,z2=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(ob,"__esModule",{value:!0}),ob.RoutingConnectionProvider=ob.DirectConnectionProvider=ob.PooledConnectionProvider=ob.SingleConnectionProvider=void 0,q2=dy,Object.defineProperty(ob,"SingleConnectionProvider",{enumerable:!0,get:function(){return z2(q2).default}}),V2=Ub,Object.defineProperty(ob,"PooledConnectionProvider",{enumerable:!0,get:function(){return z2(V2).default}}),H2=sv,Object.defineProperty(ob,"DirectConnectionProvider",{enumerable:!0,get:function(){return z2(H2).default}}),G2=Rv,Object.defineProperty(ob,"RoutingConnectionProvider",{enumerable:!0,get:function(){return z2(G2).default}}),Nm=S,Y2=r&&r.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&("get"in o?t.__esModule:!o.writable&&!o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),K2=r&&r.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),Bm=r&&r.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&Y2(t,e,r);return K2(t,e),t},y=r&&r.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||Y2(t,e,r)},Object.defineProperty(Nm,"__esModule",{value:!0}),Nm.pool=Nm.packstream=Nm.channel=Nm.buf=Nm.bolt=Nm.loadBalancing=void 0,Nm.loadBalancing=Bm(Cs),Nm.bolt=Bm(E),Nm.buf=Bm(Qf),Nm.channel=Bm(hf),Nm.packstream=Bm(vy),Nm.pool=Bm(nb),y(Fb,Nm),j=F,Z2=r&&r.__awaiter||function(e,u,a,s){return new(a=a||Promise)(function(r,t){function n(e){try{i(s.next(e))}catch(e){t(e)}}function o(e){try{i(s.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,o)}i((s=s.apply(e,u||[])).next())})},Q2=r&&r.__generator||function(n,o){var i,u,a,s={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(i)throw new TypeError("Generator is already executing.");for(;s=c&&t[c=0]?0:s;)try{if(i=1,u&&(a=2&t[0]?u.return:t[0]?u.throw||((a=u.return)&&a.call(u),0):u.next)&&!(a=a.call(u,t[1])).done)return a;switch(u=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return s.label++,{value:t[1],done:!1};case 5:s.label++,u=t[1],t=[0];continue;case 7:t=s.ops.pop(),s.trys.pop();continue;default:if(!(a=0<(a=s.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){s=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3])){s.label=t[1];break}if(6===t[0]&&s.label<a[1]){s.label=a[1],a=t;break}if(a&&s.label<a[2]){s.label=a[2],s.ops.push(t);break}a[2]&&s.ops.pop(),s.trys.pop();continue}t=o.call(n,s)}catch(e){t=[6,e],u=0}finally{i=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}},r0=r&&r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Object.defineProperty(j,"__esModule",{value:!0}),j.Path=j.UnboundRelationship=j.Relationship=j.Node=j.Record=j.ServerInfo=j.Notification=j.QueryStatistics=j.ProfiledPlan=j.Plan=j.ResultSummary=j.RxResult=j.RxManagedTransaction=j.RxTransaction=j.RxSession=j.EagerResult=j.Result=j.ManagedTransaction=j.Transaction=j.Session=j.Driver=j.temporal=j.spatial=j.graph=j.error=j.routing=j.session=j.types=j.logging=j.auth=j.isRetryableError=j.Neo4jError=j.integer=j.isUnboundRelationship=j.isRelationship=j.isPathSegment=j.isPath=j.isNode=j.isDateTime=j.isLocalDateTime=j.isDate=j.isTime=j.isLocalTime=j.isDuration=j.isPoint=j.isInt=j.int=j.hasReachableServer=j.driver=j.authTokenManagers=void 0,j.notificationFilterMinimumSeverityLevel=j.notificationFilterDisabledCategory=j.notificationSeverityLevel=j.notificationCategory=j.resultTransformers=j.bookmarkManager=j.DateTime=j.LocalDateTime=j.Date=j.Time=j.LocalTime=j.Duration=j.Integer=j.Point=j.PathSegment=void 0,X2=B,Object.defineProperty(j,"Driver",{enumerable:!0,get:function(){return X2.Driver}}),J2=r0(v),x=e,Object.defineProperty(j,"authTokenManagers",{enumerable:!0,get:function(){return x.authTokenManagers}}),Object.defineProperty(j,"Neo4jError",{enumerable:!0,get:function(){return x.Neo4jError}}),Object.defineProperty(j,"isRetryableError",{enumerable:!0,get:function(){return x.isRetryableError}}),Object.defineProperty(j,"error",{enumerable:!0,get:function(){return x.error}}),Object.defineProperty(j,"Integer",{enumerable:!0,get:function(){return x.Integer}}),Object.defineProperty(j,"int",{enumerable:!0,get:function(){return x.int}}),Object.defineProperty(j,"isInt",{enumerable:!0,get:function(){return x.isInt}}),Object.defineProperty(j,"isPoint",{enumerable:!0,get:function(){return x.isPoint}}),Object.defineProperty(j,"Point",{enumerable:!0,get:function(){return x.Point}}),Object.defineProperty(j,"Date",{enumerable:!0,get:function(){return x.Date}}),Object.defineProperty(j,"DateTime",{enumerable:!0,get:function(){return x.DateTime}}),Object.defineProperty(j,"Duration",{enumerable:!0,get:function(){return x.Duration}}),Object.defineProperty(j,"isDate",{enumerable:!0,get:function(){return x.isDate}}),Object.defineProperty(j,"isDateTime",{enumerable:!0,get:function(){return x.isDateTime}}),Object.defineProperty(j,"isDuration",{enumerable:!0,get:function(){return x.isDuration}}),Object.defineProperty(j,"isLocalDateTime",{enumerable:!0,get:function(){return x.isLocalDateTime}}),Object.defineProperty(j,"isLocalTime",{enumerable:!0,get:function(){return x.isLocalTime}}),Object.defineProperty(j,"isNode",{enumerable:!0,get:function(){return x.isNode}}),Object.defineProperty(j,"isPath",{enumerable:!0,get:function(){return x.isPath}}),Object.defineProperty(j,"isPathSegment",{enumerable:!0,get:function(){return x.isPathSegment}}),Object.defineProperty(j,"isRelationship",{enumerable:!0,get:function(){return x.isRelationship}}),Object.defineProperty(j,"isTime",{enumerable:!0,get:function(){return x.isTime}}),Object.defineProperty(j,"isUnboundRelationship",{enumerable:!0,get:function(){return x.isUnboundRelationship}}),Object.defineProperty(j,"LocalDateTime",{enumerable:!0,get:function(){return x.LocalDateTime}}),Object.defineProperty(j,"LocalTime",{enumerable:!0,get:function(){return x.LocalTime}}),Object.defineProperty(j,"Time",{enumerable:!0,get:function(){return x.Time}}),Object.defineProperty(j,"Node",{enumerable:!0,get:function(){return x.Node}}),Object.defineProperty(j,"Path",{enumerable:!0,get:function(){return x.Path}}),Object.defineProperty(j,"PathSegment",{enumerable:!0,get:function(){return x.PathSegment}}),Object.defineProperty(j,"Relationship",{enumerable:!0,get:function(){return x.Relationship}}),Object.defineProperty(j,"UnboundRelationship",{enumerable:!0,get:function(){return x.UnboundRelationship}}),Object.defineProperty(j,"Record",{enumerable:!0,get:function(){return x.Record}}),Object.defineProperty(j,"ResultSummary",{enumerable:!0,get:function(){return x.ResultSummary}}),Object.defineProperty(j,"Plan",{enumerable:!0,get:function(){return x.Plan}}),Object.defineProperty(j,"ProfiledPlan",{enumerable:!0,get:function(){return x.ProfiledPlan}}),Object.defineProperty(j,"QueryStatistics",{enumerable:!0,get:function(){return x.QueryStatistics}}),Object.defineProperty(j,"Notification",{enumerable:!0,get:function(){return x.Notification}}),Object.defineProperty(j,"ServerInfo",{enumerable:!0,get:function(){return x.ServerInfo}}),Object.defineProperty(j,"Result",{enumerable:!0,get:function(){return x.Result}}),Object.defineProperty(j,"EagerResult",{enumerable:!0,get:function(){return x.EagerResult}}),Object.defineProperty(j,"auth",{enumerable:!0,get:function(){return x.auth}}),Object.defineProperty(j,"Session",{enumerable:!0,get:function(){return x.Session}}),Object.defineProperty(j,"Transaction",{enumerable:!0,get:function(){return x.Transaction}}),Object.defineProperty(j,"ManagedTransaction",{enumerable:!0,get:function(){return x.ManagedTransaction}}),Object.defineProperty(j,"bookmarkManager",{enumerable:!0,get:function(){return x.bookmarkManager}}),Object.defineProperty(j,"routing",{enumerable:!0,get:function(){return x.routing}}),Object.defineProperty(j,"resultTransformers",{enumerable:!0,get:function(){return x.resultTransformers}}),Object.defineProperty(j,"notificationCategory",{enumerable:!0,get:function(){return x.notificationCategory}}),Object.defineProperty(j,"notificationSeverityLevel",{enumerable:!0,get:function(){return x.notificationSeverityLevel}}),Object.defineProperty(j,"notificationFilterDisabledCategory",{enumerable:!0,get:function(){return x.notificationFilterDisabledCategory}}),Object.defineProperty(j,"notificationFilterMinimumSeverityLevel",{enumerable:!0,get:function(){return x.notificationFilterMinimumSeverityLevel}}),$2=S,u0=r0(pr),j.RxSession=u0.default,f0=r0(t),j.RxTransaction=f0.default,As=r0(X),j.RxManagedTransaction=As.default,r0=r0(f),j.RxResult=r0.default,Bb=x.internal.util,eN=Bb.ENCRYPTION_ON,tN=Bb.assertString,rN=Bb.isEmptyObjectOrNull,nN=x.internal.serverAddress.ServerAddress,oN=x.internal.urlUtil,iN="neo4j-javascript/"+J2.default,j.driver=sN,j.hasReachableServer=cN,Bb={console:function(e){return{level:e,logger:function(e,t){return console.log("".concat(r.Date.now()," ").concat(e.toUpperCase()," ").concat(t))}}}},j.logging=Bb,yc={Node:x.Node,Relationship:x.Relationship,UnboundRelationship:x.UnboundRelationship,PathSegment:x.PathSegment,Path:x.Path,Result:x.Result,EagerResult:x.EagerResult,ResultSummary:x.ResultSummary,Record:x.Record,Point:x.Point,Date:x.Date,DateTime:x.DateTime,Duration:x.Duration,LocalDateTime:x.LocalDateTime,LocalTime:x.LocalTime,Time:x.Time,Integer:x.Integer},j.types=yc,w0={READ:X2.READ,WRITE:X2.WRITE},j.session=w0,Km={toNumber:x.toNumber,toString:x.toString,inSafeRange:x.inSafeRange},j.integer=Km,j0={isPoint:x.isPoint},j.spatial=j0,Q={isDuration:x.isDuration,isLocalTime:x.isLocalTime,isTime:x.isTime,isDate:x.isDate,isLocalDateTime:x.isLocalDateTime,isDateTime:x.isDateTime},j.temporal=Q,l={isNode:x.isNode,isPath:x.isPath,isPathSegment:x.isPathSegment,isRelationship:x.isRelationship,isUnboundRelationship:x.isUnboundRelationship},j.graph=l,Km={authTokenManagers:x.authTokenManagers,driver:sN,hasReachableServer:cN,int:x.int,isInt:x.isInt,isPoint:x.isPoint,isDuration:x.isDuration,isLocalTime:x.isLocalTime,isTime:x.isTime,isDate:x.isDate,isLocalDateTime:x.isLocalDateTime,isDateTime:x.isDateTime,isNode:x.isNode,isPath:x.isPath,isPathSegment:x.isPathSegment,isRelationship:x.isRelationship,isUnboundRelationship:x.isUnboundRelationship,integer:Km,Neo4jError:x.Neo4jError,isRetryableError:x.isRetryableError,auth:x.auth,logging:Bb,types:yc,session:w0,routing:x.routing,error:x.error,graph:l,spatial:j0,temporal:Q,Driver:X2.Driver,Session:x.Session,Transaction:x.Transaction,ManagedTransaction:x.ManagedTransaction,Result:x.Result,EagerResult:x.EagerResult,RxSession:u0.default,RxTransaction:f0.default,RxManagedTransaction:As.default,RxResult:r0.default,ResultSummary:x.ResultSummary,Plan:x.Plan,ProfiledPlan:x.ProfiledPlan,QueryStatistics:x.QueryStatistics,Notification:x.Notification,ServerInfo:x.ServerInfo,Record:x.Record,Node:x.Node,Relationship:x.Relationship,UnboundRelationship:x.UnboundRelationship,Path:x.Path,PathSegment:x.PathSegment,Point:x.Point,Integer:x.Integer,Duration:x.Duration,LocalTime:x.LocalTime,Time:x.Time,Date:x.Date,LocalDateTime:x.LocalDateTime,DateTime:x.DateTime,bookmarkManager:x.bookmarkManager,resultTransformers:x.resultTransformers,notificationCategory:x.notificationCategory,notificationSeverityLevel:x.notificationSeverityLevel,notificationFilterDisabledCategory:x.notificationFilterDisabledCategory,notificationFilterMinimumSeverityLevel:x.notificationFilterMinimumSeverityLevel},j.default=Km,D(F)});