@squidcloud/client 1.0.55 → 1.0.56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/*! For license information please see index.js.LICENSE.txt */
|
|
2
|
-
(()=>{var e={8278:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3910:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0});const o=r(8599);t.default=o.PromisePool,i(r(8278),t),i(r(8599),t),i(r(5607),t),i(r(6784),t),i(r(9446),t),i(r(4204),t)},5607:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PromisePoolError=void 0;class r extends Error{constructor(e,t){super(),this.raw=e,this.item=t,this.name=this.constructor.name,this.message=this.messageFrom(e),Error.captureStackTrace(this,this.constructor)}static createFrom(e,t){return new this(e,t)}messageFrom(e){return e instanceof Error||"object"==typeof e?e.message:"string"==typeof e||"number"==typeof e?e.toString():""}}t.PromisePoolError=r},4027:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PromisePoolExecutor=void 0;const n=r(8599),i=r(5607),o=r(9446),a=r(4204);t.PromisePoolExecutor=class{constructor(){this.meta={tasks:[],items:[],errors:[],results:[],stopped:!1,concurrency:10,shouldResultsCorrespond:!1,processedItems:[],taskTimeout:0},this.handler=()=>{},this.errorHandler=void 0,this.onTaskStartedHandlers=[],this.onTaskFinishedHandlers=[]}useConcurrency(e){if(!this.isValidConcurrency(e))throw a.ValidationError.createFrom(`"concurrency" must be a number, 1 or up. Received "${e}" (${typeof e})`);return this.meta.concurrency=e,this}isValidConcurrency(e){return"number"==typeof e&&e>=1}withTaskTimeout(e){return this.meta.taskTimeout=e,this}concurrency(){return this.meta.concurrency}useCorrespondingResults(e){return this.meta.shouldResultsCorrespond=e,this}shouldUseCorrespondingResults(){return this.meta.shouldResultsCorrespond}taskTimeout(){return this.meta.taskTimeout}for(e){return this.meta.items=e,this}items(){return this.meta.items}itemsCount(){return this.items().length}tasks(){return this.meta.tasks}activeTaskCount(){return this.activeTasksCount()}activeTasksCount(){return this.tasks().length}processedItems(){return this.meta.processedItems}processedCount(){return this.processedItems().length}processedPercentage(){return this.processedCount()/this.itemsCount()*100}results(){return this.meta.results}errors(){return this.meta.errors}withHandler(e){return this.handler=e,this}hasErrorHandler(){return!!this.errorHandler}handleError(e){return this.errorHandler=e,this}onTaskStarted(e){return this.onTaskStartedHandlers=e,this}onTaskFinished(e){return this.onTaskFinishedHandlers=e,this}hasReachedConcurrencyLimit(){return this.activeTasksCount()>=this.concurrency()}stop(){throw this.markAsStopped(),new o.StopThePromisePoolError}markAsStopped(){return this.meta.stopped=!0,this}isStopped(){return this.meta.stopped}async start(){return await this.validateInputs().prepareResultsArray().process()}validateInputs(){if("function"!=typeof this.handler)throw a.ValidationError.createFrom("The first parameter for the .process(fn) method must be a function");const e=this.taskTimeout();if(!(null==e||"number"==typeof e&&e>=0))throw a.ValidationError.createFrom(`"timeout" must be undefined or a number. A number must be 0 or up. Received "${String(e)}" (${typeof e})`);if(!Array.isArray(this.items()))throw a.ValidationError.createFrom(`"items" must be an array. Received "${typeof this.items()}"`);if(this.errorHandler&&"function"!=typeof this.errorHandler)throw a.ValidationError.createFrom(`The error handler must be a function. Received "${typeof this.errorHandler}"`);return this.onTaskStartedHandlers.forEach((e=>{if(e&&"function"!=typeof e)throw a.ValidationError.createFrom(`The onTaskStarted handler must be a function. Received "${typeof e}"`)})),this.onTaskFinishedHandlers.forEach((e=>{if(e&&"function"!=typeof e)throw a.ValidationError.createFrom(`The error handler must be a function. Received "${typeof e}"`)})),this}prepareResultsArray(){return this.shouldUseCorrespondingResults()&&(this.meta.results=Array(this.items().length).fill(n.PromisePool.notRun)),this}async process(){for(const[e,t]of this.items().entries()){if(this.isStopped())break;await this.waitForProcessingSlot(),this.startProcessing(t,e)}return await this.drained()}async waitForProcessingSlot(){for(;this.hasReachedConcurrencyLimit();)await this.waitForActiveTaskToFinish()}async waitForActiveTaskToFinish(){await Promise.race(this.tasks())}startProcessing(e,t){const r=this.createTaskFor(e,t).then((e=>{this.save(e,t).removeActive(r)})).catch((async n=>{await this.handleErrorFor(n,e,t),this.removeActive(r)})).finally((()=>{this.processedItems().push(e),this.runOnTaskFinishedHandlers(e)}));this.tasks().push(r),this.runOnTaskStartedHandlers(e)}async createTaskFor(e,t){return void 0===this.taskTimeout()?this.handler(e,t,this):Promise.race([this.handler(e,t,this),this.createTaskTimeout(e)])}async createTaskTimeout(e){return new Promise(((t,r)=>{setTimeout((()=>{r(new i.PromisePoolError(`Promise in pool timed out after ${this.taskTimeout()}ms`,e))}),this.taskTimeout())}))}save(e,t){return this.shouldUseCorrespondingResults()?this.results()[t]=e:this.results().push(e),this}removeActive(e){return this.tasks().splice(this.tasks().indexOf(e),1),this}async handleErrorFor(e,t,r){if(this.shouldUseCorrespondingResults()&&(this.results()[r]=n.PromisePool.failed),!this.isStoppingThePoolError(e)){if(this.isValidationError(e))throw this.markAsStopped(),e;this.hasErrorHandler()?await this.runErrorHandlerFor(e,t):this.saveErrorFor(e,t)}}isStoppingThePoolError(e){return e instanceof o.StopThePromisePoolError}isValidationError(e){return e instanceof a.ValidationError}async runErrorHandlerFor(e,t){var r;try{await(null===(r=this.errorHandler)||void 0===r?void 0:r.call(this,e,t,this))}catch(e){this.rethrowIfNotStoppingThePool(e)}}runOnTaskStartedHandlers(e){this.onTaskStartedHandlers.forEach((t=>{t(e,this)}))}runOnTaskFinishedHandlers(e){this.onTaskFinishedHandlers.forEach((t=>{t(e,this)}))}rethrowIfNotStoppingThePool(e){if(!this.isStoppingThePoolError(e))throw e}saveErrorFor(e,t){this.errors().push(i.PromisePoolError.createFrom(e,t))}async drained(){return await this.drainActiveTasks(),{errors:this.errors(),results:this.results()}}async drainActiveTasks(){await Promise.all(this.tasks())}}},8599:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PromisePool=void 0;const n=r(4027);class i{constructor(e){this.timeout=void 0,this.concurrency=10,this.shouldResultsCorrespond=!1,this.items=null!=e?e:[],this.errorHandler=void 0,this.onTaskStartedHandlers=[],this.onTaskFinishedHandlers=[]}withConcurrency(e){return this.concurrency=e,this}static withConcurrency(e){return(new this).withConcurrency(e)}withTaskTimeout(e){return this.timeout=e,this}static withTaskTimeout(e){return(new this).withTaskTimeout(e)}for(e){return"number"==typeof this.timeout?new i(e).withConcurrency(this.concurrency).withTaskTimeout(this.timeout):new i(e).withConcurrency(this.concurrency)}static for(e){return(new this).for(e)}handleError(e){return this.errorHandler=e,this}onTaskStarted(e){return this.onTaskStartedHandlers.push(e),this}onTaskFinished(e){return this.onTaskFinishedHandlers.push(e),this}useCorrespondingResults(){return this.shouldResultsCorrespond=!0,this}async process(e){return(new n.PromisePoolExecutor).useConcurrency(this.concurrency).useCorrespondingResults(this.shouldResultsCorrespond).withTaskTimeout(this.timeout).withHandler(e).handleError(this.errorHandler).onTaskStarted(this.onTaskStartedHandlers).onTaskFinished(this.onTaskFinishedHandlers).for(this.items).start()}}t.PromisePool=i,i.notRun=Symbol("notRun"),i.failed=Symbol("failed")},6784:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9446:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StopThePromisePoolError=void 0;class r extends Error{}t.StopThePromisePoolError=r},4204:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValidationError=void 0;class r extends Error{constructor(e){super(e),Error.captureStackTrace(this,this.constructor)}static createFrom(e){return new this(e)}}t.ValidationError=r},3747:(e,t)=>{"use strict";function r(e,t){return{validate:e,compare:t}}Object.defineProperty(t,"__esModule",{value:!0}),t.formatNames=t.fastFormats=t.fullFormats=void 0,t.fullFormats={date:r(o,a),time:r(u,c),"date-time":r((function(e){const t=e.split(l);return 2===t.length&&o(t[0])&&u(t[1],!0)}),f),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:function(e){return p.test(e)&&d.test(e)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:function(e){if(v.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}},uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:function(e){return h.lastIndex=0,h.test(e)},int32:{type:"number",validate:function(e){return Number.isInteger(e)&&e<=2147483647&&e>=-2147483648}},int64:{type:"number",validate:function(e){return Number.isInteger(e)}},float:{type:"number",validate:y},double:{type:"number",validate:y},password:!0,binary:!0},t.fastFormats={...t.fullFormats,date:r(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,a),time:r(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,c),"date-time":r(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,f),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},t.formatNames=Object.keys(t.fullFormats);const n=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,i=[0,31,28,31,30,31,30,31,31,30,31,30,31];function o(e){const t=n.exec(e);if(!t)return!1;const r=+t[1],o=+t[2],a=+t[3];return o>=1&&o<=12&&a>=1&&a<=(2===o&&function(e){return e%4==0&&(e%100!=0||e%400==0)}(r)?29:i[o])}function a(e,t){if(e&&t)return e>t?1:e<t?-1:0}const s=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function u(e,t){const r=s.exec(e);if(!r)return!1;const n=+r[1],i=+r[2],o=+r[3],a=r[5];return(n<=23&&i<=59&&o<=59||23===n&&59===i&&60===o)&&(!t||""!==a)}function c(e,t){if(!e||!t)return;const r=s.exec(e),n=s.exec(t);return r&&n?(e=r[1]+r[2]+r[3]+(r[4]||""))>(t=n[1]+n[2]+n[3]+(n[4]||""))?1:e<t?-1:0:void 0}const l=/t|\s/i;function f(e,t){if(!e||!t)return;const[r,n]=e.split(l),[i,o]=t.split(l),s=a(r,i);return void 0!==s?s||c(n,o):void 0}const p=/\/|:/,d=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,h=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function y(){return!0}const v=/[^\\]\\Z/},8414:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(3747),i=r(9262),o=r(5669),a=new o.Name("fullFormats"),s=new o.Name("fastFormats"),u=(e,t={keywords:!0})=>{if(Array.isArray(t))return c(e,t,n.fullFormats,a),e;const[r,o]="fast"===t.mode?[n.fastFormats,s]:[n.fullFormats,a];return c(e,t.formats||n.formatNames,r,o),t.keywords&&i.default(e),e};function c(e,t,r,n){var i,a;null!==(i=(a=e.opts.code).formats)&&void 0!==i||(a.formats=o._`require("ajv-formats/dist/formats").${n}`);for(const n of t)e.addFormat(n,r[n])}u.get=(e,t="full")=>{const r=("fast"===t?n.fastFormats:n.fullFormats)[e];if(!r)throw new Error(`Unknown format "${e}"`);return r},e.exports=t=u,Object.defineProperty(t,"__esModule",{value:!0}),t.default=u},9262:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatLimitDefinition=void 0;const n=r(6236),i=r(5669),o=i.operators,a={formatMaximum:{okStr:"<=",ok:o.LTE,fail:o.GT},formatMinimum:{okStr:">=",ok:o.GTE,fail:o.LT},formatExclusiveMaximum:{okStr:"<",ok:o.LT,fail:o.GTE},formatExclusiveMinimum:{okStr:">",ok:o.GT,fail:o.LTE}},s={message:({keyword:e,schemaCode:t})=>i.str`should be ${a[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>i._`{comparison: ${a[e].okStr}, limit: ${t}}`};t.formatLimitDefinition={keyword:Object.keys(a),type:"string",schemaType:"string",$data:!0,error:s,code(e){const{gen:t,data:r,schemaCode:o,keyword:s,it:u}=e,{opts:c,self:l}=u;if(!c.validateFormats)return;const f=new n.KeywordCxt(u,l.RULES.all.format.definition,"format");function p(e){return i._`${e}.compare(${r}, ${o}) ${a[s].fail} 0`}f.$data?function(){const r=t.scopeValue("formats",{ref:l.formats,code:c.code.formats}),n=t.const("fmt",i._`${r}[${f.schemaCode}]`);e.fail$data(i.or(i._`typeof ${n} != "object"`,i._`${n} instanceof RegExp`,i._`typeof ${n}.compare != "function"`,p(n)))}():function(){const r=f.schema,n=l.formats[r];if(!n||!0===n)return;if("object"!=typeof n||n instanceof RegExp||"function"!=typeof n.compare)throw new Error(`"${s}": format "${r}" does not define "compare" function`);const o=t.scopeValue("formats",{key:r,ref:n,code:c.code.formats?i._`${c.code.formats}${i.getProperty(r)}`:void 0});e.fail$data(p(o))}()},dependencies:["format"]},t.default=e=>(e.addKeyword(t.formatLimitDefinition),e)},6236:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;const n=r(8355),i=r(5671),o=r(2),a=r(1512),s=["/properties"],u="http://json-schema.org/draft-07/schema";class c extends n.default{_addVocabularies(){super._addVocabularies(),i.default.forEach((e=>this.addVocabulary(e))),this.opts.discriminator&&this.addKeyword(o.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const e=this.opts.$data?this.$dataMetaSchema(a,s):a;this.addMetaSchema(e,u,!1),this.refs["http://json-schema.org/schema"]=u}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(u)?u:void 0)}}e.exports=t=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var l=r(1686);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return l.KeywordCxt}});var f=r(5669);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return f._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return f.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return f.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return f.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return f.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return f.CodeGen}});var p=r(6448);Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return p.default}});var d=r(1578);Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return d.default}})},6545:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class r{}t._CodeOrName=r,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class n extends r{constructor(e){if(super(),!t.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=n;class i extends r{constructor(e){super(),this._items="string"==typeof e?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const e=this._items[0];return""===e||'""'===e}get str(){var e;return null!==(e=this._str)&&void 0!==e?e:this._str=this._items.reduce(((e,t)=>`${e}${t}`),"")}get names(){var e;return null!==(e=this._names)&&void 0!==e?e:this._names=this._items.reduce(((e,t)=>(t instanceof n&&(e[t.str]=(e[t.str]||0)+1),e)),{})}}function o(e,...t){const r=[e[0]];let n=0;for(;n<t.length;)u(r,t[n]),r.push(e[++n]);return new i(r)}t._Code=i,t.nil=new i(""),t._=o;const a=new i("+");function s(e,...t){const r=[l(e[0])];let n=0;for(;n<t.length;)r.push(a),u(r,t[n]),r.push(a,l(e[++n]));return function(e){let t=1;for(;t<e.length-1;){if(e[t]===a){const r=c(e[t-1],e[t+1]);if(void 0!==r){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}(r),new i(r)}function u(e,t){var r;t instanceof i?e.push(...t._items):t instanceof n?e.push(t):e.push("number"==typeof(r=t)||"boolean"==typeof r||null===r?r:l(Array.isArray(r)?r.join(","):r))}function c(e,t){if('""'===t)return e;if('""'===e)return t;if("string"==typeof e){if(t instanceof n||'"'!==e[e.length-1])return;return"string"!=typeof t?`${e.slice(0,-1)}${t}"`:'"'===t[0]?e.slice(0,-1)+t.slice(1):void 0}return"string"!=typeof t||'"'!==t[0]||e instanceof n?void 0:`"${e}${t.slice(1)}`}function l(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.str=s,t.addCodeArg=u,t.strConcat=function(e,t){return t.emptyStr()?e:e.emptyStr()?t:s`${e}${t}`},t.stringify=function(e){return new i(l(e))},t.safeStringify=l,t.getProperty=function(e){return"string"==typeof e&&t.IDENTIFIER.test(e)?new i(`.${e}`):o`[${e}]`},t.getEsmExportName=function(e){if("string"==typeof e&&t.IDENTIFIER.test(e))return new i(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)},t.regexpCode=function(e){return new i(e.toString())}},5669:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;const n=r(6545),i=r(9187);var o=r(6545);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return o._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return o.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return o.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return o.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return o.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return o.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return o.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return o.Name}});var a=r(9187);Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return a.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return a.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return a.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return a.varKinds}}),t.operators={GT:new n._Code(">"),GTE:new n._Code(">="),LT:new n._Code("<"),LTE:new n._Code("<="),EQ:new n._Code("==="),NEQ:new n._Code("!=="),NOT:new n._Code("!"),OR:new n._Code("||"),AND:new n._Code("&&"),ADD:new n._Code("+")};class s{optimizeNodes(){return this}optimizeNames(e,t){return this}}class u extends s{constructor(e,t,r){super(),this.varKind=e,this.name=t,this.rhs=r}render({es5:e,_n:t}){const r=e?i.varKinds.var:this.varKind,n=void 0===this.rhs?"":` = ${this.rhs}`;return`${r} ${this.name}${n};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=N(this.rhs,e,t)),this}get names(){return this.rhs instanceof n._CodeOrName?this.rhs.names:{}}}class c extends s{constructor(e,t,r){super(),this.lhs=e,this.rhs=t,this.sideEffects=r}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(!(this.lhs instanceof n.Name)||e[this.lhs.str]||this.sideEffects)return this.rhs=N(this.rhs,e,t),this}get names(){return A(this.lhs instanceof n.Name?{}:{...this.lhs.names},this.rhs)}}class l extends c{constructor(e,t,r,n){super(e,r,n),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class f extends s{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class p extends s{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class d extends s{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class h extends s{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=N(this.code,e,t),this}get names(){return this.code instanceof n._CodeOrName?this.code.names:{}}}class y extends s{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce(((t,r)=>t+r.render(e)),"")}optimizeNodes(){const{nodes:e}=this;let t=e.length;for(;t--;){const r=e[t].optimizeNodes();Array.isArray(r)?e.splice(t,1,...r):r?e[t]=r:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){const{nodes:r}=this;let n=r.length;for(;n--;){const i=r[n];i.optimizeNames(e,t)||(k(e,i.names),r.splice(n,1))}return r.length>0?this:void 0}get names(){return this.nodes.reduce(((e,t)=>x(e,t.names)),{})}}class v extends y{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class m extends y{}class b extends v{}b.kind="else";class g extends v{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();const e=this.condition;if(!0===e)return this.nodes;let t=this.else;if(t){const e=t.optimizeNodes();t=this.else=Array.isArray(e)?new b(e):e}return t?!1===e?t instanceof g?t:t.nodes:this.nodes.length?this:new g(M(e),t instanceof g?[t]:t.nodes):!1!==e&&this.nodes.length?this:void 0}optimizeNames(e,t){var r;if(this.else=null===(r=this.else)||void 0===r?void 0:r.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=N(this.condition,e,t),this}get names(){const e=super.names;return A(e,this.condition),this.else&&x(e,this.else.names),e}}g.kind="if";class _ extends v{}_.kind="for";class w extends _{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=N(this.iteration,e,t),this}get names(){return x(super.names,this.iteration.names)}}class O extends _{constructor(e,t,r,n){super(),this.varKind=e,this.name=t,this.from=r,this.to=n}render(e){const t=e.es5?i.varKinds.var:this.varKind,{name:r,from:n,to:o}=this;return`for(${t} ${r}=${n}; ${r}<${o}; ${r}++)`+super.render(e)}get names(){const e=A(super.names,this.from);return A(e,this.to)}}class S extends _{constructor(e,t,r,n){super(),this.loop=e,this.varKind=t,this.name=r,this.iterable=n}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=N(this.iterable,e,t),this}get names(){return x(super.names,this.iterable.names)}}class E extends v{constructor(e,t,r){super(),this.name=e,this.args=t,this.async=r}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}E.kind="func";class T extends y{render(e){return"return "+super.render(e)}}T.kind="return";class j extends v{render(e){let t="try"+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),null===(e=this.catch)||void 0===e||e.optimizeNodes(),null===(t=this.finally)||void 0===t||t.optimizeNodes(),this}optimizeNames(e,t){var r,n;return super.optimizeNames(e,t),null===(r=this.catch)||void 0===r||r.optimizeNames(e,t),null===(n=this.finally)||void 0===n||n.optimizeNames(e,t),this}get names(){const e=super.names;return this.catch&&x(e,this.catch.names),this.finally&&x(e,this.finally.names),e}}class P extends v{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}P.kind="catch";class I extends v{render(e){return"finally"+super.render(e)}}function x(e,t){for(const r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function A(e,t){return t instanceof n._CodeOrName?x(e,t.names):e}function N(e,t,r){return e instanceof n.Name?o(e):(i=e)instanceof n._Code&&i._items.some((e=>e instanceof n.Name&&1===t[e.str]&&void 0!==r[e.str]))?new n._Code(e._items.reduce(((e,t)=>(t instanceof n.Name&&(t=o(t)),t instanceof n._Code?e.push(...t._items):e.push(t),e)),[])):e;var i;function o(e){const n=r[e.str];return void 0===n||1!==t[e.str]?e:(delete t[e.str],n)}}function k(e,t){for(const r in t)e[r]=(e[r]||0)-(t[r]||0)}function M(e){return"boolean"==typeof e||"number"==typeof e||null===e?!e:n._`!${$(e)}`}I.kind="finally",t.CodeGen=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?"\n":""},this._extScope=e,this._scope=new i.Scope({parent:e}),this._nodes=[new m]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){const r=this._extScope.value(e,t);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,r,n){const i=this._scope.toName(t);return void 0!==r&&n&&(this._constants[i.str]=r),this._leafNode(new u(e,i,r)),i}const(e,t,r){return this._def(i.varKinds.const,e,t,r)}let(e,t,r){return this._def(i.varKinds.let,e,t,r)}var(e,t,r){return this._def(i.varKinds.var,e,t,r)}assign(e,t,r){return this._leafNode(new c(e,t,r))}add(e,r){return this._leafNode(new l(e,t.operators.ADD,r))}code(e){return"function"==typeof e?e():e!==n.nil&&this._leafNode(new h(e)),this}object(...e){const t=["{"];for(const[r,i]of e)t.length>1&&t.push(","),t.push(r),(r!==i||this.opts.es5)&&(t.push(":"),(0,n.addCodeArg)(t,i));return t.push("}"),new n._Code(t)}if(e,t,r){if(this._blockNode(new g(e)),t&&r)this.code(t).else().code(r).endIf();else if(t)this.code(t).endIf();else if(r)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new g(e))}else(){return this._elseNode(new b)}endIf(){return this._endBlockNode(g,b)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new w(e),t)}forRange(e,t,r,n,o=(this.opts.es5?i.varKinds.var:i.varKinds.let)){const a=this._scope.toName(e);return this._for(new O(o,a,t,r),(()=>n(a)))}forOf(e,t,r,o=i.varKinds.const){const a=this._scope.toName(e);if(this.opts.es5){const e=t instanceof n.Name?t:this.var("_arr",t);return this.forRange("_i",0,n._`${e}.length`,(t=>{this.var(a,n._`${e}[${t}]`),r(a)}))}return this._for(new S("of",o,a,t),(()=>r(a)))}forIn(e,t,r,o=(this.opts.es5?i.varKinds.var:i.varKinds.const)){if(this.opts.ownProperties)return this.forOf(e,n._`Object.keys(${t})`,r);const a=this._scope.toName(e);return this._for(new S("in",o,a,t),(()=>r(a)))}endFor(){return this._endBlockNode(_)}label(e){return this._leafNode(new f(e))}break(e){return this._leafNode(new p(e))}return(e){const t=new T;if(this._blockNode(t),this.code(e),1!==t.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(T)}try(e,t,r){if(!t&&!r)throw new Error('CodeGen: "try" without "catch" and "finally"');const n=new j;if(this._blockNode(n),this.code(e),t){const e=this.name("e");this._currNode=n.catch=new P(e),t(e)}return r&&(this._currNode=n.finally=new I,this.code(r)),this._endBlockNode(P,I)}throw(e){return this._leafNode(new d(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){const t=this._blockStarts.pop();if(void 0===t)throw new Error("CodeGen: not in self-balancing block");const r=this._nodes.length-t;if(r<0||void 0!==e&&r!==e)throw new Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=t,this}func(e,t=n.nil,r,i){return this._blockNode(new E(e,t,r)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(E)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){const r=this._currNode;if(r instanceof e||t&&r instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){const t=this._currNode;if(!(t instanceof g))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){const e=this._nodes;return e[e.length-1]}set _currNode(e){const t=this._nodes;t[t.length-1]=e}},t.not=M;const D=C(t.operators.AND);t.and=function(...e){return e.reduce(D)};const R=C(t.operators.OR);function C(e){return(t,r)=>t===n.nil?r:r===n.nil?t:n._`${$(t)} ${e} ${$(r)}`}function $(e){return e instanceof n.Name?e:n._`(${e})`}t.or=function(...e){return e.reduce(R)}},9187:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const n=r(6545);class i extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}}var o;!function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"}(o=t.UsedValueState||(t.UsedValueState={})),t.varKinds={const:new n.Name("const"),let:new n.Name("let"),var:new n.Name("var")};class a{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof n.Name?e:this.name(e)}name(e){return new n.Name(this._newName(e))}_newName(e){return`${e}${(this._names[e]||this._nameGroup(e)).index++}`}_nameGroup(e){var t,r;if((null===(r=null===(t=this._parent)||void 0===t?void 0:t._prefixes)||void 0===r?void 0:r.has(e))||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}}t.Scope=a;class s extends n.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:t,itemIndex:r}){this.value=e,this.scopePath=n._`.${new n.Name(t)}[${r}]`}}t.ValueScopeName=s;const u=n._`\n`;t.ValueScope=class extends a{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?u:n.nil}}get(){return this._scope}name(e){return new s(e,this._newName(e))}value(e,t){var r;if(void 0===t.ref)throw new Error("CodeGen: ref must be passed in value");const n=this.toName(e),{prefix:i}=n,o=null!==(r=t.key)&&void 0!==r?r:t.ref;let a=this._values[i];if(a){const e=a.get(o);if(e)return e}else a=this._values[i]=new Map;a.set(o,n);const s=this._scope[i]||(this._scope[i]=[]),u=s.length;return s[u]=t.ref,n.setValue(t,{property:i,itemIndex:u}),n}getValue(e,t){const r=this._values[e];if(r)return r.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,(t=>{if(void 0===t.scopePath)throw new Error(`CodeGen: name "${t}" has no value`);return n._`${e}${t.scopePath}`}))}scopeCode(e=this._values,t,r){return this._reduceValues(e,(e=>{if(void 0===e.value)throw new Error(`CodeGen: name "${e}" has no value`);return e.value.code}),t,r)}_reduceValues(e,r,a={},s){let u=n.nil;for(const c in e){const l=e[c];if(!l)continue;const f=a[c]=a[c]||new Map;l.forEach((e=>{if(f.has(e))return;f.set(e,o.Started);let a=r(e);if(a){const r=this.opts.es5?t.varKinds.var:t.varKinds.const;u=n._`${u}${r} ${e} = ${a};${this.opts._n}`}else{if(!(a=null==s?void 0:s(e)))throw new i(e);u=n._`${u}${a}${this.opts._n}`}f.set(e,o.Completed)}))}return u}}},6930:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const n=r(5669),i=r(8936),o=r(5247);function a(e,t){const r=e.const("err",t);e.if(n._`${o.default.vErrors} === null`,(()=>e.assign(o.default.vErrors,n._`[${r}]`)),n._`${o.default.vErrors}.push(${r})`),e.code(n._`${o.default.errors}++`)}function s(e,t){const{gen:r,validateName:i,schemaEnv:o}=e;o.$async?r.throw(n._`new ${e.ValidationError}(${t})`):(r.assign(n._`${i}.errors`,t),r.return(!1))}t.keywordError={message:({keyword:e})=>n.str`must pass "${e}" keyword validation`},t.keyword$DataError={message:({keyword:e,schemaType:t})=>t?n.str`"${e}" keyword must be ${t} ($data)`:n.str`"${e}" keyword is invalid ($data)`},t.reportError=function(e,r=t.keywordError,i,o){const{it:u}=e,{gen:l,compositeRule:f,allErrors:p}=u,d=c(e,r,i);(null!=o?o:f||p)?a(l,d):s(u,n._`[${d}]`)},t.reportExtraError=function(e,r=t.keywordError,n){const{it:i}=e,{gen:u,compositeRule:l,allErrors:f}=i;a(u,c(e,r,n)),l||f||s(i,o.default.vErrors)},t.resetErrorsCount=function(e,t){e.assign(o.default.errors,t),e.if(n._`${o.default.vErrors} !== null`,(()=>e.if(t,(()=>e.assign(n._`${o.default.vErrors}.length`,t)),(()=>e.assign(o.default.vErrors,null)))))},t.extendErrors=function({gen:e,keyword:t,schemaValue:r,data:i,errsCount:a,it:s}){if(void 0===a)throw new Error("ajv implementation error");const u=e.name("err");e.forRange("i",a,o.default.errors,(a=>{e.const(u,n._`${o.default.vErrors}[${a}]`),e.if(n._`${u}.instancePath === undefined`,(()=>e.assign(n._`${u}.instancePath`,(0,n.strConcat)(o.default.instancePath,s.errorPath)))),e.assign(n._`${u}.schemaPath`,n.str`${s.errSchemaPath}/${t}`),s.opts.verbose&&(e.assign(n._`${u}.schema`,r),e.assign(n._`${u}.data`,i))}))};const u={keyword:new n.Name("keyword"),schemaPath:new n.Name("schemaPath"),params:new n.Name("params"),propertyName:new n.Name("propertyName"),message:new n.Name("message"),schema:new n.Name("schema"),parentSchema:new n.Name("parentSchema")};function c(e,t,r){const{createErrors:i}=e.it;return!1===i?n._`{}`:function(e,t,r={}){const{gen:i,it:a}=e,s=[l(a,r),f(e,r)];return function(e,{params:t,message:r},i){const{keyword:a,data:s,schemaValue:c,it:l}=e,{opts:f,propertyName:p,topSchemaRef:d,schemaPath:h}=l;i.push([u.keyword,a],[u.params,"function"==typeof t?t(e):t||n._`{}`]),f.messages&&i.push([u.message,"function"==typeof r?r(e):r]),f.verbose&&i.push([u.schema,c],[u.parentSchema,n._`${d}${h}`],[o.default.data,s]),p&&i.push([u.propertyName,p])}(e,t,s),i.object(...s)}(e,t,r)}function l({errorPath:e},{instancePath:t}){const r=t?n.str`${e}${(0,i.getErrorPath)(t,i.Type.Str)}`:e;return[o.default.instancePath,(0,n.strConcat)(o.default.instancePath,r)]}function f({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:o}){let a=o?t:n.str`${t}/${e}`;return r&&(a=n.str`${a}${(0,i.getErrorPath)(r,i.Type.Str)}`),[u.schemaPath,a]}},7382:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveSchema=t.getCompilingSchema=t.resolveRef=t.compileSchema=t.SchemaEnv=void 0;const n=r(5669),i=r(6448),o=r(5247),a=r(6696),s=r(8936),u=r(1686);class c{constructor(e){var t;let r;this.refs={},this.dynamicAnchors={},"object"==typeof e.schema&&(r=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=null!==(t=e.baseId)&&void 0!==t?t:(0,a.normalizeId)(null==r?void 0:r[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=null==r?void 0:r.$async,this.refs={}}}function l(e){const t=p.call(this,e);if(t)return t;const r=(0,a.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:s,lines:c}=this.opts.code,{ownProperties:l}=this.opts,f=new n.CodeGen(this.scope,{es5:s,lines:c,ownProperties:l});let d;e.$async&&(d=f.scopeValue("Error",{ref:i.default,code:n._`require("ajv/dist/runtime/validation_error").default`}));const h=f.scopeName("validate");e.validateName=h;const y={gen:f,allErrors:this.opts.allErrors,data:o.default.data,parentData:o.default.parentData,parentDataProperty:o.default.parentDataProperty,dataNames:[o.default.data],dataPathArr:[n.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:f.scopeValue("schema",!0===this.opts.code.source?{ref:e.schema,code:(0,n.stringify)(e.schema)}:{ref:e.schema}),validateName:h,ValidationError:d,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:n.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:n._`""`,opts:this.opts,self:this};let v;try{this._compilations.add(e),(0,u.validateFunctionCode)(y),f.optimize(this.opts.code.optimize);const t=f.toString();v=`${f.scopeRefs(o.default.scope)}return ${t}`,this.opts.code.process&&(v=this.opts.code.process(v,e));const r=new Function(`${o.default.self}`,`${o.default.scope}`,v)(this,this.scope.get());if(this.scope.value(h,{ref:r}),r.errors=null,r.schema=e.schema,r.schemaEnv=e,e.$async&&(r.$async=!0),!0===this.opts.code.source&&(r.source={validateName:h,validateCode:t,scopeValues:f._values}),this.opts.unevaluated){const{props:e,items:t}=y;r.evaluated={props:e instanceof n.Name?void 0:e,items:t instanceof n.Name?void 0:t,dynamicProps:e instanceof n.Name,dynamicItems:t instanceof n.Name},r.source&&(r.source.evaluated=(0,n.stringify)(r.evaluated))}return e.validate=r,e}catch(t){throw delete e.validate,delete e.validateName,v&&this.logger.error("Error compiling schema, function code:",v),t}finally{this._compilations.delete(e)}}function f(e){return(0,a.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:l.call(this,e)}function p(e){for(const n of this._compilations)if(r=e,(t=n).schema===r.schema&&t.root===r.root&&t.baseId===r.baseId)return n;var t,r}function d(e,t){let r;for(;"string"==typeof(r=this.refs[t]);)t=r;return r||this.schemas[t]||h.call(this,e,t)}function h(e,t){const r=this.opts.uriResolver.parse(t),n=(0,a._getFullPath)(this.opts.uriResolver,r);let i=(0,a.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===i)return v.call(this,r,e);const o=(0,a.normalizeId)(n),s=this.refs[o]||this.schemas[o];if("string"==typeof s){const t=h.call(this,e,s);if("object"!=typeof(null==t?void 0:t.schema))return;return v.call(this,r,t)}if("object"==typeof(null==s?void 0:s.schema)){if(s.validate||l.call(this,s),o===(0,a.normalizeId)(t)){const{schema:t}=s,{schemaId:r}=this.opts,n=t[r];return n&&(i=(0,a.resolveUrl)(this.opts.uriResolver,i,n)),new c({schema:t,schemaId:r,root:e,baseId:i})}return v.call(this,r,s)}}t.SchemaEnv=c,t.compileSchema=l,t.resolveRef=function(e,t,r){var n;r=(0,a.resolveUrl)(this.opts.uriResolver,t,r);const i=e.refs[r];if(i)return i;let o=d.call(this,e,r);if(void 0===o){const i=null===(n=e.localRefs)||void 0===n?void 0:n[r],{schemaId:a}=this.opts;i&&(o=new c({schema:i,schemaId:a,root:e,baseId:t}))}return void 0!==o?e.refs[r]=f.call(this,o):void 0},t.getCompilingSchema=p,t.resolveSchema=h;const y=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function v(e,{baseId:t,schema:r,root:n}){var i;if("/"!==(null===(i=e.fragment)||void 0===i?void 0:i[0]))return;for(const n of e.fragment.slice(1).split("/")){if("boolean"==typeof r)return;const e=r[(0,s.unescapeFragment)(n)];if(void 0===e)return;const i="object"==typeof(r=e)&&r[this.opts.schemaId];!y.has(n)&&i&&(t=(0,a.resolveUrl)(this.opts.uriResolver,t,i))}let o;if("boolean"!=typeof r&&r.$ref&&!(0,s.schemaHasRulesButRef)(r,this.RULES)){const e=(0,a.resolveUrl)(this.opts.uriResolver,t,r.$ref);o=h.call(this,n,e)}const{schemaId:u}=this.opts;return o=o||new c({schema:r,schemaId:u,root:n,baseId:t}),o.schema!==o.root.schema?o:void 0}},5247:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i={data:new n.Name("data"),valCxt:new n.Name("valCxt"),instancePath:new n.Name("instancePath"),parentData:new n.Name("parentData"),parentDataProperty:new n.Name("parentDataProperty"),rootData:new n.Name("rootData"),dynamicAnchors:new n.Name("dynamicAnchors"),vErrors:new n.Name("vErrors"),errors:new n.Name("errors"),this:new n.Name("this"),self:new n.Name("self"),scope:new n.Name("scope"),json:new n.Name("json"),jsonPos:new n.Name("jsonPos"),jsonLen:new n.Name("jsonLen"),jsonPart:new n.Name("jsonPart")};t.default=i},1578:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(6696);class i extends Error{constructor(e,t,r,i){super(i||`can't resolve reference ${r} from id ${t}`),this.missingRef=(0,n.resolveUrl)(e,t,r),this.missingSchema=(0,n.normalizeId)((0,n.getFullPath)(e,this.missingRef))}}t.default=i},6696:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSchemaRefs=t.resolveUrl=t.normalizeId=t._getFullPath=t.getFullPath=t.inlineRef=void 0;const n=r(8936),i=r(6471),o=r(8682),a=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);t.inlineRef=function(e,t=!0){return"boolean"==typeof e||(!0===t?!u(e):!!t&&c(e)<=t)};const s=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function u(e){for(const t in e){if(s.has(t))return!0;const r=e[t];if(Array.isArray(r)&&r.some(u))return!0;if("object"==typeof r&&u(r))return!0}return!1}function c(e){let t=0;for(const r in e){if("$ref"===r)return 1/0;if(t++,!a.has(r)&&("object"==typeof e[r]&&(0,n.eachItem)(e[r],(e=>t+=c(e))),t===1/0))return 1/0}return t}function l(e,t="",r){!1!==r&&(t=d(t));const n=e.parse(t);return f(e,n)}function f(e,t){return e.serialize(t).split("#")[0]+"#"}t.getFullPath=l,t._getFullPath=f;const p=/#\/?$/;function d(e){return e?e.replace(p,""):""}t.normalizeId=d,t.resolveUrl=function(e,t,r){return r=d(r),e.resolve(t,r)};const h=/^[a-z_][-a-z0-9._]*$/i;t.getSchemaRefs=function(e,t){if("boolean"==typeof e)return{};const{schemaId:r,uriResolver:n}=this.opts,a=d(e[r]||t),s={"":a},u=l(n,a,!1),c={},f=new Set;return o(e,{allKeys:!0},((e,t,n,i)=>{if(void 0===i)return;const o=u+t;let a=s[i];function l(t){const r=this.opts.uriResolver.resolve;if(t=d(a?r(a,t):t),f.has(t))throw y(t);f.add(t);let n=this.refs[t];return"string"==typeof n&&(n=this.refs[n]),"object"==typeof n?p(e,n.schema,t):t!==d(o)&&("#"===t[0]?(p(e,c[t],t),c[t]=e):this.refs[t]=o),t}function v(e){if("string"==typeof e){if(!h.test(e))throw new Error(`invalid anchor "${e}"`);l.call(this,`#${e}`)}}"string"==typeof e[r]&&(a=l.call(this,e[r])),v.call(this,e.$anchor),v.call(this,e.$dynamicAnchor),s[t]=a})),c;function p(e,t,r){if(void 0!==t&&!i(e,t))throw y(r)}function y(e){return new Error(`reference "${e}" resolves to more than one schema`)}}},2881:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRules=t.isJSONType=void 0;const r=new Set(["string","number","integer","boolean","null","object","array"]);t.isJSONType=function(e){return"string"==typeof e&&r.has(e)},t.getRules=function(){const e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}},8936:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkStrictMode=t.getErrorPath=t.Type=t.useFunc=t.setEvaluated=t.evaluatedPropsToName=t.mergeEvaluated=t.eachItem=t.unescapeJsonPointer=t.escapeJsonPointer=t.escapeFragment=t.unescapeFragment=t.schemaRefOrVal=t.schemaHasRulesButRef=t.schemaHasRules=t.checkUnknownRules=t.alwaysValidSchema=t.toHash=void 0;const n=r(5669),i=r(6545);function o(e,t=e.schema){const{opts:r,self:n}=e;if(!r.strictSchema)return;if("boolean"==typeof t)return;const i=n.RULES.keywords;for(const r in t)i[r]||h(e,`unknown keyword: "${r}"`)}function a(e,t){if("boolean"==typeof e)return!e;for(const r in e)if(t[r])return!0;return!1}function s(e){return"number"==typeof e?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}function u(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function c({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:i}){return(o,a,s,u)=>{const c=void 0===s?a:s instanceof n.Name?(a instanceof n.Name?e(o,a,s):t(o,a,s),s):a instanceof n.Name?(t(o,s,a),a):r(a,s);return u!==n.Name||c instanceof n.Name?c:i(o,c)}}function l(e,t){if(!0===t)return e.var("props",!0);const r=e.var("props",n._`{}`);return void 0!==t&&f(e,r,t),r}function f(e,t,r){Object.keys(r).forEach((r=>e.assign(n._`${t}${(0,n.getProperty)(r)}`,!0)))}t.toHash=function(e){const t={};for(const r of e)t[r]=!0;return t},t.alwaysValidSchema=function(e,t){return"boolean"==typeof t?t:0===Object.keys(t).length||(o(e,t),!a(t,e.self.RULES.all))},t.checkUnknownRules=o,t.schemaHasRules=a,t.schemaHasRulesButRef=function(e,t){if("boolean"==typeof e)return!e;for(const r in e)if("$ref"!==r&&t.all[r])return!0;return!1},t.schemaRefOrVal=function({topSchemaRef:e,schemaPath:t},r,i,o){if(!o){if("number"==typeof r||"boolean"==typeof r)return r;if("string"==typeof r)return n._`${r}`}return n._`${e}${t}${(0,n.getProperty)(i)}`},t.unescapeFragment=function(e){return u(decodeURIComponent(e))},t.escapeFragment=function(e){return encodeURIComponent(s(e))},t.escapeJsonPointer=s,t.unescapeJsonPointer=u,t.eachItem=function(e,t){if(Array.isArray(e))for(const r of e)t(r);else t(e)},t.mergeEvaluated={props:c({mergeNames:(e,t,r)=>e.if(n._`${r} !== true && ${t} !== undefined`,(()=>{e.if(n._`${t} === true`,(()=>e.assign(r,!0)),(()=>e.assign(r,n._`${r} || {}`).code(n._`Object.assign(${r}, ${t})`)))})),mergeToName:(e,t,r)=>e.if(n._`${r} !== true`,(()=>{!0===t?e.assign(r,!0):(e.assign(r,n._`${r} || {}`),f(e,r,t))})),mergeValues:(e,t)=>!0===e||{...e,...t},resultToName:l}),items:c({mergeNames:(e,t,r)=>e.if(n._`${r} !== true && ${t} !== undefined`,(()=>e.assign(r,n._`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`))),mergeToName:(e,t,r)=>e.if(n._`${r} !== true`,(()=>e.assign(r,!0===t||n._`${r} > ${t} ? ${r} : ${t}`))),mergeValues:(e,t)=>!0===e||Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})},t.evaluatedPropsToName=l,t.setEvaluated=f;const p={};var d;function h(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,!0===r)throw new Error(t);e.self.logger.warn(t)}}t.useFunc=function(e,t){return e.scopeValue("func",{ref:t,code:p[t.code]||(p[t.code]=new i._Code(t.code))})},function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"}(d=t.Type||(t.Type={})),t.getErrorPath=function(e,t,r){if(e instanceof n.Name){const i=t===d.Num;return r?i?n._`"[" + ${e} + "]"`:n._`"['" + ${e} + "']"`:i?n._`"/" + ${e}`:n._`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,n.getProperty)(e).toString():"/"+s(e)},t.checkStrictMode=h},9073:(e,t)=>{"use strict";function r(e,t){return t.rules.some((t=>n(e,t)))}function n(e,t){var r;return void 0!==e[t.keyword]||(null===(r=t.definition.implements)||void 0===r?void 0:r.some((t=>void 0!==e[t])))}Object.defineProperty(t,"__esModule",{value:!0}),t.shouldUseRule=t.shouldUseGroup=t.schemaHasRulesForType=void 0,t.schemaHasRulesForType=function({schema:e,self:t},n){const i=t.RULES.types[n];return i&&!0!==i&&r(e,i)},t.shouldUseGroup=r,t.shouldUseRule=n},2171:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.boolOrEmptySchema=t.topBoolOrEmptySchema=void 0;const n=r(6930),i=r(5669),o=r(5247),a={message:"boolean schema is false"};function s(e,t){const{gen:r,data:i}=e,o={gen:r,keyword:"false schema",data:i,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,n.reportError)(o,a,void 0,t)}t.topBoolOrEmptySchema=function(e){const{gen:t,schema:r,validateName:n}=e;!1===r?s(e,!1):"object"==typeof r&&!0===r.$async?t.return(o.default.data):(t.assign(i._`${n}.errors`,null),t.return(!0))},t.boolOrEmptySchema=function(e,t){const{gen:r,schema:n}=e;!1===n?(r.var(t,!1),s(e)):r.var(t,!0)}},7332:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reportTypeError=t.checkDataTypes=t.checkDataType=t.coerceAndCheckDataType=t.getJSONTypes=t.getSchemaTypes=t.DataType=void 0;const n=r(2881),i=r(9073),o=r(6930),a=r(5669),s=r(8936);var u;function c(e){const t=Array.isArray(e)?e:e?[e]:[];if(t.every(n.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}!function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"}(u=t.DataType||(t.DataType={})),t.getSchemaTypes=function(e){const t=c(e.type);if(t.includes("null")){if(!1===e.nullable)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&void 0!==e.nullable)throw new Error('"nullable" cannot be used without "type"');!0===e.nullable&&t.push("null")}return t},t.getJSONTypes=c,t.coerceAndCheckDataType=function(e,t){const{gen:r,data:n,opts:o}=e,s=function(e,t){return t?e.filter((e=>l.has(e)||"array"===t&&"array"===e)):[]}(t,o.coerceTypes),c=t.length>0&&!(0===s.length&&1===t.length&&(0,i.schemaHasRulesForType)(e,t[0]));if(c){const i=p(t,n,o.strictNumbers,u.Wrong);r.if(i,(()=>{s.length?function(e,t,r){const{gen:n,data:i,opts:o}=e,s=n.let("dataType",a._`typeof ${i}`),u=n.let("coerced",a._`undefined`);"array"===o.coerceTypes&&n.if(a._`${s} == 'object' && Array.isArray(${i}) && ${i}.length == 1`,(()=>n.assign(i,a._`${i}[0]`).assign(s,a._`typeof ${i}`).if(p(t,i,o.strictNumbers),(()=>n.assign(u,i))))),n.if(a._`${u} !== undefined`);for(const e of r)(l.has(e)||"array"===e&&"array"===o.coerceTypes)&&c(e);function c(e){switch(e){case"string":return void n.elseIf(a._`${s} == "number" || ${s} == "boolean"`).assign(u,a._`"" + ${i}`).elseIf(a._`${i} === null`).assign(u,a._`""`);case"number":return void n.elseIf(a._`${s} == "boolean" || ${i} === null
|
|
3
|
-
|| (${
|
|
4
|
-
|| (${
|
|
5
|
-
|| ${s} === "boolean" || ${i} === null`).assign(u,a._`[${i}]`)}}n.else(),h(e),n.endIf(),n.if(a._`${u} !== undefined`,(()=>{n.assign(i,u),function({gen:e,parentData:t,parentDataProperty:r},n){e.if(a._`${t} !== undefined`,(()=>e.assign(a._`${t}[${r}]`,n)))}(e,u)}))}(e,t,s):h(e)}))}return c};const l=new Set(["string","number","integer","boolean","null"]);function f(e,t,r,n=u.Correct){const i=n===u.Correct?a.operators.EQ:a.operators.NEQ;let o;switch(e){case"null":return a._`${t} ${i} null`;case"array":o=a._`Array.isArray(${t})`;break;case"object":o=a._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":o=s(a._`!(${t} % 1) && !isNaN(${t})`);break;case"number":o=s();break;default:return a._`typeof ${t} ${i} ${e}`}return n===u.Correct?o:(0,a.not)(o);function s(e=a.nil){return(0,a.and)(a._`typeof ${t} == "number"`,e,r?a._`isFinite(${t})`:a.nil)}}function p(e,t,r,n){if(1===e.length)return f(e[0],t,r,n);let i;const o=(0,s.toHash)(e);if(o.array&&o.object){const e=a._`typeof ${t} != "object"`;i=o.null?e:a._`!${t} || ${e}`,delete o.null,delete o.array,delete o.object}else i=a.nil;o.number&&delete o.integer;for(const e in o)i=(0,a.and)(i,f(e,t,r,n));return i}t.checkDataType=f,t.checkDataTypes=p;const d={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?a._`{type: ${e}}`:a._`{type: ${t}}`};function h(e){const t=function(e){const{gen:t,data:r,schema:n}=e,i=(0,s.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:e}}(e);(0,o.reportError)(t,d)}t.reportTypeError=h},1481:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assignDefaults=void 0;const n=r(5669),i=r(8936);function o(e,t,r){const{gen:o,compositeRule:a,data:s,opts:u}=e;if(void 0===r)return;const c=n._`${s}${(0,n.getProperty)(t)}`;if(a)return void(0,i.checkStrictMode)(e,`default is ignored for: ${c}`);let l=n._`${c} === undefined`;"empty"===u.useDefaults&&(l=n._`${l} || ${c} === null || ${c} === ""`),o.if(l,n._`${c} = ${(0,n.stringify)(r)}`)}t.assignDefaults=function(e,t){const{properties:r,items:n}=e.schema;if("object"===t&&r)for(const t in r)o(e,t,r[t].default);else"array"===t&&Array.isArray(n)&&n.forEach(((t,r)=>o(e,r,t.default)))}},1686:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;const n=r(2171),i=r(7332),o=r(9073),a=r(7332),s=r(1481),u=r(5782),c=r(8878),l=r(5669),f=r(5247),p=r(6696),d=r(8936),h=r(6930);function y({gen:e,validateName:t,schema:r,schemaEnv:n,opts:i},o){i.code.es5?e.func(t,l._`${f.default.data}, ${f.default.valCxt}`,n.$async,(()=>{e.code(l._`"use strict"; ${v(r,i)}`),function(e,t){e.if(f.default.valCxt,(()=>{e.var(f.default.instancePath,l._`${f.default.valCxt}.${f.default.instancePath}`),e.var(f.default.parentData,l._`${f.default.valCxt}.${f.default.parentData}`),e.var(f.default.parentDataProperty,l._`${f.default.valCxt}.${f.default.parentDataProperty}`),e.var(f.default.rootData,l._`${f.default.valCxt}.${f.default.rootData}`),t.dynamicRef&&e.var(f.default.dynamicAnchors,l._`${f.default.valCxt}.${f.default.dynamicAnchors}`)}),(()=>{e.var(f.default.instancePath,l._`""`),e.var(f.default.parentData,l._`undefined`),e.var(f.default.parentDataProperty,l._`undefined`),e.var(f.default.rootData,f.default.data),t.dynamicRef&&e.var(f.default.dynamicAnchors,l._`{}`)}))}(e,i),e.code(o)})):e.func(t,l._`${f.default.data}, ${function(e){return l._`{${f.default.instancePath}="", ${f.default.parentData}, ${f.default.parentDataProperty}, ${f.default.rootData}=${f.default.data}${e.dynamicRef?l._`, ${f.default.dynamicAnchors}={}`:l.nil}}={}`}(i)}`,n.$async,(()=>e.code(v(r,i)).code(o)))}function v(e,t){const r="object"==typeof e&&e[t.schemaId];return r&&(t.code.source||t.code.process)?l._`/*# sourceURL=${r} */`:l.nil}function m({schema:e,self:t}){if("boolean"==typeof e)return!e;for(const r in e)if(t.RULES.all[r])return!0;return!1}function b(e){return"boolean"!=typeof e.schema}function g(e){(0,d.checkUnknownRules)(e),function(e){const{schema:t,errSchemaPath:r,opts:n,self:i}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,d.schemaHasRulesButRef)(t,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}(e)}function _(e,t){if(e.opts.jtd)return O(e,[],!1,t);const r=(0,i.getSchemaTypes)(e.schema);O(e,r,!(0,i.coerceAndCheckDataType)(e,r),t)}function w({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:i}){const o=r.$comment;if(!0===i.$comment)e.code(l._`${f.default.self}.logger.log(${o})`);else if("function"==typeof i.$comment){const r=l.str`${n}/$comment`,i=e.scopeValue("root",{ref:t.root});e.code(l._`${f.default.self}.opts.$comment(${o}, ${r}, ${i}.schema)`)}}function O(e,t,r,n){const{gen:i,schema:s,data:u,allErrors:c,opts:p,self:h}=e,{RULES:y}=h;function v(d){(0,o.shouldUseGroup)(s,d)&&(d.type?(i.if((0,a.checkDataType)(d.type,u,p.strictNumbers)),S(e,d),1===t.length&&t[0]===d.type&&r&&(i.else(),(0,a.reportTypeError)(e)),i.endIf()):S(e,d),c||i.if(l._`${f.default.errors} === ${n||0}`))}!s.$ref||!p.ignoreKeywordsWithRef&&(0,d.schemaHasRulesButRef)(s,y)?(p.jtd||function(e,t){!e.schemaEnv.meta&&e.opts.strictTypes&&(function(e,t){t.length&&(e.dataTypes.length?(t.forEach((t=>{E(e.dataTypes,t)||T(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)})),function(e,t){const r=[];for(const n of e.dataTypes)E(t,n)?r.push(n):t.includes("integer")&&"number"===n&&r.push("integer");e.dataTypes=r}(e,t)):e.dataTypes=t)}(e,t),e.opts.allowUnionTypes||function(e,t){t.length>1&&(2!==t.length||!t.includes("null"))&&T(e,"use allowUnionTypes to allow union type keyword")}(e,t),function(e,t){const r=e.self.RULES.all;for(const n in r){const i=r[n];if("object"==typeof i&&(0,o.shouldUseRule)(e.schema,i)){const{type:r}=i.definition;r.length&&!r.some((e=>{return n=e,(r=t).includes(n)||"number"===n&&r.includes("integer");var r,n}))&&T(e,`missing type "${r.join(",")}" for keyword "${n}"`)}}}(e,e.dataTypes))}(e,t),i.block((()=>{for(const e of y.rules)v(e);v(y.post)}))):i.block((()=>P(e,"$ref",y.all.$ref.definition)))}function S(e,t){const{gen:r,schema:n,opts:{useDefaults:i}}=e;i&&(0,s.assignDefaults)(e,t.type),r.block((()=>{for(const r of t.rules)(0,o.shouldUseRule)(n,r)&&P(e,r.keyword,r.definition,t.type)}))}function E(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function T(e,t){t+=` at "${e.schemaEnv.baseId+e.errSchemaPath}" (strictTypes)`,(0,d.checkStrictMode)(e,t,e.opts.strictTypes)}t.validateFunctionCode=function(e){b(e)&&(g(e),m(e))?function(e){const{schema:t,opts:r,gen:n}=e;y(e,(()=>{r.$comment&&t.$comment&&w(e),function(e){const{schema:t,opts:r}=e;void 0!==t.default&&r.useDefaults&&r.strictSchema&&(0,d.checkStrictMode)(e,"default is ignored in the schema root")}(e),n.let(f.default.vErrors,null),n.let(f.default.errors,0),r.unevaluated&&function(e){const{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",l._`${r}.evaluated`),t.if(l._`${e.evaluated}.dynamicProps`,(()=>t.assign(l._`${e.evaluated}.props`,l._`undefined`))),t.if(l._`${e.evaluated}.dynamicItems`,(()=>t.assign(l._`${e.evaluated}.items`,l._`undefined`)))}(e),_(e),function(e){const{gen:t,schemaEnv:r,validateName:n,ValidationError:i,opts:o}=e;r.$async?t.if(l._`${f.default.errors} === 0`,(()=>t.return(f.default.data)),(()=>t.throw(l._`new ${i}(${f.default.vErrors})`))):(t.assign(l._`${n}.errors`,f.default.vErrors),o.unevaluated&&function({gen:e,evaluated:t,props:r,items:n}){r instanceof l.Name&&e.assign(l._`${t}.props`,r),n instanceof l.Name&&e.assign(l._`${t}.items`,n)}(e),t.return(l._`${f.default.errors} === 0`))}(e)}))}(e):y(e,(()=>(0,n.topBoolOrEmptySchema)(e)))};class j{constructor(e,t,r){if((0,u.validateKeywordUsage)(e,t,r),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=r,this.data=e.data,this.schema=e.schema[r],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,d.schemaRefOrVal)(e,this.schema,r,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",A(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,u.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw new Error(`${r} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:!1!==t.errors)&&(this.errsCount=e.gen.const("_errs",f.default.errors))}result(e,t,r){this.failResult((0,l.not)(e),t,r)}failResult(e,t,r){this.gen.if(e),r?r():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,l.not)(e),void 0,t)}fail(e){if(void 0===e)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);const{schemaCode:t}=this;this.fail(l._`${t} !== undefined && (${(0,l.or)(this.invalid$data(),e)})`)}error(e,t,r){if(t)return this.setParams(t),this._error(e,r),void this.setParams({});this._error(e,r)}_error(e,t){(e?h.reportExtraError:h.reportError)(this,this.def.error,t)}$dataError(){(0,h.reportError)(this,this.def.$dataError||h.keyword$DataError)}reset(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,h.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,r=l.nil){this.gen.block((()=>{this.check$data(e,r),t()}))}check$data(e=l.nil,t=l.nil){if(!this.$data)return;const{gen:r,schemaCode:n,schemaType:i,def:o}=this;r.if((0,l.or)(l._`${n} === undefined`,t)),e!==l.nil&&r.assign(e,!0),(i.length||o.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),e!==l.nil&&r.assign(e,!1)),r.else()}invalid$data(){const{gen:e,schemaCode:t,schemaType:r,def:n,it:i}=this;return(0,l.or)(function(){if(r.length){if(!(t instanceof l.Name))throw new Error("ajv implementation error");const e=Array.isArray(r)?r:[r];return l._`${(0,a.checkDataTypes)(e,t,i.opts.strictNumbers,a.DataType.Wrong)}`}return l.nil}(),function(){if(n.validateSchema){const r=e.scopeValue("validate$data",{ref:n.validateSchema});return l._`!${r}(${t})`}return l.nil}())}subschema(e,t){const r=(0,c.getSubschema)(this.it,e);(0,c.extendSubschemaData)(r,this.it,e),(0,c.extendSubschemaMode)(r,e);const i={...this.it,...r,items:void 0,props:void 0};return function(e,t){b(e)&&(g(e),m(e))?function(e,t){const{schema:r,gen:n,opts:i}=e;i.$comment&&r.$comment&&w(e),function(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,p.resolveUrl)(e.opts.uriResolver,e.baseId,t))}(e),function(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}(e);const o=n.const("_errs",f.default.errors);_(e,o),n.var(t,l._`${o} === ${f.default.errors}`)}(e,t):(0,n.boolOrEmptySchema)(e,t)}(i,t),i}mergeEvaluated(e,t){const{it:r,gen:n}=this;r.opts.unevaluated&&(!0!==r.props&&void 0!==e.props&&(r.props=d.mergeEvaluated.props(n,e.props,r.props,t)),!0!==r.items&&void 0!==e.items&&(r.items=d.mergeEvaluated.items(n,e.items,r.items,t)))}mergeValidEvaluated(e,t){const{it:r,gen:n}=this;if(r.opts.unevaluated&&(!0!==r.props||!0!==r.items))return n.if(t,(()=>this.mergeEvaluated(e,l.Name))),!0}}function P(e,t,r,n){const i=new j(e,r,t);"code"in r?r.code(i,n):i.$data&&r.validate?(0,u.funcKeywordCode)(i,r):"macro"in r?(0,u.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,u.funcKeywordCode)(i,r)}t.KeywordCxt=j;const I=/^\/(?:[^~]|~0|~1)*$/,x=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function A(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let i,o;if(""===e)return f.default.rootData;if("/"===e[0]){if(!I.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);i=e,o=f.default.rootData}else{const a=x.exec(e);if(!a)throw new Error(`Invalid JSON-pointer: ${e}`);const s=+a[1];if(i=a[2],"#"===i){if(s>=t)throw new Error(u("property/index",s));return n[t-s]}if(s>t)throw new Error(u("data",s));if(o=r[t-s],!i)return o}let a=o;const s=i.split("/");for(const e of s)e&&(o=l._`${o}${(0,l.getProperty)((0,d.unescapeJsonPointer)(e))}`,a=l._`${a} && ${o}`);return a;function u(e,r){return`Cannot access ${e} ${r} levels up, current level is ${t}`}}t.getData=A},5782:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateKeywordUsage=t.validSchemaType=t.funcKeywordCode=t.macroKeywordCode=void 0;const n=r(5669),i=r(5247),o=r(3499),a=r(6930);function s(e){const{gen:t,data:r,it:i}=e;t.if(i.parentData,(()=>t.assign(r,n._`${i.parentData}[${i.parentDataProperty}]`)))}function u(e,t,r){if(void 0===r)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword","function"==typeof r?{ref:r}:{ref:r,code:(0,n.stringify)(r)})}t.macroKeywordCode=function(e,t){const{gen:r,keyword:i,schema:o,parentSchema:a,it:s}=e,c=t.macro.call(s.self,o,a,s),l=u(r,i,c);!1!==s.opts.validateSchema&&s.self.validateSchema(c,!0);const f=r.name("valid");e.subschema({schema:c,schemaPath:n.nil,errSchemaPath:`${s.errSchemaPath}/${i}`,topSchemaRef:l,compositeRule:!0},f),e.pass(f,(()=>e.error(!0)))},t.funcKeywordCode=function(e,t){var r;const{gen:c,keyword:l,schema:f,parentSchema:p,$data:d,it:h}=e;!function({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}(h,t);const y=!d&&t.compile?t.compile.call(h.self,f,p,h):t.validate,v=u(c,l,y),m=c.let("valid");function b(r=(t.async?n._`await `:n.nil)){const a=h.opts.passContext?i.default.this:i.default.self,s=!("compile"in t&&!d||!1===t.schema);c.assign(m,n._`${r}${(0,o.callValidateCode)(e,v,a,s)}`,t.modifying)}function g(e){var r;c.if((0,n.not)(null!==(r=t.valid)&&void 0!==r?r:m),e)}e.block$data(m,(function(){if(!1===t.errors)b(),t.modifying&&s(e),g((()=>e.error()));else{const r=t.async?function(){const e=c.let("ruleErrs",null);return c.try((()=>b(n._`await `)),(t=>c.assign(m,!1).if(n._`${t} instanceof ${h.ValidationError}`,(()=>c.assign(e,n._`${t}.errors`)),(()=>c.throw(t))))),e}():function(){const e=n._`${v}.errors`;return c.assign(e,null),b(n.nil),e}();t.modifying&&s(e),g((()=>function(e,t){const{gen:r}=e;r.if(n._`Array.isArray(${t})`,(()=>{r.assign(i.default.vErrors,n._`${i.default.vErrors} === null ? ${t} : ${i.default.vErrors}.concat(${t})`).assign(i.default.errors,n._`${i.default.vErrors}.length`),(0,a.extendErrors)(e)}),(()=>e.error()))}(e,r)))}})),e.ok(null!==(r=t.valid)&&void 0!==r?r:m)},t.validSchemaType=function(e,t,r=!1){return!t.length||t.some((t=>"array"===t?Array.isArray(e):"object"===t?e&&"object"==typeof e&&!Array.isArray(e):typeof e==t||r&&void 0===e))},t.validateKeywordUsage=function({schema:e,opts:t,self:r,errSchemaPath:n},i,o){if(Array.isArray(i.keyword)?!i.keyword.includes(o):i.keyword!==o)throw new Error("ajv implementation error");const a=i.dependencies;if(null==a?void 0:a.some((t=>!Object.prototype.hasOwnProperty.call(e,t))))throw new Error(`parent schema must have dependencies of ${o}: ${a.join(",")}`);if(i.validateSchema&&!i.validateSchema(e[o])){const e=`keyword "${o}" value is invalid at path "${n}": `+r.errorsText(i.validateSchema.errors);if("log"!==t.validateSchema)throw new Error(e);r.logger.error(e)}}},8878:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0;const n=r(5669),i=r(8936);t.getSubschema=function(e,{keyword:t,schemaProp:r,schema:o,schemaPath:a,errSchemaPath:s,topSchemaRef:u}){if(void 0!==t&&void 0!==o)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==t){const o=e.schema[t];return void 0===r?{schema:o,schemaPath:n._`${e.schemaPath}${(0,n.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:o[r],schemaPath:n._`${e.schemaPath}${(0,n.getProperty)(t)}${(0,n.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,i.escapeFragment)(r)}`}}if(void 0!==o){if(void 0===a||void 0===s||void 0===u)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:o,schemaPath:a,topSchemaRef:u,errSchemaPath:s}}throw new Error('either "keyword" or "schema" must be passed')},t.extendSubschemaData=function(e,t,{dataProp:r,dataPropType:o,data:a,dataTypes:s,propertyName:u}){if(void 0!==a&&void 0!==r)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:c}=t;if(void 0!==r){const{errorPath:a,dataPathArr:s,opts:u}=t;l(c.let("data",n._`${t.data}${(0,n.getProperty)(r)}`,!0)),e.errorPath=n.str`${a}${(0,i.getErrorPath)(r,o,u.jsPropertySyntax)}`,e.parentDataProperty=n._`${r}`,e.dataPathArr=[...s,e.parentDataProperty]}function l(r){e.data=r,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,r]}void 0!==a&&(l(a instanceof n.Name?a:c.let("data",a,!0)),void 0!==u&&(e.propertyName=u)),s&&(e.dataTypes=s)},t.extendSubschemaMode=function(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:i,allErrors:o}){void 0!==n&&(e.compositeRule=n),void 0!==i&&(e.createErrors=i),void 0!==o&&(e.allErrors=o),e.jtdDiscriminator=t,e.jtdMetadata=r}},8355:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var n=r(1686);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return n.KeywordCxt}});var i=r(5669);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return i.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return i.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return i.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return i.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return i.CodeGen}});const o=r(6448),a=r(1578),s=r(2881),u=r(7382),c=r(5669),l=r(6696),f=r(7332),p=r(8936),d=r(1143),h=r(407),y=(e,t)=>new RegExp(e,t);y.code="new RegExp";const v=["removeAdditional","useDefaults","coerceTypes"],m=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),b={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},g={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};function _(e){var t,r,n,i,o,a,s,u,c,l,f,p,d,v,m,b,g,_,w,O,S,E,T,j,P;const I=e.strict,x=null===(t=e.code)||void 0===t?void 0:t.optimize,A=!0===x||void 0===x?1:x||0,N=null!==(n=null===(r=e.code)||void 0===r?void 0:r.regExp)&&void 0!==n?n:y,k=null!==(i=e.uriResolver)&&void 0!==i?i:h.default;return{strictSchema:null===(a=null!==(o=e.strictSchema)&&void 0!==o?o:I)||void 0===a||a,strictNumbers:null===(u=null!==(s=e.strictNumbers)&&void 0!==s?s:I)||void 0===u||u,strictTypes:null!==(l=null!==(c=e.strictTypes)&&void 0!==c?c:I)&&void 0!==l?l:"log",strictTuples:null!==(p=null!==(f=e.strictTuples)&&void 0!==f?f:I)&&void 0!==p?p:"log",strictRequired:null!==(v=null!==(d=e.strictRequired)&&void 0!==d?d:I)&&void 0!==v&&v,code:e.code?{...e.code,optimize:A,regExp:N}:{optimize:A,regExp:N},loopRequired:null!==(m=e.loopRequired)&&void 0!==m?m:200,loopEnum:null!==(b=e.loopEnum)&&void 0!==b?b:200,meta:null===(g=e.meta)||void 0===g||g,messages:null===(_=e.messages)||void 0===_||_,inlineRefs:null===(w=e.inlineRefs)||void 0===w||w,schemaId:null!==(O=e.schemaId)&&void 0!==O?O:"$id",addUsedSchema:null===(S=e.addUsedSchema)||void 0===S||S,validateSchema:null===(E=e.validateSchema)||void 0===E||E,validateFormats:null===(T=e.validateFormats)||void 0===T||T,unicodeRegExp:null===(j=e.unicodeRegExp)||void 0===j||j,int32range:null===(P=e.int32range)||void 0===P||P,uriResolver:k}}class w{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,..._(e)};const{es5:t,lines:r}=this.opts.code;this.scope=new c.ValueScope({scope:{},prefixes:m,es5:t,lines:r}),this.logger=function(e){if(!1===e)return I;if(void 0===e)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}(e.logger);const n=e.validateFormats;e.validateFormats=!1,this.RULES=(0,s.getRules)(),O.call(this,b,e,"NOT SUPPORTED"),O.call(this,g,e,"DEPRECATED","warn"),this._metaOpts=P.call(this),e.formats&&T.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&j.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),E.call(this),e.validateFormats=n}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:e,meta:t,schemaId:r}=this.opts;let n=d;"id"===r&&(n={...d},n.id=n.$id,delete n.$id),t&&e&&this.addMetaSchema(n,n[r],!1)}defaultMeta(){const{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta="object"==typeof e?e[t]||e:void 0}validate(e,t){let r;if("string"==typeof e){if(r=this.getSchema(e),!r)throw new Error(`no schema with key or ref "${e}"`)}else r=this.compile(e);const n=r(t);return"$async"in r||(this.errors=r.errors),n}compile(e,t){const r=this._addSchema(e,t);return r.validate||this._compileSchemaEnv(r)}compileAsync(e,t){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");const{loadSchema:r}=this.opts;return n.call(this,e,t);async function n(e,t){await i.call(this,e.$schema);const r=this._addSchema(e,t);return r.validate||o.call(this,r)}async function i(e){e&&!this.getSchema(e)&&await n.call(this,{$ref:e},!0)}async function o(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof a.default))throw t;return s.call(this,t),await u.call(this,t.missingSchema),o.call(this,e)}}function s({missingSchema:e,missingRef:t}){if(this.refs[e])throw new Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function u(e){const r=await c.call(this,e);this.refs[e]||await i.call(this,r.$schema),this.refs[e]||this.addSchema(r,e,t)}async function c(e){const t=this._loading[e];if(t)return t;try{return await(this._loading[e]=r(e))}finally{delete this._loading[e]}}}addSchema(e,t,r,n=this.opts.validateSchema){if(Array.isArray(e)){for(const t of e)this.addSchema(t,void 0,r,n);return this}let i;if("object"==typeof e){const{schemaId:t}=this.opts;if(i=e[t],void 0!==i&&"string"!=typeof i)throw new Error(`schema ${t} must be string`)}return t=(0,l.normalizeId)(t||i),this._checkUnique(t),this.schemas[t]=this._addSchema(e,r,t,n,!0),this}addMetaSchema(e,t,r=this.opts.validateSchema){return this.addSchema(e,t,!0,r),this}validateSchema(e,t){if("boolean"==typeof e)return!0;let r;if(r=e.$schema,void 0!==r&&"string"!=typeof r)throw new Error("$schema must be a string");if(r=r||this.opts.defaultMeta||this.defaultMeta(),!r)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const n=this.validate(r,e);if(!n&&t){const e="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(e);this.logger.error(e)}return n}getSchema(e){let t;for(;"string"==typeof(t=S.call(this,e));)e=t;if(void 0===t){const{schemaId:r}=this.opts,n=new u.SchemaEnv({schema:{},schemaId:r});if(t=u.resolveSchema.call(this,n,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const t=S.call(this,e);return"object"==typeof t&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{const t=e;this._cache.delete(t);let r=e[this.opts.schemaId];return r&&(r=(0,l.normalizeId)(r),delete this.schemas[r],delete this.refs[r]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(const t of e)this.addKeyword(t);return this}addKeyword(e,t){let r;if("string"==typeof e)r=e,"object"==typeof t&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=r);else{if("object"!=typeof e||void 0!==t)throw new Error("invalid addKeywords parameters");if(r=(t=e).keyword,Array.isArray(r)&&!r.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(A.call(this,r,t),!t)return(0,p.eachItem)(r,(e=>N.call(this,e))),this;M.call(this,t);const n={...t,type:(0,f.getJSONTypes)(t.type),schemaType:(0,f.getJSONTypes)(t.schemaType)};return(0,p.eachItem)(r,0===n.type.length?e=>N.call(this,e,n):e=>n.type.forEach((t=>N.call(this,e,n,t)))),this}getKeyword(e){const t=this.RULES.all[e];return"object"==typeof t?t.definition:!!t}removeKeyword(e){const{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(const r of t.rules){const t=r.rules.findIndex((t=>t.keyword===e));t>=0&&r.rules.splice(t,1)}return this}addFormat(e,t){return"string"==typeof t&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:r="data"}={}){return e&&0!==e.length?e.map((e=>`${r}${e.instancePath} ${e.message}`)).reduce(((e,r)=>e+t+r)):"No errors"}$dataMetaSchema(e,t){const r=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(const n of t){const t=n.split("/").slice(1);let i=e;for(const e of t)i=i[e];for(const e in r){const t=r[e];if("object"!=typeof t)continue;const{$data:n}=t.definition,o=i[e];n&&o&&(i[e]=R(o))}}return e}_removeAllSchemas(e,t){for(const r in e){const n=e[r];t&&!t.test(r)||("string"==typeof n?delete e[r]:n&&!n.meta&&(this._cache.delete(n.schema),delete e[r]))}}_addSchema(e,t,r,n=this.opts.validateSchema,i=this.opts.addUsedSchema){let o;const{schemaId:a}=this.opts;if("object"==typeof e)o=e[a];else{if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof e)throw new Error("schema must be object or boolean")}let s=this._cache.get(e);if(void 0!==s)return s;r=(0,l.normalizeId)(o||r);const c=l.getSchemaRefs.call(this,e,r);return s=new u.SchemaEnv({schema:e,schemaId:a,meta:t,baseId:r,localRefs:c}),this._cache.set(s.schema,s),i&&!r.startsWith("#")&&(r&&this._checkUnique(r),this.refs[r]=s),n&&this.validateSchema(e,!0),s}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):u.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){const t=this.opts;this.opts=this._metaOpts;try{u.compileSchema.call(this,e)}finally{this.opts=t}}}function O(e,t,r,n="error"){for(const i in e){const o=i;o in t&&this.logger[n](`${r}: option ${i}. ${e[o]}`)}}function S(e){return e=(0,l.normalizeId)(e),this.schemas[e]||this.refs[e]}function E(){const e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(const t in e)this.addSchema(e[t],t)}function T(){for(const e in this.opts.formats){const t=this.opts.formats[e];t&&this.addFormat(e,t)}}function j(e){if(Array.isArray(e))this.addVocabulary(e);else{this.logger.warn("keywords option as map is deprecated, pass array");for(const t in e){const r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}}function P(){const e={...this.opts};for(const t of v)delete e[t];return e}t.default=w,w.ValidationError=o.default,w.MissingRefError=a.default;const I={log(){},warn(){},error(){}},x=/^[a-z_$][a-z0-9_$:-]*$/i;function A(e,t){const{RULES:r}=this;if((0,p.eachItem)(e,(e=>{if(r.keywords[e])throw new Error(`Keyword ${e} is already defined`);if(!x.test(e))throw new Error(`Keyword ${e} has invalid name`)})),t&&t.$data&&!("code"in t)&&!("validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function N(e,t,r){var n;const i=null==t?void 0:t.post;if(r&&i)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:o}=this;let a=i?o.post:o.rules.find((({type:e})=>e===r));if(a||(a={type:r,rules:[]},o.rules.push(a)),o.keywords[e]=!0,!t)return;const s={keyword:e,definition:{...t,type:(0,f.getJSONTypes)(t.type),schemaType:(0,f.getJSONTypes)(t.schemaType)}};t.before?k.call(this,a,s,t.before):a.rules.push(s),o.all[e]=s,null===(n=t.implements)||void 0===n||n.forEach((e=>this.addKeyword(e)))}function k(e,t,r){const n=e.rules.findIndex((e=>e.keyword===r));n>=0?e.rules.splice(n,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function M(e){let{metaSchema:t}=e;void 0!==t&&(e.$data&&this.opts.$data&&(t=R(t)),e.validateSchema=this.compile(t,!0))}const D={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function R(e){return{anyOf:[e,D]}}},4285:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(6471);n.code='require("ajv/dist/runtime/equal").default',t.default=n},9161:(e,t)=>{"use strict";function r(e){const t=e.length;let r,n=0,i=0;for(;i<t;)n++,r=e.charCodeAt(i++),r>=55296&&r<=56319&&i<t&&(r=e.charCodeAt(i),56320==(64512&r)&&i++);return n}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r,r.code='require("ajv/dist/runtime/ucs2length").default'},407:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(2371);n.code='require("ajv/dist/runtime/uri").default',t.default=n},6448:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}t.default=r},8891:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateAdditionalItems=void 0;const n=r(5669),i=r(8936),o={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:e}})=>n.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>n._`{limit: ${e}}`},code(e){const{parentSchema:t,it:r}=e,{items:n}=t;Array.isArray(n)?a(e,n):(0,i.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas')}};function a(e,t){const{gen:r,schema:o,data:a,keyword:s,it:u}=e;u.items=!0;const c=r.const("len",n._`${a}.length`);if(!1===o)e.setParams({len:t.length}),e.pass(n._`${c} <= ${t.length}`);else if("object"==typeof o&&!(0,i.alwaysValidSchema)(u,o)){const o=r.var("valid",n._`${c} <= ${t.length}`);r.if((0,n.not)(o),(()=>function(o){r.forRange("i",t.length,c,(t=>{e.subschema({keyword:s,dataProp:t,dataPropType:i.Type.Num},o),u.allErrors||r.if((0,n.not)(o),(()=>r.break()))}))}(o))),e.ok(o)}}t.validateAdditionalItems=a,t.default=o},4943:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(3499),i=r(5669),o=r(5247),a=r(8936),s={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>i._`{additionalProperty: ${e.additionalProperty}}`},code(e){const{gen:t,schema:r,parentSchema:s,data:u,errsCount:c,it:l}=e;if(!c)throw new Error("ajv implementation error");const{allErrors:f,opts:p}=l;if(l.props=!0,"all"!==p.removeAdditional&&(0,a.alwaysValidSchema)(l,r))return;const d=(0,n.allSchemaProperties)(s.properties),h=(0,n.allSchemaProperties)(s.patternProperties);function y(e){t.code(i._`delete ${u}[${e}]`)}function v(n){if("all"===p.removeAdditional||p.removeAdditional&&!1===r)y(n);else{if(!1===r)return e.setParams({additionalProperty:n}),e.error(),void(f||t.break());if("object"==typeof r&&!(0,a.alwaysValidSchema)(l,r)){const r=t.name("valid");"failing"===p.removeAdditional?(m(n,r,!1),t.if((0,i.not)(r),(()=>{e.reset(),y(n)}))):(m(n,r),f||t.if((0,i.not)(r),(()=>t.break())))}}}function m(t,r,n){const i={keyword:"additionalProperties",dataProp:t,dataPropType:a.Type.Str};!1===n&&Object.assign(i,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(i,r)}t.forIn("key",u,(r=>{d.length||h.length?t.if(function(r){let o;if(d.length>8){const e=(0,a.schemaRefOrVal)(l,s.properties,"properties");o=(0,n.isOwnProperty)(t,e,r)}else o=d.length?(0,i.or)(...d.map((e=>i._`${r} === ${e}`))):i.nil;return h.length&&(o=(0,i.or)(o,...h.map((t=>i._`${(0,n.usePattern)(e,t)}.test(${r})`)))),(0,i.not)(o)}(r),(()=>v(r))):v(r)})),e.ok(i._`${c} === ${o.default.errors}`)}};t.default=s},2609:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(8936),i={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:r,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");const o=t.name("valid");r.forEach(((t,r)=>{if((0,n.alwaysValidSchema)(i,t))return;const a=e.subschema({keyword:"allOf",schemaProp:r},o);e.ok(o),e.mergeEvaluated(a)}))}};t.default=i},4279:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:r(3499).validateUnion,error:{message:"must match a schema in anyOf"}};t.default=n},5609:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i=r(8936),o={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:e,max:t}})=>void 0===t?n.str`must contain at least ${e} valid item(s)`:n.str`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>void 0===t?n._`{minContains: ${e}}`:n._`{minContains: ${e}, maxContains: ${t}}`},code(e){const{gen:t,schema:r,parentSchema:o,data:a,it:s}=e;let u,c;const{minContains:l,maxContains:f}=o;s.opts.next?(u=void 0===l?1:l,c=f):u=1;const p=t.const("len",n._`${a}.length`);if(e.setParams({min:u,max:c}),void 0===c&&0===u)return void(0,i.checkStrictMode)(s,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==c&&u>c)return(0,i.checkStrictMode)(s,'"minContains" > "maxContains" is always invalid'),void e.fail();if((0,i.alwaysValidSchema)(s,r)){let t=n._`${p} >= ${u}`;return void 0!==c&&(t=n._`${t} && ${p} <= ${c}`),void e.pass(t)}s.items=!0;const d=t.name("valid");function h(){const e=t.name("_valid"),r=t.let("count",0);y(e,(()=>t.if(e,(()=>function(e){t.code(n._`${e}++`),void 0===c?t.if(n._`${e} >= ${u}`,(()=>t.assign(d,!0).break())):(t.if(n._`${e} > ${c}`,(()=>t.assign(d,!1).break())),1===u?t.assign(d,!0):t.if(n._`${e} >= ${u}`,(()=>t.assign(d,!0))))}(r)))))}function y(r,n){t.forRange("i",0,p,(t=>{e.subschema({keyword:"contains",dataProp:t,dataPropType:i.Type.Num,compositeRule:!0},r),n()}))}void 0===c&&1===u?y(d,(()=>t.if(d,(()=>t.break())))):0===u?(t.let(d,!0),void 0!==c&&t.if(n._`${a}.length > 0`,h)):(t.let(d,!1),h()),e.result(d,(()=>e.reset()))}};t.default=o},5747:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const n=r(5669),i=r(8936),o=r(3499);t.error={message:({params:{property:e,depsCount:t,deps:r}})=>{const i=1===t?"property":"properties";return n.str`must have ${i} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:i}})=>n._`{property: ${e},
|
|
2
|
+
(()=>{var e={8278:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3910:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0});const o=r(8599);t.default=o.PromisePool,i(r(8278),t),i(r(8599),t),i(r(5607),t),i(r(6784),t),i(r(9446),t),i(r(4204),t)},5607:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PromisePoolError=void 0;class r extends Error{constructor(e,t){super(),this.raw=e,this.item=t,this.name=this.constructor.name,this.message=this.messageFrom(e),Error.captureStackTrace(this,this.constructor)}static createFrom(e,t){return new this(e,t)}messageFrom(e){return e instanceof Error||"object"==typeof e?e.message:"string"==typeof e||"number"==typeof e?e.toString():""}}t.PromisePoolError=r},4027:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PromisePoolExecutor=void 0;const n=r(8599),i=r(5607),o=r(9446),s=r(4204);t.PromisePoolExecutor=class{constructor(){this.meta={tasks:[],items:[],errors:[],results:[],stopped:!1,concurrency:10,shouldResultsCorrespond:!1,processedItems:[],taskTimeout:0},this.handler=()=>{},this.errorHandler=void 0,this.onTaskStartedHandlers=[],this.onTaskFinishedHandlers=[]}useConcurrency(e){if(!this.isValidConcurrency(e))throw s.ValidationError.createFrom(`"concurrency" must be a number, 1 or up. Received "${e}" (${typeof e})`);return this.meta.concurrency=e,this}isValidConcurrency(e){return"number"==typeof e&&e>=1}withTaskTimeout(e){return this.meta.taskTimeout=e,this}concurrency(){return this.meta.concurrency}useCorrespondingResults(e){return this.meta.shouldResultsCorrespond=e,this}shouldUseCorrespondingResults(){return this.meta.shouldResultsCorrespond}taskTimeout(){return this.meta.taskTimeout}for(e){return this.meta.items=e,this}items(){return this.meta.items}itemsCount(){return this.items().length}tasks(){return this.meta.tasks}activeTaskCount(){return this.activeTasksCount()}activeTasksCount(){return this.tasks().length}processedItems(){return this.meta.processedItems}processedCount(){return this.processedItems().length}processedPercentage(){return this.processedCount()/this.itemsCount()*100}results(){return this.meta.results}errors(){return this.meta.errors}withHandler(e){return this.handler=e,this}hasErrorHandler(){return!!this.errorHandler}handleError(e){return this.errorHandler=e,this}onTaskStarted(e){return this.onTaskStartedHandlers=e,this}onTaskFinished(e){return this.onTaskFinishedHandlers=e,this}hasReachedConcurrencyLimit(){return this.activeTasksCount()>=this.concurrency()}stop(){throw this.markAsStopped(),new o.StopThePromisePoolError}markAsStopped(){return this.meta.stopped=!0,this}isStopped(){return this.meta.stopped}async start(){return await this.validateInputs().prepareResultsArray().process()}validateInputs(){if("function"!=typeof this.handler)throw s.ValidationError.createFrom("The first parameter for the .process(fn) method must be a function");const e=this.taskTimeout();if(!(null==e||"number"==typeof e&&e>=0))throw s.ValidationError.createFrom(`"timeout" must be undefined or a number. A number must be 0 or up. Received "${String(e)}" (${typeof e})`);if(!Array.isArray(this.items()))throw s.ValidationError.createFrom(`"items" must be an array. Received "${typeof this.items()}"`);if(this.errorHandler&&"function"!=typeof this.errorHandler)throw s.ValidationError.createFrom(`The error handler must be a function. Received "${typeof this.errorHandler}"`);return this.onTaskStartedHandlers.forEach((e=>{if(e&&"function"!=typeof e)throw s.ValidationError.createFrom(`The onTaskStarted handler must be a function. Received "${typeof e}"`)})),this.onTaskFinishedHandlers.forEach((e=>{if(e&&"function"!=typeof e)throw s.ValidationError.createFrom(`The error handler must be a function. Received "${typeof e}"`)})),this}prepareResultsArray(){return this.shouldUseCorrespondingResults()&&(this.meta.results=Array(this.items().length).fill(n.PromisePool.notRun)),this}async process(){for(const[e,t]of this.items().entries()){if(this.isStopped())break;await this.waitForProcessingSlot(),this.startProcessing(t,e)}return await this.drained()}async waitForProcessingSlot(){for(;this.hasReachedConcurrencyLimit();)await this.waitForActiveTaskToFinish()}async waitForActiveTaskToFinish(){await Promise.race(this.tasks())}startProcessing(e,t){const r=this.createTaskFor(e,t).then((e=>{this.save(e,t).removeActive(r)})).catch((async n=>{await this.handleErrorFor(n,e,t),this.removeActive(r)})).finally((()=>{this.processedItems().push(e),this.runOnTaskFinishedHandlers(e)}));this.tasks().push(r),this.runOnTaskStartedHandlers(e)}async createTaskFor(e,t){return void 0===this.taskTimeout()?this.handler(e,t,this):Promise.race([this.handler(e,t,this),this.createTaskTimeout(e)])}async createTaskTimeout(e){return new Promise(((t,r)=>{setTimeout((()=>{r(new i.PromisePoolError(`Promise in pool timed out after ${this.taskTimeout()}ms`,e))}),this.taskTimeout())}))}save(e,t){return this.shouldUseCorrespondingResults()?this.results()[t]=e:this.results().push(e),this}removeActive(e){return this.tasks().splice(this.tasks().indexOf(e),1),this}async handleErrorFor(e,t,r){if(this.shouldUseCorrespondingResults()&&(this.results()[r]=n.PromisePool.failed),!this.isStoppingThePoolError(e)){if(this.isValidationError(e))throw this.markAsStopped(),e;this.hasErrorHandler()?await this.runErrorHandlerFor(e,t):this.saveErrorFor(e,t)}}isStoppingThePoolError(e){return e instanceof o.StopThePromisePoolError}isValidationError(e){return e instanceof s.ValidationError}async runErrorHandlerFor(e,t){var r;try{await(null===(r=this.errorHandler)||void 0===r?void 0:r.call(this,e,t,this))}catch(e){this.rethrowIfNotStoppingThePool(e)}}runOnTaskStartedHandlers(e){this.onTaskStartedHandlers.forEach((t=>{t(e,this)}))}runOnTaskFinishedHandlers(e){this.onTaskFinishedHandlers.forEach((t=>{t(e,this)}))}rethrowIfNotStoppingThePool(e){if(!this.isStoppingThePoolError(e))throw e}saveErrorFor(e,t){this.errors().push(i.PromisePoolError.createFrom(e,t))}async drained(){return await this.drainActiveTasks(),{errors:this.errors(),results:this.results()}}async drainActiveTasks(){await Promise.all(this.tasks())}}},8599:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PromisePool=void 0;const n=r(4027);class i{constructor(e){this.timeout=void 0,this.concurrency=10,this.shouldResultsCorrespond=!1,this.items=null!=e?e:[],this.errorHandler=void 0,this.onTaskStartedHandlers=[],this.onTaskFinishedHandlers=[]}withConcurrency(e){return this.concurrency=e,this}static withConcurrency(e){return(new this).withConcurrency(e)}withTaskTimeout(e){return this.timeout=e,this}static withTaskTimeout(e){return(new this).withTaskTimeout(e)}for(e){return"number"==typeof this.timeout?new i(e).withConcurrency(this.concurrency).withTaskTimeout(this.timeout):new i(e).withConcurrency(this.concurrency)}static for(e){return(new this).for(e)}handleError(e){return this.errorHandler=e,this}onTaskStarted(e){return this.onTaskStartedHandlers.push(e),this}onTaskFinished(e){return this.onTaskFinishedHandlers.push(e),this}useCorrespondingResults(){return this.shouldResultsCorrespond=!0,this}async process(e){return(new n.PromisePoolExecutor).useConcurrency(this.concurrency).useCorrespondingResults(this.shouldResultsCorrespond).withTaskTimeout(this.timeout).withHandler(e).handleError(this.errorHandler).onTaskStarted(this.onTaskStartedHandlers).onTaskFinished(this.onTaskFinishedHandlers).for(this.items).start()}}t.PromisePool=i,i.notRun=Symbol("notRun"),i.failed=Symbol("failed")},6784:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9446:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StopThePromisePoolError=void 0;class r extends Error{}t.StopThePromisePoolError=r},4204:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValidationError=void 0;class r extends Error{constructor(e){super(e),Error.captureStackTrace(this,this.constructor)}static createFrom(e){return new this(e)}}t.ValidationError=r},3747:(e,t)=>{"use strict";function r(e,t){return{validate:e,compare:t}}Object.defineProperty(t,"__esModule",{value:!0}),t.formatNames=t.fastFormats=t.fullFormats=void 0,t.fullFormats={date:r(o,s),time:r(u,c),"date-time":r((function(e){const t=e.split(l);return 2===t.length&&o(t[0])&&u(t[1],!0)}),f),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:function(e){return p.test(e)&&d.test(e)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:function(e){if(v.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}},uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:function(e){return h.lastIndex=0,h.test(e)},int32:{type:"number",validate:function(e){return Number.isInteger(e)&&e<=2147483647&&e>=-2147483648}},int64:{type:"number",validate:function(e){return Number.isInteger(e)}},float:{type:"number",validate:y},double:{type:"number",validate:y},password:!0,binary:!0},t.fastFormats={...t.fullFormats,date:r(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,s),time:r(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,c),"date-time":r(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,f),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},t.formatNames=Object.keys(t.fullFormats);const n=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,i=[0,31,28,31,30,31,30,31,31,30,31,30,31];function o(e){const t=n.exec(e);if(!t)return!1;const r=+t[1],o=+t[2],s=+t[3];return o>=1&&o<=12&&s>=1&&s<=(2===o&&function(e){return e%4==0&&(e%100!=0||e%400==0)}(r)?29:i[o])}function s(e,t){if(e&&t)return e>t?1:e<t?-1:0}const a=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function u(e,t){const r=a.exec(e);if(!r)return!1;const n=+r[1],i=+r[2],o=+r[3],s=r[5];return(n<=23&&i<=59&&o<=59||23===n&&59===i&&60===o)&&(!t||""!==s)}function c(e,t){if(!e||!t)return;const r=a.exec(e),n=a.exec(t);return r&&n?(e=r[1]+r[2]+r[3]+(r[4]||""))>(t=n[1]+n[2]+n[3]+(n[4]||""))?1:e<t?-1:0:void 0}const l=/t|\s/i;function f(e,t){if(!e||!t)return;const[r,n]=e.split(l),[i,o]=t.split(l),a=s(r,i);return void 0!==a?a||c(n,o):void 0}const p=/\/|:/,d=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,h=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function y(){return!0}const v=/[^\\]\\Z/},8414:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(3747),i=r(9262),o=r(5669),s=new o.Name("fullFormats"),a=new o.Name("fastFormats"),u=(e,t={keywords:!0})=>{if(Array.isArray(t))return c(e,t,n.fullFormats,s),e;const[r,o]="fast"===t.mode?[n.fastFormats,a]:[n.fullFormats,s];return c(e,t.formats||n.formatNames,r,o),t.keywords&&i.default(e),e};function c(e,t,r,n){var i,s;null!==(i=(s=e.opts.code).formats)&&void 0!==i||(s.formats=o._`require("ajv-formats/dist/formats").${n}`);for(const n of t)e.addFormat(n,r[n])}u.get=(e,t="full")=>{const r=("fast"===t?n.fastFormats:n.fullFormats)[e];if(!r)throw new Error(`Unknown format "${e}"`);return r},e.exports=t=u,Object.defineProperty(t,"__esModule",{value:!0}),t.default=u},9262:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatLimitDefinition=void 0;const n=r(6236),i=r(5669),o=i.operators,s={formatMaximum:{okStr:"<=",ok:o.LTE,fail:o.GT},formatMinimum:{okStr:">=",ok:o.GTE,fail:o.LT},formatExclusiveMaximum:{okStr:"<",ok:o.LT,fail:o.GTE},formatExclusiveMinimum:{okStr:">",ok:o.GT,fail:o.LTE}},a={message:({keyword:e,schemaCode:t})=>i.str`should be ${s[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>i._`{comparison: ${s[e].okStr}, limit: ${t}}`};t.formatLimitDefinition={keyword:Object.keys(s),type:"string",schemaType:"string",$data:!0,error:a,code(e){const{gen:t,data:r,schemaCode:o,keyword:a,it:u}=e,{opts:c,self:l}=u;if(!c.validateFormats)return;const f=new n.KeywordCxt(u,l.RULES.all.format.definition,"format");function p(e){return i._`${e}.compare(${r}, ${o}) ${s[a].fail} 0`}f.$data?function(){const r=t.scopeValue("formats",{ref:l.formats,code:c.code.formats}),n=t.const("fmt",i._`${r}[${f.schemaCode}]`);e.fail$data(i.or(i._`typeof ${n} != "object"`,i._`${n} instanceof RegExp`,i._`typeof ${n}.compare != "function"`,p(n)))}():function(){const r=f.schema,n=l.formats[r];if(!n||!0===n)return;if("object"!=typeof n||n instanceof RegExp||"function"!=typeof n.compare)throw new Error(`"${a}": format "${r}" does not define "compare" function`);const o=t.scopeValue("formats",{key:r,ref:n,code:c.code.formats?i._`${c.code.formats}${i.getProperty(r)}`:void 0});e.fail$data(p(o))}()},dependencies:["format"]},t.default=e=>(e.addKeyword(t.formatLimitDefinition),e)},6236:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;const n=r(8355),i=r(5671),o=r(2),s=r(1512),a=["/properties"],u="http://json-schema.org/draft-07/schema";class c extends n.default{_addVocabularies(){super._addVocabularies(),i.default.forEach((e=>this.addVocabulary(e))),this.opts.discriminator&&this.addKeyword(o.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const e=this.opts.$data?this.$dataMetaSchema(s,a):s;this.addMetaSchema(e,u,!1),this.refs["http://json-schema.org/schema"]=u}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(u)?u:void 0)}}e.exports=t=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var l=r(1686);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return l.KeywordCxt}});var f=r(5669);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return f._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return f.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return f.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return f.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return f.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return f.CodeGen}});var p=r(6448);Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return p.default}});var d=r(1578);Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return d.default}})},6545:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class r{}t._CodeOrName=r,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class n extends r{constructor(e){if(super(),!t.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=n;class i extends r{constructor(e){super(),this._items="string"==typeof e?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const e=this._items[0];return""===e||'""'===e}get str(){var e;return null!==(e=this._str)&&void 0!==e?e:this._str=this._items.reduce(((e,t)=>`${e}${t}`),"")}get names(){var e;return null!==(e=this._names)&&void 0!==e?e:this._names=this._items.reduce(((e,t)=>(t instanceof n&&(e[t.str]=(e[t.str]||0)+1),e)),{})}}function o(e,...t){const r=[e[0]];let n=0;for(;n<t.length;)u(r,t[n]),r.push(e[++n]);return new i(r)}t._Code=i,t.nil=new i(""),t._=o;const s=new i("+");function a(e,...t){const r=[l(e[0])];let n=0;for(;n<t.length;)r.push(s),u(r,t[n]),r.push(s,l(e[++n]));return function(e){let t=1;for(;t<e.length-1;){if(e[t]===s){const r=c(e[t-1],e[t+1]);if(void 0!==r){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}(r),new i(r)}function u(e,t){var r;t instanceof i?e.push(...t._items):t instanceof n?e.push(t):e.push("number"==typeof(r=t)||"boolean"==typeof r||null===r?r:l(Array.isArray(r)?r.join(","):r))}function c(e,t){if('""'===t)return e;if('""'===e)return t;if("string"==typeof e){if(t instanceof n||'"'!==e[e.length-1])return;return"string"!=typeof t?`${e.slice(0,-1)}${t}"`:'"'===t[0]?e.slice(0,-1)+t.slice(1):void 0}return"string"!=typeof t||'"'!==t[0]||e instanceof n?void 0:`"${e}${t.slice(1)}`}function l(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.str=a,t.addCodeArg=u,t.strConcat=function(e,t){return t.emptyStr()?e:e.emptyStr()?t:a`${e}${t}`},t.stringify=function(e){return new i(l(e))},t.safeStringify=l,t.getProperty=function(e){return"string"==typeof e&&t.IDENTIFIER.test(e)?new i(`.${e}`):o`[${e}]`},t.getEsmExportName=function(e){if("string"==typeof e&&t.IDENTIFIER.test(e))return new i(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)},t.regexpCode=function(e){return new i(e.toString())}},5669:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;const n=r(6545),i=r(9187);var o=r(6545);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return o._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return o.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return o.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return o.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return o.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return o.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return o.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return o.Name}});var s=r(9187);Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return s.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return s.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return s.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return s.varKinds}}),t.operators={GT:new n._Code(">"),GTE:new n._Code(">="),LT:new n._Code("<"),LTE:new n._Code("<="),EQ:new n._Code("==="),NEQ:new n._Code("!=="),NOT:new n._Code("!"),OR:new n._Code("||"),AND:new n._Code("&&"),ADD:new n._Code("+")};class a{optimizeNodes(){return this}optimizeNames(e,t){return this}}class u extends a{constructor(e,t,r){super(),this.varKind=e,this.name=t,this.rhs=r}render({es5:e,_n:t}){const r=e?i.varKinds.var:this.varKind,n=void 0===this.rhs?"":` = ${this.rhs}`;return`${r} ${this.name}${n};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=N(this.rhs,e,t)),this}get names(){return this.rhs instanceof n._CodeOrName?this.rhs.names:{}}}class c extends a{constructor(e,t,r){super(),this.lhs=e,this.rhs=t,this.sideEffects=r}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(!(this.lhs instanceof n.Name)||e[this.lhs.str]||this.sideEffects)return this.rhs=N(this.rhs,e,t),this}get names(){return A(this.lhs instanceof n.Name?{}:{...this.lhs.names},this.rhs)}}class l extends c{constructor(e,t,r,n){super(e,r,n),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class f extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class p extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class d extends a{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class h extends a{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=N(this.code,e,t),this}get names(){return this.code instanceof n._CodeOrName?this.code.names:{}}}class y extends a{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce(((t,r)=>t+r.render(e)),"")}optimizeNodes(){const{nodes:e}=this;let t=e.length;for(;t--;){const r=e[t].optimizeNodes();Array.isArray(r)?e.splice(t,1,...r):r?e[t]=r:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){const{nodes:r}=this;let n=r.length;for(;n--;){const i=r[n];i.optimizeNames(e,t)||(k(e,i.names),r.splice(n,1))}return r.length>0?this:void 0}get names(){return this.nodes.reduce(((e,t)=>x(e,t.names)),{})}}class v extends y{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class m extends y{}class b extends v{}b.kind="else";class g extends v{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();const e=this.condition;if(!0===e)return this.nodes;let t=this.else;if(t){const e=t.optimizeNodes();t=this.else=Array.isArray(e)?new b(e):e}return t?!1===e?t instanceof g?t:t.nodes:this.nodes.length?this:new g(M(e),t instanceof g?[t]:t.nodes):!1!==e&&this.nodes.length?this:void 0}optimizeNames(e,t){var r;if(this.else=null===(r=this.else)||void 0===r?void 0:r.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=N(this.condition,e,t),this}get names(){const e=super.names;return A(e,this.condition),this.else&&x(e,this.else.names),e}}g.kind="if";class _ extends v{}_.kind="for";class w extends _{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=N(this.iteration,e,t),this}get names(){return x(super.names,this.iteration.names)}}class O extends _{constructor(e,t,r,n){super(),this.varKind=e,this.name=t,this.from=r,this.to=n}render(e){const t=e.es5?i.varKinds.var:this.varKind,{name:r,from:n,to:o}=this;return`for(${t} ${r}=${n}; ${r}<${o}; ${r}++)`+super.render(e)}get names(){const e=A(super.names,this.from);return A(e,this.to)}}class S extends _{constructor(e,t,r,n){super(),this.loop=e,this.varKind=t,this.name=r,this.iterable=n}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=N(this.iterable,e,t),this}get names(){return x(super.names,this.iterable.names)}}class E extends v{constructor(e,t,r){super(),this.name=e,this.args=t,this.async=r}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}E.kind="func";class T extends y{render(e){return"return "+super.render(e)}}T.kind="return";class j extends v{render(e){let t="try"+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),null===(e=this.catch)||void 0===e||e.optimizeNodes(),null===(t=this.finally)||void 0===t||t.optimizeNodes(),this}optimizeNames(e,t){var r,n;return super.optimizeNames(e,t),null===(r=this.catch)||void 0===r||r.optimizeNames(e,t),null===(n=this.finally)||void 0===n||n.optimizeNames(e,t),this}get names(){const e=super.names;return this.catch&&x(e,this.catch.names),this.finally&&x(e,this.finally.names),e}}class P extends v{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}P.kind="catch";class I extends v{render(e){return"finally"+super.render(e)}}function x(e,t){for(const r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function A(e,t){return t instanceof n._CodeOrName?x(e,t.names):e}function N(e,t,r){return e instanceof n.Name?o(e):(i=e)instanceof n._Code&&i._items.some((e=>e instanceof n.Name&&1===t[e.str]&&void 0!==r[e.str]))?new n._Code(e._items.reduce(((e,t)=>(t instanceof n.Name&&(t=o(t)),t instanceof n._Code?e.push(...t._items):e.push(t),e)),[])):e;var i;function o(e){const n=r[e.str];return void 0===n||1!==t[e.str]?e:(delete t[e.str],n)}}function k(e,t){for(const r in t)e[r]=(e[r]||0)-(t[r]||0)}function M(e){return"boolean"==typeof e||"number"==typeof e||null===e?!e:n._`!${$(e)}`}I.kind="finally",t.CodeGen=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?"\n":""},this._extScope=e,this._scope=new i.Scope({parent:e}),this._nodes=[new m]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){const r=this._extScope.value(e,t);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,r,n){const i=this._scope.toName(t);return void 0!==r&&n&&(this._constants[i.str]=r),this._leafNode(new u(e,i,r)),i}const(e,t,r){return this._def(i.varKinds.const,e,t,r)}let(e,t,r){return this._def(i.varKinds.let,e,t,r)}var(e,t,r){return this._def(i.varKinds.var,e,t,r)}assign(e,t,r){return this._leafNode(new c(e,t,r))}add(e,r){return this._leafNode(new l(e,t.operators.ADD,r))}code(e){return"function"==typeof e?e():e!==n.nil&&this._leafNode(new h(e)),this}object(...e){const t=["{"];for(const[r,i]of e)t.length>1&&t.push(","),t.push(r),(r!==i||this.opts.es5)&&(t.push(":"),(0,n.addCodeArg)(t,i));return t.push("}"),new n._Code(t)}if(e,t,r){if(this._blockNode(new g(e)),t&&r)this.code(t).else().code(r).endIf();else if(t)this.code(t).endIf();else if(r)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new g(e))}else(){return this._elseNode(new b)}endIf(){return this._endBlockNode(g,b)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new w(e),t)}forRange(e,t,r,n,o=(this.opts.es5?i.varKinds.var:i.varKinds.let)){const s=this._scope.toName(e);return this._for(new O(o,s,t,r),(()=>n(s)))}forOf(e,t,r,o=i.varKinds.const){const s=this._scope.toName(e);if(this.opts.es5){const e=t instanceof n.Name?t:this.var("_arr",t);return this.forRange("_i",0,n._`${e}.length`,(t=>{this.var(s,n._`${e}[${t}]`),r(s)}))}return this._for(new S("of",o,s,t),(()=>r(s)))}forIn(e,t,r,o=(this.opts.es5?i.varKinds.var:i.varKinds.const)){if(this.opts.ownProperties)return this.forOf(e,n._`Object.keys(${t})`,r);const s=this._scope.toName(e);return this._for(new S("in",o,s,t),(()=>r(s)))}endFor(){return this._endBlockNode(_)}label(e){return this._leafNode(new f(e))}break(e){return this._leafNode(new p(e))}return(e){const t=new T;if(this._blockNode(t),this.code(e),1!==t.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(T)}try(e,t,r){if(!t&&!r)throw new Error('CodeGen: "try" without "catch" and "finally"');const n=new j;if(this._blockNode(n),this.code(e),t){const e=this.name("e");this._currNode=n.catch=new P(e),t(e)}return r&&(this._currNode=n.finally=new I,this.code(r)),this._endBlockNode(P,I)}throw(e){return this._leafNode(new d(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){const t=this._blockStarts.pop();if(void 0===t)throw new Error("CodeGen: not in self-balancing block");const r=this._nodes.length-t;if(r<0||void 0!==e&&r!==e)throw new Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=t,this}func(e,t=n.nil,r,i){return this._blockNode(new E(e,t,r)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(E)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){const r=this._currNode;if(r instanceof e||t&&r instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){const t=this._currNode;if(!(t instanceof g))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){const e=this._nodes;return e[e.length-1]}set _currNode(e){const t=this._nodes;t[t.length-1]=e}},t.not=M;const D=C(t.operators.AND);t.and=function(...e){return e.reduce(D)};const R=C(t.operators.OR);function C(e){return(t,r)=>t===n.nil?r:r===n.nil?t:n._`${$(t)} ${e} ${$(r)}`}function $(e){return e instanceof n.Name?e:n._`(${e})`}t.or=function(...e){return e.reduce(R)}},9187:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const n=r(6545);class i extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}}var o;!function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"}(o=t.UsedValueState||(t.UsedValueState={})),t.varKinds={const:new n.Name("const"),let:new n.Name("let"),var:new n.Name("var")};class s{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof n.Name?e:this.name(e)}name(e){return new n.Name(this._newName(e))}_newName(e){return`${e}${(this._names[e]||this._nameGroup(e)).index++}`}_nameGroup(e){var t,r;if((null===(r=null===(t=this._parent)||void 0===t?void 0:t._prefixes)||void 0===r?void 0:r.has(e))||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}}t.Scope=s;class a extends n.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:t,itemIndex:r}){this.value=e,this.scopePath=n._`.${new n.Name(t)}[${r}]`}}t.ValueScopeName=a;const u=n._`\n`;t.ValueScope=class extends s{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?u:n.nil}}get(){return this._scope}name(e){return new a(e,this._newName(e))}value(e,t){var r;if(void 0===t.ref)throw new Error("CodeGen: ref must be passed in value");const n=this.toName(e),{prefix:i}=n,o=null!==(r=t.key)&&void 0!==r?r:t.ref;let s=this._values[i];if(s){const e=s.get(o);if(e)return e}else s=this._values[i]=new Map;s.set(o,n);const a=this._scope[i]||(this._scope[i]=[]),u=a.length;return a[u]=t.ref,n.setValue(t,{property:i,itemIndex:u}),n}getValue(e,t){const r=this._values[e];if(r)return r.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,(t=>{if(void 0===t.scopePath)throw new Error(`CodeGen: name "${t}" has no value`);return n._`${e}${t.scopePath}`}))}scopeCode(e=this._values,t,r){return this._reduceValues(e,(e=>{if(void 0===e.value)throw new Error(`CodeGen: name "${e}" has no value`);return e.value.code}),t,r)}_reduceValues(e,r,s={},a){let u=n.nil;for(const c in e){const l=e[c];if(!l)continue;const f=s[c]=s[c]||new Map;l.forEach((e=>{if(f.has(e))return;f.set(e,o.Started);let s=r(e);if(s){const r=this.opts.es5?t.varKinds.var:t.varKinds.const;u=n._`${u}${r} ${e} = ${s};${this.opts._n}`}else{if(!(s=null==a?void 0:a(e)))throw new i(e);u=n._`${u}${s}${this.opts._n}`}f.set(e,o.Completed)}))}return u}}},6930:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const n=r(5669),i=r(8936),o=r(5247);function s(e,t){const r=e.const("err",t);e.if(n._`${o.default.vErrors} === null`,(()=>e.assign(o.default.vErrors,n._`[${r}]`)),n._`${o.default.vErrors}.push(${r})`),e.code(n._`${o.default.errors}++`)}function a(e,t){const{gen:r,validateName:i,schemaEnv:o}=e;o.$async?r.throw(n._`new ${e.ValidationError}(${t})`):(r.assign(n._`${i}.errors`,t),r.return(!1))}t.keywordError={message:({keyword:e})=>n.str`must pass "${e}" keyword validation`},t.keyword$DataError={message:({keyword:e,schemaType:t})=>t?n.str`"${e}" keyword must be ${t} ($data)`:n.str`"${e}" keyword is invalid ($data)`},t.reportError=function(e,r=t.keywordError,i,o){const{it:u}=e,{gen:l,compositeRule:f,allErrors:p}=u,d=c(e,r,i);(null!=o?o:f||p)?s(l,d):a(u,n._`[${d}]`)},t.reportExtraError=function(e,r=t.keywordError,n){const{it:i}=e,{gen:u,compositeRule:l,allErrors:f}=i;s(u,c(e,r,n)),l||f||a(i,o.default.vErrors)},t.resetErrorsCount=function(e,t){e.assign(o.default.errors,t),e.if(n._`${o.default.vErrors} !== null`,(()=>e.if(t,(()=>e.assign(n._`${o.default.vErrors}.length`,t)),(()=>e.assign(o.default.vErrors,null)))))},t.extendErrors=function({gen:e,keyword:t,schemaValue:r,data:i,errsCount:s,it:a}){if(void 0===s)throw new Error("ajv implementation error");const u=e.name("err");e.forRange("i",s,o.default.errors,(s=>{e.const(u,n._`${o.default.vErrors}[${s}]`),e.if(n._`${u}.instancePath === undefined`,(()=>e.assign(n._`${u}.instancePath`,(0,n.strConcat)(o.default.instancePath,a.errorPath)))),e.assign(n._`${u}.schemaPath`,n.str`${a.errSchemaPath}/${t}`),a.opts.verbose&&(e.assign(n._`${u}.schema`,r),e.assign(n._`${u}.data`,i))}))};const u={keyword:new n.Name("keyword"),schemaPath:new n.Name("schemaPath"),params:new n.Name("params"),propertyName:new n.Name("propertyName"),message:new n.Name("message"),schema:new n.Name("schema"),parentSchema:new n.Name("parentSchema")};function c(e,t,r){const{createErrors:i}=e.it;return!1===i?n._`{}`:function(e,t,r={}){const{gen:i,it:s}=e,a=[l(s,r),f(e,r)];return function(e,{params:t,message:r},i){const{keyword:s,data:a,schemaValue:c,it:l}=e,{opts:f,propertyName:p,topSchemaRef:d,schemaPath:h}=l;i.push([u.keyword,s],[u.params,"function"==typeof t?t(e):t||n._`{}`]),f.messages&&i.push([u.message,"function"==typeof r?r(e):r]),f.verbose&&i.push([u.schema,c],[u.parentSchema,n._`${d}${h}`],[o.default.data,a]),p&&i.push([u.propertyName,p])}(e,t,a),i.object(...a)}(e,t,r)}function l({errorPath:e},{instancePath:t}){const r=t?n.str`${e}${(0,i.getErrorPath)(t,i.Type.Str)}`:e;return[o.default.instancePath,(0,n.strConcat)(o.default.instancePath,r)]}function f({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:o}){let s=o?t:n.str`${t}/${e}`;return r&&(s=n.str`${s}${(0,i.getErrorPath)(r,i.Type.Str)}`),[u.schemaPath,s]}},7382:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveSchema=t.getCompilingSchema=t.resolveRef=t.compileSchema=t.SchemaEnv=void 0;const n=r(5669),i=r(6448),o=r(5247),s=r(6696),a=r(8936),u=r(1686);class c{constructor(e){var t;let r;this.refs={},this.dynamicAnchors={},"object"==typeof e.schema&&(r=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=null!==(t=e.baseId)&&void 0!==t?t:(0,s.normalizeId)(null==r?void 0:r[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=null==r?void 0:r.$async,this.refs={}}}function l(e){const t=p.call(this,e);if(t)return t;const r=(0,s.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:a,lines:c}=this.opts.code,{ownProperties:l}=this.opts,f=new n.CodeGen(this.scope,{es5:a,lines:c,ownProperties:l});let d;e.$async&&(d=f.scopeValue("Error",{ref:i.default,code:n._`require("ajv/dist/runtime/validation_error").default`}));const h=f.scopeName("validate");e.validateName=h;const y={gen:f,allErrors:this.opts.allErrors,data:o.default.data,parentData:o.default.parentData,parentDataProperty:o.default.parentDataProperty,dataNames:[o.default.data],dataPathArr:[n.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:f.scopeValue("schema",!0===this.opts.code.source?{ref:e.schema,code:(0,n.stringify)(e.schema)}:{ref:e.schema}),validateName:h,ValidationError:d,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:n.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:n._`""`,opts:this.opts,self:this};let v;try{this._compilations.add(e),(0,u.validateFunctionCode)(y),f.optimize(this.opts.code.optimize);const t=f.toString();v=`${f.scopeRefs(o.default.scope)}return ${t}`,this.opts.code.process&&(v=this.opts.code.process(v,e));const r=new Function(`${o.default.self}`,`${o.default.scope}`,v)(this,this.scope.get());if(this.scope.value(h,{ref:r}),r.errors=null,r.schema=e.schema,r.schemaEnv=e,e.$async&&(r.$async=!0),!0===this.opts.code.source&&(r.source={validateName:h,validateCode:t,scopeValues:f._values}),this.opts.unevaluated){const{props:e,items:t}=y;r.evaluated={props:e instanceof n.Name?void 0:e,items:t instanceof n.Name?void 0:t,dynamicProps:e instanceof n.Name,dynamicItems:t instanceof n.Name},r.source&&(r.source.evaluated=(0,n.stringify)(r.evaluated))}return e.validate=r,e}catch(t){throw delete e.validate,delete e.validateName,v&&this.logger.error("Error compiling schema, function code:",v),t}finally{this._compilations.delete(e)}}function f(e){return(0,s.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:l.call(this,e)}function p(e){for(const n of this._compilations)if(r=e,(t=n).schema===r.schema&&t.root===r.root&&t.baseId===r.baseId)return n;var t,r}function d(e,t){let r;for(;"string"==typeof(r=this.refs[t]);)t=r;return r||this.schemas[t]||h.call(this,e,t)}function h(e,t){const r=this.opts.uriResolver.parse(t),n=(0,s._getFullPath)(this.opts.uriResolver,r);let i=(0,s.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===i)return v.call(this,r,e);const o=(0,s.normalizeId)(n),a=this.refs[o]||this.schemas[o];if("string"==typeof a){const t=h.call(this,e,a);if("object"!=typeof(null==t?void 0:t.schema))return;return v.call(this,r,t)}if("object"==typeof(null==a?void 0:a.schema)){if(a.validate||l.call(this,a),o===(0,s.normalizeId)(t)){const{schema:t}=a,{schemaId:r}=this.opts,n=t[r];return n&&(i=(0,s.resolveUrl)(this.opts.uriResolver,i,n)),new c({schema:t,schemaId:r,root:e,baseId:i})}return v.call(this,r,a)}}t.SchemaEnv=c,t.compileSchema=l,t.resolveRef=function(e,t,r){var n;r=(0,s.resolveUrl)(this.opts.uriResolver,t,r);const i=e.refs[r];if(i)return i;let o=d.call(this,e,r);if(void 0===o){const i=null===(n=e.localRefs)||void 0===n?void 0:n[r],{schemaId:s}=this.opts;i&&(o=new c({schema:i,schemaId:s,root:e,baseId:t}))}return void 0!==o?e.refs[r]=f.call(this,o):void 0},t.getCompilingSchema=p,t.resolveSchema=h;const y=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function v(e,{baseId:t,schema:r,root:n}){var i;if("/"!==(null===(i=e.fragment)||void 0===i?void 0:i[0]))return;for(const n of e.fragment.slice(1).split("/")){if("boolean"==typeof r)return;const e=r[(0,a.unescapeFragment)(n)];if(void 0===e)return;const i="object"==typeof(r=e)&&r[this.opts.schemaId];!y.has(n)&&i&&(t=(0,s.resolveUrl)(this.opts.uriResolver,t,i))}let o;if("boolean"!=typeof r&&r.$ref&&!(0,a.schemaHasRulesButRef)(r,this.RULES)){const e=(0,s.resolveUrl)(this.opts.uriResolver,t,r.$ref);o=h.call(this,n,e)}const{schemaId:u}=this.opts;return o=o||new c({schema:r,schemaId:u,root:n,baseId:t}),o.schema!==o.root.schema?o:void 0}},5247:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i={data:new n.Name("data"),valCxt:new n.Name("valCxt"),instancePath:new n.Name("instancePath"),parentData:new n.Name("parentData"),parentDataProperty:new n.Name("parentDataProperty"),rootData:new n.Name("rootData"),dynamicAnchors:new n.Name("dynamicAnchors"),vErrors:new n.Name("vErrors"),errors:new n.Name("errors"),this:new n.Name("this"),self:new n.Name("self"),scope:new n.Name("scope"),json:new n.Name("json"),jsonPos:new n.Name("jsonPos"),jsonLen:new n.Name("jsonLen"),jsonPart:new n.Name("jsonPart")};t.default=i},1578:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(6696);class i extends Error{constructor(e,t,r,i){super(i||`can't resolve reference ${r} from id ${t}`),this.missingRef=(0,n.resolveUrl)(e,t,r),this.missingSchema=(0,n.normalizeId)((0,n.getFullPath)(e,this.missingRef))}}t.default=i},6696:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSchemaRefs=t.resolveUrl=t.normalizeId=t._getFullPath=t.getFullPath=t.inlineRef=void 0;const n=r(8936),i=r(6471),o=r(8682),s=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);t.inlineRef=function(e,t=!0){return"boolean"==typeof e||(!0===t?!u(e):!!t&&c(e)<=t)};const a=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function u(e){for(const t in e){if(a.has(t))return!0;const r=e[t];if(Array.isArray(r)&&r.some(u))return!0;if("object"==typeof r&&u(r))return!0}return!1}function c(e){let t=0;for(const r in e){if("$ref"===r)return 1/0;if(t++,!s.has(r)&&("object"==typeof e[r]&&(0,n.eachItem)(e[r],(e=>t+=c(e))),t===1/0))return 1/0}return t}function l(e,t="",r){!1!==r&&(t=d(t));const n=e.parse(t);return f(e,n)}function f(e,t){return e.serialize(t).split("#")[0]+"#"}t.getFullPath=l,t._getFullPath=f;const p=/#\/?$/;function d(e){return e?e.replace(p,""):""}t.normalizeId=d,t.resolveUrl=function(e,t,r){return r=d(r),e.resolve(t,r)};const h=/^[a-z_][-a-z0-9._]*$/i;t.getSchemaRefs=function(e,t){if("boolean"==typeof e)return{};const{schemaId:r,uriResolver:n}=this.opts,s=d(e[r]||t),a={"":s},u=l(n,s,!1),c={},f=new Set;return o(e,{allKeys:!0},((e,t,n,i)=>{if(void 0===i)return;const o=u+t;let s=a[i];function l(t){const r=this.opts.uriResolver.resolve;if(t=d(s?r(s,t):t),f.has(t))throw y(t);f.add(t);let n=this.refs[t];return"string"==typeof n&&(n=this.refs[n]),"object"==typeof n?p(e,n.schema,t):t!==d(o)&&("#"===t[0]?(p(e,c[t],t),c[t]=e):this.refs[t]=o),t}function v(e){if("string"==typeof e){if(!h.test(e))throw new Error(`invalid anchor "${e}"`);l.call(this,`#${e}`)}}"string"==typeof e[r]&&(s=l.call(this,e[r])),v.call(this,e.$anchor),v.call(this,e.$dynamicAnchor),a[t]=s})),c;function p(e,t,r){if(void 0!==t&&!i(e,t))throw y(r)}function y(e){return new Error(`reference "${e}" resolves to more than one schema`)}}},2881:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRules=t.isJSONType=void 0;const r=new Set(["string","number","integer","boolean","null","object","array"]);t.isJSONType=function(e){return"string"==typeof e&&r.has(e)},t.getRules=function(){const e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}},8936:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkStrictMode=t.getErrorPath=t.Type=t.useFunc=t.setEvaluated=t.evaluatedPropsToName=t.mergeEvaluated=t.eachItem=t.unescapeJsonPointer=t.escapeJsonPointer=t.escapeFragment=t.unescapeFragment=t.schemaRefOrVal=t.schemaHasRulesButRef=t.schemaHasRules=t.checkUnknownRules=t.alwaysValidSchema=t.toHash=void 0;const n=r(5669),i=r(6545);function o(e,t=e.schema){const{opts:r,self:n}=e;if(!r.strictSchema)return;if("boolean"==typeof t)return;const i=n.RULES.keywords;for(const r in t)i[r]||h(e,`unknown keyword: "${r}"`)}function s(e,t){if("boolean"==typeof e)return!e;for(const r in e)if(t[r])return!0;return!1}function a(e){return"number"==typeof e?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}function u(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function c({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:i}){return(o,s,a,u)=>{const c=void 0===a?s:a instanceof n.Name?(s instanceof n.Name?e(o,s,a):t(o,s,a),a):s instanceof n.Name?(t(o,a,s),s):r(s,a);return u!==n.Name||c instanceof n.Name?c:i(o,c)}}function l(e,t){if(!0===t)return e.var("props",!0);const r=e.var("props",n._`{}`);return void 0!==t&&f(e,r,t),r}function f(e,t,r){Object.keys(r).forEach((r=>e.assign(n._`${t}${(0,n.getProperty)(r)}`,!0)))}t.toHash=function(e){const t={};for(const r of e)t[r]=!0;return t},t.alwaysValidSchema=function(e,t){return"boolean"==typeof t?t:0===Object.keys(t).length||(o(e,t),!s(t,e.self.RULES.all))},t.checkUnknownRules=o,t.schemaHasRules=s,t.schemaHasRulesButRef=function(e,t){if("boolean"==typeof e)return!e;for(const r in e)if("$ref"!==r&&t.all[r])return!0;return!1},t.schemaRefOrVal=function({topSchemaRef:e,schemaPath:t},r,i,o){if(!o){if("number"==typeof r||"boolean"==typeof r)return r;if("string"==typeof r)return n._`${r}`}return n._`${e}${t}${(0,n.getProperty)(i)}`},t.unescapeFragment=function(e){return u(decodeURIComponent(e))},t.escapeFragment=function(e){return encodeURIComponent(a(e))},t.escapeJsonPointer=a,t.unescapeJsonPointer=u,t.eachItem=function(e,t){if(Array.isArray(e))for(const r of e)t(r);else t(e)},t.mergeEvaluated={props:c({mergeNames:(e,t,r)=>e.if(n._`${r} !== true && ${t} !== undefined`,(()=>{e.if(n._`${t} === true`,(()=>e.assign(r,!0)),(()=>e.assign(r,n._`${r} || {}`).code(n._`Object.assign(${r}, ${t})`)))})),mergeToName:(e,t,r)=>e.if(n._`${r} !== true`,(()=>{!0===t?e.assign(r,!0):(e.assign(r,n._`${r} || {}`),f(e,r,t))})),mergeValues:(e,t)=>!0===e||{...e,...t},resultToName:l}),items:c({mergeNames:(e,t,r)=>e.if(n._`${r} !== true && ${t} !== undefined`,(()=>e.assign(r,n._`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`))),mergeToName:(e,t,r)=>e.if(n._`${r} !== true`,(()=>e.assign(r,!0===t||n._`${r} > ${t} ? ${r} : ${t}`))),mergeValues:(e,t)=>!0===e||Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})},t.evaluatedPropsToName=l,t.setEvaluated=f;const p={};var d;function h(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,!0===r)throw new Error(t);e.self.logger.warn(t)}}t.useFunc=function(e,t){return e.scopeValue("func",{ref:t,code:p[t.code]||(p[t.code]=new i._Code(t.code))})},function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"}(d=t.Type||(t.Type={})),t.getErrorPath=function(e,t,r){if(e instanceof n.Name){const i=t===d.Num;return r?i?n._`"[" + ${e} + "]"`:n._`"['" + ${e} + "']"`:i?n._`"/" + ${e}`:n._`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,n.getProperty)(e).toString():"/"+a(e)},t.checkStrictMode=h},9073:(e,t)=>{"use strict";function r(e,t){return t.rules.some((t=>n(e,t)))}function n(e,t){var r;return void 0!==e[t.keyword]||(null===(r=t.definition.implements)||void 0===r?void 0:r.some((t=>void 0!==e[t])))}Object.defineProperty(t,"__esModule",{value:!0}),t.shouldUseRule=t.shouldUseGroup=t.schemaHasRulesForType=void 0,t.schemaHasRulesForType=function({schema:e,self:t},n){const i=t.RULES.types[n];return i&&!0!==i&&r(e,i)},t.shouldUseGroup=r,t.shouldUseRule=n},2171:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.boolOrEmptySchema=t.topBoolOrEmptySchema=void 0;const n=r(6930),i=r(5669),o=r(5247),s={message:"boolean schema is false"};function a(e,t){const{gen:r,data:i}=e,o={gen:r,keyword:"false schema",data:i,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,n.reportError)(o,s,void 0,t)}t.topBoolOrEmptySchema=function(e){const{gen:t,schema:r,validateName:n}=e;!1===r?a(e,!1):"object"==typeof r&&!0===r.$async?t.return(o.default.data):(t.assign(i._`${n}.errors`,null),t.return(!0))},t.boolOrEmptySchema=function(e,t){const{gen:r,schema:n}=e;!1===n?(r.var(t,!1),a(e)):r.var(t,!0)}},7332:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reportTypeError=t.checkDataTypes=t.checkDataType=t.coerceAndCheckDataType=t.getJSONTypes=t.getSchemaTypes=t.DataType=void 0;const n=r(2881),i=r(9073),o=r(6930),s=r(5669),a=r(8936);var u;function c(e){const t=Array.isArray(e)?e:e?[e]:[];if(t.every(n.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}!function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"}(u=t.DataType||(t.DataType={})),t.getSchemaTypes=function(e){const t=c(e.type);if(t.includes("null")){if(!1===e.nullable)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&void 0!==e.nullable)throw new Error('"nullable" cannot be used without "type"');!0===e.nullable&&t.push("null")}return t},t.getJSONTypes=c,t.coerceAndCheckDataType=function(e,t){const{gen:r,data:n,opts:o}=e,a=function(e,t){return t?e.filter((e=>l.has(e)||"array"===t&&"array"===e)):[]}(t,o.coerceTypes),c=t.length>0&&!(0===a.length&&1===t.length&&(0,i.schemaHasRulesForType)(e,t[0]));if(c){const i=p(t,n,o.strictNumbers,u.Wrong);r.if(i,(()=>{a.length?function(e,t,r){const{gen:n,data:i,opts:o}=e,a=n.let("dataType",s._`typeof ${i}`),u=n.let("coerced",s._`undefined`);"array"===o.coerceTypes&&n.if(s._`${a} == 'object' && Array.isArray(${i}) && ${i}.length == 1`,(()=>n.assign(i,s._`${i}[0]`).assign(a,s._`typeof ${i}`).if(p(t,i,o.strictNumbers),(()=>n.assign(u,i))))),n.if(s._`${u} !== undefined`);for(const e of r)(l.has(e)||"array"===e&&"array"===o.coerceTypes)&&c(e);function c(e){switch(e){case"string":return void n.elseIf(s._`${a} == "number" || ${a} == "boolean"`).assign(u,s._`"" + ${i}`).elseIf(s._`${i} === null`).assign(u,s._`""`);case"number":return void n.elseIf(s._`${a} == "boolean" || ${i} === null
|
|
3
|
+
|| (${a} == "string" && ${i} && ${i} == +${i})`).assign(u,s._`+${i}`);case"integer":return void n.elseIf(s._`${a} === "boolean" || ${i} === null
|
|
4
|
+
|| (${a} === "string" && ${i} && ${i} == +${i} && !(${i} % 1))`).assign(u,s._`+${i}`);case"boolean":return void n.elseIf(s._`${i} === "false" || ${i} === 0 || ${i} === null`).assign(u,!1).elseIf(s._`${i} === "true" || ${i} === 1`).assign(u,!0);case"null":return n.elseIf(s._`${i} === "" || ${i} === 0 || ${i} === false`),void n.assign(u,null);case"array":n.elseIf(s._`${a} === "string" || ${a} === "number"
|
|
5
|
+
|| ${a} === "boolean" || ${i} === null`).assign(u,s._`[${i}]`)}}n.else(),h(e),n.endIf(),n.if(s._`${u} !== undefined`,(()=>{n.assign(i,u),function({gen:e,parentData:t,parentDataProperty:r},n){e.if(s._`${t} !== undefined`,(()=>e.assign(s._`${t}[${r}]`,n)))}(e,u)}))}(e,t,a):h(e)}))}return c};const l=new Set(["string","number","integer","boolean","null"]);function f(e,t,r,n=u.Correct){const i=n===u.Correct?s.operators.EQ:s.operators.NEQ;let o;switch(e){case"null":return s._`${t} ${i} null`;case"array":o=s._`Array.isArray(${t})`;break;case"object":o=s._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":o=a(s._`!(${t} % 1) && !isNaN(${t})`);break;case"number":o=a();break;default:return s._`typeof ${t} ${i} ${e}`}return n===u.Correct?o:(0,s.not)(o);function a(e=s.nil){return(0,s.and)(s._`typeof ${t} == "number"`,e,r?s._`isFinite(${t})`:s.nil)}}function p(e,t,r,n){if(1===e.length)return f(e[0],t,r,n);let i;const o=(0,a.toHash)(e);if(o.array&&o.object){const e=s._`typeof ${t} != "object"`;i=o.null?e:s._`!${t} || ${e}`,delete o.null,delete o.array,delete o.object}else i=s.nil;o.number&&delete o.integer;for(const e in o)i=(0,s.and)(i,f(e,t,r,n));return i}t.checkDataType=f,t.checkDataTypes=p;const d={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?s._`{type: ${e}}`:s._`{type: ${t}}`};function h(e){const t=function(e){const{gen:t,data:r,schema:n}=e,i=(0,a.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:i,schemaValue:i,parentSchema:n,params:{},it:e}}(e);(0,o.reportError)(t,d)}t.reportTypeError=h},1481:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assignDefaults=void 0;const n=r(5669),i=r(8936);function o(e,t,r){const{gen:o,compositeRule:s,data:a,opts:u}=e;if(void 0===r)return;const c=n._`${a}${(0,n.getProperty)(t)}`;if(s)return void(0,i.checkStrictMode)(e,`default is ignored for: ${c}`);let l=n._`${c} === undefined`;"empty"===u.useDefaults&&(l=n._`${l} || ${c} === null || ${c} === ""`),o.if(l,n._`${c} = ${(0,n.stringify)(r)}`)}t.assignDefaults=function(e,t){const{properties:r,items:n}=e.schema;if("object"===t&&r)for(const t in r)o(e,t,r[t].default);else"array"===t&&Array.isArray(n)&&n.forEach(((t,r)=>o(e,r,t.default)))}},1686:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;const n=r(2171),i=r(7332),o=r(9073),s=r(7332),a=r(1481),u=r(5782),c=r(8878),l=r(5669),f=r(5247),p=r(6696),d=r(8936),h=r(6930);function y({gen:e,validateName:t,schema:r,schemaEnv:n,opts:i},o){i.code.es5?e.func(t,l._`${f.default.data}, ${f.default.valCxt}`,n.$async,(()=>{e.code(l._`"use strict"; ${v(r,i)}`),function(e,t){e.if(f.default.valCxt,(()=>{e.var(f.default.instancePath,l._`${f.default.valCxt}.${f.default.instancePath}`),e.var(f.default.parentData,l._`${f.default.valCxt}.${f.default.parentData}`),e.var(f.default.parentDataProperty,l._`${f.default.valCxt}.${f.default.parentDataProperty}`),e.var(f.default.rootData,l._`${f.default.valCxt}.${f.default.rootData}`),t.dynamicRef&&e.var(f.default.dynamicAnchors,l._`${f.default.valCxt}.${f.default.dynamicAnchors}`)}),(()=>{e.var(f.default.instancePath,l._`""`),e.var(f.default.parentData,l._`undefined`),e.var(f.default.parentDataProperty,l._`undefined`),e.var(f.default.rootData,f.default.data),t.dynamicRef&&e.var(f.default.dynamicAnchors,l._`{}`)}))}(e,i),e.code(o)})):e.func(t,l._`${f.default.data}, ${function(e){return l._`{${f.default.instancePath}="", ${f.default.parentData}, ${f.default.parentDataProperty}, ${f.default.rootData}=${f.default.data}${e.dynamicRef?l._`, ${f.default.dynamicAnchors}={}`:l.nil}}={}`}(i)}`,n.$async,(()=>e.code(v(r,i)).code(o)))}function v(e,t){const r="object"==typeof e&&e[t.schemaId];return r&&(t.code.source||t.code.process)?l._`/*# sourceURL=${r} */`:l.nil}function m({schema:e,self:t}){if("boolean"==typeof e)return!e;for(const r in e)if(t.RULES.all[r])return!0;return!1}function b(e){return"boolean"!=typeof e.schema}function g(e){(0,d.checkUnknownRules)(e),function(e){const{schema:t,errSchemaPath:r,opts:n,self:i}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,d.schemaHasRulesButRef)(t,i.RULES)&&i.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}(e)}function _(e,t){if(e.opts.jtd)return O(e,[],!1,t);const r=(0,i.getSchemaTypes)(e.schema);O(e,r,!(0,i.coerceAndCheckDataType)(e,r),t)}function w({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:i}){const o=r.$comment;if(!0===i.$comment)e.code(l._`${f.default.self}.logger.log(${o})`);else if("function"==typeof i.$comment){const r=l.str`${n}/$comment`,i=e.scopeValue("root",{ref:t.root});e.code(l._`${f.default.self}.opts.$comment(${o}, ${r}, ${i}.schema)`)}}function O(e,t,r,n){const{gen:i,schema:a,data:u,allErrors:c,opts:p,self:h}=e,{RULES:y}=h;function v(d){(0,o.shouldUseGroup)(a,d)&&(d.type?(i.if((0,s.checkDataType)(d.type,u,p.strictNumbers)),S(e,d),1===t.length&&t[0]===d.type&&r&&(i.else(),(0,s.reportTypeError)(e)),i.endIf()):S(e,d),c||i.if(l._`${f.default.errors} === ${n||0}`))}!a.$ref||!p.ignoreKeywordsWithRef&&(0,d.schemaHasRulesButRef)(a,y)?(p.jtd||function(e,t){!e.schemaEnv.meta&&e.opts.strictTypes&&(function(e,t){t.length&&(e.dataTypes.length?(t.forEach((t=>{E(e.dataTypes,t)||T(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)})),function(e,t){const r=[];for(const n of e.dataTypes)E(t,n)?r.push(n):t.includes("integer")&&"number"===n&&r.push("integer");e.dataTypes=r}(e,t)):e.dataTypes=t)}(e,t),e.opts.allowUnionTypes||function(e,t){t.length>1&&(2!==t.length||!t.includes("null"))&&T(e,"use allowUnionTypes to allow union type keyword")}(e,t),function(e,t){const r=e.self.RULES.all;for(const n in r){const i=r[n];if("object"==typeof i&&(0,o.shouldUseRule)(e.schema,i)){const{type:r}=i.definition;r.length&&!r.some((e=>{return n=e,(r=t).includes(n)||"number"===n&&r.includes("integer");var r,n}))&&T(e,`missing type "${r.join(",")}" for keyword "${n}"`)}}}(e,e.dataTypes))}(e,t),i.block((()=>{for(const e of y.rules)v(e);v(y.post)}))):i.block((()=>P(e,"$ref",y.all.$ref.definition)))}function S(e,t){const{gen:r,schema:n,opts:{useDefaults:i}}=e;i&&(0,a.assignDefaults)(e,t.type),r.block((()=>{for(const r of t.rules)(0,o.shouldUseRule)(n,r)&&P(e,r.keyword,r.definition,t.type)}))}function E(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function T(e,t){t+=` at "${e.schemaEnv.baseId+e.errSchemaPath}" (strictTypes)`,(0,d.checkStrictMode)(e,t,e.opts.strictTypes)}t.validateFunctionCode=function(e){b(e)&&(g(e),m(e))?function(e){const{schema:t,opts:r,gen:n}=e;y(e,(()=>{r.$comment&&t.$comment&&w(e),function(e){const{schema:t,opts:r}=e;void 0!==t.default&&r.useDefaults&&r.strictSchema&&(0,d.checkStrictMode)(e,"default is ignored in the schema root")}(e),n.let(f.default.vErrors,null),n.let(f.default.errors,0),r.unevaluated&&function(e){const{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",l._`${r}.evaluated`),t.if(l._`${e.evaluated}.dynamicProps`,(()=>t.assign(l._`${e.evaluated}.props`,l._`undefined`))),t.if(l._`${e.evaluated}.dynamicItems`,(()=>t.assign(l._`${e.evaluated}.items`,l._`undefined`)))}(e),_(e),function(e){const{gen:t,schemaEnv:r,validateName:n,ValidationError:i,opts:o}=e;r.$async?t.if(l._`${f.default.errors} === 0`,(()=>t.return(f.default.data)),(()=>t.throw(l._`new ${i}(${f.default.vErrors})`))):(t.assign(l._`${n}.errors`,f.default.vErrors),o.unevaluated&&function({gen:e,evaluated:t,props:r,items:n}){r instanceof l.Name&&e.assign(l._`${t}.props`,r),n instanceof l.Name&&e.assign(l._`${t}.items`,n)}(e),t.return(l._`${f.default.errors} === 0`))}(e)}))}(e):y(e,(()=>(0,n.topBoolOrEmptySchema)(e)))};class j{constructor(e,t,r){if((0,u.validateKeywordUsage)(e,t,r),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=r,this.data=e.data,this.schema=e.schema[r],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,d.schemaRefOrVal)(e,this.schema,r,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",A(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,u.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw new Error(`${r} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:!1!==t.errors)&&(this.errsCount=e.gen.const("_errs",f.default.errors))}result(e,t,r){this.failResult((0,l.not)(e),t,r)}failResult(e,t,r){this.gen.if(e),r?r():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,l.not)(e),void 0,t)}fail(e){if(void 0===e)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);const{schemaCode:t}=this;this.fail(l._`${t} !== undefined && (${(0,l.or)(this.invalid$data(),e)})`)}error(e,t,r){if(t)return this.setParams(t),this._error(e,r),void this.setParams({});this._error(e,r)}_error(e,t){(e?h.reportExtraError:h.reportError)(this,this.def.error,t)}$dataError(){(0,h.reportError)(this,this.def.$dataError||h.keyword$DataError)}reset(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,h.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,r=l.nil){this.gen.block((()=>{this.check$data(e,r),t()}))}check$data(e=l.nil,t=l.nil){if(!this.$data)return;const{gen:r,schemaCode:n,schemaType:i,def:o}=this;r.if((0,l.or)(l._`${n} === undefined`,t)),e!==l.nil&&r.assign(e,!0),(i.length||o.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),e!==l.nil&&r.assign(e,!1)),r.else()}invalid$data(){const{gen:e,schemaCode:t,schemaType:r,def:n,it:i}=this;return(0,l.or)(function(){if(r.length){if(!(t instanceof l.Name))throw new Error("ajv implementation error");const e=Array.isArray(r)?r:[r];return l._`${(0,s.checkDataTypes)(e,t,i.opts.strictNumbers,s.DataType.Wrong)}`}return l.nil}(),function(){if(n.validateSchema){const r=e.scopeValue("validate$data",{ref:n.validateSchema});return l._`!${r}(${t})`}return l.nil}())}subschema(e,t){const r=(0,c.getSubschema)(this.it,e);(0,c.extendSubschemaData)(r,this.it,e),(0,c.extendSubschemaMode)(r,e);const i={...this.it,...r,items:void 0,props:void 0};return function(e,t){b(e)&&(g(e),m(e))?function(e,t){const{schema:r,gen:n,opts:i}=e;i.$comment&&r.$comment&&w(e),function(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,p.resolveUrl)(e.opts.uriResolver,e.baseId,t))}(e),function(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}(e);const o=n.const("_errs",f.default.errors);_(e,o),n.var(t,l._`${o} === ${f.default.errors}`)}(e,t):(0,n.boolOrEmptySchema)(e,t)}(i,t),i}mergeEvaluated(e,t){const{it:r,gen:n}=this;r.opts.unevaluated&&(!0!==r.props&&void 0!==e.props&&(r.props=d.mergeEvaluated.props(n,e.props,r.props,t)),!0!==r.items&&void 0!==e.items&&(r.items=d.mergeEvaluated.items(n,e.items,r.items,t)))}mergeValidEvaluated(e,t){const{it:r,gen:n}=this;if(r.opts.unevaluated&&(!0!==r.props||!0!==r.items))return n.if(t,(()=>this.mergeEvaluated(e,l.Name))),!0}}function P(e,t,r,n){const i=new j(e,r,t);"code"in r?r.code(i,n):i.$data&&r.validate?(0,u.funcKeywordCode)(i,r):"macro"in r?(0,u.macroKeywordCode)(i,r):(r.compile||r.validate)&&(0,u.funcKeywordCode)(i,r)}t.KeywordCxt=j;const I=/^\/(?:[^~]|~0|~1)*$/,x=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function A(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let i,o;if(""===e)return f.default.rootData;if("/"===e[0]){if(!I.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);i=e,o=f.default.rootData}else{const s=x.exec(e);if(!s)throw new Error(`Invalid JSON-pointer: ${e}`);const a=+s[1];if(i=s[2],"#"===i){if(a>=t)throw new Error(u("property/index",a));return n[t-a]}if(a>t)throw new Error(u("data",a));if(o=r[t-a],!i)return o}let s=o;const a=i.split("/");for(const e of a)e&&(o=l._`${o}${(0,l.getProperty)((0,d.unescapeJsonPointer)(e))}`,s=l._`${s} && ${o}`);return s;function u(e,r){return`Cannot access ${e} ${r} levels up, current level is ${t}`}}t.getData=A},5782:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateKeywordUsage=t.validSchemaType=t.funcKeywordCode=t.macroKeywordCode=void 0;const n=r(5669),i=r(5247),o=r(3499),s=r(6930);function a(e){const{gen:t,data:r,it:i}=e;t.if(i.parentData,(()=>t.assign(r,n._`${i.parentData}[${i.parentDataProperty}]`)))}function u(e,t,r){if(void 0===r)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword","function"==typeof r?{ref:r}:{ref:r,code:(0,n.stringify)(r)})}t.macroKeywordCode=function(e,t){const{gen:r,keyword:i,schema:o,parentSchema:s,it:a}=e,c=t.macro.call(a.self,o,s,a),l=u(r,i,c);!1!==a.opts.validateSchema&&a.self.validateSchema(c,!0);const f=r.name("valid");e.subschema({schema:c,schemaPath:n.nil,errSchemaPath:`${a.errSchemaPath}/${i}`,topSchemaRef:l,compositeRule:!0},f),e.pass(f,(()=>e.error(!0)))},t.funcKeywordCode=function(e,t){var r;const{gen:c,keyword:l,schema:f,parentSchema:p,$data:d,it:h}=e;!function({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}(h,t);const y=!d&&t.compile?t.compile.call(h.self,f,p,h):t.validate,v=u(c,l,y),m=c.let("valid");function b(r=(t.async?n._`await `:n.nil)){const s=h.opts.passContext?i.default.this:i.default.self,a=!("compile"in t&&!d||!1===t.schema);c.assign(m,n._`${r}${(0,o.callValidateCode)(e,v,s,a)}`,t.modifying)}function g(e){var r;c.if((0,n.not)(null!==(r=t.valid)&&void 0!==r?r:m),e)}e.block$data(m,(function(){if(!1===t.errors)b(),t.modifying&&a(e),g((()=>e.error()));else{const r=t.async?function(){const e=c.let("ruleErrs",null);return c.try((()=>b(n._`await `)),(t=>c.assign(m,!1).if(n._`${t} instanceof ${h.ValidationError}`,(()=>c.assign(e,n._`${t}.errors`)),(()=>c.throw(t))))),e}():function(){const e=n._`${v}.errors`;return c.assign(e,null),b(n.nil),e}();t.modifying&&a(e),g((()=>function(e,t){const{gen:r}=e;r.if(n._`Array.isArray(${t})`,(()=>{r.assign(i.default.vErrors,n._`${i.default.vErrors} === null ? ${t} : ${i.default.vErrors}.concat(${t})`).assign(i.default.errors,n._`${i.default.vErrors}.length`),(0,s.extendErrors)(e)}),(()=>e.error()))}(e,r)))}})),e.ok(null!==(r=t.valid)&&void 0!==r?r:m)},t.validSchemaType=function(e,t,r=!1){return!t.length||t.some((t=>"array"===t?Array.isArray(e):"object"===t?e&&"object"==typeof e&&!Array.isArray(e):typeof e==t||r&&void 0===e))},t.validateKeywordUsage=function({schema:e,opts:t,self:r,errSchemaPath:n},i,o){if(Array.isArray(i.keyword)?!i.keyword.includes(o):i.keyword!==o)throw new Error("ajv implementation error");const s=i.dependencies;if(null==s?void 0:s.some((t=>!Object.prototype.hasOwnProperty.call(e,t))))throw new Error(`parent schema must have dependencies of ${o}: ${s.join(",")}`);if(i.validateSchema&&!i.validateSchema(e[o])){const e=`keyword "${o}" value is invalid at path "${n}": `+r.errorsText(i.validateSchema.errors);if("log"!==t.validateSchema)throw new Error(e);r.logger.error(e)}}},8878:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0;const n=r(5669),i=r(8936);t.getSubschema=function(e,{keyword:t,schemaProp:r,schema:o,schemaPath:s,errSchemaPath:a,topSchemaRef:u}){if(void 0!==t&&void 0!==o)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==t){const o=e.schema[t];return void 0===r?{schema:o,schemaPath:n._`${e.schemaPath}${(0,n.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:o[r],schemaPath:n._`${e.schemaPath}${(0,n.getProperty)(t)}${(0,n.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,i.escapeFragment)(r)}`}}if(void 0!==o){if(void 0===s||void 0===a||void 0===u)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:o,schemaPath:s,topSchemaRef:u,errSchemaPath:a}}throw new Error('either "keyword" or "schema" must be passed')},t.extendSubschemaData=function(e,t,{dataProp:r,dataPropType:o,data:s,dataTypes:a,propertyName:u}){if(void 0!==s&&void 0!==r)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:c}=t;if(void 0!==r){const{errorPath:s,dataPathArr:a,opts:u}=t;l(c.let("data",n._`${t.data}${(0,n.getProperty)(r)}`,!0)),e.errorPath=n.str`${s}${(0,i.getErrorPath)(r,o,u.jsPropertySyntax)}`,e.parentDataProperty=n._`${r}`,e.dataPathArr=[...a,e.parentDataProperty]}function l(r){e.data=r,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,r]}void 0!==s&&(l(s instanceof n.Name?s:c.let("data",s,!0)),void 0!==u&&(e.propertyName=u)),a&&(e.dataTypes=a)},t.extendSubschemaMode=function(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:i,allErrors:o}){void 0!==n&&(e.compositeRule=n),void 0!==i&&(e.createErrors=i),void 0!==o&&(e.allErrors=o),e.jtdDiscriminator=t,e.jtdMetadata=r}},8355:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var n=r(1686);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return n.KeywordCxt}});var i=r(5669);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return i.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return i.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return i.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return i.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return i.CodeGen}});const o=r(6448),s=r(1578),a=r(2881),u=r(7382),c=r(5669),l=r(6696),f=r(7332),p=r(8936),d=r(1143),h=r(407),y=(e,t)=>new RegExp(e,t);y.code="new RegExp";const v=["removeAdditional","useDefaults","coerceTypes"],m=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),b={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},g={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};function _(e){var t,r,n,i,o,s,a,u,c,l,f,p,d,v,m,b,g,_,w,O,S,E,T,j,P;const I=e.strict,x=null===(t=e.code)||void 0===t?void 0:t.optimize,A=!0===x||void 0===x?1:x||0,N=null!==(n=null===(r=e.code)||void 0===r?void 0:r.regExp)&&void 0!==n?n:y,k=null!==(i=e.uriResolver)&&void 0!==i?i:h.default;return{strictSchema:null===(s=null!==(o=e.strictSchema)&&void 0!==o?o:I)||void 0===s||s,strictNumbers:null===(u=null!==(a=e.strictNumbers)&&void 0!==a?a:I)||void 0===u||u,strictTypes:null!==(l=null!==(c=e.strictTypes)&&void 0!==c?c:I)&&void 0!==l?l:"log",strictTuples:null!==(p=null!==(f=e.strictTuples)&&void 0!==f?f:I)&&void 0!==p?p:"log",strictRequired:null!==(v=null!==(d=e.strictRequired)&&void 0!==d?d:I)&&void 0!==v&&v,code:e.code?{...e.code,optimize:A,regExp:N}:{optimize:A,regExp:N},loopRequired:null!==(m=e.loopRequired)&&void 0!==m?m:200,loopEnum:null!==(b=e.loopEnum)&&void 0!==b?b:200,meta:null===(g=e.meta)||void 0===g||g,messages:null===(_=e.messages)||void 0===_||_,inlineRefs:null===(w=e.inlineRefs)||void 0===w||w,schemaId:null!==(O=e.schemaId)&&void 0!==O?O:"$id",addUsedSchema:null===(S=e.addUsedSchema)||void 0===S||S,validateSchema:null===(E=e.validateSchema)||void 0===E||E,validateFormats:null===(T=e.validateFormats)||void 0===T||T,unicodeRegExp:null===(j=e.unicodeRegExp)||void 0===j||j,int32range:null===(P=e.int32range)||void 0===P||P,uriResolver:k}}class w{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,..._(e)};const{es5:t,lines:r}=this.opts.code;this.scope=new c.ValueScope({scope:{},prefixes:m,es5:t,lines:r}),this.logger=function(e){if(!1===e)return I;if(void 0===e)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}(e.logger);const n=e.validateFormats;e.validateFormats=!1,this.RULES=(0,a.getRules)(),O.call(this,b,e,"NOT SUPPORTED"),O.call(this,g,e,"DEPRECATED","warn"),this._metaOpts=P.call(this),e.formats&&T.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&j.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),E.call(this),e.validateFormats=n}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:e,meta:t,schemaId:r}=this.opts;let n=d;"id"===r&&(n={...d},n.id=n.$id,delete n.$id),t&&e&&this.addMetaSchema(n,n[r],!1)}defaultMeta(){const{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta="object"==typeof e?e[t]||e:void 0}validate(e,t){let r;if("string"==typeof e){if(r=this.getSchema(e),!r)throw new Error(`no schema with key or ref "${e}"`)}else r=this.compile(e);const n=r(t);return"$async"in r||(this.errors=r.errors),n}compile(e,t){const r=this._addSchema(e,t);return r.validate||this._compileSchemaEnv(r)}compileAsync(e,t){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");const{loadSchema:r}=this.opts;return n.call(this,e,t);async function n(e,t){await i.call(this,e.$schema);const r=this._addSchema(e,t);return r.validate||o.call(this,r)}async function i(e){e&&!this.getSchema(e)&&await n.call(this,{$ref:e},!0)}async function o(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof s.default))throw t;return a.call(this,t),await u.call(this,t.missingSchema),o.call(this,e)}}function a({missingSchema:e,missingRef:t}){if(this.refs[e])throw new Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function u(e){const r=await c.call(this,e);this.refs[e]||await i.call(this,r.$schema),this.refs[e]||this.addSchema(r,e,t)}async function c(e){const t=this._loading[e];if(t)return t;try{return await(this._loading[e]=r(e))}finally{delete this._loading[e]}}}addSchema(e,t,r,n=this.opts.validateSchema){if(Array.isArray(e)){for(const t of e)this.addSchema(t,void 0,r,n);return this}let i;if("object"==typeof e){const{schemaId:t}=this.opts;if(i=e[t],void 0!==i&&"string"!=typeof i)throw new Error(`schema ${t} must be string`)}return t=(0,l.normalizeId)(t||i),this._checkUnique(t),this.schemas[t]=this._addSchema(e,r,t,n,!0),this}addMetaSchema(e,t,r=this.opts.validateSchema){return this.addSchema(e,t,!0,r),this}validateSchema(e,t){if("boolean"==typeof e)return!0;let r;if(r=e.$schema,void 0!==r&&"string"!=typeof r)throw new Error("$schema must be a string");if(r=r||this.opts.defaultMeta||this.defaultMeta(),!r)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const n=this.validate(r,e);if(!n&&t){const e="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(e);this.logger.error(e)}return n}getSchema(e){let t;for(;"string"==typeof(t=S.call(this,e));)e=t;if(void 0===t){const{schemaId:r}=this.opts,n=new u.SchemaEnv({schema:{},schemaId:r});if(t=u.resolveSchema.call(this,n,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const t=S.call(this,e);return"object"==typeof t&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{const t=e;this._cache.delete(t);let r=e[this.opts.schemaId];return r&&(r=(0,l.normalizeId)(r),delete this.schemas[r],delete this.refs[r]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(const t of e)this.addKeyword(t);return this}addKeyword(e,t){let r;if("string"==typeof e)r=e,"object"==typeof t&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=r);else{if("object"!=typeof e||void 0!==t)throw new Error("invalid addKeywords parameters");if(r=(t=e).keyword,Array.isArray(r)&&!r.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(A.call(this,r,t),!t)return(0,p.eachItem)(r,(e=>N.call(this,e))),this;M.call(this,t);const n={...t,type:(0,f.getJSONTypes)(t.type),schemaType:(0,f.getJSONTypes)(t.schemaType)};return(0,p.eachItem)(r,0===n.type.length?e=>N.call(this,e,n):e=>n.type.forEach((t=>N.call(this,e,n,t)))),this}getKeyword(e){const t=this.RULES.all[e];return"object"==typeof t?t.definition:!!t}removeKeyword(e){const{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(const r of t.rules){const t=r.rules.findIndex((t=>t.keyword===e));t>=0&&r.rules.splice(t,1)}return this}addFormat(e,t){return"string"==typeof t&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:r="data"}={}){return e&&0!==e.length?e.map((e=>`${r}${e.instancePath} ${e.message}`)).reduce(((e,r)=>e+t+r)):"No errors"}$dataMetaSchema(e,t){const r=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(const n of t){const t=n.split("/").slice(1);let i=e;for(const e of t)i=i[e];for(const e in r){const t=r[e];if("object"!=typeof t)continue;const{$data:n}=t.definition,o=i[e];n&&o&&(i[e]=R(o))}}return e}_removeAllSchemas(e,t){for(const r in e){const n=e[r];t&&!t.test(r)||("string"==typeof n?delete e[r]:n&&!n.meta&&(this._cache.delete(n.schema),delete e[r]))}}_addSchema(e,t,r,n=this.opts.validateSchema,i=this.opts.addUsedSchema){let o;const{schemaId:s}=this.opts;if("object"==typeof e)o=e[s];else{if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof e)throw new Error("schema must be object or boolean")}let a=this._cache.get(e);if(void 0!==a)return a;r=(0,l.normalizeId)(o||r);const c=l.getSchemaRefs.call(this,e,r);return a=new u.SchemaEnv({schema:e,schemaId:s,meta:t,baseId:r,localRefs:c}),this._cache.set(a.schema,a),i&&!r.startsWith("#")&&(r&&this._checkUnique(r),this.refs[r]=a),n&&this.validateSchema(e,!0),a}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):u.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){const t=this.opts;this.opts=this._metaOpts;try{u.compileSchema.call(this,e)}finally{this.opts=t}}}function O(e,t,r,n="error"){for(const i in e){const o=i;o in t&&this.logger[n](`${r}: option ${i}. ${e[o]}`)}}function S(e){return e=(0,l.normalizeId)(e),this.schemas[e]||this.refs[e]}function E(){const e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(const t in e)this.addSchema(e[t],t)}function T(){for(const e in this.opts.formats){const t=this.opts.formats[e];t&&this.addFormat(e,t)}}function j(e){if(Array.isArray(e))this.addVocabulary(e);else{this.logger.warn("keywords option as map is deprecated, pass array");for(const t in e){const r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}}function P(){const e={...this.opts};for(const t of v)delete e[t];return e}t.default=w,w.ValidationError=o.default,w.MissingRefError=s.default;const I={log(){},warn(){},error(){}},x=/^[a-z_$][a-z0-9_$:-]*$/i;function A(e,t){const{RULES:r}=this;if((0,p.eachItem)(e,(e=>{if(r.keywords[e])throw new Error(`Keyword ${e} is already defined`);if(!x.test(e))throw new Error(`Keyword ${e} has invalid name`)})),t&&t.$data&&!("code"in t)&&!("validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function N(e,t,r){var n;const i=null==t?void 0:t.post;if(r&&i)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:o}=this;let s=i?o.post:o.rules.find((({type:e})=>e===r));if(s||(s={type:r,rules:[]},o.rules.push(s)),o.keywords[e]=!0,!t)return;const a={keyword:e,definition:{...t,type:(0,f.getJSONTypes)(t.type),schemaType:(0,f.getJSONTypes)(t.schemaType)}};t.before?k.call(this,s,a,t.before):s.rules.push(a),o.all[e]=a,null===(n=t.implements)||void 0===n||n.forEach((e=>this.addKeyword(e)))}function k(e,t,r){const n=e.rules.findIndex((e=>e.keyword===r));n>=0?e.rules.splice(n,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function M(e){let{metaSchema:t}=e;void 0!==t&&(e.$data&&this.opts.$data&&(t=R(t)),e.validateSchema=this.compile(t,!0))}const D={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function R(e){return{anyOf:[e,D]}}},4285:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(6471);n.code='require("ajv/dist/runtime/equal").default',t.default=n},9161:(e,t)=>{"use strict";function r(e){const t=e.length;let r,n=0,i=0;for(;i<t;)n++,r=e.charCodeAt(i++),r>=55296&&r<=56319&&i<t&&(r=e.charCodeAt(i),56320==(64512&r)&&i++);return n}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r,r.code='require("ajv/dist/runtime/ucs2length").default'},407:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(2371);n.code='require("ajv/dist/runtime/uri").default',t.default=n},6448:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}t.default=r},8891:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateAdditionalItems=void 0;const n=r(5669),i=r(8936),o={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:e}})=>n.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>n._`{limit: ${e}}`},code(e){const{parentSchema:t,it:r}=e,{items:n}=t;Array.isArray(n)?s(e,n):(0,i.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas')}};function s(e,t){const{gen:r,schema:o,data:s,keyword:a,it:u}=e;u.items=!0;const c=r.const("len",n._`${s}.length`);if(!1===o)e.setParams({len:t.length}),e.pass(n._`${c} <= ${t.length}`);else if("object"==typeof o&&!(0,i.alwaysValidSchema)(u,o)){const o=r.var("valid",n._`${c} <= ${t.length}`);r.if((0,n.not)(o),(()=>function(o){r.forRange("i",t.length,c,(t=>{e.subschema({keyword:a,dataProp:t,dataPropType:i.Type.Num},o),u.allErrors||r.if((0,n.not)(o),(()=>r.break()))}))}(o))),e.ok(o)}}t.validateAdditionalItems=s,t.default=o},4943:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(3499),i=r(5669),o=r(5247),s=r(8936),a={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>i._`{additionalProperty: ${e.additionalProperty}}`},code(e){const{gen:t,schema:r,parentSchema:a,data:u,errsCount:c,it:l}=e;if(!c)throw new Error("ajv implementation error");const{allErrors:f,opts:p}=l;if(l.props=!0,"all"!==p.removeAdditional&&(0,s.alwaysValidSchema)(l,r))return;const d=(0,n.allSchemaProperties)(a.properties),h=(0,n.allSchemaProperties)(a.patternProperties);function y(e){t.code(i._`delete ${u}[${e}]`)}function v(n){if("all"===p.removeAdditional||p.removeAdditional&&!1===r)y(n);else{if(!1===r)return e.setParams({additionalProperty:n}),e.error(),void(f||t.break());if("object"==typeof r&&!(0,s.alwaysValidSchema)(l,r)){const r=t.name("valid");"failing"===p.removeAdditional?(m(n,r,!1),t.if((0,i.not)(r),(()=>{e.reset(),y(n)}))):(m(n,r),f||t.if((0,i.not)(r),(()=>t.break())))}}}function m(t,r,n){const i={keyword:"additionalProperties",dataProp:t,dataPropType:s.Type.Str};!1===n&&Object.assign(i,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(i,r)}t.forIn("key",u,(r=>{d.length||h.length?t.if(function(r){let o;if(d.length>8){const e=(0,s.schemaRefOrVal)(l,a.properties,"properties");o=(0,n.isOwnProperty)(t,e,r)}else o=d.length?(0,i.or)(...d.map((e=>i._`${r} === ${e}`))):i.nil;return h.length&&(o=(0,i.or)(o,...h.map((t=>i._`${(0,n.usePattern)(e,t)}.test(${r})`)))),(0,i.not)(o)}(r),(()=>v(r))):v(r)})),e.ok(i._`${c} === ${o.default.errors}`)}};t.default=a},2609:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(8936),i={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:r,it:i}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");const o=t.name("valid");r.forEach(((t,r)=>{if((0,n.alwaysValidSchema)(i,t))return;const s=e.subschema({keyword:"allOf",schemaProp:r},o);e.ok(o),e.mergeEvaluated(s)}))}};t.default=i},4279:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:r(3499).validateUnion,error:{message:"must match a schema in anyOf"}};t.default=n},5609:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i=r(8936),o={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:e,max:t}})=>void 0===t?n.str`must contain at least ${e} valid item(s)`:n.str`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>void 0===t?n._`{minContains: ${e}}`:n._`{minContains: ${e}, maxContains: ${t}}`},code(e){const{gen:t,schema:r,parentSchema:o,data:s,it:a}=e;let u,c;const{minContains:l,maxContains:f}=o;a.opts.next?(u=void 0===l?1:l,c=f):u=1;const p=t.const("len",n._`${s}.length`);if(e.setParams({min:u,max:c}),void 0===c&&0===u)return void(0,i.checkStrictMode)(a,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==c&&u>c)return(0,i.checkStrictMode)(a,'"minContains" > "maxContains" is always invalid'),void e.fail();if((0,i.alwaysValidSchema)(a,r)){let t=n._`${p} >= ${u}`;return void 0!==c&&(t=n._`${t} && ${p} <= ${c}`),void e.pass(t)}a.items=!0;const d=t.name("valid");function h(){const e=t.name("_valid"),r=t.let("count",0);y(e,(()=>t.if(e,(()=>function(e){t.code(n._`${e}++`),void 0===c?t.if(n._`${e} >= ${u}`,(()=>t.assign(d,!0).break())):(t.if(n._`${e} > ${c}`,(()=>t.assign(d,!1).break())),1===u?t.assign(d,!0):t.if(n._`${e} >= ${u}`,(()=>t.assign(d,!0))))}(r)))))}function y(r,n){t.forRange("i",0,p,(t=>{e.subschema({keyword:"contains",dataProp:t,dataPropType:i.Type.Num,compositeRule:!0},r),n()}))}void 0===c&&1===u?y(d,(()=>t.if(d,(()=>t.break())))):0===u?(t.let(d,!0),void 0!==c&&t.if(n._`${s}.length > 0`,h)):(t.let(d,!1),h()),e.result(d,(()=>e.reset()))}};t.default=o},5747:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const n=r(5669),i=r(8936),o=r(3499);t.error={message:({params:{property:e,depsCount:t,deps:r}})=>{const i=1===t?"property":"properties";return n.str`must have ${i} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:i}})=>n._`{property: ${e},
|
|
6
6
|
missingProperty: ${i},
|
|
7
7
|
depsCount: ${t},
|
|
8
|
-
deps: ${r}}`};const a={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(e){const[t,r]=function({schema:e}){const t={},r={};for(const n in e)"__proto__"!==n&&((Array.isArray(e[n])?t:r)[n]=e[n]);return[t,r]}(e);s(e,t),u(e,r)}};function s(e,t=e.schema){const{gen:r,data:i,it:a}=e;if(0===Object.keys(t).length)return;const s=r.let("missing");for(const u in t){const c=t[u];if(0===c.length)continue;const l=(0,o.propertyInData)(r,i,u,a.opts.ownProperties);e.setParams({property:u,depsCount:c.length,deps:c.join(", ")}),a.allErrors?r.if(l,(()=>{for(const t of c)(0,o.checkReportMissingProp)(e,t)})):(r.if(n._`${l} && (${(0,o.checkMissingProp)(e,c,s)})`),(0,o.reportMissingProp)(e,s),r.else())}}function u(e,t=e.schema){const{gen:r,data:n,keyword:a,it:s}=e,u=r.name("valid");for(const c in t)(0,i.alwaysValidSchema)(s,t[c])||(r.if((0,o.propertyInData)(r,n,c,s.opts.ownProperties),(()=>{const t=e.subschema({keyword:a,schemaProp:c},u);e.mergeValidEvaluated(t,u)}),(()=>r.var(u,!0))),e.ok(u))}t.validatePropertyDeps=s,t.validateSchemaDeps=u,t.default=a},76:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i=r(8936),o={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>n.str`must match "${e.ifClause}" schema`,params:({params:e})=>n._`{failingKeyword: ${e.ifClause}}`},code(e){const{gen:t,parentSchema:r,it:o}=e;void 0===r.then&&void 0===r.else&&(0,i.checkStrictMode)(o,'"if" without "then" and "else" is ignored');const s=a(o,"then"),u=a(o,"else");if(!s&&!u)return;const c=t.let("valid",!0),l=t.name("_valid");if(function(){const t=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},l);e.mergeEvaluated(t)}(),e.reset(),s&&u){const r=t.let("ifClause");e.setParams({ifClause:r}),t.if(l,f("then",r),f("else",r))}else s?t.if(l,f("then")):t.if((0,n.not)(l),f("else"));function f(r,i){return()=>{const o=e.subschema({keyword:r},l);t.assign(c,l),e.mergeValidEvaluated(o,c),i?t.assign(i,n._`${r}`):e.setParams({ifClause:r})}}e.pass(c,(()=>e.error(!0)))}};function a(e,t){const r=e.schema[t];return void 0!==r&&!(0,i.alwaysValidSchema)(e,r)}t.default=o},6951:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(8891),i=r(1162),o=r(8634),a=r(5151),s=r(5609),u=r(5747),c=r(3021),l=r(4943),f=r(4243),p=r(8103),d=r(2869),h=r(4279),y=r(4880),v=r(2609),m=r(76),b=r(5316);t.default=function(e=!1){const t=[d.default,h.default,y.default,v.default,m.default,b.default,c.default,l.default,u.default,f.default,p.default];return e?t.push(i.default,a.default):t.push(n.default,o.default),t.push(s.default),t}},8634:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;const n=r(5669),i=r(8936),o=r(3499),a={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:r}=e;if(Array.isArray(t))return s(e,"additionalItems",t);r.items=!0,(0,i.alwaysValidSchema)(r,t)||e.ok((0,o.validateArray)(e))}};function s(e,t,r=e.schema){const{gen:o,parentSchema:a,data:s,keyword:u,it:c}=e;!function(e){const{opts:n,errSchemaPath:o}=c,a=r.length,s=a===e.minItems&&(a===e.maxItems||!1===e[t]);if(n.strictTuples&&!s){const e=`"${u}" is ${a}-tuple, but minItems or maxItems/${t} are not specified or different at path "${o}"`;(0,i.checkStrictMode)(c,e,n.strictTuples)}}(a),c.opts.unevaluated&&r.length&&!0!==c.items&&(c.items=i.mergeEvaluated.items(o,r.length,c.items));const l=o.name("valid"),f=o.const("len",n._`${s}.length`);r.forEach(((t,r)=>{(0,i.alwaysValidSchema)(c,t)||(o.if(n._`${f} > ${r}`,(()=>e.subschema({keyword:u,schemaProp:r,dataProp:r},l))),e.ok(l))}))}t.validateTuple=s,t.default=a},5151:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i=r(8936),o=r(3499),a=r(8891),s={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>n.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>n._`{limit: ${e}}`},code(e){const{schema:t,parentSchema:r,it:n}=e,{prefixItems:s}=r;n.items=!0,(0,i.alwaysValidSchema)(n,t)||(s?(0,a.validateAdditionalItems)(e,s):e.ok((0,o.validateArray)(e)))}};t.default=s},2869:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(8936),i={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:r,it:i}=e;if((0,n.alwaysValidSchema)(i,r))return void e.fail();const o=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},o),e.failResult(o,(()=>e.reset()),(()=>e.error()))},error:{message:"must NOT be valid"}};t.default=i},4880:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i=r(8936),o={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:e})=>n._`{passingSchemas: ${e.passing}}`},code(e){const{gen:t,schema:r,parentSchema:o,it:a}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(a.opts.discriminator&&o.discriminator)return;const s=r,u=t.let("valid",!1),c=t.let("passing",null),l=t.name("_valid");e.setParams({passing:c}),t.block((function(){s.forEach(((r,o)=>{let s;(0,i.alwaysValidSchema)(a,r)?t.var(l,!0):s=e.subschema({keyword:"oneOf",schemaProp:o,compositeRule:!0},l),o>0&&t.if(n._`${l} && ${u}`).assign(u,!1).assign(c,n._`[${c}, ${o}]`).else(),t.if(l,(()=>{t.assign(u,!0),t.assign(c,o),s&&e.mergeEvaluated(s,n.Name)}))}))})),e.result(u,(()=>e.reset()),(()=>e.error(!0)))}};t.default=o},8103:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(3499),i=r(5669),o=r(8936),a=r(8936),s={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,data:s,parentSchema:u,it:c}=e,{opts:l}=c,f=(0,n.allSchemaProperties)(r),p=f.filter((e=>(0,o.alwaysValidSchema)(c,r[e])));if(0===f.length||p.length===f.length&&(!c.opts.unevaluated||!0===c.props))return;const d=l.strictSchema&&!l.allowMatchingProperties&&u.properties,h=t.name("valid");!0===c.props||c.props instanceof i.Name||(c.props=(0,a.evaluatedPropsToName)(t,c.props));const{props:y}=c;function v(e){for(const t in d)new RegExp(e).test(t)&&(0,o.checkStrictMode)(c,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function m(r){t.forIn("key",s,(o=>{t.if(i._`${(0,n.usePattern)(e,r)}.test(${o})`,(()=>{const n=p.includes(r);n||e.subschema({keyword:"patternProperties",schemaProp:r,dataProp:o,dataPropType:a.Type.Str},h),c.opts.unevaluated&&!0!==y?t.assign(i._`${y}[${o}]`,!0):n||c.allErrors||t.if((0,i.not)(h),(()=>t.break()))}))}))}!function(){for(const e of f)d&&v(e),c.allErrors?m(e):(t.var(h,!0),m(e),t.if(h))}()}};t.default=s},1162:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(8634),i={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,n.validateTuple)(e,"items")};t.default=i},4243:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(1686),i=r(3499),o=r(8936),a=r(4943),s={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,parentSchema:s,data:u,it:c}=e;"all"===c.opts.removeAdditional&&void 0===s.additionalProperties&&a.default.code(new n.KeywordCxt(c,a.default,"additionalProperties"));const l=(0,i.allSchemaProperties)(r);for(const e of l)c.definedProperties.add(e);c.opts.unevaluated&&l.length&&!0!==c.props&&(c.props=o.mergeEvaluated.props(t,(0,o.toHash)(l),c.props));const f=l.filter((e=>!(0,o.alwaysValidSchema)(c,r[e])));if(0===f.length)return;const p=t.name("valid");for(const r of f)d(r)?h(r):(t.if((0,i.propertyInData)(t,u,r,c.opts.ownProperties)),h(r),c.allErrors||t.else().var(p,!0),t.endIf()),e.it.definedProperties.add(r),e.ok(p);function d(e){return c.opts.useDefaults&&!c.compositeRule&&void 0!==r[e].default}function h(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},p)}}};t.default=s},3021:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i=r(8936),o={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:e})=>n._`{propertyName: ${e.propertyName}}`},code(e){const{gen:t,schema:r,data:o,it:a}=e;if((0,i.alwaysValidSchema)(a,r))return;const s=t.name("valid");t.forIn("key",o,(r=>{e.setParams({propertyName:r}),e.subschema({keyword:"propertyNames",data:r,dataTypes:["string"],propertyName:r,compositeRule:!0},s),t.if((0,n.not)(s),(()=>{e.error(!0),a.allErrors||t.break()}))})),e.ok(s)}};t.default=o},5316:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(8936),i={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){void 0===t.if&&(0,n.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};t.default=i},3499:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateUnion=t.validateArray=t.usePattern=t.callValidateCode=t.schemaProperties=t.allSchemaProperties=t.noPropertyInData=t.propertyInData=t.isOwnProperty=t.hasPropFunc=t.reportMissingProp=t.checkMissingProp=t.checkReportMissingProp=void 0;const n=r(5669),i=r(8936),o=r(5247),a=r(8936);function s(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:n._`Object.prototype.hasOwnProperty`})}function u(e,t,r){return n._`${s(e)}.call(${t}, ${r})`}function c(e,t,r,i){const o=n._`${t}${(0,n.getProperty)(r)} === undefined`;return i?(0,n.or)(o,(0,n.not)(u(e,t,r))):o}function l(e){return e?Object.keys(e).filter((e=>"__proto__"!==e)):[]}t.checkReportMissingProp=function(e,t){const{gen:r,data:i,it:o}=e;r.if(c(r,i,t,o.opts.ownProperties),(()=>{e.setParams({missingProperty:n._`${t}`},!0),e.error()}))},t.checkMissingProp=function({gen:e,data:t,it:{opts:r}},i,o){return(0,n.or)(...i.map((i=>(0,n.and)(c(e,t,i,r.ownProperties),n._`${o} = ${i}`))))},t.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error()},t.hasPropFunc=s,t.isOwnProperty=u,t.propertyInData=function(e,t,r,i){const o=n._`${t}${(0,n.getProperty)(r)} !== undefined`;return i?n._`${o} && ${u(e,t,r)}`:o},t.noPropertyInData=c,t.allSchemaProperties=l,t.schemaProperties=function(e,t){return l(t).filter((r=>!(0,i.alwaysValidSchema)(e,t[r])))},t.callValidateCode=function({schemaCode:e,data:t,it:{gen:r,topSchemaRef:i,schemaPath:a,errorPath:s},it:u},c,l,f){const p=f?n._`${e}, ${t}, ${i}${a}`:t,d=[[o.default.instancePath,(0,n.strConcat)(o.default.instancePath,s)],[o.default.parentData,u.parentData],[o.default.parentDataProperty,u.parentDataProperty],[o.default.rootData,o.default.rootData]];u.opts.dynamicRef&&d.push([o.default.dynamicAnchors,o.default.dynamicAnchors]);const h=n._`${p}, ${r.object(...d)}`;return l!==n.nil?n._`${c}.call(${l}, ${h})`:n._`${c}(${h})`};const f=n._`new RegExp`;t.usePattern=function({gen:e,it:{opts:t}},r){const i=t.unicodeRegExp?"u":"",{regExp:o}=t.code,s=o(r,i);return e.scopeValue("pattern",{key:s.toString(),ref:s,code:n._`${"new RegExp"===o.code?f:(0,a.useFunc)(e,o)}(${r}, ${i})`})},t.validateArray=function(e){const{gen:t,data:r,keyword:o,it:a}=e,s=t.name("valid");if(a.allErrors){const e=t.let("valid",!0);return u((()=>t.assign(e,!1))),e}return t.var(s,!0),u((()=>t.break())),s;function u(a){const u=t.const("len",n._`${r}.length`);t.forRange("i",0,u,(r=>{e.subschema({keyword:o,dataProp:r,dataPropType:i.Type.Num},s),t.if((0,n.not)(s),a)}))}},t.validateUnion=function(e){const{gen:t,schema:r,keyword:o,it:a}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some((e=>(0,i.alwaysValidSchema)(a,e)))&&!a.opts.unevaluated)return;const s=t.let("valid",!1),u=t.name("_valid");t.block((()=>r.forEach(((r,i)=>{const a=e.subschema({keyword:o,schemaProp:i,compositeRule:!0},u);t.assign(s,n._`${s} || ${u}`),e.mergeValidEvaluated(a,u)||t.if((0,n.not)(s))})))),e.result(s,(()=>e.reset()),(()=>e.error(!0)))}},1018:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};t.default=r},2101:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(1018),i=r(1939),o=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",n.default,i.default];t.default=o},1939:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.callRef=t.getValidate=void 0;const n=r(1578),i=r(3499),o=r(5669),a=r(5247),s=r(7382),u=r(8936),c={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:r,it:i}=e,{baseId:a,schemaEnv:u,validateName:c,opts:p,self:d}=i,{root:h}=u;if(("#"===r||"#/"===r)&&a===h.baseId)return function(){if(u===h)return f(e,c,u,u.$async);const r=t.scopeValue("root",{ref:h});return f(e,o._`${r}.validate`,h,h.$async)}();const y=s.resolveRef.call(d,h,a,r);if(void 0===y)throw new n.default(i.opts.uriResolver,a,r);return y instanceof s.SchemaEnv?function(t){const r=l(e,t);f(e,r,t,t.$async)}(y):function(n){const i=t.scopeValue("schema",!0===p.code.source?{ref:n,code:(0,o.stringify)(n)}:{ref:n}),a=t.name("valid"),s=e.subschema({schema:n,dataTypes:[],schemaPath:o.nil,topSchemaRef:i,errSchemaPath:r},a);e.mergeEvaluated(s),e.ok(a)}(y)}};function l(e,t){const{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):o._`${r.scopeValue("wrapper",{ref:t})}.validate`}function f(e,t,r,n){const{gen:s,it:c}=e,{allErrors:l,schemaEnv:f,opts:p}=c,d=p.passContext?a.default.this:o.nil;function h(e){const t=o._`${e}.errors`;s.assign(a.default.vErrors,o._`${a.default.vErrors} === null ? ${t} : ${a.default.vErrors}.concat(${t})`),s.assign(a.default.errors,o._`${a.default.vErrors}.length`)}function y(e){var t;if(!c.opts.unevaluated)return;const n=null===(t=null==r?void 0:r.validate)||void 0===t?void 0:t.evaluated;if(!0!==c.props)if(n&&!n.dynamicProps)void 0!==n.props&&(c.props=u.mergeEvaluated.props(s,n.props,c.props));else{const t=s.var("props",o._`${e}.evaluated.props`);c.props=u.mergeEvaluated.props(s,t,c.props,o.Name)}if(!0!==c.items)if(n&&!n.dynamicItems)void 0!==n.items&&(c.items=u.mergeEvaluated.items(s,n.items,c.items));else{const t=s.var("items",o._`${e}.evaluated.items`);c.items=u.mergeEvaluated.items(s,t,c.items,o.Name)}}n?function(){if(!f.$async)throw new Error("async schema referenced by sync schema");const r=s.let("valid");s.try((()=>{s.code(o._`await ${(0,i.callValidateCode)(e,t,d)}`),y(t),l||s.assign(r,!0)}),(e=>{s.if(o._`!(${e} instanceof ${c.ValidationError})`,(()=>s.throw(e))),h(e),l||s.assign(r,!1)})),e.ok(r)}():e.result((0,i.callValidateCode)(e,t,d),(()=>y(t)),(()=>h(t)))}t.getValidate=l,t.callRef=f,t.default=c},2:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i=r(7421),o=r(7382),a=r(8936),s={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===i.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>n._`{error: ${e}, tag: ${r}, tagValue: ${t}}`},code(e){const{gen:t,data:r,schema:s,parentSchema:u,it:c}=e,{oneOf:l}=u;if(!c.opts.discriminator)throw new Error("discriminator: requires discriminator option");const f=s.propertyName;if("string"!=typeof f)throw new Error("discriminator: requires propertyName");if(s.mapping)throw new Error("discriminator: mapping is not supported");if(!l)throw new Error("discriminator: requires oneOf keyword");const p=t.let("valid",!1),d=t.const("tag",n._`${r}${(0,n.getProperty)(f)}`);function h(r){const i=t.name("valid"),o=e.subschema({keyword:"oneOf",schemaProp:r},i);return e.mergeEvaluated(o,n.Name),i}t.if(n._`typeof ${d} == "string"`,(()=>function(){const r=function(){var e;const t={},r=i(u);let n=!0;for(let t=0;t<l.length;t++){let u=l[t];(null==u?void 0:u.$ref)&&!(0,a.schemaHasRulesButRef)(u,c.self.RULES)&&(u=o.resolveRef.call(c.self,c.schemaEnv.root,c.baseId,null==u?void 0:u.$ref),u instanceof o.SchemaEnv&&(u=u.schema));const p=null===(e=null==u?void 0:u.properties)||void 0===e?void 0:e[f];if("object"!=typeof p)throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${f}"`);n=n&&(r||i(u)),s(p,t)}if(!n)throw new Error(`discriminator: "${f}" must be required`);return t;function i({required:e}){return Array.isArray(e)&&e.includes(f)}function s(e,t){if(e.const)p(e.const,t);else{if(!e.enum)throw new Error(`discriminator: "properties/${f}" must have "const" or "enum"`);for(const r of e.enum)p(r,t)}}function p(e,r){if("string"!=typeof e||e in t)throw new Error(`discriminator: "${f}" values must be unique strings`);t[e]=r}}();t.if(!1);for(const e in r)t.elseIf(n._`${d} === ${e}`),t.assign(p,h(r[e]));t.else(),e.error(!1,{discrError:i.DiscrError.Mapping,tag:d,tagName:f}),t.endIf()}()),(()=>e.error(!1,{discrError:i.DiscrError.Tag,tag:d,tagName:f}))),e.ok(p)}};t.default=s},7421:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0,(r=t.DiscrError||(t.DiscrError={})).Tag="tag",r.Mapping="mapping"},5671:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(2101),i=r(7499),o=r(6951),a=r(4480),s=r(2480),u=[n.default,i.default,(0,o.default)(),a.default,s.metadataVocabulary,s.contentVocabulary];t.default=u},3599:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>n.str`must match format "${e}"`,params:({schemaCode:e})=>n._`{format: ${e}}`},code(e,t){const{gen:r,data:i,$data:o,schema:a,schemaCode:s,it:u}=e,{opts:c,errSchemaPath:l,schemaEnv:f,self:p}=u;c.validateFormats&&(o?function(){const o=r.scopeValue("formats",{ref:p.formats,code:c.code.formats}),a=r.const("fDef",n._`${o}[${s}]`),u=r.let("fType"),l=r.let("format");r.if(n._`typeof ${a} == "object" && !(${a} instanceof RegExp)`,(()=>r.assign(u,n._`${a}.type || "string"`).assign(l,n._`${a}.validate`)),(()=>r.assign(u,n._`"string"`).assign(l,a))),e.fail$data((0,n.or)(!1===c.strictSchema?n.nil:n._`${s} && !${l}`,function(){const e=f.$async?n._`(${a}.async ? await ${l}(${i}) : ${l}(${i}))`:n._`${l}(${i})`,r=n._`(typeof ${l} == "function" ? ${e} : ${l}.test(${i}))`;return n._`${l} && ${l} !== true && ${u} === ${t} && !${r}`}()))}():function(){const o=p.formats[a];if(!o)return void function(){if(!1!==c.strictSchema)throw new Error(e());function e(){return`unknown format "${a}" ignored in schema at path "${l}"`}p.logger.warn(e())}();if(!0===o)return;const[s,u,d]=function(e){const t=e instanceof RegExp?(0,n.regexpCode)(e):c.code.formats?n._`${c.code.formats}${(0,n.getProperty)(a)}`:void 0,i=r.scopeValue("formats",{key:a,ref:e,code:t});return"object"!=typeof e||e instanceof RegExp?["string",e,i]:[e.type||"string",e.validate,n._`${i}.validate`]}(o);s===t&&e.pass(function(){if("object"==typeof o&&!(o instanceof RegExp)&&o.async){if(!f.$async)throw new Error("async format in sync schema");return n._`await ${d}(${i})`}return"function"==typeof u?n._`${d}(${i})`:n._`${d}.test(${i})`}())}())}};t.default=i},4480:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=[r(3599).default];t.default=n},2480:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.contentVocabulary=t.metadataVocabulary=void 0,t.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],t.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]},8549:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i=r(8936),o=r(4285),a={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:e})=>n._`{allowedValue: ${e}}`},code(e){const{gen:t,data:r,$data:a,schemaCode:s,schema:u}=e;a||u&&"object"==typeof u?e.fail$data(n._`!${(0,i.useFunc)(t,o.default)}(${r}, ${s})`):e.fail(n._`${u} !== ${r}`)}};t.default=a},9450:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i=r(8936),o=r(4285),a={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>n._`{allowedValues: ${e}}`},code(e){const{gen:t,data:r,$data:a,schema:s,schemaCode:u,it:c}=e;if(!a&&0===s.length)throw new Error("enum must have non-empty array");const l=s.length>=c.opts.loopEnum;let f;const p=()=>null!=f?f:f=(0,i.useFunc)(t,o.default);let d;if(l||a)d=t.let("valid"),e.block$data(d,(function(){t.assign(d,!1),t.forOf("v",u,(e=>t.if(n._`${p()}(${r}, ${e})`,(()=>t.assign(d,!0).break()))))}));else{if(!Array.isArray(s))throw new Error("ajv implementation error");const e=t.const("vSchema",u);d=(0,n.or)(...s.map(((t,i)=>function(e,t){const i=s[t];return"object"==typeof i&&null!==i?n._`${p()}(${r}, ${e}[${t}])`:n._`${r} === ${i}`}(e,i))))}e.pass(d)}};t.default=a},7499:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(1337),i=r(9706),o=r(9507),a=r(1216),s=r(34),u=r(6962),c=r(1135),l=r(194),f=r(8549),p=r(9450),d=[n.default,i.default,o.default,a.default,s.default,u.default,c.default,l.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},f.default,p.default];t.default=d},1135:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxItems"===e?"more":"fewer";return n.str`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:i}=e,o="maxItems"===t?n.operators.GT:n.operators.LT;e.fail$data(n._`${r}.length ${o} ${i}`)}};t.default=i},9507:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i=r(8936),o=r(9161),a={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxLength"===e?"more":"fewer";return n.str`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:a,it:s}=e,u="maxLength"===t?n.operators.GT:n.operators.LT,c=!1===s.opts.unicode?n._`${r}.length`:n._`${(0,i.useFunc)(e.gen,o.default)}(${r})`;e.fail$data(n._`${c} ${u} ${a}`)}};t.default=a},1337:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i=n.operators,o={maximum:{okStr:"<=",ok:i.LTE,fail:i.GT},minimum:{okStr:">=",ok:i.GTE,fail:i.LT},exclusiveMaximum:{okStr:"<",ok:i.LT,fail:i.GTE},exclusiveMinimum:{okStr:">",ok:i.GT,fail:i.LTE}},a={message:({keyword:e,schemaCode:t})=>n.str`must be ${o[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>n._`{comparison: ${o[e].okStr}, limit: ${t}}`},s={keyword:Object.keys(o),type:"number",schemaType:"number",$data:!0,error:a,code(e){const{keyword:t,data:r,schemaCode:i}=e;e.fail$data(n._`${r} ${o[t].fail} ${i} || isNaN(${r})`)}};t.default=s},34:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxProperties"===e?"more":"fewer";return n.str`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:i}=e,o="maxProperties"===t?n.operators.GT:n.operators.LT;e.fail$data(n._`Object.keys(${r}).length ${o} ${i}`)}};t.default=i},9706:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:e})=>n.str`must be multiple of ${e}`,params:({schemaCode:e})=>n._`{multipleOf: ${e}}`},code(e){const{gen:t,data:r,schemaCode:i,it:o}=e,a=o.opts.multipleOfPrecision,s=t.let("res"),u=a?n._`Math.abs(Math.round(${s}) - ${s}) > 1e-${a}`:n._`${s} !== parseInt(${s})`;e.fail$data(n._`(${i} === 0 || (${s} = ${r}/${i}, ${u}))`)}};t.default=i},1216:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(3499),i=r(5669),o={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>i.str`must match pattern "${e}"`,params:({schemaCode:e})=>i._`{pattern: ${e}}`},code(e){const{data:t,$data:r,schema:o,schemaCode:a,it:s}=e,u=s.opts.unicodeRegExp?"u":"",c=r?i._`(new RegExp(${a}, ${u}))`:(0,n.usePattern)(e,o);e.fail$data(i._`!${c}.test(${t})`)}};t.default=o},6962:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(3499),i=r(5669),o=r(8936),a={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>i.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>i._`{missingProperty: ${e}}`},code(e){const{gen:t,schema:r,schemaCode:a,data:s,$data:u,it:c}=e,{opts:l}=c;if(!u&&0===r.length)return;const f=r.length>=l.loopRequired;if(c.allErrors?function(){if(f||u)e.block$data(i.nil,p);else for(const t of r)(0,n.checkReportMissingProp)(e,t)}():function(){const o=t.let("missing");if(f||u){const r=t.let("valid",!0);e.block$data(r,(()=>function(r,o){e.setParams({missingProperty:r}),t.forOf(r,a,(()=>{t.assign(o,(0,n.propertyInData)(t,s,r,l.ownProperties)),t.if((0,i.not)(o),(()=>{e.error(),t.break()}))}),i.nil)}(o,r))),e.ok(r)}else t.if((0,n.checkMissingProp)(e,r,o)),(0,n.reportMissingProp)(e,o),t.else()}(),l.strictRequired){const t=e.parentSchema.properties,{definedProperties:n}=e.it;for(const e of r)if(void 0===(null==t?void 0:t[e])&&!n.has(e)){const t=`required property "${e}" is not defined at "${c.schemaEnv.baseId+c.errSchemaPath}" (strictRequired)`;(0,o.checkStrictMode)(c,t,c.opts.strictRequired)}}function p(){t.forOf("prop",a,(r=>{e.setParams({missingProperty:r}),t.if((0,n.noPropertyInData)(t,s,r,l.ownProperties),(()=>e.error()))}))}}};t.default=a},194:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(7332),i=r(5669),o=r(8936),a=r(4285),s={message:({params:{i:e,j:t}})=>i.str`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>i._`{i: ${e}, j: ${t}}`},u={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:s,code(e){const{gen:t,data:r,$data:s,schema:u,parentSchema:c,schemaCode:l,it:f}=e;if(!s&&!u)return;const p=t.let("valid"),d=c.items?(0,n.getSchemaTypes)(c.items):[];function h(o,a){const s=t.name("item"),u=(0,n.checkDataTypes)(d,s,f.opts.strictNumbers,n.DataType.Wrong),c=t.const("indices",i._`{}`);t.for(i._`;${o}--;`,(()=>{t.let(s,i._`${r}[${o}]`),t.if(u,i._`continue`),d.length>1&&t.if(i._`typeof ${s} == "string"`,i._`${s} += "_"`),t.if(i._`typeof ${c}[${s}] == "number"`,(()=>{t.assign(a,i._`${c}[${s}]`),e.error(),t.assign(p,!1).break()})).code(i._`${c}[${s}] = ${o}`)}))}function y(n,s){const u=(0,o.useFunc)(t,a.default),c=t.name("outer");t.label(c).for(i._`;${n}--;`,(()=>t.for(i._`${s} = ${n}; ${s}--;`,(()=>t.if(i._`${u}(${r}[${n}], ${r}[${s}])`,(()=>{e.error(),t.assign(p,!1).break(c)}))))))}e.block$data(p,(function(){const n=t.let("i",i._`${r}.length`),o=t.let("j");e.setParams({i:n,j:o}),t.assign(p,!0),t.if(i._`${n} > 1`,(()=>(d.length>0&&!d.some((e=>"object"===e||"array"===e))?h:y)(n,o)))}),i._`${l} === false`),e.ok(p)}};t.default=u},8682:e=>{"use strict";var t=e.exports=function(e,t,n){"function"==typeof t&&(n=t,t={}),r(t,"function"==typeof(n=t.cb||n)?n:n.pre||function(){},n.post||function(){},e,"",e)};function r(e,n,i,o,a,s,u,c,l,f){if(o&&"object"==typeof o&&!Array.isArray(o)){for(var p in n(o,a,s,u,c,l,f),o){var d=o[p];if(Array.isArray(d)){if(p in t.arrayKeywords)for(var h=0;h<d.length;h++)r(e,n,i,d[h],a+"/"+p+"/"+h,s,a,p,o,h)}else if(p in t.propsKeywords){if(d&&"object"==typeof d)for(var y in d)r(e,n,i,d[y],a+"/"+p+"/"+y.replace(/~/g,"~0").replace(/\//g,"~1"),s,a,p,o,y)}else(p in t.keywords||e.allKeys&&!(p in t.skipKeywords))&&r(e,n,i,d,a+"/"+p,s,a,p,o)}i(o,a,s,u,c,l,f)}}t.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},t.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},t.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},t.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0}},5382:(e,t,r)=>{"use strict";r.r(t),r.d(t,{BSONError:()=>O,BSONRegExp:()=>nt,BSONSymbol:()=>it,BSONTypeError:()=>S,BSON_BINARY_SUBTYPE_BYTE_ARRAY:()=>me,BSON_BINARY_SUBTYPE_COLUMN:()=>Oe,BSON_BINARY_SUBTYPE_DEFAULT:()=>ye,BSON_BINARY_SUBTYPE_ENCRYPTED:()=>we,BSON_BINARY_SUBTYPE_FUNCTION:()=>ve,BSON_BINARY_SUBTYPE_MD5:()=>_e,BSON_BINARY_SUBTYPE_USER_DEFINED:()=>Se,BSON_BINARY_SUBTYPE_UUID:()=>be,BSON_BINARY_SUBTYPE_UUID_NEW:()=>ge,BSON_DATA_ARRAY:()=>J,BSON_DATA_BINARY:()=>Z,BSON_DATA_BOOLEAN:()=>te,BSON_DATA_CODE:()=>ae,BSON_DATA_CODE_W_SCOPE:()=>ue,BSON_DATA_DATE:()=>re,BSON_DATA_DBPOINTER:()=>oe,BSON_DATA_DECIMAL128:()=>pe,BSON_DATA_INT:()=>ce,BSON_DATA_LONG:()=>fe,BSON_DATA_MAX_KEY:()=>he,BSON_DATA_MIN_KEY:()=>de,BSON_DATA_NULL:()=>ne,BSON_DATA_NUMBER:()=>H,BSON_DATA_OBJECT:()=>G,BSON_DATA_OID:()=>ee,BSON_DATA_REGEXP:()=>ie,BSON_DATA_STRING:()=>K,BSON_DATA_SYMBOL:()=>se,BSON_DATA_TIMESTAMP:()=>le,BSON_DATA_UNDEFINED:()=>X,BSON_INT32_MAX:()=>U,BSON_INT32_MIN:()=>V,BSON_INT64_MAX:()=>z,BSON_INT64_MIN:()=>Q,Binary:()=>Ee,Code:()=>je,DBRef:()=>Ie,Decimal128:()=>He,Double:()=>Ke,EJSON:()=>vt,Int32:()=>Ge,Long:()=>Re,LongWithoutOverridesClass:()=>ot,Map:()=>mt,MaxKey:()=>Je,MinKey:()=>Ze,ObjectID:()=>rt,ObjectId:()=>rt,Timestamp:()=>at,UUID:()=>Te,calculateObjectSize:()=>ur,default:()=>lr,deserialize:()=>sr,deserializeStream:()=>cr,serialize:()=>or,serializeWithBufferAndIndex:()=>ar,setInternalBufferSize:()=>ir});for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=a.length;s<u;++s)n[s]=a[s],i[a.charCodeAt(s)]=s;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function l(e,t,r){for(var i,o,a=[],s=t;s<r;s+=3)i=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(n[(o=i)>>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63;var f,p,d=function(e){var t,r,n=c(e),a=n[0],s=n[1],u=new o(function(e,t,r){return 3*(t+r)/4-r}(0,a,s)),l=0,f=s>0?a-4:a;for(r=0;r<f;r+=4)t=i[e.charCodeAt(r)]<<18|i[e.charCodeAt(r+1)]<<12|i[e.charCodeAt(r+2)]<<6|i[e.charCodeAt(r+3)],u[l++]=t>>16&255,u[l++]=t>>8&255,u[l++]=255&t;return 2===s&&(t=i[e.charCodeAt(r)]<<2|i[e.charCodeAt(r+1)]>>4,u[l++]=255&t),1===s&&(t=i[e.charCodeAt(r)]<<10|i[e.charCodeAt(r+1)]<<4|i[e.charCodeAt(r+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t),u},h=function(e){for(var t,r=e.length,i=r%3,o=[],a=16383,s=0,u=r-i;s<u;s+=a)o.push(l(e,s,s+a>u?u:s+a));return 1===i?(t=e[r-1],o.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],o.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"=")),o.join("")},y=function(e,t,r,n,i){var o,a,s=8*i-n-1,u=(1<<s)-1,c=u>>1,l=-7,f=r?i-1:0,p=r?-1:1,d=e[t+f];for(f+=p,o=d&(1<<-l)-1,d>>=-l,l+=s;l>0;o=256*o+e[t+f],f+=p,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=n;l>0;a=256*a+e[t+f],f+=p,l-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,n),o-=c}return(d?-1:1)*a*Math.pow(2,o-n)},v=function(e,t,r,n,i,o){var a,s,u,c=8*o-i-1,l=(1<<c)-1,f=l>>1,p=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,h=n?1:-1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+f>=1?p/u:p*Math.pow(2,1-f))*u>=2&&(a++,u/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(t*u-1)*Math.pow(2,i),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;e[r+d]=255&s,d+=h,s/=256,i-=8);for(a=a<<i|s,c+=i;c>0;e[r+d]=255&a,d+=h,a/=256,c-=8);e[r+d-h]|=128*y},m=(f=function(e,t){var r="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=o,t.SlowBuffer=function(e){return+e!=e&&(e=0),o.alloc(+e)},t.INSPECT_MAX_BYTES=50;var n=2147483647;function i(e){if(e>n)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,o.prototype),t}function o(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return u(e)}return a(e,t,r)}function a(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!o.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=0|p(e,t),n=i(r),a=n.write(e,t);return a!==r&&(n=n.slice(0,a)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(U(e,Uint8Array)){var t=new Uint8Array(e);return l(t.buffer,t.byteOffset,t.byteLength)}return c(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+babelHelpers.typeof(e));if(U(e,ArrayBuffer)||e&&U(e.buffer,ArrayBuffer))return l(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(U(e,SharedArrayBuffer)||e&&U(e.buffer,SharedArrayBuffer)))return l(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return o.from(n,t,r);var a=function(e){if(o.isBuffer(e)){var t=0|f(e.length),r=i(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||V(e.length)?i(0):c(e):"Buffer"===e.type&&Array.isArray(e.data)?c(e.data):void 0}(e);if(a)return a;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return o.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+babelHelpers.typeof(e))}function s(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 u(e){return s(e),i(e<0?0:0|f(e))}function c(e){for(var t=e.length<0?0:0|f(e.length),r=i(t),n=0;n<t;n+=1)r[n]=255&e[n];return r}function l(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');var 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,o.prototype),n}function f(e){if(e>=n)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n.toString(16)+" bytes");return 0|e}function p(e,t){if(o.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||U(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 '+babelHelpers.typeof(e));var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return q(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return L(e).length;default:if(i)return n?-1:q(e).length;t=(""+t).toLowerCase(),i=!0}}function m(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return N(this,t,r);case"utf8":case"utf-8":return P(this,t,r);case"ascii":return x(this,t,r);case"latin1":case"binary":return A(this,t,r);case"base64":return j(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function b(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function g(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),V(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=o.from(t,n)),o.isBuffer(t))return 0===t.length?-1:_(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):_(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function _(e,t,r,n,i){var o,a=1,s=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,r/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var l=-1;for(o=r;o<s;o++)if(c(e,o)===c(t,-1===l?0:o-l)){if(-1===l&&(l=o),o-l+1===u)return l*a}else-1!==l&&(o-=o-l),l=-1}else for(r+u>s&&(r=s-u),o=r;o>=0;o--){for(var f=!0,p=0;p<u;p++)if(c(e,o+p)!==c(t,p)){f=!1;break}if(f)return o}return-1}function w(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=t.length;n>o/2&&(n=o/2);for(var a=0;a<n;++a){var s=parseInt(t.substr(2*a,2),16);if(V(s))return a;e[r+a]=s}return a}function O(e,t,r,n){return B(q(t,e.length-r),e,r,n)}function S(e,t,r,n){return B(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function E(e,t,r,n){return B(L(t),e,r,n)}function T(e,t,r,n){return B(function(e,t){for(var r,n,i,o=[],a=0;a<e.length&&!((t-=2)<0);++a)n=(r=e.charCodeAt(a))>>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function j(e,t,r){return 0===t&&r===e.length?h(e):h(e.slice(t,r))}function P(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var o,a,s,u,c=e[i],l=null,f=c>239?4:c>223?3:c>191?2:1;if(i+f<=r)switch(f){case 1:c<128&&(l=c);break;case 2:128==(192&(o=e[i+1]))&&(u=(31&c)<<6|63&o)>127&&(l=u);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(u=(15&c)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(u=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(l=u)}null===l?(l=65533,f=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),i+=f}return function(e){var t=e.length;if(t<=I)return String.fromCharCode.apply(String,e);for(var r="",n=0;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=I));return r}(n)}t.kMaxLength=n,o.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),o.TYPED_ARRAY_SUPPORT||"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(o.prototype,"parent",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.byteOffset}}),o.poolSize=8192,o.from=function(e,t,r){return a(e,t,r)},Object.setPrototypeOf(o.prototype,Uint8Array.prototype),Object.setPrototypeOf(o,Uint8Array),o.alloc=function(e,t,r){return function(e,t,r){return s(e),e<=0?i(e):void 0!==t?"string"==typeof r?i(e).fill(t,r):i(e).fill(t):i(e)}(e,t,r)},o.allocUnsafe=function(e){return u(e)},o.allocUnsafeSlow=function(e){return u(e)},o.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==o.prototype},o.compare=function(e,t){if(U(e,Uint8Array)&&(e=o.from(e,e.offset,e.byteLength)),U(t,Uint8Array)&&(t=o.from(t,t.offset,t.byteLength)),!o.isBuffer(e)||!o.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,n=t.length,i=0,a=Math.min(r,n);i<a;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},o.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}},o.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return o.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=o.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var a=e[r];if(U(a,Uint8Array))i+a.length>n.length?o.from(a).copy(n,i):Uint8Array.prototype.set.call(n,a,i);else{if(!o.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(n,i)}i+=a.length}return n},o.byteLength=p,o.prototype._isBuffer=!0,o.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)b(this,t,t+1);return this},o.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)b(this,t,t+3),b(this,t+1,t+2);return this},o.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)b(this,t,t+7),b(this,t+1,t+6),b(this,t+2,t+5),b(this,t+3,t+4);return this},o.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?P(this,0,e):m.apply(this,arguments)},o.prototype.toLocaleString=o.prototype.toString,o.prototype.equals=function(e){if(!o.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===o.compare(this,e)},o.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},r&&(o.prototype[r]=o.prototype.inspect),o.prototype.compare=function(e,t,r,n,i){if(U(e,Uint8Array)&&(e=o.from(e,e.offset,e.byteLength)),!o.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+babelHelpers.typeof(e));if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var a=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0),u=Math.min(a,s),c=this.slice(n,i),l=e.slice(t,r),f=0;f<u;++f)if(c[f]!==l[f]){a=c[f],s=l[f];break}return a<s?-1:s<a?1:0},o.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},o.prototype.indexOf=function(e,t,r){return g(this,e,t,r,!0)},o.prototype.lastIndexOf=function(e,t,r){return g(this,e,t,r,!1)},o.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return w(this,e,t,r);case"utf8":case"utf-8":return O(this,e,t,r);case"ascii":case"latin1":case"binary":return S(this,e,t,r);case"base64":return E(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var I=4096;function x(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function A(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function N(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=t;o<r;++o)i+=z[e[o]];return i}function k(e,t,r){for(var n=e.slice(t,r),i="",o=0;o<n.length-1;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function M(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function D(e,t,r,n,i,a){if(!o.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<a)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function R(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function C(e,t,r,n,i){return t=+t,r>>>=0,i||R(e,0,r,4),v(e,t,r,n,23,4),r+4}function $(e,t,r,n,i){return t=+t,r>>>=0,i||R(e,0,r,8),v(e,t,r,n,52,8),r+8}o.prototype.slice=function(e,t){var r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);var n=this.subarray(e,t);return Object.setPrototypeOf(n,o.prototype),n},o.prototype.readUintLE=o.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||M(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n},o.prototype.readUintBE=o.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||M(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},o.prototype.readUint8=o.prototype.readUInt8=function(e,t){return e>>>=0,t||M(e,1,this.length),this[e]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(e,t){return e>>>=0,t||M(e,2,this.length),this[e]|this[e+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(e,t){return e>>>=0,t||M(e,2,this.length),this[e]<<8|this[e+1]},o.prototype.readUint32LE=o.prototype.readUInt32LE=function(e,t){return e>>>=0,t||M(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},o.prototype.readUint32BE=o.prototype.readUInt32BE=function(e,t){return e>>>=0,t||M(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},o.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||M(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*t)),n},o.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||M(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},o.prototype.readInt8=function(e,t){return e>>>=0,t||M(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},o.prototype.readInt16LE=function(e,t){e>>>=0,t||M(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt16BE=function(e,t){e>>>=0,t||M(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt32LE=function(e,t){return e>>>=0,t||M(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},o.prototype.readInt32BE=function(e,t){return e>>>=0,t||M(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},o.prototype.readFloatLE=function(e,t){return e>>>=0,t||M(e,4,this.length),y(this,e,!0,23,4)},o.prototype.readFloatBE=function(e,t){return e>>>=0,t||M(e,4,this.length),y(this,e,!1,23,4)},o.prototype.readDoubleLE=function(e,t){return e>>>=0,t||M(e,8,this.length),y(this,e,!0,52,8)},o.prototype.readDoubleBE=function(e,t){return e>>>=0,t||M(e,8,this.length),y(this,e,!1,52,8)},o.prototype.writeUintLE=o.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||D(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[t]=255&e;++o<r&&(i*=256);)this[t+o]=e/i&255;return t+r},o.prototype.writeUintBE=o.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||D(this,e,t,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},o.prototype.writeUint8=o.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,1,255,0),this[t]=255&e,t+1},o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},o.prototype.writeUint16BE=o.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},o.prototype.writeUint32LE=o.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||D(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},o.prototype.writeUint32BE=o.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||D(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},o.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);D(this,e,t,r,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o<r&&(a*=256);)e<0&&0===s&&0!==this[t+o-1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+r},o.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);D(this,e,t,r,i-1,-i)}var o=r-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+r},o.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},o.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},o.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},o.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||D(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},o.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},o.prototype.writeFloatLE=function(e,t,r){return C(this,e,t,!0,r)},o.prototype.writeFloatBE=function(e,t,r){return C(this,e,t,!1,r)},o.prototype.writeDoubleLE=function(e,t,r){return $(this,e,t,!0,r)},o.prototype.writeDoubleBE=function(e,t,r){return $(this,e,t,!1,r)},o.prototype.copy=function(e,t,r,n){if(!o.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),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<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),e.length-t<n-r&&(n=e.length-t+r);var i=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),i},o.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&&!o.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){var i=e.charCodeAt(0);("utf8"===n&&i<128||"latin1"===n)&&(e=i)}}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;var a;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(a=t;a<r;++a)this[a]=e;else{var s=o.isBuffer(e)?e:o.from(e,n),u=s.length;if(0===u)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(a=0;a<r-t;++a)this[a+t]=s[a%u]}return this};var F=/[^+/0-9A-Za-z-_]/g;function q(e,t){var r;t=t||1/0;for(var n=e.length,i=null,o=[],a=0;a<n;++a){if((r=e.charCodeAt(a))>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function L(e){return d(function(e){if((e=(e=e.split("=")[0]).trim().replace(F,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function B(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function U(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function V(e){return e!=e}var z=function(){for(var e="0123456789abcdef",t=new Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)t[n+i]=e[r]+e[i];return t}()},f(p={exports:{}},p.exports),p.exports),b=m.Buffer;m.SlowBuffer,m.INSPECT_MAX_BYTES,m.kMaxLength;var g=function(e,t){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},g(e,t)};function _(e,t){function r(){this.constructor=e}g(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var w=function(){return w=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},w.apply(this,arguments)},O=function(e){function t(r){var n=e.call(this,r)||this;return Object.setPrototypeOf(n,t.prototype),n}return _(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"BSONError"},enumerable:!1,configurable:!0}),t}(Error),S=function(e){function t(r){var n=e.call(this,r)||this;return Object.setPrototypeOf(n,t.prototype),n}return _(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"BSONTypeError"},enumerable:!1,configurable:!0}),t}(TypeError);function E(e){return e&&e.Math==Math&&e}function T(){return E("object"==typeof globalThis&&globalThis)||E("object"==typeof window&&window)||E("object"==typeof self&&self)||E("object"==typeof r.g&&r.g)||Function("return this")()}function j(e){return e.toString().replace("function(","function (")}var P=function(e){var t,r="object"==typeof(t=T()).navigator&&"ReactNative"===t.navigator.product?"BSON: For React Native please polyfill crypto.getRandomValues, e.g. using: https://www.npmjs.com/package/react-native-get-random-values.":"BSON: No cryptographic implementation for random bytes present, falling back to a less secure implementation.";console.warn(r);for(var n=b.alloc(e),i=0;i<e;++i)n[i]=Math.floor(256*Math.random());return n},I=function(){if("undefined"!=typeof window){var e=window.crypto||window.msCrypto;if(e&&e.getRandomValues)return function(t){return e.getRandomValues(b.alloc(t))}}return void 0!==r.g&&r.g.crypto&&r.g.crypto.getRandomValues?function(e){return r.g.crypto.getRandomValues(b.alloc(e))}:P}();function x(e){return["[object ArrayBuffer]","[object SharedArrayBuffer]"].includes(Object.prototype.toString.call(e))}function A(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)}function N(e){return"[object BigInt64Array]"===Object.prototype.toString.call(e)}function k(e){return"[object BigUint64Array]"===Object.prototype.toString.call(e)}function M(e){return"[object RegExp]"===Object.prototype.toString.call(e)}function D(e){return R(e)&&"[object Date]"===Object.prototype.toString.call(e)}function R(e){return"object"==typeof e&&null!==e}function C(e,t){var r=!1;return function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return r||(console.warn(t),r=!0),e.apply(this,n)}}function $(e){if(ArrayBuffer.isView(e))return b.from(e.buffer,e.byteOffset,e.byteLength);if(x(e))return b.from(e);throw new S("Must use either Buffer or TypedArray")}var F=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[0-9a-f]{12}4[0-9a-f]{3}[89ab][0-9a-f]{15})$/i,q=function(e){return"string"==typeof e&&F.test(e)},L=function(e){if(!q(e))throw new S('UUID string representations must be a 32 or 36 character hex string (dashes excluded/included). Format: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" or "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx".');var t=e.replace(/-/g,"");return b.from(t,"hex")},B=function(e,t){return void 0===t&&(t=!0),t?e.toString("hex",0,4)+"-"+e.toString("hex",4,6)+"-"+e.toString("hex",6,8)+"-"+e.toString("hex",8,10)+"-"+e.toString("hex",10,16):e.toString("hex")},U=2147483647,V=-2147483648,z=Math.pow(2,63)-1,Q=-Math.pow(2,63),Y=Math.pow(2,53),W=-Math.pow(2,53),H=1,K=2,G=3,J=4,Z=5,X=6,ee=7,te=8,re=9,ne=10,ie=11,oe=12,ae=13,se=14,ue=15,ce=16,le=17,fe=18,pe=19,de=255,he=127,ye=0,ve=1,me=2,be=3,ge=4,_e=5,we=6,Oe=7,Se=128,Ee=function(){function e(t,r){if(!(this instanceof e))return new e(t,r);if(!(null==t||"string"==typeof t||ArrayBuffer.isView(t)||t instanceof ArrayBuffer||Array.isArray(t)))throw new S("Binary can only be constructed from string, Buffer, TypedArray, or Array<number>");this.sub_type=null!=r?r:e.BSON_BINARY_SUBTYPE_DEFAULT,null==t?(this.buffer=b.alloc(e.BUFFER_SIZE),this.position=0):("string"==typeof t?this.buffer=b.from(t,"binary"):Array.isArray(t)?this.buffer=b.from(t):this.buffer=$(t),this.position=this.buffer.byteLength)}return e.prototype.put=function(t){if("string"==typeof t&&1!==t.length)throw new S("only accepts single character String");if("number"!=typeof t&&1!==t.length)throw new S("only accepts single character Uint8Array or Array");var r;if((r="string"==typeof t?t.charCodeAt(0):"number"==typeof t?t:t[0])<0||r>255)throw new S("only accepts number in a valid unsigned byte range 0-255");if(this.buffer.length>this.position)this.buffer[this.position++]=r;else{var n=b.alloc(e.BUFFER_SIZE+this.buffer.length);this.buffer.copy(n,0,0,this.buffer.length),this.buffer=n,this.buffer[this.position++]=r}},e.prototype.write=function(e,t){if(t="number"==typeof t?t:this.position,this.buffer.length<t+e.length){var r=b.alloc(this.buffer.length+e.length);this.buffer.copy(r,0,0,this.buffer.length),this.buffer=r}ArrayBuffer.isView(e)?(this.buffer.set($(e),t),this.position=t+e.byteLength>this.position?t+e.length:this.position):"string"==typeof e&&(this.buffer.write(e,t,e.length,"binary"),this.position=t+e.length>this.position?t+e.length:this.position)},e.prototype.read=function(e,t){return t=t&&t>0?t:this.position,this.buffer.slice(e,e+t)},e.prototype.value=function(e){return(e=!!e)&&this.buffer.length===this.position?this.buffer:e?this.buffer.slice(0,this.position):this.buffer.toString("binary",0,this.position)},e.prototype.length=function(){return this.position},e.prototype.toJSON=function(){return this.buffer.toString("base64")},e.prototype.toString=function(e){return this.buffer.toString(e)},e.prototype.toExtendedJSON=function(e){e=e||{};var t=this.buffer.toString("base64"),r=Number(this.sub_type).toString(16);return e.legacy?{$binary:t,$type:1===r.length?"0"+r:r}:{$binary:{base64:t,subType:1===r.length?"0"+r:r}}},e.prototype.toUUID=function(){if(this.sub_type===e.SUBTYPE_UUID)return new Te(this.buffer.slice(0,this.position));throw new O('Binary sub_type "'.concat(this.sub_type,'" is not supported for converting to UUID. Only "').concat(e.SUBTYPE_UUID,'" is currently supported.'))},e.fromExtendedJSON=function(t,r){var n,i;if(r=r||{},"$binary"in t?r.legacy&&"string"==typeof t.$binary&&"$type"in t?(i=t.$type?parseInt(t.$type,16):0,n=b.from(t.$binary,"base64")):"string"!=typeof t.$binary&&(i=t.$binary.subType?parseInt(t.$binary.subType,16):0,n=b.from(t.$binary.base64,"base64")):"$uuid"in t&&(i=4,n=L(t.$uuid)),!n)throw new S("Unexpected Binary Extended JSON format ".concat(JSON.stringify(t)));return i===ge?new Te(n):new e(n,i)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){var e=this.value(!0);return'new Binary(Buffer.from("'.concat(e.toString("hex"),'", "hex"), ').concat(this.sub_type,")")},e.BSON_BINARY_SUBTYPE_DEFAULT=0,e.BUFFER_SIZE=256,e.SUBTYPE_DEFAULT=0,e.SUBTYPE_FUNCTION=1,e.SUBTYPE_BYTE_ARRAY=2,e.SUBTYPE_UUID_OLD=3,e.SUBTYPE_UUID=4,e.SUBTYPE_MD5=5,e.SUBTYPE_ENCRYPTED=6,e.SUBTYPE_COLUMN=7,e.SUBTYPE_USER_DEFINED=128,e}();Object.defineProperty(Ee.prototype,"_bsontype",{value:"Binary"});var Te=function(e){function t(r){var n,i,o=this;if(null==r)n=t.generate();else if(r instanceof t)n=b.from(r.buffer),i=r.__id;else if(ArrayBuffer.isView(r)&&16===r.byteLength)n=$(r);else{if("string"!=typeof r)throw new S("Argument passed in UUID constructor must be a UUID, a 16 byte Buffer or a 32/36 character hex string (dashes excluded/included, format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).");n=L(r)}return(o=e.call(this,n,ge)||this).__id=i,o}return _(t,e),Object.defineProperty(t.prototype,"id",{get:function(){return this.buffer},set:function(e){this.buffer=e,t.cacheHexString&&(this.__id=B(e))},enumerable:!1,configurable:!0}),t.prototype.toHexString=function(e){if(void 0===e&&(e=!0),t.cacheHexString&&this.__id)return this.__id;var r=B(this.id,e);return t.cacheHexString&&(this.__id=r),r},t.prototype.toString=function(e){return e?this.id.toString(e):this.toHexString()},t.prototype.toJSON=function(){return this.toHexString()},t.prototype.equals=function(e){if(!e)return!1;if(e instanceof t)return e.id.equals(this.id);try{return new t(e).id.equals(this.id)}catch(e){return!1}},t.prototype.toBinary=function(){return new Ee(this.id,Ee.SUBTYPE_UUID)},t.generate=function(){var e=I(16);return e[6]=15&e[6]|64,e[8]=63&e[8]|128,b.from(e)},t.isValid=function(e){return!!e&&(e instanceof t||("string"==typeof e?q(e):!!A(e)&&16===e.length&&64==(240&e[6])&&128==(128&e[8])))},t.createFromHexString=function(e){return new t(L(e))},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return'new UUID("'.concat(this.toHexString(),'")')},t}(Ee),je=function(){function e(t,r){if(!(this instanceof e))return new e(t,r);this.code=t,this.scope=r}return e.prototype.toJSON=function(){return{code:this.code,scope:this.scope}},e.prototype.toExtendedJSON=function(){return this.scope?{$code:this.code,$scope:this.scope}:{$code:this.code}},e.fromExtendedJSON=function(t){return new e(t.$code,t.$scope)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){var e=this.toJSON();return'new Code("'.concat(String(e.code),'"').concat(e.scope?", ".concat(JSON.stringify(e.scope)):"",")")},e}();function Pe(e){return R(e)&&null!=e.$id&&"string"==typeof e.$ref&&(null==e.$db||"string"==typeof e.$db)}Object.defineProperty(je.prototype,"_bsontype",{value:"Code"});var Ie=function(){function e(t,r,n,i){if(!(this instanceof e))return new e(t,r,n,i);var o=t.split(".");2===o.length&&(n=o.shift(),t=o.shift()),this.collection=t,this.oid=r,this.db=n,this.fields=i||{}}return Object.defineProperty(e.prototype,"namespace",{get:function(){return this.collection},set:function(e){this.collection=e},enumerable:!1,configurable:!0}),e.prototype.toJSON=function(){var e=Object.assign({$ref:this.collection,$id:this.oid},this.fields);return null!=this.db&&(e.$db=this.db),e},e.prototype.toExtendedJSON=function(e){e=e||{};var t={$ref:this.collection,$id:this.oid};return e.legacy?t:(this.db&&(t.$db=this.db),t=Object.assign(t,this.fields))},e.fromExtendedJSON=function(t){var r=Object.assign({},t);return delete r.$ref,delete r.$id,delete r.$db,new e(t.$ref,t.$id,t.$db,r)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){var e=void 0===this.oid||void 0===this.oid.toString?this.oid:this.oid.toString();return'new DBRef("'.concat(this.namespace,'", new ObjectId("').concat(String(e),'")').concat(this.db?', "'.concat(this.db,'"'):"",")")},e}();Object.defineProperty(Ie.prototype,"_bsontype",{value:"DBRef"});var xe=void 0;try{xe=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(e){}var Ae=4294967296,Ne=0x10000000000000000,ke=Ne/2,Me={},De={},Re=function(){function e(t,r,n){if(void 0===t&&(t=0),!(this instanceof e))return new e(t,r,n);"bigint"==typeof t?Object.assign(this,e.fromBigInt(t,!!r)):"string"==typeof t?Object.assign(this,e.fromString(t,!!r)):(this.low=0|t,this.high=0|r,this.unsigned=!!n),Object.defineProperty(this,"__isLong__",{value:!0,configurable:!1,writable:!1,enumerable:!1})}return e.fromBits=function(t,r,n){return new e(t,r,n)},e.fromInt=function(t,r){var n,i,o;return r?(o=0<=(t>>>=0)&&t<256)&&(i=De[t])?i:(n=e.fromBits(t,(0|t)<0?-1:0,!0),o&&(De[t]=n),n):(o=-128<=(t|=0)&&t<128)&&(i=Me[t])?i:(n=e.fromBits(t,t<0?-1:0,!1),o&&(Me[t]=n),n)},e.fromNumber=function(t,r){if(isNaN(t))return r?e.UZERO:e.ZERO;if(r){if(t<0)return e.UZERO;if(t>=Ne)return e.MAX_UNSIGNED_VALUE}else{if(t<=-ke)return e.MIN_VALUE;if(t+1>=ke)return e.MAX_VALUE}return t<0?e.fromNumber(-t,r).neg():e.fromBits(t%Ae|0,t/Ae|0,r)},e.fromBigInt=function(t,r){return e.fromString(t.toString(),r)},e.fromString=function(t,r,n){if(0===t.length)throw Error("empty string");if("NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return e.ZERO;if("number"==typeof r?(n=r,r=!1):r=!!r,(n=n||10)<2||36<n)throw RangeError("radix");var i;if((i=t.indexOf("-"))>0)throw Error("interior hyphen");if(0===i)return e.fromString(t.substring(1),r,n).neg();for(var o=e.fromNumber(Math.pow(n,8)),a=e.ZERO,s=0;s<t.length;s+=8){var u=Math.min(8,t.length-s),c=parseInt(t.substring(s,s+u),n);if(u<8){var l=e.fromNumber(Math.pow(n,u));a=a.mul(l).add(e.fromNumber(c))}else a=(a=a.mul(o)).add(e.fromNumber(c))}return a.unsigned=r,a},e.fromBytes=function(t,r,n){return n?e.fromBytesLE(t,r):e.fromBytesBE(t,r)},e.fromBytesLE=function(t,r){return new e(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,r)},e.fromBytesBE=function(t,r){return new e(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],r)},e.isLong=function(e){return R(e)&&!0===e.__isLong__},e.fromValue=function(t,r){return"number"==typeof t?e.fromNumber(t,r):"string"==typeof t?e.fromString(t,r):e.fromBits(t.low,t.high,"boolean"==typeof r?r:t.unsigned)},e.prototype.add=function(t){e.isLong(t)||(t=e.fromValue(t));var r=this.high>>>16,n=65535&this.high,i=this.low>>>16,o=65535&this.low,a=t.high>>>16,s=65535&t.high,u=t.low>>>16,c=0,l=0,f=0,p=0;return f+=(p+=o+(65535&t.low))>>>16,p&=65535,l+=(f+=i+u)>>>16,f&=65535,c+=(l+=n+s)>>>16,l&=65535,c+=r+a,c&=65535,e.fromBits(f<<16|p,c<<16|l,this.unsigned)},e.prototype.and=function(t){return e.isLong(t)||(t=e.fromValue(t)),e.fromBits(this.low&t.low,this.high&t.high,this.unsigned)},e.prototype.compare=function(t){if(e.isLong(t)||(t=e.fromValue(t)),this.eq(t))return 0;var r=this.isNegative(),n=t.isNegative();return r&&!n?-1:!r&&n?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},e.prototype.comp=function(e){return this.compare(e)},e.prototype.divide=function(t){if(e.isLong(t)||(t=e.fromValue(t)),t.isZero())throw Error("division by zero");if(xe){if(!this.unsigned&&-2147483648===this.high&&-1===t.low&&-1===t.high)return this;var r=(this.unsigned?xe.div_u:xe.div_s)(this.low,this.high,t.low,t.high);return e.fromBits(r,xe.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?e.UZERO:e.ZERO;var n,i,o;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return e.UZERO;if(t.gt(this.shru(1)))return e.UONE;o=e.UZERO}else{if(this.eq(e.MIN_VALUE))return t.eq(e.ONE)||t.eq(e.NEG_ONE)?e.MIN_VALUE:t.eq(e.MIN_VALUE)?e.ONE:(n=this.shr(1).div(t).shl(1)).eq(e.ZERO)?t.isNegative()?e.ONE:e.NEG_ONE:(i=this.sub(t.mul(n)),o=n.add(i.div(t)));if(t.eq(e.MIN_VALUE))return this.unsigned?e.UZERO:e.ZERO;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();o=e.ZERO}for(i=this;i.gte(t);){n=Math.max(1,Math.floor(i.toNumber()/t.toNumber()));for(var a=Math.ceil(Math.log(n)/Math.LN2),s=a<=48?1:Math.pow(2,a-48),u=e.fromNumber(n),c=u.mul(t);c.isNegative()||c.gt(i);)n-=s,c=(u=e.fromNumber(n,this.unsigned)).mul(t);u.isZero()&&(u=e.ONE),o=o.add(u),i=i.sub(c)}return o},e.prototype.div=function(e){return this.divide(e)},e.prototype.equals=function(t){return e.isLong(t)||(t=e.fromValue(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&this.high===t.high&&this.low===t.low},e.prototype.eq=function(e){return this.equals(e)},e.prototype.getHighBits=function(){return this.high},e.prototype.getHighBitsUnsigned=function(){return this.high>>>0},e.prototype.getLowBits=function(){return this.low},e.prototype.getLowBitsUnsigned=function(){return this.low>>>0},e.prototype.getNumBitsAbs=function(){if(this.isNegative())return this.eq(e.MIN_VALUE)?64:this.neg().getNumBitsAbs();var t,r=0!==this.high?this.high:this.low;for(t=31;t>0&&0==(r&1<<t);t--);return 0!==this.high?t+33:t+1},e.prototype.greaterThan=function(e){return this.comp(e)>0},e.prototype.gt=function(e){return this.greaterThan(e)},e.prototype.greaterThanOrEqual=function(e){return this.comp(e)>=0},e.prototype.gte=function(e){return this.greaterThanOrEqual(e)},e.prototype.ge=function(e){return this.greaterThanOrEqual(e)},e.prototype.isEven=function(){return 0==(1&this.low)},e.prototype.isNegative=function(){return!this.unsigned&&this.high<0},e.prototype.isOdd=function(){return 1==(1&this.low)},e.prototype.isPositive=function(){return this.unsigned||this.high>=0},e.prototype.isZero=function(){return 0===this.high&&0===this.low},e.prototype.lessThan=function(e){return this.comp(e)<0},e.prototype.lt=function(e){return this.lessThan(e)},e.prototype.lessThanOrEqual=function(e){return this.comp(e)<=0},e.prototype.lte=function(e){return this.lessThanOrEqual(e)},e.prototype.modulo=function(t){if(e.isLong(t)||(t=e.fromValue(t)),xe){var r=(this.unsigned?xe.rem_u:xe.rem_s)(this.low,this.high,t.low,t.high);return e.fromBits(r,xe.get_high(),this.unsigned)}return this.sub(this.div(t).mul(t))},e.prototype.mod=function(e){return this.modulo(e)},e.prototype.rem=function(e){return this.modulo(e)},e.prototype.multiply=function(t){if(this.isZero())return e.ZERO;if(e.isLong(t)||(t=e.fromValue(t)),xe){var r=xe.mul(this.low,this.high,t.low,t.high);return e.fromBits(r,xe.get_high(),this.unsigned)}if(t.isZero())return e.ZERO;if(this.eq(e.MIN_VALUE))return t.isOdd()?e.MIN_VALUE:e.ZERO;if(t.eq(e.MIN_VALUE))return this.isOdd()?e.MIN_VALUE:e.ZERO;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(e.TWO_PWR_24)&&t.lt(e.TWO_PWR_24))return e.fromNumber(this.toNumber()*t.toNumber(),this.unsigned);var n=this.high>>>16,i=65535&this.high,o=this.low>>>16,a=65535&this.low,s=t.high>>>16,u=65535&t.high,c=t.low>>>16,l=65535&t.low,f=0,p=0,d=0,h=0;return d+=(h+=a*l)>>>16,h&=65535,p+=(d+=o*l)>>>16,d&=65535,p+=(d+=a*c)>>>16,d&=65535,f+=(p+=i*l)>>>16,p&=65535,f+=(p+=o*c)>>>16,p&=65535,f+=(p+=a*u)>>>16,p&=65535,f+=n*l+i*c+o*u+a*s,f&=65535,e.fromBits(d<<16|h,f<<16|p,this.unsigned)},e.prototype.mul=function(e){return this.multiply(e)},e.prototype.negate=function(){return!this.unsigned&&this.eq(e.MIN_VALUE)?e.MIN_VALUE:this.not().add(e.ONE)},e.prototype.neg=function(){return this.negate()},e.prototype.not=function(){return e.fromBits(~this.low,~this.high,this.unsigned)},e.prototype.notEquals=function(e){return!this.equals(e)},e.prototype.neq=function(e){return this.notEquals(e)},e.prototype.ne=function(e){return this.notEquals(e)},e.prototype.or=function(t){return e.isLong(t)||(t=e.fromValue(t)),e.fromBits(this.low|t.low,this.high|t.high,this.unsigned)},e.prototype.shiftLeft=function(t){return e.isLong(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?e.fromBits(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):e.fromBits(0,this.low<<t-32,this.unsigned)},e.prototype.shl=function(e){return this.shiftLeft(e)},e.prototype.shiftRight=function(t){return e.isLong(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?e.fromBits(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):e.fromBits(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},e.prototype.shr=function(e){return this.shiftRight(e)},e.prototype.shiftRightUnsigned=function(t){if(e.isLong(t)&&(t=t.toInt()),0==(t&=63))return this;var r=this.high;if(t<32){var n=this.low;return e.fromBits(n>>>t|r<<32-t,r>>>t,this.unsigned)}return 32===t?e.fromBits(r,0,this.unsigned):e.fromBits(r>>>t-32,0,this.unsigned)},e.prototype.shr_u=function(e){return this.shiftRightUnsigned(e)},e.prototype.shru=function(e){return this.shiftRightUnsigned(e)},e.prototype.subtract=function(t){return e.isLong(t)||(t=e.fromValue(t)),this.add(t.neg())},e.prototype.sub=function(e){return this.subtract(e)},e.prototype.toInt=function(){return this.unsigned?this.low>>>0:this.low},e.prototype.toNumber=function(){return this.unsigned?(this.high>>>0)*Ae+(this.low>>>0):this.high*Ae+(this.low>>>0)},e.prototype.toBigInt=function(){return BigInt(this.toString())},e.prototype.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},e.prototype.toBytesLE=function(){var e=this.high,t=this.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24,255&e,e>>>8&255,e>>>16&255,e>>>24]},e.prototype.toBytesBE=function(){var e=this.high,t=this.low;return[e>>>24,e>>>16&255,e>>>8&255,255&e,t>>>24,t>>>16&255,t>>>8&255,255&t]},e.prototype.toSigned=function(){return this.unsigned?e.fromBits(this.low,this.high,!1):this},e.prototype.toString=function(t){if((t=t||10)<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(e.MIN_VALUE)){var r=e.fromNumber(t),n=this.div(r),i=n.mul(r).sub(this);return n.toString(t)+i.toInt().toString(t)}return"-"+this.neg().toString(t)}for(var o=e.fromNumber(Math.pow(t,6),this.unsigned),a=this,s="";;){var u=a.div(o),c=(a.sub(u.mul(o)).toInt()>>>0).toString(t);if((a=u).isZero())return c+s;for(;c.length<6;)c="0"+c;s=""+c+s}},e.prototype.toUnsigned=function(){return this.unsigned?this:e.fromBits(this.low,this.high,!0)},e.prototype.xor=function(t){return e.isLong(t)||(t=e.fromValue(t)),e.fromBits(this.low^t.low,this.high^t.high,this.unsigned)},e.prototype.eqz=function(){return this.isZero()},e.prototype.le=function(e){return this.lessThanOrEqual(e)},e.prototype.toExtendedJSON=function(e){return e&&e.relaxed?this.toNumber():{$numberLong:this.toString()}},e.fromExtendedJSON=function(t,r){var n=e.fromString(t.$numberLong);return r&&r.relaxed?n.toNumber():n},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return'new Long("'.concat(this.toString(),'"').concat(this.unsigned?", true":"",")")},e.TWO_PWR_24=e.fromInt(16777216),e.MAX_UNSIGNED_VALUE=e.fromBits(-1,-1,!0),e.ZERO=e.fromInt(0),e.UZERO=e.fromInt(0,!0),e.ONE=e.fromInt(1),e.UONE=e.fromInt(1,!0),e.NEG_ONE=e.fromInt(-1),e.MAX_VALUE=e.fromBits(-1,2147483647,!1),e.MIN_VALUE=e.fromBits(0,-2147483648,!1),e}();Object.defineProperty(Re.prototype,"__isLong__",{value:!0}),Object.defineProperty(Re.prototype,"_bsontype",{value:"Long"});var Ce=/^(\+|-)?(\d+|(\d*\.\d*))?(E|e)?([-+])?(\d+)?$/,$e=/^(\+|-)?(Infinity|inf)$/i,Fe=/^(\+|-)?NaN$/i,qe=6111,Le=-6176,Be=[124,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),Ue=[248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),Ve=[120,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),ze=/^([-+])?(\d+)?$/;function Qe(e){return!isNaN(parseInt(e,10))}function Ye(e){var t=Re.fromNumber(1e9),r=Re.fromNumber(0);if(!(e.parts[0]||e.parts[1]||e.parts[2]||e.parts[3]))return{quotient:e,rem:r};for(var n=0;n<=3;n++)r=(r=r.shiftLeft(32)).add(new Re(e.parts[n],0)),e.parts[n]=r.div(t).low,r=r.modulo(t);return{quotient:e,rem:r}}function We(e,t){throw new S('"'.concat(e,'" is not a valid Decimal128 string - ').concat(t))}var He=function(){function e(t){if(!(this instanceof e))return new e(t);if("string"==typeof t)this.bytes=e.fromString(t).bytes;else{if(!A(t))throw new S("Decimal128 must take a Buffer or string");if(16!==t.byteLength)throw new S("Decimal128 must take a Buffer of 16 bytes");this.bytes=t}}return e.fromString=function(t){var r,n=!1,i=!1,o=!1,a=0,s=0,u=0,c=0,l=0,f=[0],p=0,d=0,h=0,y=0,v=0,m=0,g=new Re(0,0),_=new Re(0,0),w=0;if(t.length>=7e3)throw new S(t+" not a valid Decimal128 string");var O=t.match(Ce),E=t.match($e),T=t.match(Fe);if(!O&&!E&&!T||0===t.length)throw new S(t+" not a valid Decimal128 string");if(O){var j=O[2],P=O[4],I=O[5],x=O[6];P&&void 0===x&&We(t,"missing exponent power"),P&&void 0===j&&We(t,"missing exponent base"),void 0===P&&(I||x)&&We(t,"missing e before exponent")}if("+"!==t[w]&&"-"!==t[w]||(n="-"===t[w++]),!Qe(t[w])&&"."!==t[w]){if("i"===t[w]||"I"===t[w])return new e(b.from(n?Ue:Ve));if("N"===t[w])return new e(b.from(Be))}for(;Qe(t[w])||"."===t[w];)"."!==t[w]?(p<34&&("0"!==t[w]||o)&&(o||(l=s),o=!0,f[d++]=parseInt(t[w],10),p+=1),o&&(u+=1),i&&(c+=1),s+=1,w+=1):(i&&We(t,"contains multiple periods"),i=!0,w+=1);if(i&&!s)throw new S(t+" not a valid Decimal128 string");if("e"===t[w]||"E"===t[w]){var A=t.substr(++w).match(ze);if(!A||!A[2])return new e(b.from(Be));v=parseInt(A[0],10),w+=A[0].length}if(t[w])return new e(b.from(Be));if(h=0,p){if(y=p-1,1!==(a=u))for(;0===f[l+a-1];)a-=1}else h=0,y=0,f[0]=0,u=1,p=1,a=0;for(v<=c&&c-v>16384?v=Le:v-=c;v>qe;){if((y+=1)-h>34){if(f.join("").match(/^0+$/)){v=qe;break}We(t,"overflow")}v-=1}for(;v<Le||p<u;){if(0===y&&a<p){v=Le,a=0;break}if(p<u?u-=1:y-=1,v<qe)v+=1;else{if(f.join("").match(/^0+$/)){v=qe;break}We(t,"overflow")}}if(y-h+1<a){var N=s;i&&(l+=1,N+=1),n&&(l+=1,N+=1);var k=parseInt(t[l+y+1],10),M=0;if(k>=5&&(M=1,5===k))for(M=f[y]%2==1?1:0,m=l+y+2;m<N;m++)if(parseInt(t[m],10)){M=1;break}if(M)for(var D=y;D>=0;D--)if(++f[D]>9&&(f[D]=0,0===D)){if(!(v<qe))return new e(b.from(n?Ue:Ve));v+=1,f[D]=1}}if(g=Re.fromNumber(0),_=Re.fromNumber(0),0===a)g=Re.fromNumber(0),_=Re.fromNumber(0);else if(y-h<17)for(D=h,_=Re.fromNumber(f[D++]),g=new Re(0,0);D<=y;D++)_=(_=_.multiply(Re.fromNumber(10))).add(Re.fromNumber(f[D]));else{for(D=h,g=Re.fromNumber(f[D++]);D<=y-17;D++)g=(g=g.multiply(Re.fromNumber(10))).add(Re.fromNumber(f[D]));for(_=Re.fromNumber(f[D++]);D<=y;D++)_=(_=_.multiply(Re.fromNumber(10))).add(Re.fromNumber(f[D]))}var R,C,$,F,q=function(e,t){if(!e&&!t)return{high:Re.fromNumber(0),low:Re.fromNumber(0)};var r=e.shiftRightUnsigned(32),n=new Re(e.getLowBits(),0),i=t.shiftRightUnsigned(32),o=new Re(t.getLowBits(),0),a=r.multiply(i),s=r.multiply(o),u=n.multiply(i),c=n.multiply(o);return a=a.add(s.shiftRightUnsigned(32)),s=new Re(s.getLowBits(),0).add(u).add(c.shiftRightUnsigned(32)),{high:a=a.add(s.shiftRightUnsigned(32)),low:c=s.shiftLeft(32).add(new Re(c.getLowBits(),0))}}(g,Re.fromString("100000000000000000"));q.low=q.low.add(_),C=_,(($=(R=q.low).high>>>0)<(F=C.high>>>0)||$===F&&R.low>>>0<C.low>>>0)&&(q.high=q.high.add(Re.fromNumber(1))),r=v+6176;var L={low:Re.fromNumber(0),high:Re.fromNumber(0)};q.high.shiftRightUnsigned(49).and(Re.fromNumber(1)).equals(Re.fromNumber(1))?(L.high=L.high.or(Re.fromNumber(3).shiftLeft(61)),L.high=L.high.or(Re.fromNumber(r).and(Re.fromNumber(16383).shiftLeft(47))),L.high=L.high.or(q.high.and(Re.fromNumber(0x7fffffffffff)))):(L.high=L.high.or(Re.fromNumber(16383&r).shiftLeft(49)),L.high=L.high.or(q.high.and(Re.fromNumber(562949953421311)))),L.low=q.low,n&&(L.high=L.high.or(Re.fromString("9223372036854775808")));var B=b.alloc(16);return w=0,B[w++]=255&L.low.low,B[w++]=L.low.low>>8&255,B[w++]=L.low.low>>16&255,B[w++]=L.low.low>>24&255,B[w++]=255&L.low.high,B[w++]=L.low.high>>8&255,B[w++]=L.low.high>>16&255,B[w++]=L.low.high>>24&255,B[w++]=255&L.high.low,B[w++]=L.high.low>>8&255,B[w++]=L.high.low>>16&255,B[w++]=L.high.low>>24&255,B[w++]=255&L.high.high,B[w++]=L.high.high>>8&255,B[w++]=L.high.high>>16&255,B[w++]=L.high.high>>24&255,new e(B)},e.prototype.toString=function(){for(var e,t=0,r=new Array(36),n=0;n<r.length;n++)r[n]=0;var i,o,a,s=0,u=!1,c={parts:[0,0,0,0]},l=[];s=0;var f=this.bytes,p=f[s++]|f[s++]<<8|f[s++]<<16|f[s++]<<24,d=f[s++]|f[s++]<<8|f[s++]<<16|f[s++]<<24,h=f[s++]|f[s++]<<8|f[s++]<<16|f[s++]<<24,y=f[s++]|f[s++]<<8|f[s++]<<16|f[s++]<<24;s=0,(new Re(p,d),new Re(h,y)).lessThan(Re.ZERO)&&l.push("-");var v=y>>26&31;if(v>>3==3){if(30===v)return l.join("")+"Infinity";if(31===v)return"NaN";e=y>>15&16383,i=8+(y>>14&1)}else i=y>>14&7,e=y>>17&16383;var m=e-6176;if(c.parts[0]=(16383&y)+((15&i)<<14),c.parts[1]=h,c.parts[2]=d,c.parts[3]=p,0===c.parts[0]&&0===c.parts[1]&&0===c.parts[2]&&0===c.parts[3])u=!0;else for(a=3;a>=0;a--){var b=0,g=Ye(c);if(c=g.quotient,b=g.rem.low)for(o=8;o>=0;o--)r[9*a+o]=b%10,b=Math.floor(b/10)}if(u)t=1,r[s]=0;else for(t=36;!r[s];)t-=1,s+=1;var _=t-1+m;if(_>=34||_<=-7||m>0){if(t>34)return l.push("".concat(0)),m>0?l.push("E+".concat(m)):m<0&&l.push("E".concat(m)),l.join("");for(l.push("".concat(r[s++])),(t-=1)&&l.push("."),n=0;n<t;n++)l.push("".concat(r[s++]));l.push("E"),_>0?l.push("+".concat(_)):l.push("".concat(_))}else if(m>=0)for(n=0;n<t;n++)l.push("".concat(r[s++]));else{var w=t+m;if(w>0)for(n=0;n<w;n++)l.push("".concat(r[s++]));else l.push("0");for(l.push(".");w++<0;)l.push("0");for(n=0;n<t-Math.max(w-1,0);n++)l.push("".concat(r[s++]))}return l.join("")},e.prototype.toJSON=function(){return{$numberDecimal:this.toString()}},e.prototype.toExtendedJSON=function(){return{$numberDecimal:this.toString()}},e.fromExtendedJSON=function(t){return e.fromString(t.$numberDecimal)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return'new Decimal128("'.concat(this.toString(),'")')},e}();Object.defineProperty(He.prototype,"_bsontype",{value:"Decimal128"});var Ke=function(){function e(t){if(!(this instanceof e))return new e(t);t instanceof Number&&(t=t.valueOf()),this.value=+t}return e.prototype.valueOf=function(){return this.value},e.prototype.toJSON=function(){return this.value},e.prototype.toString=function(e){return this.value.toString(e)},e.prototype.toExtendedJSON=function(e){return e&&(e.legacy||e.relaxed&&isFinite(this.value))?this.value:Object.is(Math.sign(this.value),-0)?{$numberDouble:"-".concat(this.value.toFixed(1))}:{$numberDouble:Number.isInteger(this.value)?this.value.toFixed(1):this.value.toString()}},e.fromExtendedJSON=function(t,r){var n=parseFloat(t.$numberDouble);return r&&r.relaxed?n:new e(n)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){var e=this.toExtendedJSON();return"new Double(".concat(e.$numberDouble,")")},e}();Object.defineProperty(Ke.prototype,"_bsontype",{value:"Double"});var Ge=function(){function e(t){if(!(this instanceof e))return new e(t);t instanceof Number&&(t=t.valueOf()),this.value=0|+t}return e.prototype.valueOf=function(){return this.value},e.prototype.toString=function(e){return this.value.toString(e)},e.prototype.toJSON=function(){return this.value},e.prototype.toExtendedJSON=function(e){return e&&(e.relaxed||e.legacy)?this.value:{$numberInt:this.value.toString()}},e.fromExtendedJSON=function(t,r){return r&&r.relaxed?parseInt(t.$numberInt,10):new e(t.$numberInt)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return"new Int32(".concat(this.valueOf(),")")},e}();Object.defineProperty(Ge.prototype,"_bsontype",{value:"Int32"});var Je=function(){function e(){if(!(this instanceof e))return new e}return e.prototype.toExtendedJSON=function(){return{$maxKey:1}},e.fromExtendedJSON=function(){return new e},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return"new MaxKey()"},e}();Object.defineProperty(Je.prototype,"_bsontype",{value:"MaxKey"});var Ze=function(){function e(){if(!(this instanceof e))return new e}return e.prototype.toExtendedJSON=function(){return{$minKey:1}},e.fromExtendedJSON=function(){return new e},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return"new MinKey()"},e}();Object.defineProperty(Ze.prototype,"_bsontype",{value:"MinKey"});var Xe=new RegExp("^[0-9a-fA-F]{24}$"),et=null,tt=Symbol("id"),rt=function(){function e(t){if(!(this instanceof e))return new e(t);var r;if("object"==typeof t&&t&&"id"in t){if("string"!=typeof t.id&&!ArrayBuffer.isView(t.id))throw new S("Argument passed in must have an id that is of type string or Buffer");r="toHexString"in t&&"function"==typeof t.toHexString?b.from(t.toHexString(),"hex"):t.id}else r=t;if(null==r||"number"==typeof r)this[tt]=e.generate("number"==typeof r?r:void 0);else if(ArrayBuffer.isView(r)&&12===r.byteLength)this[tt]=r instanceof b?r:$(r);else{if("string"!=typeof r)throw new S("Argument passed in does not match the accepted types");if(12===r.length){var n=b.from(r);if(12!==n.byteLength)throw new S("Argument passed in must be a string of 12 bytes");this[tt]=n}else{if(24!==r.length||!Xe.test(r))throw new S("Argument passed in must be a string of 12 bytes or a string of 24 hex characters or an integer");this[tt]=b.from(r,"hex")}}e.cacheHexString&&(this.__id=this.id.toString("hex"))}return Object.defineProperty(e.prototype,"id",{get:function(){return this[tt]},set:function(t){this[tt]=t,e.cacheHexString&&(this.__id=t.toString("hex"))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"generationTime",{get:function(){return this.id.readInt32BE(0)},set:function(e){this.id.writeUInt32BE(e,0)},enumerable:!1,configurable:!0}),e.prototype.toHexString=function(){if(e.cacheHexString&&this.__id)return this.__id;var t=this.id.toString("hex");return e.cacheHexString&&!this.__id&&(this.__id=t),t},e.getInc=function(){return e.index=(e.index+1)%16777215},e.generate=function(t){"number"!=typeof t&&(t=Math.floor(Date.now()/1e3));var r=e.getInc(),n=b.alloc(12);return n.writeUInt32BE(t,0),null===et&&(et=I(5)),n[4]=et[0],n[5]=et[1],n[6]=et[2],n[7]=et[3],n[8]=et[4],n[11]=255&r,n[10]=r>>8&255,n[9]=r>>16&255,n},e.prototype.toString=function(e){return e?this.id.toString(e):this.toHexString()},e.prototype.toJSON=function(){return this.toHexString()},e.prototype.equals=function(t){if(null==t)return!1;if(t instanceof e)return this[tt][11]===t[tt][11]&&this[tt].equals(t[tt]);if("string"==typeof t&&e.isValid(t)&&12===t.length&&A(this.id))return t===b.prototype.toString.call(this.id,"latin1");if("string"==typeof t&&e.isValid(t)&&24===t.length)return t.toLowerCase()===this.toHexString();if("string"==typeof t&&e.isValid(t)&&12===t.length)return b.from(t).equals(this.id);if("object"==typeof t&&"toHexString"in t&&"function"==typeof t.toHexString){var r=t.toHexString(),n=this.toHexString().toLowerCase();return"string"==typeof r&&r.toLowerCase()===n}return!1},e.prototype.getTimestamp=function(){var e=new Date,t=this.id.readUInt32BE(0);return e.setTime(1e3*Math.floor(t)),e},e.createPk=function(){return new e},e.createFromTime=function(t){var r=b.from([0,0,0,0,0,0,0,0,0,0,0,0]);return r.writeUInt32BE(t,0),new e(r)},e.createFromHexString=function(t){if(void 0===t||null!=t&&24!==t.length)throw new S("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");return new e(b.from(t,"hex"))},e.isValid=function(t){if(null==t)return!1;try{return new e(t),!0}catch(e){return!1}},e.prototype.toExtendedJSON=function(){return this.toHexString?{$oid:this.toHexString()}:{$oid:this.toString("hex")}},e.fromExtendedJSON=function(t){return new e(t.$oid)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return'new ObjectId("'.concat(this.toHexString(),'")')},e.index=Math.floor(16777215*Math.random()),e}();Object.defineProperty(rt.prototype,"generate",{value:C((function(e){return rt.generate(e)}),"Please use the static `ObjectId.generate(time)` instead")}),Object.defineProperty(rt.prototype,"getInc",{value:C((function(){return rt.getInc()}),"Please use the static `ObjectId.getInc()` instead")}),Object.defineProperty(rt.prototype,"get_inc",{value:C((function(){return rt.getInc()}),"Please use the static `ObjectId.getInc()` instead")}),Object.defineProperty(rt,"get_inc",{value:C((function(){return rt.getInc()}),"Please use the static `ObjectId.getInc()` instead")}),Object.defineProperty(rt.prototype,"_bsontype",{value:"ObjectID"});var nt=function(){function e(t,r){if(!(this instanceof e))return new e(t,r);if(this.pattern=t,this.options=(null!=r?r:"").split("").sort().join(""),-1!==this.pattern.indexOf("\0"))throw new O("BSON Regex patterns cannot contain null bytes, found: ".concat(JSON.stringify(this.pattern)));if(-1!==this.options.indexOf("\0"))throw new O("BSON Regex options cannot contain null bytes, found: ".concat(JSON.stringify(this.options)));for(var n=0;n<this.options.length;n++)if("i"!==this.options[n]&&"m"!==this.options[n]&&"x"!==this.options[n]&&"l"!==this.options[n]&&"s"!==this.options[n]&&"u"!==this.options[n])throw new O("The regular expression option [".concat(this.options[n],"] is not supported"))}return e.parseOptions=function(e){return e?e.split("").sort().join(""):""},e.prototype.toExtendedJSON=function(e){return(e=e||{}).legacy?{$regex:this.pattern,$options:this.options}:{$regularExpression:{pattern:this.pattern,options:this.options}}},e.fromExtendedJSON=function(t){if("$regex"in t){if("string"==typeof t.$regex)return new e(t.$regex,e.parseOptions(t.$options));if("BSONRegExp"===t.$regex._bsontype)return t}if("$regularExpression"in t)return new e(t.$regularExpression.pattern,e.parseOptions(t.$regularExpression.options));throw new S("Unexpected BSONRegExp EJSON object form: ".concat(JSON.stringify(t)))},e}();Object.defineProperty(nt.prototype,"_bsontype",{value:"BSONRegExp"});var it=function(){function e(t){if(!(this instanceof e))return new e(t);this.value=t}return e.prototype.valueOf=function(){return this.value},e.prototype.toString=function(){return this.value},e.prototype.inspect=function(){return'new BSONSymbol("'.concat(this.value,'")')},e.prototype.toJSON=function(){return this.value},e.prototype.toExtendedJSON=function(){return{$symbol:this.value}},e.fromExtendedJSON=function(t){return new e(t.$symbol)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e}();Object.defineProperty(it.prototype,"_bsontype",{value:"Symbol"});var ot=Re,at=function(e){function t(r,n){var i=this;return i instanceof t?(i=Re.isLong(r)?e.call(this,r.low,r.high,!0)||this:R(r)&&void 0!==r.t&&void 0!==r.i?e.call(this,r.i,r.t,!0)||this:e.call(this,r,n,!0)||this,Object.defineProperty(i,"_bsontype",{value:"Timestamp",writable:!1,configurable:!1,enumerable:!1}),i):new t(r,n)}return _(t,e),t.prototype.toJSON=function(){return{$timestamp:this.toString()}},t.fromInt=function(e){return new t(Re.fromInt(e,!0))},t.fromNumber=function(e){return new t(Re.fromNumber(e,!0))},t.fromBits=function(e,r){return new t(e,r)},t.fromString=function(e,r){return new t(Re.fromString(e,!0,r))},t.prototype.toExtendedJSON=function(){return{$timestamp:{t:this.high>>>0,i:this.low>>>0}}},t.fromExtendedJSON=function(e){return new t(e.$timestamp)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return"new Timestamp({ t: ".concat(this.getHighBits(),", i: ").concat(this.getLowBits()," })")},t.MAX_VALUE=Re.MAX_UNSIGNED_VALUE,t}(ot);function st(e){return R(e)&&Reflect.has(e,"_bsontype")&&"string"==typeof e._bsontype}var ut=2147483647,ct=-2147483648,lt=0x8000000000000000,ft=-0x8000000000000000,pt={$oid:rt,$binary:Ee,$uuid:Ee,$symbol:it,$numberInt:Ge,$numberDecimal:He,$numberDouble:Ke,$numberLong:Re,$minKey:Ze,$maxKey:Je,$regex:nt,$regularExpression:nt,$timestamp:at};function dt(e,t){if(void 0===t&&(t={}),"number"==typeof e){if(t.relaxed||t.legacy)return e;if(Math.floor(e)===e){if(e>=ct&&e<=ut)return new Ge(e);if(e>=ft&&e<=lt)return Re.fromNumber(e)}return new Ke(e)}if(null==e||"object"!=typeof e)return e;if(e.$undefined)return null;for(var r=Object.keys(e).filter((function(t){return t.startsWith("$")&&null!=e[t]})),n=0;n<r.length;n++){var i=pt[r[n]];if(i)return i.fromExtendedJSON(e,t)}if(null!=e.$date){var o=e.$date,a=new Date;return t.legacy?"number"==typeof o?a.setTime(o):"string"==typeof o&&a.setTime(Date.parse(o)):"string"==typeof o?a.setTime(Date.parse(o)):Re.isLong(o)?a.setTime(o.toNumber()):"number"==typeof o&&t.relaxed&&a.setTime(o),a}if(null!=e.$code){var s=Object.assign({},e);return e.$scope&&(s.$scope=dt(e.$scope)),je.fromExtendedJSON(e)}if(Pe(e)||e.$dbPointer){var u=e.$ref?e:e.$dbPointer;if(u instanceof Ie)return u;var c=Object.keys(u).filter((function(e){return e.startsWith("$")})),l=!0;if(c.forEach((function(e){-1===["$ref","$id","$db"].indexOf(e)&&(l=!1)})),l)return Ie.fromExtendedJSON(u)}return e}function ht(e){var t=e.toISOString();return 0!==e.getUTCMilliseconds()?t:t.slice(0,-5)+"Z"}function yt(e,t){if(("object"==typeof e||"function"==typeof e)&&null!==e){var r=t.seenObjects.findIndex((function(t){return t.obj===e}));if(-1!==r){var n=t.seenObjects.map((function(e){return e.propertyName})),i=n.slice(0,r).map((function(e){return"".concat(e," -> ")})).join(""),o=n[r],a=" -> "+n.slice(r+1,n.length-1).map((function(e){return"".concat(e," -> ")})).join(""),s=n[n.length-1],u=" ".repeat(i.length+o.length/2),c="-".repeat(a.length+(o.length+s.length)/2-1);throw new S("Converting circular structure to EJSON:\n"+" ".concat(i).concat(o).concat(a).concat(s,"\n")+" ".concat(u,"\\").concat(c,"/"))}t.seenObjects[t.seenObjects.length-1].obj=e}if(Array.isArray(e))return function(e,t){return e.map((function(e,r){t.seenObjects.push({propertyName:"index ".concat(r),obj:null});try{return yt(e,t)}finally{t.seenObjects.pop()}}))}(e,t);if(void 0===e)return null;if(e instanceof Date||D(e)){var l=e.getTime(),f=l>-1&&l<2534023188e5;return t.legacy?t.relaxed&&f?{$date:e.getTime()}:{$date:ht(e)}:t.relaxed&&f?{$date:ht(e)}:{$date:{$numberLong:e.getTime().toString()}}}if(!("number"!=typeof e||t.relaxed&&isFinite(e))){if(Math.floor(e)===e){var p=e>=ft&&e<=lt;if(e>=ct&&e<=ut)return{$numberInt:e.toString()};if(p)return{$numberLong:e.toString()}}return{$numberDouble:e.toString()}}if(e instanceof RegExp||M(e)){var d=e.flags;if(void 0===d){var h=e.toString().match(/[gimuy]*$/);h&&(d=h[0])}return new nt(e.source,d).toExtendedJSON(t)}return null!=e&&"object"==typeof e?function(e,t){if(null==e||"object"!=typeof e)throw new O("not an object instance");var r=e._bsontype;if(void 0===r){var n={};for(var i in e){t.seenObjects.push({propertyName:i,obj:null});try{var o=yt(e[i],t);"__proto__"===i?Object.defineProperty(n,i,{value:o,writable:!0,enumerable:!0,configurable:!0}):n[i]=o}finally{t.seenObjects.pop()}}return n}if(st(e)){var a=e;if("function"!=typeof a.toExtendedJSON){var s=bt[e._bsontype];if(!s)throw new S("Unrecognized or invalid _bsontype: "+e._bsontype);a=s(a)}return"Code"===r&&a.scope?a=new je(a.code,yt(a.scope,t)):"DBRef"===r&&a.oid&&(a=new Ie(yt(a.collection,t),yt(a.oid,t),yt(a.db,t),yt(a.fields,t))),a.toExtendedJSON(t)}throw new O("_bsontype must be a string, but was: "+typeof r)}(e,t):e}var vt,mt,bt={Binary:function(e){return new Ee(e.value(),e.sub_type)},Code:function(e){return new je(e.code,e.scope)},DBRef:function(e){return new Ie(e.collection||e.namespace,e.oid,e.db,e.fields)},Decimal128:function(e){return new He(e.bytes)},Double:function(e){return new Ke(e.value)},Int32:function(e){return new Ge(e.value)},Long:function(e){return Re.fromBits(null!=e.low?e.low:e.low_,null!=e.low?e.high:e.high_,null!=e.low?e.unsigned:e.unsigned_)},MaxKey:function(){return new Je},MinKey:function(){return new Ze},ObjectID:function(e){return new rt(e)},ObjectId:function(e){return new rt(e)},BSONRegExp:function(e){return new nt(e.pattern,e.options)},Symbol:function(e){return new it(e.value)},Timestamp:function(e){return at.fromBits(e.low,e.high)}};!function(e){function t(e,t){var r=Object.assign({},{relaxed:!0,legacy:!1},t);return"boolean"==typeof r.relaxed&&(r.strict=!r.relaxed),"boolean"==typeof r.strict&&(r.relaxed=!r.strict),JSON.parse(e,(function(e,t){if(-1!==e.indexOf("\0"))throw new O("BSON Document field names cannot contain null bytes, found: ".concat(JSON.stringify(e)));return dt(t,r)}))}function r(e,t,r,n){null!=r&&"object"==typeof r&&(n=r,r=0),null==t||"object"!=typeof t||Array.isArray(t)||(n=t,t=void 0,r=0);var i=yt(e,Object.assign({relaxed:!0,legacy:!1},n,{seenObjects:[{propertyName:"(root)",obj:null}]}));return JSON.stringify(i,t,r)}e.parse=t,e.stringify=r,e.serialize=function(e,t){return t=t||{},JSON.parse(r(e,t))},e.deserialize=function(e,r){return r=r||{},t(JSON.stringify(e),r)}}(vt||(vt={}));var gt=T();function _t(e,t,r){var n=5;if(Array.isArray(e))for(var i=0;i<e.length;i++)n+=wt(i.toString(),e[i],t,!0,r);else for(var o in"function"==typeof(null==e?void 0:e.toBSON)&&(e=e.toBSON()),e)n+=wt(o,e[o],t,!1,r);return n}function wt(e,t,r,n,i){switch(void 0===r&&(r=!1),void 0===n&&(n=!1),void 0===i&&(i=!1),"function"==typeof(null==t?void 0:t.toBSON)&&(t=t.toBSON()),typeof t){case"string":return 1+b.byteLength(e,"utf8")+1+4+b.byteLength(t,"utf8")+1;case"number":return Math.floor(t)===t&&t>=W&&t<=Y&&t>=V&&t<=U?(null!=e?b.byteLength(e,"utf8")+1:0)+5:(null!=e?b.byteLength(e,"utf8")+1:0)+9;case"undefined":return n||!i?(null!=e?b.byteLength(e,"utf8")+1:0)+1:0;case"boolean":return(null!=e?b.byteLength(e,"utf8")+1:0)+2;case"object":if(null==t||"MinKey"===t._bsontype||"MaxKey"===t._bsontype)return(null!=e?b.byteLength(e,"utf8")+1:0)+1;if("ObjectId"===t._bsontype||"ObjectID"===t._bsontype)return(null!=e?b.byteLength(e,"utf8")+1:0)+13;if(t instanceof Date||D(t))return(null!=e?b.byteLength(e,"utf8")+1:0)+9;if(ArrayBuffer.isView(t)||t instanceof ArrayBuffer||x(t))return(null!=e?b.byteLength(e,"utf8")+1:0)+6+t.byteLength;if("Long"===t._bsontype||"Double"===t._bsontype||"Timestamp"===t._bsontype)return(null!=e?b.byteLength(e,"utf8")+1:0)+9;if("Decimal128"===t._bsontype)return(null!=e?b.byteLength(e,"utf8")+1:0)+17;if("Code"===t._bsontype)return null!=t.scope&&Object.keys(t.scope).length>0?(null!=e?b.byteLength(e,"utf8")+1:0)+1+4+4+b.byteLength(t.code.toString(),"utf8")+1+_t(t.scope,r,i):(null!=e?b.byteLength(e,"utf8")+1:0)+1+4+b.byteLength(t.code.toString(),"utf8")+1;if("Binary"===t._bsontype){var o=t;return o.sub_type===Ee.SUBTYPE_BYTE_ARRAY?(null!=e?b.byteLength(e,"utf8")+1:0)+(o.position+1+4+1+4):(null!=e?b.byteLength(e,"utf8")+1:0)+(o.position+1+4+1)}if("Symbol"===t._bsontype)return(null!=e?b.byteLength(e,"utf8")+1:0)+b.byteLength(t.value,"utf8")+4+1+1;if("DBRef"===t._bsontype){var a=Object.assign({$ref:t.collection,$id:t.oid},t.fields);return null!=t.db&&(a.$db=t.db),(null!=e?b.byteLength(e,"utf8")+1:0)+1+_t(a,r,i)}return t instanceof RegExp||M(t)?(null!=e?b.byteLength(e,"utf8")+1:0)+1+b.byteLength(t.source,"utf8")+1+(t.global?1:0)+(t.ignoreCase?1:0)+(t.multiline?1:0)+1:"BSONRegExp"===t._bsontype?(null!=e?b.byteLength(e,"utf8")+1:0)+1+b.byteLength(t.pattern,"utf8")+1+b.byteLength(t.options,"utf8")+1:(null!=e?b.byteLength(e,"utf8")+1:0)+_t(t,r,i)+1;case"function":if(t instanceof RegExp||M(t)||"[object RegExp]"===String.call(t))return(null!=e?b.byteLength(e,"utf8")+1:0)+1+b.byteLength(t.source,"utf8")+1+(t.global?1:0)+(t.ignoreCase?1:0)+(t.multiline?1:0)+1;if(r&&null!=t.scope&&Object.keys(t.scope).length>0)return(null!=e?b.byteLength(e,"utf8")+1:0)+1+4+4+b.byteLength(j(t),"utf8")+1+_t(t.scope,r,i);if(r)return(null!=e?b.byteLength(e,"utf8")+1:0)+1+4+b.byteLength(j(t),"utf8")+1}return 0}function Ot(e,t,r){for(var n=0,i=t;i<r;i+=1){var o=e[i];if(n){if(128!=(192&o))return!1;n-=1}else if(128&o)if(192==(224&o))n=1;else if(224==(240&o))n=2;else{if(240!=(248&o))return!1;n=3}}return!n}mt=gt.Map?gt.Map:function(){function e(e){void 0===e&&(e=[]),this._keys=[],this._values={};for(var t=0;t<e.length;t++)if(null!=e[t]){var r=e[t],n=r[0],i=r[1];this._keys.push(n),this._values[n]={v:i,i:this._keys.length-1}}}return e.prototype.clear=function(){this._keys=[],this._values={}},e.prototype.delete=function(e){var t=this._values[e];return null!=t&&(delete this._values[e],this._keys.splice(t.i,1),!0)},e.prototype.entries=function(){var e=this,t=0;return{next:function(){var r=e._keys[t++];return{value:void 0!==r?[r,e._values[r].v]:void 0,done:void 0===r}}}},e.prototype.forEach=function(e,t){t=t||this;for(var r=0;r<this._keys.length;r++){var n=this._keys[r];e.call(t,this._values[n].v,n,t)}},e.prototype.get=function(e){return this._values[e]?this._values[e].v:void 0},e.prototype.has=function(e){return null!=this._values[e]},e.prototype.keys=function(){var e=this,t=0;return{next:function(){var r=e._keys[t++];return{value:void 0!==r?r:void 0,done:void 0===r}}}},e.prototype.set=function(e,t){return this._values[e]?(this._values[e].v=t,this):(this._keys.push(e),this._values[e]={v:t,i:this._keys.length-1},this)},e.prototype.values=function(){var e=this,t=0;return{next:function(){var r=e._keys[t++];return{value:void 0!==r?e._values[r].v:void 0,done:void 0===r}}}},Object.defineProperty(e.prototype,"size",{get:function(){return this._keys.length},enumerable:!1,configurable:!0}),e}();var St=Re.fromNumber(Y),Et=Re.fromNumber(W),Tt={};function jt(e,t,r){var n=(t=null==t?{}:t)&&t.index?t.index:0,i=e[n]|e[n+1]<<8|e[n+2]<<16|e[n+3]<<24;if(i<5)throw new O("bson size must be >= 5, is ".concat(i));if(t.allowObjectSmallerThanBufferSize&&e.length<i)throw new O("buffer length ".concat(e.length," must be >= bson size ").concat(i));if(!t.allowObjectSmallerThanBufferSize&&e.length!==i)throw new O("buffer length ".concat(e.length," must === bson size ").concat(i));if(i+n>e.byteLength)throw new O("(bson size ".concat(i," + options.index ").concat(n," must be <= buffer length ").concat(e.byteLength,")"));if(0!==e[n+i-1])throw new O("One object, sized correctly, with a spot for an EOO, but the EOO isn't 0x00");return It(e,n,t,r)}var Pt=/^\$ref$|^\$id$|^\$db$/;function It(e,t,r,n){void 0===n&&(n=!1);var i,o=null!=r.evalFunctions&&r.evalFunctions,a=null!=r.cacheFunctions&&r.cacheFunctions,s=null==r.fieldsAsRaw?null:r.fieldsAsRaw,u=null!=r.raw&&r.raw,c="boolean"==typeof r.bsonRegExp&&r.bsonRegExp,l=null!=r.promoteBuffers&&r.promoteBuffers,f=null==r.promoteLongs||r.promoteLongs,p=null==r.promoteValues||r.promoteValues,d=null==r.validation?{utf8:!0}:r.validation,h=!0,y=new Set,v=d.utf8;if("boolean"==typeof v)i=v;else{h=!1;var m=Object.keys(v).map((function(e){return v[e]}));if(0===m.length)throw new O("UTF-8 validation setting cannot be empty");if("boolean"!=typeof m[0])throw new O("Invalid UTF-8 validation option, must specify boolean values");if(i=m[0],!m.every((function(e){return e===i})))throw new O("Invalid UTF-8 validation option - keys must be all true or all false")}if(!h)for(var g=0,_=Object.keys(v);g<_.length;g++){var S=_[g];y.add(S)}var E=t;if(e.length<5)throw new O("corrupt bson message < 5 bytes long");var T=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24;if(T<5||T>e.length)throw new O("corrupt bson message");for(var j=n?[]:{},P=0,I=!n&&null,x=new DataView(e.buffer,e.byteOffset,e.byteLength);;){var A=e[t++];if(0===A)break;for(var N=t;0!==e[N]&&N<e.length;)N++;if(N>=e.byteLength)throw new O("Bad BSON Document: illegal CString");var k,M=n?P++:e.toString("utf8",t,N);k=h||y.has(M)?i:!i,!1!==I&&"$"===M[0]&&(I=Pt.test(M));var D=void 0;if(t=N+1,A===K){if((Ae=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24)<=0||Ae>e.length-t||0!==e[t+Ae-1])throw new O("bad string length in bson");D=At(e,t,t+Ae-1,k),t+=Ae}else if(A===ee){var R=b.alloc(12);e.copy(R,0,t,t+12),D=new rt(R),t+=12}else if(A===ce&&!1===p)D=new Ge(e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24);else if(A===ce)D=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24;else if(A===H&&!1===p)D=new Ke(x.getFloat64(t,!0)),t+=8;else if(A===H)D=x.getFloat64(t,!0),t+=8;else if(A===re){var C=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24,$=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24;D=new Date(new Re(C,$).toNumber())}else if(A===te){if(0!==e[t]&&1!==e[t])throw new O("illegal boolean type value");D=1===e[t++]}else if(A===G){var F=t;if((Te=e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)<=0||Te>e.length-t)throw new O("bad embedded document length in bson");if(u)D=e.slice(t,t+Te);else{var q=r;h||(q=w(w({},r),{validation:{utf8:k}})),D=It(e,F,q,!1)}t+=Te}else if(A===J){F=t;var L=r,B=t+(Te=e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24);if(s&&s[M]){for(var U in L={},r)L[U]=r[U];L.raw=!0}if(h||(L=w(w({},L),{validation:{utf8:k}})),D=It(e,F,L,!0),0!==e[(t+=Te)-1])throw new O("invalid array terminator byte");if(t!==B)throw new O("corrupted array bson")}else if(A===X)D=void 0;else if(A===ne)D=null;else if(A===fe){C=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24,$=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24;var V=new Re(C,$);D=f&&!0===p&&V.lessThanOrEqual(St)&&V.greaterThanOrEqual(Et)?V.toNumber():V}else if(A===pe){var z=b.alloc(16);e.copy(z,0,t,t+16),t+=16;var Q=new He(z);D="toObject"in Q&&"function"==typeof Q.toObject?Q.toObject():Q}else if(A===Z){var Y=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24,W=Y,ye=e[t++];if(Y<0)throw new O("Negative binary type element size found");if(Y>e.byteLength)throw new O("Binary type size larger than document size");if(null!=e.slice){if(ye===Ee.SUBTYPE_BYTE_ARRAY){if((Y=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24)<0)throw new O("Negative binary type element size found for subtype 0x02");if(Y>W-4)throw new O("Binary type with subtype 0x02 contains too long binary size");if(Y<W-4)throw new O("Binary type with subtype 0x02 contains too short binary size")}l&&p?D=e.slice(t,t+Y):(D=new Ee(e.slice(t,t+Y),ye),ye===ge&&(D=D.toUUID()))}else{var ve=b.alloc(Y);if(ye===Ee.SUBTYPE_BYTE_ARRAY){if((Y=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24)<0)throw new O("Negative binary type element size found for subtype 0x02");if(Y>W-4)throw new O("Binary type with subtype 0x02 contains too long binary size");if(Y<W-4)throw new O("Binary type with subtype 0x02 contains too short binary size")}for(N=0;N<Y;N++)ve[N]=e[t+N];D=l&&p?ve:ye===ge?new Ee(e.slice(t,t+Y),ye).toUUID():new Ee(e.slice(t,t+Y),ye)}t+=Y}else if(A===ie&&!1===c){for(N=t;0!==e[N]&&N<e.length;)N++;if(N>=e.length)throw new O("Bad BSON Document: illegal CString");var me=e.toString("utf8",t,N);for(N=t=N+1;0!==e[N]&&N<e.length;)N++;if(N>=e.length)throw new O("Bad BSON Document: illegal CString");var be=e.toString("utf8",t,N);t=N+1;var _e=new Array(be.length);for(N=0;N<be.length;N++)switch(be[N]){case"m":_e[N]="m";break;case"s":_e[N]="g";break;case"i":_e[N]="i"}D=new RegExp(me,_e.join(""))}else if(A===ie&&!0===c){for(N=t;0!==e[N]&&N<e.length;)N++;if(N>=e.length)throw new O("Bad BSON Document: illegal CString");for(me=e.toString("utf8",t,N),N=t=N+1;0!==e[N]&&N<e.length;)N++;if(N>=e.length)throw new O("Bad BSON Document: illegal CString");be=e.toString("utf8",t,N),t=N+1,D=new nt(me,be)}else if(A===se){if((Ae=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24)<=0||Ae>e.length-t||0!==e[t+Ae-1])throw new O("bad string length in bson");var we=At(e,t,t+Ae-1,k);D=p?we:new it(we),t+=Ae}else if(A===le)C=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24,$=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24,D=new at(C,$);else if(A===de)D=new Ze;else if(A===he)D=new Je;else if(A===ae){if((Ae=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24)<=0||Ae>e.length-t||0!==e[t+Ae-1])throw new O("bad string length in bson");var Oe=At(e,t,t+Ae-1,k);D=o?a?xt(Oe,Tt,j):xt(Oe):new je(Oe),t+=Ae}else if(A===ue){var Se=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24;if(Se<13)throw new O("code_w_scope total size shorter minimum expected length");if((Ae=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24)<=0||Ae>e.length-t||0!==e[t+Ae-1])throw new O("bad string length in bson");Oe=At(e,t,t+Ae-1,k),F=t+=Ae;var Te=e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24,xe=It(e,F,r,!1);if(t+=Te,Se<8+Te+Ae)throw new O("code_w_scope total size is too short, truncating scope");if(Se>8+Te+Ae)throw new O("code_w_scope total size is too long, clips outer document");o?(D=a?xt(Oe,Tt,j):xt(Oe)).scope=xe:D=new je(Oe,xe)}else{if(A!==oe)throw new O("Detected unknown BSON type ".concat(A.toString(16),' for fieldname "').concat(M,'"'));var Ae;if((Ae=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24)<=0||Ae>e.length-t||0!==e[t+Ae-1])throw new O("bad string length in bson");if(null!=d&&d.utf8&&!Ot(e,t,t+Ae-1))throw new O("Invalid UTF-8 string in BSON document");var Ne=e.toString("utf8",t,t+Ae-1);t+=Ae;var ke=b.alloc(12);e.copy(ke,0,t,t+12),R=new rt(ke),t+=12,D=new Ie(Ne,R)}"__proto__"===M?Object.defineProperty(j,M,{value:D,writable:!0,enumerable:!0,configurable:!0}):j[M]=D}if(T!==t-E){if(n)throw new O("corrupt array bson");throw new O("corrupt object bson")}if(!I)return j;if(Pe(j)){var Me=Object.assign({},j);return delete Me.$ref,delete Me.$id,delete Me.$db,new Ie(j.$ref,j.$id,j.$db,Me)}return j}function xt(e,t,r){return t?(null==t[e]&&(t[e]=new Function(e)),t[e].bind(r)):new Function(e)}function At(e,t,r,n){var i=e.toString("utf8",t,r);if(n)for(var o=0;o<i.length;o++)if(65533===i.charCodeAt(o)){if(!Ot(e,t,r))throw new O("Invalid UTF-8 string in BSON document");break}return i}var Nt=/\x00/,kt=new Set(["$db","$ref","$id","$clusterTime"]);function Mt(e,t,r,n,i){e[n++]=K;var o=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8");e[(n=n+o+1)-1]=0;var a=e.write(r,n+4,void 0,"utf8");return e[n+3]=a+1>>24&255,e[n+2]=a+1>>16&255,e[n+1]=a+1>>8&255,e[n]=a+1&255,n=n+4+a,e[n++]=0,n}var Dt=new Uint8Array(8),Rt=new DataView(Dt.buffer,Dt.byteOffset,Dt.byteLength);function Ct(e,t,r,n,i){return Number.isInteger(r)&&r>=V&&r<=U?(e[n++]=ce,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,e[n++]=255&r,e[n++]=r>>8&255,e[n++]=r>>16&255,e[n++]=r>>24&255):(e[n++]=H,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,Rt.setFloat64(0,r,!0),e.set(Dt,n),n+=8),n}function $t(e,t,r,n,i){return e[n++]=ne,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,n}function Ft(e,t,r,n,i){return e[n++]=te,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,e[n++]=r?1:0,n}function qt(e,t,r,n,i){e[n++]=re,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0;var o=Re.fromNumber(r.getTime()),a=o.getLowBits(),s=o.getHighBits();return e[n++]=255&a,e[n++]=a>>8&255,e[n++]=a>>16&255,e[n++]=a>>24&255,e[n++]=255&s,e[n++]=s>>8&255,e[n++]=s>>16&255,e[n++]=s>>24&255,n}function Lt(e,t,r,n,i){if(e[n++]=ie,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,r.source&&null!=r.source.match(Nt))throw Error("value "+r.source+" must not contain null bytes");return n+=e.write(r.source,n,void 0,"utf8"),e[n++]=0,r.ignoreCase&&(e[n++]=105),r.global&&(e[n++]=115),r.multiline&&(e[n++]=109),e[n++]=0,n}function Bt(e,t,r,n,i){if(e[n++]=ie,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,null!=r.pattern.match(Nt))throw Error("pattern "+r.pattern+" must not contain null bytes");return n+=e.write(r.pattern,n,void 0,"utf8"),e[n++]=0,n+=e.write(r.options.split("").sort().join(""),n,void 0,"utf8"),e[n++]=0,n}function Ut(e,t,r,n,i){return null===r?e[n++]=ne:"MinKey"===r._bsontype?e[n++]=de:e[n++]=he,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,n}function Vt(e,t,r,n,i){if(e[n++]=ee,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,"string"==typeof r.id)e.write(r.id,n,void 0,"binary");else{if(!A(r.id))throw new S("object ["+JSON.stringify(r)+"] is not a valid ObjectId");e.set(r.id.subarray(0,12),n)}return n+12}function zt(e,t,r,n,i){e[n++]=Z,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0;var o=r.length;return e[n++]=255&o,e[n++]=o>>8&255,e[n++]=o>>16&255,e[n++]=o>>24&255,e[n++]=ye,e.set($(r),n),n+o}function Qt(e,t,r,n,i,o,a,s,u,c){void 0===i&&(i=!1),void 0===o&&(o=0),void 0===a&&(a=!1),void 0===s&&(s=!0),void 0===u&&(u=!1),void 0===c&&(c=[]);for(var l=0;l<c.length;l++)if(c[l]===r)throw new O("cyclic dependency detected");c.push(r),e[n++]=Array.isArray(r)?J:G,n+=u?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0;var f=tr(e,r,i,n,o+1,a,s,c);return c.pop(),f}function Yt(e,t,r,n,i){return e[n++]=pe,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,e.set(r.bytes.subarray(0,16),n),n+16}function Wt(e,t,r,n,i){e[n++]="Long"===r._bsontype?fe:le,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0;var o=r.getLowBits(),a=r.getHighBits();return e[n++]=255&o,e[n++]=o>>8&255,e[n++]=o>>16&255,e[n++]=o>>24&255,e[n++]=255&a,e[n++]=a>>8&255,e[n++]=a>>16&255,e[n++]=a>>24&255,n}function Ht(e,t,r,n,i){return r=r.valueOf(),e[n++]=ce,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,e[n++]=255&r,e[n++]=r>>8&255,e[n++]=r>>16&255,e[n++]=r>>24&255,n}function Kt(e,t,r,n,i){return e[n++]=H,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,Rt.setFloat64(0,r.value,!0),e.set(Dt,n),n+8}function Gt(e,t,r,n,i,o,a){e[n++]=ae,n+=a?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0;var s=j(r),u=e.write(s,n+4,void 0,"utf8")+1;return e[n]=255&u,e[n+1]=u>>8&255,e[n+2]=u>>16&255,e[n+3]=u>>24&255,n=n+4+u-1,e[n++]=0,n}function Jt(e,t,r,n,i,o,a,s,u){if(void 0===i&&(i=!1),void 0===o&&(o=0),void 0===a&&(a=!1),void 0===s&&(s=!0),void 0===u&&(u=!1),r.scope&&"object"==typeof r.scope){e[n++]=ue,n+=u?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0;var c=n,l="string"==typeof r.code?r.code:r.code.toString();n+=4;var f=e.write(l,n+4,void 0,"utf8")+1;e[n]=255&f,e[n+1]=f>>8&255,e[n+2]=f>>16&255,e[n+3]=f>>24&255,e[n+4+f-1]=0,n=n+f+4;var p=tr(e,r.scope,i,n,o+1,a,s);n=p-1;var d=p-c;e[c++]=255&d,e[c++]=d>>8&255,e[c++]=d>>16&255,e[c++]=d>>24&255,e[n++]=0}else{e[n++]=ae,n+=u?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,l=r.code.toString();var h=e.write(l,n+4,void 0,"utf8")+1;e[n]=255&h,e[n+1]=h>>8&255,e[n+2]=h>>16&255,e[n+3]=h>>24&255,n=n+4+h-1,e[n++]=0}return n}function Zt(e,t,r,n,i){e[n++]=Z,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0;var o=r.value(!0),a=r.position;return r.sub_type===Ee.SUBTYPE_BYTE_ARRAY&&(a+=4),e[n++]=255&a,e[n++]=a>>8&255,e[n++]=a>>16&255,e[n++]=a>>24&255,e[n++]=r.sub_type,r.sub_type===Ee.SUBTYPE_BYTE_ARRAY&&(a-=4,e[n++]=255&a,e[n++]=a>>8&255,e[n++]=a>>16&255,e[n++]=a>>24&255),e.set(o,n),n+r.position}function Xt(e,t,r,n,i){e[n++]=se,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0;var o=e.write(r.value,n+4,void 0,"utf8")+1;return e[n]=255&o,e[n+1]=o>>8&255,e[n+2]=o>>16&255,e[n+3]=o>>24&255,n=n+4+o-1,e[n++]=0,n}function er(e,t,r,n,i,o,a){e[n++]=G,n+=a?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0;var s=n,u={$ref:r.collection||r.namespace,$id:r.oid};null!=r.db&&(u.$db=r.db);var c=tr(e,u=Object.assign(u,r.fields),!1,n,i+1,o),l=c-s;return e[s++]=255&l,e[s++]=l>>8&255,e[s++]=l>>16&255,e[s++]=l>>24&255,c}function tr(e,t,r,n,i,o,a,s){void 0===r&&(r=!1),void 0===n&&(n=0),void 0===i&&(i=0),void 0===o&&(o=!1),void 0===a&&(a=!0),void 0===s&&(s=[]),n=n||0,(s=s||[]).push(t);var u,c=n+4;if(Array.isArray(t))for(var l=0;l<t.length;l++){var f="".concat(l);if("function"==typeof(null==(v=t[l])?void 0:v.toBSON)&&(v=v.toBSON()),"string"==typeof v)c=Mt(e,f,v,c,!0);else if("number"==typeof v)c=Ct(e,f,v,c,!0);else{if("bigint"==typeof v)throw new S("Unsupported type BigInt, please use Decimal128");if("boolean"==typeof v)c=Ft(e,f,v,c,!0);else if(v instanceof Date||D(v))c=qt(e,f,v,c,!0);else if(void 0===v)c=$t(e,f,0,c,!0);else if(null===v)c=$t(e,f,0,c,!0);else if("ObjectId"===v._bsontype||"ObjectID"===v._bsontype)c=Vt(e,f,v,c,!0);else if(A(v))c=zt(e,f,v,c,!0);else if(v instanceof RegExp||M(v))c=Lt(e,f,v,c,!0);else if("object"==typeof v&&null==v._bsontype)c=Qt(e,f,v,c,r,i,o,a,!0,s);else if("object"==typeof v&&st(v)&&"Decimal128"===v._bsontype)c=Yt(e,f,v,c,!0);else if("Long"===v._bsontype||"Timestamp"===v._bsontype)c=Wt(e,f,v,c,!0);else if("Double"===v._bsontype)c=Kt(e,f,v,c,!0);else if("function"==typeof v&&o)c=Gt(e,f,v,c,0,0,!0);else if("Code"===v._bsontype)c=Jt(e,f,v,c,r,i,o,a,!0);else if("Binary"===v._bsontype)c=Zt(e,f,v,c,!0);else if("Symbol"===v._bsontype)c=Xt(e,f,v,c,!0);else if("DBRef"===v._bsontype)c=er(e,f,v,c,i,o,!0);else if("BSONRegExp"===v._bsontype)c=Bt(e,f,v,c,!0);else if("Int32"===v._bsontype)c=Ht(e,f,v,c,!0);else if("MinKey"===v._bsontype||"MaxKey"===v._bsontype)c=Ut(e,f,v,c,!0);else if(void 0!==v._bsontype)throw new S("Unrecognized or invalid _bsontype: ".concat(String(v._bsontype)))}}else if(t instanceof mt||(u=t,"[object Map]"===Object.prototype.toString.call(u)))for(var p=t.entries(),d=!1;!d;){var h=p.next();if(!(d=!!h.done)){f=h.value[0];var y=typeof(v=h.value[1]);if("string"==typeof f&&!kt.has(f)){if(null!=f.match(Nt))throw Error("key "+f+" must not contain null bytes");if(r){if("$"===f[0])throw Error("key "+f+" must not start with '$'");if(~f.indexOf("."))throw Error("key "+f+" must not contain '.'")}}if("string"===y)c=Mt(e,f,v,c);else if("number"===y)c=Ct(e,f,v,c);else{if("bigint"===y||N(v)||k(v))throw new S("Unsupported type BigInt, please use Decimal128");if("boolean"===y)c=Ft(e,f,v,c);else if(v instanceof Date||D(v))c=qt(e,f,v,c);else if(null===v||void 0===v&&!1===a)c=$t(e,f,0,c);else if("ObjectId"===v._bsontype||"ObjectID"===v._bsontype)c=Vt(e,f,v,c);else if(A(v))c=zt(e,f,v,c);else if(v instanceof RegExp||M(v))c=Lt(e,f,v,c);else if("object"===y&&null==v._bsontype)c=Qt(e,f,v,c,r,i,o,a,!1,s);else if("object"===y&&"Decimal128"===v._bsontype)c=Yt(e,f,v,c);else if("Long"===v._bsontype||"Timestamp"===v._bsontype)c=Wt(e,f,v,c);else if("Double"===v._bsontype)c=Kt(e,f,v,c);else if("Code"===v._bsontype)c=Jt(e,f,v,c,r,i,o,a);else if("function"==typeof v&&o)c=Gt(e,f,v,c,0,0,o);else if("Binary"===v._bsontype)c=Zt(e,f,v,c);else if("Symbol"===v._bsontype)c=Xt(e,f,v,c);else if("DBRef"===v._bsontype)c=er(e,f,v,c,i,o);else if("BSONRegExp"===v._bsontype)c=Bt(e,f,v,c);else if("Int32"===v._bsontype)c=Ht(e,f,v,c);else if("MinKey"===v._bsontype||"MaxKey"===v._bsontype)c=Ut(e,f,v,c);else if(void 0!==v._bsontype)throw new S("Unrecognized or invalid _bsontype: ".concat(String(v._bsontype)))}}}else{if("function"==typeof(null==t?void 0:t.toBSON)&&null!=(t=t.toBSON())&&"object"!=typeof t)throw new S("toBSON function did not return an object");for(var f in t){var v;if("function"==typeof(null==(v=t[f])?void 0:v.toBSON)&&(v=v.toBSON()),y=typeof v,"string"==typeof f&&!kt.has(f)){if(null!=f.match(Nt))throw Error("key "+f+" must not contain null bytes");if(r){if("$"===f[0])throw Error("key "+f+" must not start with '$'");if(~f.indexOf("."))throw Error("key "+f+" must not contain '.'")}}if("string"===y)c=Mt(e,f,v,c);else if("number"===y)c=Ct(e,f,v,c);else{if("bigint"===y)throw new S("Unsupported type BigInt, please use Decimal128");if("boolean"===y)c=Ft(e,f,v,c);else if(v instanceof Date||D(v))c=qt(e,f,v,c);else if(void 0===v)!1===a&&(c=$t(e,f,0,c));else if(null===v)c=$t(e,f,0,c);else if("ObjectId"===v._bsontype||"ObjectID"===v._bsontype)c=Vt(e,f,v,c);else if(A(v))c=zt(e,f,v,c);else if(v instanceof RegExp||M(v))c=Lt(e,f,v,c);else if("object"===y&&null==v._bsontype)c=Qt(e,f,v,c,r,i,o,a,!1,s);else if("object"===y&&"Decimal128"===v._bsontype)c=Yt(e,f,v,c);else if("Long"===v._bsontype||"Timestamp"===v._bsontype)c=Wt(e,f,v,c);else if("Double"===v._bsontype)c=Kt(e,f,v,c);else if("Code"===v._bsontype)c=Jt(e,f,v,c,r,i,o,a);else if("function"==typeof v&&o)c=Gt(e,f,v,c,0,0,o);else if("Binary"===v._bsontype)c=Zt(e,f,v,c);else if("Symbol"===v._bsontype)c=Xt(e,f,v,c);else if("DBRef"===v._bsontype)c=er(e,f,v,c,i,o);else if("BSONRegExp"===v._bsontype)c=Bt(e,f,v,c);else if("Int32"===v._bsontype)c=Ht(e,f,v,c);else if("MinKey"===v._bsontype||"MaxKey"===v._bsontype)c=Ut(e,f,v,c);else if(void 0!==v._bsontype)throw new S("Unrecognized or invalid _bsontype: ".concat(String(v._bsontype)))}}}s.pop(),e[c++]=0;var m=c-n;return e[n++]=255&m,e[n++]=m>>8&255,e[n++]=m>>16&255,e[n++]=m>>24&255,c}var rr=17825792,nr=b.alloc(rr);function ir(e){nr.length<e&&(nr=b.alloc(e))}function or(e,t){void 0===t&&(t={});var r="boolean"==typeof t.checkKeys&&t.checkKeys,n="boolean"==typeof t.serializeFunctions&&t.serializeFunctions,i="boolean"!=typeof t.ignoreUndefined||t.ignoreUndefined,o="number"==typeof t.minInternalBufferSize?t.minInternalBufferSize:rr;nr.length<o&&(nr=b.alloc(o));var a=tr(nr,e,r,0,0,n,i,[]),s=b.alloc(a);return nr.copy(s,0,0,s.length),s}function ar(e,t,r){void 0===r&&(r={});var n="boolean"==typeof r.checkKeys&&r.checkKeys,i="boolean"==typeof r.serializeFunctions&&r.serializeFunctions,o="boolean"!=typeof r.ignoreUndefined||r.ignoreUndefined,a="number"==typeof r.index?r.index:0,s=tr(nr,e,n,0,0,i,o);return nr.copy(t,a,0,s),a+s-1}function sr(e,t){return void 0===t&&(t={}),jt(e instanceof b?e:$(e),t)}function ur(e,t){return void 0===t&&(t={}),_t(e,"boolean"==typeof(t=t||{}).serializeFunctions&&t.serializeFunctions,"boolean"!=typeof t.ignoreUndefined||t.ignoreUndefined)}function cr(e,t,r,n,i,o){for(var a=Object.assign({allowObjectSmallerThanBufferSize:!0,index:0},o),s=$(e),u=t,c=0;c<r;c++){var l=s[u]|s[u+1]<<8|s[u+2]<<16|s[u+3]<<24;a.index=u,n[i+c]=jt(s,a),u+=l}return u}const lr={Binary:Ee,Code:je,DBRef:Ie,Decimal128:He,Double:Ke,Int32:Ge,Long:Re,UUID:Te,Map:mt,MaxKey:Je,MinKey:Ze,ObjectId:rt,ObjectID:rt,BSONRegExp:nt,BSONSymbol:it,Timestamp:at,EJSON:vt,setInternalBufferSize:ir,serialize:or,serializeWithBufferAndIndex:ar,deserialize:sr,calculateObjectSize:ur,deserializeStream:cr,BSONError:O,BSONTypeError:S}},2091:function(e,t,r){var n,i;i=function(e){var t=["N","E","A","D"];function r(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}function n(e,t){Object.defineProperty(this,"kind",{value:e,enumerable:!0}),t&&t.length&&Object.defineProperty(this,"path",{value:t,enumerable:!0})}function i(e,t,r){i.super_.call(this,"E",e),Object.defineProperty(this,"lhs",{value:t,enumerable:!0}),Object.defineProperty(this,"rhs",{value:r,enumerable:!0})}function o(e,t){o.super_.call(this,"N",e),Object.defineProperty(this,"rhs",{value:t,enumerable:!0})}function a(e,t){a.super_.call(this,"D",e),Object.defineProperty(this,"lhs",{value:t,enumerable:!0})}function s(e,t,r){s.super_.call(this,"A",e),Object.defineProperty(this,"index",{value:t,enumerable:!0}),Object.defineProperty(this,"item",{value:r,enumerable:!0})}function u(e,t,r){var n=e.slice((r||t)+1||e.length);return e.length=t<0?e.length+t:t,e.push.apply(e,n),e}function c(e){var t=typeof e;return"object"!==t?t:e===Math?"math":null===e?"null":Array.isArray(e)?"array":"[object Date]"===Object.prototype.toString.call(e)?"date":"function"==typeof e.toString&&/^\/.*\//.test(e.toString())?"regexp":"object"}function l(e){var t=0;if(0===e.length)return t;for(var r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t&=t;return t}function f(e){var t=0,r=c(e);if("array"===r)return e.forEach((function(e){t+=f(e)})),t+l("[type: array, hash: "+t+"]");if("object"===r){for(var n in e)if(e.hasOwnProperty(n)){var i="[ type: object, key: "+n+", value hash: "+f(e[n])+"]";t+=l(i)}return t}return t+l("[ type: "+r+" ; value: "+e+"]")}function p(e,t,r,n,u,l,d,h){r=r||[],d=d||[];var y=(u=u||[]).slice(0);if(null!=l){if(n){if("function"==typeof n&&n(y,l))return;if("object"==typeof n){if(n.prefilter&&n.prefilter(y,l))return;if(n.normalize){var v=n.normalize(y,l,e,t);v&&(e=v[0],t=v[1])}}}y.push(l)}"regexp"===c(e)&&"regexp"===c(t)&&(e=e.toString(),t=t.toString());var m,b,g,_,w=typeof e,O=typeof t,S="undefined"!==w||d&&d.length>0&&d[d.length-1].lhs&&Object.getOwnPropertyDescriptor(d[d.length-1].lhs,l),E="undefined"!==O||d&&d.length>0&&d[d.length-1].rhs&&Object.getOwnPropertyDescriptor(d[d.length-1].rhs,l);if(!S&&E)r.push(new o(y,t));else if(!E&&S)r.push(new a(y,e));else if(c(e)!==c(t))r.push(new i(y,e,t));else if("date"===c(e)&&e-t!=0)r.push(new i(y,e,t));else if("object"===w&&null!==e&&null!==t){for(m=d.length-1;m>-1;--m)if(d[m].lhs===e){_=!0;break}if(_)e!==t&&r.push(new i(y,e,t));else{if(d.push({lhs:e,rhs:t}),Array.isArray(e)){for(h&&(e.sort((function(e,t){return f(e)-f(t)})),t.sort((function(e,t){return f(e)-f(t)}))),m=t.length-1,b=e.length-1;m>b;)r.push(new s(y,m,new o(void 0,t[m--])));for(;b>m;)r.push(new s(y,b,new a(void 0,e[b--])));for(;m>=0;--m)p(e[m],t[m],r,n,y,m,d,h)}else{var T=Object.keys(e),j=Object.keys(t);for(m=0;m<T.length;++m)g=T[m],(_=j.indexOf(g))>=0?(p(e[g],t[g],r,n,y,g,d,h),j[_]=null):p(e[g],void 0,r,n,y,g,d,h);for(m=0;m<j.length;++m)(g=j[m])&&p(void 0,t[g],r,n,y,g,d,h)}d.length=d.length-1}}else e!==t&&("number"===w&&isNaN(e)&&isNaN(t)||r.push(new i(y,e,t)))}function d(e,t,r,n,i){var o=[];if(p(e,t,o,n,null,null,null,i),r)for(var a=0;a<o.length;++a)r(o[a]);return o}function h(e,t,r,n){var i=d(e,t,n?function(e){e&&n.push(e)}:void 0,r);return n||(i.length?i:void 0)}function y(e,t,r){if(r.path&&r.path.length){var n,i=e[t],o=r.path.length-1;for(n=0;n<o;n++)i=i[r.path[n]];switch(r.kind){case"A":y(i[r.path[n]],r.index,r.item);break;case"D":delete i[r.path[n]];break;case"E":case"N":i[r.path[n]]=r.rhs}}else switch(r.kind){case"A":y(e[t],r.index,r.item);break;case"D":e=u(e,t);break;case"E":case"N":e[t]=r.rhs}return e}function v(e,r,n){if(void 0===n&&r&&~t.indexOf(r.kind)&&(n=r),e&&n&&n.kind){for(var i=e,o=-1,a=n.path?n.path.length-1:0;++o<a;)void 0===i[n.path[o]]&&(i[n.path[o]]=void 0!==n.path[o+1]&&"number"==typeof n.path[o+1]?[]:{}),i=i[n.path[o]];switch(n.kind){case"A":n.path&&void 0===i[n.path[o]]&&(i[n.path[o]]=[]),y(n.path?i[n.path[o]]:i,n.index,n.item);break;case"D":delete i[n.path[o]];break;case"E":case"N":i[n.path[o]]=n.rhs}}}function m(e,t,r){if(r.path&&r.path.length){var n,i=e[t],o=r.path.length-1;for(n=0;n<o;n++)i=i[r.path[n]];switch(r.kind){case"A":m(i[r.path[n]],r.index,r.item);break;case"D":case"E":i[r.path[n]]=r.lhs;break;case"N":delete i[r.path[n]]}}else switch(r.kind){case"A":m(e[t],r.index,r.item);break;case"D":case"E":e[t]=r.lhs;break;case"N":e=u(e,t)}return e}return r(i,n),r(o,n),r(a,n),r(s,n),Object.defineProperties(h,{diff:{value:h,enumerable:!0},orderIndependentDiff:{value:function(e,t,r,n){var i=d(e,t,n?function(e){e&&n.push(e)}:void 0,r,!0);return n||(i.length?i:void 0)},enumerable:!0},observableDiff:{value:d,enumerable:!0},orderIndependentObservableDiff:{value:function(e,t,r,n,i,o,a){return p(e,t,r,n,i,o,a,!0)},enumerable:!0},orderIndepHash:{value:f,enumerable:!0},applyDiff:{value:function(e,t,r){e&&t&&d(e,t,(function(n){r&&!r(e,t,n)||v(e,t,n)}))},enumerable:!0},applyChange:{value:v,enumerable:!0},revertChange:{value:function(e,t,r){if(e&&t&&r&&r.kind){var n,i,o=e;for(i=r.path.length-1,n=0;n<i;n++)void 0===o[r.path[n]]&&(o[r.path[n]]={}),o=o[r.path[n]];switch(r.kind){case"A":m(o[r.path[n]],r.index,r.item);break;case"D":case"E":o[r.path[n]]=r.lhs;break;case"N":delete o[r.path[n]]}}},enumerable:!0},isConflict:{value:function(){return"undefined"!=typeof $conflict},enumerable:!0}}),h.DeepDiff=h,e&&(e.DeepDiff=h),h}(this),void 0===(n=function(){return i}.call(t,r,t,e))||(e.exports=n)},6471:e=>{"use strict";e.exports=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;var n,i,o;if(Array.isArray(t)){if((n=t.length)!=r.length)return!1;for(i=n;0!=i--;)if(!e(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((n=(o=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(i=n;0!=i--;)if(!Object.prototype.hasOwnProperty.call(r,o[i]))return!1;for(i=n;0!=i--;){var a=o[i];if(!e(t[a],r[a]))return!1}return!0}return t!=t&&r!=r}},8784:function(e,t,r){var n;e=r.nmd(e),function(){var i,o="Expected a function",a="__lodash_hash_undefined__",s="__lodash_placeholder__",u=32,c=128,l=1/0,f=9007199254740991,p=NaN,d=4294967295,h=[["ary",c],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",u],["partialRight",64],["rearg",256]],y="[object Arguments]",v="[object Array]",m="[object Boolean]",b="[object Date]",g="[object Error]",_="[object Function]",w="[object GeneratorFunction]",O="[object Map]",S="[object Number]",E="[object Object]",T="[object Promise]",j="[object RegExp]",P="[object Set]",I="[object String]",x="[object Symbol]",A="[object WeakMap]",N="[object ArrayBuffer]",k="[object DataView]",M="[object Float32Array]",D="[object Float64Array]",R="[object Int8Array]",C="[object Int16Array]",$="[object Int32Array]",F="[object Uint8Array]",q="[object Uint8ClampedArray]",L="[object Uint16Array]",B="[object Uint32Array]",U=/\b__p \+= '';/g,V=/\b(__p \+=) '' \+/g,z=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Q=/&(?:amp|lt|gt|quot|#39);/g,Y=/[&<>"']/g,W=RegExp(Q.source),H=RegExp(Y.source),K=/<%-([\s\S]+?)%>/g,G=/<%([\s\S]+?)%>/g,J=/<%=([\s\S]+?)%>/g,Z=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,X=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,re=RegExp(te.source),ne=/^\s+/,ie=/\s/,oe=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ae=/\{\n\/\* \[wrapped with (.+)\] \*/,se=/,? & /,ue=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ce=/[()=,{}\[\]\/\s]/,le=/\\(\\)?/g,fe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,pe=/\w*$/,de=/^[-+]0x[0-9a-f]+$/i,he=/^0b[01]+$/i,ye=/^\[object .+?Constructor\]$/,ve=/^0o[0-7]+$/i,me=/^(?:0|[1-9]\d*)$/,be=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ge=/($^)/,_e=/['\n\r\u2028\u2029\\]/g,we="\\ud800-\\udfff",Oe="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Se="\\u2700-\\u27bf",Ee="a-z\\xdf-\\xf6\\xf8-\\xff",Te="A-Z\\xc0-\\xd6\\xd8-\\xde",je="\\ufe0e\\ufe0f",Pe="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ie="["+we+"]",xe="["+Pe+"]",Ae="["+Oe+"]",Ne="\\d+",ke="["+Se+"]",Me="["+Ee+"]",De="[^"+we+Pe+Ne+Se+Ee+Te+"]",Re="\\ud83c[\\udffb-\\udfff]",Ce="[^"+we+"]",$e="(?:\\ud83c[\\udde6-\\uddff]){2}",Fe="[\\ud800-\\udbff][\\udc00-\\udfff]",qe="["+Te+"]",Le="\\u200d",Be="(?:"+Me+"|"+De+")",Ue="(?:"+qe+"|"+De+")",Ve="(?:['’](?:d|ll|m|re|s|t|ve))?",ze="(?:['’](?:D|LL|M|RE|S|T|VE))?",Qe="(?:"+Ae+"|"+Re+")?",Ye="["+je+"]?",We=Ye+Qe+"(?:"+Le+"(?:"+[Ce,$e,Fe].join("|")+")"+Ye+Qe+")*",He="(?:"+[ke,$e,Fe].join("|")+")"+We,Ke="(?:"+[Ce+Ae+"?",Ae,$e,Fe,Ie].join("|")+")",Ge=RegExp("['’]","g"),Je=RegExp(Ae,"g"),Ze=RegExp(Re+"(?="+Re+")|"+Ke+We,"g"),Xe=RegExp([qe+"?"+Me+"+"+Ve+"(?="+[xe,qe,"$"].join("|")+")",Ue+"+"+ze+"(?="+[xe,qe+Be,"$"].join("|")+")",qe+"?"+Be+"+"+Ve,qe+"+"+ze,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ne,He].join("|"),"g"),et=RegExp("["+Le+we+Oe+je+"]"),tt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,rt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],nt=-1,it={};it[M]=it[D]=it[R]=it[C]=it[$]=it[F]=it[q]=it[L]=it[B]=!0,it[y]=it[v]=it[N]=it[m]=it[k]=it[b]=it[g]=it[_]=it[O]=it[S]=it[E]=it[j]=it[P]=it[I]=it[A]=!1;var ot={};ot[y]=ot[v]=ot[N]=ot[k]=ot[m]=ot[b]=ot[M]=ot[D]=ot[R]=ot[C]=ot[$]=ot[O]=ot[S]=ot[E]=ot[j]=ot[P]=ot[I]=ot[x]=ot[F]=ot[q]=ot[L]=ot[B]=!0,ot[g]=ot[_]=ot[A]=!1;var at={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},st=parseFloat,ut=parseInt,ct="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,lt="object"==typeof self&&self&&self.Object===Object&&self,ft=ct||lt||Function("return this")(),pt=t&&!t.nodeType&&t,dt=pt&&e&&!e.nodeType&&e,ht=dt&&dt.exports===pt,yt=ht&&ct.process,vt=function(){try{return dt&&dt.require&&dt.require("util").types||yt&&yt.binding&&yt.binding("util")}catch(e){}}(),mt=vt&&vt.isArrayBuffer,bt=vt&&vt.isDate,gt=vt&&vt.isMap,_t=vt&&vt.isRegExp,wt=vt&&vt.isSet,Ot=vt&&vt.isTypedArray;function St(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function Et(e,t,r,n){for(var i=-1,o=null==e?0:e.length;++i<o;){var a=e[i];t(n,a,r(a),e)}return n}function Tt(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}function jt(e,t){for(var r=null==e?0:e.length;r--&&!1!==t(e[r],r,e););return e}function Pt(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}function It(e,t){for(var r=-1,n=null==e?0:e.length,i=0,o=[];++r<n;){var a=e[r];t(a,r,e)&&(o[i++]=a)}return o}function xt(e,t){return!(null==e||!e.length)&&qt(e,t,0)>-1}function At(e,t,r){for(var n=-1,i=null==e?0:e.length;++n<i;)if(r(t,e[n]))return!0;return!1}function Nt(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}function kt(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}function Mt(e,t,r,n){var i=-1,o=null==e?0:e.length;for(n&&o&&(r=e[++i]);++i<o;)r=t(r,e[i],i,e);return r}function Dt(e,t,r,n){var i=null==e?0:e.length;for(n&&i&&(r=e[--i]);i--;)r=t(r,e[i],i,e);return r}function Rt(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var Ct=Vt("length");function $t(e,t,r){var n;return r(e,(function(e,r,i){if(t(e,r,i))return n=r,!1})),n}function Ft(e,t,r,n){for(var i=e.length,o=r+(n?1:-1);n?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function qt(e,t,r){return t==t?function(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}(e,t,r):Ft(e,Bt,r)}function Lt(e,t,r,n){for(var i=r-1,o=e.length;++i<o;)if(n(e[i],t))return i;return-1}function Bt(e){return e!=e}function Ut(e,t){var r=null==e?0:e.length;return r?Yt(e,t)/r:p}function Vt(e){return function(t){return null==t?i:t[e]}}function zt(e){return function(t){return null==e?i:e[t]}}function Qt(e,t,r,n,i){return i(e,(function(e,i,o){r=n?(n=!1,e):t(r,e,i,o)})),r}function Yt(e,t){for(var r,n=-1,o=e.length;++n<o;){var a=t(e[n]);a!==i&&(r=r===i?a:r+a)}return r}function Wt(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function Ht(e){return e?e.slice(0,pr(e)+1).replace(ne,""):e}function Kt(e){return function(t){return e(t)}}function Gt(e,t){return Nt(t,(function(t){return e[t]}))}function Jt(e,t){return e.has(t)}function Zt(e,t){for(var r=-1,n=e.length;++r<n&&qt(t,e[r],0)>-1;);return r}function Xt(e,t){for(var r=e.length;r--&&qt(t,e[r],0)>-1;);return r}function er(e,t){for(var r=e.length,n=0;r--;)e[r]===t&&++n;return n}var tr=zt({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),rr=zt({"&":"&","<":"<",">":">",'"':""","'":"'"});function nr(e){return"\\"+at[e]}function ir(e){return et.test(e)}function or(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}function ar(e,t){return function(r){return e(t(r))}}function sr(e,t){for(var r=-1,n=e.length,i=0,o=[];++r<n;){var a=e[r];a!==t&&a!==s||(e[r]=s,o[i++]=r)}return o}function ur(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}function cr(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=[e,e]})),r}function lr(e){return ir(e)?function(e){for(var t=Ze.lastIndex=0;Ze.test(e);)++t;return t}(e):Ct(e)}function fr(e){return ir(e)?function(e){return e.match(Ze)||[]}(e):function(e){return e.split("")}(e)}function pr(e){for(var t=e.length;t--&&ie.test(e.charAt(t)););return t}var dr=zt({"&":"&","<":"<",">":">",""":'"',"'":"'"}),hr=function e(t){var r,n=(t=null==t?ft:hr.defaults(ft.Object(),t,hr.pick(ft,rt))).Array,ie=t.Date,we=t.Error,Oe=t.Function,Se=t.Math,Ee=t.Object,Te=t.RegExp,je=t.String,Pe=t.TypeError,Ie=n.prototype,xe=Oe.prototype,Ae=Ee.prototype,Ne=t["__core-js_shared__"],ke=xe.toString,Me=Ae.hasOwnProperty,De=0,Re=(r=/[^.]+$/.exec(Ne&&Ne.keys&&Ne.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",Ce=Ae.toString,$e=ke.call(Ee),Fe=ft._,qe=Te("^"+ke.call(Me).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Le=ht?t.Buffer:i,Be=t.Symbol,Ue=t.Uint8Array,Ve=Le?Le.allocUnsafe:i,ze=ar(Ee.getPrototypeOf,Ee),Qe=Ee.create,Ye=Ae.propertyIsEnumerable,We=Ie.splice,He=Be?Be.isConcatSpreadable:i,Ke=Be?Be.iterator:i,Ze=Be?Be.toStringTag:i,et=function(){try{var e=co(Ee,"defineProperty");return e({},"",{}),e}catch(e){}}(),at=t.clearTimeout!==ft.clearTimeout&&t.clearTimeout,ct=ie&&ie.now!==ft.Date.now&&ie.now,lt=t.setTimeout!==ft.setTimeout&&t.setTimeout,pt=Se.ceil,dt=Se.floor,yt=Ee.getOwnPropertySymbols,vt=Le?Le.isBuffer:i,Ct=t.isFinite,zt=Ie.join,yr=ar(Ee.keys,Ee),vr=Se.max,mr=Se.min,br=ie.now,gr=t.parseInt,_r=Se.random,wr=Ie.reverse,Or=co(t,"DataView"),Sr=co(t,"Map"),Er=co(t,"Promise"),Tr=co(t,"Set"),jr=co(t,"WeakMap"),Pr=co(Ee,"create"),Ir=jr&&new jr,xr={},Ar=qo(Or),Nr=qo(Sr),kr=qo(Er),Mr=qo(Tr),Dr=qo(jr),Rr=Be?Be.prototype:i,Cr=Rr?Rr.valueOf:i,$r=Rr?Rr.toString:i;function Fr(e){if(rs(e)&&!Qa(e)&&!(e instanceof Ur)){if(e instanceof Br)return e;if(Me.call(e,"__wrapped__"))return Lo(e)}return new Br(e)}var qr=function(){function e(){}return function(t){if(!ts(t))return{};if(Qe)return Qe(t);e.prototype=t;var r=new e;return e.prototype=i,r}}();function Lr(){}function Br(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function Ur(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=d,this.__views__=[]}function Vr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function zr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Qr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Yr(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new Qr;++t<r;)this.add(e[t])}function Wr(e){var t=this.__data__=new zr(e);this.size=t.size}function Hr(e,t){var r=Qa(e),n=!r&&za(e),i=!r&&!n&&Ka(e),o=!r&&!n&&!i&&ls(e),a=r||n||i||o,s=a?Wt(e.length,je):[],u=s.length;for(var c in e)!t&&!Me.call(e,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||mo(c,u))||s.push(c);return s}function Kr(e){var t=e.length;return t?e[Yn(0,t-1)]:i}function Gr(e,t){return Do(Pi(e),an(t,0,e.length))}function Jr(e){return Do(Pi(e))}function Zr(e,t,r){(r!==i&&!Ba(e[t],r)||r===i&&!(t in e))&&nn(e,t,r)}function Xr(e,t,r){var n=e[t];Me.call(e,t)&&Ba(n,r)&&(r!==i||t in e)||nn(e,t,r)}function en(e,t){for(var r=e.length;r--;)if(Ba(e[r][0],t))return r;return-1}function tn(e,t,r,n){return fn(e,(function(e,i,o){t(n,e,r(e),o)})),n}function rn(e,t){return e&&Ii(t,ks(t),e)}function nn(e,t,r){"__proto__"==t&&et?et(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function on(e,t){for(var r=-1,o=t.length,a=n(o),s=null==e;++r<o;)a[r]=s?i:Ps(e,t[r]);return a}function an(e,t,r){return e==e&&(r!==i&&(e=e<=r?e:r),t!==i&&(e=e>=t?e:t)),e}function sn(e,t,r,n,o,a){var s,u=1&t,c=2&t,l=4&t;if(r&&(s=o?r(e,n,o,a):r(e)),s!==i)return s;if(!ts(e))return e;var f=Qa(e);if(f){if(s=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&Me.call(e,"index")&&(r.index=e.index,r.input=e.input),r}(e),!u)return Pi(e,s)}else{var p=po(e),d=p==_||p==w;if(Ka(e))return wi(e,u);if(p==E||p==y||d&&!o){if(s=c||d?{}:yo(e),!u)return c?function(e,t){return Ii(e,fo(e),t)}(e,function(e,t){return e&&Ii(t,Ms(t),e)}(s,e)):function(e,t){return Ii(e,lo(e),t)}(e,rn(s,e))}else{if(!ot[p])return o?e:{};s=function(e,t,r){var n,i=e.constructor;switch(t){case N:return Oi(e);case m:case b:return new i(+e);case k:return function(e,t){var r=t?Oi(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}(e,r);case M:case D:case R:case C:case $:case F:case q:case L:case B:return Si(e,r);case O:return new i;case S:case I:return new i(e);case j:return function(e){var t=new e.constructor(e.source,pe.exec(e));return t.lastIndex=e.lastIndex,t}(e);case P:return new i;case x:return n=e,Cr?Ee(Cr.call(n)):{}}}(e,p,u)}}a||(a=new Wr);var h=a.get(e);if(h)return h;a.set(e,s),ss(e)?e.forEach((function(n){s.add(sn(n,t,r,n,e,a))})):ns(e)&&e.forEach((function(n,i){s.set(i,sn(n,t,r,i,e,a))}));var v=f?i:(l?c?ro:to:c?Ms:ks)(e);return Tt(v||e,(function(n,i){v&&(n=e[i=n]),Xr(s,i,sn(n,t,r,i,e,a))})),s}function un(e,t,r){var n=r.length;if(null==e)return!n;for(e=Ee(e);n--;){var o=r[n],a=t[o],s=e[o];if(s===i&&!(o in e)||!a(s))return!1}return!0}function cn(e,t,r){if("function"!=typeof e)throw new Pe(o);return Ao((function(){e.apply(i,r)}),t)}function ln(e,t,r,n){var i=-1,o=xt,a=!0,s=e.length,u=[],c=t.length;if(!s)return u;r&&(t=Nt(t,Kt(r))),n?(o=At,a=!1):t.length>=200&&(o=Jt,a=!1,t=new Yr(t));e:for(;++i<s;){var l=e[i],f=null==r?l:r(l);if(l=n||0!==l?l:0,a&&f==f){for(var p=c;p--;)if(t[p]===f)continue e;u.push(l)}else o(t,f,n)||u.push(l)}return u}Fr.templateSettings={escape:K,evaluate:G,interpolate:J,variable:"",imports:{_:Fr}},Fr.prototype=Lr.prototype,Fr.prototype.constructor=Fr,Br.prototype=qr(Lr.prototype),Br.prototype.constructor=Br,Ur.prototype=qr(Lr.prototype),Ur.prototype.constructor=Ur,Vr.prototype.clear=function(){this.__data__=Pr?Pr(null):{},this.size=0},Vr.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Vr.prototype.get=function(e){var t=this.__data__;if(Pr){var r=t[e];return r===a?i:r}return Me.call(t,e)?t[e]:i},Vr.prototype.has=function(e){var t=this.__data__;return Pr?t[e]!==i:Me.call(t,e)},Vr.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Pr&&t===i?a:t,this},zr.prototype.clear=function(){this.__data__=[],this.size=0},zr.prototype.delete=function(e){var t=this.__data__,r=en(t,e);return!(r<0||(r==t.length-1?t.pop():We.call(t,r,1),--this.size,0))},zr.prototype.get=function(e){var t=this.__data__,r=en(t,e);return r<0?i:t[r][1]},zr.prototype.has=function(e){return en(this.__data__,e)>-1},zr.prototype.set=function(e,t){var r=this.__data__,n=en(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},Qr.prototype.clear=function(){this.size=0,this.__data__={hash:new Vr,map:new(Sr||zr),string:new Vr}},Qr.prototype.delete=function(e){var t=so(this,e).delete(e);return this.size-=t?1:0,t},Qr.prototype.get=function(e){return so(this,e).get(e)},Qr.prototype.has=function(e){return so(this,e).has(e)},Qr.prototype.set=function(e,t){var r=so(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},Yr.prototype.add=Yr.prototype.push=function(e){return this.__data__.set(e,a),this},Yr.prototype.has=function(e){return this.__data__.has(e)},Wr.prototype.clear=function(){this.__data__=new zr,this.size=0},Wr.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},Wr.prototype.get=function(e){return this.__data__.get(e)},Wr.prototype.has=function(e){return this.__data__.has(e)},Wr.prototype.set=function(e,t){var r=this.__data__;if(r instanceof zr){var n=r.__data__;if(!Sr||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Qr(n)}return r.set(e,t),this.size=r.size,this};var fn=Ni(gn),pn=Ni(_n,!0);function dn(e,t){var r=!0;return fn(e,(function(e,n,i){return r=!!t(e,n,i)})),r}function hn(e,t,r){for(var n=-1,o=e.length;++n<o;){var a=e[n],s=t(a);if(null!=s&&(u===i?s==s&&!cs(s):r(s,u)))var u=s,c=a}return c}function yn(e,t){var r=[];return fn(e,(function(e,n,i){t(e,n,i)&&r.push(e)})),r}function vn(e,t,r,n,i){var o=-1,a=e.length;for(r||(r=vo),i||(i=[]);++o<a;){var s=e[o];t>0&&r(s)?t>1?vn(s,t-1,r,n,i):kt(i,s):n||(i[i.length]=s)}return i}var mn=ki(),bn=ki(!0);function gn(e,t){return e&&mn(e,t,ks)}function _n(e,t){return e&&bn(e,t,ks)}function wn(e,t){return It(t,(function(t){return Za(e[t])}))}function On(e,t){for(var r=0,n=(t=mi(t,e)).length;null!=e&&r<n;)e=e[Fo(t[r++])];return r&&r==n?e:i}function Sn(e,t,r){var n=t(e);return Qa(e)?n:kt(n,r(e))}function En(e){return null==e?e===i?"[object Undefined]":"[object Null]":Ze&&Ze in Ee(e)?function(e){var t=Me.call(e,Ze),r=e[Ze];try{e[Ze]=i;var n=!0}catch(e){}var o=Ce.call(e);return n&&(t?e[Ze]=r:delete e[Ze]),o}(e):function(e){return Ce.call(e)}(e)}function Tn(e,t){return e>t}function jn(e,t){return null!=e&&Me.call(e,t)}function Pn(e,t){return null!=e&&t in Ee(e)}function In(e,t,r){for(var o=r?At:xt,a=e[0].length,s=e.length,u=s,c=n(s),l=1/0,f=[];u--;){var p=e[u];u&&t&&(p=Nt(p,Kt(t))),l=mr(p.length,l),c[u]=!r&&(t||a>=120&&p.length>=120)?new Yr(u&&p):i}p=e[0];var d=-1,h=c[0];e:for(;++d<a&&f.length<l;){var y=p[d],v=t?t(y):y;if(y=r||0!==y?y:0,!(h?Jt(h,v):o(f,v,r))){for(u=s;--u;){var m=c[u];if(!(m?Jt(m,v):o(e[u],v,r)))continue e}h&&h.push(v),f.push(y)}}return f}function xn(e,t,r){var n=null==(e=jo(e,t=mi(t,e)))?e:e[Fo(Jo(t))];return null==n?i:St(n,e,r)}function An(e){return rs(e)&&En(e)==y}function Nn(e,t,r,n,o){return e===t||(null==e||null==t||!rs(e)&&!rs(t)?e!=e&&t!=t:function(e,t,r,n,o,a){var s=Qa(e),u=Qa(t),c=s?v:po(e),l=u?v:po(t),f=(c=c==y?E:c)==E,p=(l=l==y?E:l)==E,d=c==l;if(d&&Ka(e)){if(!Ka(t))return!1;s=!0,f=!1}if(d&&!f)return a||(a=new Wr),s||ls(e)?Xi(e,t,r,n,o,a):function(e,t,r,n,i,o,a){switch(r){case k:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case N:return!(e.byteLength!=t.byteLength||!o(new Ue(e),new Ue(t)));case m:case b:case S:return Ba(+e,+t);case g:return e.name==t.name&&e.message==t.message;case j:case I:return e==t+"";case O:var s=or;case P:var u=1&n;if(s||(s=ur),e.size!=t.size&&!u)return!1;var c=a.get(e);if(c)return c==t;n|=2,a.set(e,t);var l=Xi(s(e),s(t),n,i,o,a);return a.delete(e),l;case x:if(Cr)return Cr.call(e)==Cr.call(t)}return!1}(e,t,c,r,n,o,a);if(!(1&r)){var h=f&&Me.call(e,"__wrapped__"),_=p&&Me.call(t,"__wrapped__");if(h||_){var w=h?e.value():e,T=_?t.value():t;return a||(a=new Wr),o(w,T,r,n,a)}}return!!d&&(a||(a=new Wr),function(e,t,r,n,o,a){var s=1&r,u=to(e),c=u.length;if(c!=to(t).length&&!s)return!1;for(var l=c;l--;){var f=u[l];if(!(s?f in t:Me.call(t,f)))return!1}var p=a.get(e),d=a.get(t);if(p&&d)return p==t&&d==e;var h=!0;a.set(e,t),a.set(t,e);for(var y=s;++l<c;){var v=e[f=u[l]],m=t[f];if(n)var b=s?n(m,v,f,t,e,a):n(v,m,f,e,t,a);if(!(b===i?v===m||o(v,m,r,n,a):b)){h=!1;break}y||(y="constructor"==f)}if(h&&!y){var g=e.constructor,_=t.constructor;g==_||!("constructor"in e)||!("constructor"in t)||"function"==typeof g&&g instanceof g&&"function"==typeof _&&_ instanceof _||(h=!1)}return a.delete(e),a.delete(t),h}(e,t,r,n,o,a))}(e,t,r,n,Nn,o))}function kn(e,t,r,n){var o=r.length,a=o,s=!n;if(null==e)return!a;for(e=Ee(e);o--;){var u=r[o];if(s&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++o<a;){var c=(u=r[o])[0],l=e[c],f=u[1];if(s&&u[2]){if(l===i&&!(c in e))return!1}else{var p=new Wr;if(n)var d=n(l,f,c,e,t,p);if(!(d===i?Nn(f,l,3,n,p):d))return!1}}return!0}function Mn(e){return!(!ts(e)||(t=e,Re&&Re in t))&&(Za(e)?qe:ye).test(qo(e));var t}function Dn(e){return"function"==typeof e?e:null==e?iu:"object"==typeof e?Qa(e)?qn(e[0],e[1]):Fn(e):du(e)}function Rn(e){if(!Oo(e))return yr(e);var t=[];for(var r in Ee(e))Me.call(e,r)&&"constructor"!=r&&t.push(r);return t}function Cn(e,t){return e<t}function $n(e,t){var r=-1,i=Wa(e)?n(e.length):[];return fn(e,(function(e,n,o){i[++r]=t(e,n,o)})),i}function Fn(e){var t=uo(e);return 1==t.length&&t[0][2]?Eo(t[0][0],t[0][1]):function(r){return r===e||kn(r,e,t)}}function qn(e,t){return go(e)&&So(t)?Eo(Fo(e),t):function(r){var n=Ps(r,e);return n===i&&n===t?Is(r,e):Nn(t,n,3)}}function Ln(e,t,r,n,o){e!==t&&mn(t,(function(a,s){if(o||(o=new Wr),ts(a))!function(e,t,r,n,o,a,s){var u=Io(e,r),c=Io(t,r),l=s.get(c);if(l)Zr(e,r,l);else{var f=a?a(u,c,r+"",e,t,s):i,p=f===i;if(p){var d=Qa(c),h=!d&&Ka(c),y=!d&&!h&&ls(c);f=c,d||h||y?Qa(u)?f=u:Ha(u)?f=Pi(u):h?(p=!1,f=wi(c,!0)):y?(p=!1,f=Si(c,!0)):f=[]:os(c)||za(c)?(f=u,za(u)?f=bs(u):ts(u)&&!Za(u)||(f=yo(c))):p=!1}p&&(s.set(c,f),o(f,c,n,a,s),s.delete(c)),Zr(e,r,f)}}(e,t,s,r,Ln,n,o);else{var u=n?n(Io(e,s),a,s+"",e,t,o):i;u===i&&(u=a),Zr(e,s,u)}}),Ms)}function Bn(e,t){var r=e.length;if(r)return mo(t+=t<0?r:0,r)?e[t]:i}function Un(e,t,r){t=t.length?Nt(t,(function(e){return Qa(e)?function(t){return On(t,1===e.length?e[0]:e)}:e})):[iu];var n=-1;t=Nt(t,Kt(ao()));var i=$n(e,(function(e,r,i){var o=Nt(t,(function(t){return t(e)}));return{criteria:o,index:++n,value:e}}));return function(e,t){var n=e.length;for(e.sort((function(e,t){return function(e,t,r){for(var n=-1,i=e.criteria,o=t.criteria,a=i.length,s=r.length;++n<a;){var u=Ei(i[n],o[n]);if(u)return n>=s?u:u*("desc"==r[n]?-1:1)}return e.index-t.index}(e,t,r)}));n--;)e[n]=e[n].value;return e}(i)}function Vn(e,t,r){for(var n=-1,i=t.length,o={};++n<i;){var a=t[n],s=On(e,a);r(s,a)&&Jn(o,mi(a,e),s)}return o}function zn(e,t,r,n){var i=n?Lt:qt,o=-1,a=t.length,s=e;for(e===t&&(t=Pi(t)),r&&(s=Nt(e,Kt(r)));++o<a;)for(var u=0,c=t[o],l=r?r(c):c;(u=i(s,l,u,n))>-1;)s!==e&&We.call(s,u,1),We.call(e,u,1);return e}function Qn(e,t){for(var r=e?t.length:0,n=r-1;r--;){var i=t[r];if(r==n||i!==o){var o=i;mo(i)?We.call(e,i,1):ci(e,i)}}return e}function Yn(e,t){return e+dt(_r()*(t-e+1))}function Wn(e,t){var r="";if(!e||t<1||t>f)return r;do{t%2&&(r+=e),(t=dt(t/2))&&(e+=e)}while(t);return r}function Hn(e,t){return No(To(e,t,iu),e+"")}function Kn(e){return Kr(Bs(e))}function Gn(e,t){var r=Bs(e);return Do(r,an(t,0,r.length))}function Jn(e,t,r,n){if(!ts(e))return e;for(var o=-1,a=(t=mi(t,e)).length,s=a-1,u=e;null!=u&&++o<a;){var c=Fo(t[o]),l=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(o!=s){var f=u[c];(l=n?n(f,c,u):i)===i&&(l=ts(f)?f:mo(t[o+1])?[]:{})}Xr(u,c,l),u=u[c]}return e}var Zn=Ir?function(e,t){return Ir.set(e,t),e}:iu,Xn=et?function(e,t){return et(e,"toString",{configurable:!0,enumerable:!1,value:tu(t),writable:!0})}:iu;function ei(e){return Do(Bs(e))}function ti(e,t,r){var i=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var a=n(o);++i<o;)a[i]=e[i+t];return a}function ri(e,t){var r;return fn(e,(function(e,n,i){return!(r=t(e,n,i))})),!!r}function ni(e,t,r){var n=0,i=null==e?n:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;n<i;){var o=n+i>>>1,a=e[o];null!==a&&!cs(a)&&(r?a<=t:a<t)?n=o+1:i=o}return i}return ii(e,t,iu,r)}function ii(e,t,r,n){var o=0,a=null==e?0:e.length;if(0===a)return 0;for(var s=(t=r(t))!=t,u=null===t,c=cs(t),l=t===i;o<a;){var f=dt((o+a)/2),p=r(e[f]),d=p!==i,h=null===p,y=p==p,v=cs(p);if(s)var m=n||y;else m=l?y&&(n||d):u?y&&d&&(n||!h):c?y&&d&&!h&&(n||!v):!h&&!v&&(n?p<=t:p<t);m?o=f+1:a=f}return mr(a,4294967294)}function oi(e,t){for(var r=-1,n=e.length,i=0,o=[];++r<n;){var a=e[r],s=t?t(a):a;if(!r||!Ba(s,u)){var u=s;o[i++]=0===a?0:a}}return o}function ai(e){return"number"==typeof e?e:cs(e)?p:+e}function si(e){if("string"==typeof e)return e;if(Qa(e))return Nt(e,si)+"";if(cs(e))return $r?$r.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function ui(e,t,r){var n=-1,i=xt,o=e.length,a=!0,s=[],u=s;if(r)a=!1,i=At;else if(o>=200){var c=t?null:Wi(e);if(c)return ur(c);a=!1,i=Jt,u=new Yr}else u=t?[]:s;e:for(;++n<o;){var l=e[n],f=t?t(l):l;if(l=r||0!==l?l:0,a&&f==f){for(var p=u.length;p--;)if(u[p]===f)continue e;t&&u.push(f),s.push(l)}else i(u,f,r)||(u!==s&&u.push(f),s.push(l))}return s}function ci(e,t){return null==(e=jo(e,t=mi(t,e)))||delete e[Fo(Jo(t))]}function li(e,t,r,n){return Jn(e,t,r(On(e,t)),n)}function fi(e,t,r,n){for(var i=e.length,o=n?i:-1;(n?o--:++o<i)&&t(e[o],o,e););return r?ti(e,n?0:o,n?o+1:i):ti(e,n?o+1:0,n?i:o)}function pi(e,t){var r=e;return r instanceof Ur&&(r=r.value()),Mt(t,(function(e,t){return t.func.apply(t.thisArg,kt([e],t.args))}),r)}function di(e,t,r){var i=e.length;if(i<2)return i?ui(e[0]):[];for(var o=-1,a=n(i);++o<i;)for(var s=e[o],u=-1;++u<i;)u!=o&&(a[o]=ln(a[o]||s,e[u],t,r));return ui(vn(a,1),t,r)}function hi(e,t,r){for(var n=-1,o=e.length,a=t.length,s={};++n<o;){var u=n<a?t[n]:i;r(s,e[n],u)}return s}function yi(e){return Ha(e)?e:[]}function vi(e){return"function"==typeof e?e:iu}function mi(e,t){return Qa(e)?e:go(e,t)?[e]:$o(gs(e))}var bi=Hn;function gi(e,t,r){var n=e.length;return r=r===i?n:r,!t&&r>=n?e:ti(e,t,r)}var _i=at||function(e){return ft.clearTimeout(e)};function wi(e,t){if(t)return e.slice();var r=e.length,n=Ve?Ve(r):new e.constructor(r);return e.copy(n),n}function Oi(e){var t=new e.constructor(e.byteLength);return new Ue(t).set(new Ue(e)),t}function Si(e,t){var r=t?Oi(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Ei(e,t){if(e!==t){var r=e!==i,n=null===e,o=e==e,a=cs(e),s=t!==i,u=null===t,c=t==t,l=cs(t);if(!u&&!l&&!a&&e>t||a&&s&&c&&!u&&!l||n&&s&&c||!r&&c||!o)return 1;if(!n&&!a&&!l&&e<t||l&&r&&o&&!n&&!a||u&&r&&o||!s&&o||!c)return-1}return 0}function Ti(e,t,r,i){for(var o=-1,a=e.length,s=r.length,u=-1,c=t.length,l=vr(a-s,0),f=n(c+l),p=!i;++u<c;)f[u]=t[u];for(;++o<s;)(p||o<a)&&(f[r[o]]=e[o]);for(;l--;)f[u++]=e[o++];return f}function ji(e,t,r,i){for(var o=-1,a=e.length,s=-1,u=r.length,c=-1,l=t.length,f=vr(a-u,0),p=n(f+l),d=!i;++o<f;)p[o]=e[o];for(var h=o;++c<l;)p[h+c]=t[c];for(;++s<u;)(d||o<a)&&(p[h+r[s]]=e[o++]);return p}function Pi(e,t){var r=-1,i=e.length;for(t||(t=n(i));++r<i;)t[r]=e[r];return t}function Ii(e,t,r,n){var o=!r;r||(r={});for(var a=-1,s=t.length;++a<s;){var u=t[a],c=n?n(r[u],e[u],u,r,e):i;c===i&&(c=e[u]),o?nn(r,u,c):Xr(r,u,c)}return r}function xi(e,t){return function(r,n){var i=Qa(r)?Et:tn,o=t?t():{};return i(r,e,ao(n,2),o)}}function Ai(e){return Hn((function(t,r){var n=-1,o=r.length,a=o>1?r[o-1]:i,s=o>2?r[2]:i;for(a=e.length>3&&"function"==typeof a?(o--,a):i,s&&bo(r[0],r[1],s)&&(a=o<3?i:a,o=1),t=Ee(t);++n<o;){var u=r[n];u&&e(t,u,n,a)}return t}))}function Ni(e,t){return function(r,n){if(null==r)return r;if(!Wa(r))return e(r,n);for(var i=r.length,o=t?i:-1,a=Ee(r);(t?o--:++o<i)&&!1!==n(a[o],o,a););return r}}function ki(e){return function(t,r,n){for(var i=-1,o=Ee(t),a=n(t),s=a.length;s--;){var u=a[e?s:++i];if(!1===r(o[u],u,o))break}return t}}function Mi(e){return function(t){var r=ir(t=gs(t))?fr(t):i,n=r?r[0]:t.charAt(0),o=r?gi(r,1).join(""):t.slice(1);return n[e]()+o}}function Di(e){return function(t){return Mt(Zs(zs(t).replace(Ge,"")),e,"")}}function Ri(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=qr(e.prototype),n=e.apply(r,t);return ts(n)?n:r}}function Ci(e){return function(t,r,n){var o=Ee(t);if(!Wa(t)){var a=ao(r,3);t=ks(t),r=function(e){return a(o[e],e,o)}}var s=e(t,r,n);return s>-1?o[a?t[s]:s]:i}}function $i(e){return eo((function(t){var r=t.length,n=r,a=Br.prototype.thru;for(e&&t.reverse();n--;){var s=t[n];if("function"!=typeof s)throw new Pe(o);if(a&&!u&&"wrapper"==io(s))var u=new Br([],!0)}for(n=u?n:r;++n<r;){var c=io(s=t[n]),l="wrapper"==c?no(s):i;u=l&&_o(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?u[io(l[0])].apply(u,l[3]):1==s.length&&_o(s)?u[c]():u.thru(s)}return function(){var e=arguments,n=e[0];if(u&&1==e.length&&Qa(n))return u.plant(n).value();for(var i=0,o=r?t[i].apply(this,e):n;++i<r;)o=t[i].call(this,o);return o}}))}function Fi(e,t,r,o,a,s,u,l,f,p){var d=t&c,h=1&t,y=2&t,v=24&t,m=512&t,b=y?i:Ri(e);return function i(){for(var c=arguments.length,g=n(c),_=c;_--;)g[_]=arguments[_];if(v)var w=oo(i),O=er(g,w);if(o&&(g=Ti(g,o,a,v)),s&&(g=ji(g,s,u,v)),c-=O,v&&c<p){var S=sr(g,w);return Qi(e,t,Fi,i.placeholder,r,g,S,l,f,p-c)}var E=h?r:this,T=y?E[e]:e;return c=g.length,l?g=Po(g,l):m&&c>1&&g.reverse(),d&&f<c&&(g.length=f),this&&this!==ft&&this instanceof i&&(T=b||Ri(T)),T.apply(E,g)}}function qi(e,t){return function(r,n){return function(e,t,r,n){return gn(e,(function(e,i,o){t(n,r(e),i,o)})),n}(r,e,t(n),{})}}function Li(e,t){return function(r,n){var o;if(r===i&&n===i)return t;if(r!==i&&(o=r),n!==i){if(o===i)return n;"string"==typeof r||"string"==typeof n?(r=si(r),n=si(n)):(r=ai(r),n=ai(n)),o=e(r,n)}return o}}function Bi(e){return eo((function(t){return t=Nt(t,Kt(ao())),Hn((function(r){var n=this;return e(t,(function(e){return St(e,n,r)}))}))}))}function Ui(e,t){var r=(t=t===i?" ":si(t)).length;if(r<2)return r?Wn(t,e):t;var n=Wn(t,pt(e/lr(t)));return ir(t)?gi(fr(n),0,e).join(""):n.slice(0,e)}function Vi(e){return function(t,r,o){return o&&"number"!=typeof o&&bo(t,r,o)&&(r=o=i),t=hs(t),r===i?(r=t,t=0):r=hs(r),function(e,t,r,i){for(var o=-1,a=vr(pt((t-e)/(r||1)),0),s=n(a);a--;)s[i?a:++o]=e,e+=r;return s}(t,r,o=o===i?t<r?1:-1:hs(o),e)}}function zi(e){return function(t,r){return"string"==typeof t&&"string"==typeof r||(t=ms(t),r=ms(r)),e(t,r)}}function Qi(e,t,r,n,o,a,s,c,l,f){var p=8&t;t|=p?u:64,4&(t&=~(p?64:u))||(t&=-4);var d=[e,t,o,p?a:i,p?s:i,p?i:a,p?i:s,c,l,f],h=r.apply(i,d);return _o(e)&&xo(h,d),h.placeholder=n,ko(h,e,t)}function Yi(e){var t=Se[e];return function(e,r){if(e=ms(e),(r=null==r?0:mr(ys(r),292))&&Ct(e)){var n=(gs(e)+"e").split("e");return+((n=(gs(t(n[0]+"e"+(+n[1]+r)))+"e").split("e"))[0]+"e"+(+n[1]-r))}return t(e)}}var Wi=Tr&&1/ur(new Tr([,-0]))[1]==l?function(e){return new Tr(e)}:cu;function Hi(e){return function(t){var r=po(t);return r==O?or(t):r==P?cr(t):function(e,t){return Nt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Ki(e,t,r,a,l,f,p,d){var h=2&t;if(!h&&"function"!=typeof e)throw new Pe(o);var y=a?a.length:0;if(y||(t&=-97,a=l=i),p=p===i?p:vr(ys(p),0),d=d===i?d:ys(d),y-=l?l.length:0,64&t){var v=a,m=l;a=l=i}var b=h?i:no(e),g=[e,t,r,a,l,v,m,f,p,d];if(b&&function(e,t){var r=e[1],n=t[1],i=r|n,o=i<131,a=n==c&&8==r||n==c&&256==r&&e[7].length<=t[8]||384==n&&t[7].length<=t[8]&&8==r;if(!o&&!a)return e;1&n&&(e[2]=t[2],i|=1&r?0:4);var u=t[3];if(u){var l=e[3];e[3]=l?Ti(l,u,t[4]):u,e[4]=l?sr(e[3],s):t[4]}(u=t[5])&&(l=e[5],e[5]=l?ji(l,u,t[6]):u,e[6]=l?sr(e[5],s):t[6]),(u=t[7])&&(e[7]=u),n&c&&(e[8]=null==e[8]?t[8]:mr(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i}(g,b),e=g[0],t=g[1],r=g[2],a=g[3],l=g[4],!(d=g[9]=g[9]===i?h?0:e.length:vr(g[9]-y,0))&&24&t&&(t&=-25),t&&1!=t)_=8==t||16==t?function(e,t,r){var o=Ri(e);return function a(){for(var s=arguments.length,u=n(s),c=s,l=oo(a);c--;)u[c]=arguments[c];var f=s<3&&u[0]!==l&&u[s-1]!==l?[]:sr(u,l);return(s-=f.length)<r?Qi(e,t,Fi,a.placeholder,i,u,f,i,i,r-s):St(this&&this!==ft&&this instanceof a?o:e,this,u)}}(e,t,d):t!=u&&33!=t||l.length?Fi.apply(i,g):function(e,t,r,i){var o=1&t,a=Ri(e);return function t(){for(var s=-1,u=arguments.length,c=-1,l=i.length,f=n(l+u),p=this&&this!==ft&&this instanceof t?a:e;++c<l;)f[c]=i[c];for(;u--;)f[c++]=arguments[++s];return St(p,o?r:this,f)}}(e,t,r,a);else var _=function(e,t,r){var n=1&t,i=Ri(e);return function t(){return(this&&this!==ft&&this instanceof t?i:e).apply(n?r:this,arguments)}}(e,t,r);return ko((b?Zn:xo)(_,g),e,t)}function Gi(e,t,r,n){return e===i||Ba(e,Ae[r])&&!Me.call(n,r)?t:e}function Ji(e,t,r,n,o,a){return ts(e)&&ts(t)&&(a.set(t,e),Ln(e,t,i,Ji,a),a.delete(t)),e}function Zi(e){return os(e)?i:e}function Xi(e,t,r,n,o,a){var s=1&r,u=e.length,c=t.length;if(u!=c&&!(s&&c>u))return!1;var l=a.get(e),f=a.get(t);if(l&&f)return l==t&&f==e;var p=-1,d=!0,h=2&r?new Yr:i;for(a.set(e,t),a.set(t,e);++p<u;){var y=e[p],v=t[p];if(n)var m=s?n(v,y,p,t,e,a):n(y,v,p,e,t,a);if(m!==i){if(m)continue;d=!1;break}if(h){if(!Rt(t,(function(e,t){if(!Jt(h,t)&&(y===e||o(y,e,r,n,a)))return h.push(t)}))){d=!1;break}}else if(y!==v&&!o(y,v,r,n,a)){d=!1;break}}return a.delete(e),a.delete(t),d}function eo(e){return No(To(e,i,Yo),e+"")}function to(e){return Sn(e,ks,lo)}function ro(e){return Sn(e,Ms,fo)}var no=Ir?function(e){return Ir.get(e)}:cu;function io(e){for(var t=e.name+"",r=xr[t],n=Me.call(xr,t)?r.length:0;n--;){var i=r[n],o=i.func;if(null==o||o==e)return i.name}return t}function oo(e){return(Me.call(Fr,"placeholder")?Fr:e).placeholder}function ao(){var e=Fr.iteratee||ou;return e=e===ou?Dn:e,arguments.length?e(arguments[0],arguments[1]):e}function so(e,t){var r,n,i=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof t?"string":"hash"]:i.map}function uo(e){for(var t=ks(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,So(i)]}return t}function co(e,t){var r=function(e,t){return null==e?i:e[t]}(e,t);return Mn(r)?r:i}var lo=yt?function(e){return null==e?[]:(e=Ee(e),It(yt(e),(function(t){return Ye.call(e,t)})))}:vu,fo=yt?function(e){for(var t=[];e;)kt(t,lo(e)),e=ze(e);return t}:vu,po=En;function ho(e,t,r){for(var n=-1,i=(t=mi(t,e)).length,o=!1;++n<i;){var a=Fo(t[n]);if(!(o=null!=e&&r(e,a)))break;e=e[a]}return o||++n!=i?o:!!(i=null==e?0:e.length)&&es(i)&&mo(a,i)&&(Qa(e)||za(e))}function yo(e){return"function"!=typeof e.constructor||Oo(e)?{}:qr(ze(e))}function vo(e){return Qa(e)||za(e)||!!(He&&e&&e[He])}function mo(e,t){var r=typeof e;return!!(t=null==t?f:t)&&("number"==r||"symbol"!=r&&me.test(e))&&e>-1&&e%1==0&&e<t}function bo(e,t,r){if(!ts(r))return!1;var n=typeof t;return!!("number"==n?Wa(r)&&mo(t,r.length):"string"==n&&t in r)&&Ba(r[t],e)}function go(e,t){if(Qa(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!cs(e))||X.test(e)||!Z.test(e)||null!=t&&e in Ee(t)}function _o(e){var t=io(e),r=Fr[t];if("function"!=typeof r||!(t in Ur.prototype))return!1;if(e===r)return!0;var n=no(r);return!!n&&e===n[0]}(Or&&po(new Or(new ArrayBuffer(1)))!=k||Sr&&po(new Sr)!=O||Er&&po(Er.resolve())!=T||Tr&&po(new Tr)!=P||jr&&po(new jr)!=A)&&(po=function(e){var t=En(e),r=t==E?e.constructor:i,n=r?qo(r):"";if(n)switch(n){case Ar:return k;case Nr:return O;case kr:return T;case Mr:return P;case Dr:return A}return t});var wo=Ne?Za:mu;function Oo(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Ae)}function So(e){return e==e&&!ts(e)}function Eo(e,t){return function(r){return null!=r&&r[e]===t&&(t!==i||e in Ee(r))}}function To(e,t,r){return t=vr(t===i?e.length-1:t,0),function(){for(var i=arguments,o=-1,a=vr(i.length-t,0),s=n(a);++o<a;)s[o]=i[t+o];o=-1;for(var u=n(t+1);++o<t;)u[o]=i[o];return u[t]=r(s),St(e,this,u)}}function jo(e,t){return t.length<2?e:On(e,ti(t,0,-1))}function Po(e,t){for(var r=e.length,n=mr(t.length,r),o=Pi(e);n--;){var a=t[n];e[n]=mo(a,r)?o[a]:i}return e}function Io(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var xo=Mo(Zn),Ao=lt||function(e,t){return ft.setTimeout(e,t)},No=Mo(Xn);function ko(e,t,r){var n=t+"";return No(e,function(e,t){var r=t.length;if(!r)return e;var n=r-1;return t[n]=(r>1?"& ":"")+t[n],t=t.join(r>2?", ":" "),e.replace(oe,"{\n/* [wrapped with "+t+"] */\n")}(n,function(e,t){return Tt(h,(function(r){var n="_."+r[0];t&r[1]&&!xt(e,n)&&e.push(n)})),e.sort()}(function(e){var t=e.match(ae);return t?t[1].split(se):[]}(n),r)))}function Mo(e){var t=0,r=0;return function(){var n=br(),o=16-(n-r);if(r=n,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(i,arguments)}}function Do(e,t){var r=-1,n=e.length,o=n-1;for(t=t===i?n:t;++r<t;){var a=Yn(r,o),s=e[a];e[a]=e[r],e[r]=s}return e.length=t,e}var Ro,Co,$o=(Ro=Ra((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ee,(function(e,r,n,i){t.push(n?i.replace(le,"$1"):r||e)})),t}),(function(e){return 500===Co.size&&Co.clear(),e})),Co=Ro.cache,Ro);function Fo(e){if("string"==typeof e||cs(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function qo(e){if(null!=e){try{return ke.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Lo(e){if(e instanceof Ur)return e.clone();var t=new Br(e.__wrapped__,e.__chain__);return t.__actions__=Pi(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Bo=Hn((function(e,t){return Ha(e)?ln(e,vn(t,1,Ha,!0)):[]})),Uo=Hn((function(e,t){var r=Jo(t);return Ha(r)&&(r=i),Ha(e)?ln(e,vn(t,1,Ha,!0),ao(r,2)):[]})),Vo=Hn((function(e,t){var r=Jo(t);return Ha(r)&&(r=i),Ha(e)?ln(e,vn(t,1,Ha,!0),i,r):[]}));function zo(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=null==r?0:ys(r);return i<0&&(i=vr(n+i,0)),Ft(e,ao(t,3),i)}function Qo(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var o=n-1;return r!==i&&(o=ys(r),o=r<0?vr(n+o,0):mr(o,n-1)),Ft(e,ao(t,3),o,!0)}function Yo(e){return null!=e&&e.length?vn(e,1):[]}function Wo(e){return e&&e.length?e[0]:i}var Ho=Hn((function(e){var t=Nt(e,yi);return t.length&&t[0]===e[0]?In(t):[]})),Ko=Hn((function(e){var t=Jo(e),r=Nt(e,yi);return t===Jo(r)?t=i:r.pop(),r.length&&r[0]===e[0]?In(r,ao(t,2)):[]})),Go=Hn((function(e){var t=Jo(e),r=Nt(e,yi);return(t="function"==typeof t?t:i)&&r.pop(),r.length&&r[0]===e[0]?In(r,i,t):[]}));function Jo(e){var t=null==e?0:e.length;return t?e[t-1]:i}var Zo=Hn(Xo);function Xo(e,t){return e&&e.length&&t&&t.length?zn(e,t):e}var ea=eo((function(e,t){var r=null==e?0:e.length,n=on(e,t);return Qn(e,Nt(t,(function(e){return mo(e,r)?+e:e})).sort(Ei)),n}));function ta(e){return null==e?e:wr.call(e)}var ra=Hn((function(e){return ui(vn(e,1,Ha,!0))})),na=Hn((function(e){var t=Jo(e);return Ha(t)&&(t=i),ui(vn(e,1,Ha,!0),ao(t,2))})),ia=Hn((function(e){var t=Jo(e);return t="function"==typeof t?t:i,ui(vn(e,1,Ha,!0),i,t)}));function oa(e){if(!e||!e.length)return[];var t=0;return e=It(e,(function(e){if(Ha(e))return t=vr(e.length,t),!0})),Wt(t,(function(t){return Nt(e,Vt(t))}))}function aa(e,t){if(!e||!e.length)return[];var r=oa(e);return null==t?r:Nt(r,(function(e){return St(t,i,e)}))}var sa=Hn((function(e,t){return Ha(e)?ln(e,t):[]})),ua=Hn((function(e){return di(It(e,Ha))})),ca=Hn((function(e){var t=Jo(e);return Ha(t)&&(t=i),di(It(e,Ha),ao(t,2))})),la=Hn((function(e){var t=Jo(e);return t="function"==typeof t?t:i,di(It(e,Ha),i,t)})),fa=Hn(oa),pa=Hn((function(e){var t=e.length,r=t>1?e[t-1]:i;return r="function"==typeof r?(e.pop(),r):i,aa(e,r)}));function da(e){var t=Fr(e);return t.__chain__=!0,t}function ha(e,t){return t(e)}var ya=eo((function(e){var t=e.length,r=t?e[0]:0,n=this.__wrapped__,o=function(t){return on(t,e)};return!(t>1||this.__actions__.length)&&n instanceof Ur&&mo(r)?((n=n.slice(r,+r+(t?1:0))).__actions__.push({func:ha,args:[o],thisArg:i}),new Br(n,this.__chain__).thru((function(e){return t&&!e.length&&e.push(i),e}))):this.thru(o)})),va=xi((function(e,t,r){Me.call(e,r)?++e[r]:nn(e,r,1)})),ma=Ci(zo),ba=Ci(Qo);function ga(e,t){return(Qa(e)?Tt:fn)(e,ao(t,3))}function _a(e,t){return(Qa(e)?jt:pn)(e,ao(t,3))}var wa=xi((function(e,t,r){Me.call(e,r)?e[r].push(t):nn(e,r,[t])})),Oa=Hn((function(e,t,r){var i=-1,o="function"==typeof t,a=Wa(e)?n(e.length):[];return fn(e,(function(e){a[++i]=o?St(t,e,r):xn(e,t,r)})),a})),Sa=xi((function(e,t,r){nn(e,r,t)}));function Ea(e,t){return(Qa(e)?Nt:$n)(e,ao(t,3))}var Ta=xi((function(e,t,r){e[r?0:1].push(t)}),(function(){return[[],[]]})),ja=Hn((function(e,t){if(null==e)return[];var r=t.length;return r>1&&bo(e,t[0],t[1])?t=[]:r>2&&bo(t[0],t[1],t[2])&&(t=[t[0]]),Un(e,vn(t,1),[])})),Pa=ct||function(){return ft.Date.now()};function Ia(e,t,r){return t=r?i:t,t=e&&null==t?e.length:t,Ki(e,c,i,i,i,i,t)}function xa(e,t){var r;if("function"!=typeof t)throw new Pe(o);return e=ys(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=i),r}}var Aa=Hn((function(e,t,r){var n=1;if(r.length){var i=sr(r,oo(Aa));n|=u}return Ki(e,n,t,r,i)})),Na=Hn((function(e,t,r){var n=3;if(r.length){var i=sr(r,oo(Na));n|=u}return Ki(t,n,e,r,i)}));function ka(e,t,r){var n,a,s,u,c,l,f=0,p=!1,d=!1,h=!0;if("function"!=typeof e)throw new Pe(o);function y(t){var r=n,o=a;return n=a=i,f=t,u=e.apply(o,r)}function v(e){return f=e,c=Ao(b,t),p?y(e):u}function m(e){var r=e-l;return l===i||r>=t||r<0||d&&e-f>=s}function b(){var e=Pa();if(m(e))return g(e);c=Ao(b,function(e){var r=t-(e-l);return d?mr(r,s-(e-f)):r}(e))}function g(e){return c=i,h&&n?y(e):(n=a=i,u)}function _(){var e=Pa(),r=m(e);if(n=arguments,a=this,l=e,r){if(c===i)return v(l);if(d)return _i(c),c=Ao(b,t),y(l)}return c===i&&(c=Ao(b,t)),u}return t=ms(t)||0,ts(r)&&(p=!!r.leading,s=(d="maxWait"in r)?vr(ms(r.maxWait)||0,t):s,h="trailing"in r?!!r.trailing:h),_.cancel=function(){c!==i&&_i(c),f=0,n=l=a=c=i},_.flush=function(){return c===i?u:g(Pa())},_}var Ma=Hn((function(e,t){return cn(e,1,t)})),Da=Hn((function(e,t,r){return cn(e,ms(t)||0,r)}));function Ra(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Pe(o);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=e.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(Ra.Cache||Qr),r}function Ca(e){if("function"!=typeof e)throw new Pe(o);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Ra.Cache=Qr;var $a=bi((function(e,t){var r=(t=1==t.length&&Qa(t[0])?Nt(t[0],Kt(ao())):Nt(vn(t,1),Kt(ao()))).length;return Hn((function(n){for(var i=-1,o=mr(n.length,r);++i<o;)n[i]=t[i].call(this,n[i]);return St(e,this,n)}))})),Fa=Hn((function(e,t){var r=sr(t,oo(Fa));return Ki(e,u,i,t,r)})),qa=Hn((function(e,t){var r=sr(t,oo(qa));return Ki(e,64,i,t,r)})),La=eo((function(e,t){return Ki(e,256,i,i,i,t)}));function Ba(e,t){return e===t||e!=e&&t!=t}var Ua=zi(Tn),Va=zi((function(e,t){return e>=t})),za=An(function(){return arguments}())?An:function(e){return rs(e)&&Me.call(e,"callee")&&!Ye.call(e,"callee")},Qa=n.isArray,Ya=mt?Kt(mt):function(e){return rs(e)&&En(e)==N};function Wa(e){return null!=e&&es(e.length)&&!Za(e)}function Ha(e){return rs(e)&&Wa(e)}var Ka=vt||mu,Ga=bt?Kt(bt):function(e){return rs(e)&&En(e)==b};function Ja(e){if(!rs(e))return!1;var t=En(e);return t==g||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!os(e)}function Za(e){if(!ts(e))return!1;var t=En(e);return t==_||t==w||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Xa(e){return"number"==typeof e&&e==ys(e)}function es(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=f}function ts(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function rs(e){return null!=e&&"object"==typeof e}var ns=gt?Kt(gt):function(e){return rs(e)&&po(e)==O};function is(e){return"number"==typeof e||rs(e)&&En(e)==S}function os(e){if(!rs(e)||En(e)!=E)return!1;var t=ze(e);if(null===t)return!0;var r=Me.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&ke.call(r)==$e}var as=_t?Kt(_t):function(e){return rs(e)&&En(e)==j},ss=wt?Kt(wt):function(e){return rs(e)&&po(e)==P};function us(e){return"string"==typeof e||!Qa(e)&&rs(e)&&En(e)==I}function cs(e){return"symbol"==typeof e||rs(e)&&En(e)==x}var ls=Ot?Kt(Ot):function(e){return rs(e)&&es(e.length)&&!!it[En(e)]},fs=zi(Cn),ps=zi((function(e,t){return e<=t}));function ds(e){if(!e)return[];if(Wa(e))return us(e)?fr(e):Pi(e);if(Ke&&e[Ke])return function(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}(e[Ke]());var t=po(e);return(t==O?or:t==P?ur:Bs)(e)}function hs(e){return e?(e=ms(e))===l||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ys(e){var t=hs(e),r=t%1;return t==t?r?t-r:t:0}function vs(e){return e?an(ys(e),0,d):0}function ms(e){if("number"==typeof e)return e;if(cs(e))return p;if(ts(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ts(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Ht(e);var r=he.test(e);return r||ve.test(e)?ut(e.slice(2),r?2:8):de.test(e)?p:+e}function bs(e){return Ii(e,Ms(e))}function gs(e){return null==e?"":si(e)}var _s=Ai((function(e,t){if(Oo(t)||Wa(t))Ii(t,ks(t),e);else for(var r in t)Me.call(t,r)&&Xr(e,r,t[r])})),ws=Ai((function(e,t){Ii(t,Ms(t),e)})),Os=Ai((function(e,t,r,n){Ii(t,Ms(t),e,n)})),Ss=Ai((function(e,t,r,n){Ii(t,ks(t),e,n)})),Es=eo(on),Ts=Hn((function(e,t){e=Ee(e);var r=-1,n=t.length,o=n>2?t[2]:i;for(o&&bo(t[0],t[1],o)&&(n=1);++r<n;)for(var a=t[r],s=Ms(a),u=-1,c=s.length;++u<c;){var l=s[u],f=e[l];(f===i||Ba(f,Ae[l])&&!Me.call(e,l))&&(e[l]=a[l])}return e})),js=Hn((function(e){return e.push(i,Ji),St(Rs,i,e)}));function Ps(e,t,r){var n=null==e?i:On(e,t);return n===i?r:n}function Is(e,t){return null!=e&&ho(e,t,Pn)}var xs=qi((function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=Ce.call(t)),e[t]=r}),tu(iu)),As=qi((function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=Ce.call(t)),Me.call(e,t)?e[t].push(r):e[t]=[r]}),ao),Ns=Hn(xn);function ks(e){return Wa(e)?Hr(e):Rn(e)}function Ms(e){return Wa(e)?Hr(e,!0):function(e){if(!ts(e))return function(e){var t=[];if(null!=e)for(var r in Ee(e))t.push(r);return t}(e);var t=Oo(e),r=[];for(var n in e)("constructor"!=n||!t&&Me.call(e,n))&&r.push(n);return r}(e)}var Ds=Ai((function(e,t,r){Ln(e,t,r)})),Rs=Ai((function(e,t,r,n){Ln(e,t,r,n)})),Cs=eo((function(e,t){var r={};if(null==e)return r;var n=!1;t=Nt(t,(function(t){return t=mi(t,e),n||(n=t.length>1),t})),Ii(e,ro(e),r),n&&(r=sn(r,7,Zi));for(var i=t.length;i--;)ci(r,t[i]);return r})),$s=eo((function(e,t){return null==e?{}:function(e,t){return Vn(e,t,(function(t,r){return Is(e,r)}))}(e,t)}));function Fs(e,t){if(null==e)return{};var r=Nt(ro(e),(function(e){return[e]}));return t=ao(t),Vn(e,r,(function(e,r){return t(e,r[0])}))}var qs=Hi(ks),Ls=Hi(Ms);function Bs(e){return null==e?[]:Gt(e,ks(e))}var Us=Di((function(e,t,r){return t=t.toLowerCase(),e+(r?Vs(t):t)}));function Vs(e){return Js(gs(e).toLowerCase())}function zs(e){return(e=gs(e))&&e.replace(be,tr).replace(Je,"")}var Qs=Di((function(e,t,r){return e+(r?"-":"")+t.toLowerCase()})),Ys=Di((function(e,t,r){return e+(r?" ":"")+t.toLowerCase()})),Ws=Mi("toLowerCase"),Hs=Di((function(e,t,r){return e+(r?"_":"")+t.toLowerCase()})),Ks=Di((function(e,t,r){return e+(r?" ":"")+Js(t)})),Gs=Di((function(e,t,r){return e+(r?" ":"")+t.toUpperCase()})),Js=Mi("toUpperCase");function Zs(e,t,r){return e=gs(e),(t=r?i:t)===i?function(e){return tt.test(e)}(e)?function(e){return e.match(Xe)||[]}(e):function(e){return e.match(ue)||[]}(e):e.match(t)||[]}var Xs=Hn((function(e,t){try{return St(e,i,t)}catch(e){return Ja(e)?e:new we(e)}})),eu=eo((function(e,t){return Tt(t,(function(t){t=Fo(t),nn(e,t,Aa(e[t],e))})),e}));function tu(e){return function(){return e}}var ru=$i(),nu=$i(!0);function iu(e){return e}function ou(e){return Dn("function"==typeof e?e:sn(e,1))}var au=Hn((function(e,t){return function(r){return xn(r,e,t)}})),su=Hn((function(e,t){return function(r){return xn(e,r,t)}}));function uu(e,t,r){var n=ks(t),i=wn(t,n);null!=r||ts(t)&&(i.length||!n.length)||(r=t,t=e,e=this,i=wn(t,ks(t)));var o=!(ts(r)&&"chain"in r&&!r.chain),a=Za(e);return Tt(i,(function(r){var n=t[r];e[r]=n,a&&(e.prototype[r]=function(){var t=this.__chain__;if(o||t){var r=e(this.__wrapped__),i=r.__actions__=Pi(this.__actions__);return i.push({func:n,args:arguments,thisArg:e}),r.__chain__=t,r}return n.apply(e,kt([this.value()],arguments))})})),e}function cu(){}var lu=Bi(Nt),fu=Bi(Pt),pu=Bi(Rt);function du(e){return go(e)?Vt(Fo(e)):function(e){return function(t){return On(t,e)}}(e)}var hu=Vi(),yu=Vi(!0);function vu(){return[]}function mu(){return!1}var bu,gu=Li((function(e,t){return e+t}),0),_u=Yi("ceil"),wu=Li((function(e,t){return e/t}),1),Ou=Yi("floor"),Su=Li((function(e,t){return e*t}),1),Eu=Yi("round"),Tu=Li((function(e,t){return e-t}),0);return Fr.after=function(e,t){if("function"!=typeof t)throw new Pe(o);return e=ys(e),function(){if(--e<1)return t.apply(this,arguments)}},Fr.ary=Ia,Fr.assign=_s,Fr.assignIn=ws,Fr.assignInWith=Os,Fr.assignWith=Ss,Fr.at=Es,Fr.before=xa,Fr.bind=Aa,Fr.bindAll=eu,Fr.bindKey=Na,Fr.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Qa(e)?e:[e]},Fr.chain=da,Fr.chunk=function(e,t,r){t=(r?bo(e,t,r):t===i)?1:vr(ys(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var a=0,s=0,u=n(pt(o/t));a<o;)u[s++]=ti(e,a,a+=t);return u},Fr.compact=function(e){for(var t=-1,r=null==e?0:e.length,n=0,i=[];++t<r;){var o=e[t];o&&(i[n++]=o)}return i},Fr.concat=function(){var e=arguments.length;if(!e)return[];for(var t=n(e-1),r=arguments[0],i=e;i--;)t[i-1]=arguments[i];return kt(Qa(r)?Pi(r):[r],vn(t,1))},Fr.cond=function(e){var t=null==e?0:e.length,r=ao();return e=t?Nt(e,(function(e){if("function"!=typeof e[1])throw new Pe(o);return[r(e[0]),e[1]]})):[],Hn((function(r){for(var n=-1;++n<t;){var i=e[n];if(St(i[0],this,r))return St(i[1],this,r)}}))},Fr.conforms=function(e){return function(e){var t=ks(e);return function(r){return un(r,e,t)}}(sn(e,1))},Fr.constant=tu,Fr.countBy=va,Fr.create=function(e,t){var r=qr(e);return null==t?r:rn(r,t)},Fr.curry=function e(t,r,n){var o=Ki(t,8,i,i,i,i,i,r=n?i:r);return o.placeholder=e.placeholder,o},Fr.curryRight=function e(t,r,n){var o=Ki(t,16,i,i,i,i,i,r=n?i:r);return o.placeholder=e.placeholder,o},Fr.debounce=ka,Fr.defaults=Ts,Fr.defaultsDeep=js,Fr.defer=Ma,Fr.delay=Da,Fr.difference=Bo,Fr.differenceBy=Uo,Fr.differenceWith=Vo,Fr.drop=function(e,t,r){var n=null==e?0:e.length;return n?ti(e,(t=r||t===i?1:ys(t))<0?0:t,n):[]},Fr.dropRight=function(e,t,r){var n=null==e?0:e.length;return n?ti(e,0,(t=n-(t=r||t===i?1:ys(t)))<0?0:t):[]},Fr.dropRightWhile=function(e,t){return e&&e.length?fi(e,ao(t,3),!0,!0):[]},Fr.dropWhile=function(e,t){return e&&e.length?fi(e,ao(t,3),!0):[]},Fr.fill=function(e,t,r,n){var o=null==e?0:e.length;return o?(r&&"number"!=typeof r&&bo(e,t,r)&&(r=0,n=o),function(e,t,r,n){var o=e.length;for((r=ys(r))<0&&(r=-r>o?0:o+r),(n=n===i||n>o?o:ys(n))<0&&(n+=o),n=r>n?0:vs(n);r<n;)e[r++]=t;return e}(e,t,r,n)):[]},Fr.filter=function(e,t){return(Qa(e)?It:yn)(e,ao(t,3))},Fr.flatMap=function(e,t){return vn(Ea(e,t),1)},Fr.flatMapDeep=function(e,t){return vn(Ea(e,t),l)},Fr.flatMapDepth=function(e,t,r){return r=r===i?1:ys(r),vn(Ea(e,t),r)},Fr.flatten=Yo,Fr.flattenDeep=function(e){return null!=e&&e.length?vn(e,l):[]},Fr.flattenDepth=function(e,t){return null!=e&&e.length?vn(e,t=t===i?1:ys(t)):[]},Fr.flip=function(e){return Ki(e,512)},Fr.flow=ru,Fr.flowRight=nu,Fr.fromPairs=function(e){for(var t=-1,r=null==e?0:e.length,n={};++t<r;){var i=e[t];n[i[0]]=i[1]}return n},Fr.functions=function(e){return null==e?[]:wn(e,ks(e))},Fr.functionsIn=function(e){return null==e?[]:wn(e,Ms(e))},Fr.groupBy=wa,Fr.initial=function(e){return null!=e&&e.length?ti(e,0,-1):[]},Fr.intersection=Ho,Fr.intersectionBy=Ko,Fr.intersectionWith=Go,Fr.invert=xs,Fr.invertBy=As,Fr.invokeMap=Oa,Fr.iteratee=ou,Fr.keyBy=Sa,Fr.keys=ks,Fr.keysIn=Ms,Fr.map=Ea,Fr.mapKeys=function(e,t){var r={};return t=ao(t,3),gn(e,(function(e,n,i){nn(r,t(e,n,i),e)})),r},Fr.mapValues=function(e,t){var r={};return t=ao(t,3),gn(e,(function(e,n,i){nn(r,n,t(e,n,i))})),r},Fr.matches=function(e){return Fn(sn(e,1))},Fr.matchesProperty=function(e,t){return qn(e,sn(t,1))},Fr.memoize=Ra,Fr.merge=Ds,Fr.mergeWith=Rs,Fr.method=au,Fr.methodOf=su,Fr.mixin=uu,Fr.negate=Ca,Fr.nthArg=function(e){return e=ys(e),Hn((function(t){return Bn(t,e)}))},Fr.omit=Cs,Fr.omitBy=function(e,t){return Fs(e,Ca(ao(t)))},Fr.once=function(e){return xa(2,e)},Fr.orderBy=function(e,t,r,n){return null==e?[]:(Qa(t)||(t=null==t?[]:[t]),Qa(r=n?i:r)||(r=null==r?[]:[r]),Un(e,t,r))},Fr.over=lu,Fr.overArgs=$a,Fr.overEvery=fu,Fr.overSome=pu,Fr.partial=Fa,Fr.partialRight=qa,Fr.partition=Ta,Fr.pick=$s,Fr.pickBy=Fs,Fr.property=du,Fr.propertyOf=function(e){return function(t){return null==e?i:On(e,t)}},Fr.pull=Zo,Fr.pullAll=Xo,Fr.pullAllBy=function(e,t,r){return e&&e.length&&t&&t.length?zn(e,t,ao(r,2)):e},Fr.pullAllWith=function(e,t,r){return e&&e.length&&t&&t.length?zn(e,t,i,r):e},Fr.pullAt=ea,Fr.range=hu,Fr.rangeRight=yu,Fr.rearg=La,Fr.reject=function(e,t){return(Qa(e)?It:yn)(e,Ca(ao(t,3)))},Fr.remove=function(e,t){var r=[];if(!e||!e.length)return r;var n=-1,i=[],o=e.length;for(t=ao(t,3);++n<o;){var a=e[n];t(a,n,e)&&(r.push(a),i.push(n))}return Qn(e,i),r},Fr.rest=function(e,t){if("function"!=typeof e)throw new Pe(o);return Hn(e,t=t===i?t:ys(t))},Fr.reverse=ta,Fr.sampleSize=function(e,t,r){return t=(r?bo(e,t,r):t===i)?1:ys(t),(Qa(e)?Gr:Gn)(e,t)},Fr.set=function(e,t,r){return null==e?e:Jn(e,t,r)},Fr.setWith=function(e,t,r,n){return n="function"==typeof n?n:i,null==e?e:Jn(e,t,r,n)},Fr.shuffle=function(e){return(Qa(e)?Jr:ei)(e)},Fr.slice=function(e,t,r){var n=null==e?0:e.length;return n?(r&&"number"!=typeof r&&bo(e,t,r)?(t=0,r=n):(t=null==t?0:ys(t),r=r===i?n:ys(r)),ti(e,t,r)):[]},Fr.sortBy=ja,Fr.sortedUniq=function(e){return e&&e.length?oi(e):[]},Fr.sortedUniqBy=function(e,t){return e&&e.length?oi(e,ao(t,2)):[]},Fr.split=function(e,t,r){return r&&"number"!=typeof r&&bo(e,t,r)&&(t=r=i),(r=r===i?d:r>>>0)?(e=gs(e))&&("string"==typeof t||null!=t&&!as(t))&&!(t=si(t))&&ir(e)?gi(fr(e),0,r):e.split(t,r):[]},Fr.spread=function(e,t){if("function"!=typeof e)throw new Pe(o);return t=null==t?0:vr(ys(t),0),Hn((function(r){var n=r[t],i=gi(r,0,t);return n&&kt(i,n),St(e,this,i)}))},Fr.tail=function(e){var t=null==e?0:e.length;return t?ti(e,1,t):[]},Fr.take=function(e,t,r){return e&&e.length?ti(e,0,(t=r||t===i?1:ys(t))<0?0:t):[]},Fr.takeRight=function(e,t,r){var n=null==e?0:e.length;return n?ti(e,(t=n-(t=r||t===i?1:ys(t)))<0?0:t,n):[]},Fr.takeRightWhile=function(e,t){return e&&e.length?fi(e,ao(t,3),!1,!0):[]},Fr.takeWhile=function(e,t){return e&&e.length?fi(e,ao(t,3)):[]},Fr.tap=function(e,t){return t(e),e},Fr.throttle=function(e,t,r){var n=!0,i=!0;if("function"!=typeof e)throw new Pe(o);return ts(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),ka(e,t,{leading:n,maxWait:t,trailing:i})},Fr.thru=ha,Fr.toArray=ds,Fr.toPairs=qs,Fr.toPairsIn=Ls,Fr.toPath=function(e){return Qa(e)?Nt(e,Fo):cs(e)?[e]:Pi($o(gs(e)))},Fr.toPlainObject=bs,Fr.transform=function(e,t,r){var n=Qa(e),i=n||Ka(e)||ls(e);if(t=ao(t,4),null==r){var o=e&&e.constructor;r=i?n?new o:[]:ts(e)&&Za(o)?qr(ze(e)):{}}return(i?Tt:gn)(e,(function(e,n,i){return t(r,e,n,i)})),r},Fr.unary=function(e){return Ia(e,1)},Fr.union=ra,Fr.unionBy=na,Fr.unionWith=ia,Fr.uniq=function(e){return e&&e.length?ui(e):[]},Fr.uniqBy=function(e,t){return e&&e.length?ui(e,ao(t,2)):[]},Fr.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?ui(e,i,t):[]},Fr.unset=function(e,t){return null==e||ci(e,t)},Fr.unzip=oa,Fr.unzipWith=aa,Fr.update=function(e,t,r){return null==e?e:li(e,t,vi(r))},Fr.updateWith=function(e,t,r,n){return n="function"==typeof n?n:i,null==e?e:li(e,t,vi(r),n)},Fr.values=Bs,Fr.valuesIn=function(e){return null==e?[]:Gt(e,Ms(e))},Fr.without=sa,Fr.words=Zs,Fr.wrap=function(e,t){return Fa(vi(t),e)},Fr.xor=ua,Fr.xorBy=ca,Fr.xorWith=la,Fr.zip=fa,Fr.zipObject=function(e,t){return hi(e||[],t||[],Xr)},Fr.zipObjectDeep=function(e,t){return hi(e||[],t||[],Jn)},Fr.zipWith=pa,Fr.entries=qs,Fr.entriesIn=Ls,Fr.extend=ws,Fr.extendWith=Os,uu(Fr,Fr),Fr.add=gu,Fr.attempt=Xs,Fr.camelCase=Us,Fr.capitalize=Vs,Fr.ceil=_u,Fr.clamp=function(e,t,r){return r===i&&(r=t,t=i),r!==i&&(r=(r=ms(r))==r?r:0),t!==i&&(t=(t=ms(t))==t?t:0),an(ms(e),t,r)},Fr.clone=function(e){return sn(e,4)},Fr.cloneDeep=function(e){return sn(e,5)},Fr.cloneDeepWith=function(e,t){return sn(e,5,t="function"==typeof t?t:i)},Fr.cloneWith=function(e,t){return sn(e,4,t="function"==typeof t?t:i)},Fr.conformsTo=function(e,t){return null==t||un(e,t,ks(t))},Fr.deburr=zs,Fr.defaultTo=function(e,t){return null==e||e!=e?t:e},Fr.divide=wu,Fr.endsWith=function(e,t,r){e=gs(e),t=si(t);var n=e.length,o=r=r===i?n:an(ys(r),0,n);return(r-=t.length)>=0&&e.slice(r,o)==t},Fr.eq=Ba,Fr.escape=function(e){return(e=gs(e))&&H.test(e)?e.replace(Y,rr):e},Fr.escapeRegExp=function(e){return(e=gs(e))&&re.test(e)?e.replace(te,"\\$&"):e},Fr.every=function(e,t,r){var n=Qa(e)?Pt:dn;return r&&bo(e,t,r)&&(t=i),n(e,ao(t,3))},Fr.find=ma,Fr.findIndex=zo,Fr.findKey=function(e,t){return $t(e,ao(t,3),gn)},Fr.findLast=ba,Fr.findLastIndex=Qo,Fr.findLastKey=function(e,t){return $t(e,ao(t,3),_n)},Fr.floor=Ou,Fr.forEach=ga,Fr.forEachRight=_a,Fr.forIn=function(e,t){return null==e?e:mn(e,ao(t,3),Ms)},Fr.forInRight=function(e,t){return null==e?e:bn(e,ao(t,3),Ms)},Fr.forOwn=function(e,t){return e&&gn(e,ao(t,3))},Fr.forOwnRight=function(e,t){return e&&_n(e,ao(t,3))},Fr.get=Ps,Fr.gt=Ua,Fr.gte=Va,Fr.has=function(e,t){return null!=e&&ho(e,t,jn)},Fr.hasIn=Is,Fr.head=Wo,Fr.identity=iu,Fr.includes=function(e,t,r,n){e=Wa(e)?e:Bs(e),r=r&&!n?ys(r):0;var i=e.length;return r<0&&(r=vr(i+r,0)),us(e)?r<=i&&e.indexOf(t,r)>-1:!!i&&qt(e,t,r)>-1},Fr.indexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=null==r?0:ys(r);return i<0&&(i=vr(n+i,0)),qt(e,t,i)},Fr.inRange=function(e,t,r){return t=hs(t),r===i?(r=t,t=0):r=hs(r),function(e,t,r){return e>=mr(t,r)&&e<vr(t,r)}(e=ms(e),t,r)},Fr.invoke=Ns,Fr.isArguments=za,Fr.isArray=Qa,Fr.isArrayBuffer=Ya,Fr.isArrayLike=Wa,Fr.isArrayLikeObject=Ha,Fr.isBoolean=function(e){return!0===e||!1===e||rs(e)&&En(e)==m},Fr.isBuffer=Ka,Fr.isDate=Ga,Fr.isElement=function(e){return rs(e)&&1===e.nodeType&&!os(e)},Fr.isEmpty=function(e){if(null==e)return!0;if(Wa(e)&&(Qa(e)||"string"==typeof e||"function"==typeof e.splice||Ka(e)||ls(e)||za(e)))return!e.length;var t=po(e);if(t==O||t==P)return!e.size;if(Oo(e))return!Rn(e).length;for(var r in e)if(Me.call(e,r))return!1;return!0},Fr.isEqual=function(e,t){return Nn(e,t)},Fr.isEqualWith=function(e,t,r){var n=(r="function"==typeof r?r:i)?r(e,t):i;return n===i?Nn(e,t,i,r):!!n},Fr.isError=Ja,Fr.isFinite=function(e){return"number"==typeof e&&Ct(e)},Fr.isFunction=Za,Fr.isInteger=Xa,Fr.isLength=es,Fr.isMap=ns,Fr.isMatch=function(e,t){return e===t||kn(e,t,uo(t))},Fr.isMatchWith=function(e,t,r){return r="function"==typeof r?r:i,kn(e,t,uo(t),r)},Fr.isNaN=function(e){return is(e)&&e!=+e},Fr.isNative=function(e){if(wo(e))throw new we("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Mn(e)},Fr.isNil=function(e){return null==e},Fr.isNull=function(e){return null===e},Fr.isNumber=is,Fr.isObject=ts,Fr.isObjectLike=rs,Fr.isPlainObject=os,Fr.isRegExp=as,Fr.isSafeInteger=function(e){return Xa(e)&&e>=-9007199254740991&&e<=f},Fr.isSet=ss,Fr.isString=us,Fr.isSymbol=cs,Fr.isTypedArray=ls,Fr.isUndefined=function(e){return e===i},Fr.isWeakMap=function(e){return rs(e)&&po(e)==A},Fr.isWeakSet=function(e){return rs(e)&&"[object WeakSet]"==En(e)},Fr.join=function(e,t){return null==e?"":zt.call(e,t)},Fr.kebabCase=Qs,Fr.last=Jo,Fr.lastIndexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var o=n;return r!==i&&(o=(o=ys(r))<0?vr(n+o,0):mr(o,n-1)),t==t?function(e,t,r){for(var n=r+1;n--;)if(e[n]===t)return n;return n}(e,t,o):Ft(e,Bt,o,!0)},Fr.lowerCase=Ys,Fr.lowerFirst=Ws,Fr.lt=fs,Fr.lte=ps,Fr.max=function(e){return e&&e.length?hn(e,iu,Tn):i},Fr.maxBy=function(e,t){return e&&e.length?hn(e,ao(t,2),Tn):i},Fr.mean=function(e){return Ut(e,iu)},Fr.meanBy=function(e,t){return Ut(e,ao(t,2))},Fr.min=function(e){return e&&e.length?hn(e,iu,Cn):i},Fr.minBy=function(e,t){return e&&e.length?hn(e,ao(t,2),Cn):i},Fr.stubArray=vu,Fr.stubFalse=mu,Fr.stubObject=function(){return{}},Fr.stubString=function(){return""},Fr.stubTrue=function(){return!0},Fr.multiply=Su,Fr.nth=function(e,t){return e&&e.length?Bn(e,ys(t)):i},Fr.noConflict=function(){return ft._===this&&(ft._=Fe),this},Fr.noop=cu,Fr.now=Pa,Fr.pad=function(e,t,r){e=gs(e);var n=(t=ys(t))?lr(e):0;if(!t||n>=t)return e;var i=(t-n)/2;return Ui(dt(i),r)+e+Ui(pt(i),r)},Fr.padEnd=function(e,t,r){e=gs(e);var n=(t=ys(t))?lr(e):0;return t&&n<t?e+Ui(t-n,r):e},Fr.padStart=function(e,t,r){e=gs(e);var n=(t=ys(t))?lr(e):0;return t&&n<t?Ui(t-n,r)+e:e},Fr.parseInt=function(e,t,r){return r||null==t?t=0:t&&(t=+t),gr(gs(e).replace(ne,""),t||0)},Fr.random=function(e,t,r){if(r&&"boolean"!=typeof r&&bo(e,t,r)&&(t=r=i),r===i&&("boolean"==typeof t?(r=t,t=i):"boolean"==typeof e&&(r=e,e=i)),e===i&&t===i?(e=0,t=1):(e=hs(e),t===i?(t=e,e=0):t=hs(t)),e>t){var n=e;e=t,t=n}if(r||e%1||t%1){var o=_r();return mr(e+o*(t-e+st("1e-"+((o+"").length-1))),t)}return Yn(e,t)},Fr.reduce=function(e,t,r){var n=Qa(e)?Mt:Qt,i=arguments.length<3;return n(e,ao(t,4),r,i,fn)},Fr.reduceRight=function(e,t,r){var n=Qa(e)?Dt:Qt,i=arguments.length<3;return n(e,ao(t,4),r,i,pn)},Fr.repeat=function(e,t,r){return t=(r?bo(e,t,r):t===i)?1:ys(t),Wn(gs(e),t)},Fr.replace=function(){var e=arguments,t=gs(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Fr.result=function(e,t,r){var n=-1,o=(t=mi(t,e)).length;for(o||(o=1,e=i);++n<o;){var a=null==e?i:e[Fo(t[n])];a===i&&(n=o,a=r),e=Za(a)?a.call(e):a}return e},Fr.round=Eu,Fr.runInContext=e,Fr.sample=function(e){return(Qa(e)?Kr:Kn)(e)},Fr.size=function(e){if(null==e)return 0;if(Wa(e))return us(e)?lr(e):e.length;var t=po(e);return t==O||t==P?e.size:Rn(e).length},Fr.snakeCase=Hs,Fr.some=function(e,t,r){var n=Qa(e)?Rt:ri;return r&&bo(e,t,r)&&(t=i),n(e,ao(t,3))},Fr.sortedIndex=function(e,t){return ni(e,t)},Fr.sortedIndexBy=function(e,t,r){return ii(e,t,ao(r,2))},Fr.sortedIndexOf=function(e,t){var r=null==e?0:e.length;if(r){var n=ni(e,t);if(n<r&&Ba(e[n],t))return n}return-1},Fr.sortedLastIndex=function(e,t){return ni(e,t,!0)},Fr.sortedLastIndexBy=function(e,t,r){return ii(e,t,ao(r,2),!0)},Fr.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var r=ni(e,t,!0)-1;if(Ba(e[r],t))return r}return-1},Fr.startCase=Ks,Fr.startsWith=function(e,t,r){return e=gs(e),r=null==r?0:an(ys(r),0,e.length),t=si(t),e.slice(r,r+t.length)==t},Fr.subtract=Tu,Fr.sum=function(e){return e&&e.length?Yt(e,iu):0},Fr.sumBy=function(e,t){return e&&e.length?Yt(e,ao(t,2)):0},Fr.template=function(e,t,r){var n=Fr.templateSettings;r&&bo(e,t,r)&&(t=i),e=gs(e),t=Os({},t,n,Gi);var o,a,s=Os({},t.imports,n.imports,Gi),u=ks(s),c=Gt(s,u),l=0,f=t.interpolate||ge,p="__p += '",d=Te((t.escape||ge).source+"|"+f.source+"|"+(f===J?fe:ge).source+"|"+(t.evaluate||ge).source+"|$","g"),h="//# sourceURL="+(Me.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++nt+"]")+"\n";e.replace(d,(function(t,r,n,i,s,u){return n||(n=i),p+=e.slice(l,u).replace(_e,nr),r&&(o=!0,p+="' +\n__e("+r+") +\n'"),s&&(a=!0,p+="';\n"+s+";\n__p += '"),n&&(p+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),l=u+t.length,t})),p+="';\n";var y=Me.call(t,"variable")&&t.variable;if(y){if(ce.test(y))throw new we("Invalid `variable` option passed into `_.template`")}else p="with (obj) {\n"+p+"\n}\n";p=(a?p.replace(U,""):p).replace(V,"$1").replace(z,"$1;"),p="function("+(y||"obj")+") {\n"+(y?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var v=Xs((function(){return Oe(u,h+"return "+p).apply(i,c)}));if(v.source=p,Ja(v))throw v;return v},Fr.times=function(e,t){if((e=ys(e))<1||e>f)return[];var r=d,n=mr(e,d);t=ao(t),e-=d;for(var i=Wt(n,t);++r<e;)t(r);return i},Fr.toFinite=hs,Fr.toInteger=ys,Fr.toLength=vs,Fr.toLower=function(e){return gs(e).toLowerCase()},Fr.toNumber=ms,Fr.toSafeInteger=function(e){return e?an(ys(e),-9007199254740991,f):0===e?e:0},Fr.toString=gs,Fr.toUpper=function(e){return gs(e).toUpperCase()},Fr.trim=function(e,t,r){if((e=gs(e))&&(r||t===i))return Ht(e);if(!e||!(t=si(t)))return e;var n=fr(e),o=fr(t);return gi(n,Zt(n,o),Xt(n,o)+1).join("")},Fr.trimEnd=function(e,t,r){if((e=gs(e))&&(r||t===i))return e.slice(0,pr(e)+1);if(!e||!(t=si(t)))return e;var n=fr(e);return gi(n,0,Xt(n,fr(t))+1).join("")},Fr.trimStart=function(e,t,r){if((e=gs(e))&&(r||t===i))return e.replace(ne,"");if(!e||!(t=si(t)))return e;var n=fr(e);return gi(n,Zt(n,fr(t))).join("")},Fr.truncate=function(e,t){var r=30,n="...";if(ts(t)){var o="separator"in t?t.separator:o;r="length"in t?ys(t.length):r,n="omission"in t?si(t.omission):n}var a=(e=gs(e)).length;if(ir(e)){var s=fr(e);a=s.length}if(r>=a)return e;var u=r-lr(n);if(u<1)return n;var c=s?gi(s,0,u).join(""):e.slice(0,u);if(o===i)return c+n;if(s&&(u+=c.length-u),as(o)){if(e.slice(u).search(o)){var l,f=c;for(o.global||(o=Te(o.source,gs(pe.exec(o))+"g")),o.lastIndex=0;l=o.exec(f);)var p=l.index;c=c.slice(0,p===i?u:p)}}else if(e.indexOf(si(o),u)!=u){var d=c.lastIndexOf(o);d>-1&&(c=c.slice(0,d))}return c+n},Fr.unescape=function(e){return(e=gs(e))&&W.test(e)?e.replace(Q,dr):e},Fr.uniqueId=function(e){var t=++De;return gs(e)+t},Fr.upperCase=Gs,Fr.upperFirst=Js,Fr.each=ga,Fr.eachRight=_a,Fr.first=Wo,uu(Fr,(bu={},gn(Fr,(function(e,t){Me.call(Fr.prototype,t)||(bu[t]=e)})),bu),{chain:!1}),Fr.VERSION="4.17.21",Tt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Fr[e].placeholder=Fr})),Tt(["drop","take"],(function(e,t){Ur.prototype[e]=function(r){r=r===i?1:vr(ys(r),0);var n=this.__filtered__&&!t?new Ur(this):this.clone();return n.__filtered__?n.__takeCount__=mr(r,n.__takeCount__):n.__views__.push({size:mr(r,d),type:e+(n.__dir__<0?"Right":"")}),n},Ur.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),Tt(["filter","map","takeWhile"],(function(e,t){var r=t+1,n=1==r||3==r;Ur.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:ao(e,3),type:r}),t.__filtered__=t.__filtered__||n,t}})),Tt(["head","last"],(function(e,t){var r="take"+(t?"Right":"");Ur.prototype[e]=function(){return this[r](1).value()[0]}})),Tt(["initial","tail"],(function(e,t){var r="drop"+(t?"":"Right");Ur.prototype[e]=function(){return this.__filtered__?new Ur(this):this[r](1)}})),Ur.prototype.compact=function(){return this.filter(iu)},Ur.prototype.find=function(e){return this.filter(e).head()},Ur.prototype.findLast=function(e){return this.reverse().find(e)},Ur.prototype.invokeMap=Hn((function(e,t){return"function"==typeof e?new Ur(this):this.map((function(r){return xn(r,e,t)}))})),Ur.prototype.reject=function(e){return this.filter(Ca(ao(e)))},Ur.prototype.slice=function(e,t){e=ys(e);var r=this;return r.__filtered__&&(e>0||t<0)?new Ur(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==i&&(r=(t=ys(t))<0?r.dropRight(-t):r.take(t-e)),r)},Ur.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Ur.prototype.toArray=function(){return this.take(d)},gn(Ur.prototype,(function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),n=/^(?:head|last)$/.test(t),o=Fr[n?"take"+("last"==t?"Right":""):t],a=n||/^find/.test(t);o&&(Fr.prototype[t]=function(){var t=this.__wrapped__,s=n?[1]:arguments,u=t instanceof Ur,c=s[0],l=u||Qa(t),f=function(e){var t=o.apply(Fr,kt([e],s));return n&&p?t[0]:t};l&&r&&"function"==typeof c&&1!=c.length&&(u=l=!1);var p=this.__chain__,d=!!this.__actions__.length,h=a&&!p,y=u&&!d;if(!a&&l){t=y?t:new Ur(this);var v=e.apply(t,s);return v.__actions__.push({func:ha,args:[f],thisArg:i}),new Br(v,p)}return h&&y?e.apply(this,s):(v=this.thru(f),h?n?v.value()[0]:v.value():v)})})),Tt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Ie[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);Fr.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var i=this.value();return t.apply(Qa(i)?i:[],e)}return this[r]((function(r){return t.apply(Qa(r)?r:[],e)}))}})),gn(Ur.prototype,(function(e,t){var r=Fr[t];if(r){var n=r.name+"";Me.call(xr,n)||(xr[n]=[]),xr[n].push({name:t,func:r})}})),xr[Fi(i,2).name]=[{name:"wrapper",func:i}],Ur.prototype.clone=function(){var e=new Ur(this.__wrapped__);return e.__actions__=Pi(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Pi(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Pi(this.__views__),e},Ur.prototype.reverse=function(){if(this.__filtered__){var e=new Ur(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Ur.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,r=Qa(e),n=t<0,i=r?e.length:0,o=function(e,t,r){for(var n=-1,i=r.length;++n<i;){var o=r[n],a=o.size;switch(o.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=mr(t,e+a);break;case"takeRight":e=vr(e,t-a)}}return{start:e,end:t}}(0,i,this.__views__),a=o.start,s=o.end,u=s-a,c=n?s:a-1,l=this.__iteratees__,f=l.length,p=0,d=mr(u,this.__takeCount__);if(!r||!n&&i==u&&d==u)return pi(e,this.__actions__);var h=[];e:for(;u--&&p<d;){for(var y=-1,v=e[c+=t];++y<f;){var m=l[y],b=m.iteratee,g=m.type,_=b(v);if(2==g)v=_;else if(!_){if(1==g)continue e;break e}}h[p++]=v}return h},Fr.prototype.at=ya,Fr.prototype.chain=function(){return da(this)},Fr.prototype.commit=function(){return new Br(this.value(),this.__chain__)},Fr.prototype.next=function(){this.__values__===i&&(this.__values__=ds(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?i:this.__values__[this.__index__++]}},Fr.prototype.plant=function(e){for(var t,r=this;r instanceof Lr;){var n=Lo(r);n.__index__=0,n.__values__=i,t?o.__wrapped__=n:t=n;var o=n;r=r.__wrapped__}return o.__wrapped__=e,t},Fr.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Ur){var t=e;return this.__actions__.length&&(t=new Ur(this)),(t=t.reverse()).__actions__.push({func:ha,args:[ta],thisArg:i}),new Br(t,this.__chain__)}return this.thru(ta)},Fr.prototype.toJSON=Fr.prototype.valueOf=Fr.prototype.value=function(){return pi(this.__wrapped__,this.__actions__)},Fr.prototype.first=Fr.prototype.head,Ke&&(Fr.prototype[Ke]=function(){return this}),Fr}();ft._=hr,(n=function(){return hr}.call(t,r,t,e))===i||(e.exports=n)}.call(this)},2937:function(e,t,r){"use strict";var n=this&&this.__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){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.interval=t.iif=t.generate=t.fromEventPattern=t.fromEvent=t.from=t.forkJoin=t.empty=t.defer=t.connectable=t.concat=t.combineLatest=t.bindNodeCallback=t.bindCallback=t.UnsubscriptionError=t.TimeoutError=t.SequenceError=t.ObjectUnsubscribedError=t.NotFoundError=t.EmptyError=t.ArgumentOutOfRangeError=t.firstValueFrom=t.lastValueFrom=t.isObservable=t.identity=t.noop=t.pipe=t.NotificationKind=t.Notification=t.Subscriber=t.Subscription=t.Scheduler=t.VirtualAction=t.VirtualTimeScheduler=t.animationFrameScheduler=t.animationFrame=t.queueScheduler=t.queue=t.asyncScheduler=t.async=t.asapScheduler=t.asap=t.AsyncSubject=t.ReplaySubject=t.BehaviorSubject=t.Subject=t.animationFrames=t.observable=t.ConnectableObservable=t.Observable=void 0,t.filter=t.expand=t.exhaustMap=t.exhaustAll=t.exhaust=t.every=t.endWith=t.elementAt=t.distinctUntilKeyChanged=t.distinctUntilChanged=t.distinct=t.dematerialize=t.delayWhen=t.delay=t.defaultIfEmpty=t.debounceTime=t.debounce=t.count=t.connect=t.concatWith=t.concatMapTo=t.concatMap=t.concatAll=t.combineLatestWith=t.combineLatestAll=t.combineAll=t.catchError=t.bufferWhen=t.bufferToggle=t.bufferTime=t.bufferCount=t.buffer=t.auditTime=t.audit=t.config=t.NEVER=t.EMPTY=t.scheduled=t.zip=t.using=t.timer=t.throwError=t.range=t.race=t.partition=t.pairs=t.onErrorResumeNext=t.of=t.never=t.merge=void 0,t.switchMapTo=t.switchMap=t.switchAll=t.subscribeOn=t.startWith=t.skipWhile=t.skipUntil=t.skipLast=t.skip=t.single=t.shareReplay=t.share=t.sequenceEqual=t.scan=t.sampleTime=t.sample=t.refCount=t.retryWhen=t.retry=t.repeatWhen=t.repeat=t.reduce=t.raceWith=t.publishReplay=t.publishLast=t.publishBehavior=t.publish=t.pluck=t.pairwise=t.observeOn=t.multicast=t.min=t.mergeWith=t.mergeScan=t.mergeMapTo=t.mergeMap=t.flatMap=t.mergeAll=t.max=t.materialize=t.mapTo=t.map=t.last=t.isEmpty=t.ignoreElements=t.groupBy=t.first=t.findIndex=t.find=t.finalize=void 0,t.zipWith=t.zipAll=t.withLatestFrom=t.windowWhen=t.windowToggle=t.windowTime=t.windowCount=t.window=t.toArray=t.timestamp=t.timeoutWith=t.timeout=t.timeInterval=t.throwIfEmpty=t.throttleTime=t.throttle=t.tap=t.takeWhile=t.takeUntil=t.takeLast=t.take=t.switchScan=void 0;var o=r(5271);Object.defineProperty(t,"Observable",{enumerable:!0,get:function(){return o.Observable}});var a=r(3739);Object.defineProperty(t,"ConnectableObservable",{enumerable:!0,get:function(){return a.ConnectableObservable}});var s=r(2138);Object.defineProperty(t,"observable",{enumerable:!0,get:function(){return s.observable}});var u=r(4190);Object.defineProperty(t,"animationFrames",{enumerable:!0,get:function(){return u.animationFrames}});var c=r(9520);Object.defineProperty(t,"Subject",{enumerable:!0,get:function(){return c.Subject}});var l=r(8042);Object.defineProperty(t,"BehaviorSubject",{enumerable:!0,get:function(){return l.BehaviorSubject}});var f=r(216);Object.defineProperty(t,"ReplaySubject",{enumerable:!0,get:function(){return f.ReplaySubject}});var p=r(7257);Object.defineProperty(t,"AsyncSubject",{enumerable:!0,get:function(){return p.AsyncSubject}});var d=r(4502);Object.defineProperty(t,"asap",{enumerable:!0,get:function(){return d.asap}}),Object.defineProperty(t,"asapScheduler",{enumerable:!0,get:function(){return d.asapScheduler}});var h=r(4617);Object.defineProperty(t,"async",{enumerable:!0,get:function(){return h.async}}),Object.defineProperty(t,"asyncScheduler",{enumerable:!0,get:function(){return h.asyncScheduler}});var y=r(8344);Object.defineProperty(t,"queue",{enumerable:!0,get:function(){return y.queue}}),Object.defineProperty(t,"queueScheduler",{enumerable:!0,get:function(){return y.queueScheduler}});var v=r(6192);Object.defineProperty(t,"animationFrame",{enumerable:!0,get:function(){return v.animationFrame}}),Object.defineProperty(t,"animationFrameScheduler",{enumerable:!0,get:function(){return v.animationFrameScheduler}});var m=r(8847);Object.defineProperty(t,"VirtualTimeScheduler",{enumerable:!0,get:function(){return m.VirtualTimeScheduler}}),Object.defineProperty(t,"VirtualAction",{enumerable:!0,get:function(){return m.VirtualAction}});var b=r(3980);Object.defineProperty(t,"Scheduler",{enumerable:!0,get:function(){return b.Scheduler}});var g=r(7215);Object.defineProperty(t,"Subscription",{enumerable:!0,get:function(){return g.Subscription}});var _=r(1403);Object.defineProperty(t,"Subscriber",{enumerable:!0,get:function(){return _.Subscriber}});var w=r(3868);Object.defineProperty(t,"Notification",{enumerable:!0,get:function(){return w.Notification}}),Object.defineProperty(t,"NotificationKind",{enumerable:!0,get:function(){return w.NotificationKind}});var O=r(5966);Object.defineProperty(t,"pipe",{enumerable:!0,get:function(){return O.pipe}});var S=r(5729);Object.defineProperty(t,"noop",{enumerable:!0,get:function(){return S.noop}});var E=r(9144);Object.defineProperty(t,"identity",{enumerable:!0,get:function(){return E.identity}});var T=r(1211);Object.defineProperty(t,"isObservable",{enumerable:!0,get:function(){return T.isObservable}});var j=r(1263);Object.defineProperty(t,"lastValueFrom",{enumerable:!0,get:function(){return j.lastValueFrom}});var P=r(7447);Object.defineProperty(t,"firstValueFrom",{enumerable:!0,get:function(){return P.firstValueFrom}});var I=r(6809);Object.defineProperty(t,"ArgumentOutOfRangeError",{enumerable:!0,get:function(){return I.ArgumentOutOfRangeError}});var x=r(8032);Object.defineProperty(t,"EmptyError",{enumerable:!0,get:function(){return x.EmptyError}});var A=r(1137);Object.defineProperty(t,"NotFoundError",{enumerable:!0,get:function(){return A.NotFoundError}});var N=r(7392);Object.defineProperty(t,"ObjectUnsubscribedError",{enumerable:!0,get:function(){return N.ObjectUnsubscribedError}});var k=r(6228);Object.defineProperty(t,"SequenceError",{enumerable:!0,get:function(){return k.SequenceError}});var M=r(6279);Object.defineProperty(t,"TimeoutError",{enumerable:!0,get:function(){return M.TimeoutError}});var D=r(5463);Object.defineProperty(t,"UnsubscriptionError",{enumerable:!0,get:function(){return D.UnsubscriptionError}});var R=r(1253);Object.defineProperty(t,"bindCallback",{enumerable:!0,get:function(){return R.bindCallback}});var C=r(1009);Object.defineProperty(t,"bindNodeCallback",{enumerable:!0,get:function(){return C.bindNodeCallback}});var $=r(1047);Object.defineProperty(t,"combineLatest",{enumerable:!0,get:function(){return $.combineLatest}});var F=r(79);Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return F.concat}});var q=r(1663);Object.defineProperty(t,"connectable",{enumerable:!0,get:function(){return q.connectable}});var L=r(5401);Object.defineProperty(t,"defer",{enumerable:!0,get:function(){return L.defer}});var B=r(1727);Object.defineProperty(t,"empty",{enumerable:!0,get:function(){return B.empty}});var U=r(1723);Object.defineProperty(t,"forkJoin",{enumerable:!0,get:function(){return U.forkJoin}});var V=r(6216);Object.defineProperty(t,"from",{enumerable:!0,get:function(){return V.from}});var z=r(6767);Object.defineProperty(t,"fromEvent",{enumerable:!0,get:function(){return z.fromEvent}});var Q=r(4366);Object.defineProperty(t,"fromEventPattern",{enumerable:!0,get:function(){return Q.fromEventPattern}});var Y=r(6103);Object.defineProperty(t,"generate",{enumerable:!0,get:function(){return Y.generate}});var W=r(4468);Object.defineProperty(t,"iif",{enumerable:!0,get:function(){return W.iif}});var H=r(4449);Object.defineProperty(t,"interval",{enumerable:!0,get:function(){return H.interval}});var K=r(5847);Object.defineProperty(t,"merge",{enumerable:!0,get:function(){return K.merge}});var G=r(7423);Object.defineProperty(t,"never",{enumerable:!0,get:function(){return G.never}});var J=r(7443);Object.defineProperty(t,"of",{enumerable:!0,get:function(){return J.of}});var Z=r(1282);Object.defineProperty(t,"onErrorResumeNext",{enumerable:!0,get:function(){return Z.onErrorResumeNext}});var X=r(5259);Object.defineProperty(t,"pairs",{enumerable:!0,get:function(){return X.pairs}});var ee=r(1945);Object.defineProperty(t,"partition",{enumerable:!0,get:function(){return ee.partition}});var te=r(7779);Object.defineProperty(t,"race",{enumerable:!0,get:function(){return te.race}});var re=r(6971);Object.defineProperty(t,"range",{enumerable:!0,get:function(){return re.range}});var ne=r(859);Object.defineProperty(t,"throwError",{enumerable:!0,get:function(){return ne.throwError}});var ie=r(5710);Object.defineProperty(t,"timer",{enumerable:!0,get:function(){return ie.timer}});var oe=r(3687);Object.defineProperty(t,"using",{enumerable:!0,get:function(){return oe.using}});var ae=r(2042);Object.defineProperty(t,"zip",{enumerable:!0,get:function(){return ae.zip}});var se=r(3200);Object.defineProperty(t,"scheduled",{enumerable:!0,get:function(){return se.scheduled}});var ue=r(1727);Object.defineProperty(t,"EMPTY",{enumerable:!0,get:function(){return ue.EMPTY}});var ce=r(7423);Object.defineProperty(t,"NEVER",{enumerable:!0,get:function(){return ce.NEVER}}),i(r(9251),t);var le=r(3782);Object.defineProperty(t,"config",{enumerable:!0,get:function(){return le.config}});var fe=r(3533);Object.defineProperty(t,"audit",{enumerable:!0,get:function(){return fe.audit}});var pe=r(5188);Object.defineProperty(t,"auditTime",{enumerable:!0,get:function(){return pe.auditTime}});var de=r(4514);Object.defineProperty(t,"buffer",{enumerable:!0,get:function(){return de.buffer}});var he=r(2537);Object.defineProperty(t,"bufferCount",{enumerable:!0,get:function(){return he.bufferCount}});var ye=r(8720);Object.defineProperty(t,"bufferTime",{enumerable:!0,get:function(){return ye.bufferTime}});var ve=r(7932);Object.defineProperty(t,"bufferToggle",{enumerable:!0,get:function(){return ve.bufferToggle}});var me=r(1445);Object.defineProperty(t,"bufferWhen",{enumerable:!0,get:function(){return me.bufferWhen}});var be=r(4418);Object.defineProperty(t,"catchError",{enumerable:!0,get:function(){return be.catchError}});var ge=r(4163);Object.defineProperty(t,"combineAll",{enumerable:!0,get:function(){return ge.combineAll}});var _e=r(9893);Object.defineProperty(t,"combineLatestAll",{enumerable:!0,get:function(){return _e.combineLatestAll}});var we=r(7230);Object.defineProperty(t,"combineLatestWith",{enumerable:!0,get:function(){return we.combineLatestWith}});var Oe=r(4554);Object.defineProperty(t,"concatAll",{enumerable:!0,get:function(){return Oe.concatAll}});var Se=r(1048);Object.defineProperty(t,"concatMap",{enumerable:!0,get:function(){return Se.concatMap}});var Ee=r(381);Object.defineProperty(t,"concatMapTo",{enumerable:!0,get:function(){return Ee.concatMapTo}});var Te=r(4724);Object.defineProperty(t,"concatWith",{enumerable:!0,get:function(){return Te.concatWith}});var je=r(4347);Object.defineProperty(t,"connect",{enumerable:!0,get:function(){return je.connect}});var Pe=r(6944);Object.defineProperty(t,"count",{enumerable:!0,get:function(){return Pe.count}});var Ie=r(440);Object.defineProperty(t,"debounce",{enumerable:!0,get:function(){return Ie.debounce}});var xe=r(8157);Object.defineProperty(t,"debounceTime",{enumerable:!0,get:function(){return xe.debounceTime}});var Ae=r(1714);Object.defineProperty(t,"defaultIfEmpty",{enumerable:!0,get:function(){return Ae.defaultIfEmpty}});var Ne=r(1030);Object.defineProperty(t,"delay",{enumerable:!0,get:function(){return Ne.delay}});var ke=r(6405);Object.defineProperty(t,"delayWhen",{enumerable:!0,get:function(){return ke.delayWhen}});var Me=r(9142);Object.defineProperty(t,"dematerialize",{enumerable:!0,get:function(){return Me.dematerialize}});var De=r(2307);Object.defineProperty(t,"distinct",{enumerable:!0,get:function(){return De.distinct}});var Re=r(9131);Object.defineProperty(t,"distinctUntilChanged",{enumerable:!0,get:function(){return Re.distinctUntilChanged}});var Ce=r(6659);Object.defineProperty(t,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return Ce.distinctUntilKeyChanged}});var $e=r(4217);Object.defineProperty(t,"elementAt",{enumerable:!0,get:function(){return $e.elementAt}});var Fe=r(4707);Object.defineProperty(t,"endWith",{enumerable:!0,get:function(){return Fe.endWith}});var qe=r(9276);Object.defineProperty(t,"every",{enumerable:!0,get:function(){return qe.every}});var Le=r(337);Object.defineProperty(t,"exhaust",{enumerable:!0,get:function(){return Le.exhaust}});var Be=r(3977);Object.defineProperty(t,"exhaustAll",{enumerable:!0,get:function(){return Be.exhaustAll}});var Ue=r(368);Object.defineProperty(t,"exhaustMap",{enumerable:!0,get:function(){return Ue.exhaustMap}});var Ve=r(7829);Object.defineProperty(t,"expand",{enumerable:!0,get:function(){return Ve.expand}});var ze=r(2763);Object.defineProperty(t,"filter",{enumerable:!0,get:function(){return ze.filter}});var Qe=r(4106);Object.defineProperty(t,"finalize",{enumerable:!0,get:function(){return Qe.finalize}});var Ye=r(8759);Object.defineProperty(t,"find",{enumerable:!0,get:function(){return Ye.find}});var We=r(3999);Object.defineProperty(t,"findIndex",{enumerable:!0,get:function(){return We.findIndex}});var He=r(5194);Object.defineProperty(t,"first",{enumerable:!0,get:function(){return He.first}});var Ke=r(1664);Object.defineProperty(t,"groupBy",{enumerable:!0,get:function(){return Ke.groupBy}});var Ge=r(3470);Object.defineProperty(t,"ignoreElements",{enumerable:!0,get:function(){return Ge.ignoreElements}});var Je=r(9549);Object.defineProperty(t,"isEmpty",{enumerable:!0,get:function(){return Je.isEmpty}});var Ze=r(9582);Object.defineProperty(t,"last",{enumerable:!0,get:function(){return Ze.last}});var Xe=r(4338);Object.defineProperty(t,"map",{enumerable:!0,get:function(){return Xe.map}});var et=r(4791);Object.defineProperty(t,"mapTo",{enumerable:!0,get:function(){return et.mapTo}});var tt=r(9318);Object.defineProperty(t,"materialize",{enumerable:!0,get:function(){return tt.materialize}});var rt=r(7446);Object.defineProperty(t,"max",{enumerable:!0,get:function(){return rt.max}});var nt=r(4594);Object.defineProperty(t,"mergeAll",{enumerable:!0,get:function(){return nt.mergeAll}});var it=r(2735);Object.defineProperty(t,"flatMap",{enumerable:!0,get:function(){return it.flatMap}});var ot=r(9010);Object.defineProperty(t,"mergeMap",{enumerable:!0,get:function(){return ot.mergeMap}});var at=r(8983);Object.defineProperty(t,"mergeMapTo",{enumerable:!0,get:function(){return at.mergeMapTo}});var st=r(2170);Object.defineProperty(t,"mergeScan",{enumerable:!0,get:function(){return st.mergeScan}});var ut=r(3674);Object.defineProperty(t,"mergeWith",{enumerable:!0,get:function(){return ut.mergeWith}});var ct=r(1446);Object.defineProperty(t,"min",{enumerable:!0,get:function(){return ct.min}});var lt=r(2318);Object.defineProperty(t,"multicast",{enumerable:!0,get:function(){return lt.multicast}});var ft=r(3165);Object.defineProperty(t,"observeOn",{enumerable:!0,get:function(){return ft.observeOn}});var pt=r(402);Object.defineProperty(t,"pairwise",{enumerable:!0,get:function(){return pt.pairwise}});var dt=r(5658);Object.defineProperty(t,"pluck",{enumerable:!0,get:function(){return dt.pluck}});var ht=r(3881);Object.defineProperty(t,"publish",{enumerable:!0,get:function(){return ht.publish}});var yt=r(1755);Object.defineProperty(t,"publishBehavior",{enumerable:!0,get:function(){return yt.publishBehavior}});var vt=r(9801);Object.defineProperty(t,"publishLast",{enumerable:!0,get:function(){return vt.publishLast}});var mt=r(5021);Object.defineProperty(t,"publishReplay",{enumerable:!0,get:function(){return mt.publishReplay}});var bt=r(9925);Object.defineProperty(t,"raceWith",{enumerable:!0,get:function(){return bt.raceWith}});var gt=r(1678);Object.defineProperty(t,"reduce",{enumerable:!0,get:function(){return gt.reduce}});var _t=r(1194);Object.defineProperty(t,"repeat",{enumerable:!0,get:function(){return _t.repeat}});var wt=r(7085);Object.defineProperty(t,"repeatWhen",{enumerable:!0,get:function(){return wt.repeatWhen}});var Ot=r(7524);Object.defineProperty(t,"retry",{enumerable:!0,get:function(){return Ot.retry}});var St=r(548);Object.defineProperty(t,"retryWhen",{enumerable:!0,get:function(){return St.retryWhen}});var Et=r(2711);Object.defineProperty(t,"refCount",{enumerable:!0,get:function(){return Et.refCount}});var Tt=r(6577);Object.defineProperty(t,"sample",{enumerable:!0,get:function(){return Tt.sample}});var jt=r(3815);Object.defineProperty(t,"sampleTime",{enumerable:!0,get:function(){return jt.sampleTime}});var Pt=r(7250);Object.defineProperty(t,"scan",{enumerable:!0,get:function(){return Pt.scan}});var It=r(842);Object.defineProperty(t,"sequenceEqual",{enumerable:!0,get:function(){return It.sequenceEqual}});var xt=r(9728);Object.defineProperty(t,"share",{enumerable:!0,get:function(){return xt.share}});var At=r(7768);Object.defineProperty(t,"shareReplay",{enumerable:!0,get:function(){return At.shareReplay}});var Nt=r(2445);Object.defineProperty(t,"single",{enumerable:!0,get:function(){return Nt.single}});var kt=r(6262);Object.defineProperty(t,"skip",{enumerable:!0,get:function(){return kt.skip}});var Mt=r(7397);Object.defineProperty(t,"skipLast",{enumerable:!0,get:function(){return Mt.skipLast}});var Dt=r(9900);Object.defineProperty(t,"skipUntil",{enumerable:!0,get:function(){return Dt.skipUntil}});var Rt=r(1620);Object.defineProperty(t,"skipWhile",{enumerable:!0,get:function(){return Rt.skipWhile}});var Ct=r(3424);Object.defineProperty(t,"startWith",{enumerable:!0,get:function(){return Ct.startWith}});var $t=r(831);Object.defineProperty(t,"subscribeOn",{enumerable:!0,get:function(){return $t.subscribeOn}});var Ft=r(411);Object.defineProperty(t,"switchAll",{enumerable:!0,get:function(){return Ft.switchAll}});var qt=r(7222);Object.defineProperty(t,"switchMap",{enumerable:!0,get:function(){return qt.switchMap}});var Lt=r(6464);Object.defineProperty(t,"switchMapTo",{enumerable:!0,get:function(){return Lt.switchMapTo}});var Bt=r(4434);Object.defineProperty(t,"switchScan",{enumerable:!0,get:function(){return Bt.switchScan}});var Ut=r(7138);Object.defineProperty(t,"take",{enumerable:!0,get:function(){return Ut.take}});var Vt=r(4288);Object.defineProperty(t,"takeLast",{enumerable:!0,get:function(){return Vt.takeLast}});var zt=r(7341);Object.defineProperty(t,"takeUntil",{enumerable:!0,get:function(){return zt.takeUntil}});var Qt=r(653);Object.defineProperty(t,"takeWhile",{enumerable:!0,get:function(){return Qt.takeWhile}});var Yt=r(8668);Object.defineProperty(t,"tap",{enumerable:!0,get:function(){return Yt.tap}});var Wt=r(9466);Object.defineProperty(t,"throttle",{enumerable:!0,get:function(){return Wt.throttle}});var Ht=r(9705);Object.defineProperty(t,"throttleTime",{enumerable:!0,get:function(){return Ht.throttleTime}});var Kt=r(8062);Object.defineProperty(t,"throwIfEmpty",{enumerable:!0,get:function(){return Kt.throwIfEmpty}});var Gt=r(6610);Object.defineProperty(t,"timeInterval",{enumerable:!0,get:function(){return Gt.timeInterval}});var Jt=r(6279);Object.defineProperty(t,"timeout",{enumerable:!0,get:function(){return Jt.timeout}});var Zt=r(8132);Object.defineProperty(t,"timeoutWith",{enumerable:!0,get:function(){return Zt.timeoutWith}});var Xt=r(4553);Object.defineProperty(t,"timestamp",{enumerable:!0,get:function(){return Xt.timestamp}});var er=r(2378);Object.defineProperty(t,"toArray",{enumerable:!0,get:function(){return er.toArray}});var tr=r(4768);Object.defineProperty(t,"window",{enumerable:!0,get:function(){return tr.window}});var rr=r(131);Object.defineProperty(t,"windowCount",{enumerable:!0,get:function(){return rr.windowCount}});var nr=r(9579);Object.defineProperty(t,"windowTime",{enumerable:!0,get:function(){return nr.windowTime}});var ir=r(752);Object.defineProperty(t,"windowToggle",{enumerable:!0,get:function(){return ir.windowToggle}});var or=r(582);Object.defineProperty(t,"windowWhen",{enumerable:!0,get:function(){return or.windowWhen}});var ar=r(4255);Object.defineProperty(t,"withLatestFrom",{enumerable:!0,get:function(){return ar.withLatestFrom}});var sr=r(7220);Object.defineProperty(t,"zipAll",{enumerable:!0,get:function(){return sr.zipAll}});var ur=r(9287);Object.defineProperty(t,"zipWith",{enumerable:!0,get:function(){return ur.zipWith}})},7257:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=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])},n(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}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncSubject=void 0;var o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._value=null,t._hasValue=!1,t._isComplete=!1,t}return i(t,e),t.prototype._checkFinalizedStatuses=function(e){var t=this,r=t.hasError,n=t._hasValue,i=t._value,o=t.thrownError,a=t.isStopped,s=t._isComplete;r?e.error(o):(a||s)&&(n&&e.next(i),e.complete())},t.prototype.next=function(e){this.isStopped||(this._value=e,this._hasValue=!0)},t.prototype.complete=function(){var t=this,r=t._hasValue,n=t._value;t._isComplete||(this._isComplete=!0,r&&e.prototype.next.call(this,n),e.prototype.complete.call(this))},t}(r(9520).Subject);t.AsyncSubject=o},8042:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=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])},n(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}n(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;var o=function(e){function t(t){var r=e.call(this)||this;return r._value=t,r}return i(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(t){var r=e.prototype._subscribe.call(this,t);return!r.closed&&t.next(this._value),r},t.prototype.getValue=function(){var e=this,t=e.hasError,r=e.thrownError,n=e._value;if(t)throw r;return this._throwIfClosed(),n},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(r(9520).Subject);t.BehaviorSubject=o},3868:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.observeNotification=t.Notification=t.NotificationKind=void 0;var n,i=r(1727),o=r(7443),a=r(859),s=r(4432);(n=t.NotificationKind||(t.NotificationKind={})).NEXT="N",n.ERROR="E",n.COMPLETE="C";var u=function(){function e(e,t,r){this.kind=e,this.value=t,this.error=r,this.hasValue="N"===e}return e.prototype.observe=function(e){return c(this,e)},e.prototype.do=function(e,t,r){var n=this,i=n.kind,o=n.value,a=n.error;return"N"===i?null==e?void 0:e(o):"E"===i?null==t?void 0:t(a):null==r?void 0:r()},e.prototype.accept=function(e,t,r){var n;return s.isFunction(null===(n=e)||void 0===n?void 0:n.next)?this.observe(e):this.do(e,t,r)},e.prototype.toObservable=function(){var e=this,t=e.kind,r=e.value,n=e.error,s="N"===t?o.of(r):"E"===t?a.throwError((function(){return n})):"C"===t?i.EMPTY:0;if(!s)throw new TypeError("Unexpected notification kind "+t);return s},e.createNext=function(t){return new e("N",t)},e.createError=function(t){return new e("E",void 0,t)},e.createComplete=function(){return e.completeNotification},e.completeNotification=new e("C"),e}();function c(e,t){var r,n,i,o=e,a=o.kind,s=o.value,u=o.error;if("string"!=typeof a)throw new TypeError('Invalid notification, missing "kind"');"N"===a?null===(r=t.next)||void 0===r||r.call(t,s):"E"===a?null===(n=t.error)||void 0===n||n.call(t,u):null===(i=t.complete)||void 0===i||i.call(t)}t.Notification=u,t.observeNotification=c},3380:(e,t)=>{"use strict";function r(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=r("C",void 0,void 0),t.errorNotification=function(e){return r("E",void 0,e)},t.nextNotification=function(e){return r("N",e,void 0)},t.createNotification=r},5271:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Observable=void 0;var n=r(1403),i=r(7215),o=r(2138),a=r(5966),s=r(3782),u=r(4432),c=r(4770),l=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(e,t,r){var o,a=this,s=(o=e)&&o instanceof n.Subscriber||function(e){return e&&u.isFunction(e.next)&&u.isFunction(e.error)&&u.isFunction(e.complete)}(o)&&i.isSubscription(o)?e:new n.SafeSubscriber(e,t,r);return c.errorContext((function(){var e=a,t=e.operator,r=e.source;s.add(t?t.call(s,r):r?a._subscribe(s):a._trySubscribe(s))})),s},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var r=this;return new(t=f(t))((function(t,i){var o=new n.SafeSubscriber({next:function(t){try{e(t)}catch(e){i(e),o.unsubscribe()}},error:i,complete:t});r.subscribe(o)}))},e.prototype._subscribe=function(e){var t;return null===(t=this.source)||void 0===t?void 0:t.subscribe(e)},e.prototype[o.observable]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return a.pipeFromArray(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=f(e))((function(e,r){var n;t.subscribe((function(e){return n=e}),(function(e){return r(e)}),(function(){return e(n)}))}))},e.create=function(t){return new e(t)},e}();function f(e){var t;return null!==(t=null!=e?e:s.config.Promise)&&void 0!==t?t:Promise}t.Observable=l},216:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=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])},n(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}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.ReplaySubject=void 0;var o=r(9520),a=r(1713),s=function(e){function t(t,r,n){void 0===t&&(t=1/0),void 0===r&&(r=1/0),void 0===n&&(n=a.dateTimestampProvider);var i=e.call(this)||this;return i._bufferSize=t,i._windowTime=r,i._timestampProvider=n,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=r===1/0,i._bufferSize=Math.max(1,t),i._windowTime=Math.max(1,r),i}return i(t,e),t.prototype.next=function(t){var r=this,n=r.isStopped,i=r._buffer,o=r._infiniteTimeWindow,a=r._timestampProvider,s=r._windowTime;n||(i.push(t),!o&&i.push(a.now()+s)),this._trimBuffer(),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),r=this._infiniteTimeWindow,n=this._buffer.slice(),i=0;i<n.length&&!e.closed;i+=r?1:2)e.next(n[i]);return this._checkFinalizedStatuses(e),t},t.prototype._trimBuffer=function(){var e=this,t=e._bufferSize,r=e._timestampProvider,n=e._buffer,i=e._infiniteTimeWindow,o=(i?1:2)*t;if(t<1/0&&o<n.length&&n.splice(0,n.length-o),!i){for(var a=r.now(),s=0,u=1;u<n.length&&n[u]<=a;u+=2)s=u;s&&n.splice(0,s+1)}},t}(o.Subject);t.ReplaySubject=s},3980:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Scheduler=void 0;var n=r(1713),i=function(){function e(t,r){void 0===r&&(r=e.now),this.schedulerActionCtor=t,this.now=r}return e.prototype.schedule=function(e,t,r){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(r,t)},e.now=n.dateTimestampProvider.now,e}();t.Scheduler=i},9520:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=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])},n(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}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=this&&this.__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 e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.AnonymousSubject=t.Subject=void 0;var a=r(5271),s=r(7215),u=r(7392),c=r(2447),l=r(4770),f=function(e){function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return i(t,e),t.prototype.lift=function(e){var t=new p(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new u.ObjectUnsubscribedError},t.prototype.next=function(e){var t=this;l.errorContext((function(){var r,n;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var i=o(t.currentObservers),a=i.next();!a.done;a=i.next())a.value.next(e)}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}}}))},t.prototype.error=function(e){var t=this;l.errorContext((function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var r=t.observers;r.length;)r.shift().error(e)}}))},t.prototype.complete=function(){var e=this;l.errorContext((function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}}))},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return(null===(e=this.observers)||void 0===e?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,r=this,n=r.hasError,i=r.isStopped,o=r.observers;return n||i?s.EMPTY_SUBSCRIPTION:(this.currentObservers=null,o.push(e),new s.Subscription((function(){t.currentObservers=null,c.arrRemove(o,e)})))},t.prototype._checkFinalizedStatuses=function(e){var t=this,r=t.hasError,n=t.thrownError,i=t.isStopped;r?e.error(n):i&&e.complete()},t.prototype.asObservable=function(){var e=new a.Observable;return e.source=this,e},t.create=function(e,t){return new p(e,t)},t}(a.Observable);t.Subject=f;var p=function(e){function t(t,r){var n=e.call(this)||this;return n.destination=t,n.source=r,n}return i(t,e),t.prototype.next=function(e){var t,r;null===(r=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===r||r.call(t,e)},t.prototype.error=function(e){var t,r;null===(r=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===r||r.call(t,e)},t.prototype.complete=function(){var e,t;null===(t=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===t||t.call(e)},t.prototype._subscribe=function(e){var t,r;return null!==(r=null===(t=this.source)||void 0===t?void 0:t.subscribe(e))&&void 0!==r?r:s.EMPTY_SUBSCRIPTION},t}(f);t.AnonymousSubject=p},1403:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=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])},n(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}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.EMPTY_OBSERVER=t.SafeSubscriber=t.Subscriber=void 0;var o=r(4432),a=r(7215),s=r(3782),u=r(7234),c=r(5729),l=r(3380),f=r(8972),p=r(4770),d=function(e){function r(r){var n=e.call(this)||this;return n.isStopped=!1,r?(n.destination=r,a.isSubscription(r)&&r.add(n)):n.destination=t.EMPTY_OBSERVER,n}return i(r,e),r.create=function(e,t,r){return new m(e,t,r)},r.prototype.next=function(e){this.isStopped?g(l.nextNotification(e),this):this._next(e)},r.prototype.error=function(e){this.isStopped?g(l.errorNotification(e),this):(this.isStopped=!0,this._error(e))},r.prototype.complete=function(){this.isStopped?g(l.COMPLETE_NOTIFICATION,this):(this.isStopped=!0,this._complete())},r.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},r.prototype._next=function(e){this.destination.next(e)},r.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},r.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},r}(a.Subscription);t.Subscriber=d;var h=Function.prototype.bind;function y(e,t){return h.call(e,t)}var v=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){b(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){b(e)}else b(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){b(e)}},e}(),m=function(e){function t(t,r,n){var i,a,u=e.call(this)||this;return o.isFunction(t)||!t?i={next:null!=t?t:void 0,error:null!=r?r:void 0,complete:null!=n?n:void 0}:u&&s.config.useDeprecatedNextContext?((a=Object.create(t)).unsubscribe=function(){return u.unsubscribe()},i={next:t.next&&y(t.next,a),error:t.error&&y(t.error,a),complete:t.complete&&y(t.complete,a)}):i=t,u.destination=new v(i),u}return i(t,e),t}(d);function b(e){s.config.useDeprecatedSynchronousErrorHandling?p.captureError(e):u.reportUnhandledError(e)}function g(e,t){var r=s.config.onStoppedNotification;r&&f.timeoutProvider.setTimeout((function(){return r(e,t)}))}t.SafeSubscriber=m,t.EMPTY_OBSERVER={closed:!0,next:c.noop,error:function(e){throw e},complete:c.noop}},7215:function(e,t,r){"use strict";var n=this&&this.__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 e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},i=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},o=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.isSubscription=t.EMPTY_SUBSCRIPTION=t.Subscription=void 0;var a=r(4432),s=r(5463),u=r(2447),c=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}var t;return e.prototype.unsubscribe=function(){var e,t,r,u,c;if(!this.closed){this.closed=!0;var f=this._parentage;if(f)if(this._parentage=null,Array.isArray(f))try{for(var p=n(f),d=p.next();!d.done;d=p.next())d.value.remove(this)}catch(t){e={error:t}}finally{try{d&&!d.done&&(t=p.return)&&t.call(p)}finally{if(e)throw e.error}}else f.remove(this);var h=this.initialTeardown;if(a.isFunction(h))try{h()}catch(e){c=e instanceof s.UnsubscriptionError?e.errors:[e]}var y=this._finalizers;if(y){this._finalizers=null;try{for(var v=n(y),m=v.next();!m.done;m=v.next()){var b=m.value;try{l(b)}catch(e){c=null!=c?c:[],e instanceof s.UnsubscriptionError?c=o(o([],i(c)),i(e.errors)):c.push(e)}}}catch(e){r={error:e}}finally{try{m&&!m.done&&(u=v.return)&&u.call(v)}finally{if(r)throw r.error}}}if(c)throw new s.UnsubscriptionError(c)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)l(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(r=this._finalizers)&&void 0!==r?r:[]).push(t)}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&u.arrRemove(t,e)},e.prototype.remove=function(t){var r=this._finalizers;r&&u.arrRemove(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=((t=new e).closed=!0,t),e}();function l(e){a.isFunction(e)?e():e.unsubscribe()}t.Subscription=c,t.EMPTY_SUBSCRIPTION=c.EMPTY,t.isSubscription=function(e){return e instanceof c||e&&"closed"in e&&a.isFunction(e.remove)&&a.isFunction(e.add)&&a.isFunction(e.unsubscribe)}},3782:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.config=void 0,t.config={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1}},7447:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.firstValueFrom=void 0;var n=r(8032),i=r(1403);t.firstValueFrom=function(e,t){var r="object"==typeof t;return new Promise((function(o,a){var s=new i.SafeSubscriber({next:function(e){o(e),s.unsubscribe()},error:a,complete:function(){r?o(t.defaultValue):a(new n.EmptyError)}});e.subscribe(s)}))}},1263:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.lastValueFrom=void 0;var n=r(8032);t.lastValueFrom=function(e,t){var r="object"==typeof t;return new Promise((function(i,o){var a,s=!1;e.subscribe({next:function(e){a=e,s=!0},error:o,complete:function(){s?i(a):r?i(t.defaultValue):o(new n.EmptyError)}})}))}},3739:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=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])},n(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}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectableObservable=void 0;var o=r(5271),a=r(7215),s=r(2711),u=r(5079),c=r(4024),l=function(e){function t(t,r){var n=e.call(this)||this;return n.source=t,n.subjectFactory=r,n._subject=null,n._refCount=0,n._connection=null,c.hasLift(t)&&(n.lift=t.lift),n}return i(t,e),t.prototype._subscribe=function(e){return this.getSubject().subscribe(e)},t.prototype.getSubject=function(){var e=this._subject;return e&&!e.isStopped||(this._subject=this.subjectFactory()),this._subject},t.prototype._teardown=function(){this._refCount=0;var e=this._connection;this._subject=this._connection=null,null==e||e.unsubscribe()},t.prototype.connect=function(){var e=this,t=this._connection;if(!t){t=this._connection=new a.Subscription;var r=this.getSubject();t.add(this.source.subscribe(u.createOperatorSubscriber(r,void 0,(function(){e._teardown(),r.complete()}),(function(t){e._teardown(),r.error(t)}),(function(){return e._teardown()})))),t.closed&&(this._connection=null,t=a.Subscription.EMPTY)}return t},t.prototype.refCount=function(){return s.refCount()(this)},t}(o.Observable);t.ConnectableObservable=l},1253:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bindCallback=void 0;var n=r(6414);t.bindCallback=function(e,t,r){return n.bindCallbackInternals(!1,e,t,r)}},6414:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.bindCallbackInternals=void 0;var o=r(6551),a=r(5271),s=r(831),u=r(4666),c=r(3165),l=r(7257);t.bindCallbackInternals=function e(t,r,f,p){if(f){if(!o.isScheduler(f))return function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return e(t,r,p).apply(this,n).pipe(u.mapOneOrManyArgs(f))};p=f}return p?function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return e(t,r).apply(this,n).pipe(s.subscribeOn(p),c.observeOn(p))}:function(){for(var e=this,o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];var u=new l.AsyncSubject,c=!0;return new a.Observable((function(a){var s=u.subscribe(a);if(c){c=!1;var l=!1,f=!1;r.apply(e,i(i([],n(o)),[function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];if(t){var n=e.shift();if(null!=n)return void u.error(n)}u.next(1<e.length?e:e[0]),f=!0,l&&u.complete()}])),f&&u.complete(),l=!0}return s}))}}},1009:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bindNodeCallback=void 0;var n=r(6414);t.bindNodeCallback=function(e,t,r){return n.bindCallbackInternals(!0,e,t,r)}},1047:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.combineLatestInit=t.combineLatest=void 0;var n=r(5271),i=r(4744),o=r(6216),a=r(9144),s=r(4666),u=r(2619),c=r(1589),l=r(5079),f=r(5421);function p(e,t,r){return void 0===r&&(r=a.identity),function(n){d(t,(function(){for(var i=e.length,a=new Array(i),s=i,u=i,c=function(i){d(t,(function(){var c=o.from(e[i],t),f=!1;c.subscribe(l.createOperatorSubscriber(n,(function(e){a[i]=e,f||(f=!0,u--),u||n.next(r(a.slice()))}),(function(){--s||n.complete()})))}),n)},f=0;f<i;f++)c(f)}),n)}}function d(e,t,r){e?f.executeSchedule(r,e,t):t()}t.combineLatest=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=u.popScheduler(e),l=u.popResultSelector(e),f=i.argsArgArrayOrObject(e),d=f.args,h=f.keys;if(0===d.length)return o.from([],r);var y=new n.Observable(p(d,r,h?function(e){return c.createObject(h,e)}:a.identity));return l?y.pipe(s.mapOneOrManyArgs(l)):y},t.combineLatestInit=p},79:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.concat=void 0;var n=r(4554),i=r(2619),o=r(6216);t.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n.concatAll()(o.from(e,i.popScheduler(e)))}},1663:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.connectable=void 0;var n=r(9520),i=r(5271),o=r(5401),a={connector:function(){return new n.Subject},resetOnDisconnect:!0};t.connectable=function(e,t){void 0===t&&(t=a);var r=null,n=t.connector,s=t.resetOnDisconnect,u=void 0===s||s,c=n(),l=new i.Observable((function(e){return c.subscribe(e)}));return l.connect=function(){return r&&!r.closed||(r=o.defer((function(){return e})).subscribe(c),u&&r.add((function(){return c=n()}))),r},l}},5401:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defer=void 0;var n=r(5271),i=r(9451);t.defer=function(e){return new n.Observable((function(t){i.innerFrom(e()).subscribe(t)}))}},4190:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.animationFrames=void 0;var n=r(5271),i=r(1241),o=r(6741);function a(e){return new n.Observable((function(t){var r=e||i.performanceTimestampProvider,n=r.now(),a=0,s=function(){t.closed||(a=o.animationFrameProvider.requestAnimationFrame((function(i){a=0;var o=r.now();t.next({timestamp:e?o:i,elapsed:o-n}),s()})))};return s(),function(){a&&o.animationFrameProvider.cancelAnimationFrame(a)}}))}t.animationFrames=function(e){return e?a(e):s};var s=a()},1727:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.empty=t.EMPTY=void 0;var n=r(5271);t.EMPTY=new n.Observable((function(e){return e.complete()})),t.empty=function(e){return e?function(e){return new n.Observable((function(t){return e.schedule((function(){return t.complete()}))}))}(e):t.EMPTY}},1723:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.forkJoin=void 0;var n=r(5271),i=r(4744),o=r(9451),a=r(2619),s=r(5079),u=r(4666),c=r(1589);t.forkJoin=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=a.popResultSelector(e),l=i.argsArgArrayOrObject(e),f=l.args,p=l.keys,d=new n.Observable((function(e){var t=f.length;if(t)for(var r=new Array(t),n=t,i=t,a=function(t){var a=!1;o.innerFrom(f[t]).subscribe(s.createOperatorSubscriber(e,(function(e){a||(a=!0,i--),r[t]=e}),(function(){return n--}),void 0,(function(){n&&a||(i||e.next(p?c.createObject(p,r):r),e.complete())})))},u=0;u<t;u++)a(u);else e.complete()}));return r?d.pipe(u.mapOneOrManyArgs(r)):d}},6216:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.from=void 0;var n=r(3200),i=r(9451);t.from=function(e,t){return t?n.scheduled(e,t):i.innerFrom(e)}},6767:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a};Object.defineProperty(t,"__esModule",{value:!0}),t.fromEvent=void 0;var i=r(9451),o=r(5271),a=r(9010),s=r(8219),u=r(4432),c=r(4666),l=["addListener","removeListener"],f=["addEventListener","removeEventListener"],p=["on","off"];function d(e,t){return function(r){return function(n){return e[r](t,n)}}}t.fromEvent=function e(t,r,h,y){if(u.isFunction(h)&&(y=h,h=void 0),y)return e(t,r,h).pipe(c.mapOneOrManyArgs(y));var v=n(function(e){return u.isFunction(e.addEventListener)&&u.isFunction(e.removeEventListener)}(t)?f.map((function(e){return function(n){return t[e](r,n,h)}})):function(e){return u.isFunction(e.addListener)&&u.isFunction(e.removeListener)}(t)?l.map(d(t,r)):function(e){return u.isFunction(e.on)&&u.isFunction(e.off)}(t)?p.map(d(t,r)):[],2),m=v[0],b=v[1];if(!m&&s.isArrayLike(t))return a.mergeMap((function(t){return e(t,r,h)}))(i.innerFrom(t));if(!m)throw new TypeError("Invalid event target");return new o.Observable((function(e){var t=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.next(1<t.length?t:t[0])};return m(t),function(){return b(t)}}))}},4366:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromEventPattern=void 0;var n=r(5271),i=r(4432),o=r(4666);t.fromEventPattern=function e(t,r,a){return a?e(t,r).pipe(o.mapOneOrManyArgs(a)):new n.Observable((function(e){var n=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.next(1===t.length?t[0]:t)},o=t(n);return i.isFunction(r)?function(){return r(n,o)}:void 0}))}},2160:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromSubscribable=void 0;var n=r(5271);t.fromSubscribable=function(e){return new n.Observable((function(t){return e.subscribe(t)}))}},6103:function(e,t,r){"use strict";var n=this&&this.__generator||function(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.generate=void 0;var i=r(9144),o=r(6551),a=r(5401),s=r(8840);t.generate=function(e,t,r,u,c){var l,f,p,d;function h(){var e;return n(this,(function(n){switch(n.label){case 0:e=d,n.label=1;case 1:return t&&!t(e)?[3,4]:[4,p(e)];case 2:n.sent(),n.label=3;case 3:return e=r(e),[3,1];case 4:return[2]}}))}return 1===arguments.length?(d=(l=e).initialState,t=l.condition,r=l.iterate,f=l.resultSelector,p=void 0===f?i.identity:f,c=l.scheduler):(d=e,!u||o.isScheduler(u)?(p=i.identity,c=u):p=u),a.defer(c?function(){return s.scheduleIterable(h(),c)}:h)}},4468:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.iif=void 0;var n=r(5401);t.iif=function(e,t,r){return n.defer((function(){return e()?t:r}))}},9451:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},o=this&&this.__asyncValues||function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e="function"==typeof a?a(e):e[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,i){!function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)}(n,i,(t=e[r](t)).done,t.value)}))}}},a=this&&this.__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 e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.fromReadableStreamLike=t.fromAsyncIterable=t.fromIterable=t.fromPromise=t.fromArrayLike=t.fromInteropObservable=t.innerFrom=void 0;var s=r(8219),u=r(2644),c=r(5271),l=r(3292),f=r(7707),p=r(4883),d=r(6380),h=r(9266),y=r(4432),v=r(7234),m=r(2138);function b(e){return new c.Observable((function(t){var r=e[m.observable]();if(y.isFunction(r.subscribe))return r.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")}))}function g(e){return new c.Observable((function(t){for(var r=0;r<e.length&&!t.closed;r++)t.next(e[r]);t.complete()}))}function _(e){return new c.Observable((function(t){e.then((function(e){t.closed||(t.next(e),t.complete())}),(function(e){return t.error(e)})).then(null,v.reportUnhandledError)}))}function w(e){return new c.Observable((function(t){var r,n;try{for(var i=a(e),o=i.next();!o.done;o=i.next()){var s=o.value;if(t.next(s),t.closed)return}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}t.complete()}))}function O(e){return new c.Observable((function(t){(function(e,t){var r,a,s,u;return n(this,void 0,void 0,(function(){var n,c;return i(this,(function(i){switch(i.label){case 0:i.trys.push([0,5,6,11]),r=o(e),i.label=1;case 1:return[4,r.next()];case 2:if((a=i.sent()).done)return[3,4];if(n=a.value,t.next(n),t.closed)return[2];i.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return c=i.sent(),s={error:c},[3,11];case 6:return i.trys.push([6,,9,10]),a&&!a.done&&(u=r.return)?[4,u.call(r)]:[3,8];case 7:i.sent(),i.label=8;case 8:return[3,10];case 9:if(s)throw s.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}}))}))})(e,t).catch((function(e){return t.error(e)}))}))}function S(e){return O(h.readableStreamLikeToAsyncGenerator(e))}t.innerFrom=function(e){if(e instanceof c.Observable)return e;if(null!=e){if(l.isInteropObservable(e))return b(e);if(s.isArrayLike(e))return g(e);if(u.isPromise(e))return _(e);if(f.isAsyncIterable(e))return O(e);if(d.isIterable(e))return w(e);if(h.isReadableStreamLike(e))return S(e)}throw p.createInvalidObservableTypeError(e)},t.fromInteropObservable=b,t.fromArrayLike=g,t.fromPromise=_,t.fromIterable=w,t.fromAsyncIterable=O,t.fromReadableStreamLike=S},4449:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.interval=void 0;var n=r(4617),i=r(5710);t.interval=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=n.asyncScheduler),e<0&&(e=0),i.timer(e,e,t)}},5847:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.merge=void 0;var n=r(4594),i=r(9451),o=r(1727),a=r(2619),s=r(6216);t.merge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=a.popScheduler(e),u=a.popNumber(e,1/0),c=e;return c.length?1===c.length?i.innerFrom(c[0]):n.mergeAll(u)(s.from(c,r)):o.EMPTY}},7423:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.never=t.NEVER=void 0;var n=r(5271),i=r(5729);t.NEVER=new n.Observable(i.noop),t.never=function(){return t.NEVER}},7443:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.of=void 0;var n=r(2619),i=r(6216);t.of=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=n.popScheduler(e);return i.from(e,r)}},1282:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.onErrorResumeNext=void 0;var n=r(1727),i=r(4764),o=r(4475);t.onErrorResumeNext=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return i.onErrorResumeNext(o.argsOrArgArray(e))(n.EMPTY)}},5259:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pairs=void 0;var n=r(6216);t.pairs=function(e,t){return n.from(Object.entries(e),t)}},1945:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.partition=void 0;var n=r(1574),i=r(2763),o=r(9451);t.partition=function(e,t,r){return[i.filter(t,r)(o.innerFrom(e)),i.filter(n.not(t,r))(o.innerFrom(e))]}},7779:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.raceInit=t.race=void 0;var n=r(5271),i=r(9451),o=r(4475),a=r(5079);function s(e){return function(t){for(var r=[],n=function(n){r.push(i.innerFrom(e[n]).subscribe(a.createOperatorSubscriber(t,(function(e){if(r){for(var i=0;i<r.length;i++)i!==n&&r[i].unsubscribe();r=null}t.next(e)}))))},o=0;r&&!t.closed&&o<e.length;o++)n(o)}}t.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 1===(e=o.argsOrArgArray(e)).length?i.innerFrom(e[0]):new n.Observable(s(e))},t.raceInit=s},6971:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.range=void 0;var n=r(5271),i=r(1727);t.range=function(e,t,r){if(null==t&&(t=e,e=0),t<=0)return i.EMPTY;var o=t+e;return new n.Observable(r?function(t){var n=e;return r.schedule((function(){n<o?(t.next(n++),this.schedule()):t.complete()}))}:function(t){for(var r=e;r<o&&!t.closed;)t.next(r++);t.complete()})}},859:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.throwError=void 0;var n=r(5271),i=r(4432);t.throwError=function(e,t){var r=i.isFunction(e)?e:function(){return e},o=function(e){return e.error(r())};return new n.Observable(t?function(e){return t.schedule(o,0,e)}:o)}},5710:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.timer=void 0;var n=r(5271),i=r(4617),o=r(6551),a=r(7761);t.timer=function(e,t,r){void 0===e&&(e=0),void 0===r&&(r=i.async);var s=-1;return null!=t&&(o.isScheduler(t)?r=t:s=t),new n.Observable((function(t){var n=a.isValidDate(e)?+e-r.now():e;n<0&&(n=0);var i=0;return r.schedule((function(){t.closed||(t.next(i++),0<=s?this.schedule(void 0,s):t.complete())}),n)}))}},3687:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.using=void 0;var n=r(5271),i=r(9451),o=r(1727);t.using=function(e,t){return new n.Observable((function(r){var n=e(),a=t(n);return(a?i.innerFrom(a):o.EMPTY).subscribe(r),function(){n&&n.unsubscribe()}}))}},2042:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.zip=void 0;var o=r(5271),a=r(9451),s=r(4475),u=r(1727),c=r(5079),l=r(2619);t.zip=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=l.popResultSelector(e),f=s.argsOrArgArray(e);return f.length?new o.Observable((function(e){var t=f.map((function(){return[]})),o=f.map((function(){return!1}));e.add((function(){t=o=null}));for(var s=function(s){a.innerFrom(f[s]).subscribe(c.createOperatorSubscriber(e,(function(a){if(t[s].push(a),t.every((function(e){return e.length}))){var u=t.map((function(e){return e.shift()}));e.next(r?r.apply(void 0,i([],n(u))):u),t.some((function(e,t){return!e.length&&o[t]}))&&e.complete()}}),(function(){o[s]=!0,!t[s].length&&e.complete()})))},u=0;!e.closed&&u<f.length;u++)s(u);return function(){t=o=null}})):u.EMPTY}},5079:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=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])},n(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}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.OperatorSubscriber=t.createOperatorSubscriber=void 0;var o=r(1403);t.createOperatorSubscriber=function(e,t,r,n,i){return new a(e,t,r,n,i)};var a=function(e){function t(t,r,n,i,o,a){var s=e.call(this,t)||this;return s.onFinalize=o,s.shouldUnsubscribe=a,s._next=r?function(e){try{r(e)}catch(e){t.error(e)}}:e.prototype._next,s._error=i?function(e){try{i(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,s._complete=n?function(){try{n()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,s}return i(t,e),t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;e.prototype.unsubscribe.call(this),!r&&(null===(t=this.onFinalize)||void 0===t||t.call(this))}},t}(o.Subscriber);t.OperatorSubscriber=a},3533:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.audit=void 0;var n=r(4024),i=r(9451),o=r(5079);t.audit=function(e){return n.operate((function(t,r){var n=!1,a=null,s=null,u=!1,c=function(){if(null==s||s.unsubscribe(),s=null,n){n=!1;var e=a;a=null,r.next(e)}u&&r.complete()},l=function(){s=null,u&&r.complete()};t.subscribe(o.createOperatorSubscriber(r,(function(t){n=!0,a=t,s||i.innerFrom(e(t)).subscribe(s=o.createOperatorSubscriber(r,c,l))}),(function(){u=!0,(!n||!s||s.closed)&&r.complete()})))}))}},5188:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.auditTime=void 0;var n=r(4617),i=r(3533),o=r(5710);t.auditTime=function(e,t){return void 0===t&&(t=n.asyncScheduler),i.audit((function(){return o.timer(e,t)}))}},4514:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.buffer=void 0;var n=r(4024),i=r(5729),o=r(5079);t.buffer=function(e){return n.operate((function(t,r){var n=[];return t.subscribe(o.createOperatorSubscriber(r,(function(e){return n.push(e)}),(function(){r.next(n),r.complete()}))),e.subscribe(o.createOperatorSubscriber(r,(function(){var e=n;n=[],r.next(e)}),i.noop)),function(){n=null}}))}},2537:function(e,t,r){"use strict";var n=this&&this.__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 e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.bufferCount=void 0;var i=r(4024),o=r(5079),a=r(2447);t.bufferCount=function(e,t){return void 0===t&&(t=null),t=null!=t?t:e,i.operate((function(r,i){var s=[],u=0;r.subscribe(o.createOperatorSubscriber(i,(function(r){var o,c,l,f,p=null;u++%t==0&&s.push([]);try{for(var d=n(s),h=d.next();!h.done;h=d.next())(m=h.value).push(r),e<=m.length&&(p=null!=p?p:[]).push(m)}catch(e){o={error:e}}finally{try{h&&!h.done&&(c=d.return)&&c.call(d)}finally{if(o)throw o.error}}if(p)try{for(var y=n(p),v=y.next();!v.done;v=y.next()){var m=v.value;a.arrRemove(s,m),i.next(m)}}catch(e){l={error:e}}finally{try{v&&!v.done&&(f=y.return)&&f.call(y)}finally{if(l)throw l.error}}}),(function(){var e,t;try{for(var r=n(s),o=r.next();!o.done;o=r.next()){var a=o.value;i.next(a)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}i.complete()}),void 0,(function(){s=null})))}))}},8720:function(e,t,r){"use strict";var n=this&&this.__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 e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.bufferTime=void 0;var i=r(7215),o=r(4024),a=r(5079),s=r(2447),u=r(4617),c=r(2619),l=r(5421);t.bufferTime=function(e){for(var t,r,f=[],p=1;p<arguments.length;p++)f[p-1]=arguments[p];var d=null!==(t=c.popScheduler(f))&&void 0!==t?t:u.asyncScheduler,h=null!==(r=f[0])&&void 0!==r?r:null,y=f[1]||1/0;return o.operate((function(t,r){var o=[],u=!1,c=function(e){var t=e.buffer;e.subs.unsubscribe(),s.arrRemove(o,e),r.next(t),u&&f()},f=function(){if(o){var t=new i.Subscription;r.add(t);var n={buffer:[],subs:t};o.push(n),l.executeSchedule(t,d,(function(){return c(n)}),e)}};null!==h&&h>=0?l.executeSchedule(r,d,f,h,!0):u=!0,f();var p=a.createOperatorSubscriber(r,(function(e){var t,r,i=o.slice();try{for(var a=n(i),s=a.next();!s.done;s=a.next()){var u=s.value,l=u.buffer;l.push(e),y<=l.length&&c(u)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}}),(function(){for(;null==o?void 0:o.length;)r.next(o.shift().buffer);null==p||p.unsubscribe(),r.complete(),r.unsubscribe()}),void 0,(function(){return o=null}));t.subscribe(p)}))}},7932:function(e,t,r){"use strict";var n=this&&this.__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 e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.bufferToggle=void 0;var i=r(7215),o=r(4024),a=r(9451),s=r(5079),u=r(5729),c=r(2447);t.bufferToggle=function(e,t){return o.operate((function(r,o){var l=[];a.innerFrom(e).subscribe(s.createOperatorSubscriber(o,(function(e){var r=[];l.push(r);var n=new i.Subscription;n.add(a.innerFrom(t(e)).subscribe(s.createOperatorSubscriber(o,(function(){c.arrRemove(l,r),o.next(r),n.unsubscribe()}),u.noop)))}),u.noop)),r.subscribe(s.createOperatorSubscriber(o,(function(e){var t,r;try{for(var i=n(l),o=i.next();!o.done;o=i.next())o.value.push(e)}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}}),(function(){for(;l.length>0;)o.next(l.shift());o.complete()})))}))}},1445:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bufferWhen=void 0;var n=r(4024),i=r(5729),o=r(5079),a=r(9451);t.bufferWhen=function(e){return n.operate((function(t,r){var n=null,s=null,u=function(){null==s||s.unsubscribe();var t=n;n=[],t&&r.next(t),a.innerFrom(e()).subscribe(s=o.createOperatorSubscriber(r,u,i.noop))};u(),t.subscribe(o.createOperatorSubscriber(r,(function(e){return null==n?void 0:n.push(e)}),(function(){n&&r.next(n),r.complete()}),void 0,(function(){return n=s=null})))}))}},4418:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.catchError=void 0;var n=r(9451),i=r(5079),o=r(4024);t.catchError=function e(t){return o.operate((function(r,o){var a,s=null,u=!1;s=r.subscribe(i.createOperatorSubscriber(o,void 0,void 0,(function(i){a=n.innerFrom(t(i,e(t)(r))),s?(s.unsubscribe(),s=null,a.subscribe(o)):u=!0}))),u&&(s.unsubscribe(),s=null,a.subscribe(o))}))}},4163:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.combineAll=void 0;var n=r(9893);t.combineAll=n.combineLatestAll},8169:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.combineLatest=void 0;var o=r(1047),a=r(4024),s=r(4475),u=r(4666),c=r(5966),l=r(2619);t.combineLatest=function e(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var f=l.popResultSelector(t);return f?c.pipe(e.apply(void 0,i([],n(t))),u.mapOneOrManyArgs(f)):a.operate((function(e,r){o.combineLatestInit(i([e],n(s.argsOrArgArray(t))))(r)}))}},9893:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.combineLatestAll=void 0;var n=r(1047),i=r(7534);t.combineLatestAll=function(e){return i.joinAllInternals(n.combineLatest,e)}},7230:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.combineLatestWith=void 0;var o=r(8169);t.combineLatestWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o.combineLatest.apply(void 0,i([],n(e)))}},4098:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.concat=void 0;var o=r(4024),a=r(4554),s=r(2619),u=r(6216);t.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=s.popScheduler(e);return o.operate((function(t,o){a.concatAll()(u.from(i([t],n(e)),r)).subscribe(o)}))}},4554:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.concatAll=void 0;var n=r(4594);t.concatAll=function(){return n.mergeAll(1)}},1048:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.concatMap=void 0;var n=r(9010),i=r(4432);t.concatMap=function(e,t){return i.isFunction(t)?n.mergeMap(e,t,1):n.mergeMap(e,1)}},381:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.concatMapTo=void 0;var n=r(1048),i=r(4432);t.concatMapTo=function(e,t){return i.isFunction(t)?n.concatMap((function(){return e}),t):n.concatMap((function(){return e}))}},4724:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.concatWith=void 0;var o=r(4098);t.concatWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o.concat.apply(void 0,i([],n(e)))}},4347:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.connect=void 0;var n=r(9520),i=r(9451),o=r(4024),a=r(2160),s={connector:function(){return new n.Subject}};t.connect=function(e,t){void 0===t&&(t=s);var r=t.connector;return o.operate((function(t,n){var o=r();i.innerFrom(e(a.fromSubscribable(o))).subscribe(n),n.add(t.subscribe(o))}))}},6944:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.count=void 0;var n=r(1678);t.count=function(e){return n.reduce((function(t,r,n){return!e||e(r,n)?t+1:t}),0)}},440:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.debounce=void 0;var n=r(4024),i=r(5729),o=r(5079),a=r(9451);t.debounce=function(e){return n.operate((function(t,r){var n=!1,s=null,u=null,c=function(){if(null==u||u.unsubscribe(),u=null,n){n=!1;var e=s;s=null,r.next(e)}};t.subscribe(o.createOperatorSubscriber(r,(function(t){null==u||u.unsubscribe(),n=!0,s=t,u=o.createOperatorSubscriber(r,c,i.noop),a.innerFrom(e(t)).subscribe(u)}),(function(){c(),r.complete()}),void 0,(function(){s=u=null})))}))}},8157:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.debounceTime=void 0;var n=r(4617),i=r(4024),o=r(5079);t.debounceTime=function(e,t){return void 0===t&&(t=n.asyncScheduler),i.operate((function(r,n){var i=null,a=null,s=null,u=function(){if(i){i.unsubscribe(),i=null;var e=a;a=null,n.next(e)}};function c(){var r=s+e,o=t.now();if(o<r)return i=this.schedule(void 0,r-o),void n.add(i);u()}r.subscribe(o.createOperatorSubscriber(n,(function(r){a=r,s=t.now(),i||(i=t.schedule(c,e),n.add(i))}),(function(){u(),n.complete()}),void 0,(function(){a=i=null})))}))}},1714:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultIfEmpty=void 0;var n=r(4024),i=r(5079);t.defaultIfEmpty=function(e){return n.operate((function(t,r){var n=!1;t.subscribe(i.createOperatorSubscriber(r,(function(e){n=!0,r.next(e)}),(function(){n||r.next(e),r.complete()})))}))}},1030:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.delay=void 0;var n=r(4617),i=r(6405),o=r(5710);t.delay=function(e,t){void 0===t&&(t=n.asyncScheduler);var r=o.timer(e,t);return i.delayWhen((function(){return r}))}},6405:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.delayWhen=void 0;var n=r(79),i=r(7138),o=r(3470),a=r(4791),s=r(9010);t.delayWhen=function e(t,r){return r?function(a){return n.concat(r.pipe(i.take(1),o.ignoreElements()),a.pipe(e(t)))}:s.mergeMap((function(e,r){return t(e,r).pipe(i.take(1),a.mapTo(e))}))}},9142:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dematerialize=void 0;var n=r(3868),i=r(4024),o=r(5079);t.dematerialize=function(){return i.operate((function(e,t){e.subscribe(o.createOperatorSubscriber(t,(function(e){return n.observeNotification(e,t)})))}))}},2307:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.distinct=void 0;var n=r(4024),i=r(5079),o=r(5729);t.distinct=function(e,t){return n.operate((function(r,n){var a=new Set;r.subscribe(i.createOperatorSubscriber(n,(function(t){var r=e?e(t):t;a.has(r)||(a.add(r),n.next(t))}))),null==t||t.subscribe(i.createOperatorSubscriber(n,(function(){return a.clear()}),o.noop))}))}},9131:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.distinctUntilChanged=void 0;var n=r(9144),i=r(4024),o=r(5079);function a(e,t){return e===t}t.distinctUntilChanged=function(e,t){return void 0===t&&(t=n.identity),e=null!=e?e:a,i.operate((function(r,n){var i,a=!0;r.subscribe(o.createOperatorSubscriber(n,(function(r){var o=t(r);!a&&e(i,o)||(a=!1,i=o,n.next(r))})))}))}},6659:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.distinctUntilKeyChanged=void 0;var n=r(9131);t.distinctUntilKeyChanged=function(e,t){return n.distinctUntilChanged((function(r,n){return t?t(r[e],n[e]):r[e]===n[e]}))}},4217:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.elementAt=void 0;var n=r(6809),i=r(2763),o=r(8062),a=r(1714),s=r(7138);t.elementAt=function(e,t){if(e<0)throw new n.ArgumentOutOfRangeError;var r=arguments.length>=2;return function(u){return u.pipe(i.filter((function(t,r){return r===e})),s.take(1),r?a.defaultIfEmpty(t):o.throwIfEmpty((function(){return new n.ArgumentOutOfRangeError})))}}},4707:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.endWith=void 0;var o=r(79),a=r(7443);t.endWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return o.concat(t,a.of.apply(void 0,i([],n(e))))}}},9276:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.every=void 0;var n=r(4024),i=r(5079);t.every=function(e,t){return n.operate((function(r,n){var o=0;r.subscribe(i.createOperatorSubscriber(n,(function(i){e.call(t,i,o++,r)||(n.next(!1),n.complete())}),(function(){n.next(!0),n.complete()})))}))}},337:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.exhaust=void 0;var n=r(3977);t.exhaust=n.exhaustAll},3977:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.exhaustAll=void 0;var n=r(368),i=r(9144);t.exhaustAll=function(){return n.exhaustMap(i.identity)}},368:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.exhaustMap=void 0;var n=r(4338),i=r(9451),o=r(4024),a=r(5079);t.exhaustMap=function e(t,r){return r?function(o){return o.pipe(e((function(e,o){return i.innerFrom(t(e,o)).pipe(n.map((function(t,n){return r(e,t,o,n)})))})))}:o.operate((function(e,r){var n=0,o=null,s=!1;e.subscribe(a.createOperatorSubscriber(r,(function(e){o||(o=a.createOperatorSubscriber(r,void 0,(function(){o=null,s&&r.complete()})),i.innerFrom(t(e,n++)).subscribe(o))}),(function(){s=!0,!o&&r.complete()})))}))}},7829:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.expand=void 0;var n=r(4024),i=r(7163);t.expand=function(e,t,r){return void 0===t&&(t=1/0),t=(t||0)<1?1/0:t,n.operate((function(n,o){return i.mergeInternals(n,o,e,t,void 0,!0,r)}))}},2763:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.filter=void 0;var n=r(4024),i=r(5079);t.filter=function(e,t){return n.operate((function(r,n){var o=0;r.subscribe(i.createOperatorSubscriber(n,(function(r){return e.call(t,r,o++)&&n.next(r)})))}))}},4106:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.finalize=void 0;var n=r(4024);t.finalize=function(e){return n.operate((function(t,r){try{t.subscribe(r)}finally{r.add(e)}}))}},8759:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createFind=t.find=void 0;var n=r(4024),i=r(5079);function o(e,t,r){var n="index"===r;return function(r,o){var a=0;r.subscribe(i.createOperatorSubscriber(o,(function(i){var s=a++;e.call(t,i,s,r)&&(o.next(n?s:i),o.complete())}),(function(){o.next(n?-1:void 0),o.complete()})))}}t.find=function(e,t){return n.operate(o(e,t,"value"))},t.createFind=o},3999:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findIndex=void 0;var n=r(4024),i=r(8759);t.findIndex=function(e,t){return n.operate(i.createFind(e,t,"index"))}},5194:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.first=void 0;var n=r(8032),i=r(2763),o=r(7138),a=r(1714),s=r(8062),u=r(9144);t.first=function(e,t){var r=arguments.length>=2;return function(c){return c.pipe(e?i.filter((function(t,r){return e(t,r,c)})):u.identity,o.take(1),r?a.defaultIfEmpty(t):s.throwIfEmpty((function(){return new n.EmptyError})))}}},2735:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.flatMap=void 0;var n=r(9010);t.flatMap=n.mergeMap},1664:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.groupBy=void 0;var n=r(5271),i=r(9451),o=r(9520),a=r(4024),s=r(5079);t.groupBy=function(e,t,r,u){return a.operate((function(a,c){var l;t&&"function"!=typeof t?(r=t.duration,l=t.element,u=t.connector):l=t;var f=new Map,p=function(e){f.forEach(e),e(c)},d=function(e){return p((function(t){return t.error(e)}))},h=0,y=!1,v=new s.OperatorSubscriber(c,(function(t){try{var a=e(t),p=f.get(a);if(!p){f.set(a,p=u?u():new o.Subject);var m=(g=a,_=p,(w=new n.Observable((function(e){h++;var t=_.subscribe(e);return function(){t.unsubscribe(),0==--h&&y&&v.unsubscribe()}}))).key=g,w);if(c.next(m),r){var b=s.createOperatorSubscriber(p,(function(){p.complete(),null==b||b.unsubscribe()}),void 0,void 0,(function(){return f.delete(a)}));v.add(i.innerFrom(r(m)).subscribe(b))}}p.next(l?l(t):t)}catch(e){d(e)}var g,_,w}),(function(){return p((function(e){return e.complete()}))}),d,(function(){return f.clear()}),(function(){return y=!0,0===h}));a.subscribe(v)}))}},3470:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ignoreElements=void 0;var n=r(4024),i=r(5079),o=r(5729);t.ignoreElements=function(){return n.operate((function(e,t){e.subscribe(i.createOperatorSubscriber(t,o.noop))}))}},9549:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmpty=void 0;var n=r(4024),i=r(5079);t.isEmpty=function(){return n.operate((function(e,t){e.subscribe(i.createOperatorSubscriber(t,(function(){t.next(!1),t.complete()}),(function(){t.next(!0),t.complete()})))}))}},7534:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.joinAllInternals=void 0;var n=r(9144),i=r(4666),o=r(5966),a=r(9010),s=r(2378);t.joinAllInternals=function(e,t){return o.pipe(s.toArray(),a.mergeMap((function(t){return e(t)})),t?i.mapOneOrManyArgs(t):n.identity)}},9582:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.last=void 0;var n=r(8032),i=r(2763),o=r(4288),a=r(8062),s=r(1714),u=r(9144);t.last=function(e,t){var r=arguments.length>=2;return function(c){return c.pipe(e?i.filter((function(t,r){return e(t,r,c)})):u.identity,o.takeLast(1),r?s.defaultIfEmpty(t):a.throwIfEmpty((function(){return new n.EmptyError})))}}},4338:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.map=void 0;var n=r(4024),i=r(5079);t.map=function(e,t){return n.operate((function(r,n){var o=0;r.subscribe(i.createOperatorSubscriber(n,(function(r){n.next(e.call(t,r,o++))})))}))}},4791:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mapTo=void 0;var n=r(4338);t.mapTo=function(e){return n.map((function(){return e}))}},9318:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.materialize=void 0;var n=r(3868),i=r(4024),o=r(5079);t.materialize=function(){return i.operate((function(e,t){e.subscribe(o.createOperatorSubscriber(t,(function(e){t.next(n.Notification.createNext(e))}),(function(){t.next(n.Notification.createComplete()),t.complete()}),(function(e){t.next(n.Notification.createError(e)),t.complete()})))}))}},7446:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.max=void 0;var n=r(1678),i=r(4432);t.max=function(e){return n.reduce(i.isFunction(e)?function(t,r){return e(t,r)>0?t:r}:function(e,t){return e>t?e:t})}},6094:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.merge=void 0;var o=r(4024),a=r(4475),s=r(4594),u=r(2619),c=r(6216);t.merge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=u.popScheduler(e),l=u.popNumber(e,1/0);return e=a.argsOrArgArray(e),o.operate((function(t,o){s.mergeAll(l)(c.from(i([t],n(e)),r)).subscribe(o)}))}},4594:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeAll=void 0;var n=r(9010),i=r(9144);t.mergeAll=function(e){return void 0===e&&(e=1/0),n.mergeMap(i.identity,e)}},7163:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeInternals=void 0;var n=r(9451),i=r(5421),o=r(5079);t.mergeInternals=function(e,t,r,a,s,u,c,l){var f=[],p=0,d=0,h=!1,y=function(){!h||f.length||p||t.complete()},v=function(e){return p<a?m(e):f.push(e)},m=function(e){u&&t.next(e),p++;var l=!1;n.innerFrom(r(e,d++)).subscribe(o.createOperatorSubscriber(t,(function(e){null==s||s(e),u?v(e):t.next(e)}),(function(){l=!0}),void 0,(function(){if(l)try{p--;for(var e=function(){var e=f.shift();c?i.executeSchedule(t,c,(function(){return m(e)})):m(e)};f.length&&p<a;)e();y()}catch(e){t.error(e)}})))};return e.subscribe(o.createOperatorSubscriber(t,v,(function(){h=!0,y()}))),function(){null==l||l()}}},9010:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeMap=void 0;var n=r(4338),i=r(9451),o=r(4024),a=r(7163),s=r(4432);t.mergeMap=function e(t,r,u){return void 0===u&&(u=1/0),s.isFunction(r)?e((function(e,o){return n.map((function(t,n){return r(e,t,o,n)}))(i.innerFrom(t(e,o)))}),u):("number"==typeof r&&(u=r),o.operate((function(e,r){return a.mergeInternals(e,r,t,u)})))}},8983:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeMapTo=void 0;var n=r(9010),i=r(4432);t.mergeMapTo=function(e,t,r){return void 0===r&&(r=1/0),i.isFunction(t)?n.mergeMap((function(){return e}),t,r):("number"==typeof t&&(r=t),n.mergeMap((function(){return e}),r))}},2170:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeScan=void 0;var n=r(4024),i=r(7163);t.mergeScan=function(e,t,r){return void 0===r&&(r=1/0),n.operate((function(n,o){var a=t;return i.mergeInternals(n,o,(function(t,r){return e(a,t,r)}),r,(function(e){a=e}),!1,void 0,(function(){return a=null}))}))}},3674:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.mergeWith=void 0;var o=r(6094);t.mergeWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o.merge.apply(void 0,i([],n(e)))}},1446:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.min=void 0;var n=r(1678),i=r(4432);t.min=function(e){return n.reduce(i.isFunction(e)?function(t,r){return e(t,r)<0?t:r}:function(e,t){return e<t?e:t})}},2318:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.multicast=void 0;var n=r(3739),i=r(4432),o=r(4347);t.multicast=function(e,t){var r=i.isFunction(e)?e:function(){return e};return i.isFunction(t)?o.connect(t,{connector:r}):function(e){return new n.ConnectableObservable(e,r)}}},3165:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.observeOn=void 0;var n=r(5421),i=r(4024),o=r(5079);t.observeOn=function(e,t){return void 0===t&&(t=0),i.operate((function(r,i){r.subscribe(o.createOperatorSubscriber(i,(function(r){return n.executeSchedule(i,e,(function(){return i.next(r)}),t)}),(function(){return n.executeSchedule(i,e,(function(){return i.complete()}),t)}),(function(r){return n.executeSchedule(i,e,(function(){return i.error(r)}),t)})))}))}},4764:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.onErrorResumeNext=void 0;var o=r(4024),a=r(9451),s=r(4475),u=r(5079),c=r(5729);t.onErrorResumeNext=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=s.argsOrArgArray(e);return o.operate((function(e,t){var o=i([e],n(r)),s=function(){if(!t.closed)if(o.length>0){var e=void 0;try{e=a.innerFrom(o.shift())}catch(e){return void s()}var r=u.createOperatorSubscriber(t,void 0,c.noop,c.noop);e.subscribe(r),r.add(s)}else t.complete()};s()}))}},402:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pairwise=void 0;var n=r(4024),i=r(5079);t.pairwise=function(){return n.operate((function(e,t){var r,n=!1;e.subscribe(i.createOperatorSubscriber(t,(function(e){var i=r;r=e,n&&t.next([i,e]),n=!0})))}))}},5960:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.partition=void 0;var n=r(1574),i=r(2763);t.partition=function(e,t){return function(r){return[i.filter(e,t)(r),i.filter(n.not(e,t))(r)]}}},5658:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pluck=void 0;var n=r(4338);t.pluck=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e.length;if(0===r)throw new Error("list of properties cannot be empty.");return n.map((function(t){for(var n=t,i=0;i<r;i++){var o=null==n?void 0:n[e[i]];if(void 0===o)return;n=o}return n}))}},3881:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.publish=void 0;var n=r(9520),i=r(2318),o=r(4347);t.publish=function(e){return e?function(t){return o.connect(e)(t)}:function(e){return i.multicast(new n.Subject)(e)}}},1755:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.publishBehavior=void 0;var n=r(8042),i=r(3739);t.publishBehavior=function(e){return function(t){var r=new n.BehaviorSubject(e);return new i.ConnectableObservable(t,(function(){return r}))}}},9801:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.publishLast=void 0;var n=r(7257),i=r(3739);t.publishLast=function(){return function(e){var t=new n.AsyncSubject;return new i.ConnectableObservable(e,(function(){return t}))}}},5021:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.publishReplay=void 0;var n=r(216),i=r(2318),o=r(4432);t.publishReplay=function(e,t,r,a){r&&!o.isFunction(r)&&(a=r);var s=o.isFunction(r)?r:void 0;return function(r){return i.multicast(new n.ReplaySubject(e,t,a),s)(r)}}},2749:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.race=void 0;var o=r(4475),a=r(9925);t.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return a.raceWith.apply(void 0,i([],n(o.argsOrArgArray(e))))}},9925:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.raceWith=void 0;var o=r(7779),a=r(4024),s=r(9144);t.raceWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.length?a.operate((function(t,r){o.raceInit(i([t],n(e)))(r)})):s.identity}},1678:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reduce=void 0;var n=r(2181),i=r(4024);t.reduce=function(e,t){return i.operate(n.scanInternals(e,t,arguments.length>=2,!1,!0))}},2711:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.refCount=void 0;var n=r(4024),i=r(5079);t.refCount=function(){return n.operate((function(e,t){var r=null;e._refCount++;var n=i.createOperatorSubscriber(t,void 0,void 0,void 0,(function(){if(!e||e._refCount<=0||0<--e._refCount)r=null;else{var n=e._connection,i=r;r=null,!n||i&&n!==i||n.unsubscribe(),t.unsubscribe()}}));e.subscribe(n),n.closed||(r=e.connect())}))}},1194:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.repeat=void 0;var n=r(1727),i=r(4024),o=r(5079),a=r(9451),s=r(5710);t.repeat=function(e){var t,r,u=1/0;return null!=e&&("object"==typeof e?(t=e.count,u=void 0===t?1/0:t,r=e.delay):u=e),u<=0?function(){return n.EMPTY}:i.operate((function(e,t){var n,i=0,c=function(){if(null==n||n.unsubscribe(),n=null,null!=r){var e="number"==typeof r?s.timer(r):a.innerFrom(r(i)),u=o.createOperatorSubscriber(t,(function(){u.unsubscribe(),l()}));e.subscribe(u)}else l()},l=function(){var r=!1;n=e.subscribe(o.createOperatorSubscriber(t,void 0,(function(){++i<u?n?c():r=!0:t.complete()}))),r&&c()};l()}))}},7085:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.repeatWhen=void 0;var n=r(9520),i=r(4024),o=r(5079);t.repeatWhen=function(e){return i.operate((function(t,r){var i,a,s=!1,u=!1,c=!1,l=function(){return c&&u&&(r.complete(),!0)},f=function(){c=!1,i=t.subscribe(o.createOperatorSubscriber(r,void 0,(function(){c=!0,!l()&&(a||(a=new n.Subject,e(a).subscribe(o.createOperatorSubscriber(r,(function(){i?f():s=!0}),(function(){u=!0,l()})))),a).next()}))),s&&(i.unsubscribe(),i=null,s=!1,f())};f()}))}},7524:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.retry=void 0;var n=r(4024),i=r(5079),o=r(9144),a=r(5710),s=r(9451);t.retry=function(e){var t;void 0===e&&(e=1/0);var r=(t=e&&"object"==typeof e?e:{count:e}).count,u=void 0===r?1/0:r,c=t.delay,l=t.resetOnSuccess,f=void 0!==l&&l;return u<=0?o.identity:n.operate((function(e,t){var r,n=0,o=function(){var l=!1;r=e.subscribe(i.createOperatorSubscriber(t,(function(e){f&&(n=0),t.next(e)}),void 0,(function(e){if(n++<u){var f=function(){r?(r.unsubscribe(),r=null,o()):l=!0};if(null!=c){var p="number"==typeof c?a.timer(c):s.innerFrom(c(e,n)),d=i.createOperatorSubscriber(t,(function(){d.unsubscribe(),f()}),(function(){t.complete()}));p.subscribe(d)}else f()}else t.error(e)}))),l&&(r.unsubscribe(),r=null,o())};o()}))}},548:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.retryWhen=void 0;var n=r(9520),i=r(4024),o=r(5079);t.retryWhen=function(e){return i.operate((function(t,r){var i,a,s=!1,u=function(){i=t.subscribe(o.createOperatorSubscriber(r,void 0,void 0,(function(t){a||(a=new n.Subject,e(a).subscribe(o.createOperatorSubscriber(r,(function(){return i?u():s=!0})))),a&&a.next(t)}))),s&&(i.unsubscribe(),i=null,s=!1,u())};u()}))}},6577:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sample=void 0;var n=r(4024),i=r(5729),o=r(5079);t.sample=function(e){return n.operate((function(t,r){var n=!1,a=null;t.subscribe(o.createOperatorSubscriber(r,(function(e){n=!0,a=e}))),e.subscribe(o.createOperatorSubscriber(r,(function(){if(n){n=!1;var e=a;a=null,r.next(e)}}),i.noop))}))}},3815:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sampleTime=void 0;var n=r(4617),i=r(6577),o=r(4449);t.sampleTime=function(e,t){return void 0===t&&(t=n.asyncScheduler),i.sample(o.interval(e,t))}},7250:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scan=void 0;var n=r(4024),i=r(2181);t.scan=function(e,t){return n.operate(i.scanInternals(e,t,arguments.length>=2,!0))}},2181:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scanInternals=void 0;var n=r(5079);t.scanInternals=function(e,t,r,i,o){return function(a,s){var u=r,c=t,l=0;a.subscribe(n.createOperatorSubscriber(s,(function(t){var r=l++;c=u?e(c,t,r):(u=!0,t),i&&s.next(c)}),o&&function(){u&&s.next(c),s.complete()}))}}},842:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sequenceEqual=void 0;var n=r(4024),i=r(5079);t.sequenceEqual=function(e,t){return void 0===t&&(t=function(e,t){return e===t}),n.operate((function(r,n){var o={buffer:[],complete:!1},a={buffer:[],complete:!1},s=function(e){n.next(e),n.complete()},u=function(e,r){var o=i.createOperatorSubscriber(n,(function(n){var i=r.buffer,o=r.complete;0===i.length?o?s(!1):e.buffer.push(n):!t(n,i.shift())&&s(!1)}),(function(){e.complete=!0;var t=r.complete,n=r.buffer;t&&s(0===n.length),null==o||o.unsubscribe()}));return o};r.subscribe(u(o,a)),e.subscribe(u(a,o))}))}},9728:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.share=void 0;var o=r(9451),a=r(9520),s=r(1403),u=r(4024);function c(e,t){for(var r=[],o=2;o<arguments.length;o++)r[o-2]=arguments[o];if(!0!==t){if(!1!==t){var a=new s.SafeSubscriber({next:function(){a.unsubscribe(),e()}});return t.apply(void 0,i([],n(r))).subscribe(a)}}else e()}t.share=function(e){void 0===e&&(e={});var t=e.connector,r=void 0===t?function(){return new a.Subject}:t,n=e.resetOnError,i=void 0===n||n,l=e.resetOnComplete,f=void 0===l||l,p=e.resetOnRefCountZero,d=void 0===p||p;return function(e){var t,n,a,l=0,p=!1,h=!1,y=function(){null==n||n.unsubscribe(),n=void 0},v=function(){y(),t=a=void 0,p=h=!1},m=function(){var e=t;v(),null==e||e.unsubscribe()};return u.operate((function(e,u){l++,h||p||y();var b=a=null!=a?a:r();u.add((function(){0!=--l||h||p||(n=c(m,d))})),b.subscribe(u),!t&&l>0&&(t=new s.SafeSubscriber({next:function(e){return b.next(e)},error:function(e){h=!0,y(),n=c(v,i,e),b.error(e)},complete:function(){p=!0,y(),n=c(v,f),b.complete()}}),o.innerFrom(e).subscribe(t))}))(e)}}},7768:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.shareReplay=void 0;var n=r(216),i=r(9728);t.shareReplay=function(e,t,r){var o,a,s,u,c=!1;return e&&"object"==typeof e?(o=e.bufferSize,u=void 0===o?1/0:o,a=e.windowTime,t=void 0===a?1/0:a,c=void 0!==(s=e.refCount)&&s,r=e.scheduler):u=null!=e?e:1/0,i.share({connector:function(){return new n.ReplaySubject(u,t,r)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:c})}},2445:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.single=void 0;var n=r(8032),i=r(6228),o=r(1137),a=r(4024),s=r(5079);t.single=function(e){return a.operate((function(t,r){var a,u=!1,c=!1,l=0;t.subscribe(s.createOperatorSubscriber(r,(function(n){c=!0,e&&!e(n,l++,t)||(u&&r.error(new i.SequenceError("Too many matching values")),u=!0,a=n)}),(function(){u?(r.next(a),r.complete()):r.error(c?new o.NotFoundError("No matching values"):new n.EmptyError)})))}))}},6262:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.skip=void 0;var n=r(2763);t.skip=function(e){return n.filter((function(t,r){return e<=r}))}},7397:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.skipLast=void 0;var n=r(9144),i=r(4024),o=r(5079);t.skipLast=function(e){return e<=0?n.identity:i.operate((function(t,r){var n=new Array(e),i=0;return t.subscribe(o.createOperatorSubscriber(r,(function(t){var o=i++;if(o<e)n[o]=t;else{var a=o%e,s=n[a];n[a]=t,r.next(s)}}))),function(){n=null}}))}},9900:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.skipUntil=void 0;var n=r(4024),i=r(5079),o=r(9451),a=r(5729);t.skipUntil=function(e){return n.operate((function(t,r){var n=!1,s=i.createOperatorSubscriber(r,(function(){null==s||s.unsubscribe(),n=!0}),a.noop);o.innerFrom(e).subscribe(s),t.subscribe(i.createOperatorSubscriber(r,(function(e){return n&&r.next(e)})))}))}},1620:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.skipWhile=void 0;var n=r(4024),i=r(5079);t.skipWhile=function(e){return n.operate((function(t,r){var n=!1,o=0;t.subscribe(i.createOperatorSubscriber(r,(function(t){return(n||(n=!e(t,o++)))&&r.next(t)})))}))}},3424:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.startWith=void 0;var n=r(79),i=r(2619),o=r(4024);t.startWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=i.popScheduler(e);return o.operate((function(t,i){(r?n.concat(e,t,r):n.concat(e,t)).subscribe(i)}))}},831:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.subscribeOn=void 0;var n=r(4024);t.subscribeOn=function(e,t){return void 0===t&&(t=0),n.operate((function(r,n){n.add(e.schedule((function(){return r.subscribe(n)}),t))}))}},411:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.switchAll=void 0;var n=r(7222),i=r(9144);t.switchAll=function(){return n.switchMap(i.identity)}},7222:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.switchMap=void 0;var n=r(9451),i=r(4024),o=r(5079);t.switchMap=function(e,t){return i.operate((function(r,i){var a=null,s=0,u=!1,c=function(){return u&&!a&&i.complete()};r.subscribe(o.createOperatorSubscriber(i,(function(r){null==a||a.unsubscribe();var u=0,l=s++;n.innerFrom(e(r,l)).subscribe(a=o.createOperatorSubscriber(i,(function(e){return i.next(t?t(r,e,l,u++):e)}),(function(){a=null,c()})))}),(function(){u=!0,c()})))}))}},6464:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.switchMapTo=void 0;var n=r(7222),i=r(4432);t.switchMapTo=function(e,t){return i.isFunction(t)?n.switchMap((function(){return e}),t):n.switchMap((function(){return e}))}},4434:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.switchScan=void 0;var n=r(7222),i=r(4024);t.switchScan=function(e,t){return i.operate((function(r,i){var o=t;return n.switchMap((function(t,r){return e(o,t,r)}),(function(e,t){return o=t,t}))(r).subscribe(i),function(){o=null}}))}},7138:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.take=void 0;var n=r(1727),i=r(4024),o=r(5079);t.take=function(e){return e<=0?function(){return n.EMPTY}:i.operate((function(t,r){var n=0;t.subscribe(o.createOperatorSubscriber(r,(function(t){++n<=e&&(r.next(t),e<=n&&r.complete())})))}))}},4288:function(e,t,r){"use strict";var n=this&&this.__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 e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.takeLast=void 0;var i=r(1727),o=r(4024),a=r(5079);t.takeLast=function(e){return e<=0?function(){return i.EMPTY}:o.operate((function(t,r){var i=[];t.subscribe(a.createOperatorSubscriber(r,(function(t){i.push(t),e<i.length&&i.shift()}),(function(){var e,t;try{for(var o=n(i),a=o.next();!a.done;a=o.next()){var s=a.value;r.next(s)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}r.complete()}),void 0,(function(){i=null})))}))}},7341:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.takeUntil=void 0;var n=r(4024),i=r(5079),o=r(9451),a=r(5729);t.takeUntil=function(e){return n.operate((function(t,r){o.innerFrom(e).subscribe(i.createOperatorSubscriber(r,(function(){return r.complete()}),a.noop)),!r.closed&&t.subscribe(r)}))}},653:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.takeWhile=void 0;var n=r(4024),i=r(5079);t.takeWhile=function(e,t){return void 0===t&&(t=!1),n.operate((function(r,n){var o=0;r.subscribe(i.createOperatorSubscriber(n,(function(r){var i=e(r,o++);(i||t)&&n.next(r),!i&&n.complete()})))}))}},8668:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.tap=void 0;var n=r(4432),i=r(4024),o=r(5079),a=r(9144);t.tap=function(e,t,r){var s=n.isFunction(e)||t||r?{next:e,error:t,complete:r}:e;return s?i.operate((function(e,t){var r;null===(r=s.subscribe)||void 0===r||r.call(s);var n=!0;e.subscribe(o.createOperatorSubscriber(t,(function(e){var r;null===(r=s.next)||void 0===r||r.call(s,e),t.next(e)}),(function(){var e;n=!1,null===(e=s.complete)||void 0===e||e.call(s),t.complete()}),(function(e){var r;n=!1,null===(r=s.error)||void 0===r||r.call(s,e),t.error(e)}),(function(){var e,t;n&&(null===(e=s.unsubscribe)||void 0===e||e.call(s)),null===(t=s.finalize)||void 0===t||t.call(s)})))})):a.identity}},9466:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.throttle=t.defaultThrottleConfig=void 0;var n=r(4024),i=r(5079),o=r(9451);t.defaultThrottleConfig={leading:!0,trailing:!1},t.throttle=function(e,r){return void 0===r&&(r=t.defaultThrottleConfig),n.operate((function(t,n){var a=r.leading,s=r.trailing,u=!1,c=null,l=null,f=!1,p=function(){null==l||l.unsubscribe(),l=null,s&&(y(),f&&n.complete())},d=function(){l=null,f&&n.complete()},h=function(t){return l=o.innerFrom(e(t)).subscribe(i.createOperatorSubscriber(n,p,d))},y=function(){if(u){u=!1;var e=c;c=null,n.next(e),!f&&h(e)}};t.subscribe(i.createOperatorSubscriber(n,(function(e){u=!0,c=e,(!l||l.closed)&&(a?y():h(e))}),(function(){f=!0,(!(s&&u&&l)||l.closed)&&n.complete()})))}))}},9705:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.throttleTime=void 0;var n=r(4617),i=r(9466),o=r(5710);t.throttleTime=function(e,t,r){void 0===t&&(t=n.asyncScheduler),void 0===r&&(r=i.defaultThrottleConfig);var a=o.timer(e,t);return i.throttle((function(){return a}),r)}},8062:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.throwIfEmpty=void 0;var n=r(8032),i=r(4024),o=r(5079);function a(){return new n.EmptyError}t.throwIfEmpty=function(e){return void 0===e&&(e=a),i.operate((function(t,r){var n=!1;t.subscribe(o.createOperatorSubscriber(r,(function(e){n=!0,r.next(e)}),(function(){return n?r.complete():r.error(e())})))}))}},6610:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TimeInterval=t.timeInterval=void 0;var n=r(4617),i=r(4024),o=r(5079);t.timeInterval=function(e){return void 0===e&&(e=n.asyncScheduler),i.operate((function(t,r){var n=e.now();t.subscribe(o.createOperatorSubscriber(r,(function(t){var i=e.now(),o=i-n;n=i,r.next(new a(t,o))})))}))};var a=function(e,t){this.value=e,this.interval=t};t.TimeInterval=a},6279:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.timeout=t.TimeoutError=void 0;var n=r(4617),i=r(7761),o=r(4024),a=r(9451),s=r(9876),u=r(5079),c=r(5421);function l(e){throw new t.TimeoutError(e)}t.TimeoutError=s.createErrorClass((function(e){return function(t){void 0===t&&(t=null),e(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=t}})),t.timeout=function(e,t){var r=i.isValidDate(e)?{first:e}:"number"==typeof e?{each:e}:e,s=r.first,f=r.each,p=r.with,d=void 0===p?l:p,h=r.scheduler,y=void 0===h?null!=t?t:n.asyncScheduler:h,v=r.meta,m=void 0===v?null:v;if(null==s&&null==f)throw new TypeError("No timeout provided.");return o.operate((function(e,t){var r,n,i=null,o=0,l=function(e){n=c.executeSchedule(t,y,(function(){try{r.unsubscribe(),a.innerFrom(d({meta:m,lastValue:i,seen:o})).subscribe(t)}catch(e){t.error(e)}}),e)};r=e.subscribe(u.createOperatorSubscriber(t,(function(e){null==n||n.unsubscribe(),o++,t.next(i=e),f>0&&l(f)}),void 0,void 0,(function(){(null==n?void 0:n.closed)||null==n||n.unsubscribe(),i=null}))),!o&&l(null!=s?"number"==typeof s?s:+s-y.now():f)}))}},8132:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.timeoutWith=void 0;var n=r(4617),i=r(7761),o=r(6279);t.timeoutWith=function(e,t,r){var a,s,u;if(r=null!=r?r:n.async,i.isValidDate(e)?a=e:"number"==typeof e&&(s=e),!t)throw new TypeError("No observable provided to switch to");if(u=function(){return t},null==a&&null==s)throw new TypeError("No timeout provided.");return o.timeout({first:a,each:s,scheduler:r,with:u})}},4553:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.timestamp=void 0;var n=r(1713),i=r(4338);t.timestamp=function(e){return void 0===e&&(e=n.dateTimestampProvider),i.map((function(t){return{value:t,timestamp:e.now()}}))}},2378:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toArray=void 0;var n=r(1678),i=r(4024),o=function(e,t){return e.push(t),e};t.toArray=function(){return i.operate((function(e,t){n.reduce(o,[])(e).subscribe(t)}))}},4768:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.window=void 0;var n=r(9520),i=r(4024),o=r(5079),a=r(5729);t.window=function(e){return i.operate((function(t,r){var i=new n.Subject;r.next(i.asObservable());var s=function(e){i.error(e),r.error(e)};return t.subscribe(o.createOperatorSubscriber(r,(function(e){return null==i?void 0:i.next(e)}),(function(){i.complete(),r.complete()}),s)),e.subscribe(o.createOperatorSubscriber(r,(function(){i.complete(),r.next(i=new n.Subject)}),a.noop,s)),function(){null==i||i.unsubscribe(),i=null}}))}},131:function(e,t,r){"use strict";var n=this&&this.__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 e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.windowCount=void 0;var i=r(9520),o=r(4024),a=r(5079);t.windowCount=function(e,t){void 0===t&&(t=0);var r=t>0?t:e;return o.operate((function(t,o){var s=[new i.Subject],u=0;o.next(s[0].asObservable()),t.subscribe(a.createOperatorSubscriber(o,(function(t){var a,c;try{for(var l=n(s),f=l.next();!f.done;f=l.next())f.value.next(t)}catch(e){a={error:e}}finally{try{f&&!f.done&&(c=l.return)&&c.call(l)}finally{if(a)throw a.error}}var p=u-e+1;if(p>=0&&p%r==0&&s.shift().complete(),++u%r==0){var d=new i.Subject;s.push(d),o.next(d.asObservable())}}),(function(){for(;s.length>0;)s.shift().complete();o.complete()}),(function(e){for(;s.length>0;)s.shift().error(e);o.error(e)}),(function(){s=null})))}))}},9579:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.windowTime=void 0;var n=r(9520),i=r(4617),o=r(7215),a=r(4024),s=r(5079),u=r(2447),c=r(2619),l=r(5421);t.windowTime=function(e){for(var t,r,f=[],p=1;p<arguments.length;p++)f[p-1]=arguments[p];var d=null!==(t=c.popScheduler(f))&&void 0!==t?t:i.asyncScheduler,h=null!==(r=f[0])&&void 0!==r?r:null,y=f[1]||1/0;return a.operate((function(t,r){var i=[],a=!1,c=function(e){var t=e.window,r=e.subs;t.complete(),r.unsubscribe(),u.arrRemove(i,e),a&&f()},f=function(){if(i){var t=new o.Subscription;r.add(t);var a=new n.Subject,s={window:a,subs:t,seen:0};i.push(s),r.next(a.asObservable()),l.executeSchedule(t,d,(function(){return c(s)}),e)}};null!==h&&h>=0?l.executeSchedule(r,d,f,h,!0):a=!0,f();var p=function(e){return i.slice().forEach(e)},v=function(e){p((function(t){var r=t.window;return e(r)})),e(r),r.unsubscribe()};return t.subscribe(s.createOperatorSubscriber(r,(function(e){p((function(t){t.window.next(e),y<=++t.seen&&c(t)}))}),(function(){return v((function(e){return e.complete()}))}),(function(e){return v((function(t){return t.error(e)}))}))),function(){i=null}}))}},752:function(e,t,r){"use strict";var n=this&&this.__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 e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.windowToggle=void 0;var i=r(9520),o=r(7215),a=r(4024),s=r(9451),u=r(5079),c=r(5729),l=r(2447);t.windowToggle=function(e,t){return a.operate((function(r,a){var f=[],p=function(e){for(;0<f.length;)f.shift().error(e);a.error(e)};s.innerFrom(e).subscribe(u.createOperatorSubscriber(a,(function(e){var r=new i.Subject;f.push(r);var n,d=new o.Subscription;try{n=s.innerFrom(t(e))}catch(e){return void p(e)}a.next(r.asObservable()),d.add(n.subscribe(u.createOperatorSubscriber(a,(function(){l.arrRemove(f,r),r.complete(),d.unsubscribe()}),c.noop,p)))}),c.noop)),r.subscribe(u.createOperatorSubscriber(a,(function(e){var t,r,i=f.slice();try{for(var o=n(i),a=o.next();!a.done;a=o.next())a.value.next(e)}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}}),(function(){for(;0<f.length;)f.shift().complete();a.complete()}),p,(function(){for(;0<f.length;)f.shift().unsubscribe()})))}))}},582:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.windowWhen=void 0;var n=r(9520),i=r(4024),o=r(5079),a=r(9451);t.windowWhen=function(e){return i.operate((function(t,r){var i,s,u=function(e){i.error(e),r.error(e)},c=function(){var t;null==s||s.unsubscribe(),null==i||i.complete(),i=new n.Subject,r.next(i.asObservable());try{t=a.innerFrom(e())}catch(e){return void u(e)}t.subscribe(s=o.createOperatorSubscriber(r,c,c,u))};c(),t.subscribe(o.createOperatorSubscriber(r,(function(e){return i.next(e)}),(function(){i.complete(),r.complete()}),u,(function(){null==s||s.unsubscribe(),i=null})))}))}},4255:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.withLatestFrom=void 0;var o=r(4024),a=r(5079),s=r(9451),u=r(9144),c=r(5729),l=r(2619);t.withLatestFrom=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=l.popResultSelector(e);return o.operate((function(t,o){for(var l=e.length,f=new Array(l),p=e.map((function(){return!1})),d=!1,h=function(t){s.innerFrom(e[t]).subscribe(a.createOperatorSubscriber(o,(function(e){f[t]=e,d||p[t]||(p[t]=!0,(d=p.every(u.identity))&&(p=null))}),c.noop))},y=0;y<l;y++)h(y);t.subscribe(a.createOperatorSubscriber(o,(function(e){if(d){var t=i([e],n(f));o.next(r?r.apply(void 0,i([],n(t))):t)}})))}))}},3253:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.zip=void 0;var o=r(2042),a=r(4024);t.zip=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return a.operate((function(t,r){o.zip.apply(void 0,i([t],n(e))).subscribe(r)}))}},7220:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.zipAll=void 0;var n=r(2042),i=r(7534);t.zipAll=function(e){return i.joinAllInternals(n.zip,e)}},9287:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.zipWith=void 0;var o=r(3253);t.zipWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o.zip.apply(void 0,i([],n(e)))}},3584:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleArray=void 0;var n=r(5271);t.scheduleArray=function(e,t){return new n.Observable((function(r){var n=0;return t.schedule((function(){n===e.length?r.complete():(r.next(e[n++]),r.closed||this.schedule())}))}))}},1659:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleAsyncIterable=void 0;var n=r(5271),i=r(5421);t.scheduleAsyncIterable=function(e,t){if(!e)throw new Error("Iterable cannot be null");return new n.Observable((function(r){i.executeSchedule(r,t,(function(){var n=e[Symbol.asyncIterator]();i.executeSchedule(r,t,(function(){n.next().then((function(e){e.done?r.complete():r.next(e.value)}))}),0,!0)}))}))}},8840:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleIterable=void 0;var n=r(5271),i=r(5686),o=r(4432),a=r(5421);t.scheduleIterable=function(e,t){return new n.Observable((function(r){var n;return a.executeSchedule(r,t,(function(){n=e[i.iterator](),a.executeSchedule(r,t,(function(){var e,t,i;try{t=(e=n.next()).value,i=e.done}catch(e){return void r.error(e)}i?r.complete():r.next(t)}),0,!0)})),function(){return o.isFunction(null==n?void 0:n.return)&&n.return()}}))}},5704:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleObservable=void 0;var n=r(9451),i=r(3165),o=r(831);t.scheduleObservable=function(e,t){return n.innerFrom(e).pipe(o.subscribeOn(t),i.observeOn(t))}},4644:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.schedulePromise=void 0;var n=r(9451),i=r(3165),o=r(831);t.schedulePromise=function(e,t){return n.innerFrom(e).pipe(o.subscribeOn(t),i.observeOn(t))}},3035:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleReadableStreamLike=void 0;var n=r(1659),i=r(9266);t.scheduleReadableStreamLike=function(e,t){return n.scheduleAsyncIterable(i.readableStreamLikeToAsyncGenerator(e),t)}},3200:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scheduled=void 0;var n=r(5704),i=r(4644),o=r(3584),a=r(8840),s=r(1659),u=r(3292),c=r(2644),l=r(8219),f=r(6380),p=r(7707),d=r(4883),h=r(9266),y=r(3035);t.scheduled=function(e,t){if(null!=e){if(u.isInteropObservable(e))return n.scheduleObservable(e,t);if(l.isArrayLike(e))return o.scheduleArray(e,t);if(c.isPromise(e))return i.schedulePromise(e,t);if(p.isAsyncIterable(e))return s.scheduleAsyncIterable(e,t);if(f.isIterable(e))return a.scheduleIterable(e,t);if(h.isReadableStreamLike(e))return y.scheduleReadableStreamLike(e,t)}throw d.createInvalidObservableTypeError(e)}},4756:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=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])},n(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}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.Action=void 0;var o=function(e){function t(t,r){return e.call(this)||this}return i(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(r(7215).Subscription);t.Action=o},5364:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=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])},n(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}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AnimationFrameAction=void 0;var o=r(1172),a=r(6741),s=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n}return i(t,e),t.prototype.requestAsyncId=function(t,r,n){return void 0===n&&(n=0),null!==n&&n>0?e.prototype.requestAsyncId.call(this,t,r,n):(t.actions.push(this),t._scheduled||(t._scheduled=a.animationFrameProvider.requestAnimationFrame((function(){return t.flush(void 0)}))))},t.prototype.recycleAsyncId=function(t,r,n){var i;if(void 0===n&&(n=0),null!=n?n>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,t,r,n);var o=t.actions;null!=r&&(null===(i=o[o.length-1])||void 0===i?void 0:i.id)!==r&&(a.animationFrameProvider.cancelAnimationFrame(r),t._scheduled=void 0)},t}(o.AsyncAction);t.AnimationFrameAction=s},1834:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=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])},n(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}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AnimationFrameScheduler=void 0;var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.flush=function(e){this._active=!0;var t=this._scheduled;this._scheduled=void 0;var r,n=this.actions;e=e||n.shift();do{if(r=e.execute(e.state,e.delay))break}while((e=n[0])&&e.id===t&&n.shift());if(this._active=!1,r){for(;(e=n[0])&&e.id===t&&n.shift();)e.unsubscribe();throw r}},t}(r(6759).AsyncScheduler);t.AnimationFrameScheduler=o},3761:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=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])},n(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}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsapAction=void 0;var o=r(1172),a=r(6703),s=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n}return i(t,e),t.prototype.requestAsyncId=function(t,r,n){return void 0===n&&(n=0),null!==n&&n>0?e.prototype.requestAsyncId.call(this,t,r,n):(t.actions.push(this),t._scheduled||(t._scheduled=a.immediateProvider.setImmediate(t.flush.bind(t,void 0))))},t.prototype.recycleAsyncId=function(t,r,n){var i;if(void 0===n&&(n=0),null!=n?n>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,t,r,n);var o=t.actions;null!=r&&(null===(i=o[o.length-1])||void 0===i?void 0:i.id)!==r&&(a.immediateProvider.clearImmediate(r),t._scheduled=void 0)},t}(o.AsyncAction);t.AsapAction=s},1386:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=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])},n(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}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsapScheduler=void 0;var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.flush=function(e){this._active=!0;var t=this._scheduled;this._scheduled=void 0;var r,n=this.actions;e=e||n.shift();do{if(r=e.execute(e.state,e.delay))break}while((e=n[0])&&e.id===t&&n.shift());if(this._active=!1,r){for(;(e=n[0])&&e.id===t&&n.shift();)e.unsubscribe();throw r}},t}(r(6759).AsyncScheduler);t.AsapScheduler=o},1172:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=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])},n(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}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncAction=void 0;var o=r(4756),a=r(9678),s=r(2447),u=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n.pending=!1,n}return i(t,e),t.prototype.schedule=function(e,t){var r;if(void 0===t&&(t=0),this.closed)return this;this.state=e;var n=this.id,i=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(i,n,t)),this.pending=!0,this.delay=t,this.id=null!==(r=this.id)&&void 0!==r?r:this.requestAsyncId(i,this.id,t),this},t.prototype.requestAsyncId=function(e,t,r){return void 0===r&&(r=0),a.intervalProvider.setInterval(e.flush.bind(e,this),r)},t.prototype.recycleAsyncId=function(e,t,r){if(void 0===r&&(r=0),null!=r&&this.delay===r&&!1===this.pending)return t;null!=t&&a.intervalProvider.clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var r=this._execute(e,t);if(r)return r;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.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},t.prototype.unsubscribe=function(){if(!this.closed){var t=this.id,r=this.scheduler,n=r.actions;this.work=this.state=this.scheduler=null,this.pending=!1,s.arrRemove(n,this),null!=t&&(this.id=this.recycleAsyncId(r,t,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(o.Action);t.AsyncAction=u},6759:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=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])},n(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}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncScheduler=void 0;var o=r(3980),a=function(e){function t(t,r){void 0===r&&(r=o.Scheduler.now);var n=e.call(this,t,r)||this;return n.actions=[],n._active=!1,n}return i(t,e),t.prototype.flush=function(e){var t=this.actions;if(this._active)t.push(e);else{var r;this._active=!0;do{if(r=e.execute(e.state,e.delay))break}while(e=t.shift());if(this._active=!1,r){for(;e=t.shift();)e.unsubscribe();throw r}}},t}(o.Scheduler);t.AsyncScheduler=a},6354:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=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])},n(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}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.QueueAction=void 0;var o=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n}return i(t,e),t.prototype.schedule=function(t,r){return void 0===r&&(r=0),r>0?e.prototype.schedule.call(this,t,r):(this.delay=r,this.state=t,this.scheduler.flush(this),this)},t.prototype.execute=function(t,r){return r>0||this.closed?e.prototype.execute.call(this,t,r):this._execute(t,r)},t.prototype.requestAsyncId=function(t,r,n){return void 0===n&&(n=0),null!=n&&n>0||null==n&&this.delay>0?e.prototype.requestAsyncId.call(this,t,r,n):(t.flush(this),0)},t}(r(1172).AsyncAction);t.QueueAction=o},3144:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=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])},n(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}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.QueueScheduler=void 0;var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t}(r(6759).AsyncScheduler);t.QueueScheduler=o},8847:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=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])},n(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}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.VirtualAction=t.VirtualTimeScheduler=void 0;var o=r(1172),a=r(7215),s=function(e){function t(t,r){void 0===t&&(t=u),void 0===r&&(r=1/0);var n=e.call(this,t,(function(){return n.frame}))||this;return n.maxFrames=r,n.frame=0,n.index=-1,n}return i(t,e),t.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}},t.frameTimeFactor=10,t}(r(6759).AsyncScheduler);t.VirtualTimeScheduler=s;var u=function(e){function t(t,r,n){void 0===n&&(n=t.index+=1);var i=e.call(this,t,r)||this;return i.scheduler=t,i.work=r,i.index=n,i.active=!0,i.index=t.index=n,i}return i(t,e),t.prototype.schedule=function(r,n){if(void 0===n&&(n=0),Number.isFinite(n)){if(!this.id)return e.prototype.schedule.call(this,r,n);this.active=!1;var i=new t(this.scheduler,this.work);return this.add(i),i.schedule(r,n)}return a.Subscription.EMPTY},t.prototype.requestAsyncId=function(e,r,n){void 0===n&&(n=0),this.delay=e.frame+n;var i=e.actions;return i.push(this),i.sort(t.sortActions),1},t.prototype.recycleAsyncId=function(e,t,r){void 0===r&&(r=0)},t.prototype._execute=function(t,r){if(!0===this.active)return e.prototype._execute.call(this,t,r)},t.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},t}(o.AsyncAction);t.VirtualAction=u},6192:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.animationFrame=t.animationFrameScheduler=void 0;var n=r(5364),i=r(1834);t.animationFrameScheduler=new i.AnimationFrameScheduler(n.AnimationFrameAction),t.animationFrame=t.animationFrameScheduler},6741:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.animationFrameProvider=void 0;var o=r(7215);t.animationFrameProvider={schedule:function(e){var r=requestAnimationFrame,n=cancelAnimationFrame,i=t.animationFrameProvider.delegate;i&&(r=i.requestAnimationFrame,n=i.cancelAnimationFrame);var a=r((function(t){n=void 0,e(t)}));return new o.Subscription((function(){return null==n?void 0:n(a)}))},requestAnimationFrame:function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var o=t.animationFrameProvider.delegate;return((null==o?void 0:o.requestAnimationFrame)||requestAnimationFrame).apply(void 0,i([],n(e)))},cancelAnimationFrame:function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var o=t.animationFrameProvider.delegate;return((null==o?void 0:o.cancelAnimationFrame)||cancelAnimationFrame).apply(void 0,i([],n(e)))},delegate:void 0}},4502:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.asap=t.asapScheduler=void 0;var n=r(3761),i=r(1386);t.asapScheduler=new i.AsapScheduler(n.AsapAction),t.asap=t.asapScheduler},4617:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.async=t.asyncScheduler=void 0;var n=r(1172),i=r(6759);t.asyncScheduler=new i.AsyncScheduler(n.AsyncAction),t.async=t.asyncScheduler},1713:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dateTimestampProvider=void 0,t.dateTimestampProvider={now:function(){return(t.dateTimestampProvider.delegate||Date).now()},delegate:void 0}},6703:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.immediateProvider=void 0;var o=r(2534),a=o.Immediate.setImmediate,s=o.Immediate.clearImmediate;t.immediateProvider={setImmediate:function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var o=t.immediateProvider.delegate;return((null==o?void 0:o.setImmediate)||a).apply(void 0,i([],n(e)))},clearImmediate:function(e){var r=t.immediateProvider.delegate;return((null==r?void 0:r.clearImmediate)||s)(e)},delegate:void 0}},9678:function(e,t){"use strict";var r=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},n=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.intervalProvider=void 0,t.intervalProvider={setInterval:function(e,i){for(var o=[],a=2;a<arguments.length;a++)o[a-2]=arguments[a];var s=t.intervalProvider.delegate;return(null==s?void 0:s.setInterval)?s.setInterval.apply(s,n([e,i],r(o))):setInterval.apply(void 0,n([e,i],r(o)))},clearInterval:function(e){var r=t.intervalProvider.delegate;return((null==r?void 0:r.clearInterval)||clearInterval)(e)},delegate:void 0}},1241:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.performanceTimestampProvider=void 0,t.performanceTimestampProvider={now:function(){return(t.performanceTimestampProvider.delegate||performance).now()},delegate:void 0}},8344:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.queue=t.queueScheduler=void 0;var n=r(6354),i=r(3144);t.queueScheduler=new i.QueueScheduler(n.QueueAction),t.queue=t.queueScheduler},8972:function(e,t){"use strict";var r=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},n=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.timeoutProvider=void 0,t.timeoutProvider={setTimeout:function(e,i){for(var o=[],a=2;a<arguments.length;a++)o[a-2]=arguments[a];var s=t.timeoutProvider.delegate;return(null==s?void 0:s.setTimeout)?s.setTimeout.apply(s,n([e,i],r(o))):setTimeout.apply(void 0,n([e,i],r(o)))},clearTimeout:function(e){var r=t.timeoutProvider.delegate;return((null==r?void 0:r.clearTimeout)||clearTimeout)(e)},delegate:void 0}},5686:(e,t)=>{"use strict";function r(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}Object.defineProperty(t,"__esModule",{value:!0}),t.iterator=t.getSymbolIterator=void 0,t.getSymbolIterator=r,t.iterator=r()},2138:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.observable=void 0,t.observable="function"==typeof Symbol&&Symbol.observable||"@@observable"},9251:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},6809:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArgumentOutOfRangeError=void 0;var n=r(9876);t.ArgumentOutOfRangeError=n.createErrorClass((function(e){return function(){e(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}}))},8032:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmptyError=void 0;var n=r(9876);t.EmptyError=n.createErrorClass((function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}}))},2534:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TestTools=t.Immediate=void 0;var r,n=1,i={};function o(e){return e in i&&(delete i[e],!0)}t.Immediate={setImmediate:function(e){var t=n++;return i[t]=!0,r||(r=Promise.resolve()),r.then((function(){return o(t)&&e()})),t},clearImmediate:function(e){o(e)}},t.TestTools={pending:function(){return Object.keys(i).length}}},1137:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NotFoundError=void 0;var n=r(9876);t.NotFoundError=n.createErrorClass((function(e){return function(t){e(this),this.name="NotFoundError",this.message=t}}))},7392:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectUnsubscribedError=void 0;var n=r(9876);t.ObjectUnsubscribedError=n.createErrorClass((function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}))},6228:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SequenceError=void 0;var n=r(9876);t.SequenceError=n.createErrorClass((function(e){return function(t){e(this),this.name="SequenceError",this.message=t}}))},5463:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UnsubscriptionError=void 0;var n=r(9876);t.UnsubscriptionError=n.createErrorClass((function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(e,t){return t+1+") "+e.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t}}))},2619:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.popNumber=t.popScheduler=t.popResultSelector=void 0;var n=r(4432),i=r(6551);function o(e){return e[e.length-1]}t.popResultSelector=function(e){return n.isFunction(o(e))?e.pop():void 0},t.popScheduler=function(e){return i.isScheduler(o(e))?e.pop():void 0},t.popNumber=function(e,t){return"number"==typeof o(e)?e.pop():t}},4744:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.argsArgArrayOrObject=void 0;var r=Array.isArray,n=Object.getPrototypeOf,i=Object.prototype,o=Object.keys;t.argsArgArrayOrObject=function(e){if(1===e.length){var t=e[0];if(r(t))return{args:t,keys:null};if((s=t)&&"object"==typeof s&&n(s)===i){var a=o(t);return{args:a.map((function(e){return t[e]})),keys:a}}}var s;return{args:e,keys:null}}},4475:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.argsOrArgArray=void 0;var r=Array.isArray;t.argsOrArgArray=function(e){return 1===e.length&&r(e[0])?e[0]:e}},2447:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.arrRemove=void 0,t.arrRemove=function(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}},9876:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createErrorClass=void 0,t.createErrorClass=function(e){var t=e((function(e){Error.call(e),e.stack=(new Error).stack}));return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}},1589:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createObject=void 0,t.createObject=function(e,t){return e.reduce((function(e,r,n){return e[r]=t[n],e}),{})}},4770:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.captureError=t.errorContext=void 0;var n=r(3782),i=null;t.errorContext=function(e){if(n.config.useDeprecatedSynchronousErrorHandling){var t=!i;if(t&&(i={errorThrown:!1,error:null}),e(),t){var r=i,o=r.errorThrown,a=r.error;if(i=null,o)throw a}}else e()},t.captureError=function(e){n.config.useDeprecatedSynchronousErrorHandling&&i&&(i.errorThrown=!0,i.error=e)}},5421:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.executeSchedule=void 0,t.executeSchedule=function(e,t,r,n,i){void 0===n&&(n=0),void 0===i&&(i=!1);var o=t.schedule((function(){r(),i?e.add(this.schedule(null,n)):this.unsubscribe()}),n);if(e.add(o),!i)return o}},9144:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.identity=void 0,t.identity=function(e){return e}},8219:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isArrayLike=void 0,t.isArrayLike=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e}},7707:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isAsyncIterable=void 0;var n=r(4432);t.isAsyncIterable=function(e){return Symbol.asyncIterator&&n.isFunction(null==e?void 0:e[Symbol.asyncIterator])}},7761:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isValidDate=void 0,t.isValidDate=function(e){return e instanceof Date&&!isNaN(e)}},4432:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isFunction=void 0,t.isFunction=function(e){return"function"==typeof e}},3292:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isInteropObservable=void 0;var n=r(2138),i=r(4432);t.isInteropObservable=function(e){return i.isFunction(e[n.observable])}},6380:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isIterable=void 0;var n=r(5686),i=r(4432);t.isIterable=function(e){return i.isFunction(null==e?void 0:e[n.iterator])}},1211:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isObservable=void 0;var n=r(5271),i=r(4432);t.isObservable=function(e){return!!e&&(e instanceof n.Observable||i.isFunction(e.lift)&&i.isFunction(e.subscribe))}},2644:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isPromise=void 0;var n=r(4432);t.isPromise=function(e){return n.isFunction(null==e?void 0:e.then)}},9266:function(e,t,r){"use strict";var n=this&&this.__generator||function(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,n=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},i=this&&this.__await||function(e){return this instanceof i?(this.v=e,this):new i(e)},o=this&&this.__asyncGenerator||function(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,o=r.apply(e,t||[]),a=[];return n={},s("next"),s("throw"),s("return"),n[Symbol.asyncIterator]=function(){return this},n;function s(e){o[e]&&(n[e]=function(t){return new Promise((function(r,n){a.push([e,t,r,n])>1||u(e,t)}))})}function u(e,t){try{(r=o[e](t)).value instanceof i?Promise.resolve(r.value.v).then(c,l):f(a[0][2],r)}catch(e){f(a[0][3],e)}var r}function c(e){u("next",e)}function l(e){u("throw",e)}function f(e,t){e(t),a.shift(),a.length&&u(a[0][0],a[0][1])}};Object.defineProperty(t,"__esModule",{value:!0}),t.isReadableStreamLike=t.readableStreamLikeToAsyncGenerator=void 0;var a=r(4432);t.readableStreamLikeToAsyncGenerator=function(e){return o(this,arguments,(function(){var t,r,o;return n(this,(function(n){switch(n.label){case 0:t=e.getReader(),n.label=1;case 1:n.trys.push([1,,9,10]),n.label=2;case 2:return[4,i(t.read())];case 3:return r=n.sent(),o=r.value,r.done?[4,i(void 0)]:[3,5];case 4:return[2,n.sent()];case 5:return[4,i(o)];case 6:return[4,n.sent()];case 7:return n.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}}))}))},t.isReadableStreamLike=function(e){return a.isFunction(null==e?void 0:e.getReader)}},6551:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isScheduler=void 0;var n=r(4432);t.isScheduler=function(e){return e&&n.isFunction(e.schedule)}},4024:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.operate=t.hasLift=void 0;var n=r(4432);function i(e){return n.isFunction(null==e?void 0:e.lift)}t.hasLift=i,t.operate=function(e){return function(t){if(i(t))return t.lift((function(t){try{return e(t,this)}catch(e){this.error(e)}}));throw new TypeError("Unable to lift unknown Observable type")}}},4666:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.mapOneOrManyArgs=void 0;var o=r(4338),a=Array.isArray;t.mapOneOrManyArgs=function(e){return o.map((function(t){return function(e,t){return a(t)?e.apply(void 0,i([],n(t))):e(t)}(e,t)}))}},5729:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.noop=void 0,t.noop=function(){}},1574:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.not=void 0,t.not=function(e,t){return function(r,n){return!e.call(t,r,n)}}},5966:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pipeFromArray=t.pipe=void 0;var n=r(9144);function i(e){return 0===e.length?n.identity:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)}}t.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return i(e)},t.pipeFromArray=i},7234:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reportUnhandledError=void 0;var n=r(3782),i=r(8972);t.reportUnhandledError=function(e){i.timeoutProvider.setTimeout((function(){var t=n.config.onUnhandledError;if(!t)throw e;t(e)}))}},4883:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createInvalidObservableTypeError=void 0,t.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.")}},9978:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeAll=t.merge=t.max=t.materialize=t.mapTo=t.map=t.last=t.isEmpty=t.ignoreElements=t.groupBy=t.first=t.findIndex=t.find=t.finalize=t.filter=t.expand=t.exhaustMap=t.exhaustAll=t.exhaust=t.every=t.endWith=t.elementAt=t.distinctUntilKeyChanged=t.distinctUntilChanged=t.distinct=t.dematerialize=t.delayWhen=t.delay=t.defaultIfEmpty=t.debounceTime=t.debounce=t.count=t.connect=t.concatWith=t.concatMapTo=t.concatMap=t.concatAll=t.concat=t.combineLatestWith=t.combineLatest=t.combineLatestAll=t.combineAll=t.catchError=t.bufferWhen=t.bufferToggle=t.bufferTime=t.bufferCount=t.buffer=t.auditTime=t.audit=void 0,t.timeInterval=t.throwIfEmpty=t.throttleTime=t.throttle=t.tap=t.takeWhile=t.takeUntil=t.takeLast=t.take=t.switchScan=t.switchMapTo=t.switchMap=t.switchAll=t.subscribeOn=t.startWith=t.skipWhile=t.skipUntil=t.skipLast=t.skip=t.single=t.shareReplay=t.share=t.sequenceEqual=t.scan=t.sampleTime=t.sample=t.refCount=t.retryWhen=t.retry=t.repeatWhen=t.repeat=t.reduce=t.raceWith=t.race=t.publishReplay=t.publishLast=t.publishBehavior=t.publish=t.pluck=t.partition=t.pairwise=t.onErrorResumeNext=t.observeOn=t.multicast=t.min=t.mergeWith=t.mergeScan=t.mergeMapTo=t.mergeMap=t.flatMap=void 0,t.zipWith=t.zipAll=t.zip=t.withLatestFrom=t.windowWhen=t.windowToggle=t.windowTime=t.windowCount=t.window=t.toArray=t.timestamp=t.timeoutWith=t.timeout=void 0;var n=r(3533);Object.defineProperty(t,"audit",{enumerable:!0,get:function(){return n.audit}});var i=r(5188);Object.defineProperty(t,"auditTime",{enumerable:!0,get:function(){return i.auditTime}});var o=r(4514);Object.defineProperty(t,"buffer",{enumerable:!0,get:function(){return o.buffer}});var a=r(2537);Object.defineProperty(t,"bufferCount",{enumerable:!0,get:function(){return a.bufferCount}});var s=r(8720);Object.defineProperty(t,"bufferTime",{enumerable:!0,get:function(){return s.bufferTime}});var u=r(7932);Object.defineProperty(t,"bufferToggle",{enumerable:!0,get:function(){return u.bufferToggle}});var c=r(1445);Object.defineProperty(t,"bufferWhen",{enumerable:!0,get:function(){return c.bufferWhen}});var l=r(4418);Object.defineProperty(t,"catchError",{enumerable:!0,get:function(){return l.catchError}});var f=r(4163);Object.defineProperty(t,"combineAll",{enumerable:!0,get:function(){return f.combineAll}});var p=r(9893);Object.defineProperty(t,"combineLatestAll",{enumerable:!0,get:function(){return p.combineLatestAll}});var d=r(8169);Object.defineProperty(t,"combineLatest",{enumerable:!0,get:function(){return d.combineLatest}});var h=r(7230);Object.defineProperty(t,"combineLatestWith",{enumerable:!0,get:function(){return h.combineLatestWith}});var y=r(4098);Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return y.concat}});var v=r(4554);Object.defineProperty(t,"concatAll",{enumerable:!0,get:function(){return v.concatAll}});var m=r(1048);Object.defineProperty(t,"concatMap",{enumerable:!0,get:function(){return m.concatMap}});var b=r(381);Object.defineProperty(t,"concatMapTo",{enumerable:!0,get:function(){return b.concatMapTo}});var g=r(4724);Object.defineProperty(t,"concatWith",{enumerable:!0,get:function(){return g.concatWith}});var _=r(4347);Object.defineProperty(t,"connect",{enumerable:!0,get:function(){return _.connect}});var w=r(6944);Object.defineProperty(t,"count",{enumerable:!0,get:function(){return w.count}});var O=r(440);Object.defineProperty(t,"debounce",{enumerable:!0,get:function(){return O.debounce}});var S=r(8157);Object.defineProperty(t,"debounceTime",{enumerable:!0,get:function(){return S.debounceTime}});var E=r(1714);Object.defineProperty(t,"defaultIfEmpty",{enumerable:!0,get:function(){return E.defaultIfEmpty}});var T=r(1030);Object.defineProperty(t,"delay",{enumerable:!0,get:function(){return T.delay}});var j=r(6405);Object.defineProperty(t,"delayWhen",{enumerable:!0,get:function(){return j.delayWhen}});var P=r(9142);Object.defineProperty(t,"dematerialize",{enumerable:!0,get:function(){return P.dematerialize}});var I=r(2307);Object.defineProperty(t,"distinct",{enumerable:!0,get:function(){return I.distinct}});var x=r(9131);Object.defineProperty(t,"distinctUntilChanged",{enumerable:!0,get:function(){return x.distinctUntilChanged}});var A=r(6659);Object.defineProperty(t,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return A.distinctUntilKeyChanged}});var N=r(4217);Object.defineProperty(t,"elementAt",{enumerable:!0,get:function(){return N.elementAt}});var k=r(4707);Object.defineProperty(t,"endWith",{enumerable:!0,get:function(){return k.endWith}});var M=r(9276);Object.defineProperty(t,"every",{enumerable:!0,get:function(){return M.every}});var D=r(337);Object.defineProperty(t,"exhaust",{enumerable:!0,get:function(){return D.exhaust}});var R=r(3977);Object.defineProperty(t,"exhaustAll",{enumerable:!0,get:function(){return R.exhaustAll}});var C=r(368);Object.defineProperty(t,"exhaustMap",{enumerable:!0,get:function(){return C.exhaustMap}});var $=r(7829);Object.defineProperty(t,"expand",{enumerable:!0,get:function(){return $.expand}});var F=r(2763);Object.defineProperty(t,"filter",{enumerable:!0,get:function(){return F.filter}});var q=r(4106);Object.defineProperty(t,"finalize",{enumerable:!0,get:function(){return q.finalize}});var L=r(8759);Object.defineProperty(t,"find",{enumerable:!0,get:function(){return L.find}});var B=r(3999);Object.defineProperty(t,"findIndex",{enumerable:!0,get:function(){return B.findIndex}});var U=r(5194);Object.defineProperty(t,"first",{enumerable:!0,get:function(){return U.first}});var V=r(1664);Object.defineProperty(t,"groupBy",{enumerable:!0,get:function(){return V.groupBy}});var z=r(3470);Object.defineProperty(t,"ignoreElements",{enumerable:!0,get:function(){return z.ignoreElements}});var Q=r(9549);Object.defineProperty(t,"isEmpty",{enumerable:!0,get:function(){return Q.isEmpty}});var Y=r(9582);Object.defineProperty(t,"last",{enumerable:!0,get:function(){return Y.last}});var W=r(4338);Object.defineProperty(t,"map",{enumerable:!0,get:function(){return W.map}});var H=r(4791);Object.defineProperty(t,"mapTo",{enumerable:!0,get:function(){return H.mapTo}});var K=r(9318);Object.defineProperty(t,"materialize",{enumerable:!0,get:function(){return K.materialize}});var G=r(7446);Object.defineProperty(t,"max",{enumerable:!0,get:function(){return G.max}});var J=r(6094);Object.defineProperty(t,"merge",{enumerable:!0,get:function(){return J.merge}});var Z=r(4594);Object.defineProperty(t,"mergeAll",{enumerable:!0,get:function(){return Z.mergeAll}});var X=r(2735);Object.defineProperty(t,"flatMap",{enumerable:!0,get:function(){return X.flatMap}});var ee=r(9010);Object.defineProperty(t,"mergeMap",{enumerable:!0,get:function(){return ee.mergeMap}});var te=r(8983);Object.defineProperty(t,"mergeMapTo",{enumerable:!0,get:function(){return te.mergeMapTo}});var re=r(2170);Object.defineProperty(t,"mergeScan",{enumerable:!0,get:function(){return re.mergeScan}});var ne=r(3674);Object.defineProperty(t,"mergeWith",{enumerable:!0,get:function(){return ne.mergeWith}});var ie=r(1446);Object.defineProperty(t,"min",{enumerable:!0,get:function(){return ie.min}});var oe=r(2318);Object.defineProperty(t,"multicast",{enumerable:!0,get:function(){return oe.multicast}});var ae=r(3165);Object.defineProperty(t,"observeOn",{enumerable:!0,get:function(){return ae.observeOn}});var se=r(4764);Object.defineProperty(t,"onErrorResumeNext",{enumerable:!0,get:function(){return se.onErrorResumeNext}});var ue=r(402);Object.defineProperty(t,"pairwise",{enumerable:!0,get:function(){return ue.pairwise}});var ce=r(5960);Object.defineProperty(t,"partition",{enumerable:!0,get:function(){return ce.partition}});var le=r(5658);Object.defineProperty(t,"pluck",{enumerable:!0,get:function(){return le.pluck}});var fe=r(3881);Object.defineProperty(t,"publish",{enumerable:!0,get:function(){return fe.publish}});var pe=r(1755);Object.defineProperty(t,"publishBehavior",{enumerable:!0,get:function(){return pe.publishBehavior}});var de=r(9801);Object.defineProperty(t,"publishLast",{enumerable:!0,get:function(){return de.publishLast}});var he=r(5021);Object.defineProperty(t,"publishReplay",{enumerable:!0,get:function(){return he.publishReplay}});var ye=r(2749);Object.defineProperty(t,"race",{enumerable:!0,get:function(){return ye.race}});var ve=r(9925);Object.defineProperty(t,"raceWith",{enumerable:!0,get:function(){return ve.raceWith}});var me=r(1678);Object.defineProperty(t,"reduce",{enumerable:!0,get:function(){return me.reduce}});var be=r(1194);Object.defineProperty(t,"repeat",{enumerable:!0,get:function(){return be.repeat}});var ge=r(7085);Object.defineProperty(t,"repeatWhen",{enumerable:!0,get:function(){return ge.repeatWhen}});var _e=r(7524);Object.defineProperty(t,"retry",{enumerable:!0,get:function(){return _e.retry}});var we=r(548);Object.defineProperty(t,"retryWhen",{enumerable:!0,get:function(){return we.retryWhen}});var Oe=r(2711);Object.defineProperty(t,"refCount",{enumerable:!0,get:function(){return Oe.refCount}});var Se=r(6577);Object.defineProperty(t,"sample",{enumerable:!0,get:function(){return Se.sample}});var Ee=r(3815);Object.defineProperty(t,"sampleTime",{enumerable:!0,get:function(){return Ee.sampleTime}});var Te=r(7250);Object.defineProperty(t,"scan",{enumerable:!0,get:function(){return Te.scan}});var je=r(842);Object.defineProperty(t,"sequenceEqual",{enumerable:!0,get:function(){return je.sequenceEqual}});var Pe=r(9728);Object.defineProperty(t,"share",{enumerable:!0,get:function(){return Pe.share}});var Ie=r(7768);Object.defineProperty(t,"shareReplay",{enumerable:!0,get:function(){return Ie.shareReplay}});var xe=r(2445);Object.defineProperty(t,"single",{enumerable:!0,get:function(){return xe.single}});var Ae=r(6262);Object.defineProperty(t,"skip",{enumerable:!0,get:function(){return Ae.skip}});var Ne=r(7397);Object.defineProperty(t,"skipLast",{enumerable:!0,get:function(){return Ne.skipLast}});var ke=r(9900);Object.defineProperty(t,"skipUntil",{enumerable:!0,get:function(){return ke.skipUntil}});var Me=r(1620);Object.defineProperty(t,"skipWhile",{enumerable:!0,get:function(){return Me.skipWhile}});var De=r(3424);Object.defineProperty(t,"startWith",{enumerable:!0,get:function(){return De.startWith}});var Re=r(831);Object.defineProperty(t,"subscribeOn",{enumerable:!0,get:function(){return Re.subscribeOn}});var Ce=r(411);Object.defineProperty(t,"switchAll",{enumerable:!0,get:function(){return Ce.switchAll}});var $e=r(7222);Object.defineProperty(t,"switchMap",{enumerable:!0,get:function(){return $e.switchMap}});var Fe=r(6464);Object.defineProperty(t,"switchMapTo",{enumerable:!0,get:function(){return Fe.switchMapTo}});var qe=r(4434);Object.defineProperty(t,"switchScan",{enumerable:!0,get:function(){return qe.switchScan}});var Le=r(7138);Object.defineProperty(t,"take",{enumerable:!0,get:function(){return Le.take}});var Be=r(4288);Object.defineProperty(t,"takeLast",{enumerable:!0,get:function(){return Be.takeLast}});var Ue=r(7341);Object.defineProperty(t,"takeUntil",{enumerable:!0,get:function(){return Ue.takeUntil}});var Ve=r(653);Object.defineProperty(t,"takeWhile",{enumerable:!0,get:function(){return Ve.takeWhile}});var ze=r(8668);Object.defineProperty(t,"tap",{enumerable:!0,get:function(){return ze.tap}});var Qe=r(9466);Object.defineProperty(t,"throttle",{enumerable:!0,get:function(){return Qe.throttle}});var Ye=r(9705);Object.defineProperty(t,"throttleTime",{enumerable:!0,get:function(){return Ye.throttleTime}});var We=r(8062);Object.defineProperty(t,"throwIfEmpty",{enumerable:!0,get:function(){return We.throwIfEmpty}});var He=r(6610);Object.defineProperty(t,"timeInterval",{enumerable:!0,get:function(){return He.timeInterval}});var Ke=r(6279);Object.defineProperty(t,"timeout",{enumerable:!0,get:function(){return Ke.timeout}});var Ge=r(8132);Object.defineProperty(t,"timeoutWith",{enumerable:!0,get:function(){return Ge.timeoutWith}});var Je=r(4553);Object.defineProperty(t,"timestamp",{enumerable:!0,get:function(){return Je.timestamp}});var Ze=r(2378);Object.defineProperty(t,"toArray",{enumerable:!0,get:function(){return Ze.toArray}});var Xe=r(4768);Object.defineProperty(t,"window",{enumerable:!0,get:function(){return Xe.window}});var et=r(131);Object.defineProperty(t,"windowCount",{enumerable:!0,get:function(){return et.windowCount}});var tt=r(9579);Object.defineProperty(t,"windowTime",{enumerable:!0,get:function(){return tt.windowTime}});var rt=r(752);Object.defineProperty(t,"windowToggle",{enumerable:!0,get:function(){return rt.windowToggle}});var nt=r(582);Object.defineProperty(t,"windowWhen",{enumerable:!0,get:function(){return nt.windowWhen}});var it=r(4255);Object.defineProperty(t,"withLatestFrom",{enumerable:!0,get:function(){return it.withLatestFrom}});var ot=r(3253);Object.defineProperty(t,"zip",{enumerable:!0,get:function(){return ot.zip}});var at=r(7220);Object.defineProperty(t,"zipAll",{enumerable:!0,get:function(){return at.zipAll}});var st=r(9287);Object.defineProperty(t,"zipWith",{enumerable:!0,get:function(){return st.zipWith}})},2943:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ApiCallContext=void 0,t.ApiCallContext=class{constructor(e){this.endpointId=e.endpointId,this.url=e.url,this.method=e.method,this.headers=e.headers,this.body=e.body,this.queryParams=e.queryParams,this.pathParams=e.pathParams,this.serverUrlOverride=e.serverUrlOverride}}},5218:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4125:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiscoverOpenApiSchemaRequestSchema=t.UpdateAllowedHostsRequestSchema=t.DiscoverGraphQLConnectionSchemaRequestSchema=t.DiscoverDataConnectionSchemaRequestSchema=t.TestDataConnectionRequestSchema=t.DeleteIntegrationRequestSchema=t.UpsertIntegrationRequestSchema=t.UpdateOpenIdProviderRequestSchema=void 0;const n=r(1186);t.UpdateOpenIdProviderRequestSchema={type:"object",required:["openIdProvider"],properties:{openIdProvider:{type:"object",required:["providerType","clientId","domain"],properties:{providerType:{type:"string",const:"auth0"},clientId:{type:"string",nullable:!1},domain:{type:"string",nullable:!1}}}}};const i={type:"object",nullable:!1,required:["secrets","host","user","database"],properties:{host:{type:"string",nullable:!1},user:{type:"string",nullable:!1},database:{type:"string",nullable:!1},secrets:{type:"object",required:["password"],nullable:!1,properties:{password:{type:"string",nullable:!1,isSecret:{}}}},connectionLimit:{type:"number",nullable:!1}}},o={type:"object",nullable:!1,required:["secrets","host","user","database"],properties:{host:{type:"string",nullable:!1},user:{type:"string",nullable:!1},database:{type:"string",nullable:!1},secrets:{type:"object",required:["password"],nullable:!1,properties:{password:{type:"string",nullable:!1,isSecret:{}}}},connectionLimit:{type:"number",nullable:!1},sslEnabled:{type:"boolean",nullable:!1}}},a={type:"object",nullable:!1,required:["secrets","host","user","database"],properties:{host:{type:"string",nullable:!1},user:{type:"string",nullable:!1},database:{type:"string",nullable:!1},schema:{type:"string",nullable:!0},sslEnabled:{type:"boolean",nullable:!0},secrets:{type:"object",required:["password"],nullable:!1,properties:{password:{type:"string",nullable:!1,isSecret:{}},sslCertificate:{type:"string",nullable:!0,isSecret:{}}}},connectionLimit:{type:"number",nullable:!1}}},s={type:"object",nullable:!1,required:["connectionString"],properties:{connectionString:{type:"string",nullable:!1},user:{type:"string",nullable:!0},secrets:{type:"object",nullable:!1,properties:{password:{type:"string",nullable:!1,isSecret:{}}}},maxPoolSize:{type:"number",nullable:!1},minPoolSize:{type:"number",nullable:!1},socketTimeoutMS:{type:"number",nullable:!1},keepAlive:{type:"boolean",nullable:!1},directConnection:{type:"boolean",nullable:!1},ssl:{type:"object",nullable:!1,required:["certificateFile","validate"],properties:{certificateFile:{type:"string",nullable:!1},validate:{type:"boolean",nullable:!1}}}}},u={type:"object",nullable:!1,required:["baseUrl"],properties:{baseUrl:{type:"string",nullable:!1,format:"uri"}}},c={type:"object",required:[],properties:{account:{type:"string",nullable:!1},username:{type:"string",nullable:!1},database:{type:"string",nullable:!1},schema:{type:"string",nullable:!1},warehouse:{type:"string",nullable:!1},role:{type:"string",nullable:!1},secrets:{type:"object",required:["password"],nullable:!1,properties:{password:{type:"string",nullable:!1,isSecret:{}}}}}};t.UpsertIntegrationRequestSchema={type:"object",required:["type","id"],properties:{id:{type:"string",nullable:!1},schema:{type:"object",nullable:!0}},oneOf:[{type:"object",required:[],properties:{type:{const:n.IntegrationType.built_in_db}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.mysql},supportsExternalChanges:{type:"boolean",nullable:!0},configuration:{type:"object",nullable:!1,required:["connectionOptions"],properties:{connectionOptions:i}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.mssql},supportsExternalChanges:{type:"boolean",nullable:!0},configuration:{type:"object",nullable:!1,required:["connectionOptions"],properties:{connectionOptions:o}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.postgres},supportsExternalChanges:{type:"boolean",nullable:!0},configuration:{type:"object",nullable:!1,required:["connectionOptions"],properties:{connectionOptions:a}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.cockroach},configuration:{type:"object",nullable:!1,required:["connectionOptions"],properties:{connectionOptions:a}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.mongo},supportsExternalChanges:{type:"boolean",nullable:!0},configuration:{type:"object",nullable:!1,required:["connectionOptions"],properties:{connectionOptions:s}}}},{type:"object",required:[],properties:{type:{const:n.IntegrationType.api},configuration:{type:"object",nullable:!0,required:["discoveryOptions"],properties:{discoveryOptions:{type:"object",nullable:!1,required:["openApiSpecUrl"],properties:{openApiSpecUrl:{type:"string",nullable:!1}}}}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.graphql},configuration:{type:"object",nullable:!1,required:["connectionOptions"],properties:{connectionOptions:u}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.snowflake},configuration:{type:"object",nullable:!1,required:["connectionOptions"],properties:{connectionOptions:c}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.datadog},configuration:{type:"object",nullable:!1,required:["apiKey","appKey","datadogRegion"],properties:{apiKey:{type:"string",nullable:!1,isSecret:{}},appKey:{type:"string",nullable:!1,isSecret:{}},datadogRegion:{type:"string",nullable:!1,enum:Object.keys(n.datadogRegionMap)}}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.newrelic},configuration:{type:"object",nullable:!1,required:["apiKey","newRelicRegion"],properties:{apiKey:{type:"string",nullable:!1,isSecret:{}},newRelicRegion:{type:"string",nullable:!1,enum:Object.keys(n.newRelicRegionMap)}}}}}]},t.DeleteIntegrationRequestSchema={type:"object",required:["integrationId"],properties:{integrationId:{type:"string",nullable:!1}}},t.TestDataConnectionRequestSchema={type:"object",required:["type","configuration"],oneOf:[{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.mysql},configuration:{type:"object",required:["connectionOptions"],properties:{connectionOptions:i}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.mssql},configuration:{type:"object",required:["connectionOptions"],properties:{connectionOptions:o}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.postgres},configuration:{type:"object",required:["connectionOptions"],properties:{connectionOptions:a}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.cockroach},configuration:{type:"object",required:["connectionOptions"],properties:{connectionOptions:a}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.mongo},configuration:{type:"object",required:["connectionOptions"],properties:{connectionOptions:s}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.snowflake},configuration:{type:"object",required:["connectionOptions"],properties:{connectionOptions:c}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.graphql},configuration:{type:"object",required:["connectionOptions"],properties:{connectionOptions:u}}}}]},t.DiscoverDataConnectionSchemaRequestSchema={type:"object",required:["integrationType"],oneOf:[{type:"object",required:["connectionOptions"],properties:{integrationType:{const:n.IntegrationType.mysql},connectionOptions:i}},{type:"object",required:["connectionOptions"],properties:{integrationType:{const:n.IntegrationType.mssql},connectionOptions:o}},{type:"object",required:["connectionOptions"],properties:{integrationType:{const:n.IntegrationType.snowflake},connectionOptions:c}},{type:"object",required:["connectionOptions"],properties:{integrationType:{const:n.IntegrationType.postgres},connectionOptions:a}},{type:"object",required:["connectionOptions"],properties:{integrationType:{const:n.IntegrationType.cockroach},connectionOptions:a}},{type:"object",required:["connectionOptions"],properties:{integrationType:{const:n.IntegrationType.mongo},connectionOptions:s}},{type:"object",properties:{integrationType:{const:n.IntegrationType.built_in_db}}}]},t.DiscoverGraphQLConnectionSchemaRequestSchema={type:"object",required:["integrationType"],properties:{integrationType:{const:n.IntegrationType.graphql},connectionOptions:u}},t.UpdateAllowedHostsRequestSchema={type:"object",required:["allowedHosts"],properties:{allowedHosts:{type:"array",nullable:!1,minItems:1,items:{type:"string",nullable:!1}}}},t.DiscoverOpenApiSchemaRequestSchema={type:"object",required:["discoveryOptions"],properties:{discoveryOptions:{type:"object",required:["openApiSpecUrl"],properties:{openApiSpecUrl:{type:"string",format:"uri"}}}}}},8030:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.CronExpression=void 0,(r=t.CronExpression||(t.CronExpression={})).EVERY_SECOND="* * * * * *",r.EVERY_5_SECONDS="*/5 * * * * *",r.EVERY_10_SECONDS="*/10 * * * * *",r.EVERY_30_SECONDS="*/30 * * * * *",r.EVERY_MINUTE="*/1 * * * *",r.EVERY_5_MINUTES="0 */5 * * * *",r.EVERY_10_MINUTES="0 */10 * * * *",r.EVERY_30_MINUTES="0 */30 * * * *",r.EVERY_HOUR="0 0-23/1 * * *",r.EVERY_2_HOURS="0 0-23/2 * * *",r.EVERY_3_HOURS="0 0-23/3 * * *",r.EVERY_4_HOURS="0 0-23/4 * * *",r.EVERY_5_HOURS="0 0-23/5 * * *",r.EVERY_6_HOURS="0 0-23/6 * * *",r.EVERY_7_HOURS="0 0-23/7 * * *",r.EVERY_8_HOURS="0 0-23/8 * * *",r.EVERY_9_HOURS="0 0-23/9 * * *",r.EVERY_10_HOURS="0 0-23/10 * * *",r.EVERY_11_HOURS="0 0-23/11 * * *",r.EVERY_12_HOURS="0 0-23/12 * * *",r.EVERY_DAY_AT_1AM="0 01 * * *",r.EVERY_DAY_AT_2AM="0 02 * * *",r.EVERY_DAY_AT_3AM="0 03 * * *",r.EVERY_DAY_AT_4AM="0 04 * * *",r.EVERY_DAY_AT_5AM="0 05 * * *",r.EVERY_DAY_AT_6AM="0 06 * * *",r.EVERY_DAY_AT_7AM="0 07 * * *",r.EVERY_DAY_AT_8AM="0 08 * * *",r.EVERY_DAY_AT_9AM="0 09 * * *",r.EVERY_DAY_AT_10AM="0 10 * * *",r.EVERY_DAY_AT_11AM="0 11 * * *",r.EVERY_DAY_AT_NOON="0 12 * * *",r.EVERY_DAY_AT_1PM="0 13 * * *",r.EVERY_DAY_AT_2PM="0 14 * * *",r.EVERY_DAY_AT_3PM="0 15 * * *",r.EVERY_DAY_AT_4PM="0 16 * * *",r.EVERY_DAY_AT_5PM="0 17 * * *",r.EVERY_DAY_AT_6PM="0 18 * * *",r.EVERY_DAY_AT_7PM="0 19 * * *",r.EVERY_DAY_AT_8PM="0 20 * * *",r.EVERY_DAY_AT_9PM="0 21 * * *",r.EVERY_DAY_AT_10PM="0 22 * * *",r.EVERY_DAY_AT_11PM="0 23 * * *",r.EVERY_DAY_AT_MIDNIGHT="0 0 * * *",r.EVERY_WEEK="0 0 * * 0",r.EVERY_WEEKDAY="0 0 * * 1-5",r.EVERY_WEEKEND="0 0 * * 6,0",r.EVERY_1ST_DAY_OF_MONTH_AT_MIDNIGHT="0 0 1 * *",r.EVERY_1ST_DAY_OF_MONTH_AT_NOON="0 12 1 * *",r.EVERY_2ND_HOUR="0 */2 * * *",r.EVERY_2ND_HOUR_FROM_1AM_THROUGH_11PM="0 1-23/2 * * *",r.EVERY_2ND_MONTH="0 0 1 */2 *",r.EVERY_QUARTER="0 0 1 */3 *",r.EVERY_6_MONTHS="0 0 1 */6 *",r.EVERY_YEAR="0 0 1 0 *",r.EVERY_30_MINUTES_BETWEEN_9AM_AND_5PM="0 */30 9-17 * * *",r.EVERY_30_MINUTES_BETWEEN_9AM_AND_6PM="0 */30 9-18 * * *",r.EVERY_30_MINUTES_BETWEEN_10AM_AND_7PM="0 */30 10-19 * * *",r.MONDAY_TO_FRIDAY_AT_1AM="0 0 01 * * 1-5",r.MONDAY_TO_FRIDAY_AT_2AM="0 0 02 * * 1-5",r.MONDAY_TO_FRIDAY_AT_3AM="0 0 03 * * 1-5",r.MONDAY_TO_FRIDAY_AT_4AM="0 0 04 * * 1-5",r.MONDAY_TO_FRIDAY_AT_5AM="0 0 05 * * 1-5",r.MONDAY_TO_FRIDAY_AT_6AM="0 0 06 * * 1-5",r.MONDAY_TO_FRIDAY_AT_7AM="0 0 07 * * 1-5",r.MONDAY_TO_FRIDAY_AT_8AM="0 0 08 * * 1-5",r.MONDAY_TO_FRIDAY_AT_9AM="0 0 09 * * 1-5",r.MONDAY_TO_FRIDAY_AT_09_30AM="0 30 09 * * 1-5",r.MONDAY_TO_FRIDAY_AT_10AM="0 0 10 * * 1-5",r.MONDAY_TO_FRIDAY_AT_11AM="0 0 11 * * 1-5",r.MONDAY_TO_FRIDAY_AT_11_30AM="0 30 11 * * 1-5",r.MONDAY_TO_FRIDAY_AT_12PM="0 0 12 * * 1-5",r.MONDAY_TO_FRIDAY_AT_1PM="0 0 13 * * 1-5",r.MONDAY_TO_FRIDAY_AT_2PM="0 0 14 * * 1-5",r.MONDAY_TO_FRIDAY_AT_3PM="0 0 15 * * 1-5",r.MONDAY_TO_FRIDAY_AT_4PM="0 0 16 * * 1-5",r.MONDAY_TO_FRIDAY_AT_5PM="0 0 17 * * 1-5",r.MONDAY_TO_FRIDAY_AT_6PM="0 0 18 * * 1-5",r.MONDAY_TO_FRIDAY_AT_7PM="0 0 19 * * 1-5",r.MONDAY_TO_FRIDAY_AT_8PM="0 0 20 * * 1-5",r.MONDAY_TO_FRIDAY_AT_9PM="0 0 21 * * 1-5",r.MONDAY_TO_FRIDAY_AT_10PM="0 0 22 * * 1-5",r.MONDAY_TO_FRIDAY_AT_11PM="0 0 23 * * 1-5"},7545:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExecuteBackendFunctionRequestSchema=void 0,t.ExecuteBackendFunctionRequestSchema={type:"object",required:["functionName","paramsArrayStr","clientRequestId","clientId"],properties:{functionName:{type:"string",nullable:!1},paramsArrayStr:{type:"string",nullable:!1},clientRequestId:{type:"string",nullable:!1},clientId:{type:"string",nullable:!1}}}},9235:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},6421:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.transformResponse=t.transformParams=t.executeFunctionSecureAnnotationType=void 0;const n=r(2574),i=r(2251),o=r(5250),a=r(326),s=r(2943),u=r(7627);t.executeFunctionSecureAnnotationType=["secureDistributedLock","secureQuery","secureMutation","secureNamedQuery","secureGraphQL","secureApi"],t.transformParams=function(e,t){switch(t){case"webhook":case"executable":case"trigger":case"transformRead":case"transformWrite":case"metadata":return e;case"scheduler":return[];case"secureQuery":return[new n.QueryContext(e[0].query)];case"secureMutation":return[new i.MutationContext(e[0].mutation,e[0].beforeAndAfterDocs,e[0].serverTimestamp)];case"secureNamedQuery":return[new o.NamedQueryContext(e[0])];case"secureDistributedLock":return[new u.DistributedLockContext(e[0].mutex,e[0].exclusive)];case"secureGraphQL":return[new a.GraphqlContext(e[0])];case"secureApi":return[new s.ApiCallContext(e[0])]}},t.transformResponse=function(e,r){return t.executeFunctionSecureAnnotationType.includes(r)?{rulesPassed:e,docsToHash:e?{}:void 0}:e}},1277:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3889:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},720:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3085:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},7627:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DistributedLockContext=void 0,t.DistributedLockContext=class{constructor(e,t){this.mutex=e,this.exclusive=t}}},4385:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hasDocumentDiff=t.getSquidDocId=t.parseSquidDocId=void 0;const n=r(9312).__importDefault(r(2091)),i=r(1636),o=r(4684);function a(e){return(0,o.deserializeObj)(e)}t.parseSquidDocId=a,t.getSquidDocId=function(...e){const[t,r,n]=e,i="object"==typeof t?t:{docId:t,collectionName:r,integrationId:n};return i.integrationId||(i.integrationId=void 0),(0,o.normalizeJsonAsString)(i)},t.hasDocumentDiff=function(e,t){const r=(0,n.default)(e,t)||[],s=["__docId__","__ts__"],u=r.find((e=>{var t;return"__docId__"===(null===(t=e.path)||void 0===t?void 0:t[0])}));if(u){if("E"!==u.kind||!u.rhs)throw new Error(`Unexpected diff for __docId__: ${(0,o.normalizeJsonAsString)(u)}`);const e=a(u.rhs+"");s.push(...Object.keys(e))}return!!(null==r?void 0:r.find(((e,t)=>{var r;if(s.includes(null===(r=e.path)||void 0===r?void 0:r[0]))return!1;switch(e.kind){case"N":return(0,i.isNotNullish)(e.rhs);case"E":case"D":case"A":return!0}return!1})))}},326:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GraphqlContext=void 0,t.GraphqlContext=class{constructor(e){this.isGraphiQL=e.isGraphiQL,this.query=e.query,this.operationName=e.operationName,this.variables=e.variables}}},9231:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmptyIntrospection=void 0,t.EmptyIntrospection={__schema:{queryType:{name:"Query",kind:"OBJECT"},mutationType:null,subscriptionType:null,types:[{name:"Query",kind:"OBJECT",fields:[{name:"isEmpty",type:{kind:"SCALAR",name:"Boolean"},args:[],isDeprecated:!1,deprecationReason:null}],interfaces:[]},{name:"Boolean",kind:"SCALAR"}],directives:[]}}},7008:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.HttpStatus=void 0,(r=t.HttpStatus||(t.HttpStatus={}))[r.CONTINUE=100]="CONTINUE",r[r.SWITCHING_PROTOCOLS=101]="SWITCHING_PROTOCOLS",r[r.PROCESSING=102]="PROCESSING",r[r.EARLYHINTS=103]="EARLYHINTS",r[r.OK=200]="OK",r[r.CREATED=201]="CREATED",r[r.ACCEPTED=202]="ACCEPTED",r[r.NON_AUTHORITATIVE_INFORMATION=203]="NON_AUTHORITATIVE_INFORMATION",r[r.NO_CONTENT=204]="NO_CONTENT",r[r.RESET_CONTENT=205]="RESET_CONTENT",r[r.PARTIAL_CONTENT=206]="PARTIAL_CONTENT",r[r.AMBIGUOUS=300]="AMBIGUOUS",r[r.MOVED_PERMANENTLY=301]="MOVED_PERMANENTLY",r[r.FOUND=302]="FOUND",r[r.SEE_OTHER=303]="SEE_OTHER",r[r.NOT_MODIFIED=304]="NOT_MODIFIED",r[r.TEMPORARY_REDIRECT=307]="TEMPORARY_REDIRECT",r[r.PERMANENT_REDIRECT=308]="PERMANENT_REDIRECT",r[r.BAD_REQUEST=400]="BAD_REQUEST",r[r.UNAUTHORIZED=401]="UNAUTHORIZED",r[r.PAYMENT_REQUIRED=402]="PAYMENT_REQUIRED",r[r.FORBIDDEN=403]="FORBIDDEN",r[r.NOT_FOUND=404]="NOT_FOUND",r[r.METHOD_NOT_ALLOWED=405]="METHOD_NOT_ALLOWED",r[r.NOT_ACCEPTABLE=406]="NOT_ACCEPTABLE",r[r.PROXY_AUTHENTICATION_REQUIRED=407]="PROXY_AUTHENTICATION_REQUIRED",r[r.REQUEST_TIMEOUT=408]="REQUEST_TIMEOUT",r[r.CONFLICT=409]="CONFLICT",r[r.GONE=410]="GONE",r[r.LENGTH_REQUIRED=411]="LENGTH_REQUIRED",r[r.PRECONDITION_FAILED=412]="PRECONDITION_FAILED",r[r.PAYLOAD_TOO_LARGE=413]="PAYLOAD_TOO_LARGE",r[r.URI_TOO_LONG=414]="URI_TOO_LONG",r[r.UNSUPPORTED_MEDIA_TYPE=415]="UNSUPPORTED_MEDIA_TYPE",r[r.REQUESTED_RANGE_NOT_SATISFIABLE=416]="REQUESTED_RANGE_NOT_SATISFIABLE",r[r.EXPECTATION_FAILED=417]="EXPECTATION_FAILED",r[r.I_AM_A_TEAPOT=418]="I_AM_A_TEAPOT",r[r.MISDIRECTED=421]="MISDIRECTED",r[r.UNPROCESSABLE_ENTITY=422]="UNPROCESSABLE_ENTITY",r[r.FAILED_DEPENDENCY=424]="FAILED_DEPENDENCY",r[r.PRECONDITION_REQUIRED=428]="PRECONDITION_REQUIRED",r[r.TOO_MANY_REQUESTS=429]="TOO_MANY_REQUESTS",r[r.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",r[r.NOT_IMPLEMENTED=501]="NOT_IMPLEMENTED",r[r.BAD_GATEWAY=502]="BAD_GATEWAY",r[r.SERVICE_UNAVAILABLE=503]="SERVICE_UNAVAILABLE",r[r.GATEWAY_TIMEOUT=504]="GATEWAY_TIMEOUT",r[r.HTTP_VERSION_NOT_SUPPORTED=505]="HTTP_VERSION_NOT_SUPPORTED"},575:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9312);n.__exportStar(r(2943),t),n.__exportStar(r(5218),t),n.__exportStar(r(4125),t),n.__exportStar(r(8030),t),n.__exportStar(r(7545),t),n.__exportStar(r(9235),t),n.__exportStar(r(6421),t),n.__exportStar(r(1277),t),n.__exportStar(r(3889),t),n.__exportStar(r(720),t),n.__exportStar(r(3085),t),n.__exportStar(r(7627),t),n.__exportStar(r(4385),t),n.__exportStar(r(326),t),n.__exportStar(r(9231),t),n.__exportStar(r(7008),t),n.__exportStar(r(1186),t),n.__exportStar(r(6778),t),n.__exportStar(r(3858),t),n.__exportStar(r(2251),t),n.__exportStar(r(5263),t),n.__exportStar(r(2792),t),n.__exportStar(r(5250),t),n.__exportStar(r(7581),t),n.__exportStar(r(1012),t),n.__exportStar(r(2574),t),n.__exportStar(r(2972),t),n.__exportStar(r(791),t),n.__exportStar(r(1906),t),n.__exportStar(r(6504),t),n.__exportStar(r(5098),t),n.__exportStar(r(1391),t),n.__exportStar(r(3851),t),n.__exportStar(r(5791),t),n.__exportStar(r(7104),t),n.__exportStar(r(9132),t),n.__exportStar(r(7682),t),n.__exportStar(r(3185),t),n.__exportStar(r(4825),t),n.__exportStar(r(7850),t),n.__exportStar(r(8255),t),n.__exportStar(r(7142),t),n.__exportStar(r(6485),t),n.__exportStar(r(3589),t),n.__exportStar(r(1636),t),n.__exportStar(r(8038),t),n.__exportStar(r(4684),t),n.__exportStar(r(8932),t),n.__exportStar(r(2608),t),n.__exportStar(r(8315),t),n.__exportStar(r(3811),t)},1186:(e,t)=>{"use strict";var r,n;function i(e){return[r.built_in_db,r.mongo,r.mysql,r.mssql,r.postgres,r.cockroach,r.snowflake].includes(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.isDataIntegrationType=t.isDataIntegration=t.newRelicRegionMap=t.datadogRegionMap=t.IntegrationType=t.IntegrationCategory=void 0,(n=t.IntegrationCategory||(t.IntegrationCategory={})).database="database",n.api="api",n.observability="observability",n.crm="crm",function(e){e.built_in_db="built_in_db",e.mongo="mongo",e.mysql="mysql",e.mssql="mssql",e.postgres="postgres",e.cockroach="cockroach",e.api="api",e.graphql="graphql",e.snowflake="snowflake",e.datadog="datadog",e.newrelic="newrelic",e.algolia="algolia",e.elastic_observability="elastic_observability",e.elastic_search="elastic_search",e.elastic_enterprise_search="elastic_enterprise_search",e.sentry="sentry",e.sap_hana="sap_hana",e.salesforce_crm="salesforce_crm",e.documentdb="documentdb",e.dynamodb="dynamodb",e.cassandra="cassandra",e.clickhouse="clickhouse",e.alloydb="alloydb",e.spanner="spanner",e.db2="db2",e.mariadb="mariadb",e.oracledb="oracledb",e.redis="redis",e.xata="xata",e.azure_sql="azure_sql"}(r=t.IntegrationType||(t.IntegrationType={})),t.datadogRegionMap={us1:"US1 - East",us3:"US3 - West",us5:"US5 - Central",eu1:"EU1 - Europe","us1-fed":"US1-FED (FedRamp)"},t.newRelicRegionMap={worldwide:"Worldwide",eu:"Europe"},t.isDataIntegration=function(e){return i(e.type)},t.isDataIntegrationType=i},6778:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.LogLevel=void 0,(r=t.LogLevel||(t.LogLevel={})).TRACE="trace",r.DEBUG="debug",r.INFO="info",r.WARN="warn",r.ERROR="error"},3858:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.aggregationPeriodMap=void 0,t.aggregationPeriodMap={"1m":1,"5m":5,"15m":15,"1h":60,"1d":1440,"1w":10080}},2251:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MutationContext=void 0;const n=r(9312).__importStar(r(8784));t.MutationContext=class{constructor(e,t,r){this.mutation=e,this.beforeAndAfterDocs=t,this.serverTimeStamp=r}getMutationType(){return this.mutation.type}affectsPath(e){const t=this.beforeAndAfterDocs.before?n.get(this.beforeAndAfterDocs.before,e):void 0,r=this.beforeAndAfterDocs.after?n.get(this.beforeAndAfterDocs.after,e):void 0;return!n.isEqual(t,r)}}},5263:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MutationRequestSchema=void 0;const r={type:"string"},n={type:"object",required:["docId","integrationId","collectionName"],properties:{docId:r,integrationId:r,collectionName:r}},i={oneOf:[{type:"object",required:["type","properties","squidDocIdObj"],properties:{type:{type:"string",const:"insert"},properties:{type:"object"},squidDocIdObj:n}},{type:"object",required:["type","squidDocIdObj"],properties:{type:{type:"string",const:"delete"},squidDocIdObj:n}},{type:"object",required:[],properties:{type:{type:"string",const:"update"},squidDocIdObj:n,properties:{type:"object",patternProperties:{"[0-9a-zA-Z\\$_\\-\\.]+":{type:"array",minItems:1,items:{oneOf:[{type:"object",required:["type","fn","value"],properties:{type:{type:"string",const:"applyNumericFn"},fn:{type:"string",const:"increment"},value:{type:"number"}}},{type:"object",required:["type"],properties:{type:{type:"string",const:"removeProperty"}}},{type:"object",required:["type","value"],properties:{type:{type:"string",const:"update"},value:{}}},{type:"object",required:["type","fn","value"],properties:{type:{type:"string",const:"applyStringFn"},fn:{type:"string",const:"extendString"},value:r}},{type:"object",required:["type","fn"],properties:{type:{type:"string",const:"applyStringFn"},fn:{type:"string",const:"trim"}}}]}}}}}}]};t.MutationRequestSchema={type:"object",required:["clientId","integrationId","mutations"],properties:{clientId:r,integrationId:r,mutations:{type:"array",items:i}}}},2792:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reduceMutations=t.convertInsertToUpdate=t.applyUpdateMutation=t.mergeMutations=t.sortUpdateMutationProperties=void 0;const n=r(9312).__importStar(r(8784)),i=r(2937),o=r(7850),a=r(8038);function s(e,t){switch(t.type){case"applyNumericFn":return function(e,t){if("increment"===t.fn)return null==e?t.value:e+t.value;throw new Error("Unknown numeric function: "+JSON.stringify(t))}(e,t);case"applyStringFn":return function(e,t){switch(t.fn){case"trim":return"string"!=typeof e?e:e.trim();case"extendString":return null==e?t.value:e+t.value;default:throw new Error("Unknown string function: "+JSON.stringify(t))}}(e,t);case"update":return"object"==typeof t.value?n.cloneDeep(t.value):t.value;case"removeProperty":return;default:throw new Error("Unknown property mutation type: "+JSON.stringify(t))}}function u(e){return Object.entries(e.properties).sort((([e],[t])=>e.split(".").length-t.split(".").length))}function c(e,t){if("insert"===t.type)return t;if("delete"===t.type)return t;if("delete"===e.type)throw new Error("Cannot delete and then update");if((0,o.assertTruthy)("update"===t.type),"update"===e.type)return function(e,t){const r=n.cloneDeep(e);t=n.cloneDeep(t);for(const[e]of u(r)){const n=e.split(".").length;Object.entries(t.properties).some((([t])=>e.startsWith(t+".")&&n>t.split(".").length))&&delete r.properties[e]}for(const[e,n]of u(t))r.properties[e]=[...r.properties[e]||[],...n];return r}(e,t);const r=n.cloneDeep(e);for(const[e,n]of u(t)){const t=n;for(const n of t){const t=s((0,a.getInPath)(r.properties,e),n);void 0===t?(0,a.deleteInPath)(r.properties,e):(0,a.setInPath)(r.properties,e,t)}}return r}t.sortUpdateMutationProperties=u,t.mergeMutations=c,t.applyUpdateMutation=function(e,t){if(!e)return;const r=Object.assign({},e),n=u(t);for(const[e,t]of n){const n=t;for(const t of n){const n=s((0,a.getInPath)(r,e),t);void 0===n?(0,a.deleteInPath)(r,e):(0,a.setInPath)(r,e,n)}}return r},t.convertInsertToUpdate=function(e){const t={type:"update",squidDocIdObj:e.squidDocIdObj,properties:{}};for(const[r,n]of Object.entries(e.properties))t.properties[r]=[{type:"update",value:n}];return t},t.reduceMutations=function(e){let t=[];return(0,i.from)(e).pipe((0,i.groupBy)((e=>`${e.squidDocIdObj.integrationId}${e.squidDocIdObj.collectionName}/${e.squidDocIdObj.docId}`)),(0,i.mergeMap)((e=>e.pipe((0,i.reduce)(((e,t)=>c(e,t)))))),(0,i.toArray)()).subscribe((e=>{t=e})),t}},5250:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NamedQueryContext=void 0,t.NamedQueryContext=class{constructor(e){this.params=e}}},7581:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExecuteNamedQueryRequestSchema=void 0,t.ExecuteNamedQueryRequestSchema={type:"object",required:["integrationId","queryName","paramsRecordStr","clientRequestId","clientId"],properties:{integrationId:{type:"string",nullable:!1},queryName:{type:"string",nullable:!1},paramsRecordStr:{type:"string",nullable:!1},clientRequestId:{type:"string",nullable:!1},clientId:{type:"string",nullable:!1}}}},1012:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2972:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueryUnsubscribeRequestSchema=t.QueryRequestSchema=t.QuerySchema=void 0,t.QuerySchema={$id:"querySchema",type:"object",required:["collectionName","integrationId"],properties:{collectionName:{type:"string",nullable:!1},integrationId:{type:"string",nullable:!1},conditions:{type:"array",nullable:!1,items:{type:"object",nullable:!1,required:["fieldName","operator","value"],properties:{fieldName:{type:"string",nullable:!1},operator:{type:"string",nullable:!1,enum:["==",">=","<=",">","<","!=","like","not like","like_cs","not like_cs"]},value:{$ref:"querySchema#/definitions/conditionValueSchema"}}}},sortOrder:{type:"array",nullable:!1,items:{type:"object",required:["fieldName","asc"],properties:{fieldName:{type:"string"},asc:{type:"boolean"}}}},limit:{type:"number",nullable:!1}},definitions:{conditionValueSchema:{oneOf:[{type:"null",nullable:!0},{type:"string",nullable:!1},{type:"number",nullable:!1},{type:"boolean",nullable:!1},{type:"array",nullable:!1,items:{$ref:"querySchema#/definitions/conditionValueSchema"}},{type:"object",nullable:!1,patternProperties:{"[0-9a-zA-Z\\$_\\-\\.]{1,64}":{$ref:"querySchema#/definitions/conditionValueSchema"}}}]}}},t.QueryRequestSchema={type:"object",required:["clientId","clientRequestId","query","subscribe"],properties:{clientId:{type:"string",nullable:!1},clientRequestId:{type:"string",nullable:!1},query:t.QuerySchema,subscribe:{type:"boolean",nullable:!1}}},t.QueryUnsubscribeRequestSchema={type:"object",required:["clientId","clientRequestId"],properties:{clientId:{type:"string",nullable:!1},clientRequestId:{type:"string",nullable:!1}}}},791:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseQuerySubscriptionId=t.getQuerySubscriptionId=t.compareOperator=t.findQueriesForDocumentSync=t.SimpleQueryMappingManager=t.QueryMappingManager=void 0;const n=r(1636),i=r(8038),o=r(4684);class a{}function s(e,t){var r;const a=[...e.unconditional||[]],s=new Set,c=new Map;for(const[a,l]of Object.entries(e.conditional||{})){const e=(0,o.decodeValueForMapping)(a);for(const[a,f]of Object.entries(l)){const l=[],p=null!==(r=(0,i.getInPath)(t,e))&&void 0!==r?r:null,d=(0,o.encodeValueForMapping)(p);switch(a){case"==":l.push(...f[d]||[]);break;case"!=":{(f[d]||[]).forEach((e=>s.add(e)));const e=Object.entries(f).filter((([e])=>e!==d));for(const[t,r]of e)l.push(...r);break}case"<":case"<=":case">":case">=":case"like":case"not like":case"like_cs":case"not like_cs":(0,n.isNotNullish)(p)&&l.push(...Object.entries(f).filter((([e])=>u((0,o.decodeValueForMapping)(e),(0,o.recodeValue)(p),a))).reduce(((e,[t,r])=>(e.push(...r),e)),[]));break;default:throw new Error("Unsupported operator: "+a)}for(const e of l)c.set(e,(c.get(e)||0)+1)}}for(const[t,r]of c.entries())s.has(t)||r>=e.queriesMetadata[t].condCount&&a.push(t);return a}function u(e,t,r){if(null===e||null===t)return!1;switch(r){case"<":return t<e;case"<=":return t<=e;case">":return t>e;case">=":return t>=e;case"like":return"string"==typeof t&&"string"==typeof e&&c(t,e,!1);case"not like":return!("string"==typeof t&&"string"==typeof e&&c(t,e,!1));case"like_cs":return"string"==typeof t&&"string"==typeof e&&c(t,e,!0);case"not like_cs":return!("string"==typeof t&&"string"==typeof e&&c(t,e,!0));default:throw new Error(`Unsupported operator comparison: ${r}`)}}function c(e,t,r){r||(e=e.toLowerCase(),t=t.toLowerCase());const n=t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&").replace(/%/g,".*");return new RegExp(`^${n}$`).test(e)}t.QueryMappingManager=a,t.SimpleQueryMappingManager=class extends a{async findQueriesForDocument(e,t,r,n){const i=await this.getMapping(e,r,n);return i?s(i,t):[]}},t.findQueriesForDocumentSync=s,t.compareOperator=u,t.getQuerySubscriptionId=function(e,t){return`${e}_${t}`},t.parseQuerySubscriptionId=function(e){const t=e.split("_");return{clientId:t[0],clientRequestId:t[1]}}},2574:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9312);n.__exportStar(r(8556),t),n.__exportStar(r(1515),t)},8556:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueryContext=void 0;const n=r(8784),i={"in:in":(e,t)=>e.every((e=>t.includes(e))),"in:not in":(e,t)=>e.every((e=>!t.includes(e))),"not in:not in":(e,t)=>t.every((t=>e.includes(t))),">:not in":(e,t)=>t.every((t=>e>=t)),">=:not in":(e,t)=>t.every((t=>e>t)),"<:not in":(e,t)=>t.every((t=>e<=t)),"<=:not in":(e,t)=>t.every((t=>e<t)),">:>":(e,t)=>e>=t,">=:>":(e,t)=>e>t,"in:>":(e,t)=>e.every((e=>e>t)),">:>=":(e,t)=>e>=t,">=:>=":(e,t)=>e>=t,"in:>=":(e,t)=>e.every((e=>e>=t)),"<:<":(e,t)=>e<=t,"<=:<":(e,t)=>e<t,"in:<":(e,t)=>e.every((e=>e<t)),"<:<=":(e,t)=>e<=t,"<=:<=":(e,t)=>e<=t,"in:<=":(e,t)=>e.every((e=>e<=t))};t.QueryContext=class{constructor(e){this.query=e,this.query=e,this.parsedConditions=this.parseConditions(this.query.conditions)}get integrationId(){return this.query.integrationId}get collectionName(){return this.query.collectionName}get limit(){return this.query.limit}sortedBy(e){return!e.find(((e,t)=>{var r;return!(0,n.isEqual)(this.query.sortOrder[t],Object.assign(Object.assign({},e),{asc:null===(r=e.asc)||void 0===r||r}))}))}sortedByExact(e){return e.length===this.query.sortOrder.length&&this.sortedBy(e)}includes(e,t,r){return this.includesCondition({fieldName:e,operator:t,value:r})}includesCondition(e){const t=this.parsedConditions.filter((t=>t.fieldName===e.fieldName));return!!t.length&&!!t.find((t=>this.evaluateIncludes(t,e)))}includesConditions(e){return this.parseConditions(e).every((e=>this.includesCondition(e)))}matchesConditions(e){const t=this.parseConditions(e);return this.parsedConditions.length===t.length&&t.every((e=>this.includesCondition(e)))}matchesQuery(e){if(e.collectionName!==this.collectionName||e.integrationId!==this.integrationId)return!1;const t=this.matchesConditions(e.conditions),r=this.sortedByExact(e.sortOrder),n=this.limit===e.limit;return t&&r&&n}isSubsetOf(e,t,r){return this.isSubsetOfCondition({fieldName:e,operator:t,value:r})}isSubsetOfCondition(e){return!!this.parsedConditions.filter((t=>t.fieldName===e.fieldName)).find((t=>this.evaluateSubset(t,e)))}isSubsetOfConditions(e){return this.parseConditions(e).every((e=>this.isSubsetOfCondition(e)))}isSubsetOfQuery(e){if(e.collectionName!==this.collectionName||e.integrationId!==this.integrationId)return!1;const t=this.isSubsetOfConditions(e.conditions),r=this.sortedBy(e.sortOrder),n=-1===e.limit||this.limit>-1&&this.limit<e.limit;return t&&r&&n}getConditionsFor(...e){return this.parsedConditions.filter((t=>e.includes(t.fieldName)))}getConditionsForField(e){return this.parsedConditions.filter((t=>t.fieldName===e))}evaluateSubset(e,t){const{operator:r,value:n}=e,{operator:o,value:a}=this.parseConditions([t])[0],s=i[`${r}:${o}`];return!!s&&s(n,a)}evaluateIncludes(e,t){const{operator:r,value:i}=e,{operator:o,value:a}=this.parseConditions([t])[0],s=Array.isArray(i)?i.sort():i,u=Array.isArray(a)?a.sort():a;return o===r&&(0,n.isEqual)(u,s)}parseConditions(e){const t=[],r=new Map,n=new Map;return e.forEach((e=>{switch(e.operator){case"==":case"in":r.set(e.fieldName,(r.get(e.fieldName)||[]).concat(e.value));break;case"!=":case"not in":n.set(e.fieldName,(n.get(e.fieldName)||[]).concat(e.value));break;default:t.push(e)}})),r.forEach(((e,r)=>{t.push({fieldName:r,operator:"in",value:e})})),n.forEach(((e,r)=>{t.push({fieldName:r,operator:"not in",value:e})})),t}}},1515:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SimpleQueryBuilder=void 0;const n=r(9312).__importStar(r(8784)),i=r(7850),o=r(8315);t.SimpleQueryBuilder=class{constructor(e,t){this.collectionName=e,this.integrationId=t,this.query={integrationId:t,collectionName:e,conditions:[],limit:-1,sortOrder:[]}}where(e,t,r){if("in"===t||"not in"===t){const n=r instanceof Array?[...r]:[r];for(const r of n)this.query.conditions.push({fieldName:e,operator:"in"===t?"==":"!=",value:r});return this}return this.query.conditions.push({fieldName:e,operator:t,value:r}),this}eq(e,t){return this.where(e,"==",t)}neq(e,t){return this.where(e,"!=",t)}in(e,t){return this.where(e,"in",t)}nin(e,t){return this.where(e,"not in",t)}gt(e,t){return this.where(e,">",t)}gte(e,t){return this.where(e,">=",t)}lt(e,t){return this.where(e,"<",t)}lte(e,t){return this.where(e,"<=",t)}like(e,t,r=!0){return this.where(e,r?"like_cs":"like",t)}notLike(e,t,r=!0){return this.where(e,r?"not like_cs":"not like",t)}limit(e){return(0,o.validateQueryLimit)(e),(0,i.assertTruthy)(-1===this.query.limit,"The limit was already set."),this.query.limit=e,this}sortBy(e,t=!0){const r={asc:t,fieldName:e};return(0,o.validateFieldSort)(r),(0,i.assertTruthy)(!this.query.sortOrder.some((t=>t.fieldName===e)),`${e} already in the sort list.`),this.query.sortOrder.push(r),this}build(){const e=this.mergeConditions();return Object.assign(Object.assign({},this.query),{conditions:e})}mergeConditions(){const e=[],t=n.groupBy(this.query.conditions||[],(e=>e.fieldName));for(const r of Object.values(t)){const t=n.groupBy(r,(e=>e.operator));for(const[r,i]of Object.entries(t)){if("=="===r||"!="===r){e.push(...i);continue}const t=n.sortBy(i,(e=>e.value));">"===r||">="===r?e.push(t[t.length-1]):e.push(t[0])}}return e}}},1906:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.convertFromSquidRegion=t.convertToSquidRegion=t.getSquidSupportedCloudMap=t.squidSupportedRegionMap=t.supportedSquidRegions=void 0;const n=r(1636);t.supportedSquidRegions=["us-east-1.aws","local"],t.squidSupportedRegionMap={"us-east-1.aws":{id:"us-east-1",name:"US East (N. Virginia)"},local:{id:"local",name:"Local"}},t.getSquidSupportedCloudMap=function(e=!1){return{aws:{id:"aws",name:"Amazon Web Services",icon:"aws_icon",regions:[e?t.squidSupportedRegionMap.local:void 0,t.squidSupportedRegionMap["us-east-1.aws"]].filter(n.isNotNullish)},gcp:{id:"gcp",name:"Google Cloud Platform",icon:"gcp_icon",tooltip:"Google Cloud (GCP) support is coming soon!",regions:[]},azure:{id:"azure",name:"Microsoft Azure",icon:"azure_icon",tooltip:"Microsoft Azure support is coming soon!",regions:[]}}},t.convertToSquidRegion=function(e,t){return"local"===t?"local":`${t}.${e}`},t.convertFromSquidRegion=function(e){if("local"===e)return{cloudId:"aws",region:"local"};const t=e.split(".");return{cloudId:t[1],region:t[0]}}},6504:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findMatchingPropertiesForKey=t.validateSchema=t.compileSchema=t.SUPPORTED_FIELD_TYPES_ARRAY=void 0;const n=r(9312),i=n.__importDefault(r(6236)),o=n.__importDefault(r(8414)),a=n.__importDefault(r(2091)),s=r(7008),u=r(7850),c=r(8315),l=new i.default({allErrors:!0,allowUnionTypes:!1,useDefaults:!1});function f(e){return l.compile(e)}function p(e,t){const r={exactMatch:[],parentsMatch:[]};if(!e.length)return r.exactMatch.push(t),r;r.parentsMatch.push(t);const n=[...e];for(;n.length;){const e=d(t,(0,u.notNullish)(n.shift()));for(const t of e){const e=p(n,t);r.parentsMatch.push(...e.parentsMatch),r.exactMatch.push(...e.exactMatch)}}return r}function d(e,t){var r,n;const i=(null===(r=e.properties)||void 0===r?void 0:r[t])?[null===(n=e.properties)||void 0===n?void 0:n[t]]:[];return e.patternProperties&&i.push(...Object.entries(e.patternProperties).filter((([e])=>new RegExp(e).test(t))).map((([e,t])=>t))),i}(0,o.default)(l),l.addKeyword({keyword:"isDate",type:"object",validate:(e,t)=>e===t instanceof Date}),l.addKeyword({keyword:"isJSON",type:"object",validate:(e,t)=>{try{const e=JSON.stringify(t);return JSON.parse(e),!0}catch(e){return!1}}}),l.addKeyword({keyword:"isComputed",validate:(e,t)=>!e||null!==t}),l.addKeyword({keyword:"isDefaultComputed",validate:(e,t)=>!e||null!==t}),l.addKeyword({keyword:"primaryKey",validate:(e,t)=>!e||null!==t}),l.addKeyword({keyword:"insertable",validate:(e,t)=>!e||null!==t}),l.addKeyword({keyword:"deletable",validate:(e,t)=>!e||null!==t}),l.addKeyword({keyword:"applyDefaultValueOn",validate:(e,t)=>!e||["always","empty","updateOrEmpty"].includes(e)}),l.addKeyword({keyword:"dataType",validate:(e,t)=>!0}),t.SUPPORTED_FIELD_TYPES_ARRAY=["string","integer","number","date","boolean","map","array","any"],t.compileSchema=f,t.validateSchema=function(e,t,r=[],n={}){const i=f(e),o=i(t);if(!r.length&&!o)throw new c.ValidationError("The data does not conform with the collection schema.",s.HttpStatus.BAD_REQUEST,{errors:i.errors});if(!o&&r.length)for(const e of(0,u.truthy)(i.errors)){let t=e.instancePath;if(e.params.missingProperty&&(t=`${t}/${e.params.missingProperty}`),t=t.slice(1).replace(/\//g,".")+".",r.some((e=>t.startsWith(e+"."))))throw new c.ValidationError(`${t} does not conform with the collection schema.`,s.HttpStatus.BAD_REQUEST)}!function(e,t,r){if(r&&t.readOnly||!1===t.insertable&&!r)throw new c.ValidationError("The schema does not allow this action",s.HttpStatus.BAD_REQUEST);for(const n of e){const e=(0,u.truthy)(n.path).join("."),i=p((0,u.truthy)(n.path),t);for(const t of i.exactMatch){if(t.readOnly&&"E"===n.kind)throw new c.ValidationError(`${e} is readonly`,s.HttpStatus.BAD_REQUEST);if(r&&!1===t.deletable&&"D"===n.kind)throw new c.ValidationError(`${e} is not deletable`,s.HttpStatus.BAD_REQUEST);if(!1===t.insertable&&"N"===n.kind)throw new c.ValidationError(`${e} is not insertable`,s.HttpStatus.BAD_REQUEST)}for(const t of i.parentsMatch)if(r&&t.readOnly)throw new c.ValidationError(`${e} is readonly`,s.HttpStatus.BAD_REQUEST)}}((0,u.truthy)((0,a.default)(n,t)),e,!!r.length)},t.findMatchingPropertiesForKey=d},5098:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GenerateNewApiKeyRequestSchema=t.DeleteApiKeyRequestSchema=t.DeleteCustomSecretRequestSchema=t.SetCustomSecretRequestSchema=void 0,t.SetCustomSecretRequestSchema={type:"object",required:["key","value"],properties:{key:{type:"string",pattern:"[a-zA-Z0-9-_+]",nullable:!1},value:{type:"string",nullable:!1}}},t.DeleteCustomSecretRequestSchema={type:"object",required:["key"],properties:{key:{type:"string",pattern:"[a-zA-Z0-9-_]+",nullable:!1,isSecret:{}}}},t.DeleteApiKeyRequestSchema={type:"object",required:["key"],properties:{key:{type:"string",pattern:"[a-zA-Z0-9-_]+",nullable:!1,isSecret:{collection:"apiKeys"}}}},t.GenerateNewApiKeyRequestSchema={type:"object",required:["key"],properties:{key:{type:"string",pattern:"[a-zA-Z0-9-_]+",nullable:!1,isSecret:{}}}}},1391:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3851:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},5791:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageFromClientSchema=void 0,t.MessageFromClientSchema={type:"object",required:["type"],oneOf:[{required:["payload"],properties:{type:{const:"acknowledge"},payload:{type:"array",nullable:!1,minItems:1,items:{type:"string",nullable:!1}}}},{properties:{type:{const:"catchup"}}},{properties:{type:{const:"kill"}}},{properties:{type:{const:"acquireLock"},payload:{type:"object",required:["mutex","exclusive","clientRequestId"],properties:{mutex:{type:"string"},exclusive:{type:"boolean"},clientRequestId:{type:"string"}}}}},{properties:{type:{const:"releaseLock"},payload:{type:"object",required:["lockId","clientRequestId"],properties:{lockId:{type:"string"},clientRequestId:{type:"string"}}}}}]}},7104:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9132:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SECONDS_PER_MONTH=t.SECONDS_PER_WEEK=t.SECONDS_PER_DAY=t.SECONDS_PER_HOUR=t.SECONDS_PER_MINUTE=void 0,t.SECONDS_PER_MINUTE=60,t.SECONDS_PER_HOUR=60*t.SECONDS_PER_MINUTE,t.SECONDS_PER_DAY=24*t.SECONDS_PER_HOUR,t.SECONDS_PER_WEEK=7*t.SECONDS_PER_DAY,t.SECONDS_PER_MONTH=30*t.SECONDS_PER_DAY},7682:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3185:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4825:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.arrayMergeCustomizer=t.asyncGroupBy=t.removeSorted=t.insertSorted=t.binarySearch=void 0;const n=r(8784);function i(e,t,r=((e,t)=>e>t?1:e<t?-1:0),n=0,o=e.length-1){if(o<n)return-1;const a=Math.trunc((n+o)/2);return 0===r(t,e[a])?a:r(t,e[a])>0?i(e,t,r,a+1,o):i(e,t,r,n,a-1)}t.binarySearch=i,t.insertSorted=function(e,t,r=((e,t)=>e>t?1:e<t?-1:0)){let n;for(n=e.length-1;n>=0&&r(e[n],t)>0;n--)e[n+1]=e[n];e[n+1]=t},t.removeSorted=function(e,t,r=((e,t)=>e>t?1:e<t?-1:0)){const n=i(e,t,r);n>-1&&e.splice(n,1)},t.asyncGroupBy=async function(e,t){const r={};for(const n of e){const e=await t(n);r[e]||(r[e]=[]),r[e].push(n)}return r},t.arrayMergeCustomizer=(e,t)=>(0,n.isArray)(e)?e.concat(t):void 0},7850:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateTruthy=t.notNullish=t.truthy=t.assertValidateTruthy=t.assertNotNullish=t.assertTruthy=void 0;const n=r(7008),i=r(1636),o=r(8315);function a(e,t){if(e)return;const r="function"==typeof t?t():t;throw r instanceof Error?r:new Error(null!=r?r:"Assertion error")}function s(e,t){if((0,i.isNotNullish)(e))return;const r="function"==typeof t?t():t;throw r instanceof Error?r:new Error(null!=r?r:"Assertion error")}function u(e,t){return a(e,t),e}t.assertTruthy=a,t.assertNotNullish=s,t.assertValidateTruthy=function(e,t,r=n.HttpStatus.BAD_REQUEST,i){a(e,(()=>new o.ValidationError(t,r,i)))},t.truthy=u,t.notNullish=function(e,t){return s(e,t),e},t.validateTruthy=function(e,t,r=n.HttpStatus.BAD_REQUEST,i){return u(e,(()=>new o.ValidationError(t,r,i)))}},8255:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeExecutionError=void 0;class r extends Error{constructor(e,t){super(e),this.details=t}}t.CodeExecutionError=r},7142:(e,t)=>{"use strict";function r(e){return/^local/.test(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.getApplicationHttpHeaders=t.getApplicationUrl=void 0,t.getApplicationUrl=function(e,t){const n=new URL("https://squid.cloud");n.host=`${t}.${e}.${n.host}`,r(e)&&(n.protocol="http",n.port="8000",function(e){return/android$/.test(e)}(e)&&(n.host="10.0.2.2"));const i=n.toString();return i.endsWith("/")?i:i+"/"},t.getApplicationHttpHeaders=function(e,t){const n={};return r(e)&&(n["X-Squid-AppId"]=t),n}},6485:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateShortId=t.generateId=void 0,t.generateId=function(){let e=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){const r=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"===t?r:3&r|8).toString(16)}))},t.generateShortId=function(e=18){const t="abcdefghijklmnopqrstuvwxyz0123456789";let r="";for(let n=0;n<e;n++)r+=t.charAt(Math.floor(Math.random()*t.length));return r}},3589:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LockManager=void 0;const n=r(2937),i=r(7850);t.LockManager=class{constructor(){this.locks={}}async lock(...e){if(this.canGetLock(...e))return void this.lockSync(...e);const t=Object.entries(this.locks).filter((([t])=>e.includes(t))).map((([e,t])=>t));await(0,n.lastValueFrom)((0,n.combineLatest)(t).pipe((0,n.filter)((e=>!e.includes(!0))),(0,n.take)(1))),await this.lock(...e)}release(...e){for(const t of e){const e=(0,i.truthy)(this.locks[t]);e.next(!1),e.complete(),delete this.locks[t]}}canGetLock(...e){return!e.some((e=>{var t;return null===(t=this.locks[e])||void 0===t?void 0:t.value}))}lockSync(...e){(0,i.assertTruthy)(this.canGetLock(...e));for(const t of e)this.locks[t]=new n.BehaviorSubject(!0)}}},1636:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNotNullish=void 0,t.isNotNullish=function(e){return null!=e}},8038:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.replaceKeyInRecord=t.replaceKeyInMap=t.deepReplace=t.deleteInPath=t.setInPath=t.getInPath=void 0;const n=r(9312).__importStar(r(8784)),i=r(7850);function o(e){return"object"==typeof e&&Reflect.getPrototypeOf(e)===Object.prototype}t.getInPath=function(e,t,r="."){const n=t.split(r);let o,a=e;for(;a&&n.length;){const e=(0,i.truthy)(n.shift());if(!(a instanceof Object&&e in a))return;o=a[e],a=o}return o},t.setInPath=function(e,t,r,a="."){var s;const u=t.split(a);let c=e;for(;u.length;){const e=(0,i.truthy)(u.shift());if(u.length){const t=o(c[e])&&null!==(s=n.clone(c[e]))&&void 0!==s?s:{};c[e]=t,c=t}else c[e]=r}},t.deleteInPath=function(e,t,r="."){var a;const s=t.split(r);let u=e;for(;s.length;){const e=(0,i.truthy)(s.shift());if(s.length){const t=o(u[e])&&null!==(a=n.clone(u[e]))&&void 0!==a?a:{};u[e]=t,u=t}else delete u[e]}},t.deepReplace=function e(t,r,n){for(const i in t)i===r?t[i]=n(t[i]):Array.isArray(t[i])?t[i].forEach((t=>e(t,r,n))):"object"==typeof t[i]&&e(t[i],r,n)},t.replaceKeyInMap=function(e,t,r){if(e.has(t)){const n=e.get(t);e.delete(t),e.set(r,n)}},t.replaceKeyInRecord=function(e,t,r){const n=e[t];void 0!==n&&(e[r]=n,delete e[t])}},4684:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.recodeValue=t.decodeValueForMapping=t.encodeValueForMapping=t.deserializeObj=t.serializeObj=t.normalizeJsonAsString=void 0;const n=r(5382);function i(e){if(Array.isArray(e))return e.map((e=>i(e)));if("object"!=typeof e||null===e||e instanceof Date)return e;const t=Object.keys(e),r={};return t.sort().forEach((t=>{r[t]=i(e[t])})),r}function o(e){try{return n.EJSON.stringify(e)}catch(e){throw console.error("Unable to serialize object",e,"\n\nSTACK:",(new Error).stack),e}}function a(e){if(void 0===e)throw new Error("INVALID_ENCODE_VALUE");return btoa(JSON.stringify(e))}function s(e){return JSON.parse(atob(e))}t.normalizeJsonAsString=function(e){return o(i(e))},t.serializeObj=o,t.deserializeObj=function(e){return n.EJSON.parse(e)},t.encodeValueForMapping=a,t.decodeValueForMapping=s,t.recodeValue=function(e){return s(a(e))}},8932:(e,t)=>{"use strict";function r(e){return`${(e.getUTCHours()+"").padStart(2,"0")}:${(e.getUTCMinutes()+"").padStart(2,"0")}:${(e.getUTCSeconds()+"").padStart(2,"0")}`}Object.defineProperty(t,"__esModule",{value:!0}),t.dateToTimeString=t.msPastMidnightToTimeString=t.debeziumStringToInterval=t.base64ToBinary=t.base64ToString=t.isoStringToDate=t.msToDate=t.daysPastEpochToDate=t.moneyStringToNumber=t.JSONToString=t.stringToJSON=t.stringToBuffer=t.bufferToString=t.numberToString=t.stringToNumber=t.intToBoolean=t.booleanToInt=t.unchanged=void 0,t.unchanged=function(e){return e},t.booleanToInt=function(e){return e?1:0},t.intToBoolean=function(e){return!!e},t.stringToNumber=function(e){return Number(e)},t.numberToString=function(e){return e+""},t.bufferToString=function(e){return e.toString()},t.stringToBuffer=function(e){return Buffer.from(e)},t.stringToJSON=function(e){return JSON.parse(e)},t.JSONToString=function(e){return JSON.stringify(e)},t.moneyStringToNumber=function(e){return Number(e.replace(/[^0-9\.]+/g,""))},t.daysPastEpochToDate=function(e){return new Date(864e5*e)},t.msToDate=function(e){return new Date(e)},t.isoStringToDate=function(e){return new Date(e)},t.base64ToString=function(e){return atob(e)},t.base64ToBinary=function(e){const t=atob(e);let r="";for(let e=0;e<t.length;e++)r+=t[e].charCodeAt(0).toString(2);return r},t.debeziumStringToInterval=function(e){const t=e.match(/^P(\d+Y)?(\d+M)?(\d+D)?T?(\d+H)?(\d+M)?(\d+S)?$/);if(!t)throw new Error(`Interval string is not properly formatted: ${e}`);return{years:parseInt(t[1])||0,months:parseInt(t[2])||0,days:parseInt(t[3])||0,hours:parseInt(t[4])||0,minutes:parseInt(t[5])||0,seconds:parseInt(t[6])||0}},t.msPastMidnightToTimeString=function(e){return r(new Date(e))},t.dateToTimeString=r},2608:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.appendQueryParams=void 0,t.appendQueryParams=function(e,t){const r=new URL(e),n=new URLSearchParams(r.search);for(const e in t)t.hasOwnProperty(e)&&n.set(e,t[e]);return r.search=n.toString(),r.toString()}},8315:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hasOnlyKeys=t.isRightType=t.isNotEmpty=t.validateQueryLimit=t.validateMutations=t.validateOpenIdProviderType=t.validateOpenIdProvider=t.validateFieldSort=t.ValidationError=void 0;const n=r(7850);class i extends Error{constructor(e,t,r){super(e),this.statusCode=t,this.details=r}}function o(e){if(!e||!e.match(/^[a-zA-Z][a-zA-Z0-9!@#$%^&*~_]{0,49}$/))throw new Error("A document id and a collection id can contain only a-z, A-Z, 0-9,!@#$%^&*~_, startingwith a letter, at least one character, and up to 50.")}function a(e){if(!e||"string"!=typeof e)throw new Error("Field name has to be a non-empty string");if("__docId__"!==e&&!e.match(/^[a-zA-Z][a-zA-Z0-9!@#$%^&*~_]{0,49}$/))throw new Error("A Field name can contain only a-z, A-Z, 0-9,!@#$%^&*~_, starting with a letter, at least one character, and up to 50. Field name: "+e)}function s(e){(0,n.assertTruthy)(["auth0"].includes(e),"INVALID_OPEN_ID_PROVIDER_TYPE")}function u(e){if(!e||"object"!=typeof e)throw new Error("Property mutation need to be a JSON object.");if(!["update","applyNumericFn","applyStringFn"].includes(e.type))throw new Error("Property mutation can be of type 'update', 'applyNumericFn', 'applyStringFn'");switch(e.type){case"update":!function(e){if(!e||"update"!==e.type)throw new Error("Update value property mutation has to be of type update");if(void 0===e.value)throw new Error("Value has to exist in an update value property mutation..")}(e);break;case"applyNumericFn":!function(e){if(!e||"applyNumericFn"!==e.type)throw new Error("Apply numeric fn mutation has to be of type applyNumericFn");if(!["increment"].includes(e.fn))throw new Error("Invalid fn for apply numeric fn.");if("number"!=typeof e.value)throw new Error("The value in an apply numeric fn function has to be numeric.")}(e);break;case"applyStringFn":!function(e){if(!e||"applyStringFn"!==e.type)throw new Error("Apply string fn mutation has to be of type applyStringFn");if(!["trim","extendString"].includes(e.fn))throw new Error("Invalid fn for apply string fn.");if("string"!=typeof e.value)throw new Error("The value in an apply string fn function has to be a string.")}(e)}}function c(e){if(!e)throw new Error("Mutation cannot be empty");if(!["insert","delete","update"].includes(e.type))throw new Error("Mutation type has to be one of 'insert', 'delete', or 'update'");switch(function(e){if("string"!=typeof e||!e)throw new Error("Collection path has to be a non empty string");o(e)}(e.squidDocIdObj.collectionName),o(e.squidDocIdObj.docId),e.type){case"delete":!function(e){if(!e||"delete"!==e.type)throw new Error("Mutation has to be non empty with type delete.")}(e);break;case"insert":!function(e){if(!e||"insert"!==e.type)throw new Error("Mutation has to be non empty with type insert.");if(!e.properties||"object"!=typeof e.properties)throw new Error("The properties in insert mutation need to be a JSON object.");for(const[t]of Object.entries(e.properties))a(t)}(e);break;case"update":!function(e){if(!e||"update"!==e.type)throw new Error("Mutation has to be non empty with type update.");if(!e.properties||"object"!=typeof e.properties)throw new Error("The properties in update mutation need to be a JSON object.");const t=Object.entries(e.properties);for(const[e,r]of t){a(e);for(const e of r)u(e)}}(e)}}function l(e,t){return Array.isArray(e)?e.every((e=>typeof e===t)):typeof e===t}function f(e,t){return!Array.isArray(e)&&[...Object.keys(e)].every((e=>t.includes(e)))}t.ValidationError=i,t.validateFieldSort=function(e){if(!(e instanceof Object))throw new Error("Field sort has to be an object");(0,n.assertTruthy)(f(e,["fieldName","asc"]),"Field sort should only contain a fieldName and asc"),(0,n.assertTruthy)(l(e.asc,"boolean")),a(e.fieldName)},t.validateOpenIdProvider=function(e){return(0,n.assertTruthy)(e,"INVALID_PROVIDER"),s(e.providerType),(0,n.assertTruthy)(e.providerType,"INVALID_CLIENT_ID"),(0,n.assertTruthy)(e.clientId,"INVALID_CLIENT_ID"),(0,n.assertTruthy)(e.domain,"INVALID_DOMAIN"),e},t.validateOpenIdProviderType=s,t.validateMutations=function(e){if(!(e&&e instanceof Array&&e.length))throw new Error("The list of mutations has to be a non-empty array.");for(const t of e)c(t)},t.validateQueryLimit=function(e){(0,n.assertTruthy)(l(e,"number")),-1!==e&&((0,n.assertTruthy)(e>0,"query limit has to be greater than 0"),(0,n.assertTruthy)(Math.floor(e)===e,"query limit has to be an integer"),(0,n.assertTruthy)(e<=2e4,"Limit can be maximum 20000"))},t.isNotEmpty=function(e){return function(e){if(null!=e&&"string"!=typeof e)throw new Error("Unexpected input type "+typeof e)}(e),"string"==typeof e&&!!e},t.isRightType=l,t.hasOnlyKeys=f},3811:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isWebhookResponse=void 0,t.isWebhookResponse=function(e){return e&&e.__isWebhookResponse__}},4268:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ApiManager=void 0;const n=r(575),i=r(8784),o=r(2937),a=r(9978);t.ApiManager=class{constructor(e,t,r,n={}){this.clientId=e,this.rpcManager=t,this.socketManager=r,this.apiServerUrlOverrideMapping=n,this.ongoingApiExecutions={},r.observeNotifications().pipe((0,o.filter)((e=>"api"===e.type)),(0,a.map)((e=>e))).subscribe((e=>{this.handleApiResponse(e.clientRequestId,e).then()}))}callApiAndSubscribe(e,t,r){const i=(0,n.generateId)(),a=new o.Subject;this.ongoingApiExecutions[i]=a;const s={integrationId:e,endpointId:t,request:r,clientId:this.clientId,clientRequestId:i,serverUrlOverride:this.apiServerUrlOverrideMapping[e]};return this.rpcManager.post("api/call",s).catch((n=>{console.error("Got error while calling API",e,t,r,n),a.error(n),a.complete()})),a.pipe((0,o.finalize)((()=>{delete this.ongoingApiExecutions[i]})),(0,o.share)())}async handleApiResponse(e,t){const r=this.ongoingApiExecutions[e];r&&(t.success?r.next((0,n.deserializeObj)(t.payload)):r.error((0,i.pick)(t,"httpStatus","payload")),r.complete())}}},9526:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AuthManager=void 0;const n=r(2937);t.AuthManager=class{constructor(e,t){this.destructManager=e,this.apiKey=t,this.authIdTokenSet=new n.BehaviorSubject(!1),this.authIdTokenObservableSubject=new n.Subject,this.shouldWaitForAuth=!1,this.observeAuthIdToken().subscribe((e=>{this.idToken=e,this.authIdTokenSet.next(!0)}))}setAuthIdToken(e){this.shouldWaitForAuth=!0,this.authIdTokenSet.next(!1),this.authIdTokenObservableSubject.next(e&&"string"!=typeof e?(0,n.from)(e):(0,n.of)(e))}observeAuthIdToken(){return this.authIdTokenObservableSubject.pipe((0,n.switchMap)((e=>e)),(0,n.takeUntil)(this.destructManager.isDestructingObservable))}async waitForReadyState(){this.shouldWaitForAuth&&!this.destructManager.isDestructing&&await(0,n.firstValueFrom)((0,n.race)(this.authIdTokenSet.asObservable().pipe((0,n.filter)(Boolean)),this.destructManager.isDestructingObservable))}getApiKey(){return this.apiKey}getAuthToken(){return this.apiKey?{type:"ApiKey",token:this.apiKey}:this.idToken?{type:"Bearer",token:this.idToken}:void 0}}},8862:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BackendFunctionManager=void 0;const n=r(575),i=r(2937),o=r(9978);t.BackendFunctionManager=class{constructor(e,t,r){this.clientId=e,this.rpcManager=t,this.socketManager=r,this.ongoingFunctionExecutions={},r.observeNotifications().pipe((0,i.filter)((e=>"backendFunction"===e.type)),(0,o.map)((e=>e))).subscribe((e=>{this.handleFunctionResponse(e.clientRequestId,e.payload)}))}executeFunctionAndSubscribe(e,...t){const r=(0,n.generateId)(),o=new i.Subject;this.ongoingFunctionExecutions[r]=o;const a={functionName:e,paramsArrayStr:(0,n.serializeObj)(t),clientId:this.clientId,clientRequestId:r};return this.rpcManager.post("backend-function/execute",a).catch((t=>{console.error("Got error while executing function",e,t),o.error(t),o.complete()})),o.pipe((0,i.finalize)((()=>{delete this.ongoingFunctionExecutions[r]})),(0,i.share)())}handleFunctionResponse(e,t){const r=this.ongoingFunctionExecutions[e];if(!r)return;const i=(0,n.deserializeObj)(t);i.success?r.next(i.response):(r.error(new Error(i.response)),r.complete())}}},1600:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CollectionReferenceFactory=void 0;const n=r(5660);t.CollectionReferenceFactory=class{constructor(e,t,r,n){this.documentReferenceFactory=e,this.queryBuilderFactory=t,this.joinQueryBuilderFactory=r,this.documentIdentityService=n,this.collections=new Map,this.documentIdentityService.observeChanges().subscribe(this.migrateDocIds.bind(this))}get(e,t){let r=this.collections.get(t);r||(r=new Map,this.collections.set(t,r));let i=r.get(e);return i||(i=new n.CollectionReference(e,t,this.documentReferenceFactory,this.queryBuilderFactory,this.joinQueryBuilderFactory),r.set(e,i),i)}migrateDocIds(e){this.collections.forEach((t=>{for(const[r,n]of t)n.migrateDocIds(e)}))}}},5660:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CollectionReference=void 0;const n=r(575),i=r(2937);t.CollectionReference=class{constructor(e,t,r,i,o){this.collectionName=e,this.integrationId=t,this.documentReferenceFactory=r,this.queryBuilderFactory=i,this.joinQueryBuilderFactory=o,this.documents=new Map,this.refId=(0,n.generateId)()}doc(e){this.integrationId===n.IntegrationType.built_in_db?(e&&(0,n.assertTruthy)("string"==typeof e,"Invalid doc id"),e={__id:e||(0,n.generateId)()}):e?(0,n.assertTruthy)("object"==typeof e,"Invalid doc id"):e={__squidId:(0,n.generateId)()};const t=(0,n.normalizeJsonAsString)(e),r=(0,n.getSquidDocId)(t,this.collectionName,this.integrationId);let i=this.documents.get(t);return i||(i=this.documentReferenceFactory.create(r,this.queryBuilderFactory),this.documents.set(t,i),i)}query(){return this.queryBuilderFactory.get(this.collectionName,this.integrationId)}joinQuery(e){return this.joinQueryBuilderFactory.getForJoin(this.collectionName,this.integrationId,null!=e?e:this.collectionName)}or(...e){return new o(...e)}migrateDocIds(e){for(const[t,r]of this.documents)r.migrateDocIds(e);Object.entries(e).forEach((([e,t])=>{const r=(0,n.parseSquidDocId)(e),i=(0,n.parseSquidDocId)(t);(0,n.replaceKeyInMap)(this.documents,r.docId,i.docId)}))}};class o{constructor(...e){if(0===e.length)throw new Error("At least one query builder must be provided");this.builders=e}changes(){throw new Error("Changes are not supported for merged queries")}snapshot(){return(0,i.firstValueFrom)(this.snapshots(!1))}snapshots(e){const t=this.builders.map((t=>t.snapshots(e)));return this.or(this.builders[0].getSortOrder(),...t)}or(e,...t){return(0,i.combineLatest)([...t]).pipe((0,i.map)((t=>{const r=new Set,n=t.flat(),i=[];for(const e of n)r.has(e.data)||(r.add(e.data),i.push(e));return i.sort(((t,r)=>{for(const{fieldName:n,asc:i}of e){const e=t.data[n],o=r.data[n];if(e<o)return i?-1:1;if(e>o)return i?1:-1}return 0}))})))}getSortOrder(){throw new Error("getSortOrder is not supported for merged queries")}}},4967:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DataManager=void 0;const n=r(575),i=r(3910),o=r(2937),a=r(9978),s="dataManager_runInTransaction";t.DataManager=class{constructor(e,t,r,n,i,a,s,u){this.documentStore=e,this.mutationSender=t,this.socketManager=r,this.querySubscriptionManager=n,this.queryBuilderFactory=i,this.lockManager=a,this.destructManager=s,this.documentIdentityService=u,this.docIdToLocalTimestamp=new Map,this.batchClientRequestIds=new Set,this.docIdToServerTimestamp=new Map,this.pendingIncomingUpdates=new Map,this.pendingOutgoingMutations=new Map,this.pendingOutgoingMutationsChanged=new o.Subject,this.outgoingMutationsEmpty=new o.BehaviorSubject(!0),this.failedDocsToResync=[],this.refreshDocIdToTimestamp=new Map,this.handleIncomingMessagesForTests=!0,this.destructManager.onDestruct((()=>{this.destruct()})),this.documentIdentityService.observeChanges().subscribe(this.migrateDocIds.bind(this)),this.handleNotifications(),this.startDeleteExpiredTimestampsJob(),this.handleOrphanDocs(),this.outgoingMutationsEmpty.subscribe((e=>{this.querySubscriptionManager.safeToSendQueriesToServer.next(e)}))}getProperties(e){return this.documentStore.getDocumentOrUndefined(e)}isDirty(e){var t;if(null===(t=this.pendingOutgoingMutations.get(e))||void 0===t?void 0:t.length)return!0;const r=this.docIdToServerTimestamp.get(e),n=r&&!r.expireTimestamp?r.timestamp:void 0,i=this.docIdToLocalTimestamp.get(e);return!((!i||n)&&!this.isForgotten(e)&&!this.isLocalOnly(e)&&i===n)}async runInTransaction(e,t){return t?((0,n.assertTruthy)(t===this.currentTransactionId,"Transaction already ended."),e(t).then((e=>Promise.resolve()))):(this.lockManager.canGetLock(s)?this.lockManager.lockSync(s):await this.lockManager.lock(s),new Promise((async(t,r)=>{try{this.currentTransactionId=(0,n.generateId)();try{return await e(this.currentTransactionId)}catch(e){console.error("error while executing callback function in transaction",e)}finally{this.finishTransaction({resolve:t,reject:r})}}catch(e){console.error("error while executing transaction",e)}finally{this.lockManager.release(s)}})))}async applyOutgoingMutation(e,t){var r;const i=e.squidDocIdObj,o=(0,n.getSquidDocId)(i),a=null===(r=this.pendingOutgoingMutations.get(o))||void 0===r?void 0:r.slice(-1)[0];if(a&&!a.sentToServer)a.mutation=(0,n.reduceMutations)([a.mutation,e])[0],this.outgoingMutationsEmpty.next(!1);else{const t={mutation:this.removeInternalProperties(e),sentToServer:!1},r=this.pendingOutgoingMutations.get(o)||[];r.push(t),this.pendingOutgoingMutations.set(o,r),this.outgoingMutationsEmpty.next(!1),this.pendingOutgoingMutationsChanged.next()}return this.runInTransaction((async()=>{const t=this.documentStore.getDocumentOrUndefined(o),r="delete"===e.type?void 0:"update"===e.type?(0,n.applyUpdateMutation)(t,e):Object.assign({},e.properties);this.updateDocumentFromSnapshot(o,r)&&("insert"===e.type&&this.docIdToLocalTimestamp.set(o,(new Date).getTime()),this.querySubscriptionManager.setClientRequestIdsForLocalDoc(o,r).forEach((e=>this.batchClientRequestIds.add(e))))}),t)}async runInTransactionSync(e,t){if(t)return(0,n.assertTruthy)(t===this.currentTransactionId,"Transaction already ended."),void e(t);await this.lockManager.lock(s);try{this.currentTransactionId=(0,n.generateId)();try{return e(this.currentTransactionId)}catch(e){console.error("error while executing callback function in transaction",e)}finally{this.finishTransaction()}}catch(e){console.error("error while executing transaction",e)}finally{this.lockManager.release(s)}}removeInternalProperties(e){if("delete"===e.type)return e;const t=Object.assign(Object.assign({},e),{properties:Object.assign({},e.properties)});return delete t.__docId__,delete t.__ts__,t}handleNotifications(){this.socketManager.observeNotifications().pipe((0,o.filter)((e=>"mutations"===e.type)),(0,a.map)((e=>e))).subscribe((e=>{this.outgoingMutationsEmpty.pipe((0,o.filter)(Boolean),(0,o.take)(1)).subscribe((()=>{this.handleIncomingMutations(e.payload)}))})),this.socketManager.observeNotifications().pipe((0,o.filter)((e=>"query"===e.type)),(0,a.map)((e=>e))).subscribe((e=>{this.outgoingMutationsEmpty.pipe((0,o.filter)(Boolean),(0,o.take)(1)).subscribe((()=>{this.handleIncomingQuerySnapshots(e.payload)}))}))}handleIncomingMutations(e){if(!this.handleIncomingMessagesForTests)return;const t=e.reduce(((e,t)=>this.querySubscriptionManager.hasOngoingQuery(t.clientRequestId)?(e[t.squidDocId]={properties:t.doc,timestamp:t.mutationTimestamp},e):e),{});this.applyIncomingUpdates(t)}handleIncomingQuerySnapshots(e){if(!this.handleIncomingMessagesForTests)return;if(!this.querySubscriptionManager.hasOngoingQuery(e.clientRequestId))return;const t=this.querySubscriptionManager.getQuery(e.clientRequestId),r={};for(const i of e.docs){const e=(0,n.getSquidDocId)(i.__docId__,t.collectionName,t.integrationId);r[e]={properties:i,timestamp:i.__ts__}}this.querySubscriptionManager.setGotResponseFromServer(e.clientRequestId),this.runInTransactionSync((t=>{this.batchClientRequestIds.add(e.clientRequestId),this.applyIncomingUpdates(r,t)&&this.querySubscriptionManager.hasSubscription(e.clientRequestId)&&this.batchClientRequestIds.delete(e.clientRequestId)})).then()}applyIncomingUpdates(e,t){let r=!1;const n=new Set;for(const[t,i]of Object.entries(e))this.addPendingIncomingUpdate(t,i),this.pendingIncomingUpdates.get(t)||(r=!0),n.add(t);return this.runInTransactionSync((()=>{for(const e of n)this.maybeApplyIncomingUpdate(e)}),t).then(),r}addPendingIncomingUpdate(e,t){const r=this.pendingIncomingUpdates.get(e),n=this.docIdToServerTimestamp.get(e);r&&r.timestamp>t.timestamp||n&&n.timestamp>t.timestamp||this.pendingIncomingUpdates.set(e,t)}maybeApplyIncomingUpdate(e){const t=this.pendingIncomingUpdates.get(e);if(!t)return;const r=this.pendingOutgoingMutations.get(e);r&&r.length||(this.updateDocumentFromSnapshot(e,t.properties),this.acknowledgeDocument(e,t.timestamp,!t.properties),this.docIdToLocalTimestamp.set(e,t.timestamp),this.pendingIncomingUpdates.delete(e),this.querySubscriptionManager.setClientRequestIdsForLocalDoc(e,t.properties).forEach((e=>{this.batchClientRequestIds.add(e)})),t.properties&&(this.querySubscriptionManager.findQueriesForDocument(t.properties,e).length||this.forgetDocument(e)))}destruct(){this.stopDeleteExpiredTimestampsJob()}stopDeleteExpiredTimestampsJob(){void 0!==this.deleteExpiredTimestampsInterval&&(clearInterval(this.deleteExpiredTimestampsInterval),this.deleteExpiredTimestampsInterval=void 0)}startDeleteExpiredTimestampsJob(){this.deleteExpiredTimestampsInterval=setInterval((()=>{const e=[...this.docIdToServerTimestamp.entries()].filter((([e,t])=>!(!t.expireTimestamp||t.expireTimestamp>Date.now()||this.isTracked(e))));for(const[t]of e)this.docIdToServerTimestamp.delete(t),this.forgetDocument(t)}),1e4)}isTracked(e){if(this.pendingIncomingUpdates.get(e))return!0;const t=this.pendingOutgoingMutations.get(e);return!(!t||!t.length)||this.querySubscriptionManager.hasOngoingQueryForDocId(e)}isForgotten(e){return this.documentStore.hasData(e)&&!this.isTracked(e)}isLocalOnly(e){return!this.hasBeenAcknowledged(e)&&this.documentStore.hasData(e)}hasBeenAcknowledged(e){return this.docIdToServerTimestamp.has(e)}updateDocumentFromSnapshot(e,t){const r=this.documentStore.getDocumentOrUndefined(e);return!(!r&&!t||r===t)&&((!r||!t||(0,n.normalizeJsonAsString)(Object.assign(Object.assign({},t),{__ts__:void 0}))!==(0,n.normalizeJsonAsString)(r))&&(this.documentStore.saveDocument(e,t),!0))}finishTransaction(e){this.currentTransactionId=void 0;const t=[...this.batchClientRequestIds.values()];this.batchClientRequestIds.clear(),this.querySubscriptionManager.notifyAllSubscriptions(t),this.sendAllUnsentOutgoingMutations(e).then()}async sendAllUnsentOutgoingMutations(e){const t=this.groupOutgoingMutationsByIntegrationId();try{await i.PromisePool.for(t).withConcurrency(t.length||1).handleError((e=>{throw e})).process((async([e,t])=>{await this.sendMutationsForIntegration([...t],e)})),this.pendingOutgoingMutations.size||this.outgoingMutationsEmpty.next(!0),await this.refreshUpdatedDocuments(),this.hasPendingSentMutations()?(await(0,o.firstValueFrom)(this.pendingOutgoingMutationsChanged.pipe((0,o.filter)((()=>!this.hasPendingSentMutations())))),null==e||e.resolve()):null==e||e.resolve()}catch(t){this.pendingOutgoingMutations.size||(this.outgoingMutationsEmpty.next(!0),await this.resyncFailedUpdates()),null==e||e.reject(t)}}async sendMutationsForIntegration(e,t){try{const{timestamp:r,idResolutionMap:n={},refreshList:i=[]}=await this.mutationSender.sendMutations(e.map((e=>e.mutation)),t);await this.documentIdentityService.migrate(n),i.forEach((e=>{this.refreshDocIdToTimestamp.set(n[e]||e,r)}));for(const t of e){let e=this.removeOutgoingMutation(t);n[e]&&(e=n[e]),this.acknowledgeDocument(e,r),this.isTracked(e)||(this.setExpiration(e,!0),this.forgetDocument(e))}}catch(t){for(const t of e){const e=this.removeOutgoingMutation(t);this.forgetDocument(e),(this.hasBeenAcknowledged(e)||"insert"===t.mutation.type)&&this.failedDocsToResync.push(e)}throw t}}removeOutgoingMutation(e){const t=(0,n.getSquidDocId)(e.mutation.squidDocIdObj),r=(0,n.truthy)(this.pendingOutgoingMutations.get(t));return r.splice(r.indexOf(e),1),r.length||this.pendingOutgoingMutations.delete(t),this.pendingOutgoingMutationsChanged.next(),t}async resyncFailedUpdates(){const e=[...this.failedDocsToResync];this.failedDocsToResync.splice(0);for(const t of e){this.setExpiration(t,!0);try{const e=await this.queryBuilderFactory.getForDocument(t).snapshot();if((0,n.truthy)(e.length<=1,"Got more than one doc for the same id:"+t),!e.length){this.forgetDocument(t);const e=this.querySubscriptionManager.setClientRequestIdsForLocalDoc(t,void 0);this.querySubscriptionManager.notifyAllSubscriptions(e)}}catch(e){this.querySubscriptionManager.errorOutAllQueries(t,e)}}}async refreshUpdatedDocuments(){var e;const t=[];for(const[r,n]of this.refreshDocIdToTimestamp.entries()){const i=null===(e=this.docIdToServerTimestamp.get(r))||void 0===e?void 0:e.timestamp;i&&i>n||t.push(r)}this.refreshDocIdToTimestamp.clear();for(const e of t)try{await this.queryBuilderFactory.getForDocument(e).snapshot()}catch(e){}}groupOutgoingMutationsByIntegrationId(){const e={};for(const[t,r]of[...this.pendingOutgoingMutations.entries()]){const t=r[r.length-1];if(t&&!t.sentToServer){const r=t.mutation.squidDocIdObj.integrationId;(e[r]||(e[r]=[])).push(t),t.sentToServer=!0}}return Object.entries(e)}handleOrphanDocs(){this.querySubscriptionManager.onOrphanDocuments.subscribe((e=>{for(const t of e)this.isTracked(t)||this.forgetDocument(t)}))}acknowledgeDocument(e,t,r=!1){this.docIdToServerTimestamp.set(e,{timestamp:t}),this.setExpiration(e,r)}setExpiration(e,t){const r=this.docIdToServerTimestamp.get(e);r&&(r.expireTimestamp=t?Date.now()+2e4:void 0)}forgetDocument(e){this.docIdToLocalTimestamp.delete(e),this.setExpiration(e,!0)}migrateDocIds(e){Object.entries(e).forEach((([e,t])=>{(0,n.replaceKeyInMap)(this.docIdToLocalTimestamp,e,t),(0,n.replaceKeyInMap)(this.docIdToServerTimestamp,e,t)}))}hasPendingSentMutations(){for(const e of this.pendingOutgoingMutations.values())for(const t of e)if(t.sentToServer)return!0;return!1}}},7787:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DestructManager=void 0;const n=r(2937);t.DestructManager=class{constructor(){this.predestructors=[],this.destructors=[],this.isDestructedSubject=new n.BehaviorSubject(!1)}get isDestructing(){return this.isDestructedSubject.value}get isDestructingObservable(){return this.isDestructedSubject.asObservable().pipe((0,n.filter)(Boolean))}onPreDestruct(e){this.predestructors.push(e)}onDestruct(e){this.destructors.push(e)}async destruct(){if(this.isDestructing)return;this.isDestructedSubject.next(!0);const e=this.predestructors.concat(this.destructors);let t=e.shift();for(;t;){try{await t()}catch(e){console.error("Error while destructing Squid",e)}t=e.shift()}}}},4605:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DistributedLockImpl=t.DistributedLockManager=void 0;const n=r(575),i=r(2937),o=r(9978);t.DistributedLockManager=class{constructor(e,t,r){this.socketManager=e,this.clientId=t,this.ongoingLocks={},this.acquireLockMessagesFromServer=this.socketManager.observeNotifications().pipe((0,i.filter)((e=>"lockAcquired"===e.type))),this.releaseLockMessagesFromServer=this.socketManager.observeNotifications().pipe((0,i.filter)((e=>"lockReleased"===e.type))),r.onPreDestruct((()=>{this.releaseAllLocks()})),this.socketManager.observeConnectionReady().subscribe((e=>{e||this.releaseAllLocks()})),this.releaseLockMessagesFromServer.subscribe((e=>{const t=this.ongoingLocks[e.payload.clientRequestId];void 0!==t&&t.release().then()}))}async lock(e,t){const r=(0,n.generateId)(),s={type:"acquireLock",payload:{mutex:e,exclusive:t,clientRequestId:r}};this.socketManager.sendMessage(s);const u=await(0,i.firstValueFrom)((0,i.race)((0,i.timer)(5e3).pipe((0,i.take)(1),(0,o.map)((()=>({payload:{error:"TIMEOUT_GETTING_LOCK",lockId:void 0}})))),this.acquireLockMessagesFromServer.pipe((0,i.filter)((e=>e.payload.clientRequestId===r)))));if(!u.payload.lockId)throw new Error(`Failed to acquire lock: ${u.payload.error}`);const c=u.payload.lockId,l=new a(c,this.clientId,r,this.ongoingLocks,this.socketManager);return this.ongoingLocks[c]=l,l}releaseAllLocks(){for(const[e,t]of Object.entries(this.ongoingLocks))t.release().then(),delete this.ongoingLocks[e]}};class a{constructor(e,t,r,n,o){this.lockId=e,this.clientId=t,this.clientRequestId=r,this.ongoingLocks=n,this.socketManager=o,this.released=!1,this.onReleaseSubject=new i.Subject}async release(){if(this.released)return;this.released=!0,delete this.ongoingLocks[this.lockId];const e={type:"releaseLock",payload:{lockId:this.lockId,clientRequestId:this.clientRequestId}};this.socketManager.sendMessage(e),this.onReleaseSubject.next()}observeRelease(){return this.onReleaseSubject.asObservable()}isReleased(){return this.released}}t.DistributedLockImpl=a},2256:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(2937);t.default=class{constructor(e,t){this.documentStore=e,this.destructManager=t,this.changeNotifier=new n.BehaviorSubject({}),this.destructManager.onDestruct((()=>{this.changeNotifier.complete()}))}migrate(e){Object.entries(e).forEach((([e,t])=>{this.documentStore.migrateDocId(e,t)})),this.changeNotifier.next(e)}observeChanges(){return this.changeNotifier.asObservable()}}},2417:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentReferenceFactory=void 0;const n=r(575),i=r(4516);t.DocumentReferenceFactory=class{create(e,t){return new i.DocumentReference(e,(0,n.truthy)(this.dataManager,"dataManager not found"),t)}setDataManager(e){this.dataManager=e}}},4516:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentReference=void 0;const n=r(9312),i=r(575),o=n.__importStar(r(8784)),a=r(2937);t.DocumentReference=class{constructor(e,t,r){this._squidDocId=e,this.dataManager=t,this.queryBuilderFactory=r,this.refId=(0,i.generateId)()}get squidDocId(){return this._squidDocId}get data(){return(0,i.truthy)(this.dataManager.getProperties(this.squidDocId))}get hasData(){return!!this.dataManager.getProperties(this.squidDocId)}async snapshot(){if(this.isTracked()&&this.dataManager.getProperties(this.squidDocId))return this;const e=await this.queryBuilderFactory.getForDocument(this.squidDocId).snapshot();return(0,i.truthy)(e.length<=1,"Got more than one doc for the same id:"+this.squidDocId),e.length?this:void 0}snapshots(){return this.queryBuilderFactory.getForDocument(this.squidDocId).snapshots().pipe((0,a.map)((e=>((0,i.truthy)(e.length<=1,"Got more than one doc for the same id:"+this.squidDocId),e.length?this:void 0))))}isDirty(){return this.dataManager.isDirty(this.squidDocId)}isTracked(){return this.dataManager.isTracked(this.squidDocId)}async update(e,t){const r={};Object.entries(e).forEach((([e,t])=>{const n=void 0!==t?{type:"update",value:t}:{type:"removeProperty"};r[e]=[n]}));const n={type:"update",squidDocIdObj:(0,i.parseSquidDocId)(this.squidDocId),properties:r};return this.dataManager.applyOutgoingMutation(n,t)}async setInPath(e,t,r){return this.update({[e]:o.cloneDeep(t)},r)}async deleteInPath(e,t){return this.update({[e]:void 0},t)}incrementInPath(e,t,r){const n={type:"applyNumericFn",fn:"increment",value:t},o={type:"update",squidDocIdObj:(0,i.parseSquidDocId)(this.squidDocId),properties:{[e]:[n]}};return this.dataManager.applyOutgoingMutation(o,r)}decrementInPath(e,t,r){return this.incrementInPath(e,-t,r)}async insert(e,t){const r=(0,i.parseSquidDocId)(this.squidDocId);let n=(0,i.deserializeObj)(r.docId);n.__squidId&&(n={});const o={type:"insert",squidDocIdObj:r,properties:Object.assign(Object.assign(Object.assign({},e),{__docId__:r.docId}),n)};return this.dataManager.applyOutgoingMutation(o,t)}async delete(e){const t={type:"delete",squidDocIdObj:(0,i.parseSquidDocId)(this.squidDocId)};return this.dataManager.applyOutgoingMutation(t,e)}migrateDocIds(e){const t=e[this.squidDocId];t&&(this._squidDocId=t)}}},5182:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentStore=void 0;const n=r(575),i=r(8784);t.DocumentStore=class{constructor(){this.squidDocIdToDoc=new Map}saveDocument(e,t){const r=this.squidDocIdToDoc.get(e);if(void 0===r&&!t)return;if(void 0!==r){if(t){const r=(0,i.cloneDeep)(t),n=this.removeInternalProperties(r);return this.squidDocIdToDoc.set(e,n),n}return void this.squidDocIdToDoc.delete(e)}const n=this.removeInternalProperties(t);return this.squidDocIdToDoc.set(e,n),t}hasData(e){return void 0!==this.squidDocIdToDoc.get(e)}getDocument(e){return(0,n.truthy)(this.getDocumentOrUndefined(e))}getDocumentOrUndefined(e){return this.squidDocIdToDoc.get(e)}sortAndLimitDocs(e,t){if(!e||0===e.size)return[];const r=[...e].map((e=>this.squidDocIdToDoc.get(e))).filter(n.isNotNullish),{sortOrder:o,limit:a}=t,s=o.map((e=>e.fieldName)),u=o.map((e=>e.asc?"asc":"desc")),c=(0,i.orderBy)(r,s,u);return a<0?c:r.slice(0,a)}removeInternalProperties(e){if(!e)return;const t=Object.assign({},e);return delete t.__ts__,t}migrateDocId(e,t){const r=this.getDocument(e);(0,n.replaceKeyInMap)(this.squidDocIdToDoc,e,t);const i=(0,n.parseSquidDocId)(t),o=(0,n.deserializeObj)(i.docId);this.saveDocument(t,Object.assign(Object.assign(Object.assign({},r),o),{__docId__:i.docId}))}}},5621:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GraphQLClientFactory=void 0;const n=r(5857);t.GraphQLClientFactory=class{constructor(e){this.rpcManager=e,this.clientsMap=new Map}get(e){let t=this.clientsMap.get(e);return t||(t=new n.GraphQLClient(this.rpcManager,e),this.clientsMap.set(e,t),t)}}},5857:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GraphQLClient=void 0;const n=r(9312),i=r(2948),o=n.__importDefault(r(9031));t.GraphQLClient=class{constructor(e,t){this.rpcManager=e;const r=`${t}/graphql`;this.client=new i.ApolloClient({link:new i.HttpLink({uri:`${this.rpcManager.getEndpoint()}${r}`,headers:this.rpcManager.getStaticHeaders(),fetch:o.default}),cache:new i.InMemoryCache})}async query(e){return(await this.client.query({query:i.gql`
|
|
8
|
+
deps: ${r}}`};const s={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(e){const[t,r]=function({schema:e}){const t={},r={};for(const n in e)"__proto__"!==n&&((Array.isArray(e[n])?t:r)[n]=e[n]);return[t,r]}(e);a(e,t),u(e,r)}};function a(e,t=e.schema){const{gen:r,data:i,it:s}=e;if(0===Object.keys(t).length)return;const a=r.let("missing");for(const u in t){const c=t[u];if(0===c.length)continue;const l=(0,o.propertyInData)(r,i,u,s.opts.ownProperties);e.setParams({property:u,depsCount:c.length,deps:c.join(", ")}),s.allErrors?r.if(l,(()=>{for(const t of c)(0,o.checkReportMissingProp)(e,t)})):(r.if(n._`${l} && (${(0,o.checkMissingProp)(e,c,a)})`),(0,o.reportMissingProp)(e,a),r.else())}}function u(e,t=e.schema){const{gen:r,data:n,keyword:s,it:a}=e,u=r.name("valid");for(const c in t)(0,i.alwaysValidSchema)(a,t[c])||(r.if((0,o.propertyInData)(r,n,c,a.opts.ownProperties),(()=>{const t=e.subschema({keyword:s,schemaProp:c},u);e.mergeValidEvaluated(t,u)}),(()=>r.var(u,!0))),e.ok(u))}t.validatePropertyDeps=a,t.validateSchemaDeps=u,t.default=s},76:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i=r(8936),o={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>n.str`must match "${e.ifClause}" schema`,params:({params:e})=>n._`{failingKeyword: ${e.ifClause}}`},code(e){const{gen:t,parentSchema:r,it:o}=e;void 0===r.then&&void 0===r.else&&(0,i.checkStrictMode)(o,'"if" without "then" and "else" is ignored');const a=s(o,"then"),u=s(o,"else");if(!a&&!u)return;const c=t.let("valid",!0),l=t.name("_valid");if(function(){const t=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},l);e.mergeEvaluated(t)}(),e.reset(),a&&u){const r=t.let("ifClause");e.setParams({ifClause:r}),t.if(l,f("then",r),f("else",r))}else a?t.if(l,f("then")):t.if((0,n.not)(l),f("else"));function f(r,i){return()=>{const o=e.subschema({keyword:r},l);t.assign(c,l),e.mergeValidEvaluated(o,c),i?t.assign(i,n._`${r}`):e.setParams({ifClause:r})}}e.pass(c,(()=>e.error(!0)))}};function s(e,t){const r=e.schema[t];return void 0!==r&&!(0,i.alwaysValidSchema)(e,r)}t.default=o},6951:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(8891),i=r(1162),o=r(8634),s=r(5151),a=r(5609),u=r(5747),c=r(3021),l=r(4943),f=r(4243),p=r(8103),d=r(2869),h=r(4279),y=r(4880),v=r(2609),m=r(76),b=r(5316);t.default=function(e=!1){const t=[d.default,h.default,y.default,v.default,m.default,b.default,c.default,l.default,u.default,f.default,p.default];return e?t.push(i.default,s.default):t.push(n.default,o.default),t.push(a.default),t}},8634:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;const n=r(5669),i=r(8936),o=r(3499),s={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:r}=e;if(Array.isArray(t))return a(e,"additionalItems",t);r.items=!0,(0,i.alwaysValidSchema)(r,t)||e.ok((0,o.validateArray)(e))}};function a(e,t,r=e.schema){const{gen:o,parentSchema:s,data:a,keyword:u,it:c}=e;!function(e){const{opts:n,errSchemaPath:o}=c,s=r.length,a=s===e.minItems&&(s===e.maxItems||!1===e[t]);if(n.strictTuples&&!a){const e=`"${u}" is ${s}-tuple, but minItems or maxItems/${t} are not specified or different at path "${o}"`;(0,i.checkStrictMode)(c,e,n.strictTuples)}}(s),c.opts.unevaluated&&r.length&&!0!==c.items&&(c.items=i.mergeEvaluated.items(o,r.length,c.items));const l=o.name("valid"),f=o.const("len",n._`${a}.length`);r.forEach(((t,r)=>{(0,i.alwaysValidSchema)(c,t)||(o.if(n._`${f} > ${r}`,(()=>e.subschema({keyword:u,schemaProp:r,dataProp:r},l))),e.ok(l))}))}t.validateTuple=a,t.default=s},5151:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i=r(8936),o=r(3499),s=r(8891),a={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>n.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>n._`{limit: ${e}}`},code(e){const{schema:t,parentSchema:r,it:n}=e,{prefixItems:a}=r;n.items=!0,(0,i.alwaysValidSchema)(n,t)||(a?(0,s.validateAdditionalItems)(e,a):e.ok((0,o.validateArray)(e)))}};t.default=a},2869:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(8936),i={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:r,it:i}=e;if((0,n.alwaysValidSchema)(i,r))return void e.fail();const o=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},o),e.failResult(o,(()=>e.reset()),(()=>e.error()))},error:{message:"must NOT be valid"}};t.default=i},4880:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i=r(8936),o={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:e})=>n._`{passingSchemas: ${e.passing}}`},code(e){const{gen:t,schema:r,parentSchema:o,it:s}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(s.opts.discriminator&&o.discriminator)return;const a=r,u=t.let("valid",!1),c=t.let("passing",null),l=t.name("_valid");e.setParams({passing:c}),t.block((function(){a.forEach(((r,o)=>{let a;(0,i.alwaysValidSchema)(s,r)?t.var(l,!0):a=e.subschema({keyword:"oneOf",schemaProp:o,compositeRule:!0},l),o>0&&t.if(n._`${l} && ${u}`).assign(u,!1).assign(c,n._`[${c}, ${o}]`).else(),t.if(l,(()=>{t.assign(u,!0),t.assign(c,o),a&&e.mergeEvaluated(a,n.Name)}))}))})),e.result(u,(()=>e.reset()),(()=>e.error(!0)))}};t.default=o},8103:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(3499),i=r(5669),o=r(8936),s=r(8936),a={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,data:a,parentSchema:u,it:c}=e,{opts:l}=c,f=(0,n.allSchemaProperties)(r),p=f.filter((e=>(0,o.alwaysValidSchema)(c,r[e])));if(0===f.length||p.length===f.length&&(!c.opts.unevaluated||!0===c.props))return;const d=l.strictSchema&&!l.allowMatchingProperties&&u.properties,h=t.name("valid");!0===c.props||c.props instanceof i.Name||(c.props=(0,s.evaluatedPropsToName)(t,c.props));const{props:y}=c;function v(e){for(const t in d)new RegExp(e).test(t)&&(0,o.checkStrictMode)(c,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function m(r){t.forIn("key",a,(o=>{t.if(i._`${(0,n.usePattern)(e,r)}.test(${o})`,(()=>{const n=p.includes(r);n||e.subschema({keyword:"patternProperties",schemaProp:r,dataProp:o,dataPropType:s.Type.Str},h),c.opts.unevaluated&&!0!==y?t.assign(i._`${y}[${o}]`,!0):n||c.allErrors||t.if((0,i.not)(h),(()=>t.break()))}))}))}!function(){for(const e of f)d&&v(e),c.allErrors?m(e):(t.var(h,!0),m(e),t.if(h))}()}};t.default=a},1162:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(8634),i={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,n.validateTuple)(e,"items")};t.default=i},4243:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(1686),i=r(3499),o=r(8936),s=r(4943),a={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,parentSchema:a,data:u,it:c}=e;"all"===c.opts.removeAdditional&&void 0===a.additionalProperties&&s.default.code(new n.KeywordCxt(c,s.default,"additionalProperties"));const l=(0,i.allSchemaProperties)(r);for(const e of l)c.definedProperties.add(e);c.opts.unevaluated&&l.length&&!0!==c.props&&(c.props=o.mergeEvaluated.props(t,(0,o.toHash)(l),c.props));const f=l.filter((e=>!(0,o.alwaysValidSchema)(c,r[e])));if(0===f.length)return;const p=t.name("valid");for(const r of f)d(r)?h(r):(t.if((0,i.propertyInData)(t,u,r,c.opts.ownProperties)),h(r),c.allErrors||t.else().var(p,!0),t.endIf()),e.it.definedProperties.add(r),e.ok(p);function d(e){return c.opts.useDefaults&&!c.compositeRule&&void 0!==r[e].default}function h(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},p)}}};t.default=a},3021:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i=r(8936),o={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:e})=>n._`{propertyName: ${e.propertyName}}`},code(e){const{gen:t,schema:r,data:o,it:s}=e;if((0,i.alwaysValidSchema)(s,r))return;const a=t.name("valid");t.forIn("key",o,(r=>{e.setParams({propertyName:r}),e.subschema({keyword:"propertyNames",data:r,dataTypes:["string"],propertyName:r,compositeRule:!0},a),t.if((0,n.not)(a),(()=>{e.error(!0),s.allErrors||t.break()}))})),e.ok(a)}};t.default=o},5316:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(8936),i={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){void 0===t.if&&(0,n.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};t.default=i},3499:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateUnion=t.validateArray=t.usePattern=t.callValidateCode=t.schemaProperties=t.allSchemaProperties=t.noPropertyInData=t.propertyInData=t.isOwnProperty=t.hasPropFunc=t.reportMissingProp=t.checkMissingProp=t.checkReportMissingProp=void 0;const n=r(5669),i=r(8936),o=r(5247),s=r(8936);function a(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:n._`Object.prototype.hasOwnProperty`})}function u(e,t,r){return n._`${a(e)}.call(${t}, ${r})`}function c(e,t,r,i){const o=n._`${t}${(0,n.getProperty)(r)} === undefined`;return i?(0,n.or)(o,(0,n.not)(u(e,t,r))):o}function l(e){return e?Object.keys(e).filter((e=>"__proto__"!==e)):[]}t.checkReportMissingProp=function(e,t){const{gen:r,data:i,it:o}=e;r.if(c(r,i,t,o.opts.ownProperties),(()=>{e.setParams({missingProperty:n._`${t}`},!0),e.error()}))},t.checkMissingProp=function({gen:e,data:t,it:{opts:r}},i,o){return(0,n.or)(...i.map((i=>(0,n.and)(c(e,t,i,r.ownProperties),n._`${o} = ${i}`))))},t.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error()},t.hasPropFunc=a,t.isOwnProperty=u,t.propertyInData=function(e,t,r,i){const o=n._`${t}${(0,n.getProperty)(r)} !== undefined`;return i?n._`${o} && ${u(e,t,r)}`:o},t.noPropertyInData=c,t.allSchemaProperties=l,t.schemaProperties=function(e,t){return l(t).filter((r=>!(0,i.alwaysValidSchema)(e,t[r])))},t.callValidateCode=function({schemaCode:e,data:t,it:{gen:r,topSchemaRef:i,schemaPath:s,errorPath:a},it:u},c,l,f){const p=f?n._`${e}, ${t}, ${i}${s}`:t,d=[[o.default.instancePath,(0,n.strConcat)(o.default.instancePath,a)],[o.default.parentData,u.parentData],[o.default.parentDataProperty,u.parentDataProperty],[o.default.rootData,o.default.rootData]];u.opts.dynamicRef&&d.push([o.default.dynamicAnchors,o.default.dynamicAnchors]);const h=n._`${p}, ${r.object(...d)}`;return l!==n.nil?n._`${c}.call(${l}, ${h})`:n._`${c}(${h})`};const f=n._`new RegExp`;t.usePattern=function({gen:e,it:{opts:t}},r){const i=t.unicodeRegExp?"u":"",{regExp:o}=t.code,a=o(r,i);return e.scopeValue("pattern",{key:a.toString(),ref:a,code:n._`${"new RegExp"===o.code?f:(0,s.useFunc)(e,o)}(${r}, ${i})`})},t.validateArray=function(e){const{gen:t,data:r,keyword:o,it:s}=e,a=t.name("valid");if(s.allErrors){const e=t.let("valid",!0);return u((()=>t.assign(e,!1))),e}return t.var(a,!0),u((()=>t.break())),a;function u(s){const u=t.const("len",n._`${r}.length`);t.forRange("i",0,u,(r=>{e.subschema({keyword:o,dataProp:r,dataPropType:i.Type.Num},a),t.if((0,n.not)(a),s)}))}},t.validateUnion=function(e){const{gen:t,schema:r,keyword:o,it:s}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some((e=>(0,i.alwaysValidSchema)(s,e)))&&!s.opts.unevaluated)return;const a=t.let("valid",!1),u=t.name("_valid");t.block((()=>r.forEach(((r,i)=>{const s=e.subschema({keyword:o,schemaProp:i,compositeRule:!0},u);t.assign(a,n._`${a} || ${u}`),e.mergeValidEvaluated(s,u)||t.if((0,n.not)(a))})))),e.result(a,(()=>e.reset()),(()=>e.error(!0)))}},1018:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};t.default=r},2101:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(1018),i=r(1939),o=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",n.default,i.default];t.default=o},1939:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.callRef=t.getValidate=void 0;const n=r(1578),i=r(3499),o=r(5669),s=r(5247),a=r(7382),u=r(8936),c={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:r,it:i}=e,{baseId:s,schemaEnv:u,validateName:c,opts:p,self:d}=i,{root:h}=u;if(("#"===r||"#/"===r)&&s===h.baseId)return function(){if(u===h)return f(e,c,u,u.$async);const r=t.scopeValue("root",{ref:h});return f(e,o._`${r}.validate`,h,h.$async)}();const y=a.resolveRef.call(d,h,s,r);if(void 0===y)throw new n.default(i.opts.uriResolver,s,r);return y instanceof a.SchemaEnv?function(t){const r=l(e,t);f(e,r,t,t.$async)}(y):function(n){const i=t.scopeValue("schema",!0===p.code.source?{ref:n,code:(0,o.stringify)(n)}:{ref:n}),s=t.name("valid"),a=e.subschema({schema:n,dataTypes:[],schemaPath:o.nil,topSchemaRef:i,errSchemaPath:r},s);e.mergeEvaluated(a),e.ok(s)}(y)}};function l(e,t){const{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):o._`${r.scopeValue("wrapper",{ref:t})}.validate`}function f(e,t,r,n){const{gen:a,it:c}=e,{allErrors:l,schemaEnv:f,opts:p}=c,d=p.passContext?s.default.this:o.nil;function h(e){const t=o._`${e}.errors`;a.assign(s.default.vErrors,o._`${s.default.vErrors} === null ? ${t} : ${s.default.vErrors}.concat(${t})`),a.assign(s.default.errors,o._`${s.default.vErrors}.length`)}function y(e){var t;if(!c.opts.unevaluated)return;const n=null===(t=null==r?void 0:r.validate)||void 0===t?void 0:t.evaluated;if(!0!==c.props)if(n&&!n.dynamicProps)void 0!==n.props&&(c.props=u.mergeEvaluated.props(a,n.props,c.props));else{const t=a.var("props",o._`${e}.evaluated.props`);c.props=u.mergeEvaluated.props(a,t,c.props,o.Name)}if(!0!==c.items)if(n&&!n.dynamicItems)void 0!==n.items&&(c.items=u.mergeEvaluated.items(a,n.items,c.items));else{const t=a.var("items",o._`${e}.evaluated.items`);c.items=u.mergeEvaluated.items(a,t,c.items,o.Name)}}n?function(){if(!f.$async)throw new Error("async schema referenced by sync schema");const r=a.let("valid");a.try((()=>{a.code(o._`await ${(0,i.callValidateCode)(e,t,d)}`),y(t),l||a.assign(r,!0)}),(e=>{a.if(o._`!(${e} instanceof ${c.ValidationError})`,(()=>a.throw(e))),h(e),l||a.assign(r,!1)})),e.ok(r)}():e.result((0,i.callValidateCode)(e,t,d),(()=>y(t)),(()=>h(t)))}t.getValidate=l,t.callRef=f,t.default=c},2:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i=r(7421),o=r(7382),s=r(8936),a={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===i.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>n._`{error: ${e}, tag: ${r}, tagValue: ${t}}`},code(e){const{gen:t,data:r,schema:a,parentSchema:u,it:c}=e,{oneOf:l}=u;if(!c.opts.discriminator)throw new Error("discriminator: requires discriminator option");const f=a.propertyName;if("string"!=typeof f)throw new Error("discriminator: requires propertyName");if(a.mapping)throw new Error("discriminator: mapping is not supported");if(!l)throw new Error("discriminator: requires oneOf keyword");const p=t.let("valid",!1),d=t.const("tag",n._`${r}${(0,n.getProperty)(f)}`);function h(r){const i=t.name("valid"),o=e.subschema({keyword:"oneOf",schemaProp:r},i);return e.mergeEvaluated(o,n.Name),i}t.if(n._`typeof ${d} == "string"`,(()=>function(){const r=function(){var e;const t={},r=i(u);let n=!0;for(let t=0;t<l.length;t++){let u=l[t];(null==u?void 0:u.$ref)&&!(0,s.schemaHasRulesButRef)(u,c.self.RULES)&&(u=o.resolveRef.call(c.self,c.schemaEnv.root,c.baseId,null==u?void 0:u.$ref),u instanceof o.SchemaEnv&&(u=u.schema));const p=null===(e=null==u?void 0:u.properties)||void 0===e?void 0:e[f];if("object"!=typeof p)throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${f}"`);n=n&&(r||i(u)),a(p,t)}if(!n)throw new Error(`discriminator: "${f}" must be required`);return t;function i({required:e}){return Array.isArray(e)&&e.includes(f)}function a(e,t){if(e.const)p(e.const,t);else{if(!e.enum)throw new Error(`discriminator: "properties/${f}" must have "const" or "enum"`);for(const r of e.enum)p(r,t)}}function p(e,r){if("string"!=typeof e||e in t)throw new Error(`discriminator: "${f}" values must be unique strings`);t[e]=r}}();t.if(!1);for(const e in r)t.elseIf(n._`${d} === ${e}`),t.assign(p,h(r[e]));t.else(),e.error(!1,{discrError:i.DiscrError.Mapping,tag:d,tagName:f}),t.endIf()}()),(()=>e.error(!1,{discrError:i.DiscrError.Tag,tag:d,tagName:f}))),e.ok(p)}};t.default=a},7421:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0,(r=t.DiscrError||(t.DiscrError={})).Tag="tag",r.Mapping="mapping"},5671:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(2101),i=r(7499),o=r(6951),s=r(4480),a=r(2480),u=[n.default,i.default,(0,o.default)(),s.default,a.metadataVocabulary,a.contentVocabulary];t.default=u},3599:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>n.str`must match format "${e}"`,params:({schemaCode:e})=>n._`{format: ${e}}`},code(e,t){const{gen:r,data:i,$data:o,schema:s,schemaCode:a,it:u}=e,{opts:c,errSchemaPath:l,schemaEnv:f,self:p}=u;c.validateFormats&&(o?function(){const o=r.scopeValue("formats",{ref:p.formats,code:c.code.formats}),s=r.const("fDef",n._`${o}[${a}]`),u=r.let("fType"),l=r.let("format");r.if(n._`typeof ${s} == "object" && !(${s} instanceof RegExp)`,(()=>r.assign(u,n._`${s}.type || "string"`).assign(l,n._`${s}.validate`)),(()=>r.assign(u,n._`"string"`).assign(l,s))),e.fail$data((0,n.or)(!1===c.strictSchema?n.nil:n._`${a} && !${l}`,function(){const e=f.$async?n._`(${s}.async ? await ${l}(${i}) : ${l}(${i}))`:n._`${l}(${i})`,r=n._`(typeof ${l} == "function" ? ${e} : ${l}.test(${i}))`;return n._`${l} && ${l} !== true && ${u} === ${t} && !${r}`}()))}():function(){const o=p.formats[s];if(!o)return void function(){if(!1!==c.strictSchema)throw new Error(e());function e(){return`unknown format "${s}" ignored in schema at path "${l}"`}p.logger.warn(e())}();if(!0===o)return;const[a,u,d]=function(e){const t=e instanceof RegExp?(0,n.regexpCode)(e):c.code.formats?n._`${c.code.formats}${(0,n.getProperty)(s)}`:void 0,i=r.scopeValue("formats",{key:s,ref:e,code:t});return"object"!=typeof e||e instanceof RegExp?["string",e,i]:[e.type||"string",e.validate,n._`${i}.validate`]}(o);a===t&&e.pass(function(){if("object"==typeof o&&!(o instanceof RegExp)&&o.async){if(!f.$async)throw new Error("async format in sync schema");return n._`await ${d}(${i})`}return"function"==typeof u?n._`${d}(${i})`:n._`${d}.test(${i})`}())}())}};t.default=i},4480:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=[r(3599).default];t.default=n},2480:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.contentVocabulary=t.metadataVocabulary=void 0,t.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],t.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]},8549:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i=r(8936),o=r(4285),s={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:e})=>n._`{allowedValue: ${e}}`},code(e){const{gen:t,data:r,$data:s,schemaCode:a,schema:u}=e;s||u&&"object"==typeof u?e.fail$data(n._`!${(0,i.useFunc)(t,o.default)}(${r}, ${a})`):e.fail(n._`${u} !== ${r}`)}};t.default=s},9450:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i=r(8936),o=r(4285),s={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>n._`{allowedValues: ${e}}`},code(e){const{gen:t,data:r,$data:s,schema:a,schemaCode:u,it:c}=e;if(!s&&0===a.length)throw new Error("enum must have non-empty array");const l=a.length>=c.opts.loopEnum;let f;const p=()=>null!=f?f:f=(0,i.useFunc)(t,o.default);let d;if(l||s)d=t.let("valid"),e.block$data(d,(function(){t.assign(d,!1),t.forOf("v",u,(e=>t.if(n._`${p()}(${r}, ${e})`,(()=>t.assign(d,!0).break()))))}));else{if(!Array.isArray(a))throw new Error("ajv implementation error");const e=t.const("vSchema",u);d=(0,n.or)(...a.map(((t,i)=>function(e,t){const i=a[t];return"object"==typeof i&&null!==i?n._`${p()}(${r}, ${e}[${t}])`:n._`${r} === ${i}`}(e,i))))}e.pass(d)}};t.default=s},7499:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(1337),i=r(9706),o=r(9507),s=r(1216),a=r(34),u=r(6962),c=r(1135),l=r(194),f=r(8549),p=r(9450),d=[n.default,i.default,o.default,s.default,a.default,u.default,c.default,l.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},f.default,p.default];t.default=d},1135:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxItems"===e?"more":"fewer";return n.str`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:i}=e,o="maxItems"===t?n.operators.GT:n.operators.LT;e.fail$data(n._`${r}.length ${o} ${i}`)}};t.default=i},9507:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i=r(8936),o=r(9161),s={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxLength"===e?"more":"fewer";return n.str`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:s,it:a}=e,u="maxLength"===t?n.operators.GT:n.operators.LT,c=!1===a.opts.unicode?n._`${r}.length`:n._`${(0,i.useFunc)(e.gen,o.default)}(${r})`;e.fail$data(n._`${c} ${u} ${s}`)}};t.default=s},1337:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i=n.operators,o={maximum:{okStr:"<=",ok:i.LTE,fail:i.GT},minimum:{okStr:">=",ok:i.GTE,fail:i.LT},exclusiveMaximum:{okStr:"<",ok:i.LT,fail:i.GTE},exclusiveMinimum:{okStr:">",ok:i.GT,fail:i.LTE}},s={message:({keyword:e,schemaCode:t})=>n.str`must be ${o[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>n._`{comparison: ${o[e].okStr}, limit: ${t}}`},a={keyword:Object.keys(o),type:"number",schemaType:"number",$data:!0,error:s,code(e){const{keyword:t,data:r,schemaCode:i}=e;e.fail$data(n._`${r} ${o[t].fail} ${i} || isNaN(${r})`)}};t.default=a},34:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxProperties"===e?"more":"fewer";return n.str`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:i}=e,o="maxProperties"===t?n.operators.GT:n.operators.LT;e.fail$data(n._`Object.keys(${r}).length ${o} ${i}`)}};t.default=i},9706:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5669),i={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:e})=>n.str`must be multiple of ${e}`,params:({schemaCode:e})=>n._`{multipleOf: ${e}}`},code(e){const{gen:t,data:r,schemaCode:i,it:o}=e,s=o.opts.multipleOfPrecision,a=t.let("res"),u=s?n._`Math.abs(Math.round(${a}) - ${a}) > 1e-${s}`:n._`${a} !== parseInt(${a})`;e.fail$data(n._`(${i} === 0 || (${a} = ${r}/${i}, ${u}))`)}};t.default=i},1216:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(3499),i=r(5669),o={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>i.str`must match pattern "${e}"`,params:({schemaCode:e})=>i._`{pattern: ${e}}`},code(e){const{data:t,$data:r,schema:o,schemaCode:s,it:a}=e,u=a.opts.unicodeRegExp?"u":"",c=r?i._`(new RegExp(${s}, ${u}))`:(0,n.usePattern)(e,o);e.fail$data(i._`!${c}.test(${t})`)}};t.default=o},6962:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(3499),i=r(5669),o=r(8936),s={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>i.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>i._`{missingProperty: ${e}}`},code(e){const{gen:t,schema:r,schemaCode:s,data:a,$data:u,it:c}=e,{opts:l}=c;if(!u&&0===r.length)return;const f=r.length>=l.loopRequired;if(c.allErrors?function(){if(f||u)e.block$data(i.nil,p);else for(const t of r)(0,n.checkReportMissingProp)(e,t)}():function(){const o=t.let("missing");if(f||u){const r=t.let("valid",!0);e.block$data(r,(()=>function(r,o){e.setParams({missingProperty:r}),t.forOf(r,s,(()=>{t.assign(o,(0,n.propertyInData)(t,a,r,l.ownProperties)),t.if((0,i.not)(o),(()=>{e.error(),t.break()}))}),i.nil)}(o,r))),e.ok(r)}else t.if((0,n.checkMissingProp)(e,r,o)),(0,n.reportMissingProp)(e,o),t.else()}(),l.strictRequired){const t=e.parentSchema.properties,{definedProperties:n}=e.it;for(const e of r)if(void 0===(null==t?void 0:t[e])&&!n.has(e)){const t=`required property "${e}" is not defined at "${c.schemaEnv.baseId+c.errSchemaPath}" (strictRequired)`;(0,o.checkStrictMode)(c,t,c.opts.strictRequired)}}function p(){t.forOf("prop",s,(r=>{e.setParams({missingProperty:r}),t.if((0,n.noPropertyInData)(t,a,r,l.ownProperties),(()=>e.error()))}))}}};t.default=s},194:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(7332),i=r(5669),o=r(8936),s=r(4285),a={message:({params:{i:e,j:t}})=>i.str`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>i._`{i: ${e}, j: ${t}}`},u={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:a,code(e){const{gen:t,data:r,$data:a,schema:u,parentSchema:c,schemaCode:l,it:f}=e;if(!a&&!u)return;const p=t.let("valid"),d=c.items?(0,n.getSchemaTypes)(c.items):[];function h(o,s){const a=t.name("item"),u=(0,n.checkDataTypes)(d,a,f.opts.strictNumbers,n.DataType.Wrong),c=t.const("indices",i._`{}`);t.for(i._`;${o}--;`,(()=>{t.let(a,i._`${r}[${o}]`),t.if(u,i._`continue`),d.length>1&&t.if(i._`typeof ${a} == "string"`,i._`${a} += "_"`),t.if(i._`typeof ${c}[${a}] == "number"`,(()=>{t.assign(s,i._`${c}[${a}]`),e.error(),t.assign(p,!1).break()})).code(i._`${c}[${a}] = ${o}`)}))}function y(n,a){const u=(0,o.useFunc)(t,s.default),c=t.name("outer");t.label(c).for(i._`;${n}--;`,(()=>t.for(i._`${a} = ${n}; ${a}--;`,(()=>t.if(i._`${u}(${r}[${n}], ${r}[${a}])`,(()=>{e.error(),t.assign(p,!1).break(c)}))))))}e.block$data(p,(function(){const n=t.let("i",i._`${r}.length`),o=t.let("j");e.setParams({i:n,j:o}),t.assign(p,!0),t.if(i._`${n} > 1`,(()=>(d.length>0&&!d.some((e=>"object"===e||"array"===e))?h:y)(n,o)))}),i._`${l} === false`),e.ok(p)}};t.default=u},8682:e=>{"use strict";var t=e.exports=function(e,t,n){"function"==typeof t&&(n=t,t={}),r(t,"function"==typeof(n=t.cb||n)?n:n.pre||function(){},n.post||function(){},e,"",e)};function r(e,n,i,o,s,a,u,c,l,f){if(o&&"object"==typeof o&&!Array.isArray(o)){for(var p in n(o,s,a,u,c,l,f),o){var d=o[p];if(Array.isArray(d)){if(p in t.arrayKeywords)for(var h=0;h<d.length;h++)r(e,n,i,d[h],s+"/"+p+"/"+h,a,s,p,o,h)}else if(p in t.propsKeywords){if(d&&"object"==typeof d)for(var y in d)r(e,n,i,d[y],s+"/"+p+"/"+y.replace(/~/g,"~0").replace(/\//g,"~1"),a,s,p,o,y)}else(p in t.keywords||e.allKeys&&!(p in t.skipKeywords))&&r(e,n,i,d,s+"/"+p,a,s,p,o)}i(o,s,a,u,c,l,f)}}t.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},t.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},t.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},t.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0}},5382:(e,t,r)=>{"use strict";r.r(t),r.d(t,{BSONError:()=>O,BSONRegExp:()=>nt,BSONSymbol:()=>it,BSONTypeError:()=>S,BSON_BINARY_SUBTYPE_BYTE_ARRAY:()=>me,BSON_BINARY_SUBTYPE_COLUMN:()=>Oe,BSON_BINARY_SUBTYPE_DEFAULT:()=>ye,BSON_BINARY_SUBTYPE_ENCRYPTED:()=>we,BSON_BINARY_SUBTYPE_FUNCTION:()=>ve,BSON_BINARY_SUBTYPE_MD5:()=>_e,BSON_BINARY_SUBTYPE_USER_DEFINED:()=>Se,BSON_BINARY_SUBTYPE_UUID:()=>be,BSON_BINARY_SUBTYPE_UUID_NEW:()=>ge,BSON_DATA_ARRAY:()=>J,BSON_DATA_BINARY:()=>Z,BSON_DATA_BOOLEAN:()=>te,BSON_DATA_CODE:()=>se,BSON_DATA_CODE_W_SCOPE:()=>ue,BSON_DATA_DATE:()=>re,BSON_DATA_DBPOINTER:()=>oe,BSON_DATA_DECIMAL128:()=>pe,BSON_DATA_INT:()=>ce,BSON_DATA_LONG:()=>fe,BSON_DATA_MAX_KEY:()=>he,BSON_DATA_MIN_KEY:()=>de,BSON_DATA_NULL:()=>ne,BSON_DATA_NUMBER:()=>H,BSON_DATA_OBJECT:()=>G,BSON_DATA_OID:()=>ee,BSON_DATA_REGEXP:()=>ie,BSON_DATA_STRING:()=>K,BSON_DATA_SYMBOL:()=>ae,BSON_DATA_TIMESTAMP:()=>le,BSON_DATA_UNDEFINED:()=>X,BSON_INT32_MAX:()=>U,BSON_INT32_MIN:()=>V,BSON_INT64_MAX:()=>z,BSON_INT64_MIN:()=>Q,Binary:()=>Ee,Code:()=>je,DBRef:()=>Ie,Decimal128:()=>He,Double:()=>Ke,EJSON:()=>vt,Int32:()=>Ge,Long:()=>Re,LongWithoutOverridesClass:()=>ot,Map:()=>mt,MaxKey:()=>Je,MinKey:()=>Ze,ObjectID:()=>rt,ObjectId:()=>rt,Timestamp:()=>st,UUID:()=>Te,calculateObjectSize:()=>ur,default:()=>lr,deserialize:()=>ar,deserializeStream:()=>cr,serialize:()=>or,serializeWithBufferAndIndex:()=>sr,setInternalBufferSize:()=>ir});for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,u=s.length;a<u;++a)n[a]=s[a],i[s.charCodeAt(a)]=a;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function l(e,t,r){for(var i,o,s=[],a=t;a<r;a+=3)i=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),s.push(n[(o=i)>>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63;var f,p,d=function(e){var t,r,n=c(e),s=n[0],a=n[1],u=new o(function(e,t,r){return 3*(t+r)/4-r}(0,s,a)),l=0,f=a>0?s-4:s;for(r=0;r<f;r+=4)t=i[e.charCodeAt(r)]<<18|i[e.charCodeAt(r+1)]<<12|i[e.charCodeAt(r+2)]<<6|i[e.charCodeAt(r+3)],u[l++]=t>>16&255,u[l++]=t>>8&255,u[l++]=255&t;return 2===a&&(t=i[e.charCodeAt(r)]<<2|i[e.charCodeAt(r+1)]>>4,u[l++]=255&t),1===a&&(t=i[e.charCodeAt(r)]<<10|i[e.charCodeAt(r+1)]<<4|i[e.charCodeAt(r+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t),u},h=function(e){for(var t,r=e.length,i=r%3,o=[],s=16383,a=0,u=r-i;a<u;a+=s)o.push(l(e,a,a+s>u?u:a+s));return 1===i?(t=e[r-1],o.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],o.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"=")),o.join("")},y=function(e,t,r,n,i){var o,s,a=8*i-n-1,u=(1<<a)-1,c=u>>1,l=-7,f=r?i-1:0,p=r?-1:1,d=e[t+f];for(f+=p,o=d&(1<<-l)-1,d>>=-l,l+=a;l>0;o=256*o+e[t+f],f+=p,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=n;l>0;s=256*s+e[t+f],f+=p,l-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,n),o-=c}return(d?-1:1)*s*Math.pow(2,o-n)},v=function(e,t,r,n,i,o){var s,a,u,c=8*o-i-1,l=(1<<c)-1,f=l>>1,p=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,h=n?1:-1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),(t+=s+f>=1?p/u:p*Math.pow(2,1-f))*u>=2&&(s++,u/=2),s+f>=l?(a=0,s=l):s+f>=1?(a=(t*u-1)*Math.pow(2,i),s+=f):(a=t*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;e[r+d]=255&a,d+=h,a/=256,i-=8);for(s=s<<i|a,c+=i;c>0;e[r+d]=255&s,d+=h,s/=256,c-=8);e[r+d-h]|=128*y},m=(f=function(e,t){var r="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=o,t.SlowBuffer=function(e){return+e!=e&&(e=0),o.alloc(+e)},t.INSPECT_MAX_BYTES=50;var n=2147483647;function i(e){if(e>n)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,o.prototype),t}function o(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return u(e)}return s(e,t,r)}function s(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!o.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=0|p(e,t),n=i(r),s=n.write(e,t);return s!==r&&(n=n.slice(0,s)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(U(e,Uint8Array)){var t=new Uint8Array(e);return l(t.buffer,t.byteOffset,t.byteLength)}return c(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+babelHelpers.typeof(e));if(U(e,ArrayBuffer)||e&&U(e.buffer,ArrayBuffer))return l(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(U(e,SharedArrayBuffer)||e&&U(e.buffer,SharedArrayBuffer)))return l(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return o.from(n,t,r);var s=function(e){if(o.isBuffer(e)){var t=0|f(e.length),r=i(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||V(e.length)?i(0):c(e):"Buffer"===e.type&&Array.isArray(e.data)?c(e.data):void 0}(e);if(s)return s;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return o.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+babelHelpers.typeof(e))}function a(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 u(e){return a(e),i(e<0?0:0|f(e))}function c(e){for(var t=e.length<0?0:0|f(e.length),r=i(t),n=0;n<t;n+=1)r[n]=255&e[n];return r}function l(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');var 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,o.prototype),n}function f(e){if(e>=n)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n.toString(16)+" bytes");return 0|e}function p(e,t){if(o.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||U(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 '+babelHelpers.typeof(e));var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return q(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return L(e).length;default:if(i)return n?-1:q(e).length;t=(""+t).toLowerCase(),i=!0}}function m(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return N(this,t,r);case"utf8":case"utf-8":return P(this,t,r);case"ascii":return x(this,t,r);case"latin1":case"binary":return A(this,t,r);case"base64":return j(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function b(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function g(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),V(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=o.from(t,n)),o.isBuffer(t))return 0===t.length?-1:_(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):_(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function _(e,t,r,n,i){var o,s=1,a=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,u/=2,r/=2}function c(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){var l=-1;for(o=r;o<a;o++)if(c(e,o)===c(t,-1===l?0:o-l)){if(-1===l&&(l=o),o-l+1===u)return l*s}else-1!==l&&(o-=o-l),l=-1}else for(r+u>a&&(r=a-u),o=r;o>=0;o--){for(var f=!0,p=0;p<u;p++)if(c(e,o+p)!==c(t,p)){f=!1;break}if(f)return o}return-1}function w(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=t.length;n>o/2&&(n=o/2);for(var s=0;s<n;++s){var a=parseInt(t.substr(2*s,2),16);if(V(a))return s;e[r+s]=a}return s}function O(e,t,r,n){return B(q(t,e.length-r),e,r,n)}function S(e,t,r,n){return B(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function E(e,t,r,n){return B(L(t),e,r,n)}function T(e,t,r,n){return B(function(e,t){for(var r,n,i,o=[],s=0;s<e.length&&!((t-=2)<0);++s)n=(r=e.charCodeAt(s))>>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function j(e,t,r){return 0===t&&r===e.length?h(e):h(e.slice(t,r))}function P(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var o,s,a,u,c=e[i],l=null,f=c>239?4:c>223?3:c>191?2:1;if(i+f<=r)switch(f){case 1:c<128&&(l=c);break;case 2:128==(192&(o=e[i+1]))&&(u=(31&c)<<6|63&o)>127&&(l=u);break;case 3:o=e[i+1],s=e[i+2],128==(192&o)&&128==(192&s)&&(u=(15&c)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:o=e[i+1],s=e[i+2],a=e[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(u=(15&c)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(l=u)}null===l?(l=65533,f=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),i+=f}return function(e){var t=e.length;if(t<=I)return String.fromCharCode.apply(String,e);for(var r="",n=0;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=I));return r}(n)}t.kMaxLength=n,o.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),o.TYPED_ARRAY_SUPPORT||"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(o.prototype,"parent",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.byteOffset}}),o.poolSize=8192,o.from=function(e,t,r){return s(e,t,r)},Object.setPrototypeOf(o.prototype,Uint8Array.prototype),Object.setPrototypeOf(o,Uint8Array),o.alloc=function(e,t,r){return function(e,t,r){return a(e),e<=0?i(e):void 0!==t?"string"==typeof r?i(e).fill(t,r):i(e).fill(t):i(e)}(e,t,r)},o.allocUnsafe=function(e){return u(e)},o.allocUnsafeSlow=function(e){return u(e)},o.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==o.prototype},o.compare=function(e,t){if(U(e,Uint8Array)&&(e=o.from(e,e.offset,e.byteLength)),U(t,Uint8Array)&&(t=o.from(t,t.offset,t.byteLength)),!o.isBuffer(e)||!o.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,n=t.length,i=0,s=Math.min(r,n);i<s;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},o.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}},o.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return o.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=o.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var s=e[r];if(U(s,Uint8Array))i+s.length>n.length?o.from(s).copy(n,i):Uint8Array.prototype.set.call(n,s,i);else{if(!o.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(n,i)}i+=s.length}return n},o.byteLength=p,o.prototype._isBuffer=!0,o.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)b(this,t,t+1);return this},o.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)b(this,t,t+3),b(this,t+1,t+2);return this},o.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)b(this,t,t+7),b(this,t+1,t+6),b(this,t+2,t+5),b(this,t+3,t+4);return this},o.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?P(this,0,e):m.apply(this,arguments)},o.prototype.toLocaleString=o.prototype.toString,o.prototype.equals=function(e){if(!o.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===o.compare(this,e)},o.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},r&&(o.prototype[r]=o.prototype.inspect),o.prototype.compare=function(e,t,r,n,i){if(U(e,Uint8Array)&&(e=o.from(e,e.offset,e.byteLength)),!o.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+babelHelpers.typeof(e));if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var s=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0),u=Math.min(s,a),c=this.slice(n,i),l=e.slice(t,r),f=0;f<u;++f)if(c[f]!==l[f]){s=c[f],a=l[f];break}return s<a?-1:a<s?1:0},o.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},o.prototype.indexOf=function(e,t,r){return g(this,e,t,r,!0)},o.prototype.lastIndexOf=function(e,t,r){return g(this,e,t,r,!1)},o.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return w(this,e,t,r);case"utf8":case"utf-8":return O(this,e,t,r);case"ascii":case"latin1":case"binary":return S(this,e,t,r);case"base64":return E(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var I=4096;function x(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function A(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function N(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=t;o<r;++o)i+=z[e[o]];return i}function k(e,t,r){for(var n=e.slice(t,r),i="",o=0;o<n.length-1;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function M(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function D(e,t,r,n,i,s){if(!o.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<s)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function R(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function C(e,t,r,n,i){return t=+t,r>>>=0,i||R(e,0,r,4),v(e,t,r,n,23,4),r+4}function $(e,t,r,n,i){return t=+t,r>>>=0,i||R(e,0,r,8),v(e,t,r,n,52,8),r+8}o.prototype.slice=function(e,t){var r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);var n=this.subarray(e,t);return Object.setPrototypeOf(n,o.prototype),n},o.prototype.readUintLE=o.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||M(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n},o.prototype.readUintBE=o.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||M(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},o.prototype.readUint8=o.prototype.readUInt8=function(e,t){return e>>>=0,t||M(e,1,this.length),this[e]},o.prototype.readUint16LE=o.prototype.readUInt16LE=function(e,t){return e>>>=0,t||M(e,2,this.length),this[e]|this[e+1]<<8},o.prototype.readUint16BE=o.prototype.readUInt16BE=function(e,t){return e>>>=0,t||M(e,2,this.length),this[e]<<8|this[e+1]},o.prototype.readUint32LE=o.prototype.readUInt32LE=function(e,t){return e>>>=0,t||M(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},o.prototype.readUint32BE=o.prototype.readUInt32BE=function(e,t){return e>>>=0,t||M(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},o.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||M(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*t)),n},o.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||M(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},o.prototype.readInt8=function(e,t){return e>>>=0,t||M(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},o.prototype.readInt16LE=function(e,t){e>>>=0,t||M(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt16BE=function(e,t){e>>>=0,t||M(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt32LE=function(e,t){return e>>>=0,t||M(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},o.prototype.readInt32BE=function(e,t){return e>>>=0,t||M(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},o.prototype.readFloatLE=function(e,t){return e>>>=0,t||M(e,4,this.length),y(this,e,!0,23,4)},o.prototype.readFloatBE=function(e,t){return e>>>=0,t||M(e,4,this.length),y(this,e,!1,23,4)},o.prototype.readDoubleLE=function(e,t){return e>>>=0,t||M(e,8,this.length),y(this,e,!0,52,8)},o.prototype.readDoubleBE=function(e,t){return e>>>=0,t||M(e,8,this.length),y(this,e,!1,52,8)},o.prototype.writeUintLE=o.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||D(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[t]=255&e;++o<r&&(i*=256);)this[t+o]=e/i&255;return t+r},o.prototype.writeUintBE=o.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||D(this,e,t,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},o.prototype.writeUint8=o.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,1,255,0),this[t]=255&e,t+1},o.prototype.writeUint16LE=o.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},o.prototype.writeUint16BE=o.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},o.prototype.writeUint32LE=o.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||D(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},o.prototype.writeUint32BE=o.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||D(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},o.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);D(this,e,t,r,i-1,-i)}var o=0,s=1,a=0;for(this[t]=255&e;++o<r&&(s*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+r},o.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);D(this,e,t,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+r},o.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},o.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},o.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},o.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||D(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},o.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||D(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},o.prototype.writeFloatLE=function(e,t,r){return C(this,e,t,!0,r)},o.prototype.writeFloatBE=function(e,t,r){return C(this,e,t,!1,r)},o.prototype.writeDoubleLE=function(e,t,r){return $(this,e,t,!0,r)},o.prototype.writeDoubleBE=function(e,t,r){return $(this,e,t,!1,r)},o.prototype.copy=function(e,t,r,n){if(!o.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),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<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),e.length-t<n-r&&(n=e.length-t+r);var i=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),i},o.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&&!o.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){var i=e.charCodeAt(0);("utf8"===n&&i<128||"latin1"===n)&&(e=i)}}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;var s;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(s=t;s<r;++s)this[s]=e;else{var a=o.isBuffer(e)?e:o.from(e,n),u=a.length;if(0===u)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(s=0;s<r-t;++s)this[s+t]=a[s%u]}return this};var F=/[^+/0-9A-Za-z-_]/g;function q(e,t){var r;t=t||1/0;for(var n=e.length,i=null,o=[],s=0;s<n;++s){if((r=e.charCodeAt(s))>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function L(e){return d(function(e){if((e=(e=e.split("=")[0]).trim().replace(F,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function B(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function U(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function V(e){return e!=e}var z=function(){for(var e="0123456789abcdef",t=new Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)t[n+i]=e[r]+e[i];return t}()},f(p={exports:{}},p.exports),p.exports),b=m.Buffer;m.SlowBuffer,m.INSPECT_MAX_BYTES,m.kMaxLength;var g=function(e,t){return g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},g(e,t)};function _(e,t){function r(){this.constructor=e}g(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var w=function(){return w=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},w.apply(this,arguments)},O=function(e){function t(r){var n=e.call(this,r)||this;return Object.setPrototypeOf(n,t.prototype),n}return _(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"BSONError"},enumerable:!1,configurable:!0}),t}(Error),S=function(e){function t(r){var n=e.call(this,r)||this;return Object.setPrototypeOf(n,t.prototype),n}return _(t,e),Object.defineProperty(t.prototype,"name",{get:function(){return"BSONTypeError"},enumerable:!1,configurable:!0}),t}(TypeError);function E(e){return e&&e.Math==Math&&e}function T(){return E("object"==typeof globalThis&&globalThis)||E("object"==typeof window&&window)||E("object"==typeof self&&self)||E("object"==typeof r.g&&r.g)||Function("return this")()}function j(e){return e.toString().replace("function(","function (")}var P=function(e){var t,r="object"==typeof(t=T()).navigator&&"ReactNative"===t.navigator.product?"BSON: For React Native please polyfill crypto.getRandomValues, e.g. using: https://www.npmjs.com/package/react-native-get-random-values.":"BSON: No cryptographic implementation for random bytes present, falling back to a less secure implementation.";console.warn(r);for(var n=b.alloc(e),i=0;i<e;++i)n[i]=Math.floor(256*Math.random());return n},I=function(){if("undefined"!=typeof window){var e=window.crypto||window.msCrypto;if(e&&e.getRandomValues)return function(t){return e.getRandomValues(b.alloc(t))}}return void 0!==r.g&&r.g.crypto&&r.g.crypto.getRandomValues?function(e){return r.g.crypto.getRandomValues(b.alloc(e))}:P}();function x(e){return["[object ArrayBuffer]","[object SharedArrayBuffer]"].includes(Object.prototype.toString.call(e))}function A(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)}function N(e){return"[object BigInt64Array]"===Object.prototype.toString.call(e)}function k(e){return"[object BigUint64Array]"===Object.prototype.toString.call(e)}function M(e){return"[object RegExp]"===Object.prototype.toString.call(e)}function D(e){return R(e)&&"[object Date]"===Object.prototype.toString.call(e)}function R(e){return"object"==typeof e&&null!==e}function C(e,t){var r=!1;return function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return r||(console.warn(t),r=!0),e.apply(this,n)}}function $(e){if(ArrayBuffer.isView(e))return b.from(e.buffer,e.byteOffset,e.byteLength);if(x(e))return b.from(e);throw new S("Must use either Buffer or TypedArray")}var F=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|[0-9a-f]{12}4[0-9a-f]{3}[89ab][0-9a-f]{15})$/i,q=function(e){return"string"==typeof e&&F.test(e)},L=function(e){if(!q(e))throw new S('UUID string representations must be a 32 or 36 character hex string (dashes excluded/included). Format: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" or "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx".');var t=e.replace(/-/g,"");return b.from(t,"hex")},B=function(e,t){return void 0===t&&(t=!0),t?e.toString("hex",0,4)+"-"+e.toString("hex",4,6)+"-"+e.toString("hex",6,8)+"-"+e.toString("hex",8,10)+"-"+e.toString("hex",10,16):e.toString("hex")},U=2147483647,V=-2147483648,z=Math.pow(2,63)-1,Q=-Math.pow(2,63),Y=Math.pow(2,53),W=-Math.pow(2,53),H=1,K=2,G=3,J=4,Z=5,X=6,ee=7,te=8,re=9,ne=10,ie=11,oe=12,se=13,ae=14,ue=15,ce=16,le=17,fe=18,pe=19,de=255,he=127,ye=0,ve=1,me=2,be=3,ge=4,_e=5,we=6,Oe=7,Se=128,Ee=function(){function e(t,r){if(!(this instanceof e))return new e(t,r);if(!(null==t||"string"==typeof t||ArrayBuffer.isView(t)||t instanceof ArrayBuffer||Array.isArray(t)))throw new S("Binary can only be constructed from string, Buffer, TypedArray, or Array<number>");this.sub_type=null!=r?r:e.BSON_BINARY_SUBTYPE_DEFAULT,null==t?(this.buffer=b.alloc(e.BUFFER_SIZE),this.position=0):("string"==typeof t?this.buffer=b.from(t,"binary"):Array.isArray(t)?this.buffer=b.from(t):this.buffer=$(t),this.position=this.buffer.byteLength)}return e.prototype.put=function(t){if("string"==typeof t&&1!==t.length)throw new S("only accepts single character String");if("number"!=typeof t&&1!==t.length)throw new S("only accepts single character Uint8Array or Array");var r;if((r="string"==typeof t?t.charCodeAt(0):"number"==typeof t?t:t[0])<0||r>255)throw new S("only accepts number in a valid unsigned byte range 0-255");if(this.buffer.length>this.position)this.buffer[this.position++]=r;else{var n=b.alloc(e.BUFFER_SIZE+this.buffer.length);this.buffer.copy(n,0,0,this.buffer.length),this.buffer=n,this.buffer[this.position++]=r}},e.prototype.write=function(e,t){if(t="number"==typeof t?t:this.position,this.buffer.length<t+e.length){var r=b.alloc(this.buffer.length+e.length);this.buffer.copy(r,0,0,this.buffer.length),this.buffer=r}ArrayBuffer.isView(e)?(this.buffer.set($(e),t),this.position=t+e.byteLength>this.position?t+e.length:this.position):"string"==typeof e&&(this.buffer.write(e,t,e.length,"binary"),this.position=t+e.length>this.position?t+e.length:this.position)},e.prototype.read=function(e,t){return t=t&&t>0?t:this.position,this.buffer.slice(e,e+t)},e.prototype.value=function(e){return(e=!!e)&&this.buffer.length===this.position?this.buffer:e?this.buffer.slice(0,this.position):this.buffer.toString("binary",0,this.position)},e.prototype.length=function(){return this.position},e.prototype.toJSON=function(){return this.buffer.toString("base64")},e.prototype.toString=function(e){return this.buffer.toString(e)},e.prototype.toExtendedJSON=function(e){e=e||{};var t=this.buffer.toString("base64"),r=Number(this.sub_type).toString(16);return e.legacy?{$binary:t,$type:1===r.length?"0"+r:r}:{$binary:{base64:t,subType:1===r.length?"0"+r:r}}},e.prototype.toUUID=function(){if(this.sub_type===e.SUBTYPE_UUID)return new Te(this.buffer.slice(0,this.position));throw new O('Binary sub_type "'.concat(this.sub_type,'" is not supported for converting to UUID. Only "').concat(e.SUBTYPE_UUID,'" is currently supported.'))},e.fromExtendedJSON=function(t,r){var n,i;if(r=r||{},"$binary"in t?r.legacy&&"string"==typeof t.$binary&&"$type"in t?(i=t.$type?parseInt(t.$type,16):0,n=b.from(t.$binary,"base64")):"string"!=typeof t.$binary&&(i=t.$binary.subType?parseInt(t.$binary.subType,16):0,n=b.from(t.$binary.base64,"base64")):"$uuid"in t&&(i=4,n=L(t.$uuid)),!n)throw new S("Unexpected Binary Extended JSON format ".concat(JSON.stringify(t)));return i===ge?new Te(n):new e(n,i)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){var e=this.value(!0);return'new Binary(Buffer.from("'.concat(e.toString("hex"),'", "hex"), ').concat(this.sub_type,")")},e.BSON_BINARY_SUBTYPE_DEFAULT=0,e.BUFFER_SIZE=256,e.SUBTYPE_DEFAULT=0,e.SUBTYPE_FUNCTION=1,e.SUBTYPE_BYTE_ARRAY=2,e.SUBTYPE_UUID_OLD=3,e.SUBTYPE_UUID=4,e.SUBTYPE_MD5=5,e.SUBTYPE_ENCRYPTED=6,e.SUBTYPE_COLUMN=7,e.SUBTYPE_USER_DEFINED=128,e}();Object.defineProperty(Ee.prototype,"_bsontype",{value:"Binary"});var Te=function(e){function t(r){var n,i,o=this;if(null==r)n=t.generate();else if(r instanceof t)n=b.from(r.buffer),i=r.__id;else if(ArrayBuffer.isView(r)&&16===r.byteLength)n=$(r);else{if("string"!=typeof r)throw new S("Argument passed in UUID constructor must be a UUID, a 16 byte Buffer or a 32/36 character hex string (dashes excluded/included, format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).");n=L(r)}return(o=e.call(this,n,ge)||this).__id=i,o}return _(t,e),Object.defineProperty(t.prototype,"id",{get:function(){return this.buffer},set:function(e){this.buffer=e,t.cacheHexString&&(this.__id=B(e))},enumerable:!1,configurable:!0}),t.prototype.toHexString=function(e){if(void 0===e&&(e=!0),t.cacheHexString&&this.__id)return this.__id;var r=B(this.id,e);return t.cacheHexString&&(this.__id=r),r},t.prototype.toString=function(e){return e?this.id.toString(e):this.toHexString()},t.prototype.toJSON=function(){return this.toHexString()},t.prototype.equals=function(e){if(!e)return!1;if(e instanceof t)return e.id.equals(this.id);try{return new t(e).id.equals(this.id)}catch(e){return!1}},t.prototype.toBinary=function(){return new Ee(this.id,Ee.SUBTYPE_UUID)},t.generate=function(){var e=I(16);return e[6]=15&e[6]|64,e[8]=63&e[8]|128,b.from(e)},t.isValid=function(e){return!!e&&(e instanceof t||("string"==typeof e?q(e):!!A(e)&&16===e.length&&64==(240&e[6])&&128==(128&e[8])))},t.createFromHexString=function(e){return new t(L(e))},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return'new UUID("'.concat(this.toHexString(),'")')},t}(Ee),je=function(){function e(t,r){if(!(this instanceof e))return new e(t,r);this.code=t,this.scope=r}return e.prototype.toJSON=function(){return{code:this.code,scope:this.scope}},e.prototype.toExtendedJSON=function(){return this.scope?{$code:this.code,$scope:this.scope}:{$code:this.code}},e.fromExtendedJSON=function(t){return new e(t.$code,t.$scope)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){var e=this.toJSON();return'new Code("'.concat(String(e.code),'"').concat(e.scope?", ".concat(JSON.stringify(e.scope)):"",")")},e}();function Pe(e){return R(e)&&null!=e.$id&&"string"==typeof e.$ref&&(null==e.$db||"string"==typeof e.$db)}Object.defineProperty(je.prototype,"_bsontype",{value:"Code"});var Ie=function(){function e(t,r,n,i){if(!(this instanceof e))return new e(t,r,n,i);var o=t.split(".");2===o.length&&(n=o.shift(),t=o.shift()),this.collection=t,this.oid=r,this.db=n,this.fields=i||{}}return Object.defineProperty(e.prototype,"namespace",{get:function(){return this.collection},set:function(e){this.collection=e},enumerable:!1,configurable:!0}),e.prototype.toJSON=function(){var e=Object.assign({$ref:this.collection,$id:this.oid},this.fields);return null!=this.db&&(e.$db=this.db),e},e.prototype.toExtendedJSON=function(e){e=e||{};var t={$ref:this.collection,$id:this.oid};return e.legacy?t:(this.db&&(t.$db=this.db),t=Object.assign(t,this.fields))},e.fromExtendedJSON=function(t){var r=Object.assign({},t);return delete r.$ref,delete r.$id,delete r.$db,new e(t.$ref,t.$id,t.$db,r)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){var e=void 0===this.oid||void 0===this.oid.toString?this.oid:this.oid.toString();return'new DBRef("'.concat(this.namespace,'", new ObjectId("').concat(String(e),'")').concat(this.db?', "'.concat(this.db,'"'):"",")")},e}();Object.defineProperty(Ie.prototype,"_bsontype",{value:"DBRef"});var xe=void 0;try{xe=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(e){}var Ae=4294967296,Ne=0x10000000000000000,ke=Ne/2,Me={},De={},Re=function(){function e(t,r,n){if(void 0===t&&(t=0),!(this instanceof e))return new e(t,r,n);"bigint"==typeof t?Object.assign(this,e.fromBigInt(t,!!r)):"string"==typeof t?Object.assign(this,e.fromString(t,!!r)):(this.low=0|t,this.high=0|r,this.unsigned=!!n),Object.defineProperty(this,"__isLong__",{value:!0,configurable:!1,writable:!1,enumerable:!1})}return e.fromBits=function(t,r,n){return new e(t,r,n)},e.fromInt=function(t,r){var n,i,o;return r?(o=0<=(t>>>=0)&&t<256)&&(i=De[t])?i:(n=e.fromBits(t,(0|t)<0?-1:0,!0),o&&(De[t]=n),n):(o=-128<=(t|=0)&&t<128)&&(i=Me[t])?i:(n=e.fromBits(t,t<0?-1:0,!1),o&&(Me[t]=n),n)},e.fromNumber=function(t,r){if(isNaN(t))return r?e.UZERO:e.ZERO;if(r){if(t<0)return e.UZERO;if(t>=Ne)return e.MAX_UNSIGNED_VALUE}else{if(t<=-ke)return e.MIN_VALUE;if(t+1>=ke)return e.MAX_VALUE}return t<0?e.fromNumber(-t,r).neg():e.fromBits(t%Ae|0,t/Ae|0,r)},e.fromBigInt=function(t,r){return e.fromString(t.toString(),r)},e.fromString=function(t,r,n){if(0===t.length)throw Error("empty string");if("NaN"===t||"Infinity"===t||"+Infinity"===t||"-Infinity"===t)return e.ZERO;if("number"==typeof r?(n=r,r=!1):r=!!r,(n=n||10)<2||36<n)throw RangeError("radix");var i;if((i=t.indexOf("-"))>0)throw Error("interior hyphen");if(0===i)return e.fromString(t.substring(1),r,n).neg();for(var o=e.fromNumber(Math.pow(n,8)),s=e.ZERO,a=0;a<t.length;a+=8){var u=Math.min(8,t.length-a),c=parseInt(t.substring(a,a+u),n);if(u<8){var l=e.fromNumber(Math.pow(n,u));s=s.mul(l).add(e.fromNumber(c))}else s=(s=s.mul(o)).add(e.fromNumber(c))}return s.unsigned=r,s},e.fromBytes=function(t,r,n){return n?e.fromBytesLE(t,r):e.fromBytesBE(t,r)},e.fromBytesLE=function(t,r){return new e(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,r)},e.fromBytesBE=function(t,r){return new e(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],r)},e.isLong=function(e){return R(e)&&!0===e.__isLong__},e.fromValue=function(t,r){return"number"==typeof t?e.fromNumber(t,r):"string"==typeof t?e.fromString(t,r):e.fromBits(t.low,t.high,"boolean"==typeof r?r:t.unsigned)},e.prototype.add=function(t){e.isLong(t)||(t=e.fromValue(t));var r=this.high>>>16,n=65535&this.high,i=this.low>>>16,o=65535&this.low,s=t.high>>>16,a=65535&t.high,u=t.low>>>16,c=0,l=0,f=0,p=0;return f+=(p+=o+(65535&t.low))>>>16,p&=65535,l+=(f+=i+u)>>>16,f&=65535,c+=(l+=n+a)>>>16,l&=65535,c+=r+s,c&=65535,e.fromBits(f<<16|p,c<<16|l,this.unsigned)},e.prototype.and=function(t){return e.isLong(t)||(t=e.fromValue(t)),e.fromBits(this.low&t.low,this.high&t.high,this.unsigned)},e.prototype.compare=function(t){if(e.isLong(t)||(t=e.fromValue(t)),this.eq(t))return 0;var r=this.isNegative(),n=t.isNegative();return r&&!n?-1:!r&&n?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1},e.prototype.comp=function(e){return this.compare(e)},e.prototype.divide=function(t){if(e.isLong(t)||(t=e.fromValue(t)),t.isZero())throw Error("division by zero");if(xe){if(!this.unsigned&&-2147483648===this.high&&-1===t.low&&-1===t.high)return this;var r=(this.unsigned?xe.div_u:xe.div_s)(this.low,this.high,t.low,t.high);return e.fromBits(r,xe.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?e.UZERO:e.ZERO;var n,i,o;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return e.UZERO;if(t.gt(this.shru(1)))return e.UONE;o=e.UZERO}else{if(this.eq(e.MIN_VALUE))return t.eq(e.ONE)||t.eq(e.NEG_ONE)?e.MIN_VALUE:t.eq(e.MIN_VALUE)?e.ONE:(n=this.shr(1).div(t).shl(1)).eq(e.ZERO)?t.isNegative()?e.ONE:e.NEG_ONE:(i=this.sub(t.mul(n)),o=n.add(i.div(t)));if(t.eq(e.MIN_VALUE))return this.unsigned?e.UZERO:e.ZERO;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();o=e.ZERO}for(i=this;i.gte(t);){n=Math.max(1,Math.floor(i.toNumber()/t.toNumber()));for(var s=Math.ceil(Math.log(n)/Math.LN2),a=s<=48?1:Math.pow(2,s-48),u=e.fromNumber(n),c=u.mul(t);c.isNegative()||c.gt(i);)n-=a,c=(u=e.fromNumber(n,this.unsigned)).mul(t);u.isZero()&&(u=e.ONE),o=o.add(u),i=i.sub(c)}return o},e.prototype.div=function(e){return this.divide(e)},e.prototype.equals=function(t){return e.isLong(t)||(t=e.fromValue(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&this.high===t.high&&this.low===t.low},e.prototype.eq=function(e){return this.equals(e)},e.prototype.getHighBits=function(){return this.high},e.prototype.getHighBitsUnsigned=function(){return this.high>>>0},e.prototype.getLowBits=function(){return this.low},e.prototype.getLowBitsUnsigned=function(){return this.low>>>0},e.prototype.getNumBitsAbs=function(){if(this.isNegative())return this.eq(e.MIN_VALUE)?64:this.neg().getNumBitsAbs();var t,r=0!==this.high?this.high:this.low;for(t=31;t>0&&0==(r&1<<t);t--);return 0!==this.high?t+33:t+1},e.prototype.greaterThan=function(e){return this.comp(e)>0},e.prototype.gt=function(e){return this.greaterThan(e)},e.prototype.greaterThanOrEqual=function(e){return this.comp(e)>=0},e.prototype.gte=function(e){return this.greaterThanOrEqual(e)},e.prototype.ge=function(e){return this.greaterThanOrEqual(e)},e.prototype.isEven=function(){return 0==(1&this.low)},e.prototype.isNegative=function(){return!this.unsigned&&this.high<0},e.prototype.isOdd=function(){return 1==(1&this.low)},e.prototype.isPositive=function(){return this.unsigned||this.high>=0},e.prototype.isZero=function(){return 0===this.high&&0===this.low},e.prototype.lessThan=function(e){return this.comp(e)<0},e.prototype.lt=function(e){return this.lessThan(e)},e.prototype.lessThanOrEqual=function(e){return this.comp(e)<=0},e.prototype.lte=function(e){return this.lessThanOrEqual(e)},e.prototype.modulo=function(t){if(e.isLong(t)||(t=e.fromValue(t)),xe){var r=(this.unsigned?xe.rem_u:xe.rem_s)(this.low,this.high,t.low,t.high);return e.fromBits(r,xe.get_high(),this.unsigned)}return this.sub(this.div(t).mul(t))},e.prototype.mod=function(e){return this.modulo(e)},e.prototype.rem=function(e){return this.modulo(e)},e.prototype.multiply=function(t){if(this.isZero())return e.ZERO;if(e.isLong(t)||(t=e.fromValue(t)),xe){var r=xe.mul(this.low,this.high,t.low,t.high);return e.fromBits(r,xe.get_high(),this.unsigned)}if(t.isZero())return e.ZERO;if(this.eq(e.MIN_VALUE))return t.isOdd()?e.MIN_VALUE:e.ZERO;if(t.eq(e.MIN_VALUE))return this.isOdd()?e.MIN_VALUE:e.ZERO;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(e.TWO_PWR_24)&&t.lt(e.TWO_PWR_24))return e.fromNumber(this.toNumber()*t.toNumber(),this.unsigned);var n=this.high>>>16,i=65535&this.high,o=this.low>>>16,s=65535&this.low,a=t.high>>>16,u=65535&t.high,c=t.low>>>16,l=65535&t.low,f=0,p=0,d=0,h=0;return d+=(h+=s*l)>>>16,h&=65535,p+=(d+=o*l)>>>16,d&=65535,p+=(d+=s*c)>>>16,d&=65535,f+=(p+=i*l)>>>16,p&=65535,f+=(p+=o*c)>>>16,p&=65535,f+=(p+=s*u)>>>16,p&=65535,f+=n*l+i*c+o*u+s*a,f&=65535,e.fromBits(d<<16|h,f<<16|p,this.unsigned)},e.prototype.mul=function(e){return this.multiply(e)},e.prototype.negate=function(){return!this.unsigned&&this.eq(e.MIN_VALUE)?e.MIN_VALUE:this.not().add(e.ONE)},e.prototype.neg=function(){return this.negate()},e.prototype.not=function(){return e.fromBits(~this.low,~this.high,this.unsigned)},e.prototype.notEquals=function(e){return!this.equals(e)},e.prototype.neq=function(e){return this.notEquals(e)},e.prototype.ne=function(e){return this.notEquals(e)},e.prototype.or=function(t){return e.isLong(t)||(t=e.fromValue(t)),e.fromBits(this.low|t.low,this.high|t.high,this.unsigned)},e.prototype.shiftLeft=function(t){return e.isLong(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?e.fromBits(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):e.fromBits(0,this.low<<t-32,this.unsigned)},e.prototype.shl=function(e){return this.shiftLeft(e)},e.prototype.shiftRight=function(t){return e.isLong(t)&&(t=t.toInt()),0==(t&=63)?this:t<32?e.fromBits(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):e.fromBits(this.high>>t-32,this.high>=0?0:-1,this.unsigned)},e.prototype.shr=function(e){return this.shiftRight(e)},e.prototype.shiftRightUnsigned=function(t){if(e.isLong(t)&&(t=t.toInt()),0==(t&=63))return this;var r=this.high;if(t<32){var n=this.low;return e.fromBits(n>>>t|r<<32-t,r>>>t,this.unsigned)}return 32===t?e.fromBits(r,0,this.unsigned):e.fromBits(r>>>t-32,0,this.unsigned)},e.prototype.shr_u=function(e){return this.shiftRightUnsigned(e)},e.prototype.shru=function(e){return this.shiftRightUnsigned(e)},e.prototype.subtract=function(t){return e.isLong(t)||(t=e.fromValue(t)),this.add(t.neg())},e.prototype.sub=function(e){return this.subtract(e)},e.prototype.toInt=function(){return this.unsigned?this.low>>>0:this.low},e.prototype.toNumber=function(){return this.unsigned?(this.high>>>0)*Ae+(this.low>>>0):this.high*Ae+(this.low>>>0)},e.prototype.toBigInt=function(){return BigInt(this.toString())},e.prototype.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},e.prototype.toBytesLE=function(){var e=this.high,t=this.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24,255&e,e>>>8&255,e>>>16&255,e>>>24]},e.prototype.toBytesBE=function(){var e=this.high,t=this.low;return[e>>>24,e>>>16&255,e>>>8&255,255&e,t>>>24,t>>>16&255,t>>>8&255,255&t]},e.prototype.toSigned=function(){return this.unsigned?e.fromBits(this.low,this.high,!1):this},e.prototype.toString=function(t){if((t=t||10)<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(e.MIN_VALUE)){var r=e.fromNumber(t),n=this.div(r),i=n.mul(r).sub(this);return n.toString(t)+i.toInt().toString(t)}return"-"+this.neg().toString(t)}for(var o=e.fromNumber(Math.pow(t,6),this.unsigned),s=this,a="";;){var u=s.div(o),c=(s.sub(u.mul(o)).toInt()>>>0).toString(t);if((s=u).isZero())return c+a;for(;c.length<6;)c="0"+c;a=""+c+a}},e.prototype.toUnsigned=function(){return this.unsigned?this:e.fromBits(this.low,this.high,!0)},e.prototype.xor=function(t){return e.isLong(t)||(t=e.fromValue(t)),e.fromBits(this.low^t.low,this.high^t.high,this.unsigned)},e.prototype.eqz=function(){return this.isZero()},e.prototype.le=function(e){return this.lessThanOrEqual(e)},e.prototype.toExtendedJSON=function(e){return e&&e.relaxed?this.toNumber():{$numberLong:this.toString()}},e.fromExtendedJSON=function(t,r){var n=e.fromString(t.$numberLong);return r&&r.relaxed?n.toNumber():n},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return'new Long("'.concat(this.toString(),'"').concat(this.unsigned?", true":"",")")},e.TWO_PWR_24=e.fromInt(16777216),e.MAX_UNSIGNED_VALUE=e.fromBits(-1,-1,!0),e.ZERO=e.fromInt(0),e.UZERO=e.fromInt(0,!0),e.ONE=e.fromInt(1),e.UONE=e.fromInt(1,!0),e.NEG_ONE=e.fromInt(-1),e.MAX_VALUE=e.fromBits(-1,2147483647,!1),e.MIN_VALUE=e.fromBits(0,-2147483648,!1),e}();Object.defineProperty(Re.prototype,"__isLong__",{value:!0}),Object.defineProperty(Re.prototype,"_bsontype",{value:"Long"});var Ce=/^(\+|-)?(\d+|(\d*\.\d*))?(E|e)?([-+])?(\d+)?$/,$e=/^(\+|-)?(Infinity|inf)$/i,Fe=/^(\+|-)?NaN$/i,qe=6111,Le=-6176,Be=[124,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),Ue=[248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),Ve=[120,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),ze=/^([-+])?(\d+)?$/;function Qe(e){return!isNaN(parseInt(e,10))}function Ye(e){var t=Re.fromNumber(1e9),r=Re.fromNumber(0);if(!(e.parts[0]||e.parts[1]||e.parts[2]||e.parts[3]))return{quotient:e,rem:r};for(var n=0;n<=3;n++)r=(r=r.shiftLeft(32)).add(new Re(e.parts[n],0)),e.parts[n]=r.div(t).low,r=r.modulo(t);return{quotient:e,rem:r}}function We(e,t){throw new S('"'.concat(e,'" is not a valid Decimal128 string - ').concat(t))}var He=function(){function e(t){if(!(this instanceof e))return new e(t);if("string"==typeof t)this.bytes=e.fromString(t).bytes;else{if(!A(t))throw new S("Decimal128 must take a Buffer or string");if(16!==t.byteLength)throw new S("Decimal128 must take a Buffer of 16 bytes");this.bytes=t}}return e.fromString=function(t){var r,n=!1,i=!1,o=!1,s=0,a=0,u=0,c=0,l=0,f=[0],p=0,d=0,h=0,y=0,v=0,m=0,g=new Re(0,0),_=new Re(0,0),w=0;if(t.length>=7e3)throw new S(t+" not a valid Decimal128 string");var O=t.match(Ce),E=t.match($e),T=t.match(Fe);if(!O&&!E&&!T||0===t.length)throw new S(t+" not a valid Decimal128 string");if(O){var j=O[2],P=O[4],I=O[5],x=O[6];P&&void 0===x&&We(t,"missing exponent power"),P&&void 0===j&&We(t,"missing exponent base"),void 0===P&&(I||x)&&We(t,"missing e before exponent")}if("+"!==t[w]&&"-"!==t[w]||(n="-"===t[w++]),!Qe(t[w])&&"."!==t[w]){if("i"===t[w]||"I"===t[w])return new e(b.from(n?Ue:Ve));if("N"===t[w])return new e(b.from(Be))}for(;Qe(t[w])||"."===t[w];)"."!==t[w]?(p<34&&("0"!==t[w]||o)&&(o||(l=a),o=!0,f[d++]=parseInt(t[w],10),p+=1),o&&(u+=1),i&&(c+=1),a+=1,w+=1):(i&&We(t,"contains multiple periods"),i=!0,w+=1);if(i&&!a)throw new S(t+" not a valid Decimal128 string");if("e"===t[w]||"E"===t[w]){var A=t.substr(++w).match(ze);if(!A||!A[2])return new e(b.from(Be));v=parseInt(A[0],10),w+=A[0].length}if(t[w])return new e(b.from(Be));if(h=0,p){if(y=p-1,1!==(s=u))for(;0===f[l+s-1];)s-=1}else h=0,y=0,f[0]=0,u=1,p=1,s=0;for(v<=c&&c-v>16384?v=Le:v-=c;v>qe;){if((y+=1)-h>34){if(f.join("").match(/^0+$/)){v=qe;break}We(t,"overflow")}v-=1}for(;v<Le||p<u;){if(0===y&&s<p){v=Le,s=0;break}if(p<u?u-=1:y-=1,v<qe)v+=1;else{if(f.join("").match(/^0+$/)){v=qe;break}We(t,"overflow")}}if(y-h+1<s){var N=a;i&&(l+=1,N+=1),n&&(l+=1,N+=1);var k=parseInt(t[l+y+1],10),M=0;if(k>=5&&(M=1,5===k))for(M=f[y]%2==1?1:0,m=l+y+2;m<N;m++)if(parseInt(t[m],10)){M=1;break}if(M)for(var D=y;D>=0;D--)if(++f[D]>9&&(f[D]=0,0===D)){if(!(v<qe))return new e(b.from(n?Ue:Ve));v+=1,f[D]=1}}if(g=Re.fromNumber(0),_=Re.fromNumber(0),0===s)g=Re.fromNumber(0),_=Re.fromNumber(0);else if(y-h<17)for(D=h,_=Re.fromNumber(f[D++]),g=new Re(0,0);D<=y;D++)_=(_=_.multiply(Re.fromNumber(10))).add(Re.fromNumber(f[D]));else{for(D=h,g=Re.fromNumber(f[D++]);D<=y-17;D++)g=(g=g.multiply(Re.fromNumber(10))).add(Re.fromNumber(f[D]));for(_=Re.fromNumber(f[D++]);D<=y;D++)_=(_=_.multiply(Re.fromNumber(10))).add(Re.fromNumber(f[D]))}var R,C,$,F,q=function(e,t){if(!e&&!t)return{high:Re.fromNumber(0),low:Re.fromNumber(0)};var r=e.shiftRightUnsigned(32),n=new Re(e.getLowBits(),0),i=t.shiftRightUnsigned(32),o=new Re(t.getLowBits(),0),s=r.multiply(i),a=r.multiply(o),u=n.multiply(i),c=n.multiply(o);return s=s.add(a.shiftRightUnsigned(32)),a=new Re(a.getLowBits(),0).add(u).add(c.shiftRightUnsigned(32)),{high:s=s.add(a.shiftRightUnsigned(32)),low:c=a.shiftLeft(32).add(new Re(c.getLowBits(),0))}}(g,Re.fromString("100000000000000000"));q.low=q.low.add(_),C=_,(($=(R=q.low).high>>>0)<(F=C.high>>>0)||$===F&&R.low>>>0<C.low>>>0)&&(q.high=q.high.add(Re.fromNumber(1))),r=v+6176;var L={low:Re.fromNumber(0),high:Re.fromNumber(0)};q.high.shiftRightUnsigned(49).and(Re.fromNumber(1)).equals(Re.fromNumber(1))?(L.high=L.high.or(Re.fromNumber(3).shiftLeft(61)),L.high=L.high.or(Re.fromNumber(r).and(Re.fromNumber(16383).shiftLeft(47))),L.high=L.high.or(q.high.and(Re.fromNumber(0x7fffffffffff)))):(L.high=L.high.or(Re.fromNumber(16383&r).shiftLeft(49)),L.high=L.high.or(q.high.and(Re.fromNumber(562949953421311)))),L.low=q.low,n&&(L.high=L.high.or(Re.fromString("9223372036854775808")));var B=b.alloc(16);return w=0,B[w++]=255&L.low.low,B[w++]=L.low.low>>8&255,B[w++]=L.low.low>>16&255,B[w++]=L.low.low>>24&255,B[w++]=255&L.low.high,B[w++]=L.low.high>>8&255,B[w++]=L.low.high>>16&255,B[w++]=L.low.high>>24&255,B[w++]=255&L.high.low,B[w++]=L.high.low>>8&255,B[w++]=L.high.low>>16&255,B[w++]=L.high.low>>24&255,B[w++]=255&L.high.high,B[w++]=L.high.high>>8&255,B[w++]=L.high.high>>16&255,B[w++]=L.high.high>>24&255,new e(B)},e.prototype.toString=function(){for(var e,t=0,r=new Array(36),n=0;n<r.length;n++)r[n]=0;var i,o,s,a=0,u=!1,c={parts:[0,0,0,0]},l=[];a=0;var f=this.bytes,p=f[a++]|f[a++]<<8|f[a++]<<16|f[a++]<<24,d=f[a++]|f[a++]<<8|f[a++]<<16|f[a++]<<24,h=f[a++]|f[a++]<<8|f[a++]<<16|f[a++]<<24,y=f[a++]|f[a++]<<8|f[a++]<<16|f[a++]<<24;a=0,(new Re(p,d),new Re(h,y)).lessThan(Re.ZERO)&&l.push("-");var v=y>>26&31;if(v>>3==3){if(30===v)return l.join("")+"Infinity";if(31===v)return"NaN";e=y>>15&16383,i=8+(y>>14&1)}else i=y>>14&7,e=y>>17&16383;var m=e-6176;if(c.parts[0]=(16383&y)+((15&i)<<14),c.parts[1]=h,c.parts[2]=d,c.parts[3]=p,0===c.parts[0]&&0===c.parts[1]&&0===c.parts[2]&&0===c.parts[3])u=!0;else for(s=3;s>=0;s--){var b=0,g=Ye(c);if(c=g.quotient,b=g.rem.low)for(o=8;o>=0;o--)r[9*s+o]=b%10,b=Math.floor(b/10)}if(u)t=1,r[a]=0;else for(t=36;!r[a];)t-=1,a+=1;var _=t-1+m;if(_>=34||_<=-7||m>0){if(t>34)return l.push("".concat(0)),m>0?l.push("E+".concat(m)):m<0&&l.push("E".concat(m)),l.join("");for(l.push("".concat(r[a++])),(t-=1)&&l.push("."),n=0;n<t;n++)l.push("".concat(r[a++]));l.push("E"),_>0?l.push("+".concat(_)):l.push("".concat(_))}else if(m>=0)for(n=0;n<t;n++)l.push("".concat(r[a++]));else{var w=t+m;if(w>0)for(n=0;n<w;n++)l.push("".concat(r[a++]));else l.push("0");for(l.push(".");w++<0;)l.push("0");for(n=0;n<t-Math.max(w-1,0);n++)l.push("".concat(r[a++]))}return l.join("")},e.prototype.toJSON=function(){return{$numberDecimal:this.toString()}},e.prototype.toExtendedJSON=function(){return{$numberDecimal:this.toString()}},e.fromExtendedJSON=function(t){return e.fromString(t.$numberDecimal)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return'new Decimal128("'.concat(this.toString(),'")')},e}();Object.defineProperty(He.prototype,"_bsontype",{value:"Decimal128"});var Ke=function(){function e(t){if(!(this instanceof e))return new e(t);t instanceof Number&&(t=t.valueOf()),this.value=+t}return e.prototype.valueOf=function(){return this.value},e.prototype.toJSON=function(){return this.value},e.prototype.toString=function(e){return this.value.toString(e)},e.prototype.toExtendedJSON=function(e){return e&&(e.legacy||e.relaxed&&isFinite(this.value))?this.value:Object.is(Math.sign(this.value),-0)?{$numberDouble:"-".concat(this.value.toFixed(1))}:{$numberDouble:Number.isInteger(this.value)?this.value.toFixed(1):this.value.toString()}},e.fromExtendedJSON=function(t,r){var n=parseFloat(t.$numberDouble);return r&&r.relaxed?n:new e(n)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){var e=this.toExtendedJSON();return"new Double(".concat(e.$numberDouble,")")},e}();Object.defineProperty(Ke.prototype,"_bsontype",{value:"Double"});var Ge=function(){function e(t){if(!(this instanceof e))return new e(t);t instanceof Number&&(t=t.valueOf()),this.value=0|+t}return e.prototype.valueOf=function(){return this.value},e.prototype.toString=function(e){return this.value.toString(e)},e.prototype.toJSON=function(){return this.value},e.prototype.toExtendedJSON=function(e){return e&&(e.relaxed||e.legacy)?this.value:{$numberInt:this.value.toString()}},e.fromExtendedJSON=function(t,r){return r&&r.relaxed?parseInt(t.$numberInt,10):new e(t.$numberInt)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return"new Int32(".concat(this.valueOf(),")")},e}();Object.defineProperty(Ge.prototype,"_bsontype",{value:"Int32"});var Je=function(){function e(){if(!(this instanceof e))return new e}return e.prototype.toExtendedJSON=function(){return{$maxKey:1}},e.fromExtendedJSON=function(){return new e},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return"new MaxKey()"},e}();Object.defineProperty(Je.prototype,"_bsontype",{value:"MaxKey"});var Ze=function(){function e(){if(!(this instanceof e))return new e}return e.prototype.toExtendedJSON=function(){return{$minKey:1}},e.fromExtendedJSON=function(){return new e},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return"new MinKey()"},e}();Object.defineProperty(Ze.prototype,"_bsontype",{value:"MinKey"});var Xe=new RegExp("^[0-9a-fA-F]{24}$"),et=null,tt=Symbol("id"),rt=function(){function e(t){if(!(this instanceof e))return new e(t);var r;if("object"==typeof t&&t&&"id"in t){if("string"!=typeof t.id&&!ArrayBuffer.isView(t.id))throw new S("Argument passed in must have an id that is of type string or Buffer");r="toHexString"in t&&"function"==typeof t.toHexString?b.from(t.toHexString(),"hex"):t.id}else r=t;if(null==r||"number"==typeof r)this[tt]=e.generate("number"==typeof r?r:void 0);else if(ArrayBuffer.isView(r)&&12===r.byteLength)this[tt]=r instanceof b?r:$(r);else{if("string"!=typeof r)throw new S("Argument passed in does not match the accepted types");if(12===r.length){var n=b.from(r);if(12!==n.byteLength)throw new S("Argument passed in must be a string of 12 bytes");this[tt]=n}else{if(24!==r.length||!Xe.test(r))throw new S("Argument passed in must be a string of 12 bytes or a string of 24 hex characters or an integer");this[tt]=b.from(r,"hex")}}e.cacheHexString&&(this.__id=this.id.toString("hex"))}return Object.defineProperty(e.prototype,"id",{get:function(){return this[tt]},set:function(t){this[tt]=t,e.cacheHexString&&(this.__id=t.toString("hex"))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"generationTime",{get:function(){return this.id.readInt32BE(0)},set:function(e){this.id.writeUInt32BE(e,0)},enumerable:!1,configurable:!0}),e.prototype.toHexString=function(){if(e.cacheHexString&&this.__id)return this.__id;var t=this.id.toString("hex");return e.cacheHexString&&!this.__id&&(this.__id=t),t},e.getInc=function(){return e.index=(e.index+1)%16777215},e.generate=function(t){"number"!=typeof t&&(t=Math.floor(Date.now()/1e3));var r=e.getInc(),n=b.alloc(12);return n.writeUInt32BE(t,0),null===et&&(et=I(5)),n[4]=et[0],n[5]=et[1],n[6]=et[2],n[7]=et[3],n[8]=et[4],n[11]=255&r,n[10]=r>>8&255,n[9]=r>>16&255,n},e.prototype.toString=function(e){return e?this.id.toString(e):this.toHexString()},e.prototype.toJSON=function(){return this.toHexString()},e.prototype.equals=function(t){if(null==t)return!1;if(t instanceof e)return this[tt][11]===t[tt][11]&&this[tt].equals(t[tt]);if("string"==typeof t&&e.isValid(t)&&12===t.length&&A(this.id))return t===b.prototype.toString.call(this.id,"latin1");if("string"==typeof t&&e.isValid(t)&&24===t.length)return t.toLowerCase()===this.toHexString();if("string"==typeof t&&e.isValid(t)&&12===t.length)return b.from(t).equals(this.id);if("object"==typeof t&&"toHexString"in t&&"function"==typeof t.toHexString){var r=t.toHexString(),n=this.toHexString().toLowerCase();return"string"==typeof r&&r.toLowerCase()===n}return!1},e.prototype.getTimestamp=function(){var e=new Date,t=this.id.readUInt32BE(0);return e.setTime(1e3*Math.floor(t)),e},e.createPk=function(){return new e},e.createFromTime=function(t){var r=b.from([0,0,0,0,0,0,0,0,0,0,0,0]);return r.writeUInt32BE(t,0),new e(r)},e.createFromHexString=function(t){if(void 0===t||null!=t&&24!==t.length)throw new S("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");return new e(b.from(t,"hex"))},e.isValid=function(t){if(null==t)return!1;try{return new e(t),!0}catch(e){return!1}},e.prototype.toExtendedJSON=function(){return this.toHexString?{$oid:this.toHexString()}:{$oid:this.toString("hex")}},e.fromExtendedJSON=function(t){return new e(t.$oid)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e.prototype.inspect=function(){return'new ObjectId("'.concat(this.toHexString(),'")')},e.index=Math.floor(16777215*Math.random()),e}();Object.defineProperty(rt.prototype,"generate",{value:C((function(e){return rt.generate(e)}),"Please use the static `ObjectId.generate(time)` instead")}),Object.defineProperty(rt.prototype,"getInc",{value:C((function(){return rt.getInc()}),"Please use the static `ObjectId.getInc()` instead")}),Object.defineProperty(rt.prototype,"get_inc",{value:C((function(){return rt.getInc()}),"Please use the static `ObjectId.getInc()` instead")}),Object.defineProperty(rt,"get_inc",{value:C((function(){return rt.getInc()}),"Please use the static `ObjectId.getInc()` instead")}),Object.defineProperty(rt.prototype,"_bsontype",{value:"ObjectID"});var nt=function(){function e(t,r){if(!(this instanceof e))return new e(t,r);if(this.pattern=t,this.options=(null!=r?r:"").split("").sort().join(""),-1!==this.pattern.indexOf("\0"))throw new O("BSON Regex patterns cannot contain null bytes, found: ".concat(JSON.stringify(this.pattern)));if(-1!==this.options.indexOf("\0"))throw new O("BSON Regex options cannot contain null bytes, found: ".concat(JSON.stringify(this.options)));for(var n=0;n<this.options.length;n++)if("i"!==this.options[n]&&"m"!==this.options[n]&&"x"!==this.options[n]&&"l"!==this.options[n]&&"s"!==this.options[n]&&"u"!==this.options[n])throw new O("The regular expression option [".concat(this.options[n],"] is not supported"))}return e.parseOptions=function(e){return e?e.split("").sort().join(""):""},e.prototype.toExtendedJSON=function(e){return(e=e||{}).legacy?{$regex:this.pattern,$options:this.options}:{$regularExpression:{pattern:this.pattern,options:this.options}}},e.fromExtendedJSON=function(t){if("$regex"in t){if("string"==typeof t.$regex)return new e(t.$regex,e.parseOptions(t.$options));if("BSONRegExp"===t.$regex._bsontype)return t}if("$regularExpression"in t)return new e(t.$regularExpression.pattern,e.parseOptions(t.$regularExpression.options));throw new S("Unexpected BSONRegExp EJSON object form: ".concat(JSON.stringify(t)))},e}();Object.defineProperty(nt.prototype,"_bsontype",{value:"BSONRegExp"});var it=function(){function e(t){if(!(this instanceof e))return new e(t);this.value=t}return e.prototype.valueOf=function(){return this.value},e.prototype.toString=function(){return this.value},e.prototype.inspect=function(){return'new BSONSymbol("'.concat(this.value,'")')},e.prototype.toJSON=function(){return this.value},e.prototype.toExtendedJSON=function(){return{$symbol:this.value}},e.fromExtendedJSON=function(t){return new e(t.$symbol)},e.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},e}();Object.defineProperty(it.prototype,"_bsontype",{value:"Symbol"});var ot=Re,st=function(e){function t(r,n){var i=this;return i instanceof t?(i=Re.isLong(r)?e.call(this,r.low,r.high,!0)||this:R(r)&&void 0!==r.t&&void 0!==r.i?e.call(this,r.i,r.t,!0)||this:e.call(this,r,n,!0)||this,Object.defineProperty(i,"_bsontype",{value:"Timestamp",writable:!1,configurable:!1,enumerable:!1}),i):new t(r,n)}return _(t,e),t.prototype.toJSON=function(){return{$timestamp:this.toString()}},t.fromInt=function(e){return new t(Re.fromInt(e,!0))},t.fromNumber=function(e){return new t(Re.fromNumber(e,!0))},t.fromBits=function(e,r){return new t(e,r)},t.fromString=function(e,r){return new t(Re.fromString(e,!0,r))},t.prototype.toExtendedJSON=function(){return{$timestamp:{t:this.high>>>0,i:this.low>>>0}}},t.fromExtendedJSON=function(e){return new t(e.$timestamp)},t.prototype[Symbol.for("nodejs.util.inspect.custom")]=function(){return this.inspect()},t.prototype.inspect=function(){return"new Timestamp({ t: ".concat(this.getHighBits(),", i: ").concat(this.getLowBits()," })")},t.MAX_VALUE=Re.MAX_UNSIGNED_VALUE,t}(ot);function at(e){return R(e)&&Reflect.has(e,"_bsontype")&&"string"==typeof e._bsontype}var ut=2147483647,ct=-2147483648,lt=0x8000000000000000,ft=-0x8000000000000000,pt={$oid:rt,$binary:Ee,$uuid:Ee,$symbol:it,$numberInt:Ge,$numberDecimal:He,$numberDouble:Ke,$numberLong:Re,$minKey:Ze,$maxKey:Je,$regex:nt,$regularExpression:nt,$timestamp:st};function dt(e,t){if(void 0===t&&(t={}),"number"==typeof e){if(t.relaxed||t.legacy)return e;if(Math.floor(e)===e){if(e>=ct&&e<=ut)return new Ge(e);if(e>=ft&&e<=lt)return Re.fromNumber(e)}return new Ke(e)}if(null==e||"object"!=typeof e)return e;if(e.$undefined)return null;for(var r=Object.keys(e).filter((function(t){return t.startsWith("$")&&null!=e[t]})),n=0;n<r.length;n++){var i=pt[r[n]];if(i)return i.fromExtendedJSON(e,t)}if(null!=e.$date){var o=e.$date,s=new Date;return t.legacy?"number"==typeof o?s.setTime(o):"string"==typeof o&&s.setTime(Date.parse(o)):"string"==typeof o?s.setTime(Date.parse(o)):Re.isLong(o)?s.setTime(o.toNumber()):"number"==typeof o&&t.relaxed&&s.setTime(o),s}if(null!=e.$code){var a=Object.assign({},e);return e.$scope&&(a.$scope=dt(e.$scope)),je.fromExtendedJSON(e)}if(Pe(e)||e.$dbPointer){var u=e.$ref?e:e.$dbPointer;if(u instanceof Ie)return u;var c=Object.keys(u).filter((function(e){return e.startsWith("$")})),l=!0;if(c.forEach((function(e){-1===["$ref","$id","$db"].indexOf(e)&&(l=!1)})),l)return Ie.fromExtendedJSON(u)}return e}function ht(e){var t=e.toISOString();return 0!==e.getUTCMilliseconds()?t:t.slice(0,-5)+"Z"}function yt(e,t){if(("object"==typeof e||"function"==typeof e)&&null!==e){var r=t.seenObjects.findIndex((function(t){return t.obj===e}));if(-1!==r){var n=t.seenObjects.map((function(e){return e.propertyName})),i=n.slice(0,r).map((function(e){return"".concat(e," -> ")})).join(""),o=n[r],s=" -> "+n.slice(r+1,n.length-1).map((function(e){return"".concat(e," -> ")})).join(""),a=n[n.length-1],u=" ".repeat(i.length+o.length/2),c="-".repeat(s.length+(o.length+a.length)/2-1);throw new S("Converting circular structure to EJSON:\n"+" ".concat(i).concat(o).concat(s).concat(a,"\n")+" ".concat(u,"\\").concat(c,"/"))}t.seenObjects[t.seenObjects.length-1].obj=e}if(Array.isArray(e))return function(e,t){return e.map((function(e,r){t.seenObjects.push({propertyName:"index ".concat(r),obj:null});try{return yt(e,t)}finally{t.seenObjects.pop()}}))}(e,t);if(void 0===e)return null;if(e instanceof Date||D(e)){var l=e.getTime(),f=l>-1&&l<2534023188e5;return t.legacy?t.relaxed&&f?{$date:e.getTime()}:{$date:ht(e)}:t.relaxed&&f?{$date:ht(e)}:{$date:{$numberLong:e.getTime().toString()}}}if(!("number"!=typeof e||t.relaxed&&isFinite(e))){if(Math.floor(e)===e){var p=e>=ft&&e<=lt;if(e>=ct&&e<=ut)return{$numberInt:e.toString()};if(p)return{$numberLong:e.toString()}}return{$numberDouble:e.toString()}}if(e instanceof RegExp||M(e)){var d=e.flags;if(void 0===d){var h=e.toString().match(/[gimuy]*$/);h&&(d=h[0])}return new nt(e.source,d).toExtendedJSON(t)}return null!=e&&"object"==typeof e?function(e,t){if(null==e||"object"!=typeof e)throw new O("not an object instance");var r=e._bsontype;if(void 0===r){var n={};for(var i in e){t.seenObjects.push({propertyName:i,obj:null});try{var o=yt(e[i],t);"__proto__"===i?Object.defineProperty(n,i,{value:o,writable:!0,enumerable:!0,configurable:!0}):n[i]=o}finally{t.seenObjects.pop()}}return n}if(at(e)){var s=e;if("function"!=typeof s.toExtendedJSON){var a=bt[e._bsontype];if(!a)throw new S("Unrecognized or invalid _bsontype: "+e._bsontype);s=a(s)}return"Code"===r&&s.scope?s=new je(s.code,yt(s.scope,t)):"DBRef"===r&&s.oid&&(s=new Ie(yt(s.collection,t),yt(s.oid,t),yt(s.db,t),yt(s.fields,t))),s.toExtendedJSON(t)}throw new O("_bsontype must be a string, but was: "+typeof r)}(e,t):e}var vt,mt,bt={Binary:function(e){return new Ee(e.value(),e.sub_type)},Code:function(e){return new je(e.code,e.scope)},DBRef:function(e){return new Ie(e.collection||e.namespace,e.oid,e.db,e.fields)},Decimal128:function(e){return new He(e.bytes)},Double:function(e){return new Ke(e.value)},Int32:function(e){return new Ge(e.value)},Long:function(e){return Re.fromBits(null!=e.low?e.low:e.low_,null!=e.low?e.high:e.high_,null!=e.low?e.unsigned:e.unsigned_)},MaxKey:function(){return new Je},MinKey:function(){return new Ze},ObjectID:function(e){return new rt(e)},ObjectId:function(e){return new rt(e)},BSONRegExp:function(e){return new nt(e.pattern,e.options)},Symbol:function(e){return new it(e.value)},Timestamp:function(e){return st.fromBits(e.low,e.high)}};!function(e){function t(e,t){var r=Object.assign({},{relaxed:!0,legacy:!1},t);return"boolean"==typeof r.relaxed&&(r.strict=!r.relaxed),"boolean"==typeof r.strict&&(r.relaxed=!r.strict),JSON.parse(e,(function(e,t){if(-1!==e.indexOf("\0"))throw new O("BSON Document field names cannot contain null bytes, found: ".concat(JSON.stringify(e)));return dt(t,r)}))}function r(e,t,r,n){null!=r&&"object"==typeof r&&(n=r,r=0),null==t||"object"!=typeof t||Array.isArray(t)||(n=t,t=void 0,r=0);var i=yt(e,Object.assign({relaxed:!0,legacy:!1},n,{seenObjects:[{propertyName:"(root)",obj:null}]}));return JSON.stringify(i,t,r)}e.parse=t,e.stringify=r,e.serialize=function(e,t){return t=t||{},JSON.parse(r(e,t))},e.deserialize=function(e,r){return r=r||{},t(JSON.stringify(e),r)}}(vt||(vt={}));var gt=T();function _t(e,t,r){var n=5;if(Array.isArray(e))for(var i=0;i<e.length;i++)n+=wt(i.toString(),e[i],t,!0,r);else for(var o in"function"==typeof(null==e?void 0:e.toBSON)&&(e=e.toBSON()),e)n+=wt(o,e[o],t,!1,r);return n}function wt(e,t,r,n,i){switch(void 0===r&&(r=!1),void 0===n&&(n=!1),void 0===i&&(i=!1),"function"==typeof(null==t?void 0:t.toBSON)&&(t=t.toBSON()),typeof t){case"string":return 1+b.byteLength(e,"utf8")+1+4+b.byteLength(t,"utf8")+1;case"number":return Math.floor(t)===t&&t>=W&&t<=Y&&t>=V&&t<=U?(null!=e?b.byteLength(e,"utf8")+1:0)+5:(null!=e?b.byteLength(e,"utf8")+1:0)+9;case"undefined":return n||!i?(null!=e?b.byteLength(e,"utf8")+1:0)+1:0;case"boolean":return(null!=e?b.byteLength(e,"utf8")+1:0)+2;case"object":if(null==t||"MinKey"===t._bsontype||"MaxKey"===t._bsontype)return(null!=e?b.byteLength(e,"utf8")+1:0)+1;if("ObjectId"===t._bsontype||"ObjectID"===t._bsontype)return(null!=e?b.byteLength(e,"utf8")+1:0)+13;if(t instanceof Date||D(t))return(null!=e?b.byteLength(e,"utf8")+1:0)+9;if(ArrayBuffer.isView(t)||t instanceof ArrayBuffer||x(t))return(null!=e?b.byteLength(e,"utf8")+1:0)+6+t.byteLength;if("Long"===t._bsontype||"Double"===t._bsontype||"Timestamp"===t._bsontype)return(null!=e?b.byteLength(e,"utf8")+1:0)+9;if("Decimal128"===t._bsontype)return(null!=e?b.byteLength(e,"utf8")+1:0)+17;if("Code"===t._bsontype)return null!=t.scope&&Object.keys(t.scope).length>0?(null!=e?b.byteLength(e,"utf8")+1:0)+1+4+4+b.byteLength(t.code.toString(),"utf8")+1+_t(t.scope,r,i):(null!=e?b.byteLength(e,"utf8")+1:0)+1+4+b.byteLength(t.code.toString(),"utf8")+1;if("Binary"===t._bsontype){var o=t;return o.sub_type===Ee.SUBTYPE_BYTE_ARRAY?(null!=e?b.byteLength(e,"utf8")+1:0)+(o.position+1+4+1+4):(null!=e?b.byteLength(e,"utf8")+1:0)+(o.position+1+4+1)}if("Symbol"===t._bsontype)return(null!=e?b.byteLength(e,"utf8")+1:0)+b.byteLength(t.value,"utf8")+4+1+1;if("DBRef"===t._bsontype){var s=Object.assign({$ref:t.collection,$id:t.oid},t.fields);return null!=t.db&&(s.$db=t.db),(null!=e?b.byteLength(e,"utf8")+1:0)+1+_t(s,r,i)}return t instanceof RegExp||M(t)?(null!=e?b.byteLength(e,"utf8")+1:0)+1+b.byteLength(t.source,"utf8")+1+(t.global?1:0)+(t.ignoreCase?1:0)+(t.multiline?1:0)+1:"BSONRegExp"===t._bsontype?(null!=e?b.byteLength(e,"utf8")+1:0)+1+b.byteLength(t.pattern,"utf8")+1+b.byteLength(t.options,"utf8")+1:(null!=e?b.byteLength(e,"utf8")+1:0)+_t(t,r,i)+1;case"function":if(t instanceof RegExp||M(t)||"[object RegExp]"===String.call(t))return(null!=e?b.byteLength(e,"utf8")+1:0)+1+b.byteLength(t.source,"utf8")+1+(t.global?1:0)+(t.ignoreCase?1:0)+(t.multiline?1:0)+1;if(r&&null!=t.scope&&Object.keys(t.scope).length>0)return(null!=e?b.byteLength(e,"utf8")+1:0)+1+4+4+b.byteLength(j(t),"utf8")+1+_t(t.scope,r,i);if(r)return(null!=e?b.byteLength(e,"utf8")+1:0)+1+4+b.byteLength(j(t),"utf8")+1}return 0}function Ot(e,t,r){for(var n=0,i=t;i<r;i+=1){var o=e[i];if(n){if(128!=(192&o))return!1;n-=1}else if(128&o)if(192==(224&o))n=1;else if(224==(240&o))n=2;else{if(240!=(248&o))return!1;n=3}}return!n}mt=gt.Map?gt.Map:function(){function e(e){void 0===e&&(e=[]),this._keys=[],this._values={};for(var t=0;t<e.length;t++)if(null!=e[t]){var r=e[t],n=r[0],i=r[1];this._keys.push(n),this._values[n]={v:i,i:this._keys.length-1}}}return e.prototype.clear=function(){this._keys=[],this._values={}},e.prototype.delete=function(e){var t=this._values[e];return null!=t&&(delete this._values[e],this._keys.splice(t.i,1),!0)},e.prototype.entries=function(){var e=this,t=0;return{next:function(){var r=e._keys[t++];return{value:void 0!==r?[r,e._values[r].v]:void 0,done:void 0===r}}}},e.prototype.forEach=function(e,t){t=t||this;for(var r=0;r<this._keys.length;r++){var n=this._keys[r];e.call(t,this._values[n].v,n,t)}},e.prototype.get=function(e){return this._values[e]?this._values[e].v:void 0},e.prototype.has=function(e){return null!=this._values[e]},e.prototype.keys=function(){var e=this,t=0;return{next:function(){var r=e._keys[t++];return{value:void 0!==r?r:void 0,done:void 0===r}}}},e.prototype.set=function(e,t){return this._values[e]?(this._values[e].v=t,this):(this._keys.push(e),this._values[e]={v:t,i:this._keys.length-1},this)},e.prototype.values=function(){var e=this,t=0;return{next:function(){var r=e._keys[t++];return{value:void 0!==r?e._values[r].v:void 0,done:void 0===r}}}},Object.defineProperty(e.prototype,"size",{get:function(){return this._keys.length},enumerable:!1,configurable:!0}),e}();var St=Re.fromNumber(Y),Et=Re.fromNumber(W),Tt={};function jt(e,t,r){var n=(t=null==t?{}:t)&&t.index?t.index:0,i=e[n]|e[n+1]<<8|e[n+2]<<16|e[n+3]<<24;if(i<5)throw new O("bson size must be >= 5, is ".concat(i));if(t.allowObjectSmallerThanBufferSize&&e.length<i)throw new O("buffer length ".concat(e.length," must be >= bson size ").concat(i));if(!t.allowObjectSmallerThanBufferSize&&e.length!==i)throw new O("buffer length ".concat(e.length," must === bson size ").concat(i));if(i+n>e.byteLength)throw new O("(bson size ".concat(i," + options.index ").concat(n," must be <= buffer length ").concat(e.byteLength,")"));if(0!==e[n+i-1])throw new O("One object, sized correctly, with a spot for an EOO, but the EOO isn't 0x00");return It(e,n,t,r)}var Pt=/^\$ref$|^\$id$|^\$db$/;function It(e,t,r,n){void 0===n&&(n=!1);var i,o=null!=r.evalFunctions&&r.evalFunctions,s=null!=r.cacheFunctions&&r.cacheFunctions,a=null==r.fieldsAsRaw?null:r.fieldsAsRaw,u=null!=r.raw&&r.raw,c="boolean"==typeof r.bsonRegExp&&r.bsonRegExp,l=null!=r.promoteBuffers&&r.promoteBuffers,f=null==r.promoteLongs||r.promoteLongs,p=null==r.promoteValues||r.promoteValues,d=null==r.validation?{utf8:!0}:r.validation,h=!0,y=new Set,v=d.utf8;if("boolean"==typeof v)i=v;else{h=!1;var m=Object.keys(v).map((function(e){return v[e]}));if(0===m.length)throw new O("UTF-8 validation setting cannot be empty");if("boolean"!=typeof m[0])throw new O("Invalid UTF-8 validation option, must specify boolean values");if(i=m[0],!m.every((function(e){return e===i})))throw new O("Invalid UTF-8 validation option - keys must be all true or all false")}if(!h)for(var g=0,_=Object.keys(v);g<_.length;g++){var S=_[g];y.add(S)}var E=t;if(e.length<5)throw new O("corrupt bson message < 5 bytes long");var T=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24;if(T<5||T>e.length)throw new O("corrupt bson message");for(var j=n?[]:{},P=0,I=!n&&null,x=new DataView(e.buffer,e.byteOffset,e.byteLength);;){var A=e[t++];if(0===A)break;for(var N=t;0!==e[N]&&N<e.length;)N++;if(N>=e.byteLength)throw new O("Bad BSON Document: illegal CString");var k,M=n?P++:e.toString("utf8",t,N);k=h||y.has(M)?i:!i,!1!==I&&"$"===M[0]&&(I=Pt.test(M));var D=void 0;if(t=N+1,A===K){if((Ae=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24)<=0||Ae>e.length-t||0!==e[t+Ae-1])throw new O("bad string length in bson");D=At(e,t,t+Ae-1,k),t+=Ae}else if(A===ee){var R=b.alloc(12);e.copy(R,0,t,t+12),D=new rt(R),t+=12}else if(A===ce&&!1===p)D=new Ge(e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24);else if(A===ce)D=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24;else if(A===H&&!1===p)D=new Ke(x.getFloat64(t,!0)),t+=8;else if(A===H)D=x.getFloat64(t,!0),t+=8;else if(A===re){var C=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24,$=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24;D=new Date(new Re(C,$).toNumber())}else if(A===te){if(0!==e[t]&&1!==e[t])throw new O("illegal boolean type value");D=1===e[t++]}else if(A===G){var F=t;if((Te=e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)<=0||Te>e.length-t)throw new O("bad embedded document length in bson");if(u)D=e.slice(t,t+Te);else{var q=r;h||(q=w(w({},r),{validation:{utf8:k}})),D=It(e,F,q,!1)}t+=Te}else if(A===J){F=t;var L=r,B=t+(Te=e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24);if(a&&a[M]){for(var U in L={},r)L[U]=r[U];L.raw=!0}if(h||(L=w(w({},L),{validation:{utf8:k}})),D=It(e,F,L,!0),0!==e[(t+=Te)-1])throw new O("invalid array terminator byte");if(t!==B)throw new O("corrupted array bson")}else if(A===X)D=void 0;else if(A===ne)D=null;else if(A===fe){C=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24,$=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24;var V=new Re(C,$);D=f&&!0===p&&V.lessThanOrEqual(St)&&V.greaterThanOrEqual(Et)?V.toNumber():V}else if(A===pe){var z=b.alloc(16);e.copy(z,0,t,t+16),t+=16;var Q=new He(z);D="toObject"in Q&&"function"==typeof Q.toObject?Q.toObject():Q}else if(A===Z){var Y=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24,W=Y,ye=e[t++];if(Y<0)throw new O("Negative binary type element size found");if(Y>e.byteLength)throw new O("Binary type size larger than document size");if(null!=e.slice){if(ye===Ee.SUBTYPE_BYTE_ARRAY){if((Y=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24)<0)throw new O("Negative binary type element size found for subtype 0x02");if(Y>W-4)throw new O("Binary type with subtype 0x02 contains too long binary size");if(Y<W-4)throw new O("Binary type with subtype 0x02 contains too short binary size")}l&&p?D=e.slice(t,t+Y):(D=new Ee(e.slice(t,t+Y),ye),ye===ge&&(D=D.toUUID()))}else{var ve=b.alloc(Y);if(ye===Ee.SUBTYPE_BYTE_ARRAY){if((Y=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24)<0)throw new O("Negative binary type element size found for subtype 0x02");if(Y>W-4)throw new O("Binary type with subtype 0x02 contains too long binary size");if(Y<W-4)throw new O("Binary type with subtype 0x02 contains too short binary size")}for(N=0;N<Y;N++)ve[N]=e[t+N];D=l&&p?ve:ye===ge?new Ee(e.slice(t,t+Y),ye).toUUID():new Ee(e.slice(t,t+Y),ye)}t+=Y}else if(A===ie&&!1===c){for(N=t;0!==e[N]&&N<e.length;)N++;if(N>=e.length)throw new O("Bad BSON Document: illegal CString");var me=e.toString("utf8",t,N);for(N=t=N+1;0!==e[N]&&N<e.length;)N++;if(N>=e.length)throw new O("Bad BSON Document: illegal CString");var be=e.toString("utf8",t,N);t=N+1;var _e=new Array(be.length);for(N=0;N<be.length;N++)switch(be[N]){case"m":_e[N]="m";break;case"s":_e[N]="g";break;case"i":_e[N]="i"}D=new RegExp(me,_e.join(""))}else if(A===ie&&!0===c){for(N=t;0!==e[N]&&N<e.length;)N++;if(N>=e.length)throw new O("Bad BSON Document: illegal CString");for(me=e.toString("utf8",t,N),N=t=N+1;0!==e[N]&&N<e.length;)N++;if(N>=e.length)throw new O("Bad BSON Document: illegal CString");be=e.toString("utf8",t,N),t=N+1,D=new nt(me,be)}else if(A===ae){if((Ae=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24)<=0||Ae>e.length-t||0!==e[t+Ae-1])throw new O("bad string length in bson");var we=At(e,t,t+Ae-1,k);D=p?we:new it(we),t+=Ae}else if(A===le)C=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24,$=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24,D=new st(C,$);else if(A===de)D=new Ze;else if(A===he)D=new Je;else if(A===se){if((Ae=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24)<=0||Ae>e.length-t||0!==e[t+Ae-1])throw new O("bad string length in bson");var Oe=At(e,t,t+Ae-1,k);D=o?s?xt(Oe,Tt,j):xt(Oe):new je(Oe),t+=Ae}else if(A===ue){var Se=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24;if(Se<13)throw new O("code_w_scope total size shorter minimum expected length");if((Ae=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24)<=0||Ae>e.length-t||0!==e[t+Ae-1])throw new O("bad string length in bson");Oe=At(e,t,t+Ae-1,k),F=t+=Ae;var Te=e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24,xe=It(e,F,r,!1);if(t+=Te,Se<8+Te+Ae)throw new O("code_w_scope total size is too short, truncating scope");if(Se>8+Te+Ae)throw new O("code_w_scope total size is too long, clips outer document");o?(D=s?xt(Oe,Tt,j):xt(Oe)).scope=xe:D=new je(Oe,xe)}else{if(A!==oe)throw new O("Detected unknown BSON type ".concat(A.toString(16),' for fieldname "').concat(M,'"'));var Ae;if((Ae=e[t++]|e[t++]<<8|e[t++]<<16|e[t++]<<24)<=0||Ae>e.length-t||0!==e[t+Ae-1])throw new O("bad string length in bson");if(null!=d&&d.utf8&&!Ot(e,t,t+Ae-1))throw new O("Invalid UTF-8 string in BSON document");var Ne=e.toString("utf8",t,t+Ae-1);t+=Ae;var ke=b.alloc(12);e.copy(ke,0,t,t+12),R=new rt(ke),t+=12,D=new Ie(Ne,R)}"__proto__"===M?Object.defineProperty(j,M,{value:D,writable:!0,enumerable:!0,configurable:!0}):j[M]=D}if(T!==t-E){if(n)throw new O("corrupt array bson");throw new O("corrupt object bson")}if(!I)return j;if(Pe(j)){var Me=Object.assign({},j);return delete Me.$ref,delete Me.$id,delete Me.$db,new Ie(j.$ref,j.$id,j.$db,Me)}return j}function xt(e,t,r){return t?(null==t[e]&&(t[e]=new Function(e)),t[e].bind(r)):new Function(e)}function At(e,t,r,n){var i=e.toString("utf8",t,r);if(n)for(var o=0;o<i.length;o++)if(65533===i.charCodeAt(o)){if(!Ot(e,t,r))throw new O("Invalid UTF-8 string in BSON document");break}return i}var Nt=/\x00/,kt=new Set(["$db","$ref","$id","$clusterTime"]);function Mt(e,t,r,n,i){e[n++]=K;var o=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8");e[(n=n+o+1)-1]=0;var s=e.write(r,n+4,void 0,"utf8");return e[n+3]=s+1>>24&255,e[n+2]=s+1>>16&255,e[n+1]=s+1>>8&255,e[n]=s+1&255,n=n+4+s,e[n++]=0,n}var Dt=new Uint8Array(8),Rt=new DataView(Dt.buffer,Dt.byteOffset,Dt.byteLength);function Ct(e,t,r,n,i){return Number.isInteger(r)&&r>=V&&r<=U?(e[n++]=ce,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,e[n++]=255&r,e[n++]=r>>8&255,e[n++]=r>>16&255,e[n++]=r>>24&255):(e[n++]=H,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,Rt.setFloat64(0,r,!0),e.set(Dt,n),n+=8),n}function $t(e,t,r,n,i){return e[n++]=ne,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,n}function Ft(e,t,r,n,i){return e[n++]=te,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,e[n++]=r?1:0,n}function qt(e,t,r,n,i){e[n++]=re,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0;var o=Re.fromNumber(r.getTime()),s=o.getLowBits(),a=o.getHighBits();return e[n++]=255&s,e[n++]=s>>8&255,e[n++]=s>>16&255,e[n++]=s>>24&255,e[n++]=255&a,e[n++]=a>>8&255,e[n++]=a>>16&255,e[n++]=a>>24&255,n}function Lt(e,t,r,n,i){if(e[n++]=ie,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,r.source&&null!=r.source.match(Nt))throw Error("value "+r.source+" must not contain null bytes");return n+=e.write(r.source,n,void 0,"utf8"),e[n++]=0,r.ignoreCase&&(e[n++]=105),r.global&&(e[n++]=115),r.multiline&&(e[n++]=109),e[n++]=0,n}function Bt(e,t,r,n,i){if(e[n++]=ie,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,null!=r.pattern.match(Nt))throw Error("pattern "+r.pattern+" must not contain null bytes");return n+=e.write(r.pattern,n,void 0,"utf8"),e[n++]=0,n+=e.write(r.options.split("").sort().join(""),n,void 0,"utf8"),e[n++]=0,n}function Ut(e,t,r,n,i){return null===r?e[n++]=ne:"MinKey"===r._bsontype?e[n++]=de:e[n++]=he,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,n}function Vt(e,t,r,n,i){if(e[n++]=ee,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,"string"==typeof r.id)e.write(r.id,n,void 0,"binary");else{if(!A(r.id))throw new S("object ["+JSON.stringify(r)+"] is not a valid ObjectId");e.set(r.id.subarray(0,12),n)}return n+12}function zt(e,t,r,n,i){e[n++]=Z,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0;var o=r.length;return e[n++]=255&o,e[n++]=o>>8&255,e[n++]=o>>16&255,e[n++]=o>>24&255,e[n++]=ye,e.set($(r),n),n+o}function Qt(e,t,r,n,i,o,s,a,u,c){void 0===i&&(i=!1),void 0===o&&(o=0),void 0===s&&(s=!1),void 0===a&&(a=!0),void 0===u&&(u=!1),void 0===c&&(c=[]);for(var l=0;l<c.length;l++)if(c[l]===r)throw new O("cyclic dependency detected");c.push(r),e[n++]=Array.isArray(r)?J:G,n+=u?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0;var f=tr(e,r,i,n,o+1,s,a,c);return c.pop(),f}function Yt(e,t,r,n,i){return e[n++]=pe,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,e.set(r.bytes.subarray(0,16),n),n+16}function Wt(e,t,r,n,i){e[n++]="Long"===r._bsontype?fe:le,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0;var o=r.getLowBits(),s=r.getHighBits();return e[n++]=255&o,e[n++]=o>>8&255,e[n++]=o>>16&255,e[n++]=o>>24&255,e[n++]=255&s,e[n++]=s>>8&255,e[n++]=s>>16&255,e[n++]=s>>24&255,n}function Ht(e,t,r,n,i){return r=r.valueOf(),e[n++]=ce,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,e[n++]=255&r,e[n++]=r>>8&255,e[n++]=r>>16&255,e[n++]=r>>24&255,n}function Kt(e,t,r,n,i){return e[n++]=H,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,Rt.setFloat64(0,r.value,!0),e.set(Dt,n),n+8}function Gt(e,t,r,n,i,o,s){e[n++]=se,n+=s?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0;var a=j(r),u=e.write(a,n+4,void 0,"utf8")+1;return e[n]=255&u,e[n+1]=u>>8&255,e[n+2]=u>>16&255,e[n+3]=u>>24&255,n=n+4+u-1,e[n++]=0,n}function Jt(e,t,r,n,i,o,s,a,u){if(void 0===i&&(i=!1),void 0===o&&(o=0),void 0===s&&(s=!1),void 0===a&&(a=!0),void 0===u&&(u=!1),r.scope&&"object"==typeof r.scope){e[n++]=ue,n+=u?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0;var c=n,l="string"==typeof r.code?r.code:r.code.toString();n+=4;var f=e.write(l,n+4,void 0,"utf8")+1;e[n]=255&f,e[n+1]=f>>8&255,e[n+2]=f>>16&255,e[n+3]=f>>24&255,e[n+4+f-1]=0,n=n+f+4;var p=tr(e,r.scope,i,n,o+1,s,a);n=p-1;var d=p-c;e[c++]=255&d,e[c++]=d>>8&255,e[c++]=d>>16&255,e[c++]=d>>24&255,e[n++]=0}else{e[n++]=se,n+=u?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0,l=r.code.toString();var h=e.write(l,n+4,void 0,"utf8")+1;e[n]=255&h,e[n+1]=h>>8&255,e[n+2]=h>>16&255,e[n+3]=h>>24&255,n=n+4+h-1,e[n++]=0}return n}function Zt(e,t,r,n,i){e[n++]=Z,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0;var o=r.value(!0),s=r.position;return r.sub_type===Ee.SUBTYPE_BYTE_ARRAY&&(s+=4),e[n++]=255&s,e[n++]=s>>8&255,e[n++]=s>>16&255,e[n++]=s>>24&255,e[n++]=r.sub_type,r.sub_type===Ee.SUBTYPE_BYTE_ARRAY&&(s-=4,e[n++]=255&s,e[n++]=s>>8&255,e[n++]=s>>16&255,e[n++]=s>>24&255),e.set(o,n),n+r.position}function Xt(e,t,r,n,i){e[n++]=ae,n+=i?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0;var o=e.write(r.value,n+4,void 0,"utf8")+1;return e[n]=255&o,e[n+1]=o>>8&255,e[n+2]=o>>16&255,e[n+3]=o>>24&255,n=n+4+o-1,e[n++]=0,n}function er(e,t,r,n,i,o,s){e[n++]=G,n+=s?e.write(t,n,void 0,"ascii"):e.write(t,n,void 0,"utf8"),e[n++]=0;var a=n,u={$ref:r.collection||r.namespace,$id:r.oid};null!=r.db&&(u.$db=r.db);var c=tr(e,u=Object.assign(u,r.fields),!1,n,i+1,o),l=c-a;return e[a++]=255&l,e[a++]=l>>8&255,e[a++]=l>>16&255,e[a++]=l>>24&255,c}function tr(e,t,r,n,i,o,s,a){void 0===r&&(r=!1),void 0===n&&(n=0),void 0===i&&(i=0),void 0===o&&(o=!1),void 0===s&&(s=!0),void 0===a&&(a=[]),n=n||0,(a=a||[]).push(t);var u,c=n+4;if(Array.isArray(t))for(var l=0;l<t.length;l++){var f="".concat(l);if("function"==typeof(null==(v=t[l])?void 0:v.toBSON)&&(v=v.toBSON()),"string"==typeof v)c=Mt(e,f,v,c,!0);else if("number"==typeof v)c=Ct(e,f,v,c,!0);else{if("bigint"==typeof v)throw new S("Unsupported type BigInt, please use Decimal128");if("boolean"==typeof v)c=Ft(e,f,v,c,!0);else if(v instanceof Date||D(v))c=qt(e,f,v,c,!0);else if(void 0===v)c=$t(e,f,0,c,!0);else if(null===v)c=$t(e,f,0,c,!0);else if("ObjectId"===v._bsontype||"ObjectID"===v._bsontype)c=Vt(e,f,v,c,!0);else if(A(v))c=zt(e,f,v,c,!0);else if(v instanceof RegExp||M(v))c=Lt(e,f,v,c,!0);else if("object"==typeof v&&null==v._bsontype)c=Qt(e,f,v,c,r,i,o,s,!0,a);else if("object"==typeof v&&at(v)&&"Decimal128"===v._bsontype)c=Yt(e,f,v,c,!0);else if("Long"===v._bsontype||"Timestamp"===v._bsontype)c=Wt(e,f,v,c,!0);else if("Double"===v._bsontype)c=Kt(e,f,v,c,!0);else if("function"==typeof v&&o)c=Gt(e,f,v,c,0,0,!0);else if("Code"===v._bsontype)c=Jt(e,f,v,c,r,i,o,s,!0);else if("Binary"===v._bsontype)c=Zt(e,f,v,c,!0);else if("Symbol"===v._bsontype)c=Xt(e,f,v,c,!0);else if("DBRef"===v._bsontype)c=er(e,f,v,c,i,o,!0);else if("BSONRegExp"===v._bsontype)c=Bt(e,f,v,c,!0);else if("Int32"===v._bsontype)c=Ht(e,f,v,c,!0);else if("MinKey"===v._bsontype||"MaxKey"===v._bsontype)c=Ut(e,f,v,c,!0);else if(void 0!==v._bsontype)throw new S("Unrecognized or invalid _bsontype: ".concat(String(v._bsontype)))}}else if(t instanceof mt||(u=t,"[object Map]"===Object.prototype.toString.call(u)))for(var p=t.entries(),d=!1;!d;){var h=p.next();if(!(d=!!h.done)){f=h.value[0];var y=typeof(v=h.value[1]);if("string"==typeof f&&!kt.has(f)){if(null!=f.match(Nt))throw Error("key "+f+" must not contain null bytes");if(r){if("$"===f[0])throw Error("key "+f+" must not start with '$'");if(~f.indexOf("."))throw Error("key "+f+" must not contain '.'")}}if("string"===y)c=Mt(e,f,v,c);else if("number"===y)c=Ct(e,f,v,c);else{if("bigint"===y||N(v)||k(v))throw new S("Unsupported type BigInt, please use Decimal128");if("boolean"===y)c=Ft(e,f,v,c);else if(v instanceof Date||D(v))c=qt(e,f,v,c);else if(null===v||void 0===v&&!1===s)c=$t(e,f,0,c);else if("ObjectId"===v._bsontype||"ObjectID"===v._bsontype)c=Vt(e,f,v,c);else if(A(v))c=zt(e,f,v,c);else if(v instanceof RegExp||M(v))c=Lt(e,f,v,c);else if("object"===y&&null==v._bsontype)c=Qt(e,f,v,c,r,i,o,s,!1,a);else if("object"===y&&"Decimal128"===v._bsontype)c=Yt(e,f,v,c);else if("Long"===v._bsontype||"Timestamp"===v._bsontype)c=Wt(e,f,v,c);else if("Double"===v._bsontype)c=Kt(e,f,v,c);else if("Code"===v._bsontype)c=Jt(e,f,v,c,r,i,o,s);else if("function"==typeof v&&o)c=Gt(e,f,v,c,0,0,o);else if("Binary"===v._bsontype)c=Zt(e,f,v,c);else if("Symbol"===v._bsontype)c=Xt(e,f,v,c);else if("DBRef"===v._bsontype)c=er(e,f,v,c,i,o);else if("BSONRegExp"===v._bsontype)c=Bt(e,f,v,c);else if("Int32"===v._bsontype)c=Ht(e,f,v,c);else if("MinKey"===v._bsontype||"MaxKey"===v._bsontype)c=Ut(e,f,v,c);else if(void 0!==v._bsontype)throw new S("Unrecognized or invalid _bsontype: ".concat(String(v._bsontype)))}}}else{if("function"==typeof(null==t?void 0:t.toBSON)&&null!=(t=t.toBSON())&&"object"!=typeof t)throw new S("toBSON function did not return an object");for(var f in t){var v;if("function"==typeof(null==(v=t[f])?void 0:v.toBSON)&&(v=v.toBSON()),y=typeof v,"string"==typeof f&&!kt.has(f)){if(null!=f.match(Nt))throw Error("key "+f+" must not contain null bytes");if(r){if("$"===f[0])throw Error("key "+f+" must not start with '$'");if(~f.indexOf("."))throw Error("key "+f+" must not contain '.'")}}if("string"===y)c=Mt(e,f,v,c);else if("number"===y)c=Ct(e,f,v,c);else{if("bigint"===y)throw new S("Unsupported type BigInt, please use Decimal128");if("boolean"===y)c=Ft(e,f,v,c);else if(v instanceof Date||D(v))c=qt(e,f,v,c);else if(void 0===v)!1===s&&(c=$t(e,f,0,c));else if(null===v)c=$t(e,f,0,c);else if("ObjectId"===v._bsontype||"ObjectID"===v._bsontype)c=Vt(e,f,v,c);else if(A(v))c=zt(e,f,v,c);else if(v instanceof RegExp||M(v))c=Lt(e,f,v,c);else if("object"===y&&null==v._bsontype)c=Qt(e,f,v,c,r,i,o,s,!1,a);else if("object"===y&&"Decimal128"===v._bsontype)c=Yt(e,f,v,c);else if("Long"===v._bsontype||"Timestamp"===v._bsontype)c=Wt(e,f,v,c);else if("Double"===v._bsontype)c=Kt(e,f,v,c);else if("Code"===v._bsontype)c=Jt(e,f,v,c,r,i,o,s);else if("function"==typeof v&&o)c=Gt(e,f,v,c,0,0,o);else if("Binary"===v._bsontype)c=Zt(e,f,v,c);else if("Symbol"===v._bsontype)c=Xt(e,f,v,c);else if("DBRef"===v._bsontype)c=er(e,f,v,c,i,o);else if("BSONRegExp"===v._bsontype)c=Bt(e,f,v,c);else if("Int32"===v._bsontype)c=Ht(e,f,v,c);else if("MinKey"===v._bsontype||"MaxKey"===v._bsontype)c=Ut(e,f,v,c);else if(void 0!==v._bsontype)throw new S("Unrecognized or invalid _bsontype: ".concat(String(v._bsontype)))}}}a.pop(),e[c++]=0;var m=c-n;return e[n++]=255&m,e[n++]=m>>8&255,e[n++]=m>>16&255,e[n++]=m>>24&255,c}var rr=17825792,nr=b.alloc(rr);function ir(e){nr.length<e&&(nr=b.alloc(e))}function or(e,t){void 0===t&&(t={});var r="boolean"==typeof t.checkKeys&&t.checkKeys,n="boolean"==typeof t.serializeFunctions&&t.serializeFunctions,i="boolean"!=typeof t.ignoreUndefined||t.ignoreUndefined,o="number"==typeof t.minInternalBufferSize?t.minInternalBufferSize:rr;nr.length<o&&(nr=b.alloc(o));var s=tr(nr,e,r,0,0,n,i,[]),a=b.alloc(s);return nr.copy(a,0,0,a.length),a}function sr(e,t,r){void 0===r&&(r={});var n="boolean"==typeof r.checkKeys&&r.checkKeys,i="boolean"==typeof r.serializeFunctions&&r.serializeFunctions,o="boolean"!=typeof r.ignoreUndefined||r.ignoreUndefined,s="number"==typeof r.index?r.index:0,a=tr(nr,e,n,0,0,i,o);return nr.copy(t,s,0,a),s+a-1}function ar(e,t){return void 0===t&&(t={}),jt(e instanceof b?e:$(e),t)}function ur(e,t){return void 0===t&&(t={}),_t(e,"boolean"==typeof(t=t||{}).serializeFunctions&&t.serializeFunctions,"boolean"!=typeof t.ignoreUndefined||t.ignoreUndefined)}function cr(e,t,r,n,i,o){for(var s=Object.assign({allowObjectSmallerThanBufferSize:!0,index:0},o),a=$(e),u=t,c=0;c<r;c++){var l=a[u]|a[u+1]<<8|a[u+2]<<16|a[u+3]<<24;s.index=u,n[i+c]=jt(a,s),u+=l}return u}const lr={Binary:Ee,Code:je,DBRef:Ie,Decimal128:He,Double:Ke,Int32:Ge,Long:Re,UUID:Te,Map:mt,MaxKey:Je,MinKey:Ze,ObjectId:rt,ObjectID:rt,BSONRegExp:nt,BSONSymbol:it,Timestamp:st,EJSON:vt,setInternalBufferSize:ir,serialize:or,serializeWithBufferAndIndex:sr,deserialize:ar,calculateObjectSize:ur,deserializeStream:cr,BSONError:O,BSONTypeError:S}},2091:function(e,t,r){var n,i;i=function(e){var t=["N","E","A","D"];function r(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}function n(e,t){Object.defineProperty(this,"kind",{value:e,enumerable:!0}),t&&t.length&&Object.defineProperty(this,"path",{value:t,enumerable:!0})}function i(e,t,r){i.super_.call(this,"E",e),Object.defineProperty(this,"lhs",{value:t,enumerable:!0}),Object.defineProperty(this,"rhs",{value:r,enumerable:!0})}function o(e,t){o.super_.call(this,"N",e),Object.defineProperty(this,"rhs",{value:t,enumerable:!0})}function s(e,t){s.super_.call(this,"D",e),Object.defineProperty(this,"lhs",{value:t,enumerable:!0})}function a(e,t,r){a.super_.call(this,"A",e),Object.defineProperty(this,"index",{value:t,enumerable:!0}),Object.defineProperty(this,"item",{value:r,enumerable:!0})}function u(e,t,r){var n=e.slice((r||t)+1||e.length);return e.length=t<0?e.length+t:t,e.push.apply(e,n),e}function c(e){var t=typeof e;return"object"!==t?t:e===Math?"math":null===e?"null":Array.isArray(e)?"array":"[object Date]"===Object.prototype.toString.call(e)?"date":"function"==typeof e.toString&&/^\/.*\//.test(e.toString())?"regexp":"object"}function l(e){var t=0;if(0===e.length)return t;for(var r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t&=t;return t}function f(e){var t=0,r=c(e);if("array"===r)return e.forEach((function(e){t+=f(e)})),t+l("[type: array, hash: "+t+"]");if("object"===r){for(var n in e)if(e.hasOwnProperty(n)){var i="[ type: object, key: "+n+", value hash: "+f(e[n])+"]";t+=l(i)}return t}return t+l("[ type: "+r+" ; value: "+e+"]")}function p(e,t,r,n,u,l,d,h){r=r||[],d=d||[];var y=(u=u||[]).slice(0);if(null!=l){if(n){if("function"==typeof n&&n(y,l))return;if("object"==typeof n){if(n.prefilter&&n.prefilter(y,l))return;if(n.normalize){var v=n.normalize(y,l,e,t);v&&(e=v[0],t=v[1])}}}y.push(l)}"regexp"===c(e)&&"regexp"===c(t)&&(e=e.toString(),t=t.toString());var m,b,g,_,w=typeof e,O=typeof t,S="undefined"!==w||d&&d.length>0&&d[d.length-1].lhs&&Object.getOwnPropertyDescriptor(d[d.length-1].lhs,l),E="undefined"!==O||d&&d.length>0&&d[d.length-1].rhs&&Object.getOwnPropertyDescriptor(d[d.length-1].rhs,l);if(!S&&E)r.push(new o(y,t));else if(!E&&S)r.push(new s(y,e));else if(c(e)!==c(t))r.push(new i(y,e,t));else if("date"===c(e)&&e-t!=0)r.push(new i(y,e,t));else if("object"===w&&null!==e&&null!==t){for(m=d.length-1;m>-1;--m)if(d[m].lhs===e){_=!0;break}if(_)e!==t&&r.push(new i(y,e,t));else{if(d.push({lhs:e,rhs:t}),Array.isArray(e)){for(h&&(e.sort((function(e,t){return f(e)-f(t)})),t.sort((function(e,t){return f(e)-f(t)}))),m=t.length-1,b=e.length-1;m>b;)r.push(new a(y,m,new o(void 0,t[m--])));for(;b>m;)r.push(new a(y,b,new s(void 0,e[b--])));for(;m>=0;--m)p(e[m],t[m],r,n,y,m,d,h)}else{var T=Object.keys(e),j=Object.keys(t);for(m=0;m<T.length;++m)g=T[m],(_=j.indexOf(g))>=0?(p(e[g],t[g],r,n,y,g,d,h),j[_]=null):p(e[g],void 0,r,n,y,g,d,h);for(m=0;m<j.length;++m)(g=j[m])&&p(void 0,t[g],r,n,y,g,d,h)}d.length=d.length-1}}else e!==t&&("number"===w&&isNaN(e)&&isNaN(t)||r.push(new i(y,e,t)))}function d(e,t,r,n,i){var o=[];if(p(e,t,o,n,null,null,null,i),r)for(var s=0;s<o.length;++s)r(o[s]);return o}function h(e,t,r,n){var i=d(e,t,n?function(e){e&&n.push(e)}:void 0,r);return n||(i.length?i:void 0)}function y(e,t,r){if(r.path&&r.path.length){var n,i=e[t],o=r.path.length-1;for(n=0;n<o;n++)i=i[r.path[n]];switch(r.kind){case"A":y(i[r.path[n]],r.index,r.item);break;case"D":delete i[r.path[n]];break;case"E":case"N":i[r.path[n]]=r.rhs}}else switch(r.kind){case"A":y(e[t],r.index,r.item);break;case"D":e=u(e,t);break;case"E":case"N":e[t]=r.rhs}return e}function v(e,r,n){if(void 0===n&&r&&~t.indexOf(r.kind)&&(n=r),e&&n&&n.kind){for(var i=e,o=-1,s=n.path?n.path.length-1:0;++o<s;)void 0===i[n.path[o]]&&(i[n.path[o]]=void 0!==n.path[o+1]&&"number"==typeof n.path[o+1]?[]:{}),i=i[n.path[o]];switch(n.kind){case"A":n.path&&void 0===i[n.path[o]]&&(i[n.path[o]]=[]),y(n.path?i[n.path[o]]:i,n.index,n.item);break;case"D":delete i[n.path[o]];break;case"E":case"N":i[n.path[o]]=n.rhs}}}function m(e,t,r){if(r.path&&r.path.length){var n,i=e[t],o=r.path.length-1;for(n=0;n<o;n++)i=i[r.path[n]];switch(r.kind){case"A":m(i[r.path[n]],r.index,r.item);break;case"D":case"E":i[r.path[n]]=r.lhs;break;case"N":delete i[r.path[n]]}}else switch(r.kind){case"A":m(e[t],r.index,r.item);break;case"D":case"E":e[t]=r.lhs;break;case"N":e=u(e,t)}return e}return r(i,n),r(o,n),r(s,n),r(a,n),Object.defineProperties(h,{diff:{value:h,enumerable:!0},orderIndependentDiff:{value:function(e,t,r,n){var i=d(e,t,n?function(e){e&&n.push(e)}:void 0,r,!0);return n||(i.length?i:void 0)},enumerable:!0},observableDiff:{value:d,enumerable:!0},orderIndependentObservableDiff:{value:function(e,t,r,n,i,o,s){return p(e,t,r,n,i,o,s,!0)},enumerable:!0},orderIndepHash:{value:f,enumerable:!0},applyDiff:{value:function(e,t,r){e&&t&&d(e,t,(function(n){r&&!r(e,t,n)||v(e,t,n)}))},enumerable:!0},applyChange:{value:v,enumerable:!0},revertChange:{value:function(e,t,r){if(e&&t&&r&&r.kind){var n,i,o=e;for(i=r.path.length-1,n=0;n<i;n++)void 0===o[r.path[n]]&&(o[r.path[n]]={}),o=o[r.path[n]];switch(r.kind){case"A":m(o[r.path[n]],r.index,r.item);break;case"D":case"E":o[r.path[n]]=r.lhs;break;case"N":delete o[r.path[n]]}}},enumerable:!0},isConflict:{value:function(){return"undefined"!=typeof $conflict},enumerable:!0}}),h.DeepDiff=h,e&&(e.DeepDiff=h),h}(this),void 0===(n=function(){return i}.call(t,r,t,e))||(e.exports=n)},6471:e=>{"use strict";e.exports=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;var n,i,o;if(Array.isArray(t)){if((n=t.length)!=r.length)return!1;for(i=n;0!=i--;)if(!e(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((n=(o=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(i=n;0!=i--;)if(!Object.prototype.hasOwnProperty.call(r,o[i]))return!1;for(i=n;0!=i--;){var s=o[i];if(!e(t[s],r[s]))return!1}return!0}return t!=t&&r!=r}},8784:function(e,t,r){var n;e=r.nmd(e),function(){var i,o="Expected a function",s="__lodash_hash_undefined__",a="__lodash_placeholder__",u=32,c=128,l=1/0,f=9007199254740991,p=NaN,d=4294967295,h=[["ary",c],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",u],["partialRight",64],["rearg",256]],y="[object Arguments]",v="[object Array]",m="[object Boolean]",b="[object Date]",g="[object Error]",_="[object Function]",w="[object GeneratorFunction]",O="[object Map]",S="[object Number]",E="[object Object]",T="[object Promise]",j="[object RegExp]",P="[object Set]",I="[object String]",x="[object Symbol]",A="[object WeakMap]",N="[object ArrayBuffer]",k="[object DataView]",M="[object Float32Array]",D="[object Float64Array]",R="[object Int8Array]",C="[object Int16Array]",$="[object Int32Array]",F="[object Uint8Array]",q="[object Uint8ClampedArray]",L="[object Uint16Array]",B="[object Uint32Array]",U=/\b__p \+= '';/g,V=/\b(__p \+=) '' \+/g,z=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Q=/&(?:amp|lt|gt|quot|#39);/g,Y=/[&<>"']/g,W=RegExp(Q.source),H=RegExp(Y.source),K=/<%-([\s\S]+?)%>/g,G=/<%([\s\S]+?)%>/g,J=/<%=([\s\S]+?)%>/g,Z=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,X=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,re=RegExp(te.source),ne=/^\s+/,ie=/\s/,oe=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,se=/\{\n\/\* \[wrapped with (.+)\] \*/,ae=/,? & /,ue=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ce=/[()=,{}\[\]\/\s]/,le=/\\(\\)?/g,fe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,pe=/\w*$/,de=/^[-+]0x[0-9a-f]+$/i,he=/^0b[01]+$/i,ye=/^\[object .+?Constructor\]$/,ve=/^0o[0-7]+$/i,me=/^(?:0|[1-9]\d*)$/,be=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ge=/($^)/,_e=/['\n\r\u2028\u2029\\]/g,we="\\ud800-\\udfff",Oe="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Se="\\u2700-\\u27bf",Ee="a-z\\xdf-\\xf6\\xf8-\\xff",Te="A-Z\\xc0-\\xd6\\xd8-\\xde",je="\\ufe0e\\ufe0f",Pe="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ie="["+we+"]",xe="["+Pe+"]",Ae="["+Oe+"]",Ne="\\d+",ke="["+Se+"]",Me="["+Ee+"]",De="[^"+we+Pe+Ne+Se+Ee+Te+"]",Re="\\ud83c[\\udffb-\\udfff]",Ce="[^"+we+"]",$e="(?:\\ud83c[\\udde6-\\uddff]){2}",Fe="[\\ud800-\\udbff][\\udc00-\\udfff]",qe="["+Te+"]",Le="\\u200d",Be="(?:"+Me+"|"+De+")",Ue="(?:"+qe+"|"+De+")",Ve="(?:['’](?:d|ll|m|re|s|t|ve))?",ze="(?:['’](?:D|LL|M|RE|S|T|VE))?",Qe="(?:"+Ae+"|"+Re+")?",Ye="["+je+"]?",We=Ye+Qe+"(?:"+Le+"(?:"+[Ce,$e,Fe].join("|")+")"+Ye+Qe+")*",He="(?:"+[ke,$e,Fe].join("|")+")"+We,Ke="(?:"+[Ce+Ae+"?",Ae,$e,Fe,Ie].join("|")+")",Ge=RegExp("['’]","g"),Je=RegExp(Ae,"g"),Ze=RegExp(Re+"(?="+Re+")|"+Ke+We,"g"),Xe=RegExp([qe+"?"+Me+"+"+Ve+"(?="+[xe,qe,"$"].join("|")+")",Ue+"+"+ze+"(?="+[xe,qe+Be,"$"].join("|")+")",qe+"?"+Be+"+"+Ve,qe+"+"+ze,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ne,He].join("|"),"g"),et=RegExp("["+Le+we+Oe+je+"]"),tt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,rt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],nt=-1,it={};it[M]=it[D]=it[R]=it[C]=it[$]=it[F]=it[q]=it[L]=it[B]=!0,it[y]=it[v]=it[N]=it[m]=it[k]=it[b]=it[g]=it[_]=it[O]=it[S]=it[E]=it[j]=it[P]=it[I]=it[A]=!1;var ot={};ot[y]=ot[v]=ot[N]=ot[k]=ot[m]=ot[b]=ot[M]=ot[D]=ot[R]=ot[C]=ot[$]=ot[O]=ot[S]=ot[E]=ot[j]=ot[P]=ot[I]=ot[x]=ot[F]=ot[q]=ot[L]=ot[B]=!0,ot[g]=ot[_]=ot[A]=!1;var st={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},at=parseFloat,ut=parseInt,ct="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,lt="object"==typeof self&&self&&self.Object===Object&&self,ft=ct||lt||Function("return this")(),pt=t&&!t.nodeType&&t,dt=pt&&e&&!e.nodeType&&e,ht=dt&&dt.exports===pt,yt=ht&&ct.process,vt=function(){try{return dt&&dt.require&&dt.require("util").types||yt&&yt.binding&&yt.binding("util")}catch(e){}}(),mt=vt&&vt.isArrayBuffer,bt=vt&&vt.isDate,gt=vt&&vt.isMap,_t=vt&&vt.isRegExp,wt=vt&&vt.isSet,Ot=vt&&vt.isTypedArray;function St(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function Et(e,t,r,n){for(var i=-1,o=null==e?0:e.length;++i<o;){var s=e[i];t(n,s,r(s),e)}return n}function Tt(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}function jt(e,t){for(var r=null==e?0:e.length;r--&&!1!==t(e[r],r,e););return e}function Pt(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}function It(e,t){for(var r=-1,n=null==e?0:e.length,i=0,o=[];++r<n;){var s=e[r];t(s,r,e)&&(o[i++]=s)}return o}function xt(e,t){return!(null==e||!e.length)&&qt(e,t,0)>-1}function At(e,t,r){for(var n=-1,i=null==e?0:e.length;++n<i;)if(r(t,e[n]))return!0;return!1}function Nt(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}function kt(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}function Mt(e,t,r,n){var i=-1,o=null==e?0:e.length;for(n&&o&&(r=e[++i]);++i<o;)r=t(r,e[i],i,e);return r}function Dt(e,t,r,n){var i=null==e?0:e.length;for(n&&i&&(r=e[--i]);i--;)r=t(r,e[i],i,e);return r}function Rt(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var Ct=Vt("length");function $t(e,t,r){var n;return r(e,(function(e,r,i){if(t(e,r,i))return n=r,!1})),n}function Ft(e,t,r,n){for(var i=e.length,o=r+(n?1:-1);n?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function qt(e,t,r){return t==t?function(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}(e,t,r):Ft(e,Bt,r)}function Lt(e,t,r,n){for(var i=r-1,o=e.length;++i<o;)if(n(e[i],t))return i;return-1}function Bt(e){return e!=e}function Ut(e,t){var r=null==e?0:e.length;return r?Yt(e,t)/r:p}function Vt(e){return function(t){return null==t?i:t[e]}}function zt(e){return function(t){return null==e?i:e[t]}}function Qt(e,t,r,n,i){return i(e,(function(e,i,o){r=n?(n=!1,e):t(r,e,i,o)})),r}function Yt(e,t){for(var r,n=-1,o=e.length;++n<o;){var s=t(e[n]);s!==i&&(r=r===i?s:r+s)}return r}function Wt(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function Ht(e){return e?e.slice(0,pr(e)+1).replace(ne,""):e}function Kt(e){return function(t){return e(t)}}function Gt(e,t){return Nt(t,(function(t){return e[t]}))}function Jt(e,t){return e.has(t)}function Zt(e,t){for(var r=-1,n=e.length;++r<n&&qt(t,e[r],0)>-1;);return r}function Xt(e,t){for(var r=e.length;r--&&qt(t,e[r],0)>-1;);return r}function er(e,t){for(var r=e.length,n=0;r--;)e[r]===t&&++n;return n}var tr=zt({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),rr=zt({"&":"&","<":"<",">":">",'"':""","'":"'"});function nr(e){return"\\"+st[e]}function ir(e){return et.test(e)}function or(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}function sr(e,t){return function(r){return e(t(r))}}function ar(e,t){for(var r=-1,n=e.length,i=0,o=[];++r<n;){var s=e[r];s!==t&&s!==a||(e[r]=a,o[i++]=r)}return o}function ur(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}function cr(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=[e,e]})),r}function lr(e){return ir(e)?function(e){for(var t=Ze.lastIndex=0;Ze.test(e);)++t;return t}(e):Ct(e)}function fr(e){return ir(e)?function(e){return e.match(Ze)||[]}(e):function(e){return e.split("")}(e)}function pr(e){for(var t=e.length;t--&&ie.test(e.charAt(t)););return t}var dr=zt({"&":"&","<":"<",">":">",""":'"',"'":"'"}),hr=function e(t){var r,n=(t=null==t?ft:hr.defaults(ft.Object(),t,hr.pick(ft,rt))).Array,ie=t.Date,we=t.Error,Oe=t.Function,Se=t.Math,Ee=t.Object,Te=t.RegExp,je=t.String,Pe=t.TypeError,Ie=n.prototype,xe=Oe.prototype,Ae=Ee.prototype,Ne=t["__core-js_shared__"],ke=xe.toString,Me=Ae.hasOwnProperty,De=0,Re=(r=/[^.]+$/.exec(Ne&&Ne.keys&&Ne.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",Ce=Ae.toString,$e=ke.call(Ee),Fe=ft._,qe=Te("^"+ke.call(Me).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Le=ht?t.Buffer:i,Be=t.Symbol,Ue=t.Uint8Array,Ve=Le?Le.allocUnsafe:i,ze=sr(Ee.getPrototypeOf,Ee),Qe=Ee.create,Ye=Ae.propertyIsEnumerable,We=Ie.splice,He=Be?Be.isConcatSpreadable:i,Ke=Be?Be.iterator:i,Ze=Be?Be.toStringTag:i,et=function(){try{var e=co(Ee,"defineProperty");return e({},"",{}),e}catch(e){}}(),st=t.clearTimeout!==ft.clearTimeout&&t.clearTimeout,ct=ie&&ie.now!==ft.Date.now&&ie.now,lt=t.setTimeout!==ft.setTimeout&&t.setTimeout,pt=Se.ceil,dt=Se.floor,yt=Ee.getOwnPropertySymbols,vt=Le?Le.isBuffer:i,Ct=t.isFinite,zt=Ie.join,yr=sr(Ee.keys,Ee),vr=Se.max,mr=Se.min,br=ie.now,gr=t.parseInt,_r=Se.random,wr=Ie.reverse,Or=co(t,"DataView"),Sr=co(t,"Map"),Er=co(t,"Promise"),Tr=co(t,"Set"),jr=co(t,"WeakMap"),Pr=co(Ee,"create"),Ir=jr&&new jr,xr={},Ar=qo(Or),Nr=qo(Sr),kr=qo(Er),Mr=qo(Tr),Dr=qo(jr),Rr=Be?Be.prototype:i,Cr=Rr?Rr.valueOf:i,$r=Rr?Rr.toString:i;function Fr(e){if(ra(e)&&!Qs(e)&&!(e instanceof Ur)){if(e instanceof Br)return e;if(Me.call(e,"__wrapped__"))return Lo(e)}return new Br(e)}var qr=function(){function e(){}return function(t){if(!ta(t))return{};if(Qe)return Qe(t);e.prototype=t;var r=new e;return e.prototype=i,r}}();function Lr(){}function Br(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function Ur(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=d,this.__views__=[]}function Vr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function zr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Qr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Yr(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new Qr;++t<r;)this.add(e[t])}function Wr(e){var t=this.__data__=new zr(e);this.size=t.size}function Hr(e,t){var r=Qs(e),n=!r&&zs(e),i=!r&&!n&&Ks(e),o=!r&&!n&&!i&&la(e),s=r||n||i||o,a=s?Wt(e.length,je):[],u=a.length;for(var c in e)!t&&!Me.call(e,c)||s&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||mo(c,u))||a.push(c);return a}function Kr(e){var t=e.length;return t?e[Yn(0,t-1)]:i}function Gr(e,t){return Do(Pi(e),sn(t,0,e.length))}function Jr(e){return Do(Pi(e))}function Zr(e,t,r){(r!==i&&!Bs(e[t],r)||r===i&&!(t in e))&&nn(e,t,r)}function Xr(e,t,r){var n=e[t];Me.call(e,t)&&Bs(n,r)&&(r!==i||t in e)||nn(e,t,r)}function en(e,t){for(var r=e.length;r--;)if(Bs(e[r][0],t))return r;return-1}function tn(e,t,r,n){return fn(e,(function(e,i,o){t(n,e,r(e),o)})),n}function rn(e,t){return e&&Ii(t,ka(t),e)}function nn(e,t,r){"__proto__"==t&&et?et(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function on(e,t){for(var r=-1,o=t.length,s=n(o),a=null==e;++r<o;)s[r]=a?i:Pa(e,t[r]);return s}function sn(e,t,r){return e==e&&(r!==i&&(e=e<=r?e:r),t!==i&&(e=e>=t?e:t)),e}function an(e,t,r,n,o,s){var a,u=1&t,c=2&t,l=4&t;if(r&&(a=o?r(e,n,o,s):r(e)),a!==i)return a;if(!ta(e))return e;var f=Qs(e);if(f){if(a=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&Me.call(e,"index")&&(r.index=e.index,r.input=e.input),r}(e),!u)return Pi(e,a)}else{var p=po(e),d=p==_||p==w;if(Ks(e))return wi(e,u);if(p==E||p==y||d&&!o){if(a=c||d?{}:yo(e),!u)return c?function(e,t){return Ii(e,fo(e),t)}(e,function(e,t){return e&&Ii(t,Ma(t),e)}(a,e)):function(e,t){return Ii(e,lo(e),t)}(e,rn(a,e))}else{if(!ot[p])return o?e:{};a=function(e,t,r){var n,i=e.constructor;switch(t){case N:return Oi(e);case m:case b:return new i(+e);case k:return function(e,t){var r=t?Oi(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}(e,r);case M:case D:case R:case C:case $:case F:case q:case L:case B:return Si(e,r);case O:return new i;case S:case I:return new i(e);case j:return function(e){var t=new e.constructor(e.source,pe.exec(e));return t.lastIndex=e.lastIndex,t}(e);case P:return new i;case x:return n=e,Cr?Ee(Cr.call(n)):{}}}(e,p,u)}}s||(s=new Wr);var h=s.get(e);if(h)return h;s.set(e,a),aa(e)?e.forEach((function(n){a.add(an(n,t,r,n,e,s))})):na(e)&&e.forEach((function(n,i){a.set(i,an(n,t,r,i,e,s))}));var v=f?i:(l?c?ro:to:c?Ma:ka)(e);return Tt(v||e,(function(n,i){v&&(n=e[i=n]),Xr(a,i,an(n,t,r,i,e,s))})),a}function un(e,t,r){var n=r.length;if(null==e)return!n;for(e=Ee(e);n--;){var o=r[n],s=t[o],a=e[o];if(a===i&&!(o in e)||!s(a))return!1}return!0}function cn(e,t,r){if("function"!=typeof e)throw new Pe(o);return Ao((function(){e.apply(i,r)}),t)}function ln(e,t,r,n){var i=-1,o=xt,s=!0,a=e.length,u=[],c=t.length;if(!a)return u;r&&(t=Nt(t,Kt(r))),n?(o=At,s=!1):t.length>=200&&(o=Jt,s=!1,t=new Yr(t));e:for(;++i<a;){var l=e[i],f=null==r?l:r(l);if(l=n||0!==l?l:0,s&&f==f){for(var p=c;p--;)if(t[p]===f)continue e;u.push(l)}else o(t,f,n)||u.push(l)}return u}Fr.templateSettings={escape:K,evaluate:G,interpolate:J,variable:"",imports:{_:Fr}},Fr.prototype=Lr.prototype,Fr.prototype.constructor=Fr,Br.prototype=qr(Lr.prototype),Br.prototype.constructor=Br,Ur.prototype=qr(Lr.prototype),Ur.prototype.constructor=Ur,Vr.prototype.clear=function(){this.__data__=Pr?Pr(null):{},this.size=0},Vr.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Vr.prototype.get=function(e){var t=this.__data__;if(Pr){var r=t[e];return r===s?i:r}return Me.call(t,e)?t[e]:i},Vr.prototype.has=function(e){var t=this.__data__;return Pr?t[e]!==i:Me.call(t,e)},Vr.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Pr&&t===i?s:t,this},zr.prototype.clear=function(){this.__data__=[],this.size=0},zr.prototype.delete=function(e){var t=this.__data__,r=en(t,e);return!(r<0||(r==t.length-1?t.pop():We.call(t,r,1),--this.size,0))},zr.prototype.get=function(e){var t=this.__data__,r=en(t,e);return r<0?i:t[r][1]},zr.prototype.has=function(e){return en(this.__data__,e)>-1},zr.prototype.set=function(e,t){var r=this.__data__,n=en(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},Qr.prototype.clear=function(){this.size=0,this.__data__={hash:new Vr,map:new(Sr||zr),string:new Vr}},Qr.prototype.delete=function(e){var t=ao(this,e).delete(e);return this.size-=t?1:0,t},Qr.prototype.get=function(e){return ao(this,e).get(e)},Qr.prototype.has=function(e){return ao(this,e).has(e)},Qr.prototype.set=function(e,t){var r=ao(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},Yr.prototype.add=Yr.prototype.push=function(e){return this.__data__.set(e,s),this},Yr.prototype.has=function(e){return this.__data__.has(e)},Wr.prototype.clear=function(){this.__data__=new zr,this.size=0},Wr.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},Wr.prototype.get=function(e){return this.__data__.get(e)},Wr.prototype.has=function(e){return this.__data__.has(e)},Wr.prototype.set=function(e,t){var r=this.__data__;if(r instanceof zr){var n=r.__data__;if(!Sr||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Qr(n)}return r.set(e,t),this.size=r.size,this};var fn=Ni(gn),pn=Ni(_n,!0);function dn(e,t){var r=!0;return fn(e,(function(e,n,i){return r=!!t(e,n,i)})),r}function hn(e,t,r){for(var n=-1,o=e.length;++n<o;){var s=e[n],a=t(s);if(null!=a&&(u===i?a==a&&!ca(a):r(a,u)))var u=a,c=s}return c}function yn(e,t){var r=[];return fn(e,(function(e,n,i){t(e,n,i)&&r.push(e)})),r}function vn(e,t,r,n,i){var o=-1,s=e.length;for(r||(r=vo),i||(i=[]);++o<s;){var a=e[o];t>0&&r(a)?t>1?vn(a,t-1,r,n,i):kt(i,a):n||(i[i.length]=a)}return i}var mn=ki(),bn=ki(!0);function gn(e,t){return e&&mn(e,t,ka)}function _n(e,t){return e&&bn(e,t,ka)}function wn(e,t){return It(t,(function(t){return Zs(e[t])}))}function On(e,t){for(var r=0,n=(t=mi(t,e)).length;null!=e&&r<n;)e=e[Fo(t[r++])];return r&&r==n?e:i}function Sn(e,t,r){var n=t(e);return Qs(e)?n:kt(n,r(e))}function En(e){return null==e?e===i?"[object Undefined]":"[object Null]":Ze&&Ze in Ee(e)?function(e){var t=Me.call(e,Ze),r=e[Ze];try{e[Ze]=i;var n=!0}catch(e){}var o=Ce.call(e);return n&&(t?e[Ze]=r:delete e[Ze]),o}(e):function(e){return Ce.call(e)}(e)}function Tn(e,t){return e>t}function jn(e,t){return null!=e&&Me.call(e,t)}function Pn(e,t){return null!=e&&t in Ee(e)}function In(e,t,r){for(var o=r?At:xt,s=e[0].length,a=e.length,u=a,c=n(a),l=1/0,f=[];u--;){var p=e[u];u&&t&&(p=Nt(p,Kt(t))),l=mr(p.length,l),c[u]=!r&&(t||s>=120&&p.length>=120)?new Yr(u&&p):i}p=e[0];var d=-1,h=c[0];e:for(;++d<s&&f.length<l;){var y=p[d],v=t?t(y):y;if(y=r||0!==y?y:0,!(h?Jt(h,v):o(f,v,r))){for(u=a;--u;){var m=c[u];if(!(m?Jt(m,v):o(e[u],v,r)))continue e}h&&h.push(v),f.push(y)}}return f}function xn(e,t,r){var n=null==(e=jo(e,t=mi(t,e)))?e:e[Fo(Jo(t))];return null==n?i:St(n,e,r)}function An(e){return ra(e)&&En(e)==y}function Nn(e,t,r,n,o){return e===t||(null==e||null==t||!ra(e)&&!ra(t)?e!=e&&t!=t:function(e,t,r,n,o,s){var a=Qs(e),u=Qs(t),c=a?v:po(e),l=u?v:po(t),f=(c=c==y?E:c)==E,p=(l=l==y?E:l)==E,d=c==l;if(d&&Ks(e)){if(!Ks(t))return!1;a=!0,f=!1}if(d&&!f)return s||(s=new Wr),a||la(e)?Xi(e,t,r,n,o,s):function(e,t,r,n,i,o,s){switch(r){case k:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case N:return!(e.byteLength!=t.byteLength||!o(new Ue(e),new Ue(t)));case m:case b:case S:return Bs(+e,+t);case g:return e.name==t.name&&e.message==t.message;case j:case I:return e==t+"";case O:var a=or;case P:var u=1&n;if(a||(a=ur),e.size!=t.size&&!u)return!1;var c=s.get(e);if(c)return c==t;n|=2,s.set(e,t);var l=Xi(a(e),a(t),n,i,o,s);return s.delete(e),l;case x:if(Cr)return Cr.call(e)==Cr.call(t)}return!1}(e,t,c,r,n,o,s);if(!(1&r)){var h=f&&Me.call(e,"__wrapped__"),_=p&&Me.call(t,"__wrapped__");if(h||_){var w=h?e.value():e,T=_?t.value():t;return s||(s=new Wr),o(w,T,r,n,s)}}return!!d&&(s||(s=new Wr),function(e,t,r,n,o,s){var a=1&r,u=to(e),c=u.length;if(c!=to(t).length&&!a)return!1;for(var l=c;l--;){var f=u[l];if(!(a?f in t:Me.call(t,f)))return!1}var p=s.get(e),d=s.get(t);if(p&&d)return p==t&&d==e;var h=!0;s.set(e,t),s.set(t,e);for(var y=a;++l<c;){var v=e[f=u[l]],m=t[f];if(n)var b=a?n(m,v,f,t,e,s):n(v,m,f,e,t,s);if(!(b===i?v===m||o(v,m,r,n,s):b)){h=!1;break}y||(y="constructor"==f)}if(h&&!y){var g=e.constructor,_=t.constructor;g==_||!("constructor"in e)||!("constructor"in t)||"function"==typeof g&&g instanceof g&&"function"==typeof _&&_ instanceof _||(h=!1)}return s.delete(e),s.delete(t),h}(e,t,r,n,o,s))}(e,t,r,n,Nn,o))}function kn(e,t,r,n){var o=r.length,s=o,a=!n;if(null==e)return!s;for(e=Ee(e);o--;){var u=r[o];if(a&&u[2]?u[1]!==e[u[0]]:!(u[0]in e))return!1}for(;++o<s;){var c=(u=r[o])[0],l=e[c],f=u[1];if(a&&u[2]){if(l===i&&!(c in e))return!1}else{var p=new Wr;if(n)var d=n(l,f,c,e,t,p);if(!(d===i?Nn(f,l,3,n,p):d))return!1}}return!0}function Mn(e){return!(!ta(e)||(t=e,Re&&Re in t))&&(Zs(e)?qe:ye).test(qo(e));var t}function Dn(e){return"function"==typeof e?e:null==e?iu:"object"==typeof e?Qs(e)?qn(e[0],e[1]):Fn(e):du(e)}function Rn(e){if(!Oo(e))return yr(e);var t=[];for(var r in Ee(e))Me.call(e,r)&&"constructor"!=r&&t.push(r);return t}function Cn(e,t){return e<t}function $n(e,t){var r=-1,i=Ws(e)?n(e.length):[];return fn(e,(function(e,n,o){i[++r]=t(e,n,o)})),i}function Fn(e){var t=uo(e);return 1==t.length&&t[0][2]?Eo(t[0][0],t[0][1]):function(r){return r===e||kn(r,e,t)}}function qn(e,t){return go(e)&&So(t)?Eo(Fo(e),t):function(r){var n=Pa(r,e);return n===i&&n===t?Ia(r,e):Nn(t,n,3)}}function Ln(e,t,r,n,o){e!==t&&mn(t,(function(s,a){if(o||(o=new Wr),ta(s))!function(e,t,r,n,o,s,a){var u=Io(e,r),c=Io(t,r),l=a.get(c);if(l)Zr(e,r,l);else{var f=s?s(u,c,r+"",e,t,a):i,p=f===i;if(p){var d=Qs(c),h=!d&&Ks(c),y=!d&&!h&&la(c);f=c,d||h||y?Qs(u)?f=u:Hs(u)?f=Pi(u):h?(p=!1,f=wi(c,!0)):y?(p=!1,f=Si(c,!0)):f=[]:oa(c)||zs(c)?(f=u,zs(u)?f=ba(u):ta(u)&&!Zs(u)||(f=yo(c))):p=!1}p&&(a.set(c,f),o(f,c,n,s,a),a.delete(c)),Zr(e,r,f)}}(e,t,a,r,Ln,n,o);else{var u=n?n(Io(e,a),s,a+"",e,t,o):i;u===i&&(u=s),Zr(e,a,u)}}),Ma)}function Bn(e,t){var r=e.length;if(r)return mo(t+=t<0?r:0,r)?e[t]:i}function Un(e,t,r){t=t.length?Nt(t,(function(e){return Qs(e)?function(t){return On(t,1===e.length?e[0]:e)}:e})):[iu];var n=-1;t=Nt(t,Kt(so()));var i=$n(e,(function(e,r,i){var o=Nt(t,(function(t){return t(e)}));return{criteria:o,index:++n,value:e}}));return function(e,t){var n=e.length;for(e.sort((function(e,t){return function(e,t,r){for(var n=-1,i=e.criteria,o=t.criteria,s=i.length,a=r.length;++n<s;){var u=Ei(i[n],o[n]);if(u)return n>=a?u:u*("desc"==r[n]?-1:1)}return e.index-t.index}(e,t,r)}));n--;)e[n]=e[n].value;return e}(i)}function Vn(e,t,r){for(var n=-1,i=t.length,o={};++n<i;){var s=t[n],a=On(e,s);r(a,s)&&Jn(o,mi(s,e),a)}return o}function zn(e,t,r,n){var i=n?Lt:qt,o=-1,s=t.length,a=e;for(e===t&&(t=Pi(t)),r&&(a=Nt(e,Kt(r)));++o<s;)for(var u=0,c=t[o],l=r?r(c):c;(u=i(a,l,u,n))>-1;)a!==e&&We.call(a,u,1),We.call(e,u,1);return e}function Qn(e,t){for(var r=e?t.length:0,n=r-1;r--;){var i=t[r];if(r==n||i!==o){var o=i;mo(i)?We.call(e,i,1):ci(e,i)}}return e}function Yn(e,t){return e+dt(_r()*(t-e+1))}function Wn(e,t){var r="";if(!e||t<1||t>f)return r;do{t%2&&(r+=e),(t=dt(t/2))&&(e+=e)}while(t);return r}function Hn(e,t){return No(To(e,t,iu),e+"")}function Kn(e){return Kr(Ba(e))}function Gn(e,t){var r=Ba(e);return Do(r,sn(t,0,r.length))}function Jn(e,t,r,n){if(!ta(e))return e;for(var o=-1,s=(t=mi(t,e)).length,a=s-1,u=e;null!=u&&++o<s;){var c=Fo(t[o]),l=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(o!=a){var f=u[c];(l=n?n(f,c,u):i)===i&&(l=ta(f)?f:mo(t[o+1])?[]:{})}Xr(u,c,l),u=u[c]}return e}var Zn=Ir?function(e,t){return Ir.set(e,t),e}:iu,Xn=et?function(e,t){return et(e,"toString",{configurable:!0,enumerable:!1,value:tu(t),writable:!0})}:iu;function ei(e){return Do(Ba(e))}function ti(e,t,r){var i=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var s=n(o);++i<o;)s[i]=e[i+t];return s}function ri(e,t){var r;return fn(e,(function(e,n,i){return!(r=t(e,n,i))})),!!r}function ni(e,t,r){var n=0,i=null==e?n:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;n<i;){var o=n+i>>>1,s=e[o];null!==s&&!ca(s)&&(r?s<=t:s<t)?n=o+1:i=o}return i}return ii(e,t,iu,r)}function ii(e,t,r,n){var o=0,s=null==e?0:e.length;if(0===s)return 0;for(var a=(t=r(t))!=t,u=null===t,c=ca(t),l=t===i;o<s;){var f=dt((o+s)/2),p=r(e[f]),d=p!==i,h=null===p,y=p==p,v=ca(p);if(a)var m=n||y;else m=l?y&&(n||d):u?y&&d&&(n||!h):c?y&&d&&!h&&(n||!v):!h&&!v&&(n?p<=t:p<t);m?o=f+1:s=f}return mr(s,4294967294)}function oi(e,t){for(var r=-1,n=e.length,i=0,o=[];++r<n;){var s=e[r],a=t?t(s):s;if(!r||!Bs(a,u)){var u=a;o[i++]=0===s?0:s}}return o}function si(e){return"number"==typeof e?e:ca(e)?p:+e}function ai(e){if("string"==typeof e)return e;if(Qs(e))return Nt(e,ai)+"";if(ca(e))return $r?$r.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function ui(e,t,r){var n=-1,i=xt,o=e.length,s=!0,a=[],u=a;if(r)s=!1,i=At;else if(o>=200){var c=t?null:Wi(e);if(c)return ur(c);s=!1,i=Jt,u=new Yr}else u=t?[]:a;e:for(;++n<o;){var l=e[n],f=t?t(l):l;if(l=r||0!==l?l:0,s&&f==f){for(var p=u.length;p--;)if(u[p]===f)continue e;t&&u.push(f),a.push(l)}else i(u,f,r)||(u!==a&&u.push(f),a.push(l))}return a}function ci(e,t){return null==(e=jo(e,t=mi(t,e)))||delete e[Fo(Jo(t))]}function li(e,t,r,n){return Jn(e,t,r(On(e,t)),n)}function fi(e,t,r,n){for(var i=e.length,o=n?i:-1;(n?o--:++o<i)&&t(e[o],o,e););return r?ti(e,n?0:o,n?o+1:i):ti(e,n?o+1:0,n?i:o)}function pi(e,t){var r=e;return r instanceof Ur&&(r=r.value()),Mt(t,(function(e,t){return t.func.apply(t.thisArg,kt([e],t.args))}),r)}function di(e,t,r){var i=e.length;if(i<2)return i?ui(e[0]):[];for(var o=-1,s=n(i);++o<i;)for(var a=e[o],u=-1;++u<i;)u!=o&&(s[o]=ln(s[o]||a,e[u],t,r));return ui(vn(s,1),t,r)}function hi(e,t,r){for(var n=-1,o=e.length,s=t.length,a={};++n<o;){var u=n<s?t[n]:i;r(a,e[n],u)}return a}function yi(e){return Hs(e)?e:[]}function vi(e){return"function"==typeof e?e:iu}function mi(e,t){return Qs(e)?e:go(e,t)?[e]:$o(ga(e))}var bi=Hn;function gi(e,t,r){var n=e.length;return r=r===i?n:r,!t&&r>=n?e:ti(e,t,r)}var _i=st||function(e){return ft.clearTimeout(e)};function wi(e,t){if(t)return e.slice();var r=e.length,n=Ve?Ve(r):new e.constructor(r);return e.copy(n),n}function Oi(e){var t=new e.constructor(e.byteLength);return new Ue(t).set(new Ue(e)),t}function Si(e,t){var r=t?Oi(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Ei(e,t){if(e!==t){var r=e!==i,n=null===e,o=e==e,s=ca(e),a=t!==i,u=null===t,c=t==t,l=ca(t);if(!u&&!l&&!s&&e>t||s&&a&&c&&!u&&!l||n&&a&&c||!r&&c||!o)return 1;if(!n&&!s&&!l&&e<t||l&&r&&o&&!n&&!s||u&&r&&o||!a&&o||!c)return-1}return 0}function Ti(e,t,r,i){for(var o=-1,s=e.length,a=r.length,u=-1,c=t.length,l=vr(s-a,0),f=n(c+l),p=!i;++u<c;)f[u]=t[u];for(;++o<a;)(p||o<s)&&(f[r[o]]=e[o]);for(;l--;)f[u++]=e[o++];return f}function ji(e,t,r,i){for(var o=-1,s=e.length,a=-1,u=r.length,c=-1,l=t.length,f=vr(s-u,0),p=n(f+l),d=!i;++o<f;)p[o]=e[o];for(var h=o;++c<l;)p[h+c]=t[c];for(;++a<u;)(d||o<s)&&(p[h+r[a]]=e[o++]);return p}function Pi(e,t){var r=-1,i=e.length;for(t||(t=n(i));++r<i;)t[r]=e[r];return t}function Ii(e,t,r,n){var o=!r;r||(r={});for(var s=-1,a=t.length;++s<a;){var u=t[s],c=n?n(r[u],e[u],u,r,e):i;c===i&&(c=e[u]),o?nn(r,u,c):Xr(r,u,c)}return r}function xi(e,t){return function(r,n){var i=Qs(r)?Et:tn,o=t?t():{};return i(r,e,so(n,2),o)}}function Ai(e){return Hn((function(t,r){var n=-1,o=r.length,s=o>1?r[o-1]:i,a=o>2?r[2]:i;for(s=e.length>3&&"function"==typeof s?(o--,s):i,a&&bo(r[0],r[1],a)&&(s=o<3?i:s,o=1),t=Ee(t);++n<o;){var u=r[n];u&&e(t,u,n,s)}return t}))}function Ni(e,t){return function(r,n){if(null==r)return r;if(!Ws(r))return e(r,n);for(var i=r.length,o=t?i:-1,s=Ee(r);(t?o--:++o<i)&&!1!==n(s[o],o,s););return r}}function ki(e){return function(t,r,n){for(var i=-1,o=Ee(t),s=n(t),a=s.length;a--;){var u=s[e?a:++i];if(!1===r(o[u],u,o))break}return t}}function Mi(e){return function(t){var r=ir(t=ga(t))?fr(t):i,n=r?r[0]:t.charAt(0),o=r?gi(r,1).join(""):t.slice(1);return n[e]()+o}}function Di(e){return function(t){return Mt(Za(za(t).replace(Ge,"")),e,"")}}function Ri(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=qr(e.prototype),n=e.apply(r,t);return ta(n)?n:r}}function Ci(e){return function(t,r,n){var o=Ee(t);if(!Ws(t)){var s=so(r,3);t=ka(t),r=function(e){return s(o[e],e,o)}}var a=e(t,r,n);return a>-1?o[s?t[a]:a]:i}}function $i(e){return eo((function(t){var r=t.length,n=r,s=Br.prototype.thru;for(e&&t.reverse();n--;){var a=t[n];if("function"!=typeof a)throw new Pe(o);if(s&&!u&&"wrapper"==io(a))var u=new Br([],!0)}for(n=u?n:r;++n<r;){var c=io(a=t[n]),l="wrapper"==c?no(a):i;u=l&&_o(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?u[io(l[0])].apply(u,l[3]):1==a.length&&_o(a)?u[c]():u.thru(a)}return function(){var e=arguments,n=e[0];if(u&&1==e.length&&Qs(n))return u.plant(n).value();for(var i=0,o=r?t[i].apply(this,e):n;++i<r;)o=t[i].call(this,o);return o}}))}function Fi(e,t,r,o,s,a,u,l,f,p){var d=t&c,h=1&t,y=2&t,v=24&t,m=512&t,b=y?i:Ri(e);return function i(){for(var c=arguments.length,g=n(c),_=c;_--;)g[_]=arguments[_];if(v)var w=oo(i),O=er(g,w);if(o&&(g=Ti(g,o,s,v)),a&&(g=ji(g,a,u,v)),c-=O,v&&c<p){var S=ar(g,w);return Qi(e,t,Fi,i.placeholder,r,g,S,l,f,p-c)}var E=h?r:this,T=y?E[e]:e;return c=g.length,l?g=Po(g,l):m&&c>1&&g.reverse(),d&&f<c&&(g.length=f),this&&this!==ft&&this instanceof i&&(T=b||Ri(T)),T.apply(E,g)}}function qi(e,t){return function(r,n){return function(e,t,r,n){return gn(e,(function(e,i,o){t(n,r(e),i,o)})),n}(r,e,t(n),{})}}function Li(e,t){return function(r,n){var o;if(r===i&&n===i)return t;if(r!==i&&(o=r),n!==i){if(o===i)return n;"string"==typeof r||"string"==typeof n?(r=ai(r),n=ai(n)):(r=si(r),n=si(n)),o=e(r,n)}return o}}function Bi(e){return eo((function(t){return t=Nt(t,Kt(so())),Hn((function(r){var n=this;return e(t,(function(e){return St(e,n,r)}))}))}))}function Ui(e,t){var r=(t=t===i?" ":ai(t)).length;if(r<2)return r?Wn(t,e):t;var n=Wn(t,pt(e/lr(t)));return ir(t)?gi(fr(n),0,e).join(""):n.slice(0,e)}function Vi(e){return function(t,r,o){return o&&"number"!=typeof o&&bo(t,r,o)&&(r=o=i),t=ha(t),r===i?(r=t,t=0):r=ha(r),function(e,t,r,i){for(var o=-1,s=vr(pt((t-e)/(r||1)),0),a=n(s);s--;)a[i?s:++o]=e,e+=r;return a}(t,r,o=o===i?t<r?1:-1:ha(o),e)}}function zi(e){return function(t,r){return"string"==typeof t&&"string"==typeof r||(t=ma(t),r=ma(r)),e(t,r)}}function Qi(e,t,r,n,o,s,a,c,l,f){var p=8&t;t|=p?u:64,4&(t&=~(p?64:u))||(t&=-4);var d=[e,t,o,p?s:i,p?a:i,p?i:s,p?i:a,c,l,f],h=r.apply(i,d);return _o(e)&&xo(h,d),h.placeholder=n,ko(h,e,t)}function Yi(e){var t=Se[e];return function(e,r){if(e=ma(e),(r=null==r?0:mr(ya(r),292))&&Ct(e)){var n=(ga(e)+"e").split("e");return+((n=(ga(t(n[0]+"e"+(+n[1]+r)))+"e").split("e"))[0]+"e"+(+n[1]-r))}return t(e)}}var Wi=Tr&&1/ur(new Tr([,-0]))[1]==l?function(e){return new Tr(e)}:cu;function Hi(e){return function(t){var r=po(t);return r==O?or(t):r==P?cr(t):function(e,t){return Nt(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Ki(e,t,r,s,l,f,p,d){var h=2&t;if(!h&&"function"!=typeof e)throw new Pe(o);var y=s?s.length:0;if(y||(t&=-97,s=l=i),p=p===i?p:vr(ya(p),0),d=d===i?d:ya(d),y-=l?l.length:0,64&t){var v=s,m=l;s=l=i}var b=h?i:no(e),g=[e,t,r,s,l,v,m,f,p,d];if(b&&function(e,t){var r=e[1],n=t[1],i=r|n,o=i<131,s=n==c&&8==r||n==c&&256==r&&e[7].length<=t[8]||384==n&&t[7].length<=t[8]&&8==r;if(!o&&!s)return e;1&n&&(e[2]=t[2],i|=1&r?0:4);var u=t[3];if(u){var l=e[3];e[3]=l?Ti(l,u,t[4]):u,e[4]=l?ar(e[3],a):t[4]}(u=t[5])&&(l=e[5],e[5]=l?ji(l,u,t[6]):u,e[6]=l?ar(e[5],a):t[6]),(u=t[7])&&(e[7]=u),n&c&&(e[8]=null==e[8]?t[8]:mr(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i}(g,b),e=g[0],t=g[1],r=g[2],s=g[3],l=g[4],!(d=g[9]=g[9]===i?h?0:e.length:vr(g[9]-y,0))&&24&t&&(t&=-25),t&&1!=t)_=8==t||16==t?function(e,t,r){var o=Ri(e);return function s(){for(var a=arguments.length,u=n(a),c=a,l=oo(s);c--;)u[c]=arguments[c];var f=a<3&&u[0]!==l&&u[a-1]!==l?[]:ar(u,l);return(a-=f.length)<r?Qi(e,t,Fi,s.placeholder,i,u,f,i,i,r-a):St(this&&this!==ft&&this instanceof s?o:e,this,u)}}(e,t,d):t!=u&&33!=t||l.length?Fi.apply(i,g):function(e,t,r,i){var o=1&t,s=Ri(e);return function t(){for(var a=-1,u=arguments.length,c=-1,l=i.length,f=n(l+u),p=this&&this!==ft&&this instanceof t?s:e;++c<l;)f[c]=i[c];for(;u--;)f[c++]=arguments[++a];return St(p,o?r:this,f)}}(e,t,r,s);else var _=function(e,t,r){var n=1&t,i=Ri(e);return function t(){return(this&&this!==ft&&this instanceof t?i:e).apply(n?r:this,arguments)}}(e,t,r);return ko((b?Zn:xo)(_,g),e,t)}function Gi(e,t,r,n){return e===i||Bs(e,Ae[r])&&!Me.call(n,r)?t:e}function Ji(e,t,r,n,o,s){return ta(e)&&ta(t)&&(s.set(t,e),Ln(e,t,i,Ji,s),s.delete(t)),e}function Zi(e){return oa(e)?i:e}function Xi(e,t,r,n,o,s){var a=1&r,u=e.length,c=t.length;if(u!=c&&!(a&&c>u))return!1;var l=s.get(e),f=s.get(t);if(l&&f)return l==t&&f==e;var p=-1,d=!0,h=2&r?new Yr:i;for(s.set(e,t),s.set(t,e);++p<u;){var y=e[p],v=t[p];if(n)var m=a?n(v,y,p,t,e,s):n(y,v,p,e,t,s);if(m!==i){if(m)continue;d=!1;break}if(h){if(!Rt(t,(function(e,t){if(!Jt(h,t)&&(y===e||o(y,e,r,n,s)))return h.push(t)}))){d=!1;break}}else if(y!==v&&!o(y,v,r,n,s)){d=!1;break}}return s.delete(e),s.delete(t),d}function eo(e){return No(To(e,i,Yo),e+"")}function to(e){return Sn(e,ka,lo)}function ro(e){return Sn(e,Ma,fo)}var no=Ir?function(e){return Ir.get(e)}:cu;function io(e){for(var t=e.name+"",r=xr[t],n=Me.call(xr,t)?r.length:0;n--;){var i=r[n],o=i.func;if(null==o||o==e)return i.name}return t}function oo(e){return(Me.call(Fr,"placeholder")?Fr:e).placeholder}function so(){var e=Fr.iteratee||ou;return e=e===ou?Dn:e,arguments.length?e(arguments[0],arguments[1]):e}function ao(e,t){var r,n,i=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof t?"string":"hash"]:i.map}function uo(e){for(var t=ka(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,So(i)]}return t}function co(e,t){var r=function(e,t){return null==e?i:e[t]}(e,t);return Mn(r)?r:i}var lo=yt?function(e){return null==e?[]:(e=Ee(e),It(yt(e),(function(t){return Ye.call(e,t)})))}:vu,fo=yt?function(e){for(var t=[];e;)kt(t,lo(e)),e=ze(e);return t}:vu,po=En;function ho(e,t,r){for(var n=-1,i=(t=mi(t,e)).length,o=!1;++n<i;){var s=Fo(t[n]);if(!(o=null!=e&&r(e,s)))break;e=e[s]}return o||++n!=i?o:!!(i=null==e?0:e.length)&&ea(i)&&mo(s,i)&&(Qs(e)||zs(e))}function yo(e){return"function"!=typeof e.constructor||Oo(e)?{}:qr(ze(e))}function vo(e){return Qs(e)||zs(e)||!!(He&&e&&e[He])}function mo(e,t){var r=typeof e;return!!(t=null==t?f:t)&&("number"==r||"symbol"!=r&&me.test(e))&&e>-1&&e%1==0&&e<t}function bo(e,t,r){if(!ta(r))return!1;var n=typeof t;return!!("number"==n?Ws(r)&&mo(t,r.length):"string"==n&&t in r)&&Bs(r[t],e)}function go(e,t){if(Qs(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!ca(e))||X.test(e)||!Z.test(e)||null!=t&&e in Ee(t)}function _o(e){var t=io(e),r=Fr[t];if("function"!=typeof r||!(t in Ur.prototype))return!1;if(e===r)return!0;var n=no(r);return!!n&&e===n[0]}(Or&&po(new Or(new ArrayBuffer(1)))!=k||Sr&&po(new Sr)!=O||Er&&po(Er.resolve())!=T||Tr&&po(new Tr)!=P||jr&&po(new jr)!=A)&&(po=function(e){var t=En(e),r=t==E?e.constructor:i,n=r?qo(r):"";if(n)switch(n){case Ar:return k;case Nr:return O;case kr:return T;case Mr:return P;case Dr:return A}return t});var wo=Ne?Zs:mu;function Oo(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Ae)}function So(e){return e==e&&!ta(e)}function Eo(e,t){return function(r){return null!=r&&r[e]===t&&(t!==i||e in Ee(r))}}function To(e,t,r){return t=vr(t===i?e.length-1:t,0),function(){for(var i=arguments,o=-1,s=vr(i.length-t,0),a=n(s);++o<s;)a[o]=i[t+o];o=-1;for(var u=n(t+1);++o<t;)u[o]=i[o];return u[t]=r(a),St(e,this,u)}}function jo(e,t){return t.length<2?e:On(e,ti(t,0,-1))}function Po(e,t){for(var r=e.length,n=mr(t.length,r),o=Pi(e);n--;){var s=t[n];e[n]=mo(s,r)?o[s]:i}return e}function Io(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var xo=Mo(Zn),Ao=lt||function(e,t){return ft.setTimeout(e,t)},No=Mo(Xn);function ko(e,t,r){var n=t+"";return No(e,function(e,t){var r=t.length;if(!r)return e;var n=r-1;return t[n]=(r>1?"& ":"")+t[n],t=t.join(r>2?", ":" "),e.replace(oe,"{\n/* [wrapped with "+t+"] */\n")}(n,function(e,t){return Tt(h,(function(r){var n="_."+r[0];t&r[1]&&!xt(e,n)&&e.push(n)})),e.sort()}(function(e){var t=e.match(se);return t?t[1].split(ae):[]}(n),r)))}function Mo(e){var t=0,r=0;return function(){var n=br(),o=16-(n-r);if(r=n,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(i,arguments)}}function Do(e,t){var r=-1,n=e.length,o=n-1;for(t=t===i?n:t;++r<t;){var s=Yn(r,o),a=e[s];e[s]=e[r],e[r]=a}return e.length=t,e}var Ro,Co,$o=(Ro=Rs((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ee,(function(e,r,n,i){t.push(n?i.replace(le,"$1"):r||e)})),t}),(function(e){return 500===Co.size&&Co.clear(),e})),Co=Ro.cache,Ro);function Fo(e){if("string"==typeof e||ca(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function qo(e){if(null!=e){try{return ke.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Lo(e){if(e instanceof Ur)return e.clone();var t=new Br(e.__wrapped__,e.__chain__);return t.__actions__=Pi(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Bo=Hn((function(e,t){return Hs(e)?ln(e,vn(t,1,Hs,!0)):[]})),Uo=Hn((function(e,t){var r=Jo(t);return Hs(r)&&(r=i),Hs(e)?ln(e,vn(t,1,Hs,!0),so(r,2)):[]})),Vo=Hn((function(e,t){var r=Jo(t);return Hs(r)&&(r=i),Hs(e)?ln(e,vn(t,1,Hs,!0),i,r):[]}));function zo(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=null==r?0:ya(r);return i<0&&(i=vr(n+i,0)),Ft(e,so(t,3),i)}function Qo(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var o=n-1;return r!==i&&(o=ya(r),o=r<0?vr(n+o,0):mr(o,n-1)),Ft(e,so(t,3),o,!0)}function Yo(e){return null!=e&&e.length?vn(e,1):[]}function Wo(e){return e&&e.length?e[0]:i}var Ho=Hn((function(e){var t=Nt(e,yi);return t.length&&t[0]===e[0]?In(t):[]})),Ko=Hn((function(e){var t=Jo(e),r=Nt(e,yi);return t===Jo(r)?t=i:r.pop(),r.length&&r[0]===e[0]?In(r,so(t,2)):[]})),Go=Hn((function(e){var t=Jo(e),r=Nt(e,yi);return(t="function"==typeof t?t:i)&&r.pop(),r.length&&r[0]===e[0]?In(r,i,t):[]}));function Jo(e){var t=null==e?0:e.length;return t?e[t-1]:i}var Zo=Hn(Xo);function Xo(e,t){return e&&e.length&&t&&t.length?zn(e,t):e}var es=eo((function(e,t){var r=null==e?0:e.length,n=on(e,t);return Qn(e,Nt(t,(function(e){return mo(e,r)?+e:e})).sort(Ei)),n}));function ts(e){return null==e?e:wr.call(e)}var rs=Hn((function(e){return ui(vn(e,1,Hs,!0))})),ns=Hn((function(e){var t=Jo(e);return Hs(t)&&(t=i),ui(vn(e,1,Hs,!0),so(t,2))})),is=Hn((function(e){var t=Jo(e);return t="function"==typeof t?t:i,ui(vn(e,1,Hs,!0),i,t)}));function os(e){if(!e||!e.length)return[];var t=0;return e=It(e,(function(e){if(Hs(e))return t=vr(e.length,t),!0})),Wt(t,(function(t){return Nt(e,Vt(t))}))}function ss(e,t){if(!e||!e.length)return[];var r=os(e);return null==t?r:Nt(r,(function(e){return St(t,i,e)}))}var as=Hn((function(e,t){return Hs(e)?ln(e,t):[]})),us=Hn((function(e){return di(It(e,Hs))})),cs=Hn((function(e){var t=Jo(e);return Hs(t)&&(t=i),di(It(e,Hs),so(t,2))})),ls=Hn((function(e){var t=Jo(e);return t="function"==typeof t?t:i,di(It(e,Hs),i,t)})),fs=Hn(os),ps=Hn((function(e){var t=e.length,r=t>1?e[t-1]:i;return r="function"==typeof r?(e.pop(),r):i,ss(e,r)}));function ds(e){var t=Fr(e);return t.__chain__=!0,t}function hs(e,t){return t(e)}var ys=eo((function(e){var t=e.length,r=t?e[0]:0,n=this.__wrapped__,o=function(t){return on(t,e)};return!(t>1||this.__actions__.length)&&n instanceof Ur&&mo(r)?((n=n.slice(r,+r+(t?1:0))).__actions__.push({func:hs,args:[o],thisArg:i}),new Br(n,this.__chain__).thru((function(e){return t&&!e.length&&e.push(i),e}))):this.thru(o)})),vs=xi((function(e,t,r){Me.call(e,r)?++e[r]:nn(e,r,1)})),ms=Ci(zo),bs=Ci(Qo);function gs(e,t){return(Qs(e)?Tt:fn)(e,so(t,3))}function _s(e,t){return(Qs(e)?jt:pn)(e,so(t,3))}var ws=xi((function(e,t,r){Me.call(e,r)?e[r].push(t):nn(e,r,[t])})),Os=Hn((function(e,t,r){var i=-1,o="function"==typeof t,s=Ws(e)?n(e.length):[];return fn(e,(function(e){s[++i]=o?St(t,e,r):xn(e,t,r)})),s})),Ss=xi((function(e,t,r){nn(e,r,t)}));function Es(e,t){return(Qs(e)?Nt:$n)(e,so(t,3))}var Ts=xi((function(e,t,r){e[r?0:1].push(t)}),(function(){return[[],[]]})),js=Hn((function(e,t){if(null==e)return[];var r=t.length;return r>1&&bo(e,t[0],t[1])?t=[]:r>2&&bo(t[0],t[1],t[2])&&(t=[t[0]]),Un(e,vn(t,1),[])})),Ps=ct||function(){return ft.Date.now()};function Is(e,t,r){return t=r?i:t,t=e&&null==t?e.length:t,Ki(e,c,i,i,i,i,t)}function xs(e,t){var r;if("function"!=typeof t)throw new Pe(o);return e=ya(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=i),r}}var As=Hn((function(e,t,r){var n=1;if(r.length){var i=ar(r,oo(As));n|=u}return Ki(e,n,t,r,i)})),Ns=Hn((function(e,t,r){var n=3;if(r.length){var i=ar(r,oo(Ns));n|=u}return Ki(t,n,e,r,i)}));function ks(e,t,r){var n,s,a,u,c,l,f=0,p=!1,d=!1,h=!0;if("function"!=typeof e)throw new Pe(o);function y(t){var r=n,o=s;return n=s=i,f=t,u=e.apply(o,r)}function v(e){return f=e,c=Ao(b,t),p?y(e):u}function m(e){var r=e-l;return l===i||r>=t||r<0||d&&e-f>=a}function b(){var e=Ps();if(m(e))return g(e);c=Ao(b,function(e){var r=t-(e-l);return d?mr(r,a-(e-f)):r}(e))}function g(e){return c=i,h&&n?y(e):(n=s=i,u)}function _(){var e=Ps(),r=m(e);if(n=arguments,s=this,l=e,r){if(c===i)return v(l);if(d)return _i(c),c=Ao(b,t),y(l)}return c===i&&(c=Ao(b,t)),u}return t=ma(t)||0,ta(r)&&(p=!!r.leading,a=(d="maxWait"in r)?vr(ma(r.maxWait)||0,t):a,h="trailing"in r?!!r.trailing:h),_.cancel=function(){c!==i&&_i(c),f=0,n=l=s=c=i},_.flush=function(){return c===i?u:g(Ps())},_}var Ms=Hn((function(e,t){return cn(e,1,t)})),Ds=Hn((function(e,t,r){return cn(e,ma(t)||0,r)}));function Rs(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Pe(o);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var s=e.apply(this,n);return r.cache=o.set(i,s)||o,s};return r.cache=new(Rs.Cache||Qr),r}function Cs(e){if("function"!=typeof e)throw new Pe(o);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Rs.Cache=Qr;var $s=bi((function(e,t){var r=(t=1==t.length&&Qs(t[0])?Nt(t[0],Kt(so())):Nt(vn(t,1),Kt(so()))).length;return Hn((function(n){for(var i=-1,o=mr(n.length,r);++i<o;)n[i]=t[i].call(this,n[i]);return St(e,this,n)}))})),Fs=Hn((function(e,t){var r=ar(t,oo(Fs));return Ki(e,u,i,t,r)})),qs=Hn((function(e,t){var r=ar(t,oo(qs));return Ki(e,64,i,t,r)})),Ls=eo((function(e,t){return Ki(e,256,i,i,i,t)}));function Bs(e,t){return e===t||e!=e&&t!=t}var Us=zi(Tn),Vs=zi((function(e,t){return e>=t})),zs=An(function(){return arguments}())?An:function(e){return ra(e)&&Me.call(e,"callee")&&!Ye.call(e,"callee")},Qs=n.isArray,Ys=mt?Kt(mt):function(e){return ra(e)&&En(e)==N};function Ws(e){return null!=e&&ea(e.length)&&!Zs(e)}function Hs(e){return ra(e)&&Ws(e)}var Ks=vt||mu,Gs=bt?Kt(bt):function(e){return ra(e)&&En(e)==b};function Js(e){if(!ra(e))return!1;var t=En(e);return t==g||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!oa(e)}function Zs(e){if(!ta(e))return!1;var t=En(e);return t==_||t==w||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Xs(e){return"number"==typeof e&&e==ya(e)}function ea(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=f}function ta(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ra(e){return null!=e&&"object"==typeof e}var na=gt?Kt(gt):function(e){return ra(e)&&po(e)==O};function ia(e){return"number"==typeof e||ra(e)&&En(e)==S}function oa(e){if(!ra(e)||En(e)!=E)return!1;var t=ze(e);if(null===t)return!0;var r=Me.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&ke.call(r)==$e}var sa=_t?Kt(_t):function(e){return ra(e)&&En(e)==j},aa=wt?Kt(wt):function(e){return ra(e)&&po(e)==P};function ua(e){return"string"==typeof e||!Qs(e)&&ra(e)&&En(e)==I}function ca(e){return"symbol"==typeof e||ra(e)&&En(e)==x}var la=Ot?Kt(Ot):function(e){return ra(e)&&ea(e.length)&&!!it[En(e)]},fa=zi(Cn),pa=zi((function(e,t){return e<=t}));function da(e){if(!e)return[];if(Ws(e))return ua(e)?fr(e):Pi(e);if(Ke&&e[Ke])return function(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}(e[Ke]());var t=po(e);return(t==O?or:t==P?ur:Ba)(e)}function ha(e){return e?(e=ma(e))===l||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ya(e){var t=ha(e),r=t%1;return t==t?r?t-r:t:0}function va(e){return e?sn(ya(e),0,d):0}function ma(e){if("number"==typeof e)return e;if(ca(e))return p;if(ta(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ta(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Ht(e);var r=he.test(e);return r||ve.test(e)?ut(e.slice(2),r?2:8):de.test(e)?p:+e}function ba(e){return Ii(e,Ma(e))}function ga(e){return null==e?"":ai(e)}var _a=Ai((function(e,t){if(Oo(t)||Ws(t))Ii(t,ka(t),e);else for(var r in t)Me.call(t,r)&&Xr(e,r,t[r])})),wa=Ai((function(e,t){Ii(t,Ma(t),e)})),Oa=Ai((function(e,t,r,n){Ii(t,Ma(t),e,n)})),Sa=Ai((function(e,t,r,n){Ii(t,ka(t),e,n)})),Ea=eo(on),Ta=Hn((function(e,t){e=Ee(e);var r=-1,n=t.length,o=n>2?t[2]:i;for(o&&bo(t[0],t[1],o)&&(n=1);++r<n;)for(var s=t[r],a=Ma(s),u=-1,c=a.length;++u<c;){var l=a[u],f=e[l];(f===i||Bs(f,Ae[l])&&!Me.call(e,l))&&(e[l]=s[l])}return e})),ja=Hn((function(e){return e.push(i,Ji),St(Ra,i,e)}));function Pa(e,t,r){var n=null==e?i:On(e,t);return n===i?r:n}function Ia(e,t){return null!=e&&ho(e,t,Pn)}var xa=qi((function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=Ce.call(t)),e[t]=r}),tu(iu)),Aa=qi((function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=Ce.call(t)),Me.call(e,t)?e[t].push(r):e[t]=[r]}),so),Na=Hn(xn);function ka(e){return Ws(e)?Hr(e):Rn(e)}function Ma(e){return Ws(e)?Hr(e,!0):function(e){if(!ta(e))return function(e){var t=[];if(null!=e)for(var r in Ee(e))t.push(r);return t}(e);var t=Oo(e),r=[];for(var n in e)("constructor"!=n||!t&&Me.call(e,n))&&r.push(n);return r}(e)}var Da=Ai((function(e,t,r){Ln(e,t,r)})),Ra=Ai((function(e,t,r,n){Ln(e,t,r,n)})),Ca=eo((function(e,t){var r={};if(null==e)return r;var n=!1;t=Nt(t,(function(t){return t=mi(t,e),n||(n=t.length>1),t})),Ii(e,ro(e),r),n&&(r=an(r,7,Zi));for(var i=t.length;i--;)ci(r,t[i]);return r})),$a=eo((function(e,t){return null==e?{}:function(e,t){return Vn(e,t,(function(t,r){return Ia(e,r)}))}(e,t)}));function Fa(e,t){if(null==e)return{};var r=Nt(ro(e),(function(e){return[e]}));return t=so(t),Vn(e,r,(function(e,r){return t(e,r[0])}))}var qa=Hi(ka),La=Hi(Ma);function Ba(e){return null==e?[]:Gt(e,ka(e))}var Ua=Di((function(e,t,r){return t=t.toLowerCase(),e+(r?Va(t):t)}));function Va(e){return Ja(ga(e).toLowerCase())}function za(e){return(e=ga(e))&&e.replace(be,tr).replace(Je,"")}var Qa=Di((function(e,t,r){return e+(r?"-":"")+t.toLowerCase()})),Ya=Di((function(e,t,r){return e+(r?" ":"")+t.toLowerCase()})),Wa=Mi("toLowerCase"),Ha=Di((function(e,t,r){return e+(r?"_":"")+t.toLowerCase()})),Ka=Di((function(e,t,r){return e+(r?" ":"")+Ja(t)})),Ga=Di((function(e,t,r){return e+(r?" ":"")+t.toUpperCase()})),Ja=Mi("toUpperCase");function Za(e,t,r){return e=ga(e),(t=r?i:t)===i?function(e){return tt.test(e)}(e)?function(e){return e.match(Xe)||[]}(e):function(e){return e.match(ue)||[]}(e):e.match(t)||[]}var Xa=Hn((function(e,t){try{return St(e,i,t)}catch(e){return Js(e)?e:new we(e)}})),eu=eo((function(e,t){return Tt(t,(function(t){t=Fo(t),nn(e,t,As(e[t],e))})),e}));function tu(e){return function(){return e}}var ru=$i(),nu=$i(!0);function iu(e){return e}function ou(e){return Dn("function"==typeof e?e:an(e,1))}var su=Hn((function(e,t){return function(r){return xn(r,e,t)}})),au=Hn((function(e,t){return function(r){return xn(e,r,t)}}));function uu(e,t,r){var n=ka(t),i=wn(t,n);null!=r||ta(t)&&(i.length||!n.length)||(r=t,t=e,e=this,i=wn(t,ka(t)));var o=!(ta(r)&&"chain"in r&&!r.chain),s=Zs(e);return Tt(i,(function(r){var n=t[r];e[r]=n,s&&(e.prototype[r]=function(){var t=this.__chain__;if(o||t){var r=e(this.__wrapped__),i=r.__actions__=Pi(this.__actions__);return i.push({func:n,args:arguments,thisArg:e}),r.__chain__=t,r}return n.apply(e,kt([this.value()],arguments))})})),e}function cu(){}var lu=Bi(Nt),fu=Bi(Pt),pu=Bi(Rt);function du(e){return go(e)?Vt(Fo(e)):function(e){return function(t){return On(t,e)}}(e)}var hu=Vi(),yu=Vi(!0);function vu(){return[]}function mu(){return!1}var bu,gu=Li((function(e,t){return e+t}),0),_u=Yi("ceil"),wu=Li((function(e,t){return e/t}),1),Ou=Yi("floor"),Su=Li((function(e,t){return e*t}),1),Eu=Yi("round"),Tu=Li((function(e,t){return e-t}),0);return Fr.after=function(e,t){if("function"!=typeof t)throw new Pe(o);return e=ya(e),function(){if(--e<1)return t.apply(this,arguments)}},Fr.ary=Is,Fr.assign=_a,Fr.assignIn=wa,Fr.assignInWith=Oa,Fr.assignWith=Sa,Fr.at=Ea,Fr.before=xs,Fr.bind=As,Fr.bindAll=eu,Fr.bindKey=Ns,Fr.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Qs(e)?e:[e]},Fr.chain=ds,Fr.chunk=function(e,t,r){t=(r?bo(e,t,r):t===i)?1:vr(ya(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var s=0,a=0,u=n(pt(o/t));s<o;)u[a++]=ti(e,s,s+=t);return u},Fr.compact=function(e){for(var t=-1,r=null==e?0:e.length,n=0,i=[];++t<r;){var o=e[t];o&&(i[n++]=o)}return i},Fr.concat=function(){var e=arguments.length;if(!e)return[];for(var t=n(e-1),r=arguments[0],i=e;i--;)t[i-1]=arguments[i];return kt(Qs(r)?Pi(r):[r],vn(t,1))},Fr.cond=function(e){var t=null==e?0:e.length,r=so();return e=t?Nt(e,(function(e){if("function"!=typeof e[1])throw new Pe(o);return[r(e[0]),e[1]]})):[],Hn((function(r){for(var n=-1;++n<t;){var i=e[n];if(St(i[0],this,r))return St(i[1],this,r)}}))},Fr.conforms=function(e){return function(e){var t=ka(e);return function(r){return un(r,e,t)}}(an(e,1))},Fr.constant=tu,Fr.countBy=vs,Fr.create=function(e,t){var r=qr(e);return null==t?r:rn(r,t)},Fr.curry=function e(t,r,n){var o=Ki(t,8,i,i,i,i,i,r=n?i:r);return o.placeholder=e.placeholder,o},Fr.curryRight=function e(t,r,n){var o=Ki(t,16,i,i,i,i,i,r=n?i:r);return o.placeholder=e.placeholder,o},Fr.debounce=ks,Fr.defaults=Ta,Fr.defaultsDeep=ja,Fr.defer=Ms,Fr.delay=Ds,Fr.difference=Bo,Fr.differenceBy=Uo,Fr.differenceWith=Vo,Fr.drop=function(e,t,r){var n=null==e?0:e.length;return n?ti(e,(t=r||t===i?1:ya(t))<0?0:t,n):[]},Fr.dropRight=function(e,t,r){var n=null==e?0:e.length;return n?ti(e,0,(t=n-(t=r||t===i?1:ya(t)))<0?0:t):[]},Fr.dropRightWhile=function(e,t){return e&&e.length?fi(e,so(t,3),!0,!0):[]},Fr.dropWhile=function(e,t){return e&&e.length?fi(e,so(t,3),!0):[]},Fr.fill=function(e,t,r,n){var o=null==e?0:e.length;return o?(r&&"number"!=typeof r&&bo(e,t,r)&&(r=0,n=o),function(e,t,r,n){var o=e.length;for((r=ya(r))<0&&(r=-r>o?0:o+r),(n=n===i||n>o?o:ya(n))<0&&(n+=o),n=r>n?0:va(n);r<n;)e[r++]=t;return e}(e,t,r,n)):[]},Fr.filter=function(e,t){return(Qs(e)?It:yn)(e,so(t,3))},Fr.flatMap=function(e,t){return vn(Es(e,t),1)},Fr.flatMapDeep=function(e,t){return vn(Es(e,t),l)},Fr.flatMapDepth=function(e,t,r){return r=r===i?1:ya(r),vn(Es(e,t),r)},Fr.flatten=Yo,Fr.flattenDeep=function(e){return null!=e&&e.length?vn(e,l):[]},Fr.flattenDepth=function(e,t){return null!=e&&e.length?vn(e,t=t===i?1:ya(t)):[]},Fr.flip=function(e){return Ki(e,512)},Fr.flow=ru,Fr.flowRight=nu,Fr.fromPairs=function(e){for(var t=-1,r=null==e?0:e.length,n={};++t<r;){var i=e[t];n[i[0]]=i[1]}return n},Fr.functions=function(e){return null==e?[]:wn(e,ka(e))},Fr.functionsIn=function(e){return null==e?[]:wn(e,Ma(e))},Fr.groupBy=ws,Fr.initial=function(e){return null!=e&&e.length?ti(e,0,-1):[]},Fr.intersection=Ho,Fr.intersectionBy=Ko,Fr.intersectionWith=Go,Fr.invert=xa,Fr.invertBy=Aa,Fr.invokeMap=Os,Fr.iteratee=ou,Fr.keyBy=Ss,Fr.keys=ka,Fr.keysIn=Ma,Fr.map=Es,Fr.mapKeys=function(e,t){var r={};return t=so(t,3),gn(e,(function(e,n,i){nn(r,t(e,n,i),e)})),r},Fr.mapValues=function(e,t){var r={};return t=so(t,3),gn(e,(function(e,n,i){nn(r,n,t(e,n,i))})),r},Fr.matches=function(e){return Fn(an(e,1))},Fr.matchesProperty=function(e,t){return qn(e,an(t,1))},Fr.memoize=Rs,Fr.merge=Da,Fr.mergeWith=Ra,Fr.method=su,Fr.methodOf=au,Fr.mixin=uu,Fr.negate=Cs,Fr.nthArg=function(e){return e=ya(e),Hn((function(t){return Bn(t,e)}))},Fr.omit=Ca,Fr.omitBy=function(e,t){return Fa(e,Cs(so(t)))},Fr.once=function(e){return xs(2,e)},Fr.orderBy=function(e,t,r,n){return null==e?[]:(Qs(t)||(t=null==t?[]:[t]),Qs(r=n?i:r)||(r=null==r?[]:[r]),Un(e,t,r))},Fr.over=lu,Fr.overArgs=$s,Fr.overEvery=fu,Fr.overSome=pu,Fr.partial=Fs,Fr.partialRight=qs,Fr.partition=Ts,Fr.pick=$a,Fr.pickBy=Fa,Fr.property=du,Fr.propertyOf=function(e){return function(t){return null==e?i:On(e,t)}},Fr.pull=Zo,Fr.pullAll=Xo,Fr.pullAllBy=function(e,t,r){return e&&e.length&&t&&t.length?zn(e,t,so(r,2)):e},Fr.pullAllWith=function(e,t,r){return e&&e.length&&t&&t.length?zn(e,t,i,r):e},Fr.pullAt=es,Fr.range=hu,Fr.rangeRight=yu,Fr.rearg=Ls,Fr.reject=function(e,t){return(Qs(e)?It:yn)(e,Cs(so(t,3)))},Fr.remove=function(e,t){var r=[];if(!e||!e.length)return r;var n=-1,i=[],o=e.length;for(t=so(t,3);++n<o;){var s=e[n];t(s,n,e)&&(r.push(s),i.push(n))}return Qn(e,i),r},Fr.rest=function(e,t){if("function"!=typeof e)throw new Pe(o);return Hn(e,t=t===i?t:ya(t))},Fr.reverse=ts,Fr.sampleSize=function(e,t,r){return t=(r?bo(e,t,r):t===i)?1:ya(t),(Qs(e)?Gr:Gn)(e,t)},Fr.set=function(e,t,r){return null==e?e:Jn(e,t,r)},Fr.setWith=function(e,t,r,n){return n="function"==typeof n?n:i,null==e?e:Jn(e,t,r,n)},Fr.shuffle=function(e){return(Qs(e)?Jr:ei)(e)},Fr.slice=function(e,t,r){var n=null==e?0:e.length;return n?(r&&"number"!=typeof r&&bo(e,t,r)?(t=0,r=n):(t=null==t?0:ya(t),r=r===i?n:ya(r)),ti(e,t,r)):[]},Fr.sortBy=js,Fr.sortedUniq=function(e){return e&&e.length?oi(e):[]},Fr.sortedUniqBy=function(e,t){return e&&e.length?oi(e,so(t,2)):[]},Fr.split=function(e,t,r){return r&&"number"!=typeof r&&bo(e,t,r)&&(t=r=i),(r=r===i?d:r>>>0)?(e=ga(e))&&("string"==typeof t||null!=t&&!sa(t))&&!(t=ai(t))&&ir(e)?gi(fr(e),0,r):e.split(t,r):[]},Fr.spread=function(e,t){if("function"!=typeof e)throw new Pe(o);return t=null==t?0:vr(ya(t),0),Hn((function(r){var n=r[t],i=gi(r,0,t);return n&&kt(i,n),St(e,this,i)}))},Fr.tail=function(e){var t=null==e?0:e.length;return t?ti(e,1,t):[]},Fr.take=function(e,t,r){return e&&e.length?ti(e,0,(t=r||t===i?1:ya(t))<0?0:t):[]},Fr.takeRight=function(e,t,r){var n=null==e?0:e.length;return n?ti(e,(t=n-(t=r||t===i?1:ya(t)))<0?0:t,n):[]},Fr.takeRightWhile=function(e,t){return e&&e.length?fi(e,so(t,3),!1,!0):[]},Fr.takeWhile=function(e,t){return e&&e.length?fi(e,so(t,3)):[]},Fr.tap=function(e,t){return t(e),e},Fr.throttle=function(e,t,r){var n=!0,i=!0;if("function"!=typeof e)throw new Pe(o);return ta(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),ks(e,t,{leading:n,maxWait:t,trailing:i})},Fr.thru=hs,Fr.toArray=da,Fr.toPairs=qa,Fr.toPairsIn=La,Fr.toPath=function(e){return Qs(e)?Nt(e,Fo):ca(e)?[e]:Pi($o(ga(e)))},Fr.toPlainObject=ba,Fr.transform=function(e,t,r){var n=Qs(e),i=n||Ks(e)||la(e);if(t=so(t,4),null==r){var o=e&&e.constructor;r=i?n?new o:[]:ta(e)&&Zs(o)?qr(ze(e)):{}}return(i?Tt:gn)(e,(function(e,n,i){return t(r,e,n,i)})),r},Fr.unary=function(e){return Is(e,1)},Fr.union=rs,Fr.unionBy=ns,Fr.unionWith=is,Fr.uniq=function(e){return e&&e.length?ui(e):[]},Fr.uniqBy=function(e,t){return e&&e.length?ui(e,so(t,2)):[]},Fr.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?ui(e,i,t):[]},Fr.unset=function(e,t){return null==e||ci(e,t)},Fr.unzip=os,Fr.unzipWith=ss,Fr.update=function(e,t,r){return null==e?e:li(e,t,vi(r))},Fr.updateWith=function(e,t,r,n){return n="function"==typeof n?n:i,null==e?e:li(e,t,vi(r),n)},Fr.values=Ba,Fr.valuesIn=function(e){return null==e?[]:Gt(e,Ma(e))},Fr.without=as,Fr.words=Za,Fr.wrap=function(e,t){return Fs(vi(t),e)},Fr.xor=us,Fr.xorBy=cs,Fr.xorWith=ls,Fr.zip=fs,Fr.zipObject=function(e,t){return hi(e||[],t||[],Xr)},Fr.zipObjectDeep=function(e,t){return hi(e||[],t||[],Jn)},Fr.zipWith=ps,Fr.entries=qa,Fr.entriesIn=La,Fr.extend=wa,Fr.extendWith=Oa,uu(Fr,Fr),Fr.add=gu,Fr.attempt=Xa,Fr.camelCase=Ua,Fr.capitalize=Va,Fr.ceil=_u,Fr.clamp=function(e,t,r){return r===i&&(r=t,t=i),r!==i&&(r=(r=ma(r))==r?r:0),t!==i&&(t=(t=ma(t))==t?t:0),sn(ma(e),t,r)},Fr.clone=function(e){return an(e,4)},Fr.cloneDeep=function(e){return an(e,5)},Fr.cloneDeepWith=function(e,t){return an(e,5,t="function"==typeof t?t:i)},Fr.cloneWith=function(e,t){return an(e,4,t="function"==typeof t?t:i)},Fr.conformsTo=function(e,t){return null==t||un(e,t,ka(t))},Fr.deburr=za,Fr.defaultTo=function(e,t){return null==e||e!=e?t:e},Fr.divide=wu,Fr.endsWith=function(e,t,r){e=ga(e),t=ai(t);var n=e.length,o=r=r===i?n:sn(ya(r),0,n);return(r-=t.length)>=0&&e.slice(r,o)==t},Fr.eq=Bs,Fr.escape=function(e){return(e=ga(e))&&H.test(e)?e.replace(Y,rr):e},Fr.escapeRegExp=function(e){return(e=ga(e))&&re.test(e)?e.replace(te,"\\$&"):e},Fr.every=function(e,t,r){var n=Qs(e)?Pt:dn;return r&&bo(e,t,r)&&(t=i),n(e,so(t,3))},Fr.find=ms,Fr.findIndex=zo,Fr.findKey=function(e,t){return $t(e,so(t,3),gn)},Fr.findLast=bs,Fr.findLastIndex=Qo,Fr.findLastKey=function(e,t){return $t(e,so(t,3),_n)},Fr.floor=Ou,Fr.forEach=gs,Fr.forEachRight=_s,Fr.forIn=function(e,t){return null==e?e:mn(e,so(t,3),Ma)},Fr.forInRight=function(e,t){return null==e?e:bn(e,so(t,3),Ma)},Fr.forOwn=function(e,t){return e&&gn(e,so(t,3))},Fr.forOwnRight=function(e,t){return e&&_n(e,so(t,3))},Fr.get=Pa,Fr.gt=Us,Fr.gte=Vs,Fr.has=function(e,t){return null!=e&&ho(e,t,jn)},Fr.hasIn=Ia,Fr.head=Wo,Fr.identity=iu,Fr.includes=function(e,t,r,n){e=Ws(e)?e:Ba(e),r=r&&!n?ya(r):0;var i=e.length;return r<0&&(r=vr(i+r,0)),ua(e)?r<=i&&e.indexOf(t,r)>-1:!!i&&qt(e,t,r)>-1},Fr.indexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=null==r?0:ya(r);return i<0&&(i=vr(n+i,0)),qt(e,t,i)},Fr.inRange=function(e,t,r){return t=ha(t),r===i?(r=t,t=0):r=ha(r),function(e,t,r){return e>=mr(t,r)&&e<vr(t,r)}(e=ma(e),t,r)},Fr.invoke=Na,Fr.isArguments=zs,Fr.isArray=Qs,Fr.isArrayBuffer=Ys,Fr.isArrayLike=Ws,Fr.isArrayLikeObject=Hs,Fr.isBoolean=function(e){return!0===e||!1===e||ra(e)&&En(e)==m},Fr.isBuffer=Ks,Fr.isDate=Gs,Fr.isElement=function(e){return ra(e)&&1===e.nodeType&&!oa(e)},Fr.isEmpty=function(e){if(null==e)return!0;if(Ws(e)&&(Qs(e)||"string"==typeof e||"function"==typeof e.splice||Ks(e)||la(e)||zs(e)))return!e.length;var t=po(e);if(t==O||t==P)return!e.size;if(Oo(e))return!Rn(e).length;for(var r in e)if(Me.call(e,r))return!1;return!0},Fr.isEqual=function(e,t){return Nn(e,t)},Fr.isEqualWith=function(e,t,r){var n=(r="function"==typeof r?r:i)?r(e,t):i;return n===i?Nn(e,t,i,r):!!n},Fr.isError=Js,Fr.isFinite=function(e){return"number"==typeof e&&Ct(e)},Fr.isFunction=Zs,Fr.isInteger=Xs,Fr.isLength=ea,Fr.isMap=na,Fr.isMatch=function(e,t){return e===t||kn(e,t,uo(t))},Fr.isMatchWith=function(e,t,r){return r="function"==typeof r?r:i,kn(e,t,uo(t),r)},Fr.isNaN=function(e){return ia(e)&&e!=+e},Fr.isNative=function(e){if(wo(e))throw new we("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Mn(e)},Fr.isNil=function(e){return null==e},Fr.isNull=function(e){return null===e},Fr.isNumber=ia,Fr.isObject=ta,Fr.isObjectLike=ra,Fr.isPlainObject=oa,Fr.isRegExp=sa,Fr.isSafeInteger=function(e){return Xs(e)&&e>=-9007199254740991&&e<=f},Fr.isSet=aa,Fr.isString=ua,Fr.isSymbol=ca,Fr.isTypedArray=la,Fr.isUndefined=function(e){return e===i},Fr.isWeakMap=function(e){return ra(e)&&po(e)==A},Fr.isWeakSet=function(e){return ra(e)&&"[object WeakSet]"==En(e)},Fr.join=function(e,t){return null==e?"":zt.call(e,t)},Fr.kebabCase=Qa,Fr.last=Jo,Fr.lastIndexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var o=n;return r!==i&&(o=(o=ya(r))<0?vr(n+o,0):mr(o,n-1)),t==t?function(e,t,r){for(var n=r+1;n--;)if(e[n]===t)return n;return n}(e,t,o):Ft(e,Bt,o,!0)},Fr.lowerCase=Ya,Fr.lowerFirst=Wa,Fr.lt=fa,Fr.lte=pa,Fr.max=function(e){return e&&e.length?hn(e,iu,Tn):i},Fr.maxBy=function(e,t){return e&&e.length?hn(e,so(t,2),Tn):i},Fr.mean=function(e){return Ut(e,iu)},Fr.meanBy=function(e,t){return Ut(e,so(t,2))},Fr.min=function(e){return e&&e.length?hn(e,iu,Cn):i},Fr.minBy=function(e,t){return e&&e.length?hn(e,so(t,2),Cn):i},Fr.stubArray=vu,Fr.stubFalse=mu,Fr.stubObject=function(){return{}},Fr.stubString=function(){return""},Fr.stubTrue=function(){return!0},Fr.multiply=Su,Fr.nth=function(e,t){return e&&e.length?Bn(e,ya(t)):i},Fr.noConflict=function(){return ft._===this&&(ft._=Fe),this},Fr.noop=cu,Fr.now=Ps,Fr.pad=function(e,t,r){e=ga(e);var n=(t=ya(t))?lr(e):0;if(!t||n>=t)return e;var i=(t-n)/2;return Ui(dt(i),r)+e+Ui(pt(i),r)},Fr.padEnd=function(e,t,r){e=ga(e);var n=(t=ya(t))?lr(e):0;return t&&n<t?e+Ui(t-n,r):e},Fr.padStart=function(e,t,r){e=ga(e);var n=(t=ya(t))?lr(e):0;return t&&n<t?Ui(t-n,r)+e:e},Fr.parseInt=function(e,t,r){return r||null==t?t=0:t&&(t=+t),gr(ga(e).replace(ne,""),t||0)},Fr.random=function(e,t,r){if(r&&"boolean"!=typeof r&&bo(e,t,r)&&(t=r=i),r===i&&("boolean"==typeof t?(r=t,t=i):"boolean"==typeof e&&(r=e,e=i)),e===i&&t===i?(e=0,t=1):(e=ha(e),t===i?(t=e,e=0):t=ha(t)),e>t){var n=e;e=t,t=n}if(r||e%1||t%1){var o=_r();return mr(e+o*(t-e+at("1e-"+((o+"").length-1))),t)}return Yn(e,t)},Fr.reduce=function(e,t,r){var n=Qs(e)?Mt:Qt,i=arguments.length<3;return n(e,so(t,4),r,i,fn)},Fr.reduceRight=function(e,t,r){var n=Qs(e)?Dt:Qt,i=arguments.length<3;return n(e,so(t,4),r,i,pn)},Fr.repeat=function(e,t,r){return t=(r?bo(e,t,r):t===i)?1:ya(t),Wn(ga(e),t)},Fr.replace=function(){var e=arguments,t=ga(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Fr.result=function(e,t,r){var n=-1,o=(t=mi(t,e)).length;for(o||(o=1,e=i);++n<o;){var s=null==e?i:e[Fo(t[n])];s===i&&(n=o,s=r),e=Zs(s)?s.call(e):s}return e},Fr.round=Eu,Fr.runInContext=e,Fr.sample=function(e){return(Qs(e)?Kr:Kn)(e)},Fr.size=function(e){if(null==e)return 0;if(Ws(e))return ua(e)?lr(e):e.length;var t=po(e);return t==O||t==P?e.size:Rn(e).length},Fr.snakeCase=Ha,Fr.some=function(e,t,r){var n=Qs(e)?Rt:ri;return r&&bo(e,t,r)&&(t=i),n(e,so(t,3))},Fr.sortedIndex=function(e,t){return ni(e,t)},Fr.sortedIndexBy=function(e,t,r){return ii(e,t,so(r,2))},Fr.sortedIndexOf=function(e,t){var r=null==e?0:e.length;if(r){var n=ni(e,t);if(n<r&&Bs(e[n],t))return n}return-1},Fr.sortedLastIndex=function(e,t){return ni(e,t,!0)},Fr.sortedLastIndexBy=function(e,t,r){return ii(e,t,so(r,2),!0)},Fr.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var r=ni(e,t,!0)-1;if(Bs(e[r],t))return r}return-1},Fr.startCase=Ka,Fr.startsWith=function(e,t,r){return e=ga(e),r=null==r?0:sn(ya(r),0,e.length),t=ai(t),e.slice(r,r+t.length)==t},Fr.subtract=Tu,Fr.sum=function(e){return e&&e.length?Yt(e,iu):0},Fr.sumBy=function(e,t){return e&&e.length?Yt(e,so(t,2)):0},Fr.template=function(e,t,r){var n=Fr.templateSettings;r&&bo(e,t,r)&&(t=i),e=ga(e),t=Oa({},t,n,Gi);var o,s,a=Oa({},t.imports,n.imports,Gi),u=ka(a),c=Gt(a,u),l=0,f=t.interpolate||ge,p="__p += '",d=Te((t.escape||ge).source+"|"+f.source+"|"+(f===J?fe:ge).source+"|"+(t.evaluate||ge).source+"|$","g"),h="//# sourceURL="+(Me.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++nt+"]")+"\n";e.replace(d,(function(t,r,n,i,a,u){return n||(n=i),p+=e.slice(l,u).replace(_e,nr),r&&(o=!0,p+="' +\n__e("+r+") +\n'"),a&&(s=!0,p+="';\n"+a+";\n__p += '"),n&&(p+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),l=u+t.length,t})),p+="';\n";var y=Me.call(t,"variable")&&t.variable;if(y){if(ce.test(y))throw new we("Invalid `variable` option passed into `_.template`")}else p="with (obj) {\n"+p+"\n}\n";p=(s?p.replace(U,""):p).replace(V,"$1").replace(z,"$1;"),p="function("+(y||"obj")+") {\n"+(y?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var v=Xa((function(){return Oe(u,h+"return "+p).apply(i,c)}));if(v.source=p,Js(v))throw v;return v},Fr.times=function(e,t){if((e=ya(e))<1||e>f)return[];var r=d,n=mr(e,d);t=so(t),e-=d;for(var i=Wt(n,t);++r<e;)t(r);return i},Fr.toFinite=ha,Fr.toInteger=ya,Fr.toLength=va,Fr.toLower=function(e){return ga(e).toLowerCase()},Fr.toNumber=ma,Fr.toSafeInteger=function(e){return e?sn(ya(e),-9007199254740991,f):0===e?e:0},Fr.toString=ga,Fr.toUpper=function(e){return ga(e).toUpperCase()},Fr.trim=function(e,t,r){if((e=ga(e))&&(r||t===i))return Ht(e);if(!e||!(t=ai(t)))return e;var n=fr(e),o=fr(t);return gi(n,Zt(n,o),Xt(n,o)+1).join("")},Fr.trimEnd=function(e,t,r){if((e=ga(e))&&(r||t===i))return e.slice(0,pr(e)+1);if(!e||!(t=ai(t)))return e;var n=fr(e);return gi(n,0,Xt(n,fr(t))+1).join("")},Fr.trimStart=function(e,t,r){if((e=ga(e))&&(r||t===i))return e.replace(ne,"");if(!e||!(t=ai(t)))return e;var n=fr(e);return gi(n,Zt(n,fr(t))).join("")},Fr.truncate=function(e,t){var r=30,n="...";if(ta(t)){var o="separator"in t?t.separator:o;r="length"in t?ya(t.length):r,n="omission"in t?ai(t.omission):n}var s=(e=ga(e)).length;if(ir(e)){var a=fr(e);s=a.length}if(r>=s)return e;var u=r-lr(n);if(u<1)return n;var c=a?gi(a,0,u).join(""):e.slice(0,u);if(o===i)return c+n;if(a&&(u+=c.length-u),sa(o)){if(e.slice(u).search(o)){var l,f=c;for(o.global||(o=Te(o.source,ga(pe.exec(o))+"g")),o.lastIndex=0;l=o.exec(f);)var p=l.index;c=c.slice(0,p===i?u:p)}}else if(e.indexOf(ai(o),u)!=u){var d=c.lastIndexOf(o);d>-1&&(c=c.slice(0,d))}return c+n},Fr.unescape=function(e){return(e=ga(e))&&W.test(e)?e.replace(Q,dr):e},Fr.uniqueId=function(e){var t=++De;return ga(e)+t},Fr.upperCase=Ga,Fr.upperFirst=Ja,Fr.each=gs,Fr.eachRight=_s,Fr.first=Wo,uu(Fr,(bu={},gn(Fr,(function(e,t){Me.call(Fr.prototype,t)||(bu[t]=e)})),bu),{chain:!1}),Fr.VERSION="4.17.21",Tt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Fr[e].placeholder=Fr})),Tt(["drop","take"],(function(e,t){Ur.prototype[e]=function(r){r=r===i?1:vr(ya(r),0);var n=this.__filtered__&&!t?new Ur(this):this.clone();return n.__filtered__?n.__takeCount__=mr(r,n.__takeCount__):n.__views__.push({size:mr(r,d),type:e+(n.__dir__<0?"Right":"")}),n},Ur.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),Tt(["filter","map","takeWhile"],(function(e,t){var r=t+1,n=1==r||3==r;Ur.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:so(e,3),type:r}),t.__filtered__=t.__filtered__||n,t}})),Tt(["head","last"],(function(e,t){var r="take"+(t?"Right":"");Ur.prototype[e]=function(){return this[r](1).value()[0]}})),Tt(["initial","tail"],(function(e,t){var r="drop"+(t?"":"Right");Ur.prototype[e]=function(){return this.__filtered__?new Ur(this):this[r](1)}})),Ur.prototype.compact=function(){return this.filter(iu)},Ur.prototype.find=function(e){return this.filter(e).head()},Ur.prototype.findLast=function(e){return this.reverse().find(e)},Ur.prototype.invokeMap=Hn((function(e,t){return"function"==typeof e?new Ur(this):this.map((function(r){return xn(r,e,t)}))})),Ur.prototype.reject=function(e){return this.filter(Cs(so(e)))},Ur.prototype.slice=function(e,t){e=ya(e);var r=this;return r.__filtered__&&(e>0||t<0)?new Ur(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==i&&(r=(t=ya(t))<0?r.dropRight(-t):r.take(t-e)),r)},Ur.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Ur.prototype.toArray=function(){return this.take(d)},gn(Ur.prototype,(function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),n=/^(?:head|last)$/.test(t),o=Fr[n?"take"+("last"==t?"Right":""):t],s=n||/^find/.test(t);o&&(Fr.prototype[t]=function(){var t=this.__wrapped__,a=n?[1]:arguments,u=t instanceof Ur,c=a[0],l=u||Qs(t),f=function(e){var t=o.apply(Fr,kt([e],a));return n&&p?t[0]:t};l&&r&&"function"==typeof c&&1!=c.length&&(u=l=!1);var p=this.__chain__,d=!!this.__actions__.length,h=s&&!p,y=u&&!d;if(!s&&l){t=y?t:new Ur(this);var v=e.apply(t,a);return v.__actions__.push({func:hs,args:[f],thisArg:i}),new Br(v,p)}return h&&y?e.apply(this,a):(v=this.thru(f),h?n?v.value()[0]:v.value():v)})})),Tt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Ie[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);Fr.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var i=this.value();return t.apply(Qs(i)?i:[],e)}return this[r]((function(r){return t.apply(Qs(r)?r:[],e)}))}})),gn(Ur.prototype,(function(e,t){var r=Fr[t];if(r){var n=r.name+"";Me.call(xr,n)||(xr[n]=[]),xr[n].push({name:t,func:r})}})),xr[Fi(i,2).name]=[{name:"wrapper",func:i}],Ur.prototype.clone=function(){var e=new Ur(this.__wrapped__);return e.__actions__=Pi(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Pi(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Pi(this.__views__),e},Ur.prototype.reverse=function(){if(this.__filtered__){var e=new Ur(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Ur.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,r=Qs(e),n=t<0,i=r?e.length:0,o=function(e,t,r){for(var n=-1,i=r.length;++n<i;){var o=r[n],s=o.size;switch(o.type){case"drop":e+=s;break;case"dropRight":t-=s;break;case"take":t=mr(t,e+s);break;case"takeRight":e=vr(e,t-s)}}return{start:e,end:t}}(0,i,this.__views__),s=o.start,a=o.end,u=a-s,c=n?a:s-1,l=this.__iteratees__,f=l.length,p=0,d=mr(u,this.__takeCount__);if(!r||!n&&i==u&&d==u)return pi(e,this.__actions__);var h=[];e:for(;u--&&p<d;){for(var y=-1,v=e[c+=t];++y<f;){var m=l[y],b=m.iteratee,g=m.type,_=b(v);if(2==g)v=_;else if(!_){if(1==g)continue e;break e}}h[p++]=v}return h},Fr.prototype.at=ys,Fr.prototype.chain=function(){return ds(this)},Fr.prototype.commit=function(){return new Br(this.value(),this.__chain__)},Fr.prototype.next=function(){this.__values__===i&&(this.__values__=da(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?i:this.__values__[this.__index__++]}},Fr.prototype.plant=function(e){for(var t,r=this;r instanceof Lr;){var n=Lo(r);n.__index__=0,n.__values__=i,t?o.__wrapped__=n:t=n;var o=n;r=r.__wrapped__}return o.__wrapped__=e,t},Fr.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Ur){var t=e;return this.__actions__.length&&(t=new Ur(this)),(t=t.reverse()).__actions__.push({func:hs,args:[ts],thisArg:i}),new Br(t,this.__chain__)}return this.thru(ts)},Fr.prototype.toJSON=Fr.prototype.valueOf=Fr.prototype.value=function(){return pi(this.__wrapped__,this.__actions__)},Fr.prototype.first=Fr.prototype.head,Ke&&(Fr.prototype[Ke]=function(){return this}),Fr}();ft._=hr,(n=function(){return hr}.call(t,r,t,e))===i||(e.exports=n)}.call(this)},2937:function(e,t,r){"use strict";var n=this&&this.__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){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.interval=t.iif=t.generate=t.fromEventPattern=t.fromEvent=t.from=t.forkJoin=t.empty=t.defer=t.connectable=t.concat=t.combineLatest=t.bindNodeCallback=t.bindCallback=t.UnsubscriptionError=t.TimeoutError=t.SequenceError=t.ObjectUnsubscribedError=t.NotFoundError=t.EmptyError=t.ArgumentOutOfRangeError=t.firstValueFrom=t.lastValueFrom=t.isObservable=t.identity=t.noop=t.pipe=t.NotificationKind=t.Notification=t.Subscriber=t.Subscription=t.Scheduler=t.VirtualAction=t.VirtualTimeScheduler=t.animationFrameScheduler=t.animationFrame=t.queueScheduler=t.queue=t.asyncScheduler=t.async=t.asapScheduler=t.asap=t.AsyncSubject=t.ReplaySubject=t.BehaviorSubject=t.Subject=t.animationFrames=t.observable=t.ConnectableObservable=t.Observable=void 0,t.filter=t.expand=t.exhaustMap=t.exhaustAll=t.exhaust=t.every=t.endWith=t.elementAt=t.distinctUntilKeyChanged=t.distinctUntilChanged=t.distinct=t.dematerialize=t.delayWhen=t.delay=t.defaultIfEmpty=t.debounceTime=t.debounce=t.count=t.connect=t.concatWith=t.concatMapTo=t.concatMap=t.concatAll=t.combineLatestWith=t.combineLatestAll=t.combineAll=t.catchError=t.bufferWhen=t.bufferToggle=t.bufferTime=t.bufferCount=t.buffer=t.auditTime=t.audit=t.config=t.NEVER=t.EMPTY=t.scheduled=t.zip=t.using=t.timer=t.throwError=t.range=t.race=t.partition=t.pairs=t.onErrorResumeNext=t.of=t.never=t.merge=void 0,t.switchMapTo=t.switchMap=t.switchAll=t.subscribeOn=t.startWith=t.skipWhile=t.skipUntil=t.skipLast=t.skip=t.single=t.shareReplay=t.share=t.sequenceEqual=t.scan=t.sampleTime=t.sample=t.refCount=t.retryWhen=t.retry=t.repeatWhen=t.repeat=t.reduce=t.raceWith=t.publishReplay=t.publishLast=t.publishBehavior=t.publish=t.pluck=t.pairwise=t.observeOn=t.multicast=t.min=t.mergeWith=t.mergeScan=t.mergeMapTo=t.mergeMap=t.flatMap=t.mergeAll=t.max=t.materialize=t.mapTo=t.map=t.last=t.isEmpty=t.ignoreElements=t.groupBy=t.first=t.findIndex=t.find=t.finalize=void 0,t.zipWith=t.zipAll=t.withLatestFrom=t.windowWhen=t.windowToggle=t.windowTime=t.windowCount=t.window=t.toArray=t.timestamp=t.timeoutWith=t.timeout=t.timeInterval=t.throwIfEmpty=t.throttleTime=t.throttle=t.tap=t.takeWhile=t.takeUntil=t.takeLast=t.take=t.switchScan=void 0;var o=r(5271);Object.defineProperty(t,"Observable",{enumerable:!0,get:function(){return o.Observable}});var s=r(3739);Object.defineProperty(t,"ConnectableObservable",{enumerable:!0,get:function(){return s.ConnectableObservable}});var a=r(2138);Object.defineProperty(t,"observable",{enumerable:!0,get:function(){return a.observable}});var u=r(4190);Object.defineProperty(t,"animationFrames",{enumerable:!0,get:function(){return u.animationFrames}});var c=r(9520);Object.defineProperty(t,"Subject",{enumerable:!0,get:function(){return c.Subject}});var l=r(8042);Object.defineProperty(t,"BehaviorSubject",{enumerable:!0,get:function(){return l.BehaviorSubject}});var f=r(216);Object.defineProperty(t,"ReplaySubject",{enumerable:!0,get:function(){return f.ReplaySubject}});var p=r(7257);Object.defineProperty(t,"AsyncSubject",{enumerable:!0,get:function(){return p.AsyncSubject}});var d=r(4502);Object.defineProperty(t,"asap",{enumerable:!0,get:function(){return d.asap}}),Object.defineProperty(t,"asapScheduler",{enumerable:!0,get:function(){return d.asapScheduler}});var h=r(4617);Object.defineProperty(t,"async",{enumerable:!0,get:function(){return h.async}}),Object.defineProperty(t,"asyncScheduler",{enumerable:!0,get:function(){return h.asyncScheduler}});var y=r(8344);Object.defineProperty(t,"queue",{enumerable:!0,get:function(){return y.queue}}),Object.defineProperty(t,"queueScheduler",{enumerable:!0,get:function(){return y.queueScheduler}});var v=r(6192);Object.defineProperty(t,"animationFrame",{enumerable:!0,get:function(){return v.animationFrame}}),Object.defineProperty(t,"animationFrameScheduler",{enumerable:!0,get:function(){return v.animationFrameScheduler}});var m=r(8847);Object.defineProperty(t,"VirtualTimeScheduler",{enumerable:!0,get:function(){return m.VirtualTimeScheduler}}),Object.defineProperty(t,"VirtualAction",{enumerable:!0,get:function(){return m.VirtualAction}});var b=r(3980);Object.defineProperty(t,"Scheduler",{enumerable:!0,get:function(){return b.Scheduler}});var g=r(7215);Object.defineProperty(t,"Subscription",{enumerable:!0,get:function(){return g.Subscription}});var _=r(1403);Object.defineProperty(t,"Subscriber",{enumerable:!0,get:function(){return _.Subscriber}});var w=r(3868);Object.defineProperty(t,"Notification",{enumerable:!0,get:function(){return w.Notification}}),Object.defineProperty(t,"NotificationKind",{enumerable:!0,get:function(){return w.NotificationKind}});var O=r(5966);Object.defineProperty(t,"pipe",{enumerable:!0,get:function(){return O.pipe}});var S=r(5729);Object.defineProperty(t,"noop",{enumerable:!0,get:function(){return S.noop}});var E=r(9144);Object.defineProperty(t,"identity",{enumerable:!0,get:function(){return E.identity}});var T=r(1211);Object.defineProperty(t,"isObservable",{enumerable:!0,get:function(){return T.isObservable}});var j=r(1263);Object.defineProperty(t,"lastValueFrom",{enumerable:!0,get:function(){return j.lastValueFrom}});var P=r(7447);Object.defineProperty(t,"firstValueFrom",{enumerable:!0,get:function(){return P.firstValueFrom}});var I=r(6809);Object.defineProperty(t,"ArgumentOutOfRangeError",{enumerable:!0,get:function(){return I.ArgumentOutOfRangeError}});var x=r(8032);Object.defineProperty(t,"EmptyError",{enumerable:!0,get:function(){return x.EmptyError}});var A=r(1137);Object.defineProperty(t,"NotFoundError",{enumerable:!0,get:function(){return A.NotFoundError}});var N=r(7392);Object.defineProperty(t,"ObjectUnsubscribedError",{enumerable:!0,get:function(){return N.ObjectUnsubscribedError}});var k=r(6228);Object.defineProperty(t,"SequenceError",{enumerable:!0,get:function(){return k.SequenceError}});var M=r(6279);Object.defineProperty(t,"TimeoutError",{enumerable:!0,get:function(){return M.TimeoutError}});var D=r(5463);Object.defineProperty(t,"UnsubscriptionError",{enumerable:!0,get:function(){return D.UnsubscriptionError}});var R=r(1253);Object.defineProperty(t,"bindCallback",{enumerable:!0,get:function(){return R.bindCallback}});var C=r(1009);Object.defineProperty(t,"bindNodeCallback",{enumerable:!0,get:function(){return C.bindNodeCallback}});var $=r(1047);Object.defineProperty(t,"combineLatest",{enumerable:!0,get:function(){return $.combineLatest}});var F=r(79);Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return F.concat}});var q=r(1663);Object.defineProperty(t,"connectable",{enumerable:!0,get:function(){return q.connectable}});var L=r(5401);Object.defineProperty(t,"defer",{enumerable:!0,get:function(){return L.defer}});var B=r(1727);Object.defineProperty(t,"empty",{enumerable:!0,get:function(){return B.empty}});var U=r(1723);Object.defineProperty(t,"forkJoin",{enumerable:!0,get:function(){return U.forkJoin}});var V=r(6216);Object.defineProperty(t,"from",{enumerable:!0,get:function(){return V.from}});var z=r(6767);Object.defineProperty(t,"fromEvent",{enumerable:!0,get:function(){return z.fromEvent}});var Q=r(4366);Object.defineProperty(t,"fromEventPattern",{enumerable:!0,get:function(){return Q.fromEventPattern}});var Y=r(6103);Object.defineProperty(t,"generate",{enumerable:!0,get:function(){return Y.generate}});var W=r(4468);Object.defineProperty(t,"iif",{enumerable:!0,get:function(){return W.iif}});var H=r(4449);Object.defineProperty(t,"interval",{enumerable:!0,get:function(){return H.interval}});var K=r(5847);Object.defineProperty(t,"merge",{enumerable:!0,get:function(){return K.merge}});var G=r(7423);Object.defineProperty(t,"never",{enumerable:!0,get:function(){return G.never}});var J=r(7443);Object.defineProperty(t,"of",{enumerable:!0,get:function(){return J.of}});var Z=r(1282);Object.defineProperty(t,"onErrorResumeNext",{enumerable:!0,get:function(){return Z.onErrorResumeNext}});var X=r(5259);Object.defineProperty(t,"pairs",{enumerable:!0,get:function(){return X.pairs}});var ee=r(1945);Object.defineProperty(t,"partition",{enumerable:!0,get:function(){return ee.partition}});var te=r(7779);Object.defineProperty(t,"race",{enumerable:!0,get:function(){return te.race}});var re=r(6971);Object.defineProperty(t,"range",{enumerable:!0,get:function(){return re.range}});var ne=r(859);Object.defineProperty(t,"throwError",{enumerable:!0,get:function(){return ne.throwError}});var ie=r(5710);Object.defineProperty(t,"timer",{enumerable:!0,get:function(){return ie.timer}});var oe=r(3687);Object.defineProperty(t,"using",{enumerable:!0,get:function(){return oe.using}});var se=r(2042);Object.defineProperty(t,"zip",{enumerable:!0,get:function(){return se.zip}});var ae=r(3200);Object.defineProperty(t,"scheduled",{enumerable:!0,get:function(){return ae.scheduled}});var ue=r(1727);Object.defineProperty(t,"EMPTY",{enumerable:!0,get:function(){return ue.EMPTY}});var ce=r(7423);Object.defineProperty(t,"NEVER",{enumerable:!0,get:function(){return ce.NEVER}}),i(r(9251),t);var le=r(3782);Object.defineProperty(t,"config",{enumerable:!0,get:function(){return le.config}});var fe=r(3533);Object.defineProperty(t,"audit",{enumerable:!0,get:function(){return fe.audit}});var pe=r(5188);Object.defineProperty(t,"auditTime",{enumerable:!0,get:function(){return pe.auditTime}});var de=r(4514);Object.defineProperty(t,"buffer",{enumerable:!0,get:function(){return de.buffer}});var he=r(2537);Object.defineProperty(t,"bufferCount",{enumerable:!0,get:function(){return he.bufferCount}});var ye=r(8720);Object.defineProperty(t,"bufferTime",{enumerable:!0,get:function(){return ye.bufferTime}});var ve=r(7932);Object.defineProperty(t,"bufferToggle",{enumerable:!0,get:function(){return ve.bufferToggle}});var me=r(1445);Object.defineProperty(t,"bufferWhen",{enumerable:!0,get:function(){return me.bufferWhen}});var be=r(4418);Object.defineProperty(t,"catchError",{enumerable:!0,get:function(){return be.catchError}});var ge=r(4163);Object.defineProperty(t,"combineAll",{enumerable:!0,get:function(){return ge.combineAll}});var _e=r(9893);Object.defineProperty(t,"combineLatestAll",{enumerable:!0,get:function(){return _e.combineLatestAll}});var we=r(7230);Object.defineProperty(t,"combineLatestWith",{enumerable:!0,get:function(){return we.combineLatestWith}});var Oe=r(4554);Object.defineProperty(t,"concatAll",{enumerable:!0,get:function(){return Oe.concatAll}});var Se=r(1048);Object.defineProperty(t,"concatMap",{enumerable:!0,get:function(){return Se.concatMap}});var Ee=r(381);Object.defineProperty(t,"concatMapTo",{enumerable:!0,get:function(){return Ee.concatMapTo}});var Te=r(4724);Object.defineProperty(t,"concatWith",{enumerable:!0,get:function(){return Te.concatWith}});var je=r(4347);Object.defineProperty(t,"connect",{enumerable:!0,get:function(){return je.connect}});var Pe=r(6944);Object.defineProperty(t,"count",{enumerable:!0,get:function(){return Pe.count}});var Ie=r(440);Object.defineProperty(t,"debounce",{enumerable:!0,get:function(){return Ie.debounce}});var xe=r(8157);Object.defineProperty(t,"debounceTime",{enumerable:!0,get:function(){return xe.debounceTime}});var Ae=r(1714);Object.defineProperty(t,"defaultIfEmpty",{enumerable:!0,get:function(){return Ae.defaultIfEmpty}});var Ne=r(1030);Object.defineProperty(t,"delay",{enumerable:!0,get:function(){return Ne.delay}});var ke=r(6405);Object.defineProperty(t,"delayWhen",{enumerable:!0,get:function(){return ke.delayWhen}});var Me=r(9142);Object.defineProperty(t,"dematerialize",{enumerable:!0,get:function(){return Me.dematerialize}});var De=r(2307);Object.defineProperty(t,"distinct",{enumerable:!0,get:function(){return De.distinct}});var Re=r(9131);Object.defineProperty(t,"distinctUntilChanged",{enumerable:!0,get:function(){return Re.distinctUntilChanged}});var Ce=r(6659);Object.defineProperty(t,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return Ce.distinctUntilKeyChanged}});var $e=r(4217);Object.defineProperty(t,"elementAt",{enumerable:!0,get:function(){return $e.elementAt}});var Fe=r(4707);Object.defineProperty(t,"endWith",{enumerable:!0,get:function(){return Fe.endWith}});var qe=r(9276);Object.defineProperty(t,"every",{enumerable:!0,get:function(){return qe.every}});var Le=r(337);Object.defineProperty(t,"exhaust",{enumerable:!0,get:function(){return Le.exhaust}});var Be=r(3977);Object.defineProperty(t,"exhaustAll",{enumerable:!0,get:function(){return Be.exhaustAll}});var Ue=r(368);Object.defineProperty(t,"exhaustMap",{enumerable:!0,get:function(){return Ue.exhaustMap}});var Ve=r(7829);Object.defineProperty(t,"expand",{enumerable:!0,get:function(){return Ve.expand}});var ze=r(2763);Object.defineProperty(t,"filter",{enumerable:!0,get:function(){return ze.filter}});var Qe=r(4106);Object.defineProperty(t,"finalize",{enumerable:!0,get:function(){return Qe.finalize}});var Ye=r(8759);Object.defineProperty(t,"find",{enumerable:!0,get:function(){return Ye.find}});var We=r(3999);Object.defineProperty(t,"findIndex",{enumerable:!0,get:function(){return We.findIndex}});var He=r(5194);Object.defineProperty(t,"first",{enumerable:!0,get:function(){return He.first}});var Ke=r(1664);Object.defineProperty(t,"groupBy",{enumerable:!0,get:function(){return Ke.groupBy}});var Ge=r(3470);Object.defineProperty(t,"ignoreElements",{enumerable:!0,get:function(){return Ge.ignoreElements}});var Je=r(9549);Object.defineProperty(t,"isEmpty",{enumerable:!0,get:function(){return Je.isEmpty}});var Ze=r(9582);Object.defineProperty(t,"last",{enumerable:!0,get:function(){return Ze.last}});var Xe=r(4338);Object.defineProperty(t,"map",{enumerable:!0,get:function(){return Xe.map}});var et=r(4791);Object.defineProperty(t,"mapTo",{enumerable:!0,get:function(){return et.mapTo}});var tt=r(9318);Object.defineProperty(t,"materialize",{enumerable:!0,get:function(){return tt.materialize}});var rt=r(7446);Object.defineProperty(t,"max",{enumerable:!0,get:function(){return rt.max}});var nt=r(4594);Object.defineProperty(t,"mergeAll",{enumerable:!0,get:function(){return nt.mergeAll}});var it=r(2735);Object.defineProperty(t,"flatMap",{enumerable:!0,get:function(){return it.flatMap}});var ot=r(9010);Object.defineProperty(t,"mergeMap",{enumerable:!0,get:function(){return ot.mergeMap}});var st=r(8983);Object.defineProperty(t,"mergeMapTo",{enumerable:!0,get:function(){return st.mergeMapTo}});var at=r(2170);Object.defineProperty(t,"mergeScan",{enumerable:!0,get:function(){return at.mergeScan}});var ut=r(3674);Object.defineProperty(t,"mergeWith",{enumerable:!0,get:function(){return ut.mergeWith}});var ct=r(1446);Object.defineProperty(t,"min",{enumerable:!0,get:function(){return ct.min}});var lt=r(2318);Object.defineProperty(t,"multicast",{enumerable:!0,get:function(){return lt.multicast}});var ft=r(3165);Object.defineProperty(t,"observeOn",{enumerable:!0,get:function(){return ft.observeOn}});var pt=r(402);Object.defineProperty(t,"pairwise",{enumerable:!0,get:function(){return pt.pairwise}});var dt=r(5658);Object.defineProperty(t,"pluck",{enumerable:!0,get:function(){return dt.pluck}});var ht=r(3881);Object.defineProperty(t,"publish",{enumerable:!0,get:function(){return ht.publish}});var yt=r(1755);Object.defineProperty(t,"publishBehavior",{enumerable:!0,get:function(){return yt.publishBehavior}});var vt=r(9801);Object.defineProperty(t,"publishLast",{enumerable:!0,get:function(){return vt.publishLast}});var mt=r(5021);Object.defineProperty(t,"publishReplay",{enumerable:!0,get:function(){return mt.publishReplay}});var bt=r(9925);Object.defineProperty(t,"raceWith",{enumerable:!0,get:function(){return bt.raceWith}});var gt=r(1678);Object.defineProperty(t,"reduce",{enumerable:!0,get:function(){return gt.reduce}});var _t=r(1194);Object.defineProperty(t,"repeat",{enumerable:!0,get:function(){return _t.repeat}});var wt=r(7085);Object.defineProperty(t,"repeatWhen",{enumerable:!0,get:function(){return wt.repeatWhen}});var Ot=r(7524);Object.defineProperty(t,"retry",{enumerable:!0,get:function(){return Ot.retry}});var St=r(548);Object.defineProperty(t,"retryWhen",{enumerable:!0,get:function(){return St.retryWhen}});var Et=r(2711);Object.defineProperty(t,"refCount",{enumerable:!0,get:function(){return Et.refCount}});var Tt=r(6577);Object.defineProperty(t,"sample",{enumerable:!0,get:function(){return Tt.sample}});var jt=r(3815);Object.defineProperty(t,"sampleTime",{enumerable:!0,get:function(){return jt.sampleTime}});var Pt=r(7250);Object.defineProperty(t,"scan",{enumerable:!0,get:function(){return Pt.scan}});var It=r(842);Object.defineProperty(t,"sequenceEqual",{enumerable:!0,get:function(){return It.sequenceEqual}});var xt=r(9728);Object.defineProperty(t,"share",{enumerable:!0,get:function(){return xt.share}});var At=r(7768);Object.defineProperty(t,"shareReplay",{enumerable:!0,get:function(){return At.shareReplay}});var Nt=r(2445);Object.defineProperty(t,"single",{enumerable:!0,get:function(){return Nt.single}});var kt=r(6262);Object.defineProperty(t,"skip",{enumerable:!0,get:function(){return kt.skip}});var Mt=r(7397);Object.defineProperty(t,"skipLast",{enumerable:!0,get:function(){return Mt.skipLast}});var Dt=r(9900);Object.defineProperty(t,"skipUntil",{enumerable:!0,get:function(){return Dt.skipUntil}});var Rt=r(1620);Object.defineProperty(t,"skipWhile",{enumerable:!0,get:function(){return Rt.skipWhile}});var Ct=r(3424);Object.defineProperty(t,"startWith",{enumerable:!0,get:function(){return Ct.startWith}});var $t=r(831);Object.defineProperty(t,"subscribeOn",{enumerable:!0,get:function(){return $t.subscribeOn}});var Ft=r(411);Object.defineProperty(t,"switchAll",{enumerable:!0,get:function(){return Ft.switchAll}});var qt=r(7222);Object.defineProperty(t,"switchMap",{enumerable:!0,get:function(){return qt.switchMap}});var Lt=r(6464);Object.defineProperty(t,"switchMapTo",{enumerable:!0,get:function(){return Lt.switchMapTo}});var Bt=r(4434);Object.defineProperty(t,"switchScan",{enumerable:!0,get:function(){return Bt.switchScan}});var Ut=r(7138);Object.defineProperty(t,"take",{enumerable:!0,get:function(){return Ut.take}});var Vt=r(4288);Object.defineProperty(t,"takeLast",{enumerable:!0,get:function(){return Vt.takeLast}});var zt=r(7341);Object.defineProperty(t,"takeUntil",{enumerable:!0,get:function(){return zt.takeUntil}});var Qt=r(653);Object.defineProperty(t,"takeWhile",{enumerable:!0,get:function(){return Qt.takeWhile}});var Yt=r(8668);Object.defineProperty(t,"tap",{enumerable:!0,get:function(){return Yt.tap}});var Wt=r(9466);Object.defineProperty(t,"throttle",{enumerable:!0,get:function(){return Wt.throttle}});var Ht=r(9705);Object.defineProperty(t,"throttleTime",{enumerable:!0,get:function(){return Ht.throttleTime}});var Kt=r(8062);Object.defineProperty(t,"throwIfEmpty",{enumerable:!0,get:function(){return Kt.throwIfEmpty}});var Gt=r(6610);Object.defineProperty(t,"timeInterval",{enumerable:!0,get:function(){return Gt.timeInterval}});var Jt=r(6279);Object.defineProperty(t,"timeout",{enumerable:!0,get:function(){return Jt.timeout}});var Zt=r(8132);Object.defineProperty(t,"timeoutWith",{enumerable:!0,get:function(){return Zt.timeoutWith}});var Xt=r(4553);Object.defineProperty(t,"timestamp",{enumerable:!0,get:function(){return Xt.timestamp}});var er=r(2378);Object.defineProperty(t,"toArray",{enumerable:!0,get:function(){return er.toArray}});var tr=r(4768);Object.defineProperty(t,"window",{enumerable:!0,get:function(){return tr.window}});var rr=r(131);Object.defineProperty(t,"windowCount",{enumerable:!0,get:function(){return rr.windowCount}});var nr=r(9579);Object.defineProperty(t,"windowTime",{enumerable:!0,get:function(){return nr.windowTime}});var ir=r(752);Object.defineProperty(t,"windowToggle",{enumerable:!0,get:function(){return ir.windowToggle}});var or=r(582);Object.defineProperty(t,"windowWhen",{enumerable:!0,get:function(){return or.windowWhen}});var sr=r(4255);Object.defineProperty(t,"withLatestFrom",{enumerable:!0,get:function(){return sr.withLatestFrom}});var ar=r(7220);Object.defineProperty(t,"zipAll",{enumerable:!0,get:function(){return ar.zipAll}});var ur=r(9287);Object.defineProperty(t,"zipWith",{enumerable:!0,get:function(){return ur.zipWith}})},7257:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=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])},n(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}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncSubject=void 0;var o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._value=null,t._hasValue=!1,t._isComplete=!1,t}return i(t,e),t.prototype._checkFinalizedStatuses=function(e){var t=this,r=t.hasError,n=t._hasValue,i=t._value,o=t.thrownError,s=t.isStopped,a=t._isComplete;r?e.error(o):(s||a)&&(n&&e.next(i),e.complete())},t.prototype.next=function(e){this.isStopped||(this._value=e,this._hasValue=!0)},t.prototype.complete=function(){var t=this,r=t._hasValue,n=t._value;t._isComplete||(this._isComplete=!0,r&&e.prototype.next.call(this,n),e.prototype.complete.call(this))},t}(r(9520).Subject);t.AsyncSubject=o},8042:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=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])},n(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}n(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;var o=function(e){function t(t){var r=e.call(this)||this;return r._value=t,r}return i(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(t){var r=e.prototype._subscribe.call(this,t);return!r.closed&&t.next(this._value),r},t.prototype.getValue=function(){var e=this,t=e.hasError,r=e.thrownError,n=e._value;if(t)throw r;return this._throwIfClosed(),n},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(r(9520).Subject);t.BehaviorSubject=o},3868:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.observeNotification=t.Notification=t.NotificationKind=void 0;var n,i=r(1727),o=r(7443),s=r(859),a=r(4432);(n=t.NotificationKind||(t.NotificationKind={})).NEXT="N",n.ERROR="E",n.COMPLETE="C";var u=function(){function e(e,t,r){this.kind=e,this.value=t,this.error=r,this.hasValue="N"===e}return e.prototype.observe=function(e){return c(this,e)},e.prototype.do=function(e,t,r){var n=this,i=n.kind,o=n.value,s=n.error;return"N"===i?null==e?void 0:e(o):"E"===i?null==t?void 0:t(s):null==r?void 0:r()},e.prototype.accept=function(e,t,r){var n;return a.isFunction(null===(n=e)||void 0===n?void 0:n.next)?this.observe(e):this.do(e,t,r)},e.prototype.toObservable=function(){var e=this,t=e.kind,r=e.value,n=e.error,a="N"===t?o.of(r):"E"===t?s.throwError((function(){return n})):"C"===t?i.EMPTY:0;if(!a)throw new TypeError("Unexpected notification kind "+t);return a},e.createNext=function(t){return new e("N",t)},e.createError=function(t){return new e("E",void 0,t)},e.createComplete=function(){return e.completeNotification},e.completeNotification=new e("C"),e}();function c(e,t){var r,n,i,o=e,s=o.kind,a=o.value,u=o.error;if("string"!=typeof s)throw new TypeError('Invalid notification, missing "kind"');"N"===s?null===(r=t.next)||void 0===r||r.call(t,a):"E"===s?null===(n=t.error)||void 0===n||n.call(t,u):null===(i=t.complete)||void 0===i||i.call(t)}t.Notification=u,t.observeNotification=c},3380:(e,t)=>{"use strict";function r(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=r("C",void 0,void 0),t.errorNotification=function(e){return r("E",void 0,e)},t.nextNotification=function(e){return r("N",e,void 0)},t.createNotification=r},5271:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Observable=void 0;var n=r(1403),i=r(7215),o=r(2138),s=r(5966),a=r(3782),u=r(4432),c=r(4770),l=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(e,t,r){var o,s=this,a=(o=e)&&o instanceof n.Subscriber||function(e){return e&&u.isFunction(e.next)&&u.isFunction(e.error)&&u.isFunction(e.complete)}(o)&&i.isSubscription(o)?e:new n.SafeSubscriber(e,t,r);return c.errorContext((function(){var e=s,t=e.operator,r=e.source;a.add(t?t.call(a,r):r?s._subscribe(a):s._trySubscribe(a))})),a},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var r=this;return new(t=f(t))((function(t,i){var o=new n.SafeSubscriber({next:function(t){try{e(t)}catch(e){i(e),o.unsubscribe()}},error:i,complete:t});r.subscribe(o)}))},e.prototype._subscribe=function(e){var t;return null===(t=this.source)||void 0===t?void 0:t.subscribe(e)},e.prototype[o.observable]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return s.pipeFromArray(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=f(e))((function(e,r){var n;t.subscribe((function(e){return n=e}),(function(e){return r(e)}),(function(){return e(n)}))}))},e.create=function(t){return new e(t)},e}();function f(e){var t;return null!==(t=null!=e?e:a.config.Promise)&&void 0!==t?t:Promise}t.Observable=l},216:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=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])},n(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}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.ReplaySubject=void 0;var o=r(9520),s=r(1713),a=function(e){function t(t,r,n){void 0===t&&(t=1/0),void 0===r&&(r=1/0),void 0===n&&(n=s.dateTimestampProvider);var i=e.call(this)||this;return i._bufferSize=t,i._windowTime=r,i._timestampProvider=n,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=r===1/0,i._bufferSize=Math.max(1,t),i._windowTime=Math.max(1,r),i}return i(t,e),t.prototype.next=function(t){var r=this,n=r.isStopped,i=r._buffer,o=r._infiniteTimeWindow,s=r._timestampProvider,a=r._windowTime;n||(i.push(t),!o&&i.push(s.now()+a)),this._trimBuffer(),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),r=this._infiniteTimeWindow,n=this._buffer.slice(),i=0;i<n.length&&!e.closed;i+=r?1:2)e.next(n[i]);return this._checkFinalizedStatuses(e),t},t.prototype._trimBuffer=function(){var e=this,t=e._bufferSize,r=e._timestampProvider,n=e._buffer,i=e._infiniteTimeWindow,o=(i?1:2)*t;if(t<1/0&&o<n.length&&n.splice(0,n.length-o),!i){for(var s=r.now(),a=0,u=1;u<n.length&&n[u]<=s;u+=2)a=u;a&&n.splice(0,a+1)}},t}(o.Subject);t.ReplaySubject=a},3980:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Scheduler=void 0;var n=r(1713),i=function(){function e(t,r){void 0===r&&(r=e.now),this.schedulerActionCtor=t,this.now=r}return e.prototype.schedule=function(e,t,r){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(r,t)},e.now=n.dateTimestampProvider.now,e}();t.Scheduler=i},9520:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=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])},n(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}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=this&&this.__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 e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.AnonymousSubject=t.Subject=void 0;var s=r(5271),a=r(7215),u=r(7392),c=r(2447),l=r(4770),f=function(e){function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return i(t,e),t.prototype.lift=function(e){var t=new p(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new u.ObjectUnsubscribedError},t.prototype.next=function(e){var t=this;l.errorContext((function(){var r,n;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var i=o(t.currentObservers),s=i.next();!s.done;s=i.next())s.value.next(e)}catch(e){r={error:e}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}}}))},t.prototype.error=function(e){var t=this;l.errorContext((function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var r=t.observers;r.length;)r.shift().error(e)}}))},t.prototype.complete=function(){var e=this;l.errorContext((function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}}))},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return(null===(e=this.observers)||void 0===e?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,r=this,n=r.hasError,i=r.isStopped,o=r.observers;return n||i?a.EMPTY_SUBSCRIPTION:(this.currentObservers=null,o.push(e),new a.Subscription((function(){t.currentObservers=null,c.arrRemove(o,e)})))},t.prototype._checkFinalizedStatuses=function(e){var t=this,r=t.hasError,n=t.thrownError,i=t.isStopped;r?e.error(n):i&&e.complete()},t.prototype.asObservable=function(){var e=new s.Observable;return e.source=this,e},t.create=function(e,t){return new p(e,t)},t}(s.Observable);t.Subject=f;var p=function(e){function t(t,r){var n=e.call(this)||this;return n.destination=t,n.source=r,n}return i(t,e),t.prototype.next=function(e){var t,r;null===(r=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===r||r.call(t,e)},t.prototype.error=function(e){var t,r;null===(r=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===r||r.call(t,e)},t.prototype.complete=function(){var e,t;null===(t=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===t||t.call(e)},t.prototype._subscribe=function(e){var t,r;return null!==(r=null===(t=this.source)||void 0===t?void 0:t.subscribe(e))&&void 0!==r?r:a.EMPTY_SUBSCRIPTION},t}(f);t.AnonymousSubject=p},1403:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=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])},n(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}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.EMPTY_OBSERVER=t.SafeSubscriber=t.Subscriber=void 0;var o=r(4432),s=r(7215),a=r(3782),u=r(7234),c=r(5729),l=r(3380),f=r(8972),p=r(4770),d=function(e){function r(r){var n=e.call(this)||this;return n.isStopped=!1,r?(n.destination=r,s.isSubscription(r)&&r.add(n)):n.destination=t.EMPTY_OBSERVER,n}return i(r,e),r.create=function(e,t,r){return new m(e,t,r)},r.prototype.next=function(e){this.isStopped?g(l.nextNotification(e),this):this._next(e)},r.prototype.error=function(e){this.isStopped?g(l.errorNotification(e),this):(this.isStopped=!0,this._error(e))},r.prototype.complete=function(){this.isStopped?g(l.COMPLETE_NOTIFICATION,this):(this.isStopped=!0,this._complete())},r.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},r.prototype._next=function(e){this.destination.next(e)},r.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},r.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},r}(s.Subscription);t.Subscriber=d;var h=Function.prototype.bind;function y(e,t){return h.call(e,t)}var v=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){b(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){b(e)}else b(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){b(e)}},e}(),m=function(e){function t(t,r,n){var i,s,u=e.call(this)||this;return o.isFunction(t)||!t?i={next:null!=t?t:void 0,error:null!=r?r:void 0,complete:null!=n?n:void 0}:u&&a.config.useDeprecatedNextContext?((s=Object.create(t)).unsubscribe=function(){return u.unsubscribe()},i={next:t.next&&y(t.next,s),error:t.error&&y(t.error,s),complete:t.complete&&y(t.complete,s)}):i=t,u.destination=new v(i),u}return i(t,e),t}(d);function b(e){a.config.useDeprecatedSynchronousErrorHandling?p.captureError(e):u.reportUnhandledError(e)}function g(e,t){var r=a.config.onStoppedNotification;r&&f.timeoutProvider.setTimeout((function(){return r(e,t)}))}t.SafeSubscriber=m,t.EMPTY_OBSERVER={closed:!0,next:c.noop,error:function(e){throw e},complete:c.noop}},7215:function(e,t,r){"use strict";var n=this&&this.__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 e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},i=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},o=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.isSubscription=t.EMPTY_SUBSCRIPTION=t.Subscription=void 0;var s=r(4432),a=r(5463),u=r(2447),c=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}var t;return e.prototype.unsubscribe=function(){var e,t,r,u,c;if(!this.closed){this.closed=!0;var f=this._parentage;if(f)if(this._parentage=null,Array.isArray(f))try{for(var p=n(f),d=p.next();!d.done;d=p.next())d.value.remove(this)}catch(t){e={error:t}}finally{try{d&&!d.done&&(t=p.return)&&t.call(p)}finally{if(e)throw e.error}}else f.remove(this);var h=this.initialTeardown;if(s.isFunction(h))try{h()}catch(e){c=e instanceof a.UnsubscriptionError?e.errors:[e]}var y=this._finalizers;if(y){this._finalizers=null;try{for(var v=n(y),m=v.next();!m.done;m=v.next()){var b=m.value;try{l(b)}catch(e){c=null!=c?c:[],e instanceof a.UnsubscriptionError?c=o(o([],i(c)),i(e.errors)):c.push(e)}}}catch(e){r={error:e}}finally{try{m&&!m.done&&(u=v.return)&&u.call(v)}finally{if(r)throw r.error}}}if(c)throw new a.UnsubscriptionError(c)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)l(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(r=this._finalizers)&&void 0!==r?r:[]).push(t)}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&u.arrRemove(t,e)},e.prototype.remove=function(t){var r=this._finalizers;r&&u.arrRemove(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=((t=new e).closed=!0,t),e}();function l(e){s.isFunction(e)?e():e.unsubscribe()}t.Subscription=c,t.EMPTY_SUBSCRIPTION=c.EMPTY,t.isSubscription=function(e){return e instanceof c||e&&"closed"in e&&s.isFunction(e.remove)&&s.isFunction(e.add)&&s.isFunction(e.unsubscribe)}},3782:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.config=void 0,t.config={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1}},7447:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.firstValueFrom=void 0;var n=r(8032),i=r(1403);t.firstValueFrom=function(e,t){var r="object"==typeof t;return new Promise((function(o,s){var a=new i.SafeSubscriber({next:function(e){o(e),a.unsubscribe()},error:s,complete:function(){r?o(t.defaultValue):s(new n.EmptyError)}});e.subscribe(a)}))}},1263:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.lastValueFrom=void 0;var n=r(8032);t.lastValueFrom=function(e,t){var r="object"==typeof t;return new Promise((function(i,o){var s,a=!1;e.subscribe({next:function(e){s=e,a=!0},error:o,complete:function(){a?i(s):r?i(t.defaultValue):o(new n.EmptyError)}})}))}},3739:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=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])},n(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}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectableObservable=void 0;var o=r(5271),s=r(7215),a=r(2711),u=r(5079),c=r(4024),l=function(e){function t(t,r){var n=e.call(this)||this;return n.source=t,n.subjectFactory=r,n._subject=null,n._refCount=0,n._connection=null,c.hasLift(t)&&(n.lift=t.lift),n}return i(t,e),t.prototype._subscribe=function(e){return this.getSubject().subscribe(e)},t.prototype.getSubject=function(){var e=this._subject;return e&&!e.isStopped||(this._subject=this.subjectFactory()),this._subject},t.prototype._teardown=function(){this._refCount=0;var e=this._connection;this._subject=this._connection=null,null==e||e.unsubscribe()},t.prototype.connect=function(){var e=this,t=this._connection;if(!t){t=this._connection=new s.Subscription;var r=this.getSubject();t.add(this.source.subscribe(u.createOperatorSubscriber(r,void 0,(function(){e._teardown(),r.complete()}),(function(t){e._teardown(),r.error(t)}),(function(){return e._teardown()})))),t.closed&&(this._connection=null,t=s.Subscription.EMPTY)}return t},t.prototype.refCount=function(){return a.refCount()(this)},t}(o.Observable);t.ConnectableObservable=l},1253:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bindCallback=void 0;var n=r(6414);t.bindCallback=function(e,t,r){return n.bindCallbackInternals(!1,e,t,r)}},6414:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.bindCallbackInternals=void 0;var o=r(6551),s=r(5271),a=r(831),u=r(4666),c=r(3165),l=r(7257);t.bindCallbackInternals=function e(t,r,f,p){if(f){if(!o.isScheduler(f))return function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return e(t,r,p).apply(this,n).pipe(u.mapOneOrManyArgs(f))};p=f}return p?function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return e(t,r).apply(this,n).pipe(a.subscribeOn(p),c.observeOn(p))}:function(){for(var e=this,o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];var u=new l.AsyncSubject,c=!0;return new s.Observable((function(s){var a=u.subscribe(s);if(c){c=!1;var l=!1,f=!1;r.apply(e,i(i([],n(o)),[function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];if(t){var n=e.shift();if(null!=n)return void u.error(n)}u.next(1<e.length?e:e[0]),f=!0,l&&u.complete()}])),f&&u.complete(),l=!0}return a}))}}},1009:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bindNodeCallback=void 0;var n=r(6414);t.bindNodeCallback=function(e,t,r){return n.bindCallbackInternals(!0,e,t,r)}},1047:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.combineLatestInit=t.combineLatest=void 0;var n=r(5271),i=r(4744),o=r(6216),s=r(9144),a=r(4666),u=r(2619),c=r(1589),l=r(5079),f=r(5421);function p(e,t,r){return void 0===r&&(r=s.identity),function(n){d(t,(function(){for(var i=e.length,s=new Array(i),a=i,u=i,c=function(i){d(t,(function(){var c=o.from(e[i],t),f=!1;c.subscribe(l.createOperatorSubscriber(n,(function(e){s[i]=e,f||(f=!0,u--),u||n.next(r(s.slice()))}),(function(){--a||n.complete()})))}),n)},f=0;f<i;f++)c(f)}),n)}}function d(e,t,r){e?f.executeSchedule(r,e,t):t()}t.combineLatest=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=u.popScheduler(e),l=u.popResultSelector(e),f=i.argsArgArrayOrObject(e),d=f.args,h=f.keys;if(0===d.length)return o.from([],r);var y=new n.Observable(p(d,r,h?function(e){return c.createObject(h,e)}:s.identity));return l?y.pipe(a.mapOneOrManyArgs(l)):y},t.combineLatestInit=p},79:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.concat=void 0;var n=r(4554),i=r(2619),o=r(6216);t.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n.concatAll()(o.from(e,i.popScheduler(e)))}},1663:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.connectable=void 0;var n=r(9520),i=r(5271),o=r(5401),s={connector:function(){return new n.Subject},resetOnDisconnect:!0};t.connectable=function(e,t){void 0===t&&(t=s);var r=null,n=t.connector,a=t.resetOnDisconnect,u=void 0===a||a,c=n(),l=new i.Observable((function(e){return c.subscribe(e)}));return l.connect=function(){return r&&!r.closed||(r=o.defer((function(){return e})).subscribe(c),u&&r.add((function(){return c=n()}))),r},l}},5401:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defer=void 0;var n=r(5271),i=r(9451);t.defer=function(e){return new n.Observable((function(t){i.innerFrom(e()).subscribe(t)}))}},4190:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.animationFrames=void 0;var n=r(5271),i=r(1241),o=r(6741);function s(e){return new n.Observable((function(t){var r=e||i.performanceTimestampProvider,n=r.now(),s=0,a=function(){t.closed||(s=o.animationFrameProvider.requestAnimationFrame((function(i){s=0;var o=r.now();t.next({timestamp:e?o:i,elapsed:o-n}),a()})))};return a(),function(){s&&o.animationFrameProvider.cancelAnimationFrame(s)}}))}t.animationFrames=function(e){return e?s(e):a};var a=s()},1727:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.empty=t.EMPTY=void 0;var n=r(5271);t.EMPTY=new n.Observable((function(e){return e.complete()})),t.empty=function(e){return e?function(e){return new n.Observable((function(t){return e.schedule((function(){return t.complete()}))}))}(e):t.EMPTY}},1723:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.forkJoin=void 0;var n=r(5271),i=r(4744),o=r(9451),s=r(2619),a=r(5079),u=r(4666),c=r(1589);t.forkJoin=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=s.popResultSelector(e),l=i.argsArgArrayOrObject(e),f=l.args,p=l.keys,d=new n.Observable((function(e){var t=f.length;if(t)for(var r=new Array(t),n=t,i=t,s=function(t){var s=!1;o.innerFrom(f[t]).subscribe(a.createOperatorSubscriber(e,(function(e){s||(s=!0,i--),r[t]=e}),(function(){return n--}),void 0,(function(){n&&s||(i||e.next(p?c.createObject(p,r):r),e.complete())})))},u=0;u<t;u++)s(u);else e.complete()}));return r?d.pipe(u.mapOneOrManyArgs(r)):d}},6216:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.from=void 0;var n=r(3200),i=r(9451);t.from=function(e,t){return t?n.scheduled(e,t):i.innerFrom(e)}},6767:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s};Object.defineProperty(t,"__esModule",{value:!0}),t.fromEvent=void 0;var i=r(9451),o=r(5271),s=r(9010),a=r(8219),u=r(4432),c=r(4666),l=["addListener","removeListener"],f=["addEventListener","removeEventListener"],p=["on","off"];function d(e,t){return function(r){return function(n){return e[r](t,n)}}}t.fromEvent=function e(t,r,h,y){if(u.isFunction(h)&&(y=h,h=void 0),y)return e(t,r,h).pipe(c.mapOneOrManyArgs(y));var v=n(function(e){return u.isFunction(e.addEventListener)&&u.isFunction(e.removeEventListener)}(t)?f.map((function(e){return function(n){return t[e](r,n,h)}})):function(e){return u.isFunction(e.addListener)&&u.isFunction(e.removeListener)}(t)?l.map(d(t,r)):function(e){return u.isFunction(e.on)&&u.isFunction(e.off)}(t)?p.map(d(t,r)):[],2),m=v[0],b=v[1];if(!m&&a.isArrayLike(t))return s.mergeMap((function(t){return e(t,r,h)}))(i.innerFrom(t));if(!m)throw new TypeError("Invalid event target");return new o.Observable((function(e){var t=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.next(1<t.length?t:t[0])};return m(t),function(){return b(t)}}))}},4366:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromEventPattern=void 0;var n=r(5271),i=r(4432),o=r(4666);t.fromEventPattern=function e(t,r,s){return s?e(t,r).pipe(o.mapOneOrManyArgs(s)):new n.Observable((function(e){var n=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.next(1===t.length?t[0]:t)},o=t(n);return i.isFunction(r)?function(){return r(n,o)}:void 0}))}},2160:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromSubscribable=void 0;var n=r(5271);t.fromSubscribable=function(e){return new n.Observable((function(t){return e.subscribe(t)}))}},6103:function(e,t,r){"use strict";var n=this&&this.__generator||function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.generate=void 0;var i=r(9144),o=r(6551),s=r(5401),a=r(8840);t.generate=function(e,t,r,u,c){var l,f,p,d;function h(){var e;return n(this,(function(n){switch(n.label){case 0:e=d,n.label=1;case 1:return t&&!t(e)?[3,4]:[4,p(e)];case 2:n.sent(),n.label=3;case 3:return e=r(e),[3,1];case 4:return[2]}}))}return 1===arguments.length?(d=(l=e).initialState,t=l.condition,r=l.iterate,f=l.resultSelector,p=void 0===f?i.identity:f,c=l.scheduler):(d=e,!u||o.isScheduler(u)?(p=i.identity,c=u):p=u),s.defer(c?function(){return a.scheduleIterable(h(),c)}:h)}},4468:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.iif=void 0;var n=r(5401);t.iif=function(e,t,r){return n.defer((function(){return e()?t:r}))}},9451:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},o=this&&this.__asyncValues||function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e="function"==typeof s?s(e):e[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,i){!function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)}(n,i,(t=e[r](t)).done,t.value)}))}}},s=this&&this.__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 e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.fromReadableStreamLike=t.fromAsyncIterable=t.fromIterable=t.fromPromise=t.fromArrayLike=t.fromInteropObservable=t.innerFrom=void 0;var a=r(8219),u=r(2644),c=r(5271),l=r(3292),f=r(7707),p=r(4883),d=r(6380),h=r(9266),y=r(4432),v=r(7234),m=r(2138);function b(e){return new c.Observable((function(t){var r=e[m.observable]();if(y.isFunction(r.subscribe))return r.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")}))}function g(e){return new c.Observable((function(t){for(var r=0;r<e.length&&!t.closed;r++)t.next(e[r]);t.complete()}))}function _(e){return new c.Observable((function(t){e.then((function(e){t.closed||(t.next(e),t.complete())}),(function(e){return t.error(e)})).then(null,v.reportUnhandledError)}))}function w(e){return new c.Observable((function(t){var r,n;try{for(var i=s(e),o=i.next();!o.done;o=i.next()){var a=o.value;if(t.next(a),t.closed)return}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}t.complete()}))}function O(e){return new c.Observable((function(t){(function(e,t){var r,s,a,u;return n(this,void 0,void 0,(function(){var n,c;return i(this,(function(i){switch(i.label){case 0:i.trys.push([0,5,6,11]),r=o(e),i.label=1;case 1:return[4,r.next()];case 2:if((s=i.sent()).done)return[3,4];if(n=s.value,t.next(n),t.closed)return[2];i.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return c=i.sent(),a={error:c},[3,11];case 6:return i.trys.push([6,,9,10]),s&&!s.done&&(u=r.return)?[4,u.call(r)]:[3,8];case 7:i.sent(),i.label=8;case 8:return[3,10];case 9:if(a)throw a.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}}))}))})(e,t).catch((function(e){return t.error(e)}))}))}function S(e){return O(h.readableStreamLikeToAsyncGenerator(e))}t.innerFrom=function(e){if(e instanceof c.Observable)return e;if(null!=e){if(l.isInteropObservable(e))return b(e);if(a.isArrayLike(e))return g(e);if(u.isPromise(e))return _(e);if(f.isAsyncIterable(e))return O(e);if(d.isIterable(e))return w(e);if(h.isReadableStreamLike(e))return S(e)}throw p.createInvalidObservableTypeError(e)},t.fromInteropObservable=b,t.fromArrayLike=g,t.fromPromise=_,t.fromIterable=w,t.fromAsyncIterable=O,t.fromReadableStreamLike=S},4449:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.interval=void 0;var n=r(4617),i=r(5710);t.interval=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=n.asyncScheduler),e<0&&(e=0),i.timer(e,e,t)}},5847:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.merge=void 0;var n=r(4594),i=r(9451),o=r(1727),s=r(2619),a=r(6216);t.merge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=s.popScheduler(e),u=s.popNumber(e,1/0),c=e;return c.length?1===c.length?i.innerFrom(c[0]):n.mergeAll(u)(a.from(c,r)):o.EMPTY}},7423:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.never=t.NEVER=void 0;var n=r(5271),i=r(5729);t.NEVER=new n.Observable(i.noop),t.never=function(){return t.NEVER}},7443:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.of=void 0;var n=r(2619),i=r(6216);t.of=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=n.popScheduler(e);return i.from(e,r)}},1282:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.onErrorResumeNext=void 0;var n=r(1727),i=r(4764),o=r(4475);t.onErrorResumeNext=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return i.onErrorResumeNext(o.argsOrArgArray(e))(n.EMPTY)}},5259:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pairs=void 0;var n=r(6216);t.pairs=function(e,t){return n.from(Object.entries(e),t)}},1945:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.partition=void 0;var n=r(1574),i=r(2763),o=r(9451);t.partition=function(e,t,r){return[i.filter(t,r)(o.innerFrom(e)),i.filter(n.not(t,r))(o.innerFrom(e))]}},7779:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.raceInit=t.race=void 0;var n=r(5271),i=r(9451),o=r(4475),s=r(5079);function a(e){return function(t){for(var r=[],n=function(n){r.push(i.innerFrom(e[n]).subscribe(s.createOperatorSubscriber(t,(function(e){if(r){for(var i=0;i<r.length;i++)i!==n&&r[i].unsubscribe();r=null}t.next(e)}))))},o=0;r&&!t.closed&&o<e.length;o++)n(o)}}t.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 1===(e=o.argsOrArgArray(e)).length?i.innerFrom(e[0]):new n.Observable(a(e))},t.raceInit=a},6971:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.range=void 0;var n=r(5271),i=r(1727);t.range=function(e,t,r){if(null==t&&(t=e,e=0),t<=0)return i.EMPTY;var o=t+e;return new n.Observable(r?function(t){var n=e;return r.schedule((function(){n<o?(t.next(n++),this.schedule()):t.complete()}))}:function(t){for(var r=e;r<o&&!t.closed;)t.next(r++);t.complete()})}},859:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.throwError=void 0;var n=r(5271),i=r(4432);t.throwError=function(e,t){var r=i.isFunction(e)?e:function(){return e},o=function(e){return e.error(r())};return new n.Observable(t?function(e){return t.schedule(o,0,e)}:o)}},5710:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.timer=void 0;var n=r(5271),i=r(4617),o=r(6551),s=r(7761);t.timer=function(e,t,r){void 0===e&&(e=0),void 0===r&&(r=i.async);var a=-1;return null!=t&&(o.isScheduler(t)?r=t:a=t),new n.Observable((function(t){var n=s.isValidDate(e)?+e-r.now():e;n<0&&(n=0);var i=0;return r.schedule((function(){t.closed||(t.next(i++),0<=a?this.schedule(void 0,a):t.complete())}),n)}))}},3687:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.using=void 0;var n=r(5271),i=r(9451),o=r(1727);t.using=function(e,t){return new n.Observable((function(r){var n=e(),s=t(n);return(s?i.innerFrom(s):o.EMPTY).subscribe(r),function(){n&&n.unsubscribe()}}))}},2042:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.zip=void 0;var o=r(5271),s=r(9451),a=r(4475),u=r(1727),c=r(5079),l=r(2619);t.zip=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=l.popResultSelector(e),f=a.argsOrArgArray(e);return f.length?new o.Observable((function(e){var t=f.map((function(){return[]})),o=f.map((function(){return!1}));e.add((function(){t=o=null}));for(var a=function(a){s.innerFrom(f[a]).subscribe(c.createOperatorSubscriber(e,(function(s){if(t[a].push(s),t.every((function(e){return e.length}))){var u=t.map((function(e){return e.shift()}));e.next(r?r.apply(void 0,i([],n(u))):u),t.some((function(e,t){return!e.length&&o[t]}))&&e.complete()}}),(function(){o[a]=!0,!t[a].length&&e.complete()})))},u=0;!e.closed&&u<f.length;u++)a(u);return function(){t=o=null}})):u.EMPTY}},5079:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=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])},n(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}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.OperatorSubscriber=t.createOperatorSubscriber=void 0;var o=r(1403);t.createOperatorSubscriber=function(e,t,r,n,i){return new s(e,t,r,n,i)};var s=function(e){function t(t,r,n,i,o,s){var a=e.call(this,t)||this;return a.onFinalize=o,a.shouldUnsubscribe=s,a._next=r?function(e){try{r(e)}catch(e){t.error(e)}}:e.prototype._next,a._error=i?function(e){try{i(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,a._complete=n?function(){try{n()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,a}return i(t,e),t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;e.prototype.unsubscribe.call(this),!r&&(null===(t=this.onFinalize)||void 0===t||t.call(this))}},t}(o.Subscriber);t.OperatorSubscriber=s},3533:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.audit=void 0;var n=r(4024),i=r(9451),o=r(5079);t.audit=function(e){return n.operate((function(t,r){var n=!1,s=null,a=null,u=!1,c=function(){if(null==a||a.unsubscribe(),a=null,n){n=!1;var e=s;s=null,r.next(e)}u&&r.complete()},l=function(){a=null,u&&r.complete()};t.subscribe(o.createOperatorSubscriber(r,(function(t){n=!0,s=t,a||i.innerFrom(e(t)).subscribe(a=o.createOperatorSubscriber(r,c,l))}),(function(){u=!0,(!n||!a||a.closed)&&r.complete()})))}))}},5188:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.auditTime=void 0;var n=r(4617),i=r(3533),o=r(5710);t.auditTime=function(e,t){return void 0===t&&(t=n.asyncScheduler),i.audit((function(){return o.timer(e,t)}))}},4514:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.buffer=void 0;var n=r(4024),i=r(5729),o=r(5079);t.buffer=function(e){return n.operate((function(t,r){var n=[];return t.subscribe(o.createOperatorSubscriber(r,(function(e){return n.push(e)}),(function(){r.next(n),r.complete()}))),e.subscribe(o.createOperatorSubscriber(r,(function(){var e=n;n=[],r.next(e)}),i.noop)),function(){n=null}}))}},2537:function(e,t,r){"use strict";var n=this&&this.__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 e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.bufferCount=void 0;var i=r(4024),o=r(5079),s=r(2447);t.bufferCount=function(e,t){return void 0===t&&(t=null),t=null!=t?t:e,i.operate((function(r,i){var a=[],u=0;r.subscribe(o.createOperatorSubscriber(i,(function(r){var o,c,l,f,p=null;u++%t==0&&a.push([]);try{for(var d=n(a),h=d.next();!h.done;h=d.next())(m=h.value).push(r),e<=m.length&&(p=null!=p?p:[]).push(m)}catch(e){o={error:e}}finally{try{h&&!h.done&&(c=d.return)&&c.call(d)}finally{if(o)throw o.error}}if(p)try{for(var y=n(p),v=y.next();!v.done;v=y.next()){var m=v.value;s.arrRemove(a,m),i.next(m)}}catch(e){l={error:e}}finally{try{v&&!v.done&&(f=y.return)&&f.call(y)}finally{if(l)throw l.error}}}),(function(){var e,t;try{for(var r=n(a),o=r.next();!o.done;o=r.next()){var s=o.value;i.next(s)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}i.complete()}),void 0,(function(){a=null})))}))}},8720:function(e,t,r){"use strict";var n=this&&this.__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 e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.bufferTime=void 0;var i=r(7215),o=r(4024),s=r(5079),a=r(2447),u=r(4617),c=r(2619),l=r(5421);t.bufferTime=function(e){for(var t,r,f=[],p=1;p<arguments.length;p++)f[p-1]=arguments[p];var d=null!==(t=c.popScheduler(f))&&void 0!==t?t:u.asyncScheduler,h=null!==(r=f[0])&&void 0!==r?r:null,y=f[1]||1/0;return o.operate((function(t,r){var o=[],u=!1,c=function(e){var t=e.buffer;e.subs.unsubscribe(),a.arrRemove(o,e),r.next(t),u&&f()},f=function(){if(o){var t=new i.Subscription;r.add(t);var n={buffer:[],subs:t};o.push(n),l.executeSchedule(t,d,(function(){return c(n)}),e)}};null!==h&&h>=0?l.executeSchedule(r,d,f,h,!0):u=!0,f();var p=s.createOperatorSubscriber(r,(function(e){var t,r,i=o.slice();try{for(var s=n(i),a=s.next();!a.done;a=s.next()){var u=a.value,l=u.buffer;l.push(e),y<=l.length&&c(u)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}}),(function(){for(;null==o?void 0:o.length;)r.next(o.shift().buffer);null==p||p.unsubscribe(),r.complete(),r.unsubscribe()}),void 0,(function(){return o=null}));t.subscribe(p)}))}},7932:function(e,t,r){"use strict";var n=this&&this.__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 e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.bufferToggle=void 0;var i=r(7215),o=r(4024),s=r(9451),a=r(5079),u=r(5729),c=r(2447);t.bufferToggle=function(e,t){return o.operate((function(r,o){var l=[];s.innerFrom(e).subscribe(a.createOperatorSubscriber(o,(function(e){var r=[];l.push(r);var n=new i.Subscription;n.add(s.innerFrom(t(e)).subscribe(a.createOperatorSubscriber(o,(function(){c.arrRemove(l,r),o.next(r),n.unsubscribe()}),u.noop)))}),u.noop)),r.subscribe(a.createOperatorSubscriber(o,(function(e){var t,r;try{for(var i=n(l),o=i.next();!o.done;o=i.next())o.value.push(e)}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}}),(function(){for(;l.length>0;)o.next(l.shift());o.complete()})))}))}},1445:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bufferWhen=void 0;var n=r(4024),i=r(5729),o=r(5079),s=r(9451);t.bufferWhen=function(e){return n.operate((function(t,r){var n=null,a=null,u=function(){null==a||a.unsubscribe();var t=n;n=[],t&&r.next(t),s.innerFrom(e()).subscribe(a=o.createOperatorSubscriber(r,u,i.noop))};u(),t.subscribe(o.createOperatorSubscriber(r,(function(e){return null==n?void 0:n.push(e)}),(function(){n&&r.next(n),r.complete()}),void 0,(function(){return n=a=null})))}))}},4418:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.catchError=void 0;var n=r(9451),i=r(5079),o=r(4024);t.catchError=function e(t){return o.operate((function(r,o){var s,a=null,u=!1;a=r.subscribe(i.createOperatorSubscriber(o,void 0,void 0,(function(i){s=n.innerFrom(t(i,e(t)(r))),a?(a.unsubscribe(),a=null,s.subscribe(o)):u=!0}))),u&&(a.unsubscribe(),a=null,s.subscribe(o))}))}},4163:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.combineAll=void 0;var n=r(9893);t.combineAll=n.combineLatestAll},8169:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.combineLatest=void 0;var o=r(1047),s=r(4024),a=r(4475),u=r(4666),c=r(5966),l=r(2619);t.combineLatest=function e(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var f=l.popResultSelector(t);return f?c.pipe(e.apply(void 0,i([],n(t))),u.mapOneOrManyArgs(f)):s.operate((function(e,r){o.combineLatestInit(i([e],n(a.argsOrArgArray(t))))(r)}))}},9893:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.combineLatestAll=void 0;var n=r(1047),i=r(7534);t.combineLatestAll=function(e){return i.joinAllInternals(n.combineLatest,e)}},7230:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.combineLatestWith=void 0;var o=r(8169);t.combineLatestWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o.combineLatest.apply(void 0,i([],n(e)))}},4098:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.concat=void 0;var o=r(4024),s=r(4554),a=r(2619),u=r(6216);t.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=a.popScheduler(e);return o.operate((function(t,o){s.concatAll()(u.from(i([t],n(e)),r)).subscribe(o)}))}},4554:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.concatAll=void 0;var n=r(4594);t.concatAll=function(){return n.mergeAll(1)}},1048:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.concatMap=void 0;var n=r(9010),i=r(4432);t.concatMap=function(e,t){return i.isFunction(t)?n.mergeMap(e,t,1):n.mergeMap(e,1)}},381:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.concatMapTo=void 0;var n=r(1048),i=r(4432);t.concatMapTo=function(e,t){return i.isFunction(t)?n.concatMap((function(){return e}),t):n.concatMap((function(){return e}))}},4724:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.concatWith=void 0;var o=r(4098);t.concatWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o.concat.apply(void 0,i([],n(e)))}},4347:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.connect=void 0;var n=r(9520),i=r(9451),o=r(4024),s=r(2160),a={connector:function(){return new n.Subject}};t.connect=function(e,t){void 0===t&&(t=a);var r=t.connector;return o.operate((function(t,n){var o=r();i.innerFrom(e(s.fromSubscribable(o))).subscribe(n),n.add(t.subscribe(o))}))}},6944:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.count=void 0;var n=r(1678);t.count=function(e){return n.reduce((function(t,r,n){return!e||e(r,n)?t+1:t}),0)}},440:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.debounce=void 0;var n=r(4024),i=r(5729),o=r(5079),s=r(9451);t.debounce=function(e){return n.operate((function(t,r){var n=!1,a=null,u=null,c=function(){if(null==u||u.unsubscribe(),u=null,n){n=!1;var e=a;a=null,r.next(e)}};t.subscribe(o.createOperatorSubscriber(r,(function(t){null==u||u.unsubscribe(),n=!0,a=t,u=o.createOperatorSubscriber(r,c,i.noop),s.innerFrom(e(t)).subscribe(u)}),(function(){c(),r.complete()}),void 0,(function(){a=u=null})))}))}},8157:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.debounceTime=void 0;var n=r(4617),i=r(4024),o=r(5079);t.debounceTime=function(e,t){return void 0===t&&(t=n.asyncScheduler),i.operate((function(r,n){var i=null,s=null,a=null,u=function(){if(i){i.unsubscribe(),i=null;var e=s;s=null,n.next(e)}};function c(){var r=a+e,o=t.now();if(o<r)return i=this.schedule(void 0,r-o),void n.add(i);u()}r.subscribe(o.createOperatorSubscriber(n,(function(r){s=r,a=t.now(),i||(i=t.schedule(c,e),n.add(i))}),(function(){u(),n.complete()}),void 0,(function(){s=i=null})))}))}},1714:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultIfEmpty=void 0;var n=r(4024),i=r(5079);t.defaultIfEmpty=function(e){return n.operate((function(t,r){var n=!1;t.subscribe(i.createOperatorSubscriber(r,(function(e){n=!0,r.next(e)}),(function(){n||r.next(e),r.complete()})))}))}},1030:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.delay=void 0;var n=r(4617),i=r(6405),o=r(5710);t.delay=function(e,t){void 0===t&&(t=n.asyncScheduler);var r=o.timer(e,t);return i.delayWhen((function(){return r}))}},6405:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.delayWhen=void 0;var n=r(79),i=r(7138),o=r(3470),s=r(4791),a=r(9010);t.delayWhen=function e(t,r){return r?function(s){return n.concat(r.pipe(i.take(1),o.ignoreElements()),s.pipe(e(t)))}:a.mergeMap((function(e,r){return t(e,r).pipe(i.take(1),s.mapTo(e))}))}},9142:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dematerialize=void 0;var n=r(3868),i=r(4024),o=r(5079);t.dematerialize=function(){return i.operate((function(e,t){e.subscribe(o.createOperatorSubscriber(t,(function(e){return n.observeNotification(e,t)})))}))}},2307:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.distinct=void 0;var n=r(4024),i=r(5079),o=r(5729);t.distinct=function(e,t){return n.operate((function(r,n){var s=new Set;r.subscribe(i.createOperatorSubscriber(n,(function(t){var r=e?e(t):t;s.has(r)||(s.add(r),n.next(t))}))),null==t||t.subscribe(i.createOperatorSubscriber(n,(function(){return s.clear()}),o.noop))}))}},9131:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.distinctUntilChanged=void 0;var n=r(9144),i=r(4024),o=r(5079);function s(e,t){return e===t}t.distinctUntilChanged=function(e,t){return void 0===t&&(t=n.identity),e=null!=e?e:s,i.operate((function(r,n){var i,s=!0;r.subscribe(o.createOperatorSubscriber(n,(function(r){var o=t(r);!s&&e(i,o)||(s=!1,i=o,n.next(r))})))}))}},6659:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.distinctUntilKeyChanged=void 0;var n=r(9131);t.distinctUntilKeyChanged=function(e,t){return n.distinctUntilChanged((function(r,n){return t?t(r[e],n[e]):r[e]===n[e]}))}},4217:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.elementAt=void 0;var n=r(6809),i=r(2763),o=r(8062),s=r(1714),a=r(7138);t.elementAt=function(e,t){if(e<0)throw new n.ArgumentOutOfRangeError;var r=arguments.length>=2;return function(u){return u.pipe(i.filter((function(t,r){return r===e})),a.take(1),r?s.defaultIfEmpty(t):o.throwIfEmpty((function(){return new n.ArgumentOutOfRangeError})))}}},4707:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.endWith=void 0;var o=r(79),s=r(7443);t.endWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return o.concat(t,s.of.apply(void 0,i([],n(e))))}}},9276:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.every=void 0;var n=r(4024),i=r(5079);t.every=function(e,t){return n.operate((function(r,n){var o=0;r.subscribe(i.createOperatorSubscriber(n,(function(i){e.call(t,i,o++,r)||(n.next(!1),n.complete())}),(function(){n.next(!0),n.complete()})))}))}},337:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.exhaust=void 0;var n=r(3977);t.exhaust=n.exhaustAll},3977:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.exhaustAll=void 0;var n=r(368),i=r(9144);t.exhaustAll=function(){return n.exhaustMap(i.identity)}},368:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.exhaustMap=void 0;var n=r(4338),i=r(9451),o=r(4024),s=r(5079);t.exhaustMap=function e(t,r){return r?function(o){return o.pipe(e((function(e,o){return i.innerFrom(t(e,o)).pipe(n.map((function(t,n){return r(e,t,o,n)})))})))}:o.operate((function(e,r){var n=0,o=null,a=!1;e.subscribe(s.createOperatorSubscriber(r,(function(e){o||(o=s.createOperatorSubscriber(r,void 0,(function(){o=null,a&&r.complete()})),i.innerFrom(t(e,n++)).subscribe(o))}),(function(){a=!0,!o&&r.complete()})))}))}},7829:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.expand=void 0;var n=r(4024),i=r(7163);t.expand=function(e,t,r){return void 0===t&&(t=1/0),t=(t||0)<1?1/0:t,n.operate((function(n,o){return i.mergeInternals(n,o,e,t,void 0,!0,r)}))}},2763:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.filter=void 0;var n=r(4024),i=r(5079);t.filter=function(e,t){return n.operate((function(r,n){var o=0;r.subscribe(i.createOperatorSubscriber(n,(function(r){return e.call(t,r,o++)&&n.next(r)})))}))}},4106:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.finalize=void 0;var n=r(4024);t.finalize=function(e){return n.operate((function(t,r){try{t.subscribe(r)}finally{r.add(e)}}))}},8759:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createFind=t.find=void 0;var n=r(4024),i=r(5079);function o(e,t,r){var n="index"===r;return function(r,o){var s=0;r.subscribe(i.createOperatorSubscriber(o,(function(i){var a=s++;e.call(t,i,a,r)&&(o.next(n?a:i),o.complete())}),(function(){o.next(n?-1:void 0),o.complete()})))}}t.find=function(e,t){return n.operate(o(e,t,"value"))},t.createFind=o},3999:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findIndex=void 0;var n=r(4024),i=r(8759);t.findIndex=function(e,t){return n.operate(i.createFind(e,t,"index"))}},5194:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.first=void 0;var n=r(8032),i=r(2763),o=r(7138),s=r(1714),a=r(8062),u=r(9144);t.first=function(e,t){var r=arguments.length>=2;return function(c){return c.pipe(e?i.filter((function(t,r){return e(t,r,c)})):u.identity,o.take(1),r?s.defaultIfEmpty(t):a.throwIfEmpty((function(){return new n.EmptyError})))}}},2735:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.flatMap=void 0;var n=r(9010);t.flatMap=n.mergeMap},1664:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.groupBy=void 0;var n=r(5271),i=r(9451),o=r(9520),s=r(4024),a=r(5079);t.groupBy=function(e,t,r,u){return s.operate((function(s,c){var l;t&&"function"!=typeof t?(r=t.duration,l=t.element,u=t.connector):l=t;var f=new Map,p=function(e){f.forEach(e),e(c)},d=function(e){return p((function(t){return t.error(e)}))},h=0,y=!1,v=new a.OperatorSubscriber(c,(function(t){try{var s=e(t),p=f.get(s);if(!p){f.set(s,p=u?u():new o.Subject);var m=(g=s,_=p,(w=new n.Observable((function(e){h++;var t=_.subscribe(e);return function(){t.unsubscribe(),0==--h&&y&&v.unsubscribe()}}))).key=g,w);if(c.next(m),r){var b=a.createOperatorSubscriber(p,(function(){p.complete(),null==b||b.unsubscribe()}),void 0,void 0,(function(){return f.delete(s)}));v.add(i.innerFrom(r(m)).subscribe(b))}}p.next(l?l(t):t)}catch(e){d(e)}var g,_,w}),(function(){return p((function(e){return e.complete()}))}),d,(function(){return f.clear()}),(function(){return y=!0,0===h}));s.subscribe(v)}))}},3470:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ignoreElements=void 0;var n=r(4024),i=r(5079),o=r(5729);t.ignoreElements=function(){return n.operate((function(e,t){e.subscribe(i.createOperatorSubscriber(t,o.noop))}))}},9549:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmpty=void 0;var n=r(4024),i=r(5079);t.isEmpty=function(){return n.operate((function(e,t){e.subscribe(i.createOperatorSubscriber(t,(function(){t.next(!1),t.complete()}),(function(){t.next(!0),t.complete()})))}))}},7534:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.joinAllInternals=void 0;var n=r(9144),i=r(4666),o=r(5966),s=r(9010),a=r(2378);t.joinAllInternals=function(e,t){return o.pipe(a.toArray(),s.mergeMap((function(t){return e(t)})),t?i.mapOneOrManyArgs(t):n.identity)}},9582:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.last=void 0;var n=r(8032),i=r(2763),o=r(4288),s=r(8062),a=r(1714),u=r(9144);t.last=function(e,t){var r=arguments.length>=2;return function(c){return c.pipe(e?i.filter((function(t,r){return e(t,r,c)})):u.identity,o.takeLast(1),r?a.defaultIfEmpty(t):s.throwIfEmpty((function(){return new n.EmptyError})))}}},4338:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.map=void 0;var n=r(4024),i=r(5079);t.map=function(e,t){return n.operate((function(r,n){var o=0;r.subscribe(i.createOperatorSubscriber(n,(function(r){n.next(e.call(t,r,o++))})))}))}},4791:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mapTo=void 0;var n=r(4338);t.mapTo=function(e){return n.map((function(){return e}))}},9318:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.materialize=void 0;var n=r(3868),i=r(4024),o=r(5079);t.materialize=function(){return i.operate((function(e,t){e.subscribe(o.createOperatorSubscriber(t,(function(e){t.next(n.Notification.createNext(e))}),(function(){t.next(n.Notification.createComplete()),t.complete()}),(function(e){t.next(n.Notification.createError(e)),t.complete()})))}))}},7446:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.max=void 0;var n=r(1678),i=r(4432);t.max=function(e){return n.reduce(i.isFunction(e)?function(t,r){return e(t,r)>0?t:r}:function(e,t){return e>t?e:t})}},6094:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.merge=void 0;var o=r(4024),s=r(4475),a=r(4594),u=r(2619),c=r(6216);t.merge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=u.popScheduler(e),l=u.popNumber(e,1/0);return e=s.argsOrArgArray(e),o.operate((function(t,o){a.mergeAll(l)(c.from(i([t],n(e)),r)).subscribe(o)}))}},4594:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeAll=void 0;var n=r(9010),i=r(9144);t.mergeAll=function(e){return void 0===e&&(e=1/0),n.mergeMap(i.identity,e)}},7163:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeInternals=void 0;var n=r(9451),i=r(5421),o=r(5079);t.mergeInternals=function(e,t,r,s,a,u,c,l){var f=[],p=0,d=0,h=!1,y=function(){!h||f.length||p||t.complete()},v=function(e){return p<s?m(e):f.push(e)},m=function(e){u&&t.next(e),p++;var l=!1;n.innerFrom(r(e,d++)).subscribe(o.createOperatorSubscriber(t,(function(e){null==a||a(e),u?v(e):t.next(e)}),(function(){l=!0}),void 0,(function(){if(l)try{p--;for(var e=function(){var e=f.shift();c?i.executeSchedule(t,c,(function(){return m(e)})):m(e)};f.length&&p<s;)e();y()}catch(e){t.error(e)}})))};return e.subscribe(o.createOperatorSubscriber(t,v,(function(){h=!0,y()}))),function(){null==l||l()}}},9010:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeMap=void 0;var n=r(4338),i=r(9451),o=r(4024),s=r(7163),a=r(4432);t.mergeMap=function e(t,r,u){return void 0===u&&(u=1/0),a.isFunction(r)?e((function(e,o){return n.map((function(t,n){return r(e,t,o,n)}))(i.innerFrom(t(e,o)))}),u):("number"==typeof r&&(u=r),o.operate((function(e,r){return s.mergeInternals(e,r,t,u)})))}},8983:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeMapTo=void 0;var n=r(9010),i=r(4432);t.mergeMapTo=function(e,t,r){return void 0===r&&(r=1/0),i.isFunction(t)?n.mergeMap((function(){return e}),t,r):("number"==typeof t&&(r=t),n.mergeMap((function(){return e}),r))}},2170:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeScan=void 0;var n=r(4024),i=r(7163);t.mergeScan=function(e,t,r){return void 0===r&&(r=1/0),n.operate((function(n,o){var s=t;return i.mergeInternals(n,o,(function(t,r){return e(s,t,r)}),r,(function(e){s=e}),!1,void 0,(function(){return s=null}))}))}},3674:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.mergeWith=void 0;var o=r(6094);t.mergeWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o.merge.apply(void 0,i([],n(e)))}},1446:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.min=void 0;var n=r(1678),i=r(4432);t.min=function(e){return n.reduce(i.isFunction(e)?function(t,r){return e(t,r)<0?t:r}:function(e,t){return e<t?e:t})}},2318:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.multicast=void 0;var n=r(3739),i=r(4432),o=r(4347);t.multicast=function(e,t){var r=i.isFunction(e)?e:function(){return e};return i.isFunction(t)?o.connect(t,{connector:r}):function(e){return new n.ConnectableObservable(e,r)}}},3165:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.observeOn=void 0;var n=r(5421),i=r(4024),o=r(5079);t.observeOn=function(e,t){return void 0===t&&(t=0),i.operate((function(r,i){r.subscribe(o.createOperatorSubscriber(i,(function(r){return n.executeSchedule(i,e,(function(){return i.next(r)}),t)}),(function(){return n.executeSchedule(i,e,(function(){return i.complete()}),t)}),(function(r){return n.executeSchedule(i,e,(function(){return i.error(r)}),t)})))}))}},4764:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.onErrorResumeNext=void 0;var o=r(4024),s=r(9451),a=r(4475),u=r(5079),c=r(5729);t.onErrorResumeNext=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=a.argsOrArgArray(e);return o.operate((function(e,t){var o=i([e],n(r)),a=function(){if(!t.closed)if(o.length>0){var e=void 0;try{e=s.innerFrom(o.shift())}catch(e){return void a()}var r=u.createOperatorSubscriber(t,void 0,c.noop,c.noop);e.subscribe(r),r.add(a)}else t.complete()};a()}))}},402:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pairwise=void 0;var n=r(4024),i=r(5079);t.pairwise=function(){return n.operate((function(e,t){var r,n=!1;e.subscribe(i.createOperatorSubscriber(t,(function(e){var i=r;r=e,n&&t.next([i,e]),n=!0})))}))}},5960:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.partition=void 0;var n=r(1574),i=r(2763);t.partition=function(e,t){return function(r){return[i.filter(e,t)(r),i.filter(n.not(e,t))(r)]}}},5658:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pluck=void 0;var n=r(4338);t.pluck=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e.length;if(0===r)throw new Error("list of properties cannot be empty.");return n.map((function(t){for(var n=t,i=0;i<r;i++){var o=null==n?void 0:n[e[i]];if(void 0===o)return;n=o}return n}))}},3881:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.publish=void 0;var n=r(9520),i=r(2318),o=r(4347);t.publish=function(e){return e?function(t){return o.connect(e)(t)}:function(e){return i.multicast(new n.Subject)(e)}}},1755:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.publishBehavior=void 0;var n=r(8042),i=r(3739);t.publishBehavior=function(e){return function(t){var r=new n.BehaviorSubject(e);return new i.ConnectableObservable(t,(function(){return r}))}}},9801:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.publishLast=void 0;var n=r(7257),i=r(3739);t.publishLast=function(){return function(e){var t=new n.AsyncSubject;return new i.ConnectableObservable(e,(function(){return t}))}}},5021:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.publishReplay=void 0;var n=r(216),i=r(2318),o=r(4432);t.publishReplay=function(e,t,r,s){r&&!o.isFunction(r)&&(s=r);var a=o.isFunction(r)?r:void 0;return function(r){return i.multicast(new n.ReplaySubject(e,t,s),a)(r)}}},2749:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.race=void 0;var o=r(4475),s=r(9925);t.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return s.raceWith.apply(void 0,i([],n(o.argsOrArgArray(e))))}},9925:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.raceWith=void 0;var o=r(7779),s=r(4024),a=r(9144);t.raceWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.length?s.operate((function(t,r){o.raceInit(i([t],n(e)))(r)})):a.identity}},1678:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reduce=void 0;var n=r(2181),i=r(4024);t.reduce=function(e,t){return i.operate(n.scanInternals(e,t,arguments.length>=2,!1,!0))}},2711:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.refCount=void 0;var n=r(4024),i=r(5079);t.refCount=function(){return n.operate((function(e,t){var r=null;e._refCount++;var n=i.createOperatorSubscriber(t,void 0,void 0,void 0,(function(){if(!e||e._refCount<=0||0<--e._refCount)r=null;else{var n=e._connection,i=r;r=null,!n||i&&n!==i||n.unsubscribe(),t.unsubscribe()}}));e.subscribe(n),n.closed||(r=e.connect())}))}},1194:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.repeat=void 0;var n=r(1727),i=r(4024),o=r(5079),s=r(9451),a=r(5710);t.repeat=function(e){var t,r,u=1/0;return null!=e&&("object"==typeof e?(t=e.count,u=void 0===t?1/0:t,r=e.delay):u=e),u<=0?function(){return n.EMPTY}:i.operate((function(e,t){var n,i=0,c=function(){if(null==n||n.unsubscribe(),n=null,null!=r){var e="number"==typeof r?a.timer(r):s.innerFrom(r(i)),u=o.createOperatorSubscriber(t,(function(){u.unsubscribe(),l()}));e.subscribe(u)}else l()},l=function(){var r=!1;n=e.subscribe(o.createOperatorSubscriber(t,void 0,(function(){++i<u?n?c():r=!0:t.complete()}))),r&&c()};l()}))}},7085:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.repeatWhen=void 0;var n=r(9520),i=r(4024),o=r(5079);t.repeatWhen=function(e){return i.operate((function(t,r){var i,s,a=!1,u=!1,c=!1,l=function(){return c&&u&&(r.complete(),!0)},f=function(){c=!1,i=t.subscribe(o.createOperatorSubscriber(r,void 0,(function(){c=!0,!l()&&(s||(s=new n.Subject,e(s).subscribe(o.createOperatorSubscriber(r,(function(){i?f():a=!0}),(function(){u=!0,l()})))),s).next()}))),a&&(i.unsubscribe(),i=null,a=!1,f())};f()}))}},7524:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.retry=void 0;var n=r(4024),i=r(5079),o=r(9144),s=r(5710),a=r(9451);t.retry=function(e){var t;void 0===e&&(e=1/0);var r=(t=e&&"object"==typeof e?e:{count:e}).count,u=void 0===r?1/0:r,c=t.delay,l=t.resetOnSuccess,f=void 0!==l&&l;return u<=0?o.identity:n.operate((function(e,t){var r,n=0,o=function(){var l=!1;r=e.subscribe(i.createOperatorSubscriber(t,(function(e){f&&(n=0),t.next(e)}),void 0,(function(e){if(n++<u){var f=function(){r?(r.unsubscribe(),r=null,o()):l=!0};if(null!=c){var p="number"==typeof c?s.timer(c):a.innerFrom(c(e,n)),d=i.createOperatorSubscriber(t,(function(){d.unsubscribe(),f()}),(function(){t.complete()}));p.subscribe(d)}else f()}else t.error(e)}))),l&&(r.unsubscribe(),r=null,o())};o()}))}},548:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.retryWhen=void 0;var n=r(9520),i=r(4024),o=r(5079);t.retryWhen=function(e){return i.operate((function(t,r){var i,s,a=!1,u=function(){i=t.subscribe(o.createOperatorSubscriber(r,void 0,void 0,(function(t){s||(s=new n.Subject,e(s).subscribe(o.createOperatorSubscriber(r,(function(){return i?u():a=!0})))),s&&s.next(t)}))),a&&(i.unsubscribe(),i=null,a=!1,u())};u()}))}},6577:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sample=void 0;var n=r(4024),i=r(5729),o=r(5079);t.sample=function(e){return n.operate((function(t,r){var n=!1,s=null;t.subscribe(o.createOperatorSubscriber(r,(function(e){n=!0,s=e}))),e.subscribe(o.createOperatorSubscriber(r,(function(){if(n){n=!1;var e=s;s=null,r.next(e)}}),i.noop))}))}},3815:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sampleTime=void 0;var n=r(4617),i=r(6577),o=r(4449);t.sampleTime=function(e,t){return void 0===t&&(t=n.asyncScheduler),i.sample(o.interval(e,t))}},7250:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scan=void 0;var n=r(4024),i=r(2181);t.scan=function(e,t){return n.operate(i.scanInternals(e,t,arguments.length>=2,!0))}},2181:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scanInternals=void 0;var n=r(5079);t.scanInternals=function(e,t,r,i,o){return function(s,a){var u=r,c=t,l=0;s.subscribe(n.createOperatorSubscriber(a,(function(t){var r=l++;c=u?e(c,t,r):(u=!0,t),i&&a.next(c)}),o&&function(){u&&a.next(c),a.complete()}))}}},842:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sequenceEqual=void 0;var n=r(4024),i=r(5079);t.sequenceEqual=function(e,t){return void 0===t&&(t=function(e,t){return e===t}),n.operate((function(r,n){var o={buffer:[],complete:!1},s={buffer:[],complete:!1},a=function(e){n.next(e),n.complete()},u=function(e,r){var o=i.createOperatorSubscriber(n,(function(n){var i=r.buffer,o=r.complete;0===i.length?o?a(!1):e.buffer.push(n):!t(n,i.shift())&&a(!1)}),(function(){e.complete=!0;var t=r.complete,n=r.buffer;t&&a(0===n.length),null==o||o.unsubscribe()}));return o};r.subscribe(u(o,s)),e.subscribe(u(s,o))}))}},9728:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.share=void 0;var o=r(9451),s=r(9520),a=r(1403),u=r(4024);function c(e,t){for(var r=[],o=2;o<arguments.length;o++)r[o-2]=arguments[o];if(!0!==t){if(!1!==t){var s=new a.SafeSubscriber({next:function(){s.unsubscribe(),e()}});return t.apply(void 0,i([],n(r))).subscribe(s)}}else e()}t.share=function(e){void 0===e&&(e={});var t=e.connector,r=void 0===t?function(){return new s.Subject}:t,n=e.resetOnError,i=void 0===n||n,l=e.resetOnComplete,f=void 0===l||l,p=e.resetOnRefCountZero,d=void 0===p||p;return function(e){var t,n,s,l=0,p=!1,h=!1,y=function(){null==n||n.unsubscribe(),n=void 0},v=function(){y(),t=s=void 0,p=h=!1},m=function(){var e=t;v(),null==e||e.unsubscribe()};return u.operate((function(e,u){l++,h||p||y();var b=s=null!=s?s:r();u.add((function(){0!=--l||h||p||(n=c(m,d))})),b.subscribe(u),!t&&l>0&&(t=new a.SafeSubscriber({next:function(e){return b.next(e)},error:function(e){h=!0,y(),n=c(v,i,e),b.error(e)},complete:function(){p=!0,y(),n=c(v,f),b.complete()}}),o.innerFrom(e).subscribe(t))}))(e)}}},7768:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.shareReplay=void 0;var n=r(216),i=r(9728);t.shareReplay=function(e,t,r){var o,s,a,u,c=!1;return e&&"object"==typeof e?(o=e.bufferSize,u=void 0===o?1/0:o,s=e.windowTime,t=void 0===s?1/0:s,c=void 0!==(a=e.refCount)&&a,r=e.scheduler):u=null!=e?e:1/0,i.share({connector:function(){return new n.ReplaySubject(u,t,r)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:c})}},2445:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.single=void 0;var n=r(8032),i=r(6228),o=r(1137),s=r(4024),a=r(5079);t.single=function(e){return s.operate((function(t,r){var s,u=!1,c=!1,l=0;t.subscribe(a.createOperatorSubscriber(r,(function(n){c=!0,e&&!e(n,l++,t)||(u&&r.error(new i.SequenceError("Too many matching values")),u=!0,s=n)}),(function(){u?(r.next(s),r.complete()):r.error(c?new o.NotFoundError("No matching values"):new n.EmptyError)})))}))}},6262:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.skip=void 0;var n=r(2763);t.skip=function(e){return n.filter((function(t,r){return e<=r}))}},7397:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.skipLast=void 0;var n=r(9144),i=r(4024),o=r(5079);t.skipLast=function(e){return e<=0?n.identity:i.operate((function(t,r){var n=new Array(e),i=0;return t.subscribe(o.createOperatorSubscriber(r,(function(t){var o=i++;if(o<e)n[o]=t;else{var s=o%e,a=n[s];n[s]=t,r.next(a)}}))),function(){n=null}}))}},9900:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.skipUntil=void 0;var n=r(4024),i=r(5079),o=r(9451),s=r(5729);t.skipUntil=function(e){return n.operate((function(t,r){var n=!1,a=i.createOperatorSubscriber(r,(function(){null==a||a.unsubscribe(),n=!0}),s.noop);o.innerFrom(e).subscribe(a),t.subscribe(i.createOperatorSubscriber(r,(function(e){return n&&r.next(e)})))}))}},1620:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.skipWhile=void 0;var n=r(4024),i=r(5079);t.skipWhile=function(e){return n.operate((function(t,r){var n=!1,o=0;t.subscribe(i.createOperatorSubscriber(r,(function(t){return(n||(n=!e(t,o++)))&&r.next(t)})))}))}},3424:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.startWith=void 0;var n=r(79),i=r(2619),o=r(4024);t.startWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=i.popScheduler(e);return o.operate((function(t,i){(r?n.concat(e,t,r):n.concat(e,t)).subscribe(i)}))}},831:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.subscribeOn=void 0;var n=r(4024);t.subscribeOn=function(e,t){return void 0===t&&(t=0),n.operate((function(r,n){n.add(e.schedule((function(){return r.subscribe(n)}),t))}))}},411:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.switchAll=void 0;var n=r(7222),i=r(9144);t.switchAll=function(){return n.switchMap(i.identity)}},7222:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.switchMap=void 0;var n=r(9451),i=r(4024),o=r(5079);t.switchMap=function(e,t){return i.operate((function(r,i){var s=null,a=0,u=!1,c=function(){return u&&!s&&i.complete()};r.subscribe(o.createOperatorSubscriber(i,(function(r){null==s||s.unsubscribe();var u=0,l=a++;n.innerFrom(e(r,l)).subscribe(s=o.createOperatorSubscriber(i,(function(e){return i.next(t?t(r,e,l,u++):e)}),(function(){s=null,c()})))}),(function(){u=!0,c()})))}))}},6464:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.switchMapTo=void 0;var n=r(7222),i=r(4432);t.switchMapTo=function(e,t){return i.isFunction(t)?n.switchMap((function(){return e}),t):n.switchMap((function(){return e}))}},4434:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.switchScan=void 0;var n=r(7222),i=r(4024);t.switchScan=function(e,t){return i.operate((function(r,i){var o=t;return n.switchMap((function(t,r){return e(o,t,r)}),(function(e,t){return o=t,t}))(r).subscribe(i),function(){o=null}}))}},7138:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.take=void 0;var n=r(1727),i=r(4024),o=r(5079);t.take=function(e){return e<=0?function(){return n.EMPTY}:i.operate((function(t,r){var n=0;t.subscribe(o.createOperatorSubscriber(r,(function(t){++n<=e&&(r.next(t),e<=n&&r.complete())})))}))}},4288:function(e,t,r){"use strict";var n=this&&this.__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 e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.takeLast=void 0;var i=r(1727),o=r(4024),s=r(5079);t.takeLast=function(e){return e<=0?function(){return i.EMPTY}:o.operate((function(t,r){var i=[];t.subscribe(s.createOperatorSubscriber(r,(function(t){i.push(t),e<i.length&&i.shift()}),(function(){var e,t;try{for(var o=n(i),s=o.next();!s.done;s=o.next()){var a=s.value;r.next(a)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}r.complete()}),void 0,(function(){i=null})))}))}},7341:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.takeUntil=void 0;var n=r(4024),i=r(5079),o=r(9451),s=r(5729);t.takeUntil=function(e){return n.operate((function(t,r){o.innerFrom(e).subscribe(i.createOperatorSubscriber(r,(function(){return r.complete()}),s.noop)),!r.closed&&t.subscribe(r)}))}},653:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.takeWhile=void 0;var n=r(4024),i=r(5079);t.takeWhile=function(e,t){return void 0===t&&(t=!1),n.operate((function(r,n){var o=0;r.subscribe(i.createOperatorSubscriber(n,(function(r){var i=e(r,o++);(i||t)&&n.next(r),!i&&n.complete()})))}))}},8668:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.tap=void 0;var n=r(4432),i=r(4024),o=r(5079),s=r(9144);t.tap=function(e,t,r){var a=n.isFunction(e)||t||r?{next:e,error:t,complete:r}:e;return a?i.operate((function(e,t){var r;null===(r=a.subscribe)||void 0===r||r.call(a);var n=!0;e.subscribe(o.createOperatorSubscriber(t,(function(e){var r;null===(r=a.next)||void 0===r||r.call(a,e),t.next(e)}),(function(){var e;n=!1,null===(e=a.complete)||void 0===e||e.call(a),t.complete()}),(function(e){var r;n=!1,null===(r=a.error)||void 0===r||r.call(a,e),t.error(e)}),(function(){var e,t;n&&(null===(e=a.unsubscribe)||void 0===e||e.call(a)),null===(t=a.finalize)||void 0===t||t.call(a)})))})):s.identity}},9466:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.throttle=t.defaultThrottleConfig=void 0;var n=r(4024),i=r(5079),o=r(9451);t.defaultThrottleConfig={leading:!0,trailing:!1},t.throttle=function(e,r){return void 0===r&&(r=t.defaultThrottleConfig),n.operate((function(t,n){var s=r.leading,a=r.trailing,u=!1,c=null,l=null,f=!1,p=function(){null==l||l.unsubscribe(),l=null,a&&(y(),f&&n.complete())},d=function(){l=null,f&&n.complete()},h=function(t){return l=o.innerFrom(e(t)).subscribe(i.createOperatorSubscriber(n,p,d))},y=function(){if(u){u=!1;var e=c;c=null,n.next(e),!f&&h(e)}};t.subscribe(i.createOperatorSubscriber(n,(function(e){u=!0,c=e,(!l||l.closed)&&(s?y():h(e))}),(function(){f=!0,(!(a&&u&&l)||l.closed)&&n.complete()})))}))}},9705:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.throttleTime=void 0;var n=r(4617),i=r(9466),o=r(5710);t.throttleTime=function(e,t,r){void 0===t&&(t=n.asyncScheduler),void 0===r&&(r=i.defaultThrottleConfig);var s=o.timer(e,t);return i.throttle((function(){return s}),r)}},8062:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.throwIfEmpty=void 0;var n=r(8032),i=r(4024),o=r(5079);function s(){return new n.EmptyError}t.throwIfEmpty=function(e){return void 0===e&&(e=s),i.operate((function(t,r){var n=!1;t.subscribe(o.createOperatorSubscriber(r,(function(e){n=!0,r.next(e)}),(function(){return n?r.complete():r.error(e())})))}))}},6610:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TimeInterval=t.timeInterval=void 0;var n=r(4617),i=r(4024),o=r(5079);t.timeInterval=function(e){return void 0===e&&(e=n.asyncScheduler),i.operate((function(t,r){var n=e.now();t.subscribe(o.createOperatorSubscriber(r,(function(t){var i=e.now(),o=i-n;n=i,r.next(new s(t,o))})))}))};var s=function(e,t){this.value=e,this.interval=t};t.TimeInterval=s},6279:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.timeout=t.TimeoutError=void 0;var n=r(4617),i=r(7761),o=r(4024),s=r(9451),a=r(9876),u=r(5079),c=r(5421);function l(e){throw new t.TimeoutError(e)}t.TimeoutError=a.createErrorClass((function(e){return function(t){void 0===t&&(t=null),e(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=t}})),t.timeout=function(e,t){var r=i.isValidDate(e)?{first:e}:"number"==typeof e?{each:e}:e,a=r.first,f=r.each,p=r.with,d=void 0===p?l:p,h=r.scheduler,y=void 0===h?null!=t?t:n.asyncScheduler:h,v=r.meta,m=void 0===v?null:v;if(null==a&&null==f)throw new TypeError("No timeout provided.");return o.operate((function(e,t){var r,n,i=null,o=0,l=function(e){n=c.executeSchedule(t,y,(function(){try{r.unsubscribe(),s.innerFrom(d({meta:m,lastValue:i,seen:o})).subscribe(t)}catch(e){t.error(e)}}),e)};r=e.subscribe(u.createOperatorSubscriber(t,(function(e){null==n||n.unsubscribe(),o++,t.next(i=e),f>0&&l(f)}),void 0,void 0,(function(){(null==n?void 0:n.closed)||null==n||n.unsubscribe(),i=null}))),!o&&l(null!=a?"number"==typeof a?a:+a-y.now():f)}))}},8132:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.timeoutWith=void 0;var n=r(4617),i=r(7761),o=r(6279);t.timeoutWith=function(e,t,r){var s,a,u;if(r=null!=r?r:n.async,i.isValidDate(e)?s=e:"number"==typeof e&&(a=e),!t)throw new TypeError("No observable provided to switch to");if(u=function(){return t},null==s&&null==a)throw new TypeError("No timeout provided.");return o.timeout({first:s,each:a,scheduler:r,with:u})}},4553:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.timestamp=void 0;var n=r(1713),i=r(4338);t.timestamp=function(e){return void 0===e&&(e=n.dateTimestampProvider),i.map((function(t){return{value:t,timestamp:e.now()}}))}},2378:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toArray=void 0;var n=r(1678),i=r(4024),o=function(e,t){return e.push(t),e};t.toArray=function(){return i.operate((function(e,t){n.reduce(o,[])(e).subscribe(t)}))}},4768:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.window=void 0;var n=r(9520),i=r(4024),o=r(5079),s=r(5729);t.window=function(e){return i.operate((function(t,r){var i=new n.Subject;r.next(i.asObservable());var a=function(e){i.error(e),r.error(e)};return t.subscribe(o.createOperatorSubscriber(r,(function(e){return null==i?void 0:i.next(e)}),(function(){i.complete(),r.complete()}),a)),e.subscribe(o.createOperatorSubscriber(r,(function(){i.complete(),r.next(i=new n.Subject)}),s.noop,a)),function(){null==i||i.unsubscribe(),i=null}}))}},131:function(e,t,r){"use strict";var n=this&&this.__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 e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.windowCount=void 0;var i=r(9520),o=r(4024),s=r(5079);t.windowCount=function(e,t){void 0===t&&(t=0);var r=t>0?t:e;return o.operate((function(t,o){var a=[new i.Subject],u=0;o.next(a[0].asObservable()),t.subscribe(s.createOperatorSubscriber(o,(function(t){var s,c;try{for(var l=n(a),f=l.next();!f.done;f=l.next())f.value.next(t)}catch(e){s={error:e}}finally{try{f&&!f.done&&(c=l.return)&&c.call(l)}finally{if(s)throw s.error}}var p=u-e+1;if(p>=0&&p%r==0&&a.shift().complete(),++u%r==0){var d=new i.Subject;a.push(d),o.next(d.asObservable())}}),(function(){for(;a.length>0;)a.shift().complete();o.complete()}),(function(e){for(;a.length>0;)a.shift().error(e);o.error(e)}),(function(){a=null})))}))}},9579:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.windowTime=void 0;var n=r(9520),i=r(4617),o=r(7215),s=r(4024),a=r(5079),u=r(2447),c=r(2619),l=r(5421);t.windowTime=function(e){for(var t,r,f=[],p=1;p<arguments.length;p++)f[p-1]=arguments[p];var d=null!==(t=c.popScheduler(f))&&void 0!==t?t:i.asyncScheduler,h=null!==(r=f[0])&&void 0!==r?r:null,y=f[1]||1/0;return s.operate((function(t,r){var i=[],s=!1,c=function(e){var t=e.window,r=e.subs;t.complete(),r.unsubscribe(),u.arrRemove(i,e),s&&f()},f=function(){if(i){var t=new o.Subscription;r.add(t);var s=new n.Subject,a={window:s,subs:t,seen:0};i.push(a),r.next(s.asObservable()),l.executeSchedule(t,d,(function(){return c(a)}),e)}};null!==h&&h>=0?l.executeSchedule(r,d,f,h,!0):s=!0,f();var p=function(e){return i.slice().forEach(e)},v=function(e){p((function(t){var r=t.window;return e(r)})),e(r),r.unsubscribe()};return t.subscribe(a.createOperatorSubscriber(r,(function(e){p((function(t){t.window.next(e),y<=++t.seen&&c(t)}))}),(function(){return v((function(e){return e.complete()}))}),(function(e){return v((function(t){return t.error(e)}))}))),function(){i=null}}))}},752:function(e,t,r){"use strict";var n=this&&this.__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 e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.windowToggle=void 0;var i=r(9520),o=r(7215),s=r(4024),a=r(9451),u=r(5079),c=r(5729),l=r(2447);t.windowToggle=function(e,t){return s.operate((function(r,s){var f=[],p=function(e){for(;0<f.length;)f.shift().error(e);s.error(e)};a.innerFrom(e).subscribe(u.createOperatorSubscriber(s,(function(e){var r=new i.Subject;f.push(r);var n,d=new o.Subscription;try{n=a.innerFrom(t(e))}catch(e){return void p(e)}s.next(r.asObservable()),d.add(n.subscribe(u.createOperatorSubscriber(s,(function(){l.arrRemove(f,r),r.complete(),d.unsubscribe()}),c.noop,p)))}),c.noop)),r.subscribe(u.createOperatorSubscriber(s,(function(e){var t,r,i=f.slice();try{for(var o=n(i),s=o.next();!s.done;s=o.next())s.value.next(e)}catch(e){t={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}}),(function(){for(;0<f.length;)f.shift().complete();s.complete()}),p,(function(){for(;0<f.length;)f.shift().unsubscribe()})))}))}},582:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.windowWhen=void 0;var n=r(9520),i=r(4024),o=r(5079),s=r(9451);t.windowWhen=function(e){return i.operate((function(t,r){var i,a,u=function(e){i.error(e),r.error(e)},c=function(){var t;null==a||a.unsubscribe(),null==i||i.complete(),i=new n.Subject,r.next(i.asObservable());try{t=s.innerFrom(e())}catch(e){return void u(e)}t.subscribe(a=o.createOperatorSubscriber(r,c,c,u))};c(),t.subscribe(o.createOperatorSubscriber(r,(function(e){return i.next(e)}),(function(){i.complete(),r.complete()}),u,(function(){null==a||a.unsubscribe(),i=null})))}))}},4255:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.withLatestFrom=void 0;var o=r(4024),s=r(5079),a=r(9451),u=r(9144),c=r(5729),l=r(2619);t.withLatestFrom=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=l.popResultSelector(e);return o.operate((function(t,o){for(var l=e.length,f=new Array(l),p=e.map((function(){return!1})),d=!1,h=function(t){a.innerFrom(e[t]).subscribe(s.createOperatorSubscriber(o,(function(e){f[t]=e,d||p[t]||(p[t]=!0,(d=p.every(u.identity))&&(p=null))}),c.noop))},y=0;y<l;y++)h(y);t.subscribe(s.createOperatorSubscriber(o,(function(e){if(d){var t=i([e],n(f));o.next(r?r.apply(void 0,i([],n(t))):t)}})))}))}},3253:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.zip=void 0;var o=r(2042),s=r(4024);t.zip=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return s.operate((function(t,r){o.zip.apply(void 0,i([t],n(e))).subscribe(r)}))}},7220:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.zipAll=void 0;var n=r(2042),i=r(7534);t.zipAll=function(e){return i.joinAllInternals(n.zip,e)}},9287:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.zipWith=void 0;var o=r(3253);t.zipWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o.zip.apply(void 0,i([],n(e)))}},3584:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleArray=void 0;var n=r(5271);t.scheduleArray=function(e,t){return new n.Observable((function(r){var n=0;return t.schedule((function(){n===e.length?r.complete():(r.next(e[n++]),r.closed||this.schedule())}))}))}},1659:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleAsyncIterable=void 0;var n=r(5271),i=r(5421);t.scheduleAsyncIterable=function(e,t){if(!e)throw new Error("Iterable cannot be null");return new n.Observable((function(r){i.executeSchedule(r,t,(function(){var n=e[Symbol.asyncIterator]();i.executeSchedule(r,t,(function(){n.next().then((function(e){e.done?r.complete():r.next(e.value)}))}),0,!0)}))}))}},8840:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleIterable=void 0;var n=r(5271),i=r(5686),o=r(4432),s=r(5421);t.scheduleIterable=function(e,t){return new n.Observable((function(r){var n;return s.executeSchedule(r,t,(function(){n=e[i.iterator](),s.executeSchedule(r,t,(function(){var e,t,i;try{t=(e=n.next()).value,i=e.done}catch(e){return void r.error(e)}i?r.complete():r.next(t)}),0,!0)})),function(){return o.isFunction(null==n?void 0:n.return)&&n.return()}}))}},5704:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleObservable=void 0;var n=r(9451),i=r(3165),o=r(831);t.scheduleObservable=function(e,t){return n.innerFrom(e).pipe(o.subscribeOn(t),i.observeOn(t))}},4644:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.schedulePromise=void 0;var n=r(9451),i=r(3165),o=r(831);t.schedulePromise=function(e,t){return n.innerFrom(e).pipe(o.subscribeOn(t),i.observeOn(t))}},3035:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleReadableStreamLike=void 0;var n=r(1659),i=r(9266);t.scheduleReadableStreamLike=function(e,t){return n.scheduleAsyncIterable(i.readableStreamLikeToAsyncGenerator(e),t)}},3200:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scheduled=void 0;var n=r(5704),i=r(4644),o=r(3584),s=r(8840),a=r(1659),u=r(3292),c=r(2644),l=r(8219),f=r(6380),p=r(7707),d=r(4883),h=r(9266),y=r(3035);t.scheduled=function(e,t){if(null!=e){if(u.isInteropObservable(e))return n.scheduleObservable(e,t);if(l.isArrayLike(e))return o.scheduleArray(e,t);if(c.isPromise(e))return i.schedulePromise(e,t);if(p.isAsyncIterable(e))return a.scheduleAsyncIterable(e,t);if(f.isIterable(e))return s.scheduleIterable(e,t);if(h.isReadableStreamLike(e))return y.scheduleReadableStreamLike(e,t)}throw d.createInvalidObservableTypeError(e)}},4756:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=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])},n(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}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.Action=void 0;var o=function(e){function t(t,r){return e.call(this)||this}return i(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(r(7215).Subscription);t.Action=o},5364:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=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])},n(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}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AnimationFrameAction=void 0;var o=r(1172),s=r(6741),a=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n}return i(t,e),t.prototype.requestAsyncId=function(t,r,n){return void 0===n&&(n=0),null!==n&&n>0?e.prototype.requestAsyncId.call(this,t,r,n):(t.actions.push(this),t._scheduled||(t._scheduled=s.animationFrameProvider.requestAnimationFrame((function(){return t.flush(void 0)}))))},t.prototype.recycleAsyncId=function(t,r,n){var i;if(void 0===n&&(n=0),null!=n?n>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,t,r,n);var o=t.actions;null!=r&&(null===(i=o[o.length-1])||void 0===i?void 0:i.id)!==r&&(s.animationFrameProvider.cancelAnimationFrame(r),t._scheduled=void 0)},t}(o.AsyncAction);t.AnimationFrameAction=a},1834:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=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])},n(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}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AnimationFrameScheduler=void 0;var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.flush=function(e){this._active=!0;var t=this._scheduled;this._scheduled=void 0;var r,n=this.actions;e=e||n.shift();do{if(r=e.execute(e.state,e.delay))break}while((e=n[0])&&e.id===t&&n.shift());if(this._active=!1,r){for(;(e=n[0])&&e.id===t&&n.shift();)e.unsubscribe();throw r}},t}(r(6759).AsyncScheduler);t.AnimationFrameScheduler=o},3761:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=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])},n(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}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsapAction=void 0;var o=r(1172),s=r(6703),a=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n}return i(t,e),t.prototype.requestAsyncId=function(t,r,n){return void 0===n&&(n=0),null!==n&&n>0?e.prototype.requestAsyncId.call(this,t,r,n):(t.actions.push(this),t._scheduled||(t._scheduled=s.immediateProvider.setImmediate(t.flush.bind(t,void 0))))},t.prototype.recycleAsyncId=function(t,r,n){var i;if(void 0===n&&(n=0),null!=n?n>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,t,r,n);var o=t.actions;null!=r&&(null===(i=o[o.length-1])||void 0===i?void 0:i.id)!==r&&(s.immediateProvider.clearImmediate(r),t._scheduled=void 0)},t}(o.AsyncAction);t.AsapAction=a},1386:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=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])},n(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}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsapScheduler=void 0;var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.flush=function(e){this._active=!0;var t=this._scheduled;this._scheduled=void 0;var r,n=this.actions;e=e||n.shift();do{if(r=e.execute(e.state,e.delay))break}while((e=n[0])&&e.id===t&&n.shift());if(this._active=!1,r){for(;(e=n[0])&&e.id===t&&n.shift();)e.unsubscribe();throw r}},t}(r(6759).AsyncScheduler);t.AsapScheduler=o},1172:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=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])},n(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}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncAction=void 0;var o=r(4756),s=r(9678),a=r(2447),u=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n.pending=!1,n}return i(t,e),t.prototype.schedule=function(e,t){var r;if(void 0===t&&(t=0),this.closed)return this;this.state=e;var n=this.id,i=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(i,n,t)),this.pending=!0,this.delay=t,this.id=null!==(r=this.id)&&void 0!==r?r:this.requestAsyncId(i,this.id,t),this},t.prototype.requestAsyncId=function(e,t,r){return void 0===r&&(r=0),s.intervalProvider.setInterval(e.flush.bind(e,this),r)},t.prototype.recycleAsyncId=function(e,t,r){if(void 0===r&&(r=0),null!=r&&this.delay===r&&!1===this.pending)return t;null!=t&&s.intervalProvider.clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var r=this._execute(e,t);if(r)return r;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.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},t.prototype.unsubscribe=function(){if(!this.closed){var t=this.id,r=this.scheduler,n=r.actions;this.work=this.state=this.scheduler=null,this.pending=!1,a.arrRemove(n,this),null!=t&&(this.id=this.recycleAsyncId(r,t,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(o.Action);t.AsyncAction=u},6759:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=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])},n(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}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncScheduler=void 0;var o=r(3980),s=function(e){function t(t,r){void 0===r&&(r=o.Scheduler.now);var n=e.call(this,t,r)||this;return n.actions=[],n._active=!1,n}return i(t,e),t.prototype.flush=function(e){var t=this.actions;if(this._active)t.push(e);else{var r;this._active=!0;do{if(r=e.execute(e.state,e.delay))break}while(e=t.shift());if(this._active=!1,r){for(;e=t.shift();)e.unsubscribe();throw r}}},t}(o.Scheduler);t.AsyncScheduler=s},6354:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=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])},n(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}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.QueueAction=void 0;var o=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n}return i(t,e),t.prototype.schedule=function(t,r){return void 0===r&&(r=0),r>0?e.prototype.schedule.call(this,t,r):(this.delay=r,this.state=t,this.scheduler.flush(this),this)},t.prototype.execute=function(t,r){return r>0||this.closed?e.prototype.execute.call(this,t,r):this._execute(t,r)},t.prototype.requestAsyncId=function(t,r,n){return void 0===n&&(n=0),null!=n&&n>0||null==n&&this.delay>0?e.prototype.requestAsyncId.call(this,t,r,n):(t.flush(this),0)},t}(r(1172).AsyncAction);t.QueueAction=o},3144:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=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])},n(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}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.QueueScheduler=void 0;var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t}(r(6759).AsyncScheduler);t.QueueScheduler=o},8847:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=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])},n(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}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.VirtualAction=t.VirtualTimeScheduler=void 0;var o=r(1172),s=r(7215),a=function(e){function t(t,r){void 0===t&&(t=u),void 0===r&&(r=1/0);var n=e.call(this,t,(function(){return n.frame}))||this;return n.maxFrames=r,n.frame=0,n.index=-1,n}return i(t,e),t.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}},t.frameTimeFactor=10,t}(r(6759).AsyncScheduler);t.VirtualTimeScheduler=a;var u=function(e){function t(t,r,n){void 0===n&&(n=t.index+=1);var i=e.call(this,t,r)||this;return i.scheduler=t,i.work=r,i.index=n,i.active=!0,i.index=t.index=n,i}return i(t,e),t.prototype.schedule=function(r,n){if(void 0===n&&(n=0),Number.isFinite(n)){if(!this.id)return e.prototype.schedule.call(this,r,n);this.active=!1;var i=new t(this.scheduler,this.work);return this.add(i),i.schedule(r,n)}return s.Subscription.EMPTY},t.prototype.requestAsyncId=function(e,r,n){void 0===n&&(n=0),this.delay=e.frame+n;var i=e.actions;return i.push(this),i.sort(t.sortActions),1},t.prototype.recycleAsyncId=function(e,t,r){void 0===r&&(r=0)},t.prototype._execute=function(t,r){if(!0===this.active)return e.prototype._execute.call(this,t,r)},t.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},t}(o.AsyncAction);t.VirtualAction=u},6192:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.animationFrame=t.animationFrameScheduler=void 0;var n=r(5364),i=r(1834);t.animationFrameScheduler=new i.AnimationFrameScheduler(n.AnimationFrameAction),t.animationFrame=t.animationFrameScheduler},6741:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.animationFrameProvider=void 0;var o=r(7215);t.animationFrameProvider={schedule:function(e){var r=requestAnimationFrame,n=cancelAnimationFrame,i=t.animationFrameProvider.delegate;i&&(r=i.requestAnimationFrame,n=i.cancelAnimationFrame);var s=r((function(t){n=void 0,e(t)}));return new o.Subscription((function(){return null==n?void 0:n(s)}))},requestAnimationFrame:function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var o=t.animationFrameProvider.delegate;return((null==o?void 0:o.requestAnimationFrame)||requestAnimationFrame).apply(void 0,i([],n(e)))},cancelAnimationFrame:function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var o=t.animationFrameProvider.delegate;return((null==o?void 0:o.cancelAnimationFrame)||cancelAnimationFrame).apply(void 0,i([],n(e)))},delegate:void 0}},4502:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.asap=t.asapScheduler=void 0;var n=r(3761),i=r(1386);t.asapScheduler=new i.AsapScheduler(n.AsapAction),t.asap=t.asapScheduler},4617:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.async=t.asyncScheduler=void 0;var n=r(1172),i=r(6759);t.asyncScheduler=new i.AsyncScheduler(n.AsyncAction),t.async=t.asyncScheduler},1713:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dateTimestampProvider=void 0,t.dateTimestampProvider={now:function(){return(t.dateTimestampProvider.delegate||Date).now()},delegate:void 0}},6703:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.immediateProvider=void 0;var o=r(2534),s=o.Immediate.setImmediate,a=o.Immediate.clearImmediate;t.immediateProvider={setImmediate:function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var o=t.immediateProvider.delegate;return((null==o?void 0:o.setImmediate)||s).apply(void 0,i([],n(e)))},clearImmediate:function(e){var r=t.immediateProvider.delegate;return((null==r?void 0:r.clearImmediate)||a)(e)},delegate:void 0}},9678:function(e,t){"use strict";var r=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},n=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.intervalProvider=void 0,t.intervalProvider={setInterval:function(e,i){for(var o=[],s=2;s<arguments.length;s++)o[s-2]=arguments[s];var a=t.intervalProvider.delegate;return(null==a?void 0:a.setInterval)?a.setInterval.apply(a,n([e,i],r(o))):setInterval.apply(void 0,n([e,i],r(o)))},clearInterval:function(e){var r=t.intervalProvider.delegate;return((null==r?void 0:r.clearInterval)||clearInterval)(e)},delegate:void 0}},1241:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.performanceTimestampProvider=void 0,t.performanceTimestampProvider={now:function(){return(t.performanceTimestampProvider.delegate||performance).now()},delegate:void 0}},8344:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.queue=t.queueScheduler=void 0;var n=r(6354),i=r(3144);t.queueScheduler=new i.QueueScheduler(n.QueueAction),t.queue=t.queueScheduler},8972:function(e,t){"use strict";var r=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},n=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.timeoutProvider=void 0,t.timeoutProvider={setTimeout:function(e,i){for(var o=[],s=2;s<arguments.length;s++)o[s-2]=arguments[s];var a=t.timeoutProvider.delegate;return(null==a?void 0:a.setTimeout)?a.setTimeout.apply(a,n([e,i],r(o))):setTimeout.apply(void 0,n([e,i],r(o)))},clearTimeout:function(e){var r=t.timeoutProvider.delegate;return((null==r?void 0:r.clearTimeout)||clearTimeout)(e)},delegate:void 0}},5686:(e,t)=>{"use strict";function r(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}Object.defineProperty(t,"__esModule",{value:!0}),t.iterator=t.getSymbolIterator=void 0,t.getSymbolIterator=r,t.iterator=r()},2138:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.observable=void 0,t.observable="function"==typeof Symbol&&Symbol.observable||"@@observable"},9251:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},6809:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArgumentOutOfRangeError=void 0;var n=r(9876);t.ArgumentOutOfRangeError=n.createErrorClass((function(e){return function(){e(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}}))},8032:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmptyError=void 0;var n=r(9876);t.EmptyError=n.createErrorClass((function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}}))},2534:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TestTools=t.Immediate=void 0;var r,n=1,i={};function o(e){return e in i&&(delete i[e],!0)}t.Immediate={setImmediate:function(e){var t=n++;return i[t]=!0,r||(r=Promise.resolve()),r.then((function(){return o(t)&&e()})),t},clearImmediate:function(e){o(e)}},t.TestTools={pending:function(){return Object.keys(i).length}}},1137:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NotFoundError=void 0;var n=r(9876);t.NotFoundError=n.createErrorClass((function(e){return function(t){e(this),this.name="NotFoundError",this.message=t}}))},7392:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectUnsubscribedError=void 0;var n=r(9876);t.ObjectUnsubscribedError=n.createErrorClass((function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}))},6228:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SequenceError=void 0;var n=r(9876);t.SequenceError=n.createErrorClass((function(e){return function(t){e(this),this.name="SequenceError",this.message=t}}))},5463:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UnsubscriptionError=void 0;var n=r(9876);t.UnsubscriptionError=n.createErrorClass((function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(e,t){return t+1+") "+e.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t}}))},2619:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.popNumber=t.popScheduler=t.popResultSelector=void 0;var n=r(4432),i=r(6551);function o(e){return e[e.length-1]}t.popResultSelector=function(e){return n.isFunction(o(e))?e.pop():void 0},t.popScheduler=function(e){return i.isScheduler(o(e))?e.pop():void 0},t.popNumber=function(e,t){return"number"==typeof o(e)?e.pop():t}},4744:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.argsArgArrayOrObject=void 0;var r=Array.isArray,n=Object.getPrototypeOf,i=Object.prototype,o=Object.keys;t.argsArgArrayOrObject=function(e){if(1===e.length){var t=e[0];if(r(t))return{args:t,keys:null};if((a=t)&&"object"==typeof a&&n(a)===i){var s=o(t);return{args:s.map((function(e){return t[e]})),keys:s}}}var a;return{args:e,keys:null}}},4475:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.argsOrArgArray=void 0;var r=Array.isArray;t.argsOrArgArray=function(e){return 1===e.length&&r(e[0])?e[0]:e}},2447:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.arrRemove=void 0,t.arrRemove=function(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}},9876:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createErrorClass=void 0,t.createErrorClass=function(e){var t=e((function(e){Error.call(e),e.stack=(new Error).stack}));return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}},1589:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createObject=void 0,t.createObject=function(e,t){return e.reduce((function(e,r,n){return e[r]=t[n],e}),{})}},4770:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.captureError=t.errorContext=void 0;var n=r(3782),i=null;t.errorContext=function(e){if(n.config.useDeprecatedSynchronousErrorHandling){var t=!i;if(t&&(i={errorThrown:!1,error:null}),e(),t){var r=i,o=r.errorThrown,s=r.error;if(i=null,o)throw s}}else e()},t.captureError=function(e){n.config.useDeprecatedSynchronousErrorHandling&&i&&(i.errorThrown=!0,i.error=e)}},5421:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.executeSchedule=void 0,t.executeSchedule=function(e,t,r,n,i){void 0===n&&(n=0),void 0===i&&(i=!1);var o=t.schedule((function(){r(),i?e.add(this.schedule(null,n)):this.unsubscribe()}),n);if(e.add(o),!i)return o}},9144:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.identity=void 0,t.identity=function(e){return e}},8219:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isArrayLike=void 0,t.isArrayLike=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e}},7707:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isAsyncIterable=void 0;var n=r(4432);t.isAsyncIterable=function(e){return Symbol.asyncIterator&&n.isFunction(null==e?void 0:e[Symbol.asyncIterator])}},7761:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isValidDate=void 0,t.isValidDate=function(e){return e instanceof Date&&!isNaN(e)}},4432:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isFunction=void 0,t.isFunction=function(e){return"function"==typeof e}},3292:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isInteropObservable=void 0;var n=r(2138),i=r(4432);t.isInteropObservable=function(e){return i.isFunction(e[n.observable])}},6380:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isIterable=void 0;var n=r(5686),i=r(4432);t.isIterable=function(e){return i.isFunction(null==e?void 0:e[n.iterator])}},1211:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isObservable=void 0;var n=r(5271),i=r(4432);t.isObservable=function(e){return!!e&&(e instanceof n.Observable||i.isFunction(e.lift)&&i.isFunction(e.subscribe))}},2644:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isPromise=void 0;var n=r(4432);t.isPromise=function(e){return n.isFunction(null==e?void 0:e.then)}},9266:function(e,t,r){"use strict";var n=this&&this.__generator||function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},i=this&&this.__await||function(e){return this instanceof i?(this.v=e,this):new i(e)},o=this&&this.__asyncGenerator||function(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,o=r.apply(e,t||[]),s=[];return n={},a("next"),a("throw"),a("return"),n[Symbol.asyncIterator]=function(){return this},n;function a(e){o[e]&&(n[e]=function(t){return new Promise((function(r,n){s.push([e,t,r,n])>1||u(e,t)}))})}function u(e,t){try{(r=o[e](t)).value instanceof i?Promise.resolve(r.value.v).then(c,l):f(s[0][2],r)}catch(e){f(s[0][3],e)}var r}function c(e){u("next",e)}function l(e){u("throw",e)}function f(e,t){e(t),s.shift(),s.length&&u(s[0][0],s[0][1])}};Object.defineProperty(t,"__esModule",{value:!0}),t.isReadableStreamLike=t.readableStreamLikeToAsyncGenerator=void 0;var s=r(4432);t.readableStreamLikeToAsyncGenerator=function(e){return o(this,arguments,(function(){var t,r,o;return n(this,(function(n){switch(n.label){case 0:t=e.getReader(),n.label=1;case 1:n.trys.push([1,,9,10]),n.label=2;case 2:return[4,i(t.read())];case 3:return r=n.sent(),o=r.value,r.done?[4,i(void 0)]:[3,5];case 4:return[2,n.sent()];case 5:return[4,i(o)];case 6:return[4,n.sent()];case 7:return n.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}}))}))},t.isReadableStreamLike=function(e){return s.isFunction(null==e?void 0:e.getReader)}},6551:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isScheduler=void 0;var n=r(4432);t.isScheduler=function(e){return e&&n.isFunction(e.schedule)}},4024:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.operate=t.hasLift=void 0;var n=r(4432);function i(e){return n.isFunction(null==e?void 0:e.lift)}t.hasLift=i,t.operate=function(e){return function(t){if(i(t))return t.lift((function(t){try{return e(t,this)}catch(e){this.error(e)}}));throw new TypeError("Unable to lift unknown Observable type")}}},4666:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.mapOneOrManyArgs=void 0;var o=r(4338),s=Array.isArray;t.mapOneOrManyArgs=function(e){return o.map((function(t){return function(e,t){return s(t)?e.apply(void 0,i([],n(t))):e(t)}(e,t)}))}},5729:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.noop=void 0,t.noop=function(){}},1574:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.not=void 0,t.not=function(e,t){return function(r,n){return!e.call(t,r,n)}}},5966:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pipeFromArray=t.pipe=void 0;var n=r(9144);function i(e){return 0===e.length?n.identity:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)}}t.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return i(e)},t.pipeFromArray=i},7234:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reportUnhandledError=void 0;var n=r(3782),i=r(8972);t.reportUnhandledError=function(e){i.timeoutProvider.setTimeout((function(){var t=n.config.onUnhandledError;if(!t)throw e;t(e)}))}},4883:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createInvalidObservableTypeError=void 0,t.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.")}},9978:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeAll=t.merge=t.max=t.materialize=t.mapTo=t.map=t.last=t.isEmpty=t.ignoreElements=t.groupBy=t.first=t.findIndex=t.find=t.finalize=t.filter=t.expand=t.exhaustMap=t.exhaustAll=t.exhaust=t.every=t.endWith=t.elementAt=t.distinctUntilKeyChanged=t.distinctUntilChanged=t.distinct=t.dematerialize=t.delayWhen=t.delay=t.defaultIfEmpty=t.debounceTime=t.debounce=t.count=t.connect=t.concatWith=t.concatMapTo=t.concatMap=t.concatAll=t.concat=t.combineLatestWith=t.combineLatest=t.combineLatestAll=t.combineAll=t.catchError=t.bufferWhen=t.bufferToggle=t.bufferTime=t.bufferCount=t.buffer=t.auditTime=t.audit=void 0,t.timeInterval=t.throwIfEmpty=t.throttleTime=t.throttle=t.tap=t.takeWhile=t.takeUntil=t.takeLast=t.take=t.switchScan=t.switchMapTo=t.switchMap=t.switchAll=t.subscribeOn=t.startWith=t.skipWhile=t.skipUntil=t.skipLast=t.skip=t.single=t.shareReplay=t.share=t.sequenceEqual=t.scan=t.sampleTime=t.sample=t.refCount=t.retryWhen=t.retry=t.repeatWhen=t.repeat=t.reduce=t.raceWith=t.race=t.publishReplay=t.publishLast=t.publishBehavior=t.publish=t.pluck=t.partition=t.pairwise=t.onErrorResumeNext=t.observeOn=t.multicast=t.min=t.mergeWith=t.mergeScan=t.mergeMapTo=t.mergeMap=t.flatMap=void 0,t.zipWith=t.zipAll=t.zip=t.withLatestFrom=t.windowWhen=t.windowToggle=t.windowTime=t.windowCount=t.window=t.toArray=t.timestamp=t.timeoutWith=t.timeout=void 0;var n=r(3533);Object.defineProperty(t,"audit",{enumerable:!0,get:function(){return n.audit}});var i=r(5188);Object.defineProperty(t,"auditTime",{enumerable:!0,get:function(){return i.auditTime}});var o=r(4514);Object.defineProperty(t,"buffer",{enumerable:!0,get:function(){return o.buffer}});var s=r(2537);Object.defineProperty(t,"bufferCount",{enumerable:!0,get:function(){return s.bufferCount}});var a=r(8720);Object.defineProperty(t,"bufferTime",{enumerable:!0,get:function(){return a.bufferTime}});var u=r(7932);Object.defineProperty(t,"bufferToggle",{enumerable:!0,get:function(){return u.bufferToggle}});var c=r(1445);Object.defineProperty(t,"bufferWhen",{enumerable:!0,get:function(){return c.bufferWhen}});var l=r(4418);Object.defineProperty(t,"catchError",{enumerable:!0,get:function(){return l.catchError}});var f=r(4163);Object.defineProperty(t,"combineAll",{enumerable:!0,get:function(){return f.combineAll}});var p=r(9893);Object.defineProperty(t,"combineLatestAll",{enumerable:!0,get:function(){return p.combineLatestAll}});var d=r(8169);Object.defineProperty(t,"combineLatest",{enumerable:!0,get:function(){return d.combineLatest}});var h=r(7230);Object.defineProperty(t,"combineLatestWith",{enumerable:!0,get:function(){return h.combineLatestWith}});var y=r(4098);Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return y.concat}});var v=r(4554);Object.defineProperty(t,"concatAll",{enumerable:!0,get:function(){return v.concatAll}});var m=r(1048);Object.defineProperty(t,"concatMap",{enumerable:!0,get:function(){return m.concatMap}});var b=r(381);Object.defineProperty(t,"concatMapTo",{enumerable:!0,get:function(){return b.concatMapTo}});var g=r(4724);Object.defineProperty(t,"concatWith",{enumerable:!0,get:function(){return g.concatWith}});var _=r(4347);Object.defineProperty(t,"connect",{enumerable:!0,get:function(){return _.connect}});var w=r(6944);Object.defineProperty(t,"count",{enumerable:!0,get:function(){return w.count}});var O=r(440);Object.defineProperty(t,"debounce",{enumerable:!0,get:function(){return O.debounce}});var S=r(8157);Object.defineProperty(t,"debounceTime",{enumerable:!0,get:function(){return S.debounceTime}});var E=r(1714);Object.defineProperty(t,"defaultIfEmpty",{enumerable:!0,get:function(){return E.defaultIfEmpty}});var T=r(1030);Object.defineProperty(t,"delay",{enumerable:!0,get:function(){return T.delay}});var j=r(6405);Object.defineProperty(t,"delayWhen",{enumerable:!0,get:function(){return j.delayWhen}});var P=r(9142);Object.defineProperty(t,"dematerialize",{enumerable:!0,get:function(){return P.dematerialize}});var I=r(2307);Object.defineProperty(t,"distinct",{enumerable:!0,get:function(){return I.distinct}});var x=r(9131);Object.defineProperty(t,"distinctUntilChanged",{enumerable:!0,get:function(){return x.distinctUntilChanged}});var A=r(6659);Object.defineProperty(t,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return A.distinctUntilKeyChanged}});var N=r(4217);Object.defineProperty(t,"elementAt",{enumerable:!0,get:function(){return N.elementAt}});var k=r(4707);Object.defineProperty(t,"endWith",{enumerable:!0,get:function(){return k.endWith}});var M=r(9276);Object.defineProperty(t,"every",{enumerable:!0,get:function(){return M.every}});var D=r(337);Object.defineProperty(t,"exhaust",{enumerable:!0,get:function(){return D.exhaust}});var R=r(3977);Object.defineProperty(t,"exhaustAll",{enumerable:!0,get:function(){return R.exhaustAll}});var C=r(368);Object.defineProperty(t,"exhaustMap",{enumerable:!0,get:function(){return C.exhaustMap}});var $=r(7829);Object.defineProperty(t,"expand",{enumerable:!0,get:function(){return $.expand}});var F=r(2763);Object.defineProperty(t,"filter",{enumerable:!0,get:function(){return F.filter}});var q=r(4106);Object.defineProperty(t,"finalize",{enumerable:!0,get:function(){return q.finalize}});var L=r(8759);Object.defineProperty(t,"find",{enumerable:!0,get:function(){return L.find}});var B=r(3999);Object.defineProperty(t,"findIndex",{enumerable:!0,get:function(){return B.findIndex}});var U=r(5194);Object.defineProperty(t,"first",{enumerable:!0,get:function(){return U.first}});var V=r(1664);Object.defineProperty(t,"groupBy",{enumerable:!0,get:function(){return V.groupBy}});var z=r(3470);Object.defineProperty(t,"ignoreElements",{enumerable:!0,get:function(){return z.ignoreElements}});var Q=r(9549);Object.defineProperty(t,"isEmpty",{enumerable:!0,get:function(){return Q.isEmpty}});var Y=r(9582);Object.defineProperty(t,"last",{enumerable:!0,get:function(){return Y.last}});var W=r(4338);Object.defineProperty(t,"map",{enumerable:!0,get:function(){return W.map}});var H=r(4791);Object.defineProperty(t,"mapTo",{enumerable:!0,get:function(){return H.mapTo}});var K=r(9318);Object.defineProperty(t,"materialize",{enumerable:!0,get:function(){return K.materialize}});var G=r(7446);Object.defineProperty(t,"max",{enumerable:!0,get:function(){return G.max}});var J=r(6094);Object.defineProperty(t,"merge",{enumerable:!0,get:function(){return J.merge}});var Z=r(4594);Object.defineProperty(t,"mergeAll",{enumerable:!0,get:function(){return Z.mergeAll}});var X=r(2735);Object.defineProperty(t,"flatMap",{enumerable:!0,get:function(){return X.flatMap}});var ee=r(9010);Object.defineProperty(t,"mergeMap",{enumerable:!0,get:function(){return ee.mergeMap}});var te=r(8983);Object.defineProperty(t,"mergeMapTo",{enumerable:!0,get:function(){return te.mergeMapTo}});var re=r(2170);Object.defineProperty(t,"mergeScan",{enumerable:!0,get:function(){return re.mergeScan}});var ne=r(3674);Object.defineProperty(t,"mergeWith",{enumerable:!0,get:function(){return ne.mergeWith}});var ie=r(1446);Object.defineProperty(t,"min",{enumerable:!0,get:function(){return ie.min}});var oe=r(2318);Object.defineProperty(t,"multicast",{enumerable:!0,get:function(){return oe.multicast}});var se=r(3165);Object.defineProperty(t,"observeOn",{enumerable:!0,get:function(){return se.observeOn}});var ae=r(4764);Object.defineProperty(t,"onErrorResumeNext",{enumerable:!0,get:function(){return ae.onErrorResumeNext}});var ue=r(402);Object.defineProperty(t,"pairwise",{enumerable:!0,get:function(){return ue.pairwise}});var ce=r(5960);Object.defineProperty(t,"partition",{enumerable:!0,get:function(){return ce.partition}});var le=r(5658);Object.defineProperty(t,"pluck",{enumerable:!0,get:function(){return le.pluck}});var fe=r(3881);Object.defineProperty(t,"publish",{enumerable:!0,get:function(){return fe.publish}});var pe=r(1755);Object.defineProperty(t,"publishBehavior",{enumerable:!0,get:function(){return pe.publishBehavior}});var de=r(9801);Object.defineProperty(t,"publishLast",{enumerable:!0,get:function(){return de.publishLast}});var he=r(5021);Object.defineProperty(t,"publishReplay",{enumerable:!0,get:function(){return he.publishReplay}});var ye=r(2749);Object.defineProperty(t,"race",{enumerable:!0,get:function(){return ye.race}});var ve=r(9925);Object.defineProperty(t,"raceWith",{enumerable:!0,get:function(){return ve.raceWith}});var me=r(1678);Object.defineProperty(t,"reduce",{enumerable:!0,get:function(){return me.reduce}});var be=r(1194);Object.defineProperty(t,"repeat",{enumerable:!0,get:function(){return be.repeat}});var ge=r(7085);Object.defineProperty(t,"repeatWhen",{enumerable:!0,get:function(){return ge.repeatWhen}});var _e=r(7524);Object.defineProperty(t,"retry",{enumerable:!0,get:function(){return _e.retry}});var we=r(548);Object.defineProperty(t,"retryWhen",{enumerable:!0,get:function(){return we.retryWhen}});var Oe=r(2711);Object.defineProperty(t,"refCount",{enumerable:!0,get:function(){return Oe.refCount}});var Se=r(6577);Object.defineProperty(t,"sample",{enumerable:!0,get:function(){return Se.sample}});var Ee=r(3815);Object.defineProperty(t,"sampleTime",{enumerable:!0,get:function(){return Ee.sampleTime}});var Te=r(7250);Object.defineProperty(t,"scan",{enumerable:!0,get:function(){return Te.scan}});var je=r(842);Object.defineProperty(t,"sequenceEqual",{enumerable:!0,get:function(){return je.sequenceEqual}});var Pe=r(9728);Object.defineProperty(t,"share",{enumerable:!0,get:function(){return Pe.share}});var Ie=r(7768);Object.defineProperty(t,"shareReplay",{enumerable:!0,get:function(){return Ie.shareReplay}});var xe=r(2445);Object.defineProperty(t,"single",{enumerable:!0,get:function(){return xe.single}});var Ae=r(6262);Object.defineProperty(t,"skip",{enumerable:!0,get:function(){return Ae.skip}});var Ne=r(7397);Object.defineProperty(t,"skipLast",{enumerable:!0,get:function(){return Ne.skipLast}});var ke=r(9900);Object.defineProperty(t,"skipUntil",{enumerable:!0,get:function(){return ke.skipUntil}});var Me=r(1620);Object.defineProperty(t,"skipWhile",{enumerable:!0,get:function(){return Me.skipWhile}});var De=r(3424);Object.defineProperty(t,"startWith",{enumerable:!0,get:function(){return De.startWith}});var Re=r(831);Object.defineProperty(t,"subscribeOn",{enumerable:!0,get:function(){return Re.subscribeOn}});var Ce=r(411);Object.defineProperty(t,"switchAll",{enumerable:!0,get:function(){return Ce.switchAll}});var $e=r(7222);Object.defineProperty(t,"switchMap",{enumerable:!0,get:function(){return $e.switchMap}});var Fe=r(6464);Object.defineProperty(t,"switchMapTo",{enumerable:!0,get:function(){return Fe.switchMapTo}});var qe=r(4434);Object.defineProperty(t,"switchScan",{enumerable:!0,get:function(){return qe.switchScan}});var Le=r(7138);Object.defineProperty(t,"take",{enumerable:!0,get:function(){return Le.take}});var Be=r(4288);Object.defineProperty(t,"takeLast",{enumerable:!0,get:function(){return Be.takeLast}});var Ue=r(7341);Object.defineProperty(t,"takeUntil",{enumerable:!0,get:function(){return Ue.takeUntil}});var Ve=r(653);Object.defineProperty(t,"takeWhile",{enumerable:!0,get:function(){return Ve.takeWhile}});var ze=r(8668);Object.defineProperty(t,"tap",{enumerable:!0,get:function(){return ze.tap}});var Qe=r(9466);Object.defineProperty(t,"throttle",{enumerable:!0,get:function(){return Qe.throttle}});var Ye=r(9705);Object.defineProperty(t,"throttleTime",{enumerable:!0,get:function(){return Ye.throttleTime}});var We=r(8062);Object.defineProperty(t,"throwIfEmpty",{enumerable:!0,get:function(){return We.throwIfEmpty}});var He=r(6610);Object.defineProperty(t,"timeInterval",{enumerable:!0,get:function(){return He.timeInterval}});var Ke=r(6279);Object.defineProperty(t,"timeout",{enumerable:!0,get:function(){return Ke.timeout}});var Ge=r(8132);Object.defineProperty(t,"timeoutWith",{enumerable:!0,get:function(){return Ge.timeoutWith}});var Je=r(4553);Object.defineProperty(t,"timestamp",{enumerable:!0,get:function(){return Je.timestamp}});var Ze=r(2378);Object.defineProperty(t,"toArray",{enumerable:!0,get:function(){return Ze.toArray}});var Xe=r(4768);Object.defineProperty(t,"window",{enumerable:!0,get:function(){return Xe.window}});var et=r(131);Object.defineProperty(t,"windowCount",{enumerable:!0,get:function(){return et.windowCount}});var tt=r(9579);Object.defineProperty(t,"windowTime",{enumerable:!0,get:function(){return tt.windowTime}});var rt=r(752);Object.defineProperty(t,"windowToggle",{enumerable:!0,get:function(){return rt.windowToggle}});var nt=r(582);Object.defineProperty(t,"windowWhen",{enumerable:!0,get:function(){return nt.windowWhen}});var it=r(4255);Object.defineProperty(t,"withLatestFrom",{enumerable:!0,get:function(){return it.withLatestFrom}});var ot=r(3253);Object.defineProperty(t,"zip",{enumerable:!0,get:function(){return ot.zip}});var st=r(7220);Object.defineProperty(t,"zipAll",{enumerable:!0,get:function(){return st.zipAll}});var at=r(9287);Object.defineProperty(t,"zipWith",{enumerable:!0,get:function(){return at.zipWith}})},2943:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ApiCallContext=void 0,t.ApiCallContext=class{constructor(e){this.endpointId=e.endpointId,this.url=e.url,this.method=e.method,this.headers=e.headers,this.body=e.body,this.queryParams=e.queryParams,this.pathParams=e.pathParams,this.serverUrlOverride=e.serverUrlOverride}}},5218:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4125:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiscoverOpenApiSchemaRequestSchema=t.UpdateAllowedHostsRequestSchema=t.DiscoverGraphQLConnectionSchemaRequestSchema=t.DiscoverDataConnectionSchemaRequestSchema=t.TestDataConnectionRequestSchema=t.DeleteIntegrationRequestSchema=t.UpsertIntegrationRequestSchema=t.UpdateOpenIdProviderRequestSchema=void 0;const n=r(1186);t.UpdateOpenIdProviderRequestSchema={type:"object",required:["openIdProvider"],properties:{openIdProvider:{type:"object",required:["providerType","clientId","domain"],properties:{providerType:{type:"string",const:"auth0"},clientId:{type:"string",nullable:!1},domain:{type:"string",nullable:!1}}}}};const i={type:"object",nullable:!1,required:["secrets","host","user","database"],properties:{host:{type:"string",nullable:!1},user:{type:"string",nullable:!1},database:{type:"string",nullable:!1},secrets:{type:"object",required:["password"],nullable:!1,properties:{password:{type:"string",nullable:!1,isSecret:{}}}},connectionLimit:{type:"number",nullable:!1}}},o={type:"object",nullable:!1,required:["secrets","host","user","database"],properties:{host:{type:"string",nullable:!1},user:{type:"string",nullable:!1},database:{type:"string",nullable:!1},secrets:{type:"object",required:["password"],nullable:!1,properties:{password:{type:"string",nullable:!1,isSecret:{}}}},connectionLimit:{type:"number",nullable:!1},sslEnabled:{type:"boolean",nullable:!1}}},s={type:"object",nullable:!1,required:["secrets","host","user","database"],properties:{host:{type:"string",nullable:!1},user:{type:"string",nullable:!1},database:{type:"string",nullable:!1},schema:{type:"string",nullable:!0},sslEnabled:{type:"boolean",nullable:!0},secrets:{type:"object",required:["password"],nullable:!1,properties:{password:{type:"string",nullable:!1,isSecret:{}},sslCertificate:{type:"string",nullable:!0,isSecret:{}}}},connectionLimit:{type:"number",nullable:!1}}},a={type:"object",nullable:!1,required:["connectionString"],properties:{connectionString:{type:"string",nullable:!1},user:{type:"string",nullable:!0},secrets:{type:"object",nullable:!1,properties:{password:{type:"string",nullable:!1,isSecret:{}}}},maxPoolSize:{type:"number",nullable:!1},minPoolSize:{type:"number",nullable:!1},socketTimeoutMS:{type:"number",nullable:!1},keepAlive:{type:"boolean",nullable:!1},directConnection:{type:"boolean",nullable:!1},ssl:{type:"object",nullable:!1,required:["certificateFile","validate"],properties:{certificateFile:{type:"string",nullable:!1},validate:{type:"boolean",nullable:!1}}}}},u={type:"object",nullable:!1,required:["baseUrl"],properties:{baseUrl:{type:"string",nullable:!1,format:"uri"}}},c={type:"object",required:[],properties:{account:{type:"string",nullable:!1},username:{type:"string",nullable:!1},database:{type:"string",nullable:!1},schema:{type:"string",nullable:!1},warehouse:{type:"string",nullable:!1},role:{type:"string",nullable:!1},secrets:{type:"object",required:["password"],nullable:!1,properties:{password:{type:"string",nullable:!1,isSecret:{}}}}}};t.UpsertIntegrationRequestSchema={type:"object",required:["type","id"],properties:{id:{type:"string",nullable:!1},schema:{type:"object",nullable:!0}},oneOf:[{type:"object",required:[],properties:{type:{const:n.IntegrationType.built_in_db}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.mysql},supportsExternalChanges:{type:"boolean",nullable:!0},configuration:{type:"object",nullable:!1,required:["connectionOptions"],properties:{connectionOptions:i}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.mssql},supportsExternalChanges:{type:"boolean",nullable:!0},configuration:{type:"object",nullable:!1,required:["connectionOptions"],properties:{connectionOptions:o}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.postgres},supportsExternalChanges:{type:"boolean",nullable:!0},configuration:{type:"object",nullable:!1,required:["connectionOptions"],properties:{connectionOptions:s}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.cockroach},configuration:{type:"object",nullable:!1,required:["connectionOptions"],properties:{connectionOptions:s}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.mongo},supportsExternalChanges:{type:"boolean",nullable:!0},configuration:{type:"object",nullable:!1,required:["connectionOptions"],properties:{connectionOptions:a}}}},{type:"object",required:[],properties:{type:{const:n.IntegrationType.api},configuration:{type:"object",nullable:!0,required:["discoveryOptions"],properties:{discoveryOptions:{type:"object",nullable:!1,required:["openApiSpecUrl"],properties:{openApiSpecUrl:{type:"string",nullable:!1}}}}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.graphql},configuration:{type:"object",nullable:!1,required:["connectionOptions"],properties:{connectionOptions:u}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.snowflake},configuration:{type:"object",nullable:!1,required:["connectionOptions"],properties:{connectionOptions:c}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.datadog},configuration:{type:"object",nullable:!1,required:["apiKey","appKey","datadogRegion"],properties:{apiKey:{type:"string",nullable:!1,isSecret:{}},appKey:{type:"string",nullable:!1,isSecret:{}},datadogRegion:{type:"string",nullable:!1,enum:Object.keys(n.datadogRegionMap)}}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.newrelic},configuration:{type:"object",nullable:!1,required:["apiKey","newRelicRegion"],properties:{apiKey:{type:"string",nullable:!1,isSecret:{}},newRelicRegion:{type:"string",nullable:!1,enum:Object.keys(n.newRelicRegionMap)}}}}}]},t.DeleteIntegrationRequestSchema={type:"object",required:["integrationId"],properties:{integrationId:{type:"string",nullable:!1}}},t.TestDataConnectionRequestSchema={type:"object",required:["type","configuration"],oneOf:[{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.mysql},configuration:{type:"object",required:["connectionOptions"],properties:{connectionOptions:i}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.mssql},configuration:{type:"object",required:["connectionOptions"],properties:{connectionOptions:o}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.postgres},configuration:{type:"object",required:["connectionOptions"],properties:{connectionOptions:s}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.cockroach},configuration:{type:"object",required:["connectionOptions"],properties:{connectionOptions:s}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.mongo},configuration:{type:"object",required:["connectionOptions"],properties:{connectionOptions:a}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.snowflake},configuration:{type:"object",required:["connectionOptions"],properties:{connectionOptions:c}}}},{type:"object",required:["configuration"],properties:{type:{const:n.IntegrationType.graphql},configuration:{type:"object",required:["connectionOptions"],properties:{connectionOptions:u}}}}]},t.DiscoverDataConnectionSchemaRequestSchema={type:"object",required:["integrationType"],oneOf:[{type:"object",required:["connectionOptions"],properties:{integrationType:{const:n.IntegrationType.mysql},connectionOptions:i}},{type:"object",required:["connectionOptions"],properties:{integrationType:{const:n.IntegrationType.mssql},connectionOptions:o}},{type:"object",required:["connectionOptions"],properties:{integrationType:{const:n.IntegrationType.snowflake},connectionOptions:c}},{type:"object",required:["connectionOptions"],properties:{integrationType:{const:n.IntegrationType.postgres},connectionOptions:s}},{type:"object",required:["connectionOptions"],properties:{integrationType:{const:n.IntegrationType.cockroach},connectionOptions:s}},{type:"object",required:["connectionOptions"],properties:{integrationType:{const:n.IntegrationType.mongo},connectionOptions:a}},{type:"object",properties:{integrationType:{const:n.IntegrationType.built_in_db}}}]},t.DiscoverGraphQLConnectionSchemaRequestSchema={type:"object",required:["integrationType"],properties:{integrationType:{const:n.IntegrationType.graphql},connectionOptions:u}},t.UpdateAllowedHostsRequestSchema={type:"object",required:["allowedHosts"],properties:{allowedHosts:{type:"array",nullable:!1,minItems:1,items:{type:"string",nullable:!1}}}},t.DiscoverOpenApiSchemaRequestSchema={type:"object",required:["discoveryOptions"],properties:{discoveryOptions:{type:"object",required:["openApiSpecUrl"],properties:{openApiSpecUrl:{type:"string",format:"uri"}}}}}},8030:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.CronExpression=void 0,(r=t.CronExpression||(t.CronExpression={})).EVERY_SECOND="* * * * * *",r.EVERY_5_SECONDS="*/5 * * * * *",r.EVERY_10_SECONDS="*/10 * * * * *",r.EVERY_30_SECONDS="*/30 * * * * *",r.EVERY_MINUTE="*/1 * * * *",r.EVERY_5_MINUTES="0 */5 * * * *",r.EVERY_10_MINUTES="0 */10 * * * *",r.EVERY_30_MINUTES="0 */30 * * * *",r.EVERY_HOUR="0 0-23/1 * * *",r.EVERY_2_HOURS="0 0-23/2 * * *",r.EVERY_3_HOURS="0 0-23/3 * * *",r.EVERY_4_HOURS="0 0-23/4 * * *",r.EVERY_5_HOURS="0 0-23/5 * * *",r.EVERY_6_HOURS="0 0-23/6 * * *",r.EVERY_7_HOURS="0 0-23/7 * * *",r.EVERY_8_HOURS="0 0-23/8 * * *",r.EVERY_9_HOURS="0 0-23/9 * * *",r.EVERY_10_HOURS="0 0-23/10 * * *",r.EVERY_11_HOURS="0 0-23/11 * * *",r.EVERY_12_HOURS="0 0-23/12 * * *",r.EVERY_DAY_AT_1AM="0 01 * * *",r.EVERY_DAY_AT_2AM="0 02 * * *",r.EVERY_DAY_AT_3AM="0 03 * * *",r.EVERY_DAY_AT_4AM="0 04 * * *",r.EVERY_DAY_AT_5AM="0 05 * * *",r.EVERY_DAY_AT_6AM="0 06 * * *",r.EVERY_DAY_AT_7AM="0 07 * * *",r.EVERY_DAY_AT_8AM="0 08 * * *",r.EVERY_DAY_AT_9AM="0 09 * * *",r.EVERY_DAY_AT_10AM="0 10 * * *",r.EVERY_DAY_AT_11AM="0 11 * * *",r.EVERY_DAY_AT_NOON="0 12 * * *",r.EVERY_DAY_AT_1PM="0 13 * * *",r.EVERY_DAY_AT_2PM="0 14 * * *",r.EVERY_DAY_AT_3PM="0 15 * * *",r.EVERY_DAY_AT_4PM="0 16 * * *",r.EVERY_DAY_AT_5PM="0 17 * * *",r.EVERY_DAY_AT_6PM="0 18 * * *",r.EVERY_DAY_AT_7PM="0 19 * * *",r.EVERY_DAY_AT_8PM="0 20 * * *",r.EVERY_DAY_AT_9PM="0 21 * * *",r.EVERY_DAY_AT_10PM="0 22 * * *",r.EVERY_DAY_AT_11PM="0 23 * * *",r.EVERY_DAY_AT_MIDNIGHT="0 0 * * *",r.EVERY_WEEK="0 0 * * 0",r.EVERY_WEEKDAY="0 0 * * 1-5",r.EVERY_WEEKEND="0 0 * * 6,0",r.EVERY_1ST_DAY_OF_MONTH_AT_MIDNIGHT="0 0 1 * *",r.EVERY_1ST_DAY_OF_MONTH_AT_NOON="0 12 1 * *",r.EVERY_2ND_HOUR="0 */2 * * *",r.EVERY_2ND_HOUR_FROM_1AM_THROUGH_11PM="0 1-23/2 * * *",r.EVERY_2ND_MONTH="0 0 1 */2 *",r.EVERY_QUARTER="0 0 1 */3 *",r.EVERY_6_MONTHS="0 0 1 */6 *",r.EVERY_YEAR="0 0 1 0 *",r.EVERY_30_MINUTES_BETWEEN_9AM_AND_5PM="0 */30 9-17 * * *",r.EVERY_30_MINUTES_BETWEEN_9AM_AND_6PM="0 */30 9-18 * * *",r.EVERY_30_MINUTES_BETWEEN_10AM_AND_7PM="0 */30 10-19 * * *",r.MONDAY_TO_FRIDAY_AT_1AM="0 0 01 * * 1-5",r.MONDAY_TO_FRIDAY_AT_2AM="0 0 02 * * 1-5",r.MONDAY_TO_FRIDAY_AT_3AM="0 0 03 * * 1-5",r.MONDAY_TO_FRIDAY_AT_4AM="0 0 04 * * 1-5",r.MONDAY_TO_FRIDAY_AT_5AM="0 0 05 * * 1-5",r.MONDAY_TO_FRIDAY_AT_6AM="0 0 06 * * 1-5",r.MONDAY_TO_FRIDAY_AT_7AM="0 0 07 * * 1-5",r.MONDAY_TO_FRIDAY_AT_8AM="0 0 08 * * 1-5",r.MONDAY_TO_FRIDAY_AT_9AM="0 0 09 * * 1-5",r.MONDAY_TO_FRIDAY_AT_09_30AM="0 30 09 * * 1-5",r.MONDAY_TO_FRIDAY_AT_10AM="0 0 10 * * 1-5",r.MONDAY_TO_FRIDAY_AT_11AM="0 0 11 * * 1-5",r.MONDAY_TO_FRIDAY_AT_11_30AM="0 30 11 * * 1-5",r.MONDAY_TO_FRIDAY_AT_12PM="0 0 12 * * 1-5",r.MONDAY_TO_FRIDAY_AT_1PM="0 0 13 * * 1-5",r.MONDAY_TO_FRIDAY_AT_2PM="0 0 14 * * 1-5",r.MONDAY_TO_FRIDAY_AT_3PM="0 0 15 * * 1-5",r.MONDAY_TO_FRIDAY_AT_4PM="0 0 16 * * 1-5",r.MONDAY_TO_FRIDAY_AT_5PM="0 0 17 * * 1-5",r.MONDAY_TO_FRIDAY_AT_6PM="0 0 18 * * 1-5",r.MONDAY_TO_FRIDAY_AT_7PM="0 0 19 * * 1-5",r.MONDAY_TO_FRIDAY_AT_8PM="0 0 20 * * 1-5",r.MONDAY_TO_FRIDAY_AT_9PM="0 0 21 * * 1-5",r.MONDAY_TO_FRIDAY_AT_10PM="0 0 22 * * 1-5",r.MONDAY_TO_FRIDAY_AT_11PM="0 0 23 * * 1-5"},7545:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExecuteBackendFunctionRequestSchema=void 0,t.ExecuteBackendFunctionRequestSchema={type:"object",required:["functionName","paramsArrayStr","clientRequestId","clientId"],properties:{functionName:{type:"string",nullable:!1},paramsArrayStr:{type:"string",nullable:!1},clientRequestId:{type:"string",nullable:!1},clientId:{type:"string",nullable:!1}}}},9235:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},6421:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.transformResponse=t.transformParams=t.executeFunctionSecureAnnotationType=void 0;const n=r(2574),i=r(2251),o=r(5250),s=r(326),a=r(2943),u=r(7627);t.executeFunctionSecureAnnotationType=["secureDistributedLock","secureQuery","secureMutation","secureNamedQuery","secureGraphQL","secureApi"],t.transformParams=function(e,t){switch(t){case"webhook":case"executable":case"trigger":case"transformRead":case"transformWrite":case"metadata":return e;case"scheduler":return[];case"secureQuery":return[new n.QueryContext(e[0].query)];case"secureMutation":return[new i.MutationContext(e[0].mutation,e[0].beforeAndAfterDocs,e[0].serverTimestamp)];case"secureNamedQuery":return[new o.NamedQueryContext(e[0])];case"secureDistributedLock":return[new u.DistributedLockContext(e[0].mutex,e[0].exclusive)];case"secureGraphQL":return[new s.GraphqlContext(e[0])];case"secureApi":return[new a.ApiCallContext(e[0])]}},t.transformResponse=function(e,r){return t.executeFunctionSecureAnnotationType.includes(r)?{rulesPassed:e,docsToHash:e?{}:void 0}:e}},1277:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3889:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},720:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3085:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},7627:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DistributedLockContext=void 0,t.DistributedLockContext=class{constructor(e,t){this.mutex=e,this.exclusive=t}}},4385:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hasDocumentDiff=t.getSquidDocId=t.parseSquidDocId=void 0;const n=r(9312).__importDefault(r(2091)),i=r(1636),o=r(4684);function s(e){return(0,o.deserializeObj)(e)}t.parseSquidDocId=s,t.getSquidDocId=function(...e){const[t,r,n]=e,i="object"==typeof t?t:{docId:t,collectionName:r,integrationId:n};return i.integrationId||(i.integrationId=void 0),(0,o.normalizeJsonAsString)(i)},t.hasDocumentDiff=function(e,t){const r=(0,n.default)(e,t)||[],a=["__docId__","__ts__"],u=r.find((e=>{var t;return"__docId__"===(null===(t=e.path)||void 0===t?void 0:t[0])}));if(u){if("E"!==u.kind||!u.rhs)throw new Error(`Unexpected diff for __docId__: ${(0,o.normalizeJsonAsString)(u)}`);const e=s(u.rhs+"");a.push(...Object.keys(e))}return!!(null==r?void 0:r.find(((e,t)=>{var r;if(a.includes(null===(r=e.path)||void 0===r?void 0:r[0]))return!1;switch(e.kind){case"N":return(0,i.isNotNullish)(e.rhs);case"E":case"D":case"A":return!0}return!1})))}},326:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GraphqlContext=void 0,t.GraphqlContext=class{constructor(e){this.isGraphiQL=e.isGraphiQL,this.query=e.query,this.operationName=e.operationName,this.variables=e.variables}}},9231:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmptyIntrospection=void 0,t.EmptyIntrospection={__schema:{queryType:{name:"Query",kind:"OBJECT"},mutationType:null,subscriptionType:null,types:[{name:"Query",kind:"OBJECT",fields:[{name:"isEmpty",type:{kind:"SCALAR",name:"Boolean"},args:[],isDeprecated:!1,deprecationReason:null}],interfaces:[]},{name:"Boolean",kind:"SCALAR"}],directives:[]}}},7008:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.HttpStatus=void 0,(r=t.HttpStatus||(t.HttpStatus={}))[r.CONTINUE=100]="CONTINUE",r[r.SWITCHING_PROTOCOLS=101]="SWITCHING_PROTOCOLS",r[r.PROCESSING=102]="PROCESSING",r[r.EARLYHINTS=103]="EARLYHINTS",r[r.OK=200]="OK",r[r.CREATED=201]="CREATED",r[r.ACCEPTED=202]="ACCEPTED",r[r.NON_AUTHORITATIVE_INFORMATION=203]="NON_AUTHORITATIVE_INFORMATION",r[r.NO_CONTENT=204]="NO_CONTENT",r[r.RESET_CONTENT=205]="RESET_CONTENT",r[r.PARTIAL_CONTENT=206]="PARTIAL_CONTENT",r[r.AMBIGUOUS=300]="AMBIGUOUS",r[r.MOVED_PERMANENTLY=301]="MOVED_PERMANENTLY",r[r.FOUND=302]="FOUND",r[r.SEE_OTHER=303]="SEE_OTHER",r[r.NOT_MODIFIED=304]="NOT_MODIFIED",r[r.TEMPORARY_REDIRECT=307]="TEMPORARY_REDIRECT",r[r.PERMANENT_REDIRECT=308]="PERMANENT_REDIRECT",r[r.BAD_REQUEST=400]="BAD_REQUEST",r[r.UNAUTHORIZED=401]="UNAUTHORIZED",r[r.PAYMENT_REQUIRED=402]="PAYMENT_REQUIRED",r[r.FORBIDDEN=403]="FORBIDDEN",r[r.NOT_FOUND=404]="NOT_FOUND",r[r.METHOD_NOT_ALLOWED=405]="METHOD_NOT_ALLOWED",r[r.NOT_ACCEPTABLE=406]="NOT_ACCEPTABLE",r[r.PROXY_AUTHENTICATION_REQUIRED=407]="PROXY_AUTHENTICATION_REQUIRED",r[r.REQUEST_TIMEOUT=408]="REQUEST_TIMEOUT",r[r.CONFLICT=409]="CONFLICT",r[r.GONE=410]="GONE",r[r.LENGTH_REQUIRED=411]="LENGTH_REQUIRED",r[r.PRECONDITION_FAILED=412]="PRECONDITION_FAILED",r[r.PAYLOAD_TOO_LARGE=413]="PAYLOAD_TOO_LARGE",r[r.URI_TOO_LONG=414]="URI_TOO_LONG",r[r.UNSUPPORTED_MEDIA_TYPE=415]="UNSUPPORTED_MEDIA_TYPE",r[r.REQUESTED_RANGE_NOT_SATISFIABLE=416]="REQUESTED_RANGE_NOT_SATISFIABLE",r[r.EXPECTATION_FAILED=417]="EXPECTATION_FAILED",r[r.I_AM_A_TEAPOT=418]="I_AM_A_TEAPOT",r[r.MISDIRECTED=421]="MISDIRECTED",r[r.UNPROCESSABLE_ENTITY=422]="UNPROCESSABLE_ENTITY",r[r.FAILED_DEPENDENCY=424]="FAILED_DEPENDENCY",r[r.PRECONDITION_REQUIRED=428]="PRECONDITION_REQUIRED",r[r.TOO_MANY_REQUESTS=429]="TOO_MANY_REQUESTS",r[r.INTERNAL_SERVER_ERROR=500]="INTERNAL_SERVER_ERROR",r[r.NOT_IMPLEMENTED=501]="NOT_IMPLEMENTED",r[r.BAD_GATEWAY=502]="BAD_GATEWAY",r[r.SERVICE_UNAVAILABLE=503]="SERVICE_UNAVAILABLE",r[r.GATEWAY_TIMEOUT=504]="GATEWAY_TIMEOUT",r[r.HTTP_VERSION_NOT_SUPPORTED=505]="HTTP_VERSION_NOT_SUPPORTED"},575:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9312);n.__exportStar(r(2943),t),n.__exportStar(r(5218),t),n.__exportStar(r(4125),t),n.__exportStar(r(8030),t),n.__exportStar(r(7545),t),n.__exportStar(r(9235),t),n.__exportStar(r(6421),t),n.__exportStar(r(1277),t),n.__exportStar(r(3889),t),n.__exportStar(r(720),t),n.__exportStar(r(3085),t),n.__exportStar(r(7627),t),n.__exportStar(r(4385),t),n.__exportStar(r(326),t),n.__exportStar(r(9231),t),n.__exportStar(r(7008),t),n.__exportStar(r(1186),t),n.__exportStar(r(6778),t),n.__exportStar(r(3858),t),n.__exportStar(r(2251),t),n.__exportStar(r(5263),t),n.__exportStar(r(2792),t),n.__exportStar(r(5250),t),n.__exportStar(r(7581),t),n.__exportStar(r(1012),t),n.__exportStar(r(2574),t),n.__exportStar(r(2972),t),n.__exportStar(r(791),t),n.__exportStar(r(1906),t),n.__exportStar(r(6504),t),n.__exportStar(r(5098),t),n.__exportStar(r(1391),t),n.__exportStar(r(3851),t),n.__exportStar(r(5791),t),n.__exportStar(r(7104),t),n.__exportStar(r(9132),t),n.__exportStar(r(7682),t),n.__exportStar(r(3185),t),n.__exportStar(r(4825),t),n.__exportStar(r(7850),t),n.__exportStar(r(8255),t),n.__exportStar(r(7142),t),n.__exportStar(r(6485),t),n.__exportStar(r(3589),t),n.__exportStar(r(1636),t),n.__exportStar(r(8038),t),n.__exportStar(r(4684),t),n.__exportStar(r(8932),t),n.__exportStar(r(2608),t),n.__exportStar(r(8315),t),n.__exportStar(r(3811),t)},1186:(e,t)=>{"use strict";var r,n;function i(e){return[r.built_in_db,r.mongo,r.mysql,r.mssql,r.postgres,r.cockroach,r.snowflake].includes(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.isDataIntegrationType=t.isDataIntegration=t.newRelicRegionMap=t.datadogRegionMap=t.IntegrationType=t.IntegrationCategory=void 0,(n=t.IntegrationCategory||(t.IntegrationCategory={})).database="database",n.api="api",n.observability="observability",n.crm="crm",function(e){e.built_in_db="built_in_db",e.mongo="mongo",e.mysql="mysql",e.mssql="mssql",e.postgres="postgres",e.cockroach="cockroach",e.api="api",e.graphql="graphql",e.snowflake="snowflake",e.datadog="datadog",e.newrelic="newrelic",e.algolia="algolia",e.elastic_observability="elastic_observability",e.elastic_search="elastic_search",e.elastic_enterprise_search="elastic_enterprise_search",e.sentry="sentry",e.sap_hana="sap_hana",e.salesforce_crm="salesforce_crm",e.documentdb="documentdb",e.dynamodb="dynamodb",e.cassandra="cassandra",e.clickhouse="clickhouse",e.alloydb="alloydb",e.spanner="spanner",e.db2="db2",e.mariadb="mariadb",e.oracledb="oracledb",e.redis="redis",e.xata="xata",e.azure_sql="azure_sql"}(r=t.IntegrationType||(t.IntegrationType={})),t.datadogRegionMap={us1:"US1 - East",us3:"US3 - West",us5:"US5 - Central",eu1:"EU1 - Europe","us1-fed":"US1-FED (FedRamp)"},t.newRelicRegionMap={worldwide:"Worldwide",eu:"Europe"},t.isDataIntegration=function(e){return i(e.type)},t.isDataIntegrationType=i},6778:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.LogLevel=void 0,(r=t.LogLevel||(t.LogLevel={})).TRACE="trace",r.DEBUG="debug",r.INFO="info",r.WARN="warn",r.ERROR="error"},3858:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.aggregationPeriodMap=void 0,t.aggregationPeriodMap={"1m":1,"5m":5,"15m":15,"1h":60,"1d":1440,"1w":10080}},2251:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MutationContext=void 0;const n=r(9312).__importStar(r(8784));t.MutationContext=class{constructor(e,t,r){this.mutation=e,this.beforeAndAfterDocs=t,this.serverTimeStamp=r}getMutationType(){return this.mutation.type}affectsPath(e){const t=this.beforeAndAfterDocs.before?n.get(this.beforeAndAfterDocs.before,e):void 0,r=this.beforeAndAfterDocs.after?n.get(this.beforeAndAfterDocs.after,e):void 0;return!n.isEqual(t,r)}}},5263:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MutationRequestSchema=void 0;const r={type:"string"},n={type:"object",required:["docId","integrationId","collectionName"],properties:{docId:r,integrationId:r,collectionName:r}},i={oneOf:[{type:"object",required:["type","properties","squidDocIdObj"],properties:{type:{type:"string",const:"insert"},properties:{type:"object"},squidDocIdObj:n}},{type:"object",required:["type","squidDocIdObj"],properties:{type:{type:"string",const:"delete"},squidDocIdObj:n}},{type:"object",required:[],properties:{type:{type:"string",const:"update"},squidDocIdObj:n,properties:{type:"object",patternProperties:{"[0-9a-zA-Z\\$_\\-\\.]+":{type:"array",minItems:1,items:{oneOf:[{type:"object",required:["type","fn","value"],properties:{type:{type:"string",const:"applyNumericFn"},fn:{type:"string",const:"increment"},value:{type:"number"}}},{type:"object",required:["type"],properties:{type:{type:"string",const:"removeProperty"}}},{type:"object",required:["type","value"],properties:{type:{type:"string",const:"update"},value:{}}},{type:"object",required:["type","fn","value"],properties:{type:{type:"string",const:"applyStringFn"},fn:{type:"string",const:"extendString"},value:r}},{type:"object",required:["type","fn"],properties:{type:{type:"string",const:"applyStringFn"},fn:{type:"string",const:"trim"}}}]}}}}}}]};t.MutationRequestSchema={type:"object",required:["clientId","integrationId","mutations"],properties:{clientId:r,integrationId:r,mutations:{type:"array",items:i}}}},2792:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reduceMutations=t.convertInsertToUpdate=t.applyUpdateMutation=t.mergeMutations=t.sortUpdateMutationProperties=void 0;const n=r(9312).__importStar(r(8784)),i=r(2937),o=r(7850),s=r(8038);function a(e,t){switch(t.type){case"applyNumericFn":return function(e,t){if("increment"===t.fn)return null==e?t.value:e+t.value;throw new Error("Unknown numeric function: "+JSON.stringify(t))}(e,t);case"applyStringFn":return function(e,t){switch(t.fn){case"trim":return"string"!=typeof e?e:e.trim();case"extendString":return null==e?t.value:e+t.value;default:throw new Error("Unknown string function: "+JSON.stringify(t))}}(e,t);case"update":return"object"==typeof t.value?n.cloneDeep(t.value):t.value;case"removeProperty":return;default:throw new Error("Unknown property mutation type: "+JSON.stringify(t))}}function u(e){return Object.entries(e.properties).sort((([e],[t])=>e.split(".").length-t.split(".").length))}function c(e,t){if("insert"===t.type)return t;if("delete"===t.type)return t;if("delete"===e.type)throw new Error("Cannot delete and then update");if((0,o.assertTruthy)("update"===t.type),"update"===e.type)return function(e,t){const r=n.cloneDeep(e);t=n.cloneDeep(t);for(const[e]of u(r)){const n=e.split(".").length;Object.entries(t.properties).some((([t])=>e.startsWith(t+".")&&n>t.split(".").length))&&delete r.properties[e]}for(const[e,n]of u(t))r.properties[e]=[...r.properties[e]||[],...n];return r}(e,t);const r=n.cloneDeep(e);for(const[e,n]of u(t)){const t=n;for(const n of t){const t=a((0,s.getInPath)(r.properties,e),n);void 0===t?(0,s.deleteInPath)(r.properties,e):(0,s.setInPath)(r.properties,e,t)}}return r}t.sortUpdateMutationProperties=u,t.mergeMutations=c,t.applyUpdateMutation=function(e,t){if(!e)return;const r=Object.assign({},e),n=u(t);for(const[e,t]of n){const n=t;for(const t of n){const n=a((0,s.getInPath)(r,e),t);void 0===n?(0,s.deleteInPath)(r,e):(0,s.setInPath)(r,e,n)}}return r},t.convertInsertToUpdate=function(e){const t={type:"update",squidDocIdObj:e.squidDocIdObj,properties:{}};for(const[r,n]of Object.entries(e.properties))t.properties[r]=[{type:"update",value:n}];return t},t.reduceMutations=function(e){let t=[];return(0,i.from)(e).pipe((0,i.groupBy)((e=>`${e.squidDocIdObj.integrationId}${e.squidDocIdObj.collectionName}/${e.squidDocIdObj.docId}`)),(0,i.mergeMap)((e=>e.pipe((0,i.reduce)(((e,t)=>c(e,t)))))),(0,i.toArray)()).subscribe((e=>{t=e})),t}},5250:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NamedQueryContext=void 0,t.NamedQueryContext=class{constructor(e){this.params=e}}},7581:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExecuteNamedQueryRequestSchema=void 0,t.ExecuteNamedQueryRequestSchema={type:"object",required:["integrationId","queryName","paramsRecordStr","clientRequestId","clientId"],properties:{integrationId:{type:"string",nullable:!1},queryName:{type:"string",nullable:!1},paramsRecordStr:{type:"string",nullable:!1},clientRequestId:{type:"string",nullable:!1},clientId:{type:"string",nullable:!1}}}},1012:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2972:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueryUnsubscribeRequestSchema=t.QueryRequestSchema=t.QuerySchema=void 0,t.QuerySchema={$id:"querySchema",type:"object",required:["collectionName","integrationId"],properties:{collectionName:{type:"string",nullable:!1},integrationId:{type:"string",nullable:!1},conditions:{type:"array",nullable:!1,items:{type:"object",nullable:!1,required:["fieldName","operator","value"],properties:{fieldName:{type:"string",nullable:!1},operator:{type:"string",nullable:!1,enum:["==",">=","<=",">","<","!=","like","not like","like_cs","not like_cs"]},value:{$ref:"querySchema#/definitions/conditionValueSchema"}}}},sortOrder:{type:"array",nullable:!1,items:{type:"object",required:["fieldName","asc"],properties:{fieldName:{type:"string"},asc:{type:"boolean"}}}},limit:{type:"number",nullable:!1}},definitions:{conditionValueSchema:{oneOf:[{type:"null",nullable:!0},{type:"string",nullable:!1},{type:"number",nullable:!1},{type:"boolean",nullable:!1},{type:"array",nullable:!1,items:{$ref:"querySchema#/definitions/conditionValueSchema"}},{type:"object",nullable:!1,patternProperties:{"[0-9a-zA-Z\\$_\\-\\.]{1,64}":{$ref:"querySchema#/definitions/conditionValueSchema"}}}]}}},t.QueryRequestSchema={type:"object",required:["clientId","clientRequestId","query","subscribe"],properties:{clientId:{type:"string",nullable:!1},clientRequestId:{type:"string",nullable:!1},query:t.QuerySchema,subscribe:{type:"boolean",nullable:!1}}},t.QueryUnsubscribeRequestSchema={type:"object",required:["clientId","clientRequestId"],properties:{clientId:{type:"string",nullable:!1},clientRequestId:{type:"string",nullable:!1}}}},791:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseQuerySubscriptionId=t.getQuerySubscriptionId=t.compareOperator=t.findQueriesForDocumentSync=t.SimpleQueryMappingManager=t.QueryMappingManager=void 0;const n=r(1636),i=r(8038),o=r(4684);class s{}function a(e,t){var r;const s=[...e.unconditional||[]],a=new Set,c=new Map;for(const[s,l]of Object.entries(e.conditional||{})){const e=(0,o.decodeValueForMapping)(s);for(const[s,f]of Object.entries(l)){const l=[],p=null!==(r=(0,i.getInPath)(t,e))&&void 0!==r?r:null,d=(0,o.encodeValueForMapping)(p);switch(s){case"==":l.push(...f[d]||[]);break;case"!=":{(f[d]||[]).forEach((e=>a.add(e)));const e=Object.entries(f).filter((([e])=>e!==d));for(const[t,r]of e)l.push(...r);break}case"<":case"<=":case">":case">=":case"like":case"not like":case"like_cs":case"not like_cs":(0,n.isNotNullish)(p)&&l.push(...Object.entries(f).filter((([e])=>u((0,o.decodeValueForMapping)(e),(0,o.recodeValue)(p),s))).reduce(((e,[t,r])=>(e.push(...r),e)),[]));break;default:throw new Error("Unsupported operator: "+s)}for(const e of l)c.set(e,(c.get(e)||0)+1)}}for(const[t,r]of c.entries())a.has(t)||r>=e.queriesMetadata[t].condCount&&s.push(t);return s}function u(e,t,r){if(null===e||null===t)return!1;switch(r){case"<":return t<e;case"<=":return t<=e;case">":return t>e;case">=":return t>=e;case"like":return"string"==typeof t&&"string"==typeof e&&c(t,e,!1);case"not like":return!("string"==typeof t&&"string"==typeof e&&c(t,e,!1));case"like_cs":return"string"==typeof t&&"string"==typeof e&&c(t,e,!0);case"not like_cs":return!("string"==typeof t&&"string"==typeof e&&c(t,e,!0));default:throw new Error(`Unsupported operator comparison: ${r}`)}}function c(e,t,r){r||(e=e.toLowerCase(),t=t.toLowerCase());const n=t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&").replace(/%/g,".*");return new RegExp(`^${n}$`).test(e)}t.QueryMappingManager=s,t.SimpleQueryMappingManager=class extends s{async findQueriesForDocument(e,t,r,n){const i=await this.getMapping(e,r,n);return i?a(i,t):[]}},t.findQueriesForDocumentSync=a,t.compareOperator=u,t.getQuerySubscriptionId=function(e,t){return`${e}_${t}`},t.parseQuerySubscriptionId=function(e){const t=e.split("_");return{clientId:t[0],clientRequestId:t[1]}}},2574:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9312);n.__exportStar(r(8556),t),n.__exportStar(r(1515),t)},8556:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueryContext=void 0;const n=r(8784),i={"in:in":(e,t)=>e.every((e=>t.includes(e))),"in:not in":(e,t)=>e.every((e=>!t.includes(e))),"not in:not in":(e,t)=>t.every((t=>e.includes(t))),">:not in":(e,t)=>t.every((t=>e>=t)),">=:not in":(e,t)=>t.every((t=>e>t)),"<:not in":(e,t)=>t.every((t=>e<=t)),"<=:not in":(e,t)=>t.every((t=>e<t)),">:>":(e,t)=>e>=t,">=:>":(e,t)=>e>t,"in:>":(e,t)=>e.every((e=>e>t)),">:>=":(e,t)=>e>=t,">=:>=":(e,t)=>e>=t,"in:>=":(e,t)=>e.every((e=>e>=t)),"<:<":(e,t)=>e<=t,"<=:<":(e,t)=>e<t,"in:<":(e,t)=>e.every((e=>e<t)),"<:<=":(e,t)=>e<=t,"<=:<=":(e,t)=>e<=t,"in:<=":(e,t)=>e.every((e=>e<=t))};t.QueryContext=class{constructor(e){this.query=e,this.query=e,this.parsedConditions=this.parseConditions(this.query.conditions)}get integrationId(){return this.query.integrationId}get collectionName(){return this.query.collectionName}get limit(){return this.query.limit}sortedBy(e){return!e.find(((e,t)=>{var r;return!(0,n.isEqual)(this.query.sortOrder[t],Object.assign(Object.assign({},e),{asc:null===(r=e.asc)||void 0===r||r}))}))}sortedByExact(e){return e.length===this.query.sortOrder.length&&this.sortedBy(e)}includes(e,t,r){return this.includesCondition({fieldName:e,operator:t,value:r})}includesCondition(e){const t=this.parsedConditions.filter((t=>t.fieldName===e.fieldName));return!!t.length&&!!t.find((t=>this.evaluateIncludes(t,e)))}includesConditions(e){return this.parseConditions(e).every((e=>this.includesCondition(e)))}matchesConditions(e){const t=this.parseConditions(e);return this.parsedConditions.length===t.length&&t.every((e=>this.includesCondition(e)))}matchesQuery(e){if(e.collectionName!==this.collectionName||e.integrationId!==this.integrationId)return!1;const t=this.matchesConditions(e.conditions),r=this.sortedByExact(e.sortOrder),n=this.limit===e.limit;return t&&r&&n}isSubsetOf(e,t,r){return this.isSubsetOfCondition({fieldName:e,operator:t,value:r})}isSubsetOfCondition(e){return!!this.parsedConditions.filter((t=>t.fieldName===e.fieldName)).find((t=>this.evaluateSubset(t,e)))}isSubsetOfConditions(e){return this.parseConditions(e).every((e=>this.isSubsetOfCondition(e)))}isSubsetOfQuery(e){if(e.collectionName!==this.collectionName||e.integrationId!==this.integrationId)return!1;const t=this.isSubsetOfConditions(e.conditions),r=this.sortedBy(e.sortOrder),n=-1===e.limit||this.limit>-1&&this.limit<e.limit;return t&&r&&n}getConditionsFor(...e){return this.parsedConditions.filter((t=>e.includes(t.fieldName)))}getConditionsForField(e){return this.parsedConditions.filter((t=>t.fieldName===e))}evaluateSubset(e,t){const{operator:r,value:n}=e,{operator:o,value:s}=this.parseConditions([t])[0],a=i[`${r}:${o}`];return!!a&&a(n,s)}evaluateIncludes(e,t){const{operator:r,value:i}=e,{operator:o,value:s}=this.parseConditions([t])[0],a=Array.isArray(i)?i.sort():i,u=Array.isArray(s)?s.sort():s;return o===r&&(0,n.isEqual)(u,a)}parseConditions(e){const t=[],r=new Map,n=new Map;return e.forEach((e=>{switch(e.operator){case"==":case"in":r.set(e.fieldName,(r.get(e.fieldName)||[]).concat(e.value));break;case"!=":case"not in":n.set(e.fieldName,(n.get(e.fieldName)||[]).concat(e.value));break;default:t.push(e)}})),r.forEach(((e,r)=>{t.push({fieldName:r,operator:"in",value:e})})),n.forEach(((e,r)=>{t.push({fieldName:r,operator:"not in",value:e})})),t}}},1515:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SimpleQueryBuilder=void 0;const n=r(9312).__importStar(r(8784)),i=r(7850),o=r(8315);t.SimpleQueryBuilder=class{constructor(e,t){this.collectionName=e,this.integrationId=t,this.query={integrationId:t,collectionName:e,conditions:[],limit:-1,sortOrder:[]}}where(e,t,r){if("in"===t||"not in"===t){const n=r instanceof Array?[...r]:[r];for(const r of n)this.query.conditions.push({fieldName:e,operator:"in"===t?"==":"!=",value:r});return this}return this.query.conditions.push({fieldName:e,operator:t,value:r}),this}eq(e,t){return this.where(e,"==",t)}neq(e,t){return this.where(e,"!=",t)}in(e,t){return this.where(e,"in",t)}nin(e,t){return this.where(e,"not in",t)}gt(e,t){return this.where(e,">",t)}gte(e,t){return this.where(e,">=",t)}lt(e,t){return this.where(e,"<",t)}lte(e,t){return this.where(e,"<=",t)}like(e,t,r=!0){return this.where(e,r?"like_cs":"like",t)}notLike(e,t,r=!0){return this.where(e,r?"not like_cs":"not like",t)}limit(e){return(0,o.validateQueryLimit)(e),(0,i.assertTruthy)(-1===this.query.limit,"The limit was already set."),this.query.limit=e,this}sortBy(e,t=!0){const r={asc:t,fieldName:e};return(0,o.validateFieldSort)(r),(0,i.assertTruthy)(!this.query.sortOrder.some((t=>t.fieldName===e)),`${e} already in the sort list.`),this.query.sortOrder.push(r),this}build(){const e=this.mergeConditions();return Object.assign(Object.assign({},this.query),{conditions:e})}mergeConditions(){const e=[],t=n.groupBy(this.query.conditions||[],(e=>e.fieldName));for(const r of Object.values(t)){const t=n.groupBy(r,(e=>e.operator));for(const[r,i]of Object.entries(t)){if("=="===r||"!="===r){e.push(...i);continue}const t=n.sortBy(i,(e=>e.value));">"===r||">="===r?e.push(t[t.length-1]):e.push(t[0])}}return e}}},1906:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.convertFromSquidRegion=t.convertToSquidRegion=t.getSquidSupportedCloudMap=t.squidSupportedRegionMap=t.supportedSquidRegions=void 0;const n=r(1636);t.supportedSquidRegions=["us-east-1.aws","local"],t.squidSupportedRegionMap={"us-east-1.aws":{id:"us-east-1",name:"US East (N. Virginia)"},local:{id:"local",name:"Local"}},t.getSquidSupportedCloudMap=function(e=!1){return{aws:{id:"aws",name:"Amazon Web Services",icon:"aws_icon",regions:[e?t.squidSupportedRegionMap.local:void 0,t.squidSupportedRegionMap["us-east-1.aws"]].filter(n.isNotNullish)},gcp:{id:"gcp",name:"Google Cloud Platform",icon:"gcp_icon",tooltip:"Google Cloud (GCP) support is coming soon!",regions:[]},azure:{id:"azure",name:"Microsoft Azure",icon:"azure_icon",tooltip:"Microsoft Azure support is coming soon!",regions:[]}}},t.convertToSquidRegion=function(e,t){return"local"===t?"local":`${t}.${e}`},t.convertFromSquidRegion=function(e){if("local"===e)return{cloudId:"aws",region:"local"};const t=e.split(".");return{cloudId:t[1],region:t[0]}}},6504:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findMatchingPropertiesForKey=t.validateSchema=t.compileSchema=t.SUPPORTED_FIELD_TYPES_ARRAY=void 0;const n=r(9312),i=n.__importDefault(r(6236)),o=n.__importDefault(r(8414)),s=n.__importDefault(r(2091)),a=r(7008),u=r(7850),c=r(8315),l=new i.default({allErrors:!0,allowUnionTypes:!1,useDefaults:!1});function f(e){return l.compile(e)}function p(e,t){const r={exactMatch:[],parentsMatch:[]};if(!e.length)return r.exactMatch.push(t),r;r.parentsMatch.push(t);const n=[...e];for(;n.length;){const e=d(t,(0,u.notNullish)(n.shift()));for(const t of e){const e=p(n,t);r.parentsMatch.push(...e.parentsMatch),r.exactMatch.push(...e.exactMatch)}}return r}function d(e,t){var r,n;const i=(null===(r=e.properties)||void 0===r?void 0:r[t])?[null===(n=e.properties)||void 0===n?void 0:n[t]]:[];return e.patternProperties&&i.push(...Object.entries(e.patternProperties).filter((([e])=>new RegExp(e).test(t))).map((([e,t])=>t))),i}(0,o.default)(l),l.addKeyword({keyword:"isDate",type:"object",validate:(e,t)=>e===t instanceof Date}),l.addKeyword({keyword:"isJSON",type:"object",validate:(e,t)=>{try{const e=JSON.stringify(t);return JSON.parse(e),!0}catch(e){return!1}}}),l.addKeyword({keyword:"isComputed",validate:(e,t)=>!e||null!==t}),l.addKeyword({keyword:"isDefaultComputed",validate:(e,t)=>!e||null!==t}),l.addKeyword({keyword:"primaryKey",validate:(e,t)=>!e||null!==t}),l.addKeyword({keyword:"insertable",validate:(e,t)=>!e||null!==t}),l.addKeyword({keyword:"deletable",validate:(e,t)=>!e||null!==t}),l.addKeyword({keyword:"applyDefaultValueOn",validate:(e,t)=>!e||["always","empty","updateOrEmpty"].includes(e)}),l.addKeyword({keyword:"dataType",validate:(e,t)=>!0}),t.SUPPORTED_FIELD_TYPES_ARRAY=["string","integer","number","date","boolean","map","array","any"],t.compileSchema=f,t.validateSchema=function(e,t,r=[],n={}){const i=f(e),o=i(t);if(!r.length&&!o)throw new c.ValidationError("The data does not conform with the collection schema.",a.HttpStatus.BAD_REQUEST,{errors:i.errors});if(!o&&r.length)for(const e of(0,u.truthy)(i.errors)){let t=e.instancePath;if(e.params.missingProperty&&(t=`${t}/${e.params.missingProperty}`),t=t.slice(1).replace(/\//g,".")+".",r.some((e=>t.startsWith(e+"."))))throw new c.ValidationError(`${t} does not conform with the collection schema.`,a.HttpStatus.BAD_REQUEST)}!function(e,t,r){if(r&&t.readOnly||!1===t.insertable&&!r)throw new c.ValidationError("The schema does not allow this action",a.HttpStatus.BAD_REQUEST);for(const n of e){const e=(0,u.truthy)(n.path).join("."),i=p((0,u.truthy)(n.path),t);for(const t of i.exactMatch){if(t.readOnly&&"E"===n.kind)throw new c.ValidationError(`${e} is readonly`,a.HttpStatus.BAD_REQUEST);if(r&&!1===t.deletable&&"D"===n.kind)throw new c.ValidationError(`${e} is not deletable`,a.HttpStatus.BAD_REQUEST);if(!1===t.insertable&&"N"===n.kind)throw new c.ValidationError(`${e} is not insertable`,a.HttpStatus.BAD_REQUEST)}for(const t of i.parentsMatch)if(r&&t.readOnly)throw new c.ValidationError(`${e} is readonly`,a.HttpStatus.BAD_REQUEST)}}((0,u.truthy)((0,s.default)(n,t)),e,!!r.length)},t.findMatchingPropertiesForKey=d},5098:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GenerateNewApiKeyRequestSchema=t.DeleteApiKeyRequestSchema=t.DeleteCustomSecretRequestSchema=t.SetCustomSecretRequestSchema=void 0,t.SetCustomSecretRequestSchema={type:"object",required:["key","value"],properties:{key:{type:"string",pattern:"[a-zA-Z0-9-_+]",nullable:!1},value:{type:"string",nullable:!1}}},t.DeleteCustomSecretRequestSchema={type:"object",required:["key"],properties:{key:{type:"string",pattern:"[a-zA-Z0-9-_]+",nullable:!1,isSecret:{}}}},t.DeleteApiKeyRequestSchema={type:"object",required:["key"],properties:{key:{type:"string",pattern:"[a-zA-Z0-9-_]+",nullable:!1,isSecret:{collection:"apiKeys"}}}},t.GenerateNewApiKeyRequestSchema={type:"object",required:["key"],properties:{key:{type:"string",pattern:"[a-zA-Z0-9-_]+",nullable:!1,isSecret:{}}}}},1391:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3851:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},5791:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessageFromClientSchema=void 0,t.MessageFromClientSchema={type:"object",required:["type"],oneOf:[{required:["payload"],properties:{type:{const:"acknowledge"},payload:{type:"array",nullable:!1,minItems:1,items:{type:"string",nullable:!1}}}},{properties:{type:{const:"catchup"}}},{properties:{type:{const:"kill"}}},{properties:{type:{const:"acquireLock"},payload:{type:"object",required:["mutex","exclusive","clientRequestId"],properties:{mutex:{type:"string"},exclusive:{type:"boolean"},clientRequestId:{type:"string"}}}}},{properties:{type:{const:"releaseLock"},payload:{type:"object",required:["lockId","clientRequestId"],properties:{lockId:{type:"string"},clientRequestId:{type:"string"}}}}}]}},7104:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9132:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SECONDS_PER_MONTH=t.SECONDS_PER_WEEK=t.SECONDS_PER_DAY=t.SECONDS_PER_HOUR=t.SECONDS_PER_MINUTE=void 0,t.SECONDS_PER_MINUTE=60,t.SECONDS_PER_HOUR=60*t.SECONDS_PER_MINUTE,t.SECONDS_PER_DAY=24*t.SECONDS_PER_HOUR,t.SECONDS_PER_WEEK=7*t.SECONDS_PER_DAY,t.SECONDS_PER_MONTH=30*t.SECONDS_PER_DAY},7682:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3185:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4825:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.arrayMergeCustomizer=t.asyncGroupBy=t.removeSorted=t.insertSorted=t.binarySearch=void 0;const n=r(8784);function i(e,t,r=((e,t)=>e>t?1:e<t?-1:0),n=0,o=e.length-1){if(o<n)return-1;const s=Math.trunc((n+o)/2);return 0===r(t,e[s])?s:r(t,e[s])>0?i(e,t,r,s+1,o):i(e,t,r,n,s-1)}t.binarySearch=i,t.insertSorted=function(e,t,r=((e,t)=>e>t?1:e<t?-1:0)){let n;for(n=e.length-1;n>=0&&r(e[n],t)>0;n--)e[n+1]=e[n];e[n+1]=t},t.removeSorted=function(e,t,r=((e,t)=>e>t?1:e<t?-1:0)){const n=i(e,t,r);n>-1&&e.splice(n,1)},t.asyncGroupBy=async function(e,t){const r={};for(const n of e){const e=await t(n);r[e]||(r[e]=[]),r[e].push(n)}return r},t.arrayMergeCustomizer=(e,t)=>(0,n.isArray)(e)?e.concat(t):void 0},7850:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateTruthy=t.notNullish=t.truthy=t.assertValidateTruthy=t.assertNotNullish=t.assertTruthy=void 0;const n=r(7008),i=r(1636),o=r(8315);function s(e,t){if(e)return;const r="function"==typeof t?t():t;throw r instanceof Error?r:new Error(null!=r?r:"Assertion error")}function a(e,t){if((0,i.isNotNullish)(e))return;const r="function"==typeof t?t():t;throw r instanceof Error?r:new Error(null!=r?r:"Assertion error")}function u(e,t){return s(e,t),e}t.assertTruthy=s,t.assertNotNullish=a,t.assertValidateTruthy=function(e,t,r=n.HttpStatus.BAD_REQUEST,i){s(e,(()=>new o.ValidationError(t,r,i)))},t.truthy=u,t.notNullish=function(e,t){return a(e,t),e},t.validateTruthy=function(e,t,r=n.HttpStatus.BAD_REQUEST,i){return u(e,(()=>new o.ValidationError(t,r,i)))}},8255:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeExecutionError=void 0;class r extends Error{constructor(e,t){super(e),this.details=t}}t.CodeExecutionError=r},7142:(e,t)=>{"use strict";function r(e){return/^local/.test(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.getApplicationHttpHeaders=t.getApplicationUrl=void 0,t.getApplicationUrl=function(e,t){const n=new URL("https://squid.cloud");n.host=`${t}.${e}.${n.host}`,r(e)&&(n.protocol="http",n.port="8000",function(e){return/android$/.test(e)}(e)&&(n.host="10.0.2.2"));const i=n.toString();return i.endsWith("/")?i:i+"/"},t.getApplicationHttpHeaders=function(e,t){const n={};return r(e)&&(n["X-Squid-AppId"]=t),n}},6485:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateShortId=t.generateId=void 0,t.generateId=function(){let e=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){const r=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"===t?r:3&r|8).toString(16)}))},t.generateShortId=function(e=18){const t="abcdefghijklmnopqrstuvwxyz0123456789";let r="";for(let n=0;n<e;n++)r+=t.charAt(Math.floor(Math.random()*t.length));return r}},3589:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LockManager=void 0;const n=r(2937),i=r(7850);t.LockManager=class{constructor(){this.locks={}}async lock(...e){if(this.canGetLock(...e))return void this.lockSync(...e);const t=Object.entries(this.locks).filter((([t])=>e.includes(t))).map((([e,t])=>t));await(0,n.lastValueFrom)((0,n.combineLatest)(t).pipe((0,n.filter)((e=>!e.includes(!0))),(0,n.take)(1))),await this.lock(...e)}release(...e){for(const t of e){const e=(0,i.truthy)(this.locks[t]);e.next(!1),e.complete(),delete this.locks[t]}}canGetLock(...e){return!e.some((e=>{var t;return null===(t=this.locks[e])||void 0===t?void 0:t.value}))}lockSync(...e){(0,i.assertTruthy)(this.canGetLock(...e));for(const t of e)this.locks[t]=new n.BehaviorSubject(!0)}}},1636:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNotNullish=void 0,t.isNotNullish=function(e){return null!=e}},8038:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.replaceKeyInRecord=t.replaceKeyInMap=t.deepReplace=t.deleteInPath=t.setInPath=t.getInPath=void 0;const n=r(9312).__importStar(r(8784)),i=r(7850);function o(e){return"object"==typeof e&&Reflect.getPrototypeOf(e)===Object.prototype}t.getInPath=function(e,t,r="."){const n=t.split(r);let o,s=e;for(;s&&n.length;){const e=(0,i.truthy)(n.shift());if(!(s instanceof Object&&e in s))return;o=s[e],s=o}return o},t.setInPath=function(e,t,r,s="."){var a;const u=t.split(s);let c=e;for(;u.length;){const e=(0,i.truthy)(u.shift());if(u.length){const t=o(c[e])&&null!==(a=n.clone(c[e]))&&void 0!==a?a:{};c[e]=t,c=t}else c[e]=r}},t.deleteInPath=function(e,t,r="."){var s;const a=t.split(r);let u=e;for(;a.length;){const e=(0,i.truthy)(a.shift());if(a.length){const t=o(u[e])&&null!==(s=n.clone(u[e]))&&void 0!==s?s:{};u[e]=t,u=t}else delete u[e]}},t.deepReplace=function e(t,r,n){for(const i in t)i===r?t[i]=n(t[i]):Array.isArray(t[i])?t[i].forEach((t=>e(t,r,n))):"object"==typeof t[i]&&e(t[i],r,n)},t.replaceKeyInMap=function(e,t,r){if(e.has(t)){const n=e.get(t);e.delete(t),e.set(r,n)}},t.replaceKeyInRecord=function(e,t,r){const n=e[t];void 0!==n&&(e[r]=n,delete e[t])}},4684:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.recodeValue=t.decodeValueForMapping=t.encodeValueForMapping=t.deserializeObj=t.serializeObj=t.normalizeJsonAsString=void 0;const n=r(5382);function i(e){if(Array.isArray(e))return e.map((e=>i(e)));if("object"!=typeof e||null===e||e instanceof Date)return e;const t=Object.keys(e),r={};return t.sort().forEach((t=>{r[t]=i(e[t])})),r}function o(e){try{return n.EJSON.stringify(e)}catch(e){throw console.error("Unable to serialize object",e,"\n\nSTACK:",(new Error).stack),e}}function s(e){if(void 0===e)throw new Error("INVALID_ENCODE_VALUE");return btoa(JSON.stringify(e))}function a(e){return JSON.parse(atob(e))}t.normalizeJsonAsString=function(e){return o(i(e))},t.serializeObj=o,t.deserializeObj=function(e){return n.EJSON.parse(e)},t.encodeValueForMapping=s,t.decodeValueForMapping=a,t.recodeValue=function(e){return a(s(e))}},8932:(e,t)=>{"use strict";function r(e){return`${(e.getUTCHours()+"").padStart(2,"0")}:${(e.getUTCMinutes()+"").padStart(2,"0")}:${(e.getUTCSeconds()+"").padStart(2,"0")}`}Object.defineProperty(t,"__esModule",{value:!0}),t.dateToTimeString=t.msPastMidnightToTimeString=t.debeziumStringToInterval=t.base64ToBinary=t.base64ToString=t.isoStringToDate=t.msToDate=t.daysPastEpochToDate=t.moneyStringToNumber=t.JSONToString=t.stringToJSON=t.stringToBuffer=t.bufferToString=t.numberToString=t.stringToNumber=t.intToBoolean=t.booleanToInt=t.unchanged=void 0,t.unchanged=function(e){return e},t.booleanToInt=function(e){return e?1:0},t.intToBoolean=function(e){return!!e},t.stringToNumber=function(e){return Number(e)},t.numberToString=function(e){return e+""},t.bufferToString=function(e){return e.toString()},t.stringToBuffer=function(e){return Buffer.from(e)},t.stringToJSON=function(e){return JSON.parse(e)},t.JSONToString=function(e){return JSON.stringify(e)},t.moneyStringToNumber=function(e){return Number(e.replace(/[^0-9\.]+/g,""))},t.daysPastEpochToDate=function(e){return new Date(864e5*e)},t.msToDate=function(e){return new Date(e)},t.isoStringToDate=function(e){return new Date(e)},t.base64ToString=function(e){return atob(e)},t.base64ToBinary=function(e){const t=atob(e);let r="";for(let e=0;e<t.length;e++)r+=t[e].charCodeAt(0).toString(2);return r},t.debeziumStringToInterval=function(e){const t=e.match(/^P(\d+Y)?(\d+M)?(\d+D)?T?(\d+H)?(\d+M)?(\d+S)?$/);if(!t)throw new Error(`Interval string is not properly formatted: ${e}`);return{years:parseInt(t[1])||0,months:parseInt(t[2])||0,days:parseInt(t[3])||0,hours:parseInt(t[4])||0,minutes:parseInt(t[5])||0,seconds:parseInt(t[6])||0}},t.msPastMidnightToTimeString=function(e){return r(new Date(e))},t.dateToTimeString=r},2608:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.appendQueryParams=void 0,t.appendQueryParams=function(e,t){const r=new URL(e),n=new URLSearchParams(r.search);for(const e in t)t.hasOwnProperty(e)&&n.set(e,t[e]);return r.search=n.toString(),r.toString()}},8315:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hasOnlyKeys=t.isRightType=t.isNotEmpty=t.validateQueryLimit=t.validateMutations=t.validateOpenIdProviderType=t.validateOpenIdProvider=t.validateFieldSort=t.ValidationError=void 0;const n=r(7850);class i extends Error{constructor(e,t,r){super(e),this.statusCode=t,this.details=r}}function o(e){if(!e||!e.match(/^[a-zA-Z][a-zA-Z0-9!@#$%^&*~_]{0,49}$/))throw new Error("A document id and a collection id can contain only a-z, A-Z, 0-9,!@#$%^&*~_, startingwith a letter, at least one character, and up to 50.")}function s(e){if(!e||"string"!=typeof e)throw new Error("Field name has to be a non-empty string");if("__docId__"!==e&&!e.match(/^[a-zA-Z][a-zA-Z0-9!@#$%^&*~_]{0,49}$/))throw new Error("A Field name can contain only a-z, A-Z, 0-9,!@#$%^&*~_, starting with a letter, at least one character, and up to 50. Field name: "+e)}function a(e){(0,n.assertTruthy)(["auth0"].includes(e),"INVALID_OPEN_ID_PROVIDER_TYPE")}function u(e){if(!e||"object"!=typeof e)throw new Error("Property mutation need to be a JSON object.");if(!["update","applyNumericFn","applyStringFn"].includes(e.type))throw new Error("Property mutation can be of type 'update', 'applyNumericFn', 'applyStringFn'");switch(e.type){case"update":!function(e){if(!e||"update"!==e.type)throw new Error("Update value property mutation has to be of type update");if(void 0===e.value)throw new Error("Value has to exist in an update value property mutation..")}(e);break;case"applyNumericFn":!function(e){if(!e||"applyNumericFn"!==e.type)throw new Error("Apply numeric fn mutation has to be of type applyNumericFn");if(!["increment"].includes(e.fn))throw new Error("Invalid fn for apply numeric fn.");if("number"!=typeof e.value)throw new Error("The value in an apply numeric fn function has to be numeric.")}(e);break;case"applyStringFn":!function(e){if(!e||"applyStringFn"!==e.type)throw new Error("Apply string fn mutation has to be of type applyStringFn");if(!["trim","extendString"].includes(e.fn))throw new Error("Invalid fn for apply string fn.");if("string"!=typeof e.value)throw new Error("The value in an apply string fn function has to be a string.")}(e)}}function c(e){if(!e)throw new Error("Mutation cannot be empty");if(!["insert","delete","update"].includes(e.type))throw new Error("Mutation type has to be one of 'insert', 'delete', or 'update'");switch(function(e){if("string"!=typeof e||!e)throw new Error("Collection path has to be a non empty string");o(e)}(e.squidDocIdObj.collectionName),o(e.squidDocIdObj.docId),e.type){case"delete":!function(e){if(!e||"delete"!==e.type)throw new Error("Mutation has to be non empty with type delete.")}(e);break;case"insert":!function(e){if(!e||"insert"!==e.type)throw new Error("Mutation has to be non empty with type insert.");if(!e.properties||"object"!=typeof e.properties)throw new Error("The properties in insert mutation need to be a JSON object.");for(const[t]of Object.entries(e.properties))s(t)}(e);break;case"update":!function(e){if(!e||"update"!==e.type)throw new Error("Mutation has to be non empty with type update.");if(!e.properties||"object"!=typeof e.properties)throw new Error("The properties in update mutation need to be a JSON object.");const t=Object.entries(e.properties);for(const[e,r]of t){s(e);for(const e of r)u(e)}}(e)}}function l(e,t){return Array.isArray(e)?e.every((e=>typeof e===t)):typeof e===t}function f(e,t){return!Array.isArray(e)&&[...Object.keys(e)].every((e=>t.includes(e)))}t.ValidationError=i,t.validateFieldSort=function(e){if(!(e instanceof Object))throw new Error("Field sort has to be an object");(0,n.assertTruthy)(f(e,["fieldName","asc"]),"Field sort should only contain a fieldName and asc"),(0,n.assertTruthy)(l(e.asc,"boolean")),s(e.fieldName)},t.validateOpenIdProvider=function(e){return(0,n.assertTruthy)(e,"INVALID_PROVIDER"),a(e.providerType),(0,n.assertTruthy)(e.providerType,"INVALID_CLIENT_ID"),(0,n.assertTruthy)(e.clientId,"INVALID_CLIENT_ID"),(0,n.assertTruthy)(e.domain,"INVALID_DOMAIN"),e},t.validateOpenIdProviderType=a,t.validateMutations=function(e){if(!(e&&e instanceof Array&&e.length))throw new Error("The list of mutations has to be a non-empty array.");for(const t of e)c(t)},t.validateQueryLimit=function(e){(0,n.assertTruthy)(l(e,"number")),-1!==e&&((0,n.assertTruthy)(e>0,"query limit has to be greater than 0"),(0,n.assertTruthy)(Math.floor(e)===e,"query limit has to be an integer"),(0,n.assertTruthy)(e<=2e4,"Limit can be maximum 20000"))},t.isNotEmpty=function(e){return function(e){if(null!=e&&"string"!=typeof e)throw new Error("Unexpected input type "+typeof e)}(e),"string"==typeof e&&!!e},t.isRightType=l,t.hasOnlyKeys=f},3811:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isWebhookResponse=void 0,t.isWebhookResponse=function(e){return e&&e.__isWebhookResponse__}},4268:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ApiManager=void 0;const n=r(575),i=r(8784),o=r(2937),s=r(9978);t.ApiManager=class{constructor(e,t,r,n={}){this.clientId=e,this.rpcManager=t,this.socketManager=r,this.apiServerUrlOverrideMapping=n,this.ongoingApiExecutions={},r.observeNotifications().pipe((0,o.filter)((e=>"api"===e.type)),(0,s.map)((e=>e))).subscribe((e=>{this.handleApiResponse(e.clientRequestId,e).then()}))}callApiAndSubscribe(e,t,r){const i=(0,n.generateId)(),s=new o.Subject;this.ongoingApiExecutions[i]=s;const a={integrationId:e,endpointId:t,request:r,clientId:this.clientId,clientRequestId:i,serverUrlOverride:this.apiServerUrlOverrideMapping[e]};return this.rpcManager.post("api/call",a).catch((n=>{console.error("Got error while calling API",e,t,r,n),s.error(n),s.complete()})),s.pipe((0,o.finalize)((()=>{delete this.ongoingApiExecutions[i]})),(0,o.share)())}async handleApiResponse(e,t){const r=this.ongoingApiExecutions[e];r&&(t.success?r.next((0,n.deserializeObj)(t.payload)):r.error((0,i.pick)(t,"httpStatus","payload")),r.complete())}}},9526:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AuthManager=void 0;const n=r(2937);t.AuthManager=class{constructor(e,t){this.destructManager=e,this.apiKey=t,this.authIdTokenSet=new n.BehaviorSubject(!1),this.authIdTokenObservableSubject=new n.Subject,this.shouldWaitForAuth=!1,this.observeAuthIdToken().subscribe((e=>{this.idToken=e,this.authIdTokenSet.next(!0)}))}setAuthIdToken(e){this.shouldWaitForAuth=!0,this.authIdTokenSet.next(!1),this.authIdTokenObservableSubject.next(e&&"string"!=typeof e?(0,n.from)(e):(0,n.of)(e))}observeAuthIdToken(){return this.authIdTokenObservableSubject.pipe((0,n.switchMap)((e=>e)),(0,n.takeUntil)(this.destructManager.isDestructingObservable))}async waitForReadyState(){this.shouldWaitForAuth&&!this.destructManager.isDestructing&&await(0,n.firstValueFrom)((0,n.race)(this.authIdTokenSet.asObservable().pipe((0,n.filter)(Boolean)),this.destructManager.isDestructingObservable))}getApiKey(){return this.apiKey}getAuthToken(){return this.apiKey?{type:"ApiKey",token:this.apiKey}:this.idToken?{type:"Bearer",token:this.idToken}:void 0}}},8862:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BackendFunctionManager=void 0;const n=r(575),i=r(2937),o=r(9978);t.BackendFunctionManager=class{constructor(e,t,r){this.clientId=e,this.rpcManager=t,this.socketManager=r,this.ongoingFunctionExecutions={},r.observeNotifications().pipe((0,i.filter)((e=>"backendFunction"===e.type)),(0,o.map)((e=>e))).subscribe((e=>{this.handleFunctionResponse(e.clientRequestId,e.payload)}))}executeFunctionAndSubscribe(e,...t){const r=(0,n.generateId)(),o=new i.Subject;this.ongoingFunctionExecutions[r]=o;const s={functionName:e,paramsArrayStr:(0,n.serializeObj)(t),clientId:this.clientId,clientRequestId:r};return this.rpcManager.post("backend-function/execute",s).catch((t=>{console.error("Got error while executing function",e,t),o.error(t),o.complete()})),o.pipe((0,i.finalize)((()=>{delete this.ongoingFunctionExecutions[r]})),(0,i.share)())}handleFunctionResponse(e,t){const r=this.ongoingFunctionExecutions[e];if(!r)return;const i=(0,n.deserializeObj)(t);i.success?r.next(i.response):(r.error(new Error(i.response)),r.complete())}}},1600:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CollectionReferenceFactory=void 0;const n=r(5660);t.CollectionReferenceFactory=class{constructor(e,t,r,n){this.documentReferenceFactory=e,this.queryBuilderFactory=t,this.joinQueryBuilderFactory=r,this.documentIdentityService=n,this.collections=new Map,this.documentIdentityService.observeChanges().subscribe(this.migrateDocIds.bind(this))}get(e,t){let r=this.collections.get(t);r||(r=new Map,this.collections.set(t,r));let i=r.get(e);return i||(i=new n.CollectionReference(e,t,this.documentReferenceFactory,this.queryBuilderFactory,this.joinQueryBuilderFactory),r.set(e,i),i)}migrateDocIds(e){this.collections.forEach((t=>{for(const[r,n]of t)n.migrateDocIds(e)}))}}},5660:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CollectionReference=void 0;const n=r(575),i=r(2937);t.CollectionReference=class{constructor(e,t,r,i,o){this.collectionName=e,this.integrationId=t,this.documentReferenceFactory=r,this.queryBuilderFactory=i,this.joinQueryBuilderFactory=o,this.documents=new Map,this.refId=(0,n.generateId)()}doc(e){this.integrationId===n.IntegrationType.built_in_db?(e&&(0,n.assertTruthy)("string"==typeof e,"Invalid doc id"),e={__id:e||(0,n.generateId)()}):e?(0,n.assertTruthy)("object"==typeof e,"Invalid doc id"):e={__squidId:(0,n.generateId)()};const t=(0,n.normalizeJsonAsString)(e),r=(0,n.getSquidDocId)(t,this.collectionName,this.integrationId);let i=this.documents.get(t);return i||(i=this.documentReferenceFactory.create(r,this.queryBuilderFactory),this.documents.set(t,i),i)}query(){return this.queryBuilderFactory.get(this.collectionName,this.integrationId)}joinQuery(e){return this.joinQueryBuilderFactory.getForJoin(this.collectionName,this.integrationId,null!=e?e:this.collectionName)}or(...e){return new o(...e)}migrateDocIds(e){for(const[t,r]of this.documents)r.migrateDocIds(e);Object.entries(e).forEach((([e,t])=>{const r=(0,n.parseSquidDocId)(e),i=(0,n.parseSquidDocId)(t);(0,n.replaceKeyInMap)(this.documents,r.docId,i.docId)}))}};class o{constructor(...e){if(0===e.length)throw new Error("At least one query builder must be provided");this.builders=e}changes(){throw new Error("Changes are not supported for merged queries")}snapshot(){return(0,i.firstValueFrom)(this.snapshots(!1))}snapshots(e){const t=this.builders.map((t=>t.snapshots(e)));return this.or(this.builders[0].getSortOrder(),...t)}or(e,...t){return(0,i.combineLatest)([...t]).pipe((0,i.map)((t=>{const r=new Set,n=t.flat(),i=[];for(const e of n)r.has(e.data)||(r.add(e.data),i.push(e));return i.sort(((t,r)=>{for(const{fieldName:n,asc:i}of e){const e=t.data[n],o=r.data[n];if(e<o)return i?-1:1;if(e>o)return i?1:-1}return 0}))})))}getSortOrder(){throw new Error("getSortOrder is not supported for merged queries")}}},4967:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DataManager=void 0;const n=r(575),i=r(3910),o=r(2937),s=r(9978),a="dataManager_runInTransaction";t.DataManager=class{constructor(e,t,r,n,i,s,a,u){this.documentStore=e,this.mutationSender=t,this.socketManager=r,this.querySubscriptionManager=n,this.queryBuilderFactory=i,this.lockManager=s,this.destructManager=a,this.documentIdentityService=u,this.docIdToLocalTimestamp=new Map,this.batchClientRequestIds=new Set,this.docIdToServerTimestamp=new Map,this.pendingIncomingUpdates=new Map,this.pendingOutgoingMutations=new Map,this.pendingOutgoingMutationsChanged=new o.Subject,this.outgoingMutationsEmpty=new o.BehaviorSubject(!0),this.knownDirtyDocs=new Set,this.failedDocsToResync=[],this.refreshDocIdToTimestamp=new Map,this.handleIncomingMessagesForTests=!0,this.destructManager.onDestruct((()=>{this.destruct()})),this.documentIdentityService.observeChanges().subscribe(this.migrateDocIds.bind(this)),this.handleNotifications(),this.startDeleteExpiredTimestampsJob(),this.handleOrphanDocs(),this.outgoingMutationsEmpty.subscribe((e=>{this.querySubscriptionManager.safeToSendQueriesToServer.next(e)}))}getProperties(e){return this.documentStore.getDocumentOrUndefined(e)}isDirty(e){var t;if(this.knownDirtyDocs.has(e))return!0;if(null===(t=this.pendingOutgoingMutations.get(e))||void 0===t?void 0:t.length)return!0;const r=this.docIdToServerTimestamp.get(e),n=r&&!r.expireTimestamp?r.timestamp:void 0,i=this.docIdToLocalTimestamp.get(e);return!((!i||n)&&!this.isForgotten(e)&&!this.isLocalOnly(e)&&i===n)}async runInTransaction(e,t){return t?((0,n.assertTruthy)(t===this.currentTransactionId,"Transaction already ended."),e(t).then((e=>Promise.resolve()))):(this.lockManager.canGetLock(a)?this.lockManager.lockSync(a):await this.lockManager.lock(a),new Promise((async(t,r)=>{try{this.currentTransactionId=(0,n.generateId)();try{return await e(this.currentTransactionId)}catch(e){console.error("error while executing callback function in transaction",e)}finally{this.finishTransaction({resolve:t,reject:r})}}catch(e){console.error("error while executing transaction",e)}finally{this.lockManager.release(a)}})))}async applyOutgoingMutation(e,t){var r;const i=e.squidDocIdObj,o=(0,n.getSquidDocId)(i);this.knownDirtyDocs.add(o),t||(await this.lockManager.lock(a),this.lockManager.release(a)),this.knownDirtyDocs.delete(o);const s=null===(r=this.pendingOutgoingMutations.get(o))||void 0===r?void 0:r.slice(-1)[0];if(s&&!s.sentToServer)s.mutation=(0,n.reduceMutations)([s.mutation,e])[0],this.outgoingMutationsEmpty.next(!1);else{const t={mutation:this.removeInternalProperties(e),sentToServer:!1},r=this.pendingOutgoingMutations.get(o)||[];r.push(t),this.pendingOutgoingMutations.set(o,r),this.outgoingMutationsEmpty.next(!1),this.pendingOutgoingMutationsChanged.next()}return this.runInTransaction((async()=>{const t=this.documentStore.getDocumentOrUndefined(o),r="delete"===e.type?void 0:"update"===e.type?(0,n.applyUpdateMutation)(t,e):Object.assign({},e.properties);this.updateDocumentFromSnapshot(o,r)&&("insert"===e.type&&this.docIdToLocalTimestamp.set(o,(new Date).getTime()),this.querySubscriptionManager.setClientRequestIdsForLocalDoc(o,r).forEach((e=>this.batchClientRequestIds.add(e))))}),t)}async runInTransactionSync(e,t){if(t)return(0,n.assertTruthy)(t===this.currentTransactionId,"Transaction already ended."),void e(t);await this.lockManager.lock(a);try{this.currentTransactionId=(0,n.generateId)();try{return e(this.currentTransactionId)}catch(e){console.error("error while executing callback function in transaction",e)}finally{this.finishTransaction()}}catch(e){console.error("error while executing transaction",e)}finally{this.lockManager.release(a)}}removeInternalProperties(e){if("delete"===e.type)return e;const t=Object.assign(Object.assign({},e),{properties:Object.assign({},e.properties)});return delete t.__docId__,delete t.__ts__,t}handleNotifications(){this.socketManager.observeNotifications().pipe((0,o.filter)((e=>"mutations"===e.type)),(0,s.map)((e=>e))).subscribe((e=>{this.outgoingMutationsEmpty.pipe((0,o.filter)(Boolean),(0,o.take)(1)).subscribe((()=>{this.handleIncomingMutations(e.payload)}))})),this.socketManager.observeNotifications().pipe((0,o.filter)((e=>"query"===e.type)),(0,s.map)((e=>e))).subscribe((e=>{this.outgoingMutationsEmpty.pipe((0,o.filter)(Boolean),(0,o.take)(1)).subscribe((()=>{this.handleIncomingQuerySnapshots(e.payload)}))}))}handleIncomingMutations(e){if(!this.handleIncomingMessagesForTests)return;const t=e.reduce(((e,t)=>this.querySubscriptionManager.hasOngoingQuery(t.clientRequestId)?(e[t.squidDocId]={properties:t.doc,timestamp:t.mutationTimestamp},e):e),{});this.applyIncomingUpdates(t)}handleIncomingQuerySnapshots(e){if(!this.handleIncomingMessagesForTests)return;if(!this.querySubscriptionManager.hasOngoingQuery(e.clientRequestId))return;const t=this.querySubscriptionManager.getQuery(e.clientRequestId),r={};for(const i of e.docs){const e=(0,n.getSquidDocId)(i.__docId__,t.collectionName,t.integrationId);r[e]={properties:i,timestamp:i.__ts__}}this.querySubscriptionManager.setGotResponseFromServer(e.clientRequestId),this.runInTransactionSync((t=>{this.batchClientRequestIds.add(e.clientRequestId),this.applyIncomingUpdates(r,t)&&this.querySubscriptionManager.hasSubscription(e.clientRequestId)&&this.batchClientRequestIds.delete(e.clientRequestId)})).then()}applyIncomingUpdates(e,t){let r=!1;const n=new Set;for(const[t,i]of Object.entries(e))this.addPendingIncomingUpdate(t,i),this.pendingIncomingUpdates.get(t)||(r=!0),n.add(t);return this.runInTransactionSync((()=>{for(const e of n)this.maybeApplyIncomingUpdate(e)}),t).then(),r}addPendingIncomingUpdate(e,t){const r=this.pendingIncomingUpdates.get(e),n=this.docIdToServerTimestamp.get(e);r&&r.timestamp>t.timestamp||n&&n.timestamp>t.timestamp||this.pendingIncomingUpdates.set(e,t)}maybeApplyIncomingUpdate(e){const t=this.pendingIncomingUpdates.get(e);if(!t)return;const r=this.pendingOutgoingMutations.get(e);r&&r.length||(this.updateDocumentFromSnapshot(e,t.properties),this.acknowledgeDocument(e,t.timestamp,!t.properties),this.docIdToLocalTimestamp.set(e,t.timestamp),this.pendingIncomingUpdates.delete(e),this.querySubscriptionManager.setClientRequestIdsForLocalDoc(e,t.properties).forEach((e=>{this.batchClientRequestIds.add(e)})),t.properties&&(this.querySubscriptionManager.findQueriesForDocument(t.properties,e).length||this.forgetDocument(e)))}destruct(){this.stopDeleteExpiredTimestampsJob()}stopDeleteExpiredTimestampsJob(){void 0!==this.deleteExpiredTimestampsInterval&&(clearInterval(this.deleteExpiredTimestampsInterval),this.deleteExpiredTimestampsInterval=void 0)}startDeleteExpiredTimestampsJob(){this.deleteExpiredTimestampsInterval=setInterval((()=>{const e=[...this.docIdToServerTimestamp.entries()].filter((([e,t])=>!(!t.expireTimestamp||t.expireTimestamp>Date.now()||this.isTracked(e))));for(const[t]of e)this.docIdToServerTimestamp.delete(t),this.forgetDocument(t)}),1e4)}isTracked(e){if(this.pendingIncomingUpdates.get(e))return!0;const t=this.pendingOutgoingMutations.get(e);return!(!t||!t.length)||this.querySubscriptionManager.hasOngoingQueryForDocId(e)}isForgotten(e){return this.documentStore.hasData(e)&&!this.isTracked(e)}isLocalOnly(e){return!this.hasBeenAcknowledged(e)&&this.documentStore.hasData(e)}hasBeenAcknowledged(e){return this.docIdToServerTimestamp.has(e)}updateDocumentFromSnapshot(e,t){const r=this.documentStore.getDocumentOrUndefined(e);return!(!r&&!t||r===t)&&((!r||!t||(0,n.normalizeJsonAsString)(Object.assign(Object.assign({},t),{__ts__:void 0}))!==(0,n.normalizeJsonAsString)(r))&&(this.documentStore.saveDocument(e,t),!0))}finishTransaction(e){this.currentTransactionId=void 0;const t=[...this.batchClientRequestIds.values()];this.batchClientRequestIds.clear(),this.querySubscriptionManager.notifyAllSubscriptions(t),this.sendAllUnsentOutgoingMutations(e).then()}async sendAllUnsentOutgoingMutations(e){const t=this.groupOutgoingMutationsByIntegrationId();try{await i.PromisePool.for(t).withConcurrency(t.length||1).handleError((e=>{throw e})).process((async([e,t])=>{await this.sendMutationsForIntegration([...t],e)})),this.pendingOutgoingMutations.size||this.outgoingMutationsEmpty.next(!0),await this.refreshUpdatedDocuments(),this.hasPendingSentMutations()?(await(0,o.firstValueFrom)(this.pendingOutgoingMutationsChanged.pipe((0,o.filter)((()=>!this.hasPendingSentMutations())))),null==e||e.resolve()):null==e||e.resolve()}catch(t){this.pendingOutgoingMutations.size||(this.outgoingMutationsEmpty.next(!0),await this.resyncFailedUpdates()),null==e||e.reject(t)}}async sendMutationsForIntegration(e,t){try{const{timestamp:r,idResolutionMap:n={},refreshList:i=[]}=await this.mutationSender.sendMutations(e.map((e=>e.mutation)),t);await this.documentIdentityService.migrate(n),i.forEach((e=>{this.refreshDocIdToTimestamp.set(n[e]||e,r)}));for(const t of e){let e=this.removeOutgoingMutation(t);n[e]&&(e=n[e]),this.acknowledgeDocument(e,r),this.isTracked(e)||(this.setExpiration(e,!0),this.forgetDocument(e))}}catch(t){for(const t of e){const e=this.removeOutgoingMutation(t);this.forgetDocument(e),(this.hasBeenAcknowledged(e)||"insert"===t.mutation.type)&&this.failedDocsToResync.push(e)}throw t}}removeOutgoingMutation(e){const t=(0,n.getSquidDocId)(e.mutation.squidDocIdObj),r=(0,n.truthy)(this.pendingOutgoingMutations.get(t));return r.splice(r.indexOf(e),1),r.length||this.pendingOutgoingMutations.delete(t),this.pendingOutgoingMutationsChanged.next(),t}async resyncFailedUpdates(){const e=[...this.failedDocsToResync];this.failedDocsToResync.splice(0);for(const t of e){this.setExpiration(t,!0);try{const e=await this.queryBuilderFactory.getForDocument(t).snapshot();if((0,n.truthy)(e.length<=1,"Got more than one doc for the same id:"+t),!e.length){this.forgetDocument(t);const e=this.querySubscriptionManager.setClientRequestIdsForLocalDoc(t,void 0);this.querySubscriptionManager.notifyAllSubscriptions(e)}}catch(e){this.querySubscriptionManager.errorOutAllQueries(t,e)}}}async refreshUpdatedDocuments(){var e;const t=[];for(const[r,n]of this.refreshDocIdToTimestamp.entries()){const i=null===(e=this.docIdToServerTimestamp.get(r))||void 0===e?void 0:e.timestamp;i&&i>n||t.push(r)}this.refreshDocIdToTimestamp.clear();for(const e of t)try{await this.queryBuilderFactory.getForDocument(e).snapshot()}catch(e){}}groupOutgoingMutationsByIntegrationId(){const e={};for(const[t,r]of[...this.pendingOutgoingMutations.entries()]){const t=r[r.length-1];if(t&&!t.sentToServer){const r=t.mutation.squidDocIdObj.integrationId;(e[r]||(e[r]=[])).push(t),t.sentToServer=!0}}return Object.entries(e)}handleOrphanDocs(){this.querySubscriptionManager.onOrphanDocuments.subscribe((e=>{for(const t of e)this.isTracked(t)||this.forgetDocument(t)}))}acknowledgeDocument(e,t,r=!1){this.docIdToServerTimestamp.set(e,{timestamp:t}),this.setExpiration(e,r)}setExpiration(e,t){const r=this.docIdToServerTimestamp.get(e);r&&(r.expireTimestamp=t?Date.now()+2e4:void 0)}forgetDocument(e){this.docIdToLocalTimestamp.delete(e),this.setExpiration(e,!0)}migrateDocIds(e){Object.entries(e).forEach((([e,t])=>{(0,n.replaceKeyInMap)(this.docIdToLocalTimestamp,e,t),(0,n.replaceKeyInMap)(this.docIdToServerTimestamp,e,t)}))}hasPendingSentMutations(){for(const e of this.pendingOutgoingMutations.values())for(const t of e)if(t.sentToServer)return!0;return!1}}},7787:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DestructManager=void 0;const n=r(2937);t.DestructManager=class{constructor(){this.predestructors=[],this.destructors=[],this.isDestructedSubject=new n.BehaviorSubject(!1)}get isDestructing(){return this.isDestructedSubject.value}get isDestructingObservable(){return this.isDestructedSubject.asObservable().pipe((0,n.filter)(Boolean))}onPreDestruct(e){this.predestructors.push(e)}onDestruct(e){this.destructors.push(e)}async destruct(){if(this.isDestructing)return;this.isDestructedSubject.next(!0);const e=this.predestructors.concat(this.destructors);let t=e.shift();for(;t;){try{await t()}catch(e){console.error("Error while destructing Squid",e)}t=e.shift()}}}},4605:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DistributedLockImpl=t.DistributedLockManager=void 0;const n=r(575),i=r(2937),o=r(9978);t.DistributedLockManager=class{constructor(e,t,r){this.socketManager=e,this.clientId=t,this.ongoingLocks={},this.acquireLockMessagesFromServer=this.socketManager.observeNotifications().pipe((0,i.filter)((e=>"lockAcquired"===e.type))),this.releaseLockMessagesFromServer=this.socketManager.observeNotifications().pipe((0,i.filter)((e=>"lockReleased"===e.type))),r.onPreDestruct((()=>{this.releaseAllLocks()})),this.socketManager.observeConnectionReady().subscribe((e=>{e||this.releaseAllLocks()})),this.releaseLockMessagesFromServer.subscribe((e=>{const t=this.ongoingLocks[e.payload.clientRequestId];void 0!==t&&t.release().then()}))}async lock(e,t){const r=(0,n.generateId)(),a={type:"acquireLock",payload:{mutex:e,exclusive:t,clientRequestId:r}};this.socketManager.sendMessage(a);const u=await(0,i.firstValueFrom)((0,i.race)((0,i.timer)(5e3).pipe((0,i.take)(1),(0,o.map)((()=>({payload:{error:"TIMEOUT_GETTING_LOCK",lockId:void 0}})))),this.acquireLockMessagesFromServer.pipe((0,i.filter)((e=>e.payload.clientRequestId===r)))));if(!u.payload.lockId)throw new Error(`Failed to acquire lock: ${u.payload.error}`);const c=u.payload.lockId,l=new s(c,this.clientId,r,this.ongoingLocks,this.socketManager);return this.ongoingLocks[c]=l,l}releaseAllLocks(){for(const[e,t]of Object.entries(this.ongoingLocks))t.release().then(),delete this.ongoingLocks[e]}};class s{constructor(e,t,r,n,o){this.lockId=e,this.clientId=t,this.clientRequestId=r,this.ongoingLocks=n,this.socketManager=o,this.released=!1,this.onReleaseSubject=new i.Subject}async release(){if(this.released)return;this.released=!0,delete this.ongoingLocks[this.lockId];const e={type:"releaseLock",payload:{lockId:this.lockId,clientRequestId:this.clientRequestId}};this.socketManager.sendMessage(e),this.onReleaseSubject.next()}observeRelease(){return this.onReleaseSubject.asObservable()}isReleased(){return this.released}}t.DistributedLockImpl=s},2256:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(2937);t.default=class{constructor(e,t){this.documentStore=e,this.destructManager=t,this.changeNotifier=new n.BehaviorSubject({}),this.destructManager.onDestruct((()=>{this.changeNotifier.complete()}))}migrate(e){Object.entries(e).forEach((([e,t])=>{this.documentStore.migrateDocId(e,t)})),this.changeNotifier.next(e)}observeChanges(){return this.changeNotifier.asObservable()}}},2417:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentReferenceFactory=void 0;const n=r(575),i=r(4516);t.DocumentReferenceFactory=class{create(e,t){return new i.DocumentReference(e,(0,n.truthy)(this.dataManager,"dataManager not found"),t)}setDataManager(e){this.dataManager=e}}},4516:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentReference=void 0;const n=r(9312),i=r(575),o=n.__importStar(r(8784)),s=r(2937);t.DocumentReference=class{constructor(e,t,r){this._squidDocId=e,this.dataManager=t,this.queryBuilderFactory=r,this.refId=(0,i.generateId)()}get squidDocId(){return this._squidDocId}get data(){return(0,i.truthy)(this.dataManager.getProperties(this.squidDocId))}get hasData(){return!!this.dataManager.getProperties(this.squidDocId)}async snapshot(){if(this.isTracked()&&this.dataManager.getProperties(this.squidDocId))return this;const e=await this.queryBuilderFactory.getForDocument(this.squidDocId).snapshot();return(0,i.truthy)(e.length<=1,"Got more than one doc for the same id:"+this.squidDocId),e.length?this:void 0}snapshots(){return this.queryBuilderFactory.getForDocument(this.squidDocId).snapshots().pipe((0,s.map)((e=>((0,i.truthy)(e.length<=1,"Got more than one doc for the same id:"+this.squidDocId),e.length?this:void 0))))}isDirty(){return this.dataManager.isDirty(this.squidDocId)}isTracked(){return this.dataManager.isTracked(this.squidDocId)}async update(e,t){const r={};Object.entries(e).forEach((([e,t])=>{const n=void 0!==t?{type:"update",value:t}:{type:"removeProperty"};r[e]=[n]}));const n={type:"update",squidDocIdObj:(0,i.parseSquidDocId)(this.squidDocId),properties:r};return this.dataManager.applyOutgoingMutation(n,t)}async setInPath(e,t,r){return this.update({[e]:o.cloneDeep(t)},r)}async deleteInPath(e,t){return this.update({[e]:void 0},t)}incrementInPath(e,t,r){const n={type:"applyNumericFn",fn:"increment",value:t},o={type:"update",squidDocIdObj:(0,i.parseSquidDocId)(this.squidDocId),properties:{[e]:[n]}};return this.dataManager.applyOutgoingMutation(o,r)}decrementInPath(e,t,r){return this.incrementInPath(e,-t,r)}async insert(e,t){const r=(0,i.parseSquidDocId)(this.squidDocId);let n=(0,i.deserializeObj)(r.docId);n.__squidId&&(n={});const o={type:"insert",squidDocIdObj:r,properties:Object.assign(Object.assign(Object.assign({},e),{__docId__:r.docId}),n)};return this.dataManager.applyOutgoingMutation(o,t)}async delete(e){const t={type:"delete",squidDocIdObj:(0,i.parseSquidDocId)(this.squidDocId)};return this.dataManager.applyOutgoingMutation(t,e)}migrateDocIds(e){const t=e[this.squidDocId];t&&(this._squidDocId=t)}}},5182:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentStore=void 0;const n=r(575),i=r(8784);t.DocumentStore=class{constructor(){this.squidDocIdToDoc=new Map}saveDocument(e,t){const r=this.squidDocIdToDoc.get(e);if(void 0===r&&!t)return;if(void 0!==r){if(t){const r=(0,i.cloneDeep)(t),n=this.removeInternalProperties(r);return this.squidDocIdToDoc.set(e,n),n}return void this.squidDocIdToDoc.delete(e)}const n=this.removeInternalProperties(t);return this.squidDocIdToDoc.set(e,n),t}hasData(e){return void 0!==this.squidDocIdToDoc.get(e)}getDocument(e){return(0,n.truthy)(this.getDocumentOrUndefined(e))}getDocumentOrUndefined(e){return this.squidDocIdToDoc.get(e)}sortAndLimitDocs(e,t){if(!e||0===e.size)return[];const r=[...e].map((e=>this.squidDocIdToDoc.get(e))).filter(n.isNotNullish),{sortOrder:o,limit:s}=t,a=o.map((e=>e.fieldName)),u=o.map((e=>e.asc?"asc":"desc")),c=(0,i.orderBy)(r,a,u);return s<0?c:r.slice(0,s)}removeInternalProperties(e){if(!e)return;const t=Object.assign({},e);return delete t.__ts__,t}migrateDocId(e,t){const r=this.getDocument(e);(0,n.replaceKeyInMap)(this.squidDocIdToDoc,e,t);const i=(0,n.parseSquidDocId)(t),o=(0,n.deserializeObj)(i.docId);this.saveDocument(t,Object.assign(Object.assign(Object.assign({},r),o),{__docId__:i.docId}))}}},5621:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GraphQLClientFactory=void 0;const n=r(5857);t.GraphQLClientFactory=class{constructor(e){this.rpcManager=e,this.clientsMap=new Map}get(e){let t=this.clientsMap.get(e);return t||(t=new n.GraphQLClient(this.rpcManager,e),this.clientsMap.set(e,t),t)}}},5857:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GraphQLClient=void 0;const n=r(9312),i=r(2948),o=n.__importDefault(r(9031));t.GraphQLClient=class{constructor(e,t){this.rpcManager=e;const r=`${t}/graphql`;this.client=new i.ApolloClient({link:new i.HttpLink({uri:`${this.rpcManager.getEndpoint()}${r}`,headers:this.rpcManager.getStaticHeaders(),fetch:o.default}),cache:new i.InMemoryCache})}async query(e){return(await this.client.query({query:i.gql`
|
|
9
9
|
${e.query}
|
|
10
10
|
`,variables:e.variables})).data}async mutate(e){return(await this.client.mutate({mutation:i.gql`
|
|
11
11
|
${e.query}
|
|
12
|
-
`})).data}}},7718:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MutationSender=void 0;const n=r(575);t.MutationSender=class{constructor(e,t,r,n){this.clientId=e,this.rpcManager=t,this.lockManager=r,this.querySubscriptionManager=n}async sendMutations(e,t){const r=(0,n.reduceMutations)(e),i=r.map((e=>`sendMutation_${(0,n.getSquidDocId)(e.squidDocIdObj)}`));await this.lockManager.lock(...i),await this.querySubscriptionManager.waitForAllQueriesToFinish();try{const e={clientId:this.clientId,mutations:r,integrationId:t};return await this.rpcManager.post("mutation/mutate",e)}finally{this.lockManager.release(...i)}}}},9194:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NamedQueryManager=void 0;const n=r(575),i=r(2937),o=r(9978);t.NamedQueryManager=class{constructor(e,t,r){this.clientId=e,this.rpcManager=t,this.socketManager=r,this.ongoingNamedQueryExecutions={},r.observeNotifications().pipe((0,i.filter)((e=>"namedQuery"===e.type)),(0,o.map)((e=>e))).subscribe((e=>{this.handleNamedQueryResponse(e.clientRequestId,e.payload)}))}executeNamedQueryAndSubscribe(e,t,r){const o=(0,n.generateId)(),a=new i.Subject;this.ongoingNamedQueryExecutions[o]=a;const s={integrationId:e,queryName:t,paramsRecordStr:(0,n.serializeObj)(r),clientId:this.clientId,clientRequestId:o};return this.rpcManager.post("named-query/execute",s).catch((r=>{console.error("Got error while executing named query",t,"for integration",e,r),a.error(r),a.complete()})),a.pipe((0,i.finalize)((()=>{delete this.ongoingNamedQueryExecutions[o]})),(0,i.share)())}handleNamedQueryResponse(e,t){const r=this.ongoingNamedQueryExecutions[e];if(!r)return;const i=(0,n.deserializeObj)(t);i.success?r.next(i.result):(r.error(new Error(i.result)),r.complete())}}},9732:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JoinQueryBuilder=t.JoinQueryBuilderFactory=void 0;const n=r(9312),i=r(575),o=n.__importStar(r(8784)),a=r(2937),s=r(9978);t.JoinQueryBuilderFactory=class{constructor(e,t,r){this.querySubscriptionManager=e,this.documentReferenceFactory=t,this.queryBuilderFactory=r}getForJoin(e,t,r){return new u(e,t,this.querySubscriptionManager,this.documentReferenceFactory,r,this,this.queryBuilderFactory)}};class u{constructor(e,t,r,n,o,a,s){this.collectionName=e,this.integrationId=t,this.querySubscriptionManager=r,this.documentReferenceFactory=n,this.alias=o,this.joinQueryBuilderFactory=a,this.queryBuilderFactory=s,this.joins={},this.joinConditions={},this.simpleQueryBuilder=new i.SimpleQueryBuilder(e,t)}where(e,t,r){return this.simpleQueryBuilder.where(e,t,r),this}limit(e){return this.simpleQueryBuilder.limit(e),this}sortBy(e,t=!0){return this.simpleQueryBuilder.sortBy(e,t),this}join(e,t,r){const n={leftFieldName:t,rightFieldName:r,leftAlias:this.alias};this.joins[e.alias]=e.build(),Object.entries(e.joins).forEach((([e,t])=>{this.joins[e]=t}));for(const[t,r]of Object.entries(e.joinConditions))this.joinConditions[t]=r;return this.joinConditions[e.alias]=n,this}snapshot(){return(0,a.firstValueFrom)(this.snapshots(!1))}snapshots(e=!0){return this.querySubscriptionManager.processQuery(this.build(),this.alias,o.cloneDeep(this.joins),o.cloneDeep(this.joinConditions),e).pipe((0,s.map)((e=>e.map((e=>{const t={};for(const[r,n]of Object.entries(e)){const e=r===this.alias?this.collectionName:this.joins[r].collectionName,o=r===this.alias?this.integrationId:this.joins[r].integrationId,a=n?(0,i.getSquidDocId)(n.__docId__,e,o):void 0;t[r]=a?this.documentReferenceFactory.create(a,this.queryBuilderFactory):void 0}return t})))))}build(){return this.simpleQueryBuilder.build()}}t.JoinQueryBuilder=u},6891:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Changes=t.QueryBuilder=t.QueryBuilderFactory=void 0;const n=r(575),i=r(2937),o=r(9978);t.QueryBuilderFactory=class{constructor(e,t,r){this.querySubscriptionManager=e,this.documentReferenceFactory=t,this.documentIdentityService=r}getForDocument(e){const{collectionName:t,integrationId:r,docId:i}=(0,n.parseSquidDocId)(e),o=(0,n.deserializeObj)(i),a=this.get(t,r);return Object.entries(o).forEach((([e,t])=>{a.where(e,"==",t)})),a}get(e,t){return new a(e,t,this.querySubscriptionManager,this.documentReferenceFactory,this,this.documentIdentityService)}};class a extends n.SimpleQueryBuilder{constructor(e,t,r,n,i,o){super(e,t),this.querySubscriptionManager=r,this.documentReferenceFactory=n,this.queryBuilderFactory=i,this.documentIdentityService=o}getSortOrder(){return this.query.sortOrder}snapshot(){return(0,i.firstValueFrom)(this.snapshots(!1))}snapshots(e=!0){return this.querySubscriptionManager.processQuery(this.build(),this.collectionName,{},{},e).pipe((0,o.map)((e=>e.map((e=>{(0,n.assertTruthy)(1===Object.keys(e).length);const t=e[this.collectionName],r=(0,n.getSquidDocId)((0,n.truthy)(t).__docId__,this.collectionName,this.integrationId);return this.documentReferenceFactory.create(r,this.queryBuilderFactory)})))))}changes(){let e,t=new Set;return this.snapshots().pipe((0,i.combineLatestWith)(this.documentIdentityService.observeChanges().pipe((0,i.switchMap)((t=>(Object.entries(t).forEach((([t,r])=>{(0,n.replaceKeyInRecord)(e||{},t,r)})),i.NEVER))),(0,i.startWith)({}))),(0,o.map)((([r])=>{let n=[];const i=[],o=[];if(e){for(const o of r){const r=o.squidDocId,a=o.data;if(t.has(a))delete e[r],t.delete(a);else if(e[r]){i.push(o);const n=e[r];delete e[r],t.delete(n)}else n.push(o)}for(const e of t)o.push(e)}else n=r;e={},t=new Set;for(const n of r){const r=n.data;e[n.squidDocId]=r,t.add(r)}return new s(n,i,o)})))}get hash(){return(0,n.encodeValueForMapping)(this.build())}}t.QueryBuilder=a;class s{constructor(e,t,r){this.inserts=e,this.updates=t,this.deletes=r}}t.Changes=s},4661:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuerySubscriptionManager=void 0;const n=r(9312),i=r(575),o=n.__importStar(r(8784)),a=r(2937),s=r(9978),u=r(1122),c="client";t.QuerySubscriptionManager=class{constructor(e,t,r,n,i){this.rpcManager=e,this.clientId=t,this.documentStore=r,this.destructManager=n,this.documentIdentityService=i,this.safeToSendQueriesToServer=new a.BehaviorSubject(!0),this.onOrphanDocuments=new a.Subject,this.ongoingQueries=new Map,this.inflightQueriesCount=new a.BehaviorSubject(0),this.clientRequestIdToLocalDocuments=new Map,this.localDocumentToClientRequestIds=new Map,this.queryMappingManager=new l,this.documentIdentityService.observeChanges().subscribe(this.migrateDocIds.bind(this)),this.destructManager.onPreDestruct((()=>{this.predestruct()}))}hasOngoingQuery(e){return this.ongoingQueries.has(e)}getQuery(e){return(0,i.truthy)(this.ongoingQueries.get(e)).query}setGotResponseFromServer(e){(0,i.truthy)(this.ongoingQueries.get(e)).gotResponseFromServer=!0}findQueriesForDocument(e,t){const{collectionName:r,integrationId:n}=(0,i.parseSquidDocId)(t),o=this.queryMappingManager.getMapping(c,r,n);return o?(0,i.findQueriesForDocumentSync)(o,e):[]}setClientRequestIdsForLocalDoc(e,t){const r=this.localDocumentToClientRequestIds.get(e)||new Set,n=new Set(t?this.findQueriesForDocument(t,e).map((e=>(0,i.parseQuerySubscriptionId)(e).clientRequestId)):[]),o=new Set([...r,...n]);for(const t of[...r]){if(n.has(t))continue;r.delete(t);const i=this.clientRequestIdToLocalDocuments.get(t);i&&(i.delete(e),i.size||this.clientRequestIdToLocalDocuments.delete(t)),r.size||this.localDocumentToClientRequestIds.delete(e)}for(const t of n){let r=this.localDocumentToClientRequestIds.get(e);r||(r=new Set,this.localDocumentToClientRequestIds.set(e,r)),r.add(t);let n=this.clientRequestIdToLocalDocuments.get(t);n||(n=new Set,this.clientRequestIdToLocalDocuments.set(t,n)),n.add(e)}return[...o]}errorOutAllQueries(e,t){const r=this.localDocumentToClientRequestIds.get(e)||new Set;for(const e of r){const r=this.ongoingQueries.get(e);r&&r.subject.error(t)}}notifyAllSubscriptions(e){const t=new Set;for(const r of e){const e=this.ongoingQueries.get(r);if(!e)continue;if(!e.gotResponseFromServer||!e.activated)continue;const n=this.clientRequestIdToLocalDocuments.get(r),o=this.documentStore.sortAndLimitDocs(n,e.query);let a=!1;for(const t of e.supportedQueries)a=a||this.updateOngoingQueryWithNewDataFromSupportingQuery(o,t);let s=e;for(;!s.allObservables;)s=(0,i.truthy)(null==s?void 0:s.supportingOngoingQuery);a&&t.add(s),e.subject.next(o)}for(const e of t){const t=this.collectAllObservables(e);(0,i.truthy)(e.allObservables).next(t)}}processQuery(e,t,r,n,i){return(0,a.defer)((()=>{const u=this.createOngoingQueryGraph(e,t,r,n,i,!0);this.sendQueryToServer(u),u.allObservables=new a.ReplaySubject(1);const c=u.allObservables.pipe((0,a.switchMap)((e=>(0,a.combineLatest)(e).pipe((0,s.map)((e=>this.joinResults(e,n,u)))))),(0,s.filter)((()=>this.allOngoingQueriesGotServerResult(u))),(0,a.startWith)(void 0),(0,a.pairwise)(),(0,s.filter)((([e,t])=>!o.isEqual(e,t))),(0,s.map)((([e,t])=>t)),i?(0,a.tap)():(0,a.take)(1),(0,a.finalize)((()=>{var e;u.subject.complete(),this.completeAllSupportedQueries(u),null===(e=u.allObservables)||void 0===e||e.complete()}))),l=this.collectAllObservables(u);return u.allObservables.next(l),c})).pipe((0,a.share)())}hasOngoingQueryForDocId(e){const t=this.localDocumentToClientRequestIds.get(e);return!!t&&!!t.size}removeClientRequestId(e){const t=this.clientRequestIdToLocalDocuments.get(e);if(!t)return;this.clientRequestIdToLocalDocuments.delete(e);const r=[];for(const n of t){const t=(0,i.truthy)(this.localDocumentToClientRequestIds.get(n));t.delete(e),t.size||(this.localDocumentToClientRequestIds.delete(n),r.push(n))}r.length&&this.onOrphanDocuments.next(r),this.ongoingQueries.delete(e)}async waitForAllQueriesToFinish(){return(0,a.firstValueFrom)(this.inflightQueriesCount.pipe((0,s.filter)((e=>0===e)))).then((()=>{}))}registerQueryFinalizer(e){const t=e.clientRequestId,r=(0,i.getQuerySubscriptionId)(this.clientId,t);e.subject.pipe((0,a.finalize)((()=>{if(this.queryMappingManager.removeQuery(t,r).then(),this.ongoingQueries.delete(t),e.subscribe&&!e.isEmptyForJoin&&e.activated){const r={clientId:this.clientId,clientRequestId:t};this.rpcManager.post("query/unsubscribe",r).catch((t=>{console.error("Got error while unsubscribing from query",e.query,t)}))}this.removeClientRequestId(t)}))).subscribe({error:()=>{}})}createOngoingQueryGraph(e,t,r,n,o,s,u={}){if(u[t])return u[t];const c=(0,i.generateId)(),l=[],f={clientRequestId:c,activated:s,alias:t,query:e,subscribe:o,subject:new a.ReplaySubject(1),supportedQueries:l,supportingOngoingQuery:void 0,joinCondition:void 0,gotResponseFromServer:!1,isEmptyForJoin:!1};this.registerQueryFinalizer(f),this.ongoingQueries.set(c,f),u[t]=f;for(const[e,i]of Object.entries(n)){const a=i.leftAlias;if(a!==t&&e!==t)continue;const s=a===t?e:a;if(a===t){const e=this.createOngoingQueryGraph(r[s],s,r,n,o,!1,u);e.joinCondition=i,l.push(e)}else f.supportingOngoingQuery=this.createOngoingQueryGraph(r[s],s,r,n,o,!1,u)}return f}collectAllObservables(e,t=[]){if(e.isEmptyForJoin)return t;const r=e.alias;t.push(e.subject.pipe((0,s.map)((e=>({docs:e,alias:r})))));for(const r of e.supportedQueries)this.collectAllObservables(r,t);return t}joinResults(e,t,r){const n=[],i=e.reduce(((e,t)=>(e[t.alias]?e[t.alias].push(...t.docs):e[t.alias]=[...t.docs],e)),{});i[r.alias].forEach((e=>{n.push({[r.alias]:e})}));const o=this.getOngoingQueriesBfs(r),a=new Set;for(let e=1;e<o.length;e++){const r=o[e].alias;a.has(r)||(a.add(r),this.join(n,r,i[r],t))}return n}join(e,t,r,n){var o;if(!e.length)return;const a=Object.keys(e[0]),s=n[t];if(!s||!a.includes(s.leftAlias))return;const u=new Map;(r||[]).forEach((e=>{const t=e[s.rightFieldName];u.has(t)||u.set(t,[]),(0,i.truthy)(u.get(t)).push(e)}));for(const r of[...e]){const n=u.get(null===(o=r[s.leftAlias])||void 0===o?void 0:o[s.leftFieldName])||[];if(n.length)for(const i of n)r[t]?e.push(Object.assign(Object.assign({},r),{[t]:i})):r[t]=i;else r[t]||(r[t]=void 0)}}getOngoingQueriesBfs(e){const t=[],r=[e];for(;r.length;){const e=(0,i.truthy)(r.shift());e.isEmptyForJoin||(t.push(e),r.push(...e.supportedQueries))}return t}updateOngoingQueryWithNewDataFromSupportingQuery(e,t){var r;const n=(0,i.truthy)(t.joinCondition),s=t.query;if(t.activated){const u=(0,i.truthy)(null===(r=t.supportingOngoingQuery)||void 0===r?void 0:r.supportedQueries).filter((e=>e.alias===t.alias)),c=new Set(e.map((e=>{var t;return null!==(t=e[n.leftFieldName])&&void 0!==t?t:null})));for(const e of u)e.query.conditions.filter((e=>e.fieldName===n.rightFieldName)).forEach((e=>{c.delete(e.value)}));if(0===c.size)return!1;const l=o.cloneDeep(s);l.conditions=l.conditions.filter((e=>e.fieldName!==n.rightFieldName)),[...c].forEach((e=>{l.conditions.push({fieldName:n.rightFieldName,operator:"==",value:e})}));const f=Object.assign(Object.assign({},t),{query:l,activated:!0,gotResponseFromServer:!1,subject:new a.ReplaySubject(1),clientRequestId:(0,i.generateId)(),isEmptyForJoin:!1});return this.registerQueryFinalizer(f),this.ongoingQueries.set(f.clientRequestId,f),(0,i.truthy)(t.supportingOngoingQuery).supportedQueries.push(f),this.sendQueryToServer(f),!0}{const r=e.map((e=>{var t;return{fieldName:n.rightFieldName,operator:"==",value:null!==(t=e[n.leftFieldName])&&void 0!==t?t:null}}));return t.activated=!0,r.length?(s.conditions.push(...r),this.sendQueryToServer(t)):t.isEmptyForJoin=!0,!0}}allOngoingQueriesGotServerResult(e){return!!e.isEmptyForJoin||!!e.gotResponseFromServer&&(!e.supportedQueries.length||e.supportedQueries.every((e=>this.allOngoingQueriesGotServerResult(e))))}completeAllSupportedQueries(e){const t=[...e.supportedQueries||[]];for(;t.length;){const e=(0,i.truthy)(t.shift());t.push(...e.supportedQueries||[]),e.subject.complete()}}predestruct(){this.safeToSendQueriesToServer.next(!1),this.safeToSendQueriesToServer.complete(),this.unsubscribe()}unsubscribe(){var e;const t=[...this.ongoingQueries.values()];for(const r of t)r.subject.complete(),null===(e=r.allObservables)||void 0===e||e.complete()}hasSubscription(e){var t;return!!(null===(t=this.ongoingQueries.get(e))||void 0===t?void 0:t.subscribe)}sendQueryToServer(e){const t=e.query,r=e.clientRequestId,n={query:t,clientRequestId:r,subscribe:e.subscribe,clientId:this.clientId},o=(0,i.getQuerySubscriptionId)(this.clientId,r);this.queryMappingManager.addQuery(c,t,o).then(),this.ongoingQueries.set(r,e),this.safeToSendQueriesToServer.pipe((0,s.filter)(Boolean),(0,a.take)(1)).subscribe((()=>{e.subject.closed||(this.inflightQueriesCount.next(this.inflightQueriesCount.value+1),this.rpcManager.post("query/query",n).catch((t=>{e.subject.error(t)})).finally((()=>{this.inflightQueriesCount.next(this.inflightQueriesCount.value-1)})))}))}migrateDocIds(e){const t=Object.keys(e);for(const r of this.clientRequestIdToLocalDocuments.values())t.forEach((t=>{r.has(t)&&(r.delete(t),r.add(e[t]))}));t.forEach((t=>{(0,i.replaceKeyInMap)(this.localDocumentToClientRequestIds,t,e[t])}))}};class l extends i.SimpleQueryMappingManager{constructor(){super(...arguments),this.stateService=new u.StateService,this.querySubscriptionIdToQuery={}}async addQuery(e,t,r){this.stateService.runInBatch((()=>{let e=0;const n=new Set;for(const o of t.conditions){const a=this.getConditionStatePath(t,o),s=[...this.stateService.getStateInPath(a)||[]];if((0,i.insertSorted)(s,r),["==","!="].includes(o.operator)){const t=(0,i.encodeValueForMapping)(o.fieldName);n.has(t)||(e++,n.add(t))}else e++;this.stateService.setInPath(a,s)}if(!t.conditions.length){const e=["queryMapping",t.collectionName,t.integrationId,"mapping","unconditional"],n=[...this.stateService.getStateInPath(e)||[]];(0,i.insertSorted)(n,r),this.stateService.setInPath(e,n)}this.stateService.setInPath([...this.getQueryMetadataStatePath(t,r),"condCount"],e)})),this.querySubscriptionIdToQuery[r]=t}async removeQuery(e,t){const r=this.querySubscriptionIdToQuery[t];if(r)return this.stateService.runInBatch((()=>{for(const e of r.conditions){const n=this.getConditionStatePath(r,e),o=[...this.stateService.getStateInPath(n)||[]];(0,i.removeSorted)(o,t),o.length?this.stateService.setInPath(n,o):this.stateService.deletePath(n)}if(!r.conditions.length){const e=["queryMapping",r.collectionName,r.integrationId,"mapping","unconditional"],n=[...this.stateService.getStateInPath(e)||[]];(0,i.removeSorted)(n,t),this.stateService.setInPath(e,n)}this.stateService.deletePath(this.getQueryMetadataStatePath(r,t))})),r}getMapping(e,t,r){return this.stateService.getStateInPath(["queryMapping",t,r,"mapping"])}getQueryMetadataStatePath(e,t){return["queryMapping",e.collectionName,e.integrationId,"mapping","queriesMetadata",`${t}`]}getConditionStatePath(e,t){const r=(0,i.encodeValueForMapping)(t.fieldName),n=(0,i.encodeValueForMapping)(t.value);return["queryMapping",e.collectionName,e.integrationId,"mapping","conditional",`${r}`,`${t.operator}`,`${n}`]}}},602:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RpcError=t.RpcManager=void 0;const n=r(9312),i=r(575),o=n.__importDefault(r(9031)),a=r(2937);t.RpcManager=class{constructor(e,t,r,n={},o){this.rpcEndpoint=e,this.socketManager=t,this.destructManager=r,this.headers=n,this.authManager=o,this.staticHeaders={},this.onGoingRpcCounter=new a.BehaviorSubject(0),(0,i.assertTruthy)(e,"Http endpoint must be provided.");for(const[e,t]of Object.entries(n))this.setStaticHeader(e,t);const s=this.authManager.getApiKey();s&&this.setStaticHeader("Authorization",`ApiKey ${s}`),this.rpcEndpoint.endsWith("/")||(this.rpcEndpoint+="/"),this.authManager.observeAuthIdToken().subscribe((e=>{e?this.setStaticHeader("Authorization",`Bearer ${e}`):this.deleteStaticHeader("Authorization")})),r.onDestruct((async()=>{await this.awaitAllSettled()}))}async awaitAllSettled(){await(0,a.firstValueFrom)(this.onGoingRpcCounter.pipe((0,a.filter)((e=>0===e))))}setStaticHeader(e,t){this.staticHeaders[e]=t}deleteStaticHeader(e){delete this.staticHeaders[e]}getEndpoint(){return this.rpcEndpoint}getStaticHeaders(){return this.staticHeaders}async post(e,t){this.onGoingRpcCounter.next(this.onGoingRpcCounter.value+1);try{await(0,a.firstValueFrom)((0,a.race)(this.socketManager.observeConnectionReady().pipe((0,a.filter)(Boolean)),this.destructManager.isDestructingObservable)),await this.authManager.waitForReadyState();let r={"Content-Type":"application/json"};Object.keys(this.staticHeaders)&&(r=Object.assign(Object.assign({},r),this.staticHeaders));const n=await(0,o.default)(`${this.rpcEndpoint}${e}`,{method:"POST",body:(0,i.serializeObj)(t),headers:r});let u;try{u=await n.text()}catch(e){u="Cannot read body"}if(!n.ok)throw new s(n.status,n.statusText,n.headers,n.url,u);try{return JSON.parse(u)}catch(e){return u}}finally{this.onGoingRpcCounter.next(this.onGoingRpcCounter.value-1)}}};class s extends Error{constructor(e,t,r,n,i){super(`RPC error ${e} ${t} calling ${n}: ${i}`),this.statusCode=e,this.statusText=t,this.headers=r,this.url=n,this.body=i}}t.RpcError=s},3474:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SocketManager=void 0;const n=r(575),i=r(2937),o=r(8087),a=r(266);t.SocketManager=class{constructor(e,t,r=a.NOOP_FN,n,o={},s){this.clientId=e,this.socketIoEndpoint=t,this.messageNotificationWrapper=r,this.destructManager=n,this.authManager=s,this.webSocketObserver=new i.Subject,this.allMessagesObserver=new i.Subject,this.connectionReady=new i.BehaviorSubject(!1),this.seenMessageIds=new Set,this.firstConnection=!0,this.destructManager.onDestruct((async()=>{await this.destruct()})),this.setupMessageAcknowledgments(),this.connect(Object.assign({},o))}observeNotifications(){return this.webSocketObserver.asObservable()}observeConnectionReady(){return this.connectionReady.asObservable().pipe((0,i.distinctUntilChanged)())}sendMessage(e){this.authManager.waitForReadyState().then((()=>{(0,i.firstValueFrom)(this.connectionReady.pipe((0,i.filter)(Boolean))).then((()=>{const t=this.authManager.getAuthToken();(0,n.truthy)(this.socket).emit("message",Object.assign(Object.assign({},e),{authToken:t}))}))}))}connect(e){this.socket=(0,o.io)(this.socketIoEndpoint,{query:{clientId:this.clientId},reconnectionDelay:5e3,transports:["websocket"],extraHeaders:e}),this.socket.on("connect",(()=>{})),this.socket.on("disconnect",((e,t)=>{this.connectionReady.next(!1)})),this.socket.on("connectionReady",(()=>{this.connectionReady.next(!0),this.firstConnection||this.sendMessage({type:"catchup"}),this.firstConnection=!1})),this.socket.on("connect_error",(e=>{console.error("An error occurred while connecting to the socket with url: ",this.socketIoEndpoint,e)})),this.socket.on("message",(e=>{const t=(0,n.deserializeObj)(e);for(const e of t)this.allMessagesObserver.next(e),this.seenMessageIds.has(e.messageId)||(this.seenMessageIds.add(e.messageId),this.messageNotificationWrapper((()=>{this.webSocketObserver.next(e)})))}))}setupMessageAcknowledgments(){const e=new i.Subject;this.allMessagesObserver.subscribe((t=>{(null==t?void 0:t.messageId)&&e.next(t.messageId)}));const t=[];e.pipe((0,i.tap)((e=>t.push(e))),(0,i.debounceTime)(100)).subscribe((async()=>{const e=[...t.splice(0)];this.sendMessage({type:"acknowledge",payload:e})}))}async destruct(){var e;this.sendMessage({type:"kill"}),this.connectionReady.next(!1),await(0,i.firstValueFrom)((0,i.timer)(0)),null===(e=this.socket)||void 0===e||e.disconnect(),this.webSocketObserver.complete(),this.allMessagesObserver.complete()}}},5395:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Squid=void 0;const n=r(9312),i=r(575),o=r(2937),a=r(4268),s=r(8862),u=r(1600),c=r(4967),l=r(7787),f=n.__importDefault(r(2256)),p=r(2417),d=r(5182),h=r(5621),y=r(7718),v=r(9194),m=r(9732),b=r(6891),g=r(4661),_=r(602),w=r(3474),O=r(4605),S=r(9526);class E{constructor(e){this.destructManager=new l.DestructManager,this.setAuthIdToken=e=>{this.authManager.setAuthIdToken(e)},this.collection=(e,t=i.IntegrationType.built_in_db)=>(this.validateNotDestructed(),this.collectionReferenceFactory.get(e,t)),this.runInTransaction=e=>(this.validateNotDestructed(),this.dataManager.runInTransaction(e)),this.executeFunction=(e,...t)=>(this.validateNotDestructed(),(0,o.firstValueFrom)(this.backendFunctionManager.executeFunctionAndSubscribe(e,...t))),this.executeNamedQuery=(e,t,r)=>(this.validateNotDestructed(),(0,o.firstValueFrom)(this.namedQueryManager.executeNamedQueryAndSubscribe(e,t,r))),this.callApi=(e,t,r={})=>(this.validateNotDestructed(),(0,o.firstValueFrom)(this.apiManager.callApiAndSubscribe(e,t,r))),this.graphql=e=>(this.validateNotDestructed(),this.graphqlClientFactory.get(e)),this.acquireLock=(e,t=!0)=>(this.validateNotDestructed(),this.distributedLockManager.lock(e,t)),this.destruct=async()=>{if(!this.destructManager.isDestructing)return this.destructManager.destruct().finally((()=>{const e=Object.entries(E.squidInstancesMap).find((([,e])=>e===this));e&&delete E.squidInstancesMap[e[0]]}))},this.unsubscribe=async()=>{this.querySubscriptionManager.unsubscribe(),await this.rpcManager.awaitAllSettled()},(0,i.assertTruthy)(e.appId,"APP_ID_MUST_BE_PROVIDED");const t=(0,i.getApplicationUrl)(e.region,e.appId),r=(0,i.getApplicationHttpHeaders)(e.region,e.appId);this.clientId=(0,i.generateId)(),this.authManager=new S.AuthManager(this.destructManager,e.apiKey),this.socketManager=new w.SocketManager(this.clientId,t,e.messageNotificationWrapper,this.destructManager,r,this.authManager),this.rpcManager=new _.RpcManager(t,this.socketManager,this.destructManager,r,this.authManager),this.documentStore=new d.DocumentStore,this.lockManager=new i.LockManager,this.distributedLockManager=new O.DistributedLockManager(this.socketManager,this.clientId,this.destructManager),this.documentIdentityService=new f.default(this.documentStore,this.destructManager),this.documentReferenceFactory=new p.DocumentReferenceFactory,this.querySubscriptionManager=new g.QuerySubscriptionManager(this.rpcManager,this.clientId,this.documentStore,this.destructManager,this.documentIdentityService);const n=new y.MutationSender(this.clientId,this.rpcManager,this.lockManager,this.querySubscriptionManager);this.queryBuilderFactory=new b.QueryBuilderFactory(this.querySubscriptionManager,this.documentReferenceFactory,this.documentIdentityService),this.joinQueryBuilderFactory=new m.JoinQueryBuilderFactory(this.querySubscriptionManager,this.documentReferenceFactory,this.queryBuilderFactory),this.collectionReferenceFactory=new u.CollectionReferenceFactory(this.documentReferenceFactory,this.queryBuilderFactory,this.joinQueryBuilderFactory,this.documentIdentityService),this.dataManager=new c.DataManager(this.documentStore,n,this.socketManager,this.querySubscriptionManager,this.queryBuilderFactory,this.lockManager,this.destructManager,this.documentIdentityService),this.documentReferenceFactory.setDataManager(this.dataManager),this.backendFunctionManager=new s.BackendFunctionManager(this.clientId,this.rpcManager,this.socketManager),this.namedQueryManager=new v.NamedQueryManager(this.clientId,this.rpcManager,this.socketManager),this.apiManager=new a.ApiManager(this.clientId,this.rpcManager,this.socketManager,e.apiServerUrlOverrideMapping),this.graphqlClientFactory=new h.GraphQLClientFactory(this.rpcManager)}static getInstance(e){const t=(0,i.normalizeJsonAsString)(e);let r=E.squidInstancesMap[t];return r||(r=new E(e),E.squidInstancesMap[t]=r,r)}static getInstances(){return Object.values(E.squidInstancesMap)}validateNotDestructed(){(0,i.assertTruthy)(!this.destructManager.isDestructing,"The client was already destructed.")}}t.Squid=E,E.squidInstancesMap={}},1064:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isStateObject=t.apply=void 0;const n=r(1496);function i(e){return"object"==typeof e}function o(e,t){let r=e;if((0,n.isPathAction)(t))r=function(e,t,r=[]){switch(t.type){case n.ActionType.DELETE_PATH:return a(e,t.path);case n.ActionType.SET_PATH:const i=t;return function(e,t,r,n){return s(e,t,r,n)}(e,t.path,r,i.payload);case n.ActionType.BATCH_ACTION:throw new Error("Unsupported")}}(e,t,[]);else{if(!(0,n.isBatchAction)(t))throw new Error(`Invalid action type: ${t.type}`);r=t.payload.reduce(((e,t)=>o(e,t)),e)}return r}function a(e,t){if(!t.length)throw new Error("can not delete an empty path");const r=t[0];if(1===t.length)return function(e,t){if(e instanceof Array)throw new Error("Cannot remove an item from an array");const r=Object.assign({},e);return delete r[t],r}(e,r);const n=t.slice(1),o=c(e,r);if(!o)return e;if(!i(o))throw new Error("Cannot delete from a non object state.");const s=a(o,n);return s===o?e:u(e,r,s)}function s(e,t,r,n){if(!t.length){if(i(n))return n;throw new Error("Relative path cannot be of length 0 when the new value is not an object.")}const o=t[0],a=[...r,o];if(1===t.length)return u(e,o,n);const l=t.slice(1),f=c(e,o);return void 0!==f&&i(f)?u(e,o,s(f,l,a,n)):s(e=u(e,o,{}),t,r,n)}function u(e,t,r){return(e=Object.assign({},e))[t]=r,e}function c(e,t){return e instanceof Array?e[function(e){const t=Number(e);if(isNaN(t))throw new Error(`The value is not a number: Actual: ${e}`);return Math.floor(t)}(t)]:e[t]}t.apply=function(e,t){return o(e,t)},t.isStateObject=i},1496:(e,t)=>{"use strict";var r;function n(e){return[r.SET_PATH,r.DELETE_PATH].includes(e.type)}function i(e){return e.type===r.BATCH_ACTION}Object.defineProperty(t,"__esModule",{value:!0}),t.getSingleAction=t.extractAllPathActions=t.isBatchAction=t.isDeletePathAction=t.isSetPathAction=t.isPathAction=t.ActionType=void 0,function(e){e.DELETE_PATH="DELETE_PATH",e.SET_PATH="SET_PATH",e.BATCH_ACTION="BATCH_ACTION"}(r=t.ActionType||(t.ActionType={})),t.isPathAction=n,t.isSetPathAction=function(e){return e.type===r.SET_PATH},t.isDeletePathAction=function(e){return e.type===r.DELETE_PATH},t.isBatchAction=i,t.extractAllPathActions=function e(t){const r=[];if(n(t))r.push(t);else if(i(t))for(const n of t.payload)r.push(...e(n));return r},t.getSingleAction=function(e){return 1===e.length?e[0]:{type:r.BATCH_ACTION,payload:e}}},8336:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPathTrieFromAction=t.PathTrieNode=t.PathTrie=void 0;const n=r(1496);class i{constructor(){this.root=new o}getOrCreatePathTrieNode(e,t){let r=this.root;for(const t of e)r.children.get(t)||r.children.set(t,new o),r=r.children.get(t);return void 0!==t&&(r.nodeData=t),r}getPathTrieNode(e){let t=this.root;for(const r of e){if(!t)return;t=t.children.get(r)}return t}getPathTrie(e){let t=this.root;for(const r of e){if(!t)return;t=t.children.get(r)}if(t){const e=new i;return e.root=t,e}}iterateBfs(e){this.iterateInternal(this.root,e,[])}removeNode(e){e.length||(this.root=new o);const t=[this.root];for(const r of e){const e=t[t.length-1].children.get(r);if(!e)throw new Error("Node does not exist");t.push(e)}for(let r=t.length-1;r>0;r--){const n=t[r],i=e[r-1];if((n.nodeData||n.children.size)&&r!==t.length-1)break;t[r-1].children.delete(i)}}clearNodeData(e){const t=this.getPathTrieNode(e);t&&(t.nodeData=void 0,t.children.size||this.removeNode(e))}getNodeList(e){const t=[];let r=this.root;for(const n of e){if(!r)return t;t.push(r),r=r.children.get(n)}return t}iterateInternal(e,t,r){if(!1!==t(e.nodeData,r))for(const[n,i]of e.children)this.iterateInternal(i,t,r.concat(n))}}t.PathTrie=i;class o{constructor(){this.children=new Map([])}}t.PathTrieNode=o,t.getPathTrieFromAction=function(e,t){const r=new i;for(const i of(0,n.extractAllPathActions)(e)){let e=r.getOrCreatePathTrieNode(i.path);if(!t||e.nodeData)continue;let n=t.getPathTrieNode(i.path);if(n){const t=[[e,n]];for(;t.length;){const r=t.shift();if(e=r[0],n=r[1],!e.nodeData){for(const[r,i]of n.children)e.children.get(r)||e.children.set(r,new o),t.push([e.children.get(r),i]);e.nodeData=!0}}}}return r}},1122:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StateService=void 0;const n=r(2937),i=r(9978),o=r(1064),a=r(1496),s=r(8336);function u(e,t){let r=e;for(const e of t){if(null==r)return;if(!(0,o.isStateObject)(r))throw new Error("result must be a state object");r=r[e]}return r}t.StateService=class{constructor(){this.subscriptionsTree=new s.PathTrie,this.state={},this.batchCount=0,this.batchedActions=[]}dispatch(e){this.batchCount>0&&this.batchedActions.push(e),this.state=(0,o.apply)(this.state,e),0===this.batchCount&&this.dispatchSubscriptions(e)}runInBatch(e){this.batchCount++;try{e()}finally{if(this.batchCount--,0===this.batchCount&&this.batchedActions.length){const e={type:a.ActionType.BATCH_ACTION,payload:[...this.batchedActions]};this.batchedActions.splice(0),this.dispatch(e)}}}observePath(e,t){return new n.Observable((r=>{const n=this.getOrCreateSubjectForPath(e);r.next(this.getStateInPath(e));const o=n.pipe((0,i.filter)((e=>{if(!t)return!0;const r=new s.PathTrie,n=t();for(const e of n)r.getOrCreatePathTrieNode(e,!0);const i=(0,a.extractAllPathActions)(e.action).map((e=>e.path));let o=!1;for(const e of i)if(0===r.getNodeList(e).length){o=!0;break}return o})),(0,i.map)((e=>e.data))).subscribe(r);return()=>{o.unsubscribe(),n.observed||(n.complete(),this.subscriptionsTree.clearNodeData(e))}}))}setKeyInPath(e,t,r,n=!1){this.setInPath([...e,t],r,n)}setPartial(e,t,r=!1){let n=this.getStateInPath(e);n||(n={}),this.setInPath(e,Object.assign(Object.assign({},n),t),r)}setInPath(e,t,r=!1){if(r&&this.getStateInPath(e)===t)return;const n={type:a.ActionType.SET_PATH,path:e,payload:t};this.dispatch(n)}pushToArray(e,t){let r=this.getStateInPath(e);r=r?[...r]:[],r.push(t),this.setInPath(e,r)}deletePath(e){const t={type:a.ActionType.DELETE_PATH,path:e};this.dispatch(t)}getState(){return this.state}getStateInPath(e){return u(this.state,e)}destroy(){this.subscriptionsTree.iterateBfs((e=>{e&&e.subject&&e.subject.complete()}))}getOrCreateSubjectForPath(e){const t=this.subscriptionsTree.getOrCreatePathTrieNode(e);t.nodeData||(t.nodeData=new c);const r=t.nodeData;return r.subject||(r.subject=new n.Subject),r.subject}dispatchSubscriptions(e){(0,s.getPathTrieFromAction)(e,this.subscriptionsTree).iterateBfs(((t,r)=>{const n=this.subscriptionsTree.getPathTrieNode(r);n&&n.nodeData&&n.nodeData.subject.next({action:e,data:u(this.getState(),r)})}))}};class c{}},266:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NOOP_FN=void 0,t.NOOP_FN=e=>e()},9312:(e,t,r)=>{"use strict";r.r(t),r.d(t,{__assign:()=>o,__asyncDelegator:()=>T,__asyncGenerator:()=>E,__asyncValues:()=>j,__await:()=>S,__awaiter:()=>h,__classPrivateFieldGet:()=>N,__classPrivateFieldIn:()=>M,__classPrivateFieldSet:()=>k,__createBinding:()=>v,__decorate:()=>s,__esDecorate:()=>c,__exportStar:()=>m,__extends:()=>i,__generator:()=>y,__importDefault:()=>A,__importStar:()=>x,__makeTemplateObject:()=>P,__metadata:()=>d,__param:()=>u,__propKey:()=>f,__read:()=>g,__rest:()=>a,__runInitializers:()=>l,__setFunctionName:()=>p,__spread:()=>_,__spreadArray:()=>O,__spreadArrays:()=>w,__values:()=>b});var n=function(e,t){return n=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])},n(e,t)};function i(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}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var o=function(){return o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},o.apply(this,arguments)};function a(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}function s(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,r,a):i(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a}function u(e,t){return function(r,n){t(r,n,e)}}function c(e,t,r,n,i,o){function a(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var s,u=n.kind,c="getter"===u?"get":"setter"===u?"set":"value",l=!t&&e?n.static?e:e.prototype:null,f=t||(l?Object.getOwnPropertyDescriptor(l,n.name):{}),p=!1,d=r.length-1;d>=0;d--){var h={};for(var y in n)h[y]="access"===y?{}:n[y];for(var y in n.access)h.access[y]=n.access[y];h.addInitializer=function(e){if(p)throw new TypeError("Cannot add initializers after decoration has completed");o.push(a(e||null))};var v=(0,r[d])("accessor"===u?{get:f.get,set:f.set}:f[c],h);if("accessor"===u){if(void 0===v)continue;if(null===v||"object"!=typeof v)throw new TypeError("Object expected");(s=a(v.get))&&(f.get=s),(s=a(v.set))&&(f.set=s),(s=a(v.init))&&i.push(s)}else(s=a(v))&&("field"===u?i.push(s):f[c]=s)}l&&Object.defineProperty(l,n.name,f),p=!0}function l(e,t,r){for(var n=arguments.length>2,i=0;i<t.length;i++)r=n?t[i].call(e,r):t[i].call(e);return n?r:void 0}function f(e){return"symbol"==typeof e?e:"".concat(e)}function p(e,t,r){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})}function d(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function h(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function s(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))}function y(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(u){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((i=(i=a.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}}var v=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]};function m(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||v(t,e,r)}function b(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 e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}function _(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(g(arguments[t]));return e}function w(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),i=0;for(t=0;t<r;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)n[i]=o[a];return n}function O(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}function S(e){return this instanceof S?(this.v=e,this):new S(e)}function E(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(e,t||[]),o=[];return n={},a("next"),a("throw"),a("return"),n[Symbol.asyncIterator]=function(){return this},n;function a(e){i[e]&&(n[e]=function(t){return new Promise((function(r,n){o.push([e,t,r,n])>1||s(e,t)}))})}function s(e,t){try{(r=i[e](t)).value instanceof S?Promise.resolve(r.value.v).then(u,c):l(o[0][2],r)}catch(e){l(o[0][3],e)}var r}function u(e){s("next",e)}function c(e){s("throw",e)}function l(e,t){e(t),o.shift(),o.length&&s(o[0][0],o[0][1])}}function T(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,i){t[n]=e[n]?function(t){return(r=!r)?{value:S(e[n](t)),done:!1}:i?i(t):t}:i}}function j(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=b(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,i){!function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)}(n,i,(t=e[r](t)).done,t.value)}))}}}function P(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var I=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function x(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)&&v(t,e,r);return I(t,e),t}function A(e){return e&&e.__esModule?e:{default:e}}function N(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function k(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r}function M(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}},2371:function(e,t){!function(e){"use strict";function t(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];if(t.length>1){t[0]=t[0].slice(0,-1);for(var n=t.length-1,i=1;i<n;++i)t[i]=t[i].slice(1,-1);return t[n]=t[n].slice(1),t.join("")}return t[0]}function r(e){return"(?:"+e+")"}function n(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function i(e){return e.toUpperCase()}function o(e){var n="[A-Za-z]",i="[0-9]",o=t(i,"[A-Fa-f]"),a=r(r("%[EFef]"+o+"%"+o+o+"%"+o+o)+"|"+r("%[89A-Fa-f]"+o+"%"+o+o)+"|"+r("%"+o+o)),s="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",u=t("[\\:\\/\\?\\#\\[\\]\\@]",s),c=e?"[\\uE000-\\uF8FF]":"[]",l=t(n,i,"[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]"),f=r(n+t(n,i,"[\\+\\-\\.]")+"*"),p=r(r(a+"|"+t(l,s,"[\\:]"))+"*"),d=(r(r("25[0-5]")+"|"+r("2[0-4]"+i)+"|"+r("1"+i+i)+"|"+r("[1-9]"+i)+"|"+i),r(r("25[0-5]")+"|"+r("2[0-4]"+i)+"|"+r("1"+i+i)+"|"+r("0?[1-9]"+i)+"|0?0?"+i)),h=r(d+"\\."+d+"\\."+d+"\\."+d),y=r(o+"{1,4}"),v=r(r(y+"\\:"+y)+"|"+h),m=r(r(y+"\\:")+"{6}"+v),b=r("\\:\\:"+r(y+"\\:")+"{5}"+v),g=r(r(y)+"?\\:\\:"+r(y+"\\:")+"{4}"+v),_=r(r(r(y+"\\:")+"{0,1}"+y)+"?\\:\\:"+r(y+"\\:")+"{3}"+v),w=r(r(r(y+"\\:")+"{0,2}"+y)+"?\\:\\:"+r(y+"\\:")+"{2}"+v),O=r(r(r(y+"\\:")+"{0,3}"+y)+"?\\:\\:"+y+"\\:"+v),S=r(r(r(y+"\\:")+"{0,4}"+y)+"?\\:\\:"+v),E=r(r(r(y+"\\:")+"{0,5}"+y)+"?\\:\\:"+y),T=r(r(r(y+"\\:")+"{0,6}"+y)+"?\\:\\:"),j=r([m,b,g,_,w,O,S,E,T].join("|")),P=r(r(l+"|"+a)+"+"),I=(r(j+"\\%25"+P),r(j+r("\\%25|\\%(?!"+o+"{2})")+P)),x=r("[vV]"+o+"+\\."+t(l,s,"[\\:]")+"+"),A=r("\\["+r(I+"|"+j+"|"+x)+"\\]"),N=r(r(a+"|"+t(l,s))+"*"),k=r(A+"|"+h+"(?!"+N+")|"+N),M=r(i+"*"),D=r(r(p+"@")+"?"+k+r("\\:"+M)+"?"),R=r(a+"|"+t(l,s,"[\\:\\@]")),C=r(R+"*"),$=r(R+"+"),F=r(r(a+"|"+t(l,s,"[\\@]"))+"+"),q=r(r("\\/"+C)+"*"),L=r("\\/"+r($+q)+"?"),B=r(F+q),U=r($+q),V="(?!"+R+")",z=(r(q+"|"+L+"|"+B+"|"+U+"|"+V),r(r(R+"|"+t("[\\/\\?]",c))+"*")),Q=r(r(R+"|[\\/\\?]")+"*"),Y=r(r("\\/\\/"+D+q)+"|"+L+"|"+U+"|"+V),W=r(f+"\\:"+Y+r("\\?"+z)+"?"+r("\\#"+Q)+"?"),H=r(r("\\/\\/"+D+q)+"|"+L+"|"+B+"|"+V),K=r(H+r("\\?"+z)+"?"+r("\\#"+Q)+"?");return r(W+"|"+K),r(f+"\\:"+Y+r("\\?"+z)+"?"),r(r("\\/\\/("+r("("+p+")@")+"?("+k+")"+r("\\:("+M+")")+"?)")+"?("+q+"|"+L+"|"+U+"|"+V+")"),r("\\?("+z+")"),r("\\#("+Q+")"),r(r("\\/\\/("+r("("+p+")@")+"?("+k+")"+r("\\:("+M+")")+"?)")+"?("+q+"|"+L+"|"+B+"|"+V+")"),r("\\?("+z+")"),r("\\#("+Q+")"),r(r("\\/\\/("+r("("+p+")@")+"?("+k+")"+r("\\:("+M+")")+"?)")+"?("+q+"|"+L+"|"+U+"|"+V+")"),r("\\?("+z+")"),r("\\#("+Q+")"),r("("+p+")@"),r("\\:("+M+")"),{NOT_SCHEME:new RegExp(t("[^]",n,i,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(t("[^\\%\\:]",l,s),"g"),NOT_HOST:new RegExp(t("[^\\%\\[\\]\\:]",l,s),"g"),NOT_PATH:new RegExp(t("[^\\%\\/\\:\\@]",l,s),"g"),NOT_PATH_NOSCHEME:new RegExp(t("[^\\%\\/\\@]",l,s),"g"),NOT_QUERY:new RegExp(t("[^\\%]",l,s,"[\\:\\@\\/\\?]",c),"g"),NOT_FRAGMENT:new RegExp(t("[^\\%]",l,s,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(t("[^]",l,s),"g"),UNRESERVED:new RegExp(l,"g"),OTHER_CHARS:new RegExp(t("[^\\%]",l,u),"g"),PCT_ENCODED:new RegExp(a,"g"),IPV4ADDRESS:new RegExp("^("+h+")$"),IPV6ADDRESS:new RegExp("^\\[?("+j+")"+r(r("\\%25|\\%(?!"+o+"{2})")+"("+P+")")+"?\\]?$")}}var a=o(!1),s=o(!0),u=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{!n&&s.return&&s.return()}finally{if(i)throw o}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},c=2147483647,l=36,f=/^xn--/,p=/[^\0-\x7E]/,d=/[\x2E\u3002\uFF0E\uFF61]/g,h={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},y=Math.floor,v=String.fromCharCode;function m(e){throw new RangeError(h[e])}function b(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+function(e,t){for(var r=[],n=e.length;n--;)r[n]=t(e[n]);return r}((e=e.replace(d,".")).split("."),t).join(".")}function g(e){for(var t=[],r=0,n=e.length;r<n;){var i=e.charCodeAt(r++);if(i>=55296&&i<=56319&&r<n){var o=e.charCodeAt(r++);56320==(64512&o)?t.push(((1023&i)<<10)+(1023&o)+65536):(t.push(i),r--)}else t.push(i)}return t}var _=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},w=function(e,t,r){var n=0;for(e=r?y(e/700):e>>1,e+=y(e/t);e>455;n+=l)e=y(e/35);return y(n+36*e/(e+38))},O=function(e){var t,r=[],n=e.length,i=0,o=128,a=72,s=e.lastIndexOf("-");s<0&&(s=0);for(var u=0;u<s;++u)e.charCodeAt(u)>=128&&m("not-basic"),r.push(e.charCodeAt(u));for(var f=s>0?s+1:0;f<n;){for(var p=i,d=1,h=l;;h+=l){f>=n&&m("invalid-input");var v=(t=e.charCodeAt(f++))-48<10?t-22:t-65<26?t-65:t-97<26?t-97:l;(v>=l||v>y((c-i)/d))&&m("overflow"),i+=v*d;var b=h<=a?1:h>=a+26?26:h-a;if(v<b)break;var g=l-b;d>y(c/g)&&m("overflow"),d*=g}var _=r.length+1;a=w(i-p,_,0==p),y(i/_)>c-o&&m("overflow"),o+=y(i/_),i%=_,r.splice(i++,0,o)}return String.fromCodePoint.apply(String,r)},S=function(e){var t=[],r=(e=g(e)).length,n=128,i=0,o=72,a=!0,s=!1,u=void 0;try{for(var f,p=e[Symbol.iterator]();!(a=(f=p.next()).done);a=!0){var d=f.value;d<128&&t.push(v(d))}}catch(e){s=!0,u=e}finally{try{!a&&p.return&&p.return()}finally{if(s)throw u}}var h=t.length,b=h;for(h&&t.push("-");b<r;){var O=c,S=!0,E=!1,T=void 0;try{for(var j,P=e[Symbol.iterator]();!(S=(j=P.next()).done);S=!0){var I=j.value;I>=n&&I<O&&(O=I)}}catch(e){E=!0,T=e}finally{try{!S&&P.return&&P.return()}finally{if(E)throw T}}var x=b+1;O-n>y((c-i)/x)&&m("overflow"),i+=(O-n)*x,n=O;var A=!0,N=!1,k=void 0;try{for(var M,D=e[Symbol.iterator]();!(A=(M=D.next()).done);A=!0){var R=M.value;if(R<n&&++i>c&&m("overflow"),R==n){for(var C=i,$=l;;$+=l){var F=$<=o?1:$>=o+26?26:$-o;if(C<F)break;var q=C-F,L=l-F;t.push(v(_(F+q%L,0))),C=y(q/L)}t.push(v(_(C,0))),o=w(i,x,b==h),i=0,++b}}}catch(e){N=!0,k=e}finally{try{!A&&D.return&&D.return()}finally{if(N)throw k}}++i,++n}return t.join("")},E=function(e){return b(e,(function(e){return p.test(e)?"xn--"+S(e):e}))},T=function(e){return b(e,(function(e){return f.test(e)?O(e.slice(4).toLowerCase()):e}))},j={};function P(e){var t=e.charCodeAt(0);return t<16?"%0"+t.toString(16).toUpperCase():t<128?"%"+t.toString(16).toUpperCase():t<2048?"%"+(t>>6|192).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase():"%"+(t>>12|224).toString(16).toUpperCase()+"%"+(t>>6&63|128).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase()}function I(e){for(var t="",r=0,n=e.length;r<n;){var i=parseInt(e.substr(r+1,2),16);if(i<128)t+=String.fromCharCode(i),r+=3;else if(i>=194&&i<224){if(n-r>=6){var o=parseInt(e.substr(r+4,2),16);t+=String.fromCharCode((31&i)<<6|63&o)}else t+=e.substr(r,6);r+=6}else if(i>=224){if(n-r>=9){var a=parseInt(e.substr(r+4,2),16),s=parseInt(e.substr(r+7,2),16);t+=String.fromCharCode((15&i)<<12|(63&a)<<6|63&s)}else t+=e.substr(r,9);r+=9}else t+=e.substr(r,3),r+=3}return t}function x(e,t){function r(e){var r=I(e);return r.match(t.UNRESERVED)?r:e}return e.scheme&&(e.scheme=String(e.scheme).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(t.PCT_ENCODED,r).replace(t.NOT_USERINFO,P).replace(t.PCT_ENCODED,i)),void 0!==e.host&&(e.host=String(e.host).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_HOST,P).replace(t.PCT_ENCODED,i)),void 0!==e.path&&(e.path=String(e.path).replace(t.PCT_ENCODED,r).replace(e.scheme?t.NOT_PATH:t.NOT_PATH_NOSCHEME,P).replace(t.PCT_ENCODED,i)),void 0!==e.query&&(e.query=String(e.query).replace(t.PCT_ENCODED,r).replace(t.NOT_QUERY,P).replace(t.PCT_ENCODED,i)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(t.PCT_ENCODED,r).replace(t.NOT_FRAGMENT,P).replace(t.PCT_ENCODED,i)),e}function A(e){return e.replace(/^0*(.*)/,"$1")||"0"}function N(e,t){var r=e.match(t.IPV4ADDRESS)||[],n=u(r,2)[1];return n?n.split(".").map(A).join("."):e}function k(e,t){var r=e.match(t.IPV6ADDRESS)||[],n=u(r,3),i=n[1],o=n[2];if(i){for(var a=i.toLowerCase().split("::").reverse(),s=u(a,2),c=s[0],l=s[1],f=l?l.split(":").map(A):[],p=c.split(":").map(A),d=t.IPV4ADDRESS.test(p[p.length-1]),h=d?7:8,y=p.length-h,v=Array(h),m=0;m<h;++m)v[m]=f[m]||p[y+m]||"";d&&(v[h-1]=N(v[h-1],t));var b=v.reduce((function(e,t,r){if(!t||"0"===t){var n=e[e.length-1];n&&n.index+n.length===r?n.length++:e.push({index:r,length:1})}return e}),[]).sort((function(e,t){return t.length-e.length}))[0],g=void 0;if(b&&b.length>1){var _=v.slice(0,b.index),w=v.slice(b.index+b.length);g=_.join(":")+"::"+w.join(":")}else g=v.join(":");return o&&(g+="%"+o),g}return e}var M=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,D=void 0==="".match(/(){0}/)[1];function R(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={},n=!1!==t.iri?s:a;"suffix"===t.reference&&(e=(t.scheme?t.scheme+":":"")+"//"+e);var i=e.match(M);if(i){D?(r.scheme=i[1],r.userinfo=i[3],r.host=i[4],r.port=parseInt(i[5],10),r.path=i[6]||"",r.query=i[7],r.fragment=i[8],isNaN(r.port)&&(r.port=i[5])):(r.scheme=i[1]||void 0,r.userinfo=-1!==e.indexOf("@")?i[3]:void 0,r.host=-1!==e.indexOf("//")?i[4]:void 0,r.port=parseInt(i[5],10),r.path=i[6]||"",r.query=-1!==e.indexOf("?")?i[7]:void 0,r.fragment=-1!==e.indexOf("#")?i[8]:void 0,isNaN(r.port)&&(r.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?i[4]:void 0)),r.host&&(r.host=k(N(r.host,n),n)),void 0!==r.scheme||void 0!==r.userinfo||void 0!==r.host||void 0!==r.port||r.path||void 0!==r.query?void 0===r.scheme?r.reference="relative":void 0===r.fragment?r.reference="absolute":r.reference="uri":r.reference="same-document",t.reference&&"suffix"!==t.reference&&t.reference!==r.reference&&(r.error=r.error||"URI is not a "+t.reference+" reference.");var o=j[(t.scheme||r.scheme||"").toLowerCase()];if(t.unicodeSupport||o&&o.unicodeSupport)x(r,n);else{if(r.host&&(t.domainHost||o&&o.domainHost))try{r.host=E(r.host.replace(n.PCT_ENCODED,I).toLowerCase())}catch(e){r.error=r.error||"Host's domain name can not be converted to ASCII via punycode: "+e}x(r,a)}o&&o.parse&&o.parse(r,t)}else r.error=r.error||"URI can not be parsed.";return r}function C(e,t){var r=!1!==t.iri?s:a,n=[];return void 0!==e.userinfo&&(n.push(e.userinfo),n.push("@")),void 0!==e.host&&n.push(k(N(String(e.host),r),r).replace(r.IPV6ADDRESS,(function(e,t,r){return"["+t+(r?"%25"+r:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(n.push(":"),n.push(String(e.port))),n.length?n.join(""):void 0}var $=/^\.\.?\//,F=/^\/\.(\/|$)/,q=/^\/\.\.(\/|$)/,L=/^\/?(?:.|\n)*?(?=\/|$)/;function B(e){for(var t=[];e.length;)if(e.match($))e=e.replace($,"");else if(e.match(F))e=e.replace(F,"/");else if(e.match(q))e=e.replace(q,"/"),t.pop();else if("."===e||".."===e)e="";else{var r=e.match(L);if(!r)throw new Error("Unexpected dot segment condition");var n=r[0];e=e.slice(n.length),t.push(n)}return t.join("")}function U(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.iri?s:a,n=[],i=j[(t.scheme||e.scheme||"").toLowerCase()];if(i&&i.serialize&&i.serialize(e,t),e.host)if(r.IPV6ADDRESS.test(e.host));else if(t.domainHost||i&&i.domainHost)try{e.host=t.iri?T(e.host):E(e.host.replace(r.PCT_ENCODED,I).toLowerCase())}catch(r){e.error=e.error||"Host's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+r}x(e,r),"suffix"!==t.reference&&e.scheme&&(n.push(e.scheme),n.push(":"));var o=C(e,t);if(void 0!==o&&("suffix"!==t.reference&&n.push("//"),n.push(o),e.path&&"/"!==e.path.charAt(0)&&n.push("/")),void 0!==e.path){var u=e.path;t.absolutePath||i&&i.absolutePath||(u=B(u)),void 0===o&&(u=u.replace(/^\/\//,"/%2F")),n.push(u)}return void 0!==e.query&&(n.push("?"),n.push(e.query)),void 0!==e.fragment&&(n.push("#"),n.push(e.fragment)),n.join("")}function V(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n={};return arguments[3]||(e=R(U(e,r),r),t=R(U(t,r),r)),!(r=r||{}).tolerant&&t.scheme?(n.scheme=t.scheme,n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=B(t.path||""),n.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=B(t.path||""),n.query=t.query):(t.path?("/"===t.path.charAt(0)?n.path=B(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:n.path=t.path:n.path="/"+t.path,n.path=B(n.path)),n.query=t.query):(n.path=e.path,void 0!==t.query?n.query=t.query:n.query=e.query),n.userinfo=e.userinfo,n.host=e.host,n.port=e.port),n.scheme=e.scheme),n.fragment=t.fragment,n}function z(e,t){return e&&e.toString().replace(t&&t.iri?s.PCT_ENCODED:a.PCT_ENCODED,I)}var Q={scheme:"http",domainHost:!0,parse:function(e,t){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,t){var r="https"===String(e.scheme).toLowerCase();return e.port!==(r?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},Y={scheme:"https",domainHost:Q.domainHost,parse:Q.parse,serialize:Q.serialize};function W(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var H={scheme:"ws",domainHost:!0,parse:function(e,t){var r=e;return r.secure=W(r),r.resourceName=(r.path||"/")+(r.query?"?"+r.query:""),r.path=void 0,r.query=void 0,r},serialize:function(e,t){if(e.port!==(W(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var r=e.resourceName.split("?"),n=u(r,2),i=n[0],o=n[1];e.path=i&&"/"!==i?i:void 0,e.query=o,e.resourceName=void 0}return e.fragment=void 0,e}},K={scheme:"wss",domainHost:H.domainHost,parse:H.parse,serialize:H.serialize},G={},J="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",Z="[0-9A-Fa-f]",X=r(r("%[EFef]"+Z+"%"+Z+Z+"%"+Z+Z)+"|"+r("%[89A-Fa-f]"+Z+"%"+Z+Z)+"|"+r("%"+Z+Z)),ee=t("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),te=new RegExp(J,"g"),re=new RegExp(X,"g"),ne=new RegExp(t("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',ee),"g"),ie=new RegExp(t("[^]",J,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),oe=ie;function ae(e){var t=I(e);return t.match(te)?t:e}var se={scheme:"mailto",parse:function(e,t){var r=e,n=r.to=r.path?r.path.split(","):[];if(r.path=void 0,r.query){for(var i=!1,o={},a=r.query.split("&"),s=0,u=a.length;s<u;++s){var c=a[s].split("=");switch(c[0]){case"to":for(var l=c[1].split(","),f=0,p=l.length;f<p;++f)n.push(l[f]);break;case"subject":r.subject=z(c[1],t);break;case"body":r.body=z(c[1],t);break;default:i=!0,o[z(c[0],t)]=z(c[1],t)}}i&&(r.headers=o)}r.query=void 0;for(var d=0,h=n.length;d<h;++d){var y=n[d].split("@");if(y[0]=z(y[0]),t.unicodeSupport)y[1]=z(y[1],t).toLowerCase();else try{y[1]=E(z(y[1],t).toLowerCase())}catch(e){r.error=r.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}n[d]=y.join("@")}return r},serialize:function(e,t){var r,n=e,o=null!=(r=e.to)?r instanceof Array?r:"number"!=typeof r.length||r.split||r.setInterval||r.call?[r]:Array.prototype.slice.call(r):[];if(o){for(var a=0,s=o.length;a<s;++a){var u=String(o[a]),c=u.lastIndexOf("@"),l=u.slice(0,c).replace(re,ae).replace(re,i).replace(ne,P),f=u.slice(c+1);try{f=t.iri?T(f):E(z(f,t).toLowerCase())}catch(e){n.error=n.error||"Email address's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+e}o[a]=l+"@"+f}n.path=o.join(",")}var p=e.headers=e.headers||{};e.subject&&(p.subject=e.subject),e.body&&(p.body=e.body);var d=[];for(var h in p)p[h]!==G[h]&&d.push(h.replace(re,ae).replace(re,i).replace(ie,P)+"="+p[h].replace(re,ae).replace(re,i).replace(oe,P));return d.length&&(n.query=d.join("&")),n}},ue=/^([^\:]+)\:(.*)/,ce={scheme:"urn",parse:function(e,t){var r=e.path&&e.path.match(ue),n=e;if(r){var i=t.scheme||n.scheme||"urn",o=r[1].toLowerCase(),a=r[2],s=i+":"+(t.nid||o),u=j[s];n.nid=o,n.nss=a,n.path=void 0,u&&(n=u.parse(n,t))}else n.error=n.error||"URN can not be parsed.";return n},serialize:function(e,t){var r=t.scheme||e.scheme||"urn",n=e.nid,i=r+":"+(t.nid||n),o=j[i];o&&(e=o.serialize(e,t));var a=e,s=e.nss;return a.path=(n||t.nid)+":"+s,a}},le=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,fe={scheme:"urn:uuid",parse:function(e,t){var r=e;return r.uuid=r.nss,r.nss=void 0,t.tolerant||r.uuid&&r.uuid.match(le)||(r.error=r.error||"UUID is not valid."),r},serialize:function(e,t){var r=e;return r.nss=(e.uuid||"").toLowerCase(),r}};j[Q.scheme]=Q,j[Y.scheme]=Y,j[H.scheme]=H,j[K.scheme]=K,j[se.scheme]=se,j[ce.scheme]=ce,j[fe.scheme]=fe,e.SCHEMES=j,e.pctEncChar=P,e.pctDecChars=I,e.parse=R,e.removeDotSegments=B,e.serialize=U,e.resolveComponents=V,e.resolve=function(e,t,r){var n=function(e,t){var r=e;if(t)for(var n in t)r[n]=t[n];return r}({scheme:"null"},r);return U(V(R(e,n),R(t,n),n,!0),n)},e.normalize=function(e,t){return"string"==typeof e?e=U(R(e,t),t):"object"===n(e)&&(e=R(U(e,t),t)),e},e.equal=function(e,t,r){return"string"==typeof e?e=U(R(e,r),r):"object"===n(e)&&(e=U(e,r)),"string"==typeof t?t=U(R(t,r),r):"object"===n(t)&&(t=U(t,r)),e===t},e.escapeComponent=function(e,t){return e&&e.toString().replace(t&&t.iri?s.ESCAPE:a.ESCAPE,P)},e.unescapeComponent=z,Object.defineProperty(e,"__esModule",{value:!0})}(t)},9031:e=>{"use strict";e.exports=require("cross-fetch")},8087:e=>{"use strict";e.exports=require("socket.io-client")},2948:(e,t,r)=>{"use strict";r.r(t),r.d(t,{ApolloCache:()=>xn,ApolloClient:()=>In,ApolloError:()=>mr,ApolloLink:()=>be,Cache:()=>jn,HttpLink:()=>wt,InMemoryCache:()=>Ii,MissingFieldError:()=>An,NetworkStatus:()=>vr,Observable:()=>Q,ObservableQuery:()=>Tr,checkFetcher:()=>He,concat:()=>ki,createHttpLink:()=>_t,createSignalIfSupported:()=>vt,defaultDataIdFromObject:()=>Dn,defaultPrinter:()=>pt,disableExperimentalFragmentVariables:()=>To,disableFragmentWarnings:()=>So,empty:()=>xi,enableExperimentalFragmentVariables:()=>Eo,execute:()=>ge,fallbackHttpConfig:()=>ft,from:()=>Ai,fromError:()=>bt,fromPromise:()=>Di,gql:()=>wo,isApolloError:()=>yr,isReference:()=>J,makeReference:()=>G,makeVar:()=>yn,mergeOptions:()=>Tn,parseAndCheckHttpResponse:()=>We,resetCaches:()=>Oo,rewriteURIForGET:()=>mt,selectHttpOptionsAndBody:()=>dt,selectHttpOptionsAndBodyInternal:()=>ht,selectURI:()=>Re,serializeFetchParameter:()=>De,setLogVerbosity:()=>p,split:()=>Ni,throwServerError:()=>Ue,toPromise:()=>Mi});var n=r(9312),i="Invariant Violation",o=Object.setPrototypeOf,a=void 0===o?function(e,t){return e.__proto__=t,e}:o,s=function(e){function t(r){void 0===r&&(r=i);var n=e.call(this,"number"==typeof r?i+": "+r+" (see https://github.com/apollographql/invariant-packages)":r)||this;return n.framesToPop=1,n.name=i,a(n,t.prototype),n}return(0,n.__extends)(t,e),t}(Error);function u(e,t){if(!e)throw new s(t)}var c=["debug","log","warn","error","silent"],l=c.indexOf("log");function f(e){return function(){if(c.indexOf(e)>=l){var t=console[e]||console.log;return t.apply(console,arguments)}}}function p(e){var t=c[l];return l=Math.max(0,c.indexOf(e)),t}function d(e){try{return e()}catch(e){}}!function(e){e.debug=f("debug"),e.log=f("log"),e.warn=f("warn"),e.error=f("error")}(u||(u={}));const h=d((function(){return globalThis}))||d((function(){return window}))||d((function(){return self}))||d((function(){return global}))||d((function(){return d.constructor("return this")()}));var y="__",v=[y,y].join("DEV");const m=function(){try{return Boolean(__DEV__)}catch(e){return Object.defineProperty(h,v,{value:"production"!==d((function(){return"production"})),enumerable:!1,configurable:!0,writable:!0}),h[v]}}();function b(e){try{return e()}catch(e){}}var g=b((function(){return globalThis}))||b((function(){return window}))||b((function(){return self}))||b((function(){return global}))||b((function(){return b.constructor("return this")()})),_=!1;function w(e,t){if(!Boolean(e))throw new Error(t)}function O(e){return S(e,[])}function S(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return function(e,t){if(null===e)return"null";if(t.includes(e))return"[Circular]";const r=[...t,e];if(function(e){return"function"==typeof e.toJSON}(e)){const t=e.toJSON();if(t!==e)return"string"==typeof t?t:S(t,r)}else if(Array.isArray(e))return function(e,t){if(0===e.length)return"[]";if(t.length>2)return"[Array]";const r=Math.min(10,e.length),n=e.length-r,i=[];for(let n=0;n<r;++n)i.push(S(e[n],t));return 1===n?i.push("... 1 more item"):n>1&&i.push(`... ${n} more items`),"["+i.join(", ")+"]"}(e,r);return function(e,t){const r=Object.entries(e);if(0===r.length)return"{}";if(t.length>2)return"["+function(e){const t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){const t=e.constructor.name;if("string"==typeof t&&""!==t)return t}return t}(e)+"]";const n=r.map((([e,r])=>e+": "+S(r,t)));return"{ "+n.join(", ")+" }"}(e,r)}(e,t);default:return String(e)}}!g||b((function(){return"production"}))||b((function(){return process}))||(Object.defineProperty(g,"process",{value:{env:{NODE_ENV:"production"}},configurable:!0,enumerable:!1,writable:!0}),_=!0);class E{constructor(e,t="GraphQL request",r={line:1,column:1}){"string"==typeof e||w(!1,`Body must be a string. Received: ${O(e)}.`),this.body=e,this.name=t,this.locationOffset=r,this.locationOffset.line>0||w(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||w(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}function T(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function j(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function P(e,t,r){return t&&j(e.prototype,t),r&&j(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}_&&(delete g.process,_=!1),__DEV__?u("boolean"==typeof m,m):u("boolean"==typeof m,39);var I=function(){return"function"==typeof Symbol},x=function(e){return I()&&Boolean(Symbol[e])},A=function(e){return x(e)?Symbol[e]:"@@"+e};I()&&!x("observable")&&(Symbol.observable=Symbol("observable"));var N=A("iterator"),k=A("observable"),M=A("species");function D(e,t){var r=e[t];if(null!=r){if("function"!=typeof r)throw new TypeError(r+" is not a function");return r}}function R(e){var t=e.constructor;return void 0!==t&&null===(t=t[M])&&(t=void 0),void 0!==t?t:Q}function C(e){return e instanceof Q}function $(e){$.log?$.log(e):setTimeout((function(){throw e}))}function F(e){Promise.resolve().then((function(){try{e()}catch(e){$(e)}}))}function q(e){var t=e._cleanup;if(void 0!==t&&(e._cleanup=void 0,t))try{if("function"==typeof t)t();else{var r=D(t,"unsubscribe");r&&r.call(t)}}catch(e){$(e)}}function L(e){e._observer=void 0,e._queue=void 0,e._state="closed"}function B(e,t,r){e._state="running";var n=e._observer;try{var i=D(n,t);switch(t){case"next":i&&i.call(n,r);break;case"error":if(L(e),!i)throw r;i.call(n,r);break;case"complete":L(e),i&&i.call(n)}}catch(e){$(e)}"closed"===e._state?q(e):"running"===e._state&&(e._state="ready")}function U(e,t,r){if("closed"!==e._state){if("buffering"!==e._state)return"ready"!==e._state?(e._state="buffering",e._queue=[{type:t,value:r}],void F((function(){return function(e){var t=e._queue;if(t){e._queue=void 0,e._state="ready";for(var r=0;r<t.length&&(B(e,t[r].type,t[r].value),"closed"!==e._state);++r);}}(e)}))):void B(e,t,r);e._queue.push({type:t,value:r})}}var V=function(){function e(e,t){this._cleanup=void 0,this._observer=e,this._queue=void 0,this._state="initializing";var r=new z(this);try{this._cleanup=t.call(void 0,r)}catch(e){r.error(e)}"initializing"===this._state&&(this._state="ready")}return e.prototype.unsubscribe=function(){"closed"!==this._state&&(L(this),q(this))},P(e,[{key:"closed",get:function(){return"closed"===this._state}}]),e}(),z=function(){function e(e){this._subscription=e}var t=e.prototype;return t.next=function(e){U(this._subscription,"next",e)},t.error=function(e){U(this._subscription,"error",e)},t.complete=function(){U(this._subscription,"complete")},P(e,[{key:"closed",get:function(){return"closed"===this._subscription._state}}]),e}(),Q=function(){function e(t){if(!(this instanceof e))throw new TypeError("Observable cannot be called as a function");if("function"!=typeof t)throw new TypeError("Observable initializer must be a function");this._subscriber=t}var t=e.prototype;return t.subscribe=function(e){return"object"==typeof e&&null!==e||(e={next:e,error:arguments[1],complete:arguments[2]}),new V(e,this._subscriber)},t.forEach=function(e){var t=this;return new Promise((function(r,n){if("function"==typeof e)var i=t.subscribe({next:function(t){try{e(t,o)}catch(e){n(e),i.unsubscribe()}},error:n,complete:r});else n(new TypeError(e+" is not a function"));function o(){i.unsubscribe(),r()}}))},t.map=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(R(this))((function(r){return t.subscribe({next:function(t){try{t=e(t)}catch(e){return r.error(e)}r.next(t)},error:function(e){r.error(e)},complete:function(){r.complete()}})}))},t.filter=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(R(this))((function(r){return t.subscribe({next:function(t){try{if(!e(t))return}catch(e){return r.error(e)}r.next(t)},error:function(e){r.error(e)},complete:function(){r.complete()}})}))},t.reduce=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");var r=R(this),n=arguments.length>1,i=!1,o=arguments[1],a=o;return new r((function(r){return t.subscribe({next:function(t){var o=!i;if(i=!0,!o||n)try{a=e(a,t)}catch(e){return r.error(e)}else a=t},error:function(e){r.error(e)},complete:function(){if(!i&&!n)return r.error(new TypeError("Cannot reduce an empty sequence"));r.next(a),r.complete()}})}))},t.concat=function(){for(var e=this,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=R(this);return new i((function(t){var n,o=0;return function e(a){n=a.subscribe({next:function(e){t.next(e)},error:function(e){t.error(e)},complete:function(){o===r.length?(n=void 0,t.complete()):e(i.from(r[o++]))}})}(e),function(){n&&(n.unsubscribe(),n=void 0)}}))},t.flatMap=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");var r=R(this);return new r((function(n){var i=[],o=t.subscribe({next:function(t){if(e)try{t=e(t)}catch(e){return n.error(e)}var o=r.from(t).subscribe({next:function(e){n.next(e)},error:function(e){n.error(e)},complete:function(){var e=i.indexOf(o);e>=0&&i.splice(e,1),a()}});i.push(o)},error:function(e){n.error(e)},complete:function(){a()}});function a(){o.closed&&0===i.length&&n.complete()}return function(){i.forEach((function(e){return e.unsubscribe()})),o.unsubscribe()}}))},t[k]=function(){return this},e.from=function(t){var r="function"==typeof this?this:e;if(null==t)throw new TypeError(t+" is not an object");var n=D(t,k);if(n){var i=n.call(t);if(Object(i)!==i)throw new TypeError(i+" is not an object");return C(i)&&i.constructor===r?i:new r((function(e){return i.subscribe(e)}))}if(x("iterator")&&(n=D(t,N)))return new r((function(e){F((function(){if(!e.closed){for(var r,i=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return T(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?T(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(n.call(t));!(r=i()).done;){var o=r.value;if(e.next(o),e.closed)return}e.complete()}}))}));if(Array.isArray(t))return new r((function(e){F((function(){if(!e.closed){for(var r=0;r<t.length;++r)if(e.next(t[r]),e.closed)return;e.complete()}}))}));throw new TypeError(t+" is not observable")},e.of=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i="function"==typeof this?this:e;return new i((function(e){F((function(){if(!e.closed){for(var t=0;t<r.length;++t)if(e.next(r[t]),e.closed)return;e.complete()}}))}))},P(e,null,[{key:M,get:function(){return this}}]),e}();function Y(e){return null!==e&&"object"==typeof e}function W(e,t){var r=t,i=[];return e.definitions.forEach((function(e){if("OperationDefinition"===e.kind)throw __DEV__?new s("Found a ".concat(e.operation," operation").concat(e.name?" named '".concat(e.name.value,"'"):"",". ")+"No operations are allowed when using a fragment as a query. Only fragments are allowed."):new s(44);"FragmentDefinition"===e.kind&&i.push(e)})),void 0===r&&(__DEV__?u(1===i.length,"Found ".concat(i.length," fragments. `fragmentName` must be provided when there is not exactly 1 fragment.")):u(1===i.length,45),r=i[0].name.value),(0,n.__assign)((0,n.__assign)({},e),{definitions:(0,n.__spreadArray)([{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:r}}]}}],e.definitions,!0)})}function H(e){void 0===e&&(e=[]);var t={};return e.forEach((function(e){t[e.name.value]=e})),t}function K(e,t){switch(e.kind){case"InlineFragment":return e;case"FragmentSpread":var r=e.name.value;if("function"==typeof t)return t(r);var n=t&&t[r];return __DEV__?u(n,"No fragment named ".concat(r)):u(n,46),n||null;default:return null}}function G(e){return{__ref:String(e)}}function J(e){return Boolean(e&&"object"==typeof e&&"string"==typeof e.__ref)}function Z(e,t,r,n){if(function(e){return"IntValue"===e.kind}(r)||function(e){return"FloatValue"===e.kind}(r))e[t.value]=Number(r.value);else if(function(e){return"BooleanValue"===e.kind}(r)||function(e){return"StringValue"===e.kind}(r))e[t.value]=r.value;else if(function(e){return"ObjectValue"===e.kind}(r)){var i={};r.fields.map((function(e){return Z(i,e.name,e.value,n)})),e[t.value]=i}else if(function(e){return"Variable"===e.kind}(r)){var o=(n||{})[r.name.value];e[t.value]=o}else if(function(e){return"ListValue"===e.kind}(r))e[t.value]=r.values.map((function(e){var r={};return Z(r,t,e,n),r[t.value]}));else if(function(e){return"EnumValue"===e.kind}(r))e[t.value]=r.value;else{if(!function(e){return"NullValue"===e.kind}(r))throw __DEV__?new s('The inline argument "'.concat(t.value,'" of kind "').concat(r.kind,'"')+"is not supported. Use variables instead of inline arguments to overcome this limitation."):new s(55);e[t.value]=null}}I()&&Object.defineProperty(Q,Symbol("extensions"),{value:{symbol:k,hostReportError:$},configurable:!0});var X=["connection","include","skip","client","rest","export"],ee=Object.assign((function(e,t,r){if(t&&r&&r.connection&&r.connection.key){if(r.connection.filter&&r.connection.filter.length>0){var n=r.connection.filter?r.connection.filter:[];n.sort();var i={};return n.forEach((function(e){i[e]=t[e]})),"".concat(r.connection.key,"(").concat(te(i),")")}return r.connection.key}var o=e;if(t){var a=te(t);o+="(".concat(a,")")}return r&&Object.keys(r).forEach((function(e){-1===X.indexOf(e)&&(r[e]&&Object.keys(r[e]).length?o+="@".concat(e,"(").concat(te(r[e]),")"):o+="@".concat(e))})),o}),{setStringify:function(e){var t=te;return te=e,t}}),te=function(e){return JSON.stringify(e,re)};function re(e,t){return Y(t)&&!Array.isArray(t)&&(t=Object.keys(t).sort().reduce((function(e,r){return e[r]=t[r],e}),{})),t}function ne(e,t){if(e.arguments&&e.arguments.length){var r={};return e.arguments.forEach((function(e){var n=e.name,i=e.value;return Z(r,n,i,t)})),r}return null}function ie(e){return e.alias?e.alias.value:e.name.value}function oe(e,t,r){if("string"==typeof e.__typename)return e.__typename;for(var n=0,i=t.selections;n<i.length;n++){var o=i[n];if(ae(o)){if("__typename"===o.name.value)return e[ie(o)]}else{var a=oe(e,K(o,r).selectionSet,r);if("string"==typeof a)return a}}}function ae(e){return"Field"===e.kind}function se(e){__DEV__?u(e&&"Document"===e.kind,'Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a "gql" tag? http://docs.apollostack.com/apollo-client/core.html#gql'):u(e&&"Document"===e.kind,47);var t=e.definitions.filter((function(e){return"FragmentDefinition"!==e.kind})).map((function(e){if("OperationDefinition"!==e.kind)throw __DEV__?new s('Schema type definitions not allowed in queries. Found: "'.concat(e.kind,'"')):new s(48);return e}));return __DEV__?u(t.length<=1,"Ambiguous GraphQL document: contains ".concat(t.length," operations")):u(t.length<=1,49),e}function ue(e){return se(e),e.definitions.filter((function(e){return"OperationDefinition"===e.kind}))[0]}function ce(e){return e.definitions.filter((function(e){return"OperationDefinition"===e.kind&&e.name})).map((function(e){return e.name.value}))[0]||null}function le(e){return e.definitions.filter((function(e){return"FragmentDefinition"===e.kind}))}function fe(e){var t=ue(e);return __DEV__?u(t&&"query"===t.operation,"Must contain a query definition."):u(t&&"query"===t.operation,50),t}function pe(e){var t;se(e);for(var r=0,n=e.definitions;r<n.length;r++){var i=n[r];if("OperationDefinition"===i.kind){var o=i.operation;if("query"===o||"mutation"===o||"subscription"===o)return i}"FragmentDefinition"!==i.kind||t||(t=i)}if(t)return t;throw __DEV__?new s("Expected a parsed GraphQL query with a query, mutation, subscription, or a fragment."):new s(54)}function de(e){var t=Object.create(null),r=e&&e.variableDefinitions;return r&&r.length&&r.forEach((function(e){e.defaultValue&&Z(t,e.variable.name,e.defaultValue)})),t}function he(e,t){return t?t(e):Q.of()}function ye(e){return"function"==typeof e?new be(e):e}function ve(e){return e.request.length<=1}var me=function(e){function t(t,r){var n=e.call(this,t)||this;return n.link=r,n}return(0,n.__extends)(t,e),t}(Error),be=function(){function e(e){e&&(this.request=e)}return e.empty=function(){return new e((function(){return Q.of()}))},e.from=function(t){return 0===t.length?e.empty():t.map(ye).reduce((function(e,t){return e.concat(t)}))},e.split=function(t,r,n){var i=ye(r),o=ye(n||new e(he));return ve(i)&&ve(o)?new e((function(e){return t(e)?i.request(e)||Q.of():o.request(e)||Q.of()})):new e((function(e,r){return t(e)?i.request(e,r)||Q.of():o.request(e,r)||Q.of()}))},e.execute=function(e,t){return e.request(function(e,t){var r=(0,n.__assign)({},e);return Object.defineProperty(t,"setContext",{enumerable:!1,value:function(e){r="function"==typeof e?(0,n.__assign)((0,n.__assign)({},r),e(r)):(0,n.__assign)((0,n.__assign)({},r),e)}}),Object.defineProperty(t,"getContext",{enumerable:!1,value:function(){return(0,n.__assign)({},r)}}),t}(t.context,function(e){var t={variables:e.variables||{},extensions:e.extensions||{},operationName:e.operationName,query:e.query};return t.operationName||(t.operationName="string"!=typeof t.query?ce(t.query)||void 0:""),t}(function(e){for(var t=["query","operationName","variables","extensions","context"],r=0,n=Object.keys(e);r<n.length;r++){var i=n[r];if(t.indexOf(i)<0)throw __DEV__?new s("illegal argument: ".concat(i)):new s(27)}return e}(t))))||Q.of()},e.concat=function(t,r){var n=ye(t);if(ve(n))return __DEV__&&u.warn(new me("You are calling concat on a terminating link, which will have no effect",n)),n;var i=ye(r);return ve(i)?new e((function(e){return n.request(e,(function(e){return i.request(e)||Q.of()}))||Q.of()})):new e((function(e,t){return n.request(e,(function(e){return i.request(e,t)||Q.of()}))||Q.of()}))},e.prototype.split=function(t,r,n){return this.concat(e.split(t,r,n||new e(he)))},e.prototype.concat=function(t){return e.concat(this,t)},e.prototype.request=function(e,t){throw __DEV__?new s("request is not implemented"):new s(22)},e.prototype.onError=function(e,t){if(t&&t.error)return t.error(e),!1;throw e},e.prototype.setOnError=function(e){return this.onError=e,this},e}(),ge=be.execute;class _e{constructor(e,t,r){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=r}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}}class we{constructor(e,t,r,n,i,o){this.kind=e,this.start=t,this.end=r,this.line=n,this.column=i,this.value=o,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}}const Oe={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},Se=new Set(Object.keys(Oe));function Ee(e){const t=null==e?void 0:e.kind;return"string"==typeof t&&Se.has(t)}var Te,je,Pe;!function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"}(Te||(Te={})),(Pe=je||(je={})).NAME="Name",Pe.DOCUMENT="Document",Pe.OPERATION_DEFINITION="OperationDefinition",Pe.VARIABLE_DEFINITION="VariableDefinition",Pe.SELECTION_SET="SelectionSet",Pe.FIELD="Field",Pe.ARGUMENT="Argument",Pe.FRAGMENT_SPREAD="FragmentSpread",Pe.INLINE_FRAGMENT="InlineFragment",Pe.FRAGMENT_DEFINITION="FragmentDefinition",Pe.VARIABLE="Variable",Pe.INT="IntValue",Pe.FLOAT="FloatValue",Pe.STRING="StringValue",Pe.BOOLEAN="BooleanValue",Pe.NULL="NullValue",Pe.ENUM="EnumValue",Pe.LIST="ListValue",Pe.OBJECT="ObjectValue",Pe.OBJECT_FIELD="ObjectField",Pe.DIRECTIVE="Directive",Pe.NAMED_TYPE="NamedType",Pe.LIST_TYPE="ListType",Pe.NON_NULL_TYPE="NonNullType",Pe.SCHEMA_DEFINITION="SchemaDefinition",Pe.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",Pe.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",Pe.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",Pe.FIELD_DEFINITION="FieldDefinition",Pe.INPUT_VALUE_DEFINITION="InputValueDefinition",Pe.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",Pe.UNION_TYPE_DEFINITION="UnionTypeDefinition",Pe.ENUM_TYPE_DEFINITION="EnumTypeDefinition",Pe.ENUM_VALUE_DEFINITION="EnumValueDefinition",Pe.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",Pe.DIRECTIVE_DEFINITION="DirectiveDefinition",Pe.SCHEMA_EXTENSION="SchemaExtension",Pe.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",Pe.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",Pe.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",Pe.UNION_TYPE_EXTENSION="UnionTypeExtension",Pe.ENUM_TYPE_EXTENSION="EnumTypeExtension",Pe.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension";const Ie=Object.freeze({});function xe(e,t,r=Oe){const n=new Map;for(const e of Object.values(je))n.set(e,Ae(t,e));let i,o,a,s=Array.isArray(e),u=[e],c=-1,l=[],f=e;const p=[],d=[];do{c++;const e=c===u.length,m=e&&0!==l.length;if(e){if(o=0===d.length?void 0:p[p.length-1],f=a,a=d.pop(),m)if(s){f=f.slice();let e=0;for(const[t,r]of l){const n=t-e;null===r?(f.splice(n,1),e++):f[n]=r}}else{f=Object.defineProperties({},Object.getOwnPropertyDescriptors(f));for(const[e,t]of l)f[e]=t}c=i.index,u=i.keys,l=i.edits,s=i.inArray,i=i.prev}else if(a){if(o=s?c:u[c],f=a[o],null==f)continue;p.push(o)}let b;if(!Array.isArray(f)){var h,y;Ee(f)||w(!1,`Invalid AST Node: ${O(f)}.`);const r=e?null===(h=n.get(f.kind))||void 0===h?void 0:h.leave:null===(y=n.get(f.kind))||void 0===y?void 0:y.enter;if(b=null==r?void 0:r.call(t,f,o,a,p,d),b===Ie)break;if(!1===b){if(!e){p.pop();continue}}else if(void 0!==b&&(l.push([o,b]),!e)){if(!Ee(b)){p.pop();continue}f=b}}var v;void 0===b&&m&&l.push([o,f]),e?p.pop():(i={inArray:s,index:c,keys:u,edits:l,prev:i},s=Array.isArray(f),u=s?f:null!==(v=r[f.kind])&&void 0!==v?v:[],c=-1,l=[],a&&d.push(a),a=f)}while(void 0!==i);return 0!==l.length?l[l.length-1][1]:e}function Ae(e,t){const r=e[t];return"object"==typeof r?r:"function"==typeof r?{enter:r,leave:void 0}:{enter:e.enter,leave:e.leave}}function Ne(e,t){var r=e.directives;return!r||!r.length||function(e){var t=[];return e&&e.length&&e.forEach((function(e){if(function(e){var t=e.name.value;return"skip"===t||"include"===t}(e)){var r=e.arguments,n=e.name.value;__DEV__?u(r&&1===r.length,"Incorrect number of arguments for the @".concat(n," directive.")):u(r&&1===r.length,41);var i=r[0];__DEV__?u(i.name&&"if"===i.name.value,"Invalid argument for the @".concat(n," directive.")):u(i.name&&"if"===i.name.value,42);var o=i.value;__DEV__?u(o&&("Variable"===o.kind||"BooleanValue"===o.kind),"Argument for the @".concat(n," directive must be a variable or a boolean value.")):u(o&&("Variable"===o.kind||"BooleanValue"===o.kind),43),t.push({directive:e,ifArgument:i})}})),t}(r).every((function(e){var r=e.directive,n=e.ifArgument,i=!1;return"Variable"===n.value.kind?(i=t&&t[n.value.name.value],__DEV__?u(void 0!==i,"Invalid variable referenced in @".concat(r.name.value," directive.")):u(void 0!==i,40)):i=n.value.value,"skip"===r.name.value?!i:i}))}function ke(e,t,r){var n=new Set(e),i=n.size;return xe(t,{Directive:function(e){if(n.delete(e.name.value)&&(!r||!n.size))return Ie}}),r?!n.size:n.size<i}function Me(e){return e&&ke(["client","export"],e,!0)}var De=function(e,t){var r;try{r=JSON.stringify(e)}catch(e){var n=__DEV__?new s("Network request failed. ".concat(t," is not serializable: ").concat(e.message)):new s(24);throw n.parseError=e,n}return r},Re=function(e,t){return e.getContext().uri||("function"==typeof t?t(e):t||"/graphql")},Ce="function"==typeof WeakMap&&"ReactNative"!==d((function(){return navigator.product})),$e="function"==typeof WeakSet,Fe="function"==typeof Symbol&&"function"==typeof Symbol.for,qe=Fe&&Symbol.asyncIterator;function Le(e){var t={next:function(){return e.read()}};return qe&&(t[Symbol.asyncIterator]=function(){return this}),t}function Be(e){var t,r,n,i,o=e;if(e.body&&(o=e.body),i=o,qe&&i[Symbol.asyncIterator])return function(e){var t,r=e[Symbol.asyncIterator]();return(t={next:function(){return r.next()}})[Symbol.asyncIterator]=function(){return this},t}(o);if(function(e){return!!e.getReader}(o))return Le(o.getReader());if(function(e){return!!e.stream}(o))return Le(o.stream().getReader());if(function(e){return!!e.arrayBuffer}(o))return t=o.arrayBuffer(),r=!1,n={next:function(){return r?Promise.resolve({value:void 0,done:!0}):(r=!0,new Promise((function(e,r){t.then((function(t){e({value:t,done:!1})})).catch(r)})))}},qe&&(n[Symbol.asyncIterator]=function(){return this}),n;if(function(e){return!!e.pipe}(o))return function(e){var t=null,r=null,n=!1,i=[],o=[];function a(e){if(!r){if(o.length){var t=o.shift();if(Array.isArray(t)&&t[0])return t[0]({value:e,done:!1})}i.push(e)}}function s(e){r=e,o.slice().forEach((function(t){t[1](e)})),!t||t()}function u(){n=!0,o.slice().forEach((function(e){e[0]({value:void 0,done:!0})})),!t||t()}t=function(){t=null,e.removeListener("data",a),e.removeListener("error",s),e.removeListener("end",u),e.removeListener("finish",u),e.removeListener("close",u)},e.on("data",a),e.on("error",s),e.on("end",u),e.on("finish",u),e.on("close",u);var c={next:function(){return new Promise((function(e,t){return r?t(r):i.length?e({value:i.shift(),done:!1}):n?e({value:void 0,done:!0}):void o.push([e,t])}))}};return qe&&(c[Symbol.asyncIterator]=function(){return this}),c}(o);throw new Error("Unknown body type for responseIterator. Please pass a streamable response.")}d((function(){return window.document.createElement})),d((function(){return navigator.userAgent.indexOf("jsdom")>=0}));var Ue=function(e,t,r){var n=new Error(r);throw n.name="ServerError",n.response=e,n.statusCode=e.status,n.result=t,n},Ve=Object.prototype.hasOwnProperty;function ze(e){var t={};return e.split("\n").forEach((function(e){var r=e.indexOf(":");if(r>-1){var n=e.slice(0,r).trim().toLowerCase(),i=e.slice(r+1).trim();t[n]=i}})),t}function Qe(e,t){e.status>=300&&Ue(e,function(){try{return JSON.parse(t)}catch(e){return t}}(),"Response not successful: Received status code ".concat(e.status));try{return JSON.parse(t)}catch(n){var r=n;throw r.name="ServerParseError",r.response=e,r.statusCode=e.status,r.bodyText=t,r}}function Ye(e,t){var r,n;"AbortError"!==e.name&&(e.result&&e.result.errors&&e.result.data&&(null===(r=t.next)||void 0===r||r.call(t,e.result)),null===(n=t.error)||void 0===n||n.call(t,e))}function We(e){return function(t){return t.text().then((function(e){return Qe(t,e)})).then((function(r){return t.status>=300&&Ue(t,r,"Response not successful: Received status code ".concat(t.status)),Array.isArray(r)||Ve.call(r,"data")||Ve.call(r,"errors")||Ue(t,r,"Server response was missing for query '".concat(Array.isArray(e)?e.map((function(e){return e.operationName})):e.operationName,"'.")),r}))}}var He=function(e){if(!e&&"undefined"==typeof fetch)throw __DEV__?new s("\n\"fetch\" has not been found globally and no fetcher has been configured. To fix this, install a fetch package (like https://www.npmjs.com/package/cross-fetch), instantiate the fetcher, and pass it into your HttpLink constructor. For example:\n\nimport fetch from 'cross-fetch';\nimport { ApolloClient, HttpLink } from '@apollo/client';\nconst client = new ApolloClient({\n link: new HttpLink({ uri: '/graphql', fetch })\n});\n "):new s(23)};function Ke(e){return 9===e||32===e}function Ge(e){return e>=48&&e<=57}function Je(e){return e>=97&&e<=122||e>=65&&e<=90}function Ze(e){return Je(e)||95===e}function Xe(e){var t;let r=Number.MAX_SAFE_INTEGER,n=null,i=-1;for(let t=0;t<e.length;++t){var o;const a=e[t],s=et(a);s!==a.length&&(n=null!==(o=n)&&void 0!==o?o:t,i=t,0!==t&&s<r&&(r=s))}return e.map(((e,t)=>0===t?e:e.slice(r))).slice(null!==(t=n)&&void 0!==t?t:0,i+1)}function et(e){let t=0;for(;t<e.length&&Ke(e.charCodeAt(t));)++t;return t}const tt=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function rt(e){return nt[e.charCodeAt(0)]}const nt=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"];function it(e){return xe(e,ot)}const ot={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>at(e.definitions,"\n\n")},OperationDefinition:{leave(e){const t=ut("(",at(e.variableDefinitions,", "),")"),r=at([e.operation,at([e.name,t]),at(e.directives," ")]," ");return("query"===r?"":r+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:r,directives:n})=>e+": "+t+ut(" = ",r)+ut(" ",at(n," "))},SelectionSet:{leave:({selections:e})=>st(e)},Field:{leave({alias:e,name:t,arguments:r,directives:n,selectionSet:i}){const o=ut("",e,": ")+t;let a=o+ut("(",at(r,", "),")");return a.length>80&&(a=o+ut("(\n",ct(at(r,"\n")),"\n)")),at([a,at(n," "),i]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+ut(" ",at(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:r})=>at(["...",ut("on ",e),at(t," "),r]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:r,directives:n,selectionSet:i})=>`fragment ${e}${ut("(",at(r,", "),")")} on ${t} ${ut("",at(n," ")," ")}`+i},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?function(e,t){const r=e.replace(/"""/g,'\\"""'),n=r.split(/\r\n|[\n\r]/g),i=1===n.length,o=n.length>1&&n.slice(1).every((e=>0===e.length||Ke(e.charCodeAt(0)))),a=r.endsWith('\\"""'),s=e.endsWith('"')&&!a,u=e.endsWith("\\"),c=s||u,l=!i||e.length>70||c||o||a;let f="";const p=i&&Ke(e.charCodeAt(0));return(l&&!p||o)&&(f+="\n"),f+=r,(l||c)&&(f+="\n"),'"""'+f+'"""'}(e):`"${e.replace(tt,rt)}"`},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+at(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+at(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+ut("(",at(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:r})=>ut("",e,"\n")+at(["schema",at(t," "),st(r)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:r})=>ut("",e,"\n")+at(["scalar",t,at(r," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:r,directives:n,fields:i})=>ut("",e,"\n")+at(["type",t,ut("implements ",at(r," & ")),at(n," "),st(i)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:r,type:n,directives:i})=>ut("",e,"\n")+t+(lt(r)?ut("(\n",ct(at(r,"\n")),"\n)"):ut("(",at(r,", "),")"))+": "+n+ut(" ",at(i," "))},InputValueDefinition:{leave:({description:e,name:t,type:r,defaultValue:n,directives:i})=>ut("",e,"\n")+at([t+": "+r,ut("= ",n),at(i," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:t,interfaces:r,directives:n,fields:i})=>ut("",e,"\n")+at(["interface",t,ut("implements ",at(r," & ")),at(n," "),st(i)]," ")},UnionTypeDefinition:{leave:({description:e,name:t,directives:r,types:n})=>ut("",e,"\n")+at(["union",t,at(r," "),ut("= ",at(n," | "))]," ")},EnumTypeDefinition:{leave:({description:e,name:t,directives:r,values:n})=>ut("",e,"\n")+at(["enum",t,at(r," "),st(n)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:r})=>ut("",e,"\n")+at([t,at(r," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:r,fields:n})=>ut("",e,"\n")+at(["input",t,at(r," "),st(n)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:r,repeatable:n,locations:i})=>ut("",e,"\n")+"directive @"+t+(lt(r)?ut("(\n",ct(at(r,"\n")),"\n)"):ut("(",at(r,", "),")"))+(n?" repeatable":"")+" on "+at(i," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>at(["extend schema",at(e," "),st(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>at(["extend scalar",e,at(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:r,fields:n})=>at(["extend type",e,ut("implements ",at(t," & ")),at(r," "),st(n)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:r,fields:n})=>at(["extend interface",e,ut("implements ",at(t," & ")),at(r," "),st(n)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:r})=>at(["extend union",e,at(t," "),ut("= ",at(r," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:r})=>at(["extend enum",e,at(t," "),st(r)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:r})=>at(["extend input",e,at(t," "),st(r)]," ")}};function at(e,t=""){var r;return null!==(r=null==e?void 0:e.filter((e=>e)).join(t))&&void 0!==r?r:""}function st(e){return ut("{\n",ct(at(e,"\n")),"\n}")}function ut(e,t,r=""){return null!=t&&""!==t?e+t+r:""}function ct(e){return ut(" ",e.replace(/\n/g,"\n "))}function lt(e){var t;return null!==(t=null==e?void 0:e.some((e=>e.includes("\n"))))&&void 0!==t&&t}var ft={http:{includeQuery:!0,includeExtensions:!1,preserveHeaderCase:!1},headers:{accept:"*/*","content-type":"application/json"},options:{method:"POST"}},pt=function(e,t){return t(e)};function dt(e,t){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];return r.unshift(t),ht.apply(void 0,(0,n.__spreadArray)([e,pt],r,!1))}function ht(e,t){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];var o={},a={};r.forEach((function(e){o=(0,n.__assign)((0,n.__assign)((0,n.__assign)({},o),e.options),{headers:(0,n.__assign)((0,n.__assign)({},o.headers),e.headers)}),e.credentials&&(o.credentials=e.credentials),a=(0,n.__assign)((0,n.__assign)({},a),e.http)})),o.headers&&(o.headers=yt(o.headers,a.preserveHeaderCase));var s=e.operationName,u=e.extensions,c=e.variables,l=e.query,f={operationName:s,variables:c};return a.includeExtensions&&(f.extensions=u),a.includeQuery&&(f.query=t(l,it)),{options:o,body:f}}function yt(e,t){if(!t){var r=Object.create(null);return Object.keys(Object(e)).forEach((function(t){r[t.toLowerCase()]=e[t]})),r}var n=Object.create(null);Object.keys(Object(e)).forEach((function(t){n[t.toLowerCase()]={originalName:t,value:e[t]}}));var i=Object.create(null);return Object.keys(n).forEach((function(e){i[n[e].originalName]=n[e].value})),i}var vt=function(){if("undefined"==typeof AbortController)return{controller:!1,signal:!1};var e=new AbortController;return{controller:e,signal:e.signal}};function mt(e,t){var r=[],n=function(e,t){r.push("".concat(e,"=").concat(encodeURIComponent(t)))};if("query"in t&&n("query",t.query),t.operationName&&n("operationName",t.operationName),t.variables){var i=void 0;try{i=De(t.variables,"Variables map")}catch(e){return{parseError:e}}n("variables",i)}if(t.extensions){var o=void 0;try{o=De(t.extensions,"Extensions map")}catch(e){return{parseError:e}}n("extensions",o)}var a="",s=e,u=e.indexOf("#");-1!==u&&(a=e.substr(u),s=e.substr(0,u));var c=-1===s.indexOf("?")?"?":"&";return{newURI:s+c+r.join("&")+a}}function bt(e){return new Q((function(t){t.error(e)}))}var gt=d((function(){return fetch})),_t=function(e){void 0===e&&(e={});var t=e.uri,r=void 0===t?"/graphql":t,i=e.fetch,o=e.print,a=void 0===o?pt:o,s=e.includeExtensions,u=e.preserveHeaderCase,c=e.useGETForQueries,l=e.includeUnusedVariables,f=void 0!==l&&l,p=(0,n.__rest)(e,["uri","fetch","print","includeExtensions","preserveHeaderCase","useGETForQueries","includeUnusedVariables"]);__DEV__&&He(i||gt);var h={http:{includeExtensions:s,preserveHeaderCase:u},options:p.fetchOptions,credentials:p.credentials,headers:p.headers};return new be((function(e){var t=Re(e,r),o=e.getContext(),s={};if(o.clientAwareness){var u=o.clientAwareness,l=u.name,p=u.version;l&&(s["apollographql-client-name"]=l),p&&(s["apollographql-client-version"]=p)}var y,v=(0,n.__assign)((0,n.__assign)({},s),o.headers),m={http:o.http,options:o.fetchOptions,credentials:o.credentials,headers:v},b=ht(e,a,ft,h,m),g=b.options,_=b.body;if(_.variables&&!f){var w=new Set(Object.keys(_.variables));xe(e.query,{Variable:function(e,t,r){r&&"VariableDefinition"!==r.kind&&w.delete(e.name.value)}}),w.size&&(_.variables=(0,n.__assign)({},_.variables),w.forEach((function(e){delete _.variables[e]})))}if(!g.signal){var O=vt(),S=O.controller,E=O.signal;(y=S)&&(g.signal=E)}if(c&&!e.query.definitions.some((function(e){return"OperationDefinition"===e.kind&&"mutation"===e.operation}))&&(g.method="GET"),ke(["defer"],e.query)&&(g.headers=g.headers||{},g.headers.accept="multipart/mixed; deferSpec=20220824, application/json"),"GET"===g.method){var T=mt(t,_),j=T.newURI,P=T.parseError;if(P)return bt(P);t=j}else try{g.body=De(_,"Payload")}catch(P){return bt(P)}return new Q((function(r){return(i||d((function(){return fetch}))||gt)(t,g).then((function(t){var i;e.setContext({response:t});var o=null===(i=t.headers)||void 0===i?void 0:i.get("content-type");return null!==o&&/^multipart\/mixed/i.test(o)?function(e,t){var r,i,o;return(0,n.__awaiter)(this,void 0,void 0,(function(){var a,s,u,c,l,f,p,d,h,y,v,m,b,g,_,w,O,S,E,T;return(0,n.__generator)(this,(function(n){switch(n.label){case 0:if(void 0===TextDecoder)throw new Error("TextDecoder must be defined in the environment: please import a polyfill.");a=new TextDecoder("utf-8"),s=null===(r=e.headers)||void 0===r?void 0:r.get("content-type"),u="boundary=",c=(null==s?void 0:s.includes(u))?null==s?void 0:s.substring((null==s?void 0:s.indexOf(u))+u.length).replace(/['"]/g,"").replace(/\;(.*)/gm,"").trim():"-",l="--".concat(c),f="",p=Be(e),d=!0,n.label=1;case 1:return d?[4,p.next()]:[3,3];case 2:for(h=n.sent(),y=h.value,v=h.done,m="string"==typeof y?y:a.decode(y),d=!v,b=(f+=m).indexOf(l);b>-1;){if(g=void 0,T=[f.slice(0,b),f.slice(b+l.length)],f=T[1],(g=T[0]).trim()){if(_=g.indexOf("\r\n\r\n"),w=ze(g.slice(0,_)),(O=w["content-type"])&&-1===O.toLowerCase().indexOf("application/json"))throw new Error("Unsupported patch content type: application/json is required.");S=g.slice(_);try{E=Qe(e,S.replace("\r\n","")),(Object.keys(E).length>1||"data"in E||"incremental"in E||"errors"in E)&&(null===(i=t.next)||void 0===i||i.call(t,E))}catch(e){Ye(e,t)}}b=f.indexOf(l)}return[3,1];case 3:return null===(o=t.complete)||void 0===o||o.call(t),[2]}}))}))}(t,r):function(e,t,r){We(t)(e).then((function(e){var t,n;null===(t=r.next)||void 0===t||t.call(r,e),null===(n=r.complete)||void 0===n||n.call(r)})).catch((function(e){return Ye(e,r)}))}(t,e,r)})).catch((function(e){return Ye(e,r)})),function(){y&&y.abort()}}))}))},wt=function(e){function t(t){void 0===t&&(t={});var r=e.call(this,_t(t).request)||this;return r.options=t,r}return(0,n.__extends)(t,e),t}(be),Ot=Object.prototype,St=Ot.toString,Et=Ot.hasOwnProperty,Tt=Function.prototype.toString,jt=new Map;function Pt(e,t){try{return It(e,t)}finally{jt.clear()}}function It(e,t){if(e===t)return!0;var r,n,i,o=St.call(e);if(o!==St.call(t))return!1;switch(o){case"[object Array]":if(e.length!==t.length)return!1;case"[object Object]":if(kt(e,t))return!0;var a=xt(e),s=xt(t),u=a.length;if(u!==s.length)return!1;for(var c=0;c<u;++c)if(!Et.call(t,a[c]))return!1;for(c=0;c<u;++c){var l=a[c];if(!It(e[l],t[l]))return!1}return!0;case"[object Error]":return e.name===t.name&&e.message===t.message;case"[object Number]":if(e!=e)return t!=t;case"[object Boolean]":case"[object Date]":return+e==+t;case"[object RegExp]":case"[object String]":return e=="".concat(t);case"[object Map]":case"[object Set]":if(e.size!==t.size)return!1;if(kt(e,t))return!0;for(var f=e.entries(),p="[object Map]"===o;;){var d=f.next();if(d.done)break;var h=d.value,y=h[0],v=h[1];if(!t.has(y))return!1;if(p&&!It(v,t.get(y)))return!1}return!0;case"[object Uint16Array]":case"[object Uint8Array]":case"[object Uint32Array]":case"[object Int32Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object ArrayBuffer]":e=new Uint8Array(e),t=new Uint8Array(t);case"[object DataView]":var m=e.byteLength;if(m===t.byteLength)for(;m--&&e[m]===t[m];);return-1===m;case"[object AsyncFunction]":case"[object GeneratorFunction]":case"[object AsyncGeneratorFunction]":case"[object Function]":var b=Tt.call(e);return b===Tt.call(t)&&(n=Nt,!((i=(r=b).length-n.length)>=0&&r.indexOf(n,i)===i))}return!1}function xt(e){return Object.keys(e).filter(At,e)}function At(e){return void 0!==this[e]}var Nt="{ [native code] }";function kt(e,t){var r=jt.get(e);if(r){if(r.has(t))return!0}else jt.set(e,r=new Set);return r.add(t),!1}var Mt=Array.isArray;function Dt(e){return Array.isArray(e)&&e.length>0}var Rt=Object.prototype.hasOwnProperty;function Ct(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return $t(e)}function $t(e){var t=e[0]||{},r=e.length;if(r>1)for(var n=new qt,i=1;i<r;++i)t=n.merge(t,e[i]);return t}var Ft=function(e,t,r){return this.merge(e[r],t[r])},qt=function(){function e(e){void 0===e&&(e=Ft),this.reconciler=e,this.isObject=Y,this.pastCopies=new Set}return e.prototype.merge=function(e,t){for(var r=this,i=[],o=2;o<arguments.length;o++)i[o-2]=arguments[o];return Y(t)&&Y(e)?(Object.keys(t).forEach((function(o){if(Rt.call(e,o)){var a=e[o];if(t[o]!==a){var s=r.reconciler.apply(r,(0,n.__spreadArray)([e,t,o],i,!1));s!==a&&((e=r.shallowCopyForMerge(e))[o]=s)}}else(e=r.shallowCopyForMerge(e))[o]=t[o]})),e):t},e.prototype.shallowCopyForMerge=function(e){return Y(e)&&(this.pastCopies.has(e)||(e=Array.isArray(e)?e.slice(0):(0,n.__assign)({__proto__:Object.getPrototypeOf(e)},e),this.pastCopies.add(e))),e},e}();function Lt(e){return"incremental"in e}function Bt(e,t){var r=e,n=new qt;return Lt(t)&&Dt(t.incremental)&&t.incremental.forEach((function(e){for(var t=e.data,i=e.path,o=i.length-1;o>=0;--o){var a=i[o],s=isNaN(+a)?{}:[];s[a]=t,t=s}r=n.merge(r,t)})),r}var Ut,Vt,zt=function(){return Object.create(null)},Qt=Array.prototype,Yt=Qt.forEach,Wt=Qt.slice,Ht=function(){function e(e,t){void 0===e&&(e=!0),void 0===t&&(t=zt),this.weakness=e,this.makeData=t}return e.prototype.lookup=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this.lookupArray(e)},e.prototype.lookupArray=function(e){var t=this;return Yt.call(e,(function(e){return t=t.getChildTrie(e)})),t.data||(t.data=this.makeData(Wt.call(e)))},e.prototype.getChildTrie=function(t){var r=this.weakness&&function(e){switch(typeof e){case"object":if(null===e)break;case"function":return!0}return!1}(t)?this.weak||(this.weak=new WeakMap):this.strong||(this.strong=new Map),n=r.get(t);return n||r.set(t,n=new e(this.weakness,this.makeData)),n},e}(),Kt=function(){function e(){this.known=new($e?WeakSet:Set),this.pool=new Ht(Ce),this.passes=new WeakMap,this.keysByJSON=new Map,this.empty=this.admit({})}return e.prototype.isKnown=function(e){return Y(e)&&this.known.has(e)},e.prototype.pass=function(e){if(Y(e)){var t=function(e){return Y(e)?Mt(e)?e.slice(0):(0,n.__assign)({__proto__:Object.getPrototypeOf(e)},e):e}(e);return this.passes.set(t,e),t}return e},e.prototype.admit=function(e){var t=this;if(Y(e)){var r=this.passes.get(e);if(r)return r;switch(Object.getPrototypeOf(e)){case Array.prototype:if(this.known.has(e))return e;var n=e.map(this.admit,this);return(s=this.pool.lookupArray(n)).array||(this.known.add(s.array=n),__DEV__&&Object.freeze(n)),s.array;case null:case Object.prototype:if(this.known.has(e))return e;var i=Object.getPrototypeOf(e),o=[i],a=this.sortedKeys(e);o.push(a.json);var s,u=o.length;if(a.sorted.forEach((function(r){o.push(t.admit(e[r]))})),!(s=this.pool.lookupArray(o)).object){var c=s.object=Object.create(i);this.known.add(c),a.sorted.forEach((function(e,t){c[e]=o[u+t]})),__DEV__&&Object.freeze(c)}return s.object}}return e},e.prototype.sortedKeys=function(e){var t=Object.keys(e),r=this.pool.lookupArray(t);if(!r.keys){t.sort();var n=JSON.stringify(t);(r.keys=this.keysByJSON.get(n))||this.keysByJSON.set(n,r.keys={sorted:t,json:n})}return r.keys},e}(),Gt=Object.assign((function(e){if(Y(e)){void 0===Ut&&Jt();var t=Ut.admit(e),r=Vt.get(t);return void 0===r&&Vt.set(t,r=JSON.stringify(t)),r}return JSON.stringify(e)}),{reset:Jt});function Jt(){Ut=new Kt,Vt=new(Ce?WeakMap:Map)}function Zt(e,t,r){return new Q((function(n){var i=n.next,o=n.error,a=n.complete,s=0,u=!1,c={then:function(e){return new Promise((function(t){return t(e())}))}};function l(e,t){return e?function(t){++s;var r=function(){return e(t)};c=c.then(r,r).then((function(e){--s,i&&i.call(n,e),u&&f.complete()}),(function(e){throw--s,e})).catch((function(e){o&&o.call(n,e)}))}:function(e){return t&&t.call(n,e)}}var f={next:l(t,i),error:l(r,o),complete:function(){u=!0,s||a&&a.call(n)}},p=e.subscribe(f);return function(){return p.unsubscribe()}}))}function Xt(e){return Dt(er(e))}function er(e){var t=Dt(e.errors)?e.errors.slice(0):[];return Lt(e)&&Dt(e.incremental)&&e.incremental.forEach((function(e){e.errors&&t.push.apply(t,e.errors)})),t}var tr={kind:je.FIELD,name:{kind:je.NAME,value:"__typename"}};function rr(e,t){return!e||e.selectionSet.selections.every((function(e){return e.kind===je.FRAGMENT_SPREAD&&rr(t[e.name.value],t)}))}function nr(e){return rr(ue(e)||function(e){__DEV__?u("Document"===e.kind,'Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a "gql" tag? http://docs.apollostack.com/apollo-client/core.html#gql'):u("Document"===e.kind,51),__DEV__?u(e.definitions.length<=1,"Fragment must have exactly one definition."):u(e.definitions.length<=1,52);var t=e.definitions[0];return __DEV__?u("FragmentDefinition"===t.kind,"Must be a fragment definition."):u("FragmentDefinition"===t.kind,53),t}(e),H(le(e)))?null:e}function ir(e){var t=new Map;return function(r){void 0===r&&(r=e);var n=t.get(r);return n||t.set(r,n={variables:new Set,fragmentSpreads:new Set}),n}}function or(e,t){for(var r=ir(""),i=ir(""),o=function(e){for(var t=0,n=void 0;t<e.length&&(n=e[t]);++t)if(!Mt(n)){if(n.kind===je.OPERATION_DEFINITION)return r(n.name&&n.name.value);if(n.kind===je.FRAGMENT_DEFINITION)return i(n.name.value)}return __DEV__&&u.error("Could not find operation or fragment"),null},a=0,s=t.definitions.length-1;s>=0;--s)t.definitions[s].kind===je.OPERATION_DEFINITION&&++a;var c=function(e){var t=new Set,r=[];return e.forEach((function(e){e.name?t.add(e.name):e.test&&r.push(e.test)})),function(e){return t.has(e.name.value)||r.some((function(t){return t(e)}))}}(e),l=e.some((function(e){return e.remove})),f=function(e){return l&&e&&e.some(c)},p=new Map,d=!1,h={enter:function(e){if(f(e.directives))return d=!0,null}},y=xe(t,{Field:h,InlineFragment:h,VariableDefinition:{enter:function(){return!1}},Variable:{enter:function(e,t,r,n,i){var a=o(i);a&&a.variables.add(e.name.value)}},FragmentSpread:{enter:function(e,t,r,n,i){if(f(e.directives))return d=!0,null;var a=o(i);a&&a.fragmentSpreads.add(e.name.value)}},FragmentDefinition:{enter:function(e,t,r,n){p.set(JSON.stringify(n),e)},leave:function(e,t,r,n){return e===p.get(JSON.stringify(n))?e:a>0&&e.selectionSet.selections.every((function(e){return e.kind===je.FIELD&&"__typename"===e.name.value}))?(i(e.name.value).removed=!0,d=!0,null):void 0}},Directive:{leave:function(e){if(c(e))return d=!0,null}}});if(!d)return t;var v=function(e){return e.transitiveVars||(e.transitiveVars=new Set(e.variables),e.removed||e.fragmentSpreads.forEach((function(t){v(i(t)).transitiveVars.forEach((function(t){e.transitiveVars.add(t)}))}))),e},m=new Set;y.definitions.forEach((function(e){e.kind===je.OPERATION_DEFINITION?v(r(e.name&&e.name.value)).fragmentSpreads.forEach((function(e){m.add(e)})):e.kind!==je.FRAGMENT_DEFINITION||0!==a||i(e.name.value).removed||m.add(e.name.value)})),m.forEach((function(e){v(i(e)).fragmentSpreads.forEach((function(e){m.add(e)}))}));var b={enter:function(e){if(t=e.name.value,!m.has(t)||i(t).removed)return null;var t}};return nr(xe(y,{FragmentSpread:b,FragmentDefinition:b,OperationDefinition:{leave:function(e){if(e.variableDefinitions){var t=v(r(e.name&&e.name.value)).transitiveVars;if(t.size<e.variableDefinitions.length)return(0,n.__assign)((0,n.__assign)({},e),{variableDefinitions:e.variableDefinitions.filter((function(e){return t.has(e.variable.name.value)}))})}}}}))}var ar=Object.assign((function(e){return xe(e,{SelectionSet:{enter:function(e,t,r){if(!r||r.kind!==je.OPERATION_DEFINITION){var i=e.selections;if(i&&!i.some((function(e){return ae(e)&&("__typename"===e.name.value||0===e.name.value.lastIndexOf("__",0))}))){var o=r;if(!(ae(o)&&o.directives&&o.directives.some((function(e){return"export"===e.name.value}))))return(0,n.__assign)((0,n.__assign)({},e),{selections:(0,n.__spreadArray)((0,n.__spreadArray)([],i,!0),[tr],!1)})}}}}})}),{added:function(e){return e===tr}}),sr={test:function(e){var t="connection"===e.name.value;return t&&(e.arguments&&e.arguments.some((function(e){return"key"===e.name.value}))||__DEV__&&u.warn("Removing an @connection directive even though it does not have a key. You may want to use the key parameter to specify a store key.")),t}};function ur(e){return"query"===pe(e).operation?e:xe(e,{OperationDefinition:{enter:function(e){return(0,n.__assign)((0,n.__assign)({},e),{operation:"query"})}}})}var cr=new Map;function lr(e){var t=cr.get(e)||1;return cr.set(e,t+1),"".concat(e,":").concat(t,":").concat(Math.random().toString(36).slice(2))}function fr(e,t,r){var n=[];e.forEach((function(e){return e[t]&&n.push(e)})),n.forEach((function(e){return e[t](r)}))}function pr(e){function t(t){Object.defineProperty(e,t,{value:Q})}return Fe&&Symbol.species&&t(Symbol.species),t("@@species"),e}function dr(e){return e&&"function"==typeof e.then}var hr=function(e){function t(t){var r=e.call(this,(function(e){return r.addObserver(e),function(){return r.removeObserver(e)}}))||this;return r.observers=new Set,r.promise=new Promise((function(e,t){r.resolve=e,r.reject=t})),r.handlers={next:function(e){null!==r.sub&&(r.latest=["next",e],r.notify("next",e),fr(r.observers,"next",e))},error:function(e){var t=r.sub;null!==t&&(t&&setTimeout((function(){return t.unsubscribe()})),r.sub=null,r.latest=["error",e],r.reject(e),r.notify("error",e),fr(r.observers,"error",e))},complete:function(){var e=r,t=e.sub,n=e.sources;if(null!==t){var i=(void 0===n?[]:n).shift();i?dr(i)?i.then((function(e){return r.sub=e.subscribe(r.handlers)})):r.sub=i.subscribe(r.handlers):(t&&setTimeout((function(){return t.unsubscribe()})),r.sub=null,r.latest&&"next"===r.latest[0]?r.resolve(r.latest[1]):r.resolve(),r.notify("complete"),fr(r.observers,"complete"))}}},r.nextResultListeners=new Set,r.cancel=function(e){r.reject(e),r.sources=[],r.handlers.complete()},r.promise.catch((function(e){})),"function"==typeof t&&(t=[new Q(t)]),dr(t)?t.then((function(e){return r.start(e)}),r.handlers.error):r.start(t),r}return(0,n.__extends)(t,e),t.prototype.start=function(e){void 0===this.sub&&(this.sources=Array.from(e),this.handlers.complete())},t.prototype.deliverLastMessage=function(e){if(this.latest){var t=this.latest[0],r=e[t];r&&r.call(e,this.latest[1]),null===this.sub&&"next"===t&&e.complete&&e.complete()}},t.prototype.addObserver=function(e){this.observers.has(e)||(this.deliverLastMessage(e),this.observers.add(e))},t.prototype.removeObserver=function(e){this.observers.delete(e)&&this.observers.size<1&&this.handlers.complete()},t.prototype.notify=function(e,t){var r=this.nextResultListeners;r.size&&(this.nextResultListeners=new Set,r.forEach((function(r){return r(e,t)})))},t.prototype.beforeNext=function(e){var t=!1;this.nextResultListeners.add((function(r,n){t||(t=!0,e(r,n))}))},t}(Q);function yr(e){return e.hasOwnProperty("graphQLErrors")}pr(hr);var vr,mr=function(e){function t(r){var n,i,o=r.graphQLErrors,a=r.clientErrors,s=r.networkError,u=r.errorMessage,c=r.extraInfo,l=e.call(this,u)||this;return l.name="ApolloError",l.graphQLErrors=o||[],l.clientErrors=a||[],l.networkError=s||null,l.message=u||(i="",(Dt((n=l).graphQLErrors)||Dt(n.clientErrors))&&(n.graphQLErrors||[]).concat(n.clientErrors||[]).forEach((function(e){var t=e?e.message:"Error message not found.";i+="".concat(t,"\n")})),n.networkError&&(i+="".concat(n.networkError.message,"\n")),i=i.replace(/\n$/,"")),l.extraInfo=c,l.__proto__=t.prototype,l}return(0,n.__extends)(t,e),t}(Error);function br(e){return!!e&&e<7}!function(e){e[e.loading=1]="loading",e[e.setVariables=2]="setVariables",e[e.fetchMore=3]="fetchMore",e[e.refetch=4]="refetch",e[e.poll=6]="poll",e[e.ready=7]="ready",e[e.error=8]="error"}(vr||(vr={}));var gr=Object.prototype.toString;function _r(e){return wr(e)}function wr(e,t){switch(gr.call(e)){case"[object Array]":if((t=t||new Map).has(e))return t.get(e);var r=e.slice(0);return t.set(e,r),r.forEach((function(e,n){r[n]=wr(e,t)})),r;case"[object Object]":if((t=t||new Map).has(e))return t.get(e);var n=Object.create(Object.getPrototypeOf(e));return t.set(e,n),Object.keys(e).forEach((function(r){n[r]=wr(e[r],t)})),n;default:return e}}function Or(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Object.create(null);return e.forEach((function(e){e&&Object.keys(e).forEach((function(t){var n=e[t];void 0!==n&&(r[t]=n)}))})),r}var Sr=Object.assign,Er=Object.hasOwnProperty,Tr=function(e){function t(t){var r=t.queryManager,i=t.queryInfo,o=t.options,a=e.call(this,(function(e){try{var t=e._subscription._observer;t&&!t.error&&(t.error=Pr)}catch(e){}var r=!a.observers.size;a.observers.add(e);var n=a.last;return n&&n.error?e.error&&e.error(n.error):n&&n.result&&e.next&&e.next(n.result),r&&a.reobserve().catch((function(){})),function(){a.observers.delete(e)&&!a.observers.size&&a.tearDownQuery()}}))||this;a.observers=new Set,a.subscriptions=new Set,a.queryInfo=i,a.queryManager=r,a.isTornDown=!1;var s=r.defaultOptions.watchQuery,u=(void 0===s?{}:s).fetchPolicy,c=void 0===u?"cache-first":u,l=o.fetchPolicy,f=void 0===l?c:l,p=o.initialFetchPolicy,d=void 0===p?"standby"===f?c:f:p;a.options=(0,n.__assign)((0,n.__assign)({},o),{initialFetchPolicy:d,fetchPolicy:f}),a.queryId=i.queryId||r.generateQueryId();var h=ue(a.query);return a.queryName=h&&h.name&&h.name.value,a}return(0,n.__extends)(t,e),Object.defineProperty(t.prototype,"query",{get:function(){return this.queryManager.transform(this.options.query).document},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"variables",{get:function(){return this.options.variables},enumerable:!1,configurable:!0}),t.prototype.result=function(){var e=this;return new Promise((function(t,r){var n={next:function(r){t(r),e.observers.delete(n),e.observers.size||e.queryManager.removeQuery(e.queryId),setTimeout((function(){i.unsubscribe()}),0)},error:r},i=e.subscribe(n)}))},t.prototype.getCurrentResult=function(e){void 0===e&&(e=!0);var t=this.getLastResult(!0),r=this.queryInfo.networkStatus||t&&t.networkStatus||vr.ready,i=(0,n.__assign)((0,n.__assign)({},t),{loading:br(r),networkStatus:r}),o=this.options.fetchPolicy,a=void 0===o?"cache-first":o;if("network-only"===a||"no-cache"===a||"standby"===a||this.queryManager.transform(this.options.query).hasForcedResolvers);else{var s=this.queryInfo.getDiff();(s.complete||this.options.returnPartialData)&&(i.data=s.result),Pt(i.data,{})&&(i.data=void 0),s.complete?(delete i.partial,!s.complete||i.networkStatus!==vr.loading||"cache-first"!==a&&"cache-only"!==a||(i.networkStatus=vr.ready,i.loading=!1)):i.partial=!0,!__DEV__||s.complete||this.options.partialRefetch||i.loading||i.data||i.error||Ir(s.missing)}return e&&this.updateLastResult(i),i},t.prototype.isDifferentFromLastResult=function(e,t){return!this.last||!Pt(this.last.result,e)||t&&!Pt(this.last.variables,t)},t.prototype.getLast=function(e,t){var r=this.last;if(r&&r[e]&&(!t||Pt(r.variables,this.variables)))return r[e]},t.prototype.getLastResult=function(e){return this.getLast("result",e)},t.prototype.getLastError=function(e){return this.getLast("error",e)},t.prototype.resetLastResults=function(){delete this.last,this.isTornDown=!1},t.prototype.resetQueryStoreErrors=function(){this.queryManager.resetErrors(this.queryId)},t.prototype.refetch=function(e){var t,r={pollInterval:0},i=this.options.fetchPolicy;if(r.fetchPolicy="cache-and-network"===i?i:"no-cache"===i?"no-cache":"network-only",__DEV__&&e&&Er.call(e,"variables")){var o=fe(this.query),a=o.variableDefinitions;a&&a.some((function(e){return"variables"===e.variable.name.value}))||__DEV__&&u.warn("Called refetch(".concat(JSON.stringify(e),") for query ").concat((null===(t=o.name)||void 0===t?void 0:t.value)||JSON.stringify(o),", which does not declare a $variables variable.\nDid you mean to call refetch(variables) instead of refetch({ variables })?"))}return e&&!Pt(this.options.variables,e)&&(r.variables=this.options.variables=(0,n.__assign)((0,n.__assign)({},this.options.variables),e)),this.queryInfo.resetLastWrite(),this.reobserve(r,vr.refetch)},t.prototype.fetchMore=function(e){var t=this,r=(0,n.__assign)((0,n.__assign)({},e.query?e:(0,n.__assign)((0,n.__assign)((0,n.__assign)((0,n.__assign)({},this.options),{query:this.query}),e),{variables:(0,n.__assign)((0,n.__assign)({},this.options.variables),e.variables)})),{fetchPolicy:"no-cache"}),i=this.queryManager.generateQueryId(),o=this.queryInfo,a=o.networkStatus;o.networkStatus=vr.fetchMore,r.notifyOnNetworkStatusChange&&this.observe();var s=new Set;return this.queryManager.fetchQuery(i,r,vr.fetchMore).then((function(n){return t.queryManager.removeQuery(i),o.networkStatus===vr.fetchMore&&(o.networkStatus=a),t.queryManager.cache.batch({update:function(i){var o=e.updateQuery;o?i.updateQuery({query:t.query,variables:t.variables,returnPartialData:!0,optimistic:!1},(function(e){return o(e,{fetchMoreResult:n.data,variables:r.variables})})):i.writeQuery({query:r.query,variables:r.variables,data:n.data})},onWatchUpdated:function(e){s.add(e.query)}}),n})).finally((function(){s.has(t.query)||jr(t)}))},t.prototype.subscribeToMore=function(e){var t=this,r=this.queryManager.startGraphQLSubscription({query:e.document,variables:e.variables,context:e.context}).subscribe({next:function(r){var n=e.updateQuery;n&&t.updateQuery((function(e,t){var i=t.variables;return n(e,{subscriptionData:r,variables:i})}))},error:function(t){e.onError?e.onError(t):__DEV__&&u.error("Unhandled GraphQL subscription error",t)}});return this.subscriptions.add(r),function(){t.subscriptions.delete(r)&&r.unsubscribe()}},t.prototype.setOptions=function(e){return this.reobserve(e)},t.prototype.setVariables=function(e){return Pt(this.variables,e)?this.observers.size?this.result():Promise.resolve():(this.options.variables=e,this.observers.size?this.reobserve({fetchPolicy:this.options.initialFetchPolicy,variables:e},vr.setVariables):Promise.resolve())},t.prototype.updateQuery=function(e){var t=this.queryManager,r=e(t.cache.diff({query:this.options.query,variables:this.variables,returnPartialData:!0,optimistic:!1}).result,{variables:this.variables});r&&(t.cache.writeQuery({query:this.options.query,data:r,variables:this.variables}),t.broadcastQueries())},t.prototype.startPolling=function(e){this.options.pollInterval=e,this.updatePolling()},t.prototype.stopPolling=function(){this.options.pollInterval=0,this.updatePolling()},t.prototype.applyNextFetchPolicy=function(e,t){if(t.nextFetchPolicy){var r=t.fetchPolicy,n=void 0===r?"cache-first":r,i=t.initialFetchPolicy,o=void 0===i?n:i;"standby"===n||("function"==typeof t.nextFetchPolicy?t.fetchPolicy=t.nextFetchPolicy(n,{reason:e,options:t,observable:this,initialFetchPolicy:o}):t.fetchPolicy="variables-changed"===e?o:t.nextFetchPolicy)}return t.fetchPolicy},t.prototype.fetch=function(e,t){return this.queryManager.setObservableQuery(this),this.queryManager.fetchQueryObservable(this.queryId,e,t)},t.prototype.updatePolling=function(){var e=this;if(!this.queryManager.ssrMode){var t=this.pollingInfo,r=this.options.pollInterval;if(r){if(!t||t.interval!==r){__DEV__?u(r,"Attempted to start a polling query without a polling interval."):u(r,13),(t||(this.pollingInfo={})).interval=r;var n=function(){e.pollingInfo&&(br(e.queryInfo.networkStatus)?i():e.reobserve({fetchPolicy:"no-cache"===e.options.initialFetchPolicy?"no-cache":"network-only"},vr.poll).then(i,i))},i=function(){var t=e.pollingInfo;t&&(clearTimeout(t.timeout),t.timeout=setTimeout(n,t.interval))};i()}}else t&&(clearTimeout(t.timeout),delete this.pollingInfo)}},t.prototype.updateLastResult=function(e,t){return void 0===t&&(t=this.variables),this.last=(0,n.__assign)((0,n.__assign)({},this.last),{result:this.queryManager.assumeImmutableResults?e:_r(e),variables:t}),Dt(e.errors)||delete this.last.error,this.last},t.prototype.reobserve=function(e,t){var r=this;this.isTornDown=!1;var i=t===vr.refetch||t===vr.fetchMore||t===vr.poll,o=this.options.variables,a=this.options.fetchPolicy,s=Or(this.options,e||{}),u=i?s:Sr(this.options,s);i||(this.updatePolling(),e&&e.variables&&!Pt(e.variables,o)&&"standby"!==u.fetchPolicy&&u.fetchPolicy===a&&(this.applyNextFetchPolicy("variables-changed",u),void 0===t&&(t=vr.setVariables)));var c=u.variables&&(0,n.__assign)({},u.variables),l=this.fetch(u,t),f={next:function(e){r.reportResult(e,c)},error:function(e){r.reportError(e,c)}};return i||(this.concast&&this.observer&&this.concast.removeObserver(this.observer),this.concast=l,this.observer=f),l.addObserver(f),l.promise},t.prototype.observe=function(){this.reportResult(this.getCurrentResult(!1),this.variables)},t.prototype.reportResult=function(e,t){var r=this.getLastError();(r||this.isDifferentFromLastResult(e,t))&&((r||!e.partial||this.options.returnPartialData)&&this.updateLastResult(e,t),fr(this.observers,"next",e))},t.prototype.reportError=function(e,t){var r=(0,n.__assign)((0,n.__assign)({},this.getLastResult()),{error:e,errors:e.graphQLErrors,networkStatus:vr.error,loading:!1});this.updateLastResult(r,t),fr(this.observers,"error",this.last.error=e)},t.prototype.hasObservers=function(){return this.observers.size>0},t.prototype.tearDownQuery=function(){this.isTornDown||(this.concast&&this.observer&&(this.concast.removeObserver(this.observer),delete this.concast,delete this.observer),this.stopPolling(),this.subscriptions.forEach((function(e){return e.unsubscribe()})),this.subscriptions.clear(),this.queryManager.stopQuery(this.queryId),this.observers.clear(),this.isTornDown=!0)},t}(Q);function jr(e){var t=e.options,r=t.fetchPolicy,n=t.nextFetchPolicy;return"cache-and-network"===r||"network-only"===r?e.reobserve({fetchPolicy:"cache-first",nextFetchPolicy:function(){return this.nextFetchPolicy=n,"function"==typeof n?n.apply(this,arguments):r}}):e.reobserve()}function Pr(e){__DEV__&&u.error("Unhandled error",e.message,e.stack)}function Ir(e){__DEV__&&e&&__DEV__&&u.debug("Missing cache result fields: ".concat(JSON.stringify(e)),e)}function xr(e){return e.kind===je.FIELD||e.kind===je.FRAGMENT_SPREAD||e.kind===je.INLINE_FRAGMENT}pr(Tr);var Ar=null,Nr={},kr=1;function Mr(e){try{return e()}catch(e){}}var Dr="@wry/context:Slot",Rr=Mr((function(){return globalThis}))||Mr((function(){return r.g}))||Object.create(null),Cr=Rr[Dr]||Array[Dr]||function(e){try{Object.defineProperty(Rr,Dr,{value:e,enumerable:!1,writable:!1,configurable:!0})}finally{return e}}(function(){function e(){this.id=["slot",kr++,Date.now(),Math.random().toString(36).slice(2)].join(":")}return e.prototype.hasValue=function(){for(var e=Ar;e;e=e.parent)if(this.id in e.slots){var t=e.slots[this.id];if(t===Nr)break;return e!==Ar&&(Ar.slots[this.id]=t),!0}return Ar&&(Ar.slots[this.id]=Nr),!1},e.prototype.getValue=function(){if(this.hasValue())return Ar.slots[this.id]},e.prototype.withValue=function(e,t,r,n){var i,o=((i={__proto__:null})[this.id]=e,i),a=Ar;Ar={parent:a,slots:o};try{return t.apply(n,r)}finally{Ar=a}},e.bind=function(e){var t=Ar;return function(){var r=Ar;try{return Ar=t,e.apply(this,arguments)}finally{Ar=r}}},e.noContext=function(e,t,r){if(!Ar)return e.apply(r,t);var n=Ar;try{return Ar=null,e.apply(r,t)}finally{Ar=n}},e}());function $r(){}Cr.bind,Cr.noContext;var Fr,qr=function(){function e(e,t){void 0===e&&(e=1/0),void 0===t&&(t=$r),this.max=e,this.dispose=t,this.map=new Map,this.newest=null,this.oldest=null}return e.prototype.has=function(e){return this.map.has(e)},e.prototype.get=function(e){var t=this.getNode(e);return t&&t.value},e.prototype.getNode=function(e){var t=this.map.get(e);if(t&&t!==this.newest){var r=t.older,n=t.newer;n&&(n.older=r),r&&(r.newer=n),t.older=this.newest,t.older.newer=t,t.newer=null,this.newest=t,t===this.oldest&&(this.oldest=n)}return t},e.prototype.set=function(e,t){var r=this.getNode(e);return r?r.value=t:(r={key:e,value:t,newer:null,older:this.newest},this.newest&&(this.newest.newer=r),this.newest=r,this.oldest=this.oldest||r,this.map.set(e,r),r.value)},e.prototype.clean=function(){for(;this.oldest&&this.map.size>this.max;)this.delete(this.oldest.key)},e.prototype.delete=function(e){var t=this.map.get(e);return!!t&&(t===this.newest&&(this.newest=t.older),t===this.oldest&&(this.oldest=t.newer),t.newer&&(t.newer.older=t.older),t.older&&(t.older.newer=t.newer),this.map.delete(e),this.dispose(t.value,e),!0)},e}(),Lr=new Cr,Br=Object.prototype.hasOwnProperty,Ur=void 0===(Fr=Array.from)?function(e){var t=[];return e.forEach((function(e){return t.push(e)})),t}:Fr;function Vr(e){var t=e.unsubscribe;"function"==typeof t&&(e.unsubscribe=void 0,t())}var zr=[];function Qr(e,t){if(!e)throw new Error(t||"assertion failure")}function Yr(e){switch(e.length){case 0:throw new Error("unknown value");case 1:return e[0];case 2:throw e[1]}}var Wr=function(){function e(t){this.fn=t,this.parents=new Set,this.childValues=new Map,this.dirtyChildren=null,this.dirty=!0,this.recomputing=!1,this.value=[],this.deps=null,++e.count}return e.prototype.peek=function(){if(1===this.value.length&&!Gr(this))return Hr(this),this.value[0]},e.prototype.recompute=function(e){return Qr(!this.recomputing,"already recomputing"),Hr(this),Gr(this)?function(e,t){return nn(e),Lr.withValue(e,Kr,[e,t]),function(e,t){if("function"==typeof e.subscribe)try{Vr(e),e.unsubscribe=e.subscribe.apply(null,t)}catch(t){return e.setDirty(),!1}return!0}(e,t)&&function(e){e.dirty=!1,Gr(e)||Zr(e)}(e),Yr(e.value)}(this,e):Yr(this.value)},e.prototype.setDirty=function(){this.dirty||(this.dirty=!0,this.value.length=0,Jr(this),Vr(this))},e.prototype.dispose=function(){var e=this;this.setDirty(),nn(this),Xr(this,(function(t,r){t.setDirty(),on(t,e)}))},e.prototype.forget=function(){this.dispose()},e.prototype.dependOn=function(e){e.add(this),this.deps||(this.deps=zr.pop()||new Set),this.deps.add(e)},e.prototype.forgetDeps=function(){var e=this;this.deps&&(Ur(this.deps).forEach((function(t){return t.delete(e)})),this.deps.clear(),zr.push(this.deps),this.deps=null)},e.count=0,e}();function Hr(e){var t=Lr.getValue();if(t)return e.parents.add(t),t.childValues.has(e)||t.childValues.set(e,[]),Gr(e)?en(t,e):tn(t,e),t}function Kr(e,t){e.recomputing=!0,e.value.length=0;try{e.value[0]=e.fn.apply(null,t)}catch(t){e.value[1]=t}e.recomputing=!1}function Gr(e){return e.dirty||!(!e.dirtyChildren||!e.dirtyChildren.size)}function Jr(e){Xr(e,en)}function Zr(e){Xr(e,tn)}function Xr(e,t){var r=e.parents.size;if(r)for(var n=Ur(e.parents),i=0;i<r;++i)t(n[i],e)}function en(e,t){Qr(e.childValues.has(t)),Qr(Gr(t));var r=!Gr(e);if(e.dirtyChildren){if(e.dirtyChildren.has(t))return}else e.dirtyChildren=zr.pop()||new Set;e.dirtyChildren.add(t),r&&Jr(e)}function tn(e,t){Qr(e.childValues.has(t)),Qr(!Gr(t));var r,n,i,o=e.childValues.get(t);0===o.length?e.childValues.set(t,t.value.slice(0)):(r=o,n=t.value,(i=r.length)>0&&i===n.length&&r[i-1]===n[i-1]||e.setDirty()),rn(e,t),Gr(e)||Zr(e)}function rn(e,t){var r=e.dirtyChildren;r&&(r.delete(t),0===r.size&&(zr.length<100&&zr.push(r),e.dirtyChildren=null))}function nn(e){e.childValues.size>0&&e.childValues.forEach((function(t,r){on(e,r)})),e.forgetDeps(),Qr(null===e.dirtyChildren)}function on(e,t){t.parents.delete(e),e.childValues.delete(t),rn(e,t)}var an={setDirty:!0,dispose:!0,forget:!0};function sn(e){var t=new Map,r=e&&e.subscribe;function n(e){var n=Lr.getValue();if(n){var i=t.get(e);i||t.set(e,i=new Set),n.dependOn(i),"function"==typeof r&&(Vr(i),i.unsubscribe=r(e))}}return n.dirty=function(e,r){var n=t.get(e);if(n){var i=r&&Br.call(an,r)?r:"setDirty";Ur(n).forEach((function(e){return e[i]()})),t.delete(e),Vr(n)}},n}function un(){var e=new Ht("function"==typeof WeakMap);return function(){return e.lookupArray(arguments)}}un();var cn=new Set;function ln(e,t){void 0===t&&(t=Object.create(null));var r=new qr(t.max||Math.pow(2,16),(function(e){return e.dispose()})),n=t.keyArgs,i=t.makeCacheKey||un(),o=function(){var o=i.apply(null,n?n.apply(null,arguments):arguments);if(void 0===o)return e.apply(null,arguments);var a=r.get(o);a||(r.set(o,a=new Wr(e)),a.subscribe=t.subscribe,a.forget=function(){return r.delete(o)});var s=a.recompute(Array.prototype.slice.call(arguments));return r.set(o,a),cn.add(r),Lr.hasValue()||(cn.forEach((function(e){return e.clean()})),cn.clear()),s};function a(e){var t=r.get(e);t&&t.setDirty()}function s(e){var t=r.get(e);if(t)return t.peek()}function u(e){return r.delete(e)}return Object.defineProperty(o,"size",{get:function(){return r.map.size},configurable:!1,enumerable:!1}),o.dirtyKey=a,o.dirty=function(){a(i.apply(null,arguments))},o.peekKey=s,o.peek=function(){return s(i.apply(null,arguments))},o.forgetKey=u,o.forget=function(){return u(i.apply(null,arguments))},o.makeCacheKey=i,o.getKey=n?function(){return i.apply(null,n.apply(null,arguments))}:i,Object.freeze(o)}var fn=new Cr,pn=new WeakMap;function dn(e){var t=pn.get(e);return t||pn.set(e,t={vars:new Set,dep:sn()}),t}function hn(e){dn(e).vars.forEach((function(t){return t.forgetCache(e)}))}function yn(e){var t=new Set,r=new Set,n=function(o){if(arguments.length>0){if(e!==o){e=o,t.forEach((function(e){dn(e).dep.dirty(n),vn(e)}));var a=Array.from(r);r.clear(),a.forEach((function(t){return t(e)}))}}else{var s=fn.getValue();s&&(i(s),dn(s).dep(n))}return e};n.onNextChange=function(e){return r.add(e),function(){r.delete(e)}};var i=n.attachCache=function(e){return t.add(e),dn(e).vars.add(n),n};return n.forgetCache=function(e){return t.delete(e)},n}function vn(e){e.broadcastWatches&&e.broadcastWatches()}var mn=function(){function e(e){var t=e.cache,r=e.client,n=e.resolvers,i=e.fragmentMatcher;this.selectionsToResolveCache=new WeakMap,this.cache=t,r&&(this.client=r),n&&this.addResolvers(n),i&&this.setFragmentMatcher(i)}return e.prototype.addResolvers=function(e){var t=this;this.resolvers=this.resolvers||{},Array.isArray(e)?e.forEach((function(e){t.resolvers=Ct(t.resolvers,e)})):this.resolvers=Ct(this.resolvers,e)},e.prototype.setResolvers=function(e){this.resolvers={},this.addResolvers(e)},e.prototype.getResolvers=function(){return this.resolvers||{}},e.prototype.runResolvers=function(e){var t=e.document,r=e.remoteResult,i=e.context,o=e.variables,a=e.onlyRunForcedResolvers,s=void 0!==a&&a;return(0,n.__awaiter)(this,void 0,void 0,(function(){return(0,n.__generator)(this,(function(e){return t?[2,this.resolveDocument(t,r.data,i,o,this.fragmentMatcher,s).then((function(e){return(0,n.__assign)((0,n.__assign)({},r),{data:e.result})}))]:[2,r]}))}))},e.prototype.setFragmentMatcher=function(e){this.fragmentMatcher=e},e.prototype.getFragmentMatcher=function(){return this.fragmentMatcher},e.prototype.clientQuery=function(e){return ke(["client"],e)&&this.resolvers?e:null},e.prototype.serverQuery=function(e){return function(e){return se(e),or([{test:function(e){return"client"===e.name.value},remove:!0}],e)}(e)},e.prototype.prepareContext=function(e){var t=this.cache;return(0,n.__assign)((0,n.__assign)({},e),{cache:t,getCacheKey:function(e){return t.identify(e)}})},e.prototype.addExportedVariables=function(e,t,r){return void 0===t&&(t={}),void 0===r&&(r={}),(0,n.__awaiter)(this,void 0,void 0,(function(){return(0,n.__generator)(this,(function(i){return e?[2,this.resolveDocument(e,this.buildRootValueFromCache(e,t)||{},this.prepareContext(r),t).then((function(e){return(0,n.__assign)((0,n.__assign)({},t),e.exportedVariables)}))]:[2,(0,n.__assign)({},t)]}))}))},e.prototype.shouldForceResolvers=function(e){var t=!1;return xe(e,{Directive:{enter:function(e){if("client"===e.name.value&&e.arguments&&(t=e.arguments.some((function(e){return"always"===e.name.value&&"BooleanValue"===e.value.kind&&!0===e.value.value}))))return Ie}}}),t},e.prototype.buildRootValueFromCache=function(e,t){return this.cache.diff({query:ur(e),variables:t,returnPartialData:!0,optimistic:!1}).result},e.prototype.resolveDocument=function(e,t,r,i,o,a){return void 0===r&&(r={}),void 0===i&&(i={}),void 0===o&&(o=function(){return!0}),void 0===a&&(a=!1),(0,n.__awaiter)(this,void 0,void 0,(function(){var s,u,c,l,f,p,d,h,y,v;return(0,n.__generator)(this,(function(m){return s=pe(e),u=le(e),c=H(u),l=this.collectSelectionsToResolve(s,c),f=s.operation,p=f?f.charAt(0).toUpperCase()+f.slice(1):"Query",h=(d=this).cache,y=d.client,v={fragmentMap:c,context:(0,n.__assign)((0,n.__assign)({},r),{cache:h,client:y}),variables:i,fragmentMatcher:o,defaultOperationType:p,exportedVariables:{},selectionsToResolve:l,onlyRunForcedResolvers:a},[2,this.resolveSelectionSet(s.selectionSet,!1,t,v).then((function(e){return{result:e,exportedVariables:v.exportedVariables}}))]}))}))},e.prototype.resolveSelectionSet=function(e,t,r,i){return(0,n.__awaiter)(this,void 0,void 0,(function(){var o,a,s,c,l,f=this;return(0,n.__generator)(this,(function(p){return o=i.fragmentMap,a=i.context,s=i.variables,c=[r],l=function(e){return(0,n.__awaiter)(f,void 0,void 0,(function(){var l,f;return(0,n.__generator)(this,(function(n){return(t||i.selectionsToResolve.has(e))&&Ne(e,s)?ae(e)?[2,this.resolveField(e,t,r,i).then((function(t){var r;void 0!==t&&c.push(((r={})[ie(e)]=t,r))}))]:(function(e){return"InlineFragment"===e.kind}(e)?l=e:(l=o[e.name.value],__DEV__?u(l,"No fragment named ".concat(e.name.value)):u(l,11)),l&&l.typeCondition&&(f=l.typeCondition.name.value,i.fragmentMatcher(r,f,a))?[2,this.resolveSelectionSet(l.selectionSet,t,r,i).then((function(e){c.push(e)}))]:[2]):[2]}))}))},[2,Promise.all(e.selections.map(l)).then((function(){return $t(c)}))]}))}))},e.prototype.resolveField=function(e,t,r,i){return(0,n.__awaiter)(this,void 0,void 0,(function(){var o,a,s,u,c,l,f,p,d,h=this;return(0,n.__generator)(this,(function(n){return r?(o=i.variables,a=e.name.value,s=ie(e),u=a!==s,c=r[s]||r[a],l=Promise.resolve(c),i.onlyRunForcedResolvers&&!this.shouldForceResolvers(e)||(f=r.__typename||i.defaultOperationType,(p=this.resolvers&&this.resolvers[f])&&(d=p[u?a:s])&&(l=Promise.resolve(fn.withValue(this.cache,d,[r,ne(e,o),i.context,{field:e,fragmentMap:i.fragmentMap}])))),[2,l.then((function(r){var n,o;if(void 0===r&&(r=c),e.directives&&e.directives.forEach((function(e){"export"===e.name.value&&e.arguments&&e.arguments.forEach((function(e){"as"===e.name.value&&"StringValue"===e.value.kind&&(i.exportedVariables[e.value.value]=r)}))})),!e.selectionSet)return r;if(null==r)return r;var a=null!==(o=null===(n=e.directives)||void 0===n?void 0:n.some((function(e){return"client"===e.name.value})))&&void 0!==o&&o;return Array.isArray(r)?h.resolveSubSelectedArray(e,t||a,r,i):e.selectionSet?h.resolveSelectionSet(e.selectionSet,t||a,r,i):void 0}))]):[2,null]}))}))},e.prototype.resolveSubSelectedArray=function(e,t,r,n){var i=this;return Promise.all(r.map((function(r){return null===r?null:Array.isArray(r)?i.resolveSubSelectedArray(e,t,r,n):e.selectionSet?i.resolveSelectionSet(e.selectionSet,t,r,n):void 0})))},e.prototype.collectSelectionsToResolve=function(e,t){var r=function(e){return!Array.isArray(e)},n=this.selectionsToResolveCache;return function e(i){if(!n.has(i)){var o=new Set;n.set(i,o),xe(i,{Directive:function(e,t,n,i,a){"client"===e.name.value&&a.forEach((function(e){r(e)&&xr(e)&&o.add(e)}))},FragmentSpread:function(n,i,a,s,c){var l=t[n.name.value];__DEV__?u(l,"No fragment named ".concat(n.name.value)):u(l,12);var f=e(l);f.size>0&&(c.forEach((function(e){r(e)&&xr(e)&&o.add(e)})),o.add(n),f.forEach((function(e){o.add(e)})))}})}return n.get(i)}(e)},e}(),bn=new(Ce?WeakMap:Map);function gn(e,t){var r=e[t];"function"==typeof r&&(e[t]=function(){return bn.set(e,(bn.get(e)+1)%1e15),r.apply(this,arguments)})}function _n(e){e.notifyTimeout&&(clearTimeout(e.notifyTimeout),e.notifyTimeout=void 0)}var wn=function(){function e(e,t){void 0===t&&(t=e.generateQueryId()),this.queryId=t,this.listeners=new Set,this.document=null,this.lastRequestId=1,this.subscriptions=new Set,this.stopped=!1,this.dirty=!1,this.observableQuery=null;var r=this.cache=e.cache;bn.has(r)||(bn.set(r,0),gn(r,"evict"),gn(r,"modify"),gn(r,"reset"))}return e.prototype.init=function(e){var t=e.networkStatus||vr.loading;return this.variables&&this.networkStatus!==vr.loading&&!Pt(this.variables,e.variables)&&(t=vr.setVariables),Pt(e.variables,this.variables)||(this.lastDiff=void 0),Object.assign(this,{document:e.document,variables:e.variables,networkError:null,graphQLErrors:this.graphQLErrors||[],networkStatus:t}),e.observableQuery&&this.setObservableQuery(e.observableQuery),e.lastRequestId&&(this.lastRequestId=e.lastRequestId),this},e.prototype.reset=function(){_n(this),this.dirty=!1},e.prototype.getDiff=function(e){void 0===e&&(e=this.variables);var t=this.getDiffOptions(e);if(this.lastDiff&&Pt(t,this.lastDiff.options))return this.lastDiff.diff;this.updateWatch(this.variables=e);var r=this.observableQuery;if(r&&"no-cache"===r.options.fetchPolicy)return{complete:!1};var n=this.cache.diff(t);return this.updateLastDiff(n,t),n},e.prototype.updateLastDiff=function(e,t){this.lastDiff=e?{diff:e,options:t||this.getDiffOptions()}:void 0},e.prototype.getDiffOptions=function(e){var t;return void 0===e&&(e=this.variables),{query:this.document,variables:e,returnPartialData:!0,optimistic:!0,canonizeResults:null===(t=this.observableQuery)||void 0===t?void 0:t.options.canonizeResults}},e.prototype.setDiff=function(e){var t=this,r=this.lastDiff&&this.lastDiff.diff;this.updateLastDiff(e),this.dirty||Pt(r&&r.result,e&&e.result)||(this.dirty=!0,this.notifyTimeout||(this.notifyTimeout=setTimeout((function(){return t.notify()}),0)))},e.prototype.setObservableQuery=function(e){var t=this;e!==this.observableQuery&&(this.oqListener&&this.listeners.delete(this.oqListener),this.observableQuery=e,e?(e.queryInfo=this,this.listeners.add(this.oqListener=function(){t.getDiff().fromOptimisticTransaction?e.observe():jr(e)})):delete this.oqListener)},e.prototype.notify=function(){var e=this;_n(this),this.shouldNotify()&&this.listeners.forEach((function(t){return t(e)})),this.dirty=!1},e.prototype.shouldNotify=function(){if(!this.dirty||!this.listeners.size)return!1;if(br(this.networkStatus)&&this.observableQuery){var e=this.observableQuery.options.fetchPolicy;if("cache-only"!==e&&"cache-and-network"!==e)return!1}return!0},e.prototype.stop=function(){if(!this.stopped){this.stopped=!0,this.reset(),this.cancel(),this.cancel=e.prototype.cancel,this.subscriptions.forEach((function(e){return e.unsubscribe()}));var t=this.observableQuery;t&&t.stopPolling()}},e.prototype.cancel=function(){},e.prototype.updateWatch=function(e){var t=this;void 0===e&&(e=this.variables);var r=this.observableQuery;if(!r||"no-cache"!==r.options.fetchPolicy){var i=(0,n.__assign)((0,n.__assign)({},this.getDiffOptions(e)),{watcher:this,callback:function(e){return t.setDiff(e)}});this.lastWatch&&Pt(i,this.lastWatch)||(this.cancel(),this.cancel=this.cache.watch(this.lastWatch=i))}},e.prototype.resetLastWrite=function(){this.lastWrite=void 0},e.prototype.shouldWrite=function(e,t){var r=this.lastWrite;return!(r&&r.dmCount===bn.get(this.cache)&&Pt(t,r.variables)&&Pt(e.data,r.result.data))},e.prototype.markResult=function(e,t,r,n){var i=this,o=new qt,a=Dt(e.errors)?e.errors.slice(0):[];if(this.reset(),"incremental"in e&&Dt(e.incremental)){var s=Bt(this.getDiff().result,e);e.data=s}else if("hasNext"in e&&e.hasNext){var u=this.getDiff();e.data=o.merge(u.result,e.data)}this.graphQLErrors=a,"no-cache"===r.fetchPolicy?this.updateLastDiff({result:e.data,complete:!0},this.getDiffOptions(r.variables)):0!==n&&(On(e,r.errorPolicy)?this.cache.performTransaction((function(o){if(i.shouldWrite(e,r.variables))o.writeQuery({query:t,data:e.data,variables:r.variables,overwrite:1===n}),i.lastWrite={result:e,variables:r.variables,dmCount:bn.get(i.cache)};else if(i.lastDiff&&i.lastDiff.diff.complete)return void(e.data=i.lastDiff.diff.result);var a=i.getDiffOptions(r.variables),s=o.diff(a);i.stopped||i.updateWatch(r.variables),i.updateLastDiff(s,a),s.complete&&(e.data=s.result)})):this.lastWrite=void 0)},e.prototype.markReady=function(){return this.networkError=null,this.networkStatus=vr.ready},e.prototype.markError=function(e){return this.networkStatus=vr.error,this.lastWrite=void 0,this.reset(),e.graphQLErrors&&(this.graphQLErrors=e.graphQLErrors),e.networkError&&(this.networkError=e.networkError),e},e}();function On(e,t){void 0===t&&(t="none");var r="ignore"===t||"all"===t,n=!Xt(e);return!n&&r&&e.data&&(n=!0),n}var Sn=Object.prototype.hasOwnProperty,En=function(){function e(e){var t=e.cache,r=e.link,n=e.defaultOptions,i=e.queryDeduplication,o=void 0!==i&&i,a=e.onBroadcast,s=e.ssrMode,u=void 0!==s&&s,c=e.clientAwareness,l=void 0===c?{}:c,f=e.localState,p=e.assumeImmutableResults;this.clientAwareness={},this.queries=new Map,this.fetchCancelFns=new Map,this.transformCache=new(Ce?WeakMap:Map),this.queryIdCounter=1,this.requestIdCounter=1,this.mutationIdCounter=1,this.inFlightLinkObservables=new Map,this.cache=t,this.link=r,this.defaultOptions=n||Object.create(null),this.queryDeduplication=o,this.clientAwareness=l,this.localState=f||new mn({cache:t}),this.ssrMode=u,this.assumeImmutableResults=!!p,(this.onBroadcast=a)&&(this.mutationStore=Object.create(null))}return e.prototype.stop=function(){var e=this;this.queries.forEach((function(t,r){e.stopQueryNoBroadcast(r)})),this.cancelPendingFetches(__DEV__?new s("QueryManager stopped while query was in flight"):new s(14))},e.prototype.cancelPendingFetches=function(e){this.fetchCancelFns.forEach((function(t){return t(e)})),this.fetchCancelFns.clear()},e.prototype.mutate=function(e){var t,r,i=e.mutation,o=e.variables,a=e.optimisticResponse,s=e.updateQueries,c=e.refetchQueries,l=void 0===c?[]:c,f=e.awaitRefetchQueries,p=void 0!==f&&f,d=e.update,h=e.onQueryUpdated,y=e.fetchPolicy,v=void 0===y?(null===(t=this.defaultOptions.mutate)||void 0===t?void 0:t.fetchPolicy)||"network-only":y,m=e.errorPolicy,b=void 0===m?(null===(r=this.defaultOptions.mutate)||void 0===r?void 0:r.errorPolicy)||"none":m,g=e.keepRootFields,_=e.context;return(0,n.__awaiter)(this,void 0,void 0,(function(){var e,t,r,c,f,y;return(0,n.__generator)(this,(function(m){switch(m.label){case 0:return __DEV__?u(i,"mutation option is required. You must specify your GraphQL document in the mutation option."):u(i,15),__DEV__?u("network-only"===v||"no-cache"===v,"Mutations support only 'network-only' or 'no-cache' fetchPolicy strings. The default `network-only` behavior automatically writes mutation results to the cache. Passing `no-cache` skips the cache write."):u("network-only"===v||"no-cache"===v,16),e=this.generateMutationId(),t=this.transform(i),r=t.document,c=t.hasClientExports,i=this.cache.transformForLink(r),o=this.getVariables(i,o),c?[4,this.localState.addExportedVariables(i,o,_)]:[3,2];case 1:o=m.sent(),m.label=2;case 2:return f=this.mutationStore&&(this.mutationStore[e]={mutation:i,variables:o,loading:!0,error:null}),a&&this.markMutationOptimistic(a,{mutationId:e,document:i,variables:o,fetchPolicy:v,errorPolicy:b,context:_,updateQueries:s,update:d,keepRootFields:g}),this.broadcastQueries(),y=this,[2,new Promise((function(t,r){return Zt(y.getObservableFromLink(i,(0,n.__assign)((0,n.__assign)({},_),{optimisticResponse:a}),o,!1),(function(t){if(Xt(t)&&"none"===b)throw new mr({graphQLErrors:er(t)});f&&(f.loading=!1,f.error=null);var r=(0,n.__assign)({},t);return"function"==typeof l&&(l=l(r)),"ignore"===b&&Xt(r)&&delete r.errors,y.markMutationResult({mutationId:e,result:r,document:i,variables:o,fetchPolicy:v,errorPolicy:b,context:_,update:d,updateQueries:s,awaitRefetchQueries:p,refetchQueries:l,removeOptimistic:a?e:void 0,onQueryUpdated:h,keepRootFields:g})})).subscribe({next:function(e){y.broadcastQueries(),"hasNext"in e&&!1!==e.hasNext||t(e)},error:function(t){f&&(f.loading=!1,f.error=t),a&&y.cache.removeOptimistic(e),y.broadcastQueries(),r(t instanceof mr?t:new mr({networkError:t}))}})}))]}}))}))},e.prototype.markMutationResult=function(e,t){var r=this;void 0===t&&(t=this.cache);var i=e.result,o=[],a="no-cache"===e.fetchPolicy;if(!a&&On(i,e.errorPolicy)){if(Lt(i)||o.push({result:i.data,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables}),Lt(i)&&Dt(i.incremental)){var s=t.diff({id:"ROOT_MUTATION",query:this.transform(e.document).asQuery,variables:e.variables,optimistic:!1,returnPartialData:!0}),u=void 0;s.result&&(u=Bt(s.result,i)),void 0!==u&&(i.data=u,o.push({result:u,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables}))}var c=e.updateQueries;c&&this.queries.forEach((function(e,n){var a=e.observableQuery,s=a&&a.queryName;if(s&&Sn.call(c,s)){var u=c[s],l=r.queries.get(n),f=l.document,p=l.variables,d=t.diff({query:f,variables:p,returnPartialData:!0,optimistic:!1}),h=d.result;if(d.complete&&h){var y=u(h,{mutationResult:i,queryName:f&&ce(f)||void 0,queryVariables:p});y&&o.push({result:y,dataId:"ROOT_QUERY",query:f,variables:p})}}}))}if(o.length>0||e.refetchQueries||e.update||e.onQueryUpdated||e.removeOptimistic){var l=[];if(this.refetchQueries({updateCache:function(t){a||o.forEach((function(e){return t.write(e)}));var s,u=e.update,c=!(Lt(s=i)||function(e){return"hasNext"in e&&"data"in e}(s))||Lt(i)&&!i.hasNext;if(u){if(!a){var l=t.diff({id:"ROOT_MUTATION",query:r.transform(e.document).asQuery,variables:e.variables,optimistic:!1,returnPartialData:!0});l.complete&&("incremental"in(i=(0,n.__assign)((0,n.__assign)({},i),{data:l.result}))&&delete i.incremental,"hasNext"in i&&delete i.hasNext)}c&&u(t,i,{context:e.context,variables:e.variables})}a||e.keepRootFields||!c||t.modify({id:"ROOT_MUTATION",fields:function(e,t){var r=t.fieldName,n=t.DELETE;return"__typename"===r?e:n}})},include:e.refetchQueries,optimistic:!1,removeOptimistic:e.removeOptimistic,onQueryUpdated:e.onQueryUpdated||null}).forEach((function(e){return l.push(e)})),e.awaitRefetchQueries||e.onQueryUpdated)return Promise.all(l).then((function(){return i}))}return Promise.resolve(i)},e.prototype.markMutationOptimistic=function(e,t){var r=this,i="function"==typeof e?e(t.variables):e;return this.cache.recordOptimisticTransaction((function(e){try{r.markMutationResult((0,n.__assign)((0,n.__assign)({},t),{result:{data:i}}),e)}catch(e){__DEV__&&u.error(e)}}),t.mutationId)},e.prototype.fetchQuery=function(e,t,r){return this.fetchQueryObservable(e,t,r).promise},e.prototype.getQueryStore=function(){var e=Object.create(null);return this.queries.forEach((function(t,r){e[r]={variables:t.variables,networkStatus:t.networkStatus,networkError:t.networkError,graphQLErrors:t.graphQLErrors}})),e},e.prototype.resetErrors=function(e){var t=this.queries.get(e);t&&(t.networkError=void 0,t.graphQLErrors=[])},e.prototype.transform=function(e){var t=this.transformCache;if(!t.has(e)){var r=this.cache.transformDocument(e),i=or([sr],se(r)),o=this.localState.clientQuery(r),a=i&&this.localState.serverQuery(i),s={document:r,hasClientExports:Me(r),hasForcedResolvers:this.localState.shouldForceResolvers(r),clientQuery:o,serverQuery:a,defaultVars:de(ue(r)),asQuery:(0,n.__assign)((0,n.__assign)({},r),{definitions:r.definitions.map((function(e){return"OperationDefinition"===e.kind&&"query"!==e.operation?(0,n.__assign)((0,n.__assign)({},e),{operation:"query"}):e}))})},u=function(e){e&&!t.has(e)&&t.set(e,s)};u(e),u(r),u(o),u(a)}return t.get(e)},e.prototype.getVariables=function(e,t){return(0,n.__assign)((0,n.__assign)({},this.transform(e).defaultVars),t)},e.prototype.watchQuery=function(e){void 0===(e=(0,n.__assign)((0,n.__assign)({},e),{variables:this.getVariables(e.query,e.variables)})).notifyOnNetworkStatusChange&&(e.notifyOnNetworkStatusChange=!1);var t=new wn(this),r=new Tr({queryManager:this,queryInfo:t,options:e});return this.queries.set(r.queryId,t),t.init({document:r.query,observableQuery:r,variables:r.variables}),r},e.prototype.query=function(e,t){var r=this;return void 0===t&&(t=this.generateQueryId()),__DEV__?u(e.query,"query option is required. You must specify your GraphQL document in the query option."):u(e.query,17),__DEV__?u("Document"===e.query.kind,'You must wrap the query string in a "gql" tag.'):u("Document"===e.query.kind,18),__DEV__?u(!e.returnPartialData,"returnPartialData option only supported on watchQuery."):u(!e.returnPartialData,19),__DEV__?u(!e.pollInterval,"pollInterval option only supported on watchQuery."):u(!e.pollInterval,20),this.fetchQuery(t,e).finally((function(){return r.stopQuery(t)}))},e.prototype.generateQueryId=function(){return String(this.queryIdCounter++)},e.prototype.generateRequestId=function(){return this.requestIdCounter++},e.prototype.generateMutationId=function(){return String(this.mutationIdCounter++)},e.prototype.stopQueryInStore=function(e){this.stopQueryInStoreNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryInStoreNoBroadcast=function(e){var t=this.queries.get(e);t&&t.stop()},e.prototype.clearStore=function(e){return void 0===e&&(e={discardWatches:!0}),this.cancelPendingFetches(__DEV__?new s("Store reset while query was in flight (not completed in link chain)"):new s(21)),this.queries.forEach((function(e){e.observableQuery?e.networkStatus=vr.loading:e.stop()})),this.mutationStore&&(this.mutationStore=Object.create(null)),this.cache.reset(e)},e.prototype.getObservableQueries=function(e){var t=this;void 0===e&&(e="active");var r=new Map,i=new Map,o=new Set;return Array.isArray(e)&&e.forEach((function(e){var r;"string"==typeof e?i.set(e,!1):Y(r=e)&&"Document"===r.kind&&Array.isArray(r.definitions)?i.set(t.transform(e).document,!1):Y(e)&&e.query&&o.add(e)})),this.queries.forEach((function(t,n){var o=t.observableQuery,a=t.document;if(o){if("all"===e)return void r.set(n,o);var s=o.queryName;if("standby"===o.options.fetchPolicy||"active"===e&&!o.hasObservers())return;("active"===e||s&&i.has(s)||a&&i.has(a))&&(r.set(n,o),s&&i.set(s,!0),a&&i.set(a,!0))}})),o.size&&o.forEach((function(e){var i=lr("legacyOneTimeQuery"),o=t.getQuery(i).init({document:e.query,variables:e.variables}),a=new Tr({queryManager:t,queryInfo:o,options:(0,n.__assign)((0,n.__assign)({},e),{fetchPolicy:"network-only"})});u(a.queryId===i),o.setObservableQuery(a),r.set(i,a)})),__DEV__&&i.size&&i.forEach((function(e,t){e||__DEV__&&u.warn("Unknown query ".concat("string"==typeof t?"named ":"").concat(JSON.stringify(t,null,2)," requested in refetchQueries options.include array"))})),r},e.prototype.reFetchObservableQueries=function(e){var t=this;void 0===e&&(e=!1);var r=[];return this.getObservableQueries(e?"all":"active").forEach((function(n,i){var o=n.options.fetchPolicy;n.resetLastResults(),(e||"standby"!==o&&"cache-only"!==o)&&r.push(n.refetch()),t.getQuery(i).setDiff(null)})),this.broadcastQueries(),Promise.all(r)},e.prototype.setObservableQuery=function(e){this.getQuery(e.queryId).setObservableQuery(e)},e.prototype.startGraphQLSubscription=function(e){var t=this,r=e.query,n=e.fetchPolicy,i=e.errorPolicy,o=e.variables,a=e.context,s=void 0===a?{}:a;r=this.transform(r).document,o=this.getVariables(r,o);var u=function(e){return t.getObservableFromLink(r,s,e).map((function(o){if("no-cache"!==n&&(On(o,i)&&t.cache.write({query:r,result:o.data,dataId:"ROOT_SUBSCRIPTION",variables:e}),t.broadcastQueries()),Xt(o))throw new mr({graphQLErrors:o.errors});return o}))};if(this.transform(r).hasClientExports){var c=this.localState.addExportedVariables(r,o,s).then(u);return new Q((function(e){var t=null;return c.then((function(r){return t=r.subscribe(e)}),e.error),function(){return t&&t.unsubscribe()}}))}return u(o)},e.prototype.stopQuery=function(e){this.stopQueryNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryNoBroadcast=function(e){this.stopQueryInStoreNoBroadcast(e),this.removeQuery(e)},e.prototype.removeQuery=function(e){this.fetchCancelFns.delete(e),this.queries.has(e)&&(this.getQuery(e).stop(),this.queries.delete(e))},e.prototype.broadcastQueries=function(){this.onBroadcast&&this.onBroadcast(),this.queries.forEach((function(e){return e.notify()}))},e.prototype.getLocalState=function(){return this.localState},e.prototype.getObservableFromLink=function(e,t,r,i){var o,a,s=this;void 0===i&&(i=null!==(o=null==t?void 0:t.queryDeduplication)&&void 0!==o?o:this.queryDeduplication);var u=this.transform(e).serverQuery;if(u){var c=this.inFlightLinkObservables,l=this.link,f={query:u,variables:r,operationName:ce(u)||void 0,context:this.prepareContext((0,n.__assign)((0,n.__assign)({},t),{forceFetch:!i}))};if(t=f.context,i){var p=c.get(u)||new Map;c.set(u,p);var d=Gt(r);if(!(a=p.get(d))){var h=new hr([ge(l,f)]);p.set(d,a=h),h.beforeNext((function(){p.delete(d)&&p.size<1&&c.delete(u)}))}}else a=new hr([ge(l,f)])}else a=new hr([Q.of({data:{}})]),t=this.prepareContext(t);var y=this.transform(e).clientQuery;return y&&(a=Zt(a,(function(e){return s.localState.runResolvers({document:y,remoteResult:e,context:t,variables:r})}))),a},e.prototype.getResultsFromLink=function(e,t,r){var n=e.lastRequestId=this.generateRequestId(),i=this.cache.transformForLink(this.transform(e.document).document);return Zt(this.getObservableFromLink(i,r.context,r.variables),(function(o){var a=er(o),s=a.length>0;if(n>=e.lastRequestId){if(s&&"none"===r.errorPolicy)throw e.markError(new mr({graphQLErrors:a}));e.markResult(o,i,r,t),e.markReady()}var u={data:o.data,loading:!1,networkStatus:vr.ready};return s&&"ignore"!==r.errorPolicy&&(u.errors=a,u.networkStatus=vr.error),u}),(function(t){var r=yr(t)?t:new mr({networkError:t});throw n>=e.lastRequestId&&e.markError(r),r}))},e.prototype.fetchQueryObservable=function(e,t,r){var n=this;void 0===r&&(r=vr.loading);var i=this.transform(t.query).document,o=this.getVariables(i,t.variables),a=this.getQuery(e),s=this.defaultOptions.watchQuery,u=t.fetchPolicy,c=void 0===u?s&&s.fetchPolicy||"cache-first":u,l=t.errorPolicy,f=void 0===l?s&&s.errorPolicy||"none":l,p=t.returnPartialData,d=void 0!==p&&p,h=t.notifyOnNetworkStatusChange,y=void 0!==h&&h,v=t.context,m=void 0===v?{}:v,b=Object.assign({},t,{query:i,variables:o,fetchPolicy:c,errorPolicy:f,returnPartialData:d,notifyOnNetworkStatusChange:y,context:m}),g=function(e){b.variables=e;var i=n.fetchQueryByPolicy(a,b,r);return"standby"!==b.fetchPolicy&&i.length>0&&a.observableQuery&&a.observableQuery.applyNextFetchPolicy("after-fetch",t),i},_=function(){return n.fetchCancelFns.delete(e)};this.fetchCancelFns.set(e,(function(e){_(),setTimeout((function(){return w.cancel(e)}))}));var w=new hr(this.transform(b.query).hasClientExports?this.localState.addExportedVariables(b.query,b.variables,b.context).then(g):g(b.variables));return w.promise.then(_,_),w},e.prototype.refetchQueries=function(e){var t=this,r=e.updateCache,n=e.include,i=e.optimistic,o=void 0!==i&&i,a=e.removeOptimistic,s=void 0===a?o?lr("refetchQueries"):void 0:a,u=e.onQueryUpdated,c=new Map;n&&this.getObservableQueries(n).forEach((function(e,r){c.set(r,{oq:e,lastDiff:t.getQuery(r).getDiff()})}));var l=new Map;return r&&this.cache.batch({update:r,optimistic:o&&s||!1,removeOptimistic:s,onWatchUpdated:function(e,t,r){var n=e.watcher instanceof wn&&e.watcher.observableQuery;if(n){if(u){c.delete(n.queryId);var i=u(n,t,r);return!0===i&&(i=n.refetch()),!1!==i&&l.set(n,i),i}null!==u&&c.set(n.queryId,{oq:n,lastDiff:r,diff:t})}}}),c.size&&c.forEach((function(e,r){var n,i=e.oq,o=e.lastDiff,a=e.diff;if(u){if(!a){var s=i.queryInfo;s.reset(),a=s.getDiff()}n=u(i,a,o)}u&&!0!==n||(n=i.refetch()),!1!==n&&l.set(i,n),r.indexOf("legacyOneTimeQuery")>=0&&t.stopQueryNoBroadcast(r)})),s&&this.cache.removeOptimistic(s),l},e.prototype.fetchQueryByPolicy=function(e,t,r){var i=this,o=t.query,a=t.variables,s=t.fetchPolicy,u=t.refetchWritePolicy,c=t.errorPolicy,l=t.returnPartialData,f=t.context,p=t.notifyOnNetworkStatusChange,d=e.networkStatus;e.init({document:this.transform(o).document,variables:a,networkStatus:r});var h=function(){return e.getDiff(a)},y=function(t,r){void 0===r&&(r=e.networkStatus||vr.loading);var s=t.result;!__DEV__||l||Pt(s,{})||Ir(t.missing);var u=function(e){return Q.of((0,n.__assign)({data:e,loading:br(r),networkStatus:r},t.complete?null:{partial:!0}))};return s&&i.transform(o).hasForcedResolvers?i.localState.runResolvers({document:o,remoteResult:{data:s},context:f,variables:a,onlyRunForcedResolvers:!0}).then((function(e){return u(e.data||void 0)})):"none"===c&&r===vr.refetch&&Array.isArray(t.missing)?u(void 0):u(s)},v="no-cache"===s?0:r===vr.refetch&&"merge"!==u?1:2,m=function(){return i.getResultsFromLink(e,v,{variables:a,context:f,fetchPolicy:s,errorPolicy:c})},b=p&&"number"==typeof d&&d!==r&&br(r);switch(s){default:case"cache-first":return(g=h()).complete?[y(g,e.markReady())]:l||b?[y(g),m()]:[m()];case"cache-and-network":var g;return(g=h()).complete||l||b?[y(g),m()]:[m()];case"cache-only":return[y(h(),e.markReady())];case"network-only":return b?[y(h()),m()]:[m()];case"no-cache":return b?[y(e.getDiff()),m()]:[m()];case"standby":return[]}},e.prototype.getQuery=function(e){return e&&!this.queries.has(e)&&this.queries.set(e,new wn(this,e)),this.queries.get(e)},e.prototype.prepareContext=function(e){void 0===e&&(e={});var t=this.localState.prepareContext(e);return(0,n.__assign)((0,n.__assign)({},t),{clientAwareness:this.clientAwareness})},e}();function Tn(e,t){return Or(e,t,t.variables&&{variables:(0,n.__assign)((0,n.__assign)({},e&&e.variables),t.variables)})}var jn,Pn=!1,In=function(){function e(e){var t=this;this.resetStoreCallbacks=[],this.clearStoreCallbacks=[];var r=e.uri,n=e.credentials,i=e.headers,o=e.cache,a=e.ssrMode,c=void 0!==a&&a,l=e.ssrForceFetchDelay,f=void 0===l?0:l,p=e.connectToDevTools,d=void 0===p?"object"==typeof window&&!window.__APOLLO_CLIENT__&&__DEV__:p,h=e.queryDeduplication,y=void 0===h||h,v=e.defaultOptions,m=e.assumeImmutableResults,b=void 0!==m&&m,g=e.resolvers,_=e.typeDefs,w=e.fragmentMatcher,O=e.name,S=e.version,E=e.link;if(E||(E=r?new wt({uri:r,credentials:n,headers:i}):be.empty()),!o)throw __DEV__?new s("To initialize Apollo Client, you must specify a 'cache' property in the options object. \nFor more information, please visit: https://go.apollo.dev/c/docs"):new s(9);if(this.link=E,this.cache=o,this.disableNetworkFetches=c||f>0,this.queryDeduplication=y,this.defaultOptions=v||Object.create(null),this.typeDefs=_,f&&setTimeout((function(){return t.disableNetworkFetches=!1}),f),this.watchQuery=this.watchQuery.bind(this),this.query=this.query.bind(this),this.mutate=this.mutate.bind(this),this.resetStore=this.resetStore.bind(this),this.reFetchObservableQueries=this.reFetchObservableQueries.bind(this),d&&"object"==typeof window&&(window.__APOLLO_CLIENT__=this),!Pn&&d&&__DEV__&&(Pn=!0,"undefined"!=typeof window&&window.document&&window.top===window.self&&!window.__APOLLO_DEVTOOLS_GLOBAL_HOOK__)){var T=window.navigator,j=T&&T.userAgent,P=void 0;"string"==typeof j&&(j.indexOf("Chrome/")>-1?P="https://chrome.google.com/webstore/detail/apollo-client-developer-t/jdkknkkbebbapilgoeccciglkfbmbnfm":j.indexOf("Firefox/")>-1&&(P="https://addons.mozilla.org/en-US/firefox/addon/apollo-developer-tools/")),P&&__DEV__&&u.log("Download the Apollo DevTools for a better development experience: "+P)}this.version="3.7.9",this.localState=new mn({cache:o,client:this,resolvers:g,fragmentMatcher:w}),this.queryManager=new En({cache:this.cache,link:this.link,defaultOptions:this.defaultOptions,queryDeduplication:y,ssrMode:c,clientAwareness:{name:O,version:S},localState:this.localState,assumeImmutableResults:b,onBroadcast:d?function(){t.devToolsHookCb&&t.devToolsHookCb({action:{},state:{queries:t.queryManager.getQueryStore(),mutations:t.queryManager.mutationStore||{}},dataWithOptimisticResults:t.cache.extract(!0)})}:void 0})}return e.prototype.stop=function(){this.queryManager.stop()},e.prototype.watchQuery=function(e){return this.defaultOptions.watchQuery&&(e=Tn(this.defaultOptions.watchQuery,e)),!this.disableNetworkFetches||"network-only"!==e.fetchPolicy&&"cache-and-network"!==e.fetchPolicy||(e=(0,n.__assign)((0,n.__assign)({},e),{fetchPolicy:"cache-first"})),this.queryManager.watchQuery(e)},e.prototype.query=function(e){return this.defaultOptions.query&&(e=Tn(this.defaultOptions.query,e)),__DEV__?u("cache-and-network"!==e.fetchPolicy,"The cache-and-network fetchPolicy does not work with client.query, because client.query can only return a single result. Please use client.watchQuery to receive multiple results from the cache and the network, or consider using a different fetchPolicy, such as cache-first or network-only."):u("cache-and-network"!==e.fetchPolicy,10),this.disableNetworkFetches&&"network-only"===e.fetchPolicy&&(e=(0,n.__assign)((0,n.__assign)({},e),{fetchPolicy:"cache-first"})),this.queryManager.query(e)},e.prototype.mutate=function(e){return this.defaultOptions.mutate&&(e=Tn(this.defaultOptions.mutate,e)),this.queryManager.mutate(e)},e.prototype.subscribe=function(e){return this.queryManager.startGraphQLSubscription(e)},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!1),this.cache.readQuery(e,t)},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!1),this.cache.readFragment(e,t)},e.prototype.writeQuery=function(e){this.cache.writeQuery(e),this.queryManager.broadcastQueries()},e.prototype.writeFragment=function(e){this.cache.writeFragment(e),this.queryManager.broadcastQueries()},e.prototype.__actionHookForDevTools=function(e){this.devToolsHookCb=e},e.prototype.__requestRaw=function(e){return ge(this.link,e)},e.prototype.resetStore=function(){var e=this;return Promise.resolve().then((function(){return e.queryManager.clearStore({discardWatches:!1})})).then((function(){return Promise.all(e.resetStoreCallbacks.map((function(e){return e()})))})).then((function(){return e.reFetchObservableQueries()}))},e.prototype.clearStore=function(){var e=this;return Promise.resolve().then((function(){return e.queryManager.clearStore({discardWatches:!0})})).then((function(){return Promise.all(e.clearStoreCallbacks.map((function(e){return e()})))}))},e.prototype.onResetStore=function(e){var t=this;return this.resetStoreCallbacks.push(e),function(){t.resetStoreCallbacks=t.resetStoreCallbacks.filter((function(t){return t!==e}))}},e.prototype.onClearStore=function(e){var t=this;return this.clearStoreCallbacks.push(e),function(){t.clearStoreCallbacks=t.clearStoreCallbacks.filter((function(t){return t!==e}))}},e.prototype.reFetchObservableQueries=function(e){return this.queryManager.reFetchObservableQueries(e)},e.prototype.refetchQueries=function(e){var t=this.queryManager.refetchQueries(e),r=[],n=[];t.forEach((function(e,t){r.push(t),n.push(e)}));var i=Promise.all(n);return i.queries=r,i.results=n,i.catch((function(e){__DEV__&&u.debug("In client.refetchQueries, Promise.all promise rejected with error ".concat(e))})),i},e.prototype.getObservableQueries=function(e){return void 0===e&&(e="active"),this.queryManager.getObservableQueries(e)},e.prototype.extract=function(e){return this.cache.extract(e)},e.prototype.restore=function(e){return this.cache.restore(e)},e.prototype.addResolvers=function(e){this.localState.addResolvers(e)},e.prototype.setResolvers=function(e){this.localState.setResolvers(e)},e.prototype.getResolvers=function(){return this.localState.getResolvers()},e.prototype.setLocalStateFragmentMatcher=function(e){this.localState.setFragmentMatcher(e)},e.prototype.setLink=function(e){this.link=this.queryManager.link=e},e}();jn||(jn={});var xn=function(){function e(){this.getFragmentDoc=ln(W)}return e.prototype.batch=function(e){var t,r=this,n="string"==typeof e.optimistic?e.optimistic:!1===e.optimistic?null:void 0;return this.performTransaction((function(){return t=e.update(r)}),n),t},e.prototype.recordOptimisticTransaction=function(e,t){this.performTransaction(e,t)},e.prototype.transformDocument=function(e){return e},e.prototype.transformForLink=function(e){return e},e.prototype.identify=function(e){},e.prototype.gc=function(){return[]},e.prototype.modify=function(e){return!1},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!!e.optimistic),this.read((0,n.__assign)((0,n.__assign)({},e),{rootId:e.id||"ROOT_QUERY",optimistic:t}))},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!!e.optimistic),this.read((0,n.__assign)((0,n.__assign)({},e),{query:this.getFragmentDoc(e.fragment,e.fragmentName),rootId:e.id,optimistic:t}))},e.prototype.writeQuery=function(e){var t=e.id,r=e.data,i=(0,n.__rest)(e,["id","data"]);return this.write(Object.assign(i,{dataId:t||"ROOT_QUERY",result:r}))},e.prototype.writeFragment=function(e){var t=e.id,r=e.data,i=e.fragment,o=e.fragmentName,a=(0,n.__rest)(e,["id","data","fragment","fragmentName"]);return this.write(Object.assign(a,{query:this.getFragmentDoc(i,o),dataId:t,result:r}))},e.prototype.updateQuery=function(e,t){return this.batch({update:function(r){var i=r.readQuery(e),o=t(i);return null==o?i:(r.writeQuery((0,n.__assign)((0,n.__assign)({},e),{data:o})),o)}})},e.prototype.updateFragment=function(e,t){return this.batch({update:function(r){var i=r.readFragment(e),o=t(i);return null==o?i:(r.writeFragment((0,n.__assign)((0,n.__assign)({},e),{data:o})),o)}})},e}(),An=function(e){function t(r,n,i,o){var a,s=e.call(this,r)||this;if(s.message=r,s.path=n,s.query=i,s.variables=o,Array.isArray(s.path)){s.missing=s.message;for(var u=s.path.length-1;u>=0;--u)s.missing=((a={})[s.path[u]]=s.missing,a)}else s.missing=s.path;return s.__proto__=t.prototype,s}return(0,n.__extends)(t,e),t}(Error);function Nn(e){return __DEV__&&(t=e,(r=new Set([t])).forEach((function(e){Y(e)&&function(e){if(__DEV__&&!Object.isFrozen(e))try{Object.freeze(e)}catch(e){if(e instanceof TypeError)return null;throw e}return e}(e)===e&&Object.getOwnPropertyNames(e).forEach((function(t){Y(e[t])&&r.add(e[t])}))}))),e;var t,r}var kn=Object.prototype.hasOwnProperty;function Mn(e){return null==e}function Dn(e,t){var r=e.__typename,n=e.id,i=e._id;if("string"==typeof r&&(t&&(t.keyObject=Mn(n)?Mn(i)?void 0:{_id:i}:{id:n}),Mn(n)&&!Mn(i)&&(n=i),!Mn(n)))return"".concat(r,":").concat("number"==typeof n||"string"==typeof n?n:JSON.stringify(n))}var Rn={dataIdFromObject:Dn,addTypename:!0,resultCaching:!0,canonizeResults:!1};function Cn(e){var t=e.canonizeResults;return void 0===t?Rn.canonizeResults:t}var $n=/^[_a-z][_0-9a-z]*/i;function Fn(e){var t=e.match($n);return t?t[0]:e}function qn(e,t,r){return!!Y(t)&&(Mt(t)?t.every((function(t){return qn(e,t,r)})):e.selections.every((function(e){if(ae(e)&&Ne(e,r)){var n=ie(e);return kn.call(t,n)&&(!e.selectionSet||qn(e.selectionSet,t[n],r))}return!0})))}function Ln(e){return Y(e)&&!J(e)&&!Mt(e)}function Bn(e,t){var r=H(le(e));return{fragmentMap:r,lookupFragment:function(e){var n=r[e];return!n&&t&&(n=t.lookup(e)),n||null}}}var Un=Object.create(null),Vn=function(){return Un},zn=Object.create(null),Qn=function(){function e(e,t){var r=this;this.policies=e,this.group=t,this.data=Object.create(null),this.rootIds=Object.create(null),this.refs=Object.create(null),this.getFieldValue=function(e,t){return Nn(J(e)?r.get(e.__ref,t):e&&e[t])},this.canRead=function(e){return J(e)?r.has(e.__ref):"object"==typeof e},this.toReference=function(e,t){if("string"==typeof e)return G(e);if(J(e))return e;var n=r.policies.identify(e)[0];if(n){var i=G(n);return t&&r.merge(n,e),i}}}return e.prototype.toObject=function(){return(0,n.__assign)({},this.data)},e.prototype.has=function(e){return void 0!==this.lookup(e,!0)},e.prototype.get=function(e,t){if(this.group.depend(e,t),kn.call(this.data,e)){var r=this.data[e];if(r&&kn.call(r,t))return r[t]}return"__typename"===t&&kn.call(this.policies.rootTypenamesById,e)?this.policies.rootTypenamesById[e]:this instanceof Kn?this.parent.get(e,t):void 0},e.prototype.lookup=function(e,t){return t&&this.group.depend(e,"__exists"),kn.call(this.data,e)?this.data[e]:this instanceof Kn?this.parent.lookup(e,t):this.policies.rootTypenamesById[e]?Object.create(null):void 0},e.prototype.merge=function(e,t){var r,n=this;J(e)&&(e=e.__ref),J(t)&&(t=t.__ref);var i="string"==typeof e?this.lookup(r=e):e,o="string"==typeof t?this.lookup(r=t):t;if(o){__DEV__?u("string"==typeof r,"store.merge expects a string ID"):u("string"==typeof r,1);var a=new qt(Jn).merge(i,o);if(this.data[r]=a,a!==i&&(delete this.refs[r],this.group.caching)){var s=Object.create(null);i||(s.__exists=1),Object.keys(o).forEach((function(e){if(!i||i[e]!==a[e]){s[e]=1;var t=Fn(e);t===e||n.policies.hasKeyArgs(a.__typename,t)||(s[t]=1),void 0!==a[e]||n instanceof Kn||delete a[e]}})),!s.__typename||i&&i.__typename||this.policies.rootTypenamesById[r]!==a.__typename||delete s.__typename,Object.keys(s).forEach((function(e){return n.group.dirty(r,e)}))}}},e.prototype.modify=function(e,t){var r=this,i=this.lookup(e);if(i){var o=Object.create(null),a=!1,s=!0,u={DELETE:Un,INVALIDATE:zn,isReference:J,toReference:this.toReference,canRead:this.canRead,readField:function(t,n){return r.policies.readField("string"==typeof t?{fieldName:t,from:n||G(e)}:t,{store:r})}};if(Object.keys(i).forEach((function(c){var l=Fn(c),f=i[c];if(void 0!==f){var p="function"==typeof t?t:t[c]||t[l];if(p){var d=p===Vn?Un:p(Nn(f),(0,n.__assign)((0,n.__assign)({},u),{fieldName:l,storeFieldName:c,storage:r.getStorage(e,c)}));d===zn?r.group.dirty(e,c):(d===Un&&(d=void 0),d!==f&&(o[c]=d,a=!0,f=d))}void 0!==f&&(s=!1)}})),a)return this.merge(e,o),s&&(this instanceof Kn?this.data[e]=void 0:delete this.data[e],this.group.dirty(e,"__exists")),!0}return!1},e.prototype.delete=function(e,t,r){var n,i=this.lookup(e);if(i){var o=this.getFieldValue(i,"__typename"),a=t&&r?this.policies.getStoreFieldName({typename:o,fieldName:t,args:r}):t;return this.modify(e,a?((n={})[a]=Vn,n):Vn)}return!1},e.prototype.evict=function(e,t){var r=!1;return e.id&&(kn.call(this.data,e.id)&&(r=this.delete(e.id,e.fieldName,e.args)),this instanceof Kn&&this!==t&&(r=this.parent.evict(e,t)||r),(e.fieldName||r)&&this.group.dirty(e.id,e.fieldName||"__exists")),r},e.prototype.clear=function(){this.replace(null)},e.prototype.extract=function(){var e=this,t=this.toObject(),r=[];return this.getRootIdSet().forEach((function(t){kn.call(e.policies.rootTypenamesById,t)||r.push(t)})),r.length&&(t.__META={extraRootIds:r.sort()}),t},e.prototype.replace=function(e){var t=this;if(Object.keys(this.data).forEach((function(r){e&&kn.call(e,r)||t.delete(r)})),e){var r=e.__META,i=(0,n.__rest)(e,["__META"]);Object.keys(i).forEach((function(e){t.merge(e,i[e])})),r&&r.extraRootIds.forEach(this.retain,this)}},e.prototype.retain=function(e){return this.rootIds[e]=(this.rootIds[e]||0)+1},e.prototype.release=function(e){if(this.rootIds[e]>0){var t=--this.rootIds[e];return t||delete this.rootIds[e],t}return 0},e.prototype.getRootIdSet=function(e){return void 0===e&&(e=new Set),Object.keys(this.rootIds).forEach(e.add,e),this instanceof Kn?this.parent.getRootIdSet(e):Object.keys(this.policies.rootTypenamesById).forEach(e.add,e),e},e.prototype.gc=function(){var e=this,t=this.getRootIdSet(),r=this.toObject();t.forEach((function(n){kn.call(r,n)&&(Object.keys(e.findChildRefIds(n)).forEach(t.add,t),delete r[n])}));var n=Object.keys(r);if(n.length){for(var i=this;i instanceof Kn;)i=i.parent;n.forEach((function(e){return i.delete(e)}))}return n},e.prototype.findChildRefIds=function(e){if(!kn.call(this.refs,e)){var t=this.refs[e]=Object.create(null),r=this.data[e];if(!r)return t;var n=new Set([r]);n.forEach((function(e){J(e)&&(t[e.__ref]=!0),Y(e)&&Object.keys(e).forEach((function(t){var r=e[t];Y(r)&&n.add(r)}))}))}return this.refs[e]},e.prototype.makeCacheKey=function(){return this.group.keyMaker.lookupArray(arguments)},e}(),Yn=function(){function e(e,t){void 0===t&&(t=null),this.caching=e,this.parent=t,this.d=null,this.resetCaching()}return e.prototype.resetCaching=function(){this.d=this.caching?sn():null,this.keyMaker=new Ht(Ce)},e.prototype.depend=function(e,t){if(this.d){this.d(Wn(e,t));var r=Fn(t);r!==t&&this.d(Wn(e,r)),this.parent&&this.parent.depend(e,t)}},e.prototype.dirty=function(e,t){this.d&&this.d.dirty(Wn(e,t),"__exists"===t?"forget":"setDirty")},e}();function Wn(e,t){return t+"#"+e}function Hn(e,t){Zn(e)&&e.group.depend(t,"__exists")}!function(e){var t=function(e){function t(t){var r=t.policies,n=t.resultCaching,i=void 0===n||n,o=t.seed,a=e.call(this,r,new Yn(i))||this;return a.stump=new Gn(a),a.storageTrie=new Ht(Ce),o&&a.replace(o),a}return(0,n.__extends)(t,e),t.prototype.addLayer=function(e,t){return this.stump.addLayer(e,t)},t.prototype.removeLayer=function(){return this},t.prototype.getStorage=function(){return this.storageTrie.lookupArray(arguments)},t}(e);e.Root=t}(Qn||(Qn={}));var Kn=function(e){function t(t,r,n,i){var o=e.call(this,r.policies,i)||this;return o.id=t,o.parent=r,o.replay=n,o.group=i,n(o),o}return(0,n.__extends)(t,e),t.prototype.addLayer=function(e,r){return new t(e,this,r,this.group)},t.prototype.removeLayer=function(e){var t=this,r=this.parent.removeLayer(e);return e===this.id?(this.group.caching&&Object.keys(this.data).forEach((function(e){var n=t.data[e],i=r.lookup(e);i?n?n!==i&&Object.keys(n).forEach((function(r){Pt(n[r],i[r])||t.group.dirty(e,r)})):(t.group.dirty(e,"__exists"),Object.keys(i).forEach((function(r){t.group.dirty(e,r)}))):t.delete(e)})),r):r===this.parent?this:r.addLayer(this.id,this.replay)},t.prototype.toObject=function(){return(0,n.__assign)((0,n.__assign)({},this.parent.toObject()),this.data)},t.prototype.findChildRefIds=function(t){var r=this.parent.findChildRefIds(t);return kn.call(this.data,t)?(0,n.__assign)((0,n.__assign)({},r),e.prototype.findChildRefIds.call(this,t)):r},t.prototype.getStorage=function(){for(var e=this.parent;e.parent;)e=e.parent;return e.getStorage.apply(e,arguments)},t}(Qn),Gn=function(e){function t(t){return e.call(this,"EntityStore.Stump",t,(function(){}),new Yn(t.group.caching,t.group))||this}return(0,n.__extends)(t,e),t.prototype.removeLayer=function(){return this},t.prototype.merge=function(){return this.parent.merge.apply(this.parent,arguments)},t}(Kn);function Jn(e,t,r){var n=e[r],i=t[r];return Pt(n,i)?n:i}function Zn(e){return!!(e instanceof Qn&&e.group.caching)}function Xn(e){return[e.selectionSet,e.objectOrReference,e.context,e.context.canonizeResults]}var ei=function(){function e(e){var t=this;this.knownResults=new(Ce?WeakMap:Map),this.config=Or(e,{addTypename:!1!==e.addTypename,canonizeResults:Cn(e)}),this.canon=e.canon||new Kt,this.executeSelectionSet=ln((function(e){var r,i=e.context.canonizeResults,o=Xn(e);o[3]=!i;var a=(r=t.executeSelectionSet).peek.apply(r,o);return a?i?(0,n.__assign)((0,n.__assign)({},a),{result:t.canon.admit(a.result)}):a:(Hn(e.context.store,e.enclosingRef.__ref),t.execSelectionSetImpl(e))}),{max:this.config.resultCacheMaxSize,keyArgs:Xn,makeCacheKey:function(e,t,r,n){if(Zn(r.store))return r.store.makeCacheKey(e,J(t)?t.__ref:t,r.varString,n)}}),this.executeSubSelectedArray=ln((function(e){return Hn(e.context.store,e.enclosingRef.__ref),t.execSubSelectedArrayImpl(e)}),{max:this.config.resultCacheMaxSize,makeCacheKey:function(e){var t=e.field,r=e.array,n=e.context;if(Zn(n.store))return n.store.makeCacheKey(t,r,n.varString)}})}return e.prototype.resetCanon=function(){this.canon=new Kt},e.prototype.diffQueryAgainstStore=function(e){var t=e.store,r=e.query,i=e.rootId,o=void 0===i?"ROOT_QUERY":i,a=e.variables,s=e.returnPartialData,u=void 0===s||s,c=e.canonizeResults,l=void 0===c?this.config.canonizeResults:c,f=this.config.cache.policies;a=(0,n.__assign)((0,n.__assign)({},de(fe(r))),a);var p,d=G(o),h=this.executeSelectionSet({selectionSet:pe(r).selectionSet,objectOrReference:d,enclosingRef:d,context:(0,n.__assign)({store:t,query:r,policies:f,variables:a,varString:Gt(a),canonizeResults:l},Bn(r,this.config.fragments))});if(h.missing&&(p=[new An(ti(h.missing),h.missing,r,a)],!u))throw p[0];return{result:h.result,complete:!p,missing:p}},e.prototype.isFresh=function(e,t,r,n){if(Zn(n.store)&&this.knownResults.get(e)===r){var i=this.executeSelectionSet.peek(r,t,n,this.canon.isKnown(e));if(i&&e===i.result)return!0}return!1},e.prototype.execSelectionSetImpl=function(e){var t=this,r=e.selectionSet,n=e.objectOrReference,i=e.enclosingRef,o=e.context;if(J(n)&&!o.policies.rootTypenamesById[n.__ref]&&!o.store.has(n.__ref))return{result:this.canon.empty,missing:"Dangling reference to missing ".concat(n.__ref," object")};var a,u=o.variables,c=o.policies,l=o.store.getFieldValue(n,"__typename"),f=[],p=new qt;function d(e,t){var r;return e.missing&&(a=p.merge(a,((r={})[t]=e.missing,r))),e.result}this.config.addTypename&&"string"==typeof l&&!c.rootIdsByTypename[l]&&f.push({__typename:l});var h=new Set(r.selections);h.forEach((function(e){var r,y;if(Ne(e,u))if(ae(e)){var v=c.readField({fieldName:e.name.value,field:e,variables:o.variables,from:n},o),m=ie(e);void 0===v?ar.added(e)||(a=p.merge(a,((r={})[m]="Can't find field '".concat(e.name.value,"' on ").concat(J(n)?n.__ref+" object":"object "+JSON.stringify(n,null,2)),r))):Mt(v)?v=d(t.executeSubSelectedArray({field:e,array:v,enclosingRef:i,context:o}),m):e.selectionSet?null!=v&&(v=d(t.executeSelectionSet({selectionSet:e.selectionSet,objectOrReference:v,enclosingRef:J(v)?v:i,context:o}),m)):o.canonizeResults&&(v=t.canon.pass(v)),void 0!==v&&f.push(((y={})[m]=v,y))}else{var b=K(e,o.lookupFragment);if(!b&&e.kind===je.FRAGMENT_SPREAD)throw __DEV__?new s("No fragment named ".concat(e.name.value)):new s(5);b&&c.fragmentMatches(b,l)&&b.selectionSet.selections.forEach(h.add,h)}}));var y={result:$t(f),missing:a},v=o.canonizeResults?this.canon.admit(y):Nn(y);return v.result&&this.knownResults.set(v.result,r),v},e.prototype.execSubSelectedArrayImpl=function(e){var t,r=this,n=e.field,i=e.array,o=e.enclosingRef,a=e.context,s=new qt;function c(e,r){var n;return e.missing&&(t=s.merge(t,((n={})[r]=e.missing,n))),e.result}return n.selectionSet&&(i=i.filter(a.store.canRead)),i=i.map((function(e,t){return null===e?null:Mt(e)?c(r.executeSubSelectedArray({field:n,array:e,enclosingRef:o,context:a}),t):n.selectionSet?c(r.executeSelectionSet({selectionSet:n.selectionSet,objectOrReference:e,enclosingRef:J(e)?e:o,context:a}),t):(__DEV__&&function(e,t,r){if(!t.selectionSet){var n=new Set([r]);n.forEach((function(r){Y(r)&&(__DEV__?u(!J(r),"Missing selection set for object of type ".concat(function(e,t){return J(t)?e.get(t.__ref,"__typename"):t&&t.__typename}(e,r)," returned for query field ").concat(t.name.value)):u(!J(r),6),Object.values(r).forEach(n.add,n))}))}}(a.store,n,e),e)})),{result:a.canonizeResults?this.canon.admit(i):i,missing:t}},e}();function ti(e){try{JSON.stringify(e,(function(e,t){if("string"==typeof t)throw t;return t}))}catch(e){return e}}var ri=Object.create(null);function ni(e){var t=JSON.stringify(e);return ri[t]||(ri[t]=Object.create(null))}function ii(e){var t=ni(e);return t.keyFieldsFn||(t.keyFieldsFn=function(t,r){var n=function(e,t){return r.readField(t,e)},i=r.keyObject=ai(e,(function(e){var i=ci(r.storeObject,e,n);return void 0===i&&t!==r.storeObject&&kn.call(t,e[0])&&(i=ci(t,e,ui)),__DEV__?u(void 0!==i,"Missing field '".concat(e.join("."),"' while extracting keyFields from ").concat(JSON.stringify(t))):u(void 0!==i,2),i}));return"".concat(r.typename,":").concat(JSON.stringify(i))})}function oi(e){var t=ni(e);return t.keyArgsFn||(t.keyArgsFn=function(t,r){var n=r.field,i=r.variables,o=r.fieldName,a=ai(e,(function(e){var r=e[0],o=r.charAt(0);if("@"!==o)if("$"!==o){if(t)return ci(t,e)}else{var a=r.slice(1);if(i&&kn.call(i,a)){var s=e.slice(0);return s[0]=a,ci(i,s)}}else if(n&&Dt(n.directives)){var u=r.slice(1),c=n.directives.find((function(e){return e.name.value===u})),l=c&&ne(c,i);return l&&ci(l,e.slice(1))}})),s=JSON.stringify(a);return(t||"{}"!==s)&&(o+=":"+s),o})}function ai(e,t){var r=new qt;return si(e).reduce((function(e,n){var i,o=t(n);if(void 0!==o){for(var a=n.length-1;a>=0;--a)(i={})[n[a]]=o,o=i;e=r.merge(e,o)}return e}),Object.create(null))}function si(e){var t=ni(e);if(!t.paths){var r=t.paths=[],n=[];e.forEach((function(t,i){Mt(t)?(si(t).forEach((function(e){return r.push(n.concat(e))})),n.length=0):(n.push(t),Mt(e[i+1])||(r.push(n.slice(0)),n.length=0))}))}return t.paths}function ui(e,t){return e[t]}function ci(e,t,r){return r=r||ui,li(t.reduce((function e(t,n){return Mt(t)?t.map((function(t){return e(t,n)})):t&&r(t,n)}),e))}function li(e){return Y(e)?Mt(e)?e.map(li):ai(Object.keys(e).sort(),(function(t){return ci(e,t)})):e}function fi(e){return void 0!==e.args?e.args:e.field?ne(e.field,e.variables):null}ee.setStringify(Gt);var pi=function(){},di=function(e,t){return t.fieldName},hi=function(e,t,r){return(0,r.mergeObjects)(e,t)},yi=function(e,t){return t},vi=function(){function e(e){this.config=e,this.typePolicies=Object.create(null),this.toBeAdded=Object.create(null),this.supertypeMap=new Map,this.fuzzySubtypes=new Map,this.rootIdsByTypename=Object.create(null),this.rootTypenamesById=Object.create(null),this.usingPossibleTypes=!1,this.config=(0,n.__assign)({dataIdFromObject:Dn},e),this.cache=this.config.cache,this.setRootTypename("Query"),this.setRootTypename("Mutation"),this.setRootTypename("Subscription"),e.possibleTypes&&this.addPossibleTypes(e.possibleTypes),e.typePolicies&&this.addTypePolicies(e.typePolicies)}return e.prototype.identify=function(e,t){var r,i=this,o=t&&(t.typename||(null===(r=t.storeObject)||void 0===r?void 0:r.__typename))||e.__typename;if(o===this.rootTypenamesById.ROOT_QUERY)return["ROOT_QUERY"];for(var a,s=t&&t.storeObject||e,u=(0,n.__assign)((0,n.__assign)({},t),{typename:o,storeObject:s,readField:t&&t.readField||function(){var e=bi(arguments,s);return i.readField(e,{store:i.cache.data,variables:e.variables})}}),c=o&&this.getTypePolicy(o),l=c&&c.keyFn||this.config.dataIdFromObject;l;){var f=l(e,u);if(!Mt(f)){a=f;break}l=ii(f)}return a=a?String(a):void 0,u.keyObject?[a,u.keyObject]:[a]},e.prototype.addTypePolicies=function(e){var t=this;Object.keys(e).forEach((function(r){var i=e[r],o=i.queryType,a=i.mutationType,s=i.subscriptionType,u=(0,n.__rest)(i,["queryType","mutationType","subscriptionType"]);o&&t.setRootTypename("Query",r),a&&t.setRootTypename("Mutation",r),s&&t.setRootTypename("Subscription",r),kn.call(t.toBeAdded,r)?t.toBeAdded[r].push(u):t.toBeAdded[r]=[u]}))},e.prototype.updateTypePolicy=function(e,t){var r=this,n=this.getTypePolicy(e),i=t.keyFields,o=t.fields;function a(e,t){e.merge="function"==typeof t?t:!0===t?hi:!1===t?yi:e.merge}a(n,t.merge),n.keyFn=!1===i?pi:Mt(i)?ii(i):"function"==typeof i?i:n.keyFn,o&&Object.keys(o).forEach((function(t){var n=r.getFieldPolicy(e,t,!0),i=o[t];if("function"==typeof i)n.read=i;else{var s=i.keyArgs,u=i.read,c=i.merge;n.keyFn=!1===s?di:Mt(s)?oi(s):"function"==typeof s?s:n.keyFn,"function"==typeof u&&(n.read=u),a(n,c)}n.read&&n.merge&&(n.keyFn=n.keyFn||di)}))},e.prototype.setRootTypename=function(e,t){void 0===t&&(t=e);var r="ROOT_"+e.toUpperCase(),n=this.rootTypenamesById[r];t!==n&&(__DEV__?u(!n||n===e,"Cannot change root ".concat(e," __typename more than once")):u(!n||n===e,3),n&&delete this.rootIdsByTypename[n],this.rootIdsByTypename[t]=r,this.rootTypenamesById[r]=t)},e.prototype.addPossibleTypes=function(e){var t=this;this.usingPossibleTypes=!0,Object.keys(e).forEach((function(r){t.getSupertypeSet(r,!0),e[r].forEach((function(e){t.getSupertypeSet(e,!0).add(r);var n=e.match($n);n&&n[0]===e||t.fuzzySubtypes.set(e,new RegExp(e))}))}))},e.prototype.getTypePolicy=function(e){var t=this;if(!kn.call(this.typePolicies,e)){var r=this.typePolicies[e]=Object.create(null);r.fields=Object.create(null);var i=this.supertypeMap.get(e);i&&i.size&&i.forEach((function(e){var i=t.getTypePolicy(e),o=i.fields,a=(0,n.__rest)(i,["fields"]);Object.assign(r,a),Object.assign(r.fields,o)}))}var o=this.toBeAdded[e];return o&&o.length&&o.splice(0).forEach((function(r){t.updateTypePolicy(e,r)})),this.typePolicies[e]},e.prototype.getFieldPolicy=function(e,t,r){if(e){var n=this.getTypePolicy(e).fields;return n[t]||r&&(n[t]=Object.create(null))}},e.prototype.getSupertypeSet=function(e,t){var r=this.supertypeMap.get(e);return!r&&t&&this.supertypeMap.set(e,r=new Set),r},e.prototype.fragmentMatches=function(e,t,r,n){var i=this;if(!e.typeCondition)return!0;if(!t)return!1;var o=e.typeCondition.name.value;if(t===o)return!0;if(this.usingPossibleTypes&&this.supertypeMap.has(o))for(var a=this.getSupertypeSet(t,!0),s=[a],c=function(e){var t=i.getSupertypeSet(e,!1);t&&t.size&&s.indexOf(t)<0&&s.push(t)},l=!(!r||!this.fuzzySubtypes.size),f=!1,p=0;p<s.length;++p){var d=s[p];if(d.has(o))return a.has(o)||(f&&__DEV__&&u.warn("Inferring subtype ".concat(t," of supertype ").concat(o)),a.add(o)),!0;d.forEach(c),l&&p===s.length-1&&qn(e.selectionSet,r,n)&&(l=!1,f=!0,this.fuzzySubtypes.forEach((function(e,r){var n=t.match(e);n&&n[0]===t&&c(r)})))}return!1},e.prototype.hasKeyArgs=function(e,t){var r=this.getFieldPolicy(e,t,!1);return!(!r||!r.keyFn)},e.prototype.getStoreFieldName=function(e){var t,r=e.typename,n=e.fieldName,i=this.getFieldPolicy(r,n,!1),o=i&&i.keyFn;if(o&&r)for(var a={typename:r,fieldName:n,field:e.field||null,variables:e.variables},s=fi(e);o;){var u=o(s,a);if(!Mt(u)){t=u||n;break}o=oi(u)}return void 0===t&&(t=e.field?function(e,t){var r=null;e.directives&&(r={},e.directives.forEach((function(e){r[e.name.value]={},e.arguments&&e.arguments.forEach((function(n){var i=n.name,o=n.value;return Z(r[e.name.value],i,o,t)}))})));var n=null;return e.arguments&&e.arguments.length&&(n={},e.arguments.forEach((function(e){var r=e.name,i=e.value;return Z(n,r,i,t)}))),ee(e.name.value,n,r)}(e.field,e.variables):ee(n,fi(e))),!1===t?n:n===Fn(t)?t:n+":"+t},e.prototype.readField=function(e,t){var r=e.from;if(r&&(e.field||e.fieldName)){if(void 0===e.typename){var n=t.store.getFieldValue(r,"__typename");n&&(e.typename=n)}var i=this.getStoreFieldName(e),o=Fn(i),a=t.store.getFieldValue(r,i),s=this.getFieldPolicy(e.typename,o,!1),u=s&&s.read;if(u){var c=mi(this,r,e,t,t.store.getStorage(J(r)?r.__ref:r,i));return fn.withValue(this.cache,u,[a,c])}return a}},e.prototype.getReadFunction=function(e,t){var r=this.getFieldPolicy(e,t,!1);return r&&r.read},e.prototype.getMergeFunction=function(e,t,r){var n=this.getFieldPolicy(e,t,!1),i=n&&n.merge;return!i&&r&&(i=(n=this.getTypePolicy(r))&&n.merge),i},e.prototype.runMergeFunction=function(e,t,r,n,i){var o=r.field,a=r.typename,s=r.merge;return s===hi?gi(n.store)(e,t):s===yi?t:(n.overwrite&&(e=void 0),s(e,t,mi(this,void 0,{typename:a,fieldName:o.name.value,field:o,variables:n.variables},n,i||Object.create(null))))},e}();function mi(e,t,r,n,i){var o=e.getStoreFieldName(r),a=Fn(o),s=r.variables||n.variables,u=n.store,c=u.toReference,l=u.canRead;return{args:fi(r),field:r.field||null,fieldName:a,storeFieldName:o,variables:s,isReference:J,toReference:c,storage:i,cache:e.cache,canRead:l,readField:function(){return e.readField(bi(arguments,t,s),n)},mergeObjects:gi(n.store)}}function bi(e,t,r){var i,o,a,s=e[0],c=e[1],l=e.length;return"string"==typeof s?i={fieldName:s,from:l>1?c:t}:(i=(0,n.__assign)({},s),kn.call(i,"from")||(i.from=t)),__DEV__&&void 0===i.from&&__DEV__&&u.warn("Undefined 'from' passed to readField with arguments ".concat((o=Array.from(e),a=lr("stringifyForDisplay"),JSON.stringify(o,(function(e,t){return void 0===t?a:t})).split(JSON.stringify(a)).join("<undefined>")))),void 0===i.variables&&(i.variables=r),i}function gi(e){return function(t,r){if(Mt(t)||Mt(r))throw __DEV__?new s("Cannot automatically merge arrays"):new s(4);if(Y(t)&&Y(r)){var i=e.getFieldValue(t,"__typename"),o=e.getFieldValue(r,"__typename");if(i&&o&&i!==o)return r;if(J(t)&&Ln(r))return e.merge(t.__ref,r),t;if(Ln(t)&&J(r))return e.merge(t,r.__ref),r;if(Ln(t)&&Ln(r))return(0,n.__assign)((0,n.__assign)({},t),r)}return r}}function _i(e,t,r){var i="".concat(t).concat(r),o=e.flavors.get(i);return o||e.flavors.set(i,o=e.clientOnly===t&&e.deferred===r?e:(0,n.__assign)((0,n.__assign)({},e),{clientOnly:t,deferred:r})),o}var wi=function(){function e(e,t,r){this.cache=e,this.reader=t,this.fragments=r}return e.prototype.writeToStore=function(e,t){var r=this,i=t.query,o=t.result,a=t.dataId,c=t.variables,l=t.overwrite,f=ue(i),p=new qt;c=(0,n.__assign)((0,n.__assign)({},de(f)),c);var d=(0,n.__assign)((0,n.__assign)({store:e,written:Object.create(null),merge:function(e,t){return p.merge(e,t)},variables:c,varString:Gt(c)},Bn(i,this.fragments)),{overwrite:!!l,incomingById:new Map,clientOnly:!1,deferred:!1,flavors:new Map}),h=this.processSelectionSet({result:o||Object.create(null),dataId:a,selectionSet:f.selectionSet,mergeTree:{map:new Map},context:d});if(!J(h))throw __DEV__?new s("Could not identify object ".concat(JSON.stringify(o))):new s(7);return d.incomingById.forEach((function(t,n){var i=t.storeObject,o=t.mergeTree,a=t.fieldNodeSet,s=G(n);if(o&&o.map.size){var c=r.applyMerges(o,s,i,d);if(J(c))return;i=c}if(__DEV__&&!d.overwrite){var l=Object.create(null);a.forEach((function(e){e.selectionSet&&(l[e.name.value]=!0)})),Object.keys(i).forEach((function(e){(function(e){return!0===l[Fn(e)]})(e)&&!function(e){var t=o&&o.map.get(e);return Boolean(t&&t.info&&t.info.merge)}(e)&&function(e,t,r,n){var i=function(e){var t=n.getFieldValue(e,r);return"object"==typeof t&&t},o=i(e);if(o){var a=i(t);if(a&&!J(o)&&!Pt(o,a)&&!Object.keys(o).every((function(e){return void 0!==n.getFieldValue(a,e)}))){var s=n.getFieldValue(e,"__typename")||n.getFieldValue(t,"__typename"),c=Fn(r),l="".concat(s,".").concat(c);if(!Pi.has(l)){Pi.add(l);var f=[];Mt(o)||Mt(a)||[o,a].forEach((function(e){var t=n.getFieldValue(e,"__typename");"string"!=typeof t||f.includes(t)||f.push(t)})),__DEV__&&u.warn("Cache data may be lost when replacing the ".concat(c," field of a ").concat(s," object.\n\nTo address this problem (which is not a bug in Apollo Client), ").concat(f.length?"either ensure all objects of type "+f.join(" and ")+" have an ID or a custom merge function, or ":"","define a custom merge function for the ").concat(l," field, so InMemoryCache can safely merge these objects:\n\n existing: ").concat(JSON.stringify(o).slice(0,1e3),"\n incoming: ").concat(JSON.stringify(a).slice(0,1e3),"\n\nFor more information about these options, please refer to the documentation:\n\n * Ensuring entity objects have IDs: https://go.apollo.dev/c/generating-unique-identifiers\n * Defining custom merge functions: https://go.apollo.dev/c/merging-non-normalized-objects\n"))}}}}(s,i,e,d.store)}))}e.merge(n,i)})),e.retain(h.__ref),h},e.prototype.processSelectionSet=function(e){var t=this,r=e.dataId,i=e.result,o=e.selectionSet,a=e.context,s=e.mergeTree,c=this.cache.policies,l=Object.create(null),f=r&&c.rootTypenamesById[r]||oe(i,o,a.fragmentMap)||r&&a.store.get(r,"__typename");"string"==typeof f&&(l.__typename=f);var p=function(){var e=bi(arguments,l,a.variables);if(J(e.from)){var t=a.incomingById.get(e.from.__ref);if(t){var r=c.readField((0,n.__assign)((0,n.__assign)({},e),{from:t.storeObject}),a);if(void 0!==r)return r}}return c.readField(e,a)},d=new Set;this.flattenFields(o,i,a,f).forEach((function(e,r){var n,o=ie(r),a=i[o];if(d.add(r),void 0!==a){var h=c.getStoreFieldName({typename:f,fieldName:r.name.value,field:r,variables:e.variables}),y=Si(s,h),v=t.processFieldValue(a,r,r.selectionSet?_i(e,!1,!1):e,y),m=void 0;r.selectionSet&&(J(v)||Ln(v))&&(m=p("__typename",v));var b=c.getMergeFunction(f,r.name.value,m);b?y.info={field:r,typename:f,merge:b}:ji(s,h),l=e.merge(l,((n={})[h]=v,n))}else!__DEV__||e.clientOnly||e.deferred||ar.added(r)||c.getReadFunction(f,r.name.value)||__DEV__&&u.error("Missing field '".concat(ie(r),"' while writing result ").concat(JSON.stringify(i,null,2)).substring(0,1e3))}));try{var h=c.identify(i,{typename:f,selectionSet:o,fragmentMap:a.fragmentMap,storeObject:l,readField:p}),y=h[0],v=h[1];r=r||y,v&&(l=a.merge(l,v))}catch(e){if(!r)throw e}if("string"==typeof r){var m=G(r),b=a.written[r]||(a.written[r]=[]);if(b.indexOf(o)>=0)return m;if(b.push(o),this.reader&&this.reader.isFresh(i,m,o,a))return m;var g=a.incomingById.get(r);return g?(g.storeObject=a.merge(g.storeObject,l),g.mergeTree=Ei(g.mergeTree,s),d.forEach((function(e){return g.fieldNodeSet.add(e)}))):a.incomingById.set(r,{storeObject:l,mergeTree:Ti(s)?void 0:s,fieldNodeSet:d}),m}return l},e.prototype.processFieldValue=function(e,t,r,n){var i=this;return t.selectionSet&&null!==e?Mt(e)?e.map((function(e,o){var a=i.processFieldValue(e,t,r,Si(n,o));return ji(n,o),a})):this.processSelectionSet({result:e,selectionSet:t.selectionSet,context:r,mergeTree:n}):__DEV__?_r(e):e},e.prototype.flattenFields=function(e,t,r,n){void 0===n&&(n=oe(t,e,r.fragmentMap));var i=new Map,o=this.cache.policies,a=new Ht(!1);return function e(u,c){var l=a.lookup(u,c.clientOnly,c.deferred);l.visited||(l.visited=!0,u.selections.forEach((function(a){if(Ne(a,r.variables)){var u=c.clientOnly,l=c.deferred;if(u&&l||!Dt(a.directives)||a.directives.forEach((function(e){var t=e.name.value;if("client"===t&&(u=!0),"defer"===t){var n=ne(e,r.variables);n&&!1===n.if||(l=!0)}})),ae(a)){var f=i.get(a);f&&(u=u&&f.clientOnly,l=l&&f.deferred),i.set(a,_i(r,u,l))}else{var p=K(a,r.lookupFragment);if(!p&&a.kind===je.FRAGMENT_SPREAD)throw __DEV__?new s("No fragment named ".concat(a.name.value)):new s(8);p&&o.fragmentMatches(p,n,t,r.variables)&&e(p.selectionSet,_i(r,u,l))}}})))}(e,r),i},e.prototype.applyMerges=function(e,t,r,i,o){var a,s=this;if(e.map.size&&!J(r)){var c,l=Mt(r)||!J(t)&&!Ln(t)?void 0:t,f=r;l&&!o&&(o=[J(l)?l.__ref:l]);var p=function(e,t){return Mt(e)?"number"==typeof t?e[t]:void 0:i.store.getFieldValue(e,String(t))};e.map.forEach((function(e,t){var r=p(l,t),n=p(f,t);if(void 0!==n){o&&o.push(t);var a=s.applyMerges(e,r,n,i,o);a!==n&&(c=c||new Map).set(t,a),o&&u(o.pop()===t)}})),c&&(r=Mt(f)?f.slice(0):(0,n.__assign)({},f),c.forEach((function(e,t){r[t]=e})))}return e.info?this.cache.policies.runMergeFunction(t,r,e.info,i,o&&(a=i.store).getStorage.apply(a,o)):r},e}(),Oi=[];function Si(e,t){var r=e.map;return r.has(t)||r.set(t,Oi.pop()||{map:new Map}),r.get(t)}function Ei(e,t){if(e===t||!t||Ti(t))return e;if(!e||Ti(e))return t;var r=e.info&&t.info?(0,n.__assign)((0,n.__assign)({},e.info),t.info):e.info||t.info,i=e.map.size&&t.map.size,o={info:r,map:i?new Map:e.map.size?e.map:t.map};if(i){var a=new Set(t.map.keys());e.map.forEach((function(e,r){o.map.set(r,Ei(e,t.map.get(r))),a.delete(r)})),a.forEach((function(r){o.map.set(r,Ei(t.map.get(r),e.map.get(r)))}))}return o}function Ti(e){return!e||!(e.info||e.map.size)}function ji(e,t){var r=e.map,n=r.get(t);n&&Ti(n)&&(Oi.push(n),r.delete(t))}var Pi=new Set,Ii=function(e){function t(t){void 0===t&&(t={});var r=e.call(this)||this;return r.watches=new Set,r.typenameDocumentCache=new Map,r.makeVar=yn,r.txCount=0,r.config=function(e){return Or(Rn,e)}(t),r.addTypename=!!r.config.addTypename,r.policies=new vi({cache:r,dataIdFromObject:r.config.dataIdFromObject,possibleTypes:r.config.possibleTypes,typePolicies:r.config.typePolicies}),r.init(),r}return(0,n.__extends)(t,e),t.prototype.init=function(){var e=this.data=new Qn.Root({policies:this.policies,resultCaching:this.config.resultCaching});this.optimisticData=e.stump,this.resetResultCache()},t.prototype.resetResultCache=function(e){var t=this,r=this.storeReader,n=this.config.fragments;this.storeWriter=new wi(this,this.storeReader=new ei({cache:this,addTypename:this.addTypename,resultCacheMaxSize:this.config.resultCacheMaxSize,canonizeResults:Cn(this.config),canon:e?void 0:r&&r.canon,fragments:n}),n),this.maybeBroadcastWatch=ln((function(e,r){return t.broadcastWatch(e,r)}),{max:this.config.resultCacheMaxSize,makeCacheKey:function(e){var r=e.optimistic?t.optimisticData:t.data;if(Zn(r)){var n=e.optimistic,i=e.id,o=e.variables;return r.makeCacheKey(e.query,e.callback,Gt({optimistic:n,id:i,variables:o}))}}}),new Set([this.data.group,this.optimisticData.group]).forEach((function(e){return e.resetCaching()}))},t.prototype.restore=function(e){return this.init(),e&&this.data.replace(e),this},t.prototype.extract=function(e){return void 0===e&&(e=!1),(e?this.optimisticData:this.data).extract()},t.prototype.read=function(e){var t=e.returnPartialData,r=void 0!==t&&t;try{return this.storeReader.diffQueryAgainstStore((0,n.__assign)((0,n.__assign)({},e),{store:e.optimistic?this.optimisticData:this.data,config:this.config,returnPartialData:r})).result||null}catch(e){if(e instanceof An)return null;throw e}},t.prototype.write=function(e){try{return++this.txCount,this.storeWriter.writeToStore(this.data,e)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.modify=function(e){if(kn.call(e,"id")&&!e.id)return!1;var t=e.optimistic?this.optimisticData:this.data;try{return++this.txCount,t.modify(e.id||"ROOT_QUERY",e.fields)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.diff=function(e){return this.storeReader.diffQueryAgainstStore((0,n.__assign)((0,n.__assign)({},e),{store:e.optimistic?this.optimisticData:this.data,rootId:e.id||"ROOT_QUERY",config:this.config}))},t.prototype.watch=function(e){var t,r=this;return this.watches.size||dn(t=this).vars.forEach((function(e){return e.attachCache(t)})),this.watches.add(e),e.immediate&&this.maybeBroadcastWatch(e),function(){r.watches.delete(e)&&!r.watches.size&&hn(r),r.maybeBroadcastWatch.forget(e)}},t.prototype.gc=function(e){Gt.reset();var t=this.optimisticData.gc();return e&&!this.txCount&&(e.resetResultCache?this.resetResultCache(e.resetResultIdentities):e.resetResultIdentities&&this.storeReader.resetCanon()),t},t.prototype.retain=function(e,t){return(t?this.optimisticData:this.data).retain(e)},t.prototype.release=function(e,t){return(t?this.optimisticData:this.data).release(e)},t.prototype.identify=function(e){if(J(e))return e.__ref;try{return this.policies.identify(e)[0]}catch(e){__DEV__&&u.warn(e)}},t.prototype.evict=function(e){if(!e.id){if(kn.call(e,"id"))return!1;e=(0,n.__assign)((0,n.__assign)({},e),{id:"ROOT_QUERY"})}try{return++this.txCount,this.optimisticData.evict(e,this.data)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.reset=function(e){var t=this;return this.init(),Gt.reset(),e&&e.discardWatches?(this.watches.forEach((function(e){return t.maybeBroadcastWatch.forget(e)})),this.watches.clear(),hn(this)):this.broadcastWatches(),Promise.resolve()},t.prototype.removeOptimistic=function(e){var t=this.optimisticData.removeLayer(e);t!==this.optimisticData&&(this.optimisticData=t,this.broadcastWatches())},t.prototype.batch=function(e){var t,r=this,i=e.update,o=e.optimistic,a=void 0===o||o,s=e.removeOptimistic,u=e.onWatchUpdated,c=function(e){var n=r,o=n.data,a=n.optimisticData;++r.txCount,e&&(r.data=r.optimisticData=e);try{return t=i(r)}finally{--r.txCount,r.data=o,r.optimisticData=a}},l=new Set;return u&&!this.txCount&&this.broadcastWatches((0,n.__assign)((0,n.__assign)({},e),{onWatchUpdated:function(e){return l.add(e),!1}})),"string"==typeof a?this.optimisticData=this.optimisticData.addLayer(a,c):!1===a?c(this.data):c(),"string"==typeof s&&(this.optimisticData=this.optimisticData.removeLayer(s)),u&&l.size?(this.broadcastWatches((0,n.__assign)((0,n.__assign)({},e),{onWatchUpdated:function(e,t){var r=u.call(this,e,t);return!1!==r&&l.delete(e),r}})),l.size&&l.forEach((function(e){return r.maybeBroadcastWatch.dirty(e)}))):this.broadcastWatches(e),t},t.prototype.performTransaction=function(e,t){return this.batch({update:e,optimistic:t||null!==t})},t.prototype.transformDocument=function(e){if(this.addTypename){var t=this.typenameDocumentCache.get(e);return t||(t=ar(e),this.typenameDocumentCache.set(e,t),this.typenameDocumentCache.set(t,t)),t}return e},t.prototype.transformForLink=function(e){var t=this.config.fragments;return t?t.transform(e):e},t.prototype.broadcastWatches=function(e){var t=this;this.txCount||this.watches.forEach((function(r){return t.maybeBroadcastWatch(r,e)}))},t.prototype.broadcastWatch=function(e,t){var r=e.lastDiff,n=this.diff(e);t&&(e.optimistic&&"string"==typeof t.optimistic&&(n.fromOptimisticTransaction=!0),t.onWatchUpdated&&!1===t.onWatchUpdated.call(this,e,n,r))||r&&Pt(r.result,n.result)||e.callback(e.lastDiff=n,r)},t}(xn),xi=be.empty,Ai=be.from,Ni=be.split,ki=be.concat;function Mi(e){var t=!1;return new Promise((function(r,n){e.subscribe({next:function(e){t?__DEV__&&u.warn("Promise Wrapper does not support multiple results from Observable"):(t=!0,r(e))},error:n})}))}function Di(e){return new Q((function(t){e.then((function(e){t.next(e),t.complete()})).catch(t.error.bind(t))}))}function Ri(e,t){if(!Boolean(e))throw new Error(null!=t?t:"Unexpected invariant triggered.")}const Ci=/\r\n|[\n\r]/g;function $i(e,t){let r=0,n=1;for(const i of e.body.matchAll(Ci)){if("number"==typeof i.index||Ri(!1),i.index>=t)break;r=i.index+i[0].length,n+=1}return{line:n,column:t+1-r}}function Fi(e,t){const r=e.locationOffset.column-1,n="".padStart(r)+e.body,i=t.line-1,o=e.locationOffset.line-1,a=t.line+o,s=1===t.line?r:0,u=t.column+s,c=`${e.name}:${a}:${u}\n`,l=n.split(/\r\n|[\n\r]/g),f=l[i];if(f.length>120){const e=Math.floor(u/80),t=u%80,r=[];for(let e=0;e<f.length;e+=80)r.push(f.slice(e,e+80));return c+qi([[`${a} |`,r[0]],...r.slice(1,e+1).map((e=>["|",e])),["|","^".padStart(t)],["|",r[e+1]]])}return c+qi([[a-1+" |",l[i-1]],[`${a} |`,f],["|","^".padStart(u)],[`${a+1} |`,l[i+1]]])}function qi(e){const t=e.filter((([e,t])=>void 0!==t)),r=Math.max(...t.map((([e])=>e.length)));return t.map((([e,t])=>e.padStart(r)+(t?" "+t:""))).join("\n")}class Li extends Error{constructor(e,...t){var r,n,i;const{nodes:o,source:a,positions:s,path:u,originalError:c,extensions:l}=function(e){const t=e[0];return null==t||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}(t);super(e),this.name="GraphQLError",this.path=null!=u?u:void 0,this.originalError=null!=c?c:void 0,this.nodes=Bi(Array.isArray(o)?o:o?[o]:void 0);const f=Bi(null===(r=this.nodes)||void 0===r?void 0:r.map((e=>e.loc)).filter((e=>null!=e)));this.source=null!=a?a:null==f||null===(n=f[0])||void 0===n?void 0:n.source,this.positions=null!=s?s:null==f?void 0:f.map((e=>e.start)),this.locations=s&&a?s.map((e=>$i(a,e))):null==f?void 0:f.map((e=>$i(e.source,e.start)));const p="object"==typeof(d=null==c?void 0:c.extensions)&&null!==d?null==c?void 0:c.extensions:void 0;var d;this.extensions=null!==(i=null!=l?l:p)&&void 0!==i?i:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),null!=c&&c.stack?Object.defineProperty(this,"stack",{value:c.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,Li):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let e=this.message;if(this.nodes)for(const r of this.nodes)r.loc&&(e+="\n\n"+Fi((t=r.loc).source,$i(t.source,t.start)));else if(this.source&&this.locations)for(const t of this.locations)e+="\n\n"+Fi(this.source,t);var t;return e}toJSON(){const e={message:this.message};return null!=this.locations&&(e.locations=this.locations),null!=this.path&&(e.path=this.path),null!=this.extensions&&Object.keys(this.extensions).length>0&&(e.extensions=this.extensions),e}}function Bi(e){return void 0===e||0===e.length?void 0:e}function Ui(e,t,r){return new Li(`Syntax Error: ${r}`,{source:e,positions:[t]})}var Vi,zi,Qi;!function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"}(Vi||(Vi={})),(Qi=zi||(zi={})).SOF="<SOF>",Qi.EOF="<EOF>",Qi.BANG="!",Qi.DOLLAR="$",Qi.AMP="&",Qi.PAREN_L="(",Qi.PAREN_R=")",Qi.SPREAD="...",Qi.COLON=":",Qi.EQUALS="=",Qi.AT="@",Qi.BRACKET_L="[",Qi.BRACKET_R="]",Qi.BRACE_L="{",Qi.PIPE="|",Qi.BRACE_R="}",Qi.NAME="Name",Qi.INT="Int",Qi.FLOAT="Float",Qi.STRING="String",Qi.BLOCK_STRING="BlockString",Qi.COMMENT="Comment";class Yi{constructor(e){const t=new we(zi.SOF,0,0,0,0);this.source=e,this.lastToken=t,this.token=t,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let e=this.token;if(e.kind!==zi.EOF)do{if(e.next)e=e.next;else{const t=Xi(this,e.end);e.next=t,t.prev=e,e=t}}while(e.kind===zi.COMMENT);return e}}function Wi(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function Hi(e,t){return Ki(e.charCodeAt(t))&&Gi(e.charCodeAt(t+1))}function Ki(e){return e>=55296&&e<=56319}function Gi(e){return e>=56320&&e<=57343}function Ji(e,t){const r=e.source.body.codePointAt(t);if(void 0===r)return zi.EOF;if(r>=32&&r<=126){const e=String.fromCodePoint(r);return'"'===e?"'\"'":`"${e}"`}return"U+"+r.toString(16).toUpperCase().padStart(4,"0")}function Zi(e,t,r,n,i){const o=e.line,a=1+r-e.lineStart;return new we(t,r,n,o,a,i)}function Xi(e,t){const r=e.source.body,n=r.length;let i=t;for(;i<n;){const t=r.charCodeAt(i);switch(t){case 65279:case 9:case 32:case 44:++i;continue;case 10:++i,++e.line,e.lineStart=i;continue;case 13:10===r.charCodeAt(i+1)?i+=2:++i,++e.line,e.lineStart=i;continue;case 35:return eo(e,i);case 33:return Zi(e,zi.BANG,i,i+1);case 36:return Zi(e,zi.DOLLAR,i,i+1);case 38:return Zi(e,zi.AMP,i,i+1);case 40:return Zi(e,zi.PAREN_L,i,i+1);case 41:return Zi(e,zi.PAREN_R,i,i+1);case 46:if(46===r.charCodeAt(i+1)&&46===r.charCodeAt(i+2))return Zi(e,zi.SPREAD,i,i+3);break;case 58:return Zi(e,zi.COLON,i,i+1);case 61:return Zi(e,zi.EQUALS,i,i+1);case 64:return Zi(e,zi.AT,i,i+1);case 91:return Zi(e,zi.BRACKET_L,i,i+1);case 93:return Zi(e,zi.BRACKET_R,i,i+1);case 123:return Zi(e,zi.BRACE_L,i,i+1);case 124:return Zi(e,zi.PIPE,i,i+1);case 125:return Zi(e,zi.BRACE_R,i,i+1);case 34:return 34===r.charCodeAt(i+1)&&34===r.charCodeAt(i+2)?co(e,i):no(e,i)}if(Ge(t)||45===t)return to(e,i,t);if(Ze(t))return lo(e,i);throw Ui(e.source,i,39===t?"Unexpected single quote character ('), did you mean to use a double quote (\")?":Wi(t)||Hi(r,i)?`Unexpected character: ${Ji(e,i)}.`:`Invalid character: ${Ji(e,i)}.`)}return Zi(e,zi.EOF,n,n)}function eo(e,t){const r=e.source.body,n=r.length;let i=t+1;for(;i<n;){const e=r.charCodeAt(i);if(10===e||13===e)break;if(Wi(e))++i;else{if(!Hi(r,i))break;i+=2}}return Zi(e,zi.COMMENT,t,i,r.slice(t+1,i))}function to(e,t,r){const n=e.source.body;let i=t,o=r,a=!1;if(45===o&&(o=n.charCodeAt(++i)),48===o){if(o=n.charCodeAt(++i),Ge(o))throw Ui(e.source,i,`Invalid number, unexpected digit after 0: ${Ji(e,i)}.`)}else i=ro(e,i,o),o=n.charCodeAt(i);if(46===o&&(a=!0,o=n.charCodeAt(++i),i=ro(e,i,o),o=n.charCodeAt(i)),69!==o&&101!==o||(a=!0,o=n.charCodeAt(++i),43!==o&&45!==o||(o=n.charCodeAt(++i)),i=ro(e,i,o),o=n.charCodeAt(i)),46===o||Ze(o))throw Ui(e.source,i,`Invalid number, expected digit but got: ${Ji(e,i)}.`);return Zi(e,a?zi.FLOAT:zi.INT,t,i,n.slice(t,i))}function ro(e,t,r){if(!Ge(r))throw Ui(e.source,t,`Invalid number, expected digit but got: ${Ji(e,t)}.`);const n=e.source.body;let i=t+1;for(;Ge(n.charCodeAt(i));)++i;return i}function no(e,t){const r=e.source.body,n=r.length;let i=t+1,o=i,a="";for(;i<n;){const n=r.charCodeAt(i);if(34===n)return a+=r.slice(o,i),Zi(e,zi.STRING,t,i+1,a);if(92!==n){if(10===n||13===n)break;if(Wi(n))++i;else{if(!Hi(r,i))throw Ui(e.source,i,`Invalid character within String: ${Ji(e,i)}.`);i+=2}}else{a+=r.slice(o,i);const t=117===r.charCodeAt(i+1)?123===r.charCodeAt(i+2)?io(e,i):oo(e,i):uo(e,i);a+=t.value,i+=t.size,o=i}}throw Ui(e.source,i,"Unterminated string.")}function io(e,t){const r=e.source.body;let n=0,i=3;for(;i<12;){const e=r.charCodeAt(t+i++);if(125===e){if(i<5||!Wi(n))break;return{value:String.fromCodePoint(n),size:i}}if(n=n<<4|so(e),n<0)break}throw Ui(e.source,t,`Invalid Unicode escape sequence: "${r.slice(t,t+i)}".`)}function oo(e,t){const r=e.source.body,n=ao(r,t+2);if(Wi(n))return{value:String.fromCodePoint(n),size:6};if(Ki(n)&&92===r.charCodeAt(t+6)&&117===r.charCodeAt(t+7)){const e=ao(r,t+8);if(Gi(e))return{value:String.fromCodePoint(n,e),size:12}}throw Ui(e.source,t,`Invalid Unicode escape sequence: "${r.slice(t,t+6)}".`)}function ao(e,t){return so(e.charCodeAt(t))<<12|so(e.charCodeAt(t+1))<<8|so(e.charCodeAt(t+2))<<4|so(e.charCodeAt(t+3))}function so(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function uo(e,t){const r=e.source.body;switch(r.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:"\n",size:2};case 114:return{value:"\r",size:2};case 116:return{value:"\t",size:2}}throw Ui(e.source,t,`Invalid character escape sequence: "${r.slice(t,t+2)}".`)}function co(e,t){const r=e.source.body,n=r.length;let i=e.lineStart,o=t+3,a=o,s="";const u=[];for(;o<n;){const n=r.charCodeAt(o);if(34===n&&34===r.charCodeAt(o+1)&&34===r.charCodeAt(o+2)){s+=r.slice(a,o),u.push(s);const n=Zi(e,zi.BLOCK_STRING,t,o+3,Xe(u).join("\n"));return e.line+=u.length-1,e.lineStart=i,n}if(92!==n||34!==r.charCodeAt(o+1)||34!==r.charCodeAt(o+2)||34!==r.charCodeAt(o+3))if(10!==n&&13!==n)if(Wi(n))++o;else{if(!Hi(r,o))throw Ui(e.source,o,`Invalid character within String: ${Ji(e,o)}.`);o+=2}else s+=r.slice(a,o),u.push(s),13===n&&10===r.charCodeAt(o+1)?o+=2:++o,s="",a=o,i=o;else s+=r.slice(a,o),a=o+1,o+=4}throw Ui(e.source,o,"Unterminated string.")}function lo(e,t){const r=e.source.body,n=r.length;let i=t+1;for(;i<n&&(Je(o=r.charCodeAt(i))||Ge(o)||95===o);)++i;var o;return Zi(e,zi.NAME,t,i,r.slice(t,i))}class fo{constructor(e,t={}){const r=function(e){return e instanceof E}(e)?e:new E(e);this._lexer=new Yi(r),this._options=t,this._tokenCounter=0}parseName(){const e=this.expectToken(zi.NAME);return this.node(e,{kind:je.NAME,value:e.value})}parseDocument(){return this.node(this._lexer.token,{kind:je.DOCUMENT,definitions:this.many(zi.SOF,this.parseDefinition,zi.EOF)})}parseDefinition(){if(this.peek(zi.BRACE_L))return this.parseOperationDefinition();const e=this.peekDescription(),t=e?this._lexer.lookahead():this._lexer.token;if(t.kind===zi.NAME){switch(t.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(e)throw Ui(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(t.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(t)}parseOperationDefinition(){const e=this._lexer.token;if(this.peek(zi.BRACE_L))return this.node(e,{kind:je.OPERATION_DEFINITION,operation:Te.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const t=this.parseOperationType();let r;return this.peek(zi.NAME)&&(r=this.parseName()),this.node(e,{kind:je.OPERATION_DEFINITION,operation:t,name:r,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const e=this.expectToken(zi.NAME);switch(e.value){case"query":return Te.QUERY;case"mutation":return Te.MUTATION;case"subscription":return Te.SUBSCRIPTION}throw this.unexpected(e)}parseVariableDefinitions(){return this.optionalMany(zi.PAREN_L,this.parseVariableDefinition,zi.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:je.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(zi.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(zi.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const e=this._lexer.token;return this.expectToken(zi.DOLLAR),this.node(e,{kind:je.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:je.SELECTION_SET,selections:this.many(zi.BRACE_L,this.parseSelection,zi.BRACE_R)})}parseSelection(){return this.peek(zi.SPREAD)?this.parseFragment():this.parseField()}parseField(){const e=this._lexer.token,t=this.parseName();let r,n;return this.expectOptionalToken(zi.COLON)?(r=t,n=this.parseName()):n=t,this.node(e,{kind:je.FIELD,alias:r,name:n,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(zi.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(e){const t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(zi.PAREN_L,t,zi.PAREN_R)}parseArgument(e=!1){const t=this._lexer.token,r=this.parseName();return this.expectToken(zi.COLON),this.node(t,{kind:je.ARGUMENT,name:r,value:this.parseValueLiteral(e)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const e=this._lexer.token;this.expectToken(zi.SPREAD);const t=this.expectOptionalKeyword("on");return!t&&this.peek(zi.NAME)?this.node(e,{kind:je.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(e,{kind:je.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){const e=this._lexer.token;return this.expectKeyword("fragment"),!0===this._options.allowLegacyFragmentVariables?this.node(e,{kind:je.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(e,{kind:je.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()}parseValueLiteral(e){const t=this._lexer.token;switch(t.kind){case zi.BRACKET_L:return this.parseList(e);case zi.BRACE_L:return this.parseObject(e);case zi.INT:return this.advanceLexer(),this.node(t,{kind:je.INT,value:t.value});case zi.FLOAT:return this.advanceLexer(),this.node(t,{kind:je.FLOAT,value:t.value});case zi.STRING:case zi.BLOCK_STRING:return this.parseStringLiteral();case zi.NAME:switch(this.advanceLexer(),t.value){case"true":return this.node(t,{kind:je.BOOLEAN,value:!0});case"false":return this.node(t,{kind:je.BOOLEAN,value:!1});case"null":return this.node(t,{kind:je.NULL});default:return this.node(t,{kind:je.ENUM,value:t.value})}case zi.DOLLAR:if(e){if(this.expectToken(zi.DOLLAR),this._lexer.token.kind===zi.NAME){const e=this._lexer.token.value;throw Ui(this._lexer.source,t.start,`Unexpected variable "$${e}" in constant value.`)}throw this.unexpected(t)}return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){const e=this._lexer.token;return this.advanceLexer(),this.node(e,{kind:je.STRING,value:e.value,block:e.kind===zi.BLOCK_STRING})}parseList(e){return this.node(this._lexer.token,{kind:je.LIST,values:this.any(zi.BRACKET_L,(()=>this.parseValueLiteral(e)),zi.BRACKET_R)})}parseObject(e){return this.node(this._lexer.token,{kind:je.OBJECT,fields:this.any(zi.BRACE_L,(()=>this.parseObjectField(e)),zi.BRACE_R)})}parseObjectField(e){const t=this._lexer.token,r=this.parseName();return this.expectToken(zi.COLON),this.node(t,{kind:je.OBJECT_FIELD,name:r,value:this.parseValueLiteral(e)})}parseDirectives(e){const t=[];for(;this.peek(zi.AT);)t.push(this.parseDirective(e));return t}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(e){const t=this._lexer.token;return this.expectToken(zi.AT),this.node(t,{kind:je.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e)})}parseTypeReference(){const e=this._lexer.token;let t;if(this.expectOptionalToken(zi.BRACKET_L)){const r=this.parseTypeReference();this.expectToken(zi.BRACKET_R),t=this.node(e,{kind:je.LIST_TYPE,type:r})}else t=this.parseNamedType();return this.expectOptionalToken(zi.BANG)?this.node(e,{kind:je.NON_NULL_TYPE,type:t}):t}parseNamedType(){return this.node(this._lexer.token,{kind:je.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(zi.STRING)||this.peek(zi.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");const r=this.parseConstDirectives(),n=this.many(zi.BRACE_L,this.parseOperationTypeDefinition,zi.BRACE_R);return this.node(e,{kind:je.SCHEMA_DEFINITION,description:t,directives:r,operationTypes:n})}parseOperationTypeDefinition(){const e=this._lexer.token,t=this.parseOperationType();this.expectToken(zi.COLON);const r=this.parseNamedType();return this.node(e,{kind:je.OPERATION_TYPE_DEFINITION,operation:t,type:r})}parseScalarTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");const r=this.parseName(),n=this.parseConstDirectives();return this.node(e,{kind:je.SCALAR_TYPE_DEFINITION,description:t,name:r,directives:n})}parseObjectTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");const r=this.parseName(),n=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(e,{kind:je.OBJECT_TYPE_DEFINITION,description:t,name:r,interfaces:n,directives:i,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(zi.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(zi.BRACE_L,this.parseFieldDefinition,zi.BRACE_R)}parseFieldDefinition(){const e=this._lexer.token,t=this.parseDescription(),r=this.parseName(),n=this.parseArgumentDefs();this.expectToken(zi.COLON);const i=this.parseTypeReference(),o=this.parseConstDirectives();return this.node(e,{kind:je.FIELD_DEFINITION,description:t,name:r,arguments:n,type:i,directives:o})}parseArgumentDefs(){return this.optionalMany(zi.PAREN_L,this.parseInputValueDef,zi.PAREN_R)}parseInputValueDef(){const e=this._lexer.token,t=this.parseDescription(),r=this.parseName();this.expectToken(zi.COLON);const n=this.parseTypeReference();let i;this.expectOptionalToken(zi.EQUALS)&&(i=this.parseConstValueLiteral());const o=this.parseConstDirectives();return this.node(e,{kind:je.INPUT_VALUE_DEFINITION,description:t,name:r,type:n,defaultValue:i,directives:o})}parseInterfaceTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");const r=this.parseName(),n=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(e,{kind:je.INTERFACE_TYPE_DEFINITION,description:t,name:r,interfaces:n,directives:i,fields:o})}parseUnionTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");const r=this.parseName(),n=this.parseConstDirectives(),i=this.parseUnionMemberTypes();return this.node(e,{kind:je.UNION_TYPE_DEFINITION,description:t,name:r,directives:n,types:i})}parseUnionMemberTypes(){return this.expectOptionalToken(zi.EQUALS)?this.delimitedMany(zi.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");const r=this.parseName(),n=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();return this.node(e,{kind:je.ENUM_TYPE_DEFINITION,description:t,name:r,directives:n,values:i})}parseEnumValuesDefinition(){return this.optionalMany(zi.BRACE_L,this.parseEnumValueDefinition,zi.BRACE_R)}parseEnumValueDefinition(){const e=this._lexer.token,t=this.parseDescription(),r=this.parseEnumValueName(),n=this.parseConstDirectives();return this.node(e,{kind:je.ENUM_VALUE_DEFINITION,description:t,name:r,directives:n})}parseEnumValueName(){if("true"===this._lexer.token.value||"false"===this._lexer.token.value||"null"===this._lexer.token.value)throw Ui(this._lexer.source,this._lexer.token.start,`${po(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");const r=this.parseName(),n=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();return this.node(e,{kind:je.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:r,directives:n,fields:i})}parseInputFieldsDefinition(){return this.optionalMany(zi.BRACE_L,this.parseInputValueDef,zi.BRACE_R)}parseTypeSystemExtension(){const e=this._lexer.lookahead();if(e.kind===zi.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(e)}parseSchemaExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const t=this.parseConstDirectives(),r=this.optionalMany(zi.BRACE_L,this.parseOperationTypeDefinition,zi.BRACE_R);if(0===t.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:je.SCHEMA_EXTENSION,directives:t,operationTypes:r})}parseScalarTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const t=this.parseName(),r=this.parseConstDirectives();if(0===r.length)throw this.unexpected();return this.node(e,{kind:je.SCALAR_TYPE_EXTENSION,name:t,directives:r})}parseObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const t=this.parseName(),r=this.parseImplementsInterfaces(),n=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(0===r.length&&0===n.length&&0===i.length)throw this.unexpected();return this.node(e,{kind:je.OBJECT_TYPE_EXTENSION,name:t,interfaces:r,directives:n,fields:i})}parseInterfaceTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const t=this.parseName(),r=this.parseImplementsInterfaces(),n=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(0===r.length&&0===n.length&&0===i.length)throw this.unexpected();return this.node(e,{kind:je.INTERFACE_TYPE_EXTENSION,name:t,interfaces:r,directives:n,fields:i})}parseUnionTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const t=this.parseName(),r=this.parseConstDirectives(),n=this.parseUnionMemberTypes();if(0===r.length&&0===n.length)throw this.unexpected();return this.node(e,{kind:je.UNION_TYPE_EXTENSION,name:t,directives:r,types:n})}parseEnumTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const t=this.parseName(),r=this.parseConstDirectives(),n=this.parseEnumValuesDefinition();if(0===r.length&&0===n.length)throw this.unexpected();return this.node(e,{kind:je.ENUM_TYPE_EXTENSION,name:t,directives:r,values:n})}parseInputObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const t=this.parseName(),r=this.parseConstDirectives(),n=this.parseInputFieldsDefinition();if(0===r.length&&0===n.length)throw this.unexpected();return this.node(e,{kind:je.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:r,fields:n})}parseDirectiveDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(zi.AT);const r=this.parseName(),n=this.parseArgumentDefs(),i=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const o=this.parseDirectiveLocations();return this.node(e,{kind:je.DIRECTIVE_DEFINITION,description:t,name:r,arguments:n,repeatable:i,locations:o})}parseDirectiveLocations(){return this.delimitedMany(zi.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const e=this._lexer.token,t=this.parseName();if(Object.prototype.hasOwnProperty.call(Vi,t.value))return t;throw this.unexpected(e)}node(e,t){return!0!==this._options.noLocation&&(t.loc=new _e(e,this._lexer.lastToken,this._lexer.source)),t}peek(e){return this._lexer.token.kind===e}expectToken(e){const t=this._lexer.token;if(t.kind===e)return this.advanceLexer(),t;throw Ui(this._lexer.source,t.start,`Expected ${ho(e)}, found ${po(t)}.`)}expectOptionalToken(e){return this._lexer.token.kind===e&&(this.advanceLexer(),!0)}expectKeyword(e){const t=this._lexer.token;if(t.kind!==zi.NAME||t.value!==e)throw Ui(this._lexer.source,t.start,`Expected "${e}", found ${po(t)}.`);this.advanceLexer()}expectOptionalKeyword(e){const t=this._lexer.token;return t.kind===zi.NAME&&t.value===e&&(this.advanceLexer(),!0)}unexpected(e){const t=null!=e?e:this._lexer.token;return Ui(this._lexer.source,t.start,`Unexpected ${po(t)}.`)}any(e,t,r){this.expectToken(e);const n=[];for(;!this.expectOptionalToken(r);)n.push(t.call(this));return n}optionalMany(e,t,r){if(this.expectOptionalToken(e)){const e=[];do{e.push(t.call(this))}while(!this.expectOptionalToken(r));return e}return[]}many(e,t,r){this.expectToken(e);const n=[];do{n.push(t.call(this))}while(!this.expectOptionalToken(r));return n}delimitedMany(e,t){this.expectOptionalToken(e);const r=[];do{r.push(t.call(this))}while(this.expectOptionalToken(e));return r}advanceLexer(){const{maxTokens:e}=this._options,t=this._lexer.advance();if(void 0!==e&&t.kind!==zi.EOF&&(++this._tokenCounter,this._tokenCounter>e))throw Ui(this._lexer.source,t.start,`Document contains more that ${e} tokens. Parsing aborted.`)}}function po(e){const t=e.value;return ho(e.kind)+(null!=t?` "${t}"`:"")}function ho(e){return function(e){return e===zi.BANG||e===zi.DOLLAR||e===zi.AMP||e===zi.PAREN_L||e===zi.PAREN_R||e===zi.SPREAD||e===zi.COLON||e===zi.EQUALS||e===zi.AT||e===zi.BRACKET_L||e===zi.BRACKET_R||e===zi.BRACE_L||e===zi.PIPE||e===zi.BRACE_R}(e)?`"${e}"`:e}var yo=new Map,vo=new Map,mo=!0,bo=!1;function go(e){return e.replace(/[\s,]+/g," ").trim()}function _o(e){var t,r,i,o=go(e);if(!yo.has(o)){var a=function(e,t){return new fo(e,t).parseDocument()}(e,{experimentalFragmentVariables:bo,allowLegacyFragmentVariables:bo});if(!a||"Document"!==a.kind)throw new Error("Not a valid GraphQL document.");yo.set(o,function(e){var t=new Set(e.definitions);t.forEach((function(e){e.loc&&delete e.loc,Object.keys(e).forEach((function(r){var n=e[r];n&&"object"==typeof n&&t.add(n)}))}));var r=e.loc;return r&&(delete r.startToken,delete r.endToken),e}((t=a,r=new Set,i=[],t.definitions.forEach((function(e){if("FragmentDefinition"===e.kind){var t=e.name.value,n=go((a=e.loc).source.body.substring(a.start,a.end)),o=vo.get(t);o&&!o.has(n)?mo&&console.warn("Warning: fragment with name "+t+" already exists.\ngraphql-tag enforces all fragment names across your application to be unique; read more about\nthis in the docs: http://dev.apollodata.com/core/fragments.html#unique-names"):o||vo.set(t,o=new Set),o.add(n),r.has(n)||(r.add(n),i.push(e))}else i.push(e);var a})),(0,n.__assign)((0,n.__assign)({},t),{definitions:i}))))}return yo.get(o)}function wo(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];"string"==typeof e&&(e=[e]);var n=e[0];return t.forEach((function(t,r){t&&"Document"===t.kind?n+=t.loc.source.body:n+=t,n+=e[r+1]})),_o(n)}function Oo(){yo.clear(),vo.clear()}function So(){mo=!1}function Eo(){bo=!0}function To(){bo=!1}var jo,Po=wo,Io=Oo,xo=So,Ao=Eo,No=To;(jo=wo||(wo={})).gql=Po,jo.resetCaches=Io,jo.disableFragmentWarnings=xo,jo.enableExperimentalFragmentVariables=Ao,jo.disableExperimentalFragmentVariables=No,wo.default=wo,p(m?"log":"silent")},1143:e=>{"use strict";e.exports=JSON.parse('{"$id":"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON AnySchema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}')},1512:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var n={};(()=>{"use strict";var e=n;Object.defineProperty(e,"__esModule",{value:!0}),e.GraphQLClient=e.Squid=e.QueryBuilder=e.Changes=e.JoinQueryBuilder=e.DocumentReference=e.CollectionReference=void 0;var t=r(5660);Object.defineProperty(e,"CollectionReference",{enumerable:!0,get:function(){return t.CollectionReference}});var i=r(4516);Object.defineProperty(e,"DocumentReference",{enumerable:!0,get:function(){return i.DocumentReference}});var o=r(9732);Object.defineProperty(e,"JoinQueryBuilder",{enumerable:!0,get:function(){return o.JoinQueryBuilder}});var a=r(6891);Object.defineProperty(e,"Changes",{enumerable:!0,get:function(){return a.Changes}}),Object.defineProperty(e,"QueryBuilder",{enumerable:!0,get:function(){return a.QueryBuilder}});var s=r(5395);Object.defineProperty(e,"Squid",{enumerable:!0,get:function(){return s.Squid}});var u=r(5857);Object.defineProperty(e,"GraphQLClient",{enumerable:!0,get:function(){return u.GraphQLClient}})})();var i=exports;for(var o in n)i[o]=n[o];n.__esModule&&Object.defineProperty(i,"__esModule",{value:!0})})();
|
|
12
|
+
`})).data}}},7718:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MutationSender=void 0;const n=r(575);t.MutationSender=class{constructor(e,t,r,n){this.clientId=e,this.rpcManager=t,this.lockManager=r,this.querySubscriptionManager=n}async sendMutations(e,t){const r=(0,n.reduceMutations)(e),i=r.map((e=>`sendMutation_${(0,n.getSquidDocId)(e.squidDocIdObj)}`));await this.lockManager.lock(...i),await this.querySubscriptionManager.waitForAllQueriesToFinish();try{const e={clientId:this.clientId,mutations:r,integrationId:t};return await this.rpcManager.post("mutation/mutate",e)}finally{this.lockManager.release(...i)}}}},9194:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NamedQueryManager=void 0;const n=r(575),i=r(2937),o=r(9978);t.NamedQueryManager=class{constructor(e,t,r){this.clientId=e,this.rpcManager=t,this.socketManager=r,this.ongoingNamedQueryExecutions={},r.observeNotifications().pipe((0,i.filter)((e=>"namedQuery"===e.type)),(0,o.map)((e=>e))).subscribe((e=>{this.handleNamedQueryResponse(e.clientRequestId,e.payload)}))}executeNamedQueryAndSubscribe(e,t,r){const o=(0,n.generateId)(),s=new i.Subject;this.ongoingNamedQueryExecutions[o]=s;const a={integrationId:e,queryName:t,paramsRecordStr:(0,n.serializeObj)(r),clientId:this.clientId,clientRequestId:o};return this.rpcManager.post("named-query/execute",a).catch((r=>{console.error("Got error while executing named query",t,"for integration",e,r),s.error(r),s.complete()})),s.pipe((0,i.finalize)((()=>{delete this.ongoingNamedQueryExecutions[o]})),(0,i.share)())}handleNamedQueryResponse(e,t){const r=this.ongoingNamedQueryExecutions[e];if(!r)return;const i=(0,n.deserializeObj)(t);i.success?r.next(i.result):(r.error(new Error(i.result)),r.complete())}}},9732:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JoinQueryBuilder=t.JoinQueryBuilderFactory=void 0;const n=r(9312),i=r(575),o=n.__importStar(r(8784)),s=r(2937),a=r(9978);t.JoinQueryBuilderFactory=class{constructor(e,t,r){this.querySubscriptionManager=e,this.documentReferenceFactory=t,this.queryBuilderFactory=r}getForJoin(e,t,r){return new u(e,t,this.querySubscriptionManager,this.documentReferenceFactory,r,this,this.queryBuilderFactory)}};class u{constructor(e,t,r,n,o,s,a){this.collectionName=e,this.integrationId=t,this.querySubscriptionManager=r,this.documentReferenceFactory=n,this.alias=o,this.joinQueryBuilderFactory=s,this.queryBuilderFactory=a,this.joins={},this.joinConditions={},this.simpleQueryBuilder=new i.SimpleQueryBuilder(e,t)}where(e,t,r){return this.simpleQueryBuilder.where(e,t,r),this}limit(e){return this.simpleQueryBuilder.limit(e),this}sortBy(e,t=!0){return this.simpleQueryBuilder.sortBy(e,t),this}join(e,t,r){const n={leftFieldName:t,rightFieldName:r,leftAlias:this.alias};this.joins[e.alias]=e.build(),Object.entries(e.joins).forEach((([e,t])=>{this.joins[e]=t}));for(const[t,r]of Object.entries(e.joinConditions))this.joinConditions[t]=r;return this.joinConditions[e.alias]=n,this}snapshot(){return(0,s.firstValueFrom)(this.snapshots(!1))}snapshots(e=!0){return this.querySubscriptionManager.processQuery(this.build(),this.alias,o.cloneDeep(this.joins),o.cloneDeep(this.joinConditions),e).pipe((0,a.map)((e=>e.map((e=>{const t={};for(const[r,n]of Object.entries(e)){const e=r===this.alias?this.collectionName:this.joins[r].collectionName,o=r===this.alias?this.integrationId:this.joins[r].integrationId,s=n?(0,i.getSquidDocId)(n.__docId__,e,o):void 0;t[r]=s?this.documentReferenceFactory.create(s,this.queryBuilderFactory):void 0}return t})))))}build(){return this.simpleQueryBuilder.build()}}t.JoinQueryBuilder=u},6891:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Changes=t.QueryBuilder=t.QueryBuilderFactory=void 0;const n=r(575),i=r(2937),o=r(9978);t.QueryBuilderFactory=class{constructor(e,t,r){this.querySubscriptionManager=e,this.documentReferenceFactory=t,this.documentIdentityService=r}getForDocument(e){const{collectionName:t,integrationId:r,docId:i}=(0,n.parseSquidDocId)(e),o=(0,n.deserializeObj)(i),s=this.get(t,r);return Object.entries(o).forEach((([e,t])=>{s.where(e,"==",t)})),s}get(e,t){return new s(e,t,this.querySubscriptionManager,this.documentReferenceFactory,this,this.documentIdentityService)}};class s extends n.SimpleQueryBuilder{constructor(e,t,r,n,i,o){super(e,t),this.querySubscriptionManager=r,this.documentReferenceFactory=n,this.queryBuilderFactory=i,this.documentIdentityService=o}getSortOrder(){return this.query.sortOrder}snapshot(){return(0,i.firstValueFrom)(this.snapshots(!1))}snapshots(e=!0){return this.querySubscriptionManager.processQuery(this.build(),this.collectionName,{},{},e).pipe((0,o.map)((e=>e.map((e=>{(0,n.assertTruthy)(1===Object.keys(e).length);const t=e[this.collectionName],r=(0,n.getSquidDocId)((0,n.truthy)(t).__docId__,this.collectionName,this.integrationId);return this.documentReferenceFactory.create(r,this.queryBuilderFactory)})))))}changes(){let e,t=new Set;return this.snapshots().pipe((0,i.combineLatestWith)(this.documentIdentityService.observeChanges().pipe((0,i.switchMap)((t=>(Object.entries(t).forEach((([t,r])=>{(0,n.replaceKeyInRecord)(e||{},t,r)})),i.NEVER))),(0,i.startWith)({}))),(0,o.map)((([r])=>{let n=[];const i=[],o=[];if(e){for(const o of r){const r=o.squidDocId,s=o.data;if(t.has(s))delete e[r],t.delete(s);else if(e[r]){i.push(o);const n=e[r];delete e[r],t.delete(n)}else n.push(o)}for(const e of t)o.push(e)}else n=r;e={},t=new Set;for(const n of r){const r=n.data;e[n.squidDocId]=r,t.add(r)}return new a(n,i,o)})))}get hash(){return(0,n.encodeValueForMapping)(this.build())}}t.QueryBuilder=s;class a{constructor(e,t,r){this.inserts=e,this.updates=t,this.deletes=r}}t.Changes=a},4661:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuerySubscriptionManager=void 0;const n=r(9312),i=r(575),o=n.__importStar(r(8784)),s=r(2937),a=r(9978),u=r(1122),c="client";t.QuerySubscriptionManager=class{constructor(e,t,r,n,i){this.rpcManager=e,this.clientId=t,this.documentStore=r,this.destructManager=n,this.documentIdentityService=i,this.safeToSendQueriesToServer=new s.BehaviorSubject(!0),this.onOrphanDocuments=new s.Subject,this.ongoingQueries=new Map,this.inflightQueriesCount=new s.BehaviorSubject(0),this.clientRequestIdToLocalDocuments=new Map,this.localDocumentToClientRequestIds=new Map,this.queryMappingManager=new l,this.documentIdentityService.observeChanges().subscribe(this.migrateDocIds.bind(this)),this.destructManager.onPreDestruct((()=>{this.predestruct()}))}hasOngoingQuery(e){return this.ongoingQueries.has(e)}getQuery(e){return(0,i.truthy)(this.ongoingQueries.get(e)).query}setGotResponseFromServer(e){(0,i.truthy)(this.ongoingQueries.get(e)).gotResponseFromServer=!0}findQueriesForDocument(e,t){const{collectionName:r,integrationId:n}=(0,i.parseSquidDocId)(t),o=this.queryMappingManager.getMapping(c,r,n);return o?(0,i.findQueriesForDocumentSync)(o,e):[]}setClientRequestIdsForLocalDoc(e,t){const r=this.localDocumentToClientRequestIds.get(e)||new Set,n=new Set(t?this.findQueriesForDocument(t,e).map((e=>(0,i.parseQuerySubscriptionId)(e).clientRequestId)):[]),o=new Set([...r,...n]);for(const t of[...r]){if(n.has(t))continue;r.delete(t);const i=this.clientRequestIdToLocalDocuments.get(t);i&&(i.delete(e),i.size||this.clientRequestIdToLocalDocuments.delete(t)),r.size||this.localDocumentToClientRequestIds.delete(e)}for(const t of n){let r=this.localDocumentToClientRequestIds.get(e);r||(r=new Set,this.localDocumentToClientRequestIds.set(e,r)),r.add(t);let n=this.clientRequestIdToLocalDocuments.get(t);n||(n=new Set,this.clientRequestIdToLocalDocuments.set(t,n)),n.add(e)}return[...o]}errorOutAllQueries(e,t){const r=this.localDocumentToClientRequestIds.get(e)||new Set;for(const e of r){const r=this.ongoingQueries.get(e);r&&r.subject.error(t)}}notifyAllSubscriptions(e){const t=new Set;for(const r of e){const e=this.ongoingQueries.get(r);if(!e)continue;if(!e.gotResponseFromServer||!e.activated)continue;const n=this.clientRequestIdToLocalDocuments.get(r),o=this.documentStore.sortAndLimitDocs(n,e.query);let s=!1;for(const t of e.supportedQueries)s=s||this.updateOngoingQueryWithNewDataFromSupportingQuery(o,t);let a=e;for(;!a.allObservables;)a=(0,i.truthy)(null==a?void 0:a.supportingOngoingQuery);s&&t.add(a),e.subject.next(o)}for(const e of t){const t=this.collectAllObservables(e);(0,i.truthy)(e.allObservables).next(t)}}processQuery(e,t,r,n,i){return(0,s.defer)((()=>{const u=this.createOngoingQueryGraph(e,t,r,n,i,!0);this.sendQueryToServer(u),u.allObservables=new s.ReplaySubject(1);const c=u.allObservables.pipe((0,s.switchMap)((e=>(0,s.combineLatest)(e).pipe((0,a.map)((e=>this.joinResults(e,n,u)))))),(0,a.filter)((()=>this.allOngoingQueriesGotServerResult(u))),(0,s.startWith)(void 0),(0,s.pairwise)(),(0,a.filter)((([e,t])=>!o.isEqual(e,t))),(0,a.map)((([e,t])=>t)),i?(0,s.tap)():(0,s.take)(1),(0,s.finalize)((()=>{var e;u.subject.complete(),this.completeAllSupportedQueries(u),null===(e=u.allObservables)||void 0===e||e.complete()}))),l=this.collectAllObservables(u);return u.allObservables.next(l),c})).pipe((0,s.share)())}hasOngoingQueryForDocId(e){const t=this.localDocumentToClientRequestIds.get(e);return!!t&&!!t.size}removeClientRequestId(e){const t=this.clientRequestIdToLocalDocuments.get(e);if(!t)return;this.clientRequestIdToLocalDocuments.delete(e);const r=[];for(const n of t){const t=(0,i.truthy)(this.localDocumentToClientRequestIds.get(n));t.delete(e),t.size||(this.localDocumentToClientRequestIds.delete(n),r.push(n))}r.length&&this.onOrphanDocuments.next(r),this.ongoingQueries.delete(e)}async waitForAllQueriesToFinish(){return(0,s.firstValueFrom)(this.inflightQueriesCount.pipe((0,a.filter)((e=>0===e)))).then((()=>{}))}registerQueryFinalizer(e){const t=e.clientRequestId,r=(0,i.getQuerySubscriptionId)(this.clientId,t);e.subject.pipe((0,s.finalize)((()=>{if(this.queryMappingManager.removeQuery(t,r).then(),this.ongoingQueries.delete(t),e.subscribe&&!e.isEmptyForJoin&&e.activated){const r={clientId:this.clientId,clientRequestId:t};this.rpcManager.post("query/unsubscribe",r).catch((t=>{console.error("Got error while unsubscribing from query",e.query,t)}))}this.removeClientRequestId(t)}))).subscribe({error:()=>{}})}createOngoingQueryGraph(e,t,r,n,o,a,u={}){if(u[t])return u[t];const c=(0,i.generateId)(),l=[],f={clientRequestId:c,activated:a,alias:t,query:e,subscribe:o,subject:new s.ReplaySubject(1),supportedQueries:l,supportingOngoingQuery:void 0,joinCondition:void 0,gotResponseFromServer:!1,isEmptyForJoin:!1};this.registerQueryFinalizer(f),this.ongoingQueries.set(c,f),u[t]=f;for(const[e,i]of Object.entries(n)){const s=i.leftAlias;if(s!==t&&e!==t)continue;const a=s===t?e:s;if(s===t){const e=this.createOngoingQueryGraph(r[a],a,r,n,o,!1,u);e.joinCondition=i,l.push(e)}else f.supportingOngoingQuery=this.createOngoingQueryGraph(r[a],a,r,n,o,!1,u)}return f}collectAllObservables(e,t=[]){if(e.isEmptyForJoin)return t;const r=e.alias;t.push(e.subject.pipe((0,a.map)((e=>({docs:e,alias:r})))));for(const r of e.supportedQueries)this.collectAllObservables(r,t);return t}joinResults(e,t,r){const n=[],i=e.reduce(((e,t)=>(e[t.alias]?e[t.alias].push(...t.docs):e[t.alias]=[...t.docs],e)),{});i[r.alias].forEach((e=>{n.push({[r.alias]:e})}));const o=this.getOngoingQueriesBfs(r),s=new Set;for(let e=1;e<o.length;e++){const r=o[e].alias;s.has(r)||(s.add(r),this.join(n,r,i[r],t))}return n}join(e,t,r,n){var o;if(!e.length)return;const s=Object.keys(e[0]),a=n[t];if(!a||!s.includes(a.leftAlias))return;const u=new Map;(r||[]).forEach((e=>{const t=e[a.rightFieldName];u.has(t)||u.set(t,[]),(0,i.truthy)(u.get(t)).push(e)}));for(const r of[...e]){const n=u.get(null===(o=r[a.leftAlias])||void 0===o?void 0:o[a.leftFieldName])||[];if(n.length)for(const i of n)r[t]?e.push(Object.assign(Object.assign({},r),{[t]:i})):r[t]=i;else r[t]||(r[t]=void 0)}}getOngoingQueriesBfs(e){const t=[],r=[e];for(;r.length;){const e=(0,i.truthy)(r.shift());e.isEmptyForJoin||(t.push(e),r.push(...e.supportedQueries))}return t}updateOngoingQueryWithNewDataFromSupportingQuery(e,t){var r;const n=(0,i.truthy)(t.joinCondition),a=t.query;if(t.activated){const u=(0,i.truthy)(null===(r=t.supportingOngoingQuery)||void 0===r?void 0:r.supportedQueries).filter((e=>e.alias===t.alias)),c=new Set(e.map((e=>{var t;return null!==(t=e[n.leftFieldName])&&void 0!==t?t:null})));for(const e of u)e.query.conditions.filter((e=>e.fieldName===n.rightFieldName)).forEach((e=>{c.delete(e.value)}));if(0===c.size)return!1;const l=o.cloneDeep(a);l.conditions=l.conditions.filter((e=>e.fieldName!==n.rightFieldName)),[...c].forEach((e=>{l.conditions.push({fieldName:n.rightFieldName,operator:"==",value:e})}));const f=Object.assign(Object.assign({},t),{query:l,activated:!0,gotResponseFromServer:!1,subject:new s.ReplaySubject(1),clientRequestId:(0,i.generateId)(),isEmptyForJoin:!1});return this.registerQueryFinalizer(f),this.ongoingQueries.set(f.clientRequestId,f),(0,i.truthy)(t.supportingOngoingQuery).supportedQueries.push(f),this.sendQueryToServer(f),!0}{const r=e.map((e=>{var t;return{fieldName:n.rightFieldName,operator:"==",value:null!==(t=e[n.leftFieldName])&&void 0!==t?t:null}}));return t.activated=!0,r.length?(a.conditions.push(...r),this.sendQueryToServer(t)):t.isEmptyForJoin=!0,!0}}allOngoingQueriesGotServerResult(e){return!!e.isEmptyForJoin||!!e.gotResponseFromServer&&(!e.supportedQueries.length||e.supportedQueries.every((e=>this.allOngoingQueriesGotServerResult(e))))}completeAllSupportedQueries(e){const t=[...e.supportedQueries||[]];for(;t.length;){const e=(0,i.truthy)(t.shift());t.push(...e.supportedQueries||[]),e.subject.complete()}}predestruct(){this.safeToSendQueriesToServer.next(!1),this.safeToSendQueriesToServer.complete(),this.unsubscribe()}unsubscribe(){var e;const t=[...this.ongoingQueries.values()];for(const r of t)r.subject.complete(),null===(e=r.allObservables)||void 0===e||e.complete()}hasSubscription(e){var t;return!!(null===(t=this.ongoingQueries.get(e))||void 0===t?void 0:t.subscribe)}sendQueryToServer(e){const t=e.query,r=e.clientRequestId,n={query:t,clientRequestId:r,subscribe:e.subscribe,clientId:this.clientId},o=(0,i.getQuerySubscriptionId)(this.clientId,r);this.queryMappingManager.addQuery(c,t,o).then(),this.ongoingQueries.set(r,e),this.safeToSendQueriesToServer.pipe((0,a.filter)(Boolean),(0,s.take)(1)).subscribe((()=>{e.subject.closed||(this.inflightQueriesCount.next(this.inflightQueriesCount.value+1),this.rpcManager.post("query/query",n).catch((t=>{e.subject.error(t)})).finally((()=>{this.inflightQueriesCount.next(this.inflightQueriesCount.value-1)})))}))}migrateDocIds(e){const t=Object.keys(e);for(const r of this.clientRequestIdToLocalDocuments.values())t.forEach((t=>{r.has(t)&&(r.delete(t),r.add(e[t]))}));t.forEach((t=>{(0,i.replaceKeyInMap)(this.localDocumentToClientRequestIds,t,e[t])}))}};class l extends i.SimpleQueryMappingManager{constructor(){super(...arguments),this.stateService=new u.StateService,this.querySubscriptionIdToQuery={}}async addQuery(e,t,r){this.stateService.runInBatch((()=>{let e=0;const n=new Set;for(const o of t.conditions){const s=this.getConditionStatePath(t,o),a=[...this.stateService.getStateInPath(s)||[]];if((0,i.insertSorted)(a,r),["==","!="].includes(o.operator)){const t=(0,i.encodeValueForMapping)(o.fieldName);n.has(t)||(e++,n.add(t))}else e++;this.stateService.setInPath(s,a)}if(!t.conditions.length){const e=["queryMapping",t.collectionName,t.integrationId,"mapping","unconditional"],n=[...this.stateService.getStateInPath(e)||[]];(0,i.insertSorted)(n,r),this.stateService.setInPath(e,n)}this.stateService.setInPath([...this.getQueryMetadataStatePath(t,r),"condCount"],e)})),this.querySubscriptionIdToQuery[r]=t}async removeQuery(e,t){const r=this.querySubscriptionIdToQuery[t];if(r)return this.stateService.runInBatch((()=>{for(const e of r.conditions){const n=this.getConditionStatePath(r,e),o=[...this.stateService.getStateInPath(n)||[]];(0,i.removeSorted)(o,t),o.length?this.stateService.setInPath(n,o):this.stateService.deletePath(n)}if(!r.conditions.length){const e=["queryMapping",r.collectionName,r.integrationId,"mapping","unconditional"],n=[...this.stateService.getStateInPath(e)||[]];(0,i.removeSorted)(n,t),this.stateService.setInPath(e,n)}this.stateService.deletePath(this.getQueryMetadataStatePath(r,t))})),r}getMapping(e,t,r){return this.stateService.getStateInPath(["queryMapping",t,r,"mapping"])}getQueryMetadataStatePath(e,t){return["queryMapping",e.collectionName,e.integrationId,"mapping","queriesMetadata",`${t}`]}getConditionStatePath(e,t){const r=(0,i.encodeValueForMapping)(t.fieldName),n=(0,i.encodeValueForMapping)(t.value);return["queryMapping",e.collectionName,e.integrationId,"mapping","conditional",`${r}`,`${t.operator}`,`${n}`]}}},602:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RpcError=t.RpcManager=void 0;const n=r(9312),i=r(575),o=n.__importDefault(r(9031)),s=r(2937);t.RpcManager=class{constructor(e,t,r,n={},o){this.rpcEndpoint=e,this.socketManager=t,this.destructManager=r,this.headers=n,this.authManager=o,this.staticHeaders={},this.onGoingRpcCounter=new s.BehaviorSubject(0),(0,i.assertTruthy)(e,"Http endpoint must be provided.");for(const[e,t]of Object.entries(n))this.setStaticHeader(e,t);const a=this.authManager.getApiKey();a&&this.setStaticHeader("Authorization",`ApiKey ${a}`),this.rpcEndpoint.endsWith("/")||(this.rpcEndpoint+="/"),this.authManager.observeAuthIdToken().subscribe((e=>{e?this.setStaticHeader("Authorization",`Bearer ${e}`):this.deleteStaticHeader("Authorization")})),r.onDestruct((async()=>{await this.awaitAllSettled()}))}async awaitAllSettled(){await(0,s.firstValueFrom)(this.onGoingRpcCounter.pipe((0,s.filter)((e=>0===e))))}setStaticHeader(e,t){this.staticHeaders[e]=t}deleteStaticHeader(e){delete this.staticHeaders[e]}getEndpoint(){return this.rpcEndpoint}getStaticHeaders(){return this.staticHeaders}async post(e,t){this.onGoingRpcCounter.next(this.onGoingRpcCounter.value+1);try{await(0,s.firstValueFrom)((0,s.race)(this.socketManager.observeConnectionReady().pipe((0,s.filter)(Boolean)),this.destructManager.isDestructingObservable)),await this.authManager.waitForReadyState();let r={"Content-Type":"application/json"};Object.keys(this.staticHeaders)&&(r=Object.assign(Object.assign({},r),this.staticHeaders));const n=await(0,o.default)(`${this.rpcEndpoint}${e}`,{method:"POST",body:(0,i.serializeObj)(t),headers:r});let u;try{u=await n.text()}catch(e){u="Cannot read body"}if(!n.ok)throw new a(n.status,n.statusText,n.headers,n.url,u);try{return JSON.parse(u)}catch(e){return u}}finally{this.onGoingRpcCounter.next(this.onGoingRpcCounter.value-1)}}};class a extends Error{constructor(e,t,r,n,i){super(`RPC error ${e} ${t} calling ${n}: ${i}`),this.statusCode=e,this.statusText=t,this.headers=r,this.url=n,this.body=i}}t.RpcError=a},3474:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SocketManager=void 0;const n=r(575),i=r(2937),o=r(8087),s=r(266);t.SocketManager=class{constructor(e,t,r=s.NOOP_FN,n,o={},a){this.clientId=e,this.socketIoEndpoint=t,this.messageNotificationWrapper=r,this.destructManager=n,this.authManager=a,this.webSocketObserver=new i.Subject,this.allMessagesObserver=new i.Subject,this.connectionReady=new i.BehaviorSubject(!1),this.seenMessageIds=new Set,this.firstConnection=!0,this.destructManager.onDestruct((async()=>{await this.destruct()})),this.setupMessageAcknowledgments(),this.connect(Object.assign({},o))}observeNotifications(){return this.webSocketObserver.asObservable()}observeConnectionReady(){return this.connectionReady.asObservable().pipe((0,i.distinctUntilChanged)())}sendMessage(e){this.authManager.waitForReadyState().then((()=>{(0,i.firstValueFrom)(this.connectionReady.pipe((0,i.filter)(Boolean))).then((()=>{const t=this.authManager.getAuthToken();(0,n.truthy)(this.socket).emit("message",Object.assign(Object.assign({},e),{authToken:t}))}))}))}connect(e){this.socket=(0,o.io)(this.socketIoEndpoint,{query:{clientId:this.clientId},reconnectionDelay:5e3,transports:["websocket"],extraHeaders:e}),this.socket.on("connect",(()=>{})),this.socket.on("disconnect",((e,t)=>{this.connectionReady.next(!1)})),this.socket.on("connectionReady",(()=>{this.connectionReady.next(!0),this.firstConnection||this.sendMessage({type:"catchup"}),this.firstConnection=!1})),this.socket.on("connect_error",(e=>{console.error("An error occurred while connecting to the socket with url: ",this.socketIoEndpoint,e)})),this.socket.on("message",(e=>{const t=(0,n.deserializeObj)(e);for(const e of t)this.allMessagesObserver.next(e),this.seenMessageIds.has(e.messageId)||(this.seenMessageIds.add(e.messageId),this.messageNotificationWrapper((()=>{this.webSocketObserver.next(e)})))}))}setupMessageAcknowledgments(){const e=new i.Subject;this.allMessagesObserver.subscribe((t=>{(null==t?void 0:t.messageId)&&e.next(t.messageId)}));const t=[];e.pipe((0,i.tap)((e=>t.push(e))),(0,i.debounceTime)(100)).subscribe((async()=>{const e=[...t.splice(0)];this.sendMessage({type:"acknowledge",payload:e})}))}async destruct(){var e;this.sendMessage({type:"kill"}),this.connectionReady.next(!1),await(0,i.firstValueFrom)((0,i.timer)(0)),null===(e=this.socket)||void 0===e||e.disconnect(),this.webSocketObserver.complete(),this.allMessagesObserver.complete()}}},5395:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Squid=void 0;const n=r(9312),i=r(575),o=r(2937),s=r(4268),a=r(8862),u=r(1600),c=r(4967),l=r(7787),f=n.__importDefault(r(2256)),p=r(2417),d=r(5182),h=r(5621),y=r(7718),v=r(9194),m=r(9732),b=r(6891),g=r(4661),_=r(602),w=r(3474),O=r(4605),S=r(9526);class E{constructor(e){this.destructManager=new l.DestructManager,this.setAuthIdToken=e=>{this.authManager.setAuthIdToken(e)},this.collection=(e,t=i.IntegrationType.built_in_db)=>(this.validateNotDestructed(),this.collectionReferenceFactory.get(e,t)),this.runInTransaction=e=>(this.validateNotDestructed(),this.dataManager.runInTransaction(e)),this.executeFunction=(e,...t)=>(this.validateNotDestructed(),(0,o.firstValueFrom)(this.backendFunctionManager.executeFunctionAndSubscribe(e,...t))),this.executeNamedQuery=(e,t,r)=>(this.validateNotDestructed(),(0,o.firstValueFrom)(this.namedQueryManager.executeNamedQueryAndSubscribe(e,t,r))),this.callApi=(e,t,r={})=>(this.validateNotDestructed(),(0,o.firstValueFrom)(this.apiManager.callApiAndSubscribe(e,t,r))),this.graphql=e=>(this.validateNotDestructed(),this.graphqlClientFactory.get(e)),this.acquireLock=(e,t=!0)=>(this.validateNotDestructed(),this.distributedLockManager.lock(e,t)),this.destruct=async()=>{if(!this.destructManager.isDestructing)return this.destructManager.destruct().finally((()=>{const e=Object.entries(E.squidInstancesMap).find((([,e])=>e===this));e&&delete E.squidInstancesMap[e[0]]}))},this.unsubscribe=async()=>{this.querySubscriptionManager.unsubscribe(),await this.rpcManager.awaitAllSettled()},(0,i.assertTruthy)(e.appId,"APP_ID_MUST_BE_PROVIDED");const t=(0,i.getApplicationUrl)(e.region,e.appId),r=(0,i.getApplicationHttpHeaders)(e.region,e.appId);this.clientId=(0,i.generateId)(),this.authManager=new S.AuthManager(this.destructManager,e.apiKey),this.socketManager=new w.SocketManager(this.clientId,t,e.messageNotificationWrapper,this.destructManager,r,this.authManager),this.rpcManager=new _.RpcManager(t,this.socketManager,this.destructManager,r,this.authManager),this.documentStore=new d.DocumentStore,this.lockManager=new i.LockManager,this.distributedLockManager=new O.DistributedLockManager(this.socketManager,this.clientId,this.destructManager),this.documentIdentityService=new f.default(this.documentStore,this.destructManager),this.documentReferenceFactory=new p.DocumentReferenceFactory,this.querySubscriptionManager=new g.QuerySubscriptionManager(this.rpcManager,this.clientId,this.documentStore,this.destructManager,this.documentIdentityService);const n=new y.MutationSender(this.clientId,this.rpcManager,this.lockManager,this.querySubscriptionManager);this.queryBuilderFactory=new b.QueryBuilderFactory(this.querySubscriptionManager,this.documentReferenceFactory,this.documentIdentityService),this.joinQueryBuilderFactory=new m.JoinQueryBuilderFactory(this.querySubscriptionManager,this.documentReferenceFactory,this.queryBuilderFactory),this.collectionReferenceFactory=new u.CollectionReferenceFactory(this.documentReferenceFactory,this.queryBuilderFactory,this.joinQueryBuilderFactory,this.documentIdentityService),this.dataManager=new c.DataManager(this.documentStore,n,this.socketManager,this.querySubscriptionManager,this.queryBuilderFactory,this.lockManager,this.destructManager,this.documentIdentityService),this.documentReferenceFactory.setDataManager(this.dataManager),this.backendFunctionManager=new a.BackendFunctionManager(this.clientId,this.rpcManager,this.socketManager),this.namedQueryManager=new v.NamedQueryManager(this.clientId,this.rpcManager,this.socketManager),this.apiManager=new s.ApiManager(this.clientId,this.rpcManager,this.socketManager,e.apiServerUrlOverrideMapping),this.graphqlClientFactory=new h.GraphQLClientFactory(this.rpcManager)}static getInstance(e){const t=(0,i.normalizeJsonAsString)(e);let r=E.squidInstancesMap[t];return r||(r=new E(e),E.squidInstancesMap[t]=r,r)}static getInstances(){return Object.values(E.squidInstancesMap)}validateNotDestructed(){(0,i.assertTruthy)(!this.destructManager.isDestructing,"The client was already destructed.")}}t.Squid=E,E.squidInstancesMap={}},1064:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isStateObject=t.apply=void 0;const n=r(1496);function i(e){return"object"==typeof e}function o(e,t){let r=e;if((0,n.isPathAction)(t))r=function(e,t,r=[]){switch(t.type){case n.ActionType.DELETE_PATH:return s(e,t.path);case n.ActionType.SET_PATH:const i=t;return function(e,t,r,n){return a(e,t,r,n)}(e,t.path,r,i.payload);case n.ActionType.BATCH_ACTION:throw new Error("Unsupported")}}(e,t,[]);else{if(!(0,n.isBatchAction)(t))throw new Error(`Invalid action type: ${t.type}`);r=t.payload.reduce(((e,t)=>o(e,t)),e)}return r}function s(e,t){if(!t.length)throw new Error("can not delete an empty path");const r=t[0];if(1===t.length)return function(e,t){if(e instanceof Array)throw new Error("Cannot remove an item from an array");const r=Object.assign({},e);return delete r[t],r}(e,r);const n=t.slice(1),o=c(e,r);if(!o)return e;if(!i(o))throw new Error("Cannot delete from a non object state.");const a=s(o,n);return a===o?e:u(e,r,a)}function a(e,t,r,n){if(!t.length){if(i(n))return n;throw new Error("Relative path cannot be of length 0 when the new value is not an object.")}const o=t[0],s=[...r,o];if(1===t.length)return u(e,o,n);const l=t.slice(1),f=c(e,o);return void 0!==f&&i(f)?u(e,o,a(f,l,s,n)):a(e=u(e,o,{}),t,r,n)}function u(e,t,r){return(e=Object.assign({},e))[t]=r,e}function c(e,t){return e instanceof Array?e[function(e){const t=Number(e);if(isNaN(t))throw new Error(`The value is not a number: Actual: ${e}`);return Math.floor(t)}(t)]:e[t]}t.apply=function(e,t){return o(e,t)},t.isStateObject=i},1496:(e,t)=>{"use strict";var r;function n(e){return[r.SET_PATH,r.DELETE_PATH].includes(e.type)}function i(e){return e.type===r.BATCH_ACTION}Object.defineProperty(t,"__esModule",{value:!0}),t.getSingleAction=t.extractAllPathActions=t.isBatchAction=t.isDeletePathAction=t.isSetPathAction=t.isPathAction=t.ActionType=void 0,function(e){e.DELETE_PATH="DELETE_PATH",e.SET_PATH="SET_PATH",e.BATCH_ACTION="BATCH_ACTION"}(r=t.ActionType||(t.ActionType={})),t.isPathAction=n,t.isSetPathAction=function(e){return e.type===r.SET_PATH},t.isDeletePathAction=function(e){return e.type===r.DELETE_PATH},t.isBatchAction=i,t.extractAllPathActions=function e(t){const r=[];if(n(t))r.push(t);else if(i(t))for(const n of t.payload)r.push(...e(n));return r},t.getSingleAction=function(e){return 1===e.length?e[0]:{type:r.BATCH_ACTION,payload:e}}},8336:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPathTrieFromAction=t.PathTrieNode=t.PathTrie=void 0;const n=r(1496);class i{constructor(){this.root=new o}getOrCreatePathTrieNode(e,t){let r=this.root;for(const t of e)r.children.get(t)||r.children.set(t,new o),r=r.children.get(t);return void 0!==t&&(r.nodeData=t),r}getPathTrieNode(e){let t=this.root;for(const r of e){if(!t)return;t=t.children.get(r)}return t}getPathTrie(e){let t=this.root;for(const r of e){if(!t)return;t=t.children.get(r)}if(t){const e=new i;return e.root=t,e}}iterateBfs(e){this.iterateInternal(this.root,e,[])}removeNode(e){e.length||(this.root=new o);const t=[this.root];for(const r of e){const e=t[t.length-1].children.get(r);if(!e)throw new Error("Node does not exist");t.push(e)}for(let r=t.length-1;r>0;r--){const n=t[r],i=e[r-1];if((n.nodeData||n.children.size)&&r!==t.length-1)break;t[r-1].children.delete(i)}}clearNodeData(e){const t=this.getPathTrieNode(e);t&&(t.nodeData=void 0,t.children.size||this.removeNode(e))}getNodeList(e){const t=[];let r=this.root;for(const n of e){if(!r)return t;t.push(r),r=r.children.get(n)}return t}iterateInternal(e,t,r){if(!1!==t(e.nodeData,r))for(const[n,i]of e.children)this.iterateInternal(i,t,r.concat(n))}}t.PathTrie=i;class o{constructor(){this.children=new Map([])}}t.PathTrieNode=o,t.getPathTrieFromAction=function(e,t){const r=new i;for(const i of(0,n.extractAllPathActions)(e)){let e=r.getOrCreatePathTrieNode(i.path);if(!t||e.nodeData)continue;let n=t.getPathTrieNode(i.path);if(n){const t=[[e,n]];for(;t.length;){const r=t.shift();if(e=r[0],n=r[1],!e.nodeData){for(const[r,i]of n.children)e.children.get(r)||e.children.set(r,new o),t.push([e.children.get(r),i]);e.nodeData=!0}}}}return r}},1122:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StateService=void 0;const n=r(2937),i=r(9978),o=r(1064),s=r(1496),a=r(8336);function u(e,t){let r=e;for(const e of t){if(null==r)return;if(!(0,o.isStateObject)(r))throw new Error("result must be a state object");r=r[e]}return r}t.StateService=class{constructor(){this.subscriptionsTree=new a.PathTrie,this.state={},this.batchCount=0,this.batchedActions=[]}dispatch(e){this.batchCount>0&&this.batchedActions.push(e),this.state=(0,o.apply)(this.state,e),0===this.batchCount&&this.dispatchSubscriptions(e)}runInBatch(e){this.batchCount++;try{e()}finally{if(this.batchCount--,0===this.batchCount&&this.batchedActions.length){const e={type:s.ActionType.BATCH_ACTION,payload:[...this.batchedActions]};this.batchedActions.splice(0),this.dispatch(e)}}}observePath(e,t){return new n.Observable((r=>{const n=this.getOrCreateSubjectForPath(e);r.next(this.getStateInPath(e));const o=n.pipe((0,i.filter)((e=>{if(!t)return!0;const r=new a.PathTrie,n=t();for(const e of n)r.getOrCreatePathTrieNode(e,!0);const i=(0,s.extractAllPathActions)(e.action).map((e=>e.path));let o=!1;for(const e of i)if(0===r.getNodeList(e).length){o=!0;break}return o})),(0,i.map)((e=>e.data))).subscribe(r);return()=>{o.unsubscribe(),n.observed||(n.complete(),this.subscriptionsTree.clearNodeData(e))}}))}setKeyInPath(e,t,r,n=!1){this.setInPath([...e,t],r,n)}setPartial(e,t,r=!1){let n=this.getStateInPath(e);n||(n={}),this.setInPath(e,Object.assign(Object.assign({},n),t),r)}setInPath(e,t,r=!1){if(r&&this.getStateInPath(e)===t)return;const n={type:s.ActionType.SET_PATH,path:e,payload:t};this.dispatch(n)}pushToArray(e,t){let r=this.getStateInPath(e);r=r?[...r]:[],r.push(t),this.setInPath(e,r)}deletePath(e){const t={type:s.ActionType.DELETE_PATH,path:e};this.dispatch(t)}getState(){return this.state}getStateInPath(e){return u(this.state,e)}destroy(){this.subscriptionsTree.iterateBfs((e=>{e&&e.subject&&e.subject.complete()}))}getOrCreateSubjectForPath(e){const t=this.subscriptionsTree.getOrCreatePathTrieNode(e);t.nodeData||(t.nodeData=new c);const r=t.nodeData;return r.subject||(r.subject=new n.Subject),r.subject}dispatchSubscriptions(e){(0,a.getPathTrieFromAction)(e,this.subscriptionsTree).iterateBfs(((t,r)=>{const n=this.subscriptionsTree.getPathTrieNode(r);n&&n.nodeData&&n.nodeData.subject.next({action:e,data:u(this.getState(),r)})}))}};class c{}},266:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NOOP_FN=void 0,t.NOOP_FN=e=>e()},9312:(e,t,r)=>{"use strict";r.r(t),r.d(t,{__assign:()=>o,__asyncDelegator:()=>T,__asyncGenerator:()=>E,__asyncValues:()=>j,__await:()=>S,__awaiter:()=>h,__classPrivateFieldGet:()=>N,__classPrivateFieldIn:()=>M,__classPrivateFieldSet:()=>k,__createBinding:()=>v,__decorate:()=>a,__esDecorate:()=>c,__exportStar:()=>m,__extends:()=>i,__generator:()=>y,__importDefault:()=>A,__importStar:()=>x,__makeTemplateObject:()=>P,__metadata:()=>d,__param:()=>u,__propKey:()=>f,__read:()=>g,__rest:()=>s,__runInitializers:()=>l,__setFunctionName:()=>p,__spread:()=>_,__spreadArray:()=>O,__spreadArrays:()=>w,__values:()=>b});var n=function(e,t){return n=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])},n(e,t)};function i(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}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var o=function(){return o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},o.apply(this,arguments)};function s(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}function a(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s}function u(e,t){return function(r,n){t(r,n,e)}}function c(e,t,r,n,i,o){function s(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var a,u=n.kind,c="getter"===u?"get":"setter"===u?"set":"value",l=!t&&e?n.static?e:e.prototype:null,f=t||(l?Object.getOwnPropertyDescriptor(l,n.name):{}),p=!1,d=r.length-1;d>=0;d--){var h={};for(var y in n)h[y]="access"===y?{}:n[y];for(var y in n.access)h.access[y]=n.access[y];h.addInitializer=function(e){if(p)throw new TypeError("Cannot add initializers after decoration has completed");o.push(s(e||null))};var v=(0,r[d])("accessor"===u?{get:f.get,set:f.set}:f[c],h);if("accessor"===u){if(void 0===v)continue;if(null===v||"object"!=typeof v)throw new TypeError("Object expected");(a=s(v.get))&&(f.get=a),(a=s(v.set))&&(f.set=a),(a=s(v.init))&&i.push(a)}else(a=s(v))&&("field"===u?i.push(a):f[c]=a)}l&&Object.defineProperty(l,n.name,f),p=!0}function l(e,t,r){for(var n=arguments.length>2,i=0;i<t.length;i++)r=n?t[i].call(e,r):t[i].call(e);return n?r:void 0}function f(e){return"symbol"==typeof e?e:"".concat(e)}function p(e,t,r){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})}function d(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function h(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))}function y(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(u){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,n=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],n=0}finally{r=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}var v=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]};function m(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||v(t,e,r)}function b(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 e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s}function _(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(g(arguments[t]));return e}function w(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),i=0;for(t=0;t<r;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)n[i]=o[s];return n}function O(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}function S(e){return this instanceof S?(this.v=e,this):new S(e)}function E(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(e,t||[]),o=[];return n={},s("next"),s("throw"),s("return"),n[Symbol.asyncIterator]=function(){return this},n;function s(e){i[e]&&(n[e]=function(t){return new Promise((function(r,n){o.push([e,t,r,n])>1||a(e,t)}))})}function a(e,t){try{(r=i[e](t)).value instanceof S?Promise.resolve(r.value.v).then(u,c):l(o[0][2],r)}catch(e){l(o[0][3],e)}var r}function u(e){a("next",e)}function c(e){a("throw",e)}function l(e,t){e(t),o.shift(),o.length&&a(o[0][0],o[0][1])}}function T(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,i){t[n]=e[n]?function(t){return(r=!r)?{value:S(e[n](t)),done:!1}:i?i(t):t}:i}}function j(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=b(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,i){!function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)}(n,i,(t=e[r](t)).done,t.value)}))}}}function P(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var I=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function x(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)&&v(t,e,r);return I(t,e),t}function A(e){return e&&e.__esModule?e:{default:e}}function N(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function k(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r}function M(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}},2371:function(e,t){!function(e){"use strict";function t(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];if(t.length>1){t[0]=t[0].slice(0,-1);for(var n=t.length-1,i=1;i<n;++i)t[i]=t[i].slice(1,-1);return t[n]=t[n].slice(1),t.join("")}return t[0]}function r(e){return"(?:"+e+")"}function n(e){return void 0===e?"undefined":null===e?"null":Object.prototype.toString.call(e).split(" ").pop().split("]").shift().toLowerCase()}function i(e){return e.toUpperCase()}function o(e){var n="[A-Za-z]",i="[0-9]",o=t(i,"[A-Fa-f]"),s=r(r("%[EFef]"+o+"%"+o+o+"%"+o+o)+"|"+r("%[89A-Fa-f]"+o+"%"+o+o)+"|"+r("%"+o+o)),a="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",u=t("[\\:\\/\\?\\#\\[\\]\\@]",a),c=e?"[\\uE000-\\uF8FF]":"[]",l=t(n,i,"[\\-\\.\\_\\~]",e?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]"),f=r(n+t(n,i,"[\\+\\-\\.]")+"*"),p=r(r(s+"|"+t(l,a,"[\\:]"))+"*"),d=(r(r("25[0-5]")+"|"+r("2[0-4]"+i)+"|"+r("1"+i+i)+"|"+r("[1-9]"+i)+"|"+i),r(r("25[0-5]")+"|"+r("2[0-4]"+i)+"|"+r("1"+i+i)+"|"+r("0?[1-9]"+i)+"|0?0?"+i)),h=r(d+"\\."+d+"\\."+d+"\\."+d),y=r(o+"{1,4}"),v=r(r(y+"\\:"+y)+"|"+h),m=r(r(y+"\\:")+"{6}"+v),b=r("\\:\\:"+r(y+"\\:")+"{5}"+v),g=r(r(y)+"?\\:\\:"+r(y+"\\:")+"{4}"+v),_=r(r(r(y+"\\:")+"{0,1}"+y)+"?\\:\\:"+r(y+"\\:")+"{3}"+v),w=r(r(r(y+"\\:")+"{0,2}"+y)+"?\\:\\:"+r(y+"\\:")+"{2}"+v),O=r(r(r(y+"\\:")+"{0,3}"+y)+"?\\:\\:"+y+"\\:"+v),S=r(r(r(y+"\\:")+"{0,4}"+y)+"?\\:\\:"+v),E=r(r(r(y+"\\:")+"{0,5}"+y)+"?\\:\\:"+y),T=r(r(r(y+"\\:")+"{0,6}"+y)+"?\\:\\:"),j=r([m,b,g,_,w,O,S,E,T].join("|")),P=r(r(l+"|"+s)+"+"),I=(r(j+"\\%25"+P),r(j+r("\\%25|\\%(?!"+o+"{2})")+P)),x=r("[vV]"+o+"+\\."+t(l,a,"[\\:]")+"+"),A=r("\\["+r(I+"|"+j+"|"+x)+"\\]"),N=r(r(s+"|"+t(l,a))+"*"),k=r(A+"|"+h+"(?!"+N+")|"+N),M=r(i+"*"),D=r(r(p+"@")+"?"+k+r("\\:"+M)+"?"),R=r(s+"|"+t(l,a,"[\\:\\@]")),C=r(R+"*"),$=r(R+"+"),F=r(r(s+"|"+t(l,a,"[\\@]"))+"+"),q=r(r("\\/"+C)+"*"),L=r("\\/"+r($+q)+"?"),B=r(F+q),U=r($+q),V="(?!"+R+")",z=(r(q+"|"+L+"|"+B+"|"+U+"|"+V),r(r(R+"|"+t("[\\/\\?]",c))+"*")),Q=r(r(R+"|[\\/\\?]")+"*"),Y=r(r("\\/\\/"+D+q)+"|"+L+"|"+U+"|"+V),W=r(f+"\\:"+Y+r("\\?"+z)+"?"+r("\\#"+Q)+"?"),H=r(r("\\/\\/"+D+q)+"|"+L+"|"+B+"|"+V),K=r(H+r("\\?"+z)+"?"+r("\\#"+Q)+"?");return r(W+"|"+K),r(f+"\\:"+Y+r("\\?"+z)+"?"),r(r("\\/\\/("+r("("+p+")@")+"?("+k+")"+r("\\:("+M+")")+"?)")+"?("+q+"|"+L+"|"+U+"|"+V+")"),r("\\?("+z+")"),r("\\#("+Q+")"),r(r("\\/\\/("+r("("+p+")@")+"?("+k+")"+r("\\:("+M+")")+"?)")+"?("+q+"|"+L+"|"+B+"|"+V+")"),r("\\?("+z+")"),r("\\#("+Q+")"),r(r("\\/\\/("+r("("+p+")@")+"?("+k+")"+r("\\:("+M+")")+"?)")+"?("+q+"|"+L+"|"+U+"|"+V+")"),r("\\?("+z+")"),r("\\#("+Q+")"),r("("+p+")@"),r("\\:("+M+")"),{NOT_SCHEME:new RegExp(t("[^]",n,i,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(t("[^\\%\\:]",l,a),"g"),NOT_HOST:new RegExp(t("[^\\%\\[\\]\\:]",l,a),"g"),NOT_PATH:new RegExp(t("[^\\%\\/\\:\\@]",l,a),"g"),NOT_PATH_NOSCHEME:new RegExp(t("[^\\%\\/\\@]",l,a),"g"),NOT_QUERY:new RegExp(t("[^\\%]",l,a,"[\\:\\@\\/\\?]",c),"g"),NOT_FRAGMENT:new RegExp(t("[^\\%]",l,a,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(t("[^]",l,a),"g"),UNRESERVED:new RegExp(l,"g"),OTHER_CHARS:new RegExp(t("[^\\%]",l,u),"g"),PCT_ENCODED:new RegExp(s,"g"),IPV4ADDRESS:new RegExp("^("+h+")$"),IPV6ADDRESS:new RegExp("^\\[?("+j+")"+r(r("\\%25|\\%(?!"+o+"{2})")+"("+P+")")+"?\\]?$")}}var s=o(!1),a=o(!0),u=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var r=[],n=!0,i=!1,o=void 0;try{for(var s,a=e[Symbol.iterator]();!(n=(s=a.next()).done)&&(r.push(s.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{!n&&a.return&&a.return()}finally{if(i)throw o}}return r}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},c=2147483647,l=36,f=/^xn--/,p=/[^\0-\x7E]/,d=/[\x2E\u3002\uFF0E\uFF61]/g,h={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},y=Math.floor,v=String.fromCharCode;function m(e){throw new RangeError(h[e])}function b(e,t){var r=e.split("@"),n="";return r.length>1&&(n=r[0]+"@",e=r[1]),n+function(e,t){for(var r=[],n=e.length;n--;)r[n]=t(e[n]);return r}((e=e.replace(d,".")).split("."),t).join(".")}function g(e){for(var t=[],r=0,n=e.length;r<n;){var i=e.charCodeAt(r++);if(i>=55296&&i<=56319&&r<n){var o=e.charCodeAt(r++);56320==(64512&o)?t.push(((1023&i)<<10)+(1023&o)+65536):(t.push(i),r--)}else t.push(i)}return t}var _=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},w=function(e,t,r){var n=0;for(e=r?y(e/700):e>>1,e+=y(e/t);e>455;n+=l)e=y(e/35);return y(n+36*e/(e+38))},O=function(e){var t,r=[],n=e.length,i=0,o=128,s=72,a=e.lastIndexOf("-");a<0&&(a=0);for(var u=0;u<a;++u)e.charCodeAt(u)>=128&&m("not-basic"),r.push(e.charCodeAt(u));for(var f=a>0?a+1:0;f<n;){for(var p=i,d=1,h=l;;h+=l){f>=n&&m("invalid-input");var v=(t=e.charCodeAt(f++))-48<10?t-22:t-65<26?t-65:t-97<26?t-97:l;(v>=l||v>y((c-i)/d))&&m("overflow"),i+=v*d;var b=h<=s?1:h>=s+26?26:h-s;if(v<b)break;var g=l-b;d>y(c/g)&&m("overflow"),d*=g}var _=r.length+1;s=w(i-p,_,0==p),y(i/_)>c-o&&m("overflow"),o+=y(i/_),i%=_,r.splice(i++,0,o)}return String.fromCodePoint.apply(String,r)},S=function(e){var t=[],r=(e=g(e)).length,n=128,i=0,o=72,s=!0,a=!1,u=void 0;try{for(var f,p=e[Symbol.iterator]();!(s=(f=p.next()).done);s=!0){var d=f.value;d<128&&t.push(v(d))}}catch(e){a=!0,u=e}finally{try{!s&&p.return&&p.return()}finally{if(a)throw u}}var h=t.length,b=h;for(h&&t.push("-");b<r;){var O=c,S=!0,E=!1,T=void 0;try{for(var j,P=e[Symbol.iterator]();!(S=(j=P.next()).done);S=!0){var I=j.value;I>=n&&I<O&&(O=I)}}catch(e){E=!0,T=e}finally{try{!S&&P.return&&P.return()}finally{if(E)throw T}}var x=b+1;O-n>y((c-i)/x)&&m("overflow"),i+=(O-n)*x,n=O;var A=!0,N=!1,k=void 0;try{for(var M,D=e[Symbol.iterator]();!(A=(M=D.next()).done);A=!0){var R=M.value;if(R<n&&++i>c&&m("overflow"),R==n){for(var C=i,$=l;;$+=l){var F=$<=o?1:$>=o+26?26:$-o;if(C<F)break;var q=C-F,L=l-F;t.push(v(_(F+q%L,0))),C=y(q/L)}t.push(v(_(C,0))),o=w(i,x,b==h),i=0,++b}}}catch(e){N=!0,k=e}finally{try{!A&&D.return&&D.return()}finally{if(N)throw k}}++i,++n}return t.join("")},E=function(e){return b(e,(function(e){return p.test(e)?"xn--"+S(e):e}))},T=function(e){return b(e,(function(e){return f.test(e)?O(e.slice(4).toLowerCase()):e}))},j={};function P(e){var t=e.charCodeAt(0);return t<16?"%0"+t.toString(16).toUpperCase():t<128?"%"+t.toString(16).toUpperCase():t<2048?"%"+(t>>6|192).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase():"%"+(t>>12|224).toString(16).toUpperCase()+"%"+(t>>6&63|128).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase()}function I(e){for(var t="",r=0,n=e.length;r<n;){var i=parseInt(e.substr(r+1,2),16);if(i<128)t+=String.fromCharCode(i),r+=3;else if(i>=194&&i<224){if(n-r>=6){var o=parseInt(e.substr(r+4,2),16);t+=String.fromCharCode((31&i)<<6|63&o)}else t+=e.substr(r,6);r+=6}else if(i>=224){if(n-r>=9){var s=parseInt(e.substr(r+4,2),16),a=parseInt(e.substr(r+7,2),16);t+=String.fromCharCode((15&i)<<12|(63&s)<<6|63&a)}else t+=e.substr(r,9);r+=9}else t+=e.substr(r,3),r+=3}return t}function x(e,t){function r(e){var r=I(e);return r.match(t.UNRESERVED)?r:e}return e.scheme&&(e.scheme=String(e.scheme).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(t.PCT_ENCODED,r).replace(t.NOT_USERINFO,P).replace(t.PCT_ENCODED,i)),void 0!==e.host&&(e.host=String(e.host).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_HOST,P).replace(t.PCT_ENCODED,i)),void 0!==e.path&&(e.path=String(e.path).replace(t.PCT_ENCODED,r).replace(e.scheme?t.NOT_PATH:t.NOT_PATH_NOSCHEME,P).replace(t.PCT_ENCODED,i)),void 0!==e.query&&(e.query=String(e.query).replace(t.PCT_ENCODED,r).replace(t.NOT_QUERY,P).replace(t.PCT_ENCODED,i)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(t.PCT_ENCODED,r).replace(t.NOT_FRAGMENT,P).replace(t.PCT_ENCODED,i)),e}function A(e){return e.replace(/^0*(.*)/,"$1")||"0"}function N(e,t){var r=e.match(t.IPV4ADDRESS)||[],n=u(r,2)[1];return n?n.split(".").map(A).join("."):e}function k(e,t){var r=e.match(t.IPV6ADDRESS)||[],n=u(r,3),i=n[1],o=n[2];if(i){for(var s=i.toLowerCase().split("::").reverse(),a=u(s,2),c=a[0],l=a[1],f=l?l.split(":").map(A):[],p=c.split(":").map(A),d=t.IPV4ADDRESS.test(p[p.length-1]),h=d?7:8,y=p.length-h,v=Array(h),m=0;m<h;++m)v[m]=f[m]||p[y+m]||"";d&&(v[h-1]=N(v[h-1],t));var b=v.reduce((function(e,t,r){if(!t||"0"===t){var n=e[e.length-1];n&&n.index+n.length===r?n.length++:e.push({index:r,length:1})}return e}),[]).sort((function(e,t){return t.length-e.length}))[0],g=void 0;if(b&&b.length>1){var _=v.slice(0,b.index),w=v.slice(b.index+b.length);g=_.join(":")+"::"+w.join(":")}else g=v.join(":");return o&&(g+="%"+o),g}return e}var M=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,D=void 0==="".match(/(){0}/)[1];function R(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={},n=!1!==t.iri?a:s;"suffix"===t.reference&&(e=(t.scheme?t.scheme+":":"")+"//"+e);var i=e.match(M);if(i){D?(r.scheme=i[1],r.userinfo=i[3],r.host=i[4],r.port=parseInt(i[5],10),r.path=i[6]||"",r.query=i[7],r.fragment=i[8],isNaN(r.port)&&(r.port=i[5])):(r.scheme=i[1]||void 0,r.userinfo=-1!==e.indexOf("@")?i[3]:void 0,r.host=-1!==e.indexOf("//")?i[4]:void 0,r.port=parseInt(i[5],10),r.path=i[6]||"",r.query=-1!==e.indexOf("?")?i[7]:void 0,r.fragment=-1!==e.indexOf("#")?i[8]:void 0,isNaN(r.port)&&(r.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?i[4]:void 0)),r.host&&(r.host=k(N(r.host,n),n)),void 0!==r.scheme||void 0!==r.userinfo||void 0!==r.host||void 0!==r.port||r.path||void 0!==r.query?void 0===r.scheme?r.reference="relative":void 0===r.fragment?r.reference="absolute":r.reference="uri":r.reference="same-document",t.reference&&"suffix"!==t.reference&&t.reference!==r.reference&&(r.error=r.error||"URI is not a "+t.reference+" reference.");var o=j[(t.scheme||r.scheme||"").toLowerCase()];if(t.unicodeSupport||o&&o.unicodeSupport)x(r,n);else{if(r.host&&(t.domainHost||o&&o.domainHost))try{r.host=E(r.host.replace(n.PCT_ENCODED,I).toLowerCase())}catch(e){r.error=r.error||"Host's domain name can not be converted to ASCII via punycode: "+e}x(r,s)}o&&o.parse&&o.parse(r,t)}else r.error=r.error||"URI can not be parsed.";return r}function C(e,t){var r=!1!==t.iri?a:s,n=[];return void 0!==e.userinfo&&(n.push(e.userinfo),n.push("@")),void 0!==e.host&&n.push(k(N(String(e.host),r),r).replace(r.IPV6ADDRESS,(function(e,t,r){return"["+t+(r?"%25"+r:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(n.push(":"),n.push(String(e.port))),n.length?n.join(""):void 0}var $=/^\.\.?\//,F=/^\/\.(\/|$)/,q=/^\/\.\.(\/|$)/,L=/^\/?(?:.|\n)*?(?=\/|$)/;function B(e){for(var t=[];e.length;)if(e.match($))e=e.replace($,"");else if(e.match(F))e=e.replace(F,"/");else if(e.match(q))e=e.replace(q,"/"),t.pop();else if("."===e||".."===e)e="";else{var r=e.match(L);if(!r)throw new Error("Unexpected dot segment condition");var n=r[0];e=e.slice(n.length),t.push(n)}return t.join("")}function U(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.iri?a:s,n=[],i=j[(t.scheme||e.scheme||"").toLowerCase()];if(i&&i.serialize&&i.serialize(e,t),e.host)if(r.IPV6ADDRESS.test(e.host));else if(t.domainHost||i&&i.domainHost)try{e.host=t.iri?T(e.host):E(e.host.replace(r.PCT_ENCODED,I).toLowerCase())}catch(r){e.error=e.error||"Host's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+r}x(e,r),"suffix"!==t.reference&&e.scheme&&(n.push(e.scheme),n.push(":"));var o=C(e,t);if(void 0!==o&&("suffix"!==t.reference&&n.push("//"),n.push(o),e.path&&"/"!==e.path.charAt(0)&&n.push("/")),void 0!==e.path){var u=e.path;t.absolutePath||i&&i.absolutePath||(u=B(u)),void 0===o&&(u=u.replace(/^\/\//,"/%2F")),n.push(u)}return void 0!==e.query&&(n.push("?"),n.push(e.query)),void 0!==e.fragment&&(n.push("#"),n.push(e.fragment)),n.join("")}function V(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n={};return arguments[3]||(e=R(U(e,r),r),t=R(U(t,r),r)),!(r=r||{}).tolerant&&t.scheme?(n.scheme=t.scheme,n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=B(t.path||""),n.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=B(t.path||""),n.query=t.query):(t.path?("/"===t.path.charAt(0)?n.path=B(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:n.path=t.path:n.path="/"+t.path,n.path=B(n.path)),n.query=t.query):(n.path=e.path,void 0!==t.query?n.query=t.query:n.query=e.query),n.userinfo=e.userinfo,n.host=e.host,n.port=e.port),n.scheme=e.scheme),n.fragment=t.fragment,n}function z(e,t){return e&&e.toString().replace(t&&t.iri?a.PCT_ENCODED:s.PCT_ENCODED,I)}var Q={scheme:"http",domainHost:!0,parse:function(e,t){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,t){var r="https"===String(e.scheme).toLowerCase();return e.port!==(r?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},Y={scheme:"https",domainHost:Q.domainHost,parse:Q.parse,serialize:Q.serialize};function W(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var H={scheme:"ws",domainHost:!0,parse:function(e,t){var r=e;return r.secure=W(r),r.resourceName=(r.path||"/")+(r.query?"?"+r.query:""),r.path=void 0,r.query=void 0,r},serialize:function(e,t){if(e.port!==(W(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var r=e.resourceName.split("?"),n=u(r,2),i=n[0],o=n[1];e.path=i&&"/"!==i?i:void 0,e.query=o,e.resourceName=void 0}return e.fragment=void 0,e}},K={scheme:"wss",domainHost:H.domainHost,parse:H.parse,serialize:H.serialize},G={},J="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",Z="[0-9A-Fa-f]",X=r(r("%[EFef]"+Z+"%"+Z+Z+"%"+Z+Z)+"|"+r("%[89A-Fa-f]"+Z+"%"+Z+Z)+"|"+r("%"+Z+Z)),ee=t("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),te=new RegExp(J,"g"),re=new RegExp(X,"g"),ne=new RegExp(t("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',ee),"g"),ie=new RegExp(t("[^]",J,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),oe=ie;function se(e){var t=I(e);return t.match(te)?t:e}var ae={scheme:"mailto",parse:function(e,t){var r=e,n=r.to=r.path?r.path.split(","):[];if(r.path=void 0,r.query){for(var i=!1,o={},s=r.query.split("&"),a=0,u=s.length;a<u;++a){var c=s[a].split("=");switch(c[0]){case"to":for(var l=c[1].split(","),f=0,p=l.length;f<p;++f)n.push(l[f]);break;case"subject":r.subject=z(c[1],t);break;case"body":r.body=z(c[1],t);break;default:i=!0,o[z(c[0],t)]=z(c[1],t)}}i&&(r.headers=o)}r.query=void 0;for(var d=0,h=n.length;d<h;++d){var y=n[d].split("@");if(y[0]=z(y[0]),t.unicodeSupport)y[1]=z(y[1],t).toLowerCase();else try{y[1]=E(z(y[1],t).toLowerCase())}catch(e){r.error=r.error||"Email address's domain name can not be converted to ASCII via punycode: "+e}n[d]=y.join("@")}return r},serialize:function(e,t){var r,n=e,o=null!=(r=e.to)?r instanceof Array?r:"number"!=typeof r.length||r.split||r.setInterval||r.call?[r]:Array.prototype.slice.call(r):[];if(o){for(var s=0,a=o.length;s<a;++s){var u=String(o[s]),c=u.lastIndexOf("@"),l=u.slice(0,c).replace(re,se).replace(re,i).replace(ne,P),f=u.slice(c+1);try{f=t.iri?T(f):E(z(f,t).toLowerCase())}catch(e){n.error=n.error||"Email address's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+e}o[s]=l+"@"+f}n.path=o.join(",")}var p=e.headers=e.headers||{};e.subject&&(p.subject=e.subject),e.body&&(p.body=e.body);var d=[];for(var h in p)p[h]!==G[h]&&d.push(h.replace(re,se).replace(re,i).replace(ie,P)+"="+p[h].replace(re,se).replace(re,i).replace(oe,P));return d.length&&(n.query=d.join("&")),n}},ue=/^([^\:]+)\:(.*)/,ce={scheme:"urn",parse:function(e,t){var r=e.path&&e.path.match(ue),n=e;if(r){var i=t.scheme||n.scheme||"urn",o=r[1].toLowerCase(),s=r[2],a=i+":"+(t.nid||o),u=j[a];n.nid=o,n.nss=s,n.path=void 0,u&&(n=u.parse(n,t))}else n.error=n.error||"URN can not be parsed.";return n},serialize:function(e,t){var r=t.scheme||e.scheme||"urn",n=e.nid,i=r+":"+(t.nid||n),o=j[i];o&&(e=o.serialize(e,t));var s=e,a=e.nss;return s.path=(n||t.nid)+":"+a,s}},le=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,fe={scheme:"urn:uuid",parse:function(e,t){var r=e;return r.uuid=r.nss,r.nss=void 0,t.tolerant||r.uuid&&r.uuid.match(le)||(r.error=r.error||"UUID is not valid."),r},serialize:function(e,t){var r=e;return r.nss=(e.uuid||"").toLowerCase(),r}};j[Q.scheme]=Q,j[Y.scheme]=Y,j[H.scheme]=H,j[K.scheme]=K,j[ae.scheme]=ae,j[ce.scheme]=ce,j[fe.scheme]=fe,e.SCHEMES=j,e.pctEncChar=P,e.pctDecChars=I,e.parse=R,e.removeDotSegments=B,e.serialize=U,e.resolveComponents=V,e.resolve=function(e,t,r){var n=function(e,t){var r=e;if(t)for(var n in t)r[n]=t[n];return r}({scheme:"null"},r);return U(V(R(e,n),R(t,n),n,!0),n)},e.normalize=function(e,t){return"string"==typeof e?e=U(R(e,t),t):"object"===n(e)&&(e=R(U(e,t),t)),e},e.equal=function(e,t,r){return"string"==typeof e?e=U(R(e,r),r):"object"===n(e)&&(e=U(e,r)),"string"==typeof t?t=U(R(t,r),r):"object"===n(t)&&(t=U(t,r)),e===t},e.escapeComponent=function(e,t){return e&&e.toString().replace(t&&t.iri?a.ESCAPE:s.ESCAPE,P)},e.unescapeComponent=z,Object.defineProperty(e,"__esModule",{value:!0})}(t)},9031:e=>{"use strict";e.exports=require("cross-fetch")},8087:e=>{"use strict";e.exports=require("socket.io-client")},2948:(e,t,r)=>{"use strict";r.r(t),r.d(t,{ApolloCache:()=>xn,ApolloClient:()=>In,ApolloError:()=>mr,ApolloLink:()=>be,Cache:()=>jn,HttpLink:()=>wt,InMemoryCache:()=>Ii,MissingFieldError:()=>An,NetworkStatus:()=>vr,Observable:()=>Q,ObservableQuery:()=>Tr,checkFetcher:()=>He,concat:()=>ki,createHttpLink:()=>_t,createSignalIfSupported:()=>vt,defaultDataIdFromObject:()=>Dn,defaultPrinter:()=>pt,disableExperimentalFragmentVariables:()=>To,disableFragmentWarnings:()=>So,empty:()=>xi,enableExperimentalFragmentVariables:()=>Eo,execute:()=>ge,fallbackHttpConfig:()=>ft,from:()=>Ai,fromError:()=>bt,fromPromise:()=>Di,gql:()=>wo,isApolloError:()=>yr,isReference:()=>J,makeReference:()=>G,makeVar:()=>yn,mergeOptions:()=>Tn,parseAndCheckHttpResponse:()=>We,resetCaches:()=>Oo,rewriteURIForGET:()=>mt,selectHttpOptionsAndBody:()=>dt,selectHttpOptionsAndBodyInternal:()=>ht,selectURI:()=>Re,serializeFetchParameter:()=>De,setLogVerbosity:()=>p,split:()=>Ni,throwServerError:()=>Ue,toPromise:()=>Mi});var n=r(9312),i="Invariant Violation",o=Object.setPrototypeOf,s=void 0===o?function(e,t){return e.__proto__=t,e}:o,a=function(e){function t(r){void 0===r&&(r=i);var n=e.call(this,"number"==typeof r?i+": "+r+" (see https://github.com/apollographql/invariant-packages)":r)||this;return n.framesToPop=1,n.name=i,s(n,t.prototype),n}return(0,n.__extends)(t,e),t}(Error);function u(e,t){if(!e)throw new a(t)}var c=["debug","log","warn","error","silent"],l=c.indexOf("log");function f(e){return function(){if(c.indexOf(e)>=l){var t=console[e]||console.log;return t.apply(console,arguments)}}}function p(e){var t=c[l];return l=Math.max(0,c.indexOf(e)),t}function d(e){try{return e()}catch(e){}}!function(e){e.debug=f("debug"),e.log=f("log"),e.warn=f("warn"),e.error=f("error")}(u||(u={}));const h=d((function(){return globalThis}))||d((function(){return window}))||d((function(){return self}))||d((function(){return global}))||d((function(){return d.constructor("return this")()}));var y="__",v=[y,y].join("DEV");const m=function(){try{return Boolean(__DEV__)}catch(e){return Object.defineProperty(h,v,{value:"production"!==d((function(){return"production"})),enumerable:!1,configurable:!0,writable:!0}),h[v]}}();function b(e){try{return e()}catch(e){}}var g=b((function(){return globalThis}))||b((function(){return window}))||b((function(){return self}))||b((function(){return global}))||b((function(){return b.constructor("return this")()})),_=!1;function w(e,t){if(!Boolean(e))throw new Error(t)}function O(e){return S(e,[])}function S(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return function(e,t){if(null===e)return"null";if(t.includes(e))return"[Circular]";const r=[...t,e];if(function(e){return"function"==typeof e.toJSON}(e)){const t=e.toJSON();if(t!==e)return"string"==typeof t?t:S(t,r)}else if(Array.isArray(e))return function(e,t){if(0===e.length)return"[]";if(t.length>2)return"[Array]";const r=Math.min(10,e.length),n=e.length-r,i=[];for(let n=0;n<r;++n)i.push(S(e[n],t));return 1===n?i.push("... 1 more item"):n>1&&i.push(`... ${n} more items`),"["+i.join(", ")+"]"}(e,r);return function(e,t){const r=Object.entries(e);if(0===r.length)return"{}";if(t.length>2)return"["+function(e){const t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){const t=e.constructor.name;if("string"==typeof t&&""!==t)return t}return t}(e)+"]";const n=r.map((([e,r])=>e+": "+S(r,t)));return"{ "+n.join(", ")+" }"}(e,r)}(e,t);default:return String(e)}}!g||b((function(){return"production"}))||b((function(){return process}))||(Object.defineProperty(g,"process",{value:{env:{NODE_ENV:"production"}},configurable:!0,enumerable:!1,writable:!0}),_=!0);class E{constructor(e,t="GraphQL request",r={line:1,column:1}){"string"==typeof e||w(!1,`Body must be a string. Received: ${O(e)}.`),this.body=e,this.name=t,this.locationOffset=r,this.locationOffset.line>0||w(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||w(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}function T(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function j(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function P(e,t,r){return t&&j(e.prototype,t),r&&j(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}_&&(delete g.process,_=!1),__DEV__?u("boolean"==typeof m,m):u("boolean"==typeof m,39);var I=function(){return"function"==typeof Symbol},x=function(e){return I()&&Boolean(Symbol[e])},A=function(e){return x(e)?Symbol[e]:"@@"+e};I()&&!x("observable")&&(Symbol.observable=Symbol("observable"));var N=A("iterator"),k=A("observable"),M=A("species");function D(e,t){var r=e[t];if(null!=r){if("function"!=typeof r)throw new TypeError(r+" is not a function");return r}}function R(e){var t=e.constructor;return void 0!==t&&null===(t=t[M])&&(t=void 0),void 0!==t?t:Q}function C(e){return e instanceof Q}function $(e){$.log?$.log(e):setTimeout((function(){throw e}))}function F(e){Promise.resolve().then((function(){try{e()}catch(e){$(e)}}))}function q(e){var t=e._cleanup;if(void 0!==t&&(e._cleanup=void 0,t))try{if("function"==typeof t)t();else{var r=D(t,"unsubscribe");r&&r.call(t)}}catch(e){$(e)}}function L(e){e._observer=void 0,e._queue=void 0,e._state="closed"}function B(e,t,r){e._state="running";var n=e._observer;try{var i=D(n,t);switch(t){case"next":i&&i.call(n,r);break;case"error":if(L(e),!i)throw r;i.call(n,r);break;case"complete":L(e),i&&i.call(n)}}catch(e){$(e)}"closed"===e._state?q(e):"running"===e._state&&(e._state="ready")}function U(e,t,r){if("closed"!==e._state){if("buffering"!==e._state)return"ready"!==e._state?(e._state="buffering",e._queue=[{type:t,value:r}],void F((function(){return function(e){var t=e._queue;if(t){e._queue=void 0,e._state="ready";for(var r=0;r<t.length&&(B(e,t[r].type,t[r].value),"closed"!==e._state);++r);}}(e)}))):void B(e,t,r);e._queue.push({type:t,value:r})}}var V=function(){function e(e,t){this._cleanup=void 0,this._observer=e,this._queue=void 0,this._state="initializing";var r=new z(this);try{this._cleanup=t.call(void 0,r)}catch(e){r.error(e)}"initializing"===this._state&&(this._state="ready")}return e.prototype.unsubscribe=function(){"closed"!==this._state&&(L(this),q(this))},P(e,[{key:"closed",get:function(){return"closed"===this._state}}]),e}(),z=function(){function e(e){this._subscription=e}var t=e.prototype;return t.next=function(e){U(this._subscription,"next",e)},t.error=function(e){U(this._subscription,"error",e)},t.complete=function(){U(this._subscription,"complete")},P(e,[{key:"closed",get:function(){return"closed"===this._subscription._state}}]),e}(),Q=function(){function e(t){if(!(this instanceof e))throw new TypeError("Observable cannot be called as a function");if("function"!=typeof t)throw new TypeError("Observable initializer must be a function");this._subscriber=t}var t=e.prototype;return t.subscribe=function(e){return"object"==typeof e&&null!==e||(e={next:e,error:arguments[1],complete:arguments[2]}),new V(e,this._subscriber)},t.forEach=function(e){var t=this;return new Promise((function(r,n){if("function"==typeof e)var i=t.subscribe({next:function(t){try{e(t,o)}catch(e){n(e),i.unsubscribe()}},error:n,complete:r});else n(new TypeError(e+" is not a function"));function o(){i.unsubscribe(),r()}}))},t.map=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(R(this))((function(r){return t.subscribe({next:function(t){try{t=e(t)}catch(e){return r.error(e)}r.next(t)},error:function(e){r.error(e)},complete:function(){r.complete()}})}))},t.filter=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(R(this))((function(r){return t.subscribe({next:function(t){try{if(!e(t))return}catch(e){return r.error(e)}r.next(t)},error:function(e){r.error(e)},complete:function(){r.complete()}})}))},t.reduce=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");var r=R(this),n=arguments.length>1,i=!1,o=arguments[1],s=o;return new r((function(r){return t.subscribe({next:function(t){var o=!i;if(i=!0,!o||n)try{s=e(s,t)}catch(e){return r.error(e)}else s=t},error:function(e){r.error(e)},complete:function(){if(!i&&!n)return r.error(new TypeError("Cannot reduce an empty sequence"));r.next(s),r.complete()}})}))},t.concat=function(){for(var e=this,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=R(this);return new i((function(t){var n,o=0;return function e(s){n=s.subscribe({next:function(e){t.next(e)},error:function(e){t.error(e)},complete:function(){o===r.length?(n=void 0,t.complete()):e(i.from(r[o++]))}})}(e),function(){n&&(n.unsubscribe(),n=void 0)}}))},t.flatMap=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");var r=R(this);return new r((function(n){var i=[],o=t.subscribe({next:function(t){if(e)try{t=e(t)}catch(e){return n.error(e)}var o=r.from(t).subscribe({next:function(e){n.next(e)},error:function(e){n.error(e)},complete:function(){var e=i.indexOf(o);e>=0&&i.splice(e,1),s()}});i.push(o)},error:function(e){n.error(e)},complete:function(){s()}});function s(){o.closed&&0===i.length&&n.complete()}return function(){i.forEach((function(e){return e.unsubscribe()})),o.unsubscribe()}}))},t[k]=function(){return this},e.from=function(t){var r="function"==typeof this?this:e;if(null==t)throw new TypeError(t+" is not an object");var n=D(t,k);if(n){var i=n.call(t);if(Object(i)!==i)throw new TypeError(i+" is not an object");return C(i)&&i.constructor===r?i:new r((function(e){return i.subscribe(e)}))}if(x("iterator")&&(n=D(t,N)))return new r((function(e){F((function(){if(!e.closed){for(var r,i=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(r)return(r=r.call(e)).next.bind(r);if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return T(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?T(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(n.call(t));!(r=i()).done;){var o=r.value;if(e.next(o),e.closed)return}e.complete()}}))}));if(Array.isArray(t))return new r((function(e){F((function(){if(!e.closed){for(var r=0;r<t.length;++r)if(e.next(t[r]),e.closed)return;e.complete()}}))}));throw new TypeError(t+" is not observable")},e.of=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i="function"==typeof this?this:e;return new i((function(e){F((function(){if(!e.closed){for(var t=0;t<r.length;++t)if(e.next(r[t]),e.closed)return;e.complete()}}))}))},P(e,null,[{key:M,get:function(){return this}}]),e}();function Y(e){return null!==e&&"object"==typeof e}function W(e,t){var r=t,i=[];return e.definitions.forEach((function(e){if("OperationDefinition"===e.kind)throw __DEV__?new a("Found a ".concat(e.operation," operation").concat(e.name?" named '".concat(e.name.value,"'"):"",". ")+"No operations are allowed when using a fragment as a query. Only fragments are allowed."):new a(44);"FragmentDefinition"===e.kind&&i.push(e)})),void 0===r&&(__DEV__?u(1===i.length,"Found ".concat(i.length," fragments. `fragmentName` must be provided when there is not exactly 1 fragment.")):u(1===i.length,45),r=i[0].name.value),(0,n.__assign)((0,n.__assign)({},e),{definitions:(0,n.__spreadArray)([{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:r}}]}}],e.definitions,!0)})}function H(e){void 0===e&&(e=[]);var t={};return e.forEach((function(e){t[e.name.value]=e})),t}function K(e,t){switch(e.kind){case"InlineFragment":return e;case"FragmentSpread":var r=e.name.value;if("function"==typeof t)return t(r);var n=t&&t[r];return __DEV__?u(n,"No fragment named ".concat(r)):u(n,46),n||null;default:return null}}function G(e){return{__ref:String(e)}}function J(e){return Boolean(e&&"object"==typeof e&&"string"==typeof e.__ref)}function Z(e,t,r,n){if(function(e){return"IntValue"===e.kind}(r)||function(e){return"FloatValue"===e.kind}(r))e[t.value]=Number(r.value);else if(function(e){return"BooleanValue"===e.kind}(r)||function(e){return"StringValue"===e.kind}(r))e[t.value]=r.value;else if(function(e){return"ObjectValue"===e.kind}(r)){var i={};r.fields.map((function(e){return Z(i,e.name,e.value,n)})),e[t.value]=i}else if(function(e){return"Variable"===e.kind}(r)){var o=(n||{})[r.name.value];e[t.value]=o}else if(function(e){return"ListValue"===e.kind}(r))e[t.value]=r.values.map((function(e){var r={};return Z(r,t,e,n),r[t.value]}));else if(function(e){return"EnumValue"===e.kind}(r))e[t.value]=r.value;else{if(!function(e){return"NullValue"===e.kind}(r))throw __DEV__?new a('The inline argument "'.concat(t.value,'" of kind "').concat(r.kind,'"')+"is not supported. Use variables instead of inline arguments to overcome this limitation."):new a(55);e[t.value]=null}}I()&&Object.defineProperty(Q,Symbol("extensions"),{value:{symbol:k,hostReportError:$},configurable:!0});var X=["connection","include","skip","client","rest","export"],ee=Object.assign((function(e,t,r){if(t&&r&&r.connection&&r.connection.key){if(r.connection.filter&&r.connection.filter.length>0){var n=r.connection.filter?r.connection.filter:[];n.sort();var i={};return n.forEach((function(e){i[e]=t[e]})),"".concat(r.connection.key,"(").concat(te(i),")")}return r.connection.key}var o=e;if(t){var s=te(t);o+="(".concat(s,")")}return r&&Object.keys(r).forEach((function(e){-1===X.indexOf(e)&&(r[e]&&Object.keys(r[e]).length?o+="@".concat(e,"(").concat(te(r[e]),")"):o+="@".concat(e))})),o}),{setStringify:function(e){var t=te;return te=e,t}}),te=function(e){return JSON.stringify(e,re)};function re(e,t){return Y(t)&&!Array.isArray(t)&&(t=Object.keys(t).sort().reduce((function(e,r){return e[r]=t[r],e}),{})),t}function ne(e,t){if(e.arguments&&e.arguments.length){var r={};return e.arguments.forEach((function(e){var n=e.name,i=e.value;return Z(r,n,i,t)})),r}return null}function ie(e){return e.alias?e.alias.value:e.name.value}function oe(e,t,r){if("string"==typeof e.__typename)return e.__typename;for(var n=0,i=t.selections;n<i.length;n++){var o=i[n];if(se(o)){if("__typename"===o.name.value)return e[ie(o)]}else{var s=oe(e,K(o,r).selectionSet,r);if("string"==typeof s)return s}}}function se(e){return"Field"===e.kind}function ae(e){__DEV__?u(e&&"Document"===e.kind,'Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a "gql" tag? http://docs.apollostack.com/apollo-client/core.html#gql'):u(e&&"Document"===e.kind,47);var t=e.definitions.filter((function(e){return"FragmentDefinition"!==e.kind})).map((function(e){if("OperationDefinition"!==e.kind)throw __DEV__?new a('Schema type definitions not allowed in queries. Found: "'.concat(e.kind,'"')):new a(48);return e}));return __DEV__?u(t.length<=1,"Ambiguous GraphQL document: contains ".concat(t.length," operations")):u(t.length<=1,49),e}function ue(e){return ae(e),e.definitions.filter((function(e){return"OperationDefinition"===e.kind}))[0]}function ce(e){return e.definitions.filter((function(e){return"OperationDefinition"===e.kind&&e.name})).map((function(e){return e.name.value}))[0]||null}function le(e){return e.definitions.filter((function(e){return"FragmentDefinition"===e.kind}))}function fe(e){var t=ue(e);return __DEV__?u(t&&"query"===t.operation,"Must contain a query definition."):u(t&&"query"===t.operation,50),t}function pe(e){var t;ae(e);for(var r=0,n=e.definitions;r<n.length;r++){var i=n[r];if("OperationDefinition"===i.kind){var o=i.operation;if("query"===o||"mutation"===o||"subscription"===o)return i}"FragmentDefinition"!==i.kind||t||(t=i)}if(t)return t;throw __DEV__?new a("Expected a parsed GraphQL query with a query, mutation, subscription, or a fragment."):new a(54)}function de(e){var t=Object.create(null),r=e&&e.variableDefinitions;return r&&r.length&&r.forEach((function(e){e.defaultValue&&Z(t,e.variable.name,e.defaultValue)})),t}function he(e,t){return t?t(e):Q.of()}function ye(e){return"function"==typeof e?new be(e):e}function ve(e){return e.request.length<=1}var me=function(e){function t(t,r){var n=e.call(this,t)||this;return n.link=r,n}return(0,n.__extends)(t,e),t}(Error),be=function(){function e(e){e&&(this.request=e)}return e.empty=function(){return new e((function(){return Q.of()}))},e.from=function(t){return 0===t.length?e.empty():t.map(ye).reduce((function(e,t){return e.concat(t)}))},e.split=function(t,r,n){var i=ye(r),o=ye(n||new e(he));return ve(i)&&ve(o)?new e((function(e){return t(e)?i.request(e)||Q.of():o.request(e)||Q.of()})):new e((function(e,r){return t(e)?i.request(e,r)||Q.of():o.request(e,r)||Q.of()}))},e.execute=function(e,t){return e.request(function(e,t){var r=(0,n.__assign)({},e);return Object.defineProperty(t,"setContext",{enumerable:!1,value:function(e){r="function"==typeof e?(0,n.__assign)((0,n.__assign)({},r),e(r)):(0,n.__assign)((0,n.__assign)({},r),e)}}),Object.defineProperty(t,"getContext",{enumerable:!1,value:function(){return(0,n.__assign)({},r)}}),t}(t.context,function(e){var t={variables:e.variables||{},extensions:e.extensions||{},operationName:e.operationName,query:e.query};return t.operationName||(t.operationName="string"!=typeof t.query?ce(t.query)||void 0:""),t}(function(e){for(var t=["query","operationName","variables","extensions","context"],r=0,n=Object.keys(e);r<n.length;r++){var i=n[r];if(t.indexOf(i)<0)throw __DEV__?new a("illegal argument: ".concat(i)):new a(27)}return e}(t))))||Q.of()},e.concat=function(t,r){var n=ye(t);if(ve(n))return __DEV__&&u.warn(new me("You are calling concat on a terminating link, which will have no effect",n)),n;var i=ye(r);return ve(i)?new e((function(e){return n.request(e,(function(e){return i.request(e)||Q.of()}))||Q.of()})):new e((function(e,t){return n.request(e,(function(e){return i.request(e,t)||Q.of()}))||Q.of()}))},e.prototype.split=function(t,r,n){return this.concat(e.split(t,r,n||new e(he)))},e.prototype.concat=function(t){return e.concat(this,t)},e.prototype.request=function(e,t){throw __DEV__?new a("request is not implemented"):new a(22)},e.prototype.onError=function(e,t){if(t&&t.error)return t.error(e),!1;throw e},e.prototype.setOnError=function(e){return this.onError=e,this},e}(),ge=be.execute;class _e{constructor(e,t,r){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=r}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}}class we{constructor(e,t,r,n,i,o){this.kind=e,this.start=t,this.end=r,this.line=n,this.column=i,this.value=o,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}}const Oe={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},Se=new Set(Object.keys(Oe));function Ee(e){const t=null==e?void 0:e.kind;return"string"==typeof t&&Se.has(t)}var Te,je,Pe;!function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"}(Te||(Te={})),(Pe=je||(je={})).NAME="Name",Pe.DOCUMENT="Document",Pe.OPERATION_DEFINITION="OperationDefinition",Pe.VARIABLE_DEFINITION="VariableDefinition",Pe.SELECTION_SET="SelectionSet",Pe.FIELD="Field",Pe.ARGUMENT="Argument",Pe.FRAGMENT_SPREAD="FragmentSpread",Pe.INLINE_FRAGMENT="InlineFragment",Pe.FRAGMENT_DEFINITION="FragmentDefinition",Pe.VARIABLE="Variable",Pe.INT="IntValue",Pe.FLOAT="FloatValue",Pe.STRING="StringValue",Pe.BOOLEAN="BooleanValue",Pe.NULL="NullValue",Pe.ENUM="EnumValue",Pe.LIST="ListValue",Pe.OBJECT="ObjectValue",Pe.OBJECT_FIELD="ObjectField",Pe.DIRECTIVE="Directive",Pe.NAMED_TYPE="NamedType",Pe.LIST_TYPE="ListType",Pe.NON_NULL_TYPE="NonNullType",Pe.SCHEMA_DEFINITION="SchemaDefinition",Pe.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",Pe.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",Pe.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",Pe.FIELD_DEFINITION="FieldDefinition",Pe.INPUT_VALUE_DEFINITION="InputValueDefinition",Pe.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",Pe.UNION_TYPE_DEFINITION="UnionTypeDefinition",Pe.ENUM_TYPE_DEFINITION="EnumTypeDefinition",Pe.ENUM_VALUE_DEFINITION="EnumValueDefinition",Pe.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",Pe.DIRECTIVE_DEFINITION="DirectiveDefinition",Pe.SCHEMA_EXTENSION="SchemaExtension",Pe.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",Pe.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",Pe.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",Pe.UNION_TYPE_EXTENSION="UnionTypeExtension",Pe.ENUM_TYPE_EXTENSION="EnumTypeExtension",Pe.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension";const Ie=Object.freeze({});function xe(e,t,r=Oe){const n=new Map;for(const e of Object.values(je))n.set(e,Ae(t,e));let i,o,s,a=Array.isArray(e),u=[e],c=-1,l=[],f=e;const p=[],d=[];do{c++;const e=c===u.length,m=e&&0!==l.length;if(e){if(o=0===d.length?void 0:p[p.length-1],f=s,s=d.pop(),m)if(a){f=f.slice();let e=0;for(const[t,r]of l){const n=t-e;null===r?(f.splice(n,1),e++):f[n]=r}}else{f=Object.defineProperties({},Object.getOwnPropertyDescriptors(f));for(const[e,t]of l)f[e]=t}c=i.index,u=i.keys,l=i.edits,a=i.inArray,i=i.prev}else if(s){if(o=a?c:u[c],f=s[o],null==f)continue;p.push(o)}let b;if(!Array.isArray(f)){var h,y;Ee(f)||w(!1,`Invalid AST Node: ${O(f)}.`);const r=e?null===(h=n.get(f.kind))||void 0===h?void 0:h.leave:null===(y=n.get(f.kind))||void 0===y?void 0:y.enter;if(b=null==r?void 0:r.call(t,f,o,s,p,d),b===Ie)break;if(!1===b){if(!e){p.pop();continue}}else if(void 0!==b&&(l.push([o,b]),!e)){if(!Ee(b)){p.pop();continue}f=b}}var v;void 0===b&&m&&l.push([o,f]),e?p.pop():(i={inArray:a,index:c,keys:u,edits:l,prev:i},a=Array.isArray(f),u=a?f:null!==(v=r[f.kind])&&void 0!==v?v:[],c=-1,l=[],s&&d.push(s),s=f)}while(void 0!==i);return 0!==l.length?l[l.length-1][1]:e}function Ae(e,t){const r=e[t];return"object"==typeof r?r:"function"==typeof r?{enter:r,leave:void 0}:{enter:e.enter,leave:e.leave}}function Ne(e,t){var r=e.directives;return!r||!r.length||function(e){var t=[];return e&&e.length&&e.forEach((function(e){if(function(e){var t=e.name.value;return"skip"===t||"include"===t}(e)){var r=e.arguments,n=e.name.value;__DEV__?u(r&&1===r.length,"Incorrect number of arguments for the @".concat(n," directive.")):u(r&&1===r.length,41);var i=r[0];__DEV__?u(i.name&&"if"===i.name.value,"Invalid argument for the @".concat(n," directive.")):u(i.name&&"if"===i.name.value,42);var o=i.value;__DEV__?u(o&&("Variable"===o.kind||"BooleanValue"===o.kind),"Argument for the @".concat(n," directive must be a variable or a boolean value.")):u(o&&("Variable"===o.kind||"BooleanValue"===o.kind),43),t.push({directive:e,ifArgument:i})}})),t}(r).every((function(e){var r=e.directive,n=e.ifArgument,i=!1;return"Variable"===n.value.kind?(i=t&&t[n.value.name.value],__DEV__?u(void 0!==i,"Invalid variable referenced in @".concat(r.name.value," directive.")):u(void 0!==i,40)):i=n.value.value,"skip"===r.name.value?!i:i}))}function ke(e,t,r){var n=new Set(e),i=n.size;return xe(t,{Directive:function(e){if(n.delete(e.name.value)&&(!r||!n.size))return Ie}}),r?!n.size:n.size<i}function Me(e){return e&&ke(["client","export"],e,!0)}var De=function(e,t){var r;try{r=JSON.stringify(e)}catch(e){var n=__DEV__?new a("Network request failed. ".concat(t," is not serializable: ").concat(e.message)):new a(24);throw n.parseError=e,n}return r},Re=function(e,t){return e.getContext().uri||("function"==typeof t?t(e):t||"/graphql")},Ce="function"==typeof WeakMap&&"ReactNative"!==d((function(){return navigator.product})),$e="function"==typeof WeakSet,Fe="function"==typeof Symbol&&"function"==typeof Symbol.for,qe=Fe&&Symbol.asyncIterator;function Le(e){var t={next:function(){return e.read()}};return qe&&(t[Symbol.asyncIterator]=function(){return this}),t}function Be(e){var t,r,n,i,o=e;if(e.body&&(o=e.body),i=o,qe&&i[Symbol.asyncIterator])return function(e){var t,r=e[Symbol.asyncIterator]();return(t={next:function(){return r.next()}})[Symbol.asyncIterator]=function(){return this},t}(o);if(function(e){return!!e.getReader}(o))return Le(o.getReader());if(function(e){return!!e.stream}(o))return Le(o.stream().getReader());if(function(e){return!!e.arrayBuffer}(o))return t=o.arrayBuffer(),r=!1,n={next:function(){return r?Promise.resolve({value:void 0,done:!0}):(r=!0,new Promise((function(e,r){t.then((function(t){e({value:t,done:!1})})).catch(r)})))}},qe&&(n[Symbol.asyncIterator]=function(){return this}),n;if(function(e){return!!e.pipe}(o))return function(e){var t=null,r=null,n=!1,i=[],o=[];function s(e){if(!r){if(o.length){var t=o.shift();if(Array.isArray(t)&&t[0])return t[0]({value:e,done:!1})}i.push(e)}}function a(e){r=e,o.slice().forEach((function(t){t[1](e)})),!t||t()}function u(){n=!0,o.slice().forEach((function(e){e[0]({value:void 0,done:!0})})),!t||t()}t=function(){t=null,e.removeListener("data",s),e.removeListener("error",a),e.removeListener("end",u),e.removeListener("finish",u),e.removeListener("close",u)},e.on("data",s),e.on("error",a),e.on("end",u),e.on("finish",u),e.on("close",u);var c={next:function(){return new Promise((function(e,t){return r?t(r):i.length?e({value:i.shift(),done:!1}):n?e({value:void 0,done:!0}):void o.push([e,t])}))}};return qe&&(c[Symbol.asyncIterator]=function(){return this}),c}(o);throw new Error("Unknown body type for responseIterator. Please pass a streamable response.")}d((function(){return window.document.createElement})),d((function(){return navigator.userAgent.indexOf("jsdom")>=0}));var Ue=function(e,t,r){var n=new Error(r);throw n.name="ServerError",n.response=e,n.statusCode=e.status,n.result=t,n},Ve=Object.prototype.hasOwnProperty;function ze(e){var t={};return e.split("\n").forEach((function(e){var r=e.indexOf(":");if(r>-1){var n=e.slice(0,r).trim().toLowerCase(),i=e.slice(r+1).trim();t[n]=i}})),t}function Qe(e,t){e.status>=300&&Ue(e,function(){try{return JSON.parse(t)}catch(e){return t}}(),"Response not successful: Received status code ".concat(e.status));try{return JSON.parse(t)}catch(n){var r=n;throw r.name="ServerParseError",r.response=e,r.statusCode=e.status,r.bodyText=t,r}}function Ye(e,t){var r,n;"AbortError"!==e.name&&(e.result&&e.result.errors&&e.result.data&&(null===(r=t.next)||void 0===r||r.call(t,e.result)),null===(n=t.error)||void 0===n||n.call(t,e))}function We(e){return function(t){return t.text().then((function(e){return Qe(t,e)})).then((function(r){return t.status>=300&&Ue(t,r,"Response not successful: Received status code ".concat(t.status)),Array.isArray(r)||Ve.call(r,"data")||Ve.call(r,"errors")||Ue(t,r,"Server response was missing for query '".concat(Array.isArray(e)?e.map((function(e){return e.operationName})):e.operationName,"'.")),r}))}}var He=function(e){if(!e&&"undefined"==typeof fetch)throw __DEV__?new a("\n\"fetch\" has not been found globally and no fetcher has been configured. To fix this, install a fetch package (like https://www.npmjs.com/package/cross-fetch), instantiate the fetcher, and pass it into your HttpLink constructor. For example:\n\nimport fetch from 'cross-fetch';\nimport { ApolloClient, HttpLink } from '@apollo/client';\nconst client = new ApolloClient({\n link: new HttpLink({ uri: '/graphql', fetch })\n});\n "):new a(23)};function Ke(e){return 9===e||32===e}function Ge(e){return e>=48&&e<=57}function Je(e){return e>=97&&e<=122||e>=65&&e<=90}function Ze(e){return Je(e)||95===e}function Xe(e){var t;let r=Number.MAX_SAFE_INTEGER,n=null,i=-1;for(let t=0;t<e.length;++t){var o;const s=e[t],a=et(s);a!==s.length&&(n=null!==(o=n)&&void 0!==o?o:t,i=t,0!==t&&a<r&&(r=a))}return e.map(((e,t)=>0===t?e:e.slice(r))).slice(null!==(t=n)&&void 0!==t?t:0,i+1)}function et(e){let t=0;for(;t<e.length&&Ke(e.charCodeAt(t));)++t;return t}const tt=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function rt(e){return nt[e.charCodeAt(0)]}const nt=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"];function it(e){return xe(e,ot)}const ot={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>st(e.definitions,"\n\n")},OperationDefinition:{leave(e){const t=ut("(",st(e.variableDefinitions,", "),")"),r=st([e.operation,st([e.name,t]),st(e.directives," ")]," ");return("query"===r?"":r+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:r,directives:n})=>e+": "+t+ut(" = ",r)+ut(" ",st(n," "))},SelectionSet:{leave:({selections:e})=>at(e)},Field:{leave({alias:e,name:t,arguments:r,directives:n,selectionSet:i}){const o=ut("",e,": ")+t;let s=o+ut("(",st(r,", "),")");return s.length>80&&(s=o+ut("(\n",ct(st(r,"\n")),"\n)")),st([s,st(n," "),i]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+ut(" ",st(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:r})=>st(["...",ut("on ",e),st(t," "),r]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:r,directives:n,selectionSet:i})=>`fragment ${e}${ut("(",st(r,", "),")")} on ${t} ${ut("",st(n," ")," ")}`+i},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?function(e,t){const r=e.replace(/"""/g,'\\"""'),n=r.split(/\r\n|[\n\r]/g),i=1===n.length,o=n.length>1&&n.slice(1).every((e=>0===e.length||Ke(e.charCodeAt(0)))),s=r.endsWith('\\"""'),a=e.endsWith('"')&&!s,u=e.endsWith("\\"),c=a||u,l=!i||e.length>70||c||o||s;let f="";const p=i&&Ke(e.charCodeAt(0));return(l&&!p||o)&&(f+="\n"),f+=r,(l||c)&&(f+="\n"),'"""'+f+'"""'}(e):`"${e.replace(tt,rt)}"`},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+st(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+st(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+ut("(",st(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:r})=>ut("",e,"\n")+st(["schema",st(t," "),at(r)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:r})=>ut("",e,"\n")+st(["scalar",t,st(r," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:r,directives:n,fields:i})=>ut("",e,"\n")+st(["type",t,ut("implements ",st(r," & ")),st(n," "),at(i)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:r,type:n,directives:i})=>ut("",e,"\n")+t+(lt(r)?ut("(\n",ct(st(r,"\n")),"\n)"):ut("(",st(r,", "),")"))+": "+n+ut(" ",st(i," "))},InputValueDefinition:{leave:({description:e,name:t,type:r,defaultValue:n,directives:i})=>ut("",e,"\n")+st([t+": "+r,ut("= ",n),st(i," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:t,interfaces:r,directives:n,fields:i})=>ut("",e,"\n")+st(["interface",t,ut("implements ",st(r," & ")),st(n," "),at(i)]," ")},UnionTypeDefinition:{leave:({description:e,name:t,directives:r,types:n})=>ut("",e,"\n")+st(["union",t,st(r," "),ut("= ",st(n," | "))]," ")},EnumTypeDefinition:{leave:({description:e,name:t,directives:r,values:n})=>ut("",e,"\n")+st(["enum",t,st(r," "),at(n)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:r})=>ut("",e,"\n")+st([t,st(r," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:r,fields:n})=>ut("",e,"\n")+st(["input",t,st(r," "),at(n)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:r,repeatable:n,locations:i})=>ut("",e,"\n")+"directive @"+t+(lt(r)?ut("(\n",ct(st(r,"\n")),"\n)"):ut("(",st(r,", "),")"))+(n?" repeatable":"")+" on "+st(i," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>st(["extend schema",st(e," "),at(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>st(["extend scalar",e,st(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:r,fields:n})=>st(["extend type",e,ut("implements ",st(t," & ")),st(r," "),at(n)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:r,fields:n})=>st(["extend interface",e,ut("implements ",st(t," & ")),st(r," "),at(n)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:r})=>st(["extend union",e,st(t," "),ut("= ",st(r," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:r})=>st(["extend enum",e,st(t," "),at(r)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:r})=>st(["extend input",e,st(t," "),at(r)]," ")}};function st(e,t=""){var r;return null!==(r=null==e?void 0:e.filter((e=>e)).join(t))&&void 0!==r?r:""}function at(e){return ut("{\n",ct(st(e,"\n")),"\n}")}function ut(e,t,r=""){return null!=t&&""!==t?e+t+r:""}function ct(e){return ut(" ",e.replace(/\n/g,"\n "))}function lt(e){var t;return null!==(t=null==e?void 0:e.some((e=>e.includes("\n"))))&&void 0!==t&&t}var ft={http:{includeQuery:!0,includeExtensions:!1,preserveHeaderCase:!1},headers:{accept:"*/*","content-type":"application/json"},options:{method:"POST"}},pt=function(e,t){return t(e)};function dt(e,t){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];return r.unshift(t),ht.apply(void 0,(0,n.__spreadArray)([e,pt],r,!1))}function ht(e,t){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];var o={},s={};r.forEach((function(e){o=(0,n.__assign)((0,n.__assign)((0,n.__assign)({},o),e.options),{headers:(0,n.__assign)((0,n.__assign)({},o.headers),e.headers)}),e.credentials&&(o.credentials=e.credentials),s=(0,n.__assign)((0,n.__assign)({},s),e.http)})),o.headers&&(o.headers=yt(o.headers,s.preserveHeaderCase));var a=e.operationName,u=e.extensions,c=e.variables,l=e.query,f={operationName:a,variables:c};return s.includeExtensions&&(f.extensions=u),s.includeQuery&&(f.query=t(l,it)),{options:o,body:f}}function yt(e,t){if(!t){var r=Object.create(null);return Object.keys(Object(e)).forEach((function(t){r[t.toLowerCase()]=e[t]})),r}var n=Object.create(null);Object.keys(Object(e)).forEach((function(t){n[t.toLowerCase()]={originalName:t,value:e[t]}}));var i=Object.create(null);return Object.keys(n).forEach((function(e){i[n[e].originalName]=n[e].value})),i}var vt=function(){if("undefined"==typeof AbortController)return{controller:!1,signal:!1};var e=new AbortController;return{controller:e,signal:e.signal}};function mt(e,t){var r=[],n=function(e,t){r.push("".concat(e,"=").concat(encodeURIComponent(t)))};if("query"in t&&n("query",t.query),t.operationName&&n("operationName",t.operationName),t.variables){var i=void 0;try{i=De(t.variables,"Variables map")}catch(e){return{parseError:e}}n("variables",i)}if(t.extensions){var o=void 0;try{o=De(t.extensions,"Extensions map")}catch(e){return{parseError:e}}n("extensions",o)}var s="",a=e,u=e.indexOf("#");-1!==u&&(s=e.substr(u),a=e.substr(0,u));var c=-1===a.indexOf("?")?"?":"&";return{newURI:a+c+r.join("&")+s}}function bt(e){return new Q((function(t){t.error(e)}))}var gt=d((function(){return fetch})),_t=function(e){void 0===e&&(e={});var t=e.uri,r=void 0===t?"/graphql":t,i=e.fetch,o=e.print,s=void 0===o?pt:o,a=e.includeExtensions,u=e.preserveHeaderCase,c=e.useGETForQueries,l=e.includeUnusedVariables,f=void 0!==l&&l,p=(0,n.__rest)(e,["uri","fetch","print","includeExtensions","preserveHeaderCase","useGETForQueries","includeUnusedVariables"]);__DEV__&&He(i||gt);var h={http:{includeExtensions:a,preserveHeaderCase:u},options:p.fetchOptions,credentials:p.credentials,headers:p.headers};return new be((function(e){var t=Re(e,r),o=e.getContext(),a={};if(o.clientAwareness){var u=o.clientAwareness,l=u.name,p=u.version;l&&(a["apollographql-client-name"]=l),p&&(a["apollographql-client-version"]=p)}var y,v=(0,n.__assign)((0,n.__assign)({},a),o.headers),m={http:o.http,options:o.fetchOptions,credentials:o.credentials,headers:v},b=ht(e,s,ft,h,m),g=b.options,_=b.body;if(_.variables&&!f){var w=new Set(Object.keys(_.variables));xe(e.query,{Variable:function(e,t,r){r&&"VariableDefinition"!==r.kind&&w.delete(e.name.value)}}),w.size&&(_.variables=(0,n.__assign)({},_.variables),w.forEach((function(e){delete _.variables[e]})))}if(!g.signal){var O=vt(),S=O.controller,E=O.signal;(y=S)&&(g.signal=E)}if(c&&!e.query.definitions.some((function(e){return"OperationDefinition"===e.kind&&"mutation"===e.operation}))&&(g.method="GET"),ke(["defer"],e.query)&&(g.headers=g.headers||{},g.headers.accept="multipart/mixed; deferSpec=20220824, application/json"),"GET"===g.method){var T=mt(t,_),j=T.newURI,P=T.parseError;if(P)return bt(P);t=j}else try{g.body=De(_,"Payload")}catch(P){return bt(P)}return new Q((function(r){return(i||d((function(){return fetch}))||gt)(t,g).then((function(t){var i;e.setContext({response:t});var o=null===(i=t.headers)||void 0===i?void 0:i.get("content-type");return null!==o&&/^multipart\/mixed/i.test(o)?function(e,t){var r,i,o;return(0,n.__awaiter)(this,void 0,void 0,(function(){var s,a,u,c,l,f,p,d,h,y,v,m,b,g,_,w,O,S,E,T;return(0,n.__generator)(this,(function(n){switch(n.label){case 0:if(void 0===TextDecoder)throw new Error("TextDecoder must be defined in the environment: please import a polyfill.");s=new TextDecoder("utf-8"),a=null===(r=e.headers)||void 0===r?void 0:r.get("content-type"),u="boundary=",c=(null==a?void 0:a.includes(u))?null==a?void 0:a.substring((null==a?void 0:a.indexOf(u))+u.length).replace(/['"]/g,"").replace(/\;(.*)/gm,"").trim():"-",l="--".concat(c),f="",p=Be(e),d=!0,n.label=1;case 1:return d?[4,p.next()]:[3,3];case 2:for(h=n.sent(),y=h.value,v=h.done,m="string"==typeof y?y:s.decode(y),d=!v,b=(f+=m).indexOf(l);b>-1;){if(g=void 0,T=[f.slice(0,b),f.slice(b+l.length)],f=T[1],(g=T[0]).trim()){if(_=g.indexOf("\r\n\r\n"),w=ze(g.slice(0,_)),(O=w["content-type"])&&-1===O.toLowerCase().indexOf("application/json"))throw new Error("Unsupported patch content type: application/json is required.");S=g.slice(_);try{E=Qe(e,S.replace("\r\n","")),(Object.keys(E).length>1||"data"in E||"incremental"in E||"errors"in E)&&(null===(i=t.next)||void 0===i||i.call(t,E))}catch(e){Ye(e,t)}}b=f.indexOf(l)}return[3,1];case 3:return null===(o=t.complete)||void 0===o||o.call(t),[2]}}))}))}(t,r):function(e,t,r){We(t)(e).then((function(e){var t,n;null===(t=r.next)||void 0===t||t.call(r,e),null===(n=r.complete)||void 0===n||n.call(r)})).catch((function(e){return Ye(e,r)}))}(t,e,r)})).catch((function(e){return Ye(e,r)})),function(){y&&y.abort()}}))}))},wt=function(e){function t(t){void 0===t&&(t={});var r=e.call(this,_t(t).request)||this;return r.options=t,r}return(0,n.__extends)(t,e),t}(be),Ot=Object.prototype,St=Ot.toString,Et=Ot.hasOwnProperty,Tt=Function.prototype.toString,jt=new Map;function Pt(e,t){try{return It(e,t)}finally{jt.clear()}}function It(e,t){if(e===t)return!0;var r,n,i,o=St.call(e);if(o!==St.call(t))return!1;switch(o){case"[object Array]":if(e.length!==t.length)return!1;case"[object Object]":if(kt(e,t))return!0;var s=xt(e),a=xt(t),u=s.length;if(u!==a.length)return!1;for(var c=0;c<u;++c)if(!Et.call(t,s[c]))return!1;for(c=0;c<u;++c){var l=s[c];if(!It(e[l],t[l]))return!1}return!0;case"[object Error]":return e.name===t.name&&e.message===t.message;case"[object Number]":if(e!=e)return t!=t;case"[object Boolean]":case"[object Date]":return+e==+t;case"[object RegExp]":case"[object String]":return e=="".concat(t);case"[object Map]":case"[object Set]":if(e.size!==t.size)return!1;if(kt(e,t))return!0;for(var f=e.entries(),p="[object Map]"===o;;){var d=f.next();if(d.done)break;var h=d.value,y=h[0],v=h[1];if(!t.has(y))return!1;if(p&&!It(v,t.get(y)))return!1}return!0;case"[object Uint16Array]":case"[object Uint8Array]":case"[object Uint32Array]":case"[object Int32Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object ArrayBuffer]":e=new Uint8Array(e),t=new Uint8Array(t);case"[object DataView]":var m=e.byteLength;if(m===t.byteLength)for(;m--&&e[m]===t[m];);return-1===m;case"[object AsyncFunction]":case"[object GeneratorFunction]":case"[object AsyncGeneratorFunction]":case"[object Function]":var b=Tt.call(e);return b===Tt.call(t)&&(n=Nt,!((i=(r=b).length-n.length)>=0&&r.indexOf(n,i)===i))}return!1}function xt(e){return Object.keys(e).filter(At,e)}function At(e){return void 0!==this[e]}var Nt="{ [native code] }";function kt(e,t){var r=jt.get(e);if(r){if(r.has(t))return!0}else jt.set(e,r=new Set);return r.add(t),!1}var Mt=Array.isArray;function Dt(e){return Array.isArray(e)&&e.length>0}var Rt=Object.prototype.hasOwnProperty;function Ct(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return $t(e)}function $t(e){var t=e[0]||{},r=e.length;if(r>1)for(var n=new qt,i=1;i<r;++i)t=n.merge(t,e[i]);return t}var Ft=function(e,t,r){return this.merge(e[r],t[r])},qt=function(){function e(e){void 0===e&&(e=Ft),this.reconciler=e,this.isObject=Y,this.pastCopies=new Set}return e.prototype.merge=function(e,t){for(var r=this,i=[],o=2;o<arguments.length;o++)i[o-2]=arguments[o];return Y(t)&&Y(e)?(Object.keys(t).forEach((function(o){if(Rt.call(e,o)){var s=e[o];if(t[o]!==s){var a=r.reconciler.apply(r,(0,n.__spreadArray)([e,t,o],i,!1));a!==s&&((e=r.shallowCopyForMerge(e))[o]=a)}}else(e=r.shallowCopyForMerge(e))[o]=t[o]})),e):t},e.prototype.shallowCopyForMerge=function(e){return Y(e)&&(this.pastCopies.has(e)||(e=Array.isArray(e)?e.slice(0):(0,n.__assign)({__proto__:Object.getPrototypeOf(e)},e),this.pastCopies.add(e))),e},e}();function Lt(e){return"incremental"in e}function Bt(e,t){var r=e,n=new qt;return Lt(t)&&Dt(t.incremental)&&t.incremental.forEach((function(e){for(var t=e.data,i=e.path,o=i.length-1;o>=0;--o){var s=i[o],a=isNaN(+s)?{}:[];a[s]=t,t=a}r=n.merge(r,t)})),r}var Ut,Vt,zt=function(){return Object.create(null)},Qt=Array.prototype,Yt=Qt.forEach,Wt=Qt.slice,Ht=function(){function e(e,t){void 0===e&&(e=!0),void 0===t&&(t=zt),this.weakness=e,this.makeData=t}return e.prototype.lookup=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this.lookupArray(e)},e.prototype.lookupArray=function(e){var t=this;return Yt.call(e,(function(e){return t=t.getChildTrie(e)})),t.data||(t.data=this.makeData(Wt.call(e)))},e.prototype.getChildTrie=function(t){var r=this.weakness&&function(e){switch(typeof e){case"object":if(null===e)break;case"function":return!0}return!1}(t)?this.weak||(this.weak=new WeakMap):this.strong||(this.strong=new Map),n=r.get(t);return n||r.set(t,n=new e(this.weakness,this.makeData)),n},e}(),Kt=function(){function e(){this.known=new($e?WeakSet:Set),this.pool=new Ht(Ce),this.passes=new WeakMap,this.keysByJSON=new Map,this.empty=this.admit({})}return e.prototype.isKnown=function(e){return Y(e)&&this.known.has(e)},e.prototype.pass=function(e){if(Y(e)){var t=function(e){return Y(e)?Mt(e)?e.slice(0):(0,n.__assign)({__proto__:Object.getPrototypeOf(e)},e):e}(e);return this.passes.set(t,e),t}return e},e.prototype.admit=function(e){var t=this;if(Y(e)){var r=this.passes.get(e);if(r)return r;switch(Object.getPrototypeOf(e)){case Array.prototype:if(this.known.has(e))return e;var n=e.map(this.admit,this);return(a=this.pool.lookupArray(n)).array||(this.known.add(a.array=n),__DEV__&&Object.freeze(n)),a.array;case null:case Object.prototype:if(this.known.has(e))return e;var i=Object.getPrototypeOf(e),o=[i],s=this.sortedKeys(e);o.push(s.json);var a,u=o.length;if(s.sorted.forEach((function(r){o.push(t.admit(e[r]))})),!(a=this.pool.lookupArray(o)).object){var c=a.object=Object.create(i);this.known.add(c),s.sorted.forEach((function(e,t){c[e]=o[u+t]})),__DEV__&&Object.freeze(c)}return a.object}}return e},e.prototype.sortedKeys=function(e){var t=Object.keys(e),r=this.pool.lookupArray(t);if(!r.keys){t.sort();var n=JSON.stringify(t);(r.keys=this.keysByJSON.get(n))||this.keysByJSON.set(n,r.keys={sorted:t,json:n})}return r.keys},e}(),Gt=Object.assign((function(e){if(Y(e)){void 0===Ut&&Jt();var t=Ut.admit(e),r=Vt.get(t);return void 0===r&&Vt.set(t,r=JSON.stringify(t)),r}return JSON.stringify(e)}),{reset:Jt});function Jt(){Ut=new Kt,Vt=new(Ce?WeakMap:Map)}function Zt(e,t,r){return new Q((function(n){var i=n.next,o=n.error,s=n.complete,a=0,u=!1,c={then:function(e){return new Promise((function(t){return t(e())}))}};function l(e,t){return e?function(t){++a;var r=function(){return e(t)};c=c.then(r,r).then((function(e){--a,i&&i.call(n,e),u&&f.complete()}),(function(e){throw--a,e})).catch((function(e){o&&o.call(n,e)}))}:function(e){return t&&t.call(n,e)}}var f={next:l(t,i),error:l(r,o),complete:function(){u=!0,a||s&&s.call(n)}},p=e.subscribe(f);return function(){return p.unsubscribe()}}))}function Xt(e){return Dt(er(e))}function er(e){var t=Dt(e.errors)?e.errors.slice(0):[];return Lt(e)&&Dt(e.incremental)&&e.incremental.forEach((function(e){e.errors&&t.push.apply(t,e.errors)})),t}var tr={kind:je.FIELD,name:{kind:je.NAME,value:"__typename"}};function rr(e,t){return!e||e.selectionSet.selections.every((function(e){return e.kind===je.FRAGMENT_SPREAD&&rr(t[e.name.value],t)}))}function nr(e){return rr(ue(e)||function(e){__DEV__?u("Document"===e.kind,'Expecting a parsed GraphQL document. Perhaps you need to wrap the query string in a "gql" tag? http://docs.apollostack.com/apollo-client/core.html#gql'):u("Document"===e.kind,51),__DEV__?u(e.definitions.length<=1,"Fragment must have exactly one definition."):u(e.definitions.length<=1,52);var t=e.definitions[0];return __DEV__?u("FragmentDefinition"===t.kind,"Must be a fragment definition."):u("FragmentDefinition"===t.kind,53),t}(e),H(le(e)))?null:e}function ir(e){var t=new Map;return function(r){void 0===r&&(r=e);var n=t.get(r);return n||t.set(r,n={variables:new Set,fragmentSpreads:new Set}),n}}function or(e,t){for(var r=ir(""),i=ir(""),o=function(e){for(var t=0,n=void 0;t<e.length&&(n=e[t]);++t)if(!Mt(n)){if(n.kind===je.OPERATION_DEFINITION)return r(n.name&&n.name.value);if(n.kind===je.FRAGMENT_DEFINITION)return i(n.name.value)}return __DEV__&&u.error("Could not find operation or fragment"),null},s=0,a=t.definitions.length-1;a>=0;--a)t.definitions[a].kind===je.OPERATION_DEFINITION&&++s;var c=function(e){var t=new Set,r=[];return e.forEach((function(e){e.name?t.add(e.name):e.test&&r.push(e.test)})),function(e){return t.has(e.name.value)||r.some((function(t){return t(e)}))}}(e),l=e.some((function(e){return e.remove})),f=function(e){return l&&e&&e.some(c)},p=new Map,d=!1,h={enter:function(e){if(f(e.directives))return d=!0,null}},y=xe(t,{Field:h,InlineFragment:h,VariableDefinition:{enter:function(){return!1}},Variable:{enter:function(e,t,r,n,i){var s=o(i);s&&s.variables.add(e.name.value)}},FragmentSpread:{enter:function(e,t,r,n,i){if(f(e.directives))return d=!0,null;var s=o(i);s&&s.fragmentSpreads.add(e.name.value)}},FragmentDefinition:{enter:function(e,t,r,n){p.set(JSON.stringify(n),e)},leave:function(e,t,r,n){return e===p.get(JSON.stringify(n))?e:s>0&&e.selectionSet.selections.every((function(e){return e.kind===je.FIELD&&"__typename"===e.name.value}))?(i(e.name.value).removed=!0,d=!0,null):void 0}},Directive:{leave:function(e){if(c(e))return d=!0,null}}});if(!d)return t;var v=function(e){return e.transitiveVars||(e.transitiveVars=new Set(e.variables),e.removed||e.fragmentSpreads.forEach((function(t){v(i(t)).transitiveVars.forEach((function(t){e.transitiveVars.add(t)}))}))),e},m=new Set;y.definitions.forEach((function(e){e.kind===je.OPERATION_DEFINITION?v(r(e.name&&e.name.value)).fragmentSpreads.forEach((function(e){m.add(e)})):e.kind!==je.FRAGMENT_DEFINITION||0!==s||i(e.name.value).removed||m.add(e.name.value)})),m.forEach((function(e){v(i(e)).fragmentSpreads.forEach((function(e){m.add(e)}))}));var b={enter:function(e){if(t=e.name.value,!m.has(t)||i(t).removed)return null;var t}};return nr(xe(y,{FragmentSpread:b,FragmentDefinition:b,OperationDefinition:{leave:function(e){if(e.variableDefinitions){var t=v(r(e.name&&e.name.value)).transitiveVars;if(t.size<e.variableDefinitions.length)return(0,n.__assign)((0,n.__assign)({},e),{variableDefinitions:e.variableDefinitions.filter((function(e){return t.has(e.variable.name.value)}))})}}}}))}var sr=Object.assign((function(e){return xe(e,{SelectionSet:{enter:function(e,t,r){if(!r||r.kind!==je.OPERATION_DEFINITION){var i=e.selections;if(i&&!i.some((function(e){return se(e)&&("__typename"===e.name.value||0===e.name.value.lastIndexOf("__",0))}))){var o=r;if(!(se(o)&&o.directives&&o.directives.some((function(e){return"export"===e.name.value}))))return(0,n.__assign)((0,n.__assign)({},e),{selections:(0,n.__spreadArray)((0,n.__spreadArray)([],i,!0),[tr],!1)})}}}}})}),{added:function(e){return e===tr}}),ar={test:function(e){var t="connection"===e.name.value;return t&&(e.arguments&&e.arguments.some((function(e){return"key"===e.name.value}))||__DEV__&&u.warn("Removing an @connection directive even though it does not have a key. You may want to use the key parameter to specify a store key.")),t}};function ur(e){return"query"===pe(e).operation?e:xe(e,{OperationDefinition:{enter:function(e){return(0,n.__assign)((0,n.__assign)({},e),{operation:"query"})}}})}var cr=new Map;function lr(e){var t=cr.get(e)||1;return cr.set(e,t+1),"".concat(e,":").concat(t,":").concat(Math.random().toString(36).slice(2))}function fr(e,t,r){var n=[];e.forEach((function(e){return e[t]&&n.push(e)})),n.forEach((function(e){return e[t](r)}))}function pr(e){function t(t){Object.defineProperty(e,t,{value:Q})}return Fe&&Symbol.species&&t(Symbol.species),t("@@species"),e}function dr(e){return e&&"function"==typeof e.then}var hr=function(e){function t(t){var r=e.call(this,(function(e){return r.addObserver(e),function(){return r.removeObserver(e)}}))||this;return r.observers=new Set,r.promise=new Promise((function(e,t){r.resolve=e,r.reject=t})),r.handlers={next:function(e){null!==r.sub&&(r.latest=["next",e],r.notify("next",e),fr(r.observers,"next",e))},error:function(e){var t=r.sub;null!==t&&(t&&setTimeout((function(){return t.unsubscribe()})),r.sub=null,r.latest=["error",e],r.reject(e),r.notify("error",e),fr(r.observers,"error",e))},complete:function(){var e=r,t=e.sub,n=e.sources;if(null!==t){var i=(void 0===n?[]:n).shift();i?dr(i)?i.then((function(e){return r.sub=e.subscribe(r.handlers)})):r.sub=i.subscribe(r.handlers):(t&&setTimeout((function(){return t.unsubscribe()})),r.sub=null,r.latest&&"next"===r.latest[0]?r.resolve(r.latest[1]):r.resolve(),r.notify("complete"),fr(r.observers,"complete"))}}},r.nextResultListeners=new Set,r.cancel=function(e){r.reject(e),r.sources=[],r.handlers.complete()},r.promise.catch((function(e){})),"function"==typeof t&&(t=[new Q(t)]),dr(t)?t.then((function(e){return r.start(e)}),r.handlers.error):r.start(t),r}return(0,n.__extends)(t,e),t.prototype.start=function(e){void 0===this.sub&&(this.sources=Array.from(e),this.handlers.complete())},t.prototype.deliverLastMessage=function(e){if(this.latest){var t=this.latest[0],r=e[t];r&&r.call(e,this.latest[1]),null===this.sub&&"next"===t&&e.complete&&e.complete()}},t.prototype.addObserver=function(e){this.observers.has(e)||(this.deliverLastMessage(e),this.observers.add(e))},t.prototype.removeObserver=function(e){this.observers.delete(e)&&this.observers.size<1&&this.handlers.complete()},t.prototype.notify=function(e,t){var r=this.nextResultListeners;r.size&&(this.nextResultListeners=new Set,r.forEach((function(r){return r(e,t)})))},t.prototype.beforeNext=function(e){var t=!1;this.nextResultListeners.add((function(r,n){t||(t=!0,e(r,n))}))},t}(Q);function yr(e){return e.hasOwnProperty("graphQLErrors")}pr(hr);var vr,mr=function(e){function t(r){var n,i,o=r.graphQLErrors,s=r.clientErrors,a=r.networkError,u=r.errorMessage,c=r.extraInfo,l=e.call(this,u)||this;return l.name="ApolloError",l.graphQLErrors=o||[],l.clientErrors=s||[],l.networkError=a||null,l.message=u||(i="",(Dt((n=l).graphQLErrors)||Dt(n.clientErrors))&&(n.graphQLErrors||[]).concat(n.clientErrors||[]).forEach((function(e){var t=e?e.message:"Error message not found.";i+="".concat(t,"\n")})),n.networkError&&(i+="".concat(n.networkError.message,"\n")),i=i.replace(/\n$/,"")),l.extraInfo=c,l.__proto__=t.prototype,l}return(0,n.__extends)(t,e),t}(Error);function br(e){return!!e&&e<7}!function(e){e[e.loading=1]="loading",e[e.setVariables=2]="setVariables",e[e.fetchMore=3]="fetchMore",e[e.refetch=4]="refetch",e[e.poll=6]="poll",e[e.ready=7]="ready",e[e.error=8]="error"}(vr||(vr={}));var gr=Object.prototype.toString;function _r(e){return wr(e)}function wr(e,t){switch(gr.call(e)){case"[object Array]":if((t=t||new Map).has(e))return t.get(e);var r=e.slice(0);return t.set(e,r),r.forEach((function(e,n){r[n]=wr(e,t)})),r;case"[object Object]":if((t=t||new Map).has(e))return t.get(e);var n=Object.create(Object.getPrototypeOf(e));return t.set(e,n),Object.keys(e).forEach((function(r){n[r]=wr(e[r],t)})),n;default:return e}}function Or(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=Object.create(null);return e.forEach((function(e){e&&Object.keys(e).forEach((function(t){var n=e[t];void 0!==n&&(r[t]=n)}))})),r}var Sr=Object.assign,Er=Object.hasOwnProperty,Tr=function(e){function t(t){var r=t.queryManager,i=t.queryInfo,o=t.options,s=e.call(this,(function(e){try{var t=e._subscription._observer;t&&!t.error&&(t.error=Pr)}catch(e){}var r=!s.observers.size;s.observers.add(e);var n=s.last;return n&&n.error?e.error&&e.error(n.error):n&&n.result&&e.next&&e.next(n.result),r&&s.reobserve().catch((function(){})),function(){s.observers.delete(e)&&!s.observers.size&&s.tearDownQuery()}}))||this;s.observers=new Set,s.subscriptions=new Set,s.queryInfo=i,s.queryManager=r,s.isTornDown=!1;var a=r.defaultOptions.watchQuery,u=(void 0===a?{}:a).fetchPolicy,c=void 0===u?"cache-first":u,l=o.fetchPolicy,f=void 0===l?c:l,p=o.initialFetchPolicy,d=void 0===p?"standby"===f?c:f:p;s.options=(0,n.__assign)((0,n.__assign)({},o),{initialFetchPolicy:d,fetchPolicy:f}),s.queryId=i.queryId||r.generateQueryId();var h=ue(s.query);return s.queryName=h&&h.name&&h.name.value,s}return(0,n.__extends)(t,e),Object.defineProperty(t.prototype,"query",{get:function(){return this.queryManager.transform(this.options.query).document},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"variables",{get:function(){return this.options.variables},enumerable:!1,configurable:!0}),t.prototype.result=function(){var e=this;return new Promise((function(t,r){var n={next:function(r){t(r),e.observers.delete(n),e.observers.size||e.queryManager.removeQuery(e.queryId),setTimeout((function(){i.unsubscribe()}),0)},error:r},i=e.subscribe(n)}))},t.prototype.getCurrentResult=function(e){void 0===e&&(e=!0);var t=this.getLastResult(!0),r=this.queryInfo.networkStatus||t&&t.networkStatus||vr.ready,i=(0,n.__assign)((0,n.__assign)({},t),{loading:br(r),networkStatus:r}),o=this.options.fetchPolicy,s=void 0===o?"cache-first":o;if("network-only"===s||"no-cache"===s||"standby"===s||this.queryManager.transform(this.options.query).hasForcedResolvers);else{var a=this.queryInfo.getDiff();(a.complete||this.options.returnPartialData)&&(i.data=a.result),Pt(i.data,{})&&(i.data=void 0),a.complete?(delete i.partial,!a.complete||i.networkStatus!==vr.loading||"cache-first"!==s&&"cache-only"!==s||(i.networkStatus=vr.ready,i.loading=!1)):i.partial=!0,!__DEV__||a.complete||this.options.partialRefetch||i.loading||i.data||i.error||Ir(a.missing)}return e&&this.updateLastResult(i),i},t.prototype.isDifferentFromLastResult=function(e,t){return!this.last||!Pt(this.last.result,e)||t&&!Pt(this.last.variables,t)},t.prototype.getLast=function(e,t){var r=this.last;if(r&&r[e]&&(!t||Pt(r.variables,this.variables)))return r[e]},t.prototype.getLastResult=function(e){return this.getLast("result",e)},t.prototype.getLastError=function(e){return this.getLast("error",e)},t.prototype.resetLastResults=function(){delete this.last,this.isTornDown=!1},t.prototype.resetQueryStoreErrors=function(){this.queryManager.resetErrors(this.queryId)},t.prototype.refetch=function(e){var t,r={pollInterval:0},i=this.options.fetchPolicy;if(r.fetchPolicy="cache-and-network"===i?i:"no-cache"===i?"no-cache":"network-only",__DEV__&&e&&Er.call(e,"variables")){var o=fe(this.query),s=o.variableDefinitions;s&&s.some((function(e){return"variables"===e.variable.name.value}))||__DEV__&&u.warn("Called refetch(".concat(JSON.stringify(e),") for query ").concat((null===(t=o.name)||void 0===t?void 0:t.value)||JSON.stringify(o),", which does not declare a $variables variable.\nDid you mean to call refetch(variables) instead of refetch({ variables })?"))}return e&&!Pt(this.options.variables,e)&&(r.variables=this.options.variables=(0,n.__assign)((0,n.__assign)({},this.options.variables),e)),this.queryInfo.resetLastWrite(),this.reobserve(r,vr.refetch)},t.prototype.fetchMore=function(e){var t=this,r=(0,n.__assign)((0,n.__assign)({},e.query?e:(0,n.__assign)((0,n.__assign)((0,n.__assign)((0,n.__assign)({},this.options),{query:this.query}),e),{variables:(0,n.__assign)((0,n.__assign)({},this.options.variables),e.variables)})),{fetchPolicy:"no-cache"}),i=this.queryManager.generateQueryId(),o=this.queryInfo,s=o.networkStatus;o.networkStatus=vr.fetchMore,r.notifyOnNetworkStatusChange&&this.observe();var a=new Set;return this.queryManager.fetchQuery(i,r,vr.fetchMore).then((function(n){return t.queryManager.removeQuery(i),o.networkStatus===vr.fetchMore&&(o.networkStatus=s),t.queryManager.cache.batch({update:function(i){var o=e.updateQuery;o?i.updateQuery({query:t.query,variables:t.variables,returnPartialData:!0,optimistic:!1},(function(e){return o(e,{fetchMoreResult:n.data,variables:r.variables})})):i.writeQuery({query:r.query,variables:r.variables,data:n.data})},onWatchUpdated:function(e){a.add(e.query)}}),n})).finally((function(){a.has(t.query)||jr(t)}))},t.prototype.subscribeToMore=function(e){var t=this,r=this.queryManager.startGraphQLSubscription({query:e.document,variables:e.variables,context:e.context}).subscribe({next:function(r){var n=e.updateQuery;n&&t.updateQuery((function(e,t){var i=t.variables;return n(e,{subscriptionData:r,variables:i})}))},error:function(t){e.onError?e.onError(t):__DEV__&&u.error("Unhandled GraphQL subscription error",t)}});return this.subscriptions.add(r),function(){t.subscriptions.delete(r)&&r.unsubscribe()}},t.prototype.setOptions=function(e){return this.reobserve(e)},t.prototype.setVariables=function(e){return Pt(this.variables,e)?this.observers.size?this.result():Promise.resolve():(this.options.variables=e,this.observers.size?this.reobserve({fetchPolicy:this.options.initialFetchPolicy,variables:e},vr.setVariables):Promise.resolve())},t.prototype.updateQuery=function(e){var t=this.queryManager,r=e(t.cache.diff({query:this.options.query,variables:this.variables,returnPartialData:!0,optimistic:!1}).result,{variables:this.variables});r&&(t.cache.writeQuery({query:this.options.query,data:r,variables:this.variables}),t.broadcastQueries())},t.prototype.startPolling=function(e){this.options.pollInterval=e,this.updatePolling()},t.prototype.stopPolling=function(){this.options.pollInterval=0,this.updatePolling()},t.prototype.applyNextFetchPolicy=function(e,t){if(t.nextFetchPolicy){var r=t.fetchPolicy,n=void 0===r?"cache-first":r,i=t.initialFetchPolicy,o=void 0===i?n:i;"standby"===n||("function"==typeof t.nextFetchPolicy?t.fetchPolicy=t.nextFetchPolicy(n,{reason:e,options:t,observable:this,initialFetchPolicy:o}):t.fetchPolicy="variables-changed"===e?o:t.nextFetchPolicy)}return t.fetchPolicy},t.prototype.fetch=function(e,t){return this.queryManager.setObservableQuery(this),this.queryManager.fetchQueryObservable(this.queryId,e,t)},t.prototype.updatePolling=function(){var e=this;if(!this.queryManager.ssrMode){var t=this.pollingInfo,r=this.options.pollInterval;if(r){if(!t||t.interval!==r){__DEV__?u(r,"Attempted to start a polling query without a polling interval."):u(r,13),(t||(this.pollingInfo={})).interval=r;var n=function(){e.pollingInfo&&(br(e.queryInfo.networkStatus)?i():e.reobserve({fetchPolicy:"no-cache"===e.options.initialFetchPolicy?"no-cache":"network-only"},vr.poll).then(i,i))},i=function(){var t=e.pollingInfo;t&&(clearTimeout(t.timeout),t.timeout=setTimeout(n,t.interval))};i()}}else t&&(clearTimeout(t.timeout),delete this.pollingInfo)}},t.prototype.updateLastResult=function(e,t){return void 0===t&&(t=this.variables),this.last=(0,n.__assign)((0,n.__assign)({},this.last),{result:this.queryManager.assumeImmutableResults?e:_r(e),variables:t}),Dt(e.errors)||delete this.last.error,this.last},t.prototype.reobserve=function(e,t){var r=this;this.isTornDown=!1;var i=t===vr.refetch||t===vr.fetchMore||t===vr.poll,o=this.options.variables,s=this.options.fetchPolicy,a=Or(this.options,e||{}),u=i?a:Sr(this.options,a);i||(this.updatePolling(),e&&e.variables&&!Pt(e.variables,o)&&"standby"!==u.fetchPolicy&&u.fetchPolicy===s&&(this.applyNextFetchPolicy("variables-changed",u),void 0===t&&(t=vr.setVariables)));var c=u.variables&&(0,n.__assign)({},u.variables),l=this.fetch(u,t),f={next:function(e){r.reportResult(e,c)},error:function(e){r.reportError(e,c)}};return i||(this.concast&&this.observer&&this.concast.removeObserver(this.observer),this.concast=l,this.observer=f),l.addObserver(f),l.promise},t.prototype.observe=function(){this.reportResult(this.getCurrentResult(!1),this.variables)},t.prototype.reportResult=function(e,t){var r=this.getLastError();(r||this.isDifferentFromLastResult(e,t))&&((r||!e.partial||this.options.returnPartialData)&&this.updateLastResult(e,t),fr(this.observers,"next",e))},t.prototype.reportError=function(e,t){var r=(0,n.__assign)((0,n.__assign)({},this.getLastResult()),{error:e,errors:e.graphQLErrors,networkStatus:vr.error,loading:!1});this.updateLastResult(r,t),fr(this.observers,"error",this.last.error=e)},t.prototype.hasObservers=function(){return this.observers.size>0},t.prototype.tearDownQuery=function(){this.isTornDown||(this.concast&&this.observer&&(this.concast.removeObserver(this.observer),delete this.concast,delete this.observer),this.stopPolling(),this.subscriptions.forEach((function(e){return e.unsubscribe()})),this.subscriptions.clear(),this.queryManager.stopQuery(this.queryId),this.observers.clear(),this.isTornDown=!0)},t}(Q);function jr(e){var t=e.options,r=t.fetchPolicy,n=t.nextFetchPolicy;return"cache-and-network"===r||"network-only"===r?e.reobserve({fetchPolicy:"cache-first",nextFetchPolicy:function(){return this.nextFetchPolicy=n,"function"==typeof n?n.apply(this,arguments):r}}):e.reobserve()}function Pr(e){__DEV__&&u.error("Unhandled error",e.message,e.stack)}function Ir(e){__DEV__&&e&&__DEV__&&u.debug("Missing cache result fields: ".concat(JSON.stringify(e)),e)}function xr(e){return e.kind===je.FIELD||e.kind===je.FRAGMENT_SPREAD||e.kind===je.INLINE_FRAGMENT}pr(Tr);var Ar=null,Nr={},kr=1;function Mr(e){try{return e()}catch(e){}}var Dr="@wry/context:Slot",Rr=Mr((function(){return globalThis}))||Mr((function(){return r.g}))||Object.create(null),Cr=Rr[Dr]||Array[Dr]||function(e){try{Object.defineProperty(Rr,Dr,{value:e,enumerable:!1,writable:!1,configurable:!0})}finally{return e}}(function(){function e(){this.id=["slot",kr++,Date.now(),Math.random().toString(36).slice(2)].join(":")}return e.prototype.hasValue=function(){for(var e=Ar;e;e=e.parent)if(this.id in e.slots){var t=e.slots[this.id];if(t===Nr)break;return e!==Ar&&(Ar.slots[this.id]=t),!0}return Ar&&(Ar.slots[this.id]=Nr),!1},e.prototype.getValue=function(){if(this.hasValue())return Ar.slots[this.id]},e.prototype.withValue=function(e,t,r,n){var i,o=((i={__proto__:null})[this.id]=e,i),s=Ar;Ar={parent:s,slots:o};try{return t.apply(n,r)}finally{Ar=s}},e.bind=function(e){var t=Ar;return function(){var r=Ar;try{return Ar=t,e.apply(this,arguments)}finally{Ar=r}}},e.noContext=function(e,t,r){if(!Ar)return e.apply(r,t);var n=Ar;try{return Ar=null,e.apply(r,t)}finally{Ar=n}},e}());function $r(){}Cr.bind,Cr.noContext;var Fr,qr=function(){function e(e,t){void 0===e&&(e=1/0),void 0===t&&(t=$r),this.max=e,this.dispose=t,this.map=new Map,this.newest=null,this.oldest=null}return e.prototype.has=function(e){return this.map.has(e)},e.prototype.get=function(e){var t=this.getNode(e);return t&&t.value},e.prototype.getNode=function(e){var t=this.map.get(e);if(t&&t!==this.newest){var r=t.older,n=t.newer;n&&(n.older=r),r&&(r.newer=n),t.older=this.newest,t.older.newer=t,t.newer=null,this.newest=t,t===this.oldest&&(this.oldest=n)}return t},e.prototype.set=function(e,t){var r=this.getNode(e);return r?r.value=t:(r={key:e,value:t,newer:null,older:this.newest},this.newest&&(this.newest.newer=r),this.newest=r,this.oldest=this.oldest||r,this.map.set(e,r),r.value)},e.prototype.clean=function(){for(;this.oldest&&this.map.size>this.max;)this.delete(this.oldest.key)},e.prototype.delete=function(e){var t=this.map.get(e);return!!t&&(t===this.newest&&(this.newest=t.older),t===this.oldest&&(this.oldest=t.newer),t.newer&&(t.newer.older=t.older),t.older&&(t.older.newer=t.newer),this.map.delete(e),this.dispose(t.value,e),!0)},e}(),Lr=new Cr,Br=Object.prototype.hasOwnProperty,Ur=void 0===(Fr=Array.from)?function(e){var t=[];return e.forEach((function(e){return t.push(e)})),t}:Fr;function Vr(e){var t=e.unsubscribe;"function"==typeof t&&(e.unsubscribe=void 0,t())}var zr=[];function Qr(e,t){if(!e)throw new Error(t||"assertion failure")}function Yr(e){switch(e.length){case 0:throw new Error("unknown value");case 1:return e[0];case 2:throw e[1]}}var Wr=function(){function e(t){this.fn=t,this.parents=new Set,this.childValues=new Map,this.dirtyChildren=null,this.dirty=!0,this.recomputing=!1,this.value=[],this.deps=null,++e.count}return e.prototype.peek=function(){if(1===this.value.length&&!Gr(this))return Hr(this),this.value[0]},e.prototype.recompute=function(e){return Qr(!this.recomputing,"already recomputing"),Hr(this),Gr(this)?function(e,t){return nn(e),Lr.withValue(e,Kr,[e,t]),function(e,t){if("function"==typeof e.subscribe)try{Vr(e),e.unsubscribe=e.subscribe.apply(null,t)}catch(t){return e.setDirty(),!1}return!0}(e,t)&&function(e){e.dirty=!1,Gr(e)||Zr(e)}(e),Yr(e.value)}(this,e):Yr(this.value)},e.prototype.setDirty=function(){this.dirty||(this.dirty=!0,this.value.length=0,Jr(this),Vr(this))},e.prototype.dispose=function(){var e=this;this.setDirty(),nn(this),Xr(this,(function(t,r){t.setDirty(),on(t,e)}))},e.prototype.forget=function(){this.dispose()},e.prototype.dependOn=function(e){e.add(this),this.deps||(this.deps=zr.pop()||new Set),this.deps.add(e)},e.prototype.forgetDeps=function(){var e=this;this.deps&&(Ur(this.deps).forEach((function(t){return t.delete(e)})),this.deps.clear(),zr.push(this.deps),this.deps=null)},e.count=0,e}();function Hr(e){var t=Lr.getValue();if(t)return e.parents.add(t),t.childValues.has(e)||t.childValues.set(e,[]),Gr(e)?en(t,e):tn(t,e),t}function Kr(e,t){e.recomputing=!0,e.value.length=0;try{e.value[0]=e.fn.apply(null,t)}catch(t){e.value[1]=t}e.recomputing=!1}function Gr(e){return e.dirty||!(!e.dirtyChildren||!e.dirtyChildren.size)}function Jr(e){Xr(e,en)}function Zr(e){Xr(e,tn)}function Xr(e,t){var r=e.parents.size;if(r)for(var n=Ur(e.parents),i=0;i<r;++i)t(n[i],e)}function en(e,t){Qr(e.childValues.has(t)),Qr(Gr(t));var r=!Gr(e);if(e.dirtyChildren){if(e.dirtyChildren.has(t))return}else e.dirtyChildren=zr.pop()||new Set;e.dirtyChildren.add(t),r&&Jr(e)}function tn(e,t){Qr(e.childValues.has(t)),Qr(!Gr(t));var r,n,i,o=e.childValues.get(t);0===o.length?e.childValues.set(t,t.value.slice(0)):(r=o,n=t.value,(i=r.length)>0&&i===n.length&&r[i-1]===n[i-1]||e.setDirty()),rn(e,t),Gr(e)||Zr(e)}function rn(e,t){var r=e.dirtyChildren;r&&(r.delete(t),0===r.size&&(zr.length<100&&zr.push(r),e.dirtyChildren=null))}function nn(e){e.childValues.size>0&&e.childValues.forEach((function(t,r){on(e,r)})),e.forgetDeps(),Qr(null===e.dirtyChildren)}function on(e,t){t.parents.delete(e),e.childValues.delete(t),rn(e,t)}var sn={setDirty:!0,dispose:!0,forget:!0};function an(e){var t=new Map,r=e&&e.subscribe;function n(e){var n=Lr.getValue();if(n){var i=t.get(e);i||t.set(e,i=new Set),n.dependOn(i),"function"==typeof r&&(Vr(i),i.unsubscribe=r(e))}}return n.dirty=function(e,r){var n=t.get(e);if(n){var i=r&&Br.call(sn,r)?r:"setDirty";Ur(n).forEach((function(e){return e[i]()})),t.delete(e),Vr(n)}},n}function un(){var e=new Ht("function"==typeof WeakMap);return function(){return e.lookupArray(arguments)}}un();var cn=new Set;function ln(e,t){void 0===t&&(t=Object.create(null));var r=new qr(t.max||Math.pow(2,16),(function(e){return e.dispose()})),n=t.keyArgs,i=t.makeCacheKey||un(),o=function(){var o=i.apply(null,n?n.apply(null,arguments):arguments);if(void 0===o)return e.apply(null,arguments);var s=r.get(o);s||(r.set(o,s=new Wr(e)),s.subscribe=t.subscribe,s.forget=function(){return r.delete(o)});var a=s.recompute(Array.prototype.slice.call(arguments));return r.set(o,s),cn.add(r),Lr.hasValue()||(cn.forEach((function(e){return e.clean()})),cn.clear()),a};function s(e){var t=r.get(e);t&&t.setDirty()}function a(e){var t=r.get(e);if(t)return t.peek()}function u(e){return r.delete(e)}return Object.defineProperty(o,"size",{get:function(){return r.map.size},configurable:!1,enumerable:!1}),o.dirtyKey=s,o.dirty=function(){s(i.apply(null,arguments))},o.peekKey=a,o.peek=function(){return a(i.apply(null,arguments))},o.forgetKey=u,o.forget=function(){return u(i.apply(null,arguments))},o.makeCacheKey=i,o.getKey=n?function(){return i.apply(null,n.apply(null,arguments))}:i,Object.freeze(o)}var fn=new Cr,pn=new WeakMap;function dn(e){var t=pn.get(e);return t||pn.set(e,t={vars:new Set,dep:an()}),t}function hn(e){dn(e).vars.forEach((function(t){return t.forgetCache(e)}))}function yn(e){var t=new Set,r=new Set,n=function(o){if(arguments.length>0){if(e!==o){e=o,t.forEach((function(e){dn(e).dep.dirty(n),vn(e)}));var s=Array.from(r);r.clear(),s.forEach((function(t){return t(e)}))}}else{var a=fn.getValue();a&&(i(a),dn(a).dep(n))}return e};n.onNextChange=function(e){return r.add(e),function(){r.delete(e)}};var i=n.attachCache=function(e){return t.add(e),dn(e).vars.add(n),n};return n.forgetCache=function(e){return t.delete(e)},n}function vn(e){e.broadcastWatches&&e.broadcastWatches()}var mn=function(){function e(e){var t=e.cache,r=e.client,n=e.resolvers,i=e.fragmentMatcher;this.selectionsToResolveCache=new WeakMap,this.cache=t,r&&(this.client=r),n&&this.addResolvers(n),i&&this.setFragmentMatcher(i)}return e.prototype.addResolvers=function(e){var t=this;this.resolvers=this.resolvers||{},Array.isArray(e)?e.forEach((function(e){t.resolvers=Ct(t.resolvers,e)})):this.resolvers=Ct(this.resolvers,e)},e.prototype.setResolvers=function(e){this.resolvers={},this.addResolvers(e)},e.prototype.getResolvers=function(){return this.resolvers||{}},e.prototype.runResolvers=function(e){var t=e.document,r=e.remoteResult,i=e.context,o=e.variables,s=e.onlyRunForcedResolvers,a=void 0!==s&&s;return(0,n.__awaiter)(this,void 0,void 0,(function(){return(0,n.__generator)(this,(function(e){return t?[2,this.resolveDocument(t,r.data,i,o,this.fragmentMatcher,a).then((function(e){return(0,n.__assign)((0,n.__assign)({},r),{data:e.result})}))]:[2,r]}))}))},e.prototype.setFragmentMatcher=function(e){this.fragmentMatcher=e},e.prototype.getFragmentMatcher=function(){return this.fragmentMatcher},e.prototype.clientQuery=function(e){return ke(["client"],e)&&this.resolvers?e:null},e.prototype.serverQuery=function(e){return function(e){return ae(e),or([{test:function(e){return"client"===e.name.value},remove:!0}],e)}(e)},e.prototype.prepareContext=function(e){var t=this.cache;return(0,n.__assign)((0,n.__assign)({},e),{cache:t,getCacheKey:function(e){return t.identify(e)}})},e.prototype.addExportedVariables=function(e,t,r){return void 0===t&&(t={}),void 0===r&&(r={}),(0,n.__awaiter)(this,void 0,void 0,(function(){return(0,n.__generator)(this,(function(i){return e?[2,this.resolveDocument(e,this.buildRootValueFromCache(e,t)||{},this.prepareContext(r),t).then((function(e){return(0,n.__assign)((0,n.__assign)({},t),e.exportedVariables)}))]:[2,(0,n.__assign)({},t)]}))}))},e.prototype.shouldForceResolvers=function(e){var t=!1;return xe(e,{Directive:{enter:function(e){if("client"===e.name.value&&e.arguments&&(t=e.arguments.some((function(e){return"always"===e.name.value&&"BooleanValue"===e.value.kind&&!0===e.value.value}))))return Ie}}}),t},e.prototype.buildRootValueFromCache=function(e,t){return this.cache.diff({query:ur(e),variables:t,returnPartialData:!0,optimistic:!1}).result},e.prototype.resolveDocument=function(e,t,r,i,o,s){return void 0===r&&(r={}),void 0===i&&(i={}),void 0===o&&(o=function(){return!0}),void 0===s&&(s=!1),(0,n.__awaiter)(this,void 0,void 0,(function(){var a,u,c,l,f,p,d,h,y,v;return(0,n.__generator)(this,(function(m){return a=pe(e),u=le(e),c=H(u),l=this.collectSelectionsToResolve(a,c),f=a.operation,p=f?f.charAt(0).toUpperCase()+f.slice(1):"Query",h=(d=this).cache,y=d.client,v={fragmentMap:c,context:(0,n.__assign)((0,n.__assign)({},r),{cache:h,client:y}),variables:i,fragmentMatcher:o,defaultOperationType:p,exportedVariables:{},selectionsToResolve:l,onlyRunForcedResolvers:s},[2,this.resolveSelectionSet(a.selectionSet,!1,t,v).then((function(e){return{result:e,exportedVariables:v.exportedVariables}}))]}))}))},e.prototype.resolveSelectionSet=function(e,t,r,i){return(0,n.__awaiter)(this,void 0,void 0,(function(){var o,s,a,c,l,f=this;return(0,n.__generator)(this,(function(p){return o=i.fragmentMap,s=i.context,a=i.variables,c=[r],l=function(e){return(0,n.__awaiter)(f,void 0,void 0,(function(){var l,f;return(0,n.__generator)(this,(function(n){return(t||i.selectionsToResolve.has(e))&&Ne(e,a)?se(e)?[2,this.resolveField(e,t,r,i).then((function(t){var r;void 0!==t&&c.push(((r={})[ie(e)]=t,r))}))]:(function(e){return"InlineFragment"===e.kind}(e)?l=e:(l=o[e.name.value],__DEV__?u(l,"No fragment named ".concat(e.name.value)):u(l,11)),l&&l.typeCondition&&(f=l.typeCondition.name.value,i.fragmentMatcher(r,f,s))?[2,this.resolveSelectionSet(l.selectionSet,t,r,i).then((function(e){c.push(e)}))]:[2]):[2]}))}))},[2,Promise.all(e.selections.map(l)).then((function(){return $t(c)}))]}))}))},e.prototype.resolveField=function(e,t,r,i){return(0,n.__awaiter)(this,void 0,void 0,(function(){var o,s,a,u,c,l,f,p,d,h=this;return(0,n.__generator)(this,(function(n){return r?(o=i.variables,s=e.name.value,a=ie(e),u=s!==a,c=r[a]||r[s],l=Promise.resolve(c),i.onlyRunForcedResolvers&&!this.shouldForceResolvers(e)||(f=r.__typename||i.defaultOperationType,(p=this.resolvers&&this.resolvers[f])&&(d=p[u?s:a])&&(l=Promise.resolve(fn.withValue(this.cache,d,[r,ne(e,o),i.context,{field:e,fragmentMap:i.fragmentMap}])))),[2,l.then((function(r){var n,o;if(void 0===r&&(r=c),e.directives&&e.directives.forEach((function(e){"export"===e.name.value&&e.arguments&&e.arguments.forEach((function(e){"as"===e.name.value&&"StringValue"===e.value.kind&&(i.exportedVariables[e.value.value]=r)}))})),!e.selectionSet)return r;if(null==r)return r;var s=null!==(o=null===(n=e.directives)||void 0===n?void 0:n.some((function(e){return"client"===e.name.value})))&&void 0!==o&&o;return Array.isArray(r)?h.resolveSubSelectedArray(e,t||s,r,i):e.selectionSet?h.resolveSelectionSet(e.selectionSet,t||s,r,i):void 0}))]):[2,null]}))}))},e.prototype.resolveSubSelectedArray=function(e,t,r,n){var i=this;return Promise.all(r.map((function(r){return null===r?null:Array.isArray(r)?i.resolveSubSelectedArray(e,t,r,n):e.selectionSet?i.resolveSelectionSet(e.selectionSet,t,r,n):void 0})))},e.prototype.collectSelectionsToResolve=function(e,t){var r=function(e){return!Array.isArray(e)},n=this.selectionsToResolveCache;return function e(i){if(!n.has(i)){var o=new Set;n.set(i,o),xe(i,{Directive:function(e,t,n,i,s){"client"===e.name.value&&s.forEach((function(e){r(e)&&xr(e)&&o.add(e)}))},FragmentSpread:function(n,i,s,a,c){var l=t[n.name.value];__DEV__?u(l,"No fragment named ".concat(n.name.value)):u(l,12);var f=e(l);f.size>0&&(c.forEach((function(e){r(e)&&xr(e)&&o.add(e)})),o.add(n),f.forEach((function(e){o.add(e)})))}})}return n.get(i)}(e)},e}(),bn=new(Ce?WeakMap:Map);function gn(e,t){var r=e[t];"function"==typeof r&&(e[t]=function(){return bn.set(e,(bn.get(e)+1)%1e15),r.apply(this,arguments)})}function _n(e){e.notifyTimeout&&(clearTimeout(e.notifyTimeout),e.notifyTimeout=void 0)}var wn=function(){function e(e,t){void 0===t&&(t=e.generateQueryId()),this.queryId=t,this.listeners=new Set,this.document=null,this.lastRequestId=1,this.subscriptions=new Set,this.stopped=!1,this.dirty=!1,this.observableQuery=null;var r=this.cache=e.cache;bn.has(r)||(bn.set(r,0),gn(r,"evict"),gn(r,"modify"),gn(r,"reset"))}return e.prototype.init=function(e){var t=e.networkStatus||vr.loading;return this.variables&&this.networkStatus!==vr.loading&&!Pt(this.variables,e.variables)&&(t=vr.setVariables),Pt(e.variables,this.variables)||(this.lastDiff=void 0),Object.assign(this,{document:e.document,variables:e.variables,networkError:null,graphQLErrors:this.graphQLErrors||[],networkStatus:t}),e.observableQuery&&this.setObservableQuery(e.observableQuery),e.lastRequestId&&(this.lastRequestId=e.lastRequestId),this},e.prototype.reset=function(){_n(this),this.dirty=!1},e.prototype.getDiff=function(e){void 0===e&&(e=this.variables);var t=this.getDiffOptions(e);if(this.lastDiff&&Pt(t,this.lastDiff.options))return this.lastDiff.diff;this.updateWatch(this.variables=e);var r=this.observableQuery;if(r&&"no-cache"===r.options.fetchPolicy)return{complete:!1};var n=this.cache.diff(t);return this.updateLastDiff(n,t),n},e.prototype.updateLastDiff=function(e,t){this.lastDiff=e?{diff:e,options:t||this.getDiffOptions()}:void 0},e.prototype.getDiffOptions=function(e){var t;return void 0===e&&(e=this.variables),{query:this.document,variables:e,returnPartialData:!0,optimistic:!0,canonizeResults:null===(t=this.observableQuery)||void 0===t?void 0:t.options.canonizeResults}},e.prototype.setDiff=function(e){var t=this,r=this.lastDiff&&this.lastDiff.diff;this.updateLastDiff(e),this.dirty||Pt(r&&r.result,e&&e.result)||(this.dirty=!0,this.notifyTimeout||(this.notifyTimeout=setTimeout((function(){return t.notify()}),0)))},e.prototype.setObservableQuery=function(e){var t=this;e!==this.observableQuery&&(this.oqListener&&this.listeners.delete(this.oqListener),this.observableQuery=e,e?(e.queryInfo=this,this.listeners.add(this.oqListener=function(){t.getDiff().fromOptimisticTransaction?e.observe():jr(e)})):delete this.oqListener)},e.prototype.notify=function(){var e=this;_n(this),this.shouldNotify()&&this.listeners.forEach((function(t){return t(e)})),this.dirty=!1},e.prototype.shouldNotify=function(){if(!this.dirty||!this.listeners.size)return!1;if(br(this.networkStatus)&&this.observableQuery){var e=this.observableQuery.options.fetchPolicy;if("cache-only"!==e&&"cache-and-network"!==e)return!1}return!0},e.prototype.stop=function(){if(!this.stopped){this.stopped=!0,this.reset(),this.cancel(),this.cancel=e.prototype.cancel,this.subscriptions.forEach((function(e){return e.unsubscribe()}));var t=this.observableQuery;t&&t.stopPolling()}},e.prototype.cancel=function(){},e.prototype.updateWatch=function(e){var t=this;void 0===e&&(e=this.variables);var r=this.observableQuery;if(!r||"no-cache"!==r.options.fetchPolicy){var i=(0,n.__assign)((0,n.__assign)({},this.getDiffOptions(e)),{watcher:this,callback:function(e){return t.setDiff(e)}});this.lastWatch&&Pt(i,this.lastWatch)||(this.cancel(),this.cancel=this.cache.watch(this.lastWatch=i))}},e.prototype.resetLastWrite=function(){this.lastWrite=void 0},e.prototype.shouldWrite=function(e,t){var r=this.lastWrite;return!(r&&r.dmCount===bn.get(this.cache)&&Pt(t,r.variables)&&Pt(e.data,r.result.data))},e.prototype.markResult=function(e,t,r,n){var i=this,o=new qt,s=Dt(e.errors)?e.errors.slice(0):[];if(this.reset(),"incremental"in e&&Dt(e.incremental)){var a=Bt(this.getDiff().result,e);e.data=a}else if("hasNext"in e&&e.hasNext){var u=this.getDiff();e.data=o.merge(u.result,e.data)}this.graphQLErrors=s,"no-cache"===r.fetchPolicy?this.updateLastDiff({result:e.data,complete:!0},this.getDiffOptions(r.variables)):0!==n&&(On(e,r.errorPolicy)?this.cache.performTransaction((function(o){if(i.shouldWrite(e,r.variables))o.writeQuery({query:t,data:e.data,variables:r.variables,overwrite:1===n}),i.lastWrite={result:e,variables:r.variables,dmCount:bn.get(i.cache)};else if(i.lastDiff&&i.lastDiff.diff.complete)return void(e.data=i.lastDiff.diff.result);var s=i.getDiffOptions(r.variables),a=o.diff(s);i.stopped||i.updateWatch(r.variables),i.updateLastDiff(a,s),a.complete&&(e.data=a.result)})):this.lastWrite=void 0)},e.prototype.markReady=function(){return this.networkError=null,this.networkStatus=vr.ready},e.prototype.markError=function(e){return this.networkStatus=vr.error,this.lastWrite=void 0,this.reset(),e.graphQLErrors&&(this.graphQLErrors=e.graphQLErrors),e.networkError&&(this.networkError=e.networkError),e},e}();function On(e,t){void 0===t&&(t="none");var r="ignore"===t||"all"===t,n=!Xt(e);return!n&&r&&e.data&&(n=!0),n}var Sn=Object.prototype.hasOwnProperty,En=function(){function e(e){var t=e.cache,r=e.link,n=e.defaultOptions,i=e.queryDeduplication,o=void 0!==i&&i,s=e.onBroadcast,a=e.ssrMode,u=void 0!==a&&a,c=e.clientAwareness,l=void 0===c?{}:c,f=e.localState,p=e.assumeImmutableResults;this.clientAwareness={},this.queries=new Map,this.fetchCancelFns=new Map,this.transformCache=new(Ce?WeakMap:Map),this.queryIdCounter=1,this.requestIdCounter=1,this.mutationIdCounter=1,this.inFlightLinkObservables=new Map,this.cache=t,this.link=r,this.defaultOptions=n||Object.create(null),this.queryDeduplication=o,this.clientAwareness=l,this.localState=f||new mn({cache:t}),this.ssrMode=u,this.assumeImmutableResults=!!p,(this.onBroadcast=s)&&(this.mutationStore=Object.create(null))}return e.prototype.stop=function(){var e=this;this.queries.forEach((function(t,r){e.stopQueryNoBroadcast(r)})),this.cancelPendingFetches(__DEV__?new a("QueryManager stopped while query was in flight"):new a(14))},e.prototype.cancelPendingFetches=function(e){this.fetchCancelFns.forEach((function(t){return t(e)})),this.fetchCancelFns.clear()},e.prototype.mutate=function(e){var t,r,i=e.mutation,o=e.variables,s=e.optimisticResponse,a=e.updateQueries,c=e.refetchQueries,l=void 0===c?[]:c,f=e.awaitRefetchQueries,p=void 0!==f&&f,d=e.update,h=e.onQueryUpdated,y=e.fetchPolicy,v=void 0===y?(null===(t=this.defaultOptions.mutate)||void 0===t?void 0:t.fetchPolicy)||"network-only":y,m=e.errorPolicy,b=void 0===m?(null===(r=this.defaultOptions.mutate)||void 0===r?void 0:r.errorPolicy)||"none":m,g=e.keepRootFields,_=e.context;return(0,n.__awaiter)(this,void 0,void 0,(function(){var e,t,r,c,f,y;return(0,n.__generator)(this,(function(m){switch(m.label){case 0:return __DEV__?u(i,"mutation option is required. You must specify your GraphQL document in the mutation option."):u(i,15),__DEV__?u("network-only"===v||"no-cache"===v,"Mutations support only 'network-only' or 'no-cache' fetchPolicy strings. The default `network-only` behavior automatically writes mutation results to the cache. Passing `no-cache` skips the cache write."):u("network-only"===v||"no-cache"===v,16),e=this.generateMutationId(),t=this.transform(i),r=t.document,c=t.hasClientExports,i=this.cache.transformForLink(r),o=this.getVariables(i,o),c?[4,this.localState.addExportedVariables(i,o,_)]:[3,2];case 1:o=m.sent(),m.label=2;case 2:return f=this.mutationStore&&(this.mutationStore[e]={mutation:i,variables:o,loading:!0,error:null}),s&&this.markMutationOptimistic(s,{mutationId:e,document:i,variables:o,fetchPolicy:v,errorPolicy:b,context:_,updateQueries:a,update:d,keepRootFields:g}),this.broadcastQueries(),y=this,[2,new Promise((function(t,r){return Zt(y.getObservableFromLink(i,(0,n.__assign)((0,n.__assign)({},_),{optimisticResponse:s}),o,!1),(function(t){if(Xt(t)&&"none"===b)throw new mr({graphQLErrors:er(t)});f&&(f.loading=!1,f.error=null);var r=(0,n.__assign)({},t);return"function"==typeof l&&(l=l(r)),"ignore"===b&&Xt(r)&&delete r.errors,y.markMutationResult({mutationId:e,result:r,document:i,variables:o,fetchPolicy:v,errorPolicy:b,context:_,update:d,updateQueries:a,awaitRefetchQueries:p,refetchQueries:l,removeOptimistic:s?e:void 0,onQueryUpdated:h,keepRootFields:g})})).subscribe({next:function(e){y.broadcastQueries(),"hasNext"in e&&!1!==e.hasNext||t(e)},error:function(t){f&&(f.loading=!1,f.error=t),s&&y.cache.removeOptimistic(e),y.broadcastQueries(),r(t instanceof mr?t:new mr({networkError:t}))}})}))]}}))}))},e.prototype.markMutationResult=function(e,t){var r=this;void 0===t&&(t=this.cache);var i=e.result,o=[],s="no-cache"===e.fetchPolicy;if(!s&&On(i,e.errorPolicy)){if(Lt(i)||o.push({result:i.data,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables}),Lt(i)&&Dt(i.incremental)){var a=t.diff({id:"ROOT_MUTATION",query:this.transform(e.document).asQuery,variables:e.variables,optimistic:!1,returnPartialData:!0}),u=void 0;a.result&&(u=Bt(a.result,i)),void 0!==u&&(i.data=u,o.push({result:u,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables}))}var c=e.updateQueries;c&&this.queries.forEach((function(e,n){var s=e.observableQuery,a=s&&s.queryName;if(a&&Sn.call(c,a)){var u=c[a],l=r.queries.get(n),f=l.document,p=l.variables,d=t.diff({query:f,variables:p,returnPartialData:!0,optimistic:!1}),h=d.result;if(d.complete&&h){var y=u(h,{mutationResult:i,queryName:f&&ce(f)||void 0,queryVariables:p});y&&o.push({result:y,dataId:"ROOT_QUERY",query:f,variables:p})}}}))}if(o.length>0||e.refetchQueries||e.update||e.onQueryUpdated||e.removeOptimistic){var l=[];if(this.refetchQueries({updateCache:function(t){s||o.forEach((function(e){return t.write(e)}));var a,u=e.update,c=!(Lt(a=i)||function(e){return"hasNext"in e&&"data"in e}(a))||Lt(i)&&!i.hasNext;if(u){if(!s){var l=t.diff({id:"ROOT_MUTATION",query:r.transform(e.document).asQuery,variables:e.variables,optimistic:!1,returnPartialData:!0});l.complete&&("incremental"in(i=(0,n.__assign)((0,n.__assign)({},i),{data:l.result}))&&delete i.incremental,"hasNext"in i&&delete i.hasNext)}c&&u(t,i,{context:e.context,variables:e.variables})}s||e.keepRootFields||!c||t.modify({id:"ROOT_MUTATION",fields:function(e,t){var r=t.fieldName,n=t.DELETE;return"__typename"===r?e:n}})},include:e.refetchQueries,optimistic:!1,removeOptimistic:e.removeOptimistic,onQueryUpdated:e.onQueryUpdated||null}).forEach((function(e){return l.push(e)})),e.awaitRefetchQueries||e.onQueryUpdated)return Promise.all(l).then((function(){return i}))}return Promise.resolve(i)},e.prototype.markMutationOptimistic=function(e,t){var r=this,i="function"==typeof e?e(t.variables):e;return this.cache.recordOptimisticTransaction((function(e){try{r.markMutationResult((0,n.__assign)((0,n.__assign)({},t),{result:{data:i}}),e)}catch(e){__DEV__&&u.error(e)}}),t.mutationId)},e.prototype.fetchQuery=function(e,t,r){return this.fetchQueryObservable(e,t,r).promise},e.prototype.getQueryStore=function(){var e=Object.create(null);return this.queries.forEach((function(t,r){e[r]={variables:t.variables,networkStatus:t.networkStatus,networkError:t.networkError,graphQLErrors:t.graphQLErrors}})),e},e.prototype.resetErrors=function(e){var t=this.queries.get(e);t&&(t.networkError=void 0,t.graphQLErrors=[])},e.prototype.transform=function(e){var t=this.transformCache;if(!t.has(e)){var r=this.cache.transformDocument(e),i=or([ar],ae(r)),o=this.localState.clientQuery(r),s=i&&this.localState.serverQuery(i),a={document:r,hasClientExports:Me(r),hasForcedResolvers:this.localState.shouldForceResolvers(r),clientQuery:o,serverQuery:s,defaultVars:de(ue(r)),asQuery:(0,n.__assign)((0,n.__assign)({},r),{definitions:r.definitions.map((function(e){return"OperationDefinition"===e.kind&&"query"!==e.operation?(0,n.__assign)((0,n.__assign)({},e),{operation:"query"}):e}))})},u=function(e){e&&!t.has(e)&&t.set(e,a)};u(e),u(r),u(o),u(s)}return t.get(e)},e.prototype.getVariables=function(e,t){return(0,n.__assign)((0,n.__assign)({},this.transform(e).defaultVars),t)},e.prototype.watchQuery=function(e){void 0===(e=(0,n.__assign)((0,n.__assign)({},e),{variables:this.getVariables(e.query,e.variables)})).notifyOnNetworkStatusChange&&(e.notifyOnNetworkStatusChange=!1);var t=new wn(this),r=new Tr({queryManager:this,queryInfo:t,options:e});return this.queries.set(r.queryId,t),t.init({document:r.query,observableQuery:r,variables:r.variables}),r},e.prototype.query=function(e,t){var r=this;return void 0===t&&(t=this.generateQueryId()),__DEV__?u(e.query,"query option is required. You must specify your GraphQL document in the query option."):u(e.query,17),__DEV__?u("Document"===e.query.kind,'You must wrap the query string in a "gql" tag.'):u("Document"===e.query.kind,18),__DEV__?u(!e.returnPartialData,"returnPartialData option only supported on watchQuery."):u(!e.returnPartialData,19),__DEV__?u(!e.pollInterval,"pollInterval option only supported on watchQuery."):u(!e.pollInterval,20),this.fetchQuery(t,e).finally((function(){return r.stopQuery(t)}))},e.prototype.generateQueryId=function(){return String(this.queryIdCounter++)},e.prototype.generateRequestId=function(){return this.requestIdCounter++},e.prototype.generateMutationId=function(){return String(this.mutationIdCounter++)},e.prototype.stopQueryInStore=function(e){this.stopQueryInStoreNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryInStoreNoBroadcast=function(e){var t=this.queries.get(e);t&&t.stop()},e.prototype.clearStore=function(e){return void 0===e&&(e={discardWatches:!0}),this.cancelPendingFetches(__DEV__?new a("Store reset while query was in flight (not completed in link chain)"):new a(21)),this.queries.forEach((function(e){e.observableQuery?e.networkStatus=vr.loading:e.stop()})),this.mutationStore&&(this.mutationStore=Object.create(null)),this.cache.reset(e)},e.prototype.getObservableQueries=function(e){var t=this;void 0===e&&(e="active");var r=new Map,i=new Map,o=new Set;return Array.isArray(e)&&e.forEach((function(e){var r;"string"==typeof e?i.set(e,!1):Y(r=e)&&"Document"===r.kind&&Array.isArray(r.definitions)?i.set(t.transform(e).document,!1):Y(e)&&e.query&&o.add(e)})),this.queries.forEach((function(t,n){var o=t.observableQuery,s=t.document;if(o){if("all"===e)return void r.set(n,o);var a=o.queryName;if("standby"===o.options.fetchPolicy||"active"===e&&!o.hasObservers())return;("active"===e||a&&i.has(a)||s&&i.has(s))&&(r.set(n,o),a&&i.set(a,!0),s&&i.set(s,!0))}})),o.size&&o.forEach((function(e){var i=lr("legacyOneTimeQuery"),o=t.getQuery(i).init({document:e.query,variables:e.variables}),s=new Tr({queryManager:t,queryInfo:o,options:(0,n.__assign)((0,n.__assign)({},e),{fetchPolicy:"network-only"})});u(s.queryId===i),o.setObservableQuery(s),r.set(i,s)})),__DEV__&&i.size&&i.forEach((function(e,t){e||__DEV__&&u.warn("Unknown query ".concat("string"==typeof t?"named ":"").concat(JSON.stringify(t,null,2)," requested in refetchQueries options.include array"))})),r},e.prototype.reFetchObservableQueries=function(e){var t=this;void 0===e&&(e=!1);var r=[];return this.getObservableQueries(e?"all":"active").forEach((function(n,i){var o=n.options.fetchPolicy;n.resetLastResults(),(e||"standby"!==o&&"cache-only"!==o)&&r.push(n.refetch()),t.getQuery(i).setDiff(null)})),this.broadcastQueries(),Promise.all(r)},e.prototype.setObservableQuery=function(e){this.getQuery(e.queryId).setObservableQuery(e)},e.prototype.startGraphQLSubscription=function(e){var t=this,r=e.query,n=e.fetchPolicy,i=e.errorPolicy,o=e.variables,s=e.context,a=void 0===s?{}:s;r=this.transform(r).document,o=this.getVariables(r,o);var u=function(e){return t.getObservableFromLink(r,a,e).map((function(o){if("no-cache"!==n&&(On(o,i)&&t.cache.write({query:r,result:o.data,dataId:"ROOT_SUBSCRIPTION",variables:e}),t.broadcastQueries()),Xt(o))throw new mr({graphQLErrors:o.errors});return o}))};if(this.transform(r).hasClientExports){var c=this.localState.addExportedVariables(r,o,a).then(u);return new Q((function(e){var t=null;return c.then((function(r){return t=r.subscribe(e)}),e.error),function(){return t&&t.unsubscribe()}}))}return u(o)},e.prototype.stopQuery=function(e){this.stopQueryNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryNoBroadcast=function(e){this.stopQueryInStoreNoBroadcast(e),this.removeQuery(e)},e.prototype.removeQuery=function(e){this.fetchCancelFns.delete(e),this.queries.has(e)&&(this.getQuery(e).stop(),this.queries.delete(e))},e.prototype.broadcastQueries=function(){this.onBroadcast&&this.onBroadcast(),this.queries.forEach((function(e){return e.notify()}))},e.prototype.getLocalState=function(){return this.localState},e.prototype.getObservableFromLink=function(e,t,r,i){var o,s,a=this;void 0===i&&(i=null!==(o=null==t?void 0:t.queryDeduplication)&&void 0!==o?o:this.queryDeduplication);var u=this.transform(e).serverQuery;if(u){var c=this.inFlightLinkObservables,l=this.link,f={query:u,variables:r,operationName:ce(u)||void 0,context:this.prepareContext((0,n.__assign)((0,n.__assign)({},t),{forceFetch:!i}))};if(t=f.context,i){var p=c.get(u)||new Map;c.set(u,p);var d=Gt(r);if(!(s=p.get(d))){var h=new hr([ge(l,f)]);p.set(d,s=h),h.beforeNext((function(){p.delete(d)&&p.size<1&&c.delete(u)}))}}else s=new hr([ge(l,f)])}else s=new hr([Q.of({data:{}})]),t=this.prepareContext(t);var y=this.transform(e).clientQuery;return y&&(s=Zt(s,(function(e){return a.localState.runResolvers({document:y,remoteResult:e,context:t,variables:r})}))),s},e.prototype.getResultsFromLink=function(e,t,r){var n=e.lastRequestId=this.generateRequestId(),i=this.cache.transformForLink(this.transform(e.document).document);return Zt(this.getObservableFromLink(i,r.context,r.variables),(function(o){var s=er(o),a=s.length>0;if(n>=e.lastRequestId){if(a&&"none"===r.errorPolicy)throw e.markError(new mr({graphQLErrors:s}));e.markResult(o,i,r,t),e.markReady()}var u={data:o.data,loading:!1,networkStatus:vr.ready};return a&&"ignore"!==r.errorPolicy&&(u.errors=s,u.networkStatus=vr.error),u}),(function(t){var r=yr(t)?t:new mr({networkError:t});throw n>=e.lastRequestId&&e.markError(r),r}))},e.prototype.fetchQueryObservable=function(e,t,r){var n=this;void 0===r&&(r=vr.loading);var i=this.transform(t.query).document,o=this.getVariables(i,t.variables),s=this.getQuery(e),a=this.defaultOptions.watchQuery,u=t.fetchPolicy,c=void 0===u?a&&a.fetchPolicy||"cache-first":u,l=t.errorPolicy,f=void 0===l?a&&a.errorPolicy||"none":l,p=t.returnPartialData,d=void 0!==p&&p,h=t.notifyOnNetworkStatusChange,y=void 0!==h&&h,v=t.context,m=void 0===v?{}:v,b=Object.assign({},t,{query:i,variables:o,fetchPolicy:c,errorPolicy:f,returnPartialData:d,notifyOnNetworkStatusChange:y,context:m}),g=function(e){b.variables=e;var i=n.fetchQueryByPolicy(s,b,r);return"standby"!==b.fetchPolicy&&i.length>0&&s.observableQuery&&s.observableQuery.applyNextFetchPolicy("after-fetch",t),i},_=function(){return n.fetchCancelFns.delete(e)};this.fetchCancelFns.set(e,(function(e){_(),setTimeout((function(){return w.cancel(e)}))}));var w=new hr(this.transform(b.query).hasClientExports?this.localState.addExportedVariables(b.query,b.variables,b.context).then(g):g(b.variables));return w.promise.then(_,_),w},e.prototype.refetchQueries=function(e){var t=this,r=e.updateCache,n=e.include,i=e.optimistic,o=void 0!==i&&i,s=e.removeOptimistic,a=void 0===s?o?lr("refetchQueries"):void 0:s,u=e.onQueryUpdated,c=new Map;n&&this.getObservableQueries(n).forEach((function(e,r){c.set(r,{oq:e,lastDiff:t.getQuery(r).getDiff()})}));var l=new Map;return r&&this.cache.batch({update:r,optimistic:o&&a||!1,removeOptimistic:a,onWatchUpdated:function(e,t,r){var n=e.watcher instanceof wn&&e.watcher.observableQuery;if(n){if(u){c.delete(n.queryId);var i=u(n,t,r);return!0===i&&(i=n.refetch()),!1!==i&&l.set(n,i),i}null!==u&&c.set(n.queryId,{oq:n,lastDiff:r,diff:t})}}}),c.size&&c.forEach((function(e,r){var n,i=e.oq,o=e.lastDiff,s=e.diff;if(u){if(!s){var a=i.queryInfo;a.reset(),s=a.getDiff()}n=u(i,s,o)}u&&!0!==n||(n=i.refetch()),!1!==n&&l.set(i,n),r.indexOf("legacyOneTimeQuery")>=0&&t.stopQueryNoBroadcast(r)})),a&&this.cache.removeOptimistic(a),l},e.prototype.fetchQueryByPolicy=function(e,t,r){var i=this,o=t.query,s=t.variables,a=t.fetchPolicy,u=t.refetchWritePolicy,c=t.errorPolicy,l=t.returnPartialData,f=t.context,p=t.notifyOnNetworkStatusChange,d=e.networkStatus;e.init({document:this.transform(o).document,variables:s,networkStatus:r});var h=function(){return e.getDiff(s)},y=function(t,r){void 0===r&&(r=e.networkStatus||vr.loading);var a=t.result;!__DEV__||l||Pt(a,{})||Ir(t.missing);var u=function(e){return Q.of((0,n.__assign)({data:e,loading:br(r),networkStatus:r},t.complete?null:{partial:!0}))};return a&&i.transform(o).hasForcedResolvers?i.localState.runResolvers({document:o,remoteResult:{data:a},context:f,variables:s,onlyRunForcedResolvers:!0}).then((function(e){return u(e.data||void 0)})):"none"===c&&r===vr.refetch&&Array.isArray(t.missing)?u(void 0):u(a)},v="no-cache"===a?0:r===vr.refetch&&"merge"!==u?1:2,m=function(){return i.getResultsFromLink(e,v,{variables:s,context:f,fetchPolicy:a,errorPolicy:c})},b=p&&"number"==typeof d&&d!==r&&br(r);switch(a){default:case"cache-first":return(g=h()).complete?[y(g,e.markReady())]:l||b?[y(g),m()]:[m()];case"cache-and-network":var g;return(g=h()).complete||l||b?[y(g),m()]:[m()];case"cache-only":return[y(h(),e.markReady())];case"network-only":return b?[y(h()),m()]:[m()];case"no-cache":return b?[y(e.getDiff()),m()]:[m()];case"standby":return[]}},e.prototype.getQuery=function(e){return e&&!this.queries.has(e)&&this.queries.set(e,new wn(this,e)),this.queries.get(e)},e.prototype.prepareContext=function(e){void 0===e&&(e={});var t=this.localState.prepareContext(e);return(0,n.__assign)((0,n.__assign)({},t),{clientAwareness:this.clientAwareness})},e}();function Tn(e,t){return Or(e,t,t.variables&&{variables:(0,n.__assign)((0,n.__assign)({},e&&e.variables),t.variables)})}var jn,Pn=!1,In=function(){function e(e){var t=this;this.resetStoreCallbacks=[],this.clearStoreCallbacks=[];var r=e.uri,n=e.credentials,i=e.headers,o=e.cache,s=e.ssrMode,c=void 0!==s&&s,l=e.ssrForceFetchDelay,f=void 0===l?0:l,p=e.connectToDevTools,d=void 0===p?"object"==typeof window&&!window.__APOLLO_CLIENT__&&__DEV__:p,h=e.queryDeduplication,y=void 0===h||h,v=e.defaultOptions,m=e.assumeImmutableResults,b=void 0!==m&&m,g=e.resolvers,_=e.typeDefs,w=e.fragmentMatcher,O=e.name,S=e.version,E=e.link;if(E||(E=r?new wt({uri:r,credentials:n,headers:i}):be.empty()),!o)throw __DEV__?new a("To initialize Apollo Client, you must specify a 'cache' property in the options object. \nFor more information, please visit: https://go.apollo.dev/c/docs"):new a(9);if(this.link=E,this.cache=o,this.disableNetworkFetches=c||f>0,this.queryDeduplication=y,this.defaultOptions=v||Object.create(null),this.typeDefs=_,f&&setTimeout((function(){return t.disableNetworkFetches=!1}),f),this.watchQuery=this.watchQuery.bind(this),this.query=this.query.bind(this),this.mutate=this.mutate.bind(this),this.resetStore=this.resetStore.bind(this),this.reFetchObservableQueries=this.reFetchObservableQueries.bind(this),d&&"object"==typeof window&&(window.__APOLLO_CLIENT__=this),!Pn&&d&&__DEV__&&(Pn=!0,"undefined"!=typeof window&&window.document&&window.top===window.self&&!window.__APOLLO_DEVTOOLS_GLOBAL_HOOK__)){var T=window.navigator,j=T&&T.userAgent,P=void 0;"string"==typeof j&&(j.indexOf("Chrome/")>-1?P="https://chrome.google.com/webstore/detail/apollo-client-developer-t/jdkknkkbebbapilgoeccciglkfbmbnfm":j.indexOf("Firefox/")>-1&&(P="https://addons.mozilla.org/en-US/firefox/addon/apollo-developer-tools/")),P&&__DEV__&&u.log("Download the Apollo DevTools for a better development experience: "+P)}this.version="3.7.9",this.localState=new mn({cache:o,client:this,resolvers:g,fragmentMatcher:w}),this.queryManager=new En({cache:this.cache,link:this.link,defaultOptions:this.defaultOptions,queryDeduplication:y,ssrMode:c,clientAwareness:{name:O,version:S},localState:this.localState,assumeImmutableResults:b,onBroadcast:d?function(){t.devToolsHookCb&&t.devToolsHookCb({action:{},state:{queries:t.queryManager.getQueryStore(),mutations:t.queryManager.mutationStore||{}},dataWithOptimisticResults:t.cache.extract(!0)})}:void 0})}return e.prototype.stop=function(){this.queryManager.stop()},e.prototype.watchQuery=function(e){return this.defaultOptions.watchQuery&&(e=Tn(this.defaultOptions.watchQuery,e)),!this.disableNetworkFetches||"network-only"!==e.fetchPolicy&&"cache-and-network"!==e.fetchPolicy||(e=(0,n.__assign)((0,n.__assign)({},e),{fetchPolicy:"cache-first"})),this.queryManager.watchQuery(e)},e.prototype.query=function(e){return this.defaultOptions.query&&(e=Tn(this.defaultOptions.query,e)),__DEV__?u("cache-and-network"!==e.fetchPolicy,"The cache-and-network fetchPolicy does not work with client.query, because client.query can only return a single result. Please use client.watchQuery to receive multiple results from the cache and the network, or consider using a different fetchPolicy, such as cache-first or network-only."):u("cache-and-network"!==e.fetchPolicy,10),this.disableNetworkFetches&&"network-only"===e.fetchPolicy&&(e=(0,n.__assign)((0,n.__assign)({},e),{fetchPolicy:"cache-first"})),this.queryManager.query(e)},e.prototype.mutate=function(e){return this.defaultOptions.mutate&&(e=Tn(this.defaultOptions.mutate,e)),this.queryManager.mutate(e)},e.prototype.subscribe=function(e){return this.queryManager.startGraphQLSubscription(e)},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!1),this.cache.readQuery(e,t)},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!1),this.cache.readFragment(e,t)},e.prototype.writeQuery=function(e){this.cache.writeQuery(e),this.queryManager.broadcastQueries()},e.prototype.writeFragment=function(e){this.cache.writeFragment(e),this.queryManager.broadcastQueries()},e.prototype.__actionHookForDevTools=function(e){this.devToolsHookCb=e},e.prototype.__requestRaw=function(e){return ge(this.link,e)},e.prototype.resetStore=function(){var e=this;return Promise.resolve().then((function(){return e.queryManager.clearStore({discardWatches:!1})})).then((function(){return Promise.all(e.resetStoreCallbacks.map((function(e){return e()})))})).then((function(){return e.reFetchObservableQueries()}))},e.prototype.clearStore=function(){var e=this;return Promise.resolve().then((function(){return e.queryManager.clearStore({discardWatches:!0})})).then((function(){return Promise.all(e.clearStoreCallbacks.map((function(e){return e()})))}))},e.prototype.onResetStore=function(e){var t=this;return this.resetStoreCallbacks.push(e),function(){t.resetStoreCallbacks=t.resetStoreCallbacks.filter((function(t){return t!==e}))}},e.prototype.onClearStore=function(e){var t=this;return this.clearStoreCallbacks.push(e),function(){t.clearStoreCallbacks=t.clearStoreCallbacks.filter((function(t){return t!==e}))}},e.prototype.reFetchObservableQueries=function(e){return this.queryManager.reFetchObservableQueries(e)},e.prototype.refetchQueries=function(e){var t=this.queryManager.refetchQueries(e),r=[],n=[];t.forEach((function(e,t){r.push(t),n.push(e)}));var i=Promise.all(n);return i.queries=r,i.results=n,i.catch((function(e){__DEV__&&u.debug("In client.refetchQueries, Promise.all promise rejected with error ".concat(e))})),i},e.prototype.getObservableQueries=function(e){return void 0===e&&(e="active"),this.queryManager.getObservableQueries(e)},e.prototype.extract=function(e){return this.cache.extract(e)},e.prototype.restore=function(e){return this.cache.restore(e)},e.prototype.addResolvers=function(e){this.localState.addResolvers(e)},e.prototype.setResolvers=function(e){this.localState.setResolvers(e)},e.prototype.getResolvers=function(){return this.localState.getResolvers()},e.prototype.setLocalStateFragmentMatcher=function(e){this.localState.setFragmentMatcher(e)},e.prototype.setLink=function(e){this.link=this.queryManager.link=e},e}();jn||(jn={});var xn=function(){function e(){this.getFragmentDoc=ln(W)}return e.prototype.batch=function(e){var t,r=this,n="string"==typeof e.optimistic?e.optimistic:!1===e.optimistic?null:void 0;return this.performTransaction((function(){return t=e.update(r)}),n),t},e.prototype.recordOptimisticTransaction=function(e,t){this.performTransaction(e,t)},e.prototype.transformDocument=function(e){return e},e.prototype.transformForLink=function(e){return e},e.prototype.identify=function(e){},e.prototype.gc=function(){return[]},e.prototype.modify=function(e){return!1},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!!e.optimistic),this.read((0,n.__assign)((0,n.__assign)({},e),{rootId:e.id||"ROOT_QUERY",optimistic:t}))},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!!e.optimistic),this.read((0,n.__assign)((0,n.__assign)({},e),{query:this.getFragmentDoc(e.fragment,e.fragmentName),rootId:e.id,optimistic:t}))},e.prototype.writeQuery=function(e){var t=e.id,r=e.data,i=(0,n.__rest)(e,["id","data"]);return this.write(Object.assign(i,{dataId:t||"ROOT_QUERY",result:r}))},e.prototype.writeFragment=function(e){var t=e.id,r=e.data,i=e.fragment,o=e.fragmentName,s=(0,n.__rest)(e,["id","data","fragment","fragmentName"]);return this.write(Object.assign(s,{query:this.getFragmentDoc(i,o),dataId:t,result:r}))},e.prototype.updateQuery=function(e,t){return this.batch({update:function(r){var i=r.readQuery(e),o=t(i);return null==o?i:(r.writeQuery((0,n.__assign)((0,n.__assign)({},e),{data:o})),o)}})},e.prototype.updateFragment=function(e,t){return this.batch({update:function(r){var i=r.readFragment(e),o=t(i);return null==o?i:(r.writeFragment((0,n.__assign)((0,n.__assign)({},e),{data:o})),o)}})},e}(),An=function(e){function t(r,n,i,o){var s,a=e.call(this,r)||this;if(a.message=r,a.path=n,a.query=i,a.variables=o,Array.isArray(a.path)){a.missing=a.message;for(var u=a.path.length-1;u>=0;--u)a.missing=((s={})[a.path[u]]=a.missing,s)}else a.missing=a.path;return a.__proto__=t.prototype,a}return(0,n.__extends)(t,e),t}(Error);function Nn(e){return __DEV__&&(t=e,(r=new Set([t])).forEach((function(e){Y(e)&&function(e){if(__DEV__&&!Object.isFrozen(e))try{Object.freeze(e)}catch(e){if(e instanceof TypeError)return null;throw e}return e}(e)===e&&Object.getOwnPropertyNames(e).forEach((function(t){Y(e[t])&&r.add(e[t])}))}))),e;var t,r}var kn=Object.prototype.hasOwnProperty;function Mn(e){return null==e}function Dn(e,t){var r=e.__typename,n=e.id,i=e._id;if("string"==typeof r&&(t&&(t.keyObject=Mn(n)?Mn(i)?void 0:{_id:i}:{id:n}),Mn(n)&&!Mn(i)&&(n=i),!Mn(n)))return"".concat(r,":").concat("number"==typeof n||"string"==typeof n?n:JSON.stringify(n))}var Rn={dataIdFromObject:Dn,addTypename:!0,resultCaching:!0,canonizeResults:!1};function Cn(e){var t=e.canonizeResults;return void 0===t?Rn.canonizeResults:t}var $n=/^[_a-z][_0-9a-z]*/i;function Fn(e){var t=e.match($n);return t?t[0]:e}function qn(e,t,r){return!!Y(t)&&(Mt(t)?t.every((function(t){return qn(e,t,r)})):e.selections.every((function(e){if(se(e)&&Ne(e,r)){var n=ie(e);return kn.call(t,n)&&(!e.selectionSet||qn(e.selectionSet,t[n],r))}return!0})))}function Ln(e){return Y(e)&&!J(e)&&!Mt(e)}function Bn(e,t){var r=H(le(e));return{fragmentMap:r,lookupFragment:function(e){var n=r[e];return!n&&t&&(n=t.lookup(e)),n||null}}}var Un=Object.create(null),Vn=function(){return Un},zn=Object.create(null),Qn=function(){function e(e,t){var r=this;this.policies=e,this.group=t,this.data=Object.create(null),this.rootIds=Object.create(null),this.refs=Object.create(null),this.getFieldValue=function(e,t){return Nn(J(e)?r.get(e.__ref,t):e&&e[t])},this.canRead=function(e){return J(e)?r.has(e.__ref):"object"==typeof e},this.toReference=function(e,t){if("string"==typeof e)return G(e);if(J(e))return e;var n=r.policies.identify(e)[0];if(n){var i=G(n);return t&&r.merge(n,e),i}}}return e.prototype.toObject=function(){return(0,n.__assign)({},this.data)},e.prototype.has=function(e){return void 0!==this.lookup(e,!0)},e.prototype.get=function(e,t){if(this.group.depend(e,t),kn.call(this.data,e)){var r=this.data[e];if(r&&kn.call(r,t))return r[t]}return"__typename"===t&&kn.call(this.policies.rootTypenamesById,e)?this.policies.rootTypenamesById[e]:this instanceof Kn?this.parent.get(e,t):void 0},e.prototype.lookup=function(e,t){return t&&this.group.depend(e,"__exists"),kn.call(this.data,e)?this.data[e]:this instanceof Kn?this.parent.lookup(e,t):this.policies.rootTypenamesById[e]?Object.create(null):void 0},e.prototype.merge=function(e,t){var r,n=this;J(e)&&(e=e.__ref),J(t)&&(t=t.__ref);var i="string"==typeof e?this.lookup(r=e):e,o="string"==typeof t?this.lookup(r=t):t;if(o){__DEV__?u("string"==typeof r,"store.merge expects a string ID"):u("string"==typeof r,1);var s=new qt(Jn).merge(i,o);if(this.data[r]=s,s!==i&&(delete this.refs[r],this.group.caching)){var a=Object.create(null);i||(a.__exists=1),Object.keys(o).forEach((function(e){if(!i||i[e]!==s[e]){a[e]=1;var t=Fn(e);t===e||n.policies.hasKeyArgs(s.__typename,t)||(a[t]=1),void 0!==s[e]||n instanceof Kn||delete s[e]}})),!a.__typename||i&&i.__typename||this.policies.rootTypenamesById[r]!==s.__typename||delete a.__typename,Object.keys(a).forEach((function(e){return n.group.dirty(r,e)}))}}},e.prototype.modify=function(e,t){var r=this,i=this.lookup(e);if(i){var o=Object.create(null),s=!1,a=!0,u={DELETE:Un,INVALIDATE:zn,isReference:J,toReference:this.toReference,canRead:this.canRead,readField:function(t,n){return r.policies.readField("string"==typeof t?{fieldName:t,from:n||G(e)}:t,{store:r})}};if(Object.keys(i).forEach((function(c){var l=Fn(c),f=i[c];if(void 0!==f){var p="function"==typeof t?t:t[c]||t[l];if(p){var d=p===Vn?Un:p(Nn(f),(0,n.__assign)((0,n.__assign)({},u),{fieldName:l,storeFieldName:c,storage:r.getStorage(e,c)}));d===zn?r.group.dirty(e,c):(d===Un&&(d=void 0),d!==f&&(o[c]=d,s=!0,f=d))}void 0!==f&&(a=!1)}})),s)return this.merge(e,o),a&&(this instanceof Kn?this.data[e]=void 0:delete this.data[e],this.group.dirty(e,"__exists")),!0}return!1},e.prototype.delete=function(e,t,r){var n,i=this.lookup(e);if(i){var o=this.getFieldValue(i,"__typename"),s=t&&r?this.policies.getStoreFieldName({typename:o,fieldName:t,args:r}):t;return this.modify(e,s?((n={})[s]=Vn,n):Vn)}return!1},e.prototype.evict=function(e,t){var r=!1;return e.id&&(kn.call(this.data,e.id)&&(r=this.delete(e.id,e.fieldName,e.args)),this instanceof Kn&&this!==t&&(r=this.parent.evict(e,t)||r),(e.fieldName||r)&&this.group.dirty(e.id,e.fieldName||"__exists")),r},e.prototype.clear=function(){this.replace(null)},e.prototype.extract=function(){var e=this,t=this.toObject(),r=[];return this.getRootIdSet().forEach((function(t){kn.call(e.policies.rootTypenamesById,t)||r.push(t)})),r.length&&(t.__META={extraRootIds:r.sort()}),t},e.prototype.replace=function(e){var t=this;if(Object.keys(this.data).forEach((function(r){e&&kn.call(e,r)||t.delete(r)})),e){var r=e.__META,i=(0,n.__rest)(e,["__META"]);Object.keys(i).forEach((function(e){t.merge(e,i[e])})),r&&r.extraRootIds.forEach(this.retain,this)}},e.prototype.retain=function(e){return this.rootIds[e]=(this.rootIds[e]||0)+1},e.prototype.release=function(e){if(this.rootIds[e]>0){var t=--this.rootIds[e];return t||delete this.rootIds[e],t}return 0},e.prototype.getRootIdSet=function(e){return void 0===e&&(e=new Set),Object.keys(this.rootIds).forEach(e.add,e),this instanceof Kn?this.parent.getRootIdSet(e):Object.keys(this.policies.rootTypenamesById).forEach(e.add,e),e},e.prototype.gc=function(){var e=this,t=this.getRootIdSet(),r=this.toObject();t.forEach((function(n){kn.call(r,n)&&(Object.keys(e.findChildRefIds(n)).forEach(t.add,t),delete r[n])}));var n=Object.keys(r);if(n.length){for(var i=this;i instanceof Kn;)i=i.parent;n.forEach((function(e){return i.delete(e)}))}return n},e.prototype.findChildRefIds=function(e){if(!kn.call(this.refs,e)){var t=this.refs[e]=Object.create(null),r=this.data[e];if(!r)return t;var n=new Set([r]);n.forEach((function(e){J(e)&&(t[e.__ref]=!0),Y(e)&&Object.keys(e).forEach((function(t){var r=e[t];Y(r)&&n.add(r)}))}))}return this.refs[e]},e.prototype.makeCacheKey=function(){return this.group.keyMaker.lookupArray(arguments)},e}(),Yn=function(){function e(e,t){void 0===t&&(t=null),this.caching=e,this.parent=t,this.d=null,this.resetCaching()}return e.prototype.resetCaching=function(){this.d=this.caching?an():null,this.keyMaker=new Ht(Ce)},e.prototype.depend=function(e,t){if(this.d){this.d(Wn(e,t));var r=Fn(t);r!==t&&this.d(Wn(e,r)),this.parent&&this.parent.depend(e,t)}},e.prototype.dirty=function(e,t){this.d&&this.d.dirty(Wn(e,t),"__exists"===t?"forget":"setDirty")},e}();function Wn(e,t){return t+"#"+e}function Hn(e,t){Zn(e)&&e.group.depend(t,"__exists")}!function(e){var t=function(e){function t(t){var r=t.policies,n=t.resultCaching,i=void 0===n||n,o=t.seed,s=e.call(this,r,new Yn(i))||this;return s.stump=new Gn(s),s.storageTrie=new Ht(Ce),o&&s.replace(o),s}return(0,n.__extends)(t,e),t.prototype.addLayer=function(e,t){return this.stump.addLayer(e,t)},t.prototype.removeLayer=function(){return this},t.prototype.getStorage=function(){return this.storageTrie.lookupArray(arguments)},t}(e);e.Root=t}(Qn||(Qn={}));var Kn=function(e){function t(t,r,n,i){var o=e.call(this,r.policies,i)||this;return o.id=t,o.parent=r,o.replay=n,o.group=i,n(o),o}return(0,n.__extends)(t,e),t.prototype.addLayer=function(e,r){return new t(e,this,r,this.group)},t.prototype.removeLayer=function(e){var t=this,r=this.parent.removeLayer(e);return e===this.id?(this.group.caching&&Object.keys(this.data).forEach((function(e){var n=t.data[e],i=r.lookup(e);i?n?n!==i&&Object.keys(n).forEach((function(r){Pt(n[r],i[r])||t.group.dirty(e,r)})):(t.group.dirty(e,"__exists"),Object.keys(i).forEach((function(r){t.group.dirty(e,r)}))):t.delete(e)})),r):r===this.parent?this:r.addLayer(this.id,this.replay)},t.prototype.toObject=function(){return(0,n.__assign)((0,n.__assign)({},this.parent.toObject()),this.data)},t.prototype.findChildRefIds=function(t){var r=this.parent.findChildRefIds(t);return kn.call(this.data,t)?(0,n.__assign)((0,n.__assign)({},r),e.prototype.findChildRefIds.call(this,t)):r},t.prototype.getStorage=function(){for(var e=this.parent;e.parent;)e=e.parent;return e.getStorage.apply(e,arguments)},t}(Qn),Gn=function(e){function t(t){return e.call(this,"EntityStore.Stump",t,(function(){}),new Yn(t.group.caching,t.group))||this}return(0,n.__extends)(t,e),t.prototype.removeLayer=function(){return this},t.prototype.merge=function(){return this.parent.merge.apply(this.parent,arguments)},t}(Kn);function Jn(e,t,r){var n=e[r],i=t[r];return Pt(n,i)?n:i}function Zn(e){return!!(e instanceof Qn&&e.group.caching)}function Xn(e){return[e.selectionSet,e.objectOrReference,e.context,e.context.canonizeResults]}var ei=function(){function e(e){var t=this;this.knownResults=new(Ce?WeakMap:Map),this.config=Or(e,{addTypename:!1!==e.addTypename,canonizeResults:Cn(e)}),this.canon=e.canon||new Kt,this.executeSelectionSet=ln((function(e){var r,i=e.context.canonizeResults,o=Xn(e);o[3]=!i;var s=(r=t.executeSelectionSet).peek.apply(r,o);return s?i?(0,n.__assign)((0,n.__assign)({},s),{result:t.canon.admit(s.result)}):s:(Hn(e.context.store,e.enclosingRef.__ref),t.execSelectionSetImpl(e))}),{max:this.config.resultCacheMaxSize,keyArgs:Xn,makeCacheKey:function(e,t,r,n){if(Zn(r.store))return r.store.makeCacheKey(e,J(t)?t.__ref:t,r.varString,n)}}),this.executeSubSelectedArray=ln((function(e){return Hn(e.context.store,e.enclosingRef.__ref),t.execSubSelectedArrayImpl(e)}),{max:this.config.resultCacheMaxSize,makeCacheKey:function(e){var t=e.field,r=e.array,n=e.context;if(Zn(n.store))return n.store.makeCacheKey(t,r,n.varString)}})}return e.prototype.resetCanon=function(){this.canon=new Kt},e.prototype.diffQueryAgainstStore=function(e){var t=e.store,r=e.query,i=e.rootId,o=void 0===i?"ROOT_QUERY":i,s=e.variables,a=e.returnPartialData,u=void 0===a||a,c=e.canonizeResults,l=void 0===c?this.config.canonizeResults:c,f=this.config.cache.policies;s=(0,n.__assign)((0,n.__assign)({},de(fe(r))),s);var p,d=G(o),h=this.executeSelectionSet({selectionSet:pe(r).selectionSet,objectOrReference:d,enclosingRef:d,context:(0,n.__assign)({store:t,query:r,policies:f,variables:s,varString:Gt(s),canonizeResults:l},Bn(r,this.config.fragments))});if(h.missing&&(p=[new An(ti(h.missing),h.missing,r,s)],!u))throw p[0];return{result:h.result,complete:!p,missing:p}},e.prototype.isFresh=function(e,t,r,n){if(Zn(n.store)&&this.knownResults.get(e)===r){var i=this.executeSelectionSet.peek(r,t,n,this.canon.isKnown(e));if(i&&e===i.result)return!0}return!1},e.prototype.execSelectionSetImpl=function(e){var t=this,r=e.selectionSet,n=e.objectOrReference,i=e.enclosingRef,o=e.context;if(J(n)&&!o.policies.rootTypenamesById[n.__ref]&&!o.store.has(n.__ref))return{result:this.canon.empty,missing:"Dangling reference to missing ".concat(n.__ref," object")};var s,u=o.variables,c=o.policies,l=o.store.getFieldValue(n,"__typename"),f=[],p=new qt;function d(e,t){var r;return e.missing&&(s=p.merge(s,((r={})[t]=e.missing,r))),e.result}this.config.addTypename&&"string"==typeof l&&!c.rootIdsByTypename[l]&&f.push({__typename:l});var h=new Set(r.selections);h.forEach((function(e){var r,y;if(Ne(e,u))if(se(e)){var v=c.readField({fieldName:e.name.value,field:e,variables:o.variables,from:n},o),m=ie(e);void 0===v?sr.added(e)||(s=p.merge(s,((r={})[m]="Can't find field '".concat(e.name.value,"' on ").concat(J(n)?n.__ref+" object":"object "+JSON.stringify(n,null,2)),r))):Mt(v)?v=d(t.executeSubSelectedArray({field:e,array:v,enclosingRef:i,context:o}),m):e.selectionSet?null!=v&&(v=d(t.executeSelectionSet({selectionSet:e.selectionSet,objectOrReference:v,enclosingRef:J(v)?v:i,context:o}),m)):o.canonizeResults&&(v=t.canon.pass(v)),void 0!==v&&f.push(((y={})[m]=v,y))}else{var b=K(e,o.lookupFragment);if(!b&&e.kind===je.FRAGMENT_SPREAD)throw __DEV__?new a("No fragment named ".concat(e.name.value)):new a(5);b&&c.fragmentMatches(b,l)&&b.selectionSet.selections.forEach(h.add,h)}}));var y={result:$t(f),missing:s},v=o.canonizeResults?this.canon.admit(y):Nn(y);return v.result&&this.knownResults.set(v.result,r),v},e.prototype.execSubSelectedArrayImpl=function(e){var t,r=this,n=e.field,i=e.array,o=e.enclosingRef,s=e.context,a=new qt;function c(e,r){var n;return e.missing&&(t=a.merge(t,((n={})[r]=e.missing,n))),e.result}return n.selectionSet&&(i=i.filter(s.store.canRead)),i=i.map((function(e,t){return null===e?null:Mt(e)?c(r.executeSubSelectedArray({field:n,array:e,enclosingRef:o,context:s}),t):n.selectionSet?c(r.executeSelectionSet({selectionSet:n.selectionSet,objectOrReference:e,enclosingRef:J(e)?e:o,context:s}),t):(__DEV__&&function(e,t,r){if(!t.selectionSet){var n=new Set([r]);n.forEach((function(r){Y(r)&&(__DEV__?u(!J(r),"Missing selection set for object of type ".concat(function(e,t){return J(t)?e.get(t.__ref,"__typename"):t&&t.__typename}(e,r)," returned for query field ").concat(t.name.value)):u(!J(r),6),Object.values(r).forEach(n.add,n))}))}}(s.store,n,e),e)})),{result:s.canonizeResults?this.canon.admit(i):i,missing:t}},e}();function ti(e){try{JSON.stringify(e,(function(e,t){if("string"==typeof t)throw t;return t}))}catch(e){return e}}var ri=Object.create(null);function ni(e){var t=JSON.stringify(e);return ri[t]||(ri[t]=Object.create(null))}function ii(e){var t=ni(e);return t.keyFieldsFn||(t.keyFieldsFn=function(t,r){var n=function(e,t){return r.readField(t,e)},i=r.keyObject=si(e,(function(e){var i=ci(r.storeObject,e,n);return void 0===i&&t!==r.storeObject&&kn.call(t,e[0])&&(i=ci(t,e,ui)),__DEV__?u(void 0!==i,"Missing field '".concat(e.join("."),"' while extracting keyFields from ").concat(JSON.stringify(t))):u(void 0!==i,2),i}));return"".concat(r.typename,":").concat(JSON.stringify(i))})}function oi(e){var t=ni(e);return t.keyArgsFn||(t.keyArgsFn=function(t,r){var n=r.field,i=r.variables,o=r.fieldName,s=si(e,(function(e){var r=e[0],o=r.charAt(0);if("@"!==o)if("$"!==o){if(t)return ci(t,e)}else{var s=r.slice(1);if(i&&kn.call(i,s)){var a=e.slice(0);return a[0]=s,ci(i,a)}}else if(n&&Dt(n.directives)){var u=r.slice(1),c=n.directives.find((function(e){return e.name.value===u})),l=c&&ne(c,i);return l&&ci(l,e.slice(1))}})),a=JSON.stringify(s);return(t||"{}"!==a)&&(o+=":"+a),o})}function si(e,t){var r=new qt;return ai(e).reduce((function(e,n){var i,o=t(n);if(void 0!==o){for(var s=n.length-1;s>=0;--s)(i={})[n[s]]=o,o=i;e=r.merge(e,o)}return e}),Object.create(null))}function ai(e){var t=ni(e);if(!t.paths){var r=t.paths=[],n=[];e.forEach((function(t,i){Mt(t)?(ai(t).forEach((function(e){return r.push(n.concat(e))})),n.length=0):(n.push(t),Mt(e[i+1])||(r.push(n.slice(0)),n.length=0))}))}return t.paths}function ui(e,t){return e[t]}function ci(e,t,r){return r=r||ui,li(t.reduce((function e(t,n){return Mt(t)?t.map((function(t){return e(t,n)})):t&&r(t,n)}),e))}function li(e){return Y(e)?Mt(e)?e.map(li):si(Object.keys(e).sort(),(function(t){return ci(e,t)})):e}function fi(e){return void 0!==e.args?e.args:e.field?ne(e.field,e.variables):null}ee.setStringify(Gt);var pi=function(){},di=function(e,t){return t.fieldName},hi=function(e,t,r){return(0,r.mergeObjects)(e,t)},yi=function(e,t){return t},vi=function(){function e(e){this.config=e,this.typePolicies=Object.create(null),this.toBeAdded=Object.create(null),this.supertypeMap=new Map,this.fuzzySubtypes=new Map,this.rootIdsByTypename=Object.create(null),this.rootTypenamesById=Object.create(null),this.usingPossibleTypes=!1,this.config=(0,n.__assign)({dataIdFromObject:Dn},e),this.cache=this.config.cache,this.setRootTypename("Query"),this.setRootTypename("Mutation"),this.setRootTypename("Subscription"),e.possibleTypes&&this.addPossibleTypes(e.possibleTypes),e.typePolicies&&this.addTypePolicies(e.typePolicies)}return e.prototype.identify=function(e,t){var r,i=this,o=t&&(t.typename||(null===(r=t.storeObject)||void 0===r?void 0:r.__typename))||e.__typename;if(o===this.rootTypenamesById.ROOT_QUERY)return["ROOT_QUERY"];for(var s,a=t&&t.storeObject||e,u=(0,n.__assign)((0,n.__assign)({},t),{typename:o,storeObject:a,readField:t&&t.readField||function(){var e=bi(arguments,a);return i.readField(e,{store:i.cache.data,variables:e.variables})}}),c=o&&this.getTypePolicy(o),l=c&&c.keyFn||this.config.dataIdFromObject;l;){var f=l(e,u);if(!Mt(f)){s=f;break}l=ii(f)}return s=s?String(s):void 0,u.keyObject?[s,u.keyObject]:[s]},e.prototype.addTypePolicies=function(e){var t=this;Object.keys(e).forEach((function(r){var i=e[r],o=i.queryType,s=i.mutationType,a=i.subscriptionType,u=(0,n.__rest)(i,["queryType","mutationType","subscriptionType"]);o&&t.setRootTypename("Query",r),s&&t.setRootTypename("Mutation",r),a&&t.setRootTypename("Subscription",r),kn.call(t.toBeAdded,r)?t.toBeAdded[r].push(u):t.toBeAdded[r]=[u]}))},e.prototype.updateTypePolicy=function(e,t){var r=this,n=this.getTypePolicy(e),i=t.keyFields,o=t.fields;function s(e,t){e.merge="function"==typeof t?t:!0===t?hi:!1===t?yi:e.merge}s(n,t.merge),n.keyFn=!1===i?pi:Mt(i)?ii(i):"function"==typeof i?i:n.keyFn,o&&Object.keys(o).forEach((function(t){var n=r.getFieldPolicy(e,t,!0),i=o[t];if("function"==typeof i)n.read=i;else{var a=i.keyArgs,u=i.read,c=i.merge;n.keyFn=!1===a?di:Mt(a)?oi(a):"function"==typeof a?a:n.keyFn,"function"==typeof u&&(n.read=u),s(n,c)}n.read&&n.merge&&(n.keyFn=n.keyFn||di)}))},e.prototype.setRootTypename=function(e,t){void 0===t&&(t=e);var r="ROOT_"+e.toUpperCase(),n=this.rootTypenamesById[r];t!==n&&(__DEV__?u(!n||n===e,"Cannot change root ".concat(e," __typename more than once")):u(!n||n===e,3),n&&delete this.rootIdsByTypename[n],this.rootIdsByTypename[t]=r,this.rootTypenamesById[r]=t)},e.prototype.addPossibleTypes=function(e){var t=this;this.usingPossibleTypes=!0,Object.keys(e).forEach((function(r){t.getSupertypeSet(r,!0),e[r].forEach((function(e){t.getSupertypeSet(e,!0).add(r);var n=e.match($n);n&&n[0]===e||t.fuzzySubtypes.set(e,new RegExp(e))}))}))},e.prototype.getTypePolicy=function(e){var t=this;if(!kn.call(this.typePolicies,e)){var r=this.typePolicies[e]=Object.create(null);r.fields=Object.create(null);var i=this.supertypeMap.get(e);i&&i.size&&i.forEach((function(e){var i=t.getTypePolicy(e),o=i.fields,s=(0,n.__rest)(i,["fields"]);Object.assign(r,s),Object.assign(r.fields,o)}))}var o=this.toBeAdded[e];return o&&o.length&&o.splice(0).forEach((function(r){t.updateTypePolicy(e,r)})),this.typePolicies[e]},e.prototype.getFieldPolicy=function(e,t,r){if(e){var n=this.getTypePolicy(e).fields;return n[t]||r&&(n[t]=Object.create(null))}},e.prototype.getSupertypeSet=function(e,t){var r=this.supertypeMap.get(e);return!r&&t&&this.supertypeMap.set(e,r=new Set),r},e.prototype.fragmentMatches=function(e,t,r,n){var i=this;if(!e.typeCondition)return!0;if(!t)return!1;var o=e.typeCondition.name.value;if(t===o)return!0;if(this.usingPossibleTypes&&this.supertypeMap.has(o))for(var s=this.getSupertypeSet(t,!0),a=[s],c=function(e){var t=i.getSupertypeSet(e,!1);t&&t.size&&a.indexOf(t)<0&&a.push(t)},l=!(!r||!this.fuzzySubtypes.size),f=!1,p=0;p<a.length;++p){var d=a[p];if(d.has(o))return s.has(o)||(f&&__DEV__&&u.warn("Inferring subtype ".concat(t," of supertype ").concat(o)),s.add(o)),!0;d.forEach(c),l&&p===a.length-1&&qn(e.selectionSet,r,n)&&(l=!1,f=!0,this.fuzzySubtypes.forEach((function(e,r){var n=t.match(e);n&&n[0]===t&&c(r)})))}return!1},e.prototype.hasKeyArgs=function(e,t){var r=this.getFieldPolicy(e,t,!1);return!(!r||!r.keyFn)},e.prototype.getStoreFieldName=function(e){var t,r=e.typename,n=e.fieldName,i=this.getFieldPolicy(r,n,!1),o=i&&i.keyFn;if(o&&r)for(var s={typename:r,fieldName:n,field:e.field||null,variables:e.variables},a=fi(e);o;){var u=o(a,s);if(!Mt(u)){t=u||n;break}o=oi(u)}return void 0===t&&(t=e.field?function(e,t){var r=null;e.directives&&(r={},e.directives.forEach((function(e){r[e.name.value]={},e.arguments&&e.arguments.forEach((function(n){var i=n.name,o=n.value;return Z(r[e.name.value],i,o,t)}))})));var n=null;return e.arguments&&e.arguments.length&&(n={},e.arguments.forEach((function(e){var r=e.name,i=e.value;return Z(n,r,i,t)}))),ee(e.name.value,n,r)}(e.field,e.variables):ee(n,fi(e))),!1===t?n:n===Fn(t)?t:n+":"+t},e.prototype.readField=function(e,t){var r=e.from;if(r&&(e.field||e.fieldName)){if(void 0===e.typename){var n=t.store.getFieldValue(r,"__typename");n&&(e.typename=n)}var i=this.getStoreFieldName(e),o=Fn(i),s=t.store.getFieldValue(r,i),a=this.getFieldPolicy(e.typename,o,!1),u=a&&a.read;if(u){var c=mi(this,r,e,t,t.store.getStorage(J(r)?r.__ref:r,i));return fn.withValue(this.cache,u,[s,c])}return s}},e.prototype.getReadFunction=function(e,t){var r=this.getFieldPolicy(e,t,!1);return r&&r.read},e.prototype.getMergeFunction=function(e,t,r){var n=this.getFieldPolicy(e,t,!1),i=n&&n.merge;return!i&&r&&(i=(n=this.getTypePolicy(r))&&n.merge),i},e.prototype.runMergeFunction=function(e,t,r,n,i){var o=r.field,s=r.typename,a=r.merge;return a===hi?gi(n.store)(e,t):a===yi?t:(n.overwrite&&(e=void 0),a(e,t,mi(this,void 0,{typename:s,fieldName:o.name.value,field:o,variables:n.variables},n,i||Object.create(null))))},e}();function mi(e,t,r,n,i){var o=e.getStoreFieldName(r),s=Fn(o),a=r.variables||n.variables,u=n.store,c=u.toReference,l=u.canRead;return{args:fi(r),field:r.field||null,fieldName:s,storeFieldName:o,variables:a,isReference:J,toReference:c,storage:i,cache:e.cache,canRead:l,readField:function(){return e.readField(bi(arguments,t,a),n)},mergeObjects:gi(n.store)}}function bi(e,t,r){var i,o,s,a=e[0],c=e[1],l=e.length;return"string"==typeof a?i={fieldName:a,from:l>1?c:t}:(i=(0,n.__assign)({},a),kn.call(i,"from")||(i.from=t)),__DEV__&&void 0===i.from&&__DEV__&&u.warn("Undefined 'from' passed to readField with arguments ".concat((o=Array.from(e),s=lr("stringifyForDisplay"),JSON.stringify(o,(function(e,t){return void 0===t?s:t})).split(JSON.stringify(s)).join("<undefined>")))),void 0===i.variables&&(i.variables=r),i}function gi(e){return function(t,r){if(Mt(t)||Mt(r))throw __DEV__?new a("Cannot automatically merge arrays"):new a(4);if(Y(t)&&Y(r)){var i=e.getFieldValue(t,"__typename"),o=e.getFieldValue(r,"__typename");if(i&&o&&i!==o)return r;if(J(t)&&Ln(r))return e.merge(t.__ref,r),t;if(Ln(t)&&J(r))return e.merge(t,r.__ref),r;if(Ln(t)&&Ln(r))return(0,n.__assign)((0,n.__assign)({},t),r)}return r}}function _i(e,t,r){var i="".concat(t).concat(r),o=e.flavors.get(i);return o||e.flavors.set(i,o=e.clientOnly===t&&e.deferred===r?e:(0,n.__assign)((0,n.__assign)({},e),{clientOnly:t,deferred:r})),o}var wi=function(){function e(e,t,r){this.cache=e,this.reader=t,this.fragments=r}return e.prototype.writeToStore=function(e,t){var r=this,i=t.query,o=t.result,s=t.dataId,c=t.variables,l=t.overwrite,f=ue(i),p=new qt;c=(0,n.__assign)((0,n.__assign)({},de(f)),c);var d=(0,n.__assign)((0,n.__assign)({store:e,written:Object.create(null),merge:function(e,t){return p.merge(e,t)},variables:c,varString:Gt(c)},Bn(i,this.fragments)),{overwrite:!!l,incomingById:new Map,clientOnly:!1,deferred:!1,flavors:new Map}),h=this.processSelectionSet({result:o||Object.create(null),dataId:s,selectionSet:f.selectionSet,mergeTree:{map:new Map},context:d});if(!J(h))throw __DEV__?new a("Could not identify object ".concat(JSON.stringify(o))):new a(7);return d.incomingById.forEach((function(t,n){var i=t.storeObject,o=t.mergeTree,s=t.fieldNodeSet,a=G(n);if(o&&o.map.size){var c=r.applyMerges(o,a,i,d);if(J(c))return;i=c}if(__DEV__&&!d.overwrite){var l=Object.create(null);s.forEach((function(e){e.selectionSet&&(l[e.name.value]=!0)})),Object.keys(i).forEach((function(e){(function(e){return!0===l[Fn(e)]})(e)&&!function(e){var t=o&&o.map.get(e);return Boolean(t&&t.info&&t.info.merge)}(e)&&function(e,t,r,n){var i=function(e){var t=n.getFieldValue(e,r);return"object"==typeof t&&t},o=i(e);if(o){var s=i(t);if(s&&!J(o)&&!Pt(o,s)&&!Object.keys(o).every((function(e){return void 0!==n.getFieldValue(s,e)}))){var a=n.getFieldValue(e,"__typename")||n.getFieldValue(t,"__typename"),c=Fn(r),l="".concat(a,".").concat(c);if(!Pi.has(l)){Pi.add(l);var f=[];Mt(o)||Mt(s)||[o,s].forEach((function(e){var t=n.getFieldValue(e,"__typename");"string"!=typeof t||f.includes(t)||f.push(t)})),__DEV__&&u.warn("Cache data may be lost when replacing the ".concat(c," field of a ").concat(a," object.\n\nTo address this problem (which is not a bug in Apollo Client), ").concat(f.length?"either ensure all objects of type "+f.join(" and ")+" have an ID or a custom merge function, or ":"","define a custom merge function for the ").concat(l," field, so InMemoryCache can safely merge these objects:\n\n existing: ").concat(JSON.stringify(o).slice(0,1e3),"\n incoming: ").concat(JSON.stringify(s).slice(0,1e3),"\n\nFor more information about these options, please refer to the documentation:\n\n * Ensuring entity objects have IDs: https://go.apollo.dev/c/generating-unique-identifiers\n * Defining custom merge functions: https://go.apollo.dev/c/merging-non-normalized-objects\n"))}}}}(a,i,e,d.store)}))}e.merge(n,i)})),e.retain(h.__ref),h},e.prototype.processSelectionSet=function(e){var t=this,r=e.dataId,i=e.result,o=e.selectionSet,s=e.context,a=e.mergeTree,c=this.cache.policies,l=Object.create(null),f=r&&c.rootTypenamesById[r]||oe(i,o,s.fragmentMap)||r&&s.store.get(r,"__typename");"string"==typeof f&&(l.__typename=f);var p=function(){var e=bi(arguments,l,s.variables);if(J(e.from)){var t=s.incomingById.get(e.from.__ref);if(t){var r=c.readField((0,n.__assign)((0,n.__assign)({},e),{from:t.storeObject}),s);if(void 0!==r)return r}}return c.readField(e,s)},d=new Set;this.flattenFields(o,i,s,f).forEach((function(e,r){var n,o=ie(r),s=i[o];if(d.add(r),void 0!==s){var h=c.getStoreFieldName({typename:f,fieldName:r.name.value,field:r,variables:e.variables}),y=Si(a,h),v=t.processFieldValue(s,r,r.selectionSet?_i(e,!1,!1):e,y),m=void 0;r.selectionSet&&(J(v)||Ln(v))&&(m=p("__typename",v));var b=c.getMergeFunction(f,r.name.value,m);b?y.info={field:r,typename:f,merge:b}:ji(a,h),l=e.merge(l,((n={})[h]=v,n))}else!__DEV__||e.clientOnly||e.deferred||sr.added(r)||c.getReadFunction(f,r.name.value)||__DEV__&&u.error("Missing field '".concat(ie(r),"' while writing result ").concat(JSON.stringify(i,null,2)).substring(0,1e3))}));try{var h=c.identify(i,{typename:f,selectionSet:o,fragmentMap:s.fragmentMap,storeObject:l,readField:p}),y=h[0],v=h[1];r=r||y,v&&(l=s.merge(l,v))}catch(e){if(!r)throw e}if("string"==typeof r){var m=G(r),b=s.written[r]||(s.written[r]=[]);if(b.indexOf(o)>=0)return m;if(b.push(o),this.reader&&this.reader.isFresh(i,m,o,s))return m;var g=s.incomingById.get(r);return g?(g.storeObject=s.merge(g.storeObject,l),g.mergeTree=Ei(g.mergeTree,a),d.forEach((function(e){return g.fieldNodeSet.add(e)}))):s.incomingById.set(r,{storeObject:l,mergeTree:Ti(a)?void 0:a,fieldNodeSet:d}),m}return l},e.prototype.processFieldValue=function(e,t,r,n){var i=this;return t.selectionSet&&null!==e?Mt(e)?e.map((function(e,o){var s=i.processFieldValue(e,t,r,Si(n,o));return ji(n,o),s})):this.processSelectionSet({result:e,selectionSet:t.selectionSet,context:r,mergeTree:n}):__DEV__?_r(e):e},e.prototype.flattenFields=function(e,t,r,n){void 0===n&&(n=oe(t,e,r.fragmentMap));var i=new Map,o=this.cache.policies,s=new Ht(!1);return function e(u,c){var l=s.lookup(u,c.clientOnly,c.deferred);l.visited||(l.visited=!0,u.selections.forEach((function(s){if(Ne(s,r.variables)){var u=c.clientOnly,l=c.deferred;if(u&&l||!Dt(s.directives)||s.directives.forEach((function(e){var t=e.name.value;if("client"===t&&(u=!0),"defer"===t){var n=ne(e,r.variables);n&&!1===n.if||(l=!0)}})),se(s)){var f=i.get(s);f&&(u=u&&f.clientOnly,l=l&&f.deferred),i.set(s,_i(r,u,l))}else{var p=K(s,r.lookupFragment);if(!p&&s.kind===je.FRAGMENT_SPREAD)throw __DEV__?new a("No fragment named ".concat(s.name.value)):new a(8);p&&o.fragmentMatches(p,n,t,r.variables)&&e(p.selectionSet,_i(r,u,l))}}})))}(e,r),i},e.prototype.applyMerges=function(e,t,r,i,o){var s,a=this;if(e.map.size&&!J(r)){var c,l=Mt(r)||!J(t)&&!Ln(t)?void 0:t,f=r;l&&!o&&(o=[J(l)?l.__ref:l]);var p=function(e,t){return Mt(e)?"number"==typeof t?e[t]:void 0:i.store.getFieldValue(e,String(t))};e.map.forEach((function(e,t){var r=p(l,t),n=p(f,t);if(void 0!==n){o&&o.push(t);var s=a.applyMerges(e,r,n,i,o);s!==n&&(c=c||new Map).set(t,s),o&&u(o.pop()===t)}})),c&&(r=Mt(f)?f.slice(0):(0,n.__assign)({},f),c.forEach((function(e,t){r[t]=e})))}return e.info?this.cache.policies.runMergeFunction(t,r,e.info,i,o&&(s=i.store).getStorage.apply(s,o)):r},e}(),Oi=[];function Si(e,t){var r=e.map;return r.has(t)||r.set(t,Oi.pop()||{map:new Map}),r.get(t)}function Ei(e,t){if(e===t||!t||Ti(t))return e;if(!e||Ti(e))return t;var r=e.info&&t.info?(0,n.__assign)((0,n.__assign)({},e.info),t.info):e.info||t.info,i=e.map.size&&t.map.size,o={info:r,map:i?new Map:e.map.size?e.map:t.map};if(i){var s=new Set(t.map.keys());e.map.forEach((function(e,r){o.map.set(r,Ei(e,t.map.get(r))),s.delete(r)})),s.forEach((function(r){o.map.set(r,Ei(t.map.get(r),e.map.get(r)))}))}return o}function Ti(e){return!e||!(e.info||e.map.size)}function ji(e,t){var r=e.map,n=r.get(t);n&&Ti(n)&&(Oi.push(n),r.delete(t))}var Pi=new Set,Ii=function(e){function t(t){void 0===t&&(t={});var r=e.call(this)||this;return r.watches=new Set,r.typenameDocumentCache=new Map,r.makeVar=yn,r.txCount=0,r.config=function(e){return Or(Rn,e)}(t),r.addTypename=!!r.config.addTypename,r.policies=new vi({cache:r,dataIdFromObject:r.config.dataIdFromObject,possibleTypes:r.config.possibleTypes,typePolicies:r.config.typePolicies}),r.init(),r}return(0,n.__extends)(t,e),t.prototype.init=function(){var e=this.data=new Qn.Root({policies:this.policies,resultCaching:this.config.resultCaching});this.optimisticData=e.stump,this.resetResultCache()},t.prototype.resetResultCache=function(e){var t=this,r=this.storeReader,n=this.config.fragments;this.storeWriter=new wi(this,this.storeReader=new ei({cache:this,addTypename:this.addTypename,resultCacheMaxSize:this.config.resultCacheMaxSize,canonizeResults:Cn(this.config),canon:e?void 0:r&&r.canon,fragments:n}),n),this.maybeBroadcastWatch=ln((function(e,r){return t.broadcastWatch(e,r)}),{max:this.config.resultCacheMaxSize,makeCacheKey:function(e){var r=e.optimistic?t.optimisticData:t.data;if(Zn(r)){var n=e.optimistic,i=e.id,o=e.variables;return r.makeCacheKey(e.query,e.callback,Gt({optimistic:n,id:i,variables:o}))}}}),new Set([this.data.group,this.optimisticData.group]).forEach((function(e){return e.resetCaching()}))},t.prototype.restore=function(e){return this.init(),e&&this.data.replace(e),this},t.prototype.extract=function(e){return void 0===e&&(e=!1),(e?this.optimisticData:this.data).extract()},t.prototype.read=function(e){var t=e.returnPartialData,r=void 0!==t&&t;try{return this.storeReader.diffQueryAgainstStore((0,n.__assign)((0,n.__assign)({},e),{store:e.optimistic?this.optimisticData:this.data,config:this.config,returnPartialData:r})).result||null}catch(e){if(e instanceof An)return null;throw e}},t.prototype.write=function(e){try{return++this.txCount,this.storeWriter.writeToStore(this.data,e)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.modify=function(e){if(kn.call(e,"id")&&!e.id)return!1;var t=e.optimistic?this.optimisticData:this.data;try{return++this.txCount,t.modify(e.id||"ROOT_QUERY",e.fields)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.diff=function(e){return this.storeReader.diffQueryAgainstStore((0,n.__assign)((0,n.__assign)({},e),{store:e.optimistic?this.optimisticData:this.data,rootId:e.id||"ROOT_QUERY",config:this.config}))},t.prototype.watch=function(e){var t,r=this;return this.watches.size||dn(t=this).vars.forEach((function(e){return e.attachCache(t)})),this.watches.add(e),e.immediate&&this.maybeBroadcastWatch(e),function(){r.watches.delete(e)&&!r.watches.size&&hn(r),r.maybeBroadcastWatch.forget(e)}},t.prototype.gc=function(e){Gt.reset();var t=this.optimisticData.gc();return e&&!this.txCount&&(e.resetResultCache?this.resetResultCache(e.resetResultIdentities):e.resetResultIdentities&&this.storeReader.resetCanon()),t},t.prototype.retain=function(e,t){return(t?this.optimisticData:this.data).retain(e)},t.prototype.release=function(e,t){return(t?this.optimisticData:this.data).release(e)},t.prototype.identify=function(e){if(J(e))return e.__ref;try{return this.policies.identify(e)[0]}catch(e){__DEV__&&u.warn(e)}},t.prototype.evict=function(e){if(!e.id){if(kn.call(e,"id"))return!1;e=(0,n.__assign)((0,n.__assign)({},e),{id:"ROOT_QUERY"})}try{return++this.txCount,this.optimisticData.evict(e,this.data)}finally{--this.txCount||!1===e.broadcast||this.broadcastWatches()}},t.prototype.reset=function(e){var t=this;return this.init(),Gt.reset(),e&&e.discardWatches?(this.watches.forEach((function(e){return t.maybeBroadcastWatch.forget(e)})),this.watches.clear(),hn(this)):this.broadcastWatches(),Promise.resolve()},t.prototype.removeOptimistic=function(e){var t=this.optimisticData.removeLayer(e);t!==this.optimisticData&&(this.optimisticData=t,this.broadcastWatches())},t.prototype.batch=function(e){var t,r=this,i=e.update,o=e.optimistic,s=void 0===o||o,a=e.removeOptimistic,u=e.onWatchUpdated,c=function(e){var n=r,o=n.data,s=n.optimisticData;++r.txCount,e&&(r.data=r.optimisticData=e);try{return t=i(r)}finally{--r.txCount,r.data=o,r.optimisticData=s}},l=new Set;return u&&!this.txCount&&this.broadcastWatches((0,n.__assign)((0,n.__assign)({},e),{onWatchUpdated:function(e){return l.add(e),!1}})),"string"==typeof s?this.optimisticData=this.optimisticData.addLayer(s,c):!1===s?c(this.data):c(),"string"==typeof a&&(this.optimisticData=this.optimisticData.removeLayer(a)),u&&l.size?(this.broadcastWatches((0,n.__assign)((0,n.__assign)({},e),{onWatchUpdated:function(e,t){var r=u.call(this,e,t);return!1!==r&&l.delete(e),r}})),l.size&&l.forEach((function(e){return r.maybeBroadcastWatch.dirty(e)}))):this.broadcastWatches(e),t},t.prototype.performTransaction=function(e,t){return this.batch({update:e,optimistic:t||null!==t})},t.prototype.transformDocument=function(e){if(this.addTypename){var t=this.typenameDocumentCache.get(e);return t||(t=sr(e),this.typenameDocumentCache.set(e,t),this.typenameDocumentCache.set(t,t)),t}return e},t.prototype.transformForLink=function(e){var t=this.config.fragments;return t?t.transform(e):e},t.prototype.broadcastWatches=function(e){var t=this;this.txCount||this.watches.forEach((function(r){return t.maybeBroadcastWatch(r,e)}))},t.prototype.broadcastWatch=function(e,t){var r=e.lastDiff,n=this.diff(e);t&&(e.optimistic&&"string"==typeof t.optimistic&&(n.fromOptimisticTransaction=!0),t.onWatchUpdated&&!1===t.onWatchUpdated.call(this,e,n,r))||r&&Pt(r.result,n.result)||e.callback(e.lastDiff=n,r)},t}(xn),xi=be.empty,Ai=be.from,Ni=be.split,ki=be.concat;function Mi(e){var t=!1;return new Promise((function(r,n){e.subscribe({next:function(e){t?__DEV__&&u.warn("Promise Wrapper does not support multiple results from Observable"):(t=!0,r(e))},error:n})}))}function Di(e){return new Q((function(t){e.then((function(e){t.next(e),t.complete()})).catch(t.error.bind(t))}))}function Ri(e,t){if(!Boolean(e))throw new Error(null!=t?t:"Unexpected invariant triggered.")}const Ci=/\r\n|[\n\r]/g;function $i(e,t){let r=0,n=1;for(const i of e.body.matchAll(Ci)){if("number"==typeof i.index||Ri(!1),i.index>=t)break;r=i.index+i[0].length,n+=1}return{line:n,column:t+1-r}}function Fi(e,t){const r=e.locationOffset.column-1,n="".padStart(r)+e.body,i=t.line-1,o=e.locationOffset.line-1,s=t.line+o,a=1===t.line?r:0,u=t.column+a,c=`${e.name}:${s}:${u}\n`,l=n.split(/\r\n|[\n\r]/g),f=l[i];if(f.length>120){const e=Math.floor(u/80),t=u%80,r=[];for(let e=0;e<f.length;e+=80)r.push(f.slice(e,e+80));return c+qi([[`${s} |`,r[0]],...r.slice(1,e+1).map((e=>["|",e])),["|","^".padStart(t)],["|",r[e+1]]])}return c+qi([[s-1+" |",l[i-1]],[`${s} |`,f],["|","^".padStart(u)],[`${s+1} |`,l[i+1]]])}function qi(e){const t=e.filter((([e,t])=>void 0!==t)),r=Math.max(...t.map((([e])=>e.length)));return t.map((([e,t])=>e.padStart(r)+(t?" "+t:""))).join("\n")}class Li extends Error{constructor(e,...t){var r,n,i;const{nodes:o,source:s,positions:a,path:u,originalError:c,extensions:l}=function(e){const t=e[0];return null==t||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}(t);super(e),this.name="GraphQLError",this.path=null!=u?u:void 0,this.originalError=null!=c?c:void 0,this.nodes=Bi(Array.isArray(o)?o:o?[o]:void 0);const f=Bi(null===(r=this.nodes)||void 0===r?void 0:r.map((e=>e.loc)).filter((e=>null!=e)));this.source=null!=s?s:null==f||null===(n=f[0])||void 0===n?void 0:n.source,this.positions=null!=a?a:null==f?void 0:f.map((e=>e.start)),this.locations=a&&s?a.map((e=>$i(s,e))):null==f?void 0:f.map((e=>$i(e.source,e.start)));const p="object"==typeof(d=null==c?void 0:c.extensions)&&null!==d?null==c?void 0:c.extensions:void 0;var d;this.extensions=null!==(i=null!=l?l:p)&&void 0!==i?i:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),null!=c&&c.stack?Object.defineProperty(this,"stack",{value:c.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,Li):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let e=this.message;if(this.nodes)for(const r of this.nodes)r.loc&&(e+="\n\n"+Fi((t=r.loc).source,$i(t.source,t.start)));else if(this.source&&this.locations)for(const t of this.locations)e+="\n\n"+Fi(this.source,t);var t;return e}toJSON(){const e={message:this.message};return null!=this.locations&&(e.locations=this.locations),null!=this.path&&(e.path=this.path),null!=this.extensions&&Object.keys(this.extensions).length>0&&(e.extensions=this.extensions),e}}function Bi(e){return void 0===e||0===e.length?void 0:e}function Ui(e,t,r){return new Li(`Syntax Error: ${r}`,{source:e,positions:[t]})}var Vi,zi,Qi;!function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"}(Vi||(Vi={})),(Qi=zi||(zi={})).SOF="<SOF>",Qi.EOF="<EOF>",Qi.BANG="!",Qi.DOLLAR="$",Qi.AMP="&",Qi.PAREN_L="(",Qi.PAREN_R=")",Qi.SPREAD="...",Qi.COLON=":",Qi.EQUALS="=",Qi.AT="@",Qi.BRACKET_L="[",Qi.BRACKET_R="]",Qi.BRACE_L="{",Qi.PIPE="|",Qi.BRACE_R="}",Qi.NAME="Name",Qi.INT="Int",Qi.FLOAT="Float",Qi.STRING="String",Qi.BLOCK_STRING="BlockString",Qi.COMMENT="Comment";class Yi{constructor(e){const t=new we(zi.SOF,0,0,0,0);this.source=e,this.lastToken=t,this.token=t,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let e=this.token;if(e.kind!==zi.EOF)do{if(e.next)e=e.next;else{const t=Xi(this,e.end);e.next=t,t.prev=e,e=t}}while(e.kind===zi.COMMENT);return e}}function Wi(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function Hi(e,t){return Ki(e.charCodeAt(t))&&Gi(e.charCodeAt(t+1))}function Ki(e){return e>=55296&&e<=56319}function Gi(e){return e>=56320&&e<=57343}function Ji(e,t){const r=e.source.body.codePointAt(t);if(void 0===r)return zi.EOF;if(r>=32&&r<=126){const e=String.fromCodePoint(r);return'"'===e?"'\"'":`"${e}"`}return"U+"+r.toString(16).toUpperCase().padStart(4,"0")}function Zi(e,t,r,n,i){const o=e.line,s=1+r-e.lineStart;return new we(t,r,n,o,s,i)}function Xi(e,t){const r=e.source.body,n=r.length;let i=t;for(;i<n;){const t=r.charCodeAt(i);switch(t){case 65279:case 9:case 32:case 44:++i;continue;case 10:++i,++e.line,e.lineStart=i;continue;case 13:10===r.charCodeAt(i+1)?i+=2:++i,++e.line,e.lineStart=i;continue;case 35:return eo(e,i);case 33:return Zi(e,zi.BANG,i,i+1);case 36:return Zi(e,zi.DOLLAR,i,i+1);case 38:return Zi(e,zi.AMP,i,i+1);case 40:return Zi(e,zi.PAREN_L,i,i+1);case 41:return Zi(e,zi.PAREN_R,i,i+1);case 46:if(46===r.charCodeAt(i+1)&&46===r.charCodeAt(i+2))return Zi(e,zi.SPREAD,i,i+3);break;case 58:return Zi(e,zi.COLON,i,i+1);case 61:return Zi(e,zi.EQUALS,i,i+1);case 64:return Zi(e,zi.AT,i,i+1);case 91:return Zi(e,zi.BRACKET_L,i,i+1);case 93:return Zi(e,zi.BRACKET_R,i,i+1);case 123:return Zi(e,zi.BRACE_L,i,i+1);case 124:return Zi(e,zi.PIPE,i,i+1);case 125:return Zi(e,zi.BRACE_R,i,i+1);case 34:return 34===r.charCodeAt(i+1)&&34===r.charCodeAt(i+2)?co(e,i):no(e,i)}if(Ge(t)||45===t)return to(e,i,t);if(Ze(t))return lo(e,i);throw Ui(e.source,i,39===t?"Unexpected single quote character ('), did you mean to use a double quote (\")?":Wi(t)||Hi(r,i)?`Unexpected character: ${Ji(e,i)}.`:`Invalid character: ${Ji(e,i)}.`)}return Zi(e,zi.EOF,n,n)}function eo(e,t){const r=e.source.body,n=r.length;let i=t+1;for(;i<n;){const e=r.charCodeAt(i);if(10===e||13===e)break;if(Wi(e))++i;else{if(!Hi(r,i))break;i+=2}}return Zi(e,zi.COMMENT,t,i,r.slice(t+1,i))}function to(e,t,r){const n=e.source.body;let i=t,o=r,s=!1;if(45===o&&(o=n.charCodeAt(++i)),48===o){if(o=n.charCodeAt(++i),Ge(o))throw Ui(e.source,i,`Invalid number, unexpected digit after 0: ${Ji(e,i)}.`)}else i=ro(e,i,o),o=n.charCodeAt(i);if(46===o&&(s=!0,o=n.charCodeAt(++i),i=ro(e,i,o),o=n.charCodeAt(i)),69!==o&&101!==o||(s=!0,o=n.charCodeAt(++i),43!==o&&45!==o||(o=n.charCodeAt(++i)),i=ro(e,i,o),o=n.charCodeAt(i)),46===o||Ze(o))throw Ui(e.source,i,`Invalid number, expected digit but got: ${Ji(e,i)}.`);return Zi(e,s?zi.FLOAT:zi.INT,t,i,n.slice(t,i))}function ro(e,t,r){if(!Ge(r))throw Ui(e.source,t,`Invalid number, expected digit but got: ${Ji(e,t)}.`);const n=e.source.body;let i=t+1;for(;Ge(n.charCodeAt(i));)++i;return i}function no(e,t){const r=e.source.body,n=r.length;let i=t+1,o=i,s="";for(;i<n;){const n=r.charCodeAt(i);if(34===n)return s+=r.slice(o,i),Zi(e,zi.STRING,t,i+1,s);if(92!==n){if(10===n||13===n)break;if(Wi(n))++i;else{if(!Hi(r,i))throw Ui(e.source,i,`Invalid character within String: ${Ji(e,i)}.`);i+=2}}else{s+=r.slice(o,i);const t=117===r.charCodeAt(i+1)?123===r.charCodeAt(i+2)?io(e,i):oo(e,i):uo(e,i);s+=t.value,i+=t.size,o=i}}throw Ui(e.source,i,"Unterminated string.")}function io(e,t){const r=e.source.body;let n=0,i=3;for(;i<12;){const e=r.charCodeAt(t+i++);if(125===e){if(i<5||!Wi(n))break;return{value:String.fromCodePoint(n),size:i}}if(n=n<<4|ao(e),n<0)break}throw Ui(e.source,t,`Invalid Unicode escape sequence: "${r.slice(t,t+i)}".`)}function oo(e,t){const r=e.source.body,n=so(r,t+2);if(Wi(n))return{value:String.fromCodePoint(n),size:6};if(Ki(n)&&92===r.charCodeAt(t+6)&&117===r.charCodeAt(t+7)){const e=so(r,t+8);if(Gi(e))return{value:String.fromCodePoint(n,e),size:12}}throw Ui(e.source,t,`Invalid Unicode escape sequence: "${r.slice(t,t+6)}".`)}function so(e,t){return ao(e.charCodeAt(t))<<12|ao(e.charCodeAt(t+1))<<8|ao(e.charCodeAt(t+2))<<4|ao(e.charCodeAt(t+3))}function ao(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function uo(e,t){const r=e.source.body;switch(r.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:"\n",size:2};case 114:return{value:"\r",size:2};case 116:return{value:"\t",size:2}}throw Ui(e.source,t,`Invalid character escape sequence: "${r.slice(t,t+2)}".`)}function co(e,t){const r=e.source.body,n=r.length;let i=e.lineStart,o=t+3,s=o,a="";const u=[];for(;o<n;){const n=r.charCodeAt(o);if(34===n&&34===r.charCodeAt(o+1)&&34===r.charCodeAt(o+2)){a+=r.slice(s,o),u.push(a);const n=Zi(e,zi.BLOCK_STRING,t,o+3,Xe(u).join("\n"));return e.line+=u.length-1,e.lineStart=i,n}if(92!==n||34!==r.charCodeAt(o+1)||34!==r.charCodeAt(o+2)||34!==r.charCodeAt(o+3))if(10!==n&&13!==n)if(Wi(n))++o;else{if(!Hi(r,o))throw Ui(e.source,o,`Invalid character within String: ${Ji(e,o)}.`);o+=2}else a+=r.slice(s,o),u.push(a),13===n&&10===r.charCodeAt(o+1)?o+=2:++o,a="",s=o,i=o;else a+=r.slice(s,o),s=o+1,o+=4}throw Ui(e.source,o,"Unterminated string.")}function lo(e,t){const r=e.source.body,n=r.length;let i=t+1;for(;i<n&&(Je(o=r.charCodeAt(i))||Ge(o)||95===o);)++i;var o;return Zi(e,zi.NAME,t,i,r.slice(t,i))}class fo{constructor(e,t={}){const r=function(e){return e instanceof E}(e)?e:new E(e);this._lexer=new Yi(r),this._options=t,this._tokenCounter=0}parseName(){const e=this.expectToken(zi.NAME);return this.node(e,{kind:je.NAME,value:e.value})}parseDocument(){return this.node(this._lexer.token,{kind:je.DOCUMENT,definitions:this.many(zi.SOF,this.parseDefinition,zi.EOF)})}parseDefinition(){if(this.peek(zi.BRACE_L))return this.parseOperationDefinition();const e=this.peekDescription(),t=e?this._lexer.lookahead():this._lexer.token;if(t.kind===zi.NAME){switch(t.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(e)throw Ui(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(t.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(t)}parseOperationDefinition(){const e=this._lexer.token;if(this.peek(zi.BRACE_L))return this.node(e,{kind:je.OPERATION_DEFINITION,operation:Te.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const t=this.parseOperationType();let r;return this.peek(zi.NAME)&&(r=this.parseName()),this.node(e,{kind:je.OPERATION_DEFINITION,operation:t,name:r,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const e=this.expectToken(zi.NAME);switch(e.value){case"query":return Te.QUERY;case"mutation":return Te.MUTATION;case"subscription":return Te.SUBSCRIPTION}throw this.unexpected(e)}parseVariableDefinitions(){return this.optionalMany(zi.PAREN_L,this.parseVariableDefinition,zi.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:je.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(zi.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(zi.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const e=this._lexer.token;return this.expectToken(zi.DOLLAR),this.node(e,{kind:je.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:je.SELECTION_SET,selections:this.many(zi.BRACE_L,this.parseSelection,zi.BRACE_R)})}parseSelection(){return this.peek(zi.SPREAD)?this.parseFragment():this.parseField()}parseField(){const e=this._lexer.token,t=this.parseName();let r,n;return this.expectOptionalToken(zi.COLON)?(r=t,n=this.parseName()):n=t,this.node(e,{kind:je.FIELD,alias:r,name:n,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(zi.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(e){const t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(zi.PAREN_L,t,zi.PAREN_R)}parseArgument(e=!1){const t=this._lexer.token,r=this.parseName();return this.expectToken(zi.COLON),this.node(t,{kind:je.ARGUMENT,name:r,value:this.parseValueLiteral(e)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const e=this._lexer.token;this.expectToken(zi.SPREAD);const t=this.expectOptionalKeyword("on");return!t&&this.peek(zi.NAME)?this.node(e,{kind:je.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(e,{kind:je.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){const e=this._lexer.token;return this.expectKeyword("fragment"),!0===this._options.allowLegacyFragmentVariables?this.node(e,{kind:je.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(e,{kind:je.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()}parseValueLiteral(e){const t=this._lexer.token;switch(t.kind){case zi.BRACKET_L:return this.parseList(e);case zi.BRACE_L:return this.parseObject(e);case zi.INT:return this.advanceLexer(),this.node(t,{kind:je.INT,value:t.value});case zi.FLOAT:return this.advanceLexer(),this.node(t,{kind:je.FLOAT,value:t.value});case zi.STRING:case zi.BLOCK_STRING:return this.parseStringLiteral();case zi.NAME:switch(this.advanceLexer(),t.value){case"true":return this.node(t,{kind:je.BOOLEAN,value:!0});case"false":return this.node(t,{kind:je.BOOLEAN,value:!1});case"null":return this.node(t,{kind:je.NULL});default:return this.node(t,{kind:je.ENUM,value:t.value})}case zi.DOLLAR:if(e){if(this.expectToken(zi.DOLLAR),this._lexer.token.kind===zi.NAME){const e=this._lexer.token.value;throw Ui(this._lexer.source,t.start,`Unexpected variable "$${e}" in constant value.`)}throw this.unexpected(t)}return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){const e=this._lexer.token;return this.advanceLexer(),this.node(e,{kind:je.STRING,value:e.value,block:e.kind===zi.BLOCK_STRING})}parseList(e){return this.node(this._lexer.token,{kind:je.LIST,values:this.any(zi.BRACKET_L,(()=>this.parseValueLiteral(e)),zi.BRACKET_R)})}parseObject(e){return this.node(this._lexer.token,{kind:je.OBJECT,fields:this.any(zi.BRACE_L,(()=>this.parseObjectField(e)),zi.BRACE_R)})}parseObjectField(e){const t=this._lexer.token,r=this.parseName();return this.expectToken(zi.COLON),this.node(t,{kind:je.OBJECT_FIELD,name:r,value:this.parseValueLiteral(e)})}parseDirectives(e){const t=[];for(;this.peek(zi.AT);)t.push(this.parseDirective(e));return t}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(e){const t=this._lexer.token;return this.expectToken(zi.AT),this.node(t,{kind:je.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e)})}parseTypeReference(){const e=this._lexer.token;let t;if(this.expectOptionalToken(zi.BRACKET_L)){const r=this.parseTypeReference();this.expectToken(zi.BRACKET_R),t=this.node(e,{kind:je.LIST_TYPE,type:r})}else t=this.parseNamedType();return this.expectOptionalToken(zi.BANG)?this.node(e,{kind:je.NON_NULL_TYPE,type:t}):t}parseNamedType(){return this.node(this._lexer.token,{kind:je.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(zi.STRING)||this.peek(zi.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");const r=this.parseConstDirectives(),n=this.many(zi.BRACE_L,this.parseOperationTypeDefinition,zi.BRACE_R);return this.node(e,{kind:je.SCHEMA_DEFINITION,description:t,directives:r,operationTypes:n})}parseOperationTypeDefinition(){const e=this._lexer.token,t=this.parseOperationType();this.expectToken(zi.COLON);const r=this.parseNamedType();return this.node(e,{kind:je.OPERATION_TYPE_DEFINITION,operation:t,type:r})}parseScalarTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");const r=this.parseName(),n=this.parseConstDirectives();return this.node(e,{kind:je.SCALAR_TYPE_DEFINITION,description:t,name:r,directives:n})}parseObjectTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");const r=this.parseName(),n=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(e,{kind:je.OBJECT_TYPE_DEFINITION,description:t,name:r,interfaces:n,directives:i,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(zi.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(zi.BRACE_L,this.parseFieldDefinition,zi.BRACE_R)}parseFieldDefinition(){const e=this._lexer.token,t=this.parseDescription(),r=this.parseName(),n=this.parseArgumentDefs();this.expectToken(zi.COLON);const i=this.parseTypeReference(),o=this.parseConstDirectives();return this.node(e,{kind:je.FIELD_DEFINITION,description:t,name:r,arguments:n,type:i,directives:o})}parseArgumentDefs(){return this.optionalMany(zi.PAREN_L,this.parseInputValueDef,zi.PAREN_R)}parseInputValueDef(){const e=this._lexer.token,t=this.parseDescription(),r=this.parseName();this.expectToken(zi.COLON);const n=this.parseTypeReference();let i;this.expectOptionalToken(zi.EQUALS)&&(i=this.parseConstValueLiteral());const o=this.parseConstDirectives();return this.node(e,{kind:je.INPUT_VALUE_DEFINITION,description:t,name:r,type:n,defaultValue:i,directives:o})}parseInterfaceTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");const r=this.parseName(),n=this.parseImplementsInterfaces(),i=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(e,{kind:je.INTERFACE_TYPE_DEFINITION,description:t,name:r,interfaces:n,directives:i,fields:o})}parseUnionTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");const r=this.parseName(),n=this.parseConstDirectives(),i=this.parseUnionMemberTypes();return this.node(e,{kind:je.UNION_TYPE_DEFINITION,description:t,name:r,directives:n,types:i})}parseUnionMemberTypes(){return this.expectOptionalToken(zi.EQUALS)?this.delimitedMany(zi.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");const r=this.parseName(),n=this.parseConstDirectives(),i=this.parseEnumValuesDefinition();return this.node(e,{kind:je.ENUM_TYPE_DEFINITION,description:t,name:r,directives:n,values:i})}parseEnumValuesDefinition(){return this.optionalMany(zi.BRACE_L,this.parseEnumValueDefinition,zi.BRACE_R)}parseEnumValueDefinition(){const e=this._lexer.token,t=this.parseDescription(),r=this.parseEnumValueName(),n=this.parseConstDirectives();return this.node(e,{kind:je.ENUM_VALUE_DEFINITION,description:t,name:r,directives:n})}parseEnumValueName(){if("true"===this._lexer.token.value||"false"===this._lexer.token.value||"null"===this._lexer.token.value)throw Ui(this._lexer.source,this._lexer.token.start,`${po(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");const r=this.parseName(),n=this.parseConstDirectives(),i=this.parseInputFieldsDefinition();return this.node(e,{kind:je.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:r,directives:n,fields:i})}parseInputFieldsDefinition(){return this.optionalMany(zi.BRACE_L,this.parseInputValueDef,zi.BRACE_R)}parseTypeSystemExtension(){const e=this._lexer.lookahead();if(e.kind===zi.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(e)}parseSchemaExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const t=this.parseConstDirectives(),r=this.optionalMany(zi.BRACE_L,this.parseOperationTypeDefinition,zi.BRACE_R);if(0===t.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:je.SCHEMA_EXTENSION,directives:t,operationTypes:r})}parseScalarTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const t=this.parseName(),r=this.parseConstDirectives();if(0===r.length)throw this.unexpected();return this.node(e,{kind:je.SCALAR_TYPE_EXTENSION,name:t,directives:r})}parseObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const t=this.parseName(),r=this.parseImplementsInterfaces(),n=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(0===r.length&&0===n.length&&0===i.length)throw this.unexpected();return this.node(e,{kind:je.OBJECT_TYPE_EXTENSION,name:t,interfaces:r,directives:n,fields:i})}parseInterfaceTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const t=this.parseName(),r=this.parseImplementsInterfaces(),n=this.parseConstDirectives(),i=this.parseFieldsDefinition();if(0===r.length&&0===n.length&&0===i.length)throw this.unexpected();return this.node(e,{kind:je.INTERFACE_TYPE_EXTENSION,name:t,interfaces:r,directives:n,fields:i})}parseUnionTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const t=this.parseName(),r=this.parseConstDirectives(),n=this.parseUnionMemberTypes();if(0===r.length&&0===n.length)throw this.unexpected();return this.node(e,{kind:je.UNION_TYPE_EXTENSION,name:t,directives:r,types:n})}parseEnumTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const t=this.parseName(),r=this.parseConstDirectives(),n=this.parseEnumValuesDefinition();if(0===r.length&&0===n.length)throw this.unexpected();return this.node(e,{kind:je.ENUM_TYPE_EXTENSION,name:t,directives:r,values:n})}parseInputObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const t=this.parseName(),r=this.parseConstDirectives(),n=this.parseInputFieldsDefinition();if(0===r.length&&0===n.length)throw this.unexpected();return this.node(e,{kind:je.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:r,fields:n})}parseDirectiveDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(zi.AT);const r=this.parseName(),n=this.parseArgumentDefs(),i=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const o=this.parseDirectiveLocations();return this.node(e,{kind:je.DIRECTIVE_DEFINITION,description:t,name:r,arguments:n,repeatable:i,locations:o})}parseDirectiveLocations(){return this.delimitedMany(zi.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const e=this._lexer.token,t=this.parseName();if(Object.prototype.hasOwnProperty.call(Vi,t.value))return t;throw this.unexpected(e)}node(e,t){return!0!==this._options.noLocation&&(t.loc=new _e(e,this._lexer.lastToken,this._lexer.source)),t}peek(e){return this._lexer.token.kind===e}expectToken(e){const t=this._lexer.token;if(t.kind===e)return this.advanceLexer(),t;throw Ui(this._lexer.source,t.start,`Expected ${ho(e)}, found ${po(t)}.`)}expectOptionalToken(e){return this._lexer.token.kind===e&&(this.advanceLexer(),!0)}expectKeyword(e){const t=this._lexer.token;if(t.kind!==zi.NAME||t.value!==e)throw Ui(this._lexer.source,t.start,`Expected "${e}", found ${po(t)}.`);this.advanceLexer()}expectOptionalKeyword(e){const t=this._lexer.token;return t.kind===zi.NAME&&t.value===e&&(this.advanceLexer(),!0)}unexpected(e){const t=null!=e?e:this._lexer.token;return Ui(this._lexer.source,t.start,`Unexpected ${po(t)}.`)}any(e,t,r){this.expectToken(e);const n=[];for(;!this.expectOptionalToken(r);)n.push(t.call(this));return n}optionalMany(e,t,r){if(this.expectOptionalToken(e)){const e=[];do{e.push(t.call(this))}while(!this.expectOptionalToken(r));return e}return[]}many(e,t,r){this.expectToken(e);const n=[];do{n.push(t.call(this))}while(!this.expectOptionalToken(r));return n}delimitedMany(e,t){this.expectOptionalToken(e);const r=[];do{r.push(t.call(this))}while(this.expectOptionalToken(e));return r}advanceLexer(){const{maxTokens:e}=this._options,t=this._lexer.advance();if(void 0!==e&&t.kind!==zi.EOF&&(++this._tokenCounter,this._tokenCounter>e))throw Ui(this._lexer.source,t.start,`Document contains more that ${e} tokens. Parsing aborted.`)}}function po(e){const t=e.value;return ho(e.kind)+(null!=t?` "${t}"`:"")}function ho(e){return function(e){return e===zi.BANG||e===zi.DOLLAR||e===zi.AMP||e===zi.PAREN_L||e===zi.PAREN_R||e===zi.SPREAD||e===zi.COLON||e===zi.EQUALS||e===zi.AT||e===zi.BRACKET_L||e===zi.BRACKET_R||e===zi.BRACE_L||e===zi.PIPE||e===zi.BRACE_R}(e)?`"${e}"`:e}var yo=new Map,vo=new Map,mo=!0,bo=!1;function go(e){return e.replace(/[\s,]+/g," ").trim()}function _o(e){var t,r,i,o=go(e);if(!yo.has(o)){var s=function(e,t){return new fo(e,t).parseDocument()}(e,{experimentalFragmentVariables:bo,allowLegacyFragmentVariables:bo});if(!s||"Document"!==s.kind)throw new Error("Not a valid GraphQL document.");yo.set(o,function(e){var t=new Set(e.definitions);t.forEach((function(e){e.loc&&delete e.loc,Object.keys(e).forEach((function(r){var n=e[r];n&&"object"==typeof n&&t.add(n)}))}));var r=e.loc;return r&&(delete r.startToken,delete r.endToken),e}((t=s,r=new Set,i=[],t.definitions.forEach((function(e){if("FragmentDefinition"===e.kind){var t=e.name.value,n=go((s=e.loc).source.body.substring(s.start,s.end)),o=vo.get(t);o&&!o.has(n)?mo&&console.warn("Warning: fragment with name "+t+" already exists.\ngraphql-tag enforces all fragment names across your application to be unique; read more about\nthis in the docs: http://dev.apollodata.com/core/fragments.html#unique-names"):o||vo.set(t,o=new Set),o.add(n),r.has(n)||(r.add(n),i.push(e))}else i.push(e);var s})),(0,n.__assign)((0,n.__assign)({},t),{definitions:i}))))}return yo.get(o)}function wo(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];"string"==typeof e&&(e=[e]);var n=e[0];return t.forEach((function(t,r){t&&"Document"===t.kind?n+=t.loc.source.body:n+=t,n+=e[r+1]})),_o(n)}function Oo(){yo.clear(),vo.clear()}function So(){mo=!1}function Eo(){bo=!0}function To(){bo=!1}var jo,Po=wo,Io=Oo,xo=So,Ao=Eo,No=To;(jo=wo||(wo={})).gql=Po,jo.resetCaches=Io,jo.disableFragmentWarnings=xo,jo.enableExperimentalFragmentVariables=Ao,jo.disableExperimentalFragmentVariables=No,wo.default=wo,p(m?"log":"silent")},1143:e=>{"use strict";e.exports=JSON.parse('{"$id":"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON AnySchema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}')},1512:e=>{"use strict";e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var n={};(()=>{"use strict";var e=n;Object.defineProperty(e,"__esModule",{value:!0}),e.GraphQLClient=e.Squid=e.QueryBuilder=e.Changes=e.JoinQueryBuilder=e.DocumentReference=e.CollectionReference=void 0;var t=r(5660);Object.defineProperty(e,"CollectionReference",{enumerable:!0,get:function(){return t.CollectionReference}});var i=r(4516);Object.defineProperty(e,"DocumentReference",{enumerable:!0,get:function(){return i.DocumentReference}});var o=r(9732);Object.defineProperty(e,"JoinQueryBuilder",{enumerable:!0,get:function(){return o.JoinQueryBuilder}});var s=r(6891);Object.defineProperty(e,"Changes",{enumerable:!0,get:function(){return s.Changes}}),Object.defineProperty(e,"QueryBuilder",{enumerable:!0,get:function(){return s.QueryBuilder}});var a=r(5395);Object.defineProperty(e,"Squid",{enumerable:!0,get:function(){return a.Squid}});var u=r(5857);Object.defineProperty(e,"GraphQLClient",{enumerable:!0,get:function(){return u.GraphQLClient}})})();var i=exports;for(var o in n)i[o]=n[o];n.__esModule&&Object.defineProperty(i,"__esModule",{value:!0})})();
|